apex-grid 3.2.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/CHANGELOG.md +120 -0
  2. package/README.md +229 -52
  3. package/components/cell.d.ts +16 -3
  4. package/components/cell.js +78 -8
  5. package/components/cell.js.map +1 -1
  6. package/components/filter-row.d.ts +3 -6
  7. package/components/filter-row.js +144 -115
  8. package/components/filter-row.js.map +1 -1
  9. package/components/grid.d.ts +421 -77
  10. package/components/grid.js +432 -13
  11. package/components/grid.js.map +1 -1
  12. package/components/group-header-row.d.ts +34 -0
  13. package/components/group-header-row.js +125 -0
  14. package/components/group-header-row.js.map +1 -0
  15. package/components/header-row.d.ts +13 -2
  16. package/components/header-row.js +33 -18
  17. package/components/header-row.js.map +1 -1
  18. package/components/header.d.ts +11 -0
  19. package/components/header.js +209 -8
  20. package/components/header.js.map +1 -1
  21. package/components/paginator.d.ts +6 -1
  22. package/components/paginator.js +17 -11
  23. package/components/paginator.js.map +1 -1
  24. package/components/row.d.ts +28 -0
  25. package/components/row.js +100 -3
  26. package/components/row.js.map +1 -1
  27. package/components/toolbar.d.ts +8 -1
  28. package/components/toolbar.js +25 -7
  29. package/components/toolbar.js.map +1 -1
  30. package/controllers/data-operation.js +1 -0
  31. package/controllers/data-operation.js.map +1 -1
  32. package/controllers/dom.d.ts +24 -6
  33. package/controllers/dom.js +62 -5
  34. package/controllers/dom.js.map +1 -1
  35. package/controllers/editing.d.ts +68 -1
  36. package/controllers/editing.js +129 -44
  37. package/controllers/editing.js.map +1 -1
  38. package/controllers/expansion.js +4 -4
  39. package/controllers/expansion.js.map +1 -1
  40. package/controllers/filter.d.ts +1 -1
  41. package/controllers/filter.js +27 -5
  42. package/controllers/filter.js.map +1 -1
  43. package/controllers/history.d.ts +86 -0
  44. package/controllers/history.js +125 -0
  45. package/controllers/history.js.map +1 -0
  46. package/controllers/navigation.d.ts +49 -2
  47. package/controllers/navigation.js +145 -3
  48. package/controllers/navigation.js.map +1 -1
  49. package/controllers/pagination.js +1 -1
  50. package/controllers/pagination.js.map +1 -1
  51. package/controllers/reorder.js +3 -1
  52. package/controllers/reorder.js.map +1 -1
  53. package/controllers/row-pin.d.ts +59 -0
  54. package/controllers/row-pin.js +75 -0
  55. package/controllers/row-pin.js.map +1 -0
  56. package/controllers/row-reorder.d.ts +161 -0
  57. package/controllers/row-reorder.js +332 -0
  58. package/controllers/row-reorder.js.map +1 -0
  59. package/controllers/selection.js +3 -3
  60. package/controllers/selection.js.map +1 -1
  61. package/controllers/sort.js +13 -3
  62. package/controllers/sort.js.map +1 -1
  63. package/controllers/state.d.ts +33 -0
  64. package/controllers/state.js +37 -2
  65. package/controllers/state.js.map +1 -1
  66. package/controllers/tree.d.ts +8 -0
  67. package/controllers/tree.js +0 -0
  68. package/controllers/tree.js.map +1 -1
  69. package/custom-elements.json +4667 -926
  70. package/docs/assets/hierarchy.js +1 -1
  71. package/docs/assets/highlight.css +28 -0
  72. package/docs/assets/navigation.js +1 -1
  73. package/docs/assets/search.js +1 -1
  74. package/docs/functions/custom.html +3 -0
  75. package/docs/functions/interpolate.html +4 -0
  76. package/docs/functions/localize.html +8 -0
  77. package/docs/functions/max.html +3 -0
  78. package/docs/functions/min.html +3 -0
  79. package/docs/functions/pattern.html +3 -0
  80. package/docs/functions/required.html +3 -0
  81. package/docs/hierarchy.html +1 -1
  82. package/docs/index.html +245 -54
  83. package/docs/interfaces/ApexCellValidationFailedEvent.html +13 -0
  84. package/docs/interfaces/ApexCellValueChangedEvent.html +1 -1
  85. package/docs/interfaces/ApexCellValueChangingEvent.html +2 -2
  86. package/docs/interfaces/ApexColumnGroupContext.html +6 -0
  87. package/docs/interfaces/ApexColumnMovedEvent.html +2 -2
  88. package/docs/interfaces/ApexColumnMovingEvent.html +1 -1
  89. package/docs/interfaces/ApexDetailContext.html +2 -2
  90. package/docs/interfaces/ApexGridEventMap.html +37 -9
  91. package/docs/interfaces/ApexHistoryChangedEvent.html +6 -0
  92. package/docs/interfaces/ApexPageChangedEvent.html +1 -1
  93. package/docs/interfaces/ApexRowMovingEvent.html +9 -0
  94. package/docs/interfaces/ApexRowPinningEvent.html +8 -0
  95. package/docs/interfaces/ApexStateChangedEvent.html +4 -0
  96. package/docs/interfaces/BaseApexCellContext.html +1 -1
  97. package/docs/interfaces/BaseApexEditorContext.html +1 -1
  98. package/docs/interfaces/BaseColumnConfiguration.html +42 -17
  99. package/docs/interfaces/CSVExportOptions.html +2 -2
  100. package/docs/interfaces/ColumnGroupConfiguration.html +12 -0
  101. package/docs/interfaces/ColumnLayoutState.html +2 -0
  102. package/docs/interfaces/ColumnSchema.html +22 -0
  103. package/docs/interfaces/DataPipelineConfiguration.html +2 -2
  104. package/docs/interfaces/EditingHistoryConfiguration.html +10 -0
  105. package/docs/interfaces/ExportFormat.html +2 -2
  106. package/docs/interfaces/ExportOptions.html +1 -1
  107. package/docs/interfaces/FilterStateSnapshot.html +4 -0
  108. package/docs/interfaces/GetStateOptions.html +4 -0
  109. package/docs/interfaces/GridCapabilities.html +8 -0
  110. package/docs/interfaces/GridEditingConfiguration.html +4 -2
  111. package/docs/interfaces/GridRowPinningConfiguration.html +5 -0
  112. package/docs/interfaces/GridRowReorderingConfiguration.html +22 -0
  113. package/docs/interfaces/GridSchema.html +19 -0
  114. package/docs/interfaces/GridState.html +41 -0
  115. package/docs/interfaces/GridTreeConfiguration.html +2 -2
  116. package/docs/interfaces/PaginationConfiguration.html +1 -1
  117. package/docs/interfaces/PaginationState.html +1 -1
  118. package/docs/interfaces/SetStateOptions.html +9 -0
  119. package/docs/interfaces/SetStateResult.html +11 -0
  120. package/docs/interfaces/SortStateSnapshot.html +2 -0
  121. package/docs/interfaces/ValidatorContext.html +8 -0
  122. package/docs/media/_tokens.scss +70 -81
  123. package/docs/media/package.json +2 -2
  124. package/docs/media/state-persistence.html +189 -0
  125. package/docs/modules.html +1 -1
  126. package/docs/types/DataPipelineParams.html +2 -2
  127. package/docs/types/EditMode.html +2 -2
  128. package/docs/types/GridLocaleKey.html +3 -0
  129. package/docs/types/GridLocaleText.html +5 -0
  130. package/docs/types/LocaleParams.html +2 -0
  131. package/docs/types/PaginationMode.html +1 -1
  132. package/docs/types/RowDropPosition.html +2 -0
  133. package/docs/types/RowPinPosition.html +2 -0
  134. package/docs/types/RowRef.html +3 -0
  135. package/docs/types/Validator.html +4 -0
  136. package/docs/variables/EN_LOCALE.html +9 -0
  137. package/docs/variables/esLocale.html +8 -0
  138. package/i18n/en.d.ts +245 -0
  139. package/i18n/en.js +219 -0
  140. package/i18n/en.js.map +1 -0
  141. package/i18n/es.d.ts +18 -0
  142. package/i18n/es.js +219 -0
  143. package/i18n/es.js.map +1 -0
  144. package/i18n/index.d.ts +3 -0
  145. package/i18n/index.js +4 -0
  146. package/i18n/index.js.map +1 -0
  147. package/i18n/localize.d.ts +23 -0
  148. package/i18n/localize.js +15 -0
  149. package/i18n/localize.js.map +1 -0
  150. package/index.d.ts +8 -2
  151. package/index.js +2 -0
  152. package/index.js.map +1 -1
  153. package/internal/column-types.js +1 -1
  154. package/internal/column-types.js.map +1 -1
  155. package/internal/feature-module.d.ts +46 -0
  156. package/internal/feature-module.js +11 -0
  157. package/internal/feature-module.js.map +1 -1
  158. package/internal/flip.js +1 -1
  159. package/internal/flip.js.map +1 -1
  160. package/internal/icons.d.ts +9 -7
  161. package/internal/icons.js +75 -35
  162. package/internal/icons.js.map +1 -1
  163. package/internal/index.d.ts +5 -3
  164. package/internal/index.js +2 -1
  165. package/internal/index.js.map +1 -1
  166. package/internal/state-schema.d.ts +85 -0
  167. package/internal/state-schema.js +27 -0
  168. package/internal/state-schema.js.map +1 -0
  169. package/internal/state-snapshot.d.ts +152 -0
  170. package/internal/state-snapshot.js +115 -0
  171. package/internal/state-snapshot.js.map +1 -0
  172. package/internal/tags.d.ts +1 -0
  173. package/internal/tags.js +1 -0
  174. package/internal/tags.js.map +1 -1
  175. package/internal/types.d.ts +162 -2
  176. package/internal/types.js.map +1 -1
  177. package/internal/utils.d.ts +12 -0
  178. package/internal/utils.js +17 -0
  179. package/internal/utils.js.map +1 -1
  180. package/internal/validators.d.ts +31 -0
  181. package/internal/validators.js +44 -0
  182. package/internal/validators.js.map +1 -0
  183. package/package.json +1 -1
  184. package/styles/_tokens.css.js +1 -1
  185. package/styles/_tokens.css.js.map +1 -1
  186. package/styles/body-cell/body-cell.css.js +1 -1
  187. package/styles/body-cell/body-cell.css.js.map +1 -1
  188. package/styles/body-row/body-row.css.js +1 -1
  189. package/styles/body-row/body-row.css.js.map +1 -1
  190. package/styles/filter-row/filter-row.css.js +1 -1
  191. package/styles/filter-row/filter-row.css.js.map +1 -1
  192. package/styles/grid/_grid.base.css.js +1 -1
  193. package/styles/grid/_grid.base.css.js.map +1 -1
  194. package/styles/grid/grid.css.js +1 -1
  195. package/styles/grid/grid.css.js.map +1 -1
  196. package/styles/group-header-row/group-header-row.css.d.ts +1 -0
  197. package/styles/group-header-row/group-header-row.css.js +3 -0
  198. package/styles/group-header-row/group-header-row.css.js.map +1 -0
  199. package/styles/header-cell/header-cell.css.js +1 -1
  200. package/styles/header-cell/header-cell.css.js.map +1 -1
  201. package/styles/header-row/header-row.base.css.js +1 -1
  202. package/styles/header-row/header-row.base.css.js.map +1 -1
  203. package/styles/toolbar/toolbar.css.js +1 -1
  204. package/styles/toolbar/toolbar.css.js.map +1 -1
  205. package/docs/classes/ApexGrid.html +0 -399
package/CHANGELOG.md CHANGED
@@ -4,6 +4,125 @@ All notable changes to the `apex-grid` (community) package are documented here.
4
4
  This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
5
5
  and the format is based on [Keep a Changelog](https://keepachangelog.com/).
6
6
 
7
+ ## [3.4.0] - 2026-07-17
8
+
9
+ An accessibility-focused release. The public module API is unchanged (no
10
+ exported symbol was added, removed, or renamed); two keyboard and editing
11
+ behaviors changed, listed under Changed below.
12
+
13
+ ### Added
14
+ - **Keyboard editing and navigation.** Enter or F2 opens the active cell's
15
+ editor (previously editing was pointer-only); PageUp / PageDown move by a
16
+ viewport page; Ctrl/Cmd+Home and Ctrl/Cmd+End jump to the grid's first and
17
+ last cell.
18
+ - **Roving-tabindex focus model.** The active cell is the grid body's single
19
+ tab stop, so real focus follows arrow-key navigation and screen readers
20
+ track cell-to-cell movement. Keyboard-driven commit or cancel returns focus
21
+ to the cell.
22
+ - **Localized live-region announcements** for sorting, filtering, selection,
23
+ paging, row pinning, row reorder, expansion, and undo / redo, plus localized
24
+ header control labels and sort-state descriptions. New locale keys under
25
+ `announce.*` and `header.*`, along with `grid.label` and `editor.rating`
26
+ (English and Spanish).
27
+ - The grid host now applies a localized `aria-label` ("Data grid") unless the
28
+ author sets `aria-label` / `aria-labelledby`, and reflects
29
+ `aria-multiselectable` when multi-row selection is enabled.
30
+ - **Locale keys for the enterprise chart panel** (`chart.*`) and the reworked
31
+ enterprise AI surface (`ai.*`). Inert in the community grid.
32
+ - **Error-value rendering.** A spreadsheet-style error value (an object with a
33
+ `#...` code, such as the enterprise formula engine's `#VALUE!`) now renders
34
+ as its code in typed (number / currency) columns instead of being coerced to
35
+ `NaN` and showing an empty cell.
36
+
37
+ ### Changed
38
+ - **Home / End now move within the row** (first / last cell of the active
39
+ row), matching the common data-grid convention; previously they jumped to
40
+ the first / last row. Use Ctrl/Cmd+Home / Ctrl/Cmd+End for the grid corners.
41
+ - **Clearing a number or currency editor commits `null`, not `NaN`.** An empty
42
+ or unparseable numeric input previously wrote `NaN` into the row.
43
+
44
+ ### Removed
45
+ - The `ai.noAdapter` locale key (the enterprise AI adapter API it supported
46
+ was replaced; see the `apex-grid-enterprise` 0.6.0 changelog). If you
47
+ overrode this key in `localeText`, remove it.
48
+
49
+ ## [3.3.0] - 2026-07-02
50
+
51
+ A large, additive, backward-compatible release. The public `.` / `./define` API
52
+ stays compatible and existing grids keep working. A couple of default behaviors
53
+ changed: numeric and currency columns now left-align (previously their values
54
+ right-aligned), and a column menu / filter button now appear on sortable /
55
+ filterable columns.
56
+
57
+ ### Added
58
+ - **State snapshots: `getState()` / `setState()`.** Serialize and restore the
59
+ grid's state (such as sort, filter, columns, pagination, selection, and
60
+ expansion) as a plain, JSON-safe object. `setState()` is defensive: it
61
+ validates the incoming shape and returns a result report instead of throwing
62
+ on unexpected input.
63
+ - **`getSchema()`.** A capability descriptor for the grid's columns and features,
64
+ intended for tooling and AI integrations.
65
+ - **`stateChanged` event.** Fires when a state-bearing operation changes, so a
66
+ host can persist or react to grid state.
67
+ - **Internationalization.** A `localeText` override map plus a bundled Spanish
68
+ (`es`) locale; every built-in string (core, and the enterprise features) is
69
+ localizable.
70
+ - **Declarative cell validation.** Per-column validators reject invalid edits,
71
+ reflect `data-invalid` on the cell, surface an inline error message, and block
72
+ the commit.
73
+ - **Undo / redo** for cell-data edits, backed by a history controller.
74
+ - **Row pinning.** Pin rows to sticky top and / or bottom bands that stay in view
75
+ while the body scrolls.
76
+ - **Row drag-reorder.** Reorder rows by dragging, applied as a manual-order
77
+ pipeline step. A six-dot grip handle shows by default (`rowReordering.handle`,
78
+ default `true`) and dragging lifts a full-row floating ghost. Two modes are
79
+ supported: handle mode (only the grip starts a drag, so the rest of the row
80
+ stays free for selection and editing) and whole-row mode (`handle: false`,
81
+ drag from anywhere on the row).
82
+ - **Column groups.** Spanning header groups above the column header row.
83
+ - **Spreadsheet coordinate hints.** Set `coordinateHints` (reflected as the
84
+ `coordinate-hints` attribute) to reveal a leading row-number gutter
85
+ (1, 2, 3, and so on) and A / B / C column-letter header chips, so cell
86
+ references are discoverable.
87
+ - **Header column menu and per-column filter button.** A kebab (three-dot)
88
+ button opens a column menu; the built-in items are Sort Ascending / Descending
89
+ and Autosize Column, and a feature module can supply the menu through the new
90
+ `ColumnMenuProvider` seam (so `apex-grid-enterprise` fills it with pin / hide /
91
+ group / chart actions). The kebab shows on sortable or resizable columns, or
92
+ whenever a module provides a menu, and is always visible (not hover-only); set
93
+ the new `columnMenu` property to `false` to hide it. Filterable columns also
94
+ show a filter button that opens the filter panel.
95
+ - **Column separators.** A persistent vertical divider now shows on every
96
+ column header's trailing edge, not just the frozen-column pin edges. On
97
+ columns that opt into resizing the divider doubles as the resize handle (it
98
+ takes the `col-resize` cursor and can be dragged). On by default; set
99
+ `columnSeparator` to `false` (reflected as the `column-separator` attribute)
100
+ to hide them. The line's color and vertical inset are themeable via
101
+ `--ag-header-separator` / `--header-separator-color` and
102
+ `--apex-header-separator-inset`.
103
+ - **`allowFormula` column flag.** Inert in the community grid; the seam the
104
+ `apex-grid-enterprise` formula editor builds on.
105
+
106
+ ### Changed
107
+ - **Numeric and currency columns left-align by default**, matching the common
108
+ data-grid default. Previously their values right-aligned; now the header label
109
+ and the column values both sit at the leading edge, like every other column.
110
+ Digits still use tabular figures so they stay vertically consistent.
111
+ - **Filtering opens in a floating panel** from the header filter button, instead
112
+ of an always-present inline filter row.
113
+ - Theming refinements: design-token tweaks and a crisp 1px frozen-column
114
+ pin-edge line.
115
+
116
+ ### Fixed
117
+ - Range-selection drag now tracks through `pointermove`, so a drag that leaves
118
+ and re-enters the grid stays accurate.
119
+
120
+ ### Internal
121
+ - Cell writes funnel through a single `applyCellEdit` choke point, so undo / redo,
122
+ validation, and (in enterprise) formula recalculation share one write path.
123
+ `apex-grid/internal` also gained the seams the enterprise coordinate, formula,
124
+ and column-menu (`ColumnMenuProvider`) features build on.
125
+
7
126
  ## [3.2.0] — 2026-06-23
8
127
 
9
128
  Additive, backward-compatible release. The default look of `<apex-grid>` is
@@ -107,6 +226,7 @@ Documentation-only patch (no runtime or API changes).
107
226
  - Repository converted to an npm-workspaces monorepo; this package publishes
108
227
  from `packages/core`.
109
228
 
229
+ [3.3.0]: https://github.com/apexcharts/apex-grid/releases
110
230
  [3.2.0]: https://github.com/apexcharts/apex-grid/releases
111
231
  [3.1.0]: https://github.com/apexcharts/apex-grid/releases
112
232
  [3.0.1]: https://github.com/apexcharts/apex-grid/releases
package/README.md CHANGED
@@ -8,22 +8,29 @@ A Lit-based, framework-agnostic web component data grid. Ships as a single custo
8
8
 
9
9
  ## Features
10
10
 
11
- - **Row virtualization** via `@lit-labs/virtualizer` — only ~20 rows in the DOM at any time, regardless of dataset size.
12
- - **Sorting** — single or multi-column, tri-state (asc / desc / none), per-column comparers.
13
- - **Filtering** — per-column filter chips with string / number / boolean / date operands, plus a quick-filter (global search) input.
14
- - **Pagination** — local slicing or remote mode with a `pageChanging` / `pageChanged` event pair; built-in `<apex-grid-paginator>`.
15
- - **Column pinning** — pin to start or end; visual reordering only, source `columns` array is preserved.
16
- - **Column reordering** — drag-and-drop with per-column opt-out, constrained to the column's pinning group.
17
- - **Column resizing** — pointer-driven, with a min-width safeguard.
18
- - **Inline editing** — cell or row mode, click or double-click trigger, per-column opt-in.
19
- - **Row selection** — single or multiple, optional checkbox column, full programmatic API.
20
- - **Row expansion (master-detail)** — opt-in chevron column with a `detailTemplate`.
21
- - **Tree data (nested rows)** — AG Grid–style `getDataPath` pattern over a flat array.
22
- - **CSV export** — programmatic method plus an optional toolbar dropdown. (Excel/XLSX export is in `apex-grid-enterprise`.)
23
- - **Toolbar** — opt-in `<apex-grid-toolbar>` with debounced quick filter and export menu.
24
- - **Templating** — slot-based templates for cells, headers, editors, and detail panels.
25
- - **Theming** — styled out-of-the-box; fully customizable through `--ag-*` CSS custom properties (no theme import or build step). Auto-matches an `igniteui-webcomponents` host app when one is present.
26
- - **Accessibility** — WCAG 2.2 AA semantics (`role="grid"` / `role="treegrid"`, `aria-rowcount`, `aria-colcount`, focus + keyboard navigation).
11
+ - **Row virtualization** via `@lit-labs/virtualizer`: only ~20 rows in the DOM at any time, regardless of dataset size.
12
+ - **Sorting**: single or multi-column, tri-state (asc / desc / none), per-column comparers.
13
+ - **Filtering**: per-column filter chips with string / number / boolean / date operands, plus a quick-filter (global search) input.
14
+ - **Pagination**: local slicing or remote mode with a `pageChanging` / `pageChanged` event pair; built-in `<apex-grid-paginator>`.
15
+ - **Column pinning**: pin to start or end; visual reordering only, source `columns` array is preserved.
16
+ - **Column reordering**: drag-and-drop with per-column opt-out, constrained to the column's pinning group.
17
+ - **Column resizing**: pointer-driven, with a min-width safeguard.
18
+ - **Column groups**: spanning multi-level headers over a flat `columns` array, respecting pin regions.
19
+ - **Inline editing**: cell or row mode, click or double-click trigger, per-column opt-in.
20
+ - **Cell validation**: declarative per-column `validators` (built-ins plus custom), surfaced with `aria-invalid` and an event.
21
+ - **Undo / redo**: opt-in history for cell edits, with keyboard shortcuts (Ctrl/Cmd+Z, etc.).
22
+ - **Row selection**: single or multiple, optional checkbox column, full programmatic API.
23
+ - **Row pinning**: sticky top / bottom bands rendered outside the virtualizer.
24
+ - **Row drag-reorder**: pointer and keyboard reordering with a manual order, mutually exclusive with sorting.
25
+ - **Row expansion (master-detail)**: opt-in chevron column with a `detailTemplate`.
26
+ - **Tree data (nested rows)**: `getDataPath` pattern over a flat array.
27
+ - **State & persistence**: `getState()` / `setState()` snapshot round-trip, a `stateChanged` event, and a `getSchema()` capability descriptor.
28
+ - **Localization (i18n)**: override any built-in string via `localeText`; bundled dictionaries (e.g. `esLocale`).
29
+ - **CSV export**: programmatic method plus an optional toolbar dropdown. (Excel/XLSX export is in `apex-grid-enterprise`.)
30
+ - **Toolbar**: opt-in `<apex-grid-toolbar>` with debounced quick filter and export menu.
31
+ - **Templating**: slot-based templates for cells, headers, editors, and detail panels.
32
+ - **Theming**: styled out-of-the-box; fully customizable through `--ag-*` CSS custom properties (no theme import or build step). Auto-matches an `igniteui-webcomponents` host app when one is present.
33
+ - **Accessibility**: WCAG 2.2 AA semantics (`role="grid"` / `role="treegrid"`, `aria-rowcount`, `aria-colcount`, focus + keyboard navigation).
27
34
  - **Provenance-signed npm releases** with OIDC trusted publishing.
28
35
 
29
36
  ---
@@ -38,7 +45,7 @@ import { setup } from 'apex-grid';
38
45
  setup();
39
46
  ```
40
47
 
41
- That single call registers `<apex-grid>` and adopts a default host stylesheet (`height: 100%; min-height: 240px`). The grid is styled out-of-the-box — no theme CSS import is required.
48
+ That single call registers `<apex-grid>` and adopts a default host stylesheet (`height: 100%; min-height: 240px`). The grid is styled out-of-the-box; no theme CSS import is required.
42
49
 
43
50
  ### Render the grid
44
51
 
@@ -87,7 +94,7 @@ If you'd rather not use `setup()`, this is what it does under the hood. Skipping
87
94
  npm install apex-grid lit
88
95
  ```
89
96
 
90
- `igniteui-webcomponents` ships as a transitive dependency — no separate install.
97
+ `igniteui-webcomponents` ships as a transitive dependency; no separate install.
91
98
 
92
99
  ### 2. Register the custom element
93
100
 
@@ -106,7 +113,7 @@ Without this, `<apex-grid>` is an inert unknown element.
106
113
 
107
114
  ### 3. (Optional) Customize the look
108
115
 
109
- The grid is styled out-of-the-box — there is no theme to import. Customize it by overriding the `--ag-*` CSS custom properties on `apex-grid` (or any ancestor); a one-line brand override cascades to every tint:
116
+ The grid is styled out-of-the-box; there is no theme to import. Customize it by overriding the `--ag-*` CSS custom properties on `apex-grid` (or any ancestor); a one-line brand override cascades to every tint:
110
117
 
111
118
  ```css
112
119
  apex-grid {
@@ -119,14 +126,14 @@ apex-grid {
119
126
 
120
127
  See [`src/styles/_tokens.scss`](src/styles/_tokens.scss) for the full token list (brand, surfaces, text, semantic state colors, typography, spacing, motion).
121
128
 
122
- **Grid edge / shadow.** By default the grid shows a flat 1px hairline edge (no drop shadow). Control it with the `--ag-grid-shadow` hook — this is an opt-in override, not one of the `_tokens.scss` defaults:
129
+ **Grid edge / shadow.** By default the grid shows a flat 1px hairline edge (no drop shadow). Control it with the `--ag-grid-shadow` hook, an opt-in override that is not one of the `_tokens.scss` defaults:
123
130
 
124
131
  ```css
125
132
  apex-grid { --ag-grid-shadow: var(--ag-shadow-card); } /* elevated floating-card look */
126
133
  apex-grid { --ag-grid-shadow: none; } /* remove the edge entirely */
127
134
  ```
128
135
 
129
- If you embed the grid alongside `igniteui-webcomponents`, the brand tokens automatically re-tint from the igniteui palette (`--ig-primary-500`) — no configuration needed.
136
+ If you embed the grid alongside `igniteui-webcomponents`, the brand tokens automatically re-tint from the igniteui palette (`--ig-primary-500`); no configuration needed.
130
137
 
131
138
  ### 4. Size the host
132
139
 
@@ -152,22 +159,22 @@ With the element registered and the host sized, you should see:
152
159
  - **Sort arrows** (↕) next to each header when `sort: true`.
153
160
  - A **filter row** below the headers with a "Filter" chip per column when `filter: true`.
154
161
  - **Hover state** on rows.
155
- - **Smooth scrolling** — DevTools shows only ~20 `<apex-grid-row>` elements at any time.
162
+ - **Smooth scrolling**: DevTools shows only ~20 `<apex-grid-row>` elements at any time.
156
163
 
157
164
  ### Troubleshooting
158
165
 
159
166
  | What you see | Likely cause |
160
167
  |---|---|
161
- | Want a different look / brand color | Step 3 — override the `--ag-*` CSS variables |
162
- | Only ~3 rows visible regardless of data size | Step 4 — no bounded height, **or** consumer CSS sets `display` on `<apex-grid>` (check console for the warning) |
163
- | `<apex-grid>` blank tag in DOM | Step 2 — element not registered |
164
- | Columns shown as literal `[object Object]` | `columns=` used as an attribute — must be a **property** (`.columns=${...}` in Lit, `[columns]=` in Angular, `:columns.prop=` in Vue, `el.columns = ...` in vanilla JS) |
168
+ | Want a different look / brand color | Step 3: override the `--ag-*` CSS variables |
169
+ | Only ~3 rows visible regardless of data size | Step 4: no bounded height, **or** consumer CSS sets `display` on `<apex-grid>` (check console for the warning) |
170
+ | `<apex-grid>` blank tag in DOM | Step 2: element not registered |
171
+ | Columns shown as literal `[object Object]` | `columns=` used as an attribute; must be a **property** (`.columns=${...}` in Lit, `[columns]=` in Angular, `:columns.prop=` in Vue, `el.columns = ...` in vanilla JS) |
165
172
 
166
173
  ---
167
174
 
168
175
  ## Features in depth
169
176
 
170
- Each feature below is fully opt-in — you only pay for what you turn on. Snippets assume `const grid = document.querySelector('apex-grid')!`.
177
+ Each feature below is fully opt-in: you only pay for what you turn on. Snippets assume `const grid = document.querySelector('apex-grid')!`.
171
178
 
172
179
  ### Sorting
173
180
 
@@ -184,6 +191,8 @@ grid.clearSort(); // or grid.clearSort(
184
191
 
185
192
  When `multiple` is enabled, a plain header click sorts by that column alone; hold Ctrl/Cmd and click to append additional columns as lower-priority sort keys. Events: `sorting` (cancellable), `sorted`.
186
193
 
194
+ Columns show a column menu (the three-dot / kebab button) in the header. Out of the box it offers **Sort Ascending**, **Sort Descending**, and **Autosize Column** (on sortable or resizable columns). A feature module can supply the menu instead through the `ColumnMenuProvider` seam: `apex-grid-enterprise` fills it with pin, hide, group, and chart actions on every column, shared with the right-click context menu. The button is always visible; set `columnMenu` to `false` to hide it entirely (a module's menu stays reachable by right-click).
195
+
187
196
  ### Filtering
188
197
 
189
198
  ```ts
@@ -199,6 +208,8 @@ grid.clearFilter();
199
208
 
200
209
  Operand classes: `StringOperands`, `NumberOperands`, `BooleanOperands`. Events: `filtering` (cancellable), `filtered`.
201
210
 
211
+ Filterable columns show a per-column filter button in the header that opens the filter panel; an active filter is highlighted (with a count badge when more than one condition is set).
212
+
202
213
  ### Quick filter (global search)
203
214
 
204
215
  ```ts
@@ -246,7 +257,7 @@ await grid.pinColumn('name', 'start');
246
257
  await grid.unpinColumn('name'); // or pinColumn('name', null)
247
258
  ```
248
259
 
249
- The source `columns` array is **not** reordered — only the visual render order changes. Read `grid.displayColumns` for the render order. Events: `columnPinning` (cancellable), `columnPinned`.
260
+ The source `columns` array is **not** reordered; only the visual render order changes. Read `grid.displayColumns` for the render order. Events: `columnPinning` (cancellable), `columnPinned`.
250
261
 
251
262
  ### Column reordering
252
263
 
@@ -262,6 +273,33 @@ await grid.moveColumn('email', 'name', 'after');
262
273
 
263
274
  Per-column opt-out: `{ key: 'id', reorderable: false }`. Reordering is constrained to the column's own pinning group (start / unpinned / end). Events: `columnMoving` (cancellable), `columnMoved`. Attribute: `column-reordering`.
264
275
 
276
+ ### Column separators
277
+
278
+ A persistent vertical divider on each column header's trailing edge, on by default. On columns that opt into resizing (`{ key, resizable: true }`) the divider doubles as the resize handle: it takes the `col-resize` cursor and can be dragged.
279
+
280
+ ```ts
281
+ grid.columnSeparator = false; // hide the dividers
282
+ ```
283
+
284
+ Theme the line with `--ag-header-separator` (or the `--header-separator-color` / `--igx-header-separator-color` override hooks) and set its vertical inset with `--apex-header-separator-inset`. Because the default is `true`, disable it through the property rather than markup (a default-on boolean attribute cannot be turned off by attribute alone). Attribute: `column-separator`.
285
+
286
+ ### Column groups (spanning headers)
287
+
288
+ ```ts
289
+ const columns = [
290
+ { key: 'first', group: 'name' },
291
+ { key: 'last', group: 'name' },
292
+ { key: 'city', group: 'address' },
293
+ { key: 'zip', group: 'address' },
294
+ ];
295
+ grid.columnGroups = [
296
+ { id: 'name', headerText: 'Name' },
297
+ { id: 'address', headerText: 'Address' },
298
+ ];
299
+ ```
300
+
301
+ A spanning header row renders above the column headers. `columns` stays flat, so width / pinning / resize / reorder are unaffected; membership is by reference (`column.group` points at a `columnGroups` entry). A group's members must be contiguous within one pin region (non-contiguous groups warn and skip the spanning cell); ungrouped columns get a blank spacer. Member reordering is confined to its group.
302
+
265
303
  ### Inline editing
266
304
 
267
305
  ```ts
@@ -279,6 +317,62 @@ grid.cancelEdit();
279
317
 
280
318
  `mode: 'row'` puts all editable cells in the row into edit together. Properties: `editingCell`, `editingRow`. Events: `cellValueChanging` (cancellable), `cellValueChanged`, plus `rowEditStarted` / `rowEditEnded` in row mode.
281
319
 
320
+ ### Keyboard navigation and accessibility
321
+
322
+ The grid body is a single tab stop: Tab enters the grid, and the active cell
323
+ holds real focus (a roving tabindex), so screen readers follow the cursor as
324
+ it moves. Keys, with editing enabled where relevant:
325
+
326
+ | Keys | Action |
327
+ |---|---|
328
+ | Arrow keys | Move the active cell |
329
+ | Home / End | First / last cell **in the row** |
330
+ | Ctrl/Cmd+Home / Ctrl/Cmd+End | First / last cell of the grid |
331
+ | PageUp / PageDown | Move up / down by a viewport page |
332
+ | Enter or F2 | Open the active cell's editor |
333
+ | Enter / Tab (while editing) | Commit (Tab commits and moves) |
334
+ | Escape (while editing) | Cancel the edit |
335
+ | Space | Toggle row selection (selection column) |
336
+ | Ctrl/Cmd+Z / Ctrl/Cmd+Y | Undo / redo (with history enabled) |
337
+
338
+ A keyboard-driven commit or cancel returns focus to the cell, so navigation
339
+ continues from where you were. Sorting, filtering, selection, paging, row
340
+ pinning, reorder, expansion, and undo / redo are announced through a polite
341
+ live region, and every announcement and control label is localizable (the
342
+ `announce.*` and `header.*` locale keys). The host gets a localized
343
+ `aria-label` ("Data grid") unless you provide `aria-label` /
344
+ `aria-labelledby` yourself.
345
+
346
+ > Changed in 3.4.0: Home / End used to jump to the first / last row; they now
347
+ > stay within the row. Use Ctrl/Cmd+Home / Ctrl/Cmd+End for the grid corners.
348
+
349
+ ### Cell validation
350
+
351
+ ```ts
352
+ import { required, min, max, pattern, custom } from 'apex-grid';
353
+
354
+ const columns = [
355
+ { key: 'name', editable: true, validators: [required('Name is required')] },
356
+ { key: 'age', editable: true, type: 'number', validators: [min(18), max(99)] },
357
+ { key: 'email', editable: true, validators: [pattern(/^[^@\s]+@[^@\s]+$/, 'Invalid email')] },
358
+ ];
359
+ ```
360
+
361
+ Validators run inside the commit path, before the cancellable `cellValueChanging` gate. A failure keeps the editor open, marks the cell (`aria-invalid` + an error message node), and fires `cellValidationFailed { key, rowIndex, data, value, errors }`. Built-ins: `required`, `min`, `max`, `pattern`, `custom`, or any `(value, ctx) => string | null`. In row mode all pending cells are validated atomically (no partial write); enterprise paste / fill validate per cell.
362
+
363
+ ### Undo / redo
364
+
365
+ ```ts
366
+ grid.editing = { enabled: true, mode: 'cell', history: { enabled: true } };
367
+
368
+ grid.undo(); // or Ctrl/Cmd+Z
369
+ grid.redo(); // or Ctrl/Cmd+Shift+Z / Ctrl+Y
370
+ grid.clearHistory();
371
+ grid.canUndo; grid.canRedo;
372
+ ```
373
+
374
+ Opt in via `editing.history`. Every committed cell edit is recorded (single, row-mode, and enterprise paste / fill collapse to one step). Keyboard shortcuts work while the grid body has focus, so an open editor's native undo is untouched. The stack holds 100 commands by default (`history: { enabled: true, stackSize: 200 }`). Event: `historyChanged { canUndo, canRedo }`.
375
+
282
376
  ### Row selection
283
377
 
284
378
  ```ts
@@ -294,6 +388,29 @@ grid.selectedRows = [data[2]]; // replace selection (goes through `rowSelec
294
388
 
295
389
  Events: `rowSelecting` (cancellable), `rowSelected`.
296
390
 
391
+ ### Row pinning (top / bottom)
392
+
393
+ ```ts
394
+ grid.rowPinning = { enabled: true };
395
+
396
+ grid.pinRow(data[0], 'top');
397
+ grid.pinRow(data[5], 'bottom');
398
+ grid.unpinRow(data[0]);
399
+ grid.pinnedRows; // { top: T[], bottom: T[] }
400
+ ```
401
+
402
+ Pinned rows render in sticky top / bottom bands outside the virtualizer and are lifted out of the scrollable set (no duplication). Selection and styling work by row reference. Events: `rowPinning` (cancellable), `rowPinned`.
403
+
404
+ ### Row drag-reorder
405
+
406
+ ```ts
407
+ grid.rowReordering = { enabled: true }; // add applyToData: true to splice grid.data in place
408
+
409
+ grid.moveRow(0, 4, 'after');
410
+ ```
411
+
412
+ By default (`rowReordering.handle`, boolean, default `true`) a six-dot grip handle shows at the start of every reorderable row, and dragging lifts a full-row floating ghost that follows the cursor. Both interaction modes are supported: **handle mode** (only the grip starts a drag, so the rest of the row stays free for selection and editing) and **whole-row mode** (set `handle: false` to drag from anywhere on the row, excluding interactive sub-parts like inputs and buttons). Or use the keyboard: focus a row, **Space** to grab, **Arrow** keys to move, **Space / Enter** to drop, **Esc** to cancel. The grid holds a manual order that is mutually exclusive with sorting (applying a sort clears it). By default the app persists the order via the `rowMoved` event; set `applyToData: true` to splice `grid.data` directly. Events: `rowMoving` (cancellable), `rowMoved { from, to, data }`.
413
+
297
414
  ### Row expansion (master-detail)
298
415
 
299
416
  ```ts
@@ -314,7 +431,7 @@ Events: `rowExpanding` (cancellable), `rowExpanded`.
314
431
 
315
432
  ### Tree data (nested rows)
316
433
 
317
- The data array stays **flat**. The grid derives the hierarchy from a `getDataPath(row)` callback that returns the path from root to that row — AG Grid's "tree data" pattern.
434
+ The data array stays **flat**. The grid derives the hierarchy from a `getDataPath(row)` callback that returns the path from root to that row, the flat-array "tree data" pattern.
318
435
 
319
436
  ```ts
320
437
  type Person = { id: number; name: string; title: string; path: string[] };
@@ -328,7 +445,7 @@ const data: Person[] = [
328
445
  grid.tree = {
329
446
  enabled: true,
330
447
  getDataPath: (row) => row.path,
331
- defaultExpanded: 1, // boolean | number — depth to expand
448
+ defaultExpanded: 1, // boolean | number, depth to expand
332
449
  groupColumnKey: 'name', // which column shows the chevron + indent
333
450
  childIndent: 20, // px per depth level
334
451
  };
@@ -349,7 +466,7 @@ grid.exportToCSV({ filename: 'users', source: 'selected' });
349
466
  const text = grid.exportToCSV({ filename: '' }); // no download, returns the string
350
467
  ```
351
468
 
352
- `source` can be `'view'` (default — post-filter/post-sort), `'page'`, `'selected'`, or `'all'`. Per-column opt-out: `{ key: 'secret', exportable: false }`.
469
+ `source` can be `'view'` (default, post-filter/post-sort), `'page'`, `'selected'`, or `'all'`. Per-column opt-out: `{ key: 'secret', exportable: false }`.
353
470
 
354
471
  > **XLSX (Excel) export** moved to [`apex-grid-enterprise`](https://www.npmjs.com/package/apex-grid-enterprise) in v3. `<apex-grid-enterprise>` adds `grid.exportToXLSX(...)` and an "Export XLSX" entry to this same toolbar menu. CSV stays free.
355
472
 
@@ -380,7 +497,7 @@ Search input has a `debounce` attribute (default `200`ms).
380
497
 
381
498
  ### Theming
382
499
 
383
- The grid styles itself through `--ag-*` CSS custom properties — override them on `apex-grid` (or any ancestor) to rebrand; see [`src/styles/_tokens.scss`](src/styles/_tokens.scss) for the full list. When `igniteui-webcomponents` is present, the brand tokens auto-tint from its palette.
500
+ The grid styles itself through `--ag-*` CSS custom properties; override them on `apex-grid` (or any ancestor) to rebrand; see [`src/styles/_tokens.scss`](src/styles/_tokens.scss) for the full list. When `igniteui-webcomponents` is present, the brand tokens auto-tint from its palette.
384
501
 
385
502
  Style with CSS parts on the grid, paginator, and toolbar:
386
503
 
@@ -389,6 +506,42 @@ apex-grid::part(paginator) { background: var(--surface-2); }
389
506
  apex-grid-toolbar::part(search-input) { font-family: var(--font-mono); }
390
507
  ```
391
508
 
509
+ ### Spreadsheet coordinates
510
+
511
+ ```ts
512
+ grid.coordinateHints = true;
513
+ ```
514
+
515
+ ```html
516
+ <apex-grid coordinate-hints></apex-grid>
517
+ ```
518
+
519
+ When `coordinateHints` is on, the grid shows a leading row-number gutter (1, 2, 3, and so on) and A / B / C column-letter chips in the headers, so cell references are discoverable (a spreadsheet-style look). Set it directly for a persistent spreadsheet look. `apex-grid-enterprise` turns it on by default for any grid that has an `allowFormula` column, so the gutter is reserved up front and entering a formula never shifts the layout. Reflected to the `coordinate-hints` attribute (default `false`).
520
+
521
+ ### State & persistence
522
+
523
+ `getState()` returns a JSON-safe snapshot of the grid's restorable view and `setState()` applies one back. The snapshot covers column layout (order, width, pinning, visibility), sort, filter, quick filter, pagination, selection, expansion, tree expansion, pinned rows, the manual drag-reorder order, and any feature-module state (enterprise grouping / pivot / aggregation / ranges). Functions and templates are never serialized: sort comparers, filter condition functions, and cell/header/editor templates re-bind from the live `columns` config on restore (filter conditions are captured by operand name).
524
+
525
+ ```js
526
+ // Save and restore a view.
527
+ localStorage.setItem('view', JSON.stringify(grid.getState()));
528
+ grid.setState(JSON.parse(localStorage.getItem('view')));
529
+
530
+ // Persist automatically: stateChanged fires (debounced) after every settled
531
+ // change, and only while something is listening.
532
+ grid.addEventListener('stateChanged', (e) =>
533
+ localStorage.setItem('view', JSON.stringify(e.detail.state))
534
+ );
535
+ ```
536
+
537
+ **Row identity.** Selection, expansion, pinned rows, and the manual order are captured as row references. Set `grid.rowId = (row) => row.id` for durable references that survive a data reload; without it, rows are referenced by position (index), which round-trips within a session but not across a reload.
538
+
539
+ **`setState` is defensive.** It is meant to accept persisted-and-possibly-stale blobs and AI output, so it never throws on bad input (unless you pass `{ strict: true }`): unknown columns / operands are dropped, out-of-range pages clamped, unresolvable rows skipped, and a wrong snapshot `version` applied best-effort. It returns a `SetStateResult` (`{ applied, skipped, warnings }`) so you can see exactly what happened. `setState` is partial: pass only the slices you want to change.
540
+
541
+ **`getSchema()`** returns a machine-readable description of the grid (columns + data types, available sort directions and filter operands per column, grid-level capabilities) with the current state embedded. It is the contract an AI layer feeds an LLM and validates a patch against, but it equally drives a view-editor UI or documentation.
542
+
543
+ See [`demo/state-persistence.html`](../../demo/state-persistence.html) for a save / restore / live-snapshot example.
544
+
392
545
  ---
393
546
 
394
547
  ## API Reference
@@ -401,26 +554,34 @@ apex-grid-toolbar::part(search-input) { font-family: var(--font-mono); }
401
554
  | `columns` | `ColumnConfiguration<T>[]` | `[]` | Column configuration (property only) |
402
555
  | `autoGenerate` | `boolean` | `false` | Infer columns from `data[0]` keys. Attr `auto-generate` |
403
556
  | `sortConfiguration` | `GridSortConfiguration` | `{ multiple, triState }` | |
404
- | `dataPipelineConfiguration` | `DataPipelineConfiguration<T>` | — | Custom sort/filter/pagination hooks |
405
- | `pagination` | `PaginationConfiguration` | — | |
557
+ | `dataPipelineConfiguration` | `DataPipelineConfiguration<T>` | | Custom sort/filter/pagination hooks |
558
+ | `pagination` | `PaginationConfiguration` | | |
406
559
  | `quickFilter` | `string` | `''` | Attr `quick-filter` |
407
560
  | `showQuickFilter` | `boolean` | `false` | Attr `show-quick-filter` |
408
561
  | `showExport` | `boolean` | `false` | Attr `show-export` |
409
562
  | `columnReordering` | `boolean` | `false` | Attr `column-reordering` |
410
- | `editing` | `GridEditingConfiguration` | — | |
411
- | `selection` | `GridSelectionConfiguration` | — | |
412
- | `expansion` | `GridExpansionConfiguration<T>` | — | |
413
- | `tree` | `GridTreeConfiguration<T>` | — | |
414
- | `sortExpressions` | `SortExpression<T>[]` | — | Get/set |
415
- | `filterExpressions` | `FilterExpression<T>[]` | — | Get/set |
416
- | `selectedRows` | `T[]` | — | Get/set |
417
- | `expandedRows` | `T[]` | — | Get/set |
418
- | `page`, `pageSize`, `pageCount`, `totalItems` | `number` | — | |
419
- | `pageItems` | `readonly T[]` | — | Currently rendered slice |
420
- | `dataView` | `readonly T[]` | — | Post-filter, post-sort |
421
- | `displayColumns` | `readonly ColumnConfiguration<T>[]` | — | Render order (pinned start → unpinned → pinned end) |
422
- | `editingCell` | `{ rowIndex, columnKey } \| null` | — | |
423
- | `editingRow` | `number \| null` | — | Row-mode only |
563
+ | `columnGroups` | `ColumnGroupConfiguration[]` | | Spanning header groups (`column.group` references an `id`) |
564
+ | `editing` | `GridEditingConfiguration` | | Includes `history` for undo/redo; per-column `validators` |
565
+ | `selection` | `GridSelectionConfiguration` | | |
566
+ | `expansion` | `GridExpansionConfiguration<T>` | | |
567
+ | `tree` | `GridTreeConfiguration<T>` | | |
568
+ | `rowPinning` | `GridRowPinningConfiguration` | | `{ enabled }` |
569
+ | `rowReordering` | `GridRowReorderingConfiguration` | | `{ enabled, applyToData?, handle? }` (`handle` default `true`: grip-only drag) |
570
+ | `coordinateHints` | `boolean` | `false` | Show a row-number gutter + A / B / C header chips (spreadsheet look). Attr `coordinate-hints` |
571
+ | `columnMenu` | `boolean` | `true` | Show the always-visible column-menu (kebab) button on headers; `false` hides it |
572
+ | `rowId` | `(row: T) => string \| number` | | Durable row identity for `getState` / `setState` |
573
+ | `localeText` | `GridLocaleText` | | Override map for built-in strings (e.g. `esLocale`) |
574
+ | `canUndo`, `canRedo` | `boolean` | | Get (history) |
575
+ | `sortExpressions` | `SortExpression<T>[]` | | Get/set |
576
+ | `filterExpressions` | `FilterExpression<T>[]` | | Get/set |
577
+ | `selectedRows` | `T[]` | | Get/set |
578
+ | `expandedRows` | `T[]` | | Get/set |
579
+ | `page`, `pageSize`, `pageCount`, `totalItems` | `number` | | |
580
+ | `pageItems` | `readonly T[]` | | Currently rendered slice |
581
+ | `dataView` | `readonly T[]` | | Post-filter, post-sort |
582
+ | `displayColumns` | `readonly ColumnConfiguration<T>[]` | | Render order (pinned start → unpinned → pinned end) |
583
+ | `editingCell` | `{ rowIndex, columnKey } \| null` | | |
584
+ | `editingRow` | `number \| null` | | Row-mode only |
424
585
 
425
586
  ### Methods
426
587
 
@@ -455,8 +616,19 @@ expandAllRows(); collapseAllRows(); isRowExpanded(row)
455
616
  toggleTreeRow(row); expandTreeRow(row); collapseTreeRow(row)
456
617
  expandAllTreeRows(); collapseAllTreeRows(); isTreeRowExpanded(row)
457
618
 
619
+ pinRow(row, 'top' | 'bottom'); unpinRow(row) // pinnedRows getter
620
+ moveRow(from, to, 'before' | 'after')
621
+
622
+ undo(); redo(); clearHistory() // canUndo / canRedo getters
623
+
624
+ localize(key, params?, fallback?): string // resolve a locale string
625
+
458
626
  exportToCSV(options?): string
459
627
  exportAs(formatId, options?): void // toolbar dispatch; 'csv' (community), 'xlsx' (enterprise)
628
+
629
+ getState(options?): GridState
630
+ setState(state, options?): SetStateResult // partial + defensive; never throws unless { strict: true }
631
+ getSchema(): GridSchema // machine-readable capability descriptor
460
632
  ```
461
633
 
462
634
  ### Events
@@ -472,16 +644,21 @@ All events bubble and are composed across shadow boundaries. Names ending in `-i
472
644
  | `columnPinning` / `columnPinned` | yes / no | `{ key, previous, next }` / `{ key, pinned }` |
473
645
  | `columnMoving` / `columnMoved` | yes / no | `{ key, fromIndex, toKey, position }` / `{ key, fromIndex, toIndex }` |
474
646
  | `cellValueChanging` / `cellValueChanged` | yes / no | `{ row, column, value, newValue }` |
647
+ | `cellValidationFailed` | no | `{ key, rowIndex, data, value, errors }` |
475
648
  | `rowEditStarted` / `rowEditEnded` | no / no | row context |
649
+ | `historyChanged` | no | `{ canUndo, canRedo }` |
476
650
  | `rowSelecting` / `rowSelected` | yes / no | `{ added, removed }` |
651
+ | `rowPinning` / `rowPinned` | yes / no | `{ row, position }` |
652
+ | `rowMoving` / `rowMoved` | yes / no | `{ from, to, data }` |
477
653
  | `rowExpanding` / `rowExpanded` | yes / no | row context |
478
654
  | `treeRowExpanding` / `treeRowExpanded` | yes / no | row context |
655
+ | `stateChanged` | no | `{ state }` (debounced; only while listened) |
479
656
 
480
- Programmatic `sort()` / `filter()` calls are silent — only UI-initiated changes emit `sorting` / `filtering`.
657
+ Programmatic `sort()` / `filter()` calls are silent; only UI-initiated changes emit `sorting` / `filtering`.
481
658
 
482
659
  ### Attributes
483
660
 
484
- `auto-generate`, `quick-filter`, `show-quick-filter`, `show-export`, `column-reordering`.
661
+ `auto-generate`, `quick-filter`, `show-quick-filter`, `show-export`, `column-reordering`, `coordinate-hints`.
485
662
 
486
663
  ### CSS parts
487
664
 
@@ -523,11 +700,11 @@ npm run build # builds dist/ + custom-elements.json + typedoc
523
700
 
524
701
  Releases are automated by [.github/workflows/publish.yml](.github/workflows/publish.yml):
525
702
 
526
- 1. Bump `"version"` in [package.json](package.json) — the single source of truth. The build injects it into `dist/package.json`.
703
+ 1. Bump `"version"` in [package.json](package.json), the single source of truth. The build injects it into `dist/package.json`.
527
704
  2. Commit with a message starting with `release:` and the same version, e.g. `release: 2.0.0` or `release: 2.0.0-rc.1`.
528
705
  3. Push to `main`.
529
706
 
530
- The workflow then verifies the version triple-match, runs lint + tests + build, publishes `dist/` to npm with `--provenance` (OIDC trusted publishing — no token in secrets), and creates a `vX.Y.Z` git tag and GitHub Release with auto-generated notes. Pre-release versions (containing `-`) publish under the `next` dist-tag; stable versions under `latest`.
707
+ The workflow then verifies the version triple-match, runs lint + tests + build, publishes `dist/` to npm with `--provenance` (OIDC trusted publishing, no token in secrets), and creates a `vX.Y.Z` git tag and GitHub Release with auto-generated notes. Pre-release versions (containing `-`) publish under the `next` dist-tag; stable versions under `latest`.
531
708
 
532
709
  Any push whose head commit does not start with `release:` is a no-op for the workflow.
533
710
 
@@ -1,4 +1,4 @@
1
- import { LitElement } from 'lit';
1
+ import { LitElement, type PropertyValues } from 'lit';
2
2
  import { type StateController } from '../controllers/state.js';
3
3
  import type { ApexCellContext, ColumnConfiguration, PropertyType } from '../internal/types.js';
4
4
  import type ApexGridRow from './row.js';
@@ -53,10 +53,23 @@ export default class ApexGridCell<T extends object> extends LitElement {
53
53
  * `0` for the community grid, so cells are never re-decorated there.
54
54
  */
55
55
  decorationVersion: number;
56
+ /**
57
+ * Reactive token forwarded from {@link EditingController.validationVersion}.
58
+ * Changing it re-runs {@link willUpdate} so the cell re-reads its validation
59
+ * errors and toggles `aria-invalid` / the inline error node. Stays `0` until
60
+ * the first validation failure.
61
+ */
62
+ validationVersion: number;
56
63
  connectedCallback(): void;
57
64
  disconnectedCallback(): void;
58
65
  protected willUpdate(): void;
59
- protected updated(): void;
66
+ /**
67
+ * The inline error node surfaced when the cell is invalid. `role="alert"`
68
+ * announces the message when it appears, covering the cross-shadow gap where
69
+ * an `aria-errormessage` IDREF on the host can't reach this node.
70
+ */
71
+ protected renderError(): import("lit-html").TemplateResult<1> | null;
72
+ protected updated(changed: PropertyValues<this>): void;
60
73
  protected renderDefaultEditor(): import("lit-html").TemplateResult<1>;
61
74
  protected renderEditor(): unknown;
62
75
  /**
@@ -72,7 +85,7 @@ export default class ApexGridCell<T extends object> extends LitElement {
72
85
  */
73
86
  protected resolveDisplayValue(): unknown;
74
87
  protected renderCellBody(): unknown;
75
- protected render(): unknown;
88
+ protected render(): import("lit-html").TemplateResult<1>;
76
89
  }
77
90
  declare global {
78
91
  interface HTMLElementTagNameMap {