@toclocoinc/lattice-grid 1.22.0 → 1.24.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 +231 -10
- package/docs/api-detail.html +56 -1
- package/lattice-grid.d.ts +399 -10
- package/lattice-grid.esm.min.js +1804 -317
- package/lattice-grid.min.cjs +1794 -317
- package/lattice-grid.min.js +1794 -317
- package/modules/charts.esm.min.js +600 -245
- package/modules/devtools.esm.min.js +2 -2
- package/modules/dhtmlx-compat.esm.min.js +4 -4
- package/modules/htmx.esm.min.js +1784 -317
- package/modules/htmx.min.cjs +1784 -317
- package/modules/htmx.min.js +1784 -317
- package/modules/react.esm.min.js +4 -4
- package/modules/svelte.esm.min.js +4 -4
- package/modules/vue.esm.min.js +4 -4
- package/modules/webcomponent.esm.min.js +1794 -317
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
dependencies, no build step required. Optional adapters for React, Vue, Svelte
|
|
5
5
|
and Web Components ship alongside it.
|
|
6
6
|
|
|
7
|
-
Version 1.
|
|
7
|
+
Version 1.24.0 · [latticegrid.dev](https://www.latticegrid.dev) · TOCLOCO Inc
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
package/docs/API.html
CHANGED
|
@@ -2764,11 +2764,16 @@ app.get('/api/orders', async (req, res) => {
|
|
|
2764
2764
|
A worked example, executed on every build so it cannot go stale
|
|
2765
2765
|
(<code>data-run</code>, PRD §7 C3):
|
|
2766
2766
|
</p>
|
|
2767
|
-
<pre data-run="js" data-expect="3" data-covers="export:capabilitiesOf export:splitFilters"><code><span class="kw">const</span> { capabilitiesOf, splitFilters } = <span class="kw">await</span> import('../packages/core/src/source/pushdown.js');
|
|
2767
|
+
<pre data-run="js" data-expect="3" data-covers="export:capabilitiesOf export:splitFilters export:resolveMutate"><code><span class="kw">const</span> { capabilitiesOf, splitFilters, resolveMutate } = <span class="kw">await</span> import('../packages/core/src/source/pushdown.js');
|
|
2768
2768
|
|
|
2769
2769
|
<span class="cmt">// An adapter that understands three comparisons and nothing else.</span>
|
|
2770
2770
|
<span class="kw">const</span> caps = capabilitiesOf({ filter: 'tree', operators: ['eq', 'gt', 'lt'] });
|
|
2771
2771
|
|
|
2772
|
+
<span class="cmt">// Read-only by declaration: an adapter that says nothing about writing</span>
|
|
2773
|
+
<span class="cmt">// cannot mutate, and one that opts in resolves to a complete capability.</span>
|
|
2774
|
+
<span class="kw">if</span> (resolveMutate() !== false) <span class="kw">throw</span> new Error('a silent adapter must stay read-only');
|
|
2775
|
+
<span class="kw">if</span> (!resolveMutate({ update: true }).update) <span class="kw">throw</span> new Error('an opt-in must resolve');
|
|
2776
|
+
|
|
2772
2777
|
<span class="cmt">// A conjunction splits: what the engine knows goes to it, the rest stays here.</span>
|
|
2773
2778
|
<span class="kw">const</span> { pushed } = splitFilters({
|
|
2774
2779
|
op: 'and',
|
|
@@ -2792,6 +2797,7 @@ app.get('/api/orders', async (req, res) => {
|
|
|
2792
2797
|
<thead><tr><th>Export</th><th>Signature</th><th>Description</th></tr></thead>
|
|
2793
2798
|
<tbody>
|
|
2794
2799
|
<tr><td class="name">capabilitiesOf</td><td class="type">(declared?) => Required<PushdownCapabilities></td><td class="desc">Resolves what an adapter declared against the defaults, giving a complete set with no absent keys to test for.</td></tr>
|
|
2800
|
+
<tr><td class="name">resolveMutate</td><td class="type">(declared?) => false | MutateCapability</td><td class="desc">Resolves an adapter's <code>mutate</code> declaration against the defaults. Returns <code>false</code> when the adapter cannot mutate, so a source over it stays read-only by declaration and refuses a write loudly rather than dropping it.</td></tr>
|
|
2795
2801
|
<tr><td class="name">splitFilters</td><td class="type">(filters, caps) => { pushed, residual }</td><td class="desc">Divides a condition tree into the half the engine takes and the half left over. A conjunction splits; a disjunction that is not fully supported stays whole on the client, because pushing part of an <code>or</code> returns fewer rows than the filter allows and the grid cannot recover what was never fetched.</td></tr>
|
|
2796
2802
|
<tr><td class="name">planQuery</td><td class="type">(request, caps) => PushdownPlan</td><td class="desc">Plans one request: the query to send, the work to finish afterwards, whether the whole result is needed, and which parts stayed behind.</td></tr>
|
|
2797
2803
|
<tr><td class="name">applyResidual</td><td class="type">(rows, residual, compute) => unknown[]</td><td class="desc">Applies whatever the engine could not, through the grid's own filter and sort kernels rather than a second implementation, so a residual predicate means exactly what the same predicate means anywhere else.</td></tr>
|
|
@@ -3183,6 +3189,7 @@ off(); <span class="cmt">// on() returns i
|
|
|
3183
3189
|
<tr><td class="name">cell:pending</td><td class="type">{ row, key, colId, value, before, id }</td><td class="desc">Applied optimistically, not yet durable. Only with <code>edit.commit</code>.</td></tr>
|
|
3184
3190
|
<tr><td class="name">cell:confirmed</td><td class="type">{ row, key, colId, value, id, superseded }</td><td class="desc">The write reached the server.</td></tr>
|
|
3185
3191
|
<tr><td class="name">cell:reverted</td><td class="type">{ row, key, colId, rejected, restored, reason, id, superseded, applied }</td><td class="desc">The write failed. <code>applied: false</code> means a newer edit owned the cell, so nothing was written back.</td></tr>
|
|
3192
|
+
<tr><td class="name">cell:conflict</td><td class="type">{ row, key, colId, value, serverRow, id }</td><td class="desc">The write succeeded but the server row had moved underneath it. Last-write-wins: <code>value</code> stands and <code>serverRow</code> carries the server's truth so the divergence is surfaced, never swallowed.</td></tr>
|
|
3186
3193
|
<tr><td class="name">cell:edit:start</td><td class="type">{ row, key, colId, column }</td><td class="desc">An edit session opened.</td></tr>
|
|
3187
3194
|
<tr><td class="name">cell:edit:end</td><td class="type">{ row, key, colId, valid, errors }</td><td class="desc">It closed: committed or cancelled.</td></tr>
|
|
3188
3195
|
<tr><td class="name">cell:clicked</td><td class="type">{ row, key, index, colId, column, value, text, event }</td><td class="desc">A cell was clicked. Announcement only: nothing is consumed, so editing and selection behave unchanged.</td></tr>
|
|
@@ -3394,6 +3401,50 @@ createGrid(el, {
|
|
|
3394
3401
|
<span class="kw">return</span> `${shown} | ${stored} | ${stable}`;</code></pre>
|
|
3395
3402
|
<div class="note"><p>The compound units need not include the stored <code>unit</code>, and any unit of the system is accepted on input: <code>71 in</code> pasted into a feet-and-inches column is still 71 inches. Excel export and <code>display: 'auto'</code> share a rule here — a column of mixed-scale text is not summable in a spreadsheet, so the export uses the raw base number on the configured unit. The <strong>compound cell editor</strong> (mid-value keystrokes, roll-over between feet and inches, caret behaviour at a boundary) is a separate, later piece; this is the read-and-paste half.</p></div>
|
|
3396
3403
|
|
|
3404
|
+
<h2 id="currency">Currency: an amount and a code</h2>
|
|
3405
|
+
<p>Currency is a real type, not a display format. Every other unit multiplies by a factor
|
|
3406
|
+
fixed at load; a currency's “factor” is an exchange rate that moves, so it never
|
|
3407
|
+
joins the unit factory. A value is an <strong>amount and a code</strong> —
|
|
3408
|
+
<code>{ amount: 10, code: 'USD' }</code> is a different value from
|
|
3409
|
+
<code>{ amount: 10, code: 'EUR' }</code>, and the code rides on every cell. The grid ships
|
|
3410
|
+
and fetches no rates: the caller supplies a rate source, and a rate that is needed but absent
|
|
3411
|
+
is surfaced <strong>loudly</strong>, never as zero. A footer refuses to add unlike currencies
|
|
3412
|
+
unless a display currency and rates reconcile every value, the same stance temperature takes
|
|
3413
|
+
for refusing a meaningless sum.</p>
|
|
3414
|
+
<pre data-run="js" data-expect="9.20|true|true" data-covers="export:createCurrencyType export:parseMoney export:formatMoney export:convertMoney export:rateFunction export:MISSING_RATE config:code config:codes config:excel config:nullDisplay config:missingRate config:rateBase config:rates"><code><span class="kw">const</span> { createCurrencyType, parseMoney, formatMoney, convertMoney, rateFunction, MISSING_RATE } =
|
|
3415
|
+
<span class="kw">await</span> import('../packages/core/src/columns/types/currency.js');
|
|
3416
|
+
|
|
3417
|
+
<span class="cmt">// The caller owns the rates; the grid ships none. A missing one is loud, never zero.</span>
|
|
3418
|
+
<span class="kw">const</span> rates = { USD: 1, EUR: 0.92 };
|
|
3419
|
+
<span class="kw">const</span> money = createCurrencyType({
|
|
3420
|
+
code: 'USD', display: 'EUR', rates, rateBase: 'USD', decimals: 2,
|
|
3421
|
+
nullDisplay: '—', missingRate: 'no rate', excel: '€#,##0.00', codes: ['USD', 'EUR'],
|
|
3422
|
+
});
|
|
3423
|
+
|
|
3424
|
+
<span class="kw">const</span> rate = rateFunction(rates, 'USD');
|
|
3425
|
+
<span class="kw">const</span> tenInEur = convertMoney(parseMoney('$10', { code: 'USD' }), 'EUR', rate);
|
|
3426
|
+
<span class="kw">const</span> loud = formatMoney({ amount: 5, code: 'XYZ' }, money.currencyConfig).startsWith('no rate');
|
|
3427
|
+
<span class="kw">const</span> marker = MISSING_RATE.length > 0;
|
|
3428
|
+
|
|
3429
|
+
<span class="kw">return</span> `${tenInEur.toFixed(2)}|${loud}|${marker}`;</code></pre>
|
|
3430
|
+
<div class="table-wrap">
|
|
3431
|
+
<table>
|
|
3432
|
+
<thead><tr><th>Option</th><th>Description</th></tr></thead>
|
|
3433
|
+
<tbody>
|
|
3434
|
+
<tr><td class="name">code</td><td class="desc">The default currency code for a bare numeric input. A number with its own symbol or code keeps <em>that</em> code.</td></tr>
|
|
3435
|
+
<tr><td class="name">display</td><td class="desc">The currency to render and total in. Omit to keep each cell in its own currency.</td></tr>
|
|
3436
|
+
<tr><td class="name">rates</td><td class="desc">The caller's rate source: a <code>(from, to) => rate | null</code> function, or a table of rates per unit of a common base.</td></tr>
|
|
3437
|
+
<tr><td class="name">rateBase</td><td class="desc">The code a rate <em>table</em> is denominated in. The cross rate is base-independent, so this documents the table's denomination for the reader.</td></tr>
|
|
3438
|
+
<tr><td class="name">missingRate</td><td class="desc">The loud marker rendered when a needed rate is absent. Defaults to <code>MISSING_RATE</code>.</td></tr>
|
|
3439
|
+
<tr><td class="name">decimals</td><td class="desc">Fixed fraction digits; omit for the currency's own convention.</td></tr>
|
|
3440
|
+
<tr><td class="name">nullDisplay</td><td class="desc">Text shown for an empty cell.</td></tr>
|
|
3441
|
+
<tr><td class="name">excel</td><td class="desc">An Excel number-format override for export.</td></tr>
|
|
3442
|
+
<tr><td class="name">codes</td><td class="desc">The code list the currency editor's picker offers.</td></tr>
|
|
3443
|
+
</tbody>
|
|
3444
|
+
</table>
|
|
3445
|
+
</div>
|
|
3446
|
+
<div class="note"><p>The stored value is always the amount and its own code. Sort, filter, group, copy and Excel export all read the underlying amount — converted to the display currency when rates allow, so <code>£5</code> and <code>$6</code> order by real value. Five ready-made types ship (<code>currency</code>, <code>usd</code>, <code>eur</code>, <code>gbp</code>, <code>jpy</code>); a mixed-currency column adds <code>display</code> and <code>rates</code> through <code>createCurrencyType</code>.</p></div>
|
|
3447
|
+
|
|
3397
3448
|
<h2 id="stat">The statistic block</h2>
|
|
3398
3449
|
<p>
|
|
3399
3450
|
<code>createStat</code> draws the tile a dashboard opens with: a label, a value, its change
|
|
@@ -3836,14 +3887,14 @@ createGrid(el, {
|
|
|
3836
3887
|
<span class="chip chip--new">luminousFlux</span><span class="chip chip--new">illuminance</span><span class="chip chip--new">substance</span>
|
|
3837
3888
|
<span class="chip chip--new">absorbedDose</span><span class="chip chip--new">equivalentDose</span><span class="chip chip--new">radioactivity</span>
|
|
3838
3889
|
<span class="chip chip--new">frequency</span>
|
|
3839
|
-
<span class="chip chip--new">luminousIntensity</span><span class="chip chip--new">doseRate</span><span class="chip chip--new">rpm</span><span class="chip chip--new">angularVelocity</span><span class="chip chip--new">ppm</span><span class="chip chip--new">ppb</span><span class="chip chip--new">basisPoints</span><span class="chip chip--new">molarity</span><span class="chip chip--new">massFlow</span><span class="chip chip--new">tonnesPerHour</span><span class="chip chip--new">viscosity</span><span class="chip chip--new">kinematicViscosity</span><span class="chip chip--new">thermalConductivity</span><span class="chip chip--new">specificHeat</span><span class="chip chip--new">celsius</span><span class="chip chip--new">fahrenheit</span><span class="chip chip--new">kelvin</span>
|
|
3890
|
+
<span class="chip chip--new">luminousIntensity</span><span class="chip chip--new">doseRate</span><span class="chip chip--new">rpm</span><span class="chip chip--new">angularVelocity</span><span class="chip chip--new">ppm</span><span class="chip chip--new">ppb</span><span class="chip chip--new">basisPoints</span><span class="chip chip--new">molarity</span><span class="chip chip--new">massFlow</span><span class="chip chip--new">tonnesPerHour</span><span class="chip chip--new">viscosity</span><span class="chip chip--new">kinematicViscosity</span><span class="chip chip--new">thermalConductivity</span><span class="chip chip--new">specificHeat</span><span class="chip chip--new">celsius</span><span class="chip chip--new">fahrenheit</span><span class="chip chip--new">kelvin</span><span class="chip chip--new">currency</span><span class="chip chip--new">usd</span><span class="chip chip--new">eur</span><span class="chip chip--new">gbp</span><span class="chip chip--new">jpy</span>
|
|
3840
3891
|
</div>
|
|
3841
3892
|
|
|
3842
3893
|
<h3>Editors</h3>
|
|
3843
3894
|
<div class="chips">
|
|
3844
3895
|
<span class="chip">text</span><span class="chip">textarea</span><span class="chip">number</span><span class="chip">date</span><span class="chip">checkbox</span><span class="chip">select</span><span class="chip">multiSelect</span>
|
|
3845
3896
|
<span class="chip">time</span><span class="chip">datetime</span><span class="chip">duration</span><span class="chip">ipaddress</span><span class="chip">password</span><span class="chip">code</span>
|
|
3846
|
-
<span class="chip">unit</span><span class="chip">temperature</span><span class="chip">radix</span><span class="chip">slider</span><span class="chip">rating</span><span class="chip">segmented</span>
|
|
3897
|
+
<span class="chip">unit</span><span class="chip">temperature</span><span class="chip">currency</span><span class="chip">radix</span><span class="chip">slider</span><span class="chip">rating</span><span class="chip">segmented</span>
|
|
3847
3898
|
<span class="chip">treeSelect</span><span class="chip">objectPicker</span><span class="chip">iconPicker</span><span class="chip">colour</span>
|
|
3848
3899
|
</div>
|
|
3849
3900
|
|
|
@@ -4322,16 +4373,16 @@ grid.destroy();
|
|
|
4322
4373
|
<p class="section-note">Each documented event is subscribed to and unsubscribed on every build. A consumer
|
|
4323
4374
|
wiring a handler to a renamed event gets silence, which is indistinguishable from an event that
|
|
4324
4375
|
has not fired yet — so the name is checked rather than left to be discovered.</p>
|
|
4325
|
-
<pre data-run="js" data-expect="
|
|
4376
|
+
<pre data-run="js" data-expect="102" data-covers="event:cell:changed event:cell:clicked event:cell:confirmed event:cell:conflict event:cell:contextmenu event:cell:dblclicked event:cell:edit:end event:cell:edit:start event:cell:pending event:cell:reverted event:clipboard:copy event:column:filter:open event:column:grouped event:column:menu:open event:column:pivoted event:column:resized event:columns:changed event:columns:tagged event:comment:added event:comment:deleted event:comment:edited event:comment:failed event:comment:indexLoaded event:comment:resolved event:comment:threadClosed event:comment:threadOpened event:comment:unresolved event:destroy event:detail:toggled event:diff:changed event:diff:swapped event:export:progress event:facet:computed event:facet:expanded event:facet:failed event:facet:filtered event:form:closed event:form:error event:form:opened event:form:saved event:formatting:changed event:group:toggled event:header:contextmenu event:highlight:changed event:history:applied event:history:changed event:licence:changed event:page:changed event:permissions:changed event:presence:failed event:presence:joined event:presence:left event:presence:lockRefused event:presence:published event:presence:updated event:presentation:captured event:presentation:changed event:presentation:ended event:presentation:scale event:presentation:spotlight event:presentation:started event:presentation:view event:range:changed event:ready event:redaction:changed event:render:done event:render:first event:row:clicked event:row:copied event:row:dblclicked event:row:edit:end event:row:edit:start event:row:moved event:row:received event:row:sent event:rows:deferred event:rows:paused event:rows:queued event:rows:resumed event:scroll event:scroll:end event:selection:changed event:size:changed event:source:error event:stream:chunk event:stream:end event:stream:evicted event:timeline:attached event:timeline:detached event:timeline:seek event:timeline:seeking event:toolpanel:focus event:tree:loadAborted event:tree:loadFailed event:tree:loaded event:tree:loading event:view:applied event:view:default event:view:removed event:view:renamed event:view:saved event:views:changed"><code><span class="kw">const</span> { createHeadlessGrid } = <span class="kw">await</span> import('../packages/core/src/index.js');
|
|
4326
4377
|
|
|
4327
4378
|
<span class="cmt">// Every documented event name, checked against the bus that would carry it.</span>
|
|
4328
4379
|
<span class="cmt">// Subscribing to a name the grid does not know is the failure this catches:</span>
|
|
4329
4380
|
<span class="cmt">// a consumer wiring a handler to a renamed event gets silence, and silence</span>
|
|
4330
4381
|
<span class="cmt">// is indistinguishable from an event that simply has not fired yet.</span>
|
|
4331
4382
|
<span class="kw">const</span> documented = [
|
|
4332
|
-
'cell:changed', 'cell:clicked', 'cell:confirmed', 'cell:
|
|
4333
|
-
'cell:
|
|
4334
|
-
'cell:reverted', 'clipboard:copy', 'column:filter:open', 'column:grouped',
|
|
4383
|
+
'cell:changed', 'cell:clicked', 'cell:confirmed', 'cell:conflict',
|
|
4384
|
+
'cell:contextmenu', 'cell:dblclicked', 'cell:edit:end', 'cell:edit:start',
|
|
4385
|
+
'cell:pending', 'cell:reverted', 'clipboard:copy', 'column:filter:open', 'column:grouped',
|
|
4335
4386
|
'column:menu:open', 'column:pivoted', 'column:resized', 'columns:changed',
|
|
4336
4387
|
'columns:tagged', 'comment:added', 'comment:deleted', 'comment:edited',
|
|
4337
4388
|
'comment:failed', 'comment:indexLoaded', 'comment:resolved', 'comment:threadClosed',
|
|
@@ -4517,6 +4568,29 @@ grid.destroy();
|
|
|
4517
4568
|
</table>
|
|
4518
4569
|
</div>
|
|
4519
4570
|
|
|
4571
|
+
<h3 id="windowed-aggregates">Windowed aggregates</h3>
|
|
4572
|
+
<p class="section-note">The primitives behind <code>grid.statistics.windowed</code>, for a host that drives a live stream itself: a sliding window over timestamped values that re-reduces on demand and stamps every figure with the window it covered. Reduce over the last <em>N</em> ticks, the last <em>N</em> minutes, or the whole session.</p>
|
|
4573
|
+
<div class="table-wrap">
|
|
4574
|
+
<table>
|
|
4575
|
+
<thead><tr><th>Name</th><th>Signature</th><th>Description</th></tr></thead>
|
|
4576
|
+
<tbody>
|
|
4577
|
+
<tr><td class="name">openWindow</td><td class="type">(opts, now?) => Window</td><td class="desc">Build a window from a spec: <code>{ kind: 'count', span }</code> for the last <em>N</em> ticks, <code>{ kind: 'time', minutes }</code> for the last <em>N</em> minutes, or <code>{ kind: 'session' }</code> for everything since it opened.</td></tr>
|
|
4578
|
+
<tr><td class="name">Window</td><td class="type">class</td><td class="desc">A sliding window. <code>push(v, t?)</code> adds a value, <code>reduce(fn)</code> returns one named aggregate stamped with the window in <code>over</code>, and <code>aggregate()</code> returns them all at once.</td></tr>
|
|
4579
|
+
<tr><td class="name">WINDOW_KINDS</td><td class="type">readonly ('count' | 'time' | 'session')[]</td><td class="desc">The three window kinds a caller may ask for.</td></tr>
|
|
4580
|
+
</tbody>
|
|
4581
|
+
</table>
|
|
4582
|
+
</div>
|
|
4583
|
+
<pre data-run="js" data-expect="avg 30 over 3; kinds count/time/session; session 10" data-covers="export:openWindow export:Window export:WINDOW_KINDS"><code>const { openWindow, Window, WINDOW_KINDS } = await import('../packages/core/src/index.js');
|
|
4584
|
+
// openWindow builds one of the three kinds; here, the last 3 ticks.
|
|
4585
|
+
const live = openWindow({ kind: 'count', span: 3 });
|
|
4586
|
+
for (const v of [10, 20, 30, 40]) live.push(v); // 10 is evicted; 20, 30, 40 remain
|
|
4587
|
+
const avg = live.reduce('avg'); // (20 + 30 + 40) / 3 = 30, stamped with the window it covers
|
|
4588
|
+
// A Window can be built directly too; a session window never evicts.
|
|
4589
|
+
const session = new Window('session');
|
|
4590
|
+
session.push(5);
|
|
4591
|
+
session.push(15);
|
|
4592
|
+
return `avg ${avg.value} over ${avg.over.size}; kinds ${WINDOW_KINDS.join('/')}; session ${session.reduce('avg').value}`;</code></pre>
|
|
4593
|
+
|
|
4520
4594
|
|
|
4521
4595
|
<!-- BEGIN GENERATED TYPE REFERENCE -->
|
|
4522
4596
|
<h2 id="type-reference">Type reference</h2>
|
|
@@ -4705,6 +4779,49 @@ grid.destroy();
|
|
|
4705
4779
|
</tbody>
|
|
4706
4780
|
</table>
|
|
4707
4781
|
</div>
|
|
4782
|
+
<h3 id="type-ChartAnnotation">ChartAnnotation</h3>
|
|
4783
|
+
<p class="section-note">One declarative annotation (BACKLOG-0000744). A reference or target line, a shaded band, or a callout. Its value is a constant `value` (or `from`/`to` for a band), or a `compute` reduction of the data it annotates — `mean`, `median`, `min`, `max`, or `p95` for a percentile — so it follows the data as the grid is filtered. Every annotation names the axis it reads, which on a dual-axis chart is what stops it being placed against the wrong scale, and is written into the accessible table as a sentence.</p>
|
|
4784
|
+
<div class="table-wrap">
|
|
4785
|
+
<table>
|
|
4786
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
4787
|
+
<tbody>
|
|
4788
|
+
<tr><td class="name">kind</td><td class="type">'line' | 'target' | 'band' | 'callout'</td><td class="desc">The default is a reference line. <small>(optional)</small></td></tr>
|
|
4789
|
+
<tr><td class="name">value</td><td class="type">number</td><td class="desc">A constant value, for a line, target or callout's measure position. <small>(optional)</small></td></tr>
|
|
4790
|
+
<tr><td class="name">compute</td><td class="type">'mean' | 'avg' | 'median' | 'min' | 'max' | string</td><td class="desc">A reduction of the annotated data instead of a constant. <small>(optional)</small></td></tr>
|
|
4791
|
+
<tr><td class="name">from</td><td class="type">number</td><td class="desc">A band's two edges, each a constant or (with `fromCompute`/`toCompute`) computed. <small>(optional)</small></td></tr>
|
|
4792
|
+
<tr><td class="name">to</td><td class="type">number</td><td class="desc"><small>(optional)</small></td></tr>
|
|
4793
|
+
<tr><td class="name">fromCompute</td><td class="type">string</td><td class="desc"><small>(optional)</small></td></tr>
|
|
4794
|
+
<tr><td class="name">toCompute</td><td class="type">string</td><td class="desc"><small>(optional)</small></td></tr>
|
|
4795
|
+
<tr><td class="name">x</td><td class="type">unknown</td><td class="desc">A vertical line's or callout's x position: a category or a number. <small>(optional)</small></td></tr>
|
|
4796
|
+
<tr><td class="name">at</td><td class="type">unknown</td><td class="desc"><small>(optional)</small></td></tr>
|
|
4797
|
+
<tr><td class="name">orient</td><td class="type">'horizontal' | 'vertical'</td><td class="desc">Force a line vertical rather than horizontal. <small>(optional)</small></td></tr>
|
|
4798
|
+
<tr><td class="name">axis</td><td class="type">'left' | 'right' | 'y2'</td><td class="desc">Which measure axis the annotation reads. <small>(optional)</small></td></tr>
|
|
4799
|
+
<tr><td class="name">series</td><td class="type">string</td><td class="desc">Restrict a `compute` to one series, by its key. <small>(optional)</small></td></tr>
|
|
4800
|
+
<tr><td class="name">label</td><td class="type">string</td><td class="desc"><small>(optional)</small></td></tr>
|
|
4801
|
+
<tr><td class="name">colour</td><td class="type">string</td><td class="desc"><small>(optional)</small></td></tr>
|
|
4802
|
+
<tr><td class="name">opacity</td><td class="type">number</td><td class="desc">A band's fill opacity; the default is 0.12. <small>(optional)</small></td></tr>
|
|
4803
|
+
<tr><td class="name">className</td><td class="type">string</td><td class="desc"><small>(optional)</small></td></tr>
|
|
4804
|
+
</tbody>
|
|
4805
|
+
</table>
|
|
4806
|
+
</div>
|
|
4807
|
+
<h3 id="type-ChartAxis">ChartAxis</h3>
|
|
4808
|
+
<p class="section-note">One axis's configuration. A bare string is the title.</p>
|
|
4809
|
+
<div class="table-wrap">
|
|
4810
|
+
<table>
|
|
4811
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
4812
|
+
<tbody>
|
|
4813
|
+
<tr><td class="name">title</td><td class="type">string</td><td class="desc"><small>(optional)</small></td></tr>
|
|
4814
|
+
<tr><td class="name">min</td><td class="type">number</td><td class="desc">Fix the axis rather than taking its extent from the data. <small>(optional)</small></td></tr>
|
|
4815
|
+
<tr><td class="name">max</td><td class="type">number</td><td class="desc"><small>(optional)</small></td></tr>
|
|
4816
|
+
<tr><td class="name">ticks</td><td class="type">number | unknown[]</td><td class="desc">A tick count, or the exact values to tick. <small>(optional)</small></td></tr>
|
|
4817
|
+
<tr><td class="name">format</td><td class="type">string | ((value: unknown) => string)</td><td class="desc">A format mask, or a function of the value. <small>(optional)</small></td></tr>
|
|
4818
|
+
<tr><td class="name">grid</td><td class="type">boolean</td><td class="desc">Draw the gridlines this axis owns. Default true for the measure axis. <small>(optional)</small></td></tr>
|
|
4819
|
+
<tr><td class="name">labels</td><td class="type">boolean</td><td class="desc">Draw the tick labels. <small>(optional)</small></td></tr>
|
|
4820
|
+
<tr><td class="name">every</td><td class="type">number</td><td class="desc">Show every nth category label, on a crowded category axis. <small>(optional)</small></td></tr>
|
|
4821
|
+
<tr><td class="name">rotate</td><td class="type">boolean | 'auto'</td><td class="desc">Force the category labels' rotation rather than deciding it. <small>(optional)</small></td></tr>
|
|
4822
|
+
</tbody>
|
|
4823
|
+
</table>
|
|
4824
|
+
</div>
|
|
4708
4825
|
<h3 id="type-ChartLabels">ChartLabels</h3>
|
|
4709
4826
|
<p class="section-note">Data labels beside each mark.</p>
|
|
4710
4827
|
<div class="table-wrap">
|
|
@@ -4754,12 +4871,14 @@ grid.destroy();
|
|
|
4754
4871
|
<tr><td class="name">scheme</td><td class="type">string | string[]</td><td class="desc">A named scheme, or an array of colours. <small>(optional)</small></td></tr>
|
|
4755
4872
|
<tr><td class="name">legend</td><td class="type">boolean | { position?: 'top' | 'bottom' | 'left' | 'right'; isolate?: boolean }</td><td class="desc"><small>(optional)</small></td></tr>
|
|
4756
4873
|
<tr><td class="name">labels</td><td class="type">boolean | ChartLabels</td><td class="desc"><small>(optional)</small></td></tr>
|
|
4757
|
-
<tr><td class="name">axis</td><td class="type">
|
|
4874
|
+
<tr><td class="name">axis</td><td class="type">{</td><td class="desc">Per-axis configuration. Each side is a title string or an object of `{ title, min, max, ticks, format, grid, labels }`. `y2` (or `right`) configures the second measure axis of a dual-axis or combo chart (BACKLOG-0000743); a dual-axis chart labels both axes by default so it cannot silently mislead. <small>(optional)</small></td></tr>
|
|
4875
|
+
<tr><td class="name">brush</td><td class="type">boolean | 'filter' | 'zoom' | 'select'</td><td class="desc">Dragging across the plot. `true` or `'filter'` writes a range condition into the grid; `'zoom'` changes only this chart's own domain; `'select'` selects the rows under the drag. The object form names which axis the drag acts on — `axis: 'y'` or `'y2'` brushes a value axis, which on a dual-axis chart must say which one it means (BACKLOG-0000743). <small>(optional)</small></td></tr>
|
|
4758
4876
|
<tr><td class="name">font</td><td class="type">object</td><td class="desc"><small>(optional)</small></td></tr>
|
|
4759
4877
|
<tr><td class="name">margin</td><td class="type">number | { top?: number; right?: number; bottom?: number; left?: number }</td><td class="desc"><small>(optional)</small></td></tr>
|
|
4760
4878
|
<tr><td class="name">fit</td><td class="type">boolean | 'line'</td><td class="desc">A least-squares line through a scatter or bubble chart, one per series. `true` draws the line and its R²; `'line'` draws the line alone. Only where the x axis is numeric: on a band scale the positions are categories in an arbitrary order, and a slope through them would be a slope through the order they happened to be listed in. <small>(optional)</small></td></tr>
|
|
4761
4879
|
<tr><td class="name">error</td><td class="type">boolean | { of?: string; confidence?: number }</td><td class="desc">Whiskers showing the uncertainty in each mark. `true` computes a confidence interval from the readings behind the mark; `of` takes a symmetric margin from another column instead. <small>(optional)</small></td></tr>
|
|
4762
|
-
<tr><td class="name">reference</td><td class="type">{ value: number; label?: string }[]</td><td class="desc"
|
|
4880
|
+
<tr><td class="name">reference</td><td class="type">{ value: number; label?: string; axis?: 'left' | 'right' }[]</td><td class="desc">Horizontal reference lines. On a dual-axis bar or line chart (see {@link ChartMeasure.axis}) a line naming `axis: 'right'` is placed on the right-hand scale, so it means what the right axis says rather than landing at the same number on the scale it does not belong to. <small>(optional)</small></td></tr>
|
|
4881
|
+
<tr><td class="name">annotations</td><td class="type">ChartAnnotation[]</td><td class="desc">The declarative annotation layer: reference and target lines, shaded bands and callouts, each naming the axis it reads and each described into the accessible table as a sentence. A value may be a constant or `compute`d from the data it annotates, so it follows the chart as the grid is filtered. <small>(optional)</small></td></tr>
|
|
4763
4882
|
<tr><td class="name">buckets</td><td class="type">number</td><td class="desc">Bins for a histogram; the default is twelve. <small>(optional)</small></td></tr>
|
|
4764
4883
|
<tr><td class="name">diverging</td><td class="type">boolean</td><td class="desc">A diverging colour ramp, for heatmap and geomap. <small>(optional)</small></td></tr>
|
|
4765
4884
|
<tr><td class="name">shapes</td><td class="type">unknown</td><td class="desc">Country outlines, for a geomap drawing countries rather than continents. <small>(optional)</small></td></tr>
|
|
@@ -5289,6 +5408,24 @@ grid.destroy();
|
|
|
5289
5408
|
</tbody>
|
|
5290
5409
|
</table>
|
|
5291
5410
|
</div>
|
|
5411
|
+
<h3 id="type-CurrencyConfig">CurrencyConfig</h3>
|
|
5412
|
+
<div class="table-wrap">
|
|
5413
|
+
<table>
|
|
5414
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
5415
|
+
<tbody>
|
|
5416
|
+
<tr><td class="name">code</td><td class="type">string</td><td class="desc">The default currency code for bare numeric input, e.g. `'USD'`. <small>(optional)</small></td></tr>
|
|
5417
|
+
<tr><td class="name">display</td><td class="type">string</td><td class="desc">The currency to render and aggregate in. Omit to keep each cell's own. <small>(optional)</small></td></tr>
|
|
5418
|
+
<tr><td class="name">rates</td><td class="type">RateSource</td><td class="desc">The caller's rate source: a `(from,to)=>rate|null` fn or a rate table. <small>(optional)</small></td></tr>
|
|
5419
|
+
<tr><td class="name">rateBase</td><td class="type">string</td><td class="desc">The code a rate *table* is denominated in, when not the one mapping to 1. <small>(optional)</small></td></tr>
|
|
5420
|
+
<tr><td class="name">decimals</td><td class="type">number</td><td class="desc">Fixed fraction digits; omit for the code's own convention. <small>(optional)</small></td></tr>
|
|
5421
|
+
<tr><td class="name">locale</td><td class="type">string</td><td class="desc">The locale for number formatting. <small>(optional)</small></td></tr>
|
|
5422
|
+
<tr><td class="name">nullDisplay</td><td class="type">string</td><td class="desc">Text for a null cell. <small>(optional)</small></td></tr>
|
|
5423
|
+
<tr><td class="name">missingRate</td><td class="type">string</td><td class="desc">The loud marker rendered when a needed rate is missing. <small>(optional)</small></td></tr>
|
|
5424
|
+
<tr><td class="name">excel</td><td class="type">string</td><td class="desc">An Excel number-format override. <small>(optional)</small></td></tr>
|
|
5425
|
+
<tr><td class="name">codes</td><td class="type">string[]</td><td class="desc">The code list a currency editor's picker offers. <small>(optional)</small></td></tr>
|
|
5426
|
+
</tbody>
|
|
5427
|
+
</table>
|
|
5428
|
+
</div>
|
|
5292
5429
|
<h3 id="type-DatasetColumnDifference">DatasetColumnDifference</h3>
|
|
5293
5430
|
<div class="table-wrap">
|
|
5294
5431
|
<table>
|
|
@@ -5545,7 +5682,7 @@ grid.destroy();
|
|
|
5545
5682
|
<tr><td class="name">pasteInto</td><td class="type">(anchor: { key: string; colId: string }, text: string, extent?: { rows?: number; columns?: number }): number</td><td class="desc"></td></tr>
|
|
5546
5683
|
<tr><td class="name">pastePreview</td><td class="type">boolean</td><td class="desc">Whether a bulk paste is previewed before it commits (`edit.pastePreview`, §12). <small>(read-only)</small></td></tr>
|
|
5547
5684
|
<tr><td class="name">previewPaste</td><td class="type">(anchor: { key: string; colId: string }, text: string, extent?: { rows?: number; columns?: number }): {</td><td class="desc">Compute what a paste would change, without committing (§12). The engine behind `edit.pastePreview`: `changes` are the accepted writes with their old and new values (and whether each actually differs), `rejected` are the cells a commit would refuse, each with a reason.</td></tr>
|
|
5548
|
-
<tr><td class="name">settle</td><td class="type">(
|
|
5685
|
+
<tr><td class="name">settle</td><td class="type">(</td><td class="desc">Report the outcome of an in-flight write (§18.3; §5.1-5.2 reconcile). `reconcile` carries server truth on a successful settle: `value` is a server-authoritative value written back before `cell:confirmed` (`returning: 'row'`); `conflict.serverRow` surfaces a last-write-wins conflict via `cell:conflict`. Omit both to keep the optimistic value.</td></tr>
|
|
5549
5686
|
<tr><td class="name">pending</td><td class="type">(): OpenWrite[]</td><td class="desc"></td></tr>
|
|
5550
5687
|
<tr><td class="name">status</td><td class="type">(key: string, colId: string): 'pending' | null</td><td class="desc"></td></tr>
|
|
5551
5688
|
</tbody>
|
|
@@ -5903,6 +6040,7 @@ grid.destroy();
|
|
|
5903
6040
|
<tr><td class="name">capture</td><td class="type">(opts?: CaptureOptions): Promise<Blob></td><td class="desc">An image of the grid as drawn, where the module is installed. <small>(optional)</small></td></tr>
|
|
5904
6041
|
<tr><td class="name">annotate</td><td class="type">AnnotationApi</td><td class="desc">Drawing over the grid, where the module is installed. <small>(optional)</small></td></tr>
|
|
5905
6042
|
<tr><td class="name">presentation</td><td class="type">PresentationApi</td><td class="desc">Full screen, scaling and chrome suppression. <small>(read-only)</small></td></tr>
|
|
6043
|
+
<tr><td class="name">pivotView</td><td class="type">PivotViewApi</td><td class="desc">Expand and collapse the pivot presentation's axes; the state a view carries. <small>(read-only)</small></td></tr>
|
|
5906
6044
|
<tr><td class="name">updates</td><td class="type">UpdatesApi</td><td class="desc">The live feed: pausing it, flushing it, and what it has done. <small>(read-only)</small></td></tr>
|
|
5907
6045
|
<tr><td class="name">timeline</td><td class="type">TimelineApi</td><td class="desc">Replaying the changes the grid has seen. <small>(read-only)</small></td></tr>
|
|
5908
6046
|
<tr><td class="name">crossFilter</td><td class="type">CrossFilter</td><td class="desc">Cross-filtering, a derived grid filtering the grid it derives from. <small>(read-only)</small></td></tr>
|
|
@@ -5969,6 +6107,7 @@ grid.destroy();
|
|
|
5969
6107
|
<tr><td class="name">gallery</td><td class="type">boolean | {</td><td class="desc">Present rows as a gallery of tiles (§7.12). The tiled card layout with a size-driven column count: tiles as wide as `tileWidth` allows, as many across as the container holds, laid out by the same 2-D virtualisation the grid already runs. `true` draws a tile per row generated from the columns; an object sizes them or supplies a template. Presentation only — sort, filter, group and the data pipeline are unchanged. <small>(optional)</small></td></tr>
|
|
5970
6108
|
<tr><td class="name">recordCard</td><td class="type">boolean | {</td><td class="desc">Present each row as a record card — a form of label/value pairs (§7.11). For a screen where reading one record matters more than comparing many. `true` draws a card per row generated from the columns, each column a labelled line in display order, showing the same text the table shows. An object supplies a template or sizes the card. A card list underneath, so it inherits the virtualisation and every interaction a card carries. Presentation only — sort, filter, group and the data pipeline are unchanged. <small>(optional)</small></td></tr>
|
|
5971
6109
|
<tr><td class="name">board</td><td class="type">boolean | {</td><td class="desc">Present rows as a board — a kanban of grouped lanes of cards (§7.14). The top-level group becomes a lane and every leaf under it becomes a card stacked in that lane: a pipeline by stage, a task list by status, a backlog by owner. `true` draws a card per row generated from the columns; an object sizes the lanes and cards or supplies a template. Group the grid to give the board its lanes; an ungrouped board is a single lane of every card. A card is drawn through the same code the other card presentations use, so a board card is still a row: it clicks, selects and drags through the grid's own handlers, masks protected columns, and shows the same text the table shows. Both axes are virtualised — the lanes across and the cards down each — so a board of many long lanes renders only what is on screen. Presentation only: sort, filter, group and the data pipeline are unchanged. <small>(optional)</small></td></tr>
|
|
6110
|
+
<tr><td class="name">pivotView</td><td class="type">boolean | {</td><td class="desc">Present the grid as a pivot — a cross-tab drawn as a matrix (§10, BACKLOG-0000738). The row dimensions (the grid's `group`) go down the left gutter, the column dimensions (the grid's `pivot`) go across the top, and each totalled column fills a cell with its reduction. `true` draws the matrix with the default geometry; an object sizes the cells and gutter or names the breakpoint below which it degrades to cards. **The numbers are the grid's own.** Every cell — body, subtotal, grand total — is the same aggregate kernel the totals row uses, run over the rows that feed the cell, so a pivot subtotal equals the grid's group total for that set by construction rather than being re-derived. Both axes expand and collapse, both are virtualised, and a cell click emits `pivot:drill` with the keys of the contributing rows. **Narrow-screen fallback.** A matrix cannot be read on a phone, so at or below `maxWidth` (the container width, not the viewport) the pivot degrades to a card list — the record card by default — exactly as the table does under `responsive`. Presentation only: sort, filter, group, pivot and the data pipeline are unchanged. <small>(optional)</small></td></tr>
|
|
5972
6111
|
<tr><td class="name">responsive</td><td class="type">{</td><td class="desc">Present rows as cards when the grid's container is too narrow to be a table honestly, a phone, or a narrow panel on a wide screen. Measured on the container, not the viewport, so a grid in a sidebar collapses and a grid filling a small tablet does not. Sorting, filtering and export continue to work; the tool panel is where they live when there are no column headings to click. Emits `presentation:changed`. <small>(optional)</small></td></tr>
|
|
5973
6112
|
<tr><td class="name">rowForm</td><td class="type">boolean | {</td><td class="desc"><small>(optional)</small></td></tr>
|
|
5974
6113
|
<tr><td class="name">showColumnFunctions</td><td class="type">boolean</td><td class="desc">Draw the sort, filter and menu controls in the column headings. `true` by default. `false` leaves each heading as its label alone, which is what a dense grid wants: three affordances take roughly fifty pixels, and on an eighty-pixel column that leaves the heading nothing and the label disappears entirely. Only the furniture goes. Sorting, filtering and the column menu are still reachable through the API, the keyboard and the tool panel. <small>(optional)</small></td></tr>
|
|
@@ -6065,6 +6204,7 @@ grid.destroy();
|
|
|
6065
6204
|
<tr><td class="name">sort</td><td class="type">SortEntry[]</td><td class="desc"><small>(optional)</small></td></tr>
|
|
6066
6205
|
<tr><td class="name">group</td><td class="type">string[]</td><td class="desc"><small>(optional)</small></td></tr>
|
|
6067
6206
|
<tr><td class="name">pivot</td><td class="type">{ enabled: boolean; columns: string[] }</td><td class="desc"><small>(optional)</small></td></tr>
|
|
6207
|
+
<tr><td class="name">pivotView</td><td class="type">{ rowsCollapsed: string[]; columnsCollapsed: string[] }</td><td class="desc">The pivot presentation's collapse state (§10, BACKLOG-0000738): which row-axis and column-axis nodes are collapsed. Absent when the matrix is fully expanded, and tolerated as "expand all" when applied. <small>(optional)</small></td></tr>
|
|
6068
6208
|
<tr><td class="name">formatting</td><td class="type">Record<string, FormattingRule[]></td><td class="desc"><small>(optional)</small></td></tr>
|
|
6069
6209
|
<tr><td class="name">expanded</td><td class="type">string[]</td><td class="desc"><small>(optional)</small></td></tr>
|
|
6070
6210
|
<tr><td class="name">selection</td><td class="type">string[]</td><td class="desc"><small>(optional)</small></td></tr>
|
|
@@ -6259,6 +6399,60 @@ grid.destroy();
|
|
|
6259
6399
|
</tbody>
|
|
6260
6400
|
</table>
|
|
6261
6401
|
</div>
|
|
6402
|
+
<h3 id="type-Money">Money</h3>
|
|
6403
|
+
<p class="section-note">A stored currency value: an amount in a named currency. `{amount:10,code:'USD'}` is a different value from `{amount:10,code:'EUR'}` — currency is a real type, not a display format, so the code rides on every cell.</p>
|
|
6404
|
+
<div class="table-wrap">
|
|
6405
|
+
<table>
|
|
6406
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
6407
|
+
<tbody>
|
|
6408
|
+
<tr><td class="name">amount</td><td class="type">number</td><td class="desc"></td></tr>
|
|
6409
|
+
<tr><td class="name">code</td><td class="type">string</td><td class="desc"></td></tr>
|
|
6410
|
+
</tbody>
|
|
6411
|
+
</table>
|
|
6412
|
+
</div>
|
|
6413
|
+
<h3 id="type-MutateCapability">MutateCapability</h3>
|
|
6414
|
+
<p class="section-note">What an adapter can persist back to its source — the write-back capability (§4.1), declared on `AdapterCapabilities.mutate`. `false` (the default) is read-only by declaration; a resolved block turns every kind off unless the adapter opts in.</p>
|
|
6415
|
+
<div class="table-wrap">
|
|
6416
|
+
<table>
|
|
6417
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
6418
|
+
<tbody>
|
|
6419
|
+
<tr><td class="name">append</td><td class="type">boolean</td><td class="desc">The adapter can insert new rows. Wave 1: declared, not yet bridged. <small>(optional)</small></td></tr>
|
|
6420
|
+
<tr><td class="name">update</td><td class="type">boolean</td><td class="desc">The adapter can patch existing rows. Wave 1: the wired kind (§4.3 Option A). <small>(optional)</small></td></tr>
|
|
6421
|
+
<tr><td class="name">delete</td><td class="type">boolean</td><td class="desc">The adapter can remove rows. Wave 1: declared, not yet bridged. <small>(optional)</small></td></tr>
|
|
6422
|
+
<tr><td class="name">returning</td><td class="type">'row' | 'key' | 'none'</td><td class="desc">The reconcile contract — what the server hands back after a successful mutation (§5.1). `'row'`: the authoritative row (id, computed columns, timestamps), reconciled before confirm. `'key'`: only the assigned key. `'none'` (the default): nothing — the optimistic value stands (last-write-wins). <small>(optional)</small></td></tr>
|
|
6423
|
+
</tbody>
|
|
6424
|
+
</table>
|
|
6425
|
+
</div>
|
|
6426
|
+
<h3 id="type-MutationOp">MutationOp</h3>
|
|
6427
|
+
<p class="section-note">One mutation handed to `adapter.mutate(op, request)` (§4.2). Cell-scoped `update` is the only kind wave 1 synthesises; `append`/`delete` are part of the shape so it survives into a later structural build (card 770).</p>
|
|
6428
|
+
<div class="table-wrap">
|
|
6429
|
+
<table>
|
|
6430
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
6431
|
+
<tbody>
|
|
6432
|
+
<tr><td class="name">kind</td><td class="type">'append' | 'update' | 'delete'</td><td class="desc"></td></tr>
|
|
6433
|
+
<tr><td class="name">rows</td><td class="type">unknown[]</td><td class="desc">append: the new rows (may lack a server-assigned key). <small>(optional)</small></td></tr>
|
|
6434
|
+
<tr><td class="name">key</td><td class="type">string</td><td class="desc">update: the row key. <small>(optional)</small></td></tr>
|
|
6435
|
+
<tr><td class="name">patch</td><td class="type">Record<string, unknown></td><td class="desc">update: the changed columns only, matching `PendingWrite` semantics. <small>(optional)</small></td></tr>
|
|
6436
|
+
<tr><td class="name">keys</td><td class="type">string[]</td><td class="desc">delete: the row key(s). <small>(optional)</small></td></tr>
|
|
6437
|
+
<tr><td class="name">origin</td><td class="type">string</td><td class="desc">Provenance, carried through for auth / audit. <small>(optional)</small></td></tr>
|
|
6438
|
+
<tr><td class="name">requestId</td><td class="type">string</td><td class="desc">Stable id for idempotent retry / dedupe. Reserved; retry is a non-goal in wave 1. <small>(optional)</small></td></tr>
|
|
6439
|
+
</tbody>
|
|
6440
|
+
</table>
|
|
6441
|
+
</div>
|
|
6442
|
+
<h3 id="type-MutationResult">MutationResult</h3>
|
|
6443
|
+
<p class="section-note">The result of a mutation (§4.2) — the reconcile payload. A cell-update commit flows this back through `PendingWrites`: `ok: false` reverts and surfaces `reason`; `rows` (`returning: 'row'`) reconciles server truth before confirm; `conflict` surfaces a last-write-wins divergence via `cell:conflict`.</p>
|
|
6444
|
+
<div class="table-wrap">
|
|
6445
|
+
<table>
|
|
6446
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
6447
|
+
<tbody>
|
|
6448
|
+
<tr><td class="name">ok</td><td class="type">boolean</td><td class="desc"></td></tr>
|
|
6449
|
+
<tr><td class="name">rows</td><td class="type">unknown[]</td><td class="desc">`returning: 'row'` — the authoritative row(s) to reconcile to. <small>(optional)</small></td></tr>
|
|
6450
|
+
<tr><td class="name">keys</td><td class="type">string[]</td><td class="desc">`returning: 'key'` — server-assigned key(s) for appended rows, in order. <small>(optional)</small></td></tr>
|
|
6451
|
+
<tr><td class="name">reason</td><td class="type">string</td><td class="desc">On rejection — surfaced on `cell:reverted`, never swallowed. <small>(optional)</small></td></tr>
|
|
6452
|
+
<tr><td class="name">conflict</td><td class="type">{ key: string; serverRow?: unknown }</td><td class="desc">The server's current value, for a surfaced last-write-wins conflict. <small>(optional)</small></td></tr>
|
|
6453
|
+
</tbody>
|
|
6454
|
+
</table>
|
|
6455
|
+
</div>
|
|
6262
6456
|
<h3 id="type-NumberFormat">NumberFormat</h3>
|
|
6263
6457
|
<div class="table-wrap">
|
|
6264
6458
|
<table>
|
|
@@ -6413,6 +6607,19 @@ grid.destroy();
|
|
|
6413
6607
|
</tbody>
|
|
6414
6608
|
</table>
|
|
6415
6609
|
</div>
|
|
6610
|
+
<h3 id="type-PivotViewApi">PivotViewApi</h3>
|
|
6611
|
+
<p class="section-note">Controls for the pivot presentation (§10, BACKLOG-0000738): expand or collapse an axis node, and read the collapse state a saved view carries. Every method is a no-op on a headless grid, which has no matrix to collapse.</p>
|
|
6612
|
+
<div class="table-wrap">
|
|
6613
|
+
<table>
|
|
6614
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
6615
|
+
<tbody>
|
|
6616
|
+
<tr><td class="name">expand</td><td class="type">(axis: 'row' | 'column', path: string): void</td><td class="desc">Expand a collapsed node on the row or column axis.</td></tr>
|
|
6617
|
+
<tr><td class="name">collapse</td><td class="type">(axis: 'row' | 'column', path: string): void</td><td class="desc">Collapse a node on the row or column axis, hiding its descendants.</td></tr>
|
|
6618
|
+
<tr><td class="name">toggle</td><td class="type">(axis: 'row' | 'column', path: string): void</td><td class="desc">Toggle a node's collapse on the row or column axis.</td></tr>
|
|
6619
|
+
<tr><td class="name">state</td><td class="type">(): { rowsCollapsed: string[]; columnsCollapsed: string[] }</td><td class="desc">The collapsed row-axis and column-axis paths, as a saved view carries them.</td></tr>
|
|
6620
|
+
</tbody>
|
|
6621
|
+
</table>
|
|
6622
|
+
</div>
|
|
6416
6623
|
<h3 id="type-PresenceApi">PresenceApi</h3>
|
|
6417
6624
|
<div class="table-wrap">
|
|
6418
6625
|
<table>
|
|
@@ -6536,6 +6743,7 @@ grid.destroy();
|
|
|
6536
6743
|
<tr><td class="name">name</td><td class="type">string</td><td class="desc">Used in diagnostics and in the message when work cannot be pushed. <small>(optional)</small></td></tr>
|
|
6537
6744
|
<tr><td class="name">capabilities</td><td class="type">PushdownCapabilities</td><td class="desc"><small>(optional)</small></td></tr>
|
|
6538
6745
|
<tr><td class="name">execute</td><td class="type">(query: RemoteRequest, request?: RemoteRequest):</td><td class="desc">Run the part of the query the adapter declared it could handle.</td></tr>
|
|
6746
|
+
<tr><td class="name">mutate</td><td class="type">(op: MutationOp, request?: RemoteRequest): Promise<MutationResult></td><td class="desc">Persist one mutation (§4.2). Present only when `capabilities.mutate` opts in. `createPushdownSource` synthesises an `edit.commit` that calls this for cell updates (§4.3 Option A); `request` threads the abort signal through the way `execute` receives it, and auth already lives on the adapter. <small>(optional)</small></td></tr>
|
|
6539
6747
|
</tbody>
|
|
6540
6748
|
</table>
|
|
6541
6749
|
</div>
|
|
@@ -6563,6 +6771,7 @@ grid.destroy();
|
|
|
6563
6771
|
<tr><td class="name">range</td><td class="type">boolean</td><td class="desc">Whether the engine can return a window rather than the whole result. <small>(optional)</small></td></tr>
|
|
6564
6772
|
<tr><td class="name">total</td><td class="type">boolean</td><td class="desc">Whether it can report the count of matching rows. <small>(optional)</small></td></tr>
|
|
6565
6773
|
<tr><td class="name">group</td><td class="type">boolean</td><td class="desc">Whether it can group and aggregate. <small>(optional)</small></td></tr>
|
|
6774
|
+
<tr><td class="name">mutate</td><td class="type">false | MutateCapability</td><td class="desc">What the adapter can persist back — the write-back contract (§4.1). `false` (the default) is read-only by declaration. A declared block opts kinds in; `capabilitiesOf` resolves it to a full `MutateCapability` (or `false`). <small>(optional)</small></td></tr>
|
|
6566
6775
|
</tbody>
|
|
6567
6776
|
</table>
|
|
6568
6777
|
</div>
|
|
@@ -7100,6 +7309,7 @@ grid.destroy();
|
|
|
7100
7309
|
<tr><td class="name">maintenance</td><td class="type">Readonly<Record<string, 'maintained' | 'rescan'>></td><td class="desc">Which reductions can be maintained against a change, and which rescan. <small>(read-only)</small></td></tr>
|
|
7101
7310
|
<tr><td class="name">approximate</td><td class="type">Readonly<Record<string, ApproximateEntry>></td><td class="desc">The approximate tier: kernels a sketch maintains in constant time per tick, keyed by kernel name, each carrying the sketch that backs it and the error bound that sketch is verified to meet. <small>(read-only)</small></td></tr>
|
|
7102
7311
|
<tr><td class="name">maintenanceTier</td><td class="type">(fn: string): MaintenanceTier</td><td class="desc">The honest tier for one kernel across both the exact and approximate maps: its exact tier and, when one exists, the approximate alternative and bound.</td></tr>
|
|
7312
|
+
<tr><td class="name">windowed</td><td class="type">(colId: string, fn: WindowedFn, opts: {</td><td class="desc">A windowed aggregate — "the average lately" (BACKLOG-0000654) — over one column, stamped with the window it covers (`over`), so a windowed figure is never read without its window. Exact over the values inside the window. `kind: 'count'` takes the last `span` values in arrival order. `kind: 'time'` takes the values within the last `span` ms (or `minutes`) and `kind: 'session'` takes every value; both need a timestamp column, so `by` is required for them and never guessed. Returns null when the column, or the `by` column, is unknown.</td></tr>
|
|
7103
7313
|
</tbody>
|
|
7104
7314
|
</table>
|
|
7105
7315
|
</div>
|
|
@@ -7307,6 +7517,17 @@ grid.destroy();
|
|
|
7307
7517
|
</tbody>
|
|
7308
7518
|
</table>
|
|
7309
7519
|
</div>
|
|
7520
|
+
<h3 id="type-WindowedResult">WindowedResult</h3>
|
|
7521
|
+
<p class="section-note">One windowed figure and the window it covers.</p>
|
|
7522
|
+
<div class="table-wrap">
|
|
7523
|
+
<table>
|
|
7524
|
+
<thead><tr><th>Member</th><th>Type</th><th>Description</th></tr></thead>
|
|
7525
|
+
<tbody>
|
|
7526
|
+
<tr><td class="name">value</td><td class="type">number | null</td><td class="desc">The reduction, or null when the window held no usable values.</td></tr>
|
|
7527
|
+
<tr><td class="name">over</td><td class="type">WindowSpec</td><td class="desc">The window the figure was computed over — always stated.</td></tr>
|
|
7528
|
+
</tbody>
|
|
7529
|
+
</table>
|
|
7530
|
+
</div>
|
|
7310
7531
|
<h3 id="type-WindowSpec">WindowSpec</h3>
|
|
7311
7532
|
<p class="section-note">The window a windowed aggregate was computed over.</p>
|
|
7312
7533
|
<div class="table-wrap">
|