@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-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.67.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.67.0</span>
|
|
558
558
|
<span class="chip">Zero dependencies</span>
|
|
559
559
|
<span class="chip">No build step</span>
|
|
560
560
|
</p>
|
|
@@ -925,6 +925,116 @@ createGrid(element, { direction: 'rtl' }); <span class="cmt">// or say so out
|
|
|
925
925
|
cannot be bound. Every event in the table below is declared in <code>emits</code>.</p>
|
|
926
926
|
</div>
|
|
927
927
|
|
|
928
|
+
<div class="example">
|
|
929
|
+
<p class="example__label">Vue 3: every viewer, not only the grid (1.66)</p>
|
|
930
|
+
<pre><code><span class="cmt">// lattice.js</span>
|
|
931
|
+
<span class="kw">import</span> * <span class="kw">as</span> vue <span class="kw">from</span> 'vue';
|
|
932
|
+
<span class="kw">import</span> { createGrid } <span class="kw">from</span> '@toclocoinc/lattice-grid';
|
|
933
|
+
<span class="kw">import</span> { createKPI } <span class="kw">from</span> '@toclocoinc/lattice-grid/modules/kpi';
|
|
934
|
+
<span class="kw">import</span> { createChart } <span class="kw">from</span> '@toclocoinc/lattice-grid/modules/charts';
|
|
935
|
+
<span class="kw">import</span> { createTabs } <span class="kw">from</span> '@toclocoinc/lattice-grid/modules/tabs';
|
|
936
|
+
<span class="kw">import</span> { createDataRouter } <span class="kw">from</span> '@toclocoinc/lattice-grid/modules/data-router';
|
|
937
|
+
<span class="kw">import</span> { createLatticeVue } <span class="kw">from</span> '@toclocoinc/lattice-grid/modules/vue';
|
|
938
|
+
|
|
939
|
+
<span class="cmt">// createLatticeVue builds whichever components the factories you pass support.</span>
|
|
940
|
+
<span class="cmt">// The individual factories are there too, if you want only one:</span>
|
|
941
|
+
<span class="cmt">// createLatticeGrid, createLatticeKPI, createLatticeChart, createLatticeKanban,</span>
|
|
942
|
+
<span class="cmt">// createLatticeGantt, createLatticeLayout, createLatticeTabs,</span>
|
|
943
|
+
<span class="cmt">// createLatticeGridContext, createLatticeRouter, createLatticeViewer.</span>
|
|
944
|
+
<span class="kw">export const</span> L = createLatticeVue({
|
|
945
|
+
vue, createGrid, createKPI, createChart, createTabs, createDataRouter,
|
|
946
|
+
});</code></pre>
|
|
947
|
+
<pre><code><span class="cmt">// Dashboard.vue</span>
|
|
948
|
+
<script setup>
|
|
949
|
+
<span class="kw">import</span> { shallowRef } <span class="kw">from</span> 'vue';
|
|
950
|
+
<span class="kw">import</span> { L } <span class="kw">from</span> './lattice.js';
|
|
951
|
+
|
|
952
|
+
L.provideLatticeGrids();
|
|
953
|
+
L.provideLatticeRouter(ROUTER_CONFIG);
|
|
954
|
+
|
|
955
|
+
<span class="kw">const</span> tab = shallowRef('all');
|
|
956
|
+
<span class="kw">const</span> updates = shallowRef(<span class="kw">null</span>);
|
|
957
|
+
</script>
|
|
958
|
+
|
|
959
|
+
<template>
|
|
960
|
+
<component :is="L.LatticeTabs" :active="tab" :tabs="TABS" @tab-changed="tab = $event.id">
|
|
961
|
+
<template #all>
|
|
962
|
+
<component :is="L.LatticeGrid" name="all" route="all" v-bind="CONFIG" :row-updates="updates" />
|
|
963
|
+
</template>
|
|
964
|
+
<template #big>
|
|
965
|
+
<component :is="L.LatticeGrid" name="big" route="significant" v-bind="CONFIG" />
|
|
966
|
+
</template>
|
|
967
|
+
</component>
|
|
968
|
+
|
|
969
|
+
<component :is="L.LatticeKPI" grid-name="all" :tiles="TILES" :columns="5" />
|
|
970
|
+
<component :is="L.LatticeChart" grid-name="all" type="bar" x="region" y="count" @click="pick" />
|
|
971
|
+
</template></code></pre>
|
|
972
|
+
</div>
|
|
973
|
+
<div class="why">
|
|
974
|
+
<p><strong>Every viewer is a component now.</strong> Before 1.66 the adapter wrapped
|
|
975
|
+
<code>createGrid</code> and nothing else, so a Vue application wrote its own
|
|
976
|
+
<code>onMounted</code>/<code>onBeforeUnmount</code> pair for the KPI panel, for each chart, for
|
|
977
|
+
the board, for the Gantt — and its own tab strip, because the tabs module builds its tabs'
|
|
978
|
+
grids itself and a grid built that way is not a component.
|
|
979
|
+
<code>createLatticeKPI</code>, <code>createLatticeChart</code>,
|
|
980
|
+
<code>createLatticeKanban</code>, <code>createLatticeGantt</code>,
|
|
981
|
+
<code>createLatticeLayout</code> and <code>createLatticeTabs</code> each return one component
|
|
982
|
+
definition; <code>createLatticeViewer</code> is the generic behind them, for anything not yet
|
|
983
|
+
named, and <code>createViewerController</code> is the framework-free lifecycle underneath.
|
|
984
|
+
Everything is built with <code>defineComponent</code> and render functions, so no template
|
|
985
|
+
compiler is needed in your build and <code>vue.runtime.*</code> is enough. The floor is Vue
|
|
986
|
+
3.3, and Vue 2 is not supported.</p>
|
|
987
|
+
<p><strong>A viewer finds its grid through <code>provide</code>, not a template ref.</strong> A
|
|
988
|
+
KPI panel and a chart are built <em>against</em> a grid instance, and that instance does not
|
|
989
|
+
exist until after the first render. Assigning to a template ref re-renders nobody, so a
|
|
990
|
+
sibling never learns the grid arrived. <code>createLatticeGridContext</code> returns
|
|
991
|
+
<code>{ LatticeGridProvider, provideLatticeGrids, useLatticeGrid }</code>: call
|
|
992
|
+
<code>provideLatticeGrids()</code> in a parent's <code>setup</code> (or wrap the subtree in
|
|
993
|
+
<code><LatticeGridProvider></code>), a grid publishes itself under its <code>name</code>,
|
|
994
|
+
a viewer takes it by <code>grid-name</code>, and the viewer is built the moment it appears. A
|
|
995
|
+
page with one grid names nothing.</p>
|
|
996
|
+
<p><strong>A tab's content is a slot.</strong> <code>createLatticeTabs</code> keeps the
|
|
997
|
+
module's tablist semantics, keyboard handling, lazy first mount and live badges, and renders
|
|
998
|
+
each tab's named slot — <code><template #all></code> for a tab with <code>id: 'all'</code>,
|
|
999
|
+
or <code><template #tab-all></code> — into the module's own panel element through a
|
|
1000
|
+
<code><Teleport></code>. So a tab's grid is a real component with props, a ref and the
|
|
1001
|
+
surrounding <code>provide</code>s. A tab with no slot is left to the module, so both kinds mix
|
|
1002
|
+
on one strip.</p>
|
|
1003
|
+
<p><strong>The router belongs to a scope.</strong> <code>createLatticeRouter</code> returns
|
|
1004
|
+
<code>provideLatticeRouter</code>, which you call in a component's <code>setup</code>. The
|
|
1005
|
+
router is built lazily by the first grid beneath it that names a <code>route</code>, and
|
|
1006
|
+
destroyed when that component's scope is disposed — so it lives exactly as long as the page
|
|
1007
|
+
that owns it. The configuration is read once: rebuilding would drop every attached grid and
|
|
1008
|
+
every row held. A grid detaches <em>before</em> it is destroyed, so the router never holds a
|
|
1009
|
+
dead grid, and <code>useLatticeRouter()</code> hands any descendant the same handle.</p>
|
|
1010
|
+
<p><strong>A live feed needs no ref.</strong> <code>row-updates</code> is a keyed diff handed
|
|
1011
|
+
to <code>grid.rows.apply()</code> whenever the object's identity changes.
|
|
1012
|
+
<code>predicates</code> maps <code>{ name: fn }</code> to
|
|
1013
|
+
<code>grid.filters.where(name, fn)</code>, which composes with whatever filter the reader set
|
|
1014
|
+
— unlike the <code>filters</code> prop, which replaces the whole tree.</p>
|
|
1015
|
+
<p><strong>What is a live prop is declared, not guessed.</strong> The grid takes any changed
|
|
1016
|
+
configuration key through one call; no other viewer does. So each viewer lists the props it
|
|
1017
|
+
can take while running (<code>VIEWER_APPLY</code>) and everything else is mount-time
|
|
1018
|
+
configuration. A mount-time prop that changes is neither ignored nor silently remounted: it is
|
|
1019
|
+
named once, with the remedy — a <code>:key</code> that changes when you want the rebuild, or
|
|
1020
|
+
the exposed instance. <code>VIEWER_EVENTS</code> and <code>viewerHandlerName</code> are the
|
|
1021
|
+
matching event surface (<code>card:move</code>, which a template binds as
|
|
1022
|
+
<code>@card-move</code>), and <code>DEFAULT_GRID_NAME</code> is the name a grid publishes
|
|
1023
|
+
under when you choose none.</p>
|
|
1024
|
+
<p><strong>Reactivity: shallow, and measured on a grid event.</strong> Hold a large
|
|
1025
|
+
<code>rows</code> array in a <code>shallowRef</code> and assign a new array when it changes;
|
|
1026
|
+
a plain <code>ref</code> makes every row object a reactive proxy, which the grid neither needs
|
|
1027
|
+
nor wants. Nothing in the adapter uses a <code>{ deep: true }</code> watcher, for the same
|
|
1028
|
+
reason — one watcher per prop, compared with <code>Object.is</code>. And the grid paints on its
|
|
1029
|
+
own schedule rather than Vue's, so <code>nextTick()</code> means "Vue has patched", not "the
|
|
1030
|
+
grid has painted": measure in <code>@render-done</code> or <code>@rows-changed</code>.</p>
|
|
1031
|
+
<p><strong>Client only.</strong> Every component owns a real DOM element and builds nothing
|
|
1032
|
+
before <code>onMounted</code>, so a server render emits the empty host: there is no SSR or
|
|
1033
|
+
Nuxt server-side support. Every component destroys its instance, stops its watchers and
|
|
1034
|
+
unsubscribes its listeners in <code>onBeforeUnmount</code>, so a <code>v-if</code> toggled
|
|
1035
|
+
twice leaves exactly one instance alive.</p>
|
|
1036
|
+
</div>
|
|
1037
|
+
|
|
928
1038
|
<div class="example">
|
|
929
1039
|
<p class="example__label">Svelte</p>
|
|
930
1040
|
<pre><code><script>
|
|
@@ -943,6 +1053,19 @@ createGrid(element, { direction: 'rtl' }); <span class="cmt">// or say so out
|
|
|
943
1053
|
></div></code></pre>
|
|
944
1054
|
</div>
|
|
945
1055
|
<div class="why">
|
|
1056
|
+
<p><strong>Since 1.66, components too.</strong> An action cannot express what the other
|
|
1057
|
+
adapters express — it takes a node and a value, so it has no children, no snippets and no
|
|
1058
|
+
context — so the package also ships a Svelte 5 component per viewer as <code>.svelte</code>
|
|
1059
|
+
source at <code>@toclocoinc/lattice-grid/svelte/*.svelte</code>, compiled by your own
|
|
1060
|
+
toolchain, with <code>svelte</code> as an optional peer dependency. Wrap a subtree in
|
|
1061
|
+
<code>GridProvider.svelte</code> and a grid publishes itself under its <code>name</code> for a
|
|
1062
|
+
chart or a KPI panel beside it to find; wrap one in <code>Router.svelte</code> and a grid that
|
|
1063
|
+
names a <code>route</code> is attached to a Data Router built with the first of them. Both are
|
|
1064
|
+
built from exported helpers you can call yourself — <code>createGridRegistry()</code> returns
|
|
1065
|
+
the registry a provider puts in context, and <code>createRouterHandle({ createDataRouter })</code>
|
|
1066
|
+
returns the router handle, built on first use and destroyed with the component that owns it.
|
|
1067
|
+
See <a href="API.html#svelte-v2">Svelte 5: components you compile</a>. The action below is
|
|
1068
|
+
unchanged and still supported.</p>
|
|
946
1069
|
<p><strong>An action, not a component.</strong> Svelte's action contract is
|
|
947
1070
|
<code>{ update, destroy }</code> over a node the caller already owns, which is exactly the
|
|
948
1071
|
shape of the work: create, push changes, tear down. A component wrapper would add an element
|
|
@@ -1369,7 +1492,7 @@ off(); <span class="cmt">// every subscrip
|
|
|
1369
1492
|
</p>
|
|
1370
1493
|
<div class="example">
|
|
1371
1494
|
<p class="example__label">Which version am I running?</p>
|
|
1372
|
-
<pre><code>grid.getVersion(); <span class="cmt">// '1.
|
|
1495
|
+
<pre><code>grid.getVersion(); <span class="cmt">// '1.67.0'</span>
|
|
1373
1496
|
LatticeGrid.getVersion(); <span class="cmt">// the same, when you have no grid to hand</span></code></pre>
|
|
1374
1497
|
</div>
|
|
1375
1498
|
<p class="lead-in">
|
|
@@ -8194,6 +8317,16 @@ grid.import.apply(preview);</code></pre>
|
|
|
8194
8317
|
<tr><td class="name">createLatticeGridElement</td><td class="desc">Build the element class without registering it, for a custom registry.</td></tr>
|
|
8195
8318
|
<tr><td class="name">createMessages</td><td class="desc">Build a message catalogue. A partial set lays over the built-in British English one.</td></tr>
|
|
8196
8319
|
<tr><td class="name">defineLatticeGrid</td><td class="desc">Register &lt;lattice-grid&gt;, or your own tag name.</td></tr>
|
|
8320
|
+
<tr><td class="name">defineLatticeElements</td><td class="desc">Register one custom element per Lattice viewer — <code>&lt;lattice-kpi&gt;</code>, <code>&lt;lattice-chart&gt;</code>, <code>&lt;lattice-kanban&gt;</code>, <code>&lt;lattice-gantt&gt;</code>, <code>&lt;lattice-layout&gt;</code>, <code>&lt;lattice-tabs&gt;</code> and <code>&lt;lattice-router&gt;</code> — from the module factories your page has imported, under a configurable tag prefix. Nothing is imported by the web component module itself, so a page that draws no charts never loads the charts bundle; the grid element is already registered on import. Structures (<code>columns</code>, <code>rows</code>, <code>tiles</code>, <code>tasks</code>, <code>windows</code>, a geometry pack) are properties and scalars work as attributes too, a property assigned before the element upgrades is honoured, a change is diffed into the live instance rather than rebuilding it, and a viewer declared before its grid mounts when the grid arrives. Safe to call twice: an already-registered tag is handed back.</td></tr>
|
|
8321
|
+
<tr><td class="name">createLatticeElements</td><td class="desc">The same element classes without registering them, for a page that owns its own tag names or its own registry.</td></tr>
|
|
8322
|
+
<tr><td class="name">createLatticeKPIElement</td><td class="desc">The <code>&lt;lattice-kpi&gt;</code> class on its own, given the KPI module's factory. Grid-bound through <code>grid-name</code> by default; set <code>rows</code> for a standalone panel.</td></tr>
|
|
8323
|
+
<tr><td class="name">createLatticeChartElement</td><td class="desc">The <code>&lt;lattice-chart&gt;</code> class on its own. A chart is always drawn from a grid, so nothing is built until one is published and a different grid builds a new chart; every other attribute is the chart spec and a change goes into <code>chart.update()</code>.</td></tr>
|
|
8324
|
+
<tr><td class="name">createLatticeKanbanElement</td><td class="desc">The <code>&lt;lattice-kanban&gt;</code> class on its own, given the board's factory.</td></tr>
|
|
8325
|
+
<tr><td class="name">createLatticeGanttElement</td><td class="desc">The <code>&lt;lattice-gantt&gt;</code> class on its own; <code>tasks</code> and <code>dependencies</code> are live properties.</td></tr>
|
|
8326
|
+
<tr><td class="name">createLatticeLayoutElement</td><td class="desc">The <code>&lt;lattice-layout&gt;</code> class on its own; <code>windows</code> is a property.</td></tr>
|
|
8327
|
+
<tr><td class="name">createLatticeTabsElement</td><td class="desc">The <code>&lt;lattice-tabs&gt;</code> class on its own. A tab's content is a <code>&lt;template data-tab="‹id›"&gt;</code> child cloned into the panel the module creates for it, so a tab can hold a real <code>&lt;lattice-grid&gt;</code>; a tab with no template is built by the module from its configuration, and the two kinds mix on one strip.</td></tr>
|
|
8328
|
+
<tr><td class="name">createLatticeRouterElement</td><td class="desc">The <code>&lt;lattice-router&gt;</code> class on its own. It is a grouping element: it owns one Data Router, built by the first <code>&lt;lattice-grid route="…"&gt;</code> beneath it and destroyed on disconnect, and the name registry its descendants resolve <code>grid-name</code> through.</td></tr>
|
|
8329
|
+
<tr><td class="name">adoptLatticeStyles</td><td class="desc">Make a host's shadow root see Lattice's styles, and keep it seeing them. The theme, each module's injected stylesheet and the grid's <em>growing</em> generated one are mirrored into the root as constructable stylesheets and kept level with their sources, so a class compiled later still arrives; a sheet that cannot be read as text (cross-origin, or carrying <code>@import</code>) is cloned into the root as a link instead. Every Lattice element calls it for its own root on connect, so this is for a host that mounts Lattice inside a shadow root by other means. Returns the undo.</td></tr>
|
|
8197
8330
|
<tr><td class="name">defineUnit</td><td class="desc">Add one unit to a system, or override one of ours under the same name.</td></tr>
|
|
8198
8331
|
<tr><td class="name">registerChartType</td><td class="desc">Register an extension chart type so <code>createChart({ type })</code> can draw it (BACKLOG-0000886). Extension types ship as their own opt-in modules (e.g. <code>modules/chart-ridgeline</code>), so the base charts bundle does not grow for a type a caller never imports — you pay only for the charts you use. <code>registeredChartTypes()</code> lists what is registered.</td></tr>
|
|
8199
8332
|
<tr><td class="name">registerModules</td><td class="desc">Install optional modules once, for every grid on the page.</td></tr>
|
|
@@ -9518,7 +9651,7 @@ grid.licence.state(); <span class="cmt">// 'licensed' | 'localhost' | 'trial'<
|
|
|
9518
9651
|
|
|
9519
9652
|
<footer>
|
|
9520
9653
|
<p>
|
|
9521
|
-
Lattice Grid 1.
|
|
9654
|
+
Lattice Grid 1.67.0 · Copyright © 2026 TOCLOCO Inc. All rights reserved.
|
|
9522
9655
|
Written against the shipped source. Where this guide and the code disagree, the code wins,
|
|
9523
9656
|
please <a href="https://www.latticegrid.dev">tell us</a>.
|
|
9524
9657
|
</p>
|
package/lattice-grid.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.
|
|
2
|
+
* Lattice Grid 1.67.0, type declarations
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -2071,11 +2071,14 @@ export interface GridConfig {
|
|
|
2071
2071
|
pagination?: PaginationConfig | boolean;
|
|
2072
2072
|
locale?: string;
|
|
2073
2073
|
/**
|
|
2074
|
-
* Writing direction.
|
|
2075
|
-
*
|
|
2076
|
-
*
|
|
2077
|
-
* `
|
|
2078
|
-
*
|
|
2074
|
+
* Writing direction. An explicit `'ltr'` or `'rtl'` always wins. Omit it, or
|
|
2075
|
+
* say `'auto'`, to settle it from the mount or the nearest ancestor
|
|
2076
|
+
* carrying a `dir="ltr"`/`dir="rtl"` attribute, and only then from
|
|
2077
|
+
* `locale`: `ar`, `he`, `fa` and the rest resolve to `rtl`. A page-level
|
|
2078
|
+
* `dir="ltr"` therefore wins over an RTL locale — a host that wants RTL
|
|
2079
|
+
* inside an LTR page sets `direction: 'rtl'` explicitly. In a right-to-left
|
|
2080
|
+
* grid the logical alignments `start`/`end` mirror while the physical
|
|
2081
|
+
* `left`/`right` do not (see {@link Align}).
|
|
2079
2082
|
*/
|
|
2080
2083
|
direction?: 'ltr' | 'rtl' | 'auto';
|
|
2081
2084
|
/**
|