@xh/hoist 71.0.0-SNAPSHOT.1736119965537 → 71.0.0-SNAPSHOT.1736123831690

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,7 +4,8 @@
4
4
 
5
5
  ### 💥 Breaking Changes (upgrade 🟢 Medium - Hoist core update, adjust imports)
6
6
 
7
- * Requires `hoist-core >= 26.1` with new APIs to support `ViewManager`.
7
+ * Requires `hoist-core >= 27.0` with new APIs to support `ViewManager` and additional cluster
8
+ synchronization monitor in admin client.
8
9
  * `ErrorMessage` is now cross-platform - update imports from `@xh/hoist/desktop/cmp/error`
9
10
  or `@xh/hoist/mobile/cmp/error` to `@xh/hoist/cmp/error`.
10
11
  * `Mask` is now cross-platform - update imports from `@xh/hoist/desktop/cmp/mask` or
@@ -34,6 +35,8 @@
34
35
  * Updated sorting on grouped grids to place ungrouped items at the bottom.
35
36
  * `DashCanvas` views can now be resized left and up in addition to right and down.
36
37
  * `FetchService.autoGenCorrelationIds` now supports a functional form for per-request behavior.
38
+ * New `Objects` tab in admin client supports comparing state across the cluster, and flagging any
39
+ persistent state inconsistencies.
37
40
 
38
41
  ### 🐞 Bug Fixes
39
42
 
@@ -220,13 +220,21 @@ export class ManageDialogModel extends HoistModel {
220
220
  }
221
221
 
222
222
  private async doMakeGlobalAsync(view: ViewInfo) {
223
- const {globalDisplayName, typeDisplayName} = this.viewManagerModel,
224
- {typedName} = view,
225
- msgs = [
226
- `The ${typedName} will become a ${globalDisplayName} ${typeDisplayName} visible to all other ${XH.appName} users.`,
227
- strong('Are you sure you want to proceed?')
228
- ];
223
+ const {globalDisplayName, typeDisplayName, globalViews} = this.viewManagerModel,
224
+ {typedName} = view;
225
+
226
+ if (some(globalViews, {name: view.name})) {
227
+ XH.alert({
228
+ title: 'Alert',
229
+ message: `There is already a ${globalDisplayName} ${typedName}. Please rename or edit it instead.`
230
+ });
231
+ return;
232
+ }
229
233
 
234
+ const msgs = [
235
+ `The ${typedName} will become a ${globalDisplayName} ${typeDisplayName} visible to all other ${XH.appName} users.`,
236
+ strong('Are you sure you want to proceed?')
237
+ ];
230
238
  const confirmed = await XH.confirm({
231
239
  message: fragment(msgs.map(m => p(m))),
232
240
  confirmProps: {
@@ -16,7 +16,7 @@ import {ViewPanelModel} from '@xh/hoist/desktop/cmp/viewmanager/dialog/ViewPanel
16
16
  import {getGroupOptions} from '@xh/hoist/desktop/cmp/viewmanager/dialog/Utils';
17
17
  import {fmtDateTime} from '@xh/hoist/format';
18
18
  import {Icon} from '@xh/hoist/icon';
19
- import {capitalize} from 'lodash';
19
+ import {capitalize, some} from 'lodash';
20
20
 
21
21
  /**
22
22
  * Form to edit or view details on a single saved view within the ViewManager manage dialog.
@@ -128,7 +128,7 @@ const formButtons = hoistCmp.factory<ViewPanelModel>({
128
128
  });
129
129
  }
130
130
 
131
- const {enableGlobal, globalDisplayName, manageGlobal, typeDisplayName} =
131
+ const {enableGlobal, globalDisplayName, manageGlobal, typeDisplayName, globalViews} =
132
132
  parent.viewManagerModel;
133
133
  return vbox({
134
134
  style: {gap: 10, alignItems: 'center'},
@@ -148,6 +148,7 @@ const formButtons = hoistCmp.factory<ViewPanelModel>({
148
148
  icon: Icon.globe(),
149
149
  width: 200,
150
150
  outlined: true,
151
+ disabled: some(globalViews, {name: view.name}),
151
152
  omit: readonly || view.isGlobal || !enableGlobal || !manageGlobal,
152
153
  onClick: () => parent.makeGlobalAsync(view)
153
154
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "71.0.0-SNAPSHOT.1736119965537",
3
+ "version": "71.0.0-SNAPSHOT.1736123831690",
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",