@toclocoinc/lattice-grid 1.46.1 → 1.48.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 +131 -1
- package/docs/API.html +197 -7
- package/docs/api-detail.html +100 -3
- package/lattice-grid.d.ts +344 -8
- package/lattice-grid.esm.min.js +1553 -140
- package/lattice-grid.min.cjs +1553 -140
- package/lattice-grid.min.css +1 -1
- package/lattice-grid.min.js +1553 -140
- package/modules/ai.esm.min.js +220 -27
- package/modules/ai.min.cjs +218 -26
- package/modules/ai.min.js +218 -26
- 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.esm.min.js +1 -1
- package/modules/chart-arc.esm.min.js +1 -1
- package/modules/chart-bubblemap.esm.min.js +1 -1
- package/modules/chart-bump.esm.min.js +1 -1
- package/modules/chart-calendar.esm.min.js +1 -1
- package/modules/chart-decomposition.esm.min.js +1 -1
- package/modules/chart-diverging.esm.min.js +1 -1
- package/modules/chart-dumbbell.esm.min.js +1 -1
- package/modules/chart-fan.esm.min.js +1 -1
- package/modules/chart-hexbin.esm.min.js +1 -1
- package/modules/chart-hexmap.esm.min.js +1 -1
- package/modules/chart-icicle.esm.min.js +1 -1
- package/modules/chart-parallel.esm.min.js +8 -3
- package/modules/chart-ridgeline.esm.min.js +1 -1
- package/modules/chart-roc.esm.min.js +1 -1
- package/modules/chart-slope.esm.min.js +1 -1
- package/modules/chart-splom.esm.min.js +1 -1
- package/modules/chart-waffle.esm.min.js +1 -1
- package/modules/charts.esm.min.js +294 -19
- package/modules/charts.min.cjs +294 -19
- package/modules/charts.min.js +294 -19
- package/modules/data-router.esm.min.js +4 -4
- package/modules/data-router.min.cjs +4 -4
- package/modules/data-router.min.js +4 -4
- 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.esm.min.js +4 -4
- package/modules/dhtmlx-compat.min.cjs +4 -4
- package/modules/dhtmlx-compat.min.js +4 -4
- package/modules/gantt.esm.min.js +13 -4
- package/modules/gantt.min.cjs +13 -4
- package/modules/gantt.min.js +13 -4
- package/modules/htmx.esm.min.js +1553 -140
- package/modules/htmx.min.cjs +1553 -140
- package/modules/htmx.min.js +1553 -140
- package/modules/kanban.esm.min.js +59 -8
- package/modules/kanban.min.cjs +59 -8
- package/modules/kanban.min.js +59 -8
- package/modules/kpi.esm.min.js +4 -4
- package/modules/kpi.min.cjs +4 -4
- package/modules/kpi.min.js +4 -4
- 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.esm.min.js +3 -3
- package/modules/react.min.cjs +3 -3
- package/modules/react.min.js +3 -3
- package/modules/svelte.esm.min.js +3 -3
- package/modules/svelte.min.cjs +3 -3
- package/modules/svelte.min.js +3 -3
- 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.esm.min.js +1553 -140
- package/modules/webcomponent.min.cjs +1553 -140
- package/modules/webcomponent.min.js +1553 -140
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
dependencies, no build step required. Optional adapters for React, Vue, Svelte
|
|
5
5
|
and Web Components ship alongside it.
|
|
6
6
|
|
|
7
|
-
Version 1.
|
|
7
|
+
Version 1.48.0 · [latticegrid.dev](https://www.latticegrid.dev) · TOCLOCO Inc
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -36,6 +36,10 @@ Every module is optional and none of them is loaded unless you import it.
|
|
|
36
36
|
| `modules/dhtmlx-compat.esm.min.js` | A compatibility wrapper for dhtmlx Grid, for moving an existing integration across without rewriting it. |
|
|
37
37
|
| `modules/devtools.esm.min.js` | The devtools panel, including the accessibility checks. |
|
|
38
38
|
|
|
39
|
+
This is the short list. [Modules & entry points](#modules--entry-points) is the
|
|
40
|
+
complete map — every framework adapter, feature module and chart-type extension,
|
|
41
|
+
with its npm import, CDN path and browser global.
|
|
42
|
+
|
|
39
43
|
---
|
|
40
44
|
|
|
41
45
|
## What it does
|
|
@@ -270,6 +274,132 @@ your editor tells you and what the grid does cannot drift apart.
|
|
|
270
274
|
|
|
271
275
|
---
|
|
272
276
|
|
|
277
|
+
## Modules & entry points
|
|
278
|
+
|
|
279
|
+
The package ships the core plus a set of optional modules, each as its own file.
|
|
280
|
+
Nothing is loaded unless you import it, and a page that imports none of the
|
|
281
|
+
modules pays for none of them. This section is the complete map: every public
|
|
282
|
+
entry point, how to import it from npm, how to reach it on a CDN, and — for the
|
|
283
|
+
`<script>`-tag builds — the browser global it leaves behind.
|
|
284
|
+
|
|
285
|
+
**Three variants ship for most entry points.** Pick the one your page loads by:
|
|
286
|
+
|
|
287
|
+
- **ESM** — `*.esm.min.js`. The default for a bundler or a native `<script
|
|
288
|
+
type="module">`. This is what the bare `@toclocoinc/lattice-grid` and
|
|
289
|
+
`@toclocoinc/lattice-grid/modules/<name>` specifiers resolve to.
|
|
290
|
+
- **UMD** — `*.min.js`. For a plain `<script src>` load; it defines a browser
|
|
291
|
+
global (below). Reach it from npm with the explicit `.js` specifier
|
|
292
|
+
(`@toclocoinc/lattice-grid/modules/<name>.js`).
|
|
293
|
+
- **CJS** — `*.min.cjs`. For `require()`. Reach it with the explicit `.cjs`
|
|
294
|
+
specifier, or let `require('@toclocoinc/lattice-grid')` resolve it.
|
|
295
|
+
|
|
296
|
+
Alongside those: the stylesheet `lattice-grid.min.css` (required, imported as
|
|
297
|
+
`@toclocoinc/lattice-grid/css`) and the TypeScript declarations
|
|
298
|
+
`lattice-grid.d.ts` (wired through `package.json`, so no configuration).
|
|
299
|
+
|
|
300
|
+
**On a CDN**, every file below sits under the same base — jsDelivr serves the
|
|
301
|
+
published package directly:
|
|
302
|
+
|
|
303
|
+
```
|
|
304
|
+
https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@<version>/<file>
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
Pin an exact `<version>` in production. The `<file>` column in each table below
|
|
308
|
+
is exactly what you append.
|
|
309
|
+
|
|
310
|
+
### Core
|
|
311
|
+
|
|
312
|
+
| npm import | CDN `<file>` | Browser global |
|
|
313
|
+
|---|---|---|
|
|
314
|
+
| `@toclocoinc/lattice-grid` (ESM) | `lattice-grid.esm.min.js` | — |
|
|
315
|
+
| `@toclocoinc/lattice-grid` (CJS `require`) | `lattice-grid.min.cjs` | — |
|
|
316
|
+
| `@toclocoinc/lattice-grid/lattice-grid.min.js` (UMD) | `lattice-grid.min.js` | `LatticeGrid` |
|
|
317
|
+
| `@toclocoinc/lattice-grid/css` | `lattice-grid.min.css` | — (stylesheet) |
|
|
318
|
+
| types | `lattice-grid.d.ts` | — (declarations) |
|
|
319
|
+
|
|
320
|
+
### Framework adapters
|
|
321
|
+
|
|
322
|
+
Each adapter ships all three variants (`modules/<name>.esm.min.js`,
|
|
323
|
+
`modules/<name>.min.js`, `modules/<name>.min.cjs`). The npm ESM specifier is
|
|
324
|
+
shown; append `.js` for the UMD build or `.cjs` for CommonJS.
|
|
325
|
+
|
|
326
|
+
| Module | npm import (ESM) | CDN `<file>` (UMD) | Browser global | What it is |
|
|
327
|
+
|---|---|---|---|---|
|
|
328
|
+
| react | `@toclocoinc/lattice-grid/modules/react` | `modules/react.min.js` | `LatticeGridReact` | React adapter. |
|
|
329
|
+
| vue | `@toclocoinc/lattice-grid/modules/vue` | `modules/vue.min.js` | `LatticeGridVue` | Vue adapter. |
|
|
330
|
+
| svelte | `@toclocoinc/lattice-grid/modules/svelte` | `modules/svelte.min.js` | `LatticeGridSvelte` | Svelte adapter. |
|
|
331
|
+
| angular | `@toclocoinc/lattice-grid/modules/angular` | `modules/angular.min.js` | `LatticeGridAngular` | Angular adapter. |
|
|
332
|
+
| webcomponent | `@toclocoinc/lattice-grid/modules/webcomponent` | `modules/webcomponent.min.js` | `LatticeGrid` (extends it) | `<lattice-grid>` as a self-contained custom element. |
|
|
333
|
+
| htmx | `@toclocoinc/lattice-grid/modules/htmx` | `modules/htmx.min.js` | `LatticeGridHtmx` | htmx integration that survives DOM swaps and hydrates from a server-rendered `<table>`. |
|
|
334
|
+
|
|
335
|
+
The framework adapters take the framework and `createGrid` handed in rather than
|
|
336
|
+
importing either (see [Quick start](#react-vue-svelte-and-web-components)). The
|
|
337
|
+
web component and htmx are self-contained: they carry the grid, so load them on
|
|
338
|
+
their own, not beside the base package.
|
|
339
|
+
|
|
340
|
+
### Feature modules
|
|
341
|
+
|
|
342
|
+
Each ships all three variants. The npm ESM specifier is shown; append `.js` for
|
|
343
|
+
the UMD build or `.cjs` for CommonJS.
|
|
344
|
+
|
|
345
|
+
| Module | npm import (ESM) | CDN `<file>` (UMD) | Browser global | What it is |
|
|
346
|
+
|---|---|---|---|---|
|
|
347
|
+
| charts | `@toclocoinc/lattice-grid/modules/charts` | `modules/charts.min.js` | `LatticeGrid` (extends it) | Charts bound to the grid's own result (`createChart`). |
|
|
348
|
+
| data-router | `@toclocoinc/lattice-grid/modules/data-router` | `modules/data-router.min.js` | `LatticeGridDataRouter` | One stream split by property and routed to many grids or charts. |
|
|
349
|
+
| kanban | `@toclocoinc/lattice-grid/modules/kanban` | `modules/kanban.min.js` | `LatticeGridKanban` | Board view: grid rows as cards grouped into columns (`createKanban`). |
|
|
350
|
+
| gantt | `@toclocoinc/lattice-grid/modules/gantt` | `modules/gantt.min.js` | `LatticeGridGantt` | Editable, dependency-aware project plan with a computed critical path (`createGantt`). |
|
|
351
|
+
| kpi | `@toclocoinc/lattice-grid/modules/kpi` | `modules/kpi.min.js` | `LatticeGridKPI` | A grid of stat tiles, each an aggregate over a dataset (`createKPI`). |
|
|
352
|
+
| ai | `@toclocoinc/lattice-grid/modules/ai` | `modules/ai.min.js` | `LatticeGridAI` | Bring-your-own-model narrative and insights grounded on computed figures (`createAI`). |
|
|
353
|
+
| mock-socket | `@toclocoinc/lattice-grid/modules/mock-socket` | `modules/mock-socket.min.js` | `LatticeGridMockSocket` | A serverless stand-in for a live WebSocket feed (`MockWebSocket`, `opsFeed`). |
|
|
354
|
+
| devtools | `@toclocoinc/lattice-grid/modules/devtools` | `modules/devtools.min.js` | `LatticeGrid` (extends it) | The in-page diagnostic panel, including the accessibility checks (`createDevtools`). |
|
|
355
|
+
| dhtmlx-compat | `@toclocoinc/lattice-grid/modules/dhtmlx-compat` | `modules/dhtmlx-compat.min.js` | `LatticeGrid` (extends it) | A dhtmlx `Grid`-shaped API for moving an existing integration across. |
|
|
356
|
+
|
|
357
|
+
The four modules that extend `LatticeGrid` (charts, devtools, dhtmlx-compat,
|
|
358
|
+
webcomponent) fold their exports into the core global, so load the core
|
|
359
|
+
`<script>` first and then the module — for example `LatticeGrid.createChart(...)`
|
|
360
|
+
becomes available once both are loaded. With a bundler they share the one core
|
|
361
|
+
the page already imported rather than carrying a second copy.
|
|
362
|
+
|
|
363
|
+
### Chart-type extensions
|
|
364
|
+
|
|
365
|
+
Eighteen additional chart types ship as separate, tree-shakeable ESM modules.
|
|
366
|
+
Each one **self-registers** its type onto the charts module's shared registry the
|
|
367
|
+
moment it is imported — so load the base charts module first, import the
|
|
368
|
+
extension for its side effect, then name the type in `createChart`. They ship as
|
|
369
|
+
ESM only (import for side effect; there is no global to reach).
|
|
370
|
+
|
|
371
|
+
```js
|
|
372
|
+
import '@toclocoinc/lattice-grid/modules/charts'; // the base registry
|
|
373
|
+
import '@toclocoinc/lattice-grid/modules/chart-alluvial'; // registers 'alluvial'
|
|
374
|
+
createChart({ grid, container, type: 'alluvial', source: 'from', target: 'to', value: 'count' });
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
Each is imported from `@toclocoinc/lattice-grid/modules/chart-<type>` (CDN
|
|
378
|
+
`<file>`: `modules/chart-<type>.esm.min.js`), and registers the `type` shown.
|
|
379
|
+
|
|
380
|
+
| Import / `type` | What it draws |
|
|
381
|
+
|---|---|
|
|
382
|
+
| `chart-alluvial` → `alluvial` | Alluvial diagram: categorical flow from one dimension to another. |
|
|
383
|
+
| `chart-arc` → `arc` | Arc diagram: nodes on a line, links as arcs. |
|
|
384
|
+
| `chart-bubblemap` → `bubblemap` | Symbol / bubble map. |
|
|
385
|
+
| `chart-bump` → `bump` | Bump chart: rank over time. |
|
|
386
|
+
| `chart-calendar` → `calendar` | Calendar heatmap. |
|
|
387
|
+
| `chart-decomposition` → `decomposition` | Seasonal decomposition panel. |
|
|
388
|
+
| `chart-diverging` → `diverging` | Diverging bar chart. |
|
|
389
|
+
| `chart-dumbbell` → `dumbbell` | Dumbbell / connected-dot plot. |
|
|
390
|
+
| `chart-fan` → `fan` | Fan / forecast chart. |
|
|
391
|
+
| `chart-hexbin` → `hexbin` | Hexbin / 2D-density plot. |
|
|
392
|
+
| `chart-hexmap` → `hexmap` | Hexbin map. |
|
|
393
|
+
| `chart-icicle` → `icicle` | Icicle chart. |
|
|
394
|
+
| `chart-parallel` → `parallel` | Parallel coordinates. |
|
|
395
|
+
| `chart-ridgeline` → `ridgeline` | Ridgeline (joy) plot. |
|
|
396
|
+
| `chart-roc` → `roc` | ROC / PR / calibration curves. |
|
|
397
|
+
| `chart-slope` → `slope` | Slope chart. |
|
|
398
|
+
| `chart-splom` → `splom` | Scatter-plot matrix. |
|
|
399
|
+
| `chart-waffle` → `waffle` | Waffle / dot-matrix chart. |
|
|
400
|
+
|
|
401
|
+
---
|
|
402
|
+
|
|
273
403
|
## Full-screen mode
|
|
274
404
|
|
|
275
405
|
A grid usually lives in whatever box the page layout gave it, and that box is
|