@xh/hoist 73.0.0-SNAPSHOT.1747181587236 → 73.0.0-SNAPSHOT.1747259771286

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.
@@ -343,6 +343,10 @@ export class AppContainerModel extends HoistModel {
343
343
  return !isEmpty(this.aboutDialogModel.getItems());
344
344
  }
345
345
 
346
+ openAdmin() {
347
+ XH.openWindow('/admin', XH.appCode + '_xhAdmin');
348
+ }
349
+
346
350
  //----------------------------
347
351
  // Implementation
348
352
  //-----------------------------
@@ -82,6 +82,7 @@ export declare class AppContainerModel extends HoistModel {
82
82
  */
83
83
  showUpdateBanner(version: string, build?: string): void;
84
84
  hasAboutDialog(): boolean;
85
+ openAdmin(): void;
85
86
  private setDocTitle;
86
87
  private startRouter;
87
88
  private startOptionsDialog;
@@ -55,7 +55,7 @@ export const versionBar = hoistCmp.factory({
55
55
  Icon.wrench({
56
56
  omit: isAdminApp || !XH.getUser().isHoistAdminReader,
57
57
  title: 'Open Admin Console',
58
- onClick: () => XH.openWindow('/admin', 'xhAdmin')
58
+ onClick: () => XH.appContainerModel.openAdmin()
59
59
  })
60
60
  ]
61
61
  });
@@ -143,7 +143,7 @@ function buildMenuItems(props: AppMenuButtonProps) {
143
143
  omit: hideAdminItem,
144
144
  text: 'Admin',
145
145
  icon: Icon.wrench(),
146
- actionFn: () => XH.openWindow('/admin', 'xhAdmin')
146
+ actionFn: () => XH.appContainerModel.openAdmin()
147
147
  },
148
148
  {
149
149
  omit: hideImpersonateItem,
@@ -25,7 +25,7 @@ export const [LaunchAdminButton, launchAdminButton] = hoistCmp.withFactory<Launc
25
25
  ref,
26
26
  icon: Icon.wrench(),
27
27
  title: 'Launch admin client...',
28
- onClick: () => XH.openWindow('/admin', 'xhAdmin'),
28
+ onClick: () => XH.appContainerModel.openAdmin(),
29
29
  ...props
30
30
  });
31
31
  }
package/mobx/overrides.ts CHANGED
@@ -23,10 +23,16 @@ export function makeObservable(
23
23
  options?: CreateObservableOptions
24
24
  ) {
25
25
  // Finish creating 'bindable' properties for this instance.
26
- const bindables = target._xhBindableProperties;
27
- forEach(bindables, ({isRef}, name) => {
28
- const propName = `_${name}_bindable`,
29
- initVal = target[name];
26
+ forEach(target._xhBindableProperties, ({isRef}, name) => {
27
+ const propName = `_${name}_bindable`;
28
+
29
+ // makeObservable is called by each constructor in the class hierarchy.
30
+ // Don't process the property before initialized...or if its already processed
31
+ if (!target.hasOwnProperty(name) || target.hasOwnProperty(propName)) {
32
+ return;
33
+ }
34
+
35
+ const initVal = target[name];
30
36
  target[propName] = isRef ? observable.box(initVal, {deep: false}) : observable.box(initVal);
31
37
  Object.defineProperty(target, name, {
32
38
  get() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "73.0.0-SNAPSHOT.1747181587236",
3
+ "version": "73.0.0-SNAPSHOT.1747259771286",
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",