@toclocoinc/lattice-grid 1.13.0 → 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.
- package/README.md +1 -1
- package/docs/API.html +592 -2
- package/docs/api-detail.html +276 -2
- package/lattice-grid.d.ts +30 -7
- package/lattice-grid.esm.min.js +158 -2
- package/lattice-grid.min.cjs +158 -2
- package/lattice-grid.min.js +158 -2
- package/modules/charts.esm.min.js +1 -1
- package/modules/devtools.esm.min.js +1 -1
- package/modules/dhtmlx-compat.esm.min.js +227 -31
- package/modules/htmx.esm.min.js +158 -2
- package/modules/htmx.min.cjs +158 -2
- package/modules/htmx.min.js +158 -2
- package/modules/react.esm.min.js +26 -11
- package/modules/svelte.esm.min.js +26 -11
- package/modules/vue.esm.min.js +26 -11
- package/modules/webcomponent.esm.min.js +158 -2
- package/package.json +1 -1
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.14.0</p>
|
|
441
441
|
<nav>
|
|
442
442
|
<div class="rail__group">
|
|
443
443
|
<span class="rail__label">Start here</span>
|
|
@@ -5383,6 +5383,89 @@ grid.state.apply(savedView.state);
|
|
|
5383
5383
|
to CSV takes about 100ms.</p>
|
|
5384
5384
|
</div>
|
|
5385
5385
|
|
|
5386
|
+
<h2 id="less-common">Options and calls you may not have met</h2>
|
|
5387
|
+
<p class="lead-in">
|
|
5388
|
+
The rest of the surface, in one place. Each of these is documented in full in the
|
|
5389
|
+
<a href="API.html">reference</a>; this is here so that reading the guide end to end leaves
|
|
5390
|
+
nothing you have never heard of, which is the difference between a guide and a tour of the
|
|
5391
|
+
parts we found most interesting.
|
|
5392
|
+
</p>
|
|
5393
|
+
<h3>Configuration</h3>
|
|
5394
|
+
<div class="table-wrap">
|
|
5395
|
+
<table>
|
|
5396
|
+
<thead><tr><th>Name</th><th>What it does</th></tr></thead>
|
|
5397
|
+
<tbody>
|
|
5398
|
+
<tr><td class="name">autoHeight</td><td class="desc">autoHeight.</td></tr>
|
|
5399
|
+
<tr><td class="name">bucketFn</td><td class="desc">Replace the built-in bucketing entirely. (optional)</td></tr>
|
|
5400
|
+
<tr><td class="name">coalesceMs</td><td class="desc">(optional)</td></tr>
|
|
5401
|
+
<tr><td class="name">columnGroups</td><td class="desc">Header grouping declared separately from the columns.</td></tr>
|
|
5402
|
+
<tr><td class="name">columnPresets</td><td class="desc">Named bundles applied with preset: 'money'.</td></tr>
|
|
5403
|
+
<tr><td class="name">columnVirtualisationAbove</td><td class="desc">Column count above which columns virtualise too.</td></tr>
|
|
5404
|
+
<tr><td class="name">delimiter</td><td class="desc">(optional)</td></tr>
|
|
5405
|
+
<tr><td class="name">enterMovesDown</td><td class="desc">(optional)</td></tr>
|
|
5406
|
+
<tr><td class="name">fillHandle</td><td class="desc">(optional)</td></tr>
|
|
5407
|
+
<tr><td class="name">granularity</td><td class="desc">hour &hellip; year. Chosen from the span when omitted.</td></tr>
|
|
5408
|
+
<tr><td class="name">groupFooter</td><td class="desc">A closing total row per group.</td></tr>
|
|
5409
|
+
<tr><td class="name">groupSelectsChildren</td><td class="desc">(optional)</td></tr>
|
|
5410
|
+
<tr><td class="name">groupSelectsFiltered</td><td class="desc">(optional)</td></tr>
|
|
5411
|
+
<tr><td class="name">headerHeight</td><td class="desc">Per header row.</td></tr>
|
|
5412
|
+
<tr><td class="name">historyBar</td><td class="desc">A standalone undo/redo toolbar with a timeline.</td></tr>
|
|
5413
|
+
<tr><td class="name">hostFilter</td><td class="desc">An application-level predicate composed with the grid's own filters.</td></tr>
|
|
5414
|
+
<tr><td class="name">idleMs</td><td class="desc">Silence after which a peer is shown idle. (optional)</td></tr>
|
|
5415
|
+
<tr><td class="name">indexLimit</td><td class="desc">Cell descriptors held before the oldest are dropped. (optional)</td></tr>
|
|
5416
|
+
<tr><td class="name">lineEnding</td><td class="desc">(optional)</td></tr>
|
|
5417
|
+
<tr><td class="name">lockMs</td><td class="desc">Silence after which a peer's edit claim is disregarded. (optional)</td></tr>
|
|
5418
|
+
<tr><td class="name">maxCachedPages</td><td class="desc">(optional)</td></tr>
|
|
5419
|
+
<tr><td class="name">maxDecimals</td><td class="desc">(optional)</td></tr>
|
|
5420
|
+
<tr><td class="name">me</td><td class="desc">(read-only)</td></tr>
|
|
5421
|
+
<tr><td class="name">minDecimals</td><td class="desc">(optional)</td></tr>
|
|
5422
|
+
<tr><td class="name">overscan</td><td class="desc">Rows rendered beyond the viewport.</td></tr>
|
|
5423
|
+
<tr><td class="name">pageSizes</td><td class="desc">(optional)</td></tr>
|
|
5424
|
+
<tr><td class="name">pinnedBottomRows</td><td class="desc">As pinnedTopRows, held below the body instead. Sits under the grand total when both are shown.</td></tr>
|
|
5425
|
+
<tr><td class="name">pipes</td><td class="desc">Template pipes for cell.template.</td></tr>
|
|
5426
|
+
<tr><td class="name">processCell</td><td class="desc">(optional)</td></tr>
|
|
5427
|
+
<tr><td class="name">promoteToMemoryBelow</td><td class="desc">(optional)</td></tr>
|
|
5428
|
+
<tr><td class="name">quickFilterText</td><td class="desc">Initial quick-filter term. Equivalent to grid.filters.quick(text).</td></tr>
|
|
5429
|
+
<tr><td class="name">quote</td><td class="desc">(optional)</td></tr>
|
|
5430
|
+
<tr><td class="name">removeMs</td><td class="desc">Silence after which a peer is dropped. (optional)</td></tr>
|
|
5431
|
+
<tr><td class="name">showHeader</td><td class="desc">Draw the column headings at all. false removes the row, and removes it from the accessibility tree rather than only from view. Distinct from showColumnFunctions, which keeps the headings and drops only their sort, filter and menu controls.</td></tr>
|
|
5432
|
+
<tr><td class="name">throttleMs</td><td class="desc">Milliseconds between published updates. Throttled, not debounced. (optional)</td></tr>
|
|
5433
|
+
<tr><td class="name">totalFns</td><td class="desc">Custom aggregations, addressable from column.total.</td></tr>
|
|
5434
|
+
<tr><td class="name">undoDepth</td><td class="desc">(optional)</td></tr>
|
|
5435
|
+
</tbody>
|
|
5436
|
+
</table>
|
|
5437
|
+
</div>
|
|
5438
|
+
<h3>Factories and registration</h3>
|
|
5439
|
+
<div class="table-wrap">
|
|
5440
|
+
<table>
|
|
5441
|
+
<thead><tr><th>Name</th><th>What it does</th></tr></thead>
|
|
5442
|
+
<tbody>
|
|
5443
|
+
<tr><td class="name">createChart</td><td class="desc">Draw one of the thirty-seven chart types from a grid’s own data. It follows the grid’s filters, and a mark can filter the grid back.</td></tr>
|
|
5444
|
+
<tr><td class="name">createDevtools</td><td class="desc">Mount the devtools panel against a grid, including its accessibility checks.</td></tr>
|
|
5445
|
+
<tr><td class="name">createLatticeGridElement</td><td class="desc">Build the element class without registering it, for a custom registry.</td></tr>
|
|
5446
|
+
<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>
|
|
5447
|
+
<tr><td class="name">defineLatticeGrid</td><td class="desc">Register &lt;lattice-grid&gt;, or your own tag name.</td></tr>
|
|
5448
|
+
<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>
|
|
5449
|
+
<tr><td class="name">registerModules</td><td class="desc">Install optional modules once, for every grid on the page.</td></tr>
|
|
5450
|
+
<tr><td class="name">registerScheme</td><td class="desc">Add a colour scheme, or replace one of ours under the same name.</td></tr>
|
|
5451
|
+
<tr><td class="name">restoreStateWithin</td><td class="desc">Put it back afterwards.</td></tr>
|
|
5452
|
+
</tbody>
|
|
5453
|
+
</table>
|
|
5454
|
+
</div>
|
|
5455
|
+
<h3>Grid methods</h3>
|
|
5456
|
+
<div class="table-wrap">
|
|
5457
|
+
<table>
|
|
5458
|
+
<thead><tr><th>Name</th><th>What it does</th></tr></thead>
|
|
5459
|
+
<tbody>
|
|
5460
|
+
<tr><td class="name">attachRenderer</td><td class="desc">Bind a renderer to a headless grid.</td></tr>
|
|
5461
|
+
<tr><td class="name">emit</td><td class="desc">Emit on the grid's bus, for custom components.</td></tr>
|
|
5462
|
+
<tr><td class="name">getPinnedRows</td><td class="desc">The objects pinned at one edge, as a copy.</td></tr>
|
|
5463
|
+
<tr><td class="name">rendererHost</td><td class="desc">The host object a renderer reads: columns, rows, callbacks. Deliberately a plain bag rather than the grid itself, so a renderer cannot reach into core internals. You need this only when writing a renderer of your own.</td></tr>
|
|
5464
|
+
<tr><td class="name">setAll</td><td class="desc">Write several in one pass. Emits one config:changed for the batch, not one per key.</td></tr>
|
|
5465
|
+
</tbody>
|
|
5466
|
+
</table>
|
|
5467
|
+
</div>
|
|
5468
|
+
|
|
5386
5469
|
<h2 id="webcomponent-guide">Web component</h2>
|
|
5387
5470
|
<p class="lead-in">
|
|
5388
5471
|
<code><lattice-grid></code> is the grid as a custom element, shipped as a self-contained
|
|
@@ -5451,7 +5534,8 @@ el.grid.sort.set([{ col: 'charge', dir: 'desc' }]);</code></pre>
|
|
|
5451
5534
|
|
|
5452
5535
|
<h2 id="events-guide">Events</h2>
|
|
5453
5536
|
<p class="lead-in">
|
|
5454
|
-
One bus,
|
|
5537
|
+
One bus, 111 events. The table below is the working set, the ones most applications
|
|
5538
|
+
actually reach for; a complete index by area follows it, and the
|
|
5455
5539
|
<a href="API.html#events">reference</a> lists them all.
|
|
5456
5540
|
</p>
|
|
5457
5541
|
<div class="table-wrap">
|
|
@@ -5473,6 +5557,196 @@ el.grid.sort.set([{ col: 'charge', dir: 'desc' }]);</code></pre>
|
|
|
5473
5557
|
</table>
|
|
5474
5558
|
</div>
|
|
5475
5559
|
|
|
5560
|
+
<h3>Every event, by area</h3>
|
|
5561
|
+
<p class="lead-in">
|
|
5562
|
+
The table above is the working set. This is the whole list, grouped by what it is about,
|
|
5563
|
+
so a question like "can I hear about a column being pinned?" is answerable by scanning
|
|
5564
|
+
rather than by reading the reference end to end.
|
|
5565
|
+
</p>
|
|
5566
|
+
<h4>Lifecycle</h4>
|
|
5567
|
+
<div class="table-wrap">
|
|
5568
|
+
<table>
|
|
5569
|
+
<thead><tr><th>Event</th><th>Fires when</th></tr></thead>
|
|
5570
|
+
<tbody>
|
|
5571
|
+
<tr><td class="name">config:changed</td><td class="desc">A configuration key changed. Emitted after the grid has rebuilt, so a listener reading the grid back sees the change rather than what it replaced.</td></tr>
|
|
5572
|
+
<tr><td class="name">destroy</td><td class="desc">grid.destroy() has run.</td></tr>
|
|
5573
|
+
<tr><td class="name">licence:changed</td><td class="desc">A key was installed, and again when verification settles.</td></tr>
|
|
5574
|
+
<tr><td class="name">ready</td><td class="desc">First layout is complete and the API is safe to drive.</td></tr>
|
|
5575
|
+
<tr><td class="name">render:done</td><td class="desc">The cells are written and stable. Anything decorating them from outside must run after this, the cell layer rewrites each cell's className wholesale and would otherwise erase it.</td></tr>
|
|
5576
|
+
<tr><td class="name">render:first</td><td class="desc">First paint, the number to measure time-to-first-row against.</td></tr>
|
|
5577
|
+
</tbody>
|
|
5578
|
+
</table>
|
|
5579
|
+
</div>
|
|
5580
|
+
<h4>Data</h4>
|
|
5581
|
+
<div class="table-wrap">
|
|
5582
|
+
<table>
|
|
5583
|
+
<thead><tr><th>Event</th><th>Fires when</th></tr></thead>
|
|
5584
|
+
<tbody>
|
|
5585
|
+
<tr><td class="name">model:changed</td><td class="desc">Columns, grouping, pivot or another structural change.</td></tr>
|
|
5586
|
+
<tr><td class="name">row:clicked</td><td class="desc">Emitted alongside the cell event, cell first.</td></tr>
|
|
5587
|
+
<tr><td class="name">row:copied</td><td class="desc">A row was duplicated.</td></tr>
|
|
5588
|
+
<tr><td class="name">row:dblclicked</td><td class="desc">A row was double-clicked. Emitted alongside the cell event, cell first.</td></tr>
|
|
5589
|
+
<tr><td class="name">row:edit:end</td><td class="desc">In row mode an invalid cell blocks the whole commit and the session stays open.</td></tr>
|
|
5590
|
+
<tr><td class="name">row:edit:start</td><td class="desc">Replaces the cell pair when edit.mode is 'row'.</td></tr>
|
|
5591
|
+
<tr><td class="name">row:moved</td><td class="desc">A row was dragged to a new position.</td></tr>
|
|
5592
|
+
<tr><td class="name">row:received</td><td class="desc">A row arrived from a source.</td></tr>
|
|
5593
|
+
<tr><td class="name">row:sent</td><td class="desc">A row was written back to a source.</td></tr>
|
|
5594
|
+
<tr><td class="name">rows:changed</td><td class="desc">The row set changed. See what a change firing promises: identified means the three arrays name the rows that moved, companion marks a duplicate announcement of a change already made with identity, and a firing with neither is a real change of unknown extent.</td></tr>
|
|
5595
|
+
<tr><td class="name">rows:deferred</td><td class="desc">Updates were held rather than applied, because an edit is in flight.</td></tr>
|
|
5596
|
+
<tr><td class="name">rows:paused</td><td class="desc">A live feed was paused; updates queue from here.</td></tr>
|
|
5597
|
+
<tr><td class="name">rows:queued</td><td class="desc">A batched change is waiting for the next frame.</td></tr>
|
|
5598
|
+
<tr><td class="name">rows:resumed</td><td class="desc">The feed resumed and the queue drained.</td></tr>
|
|
5599
|
+
<tr><td class="name">source:error</td><td class="desc">A source or block load failed.</td></tr>
|
|
5600
|
+
<tr><td class="name">stream:chunk</td><td class="desc">A streamed chunk landed.</td></tr>
|
|
5601
|
+
<tr><td class="name">stream:end</td><td class="desc">Streaming finished; promoted means it switched to in-memory.</td></tr>
|
|
5602
|
+
<tr><td class="name">stream:evicted</td><td class="desc">A streaming source dropped rows to stay within its cap.</td></tr>
|
|
5603
|
+
</tbody>
|
|
5604
|
+
</table>
|
|
5605
|
+
</div>
|
|
5606
|
+
<h4>Cells and editing</h4>
|
|
5607
|
+
<div class="table-wrap">
|
|
5608
|
+
<table>
|
|
5609
|
+
<thead><tr><th>Event</th><th>Fires when</th></tr></thead>
|
|
5610
|
+
<tbody>
|
|
5611
|
+
<tr><td class="name">cell:changed</td><td class="desc">A committed edit reached the data. undo distinguishes a rollback.</td></tr>
|
|
5612
|
+
<tr><td class="name">cell:clicked</td><td class="desc">A cell was clicked. Announcement only: nothing is consumed, so editing and selection behave unchanged.</td></tr>
|
|
5613
|
+
<tr><td class="name">cell:confirmed</td><td class="desc">The write reached the server.</td></tr>
|
|
5614
|
+
<tr><td class="name">cell:contextmenu</td><td class="desc">Right-click on a cell.</td></tr>
|
|
5615
|
+
<tr><td class="name">cell:dblclicked</td><td class="desc">A cell was double-clicked. Carries the row, column, value and text.</td></tr>
|
|
5616
|
+
<tr><td class="name">cell:edit:end</td><td class="desc">It closed: committed or cancelled.</td></tr>
|
|
5617
|
+
<tr><td class="name">cell:edit:start</td><td class="desc">An edit session opened.</td></tr>
|
|
5618
|
+
<tr><td class="name">cell:pending</td><td class="desc">Applied optimistically, not yet durable. Only with edit.commit.</td></tr>
|
|
5619
|
+
<tr><td class="name">cell:reverted</td><td class="desc">The write failed. applied: false means a newer edit owned the cell, so nothing was written back.</td></tr>
|
|
5620
|
+
<tr><td class="name">form:closed</td><td class="desc">The row form closed without saving.</td></tr>
|
|
5621
|
+
<tr><td class="name">form:error</td><td class="desc">A commit from the form failed validation or was rejected.</td></tr>
|
|
5622
|
+
<tr><td class="name">form:opened</td><td class="desc">The row form opened.</td></tr>
|
|
5623
|
+
<tr><td class="name">form:saved</td><td class="desc">The row form committed.</td></tr>
|
|
5624
|
+
</tbody>
|
|
5625
|
+
</table>
|
|
5626
|
+
</div>
|
|
5627
|
+
<h4>Columns</h4>
|
|
5628
|
+
<div class="table-wrap">
|
|
5629
|
+
<table>
|
|
5630
|
+
<thead><tr><th>Event</th><th>Fires when</th></tr></thead>
|
|
5631
|
+
<tbody>
|
|
5632
|
+
<tr><td class="name">column:filter:open</td><td class="desc">Header filter popup opened.</td></tr>
|
|
5633
|
+
<tr><td class="name">column:grouped</td><td class="desc">The row-group column list changed.</td></tr>
|
|
5634
|
+
<tr><td class="name">column:menu:open</td><td class="desc">Header menu opened.</td></tr>
|
|
5635
|
+
<tr><td class="name">column:moved</td><td class="desc">Reordered by drag or by API.</td></tr>
|
|
5636
|
+
<tr><td class="name">column:pinned</td><td class="desc">side is 'start', 'end' or null.</td></tr>
|
|
5637
|
+
<tr><td class="name">column:pivoted</td><td class="desc">The pivot configuration changed.</td></tr>
|
|
5638
|
+
<tr><td class="name">column:resized</td><td class="desc">A column width settled after a drag or a keyboard resize.</td></tr>
|
|
5639
|
+
<tr><td class="name">column:visible</td><td class="desc">Columns shown or hidden.</td></tr>
|
|
5640
|
+
<tr><td class="name">columns:changed</td><td class="desc">The column set was replaced or reordered wholesale.</td></tr>
|
|
5641
|
+
<tr><td class="name">columns:tagged</td><td class="desc">A column's tags changed.</td></tr>
|
|
5642
|
+
</tbody>
|
|
5643
|
+
</table>
|
|
5644
|
+
</div>
|
|
5645
|
+
<h4>Query and view</h4>
|
|
5646
|
+
<div class="table-wrap">
|
|
5647
|
+
<table>
|
|
5648
|
+
<thead><tr><th>Event</th><th>Fires when</th></tr></thead>
|
|
5649
|
+
<tbody>
|
|
5650
|
+
<tr><td class="name">facet:computed</td><td class="desc">A header histogram finished counting. Carries the column and the buckets.</td></tr>
|
|
5651
|
+
<tr><td class="name">facet:expanded</td><td class="desc">The facet band was opened or collapsed.</td></tr>
|
|
5652
|
+
<tr><td class="name">facet:failed</td><td class="desc">A distribution could not be computed. Carries the reason.</td></tr>
|
|
5653
|
+
<tr><td class="name">facet:filtered</td><td class="desc">A bucket or a dragged range was applied as a filter.</td></tr>
|
|
5654
|
+
<tr><td class="name">filter:changed</td><td class="desc">The condition tree or the quick filter changed.</td></tr>
|
|
5655
|
+
<tr><td class="name">page:changed</td><td class="desc">Fired after the rows have moved, whether the page changed by API or by the pager control.</td></tr>
|
|
5656
|
+
<tr><td class="name">sort:changed</td><td class="desc">The full sort entry list.</td></tr>
|
|
5657
|
+
<tr><td class="name">state:changed</td><td class="desc">report lists anything a restore could not apply.</td></tr>
|
|
5658
|
+
<tr><td class="name">state:reset</td><td class="desc">The grid was returned to its baseline.</td></tr>
|
|
5659
|
+
<tr><td class="name">timeline:attached</td><td class="desc">A time brush was connected to the grid.</td></tr>
|
|
5660
|
+
<tr><td class="name">timeline:detached</td><td class="desc">The brush was removed.</td></tr>
|
|
5661
|
+
<tr><td class="name">timeline:seek</td><td class="desc">The brush settled on a range.</td></tr>
|
|
5662
|
+
<tr><td class="name">timeline:seeking</td><td class="desc">The brush is being dragged. Throttled.</td></tr>
|
|
5663
|
+
<tr><td class="name">view:applied</td><td class="desc">Emits no storage write: applying a view changes nothing to persist.</td></tr>
|
|
5664
|
+
<tr><td class="name">view:default</td><td class="desc">view is null when the default was cleared.</td></tr>
|
|
5665
|
+
<tr><td class="name">view:removed</td><td class="desc">A saved view was deleted.</td></tr>
|
|
5666
|
+
<tr><td class="name">view:renamed</td><td class="desc">A saved view was renamed.</td></tr>
|
|
5667
|
+
<tr><td class="name">view:saved</td><td class="desc">Carries the one view that moved: enough to POST a single record without diffing two lists.</td></tr>
|
|
5668
|
+
</tbody>
|
|
5669
|
+
</table>
|
|
5670
|
+
</div>
|
|
5671
|
+
<h4>Selection and interaction</h4>
|
|
5672
|
+
<div class="table-wrap">
|
|
5673
|
+
<table>
|
|
5674
|
+
<thead><tr><th>Event</th><th>Fires when</th></tr></thead>
|
|
5675
|
+
<tbody>
|
|
5676
|
+
<tr><td class="name">detail:toggled</td><td class="desc">A master-detail row opened or closed.</td></tr>
|
|
5677
|
+
<tr><td class="name">group:toggled</td><td class="desc">A group row opened or closed.</td></tr>
|
|
5678
|
+
<tr><td class="name">history:applied</td><td class="desc">An action was undone or redone. Distinct from history:changed, which also fires when a new action is pushed onto the stacks and so cannot tell you anything was reversed.</td></tr>
|
|
5679
|
+
<tr><td class="name">history:changed</td><td class="desc">Emitted after the entry is pushed, so a toolbar reading it names the right action. Repainting from sort:changed instead reads the timeline one action behind.</td></tr>
|
|
5680
|
+
<tr><td class="name">range:changed</td><td class="desc">Cell range selection changed.</td></tr>
|
|
5681
|
+
<tr><td class="name">scroll</td><td class="desc">Throttled to the frame.</td></tr>
|
|
5682
|
+
<tr><td class="name">scroll:end</td><td class="desc">Scrolling settled, the moment to trigger deferred work.</td></tr>
|
|
5683
|
+
<tr><td class="name">selection:changed</td><td class="desc">The selected rows changed. Carries the keys.</td></tr>
|
|
5684
|
+
<tr><td class="name">size:changed</td><td class="desc">The viewport resized.</td></tr>
|
|
5685
|
+
</tbody>
|
|
5686
|
+
</table>
|
|
5687
|
+
</div>
|
|
5688
|
+
<h4>Presentation and formatting</h4>
|
|
5689
|
+
<div class="table-wrap">
|
|
5690
|
+
<table>
|
|
5691
|
+
<thead><tr><th>Event</th><th>Fires when</th></tr></thead>
|
|
5692
|
+
<tbody>
|
|
5693
|
+
<tr><td class="name">formatting:changed</td><td class="desc">A conditional formatting rule was added, edited, reordered or restated.</td></tr>
|
|
5694
|
+
<tr><td class="name">highlight:changed</td><td class="desc">A highlight was added or cleared.</td></tr>
|
|
5695
|
+
<tr><td class="name">permissions:changed</td><td class="desc">The context moved and every column re-resolved.</td></tr>
|
|
5696
|
+
<tr><td class="name">presentation:captured</td><td class="desc">A PNG was taken.</td></tr>
|
|
5697
|
+
<tr><td class="name">presentation:changed</td><td class="desc">The options of a running presentation changed.</td></tr>
|
|
5698
|
+
<tr><td class="name">presentation:ended</td><td class="desc">Presentation mode ended. Annotations are cleared here.</td></tr>
|
|
5699
|
+
<tr><td class="name">presentation:scale</td><td class="desc">The presentation zoom changed.</td></tr>
|
|
5700
|
+
<tr><td class="name">presentation:spotlight</td><td class="desc">A region was spotlit or released.</td></tr>
|
|
5701
|
+
<tr><td class="name">presentation:started</td><td class="desc">Presentation mode began. Carries the scale, options, views and starting index. presentation:changed covers a later change to the same options, so a listener can tell entry from adjustment.</td></tr>
|
|
5702
|
+
<tr><td class="name">presentation:view</td><td class="desc">The presentation advanced to another saved view.</td></tr>
|
|
5703
|
+
<tr><td class="name">redaction:changed</td><td class="desc">A column was redacted or restored.</td></tr>
|
|
5704
|
+
</tbody>
|
|
5705
|
+
</table>
|
|
5706
|
+
</div>
|
|
5707
|
+
<h4>Collaboration</h4>
|
|
5708
|
+
<div class="table-wrap">
|
|
5709
|
+
<table>
|
|
5710
|
+
<thead><tr><th>Event</th><th>Fires when</th></tr></thead>
|
|
5711
|
+
<tbody>
|
|
5712
|
+
<tr><td class="name">comment:added</td><td class="desc">A comment was posted.</td></tr>
|
|
5713
|
+
<tr><td class="name">comment:deleted</td><td class="desc">A comment was removed.</td></tr>
|
|
5714
|
+
<tr><td class="name">comment:edited</td><td class="desc">A comment was changed.</td></tr>
|
|
5715
|
+
<tr><td class="name">comment:failed</td><td class="desc">A comment could not be saved. Carries the reason.</td></tr>
|
|
5716
|
+
<tr><td class="name">comment:indexLoaded</td><td class="desc">The comment index finished loading, so indicators can paint.</td></tr>
|
|
5717
|
+
<tr><td class="name">comment:resolved</td><td class="desc">A thread was marked resolved. Carries the cellKey.</td></tr>
|
|
5718
|
+
<tr><td class="name">comment:threadClosed</td><td class="desc">A thread was closed or resolved.</td></tr>
|
|
5719
|
+
<tr><td class="name">comment:threadOpened</td><td class="desc">A thread was opened in the panel.</td></tr>
|
|
5720
|
+
<tr><td class="name">comment:unresolved</td><td class="desc">A resolved thread was reopened. Carries the cellKey.</td></tr>
|
|
5721
|
+
<tr><td class="name">presence:failed</td><td class="desc">A presence transport error. Presence is lossy by design; this is informational.</td></tr>
|
|
5722
|
+
<tr><td class="name">presence:joined</td><td class="desc">A peer was seen for the first time. Carries the peer.</td></tr>
|
|
5723
|
+
<tr><td class="name">presence:left</td><td class="desc">A peer disconnected.</td></tr>
|
|
5724
|
+
<tr><td class="name">presence:lockRefused</td><td class="desc">An edit was refused because a peer holds the cell.</td></tr>
|
|
5725
|
+
<tr><td class="name">presence:published</td><td class="desc">This client's cursor or selection was broadcast.</td></tr>
|
|
5726
|
+
<tr><td class="name">presence:updated</td><td class="desc">A known peer moved or changed selection. Carries the peer.</td></tr>
|
|
5727
|
+
</tbody>
|
|
5728
|
+
</table>
|
|
5729
|
+
</div>
|
|
5730
|
+
<h4>Everything else</h4>
|
|
5731
|
+
<div class="table-wrap">
|
|
5732
|
+
<table>
|
|
5733
|
+
<thead><tr><th>Event</th><th>Fires when</th></tr></thead>
|
|
5734
|
+
<tbody>
|
|
5735
|
+
<tr><td class="name">clipboard:copy</td><td class="desc">A copy left the grid.</td></tr>
|
|
5736
|
+
<tr><td class="name">diff:changed</td><td class="desc">A snapshot was set or cleared.</td></tr>
|
|
5737
|
+
<tr><td class="name">diff:swapped</td><td class="desc">The baseline and the current rows were exchanged.</td></tr>
|
|
5738
|
+
<tr><td class="name">export:progress</td><td class="desc">Progress on a streamed export.</td></tr>
|
|
5739
|
+
<tr><td class="name">header:contextmenu</td><td class="desc">A column heading was right-clicked.</td></tr>
|
|
5740
|
+
<tr><td class="name">toolpanel:focus</td><td class="desc">The documented keyboard shortcut reached the tool panel.</td></tr>
|
|
5741
|
+
<tr><td class="name">tree:loadAborted</td><td class="desc">A child fetch was cancelled, usually because the node collapsed.</td></tr>
|
|
5742
|
+
<tr><td class="name">tree:loadFailed</td><td class="desc">A child fetch failed.</td></tr>
|
|
5743
|
+
<tr><td class="name">tree:loaded</td><td class="desc">Children arrived. Carries the key and the count.</td></tr>
|
|
5744
|
+
<tr><td class="name">tree:loading</td><td class="desc">Children are being fetched for a node.</td></tr>
|
|
5745
|
+
<tr><td class="name">views:changed</td><td class="desc">The whole list, plus what moved and why.</td></tr>
|
|
5746
|
+
</tbody>
|
|
5747
|
+
</table>
|
|
5748
|
+
</div>
|
|
5749
|
+
|
|
5476
5750
|
<h2 id="licensing">Licensing</h2>
|
|
5477
5751
|
<p class="lead-in">
|
|
5478
5752
|
<strong>There is one Lattice Grid and every copy is feature-identical.</strong> No community
|
package/lattice-grid.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.
|
|
2
|
+
* Lattice Grid 1.14.0, type declarations
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -1987,7 +1987,7 @@ export interface ColumnDistribution {
|
|
|
1987
1987
|
export type EventName =
|
|
1988
1988
|
/* Lifecycle */
|
|
1989
1989
|
| 'ready' | 'destroy' | 'render:first' | 'render:done' | 'config:changed'
|
|
1990
|
-
| 'licence:changed'
|
|
1990
|
+
| 'licence:changed'
|
|
1991
1991
|
/* Data */
|
|
1992
1992
|
| 'model:changed' | 'rows:changed' | 'rows:queued' | 'rows:deferred'
|
|
1993
1993
|
| 'rows:paused' | 'rows:resumed' | 'row:received' | 'row:sent' | 'row:copied'
|
|
@@ -2017,12 +2017,15 @@ export type EventName =
|
|
|
2017
2017
|
| 'view:renamed' | 'view:default'
|
|
2018
2018
|
/* Formatting and presentation */
|
|
2019
2019
|
| 'formatting:changed' | 'redaction:changed' | 'permissions:changed'
|
|
2020
|
-
| 'presentation:changed' | 'presentation:
|
|
2020
|
+
| 'presentation:changed' | 'presentation:started' | 'presentation:ended'
|
|
2021
|
+
| 'presentation:view'
|
|
2021
2022
|
| 'presentation:scale' | 'presentation:spotlight' | 'presentation:captured'
|
|
2022
2023
|
/* Collaboration */
|
|
2023
2024
|
| 'comment:added' | 'comment:edited' | 'comment:deleted' | 'comment:failed'
|
|
2025
|
+
| 'comment:resolved' | 'comment:unresolved'
|
|
2024
2026
|
| 'comment:threadOpened' | 'comment:threadClosed' | 'comment:indexLoaded'
|
|
2025
|
-
| 'presence:published' | 'presence:
|
|
2027
|
+
| 'presence:published' | 'presence:joined' | 'presence:updated' | 'presence:left'
|
|
2028
|
+
| 'presence:failed' | 'presence:lockRefused'
|
|
2026
2029
|
/* Comparison and time */
|
|
2027
2030
|
| 'diff:changed' | 'diff:swapped'
|
|
2028
2031
|
| 'timeline:attached' | 'timeline:detached' | 'timeline:seek' | 'timeline:seeking'
|
|
@@ -3257,7 +3260,18 @@ export const NO_CAPABILITIES: Readonly<Required<PushdownCapabilities>>;
|
|
|
3257
3260
|
* Resolve what an adapter says it can do against the defaults, giving a
|
|
3258
3261
|
* complete capability set with no absent keys to test for.
|
|
3259
3262
|
*/
|
|
3260
|
-
|
|
3263
|
+
/**
|
|
3264
|
+
* A capability set with every key present, as `capabilitiesOf` returns it.
|
|
3265
|
+
*
|
|
3266
|
+
* `operators` becomes a `Set` rather than staying an array: it is tested once
|
|
3267
|
+
* per condition per query, and membership on an array is a scan. The declared
|
|
3268
|
+
* form and the resolved form differ, which is why this is its own type.
|
|
3269
|
+
*/
|
|
3270
|
+
export type ResolvedCapabilities = Omit<Required<PushdownCapabilities>, 'operators'> & {
|
|
3271
|
+
operators: ReadonlySet<string>;
|
|
3272
|
+
};
|
|
3273
|
+
|
|
3274
|
+
export function capabilitiesOf(declared?: PushdownCapabilities): ResolvedCapabilities;
|
|
3261
3275
|
|
|
3262
3276
|
/**
|
|
3263
3277
|
* Split a filter tree into the half the engine takes and the half left over.
|
|
@@ -3271,7 +3285,7 @@ export function capabilitiesOf(declared?: PushdownCapabilities): Required<Pushdo
|
|
|
3271
3285
|
*/
|
|
3272
3286
|
export function splitFilters(
|
|
3273
3287
|
filters: object | null,
|
|
3274
|
-
caps:
|
|
3288
|
+
caps: ResolvedCapabilities,
|
|
3275
3289
|
): { pushed: object | null; residual: object | null };
|
|
3276
3290
|
|
|
3277
3291
|
/**
|
|
@@ -3286,7 +3300,7 @@ export function splitFilters(
|
|
|
3286
3300
|
*/
|
|
3287
3301
|
export function planQuery(
|
|
3288
3302
|
request: RemoteRequest,
|
|
3289
|
-
caps:
|
|
3303
|
+
caps: ResolvedCapabilities,
|
|
3290
3304
|
): PushdownPlan;
|
|
3291
3305
|
|
|
3292
3306
|
/**
|
|
@@ -3371,6 +3385,15 @@ export function dfqlAdapter(options: {
|
|
|
3371
3385
|
|
|
3372
3386
|
export function createGrid(element: HTMLElement, config?: GridConfig): Grid;
|
|
3373
3387
|
export function createHeadlessGrid(config?: GridConfig): Grid;
|
|
3388
|
+
|
|
3389
|
+
/**
|
|
3390
|
+
* The library version, e.g. `'1.13.1'`.
|
|
3391
|
+
*
|
|
3392
|
+
* The same value `grid.getVersion()` returns, available without a grid. The
|
|
3393
|
+
* method was declared and the module-level function was not, though the
|
|
3394
|
+
* reference documents both.
|
|
3395
|
+
*/
|
|
3396
|
+
export function getVersion(): string;
|
|
3374
3397
|
export function registerModules(modules: GridModule[], opts?: { licence?: string }): void;
|
|
3375
3398
|
export function setLicence(licence: string): LicenceInfo;
|
|
3376
3399
|
|
package/lattice-grid.esm.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.
|
|
2
|
+
* Lattice Grid 1.14.0, core + DOM renderer
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -1428,7 +1428,7 @@ return{valid:false,...info,reason:'product'};
|
|
|
1428
1428
|
}
|
|
1429
1429
|
if(isExpired(parsed.expires,at)){
|
|
1430
1430
|
if(warn){
|
|
1431
|
-
warnOnce('licence.expired',`licence expired on ${parsed.expires}. The grid will render with a watermark. Renew at
|
|
1431
|
+
warnOnce('licence.expired',`licence expired on ${parsed.expires}. The grid will render with a watermark. Renew at latticegrid.dev.`);
|
|
1432
1432
|
}
|
|
1433
1433
|
return{valid:false,...info,reason:'expired'};
|
|
1434
1434
|
}
|
|
@@ -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();
|