@toclocoinc/lattice-grid 1.68.1 → 1.69.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 +26 -1
- package/angular/fesm2022/toclocoinc-lattice-grid-angular.mjs +1 -0
- package/angular/package.json +1 -1
- package/docs/API.html +3834 -1278
- package/docs/api-detail.html +102 -4
- package/lattice-grid.d.ts +2635 -143
- package/lattice-grid.esm.min.js +257 -50
- package/lattice-grid.min.cjs +257 -50
- package/lattice-grid.min.css +1 -1
- package/lattice-grid.min.js +257 -50
- package/modules/ai.d.ts +111 -13
- package/modules/ai.esm.min.js +19 -3
- package/modules/ai.min.cjs +19 -3
- package/modules/ai.min.js +19 -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 +1 -1
- package/modules/charts.esm.min.js +9 -9
- package/modules/charts.min.cjs +9 -9
- package/modules/charts.min.js +9 -9
- package/modules/data-router.d.ts +35 -5
- 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 +283 -33
- package/modules/gantt.esm.min.js +15 -8
- package/modules/gantt.min.cjs +15 -8
- package/modules/gantt.min.js +15 -8
- 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 +257 -50
- package/modules/htmx.min.cjs +257 -50
- package/modules/htmx.min.js +257 -50
- package/modules/kanban.d.ts +456 -5
- 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 +68 -4
- 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 +134 -8
- 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 +5 -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 +96 -20
- 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 +5 -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 +10 -39
- package/modules/webcomponent.esm.min.js +302 -54
- package/modules/webcomponent.min.cjs +302 -54
- package/modules/webcomponent.min.js +302 -54
- 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.
|
|
440
|
+
<p class="rail__sub">Developer guide · v1.69.0</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.
|
|
557
|
+
<span class="chip">Version 1.69.0</span>
|
|
558
558
|
<span class="chip">Zero dependencies</span>
|
|
559
559
|
<span class="chip">No build step</span>
|
|
560
560
|
</p>
|
|
@@ -588,6 +588,7 @@ createGrid(element, { locale: 'fr-FR', messages: FR_FR });</code></pre>
|
|
|
588
588
|
|
|
589
589
|
<h3>Keys seeded in English, awaiting translation</h3>
|
|
590
590
|
<p>A key added after a catalogue was written ships in British English only until a translator supplies it; <code>Messages</code> merges every catalogue over the default, so the grid says it in English rather than showing the key. The shipped catalogues do not carry an English copy under the guise of a translation, and the build's completeness test lists exactly which keys are in this state. As of 1.55 the most recent additions are the strings that had shipped as template literals, untranslated in every locale (BACKLOG-0001106): the presence live region and roster note, <code>a11y.presence.refused</code>, <code>presence.someoneElse</code> and <code>presence.hidden</code>; the comment panel's changed-since note, <code>comments.valueMoved</code>; the facet band's accessible name, <code>facets.filter</code>; the heading tooltip that names a reduction, <code>header.totalOf</code>; the audit-mode tooltip, <code>diff.before</code> and <code>diff.empty</code>; the kanban list names, <code>kanban.columnCards</code> and <code>kanban.laneCards</code>, both plural objects selected by <code>count</code>; and the gantt lag label, <code>gantt.lag</code> and <code>gantt.lead</code>. Supply any of them in <code>messages</code> to translate it today.</p>
|
|
591
|
+
<p>The rest of that text followed in 1.69 (BACKLOG-0001172): the gantt's pointer tooltip, <code>gantt.tip.range</code>, <code>gantt.tip.duration</code> and <code>gantt.tip.slack</code> — plain strings rather than plural objects, because the day unit is an abbreviation that does not inflect; the comment panel's own labels, <code>comments.resolve</code>, <code>comments.reopen</code>, <code>comments.loading</code>, <code>comments.empty</code>, <code>comments.unknownAuthor</code>, <code>comments.edited</code> (which takes the already-rendered time as <code>{time}</code>, so the marker need not come last) and <code>comments.cellTitle</code>; the accessible name of each entry in the presence roster, <code>presence.peer</code>, <code>presence.peerIdle</code> and <code>presence.peerHidden</code>; and the reduction named in a column heading, which now reads the same <code>total.*</code> keys the tool panel does, with <code>total.custom</code> for a reduction supplied as a function and <code>total.passRate</code> and <code>total.failureCount</code> for the two capability reductions that had no key at all.</p>
|
|
591
592
|
<p>The kanban board and the gantt view are modules and do not import the catalogue. A board bound to a grid, or a plan created with one, borrows that grid's <code>messages</code>; otherwise pass <code>messages</code> — a grid's own, or any object with <code>t(key, params)</code> — to <code>createKanban</code> or to <code>gantt.mount</code>. With neither they render the English.</p>
|
|
592
593
|
|
|
593
594
|
<div class="why">
|
|
@@ -1492,7 +1493,7 @@ off(); <span class="cmt">// every subscrip
|
|
|
1492
1493
|
</p>
|
|
1493
1494
|
<div class="example">
|
|
1494
1495
|
<p class="example__label">Which version am I running?</p>
|
|
1495
|
-
<pre><code>grid.getVersion(); <span class="cmt">// '1.
|
|
1496
|
+
<pre><code>grid.getVersion(); <span class="cmt">// '1.69.0'</span>
|
|
1496
1497
|
LatticeGrid.getVersion(); <span class="cmt">// the same, when you have no grid to hand</span></code></pre>
|
|
1497
1498
|
</div>
|
|
1498
1499
|
<p class="lead-in">
|
|
@@ -1785,6 +1786,16 @@ dataTypes: {
|
|
|
1785
1786
|
is <code>1.00 MB</code> rather than <code>1,000 kB</code>.
|
|
1786
1787
|
</p>
|
|
1787
1788
|
|
|
1789
|
+
<div class="example">
|
|
1790
|
+
<p class="example__label">Rounding before the rung is chosen: significantFigures, executed</p>
|
|
1791
|
+
<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');
|
|
1792
|
+
|
|
1793
|
+
const spec = { system: 'data', unit: 'B', display: 'auto', locale: 'en-GB' };
|
|
1794
|
+
return (`figures ${formatUnit(999999, { ...spec, significantFigures: 3 })}`
|
|
1795
|
+
+ ` | none ${formatUnit(999999, spec)}`);
|
|
1796
|
+
</code></pre>
|
|
1797
|
+
</div>
|
|
1798
|
+
|
|
1788
1799
|
<p class="lead-in">
|
|
1789
1800
|
<code>compound: ['ft', 'in']</code> renders one stored number across an ordered subset of the
|
|
1790
1801
|
system's units — a length as <code>5 ft 11 in</code>, a duration as <code>1 h 23 m</code>.
|
|
@@ -8200,6 +8211,29 @@ grid.export.print();</code></pre>
|
|
|
8200
8211
|
formatted values, and only the columns they may read.
|
|
8201
8212
|
</p>
|
|
8202
8213
|
|
|
8214
|
+
<div class="example">
|
|
8215
|
+
<p class="example__label">Two options for a file somebody opens in Excel: hidden, bom, executed</p>
|
|
8216
|
+
<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');
|
|
8217
|
+
|
|
8218
|
+
const grid = createHeadlessGrid({
|
|
8219
|
+
rowKey: 'id',
|
|
8220
|
+
rows: [{ id: 1, name: 'Ann', cost: 9 }],
|
|
8221
|
+
columns: [{ field: 'id' }, { field: 'name' }, { field: 'cost', layout: { hidden: true } }],
|
|
8222
|
+
});
|
|
8223
|
+
const plain = grid.export.csv({ rows: 'all' });
|
|
8224
|
+
const wide = grid.export.csv({ rows: 'all', hidden: true, bom: true });
|
|
8225
|
+
const head = (text) => text.replace('\uFEFF', '').split('\r\n')[0];
|
|
8226
|
+
return (`plain ${head(plain)} | wide ${head(wide)} | bom ${plain.charCodeAt(0) === 0xFEFF} then ${wide.charCodeAt(0) === 0xFEFF}`);
|
|
8227
|
+
</code></pre>
|
|
8228
|
+
<p>
|
|
8229
|
+
<code>hidden: true</code> carries the columns the grid is hiding into the file — the
|
|
8230
|
+
column a reader collapsed is still a column the spreadsheet wants. A column that opted out
|
|
8231
|
+
with <code>export.csv: false</code>, or that the reader may not see, is still excluded.
|
|
8232
|
+
<code>bom: true</code> writes the UTF-8 byte-order mark, which is what stops Excel guessing
|
|
8233
|
+
the encoding and rendering every accented name as mojibake.
|
|
8234
|
+
</p>
|
|
8235
|
+
</div>
|
|
8236
|
+
|
|
8203
8237
|
<h3>On the server</h3>
|
|
8204
8238
|
<p class="lead-in">
|
|
8205
8239
|
A user asks to export half a million rows. You can ship them all to the browser to be
|
|
@@ -8256,6 +8290,7 @@ grid.import.apply(preview);</code></pre>
|
|
|
8256
8290
|
<thead><tr><th>Name</th><th>What it does</th></tr></thead>
|
|
8257
8291
|
<tbody>
|
|
8258
8292
|
<tr><td class="name">autoHeight</td><td class="desc">autoHeight.</td></tr>
|
|
8293
|
+
<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
8294
|
<tr><td class="name">bucketFn</td><td class="desc">Replace the built-in bucketing entirely. (optional)</td></tr>
|
|
8260
8295
|
<tr><td class="name">coalesceMs</td><td class="desc">(optional)</td></tr>
|
|
8261
8296
|
<tr><td class="name">columnGroups</td><td class="desc">Header grouping declared separately from the columns.</td></tr>
|
|
@@ -9180,6 +9215,69 @@ return lines.join(' | ');
|
|
|
9180
9215
|
</p>
|
|
9181
9216
|
</div>
|
|
9182
9217
|
|
|
9218
|
+
<div class="example">
|
|
9219
|
+
<p class="example__label">A stat tile in full: kind, aggregation, field, baseline, thresholds, bands, sparkline, executed</p>
|
|
9220
|
+
<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');
|
|
9221
|
+
|
|
9222
|
+
const READINGS = [
|
|
9223
|
+
{ id: 1, host: 'a', hour: 1, cpu: 41, up: true },
|
|
9224
|
+
{ id: 2, host: 'a', hour: 2, cpu: 58, up: true },
|
|
9225
|
+
{ id: 3, host: 'a', hour: 3, cpu: 77, up: true },
|
|
9226
|
+
{ id: 4, host: 'b', hour: 1, cpu: 12, up: false },
|
|
9227
|
+
];
|
|
9228
|
+
const kpi = createKPI(null, {
|
|
9229
|
+
rows: READINGS, rowKey: 'id',
|
|
9230
|
+
tiles: [
|
|
9231
|
+
{ kind: 'stat', id: 'cpu', label: 'CPU', aggregation: 'max', field: 'cpu',
|
|
9232
|
+
filter: (row) => row.up, baseline: 50, delta: 'absolute',
|
|
9233
|
+
thresholds: { warn: 60, critical: 85, direction: 'lowerIsBetter' },
|
|
9234
|
+
sparkline: { x: 'hour', y: 'cpu' } },
|
|
9235
|
+
{ kind: 'stat', id: 'spread', label: 'Spread', aggregation: 'avg', field: 'cpu',
|
|
9236
|
+
bands: [{ max: 40, status: 'good' }, { min: 40, max: 60, status: 'warn' },
|
|
9237
|
+
{ min: 60, status: 'critical' }] },
|
|
9238
|
+
],
|
|
9239
|
+
});
|
|
9240
|
+
const [cpu, spread] = kpi.model.tiles;
|
|
9241
|
+
return (`cpu ${cpu.value} ${cpu.status} | delta ${cpu.delta}`
|
|
9242
|
+
+ ` | spark ${cpu.sparkline.join(',')} | spread ${spread.value} ${spread.status}`);
|
|
9243
|
+
</code></pre>
|
|
9244
|
+
<p>
|
|
9245
|
+
<code>kind: 'stat'</code> is the default and is written here only to sit beside the clock
|
|
9246
|
+
tile below. <code>aggregation</code> and <code>field</code> are the measurement; the
|
|
9247
|
+
<code>filter</code> is what makes the CPU tile read 77 rather than the whole panel's rows;
|
|
9248
|
+
<code>baseline: 50</code> is what the movement line is measured from.
|
|
9249
|
+
<code>thresholds</code> grades against two cut points — here <code>lowerIsBetter</code>,
|
|
9250
|
+
so 77 is a warning — while <code>bands</code> is the explicit alternative, a list of
|
|
9251
|
+
half-open <code>[min, max)</code> ranges, first match winning. <code>sparkline</code> plots
|
|
9252
|
+
the tile's own rows in <code>x</code> order.
|
|
9253
|
+
</p>
|
|
9254
|
+
</div>
|
|
9255
|
+
|
|
9256
|
+
<div class="example">
|
|
9257
|
+
<p class="example__label">A clock tile: kind, seconds, date, executed</p>
|
|
9258
|
+
<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');
|
|
9259
|
+
|
|
9260
|
+
const kpi = createKPI(null, {
|
|
9261
|
+
rows: [], rowKey: 'id', locale: 'en-GB',
|
|
9262
|
+
tiles: [
|
|
9263
|
+
{ kind: 'clock', id: 'utc', label: 'UTC', timeZone: 'UTC' },
|
|
9264
|
+
{ kind: 'clock', id: 'desk', label: 'Desk', timeZone: 'UTC', seconds: false, date: false },
|
|
9265
|
+
],
|
|
9266
|
+
});
|
|
9267
|
+
const shape = (tile) => `${tile.clock.time.split(':').length === 3 ? 'hh:mm:ss' : 'hh:mm'}`
|
|
9268
|
+
+ `${tile.clock.date === null ? ' no date' : ' with date'}`;
|
|
9269
|
+
const [full, plain] = kpi.model.tiles;
|
|
9270
|
+
return `full ${shape(full)} | plain ${shape(plain)}`;
|
|
9271
|
+
</code></pre>
|
|
9272
|
+
<p>
|
|
9273
|
+
A clock tile measures nothing: <code>kind: 'clock'</code> takes a <code>timeZone</code> and a
|
|
9274
|
+
<code>locale</code> and prints the device clock, the date on one line and the time on the
|
|
9275
|
+
next. <code>seconds: false</code> drops the seconds from the time line and
|
|
9276
|
+
<code>date: false</code> drops the date line entirely, which is what a wall of city clocks
|
|
9277
|
+
along the top of a dashboard usually wants.
|
|
9278
|
+
</p>
|
|
9279
|
+
</div>
|
|
9280
|
+
|
|
9183
9281
|
<h3 id="route-options-examples">Data Router route options, executed</h3>
|
|
9184
9282
|
<div class="example">
|
|
9185
9283
|
<p class="example__label">A per-route filter and transform, executed</p>
|
|
@@ -9686,7 +9784,7 @@ grid.licence.state(); <span class="cmt">// 'licensed' | 'localhost' | 'trial'<
|
|
|
9686
9784
|
|
|
9687
9785
|
<footer>
|
|
9688
9786
|
<p>
|
|
9689
|
-
Lattice Grid 1.
|
|
9787
|
+
Lattice Grid 1.69.0 · Copyright © 2026 TOCLOCO Inc. All rights reserved.
|
|
9690
9788
|
Written against the shipped source. Where this guide and the code disagree, the code wins,
|
|
9691
9789
|
please <a href="https://www.latticegrid.dev">tell us</a>.
|
|
9692
9790
|
</p>
|