@toclocoinc/lattice-grid 1.68.0 → 1.68.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/README.md +26 -1
- package/angular/fesm2022/toclocoinc-lattice-grid-angular.mjs +1 -0
- package/angular/package.json +1 -1
- package/docs/API.html +8058 -3962
- package/docs/api-detail.html +101 -4
- package/lattice-grid.d.ts +5917 -78
- package/lattice-grid.esm.min.js +197 -39
- package/lattice-grid.min.cjs +197 -39
- package/lattice-grid.min.js +197 -39
- package/modules/ai.d.ts +172 -11
- package/modules/ai.esm.min.js +3 -3
- package/modules/ai.min.cjs +3 -3
- package/modules/ai.min.js +3 -3
- package/modules/angular.d.ts +1 -1
- package/modules/angular.esm.min.js +3 -3
- package/modules/angular.min.cjs +3 -3
- package/modules/angular.min.js +3 -3
- package/modules/chart-alluvial.d.ts +1 -1
- package/modules/chart-alluvial.esm.min.js +1 -1
- package/modules/chart-alluvial.min.cjs +1 -1
- package/modules/chart-alluvial.min.js +1 -1
- package/modules/chart-arc.d.ts +1 -1
- package/modules/chart-arc.esm.min.js +1 -1
- package/modules/chart-arc.min.cjs +1 -1
- package/modules/chart-arc.min.js +1 -1
- package/modules/chart-bubblemap.d.ts +1 -1
- package/modules/chart-bubblemap.esm.min.js +1 -1
- package/modules/chart-bubblemap.min.cjs +1 -1
- package/modules/chart-bubblemap.min.js +1 -1
- package/modules/chart-bump.d.ts +1 -1
- package/modules/chart-bump.esm.min.js +1 -1
- package/modules/chart-bump.min.cjs +1 -1
- package/modules/chart-bump.min.js +1 -1
- package/modules/chart-calendar.d.ts +1 -1
- package/modules/chart-calendar.esm.min.js +1 -1
- package/modules/chart-calendar.min.cjs +1 -1
- package/modules/chart-calendar.min.js +1 -1
- package/modules/chart-decomposition.d.ts +1 -1
- package/modules/chart-decomposition.esm.min.js +1 -1
- package/modules/chart-decomposition.min.cjs +1 -1
- package/modules/chart-decomposition.min.js +1 -1
- package/modules/chart-diverging.d.ts +1 -1
- package/modules/chart-diverging.esm.min.js +1 -1
- package/modules/chart-diverging.min.cjs +1 -1
- package/modules/chart-diverging.min.js +1 -1
- package/modules/chart-dumbbell.d.ts +1 -1
- package/modules/chart-dumbbell.esm.min.js +1 -1
- package/modules/chart-dumbbell.min.cjs +1 -1
- package/modules/chart-dumbbell.min.js +1 -1
- package/modules/chart-fan.d.ts +1 -1
- package/modules/chart-fan.esm.min.js +1 -1
- package/modules/chart-fan.min.cjs +1 -1
- package/modules/chart-fan.min.js +1 -1
- package/modules/chart-hexbin.d.ts +1 -1
- package/modules/chart-hexbin.esm.min.js +1 -1
- package/modules/chart-hexbin.min.cjs +1 -1
- package/modules/chart-hexbin.min.js +1 -1
- package/modules/chart-hexmap.d.ts +1 -1
- package/modules/chart-hexmap.esm.min.js +1 -1
- package/modules/chart-hexmap.min.cjs +1 -1
- package/modules/chart-hexmap.min.js +1 -1
- package/modules/chart-icicle.d.ts +1 -1
- package/modules/chart-icicle.esm.min.js +1 -1
- package/modules/chart-icicle.min.cjs +1 -1
- package/modules/chart-icicle.min.js +1 -1
- package/modules/chart-markermap.d.ts +1 -1
- package/modules/chart-markermap.esm.min.js +1 -1
- package/modules/chart-markermap.min.cjs +1 -1
- package/modules/chart-markermap.min.js +1 -1
- package/modules/chart-parallel.d.ts +1 -1
- package/modules/chart-parallel.esm.min.js +1 -1
- package/modules/chart-parallel.min.cjs +1 -1
- package/modules/chart-parallel.min.js +1 -1
- package/modules/chart-ridgeline.d.ts +1 -1
- package/modules/chart-ridgeline.esm.min.js +1 -1
- package/modules/chart-ridgeline.min.cjs +1 -1
- package/modules/chart-ridgeline.min.js +1 -1
- package/modules/chart-roc.d.ts +1 -1
- package/modules/chart-roc.esm.min.js +1 -1
- package/modules/chart-roc.min.cjs +1 -1
- package/modules/chart-roc.min.js +1 -1
- package/modules/chart-slope.d.ts +1 -1
- package/modules/chart-slope.esm.min.js +1 -1
- package/modules/chart-slope.min.cjs +1 -1
- package/modules/chart-slope.min.js +1 -1
- package/modules/chart-splom.d.ts +1 -1
- package/modules/chart-splom.esm.min.js +1 -1
- package/modules/chart-splom.min.cjs +1 -1
- package/modules/chart-splom.min.js +1 -1
- package/modules/chart-waffle.d.ts +1 -1
- package/modules/chart-waffle.esm.min.js +1 -1
- package/modules/chart-waffle.min.cjs +1 -1
- package/modules/chart-waffle.min.js +1 -1
- package/modules/charts.d.ts +16 -1
- package/modules/charts.esm.min.js +23 -16
- package/modules/charts.min.cjs +23 -16
- package/modules/charts.min.js +23 -16
- package/modules/data-router.d.ts +259 -3
- package/modules/data-router.esm.min.js +9 -4
- package/modules/data-router.min.cjs +9 -4
- package/modules/data-router.min.js +9 -4
- package/modules/devtools.d.ts +1 -1
- package/modules/devtools.esm.min.js +1 -1
- package/modules/devtools.min.cjs +1 -1
- package/modules/devtools.min.js +1 -1
- package/modules/dhtmlx-compat.d.ts +1 -1
- package/modules/dhtmlx-compat.esm.min.js +3 -3
- package/modules/dhtmlx-compat.min.cjs +3 -3
- package/modules/dhtmlx-compat.min.js +3 -3
- package/modules/gantt.d.ts +563 -12
- package/modules/gantt.esm.min.js +8 -4
- package/modules/gantt.min.cjs +8 -4
- package/modules/gantt.min.js +8 -4
- package/modules/geo-europe-nuts.d.ts +1 -1
- package/modules/geo-europe-nuts.esm.min.js +1 -1
- package/modules/geo-uk.d.ts +1 -1
- package/modules/geo-uk.esm.min.js +1 -1
- package/modules/geo-us-states.d.ts +1 -1
- package/modules/geo-us-states.esm.min.js +1 -1
- package/modules/geo-world-110m.d.ts +1 -1
- package/modules/geo-world-110m.esm.min.js +1 -1
- package/modules/geo-world-50m.d.ts +1 -1
- package/modules/geo-world-50m.esm.min.js +1 -1
- package/modules/htmx.d.ts +1 -1
- package/modules/htmx.esm.min.js +197 -39
- package/modules/htmx.min.cjs +197 -39
- package/modules/htmx.min.js +197 -39
- package/modules/kanban.d.ts +687 -4
- package/modules/kanban.esm.min.js +3 -3
- package/modules/kanban.min.cjs +3 -3
- package/modules/kanban.min.js +3 -3
- package/modules/kpi.d.ts +237 -3
- package/modules/kpi.esm.min.js +4 -4
- package/modules/kpi.min.cjs +4 -4
- package/modules/kpi.min.js +4 -4
- package/modules/layout.d.ts +249 -7
- package/modules/layout.esm.min.js +3 -3
- package/modules/layout.min.cjs +3 -3
- package/modules/layout.min.js +3 -3
- package/modules/mock-socket.d.ts +6 -1
- package/modules/mock-socket.esm.min.js +1 -1
- package/modules/mock-socket.min.cjs +1 -1
- package/modules/mock-socket.min.js +1 -1
- package/modules/react.d.ts +18 -1
- package/modules/react.esm.min.js +3 -3
- package/modules/react.min.cjs +3 -3
- package/modules/react.min.js +3 -3
- package/modules/svelte.d.ts +1 -1
- package/modules/svelte.esm.min.js +3 -3
- package/modules/svelte.min.cjs +3 -3
- package/modules/svelte.min.js +3 -3
- package/modules/tabs.d.ts +116 -11
- package/modules/tabs.esm.min.js +3 -3
- package/modules/tabs.min.cjs +3 -3
- package/modules/tabs.min.js +3 -3
- package/modules/vue.d.ts +12 -1
- package/modules/vue.esm.min.js +3 -3
- package/modules/vue.min.cjs +3 -3
- package/modules/vue.min.js +3 -3
- package/modules/webcomponent.d.ts +89 -6
- package/modules/webcomponent.esm.min.js +242 -43
- package/modules/webcomponent.min.cjs +242 -43
- package/modules/webcomponent.min.js +242 -43
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.68.
|
|
2
|
+
* Lattice Grid 1.68.2, kanban module
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -52,12 +52,12 @@ Object.defineProperty(__exports,"frameBatched",{enumerable:true,get:function(){r
|
|
|
52
52
|
Object.defineProperty(__exports,"settleDebounce",{enumerable:true,get:function(){return settleDebounce;}});
|
|
53
53
|
Object.defineProperty(__exports,"whenIdle",{enumerable:true,get:function(){return whenIdle;}});
|
|
54
54
|
Object.defineProperty(__exports,"uid",{enumerable:true,get:function(){return uid;}});
|
|
55
|
-
const STAMPED_VERSION="1.68.
|
|
55
|
+
const STAMPED_VERSION="1.68.2";
|
|
56
56
|
async function resolveVersion(){
|
|
57
57
|
if(STAMPED_VERSION!=='0.0.0-source')return STAMPED_VERSION;
|
|
58
58
|
return STAMPED_VERSION;
|
|
59
59
|
}
|
|
60
|
-
const VERSION="1.68.
|
|
60
|
+
const VERSION="1.68.2";
|
|
61
61
|
const warned=new Set();
|
|
62
62
|
const WARNED_LIMIT=2000;
|
|
63
63
|
function rememberWarned(key){
|
package/modules/kanban.min.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.68.
|
|
2
|
+
* Lattice Grid 1.68.2, kanban module
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -54,12 +54,12 @@ Object.defineProperty(__exports,"frameBatched",{enumerable:true,get:function(){r
|
|
|
54
54
|
Object.defineProperty(__exports,"settleDebounce",{enumerable:true,get:function(){return settleDebounce;}});
|
|
55
55
|
Object.defineProperty(__exports,"whenIdle",{enumerable:true,get:function(){return whenIdle;}});
|
|
56
56
|
Object.defineProperty(__exports,"uid",{enumerable:true,get:function(){return uid;}});
|
|
57
|
-
const STAMPED_VERSION="1.68.
|
|
57
|
+
const STAMPED_VERSION="1.68.2";
|
|
58
58
|
async function resolveVersion(){
|
|
59
59
|
if(STAMPED_VERSION!=='0.0.0-source')return STAMPED_VERSION;
|
|
60
60
|
return STAMPED_VERSION;
|
|
61
61
|
}
|
|
62
|
-
const VERSION="1.68.
|
|
62
|
+
const VERSION="1.68.2";
|
|
63
63
|
const warned=new Set();
|
|
64
64
|
const WARNED_LIMIT=2000;
|
|
65
65
|
function rememberWarned(key){
|
package/modules/kanban.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.68.
|
|
2
|
+
* Lattice Grid 1.68.2, kanban module
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -54,12 +54,12 @@ Object.defineProperty(__exports,"frameBatched",{enumerable:true,get:function(){r
|
|
|
54
54
|
Object.defineProperty(__exports,"settleDebounce",{enumerable:true,get:function(){return settleDebounce;}});
|
|
55
55
|
Object.defineProperty(__exports,"whenIdle",{enumerable:true,get:function(){return whenIdle;}});
|
|
56
56
|
Object.defineProperty(__exports,"uid",{enumerable:true,get:function(){return uid;}});
|
|
57
|
-
const STAMPED_VERSION="1.68.
|
|
57
|
+
const STAMPED_VERSION="1.68.2";
|
|
58
58
|
async function resolveVersion(){
|
|
59
59
|
if(STAMPED_VERSION!=='0.0.0-source')return STAMPED_VERSION;
|
|
60
60
|
return STAMPED_VERSION;
|
|
61
61
|
}
|
|
62
|
-
const VERSION="1.68.
|
|
62
|
+
const VERSION="1.68.2";
|
|
63
63
|
const warned=new Set();
|
|
64
64
|
const WARNED_LIMIT=2000;
|
|
65
65
|
function rememberWarned(key){
|
package/modules/kpi.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.68.
|
|
2
|
+
* Lattice Grid 1.68.2, kpi module type declarations
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -20,21 +20,47 @@ type KPIFormat =
|
|
|
20
20
|
* below it critical; `lowerIsBetter` mirrors it. Colour is a host concern.
|
|
21
21
|
*/
|
|
22
22
|
interface KPIThresholds {
|
|
23
|
+
/**
|
|
24
|
+
* The cut point between good and warning. With the default `higherIsBetter`, a value at
|
|
25
|
+
* or above it is good.
|
|
26
|
+
*/
|
|
23
27
|
warn: number;
|
|
28
|
+
/**
|
|
29
|
+
* The cut point between warning and critical. With `higherIsBetter`, a value at or
|
|
30
|
+
* above it (but below `warn`) is a warning and anything below it is critical.
|
|
31
|
+
*/
|
|
24
32
|
critical: number;
|
|
33
|
+
/**
|
|
34
|
+
* Which way is good. `higherIsBetter` (the default) grades upwards from the cut points;
|
|
35
|
+
* `lowerIsBetter` mirrors them, so a small value is the healthy one.
|
|
36
|
+
*/
|
|
25
37
|
direction?: 'higherIsBetter' | 'lowerIsBetter';
|
|
26
38
|
}
|
|
27
39
|
|
|
28
40
|
/** An explicit band: the `status` of the first band whose half-open `[min, max)` contains the value. */
|
|
29
41
|
interface KPIBand {
|
|
42
|
+
/** The lower bound, inclusive. Omitted, the band reaches down without limit. */
|
|
30
43
|
min?: number;
|
|
44
|
+
/** The upper bound, exclusive. Omitted, the band reaches up without limit. */
|
|
31
45
|
max?: number;
|
|
46
|
+
/**
|
|
47
|
+
* The status a value inside this band reports. The first matching band in the list
|
|
48
|
+
* wins, so order them from the narrowest.
|
|
49
|
+
*/
|
|
32
50
|
status: 'good' | 'warn' | 'critical';
|
|
33
51
|
}
|
|
34
52
|
|
|
35
53
|
/** An optional sparkline series: the `y` field plotted in order of the `x` field (or insertion). */
|
|
36
54
|
interface KPISparkline {
|
|
55
|
+
/**
|
|
56
|
+
* The field the points are ordered by. Omitted, the rows are plotted in the order the
|
|
57
|
+
* panel holds them.
|
|
58
|
+
*/
|
|
37
59
|
x?: string;
|
|
60
|
+
/**
|
|
61
|
+
* The value plotted — a field name or a function of the row. Anything that is not a
|
|
62
|
+
* finite number is dropped, and a series with no finite points renders no sparkline.
|
|
63
|
+
*/
|
|
38
64
|
y: string | ((row: KPIRow) => unknown);
|
|
39
65
|
}
|
|
40
66
|
|
|
@@ -165,18 +191,37 @@ interface KPINodeModel {
|
|
|
165
191
|
key: string;
|
|
166
192
|
/** The tile id, or null on a synthesised level. */
|
|
167
193
|
id: string | null;
|
|
194
|
+
/**
|
|
195
|
+
* What the node is called: the tile's own label, or the path segment a synthesised
|
|
196
|
+
* level came from.
|
|
197
|
+
*/
|
|
168
198
|
label: string;
|
|
169
199
|
/** Depth, 0 at the top level. */
|
|
170
200
|
level: number;
|
|
171
201
|
/** Its place among its siblings, from 1, and how many there are. */
|
|
172
202
|
posinset: number;
|
|
203
|
+
/**
|
|
204
|
+
* How many siblings the node sits among — the other half of the screen-reader's "3 of
|
|
205
|
+
* 7".
|
|
206
|
+
*/
|
|
173
207
|
setsize: number;
|
|
208
|
+
/** Whether the node has anything beneath it. A leaf is never expandable. */
|
|
174
209
|
hasChildren: boolean;
|
|
210
|
+
/**
|
|
211
|
+
* Whether the branch is currently open. Always false for a leaf; a collapsed branch's
|
|
212
|
+
* children are not rendered, because its worst status is already on the node that is.
|
|
213
|
+
*/
|
|
175
214
|
expanded: boolean;
|
|
215
|
+
/** The node's children, in order, each a full node model. */
|
|
176
216
|
children: KPINodeModel[];
|
|
177
217
|
/** The node's own tile, or null on a synthesised level. */
|
|
178
218
|
tile: KPITileModel | null;
|
|
219
|
+
/**
|
|
220
|
+
* The node's own reading, from its tile. Null on a synthesised level — no value is
|
|
221
|
+
* invented for a branch from its children.
|
|
222
|
+
*/
|
|
179
223
|
value: unknown;
|
|
224
|
+
/** The node's reading as text, formatted by its tile. Null on a synthesised level. */
|
|
180
225
|
formatted: string | null;
|
|
181
226
|
/** The node's own status. */
|
|
182
227
|
status: 'good' | 'warn' | 'critical' | 'unknown' | null;
|
|
@@ -190,11 +235,21 @@ interface KPINodeModel {
|
|
|
190
235
|
|
|
191
236
|
/** A computed tile, as it appears in the model. */
|
|
192
237
|
interface KPITileModel {
|
|
238
|
+
/** The tile's identity — its configured `id`, else its label, else its index. */
|
|
193
239
|
id: string;
|
|
240
|
+
/** The tile's accessible name, as configured. */
|
|
194
241
|
label: string;
|
|
195
242
|
/** `'stat'` for an aggregate tile, `'clock'` for a clock tile. */
|
|
196
243
|
kind: 'stat' | 'clock';
|
|
244
|
+
/**
|
|
245
|
+
* How the value was reduced: `sum`, `avg`, `min`, `max`, `count`, `countDistinct` or
|
|
246
|
+
* `custom`.
|
|
247
|
+
*/
|
|
197
248
|
aggregation: string;
|
|
249
|
+
/**
|
|
250
|
+
* The row field the aggregation read. Undefined for a `count` or custom tile that names
|
|
251
|
+
* none, and on a clock tile.
|
|
252
|
+
*/
|
|
198
253
|
field?: string;
|
|
199
254
|
/** For a clock tile, the read instant as epoch milliseconds. */
|
|
200
255
|
value: unknown;
|
|
@@ -216,27 +271,127 @@ interface KPITileModel {
|
|
|
216
271
|
* normally. `null` means the tile has no thresholds or bands configured.
|
|
217
272
|
*/
|
|
218
273
|
status: 'good' | 'warn' | 'critical' | 'unknown' | null;
|
|
274
|
+
/**
|
|
275
|
+
* The tile's target, as configured. It also extends the meter's scale when it falls
|
|
276
|
+
* outside the bands. Undefined on a clock tile.
|
|
277
|
+
*/
|
|
219
278
|
target?: number;
|
|
279
|
+
/** The comparison value the movement line is measured from, as configured. */
|
|
220
280
|
baseline?: number;
|
|
281
|
+
/** `value − baseline`. Null when the tile has no baseline or measured no number. */
|
|
221
282
|
delta: number | null;
|
|
283
|
+
/**
|
|
284
|
+
* The delta as a fraction of the baseline. Null when there is no delta, and when the
|
|
285
|
+
* baseline is zero — a percentage of nothing is not reported as infinity.
|
|
286
|
+
*/
|
|
222
287
|
deltaPercent: number | null;
|
|
288
|
+
/**
|
|
289
|
+
* The delta rendered with the tile's own number format. Undefined when there is no
|
|
290
|
+
* delta.
|
|
291
|
+
*/
|
|
223
292
|
deltaFormatted?: string;
|
|
224
293
|
/** What the movement line prints; see `KPIStatTile.delta`. Always present once `baseline` is. */
|
|
225
294
|
deltaMode?: 'absolute' | 'relative' | 'both';
|
|
295
|
+
/**
|
|
296
|
+
* How many of the panel's rows this tile's filter admitted — its own membership, which
|
|
297
|
+
* may be 0 while the panel holds rows. Always 0 on a clock tile.
|
|
298
|
+
*/
|
|
226
299
|
count: number;
|
|
300
|
+
/**
|
|
301
|
+
* The tile's trend series, as the finite numbers it plots, in `x` order. Null when the
|
|
302
|
+
* tile declares no sparkline and when no row yielded a finite value.
|
|
303
|
+
*/
|
|
227
304
|
sparkline: number[] | null;
|
|
228
305
|
}
|
|
229
306
|
|
|
230
307
|
/** The payload every tile event carries. */
|
|
231
308
|
interface KPIEvent {
|
|
309
|
+
/** The tile model the event is about. */
|
|
232
310
|
tile: KPITileModel;
|
|
311
|
+
/** That tile's id, for a host that only needs to switch on it. */
|
|
233
312
|
id: string;
|
|
313
|
+
/**
|
|
314
|
+
* The tree node the tile sits in, on a hierarchical panel; absent on a flat one and on
|
|
315
|
+
* the keyboard route.
|
|
316
|
+
*/
|
|
317
|
+
node?: KPINodeModel;
|
|
318
|
+
/**
|
|
319
|
+
* The DOM event behind this one — a click, double-click, context-menu gesture or the
|
|
320
|
+
* Enter/Space keypress that stands in for a click.
|
|
321
|
+
*/
|
|
234
322
|
originalEvent?: unknown;
|
|
235
323
|
}
|
|
236
324
|
|
|
325
|
+
/** The whole panel model, as `change` hands it over. */
|
|
326
|
+
interface KPIModel {
|
|
327
|
+
/** Every tile model, in configured order. */
|
|
328
|
+
tiles: KPITileModel[];
|
|
329
|
+
/** The decorated tree, on a hierarchical panel only. */
|
|
330
|
+
nodes?: KPINodeModel[];
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/** `node:toggle`: a branch of a hierarchical panel was expanded or collapsed. */
|
|
334
|
+
interface KPINodeToggleEvent {
|
|
335
|
+
/** The key of the node that moved. */
|
|
336
|
+
key: string;
|
|
337
|
+
/** True when it was opened, false when it was closed. */
|
|
338
|
+
expanded: boolean;
|
|
339
|
+
/** The node, as the panel now holds it; undefined when the key names none. */
|
|
340
|
+
node?: KPINodeModel;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/** `change`: the panel rebuilt its model. */
|
|
344
|
+
interface KPIChangeEvent {
|
|
345
|
+
/** The model the panel now holds. */
|
|
346
|
+
model: KPIModel;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* The events a KPI panel raises.
|
|
351
|
+
*
|
|
352
|
+
* The panel's own, not the grid's: `grid.on` takes {@link EventName} and knows
|
|
353
|
+
* nothing about these, and a grid-bound panel follows the grid's events itself
|
|
354
|
+
* rather than re-publishing them. `on()` warns once on any other name, because
|
|
355
|
+
* a binding to an event that can never fire is a silent no-op.
|
|
356
|
+
*/
|
|
357
|
+
type KPIEventName =
|
|
358
|
+
/** A tile was clicked, or Enter or Space was pressed on a focused one. */
|
|
359
|
+
| 'tile:click'
|
|
360
|
+
/** A tile was double-clicked. */
|
|
361
|
+
| 'tile:dblclick'
|
|
362
|
+
/** A context menu was requested on a tile. */
|
|
363
|
+
| 'tile:contextmenu'
|
|
364
|
+
/** A branch of a hierarchical panel was expanded or collapsed, by the host or by a click on its twisty. */
|
|
365
|
+
| 'node:toggle'
|
|
366
|
+
/** The panel rebuilt its model — new rows, a changed configuration, or a followed grid event. */
|
|
367
|
+
| 'change';
|
|
368
|
+
|
|
369
|
+
/** What a handler receives, per KPI event. */
|
|
370
|
+
interface KPIEventPayloads {
|
|
371
|
+
/** The tile clicked, its id, its node on a tree panel, and the DOM event. */
|
|
372
|
+
'tile:click': KPIEvent;
|
|
373
|
+
/** The tile double-clicked, its id, its node on a tree panel, and the DOM event. */
|
|
374
|
+
'tile:dblclick': KPIEvent;
|
|
375
|
+
/** The tile the menu was asked for, its id, its node on a tree panel, and the DOM event. */
|
|
376
|
+
'tile:contextmenu': KPIEvent;
|
|
377
|
+
/** Which branch moved and which way. */
|
|
378
|
+
'node:toggle': KPINodeToggleEvent;
|
|
379
|
+
/** The rebuilt model. */
|
|
380
|
+
change: KPIChangeEvent;
|
|
381
|
+
}
|
|
382
|
+
|
|
237
383
|
/** KPI panel configuration. */
|
|
238
384
|
interface KPIConfig {
|
|
385
|
+
/**
|
|
386
|
+
* The rows the tiles reduce over. Use this or `grid`; passing both leaves the panel on
|
|
387
|
+
* the array.
|
|
388
|
+
*/
|
|
239
389
|
rows?: KPIRow[];
|
|
390
|
+
/**
|
|
391
|
+
* A Lattice grid to follow instead of `rows`: the panel reads the grid's displayed rows
|
|
392
|
+
* and re-reads them whenever the grid settles, so it never disagrees with the table
|
|
393
|
+
* beneath it. On a bound panel `rows.apply` and `setRows` are ignored with a warning.
|
|
394
|
+
*/
|
|
240
395
|
grid?: unknown;
|
|
241
396
|
/**
|
|
242
397
|
* Row identity (a field or fn, returning a string or number); default
|
|
@@ -253,9 +408,20 @@ interface KPIConfig {
|
|
|
253
408
|
* confident zero. Ignored on a panel over a plain `rows` array.
|
|
254
409
|
*/
|
|
255
410
|
fields?: string[];
|
|
411
|
+
/** The tiles to show, in display order: aggregate stat tiles, or clock tiles. */
|
|
256
412
|
tiles?: KPITile[];
|
|
413
|
+
/**
|
|
414
|
+
* How many tile columns to aim for. Tiles shrink to fit rather than overflow the host,
|
|
415
|
+
* so a narrow panel settles on fewer. Unset, the layout fits as many as the width
|
|
416
|
+
* allows.
|
|
417
|
+
*/
|
|
257
418
|
columns?: number;
|
|
419
|
+
/** The panel's accessible name. Unset, the panel carries none. */
|
|
258
420
|
ariaLabel?: string;
|
|
421
|
+
/**
|
|
422
|
+
* The placeholder printed where a tile has no number — an unknown tile, or one whose
|
|
423
|
+
* aggregation returned nothing. Defaults to an em dash.
|
|
424
|
+
*/
|
|
259
425
|
nullText?: string;
|
|
260
426
|
/**
|
|
261
427
|
* The default locale a clock tile formats in when the tile itself declares
|
|
@@ -276,17 +442,41 @@ interface KPIConfig {
|
|
|
276
442
|
* the shape; a key it does not carry falls back to English.
|
|
277
443
|
*/
|
|
278
444
|
messages?: { t(key: string, params?: Record<string, unknown>): string };
|
|
445
|
+
/**
|
|
446
|
+
* Called when a tile is clicked (or activated from the keyboard), with the same payload
|
|
447
|
+
* as the `tile:click` event. Both fire.
|
|
448
|
+
*/
|
|
279
449
|
onTileClick?: (event: KPIEvent) => void;
|
|
450
|
+
/** Called when a tile is double-clicked, alongside the `tile:dblclick` event. */
|
|
280
451
|
onTileDblClick?: (event: KPIEvent) => void;
|
|
452
|
+
/** Called on a tile's context-menu gesture, alongside the `tile:contextmenu` event. */
|
|
281
453
|
onTileContextMenu?: (event: KPIEvent) => void;
|
|
454
|
+
/**
|
|
455
|
+
* Called when a branch of a hierarchical panel opens or closes, with the node's key,
|
|
456
|
+
* its new state and the node model. Alongside the `node:toggle` event.
|
|
457
|
+
*/
|
|
282
458
|
onNodeToggle?: (event: { key: string; expanded: boolean; node?: KPINodeModel }) => void;
|
|
459
|
+
/**
|
|
460
|
+
* Called after every recompute, with the freshly built model — the hook for mirroring
|
|
461
|
+
* the panel's numbers somewhere else. Alongside the `change` event.
|
|
462
|
+
*/
|
|
283
463
|
onChange?: (event: { model: { tiles: KPITileModel[]; nodes?: KPINodeModel[] } }) => void;
|
|
284
464
|
}
|
|
285
465
|
|
|
286
466
|
/** The keyed-diff consumer surface a KPI panel shares with a grid, so a Data Router routes to it directly. */
|
|
287
467
|
interface KPIRows {
|
|
468
|
+
/**
|
|
469
|
+
* Apply a keyed diff: `add` and `update` upsert a row by its key, `remove` drops one.
|
|
470
|
+
* Only the rows in the diff touch each tile's running total, so a live feed costs
|
|
471
|
+
* nothing per unchanged row. Ignored with a warning on a grid-bound panel.
|
|
472
|
+
*/
|
|
288
473
|
apply(change: { add?: KPIRow[]; update?: KPIRow[]; remove?: unknown[] }): void;
|
|
474
|
+
/** Visit every row the panel holds, with its key. */
|
|
289
475
|
forEach(fn: (row: KPIRow, key: unknown) => void): void;
|
|
476
|
+
/**
|
|
477
|
+
* How many rows the panel holds. This is the panel's emptiness test: with none, every
|
|
478
|
+
* stat tile reports `unknown` rather than a healthy zero.
|
|
479
|
+
*/
|
|
290
480
|
readonly count: number;
|
|
291
481
|
}
|
|
292
482
|
|
|
@@ -297,14 +487,25 @@ interface KPIRows {
|
|
|
297
487
|
* updating each tile incrementally from the routed delta.
|
|
298
488
|
*/
|
|
299
489
|
interface KPI {
|
|
490
|
+
/** The element the panel renders into, or null for a headless panel. */
|
|
300
491
|
readonly el: unknown | null;
|
|
301
492
|
/** The resolved row identity; see `KPIConfig.rowKey`. */
|
|
302
493
|
readonly rowKey: string | ((row: KPIRow) => string | number);
|
|
303
494
|
/** Whether the panel renders as a hierarchy rather than a flat tile grid. */
|
|
304
495
|
readonly tree: boolean;
|
|
496
|
+
/**
|
|
497
|
+
* The keyed-diff consumer surface, the same shape a grid exposes — this is what makes a
|
|
498
|
+
* panel a Data Router target.
|
|
499
|
+
*/
|
|
305
500
|
rows: KPIRows;
|
|
501
|
+
/** Every tile model, in configured order. */
|
|
306
502
|
tiles(): KPITileModel[];
|
|
503
|
+
/** One tile model by id, or undefined when no tile has that id. */
|
|
307
504
|
tile(id: string): KPITileModel | undefined;
|
|
505
|
+
/**
|
|
506
|
+
* A tile's computed value. Null for an unknown id, and for a tile that measured
|
|
507
|
+
* nothing.
|
|
508
|
+
*/
|
|
308
509
|
value(id: string): unknown;
|
|
309
510
|
/** The top-level nodes of the hierarchy. Empty on a flat panel. */
|
|
310
511
|
nodes(): KPINodeModel[];
|
|
@@ -312,15 +513,48 @@ interface KPI {
|
|
|
312
513
|
node(key: string): KPINodeModel | undefined;
|
|
313
514
|
/** The nodes on screen: the roots, plus the children of every open branch. */
|
|
314
515
|
visibleNodes(): KPINodeModel[];
|
|
516
|
+
/**
|
|
517
|
+
* Open a branch of a hierarchical panel by node key, re-render, and fire `node:toggle`.
|
|
518
|
+
* A key that is already open changes nothing.
|
|
519
|
+
*/
|
|
315
520
|
expand(key: string): KPI;
|
|
521
|
+
/** Close a branch by node key, re-render, and fire `node:toggle`. */
|
|
316
522
|
collapse(key: string): KPI;
|
|
523
|
+
/** Flip a branch between open and closed, firing `node:toggle` on the change. */
|
|
317
524
|
toggle(key: string): KPI;
|
|
525
|
+
/**
|
|
526
|
+
* Replace the source rows and recompute, and make that array the source again so a
|
|
527
|
+
* later `refresh()` re-reads it. Ignored with a warning on a grid-bound panel.
|
|
528
|
+
*/
|
|
318
529
|
setRows(rows: KPIRow[]): KPI;
|
|
530
|
+
/**
|
|
531
|
+
* Recompute every tile and re-render. A bound panel re-reads the grid now rather than
|
|
532
|
+
* at the end of the turn; a configured panel re-reads its array; once rows have arrived
|
|
533
|
+
* through `rows.apply` nothing is re-read, so a routed feed is never thrown away.
|
|
534
|
+
*/
|
|
319
535
|
refresh(): KPI;
|
|
536
|
+
/**
|
|
537
|
+
* The restorable state: the rows the panel holds, and — on a hierarchical panel only —
|
|
538
|
+
* which branches are open.
|
|
539
|
+
*/
|
|
320
540
|
getState(): object;
|
|
541
|
+
/**
|
|
542
|
+
* Restore a snapshot from `getState`. A snapshot without `expanded` leaves the
|
|
543
|
+
* expansion alone rather than collapsing the rail.
|
|
544
|
+
*/
|
|
321
545
|
setState(snapshot: object): KPI;
|
|
322
|
-
|
|
323
|
-
|
|
546
|
+
/**
|
|
547
|
+
* Register an event handler; returns a function that removes it. An unrecognised event
|
|
548
|
+
* name is warned about once. What each event carries is {@link KPIEventPayloads}; the
|
|
549
|
+
* handler is declared with the widest of them, so narrow on the name inside it.
|
|
550
|
+
*/
|
|
551
|
+
on(name: KPIEventName, fn: (event: KPIEventPayloads[KPIEventName]) => void): () => void;
|
|
552
|
+
/** Remove a handler registered with `on`. */
|
|
553
|
+
off(name: KPIEventName, fn: (event: KPIEventPayloads[KPIEventName]) => void): void;
|
|
554
|
+
/**
|
|
555
|
+
* Drop every listener, stop following the bound grid, stop any clock tile ticking, and
|
|
556
|
+
* empty the element (removing only the class the panel added).
|
|
557
|
+
*/
|
|
324
558
|
destroy(): void;
|
|
325
559
|
}
|
|
326
560
|
|
package/modules/kpi.esm.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.68.
|
|
2
|
+
* Lattice Grid 1.68.2, kpi module
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -52,12 +52,12 @@ Object.defineProperty(__exports,"frameBatched",{enumerable:true,get:function(){r
|
|
|
52
52
|
Object.defineProperty(__exports,"settleDebounce",{enumerable:true,get:function(){return settleDebounce;}});
|
|
53
53
|
Object.defineProperty(__exports,"whenIdle",{enumerable:true,get:function(){return whenIdle;}});
|
|
54
54
|
Object.defineProperty(__exports,"uid",{enumerable:true,get:function(){return uid;}});
|
|
55
|
-
const STAMPED_VERSION="1.68.
|
|
55
|
+
const STAMPED_VERSION="1.68.2";
|
|
56
56
|
async function resolveVersion(){
|
|
57
57
|
if(STAMPED_VERSION!=='0.0.0-source')return STAMPED_VERSION;
|
|
58
58
|
return STAMPED_VERSION;
|
|
59
59
|
}
|
|
60
|
-
const VERSION="1.68.
|
|
60
|
+
const VERSION="1.68.2";
|
|
61
61
|
const warned=new Set();
|
|
62
62
|
const WARNED_LIMIT=2000;
|
|
63
63
|
function rememberWarned(key){
|
|
@@ -5596,7 +5596,7 @@ const columns=this.#columnList();
|
|
|
5596
5596
|
const parts=[];
|
|
5597
5597
|
const hidden=this.#ctx.columnHidden;
|
|
5598
5598
|
for(const column of columns){
|
|
5599
|
-
if(column.
|
|
5599
|
+
if(column.quickFilter===false)continue;
|
|
5600
5600
|
if(isFunction(hidden)&&hidden(column.id))continue;
|
|
5601
5601
|
const custom=column.value&&isFunction(column.value.quickFilterText)
|
|
5602
5602
|
?column.value.quickFilterText({value:undefined,data,row:null,column,colId:column.id,grid:null,context:this.#state('context',null)})
|
package/modules/kpi.min.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.68.
|
|
2
|
+
* Lattice Grid 1.68.2, kpi module
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -54,12 +54,12 @@ Object.defineProperty(__exports,"frameBatched",{enumerable:true,get:function(){r
|
|
|
54
54
|
Object.defineProperty(__exports,"settleDebounce",{enumerable:true,get:function(){return settleDebounce;}});
|
|
55
55
|
Object.defineProperty(__exports,"whenIdle",{enumerable:true,get:function(){return whenIdle;}});
|
|
56
56
|
Object.defineProperty(__exports,"uid",{enumerable:true,get:function(){return uid;}});
|
|
57
|
-
const STAMPED_VERSION="1.68.
|
|
57
|
+
const STAMPED_VERSION="1.68.2";
|
|
58
58
|
async function resolveVersion(){
|
|
59
59
|
if(STAMPED_VERSION!=='0.0.0-source')return STAMPED_VERSION;
|
|
60
60
|
return STAMPED_VERSION;
|
|
61
61
|
}
|
|
62
|
-
const VERSION="1.68.
|
|
62
|
+
const VERSION="1.68.2";
|
|
63
63
|
const warned=new Set();
|
|
64
64
|
const WARNED_LIMIT=2000;
|
|
65
65
|
function rememberWarned(key){
|
|
@@ -5598,7 +5598,7 @@ const columns=this.#columnList();
|
|
|
5598
5598
|
const parts=[];
|
|
5599
5599
|
const hidden=this.#ctx.columnHidden;
|
|
5600
5600
|
for(const column of columns){
|
|
5601
|
-
if(column.
|
|
5601
|
+
if(column.quickFilter===false)continue;
|
|
5602
5602
|
if(isFunction(hidden)&&hidden(column.id))continue;
|
|
5603
5603
|
const custom=column.value&&isFunction(column.value.quickFilterText)
|
|
5604
5604
|
?column.value.quickFilterText({value:undefined,data,row:null,column,colId:column.id,grid:null,context:this.#state('context',null)})
|
package/modules/kpi.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.68.
|
|
2
|
+
* Lattice Grid 1.68.2, kpi module
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -54,12 +54,12 @@ Object.defineProperty(__exports,"frameBatched",{enumerable:true,get:function(){r
|
|
|
54
54
|
Object.defineProperty(__exports,"settleDebounce",{enumerable:true,get:function(){return settleDebounce;}});
|
|
55
55
|
Object.defineProperty(__exports,"whenIdle",{enumerable:true,get:function(){return whenIdle;}});
|
|
56
56
|
Object.defineProperty(__exports,"uid",{enumerable:true,get:function(){return uid;}});
|
|
57
|
-
const STAMPED_VERSION="1.68.
|
|
57
|
+
const STAMPED_VERSION="1.68.2";
|
|
58
58
|
async function resolveVersion(){
|
|
59
59
|
if(STAMPED_VERSION!=='0.0.0-source')return STAMPED_VERSION;
|
|
60
60
|
return STAMPED_VERSION;
|
|
61
61
|
}
|
|
62
|
-
const VERSION="1.68.
|
|
62
|
+
const VERSION="1.68.2";
|
|
63
63
|
const warned=new Set();
|
|
64
64
|
const WARNED_LIMIT=2000;
|
|
65
65
|
function rememberWarned(key){
|
|
@@ -5598,7 +5598,7 @@ const columns=this.#columnList();
|
|
|
5598
5598
|
const parts=[];
|
|
5599
5599
|
const hidden=this.#ctx.columnHidden;
|
|
5600
5600
|
for(const column of columns){
|
|
5601
|
-
if(column.
|
|
5601
|
+
if(column.quickFilter===false)continue;
|
|
5602
5602
|
if(isFunction(hidden)&&hidden(column.id))continue;
|
|
5603
5603
|
const custom=column.value&&isFunction(column.value.quickFilterText)
|
|
5604
5604
|
?column.value.quickFilterText({value:undefined,data,row:null,column,colId:column.id,grid:null,context:this.#state('context',null)})
|