apex-grid 3.2.0 → 3.3.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.
- package/CHANGELOG.md +78 -0
- package/README.md +200 -52
- package/components/cell.d.ts +14 -1
- package/components/cell.js +48 -6
- package/components/cell.js.map +1 -1
- package/components/filter-row.d.ts +3 -6
- package/components/filter-row.js +79 -109
- package/components/filter-row.js.map +1 -1
- package/components/grid.d.ts +416 -77
- package/components/grid.js +398 -11
- package/components/grid.js.map +1 -1
- package/components/group-header-row.d.ts +34 -0
- package/components/group-header-row.js +125 -0
- package/components/group-header-row.js.map +1 -0
- package/components/header-row.d.ts +13 -2
- package/components/header-row.js +33 -18
- package/components/header-row.js.map +1 -1
- package/components/header.d.ts +11 -0
- package/components/header.js +135 -5
- package/components/header.js.map +1 -1
- package/components/paginator.d.ts +6 -1
- package/components/paginator.js +17 -11
- package/components/paginator.js.map +1 -1
- package/components/row.d.ts +28 -0
- package/components/row.js +100 -3
- package/components/row.js.map +1 -1
- package/components/toolbar.d.ts +8 -1
- package/components/toolbar.js +25 -7
- package/components/toolbar.js.map +1 -1
- package/controllers/data-operation.js +1 -0
- package/controllers/data-operation.js.map +1 -1
- package/controllers/dom.d.ts +24 -6
- package/controllers/dom.js +62 -5
- package/controllers/dom.js.map +1 -1
- package/controllers/editing.d.ts +68 -1
- package/controllers/editing.js +129 -44
- package/controllers/editing.js.map +1 -1
- package/controllers/filter.d.ts +1 -1
- package/controllers/filter.js +16 -5
- package/controllers/filter.js.map +1 -1
- package/controllers/history.d.ts +86 -0
- package/controllers/history.js +118 -0
- package/controllers/history.js.map +1 -0
- package/controllers/navigation.d.ts +15 -0
- package/controllers/navigation.js +53 -0
- package/controllers/navigation.js.map +1 -1
- package/controllers/reorder.js +3 -1
- package/controllers/reorder.js.map +1 -1
- package/controllers/row-pin.d.ts +59 -0
- package/controllers/row-pin.js +75 -0
- package/controllers/row-pin.js.map +1 -0
- package/controllers/row-reorder.d.ts +161 -0
- package/controllers/row-reorder.js +332 -0
- package/controllers/row-reorder.js.map +1 -0
- package/controllers/sort.js +9 -1
- package/controllers/sort.js.map +1 -1
- package/controllers/state.d.ts +33 -0
- package/controllers/state.js +37 -2
- package/controllers/state.js.map +1 -1
- package/controllers/tree.d.ts +8 -0
- package/controllers/tree.js +0 -0
- package/controllers/tree.js.map +1 -1
- package/custom-elements.json +4411 -886
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/highlight.css +28 -0
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/functions/custom.html +3 -0
- package/docs/functions/interpolate.html +4 -0
- package/docs/functions/localize.html +8 -0
- package/docs/functions/max.html +3 -0
- package/docs/functions/min.html +3 -0
- package/docs/functions/pattern.html +3 -0
- package/docs/functions/required.html +3 -0
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +184 -54
- package/docs/interfaces/ApexCellValidationFailedEvent.html +13 -0
- package/docs/interfaces/ApexCellValueChangedEvent.html +1 -1
- package/docs/interfaces/ApexCellValueChangingEvent.html +2 -2
- package/docs/interfaces/ApexColumnGroupContext.html +6 -0
- package/docs/interfaces/ApexColumnMovedEvent.html +2 -2
- package/docs/interfaces/ApexColumnMovingEvent.html +1 -1
- package/docs/interfaces/ApexDetailContext.html +2 -2
- package/docs/interfaces/ApexGridEventMap.html +37 -9
- package/docs/interfaces/ApexHistoryChangedEvent.html +6 -0
- package/docs/interfaces/ApexPageChangedEvent.html +1 -1
- package/docs/interfaces/ApexRowMovingEvent.html +9 -0
- package/docs/interfaces/ApexRowPinningEvent.html +8 -0
- package/docs/interfaces/ApexStateChangedEvent.html +4 -0
- package/docs/interfaces/BaseApexCellContext.html +1 -1
- package/docs/interfaces/BaseApexEditorContext.html +1 -1
- package/docs/interfaces/BaseColumnConfiguration.html +42 -17
- package/docs/interfaces/CSVExportOptions.html +2 -2
- package/docs/interfaces/ColumnGroupConfiguration.html +12 -0
- package/docs/interfaces/ColumnLayoutState.html +2 -0
- package/docs/interfaces/ColumnSchema.html +22 -0
- package/docs/interfaces/DataPipelineConfiguration.html +2 -2
- package/docs/interfaces/EditingHistoryConfiguration.html +10 -0
- package/docs/interfaces/ExportFormat.html +2 -2
- package/docs/interfaces/ExportOptions.html +1 -1
- package/docs/interfaces/FilterStateSnapshot.html +4 -0
- package/docs/interfaces/GetStateOptions.html +4 -0
- package/docs/interfaces/GridCapabilities.html +8 -0
- package/docs/interfaces/GridEditingConfiguration.html +4 -2
- package/docs/interfaces/GridRowPinningConfiguration.html +5 -0
- package/docs/interfaces/GridRowReorderingConfiguration.html +22 -0
- package/docs/interfaces/GridSchema.html +19 -0
- package/docs/interfaces/GridState.html +41 -0
- package/docs/interfaces/GridTreeConfiguration.html +2 -2
- package/docs/interfaces/PaginationConfiguration.html +1 -1
- package/docs/interfaces/PaginationState.html +1 -1
- package/docs/interfaces/SetStateOptions.html +9 -0
- package/docs/interfaces/SetStateResult.html +11 -0
- package/docs/interfaces/SortStateSnapshot.html +2 -0
- package/docs/interfaces/ValidatorContext.html +8 -0
- package/docs/media/_tokens.scss +70 -81
- package/docs/media/package.json +1 -1
- package/docs/media/state-persistence.html +189 -0
- package/docs/modules.html +1 -1
- package/docs/types/DataPipelineParams.html +2 -2
- package/docs/types/EditMode.html +2 -2
- package/docs/types/GridLocaleKey.html +3 -0
- package/docs/types/GridLocaleText.html +5 -0
- package/docs/types/LocaleParams.html +2 -0
- package/docs/types/PaginationMode.html +1 -1
- package/docs/types/RowDropPosition.html +2 -0
- package/docs/types/RowPinPosition.html +2 -0
- package/docs/types/RowRef.html +3 -0
- package/docs/types/Validator.html +4 -0
- package/docs/variables/EN_LOCALE.html +9 -0
- package/docs/variables/esLocale.html +8 -0
- package/i18n/en.d.ts +151 -0
- package/i18n/en.js +125 -0
- package/i18n/en.js.map +1 -0
- package/i18n/es.d.ts +18 -0
- package/i18n/es.js +125 -0
- package/i18n/es.js.map +1 -0
- package/i18n/index.d.ts +3 -0
- package/i18n/index.js +4 -0
- package/i18n/index.js.map +1 -0
- package/i18n/localize.d.ts +23 -0
- package/i18n/localize.js +15 -0
- package/i18n/localize.js.map +1 -0
- package/index.d.ts +8 -2
- package/index.js +2 -0
- package/index.js.map +1 -1
- package/internal/feature-module.d.ts +46 -0
- package/internal/feature-module.js +11 -0
- package/internal/feature-module.js.map +1 -1
- package/internal/flip.js +1 -1
- package/internal/flip.js.map +1 -1
- package/internal/icons.d.ts +9 -7
- package/internal/icons.js +75 -35
- package/internal/icons.js.map +1 -1
- package/internal/index.d.ts +5 -3
- package/internal/index.js +2 -1
- package/internal/index.js.map +1 -1
- package/internal/state-schema.d.ts +85 -0
- package/internal/state-schema.js +27 -0
- package/internal/state-schema.js.map +1 -0
- package/internal/state-snapshot.d.ts +152 -0
- package/internal/state-snapshot.js +115 -0
- package/internal/state-snapshot.js.map +1 -0
- package/internal/tags.d.ts +1 -0
- package/internal/tags.js +1 -0
- package/internal/tags.js.map +1 -1
- package/internal/types.d.ts +162 -2
- package/internal/types.js.map +1 -1
- package/internal/utils.d.ts +12 -0
- package/internal/utils.js +17 -0
- package/internal/utils.js.map +1 -1
- package/internal/validators.d.ts +31 -0
- package/internal/validators.js +44 -0
- package/internal/validators.js.map +1 -0
- package/package.json +1 -1
- package/styles/_tokens.css.js +1 -1
- package/styles/_tokens.css.js.map +1 -1
- package/styles/body-cell/body-cell.css.js +1 -1
- package/styles/body-cell/body-cell.css.js.map +1 -1
- package/styles/body-row/body-row.css.js +1 -1
- package/styles/body-row/body-row.css.js.map +1 -1
- package/styles/filter-row/filter-row.css.js +1 -1
- package/styles/filter-row/filter-row.css.js.map +1 -1
- package/styles/grid/_grid.base.css.js +1 -1
- package/styles/grid/_grid.base.css.js.map +1 -1
- package/styles/grid/grid.css.js +1 -1
- package/styles/grid/grid.css.js.map +1 -1
- package/styles/group-header-row/group-header-row.css.d.ts +1 -0
- package/styles/group-header-row/group-header-row.css.js +3 -0
- package/styles/group-header-row/group-header-row.css.js.map +1 -0
- package/styles/header-cell/header-cell.css.js +1 -1
- package/styles/header-cell/header-cell.css.js.map +1 -1
- package/styles/header-row/header-row.base.css.js +1 -1
- package/styles/header-row/header-row.base.css.js.map +1 -1
- package/styles/toolbar/toolbar.css.js +1 -1
- package/styles/toolbar/toolbar.css.js.map +1 -1
- package/docs/classes/ApexGrid.html +0 -399
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,83 @@ 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.3.0] - 2026-07-02
|
|
8
|
+
|
|
9
|
+
A large, additive, backward-compatible release. The public `.` / `./define` API
|
|
10
|
+
stays compatible and existing grids keep working. A couple of default behaviors
|
|
11
|
+
changed: numeric and currency columns now left-align (previously their values
|
|
12
|
+
right-aligned), and a column menu / filter button now appear on sortable /
|
|
13
|
+
filterable columns.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- **State snapshots: `getState()` / `setState()`.** Serialize and restore the
|
|
17
|
+
grid's state (such as sort, filter, columns, pagination, selection, and
|
|
18
|
+
expansion) as a plain, JSON-safe object. `setState()` is defensive: it
|
|
19
|
+
validates the incoming shape and returns a result report instead of throwing
|
|
20
|
+
on unexpected input.
|
|
21
|
+
- **`getSchema()`.** A capability descriptor for the grid's columns and features,
|
|
22
|
+
intended for tooling and AI integrations.
|
|
23
|
+
- **`stateChanged` event.** Fires when a state-bearing operation changes, so a
|
|
24
|
+
host can persist or react to grid state.
|
|
25
|
+
- **Internationalization.** A `localeText` override map plus a bundled Spanish
|
|
26
|
+
(`es`) locale; every built-in string (core, and the enterprise features) is
|
|
27
|
+
localizable.
|
|
28
|
+
- **Declarative cell validation.** Per-column validators reject invalid edits,
|
|
29
|
+
reflect `data-invalid` on the cell, surface an inline error message, and block
|
|
30
|
+
the commit.
|
|
31
|
+
- **Undo / redo** for cell-data edits, backed by a history controller.
|
|
32
|
+
- **Row pinning.** Pin rows to sticky top and / or bottom bands that stay in view
|
|
33
|
+
while the body scrolls.
|
|
34
|
+
- **Row drag-reorder.** Reorder rows by dragging, applied as a manual-order
|
|
35
|
+
pipeline step. A six-dot grip handle shows by default (`rowReordering.handle`,
|
|
36
|
+
default `true`) and dragging lifts a full-row floating ghost. Two modes are
|
|
37
|
+
supported: handle mode (only the grip starts a drag, so the rest of the row
|
|
38
|
+
stays free for selection and editing) and whole-row mode (`handle: false`,
|
|
39
|
+
drag from anywhere on the row).
|
|
40
|
+
- **Column groups.** Spanning header groups above the column header row.
|
|
41
|
+
- **Spreadsheet coordinate hints.** Set `coordinateHints` (reflected as the
|
|
42
|
+
`coordinate-hints` attribute) to reveal a leading row-number gutter
|
|
43
|
+
(1, 2, 3, and so on) and A / B / C column-letter header chips, so cell
|
|
44
|
+
references are discoverable.
|
|
45
|
+
- **Header column menu and per-column filter button.** A kebab (three-dot)
|
|
46
|
+
button opens a column menu; the built-in items are Sort Ascending / Descending
|
|
47
|
+
and Autosize Column, and a feature module can supply the menu through the new
|
|
48
|
+
`ColumnMenuProvider` seam (so `apex-grid-enterprise` fills it with pin / hide /
|
|
49
|
+
group / chart actions). The kebab shows on sortable or resizable columns, or
|
|
50
|
+
whenever a module provides a menu, and is always visible (not hover-only); set
|
|
51
|
+
the new `columnMenu` property to `false` to hide it. Filterable columns also
|
|
52
|
+
show a filter button that opens the filter panel.
|
|
53
|
+
- **Column separators.** A persistent vertical divider now shows on every
|
|
54
|
+
column header's trailing edge, not just the frozen-column pin edges. On
|
|
55
|
+
columns that opt into resizing the divider doubles as the resize handle (it
|
|
56
|
+
takes the `col-resize` cursor and can be dragged). On by default; set
|
|
57
|
+
`columnSeparator` to `false` (reflected as the `column-separator` attribute)
|
|
58
|
+
to hide them. The line's color and vertical inset are themeable via
|
|
59
|
+
`--ag-header-separator` / `--header-separator-color` and
|
|
60
|
+
`--apex-header-separator-inset`.
|
|
61
|
+
- **`allowFormula` column flag.** Inert in the community grid; the seam the
|
|
62
|
+
`apex-grid-enterprise` formula editor builds on.
|
|
63
|
+
|
|
64
|
+
### Changed
|
|
65
|
+
- **Numeric and currency columns left-align by default**, matching the common
|
|
66
|
+
data-grid default. Previously their values right-aligned; now the header label
|
|
67
|
+
and the column values both sit at the leading edge, like every other column.
|
|
68
|
+
Digits still use tabular figures so they stay vertically consistent.
|
|
69
|
+
- **Filtering opens in a floating panel** from the header filter button, instead
|
|
70
|
+
of an always-present inline filter row.
|
|
71
|
+
- Theming refinements: design-token tweaks and a crisp 1px frozen-column
|
|
72
|
+
pin-edge line.
|
|
73
|
+
|
|
74
|
+
### Fixed
|
|
75
|
+
- Range-selection drag now tracks through `pointermove`, so a drag that leaves
|
|
76
|
+
and re-enters the grid stays accurate.
|
|
77
|
+
|
|
78
|
+
### Internal
|
|
79
|
+
- Cell writes funnel through a single `applyCellEdit` choke point, so undo / redo,
|
|
80
|
+
validation, and (in enterprise) formula recalculation share one write path.
|
|
81
|
+
`apex-grid/internal` also gained the seams the enterprise coordinate, formula,
|
|
82
|
+
and column-menu (`ColumnMenuProvider`) features build on.
|
|
83
|
+
|
|
7
84
|
## [3.2.0] — 2026-06-23
|
|
8
85
|
|
|
9
86
|
Additive, backward-compatible release. The default look of `<apex-grid>` is
|
|
@@ -107,6 +184,7 @@ Documentation-only patch (no runtime or API changes).
|
|
|
107
184
|
- Repository converted to an npm-workspaces monorepo; this package publishes
|
|
108
185
|
from `packages/core`.
|
|
109
186
|
|
|
187
|
+
[3.3.0]: https://github.com/apexcharts/apex-grid/releases
|
|
110
188
|
[3.2.0]: https://github.com/apexcharts/apex-grid/releases
|
|
111
189
|
[3.1.0]: https://github.com/apexcharts/apex-grid/releases
|
|
112
190
|
[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
|
|
12
|
-
- **Sorting
|
|
13
|
-
- **Filtering
|
|
14
|
-
- **Pagination
|
|
15
|
-
- **Column pinning
|
|
16
|
-
- **Column reordering
|
|
17
|
-
- **Column resizing
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
20
|
-
- **
|
|
21
|
-
- **
|
|
22
|
-
- **
|
|
23
|
-
- **
|
|
24
|
-
- **
|
|
25
|
-
- **
|
|
26
|
-
- **
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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`)
|
|
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
|
|
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
|
|
162
|
-
| Only ~3 rows visible regardless of data size | Step 4
|
|
163
|
-
| `<apex-grid>` blank tag in DOM | Step 2
|
|
164
|
-
| Columns shown as literal `[object Object]` | `columns=` used as an attribute
|
|
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
|
|
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
|
|
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,33 @@ 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
|
+
### Cell validation
|
|
321
|
+
|
|
322
|
+
```ts
|
|
323
|
+
import { required, min, max, pattern, custom } from 'apex-grid';
|
|
324
|
+
|
|
325
|
+
const columns = [
|
|
326
|
+
{ key: 'name', editable: true, validators: [required('Name is required')] },
|
|
327
|
+
{ key: 'age', editable: true, type: 'number', validators: [min(18), max(99)] },
|
|
328
|
+
{ key: 'email', editable: true, validators: [pattern(/^[^@\s]+@[^@\s]+$/, 'Invalid email')] },
|
|
329
|
+
];
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
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.
|
|
333
|
+
|
|
334
|
+
### Undo / redo
|
|
335
|
+
|
|
336
|
+
```ts
|
|
337
|
+
grid.editing = { enabled: true, mode: 'cell', history: { enabled: true } };
|
|
338
|
+
|
|
339
|
+
grid.undo(); // or Ctrl/Cmd+Z
|
|
340
|
+
grid.redo(); // or Ctrl/Cmd+Shift+Z / Ctrl+Y
|
|
341
|
+
grid.clearHistory();
|
|
342
|
+
grid.canUndo; grid.canRedo;
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
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 }`.
|
|
346
|
+
|
|
282
347
|
### Row selection
|
|
283
348
|
|
|
284
349
|
```ts
|
|
@@ -294,6 +359,29 @@ grid.selectedRows = [data[2]]; // replace selection (goes through `rowSelec
|
|
|
294
359
|
|
|
295
360
|
Events: `rowSelecting` (cancellable), `rowSelected`.
|
|
296
361
|
|
|
362
|
+
### Row pinning (top / bottom)
|
|
363
|
+
|
|
364
|
+
```ts
|
|
365
|
+
grid.rowPinning = { enabled: true };
|
|
366
|
+
|
|
367
|
+
grid.pinRow(data[0], 'top');
|
|
368
|
+
grid.pinRow(data[5], 'bottom');
|
|
369
|
+
grid.unpinRow(data[0]);
|
|
370
|
+
grid.pinnedRows; // { top: T[], bottom: T[] }
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
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`.
|
|
374
|
+
|
|
375
|
+
### Row drag-reorder
|
|
376
|
+
|
|
377
|
+
```ts
|
|
378
|
+
grid.rowReordering = { enabled: true }; // add applyToData: true to splice grid.data in place
|
|
379
|
+
|
|
380
|
+
grid.moveRow(0, 4, 'after');
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
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 }`.
|
|
384
|
+
|
|
297
385
|
### Row expansion (master-detail)
|
|
298
386
|
|
|
299
387
|
```ts
|
|
@@ -314,7 +402,7 @@ Events: `rowExpanding` (cancellable), `rowExpanded`.
|
|
|
314
402
|
|
|
315
403
|
### Tree data (nested rows)
|
|
316
404
|
|
|
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
|
|
405
|
+
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
406
|
|
|
319
407
|
```ts
|
|
320
408
|
type Person = { id: number; name: string; title: string; path: string[] };
|
|
@@ -328,7 +416,7 @@ const data: Person[] = [
|
|
|
328
416
|
grid.tree = {
|
|
329
417
|
enabled: true,
|
|
330
418
|
getDataPath: (row) => row.path,
|
|
331
|
-
defaultExpanded: 1, // boolean | number
|
|
419
|
+
defaultExpanded: 1, // boolean | number, depth to expand
|
|
332
420
|
groupColumnKey: 'name', // which column shows the chevron + indent
|
|
333
421
|
childIndent: 20, // px per depth level
|
|
334
422
|
};
|
|
@@ -349,7 +437,7 @@ grid.exportToCSV({ filename: 'users', source: 'selected' });
|
|
|
349
437
|
const text = grid.exportToCSV({ filename: '' }); // no download, returns the string
|
|
350
438
|
```
|
|
351
439
|
|
|
352
|
-
`source` can be `'view'` (default
|
|
440
|
+
`source` can be `'view'` (default, post-filter/post-sort), `'page'`, `'selected'`, or `'all'`. Per-column opt-out: `{ key: 'secret', exportable: false }`.
|
|
353
441
|
|
|
354
442
|
> **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
443
|
|
|
@@ -380,7 +468,7 @@ Search input has a `debounce` attribute (default `200`ms).
|
|
|
380
468
|
|
|
381
469
|
### Theming
|
|
382
470
|
|
|
383
|
-
The grid styles itself through `--ag-*` CSS custom properties
|
|
471
|
+
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
472
|
|
|
385
473
|
Style with CSS parts on the grid, paginator, and toolbar:
|
|
386
474
|
|
|
@@ -389,6 +477,42 @@ apex-grid::part(paginator) { background: var(--surface-2); }
|
|
|
389
477
|
apex-grid-toolbar::part(search-input) { font-family: var(--font-mono); }
|
|
390
478
|
```
|
|
391
479
|
|
|
480
|
+
### Spreadsheet coordinates
|
|
481
|
+
|
|
482
|
+
```ts
|
|
483
|
+
grid.coordinateHints = true;
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
```html
|
|
487
|
+
<apex-grid coordinate-hints></apex-grid>
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
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`).
|
|
491
|
+
|
|
492
|
+
### State & persistence
|
|
493
|
+
|
|
494
|
+
`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).
|
|
495
|
+
|
|
496
|
+
```js
|
|
497
|
+
// Save and restore a view.
|
|
498
|
+
localStorage.setItem('view', JSON.stringify(grid.getState()));
|
|
499
|
+
grid.setState(JSON.parse(localStorage.getItem('view')));
|
|
500
|
+
|
|
501
|
+
// Persist automatically: stateChanged fires (debounced) after every settled
|
|
502
|
+
// change, and only while something is listening.
|
|
503
|
+
grid.addEventListener('stateChanged', (e) =>
|
|
504
|
+
localStorage.setItem('view', JSON.stringify(e.detail.state))
|
|
505
|
+
);
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
**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.
|
|
509
|
+
|
|
510
|
+
**`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.
|
|
511
|
+
|
|
512
|
+
**`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.
|
|
513
|
+
|
|
514
|
+
See [`demo/state-persistence.html`](../../demo/state-persistence.html) for a save / restore / live-snapshot example.
|
|
515
|
+
|
|
392
516
|
---
|
|
393
517
|
|
|
394
518
|
## API Reference
|
|
@@ -401,26 +525,34 @@ apex-grid-toolbar::part(search-input) { font-family: var(--font-mono); }
|
|
|
401
525
|
| `columns` | `ColumnConfiguration<T>[]` | `[]` | Column configuration (property only) |
|
|
402
526
|
| `autoGenerate` | `boolean` | `false` | Infer columns from `data[0]` keys. Attr `auto-generate` |
|
|
403
527
|
| `sortConfiguration` | `GridSortConfiguration` | `{ multiple, triState }` | |
|
|
404
|
-
| `dataPipelineConfiguration` | `DataPipelineConfiguration<T>` |
|
|
405
|
-
| `pagination` | `PaginationConfiguration` |
|
|
528
|
+
| `dataPipelineConfiguration` | `DataPipelineConfiguration<T>` | | Custom sort/filter/pagination hooks |
|
|
529
|
+
| `pagination` | `PaginationConfiguration` | | |
|
|
406
530
|
| `quickFilter` | `string` | `''` | Attr `quick-filter` |
|
|
407
531
|
| `showQuickFilter` | `boolean` | `false` | Attr `show-quick-filter` |
|
|
408
532
|
| `showExport` | `boolean` | `false` | Attr `show-export` |
|
|
409
533
|
| `columnReordering` | `boolean` | `false` | Attr `column-reordering` |
|
|
410
|
-
| `
|
|
411
|
-
| `
|
|
412
|
-
| `
|
|
413
|
-
| `
|
|
414
|
-
| `
|
|
415
|
-
| `
|
|
416
|
-
| `
|
|
417
|
-
| `
|
|
418
|
-
| `
|
|
419
|
-
| `
|
|
420
|
-
| `
|
|
421
|
-
| `
|
|
422
|
-
| `
|
|
423
|
-
| `
|
|
534
|
+
| `columnGroups` | `ColumnGroupConfiguration[]` | | Spanning header groups (`column.group` references an `id`) |
|
|
535
|
+
| `editing` | `GridEditingConfiguration` | | Includes `history` for undo/redo; per-column `validators` |
|
|
536
|
+
| `selection` | `GridSelectionConfiguration` | | |
|
|
537
|
+
| `expansion` | `GridExpansionConfiguration<T>` | | |
|
|
538
|
+
| `tree` | `GridTreeConfiguration<T>` | | |
|
|
539
|
+
| `rowPinning` | `GridRowPinningConfiguration` | | `{ enabled }` |
|
|
540
|
+
| `rowReordering` | `GridRowReorderingConfiguration` | | `{ enabled, applyToData?, handle? }` (`handle` default `true`: grip-only drag) |
|
|
541
|
+
| `coordinateHints` | `boolean` | `false` | Show a row-number gutter + A / B / C header chips (spreadsheet look). Attr `coordinate-hints` |
|
|
542
|
+
| `columnMenu` | `boolean` | `true` | Show the always-visible column-menu (kebab) button on headers; `false` hides it |
|
|
543
|
+
| `rowId` | `(row: T) => string \| number` | | Durable row identity for `getState` / `setState` |
|
|
544
|
+
| `localeText` | `GridLocaleText` | | Override map for built-in strings (e.g. `esLocale`) |
|
|
545
|
+
| `canUndo`, `canRedo` | `boolean` | | Get (history) |
|
|
546
|
+
| `sortExpressions` | `SortExpression<T>[]` | | Get/set |
|
|
547
|
+
| `filterExpressions` | `FilterExpression<T>[]` | | Get/set |
|
|
548
|
+
| `selectedRows` | `T[]` | | Get/set |
|
|
549
|
+
| `expandedRows` | `T[]` | | Get/set |
|
|
550
|
+
| `page`, `pageSize`, `pageCount`, `totalItems` | `number` | | |
|
|
551
|
+
| `pageItems` | `readonly T[]` | | Currently rendered slice |
|
|
552
|
+
| `dataView` | `readonly T[]` | | Post-filter, post-sort |
|
|
553
|
+
| `displayColumns` | `readonly ColumnConfiguration<T>[]` | | Render order (pinned start → unpinned → pinned end) |
|
|
554
|
+
| `editingCell` | `{ rowIndex, columnKey } \| null` | | |
|
|
555
|
+
| `editingRow` | `number \| null` | | Row-mode only |
|
|
424
556
|
|
|
425
557
|
### Methods
|
|
426
558
|
|
|
@@ -455,8 +587,19 @@ expandAllRows(); collapseAllRows(); isRowExpanded(row)
|
|
|
455
587
|
toggleTreeRow(row); expandTreeRow(row); collapseTreeRow(row)
|
|
456
588
|
expandAllTreeRows(); collapseAllTreeRows(); isTreeRowExpanded(row)
|
|
457
589
|
|
|
590
|
+
pinRow(row, 'top' | 'bottom'); unpinRow(row) // pinnedRows getter
|
|
591
|
+
moveRow(from, to, 'before' | 'after')
|
|
592
|
+
|
|
593
|
+
undo(); redo(); clearHistory() // canUndo / canRedo getters
|
|
594
|
+
|
|
595
|
+
localize(key, params?, fallback?): string // resolve a locale string
|
|
596
|
+
|
|
458
597
|
exportToCSV(options?): string
|
|
459
598
|
exportAs(formatId, options?): void // toolbar dispatch; 'csv' (community), 'xlsx' (enterprise)
|
|
599
|
+
|
|
600
|
+
getState(options?): GridState
|
|
601
|
+
setState(state, options?): SetStateResult // partial + defensive; never throws unless { strict: true }
|
|
602
|
+
getSchema(): GridSchema // machine-readable capability descriptor
|
|
460
603
|
```
|
|
461
604
|
|
|
462
605
|
### Events
|
|
@@ -472,16 +615,21 @@ All events bubble and are composed across shadow boundaries. Names ending in `-i
|
|
|
472
615
|
| `columnPinning` / `columnPinned` | yes / no | `{ key, previous, next }` / `{ key, pinned }` |
|
|
473
616
|
| `columnMoving` / `columnMoved` | yes / no | `{ key, fromIndex, toKey, position }` / `{ key, fromIndex, toIndex }` |
|
|
474
617
|
| `cellValueChanging` / `cellValueChanged` | yes / no | `{ row, column, value, newValue }` |
|
|
618
|
+
| `cellValidationFailed` | no | `{ key, rowIndex, data, value, errors }` |
|
|
475
619
|
| `rowEditStarted` / `rowEditEnded` | no / no | row context |
|
|
620
|
+
| `historyChanged` | no | `{ canUndo, canRedo }` |
|
|
476
621
|
| `rowSelecting` / `rowSelected` | yes / no | `{ added, removed }` |
|
|
622
|
+
| `rowPinning` / `rowPinned` | yes / no | `{ row, position }` |
|
|
623
|
+
| `rowMoving` / `rowMoved` | yes / no | `{ from, to, data }` |
|
|
477
624
|
| `rowExpanding` / `rowExpanded` | yes / no | row context |
|
|
478
625
|
| `treeRowExpanding` / `treeRowExpanded` | yes / no | row context |
|
|
626
|
+
| `stateChanged` | no | `{ state }` (debounced; only while listened) |
|
|
479
627
|
|
|
480
|
-
Programmatic `sort()` / `filter()` calls are silent
|
|
628
|
+
Programmatic `sort()` / `filter()` calls are silent; only UI-initiated changes emit `sorting` / `filtering`.
|
|
481
629
|
|
|
482
630
|
### Attributes
|
|
483
631
|
|
|
484
|
-
`auto-generate`, `quick-filter`, `show-quick-filter`, `show-export`, `column-reordering`.
|
|
632
|
+
`auto-generate`, `quick-filter`, `show-quick-filter`, `show-export`, `column-reordering`, `coordinate-hints`.
|
|
485
633
|
|
|
486
634
|
### CSS parts
|
|
487
635
|
|
|
@@ -523,11 +671,11 @@ npm run build # builds dist/ + custom-elements.json + typedoc
|
|
|
523
671
|
|
|
524
672
|
Releases are automated by [.github/workflows/publish.yml](.github/workflows/publish.yml):
|
|
525
673
|
|
|
526
|
-
1. Bump `"version"` in [package.json](package.json)
|
|
674
|
+
1. Bump `"version"` in [package.json](package.json), the single source of truth. The build injects it into `dist/package.json`.
|
|
527
675
|
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
676
|
3. Push to `main`.
|
|
529
677
|
|
|
530
|
-
The workflow then verifies the version triple-match, runs lint + tests + build, publishes `dist/` to npm with `--provenance` (OIDC trusted publishing
|
|
678
|
+
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
679
|
|
|
532
680
|
Any push whose head commit does not start with `release:` is a no-op for the workflow.
|
|
533
681
|
|
package/components/cell.d.ts
CHANGED
|
@@ -53,9 +53,22 @@ 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;
|
|
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;
|
|
59
72
|
protected updated(): void;
|
|
60
73
|
protected renderDefaultEditor(): import("lit-html").TemplateResult<1>;
|
|
61
74
|
protected renderEditor(): unknown;
|
|
@@ -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():
|
|
88
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
76
89
|
}
|
|
77
90
|
declare global {
|
|
78
91
|
interface HTMLElementTagNameMap {
|