@toclocoinc/lattice-grid 1.64.0 → 1.65.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/README.md +3 -2
- package/docs/API.html +127 -5
- package/docs/api-detail.html +39 -4
- package/lattice-grid.d.ts +241 -205
- package/lattice-grid.esm.min.js +5 -5
- package/lattice-grid.min.cjs +5 -5
- package/lattice-grid.min.js +5 -5
- package/modules/ai.d.ts +10 -13
- 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 +2 -2
- package/modules/angular.esm.min.js +433 -7
- package/modules/angular.min.cjs +433 -7
- package/modules/angular.min.js +433 -7
- package/modules/chart-alluvial.d.ts +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +4 -5
- package/modules/charts.esm.min.js +3 -3
- package/modules/charts.min.cjs +3 -3
- package/modules/charts.min.js +3 -3
- package/modules/data-router.d.ts +5 -6
- package/modules/data-router.esm.min.js +3 -3
- package/modules/data-router.min.cjs +3 -3
- package/modules/data-router.min.js +3 -3
- 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 +37 -43
- package/modules/gantt.esm.min.js +3 -3
- package/modules/gantt.min.cjs +3 -3
- package/modules/gantt.min.js +3 -3
- package/modules/geo-europe-nuts.d.ts +2 -2
- package/modules/geo-europe-nuts.esm.min.js +1 -1
- package/modules/geo-uk.d.ts +2 -2
- package/modules/geo-uk.esm.min.js +1 -1
- package/modules/geo-us-states.d.ts +2 -2
- package/modules/geo-us-states.esm.min.js +1 -1
- package/modules/geo-world-110m.d.ts +2 -2
- package/modules/geo-world-110m.esm.min.js +1 -1
- package/modules/geo-world-50m.d.ts +2 -2
- package/modules/geo-world-50m.esm.min.js +1 -1
- package/modules/htmx.d.ts +2 -2
- package/modules/htmx.esm.min.js +5 -5
- package/modules/htmx.min.cjs +5 -5
- package/modules/htmx.min.js +5 -5
- package/modules/kanban.d.ts +14 -14
- 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 +5 -5
- package/modules/kpi.esm.min.js +3 -3
- package/modules/kpi.min.cjs +3 -3
- package/modules/kpi.min.js +3 -3
- package/modules/layout.d.ts +2 -2
- 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 +1 -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 +4 -5
- 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 +2 -3
- package/modules/svelte.esm.min.js +1 -1
- package/modules/svelte.min.cjs +1 -1
- package/modules/svelte.min.js +1 -1
- package/modules/tabs.d.ts +2 -3
- 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 +1 -1
- package/modules/vue.esm.min.js +1 -1
- package/modules/vue.min.cjs +1 -1
- package/modules/vue.min.js +1 -1
- package/modules/webcomponent.d.ts +2 -2
- package/modules/webcomponent.esm.min.js +5 -5
- package/modules/webcomponent.min.cjs +5 -5
- package/modules/webcomponent.min.js +5 -5
- package/package.json +1 -1
package/modules/ai.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.
|
|
2
|
+
* Lattice Grid 1.65.0, ai module type declarations
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* The provider-agnostic model callback the host supplies
|
|
7
|
+
* The provider-agnostic model callback the host supplies.
|
|
8
8
|
* The module never imports a provider SDK, reads a key, or makes a network
|
|
9
9
|
* call — it builds this payload and awaits the host's reply. A host may wrap a
|
|
10
10
|
* chat provider (`{ text }`), a completion (a bare string), a tool-calling turn
|
|
@@ -46,8 +46,7 @@ interface AIFact {
|
|
|
46
46
|
* A narrative target. `view` narrates the current filtered view; `column`
|
|
47
47
|
* narrates one column's profile; `forecast` adds its projection; `kpi`/`chart`
|
|
48
48
|
* narrate figures the caller passes through in `facts`; `risk` assembles a
|
|
49
|
-
* project RISK SUMMARY from the separate Gantt / Kanban modules' public outputs
|
|
50
|
-
* (BACKLOG-0000979).
|
|
49
|
+
* project RISK SUMMARY from the separate Gantt / Kanban modules' public outputs.
|
|
51
50
|
*/
|
|
52
51
|
interface AITarget {
|
|
53
52
|
kind?: 'view' | 'column' | 'forecast' | 'kpi' | 'chart' | 'risk';
|
|
@@ -109,7 +108,7 @@ interface AIFactsPacket {
|
|
|
109
108
|
}
|
|
110
109
|
|
|
111
110
|
/**
|
|
112
|
-
* The risk facts a board / Gantt risk summary grounds on
|
|
111
|
+
* The risk facts a board / Gantt risk summary grounds on,
|
|
113
112
|
* from {@link buildRiskFacts}: the facts plus which module sources resolved and
|
|
114
113
|
* which opt-in exposures (task names, cost) were honoured.
|
|
115
114
|
*/
|
|
@@ -172,8 +171,7 @@ interface AIConfig {
|
|
|
172
171
|
onProposal?: (result: AIProposal) => void;
|
|
173
172
|
/**
|
|
174
173
|
* A Kanban board (from `createKanban`) the governed actor writes moves
|
|
175
|
-
* through: an NL card move applies via the board's own `beforeMove` gate
|
|
176
|
-
* (BACKLOG-0000967), never a kanban-specific write bypass.
|
|
174
|
+
* through: an NL card move applies via the board's own `beforeMove` gate, never a kanban-specific write bypass.
|
|
177
175
|
*/
|
|
178
176
|
board?: unknown;
|
|
179
177
|
/** Cap on rows any tool result carries to `ask()`. */
|
|
@@ -210,7 +208,7 @@ interface AIApplyReport {
|
|
|
210
208
|
}
|
|
211
209
|
|
|
212
210
|
/**
|
|
213
|
-
* The result of an ask-your-data question
|
|
211
|
+
* The result of an ask-your-data question: a validated,
|
|
214
212
|
* READ-ONLY query spec — never rows — that the host reviews before applying.
|
|
215
213
|
*/
|
|
216
214
|
interface AIQueryResult {
|
|
@@ -238,7 +236,7 @@ interface AIQueryResult {
|
|
|
238
236
|
apply(opts?: { router?: unknown; onResult?: (rows: object[]) => void }): AIApplyReport;
|
|
239
237
|
}
|
|
240
238
|
|
|
241
|
-
/** One before/after change in a governed-actor proposal
|
|
239
|
+
/** One before/after change in a governed-actor proposal. */
|
|
242
240
|
interface AIDiffEntry {
|
|
243
241
|
/** The target row key. */
|
|
244
242
|
key: string;
|
|
@@ -259,7 +257,7 @@ interface AIDiffEntry {
|
|
|
259
257
|
}
|
|
260
258
|
|
|
261
259
|
/**
|
|
262
|
-
* A governed-actor proposal (Play C
|
|
260
|
+
* A governed-actor proposal (Play C): the model's structured
|
|
263
261
|
* edits, VALIDATED and resolved against the current view — never written until
|
|
264
262
|
* a human approves. `apply()` writes ONLY through the grid's own gate.
|
|
265
263
|
*/
|
|
@@ -325,8 +323,7 @@ interface AI {
|
|
|
325
323
|
/** An alias for {@link AI.explain}. */
|
|
326
324
|
narrate(target?: AITarget, opts?: object): Promise<AINarrative>;
|
|
327
325
|
/**
|
|
328
|
-
* Produce a grounded, reconciled board / Gantt RISK SUMMARY
|
|
329
|
-
* (BACKLOG-0000979): a plain-language reading like "3 tasks at risk on the
|
|
326
|
+
* Produce a grounded, reconciled board / Gantt RISK SUMMARY: a plain-language reading like "3 tasks at risk on the
|
|
330
327
|
* critical path, SPI 0.67, 2 SLA breaches". A convenience over
|
|
331
328
|
* `explain({ kind: 'risk', ... })`; the module sources go in `sources`
|
|
332
329
|
* (`gantt`, `board`/`sla`, or precomputed outputs). Every figure runs through
|
|
@@ -395,7 +392,7 @@ interface AI {
|
|
|
395
392
|
export function createAI(grid: unknown, config?: AIConfig): AI;
|
|
396
393
|
|
|
397
394
|
/**
|
|
398
|
-
* Build the RISK-SUMMARY facts packet
|
|
395
|
+
* Build the RISK-SUMMARY facts packet from the separate
|
|
399
396
|
* Gantt / Kanban modules' public outputs — SPI/CPI and variances from
|
|
400
397
|
* `gantt.earnedValue()`, tasks at risk / on the critical path from
|
|
401
398
|
* `gantt.schedule`, and SLA breaches from `board.sla`. Reads the module
|
package/modules/ai.esm.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.
|
|
2
|
+
* Lattice Grid 1.65.0, ai 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.
|
|
55
|
+
const STAMPED_VERSION="1.65.0";
|
|
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.
|
|
60
|
+
const VERSION="1.65.0";
|
|
61
61
|
const warned=new Set();
|
|
62
62
|
const WARNED_LIMIT=2000;
|
|
63
63
|
function rememberWarned(key){
|
package/modules/ai.min.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.
|
|
2
|
+
* Lattice Grid 1.65.0, ai 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.
|
|
57
|
+
const STAMPED_VERSION="1.65.0";
|
|
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.
|
|
62
|
+
const VERSION="1.65.0";
|
|
63
63
|
const warned=new Set();
|
|
64
64
|
const WARNED_LIMIT=2000;
|
|
65
65
|
function rememberWarned(key){
|
package/modules/ai.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.
|
|
2
|
+
* Lattice Grid 1.65.0, ai 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.
|
|
57
|
+
const STAMPED_VERSION="1.65.0";
|
|
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.
|
|
62
|
+
const VERSION="1.65.0";
|
|
63
63
|
const warned=new Set();
|
|
64
64
|
const WARNED_LIMIT=2000;
|
|
65
65
|
function rememberWarned(key){
|
package/modules/angular.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.
|
|
2
|
+
* Lattice Grid 1.65.0, angular module type declarations
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -9,7 +9,7 @@ import type {
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Build the Angular standalone component and directive from one shared
|
|
12
|
-
* controller
|
|
12
|
+
* controller.
|
|
13
13
|
*
|
|
14
14
|
* The Angular core namespace and `createGrid` are passed in, for the same
|
|
15
15
|
* reason as every other adapter: the package ships no dependencies and cannot
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.
|
|
2
|
+
* Lattice Grid 1.65.0, angular module
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -16,6 +16,403 @@ if(!fn)throw new Error('[lattice] missing module: '+id);
|
|
|
16
16
|
fn(exports,__req);
|
|
17
17
|
return exports;
|
|
18
18
|
}
|
|
19
|
+
__def("packages/core/src/internal/util.js",function(__exports,__req){
|
|
20
|
+
'use strict';
|
|
21
|
+
Object.defineProperty(__exports,"VERSION",{enumerable:true,get:function(){return VERSION;}});
|
|
22
|
+
Object.defineProperty(__exports,"reportedWarnings",{enumerable:true,get:function(){return reportedWarnings;}});
|
|
23
|
+
Object.defineProperty(__exports,"warnOnce",{enumerable:true,get:function(){return warnOnce;}});
|
|
24
|
+
Object.defineProperty(__exports,"infoOnce",{enumerable:true,get:function(){return infoOnce;}});
|
|
25
|
+
Object.defineProperty(__exports,"resetWarnings",{enumerable:true,get:function(){return resetWarnings;}});
|
|
26
|
+
Object.defineProperty(__exports,"fail",{enumerable:true,get:function(){return fail;}});
|
|
27
|
+
Object.defineProperty(__exports,"invariant",{enumerable:true,get:function(){return invariant;}});
|
|
28
|
+
Object.defineProperty(__exports,"DEV",{enumerable:true,get:function(){return DEV;}});
|
|
29
|
+
Object.defineProperty(__exports,"isObject",{enumerable:true,get:function(){return isObject;}});
|
|
30
|
+
Object.defineProperty(__exports,"isFunction",{enumerable:true,get:function(){return isFunction;}});
|
|
31
|
+
Object.defineProperty(__exports,"isNil",{enumerable:true,get:function(){return isNil;}});
|
|
32
|
+
Object.defineProperty(__exports,"isBlank",{enumerable:true,get:function(){return isBlank;}});
|
|
33
|
+
Object.defineProperty(__exports,"isCtor",{enumerable:true,get:function(){return isCtor;}});
|
|
34
|
+
Object.defineProperty(__exports,"pathGetter",{enumerable:true,get:function(){return pathGetter;}});
|
|
35
|
+
Object.defineProperty(__exports,"pathSetter",{enumerable:true,get:function(){return pathSetter;}});
|
|
36
|
+
Object.defineProperty(__exports,"getPath",{enumerable:true,get:function(){return getPath;}});
|
|
37
|
+
Object.defineProperty(__exports,"setPath",{enumerable:true,get:function(){return setPath;}});
|
|
38
|
+
Object.defineProperty(__exports,"humanise",{enumerable:true,get:function(){return humanise;}});
|
|
39
|
+
Object.defineProperty(__exports,"escapeHtml",{enumerable:true,get:function(){return escapeHtml;}});
|
|
40
|
+
Object.defineProperty(__exports,"titleCase",{enumerable:true,get:function(){return titleCase;}});
|
|
41
|
+
Object.defineProperty(__exports,"expand",{enumerable:true,get:function(){return expand;}});
|
|
42
|
+
Object.defineProperty(__exports,"toArray",{enumerable:true,get:function(){return toArray;}});
|
|
43
|
+
Object.defineProperty(__exports,"merge",{enumerable:true,get:function(){return merge;}});
|
|
44
|
+
Object.defineProperty(__exports,"mergeRow",{enumerable:true,get:function(){return mergeRow;}});
|
|
45
|
+
Object.defineProperty(__exports,"Lru",{enumerable:true,get:function(){return Lru;}});
|
|
46
|
+
Object.defineProperty(__exports,"collator",{enumerable:true,get:function(){return collator;}});
|
|
47
|
+
Object.defineProperty(__exports,"defaultCompare",{enumerable:true,get:function(){return defaultCompare;}});
|
|
48
|
+
Object.defineProperty(__exports,"now",{enumerable:true,get:function(){return now;}});
|
|
49
|
+
Object.defineProperty(__exports,"nextFrame",{enumerable:true,get:function(){return nextFrame;}});
|
|
50
|
+
Object.defineProperty(__exports,"cancelFrame",{enumerable:true,get:function(){return cancelFrame;}});
|
|
51
|
+
Object.defineProperty(__exports,"frameBatched",{enumerable:true,get:function(){return frameBatched;}});
|
|
52
|
+
Object.defineProperty(__exports,"settleDebounce",{enumerable:true,get:function(){return settleDebounce;}});
|
|
53
|
+
Object.defineProperty(__exports,"whenIdle",{enumerable:true,get:function(){return whenIdle;}});
|
|
54
|
+
Object.defineProperty(__exports,"uid",{enumerable:true,get:function(){return uid;}});
|
|
55
|
+
const STAMPED_VERSION="1.65.0";
|
|
56
|
+
async function resolveVersion(){
|
|
57
|
+
if(STAMPED_VERSION!=='0.0.0-source')return STAMPED_VERSION;
|
|
58
|
+
return STAMPED_VERSION;
|
|
59
|
+
}
|
|
60
|
+
const VERSION="1.65.0";
|
|
61
|
+
const warned=new Set();
|
|
62
|
+
const WARNED_LIMIT=2000;
|
|
63
|
+
function rememberWarned(key){
|
|
64
|
+
warned.add(key);
|
|
65
|
+
if(warned.size>WARNED_LIMIT){
|
|
66
|
+
const oldest=warned.values().next().value;
|
|
67
|
+
if(oldest!==undefined)warned.delete(oldest);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
const reported=[];
|
|
71
|
+
const REPORT_LIMIT=500;
|
|
72
|
+
function record(key,level,message){
|
|
73
|
+
reported.push({
|
|
74
|
+
key,
|
|
75
|
+
level,
|
|
76
|
+
message:message.map((m)=>(typeof m==='string'?m:safeString(m))).join(' '),
|
|
77
|
+
at:Date.now(),
|
|
78
|
+
});
|
|
79
|
+
if(reported.length>REPORT_LIMIT)reported.shift();
|
|
80
|
+
}
|
|
81
|
+
function safeString(value){
|
|
82
|
+
if(value instanceof Error)return value.message;
|
|
83
|
+
try{return JSON.stringify(value);}catch{return String(value);}
|
|
84
|
+
}
|
|
85
|
+
function reportedWarnings(){return reported.map((r)=>({...r}));}
|
|
86
|
+
function warnOnce(key,...message){
|
|
87
|
+
if(warned.has(key))return;
|
|
88
|
+
rememberWarned(key);
|
|
89
|
+
record(key,'warn',message);
|
|
90
|
+
console.warn('[lattice]',...message);
|
|
91
|
+
}
|
|
92
|
+
function infoOnce(key,...message){
|
|
93
|
+
if(warned.has(key))return;
|
|
94
|
+
rememberWarned(key);
|
|
95
|
+
record(key,'info',message);
|
|
96
|
+
console.info('[lattice]',...message);
|
|
97
|
+
}
|
|
98
|
+
function resetWarnings(){
|
|
99
|
+
warned.clear();
|
|
100
|
+
reported.length=0;
|
|
101
|
+
}
|
|
102
|
+
function fail(message,extra){
|
|
103
|
+
const err=new Error(`[lattice] ${message}`);
|
|
104
|
+
if(extra!==undefined)err.cause=extra;
|
|
105
|
+
throw err;
|
|
106
|
+
}
|
|
107
|
+
function invariant(condition,message){
|
|
108
|
+
if(!condition)fail(message);
|
|
109
|
+
}
|
|
110
|
+
const DEV=(()=>{
|
|
111
|
+
try{
|
|
112
|
+
return!(typeof process!=='undefined'&&process.env
|
|
113
|
+
&&process.env.NODE_ENV==='production');
|
|
114
|
+
}catch{
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
})();
|
|
118
|
+
function isObject(v){
|
|
119
|
+
return v!==null&&typeof v==='object'&&!Array.isArray(v);
|
|
120
|
+
}
|
|
121
|
+
function isFunction(v){
|
|
122
|
+
return typeof v==='function';
|
|
123
|
+
}
|
|
124
|
+
function isNil(v){
|
|
125
|
+
return v===null||v===undefined;
|
|
126
|
+
}
|
|
127
|
+
function isBlank(v){
|
|
128
|
+
return v===null||v===undefined||v==='';
|
|
129
|
+
}
|
|
130
|
+
function isCtor(v){
|
|
131
|
+
if(typeof v!=='function')return false;
|
|
132
|
+
if(/^class[\s{]/.test(Function.prototype.toString.call(v)))return true;
|
|
133
|
+
return!!(v.prototype&&Object.getOwnPropertyNames(v.prototype).length>1);
|
|
134
|
+
}
|
|
135
|
+
const pathCache=new Map();
|
|
136
|
+
function pathGetter(path){
|
|
137
|
+
let fn=pathCache.get(path);
|
|
138
|
+
if(fn)return fn;
|
|
139
|
+
if(!path.includes('.')){
|
|
140
|
+
fn=(o)=>(o==null?undefined:o[path]);
|
|
141
|
+
}else{
|
|
142
|
+
const parts=path.split('.');
|
|
143
|
+
const n=parts.length;
|
|
144
|
+
fn=(o)=>{
|
|
145
|
+
let cur=o;
|
|
146
|
+
for(let i=0;i<n;i++){
|
|
147
|
+
if(cur==null)return undefined;
|
|
148
|
+
cur=cur[parts[i]];
|
|
149
|
+
}
|
|
150
|
+
return cur;
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
pathCache.set(path,fn);
|
|
154
|
+
return fn;
|
|
155
|
+
}
|
|
156
|
+
const setterCache=new Map();
|
|
157
|
+
function pathSetter(path){
|
|
158
|
+
let fn=setterCache.get(path);
|
|
159
|
+
if(fn)return fn;
|
|
160
|
+
if(!path.includes('.')){
|
|
161
|
+
fn=(o,v)=>{if(o!=null)o[path]=v;};
|
|
162
|
+
}else{
|
|
163
|
+
const parts=path.split('.');
|
|
164
|
+
const last=parts.length-1;
|
|
165
|
+
fn=(o,v)=>{
|
|
166
|
+
let cur=o;
|
|
167
|
+
for(let i=0;i<last;i++){
|
|
168
|
+
if(cur==null)return;
|
|
169
|
+
const k=parts[i];
|
|
170
|
+
if(cur[k]==null)cur[k]={};
|
|
171
|
+
cur=cur[k];
|
|
172
|
+
}
|
|
173
|
+
if(cur!=null)cur[parts[last]]=v;
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
setterCache.set(path,fn);
|
|
177
|
+
return fn;
|
|
178
|
+
}
|
|
179
|
+
function getPath(obj,path){
|
|
180
|
+
return pathGetter(path)(obj);
|
|
181
|
+
}
|
|
182
|
+
function setPath(obj,path,value){
|
|
183
|
+
pathSetter(path)(obj,value);
|
|
184
|
+
}
|
|
185
|
+
function humanise(field){
|
|
186
|
+
if(!field)return'';
|
|
187
|
+
const leaf=field.includes('.')?field.slice(field.lastIndexOf('.')+1):field;
|
|
188
|
+
return leaf
|
|
189
|
+
.replace(/[_-]+/g,' ')
|
|
190
|
+
.replace(/([a-z0-9])([A-Z])/g,'$1 $2')
|
|
191
|
+
.replace(/([A-Z]+)([A-Z][a-z])/g,'$1 $2')
|
|
192
|
+
.replace(/\s+/g,' ')
|
|
193
|
+
.trim()
|
|
194
|
+
.replace(/^./,(c)=>c.toUpperCase());
|
|
195
|
+
}
|
|
196
|
+
const ESCAPES={'&':'&','<':'<','>':'>','"':'"',"'":'''};
|
|
197
|
+
function escapeHtml(s){
|
|
198
|
+
const str=s==null?'':String(s);
|
|
199
|
+
return/[&<>"']/.test(str)?str.replace(/[&<>"']/g,(c)=>ESCAPES[c]):str;
|
|
200
|
+
}
|
|
201
|
+
function titleCase(s){
|
|
202
|
+
return String(s).replace(/\w\S*/g,(t)=>t[0].toUpperCase()+t.slice(1).toLowerCase());
|
|
203
|
+
}
|
|
204
|
+
function expand(value,key,whenTrue){
|
|
205
|
+
if(value===undefined)return undefined;
|
|
206
|
+
if(value===true)return{enabled:true,...whenTrue};
|
|
207
|
+
if(value===false)return{enabled:false};
|
|
208
|
+
if(isObject(value))return value;
|
|
209
|
+
return{[key]:value,enabled:true};
|
|
210
|
+
}
|
|
211
|
+
function toArray(v){
|
|
212
|
+
if(v===undefined||v===null)return[];
|
|
213
|
+
return Array.isArray(v)?v:[v];
|
|
214
|
+
}
|
|
215
|
+
const MERGE_FORBIDDEN_KEYS=Object.freeze(new Set(['__proto__','constructor','prototype']));
|
|
216
|
+
function merge(a,b){
|
|
217
|
+
if(!isObject(a))return isObject(b)?{...b}:b;
|
|
218
|
+
if(!isObject(b))return b===undefined?a:b;
|
|
219
|
+
const out={...a};
|
|
220
|
+
for(const k of Object.keys(b)){
|
|
221
|
+
if(MERGE_FORBIDDEN_KEYS.has(k))continue;
|
|
222
|
+
const bv=b[k];
|
|
223
|
+
if(bv===undefined)continue;
|
|
224
|
+
out[k]=isObject(bv)&&isObject(out[k])?merge(out[k],bv):bv;
|
|
225
|
+
}
|
|
226
|
+
return out;
|
|
227
|
+
}
|
|
228
|
+
function mergeRow(previous,patch){
|
|
229
|
+
if(!isObject(previous)||!isObject(patch)||previous===patch)return patch;
|
|
230
|
+
const out=Object.create(Object.getPrototypeOf(previous));
|
|
231
|
+
Object.assign(out,previous,patch);
|
|
232
|
+
return out;
|
|
233
|
+
}
|
|
234
|
+
class Lru{
|
|
235
|
+
#max;
|
|
236
|
+
#map=new Map();
|
|
237
|
+
#onEvict;
|
|
238
|
+
constructor(max=256,onEvict=null){
|
|
239
|
+
this.#max=max;
|
|
240
|
+
this.#onEvict=onEvict;
|
|
241
|
+
}
|
|
242
|
+
get size(){
|
|
243
|
+
return this.#map.size;
|
|
244
|
+
}
|
|
245
|
+
get max(){
|
|
246
|
+
return this.#max;
|
|
247
|
+
}
|
|
248
|
+
set max(v){
|
|
249
|
+
this.#max=v;
|
|
250
|
+
this.#trim();
|
|
251
|
+
}
|
|
252
|
+
has(k){
|
|
253
|
+
return this.#map.has(k);
|
|
254
|
+
}
|
|
255
|
+
get(k){
|
|
256
|
+
const m=this.#map;
|
|
257
|
+
if(!m.has(k))return undefined;
|
|
258
|
+
const v=m.get(k);
|
|
259
|
+
m.delete(k);
|
|
260
|
+
m.set(k,v);
|
|
261
|
+
return v;
|
|
262
|
+
}
|
|
263
|
+
peek(k){
|
|
264
|
+
return this.#map.get(k);
|
|
265
|
+
}
|
|
266
|
+
set(k,v){
|
|
267
|
+
const m=this.#map;
|
|
268
|
+
if(m.has(k))m.delete(k);
|
|
269
|
+
m.set(k,v);
|
|
270
|
+
this.#trim();
|
|
271
|
+
return v;
|
|
272
|
+
}
|
|
273
|
+
delete(k){
|
|
274
|
+
const v=this.#map.get(k);
|
|
275
|
+
if(this.#map.delete(k)&&this.#onEvict)this.#onEvict(v,k);
|
|
276
|
+
return v;
|
|
277
|
+
}
|
|
278
|
+
clear(){
|
|
279
|
+
if(this.#onEvict)for(const[k,v]of this.#map)this.#onEvict(v,k);
|
|
280
|
+
this.#map.clear();
|
|
281
|
+
}
|
|
282
|
+
keys(){
|
|
283
|
+
return this.#map.keys();
|
|
284
|
+
}
|
|
285
|
+
values(){
|
|
286
|
+
return this.#map.values();
|
|
287
|
+
}
|
|
288
|
+
#trim(){
|
|
289
|
+
const m=this.#map;
|
|
290
|
+
while(m.size>this.#max){
|
|
291
|
+
const oldest=m.keys().next().value;
|
|
292
|
+
const v=m.get(oldest);
|
|
293
|
+
m.delete(oldest);
|
|
294
|
+
if(this.#onEvict)this.#onEvict(v,oldest);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
const collators=new Map();
|
|
299
|
+
function collator(locale,opts){
|
|
300
|
+
const key=`${locale||''}|${opts?JSON.stringify(opts):''}`;
|
|
301
|
+
let c=collators.get(key);
|
|
302
|
+
if(!c){
|
|
303
|
+
c=new Intl.Collator(locale||undefined,{
|
|
304
|
+
numeric:true,sensitivity:'variant',...opts,
|
|
305
|
+
});
|
|
306
|
+
collators.set(key,c);
|
|
307
|
+
}
|
|
308
|
+
return c;
|
|
309
|
+
}
|
|
310
|
+
function defaultCompare(a,b){
|
|
311
|
+
if(a===b)return 0;
|
|
312
|
+
if(a===null||a===undefined)return 1;
|
|
313
|
+
if(b===null||b===undefined)return-1;
|
|
314
|
+
if(typeof a==='number'&&typeof b==='number'){
|
|
315
|
+
if(Number.isNaN(a))return Number.isNaN(b)?0:1;
|
|
316
|
+
if(Number.isNaN(b))return-1;
|
|
317
|
+
return a<b?-1:a>b?1:0;
|
|
318
|
+
}
|
|
319
|
+
const sa=String(a);
|
|
320
|
+
const sb=String(b);
|
|
321
|
+
return sa<sb?-1:sa>sb?1:0;
|
|
322
|
+
}
|
|
323
|
+
function now(){
|
|
324
|
+
return typeof performance!=='undefined'&&performance.now
|
|
325
|
+
?performance.now()
|
|
326
|
+
:Date.now();
|
|
327
|
+
}
|
|
328
|
+
const hasRaf=typeof requestAnimationFrame==='function';
|
|
329
|
+
function nextFrame(fn){
|
|
330
|
+
if(hasRaf)return requestAnimationFrame(fn);
|
|
331
|
+
return setTimeout(()=>fn(now()),16);
|
|
332
|
+
}
|
|
333
|
+
function cancelFrame(handle){
|
|
334
|
+
if(handle==null)return;
|
|
335
|
+
if(hasRaf)cancelAnimationFrame(handle);
|
|
336
|
+
else clearTimeout(handle);
|
|
337
|
+
}
|
|
338
|
+
function frameBatched(fn){
|
|
339
|
+
let handle=null;
|
|
340
|
+
let lastArgs=null;
|
|
341
|
+
const run=()=>{
|
|
342
|
+
handle=null;
|
|
343
|
+
const a=lastArgs;
|
|
344
|
+
lastArgs=null;
|
|
345
|
+
fn(...(a||[]));
|
|
346
|
+
};
|
|
347
|
+
const wrapped=(...args)=>{
|
|
348
|
+
lastArgs=args;
|
|
349
|
+
if(handle===null)handle=nextFrame(run);
|
|
350
|
+
};
|
|
351
|
+
wrapped.cancel=()=>{
|
|
352
|
+
cancelFrame(handle);
|
|
353
|
+
handle=null;
|
|
354
|
+
lastArgs=null;
|
|
355
|
+
};
|
|
356
|
+
wrapped.flush=()=>{
|
|
357
|
+
if(handle!==null){
|
|
358
|
+
cancelFrame(handle);
|
|
359
|
+
run();
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
return wrapped;
|
|
363
|
+
}
|
|
364
|
+
function settleDebounce(fn,waitMs){
|
|
365
|
+
let timer=null;
|
|
366
|
+
let held=null;
|
|
367
|
+
const trailing=()=>{
|
|
368
|
+
timer=null;
|
|
369
|
+
if(held===null)return;
|
|
370
|
+
const args=held;
|
|
371
|
+
held=null;
|
|
372
|
+
fn(...args);
|
|
373
|
+
arm();
|
|
374
|
+
};
|
|
375
|
+
const arm=()=>{
|
|
376
|
+
timer=setTimeout(trailing,waitMs);
|
|
377
|
+
if(typeof timer?.unref==='function')timer.unref();
|
|
378
|
+
};
|
|
379
|
+
const wrapped=(...args)=>{
|
|
380
|
+
if(timer===null){
|
|
381
|
+
fn(...args);
|
|
382
|
+
arm();
|
|
383
|
+
}else{
|
|
384
|
+
held=args;
|
|
385
|
+
clearTimeout(timer);
|
|
386
|
+
arm();
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
wrapped.flush=()=>{
|
|
390
|
+
if(timer!==null)clearTimeout(timer);
|
|
391
|
+
timer=null;
|
|
392
|
+
if(held===null)return;
|
|
393
|
+
const args=held;
|
|
394
|
+
held=null;
|
|
395
|
+
fn(...args);
|
|
396
|
+
};
|
|
397
|
+
wrapped.cancel=()=>{
|
|
398
|
+
if(timer!==null)clearTimeout(timer);
|
|
399
|
+
timer=null;
|
|
400
|
+
held=null;
|
|
401
|
+
};
|
|
402
|
+
wrapped.pending=()=>timer!==null||held!==null;
|
|
403
|
+
return wrapped;
|
|
404
|
+
}
|
|
405
|
+
function whenIdle(fn,timeout=50){
|
|
406
|
+
if(typeof requestIdleCallback==='function'){
|
|
407
|
+
return requestIdleCallback(fn,{timeout});
|
|
408
|
+
}
|
|
409
|
+
return setTimeout(()=>fn({timeRemaining:()=>0,didTimeout:true}),1);
|
|
410
|
+
}
|
|
411
|
+
let idSeq=0;
|
|
412
|
+
function uid(prefix='l'){
|
|
413
|
+
return`${prefix}${(++idSeq).toString(36)}`;
|
|
414
|
+
}
|
|
415
|
+
});
|
|
19
416
|
__def("packages/modules/shared/adapter.js",function(__exports,__req){
|
|
20
417
|
'use strict';
|
|
21
418
|
Object.defineProperty(__exports,"EVENT_NAMES",{enumerable:true,get:function(){return EVENT_NAMES;}});
|
|
@@ -176,15 +573,23 @@ Object.defineProperty(__exports,"EVENT_NAMES",{enumerable:true,get:function(){re
|
|
|
176
573
|
Object.defineProperty(__exports,"dashedName",{enumerable:true,get:function(){return dashedName;}});
|
|
177
574
|
Object.defineProperty(__exports,"createLatticeGrid",{enumerable:true,get:function(){return createLatticeGrid;}});
|
|
178
575
|
Object.defineProperty(__exports,"default",{enumerable:true,get:function(){return __default;}});
|
|
179
|
-
const __m0=__req("packages/
|
|
180
|
-
const
|
|
181
|
-
const
|
|
182
|
-
const
|
|
183
|
-
const
|
|
576
|
+
const __m0=__req("packages/core/src/internal/util.js");
|
|
577
|
+
const warnOnce=__m0["warnOnce"];
|
|
578
|
+
const __m1=__req("packages/modules/shared/adapter.js");
|
|
579
|
+
const createGridController=__m1["createGridController"];
|
|
580
|
+
const EVENT_NAMES=__m1["EVENT_NAMES"];
|
|
581
|
+
const dashedName=__m1["dashedName"];
|
|
582
|
+
const handlerName=__m1["handlerName"];
|
|
184
583
|
const IMPERATIVE_INPUTS=Object.freeze(['sort','filters','quickFilter','selectedKeys']);
|
|
185
584
|
function emitterKey(event){
|
|
186
585
|
return String(event).replace(/:/g,'_');
|
|
187
586
|
}
|
|
587
|
+
function canCompileAtRuntime(ng){
|
|
588
|
+
const real=typeof((ng))['\u0275\u0275defineComponent']==='function';
|
|
589
|
+
if(!real)return true;
|
|
590
|
+
const globals=(globalThis);
|
|
591
|
+
return!!(globals.ng&&globals.ng['\u0275compilerFacade']);
|
|
592
|
+
}
|
|
188
593
|
function createLatticeGrid(deps){
|
|
189
594
|
const ng=deps&&deps.ng;
|
|
190
595
|
const createGrid=deps&&deps.createGrid;
|
|
@@ -196,6 +601,18 @@ throw new TypeError('createLatticeGrid needs the Angular core namespace: createL
|
|
|
196
601
|
if(typeof createGrid!=='function'){
|
|
197
602
|
throw new TypeError('createLatticeGrid needs createGrid: createLatticeGrid({ ng, createGrid }).');
|
|
198
603
|
}
|
|
604
|
+
warnOnce('angular.deprecated',
|
|
605
|
+
'modules/angular is deprecated: it needs the JIT compiler. '
|
|
606
|
+
+'Use @toclocoinc/lattice-grid-angular.');
|
|
607
|
+
if(!canCompileAtRuntime(ng)){
|
|
608
|
+
throw new Error(
|
|
609
|
+
'[lattice] modules/angular builds its component at run time, which needs Angular\'s JIT '
|
|
610
|
+
+'compiler, and this page has none — which is what a production (AOT) build looks like. '
|
|
611
|
+
+'Install @toclocoinc/lattice-grid-angular, an ahead-of-time Angular library that needs no '
|
|
612
|
+
+"compiler: import { LatticeGridComponent, provideLattice } from "
|
|
613
|
+
+"'@toclocoinc/lattice-grid-angular'. (To keep using this adapter, import "
|
|
614
|
+
+"'@angular/compiler' before it — a development-server shape, not a production one.)");
|
|
615
|
+
}
|
|
199
616
|
const{
|
|
200
617
|
Component,Directive,Input,Output,EventEmitter,ElementRef,inject,
|
|
201
618
|
}=ng;
|
|
@@ -240,7 +657,7 @@ this.__controller=null;
|
|
|
240
657
|
}
|
|
241
658
|
},
|
|
242
659
|
};
|
|
243
|
-
const build=(cls,classDecorator)=>{
|
|
660
|
+
const build=(cls,classDecorator,configAlias)=>{
|
|
244
661
|
const proto=cls.prototype;
|
|
245
662
|
Object.assign(proto,lifecycle);
|
|
246
663
|
Object.defineProperty(proto,'grid',{
|
|
@@ -248,6 +665,14 @@ get(){return this.__controller?this.__controller.grid:null;},
|
|
|
248
665
|
configurable:true,
|
|
249
666
|
});
|
|
250
667
|
Input()(proto,'config');
|
|
668
|
+
if(configAlias){
|
|
669
|
+
Object.defineProperty(proto,configAlias,{
|
|
670
|
+
set(value){if(value!=='')this.config=value;},
|
|
671
|
+
get(){return this.config;},
|
|
672
|
+
configurable:true,
|
|
673
|
+
});
|
|
674
|
+
Input()(proto,configAlias);
|
|
675
|
+
}
|
|
251
676
|
for(const key of IMPERATIVE_INPUTS)Input()(proto,key);
|
|
252
677
|
for(const name of EVENT_NAMES)Output(dashedName(name))(proto,emitterKey(name));
|
|
253
678
|
const decorated=classDecorator(cls);
|
|
@@ -264,6 +689,7 @@ class LatticeGridDirective{
|
|
|
264
689
|
constructor(){init(this);}
|
|
265
690
|
},
|
|
266
691
|
Directive({selector:'[latticeGrid]',standalone:true}),
|
|
692
|
+
'latticeGrid',
|
|
267
693
|
);
|
|
268
694
|
return{LatticeGridComponent,LatticeGridDirective};
|
|
269
695
|
}
|