@etsoo/react 1.3.84 → 1.3.88

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.
@@ -85,9 +85,8 @@ export declare class ReactApp<S extends IAppSettings, D extends IUser, P extends
85
85
  * Constructor
86
86
  * @param settings Settings
87
87
  * @param name Application name
88
- * @param globalFields Global fields
89
88
  */
90
- constructor(settings: S, name: string, globalFields: string[]);
89
+ constructor(settings: S, name: string);
91
90
  /**
92
91
  * Change culture
93
92
  * @param culture New culture definition
@@ -1,5 +1,5 @@
1
1
  import { CoreApp, createClient } from '@etsoo/appscript';
2
- import { DomUtils, WindowStorage } from '@etsoo/shared';
2
+ import { WindowStorage } from '@etsoo/shared';
3
3
  import React from 'react';
4
4
  import { NotifierMU } from '../mu/NotifierMU';
5
5
  import { ProgressCount } from '../mu/ProgressCount';
@@ -54,29 +54,9 @@ export class ReactApp extends CoreApp {
54
54
  * Constructor
55
55
  * @param settings Settings
56
56
  * @param name Application name
57
- * @param globalFields Global fields
58
57
  */
59
- constructor(settings, name, globalFields) {
60
- super(settings, ReactApp.createApi(settings), ReactApp.createNotifier(), new WindowStorage([
61
- DomUtils.CountryField,
62
- DomUtils.CultureField,
63
- CoreApp.deviceIdField,
64
- CoreApp.devicePassphraseField,
65
- CoreApp.headerTokenField,
66
- CoreApp.serversideDeviceIdField,
67
- ...globalFields
68
- ], (field, data, index) => {
69
- console.log(field, data, index);
70
- if (index > 0 &&
71
- (field === CoreApp.headerTokenField ||
72
- field === CoreApp.devicePassphraseField ||
73
- CoreApp.serversideDeviceIdField)) {
74
- // Clear passphrase to regenerate the device id
75
- // Clear token
76
- return null;
77
- }
78
- return data;
79
- }), name);
58
+ constructor(settings, name) {
59
+ super(settings, ReactApp.createApi(settings), ReactApp.createNotifier(), new WindowStorage(), name);
80
60
  /**
81
61
  * User state
82
62
  */
@@ -30,9 +30,8 @@ export declare class ServiceApp<P extends IServicePageData = IServicePageData, U
30
30
  * Constructor
31
31
  * @param settings Settings
32
32
  * @param name Application name
33
- * @param globalFields Global fields
34
33
  */
35
- constructor(settings: S, name: string, globalFields: string[]);
34
+ constructor(settings: S, name: string);
36
35
  /**
37
36
  * Go to the login page
38
37
  */
@@ -13,10 +13,9 @@ export class ServiceApp extends ReactApp {
13
13
  * Constructor
14
14
  * @param settings Settings
15
15
  * @param name Application name
16
- * @param globalFields Global fields
17
16
  */
18
- constructor(settings, name, globalFields) {
19
- super(settings, name, globalFields);
17
+ constructor(settings, name) {
18
+ super(settings, name);
20
19
  /**
21
20
  * Service passphrase
22
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/react",
3
- "version": "1.3.84",
3
+ "version": "1.3.88",
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.2.0",
53
+ "@etsoo/appscript": "^1.2.4",
54
54
  "@etsoo/notificationbase": "^1.0.95",
55
- "@etsoo/shared": "^1.0.91",
55
+ "@etsoo/shared": "^1.0.94",
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,7 @@ 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 { DataTypes, WindowStorage } from '@etsoo/shared';
11
11
  import React from 'react';
12
12
  import { NotifierMU } from '../mu/NotifierMU';
13
13
  import { ProgressCount } from '../mu/ProgressCount';
@@ -182,40 +182,13 @@ export class ReactApp<
182
182
  * Constructor
183
183
  * @param settings Settings
184
184
  * @param name Application name
185
- * @param globalFields Global fields
186
185
  */
187
- constructor(settings: S, name: string, globalFields: string[]) {
186
+ constructor(settings: S, name: string) {
188
187
  super(
189
188
  settings,
190
189
  ReactApp.createApi(settings),
191
190
  ReactApp.createNotifier(),
192
- new WindowStorage(
193
- [
194
- DomUtils.CountryField,
195
- DomUtils.CultureField,
196
-
197
- CoreApp.deviceIdField,
198
- CoreApp.devicePassphraseField,
199
- CoreApp.headerTokenField,
200
- CoreApp.serversideDeviceIdField,
201
-
202
- ...globalFields
203
- ],
204
- (field, data, index) => {
205
- console.log(field, data, index);
206
- if (
207
- index > 0 &&
208
- (field === CoreApp.headerTokenField ||
209
- field === CoreApp.devicePassphraseField ||
210
- CoreApp.serversideDeviceIdField)
211
- ) {
212
- // Clear passphrase to regenerate the device id
213
- // Clear token
214
- return null;
215
- }
216
- return data;
217
- }
218
- ),
191
+ new WindowStorage(),
219
192
  name
220
193
  );
221
194
  this.cultureState = new CultureState(settings.currentCulture);
@@ -50,10 +50,9 @@ export class ServiceApp<
50
50
  * Constructor
51
51
  * @param settings Settings
52
52
  * @param name Application name
53
- * @param globalFields Global fields
54
53
  */
55
- constructor(settings: S, name: string, globalFields: string[]) {
56
- super(settings, name, globalFields);
54
+ constructor(settings: S, name: string) {
55
+ super(settings, name);
57
56
 
58
57
  // Check
59
58
  if (settings.serviceId == null || settings.serviceEndpoint == null) {