@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
|
@@ -12,7 +12,7 @@ import type {BucketSpec} from '../BucketSpec';
|
|
|
12
12
|
import type {CubeField} from '../CubeField';
|
|
13
13
|
import type {View} from '../View';
|
|
14
14
|
import type {ViewRowData} from '../ViewRowData';
|
|
15
|
-
import {BaseRow} from './BaseRow';
|
|
15
|
+
import {BaseRow, propagateUpdate} from './BaseRow';
|
|
16
16
|
import type {RowUpdate} from './RowUpdate';
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -20,14 +20,12 @@ import type {RowUpdate} from './RowUpdate';
|
|
|
20
20
|
* all aggregation state and machinery, keeping it off the far more numerous {@link LeafRow}.
|
|
21
21
|
*
|
|
22
22
|
* The concrete subclasses {@link AggregateRow} and {@link BucketRow} group their children by a
|
|
23
|
-
* dimension value and a dynamic bucket, respectively
|
|
23
|
+
* dimension value and a dynamic bucket, respectively, while {@link PivotCellRow} aggregates one
|
|
24
|
+
* cell of a pivoted View.
|
|
24
25
|
*
|
|
25
26
|
* This is an internal data structure - {@link ViewRowData} is the public row-level data API.
|
|
26
27
|
*/
|
|
27
28
|
export abstract class ParentRow extends BaseRow {
|
|
28
|
-
// Parent rows always construct a full ViewRowData.
|
|
29
|
-
declare data: ViewRowData;
|
|
30
|
-
|
|
31
29
|
// `canAggregateFn` results by field name - null unless the view has such fields.
|
|
32
30
|
private canAggResults: PlainObject = null;
|
|
33
31
|
|
|
@@ -37,7 +35,7 @@ export abstract class ParentRow extends BaseRow {
|
|
|
37
35
|
|
|
38
36
|
// Level of this row within the query's dimensions - bucket rows share the level of the
|
|
39
37
|
// aggregate row above them. Keys the View's per-level field lists.
|
|
40
|
-
|
|
38
|
+
protected depth: number = null;
|
|
41
39
|
|
|
42
40
|
// Values of the dimensions applied at this row, retained only to hand to a `canAggregateFn`.
|
|
43
41
|
protected appliedDimensions: PlainObject = null;
|
|
@@ -45,31 +43,59 @@ export abstract class ParentRow extends BaseRow {
|
|
|
45
43
|
/** True if this row's children have been hidden from results by the Query's `lockFn`. */
|
|
46
44
|
locked: boolean = false;
|
|
47
45
|
|
|
46
|
+
/**
|
|
47
|
+
* True if this row sat out a generation without receiving updates, so {@link reuse} must
|
|
48
|
+
* re-aggregate rather than take unchanged children as proof its aggregates are current. Set by
|
|
49
|
+
* `PivotCells` only - a plain View keeps discarded rows' parent links live.
|
|
50
|
+
*/
|
|
51
|
+
staleAggs: boolean = false;
|
|
52
|
+
|
|
48
53
|
/** The dimension or bucket by which this row groups its children, and its value here. */
|
|
49
54
|
protected abstract get dimOrBucketName(): string;
|
|
50
55
|
protected abstract get dimOrBucketVal(): any;
|
|
51
56
|
|
|
57
|
+
// Aggregation field lists for this row's depth; pivot cell rows override with narrower ones.
|
|
58
|
+
protected get aggFields(): CubeField[] {
|
|
59
|
+
return this.view._aggFieldsByDepth[this.depth];
|
|
60
|
+
}
|
|
61
|
+
protected get aggFieldNames(): Set<string> {
|
|
62
|
+
return this.view._aggFieldNamesByDepth[this.depth];
|
|
63
|
+
}
|
|
64
|
+
protected get canAggregateFnFields(): CubeField[] {
|
|
65
|
+
return this.view._canAggregateFnFieldsByDepth[this.depth];
|
|
66
|
+
}
|
|
67
|
+
protected get complexAggFields(): CubeField[] {
|
|
68
|
+
return this.view._complexAggFieldsByDepth[this.depth];
|
|
69
|
+
}
|
|
70
|
+
|
|
52
71
|
protected init(children: BaseRow[], appliedDimensions: PlainObject, depth: number) {
|
|
53
|
-
|
|
72
|
+
this.adoptChildren(children);
|
|
73
|
+
this.initData(appliedDimensions, depth);
|
|
74
|
+
}
|
|
54
75
|
|
|
76
|
+
/** Take ownership of `children`, claiming their group-axis `parent`. */
|
|
77
|
+
protected adoptChildren(children: BaseRow[]) {
|
|
55
78
|
this.children = children;
|
|
56
79
|
children.forEach(it => (it.parent = this));
|
|
80
|
+
}
|
|
57
81
|
|
|
82
|
+
/** Compute aggregates over the assigned `children` without touching their parent links. */
|
|
83
|
+
protected initData(appliedDimensions: PlainObject, depth: number) {
|
|
58
84
|
Object.assign(this.data, appliedDimensions);
|
|
59
85
|
this.depth = depth;
|
|
60
86
|
|
|
61
87
|
// Needed to re-evaluate any `canAggregateFn` - clone, as the View mutates its copy as it
|
|
62
88
|
// moves across sibling groups.
|
|
63
|
-
if (!isEmpty(
|
|
89
|
+
if (!isEmpty(this.canAggregateFnFields)) {
|
|
64
90
|
this.appliedDimensions = {...appliedDimensions};
|
|
65
91
|
}
|
|
66
92
|
|
|
67
93
|
this.recomputeCanAggregate();
|
|
68
94
|
|
|
69
95
|
// initial computation of aggregates
|
|
70
|
-
const {data, canAggResults} = this,
|
|
71
|
-
ctx = view._aggContext;
|
|
72
|
-
|
|
96
|
+
const {children, data, canAggResults} = this,
|
|
97
|
+
ctx = this.view._aggContext;
|
|
98
|
+
this.aggFields.forEach(field => {
|
|
73
99
|
const {name} = field;
|
|
74
100
|
if (canAggResults?.[name] !== false) {
|
|
75
101
|
data[name] = ctx.aggregate(children, field, this);
|
|
@@ -80,10 +106,9 @@ export abstract class ParentRow extends BaseRow {
|
|
|
80
106
|
// -----------
|
|
81
107
|
// Data
|
|
82
108
|
//-------------
|
|
83
|
-
applyDataUpdate(childUpdates: RowUpdate[],
|
|
84
|
-
const {parent, data, children, canAggResults, view} = this,
|
|
109
|
+
applyDataUpdate(childUpdates: RowUpdate[], updatedRows: Set<BaseRow>) {
|
|
110
|
+
const {parent, pivotParent, data, children, canAggResults, aggFieldNames, view} = this,
|
|
85
111
|
ctx = view._aggContext,
|
|
86
|
-
aggFieldNames = view._aggFieldNamesByDepth[this.depth],
|
|
87
112
|
myUpdates = [];
|
|
88
113
|
childUpdates.forEach(update => {
|
|
89
114
|
const {field} = update,
|
|
@@ -99,8 +124,8 @@ export abstract class ParentRow extends BaseRow {
|
|
|
99
124
|
});
|
|
100
125
|
|
|
101
126
|
if (!isEmpty(myUpdates)) {
|
|
102
|
-
|
|
103
|
-
|
|
127
|
+
updatedRows.add(this);
|
|
128
|
+
propagateUpdate(parent, pivotParent, myUpdates, updatedRows);
|
|
104
129
|
}
|
|
105
130
|
}
|
|
106
131
|
|
|
@@ -109,41 +134,41 @@ export abstract class ParentRow extends BaseRow {
|
|
|
109
134
|
//--------------------
|
|
110
135
|
/** Reuse this row for a new generation, recomputing in place as needed - null to rebuild. */
|
|
111
136
|
reuse(children: BaseRow[], genStartDigest: number): ParentRow {
|
|
112
|
-
const {view, isBucket} = this,
|
|
137
|
+
const {view, isBucket, staleAggs} = this,
|
|
113
138
|
childrenEqual = shallowEqualArrays(this.children, children);
|
|
114
139
|
|
|
140
|
+
this.staleAggs = false;
|
|
141
|
+
|
|
115
142
|
// 0) Can't reuse a bucket with different children
|
|
116
143
|
if (!childrenEqual && isBucket) return null;
|
|
117
144
|
|
|
118
145
|
// 1) Rewire children if needed
|
|
119
|
-
if (!childrenEqual)
|
|
120
|
-
this.children = children;
|
|
121
|
-
children.forEach(it => (it.parent = this));
|
|
122
|
-
}
|
|
146
|
+
if (!childrenEqual) this.adoptChildren(children);
|
|
123
147
|
|
|
124
148
|
// 2) Re-aggregate, only if needed, and mark if changes resulted.
|
|
125
149
|
let changed = false;
|
|
126
150
|
const simpleAggsAreCurrent =
|
|
151
|
+
!staleAggs &&
|
|
127
152
|
childrenEqual &&
|
|
128
153
|
!isBucket &&
|
|
129
154
|
!children.some(it => it.data.cubeRowDigest > genStartDigest);
|
|
130
155
|
if (!simpleAggsAreCurrent) {
|
|
131
156
|
this.recomputeCanAggregate();
|
|
132
|
-
|
|
157
|
+
this.aggFields.forEach(field => {
|
|
133
158
|
if (this.recomputeAggregate(field)) changed = true;
|
|
134
159
|
});
|
|
135
160
|
} else if (view.hasContextDependentFields) {
|
|
136
161
|
changed = this.recomputeAggregatesForContextChange(this.recomputeCanAggregate());
|
|
137
162
|
}
|
|
138
163
|
|
|
139
|
-
if (changed) BaseRow.assignDigest(this.data);
|
|
164
|
+
if (changed) BaseRow.assignDigest(this.data as ViewRowData);
|
|
140
165
|
return this;
|
|
141
166
|
}
|
|
142
167
|
|
|
143
168
|
/** Re-evaluate this row's `canAggregateFn` fields, returning any that changed - else null. */
|
|
144
169
|
private recomputeCanAggregate(): string[] {
|
|
145
170
|
let changes = null;
|
|
146
|
-
this.
|
|
171
|
+
this.canAggregateFnFields.forEach(field => {
|
|
147
172
|
const {name} = field,
|
|
148
173
|
can = this.evalCanAggregate(field),
|
|
149
174
|
results = (this.canAggResults ??= {});
|
|
@@ -160,7 +185,7 @@ export abstract class ParentRow extends BaseRow {
|
|
|
160
185
|
let changed = false;
|
|
161
186
|
|
|
162
187
|
// 1) All complex aggregators need to be recomputed.
|
|
163
|
-
|
|
188
|
+
this.complexAggFields.forEach(field => {
|
|
164
189
|
if (this.recomputeAggregate(field)) changed = true;
|
|
165
190
|
});
|
|
166
191
|
|
|
@@ -216,6 +241,8 @@ export abstract class ParentRow extends BaseRow {
|
|
|
216
241
|
* Parent row aggregating data for a single value of a dimension.
|
|
217
242
|
*/
|
|
218
243
|
export class AggregateRow extends ParentRow {
|
|
244
|
+
declare data: ViewRowData;
|
|
245
|
+
|
|
219
246
|
override get isAggregate() {
|
|
220
247
|
return true;
|
|
221
248
|
}
|
|
@@ -253,6 +280,9 @@ export class AggregateRow extends ParentRow {
|
|
|
253
280
|
data.cubeDimension = dimName;
|
|
254
281
|
|
|
255
282
|
this.init(children, appliedDimensions, depth);
|
|
283
|
+
|
|
284
|
+
// After `init` assigns `appliedDimensions`, so this reads the raw typed value.
|
|
285
|
+
data.cubeLabelValue = dim ? data[dimName] : null;
|
|
256
286
|
}
|
|
257
287
|
}
|
|
258
288
|
|
|
@@ -261,6 +291,8 @@ export class AggregateRow extends ParentRow {
|
|
|
261
291
|
* dimension-level {@link AggregateRow}, as produced by a specified {@link BucketSpecFn}.
|
|
262
292
|
*/
|
|
263
293
|
export class BucketRow extends ParentRow {
|
|
294
|
+
declare data: ViewRowData;
|
|
295
|
+
|
|
264
296
|
override get isBucket() {
|
|
265
297
|
return true;
|
|
266
298
|
}
|
|
@@ -292,6 +324,7 @@ export class BucketRow extends ParentRow {
|
|
|
292
324
|
const data = (this.data = view.newParentRowData(id));
|
|
293
325
|
data.cubeRowType = 'bucket';
|
|
294
326
|
data.cubeLabel = bucketSpec.labelFn(bucketVal);
|
|
327
|
+
data.cubeLabelValue = bucketVal;
|
|
295
328
|
data.cubeDimension = bucketSpec.name;
|
|
296
329
|
|
|
297
330
|
this.init(children, appliedDimensions, depth);
|
|
@@ -42,4 +42,12 @@ export class RowUpdate {
|
|
|
42
42
|
this.oldValue = this.leafOldValue;
|
|
43
43
|
this.newValue = this.leafNewValue;
|
|
44
44
|
}
|
|
45
|
+
|
|
46
|
+
/** Independent copy for a second aggregation route - see {@link propagateUpdate}. */
|
|
47
|
+
clone(): RowUpdate {
|
|
48
|
+
const ret = new RowUpdate(this.field, this.leafOldData, this.leafNewData);
|
|
49
|
+
ret.oldValue = this.oldValue;
|
|
50
|
+
ret.newValue = this.newValue;
|
|
51
|
+
return ret;
|
|
52
|
+
}
|
|
45
53
|
}
|
package/data/index.ts
CHANGED
|
@@ -27,10 +27,12 @@ export * from './cube/aggregate/AverageStrictAggregator';
|
|
|
27
27
|
export * from './cube/aggregate/ChildCountAggregator';
|
|
28
28
|
export * from './cube/aggregate/LeafCountAggregator';
|
|
29
29
|
export * from './cube/aggregate/MaxAggregator';
|
|
30
|
+
export * from './cube/aggregate/MedianAggregator';
|
|
30
31
|
export * from './cube/aggregate/MinAggregator';
|
|
31
32
|
export * from './cube/aggregate/NullAggregator';
|
|
32
33
|
export * from './cube/aggregate/SingleAggregator';
|
|
33
34
|
export * from './cube/aggregate/SumAggregator';
|
|
35
|
+
export * from './cube/aggregate/SumIfSameAggregator';
|
|
34
36
|
export * from './cube/aggregate/SumStrictAggregator';
|
|
35
37
|
export * from './cube/aggregate/UniqueAggregator';
|
|
36
38
|
export * from './cube/aggregate/WeightedAverageAggregator';
|
|
@@ -38,6 +40,7 @@ export * from './cube/aggregate/WeightedAverageAggregator';
|
|
|
38
40
|
export * from './cube/BucketSpec';
|
|
39
41
|
export * from './cube/Cube';
|
|
40
42
|
export * from './cube/CubeField';
|
|
43
|
+
export * from './cube/pivot/PivotPath';
|
|
41
44
|
export * from './cube/Query';
|
|
42
45
|
export * from './cube/View';
|
|
43
46
|
export type * from './cube/ViewRow';
|
|
@@ -12,6 +12,7 @@ import {mask} from '@xh/hoist/cmp/mask';
|
|
|
12
12
|
import {createElement, hoistCmp, refreshContextView, uses, XH} from '@xh/hoist/core';
|
|
13
13
|
import {changelogDialog} from '@xh/hoist/desktop/appcontainer/ChangelogDialog';
|
|
14
14
|
import {cardHeaderImpl} from '@xh/hoist/desktop/cmp/card/impl/CardHeaderImpl';
|
|
15
|
+
import {statCardInfoImpl} from '@xh/hoist/desktop/cmp/statcard/impl/StatCardInfoImpl';
|
|
15
16
|
import {dockContainerImpl} from '@xh/hoist/desktop/cmp/dock/impl/DockContainer';
|
|
16
17
|
import {errorMessageImpl} from '@xh/hoist/desktop/cmp/error/impl/ErrorMessage';
|
|
17
18
|
import {colChooserDialog as colChooser} from '@xh/hoist/desktop/cmp/grid/impl/colchooser/ColChooserDialog';
|
|
@@ -24,6 +25,7 @@ import {gridFilterDialog} from '@xh/hoist/desktop/cmp/grid/impl/filter/GridFilte
|
|
|
24
25
|
import {maskImpl} from '@xh/hoist/desktop/cmp/mask/impl/Mask';
|
|
25
26
|
import {ModalSupportModel} from '@xh/hoist/desktop/cmp/modalsupport';
|
|
26
27
|
import {DashContainerViewModel} from '@xh/hoist/desktop/cmp/dash/container/DashContainerViewModel';
|
|
28
|
+
import {pdfViewerToolbarImpl} from '@xh/hoist/desktop/cmp/pdfviewer/impl/PdfViewerToolbar';
|
|
27
29
|
import {pinPadImpl} from '@xh/hoist/desktop/cmp/pinpad/impl/PinPad';
|
|
28
30
|
import {storeFilterFieldImpl} from '@xh/hoist/desktop/cmp/store/impl/StoreFilterField';
|
|
29
31
|
import {tabContainerImpl} from '@xh/hoist/desktop/cmp/tab/impl/TabContainer';
|
|
@@ -68,7 +70,9 @@ installDesktopImpls({
|
|
|
68
70
|
errorMessageImpl,
|
|
69
71
|
maskImpl,
|
|
70
72
|
DynamicTabSwitcherModel,
|
|
71
|
-
cardHeaderImpl
|
|
73
|
+
cardHeaderImpl,
|
|
74
|
+
statCardInfoImpl,
|
|
75
|
+
pdfViewerToolbarImpl
|
|
72
76
|
});
|
|
73
77
|
/**
|
|
74
78
|
* Top-level wrapper for Desktop applications.
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* Copyright © 2026 Extremely Heavy Industries Inc.
|
|
6
6
|
*/
|
|
7
7
|
import type {GridAutosizeOptions} from '@xh/hoist/cmp/grid';
|
|
8
|
-
import {
|
|
8
|
+
import type {GridLikeModel} from '@xh/hoist/cmp/grid';
|
|
9
|
+
import {isGridLikeModel} from '@xh/hoist/cmp/grid/impl/GridLikeModel';
|
|
9
10
|
import {hoistCmp, useContextModel} from '@xh/hoist/core';
|
|
10
11
|
import '@xh/hoist/desktop/register';
|
|
11
12
|
import {Icon} from '@xh/hoist/icon';
|
|
@@ -14,8 +15,11 @@ import type {ButtonProps} from '../Button';
|
|
|
14
15
|
import {button} from '../Button';
|
|
15
16
|
|
|
16
17
|
export interface ColAutosizeButtonProps extends ButtonProps {
|
|
17
|
-
/**
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* GridModel, or a model wrapping one, to which this button should bind. Will find the
|
|
20
|
+
* nearest in context if not provided.
|
|
21
|
+
*/
|
|
22
|
+
gridModel?: GridLikeModel;
|
|
19
23
|
|
|
20
24
|
/** Options for the grid autosize. */
|
|
21
25
|
autosizeOptions?: Omit<GridAutosizeOptions, 'mode'>;
|
|
@@ -30,10 +34,22 @@ export const [ColAutosizeButton, colAutosizeButton] = hoistCmp.withFactory<ColAu
|
|
|
30
34
|
model: false,
|
|
31
35
|
|
|
32
36
|
render(
|
|
33
|
-
{
|
|
37
|
+
{
|
|
38
|
+
className,
|
|
39
|
+
icon,
|
|
40
|
+
title,
|
|
41
|
+
onClick,
|
|
42
|
+
gridModel: boundModel,
|
|
43
|
+
disabled,
|
|
44
|
+
autosizeOptions = {},
|
|
45
|
+
...rest
|
|
46
|
+
},
|
|
34
47
|
ref
|
|
35
48
|
) {
|
|
36
|
-
gridModel = withDefault(
|
|
49
|
+
const gridModel = withDefault(
|
|
50
|
+
boundModel,
|
|
51
|
+
useContextModel<GridLikeModel>(isGridLikeModel)
|
|
52
|
+
)?.innerGridModel;
|
|
37
53
|
|
|
38
54
|
// Validate bound model available and suitable for use.
|
|
39
55
|
if (!gridModel) {
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Copyright © 2026 Extremely Heavy Industries Inc.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
7
|
+
import type {GridLikeModel} from '@xh/hoist/cmp/grid';
|
|
8
|
+
import {isGridLikeModel} from '@xh/hoist/cmp/grid/impl/GridLikeModel';
|
|
8
9
|
import {div, vbox} from '@xh/hoist/cmp/layout';
|
|
9
10
|
import {hoistCmp, useContextModel} from '@xh/hoist/core';
|
|
10
11
|
import {colChooser} from '@xh/hoist/desktop/cmp/grid/impl/colchooser/ColChooser';
|
|
@@ -18,8 +19,12 @@ import type {ButtonProps} from '../Button';
|
|
|
18
19
|
import {button} from '../Button';
|
|
19
20
|
|
|
20
21
|
export interface ColChooserButtonProps extends ButtonProps {
|
|
21
|
-
/**
|
|
22
|
-
|
|
22
|
+
/**
|
|
23
|
+
* GridModel, or a model wrapping one, to which this button should bind. Will find the
|
|
24
|
+
* nearest in context if not provided. A ZoneGridModel has no column chooser - see
|
|
25
|
+
* `zoneMapperButton`.
|
|
26
|
+
*/
|
|
27
|
+
gridModel?: GridLikeModel;
|
|
23
28
|
|
|
24
29
|
/**
|
|
25
30
|
* Overlay to show a modal chooser in (default 'popover'). Ignored by a chooser configured with
|
|
@@ -51,7 +56,7 @@ export const [ColChooserButton, colChooserButton] = hoistCmp.withFactory<ColChoo
|
|
|
51
56
|
className,
|
|
52
57
|
icon,
|
|
53
58
|
title,
|
|
54
|
-
gridModel,
|
|
59
|
+
gridModel: boundModel,
|
|
55
60
|
modalTarget,
|
|
56
61
|
popoverPosition,
|
|
57
62
|
disabled,
|
|
@@ -60,7 +65,8 @@ export const [ColChooserButton, colChooserButton] = hoistCmp.withFactory<ColChoo
|
|
|
60
65
|
},
|
|
61
66
|
ref
|
|
62
67
|
) {
|
|
63
|
-
|
|
68
|
+
const contextModel = useContextModel<GridLikeModel>(isGridLikeModel),
|
|
69
|
+
gridModel = withDefault(boundModel, contextModel)?.innerGridModel;
|
|
64
70
|
modalTarget = withDefault(modalTarget, 'popover');
|
|
65
71
|
|
|
66
72
|
const chooserModel = gridModel?.colChooserModel,
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Copyright © 2026 Extremely Heavy Industries Inc.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
7
|
+
import type {GridLikeModel} from '@xh/hoist/cmp/grid';
|
|
8
|
+
import {isGridLikeModel} from '@xh/hoist/cmp/grid/impl/GridLikeModel';
|
|
8
9
|
import {div, vbox} from '@xh/hoist/cmp/layout';
|
|
9
10
|
import type {MenuItemLike} from '@xh/hoist/core';
|
|
10
11
|
import {hoistCmp, useContextModel} from '@xh/hoist/core';
|
|
@@ -19,8 +20,11 @@ import type {ButtonProps} from '../Button';
|
|
|
19
20
|
import {button} from '../Button';
|
|
20
21
|
|
|
21
22
|
export interface ExpandToLevelButtonProps extends Omit<ButtonProps, 'title'> {
|
|
22
|
-
/**
|
|
23
|
-
|
|
23
|
+
/**
|
|
24
|
+
* GridModel, or a model wrapping one, to which this button should bind. Will find the
|
|
25
|
+
* nearest in context if not provided.
|
|
26
|
+
*/
|
|
27
|
+
gridModel?: GridLikeModel;
|
|
24
28
|
|
|
25
29
|
/** Position for menu, as per Blueprint docs. */
|
|
26
30
|
popoverPosition?: Position;
|
|
@@ -40,8 +44,19 @@ export const [ExpandToLevelButton, expandToLevelButton] =
|
|
|
40
44
|
className: 'xh-expand-to-level-button',
|
|
41
45
|
model: false,
|
|
42
46
|
|
|
43
|
-
render({
|
|
44
|
-
gridModel
|
|
47
|
+
render({
|
|
48
|
+
gridModel: boundModel,
|
|
49
|
+
className,
|
|
50
|
+
icon,
|
|
51
|
+
title,
|
|
52
|
+
popoverPosition,
|
|
53
|
+
disabled,
|
|
54
|
+
...rest
|
|
55
|
+
}) {
|
|
56
|
+
const gridModel = withDefault(
|
|
57
|
+
boundModel,
|
|
58
|
+
useContextModel<GridLikeModel>(isGridLikeModel)
|
|
59
|
+
)?.innerGridModel;
|
|
45
60
|
icon = withDefault(icon, Icon.treeList());
|
|
46
61
|
title = withDefault(title, 'Expand To Level');
|
|
47
62
|
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Copyright © 2026 Extremely Heavy Industries Inc.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
7
|
+
import type {GridLikeModel} from '@xh/hoist/cmp/grid';
|
|
8
|
+
import {isGridLikeModel} from '@xh/hoist/cmp/grid/impl/GridLikeModel';
|
|
8
9
|
import {hoistCmp, useContextModel} from '@xh/hoist/core';
|
|
9
10
|
import '@xh/hoist/desktop/register';
|
|
10
11
|
import {Icon} from '@xh/hoist/icon';
|
|
@@ -20,8 +21,11 @@ const EXPORT_TYPE_LABELS: Record<Required<ExportOptions>['type'], string> = {
|
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
export interface ExportButtonProps extends ButtonProps {
|
|
23
|
-
/**
|
|
24
|
-
|
|
24
|
+
/**
|
|
25
|
+
* GridModel, ZoneGridModel or CubeGridModel to which this button should bind. Will find the
|
|
26
|
+
* nearest in context if not provided.
|
|
27
|
+
*/
|
|
28
|
+
gridModel?: GridLikeModel;
|
|
25
29
|
|
|
26
30
|
exportOptions?: ExportOptions;
|
|
27
31
|
}
|
|
@@ -43,14 +47,22 @@ export const [ExportButton, exportButton] = hoistCmp.withFactory<ExportButtonPro
|
|
|
43
47
|
model: false,
|
|
44
48
|
|
|
45
49
|
render(
|
|
46
|
-
{
|
|
50
|
+
{
|
|
51
|
+
className,
|
|
52
|
+
title,
|
|
53
|
+
tooltip,
|
|
54
|
+
onClick,
|
|
55
|
+
gridModel: boundModel,
|
|
56
|
+
exportOptions = {},
|
|
57
|
+
disabled,
|
|
58
|
+
...rest
|
|
59
|
+
},
|
|
47
60
|
ref
|
|
48
61
|
) {
|
|
49
|
-
const
|
|
62
|
+
const contextModel = useContextModel<GridLikeModel>(isGridLikeModel),
|
|
63
|
+
gridModel = (boundModel ?? contextModel)?.innerGridModel;
|
|
50
64
|
|
|
51
65
|
if (!onClick) {
|
|
52
|
-
gridModel = gridModel ?? contextGridModel;
|
|
53
|
-
|
|
54
66
|
// Validate bound model available and suitable for use.
|
|
55
67
|
if (!gridModel) {
|
|
56
68
|
logError(
|
|
@@ -22,7 +22,7 @@ import '@xh/hoist/desktop/register';
|
|
|
22
22
|
import {Classes, overlay, showContextMenu} from '@xh/hoist/kit/blueprint';
|
|
23
23
|
import {consumeEvent, mergeDeep, TEST_ID} from '@xh/hoist/utils/js';
|
|
24
24
|
import classNames from 'classnames';
|
|
25
|
-
import {useCallback, useState} from 'react';
|
|
25
|
+
import {useCallback, useEffect, useRef, useState} from 'react';
|
|
26
26
|
import {DashCanvasModel} from './DashCanvasModel';
|
|
27
27
|
import {dashCanvasContextMenu} from './impl/DashCanvasContextMenu';
|
|
28
28
|
import {dashCanvasView} from './impl/DashCanvasView';
|
|
@@ -67,6 +67,7 @@ export const [DashCanvas, dashCanvas] = hoistCmp.withFactory<DashCanvasProps>({
|
|
|
67
67
|
initialWidthMeasured = width != null,
|
|
68
68
|
// Make RGL's rendered height available to the grid background.
|
|
69
69
|
rglHeightRef = useOnResize(rect => (model.rglHeight = rect.height), {debounce: 100}),
|
|
70
|
+
onLayoutChange = useRglLayoutChangeHandler(model),
|
|
70
71
|
defaultDroppedItemDims = {
|
|
71
72
|
w: Math.floor(model.columns / 3),
|
|
72
73
|
h: Math.floor(model.columns / 3)
|
|
@@ -105,7 +106,7 @@ export const [DashCanvas, dashCanvas] = hoistCmp.withFactory<DashCanvasProps>({
|
|
|
105
106
|
onDrop: (layout: LayoutItem[], layoutItem: LayoutItem, evt: Event) =>
|
|
106
107
|
model.onDrop(layout, layoutItem, evt),
|
|
107
108
|
compactor,
|
|
108
|
-
onLayoutChange
|
|
109
|
+
onLayoutChange,
|
|
109
110
|
onResizeStart: () => (model.isResizing = true),
|
|
110
111
|
onResizeStop: () => (model.isResizing = false)
|
|
111
112
|
},
|
|
@@ -227,6 +228,29 @@ const onContextMenu = (e, model) => {
|
|
|
227
228
|
}
|
|
228
229
|
};
|
|
229
230
|
|
|
231
|
+
/**
|
|
232
|
+
* Relay RGL's layout reports to the model, skipping any that predate the model's latest layout:
|
|
233
|
+
* those made in a commit that changed the `layout` prop (RGL reports what it rendered before
|
|
234
|
+
* syncing to it), and those arriving after the model was written again. Adopting either reverts
|
|
235
|
+
* the model's write and can loop until React error #185. RGL reports the synced layout next commit,
|
|
236
|
+
* unless syncing leaves its layout unchanged - then the model keeps its uncompacted write.
|
|
237
|
+
*/
|
|
238
|
+
function useRglLayoutChangeHandler(model: DashCanvasModel) {
|
|
239
|
+
const {layout} = model,
|
|
240
|
+
committedLayoutRef = useRef(layout);
|
|
241
|
+
|
|
242
|
+
// Runs after RGL's own effects, so they see the previous commit's layout here.
|
|
243
|
+
useEffect(() => {
|
|
244
|
+
committedLayoutRef.current = layout;
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
return (rglLayout: LayoutItem[]) => {
|
|
248
|
+
if (layout === committedLayoutRef.current && layout === model.layout) {
|
|
249
|
+
model.onRglLayoutChange(rglLayout);
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
|
|
230
254
|
/**
|
|
231
255
|
* Track the content width of the canvas - measured on attach (before first paint, and even in a
|
|
232
256
|
* hidden browser tab, where ResizeObserver callbacks are deferred), then on every resize. Zero
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Copyright © 2026 Extremely Heavy Industries Inc.
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
8
|
-
import type {ZoneGridModel} from '@xh/hoist/cmp/zoneGrid';
|
|
7
|
+
import type {GridLikeModel} from '@xh/hoist/cmp/grid';
|
|
9
8
|
import {hbox, span, vbox} from '@xh/hoist/cmp/layout';
|
|
10
9
|
import type {LayoutProps} from '@xh/hoist/core';
|
|
11
10
|
import {hoistCmp, useLocalModel} from '@xh/hoist/core';
|
|
@@ -22,12 +21,12 @@ import {GridFindFieldImplModel} from './impl/GridFindFieldImplModel';
|
|
|
22
21
|
|
|
23
22
|
export interface GridFindFieldProps extends TextInputProps, LayoutProps {
|
|
24
23
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* well as any groupBy field. When given a ZoneGridModel, it
|
|
28
|
-
* to any of its zones.
|
|
24
|
+
* Model whose data this control should search. When given a GridModel or CubeGridModel, this
|
|
25
|
+
* component will, by default, use the fields for all *visible* columns when
|
|
26
|
+
* matching, as well as any groupBy field. When given a ZoneGridModel, it
|
|
27
|
+
* uses the fields currently mapped to any of its zones.
|
|
29
28
|
*/
|
|
30
|
-
gridModel?:
|
|
29
|
+
gridModel?: GridLikeModel;
|
|
31
30
|
|
|
32
31
|
/** Mode to use when searching (default 'startWord'). */
|
|
33
32
|
matchMode?: FilterMatchMode;
|
|
@@ -52,8 +51,8 @@ export interface GridFindFieldProps extends TextInputProps, LayoutProps {
|
|
|
52
51
|
* the entered search term based on simple word-boundary matching of its value to the value of
|
|
53
52
|
* configured fields on a record. If any field values match, the record itself is considered a match.
|
|
54
53
|
*
|
|
55
|
-
* This component is designed to be bound to a GridModel or
|
|
56
|
-
* If not configured, it binds by default to the nearest
|
|
54
|
+
* This component is designed to be bound to a GridModel, ZoneGridModel or CubeGridModel via its
|
|
55
|
+
* `gridModel` prop. If not configured, it binds by default to the nearest such model found in
|
|
57
56
|
* context. Binding in this way allows the component to
|
|
58
57
|
* auto-generate the fields in the store to be searched by the field and to automatically select
|
|
59
58
|
* the results in the Grid.
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Copyright © 2026 Extremely Heavy Industries Inc.
|
|
6
6
|
*/
|
|
7
|
-
import type {Column} from '@xh/hoist/cmp/grid';
|
|
8
|
-
import {
|
|
7
|
+
import type {Column, GridLikeModel, GridModel} from '@xh/hoist/cmp/grid';
|
|
8
|
+
import {isGridLikeModel} from '@xh/hoist/cmp/grid/impl/GridLikeModel';
|
|
9
|
+
import {DataViewModel} from '@xh/hoist/cmp/dataview';
|
|
9
10
|
import {ZoneGridModel} from '@xh/hoist/cmp/zoneGrid';
|
|
10
11
|
import {HoistModel} from '@xh/hoist/core';
|
|
11
12
|
import type {FilterMatchMode, StoreRecord} from '@xh/hoist/data';
|
|
@@ -85,23 +86,20 @@ export class GridFindFieldImplModel extends HoistModel {
|
|
|
85
86
|
return !isNil(this.results) && !isEmpty(this.results);
|
|
86
87
|
}
|
|
87
88
|
|
|
88
|
-
/**
|
|
89
|
+
/** Model to search - from props, or the nearest found in context. */
|
|
89
90
|
@computed
|
|
90
|
-
get boundModel():
|
|
91
|
-
return (
|
|
92
|
-
this.componentProps.gridModel ??
|
|
93
|
-
this.lookupModel(it => it instanceof GridModel || it instanceof ZoneGridModel)
|
|
94
|
-
);
|
|
91
|
+
get boundModel(): GridLikeModel {
|
|
92
|
+
return this.componentProps.gridModel ?? this.lookupModel(isGridLikeModel);
|
|
95
93
|
}
|
|
96
94
|
|
|
97
95
|
//------------------------------------------------------------------
|
|
98
96
|
// Trampoline value to grid
|
|
99
97
|
//------------------------------------------------------------------
|
|
100
98
|
override onLinked() {
|
|
101
|
-
const {boundModel} = this;
|
|
99
|
+
const {boundModel, innerGridModel} = this;
|
|
102
100
|
if (!boundModel) {
|
|
103
101
|
this.logError("No GridModel available. Provide via a 'gridModel' prop, or context.");
|
|
104
|
-
} else if (!
|
|
102
|
+
} else if (!innerGridModel.selModel?.isEnabled) {
|
|
105
103
|
this.logError('GridFindField must be bound to GridModel with selection enabled.');
|
|
106
104
|
}
|
|
107
105
|
|
|
@@ -267,16 +265,17 @@ export class GridFindFieldImplModel extends HoistModel {
|
|
|
267
265
|
}
|
|
268
266
|
|
|
269
267
|
private get innerGridModel(): GridModel {
|
|
270
|
-
|
|
271
|
-
return boundModel instanceof ZoneGridModel ? boundModel.gridModel : boundModel;
|
|
268
|
+
return this.boundModel?.innerGridModel ?? null;
|
|
272
269
|
}
|
|
273
270
|
|
|
274
271
|
// See corresponding method in StoreFilterFieldImplModel.
|
|
275
272
|
private getSearchColumns(): Column[] {
|
|
276
|
-
const {boundModel} = this;
|
|
273
|
+
const {boundModel, innerGridModel} = this;
|
|
277
274
|
if (!boundModel) return [];
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
275
|
+
if (boundModel instanceof ZoneGridModel) return boundModel.getMappedColumns();
|
|
276
|
+
if (boundModel instanceof DataViewModel) {
|
|
277
|
+
return innerGridModel.getLeafColumns().filter(it => it.field);
|
|
278
|
+
}
|
|
279
|
+
return innerGridModel.getVisibleLeafColumns();
|
|
281
280
|
}
|
|
282
281
|
}
|
|
@@ -485,7 +485,7 @@ export class ColChooserBucketModel extends HoistModel implements ColChooserDropP
|
|
|
485
485
|
|
|
486
486
|
data.push({
|
|
487
487
|
id: instanceId,
|
|
488
|
-
name:
|
|
488
|
+
name: group.chooserName,
|
|
489
489
|
description: '',
|
|
490
490
|
chooserGroup: '',
|
|
491
491
|
visible: false,
|