@xh/hoist 90.0.0-SNAPSHOT.1793664513383 → 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
package/CHANGELOG.md
CHANGED
|
@@ -12,17 +12,120 @@
|
|
|
12
12
|
3. Plain ASCII punctuation only. Use " - " for in-sentence breaks, never an em dash.
|
|
13
13
|
-->
|
|
14
14
|
|
|
15
|
+
## 90.1.0 - 2026-11-13
|
|
16
|
+
|
|
17
|
+
### 🎁 New Features
|
|
18
|
+
|
|
19
|
+
* Added `CubeGrid` and `CubeGridModel` (`@xh/hoist/cmp/cubegrid`), a grid bound to a Cube View.
|
|
20
|
+
Create it from an existing `view` or from a `cube` and `query`. It owns its Store and tree-mode
|
|
21
|
+
`GridModel`, takes the app's `columns` for the fixed region, and appends a column group per pivot
|
|
22
|
+
path to their right when the query pivots, with collapsible groups, summaries, labels and
|
|
23
|
+
classes per pivot dimension, one shared width per measure and column config per measure. Pivot
|
|
24
|
+
options are set through `pivotConfig` and bindable on its `CubeGridPivotModel`, which also lists
|
|
25
|
+
the dimensions and measures to offer a pivot picker. Column filters bind to the View and
|
|
26
|
+
re-aggregate, and pivot columns export under path-qualified headers. See the
|
|
27
|
+
[CubeGrid README](cmp/cubegrid/README.md).
|
|
28
|
+
* Added Cube pivoting - a View can slice its measures across extra dimensions as columns. Set
|
|
29
|
+
`QueryConfig.pivot` to pivot a Cube View by `dimensions` and `measures`, listed by
|
|
30
|
+
`Cube.dimensions` and the new `Cube.measures`. Cells are published as synthetic fields on each
|
|
31
|
+
group row and described by `ViewResult.paths` and `cellFields`, and pivoted Views update
|
|
32
|
+
incrementally like any other. See `PivotSpec` and the
|
|
33
|
+
[Cube README](data/cube/README.md#pivoting-with-pivot).
|
|
34
|
+
* See the Admin Console's Activity Tracking tab for a working example - its new "Pivot by"
|
|
35
|
+
option pivots the aggregate grid on a chosen dimension.
|
|
36
|
+
* Added `ViewResult.exception`. A View that declines its data with a routine `HoistException`,
|
|
37
|
+
such as a pivot over `maxPivotPaths`, publishes the exception and empties its result and stores
|
|
38
|
+
rather than throwing. `CubeGrid` renders an `ErrorMessage` in place of the grid while it does.
|
|
39
|
+
* Every grid-bound field, button and label now takes any `GridLikeModel` via its `gridModel` prop
|
|
40
|
+
or from context - a `GridModel`, `ZoneGridModel`, `DataViewModel` or `CubeGridModel` - and acts
|
|
41
|
+
on the `GridModel` behind it. This covers `StoreFilterField`, `GridFindField`, `GridCountLabel`,
|
|
42
|
+
`ExportButton`, `ColChooserButton`, `ColAutosizeButton`, `ExpandToLevelButton` and the mobile
|
|
43
|
+
`ExpandCollapseButton`.
|
|
44
|
+
* `StoreFilterField` and `GridFindField` bound to a `DataViewModel` search every field, as a
|
|
45
|
+
DataView has no visible columns to narrow them.
|
|
46
|
+
* Added `PdfViewer` and `PdfViewerModel` in `@xh/hoist/cmp/pdfviewer`, built on Mozilla's pdf.js.
|
|
47
|
+
The viewer loads documents from a URL, `FetchOptions`, or a `Blob` / `File` / byte array. It
|
|
48
|
+
renders pages on demand with selectable text, and has a configurable toolbar for paging, zoom,
|
|
49
|
+
find, rotation, and download. The model exposes the same actions and state for app-built
|
|
50
|
+
controls. Apps opt in by adding `pdfjs-dist` to their dependencies - Hoist declares it as an
|
|
51
|
+
optional peer and loads it on first use, with no bootstrap or build config required.
|
|
52
|
+
* Added two Cube aggregators. `MedianAggregator`, aliased as the `'MEDIAN'` token, takes the
|
|
53
|
+
median of a measure over every leaf beneath a row. `SumIfSameAggregator` sums a measure only
|
|
54
|
+
where every leaf with a value shares a second field, such as a currency, and is otherwise null.
|
|
55
|
+
* Added `Icon.magnifyingGlassPlus()` and `Icon.magnifyingGlassMinus()` (aliased as
|
|
56
|
+
`Icon.zoomIn()` and `Icon.zoomOut()`), plus `Icon.rotateRight()`.
|
|
57
|
+
* Added `ColumnGroupSpec.chooserName` to set a group's name in the desktop column chooser. Use it
|
|
58
|
+
when `headerName` is a function or element, which the chooser cannot display.
|
|
59
|
+
* Added `Field.shortDisplayName`, a shorter name for headers. A grid column takes it as its default
|
|
60
|
+
`headerName` unless it sets its own `displayName`, and pivot headers in `CubeGrid` use it. The
|
|
61
|
+
column chooser, menus and exports keep `displayName`, which it defaults to.
|
|
62
|
+
* Added `StatCard` and `StatCardStrip` to `@xh/hoist/cmp/statcard`, for calling out key figures
|
|
63
|
+
above a grid or in a detail panel. Callers pass pre-formatted values. A strip lays cards out in
|
|
64
|
+
equal shares and wraps them before a value is cut short. Set `size: 'large'` for a headline
|
|
65
|
+
figure. Style through the `--xh-stat-card-*` CSS variables.
|
|
66
|
+
* Added the `ComponentSize` type to `@xh/hoist/core` for a component's `size` prop, with `compact`,
|
|
67
|
+
`standard` and `large` values. It is a size the developer picks, unlike the user's `SizingMode`.
|
|
68
|
+
* Added the `xh-ledger-align` class to the hidden placeholder that `fmtNumber` adds after positive
|
|
69
|
+
ledger values, so a component can drop the space where values do not sit in a column.
|
|
70
|
+
|
|
71
|
+
### 🐞 Bug Fixes
|
|
72
|
+
|
|
73
|
+
* The grid header's "Pin Column" menu is no longer offered for a column with `movable: false`.
|
|
74
|
+
Pinning relocates the column, which header and chooser drags already refused for it.
|
|
75
|
+
* Fixed the impersonation bar re-requesting its list of users without end when the server returned
|
|
76
|
+
no users other than the current one.
|
|
77
|
+
* Fixed `DashCanvas` reverting a layout change when two layout writes landed close together, for
|
|
78
|
+
example two `autoHeight` views resizing during load. The revert could loop until React error #185.
|
|
79
|
+
* Fixed grids scrolling diagonally on trackpad gestures under AG Grid 36. `AgGrid` now locks each
|
|
80
|
+
two-axis wheel event to its dominant axis.
|
|
81
|
+
* Fixed `DashCanvas` widgets lagging behind the pointer while dragged or resized. Hoist pins react-grid-layout to 2.2 until a fixed 2.3 release ships.
|
|
82
|
+
|
|
83
|
+
### 🤖 AI Docs + Tooling
|
|
84
|
+
|
|
85
|
+
* Fixed the `hoist-ts` CLI and MCP symbol tools giving a file import path for every symbol when run
|
|
86
|
+
from an app's installed `@xh/hoist`. They now give the package barrel, such as
|
|
87
|
+
`@xh/hoist/cmp/grid`, as they do in a hoist-react checkout.
|
|
88
|
+
|
|
89
|
+
### 📚 Libraries
|
|
90
|
+
|
|
91
|
+
* react-grid-layout `2.3 → 2.2`
|
|
92
|
+
|
|
93
|
+
### ✨ Styles
|
|
94
|
+
|
|
95
|
+
* Grid column group headers show their expand/collapse control right after the label rather
|
|
96
|
+
than at the header's far edge, as a chevron pointing down when expanded and right when
|
|
97
|
+
collapsed, matching tree rows.
|
|
98
|
+
|
|
99
|
+
### ⚙️ Typescript API Adjustments
|
|
100
|
+
|
|
101
|
+
* Added `GridLikeModel`, the interface for a `GridModel` or a model wrapping one. It declares the
|
|
102
|
+
shared `store`, `empty` and selection members, plus `innerGridModel` to reach the `GridModel`
|
|
103
|
+
behind it. `GridModel`, `ZoneGridModel`, `DataViewModel` and `CubeGridModel` implement it.
|
|
104
|
+
* Added `GridSelectOptions`, `GridSelectFirstOptions` and `GridEnsureVisibleOptions`, the option
|
|
105
|
+
types of `GridModel.selectAsync`, `selectFirstAsync` and `ensureSelectionVisibleAsync`. The
|
|
106
|
+
`ZoneGridModel` and `DataViewModel` delegates now share them, so they accept every option the
|
|
107
|
+
`GridModel` methods take - previously `ensureVisiblePosition` and `expandParentGroups` were
|
|
108
|
+
dropped.
|
|
109
|
+
|
|
15
110
|
## 90.0.0 - 2026-11-02
|
|
16
111
|
|
|
17
|
-
### 💥 Breaking Changes (upgrade difficulty: 🟢 LOW - `formatConfig`, built-in column specs, `DateInput` props, mobile styling, panel splitter CSS)
|
|
112
|
+
### 💥 Breaking Changes (upgrade difficulty: 🟢 LOW - `formatConfig`, built-in column specs, `DateInput` props, mobile styling, panel splitter CSS, renderer imports, removed libraries, router5 8)
|
|
18
113
|
See [`docs/upgrade-notes/v90-upgrade-notes.md`](docs/upgrade-notes/v90-upgrade-notes.md) for
|
|
19
114
|
detailed, step-by-step upgrade instructions with before/after code examples.
|
|
20
115
|
|
|
21
|
-
*
|
|
22
|
-
|
|
116
|
+
* Replaced numbro with `Intl.NumberFormat` in `fmtNumber` and the formatters built on it.
|
|
117
|
+
Removed `NumberFormatOptions.formatConfig`, which took a numbro format. Use `precision`,
|
|
118
|
+
`zeroPad` and `withCommas` instead. Edge cases such as negative ties and `Infinity` now render
|
|
119
|
+
differently.
|
|
23
120
|
* The built-in `number`, `date`, `dateTime`, `dateTimeSec`, `time`, `compactDate` and `localDate`
|
|
24
121
|
column specs now set a `textRenderer` in place of a `renderer`. Their cells are plain, and code
|
|
25
122
|
that reads their `renderer` finds none.
|
|
123
|
+
* Moved the `*Renderer` factories, such as `numberRenderer` and `compactDateRenderer`, out of
|
|
124
|
+
`format/FormatNumber.ts` and `format/FormatDate.ts`. Import them from `@xh/hoist/format`.
|
|
125
|
+
* An app that imports a library Hoist no longer depends on, such as `semver` or `store2`, must
|
|
126
|
+
declare it in its own `package.json`. The Libraries section below lists each removed library.
|
|
127
|
+
* Updated router5 to 8.0. An app that declares its own `router5` must match it, or drop the
|
|
128
|
+
dependency and type its routes with `HoistRoute` from `@xh/hoist/core`.
|
|
26
129
|
* Desktop `DateInput` now renders its calendar with react-day-picker 10, as the mobile `DateInput`
|
|
27
130
|
already did, and its time picker is Hoist's own 24-hour control. `dayPickerProps` now takes
|
|
28
131
|
react-day-picker 10 props - see the upgrade notes for the renames from v8. Removed
|
|
@@ -31,22 +134,17 @@ detailed, step-by-step upgrade instructions with before/after code examples.
|
|
|
31
134
|
`@xh/hoist/kit/react-day-picker` instead.
|
|
32
135
|
* Removed `WindowedSelect` and `reactWindowedSelect` from `@xh/hoist/kit/react-select`. Desktop
|
|
33
136
|
`Select` windows large option lists itself, so `enableWindowed` works as before.
|
|
34
|
-
* Mobile components
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
dialogs, tabs, menus and toasts, so any of those an app had not styled change typeface.
|
|
41
|
-
* Removed the `modifier` prop from mobile `Button`, `TextInput`, `NumberInput`, `SearchInput`,
|
|
42
|
-
`Checkbox` and `SwitchInput`. It passed an Onsen modifier string and has no equivalent.
|
|
137
|
+
* Mobile components now render plain elements under `xh-` class names, in place of Onsen UI custom
|
|
138
|
+
elements, and `@xh/hoist/kit/onsen` is removed. App SCSS that targeted Onsen's class names or
|
|
139
|
+
CSS variables must target Hoist's instead.
|
|
140
|
+
* Mobile components now render in the app font, not the system font that Onsen applied.
|
|
141
|
+
* Removed the `modifier` prop from mobile buttons and inputs. It passed an Onsen modifier string and
|
|
142
|
+
has no equivalent.
|
|
43
143
|
* Mobile `Checkbox` and `SwitchInput` now put their `testId` on the native `<input>` rather than
|
|
44
144
|
on a wrapper, as on desktop.
|
|
45
|
-
* Desktop panel splitters
|
|
46
|
-
|
|
47
|
-
`DashContainer` and `SplitTreeMap`.
|
|
48
|
-
* Renamed the `.xh-resizable-splitter` CSS class to `.xh-panel-splitter`, and removed
|
|
49
|
-
`.xh-resizable-dragger` and `.xh-resizable-collapser-btn`.
|
|
145
|
+
* Desktop panel splitters now use new `--xh-panel-splitter-*` CSS variables and an
|
|
146
|
+
`.xh-panel-splitter` class, in place of the `--xh-resizable-*` variables and `.xh-resizable-*`
|
|
147
|
+
classes. The `--xh-resizable-*` variables still style `DashContainer` and `SplitTreeMap`.
|
|
50
148
|
* `PanelConfig.showHeaderCollapseButton` now defaults to `false` on an expanded panel whose
|
|
51
149
|
splitter shows a collapse button.
|
|
52
150
|
|
|
@@ -69,13 +167,9 @@ detailed, step-by-step upgrade instructions with before/after code examples.
|
|
|
69
167
|
double-click to reset size, and drag-to-collapse.
|
|
70
168
|
* Added a clickable strip for collapsed panels that have no title or icon, so they stay easy to find
|
|
71
169
|
and expand. A single click on any collapsed panel header now expands the panel.
|
|
72
|
-
* Added `
|
|
73
|
-
|
|
170
|
+
* Added `genRandomId()` and `genUuid()` to `@xh/hoist/utils/js`, for short random alphanumeric IDs
|
|
171
|
+
and version 4 UUIDs. `genUuid()` works on plain HTTP, where browsers omit `crypto.randomUUID()`.
|
|
74
172
|
* Added `htmlButton`, `mark` and `caption` element factories to `@xh/hoist/cmp/layout`.
|
|
75
|
-
* Added `genUuid()` to `@xh/hoist/utils/js` for version 4 UUIDs, including on plain HTTP where
|
|
76
|
-
browsers omit `crypto.randomUUID()`.
|
|
77
|
-
* Added `getOwn()` to `@xh/hoist/utils/js`, which reads an own property of an object and never one
|
|
78
|
-
inherited from `Object.prototype`. Use it to look up untrusted keys in a plain-object map.
|
|
79
173
|
* Mobile `TabContainer` now applies `${testId}-switcher` to its switcher and
|
|
80
174
|
`${testId}-switcher-${tabId}` to each switcher button, as on desktop.
|
|
81
175
|
* Added "Purge Connections" buttons to the Admin Console Connection Pool Monitor, to close all
|
|
@@ -113,6 +207,8 @@ detailed, step-by-step upgrade instructions with before/after code examples.
|
|
|
113
207
|
|
|
114
208
|
### ⚙️ Technical
|
|
115
209
|
|
|
210
|
+
* Added `getOwn()` to `@xh/hoist/utils/js`, which reads an own property of an object and never one
|
|
211
|
+
inherited from `Object.prototype`. Use it to look up untrusted keys in a plain-object map.
|
|
116
212
|
* Removed two runtime dependencies with security histories in favor of small Hoist
|
|
117
213
|
implementations, each pinned by a spec recorded from the library it replaces:
|
|
118
214
|
* `semver` - `checkVersion()` and friends compare versions with a numeric parser, with no
|
|
@@ -121,17 +217,9 @@ detailed, step-by-step upgrade instructions with before/after code examples.
|
|
|
121
217
|
with the same iPadOS and Chromium `userAgentData` checks. Smart TVs and other agents that
|
|
122
218
|
are neither phone nor tablet now count as desktop, where before none of `XH.isPhone`,
|
|
123
219
|
`isTablet` and `isDesktop` was true.
|
|
124
|
-
* Desktop and mobile `DateInput` build their calendar props with one shared helper and share one
|
|
125
|
-
react-day-picker theme, in `@xh/hoist/kit/react-day-picker`, for light and dark modes. Dropping
|
|
126
|
-
Blueprint's date picker also drops the second copies of date-fns and react-day-picker it pulled
|
|
127
|
-
into every app.
|
|
128
|
-
* Desktop `Select` now windows large option lists with react-window 2 directly, dropping
|
|
129
|
-
react-windowed-select and the second copy of react-window it pinned into every app.
|
|
130
220
|
* `LocalStorageService` and `SessionStorageService` now read and write browser storage directly.
|
|
131
221
|
Keys and JSON values are stored exactly as before. Removed the unused `isFake` getter - when
|
|
132
222
|
storage is unavailable the service logs a warning and holds values in memory, as before.
|
|
133
|
-
* Removed Onsen UI from the mobile toolkit, with the `@xh/hoist/kit/onsen` wrappers. Each mobile
|
|
134
|
-
component now owns its DOM and styles.
|
|
135
223
|
* Barrels of type-only modules now use `export type *`, so SWC no longer emits a runtime re-export
|
|
136
224
|
of them. ESLint also requires `import type` and `export type` for all type-only imports and
|
|
137
225
|
exports, as Toolbox and hoist-chat-kit already do.
|
|
@@ -141,9 +229,7 @@ detailed, step-by-step upgrade instructions with before/after code examples.
|
|
|
141
229
|
* Moved the selected grid row's text color from its cells to the row. A cell with its own color
|
|
142
230
|
class, such as a text renderer's sign color, now keeps that color when its row is selected.
|
|
143
231
|
* Mobile apps no longer load Onsen UI's stylesheet or its icon fonts. Touch-device defaults that
|
|
144
|
-
the Onsen stylesheet supplied
|
|
145
|
-
manipulation`, heading sizes, and a body sized to the viewport - are now set by the mobile
|
|
146
|
-
`AppContainer` stylesheet.
|
|
232
|
+
the Onsen stylesheet supplied are now set by the mobile `AppContainer` stylesheet.
|
|
147
233
|
* Mobile `Dialog` and `DialogPanel` render into a portal on the document body, so they cover the
|
|
148
234
|
viewport wherever they sit in the component tree.
|
|
149
235
|
|
|
@@ -151,23 +237,25 @@ detailed, step-by-step upgrade instructions with before/after code examples.
|
|
|
151
237
|
|
|
152
238
|
* @auth0/auth0-spa-js `2.28 → 2.29`
|
|
153
239
|
* @azure/msal-browser `5.25 → 5.27`
|
|
154
|
-
*
|
|
155
|
-
*
|
|
240
|
+
* @azure/msal-common `16.14 → 16.15`
|
|
241
|
+
* @blueprintjs/datetime `removed`
|
|
242
|
+
* core-js `3.50 → 3.51`
|
|
243
|
+
* date-fns `removed`
|
|
244
|
+
* http-status-codes `removed`
|
|
245
|
+
* inflection `added @ 3.0` - replaces lodash-inflection behind `pluralize`, `singularize` and `ordinalize`
|
|
246
|
+
* lodash-inflection `removed`
|
|
156
247
|
* mobx `7.0 → 7.1` - `toJS` now includes `@observable accessor` fields, which it previously left out
|
|
248
|
+
* numbro `removed`
|
|
249
|
+
* onsenui `removed`
|
|
250
|
+
* react-onsenui `removed`
|
|
157
251
|
* react-window `2.3 → 2.5`
|
|
158
252
|
* react-windowed-select `removed`
|
|
253
|
+
* router5 `7.0 → 8.0`
|
|
254
|
+
* router5-plugin-browser `7.0 → 8.0`
|
|
159
255
|
* semver `removed`
|
|
160
|
-
* ua-parser-js `removed`
|
|
161
|
-
* http-status-codes `removed`
|
|
162
|
-
* inflection `added` - replaces lodash-inflection behind `pluralize`, `singularize` and `ordinalize`
|
|
163
|
-
* lodash-inflection `removed`
|
|
164
256
|
* short-unique-id `removed`
|
|
165
257
|
* store2 `removed`
|
|
166
|
-
*
|
|
167
|
-
* @blueprintjs/datetime `removed`
|
|
168
|
-
* date-fns `removed`
|
|
169
|
-
* onsenui `removed`
|
|
170
|
-
* react-onsenui `removed`
|
|
258
|
+
* ua-parser-js `removed`
|
|
171
259
|
|
|
172
260
|
|
|
173
261
|
## 89.3.1 - 2026-10-21
|
|
@@ -218,6 +306,9 @@ detailed, step-by-step upgrade instructions with before/after code examples.
|
|
|
218
306
|
`items` submenu. Items a `prepareFn` adds now also receive the tab in their `actionFn`.
|
|
219
307
|
* Fixed `XH.safeDestroy()` stopping at the first `destroy()` that threw, which left the remaining
|
|
220
308
|
objects - and the rest of a model's managed children - undestroyed. It now logs the error.
|
|
309
|
+
* Fixed a grouped `Grid` showing its grouped column again on any column state change, such as a
|
|
310
|
+
resize, an autosize or a view restore. A header drag while grouped also saved the column as
|
|
311
|
+
hidden, so it stayed hidden after ungrouping.
|
|
221
312
|
|
|
222
313
|
### ⚙️ Technical
|
|
223
314
|
|
|
@@ -250,20 +341,11 @@ detailed, step-by-step upgrade instructions with before/after code examples.
|
|
|
250
341
|
* Fixed desktop `NumberInput` with `min` or `max` rendering blank on mount when its formatted value
|
|
251
342
|
was not a plain number, as with `displayWithCommas` and a value of 1,000 or more, or a
|
|
252
343
|
`valueLabel`. Changing `min` or `max` on such an input could also set its value to 0.
|
|
253
|
-
* Fixed a grouped `Grid` showing its grouped column again on any column state change, such as a
|
|
254
|
-
resize, an autosize or a view restore. A header drag while grouped also saved the column as
|
|
255
|
-
hidden, so it stayed hidden after ungrouping.
|
|
256
344
|
* Fixed `onShowLazy` tabs and other managed refresh contexts replaying a missed auto-refresh as a
|
|
257
345
|
manual refresh when shown. The replay now stays an auto-refresh unless a missed refresh was manual.
|
|
258
346
|
* Fixed a model created with `creates()` re-running `onLinked()` on every render when its component
|
|
259
347
|
had no Hoist model above it, as in a component test rendered at the root.
|
|
260
348
|
|
|
261
|
-
### ⚙️ Technical
|
|
262
|
-
|
|
263
|
-
* `fmtNumber` and the formatters built on it now format digits with a cached `Intl.NumberFormat` in
|
|
264
|
-
place of numbro. This speeds up bulk formatting such as all-rows grid autosizing. Ordinary values
|
|
265
|
-
render as before. Edge cases such as negative ties and `Infinity` changed - see the upgrade notes.
|
|
266
|
-
|
|
267
349
|
### 🤖 AI Docs + Tooling
|
|
268
350
|
|
|
269
351
|
* The hoist-react MCP server and `hoist-docs` CLI now serve docs from companion libraries that build
|
|
@@ -30,7 +30,9 @@ export const appEnvironment: ColumnSpec = {
|
|
|
30
30
|
field: {
|
|
31
31
|
name: 'appEnvironment',
|
|
32
32
|
type: 'string',
|
|
33
|
-
displayName: 'Environment'
|
|
33
|
+
displayName: 'Environment',
|
|
34
|
+
isDimension: true,
|
|
35
|
+
aggregator: 'UNIQUE'
|
|
34
36
|
},
|
|
35
37
|
chooserGroup: 'Core Data',
|
|
36
38
|
width: 130
|
|
@@ -40,7 +42,9 @@ export const appVersion: ColumnSpec = {
|
|
|
40
42
|
field: {
|
|
41
43
|
name: 'appVersion',
|
|
42
44
|
displayName: 'App Version',
|
|
43
|
-
type: 'string'
|
|
45
|
+
type: 'string',
|
|
46
|
+
isDimension: true,
|
|
47
|
+
aggregator: 'UNIQUE'
|
|
44
48
|
},
|
|
45
49
|
headerName: 'Version',
|
|
46
50
|
chooserGroup: 'Client App / Browser',
|
|
@@ -282,7 +286,9 @@ export const clientAppCode: ColumnSpec = {
|
|
|
282
286
|
field: {
|
|
283
287
|
name: 'clientAppCode',
|
|
284
288
|
type: 'string',
|
|
285
|
-
displayName: 'Client App'
|
|
289
|
+
displayName: 'Client App',
|
|
290
|
+
isDimension: true,
|
|
291
|
+
aggregator: 'UNIQUE'
|
|
286
292
|
},
|
|
287
293
|
chooserGroup: 'Core Data',
|
|
288
294
|
width: 100
|
|
@@ -13,16 +13,17 @@ import {DateRangePickerModel} from '@xh/hoist/cmp/daterange';
|
|
|
13
13
|
import {FilterChooserModel} from '@xh/hoist/cmp/filter';
|
|
14
14
|
import {FormModel} from '@xh/hoist/cmp/form';
|
|
15
15
|
import type {ColumnRenderer, ColumnSpec} from '@xh/hoist/cmp/grid';
|
|
16
|
-
import {
|
|
16
|
+
import {TreeStyle} from '@xh/hoist/cmp/grid';
|
|
17
|
+
import {CubeGridModel} from '@xh/hoist/cmp/cubegrid';
|
|
17
18
|
import {GroupingChooserModel} from '@xh/hoist/cmp/grouping';
|
|
18
|
-
import type {LoadSpec, PlainObject} from '@xh/hoist/core';
|
|
19
|
+
import type {LoadSpec, PlainObject, SelectOption} from '@xh/hoist/core';
|
|
19
20
|
import {HoistModel, managed, XH} from '@xh/hoist/core';
|
|
20
|
-
import type {CubeFieldSpec, FieldSpec, ViewRowData} from '@xh/hoist/data';
|
|
21
|
+
import type {CubeFieldSpec, FieldSpec, QueryConfig, ViewRowData} from '@xh/hoist/data';
|
|
21
22
|
import {Cube, getCubeLeaves} from '@xh/hoist/data';
|
|
22
23
|
import {dateRenderer, dateTimeSecRenderer, numberRenderer} from '@xh/hoist/format';
|
|
23
|
-
import {action, computed, observable, observableRef} from '@xh/hoist/mobx';
|
|
24
|
+
import {action, bindable, bindableRef, computed, observable, observableRef} from '@xh/hoist/mobx';
|
|
24
25
|
import {LocalDate} from '@xh/hoist/utils/datetime';
|
|
25
|
-
import {compact, get, isEmpty, isEqual, round} from 'lodash';
|
|
26
|
+
import {compact, find, get, isEmpty, isEqual, isString, mapValues, round, takeRight} from 'lodash';
|
|
26
27
|
import moment from 'moment';
|
|
27
28
|
import type {ActivityDetailProvider} from './detail/ActivityDetailModel';
|
|
28
29
|
|
|
@@ -39,9 +40,15 @@ export class ActivityTrackingModel extends HoistModel implements ActivityDetailP
|
|
|
39
40
|
@managed @observableRef accessor groupingChooserModel: GroupingChooserModel;
|
|
40
41
|
@managed @observableRef accessor cube: Cube;
|
|
41
42
|
@managed @observableRef accessor filterChooserModel: FilterChooserModel;
|
|
42
|
-
@managed @observableRef accessor
|
|
43
|
+
@managed @observableRef accessor cubeGridModel: CubeGridModel;
|
|
43
44
|
@managed dataFieldsEditorModel: DataFieldsEditorModel;
|
|
44
45
|
|
|
46
|
+
/** Dimension to pivot into columns, or null for the standard grouped grid. */
|
|
47
|
+
@bindable accessor pivotBy: string = null;
|
|
48
|
+
|
|
49
|
+
/** Measures shown per pivot value, at most `PIVOT_MAX_MEASURES`. */
|
|
50
|
+
@bindableRef accessor pivotMeasures: string[] = ['entryCount'];
|
|
51
|
+
|
|
45
52
|
/**
|
|
46
53
|
* Optional spec for fields to be extracted from additional `data` returned by track entries
|
|
47
54
|
* and promoted to top-level columns in the grids. Supports dot-delimited paths as names.
|
|
@@ -70,6 +77,46 @@ export class ActivityTrackingModel extends HoistModel implements ActivityDetailP
|
|
|
70
77
|
return this.groupingChooserModel.value;
|
|
71
78
|
}
|
|
72
79
|
|
|
80
|
+
/**
|
|
81
|
+
* Dimensions available to pivot on, carrying their distinct value count in the loaded data.
|
|
82
|
+
* Those already grouping the rows are left out. Those with a single value, which would only
|
|
83
|
+
* repeat the row summary, or too many to read are disabled.
|
|
84
|
+
*/
|
|
85
|
+
@computed
|
|
86
|
+
get pivotByOptions(): SelectOption[] {
|
|
87
|
+
const {dimensions, pivotCardinality} = this;
|
|
88
|
+
return this.cubeGridModel.pivotModel.availableDimensions
|
|
89
|
+
.filter(it => !dimensions.includes(it.name))
|
|
90
|
+
.map(it => {
|
|
91
|
+
const count = pivotCardinality[it.name] ?? 0;
|
|
92
|
+
return {
|
|
93
|
+
value: it.name,
|
|
94
|
+
label: `${it.displayName} (${count})`,
|
|
95
|
+
displayName: it.displayName,
|
|
96
|
+
isDisabled: count < 2 || count > PIVOT_MAX_PATHS
|
|
97
|
+
};
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** Distinct value count per pivotable dimension, over the records currently loaded. */
|
|
102
|
+
@computed
|
|
103
|
+
private get pivotCardinality(): Record<string, number> {
|
|
104
|
+
const sets: Record<string, Set<any>> = {};
|
|
105
|
+
PIVOT_DIMENSIONS.forEach(name => (sets[name] = new Set()));
|
|
106
|
+
this.cube.records.forEach(({data}) => {
|
|
107
|
+
PIVOT_DIMENSIONS.forEach(name => sets[name].add(data[name]));
|
|
108
|
+
});
|
|
109
|
+
return mapValues(sets, it => it.size);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
get pivotMeasureOptions(): SelectOption[] {
|
|
113
|
+
const {measures, availableMeasures} = this.cubeGridModel.pivotModel;
|
|
114
|
+
return availableMeasures.map(it => {
|
|
115
|
+
const header = find(measures, {field: it.name})?.column?.headerName;
|
|
116
|
+
return {value: it.name, label: isString(header) ? header : it.displayName};
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
73
120
|
@computed
|
|
74
121
|
get hasFilter(): boolean {
|
|
75
122
|
return !!this.filterChooserModel.value;
|
|
@@ -119,6 +166,8 @@ export class ActivityTrackingModel extends HoistModel implements ActivityDetailP
|
|
|
119
166
|
|
|
120
167
|
this.dataFieldsEditorModel = new DataFieldsEditorModel(this);
|
|
121
168
|
this.markPersist('dataFields');
|
|
169
|
+
this.markPersist('pivotBy');
|
|
170
|
+
this.markPersist('pivotMeasures');
|
|
122
171
|
|
|
123
172
|
this.addReaction(
|
|
124
173
|
{
|
|
@@ -132,12 +181,16 @@ export class ActivityTrackingModel extends HoistModel implements ActivityDetailP
|
|
|
132
181
|
debounce: 100
|
|
133
182
|
},
|
|
134
183
|
{
|
|
135
|
-
track: () => [
|
|
136
|
-
|
|
137
|
-
|
|
184
|
+
track: () => [
|
|
185
|
+
this.cubeGridModel,
|
|
186
|
+
this.dimensions,
|
|
187
|
+
this.pivotBy,
|
|
188
|
+
this.pivotMeasures
|
|
189
|
+
],
|
|
190
|
+
run: () => this.syncQuery()
|
|
138
191
|
},
|
|
139
192
|
{
|
|
140
|
-
track: () => this.
|
|
193
|
+
track: () => this.cubeGridModel.selectedRecords,
|
|
141
194
|
run: recs =>
|
|
142
195
|
(this.trackLogs = recs.flatMap(r => getCubeLeaves(r.raw as ViewRowData))),
|
|
143
196
|
debounce: 100
|
|
@@ -164,6 +217,7 @@ export class ActivityTrackingModel extends HoistModel implements ActivityDetailP
|
|
|
164
217
|
|
|
165
218
|
data.forEach(it => this.processRawTrackLog(it));
|
|
166
219
|
await cube.loadDataAsync(data);
|
|
220
|
+
await this.cubeGridModel.preSelectFirstAsync();
|
|
167
221
|
})
|
|
168
222
|
.catch(async e => {
|
|
169
223
|
if (loadSpec.isStale || loadSpec.isAutoRefresh) return;
|
|
@@ -179,6 +233,12 @@ export class ActivityTrackingModel extends HoistModel implements ActivityDetailP
|
|
|
179
233
|
}
|
|
180
234
|
}
|
|
181
235
|
|
|
236
|
+
/** Keeps the most recent picks, so a third choice replaces the oldest. */
|
|
237
|
+
@action
|
|
238
|
+
setPivotMeasures(measures: string[]) {
|
|
239
|
+
this.pivotMeasures = takeRight(measures ?? [], PIVOT_MAX_MEASURES);
|
|
240
|
+
}
|
|
241
|
+
|
|
182
242
|
@action
|
|
183
243
|
toggleFilterChooser() {
|
|
184
244
|
this.showFilterChooser = !this.showFilterChooser;
|
|
@@ -217,18 +277,6 @@ export class ActivityTrackingModel extends HoistModel implements ActivityDetailP
|
|
|
217
277
|
});
|
|
218
278
|
}
|
|
219
279
|
|
|
220
|
-
private async loadGridAsync() {
|
|
221
|
-
const {cube, gridModel, dimensions} = this,
|
|
222
|
-
data = cube.executeQuery({
|
|
223
|
-
dimensions,
|
|
224
|
-
includeRoot: true,
|
|
225
|
-
provideLeaves: true
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
gridModel.loadData(data);
|
|
229
|
-
await gridModel.preSelectFirstAsync();
|
|
230
|
-
}
|
|
231
|
-
|
|
232
280
|
private cubeLabelComparator(valA, valB, sortDir, abs, {recordA, recordB, defaultComparator}) {
|
|
233
281
|
const rawA = recordA?.raw,
|
|
234
282
|
rawB = recordB?.raw,
|
|
@@ -266,6 +314,34 @@ export class ActivityTrackingModel extends HoistModel implements ActivityDetailP
|
|
|
266
314
|
};
|
|
267
315
|
}
|
|
268
316
|
|
|
317
|
+
//------------------------
|
|
318
|
+
// Impl - query
|
|
319
|
+
//------------------------
|
|
320
|
+
/**
|
|
321
|
+
* Requery the view to match the grouping and pivot controls. The grid follows on its own, and
|
|
322
|
+
* shows the path cap's error in its place if the pivot outgrows it.
|
|
323
|
+
*/
|
|
324
|
+
private syncQuery() {
|
|
325
|
+
this.cubeGridModel.view.updateQuery(this.queryConfig);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
private get queryConfig(): QueryConfig {
|
|
329
|
+
const {dimensions, pivotBy, pivotMeasures} = this,
|
|
330
|
+
pivot =
|
|
331
|
+
pivotBy && !dimensions.includes(pivotBy) && !isEmpty(pivotMeasures)
|
|
332
|
+
? pivotBy
|
|
333
|
+
: null;
|
|
334
|
+
|
|
335
|
+
return {
|
|
336
|
+
dimensions,
|
|
337
|
+
includeRoot: true,
|
|
338
|
+
provideLeaves: true,
|
|
339
|
+
pivot: pivot
|
|
340
|
+
? {dimensions: [pivot], measures: pivotMeasures, maxPivotPaths: PIVOT_MAX_PATHS}
|
|
341
|
+
: null
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
|
|
269
345
|
//------------------------
|
|
270
346
|
// Impl - core data models
|
|
271
347
|
//------------------------
|
|
@@ -274,7 +350,7 @@ export class ActivityTrackingModel extends HoistModel implements ActivityDetailP
|
|
|
274
350
|
this.cube = this.createCube();
|
|
275
351
|
this.filterChooserModel = this.createFilterChooserModel();
|
|
276
352
|
this.groupingChooserModel = this.createGroupingChooserModel();
|
|
277
|
-
this.
|
|
353
|
+
this.cubeGridModel = this.createCubeGridModel();
|
|
278
354
|
}
|
|
279
355
|
|
|
280
356
|
private createCube(): Cube {
|
|
@@ -292,8 +368,8 @@ export class ActivityTrackingModel extends HoistModel implements ActivityDetailP
|
|
|
292
368
|
Col.dayRange.field,
|
|
293
369
|
Col.device.field,
|
|
294
370
|
Col.errorName.field,
|
|
295
|
-
Col.elapsed.field,
|
|
296
|
-
Col.elapsedMax.field,
|
|
371
|
+
{...(Col.elapsed.field as FieldSpec), displayName: 'Elapsed (avg)'},
|
|
372
|
+
{...(Col.elapsedMax.field as FieldSpec), displayName: 'Elapsed (max)'},
|
|
297
373
|
Col.entryCount.field,
|
|
298
374
|
Col.impersonating.field,
|
|
299
375
|
Col.instance.field,
|
|
@@ -376,28 +452,16 @@ export class ActivityTrackingModel extends HoistModel implements ActivityDetailP
|
|
|
376
452
|
});
|
|
377
453
|
}
|
|
378
454
|
|
|
379
|
-
private
|
|
455
|
+
private createCubeGridModel(): CubeGridModel {
|
|
380
456
|
const hidden = true;
|
|
381
|
-
return new
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
enableExport: true,
|
|
385
|
-
treeMode: true,
|
|
386
|
-
colChooserModel: {height: 450},
|
|
387
|
-
treeStyle: TreeStyle.HIGHLIGHTS_AND_BORDERS,
|
|
388
|
-
autosizeOptions: {mode: 'managed', includeCollapsedChildren: true},
|
|
389
|
-
exportOptions: {filename: exportFilename('activity-summary')},
|
|
390
|
-
emptyText: 'No activity reported.',
|
|
391
|
-
sortBy: ['cubeLabel'],
|
|
392
|
-
expandLevel: 1,
|
|
393
|
-
levelLabels: () => ['Total', ...this.groupingChooserModel.valueDisplayNames],
|
|
457
|
+
return new CubeGridModel({
|
|
458
|
+
cube: this.cube,
|
|
459
|
+
query: this.queryConfig,
|
|
394
460
|
columns: [
|
|
395
461
|
{
|
|
396
|
-
field:
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
displayName: 'Group'
|
|
400
|
-
},
|
|
462
|
+
field: 'cubeLabel',
|
|
463
|
+
headerName: 'Group',
|
|
464
|
+
chooserName: 'Group',
|
|
401
465
|
minWidth: 100,
|
|
402
466
|
autosizeMaxWidth: 400,
|
|
403
467
|
isTreeColumn: true,
|
|
@@ -409,8 +473,8 @@ export class ActivityTrackingModel extends HoistModel implements ActivityDetailP
|
|
|
409
473
|
{...Col.browser, hidden},
|
|
410
474
|
{...Col.userAgent, hidden},
|
|
411
475
|
{...Col.impersonating, hidden},
|
|
412
|
-
{...Col.elapsed,
|
|
413
|
-
{...Col.elapsedMax,
|
|
476
|
+
{...Col.elapsed, hidden},
|
|
477
|
+
{...Col.elapsedMax, hidden},
|
|
414
478
|
{...Col.dayRange, hidden},
|
|
415
479
|
{...Col.entryCount},
|
|
416
480
|
{field: 'count', chooserGroup: 'Core Data', hidden},
|
|
@@ -424,7 +488,29 @@ export class ActivityTrackingModel extends HoistModel implements ActivityDetailP
|
|
|
424
488
|
{...Col.errorName, hidden},
|
|
425
489
|
{...Col.userAlertedFlag, hidden},
|
|
426
490
|
...this.dataFieldCols.map(it => ({...it, hidden: !it.appData.showInAggGrid}))
|
|
427
|
-
]
|
|
491
|
+
],
|
|
492
|
+
gridConfig: {
|
|
493
|
+
showSummary: 'top',
|
|
494
|
+
persistWith: {...this.persistWith, path: 'aggGrid'},
|
|
495
|
+
selModel: 'multiple',
|
|
496
|
+
enableExport: true,
|
|
497
|
+
colChooserModel: {height: 450},
|
|
498
|
+
treeStyle: TreeStyle.HIGHLIGHTS_AND_BORDERS,
|
|
499
|
+
autosizeOptions: {mode: 'managed', includeCollapsedChildren: true},
|
|
500
|
+
exportOptions: {filename: exportFilename('activity-summary')},
|
|
501
|
+
emptyText: 'No activity reported.',
|
|
502
|
+
sortBy: ['cubeLabel'],
|
|
503
|
+
expandLevel: 1
|
|
504
|
+
},
|
|
505
|
+
pivotConfig: {
|
|
506
|
+
dimensions: PIVOT_DIMENSIONS.map(field => ({field})),
|
|
507
|
+
dimensionDefaults: {showSummary: true},
|
|
508
|
+
measures: [
|
|
509
|
+
{field: 'entryCount', column: {width: 80}},
|
|
510
|
+
{field: 'elapsed', column: {width: 100, renderer: elapsedRenderer}},
|
|
511
|
+
{field: 'elapsedMax', column: {width: 100, renderer: elapsedRenderer}}
|
|
512
|
+
]
|
|
513
|
+
}
|
|
428
514
|
});
|
|
429
515
|
}
|
|
430
516
|
|
|
@@ -469,3 +555,25 @@ export class ActivityTrackingModel extends HoistModel implements ActivityDetailP
|
|
|
469
555
|
}
|
|
470
556
|
}
|
|
471
557
|
}
|
|
558
|
+
|
|
559
|
+
/** Dimensions offered for pivoting, in menu order - those with a bounded set of values. */
|
|
560
|
+
const PIVOT_DIMENSIONS = [
|
|
561
|
+
'day',
|
|
562
|
+
'month',
|
|
563
|
+
'appEnvironment',
|
|
564
|
+
'appVersion',
|
|
565
|
+
'browser',
|
|
566
|
+
'category',
|
|
567
|
+
'clientAppCode',
|
|
568
|
+
'device',
|
|
569
|
+
'errorName',
|
|
570
|
+
'instance',
|
|
571
|
+
'severity',
|
|
572
|
+
'username'
|
|
573
|
+
];
|
|
574
|
+
|
|
575
|
+
/** Widest pivot offered - beyond this the grid is unreadable long before it is slow. */
|
|
576
|
+
const PIVOT_MAX_PATHS = 30;
|
|
577
|
+
|
|
578
|
+
/** Measures per pivot value - each one multiplies the column count. */
|
|
579
|
+
const PIVOT_MAX_MEASURES = 2;
|