@xh/hoist 90.0.0 → 90.1.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/CHANGELOG.md +136 -54
- package/admin/columns/Tracking.ts +9 -3
- package/admin/tabs/activity/tracking/ActivityTrackingModel.ts +155 -47
- package/admin/tabs/activity/tracking/ActivityTrackingPanel.ts +25 -4
- package/admin/tabs/activity/tracking/chart/AggChartModel.ts +2 -3
- package/appcontainer/ImpersonationBarModel.ts +8 -5
- package/build/types/admin/tabs/activity/tracking/ActivityTrackingModel.d.ts +25 -5
- package/build/types/cmp/cubegrid/CubeGrid.d.ts +26 -0
- package/build/types/cmp/cubegrid/CubeGridModel.d.ts +103 -0
- package/build/types/cmp/cubegrid/CubeGridPivotModel.d.ts +181 -0
- package/build/types/cmp/cubegrid/Types.d.ts +85 -0
- package/build/types/cmp/cubegrid/index.d.ts +4 -0
- package/build/types/cmp/dataview/DataViewModel.d.ts +6 -10
- package/build/types/cmp/grid/GridModel.d.ts +8 -33
- package/build/types/cmp/grid/Types.d.ts +51 -1
- package/build/types/cmp/grid/columns/Column.d.ts +2 -1
- package/build/types/cmp/grid/columns/ColumnGroup.d.ts +6 -0
- package/build/types/cmp/grid/helpers/GridCountLabel.d.ts +6 -3
- package/build/types/cmp/grid/impl/ColumnWidthCalculator.d.ts +6 -0
- package/build/types/cmp/grid/impl/GridLikeModel.d.ts +3 -0
- package/build/types/cmp/grid/impl/MenuSupport.d.ts +13 -0
- package/build/types/cmp/pdfviewer/PdfViewer.d.ts +14 -0
- package/build/types/cmp/pdfviewer/PdfViewerModel.d.ts +150 -0
- package/build/types/cmp/pdfviewer/Types.d.ts +55 -0
- package/build/types/cmp/pdfviewer/impl/PdfFindInputModel.d.ts +14 -0
- package/build/types/cmp/pdfviewer/impl/PdfViewerToolbarModel.d.ts +34 -0
- package/build/types/cmp/pdfviewer/impl/ZoomOptions.d.ts +10 -0
- package/build/types/cmp/pdfviewer/index.d.ts +3 -0
- package/build/types/cmp/statcard/StatCard.d.ts +90 -0
- package/build/types/cmp/statcard/index.d.ts +1 -0
- package/build/types/cmp/store/StoreFilterField.d.ts +8 -9
- package/build/types/cmp/store/impl/StoreFilterFieldImplModel.d.ts +4 -4
- package/build/types/cmp/zoneGrid/ZoneGridModel.d.ts +6 -10
- package/build/types/core/types/Types.d.ts +6 -0
- package/build/types/data/Field.d.ts +8 -1
- package/build/types/data/Store.d.ts +12 -0
- package/build/types/data/cube/Cube.d.ts +2 -0
- package/build/types/data/cube/CubeField.d.ts +3 -2
- package/build/types/data/cube/Query.d.ts +66 -4
- package/build/types/data/cube/View.d.ts +82 -4
- package/build/types/data/cube/ViewRowData.d.ts +13 -0
- package/build/types/data/cube/aggregate/MedianAggregator.d.ts +19 -0
- package/build/types/data/cube/aggregate/SumIfSameAggregator.d.ts +30 -0
- package/build/types/data/cube/impl/RowCache.d.ts +5 -0
- package/build/types/data/cube/impl/RowDataGenerator.d.ts +26 -0
- package/build/types/data/cube/impl/ViewDiagnostics.d.ts +27 -0
- package/build/types/data/cube/pivot/PivotCellRow.d.ts +27 -0
- package/build/types/data/cube/pivot/PivotPath.d.ts +45 -0
- package/build/types/data/cube/pivot/impl/PivotCells.d.ts +111 -0
- package/build/types/data/cube/pivot/impl/PivotReference.d.ts +39 -0
- package/build/types/data/cube/pivot/impl/PivotStructure.d.ts +105 -0
- package/build/types/data/cube/row/BaseRow.d.ts +12 -0
- package/build/types/data/cube/row/LeafRow.d.ts +4 -4
- package/build/types/data/cube/row/ParentRow.d.ts +20 -4
- package/build/types/data/cube/row/RowUpdate.d.ts +2 -0
- package/build/types/data/index.d.ts +3 -0
- package/build/types/desktop/cmp/button/grid/ColAutosizeButton.d.ts +6 -3
- package/build/types/desktop/cmp/button/grid/ColChooserButton.d.ts +7 -3
- package/build/types/desktop/cmp/button/grid/ExpandToLevelButton.d.ts +6 -3
- package/build/types/desktop/cmp/button/grid/ExportButton.d.ts +6 -3
- package/build/types/desktop/cmp/grid/find/GridFindField.d.ts +8 -9
- package/build/types/desktop/cmp/grid/find/impl/GridFindFieldImplModel.d.ts +3 -4
- package/build/types/desktop/cmp/pdfviewer/impl/PdfViewerToolbar.d.ts +12 -0
- package/build/types/desktop/cmp/statcard/impl/StatCardInfoImpl.d.ts +12 -0
- package/build/types/dynamics/desktop.d.ts +2 -0
- package/build/types/dynamics/mobile.d.ts +1 -0
- package/build/types/icon/Icon.d.ts +12 -0
- package/build/types/kit/pdfjs/index.d.ts +23 -0
- package/build/types/kit/pdfjs/styles.d.ts +2 -0
- package/build/types/kit/swiper/index.d.ts +7 -7
- package/build/types/mobile/cmp/button/grid/ColAutosizeButton.d.ts +6 -3
- package/build/types/mobile/cmp/button/grid/ColChooserButton.d.ts +6 -3
- package/build/types/mobile/cmp/button/grid/ExpandCollapseButton.d.ts +4 -4
- package/build/types/mobile/cmp/button/grid/ExpandToLevelButton.d.ts +4 -4
- package/build/types/mobile/cmp/pdfviewer/impl/PdfViewerToolbar.d.ts +12 -0
- package/cmp/README.md +3 -0
- package/cmp/ag-grid/AgGrid.ts +25 -3
- package/cmp/cubegrid/CubeGrid.ts +60 -0
- package/cmp/cubegrid/CubeGridModel.ts +365 -0
- package/cmp/cubegrid/CubeGridPivotModel.ts +943 -0
- package/cmp/cubegrid/README.md +343 -0
- package/cmp/cubegrid/Types.ts +105 -0
- package/cmp/cubegrid/index.ts +10 -0
- package/cmp/dataview/DataViewModel.ts +13 -8
- package/cmp/grid/Grid.scss +21 -5
- package/cmp/grid/GridModel.ts +41 -47
- package/cmp/grid/Types.ts +58 -1
- package/cmp/grid/columns/Column.ts +3 -1
- package/cmp/grid/columns/ColumnGroup.ts +10 -0
- package/cmp/grid/helpers/GridCountLabel.ts +12 -5
- package/cmp/grid/impl/ColumnGroupHeader.ts +18 -4
- package/cmp/grid/impl/ColumnWidthCalculator.ts +24 -0
- package/cmp/grid/impl/GridLikeModel.ts +17 -0
- package/cmp/grid/impl/MenuSupport.ts +36 -20
- package/cmp/pdfviewer/PdfViewer.scss +48 -0
- package/cmp/pdfviewer/PdfViewer.ts +102 -0
- package/cmp/pdfviewer/PdfViewerModel.ts +641 -0
- package/cmp/pdfviewer/README.md +224 -0
- package/cmp/pdfviewer/Types.ts +72 -0
- package/cmp/pdfviewer/impl/PdfFindInputModel.ts +44 -0
- package/cmp/pdfviewer/impl/PdfViewerToolbarModel.ts +45 -0
- package/cmp/pdfviewer/impl/ZoomOptions.ts +36 -0
- package/cmp/pdfviewer/index.ts +9 -0
- package/cmp/statcard/StatCard.scss +181 -0
- package/cmp/statcard/StatCard.ts +320 -0
- package/cmp/statcard/index.ts +1 -0
- package/cmp/store/StoreFilterField.ts +8 -9
- package/cmp/store/impl/StoreFilterFieldImplModel.ts +14 -14
- package/cmp/zoneGrid/ZoneGridModel.ts +13 -8
- package/core/types/Types.ts +7 -0
- package/data/Field.ts +10 -0
- package/data/Store.ts +25 -2
- package/data/cube/Cube.ts +5 -0
- package/data/cube/CubeField.ts +5 -0
- package/data/cube/Query.ts +170 -17
- package/data/cube/README.md +77 -2
- package/data/cube/View.ts +211 -32
- package/data/cube/ViewRowData.ts +22 -0
- package/data/cube/aggregate/MedianAggregator.ts +88 -0
- package/data/cube/aggregate/SumIfSameAggregator.ts +128 -0
- package/data/cube/impl/RowCache.ts +32 -11
- package/data/cube/impl/RowDataGenerator.ts +96 -4
- package/data/cube/impl/ViewDiagnostics.ts +47 -0
- package/data/cube/pivot/PivotCellRow.ts +73 -0
- package/data/cube/pivot/PivotPath.ts +67 -0
- package/data/cube/pivot/impl/PivotCells.ts +538 -0
- package/data/cube/pivot/impl/PivotReference.ts +125 -0
- package/data/cube/pivot/impl/PivotStructure.ts +500 -0
- package/data/cube/row/BaseRow.ts +26 -0
- package/data/cube/row/LeafRow.ts +9 -8
- package/data/cube/row/ParentRow.ts +58 -25
- package/data/cube/row/RowUpdate.ts +8 -0
- package/data/index.ts +3 -0
- package/desktop/appcontainer/AppContainer.ts +5 -1
- package/desktop/cmp/button/grid/ColAutosizeButton.ts +21 -5
- package/desktop/cmp/button/grid/ColChooserButton.ts +11 -5
- package/desktop/cmp/button/grid/ExpandToLevelButton.ts +20 -5
- package/desktop/cmp/button/grid/ExportButton.ts +19 -7
- package/desktop/cmp/dash/canvas/DashCanvas.ts +26 -2
- package/desktop/cmp/grid/find/GridFindField.ts +8 -9
- package/desktop/cmp/grid/find/impl/GridFindFieldImplModel.ts +15 -16
- package/desktop/cmp/grid/impl/colchooser/ColChooserBucketModel.ts +1 -1
- package/desktop/cmp/pdfviewer/impl/PdfViewerToolbar.ts +190 -0
- package/desktop/cmp/statcard/impl/StatCardInfoImpl.ts +27 -0
- package/docs/README.md +6 -2
- package/docs/doc-registry.json +21 -5
- package/docs/upgrade-notes/v90-upgrade-notes.md +130 -0
- package/docs/version-compatibility.md +2 -1
- package/dynamics/desktop.ts +4 -0
- package/dynamics/mobile.ts +2 -0
- package/format/FormatNumber.ts +6 -2
- package/icon/Icon.ts +18 -0
- package/icon/index.ts +32 -0
- package/kit/README.md +2 -0
- package/kit/pdfjs/PdfJs.scss +25 -0
- package/kit/pdfjs/index.ts +103 -0
- package/kit/pdfjs/pdf_viewer.css +6481 -0
- package/kit/pdfjs/styles.ts +12 -0
- package/mcp/README.md +13 -0
- package/mcp/data/import-paths.ts +4 -8
- package/mcp/data/index-cache.ts +2 -1
- package/mcp/data/ts-registry.ts +8 -29
- package/mcp/util/paths.ts +26 -0
- package/mobile/appcontainer/AppContainer.ts +3 -1
- package/mobile/cmp/button/grid/ColAutosizeButton.ts +20 -5
- package/mobile/cmp/button/grid/ColChooserButton.ts +12 -5
- package/mobile/cmp/button/grid/ExpandCollapseButton.ts +10 -6
- package/mobile/cmp/button/grid/ExpandToLevelButton.ts +10 -6
- package/mobile/cmp/pdfviewer/impl/PdfViewerToolbar.ts +137 -0
- package/package.json +14 -8
- package/public/msal-redirect-bridge.min.js +1 -1
- package/styles/vars.scss +59 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { CubeField } from '../CubeField';
|
|
2
|
+
import type { PivotPath } from './PivotPath';
|
|
3
|
+
import type { View } from '../View';
|
|
4
|
+
import type { BaseRow } from '../row/BaseRow';
|
|
5
|
+
import { ParentRow } from '../row/ParentRow';
|
|
6
|
+
/**
|
|
7
|
+
* Row for one `(group node, pivot path)` cell of a pivoted {@link View} - see `PivotCells`.
|
|
8
|
+
*
|
|
9
|
+
* A real row in the aggregation network, so aggregators and incremental updates work unmodified,
|
|
10
|
+
* but never part of the visible tree or a Store - its values are copied onto its owner row. Not an
|
|
11
|
+
* {@link AggregateRow}, so `omitFn` / `lockFn` never see it. Internal.
|
|
12
|
+
*/
|
|
13
|
+
export declare class PivotCellRow extends ParentRow {
|
|
14
|
+
/** Group row this cell's value is projected onto. */
|
|
15
|
+
ownerRow: BaseRow;
|
|
16
|
+
path: PivotPath;
|
|
17
|
+
/** Cell field names last projected onto `ownerRow`, nulled by a generation that drops them. */
|
|
18
|
+
projectedCellNames: string[];
|
|
19
|
+
protected get dimOrBucketName(): string;
|
|
20
|
+
protected get dimOrBucketVal(): any;
|
|
21
|
+
protected get aggFields(): CubeField[];
|
|
22
|
+
protected get aggFieldNames(): Set<string>;
|
|
23
|
+
protected get canAggregateFnFields(): CubeField[];
|
|
24
|
+
protected get complexAggFields(): CubeField[];
|
|
25
|
+
protected adoptChildren(children: BaseRow[]): void;
|
|
26
|
+
constructor(view: View, id: string, children: BaseRow[], ownerRow: BaseRow, path: PivotPath);
|
|
27
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { CubeField } from '../CubeField';
|
|
2
|
+
/**
|
|
3
|
+
* One ordered tuple of pivot dimension values within a pivoted {@link View} result - e.g.
|
|
4
|
+
* `US >> Equity`. Maps to one rendered column or column group.
|
|
5
|
+
*
|
|
6
|
+
* Immutable and identity-stable while the pivot structure is unchanged, so consumers can skip
|
|
7
|
+
* rebuilding columns. Treat the tree as read-only.
|
|
8
|
+
*
|
|
9
|
+
* @see ViewResult.paths
|
|
10
|
+
*/
|
|
11
|
+
export declare class PivotPath {
|
|
12
|
+
/** Pivot dimension at this depth. Null for the root path. */
|
|
13
|
+
readonly dimension: CubeField;
|
|
14
|
+
/** Raw dimension value, null for an empty (null / blank) segment. */
|
|
15
|
+
readonly value: any;
|
|
16
|
+
/** Escaped, delimiter-joined path key. '' for the root path. */
|
|
17
|
+
readonly key: string;
|
|
18
|
+
/** 0 for the root path, 1 for a top-level pivot value, and so on. */
|
|
19
|
+
readonly depth: number;
|
|
20
|
+
/** True where this segment stands for a null or blank dimension value. */
|
|
21
|
+
readonly isEmpty: boolean;
|
|
22
|
+
readonly children: PivotPath[];
|
|
23
|
+
/** @internal - constructed by PivotCells. */
|
|
24
|
+
constructor(config: {
|
|
25
|
+
dimension: CubeField;
|
|
26
|
+
value: any;
|
|
27
|
+
key: string;
|
|
28
|
+
depth: number;
|
|
29
|
+
isEmpty: boolean;
|
|
30
|
+
});
|
|
31
|
+
get isRoot(): boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A single materialized measure within a pivoted {@link View} result - the pairing of a pivot path with
|
|
35
|
+
* a measure, and the synthetic field name its value is written to on row data.
|
|
36
|
+
*
|
|
37
|
+
* `CubeGridModel` declares one Store field per entry and binds value columns to `name`.
|
|
38
|
+
*/
|
|
39
|
+
export interface PivotCellField {
|
|
40
|
+
/** Field name on published row data. The measure's own name at the root path. */
|
|
41
|
+
name: string;
|
|
42
|
+
path: PivotPath;
|
|
43
|
+
/** Source measure - supplies type and defaultValue when declaring Store fields. */
|
|
44
|
+
measure: CubeField;
|
|
45
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type { PlainObject } from '@xh/hoist/core';
|
|
2
|
+
import type { Store } from '@xh/hoist/data';
|
|
3
|
+
import type { CubeField } from '../../CubeField';
|
|
4
|
+
import type { PivotCellField } from '../PivotPath';
|
|
5
|
+
import { PivotPath } from '../PivotPath';
|
|
6
|
+
import { BaseRow } from '../../row/BaseRow';
|
|
7
|
+
import type { View } from '../../View';
|
|
8
|
+
/**
|
|
9
|
+
* Pivot support for a {@link View} whose query sets {@link QueryConfig.pivot}.
|
|
10
|
+
*
|
|
11
|
+
* Every node of the row hierarchy carries its own subtree of {@link PivotCellRow}s, one per
|
|
12
|
+
* populated pivot path. Cells are real rows in the aggregation network - aggregators work
|
|
13
|
+
* unmodified and ticks propagate incrementally - but never enter the visible tree or reach a
|
|
14
|
+
* Store. Each cell's values are written onto its owning group row as flat synthetic fields, named
|
|
15
|
+
* per {@link ViewResult.cellFields}, so they behave as ordinary Store fields.
|
|
16
|
+
*
|
|
17
|
+
* Created on a View's first pivoted query and retained; holds no cells under an unpivoted query.
|
|
18
|
+
* `PivotStructure` plans the cells, this class materializes them.
|
|
19
|
+
*
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export declare class PivotCells {
|
|
23
|
+
private readonly view;
|
|
24
|
+
/** Pivot path tree, top-level paths first - see {@link ViewResult.paths}. */
|
|
25
|
+
paths: PivotPath[];
|
|
26
|
+
/** One entry per (path, measure) - see {@link ViewResult.cellFields}. */
|
|
27
|
+
cellFields: PivotCellField[];
|
|
28
|
+
/** Index of each path within `allPaths` - what an exposed leaf's `_pivotPathIdx` names. */
|
|
29
|
+
pathIdx: Map<PivotPath, number>;
|
|
30
|
+
/** Index of each path's parent within `allPaths`, -1 for the root, by path index. */
|
|
31
|
+
pathParentIdx: Int32Array;
|
|
32
|
+
cellAggFields: CubeField[];
|
|
33
|
+
cellAggFieldNames: Set<string>;
|
|
34
|
+
cellCanAggregateFnFields: CubeField[];
|
|
35
|
+
cellComplexAggFields: CubeField[];
|
|
36
|
+
private allPaths;
|
|
37
|
+
private pathKeys;
|
|
38
|
+
private measureNames;
|
|
39
|
+
/** Keyed on path identity. */
|
|
40
|
+
private cellFieldNamesByPath;
|
|
41
|
+
/** This generation's path discovery - see `discoverPaths`. */
|
|
42
|
+
private discovery;
|
|
43
|
+
private cellRows;
|
|
44
|
+
/** Phase timings for the generation in progress, reported by `generateCells`. */
|
|
45
|
+
private phases;
|
|
46
|
+
/** Cell fields last declared on each store, by identity - the structural-change signal. */
|
|
47
|
+
private syncedCellFields;
|
|
48
|
+
constructor(view: View);
|
|
49
|
+
/** Derive the cell aggregation field lists. Runs with the View's own `buildIndices`. */
|
|
50
|
+
buildIndices(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Discover the pivot path tree and publish the cell fields it implies. Runs before row
|
|
53
|
+
* generation, as the exposed-leaf class is built from the cell fields and leaves are minted
|
|
54
|
+
* during that pass.
|
|
55
|
+
*/
|
|
56
|
+
discoverPaths(): void;
|
|
57
|
+
/** Build or reuse the cell rows for the just-generated row tree, and report the timings. */
|
|
58
|
+
generateCells(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Rewrite the cells touched by a tick onto their owning group rows, returning the group rows to
|
|
61
|
+
* push to connected stores - cell rows are never published.
|
|
62
|
+
*/
|
|
63
|
+
projectUpdatedRows(updatedRows: Set<BaseRow>, changedFields: Set<string>): Set<BaseRow>;
|
|
64
|
+
/**
|
|
65
|
+
* Declare a Field on `store` for every current cell field. Must run before the store loads -
|
|
66
|
+
* under `projectionOnly`, records are built against the declared fields.
|
|
67
|
+
*/
|
|
68
|
+
syncStore(store: Store): void;
|
|
69
|
+
/**
|
|
70
|
+
* Create the data object for a cell row.
|
|
71
|
+
* @internal
|
|
72
|
+
*/
|
|
73
|
+
newCellRowData(): PlainObject;
|
|
74
|
+
private get measures();
|
|
75
|
+
/** Drop all paths and cells, as when the View declines its data. */
|
|
76
|
+
reset(): void;
|
|
77
|
+
private clearCells;
|
|
78
|
+
private buildCells;
|
|
79
|
+
/**
|
|
80
|
+
* Null the slots of cells in `prev` but not `live`, cut any update route still pointing at one,
|
|
81
|
+
* and mark their aggregates stale for a later reuse. Cells are sparse, so a vacated cell would
|
|
82
|
+
* otherwise leave its last value on a reused owner row.
|
|
83
|
+
*/
|
|
84
|
+
private clearVacatedCells;
|
|
85
|
+
/**
|
|
86
|
+
* Rebuild the published path tree and cell fields only when the structure changed - their
|
|
87
|
+
* identity is the structural-change signal consumers key off.
|
|
88
|
+
*/
|
|
89
|
+
private syncPaths;
|
|
90
|
+
/**
|
|
91
|
+
* A cell field colliding with a Cube field would overwrite it on row data. Root-path entries
|
|
92
|
+
* are the measure itself.
|
|
93
|
+
*/
|
|
94
|
+
private validateCellFieldNames;
|
|
95
|
+
/**
|
|
96
|
+
* Instantiate cell rows bottom-up, then wire both aggregation routes. Cells are ordered by
|
|
97
|
+
* (group, path) with both parents at lower indices, so reverse order is bottom-up on both axes.
|
|
98
|
+
*/
|
|
99
|
+
private buildCellRows;
|
|
100
|
+
/**
|
|
101
|
+
* Name an updated leaf's cell fields into `changedFields`. They are prototype getters, so they
|
|
102
|
+
* move without being written, and `GridTransactionManager` reads the set as complete.
|
|
103
|
+
*/
|
|
104
|
+
private noteLeafCellFields;
|
|
105
|
+
/** Write a cell's values onto its owning group row, moving the owner's digest if any changed. */
|
|
106
|
+
private projectCell;
|
|
107
|
+
/** A miss means a cached cell outlived its path - `buildCellRows` should have rebound it. */
|
|
108
|
+
private cellFieldNames;
|
|
109
|
+
/** Flatten the group nodes of the final (post-bucketing) network in DFS preorder. */
|
|
110
|
+
private enumerateGroups;
|
|
111
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { PlainObject } from '@xh/hoist/core';
|
|
2
|
+
import type { PivotStructureSpec } from './PivotStructure';
|
|
3
|
+
/**
|
|
4
|
+
* Brute-force reference implementation of the pivot structure, used only to assert the behavior of
|
|
5
|
+
* {@link buildPivotStructure}. Deliberately naive - O(groups x paths x leaves) - so that its
|
|
6
|
+
* correctness is self-evident by inspection. Never used in production code paths.
|
|
7
|
+
*
|
|
8
|
+
* Kept out of `data/index.ts`: import via deep path from test drivers and the Toolbox harness.
|
|
9
|
+
*/
|
|
10
|
+
export interface ReferenceGroupTree {
|
|
11
|
+
groupCount: number;
|
|
12
|
+
/** Group-axis parent of each group; -1 for the synthetic root at index 0. */
|
|
13
|
+
parentOfGroup: Int32Array;
|
|
14
|
+
/** 1 where a group's children are leaf rows rather than further groups. */
|
|
15
|
+
innermost: Uint8Array;
|
|
16
|
+
/** Innermost group owning each leaf. */
|
|
17
|
+
leafOwnerGroup: Int32Array;
|
|
18
|
+
/** Human-readable group path, for failure messages. */
|
|
19
|
+
groupKey: string[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Group records hierarchically the way {@link View.groupAndInsertRecords} does - string-keyed
|
|
23
|
+
* `groupBy` per dimension, in first-appearance order - always rooted at a synthetic group 0.
|
|
24
|
+
* Guarantees parents are assigned lower indices than their children.
|
|
25
|
+
*/
|
|
26
|
+
export declare function buildReferenceGroupTree(records: ArrayLike<{
|
|
27
|
+
data: PlainObject;
|
|
28
|
+
}>, groupDimNames: string[]): ReferenceGroupTree;
|
|
29
|
+
/**
|
|
30
|
+
* The leaf set of every `(group, path)` cell, computed directly from first principles: a leaf
|
|
31
|
+
* belongs to cell `(g, p)` iff its owning group is `g` or a descendant of `g`, and `p` is a prefix
|
|
32
|
+
* of the leaf's own path. Keyed by `groupIdx * pathCount + pathIdx`, root path (0) included.
|
|
33
|
+
*
|
|
34
|
+
* This is the definition the structure must reproduce - it encodes both which cells are populated
|
|
35
|
+
* and what each one must aggregate.
|
|
36
|
+
*/
|
|
37
|
+
export declare function referenceLeafSets(spec: PivotStructureSpec): Map<number, number[]>;
|
|
38
|
+
/** All groups from `g` up to the root, inclusive. */
|
|
39
|
+
export declare function groupAncestry(g: number, parentOfGroup: ArrayLike<number>): number[];
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { PlainObject } from '@xh/hoist/core';
|
|
2
|
+
/**
|
|
3
|
+
* Pure combinatorial core of the pivot view: discovers the pivot path tree from a set of records,
|
|
4
|
+
* then plans the `(group node, pivot path)` cells that `PivotCells` materializes as rows.
|
|
5
|
+
*
|
|
6
|
+
* Framework-free and expressed over integer indices rather than objects - allocation-light, and
|
|
7
|
+
* testable in isolation (see `PivotStructure.spec.ts`). Callers map index to row object.
|
|
8
|
+
*/
|
|
9
|
+
/** Separator between path segments, and between a path key and its measure. */
|
|
10
|
+
export declare const PATH_DELIMITER = ">>";
|
|
11
|
+
/** A cell's children are either all cells (group or pivot axis) or all leaf rows. */
|
|
12
|
+
export declare const CHILD_KIND_CELL = 0;
|
|
13
|
+
export declare const CHILD_KIND_LEAF = 1;
|
|
14
|
+
export interface PivotRecordLike {
|
|
15
|
+
data: PlainObject;
|
|
16
|
+
}
|
|
17
|
+
/** One node of the pivot path tree; index 0 is always the synthetic root path. */
|
|
18
|
+
export interface PivotPathSpec {
|
|
19
|
+
idx: number;
|
|
20
|
+
/** Index into the query's pivot `dimensions`; -1 for the root. */
|
|
21
|
+
dimIdx: number;
|
|
22
|
+
/** Raw dimension value, null for an empty segment. */
|
|
23
|
+
value: any;
|
|
24
|
+
/** Escaped, delimiter-joined path key; '' for the root. */
|
|
25
|
+
key: string;
|
|
26
|
+
depth: number;
|
|
27
|
+
parentIdx: number;
|
|
28
|
+
childIdxs: number[];
|
|
29
|
+
isEmpty: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface PivotPathDiscoveryConfig {
|
|
32
|
+
/**
|
|
33
|
+
* Throw a routine exception if the discovered path count exceeds this. Default 100; null
|
|
34
|
+
* to disable.
|
|
35
|
+
*/
|
|
36
|
+
maxPivotPaths?: number;
|
|
37
|
+
delimiter?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface PivotPathDiscoveryResult {
|
|
40
|
+
/** Path tree in depth-first order, root at index 0. Parents always precede their children. */
|
|
41
|
+
paths: PivotPathSpec[];
|
|
42
|
+
/** Per input record, the index of its full-depth path. 0 (root) when not pivoting. */
|
|
43
|
+
pathIdxOfRecord: Int32Array;
|
|
44
|
+
pathParentIdx: Int32Array;
|
|
45
|
+
pathDepth: Int32Array;
|
|
46
|
+
/** Number of pivot dimensions. */
|
|
47
|
+
maxDepth: number;
|
|
48
|
+
}
|
|
49
|
+
export interface PivotStructureSpec {
|
|
50
|
+
groupCount: number;
|
|
51
|
+
/**
|
|
52
|
+
* Group-axis parent of each group node; -1 for a root. Parents MUST precede their children
|
|
53
|
+
* (`parentOfGroup[g] < g`), which lets the builds run as descending index scans.
|
|
54
|
+
*/
|
|
55
|
+
parentOfGroup: ArrayLike<number>;
|
|
56
|
+
/** 1 where a group's children are leaf rows rather than further groups. */
|
|
57
|
+
innermost: ArrayLike<number>;
|
|
58
|
+
/** Innermost group owning each leaf. */
|
|
59
|
+
leafOwnerGroup: ArrayLike<number>;
|
|
60
|
+
/** Full-depth path index of each leaf. */
|
|
61
|
+
leafPathIdx: ArrayLike<number>;
|
|
62
|
+
pathCount: number;
|
|
63
|
+
pathParentIdx: ArrayLike<number>;
|
|
64
|
+
pathDepth: ArrayLike<number>;
|
|
65
|
+
maxDepth: number;
|
|
66
|
+
}
|
|
67
|
+
export interface PivotStructure {
|
|
68
|
+
cellCount: number;
|
|
69
|
+
cellGroup: Int32Array;
|
|
70
|
+
cellPath: Int32Array;
|
|
71
|
+
/** Group-axis parent cell - `C(parent(G), P)`; -1 if none. */
|
|
72
|
+
cellParent: Int32Array;
|
|
73
|
+
/**
|
|
74
|
+
* Pivot-axis parent cell `C(G, parent(P))`; -1 unless G owns leaves and P is at depth 2+. At
|
|
75
|
+
* depth 1 that parent is G itself, already updated by its own children - the two routes stay
|
|
76
|
+
* disjoint, which rules out double counting.
|
|
77
|
+
*/
|
|
78
|
+
cellPivotParent: Int32Array;
|
|
79
|
+
cellChildKind: Uint8Array;
|
|
80
|
+
/** CSR offsets into `childIdx`, length `cellCount + 1`. */
|
|
81
|
+
childStart: Int32Array;
|
|
82
|
+
/** Cell indices or leaf indices, per the owning cell's `cellChildKind`. */
|
|
83
|
+
childIdx: Int32Array;
|
|
84
|
+
/** Per leaf, the cell it feeds - `C(G, fullPath)`; -1 when not pivoting. */
|
|
85
|
+
leafPivotParentCell: Int32Array;
|
|
86
|
+
/** Maps `groupIdx * pathCount + pathIdx` to a cell index. Retained for the reference spec. */
|
|
87
|
+
cellOfKey: Map<number, number>;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Build the global pivot path tree - the union of paths across all records - and stamp each record
|
|
91
|
+
* with its full-depth path index. A null / blank value forms its own segment;
|
|
92
|
+
* `excludeEmptyPivotValues` filters such records out upstream.
|
|
93
|
+
*/
|
|
94
|
+
export declare function discoverPivotPaths(records: ArrayLike<PivotRecordLike>, pivotDimNames: string[], config?: PivotPathDiscoveryConfig): PivotPathDiscoveryResult;
|
|
95
|
+
/**
|
|
96
|
+
* Synthetic field name a cell's value is written to on its owner row. The root path yields the
|
|
97
|
+
* measure's own name, so row-total columns bind to the plain field.
|
|
98
|
+
*/
|
|
99
|
+
export declare function pivotCellFieldName(pathKey: string, measureName: string, delimiter?: string): string;
|
|
100
|
+
/**
|
|
101
|
+
* Plan the cell structure: which `(group, path)` cells are populated, each one's children, and how
|
|
102
|
+
* updates route up the group and pivot axes. Every cell's children partition its own leaf set,
|
|
103
|
+
* which keeps every aggregator correct down either axis.
|
|
104
|
+
*/
|
|
105
|
+
export declare function buildPivotStructure(spec: PivotStructureSpec): PivotStructure;
|
|
@@ -3,6 +3,13 @@ import type { ViewRowData } from '@xh/hoist/data/cube/ViewRowData';
|
|
|
3
3
|
import type { View } from '../View';
|
|
4
4
|
import type { ViewRow } from '../ViewRow';
|
|
5
5
|
import type { ParentRow } from './ParentRow';
|
|
6
|
+
import type { RowUpdate } from './RowUpdate';
|
|
7
|
+
/**
|
|
8
|
+
* Send updates up both aggregation routes. `applyDataUpdate` rewrites each {@link RowUpdate} in
|
|
9
|
+
* place, so the second route receives clones.
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare function propagateUpdate(parent: ParentRow, pivotParent: ParentRow, updates: RowUpdate[], updatedRows: Set<BaseRow>): void;
|
|
6
13
|
/**
|
|
7
14
|
* Base class for a row within a dataset produced by a Cube / View.
|
|
8
15
|
*
|
|
@@ -18,6 +25,11 @@ export declare abstract class BaseRow implements ViewRow {
|
|
|
18
25
|
readonly id: string;
|
|
19
26
|
data: PlainObject;
|
|
20
27
|
parent: ParentRow;
|
|
28
|
+
/**
|
|
29
|
+
* Second aggregation parent, used by pivot views to propagate up the pivot axis. Null in a
|
|
30
|
+
* plain View. The two routes must reach disjoint ancestors - see {@link PivotStructure}.
|
|
31
|
+
*/
|
|
32
|
+
pivotParent: ParentRow;
|
|
21
33
|
children: BaseRow[];
|
|
22
34
|
get isLeaf(): boolean;
|
|
23
35
|
get isAggregate(): boolean;
|
|
@@ -10,8 +10,8 @@ import { RowUpdate } from './RowUpdate';
|
|
|
10
10
|
* {@link LeafRow.applyLeafDataUpdate}.
|
|
11
11
|
*/
|
|
12
12
|
export interface LeafUpdateChanges {
|
|
13
|
-
/**
|
|
14
|
-
rows: Set<
|
|
13
|
+
/** Every row rewritten by the update - leaves and their ancestors alike. */
|
|
14
|
+
rows: Set<BaseRow>;
|
|
15
15
|
/**
|
|
16
16
|
* Names of every field changed by the update. Collected at the leaves only, which suffices
|
|
17
17
|
* because this path runs only with simple aggregators and no derived fields - a parent then
|
|
@@ -44,7 +44,7 @@ export declare abstract class LeafRow extends BaseRow {
|
|
|
44
44
|
getVisibleDatas(): ViewRowData;
|
|
45
45
|
constructor(view: View, id: string, rawRecord: StoreRecord);
|
|
46
46
|
applyLeafDataUpdate(newRec: StoreRecord, checkFields: CubeField[], changed: LeafUpdateChanges): void;
|
|
47
|
-
protected abstract applyUpdatedData(updates: RowUpdate[], newData: PlainObject,
|
|
47
|
+
protected abstract applyUpdatedData(updates: RowUpdate[], newData: PlainObject, updatedRows: Set<BaseRow>): void;
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
50
|
* Leaf row exposed on results - i.e. when the Query sets {@link Query.includeLeaves} or
|
|
@@ -55,7 +55,7 @@ export declare abstract class LeafRow extends BaseRow {
|
|
|
55
55
|
export declare class ExposedLeafRow extends LeafRow {
|
|
56
56
|
data: ViewRowData;
|
|
57
57
|
constructor(view: View, id: string, rawRecord: StoreRecord);
|
|
58
|
-
protected applyUpdatedData(updates: RowUpdate[], newData: PlainObject,
|
|
58
|
+
protected applyUpdatedData(updates: RowUpdate[], newData: PlainObject, updatedRows: Set<BaseRow>): void;
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
61
|
* Leaf row never exposed on results, feeding aggregations only. Adopts a zero-copy reference to
|
|
@@ -10,23 +10,37 @@ import type { RowUpdate } from './RowUpdate';
|
|
|
10
10
|
* all aggregation state and machinery, keeping it off the far more numerous {@link LeafRow}.
|
|
11
11
|
*
|
|
12
12
|
* The concrete subclasses {@link AggregateRow} and {@link BucketRow} group their children by a
|
|
13
|
-
* dimension value and a dynamic bucket, respectively
|
|
13
|
+
* dimension value and a dynamic bucket, respectively, while {@link PivotCellRow} aggregates one
|
|
14
|
+
* cell of a pivoted View.
|
|
14
15
|
*
|
|
15
16
|
* This is an internal data structure - {@link ViewRowData} is the public row-level data API.
|
|
16
17
|
*/
|
|
17
18
|
export declare abstract class ParentRow extends BaseRow {
|
|
18
|
-
data: ViewRowData;
|
|
19
19
|
private canAggResults;
|
|
20
20
|
aggStates: PlainObject;
|
|
21
|
-
|
|
21
|
+
protected depth: number;
|
|
22
22
|
protected appliedDimensions: PlainObject;
|
|
23
23
|
/** True if this row's children have been hidden from results by the Query's `lockFn`. */
|
|
24
24
|
locked: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* True if this row sat out a generation without receiving updates, so {@link reuse} must
|
|
27
|
+
* re-aggregate rather than take unchanged children as proof its aggregates are current. Set by
|
|
28
|
+
* `PivotCells` only - a plain View keeps discarded rows' parent links live.
|
|
29
|
+
*/
|
|
30
|
+
staleAggs: boolean;
|
|
25
31
|
/** The dimension or bucket by which this row groups its children, and its value here. */
|
|
26
32
|
protected abstract get dimOrBucketName(): string;
|
|
27
33
|
protected abstract get dimOrBucketVal(): any;
|
|
34
|
+
protected get aggFields(): CubeField[];
|
|
35
|
+
protected get aggFieldNames(): Set<string>;
|
|
36
|
+
protected get canAggregateFnFields(): CubeField[];
|
|
37
|
+
protected get complexAggFields(): CubeField[];
|
|
28
38
|
protected init(children: BaseRow[], appliedDimensions: PlainObject, depth: number): void;
|
|
29
|
-
|
|
39
|
+
/** Take ownership of `children`, claiming their group-axis `parent`. */
|
|
40
|
+
protected adoptChildren(children: BaseRow[]): void;
|
|
41
|
+
/** Compute aggregates over the assigned `children` without touching their parent links. */
|
|
42
|
+
protected initData(appliedDimensions: PlainObject, depth: number): void;
|
|
43
|
+
applyDataUpdate(childUpdates: RowUpdate[], updatedRows: Set<BaseRow>): void;
|
|
30
44
|
/** Reuse this row for a new generation, recomputing in place as needed - null to rebuild. */
|
|
31
45
|
reuse(children: BaseRow[], genStartDigest: number): ParentRow;
|
|
32
46
|
/** Re-evaluate this row's `canAggregateFn` fields, returning any that changed - else null. */
|
|
@@ -39,6 +53,7 @@ export declare abstract class ParentRow extends BaseRow {
|
|
|
39
53
|
* Parent row aggregating data for a single value of a dimension.
|
|
40
54
|
*/
|
|
41
55
|
export declare class AggregateRow extends ParentRow {
|
|
56
|
+
data: ViewRowData;
|
|
42
57
|
get isAggregate(): boolean;
|
|
43
58
|
/** The dimension for which this row is aggregating data. Null for a top-level summary row. */
|
|
44
59
|
readonly dim: CubeField;
|
|
@@ -52,6 +67,7 @@ export declare class AggregateRow extends ParentRow {
|
|
|
52
67
|
* dimension-level {@link AggregateRow}, as produced by a specified {@link BucketSpecFn}.
|
|
53
68
|
*/
|
|
54
69
|
export declare class BucketRow extends ParentRow {
|
|
70
|
+
data: ViewRowData;
|
|
55
71
|
get isBucket(): boolean;
|
|
56
72
|
readonly bucketSpec: BucketSpec;
|
|
57
73
|
readonly bucketVal: any;
|
|
@@ -20,4 +20,6 @@ export declare class RowUpdate {
|
|
|
20
20
|
get leafOldValue(): any;
|
|
21
21
|
get leafNewValue(): any;
|
|
22
22
|
constructor(field: CubeField, leafOldData: PlainObject, leafNewData: PlainObject);
|
|
23
|
+
/** Independent copy for a second aggregation route - see {@link propagateUpdate}. */
|
|
24
|
+
clone(): RowUpdate;
|
|
23
25
|
}
|
|
@@ -18,16 +18,19 @@ export * from './cube/aggregate/AverageStrictAggregator';
|
|
|
18
18
|
export * from './cube/aggregate/ChildCountAggregator';
|
|
19
19
|
export * from './cube/aggregate/LeafCountAggregator';
|
|
20
20
|
export * from './cube/aggregate/MaxAggregator';
|
|
21
|
+
export * from './cube/aggregate/MedianAggregator';
|
|
21
22
|
export * from './cube/aggregate/MinAggregator';
|
|
22
23
|
export * from './cube/aggregate/NullAggregator';
|
|
23
24
|
export * from './cube/aggregate/SingleAggregator';
|
|
24
25
|
export * from './cube/aggregate/SumAggregator';
|
|
26
|
+
export * from './cube/aggregate/SumIfSameAggregator';
|
|
25
27
|
export * from './cube/aggregate/SumStrictAggregator';
|
|
26
28
|
export * from './cube/aggregate/UniqueAggregator';
|
|
27
29
|
export * from './cube/aggregate/WeightedAverageAggregator';
|
|
28
30
|
export * from './cube/BucketSpec';
|
|
29
31
|
export * from './cube/Cube';
|
|
30
32
|
export * from './cube/CubeField';
|
|
33
|
+
export * from './cube/pivot/PivotPath';
|
|
31
34
|
export * from './cube/Query';
|
|
32
35
|
export * from './cube/View';
|
|
33
36
|
export type * from './cube/ViewRow';
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type { GridAutosizeOptions } from '@xh/hoist/cmp/grid';
|
|
2
|
-
import {
|
|
2
|
+
import type { GridLikeModel } from '@xh/hoist/cmp/grid';
|
|
3
3
|
import '@xh/hoist/desktop/register';
|
|
4
4
|
import type { ButtonProps } from '../Button';
|
|
5
5
|
export interface ColAutosizeButtonProps extends ButtonProps {
|
|
6
|
-
/**
|
|
7
|
-
|
|
6
|
+
/**
|
|
7
|
+
* GridModel, or a model wrapping one, to which this button should bind. Will find the
|
|
8
|
+
* nearest in context if not provided.
|
|
9
|
+
*/
|
|
10
|
+
gridModel?: GridLikeModel;
|
|
8
11
|
/** Options for the grid autosize. */
|
|
9
12
|
autosizeOptions?: Omit<GridAutosizeOptions, 'mode'>;
|
|
10
13
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { GridLikeModel } from '@xh/hoist/cmp/grid';
|
|
2
2
|
import '@xh/hoist/desktop/register';
|
|
3
3
|
import type { Position } from '@xh/hoist/kit/blueprint';
|
|
4
4
|
import type { ButtonProps } from '../Button';
|
|
5
5
|
export interface ColChooserButtonProps extends ButtonProps {
|
|
6
|
-
/**
|
|
7
|
-
|
|
6
|
+
/**
|
|
7
|
+
* GridModel, or a model wrapping one, to which this button should bind. Will find the
|
|
8
|
+
* nearest in context if not provided. A ZoneGridModel has no column chooser - see
|
|
9
|
+
* `zoneMapperButton`.
|
|
10
|
+
*/
|
|
11
|
+
gridModel?: GridLikeModel;
|
|
8
12
|
/**
|
|
9
13
|
* Overlay to show a modal chooser in (default 'popover'). Ignored by a chooser configured with
|
|
10
14
|
* `mode: 'docked'`, which this button toggles in place.
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { GridLikeModel } from '@xh/hoist/cmp/grid';
|
|
2
2
|
import '@xh/hoist/desktop/register';
|
|
3
3
|
import type { Position } from '@xh/hoist/kit/blueprint';
|
|
4
4
|
import type { ReactNode } from 'react';
|
|
5
5
|
import type { ButtonProps } from '../Button';
|
|
6
6
|
export interface ExpandToLevelButtonProps extends Omit<ButtonProps, 'title'> {
|
|
7
|
-
/**
|
|
8
|
-
|
|
7
|
+
/**
|
|
8
|
+
* GridModel, or a model wrapping one, to which this button should bind. Will find the
|
|
9
|
+
* nearest in context if not provided.
|
|
10
|
+
*/
|
|
11
|
+
gridModel?: GridLikeModel;
|
|
9
12
|
/** Position for menu, as per Blueprint docs. */
|
|
10
13
|
popoverPosition?: Position;
|
|
11
14
|
/** Title for the menu popover - defaults to "Expand To Level". */
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { GridLikeModel } from '@xh/hoist/cmp/grid';
|
|
2
2
|
import '@xh/hoist/desktop/register';
|
|
3
3
|
import type { ExportOptions } from '@xh/hoist/svc';
|
|
4
4
|
import type { ButtonProps } from '../Button';
|
|
5
5
|
export interface ExportButtonProps extends ButtonProps {
|
|
6
|
-
/**
|
|
7
|
-
|
|
6
|
+
/**
|
|
7
|
+
* GridModel, ZoneGridModel or CubeGridModel to which this button should bind. Will find the
|
|
8
|
+
* nearest in context if not provided.
|
|
9
|
+
*/
|
|
10
|
+
gridModel?: GridLikeModel;
|
|
8
11
|
exportOptions?: ExportOptions;
|
|
9
12
|
}
|
|
10
13
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ZoneGridModel } from '@xh/hoist/cmp/zoneGrid';
|
|
1
|
+
import type { GridLikeModel } from '@xh/hoist/cmp/grid';
|
|
3
2
|
import type { LayoutProps } from '@xh/hoist/core';
|
|
4
3
|
import type { FilterMatchMode } from '@xh/hoist/data';
|
|
5
4
|
import type { TextInputProps } from '@xh/hoist/desktop/cmp/input';
|
|
@@ -7,12 +6,12 @@ import '@xh/hoist/desktop/register';
|
|
|
7
6
|
import './GridFindField.scss';
|
|
8
7
|
export interface GridFindFieldProps extends TextInputProps, LayoutProps {
|
|
9
8
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* well as any groupBy field. When given a ZoneGridModel, it
|
|
13
|
-
* to any of its zones.
|
|
9
|
+
* Model whose data this control should search. When given a GridModel or CubeGridModel, this
|
|
10
|
+
* component will, by default, use the fields for all *visible* columns when
|
|
11
|
+
* matching, as well as any groupBy field. When given a ZoneGridModel, it
|
|
12
|
+
* uses the fields currently mapped to any of its zones.
|
|
14
13
|
*/
|
|
15
|
-
gridModel?:
|
|
14
|
+
gridModel?: GridLikeModel;
|
|
16
15
|
/** Mode to use when searching (default 'startWord'). */
|
|
17
16
|
matchMode?: FilterMatchMode;
|
|
18
17
|
/**
|
|
@@ -32,8 +31,8 @@ export interface GridFindFieldProps extends TextInputProps, LayoutProps {
|
|
|
32
31
|
* the entered search term based on simple word-boundary matching of its value to the value of
|
|
33
32
|
* configured fields on a record. If any field values match, the record itself is considered a match.
|
|
34
33
|
*
|
|
35
|
-
* This component is designed to be bound to a GridModel or
|
|
36
|
-
* If not configured, it binds by default to the nearest
|
|
34
|
+
* This component is designed to be bound to a GridModel, ZoneGridModel or CubeGridModel via its
|
|
35
|
+
* `gridModel` prop. If not configured, it binds by default to the nearest such model found in
|
|
37
36
|
* context. Binding in this way allows the component to
|
|
38
37
|
* auto-generate the fields in the store to be searched by the field and to automatically select
|
|
39
38
|
* the results in the Grid.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ZoneGridModel } from '@xh/hoist/cmp/zoneGrid';
|
|
1
|
+
import type { GridLikeModel } from '@xh/hoist/cmp/grid';
|
|
3
2
|
import { HoistModel } from '@xh/hoist/core';
|
|
4
3
|
import type { FilterMatchMode, StoreRecord } from '@xh/hoist/data';
|
|
5
4
|
import type { TextInputModel } from '@xh/hoist/desktop/cmp/input';
|
|
@@ -22,8 +21,8 @@ export declare class GridFindFieldImplModel extends HoistModel {
|
|
|
22
21
|
get hasFocus(): boolean;
|
|
23
22
|
get hasQuery(): boolean;
|
|
24
23
|
get hasResults(): boolean;
|
|
25
|
-
/**
|
|
26
|
-
get boundModel():
|
|
24
|
+
/** Model to search - from props, or the nearest found in context. */
|
|
25
|
+
get boundModel(): GridLikeModel;
|
|
27
26
|
onLinked(): void;
|
|
28
27
|
selectPrev(): void;
|
|
29
28
|
selectNext(): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PdfViewerToolbarModel } from '@xh/hoist/cmp/pdfviewer/impl/PdfViewerToolbarModel';
|
|
2
|
+
import '@xh/hoist/desktop/register';
|
|
3
|
+
/**
|
|
4
|
+
* Desktop implementation of the PdfViewer toolbar.
|
|
5
|
+
*
|
|
6
|
+
* Note that this module is installed by the desktop AppContainer and must not import
|
|
7
|
+
* PdfViewerModel, even as a type. A runtime import would bring pdf.js into every app's build, and a
|
|
8
|
+
* type import would break `tsc` in apps without `pdfjs-dist`. See {@link PdfViewerToolbarModel}.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare const pdfViewerToolbarImpl: import("@xh/hoist/core").ElementFactory<import("@xh/hoist/core").DefaultHoistProps<PdfViewerToolbarModel>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { HoistProps } from '@xh/hoist/core';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
interface StatCardInfoImplProps extends HoistProps {
|
|
4
|
+
icon: ReactElement;
|
|
5
|
+
content: ReactElement | string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Desktop implementation of a StatCard's info icon, showing its tooltip in a Blueprint tooltip.
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare const statCardInfoImpl: import("@xh/hoist/core").ElementFactory<StatCardInfoImplProps>;
|
|
12
|
+
export {};
|
|
@@ -27,6 +27,8 @@ export declare let errorMessageImpl: any;
|
|
|
27
27
|
export declare let maskImpl: any;
|
|
28
28
|
export declare let DynamicTabSwitcherModel: any;
|
|
29
29
|
export declare let cardHeaderImpl: any;
|
|
30
|
+
export declare let statCardInfoImpl: any;
|
|
31
|
+
export declare let pdfViewerToolbarImpl: any;
|
|
30
32
|
/**
|
|
31
33
|
* Provide implementations of functions and classes exported in this file.
|
|
32
34
|
*
|
|
@@ -17,6 +17,7 @@ export declare let tabContainerImpl: any;
|
|
|
17
17
|
export declare let errorMessageImpl: any;
|
|
18
18
|
export declare let maskImpl: any;
|
|
19
19
|
export declare let cardHeaderImpl: any;
|
|
20
|
+
export declare let pdfViewerToolbarImpl: any;
|
|
20
21
|
/**
|
|
21
22
|
* Provide implementations of functions and classes exported in this file.
|
|
22
23
|
*
|