@xh/hoist 77.0.0-SNAPSHOT.1760466580390 → 77.0.0-SNAPSHOT.1760663247565
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 +41 -46
- package/build/types/data/cube/Query.d.ts +1 -0
- package/data/cube/Query.ts +2 -0
- package/data/cube/View.ts +18 -12
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,60 +4,52 @@
|
|
|
4
4
|
|
|
5
5
|
### 🎁 New Features
|
|
6
6
|
|
|
7
|
-
*
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
application as needed.
|
|
7
|
+
* Added a public `@bindable titleDetails` config to `DashViewModel` to support displaying additional
|
|
8
|
+
information in the title bar of dashboard widgets. The new property is not persisted, allowing
|
|
9
|
+
apps to programmatically show dynamic info in a widget header without perturbing its saved state.
|
|
11
10
|
|
|
12
11
|
## 76.0.0 - 2025-09-26
|
|
13
12
|
|
|
14
13
|
### 💥 Breaking Changes (upgrade difficulty: 🟠 MEDIUM - AG Grid update, Hoist React upgrade)
|
|
15
14
|
|
|
16
|
-
* Hoist v76 upgrades AG Grid to v34 (from v31), covering three major AG Grid releases with their
|
|
17
|
-
potentially breaking changes.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
*
|
|
31
|
-
|
|
32
|
-
*
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
### 🎁 New Features
|
|
38
|
-
|
|
39
|
-
* Added new `extraConfirmText`, `extraConfirmLabel` properties to `MessageOptions`. Use this option
|
|
15
|
+
* Hoist v76 **upgrades AG Grid to v34** (from v31), covering three major AG Grid releases with their
|
|
16
|
+
own potentially breaking changes.
|
|
17
|
+
* Fortunately, internal Hoist updates to our managed API wrappers mean that most apps will see
|
|
18
|
+
very minimal changes, although there are required adjustments to app-level `package.json` to
|
|
19
|
+
install updated grid dependencies and `Bootstrap.ts` to import and register your licensed grid
|
|
20
|
+
modules at their new import paths.
|
|
21
|
+
* Applications implementing `groupRowRenderer` should note that the `value` property passed
|
|
22
|
+
to this function is no longer stringified, but is instead the raw field value for the group.
|
|
23
|
+
* See AG's upgrade guides for more details:
|
|
24
|
+
* [Upgrade to v32](https://www.ag-grid.com/react-data-grid/upgrading-to-ag-grid-32/)
|
|
25
|
+
* [Upgrade to v33](https://www.ag-grid.com/react-data-grid/upgrading-to-ag-grid-33/)
|
|
26
|
+
* [Upgrade to v34](https://www.ag-grid.com/react-data-grid/upgrading-to-ag-grid-34/)
|
|
27
|
+
* Modified the `TabModel` constructor to take its owning container as a second argument.
|
|
28
|
+
* Apps very rarely create `TabModels` directly, so this unlikely to require changes.
|
|
29
|
+
* Moved the `Exception` class and `HoistException` type from `@xh\hoist\core` to a new lower-level
|
|
30
|
+
package `@xh\hoist\exception` to reduce the risk of circule dependencies within Hoist.
|
|
31
|
+
* Apps rarely interact with these directly, so also unlikely to require changes.
|
|
32
|
+
|
|
33
|
+
### 🎁 New Features
|
|
34
|
+
|
|
35
|
+
* Added `extraConfirmText` + `extraConfirmLabel` configs to `MessageOptions`. Use these new options
|
|
40
36
|
to require the specified text to be re-typed by a user when confirming a potentially destructive
|
|
41
|
-
or disruptive action.
|
|
42
|
-
* Updated grid column filters to apply on `Enter` / dismiss on `Esc
|
|
37
|
+
or disruptive action. Note their usage within Hoist's Admin Console when deleting a role.
|
|
38
|
+
* Updated grid column filters to apply on `Enter` / dismiss on `Esc`. Tweaked the filter popup
|
|
43
39
|
toolbar for clarity.
|
|
44
|
-
* Added new ability to specify nested tab containers in a single declarative config.
|
|
40
|
+
* Added new ability to specify nested tab containers in a single declarative config. Apps may now
|
|
45
41
|
provide a spec for a nested tab container directly to the `TabConfig.content` property.
|
|
46
|
-
*
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
on `GridModel`. Set to true to ensure that the grid will have a single horizontal scrollbar
|
|
58
|
-
spanning the width of all columns, including any pinned columns.
|
|
59
|
-
* New `@sharePendingPromise` decorator for returning a shared Promise across concurrent async calls.
|
|
60
|
-
|
|
42
|
+
* Improved `ViewManager` features:
|
|
43
|
+
* Enabled globally sharing a new view directly from the 'Save/Save As' dialog.
|
|
44
|
+
* Simplified presentation and management of view visibility via new "Visibility" control.
|
|
45
|
+
* Removed support for the `isDefaultPinned` attribute on global views. All global views will be
|
|
46
|
+
pinned (i.e. show up in user menus) by default. Users can still explicitly "unpin" any global
|
|
47
|
+
views to remove them from their menus.
|
|
48
|
+
* Added a `validEmails` constraint rule to validate one or more email addresses in an input field.
|
|
49
|
+
* Added `DashCanvas.rglOptions` prop - passed through to the underlying `react-grid-layout`.
|
|
50
|
+
* Promoted experimental grid feature `enableFullWidthScroll` to a first-class `GridModel` config.
|
|
51
|
+
Set to true to ensure that the grid will have a single horizontal scrollbar spanning the width of
|
|
52
|
+
all columns, including any pinned columns.
|
|
61
53
|
|
|
62
54
|
### 🐞 Bug Fixes
|
|
63
55
|
|
|
@@ -73,6 +65,9 @@
|
|
|
73
65
|
|
|
74
66
|
### ⚙️ Technical
|
|
75
67
|
|
|
68
|
+
* Added a new `@sharePendingPromise` decorator for returning a shared Promise across concurrent
|
|
69
|
+
async calls. Calls made to a decorated method while a prior call with the same args is still
|
|
70
|
+
pending won't kick off a new call, but will instead receive the same Promise as the first call.
|
|
76
71
|
* Added `XH.logLevel` to define a minimum logging severity threshold for Hoist's client-side logging
|
|
77
72
|
utilities. Defaulted to 'info' to prevent possible memory and performance impacts of verbose
|
|
78
73
|
logging on 'debug'. Change at runtime via new `XH.setLogLevel()` when troubleshooting. See
|
|
@@ -97,6 +97,7 @@ export declare class Query {
|
|
|
97
97
|
readonly fields: CubeField[];
|
|
98
98
|
readonly dimensions: CubeField[];
|
|
99
99
|
readonly filter: Filter;
|
|
100
|
+
readonly hasFilter: boolean;
|
|
100
101
|
readonly includeRoot: boolean;
|
|
101
102
|
readonly includeLeaves: boolean;
|
|
102
103
|
readonly provideLeaves: boolean;
|
package/data/cube/Query.ts
CHANGED
|
@@ -127,6 +127,7 @@ export class Query {
|
|
|
127
127
|
readonly fields: CubeField[];
|
|
128
128
|
readonly dimensions: CubeField[];
|
|
129
129
|
readonly filter: Filter;
|
|
130
|
+
readonly hasFilter: boolean;
|
|
130
131
|
readonly includeRoot: boolean;
|
|
131
132
|
readonly includeLeaves: boolean;
|
|
132
133
|
readonly provideLeaves: boolean;
|
|
@@ -164,6 +165,7 @@ export class Query {
|
|
|
164
165
|
this.omitFn = omitFn;
|
|
165
166
|
|
|
166
167
|
this._testFn = this.filter?.getTestFn(this.cube.store) ?? null;
|
|
168
|
+
this.hasFilter = this._testFn != null;
|
|
167
169
|
}
|
|
168
170
|
|
|
169
171
|
clone(overrides: Partial<QueryConfig>) {
|
package/data/cube/View.ts
CHANGED
|
@@ -309,12 +309,12 @@ export class View extends HoistBase {
|
|
|
309
309
|
appliedDimensions: PlainObject,
|
|
310
310
|
leafMap: Map<StoreRecordId, LeafRow>
|
|
311
311
|
): BaseRow[] {
|
|
312
|
-
if (
|
|
312
|
+
if (!records?.length) return [];
|
|
313
313
|
|
|
314
314
|
const rootId = parentId + Cube.RECORD_ID_DELIMITER;
|
|
315
315
|
|
|
316
|
-
if (
|
|
317
|
-
return map(
|
|
316
|
+
if (!dimensions?.length) {
|
|
317
|
+
return records.map(r => {
|
|
318
318
|
const id = rootId + r.id,
|
|
319
319
|
leaf = this.cachedRow(id, null, () => new LeafRow(this, id, r));
|
|
320
320
|
leafMap.set(r.id, leaf);
|
|
@@ -355,16 +355,17 @@ export class View extends HoistBase {
|
|
|
355
355
|
parentId: string,
|
|
356
356
|
appliedDimensions: PlainObject
|
|
357
357
|
): BaseRow[] {
|
|
358
|
-
|
|
358
|
+
const {query} = this;
|
|
359
359
|
|
|
360
|
-
|
|
361
|
-
if (!
|
|
360
|
+
if (!query.bucketSpecFn) return rows;
|
|
361
|
+
if (!query.includeLeaves && rows[0]?.isLeaf) return rows;
|
|
362
362
|
|
|
363
|
-
|
|
363
|
+
const bucketSpec = query.bucketSpecFn(rows);
|
|
364
|
+
if (!bucketSpec) return rows;
|
|
364
365
|
|
|
365
366
|
const {name: bucketName, bucketFn} = bucketSpec,
|
|
366
|
-
buckets = {},
|
|
367
|
-
ret = [];
|
|
367
|
+
buckets: Record<string, BaseRow[]> = {},
|
|
368
|
+
ret: BaseRow[] = [];
|
|
368
369
|
|
|
369
370
|
// Determine which bucket to put this row into (if any)
|
|
370
371
|
rows.forEach(row => {
|
|
@@ -372,8 +373,8 @@ export class View extends HoistBase {
|
|
|
372
373
|
if (isNil(bucketVal)) {
|
|
373
374
|
ret.push(row);
|
|
374
375
|
} else {
|
|
375
|
-
|
|
376
|
-
|
|
376
|
+
const bucketRows = buckets[bucketVal] ??= [];
|
|
377
|
+
bucketRows.push(row);
|
|
377
378
|
}
|
|
378
379
|
});
|
|
379
380
|
|
|
@@ -454,8 +455,13 @@ export class View extends HoistBase {
|
|
|
454
455
|
|
|
455
456
|
private filterRecords() {
|
|
456
457
|
const {query, cube} = this,
|
|
458
|
+
{hasFilter} = query,
|
|
457
459
|
ret = new Map();
|
|
458
|
-
|
|
460
|
+
|
|
461
|
+
cube.store.records.forEach(r => {
|
|
462
|
+
if (!hasFilter || query.test(r)) ret.set(r.id, r);
|
|
463
|
+
});
|
|
464
|
+
|
|
459
465
|
this._recordMap = ret;
|
|
460
466
|
}
|
|
461
467
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xh/hoist",
|
|
3
|
-
"version": "77.0.0-SNAPSHOT.
|
|
3
|
+
"version": "77.0.0-SNAPSHOT.1760663247565",
|
|
4
4
|
"description": "Hoist add-on for building and deploying React Applications.",
|
|
5
5
|
"repository": "github:xh/hoist-react",
|
|
6
6
|
"homepage": "https://xh.io",
|