@toclocoinc/lattice-grid 1.64.0 → 1.65.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 +3 -2
- package/docs/API.html +127 -5
- package/docs/api-detail.html +39 -4
- package/lattice-grid.d.ts +241 -205
- package/lattice-grid.esm.min.js +5 -5
- package/lattice-grid.min.cjs +5 -5
- package/lattice-grid.min.js +5 -5
- package/modules/ai.d.ts +10 -13
- package/modules/ai.esm.min.js +3 -3
- package/modules/ai.min.cjs +3 -3
- package/modules/ai.min.js +3 -3
- package/modules/angular.d.ts +2 -2
- package/modules/angular.esm.min.js +433 -7
- package/modules/angular.min.cjs +433 -7
- package/modules/angular.min.js +433 -7
- package/modules/chart-alluvial.d.ts +2 -2
- package/modules/chart-alluvial.esm.min.js +1 -1
- package/modules/chart-alluvial.min.cjs +1 -1
- package/modules/chart-alluvial.min.js +1 -1
- package/modules/chart-arc.d.ts +2 -2
- package/modules/chart-arc.esm.min.js +1 -1
- package/modules/chart-arc.min.cjs +1 -1
- package/modules/chart-arc.min.js +1 -1
- package/modules/chart-bubblemap.d.ts +2 -2
- package/modules/chart-bubblemap.esm.min.js +1 -1
- package/modules/chart-bubblemap.min.cjs +1 -1
- package/modules/chart-bubblemap.min.js +1 -1
- package/modules/chart-bump.d.ts +2 -2
- package/modules/chart-bump.esm.min.js +1 -1
- package/modules/chart-bump.min.cjs +1 -1
- package/modules/chart-bump.min.js +1 -1
- package/modules/chart-calendar.d.ts +2 -2
- package/modules/chart-calendar.esm.min.js +1 -1
- package/modules/chart-calendar.min.cjs +1 -1
- package/modules/chart-calendar.min.js +1 -1
- package/modules/chart-decomposition.d.ts +2 -2
- package/modules/chart-decomposition.esm.min.js +1 -1
- package/modules/chart-decomposition.min.cjs +1 -1
- package/modules/chart-decomposition.min.js +1 -1
- package/modules/chart-diverging.d.ts +2 -2
- package/modules/chart-diverging.esm.min.js +1 -1
- package/modules/chart-diverging.min.cjs +1 -1
- package/modules/chart-diverging.min.js +1 -1
- package/modules/chart-dumbbell.d.ts +2 -2
- package/modules/chart-dumbbell.esm.min.js +1 -1
- package/modules/chart-dumbbell.min.cjs +1 -1
- package/modules/chart-dumbbell.min.js +1 -1
- package/modules/chart-fan.d.ts +2 -2
- package/modules/chart-fan.esm.min.js +1 -1
- package/modules/chart-fan.min.cjs +1 -1
- package/modules/chart-fan.min.js +1 -1
- package/modules/chart-hexbin.d.ts +2 -2
- package/modules/chart-hexbin.esm.min.js +1 -1
- package/modules/chart-hexbin.min.cjs +1 -1
- package/modules/chart-hexbin.min.js +1 -1
- package/modules/chart-hexmap.d.ts +2 -2
- package/modules/chart-hexmap.esm.min.js +1 -1
- package/modules/chart-hexmap.min.cjs +1 -1
- package/modules/chart-hexmap.min.js +1 -1
- package/modules/chart-icicle.d.ts +2 -2
- package/modules/chart-icicle.esm.min.js +1 -1
- package/modules/chart-icicle.min.cjs +1 -1
- package/modules/chart-icicle.min.js +1 -1
- package/modules/chart-markermap.d.ts +1 -1
- package/modules/chart-markermap.esm.min.js +1 -1
- package/modules/chart-markermap.min.cjs +1 -1
- package/modules/chart-markermap.min.js +1 -1
- package/modules/chart-parallel.d.ts +2 -2
- package/modules/chart-parallel.esm.min.js +1 -1
- package/modules/chart-parallel.min.cjs +1 -1
- package/modules/chart-parallel.min.js +1 -1
- package/modules/chart-ridgeline.d.ts +2 -2
- package/modules/chart-ridgeline.esm.min.js +1 -1
- package/modules/chart-ridgeline.min.cjs +1 -1
- package/modules/chart-ridgeline.min.js +1 -1
- package/modules/chart-roc.d.ts +2 -2
- package/modules/chart-roc.esm.min.js +1 -1
- package/modules/chart-roc.min.cjs +1 -1
- package/modules/chart-roc.min.js +1 -1
- package/modules/chart-slope.d.ts +2 -2
- package/modules/chart-slope.esm.min.js +1 -1
- package/modules/chart-slope.min.cjs +1 -1
- package/modules/chart-slope.min.js +1 -1
- package/modules/chart-splom.d.ts +2 -2
- package/modules/chart-splom.esm.min.js +1 -1
- package/modules/chart-splom.min.cjs +1 -1
- package/modules/chart-splom.min.js +1 -1
- package/modules/chart-waffle.d.ts +2 -2
- package/modules/chart-waffle.esm.min.js +1 -1
- package/modules/chart-waffle.min.cjs +1 -1
- package/modules/chart-waffle.min.js +1 -1
- package/modules/charts.d.ts +4 -5
- package/modules/charts.esm.min.js +3 -3
- package/modules/charts.min.cjs +3 -3
- package/modules/charts.min.js +3 -3
- package/modules/data-router.d.ts +5 -6
- package/modules/data-router.esm.min.js +3 -3
- package/modules/data-router.min.cjs +3 -3
- package/modules/data-router.min.js +3 -3
- package/modules/devtools.d.ts +1 -1
- package/modules/devtools.esm.min.js +1 -1
- package/modules/devtools.min.cjs +1 -1
- package/modules/devtools.min.js +1 -1
- package/modules/dhtmlx-compat.d.ts +1 -1
- package/modules/dhtmlx-compat.esm.min.js +3 -3
- package/modules/dhtmlx-compat.min.cjs +3 -3
- package/modules/dhtmlx-compat.min.js +3 -3
- package/modules/gantt.d.ts +37 -43
- package/modules/gantt.esm.min.js +3 -3
- package/modules/gantt.min.cjs +3 -3
- package/modules/gantt.min.js +3 -3
- package/modules/geo-europe-nuts.d.ts +2 -2
- package/modules/geo-europe-nuts.esm.min.js +1 -1
- package/modules/geo-uk.d.ts +2 -2
- package/modules/geo-uk.esm.min.js +1 -1
- package/modules/geo-us-states.d.ts +2 -2
- package/modules/geo-us-states.esm.min.js +1 -1
- package/modules/geo-world-110m.d.ts +2 -2
- package/modules/geo-world-110m.esm.min.js +1 -1
- package/modules/geo-world-50m.d.ts +2 -2
- package/modules/geo-world-50m.esm.min.js +1 -1
- package/modules/htmx.d.ts +2 -2
- package/modules/htmx.esm.min.js +5 -5
- package/modules/htmx.min.cjs +5 -5
- package/modules/htmx.min.js +5 -5
- package/modules/kanban.d.ts +14 -14
- package/modules/kanban.esm.min.js +3 -3
- package/modules/kanban.min.cjs +3 -3
- package/modules/kanban.min.js +3 -3
- package/modules/kpi.d.ts +5 -5
- package/modules/kpi.esm.min.js +3 -3
- package/modules/kpi.min.cjs +3 -3
- package/modules/kpi.min.js +3 -3
- package/modules/layout.d.ts +2 -2
- package/modules/layout.esm.min.js +3 -3
- package/modules/layout.min.cjs +3 -3
- package/modules/layout.min.js +3 -3
- package/modules/mock-socket.d.ts +1 -1
- package/modules/mock-socket.esm.min.js +1 -1
- package/modules/mock-socket.min.cjs +1 -1
- package/modules/mock-socket.min.js +1 -1
- package/modules/react.d.ts +4 -5
- package/modules/react.esm.min.js +3 -3
- package/modules/react.min.cjs +3 -3
- package/modules/react.min.js +3 -3
- package/modules/svelte.d.ts +2 -3
- package/modules/svelte.esm.min.js +1 -1
- package/modules/svelte.min.cjs +1 -1
- package/modules/svelte.min.js +1 -1
- package/modules/tabs.d.ts +2 -3
- package/modules/tabs.esm.min.js +3 -3
- package/modules/tabs.min.cjs +3 -3
- package/modules/tabs.min.js +3 -3
- package/modules/vue.d.ts +1 -1
- package/modules/vue.esm.min.js +1 -1
- package/modules/vue.min.cjs +1 -1
- package/modules/vue.min.js +1 -1
- package/modules/webcomponent.d.ts +2 -2
- package/modules/webcomponent.esm.min.js +5 -5
- package/modules/webcomponent.min.cjs +5 -5
- package/modules/webcomponent.min.js +5 -5
- package/package.json +1 -1
package/lattice-grid.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.
|
|
2
|
+
* Lattice Grid 1.65.0, type declarations
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -63,7 +63,7 @@ export type TypeName =
|
|
|
63
63
|
*/
|
|
64
64
|
export type Align = 'start' | 'center' | 'end' | 'left' | 'right' | 'centre';
|
|
65
65
|
/**
|
|
66
|
-
* Vertical alignment of a cell's content within its row
|
|
66
|
+
* Vertical alignment of a cell's content within its row.
|
|
67
67
|
*
|
|
68
68
|
* The vertical counterpart to {@link Align}. `top` sits the content at the top
|
|
69
69
|
* of the row, `middle` centres it and `bottom` drops it to the bottom. It is
|
|
@@ -72,8 +72,7 @@ export type Align = 'start' | 'center' | 'end' | 'left' | 'right' | 'centre';
|
|
|
72
72
|
*/
|
|
73
73
|
export type VAlign = 'top' | 'middle' | 'bottom';
|
|
74
74
|
/**
|
|
75
|
-
* How the grid's scroll viewport draws its scrollbars
|
|
76
|
-
* BACKLOG-0001288).
|
|
75
|
+
* How the grid's scroll viewport draws its scrollbars.
|
|
77
76
|
*
|
|
78
77
|
* `auto` is the platform's native behaviour — overlay scrollbars fade away when
|
|
79
78
|
* idle. `always` keeps that native bar shown whether or not the pointer is over
|
|
@@ -241,7 +240,7 @@ export interface NumberFormat {
|
|
|
241
240
|
/**
|
|
242
241
|
* Show a leading `+` on a positive value (`+5`, `+£5.00`, `+12%`). A
|
|
243
242
|
* negative value keeps whatever `negative` says regardless of this flag,
|
|
244
|
-
* and zero shows no sign either way
|
|
243
|
+
* and zero shows no sign either way. Off by default.
|
|
245
244
|
*/
|
|
246
245
|
signed?: boolean;
|
|
247
246
|
prefix?: string;
|
|
@@ -400,6 +399,35 @@ export type IconName =
|
|
|
400
399
|
| 'blank'
|
|
401
400
|
| (string & {});
|
|
402
401
|
|
|
402
|
+
/**
|
|
403
|
+
* One sprite as a registration route accepts it: `config.icons`, `registerIcon`
|
|
404
|
+
* and `registerIcons` all take this shape.
|
|
405
|
+
*
|
|
406
|
+
* The long form is the glyph itself — a view box, one or more SVG path `d`
|
|
407
|
+
* strings, and whether they are stroked or filled. The two short forms exist
|
|
408
|
+
* because most glyphs are one filled path on the house 16x16 box: a bare path
|
|
409
|
+
* string, or an array of them, is read as exactly that, so a host registering
|
|
410
|
+
* its own mark writes the path and nothing else. `path` is accepted as a
|
|
411
|
+
* singular spelling of `paths`. What comes back out of {@link IconRegistryApi}
|
|
412
|
+
* is always the normalised {@link IconGlyph}, never the short form.
|
|
413
|
+
*
|
|
414
|
+
* A name already in the registry is overridden, which is how the expander
|
|
415
|
+
* chevron or the sort arrow is swapped for a host's own.
|
|
416
|
+
*/
|
|
417
|
+
export type IconDefinition =
|
|
418
|
+
| string
|
|
419
|
+
| string[]
|
|
420
|
+
| {
|
|
421
|
+
/** The SVG view box the paths are drawn in. Default `'0 0 16 16'`. */
|
|
422
|
+
viewBox?: string;
|
|
423
|
+
/** One or more SVG path `d` strings, drawn in order. */
|
|
424
|
+
paths?: string[];
|
|
425
|
+
/** A single path `d` string, as an alternative to a one-element `paths`. */
|
|
426
|
+
path?: string;
|
|
427
|
+
/** How the paths are painted. Default `'fill'`. */
|
|
428
|
+
paint?: 'stroke' | 'fill';
|
|
429
|
+
};
|
|
430
|
+
|
|
403
431
|
/** A built-in threshold icon set, mapping value bands to built-in glyphs. */
|
|
404
432
|
export type IconSetName = 'trafficLights' | 'arrows' | 'trafficArrows' | 'ratings' | (string & {});
|
|
405
433
|
|
|
@@ -563,7 +591,7 @@ export interface TooltipRow {
|
|
|
563
591
|
}
|
|
564
592
|
|
|
565
593
|
/**
|
|
566
|
-
* Structured tooltip content the grid renders for you
|
|
594
|
+
* Structured tooltip content the grid renders for you: a
|
|
567
595
|
* heading, a list of label/value lines, and a closing note.
|
|
568
596
|
*
|
|
569
597
|
* Every field is written as **text**, never as markup, so a spec built out of
|
|
@@ -609,7 +637,7 @@ export interface TooltipParams {
|
|
|
609
637
|
}
|
|
610
638
|
|
|
611
639
|
/**
|
|
612
|
-
* A rich, keyboard-accessible tooltip for a column's cells
|
|
640
|
+
* A rich, keyboard-accessible tooltip for a column's cells —
|
|
613
641
|
* the object form of `cell.tooltip`, drawn by the grid rather than handed to
|
|
614
642
|
* the browser as a native `title`.
|
|
615
643
|
*
|
|
@@ -648,7 +676,7 @@ export interface ColumnTooltipSpec {
|
|
|
648
676
|
}
|
|
649
677
|
|
|
650
678
|
/**
|
|
651
|
-
* Grid-level defaults for the rich cell tooltip
|
|
679
|
+
* Grid-level defaults for the rich cell tooltip, set once for
|
|
652
680
|
* every column rather than repeated on each.
|
|
653
681
|
*
|
|
654
682
|
* Defaults only: it switches nothing on. A tooltip exists because a column
|
|
@@ -685,13 +713,13 @@ export interface ColumnCellSpec {
|
|
|
685
713
|
* A string or a function is the plain-text case and becomes the browser's own
|
|
686
714
|
* `title`. An object is a {@link ColumnTooltipSpec}: a tooltip the grid draws,
|
|
687
715
|
* which can carry structure, markup or live content and which a keyboard user
|
|
688
|
-
* can reach
|
|
716
|
+
* can reach.
|
|
689
717
|
*/
|
|
690
718
|
tooltip?: string | ((p: CellParams) => string) | ColumnTooltipSpec;
|
|
691
719
|
align?: Align;
|
|
692
720
|
/**
|
|
693
721
|
* Vertical alignment of this column's cell content, overriding the grid-level
|
|
694
|
-
* `verticalAlign` for this column alone
|
|
722
|
+
* `verticalAlign` for this column alone. Accepted at the
|
|
695
723
|
* top level of the column too, as `align` is.
|
|
696
724
|
*/
|
|
697
725
|
verticalAlign?: VAlign;
|
|
@@ -711,7 +739,7 @@ export interface ColumnEditSpec {
|
|
|
711
739
|
}
|
|
712
740
|
|
|
713
741
|
/**
|
|
714
|
-
* Declarative edit-validation rules for a column
|
|
742
|
+
* Declarative edit-validation rules for a column.
|
|
715
743
|
*
|
|
716
744
|
* Rules are checked in a fixed order — `required` first, then the value-shape
|
|
717
745
|
* rules, then the functions — and the first failure wins. A blank but optional
|
|
@@ -870,7 +898,7 @@ export interface Column {
|
|
|
870
898
|
/** Whether and how the cell can be edited. A string names an editor. */
|
|
871
899
|
edit?: ColumnEditSpec | boolean | string;
|
|
872
900
|
/**
|
|
873
|
-
* Declarative edit-validation rules
|
|
901
|
+
* Declarative edit-validation rules. Each is checked against
|
|
874
902
|
* a value before it is written, through the `beforeEdit` before-event: a
|
|
875
903
|
* failing value cancels the commit and marks the cell. Distinct from and
|
|
876
904
|
* complementary to `edit.validate`, which is an imperative function.
|
|
@@ -904,13 +932,13 @@ export interface Column {
|
|
|
904
932
|
* pivot cells — where it should differ from the grand total. Overrides
|
|
905
933
|
* `total` for those scopes only; when omitted the column's `total` applies to
|
|
906
934
|
* both. Lets a column average within each group while the grand total sums,
|
|
907
|
-
* for example
|
|
935
|
+
* for example.
|
|
908
936
|
*/
|
|
909
937
|
groupTotal?: TotalName | TotalFn;
|
|
910
938
|
/**
|
|
911
939
|
* The reduction for the pinned grand-total row, where it should differ from
|
|
912
940
|
* the group subtotals. Overrides `total` for the grand total only; when
|
|
913
|
-
* omitted the column's `total` applies
|
|
941
|
+
* omitted the column's `total` applies.
|
|
914
942
|
*/
|
|
915
943
|
grandTotal?: TotalName | TotalFn;
|
|
916
944
|
/**
|
|
@@ -923,7 +951,7 @@ export interface Column {
|
|
|
923
951
|
kind: ShadowKind;
|
|
924
952
|
/**
|
|
925
953
|
* For `kind: 'history'`, how many past readings to keep (20 by default). With
|
|
926
|
-
* a time `window`
|
|
954
|
+
* a time `window` this is instead how many buckets the span
|
|
927
955
|
* divides into — `window: {kind: 'time', span: 60_000}, depth: 20` is sixty
|
|
928
956
|
* one-second buckets. Ignored by every other kind.
|
|
929
957
|
*/
|
|
@@ -953,8 +981,7 @@ export interface Column {
|
|
|
953
981
|
warnUpper?: number;
|
|
954
982
|
/**
|
|
955
983
|
* For a rolling time-series kind (`rollingSum`/`rollingAvg`/`rollingMin`/
|
|
956
|
-
* `rollingMax`/`windowCoverage`/`cumulativeToDate`/`periodOverPeriod
|
|
957
|
-
* BACKLOG-0000748), the column whose order defines the series — dates,
|
|
984
|
+
* `rollingMax`/`windowCoverage`/`cumulativeToDate`/`periodOverPeriod`), the column whose order defines the series — dates,
|
|
958
985
|
* sequence numbers, timestamps. **Required**: the screen sort is never used,
|
|
959
986
|
* because a rolling figure would then change on every header click, so a
|
|
960
987
|
* rolling column with no `orderBy` reports null and warns.
|
|
@@ -967,7 +994,7 @@ export interface Column {
|
|
|
967
994
|
* carry a partial window, stamped by a `windowCoverage` companion rather than
|
|
968
995
|
* dressed as full.
|
|
969
996
|
*
|
|
970
|
-
* For `kind: 'history'
|
|
997
|
+
* For `kind: 'history'`, only `{kind: 'time', span}` (or
|
|
971
998
|
* `minutes`) applies, and it changes what `history` means rather than what it
|
|
972
999
|
* aggregates: the `depth` buckets that span divides into are read once each,
|
|
973
1000
|
* carrying the row's last known value forward into any bucket in which it did
|
|
@@ -997,7 +1024,7 @@ export interface Column {
|
|
|
997
1024
|
q?: number;
|
|
998
1025
|
/**
|
|
999
1026
|
* For a seasonal-decomposition kind (`tsTrend`/`tsSeasonal`/`tsResidual`/
|
|
1000
|
-
* `tsCoverage
|
|
1027
|
+
* `tsCoverage`), the season length — **required**, since
|
|
1001
1028
|
* there is no auto-detection in v1: 7 for a weekly cycle in daily data, 12
|
|
1002
1029
|
* for a monthly cycle in monthly data. An integer of at least 2.
|
|
1003
1030
|
*/
|
|
@@ -1010,7 +1037,7 @@ export interface Column {
|
|
|
1010
1037
|
decomposition?: 'additive' | 'multiplicative';
|
|
1011
1038
|
/**
|
|
1012
1039
|
* For an exponential-smoothing kind (`tsSmoothed`/`tsSmoothingAlpha`/
|
|
1013
|
-
* `tsSmoothingBeta
|
|
1040
|
+
* `tsSmoothingBeta`), the model: single exponential
|
|
1014
1041
|
* smoothing (`ses`, the default) or Holt's level+trend (`holt`).
|
|
1015
1042
|
*/
|
|
1016
1043
|
smoothing?: 'ses' | 'holt';
|
|
@@ -1026,7 +1053,7 @@ export interface Column {
|
|
|
1026
1053
|
*/
|
|
1027
1054
|
beta?: number;
|
|
1028
1055
|
/**
|
|
1029
|
-
* For a `fit*` kind
|
|
1056
|
+
* For a `fit*` kind, the regression model the shadow reads
|
|
1030
1057
|
* — predictors, response, method and confidence. Its predictors/response may
|
|
1031
1058
|
* also be given directly on this object.
|
|
1032
1059
|
*/
|
|
@@ -1056,7 +1083,7 @@ export interface Column {
|
|
|
1056
1083
|
/** The header cell: its text, tooltip, menu and any header chart. */
|
|
1057
1084
|
header?: ColumnHeaderSpec | string;
|
|
1058
1085
|
/**
|
|
1059
|
-
* The cell right-click menu for this column alone
|
|
1086
|
+
* The cell right-click menu for this column alone, in the
|
|
1060
1087
|
* same shapes the grid-level `contextMenu` takes plus a bare array for the
|
|
1061
1088
|
* common "just these items here" case.
|
|
1062
1089
|
*
|
|
@@ -1076,22 +1103,20 @@ export interface Column {
|
|
|
1076
1103
|
/**
|
|
1077
1104
|
* When this column's header controls — its sort arrow, filter funnel and menu
|
|
1078
1105
|
* button — are shown, overriding the grid-level `headerControls` default for
|
|
1079
|
-
* this column alone
|
|
1106
|
+
* this column alone. `'hover'` reveals them on hover or
|
|
1080
1107
|
* focus, `'always'` keeps them visible, `'hidden'` draws none of them and
|
|
1081
1108
|
* leaves them out of the tab order. Omitted, the column follows the grid
|
|
1082
1109
|
* default, which is itself `'hover'`.
|
|
1083
1110
|
*/
|
|
1084
1111
|
headerControls?: 'hover' | 'always' | 'hidden';
|
|
1085
1112
|
/**
|
|
1086
|
-
* Vertical alignment of this column's cell content within the row
|
|
1087
|
-
* (BACKLOG-0000989). Overrides the grid-level `verticalAlign` for this column
|
|
1113
|
+
* Vertical alignment of this column's cell content within the row. Overrides the grid-level `verticalAlign` for this column
|
|
1088
1114
|
* alone; `top`, `middle` or `bottom`. Also accepted as `cell.verticalAlign`,
|
|
1089
1115
|
* the way `align` is. Omitted, the column follows the grid default.
|
|
1090
1116
|
*/
|
|
1091
1117
|
verticalAlign?: VAlign;
|
|
1092
1118
|
/**
|
|
1093
|
-
* When this leaf column is shown, the same union `ColumnGroup` declares
|
|
1094
|
-
* (BACKLOG-0001279). A leaf reads its own `showWhen` exactly as a group
|
|
1119
|
+
* When this leaf column is shown, the same union `ColumnGroup` declares. A leaf reads its own `showWhen` exactly as a group
|
|
1095
1120
|
* reads its own — `open`/`closed` tie the leaf to an ancestor group's
|
|
1096
1121
|
* collapsed state, `always` (the default) shows it regardless — so tying a
|
|
1097
1122
|
* leaf's visibility to a group's open/closed state does not require
|
|
@@ -1134,7 +1159,7 @@ export interface ResolvedColumn {
|
|
|
1134
1159
|
nullable: boolean;
|
|
1135
1160
|
align: Align;
|
|
1136
1161
|
/**
|
|
1137
|
-
* The resolved vertical alignment
|
|
1162
|
+
* The resolved vertical alignment, or `undefined` when
|
|
1138
1163
|
* neither the column nor the grid set one — in which case the cell keeps the
|
|
1139
1164
|
* grid's historical vertical placement (centred, or top for `autoHeight`).
|
|
1140
1165
|
*/
|
|
@@ -1148,19 +1173,17 @@ export interface ResolvedColumn {
|
|
|
1148
1173
|
pivot: { enabled: boolean; index: number };
|
|
1149
1174
|
total: TotalName | TotalFn | null;
|
|
1150
1175
|
/**
|
|
1151
|
-
* The group-subtotal override, or null when group subtotals follow `total
|
|
1152
|
-
* (BACKLOG-0000726).
|
|
1176
|
+
* The group-subtotal override, or null when group subtotals follow `total`.
|
|
1153
1177
|
*/
|
|
1154
1178
|
groupTotal: TotalName | TotalFn | null;
|
|
1155
1179
|
/**
|
|
1156
|
-
* The grand-total override, or null when the grand total follows `total
|
|
1157
|
-
* (BACKLOG-0000726).
|
|
1180
|
+
* The grand-total override, or null when the grand total follows `total`.
|
|
1158
1181
|
*/
|
|
1159
1182
|
grandTotal: TotalName | TotalFn | null;
|
|
1160
1183
|
layout: ColumnLayoutSpec;
|
|
1161
1184
|
header: ColumnHeaderSpec;
|
|
1162
1185
|
/**
|
|
1163
|
-
* This column's own cell-menu declaration
|
|
1186
|
+
* This column's own cell-menu declaration, or null when it
|
|
1164
1187
|
* makes none and the grid-level menu stands alone. Carried onto the resolved
|
|
1165
1188
|
* column so a column preset or `columnDefaults` can supply one.
|
|
1166
1189
|
*/
|
|
@@ -1346,7 +1369,7 @@ export interface RemoteRequest {
|
|
|
1346
1369
|
groupPath: string[];
|
|
1347
1370
|
/**
|
|
1348
1371
|
* The same ancestry as `groupPath`, but as the values the server returned
|
|
1349
|
-
* rather than their display strings
|
|
1372
|
+
* rather than their display strings. Always present, empty
|
|
1350
1373
|
* at the root, so a source can tell "no ancestors" from "a host that does not
|
|
1351
1374
|
* send this".
|
|
1352
1375
|
*
|
|
@@ -1360,8 +1383,7 @@ export interface RemoteRequest {
|
|
|
1360
1383
|
groupBy: ColumnRef[];
|
|
1361
1384
|
totals: ColumnRef[];
|
|
1362
1385
|
/**
|
|
1363
|
-
* The named statistic each totalled column reduces with — `{ amount: 'sum' }`
|
|
1364
|
-
* (BACKLOG-0001325). `totals` has always said *which* columns want a subtotal
|
|
1386
|
+
* The named statistic each totalled column reduces with — `{ amount: 'sum' }`. `totals` has always said *which* columns want a subtotal
|
|
1365
1387
|
* and never *what*, because the client reads the reduction off the column
|
|
1366
1388
|
* model and a server had no way to.
|
|
1367
1389
|
*
|
|
@@ -1380,7 +1402,7 @@ export interface RemoteRequest {
|
|
|
1380
1402
|
signal: AbortSignal;
|
|
1381
1403
|
/**
|
|
1382
1404
|
* The `where` predicates in force, as a runtime the source can evaluate but
|
|
1383
|
-
* not mutate
|
|
1405
|
+
* not mutate. Present **only when at least one predicate is
|
|
1384
1406
|
* registered**, so a grid that does not use `where` sends the request it
|
|
1385
1407
|
* always sent, field for field.
|
|
1386
1408
|
*
|
|
@@ -1396,7 +1418,7 @@ export interface RemoteRequest {
|
|
|
1396
1418
|
}
|
|
1397
1419
|
|
|
1398
1420
|
/**
|
|
1399
|
-
* The `where` predicates in force, as a source sees them
|
|
1421
|
+
* The `where` predicates in force, as a source sees them.
|
|
1400
1422
|
*
|
|
1401
1423
|
* A snapshot rather than the model, so a source can evaluate the predicates but
|
|
1402
1424
|
* cannot register or remove one through it.
|
|
@@ -1451,7 +1473,7 @@ export interface StreamSourceConfig {
|
|
|
1451
1473
|
maxRows?: number;
|
|
1452
1474
|
/**
|
|
1453
1475
|
* The longest a row is kept, in milliseconds — a rolling *time* window, sitting
|
|
1454
|
-
* beside `maxRows` as a second, independent bound
|
|
1476
|
+
* beside `maxRows` as a second, independent bound. Rows older
|
|
1455
1477
|
* than the span are evicted through the same path, the same `evicted` counters
|
|
1456
1478
|
* and the same `stream:evicted` event as the count bound, so an existing
|
|
1457
1479
|
* readout keeps working. Set both and whichever bites first applies. Eviction
|
|
@@ -1475,8 +1497,7 @@ export interface StreamSourceConfig {
|
|
|
1475
1497
|
maxAge?: number;
|
|
1476
1498
|
/**
|
|
1477
1499
|
* Which clock `maxAge` reads: a column id (or dotted path), or a function of
|
|
1478
|
-
* the row returning a `Date`, epoch milliseconds, or an ISO string
|
|
1479
|
-
* (BACKLOG-0001036). Given, the window follows the **data's own** clock, so it
|
|
1500
|
+
* the row returning a `Date`, epoch milliseconds, or an ISO string. Given, the window follows the **data's own** clock, so it
|
|
1480
1501
|
* means what the producer means — and inherits the producer's clock skew.
|
|
1481
1502
|
* Omitted, `maxAge` falls back to **arrival time**: when the row reached this
|
|
1482
1503
|
* source. Arrival time needs no timestamp column and cannot be skewed, but it
|
|
@@ -1510,7 +1531,7 @@ export interface DerivedSourceConfig {
|
|
|
1510
1531
|
*/
|
|
1511
1532
|
/**
|
|
1512
1533
|
* The grid to read, or several to combine into one row set before the rest
|
|
1513
|
-
* of the pipeline runs
|
|
1534
|
+
* of the pipeline runs. A bare `Grid` is shorthand for a
|
|
1514
1535
|
* `UnionSourceOptions` with no `label`/`follow`/`map` override, so an
|
|
1515
1536
|
* existing `from: <grid>` keeps meaning exactly what it always has.
|
|
1516
1537
|
*
|
|
@@ -1557,7 +1578,7 @@ export interface DerivedSourceConfig {
|
|
|
1557
1578
|
/**
|
|
1558
1579
|
* Which of its rows to read. `filtered` by default. Ignored — with a
|
|
1559
1580
|
* `warnOnce` — when `from` is a union array: each entry there carries its
|
|
1560
|
-
* own `follow` instead
|
|
1581
|
+
* own `follow` instead.
|
|
1561
1582
|
*/
|
|
1562
1583
|
follow?: 'filtered' | 'all' | 'selected' | 'grouped';
|
|
1563
1584
|
|
|
@@ -1592,7 +1613,7 @@ export interface DerivedSourceConfig {
|
|
|
1592
1613
|
orient?: 'columns' | 'metrics';
|
|
1593
1614
|
|
|
1594
1615
|
/**
|
|
1595
|
-
* Project a **relational** statistic into rows
|
|
1616
|
+
* Project a **relational** statistic into rows: the figures
|
|
1596
1617
|
* that need two or more columns, or a second grid, and so cannot be reached
|
|
1597
1618
|
* through `select`.
|
|
1598
1619
|
*
|
|
@@ -1610,7 +1631,7 @@ export interface DerivedSourceConfig {
|
|
|
1610
1631
|
* row per group, so there is no position in
|
|
1611
1632
|
* `unnest → where → bucket → groupBy → select → sort → limit` for it to
|
|
1612
1633
|
* occupy. It replaces the pipeline, and those keys are ignored with a warning
|
|
1613
|
-
* naming them
|
|
1634
|
+
* naming them rather than silently discarded. Sort, filter
|
|
1614
1635
|
* or limit the derived grid itself instead, or chain a second derived grid
|
|
1615
1636
|
* whose `from` is this one.
|
|
1616
1637
|
*
|
|
@@ -1657,8 +1678,7 @@ export interface DerivedSourceConfig {
|
|
|
1657
1678
|
}
|
|
1658
1679
|
|
|
1659
1680
|
/**
|
|
1660
|
-
* Which relational statistic a derived source projects into rows, and how
|
|
1661
|
-
* (BACKLOG-0001046). See `DerivedSourceConfig.statistics`.
|
|
1681
|
+
* Which relational statistic a derived source projects into rows, and how. See `DerivedSourceConfig.statistics`.
|
|
1662
1682
|
*
|
|
1663
1683
|
* A discriminated union on `fn`, so the relational statistics still deferred —
|
|
1664
1684
|
* `regression`, `regressionModel`, `forecast`, `anomalies`, `adf`, `acf`,
|
|
@@ -1737,7 +1757,7 @@ export interface DerivedDatasetComparison {
|
|
|
1737
1757
|
}
|
|
1738
1758
|
|
|
1739
1759
|
/**
|
|
1740
|
-
* One member of a union `from
|
|
1760
|
+
* One member of a union `from`: a grid to combine with the
|
|
1741
1761
|
* others, plus how to read it and reshape it before it joins the rest. A bare
|
|
1742
1762
|
* `Grid` in the `from` array is shorthand for `{ grid }` with every other
|
|
1743
1763
|
* field defaulted.
|
|
@@ -2025,6 +2045,16 @@ export interface GridConfig {
|
|
|
2025
2045
|
totalFns?: Record<string, TotalFn>;
|
|
2026
2046
|
/** Named appearance variants a row or cell can be switched into by a rule. */
|
|
2027
2047
|
variants?: Record<string, VariantDefinition>;
|
|
2048
|
+
/**
|
|
2049
|
+
* Your own SVG glyphs, registered by name before the first paint.
|
|
2050
|
+
*
|
|
2051
|
+
* The same registry `registerIcon` writes to and every cell, header control,
|
|
2052
|
+
* rail button and chart glyph is painted from, so a name given here is usable
|
|
2053
|
+
* anywhere a glyph name is: a column's `icon` decoration, a rail action's
|
|
2054
|
+
* `icon`, a network node's `icon`. Registering a built-in name overrides it.
|
|
2055
|
+
* Read the result back through {@link Grid.icons}.
|
|
2056
|
+
*/
|
|
2057
|
+
icons?: Record<string, IconDefinition>;
|
|
2028
2058
|
/** Hierarchical rows: where the parent link or the path lives. */
|
|
2029
2059
|
tree?: TreeConfig;
|
|
2030
2060
|
/** The expandable panel beneath a row. */
|
|
@@ -2096,7 +2126,7 @@ export interface GridConfig {
|
|
|
2096
2126
|
|
|
2097
2127
|
/**
|
|
2098
2128
|
* Vertical alignment of cell content within a row, as a default for every
|
|
2099
|
-
* column
|
|
2129
|
+
* column. `top`, `middle` or `bottom`; a column's own
|
|
2100
2130
|
* `verticalAlign` overrides it for that column.
|
|
2101
2131
|
*
|
|
2102
2132
|
* The horizontal counterpart is the per-column `align`. Omitted, the grid
|
|
@@ -2108,7 +2138,7 @@ export interface GridConfig {
|
|
|
2108
2138
|
verticalAlign?: VAlign;
|
|
2109
2139
|
|
|
2110
2140
|
/**
|
|
2111
|
-
* Defaults for the rich cell tooltip
|
|
2141
|
+
* Defaults for the rich cell tooltip.
|
|
2112
2142
|
*
|
|
2113
2143
|
* The tooltip itself is declared per column, on `cell.tooltip`; this only
|
|
2114
2144
|
* carries the settings that are a house style rather than a per-column
|
|
@@ -2118,8 +2148,7 @@ export interface GridConfig {
|
|
|
2118
2148
|
tooltip?: TooltipConfig;
|
|
2119
2149
|
|
|
2120
2150
|
/**
|
|
2121
|
-
* How the scroll viewport's scrollbars are drawn
|
|
2122
|
-
* BACKLOG-0001288).
|
|
2151
|
+
* How the scroll viewport's scrollbars are drawn.
|
|
2123
2152
|
*
|
|
2124
2153
|
* `'auto'` (the default) is the platform's native behaviour, where overlay
|
|
2125
2154
|
* scrollbars fade when idle. `'always'` keeps that native bar shown whether
|
|
@@ -2150,7 +2179,7 @@ export interface GridConfig {
|
|
|
2150
2179
|
/**
|
|
2151
2180
|
* Show a small chip in the grid chrome that reads how many rows an anomaly
|
|
2152
2181
|
* shadow column has flagged, and filters the grid to exactly those when it is
|
|
2153
|
-
* clicked
|
|
2182
|
+
* clicked.
|
|
2154
2183
|
*
|
|
2155
2184
|
* Off by default, and it draws nothing unless a column declares a
|
|
2156
2185
|
* `shadow: { kind: 'anomalyFlag' }`. The count and the filter both read that
|
|
@@ -2307,8 +2336,7 @@ export interface GridConfig {
|
|
|
2307
2336
|
};
|
|
2308
2337
|
|
|
2309
2338
|
/**
|
|
2310
|
-
* Present the grid as a pivot — a cross-tab drawn as a matrix (§10
|
|
2311
|
-
* BACKLOG-0000738).
|
|
2339
|
+
* Present the grid as a pivot — a cross-tab drawn as a matrix (§10).
|
|
2312
2340
|
*
|
|
2313
2341
|
* The row dimensions (the grid's `group`) go down the left gutter, the column
|
|
2314
2342
|
* dimensions (the grid's `pivot`) go across the top, and each totalled column
|
|
@@ -2405,7 +2433,7 @@ export interface GridConfig {
|
|
|
2405
2433
|
showColumnFunctions?: boolean;
|
|
2406
2434
|
/**
|
|
2407
2435
|
* When the per-column header controls — the sort arrow, the filter funnel and
|
|
2408
|
-
* the menu button — are shown, as a default for every column
|
|
2436
|
+
* the menu button — are shown, as a default for every column.
|
|
2409
2437
|
*
|
|
2410
2438
|
* - `'hover'` (the default) reveals them when the heading is hovered or a
|
|
2411
2439
|
* keyboard user focuses into it, which is the historical behaviour: a wide
|
|
@@ -2669,7 +2697,7 @@ export interface GridConfig {
|
|
|
2669
2697
|
*/
|
|
2670
2698
|
import?: boolean | ImportSettings;
|
|
2671
2699
|
/**
|
|
2672
|
-
* Enable the built-in row-delete gesture (§18.4
|
|
2700
|
+
* Enable the built-in row-delete gesture (§18.4) — the
|
|
2673
2701
|
* Delete/Backspace key on selected rows and a "Delete row" cell-menu item —
|
|
2674
2702
|
* and the `grid.edit.deleteRows` API. Off by default, because deleting data
|
|
2675
2703
|
* on a keystroke is destructive and opt-in. Every deletion flows through the
|
|
@@ -2708,7 +2736,7 @@ export interface GridConfig {
|
|
|
2708
2736
|
shortcuts?: boolean;
|
|
2709
2737
|
|
|
2710
2738
|
/**
|
|
2711
|
-
* The in-grid find bar
|
|
2739
|
+
* The in-grid find bar: Ctrl+F / Cmd+F with focus in the
|
|
2712
2740
|
* grid opens it; typing highlights every matching cell in place without
|
|
2713
2741
|
* filtering a row away; Enter and Shift+Enter step through the matches.
|
|
2714
2742
|
* `false` removes the bar and its shortcut; the `grid.find` API still works.
|
|
@@ -2841,7 +2869,7 @@ export interface GridConfig {
|
|
|
2841
2869
|
* reordering the chips changes the nesting order. It is keyboard-operable
|
|
2842
2870
|
* (arrows navigate, Shift+arrow reorders, Delete ungroups, and an add control
|
|
2843
2871
|
* groups any column), and every change is announced through the live region,
|
|
2844
|
-
* which is why it also addresses the drag-only complaint
|
|
2872
|
+
* which is why it also addresses the drag-only complaint.
|
|
2845
2873
|
*
|
|
2846
2874
|
* Off by default and non-breaking, matching `toolPanel`. It drives the same
|
|
2847
2875
|
* grouping model as `grid.columns.group()`; it reimplements nothing.
|
|
@@ -2987,7 +3015,7 @@ export interface ColumnState {
|
|
|
2987
3015
|
/** The grand-total override, when one differs from `total`. */
|
|
2988
3016
|
grandTotal?: TotalName | null;
|
|
2989
3017
|
/**
|
|
2990
|
-
* The column's runtime decoration
|
|
3018
|
+
* The column's runtime decoration, present only when the
|
|
2991
3019
|
* column carries one, so a `columns.decorate()` survives a saved view and
|
|
2992
3020
|
* participates in undo/redo. Absent means "not recorded"; an explicit `null`
|
|
2993
3021
|
* on an undo patch clears a decoration back to plain text.
|
|
@@ -2998,7 +3026,7 @@ export interface ColumnState {
|
|
|
2998
3026
|
}
|
|
2999
3027
|
|
|
3000
3028
|
/**
|
|
3001
|
-
* A persisted banded-header node (§15
|
|
3029
|
+
* A persisted banded-header node (§15): a band with a `columns`
|
|
3002
3030
|
* list whose members are leaf ids or nested bands. This is what round-trips a
|
|
3003
3031
|
* drag-created group through a saved view.
|
|
3004
3032
|
*/
|
|
@@ -3014,11 +3042,11 @@ export interface GridState {
|
|
|
3014
3042
|
version: number;
|
|
3015
3043
|
columns?: ColumnState[];
|
|
3016
3044
|
columnOrder?: string[];
|
|
3017
|
-
/** The banded-header tree, when the grid has one
|
|
3045
|
+
/** The banded-header tree, when the grid has one. */
|
|
3018
3046
|
columnGroups?: ColumnGroupState[];
|
|
3019
3047
|
filters?: FilterSet;
|
|
3020
3048
|
/**
|
|
3021
|
-
* The `where` predicates that were in force, as names only
|
|
3049
|
+
* The `where` predicates that were in force, as names only.
|
|
3022
3050
|
* A predicate is host code: it cannot be serialised into a view or restored
|
|
3023
3051
|
* from one. `apply` reconciles these against what the host has registered and
|
|
3024
3052
|
* reports every name it cannot honour rather than restoring a view that
|
|
@@ -3031,14 +3059,14 @@ export interface GridState {
|
|
|
3031
3059
|
group?: string[];
|
|
3032
3060
|
pivot?: { enabled: boolean; columns: string[] };
|
|
3033
3061
|
/**
|
|
3034
|
-
* The pivot presentation's collapse state (§10
|
|
3062
|
+
* The pivot presentation's collapse state (§10): which
|
|
3035
3063
|
* row-axis and column-axis nodes are collapsed. Absent when the matrix is
|
|
3036
3064
|
* fully expanded, and tolerated as "expand all" when applied.
|
|
3037
3065
|
*/
|
|
3038
3066
|
pivotView?: { rowsCollapsed: string[]; columnsCollapsed: string[] };
|
|
3039
3067
|
formatting?: Record<string, FormattingRule[]>;
|
|
3040
3068
|
/**
|
|
3041
|
-
* Durable annotation marks
|
|
3069
|
+
* Durable annotation marks: seeded from here on first paint,
|
|
3042
3070
|
* and written back by `getState` so a host can persist and restore them. In
|
|
3043
3071
|
* content coordinates, so they track scroll and resize.
|
|
3044
3072
|
*/
|
|
@@ -3063,7 +3091,7 @@ export interface StateApplyReport {
|
|
|
3063
3091
|
export type StateSection = Exclude<keyof GridState, 'version'>;
|
|
3064
3092
|
|
|
3065
3093
|
/**
|
|
3066
|
-
* What caused a `state:changed
|
|
3094
|
+
* What caused a `state:changed`.
|
|
3067
3095
|
*
|
|
3068
3096
|
* `'user'` is a change to one part of the view — a sort, a filter, a column
|
|
3069
3097
|
* moved, resized, pinned or hidden, a grouping, a page — whether it arrived as
|
|
@@ -3109,7 +3137,7 @@ export interface FormattingScale {
|
|
|
3109
3137
|
}
|
|
3110
3138
|
|
|
3111
3139
|
/**
|
|
3112
|
-
* An in-cell proportional bar
|
|
3140
|
+
* An in-cell proportional bar. Drawn as a CSS gradient on the
|
|
3113
3141
|
* cell background — no extra element, and it composes with the cell's text.
|
|
3114
3142
|
*
|
|
3115
3143
|
* The bar's length is the value's position between `min` and `max`. Give both to
|
|
@@ -3139,7 +3167,7 @@ export interface DataBarSpec {
|
|
|
3139
3167
|
}
|
|
3140
3168
|
|
|
3141
3169
|
/**
|
|
3142
|
-
* An icon set
|
|
3170
|
+
* An icon set: a glyph placed beside the value by the band it
|
|
3143
3171
|
* falls in. Drawn as a `background-image` with padding, so it too needs no extra
|
|
3144
3172
|
* element and stays a plain style value.
|
|
3145
3173
|
*
|
|
@@ -3174,9 +3202,9 @@ export interface FormattingRule {
|
|
|
3174
3202
|
when?: FormattingCondition;
|
|
3175
3203
|
style?: CellStyle | ((p: CellParams) => CellStyle | null);
|
|
3176
3204
|
scale?: FormattingScale;
|
|
3177
|
-
/** An in-cell proportional bar
|
|
3205
|
+
/** An in-cell proportional bar. */
|
|
3178
3206
|
dataBar?: DataBarSpec;
|
|
3179
|
-
/** A per-band glyph beside the value
|
|
3207
|
+
/** A per-band glyph beside the value. */
|
|
3180
3208
|
iconSet?: IconSetSpec;
|
|
3181
3209
|
stopIfTrue?: boolean;
|
|
3182
3210
|
enabled?: boolean;
|
|
@@ -3236,7 +3264,7 @@ export interface PushdownCapabilities {
|
|
|
3236
3264
|
/**
|
|
3237
3265
|
* Whether it can answer the grid's grouped view — group rows, their counts,
|
|
3238
3266
|
* their subtotals and their order — one level at a time, instead of returning
|
|
3239
|
-
* the leaves for the grid to group in the browser
|
|
3267
|
+
* the leaves for the grid to group in the browser.
|
|
3240
3268
|
*
|
|
3241
3269
|
* All or nothing, unlike `filter`. A filter splits because the engine
|
|
3242
3270
|
* narrowing a superset and the grid narrowing what is left reach the same set;
|
|
@@ -3267,7 +3295,7 @@ export interface PushdownAdapter {
|
|
|
3267
3295
|
execute(query: RemoteRequest, request?: RemoteRequest):
|
|
3268
3296
|
Promise<{ rows: unknown[]; total?: number }>;
|
|
3269
3297
|
/**
|
|
3270
|
-
* Answer one level of a grouped grid
|
|
3298
|
+
* Answer one level of a grouped grid. Present only when
|
|
3271
3299
|
* `capabilities.group` opts in.
|
|
3272
3300
|
*
|
|
3273
3301
|
* The level is `query.groupValues.length`: the root asks for the outermost
|
|
@@ -3298,7 +3326,7 @@ export interface PushdownAdapter {
|
|
|
3298
3326
|
grand?: Record<string, unknown>;
|
|
3299
3327
|
}>;
|
|
3300
3328
|
/**
|
|
3301
|
-
* The row count before any filter
|
|
3329
|
+
* The row count before any filter — the denominator of
|
|
3302
3330
|
* "1,204 of 100,000" under grouping, where the display count is group headers
|
|
3303
3331
|
* rather than rows. Optional; a source falls back to the display count.
|
|
3304
3332
|
*/
|
|
@@ -3319,7 +3347,7 @@ export interface PushdownPlan {
|
|
|
3319
3347
|
/**
|
|
3320
3348
|
* What the grid applied afterwards. `where` is the host predicate runtime
|
|
3321
3349
|
* when one survived the `whereRowLimit` gate, and `null` when none was
|
|
3322
|
-
* registered or the gate refused it
|
|
3350
|
+
* registered or the gate refused it.
|
|
3323
3351
|
*/
|
|
3324
3352
|
residual: {
|
|
3325
3353
|
filters: object | null;
|
|
@@ -3328,7 +3356,7 @@ export interface PushdownPlan {
|
|
|
3328
3356
|
where: WhereRuntime | null;
|
|
3329
3357
|
/**
|
|
3330
3358
|
* Whether the rows the residual runs over are the whole matching set rather
|
|
3331
|
-
* than a fetched fraction
|
|
3359
|
+
* than a fetched fraction. Set by the source when it hands
|
|
3332
3360
|
* the residual to `applyResidual`; absent on the plan `lastPlan()` reports,
|
|
3333
3361
|
* because it is a property of one fetch's result, not of the plan.
|
|
3334
3362
|
*
|
|
@@ -3346,8 +3374,7 @@ export interface PushdownPlan {
|
|
|
3346
3374
|
*/
|
|
3347
3375
|
unpushed: string[];
|
|
3348
3376
|
/**
|
|
3349
|
-
* Whether the engine answered the grid's grouped view for this request
|
|
3350
|
-
* (BACKLOG-0001325). False for an ungrouped query and for a grouped one the
|
|
3377
|
+
* Whether the engine answered the grid's grouped view for this request. False for an ungrouped query and for a grouped one the
|
|
3351
3378
|
* engine was refused — `groupReason` says which.
|
|
3352
3379
|
*/
|
|
3353
3380
|
grouped: boolean;
|
|
@@ -3370,7 +3397,7 @@ export interface PushdownPlan {
|
|
|
3370
3397
|
full: boolean;
|
|
3371
3398
|
/**
|
|
3372
3399
|
* Per-aggregate provenance, present only when the last request computed
|
|
3373
|
-
* aggregates
|
|
3400
|
+
* aggregates: which statistics the engine computed
|
|
3374
3401
|
* and which the client did, with the class the pushdown map assigned each.
|
|
3375
3402
|
* Under grouping it also carries the `groupBy` the subtotals were computed
|
|
3376
3403
|
* over. Build-time inspection, not a runtime per-figure marker.
|
|
@@ -3383,8 +3410,7 @@ export interface PushdownPlan {
|
|
|
3383
3410
|
}
|
|
3384
3411
|
|
|
3385
3412
|
/**
|
|
3386
|
-
* Opt-in, sticky full-dataset pull for a pushdown/remote source
|
|
3387
|
-
* (BACKLOG-0000730). Off by default. When enabled, the source materialises the
|
|
3413
|
+
* Opt-in, sticky full-dataset pull for a pushdown/remote source. Off by default. When enabled, the source materialises the
|
|
3388
3414
|
* entire matching set client-side once per query signature and serves every
|
|
3389
3415
|
* window, total and statistic from it, so those figures are computed over the
|
|
3390
3416
|
* whole set rather than the loaded window. A set past either limit is refused
|
|
@@ -3403,8 +3429,7 @@ export interface PushdownFullDatasetConfig {
|
|
|
3403
3429
|
export type AggregateMode = 'engine' | 'client' | 'engine-if-identical';
|
|
3404
3430
|
|
|
3405
3431
|
/**
|
|
3406
|
-
* Design-time aggregate-pushdown policy for a pushdown source
|
|
3407
|
-
* (BACKLOG-0000730 Part B). The developer chooses, at grid setup
|
|
3432
|
+
* Design-time aggregate-pushdown policy for a pushdown source. The developer chooses, at grid setup
|
|
3408
3433
|
* before render, whether each statistic is computed by the engine (fast, over
|
|
3409
3434
|
* the matching set) or client-side (the grid's exact definition, needs a
|
|
3410
3435
|
* full-dataset pull). It is fixed for the life of the grid, never a runtime
|
|
@@ -3493,7 +3518,7 @@ export interface PushdownSourceConfig {
|
|
|
3493
3518
|
allowPartialResults?: boolean;
|
|
3494
3519
|
/**
|
|
3495
3520
|
* The most rows the source will fetch and hold in order to run a twinless
|
|
3496
|
-
* `where` predicate as the residual
|
|
3521
|
+
* `where` predicate as the residual. Defaults to `50_000`,
|
|
3497
3522
|
* the same anchor as the grid's `workerThreshold` — the size at which this
|
|
3498
3523
|
* codebase already judges a dataset big enough to need different handling.
|
|
3499
3524
|
*
|
|
@@ -3522,7 +3547,7 @@ export interface StatisticsApi {
|
|
|
3522
3547
|
shadow(colId: string, kind: ShadowKind, rowKey: string,
|
|
3523
3548
|
scope?: 'all' | 'filtered', spec?: object): unknown;
|
|
3524
3549
|
/**
|
|
3525
|
-
* One regression shadow value for a row, by key
|
|
3550
|
+
* One regression shadow value for a row, by key: the
|
|
3526
3551
|
* predicted value, residual, or Cook's-distance influence flag from the fitted
|
|
3527
3552
|
* model, over the filtered rows. Null for a row outside the fit.
|
|
3528
3553
|
*/
|
|
@@ -3540,7 +3565,7 @@ export interface StatisticsApi {
|
|
|
3540
3565
|
/** Everything worth knowing about one column, in one pass each. */
|
|
3541
3566
|
profile(colId: string): ColumnProfile | null;
|
|
3542
3567
|
/**
|
|
3543
|
-
* The rows that do not belong
|
|
3568
|
+
* The rows that do not belong: anomaly detection over the
|
|
3544
3569
|
* filtered rows by the robust modified z-score (`modifiedZScore`, the
|
|
3545
3570
|
* default), Tukey's IQR fences (`iqr`), or multivariate Mahalanobis distance
|
|
3546
3571
|
* over the chosen columns (`mahalanobis`). Every flagged row carries the score
|
|
@@ -3559,7 +3584,7 @@ export interface StatisticsApi {
|
|
|
3559
3584
|
subsetVsPopulation(opts?: { columns?: string[] }): SubsetComparison;
|
|
3560
3585
|
/**
|
|
3561
3586
|
* Which columns differ most between this grid and another, ranked by effect
|
|
3562
|
-
* size — never by a p-value
|
|
3587
|
+
* size — never by a p-value. The generalisation of
|
|
3563
3588
|
* {@link subsetVsPopulation} from subset-vs-population to dataset-vs-dataset:
|
|
3564
3589
|
* two independent grids, yoked by passing one in, no shared store. A numeric
|
|
3565
3590
|
* column reports a pooled standardised mean difference (Cohen's d, symmetric
|
|
@@ -3571,7 +3596,7 @@ export interface StatisticsApi {
|
|
|
3571
3596
|
datasetVsDataset(other: Grid, opts?: { columns?: string[] }): DatasetComparison;
|
|
3572
3597
|
/**
|
|
3573
3598
|
* Is the difference between two groups real? A two-sample test returned as
|
|
3574
|
-
* data to interpret — never a verdict
|
|
3599
|
+
* data to interpret — never a verdict. The significance
|
|
3575
3600
|
* boundary the comparison story (653, 735) stopped short of: those rank by how
|
|
3576
3601
|
* *much* columns differ and return no p-value; this answers *how sure* for one
|
|
3577
3602
|
* chosen pair of groups and hands the p-value back as data. There is no
|
|
@@ -3596,12 +3621,12 @@ export interface StatisticsApi {
|
|
|
3596
3621
|
* per predictor; a Breusch–Pagan heteroscedasticity flag; and, for a single
|
|
3597
3622
|
* predictor, a pointwise confidence band. `method` is `ols`, `wls` (needs a
|
|
3598
3623
|
* `weights` column) or `robust`; `quantile` is reserved and the regularised
|
|
3599
|
-
* families refuse. Null on degenerate input
|
|
3624
|
+
* families refuse. Null on degenerate input.
|
|
3600
3625
|
*/
|
|
3601
3626
|
regressionModel(spec: RegressionSpec): RegressionModel | null;
|
|
3602
3627
|
/**
|
|
3603
3628
|
* The Augmented Dickey-Fuller stationarity test over the `of` series in
|
|
3604
|
-
* `orderBy` order
|
|
3629
|
+
* `orderBy` order, constant+trend form with the lag order
|
|
3605
3630
|
* chosen by AIC up to an optional cap. Returns the statistic, the lag used,
|
|
3606
3631
|
* MacKinnon's critical values, an approximate (interpolated) p-value and a
|
|
3607
3632
|
* plain-language verdict at the 5% level — a scalar readout, not a column.
|
|
@@ -3609,7 +3634,7 @@ export interface StatisticsApi {
|
|
|
3609
3634
|
adf(spec: { of: string; orderBy: string; maxlag?: number }): AdfResult | null;
|
|
3610
3635
|
/**
|
|
3611
3636
|
* The autocorrelation (ACF) and partial autocorrelation (PACF) of the `of`
|
|
3612
|
-
* series in `orderBy` order out to `maxlag
|
|
3637
|
+
* series in `orderBy` order out to `maxlag`, with the
|
|
3613
3638
|
* approximate ±1.96/√n band. A short-series readout; feed the arrays to a bar
|
|
3614
3639
|
* chart over explicit points with the band as reference lines. The lag-1
|
|
3615
3640
|
* autocorrelation matches `series(...).autocorrelation`.
|
|
@@ -3653,7 +3678,7 @@ export interface StatisticsApi {
|
|
|
3653
3678
|
*/
|
|
3654
3679
|
series(colId: string, opts: { by: string; periodsPerYear?: number }): SeriesStats | null;
|
|
3655
3680
|
/**
|
|
3656
|
-
* Forecast one column forward
|
|
3681
|
+
* Forecast one column forward: the stats-surface face of the
|
|
3657
3682
|
* {@link forecast} kernel. The column is read over the filtered rows in arrival
|
|
3658
3683
|
* order, or ordered by `opts.by` (a date or numeric column, as {@link series}
|
|
3659
3684
|
* orders) when the time axis matters, then projected `opts.horizon` steps ahead
|
|
@@ -3686,7 +3711,7 @@ export interface StatisticsApi {
|
|
|
3686
3711
|
*/
|
|
3687
3712
|
maintenanceTier(fn: string): MaintenanceTier;
|
|
3688
3713
|
/**
|
|
3689
|
-
* A windowed aggregate — "the average lately"
|
|
3714
|
+
* A windowed aggregate — "the average lately" — over one
|
|
3690
3715
|
* column, stamped with the window it covers (`over`), so a windowed figure is
|
|
3691
3716
|
* never read without its window. Exact over the values inside the window.
|
|
3692
3717
|
*
|
|
@@ -3763,7 +3788,7 @@ export interface WindowSpec {
|
|
|
3763
3788
|
export const WINDOW_KINDS: readonly ('count' | 'time' | 'session')[];
|
|
3764
3789
|
|
|
3765
3790
|
/**
|
|
3766
|
-
* A sliding window over a stream of timestamped values
|
|
3791
|
+
* A sliding window over a stream of timestamped values. Holds
|
|
3767
3792
|
* the values currently in the window and re-reduces them on demand; the reduction
|
|
3768
3793
|
* is exact over the values in the window. `grid.statistics.windowed(...)` drives
|
|
3769
3794
|
* one of these over a column; a host can also drive one live, tick by tick.
|
|
@@ -3794,7 +3819,7 @@ export function openWindow(
|
|
|
3794
3819
|
): Window;
|
|
3795
3820
|
|
|
3796
3821
|
/**
|
|
3797
|
-
* The anomaly-detection methods
|
|
3822
|
+
* The anomaly-detection methods: the robust univariate
|
|
3798
3823
|
* modified z-score, Tukey's IQR fences, and multivariate Mahalanobis distance.
|
|
3799
3824
|
* Interpretable statistics with written-down cuts, never a black box.
|
|
3800
3825
|
*/
|
|
@@ -3838,7 +3863,7 @@ export function mahalanobis(
|
|
|
3838
3863
|
flagged: number } | null;
|
|
3839
3864
|
|
|
3840
3865
|
/**
|
|
3841
|
-
* The rolling (windowed) anomaly methods
|
|
3866
|
+
* The rolling (windowed) anomaly methods: the robust modified
|
|
3842
3867
|
* z-score and Tukey's IQR fences, each computed over a trailing window rather
|
|
3843
3868
|
* than the whole series, for live monitoring where a drift or a shifted regime
|
|
3844
3869
|
* must not poison a global baseline.
|
|
@@ -3846,7 +3871,7 @@ export function mahalanobis(
|
|
|
3846
3871
|
export const ROLLING_ANOMALY_METHODS: readonly ('rollingModifiedZScore' | 'rollingIqr')[];
|
|
3847
3872
|
|
|
3848
3873
|
/**
|
|
3849
|
-
* Rolling (windowed) anomaly detection
|
|
3874
|
+
* Rolling (windowed) anomaly detection: judge every reading
|
|
3850
3875
|
* against a causal trailing window ending at it — the current point and the
|
|
3851
3876
|
* `window − 1` before it — so a spike is caught against its recent neighbours and
|
|
3852
3877
|
* a slow drift does not permanently poison the baseline. With a window at least
|
|
@@ -3864,9 +3889,9 @@ export function rollingAnomalies(
|
|
|
3864
3889
|
scores: (number | null)[]; flags: boolean[]; flagged: number };
|
|
3865
3890
|
|
|
3866
3891
|
/**
|
|
3867
|
-
* Build a Data Router alert condition from an anomaly detector
|
|
3892
|
+
* Build a Data Router alert condition from an anomaly detector:
|
|
3868
3893
|
* a `(rows) => signal` for the router's existing `router.alert(value, condition,
|
|
3869
|
-
* handler)
|
|
3894
|
+
* handler)`, so live monitoring reuses the router's
|
|
3870
3895
|
* partitioning, debounce and rising-edge re-arm rather than duplicating any of
|
|
3871
3896
|
* it. Reads one numeric `field` off each row, runs the chosen detector, and
|
|
3872
3897
|
* returns the flagged rows and scores when anything is anomalous or `false` when
|
|
@@ -3884,7 +3909,7 @@ export function anomalyCondition(
|
|
|
3884
3909
|
false | { method: string; field: string; flagged: { row: Record<string, unknown>; score: number | null }[] };
|
|
3885
3910
|
|
|
3886
3911
|
/**
|
|
3887
|
-
* The forecasting methods a caller may ask for
|
|
3912
|
+
* The forecasting methods a caller may ask for, named so a
|
|
3888
3913
|
* result says which produced it: a trailing moving average, single / double
|
|
3889
3914
|
* (Holt) / triple (Holt-Winters) exponential smoothing, and a linear least-squares
|
|
3890
3915
|
* fit of the time axis.
|
|
@@ -3935,7 +3960,7 @@ export interface ForecastResult {
|
|
|
3935
3960
|
}
|
|
3936
3961
|
|
|
3937
3962
|
/**
|
|
3938
|
-
* Forecast an ordered series `horizon` steps into the future
|
|
3963
|
+
* Forecast an ordered series `horizon` steps into the future.
|
|
3939
3964
|
*
|
|
3940
3965
|
* `movingAverage` and `ses` are flat forecasts (the trailing-window mean, the
|
|
3941
3966
|
* final smoothed level); `holt` adds a projected trend, `holtWinters` a projected
|
|
@@ -3964,7 +3989,7 @@ export type ShadowKind =
|
|
|
3964
3989
|
| 'rank' | 'rankAsc' | 'rankChange' | 'percentile' | 'quartile'
|
|
3965
3990
|
| 'zScore' | 'shareOfTotal'
|
|
3966
3991
|
/**
|
|
3967
|
-
* A robust outlier score and flag per row
|
|
3992
|
+
* A robust outlier score and flag per row: the modified
|
|
3968
3993
|
* z-score on the median and MAD, and the boolean of whether it clears
|
|
3969
3994
|
* `threshold` (default 3.5, read off the shadow declaration). Sortable,
|
|
3970
3995
|
* filterable, groupable and exportable like any cell. Null where there is no
|
|
@@ -3980,8 +4005,7 @@ export type ShadowKind =
|
|
|
3980
4005
|
*/
|
|
3981
4006
|
| 'specStatus'
|
|
3982
4007
|
/**
|
|
3983
|
-
* Rolling time-series aggregates over a stated `orderBy` (
|
|
3984
|
-
* Phase 1), computed in one ordered pass the grid caches by row key and never
|
|
4008
|
+
* Rolling time-series aggregates over a stated `orderBy` (Phase 1), computed in one ordered pass the grid caches by row key and never
|
|
3985
4009
|
* over the screen sort. `rollingSum`/`rollingAvg`/`rollingMin`/`rollingMax`
|
|
3986
4010
|
* reduce the `window`; `windowCoverage` reports how much of the requested
|
|
3987
4011
|
* window a row actually covers (so a partial window is never dressed as full);
|
|
@@ -3992,7 +4016,7 @@ export type ShadowKind =
|
|
|
3992
4016
|
| 'rollingSum' | 'rollingAvg' | 'rollingMin' | 'rollingMax'
|
|
3993
4017
|
| 'windowCoverage' | 'cumulativeToDate' | 'periodOverPeriod'
|
|
3994
4018
|
/**
|
|
3995
|
-
* A rolling quantile over the `orderBy` window
|
|
4019
|
+
* A rolling quantile over the `orderBy` window — a trailing
|
|
3996
4020
|
* median or p95, the quantile set by `q`. Exact while the window is small;
|
|
3997
4021
|
* past an internal span cap, and for a session window, it comes from a KLL
|
|
3998
4022
|
* sketch and `windowApproximate` reports which rows are approximate, so a
|
|
@@ -4000,7 +4024,7 @@ export type ShadowKind =
|
|
|
4000
4024
|
*/
|
|
4001
4025
|
| 'rollingQuantile' | 'windowApproximate'
|
|
4002
4026
|
/**
|
|
4003
|
-
* Classical seasonal decomposition over a declared `period
|
|
4027
|
+
* Classical seasonal decomposition over a declared `period`,
|
|
4004
4028
|
* matching `statsmodels.seasonal_decompose`: `tsTrend` is the centred
|
|
4005
4029
|
* moving-average trend, `tsSeasonal` the repeating seasonal index, `tsResidual`
|
|
4006
4030
|
* what the two leave behind, and `tsCoverage` the stamp (1 for an interior row,
|
|
@@ -4010,7 +4034,7 @@ export type ShadowKind =
|
|
|
4010
4034
|
*/
|
|
4011
4035
|
| 'tsTrend' | 'tsSeasonal' | 'tsResidual' | 'tsCoverage'
|
|
4012
4036
|
/**
|
|
4013
|
-
* Exponential smoothing over the `orderBy` series
|
|
4037
|
+
* Exponential smoothing over the `orderBy` series:
|
|
4014
4038
|
* `tsSmoothed` is the fitted level from single exponential smoothing (`ses`) or
|
|
4015
4039
|
* Holt's level+trend (`holt`) — the signal with the noise removed, not a
|
|
4016
4040
|
* forecast. The smoothing factor(s) are caller-set or fit by minimising
|
|
@@ -4020,7 +4044,7 @@ export type ShadowKind =
|
|
|
4020
4044
|
*/
|
|
4021
4045
|
| 'tsSmoothed' | 'tsSmoothingAlpha' | 'tsSmoothingBeta'
|
|
4022
4046
|
/**
|
|
4023
|
-
* Model-backed regression shadows
|
|
4047
|
+
* Model-backed regression shadows: the predicted value, the
|
|
4024
4048
|
* residual, and a Cook's-distance influence flag for the row, read from the
|
|
4025
4049
|
* fitted model named on the shadow declaration (`shadow: { kind:
|
|
4026
4050
|
* 'fitResidual', model: { predictors, response, method } }`). They follow the
|
|
@@ -4030,7 +4054,7 @@ export type ShadowKind =
|
|
|
4030
4054
|
* via `threshold`); "not influential" (`false`) and "cannot tell" (`null`)
|
|
4031
4055
|
* stay distinct.
|
|
4032
4056
|
*
|
|
4033
|
-
* `fitStdResidual`, `fitLeverage` and `fitCooksD`
|
|
4057
|
+
* `fitStdResidual`, `fitLeverage` and `fitCooksD` surface
|
|
4034
4058
|
* the diagnostics the engine already computes — the internally studentised
|
|
4035
4059
|
* residual `eᵢ/(s·√(1−hᵢ))`, the hat-matrix leverage `hᵢ`, and Cook's distance
|
|
4036
4060
|
* — as their own numeric columns, so the scale-location and
|
|
@@ -4054,7 +4078,7 @@ export interface RegressionFit {
|
|
|
4054
4078
|
n: number;
|
|
4055
4079
|
}
|
|
4056
4080
|
|
|
4057
|
-
/** The specification of a multi-predictor model
|
|
4081
|
+
/** The specification of a multi-predictor model. */
|
|
4058
4082
|
export interface RegressionSpec {
|
|
4059
4083
|
/** The predictor column ids. */
|
|
4060
4084
|
predictors: string[];
|
|
@@ -4080,7 +4104,7 @@ export interface RegressionCoefficient {
|
|
|
4080
4104
|
p: number;
|
|
4081
4105
|
/**
|
|
4082
4106
|
* The Wald confidence interval at the model's confidence level
|
|
4083
|
-
*
|
|
4107
|
+
* — the whiskers a coefficient forest plot draws. Null when
|
|
4084
4108
|
* there is no residual degree of freedom to form a critical value.
|
|
4085
4109
|
*/
|
|
4086
4110
|
lower: number | null;
|
|
@@ -4102,7 +4126,7 @@ export interface Heteroscedasticity {
|
|
|
4102
4126
|
heteroscedastic: boolean;
|
|
4103
4127
|
}
|
|
4104
4128
|
|
|
4105
|
-
/** The Augmented Dickey-Fuller stationarity test result
|
|
4129
|
+
/** The Augmented Dickey-Fuller stationarity test result. */
|
|
4106
4130
|
export interface AdfResult {
|
|
4107
4131
|
/** The ADF t-statistic on the lagged level. */
|
|
4108
4132
|
statistic: number;
|
|
@@ -4124,7 +4148,7 @@ export interface AdfResult {
|
|
|
4124
4148
|
regression: 'ct';
|
|
4125
4149
|
}
|
|
4126
4150
|
|
|
4127
|
-
/** Autocorrelation (ACF) and partial autocorrelation (PACF) arrays
|
|
4151
|
+
/** Autocorrelation (ACF) and partial autocorrelation (PACF) arrays. */
|
|
4128
4152
|
export interface AcfResult {
|
|
4129
4153
|
/** The autocorrelation at each lag; index 0 is lag 0 and is always 1. */
|
|
4130
4154
|
acf: number[];
|
|
@@ -4140,7 +4164,7 @@ export interface AcfResult {
|
|
|
4140
4164
|
approximate: boolean;
|
|
4141
4165
|
}
|
|
4142
4166
|
|
|
4143
|
-
/** A fitted multi-predictor linear model and its diagnostics
|
|
4167
|
+
/** A fitted multi-predictor linear model and its diagnostics. */
|
|
4144
4168
|
export interface RegressionModel {
|
|
4145
4169
|
method: string;
|
|
4146
4170
|
coefficients: RegressionCoefficient[];
|
|
@@ -4245,7 +4269,7 @@ export interface ColumnProfile {
|
|
|
4245
4269
|
histogram: HistogramBin[];
|
|
4246
4270
|
/**
|
|
4247
4271
|
* For a categorical (non-numeric) column, the commonest values, largest
|
|
4248
|
-
* first
|
|
4272
|
+
* first. Absent for a numeric column, whose shape the
|
|
4249
4273
|
* numeric figures and the histogram already carry.
|
|
4250
4274
|
*/
|
|
4251
4275
|
topValues?: TopValue[];
|
|
@@ -4257,7 +4281,7 @@ export interface HistogramBin {
|
|
|
4257
4281
|
count: number;
|
|
4258
4282
|
}
|
|
4259
4283
|
|
|
4260
|
-
/** One row of a categorical column's top-values table
|
|
4284
|
+
/** One row of a categorical column's top-values table. */
|
|
4261
4285
|
export interface TopValue {
|
|
4262
4286
|
/** The value itself, as it is stored. */
|
|
4263
4287
|
value: unknown;
|
|
@@ -4296,7 +4320,7 @@ export interface ColumnDifference {
|
|
|
4296
4320
|
reliable: boolean;
|
|
4297
4321
|
}
|
|
4298
4322
|
|
|
4299
|
-
/** The subset-vs-population ranking
|
|
4323
|
+
/** The subset-vs-population ranking. */
|
|
4300
4324
|
export interface SubsetComparison {
|
|
4301
4325
|
/** Every compared column, largest difference first. */
|
|
4302
4326
|
ranked: ColumnDifference[];
|
|
@@ -4518,7 +4542,7 @@ export interface FormattingApi {
|
|
|
4518
4542
|
distribution(colId: string): ColumnDistribution | null;
|
|
4519
4543
|
}
|
|
4520
4544
|
|
|
4521
|
-
/** One recorded validation error
|
|
4545
|
+
/** One recorded validation error. */
|
|
4522
4546
|
export interface ValidationError {
|
|
4523
4547
|
key: string;
|
|
4524
4548
|
colId: string;
|
|
@@ -4526,7 +4550,7 @@ export interface ValidationError {
|
|
|
4526
4550
|
message: string;
|
|
4527
4551
|
}
|
|
4528
4552
|
|
|
4529
|
-
/** The runtime face of declarative column validation
|
|
4553
|
+
/** The runtime face of declarative column validation. */
|
|
4530
4554
|
export interface ValidationApi {
|
|
4531
4555
|
/** Run a column's rules against a value, returning the first failure or null. */
|
|
4532
4556
|
check(colId: string, value: unknown, row?: unknown): { code: string; message: string } | null;
|
|
@@ -4584,7 +4608,7 @@ export type EventName =
|
|
|
4584
4608
|
| 'model:changed' | 'rows:changed' | 'rows:queued' | 'rows:deferred'
|
|
4585
4609
|
| 'rows:paused' | 'rows:resumed' | 'row:received' | 'row:sent' | 'row:copied'
|
|
4586
4610
|
| 'row:moved' | 'source:error' | 'stream:chunk' | 'stream:end' | 'stream:evicted'
|
|
4587
|
-
/* The row-drag gesture as it happens
|
|
4611
|
+
/* The row-drag gesture as it happens. Notifications only:
|
|
4588
4612
|
* the drop is already vetoable by `beforeRowMove` and `beforeRowReceive`, and
|
|
4589
4613
|
* a third veto on the same gesture would be a fourth place to look. All four
|
|
4590
4614
|
* fire on the grid the drag started in and carry a {@link RowDragEvent}. */
|
|
@@ -4592,14 +4616,14 @@ export type EventName =
|
|
|
4592
4616
|
/* Cells and editing */
|
|
4593
4617
|
| 'cell:changed' | 'cell:pending' | 'cell:confirmed' | 'cell:reverted' | 'cell:conflict'
|
|
4594
4618
|
| 'cell:clicked' | 'cell:dblclicked' | 'cell:contextmenu'
|
|
4595
|
-
/* The pointer entering and leaving a cell
|
|
4619
|
+
/* The pointer entering and leaving a cell. Announcements
|
|
4596
4620
|
* only, carrying what `cell:clicked` carries plus the cell element as
|
|
4597
4621
|
* `target`. A host cannot wire these itself: rows and cells are pooled and
|
|
4598
4622
|
* re-used as the grid scrolls, so a listener bound to a cell node fires for
|
|
4599
4623
|
* whichever row occupies it next. Nothing in the grid is gated on hover, so
|
|
4600
4624
|
* a keyboard user reaches everything a pointer does. */
|
|
4601
4625
|
| 'cell:mouseover' | 'cell:mouseout'
|
|
4602
|
-
/* A pointer press and release on a cell
|
|
4626
|
+
/* A pointer press and release on a cell, the same
|
|
4603
4627
|
* convention as the hover pair above: announcements only, carrying what
|
|
4604
4628
|
* `cell:clicked` carries plus the cell element as `target`. A host cannot
|
|
4605
4629
|
* wire these itself for the same reason it cannot wire the hover pair —
|
|
@@ -4629,7 +4653,7 @@ export type EventName =
|
|
|
4629
4653
|
| 'state:changed' | 'state:reset' | 'history:changed' | 'history:applied'
|
|
4630
4654
|
| 'views:changed' | 'view:applied' | 'view:saved' | 'view:removed'
|
|
4631
4655
|
| 'view:renamed' | 'view:default'
|
|
4632
|
-
/* Validation
|
|
4656
|
+
/* Validation: a declared column rule vetoed an edit, or a
|
|
4633
4657
|
* recorded error was cleared. The veto itself rides the cancellable `beforeEdit`. */
|
|
4634
4658
|
| 'validation:failed' | 'validation:cleared'
|
|
4635
4659
|
/* Formatting and presentation */
|
|
@@ -4652,14 +4676,14 @@ export type EventName =
|
|
|
4652
4676
|
| 'export:progress' | 'export:request' | 'export:done'
|
|
4653
4677
|
/* Keyboard help overlay (past-tense notifications) */
|
|
4654
4678
|
| 'shortcuts:opened' | 'shortcuts:closed'
|
|
4655
|
-
/* Print (past-tense notifications
|
|
4679
|
+
/* Print (past-tense notifications) */
|
|
4656
4680
|
| 'print:before' | 'print:after'
|
|
4657
|
-
/* Cancellable before-events
|
|
4681
|
+
/* Cancellable before-events. Delivered through the async
|
|
4658
4682
|
* before-dispatch path with a {@link BeforeEvent} carrying preventDefault. */
|
|
4659
4683
|
| 'beforeEdit' | 'beforeSort' | 'beforeFilter'
|
|
4660
4684
|
| 'beforeColumnMove' | 'beforeColumnResize' | 'beforeColumnHide'
|
|
4661
4685
|
| 'beforeSelect' | 'beforeRowAdd' | 'beforeDelete' | 'beforeRowMove' | 'beforeGroup'
|
|
4662
|
-
/* A row dropped in from another grid, on the receiving grid
|
|
4686
|
+
/* A row dropped in from another grid, on the receiving grid:
|
|
4663
4687
|
* a {@link BeforeRowReceiveEvent}. */
|
|
4664
4688
|
| 'beforeRowReceive'
|
|
4665
4689
|
/* Their cancellation notifications (past-tense, non-cancellable). */
|
|
@@ -4673,7 +4697,7 @@ export type EventName =
|
|
|
4673
4697
|
export interface GridEvent {
|
|
4674
4698
|
type: string;
|
|
4675
4699
|
/**
|
|
4676
|
-
* Who caused the action. `'ai'`
|
|
4700
|
+
* Who caused the action. `'ai'` tags a write an AI proposed
|
|
4677
4701
|
* and a human approved, applied through `grid.edit.setCells(writes, type,
|
|
4678
4702
|
* { origin: 'ai' })`; it fires the same cancellable `beforeEdit` gate a
|
|
4679
4703
|
* `'user'` edit does, so a host can policy-gate AI writes distinctly.
|
|
@@ -4684,7 +4708,7 @@ export interface GridEvent {
|
|
|
4684
4708
|
}
|
|
4685
4709
|
|
|
4686
4710
|
/**
|
|
4687
|
-
* A cancellable *before*-event
|
|
4711
|
+
* A cancellable *before*-event, delivered to `on('beforeX')`
|
|
4688
4712
|
* handlers before a user-initiated mutation is applied.
|
|
4689
4713
|
*
|
|
4690
4714
|
* A handler cancels the pending action by calling `preventDefault(reason?)`; the
|
|
@@ -4709,7 +4733,7 @@ export interface BeforeEvent extends GridEvent {
|
|
|
4709
4733
|
}
|
|
4710
4734
|
|
|
4711
4735
|
/**
|
|
4712
|
-
* The `beforeRowReceive` event
|
|
4736
|
+
* The `beforeRowReceive` event: a row dragged from another
|
|
4713
4737
|
* grid is about to be inserted into this one. Fires on the **receiving** grid,
|
|
4714
4738
|
* before the insert, with the row under the pointer named — so a drop that
|
|
4715
4739
|
* means "assign this to that" can be recorded by the host and the insert
|
|
@@ -4721,7 +4745,7 @@ export interface BeforeEvent extends GridEvent {
|
|
|
4721
4745
|
* The paired `rowReceive:cancelled` carries the same context plus the reason.
|
|
4722
4746
|
*
|
|
4723
4747
|
* Like every {@link BeforeEvent}, the handler may be `async`; the insert is
|
|
4724
|
-
* held until it settles, and is cancelled as `'stale'`
|
|
4748
|
+
* held until it settles, and is cancelled as `'stale'` if
|
|
4725
4749
|
* the source row is gone by then, or if the row under the pointer is gone or
|
|
4726
4750
|
* has moved to a different index — `at` names a slot as "before `overKey`",
|
|
4727
4751
|
* and once that is no longer where `overKey`'s row sits, `at` is a stale index
|
|
@@ -4742,7 +4766,7 @@ export interface BeforeRowReceiveEvent extends BeforeEvent {
|
|
|
4742
4766
|
* `overKey` names a row, this is guaranteed to still be that row's index at
|
|
4743
4767
|
* the moment the insert actually runs — an async handler that leaves the
|
|
4744
4768
|
* named row at a different index causes the drop to be cancelled as
|
|
4745
|
-
* `'stale'`
|
|
4769
|
+
* `'stale'` rather than inserted at this index regardless.
|
|
4746
4770
|
*/
|
|
4747
4771
|
at: number;
|
|
4748
4772
|
/**
|
|
@@ -4757,7 +4781,7 @@ export interface BeforeRowReceiveEvent extends BeforeEvent {
|
|
|
4757
4781
|
}
|
|
4758
4782
|
|
|
4759
4783
|
/**
|
|
4760
|
-
* The `rowReceive:cancelled` event
|
|
4784
|
+
* The `rowReceive:cancelled` event: a `beforeRowReceive`
|
|
4761
4785
|
* was vetoed, or went stale during an async handler. Nothing was inserted and
|
|
4762
4786
|
* the source grid is untouched.
|
|
4763
4787
|
*/
|
|
@@ -4779,7 +4803,7 @@ export interface RowReceiveCancelledEvent extends GridEvent {
|
|
|
4779
4803
|
}
|
|
4780
4804
|
|
|
4781
4805
|
/**
|
|
4782
|
-
* The row-drag lifecycle events
|
|
4806
|
+
* The row-drag lifecycle events: `rowDrag:started`,
|
|
4783
4807
|
* `rowDrag:moved`, `rowDrag:left` and `rowDrag:ended`, which report a row drag
|
|
4784
4808
|
* *as it happens* rather than once it has settled. Before them a host got the
|
|
4785
4809
|
* handle the grid draws and then one settled event, with nothing in between to
|
|
@@ -4860,7 +4884,7 @@ export interface RowDragEvent extends GridEvent {
|
|
|
4860
4884
|
}
|
|
4861
4885
|
|
|
4862
4886
|
/**
|
|
4863
|
-
* The `state:changed` event
|
|
4887
|
+
* The `state:changed` event.
|
|
4864
4888
|
*
|
|
4865
4889
|
* Fires once per logical state change, whether it began as a user gesture or
|
|
4866
4890
|
* as a programmatic call, so view persistence is built on this one event
|
|
@@ -4874,7 +4898,7 @@ export interface RowDragEvent extends GridEvent {
|
|
|
4874
4898
|
* A host predicate registered, replaced or removed through
|
|
4875
4899
|
* `filters.where(name, fn)`, and a `filters.reapply()` that re-runs one, go
|
|
4876
4900
|
* through the same tracked door as `sort` and `filters`: each fires this
|
|
4877
|
-
* event once, `cause: 'user'`, with `'where'` in `sections
|
|
4901
|
+
* event once, `cause: 'user'`, with `'where'` in `sections`.
|
|
4878
4902
|
*/
|
|
4879
4903
|
export interface StateChangedEvent extends GridEvent {
|
|
4880
4904
|
/** Why the state changed. `'reset'` is the one a save should ignore. */
|
|
@@ -5081,8 +5105,7 @@ export interface ColumnsApi {
|
|
|
5081
5105
|
*
|
|
5082
5106
|
* With no `scope`, `fn` becomes the column's single `total`, applied to both
|
|
5083
5107
|
* group subtotals and the grand total, and any independent group/grand
|
|
5084
|
-
* overrides are cleared — the same one-property behaviour as before
|
|
5085
|
-
* (BACKLOG-0000726). Pass `scope: 'group'` or `scope: 'grand'` to set just
|
|
5108
|
+
* overrides are cleared — the same one-property behaviour as before. Pass `scope: 'group'` or `scope: 'grand'` to set just
|
|
5086
5109
|
* that scope's reduction independently, leaving the other and the base
|
|
5087
5110
|
* `total` untouched; the scope that has no override falls back to `total`.
|
|
5088
5111
|
*/
|
|
@@ -5117,12 +5140,11 @@ export interface ColumnsApi {
|
|
|
5117
5140
|
hide(ids: string | string[]): void;
|
|
5118
5141
|
move(id: string, to: number): void;
|
|
5119
5142
|
/**
|
|
5120
|
-
* Wrap leaf columns in a banded header, or add them to an existing band
|
|
5121
|
-
* (BACKLOG-0000739). Header banding, not row grouping (see {@link group}); the
|
|
5143
|
+
* Wrap leaf columns in a banded header, or add them to an existing band. Header banding, not row grouping (see {@link group}); the
|
|
5122
5144
|
* band is a {@link ColumnGroup} node so a drag-, keyboard- or config-built band
|
|
5123
5145
|
* is the same tree, and it round-trips through a saved view. Emits
|
|
5124
5146
|
* `columngroup:changed`. Pass `groupId` to add to the band already carrying
|
|
5125
|
-
* that id, or `id`
|
|
5147
|
+
* that id, or `id` to create a new band with a caller-chosen
|
|
5126
5148
|
* stable id you can reference later; `groupId` wins if both are given and an
|
|
5127
5149
|
* `id` already in use warns and no-ops.
|
|
5128
5150
|
*/
|
|
@@ -5238,7 +5260,7 @@ export interface CellRange {
|
|
|
5238
5260
|
|
|
5239
5261
|
/**
|
|
5240
5262
|
* How a `where` predicate is re-evaluated, whether `filters.clear()` may remove
|
|
5241
|
-
* it, and what the source may be told about it
|
|
5263
|
+
* it, and what the source may be told about it.
|
|
5242
5264
|
*/
|
|
5243
5265
|
export interface WhereOptions {
|
|
5244
5266
|
/**
|
|
@@ -5265,7 +5287,7 @@ export interface WhereOptions {
|
|
|
5265
5287
|
* **The twin is what works at any size.** Without one, a pushdown source can
|
|
5266
5288
|
* still run the function — but only as the residual over the whole matching
|
|
5267
5289
|
* set, so it does so only while that set is under `whereRowLimit` (default
|
|
5268
|
-
* `50_000`) and refuses loudly past it
|
|
5290
|
+
* `50_000`) and refuses loudly past it. A paged or remote
|
|
5269
5291
|
* source cannot run it at all and warns at registration. The twin is pushed
|
|
5270
5292
|
* to the engine, so it narrows the fetch itself and none of that applies.
|
|
5271
5293
|
*/
|
|
@@ -5287,7 +5309,7 @@ export interface FiltersApi {
|
|
|
5287
5309
|
where(): string[];
|
|
5288
5310
|
/**
|
|
5289
5311
|
* Register, replace or remove a named row predicate composed with the filter
|
|
5290
|
-
* set
|
|
5312
|
+
* set.
|
|
5291
5313
|
*
|
|
5292
5314
|
* Registering *is* activating: there is no companion "a predicate is present"
|
|
5293
5315
|
* flag to keep in sync, which is the failure mode this replaces. Several may
|
|
@@ -5335,7 +5357,7 @@ export interface EditApi {
|
|
|
5335
5357
|
* `'api'` — the ungated seam every existing caller uses (a fill, a paste, a
|
|
5336
5358
|
* kanban move), unchanged. Pass `{ origin: 'ai' }` (or `'user'`) to route the
|
|
5337
5359
|
* write through the cancellable `beforeEdit` gate, exactly as an interactive
|
|
5338
|
-
* edit is
|
|
5360
|
+
* edit is: the AI writes through this so a host `beforeEdit`
|
|
5339
5361
|
* handler can veto it and nothing persists when it does. With a gated origin
|
|
5340
5362
|
* and an async (deferring) before-handler, the return is a `Promise<number>`.
|
|
5341
5363
|
*/
|
|
@@ -5412,7 +5434,7 @@ export interface EditApi {
|
|
|
5412
5434
|
deleteRow(key: string): string | null;
|
|
5413
5435
|
/**
|
|
5414
5436
|
* Delete rows on a user gesture, through the cancellable `beforeDelete` event
|
|
5415
|
-
* (§18.4
|
|
5437
|
+
* (§18.4) — what the built-in Delete-key and "Delete row"
|
|
5416
5438
|
* gestures call. Unlike {@link deleteRow}, `beforeDelete` fires on a
|
|
5417
5439
|
* memory-source grid too, so the row can be confirmed or vetoed there. Off
|
|
5418
5440
|
* until `config.rowDelete` opts in; the keys default to the row selection.
|
|
@@ -5539,15 +5561,14 @@ export interface ImportXlsxPreview {
|
|
|
5539
5561
|
warnings: string[];
|
|
5540
5562
|
}
|
|
5541
5563
|
|
|
5542
|
-
/** Bringing rows in — the mirror of {@link ExportApi} (§14
|
|
5564
|
+
/** Bringing rows in — the mirror of {@link ExportApi} (§14). */
|
|
5543
5565
|
export interface ImportApi {
|
|
5544
5566
|
/** Parse delimited text into a preview, changing nothing. */
|
|
5545
5567
|
preview(text: string, opts?: object): ImportPreview;
|
|
5546
5568
|
/** Parse delimited text into coerced records — the inverse of `export.csv`. */
|
|
5547
5569
|
csv(text: string, opts?: object): Record<string, unknown>[];
|
|
5548
5570
|
/**
|
|
5549
|
-
* Parse an `.xlsx` file's bytes into a preview, changing nothing (§14
|
|
5550
|
-
* BACKLOG-0000970). Async: the archive is inflated with `DecompressionStream`.
|
|
5571
|
+
* Parse an `.xlsx` file's bytes into a preview, changing nothing (§14). Async: the archive is inflated with `DecompressionStream`.
|
|
5551
5572
|
*/
|
|
5552
5573
|
previewXlsx(bytes: Uint8Array | ArrayBuffer, opts?: object): Promise<ImportXlsxPreview>;
|
|
5553
5574
|
/** Parse an `.xlsx` file's bytes into coerced records — the inverse of `export.excel`. */
|
|
@@ -5612,8 +5633,7 @@ export interface RowStyleParams {
|
|
|
5612
5633
|
* interactive throughout.
|
|
5613
5634
|
*/
|
|
5614
5635
|
/**
|
|
5615
|
-
* Rendering the grid to a still image. `scale` multiplies the pixel dimensions
|
|
5616
|
-
*: 2 for a retina still, 3 or 4 for a slide. `background` fills behind the
|
|
5636
|
+
* Rendering the grid to a still image. `scale` multiplies the pixel dimensions: 2 for a retina still, 3 or 4 for a slide. `background` fills behind the
|
|
5617
5637
|
* grid so a PNG dropped into a deck does not show it through.
|
|
5618
5638
|
*/
|
|
5619
5639
|
export interface CaptureOptions {
|
|
@@ -5631,7 +5651,7 @@ export interface CaptureOptions {
|
|
|
5631
5651
|
* cleared when a presentation ends.
|
|
5632
5652
|
*/
|
|
5633
5653
|
/**
|
|
5634
|
-
* A durable annotation mark descriptor
|
|
5654
|
+
* A durable annotation mark descriptor — the shape a host
|
|
5635
5655
|
* seeds through `state.annotations`, adds through {@link AnnotationApi.add}, and
|
|
5636
5656
|
* reads back through {@link AnnotationApi.list} and `getState`.
|
|
5637
5657
|
*
|
|
@@ -5639,7 +5659,7 @@ export interface CaptureOptions {
|
|
|
5639
5659
|
* stored in), so a mark tracks scroll and resize rather than hanging over the
|
|
5640
5660
|
* viewport. A `freehand` mark is a trail of points; `arrow` and `rect` are their
|
|
5641
5661
|
* two endpoints. A `text` mark is a label anchored at a single content point,
|
|
5642
|
-
* carrying its `text` string and an optional basic style
|
|
5662
|
+
* carrying its `text` string and an optional basic style.
|
|
5643
5663
|
* `pen` is accepted as an alias for `freehand` on input; `list()` reports
|
|
5644
5664
|
* `freehand`.
|
|
5645
5665
|
*/
|
|
@@ -5671,8 +5691,7 @@ export interface AnnotationApi {
|
|
|
5671
5691
|
readonly count: number;
|
|
5672
5692
|
use(tool: 'pen' | 'arrow' | 'rect' | 'highlight' | null, opts?: { colour?: string }): string | null;
|
|
5673
5693
|
/**
|
|
5674
|
-
* Add a durable mark from a descriptor, without synthesising pointer input
|
|
5675
|
-
* (BACKLOG-0000813). The mark is painted, survives a presentation ending, and
|
|
5694
|
+
* Add a durable mark from a descriptor, without synthesising pointer input. The mark is painted, survives a presentation ending, and
|
|
5676
5695
|
* round-trips through `getState`. Returns the mark count.
|
|
5677
5696
|
*/
|
|
5678
5697
|
add(mark: AnnotationMark): number;
|
|
@@ -6064,7 +6083,7 @@ export interface PresentationApi {
|
|
|
6064
6083
|
}
|
|
6065
6084
|
|
|
6066
6085
|
/**
|
|
6067
|
-
* Controls for the pivot presentation (§10
|
|
6086
|
+
* Controls for the pivot presentation (§10): expand or collapse
|
|
6068
6087
|
* an axis node, and read the collapse state a saved view carries. Every method
|
|
6069
6088
|
* is a no-op on a headless grid, which has no matrix to collapse.
|
|
6070
6089
|
*/
|
|
@@ -6106,7 +6125,7 @@ export interface HighlightApi {
|
|
|
6106
6125
|
}
|
|
6107
6126
|
|
|
6108
6127
|
/**
|
|
6109
|
-
* The in-grid find bar's settings
|
|
6128
|
+
* The in-grid find bar's settings. `find: true` or an
|
|
6110
6129
|
* omitted key mounts the bar with these defaults; `find: false` removes the
|
|
6111
6130
|
* bar and its shortcut while `grid.find` keeps working programmatically.
|
|
6112
6131
|
*/
|
|
@@ -6177,7 +6196,7 @@ export interface FindState {
|
|
|
6177
6196
|
}
|
|
6178
6197
|
|
|
6179
6198
|
/**
|
|
6180
|
-
* In-grid find
|
|
6199
|
+
* In-grid find: locate text and step through where it
|
|
6181
6200
|
* occurs without filtering anything away. Matches are a visual overlay — no
|
|
6182
6201
|
* row is reordered, removed or edited — and coexist with the quick filter.
|
|
6183
6202
|
*/
|
|
@@ -6376,9 +6395,8 @@ export interface CellMenuParams {
|
|
|
6376
6395
|
key: string;
|
|
6377
6396
|
/**
|
|
6378
6397
|
* The column under the pointer, or `null` when the row belongs to no column:
|
|
6379
|
-
* a right-click in the empty tail of a row beyond the last column
|
|
6380
|
-
*
|
|
6381
|
-
* The grid-level menu stands in that case (BACKLOG-0001068).
|
|
6398
|
+
* a right-click in the empty tail of a row beyond the last column, or on a group row, pivot group row or full-width row.
|
|
6399
|
+
* The grid-level menu stands in that case.
|
|
6382
6400
|
*/
|
|
6383
6401
|
colId: string | null;
|
|
6384
6402
|
/** The cell's value; `undefined` when there is no column. */
|
|
@@ -6858,8 +6876,7 @@ export function createPushdownSource(
|
|
|
6858
6876
|
lastPlan(): PushdownPlan | null;
|
|
6859
6877
|
/**
|
|
6860
6878
|
* Compute a set of aggregates over the matching set, splitting them between
|
|
6861
|
-
* the engine and the client by the design-time `aggregates` config
|
|
6862
|
-
* (BACKLOG-0000730 Part B). Ungrouped, returns the engine-computed `values`
|
|
6879
|
+
* the engine and the client by the design-time `aggregates` config. Ungrouped, returns the engine-computed `values`
|
|
6863
6880
|
* keyed by id. When the request carries a `groupBy`, returns `groups` instead:
|
|
6864
6881
|
* one entry per subtotal level and the grand total (`level: 0`, produced by a
|
|
6865
6882
|
* single `GROUP BY ROLLUP`), each with its key values and its aggregate values
|
|
@@ -6886,7 +6903,7 @@ export function createPushdownSource(
|
|
|
6886
6903
|
};
|
|
6887
6904
|
|
|
6888
6905
|
/**
|
|
6889
|
-
* Load a JSON or NDJSON file from a URL
|
|
6906
|
+
* Load a JSON or NDJSON file from a URL.
|
|
6890
6907
|
*
|
|
6891
6908
|
* Returns a `StreamSourceConfig` for `createGrid(el, { source: createUrlSource(url, opts) })`.
|
|
6892
6909
|
* A JSON file (a top-level array, or a nested array selected by `rowsPath`/`map`)
|
|
@@ -6933,7 +6950,7 @@ export function createUrlSource(
|
|
|
6933
6950
|
): StreamSourceConfig;
|
|
6934
6951
|
|
|
6935
6952
|
/**
|
|
6936
|
-
* The pushdown map
|
|
6953
|
+
* The pushdown map: one published record per statistic
|
|
6937
6954
|
* giving whether the engine can express it, the DuckDB aggregate SQL it emits,
|
|
6938
6955
|
* and whether that result is IDENTICAL to the grid's own kernel or MAY-DIFFER.
|
|
6939
6956
|
* The single source of truth the push router, the docs and `lastPlan()` all read.
|
|
@@ -7035,8 +7052,7 @@ export function odataAdapter(options: {
|
|
|
7035
7052
|
* read-only; `true` advertises `mutate: { update: true, delete: true, append:
|
|
7036
7053
|
* true, returning: 'row' }` so a committed cell edit is persisted with
|
|
7037
7054
|
* `PATCH`, a row delete with `DELETE /EntitySet(key)`, and an add-row with
|
|
7038
|
-
* `POST /EntitySet` reading the created entity back (§7 OData
|
|
7039
|
-
* BACKLOG-0000766, BACKLOG-0000795).
|
|
7055
|
+
* `POST /EntitySet` reading the created entity back (§7 OData).
|
|
7040
7056
|
*/
|
|
7041
7057
|
edit?: boolean;
|
|
7042
7058
|
}): PushdownAdapter & { urlFor(query: RemoteRequest): string };
|
|
@@ -7056,7 +7072,7 @@ export function restAdapter(options: {
|
|
|
7056
7072
|
* read-only; `true` advertises `mutate: { update: true, delete: true, append:
|
|
7057
7073
|
* true, returning }` so a committed cell edit is persisted with `PATCH`, a row
|
|
7058
7074
|
* delete with `DELETE`, and an add-row with `POST` to the collection URL
|
|
7059
|
-
* (§7 REST
|
|
7075
|
+
* (§7 REST).
|
|
7060
7076
|
*/
|
|
7061
7077
|
edit?: boolean;
|
|
7062
7078
|
/**
|
|
@@ -7116,8 +7132,7 @@ export function duckdbAdapter(options: {
|
|
|
7116
7132
|
/**
|
|
7117
7133
|
* Whether to count the matching set at all. `true` by default: the total is a
|
|
7118
7134
|
* separate `count(*)` statement carrying the same `WHERE`, dispatched in the
|
|
7119
|
-
* same tick as the page query rather than serialised behind it
|
|
7120
|
-
* (BACKLOG-0001065). `false` issues no count statement, declares
|
|
7135
|
+
* same tick as the page query rather than serialised behind it. `false` issues no count statement, declares
|
|
7121
7136
|
* `capabilities.total: false`, and leaves the result's `total` **absent** — so
|
|
7122
7137
|
* the grid scrolls open-ended instead of being told the page length is the
|
|
7123
7138
|
* whole set. Turn it off for a grid that never shows a count: an unfiltered
|
|
@@ -7135,8 +7150,7 @@ export function duckdbAdapter(options: {
|
|
|
7135
7150
|
/**
|
|
7136
7151
|
* Allow write-back against a plain writable table. `false` (the default) keeps
|
|
7137
7152
|
* the source read-only, so a `from` that is a view or an expression can never
|
|
7138
|
-
* be mutated by accident. Enables `update`, `delete` and `append
|
|
7139
|
-
* (BACKLOG-0000765, BACKLOG-0000795).
|
|
7153
|
+
* be mutated by accident. Enables `update`, `delete` and `append`.
|
|
7140
7154
|
*/
|
|
7141
7155
|
writable?: boolean;
|
|
7142
7156
|
/**
|
|
@@ -7151,13 +7165,11 @@ export function duckdbAdapter(options: {
|
|
|
7151
7165
|
sqlFor(query: RemoteRequest): { sql: string; params: unknown[] };
|
|
7152
7166
|
/**
|
|
7153
7167
|
* The separate `count(*)` statement that reports the matching set's size, with
|
|
7154
|
-
* the same `WHERE` as {@link sqlFor} and no `ORDER BY` or `LIMIT`
|
|
7155
|
-
* (BACKLOG-0001065). `null` when the adapter was built with `count: false`.
|
|
7168
|
+
* the same `WHERE` as {@link sqlFor} and no `ORDER BY` or `LIMIT`. `null` when the adapter was built with `count: false`.
|
|
7156
7169
|
*/
|
|
7157
7170
|
countSqlFor(query: RemoteRequest): { sql: string; params: unknown[] } | null;
|
|
7158
7171
|
/**
|
|
7159
|
-
* The `GROUP BY` statement one level of a grouped grid becomes
|
|
7160
|
-
* (BACKLOG-0001325), exposed like {@link sqlFor} so a test can read it without
|
|
7172
|
+
* The `GROUP BY` statement one level of a grouped grid becomes, exposed like {@link sqlFor} so a test can read it without
|
|
7161
7173
|
* an engine. `keyCol` is the grouping column at the request's depth and
|
|
7162
7174
|
* `keyAlias` the name its value comes back under.
|
|
7163
7175
|
*/
|
|
@@ -7167,24 +7179,23 @@ export function duckdbAdapter(options: {
|
|
|
7167
7179
|
): { sql: string; params: unknown[]; keyCol: string; keyAlias: string };
|
|
7168
7180
|
/**
|
|
7169
7181
|
* The statement that counts the *groups* at one level — a `count(*)` over the
|
|
7170
|
-
* grouped sub-select, which is not the matching row count
|
|
7182
|
+
* grouped sub-select, which is not the matching row count.
|
|
7171
7183
|
* `null` when the adapter was built with `count: false`.
|
|
7172
7184
|
*/
|
|
7173
7185
|
groupCountSqlFor(query: RemoteRequest): { sql: string; params: unknown[] } | null;
|
|
7174
7186
|
/**
|
|
7175
7187
|
* The row query for the leaves of a group: the page statement with the parent
|
|
7176
|
-
* group path ANDed onto its `WHERE
|
|
7188
|
+
* group path ANDed onto its `WHERE`.
|
|
7177
7189
|
*/
|
|
7178
7190
|
groupLeafSqlFor(query: RemoteRequest): { sql: string; params: unknown[] };
|
|
7179
7191
|
/**
|
|
7180
|
-
* The count of leaves inside one group
|
|
7192
|
+
* The count of leaves inside one group. `null` when the
|
|
7181
7193
|
* adapter was built with `count: false`.
|
|
7182
7194
|
*/
|
|
7183
7195
|
groupLeafCountSqlFor(query: RemoteRequest): { sql: string; params: unknown[] } | null;
|
|
7184
7196
|
/**
|
|
7185
7197
|
* The whole-matching-set summary that rides alongside a root-level grouped
|
|
7186
|
-
* fetch: the matching row count and the grand total in one statement
|
|
7187
|
-
* (BACKLOG-0001325).
|
|
7198
|
+
* fetch: the matching row count and the grand total in one statement.
|
|
7188
7199
|
*/
|
|
7189
7200
|
groupSummarySqlFor(
|
|
7190
7201
|
query: RemoteRequest,
|
|
@@ -7233,7 +7244,7 @@ export function dfqlAdapter(options: {
|
|
|
7233
7244
|
}): PushdownAdapter & { linesFor(query: RemoteRequest): object[] };
|
|
7234
7245
|
|
|
7235
7246
|
/**
|
|
7236
|
-
* An adapter for a GraphQL endpoint
|
|
7247
|
+
* An adapter for a GraphQL endpoint.
|
|
7237
7248
|
*
|
|
7238
7249
|
* GraphQL has no fixed query semantics — a filter, a sort and pagination are
|
|
7239
7250
|
* whatever the schema defines — so this adapter is configured, not zero-config.
|
|
@@ -7274,7 +7285,7 @@ export function graphqlAdapter(options: {
|
|
|
7274
7285
|
* Whether the default query asks for `totalCount`. `true` by default.
|
|
7275
7286
|
* `false` drops it from the selection set and declares
|
|
7276
7287
|
* `capabilities.total: false`, so a grid that never shows a count does not
|
|
7277
|
-
* make the server compute one
|
|
7288
|
+
* make the server compute one. Unlike the DuckDB adapter the
|
|
7278
7289
|
* count is not split into a second operation — that would cost an extra HTTP
|
|
7279
7290
|
* round trip rather than saving one — so suppression is the only lever here.
|
|
7280
7291
|
*/
|
|
@@ -7421,6 +7432,34 @@ export const LatticeGrid: {
|
|
|
7421
7432
|
|
|
7422
7433
|
export default LatticeGrid;
|
|
7423
7434
|
|
|
7435
|
+
/**
|
|
7436
|
+
* The namespace object the script-tag build publishes, as a type.
|
|
7437
|
+
*
|
|
7438
|
+
* Named so that the ambient global below can refer to it: inside a
|
|
7439
|
+
* `declare global` block the identifier `LatticeGrid` is the global being
|
|
7440
|
+
* declared, so `typeof LatticeGrid` there would describe itself.
|
|
7441
|
+
*/
|
|
7442
|
+
export type LatticeGridGlobal = typeof LatticeGrid;
|
|
7443
|
+
|
|
7444
|
+
declare global {
|
|
7445
|
+
/**
|
|
7446
|
+
* The grid, as a `<script src>` page reaches it.
|
|
7447
|
+
*
|
|
7448
|
+
* The UMD bundle assigns its exports to `window.LatticeGrid`, and every
|
|
7449
|
+
* optional module bundle merges its own onto the same object. Declaring it
|
|
7450
|
+
* here is what gives a page that loads the grid from a CDN the same
|
|
7451
|
+
* completion and type-checking an `import` gets: without it the global is
|
|
7452
|
+
* untyped and every `LatticeGrid.createGrid(...)` is an error under
|
|
7453
|
+
* `noImplicitAny`.
|
|
7454
|
+
*
|
|
7455
|
+
* `var`, not `const` or `let`: only a `var` declaration in an ambient
|
|
7456
|
+
* global block becomes a property of the global object, which is what
|
|
7457
|
+
* `window.LatticeGrid` has to resolve against.
|
|
7458
|
+
*/
|
|
7459
|
+
// eslint-disable-next-line no-var -- an ambient global is only a global as a var
|
|
7460
|
+
var LatticeGrid: LatticeGridGlobal;
|
|
7461
|
+
}
|
|
7462
|
+
|
|
7424
7463
|
/** The default British English catalogue. */
|
|
7425
7464
|
export const EN_GB: Record<string, string | Record<string, string>>;
|
|
7426
7465
|
/** Every key the default catalogue defines. */
|
|
@@ -7534,8 +7573,7 @@ export interface ChartAxis {
|
|
|
7534
7573
|
/** Draw the tick labels. */
|
|
7535
7574
|
labels?: boolean;
|
|
7536
7575
|
/**
|
|
7537
|
-
* Pin the x axis's scale rather than taking it from the column's type
|
|
7538
|
-
* (BACKLOG-0001344). The default, `'auto'`, is the rule stated in the charts
|
|
7576
|
+
* Pin the x axis's scale rather than taking it from the column's type. The default, `'auto'`, is the rule stated in the charts
|
|
7539
7577
|
* section: a temporal column type (`date`, `datetime`, `timestamp`,
|
|
7540
7578
|
* `dateString`) draws a time axis, a numeric one draws a linear axis whatever
|
|
7541
7579
|
* its distinct count, and everything else draws bands. `'band'` is how a
|
|
@@ -7549,7 +7587,7 @@ export interface ChartAxis {
|
|
|
7549
7587
|
/** Force the category labels' rotation rather than deciding it. */
|
|
7550
7588
|
rotate?: boolean | 'auto';
|
|
7551
7589
|
/**
|
|
7552
|
-
* A rolling window for the axis domain
|
|
7590
|
+
* A rolling window for the axis domain, in the shipped
|
|
7553
7591
|
* `WindowSpec` vocabulary that rolling statistics already use. Only
|
|
7554
7592
|
* `{ kind: 'time', span }` applies to an axis: the domain becomes the last
|
|
7555
7593
|
* `span` milliseconds ending **now**, so the chart keeps scrolling left while
|
|
@@ -7564,7 +7602,7 @@ export interface ChartAxis {
|
|
|
7564
7602
|
}
|
|
7565
7603
|
|
|
7566
7604
|
/**
|
|
7567
|
-
* One declarative annotation
|
|
7605
|
+
* One declarative annotation.
|
|
7568
7606
|
*
|
|
7569
7607
|
* A reference or target line, a shaded band, or a callout. Its value is a
|
|
7570
7608
|
* constant `value` (or `from`/`to` for a band), or a `compute` reduction of the
|
|
@@ -7575,7 +7613,7 @@ export interface ChartAxis {
|
|
|
7575
7613
|
* sentence.
|
|
7576
7614
|
*/
|
|
7577
7615
|
/**
|
|
7578
|
-
* A trend or forecast overlay method
|
|
7616
|
+
* A trend or forecast overlay method. Each name has aliases:
|
|
7579
7617
|
* `linear` (also `lr`, `ols`, `regression`); `movingAverage` (also `ma`, `sma`,
|
|
7580
7618
|
* `rolling`); `exponential` (also `ewma`, `ses`, `holt`, `smoothing`).
|
|
7581
7619
|
*/
|
|
@@ -7583,7 +7621,7 @@ export type ChartTrendMethod = 'linear' | 'movingAverage' | 'exponential'
|
|
|
7583
7621
|
| 'lr' | 'ols' | 'regression' | 'ma' | 'sma' | 'rolling'
|
|
7584
7622
|
| 'ewma' | 'ses' | 'holt' | 'smoothing';
|
|
7585
7623
|
|
|
7586
|
-
/** One trend or forecast overlay
|
|
7624
|
+
/** One trend or forecast overlay. */
|
|
7587
7625
|
export interface ChartTrend {
|
|
7588
7626
|
/** The overlay method; `linear` by default. */
|
|
7589
7627
|
method?: ChartTrendMethod;
|
|
@@ -7604,7 +7642,7 @@ export interface ChartTrend {
|
|
|
7604
7642
|
/** For Holt's exponential smoothing, the trend factor in `[0, 1]`; omit to fit it. */
|
|
7605
7643
|
beta?: number;
|
|
7606
7644
|
/**
|
|
7607
|
-
* The uncertainty band shaded around a linear `forecast
|
|
7645
|
+
* The uncertainty band shaded around a linear `forecast`.
|
|
7608
7646
|
* The Student-t `prediction` band (a future observation) by default;
|
|
7609
7647
|
* `confidence` shades the narrower mean-response band; `false` opts out and
|
|
7610
7648
|
* leaves the bare dashed line. Ignored where there is no linear forecast to
|
|
@@ -7618,7 +7656,7 @@ export interface ChartTrend {
|
|
|
7618
7656
|
}
|
|
7619
7657
|
|
|
7620
7658
|
/**
|
|
7621
|
-
* One declarative annotation
|
|
7659
|
+
* One declarative annotation. A
|
|
7622
7660
|
* reference or target line, a shaded band, a callout, or an `event` marker. Its
|
|
7623
7661
|
* value is a constant `value` (or `from`/`to` for a band), or a `compute`
|
|
7624
7662
|
* reduction of the data it annotates — `mean`, `median`, `min`, `max`, or `p95`
|
|
@@ -7635,7 +7673,7 @@ export interface ChartAnnotation {
|
|
|
7635
7673
|
/**
|
|
7636
7674
|
* The default is a reference line. `event` is a labelled vertical marker with
|
|
7637
7675
|
* a flag at a position on the x axis, described into the accessible table with
|
|
7638
|
-
* that position stated
|
|
7676
|
+
* that position stated.
|
|
7639
7677
|
*/
|
|
7640
7678
|
kind?: 'line' | 'target' | 'band' | 'callout' | 'event';
|
|
7641
7679
|
/** A constant value, for a line, target or callout's measure position. */
|
|
@@ -7645,7 +7683,7 @@ export interface ChartAnnotation {
|
|
|
7645
7683
|
/**
|
|
7646
7684
|
* A band's two edges. On a horizontal band each is a measure value, a constant
|
|
7647
7685
|
* or (with `fromCompute`/`toCompute`) computed. On a vertical band (`orient:
|
|
7648
|
-
* 'vertical'
|
|
7686
|
+
* 'vertical'`) each is an x position — a category or a number
|
|
7649
7687
|
* — and the band shades the x-range between them: an event window, a
|
|
7650
7688
|
* maintenance period, a recession.
|
|
7651
7689
|
*/
|
|
@@ -7658,7 +7696,7 @@ export interface ChartAnnotation {
|
|
|
7658
7696
|
at?: unknown;
|
|
7659
7697
|
/**
|
|
7660
7698
|
* Force a line vertical rather than horizontal, or shade a `band` across an
|
|
7661
|
-
* x-range rather than a measure range
|
|
7699
|
+
* x-range rather than a measure range.
|
|
7662
7700
|
*/
|
|
7663
7701
|
orient?: 'horizontal' | 'vertical';
|
|
7664
7702
|
/** Which measure axis the annotation reads. */
|
|
@@ -7683,7 +7721,7 @@ export interface ChartLabels {
|
|
|
7683
7721
|
|
|
7684
7722
|
/**
|
|
7685
7723
|
* An optional geometry pack for a geomap, as one of the `modules/geo-*`
|
|
7686
|
-
* packages exports
|
|
7724
|
+
* packages exports. Generated at build time from a named
|
|
7687
7725
|
* public source; `source`, `licence` and `attribution` record where the
|
|
7688
7726
|
* geometry came from and what its licence requires. A single-layer pack
|
|
7689
7727
|
* carries `topology` directly; a multi-layer pack (the UK) carries `layers`
|
|
@@ -7744,8 +7782,7 @@ export interface ChartSpec {
|
|
|
7744
7782
|
/**
|
|
7745
7783
|
* Per-axis configuration. Each side is a title string or an object of
|
|
7746
7784
|
* `{ title, min, max, ticks, format, grid, labels }`. `y2` (or `right`)
|
|
7747
|
-
* configures the second measure axis of a dual-axis or combo chart
|
|
7748
|
-
* (BACKLOG-0000743); a dual-axis chart labels both axes by default so it
|
|
7785
|
+
* configures the second measure axis of a dual-axis or combo chart; a dual-axis chart labels both axes by default so it
|
|
7749
7786
|
* cannot silently mislead.
|
|
7750
7787
|
*/
|
|
7751
7788
|
axis?: {
|
|
@@ -7759,7 +7796,7 @@ export interface ChartSpec {
|
|
|
7759
7796
|
* the grid; `'zoom'` changes only this chart's own domain; `'select'` selects
|
|
7760
7797
|
* the rows under the drag. The object form names which axis the drag acts on —
|
|
7761
7798
|
* `axis: 'y'` or `'y2'` brushes a value axis, which on a dual-axis chart must
|
|
7762
|
-
* say which one it means
|
|
7799
|
+
* say which one it means.
|
|
7763
7800
|
*/
|
|
7764
7801
|
brush?: boolean | 'filter' | 'zoom' | 'select'
|
|
7765
7802
|
| { mode: 'filter' | 'zoom' | 'select'; axis?: 'x' | 'y' | 'y2' };
|
|
@@ -7776,7 +7813,7 @@ export interface ChartSpec {
|
|
|
7776
7813
|
*/
|
|
7777
7814
|
fit?: boolean | 'line';
|
|
7778
7815
|
/**
|
|
7779
|
-
* Trend and forecast overlays
|
|
7816
|
+
* Trend and forecast overlays: a least-squares line, a
|
|
7780
7817
|
* trailing moving average, or exponential smoothing, drawn over a line, area
|
|
7781
7818
|
* or scatter chart. `true` draws a single linear trend; a method name or a
|
|
7782
7819
|
* {@link ChartTrend} object configures one; an array draws several.
|
|
@@ -7794,7 +7831,7 @@ export interface ChartSpec {
|
|
|
7794
7831
|
trend?: boolean | ChartTrendMethod | ChartTrend | Array<ChartTrendMethod | ChartTrend>;
|
|
7795
7832
|
/**
|
|
7796
7833
|
* A pointwise confidence band, drawn as a varying-width ribbon beneath the fit
|
|
7797
|
-
* line
|
|
7834
|
+
* line. Fed by a fitted model's own interval — the `band`
|
|
7798
7835
|
* from {@link StatisticsApi.regressionModel}, or as produced by
|
|
7799
7836
|
* {@link regressionPlots} — so the ribbon and the diagnostics report the one
|
|
7800
7837
|
* computation rather than a slope redrawn here. `line: false` suppresses the
|
|
@@ -7804,7 +7841,7 @@ export interface ChartSpec {
|
|
|
7804
7841
|
*/
|
|
7805
7842
|
band?: (RegressionBand & { line?: boolean }) | null;
|
|
7806
7843
|
/**
|
|
7807
|
-
* An explicit point set, bypassing the by-column binder
|
|
7844
|
+
* An explicit point set, bypassing the by-column binder: a
|
|
7808
7845
|
* cartesian chart whose values are not a grid column — a scale-location plot's
|
|
7809
7846
|
* √|standardised residual|, a coefficient forest's per-coefficient estimate —
|
|
7810
7847
|
* hands its points in directly. Each is `{x, y}` with an optional `label`,
|
|
@@ -7843,7 +7880,7 @@ export interface ChartSpec {
|
|
|
7843
7880
|
* Country outlines, for a geomap drawing countries rather than continents.
|
|
7844
7881
|
* Either GeoJSON, an object of code to SVG path data, or a geometry
|
|
7845
7882
|
* {@link GeoPack} imported from an optional `modules/geo-*` package
|
|
7846
|
-
*
|
|
7883
|
+
* — as the pack itself, or as `{ pack: id }` once its
|
|
7847
7884
|
* module has been imported and registered.
|
|
7848
7885
|
*/
|
|
7849
7886
|
shapes?: unknown;
|
|
@@ -7870,11 +7907,11 @@ export interface ChartSpec {
|
|
|
7870
7907
|
/**
|
|
7871
7908
|
* Which layer of a multi-layer geometry pack to draw — the UK pack, for
|
|
7872
7909
|
* instance, ships `regions`, `local-authorities` and `constituencies`
|
|
7873
|
-
* together
|
|
7910
|
+
* together. Ignored for a single-layer pack.
|
|
7874
7911
|
*/
|
|
7875
7912
|
layer?: string;
|
|
7876
7913
|
/**
|
|
7877
|
-
* The map projection a geomap draws through
|
|
7914
|
+
* The map projection a geomap draws through: `'equalEarth'`
|
|
7878
7915
|
* (the default for a world), `'robinson'`, `'mercator'`, `'equirectangular'`,
|
|
7879
7916
|
* `'albers'`, `'transverseMercator'`, or a projection function of the
|
|
7880
7917
|
* caller's own `(lon: number, lat: number) => [number, number]`. Left unset,
|
|
@@ -7885,12 +7922,11 @@ export interface ChartSpec {
|
|
|
7885
7922
|
| ((lon: number, lat: number) => [number, number]);
|
|
7886
7923
|
/**
|
|
7887
7924
|
* Parameters for the projections that take them: `parallels` and `centre`
|
|
7888
|
-
* for `albers`, `centre` for `transverseMercator
|
|
7925
|
+
* for `albers`, `centre` for `transverseMercator`.
|
|
7889
7926
|
*/
|
|
7890
7927
|
projectionOptions?: { parallels?: [number, number]; centre?: [number, number] };
|
|
7891
7928
|
/**
|
|
7892
|
-
* A lon/lat reference grid under a geomap's regions, off by default
|
|
7893
|
-
* (BACKLOG-0001321 part 2). Only drawn over a geometry pack's fitted
|
|
7929
|
+
* A lon/lat reference grid under a geomap's regions, off by default. Only drawn over a geometry pack's fitted
|
|
7894
7930
|
* projection — the schematic continents have no fitted projection to draw
|
|
7895
7931
|
* one against. `step` is the spacing between lines in degrees (default 30).
|
|
7896
7932
|
*/
|