@xh/hoist 67.0.0-SNAPSHOT.1724286422850 → 67.0.0-SNAPSHOT.1724362478970
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
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
* New property `FetchOptions.asJson` to instruct `FetchService` to decode an HTTP response as JSON.
|
|
22
22
|
Note that `FetchService` methods suffixed with `Json` will set this property automatically.
|
|
23
23
|
* `GridModel` will now accept `contextMenu: false` to omit context menus.
|
|
24
|
-
*
|
|
24
|
+
* New bindable `AppContainerModel.intializingLoadMaskMessage` property to allow apps to customize
|
|
25
|
+
the loading mask message shown during app initialization.
|
|
25
26
|
|
|
26
27
|
### 🐞 Bug Fixes
|
|
27
28
|
|
|
@@ -16,9 +16,10 @@ import {
|
|
|
16
16
|
XH
|
|
17
17
|
} from '@xh/hoist/core';
|
|
18
18
|
import {Icon} from '@xh/hoist/icon';
|
|
19
|
-
import {action, when as mobxWhen} from '@xh/hoist/mobx';
|
|
19
|
+
import {action, bindable, when as mobxWhen} from '@xh/hoist/mobx';
|
|
20
20
|
import {never, wait} from '@xh/hoist/promise';
|
|
21
21
|
import numbro from 'numbro';
|
|
22
|
+
import {ReactNode} from 'react';
|
|
22
23
|
import {createRoot} from 'react-dom/client';
|
|
23
24
|
import {
|
|
24
25
|
AlertBannerService,
|
|
@@ -97,6 +98,12 @@ export class AppContainerModel extends HoistModel {
|
|
|
97
98
|
@managed themeModel = new ThemeModel();
|
|
98
99
|
@managed userAgentModel = new UserAgentModel();
|
|
99
100
|
|
|
101
|
+
/**
|
|
102
|
+
* Message shown on spinner while the application is in the INITIALIZING state.
|
|
103
|
+
* Update within `AppModel.initAsync()` to relay app-specific initialization status.
|
|
104
|
+
*/
|
|
105
|
+
@bindable initializingLoadMaskMessage: ReactNode;
|
|
106
|
+
|
|
100
107
|
/**
|
|
101
108
|
* Main entry point. Initialize and render application code.
|
|
102
109
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AppSpec, HoistAppModel, HoistModel, RootRefreshContextModel, TaskObserver } from '@xh/hoist/core';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
2
3
|
import { AboutDialogModel } from './AboutDialogModel';
|
|
3
4
|
import { BannerSourceModel } from './BannerSourceModel';
|
|
4
5
|
import { ChangelogDialogModel } from './ChangelogDialogModel';
|
|
@@ -40,6 +41,11 @@ export declare class AppContainerModel extends HoistModel {
|
|
|
40
41
|
viewportSizeModel: ViewportSizeModel;
|
|
41
42
|
themeModel: ThemeModel;
|
|
42
43
|
userAgentModel: UserAgentModel;
|
|
44
|
+
/**
|
|
45
|
+
* Message shown on spinner while the application is in the INITIALIZING state.
|
|
46
|
+
* Update within `AppModel.initAsync()` to relay app-specific initialization status.
|
|
47
|
+
*/
|
|
48
|
+
initializingLoadMaskMessage: ReactNode;
|
|
43
49
|
/**
|
|
44
50
|
* Main entry point. Initialize and render application code.
|
|
45
51
|
*/
|
|
@@ -87,7 +87,7 @@ export const AppContainer = hoistCmp({
|
|
|
87
87
|
},
|
|
88
88
|
errorRenderer: () => null
|
|
89
89
|
},
|
|
90
|
-
item: viewForState()
|
|
90
|
+
item: viewForState({model})
|
|
91
91
|
}),
|
|
92
92
|
// Modal component helpers rendered here at top-level to support display of messages
|
|
93
93
|
// and exceptions at any point during the app lifecycle.
|
|
@@ -101,11 +101,13 @@ export const AppContainer = hoistCmp({
|
|
|
101
101
|
//-----------------------------------------
|
|
102
102
|
// Implementation
|
|
103
103
|
//-----------------------------------------
|
|
104
|
-
function viewForState() {
|
|
104
|
+
function viewForState({model}) {
|
|
105
105
|
switch (XH.appState) {
|
|
106
106
|
case 'PRE_AUTH':
|
|
107
107
|
case 'INITIALIZING':
|
|
108
|
-
return viewport(
|
|
108
|
+
return viewport(
|
|
109
|
+
mask({spinner: true, isDisplayed: true, message: model.initializingLoadMaskMessage})
|
|
110
|
+
);
|
|
109
111
|
case 'LOGIN_REQUIRED':
|
|
110
112
|
return loginPanel();
|
|
111
113
|
case 'ACCESS_DENIED':
|
|
@@ -72,7 +72,7 @@ export const AppContainer = hoistCmp({
|
|
|
72
72
|
},
|
|
73
73
|
errorRenderer: () => null
|
|
74
74
|
},
|
|
75
|
-
item: viewForState()
|
|
75
|
+
item: viewForState({model})
|
|
76
76
|
}),
|
|
77
77
|
// Modal component helpers rendered here at top-level to support display of messages
|
|
78
78
|
// and exceptions at any point during the app lifecycle.
|
|
@@ -86,11 +86,13 @@ export const AppContainer = hoistCmp({
|
|
|
86
86
|
//-------------------
|
|
87
87
|
// Implementation
|
|
88
88
|
//-------------------
|
|
89
|
-
function viewForState() {
|
|
89
|
+
function viewForState({model}) {
|
|
90
90
|
switch (XH.appState) {
|
|
91
91
|
case 'PRE_AUTH':
|
|
92
92
|
case 'INITIALIZING':
|
|
93
|
-
return viewport(
|
|
93
|
+
return viewport(
|
|
94
|
+
mask({spinner: true, isDisplayed: true, message: model.initializingLoadMaskMessage})
|
|
95
|
+
);
|
|
94
96
|
case 'LOGIN_REQUIRED':
|
|
95
97
|
return loginPanel();
|
|
96
98
|
case 'ACCESS_DENIED':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xh/hoist",
|
|
3
|
-
"version": "67.0.0-SNAPSHOT.
|
|
3
|
+
"version": "67.0.0-SNAPSHOT.1724362478970",
|
|
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",
|