apex-grid 3.4.0 → 3.5.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 +101 -0
- package/README.md +45 -6
- package/components/grid.d.ts +127 -0
- package/components/grid.js +25 -0
- package/components/grid.js.map +1 -1
- package/components/header-row.js +8 -0
- package/components/header-row.js.map +1 -1
- package/components/header.js +5 -3
- package/components/header.js.map +1 -1
- package/components/row.js +32 -4
- package/components/row.js.map +1 -1
- package/components/virtualizer.d.ts +5 -1
- package/components/virtualizer.js +72 -2
- package/components/virtualizer.js.map +1 -1
- package/controllers/navigation.d.ts +1 -0
- package/controllers/navigation.js +10 -5
- package/controllers/navigation.js.map +1 -1
- package/controllers/reorder.js +4 -2
- package/controllers/reorder.js.map +1 -1
- package/controllers/state.d.ts +9 -3
- package/controllers/state.js +11 -1
- package/controllers/state.js.map +1 -1
- package/custom-elements.json +439 -181
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/ApexGrid.html +586 -0
- package/docs/classes/ApexGridPaginator.html +36 -0
- package/docs/classes/ApexGridToolbar.html +67 -0
- package/docs/functions/localize.html +2 -2
- package/docs/functions/setup.html +1 -2
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +33 -6
- package/docs/interfaces/ApexCellValidationFailedEvent.html +1 -1
- package/docs/interfaces/ApexCellValueChangedEvent.html +1 -1
- package/docs/interfaces/ApexCellValueChangingEvent.html +2 -2
- 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 +5 -5
- package/docs/interfaces/ApexRowMovingEvent.html +1 -1
- package/docs/interfaces/ApexRowPinningEvent.html +1 -1
- package/docs/interfaces/BaseApexCellContext.html +1 -1
- package/docs/interfaces/BaseApexEditorContext.html +1 -1
- package/docs/interfaces/BaseColumnConfiguration.html +3 -3
- package/docs/interfaces/CSVExportOptions.html +2 -2
- package/docs/interfaces/DataPipelineConfiguration.html +2 -2
- package/docs/interfaces/EditingHistoryConfiguration.html +1 -1
- package/docs/interfaces/ExportFormat.html +2 -2
- package/docs/interfaces/ExportOptions.html +1 -1
- package/docs/interfaces/GridRowPinningConfiguration.html +1 -1
- package/docs/interfaces/GridRowReorderingConfiguration.html +2 -2
- package/docs/interfaces/PaginationConfiguration.html +1 -1
- package/docs/interfaces/PaginationState.html +1 -1
- package/docs/media/_tokens.scss +29 -8
- package/docs/media/package.json +3 -4
- package/docs/media/state-persistence.html +0 -10
- package/docs/modules.html +1 -1
- package/docs/types/DataPipelineParams.html +2 -2
- package/docs/types/EditMode.html +2 -2
- package/docs/types/GridLocaleText.html +1 -1
- package/docs/types/PaginationMode.html +1 -1
- package/docs/variables/EN_LOCALE.html +3 -3
- package/docs/variables/esLocale.html +1 -1
- package/i18n/en.d.ts +14 -0
- package/i18n/en.js +14 -0
- package/i18n/en.js.map +1 -1
- package/i18n/es.js +14 -0
- package/i18n/es.js.map +1 -1
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/index.js.map +1 -1
- package/internal/feature-module.d.ts +22 -0
- package/internal/feature-module.js +5 -0
- package/internal/feature-module.js.map +1 -1
- package/internal/index.d.ts +2 -2
- package/internal/index.js +1 -1
- package/internal/index.js.map +1 -1
- package/internal/utils.d.ts +14 -0
- package/internal/utils.js +5 -0
- package/internal/utils.js.map +1 -1
- package/package.json +1 -2
- package/setup.d.ts +12 -11
- package/setup.js +12 -4
- package/setup.js.map +1 -1
- package/styles/_common.css.js +1 -1
- package/styles/_common.css.js.map +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.js +1 -1
- package/styles/group-header-row/group-header-row.css.js.map +1 -1
- 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/paginator/paginator.css.js +1 -1
- package/styles/paginator/paginator.css.js.map +1 -1
- package/styles/toolbar/toolbar.css.js +1 -1
- package/styles/toolbar/toolbar.css.js.map +1 -1
package/docs/media/_tokens.scss
CHANGED
|
@@ -7,16 +7,18 @@
|
|
|
7
7
|
// This is the single rebrand surface: override ~12 values on `apex-grid` and
|
|
8
8
|
// the whole grid re-skins. Values fall back to self-contained literals, so a
|
|
9
9
|
// grid mounted with zero consumer CSS already looks premium; the brand tokens
|
|
10
|
-
// additionally re-tint from
|
|
10
|
+
// additionally re-tint from an Ignite UI palette when one is present.
|
|
11
11
|
// No `!important`, no downstream hardcoded numerics — every rule resolves here.
|
|
12
12
|
// ─────────────────────────────────────────────────────────────────────────
|
|
13
13
|
|
|
14
14
|
:host {
|
|
15
15
|
// ── Brand ────────────────────────────────────────────────────────────
|
|
16
|
-
// Re-tints from
|
|
17
|
-
// auto-matches
|
|
18
|
-
// premium blue otherwise.
|
|
19
|
-
//
|
|
16
|
+
// Re-tints from an Ignite UI palette when its CSS is loaded (so the grid
|
|
17
|
+
// auto-matches such a host app), and falls back to the self-contained
|
|
18
|
+
// premium blue otherwise. `--ig-primary-*` is the whole integration: it is
|
|
19
|
+
// what an Ignite UI theme actually defines, and reading it costs nothing
|
|
20
|
+
// when absent. This hook used to live in the per-theme files; folding it
|
|
21
|
+
// here keeps the integration without named themes.
|
|
20
22
|
--ag-brand: var(--ig-primary-500, #0d6fd3); /* primary blue */
|
|
21
23
|
--ag-brand-strong: var(--ig-primary-700, #0a56b8); /* hover / pressed */
|
|
22
24
|
|
|
@@ -111,14 +113,14 @@
|
|
|
111
113
|
// Built-in dark theme. Opt in with `<apex-grid theme="dark">`.
|
|
112
114
|
// Only color/surface tokens are flipped to a neutral slate palette; geometry,
|
|
113
115
|
// typography, motion, and the brand hue (which still auto-tints from the
|
|
114
|
-
//
|
|
116
|
+
// Ignite UI palette when present) are inherited from the light block above.
|
|
115
117
|
// `theme~='dark'` matches a space-separated word so `theme="dark compact"`
|
|
116
118
|
// style stacking keeps working. These tokens inherit across the shadow
|
|
117
119
|
// boundary to every child component, so the whole grid re-skins from here.
|
|
118
120
|
// ─────────────────────────────────────────────────────────────────────────
|
|
119
121
|
:host([theme~='dark']) {
|
|
120
122
|
// ── Brand ── brighter fallbacks so the accent reads on a dark surface;
|
|
121
|
-
// still re-tints from
|
|
123
|
+
// still re-tints from an Ignite UI palette first when it is present.
|
|
122
124
|
--ag-brand: var(--ig-primary-500, #3b82f6);
|
|
123
125
|
--ag-brand-strong: var(--ig-primary-400, #60a5fa);
|
|
124
126
|
|
|
@@ -169,7 +171,7 @@
|
|
|
169
171
|
// little brand into the surfaces/gridlines so the grid wears its brand even
|
|
170
172
|
// at rest, a brand-tinted variant. Because every value is `color-mix(... var
|
|
171
173
|
// (--ag-brand) ...)`, it follows whatever brand is in effect (including the
|
|
172
|
-
//
|
|
174
|
+
// Ignite UI auto-tint) with no per-brand CSS.
|
|
173
175
|
// The light variant mixes into the white neutrals; the dark variant (higher
|
|
174
176
|
// specificity, so it wins under `theme="dark tinted"`) mixes the SAME token
|
|
175
177
|
// set into the slate neutrals. Body row surface stays untinted for legibility.
|
|
@@ -191,3 +193,22 @@
|
|
|
191
193
|
--ag-row-hover: color-mix(in srgb, var(--ag-brand) 12%, var(--ag-surface));
|
|
192
194
|
--ag-text-muted: color-mix(in srgb, var(--ag-brand) 28%, #94a3b8);
|
|
193
195
|
}
|
|
196
|
+
|
|
197
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
198
|
+
// Reduced motion. Every transition in the grid is declared with one of the
|
|
199
|
+
// three `--ag-dur-*` tokens (nothing hardcodes a duration, and there are no
|
|
200
|
+
// keyframe animations), so zeroing them here is the whole opt-out: hover
|
|
201
|
+
// washes, focus rings, chevron rotation and bar fills all become instant while
|
|
202
|
+
// the end states stay identical. `prefers-reduced-motion` is a user request,
|
|
203
|
+
// not a preference we can override, hence no `--ag-*` escape hatch.
|
|
204
|
+
// A consumer that adds its own transitions inside the grid should either use
|
|
205
|
+
// these tokens or guard them the same way. Row reorder / expansion animations
|
|
206
|
+
// live in JS and already bail out (`internal/flip.ts`).
|
|
207
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
208
|
+
@media (prefers-reduced-motion: reduce) {
|
|
209
|
+
:host {
|
|
210
|
+
--ag-dur-fast: 0ms;
|
|
211
|
+
--ag-dur-med: 0ms;
|
|
212
|
+
--ag-dur-slow: 0ms;
|
|
213
|
+
}
|
|
214
|
+
}
|
package/docs/media/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apex-grid",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "Web component data grid following open-wc recommendations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lit",
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"analyze": "cem analyze --litelement --globs \"src/**/*.{js,ts}\" --exclude \"src/styles/**/*\"",
|
|
33
|
-
"
|
|
33
|
+
"cem:check": "node scripts/check-cem-drift.js",
|
|
34
|
+
"build": "npm run analyze && npm run cem:check && node scripts/build.js && npm run typedoc",
|
|
34
35
|
"build:tsc": "tsc",
|
|
35
36
|
"dev:vite": "vite build",
|
|
36
37
|
"format": "biome check --fix && npm run format:stylelint",
|
|
@@ -52,8 +53,6 @@
|
|
|
52
53
|
"dependencies": {
|
|
53
54
|
"@lit-labs/virtualizer": "^2.1.0",
|
|
54
55
|
"@lit/context": "^1.1.5",
|
|
55
|
-
"igniteui-theming": "~19.1.0",
|
|
56
|
-
"igniteui-webcomponents": "~6.1.0",
|
|
57
56
|
"lit": "^3.3.0"
|
|
58
57
|
},
|
|
59
58
|
"devDependencies": {
|
|
@@ -54,7 +54,6 @@
|
|
|
54
54
|
}
|
|
55
55
|
apex-grid {
|
|
56
56
|
min-height: 420px;
|
|
57
|
-
--ig-size: 2;
|
|
58
57
|
}
|
|
59
58
|
.snapshot {
|
|
60
59
|
margin: 0;
|
|
@@ -79,15 +78,6 @@
|
|
|
79
78
|
letter-spacing: 0.04em;
|
|
80
79
|
}
|
|
81
80
|
</style>
|
|
82
|
-
<script type="module">
|
|
83
|
-
try {
|
|
84
|
-
const resp = await fetch('https://cdn.jsdelivr.net/npm/igniteui-webcomponents@5/themes/light/bootstrap.css');
|
|
85
|
-
const css = await resp.text();
|
|
86
|
-
const style = document.createElement('style');
|
|
87
|
-
style.textContent = css.replaceAll(':root', 'apex-grid');
|
|
88
|
-
document.head.appendChild(style);
|
|
89
|
-
} catch (e) { /* theme is cosmetic */ }
|
|
90
|
-
</script>
|
|
91
81
|
</head>
|
|
92
82
|
<body>
|
|
93
83
|
<h2>State Persistence — getState / setState</h2>
|