@toclocoinc/lattice-grid 1.64.0 → 1.66.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.
Files changed (177) hide show
  1. package/README.md +6 -3
  2. package/angular/LICENSE +111 -0
  3. package/angular/README.md +78 -0
  4. package/angular/fesm2022/toclocoinc-lattice-grid-angular.mjs +2843 -0
  5. package/angular/package.json +16 -0
  6. package/angular/types/toclocoinc-lattice-grid-angular.d.ts +1366 -0
  7. package/docs/API.html +791 -8
  8. package/docs/api-detail.html +172 -4
  9. package/lattice-grid.d.ts +241 -205
  10. package/lattice-grid.esm.min.js +19 -7
  11. package/lattice-grid.min.cjs +19 -7
  12. package/lattice-grid.min.css +1 -1
  13. package/lattice-grid.min.js +19 -7
  14. package/modules/ai.d.ts +10 -13
  15. package/modules/ai.esm.min.js +3 -3
  16. package/modules/ai.min.cjs +3 -3
  17. package/modules/ai.min.js +3 -3
  18. package/modules/angular.d.ts +2 -2
  19. package/modules/angular.esm.min.js +433 -7
  20. package/modules/angular.min.cjs +433 -7
  21. package/modules/angular.min.js +433 -7
  22. package/modules/chart-alluvial.d.ts +2 -2
  23. package/modules/chart-alluvial.esm.min.js +1 -1
  24. package/modules/chart-alluvial.min.cjs +1 -1
  25. package/modules/chart-alluvial.min.js +1 -1
  26. package/modules/chart-arc.d.ts +2 -2
  27. package/modules/chart-arc.esm.min.js +1 -1
  28. package/modules/chart-arc.min.cjs +1 -1
  29. package/modules/chart-arc.min.js +1 -1
  30. package/modules/chart-bubblemap.d.ts +2 -2
  31. package/modules/chart-bubblemap.esm.min.js +1 -1
  32. package/modules/chart-bubblemap.min.cjs +1 -1
  33. package/modules/chart-bubblemap.min.js +1 -1
  34. package/modules/chart-bump.d.ts +2 -2
  35. package/modules/chart-bump.esm.min.js +1 -1
  36. package/modules/chart-bump.min.cjs +1 -1
  37. package/modules/chart-bump.min.js +1 -1
  38. package/modules/chart-calendar.d.ts +2 -2
  39. package/modules/chart-calendar.esm.min.js +1 -1
  40. package/modules/chart-calendar.min.cjs +1 -1
  41. package/modules/chart-calendar.min.js +1 -1
  42. package/modules/chart-decomposition.d.ts +2 -2
  43. package/modules/chart-decomposition.esm.min.js +1 -1
  44. package/modules/chart-decomposition.min.cjs +1 -1
  45. package/modules/chart-decomposition.min.js +1 -1
  46. package/modules/chart-diverging.d.ts +2 -2
  47. package/modules/chart-diverging.esm.min.js +1 -1
  48. package/modules/chart-diverging.min.cjs +1 -1
  49. package/modules/chart-diverging.min.js +1 -1
  50. package/modules/chart-dumbbell.d.ts +2 -2
  51. package/modules/chart-dumbbell.esm.min.js +1 -1
  52. package/modules/chart-dumbbell.min.cjs +1 -1
  53. package/modules/chart-dumbbell.min.js +1 -1
  54. package/modules/chart-fan.d.ts +2 -2
  55. package/modules/chart-fan.esm.min.js +1 -1
  56. package/modules/chart-fan.min.cjs +1 -1
  57. package/modules/chart-fan.min.js +1 -1
  58. package/modules/chart-hexbin.d.ts +2 -2
  59. package/modules/chart-hexbin.esm.min.js +1 -1
  60. package/modules/chart-hexbin.min.cjs +1 -1
  61. package/modules/chart-hexbin.min.js +1 -1
  62. package/modules/chart-hexmap.d.ts +2 -2
  63. package/modules/chart-hexmap.esm.min.js +1 -1
  64. package/modules/chart-hexmap.min.cjs +1 -1
  65. package/modules/chart-hexmap.min.js +1 -1
  66. package/modules/chart-icicle.d.ts +2 -2
  67. package/modules/chart-icicle.esm.min.js +1 -1
  68. package/modules/chart-icicle.min.cjs +1 -1
  69. package/modules/chart-icicle.min.js +1 -1
  70. package/modules/chart-markermap.d.ts +1 -1
  71. package/modules/chart-markermap.esm.min.js +1 -1
  72. package/modules/chart-markermap.min.cjs +1 -1
  73. package/modules/chart-markermap.min.js +1 -1
  74. package/modules/chart-parallel.d.ts +2 -2
  75. package/modules/chart-parallel.esm.min.js +1 -1
  76. package/modules/chart-parallel.min.cjs +1 -1
  77. package/modules/chart-parallel.min.js +1 -1
  78. package/modules/chart-ridgeline.d.ts +2 -2
  79. package/modules/chart-ridgeline.esm.min.js +1 -1
  80. package/modules/chart-ridgeline.min.cjs +1 -1
  81. package/modules/chart-ridgeline.min.js +1 -1
  82. package/modules/chart-roc.d.ts +2 -2
  83. package/modules/chart-roc.esm.min.js +1 -1
  84. package/modules/chart-roc.min.cjs +1 -1
  85. package/modules/chart-roc.min.js +1 -1
  86. package/modules/chart-slope.d.ts +2 -2
  87. package/modules/chart-slope.esm.min.js +1 -1
  88. package/modules/chart-slope.min.cjs +1 -1
  89. package/modules/chart-slope.min.js +1 -1
  90. package/modules/chart-splom.d.ts +2 -2
  91. package/modules/chart-splom.esm.min.js +1 -1
  92. package/modules/chart-splom.min.cjs +1 -1
  93. package/modules/chart-splom.min.js +1 -1
  94. package/modules/chart-waffle.d.ts +2 -2
  95. package/modules/chart-waffle.esm.min.js +1 -1
  96. package/modules/chart-waffle.min.cjs +1 -1
  97. package/modules/chart-waffle.min.js +1 -1
  98. package/modules/charts.d.ts +4 -5
  99. package/modules/charts.esm.min.js +261 -48
  100. package/modules/charts.min.cjs +261 -48
  101. package/modules/charts.min.js +261 -48
  102. package/modules/data-router.d.ts +5 -6
  103. package/modules/data-router.esm.min.js +3 -3
  104. package/modules/data-router.min.cjs +3 -3
  105. package/modules/data-router.min.js +3 -3
  106. package/modules/devtools.d.ts +1 -1
  107. package/modules/devtools.esm.min.js +1 -1
  108. package/modules/devtools.min.cjs +1 -1
  109. package/modules/devtools.min.js +1 -1
  110. package/modules/dhtmlx-compat.d.ts +1 -1
  111. package/modules/dhtmlx-compat.esm.min.js +3 -3
  112. package/modules/dhtmlx-compat.min.cjs +3 -3
  113. package/modules/dhtmlx-compat.min.js +3 -3
  114. package/modules/gantt.d.ts +37 -43
  115. package/modules/gantt.esm.min.js +3 -3
  116. package/modules/gantt.min.cjs +3 -3
  117. package/modules/gantt.min.js +3 -3
  118. package/modules/geo-europe-nuts.d.ts +2 -2
  119. package/modules/geo-europe-nuts.esm.min.js +1 -1
  120. package/modules/geo-uk.d.ts +2 -2
  121. package/modules/geo-uk.esm.min.js +1 -1
  122. package/modules/geo-us-states.d.ts +2 -2
  123. package/modules/geo-us-states.esm.min.js +1 -1
  124. package/modules/geo-world-110m.d.ts +2 -2
  125. package/modules/geo-world-110m.esm.min.js +1 -1
  126. package/modules/geo-world-50m.d.ts +2 -2
  127. package/modules/geo-world-50m.esm.min.js +1 -1
  128. package/modules/htmx.d.ts +2 -2
  129. package/modules/htmx.esm.min.js +19 -7
  130. package/modules/htmx.min.cjs +19 -7
  131. package/modules/htmx.min.js +19 -7
  132. package/modules/kanban.d.ts +14 -14
  133. package/modules/kanban.esm.min.js +3 -3
  134. package/modules/kanban.min.cjs +3 -3
  135. package/modules/kanban.min.js +3 -3
  136. package/modules/kpi.d.ts +5 -5
  137. package/modules/kpi.esm.min.js +3 -3
  138. package/modules/kpi.min.cjs +3 -3
  139. package/modules/kpi.min.js +3 -3
  140. package/modules/layout.d.ts +2 -2
  141. package/modules/layout.esm.min.js +3 -3
  142. package/modules/layout.min.cjs +3 -3
  143. package/modules/layout.min.js +3 -3
  144. package/modules/mock-socket.d.ts +1 -1
  145. package/modules/mock-socket.esm.min.js +1 -1
  146. package/modules/mock-socket.min.cjs +1 -1
  147. package/modules/mock-socket.min.js +1 -1
  148. package/modules/react.d.ts +4 -5
  149. package/modules/react.esm.min.js +3 -3
  150. package/modules/react.min.cjs +3 -3
  151. package/modules/react.min.js +3 -3
  152. package/modules/svelte.d.ts +252 -4
  153. package/modules/svelte.esm.min.js +960 -6
  154. package/modules/svelte.min.cjs +942 -5
  155. package/modules/svelte.min.js +942 -5
  156. package/modules/tabs.d.ts +2 -3
  157. package/modules/tabs.esm.min.js +3 -3
  158. package/modules/tabs.min.cjs +3 -3
  159. package/modules/tabs.min.js +3 -3
  160. package/modules/vue.d.ts +398 -9
  161. package/modules/vue.esm.min.js +1163 -31
  162. package/modules/vue.min.cjs +1147 -30
  163. package/modules/vue.min.js +1147 -30
  164. package/modules/webcomponent.d.ts +234 -2
  165. package/modules/webcomponent.esm.min.js +1267 -38
  166. package/modules/webcomponent.min.cjs +1249 -38
  167. package/modules/webcomponent.min.js +1249 -38
  168. package/package.json +27 -2
  169. package/svelte/Chart.svelte +34 -0
  170. package/svelte/Gantt.svelte +34 -0
  171. package/svelte/Grid.svelte +30 -0
  172. package/svelte/GridProvider.svelte +13 -0
  173. package/svelte/KPI.svelte +34 -0
  174. package/svelte/Kanban.svelte +34 -0
  175. package/svelte/Layout.svelte +34 -0
  176. package/svelte/Router.svelte +16 -0
  177. package/svelte/Tabs.svelte +53 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toclocoinc/lattice-grid",
3
- "version": "1.64.0",
3
+ "version": "1.66.0",
4
4
  "description": "Lattice Grid JS: a high-performance JavaScript data grid for millions of rows, live data sources and zero runtime dependencies, free on localhost and licensed per domain to ship.",
5
5
  "keywords": [
6
6
  "data-grid",
@@ -41,6 +41,15 @@
41
41
  },
42
42
  "./modules/*.js": "./modules/*.js",
43
43
  "./modules/*.cjs": "./modules/*.cjs",
44
+ "./angular": {
45
+ "types": "./angular/types/toclocoinc-lattice-grid-angular.d.ts",
46
+ "default": "./angular/fesm2022/toclocoinc-lattice-grid-angular.mjs"
47
+ },
48
+ "./angular/package.json": "./angular/package.json",
49
+ "./svelte/*.svelte": {
50
+ "svelte": "./svelte/*.svelte",
51
+ "default": "./svelte/*.svelte"
52
+ },
44
53
  "./css": "./lattice-grid.min.css",
45
54
  "./lattice-grid.css": "./lattice-grid.min.css",
46
55
  "./package.json": "./package.json"
@@ -48,5 +57,21 @@
48
57
  "sideEffects": [
49
58
  "*.css"
50
59
  ],
51
- "dependencies": {}
60
+ "dependencies": {},
61
+ "peerDependencies": {
62
+ "@angular/common": ">=17.0.0",
63
+ "@angular/core": ">=17.0.0",
64
+ "svelte": ">=5.0.0"
65
+ },
66
+ "peerDependenciesMeta": {
67
+ "@angular/common": {
68
+ "optional": true
69
+ },
70
+ "@angular/core": {
71
+ "optional": true
72
+ },
73
+ "svelte": {
74
+ "optional": true
75
+ }
76
+ }
52
77
  }
@@ -0,0 +1,34 @@
1
+ <script>
2
+ import { onMount, onDestroy, getContext } from 'svelte';
3
+ import { createChart } from '@toclocoinc/lattice-grid/modules/charts';
4
+ import { bindViewer, GRID_REGISTRY_KEY } from '@toclocoinc/lattice-grid/modules/svelte';
5
+
6
+ let { class: klass = '', style = '', id = undefined, ...props } = $props();
7
+
8
+ let el = $state(null);
9
+ let published = $state(0);
10
+ let binding = null;
11
+ const registry = getContext(GRID_REGISTRY_KEY) ?? null;
12
+ const unsubscribe = registry ? registry.subscribe(() => { published += 1; }) : null;
13
+
14
+ export function instance() { return binding ? binding.instance : null; }
15
+
16
+ onMount(() => {
17
+ binding = bindViewer({ viewer: 'chart', factory: createChart, element: el, registry });
18
+ binding.sync(props);
19
+ });
20
+
21
+ onDestroy(() => {
22
+ if (unsubscribe) unsubscribe();
23
+ if (binding) binding.destroy();
24
+ binding = null;
25
+ });
26
+
27
+ $effect(() => {
28
+ void published;
29
+ const now = { ...props };
30
+ if (binding) binding.sync(now);
31
+ });
32
+ </script>
33
+
34
+ <div bind:this={el} class={klass} {style} {id}></div>
@@ -0,0 +1,34 @@
1
+ <script>
2
+ import { onMount, onDestroy, getContext } from 'svelte';
3
+ import { createGantt } from '@toclocoinc/lattice-grid/modules/gantt';
4
+ import { bindViewer, GRID_REGISTRY_KEY } from '@toclocoinc/lattice-grid/modules/svelte';
5
+
6
+ let { class: klass = '', style = '', id = undefined, ...props } = $props();
7
+
8
+ let el = $state(null);
9
+ let published = $state(0);
10
+ let binding = null;
11
+ const registry = getContext(GRID_REGISTRY_KEY) ?? null;
12
+ const unsubscribe = registry ? registry.subscribe(() => { published += 1; }) : null;
13
+
14
+ export function instance() { return binding ? binding.instance : null; }
15
+
16
+ onMount(() => {
17
+ binding = bindViewer({ viewer: 'gantt', factory: createGantt, element: el, registry });
18
+ binding.sync(props);
19
+ });
20
+
21
+ onDestroy(() => {
22
+ if (unsubscribe) unsubscribe();
23
+ if (binding) binding.destroy();
24
+ binding = null;
25
+ });
26
+
27
+ $effect(() => {
28
+ void published;
29
+ const now = { ...props };
30
+ if (binding) binding.sync(now);
31
+ });
32
+ </script>
33
+
34
+ <div bind:this={el} class={klass} {style} {id}></div>
@@ -0,0 +1,30 @@
1
+ <script>
2
+ import { onMount, onDestroy, getContext } from 'svelte';
3
+ import { createGrid } from '@toclocoinc/lattice-grid';
4
+ import { bindGrid, GRID_REGISTRY_KEY, ROUTER_KEY } from '@toclocoinc/lattice-grid/modules/svelte';
5
+
6
+ let { class: klass = '', style = '', id = undefined, ...props } = $props();
7
+
8
+ let el = $state(null);
9
+ let binding = null;
10
+ const registry = getContext(GRID_REGISTRY_KEY) ?? null;
11
+ const router = getContext(ROUTER_KEY) ?? null;
12
+
13
+ export function grid() { return binding ? binding.grid : null; }
14
+
15
+ onMount(() => {
16
+ binding = bindGrid({ createGrid, element: el, props, registry, router });
17
+ });
18
+
19
+ onDestroy(() => {
20
+ if (binding) binding.destroy(props);
21
+ binding = null;
22
+ });
23
+
24
+ $effect(() => {
25
+ const now = { ...props };
26
+ if (binding) binding.update(now);
27
+ });
28
+ </script>
29
+
30
+ <div bind:this={el} class={klass} {style} {id}></div>
@@ -0,0 +1,13 @@
1
+ <script>
2
+ import { setContext } from 'svelte';
3
+ import { createGridRegistry, GRID_REGISTRY_KEY } from '@toclocoinc/lattice-grid/modules/svelte';
4
+
5
+ let { children } = $props();
6
+
7
+ const registry = createGridRegistry();
8
+ setContext(GRID_REGISTRY_KEY, registry);
9
+
10
+ export function grids() { return registry; }
11
+ </script>
12
+
13
+ {@render children?.()}
@@ -0,0 +1,34 @@
1
+ <script>
2
+ import { onMount, onDestroy, getContext } from 'svelte';
3
+ import { createKPI } from '@toclocoinc/lattice-grid/modules/kpi';
4
+ import { bindViewer, GRID_REGISTRY_KEY } from '@toclocoinc/lattice-grid/modules/svelte';
5
+
6
+ let { class: klass = '', style = '', id = undefined, ...props } = $props();
7
+
8
+ let el = $state(null);
9
+ let published = $state(0);
10
+ let binding = null;
11
+ const registry = getContext(GRID_REGISTRY_KEY) ?? null;
12
+ const unsubscribe = registry ? registry.subscribe(() => { published += 1; }) : null;
13
+
14
+ export function instance() { return binding ? binding.instance : null; }
15
+
16
+ onMount(() => {
17
+ binding = bindViewer({ viewer: 'kpi', factory: createKPI, element: el, registry });
18
+ binding.sync(props);
19
+ });
20
+
21
+ onDestroy(() => {
22
+ if (unsubscribe) unsubscribe();
23
+ if (binding) binding.destroy();
24
+ binding = null;
25
+ });
26
+
27
+ $effect(() => {
28
+ void published;
29
+ const now = { ...props };
30
+ if (binding) binding.sync(now);
31
+ });
32
+ </script>
33
+
34
+ <div bind:this={el} class={klass} {style} {id}></div>
@@ -0,0 +1,34 @@
1
+ <script>
2
+ import { onMount, onDestroy, getContext } from 'svelte';
3
+ import { createKanban } from '@toclocoinc/lattice-grid/modules/kanban';
4
+ import { bindViewer, GRID_REGISTRY_KEY } from '@toclocoinc/lattice-grid/modules/svelte';
5
+
6
+ let { class: klass = '', style = '', id = undefined, ...props } = $props();
7
+
8
+ let el = $state(null);
9
+ let published = $state(0);
10
+ let binding = null;
11
+ const registry = getContext(GRID_REGISTRY_KEY) ?? null;
12
+ const unsubscribe = registry ? registry.subscribe(() => { published += 1; }) : null;
13
+
14
+ export function instance() { return binding ? binding.instance : null; }
15
+
16
+ onMount(() => {
17
+ binding = bindViewer({ viewer: 'kanban', factory: createKanban, element: el, registry });
18
+ binding.sync(props);
19
+ });
20
+
21
+ onDestroy(() => {
22
+ if (unsubscribe) unsubscribe();
23
+ if (binding) binding.destroy();
24
+ binding = null;
25
+ });
26
+
27
+ $effect(() => {
28
+ void published;
29
+ const now = { ...props };
30
+ if (binding) binding.sync(now);
31
+ });
32
+ </script>
33
+
34
+ <div bind:this={el} class={klass} {style} {id}></div>
@@ -0,0 +1,34 @@
1
+ <script>
2
+ import { onMount, onDestroy, getContext } from 'svelte';
3
+ import { createLayout } from '@toclocoinc/lattice-grid/modules/layout';
4
+ import { bindViewer, GRID_REGISTRY_KEY } from '@toclocoinc/lattice-grid/modules/svelte';
5
+
6
+ let { class: klass = '', style = '', id = undefined, ...props } = $props();
7
+
8
+ let el = $state(null);
9
+ let published = $state(0);
10
+ let binding = null;
11
+ const registry = getContext(GRID_REGISTRY_KEY) ?? null;
12
+ const unsubscribe = registry ? registry.subscribe(() => { published += 1; }) : null;
13
+
14
+ export function instance() { return binding ? binding.instance : null; }
15
+
16
+ onMount(() => {
17
+ binding = bindViewer({ viewer: 'layout', factory: createLayout, element: el, registry });
18
+ binding.sync(props);
19
+ });
20
+
21
+ onDestroy(() => {
22
+ if (unsubscribe) unsubscribe();
23
+ if (binding) binding.destroy();
24
+ binding = null;
25
+ });
26
+
27
+ $effect(() => {
28
+ void published;
29
+ const now = { ...props };
30
+ if (binding) binding.sync(now);
31
+ });
32
+ </script>
33
+
34
+ <div bind:this={el} class={klass} {style} {id}></div>
@@ -0,0 +1,16 @@
1
+ <script>
2
+ import { setContext, onDestroy } from 'svelte';
3
+ import { createDataRouter } from '@toclocoinc/lattice-grid/modules/data-router';
4
+ import { createRouterHandle, ROUTER_KEY } from '@toclocoinc/lattice-grid/modules/svelte';
5
+
6
+ let { config = {}, children } = $props();
7
+
8
+ const handle = createRouterHandle({ createDataRouter, config: () => config });
9
+ setContext(ROUTER_KEY, handle);
10
+
11
+ export function router() { return handle.router; }
12
+
13
+ onDestroy(() => handle.destroy());
14
+ </script>
15
+
16
+ {@render children?.()}
@@ -0,0 +1,53 @@
1
+ <script>
2
+ import { onMount, onDestroy, getContext } from 'svelte';
3
+ import { createTabs } from '@toclocoinc/lattice-grid/modules/tabs';
4
+ import { createGrid } from '@toclocoinc/lattice-grid';
5
+ import { bindTabs, snippetTabIds } from '@toclocoinc/lattice-grid/modules/svelte';
6
+
7
+ let {
8
+ class: klass = '', style = '', id = undefined, tabs = [], ...props
9
+ } = $props();
10
+
11
+ let el = $state(null);
12
+ let open = $state([]);
13
+ let holders = $state({});
14
+ let binding = null;
15
+
16
+ const contentIds = $derived(snippetTabIds(tabs, props));
17
+
18
+ export function instance() { return binding ? binding.instance : null; }
19
+
20
+ onMount(() => {
21
+ binding = bindTabs({
22
+ createTabs,
23
+ createGrid,
24
+ element: el,
25
+ onPanels: (ids) => { open = ids; },
26
+ });
27
+ binding.sync({ ...props, tabs, contentIds });
28
+ });
29
+
30
+ onDestroy(() => {
31
+ if (binding) binding.destroy({ ...props, tabs, contentIds });
32
+ binding = null;
33
+ });
34
+
35
+ $effect(() => {
36
+ const now = { ...props, tabs, contentIds };
37
+ if (binding) binding.sync(now);
38
+ });
39
+
40
+ $effect(() => {
41
+ for (const tabId of open) {
42
+ if (binding) binding.place(tabId, holders[tabId]);
43
+ }
44
+ });
45
+ </script>
46
+
47
+ <div bind:this={el} class={klass} {style} {id}></div>
48
+
49
+ {#each open as tabId (tabId)}
50
+ <div bind:this={holders[tabId]} style="display: contents">
51
+ {@render props[tabId]()}
52
+ </div>
53
+ {/each}