@toclocoinc/lattice-grid 1.44.1 → 1.45.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 +1 -1
- package/docs/API.html +3 -0
- package/docs/api-detail.html +44 -1
- package/lattice-grid.d.ts +30 -1
- package/lattice-grid.esm.min.js +137 -21
- package/lattice-grid.min.cjs +137 -21
- package/lattice-grid.min.css +1 -1
- package/lattice-grid.min.js +137 -21
- package/modules/ai.esm.min.js +6 -4
- package/modules/ai.min.cjs +6 -4
- package/modules/ai.min.js +6 -4
- package/modules/angular.esm.min.js +2 -2
- package/modules/angular.min.cjs +2 -2
- package/modules/angular.min.js +2 -2
- 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 +1 -1
- 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 +4 -4
- package/modules/charts.min.cjs +4 -4
- package/modules/charts.min.js +4 -4
- 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 +4 -4
- package/modules/gantt.min.cjs +4 -4
- package/modules/gantt.min.js +4 -4
- package/modules/htmx.esm.min.js +137 -21
- package/modules/htmx.min.cjs +137 -21
- package/modules/htmx.min.js +137 -21
- package/modules/kanban.esm.min.js +4 -4
- package/modules/kanban.min.cjs +4 -4
- package/modules/kanban.min.js +4 -4
- 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 +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 +137 -21
- package/modules/webcomponent.min.cjs +137 -21
- package/modules/webcomponent.min.js +137 -21
- 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.45.0 · [latticegrid.dev](https://www.latticegrid.dev) · TOCLOCO Inc
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
package/docs/API.html
CHANGED
|
@@ -880,6 +880,7 @@ autoInit(document); <span class="cmt">// builds every [data-lattice-grid] under
|
|
|
880
880
|
<tr><td class="name">responsive</td><td class="type">{ maxWidth, template, rowHeight }</td><td class="dflt">, </td><td class="desc">Collapse to cards when the <em>container</em> is at or below <code>maxWidth</code> (640 by default), and return to a table above it. Sorting, filtering and export keep working. Emits <code>presentation:changed</code>. See <a href="api-detail.html#cards">Cards, lists and feeds</a>.</td></tr>
|
|
881
881
|
<tr><td class="name">rowForm</td><td class="type">boolean | { mode, load, fields, title, width, trigger, timeout, container }</td><td class="dflt">, </td><td class="desc">Open a row for editing on a form. <code>mode: 'drawer'</code> (default) or <code>'dialog'</code>; without <code>load</code> the fields are the grid's own columns. A field entry is <code>{ field, label, editor, type, props, lookup }</code>: any editor, including your own. Takes double-click on the row unless <code>trigger: false</code>. A load that has not answered within <code>timeout</code> milliseconds (2000; <code>false</code> waits indefinitely) is reported as a failure with a retry. <code>container</code> builds the form in an element of your own instead of over the grid. See <a href="api-detail.html#row-form">Editing a row on a form</a>.</td></tr>
|
|
882
882
|
<tr><td class="name">showColumnFunctions</td><td class="type">boolean</td><td class="dflt">true</td><td class="desc"><code>false</code> leaves each heading as its label, with no sort, filter or menu control. Those remain reachable through the API, the keyboard and the tool panel.</td></tr>
|
|
883
|
+
<tr><td class="name">headerControls</td><td class="type">'hover' | 'always' | 'hidden'</td><td class="dflt">'hover'</td><td class="desc">When the per-column header controls — the sort arrow, the filter funnel and the menu button — are shown, as a default for every column. <code>'hover'</code> reveals them on hover or keyboard focus (the historical behaviour); <code>'always'</code> keeps them visible; <code>'hidden'</code> draws none of them for a clean read-only heading and leaves them out of the tab order. A column's own <code>headerControls</code> overrides this default for that column. Distinct from <code>showColumnFunctions: false</code>, which also drops the furniture but keeps the functions reachable from the keyboard; <code>'hidden'</code> is the read-only choice.</td></tr>
|
|
883
884
|
<tr><td class="name">significantFigures</td><td class="type">number</td><td class="dflt">, </td><td class="desc">On a unit column, render to this many significant figures rather than a fixed number of decimals, so precision is the same on every rung of the ladder. Rounding is applied before the unit is chosen. Set inside the unit configuration a data type is built from. See <a href="api-detail.html#units">Units</a>.</td></tr>
|
|
884
885
|
<tr><td class="name">typeOptions</td><td class="type">object</td><td class="dflt">, </td><td class="desc">Per-column options a data type reads. <code>ratio</code> and <code>percentRate</code> use <code>{ weight }</code> to name the column their average is weighted by. See <a href="api-detail.html#aggregate-safety">Aggregate safety</a>.</td></tr>
|
|
885
886
|
<tr><td class="name">highlightOnChange</td><td class="type">boolean | string | object</td><td class="desc">Flash a cell when its value changes. <code>{ colour, duration }</code>; <code>duration: 0</code> stays until cleared.</td></tr>
|
|
@@ -6977,6 +6978,7 @@ return `next ${p.mean.toFixed(1)}; r2 ${f.r2.toFixed(1)}; band ${p.upper - p.low
|
|
|
6977
6978
|
<tr><td class="name">spec</td><td class="type">{ lower?: number; upper?: number; target?: number }</td><td class="desc">The customer's tolerance, for process capability and control charts. Declared here rather than passed to each call so the capability figures, a control chart and any rule marking an out-of-tolerance cell cannot disagree about what the tolerance is. <small>(optional)</small></td></tr>
|
|
6978
6979
|
<tr><td class="name">layout</td><td class="type">ColumnLayoutSpec | number</td><td class="desc">Width, pinning and flex. A bare number is the width in pixels. <small>(optional)</small></td></tr>
|
|
6979
6980
|
<tr><td class="name">header</td><td class="type">ColumnHeaderSpec | string</td><td class="desc">The header cell: its text, tooltip, menu and any header chart. <small>(optional)</small></td></tr>
|
|
6981
|
+
<tr><td class="name">headerControls</td><td class="type">'hover' | 'always' | 'hidden'</td><td class="desc">When this column's header controls — its sort arrow, filter funnel and menu button — are shown, overriding the grid-level `headerControls` default for this column alone (BACKLOG-0000982). `'hover'` reveals them on hover or focus, `'always'` keeps them visible, `'hidden'` draws none of them and leaves them out of the tab order. Omitted, the column follows the grid default, which is itself `'hover'`. <small>(optional)</small></td></tr>
|
|
6980
6982
|
<tr><td class="name">export</td><td class="type">ColumnExportSpec</td><td class="desc">How the column leaves the grid, where that differs from how it is shown. <small>(optional)</small></td></tr>
|
|
6981
6983
|
<tr><td class="name">allowGroup</td><td class="type">boolean</td><td class="desc">Whether the user may group by this column from the interface. <small>(optional)</small></td></tr>
|
|
6982
6984
|
<tr><td class="name">allowPivot</td><td class="type">boolean</td><td class="desc">Whether the user may pivot on it. <small>(optional)</small></td></tr>
|
|
@@ -8231,6 +8233,7 @@ return `next ${p.mean.toFixed(1)}; r2 ${f.r2.toFixed(1)}; band ${p.upper - p.low
|
|
|
8231
8233
|
<tr><td class="name">responsive</td><td class="type">{</td><td class="desc">Present rows as cards when the grid's container is too narrow to be a table honestly, a phone, or a narrow panel on a wide screen. Measured on the container, not the viewport, so a grid in a sidebar collapses and a grid filling a small tablet does not. Sorting, filtering and export continue to work; the tool panel is where they live when there are no column headings to click. Emits `presentation:changed`. <small>(optional)</small></td></tr>
|
|
8232
8234
|
<tr><td class="name">rowForm</td><td class="type">boolean | {</td><td class="desc"><small>(optional)</small></td></tr>
|
|
8233
8235
|
<tr><td class="name">showColumnFunctions</td><td class="type">boolean</td><td class="desc">Draw the sort, filter and menu controls in the column headings. `true` by default. `false` leaves each heading as its label alone, which is what a dense grid wants: three affordances take roughly fifty pixels, and on an eighty-pixel column that leaves the heading nothing and the label disappears entirely. Only the furniture goes. Sorting, filtering and the column menu are still reachable through the API, the keyboard and the tool panel. <small>(optional)</small></td></tr>
|
|
8236
|
+
<tr><td class="name">headerControls</td><td class="type">'hover' | 'always' | 'hidden'</td><td class="desc">When the per-column header controls — the sort arrow, the filter funnel and the menu button — are shown, as a default for every column (BACKLOG-0000982). - `'hover'` (the default) reveals them when the heading is hovered or a keyboard user focuses into it, which is the historical behaviour: a wide header does not read as a row of identical icons. - `'always'` keeps them visible unconditionally, for a grid where the controls are the point and the discoverability of hover is not wanted. - `'hidden'` draws none of them, for a clean read-only heading; they leave the tab order with the elements that carried them. An active filter and a live sort are still reflected by the heading's state attributes, but no control furniture is built. A column's own `headerControls` overrides this default for that column. Distinct from `showColumnFunctions: false`, which also drops the furniture but keeps sorting, filtering and the menu reachable from the keyboard; `'hidden'` is the read-only choice that removes them outright. <small>(optional)</small></td></tr>
|
|
8234
8237
|
<tr><td class="name">rowHeight</td><td class="type">number | ((row: Row) => number)</td><td class="desc">Row height in pixels, or a function of the row. A function makes the grid measure rather than assume, which costs a pass over what is on screen: worth it for wrapped text, wasteful for a uniform grid. <small>(optional)</small></td></tr>
|
|
8235
8238
|
<tr><td class="name">title</td><td class="type">string</td><td class="desc">A caption for the grid, drawn above the column headings. Inside the grid rather than an element the host places above it: a title outside does not scroll with the grid, is not in the region a screen reader announces, and is left behind by image capture and print. <small>(optional)</small></td></tr>
|
|
8236
8239
|
<tr><td class="name">showHeader</td><td class="type">boolean</td><td class="desc">Draw the column headings at all. `true` by default. `false` removes the row, and removes it from the accessibility tree rather than only from view, a heading a screen reader still announces is invisible, not hidden. What a small dashboard tile wants when its `title` already says what the panel is. Distinct from `showColumnFunctions`, which keeps the headings and drops only the sort, filter and menu controls inside them. <small>(optional)</small></td></tr>
|
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.45.0</p>
|
|
441
441
|
<nav>
|
|
442
442
|
<div class="rail__group">
|
|
443
443
|
<span class="rail__label">Start here</span>
|
|
@@ -2194,6 +2194,49 @@ grid.destroy();
|
|
|
2194
2194
|
reporting a value it is unsure of.
|
|
2195
2195
|
</p>
|
|
2196
2196
|
|
|
2197
|
+
<h3 id="header-controls">headerControls</h3>
|
|
2198
|
+
<p class="lead-in">
|
|
2199
|
+
The per-column header controls — the sort arrow, the filter funnel and the menu button
|
|
2200
|
+
— appear on hover by default, which keeps a wide header from reading as a row of identical
|
|
2201
|
+
icons. <code>headerControls</code> makes that a mode: <code>'hover'</code> (the default,
|
|
2202
|
+
unchanged), <code>'always'</code> to keep them visible, and <code>'hidden'</code> for a clean
|
|
2203
|
+
read-only heading that draws none of them and leaves them out of the tab order. It is a
|
|
2204
|
+
grid-level default; a column's own <code>headerControls</code> overrides it for that column.
|
|
2205
|
+
</p>
|
|
2206
|
+
<p class="lead-in">
|
|
2207
|
+
Each leaf heading carries the resolved mode as <code>data-controls</code>, and the theme keys
|
|
2208
|
+
the reveal off it, so <code>'always'</code> shows the controls without a hover and
|
|
2209
|
+
<code>'hidden'</code> removes them from the layout. This differs from
|
|
2210
|
+
<code>showColumnFunctions: false</code>, which also drops the furniture but keeps sorting,
|
|
2211
|
+
filtering and the menu reachable from the keyboard; <code>'hidden'</code> is the read-only
|
|
2212
|
+
choice that takes them away outright (BACKLOG-0000982).
|
|
2213
|
+
</p>
|
|
2214
|
+
<div class="example">
|
|
2215
|
+
<p class="example__label">A grid that hides its controls by default, with one column that keeps them</p>
|
|
2216
|
+
<pre data-run="js" data-expect="1" data-covers="config:headerControls"><code><span class="kw">const</span> { createHeadlessGrid } = <span class="kw">await</span> import('../packages/core/src/index.js');
|
|
2217
|
+
|
|
2218
|
+
<span class="kw">const</span> grid = createHeadlessGrid({
|
|
2219
|
+
headerControls: 'hidden', <span class="cmt">// the read-only default for every column</span>
|
|
2220
|
+
columns: [
|
|
2221
|
+
{ field: 'name' }, <span class="cmt">// follows the default: hidden</span>
|
|
2222
|
+
{ field: 'region', headerControls: 'always' }, <span class="cmt">// this column overrides the default</span>
|
|
2223
|
+
{ field: 'qty', type: 'number' }, <span class="cmt">// follows the default: hidden</span>
|
|
2224
|
+
],
|
|
2225
|
+
rows: [{ name: 'a', region: 'x', qty: 1 }],
|
|
2226
|
+
rowKey: 'name',
|
|
2227
|
+
});
|
|
2228
|
+
|
|
2229
|
+
<span class="cmt">// Resolve each column the way the header renderer does: its own value wins,</span>
|
|
2230
|
+
<span class="cmt">// then the grid default. Only the overriding column shows its controls.</span>
|
|
2231
|
+
<span class="kw">function</span> shown(id) {
|
|
2232
|
+
<span class="kw">const</span> own = grid.columns.get(id).def.headerControls;
|
|
2233
|
+
<span class="kw">return</span> (own || 'hidden') !== 'hidden';
|
|
2234
|
+
}
|
|
2235
|
+
<span class="kw">const</span> visible = ['name', 'region', 'qty'].filter(shown).length;
|
|
2236
|
+
grid.destroy();
|
|
2237
|
+
<span class="kw">return</span> visible;</code></pre>
|
|
2238
|
+
</div>
|
|
2239
|
+
|
|
2197
2240
|
<h3 id="show-total-in-header">showTotalInHeader</h3>
|
|
2198
2241
|
<p class="lead-in">
|
|
2199
2242
|
Under grouping or pivot, a totalled column's cells hold an aggregate rather than a row's own
|
package/lattice-grid.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.
|
|
2
|
+
* Lattice Grid 1.45.0, type declarations
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -823,6 +823,15 @@ export interface Column {
|
|
|
823
823
|
layout?: ColumnLayoutSpec | number;
|
|
824
824
|
/** The header cell: its text, tooltip, menu and any header chart. */
|
|
825
825
|
header?: ColumnHeaderSpec | string;
|
|
826
|
+
/**
|
|
827
|
+
* When this column's header controls — its sort arrow, filter funnel and menu
|
|
828
|
+
* button — are shown, overriding the grid-level `headerControls` default for
|
|
829
|
+
* this column alone (BACKLOG-0000982). `'hover'` reveals them on hover or
|
|
830
|
+
* focus, `'always'` keeps them visible, `'hidden'` draws none of them and
|
|
831
|
+
* leaves them out of the tab order. Omitted, the column follows the grid
|
|
832
|
+
* default, which is itself `'hover'`.
|
|
833
|
+
*/
|
|
834
|
+
headerControls?: 'hover' | 'always' | 'hidden';
|
|
826
835
|
/** How the column leaves the grid, where that differs from how it is shown. */
|
|
827
836
|
export?: ColumnExportSpec;
|
|
828
837
|
/** Whether the user may group by this column from the interface. */
|
|
@@ -1733,6 +1742,26 @@ export interface GridConfig {
|
|
|
1733
1742
|
* reachable through the API, the keyboard and the tool panel.
|
|
1734
1743
|
*/
|
|
1735
1744
|
showColumnFunctions?: boolean;
|
|
1745
|
+
/**
|
|
1746
|
+
* When the per-column header controls — the sort arrow, the filter funnel and
|
|
1747
|
+
* the menu button — are shown, as a default for every column (BACKLOG-0000982).
|
|
1748
|
+
*
|
|
1749
|
+
* - `'hover'` (the default) reveals them when the heading is hovered or a
|
|
1750
|
+
* keyboard user focuses into it, which is the historical behaviour: a wide
|
|
1751
|
+
* header does not read as a row of identical icons.
|
|
1752
|
+
* - `'always'` keeps them visible unconditionally, for a grid where the
|
|
1753
|
+
* controls are the point and the discoverability of hover is not wanted.
|
|
1754
|
+
* - `'hidden'` draws none of them, for a clean read-only heading; they leave
|
|
1755
|
+
* the tab order with the elements that carried them. An active filter and a
|
|
1756
|
+
* live sort are still reflected by the heading's state attributes, but no
|
|
1757
|
+
* control furniture is built.
|
|
1758
|
+
*
|
|
1759
|
+
* A column's own `headerControls` overrides this default for that column.
|
|
1760
|
+
* Distinct from `showColumnFunctions: false`, which also drops the furniture
|
|
1761
|
+
* but keeps sorting, filtering and the menu reachable from the keyboard;
|
|
1762
|
+
* `'hidden'` is the read-only choice that removes them outright.
|
|
1763
|
+
*/
|
|
1764
|
+
headerControls?: 'hover' | 'always' | 'hidden';
|
|
1736
1765
|
/**
|
|
1737
1766
|
* Row height in pixels, or a function of the row. A function makes the
|
|
1738
1767
|
* grid measure rather than assume, which costs a pass over what is on
|