@toclocoinc/lattice-grid 1.18.0 → 1.19.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 +38 -0
- package/docs/api-detail.html +43 -1
- package/lattice-grid.d.ts +127 -1
- package/lattice-grid.esm.min.js +917 -188
- package/lattice-grid.min.cjs +917 -188
- package/lattice-grid.min.css +1 -1
- package/lattice-grid.min.js +917 -188
- package/modules/charts.esm.min.js +14 -3
- package/modules/devtools.esm.min.js +2 -2
- package/modules/dhtmlx-compat.esm.min.js +4 -4
- package/modules/htmx.esm.min.js +917 -188
- package/modules/htmx.min.cjs +917 -188
- package/modules/htmx.min.js +917 -188
- package/modules/react.esm.min.js +2 -2
- package/modules/svelte.esm.min.js +2 -2
- package/modules/vue.esm.min.js +2 -2
- package/modules/webcomponent.esm.min.js +917 -188
- 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.19.0 · [latticegrid.dev](https://www.latticegrid.dev) · TOCLOCO Inc
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
package/docs/API.html
CHANGED
|
@@ -871,6 +871,9 @@ autoInit(document); <span class="cmt">// builds every [data-lattice-grid] under
|
|
|
871
871
|
<tr><td class="name">stripedRows</td><td class="type">boolean</td><td class="dflt">false</td><td class="desc">Shade alternate data rows (zebra striping). Strictly opt-in, so an existing grid is unchanged on upgrade. Parity follows each row's logical index, so a stripe survives a scroll; group headings, footers and the grand total are never striped; selection and hover still win. Uses the theme's <code>--lattice-surface-alt</code>, so dark, high-contrast and terminal come for free.</td></tr>
|
|
872
872
|
<tr><td class="name">columnTagFilter</td><td class="type">boolean | { multiple, label }</td><td class="dflt">, </td><td class="desc">A bar above the headings for showing only the columns carrying a chosen tag. Draws nothing unless some column has <code>tags</code>. See <a href="api-detail.html#column-tags">Column tags</a>.</td></tr>
|
|
873
873
|
<tr><td class="name">rowTemplate</td><td class="type">string | { template, cardsPerRow, maxCardWidth, gap, className, role, itemRole }</td><td class="dflt">, </td><td class="desc">Draw each row with a template instead of dividing it into columns, a card list, a feed, a search-result list. Compiles once; binds with <code>{{data.field}}</code>. <code>cardsPerRow</code> or <code>maxCardWidth</code> puts several on a line. The pipeline underneath is unchanged. See <a href="api-detail.html#cards">Cards, lists and feeds</a>.</td></tr>
|
|
874
|
+
<tr><td class="name">gallery</td><td class="type">boolean | { template, tileWidth, tileHeight, cardsPerRow, gap, className, role, itemRole }</td><td class="dflt">, </td><td class="desc">Present rows as a gallery of tiles, laid out by the same 2-D virtualisation the grid runs. <code>true</code> generates a tile per row from the columns; <code>tileWidth</code> sizes them and the count across follows the container, or <code>cardsPerRow</code> fixes it. Presentation only — sort, filter, group and export are unchanged. See <a href="api-detail.html#cards">Cards, lists and feeds</a>.</td></tr>
|
|
875
|
+
<tr><td class="name">recordCard</td><td class="type">boolean | { template, cardHeight, className, role, itemRole }</td><td class="dflt">, </td><td class="desc">Present each row as a record card — a form of label/value pairs, one line per column in display order, showing the same text the table shows. <code>true</code> generates the form from the columns. A card list underneath, so it inherits the virtualisation and every card interaction. Presentation only. See <a href="api-detail.html#cards">Cards, lists and feeds</a>.</td></tr>
|
|
876
|
+
<tr><td class="name">board</td><td class="type">boolean | { template, laneWidth, cardHeight, laneGap, gap, className, role, itemRole }</td><td class="dflt">, </td><td class="desc">Present rows as a board — a kanban of grouped lanes of cards. The top-level group becomes a lane and every leaf under it becomes a card stacked in it; group the grid to give the board its lanes. <code>true</code> generates a card per row from the columns. Both axes are virtualised, the lanes across and the cards down each, so a board of many long lanes draws only what is on screen. A board card is still a row: it clicks, selects and drags through the grid's own handlers. Presentation only — sort, filter, group and export are unchanged. See <a href="api-detail.html#cards">Cards, lists and feeds</a>.</td></tr>
|
|
874
877
|
<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>
|
|
875
878
|
<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>
|
|
876
879
|
<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>
|
|
@@ -5044,6 +5047,8 @@ grid.destroy();
|
|
|
5044
5047
|
<tr><td class="name">total</td><td class="type">TotalName | null</td><td class="desc"><small>(optional)</small></td></tr>
|
|
5045
5048
|
<tr><td class="name">groupTotal</td><td class="type">TotalName | null</td><td class="desc">The group-subtotal override, when one differs from `total`. <small>(optional)</small></td></tr>
|
|
5046
5049
|
<tr><td class="name">grandTotal</td><td class="type">TotalName | null</td><td class="desc">The grand-total override, when one differs from `total`. <small>(optional)</small></td></tr>
|
|
5050
|
+
<tr><td class="name">decoration</td><td class="type">DecorationName | DecorationSpec | null</td><td class="desc">The column's runtime decoration (BACKLOG-0000723), present only when the column carries one, so a `columns.decorate()` survives a saved view and participates in undo/redo. Absent means "not recorded"; an explicit `null` on an undo patch clears a decoration back to plain text. <small>(optional)</small></td></tr>
|
|
5051
|
+
<tr><td class="name">variant</td><td class="type">VariantSpec | null</td><td class="desc">The variant set alongside the decoration, when one is present. <small>(optional)</small></td></tr>
|
|
5047
5052
|
</tbody>
|
|
5048
5053
|
</table>
|
|
5049
5054
|
</div>
|
|
@@ -5500,6 +5505,33 @@ grid.destroy();
|
|
|
5500
5505
|
</tbody>
|
|
5501
5506
|
</table>
|
|
5502
5507
|
</div>
|
|
5508
|
+
<h3 id="type-ExcelBorderSpec">ExcelBorderSpec</h3>
|
|
5509
|
+
<p class="section-note">A cell border, per edge. `true` means a thin line; a string names the style.</p>
|
|
5510
|
+
<div class="table-wrap">
|
|
5511
|
+
<table>
|
|
5512
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
5513
|
+
<tbody>
|
|
5514
|
+
<tr><td class="name">left</td><td class="type">boolean | string</td><td class="desc"><small>(optional)</small></td></tr>
|
|
5515
|
+
<tr><td class="name">right</td><td class="type">boolean | string</td><td class="desc"><small>(optional)</small></td></tr>
|
|
5516
|
+
<tr><td class="name">top</td><td class="type">boolean | string</td><td class="desc"><small>(optional)</small></td></tr>
|
|
5517
|
+
<tr><td class="name">bottom</td><td class="type">boolean | string</td><td class="desc"><small>(optional)</small></td></tr>
|
|
5518
|
+
</tbody>
|
|
5519
|
+
</table>
|
|
5520
|
+
</div>
|
|
5521
|
+
<h3 id="type-ExcelCellStyle">ExcelCellStyle</h3>
|
|
5522
|
+
<p class="section-note">A conditional-formatting rule's rendering, returned by `cellStyle`.</p>
|
|
5523
|
+
<div class="table-wrap">
|
|
5524
|
+
<table>
|
|
5525
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
5526
|
+
<tbody>
|
|
5527
|
+
<tr><td class="name">bold</td><td class="type">boolean</td><td class="desc"><small>(optional)</small></td></tr>
|
|
5528
|
+
<tr><td class="name">italic</td><td class="type">boolean</td><td class="desc"><small>(optional)</small></td></tr>
|
|
5529
|
+
<tr><td class="name">colour</td><td class="type">string</td><td class="desc">Font colour as 6- or 8-digit hex/ARGB, e.g. 'FFFF0000'. `color` is an alias. <small>(optional)</small></td></tr>
|
|
5530
|
+
<tr><td class="name">color</td><td class="type">string</td><td class="desc"><small>(optional)</small></td></tr>
|
|
5531
|
+
<tr><td class="name">fill</td><td class="type">string</td><td class="desc">Solid fill colour as 6- or 8-digit hex/ARGB. <small>(optional)</small></td></tr>
|
|
5532
|
+
</tbody>
|
|
5533
|
+
</table>
|
|
5534
|
+
</div>
|
|
5503
5535
|
<h3 id="type-ExcelExportOptions">ExcelExportOptions</h3>
|
|
5504
5536
|
<div class="table-wrap">
|
|
5505
5537
|
<table>
|
|
@@ -5508,6 +5540,9 @@ grid.destroy();
|
|
|
5508
5540
|
<tr><td class="name">sheetName</td><td class="type">string</td><td class="desc"><small>(optional)</small></td></tr>
|
|
5509
5541
|
<tr><td class="name">freezePanes</td><td class="type">boolean</td><td class="desc"><small>(optional)</small></td></tr>
|
|
5510
5542
|
<tr><td class="name">variantFills</td><td class="type">boolean</td><td class="desc"><small>(optional)</small></td></tr>
|
|
5543
|
+
<tr><td class="name">borders</td><td class="type">boolean | string | ExcelBorderSpec</td><td class="desc">Draw cell borders on the data grid. `false` (default) is borderless; `true` draws a thin box; a string names the line style; an object picks edges. <small>(optional)</small></td></tr>
|
|
5544
|
+
<tr><td class="name">hiddenColumns</td><td class="type">'omit' | 'hidden'</td><td class="desc">What to do with grid-hidden columns. `'omit'` (default) drops them; `'hidden'` keeps them as Excel-hidden columns for round-trip fidelity. <small>(optional)</small></td></tr>
|
|
5545
|
+
<tr><td class="name">merges</td><td class="type">string[]</td><td class="desc">Explicit merged body ranges in A1 form, e.g. ['A3:A4']. <small>(optional)</small></td></tr>
|
|
5511
5546
|
<tr><td class="name">onProgress</td><td class="type">(p: { written: number; total: number }) => void</td><td class="desc"><small>(optional)</small></td></tr>
|
|
5512
5547
|
</tbody>
|
|
5513
5548
|
</table>
|
|
@@ -5828,6 +5863,9 @@ grid.destroy();
|
|
|
5828
5863
|
<tr><td class="name">columnTagFilter</td><td class="type">boolean | { multiple?: boolean; label?: string }</td><td class="desc">Show a bar above the column headings for filtering columns by tag. Off by default, and it draws nothing unless some column carries a `tags` entry. `multiple: true` lets more than one tag be chosen at once. Only tagged columns are ever hidden, so an untagged account or total column stays visible whatever is selected. <small>(optional)</small></td></tr>
|
|
5829
5864
|
<tr><td class="name">typeOptions</td><td class="type">Record<string, {</td><td class="desc">Per-column options a data type reads. `ratio` and `percentRate` use `{ weight }` to name the column their average is weighted by. A unit type reads `{ significantFigures }` to render to a fixed precision rather than a fixed number of decimals. <small>(optional)</small></td></tr>
|
|
5830
5865
|
<tr><td class="name">rowTemplate</td><td class="type">string | {</td><td class="desc"><small>(optional)</small></td></tr>
|
|
5866
|
+
<tr><td class="name">gallery</td><td class="type">boolean | {</td><td class="desc">Present rows as a gallery of tiles (§7.12). The tiled card layout with a size-driven column count: tiles as wide as `tileWidth` allows, as many across as the container holds, laid out by the same 2-D virtualisation the grid already runs. `true` draws a tile per row generated from the columns; an object sizes them or supplies a template. Presentation only — sort, filter, group and the data pipeline are unchanged. <small>(optional)</small></td></tr>
|
|
5867
|
+
<tr><td class="name">recordCard</td><td class="type">boolean | {</td><td class="desc">Present each row as a record card — a form of label/value pairs (§7.11). For a screen where reading one record matters more than comparing many. `true` draws a card per row generated from the columns, each column a labelled line in display order, showing the same text the table shows. An object supplies a template or sizes the card. A card list underneath, so it inherits the virtualisation and every interaction a card carries. Presentation only — sort, filter, group and the data pipeline are unchanged. <small>(optional)</small></td></tr>
|
|
5868
|
+
<tr><td class="name">board</td><td class="type">boolean | {</td><td class="desc">Present rows as a board — a kanban of grouped lanes of cards (§7.14). The top-level group becomes a lane and every leaf under it becomes a card stacked in that lane: a pipeline by stage, a task list by status, a backlog by owner. `true` draws a card per row generated from the columns; an object sizes the lanes and cards or supplies a template. Group the grid to give the board its lanes; an ungrouped board is a single lane of every card. A card is drawn through the same code the other card presentations use, so a board card is still a row: it clicks, selects and drags through the grid's own handlers, masks protected columns, and shows the same text the table shows. Both axes are virtualised — the lanes across and the cards down each — so a board of many long lanes renders only what is on screen. Presentation only: sort, filter, group and the data pipeline are unchanged. <small>(optional)</small></td></tr>
|
|
5831
5869
|
<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>
|
|
5832
5870
|
<tr><td class="name">rowForm</td><td class="type">boolean | {</td><td class="desc"><small>(optional)</small></td></tr>
|
|
5833
5871
|
<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>
|
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.19.0</p>
|
|
441
441
|
<nav>
|
|
442
442
|
<div class="rail__group">
|
|
443
443
|
<span class="rail__label">Start here</span>
|
|
@@ -3172,6 +3172,48 @@ columns: [
|
|
|
3172
3172
|
record is a small piece of layout rather than a line of cells.
|
|
3173
3173
|
</p>
|
|
3174
3174
|
|
|
3175
|
+
<p class="lead-in">
|
|
3176
|
+
Two shorthands sit on top of it for the shapes that recur. <code>recordCard</code> presents each
|
|
3177
|
+
row as a record card — a form of label/value pairs, one line per column in display order,
|
|
3178
|
+
showing the same text the table shows — for a screen where reading one record matters more
|
|
3179
|
+
than comparing many. <code>gallery</code> presents the rows as a grid of tiles laid out by the
|
|
3180
|
+
same 2-D virtualisation the grid already runs. Both take <code>true</code> to generate the layout
|
|
3181
|
+
from the columns, or an object to size it or supply a template, and both are presentation only:
|
|
3182
|
+
sort, filter, group and the data pipeline are unchanged.
|
|
3183
|
+
</p>
|
|
3184
|
+
|
|
3185
|
+
<p class="lead-in">
|
|
3186
|
+
<code>board</code> is the third shape: a kanban of grouped lanes of cards. Group the grid and the
|
|
3187
|
+
top-level group becomes a lane, with every leaf under it a card stacked in that lane — a
|
|
3188
|
+
pipeline by stage, a task list by status, a backlog by owner. Both axes are virtualised, the lanes
|
|
3189
|
+
across and the cards down each, so a board of many long lanes draws only what is on screen. A board
|
|
3190
|
+
card is still a row: it clicks, selects and drags through the grid's own handlers, and masks
|
|
3191
|
+
protected columns exactly as every other card does. Like the others it is presentation only.
|
|
3192
|
+
</p>
|
|
3193
|
+
|
|
3194
|
+
<div class="example">
|
|
3195
|
+
<p class="example__label">The shorthands, and the config a grid reports back</p>
|
|
3196
|
+
<pre data-run="js" data-expect="recordCard true, gallery 240px, board 300px" data-covers="config:recordCard config:gallery config:board"><code><span class="kw">const</span> { createHeadlessGrid } = <span class="kw">await</span> import('../packages/core/src/index.js');
|
|
3197
|
+
|
|
3198
|
+
<span class="kw">const</span> grid = createHeadlessGrid({
|
|
3199
|
+
columns: [{ field: 'name' }, { field: 'owner' }],
|
|
3200
|
+
rows: [
|
|
3201
|
+
{ id: '1', name: 'Alpha', owner: 'Ada' },
|
|
3202
|
+
{ id: '2', name: 'Beta', owner: 'Ben' },
|
|
3203
|
+
],
|
|
3204
|
+
rowKey: 'id',
|
|
3205
|
+
<span class="cmt">// Each row as a labelled record card…</span>
|
|
3206
|
+
recordCard: <span class="kw">true</span>,
|
|
3207
|
+
<span class="cmt">// …or a gallery of size-driven tiles…</span>
|
|
3208
|
+
gallery: { tileWidth: 240 },
|
|
3209
|
+
<span class="cmt">// …or a kanban of grouped lanes. Presentation only.</span>
|
|
3210
|
+
board: { laneWidth: 300 },
|
|
3211
|
+
});
|
|
3212
|
+
|
|
3213
|
+
<span class="kw">const</span> c = grid.config();
|
|
3214
|
+
<span class="kw">return</span> `recordCard ${c.recordCard === <span class="kw">true</span>}, gallery ${c.gallery.tileWidth}px, board ${c.board.laneWidth}px`;</code></pre>
|
|
3215
|
+
</div>
|
|
3216
|
+
|
|
3175
3217
|
<div class="example">
|
|
3176
3218
|
<p class="example__label">A card list</p>
|
|
3177
3219
|
<pre><code>createGrid(element, {
|
package/lattice-grid.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.
|
|
2
|
+
* Lattice Grid 1.19.0, type declarations
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -1303,6 +1303,92 @@ export interface GridConfig {
|
|
|
1303
1303
|
gap?: number;
|
|
1304
1304
|
};
|
|
1305
1305
|
|
|
1306
|
+
/**
|
|
1307
|
+
* Present rows as a gallery of tiles (§7.12).
|
|
1308
|
+
*
|
|
1309
|
+
* The tiled card layout with a size-driven column count: tiles as wide as
|
|
1310
|
+
* `tileWidth` allows, as many across as the container holds, laid out by the
|
|
1311
|
+
* same 2-D virtualisation the grid already runs. `true` draws a tile per row
|
|
1312
|
+
* generated from the columns; an object sizes them or supplies a template.
|
|
1313
|
+
* Presentation only — sort, filter, group and the data pipeline are unchanged.
|
|
1314
|
+
*/
|
|
1315
|
+
gallery?: boolean | {
|
|
1316
|
+
/** The tile layout. Generated from the columns when omitted. */
|
|
1317
|
+
template?: string;
|
|
1318
|
+
/** How wide a tile aims to be; the count across follows the container. 240 by default. */
|
|
1319
|
+
tileWidth?: number;
|
|
1320
|
+
/** How tall a tile is. 180 by default. */
|
|
1321
|
+
tileHeight?: number;
|
|
1322
|
+
/** A fixed number of tiles on a line, instead of `tileWidth`. Does not reflow. */
|
|
1323
|
+
cardsPerRow?: number;
|
|
1324
|
+
/** Space between tiles, in pixels. 8 by default. */
|
|
1325
|
+
gap?: number;
|
|
1326
|
+
/** A class of your own on every tile, alongside the grid's. */
|
|
1327
|
+
className?: string;
|
|
1328
|
+
/** The layer's role. `list` by default; `listbox` for a selectable set. */
|
|
1329
|
+
role?: string;
|
|
1330
|
+
/** Each tile's role. `listitem` by default. */
|
|
1331
|
+
itemRole?: string;
|
|
1332
|
+
};
|
|
1333
|
+
|
|
1334
|
+
/**
|
|
1335
|
+
* Present each row as a record card — a form of label/value pairs (§7.11).
|
|
1336
|
+
*
|
|
1337
|
+
* For a screen where reading one record matters more than comparing many.
|
|
1338
|
+
* `true` draws a card per row generated from the columns, each column a
|
|
1339
|
+
* labelled line in display order, showing the same text the table shows. An
|
|
1340
|
+
* object supplies a template or sizes the card. A card list underneath, so it
|
|
1341
|
+
* inherits the virtualisation and every interaction a card carries.
|
|
1342
|
+
* Presentation only — sort, filter, group and the data pipeline are unchanged.
|
|
1343
|
+
*/
|
|
1344
|
+
recordCard?: boolean | {
|
|
1345
|
+
/** The card layout. Generated from the columns as label/value pairs when omitted. */
|
|
1346
|
+
template?: string;
|
|
1347
|
+
/** How tall a card is. 200 by default; a form needs room per field. */
|
|
1348
|
+
cardHeight?: number;
|
|
1349
|
+
/** A class of your own on every card, alongside the grid's. */
|
|
1350
|
+
className?: string;
|
|
1351
|
+
/** The layer's role. `list` by default. */
|
|
1352
|
+
role?: string;
|
|
1353
|
+
/** Each card's role. `listitem` by default. */
|
|
1354
|
+
itemRole?: string;
|
|
1355
|
+
};
|
|
1356
|
+
|
|
1357
|
+
/**
|
|
1358
|
+
* Present rows as a board — a kanban of grouped lanes of cards (§7.14).
|
|
1359
|
+
*
|
|
1360
|
+
* The top-level group becomes a lane and every leaf under it becomes a card
|
|
1361
|
+
* stacked in that lane: a pipeline by stage, a task list by status, a backlog
|
|
1362
|
+
* by owner. `true` draws a card per row generated from the columns; an object
|
|
1363
|
+
* sizes the lanes and cards or supplies a template. Group the grid to give the
|
|
1364
|
+
* board its lanes; an ungrouped board is a single lane of every card.
|
|
1365
|
+
*
|
|
1366
|
+
* A card is drawn through the same code the other card presentations use, so a
|
|
1367
|
+
* board card is still a row: it clicks, selects and drags through the grid's
|
|
1368
|
+
* own handlers, masks protected columns, and shows the same text the table
|
|
1369
|
+
* shows. Both axes are virtualised — the lanes across and the cards down each —
|
|
1370
|
+
* so a board of many long lanes renders only what is on screen. Presentation
|
|
1371
|
+
* only: sort, filter, group and the data pipeline are unchanged.
|
|
1372
|
+
*/
|
|
1373
|
+
board?: boolean | {
|
|
1374
|
+
/** The card layout. Generated from the columns as a tile when omitted. */
|
|
1375
|
+
template?: string;
|
|
1376
|
+
/** How wide a lane is, in pixels. 280 by default. */
|
|
1377
|
+
laneWidth?: number;
|
|
1378
|
+
/** How tall a card is, in pixels. 120 by default. */
|
|
1379
|
+
cardHeight?: number;
|
|
1380
|
+
/** Space between lanes, in pixels. 16 by default. */
|
|
1381
|
+
laneGap?: number;
|
|
1382
|
+
/** Space around a card within its lane, in pixels. 8 by default. */
|
|
1383
|
+
gap?: number;
|
|
1384
|
+
/** A class of your own on every card, alongside the grid's. */
|
|
1385
|
+
className?: string;
|
|
1386
|
+
/** The board's role. `list` by default; `listbox` for a selectable set. */
|
|
1387
|
+
role?: string;
|
|
1388
|
+
/** Each card's role. `listitem` by default. */
|
|
1389
|
+
itemRole?: string;
|
|
1390
|
+
};
|
|
1391
|
+
|
|
1306
1392
|
/**
|
|
1307
1393
|
* Present rows as cards when the grid's container is too narrow to be a
|
|
1308
1394
|
* table honestly, a phone, or a narrow panel on a wide screen.
|
|
@@ -1833,6 +1919,15 @@ export interface ColumnState {
|
|
|
1833
1919
|
groupTotal?: TotalName | null;
|
|
1834
1920
|
/** The grand-total override, when one differs from `total`. */
|
|
1835
1921
|
grandTotal?: TotalName | null;
|
|
1922
|
+
/**
|
|
1923
|
+
* The column's runtime decoration (BACKLOG-0000723), present only when the
|
|
1924
|
+
* column carries one, so a `columns.decorate()` survives a saved view and
|
|
1925
|
+
* participates in undo/redo. Absent means "not recorded"; an explicit `null`
|
|
1926
|
+
* on an undo patch clears a decoration back to plain text.
|
|
1927
|
+
*/
|
|
1928
|
+
decoration?: DecorationName | DecorationSpec | null;
|
|
1929
|
+
/** The variant set alongside the decoration, when one is present. */
|
|
1930
|
+
variant?: VariantSpec | null;
|
|
1836
1931
|
}
|
|
1837
1932
|
|
|
1838
1933
|
export interface GridState {
|
|
@@ -2436,10 +2531,41 @@ export interface CsvExportOptions {
|
|
|
2436
2531
|
download?: boolean;
|
|
2437
2532
|
}
|
|
2438
2533
|
|
|
2534
|
+
/** A conditional-formatting rule's rendering, returned by `cellStyle`. */
|
|
2535
|
+
export interface ExcelCellStyle {
|
|
2536
|
+
bold?: boolean;
|
|
2537
|
+
italic?: boolean;
|
|
2538
|
+
/** Font colour as 6- or 8-digit hex/ARGB, e.g. 'FFFF0000'. `color` is an alias. */
|
|
2539
|
+
colour?: string;
|
|
2540
|
+
color?: string;
|
|
2541
|
+
/** Solid fill colour as 6- or 8-digit hex/ARGB. */
|
|
2542
|
+
fill?: string;
|
|
2543
|
+
}
|
|
2544
|
+
|
|
2545
|
+
/** A cell border, per edge. `true` means a thin line; a string names the style. */
|
|
2546
|
+
export interface ExcelBorderSpec {
|
|
2547
|
+
left?: boolean | string;
|
|
2548
|
+
right?: boolean | string;
|
|
2549
|
+
top?: boolean | string;
|
|
2550
|
+
bottom?: boolean | string;
|
|
2551
|
+
}
|
|
2552
|
+
|
|
2439
2553
|
export interface ExcelExportOptions extends Omit<CsvExportOptions, 'delimiter' | 'quote' | 'lineEnding'> {
|
|
2440
2554
|
sheetName?: string;
|
|
2441
2555
|
freezePanes?: boolean;
|
|
2442
2556
|
variantFills?: boolean;
|
|
2557
|
+
/**
|
|
2558
|
+
* Draw cell borders on the data grid. `false` (default) is borderless; `true`
|
|
2559
|
+
* draws a thin box; a string names the line style; an object picks edges.
|
|
2560
|
+
*/
|
|
2561
|
+
borders?: boolean | string | ExcelBorderSpec;
|
|
2562
|
+
/**
|
|
2563
|
+
* What to do with grid-hidden columns. `'omit'` (default) drops them;
|
|
2564
|
+
* `'hidden'` keeps them as Excel-hidden columns for round-trip fidelity.
|
|
2565
|
+
*/
|
|
2566
|
+
hiddenColumns?: 'omit' | 'hidden';
|
|
2567
|
+
/** Explicit merged body ranges in A1 form, e.g. ['A3:A4']. */
|
|
2568
|
+
merges?: string[];
|
|
2443
2569
|
onProgress?: (p: { written: number; total: number }) => void;
|
|
2444
2570
|
}
|
|
2445
2571
|
|