@toclocoinc/lattice-grid 1.58.0 → 1.60.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 -3
- package/docs/API.html +1773 -73
- package/docs/api-detail.html +321 -5
- package/lattice-grid.d.ts +281 -2842
- package/lattice-grid.esm.min.js +879 -148
- package/lattice-grid.min.cjs +879 -148
- package/lattice-grid.min.css +1 -1
- package/lattice-grid.min.js +879 -148
- package/modules/ai.d.ts +401 -0
- package/modules/ai.esm.min.js +25 -6
- package/modules/ai.min.cjs +25 -6
- package/modules/ai.min.js +25 -6
- package/modules/angular.d.ts +31 -0
- package/modules/angular.esm.min.js +3 -2
- package/modules/angular.min.cjs +3 -2
- package/modules/angular.min.js +3 -2
- package/modules/chart-alluvial.d.ts +18 -0
- package/modules/chart-alluvial.esm.min.js +1 -1
- package/modules/chart-arc.d.ts +18 -0
- package/modules/chart-arc.esm.min.js +1 -1
- package/modules/chart-bubblemap.d.ts +18 -0
- package/modules/chart-bubblemap.esm.min.js +1 -1
- package/modules/chart-bump.d.ts +12 -0
- package/modules/chart-bump.esm.min.js +1 -1
- package/modules/chart-calendar.d.ts +12 -0
- package/modules/chart-calendar.esm.min.js +1 -1
- package/modules/chart-decomposition.d.ts +20 -0
- package/modules/chart-decomposition.esm.min.js +1 -1
- package/modules/chart-diverging.d.ts +12 -0
- package/modules/chart-diverging.esm.min.js +1 -1
- package/modules/chart-dumbbell.d.ts +18 -0
- package/modules/chart-dumbbell.esm.min.js +1 -1
- package/modules/chart-fan.d.ts +18 -0
- package/modules/chart-fan.esm.min.js +1 -1
- package/modules/chart-hexbin.d.ts +18 -0
- package/modules/chart-hexbin.esm.min.js +1 -1
- package/modules/chart-hexmap.d.ts +18 -0
- package/modules/chart-hexmap.esm.min.js +1 -1
- package/modules/chart-icicle.d.ts +12 -0
- package/modules/chart-icicle.esm.min.js +1 -1
- package/modules/chart-parallel.d.ts +19 -0
- package/modules/chart-parallel.esm.min.js +1 -1
- package/modules/chart-ridgeline.d.ts +14 -0
- package/modules/chart-ridgeline.esm.min.js +1 -1
- package/modules/chart-roc.d.ts +20 -0
- package/modules/chart-roc.esm.min.js +1 -1
- package/modules/chart-slope.d.ts +12 -0
- package/modules/chart-slope.esm.min.js +1 -1
- package/modules/chart-splom.d.ts +19 -0
- package/modules/chart-splom.esm.min.js +1 -1
- package/modules/chart-waffle.d.ts +12 -0
- package/modules/chart-waffle.esm.min.js +1 -1
- package/modules/charts.d.ts +122 -0
- package/modules/charts.esm.min.js +4 -4
- package/modules/charts.min.cjs +4 -4
- package/modules/charts.min.js +4 -4
- package/modules/data-router.d.ts +91 -0
- package/modules/data-router.esm.min.js +109 -17
- package/modules/data-router.min.cjs +109 -17
- package/modules/data-router.min.js +109 -17
- package/modules/devtools.d.ts +28 -0
- package/modules/devtools.esm.min.js +2 -2
- package/modules/devtools.min.cjs +2 -2
- package/modules/devtools.min.js +2 -2
- package/modules/dhtmlx-compat.d.ts +19 -0
- package/modules/dhtmlx-compat.esm.min.js +4 -4
- package/modules/dhtmlx-compat.min.cjs +4 -4
- package/modules/dhtmlx-compat.min.js +4 -4
- package/modules/gantt.d.ts +515 -0
- package/modules/gantt.esm.min.js +109 -33
- package/modules/gantt.min.cjs +109 -33
- package/modules/gantt.min.js +109 -33
- package/modules/htmx.d.ts +176 -0
- package/modules/htmx.esm.min.js +879 -148
- package/modules/htmx.min.cjs +879 -148
- package/modules/htmx.min.js +879 -148
- package/modules/kanban.d.ts +492 -0
- package/modules/kanban.esm.min.js +4 -4
- package/modules/kanban.min.cjs +4 -4
- package/modules/kanban.min.js +4 -4
- package/modules/kpi.d.ts +255 -0
- package/modules/kpi.esm.min.js +40 -7
- package/modules/kpi.min.cjs +40 -7
- package/modules/kpi.min.js +40 -7
- package/modules/layout.d.ts +332 -0
- package/modules/layout.esm.min.js +59 -6
- package/modules/layout.min.cjs +59 -6
- package/modules/layout.min.js +59 -6
- package/modules/mock-socket.d.ts +114 -0
- package/modules/mock-socket.esm.min.js +2 -2
- package/modules/mock-socket.min.cjs +2 -2
- package/modules/mock-socket.min.js +2 -2
- package/modules/react.d.ts +25 -0
- package/modules/react.esm.min.js +3 -2
- package/modules/react.min.cjs +3 -2
- package/modules/react.min.js +3 -2
- package/modules/svelte.d.ts +26 -0
- package/modules/svelte.esm.min.js +3 -2
- package/modules/svelte.min.cjs +3 -2
- package/modules/svelte.min.js +3 -2
- package/modules/tabs.d.ts +133 -0
- package/modules/tabs.esm.min.js +411 -9
- package/modules/tabs.min.cjs +411 -9
- package/modules/tabs.min.js +411 -9
- package/modules/vue.d.ts +24 -0
- package/modules/vue.esm.min.js +3 -2
- package/modules/vue.min.cjs +3 -2
- package/modules/vue.min.js +3 -2
- package/modules/webcomponent.d.ts +47 -0
- package/modules/webcomponent.esm.min.js +879 -148
- package/modules/webcomponent.min.cjs +879 -148
- package/modules/webcomponent.min.js +879 -148
- package/package.json +2 -2
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Lattice Grid 1.60.0, data-router module type declarations
|
|
3
|
+
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
|
+
* https://latticegrid.dev
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A record routed through a data router: any object. Its partition comes from
|
|
8
|
+
* the router's `key` and its identity within a grid from `rowKey`.
|
|
9
|
+
*/
|
|
10
|
+
type RouterRecord = Record<string, unknown>;
|
|
11
|
+
|
|
12
|
+
/** A per-route diff summary returned by `load`. */
|
|
13
|
+
interface RouteDiff { added: number; updated: number; removed: number }
|
|
14
|
+
|
|
15
|
+
/** A predicate: a property value (`row[key] === value`) or a `fn(row)`. */
|
|
16
|
+
type RoutePredicate = unknown | ((row: RouterRecord) => boolean);
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Per-route reshaping options (v3, BACKLOG-0000887): `transform` maps/renames/
|
|
20
|
+
* derives each row before the grid sees it; `filter` gives the grid only the
|
|
21
|
+
* rows it admits; `sort` (a comparator or `{ key, dir }`) orders what the grid
|
|
22
|
+
* receives. `rowKey` overrides the router default. All optional.
|
|
23
|
+
*/
|
|
24
|
+
interface RouteOptions {
|
|
25
|
+
rowKey?: (string | ((row: RouterRecord) => unknown));
|
|
26
|
+
transform?: (row: RouterRecord) => RouterRecord;
|
|
27
|
+
filter?: (row: RouterRecord) => boolean;
|
|
28
|
+
sort?: (((a: RouterRecord, b: RouterRecord) => number) | { key: string; dir?: 'asc' | 'desc' });
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* A cross-grid selection relation (v2, BACKLOG-0000880): a key map (target
|
|
33
|
+
* rows whose `to` value is among the selected source rows' `from` values — an
|
|
34
|
+
* IN set), or a function handed the selected source rows that returns a
|
|
35
|
+
* target-row predicate.
|
|
36
|
+
*/
|
|
37
|
+
type SelectionRelation =
|
|
38
|
+
| { from: string; to: string }
|
|
39
|
+
| ((selected: RouterRecord[]) => ((row: RouterRecord) => boolean));
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* A data router: one arriving stream, partitioned by a property (or composite
|
|
43
|
+
* predicate), fanned out to a grid per partition (BACKLOG-0000879). Each grid
|
|
44
|
+
* sees only its slice, updated by keyed diff through the public
|
|
45
|
+
* `grid.rows.apply` path — no grid-core change, no cross-references between
|
|
46
|
+
* grids. Snapshots apply keyed diffs (unchanged rows never repaint); deltas add,
|
|
47
|
+
* update or remove in place by `rowKey`, preserving selection and scroll.
|
|
48
|
+
*/
|
|
49
|
+
interface DataRouter {
|
|
50
|
+
/** Attach a grid behind a predicate; `opts` may reshape/filter/sort the route (v3). */
|
|
51
|
+
attach(grid: unknown, predicate: RoutePredicate, opts?: RouteOptions): DataRouter;
|
|
52
|
+
/** Attach the "rest" sink for records no explicit route matched. */
|
|
53
|
+
attachDefault(grid: unknown, opts?: RouteOptions): DataRouter;
|
|
54
|
+
/** Detach a grid; the host still owns and destroys it. */
|
|
55
|
+
detach(grid: unknown): DataRouter;
|
|
56
|
+
/** Apply a full snapshot as a keyed diff per grid; returns per-route counts. */
|
|
57
|
+
load(snapshot: RouterRecord[]): RouteDiff[];
|
|
58
|
+
/** Apply incremental deltas, routed and applied in place by `rowKey`. */
|
|
59
|
+
apply(deltas: { op: 'upsert' | 'delete'; row: RouterRecord }[]): void;
|
|
60
|
+
/**
|
|
61
|
+
* Link a source grid's selection to what a target grid receives (v2,
|
|
62
|
+
* BACKLOG-0000880): the target shows the subset of its partition the
|
|
63
|
+
* `relation` admits, re-pushed through the keyed-diff path. No selection
|
|
64
|
+
* shows the full partition; changes are debounced.
|
|
65
|
+
*/
|
|
66
|
+
link(source: unknown, target: unknown, relation: SelectionRelation): DataRouter;
|
|
67
|
+
/** Apply any debounced selection refilter synchronously (for tests/determinism). */
|
|
68
|
+
flush(): DataRouter;
|
|
69
|
+
/** How many records matched no route. */
|
|
70
|
+
readonly unrouted: number;
|
|
71
|
+
/** Detach every grid and drop every link (the host destroys the grids themselves). */
|
|
72
|
+
destroy(): void;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Create a data router that partitions one stream to many grids.
|
|
77
|
+
*
|
|
78
|
+
* `key` is the partition property or `fn(row)`; `rowKey` is the identity within
|
|
79
|
+
* a grid; `overlap` fans a record to every matching route (default: first match
|
|
80
|
+
* wins); `onUnrouted` receives records that match none; `selectionDebounce` is
|
|
81
|
+
* the debounce in ms for cross-grid selection refilters (default 16; `0` is
|
|
82
|
+
* synchronous).
|
|
83
|
+
*/
|
|
84
|
+
export function createDataRouter(opts: {
|
|
85
|
+
key: (string | ((row: RouterRecord) => unknown));
|
|
86
|
+
rowKey?: (string | ((row: RouterRecord) => unknown));
|
|
87
|
+
overlap?: boolean;
|
|
88
|
+
onUnrouted?: (item: unknown) => void;
|
|
89
|
+
selectionDebounce?: number;
|
|
90
|
+
}): DataRouter;
|
|
91
|
+
export default createDataRouter;
|