@toclocoinc/lattice-grid 1.13.1 → 1.14.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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.13.1, htmx module
2
+ * Lattice Grid 1.14.0, htmx module
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -27083,6 +27083,123 @@ return out;
27083
27083
  }
27084
27084
  return value;
27085
27085
  }
27086
+ function describeValue(value){
27087
+ if(value===null)return'null';
27088
+ if(Array.isArray(value))return`an array of ${value.length}`;
27089
+ const kind=typeof value;
27090
+ if(kind==='string')return`the string '${value.length>24?`${value.slice(0,24)}…`:value}'`;
27091
+ if(kind==='number'||kind==='boolean')return`the ${kind} ${String(value)}`;
27092
+ return`a ${kind}`;
27093
+ }
27094
+ const CONFIG_SHAPES=Object.freeze({
27095
+ allowUnsafeTemplates:'boolean',
27096
+ columnVirtualisationAbove:'number',
27097
+ groupFooter:'boolean',
27098
+ headerHeight:'number',
27099
+ licence:'string',
27100
+ locale:'string',
27101
+ maximise:'boolean',
27102
+ overscan:'number',
27103
+ quickFilterText:'string',
27104
+ sampleSize:'number',
27105
+ sharedMemory:'boolean',
27106
+ shortcuts:'boolean',
27107
+ showColumnFunctions:'boolean',
27108
+ showHeader:'boolean',
27109
+ showTotalInHeader:'boolean',
27110
+ targetSize:['default','large'],
27111
+ timeZone:'string',
27112
+ title:'string',
27113
+ totalFilteredOnly:'boolean',
27114
+ totalOnlyChangedColumns:'boolean',
27115
+ useWorker:'boolean',
27116
+ workerThreshold:'number',
27117
+ workerUrl:'string',
27118
+ });
27119
+ function isPlainObject(v){
27120
+ return v!==null&&typeof v==='object'&&!Array.isArray(v);
27121
+ }
27122
+ const CONFIG_WIDE_CHECKS=Object.freeze({
27123
+ columns:(v)=>!Array.isArray(v),
27124
+ columnGroups:(v)=>!Array.isArray(v),
27125
+ rows:(v)=>!Array.isArray(v),
27126
+ pinnedTopRows:(v)=>!Array.isArray(v),
27127
+ pinnedBottomRows:(v)=>!Array.isArray(v),
27128
+ alignedGrids:(v)=>!Array.isArray(v),
27129
+ rowKey:(v)=>typeof v!=='string'&&typeof v!=='function',
27130
+ rowHeight:(v)=>typeof v!=='number'&&typeof v!=='function',
27131
+ source:(v)=>!isPlainObject(v),
27132
+ columnDefaults:(v)=>!isPlainObject(v),
27133
+ columnPresets:(v)=>!isPlainObject(v),
27134
+ dataTypes:(v)=>!isPlainObject(v),
27135
+ components:(v)=>!isPlainObject(v),
27136
+ pipes:(v)=>!isPlainObject(v),
27137
+ totalFns:(v)=>!isPlainObject(v),
27138
+ variants:(v)=>!isPlainObject(v),
27139
+ formulaFunctions:(v)=>!isPlainObject(v),
27140
+ typeOptions:(v)=>!isPlainObject(v),
27141
+ formatting:(v)=>!isPlainObject(v),
27142
+ tree:(v)=>!isPlainObject(v),
27143
+ detail:(v)=>!isPlainObject(v),
27144
+ comments:(v)=>!isPlainObject(v),
27145
+ presence:(v)=>!isPlainObject(v),
27146
+ permissions:(v)=>!isPlainObject(v),
27147
+ state:(v)=>!isPlainObject(v),
27148
+ updates:(v)=>!isPlainObject(v),
27149
+ diff:(v)=>!isPlainObject(v),
27150
+ views:(v)=>!isPlainObject(v),
27151
+ responsive:(v)=>!isPlainObject(v),
27152
+ hostFilter:(v)=>!isPlainObject(v),
27153
+ pivot:(v)=>!isPlainObject(v),
27154
+ ai:(v)=>!isPlainObject(v),
27155
+ environment:(v)=>typeof v!=='function',
27156
+ edit:(v)=>!isPlainObject(v)&&typeof v!=='boolean',
27157
+ pagination:(v)=>!isPlainObject(v)&&typeof v!=='boolean',
27158
+ facets:(v)=>!isPlainObject(v)&&typeof v!=='boolean',
27159
+ rowForm:(v)=>!isPlainObject(v)&&typeof v!=='boolean',
27160
+ rowReorder:(v)=>!isPlainObject(v)&&typeof v!=='boolean',
27161
+ columnTagFilter:(v)=>!isPlainObject(v)&&typeof v!=='boolean',
27162
+ historyBar:(v)=>!isPlainObject(v)&&typeof v!=='boolean',
27163
+ rowTransfer:(v)=>!isPlainObject(v)&&typeof v!=='boolean',
27164
+ statusBar:(v)=>!isPlainObject(v)&&typeof v!=='boolean',
27165
+ toolPanel:(v)=>!isPlainObject(v)&&typeof v!=='boolean',
27166
+ stickyGroupHeaders:(v)=>!isPlainObject(v)&&typeof v!=='boolean'&&typeof v!=='number',
27167
+ contextMenu:(v)=>typeof v!=='boolean'&&typeof v!=='function',
27168
+ columnMenu:(v)=>typeof v!=='boolean'&&typeof v!=='function',
27169
+ fullWidth:(v)=>!isPlainObject(v)&&typeof v!=='boolean',
27170
+ highlightOnChange:(v)=>!isPlainObject(v)&&typeof v!=='boolean'&&typeof v!=='string',
27171
+ rowTemplate:(v)=>!isPlainObject(v)&&typeof v!=='string',
27172
+ cornerRadius:(v)=>typeof v!=='boolean'&&typeof v!=='number'&&typeof v!=='string',
27173
+ grandTotalRow:(v)=>v!=='bottom'&&typeof v!=='boolean',
27174
+ autoHeight:(v)=>v!=='visible'&&typeof v!=='boolean',
27175
+ gridLines:(v)=>!['both','horizontal','vertical','none','rows','columns'].includes(
27176
+ (v),
27177
+ )&&typeof v!=='boolean',
27178
+ selection:(v)=>!isPlainObject(v)
27179
+ &&v!=='single'&&v!=='multiple'&&v!=='none',
27180
+ density:(v)=>typeof v!=='number'
27181
+ &&!['compact','standard','comfortable','spacious'].includes((v)),
27182
+ theme:(v)=>typeof v!=='string',
27183
+ rowClass:(v)=>typeof v!=='string'&&typeof v!=='function'&&!Array.isArray(v),
27184
+ rowStyle:(v)=>!isPlainObject(v)&&typeof v!=='function',
27185
+ });
27186
+ const KNOWN_CONFIG_KEYS=new Set([
27187
+ 'ai','alignedGrids','allowUnsafeTemplates','autoHeight','columnDefaults',
27188
+ 'columnGroups','columnMenu','columnPresets','columnTagFilter',
27189
+ 'columnVirtualisationAbove','columns','comments','components','context',
27190
+ 'contextMenu','cornerRadius','dataTypes','density','detail','diff','edit',
27191
+ 'environment','facets','formatting','formulaFunctions','fullWidth',
27192
+ 'grandTotalRow','gridLines','groupFooter','headerHeight','highlightOnChange',
27193
+ 'historyBar','hostFilter','licence','locale','maximise','overscan','pagination',
27194
+ 'permissions','pinnedBottomRows','pinnedTopRows','pipes','pivot','presence',
27195
+ 'quickFilterText','responsive','rowClass','rowForm','rowHeight','rowKey',
27196
+ 'rowReorder','rowStyle','rowTemplate','rowTransfer','rows','sampleSize',
27197
+ 'selection','sharedMemory','shortcuts','showColumnFunctions','showHeader',
27198
+ 'showTotalInHeader','source','state','statusBar','stickyGroupHeaders',
27199
+ 'targetSize','theme','timeZone','title','toolPanel','totalFilteredOnly',
27200
+ 'totalFns','totalOnlyChangedColumns','tree','typeOptions','updates','useWorker',
27201
+ 'variants','views','workerThreshold','workerUrl',
27202
+ ]);
27086
27203
  const CONFIG_DEFAULTS=Object.freeze({
27087
27204
  locale:undefined,
27088
27205
  messages:undefined,
@@ -27180,6 +27297,45 @@ pageSize:0,
27180
27297
  #ready=false;
27181
27298
  #teardown=new Set();
27182
27299
  constructor(config={}){
27300
+ for(const key of Object.keys(config)){
27301
+ if(!KNOWN_CONFIG_KEYS.has(key)){
27302
+ warnOnce(
27303
+ `config.unknown:${key}`,
27304
+ `'${key}' is not a configuration key this grid recognises, so it had no `
27305
+ +'effect. Check the spelling against the reference.',
27306
+ );
27307
+ continue;
27308
+ }
27309
+ const shape=CONFIG_SHAPES[key];
27310
+ const value=config[key];
27311
+ if(value===undefined)continue;
27312
+ if(shape===undefined){
27313
+ const unusable=CONFIG_WIDE_CHECKS[key];
27314
+ if(unusable&&unusable(value)){
27315
+ warnOnce(
27316
+ `config.value:${key}`,
27317
+ `'${key}' was given ${describeValue(value)}, which is not one of the `
27318
+ +'shapes it accepts. Check the type against the reference.',
27319
+ );
27320
+ }
27321
+ continue;
27322
+ }
27323
+ if(Array.isArray(shape)){
27324
+ if(!shape.includes(value)){
27325
+ warnOnce(
27326
+ `config.value:${key}`,
27327
+ `'${key}' was given ${describeValue(value)}, which is not one of `
27328
+ +`${shape.map((v)=>`'${v}'`).join(', ')}. It was ignored.`,
27329
+ );
27330
+ }
27331
+ }else if(typeof value!==shape){
27332
+ warnOnce(
27333
+ `config.value:${key}`,
27334
+ `'${key}' expects a ${shape} and was given ${describeValue(value)}. `
27335
+ +'It was ignored.',
27336
+ );
27337
+ }
27338
+ }
27183
27339
  this.#config={...CONFIG_DEFAULTS,...config};
27184
27340
  this.#suppliedConfig={...config};
27185
27341
  this.#bus=new EventBus();
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.13.1, react module
2
+ * Lattice Grid 1.14.0, react module
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -25,16 +25,31 @@ Object.defineProperty(__exports,"isHandlerProp",{enumerable:true,get:function(){
25
25
  Object.defineProperty(__exports,"partition",{enumerable:true,get:function(){return partition;}});
26
26
  Object.defineProperty(__exports,"createGridController",{enumerable:true,get:function(){return createGridController;}});
27
27
  const EVENT_NAMES=Object.freeze([
28
- 'ready','destroy','render:first','model:changed','rows:changed','rows:queued',
29
- 'cell:changed','cell:clicked','cell:dblclicked','cell:contextmenu',
30
- 'cell:edit:start','cell:edit:end','row:edit:start','row:edit:end',
31
- 'row:clicked','row:dblclicked','group:toggled',
32
- 'sort:changed','filter:changed',
33
- 'column:moved','column:resized','column:visible','column:pinned',
34
- 'column:grouped','column:pivoted',
35
- 'selection:changed','range:changed',
36
- 'page:changed','scroll','scroll:end','size:changed',
37
- 'state:changed','stream:chunk','stream:end','source:error',
28
+ 'ready','destroy','render:first','render:done','config:changed','licence:changed',
29
+ 'model:changed','rows:changed','rows:queued','rows:deferred','rows:paused',
30
+ 'rows:resumed','row:received','row:sent','row:copied','row:moved','source:error',
31
+ 'stream:chunk','stream:end','stream:evicted','cell:changed','cell:pending',
32
+ 'cell:confirmed','cell:reverted','cell:clicked','cell:dblclicked','cell:contextmenu',
33
+ 'cell:edit:start','cell:edit:end','row:edit:start','row:edit:end','row:clicked',
34
+ 'row:dblclicked','form:opened','form:closed','form:saved','form:error',
35
+ 'sort:changed','filter:changed','group:toggled','facet:computed','facet:filtered',
36
+ 'facet:expanded','facet:failed','column:moved','column:resized','column:visible',
37
+ 'column:pinned','column:grouped','column:pivoted','column:filter:open',
38
+ 'column:menu:open','columns:changed','columns:tagged','header:contextmenu',
39
+ 'selection:changed','range:changed','clipboard:copy','page:changed','scroll',
40
+ 'scroll:end','size:changed','detail:toggled','toolpanel:focus','highlight:changed',
41
+ 'tree:loading','tree:loaded','tree:loadFailed','tree:loadAborted','state:changed',
42
+ 'state:reset','history:changed','history:applied','views:changed','view:applied',
43
+ 'view:saved','view:removed','view:renamed','view:default','formatting:changed',
44
+ 'redaction:changed','permissions:changed','presentation:changed',
45
+ 'presentation:started','presentation:ended','presentation:view','presentation:scale',
46
+ 'presentation:spotlight','presentation:captured','comment:added','comment:edited',
47
+ 'comment:deleted','comment:failed','comment:resolved','comment:unresolved',
48
+ 'comment:threadOpened','comment:threadClosed','comment:indexLoaded',
49
+ 'presence:published','presence:joined','presence:updated','presence:left',
50
+ 'presence:failed','presence:lockRefused','diff:changed','diff:swapped',
51
+ 'timeline:attached','timeline:detached','timeline:seek','timeline:seeking',
52
+ 'export:progress',
38
53
  ]);
39
54
  const IMPERATIVE=Object.freeze({
40
55
  sort:(grid,value)=>grid.sort.set(value||[]),
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.13.1, svelte module
2
+ * Lattice Grid 1.14.0, svelte module
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -25,16 +25,31 @@ Object.defineProperty(__exports,"isHandlerProp",{enumerable:true,get:function(){
25
25
  Object.defineProperty(__exports,"partition",{enumerable:true,get:function(){return partition;}});
26
26
  Object.defineProperty(__exports,"createGridController",{enumerable:true,get:function(){return createGridController;}});
27
27
  const EVENT_NAMES=Object.freeze([
28
- 'ready','destroy','render:first','model:changed','rows:changed','rows:queued',
29
- 'cell:changed','cell:clicked','cell:dblclicked','cell:contextmenu',
30
- 'cell:edit:start','cell:edit:end','row:edit:start','row:edit:end',
31
- 'row:clicked','row:dblclicked','group:toggled',
32
- 'sort:changed','filter:changed',
33
- 'column:moved','column:resized','column:visible','column:pinned',
34
- 'column:grouped','column:pivoted',
35
- 'selection:changed','range:changed',
36
- 'page:changed','scroll','scroll:end','size:changed',
37
- 'state:changed','stream:chunk','stream:end','source:error',
28
+ 'ready','destroy','render:first','render:done','config:changed','licence:changed',
29
+ 'model:changed','rows:changed','rows:queued','rows:deferred','rows:paused',
30
+ 'rows:resumed','row:received','row:sent','row:copied','row:moved','source:error',
31
+ 'stream:chunk','stream:end','stream:evicted','cell:changed','cell:pending',
32
+ 'cell:confirmed','cell:reverted','cell:clicked','cell:dblclicked','cell:contextmenu',
33
+ 'cell:edit:start','cell:edit:end','row:edit:start','row:edit:end','row:clicked',
34
+ 'row:dblclicked','form:opened','form:closed','form:saved','form:error',
35
+ 'sort:changed','filter:changed','group:toggled','facet:computed','facet:filtered',
36
+ 'facet:expanded','facet:failed','column:moved','column:resized','column:visible',
37
+ 'column:pinned','column:grouped','column:pivoted','column:filter:open',
38
+ 'column:menu:open','columns:changed','columns:tagged','header:contextmenu',
39
+ 'selection:changed','range:changed','clipboard:copy','page:changed','scroll',
40
+ 'scroll:end','size:changed','detail:toggled','toolpanel:focus','highlight:changed',
41
+ 'tree:loading','tree:loaded','tree:loadFailed','tree:loadAborted','state:changed',
42
+ 'state:reset','history:changed','history:applied','views:changed','view:applied',
43
+ 'view:saved','view:removed','view:renamed','view:default','formatting:changed',
44
+ 'redaction:changed','permissions:changed','presentation:changed',
45
+ 'presentation:started','presentation:ended','presentation:view','presentation:scale',
46
+ 'presentation:spotlight','presentation:captured','comment:added','comment:edited',
47
+ 'comment:deleted','comment:failed','comment:resolved','comment:unresolved',
48
+ 'comment:threadOpened','comment:threadClosed','comment:indexLoaded',
49
+ 'presence:published','presence:joined','presence:updated','presence:left',
50
+ 'presence:failed','presence:lockRefused','diff:changed','diff:swapped',
51
+ 'timeline:attached','timeline:detached','timeline:seek','timeline:seeking',
52
+ 'export:progress',
38
53
  ]);
39
54
  const IMPERATIVE=Object.freeze({
40
55
  sort:(grid,value)=>grid.sort.set(value||[]),
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.13.1, vue module
2
+ * Lattice Grid 1.14.0, vue module
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -25,16 +25,31 @@ Object.defineProperty(__exports,"isHandlerProp",{enumerable:true,get:function(){
25
25
  Object.defineProperty(__exports,"partition",{enumerable:true,get:function(){return partition;}});
26
26
  Object.defineProperty(__exports,"createGridController",{enumerable:true,get:function(){return createGridController;}});
27
27
  const EVENT_NAMES=Object.freeze([
28
- 'ready','destroy','render:first','model:changed','rows:changed','rows:queued',
29
- 'cell:changed','cell:clicked','cell:dblclicked','cell:contextmenu',
30
- 'cell:edit:start','cell:edit:end','row:edit:start','row:edit:end',
31
- 'row:clicked','row:dblclicked','group:toggled',
32
- 'sort:changed','filter:changed',
33
- 'column:moved','column:resized','column:visible','column:pinned',
34
- 'column:grouped','column:pivoted',
35
- 'selection:changed','range:changed',
36
- 'page:changed','scroll','scroll:end','size:changed',
37
- 'state:changed','stream:chunk','stream:end','source:error',
28
+ 'ready','destroy','render:first','render:done','config:changed','licence:changed',
29
+ 'model:changed','rows:changed','rows:queued','rows:deferred','rows:paused',
30
+ 'rows:resumed','row:received','row:sent','row:copied','row:moved','source:error',
31
+ 'stream:chunk','stream:end','stream:evicted','cell:changed','cell:pending',
32
+ 'cell:confirmed','cell:reverted','cell:clicked','cell:dblclicked','cell:contextmenu',
33
+ 'cell:edit:start','cell:edit:end','row:edit:start','row:edit:end','row:clicked',
34
+ 'row:dblclicked','form:opened','form:closed','form:saved','form:error',
35
+ 'sort:changed','filter:changed','group:toggled','facet:computed','facet:filtered',
36
+ 'facet:expanded','facet:failed','column:moved','column:resized','column:visible',
37
+ 'column:pinned','column:grouped','column:pivoted','column:filter:open',
38
+ 'column:menu:open','columns:changed','columns:tagged','header:contextmenu',
39
+ 'selection:changed','range:changed','clipboard:copy','page:changed','scroll',
40
+ 'scroll:end','size:changed','detail:toggled','toolpanel:focus','highlight:changed',
41
+ 'tree:loading','tree:loaded','tree:loadFailed','tree:loadAborted','state:changed',
42
+ 'state:reset','history:changed','history:applied','views:changed','view:applied',
43
+ 'view:saved','view:removed','view:renamed','view:default','formatting:changed',
44
+ 'redaction:changed','permissions:changed','presentation:changed',
45
+ 'presentation:started','presentation:ended','presentation:view','presentation:scale',
46
+ 'presentation:spotlight','presentation:captured','comment:added','comment:edited',
47
+ 'comment:deleted','comment:failed','comment:resolved','comment:unresolved',
48
+ 'comment:threadOpened','comment:threadClosed','comment:indexLoaded',
49
+ 'presence:published','presence:joined','presence:updated','presence:left',
50
+ 'presence:failed','presence:lockRefused','diff:changed','diff:swapped',
51
+ 'timeline:attached','timeline:detached','timeline:seek','timeline:seeking',
52
+ 'export:progress',
38
53
  ]);
39
54
  const IMPERATIVE=Object.freeze({
40
55
  sort:(grid,value)=>grid.sort.set(value||[]),
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.13.1, webcomponent module
2
+ * Lattice Grid 1.14.0, webcomponent module
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -27081,6 +27081,123 @@ return out;
27081
27081
  }
27082
27082
  return value;
27083
27083
  }
27084
+ function describeValue(value){
27085
+ if(value===null)return'null';
27086
+ if(Array.isArray(value))return`an array of ${value.length}`;
27087
+ const kind=typeof value;
27088
+ if(kind==='string')return`the string '${value.length>24?`${value.slice(0,24)}…`:value}'`;
27089
+ if(kind==='number'||kind==='boolean')return`the ${kind} ${String(value)}`;
27090
+ return`a ${kind}`;
27091
+ }
27092
+ const CONFIG_SHAPES=Object.freeze({
27093
+ allowUnsafeTemplates:'boolean',
27094
+ columnVirtualisationAbove:'number',
27095
+ groupFooter:'boolean',
27096
+ headerHeight:'number',
27097
+ licence:'string',
27098
+ locale:'string',
27099
+ maximise:'boolean',
27100
+ overscan:'number',
27101
+ quickFilterText:'string',
27102
+ sampleSize:'number',
27103
+ sharedMemory:'boolean',
27104
+ shortcuts:'boolean',
27105
+ showColumnFunctions:'boolean',
27106
+ showHeader:'boolean',
27107
+ showTotalInHeader:'boolean',
27108
+ targetSize:['default','large'],
27109
+ timeZone:'string',
27110
+ title:'string',
27111
+ totalFilteredOnly:'boolean',
27112
+ totalOnlyChangedColumns:'boolean',
27113
+ useWorker:'boolean',
27114
+ workerThreshold:'number',
27115
+ workerUrl:'string',
27116
+ });
27117
+ function isPlainObject(v){
27118
+ return v!==null&&typeof v==='object'&&!Array.isArray(v);
27119
+ }
27120
+ const CONFIG_WIDE_CHECKS=Object.freeze({
27121
+ columns:(v)=>!Array.isArray(v),
27122
+ columnGroups:(v)=>!Array.isArray(v),
27123
+ rows:(v)=>!Array.isArray(v),
27124
+ pinnedTopRows:(v)=>!Array.isArray(v),
27125
+ pinnedBottomRows:(v)=>!Array.isArray(v),
27126
+ alignedGrids:(v)=>!Array.isArray(v),
27127
+ rowKey:(v)=>typeof v!=='string'&&typeof v!=='function',
27128
+ rowHeight:(v)=>typeof v!=='number'&&typeof v!=='function',
27129
+ source:(v)=>!isPlainObject(v),
27130
+ columnDefaults:(v)=>!isPlainObject(v),
27131
+ columnPresets:(v)=>!isPlainObject(v),
27132
+ dataTypes:(v)=>!isPlainObject(v),
27133
+ components:(v)=>!isPlainObject(v),
27134
+ pipes:(v)=>!isPlainObject(v),
27135
+ totalFns:(v)=>!isPlainObject(v),
27136
+ variants:(v)=>!isPlainObject(v),
27137
+ formulaFunctions:(v)=>!isPlainObject(v),
27138
+ typeOptions:(v)=>!isPlainObject(v),
27139
+ formatting:(v)=>!isPlainObject(v),
27140
+ tree:(v)=>!isPlainObject(v),
27141
+ detail:(v)=>!isPlainObject(v),
27142
+ comments:(v)=>!isPlainObject(v),
27143
+ presence:(v)=>!isPlainObject(v),
27144
+ permissions:(v)=>!isPlainObject(v),
27145
+ state:(v)=>!isPlainObject(v),
27146
+ updates:(v)=>!isPlainObject(v),
27147
+ diff:(v)=>!isPlainObject(v),
27148
+ views:(v)=>!isPlainObject(v),
27149
+ responsive:(v)=>!isPlainObject(v),
27150
+ hostFilter:(v)=>!isPlainObject(v),
27151
+ pivot:(v)=>!isPlainObject(v),
27152
+ ai:(v)=>!isPlainObject(v),
27153
+ environment:(v)=>typeof v!=='function',
27154
+ edit:(v)=>!isPlainObject(v)&&typeof v!=='boolean',
27155
+ pagination:(v)=>!isPlainObject(v)&&typeof v!=='boolean',
27156
+ facets:(v)=>!isPlainObject(v)&&typeof v!=='boolean',
27157
+ rowForm:(v)=>!isPlainObject(v)&&typeof v!=='boolean',
27158
+ rowReorder:(v)=>!isPlainObject(v)&&typeof v!=='boolean',
27159
+ columnTagFilter:(v)=>!isPlainObject(v)&&typeof v!=='boolean',
27160
+ historyBar:(v)=>!isPlainObject(v)&&typeof v!=='boolean',
27161
+ rowTransfer:(v)=>!isPlainObject(v)&&typeof v!=='boolean',
27162
+ statusBar:(v)=>!isPlainObject(v)&&typeof v!=='boolean',
27163
+ toolPanel:(v)=>!isPlainObject(v)&&typeof v!=='boolean',
27164
+ stickyGroupHeaders:(v)=>!isPlainObject(v)&&typeof v!=='boolean'&&typeof v!=='number',
27165
+ contextMenu:(v)=>typeof v!=='boolean'&&typeof v!=='function',
27166
+ columnMenu:(v)=>typeof v!=='boolean'&&typeof v!=='function',
27167
+ fullWidth:(v)=>!isPlainObject(v)&&typeof v!=='boolean',
27168
+ highlightOnChange:(v)=>!isPlainObject(v)&&typeof v!=='boolean'&&typeof v!=='string',
27169
+ rowTemplate:(v)=>!isPlainObject(v)&&typeof v!=='string',
27170
+ cornerRadius:(v)=>typeof v!=='boolean'&&typeof v!=='number'&&typeof v!=='string',
27171
+ grandTotalRow:(v)=>v!=='bottom'&&typeof v!=='boolean',
27172
+ autoHeight:(v)=>v!=='visible'&&typeof v!=='boolean',
27173
+ gridLines:(v)=>!['both','horizontal','vertical','none','rows','columns'].includes(
27174
+ (v),
27175
+ )&&typeof v!=='boolean',
27176
+ selection:(v)=>!isPlainObject(v)
27177
+ &&v!=='single'&&v!=='multiple'&&v!=='none',
27178
+ density:(v)=>typeof v!=='number'
27179
+ &&!['compact','standard','comfortable','spacious'].includes((v)),
27180
+ theme:(v)=>typeof v!=='string',
27181
+ rowClass:(v)=>typeof v!=='string'&&typeof v!=='function'&&!Array.isArray(v),
27182
+ rowStyle:(v)=>!isPlainObject(v)&&typeof v!=='function',
27183
+ });
27184
+ const KNOWN_CONFIG_KEYS=new Set([
27185
+ 'ai','alignedGrids','allowUnsafeTemplates','autoHeight','columnDefaults',
27186
+ 'columnGroups','columnMenu','columnPresets','columnTagFilter',
27187
+ 'columnVirtualisationAbove','columns','comments','components','context',
27188
+ 'contextMenu','cornerRadius','dataTypes','density','detail','diff','edit',
27189
+ 'environment','facets','formatting','formulaFunctions','fullWidth',
27190
+ 'grandTotalRow','gridLines','groupFooter','headerHeight','highlightOnChange',
27191
+ 'historyBar','hostFilter','licence','locale','maximise','overscan','pagination',
27192
+ 'permissions','pinnedBottomRows','pinnedTopRows','pipes','pivot','presence',
27193
+ 'quickFilterText','responsive','rowClass','rowForm','rowHeight','rowKey',
27194
+ 'rowReorder','rowStyle','rowTemplate','rowTransfer','rows','sampleSize',
27195
+ 'selection','sharedMemory','shortcuts','showColumnFunctions','showHeader',
27196
+ 'showTotalInHeader','source','state','statusBar','stickyGroupHeaders',
27197
+ 'targetSize','theme','timeZone','title','toolPanel','totalFilteredOnly',
27198
+ 'totalFns','totalOnlyChangedColumns','tree','typeOptions','updates','useWorker',
27199
+ 'variants','views','workerThreshold','workerUrl',
27200
+ ]);
27084
27201
  const CONFIG_DEFAULTS=Object.freeze({
27085
27202
  locale:undefined,
27086
27203
  messages:undefined,
@@ -27178,6 +27295,45 @@ pageSize:0,
27178
27295
  #ready=false;
27179
27296
  #teardown=new Set();
27180
27297
  constructor(config={}){
27298
+ for(const key of Object.keys(config)){
27299
+ if(!KNOWN_CONFIG_KEYS.has(key)){
27300
+ warnOnce(
27301
+ `config.unknown:${key}`,
27302
+ `'${key}' is not a configuration key this grid recognises, so it had no `
27303
+ +'effect. Check the spelling against the reference.',
27304
+ );
27305
+ continue;
27306
+ }
27307
+ const shape=CONFIG_SHAPES[key];
27308
+ const value=config[key];
27309
+ if(value===undefined)continue;
27310
+ if(shape===undefined){
27311
+ const unusable=CONFIG_WIDE_CHECKS[key];
27312
+ if(unusable&&unusable(value)){
27313
+ warnOnce(
27314
+ `config.value:${key}`,
27315
+ `'${key}' was given ${describeValue(value)}, which is not one of the `
27316
+ +'shapes it accepts. Check the type against the reference.',
27317
+ );
27318
+ }
27319
+ continue;
27320
+ }
27321
+ if(Array.isArray(shape)){
27322
+ if(!shape.includes(value)){
27323
+ warnOnce(
27324
+ `config.value:${key}`,
27325
+ `'${key}' was given ${describeValue(value)}, which is not one of `
27326
+ +`${shape.map((v)=>`'${v}'`).join(', ')}. It was ignored.`,
27327
+ );
27328
+ }
27329
+ }else if(typeof value!==shape){
27330
+ warnOnce(
27331
+ `config.value:${key}`,
27332
+ `'${key}' expects a ${shape} and was given ${describeValue(value)}. `
27333
+ +'It was ignored.',
27334
+ );
27335
+ }
27336
+ }
27181
27337
  this.#config={...CONFIG_DEFAULTS,...config};
27182
27338
  this.#suppliedConfig={...config};
27183
27339
  this.#bus=new EventBus();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toclocoinc/lattice-grid",
3
- "version": "1.13.1",
3
+ "version": "1.14.0",
4
4
  "description": "Lattice Grid — high performance JavaScript data grid. TOCLOCO Inc.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "TOCLOCO Inc",