@etsoo/materialui 1.2.33 → 1.2.35
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/IServiceApp.d.ts +2 -2
- package/lib/app/ReactApp.d.ts +1 -1
- package/lib/app/ReactApp.js +15 -15
- package/lib/app/ServiceApp.d.ts +2 -2
- package/lib/app/ServiceApp.js +3 -1
- package/package.json +3 -3
- package/src/app/IServiceApp.ts +2 -2
- package/src/app/ReactApp.ts +17 -15
- package/src/app/ServiceApp.ts +5 -4
package/lib/app/IServiceApp.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export interface IServiceApp extends ReactAppType {
|
|
|
23
23
|
* @param passphrase Secret passphrase
|
|
24
24
|
* @returns Pure text
|
|
25
25
|
*/
|
|
26
|
-
serviceDecrypt(messageEncrypted: string, passphrase?: string):
|
|
26
|
+
serviceDecrypt(messageEncrypted: string, passphrase?: string): string | undefined;
|
|
27
27
|
/**
|
|
28
28
|
* Service encrypt message
|
|
29
29
|
* @param message Message
|
|
@@ -31,5 +31,5 @@ export interface IServiceApp extends ReactAppType {
|
|
|
31
31
|
* @param iterations Iterations, 1000 times, 1 - 99
|
|
32
32
|
* @returns Result
|
|
33
33
|
*/
|
|
34
|
-
serviceEncrypt(message: string, passphrase?: string, iterations?: number):
|
|
34
|
+
serviceEncrypt(message: string, passphrase?: string, iterations?: number): string | undefined;
|
|
35
35
|
}
|
package/lib/app/ReactApp.d.ts
CHANGED
|
@@ -149,7 +149,7 @@ export declare class ReactApp<S extends IAppSettings, D extends IUser, P extends
|
|
|
149
149
|
* Change culture
|
|
150
150
|
* @param culture New culture definition
|
|
151
151
|
*/
|
|
152
|
-
changeCulture(culture: DataTypes.CultureDefinition):
|
|
152
|
+
changeCulture(culture: DataTypes.CultureDefinition): Promise<DataTypes.StringRecord>;
|
|
153
153
|
/**
|
|
154
154
|
* Change culture extended
|
|
155
155
|
* @param dispatch Dispatch method
|
package/lib/app/ReactApp.js
CHANGED
|
@@ -105,23 +105,22 @@ export class ReactApp extends CoreApp {
|
|
|
105
105
|
* Change culture
|
|
106
106
|
* @param culture New culture definition
|
|
107
107
|
*/
|
|
108
|
-
changeCulture(culture) {
|
|
108
|
+
async changeCulture(culture) {
|
|
109
109
|
var _a, _b;
|
|
110
110
|
// Super call to update cultrue
|
|
111
|
-
super.changeCulture(culture
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
});
|
|
111
|
+
const resources = await super.changeCulture(culture);
|
|
112
|
+
// Update component labels
|
|
113
|
+
Labels.setLabels(resources, {
|
|
114
|
+
notificationMU: {
|
|
115
|
+
alertTitle: "warning",
|
|
116
|
+
alertOK: "ok",
|
|
117
|
+
confirmTitle: "confirm",
|
|
118
|
+
confirmYes: "ok",
|
|
119
|
+
confirmNo: "cancel",
|
|
120
|
+
promptTitle: "prompt",
|
|
121
|
+
promptCancel: "cancel",
|
|
122
|
+
promptOK: "ok"
|
|
123
|
+
}
|
|
125
124
|
});
|
|
126
125
|
// Document title
|
|
127
126
|
// Default is servier name's label or appName label
|
|
@@ -135,6 +134,7 @@ export class ReactApp extends CoreApp {
|
|
|
135
134
|
else {
|
|
136
135
|
document.title = title;
|
|
137
136
|
}
|
|
137
|
+
return resources;
|
|
138
138
|
}
|
|
139
139
|
/**
|
|
140
140
|
* Change culture extended
|
package/lib/app/ServiceApp.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export declare class ServiceApp<U extends IServiceUser = IServiceUser, P extends
|
|
|
52
52
|
* @param passphrase Secret passphrase
|
|
53
53
|
* @returns Pure text
|
|
54
54
|
*/
|
|
55
|
-
serviceDecrypt(messageEncrypted: string, passphrase?: string):
|
|
55
|
+
serviceDecrypt(messageEncrypted: string, passphrase?: string): string | undefined;
|
|
56
56
|
/**
|
|
57
57
|
* Service encrypt message
|
|
58
58
|
* @param message Message
|
|
@@ -60,7 +60,7 @@ export declare class ServiceApp<U extends IServiceUser = IServiceUser, P extends
|
|
|
60
60
|
* @param iterations Iterations, 1000 times, 1 - 99
|
|
61
61
|
* @returns Result
|
|
62
62
|
*/
|
|
63
|
-
serviceEncrypt(message: string, passphrase?: string, iterations?: number):
|
|
63
|
+
serviceEncrypt(message: string, passphrase?: string, iterations?: number): string;
|
|
64
64
|
/**
|
|
65
65
|
* Try login
|
|
66
66
|
* @param data Additional data
|
package/lib/app/ServiceApp.js
CHANGED
|
@@ -230,8 +230,10 @@ export class ServiceApp extends ReactApp {
|
|
|
230
230
|
* @param serviceUser Service user
|
|
231
231
|
*/
|
|
232
232
|
userLoginEx(user, refreshToken, serviceUser) {
|
|
233
|
+
var _a;
|
|
233
234
|
// Service user login
|
|
234
|
-
this.
|
|
235
|
+
this.servicePassphrase =
|
|
236
|
+
(_a = this.decrypt(serviceUser.servicePassphrase, this.settings.serviceId.toString())) !== null && _a !== void 0 ? _a : "";
|
|
235
237
|
// Service user
|
|
236
238
|
this.serviceUser = serviceUser;
|
|
237
239
|
// Service API token
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/materialui",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.35",
|
|
4
4
|
"description": "TypeScript Material-UI Implementation",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"@emotion/css": "^11.11.0",
|
|
51
51
|
"@emotion/react": "^11.11.0",
|
|
52
52
|
"@emotion/styled": "^11.11.0",
|
|
53
|
-
"@etsoo/appscript": "^1.4.
|
|
53
|
+
"@etsoo/appscript": "^1.4.6",
|
|
54
54
|
"@etsoo/notificationbase": "^1.1.25",
|
|
55
|
-
"@etsoo/react": "^1.6.
|
|
55
|
+
"@etsoo/react": "^1.6.79",
|
|
56
56
|
"@etsoo/shared": "^1.2.5",
|
|
57
57
|
"@mui/icons-material": "^5.11.16",
|
|
58
58
|
"@mui/material": "^5.12.3",
|
package/src/app/IServiceApp.ts
CHANGED
|
@@ -30,7 +30,7 @@ export interface IServiceApp extends ReactAppType {
|
|
|
30
30
|
serviceDecrypt(
|
|
31
31
|
messageEncrypted: string,
|
|
32
32
|
passphrase?: string
|
|
33
|
-
):
|
|
33
|
+
): string | undefined;
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* Service encrypt message
|
|
@@ -43,5 +43,5 @@ export interface IServiceApp extends ReactAppType {
|
|
|
43
43
|
message: string,
|
|
44
44
|
passphrase?: string,
|
|
45
45
|
iterations?: number
|
|
46
|
-
):
|
|
46
|
+
): string | undefined;
|
|
47
47
|
}
|
package/src/app/ReactApp.ts
CHANGED
|
@@ -310,22 +310,22 @@ export class ReactApp<
|
|
|
310
310
|
* Change culture
|
|
311
311
|
* @param culture New culture definition
|
|
312
312
|
*/
|
|
313
|
-
override changeCulture(culture: DataTypes.CultureDefinition) {
|
|
313
|
+
override async changeCulture(culture: DataTypes.CultureDefinition) {
|
|
314
314
|
// Super call to update cultrue
|
|
315
|
-
super.changeCulture(culture
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
}
|
|
315
|
+
const resources = await super.changeCulture(culture);
|
|
316
|
+
|
|
317
|
+
// Update component labels
|
|
318
|
+
Labels.setLabels(resources, {
|
|
319
|
+
notificationMU: {
|
|
320
|
+
alertTitle: "warning",
|
|
321
|
+
alertOK: "ok",
|
|
322
|
+
confirmTitle: "confirm",
|
|
323
|
+
confirmYes: "ok",
|
|
324
|
+
confirmNo: "cancel",
|
|
325
|
+
promptTitle: "prompt",
|
|
326
|
+
promptCancel: "cancel",
|
|
327
|
+
promptOK: "ok"
|
|
328
|
+
}
|
|
329
329
|
});
|
|
330
330
|
|
|
331
331
|
// Document title
|
|
@@ -339,6 +339,8 @@ export class ReactApp<
|
|
|
339
339
|
} else {
|
|
340
340
|
document.title = title;
|
|
341
341
|
}
|
|
342
|
+
|
|
343
|
+
return resources;
|
|
342
344
|
}
|
|
343
345
|
|
|
344
346
|
/**
|
package/src/app/ServiceApp.ts
CHANGED
|
@@ -325,10 +325,11 @@ export class ServiceApp<
|
|
|
325
325
|
*/
|
|
326
326
|
userLoginEx(user: ISmartERPUser, refreshToken: string, serviceUser: U) {
|
|
327
327
|
// Service user login
|
|
328
|
-
this.
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
328
|
+
this.servicePassphrase =
|
|
329
|
+
this.decrypt(
|
|
330
|
+
serviceUser.servicePassphrase,
|
|
331
|
+
this.settings.serviceId.toString()
|
|
332
|
+
) ?? "";
|
|
332
333
|
|
|
333
334
|
// Service user
|
|
334
335
|
this.serviceUser = serviceUser;
|