@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 CHANGED
@@ -4,60 +4,52 @@
4
4
 
5
5
  ### 🎁 New Features
6
6
 
7
- * `DashCanvasView` and `DashContainerView` components now have a public `@bindable` `titleDetails`
8
- property on their models to support displaying additional information in the title bar of these
9
- components. `titleDetails` is not persisted, and is expected to be set programmatically by the
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 own
17
- potentially breaking changes. Fortunately, internal Hoist updates to our managed API wrappers mean
18
- that most apps will see very minimal changes, although there are required adjustments to app-level
19
- `package.json` to install updated grid dependencies and `Bootstrap.ts` to import and register
20
- your licensed grid modules at their new import paths.
21
-
22
- Applications implementing `groupRowRenderer` should note that the `value` property passed to this
23
- function is no longer stringified, but is instead the raw field value for the group.
24
-
25
- See AG's upgrade guides for more details:
26
- ** [Upgrade to v32](https://www.ag-grid.com/react-data-grid/upgrading-to-ag-grid-32/)
27
- ** [Upgrade to v33](https://www.ag-grid.com/react-data-grid/upgrading-to-ag-grid-33/)
28
- ** [Upgrade to v34](https://www.ag-grid.com/react-data-grid/upgrading-to-ag-grid-34/)
29
-
30
- * The constructor for `TabModel` has changed to take its owning container as a second argument.
31
- (Most applications do not create `TabModels` directly, but it is possible.)
32
- * The `Exception` class and `HoistException` type have been moved from `@xh\hoist\core` to a new
33
- lower level package `@xh\hoist\exception`. This new structure is not expected to effect most
34
- applications, and was put in place to reduce the risk of circular dependencies between internal
35
- hoist packages.
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` and tweaked the filter popup
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. Apps may now
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
- * Improvements to View Management:
47
- ** Allow users to create 'Global' views directly in 'Save/Save As' Dialog.
48
- ** Simplify presentation/edit of view visibility to new "Visibility" control
49
- ** Support for the 'isDefaultPinned' attribute on global views has been removed. All global
50
- views will be pinned by default. This feature was deemed too confusing, and not useful in
51
- practice. App maintainers should ensure that all global views are appropriate and well
52
- organized enough to be shown immediately to new users in the view menu.
53
- * New constraint rule: `validEmails` - to validate one or more email addresses in an input field.
54
- * `DashCanvas` accepts a new prop `rglOptions` to pass additional options to the underlying
55
- `react-grid-layout`.
56
- * Experimental grid feature `enableFullWidthScroll` has been promoted to a first-class property
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;
@@ -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 (isEmpty(records)) return [];
312
+ if (!records?.length) return [];
313
313
 
314
314
  const rootId = parentId + Cube.RECORD_ID_DELIMITER;
315
315
 
316
- if (isEmpty(dimensions)) {
317
- return map(records, r => {
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
- if (!this.query.bucketSpecFn) return rows;
358
+ const {query} = this;
359
359
 
360
- const bucketSpec = this.query.bucketSpecFn(rows);
361
- if (!bucketSpec) return rows;
360
+ if (!query.bucketSpecFn) return rows;
361
+ if (!query.includeLeaves && rows[0]?.isLeaf) return rows;
362
362
 
363
- if (!this.query.includeLeaves && rows[0]?.isLeaf) return rows;
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
- if (!buckets[bucketVal]) buckets[bucketVal] = [];
376
- buckets[bucketVal].push(row);
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
- cube.store.records.filter(r => query.test(r)).forEach(r => ret.set(r.id, r));
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.1760466580390",
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",