@toclocoinc/lattice-grid 1.65.0 → 1.66.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 +6 -4
- package/angular/LICENSE +111 -0
- package/angular/README.md +78 -0
- package/angular/fesm2022/toclocoinc-lattice-grid-angular.mjs +2843 -0
- package/angular/package.json +16 -0
- package/angular/types/toclocoinc-lattice-grid-angular.d.ts +1366 -0
- package/docs/API.html +675 -14
- package/docs/api-detail.html +137 -4
- package/lattice-grid.d.ts +1 -1
- package/lattice-grid.esm.min.js +18 -6
- package/lattice-grid.min.cjs +18 -6
- package/lattice-grid.min.css +1 -1
- package/lattice-grid.min.js +18 -6
- package/modules/ai.d.ts +1 -1
- 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 +7 -7
- package/modules/angular.min.cjs +7 -7
- package/modules/angular.min.js +7 -7
- 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 +1 -1
- package/modules/charts.esm.min.js +261 -48
- package/modules/charts.min.cjs +261 -48
- package/modules/charts.min.js +261 -48
- package/modules/data-router.d.ts +1 -1
- 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 +1 -1
- 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 +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 +18 -6
- package/modules/htmx.min.cjs +18 -6
- package/modules/htmx.min.js +18 -6
- package/modules/kanban.d.ts +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -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 +251 -2
- package/modules/svelte.esm.min.js +960 -6
- package/modules/svelte.min.cjs +942 -5
- package/modules/svelte.min.js +942 -5
- package/modules/tabs.d.ts +1 -1
- 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 +398 -9
- package/modules/vue.esm.min.js +1163 -31
- package/modules/vue.min.cjs +1147 -30
- package/modules/vue.min.js +1147 -30
- package/modules/webcomponent.d.ts +233 -1
- package/modules/webcomponent.esm.min.js +1266 -37
- package/modules/webcomponent.min.cjs +1248 -37
- package/modules/webcomponent.min.js +1248 -37
- package/package.json +27 -2
- package/svelte/Chart.svelte +34 -0
- package/svelte/Gantt.svelte +34 -0
- package/svelte/Grid.svelte +30 -0
- package/svelte/GridProvider.svelte +13 -0
- package/svelte/KPI.svelte +34 -0
- package/svelte/Kanban.svelte +34 -0
- package/svelte/Layout.svelte +34 -0
- package/svelte/Router.svelte +16 -0
- package/svelte/Tabs.svelte +53 -0
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.
|
|
2
|
+
* Lattice Grid 1.66.0, webcomponent module type declarations
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
6
6
|
import type {
|
|
7
|
+
Column,
|
|
7
8
|
Grid,
|
|
8
9
|
GridConfig,
|
|
10
|
+
Row,
|
|
9
11
|
createCurrencyType,
|
|
12
|
+
createGrid,
|
|
10
13
|
createStat,
|
|
11
14
|
createUnitType,
|
|
12
15
|
registerUnitSystem,
|
|
@@ -44,4 +47,233 @@ export class GridElementController {}
|
|
|
44
47
|
// element's registry rather than a second copy's. Typed by
|
|
45
48
|
// reference to the base package.
|
|
46
49
|
export { createCurrencyType, createUnitType, registerUnitSystem, createStat } from '../lattice-grid.js';
|
|
50
|
+
|
|
51
|
+
/* ---------------------------------------------------------------- */
|
|
52
|
+
/* v2: one element per viewer */
|
|
53
|
+
/* ---------------------------------------------------------------- */
|
|
54
|
+
|
|
55
|
+
/** The `detail` of `grid-ready` and `grid-destroyed` on `<lattice-grid>`. */
|
|
56
|
+
export interface LatticeGridEventDetail { grid: Grid }
|
|
57
|
+
|
|
58
|
+
/** The `detail` of `ready` and `destroyed` on every viewer element. */
|
|
59
|
+
export interface LatticeViewerEventDetail<Instance = unknown> { instance: Instance }
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* `<lattice-grid>`.
|
|
63
|
+
*
|
|
64
|
+
* Structures are properties, scalars are the attributes in the table above,
|
|
65
|
+
* and `config` merges anything without an attribute of its own. Instance
|
|
66
|
+
* events arrive as `CustomEvent`s named `lattice-` plus the event name with
|
|
67
|
+
* colons hyphenated; `grid-ready` and `grid-destroyed` are this adapter's own
|
|
68
|
+
* and carry {@link LatticeGridEventDetail}.
|
|
69
|
+
*/
|
|
70
|
+
export interface LatticeGridElement<Row = any> extends HTMLElement {
|
|
71
|
+
/** Every attribute in the table above is also a property of the same name. */
|
|
72
|
+
theme: string | undefined;
|
|
73
|
+
density: string | undefined;
|
|
74
|
+
locale: string | undefined;
|
|
75
|
+
rowKey: string | undefined;
|
|
76
|
+
rowHeight: number | undefined;
|
|
77
|
+
headerHeight: number | undefined;
|
|
78
|
+
autoHeight: boolean | undefined;
|
|
79
|
+
selection: string | undefined;
|
|
80
|
+
/** The live grid, or null while the element is disconnected. */
|
|
81
|
+
readonly grid: Grid | null;
|
|
82
|
+
/** The live grid, under the name every viewer element uses. */
|
|
83
|
+
readonly instance: Grid | null;
|
|
84
|
+
/** The row data. */
|
|
85
|
+
rows: Row[];
|
|
86
|
+
/** The column definitions. */
|
|
87
|
+
columns: Column[];
|
|
88
|
+
/** Any configuration without an attribute of its own; merged, not replaced. */
|
|
89
|
+
config: GridConfig;
|
|
90
|
+
/**
|
|
91
|
+
* Named row predicates, registered through `grid.filters.where` — they
|
|
92
|
+
* compose with whatever filter the reader has set, unlike `filters`.
|
|
93
|
+
*/
|
|
94
|
+
predicates: Record<string, ((row: Row) => boolean) | null> | undefined;
|
|
95
|
+
/** A keyed diff applied straight to `grid.rows.apply()`. */
|
|
96
|
+
rowUpdates: { add?: Row[]; update?: Row[]; remove?: unknown[] } | undefined;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** What every viewer element carries. */
|
|
100
|
+
export interface LatticeViewerElement<Instance = unknown> extends HTMLElement {
|
|
101
|
+
/**
|
|
102
|
+
* The live viewer, or null before it is built.
|
|
103
|
+
*
|
|
104
|
+
* Every configuration key below is also a property, and an attribute of the
|
|
105
|
+
* same name is the same key. A key none of these interfaces declares works
|
|
106
|
+
* as a property too — the element adopts it — but is written through
|
|
107
|
+
* `config` where the declarations are the contract.
|
|
108
|
+
*/
|
|
109
|
+
readonly instance: Instance | null;
|
|
110
|
+
/** The grid this viewer is built against, when it is given one directly. */
|
|
111
|
+
grid: unknown;
|
|
112
|
+
/** Which published grid to bind to; the `grid-name` attribute in markup. */
|
|
113
|
+
gridName: string | undefined;
|
|
114
|
+
/** Any configuration without a property of its own; merged, not replaced. */
|
|
115
|
+
config: Record<string, unknown>;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* `<lattice-kpi>`.
|
|
120
|
+
*
|
|
121
|
+
* Grid-bound by default, and it **waits** for its grid rather than mounting
|
|
122
|
+
* empty; give it `rows` for a standalone panel.
|
|
123
|
+
*/
|
|
124
|
+
export interface LatticeKPIElement<Row = any> extends LatticeViewerElement {
|
|
125
|
+
tiles: unknown[];
|
|
126
|
+
rows: Row[];
|
|
127
|
+
columns: number | undefined;
|
|
128
|
+
rowKey: string | undefined;
|
|
129
|
+
locale: string | undefined;
|
|
130
|
+
theme: string | undefined;
|
|
131
|
+
density: string | undefined;
|
|
132
|
+
format: unknown;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/** `<lattice-chart>`. Always drawn from a grid, so it waits for one. */
|
|
136
|
+
export interface LatticeChartElement extends LatticeViewerElement {
|
|
137
|
+
shapes: unknown;
|
|
138
|
+
series: unknown;
|
|
139
|
+
data: unknown;
|
|
140
|
+
formatting: unknown;
|
|
141
|
+
type: string | undefined;
|
|
142
|
+
x: string | undefined;
|
|
143
|
+
y: string | string[] | undefined;
|
|
144
|
+
value: string | undefined;
|
|
145
|
+
label: string | undefined;
|
|
146
|
+
lon: string | undefined;
|
|
147
|
+
lat: string | undefined;
|
|
148
|
+
labels: boolean | undefined;
|
|
149
|
+
stacked: boolean | undefined;
|
|
150
|
+
horizontal: boolean | undefined;
|
|
151
|
+
scheme: string | undefined;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/** `<lattice-kanban>`. Grid-bound like the KPI panel; give it `rows` to stand alone. */
|
|
155
|
+
export interface LatticeKanbanElement<Row = any> extends LatticeViewerElement {
|
|
156
|
+
rows: Row[];
|
|
157
|
+
columns: unknown[];
|
|
158
|
+
card: unknown;
|
|
159
|
+
facets: unknown;
|
|
160
|
+
rowKey: string | undefined;
|
|
161
|
+
columnProperty: string | undefined;
|
|
162
|
+
titleProperty: string | undefined;
|
|
163
|
+
swimlanes: boolean | undefined;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/** `<lattice-gantt>`. */
|
|
167
|
+
export interface LatticeGanttElement extends LatticeViewerElement {
|
|
168
|
+
tasks: unknown[];
|
|
169
|
+
dependencies: unknown[];
|
|
170
|
+
resources: unknown;
|
|
171
|
+
calendar: unknown;
|
|
172
|
+
columns: unknown;
|
|
173
|
+
rowKey: string | undefined;
|
|
174
|
+
scale: string | undefined;
|
|
175
|
+
autoSchedule: boolean | undefined;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/** `<lattice-layout>`. */
|
|
179
|
+
export interface LatticeLayoutElement extends LatticeViewerElement {
|
|
180
|
+
windows: unknown[];
|
|
181
|
+
columns: number | undefined;
|
|
182
|
+
rows: number | undefined;
|
|
183
|
+
compact: string | undefined;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* `<lattice-tabs>`. A tab's content is a `<template data-tab="‹id›">` child,
|
|
188
|
+
* cloned into the panel the module creates for it; a tab with no template is
|
|
189
|
+
* left to the module.
|
|
190
|
+
*/
|
|
191
|
+
export interface LatticeTabsElement extends LatticeViewerElement {
|
|
192
|
+
tabs: unknown[];
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* `<lattice-router>`. Owns a Data Router for the life of the element, built
|
|
197
|
+
* by the first `<lattice-grid route="…">` beneath it.
|
|
198
|
+
*/
|
|
199
|
+
export interface LatticeRouterElement extends HTMLElement {
|
|
200
|
+
/** The live router, or null until something routes. */
|
|
201
|
+
readonly router: unknown;
|
|
202
|
+
/** The live router, under the name every viewer element uses. */
|
|
203
|
+
readonly instance: unknown;
|
|
204
|
+
/** The router configuration; read once, when the router is built. */
|
|
205
|
+
config: Record<string, unknown>;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/** The tag each viewer is registered under, before the prefix is applied. */
|
|
209
|
+
export const ELEMENT_TAGS: Readonly<Record<string, string>>;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Build the element classes for whichever Lattice factories are supplied.
|
|
213
|
+
* Nothing is imported by this module, so a page that draws no charts never
|
|
214
|
+
* loads the charts bundle. Returns an empty object where there is no DOM.
|
|
215
|
+
*/
|
|
216
|
+
export function createLatticeElements(deps?: {
|
|
217
|
+
createGrid?: Function;
|
|
218
|
+
createKPI?: Function;
|
|
219
|
+
createChart?: Function;
|
|
220
|
+
createKanban?: Function;
|
|
221
|
+
createGantt?: Function;
|
|
222
|
+
createLayout?: Function;
|
|
223
|
+
createTabs?: Function;
|
|
224
|
+
createDataRouter?: Function;
|
|
225
|
+
}): Record<string, CustomElementConstructor>;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Register every element the supplied factories can build, under `prefix`
|
|
229
|
+
* (`lattice-` by default). Safe to call twice: an already-registered tag is
|
|
230
|
+
* handed back rather than re-defined. Returns tag name → class.
|
|
231
|
+
*/
|
|
232
|
+
export function defineLatticeElements(opts?: {
|
|
233
|
+
prefix?: string;
|
|
234
|
+
createGrid?: Function;
|
|
235
|
+
createKPI?: Function;
|
|
236
|
+
createChart?: Function;
|
|
237
|
+
createKanban?: Function;
|
|
238
|
+
createGantt?: Function;
|
|
239
|
+
createLayout?: Function;
|
|
240
|
+
createTabs?: Function;
|
|
241
|
+
createDataRouter?: Function;
|
|
242
|
+
}): Record<string, CustomElementConstructor>;
|
|
243
|
+
|
|
244
|
+
/** Build the `<lattice-kpi>` class without registering it. */
|
|
245
|
+
export function createLatticeKPIElement(deps: { createKPI: Function }): CustomElementConstructor | null;
|
|
246
|
+
/** Build the `<lattice-chart>` class without registering it. */
|
|
247
|
+
export function createLatticeChartElement(deps: { createChart: Function }): CustomElementConstructor | null;
|
|
248
|
+
/** Build the `<lattice-kanban>` class without registering it. */
|
|
249
|
+
export function createLatticeKanbanElement(deps: { createKanban: Function }): CustomElementConstructor | null;
|
|
250
|
+
/** Build the `<lattice-gantt>` class without registering it. */
|
|
251
|
+
export function createLatticeGanttElement(deps: { createGantt: Function }): CustomElementConstructor | null;
|
|
252
|
+
/** Build the `<lattice-layout>` class without registering it. */
|
|
253
|
+
export function createLatticeLayoutElement(deps: { createLayout: Function }): CustomElementConstructor | null;
|
|
254
|
+
/** Build the `<lattice-tabs>` class without registering it. */
|
|
255
|
+
export function createLatticeTabsElement(deps: { createTabs: Function; createGrid?: Function }): CustomElementConstructor | null;
|
|
256
|
+
/** Build the `<lattice-router>` class without registering it. */
|
|
257
|
+
export function createLatticeRouterElement(deps: { createDataRouter: Function }): CustomElementConstructor | null;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Make a shadow root see Lattice's styles, and keep it seeing them.
|
|
261
|
+
*
|
|
262
|
+
* The theme, each module's injected sheet and the grid's *growing* generated
|
|
263
|
+
* sheet are mirrored into the root as constructable stylesheets and kept
|
|
264
|
+
* level with their sources. A sheet that cannot be read as text — a
|
|
265
|
+
* cross-origin `<link>`, or one carrying `@import` — is cloned into the root
|
|
266
|
+
* instead. Idempotent per root; the returned function undoes exactly this
|
|
267
|
+
* call. Every element here calls it for itself on connect, so this is for a
|
|
268
|
+
* host that mounts Lattice inside its own shadow root by other means.
|
|
269
|
+
*/
|
|
270
|
+
export function adoptLatticeStyles(root: ShadowRoot | Document, opts?: { document?: Document }): () => void;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Lattice's stylesheets as constructed `CSSStyleSheet`s, for a host that
|
|
274
|
+
* manages its own `adoptedStyleSheets`. Shared and live — do not mutate
|
|
275
|
+
* them. Empty where the platform has no constructable stylesheets.
|
|
276
|
+
*/
|
|
277
|
+
export function latticeStyleSheets(opts?: { document?: Document }): CSSStyleSheet[];
|
|
278
|
+
|
|
47
279
|
export default defineLatticeGrid;
|