@nocobase/client-v2 2.1.4 → 2.1.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/client-v2",
3
- "version": "2.1.4",
3
+ "version": "2.1.6",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.mjs",
@@ -27,11 +27,11 @@
27
27
  "@formily/antd-v5": "1.2.3",
28
28
  "@formily/react": "^2.2.27",
29
29
  "@formily/shared": "^2.2.27",
30
- "@nocobase/evaluators": "2.1.4",
31
- "@nocobase/flow-engine": "2.1.4",
32
- "@nocobase/sdk": "2.1.4",
33
- "@nocobase/shared": "2.1.4",
34
- "@nocobase/utils": "2.1.4",
30
+ "@nocobase/evaluators": "2.1.6",
31
+ "@nocobase/flow-engine": "2.1.6",
32
+ "@nocobase/sdk": "2.1.6",
33
+ "@nocobase/shared": "2.1.6",
34
+ "@nocobase/utils": "2.1.6",
35
35
  "ahooks": "^3.7.2",
36
36
  "antd": "5.24.2",
37
37
  "antd-style": "3.7.1",
@@ -46,5 +46,5 @@
46
46
  "react-i18next": "^11.15.1",
47
47
  "react-router-dom": "^6.30.1"
48
48
  },
49
- "gitHead": "73c01b1e842afdaafdffd6fa4bb090c1da9b0816"
49
+ "gitHead": "4312d6580cc01378d008072db8285803626dc435"
50
50
  }
@@ -21,7 +21,13 @@ import type { Application } from '../Application';
21
21
  interface AppErrorPayload {
22
22
  code?: string;
23
23
  message?: string;
24
- command?: { name: string };
24
+ command?: {
25
+ name: string;
26
+ components?: {
27
+ maintaining?: string;
28
+ maintainingDialog?: string;
29
+ };
30
+ };
25
31
  [key: string]: any;
26
32
  }
27
33
 
@@ -188,7 +194,12 @@ export const AppError: FC<{ error: Error & { title?: string }; app: Application
188
194
  );
189
195
 
190
196
  export const AppMaintaining: FC<{ app: Application; error: Error }> = observer(
191
- ({ app }) => {
197
+ ({ app, error }) => {
198
+ const component = (error as AppErrorPayload | undefined)?.command?.components?.maintaining;
199
+ if (component) {
200
+ return app.renderComponent(component, { app, error });
201
+ }
202
+
192
203
  const { icon, status, title, subTitle } = getProps(app);
193
204
  return (
194
205
  <div>
@@ -211,7 +222,12 @@ export const AppMaintaining: FC<{ app: Application; error: Error }> = observer(
211
222
  );
212
223
 
213
224
  export const AppMaintainingDialog: FC<{ app: Application; error: Error }> = observer(
214
- ({ app }) => {
225
+ ({ app, error }) => {
226
+ const component = (error as AppErrorPayload | undefined)?.command?.components?.maintainingDialog;
227
+ if (component) {
228
+ return app.renderComponent(component, { app, error });
229
+ }
230
+
215
231
  const { icon, status, title, subTitle } = getProps(app);
216
232
  return (
217
233
  <Modal open={true} footer={null} closable={false}>