@etsoo/react 1.5.27 → 1.5.28

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.
@@ -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.27",
3
+ "version": "1.5.28",
4
4
  "description": "TypeScript ReactJs framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -50,7 +50,7 @@
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.56",
53
+ "@etsoo/appscript": "^1.2.57",
54
54
  "@etsoo/notificationbase": "^1.1.2",
55
55
  "@etsoo/shared": "^1.1.14",
56
56
  "@mui/icons-material": "^5.4.2",
@@ -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