@toclocoinc/lattice-grid 1.64.0 → 1.65.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 +3 -2
- package/docs/API.html +127 -5
- package/docs/api-detail.html +39 -4
- package/lattice-grid.d.ts +241 -205
- package/lattice-grid.esm.min.js +5 -5
- package/lattice-grid.min.cjs +5 -5
- package/lattice-grid.min.js +5 -5
- package/modules/ai.d.ts +10 -13
- 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 +2 -2
- package/modules/angular.esm.min.js +433 -7
- package/modules/angular.min.cjs +433 -7
- package/modules/angular.min.js +433 -7
- package/modules/chart-alluvial.d.ts +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +4 -5
- package/modules/charts.esm.min.js +3 -3
- package/modules/charts.min.cjs +3 -3
- package/modules/charts.min.js +3 -3
- package/modules/data-router.d.ts +5 -6
- package/modules/data-router.esm.min.js +3 -3
- package/modules/data-router.min.cjs +3 -3
- package/modules/data-router.min.js +3 -3
- 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 +37 -43
- package/modules/gantt.esm.min.js +3 -3
- package/modules/gantt.min.cjs +3 -3
- package/modules/gantt.min.js +3 -3
- package/modules/geo-europe-nuts.d.ts +2 -2
- package/modules/geo-europe-nuts.esm.min.js +1 -1
- package/modules/geo-uk.d.ts +2 -2
- package/modules/geo-uk.esm.min.js +1 -1
- package/modules/geo-us-states.d.ts +2 -2
- package/modules/geo-us-states.esm.min.js +1 -1
- package/modules/geo-world-110m.d.ts +2 -2
- package/modules/geo-world-110m.esm.min.js +1 -1
- package/modules/geo-world-50m.d.ts +2 -2
- package/modules/geo-world-50m.esm.min.js +1 -1
- package/modules/htmx.d.ts +2 -2
- package/modules/htmx.esm.min.js +5 -5
- package/modules/htmx.min.cjs +5 -5
- package/modules/htmx.min.js +5 -5
- package/modules/kanban.d.ts +14 -14
- package/modules/kanban.esm.min.js +3 -3
- package/modules/kanban.min.cjs +3 -3
- package/modules/kanban.min.js +3 -3
- package/modules/kpi.d.ts +5 -5
- package/modules/kpi.esm.min.js +3 -3
- package/modules/kpi.min.cjs +3 -3
- package/modules/kpi.min.js +3 -3
- package/modules/layout.d.ts +2 -2
- 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 +4 -5
- 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 +2 -3
- package/modules/svelte.esm.min.js +1 -1
- package/modules/svelte.min.cjs +1 -1
- package/modules/svelte.min.js +1 -1
- package/modules/tabs.d.ts +2 -3
- 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 +1 -1
- package/modules/vue.esm.min.js +1 -1
- package/modules/vue.min.cjs +1 -1
- package/modules/vue.min.js +1 -1
- package/modules/webcomponent.d.ts +2 -2
- package/modules/webcomponent.esm.min.js +5 -5
- package/modules/webcomponent.min.cjs +5 -5
- package/modules/webcomponent.min.js +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
**A high-performance data grid for the browser.** Vanilla JavaScript, no runtime
|
|
4
4
|
dependencies, no build step required. Optional adapters for React, Vue, Svelte
|
|
5
|
-
and Web Components ship alongside it
|
|
5
|
+
and Web Components ship alongside it, and Angular has a compiled package of its
|
|
6
|
+
own, `@toclocoinc/lattice-grid-angular`.
|
|
6
7
|
|
|
7
|
-
Version 1.
|
|
8
|
+
Version 1.65.0 · [latticegrid.dev](https://www.latticegrid.dev) · TOCLOCO Inc
|
|
8
9
|
|
|
9
10
|
---
|
|
10
11
|
|
package/docs/API.html
CHANGED
|
@@ -360,7 +360,7 @@
|
|
|
360
360
|
<div class="shell">
|
|
361
361
|
<aside class="rail">
|
|
362
362
|
<p class="rail__brand">Lattice Grid</p>
|
|
363
|
-
<p class="rail__sub">API reference · v1.
|
|
363
|
+
<p class="rail__sub">API reference · v1.65.0</p>
|
|
364
364
|
<nav>
|
|
365
365
|
<div class="rail__group">
|
|
366
366
|
<span class="rail__label">Start</span>
|
|
@@ -413,6 +413,12 @@
|
|
|
413
413
|
<a href="#sources">Sources</a>
|
|
414
414
|
<a href="#events">Event reference</a>
|
|
415
415
|
</div>
|
|
416
|
+
<div class="rail__group">
|
|
417
|
+
<span class="rail__label">Frameworks</span>
|
|
418
|
+
<a href="#adapters">Framework adapters</a>
|
|
419
|
+
<a href="#react-v2">React</a>
|
|
420
|
+
<a href="#angular-v2">Angular</a>
|
|
421
|
+
</div>
|
|
416
422
|
<div class="rail__group">
|
|
417
423
|
<span class="rail__label">Registries</span>
|
|
418
424
|
<a href="#names">Built-in names</a>
|
|
@@ -444,7 +450,7 @@
|
|
|
444
450
|
</header>
|
|
445
451
|
|
|
446
452
|
<p class="chips">
|
|
447
|
-
<span class="chip">Version 1.
|
|
453
|
+
<span class="chip">Version 1.65.0</span>
|
|
448
454
|
<span class="chip">Zero dependencies</span>
|
|
449
455
|
<span class="chip"><a href="api-detail.html">Developer guide →</a></span>
|
|
450
456
|
</p>
|
|
@@ -520,6 +526,7 @@
|
|
|
520
526
|
<thead><tr><th>Entry point</th><th>Factory</th><th>Needs</th></tr></thead>
|
|
521
527
|
<tbody>
|
|
522
528
|
<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-angular</td><td class="sig"><lattice-grid [config]="…"></td><td class="desc">A package of its own, not a bundle: standalone components compiled ahead of time, one per viewer, plus the data router as a service. See <a href="#angular-v2">Angular</a>. <code>modules/angular</code>, which needs the JIT compiler, is deprecated.</td></tr>
|
|
523
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>
|
|
524
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>
|
|
525
532
|
</tbody>
|
|
@@ -706,6 +713,120 @@ controller.destroy();
|
|
|
706
713
|
a line that could never run. The build now deletes that branch from every emitted artefact.
|
|
707
714
|
</p>
|
|
708
715
|
|
|
716
|
+
<h3 id="angular-v2">Angular: a compiled package, <code>@toclocoinc/lattice-grid-angular</code></h3>
|
|
717
|
+
<p>
|
|
718
|
+
Angular's components are not objects a library can assemble at run time in a production
|
|
719
|
+
build. <code>modules/angular</code> did assemble them that way, which needs Angular's JIT
|
|
720
|
+
compiler in the page — present on a development server, absent from every AOT build.
|
|
721
|
+
So Angular gets a package of its own: TypeScript components compiled by
|
|
722
|
+
<code>@angular/compiler-cli</code> into a partial-Ivy library, which your build's Angular
|
|
723
|
+
Linker turns into definitions exactly as it does for any other Angular library you install.
|
|
724
|
+
<strong>No compiler in your bundle, and one standalone component per viewer.</strong>
|
|
725
|
+
</p>
|
|
726
|
+
<pre><code>npm install @toclocoinc/lattice-grid @toclocoinc/lattice-grid-angular</code></pre>
|
|
727
|
+
<pre><code><span class="kw">import</span> { bootstrapApplication } <span class="kw">from</span> '@angular/platform-browser';
|
|
728
|
+
<span class="kw">import</span> { createGrid } <span class="kw">from</span> '@toclocoinc/lattice-grid';
|
|
729
|
+
<span class="kw">import</span> { createKPI } <span class="kw">from</span> '@toclocoinc/lattice-grid/modules/kpi';
|
|
730
|
+
<span class="kw">import</span> { createChart } <span class="kw">from</span> '@toclocoinc/lattice-grid/modules/charts';
|
|
731
|
+
<span class="kw">import</span> {
|
|
732
|
+
LatticeGridComponent, LatticeKpiComponent, LatticeChartComponent, provideLattice,
|
|
733
|
+
} <span class="kw">from</span> '@toclocoinc/lattice-grid-angular';
|
|
734
|
+
|
|
735
|
+
@Component({
|
|
736
|
+
selector: 'app-dashboard',
|
|
737
|
+
imports: [LatticeGridComponent, LatticeKpiComponent, LatticeChartComponent],
|
|
738
|
+
template: `
|
|
739
|
+
<lattice-grid #grid name="quakes" [config]="config" [quickFilter]="search()"
|
|
740
|
+
(cell-changed)="save($event)" />
|
|
741
|
+
<lattice-kpi gridName="quakes" [config]="{ tiles }" />
|
|
742
|
+
<lattice-chart gridName="quakes" [config]="{ type: 'bar', x: 'region', y: 'count' }" />
|
|
743
|
+
`,
|
|
744
|
+
})
|
|
745
|
+
<span class="kw">export class</span> Dashboard {
|
|
746
|
+
<span class="cmt">// The live grid, the same object createGrid returns.</span>
|
|
747
|
+
grid = viewChild<LatticeGridComponent>('grid');
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
<span class="cmt">// Each factory is injected, not imported by the library: an application that</span>
|
|
751
|
+
<span class="cmt">// shows a grid downloads the grid, and never the board or the eighteen charts.</span>
|
|
752
|
+
bootstrapApplication(Dashboard, {
|
|
753
|
+
providers: [provideLattice({ createGrid, createKPI, createChart })],
|
|
754
|
+
});</code></pre>
|
|
755
|
+
|
|
756
|
+
<div class="table-wrap">
|
|
757
|
+
<table>
|
|
758
|
+
<thead><tr><th>Export</th><th>Element</th><th>What it is</th></tr></thead>
|
|
759
|
+
<tbody>
|
|
760
|
+
<tr><td class="name">LatticeGridComponent</td><td class="sig"><lattice-grid></td><td class="desc">The grid. <code>[config]</code> is every configuration key; <code>[sort]</code>, <code>[filters]</code>, <code>[quickFilter]</code> and <code>[selectedKeys]</code> are applied through the matching API; <code>[rowUpdates]</code> and <code>[predicates]</code> drive a live feed. Every grid event is an output under its kebab-case name, and <code>(grid-ready)</code> hands you the instance. Give the element a height.</td></tr>
|
|
761
|
+
<tr><td class="name">LatticeGridDirective</td><td class="sig">[latticeGrid]</td><td class="desc">The same component on an element your template already owns: <code><div [latticeGrid]="config" class="tall"></div></code>. Same inputs, outputs and <code>grid</code> reference.</td></tr>
|
|
762
|
+
<tr><td class="name">LatticeKpiComponent</td><td class="sig"><lattice-kpi></td><td class="desc">The KPI panel. Grid-bound by default — <code>[gridName]</code> picks which published grid — or give it <code>[rows]</code> for a panel with no grid.</td></tr>
|
|
763
|
+
<tr><td class="name">LatticeChartComponent</td><td class="sig"><lattice-chart></td><td class="desc">A chart. Requires a grid, so nothing is built until one exists; a changed spec key goes to <code>chart.update()</code> and the chart redraws rather than being rebuilt. <code>(click)</code>, <code>(hover)</code> and <code>(leave)</code> on this element are the chart's events, carrying the datum under the pointer.</td></tr>
|
|
764
|
+
<tr><td class="name">LatticeKanbanComponent</td><td class="sig"><lattice-kanban></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 inputs.</td></tr>
|
|
765
|
+
<tr><td class="name">LatticeGanttComponent</td><td class="sig"><lattice-gantt></td><td class="desc">The plan. <code>[tasks]</code> and <code>[dependencies]</code> are live inputs. It takes an explicit <code>[grid]</code> but never adopts a published one.</td></tr>
|
|
766
|
+
<tr><td class="name">LatticeLayoutComponent</td><td class="sig"><lattice-layout></td><td class="desc">The dashboard layout. Windows are driven through the instance; its events arrive as <code>(layout-changed)</code>, <code>(window-moved)</code> and the rest.</td></tr>
|
|
767
|
+
<tr><td class="name">LatticeTabsComponent<br>LatticeTabDirective</td><td class="sig"><lattice-tabs><br>ng-template[latticeTab]</td><td class="desc">The tab strip, with <strong>Angular-rendered tab content</strong>: a tab's content is an <code><ng-template latticeTab="id"></code> in your own template, rendered into the strip's panel through this component's <code>ViewContainerRef</code> — so a tab's grid is a real <code><lattice-grid></code> with inputs, a reference and your injectors above it. A tab with no template is left to the module, so configuration-driven grid tabs still work and the two kinds mix on one strip.</td></tr>
|
|
768
|
+
<tr><td class="name">LatticeGridRegistry</td><td class="sig">inject(LatticeGridRegistry)</td><td class="desc">Where <code><lattice-grid name="…"></code> publishes itself and grid-bound viewers find it, as a signal per name — a panel declared before its grid exists mounts itself the moment the grid arrives. <code>providedIn: 'root'</code>; put it in a component's own <code>providers</code> to scope a registry to that subtree.</td></tr>
|
|
769
|
+
<tr><td class="name">provideLattice</td><td class="sig">provideLattice({ …factories })</td><td class="desc">The factories the components build through. Give it the ones your application uses; a component whose factory is missing names the import and the provider call that fixes it.</td></tr>
|
|
770
|
+
<tr><td class="name">provideLatticeRouter<br>LatticeRouter</td><td class="sig">providers: [provideLatticeRouter(cfg)]</td><td class="desc">The data router as a service. Put it in a component's <code>providers</code> and it is created when the first <code><lattice-grid route="…"></code> under it attaches, and destroyed with that component — its configuration read once, because rebuilding would drop every attached grid and every row it holds. Each grid detaches before it is destroyed, so the router never holds a dead grid.</td></tr>
|
|
771
|
+
</tbody>
|
|
772
|
+
</table>
|
|
773
|
+
</div>
|
|
774
|
+
|
|
775
|
+
<p class="section-note">
|
|
776
|
+
<strong>Change detection: zone or zoneless, unconfigured.</strong> The grid is created inside
|
|
777
|
+
<code>NgZone.runOutsideAngular</code>, because it installs its own scroll, wheel and pointer
|
|
778
|
+
listeners and running change detection on every scroll frame of a million-row grid is the
|
|
779
|
+
difference between smooth and unusable. An event that reaches an output you have
|
|
780
|
+
<em>bound</em> re-enters the zone, so <code>(cell-changed)="count = count + 1"</code> repaints
|
|
781
|
+
exactly as you expect; an output nobody bound costs nothing. Under zoneless change detection
|
|
782
|
+
that machinery is Angular's own no-op and a signal you set in a handler repaints the view.
|
|
783
|
+
The one thing to know when reading the grid's DOM from Angular: <strong>the grid paints on its
|
|
784
|
+
own schedule, not Angular's</strong>, so measure a cell in a grid event, not in
|
|
785
|
+
<code>ngAfterViewInit</code>.
|
|
786
|
+
</p>
|
|
787
|
+
<p class="section-note">
|
|
788
|
+
<strong><code>OnPush</code> is safe everywhere.</strong> None of these components asks its
|
|
789
|
+
parent to re-render: each owns one element, builds one instance in
|
|
790
|
+
<code>afterNextRender</code> and pushes changed inputs into it from <code>ngOnChanges</code>.
|
|
791
|
+
A host on <code>OnPush</code> that never re-renders still gets a fully live grid, because the
|
|
792
|
+
grid is not rendered by Angular.
|
|
793
|
+
</p>
|
|
794
|
+
<p class="section-note">
|
|
795
|
+
<strong>Inputs are diffed by identity, and never rebuild the instance.</strong> A changed
|
|
796
|
+
input reaches the viewer that is already on screen — scroll position, selection,
|
|
797
|
+
expansion and any open editor intact. Two things rebuild rather than update: the grid a
|
|
798
|
+
viewer is bound to, and an input it cannot exist without. An input a viewer has no live
|
|
799
|
+
setter for is named once in a warning rather than silently dropped. And because the
|
|
800
|
+
comparison is <code>Object.is</code>, an inline <code>[config]="{ rows: rows }"</code> is a
|
|
801
|
+
new object on every pass: hold it in a field or a signal.
|
|
802
|
+
</p>
|
|
803
|
+
<p class="section-note">
|
|
804
|
+
<strong>Cleanup is the component's.</strong> <code>ngOnDestroy</code> detaches from the
|
|
805
|
+
router, withdraws the grid from the registry and destroys the instance — in that order.
|
|
806
|
+
An <code>@if</code> that closes and opens again leaves exactly one instance alive, and
|
|
807
|
+
destroying the application leaves no instance, interval or listener behind. That is asserted
|
|
808
|
+
with counters in a real browser, against the linked package, in
|
|
809
|
+
<code>test/angular-package-browser.test.js</code>.
|
|
810
|
+
</p>
|
|
811
|
+
<p class="section-note">
|
|
812
|
+
<strong>Angular 17 and up, browser only.</strong> The library is compiled partially, so your
|
|
813
|
+
own Angular version compiles it: its declarations need a linker no newer than 14, and its peer
|
|
814
|
+
range is <code>>=17</code>. Nothing is created on the server —
|
|
815
|
+
<code>isPlatformBrowser</code> guards every build and <code>afterNextRender</code> does not
|
|
816
|
+
run there — so a server-rendered page emits the empty host element and the grid is built
|
|
817
|
+
on hydration. Angular Universal is not otherwise supported.
|
|
818
|
+
</p>
|
|
819
|
+
<p class="section-note">
|
|
820
|
+
<strong><code>modules/angular</code> is deprecated.</strong> The old bundle still works where
|
|
821
|
+
it always worked — a page with <code>@angular/compiler</code> loaded — and it now
|
|
822
|
+
says so once, and fails with a <code>[lattice]</code> message naming this package when it
|
|
823
|
+
finds a real Angular with no JIT compiler, instead of leaving you with Angular's own. In
|
|
824
|
+
1.65 it also gained the fix that <code><div [latticeGrid]="config"></code> binds the
|
|
825
|
+
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-angular</code>,
|
|
827
|
+
which covers every viewer rather than the grid alone.
|
|
828
|
+
</p>
|
|
829
|
+
|
|
709
830
|
<div class="note">
|
|
710
831
|
<p><strong>Published as <code>@toclocoinc/lattice-grid</code></strong>: <code>npm install
|
|
711
832
|
@toclocoinc/lattice-grid</code>, then <code>import { createLatticeGrid } from
|
|
@@ -1393,7 +1514,7 @@ grid.destroy();
|
|
|
1393
1514
|
<table>
|
|
1394
1515
|
<thead><tr><th>Member</th><th>Returns</th><th>Description</th></tr></thead>
|
|
1395
1516
|
<tbody>
|
|
1396
|
-
<tr><td class="sig">getVersion()</td><td class="type">string</td><td class="desc">The version this grid came from, e.g. <code>'1.
|
|
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.65.0'</code>. Also on the module as <code>getVersion()</code>, for when you have no grid to hand.</td></tr>
|
|
1397
1518
|
<tr><td class="sig">get(key)</td><td class="type">unknown</td><td class="desc">Read any configuration key.</td></tr>
|
|
1398
1519
|
<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>
|
|
1399
1520
|
<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>
|
|
@@ -11083,6 +11204,7 @@ return `next ${p.mean.toFixed(1)}; r2 ${f.r2.toFixed(1)}; band ${p.upper - p.low
|
|
|
11083
11204
|
<tr><td class="name">pipes</td><td class="type">Record<string, (value: unknown, ...args: string[]) => string></td><td class="desc">Named text transforms usable from a format mask or a template. <small>(optional)</small></td></tr>
|
|
11084
11205
|
<tr><td class="name">totalFns</td><td class="type">Record<string, TotalFn></td><td class="desc">Your own reductions, alongside the built-in ones. <small>(optional)</small></td></tr>
|
|
11085
11206
|
<tr><td class="name">variants</td><td class="type">Record<string, VariantDefinition></td><td class="desc">Named appearance variants a row or cell can be switched into by a rule. <small>(optional)</small></td></tr>
|
|
11207
|
+
<tr><td class="name">icons</td><td class="type">Record<string, IconDefinition></td><td class="desc">Your own SVG glyphs, registered by name before the first paint. The same registry `registerIcon` writes to and every cell, header control, rail button and chart glyph is painted from, so a name given here is usable anywhere a glyph name is: a column's `icon` decoration, a rail action's `icon`, a network node's `icon`. Registering a built-in name overrides it. Read the result back through {@link Grid.icons}. <small>(optional)</small></td></tr>
|
|
11086
11208
|
<tr><td class="name">tree</td><td class="type">TreeConfig</td><td class="desc">Hierarchical rows: where the parent link or the path lives. <small>(optional)</small></td></tr>
|
|
11087
11209
|
<tr><td class="name">detail</td><td class="type">DetailConfig</td><td class="desc">The expandable panel beneath a row. <small>(optional)</small></td></tr>
|
|
11088
11210
|
<tr><td class="name">selection</td><td class="type">SelectionConfig | 'single' | 'multiple' | 'none'</td><td class="desc">What the user may select, and how selection behaves across groups. The `'none'` shorthand is `{ mode: 'none' }` and behaves identically: no row selection, and no cell ranges or fill handle either. <small>(optional)</small></td></tr>
|
|
@@ -11162,7 +11284,7 @@ return `next ${p.mean.toFixed(1)}; r2 ${f.r2.toFixed(1)}; band ${p.upper - p.low
|
|
|
11162
11284
|
<tr><td class="name">rowClass</td><td class="type">string | string[] | ((p: RowStyleParams) => string | string[])</td><td class="desc">A class, or classes, for every row. Re-evaluated on each repaint. <small>(optional)</small></td></tr>
|
|
11163
11285
|
<tr><td class="name">rowStyle</td><td class="type">CellStyle | ((p: RowStyleParams) => CellStyle)</td><td class="desc">Inline styles for every row. Camel-case or hyphenated property names. <small>(optional)</small></td></tr>
|
|
11164
11286
|
<tr><td class="name">toolPanel</td><td class="type">boolean | {</td><td class="desc"><small>(optional)</small></td></tr>
|
|
11165
|
-
<tr><td class="name">groupPanel</td><td class="type">boolean | {</td><td class="desc">A drag-and-drop group-by strip above the column header — the pattern AG Grid calls the row-group panel. Drag a column heading into it to group by that column; the active groups show as removable, reorderable chips, and reordering the chips changes the nesting order. It is keyboard-operable (arrows navigate, Shift+arrow reorders, Delete ungroups, and an add control groups any column), and every change is announced through the live region, which is why it also addresses the drag-only complaint
|
|
11287
|
+
<tr><td class="name">groupPanel</td><td class="type">boolean | {</td><td class="desc">A drag-and-drop group-by strip above the column header — the pattern AG Grid calls the row-group panel. Drag a column heading into it to group by that column; the active groups show as removable, reorderable chips, and reordering the chips changes the nesting order. It is keyboard-operable (arrows navigate, Shift+arrow reorders, Delete ungroups, and an add control groups any column), and every change is announced through the live region, which is why it also addresses the drag-only complaint (BACKLOG-0000429). Off by default and non-breaking, matching `toolPanel`. It drives the same grouping model as `grid.columns.group()`; it reimplements nothing. <small>(optional)</small></td></tr>
|
|
11166
11288
|
<tr><td class="name">kpis</td><td class="type">Array<Omit<StatConfig, 'grid' | 'container'>></td><td class="desc">A built-in KPI/stat strip: a labelled band of {@link createStat} tiles the grid places for you, above the column header. Each entry is a stat spec — the same fields {@link StatConfig} takes, minus `grid` and `container`, which the grid supplies — so a strip tile and a hand-placed one are the same object. The tiles follow the grid's filters, recomputing on every change exactly as a stand-alone stat does. Off by default and non-breaking, matching `groupPanel`: no `kpis` means no band and no cost. It reuses `createStat` and reimplements no compute. <small>(optional)</small></td></tr>
|
|
11167
11289
|
<tr><td class="name">quickFilterText</td><td class="type">string</td><td class="desc">The quick filter's initial text. <small>(optional)</small></td></tr>
|
|
11168
11290
|
<tr><td class="name">permissions</td><td class="type">PermissionPolicy</td><td class="desc">Per-column read/write/hidden policy. A usability control, not a security boundary: hidden data is still resident in the store. Enforce the same policy server-side with `permittedColumns` / `permittedExport`. <small>(optional)</small></td></tr>
|
|
@@ -14065,7 +14187,7 @@ return `next ${p.mean.toFixed(1)}; r2 ${f.r2.toFixed(1)}; band ${p.upper - p.low
|
|
|
14065
14187
|
<!-- END GENERATED TYPE REFERENCE -->
|
|
14066
14188
|
|
|
14067
14189
|
<footer>
|
|
14068
|
-
Lattice Grid 1.
|
|
14190
|
+
Lattice Grid 1.65.0 · Copyright © 2026 TOCLOCO Inc. All rights reserved.
|
|
14069
14191
|
This document describes the behaviour of the shipped library. Where this guide and the code
|
|
14070
14192
|
disagree, the code wins: please <a href="https://www.latticegrid.dev">tell us</a>.
|
|
14071
14193
|
</footer>
|
package/docs/api-detail.html
CHANGED
|
@@ -437,7 +437,7 @@
|
|
|
437
437
|
<div class="shell">
|
|
438
438
|
<aside class="rail">
|
|
439
439
|
<p class="rail__brand">Lattice Grid</p>
|
|
440
|
-
<p class="rail__sub">Developer guide · v1.
|
|
440
|
+
<p class="rail__sub">Developer guide · v1.65.0</p>
|
|
441
441
|
<nav>
|
|
442
442
|
<div class="rail__group">
|
|
443
443
|
<span class="rail__label">Start here</span>
|
|
@@ -554,7 +554,7 @@
|
|
|
554
554
|
<a href="API.html">reference tables</a> are the shorter version for when you already know.
|
|
555
555
|
</p>
|
|
556
556
|
<p class="chips">
|
|
557
|
-
<span class="chip">Version 1.
|
|
557
|
+
<span class="chip">Version 1.65.0</span>
|
|
558
558
|
<span class="chip">Zero dependencies</span>
|
|
559
559
|
<span class="chip">No build step</span>
|
|
560
560
|
</p>
|
|
@@ -1369,7 +1369,7 @@ off(); <span class="cmt">// every subscrip
|
|
|
1369
1369
|
</p>
|
|
1370
1370
|
<div class="example">
|
|
1371
1371
|
<p class="example__label">Which version am I running?</p>
|
|
1372
|
-
<pre><code>grid.getVersion(); <span class="cmt">// '1.
|
|
1372
|
+
<pre><code>grid.getVersion(); <span class="cmt">// '1.65.0'</span>
|
|
1373
1373
|
LatticeGrid.getVersion(); <span class="cmt">// the same, when you have no grid to hand</span></code></pre>
|
|
1374
1374
|
</div>
|
|
1375
1375
|
<p class="lead-in">
|
|
@@ -7971,6 +7971,41 @@ createChart({
|
|
|
7971
7971
|
forty rows behind a bar is not what a click on a bar means.</p>
|
|
7972
7972
|
</div>
|
|
7973
7973
|
|
|
7974
|
+
<p class="lead-in">
|
|
7975
|
+
The glyphs those nodes draw are yours to supply. <code>icons</code> on the grid configuration
|
|
7976
|
+
registers SVG sprites by name, before the first paint, into the same registry the built-in
|
|
7977
|
+
chevrons and sort arrows live in — so a name you register is usable anywhere a glyph
|
|
7978
|
+
name is: a column’s <code>icon</code> decoration, a rail action’s
|
|
7979
|
+
<code>icon</code>, a network node’s <code>icon</code>. Registering a built-in name
|
|
7980
|
+
overrides it, which is how the expander chevron becomes your own mark. A sprite is a view box
|
|
7981
|
+
and its path data; one filled path on the house 16×16 box is the common case, so a bare
|
|
7982
|
+
path string is read as exactly that. <code>grid.icons</code> reads the registry back.
|
|
7983
|
+
</p>
|
|
7984
|
+
<div class="example">
|
|
7985
|
+
<p class="example__label">Registering your own glyphs, executed</p>
|
|
7986
|
+
<pre data-run="js" data-expect="router 2 stroke | hub 1 fill" data-covers="config:icons"><code><span class="kw">const</span> { createTestDom } = <span class="kw">await</span> import('../packages/dom/src/renderer/testdom.js');
|
|
7987
|
+
<span class="kw">const</span> { root } = createTestDom();
|
|
7988
|
+
<span class="kw">const</span> { createGrid } = <span class="kw">await</span> import('../packages/dom/src/index.js');
|
|
7989
|
+
|
|
7990
|
+
<span class="kw">const</span> grid = createGrid(root, {
|
|
7991
|
+
rowKey: 'id',
|
|
7992
|
+
rows: [{ id: 'core-1', load: 41 }],
|
|
7993
|
+
columns: [{ field: 'id' }, { field: 'load', type: 'number' }],
|
|
7994
|
+
<span class="cmt">// Your own sprites, by name, alongside the built-in set.</span>
|
|
7995
|
+
icons: {
|
|
7996
|
+
router: { viewBox: '0 0 16 16', paths: ['M2 6h12v6H2Z', 'M5 6V3h6v3'], paint: 'stroke' },
|
|
7997
|
+
hub: 'M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2Z', <span class="cmt">// one filled path is enough</span>
|
|
7998
|
+
},
|
|
7999
|
+
});
|
|
8000
|
+
|
|
8001
|
+
<span class="cmt">// Read back what the registry holds: the normalised glyph, whichever form registered it.</span>
|
|
8002
|
+
<span class="kw">const</span> router = grid.icons.get('router');
|
|
8003
|
+
<span class="kw">const</span> hub = grid.icons.get('hub');
|
|
8004
|
+
grid.destroy();
|
|
8005
|
+
|
|
8006
|
+
<span class="kw">return</span> `router ${router.paths.length} ${router.paint} | hub ${hub.paths.length} ${hub.paint}`;</code></pre>
|
|
8007
|
+
</div>
|
|
8008
|
+
|
|
7974
8009
|
<h3 id="removed-rows">Showing what was deleted</h3>
|
|
7975
8010
|
<div class="example">
|
|
7976
8011
|
<p class="example__label">A deletion is a change too</p>
|
|
@@ -9483,7 +9518,7 @@ grid.licence.state(); <span class="cmt">// 'licensed' | 'localhost' | 'trial'<
|
|
|
9483
9518
|
|
|
9484
9519
|
<footer>
|
|
9485
9520
|
<p>
|
|
9486
|
-
Lattice Grid 1.
|
|
9521
|
+
Lattice Grid 1.65.0 · Copyright © 2026 TOCLOCO Inc. All rights reserved.
|
|
9487
9522
|
Written against the shipped source. Where this guide and the code disagree, the code wins,
|
|
9488
9523
|
please <a href="https://www.latticegrid.dev">tell us</a>.
|
|
9489
9524
|
</p>
|