@xh/hoist 75.0.0-SNAPSHOT.1751562280458 → 75.0.0-SNAPSHOT.1752159631363

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
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 75.0-SNAPSHOT - NOT YET RELEASED
4
+
5
+ ### 🐞 Bug Fixes
6
+
7
+ * DashCanvas: ensure `allowAdd=false` is not enforced if loadingState
8
+ and hide `Add` context menu item in views in if `allowAdd=false`
9
+
3
10
  ## v74.1.2 - 2025-07-03
4
11
 
5
12
  ### 🐞 Bug Fixes
@@ -3,7 +3,6 @@ import { HoistModel, HoistModelClass } from './';
3
3
  * Type for use in identifying a model or set of models. May be one of:
4
4
  *
5
5
  * - class (or superclass) to match
6
- * - class name (as a string)
7
6
  * - `"*"` to accept any Model
8
7
  * - boolean
9
8
  * - function taking a model and returning any of the above.
@@ -13,7 +13,6 @@ import {throwIf} from '@xh/hoist/utils/js';
13
13
  * Type for use in identifying a model or set of models. May be one of:
14
14
  *
15
15
  * - class (or superclass) to match
16
- * - class name (as a string)
17
16
  * - `"*"` to accept any Model
18
17
  * - boolean
19
18
  * - function taking a model and returning any of the above.
@@ -357,7 +357,7 @@ export class DashCanvasModel
357
357
  `Trying to add non-existent or omitted DashCanvasViewSpec. id=${specId}`
358
358
  );
359
359
  throwIf(
360
- !viewSpec.allowAdd,
360
+ !this.isLoadingState && !viewSpec.allowAdd,
361
361
  `Trying to add DashCanvasViewSpec with allowAdd=false. id=${specId}`
362
362
  );
363
363
  throwIf(
@@ -4,6 +4,8 @@
4
4
  *
5
5
  * Copyright © 2025 Extremely Heavy Industries Inc.
6
6
  */
7
+ import {isEmpty} from 'lodash';
8
+ import {ReactElement} from 'react';
7
9
  import {box} from '@xh/hoist/cmp/layout';
8
10
  import {hoistCmp, uses} from '@xh/hoist/core';
9
11
  import {ContextMenu} from '@xh/hoist/desktop/cmp/contextmenu';
@@ -15,7 +17,6 @@ import {button} from '../../../button';
15
17
  import {panel} from '../../../panel';
16
18
  import {DashCanvasViewModel} from '../DashCanvasViewModel';
17
19
  import {errorBoundary} from '@xh/hoist/cmp/error/ErrorBoundary';
18
- import {ReactElement} from 'react';
19
20
 
20
21
  /**
21
22
  * Implementation component to show an item within a DashCanvas. This component
@@ -77,7 +78,7 @@ const headerMenu = hoistCmp.factory<DashCanvasViewModel>(({model}) => {
77
78
  text: 'Add',
78
79
  icon: Icon.add(),
79
80
  items: addMenuItems,
80
- hidden: contentLocked
81
+ hidden: contentLocked || isEmpty(addMenuItems)
81
82
  },
82
83
  {
83
84
  text: 'Remove',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "75.0.0-SNAPSHOT.1751562280458",
3
+ "version": "75.0.0-SNAPSHOT.1752159631363",
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",