@etsoo/materialui 1.2.34 → 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/ReactApp.d.ts +1 -1
- package/lib/app/ReactApp.js +15 -15
- package/package.json +2 -2
- package/src/app/ReactApp.ts +17 -15
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/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,7 +50,7 @@
|
|
|
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
55
|
"@etsoo/react": "^1.6.79",
|
|
56
56
|
"@etsoo/shared": "^1.2.5",
|
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
|
/**
|