apex-grid 4.0.0-beta.1 → 4.0.0-beta.2
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 +66 -0
- package/LICENSE.md +2 -1
- package/README.md +39 -6
- package/components/grid.d.ts +40 -15
- package/components/grid.js +18 -0
- package/components/grid.js.map +1 -1
- package/controllers/state.d.ts +0 -5
- package/controllers/state.js +0 -4
- package/controllers/state.js.map +1 -1
- package/custom-elements.json +248 -14
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/ApexGrid.html +53 -25
- package/docs/classes/ApexGridPaginator.html +1 -1
- package/docs/classes/ApexGridToolbar.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +39 -6
- package/docs/interfaces/BaseApexCellContext.html +1 -1
- package/docs/interfaces/BaseApexEditorContext.html +1 -1
- package/docs/interfaces/CSVExportOptions.html +1 -1
- package/docs/interfaces/ExportOptions.html +1 -1
- package/docs/interfaces/PaginationState.html +1 -1
- package/docs/media/_token-values.scss +42 -16
- package/docs/media/package.json +6 -1
- package/ignite-ui.d.ts +1 -0
- package/ignite-ui.js +4 -0
- package/ignite-ui.js.map +1 -0
- package/internal/design-system.d.ts +32 -0
- package/internal/design-system.js +66 -0
- package/internal/design-system.js.map +1 -0
- package/internal/icons.d.ts +2 -16
- package/internal/icons.js +0 -8
- package/internal/icons.js.map +1 -1
- package/internal/ignite-ui.d.ts +10 -0
- package/internal/ignite-ui.js +118 -0
- package/internal/ignite-ui.js.map +1 -0
- package/internal/index.d.ts +2 -0
- package/internal/index.js +1 -0
- package/internal/index.js.map +1 -1
- package/package.json +6 -1
- package/styles/_token-blocks.css.d.ts +1 -0
- package/styles/_token-blocks.css.js +3 -0
- package/styles/_token-blocks.css.js.map +1 -0
- package/styles/_tokens.css.js +1 -1
- package/styles/_tokens.css.js.map +1 -1
- package/styles/document-tokens.css.js +1 -1
- package/styles/document-tokens.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/ignite-ui/ignite-ui-dark.css.d.ts +1 -0
- package/styles/ignite-ui/ignite-ui-dark.css.js +3 -0
- package/styles/ignite-ui/ignite-ui-dark.css.js.map +1 -0
- package/styles/ignite-ui/ignite-ui-document.css.d.ts +1 -0
- package/styles/ignite-ui/ignite-ui-document.css.js +3 -0
- package/styles/ignite-ui/ignite-ui-document.css.js.map +1 -0
- package/styles/ignite-ui/ignite-ui.css.d.ts +1 -0
- package/styles/ignite-ui/ignite-ui.css.js +3 -0
- package/styles/ignite-ui/ignite-ui.css.js.map +1 -0
- package/tokens.css +14 -15
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,72 @@ and the format is based on [Keep a Changelog](https://keepachangelog.com/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [4.0.0-beta.2] - 2026-11-08
|
|
10
|
+
|
|
11
|
+
A second pre-release of 4.0.0, under the `next` npm tag. It adds opt-in
|
|
12
|
+
Ignite UI theming (`apex-grid/ignite-ui`) and the family `--apx-*` tokens.
|
|
13
|
+
Breaking against 4.0.0-beta.1 and 3.x: an Ignite UI stylesheet no longer
|
|
14
|
+
re-tints the brand or replaces the font until you import the add-on, and
|
|
15
|
+
`--ag-font` has no root default any more (see Changed and Fixed).
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- **`apex-grid/ignite-ui`, the Ignite UI add-on.** `import 'apex-grid/ignite-ui'`
|
|
19
|
+
once and every grid on the page follows the Ignite UI theme the page loads:
|
|
20
|
+
brand, text and muted text, gridlines and the pinned-column edge, the header
|
|
21
|
+
(`--ig-surface-raised`, Ignite UI 7.5 and later), state colours, font and the
|
|
22
|
+
enterprise popups (`--ig-surface-overlay` on 7.5 and later). A grid without
|
|
23
|
+
`theme="dark"` or `theme="light"` follows the Ignite UI variant, live, with
|
|
24
|
+
a JS fallback where the browser has no container style queries;
|
|
25
|
+
`theme="light"` keeps a grid light. Ranking: an `--ag-*` token you set, then
|
|
26
|
+
the family `--apx-*` tokens, then Ignite UI, then the built-in values. Per
|
|
27
|
+
grid, `design-system="off"` turns the Ignite UI colours and font off (the
|
|
28
|
+
variant still picks the mode) and `tokens="off"` turns off the family tokens
|
|
29
|
+
and Ignite UI, variant included (both also as the reflected `designSystem`
|
|
30
|
+
and `tokens` properties). It registers on a shared `globalThis` slot, so it
|
|
31
|
+
reaches the grids of a separately built bundle too. While the add-on is
|
|
32
|
+
loaded, the tokens that follow Ignite UI (text, lines, surfaces, header,
|
|
33
|
+
state colours, pinned edge) leave the root defaults, so page CSS that reads
|
|
34
|
+
one needs its own fallback. It adds about 2.5 KB gzip to an app, and only
|
|
35
|
+
where it is imported.
|
|
36
|
+
- **The family `--apx-*` tokens** shared by every Apex product: `--apx-accent`
|
|
37
|
+
(brand), `--apx-fore` (text), `--apx-grid` (gridlines, row borders, header
|
|
38
|
+
separator), `--apx-surface` (card and row background), `--apx-font-family`
|
|
39
|
+
and `--apx-radius-factor`, each ranked below the matching `--ag-*` token.
|
|
40
|
+
The text, line and surface root defaults are now written as their family
|
|
41
|
+
chain (`--ag-text: var(--apx-fore, #111827)` in `:where(:root)` and
|
|
42
|
+
`apex-grid/tokens.css`), so they follow a family token set on `:root`.
|
|
43
|
+
- `--apx-radius-factor` scales `--ag-radius`, `--ag-radius-sm` and
|
|
44
|
+
`--ag-radius-xs` while it is set. Unset or 1, every radius is unchanged
|
|
45
|
+
(a multi-value radius too, without a factor); the pill stays round.
|
|
46
|
+
- `tokens="off"` (or `grid.tokens = false`) keeps one grid, and the content it
|
|
47
|
+
renders, off the family tokens, with or without the add-on. Without the
|
|
48
|
+
add-on, an `--apx-fore`, `--apx-grid` or `--apx-surface` set on `:root` still
|
|
49
|
+
reaches that grid through the root defaults, which resolve there.
|
|
50
|
+
- `--ag-overlay` and `--ag-overlay-text` (dark grids: `--ag-dark-overlay`,
|
|
51
|
+
`--ag-dark-overlay-text`) colour the `apex-grid-enterprise` popups. They have
|
|
52
|
+
no default: unset, each popup keeps its built-in colours.
|
|
53
|
+
|
|
54
|
+
### Changed
|
|
55
|
+
- **Breaking: the grid no longer reads Ignite UI tokens by itself.** Before,
|
|
56
|
+
an Ignite UI theme on the page re-tinted the brand (`--ig-primary-500`,
|
|
57
|
+
`--ig-primary-700`) and replaced the font (`--ig-font-family`) with no
|
|
58
|
+
import. Now an Ignite UI stylesheet changes nothing until you import
|
|
59
|
+
`apex-grid/ignite-ui`, which brings the brand and font back along with the
|
|
60
|
+
rest of the theme.
|
|
61
|
+
- The grid now follows the family `--apx-*` tokens (above). A page that sets
|
|
62
|
+
them for its charts, on `:root` for example, sees the grid follow them too.
|
|
63
|
+
Set the matching `--ag-*` tokens to keep the grid as it was, or set the
|
|
64
|
+
family tokens on the elements they are meant for.
|
|
65
|
+
|
|
66
|
+
### Fixed
|
|
67
|
+
- An explicit `--ag-font` now wins over the family and Ignite UI fonts, the
|
|
68
|
+
same order the brand tokens use. Before, an Ignite UI theme on the page
|
|
69
|
+
replaced the grid font even when `--ag-font` was set on the grid itself. The
|
|
70
|
+
default Inter stack is unchanged. To keep the family and Ignite UI fonts
|
|
71
|
+
reachable, `--ag-font` no longer has a root default (it is gone from
|
|
72
|
+
`:where(:root)` and `apex-grid/tokens.css`), so page CSS that reads
|
|
73
|
+
`var(--ag-font)` needs its own fallback, as with `--ag-brand`.
|
|
74
|
+
|
|
9
75
|
## [4.0.0-beta.1] - 2026-10-29
|
|
10
76
|
|
|
11
77
|
A pre-release of 4.0.0, published under the `next` npm tag for trying out
|
package/LICENSE.md
CHANGED
|
@@ -85,10 +85,11 @@ Required if you are **embedding ApexGrid into a product or platform used by othe
|
|
|
85
85
|
✅ What's included:
|
|
86
86
|
|
|
87
87
|
- Redistribution rights for **one application or product**
|
|
88
|
-
- **Unlimited developer seats** on that application, with no separate per-developer license to buy
|
|
89
88
|
- **Every licensed feature**, at the highest tier
|
|
90
89
|
- 12-month subscription with updates & support
|
|
91
90
|
|
|
91
|
+
⚠️ **Developer licenses are purchased separately.** The OEM License grants redistribution rights and carries no developer seats. Each developer who works with ApexGrid in that application also needs a **Community + Commercial** license of their own. That is the tier whatever features your product uses, because the license key comes from the OEM License and already renders every licensed feature.
|
|
92
|
+
|
|
92
93
|
Your end users need no license of their own. A second application needs a second OEM license. White-label, resale, and affiliate arrangements are quoted separately.
|
|
93
94
|
|
|
94
95
|
✅ OEM **not required** if your app simply renders static grids and users **cannot** configure or interact with them.
|
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ A Lit-based, framework-agnostic web component data grid. Ships as a single custo
|
|
|
29
29
|
- **CSV export**: programmatic method plus an optional toolbar dropdown. (Excel/XLSX export is in `apex-grid-enterprise`.)
|
|
30
30
|
- **Toolbar**: opt-in `<apex-grid-toolbar>` with debounced quick filter and export menu.
|
|
31
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)
|
|
32
|
+
- **Theming**: styled out-of-the-box; fully customizable through `--ag-*` CSS custom properties (no theme import or build step), and follows the `--apx-*` tokens shared by every Apex product. One import (`apex-grid/ignite-ui`) makes it follow an Ignite UI theme, light or dark.
|
|
33
33
|
- **Accessibility**: WCAG 2.2 AA semantics (`role="grid"` / `role="treegrid"`, `aria-rowcount`, `aria-colcount`, focus + keyboard navigation).
|
|
34
34
|
- **Provenance-signed npm releases** with OIDC trusted publishing.
|
|
35
35
|
|
|
@@ -130,11 +130,15 @@ See [`src/styles/_token-values.scss`](src/styles/_token-values.scss) for the ful
|
|
|
130
130
|
import 'apex-grid/tokens.css';
|
|
131
131
|
```
|
|
132
132
|
|
|
133
|
-
The grid renders the same without the sheet; it carries the defaults as fallbacks.
|
|
133
|
+
The grid renders the same without the sheet; it carries the defaults as fallbacks. Four groups have no root default, so page CSS reading them needs its own fallback:
|
|
134
134
|
|
|
135
|
-
- `--ag-brand` and `--ag-brand-strong`, so an Ignite UI palette set on any ancestor
|
|
135
|
+
- `--ag-brand` and `--ag-brand-strong`, so a family `--apx-accent` (or, with the Ignite UI add-on, an Ignite UI palette) set on any ancestor still reaches the grid (see below).
|
|
136
|
+
- `--ag-font`, for the same reason (`--apx-font-family`, an Ignite UI font).
|
|
137
|
+
- `--ag-overlay` and `--ag-overlay-text` (and `--ag-dark-overlay`, `--ag-dark-overlay-text`): unset, the enterprise popups keep their own colours (see below).
|
|
136
138
|
- The derived washes `--ag-brand-soft`, `--ag-brand-softer`, `--ag-brand-line`, `--ag-row-hover` and `--ag-surface-alt`. The grid mixes them from the brand and surface in effect, so they follow a brand set on an ancestor. Set them only to override the mix.
|
|
137
139
|
|
|
140
|
+
The root defaults of the text, line and surface tokens are written as their family chain (`--ag-text: var(--apx-fore, #111827)`), so they follow a family token set on `:root` (see below).
|
|
141
|
+
|
|
138
142
|
**Dark mode.** `theme="dark"` reads its own colour inputs, `--ag-dark-*` (`--ag-dark-surface`, `--ag-dark-text`, `--ag-dark-hairline`, `--ag-dark-shadow-card`, and so on), so a light palette set on a shared ancestor never puts a white surface under the dark theme's light text. Sizing, typography, motion, the brand and the base state colours are shared by both modes. To theme both from one place, set both palettes:
|
|
139
143
|
|
|
140
144
|
```css
|
|
@@ -155,7 +159,34 @@ apex-grid[theme~='dark'] { --ag-grid-shadow: var(--ag-dark-shadow-card); } /* th
|
|
|
155
159
|
apex-grid { --ag-grid-shadow: none; } /* remove the edge entirely */
|
|
156
160
|
```
|
|
157
161
|
|
|
158
|
-
|
|
162
|
+
**Enterprise popups.** `--ag-overlay` and `--ag-overlay-text` colour the popups of `apex-grid-enterprise` (filter builder, set filter, AI panel, tool panel, status bar); dark grids read `--ag-dark-overlay` and `--ag-dark-overlay-text`. Set both: the popup lines, muted text and hover wash are mixed from the two. Unset, each popup keeps its built-in colours.
|
|
163
|
+
|
|
164
|
+
**Family tokens (`--apx-*`).** The grid also reads the tokens every Apex product shares, ranked below its own: `--apx-accent` (brand), `--apx-fore` (text), `--apx-grid` (gridlines, row borders, header separator), `--apx-surface` (card and row background), `--apx-font-family` and `--apx-radius-factor`. An `--ag-*` or `--ag-dark-*` token you set wins over them, and they apply to light and dark grids alike. The brand, font and radius factor reach the grid from any ancestor. Text, lines and surface have root defaults, which resolve on `:root`: they follow a family token set on `:root` (or, with the Ignite UI add-on, which lifts those defaults, on any ancestor). `--apx-radius-factor` scales `--ag-radius`, `--ag-radius-sm` and `--ag-radius-xs` while it is set; at 1 nothing changes, the pill shape stays round, and a multi-value radius (`--ag-radius: 12px 12px 0 0`) works only without a factor.
|
|
165
|
+
|
|
166
|
+
`tokens="off"` on a grid (or `grid.tokens = false`) keeps it off the family tokens and the content it renders too. One limit without the Ignite UI add-on: an `--apx-fore`, `--apx-grid` or `--apx-surface` set on `:root` has already resolved into the text, line and surface root defaults there, which every grid reads, so that grid still shows it; set the matching `--ag-*` tokens on it, or set the family tokens on the elements they are meant for.
|
|
167
|
+
|
|
168
|
+
```css
|
|
169
|
+
:root {
|
|
170
|
+
--apx-accent: #7c3aed;
|
|
171
|
+
--apx-font-family: 'Source Sans 3', sans-serif;
|
|
172
|
+
--apx-radius-factor: 0.5;
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**Ignite UI.** To follow an Ignite UI theme, import the add-on once:
|
|
177
|
+
|
|
178
|
+
```ts
|
|
179
|
+
import 'apex-grid/ignite-ui';
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Every grid on the page, in the document or in any shadow root, then follows the Ignite UI theme the page loads, including grids that connected before the import: the brand (`--ig-primary-*`), text and muted text, gridlines and the pinned-column edge (the gray ramp), the header (`--ig-surface-raised`, Ignite UI 7.5 and later), the state colours, the font, and the enterprise popups (`--ig-surface-overlay` on 7.5 and later, else the grid's own popup colours). The card and row surfaces keep the grid's own light or dark background. Without the add-on the grid reads no `--ig-*` token, and an Ignite UI stylesheet changes nothing.
|
|
183
|
+
|
|
184
|
+
- **Ranking:** an `--ag-*` token you set, then the family `--apx-*` tokens, then Ignite UI, then the built-in values.
|
|
185
|
+
- **Mode:** a grid without `theme="dark"` or `theme="light"` follows the Ignite UI variant (`--ig-theme-variant`) declared on `:root` or any ancestor (as Ignite UI themes do), and a theme swap live. `theme="light"` keeps a grid light (text and lines then keep the built-in values, since a dark theme's grays are light) and `theme="dark"` keeps it dark. Where the browser has no container style queries, grids follow the document's variant.
|
|
186
|
+
- **Per grid:** `design-system="off"` (the `designSystem` property set to `false`) turns the Ignite UI colours and font off (the variant still picks the mode); `tokens="off"` (`tokens = false`) turns off the family tokens and Ignite UI, the variant included, for the grid and the content it renders.
|
|
187
|
+
- **Root defaults:** while the add-on is loaded, the tokens that follow Ignite UI (text, lines, surfaces, header, state colours, pinned edge) leave the root defaults, as `--ag-brand` and `--ag-font` always have, so page CSS that reads one gives its own fallback: `var(--ag-text, #111827)`.
|
|
188
|
+
- **Other products:** each takes its own add-on. For the `apex-grid-enterprise` chart panel to read the theme itself, also import `apexcharts/features/ignite-ui` (ApexCharts releases that ship it); the grid never loads it, since it themes every chart on the page. Without it the panel chart takes the grid's colours, which follow the theme.
|
|
189
|
+
- **Bundles:** the add-on registers on a shared `globalThis` slot, so it reaches every grid even when the grid and the add-on come from separately built bundles.
|
|
159
190
|
|
|
160
191
|
### 4. Size the host
|
|
161
192
|
|
|
@@ -589,7 +620,7 @@ Search input has a `debounce` attribute (default `200`ms).
|
|
|
589
620
|
|
|
590
621
|
### Theming
|
|
591
622
|
|
|
592
|
-
The grid styles itself through `--ag-*` CSS custom properties; override them on `apex-grid` or any ancestor (shadow hosts included) to rebrand, and use `--ag-dark-*` for dark grids. See [Customize the look](#3-optional-customize-the-look) and [`src/styles/_token-values.scss`](src/styles/_token-values.scss) for the full list.
|
|
623
|
+
The grid styles itself through `--ag-*` CSS custom properties; override them on `apex-grid` or any ancestor (shadow hosts included) to rebrand, and use `--ag-dark-*` for dark grids. See [Customize the look](#3-optional-customize-the-look) and [`src/styles/_token-values.scss`](src/styles/_token-values.scss) for the full list. The grid also follows the family `--apx-*` tokens, and an Ignite UI theme with the opt-in `apex-grid/ignite-ui` add-on (both under Customize the look).
|
|
593
624
|
|
|
594
625
|
Style with CSS parts on the grid, paginator, and toolbar:
|
|
595
626
|
|
|
@@ -727,6 +758,8 @@ See [`demo/state-persistence.html`](../../demo/state-persistence.html) for a sav
|
|
|
727
758
|
| `coordinateHints` | `boolean` | `false` | Show a row-number gutter + A / B / C header chips (spreadsheet look). Attr `coordinate-hints` |
|
|
728
759
|
| `columnMenu` | `boolean` | `true` | Show the always-visible column-menu (kebab) button on headers; `false` hides it |
|
|
729
760
|
| `showHeader` | `boolean` | `true` | `false` hides the header rows (kept for screen readers). Attr `show-header="false"` |
|
|
761
|
+
| `designSystem` | `boolean` | `true` | With the `apex-grid/ignite-ui` add-on, `false` turns the Ignite UI colours and font off for this grid (the variant still picks the mode). Reflected as `design-system="off"` |
|
|
762
|
+
| `tokens` | `boolean` | `true` | `false` turns the family `--apx-*` tokens (and, with the add-on, Ignite UI) off for this grid and its content. Reflected as `tokens="off"` |
|
|
730
763
|
| `rowRecycling` | `boolean` | `true` | Re-binds body row elements across records on scroll, sort and filter; `false` restores record-keyed rows. See [Row recycling](#row-recycling). Attr `row-recycling="false"` |
|
|
731
764
|
| `rowId` | `(row: T) => string \| number` | | Durable row identity for `getState` / `setState` |
|
|
732
765
|
| `localeText` | `GridLocaleText` | | Override map for built-in strings (e.g. `esLocale`) |
|
|
@@ -817,7 +850,7 @@ Programmatic `sort()` / `filter()` calls are silent; only UI-initiated changes e
|
|
|
817
850
|
|
|
818
851
|
### Attributes
|
|
819
852
|
|
|
820
|
-
`auto-generate`, `quick-filter`, `show-quick-filter`, `show-export`, `column-reordering`, `coordinate-hints`, `show-header`, `row-recycling`.
|
|
853
|
+
`auto-generate`, `quick-filter`, `show-quick-filter`, `show-export`, `column-reordering`, `coordinate-hints`, `show-header`, `row-recycling`. Theming: `theme` (`dark`, `light`, `tinted`), `tokens="off"` and, with the `apex-grid/ignite-ui` add-on, `design-system="off"` (see [Customize the look](#3-optional-customize-the-look)).
|
|
821
854
|
|
|
822
855
|
### CSS parts
|
|
823
856
|
|
package/components/grid.d.ts
CHANGED
|
@@ -692,17 +692,19 @@ export interface ApexGridEventMap<T extends object> {
|
|
|
692
692
|
*
|
|
693
693
|
* The grid is styled out of the box through `--ag-*` CSS custom properties —
|
|
694
694
|
* there is no theme to import and no `configureTheme()` call. Override `--ag-*`
|
|
695
|
-
* tokens on the host (or any ancestor) to rebrand;
|
|
696
|
-
*
|
|
697
|
-
*
|
|
698
|
-
*
|
|
699
|
-
*
|
|
700
|
-
*
|
|
701
|
-
*
|
|
695
|
+
* tokens on the host (or any ancestor) to rebrand; the family `--apx-*` tokens
|
|
696
|
+
* (`--apx-accent`, `--apx-fore`, `--apx-grid`, `--apx-surface`,
|
|
697
|
+
* `--apx-font-family`, `--apx-radius-factor`) apply where no `--ag-*` token is
|
|
698
|
+
* set. To follow an Ignite UI theme, import the `apex-grid/ignite-ui` add-on.
|
|
699
|
+
* For dark mode, set the `theme="dark"` attribute on the host for the built-in
|
|
700
|
+
* slate dark palette (further `--ag-*` overrides still compose on top). Add
|
|
701
|
+
* `tinted` (e.g. `theme="tinted"` or `theme="dark tinted"`) to mix the brand
|
|
702
|
+
* into the chrome so the grid wears its brand even at rest. See the README
|
|
703
|
+
* "Getting Started" and "Theming" sections for the full example and token list.
|
|
702
704
|
*
|
|
703
705
|
* @element apex-grid
|
|
704
706
|
*
|
|
705
|
-
* @attr {string} theme - Space-separated theme flags. `dark` opts into the built-in dark palette; `tinted` mixes `--ag-brand` into the chrome surfaces. Combine as `theme="dark tinted"`.
|
|
707
|
+
* @attr {string} theme - Space-separated theme flags. `dark` opts into the built-in dark palette; `tinted` mixes `--ag-brand` into the chrome surfaces. Combine as `theme="dark tinted"`. With the `apex-grid/ignite-ui` add-on a grid without `dark` or `light` follows the Ignite UI variant, and `light` keeps it light.
|
|
706
708
|
*
|
|
707
709
|
* @fires sorting - Emitted when sorting is initiated through the UI.
|
|
708
710
|
* @fires sorted - Emitted when a sort operation initiated through the UI has completed.
|
|
@@ -755,7 +757,7 @@ export interface ApexGridEventMap<T extends object> {
|
|
|
755
757
|
* @csspart export-menu - The export dropdown menu.
|
|
756
758
|
* @csspart export-menu-item - An item in the export menu.
|
|
757
759
|
*
|
|
758
|
-
* @cssprop [--ag-brand] - Brand color for selection, focus rings, and accents.
|
|
760
|
+
* @cssprop [--ag-brand] - Brand color for selection, focus rings, and accents. Falls back to `--apx-accent`, then (with the `apex-grid/ignite-ui` add-on) the Ignite UI primary.
|
|
759
761
|
* @cssprop [--ag-brand-strong] - Brand color for hover / pressed states.
|
|
760
762
|
* @cssprop [--ag-grid-shadow] - Grid edge/shadow override. Default is a flat 1px hairline edge; set to `var(--ag-shadow-card)` (`var(--ag-dark-shadow-card)` on a dark grid) for the elevated card look, or `none` to remove it.
|
|
761
763
|
* @cssprop [--ag-grid-bg] - Host card background. Defaults to a subtle light gradient; override with a flat color (or use `theme="dark"`) for dark themes.
|
|
@@ -781,8 +783,12 @@ export interface ApexGridEventMap<T extends object> {
|
|
|
781
783
|
* @cssprop [--ag-dark-shadow-card] - Elevated card shadow for dark grids (see `--ag-grid-shadow`).
|
|
782
784
|
* @cssprop [--ag-row-h] - Row height.
|
|
783
785
|
* @cssprop [--ag-header-h] - Header height.
|
|
784
|
-
* @cssprop [--ag-radius] - Outer card corner radius.
|
|
785
|
-
* @cssprop [--ag-font] - Grid font family.
|
|
786
|
+
* @cssprop [--ag-radius] - Outer card corner radius. The radii (`--ag-radius`, `-sm`, `-xs`, not the pill) scale with `--apx-radius-factor` while it is set (single lengths only).
|
|
787
|
+
* @cssprop [--ag-font] - Grid font family. Falls back to `--apx-font-family`, then (with the `apex-grid/ignite-ui` add-on) the Ignite UI `--ig-font-family`.
|
|
788
|
+
* @cssprop [--ag-overlay] - Background of the enterprise popups (filter builder, set filter, AI panel, tool panel, status bar). Unset, each keeps its built-in colour; set it with `--ag-overlay-text`.
|
|
789
|
+
* @cssprop [--ag-overlay-text] - Text color of the enterprise popups; their lines, muted text and hover wash are mixed from the two.
|
|
790
|
+
* @cssprop [--ag-dark-overlay] - Popup background on dark grids.
|
|
791
|
+
* @cssprop [--ag-dark-overlay-text] - Popup text color on dark grids.
|
|
786
792
|
* @cssprop [--ag-fs-cell] - Cell font size.
|
|
787
793
|
*
|
|
788
794
|
* @see {@link https://github.com/apexcharts/apex-grid/blob/main/packages/core/src/styles/_tokens.scss | _tokens.scss} for the complete `--ag-*` token list.
|
|
@@ -812,10 +818,10 @@ export declare class ApexGrid<T extends object> extends EventEmitterBase<ApexGri
|
|
|
812
818
|
* registry. Idempotent — safe to call more than once.
|
|
813
819
|
*
|
|
814
820
|
* @remarks
|
|
815
|
-
* Registering the element is only step one of
|
|
816
|
-
* grid. You must also
|
|
817
|
-
*
|
|
818
|
-
*
|
|
821
|
+
* Registering the element is only step one of three required for a visible, styled
|
|
822
|
+
* grid. You must also give the host a bounded height and avoid overriding
|
|
823
|
+
* `display` on the host. See the README "Getting Started" section for the
|
|
824
|
+
* full setup.
|
|
819
825
|
*/
|
|
820
826
|
static register(): void;
|
|
821
827
|
protected stateController: StateController<T>;
|
|
@@ -1189,6 +1195,24 @@ export declare class ApexGrid<T extends object> extends EventEmitterBase<ApexGri
|
|
|
1189
1195
|
* @attr show-header
|
|
1190
1196
|
*/
|
|
1191
1197
|
showHeader: boolean;
|
|
1198
|
+
/**
|
|
1199
|
+
* Whether this grid follows the design-system add-on (`apex-grid/ignite-ui`).
|
|
1200
|
+
* `false`, reflected as `design-system="off"`, turns the Ignite UI colours
|
|
1201
|
+
* and font off for this grid; the Ignite UI variant still picks its mode.
|
|
1202
|
+
* Without the add-on it changes nothing.
|
|
1203
|
+
*
|
|
1204
|
+
* @attr design-system
|
|
1205
|
+
*/
|
|
1206
|
+
designSystem: boolean;
|
|
1207
|
+
/**
|
|
1208
|
+
* Whether this grid reads the family `--apx-*` tokens and, with the
|
|
1209
|
+
* `apex-grid/ignite-ui` add-on, Ignite UI (the variant included). `false`,
|
|
1210
|
+
* reflected as `tokens="off"`, turns them off for the grid and the content
|
|
1211
|
+
* it renders, so it keeps the built-in look and the `--ag-*` tokens you set.
|
|
1212
|
+
*
|
|
1213
|
+
* @attr tokens
|
|
1214
|
+
*/
|
|
1215
|
+
tokens: boolean;
|
|
1192
1216
|
/**
|
|
1193
1217
|
* Column groups rendered as spanning headers above the column header row.
|
|
1194
1218
|
*
|
|
@@ -1419,6 +1443,7 @@ export declare class ApexGrid<T extends object> extends EventEmitterBase<ApexGri
|
|
|
1419
1443
|
addEventListener<K extends keyof M, M extends ApexGridEventMap<T> & HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: M[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
1420
1444
|
removeEventListener<K extends keyof M, M extends ApexGridEventMap<T> & HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: M[K]) => unknown, options?: boolean | EventListenerOptions): void;
|
|
1421
1445
|
connectedCallback(): void;
|
|
1446
|
+
disconnectedCallback(): void;
|
|
1422
1447
|
protected firstUpdated(): void;
|
|
1423
1448
|
/**
|
|
1424
1449
|
* Performs a filter operation in the grid based on the passed expression(s).
|
package/components/grid.js
CHANGED
|
@@ -16,6 +16,7 @@ import { DEFAULT_PAGINATION } from '../controllers/pagination.js';
|
|
|
16
16
|
import { gridStateContext, StateController } from '../controllers/state.js';
|
|
17
17
|
import { localize as resolveLocaleText, } from '../i18n/index.js';
|
|
18
18
|
import { DEFAULT_COLUMN_CONFIG, PIPELINE, SENTINEL_NODE } from '../internal/constants.js';
|
|
19
|
+
import { connectDesignSystem, disconnectDesignSystem } from '../internal/design-system.js';
|
|
19
20
|
import { adoptGridDocumentStyles } from '../internal/document-styles.js';
|
|
20
21
|
import { buildCSV, downloadBlob, } from '../internal/export.js';
|
|
21
22
|
import { EventEmitterBase } from '../internal/mixins/event-emitter.js';
|
|
@@ -61,6 +62,10 @@ function viewShapeChanged(fields, before, after) {
|
|
|
61
62
|
function keyChanged(key, previous) {
|
|
62
63
|
return key.some((value, i) => value !== previous[i]);
|
|
63
64
|
}
|
|
65
|
+
const OFF_SWITCH = {
|
|
66
|
+
fromAttribute: (value) => value !== 'off',
|
|
67
|
+
toAttribute: (value) => (value ? null : 'off'),
|
|
68
|
+
};
|
|
64
69
|
function warnDropped(message) {
|
|
65
70
|
console.warn(`[apex-grid] ${message}`);
|
|
66
71
|
}
|
|
@@ -92,6 +97,8 @@ export class ApexGrid extends EventEmitterBase {
|
|
|
92
97
|
this.coordinateHints = false;
|
|
93
98
|
this.columnMenu = true;
|
|
94
99
|
this.showHeader = true;
|
|
100
|
+
this.designSystem = true;
|
|
101
|
+
this.tokens = true;
|
|
95
102
|
this.#bodyKey = [];
|
|
96
103
|
this.#bodyRows = [];
|
|
97
104
|
this.#pageKey = [];
|
|
@@ -571,11 +578,16 @@ export class ApexGrid extends EventEmitterBase {
|
|
|
571
578
|
connectedCallback() {
|
|
572
579
|
super.connectedCallback();
|
|
573
580
|
adoptGridDocumentStyles(this);
|
|
581
|
+
connectDesignSystem(this);
|
|
574
582
|
quietResizeObserverLoopNotice();
|
|
575
583
|
this.#labelObserver.observe(this, {
|
|
576
584
|
attributeFilter: ['aria-label', 'aria-labelledby', 'aria-describedby'],
|
|
577
585
|
});
|
|
578
586
|
}
|
|
587
|
+
disconnectedCallback() {
|
|
588
|
+
super.disconnectedCallback();
|
|
589
|
+
disconnectDesignSystem(this);
|
|
590
|
+
}
|
|
579
591
|
#labelObserver;
|
|
580
592
|
firstUpdated() {
|
|
581
593
|
if (typeof getComputedStyle === 'function' && getComputedStyle(this).display !== 'grid') {
|
|
@@ -1463,6 +1475,12 @@ __decorate([
|
|
|
1463
1475
|
__decorate([
|
|
1464
1476
|
property({ attribute: 'show-header', converter: (value) => value !== 'false' })
|
|
1465
1477
|
], ApexGrid.prototype, "showHeader", void 0);
|
|
1478
|
+
__decorate([
|
|
1479
|
+
property({ attribute: 'design-system', reflect: true, converter: OFF_SWITCH })
|
|
1480
|
+
], ApexGrid.prototype, "designSystem", void 0);
|
|
1481
|
+
__decorate([
|
|
1482
|
+
property({ attribute: 'tokens', reflect: true, converter: OFF_SWITCH })
|
|
1483
|
+
], ApexGrid.prototype, "tokens", void 0);
|
|
1466
1484
|
__decorate([
|
|
1467
1485
|
property({ attribute: false })
|
|
1468
1486
|
], ApexGrid.prototype, "columnGroups", void 0);
|