@toclocoinc/lattice-grid 1.27.0 → 1.28.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/LICENSE +13 -13
- package/README.md +1 -1
- package/docs/API.html +6 -4
- package/docs/api-detail.html +1 -1
- package/lattice-grid.d.ts +37 -4
- package/lattice-grid.esm.min.js +65 -11
- package/lattice-grid.min.cjs +65 -11
- package/lattice-grid.min.css +1 -1
- package/lattice-grid.min.js +65 -11
- package/modules/charts.esm.min.js +2 -2
- package/modules/charts.min.cjs +2 -2
- package/modules/charts.min.js +2 -2
- 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/htmx.esm.min.js +65 -11
- package/modules/htmx.min.cjs +65 -11
- package/modules/htmx.min.js +65 -11
- package/modules/react.esm.min.js +2 -2
- package/modules/react.min.cjs +2 -2
- package/modules/react.min.js +2 -2
- package/modules/svelte.esm.min.js +2 -2
- package/modules/svelte.min.cjs +2 -2
- package/modules/svelte.min.js +2 -2
- package/modules/vue.esm.min.js +2 -2
- package/modules/vue.min.cjs +2 -2
- package/modules/vue.min.js +2 -2
- package/modules/webcomponent.esm.min.js +71 -11
- package/modules/webcomponent.min.cjs +68 -11
- package/modules/webcomponent.min.js +68 -11
- package/package.json +18 -1
package/LICENSE
CHANGED
|
@@ -27,25 +27,25 @@ and ::1 -- no watermark is shown and no key is required. Development needs no
|
|
|
27
27
|
paperwork.
|
|
28
28
|
|
|
29
29
|
--------------------------------------------------------------------------
|
|
30
|
-
3. WHAT
|
|
30
|
+
3. SERVING ON OTHER HOSTS, AND WHAT A KEY REMOVES
|
|
31
31
|
--------------------------------------------------------------------------
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
You may serve Lattice Grid from any host -- including production, staging,
|
|
34
|
+
internal tools, intranets and private networks -- without a licence key and
|
|
35
|
+
without charge. On any host other than a loopback host (section 2), the grid
|
|
36
|
+
renders in full and displays a trial watermark. Nothing is disabled, degraded
|
|
37
|
+
or withheld: every capability works, watermarked, for as long as you like.
|
|
38
|
+
|
|
39
|
+
A valid licence key issued by TOCLOCO Inc removes that watermark. Removing the
|
|
40
|
+
watermark is the only thing a key does (section 1), so you need one when, and
|
|
41
|
+
only when, you want the watermark gone -- typically for a production or
|
|
42
|
+
customer-facing deployment. Serving watermarked, without a key, is permitted
|
|
43
|
+
rather than a breach.
|
|
37
44
|
|
|
38
45
|
Keys are issued per deployment rather than per developer or per seat. A key
|
|
39
|
-
names the domains it covers and one key covers every developer, every build and
|
|
46
|
+
names the domains it covers, and one key covers every developer, every build and
|
|
40
47
|
every user on them.
|
|
41
48
|
|
|
42
|
-
Without a valid key, the grid renders in full and displays a trial watermark.
|
|
43
|
-
Nothing is disabled, degraded or withheld. That behaviour exists to protect
|
|
44
|
-
your production screens from a licence lapsing at an inconvenient moment; it is
|
|
45
|
-
a courtesy, not a grant of licence. Deploying to a non-loopback host without a
|
|
46
|
-
valid key is a breach of these terms whether or not the software continues to
|
|
47
|
-
work.
|
|
48
|
-
|
|
49
49
|
--------------------------------------------------------------------------
|
|
50
50
|
4. GRANT
|
|
51
51
|
--------------------------------------------------------------------------
|
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.28.0 · [latticegrid.dev](https://www.latticegrid.dev) · TOCLOCO Inc
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
package/docs/API.html
CHANGED
|
@@ -848,7 +848,7 @@ autoInit(document); <span class="cmt">// builds every [data-lattice-grid] under
|
|
|
848
848
|
<tbody>
|
|
849
849
|
<tr><td class="name">statusBar</td><td class="type">boolean | { panels }</td><td class="desc">Composable panels along the bottom. Default set: <code>rowCount</code>, <code>selectedCount</code>, <code>aggregation</code>, <code>comments</code>, <code>updates</code>, <code>progress</code>. Each is silent when it has nothing to report.</td></tr>
|
|
850
850
|
<tr><td class="name">maximise</td><td class="type">boolean</td><td class="dflt">true</td><td class="desc"><code>false</code> removes the rail button and <code>grid.maximise</code>, for an application with its own full-screen mode.</td></tr>
|
|
851
|
-
<tr><td class="name">toolPanel</td><td class="type">boolean | object</td><td class="desc">Side dock. <code>panels</code>: <code>columns</code>, <code>filters</code>, <code>views</code>, <code>quick</code>, <code>formatting</code>, <code>statistics</code>. <code>side: 'left'</code> makes it the icon rail, which also turns on <code>actions</code> (<code>undo</code>, <code>redo</code>, <code>pause</code>, <code>restore</code>, <code>maximise</code>, then the export group: <code>export</code>, <code>excel</code>, <code>clipboard</code>, <code>print</code>: nine in all, and an array takes these names rather than the button labels) and <code>icons</code>. An explicit array <em>replaces</em> that list rather than extending it; a bare <code>'-'</code> in it renders a divider between groups. <code>exportName</code> names the CSV.</td></tr>
|
|
851
|
+
<tr><td class="name">toolPanel</td><td class="type">boolean | object</td><td class="desc">Side dock. <code>panels</code>: <code>columns</code>, <code>filters</code>, <code>views</code>, <code>quick</code>, <code>formatting</code>, <code>statistics</code>. <code>side: 'left'</code> makes it the icon rail, which also turns on <code>actions</code> (<code>undo</code>, <code>redo</code>, <code>pause</code>, <code>restore</code>, <code>maximise</code>, then the export group: <code>export</code>, <code>excel</code>, <code>clipboard</code>, <code>print</code>: nine in all, and an array takes these names rather than the button labels) and <code>icons</code>. An explicit array <em>replaces</em> that list rather than extending it; a bare <code>'-'</code> in it renders a divider between groups. <code>exportName</code> names the CSV. <code>annotate: true</code> adds the native annotation tools — <code>pen</code>, <code>arrow</code>, <code>rect</code>, <code>highlight</code> — to the rail as toggle buttons (pressed while in use, pressed again to exit); they also appear automatically for the duration of a presentation.</td></tr>
|
|
852
852
|
<tr><td class="name">groupPanel</td><td class="type">boolean | object</td><td class="desc">A drag-and-drop group-by strip above the column header — the row-group panel. Drag a heading into it to group by that column; the active groups show as removable, reorderable chips, and reordering the chips changes the nesting order. It is keyboard-operable — arrows move between chips, <code>Shift</code> with an arrow reorders, <code>Delete</code> ungroups, and an add control groups any column — and every change is announced through the live region. Off by default and non-breaking; it drives the same model as <code>grid.columns.group()</code> and reimplements nothing. The object form takes <code>hint</code>, the placeholder shown while nothing is grouped.</td></tr>
|
|
853
853
|
<tr><td class="name">kpis</td><td class="type">StatConfig[]</td><td class="desc">A built-in KPI/stat strip: a labelled band of stat tiles the grid places for you above the column header. Each entry is a <code>createStat</code> spec — <code>of</code>, <code>fn</code>, <code>title</code>, <code>interval</code>, <code>footer</code>, <code>format</code> and the rest, minus <code>grid</code> and <code>container</code>, which the grid supplies — so a strip tile and a hand-placed one are the same object. The tiles follow the grid's filters, recomputing on every change like a stand-alone stat does. Off by default and non-breaking; it reuses <code>createStat</code> and reimplements no compute.</td></tr>
|
|
854
854
|
<tr><td class="name">timeZone</td><td class="type">string</td><td class="desc">An IANA zone every date column formats and parses in, so a grid shows one zone whatever the viewer's machine says. Individual columns may override it.</td></tr>
|
|
@@ -3755,10 +3755,11 @@ const chart = createChart({
|
|
|
3755
3755
|
</div>
|
|
3756
3756
|
|
|
3757
3757
|
<h3>Clicking a chart</h3>
|
|
3758
|
-
<p>A chart emits <code>point:click</code>, <code>point:hover</code>
|
|
3759
|
-
<pre><code>chart.on('
|
|
3760
|
-
grid.filters.set({ col:
|
|
3758
|
+
<p>A chart emits <code>click</code>, <code>hover</code>, <code>leave</code>, <code>focus</code>, <code>draw</code>, <code>drill</code>, <code>brush</code> and <code>legend</code> — there is no <code>point:click</code>, <code>point:hover</code> or <code>series:toggle</code>. The common use is filtering the grid from a mark, which makes the pair two views of one selection rather than a chart beside a table. The <code>click</code> and <code>hover</code> payload is <strong>flat</strong> — <code>{ label, category, column, value, series, rowKeys, native, preventDefault }</code>, with no <code>point</code> wrapper — where <code>column</code> is the grid column the mark filters on and <code>category</code> the value to filter it to.</p>
|
|
3759
|
+
<pre><code>chart.on('click', ({ column, category }) => {
|
|
3760
|
+
grid.filters.set({ col: column, op: 'eq', value: category });
|
|
3761
3761
|
});</code></pre>
|
|
3762
|
+
<p>Simplest of all, set <code>filterOnClick: true</code> in the spec and the chart applies exactly that filter itself on the clicked mark. The <code>click</code> event still fires first, so a handler that calls <code>preventDefault()</code> on the payload takes the click over instead.</p>
|
|
3762
3763
|
|
|
3763
3764
|
<h3 id="chart-a-range">Chart a selected range</h3>
|
|
3764
3765
|
<p>A user who drags out a block of cells — a text column and the numbers beside it — is asking a question a spreadsheet answers with one gesture: chart this. <code>chartRange</code> is that gesture. It reads the selected range, derives the chart from its shape, and returns the same live <code>Chart</code> <code>createChart</code> does, so nothing about it is a second kind of chart.</p>
|
|
@@ -7138,6 +7139,7 @@ return `methods ${ANOMALY_METHODS.length}; flagged ${z.flagged}; upper ${fence.u
|
|
|
7138
7139
|
<tr><td class="name">icon</td><td class="type">string | (() => string)</td><td class="desc"><small>(optional)</small></td></tr>
|
|
7139
7140
|
<tr><td class="name">run</td><td class="type">(params: RailActionParams): void</td><td class="desc"></td></tr>
|
|
7140
7141
|
<tr><td class="name">enabled</td><td class="type">(): boolean</td><td class="desc"><small>(optional)</small></td></tr>
|
|
7142
|
+
<tr><td class="name">active</td><td class="type">(): boolean</td><td class="desc">Marks the action as a toggle and reports whether it is currently on. When present the rail renders `aria-pressed` and a pressed style, re-read on every repaint; a one-shot action omits it and is unchanged. This is the hook the native annotation tools use, and it is available to a host button that is itself a toggle. <small>(optional)</small></td></tr>
|
|
7141
7143
|
</tbody>
|
|
7142
7144
|
</table>
|
|
7143
7145
|
</div>
|
package/docs/api-detail.html
CHANGED
|
@@ -437,7 +437,7 @@
|
|
|
437
437
|
<div class="shell">
|
|
438
438
|
<aside class="rail">
|
|
439
439
|
<p class="rail__brand">Lattice Grid</p>
|
|
440
|
-
<p class="rail__sub">Developer guide · v1.
|
|
440
|
+
<p class="rail__sub">Developer guide · v1.28.0</p>
|
|
441
441
|
<nav>
|
|
442
442
|
<div class="rail__group">
|
|
443
443
|
<span class="rail__label">Start here</span>
|
package/lattice-grid.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.
|
|
2
|
+
* Lattice Grid 1.28.0, type declarations
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -1928,6 +1928,14 @@ export interface GridConfig {
|
|
|
1928
1928
|
actions?: false | (RailActionName | '-' | RailAction)[];
|
|
1929
1929
|
/** File name for the export action, without the extension. */
|
|
1930
1930
|
exportName?: string;
|
|
1931
|
+
/**
|
|
1932
|
+
* Put the native annotation tools — pen, arrow, rectangle, highlighter — on
|
|
1933
|
+
* the rail. Off by default; each is a real toggle button that shows pressed
|
|
1934
|
+
* while it is the tool in use and turns off when pressed again. The tools
|
|
1935
|
+
* also appear automatically for the duration of a presentation, so this is
|
|
1936
|
+
* only needed to keep them available outside one.
|
|
1937
|
+
*/
|
|
1938
|
+
annotate?: boolean;
|
|
1931
1939
|
};
|
|
1932
1940
|
/**
|
|
1933
1941
|
* A drag-and-drop group-by strip above the column header — the pattern AG
|
|
@@ -4218,7 +4226,10 @@ export interface ColumnMenuParams {
|
|
|
4218
4226
|
/** The rail's built-in action names, plus `'-'` for a divider. */
|
|
4219
4227
|
export type RailActionName =
|
|
4220
4228
|
| 'undo' | 'redo' | 'pause' | 'restore' | 'maximise'
|
|
4221
|
-
| 'export' | 'excel' | 'clipboard' | 'print'
|
|
4229
|
+
| 'export' | 'excel' | 'clipboard' | 'print'
|
|
4230
|
+
// The native annotation tools, on the rail when `toolPanel.annotate` is set
|
|
4231
|
+
// or while a presentation runs. Each is toggleable (see `RailAction.active`).
|
|
4232
|
+
| 'pen' | 'arrow' | 'rect' | 'highlight';
|
|
4222
4233
|
|
|
4223
4234
|
/** What a host rail action's `run` is handed. */
|
|
4224
4235
|
export interface RailActionParams {
|
|
@@ -4233,6 +4244,14 @@ export interface RailAction {
|
|
|
4233
4244
|
icon?: string | (() => string);
|
|
4234
4245
|
run(params: RailActionParams): void;
|
|
4235
4246
|
enabled?(): boolean;
|
|
4247
|
+
/**
|
|
4248
|
+
* Marks the action as a toggle and reports whether it is currently on. When
|
|
4249
|
+
* present the rail renders `aria-pressed` and a pressed style, re-read on
|
|
4250
|
+
* every repaint; a one-shot action omits it and is unchanged. This is the
|
|
4251
|
+
* hook the native annotation tools use, and it is available to a host button
|
|
4252
|
+
* that is itself a toggle.
|
|
4253
|
+
*/
|
|
4254
|
+
active?(): boolean;
|
|
4236
4255
|
}
|
|
4237
4256
|
|
|
4238
4257
|
/** The result of evaluating a formula a user typed into a cell (spec 8.11). */
|
|
@@ -5323,8 +5342,22 @@ export interface ChartSpec {
|
|
|
5323
5342
|
* The events a chart raises.
|
|
5324
5343
|
*
|
|
5325
5344
|
* A chart's own, not the grid's: `grid.on` takes {@link EventName} and knows
|
|
5326
|
-
* nothing about these. `point:click`
|
|
5327
|
-
*
|
|
5345
|
+
* nothing about these. There is no `point:click`, `point:hover` or
|
|
5346
|
+
* `series:toggle`; the events are the flat names below and `click` is the one
|
|
5347
|
+
* most callers want, it is how a click on a mark becomes a filter on the grid.
|
|
5348
|
+
*
|
|
5349
|
+
* `click` and `hover` carry a **flat** payload — there is no `point` wrapper:
|
|
5350
|
+
* `{ label, category, column, value, series, rowKeys, native, preventDefault }`.
|
|
5351
|
+
* `column` is the grid column the mark filters on and `category` the value to
|
|
5352
|
+
* filter it to; `value` is the measure when a single series sits under the mark,
|
|
5353
|
+
* otherwise null with the per-series numbers in `series`; `rowKeys` are the
|
|
5354
|
+
* source rows behind the mark; `native` is the DOM event.
|
|
5355
|
+
*
|
|
5356
|
+
* `click` fires whether or not the spec sets `filterOnClick`, and it fires
|
|
5357
|
+
* *before* any filter is applied: call `preventDefault()` on the payload to stop
|
|
5358
|
+
* the chart filtering the grid and take the click over yourself. With
|
|
5359
|
+
* `filterOnClick: true` in the spec the chart filters the grid itself on the
|
|
5360
|
+
* clicked mark's `column`/`category` unless a handler prevented it.
|
|
5328
5361
|
*/
|
|
5329
5362
|
export type ChartEventName =
|
|
5330
5363
|
| 'click' | 'hover' | 'leave' | 'focus'
|