esa-grid is a thin Ecology skin over AG Grid (ag-grid-angular / ag-grid-community). It owns the column model, selection, sorting, pagination, quick-filter, and a set of Ecology cell renderers — then themes the underlying AG Grid DOM with design tokens.
Referencewraps AG Grid
Overview
Non-functional reference. This page documents the wrapper around AG Grid
(or an equivalent such as TanStack Table) behind the API below. The mock
further down is static HTML styled with Ecology tokens — it approximates the
rendered grid but does not sort, select, or scroll.
What it wraps
Third-party library: AG Grid Community (ag-grid-angular, ag-grid-community).
Why a wrapper: AG Grid handles virtual scrolling, column virtualization, sort, filter, and pagination engine. Ecology contributes the column convention (EsaGridColumn), a config object with sane defaults, typed event payloads, themed DOM via ::ng-deep, and five reusable cell renderers.
Swappable: the public API (columnDefs, rowData, config, output events) is engine-agnostic enough to re-target TanStack Table if licensing or bundle size demanded it.
API
Inputs
Input
Type
Default
Purpose
columnDefs
EsaGridColumn<T>[]
required
Column definitions (extends AG Grid ColDef with esaRenderer).
rowData
T[]
required
Row data array.
config
EsaGridConfig
{}
High-level options, merged with ESA_GRID_DEFAULTS.
Pill chips with optional icon + "+N more" overflow.
esaTooltip
tooltipText, copyOnClick, maxWidth
Truncated text + native tooltip, optional copy-to-clipboard.
esaCheckbox
editable, onToggle
Read-only check icon, or an interactive checkbox when editable.
Tokens
The --grid-* hooks are staged: declared in
component-tokens.css ahead of the wrapper, so the theming contract is reviewable
before code depends on it. Every one falls back to a semantic token. The list below mirrors
that file by hand — check it against component-tokens.css when the wrapper lands.
State goes last, after the property — --grid-row-bg-hover, not
--grid-row-hover-bg — matching every other stateful token in the system. Border
tokens hold a colour, so a theme can re-point it without restating width and style.