@etsoo/react 1.3.78 → 1.3.82

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.
@@ -62,9 +62,19 @@ export class ReactApp extends CoreApp {
62
62
  DomUtils.CountryField,
63
63
  DomUtils.CultureField,
64
64
  CoreApp.deviceIdField,
65
+ CoreApp.devicePassphraseField,
65
66
  CoreApp.headerTokenField,
66
67
  CoreApp.serversideDeviceIdField
67
- ]), name);
68
+ ], (field, data, index) => {
69
+ if (index > 0 &&
70
+ (field === CoreApp.headerTokenField ||
71
+ field === CoreApp.devicePassphraseField)) {
72
+ // Clear passphrase to regenerate the device id
73
+ // Clear token
74
+ return null;
75
+ }
76
+ return data;
77
+ }), name);
68
78
  /**
69
79
  * User state
70
80
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/react",
3
- "version": "1.3.78",
3
+ "version": "1.3.82",
4
4
  "description": "TypeScript ReactJs framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -50,9 +50,9 @@
50
50
  "@emotion/react": "^11.7.1",
51
51
  "@emotion/style": "^0.8.0",
52
52
  "@emotion/styled": "^11.6.0",
53
- "@etsoo/appscript": "^1.1.94",
53
+ "@etsoo/appscript": "^1.1.99",
54
54
  "@etsoo/notificationbase": "^1.0.95",
55
- "@etsoo/shared": "^1.0.84",
55
+ "@etsoo/shared": "^1.0.90",
56
56
  "@mui/icons-material": "^5.2.5",
57
57
  "@mui/material": "^5.2.5",
58
58
  "@reach/router": "^1.3.4",
@@ -7,7 +7,12 @@ import {
7
7
  IUserData
8
8
  } from '@etsoo/appscript';
9
9
  import { NotificationRenderProps } from '@etsoo/notificationbase';
10
- import { DataTypes, DomUtils, WindowStorage } from '@etsoo/shared';
10
+ import {
11
+ DataTypes,
12
+ DomUtils,
13
+ StorageUtils,
14
+ WindowStorage
15
+ } from '@etsoo/shared';
11
16
  import React from 'react';
12
17
  import { NotifierMU } from '../mu/NotifierMU';
13
18
  import { ProgressCount } from '../mu/ProgressCount';
@@ -189,16 +194,31 @@ export class ReactApp<
189
194
  settings,
190
195
  ReactApp.createApi(settings),
191
196
  ReactApp.createNotifier(),
192
- new WindowStorage([
193
- ...globalFields,
194
-
195
- DomUtils.CountryField,
196
- DomUtils.CultureField,
197
-
198
- CoreApp.deviceIdField,
199
- CoreApp.headerTokenField,
200
- CoreApp.serversideDeviceIdField
201
- ]),
197
+ new WindowStorage(
198
+ [
199
+ ...globalFields,
200
+
201
+ DomUtils.CountryField,
202
+ DomUtils.CultureField,
203
+
204
+ CoreApp.deviceIdField,
205
+ CoreApp.devicePassphraseField,
206
+ CoreApp.headerTokenField,
207
+ CoreApp.serversideDeviceIdField
208
+ ],
209
+ (field, data, index) => {
210
+ if (
211
+ index > 0 &&
212
+ (field === CoreApp.headerTokenField ||
213
+ field === CoreApp.devicePassphraseField)
214
+ ) {
215
+ // Clear passphrase to regenerate the device id
216
+ // Clear token
217
+ return null;
218
+ }
219
+ return data;
220
+ }
221
+ ),
202
222
  name
203
223
  );
204
224
  this.cultureState = new CultureState(settings.currentCulture);