@etsoo/react 1.5.27 → 1.5.30
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/lib/app/ReactApp.js +6 -0
- package/package.json +10 -10
- package/src/app/ReactApp.ts +11 -0
package/lib/app/ReactApp.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ActionResultError, BridgeUtils, CoreApp, createClient } from '@etsoo/appscript';
|
|
2
|
+
import { NotificationMessageType } from '@etsoo/notificationbase';
|
|
2
3
|
import { WindowStorage } from '@etsoo/shared';
|
|
3
4
|
import React from 'react';
|
|
4
5
|
import { NotifierMU } from '../mu/NotifierMU';
|
|
@@ -68,6 +69,11 @@ export class ReactApp extends CoreApp {
|
|
|
68
69
|
BridgeUtils.host == null
|
|
69
70
|
? undefined
|
|
70
71
|
: ReactUtils.getMemoryHistory(BridgeUtils.host.getStartUrl());
|
|
72
|
+
if (BridgeUtils.host) {
|
|
73
|
+
BridgeUtils.host.onUpdate((app, version) => {
|
|
74
|
+
this.notifier.message(NotificationMessageType.Success, this.get('updateTip') + `(${[app, version].join(', ')})`, this.get('updateReady'));
|
|
75
|
+
});
|
|
76
|
+
}
|
|
71
77
|
this.cultureState = new CultureState(settings.currentCulture);
|
|
72
78
|
this.pageState = new PageState();
|
|
73
79
|
globalApp = this;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/react",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.30",
|
|
4
4
|
"description": "TypeScript ReactJs framework",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -50,19 +50,19 @@
|
|
|
50
50
|
"@emotion/react": "^11.8.1",
|
|
51
51
|
"@emotion/style": "^0.8.0",
|
|
52
52
|
"@emotion/styled": "^11.8.1",
|
|
53
|
-
"@etsoo/appscript": "^1.2.
|
|
53
|
+
"@etsoo/appscript": "^1.2.59",
|
|
54
54
|
"@etsoo/notificationbase": "^1.1.2",
|
|
55
|
-
"@etsoo/shared": "^1.1.
|
|
56
|
-
"@mui/icons-material": "^5.4.
|
|
57
|
-
"@mui/material": "^5.4.
|
|
55
|
+
"@etsoo/shared": "^1.1.16",
|
|
56
|
+
"@mui/icons-material": "^5.4.4",
|
|
57
|
+
"@mui/material": "^5.4.4",
|
|
58
58
|
"@reach/router": "^1.3.4",
|
|
59
59
|
"@types/pica": "^9.0.0",
|
|
60
60
|
"@types/pulltorefreshjs": "^0.1.5",
|
|
61
61
|
"@types/reach__router": "^1.3.10",
|
|
62
62
|
"@types/react": "^17.0.39",
|
|
63
|
-
"@types/react-avatar-editor": "^
|
|
63
|
+
"@types/react-avatar-editor": "^12.0.0",
|
|
64
64
|
"@types/react-beautiful-dnd": "^13.1.2",
|
|
65
|
-
"@types/react-dom": "^17.0.
|
|
65
|
+
"@types/react-dom": "^17.0.13",
|
|
66
66
|
"@types/react-input-mask": "^3.0.1",
|
|
67
67
|
"@types/react-window": "^1.8.5",
|
|
68
68
|
"pica": "^9.0.1",
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
"@babel/runtime-corejs3": "^7.17.2",
|
|
84
84
|
"@types/jest": "^27.4.1",
|
|
85
85
|
"@types/react-test-renderer": "^17.0.1",
|
|
86
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
87
|
-
"@typescript-eslint/parser": "^5.
|
|
86
|
+
"@typescript-eslint/eslint-plugin": "^5.13.0",
|
|
87
|
+
"@typescript-eslint/parser": "^5.13.0",
|
|
88
88
|
"eslint": "^8.10.0",
|
|
89
89
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
90
90
|
"eslint-plugin-import": "^2.25.4",
|
|
@@ -92,6 +92,6 @@
|
|
|
92
92
|
"jest": "^27.5.1",
|
|
93
93
|
"react-test-renderer": "^17.0.2",
|
|
94
94
|
"ts-jest": "^27.1.3",
|
|
95
|
-
"typescript": "^4.
|
|
95
|
+
"typescript": "^4.6.2"
|
|
96
96
|
}
|
|
97
97
|
}
|
package/src/app/ReactApp.ts
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
IUserData
|
|
11
11
|
} from '@etsoo/appscript';
|
|
12
12
|
import {
|
|
13
|
+
NotificationMessageType,
|
|
13
14
|
NotificationRenderProps,
|
|
14
15
|
NotificationReturn
|
|
15
16
|
} from '@etsoo/notificationbase';
|
|
@@ -225,6 +226,16 @@ export class ReactApp<
|
|
|
225
226
|
? undefined
|
|
226
227
|
: ReactUtils.getMemoryHistory(BridgeUtils.host.getStartUrl());
|
|
227
228
|
|
|
229
|
+
if (BridgeUtils.host) {
|
|
230
|
+
BridgeUtils.host.onUpdate((app, version) => {
|
|
231
|
+
this.notifier.message(
|
|
232
|
+
NotificationMessageType.Success,
|
|
233
|
+
this.get('updateTip') + `(${[app, version].join(', ')})`,
|
|
234
|
+
this.get('updateReady')
|
|
235
|
+
);
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
|
|
228
239
|
this.cultureState = new CultureState(settings.currentCulture);
|
|
229
240
|
this.pageState = new PageState<P>();
|
|
230
241
|
|