@etsoo/react 1.3.80 → 1.3.84

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,5 +1,5 @@
1
1
  import { CoreApp, createClient } from '@etsoo/appscript';
2
- import { DomUtils, StorageUtils, WindowStorage } from '@etsoo/shared';
2
+ import { DomUtils, WindowStorage } from '@etsoo/shared';
3
3
  import React from 'react';
4
4
  import { NotifierMU } from '../mu/NotifierMU';
5
5
  import { ProgressCount } from '../mu/ProgressCount';
@@ -58,16 +58,20 @@ export class ReactApp extends CoreApp {
58
58
  */
59
59
  constructor(settings, name, globalFields) {
60
60
  super(settings, ReactApp.createApi(settings), ReactApp.createNotifier(), new WindowStorage([
61
- ...globalFields,
62
61
  DomUtils.CountryField,
63
62
  DomUtils.CultureField,
64
63
  CoreApp.deviceIdField,
64
+ CoreApp.devicePassphraseField,
65
65
  CoreApp.headerTokenField,
66
- CoreApp.serversideDeviceIdField
66
+ CoreApp.serversideDeviceIdField,
67
+ ...globalFields
67
68
  ], (field, data, index) => {
68
- if (index > 0 && field === CoreApp.headerTokenField) {
69
+ console.log(field, data, index);
70
+ if (index > 0 &&
71
+ (field === CoreApp.headerTokenField ||
72
+ field === CoreApp.devicePassphraseField ||
73
+ CoreApp.serversideDeviceIdField)) {
69
74
  // Clear passphrase to regenerate the device id
70
- StorageUtils.setSessionData(CoreApp.devicePassphraseField, undefined);
71
75
  // Clear token
72
76
  return null;
73
77
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/react",
3
- "version": "1.3.80",
3
+ "version": "1.3.84",
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.97",
53
+ "@etsoo/appscript": "^1.2.0",
54
54
  "@etsoo/notificationbase": "^1.0.95",
55
- "@etsoo/shared": "^1.0.89",
55
+ "@etsoo/shared": "^1.0.91",
56
56
  "@mui/icons-material": "^5.2.5",
57
57
  "@mui/material": "^5.2.5",
58
58
  "@reach/router": "^1.3.4",
@@ -7,12 +7,7 @@ import {
7
7
  IUserData
8
8
  } from '@etsoo/appscript';
9
9
  import { NotificationRenderProps } from '@etsoo/notificationbase';
10
- import {
11
- DataTypes,
12
- DomUtils,
13
- StorageUtils,
14
- WindowStorage
15
- } from '@etsoo/shared';
10
+ import { DataTypes, DomUtils, WindowStorage } from '@etsoo/shared';
16
11
  import React from 'react';
17
12
  import { NotifierMU } from '../mu/NotifierMU';
18
13
  import { ProgressCount } from '../mu/ProgressCount';
@@ -196,23 +191,25 @@ export class ReactApp<
196
191
  ReactApp.createNotifier(),
197
192
  new WindowStorage(
198
193
  [
199
- ...globalFields,
200
-
201
194
  DomUtils.CountryField,
202
195
  DomUtils.CultureField,
203
196
 
204
197
  CoreApp.deviceIdField,
198
+ CoreApp.devicePassphraseField,
205
199
  CoreApp.headerTokenField,
206
- CoreApp.serversideDeviceIdField
200
+ CoreApp.serversideDeviceIdField,
201
+
202
+ ...globalFields
207
203
  ],
208
204
  (field, data, index) => {
209
- if (index > 0 && field === CoreApp.headerTokenField) {
205
+ console.log(field, data, index);
206
+ if (
207
+ index > 0 &&
208
+ (field === CoreApp.headerTokenField ||
209
+ field === CoreApp.devicePassphraseField ||
210
+ CoreApp.serversideDeviceIdField)
211
+ ) {
210
212
  // Clear passphrase to regenerate the device id
211
- StorageUtils.setSessionData(
212
- CoreApp.devicePassphraseField,
213
- undefined
214
- );
215
-
216
213
  // Clear token
217
214
  return null;
218
215
  }