@toclocoinc/lattice-grid 1.68.0 → 1.68.2
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 +26 -1
- package/angular/fesm2022/toclocoinc-lattice-grid-angular.mjs +1 -0
- package/angular/package.json +1 -1
- package/docs/API.html +8058 -3962
- package/docs/api-detail.html +101 -4
- package/lattice-grid.d.ts +5917 -78
- package/lattice-grid.esm.min.js +197 -39
- package/lattice-grid.min.cjs +197 -39
- package/lattice-grid.min.js +197 -39
- package/modules/ai.d.ts +172 -11
- 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 +3 -3
- package/modules/angular.min.cjs +3 -3
- package/modules/angular.min.js +3 -3
- 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 +16 -1
- package/modules/charts.esm.min.js +23 -16
- package/modules/charts.min.cjs +23 -16
- package/modules/charts.min.js +23 -16
- package/modules/data-router.d.ts +259 -3
- package/modules/data-router.esm.min.js +9 -4
- package/modules/data-router.min.cjs +9 -4
- package/modules/data-router.min.js +9 -4
- 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 +563 -12
- package/modules/gantt.esm.min.js +8 -4
- package/modules/gantt.min.cjs +8 -4
- package/modules/gantt.min.js +8 -4
- 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 +197 -39
- package/modules/htmx.min.cjs +197 -39
- package/modules/htmx.min.js +197 -39
- package/modules/kanban.d.ts +687 -4
- 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 +237 -3
- package/modules/kpi.esm.min.js +4 -4
- package/modules/kpi.min.cjs +4 -4
- package/modules/kpi.min.js +4 -4
- package/modules/layout.d.ts +249 -7
- 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 +6 -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 +18 -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 +1 -1
- package/modules/svelte.esm.min.js +3 -3
- package/modules/svelte.min.cjs +3 -3
- package/modules/svelte.min.js +3 -3
- package/modules/tabs.d.ts +116 -11
- 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 +12 -1
- 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.d.ts +89 -6
- package/modules/webcomponent.esm.min.js +242 -43
- package/modules/webcomponent.min.cjs +242 -43
- package/modules/webcomponent.min.js +242 -43
- package/package.json +1 -1
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.68.
|
|
440
|
+
<p class="rail__sub">Developer guide · v1.68.2</p>
|
|
441
441
|
<nav>
|
|
442
442
|
<div class="rail__group">
|
|
443
443
|
<span class="rail__label">Start here</span>
|
|
@@ -554,7 +554,7 @@
|
|
|
554
554
|
<a href="API.html">reference tables</a> are the shorter version for when you already know.
|
|
555
555
|
</p>
|
|
556
556
|
<p class="chips">
|
|
557
|
-
<span class="chip">Version 1.68.
|
|
557
|
+
<span class="chip">Version 1.68.2</span>
|
|
558
558
|
<span class="chip">Zero dependencies</span>
|
|
559
559
|
<span class="chip">No build step</span>
|
|
560
560
|
</p>
|
|
@@ -1492,7 +1492,7 @@ off(); <span class="cmt">// every subscrip
|
|
|
1492
1492
|
</p>
|
|
1493
1493
|
<div class="example">
|
|
1494
1494
|
<p class="example__label">Which version am I running?</p>
|
|
1495
|
-
<pre><code>grid.getVersion(); <span class="cmt">// '1.68.
|
|
1495
|
+
<pre><code>grid.getVersion(); <span class="cmt">// '1.68.2'</span>
|
|
1496
1496
|
LatticeGrid.getVersion(); <span class="cmt">// the same, when you have no grid to hand</span></code></pre>
|
|
1497
1497
|
</div>
|
|
1498
1498
|
<p class="lead-in">
|
|
@@ -1785,6 +1785,16 @@ dataTypes: {
|
|
|
1785
1785
|
is <code>1.00 MB</code> rather than <code>1,000 kB</code>.
|
|
1786
1786
|
</p>
|
|
1787
1787
|
|
|
1788
|
+
<div class="example">
|
|
1789
|
+
<p class="example__label">Rounding before the rung is chosen: significantFigures, executed</p>
|
|
1790
|
+
<pre data-run="js" data-expect="figures 1.00 MB | none 1,000 kB" data-covers="config:significantFigures"><code>const { formatUnit } = await import('../packages/core/src/index.js');
|
|
1791
|
+
|
|
1792
|
+
const spec = { system: 'data', unit: 'B', display: 'auto', locale: 'en-GB' };
|
|
1793
|
+
return (`figures ${formatUnit(999999, { ...spec, significantFigures: 3 })}`
|
|
1794
|
+
+ ` | none ${formatUnit(999999, spec)}`);
|
|
1795
|
+
</code></pre>
|
|
1796
|
+
</div>
|
|
1797
|
+
|
|
1788
1798
|
<p class="lead-in">
|
|
1789
1799
|
<code>compound: ['ft', 'in']</code> renders one stored number across an ordered subset of the
|
|
1790
1800
|
system's units — a length as <code>5 ft 11 in</code>, a duration as <code>1 h 23 m</code>.
|
|
@@ -8200,6 +8210,29 @@ grid.export.print();</code></pre>
|
|
|
8200
8210
|
formatted values, and only the columns they may read.
|
|
8201
8211
|
</p>
|
|
8202
8212
|
|
|
8213
|
+
<div class="example">
|
|
8214
|
+
<p class="example__label">Two options for a file somebody opens in Excel: hidden, bom, executed</p>
|
|
8215
|
+
<pre data-run="js" data-expect="plain Id,Name | wide Id,Name,Cost | bom false then true" data-covers="config:hidden config:bom"><code>const { createHeadlessGrid } = await import('../packages/core/src/index.js');
|
|
8216
|
+
|
|
8217
|
+
const grid = createHeadlessGrid({
|
|
8218
|
+
rowKey: 'id',
|
|
8219
|
+
rows: [{ id: 1, name: 'Ann', cost: 9 }],
|
|
8220
|
+
columns: [{ field: 'id' }, { field: 'name' }, { field: 'cost', layout: { hidden: true } }],
|
|
8221
|
+
});
|
|
8222
|
+
const plain = grid.export.csv({ rows: 'all' });
|
|
8223
|
+
const wide = grid.export.csv({ rows: 'all', hidden: true, bom: true });
|
|
8224
|
+
const head = (text) => text.replace('\uFEFF', '').split('\r\n')[0];
|
|
8225
|
+
return (`plain ${head(plain)} | wide ${head(wide)} | bom ${plain.charCodeAt(0) === 0xFEFF} then ${wide.charCodeAt(0) === 0xFEFF}`);
|
|
8226
|
+
</code></pre>
|
|
8227
|
+
<p>
|
|
8228
|
+
<code>hidden: true</code> carries the columns the grid is hiding into the file — the
|
|
8229
|
+
column a reader collapsed is still a column the spreadsheet wants. A column that opted out
|
|
8230
|
+
with <code>export.csv: false</code>, or that the reader may not see, is still excluded.
|
|
8231
|
+
<code>bom: true</code> writes the UTF-8 byte-order mark, which is what stops Excel guessing
|
|
8232
|
+
the encoding and rendering every accented name as mojibake.
|
|
8233
|
+
</p>
|
|
8234
|
+
</div>
|
|
8235
|
+
|
|
8203
8236
|
<h3>On the server</h3>
|
|
8204
8237
|
<p class="lead-in">
|
|
8205
8238
|
A user asks to export half a million rows. You can ship them all to the browser to be
|
|
@@ -8256,6 +8289,7 @@ grid.import.apply(preview);</code></pre>
|
|
|
8256
8289
|
<thead><tr><th>Name</th><th>What it does</th></tr></thead>
|
|
8257
8290
|
<tbody>
|
|
8258
8291
|
<tr><td class="name">autoHeight</td><td class="desc">autoHeight.</td></tr>
|
|
8292
|
+
<tr><td class="name">bom</td><td class="desc">Write the UTF-8 byte-order mark at the head of a CSV export, so Excel detects the encoding instead of guessing at it. Off by default. (optional)</td></tr>
|
|
8259
8293
|
<tr><td class="name">bucketFn</td><td class="desc">Replace the built-in bucketing entirely. (optional)</td></tr>
|
|
8260
8294
|
<tr><td class="name">coalesceMs</td><td class="desc">(optional)</td></tr>
|
|
8261
8295
|
<tr><td class="name">columnGroups</td><td class="desc">Header grouping declared separately from the columns.</td></tr>
|
|
@@ -9180,6 +9214,69 @@ return lines.join(' | ');
|
|
|
9180
9214
|
</p>
|
|
9181
9215
|
</div>
|
|
9182
9216
|
|
|
9217
|
+
<div class="example">
|
|
9218
|
+
<p class="example__label">A stat tile in full: kind, aggregation, field, baseline, thresholds, bands, sparkline, executed</p>
|
|
9219
|
+
<pre data-run="js" data-expect="cpu 77 warn | delta 27 | spark 41,58,77 | spread 47 warn" data-covers="config:kind config:aggregation config:field config:baseline config:thresholds config:bands config:sparkline"><code>const { createKPI } = await import('../packages/modules/kpi/index.js');
|
|
9220
|
+
|
|
9221
|
+
const READINGS = [
|
|
9222
|
+
{ id: 1, host: 'a', hour: 1, cpu: 41, up: true },
|
|
9223
|
+
{ id: 2, host: 'a', hour: 2, cpu: 58, up: true },
|
|
9224
|
+
{ id: 3, host: 'a', hour: 3, cpu: 77, up: true },
|
|
9225
|
+
{ id: 4, host: 'b', hour: 1, cpu: 12, up: false },
|
|
9226
|
+
];
|
|
9227
|
+
const kpi = createKPI(null, {
|
|
9228
|
+
rows: READINGS, rowKey: 'id',
|
|
9229
|
+
tiles: [
|
|
9230
|
+
{ kind: 'stat', id: 'cpu', label: 'CPU', aggregation: 'max', field: 'cpu',
|
|
9231
|
+
filter: (row) => row.up, baseline: 50, delta: 'absolute',
|
|
9232
|
+
thresholds: { warn: 60, critical: 85, direction: 'lowerIsBetter' },
|
|
9233
|
+
sparkline: { x: 'hour', y: 'cpu' } },
|
|
9234
|
+
{ kind: 'stat', id: 'spread', label: 'Spread', aggregation: 'avg', field: 'cpu',
|
|
9235
|
+
bands: [{ max: 40, status: 'good' }, { min: 40, max: 60, status: 'warn' },
|
|
9236
|
+
{ min: 60, status: 'critical' }] },
|
|
9237
|
+
],
|
|
9238
|
+
});
|
|
9239
|
+
const [cpu, spread] = kpi.model.tiles;
|
|
9240
|
+
return (`cpu ${cpu.value} ${cpu.status} | delta ${cpu.delta}`
|
|
9241
|
+
+ ` | spark ${cpu.sparkline.join(',')} | spread ${spread.value} ${spread.status}`);
|
|
9242
|
+
</code></pre>
|
|
9243
|
+
<p>
|
|
9244
|
+
<code>kind: 'stat'</code> is the default and is written here only to sit beside the clock
|
|
9245
|
+
tile below. <code>aggregation</code> and <code>field</code> are the measurement; the
|
|
9246
|
+
<code>filter</code> is what makes the CPU tile read 77 rather than the whole panel's rows;
|
|
9247
|
+
<code>baseline: 50</code> is what the movement line is measured from.
|
|
9248
|
+
<code>thresholds</code> grades against two cut points — here <code>lowerIsBetter</code>,
|
|
9249
|
+
so 77 is a warning — while <code>bands</code> is the explicit alternative, a list of
|
|
9250
|
+
half-open <code>[min, max)</code> ranges, first match winning. <code>sparkline</code> plots
|
|
9251
|
+
the tile's own rows in <code>x</code> order.
|
|
9252
|
+
</p>
|
|
9253
|
+
</div>
|
|
9254
|
+
|
|
9255
|
+
<div class="example">
|
|
9256
|
+
<p class="example__label">A clock tile: kind, seconds, date, executed</p>
|
|
9257
|
+
<pre data-run="js" data-expect="full hh:mm:ss with date | plain hh:mm no date" data-covers="config:seconds config:date"><code>const { createKPI } = await import('../packages/modules/kpi/index.js');
|
|
9258
|
+
|
|
9259
|
+
const kpi = createKPI(null, {
|
|
9260
|
+
rows: [], rowKey: 'id', locale: 'en-GB',
|
|
9261
|
+
tiles: [
|
|
9262
|
+
{ kind: 'clock', id: 'utc', label: 'UTC', timeZone: 'UTC' },
|
|
9263
|
+
{ kind: 'clock', id: 'desk', label: 'Desk', timeZone: 'UTC', seconds: false, date: false },
|
|
9264
|
+
],
|
|
9265
|
+
});
|
|
9266
|
+
const shape = (tile) => `${tile.clock.time.split(':').length === 3 ? 'hh:mm:ss' : 'hh:mm'}`
|
|
9267
|
+
+ `${tile.clock.date === null ? ' no date' : ' with date'}`;
|
|
9268
|
+
const [full, plain] = kpi.model.tiles;
|
|
9269
|
+
return `full ${shape(full)} | plain ${shape(plain)}`;
|
|
9270
|
+
</code></pre>
|
|
9271
|
+
<p>
|
|
9272
|
+
A clock tile measures nothing: <code>kind: 'clock'</code> takes a <code>timeZone</code> and a
|
|
9273
|
+
<code>locale</code> and prints the device clock, the date on one line and the time on the
|
|
9274
|
+
next. <code>seconds: false</code> drops the seconds from the time line and
|
|
9275
|
+
<code>date: false</code> drops the date line entirely, which is what a wall of city clocks
|
|
9276
|
+
along the top of a dashboard usually wants.
|
|
9277
|
+
</p>
|
|
9278
|
+
</div>
|
|
9279
|
+
|
|
9183
9280
|
<h3 id="route-options-examples">Data Router route options, executed</h3>
|
|
9184
9281
|
<div class="example">
|
|
9185
9282
|
<p class="example__label">A per-route filter and transform, executed</p>
|
|
@@ -9686,7 +9783,7 @@ grid.licence.state(); <span class="cmt">// 'licensed' | 'localhost' | 'trial'<
|
|
|
9686
9783
|
|
|
9687
9784
|
<footer>
|
|
9688
9785
|
<p>
|
|
9689
|
-
Lattice Grid 1.68.
|
|
9786
|
+
Lattice Grid 1.68.2 · Copyright © 2026 TOCLOCO Inc. All rights reserved.
|
|
9690
9787
|
Written against the shipped source. Where this guide and the code disagree, the code wins,
|
|
9691
9788
|
please <a href="https://www.latticegrid.dev">tell us</a>.
|
|
9692
9789
|
</p>
|