@etsoo/react 1.3.81 → 1.3.85
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.d.ts +1 -2
- package/lib/app/ReactApp.js +3 -20
- package/lib/app/ServiceApp.d.ts +1 -2
- package/lib/app/ServiceApp.js +2 -3
- package/package.json +3 -3
- package/src/app/ReactApp.ts +3 -41
- package/src/app/ServiceApp.ts +2 -3
package/lib/app/ReactApp.d.ts
CHANGED
|
@@ -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
|
|
89
|
+
constructor(settings: S, name: string);
|
|
91
90
|
/**
|
|
92
91
|
* Change culture
|
|
93
92
|
* @param culture New culture definition
|
package/lib/app/ReactApp.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CoreApp, createClient } from '@etsoo/appscript';
|
|
2
|
-
import {
|
|
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,26 +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
|
|
60
|
-
super(settings, ReactApp.createApi(settings), ReactApp.createNotifier(), new WindowStorage(
|
|
61
|
-
...globalFields,
|
|
62
|
-
DomUtils.CountryField,
|
|
63
|
-
DomUtils.CultureField,
|
|
64
|
-
CoreApp.deviceIdField,
|
|
65
|
-
CoreApp.headerTokenField,
|
|
66
|
-
CoreApp.serversideDeviceIdField
|
|
67
|
-
], (field, data, index) => {
|
|
68
|
-
if (index > 0 && field === CoreApp.headerTokenField) {
|
|
69
|
-
// Clear passphrase to regenerate the device id
|
|
70
|
-
StorageUtils.setSessionData(CoreApp.devicePassphraseField, undefined);
|
|
71
|
-
console.log('devicePassphraseField', index, StorageUtils.getSessionData(CoreApp.devicePassphraseField));
|
|
72
|
-
// Clear token
|
|
73
|
-
return null;
|
|
74
|
-
}
|
|
75
|
-
return data;
|
|
76
|
-
}), name);
|
|
58
|
+
constructor(settings, name) {
|
|
59
|
+
super(settings, ReactApp.createApi(settings), ReactApp.createNotifier(), new WindowStorage(), name);
|
|
77
60
|
/**
|
|
78
61
|
* User state
|
|
79
62
|
*/
|
package/lib/app/ServiceApp.d.ts
CHANGED
|
@@ -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
|
|
34
|
+
constructor(settings: S, name: string);
|
|
36
35
|
/**
|
|
37
36
|
* Go to the login page
|
|
38
37
|
*/
|
package/lib/app/ServiceApp.js
CHANGED
|
@@ -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
|
|
19
|
-
super(settings, name
|
|
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.
|
|
3
|
+
"version": "1.3.85",
|
|
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
|
|
53
|
+
"@etsoo/appscript": "^1.2.1",
|
|
54
54
|
"@etsoo/notificationbase": "^1.0.95",
|
|
55
|
-
"@etsoo/shared": "^1.0.
|
|
55
|
+
"@etsoo/shared": "^1.0.93",
|
|
56
56
|
"@mui/icons-material": "^5.2.5",
|
|
57
57
|
"@mui/material": "^5.2.5",
|
|
58
58
|
"@reach/router": "^1.3.4",
|
package/src/app/ReactApp.ts
CHANGED
|
@@ -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, WindowStorage } from '@etsoo/shared';
|
|
16
11
|
import React from 'react';
|
|
17
12
|
import { NotifierMU } from '../mu/NotifierMU';
|
|
18
13
|
import { ProgressCount } from '../mu/ProgressCount';
|
|
@@ -187,46 +182,13 @@ export class ReactApp<
|
|
|
187
182
|
* Constructor
|
|
188
183
|
* @param settings Settings
|
|
189
184
|
* @param name Application name
|
|
190
|
-
* @param globalFields Global fields
|
|
191
185
|
*/
|
|
192
|
-
constructor(settings: S, name: string
|
|
186
|
+
constructor(settings: S, name: string) {
|
|
193
187
|
super(
|
|
194
188
|
settings,
|
|
195
189
|
ReactApp.createApi(settings),
|
|
196
190
|
ReactApp.createNotifier(),
|
|
197
|
-
new WindowStorage(
|
|
198
|
-
[
|
|
199
|
-
...globalFields,
|
|
200
|
-
|
|
201
|
-
DomUtils.CountryField,
|
|
202
|
-
DomUtils.CultureField,
|
|
203
|
-
|
|
204
|
-
CoreApp.deviceIdField,
|
|
205
|
-
CoreApp.headerTokenField,
|
|
206
|
-
CoreApp.serversideDeviceIdField
|
|
207
|
-
],
|
|
208
|
-
(field, data, index) => {
|
|
209
|
-
if (index > 0 && field === CoreApp.headerTokenField) {
|
|
210
|
-
// Clear passphrase to regenerate the device id
|
|
211
|
-
StorageUtils.setSessionData(
|
|
212
|
-
CoreApp.devicePassphraseField,
|
|
213
|
-
undefined
|
|
214
|
-
);
|
|
215
|
-
|
|
216
|
-
console.log(
|
|
217
|
-
'devicePassphraseField',
|
|
218
|
-
index,
|
|
219
|
-
StorageUtils.getSessionData(
|
|
220
|
-
CoreApp.devicePassphraseField
|
|
221
|
-
)
|
|
222
|
-
);
|
|
223
|
-
|
|
224
|
-
// Clear token
|
|
225
|
-
return null;
|
|
226
|
-
}
|
|
227
|
-
return data;
|
|
228
|
-
}
|
|
229
|
-
),
|
|
191
|
+
new WindowStorage(),
|
|
230
192
|
name
|
|
231
193
|
);
|
|
232
194
|
this.cultureState = new CultureState(settings.currentCulture);
|
package/src/app/ServiceApp.ts
CHANGED
|
@@ -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
|
|
56
|
-
super(settings, name
|
|
54
|
+
constructor(settings: S, name: string) {
|
|
55
|
+
super(settings, name);
|
|
57
56
|
|
|
58
57
|
// Check
|
|
59
58
|
if (settings.serviceId == null || settings.serviceEndpoint == null) {
|