@toclocoinc/lattice-grid 1.68.1 → 1.68.2
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 +26 -1
- package/angular/fesm2022/toclocoinc-lattice-grid-angular.mjs +1 -0
- package/angular/package.json +1 -1
- package/docs/API.html +3833 -1278
- package/docs/api-detail.html +101 -4
- package/lattice-grid.d.ts +2626 -143
- package/lattice-grid.esm.min.js +192 -36
- package/lattice-grid.min.cjs +192 -36
- package/lattice-grid.min.js +192 -36
- package/modules/ai.d.ts +111 -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 +1 -1
- package/modules/angular.esm.min.js +3 -3
- package/modules/angular.min.cjs +3 -3
- package/modules/angular.min.js +3 -3
- 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 +9 -9
- package/modules/charts.min.cjs +9 -9
- package/modules/charts.min.js +9 -9
- package/modules/data-router.d.ts +35 -5
- package/modules/data-router.esm.min.js +9 -4
- package/modules/data-router.min.cjs +9 -4
- package/modules/data-router.min.js +9 -4
- 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 +283 -33
- package/modules/gantt.esm.min.js +8 -4
- package/modules/gantt.min.cjs +8 -4
- package/modules/gantt.min.js +8 -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 +192 -36
- package/modules/htmx.min.cjs +192 -36
- package/modules/htmx.min.js +192 -36
- package/modules/kanban.d.ts +456 -5
- 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 +68 -4
- 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 +134 -8
- 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 +5 -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 +1 -1
- package/modules/svelte.esm.min.js +3 -3
- package/modules/svelte.min.cjs +3 -3
- package/modules/svelte.min.js +3 -3
- package/modules/tabs.d.ts +96 -20
- 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 +5 -1
- package/modules/vue.esm.min.js +3 -3
- package/modules/vue.min.cjs +3 -3
- package/modules/vue.min.js +3 -3
- package/modules/webcomponent.d.ts +10 -39
- package/modules/webcomponent.esm.min.js +237 -40
- package/modules/webcomponent.min.cjs +237 -40
- package/modules/webcomponent.min.js +237 -40
- package/package.json +1 -1
package/modules/chart-roc.d.ts
CHANGED
package/modules/chart-roc.min.js
CHANGED
package/modules/chart-slope.d.ts
CHANGED
package/modules/chart-splom.d.ts
CHANGED
package/modules/charts.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.68.
|
|
2
|
+
* Lattice Grid 1.68.2, charts module
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -1606,12 +1606,12 @@ Object.defineProperty(__exports,"frameBatched",{enumerable:true,get:function(){r
|
|
|
1606
1606
|
Object.defineProperty(__exports,"settleDebounce",{enumerable:true,get:function(){return settleDebounce;}});
|
|
1607
1607
|
Object.defineProperty(__exports,"whenIdle",{enumerable:true,get:function(){return whenIdle;}});
|
|
1608
1608
|
Object.defineProperty(__exports,"uid",{enumerable:true,get:function(){return uid;}});
|
|
1609
|
-
const STAMPED_VERSION="1.68.
|
|
1609
|
+
const STAMPED_VERSION="1.68.2";
|
|
1610
1610
|
async function resolveVersion(){
|
|
1611
1611
|
if(STAMPED_VERSION!=='0.0.0-source')return STAMPED_VERSION;
|
|
1612
1612
|
return STAMPED_VERSION;
|
|
1613
1613
|
}
|
|
1614
|
-
const VERSION="1.68.
|
|
1614
|
+
const VERSION="1.68.2";
|
|
1615
1615
|
const warned=new Set();
|
|
1616
1616
|
const WARNED_LIMIT=2000;
|
|
1617
1617
|
function rememberWarned(key){
|
|
@@ -6392,14 +6392,12 @@ const columns=ctx.columns||[];
|
|
|
6392
6392
|
if(columns.length<2)return null;
|
|
6393
6393
|
const stats=ctx.grid&&ctx.grid.statistics;
|
|
6394
6394
|
if(!stats)return null;
|
|
6395
|
-
const
|
|
6395
|
+
const method=ctx.method==='spearman'?'spearman'
|
|
6396
|
+
:ctx.method==='kendall'?'kendall':'correlation';
|
|
6396
6397
|
const cells=[];
|
|
6397
6398
|
for(let row=0;row<columns.length;row++){
|
|
6398
6399
|
for(let col=0;col<columns.length;col++){
|
|
6399
|
-
const r=row===col
|
|
6400
|
-
?1
|
|
6401
|
-
:(spearman?stats.spearman(columns[row],columns[col])
|
|
6402
|
-
:stats.correlation(columns[row],columns[col]));
|
|
6400
|
+
const r=row===col?1:stats[method](columns[row],columns[col]);
|
|
6403
6401
|
cells.push({row,col,a:columns[row],b:columns[col],r});
|
|
6404
6402
|
}
|
|
6405
6403
|
}
|
|
@@ -10243,6 +10241,7 @@ axis:brush.axis,
|
|
|
10243
10241
|
from,
|
|
10244
10242
|
to,
|
|
10245
10243
|
});
|
|
10244
|
+
let prevented=false;
|
|
10246
10245
|
const detail=this.emit('brush',{
|
|
10247
10246
|
mode,
|
|
10248
10247
|
kind:result.kind,
|
|
@@ -10252,8 +10251,9 @@ axis:result.axis,
|
|
|
10252
10251
|
column:(result.axis==='y'||result.axis==='y2')
|
|
10253
10252
|
?((this.#bound.measure&&this.#bound.measure.col)||null)
|
|
10254
10253
|
:this.#bound.dimension.col,
|
|
10254
|
+
preventDefault(){prevented=true;},
|
|
10255
10255
|
});
|
|
10256
|
-
if(detail.defaultPrevented)return;
|
|
10256
|
+
if(prevented||detail.defaultPrevented)return;
|
|
10257
10257
|
if(mode==='zoom'){
|
|
10258
10258
|
if(result.range){
|
|
10259
10259
|
const key=result.axis==='y2'?'y2':(result.axis==='y'?'y':'x');
|
package/modules/charts.min.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.68.
|
|
2
|
+
* Lattice Grid 1.68.2, charts module
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -1608,12 +1608,12 @@ Object.defineProperty(__exports,"frameBatched",{enumerable:true,get:function(){r
|
|
|
1608
1608
|
Object.defineProperty(__exports,"settleDebounce",{enumerable:true,get:function(){return settleDebounce;}});
|
|
1609
1609
|
Object.defineProperty(__exports,"whenIdle",{enumerable:true,get:function(){return whenIdle;}});
|
|
1610
1610
|
Object.defineProperty(__exports,"uid",{enumerable:true,get:function(){return uid;}});
|
|
1611
|
-
const STAMPED_VERSION="1.68.
|
|
1611
|
+
const STAMPED_VERSION="1.68.2";
|
|
1612
1612
|
async function resolveVersion(){
|
|
1613
1613
|
if(STAMPED_VERSION!=='0.0.0-source')return STAMPED_VERSION;
|
|
1614
1614
|
return STAMPED_VERSION;
|
|
1615
1615
|
}
|
|
1616
|
-
const VERSION="1.68.
|
|
1616
|
+
const VERSION="1.68.2";
|
|
1617
1617
|
const warned=new Set();
|
|
1618
1618
|
const WARNED_LIMIT=2000;
|
|
1619
1619
|
function rememberWarned(key){
|
|
@@ -6394,14 +6394,12 @@ const columns=ctx.columns||[];
|
|
|
6394
6394
|
if(columns.length<2)return null;
|
|
6395
6395
|
const stats=ctx.grid&&ctx.grid.statistics;
|
|
6396
6396
|
if(!stats)return null;
|
|
6397
|
-
const
|
|
6397
|
+
const method=ctx.method==='spearman'?'spearman'
|
|
6398
|
+
:ctx.method==='kendall'?'kendall':'correlation';
|
|
6398
6399
|
const cells=[];
|
|
6399
6400
|
for(let row=0;row<columns.length;row++){
|
|
6400
6401
|
for(let col=0;col<columns.length;col++){
|
|
6401
|
-
const r=row===col
|
|
6402
|
-
?1
|
|
6403
|
-
:(spearman?stats.spearman(columns[row],columns[col])
|
|
6404
|
-
:stats.correlation(columns[row],columns[col]));
|
|
6402
|
+
const r=row===col?1:stats[method](columns[row],columns[col]);
|
|
6405
6403
|
cells.push({row,col,a:columns[row],b:columns[col],r});
|
|
6406
6404
|
}
|
|
6407
6405
|
}
|
|
@@ -10245,6 +10243,7 @@ axis:brush.axis,
|
|
|
10245
10243
|
from,
|
|
10246
10244
|
to,
|
|
10247
10245
|
});
|
|
10246
|
+
let prevented=false;
|
|
10248
10247
|
const detail=this.emit('brush',{
|
|
10249
10248
|
mode,
|
|
10250
10249
|
kind:result.kind,
|
|
@@ -10254,8 +10253,9 @@ axis:result.axis,
|
|
|
10254
10253
|
column:(result.axis==='y'||result.axis==='y2')
|
|
10255
10254
|
?((this.#bound.measure&&this.#bound.measure.col)||null)
|
|
10256
10255
|
:this.#bound.dimension.col,
|
|
10256
|
+
preventDefault(){prevented=true;},
|
|
10257
10257
|
});
|
|
10258
|
-
if(detail.defaultPrevented)return;
|
|
10258
|
+
if(prevented||detail.defaultPrevented)return;
|
|
10259
10259
|
if(mode==='zoom'){
|
|
10260
10260
|
if(result.range){
|
|
10261
10261
|
const key=result.axis==='y2'?'y2':(result.axis==='y'?'y':'x');
|
package/modules/charts.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.68.
|
|
2
|
+
* Lattice Grid 1.68.2, charts module
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -1608,12 +1608,12 @@ Object.defineProperty(__exports,"frameBatched",{enumerable:true,get:function(){r
|
|
|
1608
1608
|
Object.defineProperty(__exports,"settleDebounce",{enumerable:true,get:function(){return settleDebounce;}});
|
|
1609
1609
|
Object.defineProperty(__exports,"whenIdle",{enumerable:true,get:function(){return whenIdle;}});
|
|
1610
1610
|
Object.defineProperty(__exports,"uid",{enumerable:true,get:function(){return uid;}});
|
|
1611
|
-
const STAMPED_VERSION="1.68.
|
|
1611
|
+
const STAMPED_VERSION="1.68.2";
|
|
1612
1612
|
async function resolveVersion(){
|
|
1613
1613
|
if(STAMPED_VERSION!=='0.0.0-source')return STAMPED_VERSION;
|
|
1614
1614
|
return STAMPED_VERSION;
|
|
1615
1615
|
}
|
|
1616
|
-
const VERSION="1.68.
|
|
1616
|
+
const VERSION="1.68.2";
|
|
1617
1617
|
const warned=new Set();
|
|
1618
1618
|
const WARNED_LIMIT=2000;
|
|
1619
1619
|
function rememberWarned(key){
|
|
@@ -6394,14 +6394,12 @@ const columns=ctx.columns||[];
|
|
|
6394
6394
|
if(columns.length<2)return null;
|
|
6395
6395
|
const stats=ctx.grid&&ctx.grid.statistics;
|
|
6396
6396
|
if(!stats)return null;
|
|
6397
|
-
const
|
|
6397
|
+
const method=ctx.method==='spearman'?'spearman'
|
|
6398
|
+
:ctx.method==='kendall'?'kendall':'correlation';
|
|
6398
6399
|
const cells=[];
|
|
6399
6400
|
for(let row=0;row<columns.length;row++){
|
|
6400
6401
|
for(let col=0;col<columns.length;col++){
|
|
6401
|
-
const r=row===col
|
|
6402
|
-
?1
|
|
6403
|
-
:(spearman?stats.spearman(columns[row],columns[col])
|
|
6404
|
-
:stats.correlation(columns[row],columns[col]));
|
|
6402
|
+
const r=row===col?1:stats[method](columns[row],columns[col]);
|
|
6405
6403
|
cells.push({row,col,a:columns[row],b:columns[col],r});
|
|
6406
6404
|
}
|
|
6407
6405
|
}
|
|
@@ -10245,6 +10243,7 @@ axis:brush.axis,
|
|
|
10245
10243
|
from,
|
|
10246
10244
|
to,
|
|
10247
10245
|
});
|
|
10246
|
+
let prevented=false;
|
|
10248
10247
|
const detail=this.emit('brush',{
|
|
10249
10248
|
mode,
|
|
10250
10249
|
kind:result.kind,
|
|
@@ -10254,8 +10253,9 @@ axis:result.axis,
|
|
|
10254
10253
|
column:(result.axis==='y'||result.axis==='y2')
|
|
10255
10254
|
?((this.#bound.measure&&this.#bound.measure.col)||null)
|
|
10256
10255
|
:this.#bound.dimension.col,
|
|
10256
|
+
preventDefault(){prevented=true;},
|
|
10257
10257
|
});
|
|
10258
|
-
if(detail.defaultPrevented)return;
|
|
10258
|
+
if(prevented||detail.defaultPrevented)return;
|
|
10259
10259
|
if(mode==='zoom'){
|
|
10260
10260
|
if(result.range){
|
|
10261
10261
|
const key=result.axis==='y2'?'y2':(result.axis==='y'?'y':'x');
|
package/modules/data-router.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.68.
|
|
2
|
+
* Lattice Grid 1.68.2, data-router module type declarations
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -134,7 +134,9 @@ interface RouteOptions {
|
|
|
134
134
|
* or `{ ok: false }` (or reject, or throw) to revert the cell, `{ conflict, row }` to
|
|
135
135
|
* fire `onConflict` and take the winning row, anything else to accept; a promise is
|
|
136
136
|
* awaited with the optimistic value standing. Overrides the router-wide handler. The
|
|
137
|
-
* context's `route` is the viewer
|
|
137
|
+
* context's `route` is the viewer, and `source` is the `addSource` handle of the feed
|
|
138
|
+
* the edited row arrived on — the one to persist back to on a fan-in router — or null
|
|
139
|
+
* when the rows were loaded into the router directly.
|
|
138
140
|
*/
|
|
139
141
|
onWrite?: (change: RouterWrite, ctx: { route: unknown; source: unknown }) => unknown;
|
|
140
142
|
/**
|
|
@@ -294,6 +296,10 @@ interface RouterRouteMetrics {
|
|
|
294
296
|
* of a route reports 0, having no interval to measure.
|
|
295
297
|
*/
|
|
296
298
|
throughput: number;
|
|
299
|
+
/**
|
|
300
|
+
* Any further counter the route's own stage publishes. The four above are the ones
|
|
301
|
+
* every route reports; a stage may add to them and they arrive here.
|
|
302
|
+
*/
|
|
297
303
|
[key: string]: unknown;
|
|
298
304
|
}
|
|
299
305
|
|
|
@@ -392,6 +398,25 @@ interface RouterPersistOptions {
|
|
|
392
398
|
storeName?: string;
|
|
393
399
|
}
|
|
394
400
|
|
|
401
|
+
/**
|
|
402
|
+
* The events a data router raises.
|
|
403
|
+
*
|
|
404
|
+
* One event, and the router raises nothing else: routing itself is reported to
|
|
405
|
+
* each attached viewer through its own `rows.apply`, not through an event here.
|
|
406
|
+
* The `metrics` timer runs only while at least one `metrics` listener is
|
|
407
|
+
* registered, so collection costs nothing until someone asks for it, and stops
|
|
408
|
+
* when the last listener unsubscribes.
|
|
409
|
+
*/
|
|
410
|
+
type RouterEventName =
|
|
411
|
+
/** The metrics timer fired: a `metrics()` snapshot, every `metricsInterval` ms (default 1000; `0` disables the timer). */
|
|
412
|
+
| 'metrics';
|
|
413
|
+
|
|
414
|
+
/** What a handler receives, per router event. */
|
|
415
|
+
interface RouterEventPayloads {
|
|
416
|
+
/** The same snapshot `metrics()` returns, taken at the emit; the throughput baseline advances with it. */
|
|
417
|
+
metrics: RouterMetrics;
|
|
418
|
+
}
|
|
419
|
+
|
|
395
420
|
/**
|
|
396
421
|
* A data router: one arriving stream, partitioned by a property (or composite
|
|
397
422
|
* predicate), fanned out to a grid per partition. Each grid
|
|
@@ -441,8 +466,12 @@ interface DataRouter {
|
|
|
441
466
|
sources(): string[];
|
|
442
467
|
/** A cheap point-in-time snapshot of the router's runtime (v10); throughput is measured since the previous read. */
|
|
443
468
|
metrics(): RouterMetrics;
|
|
444
|
-
/**
|
|
445
|
-
|
|
469
|
+
/**
|
|
470
|
+
* Subscribe to the periodic `metrics` emit (v10) — the only event; the timer runs only
|
|
471
|
+
* while a listener is registered. What it carries is {@link RouterEventPayloads}.
|
|
472
|
+
* Returns the unsubscribe.
|
|
473
|
+
*/
|
|
474
|
+
on(event: RouterEventName, handler: (snapshot: RouterEventPayloads[RouterEventName]) => void): () => void;
|
|
446
475
|
/** Mount the live devtools panel into `el` (v10); it re-renders on each `metrics` emit. */
|
|
447
476
|
mountDevtools(el: unknown): RouterDevtoolsPanel;
|
|
448
477
|
/** How many records matched no route since the last `load` or `query`, running for deltas. */
|
|
@@ -582,7 +611,8 @@ interface DataRouterOptions {
|
|
|
582
611
|
* Persist an edit committed in any route attached `{ writable: true }`
|
|
583
612
|
* that names no handler of its own. Return, or resolve, falsely to revert
|
|
584
613
|
* the edit; a route with neither this nor its own handler leaves the edit
|
|
585
|
-
* in place unpersisted and warns.
|
|
614
|
+
* in place unpersisted and warns. The context's `source` is the
|
|
615
|
+
* `addSource` handle of the feed the edited row arrived on, or null.
|
|
586
616
|
*/
|
|
587
617
|
onWrite?: (change: RouterWrite, ctx: { route: unknown; source: unknown }) => unknown;
|
|
588
618
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.68.
|
|
2
|
+
* Lattice Grid 1.68.2, data-router module
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -52,12 +52,12 @@ Object.defineProperty(__exports,"frameBatched",{enumerable:true,get:function(){r
|
|
|
52
52
|
Object.defineProperty(__exports,"settleDebounce",{enumerable:true,get:function(){return settleDebounce;}});
|
|
53
53
|
Object.defineProperty(__exports,"whenIdle",{enumerable:true,get:function(){return whenIdle;}});
|
|
54
54
|
Object.defineProperty(__exports,"uid",{enumerable:true,get:function(){return uid;}});
|
|
55
|
-
const STAMPED_VERSION="1.68.
|
|
55
|
+
const STAMPED_VERSION="1.68.2";
|
|
56
56
|
async function resolveVersion(){
|
|
57
57
|
if(STAMPED_VERSION!=='0.0.0-source')return STAMPED_VERSION;
|
|
58
58
|
return STAMPED_VERSION;
|
|
59
59
|
}
|
|
60
|
-
const VERSION="1.68.
|
|
60
|
+
const VERSION="1.68.2";
|
|
61
61
|
const warned=new Set();
|
|
62
62
|
const WARNED_LIMIT=2000;
|
|
63
63
|
function rememberWarned(key){
|
|
@@ -2323,6 +2323,11 @@ return;
|
|
|
2323
2323
|
metricAdd('writeAccepted',1);
|
|
2324
2324
|
reenterWrite(obj&&obj.row?obj.row:change.row);
|
|
2325
2325
|
};
|
|
2326
|
+
const sourceOf=(key)=>{
|
|
2327
|
+
const id=String(key);
|
|
2328
|
+
for(const source of sources.values())if(source.live.has(id))return source.handle;
|
|
2329
|
+
return null;
|
|
2330
|
+
};
|
|
2326
2331
|
const onGridEdit=(route,e)=>{
|
|
2327
2332
|
if(!e||e.key===undefined||e.colId===undefined)return;
|
|
2328
2333
|
if(revertingCells.has(cellId(e.key,e.colId)))return;
|
|
@@ -2346,7 +2351,7 @@ warnOnce(
|
|
|
2346
2351
|
return;
|
|
2347
2352
|
}
|
|
2348
2353
|
let result;
|
|
2349
|
-
try{result=onWrite(change,{route:route.grid,source:
|
|
2354
|
+
try{result=onWrite(change,{route:route.grid,source:sourceOf(change.key)});}
|
|
2350
2355
|
catch{revertCell(route,change);metricAdd('writeRejected',1);return;}
|
|
2351
2356
|
if(result&&typeof result.then==='function'){
|
|
2352
2357
|
result.then(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.68.
|
|
2
|
+
* Lattice Grid 1.68.2, data-router module
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -54,12 +54,12 @@ Object.defineProperty(__exports,"frameBatched",{enumerable:true,get:function(){r
|
|
|
54
54
|
Object.defineProperty(__exports,"settleDebounce",{enumerable:true,get:function(){return settleDebounce;}});
|
|
55
55
|
Object.defineProperty(__exports,"whenIdle",{enumerable:true,get:function(){return whenIdle;}});
|
|
56
56
|
Object.defineProperty(__exports,"uid",{enumerable:true,get:function(){return uid;}});
|
|
57
|
-
const STAMPED_VERSION="1.68.
|
|
57
|
+
const STAMPED_VERSION="1.68.2";
|
|
58
58
|
async function resolveVersion(){
|
|
59
59
|
if(STAMPED_VERSION!=='0.0.0-source')return STAMPED_VERSION;
|
|
60
60
|
return STAMPED_VERSION;
|
|
61
61
|
}
|
|
62
|
-
const VERSION="1.68.
|
|
62
|
+
const VERSION="1.68.2";
|
|
63
63
|
const warned=new Set();
|
|
64
64
|
const WARNED_LIMIT=2000;
|
|
65
65
|
function rememberWarned(key){
|
|
@@ -2325,6 +2325,11 @@ return;
|
|
|
2325
2325
|
metricAdd('writeAccepted',1);
|
|
2326
2326
|
reenterWrite(obj&&obj.row?obj.row:change.row);
|
|
2327
2327
|
};
|
|
2328
|
+
const sourceOf=(key)=>{
|
|
2329
|
+
const id=String(key);
|
|
2330
|
+
for(const source of sources.values())if(source.live.has(id))return source.handle;
|
|
2331
|
+
return null;
|
|
2332
|
+
};
|
|
2328
2333
|
const onGridEdit=(route,e)=>{
|
|
2329
2334
|
if(!e||e.key===undefined||e.colId===undefined)return;
|
|
2330
2335
|
if(revertingCells.has(cellId(e.key,e.colId)))return;
|
|
@@ -2348,7 +2353,7 @@ warnOnce(
|
|
|
2348
2353
|
return;
|
|
2349
2354
|
}
|
|
2350
2355
|
let result;
|
|
2351
|
-
try{result=onWrite(change,{route:route.grid,source:
|
|
2356
|
+
try{result=onWrite(change,{route:route.grid,source:sourceOf(change.key)});}
|
|
2352
2357
|
catch{revertCell(route,change);metricAdd('writeRejected',1);return;}
|
|
2353
2358
|
if(result&&typeof result.then==='function'){
|
|
2354
2359
|
result.then(
|