@toclocoinc/lattice-grid 1.65.0 → 1.67.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 +6 -4
- package/angular/LICENSE +111 -0
- package/angular/README.md +78 -0
- package/angular/fesm2022/toclocoinc-lattice-grid-angular.mjs +2843 -0
- package/angular/package.json +16 -0
- package/angular/types/toclocoinc-lattice-grid-angular.d.ts +1366 -0
- package/docs/API.html +741 -27
- package/docs/api-detail.html +137 -4
- package/lattice-grid.d.ts +9 -6
- package/lattice-grid.esm.min.js +26 -10
- package/lattice-grid.min.cjs +26 -10
- package/lattice-grid.min.css +1 -1
- package/lattice-grid.min.js +26 -10
- package/modules/ai.d.ts +1 -1
- 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 +7 -7
- package/modules/angular.min.cjs +7 -7
- package/modules/angular.min.js +7 -7
- 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 +261 -48
- package/modules/charts.min.cjs +261 -48
- package/modules/charts.min.js +261 -48
- package/modules/data-router.d.ts +8 -3
- package/modules/data-router.esm.min.js +28 -6
- package/modules/data-router.min.cjs +28 -6
- package/modules/data-router.min.js +28 -6
- 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 +8 -3
- package/modules/gantt.esm.min.js +27 -4
- package/modules/gantt.min.cjs +27 -4
- package/modules/gantt.min.js +27 -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 +26 -10
- package/modules/htmx.min.cjs +26 -10
- package/modules/htmx.min.js +26 -10
- package/modules/kanban.d.ts +10 -3
- package/modules/kanban.esm.min.js +24 -4
- package/modules/kanban.min.cjs +24 -4
- package/modules/kanban.min.js +24 -4
- package/modules/kpi.d.ts +10 -3
- package/modules/kpi.esm.min.js +27 -4
- package/modules/kpi.min.cjs +27 -4
- package/modules/kpi.min.js +27 -4
- package/modules/layout.d.ts +1 -1
- 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 +1 -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 +251 -2
- package/modules/svelte.esm.min.js +960 -6
- package/modules/svelte.min.cjs +942 -5
- package/modules/svelte.min.js +942 -5
- package/modules/tabs.d.ts +1 -1
- 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 +398 -9
- package/modules/vue.esm.min.js +1163 -31
- package/modules/vue.min.cjs +1147 -30
- package/modules/vue.min.js +1147 -30
- package/modules/webcomponent.d.ts +233 -1
- package/modules/webcomponent.esm.min.js +1274 -41
- package/modules/webcomponent.min.cjs +1256 -41
- package/modules/webcomponent.min.js +1256 -41
- package/package.json +27 -2
- package/svelte/Chart.svelte +34 -0
- package/svelte/Gantt.svelte +34 -0
- package/svelte/Grid.svelte +30 -0
- package/svelte/GridProvider.svelte +13 -0
- package/svelte/KPI.svelte +34 -0
- package/svelte/Kanban.svelte +34 -0
- package/svelte/Layout.svelte +34 -0
- package/svelte/Router.svelte +16 -0
- package/svelte/Tabs.svelte +53 -0
package/docs/API.html
CHANGED
|
@@ -325,6 +325,9 @@
|
|
|
325
325
|
|
|
326
326
|
.chip--new { border-color: var(--accent); color: var(--accent); }
|
|
327
327
|
|
|
328
|
+
.chip--icon { display: inline-flex; align-items: center; gap: 4px; }
|
|
329
|
+
.chip-icon { width: 12px; height: 12px; flex: none; }
|
|
330
|
+
|
|
328
331
|
footer {
|
|
329
332
|
margin-top: 72px;
|
|
330
333
|
padding-top: 22px;
|
|
@@ -360,7 +363,7 @@
|
|
|
360
363
|
<div class="shell">
|
|
361
364
|
<aside class="rail">
|
|
362
365
|
<p class="rail__brand">Lattice Grid</p>
|
|
363
|
-
<p class="rail__sub">API reference · v1.
|
|
366
|
+
<p class="rail__sub">API reference · v1.67.0</p>
|
|
364
367
|
<nav>
|
|
365
368
|
<div class="rail__group">
|
|
366
369
|
<span class="rail__label">Start</span>
|
|
@@ -417,7 +420,10 @@
|
|
|
417
420
|
<span class="rail__label">Frameworks</span>
|
|
418
421
|
<a href="#adapters">Framework adapters</a>
|
|
419
422
|
<a href="#react-v2">React</a>
|
|
423
|
+
<a href="#vue-v2">Vue</a>
|
|
424
|
+
<a href="#svelte-v2">Svelte</a>
|
|
420
425
|
<a href="#angular-v2">Angular</a>
|
|
426
|
+
<a href="#webcomponent-v2">Web Components</a>
|
|
421
427
|
</div>
|
|
422
428
|
<div class="rail__group">
|
|
423
429
|
<span class="rail__label">Registries</span>
|
|
@@ -450,7 +456,7 @@
|
|
|
450
456
|
</header>
|
|
451
457
|
|
|
452
458
|
<p class="chips">
|
|
453
|
-
<span class="chip">Version 1.
|
|
459
|
+
<span class="chip">Version 1.67.0</span>
|
|
454
460
|
<span class="chip">Zero dependencies</span>
|
|
455
461
|
<span class="chip"><a href="api-detail.html">Developer guide →</a></span>
|
|
456
462
|
</p>
|
|
@@ -526,9 +532,9 @@
|
|
|
526
532
|
<thead><tr><th>Entry point</th><th>Factory</th><th>Needs</th></tr></thead>
|
|
527
533
|
<tbody>
|
|
528
534
|
<tr><td class="name">modules/react</td><td class="sig">createLatticeGrid({ React, createGrid })</td><td class="desc">Returns a component. Forwards a ref exposing <code>.grid</code>. Since 1.63 the same entry point also builds a component for <a href="#react-v2">every other viewer</a> and the data router.</td></tr>
|
|
529
|
-
<tr><td class="name">@toclocoinc/<wbr>lattice-grid
|
|
530
|
-
<tr><td class="name">modules/vue</td><td class="sig">createLatticeGrid({ vue, createGrid })</td><td class="desc">Returns a Vue 3 component definition.</td></tr>
|
|
531
|
-
<tr><td class="name">modules/svelte</td><td class="sig">createLatticeAction({ createGrid })</td><td class="desc">Returns a <code>use:</code> action.</td></tr>
|
|
535
|
+
<tr><td class="name">@toclocoinc/<wbr>lattice-grid/angular</td><td class="sig"><lattice-grid [config]="…"></td><td class="desc">A compiled entry point of this package, not a bundle: standalone components compiled ahead of time, one per viewer, plus the data router as a service. No second install. See <a href="#angular-v2">Angular</a>. <code>modules/angular</code>, which needs the JIT compiler, is deprecated.</td></tr>
|
|
536
|
+
<tr><td class="name">modules/vue</td><td class="sig">createLatticeGrid({ vue, createGrid })</td><td class="desc">Returns a Vue 3 component definition. Since 1.66 the same entry point also builds a component for <a href="#vue-v2">every other viewer</a> and the data router.</td></tr>
|
|
537
|
+
<tr><td class="name">modules/svelte</td><td class="sig">createLatticeAction({ createGrid })</td><td class="desc">Returns a <code>use:</code> action. Since 1.66 the package also ships <a href="#svelte-v2">a Svelte 5 component per viewer</a> as <code>.svelte</code> source at <code>@toclocoinc/lattice-grid/svelte/*.svelte</code>, and this entry point carries the helpers they are built from.</td></tr>
|
|
532
538
|
</tbody>
|
|
533
539
|
</table>
|
|
534
540
|
</div>
|
|
@@ -713,24 +719,377 @@ controller.destroy();
|
|
|
713
719
|
a line that could never run. The build now deletes that branch from every emitted artefact.
|
|
714
720
|
</p>
|
|
715
721
|
|
|
716
|
-
<h3 id="
|
|
722
|
+
<h3 id="vue-v2">Vue 3: every viewer, not only the grid</h3>
|
|
723
|
+
<p>
|
|
724
|
+
Until 1.66 the Vue adapter wrapped <code>createGrid</code> and nothing else. Every other
|
|
725
|
+
shipped viewer — the KPI panel, a chart, the board, the Gantt, the layout, the tab
|
|
726
|
+
strip — and the data router had no Vue surface, so a Vue application wrote its own
|
|
727
|
+
<code>onMounted</code>/<code>onBeforeUnmount</code> pair per viewer. It does not have to any
|
|
728
|
+
more: there is one component per viewer, and each keeps the contract the grid component
|
|
729
|
+
already kept.
|
|
730
|
+
</p>
|
|
731
|
+
<p>
|
|
732
|
+
Every component is built with <code>defineComponent</code> and a render function, so the
|
|
733
|
+
adapter needs <strong>no template compiler</strong> in your build and runs on
|
|
734
|
+
<code>vue.runtime.*</code> — the compiler-free build a Vite application ships. The
|
|
735
|
+
floor is <strong>Vue 3.3</strong>.
|
|
736
|
+
</p>
|
|
737
|
+
<pre><code><span class="cmt">// lattice.js — built once, at module scope.</span>
|
|
738
|
+
<span class="kw">import</span> * <span class="kw">as</span> vue <span class="kw">from</span> 'vue';
|
|
739
|
+
<span class="kw">import</span> { createGrid } <span class="kw">from</span> '@toclocoinc/lattice-grid';
|
|
740
|
+
<span class="kw">import</span> { createKPI } <span class="kw">from</span> '@toclocoinc/lattice-grid/modules/kpi';
|
|
741
|
+
<span class="kw">import</span> { createChart } <span class="kw">from</span> '@toclocoinc/lattice-grid/modules/charts';
|
|
742
|
+
<span class="kw">import</span> { createDataRouter } <span class="kw">from</span> '@toclocoinc/lattice-grid/modules/data-router';
|
|
743
|
+
<span class="kw">import</span> { createLatticeVue } <span class="kw">from</span> '@toclocoinc/lattice-grid/modules/vue';
|
|
744
|
+
|
|
745
|
+
<span class="kw">export const</span> L = createLatticeVue({ vue, createGrid, createKPI, createChart, createDataRouter });</code></pre>
|
|
746
|
+
<pre><code><span class="cmt">// Dashboard.vue</span>
|
|
747
|
+
<script setup>
|
|
748
|
+
<span class="kw">import</span> { L } <span class="kw">from</span> './lattice.js';
|
|
749
|
+
|
|
750
|
+
L.provideLatticeGrids();
|
|
751
|
+
L.provideLatticeRouter(ROUTER_CONFIG);
|
|
752
|
+
|
|
753
|
+
<span class="kw">const</span> rows = shallowRef([]);
|
|
754
|
+
</script>
|
|
755
|
+
|
|
756
|
+
<template>
|
|
757
|
+
<component :is="L.LatticeGrid" name="quakes" route="all" v-bind="GRID_CONFIG" :rows="rows" />
|
|
758
|
+
<component :is="L.LatticeKPI" grid-name="quakes" :tiles="TILES" :columns="5" />
|
|
759
|
+
<component :is="L.LatticeChart" grid-name="quakes" type="bar" x="region" y="count" />
|
|
760
|
+
</template></code></pre>
|
|
761
|
+
<div class="table-wrap">
|
|
762
|
+
<table>
|
|
763
|
+
<thead><tr><th>Export</th><th>Signature</th><th>What it is</th></tr></thead>
|
|
764
|
+
<tbody>
|
|
765
|
+
<tr><td class="name">createLatticeGrid</td><td class="sig">({ vue, createGrid })</td><td class="desc">The grid component. Extended in 1.66 with <code>rowUpdates</code>, <code>predicates</code>, <code>name</code>, <code>route</code> and the <code>grid-ready</code> / <code>grid-destroyed</code> emits. Unchanged for anyone already on it.</td></tr>
|
|
766
|
+
<tr><td class="name">createLatticeKPI</td><td class="sig">({ vue, createKPI })</td><td class="desc">The KPI panel. Grid-bound through the provided registry by default; bind <code>:rows</code> instead for a panel with no grid.</td></tr>
|
|
767
|
+
<tr><td class="name">createLatticeChart</td><td class="sig">({ vue, createChart })</td><td class="desc">A chart. Requires a grid, so nothing is mounted until one exists; a changed spec key goes to <code>chart.update()</code> and the chart redraws rather than being rebuilt.</td></tr>
|
|
768
|
+
<tr><td class="name">createLatticeKanban</td><td class="sig">({ vue, createKanban })</td><td class="desc">The board. <code>rows</code>, <code>quickFilter</code>, <code>sprint</code>, <code>epic</code>, <code>loading</code> and <code>error</code> are live props.</td></tr>
|
|
769
|
+
<tr><td class="name">createLatticeGantt</td><td class="sig">({ vue, createGantt })</td><td class="desc">The Gantt. <code>tasks</code> and <code>dependencies</code> are live props.</td></tr>
|
|
770
|
+
<tr><td class="name">createLatticeLayout</td><td class="sig">({ vue, createLayout })</td><td class="desc">The layout. Windows are driven through the exposed instance; its events arrive as <code>@layout-changed</code>, <code>@window-moved</code> and the rest.</td></tr>
|
|
771
|
+
<tr><td class="name">createLatticeTabs</td><td class="sig">({ vue, createTabs, createGrid? })</td><td class="desc">The tab strip, with <strong>Vue-rendered tab content</strong>: a tab's content is a <strong>named slot</strong> — <code><template #overview></code> for a tab with <code>id: 'overview'</code>, or <code><template #tab-overview></code> — rendered into the strip's own panel through a <code><Teleport></code>, so a tab's grid is a real <code>LatticeGrid</code> with props, a ref and the surrounding <code>provide</code>s. A tab with no slot is left to the module, so the two kinds mix on one strip.</td></tr>
|
|
772
|
+
<tr><td class="name">createLatticeGridContext</td><td class="sig">({ vue })</td><td class="desc">Returns <code>{ LatticeGridProvider, provideLatticeGrids, useLatticeGrid }</code>. A grid-bound viewer needs the grid <em>instance</em>, which appears after the first render; a template ref cannot help, because assigning to one re-renders nobody. Call <code>provideLatticeGrids()</code> in a parent's <code>setup</code>, or wrap the subtree in <code><LatticeGridProvider></code>. Several grids may publish under one registry — <code>name</code> on the grid, <code>grid-name</code> on the viewer.</td></tr>
|
|
773
|
+
<tr><td class="name">createLatticeRouter</td><td class="sig">({ vue, createDataRouter })</td><td class="desc">Returns <code>{ provideLatticeRouter, useLatticeRouter, LatticeRouterProvider }</code>. <code>provideLatticeRouter(config)</code> is called in a component's <code>setup</code>: the router is built by the first grid under it that names a <code>route</code>, and destroyed when that component's scope is. The config is read once, because rebuilding would drop every attached grid and every row held.</td></tr>
|
|
774
|
+
<tr><td class="name">createLatticeViewer</td><td class="sig">({ vue, viewer, mount, … })</td><td class="desc">The generic behind all of the above, and the escape hatch for a viewer with no named factory yet.</td></tr>
|
|
775
|
+
<tr><td class="name">createLatticeVue</td><td class="sig">({ vue, …factories })</td><td class="desc">Every binding from one call: pass the factories the application uses and it builds those components, leaving the rest undefined. Nothing is imported, so an application that never uses the board never loads the board.</td></tr>
|
|
776
|
+
<tr><td class="name">createViewerController</td><td class="sig">({ viewer, mount, element, props })</td><td class="desc">The framework-free viewer lifecycle — mount once, push changed props into the live instance, destroy — shared by every adapter.</td></tr>
|
|
777
|
+
<tr><td class="name">VIEWER_EVENTS</td><td class="type">Record<string, readonly string[]></td><td class="desc">Every event each non-grid viewer emits, keyed by viewer name.</td></tr>
|
|
778
|
+
<tr><td class="name">VIEWER_APPLY</td><td class="type">Record<string, Record<string, Function>></td><td class="desc">Which props each viewer can take <em>live</em>, and the instance call each becomes. Anything not listed is mount-time configuration.</td></tr>
|
|
779
|
+
<tr><td class="name">viewerHandlerName</td><td class="type">(event) => string</td><td class="desc">A viewer event as the handler key the shared controller dispatches on: <code>card:move</code> becomes <code>onCardMove</code>. A Vue template binds the dashed form instead — <code>@card-move</code>.</td></tr>
|
|
780
|
+
<tr><td class="name">DEFAULT_GRID_NAME</td><td class="type">string</td><td class="desc">The name a grid publishes itself under when you do not choose one: <code>default</code>.</td></tr>
|
|
781
|
+
</tbody>
|
|
782
|
+
</table>
|
|
783
|
+
</div>
|
|
784
|
+
|
|
785
|
+
<pre data-run="js" data-expect="7 components, cell-changed, card-move, default, rows 2" data-covers="export:createLatticeVue export:createLatticeGrid export:createLatticeKPI export:createLatticeChart export:createLatticeKanban export:createLatticeGantt export:createLatticeLayout export:createLatticeTabs export:createLatticeViewer export:createLatticeGridContext export:createLatticeRouter export:createViewerController export:viewerHandlerName export:dashedName export:VIEWER_EVENTS export:VIEWER_APPLY export:DEFAULT_GRID_NAME export:EVENT_NAMES"><code><span class="kw">const</span> A = <span class="kw">await</span> import('../packages/modules/vue/index.js');
|
|
786
|
+
|
|
787
|
+
<span class="cmt">// A stand-in for Vue. The adapter never imports it, so a factory only needs</span>
|
|
788
|
+
<span class="cmt">// the handful of names it destructures — which is exactly why this example</span>
|
|
789
|
+
<span class="cmt">// runs in Node with no framework installed.</span>
|
|
790
|
+
<span class="kw">const</span> vue = {
|
|
791
|
+
defineComponent: (d) => d, h: () => ({}), ref: (v) => ({ value: v }),
|
|
792
|
+
shallowRef: (v) => ({ value: v }), computed: (f) => ({ get value() { <span class="kw">return</span> f(); } }),
|
|
793
|
+
watch: () => () => {}, onMounted: () => {}, onBeforeUnmount: () => {},
|
|
794
|
+
onScopeDispose: () => {}, provide: () => {}, inject: () => <span class="kw">null</span>,
|
|
795
|
+
Teleport: Symbol('Teleport'), Fragment: Symbol('Fragment'),
|
|
796
|
+
};
|
|
797
|
+
<span class="kw">const</span> stub = () => ({ on: () => () => {}, setRows: () => {}, destroy() {} });
|
|
798
|
+
|
|
799
|
+
<span class="cmt">// One call builds whichever components the factories you pass support.</span>
|
|
800
|
+
<span class="kw">const</span> L = A.createLatticeVue({
|
|
801
|
+
vue, createGrid: stub, createKPI: stub, createChart: stub, createDataRouter: stub,
|
|
802
|
+
});
|
|
803
|
+
|
|
804
|
+
<span class="cmt">// …or one factory at a time. Each returns a Vue component definition.</span>
|
|
805
|
+
<span class="kw">const</span> components = [
|
|
806
|
+
A.createLatticeGrid({ vue, createGrid: stub }),
|
|
807
|
+
A.createLatticeKPI({ vue, createKPI: stub }),
|
|
808
|
+
A.createLatticeChart({ vue, createChart: stub }),
|
|
809
|
+
A.createLatticeKanban({ vue, createKanban: stub }),
|
|
810
|
+
A.createLatticeGantt({ vue, createGantt: stub }),
|
|
811
|
+
A.createLatticeLayout({ vue, createLayout: stub }),
|
|
812
|
+
A.createLatticeTabs({ vue, createTabs: stub }),
|
|
813
|
+
].filter((c) => <span class="kw">typeof</span> c.setup === 'function');
|
|
814
|
+
|
|
815
|
+
<span class="cmt">// The generic behind them, the registry pair and the router composables.</span>
|
|
816
|
+
A.createLatticeViewer({ vue, viewer: 'kpi', mount: stub });
|
|
817
|
+
<span class="kw">const</span> { LatticeGridProvider, useLatticeGrid } = A.createLatticeGridContext({ vue });
|
|
818
|
+
<span class="kw">const</span> { provideLatticeRouter } = A.createLatticeRouter({ vue, createDataRouter: stub });
|
|
819
|
+
|
|
820
|
+
<span class="cmt">// Events are bound under dashed names, because a colon is directive syntax.</span>
|
|
821
|
+
<span class="kw">const</span> gridEvent = A.dashedName(A.EVENT_NAMES.find((n) => n === 'cell:changed'));
|
|
822
|
+
<span class="kw">const</span> viewerEvent = A.dashedName(A.VIEWER_EVENTS.kanban.find((n) => n === 'card:move'));
|
|
823
|
+
A.viewerHandlerName('card:move');
|
|
824
|
+
|
|
825
|
+
<span class="cmt">// And the lifecycle underneath, driven with no framework at all: mount once,</span>
|
|
826
|
+
<span class="cmt">// push a changed live prop into the instance that already exists, destroy.</span>
|
|
827
|
+
<span class="kw">const</span> seen = [];
|
|
828
|
+
<span class="kw">const</span> controller = A.createViewerController({
|
|
829
|
+
viewer: 'kpi',
|
|
830
|
+
element: {},
|
|
831
|
+
props: { rows: [{ id: 1 }] },
|
|
832
|
+
mount: () => ({ setRows: (r) => seen.push(r.length), on: () => () => {}, destroy() {} }),
|
|
833
|
+
});
|
|
834
|
+
controller.update({ rows: [{ id: 1 }, { id: 2 }] });
|
|
835
|
+
controller.destroy();
|
|
836
|
+
<span class="kw">void</span> [L.LatticeGrid, LatticeGridProvider, useLatticeGrid, provideLatticeRouter, A.VIEWER_APPLY];
|
|
837
|
+
|
|
838
|
+
<span class="kw">return</span> `${components.length} components, ${gridEvent}, ${viewerEvent}, `
|
|
839
|
+
+ `${A.DEFAULT_GRID_NAME}, rows ${seen.join('/')}`;</code></pre>
|
|
840
|
+
|
|
841
|
+
<p class="section-note">
|
|
842
|
+
<strong>The grid paints outside Vue's reactivity, and that is deliberate.</strong> The
|
|
843
|
+
adapter creates the grid in <code>onMounted</code> and pushes changed props into it; the grid
|
|
844
|
+
then renders on its own schedule, not Vue's. So <code>nextTick()</code> tells you Vue has
|
|
845
|
+
patched the DOM, <em>not</em> that the grid has painted. Measure, screenshot or scroll in a
|
|
846
|
+
grid event — <code>@render-done</code>, <code>@rows-changed</code>,
|
|
847
|
+
<code>@size-changed</code> — rather than after <code>nextTick</code> or in
|
|
848
|
+
<code>onMounted</code>.
|
|
849
|
+
</p>
|
|
850
|
+
<p class="section-note">
|
|
851
|
+
<strong>Hold big row arrays in a <code>shallowRef</code>, never a <code>ref</code>.</strong>
|
|
852
|
+
<code>ref([...100k rows])</code> makes every row object a reactive proxy: Vue walks the array
|
|
853
|
+
on assignment and every property read on every row goes through a proxy trap from then on.
|
|
854
|
+
The grid neither needs nor wants that — it re-reads the array itself when the reference
|
|
855
|
+
changes. Use <code>shallowRef(rows)</code> and assign a <em>new</em> array when the data
|
|
856
|
+
changes (<code>rows.value = next</code>), or <code>markRaw</code> the objects. The same goes
|
|
857
|
+
for the grid instance you keep off a template ref: a <code>ref</code> would proxy the whole
|
|
858
|
+
<code>Grid</code>, and the proxy is not <code>===</code> the object
|
|
859
|
+
<code>createGrid</code> returned.
|
|
860
|
+
</p>
|
|
861
|
+
<p class="section-note">
|
|
862
|
+
<strong>Props are diffed with <code>Object.is</code>, and that is a promise about identity.</strong>
|
|
863
|
+
An inline <code>:columns="[{ field: 'a' }]"</code> is a new array on every render, so it
|
|
864
|
+
counts as changed every render and reconfigures the grid every render. Hoist it to module
|
|
865
|
+
scope or put it behind a <code>computed</code>. This is not a defect to work around: a deep
|
|
866
|
+
compare of a million-row array on every render would cost more than the reload it prevents.
|
|
867
|
+
For the same reason nothing here uses a <code>{ deep: true }</code> watcher — one over a
|
|
868
|
+
config carrying <code>rows</code> would walk every row object on every tick.
|
|
869
|
+
</p>
|
|
870
|
+
<p class="section-note">
|
|
871
|
+
<strong>Live props versus mount-time props.</strong> The grid takes any changed configuration
|
|
872
|
+
key through one call (<code>grid.setAll</code>); no other viewer does. So each viewer declares
|
|
873
|
+
which props it can take while it is running (<code>VIEWER_APPLY</code>), and everything else
|
|
874
|
+
is mount-time configuration. A mount-time prop that changes is <em>not</em> silently ignored
|
|
875
|
+
and <em>not</em> silently remounted (that would throw away scroll position, selection and
|
|
876
|
+
expansion): it is named once in a warning that tells you to give the component a
|
|
877
|
+
<code>:key</code> that changes when the rebuild is wanted, or to drive the instance through
|
|
878
|
+
the ref. The tab strip's whole <code>tabs</code> array is mount-time for the same reason
|
|
879
|
+
— the module has no way to repaint an existing tab's label or badge.
|
|
880
|
+
</p>
|
|
881
|
+
<p class="section-note">
|
|
882
|
+
<strong>Events are dashed; the lifecycle pair is <code>grid-ready</code> and
|
|
883
|
+
<code>grid-destroyed</code>.</strong> <code>cell:changed</code> is emitted as
|
|
884
|
+
<code>@cell-changed</code>, because a colon in a Vue binding is directive syntax. Every grid
|
|
885
|
+
event is declared in <code>emits</code>, so none of them falls through onto the host element.
|
|
886
|
+
The two lifecycle emits are named <code>grid-*</code> because <code>ready</code> and
|
|
887
|
+
<code>destroy</code> are grid event names already re-emitted here, and the React and Angular
|
|
888
|
+
adapters name their pair the same.
|
|
889
|
+
</p>
|
|
890
|
+
<p class="section-note">
|
|
891
|
+
<strong>Reaching the instance, and <code>class</code>/<code>style</code>/<code>id</code>.</strong>
|
|
892
|
+
A template ref on the grid exposes <code>grid()</code>
|
|
893
|
+
(<code>gridRef.value.grid()</code>); every other component exposes
|
|
894
|
+
<code>instance()</code>. Both are <code>null</code> before mount. <code>class</code>,
|
|
895
|
+
<code>style</code> and <code>id</code> are applied to the component's own host element rather
|
|
896
|
+
than passed on as configuration; every other binding is the viewer's configuration, with a
|
|
897
|
+
known kebab-cased key mapped to its camelCase form (<code>:row-key</code> reaches
|
|
898
|
+
<code>rowKey</code>), as the web component does.
|
|
899
|
+
</p>
|
|
900
|
+
<p class="section-note">
|
|
901
|
+
<strong>Cleanup, and no SSR.</strong> Every component destroys its instance, stops its
|
|
902
|
+
watchers and unsubscribes its listeners in <code>onBeforeUnmount</code>, so a
|
|
903
|
+
<code>v-if</code> toggled twice leaves exactly one instance alive and an unmounted page
|
|
904
|
+
leaves nothing on a timer or an event bus. The router is destroyed with the component whose
|
|
905
|
+
<code>setup</code> provided it. Every component owns a real DOM element and builds nothing
|
|
906
|
+
until <code>onMounted</code>, so a server render emits the empty host and nothing else: there
|
|
907
|
+
is no SSR or Nuxt server-side support, and Vue 2 is not supported.
|
|
908
|
+
</p>
|
|
909
|
+
|
|
910
|
+
<h3 id="svelte-v2">Svelte 5: components you compile, not a bundle you load</h3>
|
|
911
|
+
<p>
|
|
912
|
+
Until 1.66 the Svelte adapter was a single action, <code>use:lattice</code>, over a grid.
|
|
913
|
+
An action cannot do what the other adapters do — it takes a node and a value, so it has
|
|
914
|
+
no children, no snippets and no context of its own, and a tab strip whose panels hold
|
|
915
|
+
Svelte-rendered content is simply out of its reach. So 1.66 adds <strong>components</strong>,
|
|
916
|
+
one per viewer, and they ship the way the Svelte ecosystem ships components: as
|
|
917
|
+
<code>.svelte</code> <strong>source</strong>, compiled by your own toolchain.
|
|
918
|
+
<code>svelte</code> is an <em>optional</em> peer dependency; the package still installs
|
|
919
|
+
nothing. <strong>Svelte 5 only</strong> — the components are written in runes and
|
|
920
|
+
snippets, neither of which exists in Svelte 4. The action is unchanged and still supported.
|
|
921
|
+
</p>
|
|
922
|
+
<pre><code><span class="cmt"><!-- Dashboard.svelte --></span>
|
|
923
|
+
<script>
|
|
924
|
+
<span class="kw">import</span> Provider <span class="kw">from</span> '@toclocoinc/lattice-grid/svelte/GridProvider.svelte';
|
|
925
|
+
<span class="kw">import</span> Grid <span class="kw">from</span> '@toclocoinc/lattice-grid/svelte/Grid.svelte';
|
|
926
|
+
<span class="kw">import</span> KPI <span class="kw">from</span> '@toclocoinc/lattice-grid/svelte/KPI.svelte';
|
|
927
|
+
<span class="kw">import</span> Chart <span class="kw">from</span> '@toclocoinc/lattice-grid/svelte/Chart.svelte';
|
|
928
|
+
<span class="kw">import</span> Tabs <span class="kw">from</span> '@toclocoinc/lattice-grid/svelte/Tabs.svelte';
|
|
929
|
+
|
|
930
|
+
<span class="kw">let</span> rows = $state.raw([]);
|
|
931
|
+
<span class="kw">let</span> board;
|
|
932
|
+
</script>
|
|
933
|
+
|
|
934
|
+
<Provider>
|
|
935
|
+
<Grid bind:this={board} name="quakes" class="grid" {...GRID_CONFIG} {rows}
|
|
936
|
+
onCellChanged={(e) => save(e)} />
|
|
937
|
+
<KPI gridName="quakes" tiles={TILES} columns={5} />
|
|
938
|
+
<Chart gridName="quakes" type="bar" x="region" y="count" />
|
|
939
|
+
|
|
940
|
+
<Tabs tabs={TABS} active={open} onTabChanged={(e) => (open = e.id)}>
|
|
941
|
+
{#snippet all()}<Grid name="all" {...GRID_CONFIG} {rows} />{/snippet}
|
|
942
|
+
</Tabs>
|
|
943
|
+
</Provider></code></pre>
|
|
944
|
+
<div class="table-wrap">
|
|
945
|
+
<table>
|
|
946
|
+
<thead><tr><th>Component</th><th>Import</th><th>What it is</th></tr></thead>
|
|
947
|
+
<tbody>
|
|
948
|
+
<tr><td class="name">Grid.svelte</td><td class="sig">@toclocoinc/<wbr>lattice-grid/<wbr>svelte/<wbr>Grid.svelte</td><td class="desc">One grid for the component's lifetime. Every configuration key is a prop, diffed with <code>Object.is</code> and pushed through <code>setAll</code>; <code>rowUpdates</code> is a keyed diff straight to <code>rows.apply()</code>; <code>predicates</code> are named filters registered through <code>filters.where</code>, so they compose with the reader's own. <code>bind:this</code> plus <code>grid()</code> hands you the live <code>Grid</code>.</td></tr>
|
|
949
|
+
<tr><td class="name">GridProvider.svelte</td><td class="sig">…/<wbr>svelte/<wbr>GridProvider.svelte</td><td class="desc">Puts a grid registry in context. A grid publishes itself under its <code>name</code>; a viewer finds it by <code>gridName</code>. Also available as <code>createGridRegistry()</code> for a host that would rather call <code>setContext</code> itself.</td></tr>
|
|
950
|
+
<tr><td class="name">KPI, Chart, Kanban, Gantt, Layout</td><td class="sig">…/<wbr>svelte/<wbr>KPI.svelte, …</td><td class="desc">One viewer each, built once and updated in place. A grid-bound viewer waits for its grid rather than mounting empty, and a <em>different</em> grid rebuilds it. <code>bind:this</code> plus <code>instance()</code> hands you the live viewer.</td></tr>
|
|
951
|
+
<tr><td class="name">Tabs.svelte</td><td class="sig">…/<wbr>svelte/<wbr>Tabs.svelte</td><td class="desc">The tab strip, with Svelte-rendered panels: a tab's content is a <code>{#snippet}</code> named after the tab's id, so a tab's grid is a real component with props, context and a reference. A tab with no snippet is left to the module, so configuration-driven tabs still work and the two kinds mix.</td></tr>
|
|
952
|
+
<tr><td class="name">Router.svelte</td><td class="sig">…/<wbr>svelte/<wbr>Router.svelte</td><td class="desc">A Data Router in context, built by the first grid that names a <code>route</code> and destroyed with the component.</td></tr>
|
|
953
|
+
</tbody>
|
|
954
|
+
</table>
|
|
955
|
+
</div>
|
|
956
|
+
<p>
|
|
957
|
+
The components are deliberately <strong>thin</strong> — a template, the <code>$props()</code>
|
|
958
|
+
plumbing, a <code>bind:this</code> getter and the context wiring — because they ship as source
|
|
959
|
+
you read. Every rule they follow lives in <code>modules/svelte</code>, which ships minified,
|
|
960
|
+
and each is exported so you can build a component of your own on exactly the same footing:
|
|
961
|
+
</p>
|
|
962
|
+
<div class="table-wrap">
|
|
963
|
+
<table>
|
|
964
|
+
<thead><tr><th>Export</th><th>Signature</th><th>What it does</th></tr></thead>
|
|
965
|
+
<tbody>
|
|
966
|
+
<tr><td class="name">bindGrid</td><td class="sig">({ createGrid, element, props, registry, router })</td><td class="desc">Owns one grid: builds it once, diffs props into it through <code>setAll</code>, registers <code>predicates</code> before it publishes, applies each new <code>rowUpdates</code> object through <code>rows.apply()</code>, attaches it to the router, and on <code>destroy</code> detaches and withdraws before destroying.</td></tr>
|
|
967
|
+
<tr><td class="name">bindViewer</td><td class="sig">({ viewer, factory, element, registry })</td><td class="desc">Owns one KPI panel, chart, board, plan or layout. <code>sync(props)</code> builds it once everything it needs has arrived, pushes changed props into the live instance, and rebuilds it only when it is bound to a <em>different</em> grid.</td></tr>
|
|
968
|
+
<tr><td class="name">bindTabs</td><td class="sig">({ createTabs, element, createGrid, onPanels })</td><td class="desc">Owns one tab strip and claims a panel for each tab the host rendered content for. <code>place(id, holder)</code> moves that tab's <code>display: contents</code> holder into the panel — Svelte has no portal, and moving one container is what keeps the subtree a genuine child of the component that declared it.</td></tr>
|
|
969
|
+
<tr><td class="name">createGridRegistry</td><td class="sig">()</td><td class="desc">The registry <code>GridProvider.svelte</code> puts in context: <code>publish</code>, <code>get</code>, <code>names</code> and a <code>subscribe</code> a component turns into its own reactivity.</td></tr>
|
|
970
|
+
<tr><td class="name">createRouterHandle</td><td class="sig">({ createDataRouter, config })</td><td class="desc">A Data Router built on the first grid that asks to be routed and destroyed with the component that provided it. <code>config</code> may be a function, read at build time.</td></tr>
|
|
971
|
+
<tr><td class="name">adaptProps</td><td class="sig">(kind, props)</td><td class="desc">Splits a component's props into the instance's configuration and the adapter's own, dropping <code>class</code>/<code>style</code>/<code>id</code>, resolving <code>row-key</code>-style aliases, and normalising a callback prop written either way.</td></tr>
|
|
972
|
+
<tr><td class="name">pickCallback</td><td class="sig">(props, name)</td><td class="desc">A callback prop under either spelling: <code>onGridReady</code> or <code>ongridready</code>.</td></tr>
|
|
973
|
+
<tr><td class="name">viewerMount</td><td class="sig">(viewer, factory)</td><td class="desc">The call each module's factory actually takes — three want <code>(element, config)</code>, the chart wants a <code>container</code> in its options and the Gantt an <code>element</code>.</td></tr>
|
|
974
|
+
<tr><td class="name">snippetTabIds</td><td class="sig">(tabs, props)</td><td class="desc">Which tabs the host declared a snippet for, in declaration order.</td></tr>
|
|
975
|
+
<tr><td class="name">VIEWER_BINDING</td><td class="sig">Record<string, {…}></td><td class="desc">How each viewer is wired: its label, the config keys without which nothing is built, and the key its bound grid is passed under.</td></tr>
|
|
976
|
+
<tr><td class="name">GRID_REGISTRY_KEY<br>ROUTER_KEY</td><td class="sig">symbol</td><td class="desc">The context keys the registry and the router handle are published under. Registered symbols (<code>Symbol.for</code>), so two components imported from different files meet the same registry.</td></tr>
|
|
977
|
+
</tbody>
|
|
978
|
+
</table>
|
|
979
|
+
</div>
|
|
980
|
+
<pre data-run="js" data-expect="config rowKey,onCellChanged; own main; registry main; grid dark; tabs one; viewers kpi,chart,kanban,gantt,layout; router 1" data-covers="export:bindGrid export:bindViewer export:bindTabs export:createGridRegistry export:createRouterHandle export:adaptProps export:pickCallback export:viewerMount export:snippetTabIds export:VIEWER_BINDING export:GRID_REGISTRY_KEY export:ROUTER_KEY"><code><span class="kw">const</span> S = <span class="kw">await</span> import('../packages/modules/svelte/index.js');
|
|
981
|
+
|
|
982
|
+
<span class="cmt">// A component hands its props straight to the helpers. They keep the</span>
|
|
983
|
+
<span class="cmt">// adapter's own props out of the instance and accept a callback under</span>
|
|
984
|
+
<span class="cmt">// either Svelte 5 spelling.</span>
|
|
985
|
+
<span class="kw">const</span> split = S.adaptProps('grid', {
|
|
986
|
+
rowKey: 'id', 'class': 'grid', name: 'main', oncellchanged: () => {},
|
|
987
|
+
});
|
|
988
|
+
<span class="kw">const</span> ready = S.pickCallback({ ongridready: () => 'called' }, 'onGridReady');
|
|
989
|
+
|
|
990
|
+
<span class="cmt">// The registry a <GridProvider> puts in context, and the grid binding a</span>
|
|
991
|
+
<span class="cmt">// <Grid> drives. Both are plain functions: no Svelte here at all.</span>
|
|
992
|
+
<span class="kw">const</span> registry = S.createGridRegistry();
|
|
993
|
+
<span class="kw">const</span> applied = [];
|
|
994
|
+
<span class="kw">const</span> fakeGrid = () => ({
|
|
995
|
+
setAll: (c) => applied.push(c.theme), destroy() {},
|
|
996
|
+
on: () => () => {}, rows: { apply: () => {} },
|
|
997
|
+
filters: { where: () => {} },
|
|
998
|
+
});
|
|
999
|
+
<span class="kw">const</span> bound = S.bindGrid({
|
|
1000
|
+
createGrid: fakeGrid, element: {}, registry, props: { name: 'main', theme: 'light' },
|
|
1001
|
+
});
|
|
1002
|
+
bound.update({ name: 'main', theme: 'dark' });
|
|
1003
|
+
|
|
1004
|
+
<span class="cmt">// A viewer waits for its grid, then is built once. VIEWER_BINDING says</span>
|
|
1005
|
+
<span class="cmt">// which key its grid arrives under and what it cannot be built without.</span>
|
|
1006
|
+
<span class="kw">const</span> built = [];
|
|
1007
|
+
<span class="kw">const</span> stub = () => ({ on: () => () => {}, setRows: () => {}, update: () => {}, destroy() {} });
|
|
1008
|
+
<span class="kw">for</span> (<span class="kw">const</span> viewer <span class="kw">of</span> Object.keys(S.VIEWER_BINDING)) {
|
|
1009
|
+
<span class="kw">const</span> panel = S.bindViewer({
|
|
1010
|
+
viewer, element: {}, registry,
|
|
1011
|
+
factory: (...args) => { built.push(viewer); <span class="kw">return</span> stub(...args); },
|
|
1012
|
+
});
|
|
1013
|
+
panel.sync({ gridName: 'main' });
|
|
1014
|
+
panel.destroy();
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
<span class="cmt">// A tab strip claims a panel for each tab the host wrote a snippet for.</span>
|
|
1018
|
+
<span class="kw">const</span> tabs = [{ id: 'one' }, { id: 'two' }];
|
|
1019
|
+
<span class="kw">const</span> props = { one: () => {} };
|
|
1020
|
+
<span class="kw">const</span> strip = S.bindTabs({
|
|
1021
|
+
element: {},
|
|
1022
|
+
createTabs: (el, config) => ({ config, on: () => () => {}, destroy() {} }),
|
|
1023
|
+
});
|
|
1024
|
+
strip.sync({ tabs, contentIds: S.snippetTabIds(tabs, props) });
|
|
1025
|
+
<span class="kw">const</span> claimed = strip.instance.config.tabs.filter((t) => t.view).map((t) => t.id);
|
|
1026
|
+
|
|
1027
|
+
<span class="cmt">// One router, built by the first grid that asks and destroyed with the</span>
|
|
1028
|
+
<span class="cmt">// component that provided it.</span>
|
|
1029
|
+
<span class="kw">let</span> routers = 0;
|
|
1030
|
+
<span class="kw">const</span> handle = S.createRouterHandle({
|
|
1031
|
+
createDataRouter: () => { routers += 1; <span class="kw">return</span> { attach: () => {}, detach: () => {}, destroy: () => {} }; },
|
|
1032
|
+
});
|
|
1033
|
+
handle.attach({}, 'all'); handle.attach({}, 'all'); handle.destroy();
|
|
1034
|
+
|
|
1035
|
+
<span class="cmt">// And the call each module's factory actually takes.</span>
|
|
1036
|
+
S.viewerMount('chart', (opts) => opts)({}, { type: 'bar' });
|
|
1037
|
+
<span class="kw">void</span> [S.GRID_REGISTRY_KEY, S.ROUTER_KEY, ready()];
|
|
1038
|
+
|
|
1039
|
+
<span class="kw">return</span> `config ${Object.keys(split.config).join(',')}; own ${split.own.name}; `
|
|
1040
|
+
+ `registry ${registry.names().join(',')}; grid ${applied.join(',')}; `
|
|
1041
|
+
+ `tabs ${claimed.join(',')}; viewers ${built.join(',')}; router ${routers}`;</code></pre>
|
|
1042
|
+
|
|
1043
|
+
<p class="section-note">
|
|
1044
|
+
<strong>Events are callback props.</strong> Svelte 5 removed component events, so
|
|
1045
|
+
<code>cell:changed</code> arrives as <code>onCellChanged</code> — the same name React
|
|
1046
|
+
uses. The all-lowercase <code>oncellchanged</code> is accepted too, for anyone who prefers
|
|
1047
|
+
Svelte's DOM attribute style. The grid's own dashed names (<code>cell-changed</code>) still
|
|
1048
|
+
apply to the <code>use:lattice</code> action, which dispatches <code>CustomEvent</code>s on
|
|
1049
|
+
the node.
|
|
1050
|
+
</p>
|
|
1051
|
+
<p class="section-note">
|
|
1052
|
+
<strong>Reactivity, and rows.</strong> The grid paints outside Svelte's scheduler: it owns
|
|
1053
|
+
its element and its own render loop, and nothing inside it is reactive state. Hold large row
|
|
1054
|
+
arrays in <code>$state.raw</code> (or in an ordinary <code>let</code>), never in deep
|
|
1055
|
+
<code>$state</code> — a proxy over a million rows costs far more than the reload it
|
|
1056
|
+
would save, and the components diff by identity, so a new array is what signals a change.
|
|
1057
|
+
An inline literal prop (<code>columns={[…]}</code>) is a new array on every render and
|
|
1058
|
+
reconfigures the viewer every time; hoist it.
|
|
1059
|
+
</p>
|
|
1060
|
+
<p class="section-note">
|
|
1061
|
+
<strong>Cleanup, and no SSR.</strong> Every component builds its instance in
|
|
1062
|
+
<code>onMount</code> and destroys it in <code>onDestroy</code>, unsubscribing its listeners,
|
|
1063
|
+
withdrawing its grid from the registry and detaching from the router before the grid goes.
|
|
1064
|
+
Nothing is built during server rendering — SvelteKit SSR emits the empty host element
|
|
1065
|
+
and nothing else — so these components are browser-only by construction.
|
|
1066
|
+
</p>
|
|
1067
|
+
|
|
1068
|
+
<h3 id="angular-v2">Angular: a compiled entry point, <code>@toclocoinc/lattice-grid/angular</code></h3>
|
|
717
1069
|
<p>
|
|
718
1070
|
Angular's components are not objects a library can assemble at run time in a production
|
|
719
1071
|
build. <code>modules/angular</code> did assemble them that way, which needs Angular's JIT
|
|
720
1072
|
compiler in the page — present on a development server, absent from every AOT build.
|
|
721
|
-
So Angular gets
|
|
1073
|
+
So Angular gets an entry point of its own: TypeScript components compiled by
|
|
722
1074
|
<code>@angular/compiler-cli</code> into a partial-Ivy library, which your build's Angular
|
|
723
1075
|
Linker turns into definitions exactly as it does for any other Angular library you install.
|
|
724
1076
|
<strong>No compiler in your bundle, and one standalone component per viewer.</strong>
|
|
725
1077
|
</p>
|
|
726
|
-
<
|
|
1078
|
+
<p>
|
|
1079
|
+
It ships <em>inside</em> the grid package, at the subpath
|
|
1080
|
+
<code>@toclocoinc/lattice-grid/angular</code>: one install, one version number, one
|
|
1081
|
+
licence. <code>@angular/core</code> and <code>@angular/common</code> are optional peer
|
|
1082
|
+
dependencies of the package, so a project that is not an Angular one installs nothing extra
|
|
1083
|
+
and sees no warning.
|
|
1084
|
+
</p>
|
|
1085
|
+
<pre><code>npm install @toclocoinc/lattice-grid</code></pre>
|
|
727
1086
|
<pre><code><span class="kw">import</span> { bootstrapApplication } <span class="kw">from</span> '@angular/platform-browser';
|
|
728
1087
|
<span class="kw">import</span> { createGrid } <span class="kw">from</span> '@toclocoinc/lattice-grid';
|
|
729
1088
|
<span class="kw">import</span> { createKPI } <span class="kw">from</span> '@toclocoinc/lattice-grid/modules/kpi';
|
|
730
1089
|
<span class="kw">import</span> { createChart } <span class="kw">from</span> '@toclocoinc/lattice-grid/modules/charts';
|
|
731
1090
|
<span class="kw">import</span> {
|
|
732
1091
|
LatticeGridComponent, LatticeKpiComponent, LatticeChartComponent, provideLattice,
|
|
733
|
-
} <span class="kw">from</span> '@toclocoinc/lattice-grid
|
|
1092
|
+
} <span class="kw">from</span> '@toclocoinc/lattice-grid/angular';
|
|
734
1093
|
|
|
735
1094
|
@Component({
|
|
736
1095
|
selector: 'app-dashboard',
|
|
@@ -823,8 +1182,8 @@ bootstrapApplication(Dashboard, {
|
|
|
823
1182
|
finds a real Angular with no JIT compiler, instead of leaving you with Angular's own. In
|
|
824
1183
|
1.65 it also gained the fix that <code><div [latticeGrid]="config"></code> binds the
|
|
825
1184
|
configuration through the directive's selector, as its documentation always said it did. It
|
|
826
|
-
will be removed in a later release; move to <code>@toclocoinc/lattice-grid
|
|
827
|
-
which covers every viewer rather than the grid alone.
|
|
1185
|
+
will be removed in a later release; move to <code>@toclocoinc/lattice-grid/angular</code>,
|
|
1186
|
+
which covers every viewer rather than the grid alone and needs no second install.
|
|
828
1187
|
</p>
|
|
829
1188
|
|
|
830
1189
|
<div class="note">
|
|
@@ -1001,6 +1360,93 @@ defaults(<span class="kw">null</span>); <span class="cmt">// clea
|
|
|
1001
1360
|
|
|
1002
1361
|
<p class="section-note">Events are re-dispatched as <code>CustomEvent</code>s named <code>lattice-</code> plus the grid name with colons hyphenated: <code>cell:changed</code> becomes <code>lattice-cell-changed</code>. The payload is on <code>event.detail</code>. The prefix avoids colliding with platform events, the grid emits one called <code>scroll</code>.</p>
|
|
1003
1362
|
|
|
1363
|
+
<h3 id="webcomponent-v2">Web Components: every viewer, not only the grid</h3>
|
|
1364
|
+
<p class="section-note">Since 1.66 the same bundle registers one element per viewer, so a page
|
|
1365
|
+
without a bundler gets the KPI panel, a chart, the board, the Gantt, the dashboard layout, the
|
|
1366
|
+
tab strip and the Data Router as tags. The grid is already registered on import;
|
|
1367
|
+
<code>defineLatticeElements</code> registers the rest from the module factories the page has
|
|
1368
|
+
imported, because nothing is imported by this module — a page that draws no charts never loads
|
|
1369
|
+
the charts bundle.</p>
|
|
1370
|
+
|
|
1371
|
+
<pre data-run="js" data-expect="8" data-covers="export:ELEMENT_TAGS"><code><span class="cmt">// Every tag this package can register, under the default prefix.</span>
|
|
1372
|
+
<span class="kw">const</span> { ELEMENT_TAGS } = <span class="kw">await</span> import('../packages/modules/webcomponent/elements.js');
|
|
1373
|
+
<span class="kw">return</span> Object.keys(ELEMENT_TAGS).length;</code></pre>
|
|
1374
|
+
|
|
1375
|
+
<pre><code><script type="module">
|
|
1376
|
+
import { createKPI } from './dist/modules/kpi.esm.js';
|
|
1377
|
+
import { createChart } from './dist/modules/charts.esm.js';
|
|
1378
|
+
import { defineLatticeElements } from './dist/modules/webcomponent.esm.js';
|
|
1379
|
+
defineLatticeElements({ createKPI, createChart });
|
|
1380
|
+
</script>
|
|
1381
|
+
|
|
1382
|
+
<lattice-grid name="quakes" row-key="id"></lattice-grid>
|
|
1383
|
+
<lattice-kpi grid-name="quakes"></lattice-kpi>
|
|
1384
|
+
<lattice-chart grid-name="quakes" type="bar" x="place" y="mag"></lattice-chart></code></pre>
|
|
1385
|
+
|
|
1386
|
+
<div class="table-wrap">
|
|
1387
|
+
<table>
|
|
1388
|
+
<thead><tr><th>Tag</th><th>Viewer</th><th>Notes</th></tr></thead>
|
|
1389
|
+
<tbody>
|
|
1390
|
+
<tr><td class="sig"><lattice-grid></td><td class="type">createGrid</td><td class="desc">Registered on import. Gains <code>name</code>, <code>route</code>, <code>route-options</code>, the <code>predicates</code> and <code>rowUpdates</code> properties, and <code>grid-ready</code> / <code>grid-destroyed</code>.</td></tr>
|
|
1391
|
+
<tr><td class="sig"><lattice-kpi></td><td class="type">createKPI</td><td class="desc">Grid-bound by default; set <code>rows</code> for a standalone panel. <code>tiles</code> is a property. Like every grid-bound viewer it <strong>waits</strong> for its grid rather than mounting empty, so a panel written above its grid is built once, when the grid arrives.</td></tr>
|
|
1392
|
+
<tr><td class="sig"><lattice-chart></td><td class="type">createChart</td><td class="desc">Always drawn from a grid, so it waits for one. Every other attribute is the chart spec and a change goes into <code>chart.update()</code>.</td></tr>
|
|
1393
|
+
<tr><td class="sig"><lattice-kanban></td><td class="type">createKanban</td><td class="desc">Board. <code>rows</code>, <code>columns</code>, <code>card</code>, <code>facets</code> are properties.</td></tr>
|
|
1394
|
+
<tr><td class="sig"><lattice-gantt></td><td class="type">createGantt</td><td class="desc"><code>tasks</code> and <code>dependencies</code> are properties and both are live.</td></tr>
|
|
1395
|
+
<tr><td class="sig"><lattice-layout></td><td class="type">createLayout</td><td class="desc"><code>windows</code> is a property.</td></tr>
|
|
1396
|
+
<tr><td class="sig"><lattice-tabs></td><td class="type">createTabs</td><td class="desc">A tab's content is a <code><template data-tab="‹id›"></code> child, cloned into the panel the module creates. With no <code>tabs</code> property the descriptors are read from the templates. A tab with no template is left to the module; the two kinds mix.</td></tr>
|
|
1397
|
+
<tr><td class="sig"><lattice-router></td><td class="type">createDataRouter</td><td class="desc">A grouping element. Owns one Data Router, built by the first <code><lattice-grid route="…"></code> beneath it and destroyed on disconnect, and the name registry its descendants resolve <code>grid-name</code> through.</td></tr>
|
|
1398
|
+
</tbody>
|
|
1399
|
+
</table>
|
|
1400
|
+
</div>
|
|
1401
|
+
|
|
1402
|
+
<p class="section-note"><strong>Attributes for scalars, properties for structures.</strong> An
|
|
1403
|
+
attribute is a string, so <code>columns</code>, <code>rows</code>, <code>tiles</code>,
|
|
1404
|
+
<code>tasks</code>, <code>windows</code> and a geometry pack are properties. Scalars work as
|
|
1405
|
+
either: an empty attribute is <code>true</code>, <code>true</code>/<code>false</code> are
|
|
1406
|
+
booleans, a finite number is a number, a value starting <code>[</code> or <code>{</code> is
|
|
1407
|
+
JSON, and anything else is the string — so use the property when the type matters. On the viewer
|
|
1408
|
+
elements a hyphenated attribute reaches the camelCase key (<code>column-property</code> →
|
|
1409
|
+
<code>columnProperty</code>). Every configuration key has a real property, including one no
|
|
1410
|
+
table here names: assign it and the element adopts it. <code><lattice-grid></code> keeps
|
|
1411
|
+
its own attribute table above — each of those is a property too
|
|
1412
|
+
(<code>el.theme</code>, <code>el.rowKey</code>) — and takes everything outside it through
|
|
1413
|
+
<code>config</code>.</p>
|
|
1414
|
+
|
|
1415
|
+
<p class="section-note"><strong>Upgrade order.</strong> A property assigned before the element
|
|
1416
|
+
upgrades is honoured. <strong>Set your configuration before the element connects</strong> —
|
|
1417
|
+
<code>document.createElement</code>, assign, then append — so the viewer is built once with
|
|
1418
|
+
everything it needs rather than built empty and reconfigured; in markup, use the JSON attribute
|
|
1419
|
+
forms. <strong>Cleanup</strong> is on disconnect, deferred by a microtask so moving an element in
|
|
1420
|
+
the DOM keeps its instance rather than rebuilding it. <strong>SSR</strong>: every element owns a
|
|
1421
|
+
real DOM node, so nothing is built until it is connected in a browser; a server render emits the
|
|
1422
|
+
empty tag and no more.</p>
|
|
1423
|
+
|
|
1424
|
+
<p class="section-note"><strong>Events.</strong> Instance events are <code>CustomEvent</code>s
|
|
1425
|
+
named <code>lattice-</code> plus the event name with colons hyphenated
|
|
1426
|
+
(<code>card:move</code> → <code>lattice-card-move</code>); the prefix is load-bearing,
|
|
1427
|
+
because the grid emits <code>scroll</code> and a chart emits <code>click</code>. The lifecycle
|
|
1428
|
+
events are this adapter's own and are unprefixed: <code>grid-ready</code> /
|
|
1429
|
+
<code>grid-destroyed</code> on the grid and <code>ready</code> / <code>destroyed</code> on every
|
|
1430
|
+
viewer, each carrying the instance in <code>detail</code>. The instance is also on
|
|
1431
|
+
<code>el.grid</code> / <code>el.instance</code>.</p>
|
|
1432
|
+
|
|
1433
|
+
<h4>Inside a shadow root</h4>
|
|
1434
|
+
<p class="section-note">The elements are light DOM, deliberately. A <em>host</em> that puts them
|
|
1435
|
+
inside a shadow root of its own is a different matter: the theme, each module's injected
|
|
1436
|
+
stylesheet and the grid's generated one all live in <code>document.head</code> and none of them
|
|
1437
|
+
crosses a shadow boundary, so a grid in there used to render structurally perfect and completely
|
|
1438
|
+
unstyled. Every element now calls <code>adoptLatticeStyles</code> on its own root when that root
|
|
1439
|
+
is a shadow root, mirroring each sheet as a constructable <code>CSSStyleSheet</code> and keeping
|
|
1440
|
+
it level as the grid compiles new classes and as a module injects its own. A host that manages
|
|
1441
|
+
its own <code>adoptedStyleSheets</code> can take the sheets directly with
|
|
1442
|
+
<code>latticeStyleSheets()</code>; <code>lattice-styles="off"</code> on an element opts out. A
|
|
1443
|
+
stylesheet that cannot be read as text — a cross-origin <code><link></code>, or one
|
|
1444
|
+
carrying <code>@import</code> — is cloned into the root as a <code><link></code> instead.</p>
|
|
1445
|
+
|
|
1446
|
+
<pre><code><span class="kw">const</span> root = host.attachShadow({ mode: 'open' });
|
|
1447
|
+
adoptLatticeStyles(root);
|
|
1448
|
+
root.append(document.createElement('lattice-grid'));</code></pre>
|
|
1449
|
+
|
|
1004
1450
|
<h2 id="dhtmlx-compat">dhtmlx Grid compatibility wrapper</h2>
|
|
1005
1451
|
<p class="section-note">A <code>Grid</code> class shaped like dhtmlx's own <code>dhx.Grid</code> (Suite 5+), backed by a real Lattice grid. Covers column definitions, <code>.data</code>, <code>.selection</code>, <code>.history</code>, <code>.export.csv</code>/<code>.xlsx</code>, and a name-mapped subset of <code>.events</code>: see <a href="api-detail.html#dhtmlx-guide">the guide</a> for exactly what is and is not covered. Not the classic pre-Suite-5 <code>dhtmlXGridObject</code>.</p>
|
|
1006
1452
|
|
|
@@ -1514,7 +1960,7 @@ grid.destroy();
|
|
|
1514
1960
|
<table>
|
|
1515
1961
|
<thead><tr><th>Member</th><th>Returns</th><th>Description</th></tr></thead>
|
|
1516
1962
|
<tbody>
|
|
1517
|
-
<tr><td class="sig">getVersion()</td><td class="type">string</td><td class="desc">The version this grid came from, e.g. <code>'1.
|
|
1963
|
+
<tr><td class="sig">getVersion()</td><td class="type">string</td><td class="desc">The version this grid came from, e.g. <code>'1.67.0'</code>. Also on the module as <code>getVersion()</code>, for when you have no grid to hand.</td></tr>
|
|
1518
1964
|
<tr><td class="sig">get(key)</td><td class="type">unknown</td><td class="desc">Read any configuration key.</td></tr>
|
|
1519
1965
|
<tr><td class="sig">set(key, value)</td><td class="type">void</td><td class="desc">Write one key. Every key is live; nothing needs a rebuild.</td></tr>
|
|
1520
1966
|
<tr><td class="sig">setAll(values)</td><td class="type">void</td><td class="desc">Write several in one pass. Emits one <code>config:changed</code> for the batch, not one per key.</td></tr>
|
|
@@ -7757,15 +8203,65 @@ createGrid(el, {
|
|
|
7757
8203
|
|
|
7758
8204
|
<h3>Icons</h3>
|
|
7759
8205
|
<p>Inline SVG sprites, overridable by name through <code>registerIcon(name, def)</code>.</p>
|
|
8206
|
+
<!-- icon-gallery:start -->
|
|
7760
8207
|
<div class="chips">
|
|
7761
|
-
<span class="chip"
|
|
7762
|
-
<span class="chip"
|
|
7763
|
-
<span class="chip"
|
|
7764
|
-
<span class="chip"
|
|
7765
|
-
<span class="chip"
|
|
7766
|
-
<span class="chip"
|
|
7767
|
-
<span class="chip"
|
|
7768
|
-
|
|
8208
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M6 3.5 10.5 8 6 12.5"></path></svg>chevronRight</span>
|
|
8209
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3.5 6 8 10.5 12.5 6"></path></svg>chevronDown</span>
|
|
8210
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3.5 10 8 5.5 12.5 10"></path></svg>chevronUp</span>
|
|
8211
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M10 3.5 5.5 8 10 12.5"></path></svg>chevronLeft</span>
|
|
8212
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3.5 8.5 6.5 11.5 12.5 4.5"></path></svg>check</span>
|
|
8213
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M4 8h8"></path></svg>dash</span>
|
|
8214
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M4 4l8 8M12 4l-8 8"></path></svg>close</span>
|
|
8215
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3.5v9M3.5 8h9"></path></svg>plus</span>
|
|
8216
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3.5 8h9"></path></svg>minus</span>
|
|
8217
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="currentColor"><path d="M8 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Zm.75 4a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM7.25 7h1.5v4.5h-1.5Z"></path></svg>info</span>
|
|
8218
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="currentColor"><path d="M8 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Zm3.2 4.4-4 4.6-2.4-2.3 1-1.1 1.3 1.2 3-3.4Z"></path></svg>success</span>
|
|
8219
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="currentColor"><path d="M8 1.5 15 14H1Zm-.75 4v4h1.5v-4Zm0 5v1.5h1.5V10.5Z"></path></svg>warning</span>
|
|
8220
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="currentColor"><path d="M8 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Zm-.75 3h1.5v5h-1.5Zm0 6h1.5V12h-1.5Z"></path></svg>danger</span>
|
|
8221
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="currentColor"><path d="M8 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Zm-.75 3h1.5v3.7l2.5 1.5-.75 1.3-3.25-2Z"></path></svg>clock</span>
|
|
8222
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="currentColor"><path d="M4.5 7V5a3.5 3.5 0 1 1 7 0v2H13v7H3V7Zm1.5 0h4V5a2 2 0 1 0-4 0Z"></path></svg>lock</span>
|
|
8223
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M6.5 9.5a3 3 0 0 1 0-4l2-2a3 3 0 0 1 4 4l-1 1M9.5 6.5a3 3 0 0 1 0 4l-2 2a3 3 0 0 1-4-4l1-1"></path></svg>link</span>
|
|
8224
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M6.5 3.5h-3v9h9v-3M9.5 3.5h3v3M12.5 3.5 7 9"></path></svg>external</span>
|
|
8225
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="currentColor"><path d="M2 3h12l-4.5 5.2V13L6.5 11.5V8.2Z"></path></svg>filter</span>
|
|
8226
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="currentColor"><path d="M4.5 3h2.5v10H4.5zM9 3h2.5v10H9z"></path></svg>pause</span>
|
|
8227
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="currentColor"><path d="M4.5 3l8 5-8 5z"></path></svg>play</span>
|
|
8228
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 13.5h11"></path><path d="M4.5 13.5v-4"></path><path d="M8 13.5v-8"></path><path d="M11.5 13.5v-6"></path></svg>chart</span>
|
|
8229
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="currentColor"><path d="M8 1.5a6.5 6.5 0 0 0 0 13c.7 0 1.2-.5 1.2-1.1 0-.3-.1-.6-.3-.8a1.1 1.1 0 0 1 .8-1.9h1.4A3.4 3.4 0 0 0 14.5 7c0-3-2.9-5.5-6.5-5.5Z"></path><path d="M4.6 7.6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM6.7 4.6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM9.9 4.7a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM11.9 6.9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"></path></svg>palette</span>
|
|
8230
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 8h6.5a3.25 3.25 0 0 1 0 6.5H6M3 8l3-3M3 8l3 3"></path></svg>undo</span>
|
|
8231
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M13 8H6.5a3.25 3.25 0 0 0 0 6.5H10M13 8l-3-3M13 8l-3 3"></path></svg>redo</span>
|
|
8232
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 2.5h11v11h-11zM6.5 2.5v11M10 2.5v11"></path></svg>columns</span>
|
|
8233
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M8 2.5v7.5M8 10 5 7M8 10l3-3M2.5 12.5h11"></path></svg>download</span>
|
|
8234
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 8a5 5 0 1 0 1.6-3.7M3 3v2.8h2.8"></path></svg>restore</span>
|
|
8235
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 2.5h10v11H3zM3 6h10M3 9.5h10M6.5 6v7.5"></path></svg>spreadsheet</span>
|
|
8236
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M4.5 6V2.5h7V6M4.5 11.5h-2V6h11v5.5h-2M4.5 9.5h7v4h-7z"></path></svg>print</span>
|
|
8237
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 6V2.5H6M10 2.5h3.5V6M13.5 10v3.5H10M6 13.5H2.5V10"></path></svg>maximise</span>
|
|
8238
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M6 2.5V6H2.5M13.5 6H10V2.5M10 13.5V10h3.5M2.5 10H6v3.5"></path></svg>minimise</span>
|
|
8239
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M4 2.5h8v11L8 11l-4 2.5z"></path></svg>views</span>
|
|
8240
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M7 2.5a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9M10.4 10.4 13.5 13.5"></path></svg>search</span>
|
|
8241
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 11.2 11 2.7l2.3 2.3-8.5 8.5-3 .7z"></path></svg>pencil</span>
|
|
8242
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 4.5h10M6.5 4.5V3h3v1.5M4.5 4.5l.7 8.5h5.6l.7-8.5M6.8 7v3.7M9.2 7v3.7"></path></svg>trash</span>
|
|
8243
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M11.5 5.5a1.8 1.8 0 1 0 0-3.6 1.8 1.8 0 0 0 0 3.6M4.5 9.8a1.8 1.8 0 1 0 0-3.6 1.8 1.8 0 0 0 0 3.6M11.5 14.1a1.8 1.8 0 1 0 0-3.6 1.8 1.8 0 0 0 0 3.6M6.1 7.1l3.8-1.9M6.1 8.9l3.8 1.9"></path></svg>share</span>
|
|
8244
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M8 2v6M5 8h6l1 2.5H4zM8 10.5V14"></path></svg>pin</span>
|
|
8245
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="currentColor"><path d="M8 3.5 12 8H4Z"></path></svg>sortAsc</span>
|
|
8246
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="currentColor"><path d="M8 12.5 4 8h8Z"></path></svg>sortDesc</span>
|
|
8247
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 4.5h11M2.5 8h11M2.5 11.5h11"></path></svg>menu</span>
|
|
8248
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="currentColor"><path d="M6 3.5h1.5V5H6Zm3 0h1.5V5H9ZM6 7.25h1.5v1.5H6Zm3 0h1.5v1.5H9ZM6 11h1.5v1.5H6Zm3 0h1.5v1.5H9Z"></path></svg>drag</span>
|
|
8249
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="currentColor"><path d="M8 1.6l1.96 3.97 4.38.64-3.17 3.09.75 4.36L8 11.6l-3.92 2.06.75-4.36L1.66 6.21l4.38-.64Z"></path></svg>star</span>
|
|
8250
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="currentColor"><path d="M8 14.2 2.4 8.6a3.3 3.3 0 0 1 4.67-4.67L8 4.86l.93-.93A3.3 3.3 0 0 1 13.6 8.6Z"></path></svg>heart</span>
|
|
8251
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="currentColor"><path d="M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2Z"></path></svg>circleFilled</span>
|
|
8252
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="currentColor"><path d="M3 3h10v10H3Z"></path></svg>square</span>
|
|
8253
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="currentColor"><path d="M9.5 1.5 3.5 9h3.2l-.7 5.5L12.5 7H9.3Z"></path></svg>bolt</span>
|
|
8254
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="currentColor"><path d="M4 1.5h1.5v13H4Zm1.5 1h7.5l-1.6 2.6L13 7.7H5.5Z"></path></svg>flag</span>
|
|
8255
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 13 12.5 3.5"></path><path d="M7.5 3.5H12.5V8.5"></path></svg>arrow</span>
|
|
8256
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M4 11 10 5l2 2-6 6H4z"></path><path d="M3 14.5h10"></path></svg>highlight</span>
|
|
8257
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="currentColor"><path d="M5.5 6.8 8.6 1.5a1.6 1.6 0 0 1 1.5 2.1L9.4 6h3.4a1.4 1.4 0 0 1 1.35 1.78l-1.3 4.6A1.9 1.9 0 0 1 11 13.8H5.5ZM4 6.5H1.5v7.3H4Z"></path></svg>thumbUp</span>
|
|
8258
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="currentColor"><path d="M8 3.2c3.3 0 6 3 6.6 4.5C14 9.3 11.3 12.3 8 12.3S2 9.3 1.4 7.7C2 6.2 4.7 3.2 8 3.2Zm0 2a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Z"></path></svg>eye</span>
|
|
8259
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2.2 2.9 13.1 13.8M8 3.2c3.3 0 6 3 6.6 4.5a9.4 9.4 0 0 1-1.9 2.4M5 4.2A9 9 0 0 0 1.4 7.7C2 9.3 4.7 12.3 8 12.3c.9 0 1.7-.2 2.5-.5M6.3 6a2.5 2.5 0 0 0 3.4 3.5"></path></svg>eyeOff</span>
|
|
8260
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M5.5 2.5h8v8M2.5 5.5h8v8h-8Z"></path></svg>copy</span>
|
|
8261
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 2.5h12v8H2Z"></path><path d="M8 10.5v3"></path><path d="M6 13.5h4"></path></svg>present</span>
|
|
8262
|
+
<span class="chip chip--icon"><svg class="chip-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false" fill="currentColor"><path d=""></path></svg>blank</span>
|
|
8263
|
+
</div>
|
|
8264
|
+
<!-- icon-gallery:end -->
|
|
7769
8265
|
|
|
7770
8266
|
<h2 id="operators">Filter grammar</h2>
|
|
7771
8267
|
<p class="section-note">
|
|
@@ -8195,7 +8691,7 @@ spans.addSpan('R0', 'name', 3, 2); <span class="cmt">// rowspan 3, colspan 2</sp
|
|
|
8195
8691
|
|
|
8196
8692
|
<h3 id="module-exports-example">Every module export, executed</h3>
|
|
8197
8693
|
<p class="section-note">Every shipped module’s exports, resolved against its own barrel on every build.</p>
|
|
8198
|
-
<pre data-run="js" data-expect="
|
|
8694
|
+
<pre data-run="js" data-expect="80" data-covers="export:ContextMenu export:Messages export:Registry export:autoInit export:createGrid export:createLocalViewStorage export:createMessages export:createStat export:deltaOf export:gridElementsWithin export:hydrateTable export:mountPanel export:readTable export:toneOf export:Chart export:PALETTE export:SCHEMES export:TYPES export:createChart export:chartRange export:canChartRange export:deriveRangeSpec export:regressionPlots export:registerScheme export:resolveScheme export:schemeNames export:setDefaultScheme export:HTML_ROW_WARNING_THRESHOLD export:QUERY_CHANGED_EVENT export:SCROLL_NEAR_END_EVENT export:attach export:destroyWithin export:driveInfiniteScroll export:driveOobUpdates export:driveServerMode export:ingestResponse export:initWithin export:queryParams export:restoreStateWithin export:rowsFromFragment export:rowsFromJson export:saveStateWithin export:ATTRIBUTE_CONFIG export:EVENT_PREFIX export:GridElementController export:LatticeGrid export:TAG_NAME export:createLatticeGridElement export:defineLatticeGrid export:domEventName export:observedAttributeNames export:createLatticeElements export:defineLatticeElements export:ELEMENT_TAGS export:createLatticeKPIElement export:createLatticeChartElement export:createLatticeKanbanElement export:createLatticeGanttElement export:createLatticeLayoutElement export:createLatticeTabsElement export:createLatticeRouterElement export:adoptLatticeStyles export:latticeStyleSheets export:CONSOLE_ACTIVATION export:createDevtools export:expose export:EVENT_NAMES export:handlerName export:createLatticeGrid export:dashedName export:createLatticeAction export:Grid export:warnIfLargeHtmlPayload export:createDataRouter export:MockWebSocket export:rng export:opsFeed export:priceFeed export:createKanban export:pack"><code><span class="cmt">// Every declared export of every shipped module, resolved against its own</span>
|
|
8199
8695
|
<span class="cmt">// barrel. A module that stopped exporting something fails here.</span>
|
|
8200
8696
|
<span class="kw">const</span> modules = [
|
|
8201
8697
|
[<span class="kw">await</span> import('../packages/dom/src/index.js'), [
|
|
@@ -8220,6 +8716,10 @@ spans.addSpan('R0', 'name', 3, 2); <span class="cmt">// rowspan 3, colspan 2</sp
|
|
|
8220
8716
|
'ATTRIBUTE_CONFIG', 'EVENT_PREFIX', 'GridElementController',
|
|
8221
8717
|
'TAG_NAME', 'createLatticeGridElement', 'defineLatticeGrid', 'domEventName',
|
|
8222
8718
|
'observedAttributeNames',
|
|
8719
|
+
'createLatticeElements', 'defineLatticeElements', 'ELEMENT_TAGS',
|
|
8720
|
+
'createLatticeKPIElement', 'createLatticeChartElement', 'createLatticeKanbanElement',
|
|
8721
|
+
'createLatticeGanttElement', 'createLatticeLayoutElement', 'createLatticeTabsElement',
|
|
8722
|
+
'createLatticeRouterElement', 'adoptLatticeStyles', 'latticeStyleSheets',
|
|
8223
8723
|
]],
|
|
8224
8724
|
[<span class="kw">await</span> import('../packages/modules/devtools/index.js'), [
|
|
8225
8725
|
'CONSOLE_ACTIVATION', 'createDevtools', 'expose',
|
|
@@ -8536,6 +9036,18 @@ grid.destroy();
|
|
|
8536
9036
|
<tr><td class="name">ATTRIBUTE_CONFIG</td><td class="type">Readonly<Record<string, unknown>></td><td class="desc">Which attributes map to which configuration keys.</td></tr>
|
|
8537
9037
|
<tr><td class="name">observedAttributeNames</td><td class="type">() => string[]</td><td class="desc">The attributes the element reacts to.</td></tr>
|
|
8538
9038
|
<tr><td class="name">domEventName</td><td class="type">(event) => string</td><td class="desc">The DOM event name a grid event is dispatched under.</td></tr>
|
|
9039
|
+
<tr><td class="name">defineLatticeElements</td><td class="type">(opts?) => Record<string, class></td><td class="desc">Register one element per viewer from the factories you pass, under <code>prefix</code> (<code>lattice-</code> by default). Safe to call twice. See <a href="#webcomponent-v2">Web Components</a>.</td></tr>
|
|
9040
|
+
<tr><td class="name">createLatticeElements</td><td class="type">(deps?) => Record<string, class></td><td class="desc">The classes, without registering them.</td></tr>
|
|
9041
|
+
<tr><td class="name">ELEMENT_TAGS</td><td class="type">Readonly<Record<string, string>></td><td class="desc">The tag each viewer takes, before the prefix.</td></tr>
|
|
9042
|
+
<tr><td class="name">createLatticeKPIElement</td><td class="type">({ createKPI }) => class</td><td class="desc">The <code><lattice-kpi></code> class on its own.</td></tr>
|
|
9043
|
+
<tr><td class="name">createLatticeChartElement</td><td class="type">({ createChart }) => class</td><td class="desc">The <code><lattice-chart></code> class on its own.</td></tr>
|
|
9044
|
+
<tr><td class="name">createLatticeKanbanElement</td><td class="type">({ createKanban }) => class</td><td class="desc">The <code><lattice-kanban></code> class on its own.</td></tr>
|
|
9045
|
+
<tr><td class="name">createLatticeGanttElement</td><td class="type">({ createGantt }) => class</td><td class="desc">The <code><lattice-gantt></code> class on its own.</td></tr>
|
|
9046
|
+
<tr><td class="name">createLatticeLayoutElement</td><td class="type">({ createLayout }) => class</td><td class="desc">The <code><lattice-layout></code> class on its own.</td></tr>
|
|
9047
|
+
<tr><td class="name">createLatticeTabsElement</td><td class="type">({ createTabs, createGrid? }) => class</td><td class="desc">The <code><lattice-tabs></code> class on its own.</td></tr>
|
|
9048
|
+
<tr><td class="name">createLatticeRouterElement</td><td class="type">({ createDataRouter }) => class</td><td class="desc">The <code><lattice-router></code> class on its own.</td></tr>
|
|
9049
|
+
<tr><td class="name">adoptLatticeStyles</td><td class="type">(root, opts?) => () => void</td><td class="desc">Make a shadow root see Lattice's styles, and keep it seeing them as more are generated. Returns the undo.</td></tr>
|
|
9050
|
+
<tr><td class="name">latticeStyleSheets</td><td class="type">(opts?) => CSSStyleSheet[]</td><td class="desc">Those stylesheets as constructable sheets, for a host managing its own <code>adoptedStyleSheets</code>. Shared and live; do not mutate them.</td></tr>
|
|
8539
9051
|
</tbody>
|
|
8540
9052
|
</table>
|
|
8541
9053
|
</div>
|
|
@@ -11211,7 +11723,7 @@ return `next ${p.mean.toFixed(1)}; r2 ${f.r2.toFixed(1)}; band ${p.upper - p.low
|
|
|
11211
11723
|
<tr><td class="name">edit</td><td class="type">EditConfig | boolean</td><td class="desc">Editing, and how a change is committed and validated. <small>(optional)</small></td></tr>
|
|
11212
11724
|
<tr><td class="name">pagination</td><td class="type">PaginationConfig | boolean</td><td class="desc">Page the rows rather than scrolling them. <small>(optional)</small></td></tr>
|
|
11213
11725
|
<tr><td class="name">locale</td><td class="type">string</td><td class="desc"><small>(optional)</small></td></tr>
|
|
11214
|
-
<tr><td class="name">direction</td><td class="type">'ltr' | 'rtl' | 'auto'</td><td class="desc">Writing direction. Omit it, or say `'auto'`, to settle it from the
|
|
11726
|
+
<tr><td class="name">direction</td><td class="type">'ltr' | 'rtl' | 'auto'</td><td class="desc">Writing direction. An explicit `'ltr'` or `'rtl'` always wins. Omit it, or say `'auto'`, to settle it from the mount or the nearest ancestor carrying a `dir="ltr"`/`dir="rtl"` attribute, and only then from `locale`: `ar`, `he`, `fa` and the rest resolve to `rtl`. A page-level `dir="ltr"` therefore wins over an RTL locale — a host that wants RTL inside an LTR page sets `direction: 'rtl'` explicitly. In a right-to-left grid the logical alignments `start`/`end` mirror while the physical `left`/`right` do not (see {@link Align}). <small>(optional)</small></td></tr>
|
|
11215
11727
|
<tr><td class="name">timeZone</td><td class="type">string</td><td class="desc">IANA zone every date column formats in, e.g. 'Europe/London' or 'UTC'. Omit to use each viewer's own zone. A column's own `format.timeZone` wins. <small>(optional)</small></td></tr>
|
|
11216
11728
|
<tr><td class="name">theme</td><td class="type">Theme</td><td class="desc">The visual theme. <small>(optional)</small></td></tr>
|
|
11217
11729
|
<tr><td class="name">density</td><td class="type">Density</td><td class="desc">Row height and padding as a named step, rather than pixel by pixel. <small>(optional)</small></td></tr>
|
|
@@ -11639,7 +12151,7 @@ return `next ${p.mean.toFixed(1)}; r2 ${f.r2.toFixed(1)}; band ${p.upper - p.low
|
|
|
11639
12151
|
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
11640
12152
|
<tbody>
|
|
11641
12153
|
<tr><td class="name">el</td><td class="type">unknown | null</td><td class="desc"><small>(read-only)</small></td></tr>
|
|
11642
|
-
<tr><td class="name">rowKey</td><td class="type">string | ((row: KanbanRow) =>
|
|
12154
|
+
<tr><td class="name">rowKey</td><td class="type">string | ((row: KanbanRow) => string | number)</td><td class="desc">The resolved card identity; see `KanbanConfig.rowKey`. <small>(read-only)</small></td></tr>
|
|
11643
12155
|
<tr><td class="name">rows</td><td class="type">KanbanRows</td><td class="desc"></td></tr>
|
|
11644
12156
|
<tr><td class="name">sla</td><td class="type">KanbanSla</td><td class="desc">The card-aging / SLA monitor, present only when a `sla` config was supplied (BACKLOG-0000960). <small>(optional)</small></td></tr>
|
|
11645
12157
|
<tr><td class="name">columns</td><td class="type">(): KanbanColumn[]</td><td class="desc"></td></tr>
|
|
@@ -11774,7 +12286,7 @@ return `next ${p.mean.toFixed(1)}; r2 ${f.r2.toFixed(1)}; band ${p.upper - p.low
|
|
|
11774
12286
|
<tbody>
|
|
11775
12287
|
<tr><td class="name">rows</td><td class="type">KanbanRow[]</td><td class="desc"><small>(optional)</small></td></tr>
|
|
11776
12288
|
<tr><td class="name">grid</td><td class="type">unknown</td><td class="desc"><small>(optional)</small></td></tr>
|
|
11777
|
-
<tr><td class="name">rowKey</td><td class="type">string | ((row: KanbanRow) =>
|
|
12289
|
+
<tr><td class="name">rowKey</td><td class="type">string | ((row: KanbanRow) => string | number)</td><td class="desc">Card identity (a field or fn, returning a string or number); default 'id'. Composite (`string[]`) keys are core-grid-only: a board keys its own card identity from one value, so there is nothing for an array to join into here (BACKLOG-0001669). <small>(optional)</small></td></tr>
|
|
11778
12290
|
<tr><td class="name">columnProperty</td><td class="type">string</td><td class="desc"><small>(optional)</small></td></tr>
|
|
11779
12291
|
<tr><td class="name">columns</td><td class="type">KanbanColumnDef[]</td><td class="desc"><small>(optional)</small></td></tr>
|
|
11780
12292
|
<tr><td class="name">columnOrder</td><td class="type">string[]</td><td class="desc"><small>(optional)</small></td></tr>
|
|
@@ -11962,7 +12474,7 @@ return `next ${p.mean.toFixed(1)}; r2 ${f.r2.toFixed(1)}; band ${p.upper - p.low
|
|
|
11962
12474
|
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
11963
12475
|
<tbody>
|
|
11964
12476
|
<tr><td class="name">el</td><td class="type">unknown | null</td><td class="desc"><small>(read-only)</small></td></tr>
|
|
11965
|
-
<tr><td class="name">rowKey</td><td class="type">string | ((row: KPIRow) =>
|
|
12477
|
+
<tr><td class="name">rowKey</td><td class="type">string | ((row: KPIRow) => string | number)</td><td class="desc">The resolved row identity; see `KPIConfig.rowKey`. <small>(read-only)</small></td></tr>
|
|
11966
12478
|
<tr><td class="name">tree</td><td class="type">boolean</td><td class="desc">Whether the panel renders as a hierarchy rather than a flat tile grid. <small>(read-only)</small></td></tr>
|
|
11967
12479
|
<tr><td class="name">rows</td><td class="type">KPIRows</td><td class="desc"></td></tr>
|
|
11968
12480
|
<tr><td class="name">tiles</td><td class="type">(): KPITileModel[]</td><td class="desc"></td></tr>
|
|
@@ -12020,7 +12532,7 @@ return `next ${p.mean.toFixed(1)}; r2 ${f.r2.toFixed(1)}; band ${p.upper - p.low
|
|
|
12020
12532
|
<tbody>
|
|
12021
12533
|
<tr><td class="name">rows</td><td class="type">KPIRow[]</td><td class="desc"><small>(optional)</small></td></tr>
|
|
12022
12534
|
<tr><td class="name">grid</td><td class="type">unknown</td><td class="desc"><small>(optional)</small></td></tr>
|
|
12023
|
-
<tr><td class="name">rowKey</td><td class="type">string | ((row: KPIRow) =>
|
|
12535
|
+
<tr><td class="name">rowKey</td><td class="type">string | ((row: KPIRow) => string | number)</td><td class="desc">Row identity (a field or fn, returning a string or number); default 'id'. Composite (`string[]`) keys are core-grid-only: a panel keys its own tile identity from one value, so there is nothing for an array to join into here (BACKLOG-0001669). <small>(optional)</small></td></tr>
|
|
12024
12536
|
<tr><td class="name">fields</td><td class="type">string[]</td><td class="desc">Extra columns of the bound `grid` to project onto the rows a tile `filter` sees, beyond the fields the tiles themselves declare. A grid-bound panel hands a filter a projection, not a whole grid row, so a filter over a column no tile names would otherwise read `undefined` and report a confident zero. Ignored on a panel over a plain `rows` array. <small>(optional)</small></td></tr>
|
|
12025
12537
|
<tr><td class="name">tiles</td><td class="type">KPITile[]</td><td class="desc"><small>(optional)</small></td></tr>
|
|
12026
12538
|
<tr><td class="name">columns</td><td class="type">number</td><td class="desc"><small>(optional)</small></td></tr>
|
|
@@ -12170,6 +12682,71 @@ return `next ${p.mean.toFixed(1)}; r2 ${f.r2.toFixed(1)}; band ${p.upper - p.low
|
|
|
12170
12682
|
</tbody>
|
|
12171
12683
|
</table>
|
|
12172
12684
|
</div>
|
|
12685
|
+
<h3 id="type-LatticeChartElement">LatticeChartElement</h3>
|
|
12686
|
+
<p class="section-note">`<lattice-chart>`. Always drawn from a grid, so it waits for one.</p>
|
|
12687
|
+
<div class="table-wrap">
|
|
12688
|
+
<table>
|
|
12689
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
12690
|
+
<tbody>
|
|
12691
|
+
<tr><td class="name">shapes</td><td class="type">unknown</td><td class="desc"></td></tr>
|
|
12692
|
+
<tr><td class="name">series</td><td class="type">unknown</td><td class="desc"></td></tr>
|
|
12693
|
+
<tr><td class="name">data</td><td class="type">unknown</td><td class="desc"></td></tr>
|
|
12694
|
+
<tr><td class="name">formatting</td><td class="type">unknown</td><td class="desc"></td></tr>
|
|
12695
|
+
<tr><td class="name">type</td><td class="type">string | undefined</td><td class="desc"></td></tr>
|
|
12696
|
+
<tr><td class="name">x</td><td class="type">string | undefined</td><td class="desc"></td></tr>
|
|
12697
|
+
<tr><td class="name">y</td><td class="type">string | string[] | undefined</td><td class="desc"></td></tr>
|
|
12698
|
+
<tr><td class="name">value</td><td class="type">string | undefined</td><td class="desc"></td></tr>
|
|
12699
|
+
<tr><td class="name">label</td><td class="type">string | undefined</td><td class="desc"></td></tr>
|
|
12700
|
+
<tr><td class="name">lon</td><td class="type">string | undefined</td><td class="desc"></td></tr>
|
|
12701
|
+
<tr><td class="name">lat</td><td class="type">string | undefined</td><td class="desc"></td></tr>
|
|
12702
|
+
<tr><td class="name">labels</td><td class="type">boolean | undefined</td><td class="desc"></td></tr>
|
|
12703
|
+
<tr><td class="name">stacked</td><td class="type">boolean | undefined</td><td class="desc"></td></tr>
|
|
12704
|
+
<tr><td class="name">horizontal</td><td class="type">boolean | undefined</td><td class="desc"></td></tr>
|
|
12705
|
+
<tr><td class="name">scheme</td><td class="type">string | undefined</td><td class="desc"></td></tr>
|
|
12706
|
+
</tbody>
|
|
12707
|
+
</table>
|
|
12708
|
+
</div>
|
|
12709
|
+
<h3 id="type-LatticeGanttElement">LatticeGanttElement</h3>
|
|
12710
|
+
<p class="section-note">`<lattice-gantt>`.</p>
|
|
12711
|
+
<div class="table-wrap">
|
|
12712
|
+
<table>
|
|
12713
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
12714
|
+
<tbody>
|
|
12715
|
+
<tr><td class="name">tasks</td><td class="type">unknown[]</td><td class="desc"></td></tr>
|
|
12716
|
+
<tr><td class="name">dependencies</td><td class="type">unknown[]</td><td class="desc"></td></tr>
|
|
12717
|
+
<tr><td class="name">resources</td><td class="type">unknown</td><td class="desc"></td></tr>
|
|
12718
|
+
<tr><td class="name">calendar</td><td class="type">unknown</td><td class="desc"></td></tr>
|
|
12719
|
+
<tr><td class="name">columns</td><td class="type">unknown</td><td class="desc"></td></tr>
|
|
12720
|
+
<tr><td class="name">rowKey</td><td class="type">string | undefined</td><td class="desc"></td></tr>
|
|
12721
|
+
<tr><td class="name">scale</td><td class="type">string | undefined</td><td class="desc"></td></tr>
|
|
12722
|
+
<tr><td class="name">autoSchedule</td><td class="type">boolean | undefined</td><td class="desc"></td></tr>
|
|
12723
|
+
</tbody>
|
|
12724
|
+
</table>
|
|
12725
|
+
</div>
|
|
12726
|
+
<h3 id="type-LatticeGridElement">LatticeGridElement</h3>
|
|
12727
|
+
<p class="section-note">`<lattice-grid>`. Structures are properties, scalars are the attributes in the table above, and `config` merges anything without an attribute of its own. Instance events arrive as `CustomEvent`s named `lattice-` plus the event name with colons hyphenated; `grid-ready` and `grid-destroyed` are this adapter's own and carry {@link LatticeGridEventDetail}.</p>
|
|
12728
|
+
<div class="table-wrap">
|
|
12729
|
+
<table>
|
|
12730
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
12731
|
+
<tbody>
|
|
12732
|
+
<tr><td class="name">theme</td><td class="type">string | undefined</td><td class="desc">Every attribute in the table above is also a property of the same name.</td></tr>
|
|
12733
|
+
<tr><td class="name">density</td><td class="type">string | undefined</td><td class="desc"></td></tr>
|
|
12734
|
+
<tr><td class="name">locale</td><td class="type">string | undefined</td><td class="desc"></td></tr>
|
|
12735
|
+
<tr><td class="name">rowKey</td><td class="type">string | undefined</td><td class="desc"></td></tr>
|
|
12736
|
+
<tr><td class="name">rowHeight</td><td class="type">number | undefined</td><td class="desc"></td></tr>
|
|
12737
|
+
<tr><td class="name">headerHeight</td><td class="type">number | undefined</td><td class="desc"></td></tr>
|
|
12738
|
+
<tr><td class="name">autoHeight</td><td class="type">boolean | undefined</td><td class="desc"></td></tr>
|
|
12739
|
+
<tr><td class="name">selection</td><td class="type">string | undefined</td><td class="desc"></td></tr>
|
|
12740
|
+
<tr><td class="name">grid</td><td class="type">Grid | null</td><td class="desc">The live grid, or null while the element is disconnected. <small>(read-only)</small></td></tr>
|
|
12741
|
+
<tr><td class="name">instance</td><td class="type">Grid | null</td><td class="desc">The live grid, under the name every viewer element uses. <small>(read-only)</small></td></tr>
|
|
12742
|
+
<tr><td class="name">rows</td><td class="type">Row[]</td><td class="desc">The row data.</td></tr>
|
|
12743
|
+
<tr><td class="name">columns</td><td class="type">Column[]</td><td class="desc">The column definitions.</td></tr>
|
|
12744
|
+
<tr><td class="name">config</td><td class="type">GridConfig</td><td class="desc">Any configuration without an attribute of its own; merged, not replaced.</td></tr>
|
|
12745
|
+
<tr><td class="name">predicates</td><td class="type">Record<string, ((row: Row) => boolean) | null> | undefined</td><td class="desc">Named row predicates, registered through `grid.filters.where` — they compose with whatever filter the reader has set, unlike `filters`.</td></tr>
|
|
12746
|
+
<tr><td class="name">rowUpdates</td><td class="type">{ add?: Row[]; update?: Row[]; remove?: unknown[] } | undefined</td><td class="desc">A keyed diff applied straight to `grid.rows.apply()`.</td></tr>
|
|
12747
|
+
</tbody>
|
|
12748
|
+
</table>
|
|
12749
|
+
</div>
|
|
12173
12750
|
<h3 id="type-LatticeGridHandle">LatticeGridHandle</h3>
|
|
12174
12751
|
<p class="section-note">The live instance a `<LatticeGrid>` ref exposes; `null` before mount.</p>
|
|
12175
12752
|
<div class="table-wrap">
|
|
@@ -12180,6 +12757,75 @@ return `next ${p.mean.toFixed(1)}; r2 ${f.r2.toFixed(1)}; band ${p.upper - p.low
|
|
|
12180
12757
|
</tbody>
|
|
12181
12758
|
</table>
|
|
12182
12759
|
</div>
|
|
12760
|
+
<h3 id="type-LatticeKanbanElement">LatticeKanbanElement</h3>
|
|
12761
|
+
<p class="section-note">`<lattice-kanban>`. Grid-bound like the KPI panel; give it `rows` to stand alone.</p>
|
|
12762
|
+
<div class="table-wrap">
|
|
12763
|
+
<table>
|
|
12764
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
12765
|
+
<tbody>
|
|
12766
|
+
<tr><td class="name">rows</td><td class="type">Row[]</td><td class="desc"></td></tr>
|
|
12767
|
+
<tr><td class="name">columns</td><td class="type">unknown[]</td><td class="desc"></td></tr>
|
|
12768
|
+
<tr><td class="name">card</td><td class="type">unknown</td><td class="desc"></td></tr>
|
|
12769
|
+
<tr><td class="name">facets</td><td class="type">unknown</td><td class="desc"></td></tr>
|
|
12770
|
+
<tr><td class="name">rowKey</td><td class="type">string | undefined</td><td class="desc"></td></tr>
|
|
12771
|
+
<tr><td class="name">columnProperty</td><td class="type">string | undefined</td><td class="desc"></td></tr>
|
|
12772
|
+
<tr><td class="name">titleProperty</td><td class="type">string | undefined</td><td class="desc"></td></tr>
|
|
12773
|
+
<tr><td class="name">swimlanes</td><td class="type">boolean | undefined</td><td class="desc"></td></tr>
|
|
12774
|
+
</tbody>
|
|
12775
|
+
</table>
|
|
12776
|
+
</div>
|
|
12777
|
+
<h3 id="type-LatticeKPIElement">LatticeKPIElement</h3>
|
|
12778
|
+
<p class="section-note">`<lattice-kpi>`. Grid-bound by default, and it **waits** for its grid rather than mounting empty; give it `rows` for a standalone panel.</p>
|
|
12779
|
+
<div class="table-wrap">
|
|
12780
|
+
<table>
|
|
12781
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
12782
|
+
<tbody>
|
|
12783
|
+
<tr><td class="name">tiles</td><td class="type">unknown[]</td><td class="desc"></td></tr>
|
|
12784
|
+
<tr><td class="name">rows</td><td class="type">Row[]</td><td class="desc"></td></tr>
|
|
12785
|
+
<tr><td class="name">columns</td><td class="type">number | undefined</td><td class="desc"></td></tr>
|
|
12786
|
+
<tr><td class="name">rowKey</td><td class="type">string | undefined</td><td class="desc"></td></tr>
|
|
12787
|
+
<tr><td class="name">locale</td><td class="type">string | undefined</td><td class="desc"></td></tr>
|
|
12788
|
+
<tr><td class="name">theme</td><td class="type">string | undefined</td><td class="desc"></td></tr>
|
|
12789
|
+
<tr><td class="name">density</td><td class="type">string | undefined</td><td class="desc"></td></tr>
|
|
12790
|
+
<tr><td class="name">format</td><td class="type">unknown</td><td class="desc"></td></tr>
|
|
12791
|
+
</tbody>
|
|
12792
|
+
</table>
|
|
12793
|
+
</div>
|
|
12794
|
+
<h3 id="type-LatticeLayoutElement">LatticeLayoutElement</h3>
|
|
12795
|
+
<p class="section-note">`<lattice-layout>`.</p>
|
|
12796
|
+
<div class="table-wrap">
|
|
12797
|
+
<table>
|
|
12798
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
12799
|
+
<tbody>
|
|
12800
|
+
<tr><td class="name">windows</td><td class="type">unknown[]</td><td class="desc"></td></tr>
|
|
12801
|
+
<tr><td class="name">columns</td><td class="type">number | undefined</td><td class="desc"></td></tr>
|
|
12802
|
+
<tr><td class="name">rows</td><td class="type">number | undefined</td><td class="desc"></td></tr>
|
|
12803
|
+
<tr><td class="name">compact</td><td class="type">string | undefined</td><td class="desc"></td></tr>
|
|
12804
|
+
</tbody>
|
|
12805
|
+
</table>
|
|
12806
|
+
</div>
|
|
12807
|
+
<h3 id="type-LatticeRouterElement">LatticeRouterElement</h3>
|
|
12808
|
+
<p class="section-note">`<lattice-router>`. Owns a Data Router for the life of the element, built by the first `<lattice-grid route="…">` beneath it.</p>
|
|
12809
|
+
<div class="table-wrap">
|
|
12810
|
+
<table>
|
|
12811
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
12812
|
+
<tbody>
|
|
12813
|
+
<tr><td class="name">router</td><td class="type">unknown</td><td class="desc">The live router, or null until something routes. <small>(read-only)</small></td></tr>
|
|
12814
|
+
<tr><td class="name">instance</td><td class="type">unknown</td><td class="desc">The live router, under the name every viewer element uses. <small>(read-only)</small></td></tr>
|
|
12815
|
+
<tr><td class="name">config</td><td class="type">Record<string, unknown></td><td class="desc">The router configuration; read once, when the router is built.</td></tr>
|
|
12816
|
+
</tbody>
|
|
12817
|
+
</table>
|
|
12818
|
+
</div>
|
|
12819
|
+
<h3 id="type-LatticeTabsElement">LatticeTabsElement</h3>
|
|
12820
|
+
<p class="section-note">`<lattice-tabs>`. A tab's content is a `<template data-tab="‹id›">` child, cloned into the panel the module creates for it; a tab with no template is left to the module.</p>
|
|
12821
|
+
<div class="table-wrap">
|
|
12822
|
+
<table>
|
|
12823
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
12824
|
+
<tbody>
|
|
12825
|
+
<tr><td class="name">tabs</td><td class="type">unknown[]</td><td class="desc"></td></tr>
|
|
12826
|
+
</tbody>
|
|
12827
|
+
</table>
|
|
12828
|
+
</div>
|
|
12183
12829
|
<h3 id="type-LatticeTabSpec">LatticeTabSpec</h3>
|
|
12184
12830
|
<p class="section-note">One tab of a `<LatticeTabs>`; `content` makes it React's rather than the module's.</p>
|
|
12185
12831
|
<div class="table-wrap">
|
|
@@ -12208,6 +12854,19 @@ return `next ${p.mean.toFixed(1)}; r2 ${f.r2.toFixed(1)}; band ${p.upper - p.low
|
|
|
12208
12854
|
</tbody>
|
|
12209
12855
|
</table>
|
|
12210
12856
|
</div>
|
|
12857
|
+
<h3 id="type-LatticeViewerElement">LatticeViewerElement</h3>
|
|
12858
|
+
<p class="section-note">What every viewer element carries.</p>
|
|
12859
|
+
<div class="table-wrap">
|
|
12860
|
+
<table>
|
|
12861
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
12862
|
+
<tbody>
|
|
12863
|
+
<tr><td class="name">instance</td><td class="type">Instance | null</td><td class="desc">The live viewer, or null before it is built. Every configuration key below is also a property, and an attribute of the same name is the same key. A key none of these interfaces declares works as a property too — the element adopts it — but is written through `config` where the declarations are the contract. <small>(read-only)</small></td></tr>
|
|
12864
|
+
<tr><td class="name">grid</td><td class="type">unknown</td><td class="desc">The grid this viewer is built against, when it is given one directly.</td></tr>
|
|
12865
|
+
<tr><td class="name">gridName</td><td class="type">string | undefined</td><td class="desc">Which published grid to bind to; the `grid-name` attribute in markup.</td></tr>
|
|
12866
|
+
<tr><td class="name">config</td><td class="type">Record<string, unknown></td><td class="desc">Any configuration without a property of its own; merged, not replaced.</td></tr>
|
|
12867
|
+
</tbody>
|
|
12868
|
+
</table>
|
|
12869
|
+
</div>
|
|
12211
12870
|
<h3 id="type-LatticeViewerHandle">LatticeViewerHandle</h3>
|
|
12212
12871
|
<p class="section-note">The live instance a viewer component's ref exposes; `null` before mount.</p>
|
|
12213
12872
|
<div class="table-wrap">
|
|
@@ -12218,6 +12877,61 @@ return `next ${p.mean.toFixed(1)}; r2 ${f.r2.toFixed(1)}; band ${p.upper - p.low
|
|
|
12218
12877
|
</tbody>
|
|
12219
12878
|
</table>
|
|
12220
12879
|
</div>
|
|
12880
|
+
<h3 id="type-LatticeVueGridExposed">LatticeVueGridExposed</h3>
|
|
12881
|
+
<p class="section-note">What a `<LatticeGrid>` template ref exposes; `grid()` is null before mount.</p>
|
|
12882
|
+
<div class="table-wrap">
|
|
12883
|
+
<table>
|
|
12884
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
12885
|
+
<tbody>
|
|
12886
|
+
<tr><td class="name">grid</td><td class="type">(): Grid | null</td><td class="desc"></td></tr>
|
|
12887
|
+
</tbody>
|
|
12888
|
+
</table>
|
|
12889
|
+
</div>
|
|
12890
|
+
<h3 id="type-LatticeVueGridRegistry">LatticeVueGridRegistry</h3>
|
|
12891
|
+
<p class="section-note">Where grids publish themselves so the viewers around them can find one.</p>
|
|
12892
|
+
<div class="table-wrap">
|
|
12893
|
+
<table>
|
|
12894
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
12895
|
+
<tbody>
|
|
12896
|
+
<tr><td class="name">grids</td><td class="type">{ value: Readonly<Record<string, Grid>> }</td><td class="desc">A shallow ref of name → grid; replaced, never mutated, on each change.</td></tr>
|
|
12897
|
+
<tr><td class="name">publish</td><td class="type">(name: string, grid: Grid | null): void</td><td class="desc">Publish a grid under a name, or withdraw it with `null`.</td></tr>
|
|
12898
|
+
</tbody>
|
|
12899
|
+
</table>
|
|
12900
|
+
</div>
|
|
12901
|
+
<h3 id="type-LatticeVueRouterHandle">LatticeVueRouterHandle</h3>
|
|
12902
|
+
<p class="section-note">The Data Router handle a `provideLatticeRouter` puts in scope.</p>
|
|
12903
|
+
<div class="table-wrap">
|
|
12904
|
+
<table>
|
|
12905
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
12906
|
+
<tbody>
|
|
12907
|
+
<tr><td class="name">router</td><td class="type">unknown</td><td class="desc">The live router, built the first time anything asks for it. <small>(read-only)</small></td></tr>
|
|
12908
|
+
<tr><td class="name">attach</td><td class="type">(grid: Grid, route: unknown, opts?: Record<string, unknown>): void</td><td class="desc">Attach a grid to a route.</td></tr>
|
|
12909
|
+
<tr><td class="name">detach</td><td class="type">(grid: Grid): void</td><td class="desc">Detach a grid, before it is destroyed.</td></tr>
|
|
12910
|
+
<tr><td class="name">destroy</td><td class="type">(): void</td><td class="desc">Destroy the router; called for you when the providing scope is disposed.</td></tr>
|
|
12911
|
+
</tbody>
|
|
12912
|
+
</table>
|
|
12913
|
+
</div>
|
|
12914
|
+
<h3 id="type-LatticeVueTabSpec">LatticeVueTabSpec</h3>
|
|
12915
|
+
<p class="section-note">One tab of a `<LatticeTabs>`; a slot named for its `id` makes it Vue's.</p>
|
|
12916
|
+
<div class="table-wrap">
|
|
12917
|
+
<table>
|
|
12918
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
12919
|
+
<tbody>
|
|
12920
|
+
<tr><td class="name">id</td><td class="type">string</td><td class="desc"></td></tr>
|
|
12921
|
+
<tr><td class="name">label</td><td class="type">string</td><td class="desc"><small>(optional)</small></td></tr>
|
|
12922
|
+
</tbody>
|
|
12923
|
+
</table>
|
|
12924
|
+
</div>
|
|
12925
|
+
<h3 id="type-LatticeVueViewerExposed">LatticeVueViewerExposed</h3>
|
|
12926
|
+
<p class="section-note">What a viewer's template ref exposes; `instance()` is null before mount.</p>
|
|
12927
|
+
<div class="table-wrap">
|
|
12928
|
+
<table>
|
|
12929
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
12930
|
+
<tbody>
|
|
12931
|
+
<tr><td class="name">instance</td><td class="type">(): Instance | null</td><td class="desc"></td></tr>
|
|
12932
|
+
</tbody>
|
|
12933
|
+
</table>
|
|
12934
|
+
</div>
|
|
12221
12935
|
<h3 id="type-Layout">Layout</h3>
|
|
12222
12936
|
<p class="section-note">A reconfigurable dashboard: a cell grid inside an element, and a set of windows on it that a user can move, resize and close by pointer or by keyboard (BACKLOG-0001108). The module is **payload-agnostic**: a window body is a container with an id, which this module creates and sizes and never reads. It tells a payload it was resized by emitting `window:resized`; it never calls into one, because it cannot know what one is.</p>
|
|
12223
12937
|
<div class="table-wrap">
|
|
@@ -14187,7 +14901,7 @@ return `next ${p.mean.toFixed(1)}; r2 ${f.r2.toFixed(1)}; band ${p.upper - p.low
|
|
|
14187
14901
|
<!-- END GENERATED TYPE REFERENCE -->
|
|
14188
14902
|
|
|
14189
14903
|
<footer>
|
|
14190
|
-
Lattice Grid 1.
|
|
14904
|
+
Lattice Grid 1.67.0 · Copyright © 2026 TOCLOCO Inc. All rights reserved.
|
|
14191
14905
|
This document describes the behaviour of the shipped library. Where this guide and the code
|
|
14192
14906
|
disagree, the code wins: please <a href="https://www.latticegrid.dev">tell us</a>.
|
|
14193
14907
|
</footer>
|