@etsoo/materialui 1.4.79 → 1.4.81
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/cjs/app/ReactApp.js
CHANGED
|
@@ -85,7 +85,7 @@ class ReactApp extends appscript_1.CoreApp {
|
|
|
85
85
|
this.notifier.message(notificationbase_1.NotificationMessageType.Success, this.get("updateTip") + `(${[app, version].join(", ")})`, this.get("updateReady"));
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
|
-
this.cultureState = new react_2.CultureState(settings.currentCulture);
|
|
88
|
+
this.cultureState = new react_2.CultureState(this.settings.currentCulture);
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
91
|
* Override alert action result
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ServiceApp = void 0;
|
|
4
4
|
const appscript_1 = require("@etsoo/appscript");
|
|
5
5
|
const ReactApp_1 = require("./ReactApp");
|
|
6
|
-
const coreName = "core";
|
|
7
6
|
const coreTokenKey = "core-refresh-token";
|
|
8
7
|
const tryLoginKey = "tryLogin";
|
|
9
8
|
/**
|
|
@@ -34,13 +33,14 @@ class ServiceApp extends ReactApp_1.ReactApp {
|
|
|
34
33
|
*/
|
|
35
34
|
constructor(settings, name, debug = false) {
|
|
36
35
|
super(settings, name, debug);
|
|
37
|
-
|
|
36
|
+
// Custom core API name can be done with override this.coreName
|
|
37
|
+
const coreEndpoint = this.settings.endpoints?.[this.coreName];
|
|
38
38
|
if (coreEndpoint == null) {
|
|
39
39
|
throw new Error("Core API endpont is required.");
|
|
40
40
|
}
|
|
41
41
|
this.coreEndpoint = coreEndpoint;
|
|
42
42
|
this.coreOrigin = new URL(coreEndpoint.webUrl).origin;
|
|
43
|
-
this.coreApi = this.createApi(coreName, coreEndpoint);
|
|
43
|
+
this.coreApi = this.createApi(this.coreName, coreEndpoint);
|
|
44
44
|
this.keepLogin = true;
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
@@ -58,7 +58,7 @@ class ServiceApp extends ReactApp_1.ReactApp {
|
|
|
58
58
|
const startUrl = tryLogin
|
|
59
59
|
? undefined
|
|
60
60
|
: "".addUrlParam(tryLoginKey, tryLogin);
|
|
61
|
-
appscript_1.BridgeUtils.host.loadApp(coreName, startUrl);
|
|
61
|
+
appscript_1.BridgeUtils.host.loadApp(this.coreName, startUrl);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
@@ -92,7 +92,7 @@ class ServiceApp extends ReactApp_1.ReactApp {
|
|
|
92
92
|
globalThis.location.href = url;
|
|
93
93
|
}
|
|
94
94
|
else {
|
|
95
|
-
appscript_1.BridgeUtils.host.loadApp(coreName, url);
|
|
95
|
+
appscript_1.BridgeUtils.host.loadApp(this.coreName, url);
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
});
|
|
@@ -151,7 +151,7 @@ class ServiceApp extends ReactApp_1.ReactApp {
|
|
|
151
151
|
// Cache the core system refresh token
|
|
152
152
|
this.storage.setData(coreTokenKey, this.encrypt(data.refreshToken));
|
|
153
153
|
// Exchange tokens
|
|
154
|
-
this.exchangeTokenAll(data
|
|
154
|
+
this.exchangeTokenAll(data);
|
|
155
155
|
}
|
|
156
156
|
/**
|
|
157
157
|
* Switch organization
|
package/lib/mjs/app/ReactApp.js
CHANGED
|
@@ -77,7 +77,7 @@ export class ReactApp extends CoreApp {
|
|
|
77
77
|
this.notifier.message(NotificationMessageType.Success, this.get("updateTip") + `(${[app, version].join(", ")})`, this.get("updateReady"));
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
-
this.cultureState = new CultureState(settings.currentCulture);
|
|
80
|
+
this.cultureState = new CultureState(this.settings.currentCulture);
|
|
81
81
|
}
|
|
82
82
|
/**
|
|
83
83
|
* Override alert action result
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AuthApi, BridgeUtils } from "@etsoo/appscript";
|
|
2
2
|
import { ReactApp } from "./ReactApp";
|
|
3
|
-
const coreName = "core";
|
|
4
3
|
const coreTokenKey = "core-refresh-token";
|
|
5
4
|
const tryLoginKey = "tryLogin";
|
|
6
5
|
/**
|
|
@@ -31,13 +30,14 @@ export class ServiceApp extends ReactApp {
|
|
|
31
30
|
*/
|
|
32
31
|
constructor(settings, name, debug = false) {
|
|
33
32
|
super(settings, name, debug);
|
|
34
|
-
|
|
33
|
+
// Custom core API name can be done with override this.coreName
|
|
34
|
+
const coreEndpoint = this.settings.endpoints?.[this.coreName];
|
|
35
35
|
if (coreEndpoint == null) {
|
|
36
36
|
throw new Error("Core API endpont is required.");
|
|
37
37
|
}
|
|
38
38
|
this.coreEndpoint = coreEndpoint;
|
|
39
39
|
this.coreOrigin = new URL(coreEndpoint.webUrl).origin;
|
|
40
|
-
this.coreApi = this.createApi(coreName, coreEndpoint);
|
|
40
|
+
this.coreApi = this.createApi(this.coreName, coreEndpoint);
|
|
41
41
|
this.keepLogin = true;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
@@ -55,7 +55,7 @@ export class ServiceApp extends ReactApp {
|
|
|
55
55
|
const startUrl = tryLogin
|
|
56
56
|
? undefined
|
|
57
57
|
: "".addUrlParam(tryLoginKey, tryLogin);
|
|
58
|
-
BridgeUtils.host.loadApp(coreName, startUrl);
|
|
58
|
+
BridgeUtils.host.loadApp(this.coreName, startUrl);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
@@ -89,7 +89,7 @@ export class ServiceApp extends ReactApp {
|
|
|
89
89
|
globalThis.location.href = url;
|
|
90
90
|
}
|
|
91
91
|
else {
|
|
92
|
-
BridgeUtils.host.loadApp(coreName, url);
|
|
92
|
+
BridgeUtils.host.loadApp(this.coreName, url);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
});
|
|
@@ -148,7 +148,7 @@ export class ServiceApp extends ReactApp {
|
|
|
148
148
|
// Cache the core system refresh token
|
|
149
149
|
this.storage.setData(coreTokenKey, this.encrypt(data.refreshToken));
|
|
150
150
|
// Exchange tokens
|
|
151
|
-
this.exchangeTokenAll(data
|
|
151
|
+
this.exchangeTokenAll(data);
|
|
152
152
|
}
|
|
153
153
|
/**
|
|
154
154
|
* Switch organization
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/materialui",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.81",
|
|
4
4
|
"description": "TypeScript Material-UI Implementation",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"@dnd-kit/sortable": "^10.0.0",
|
|
41
41
|
"@emotion/react": "^11.14.0",
|
|
42
42
|
"@emotion/styled": "^11.14.0",
|
|
43
|
-
"@etsoo/appscript": "^1.6.
|
|
43
|
+
"@etsoo/appscript": "^1.6.2",
|
|
44
44
|
"@etsoo/notificationbase": "^1.1.58",
|
|
45
|
-
"@etsoo/react": "^1.8.
|
|
45
|
+
"@etsoo/react": "^1.8.30",
|
|
46
46
|
"@etsoo/shared": "^1.2.61",
|
|
47
47
|
"@mui/icons-material": "^6.4.4",
|
|
48
48
|
"@mui/material": "^6.4.4",
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@babel/cli": "^7.26.4",
|
|
69
|
-
"@babel/core": "^7.26.
|
|
70
|
-
"@babel/plugin-transform-runtime": "^7.26.
|
|
71
|
-
"@babel/preset-env": "^7.26.
|
|
69
|
+
"@babel/core": "^7.26.9",
|
|
70
|
+
"@babel/plugin-transform-runtime": "^7.26.9",
|
|
71
|
+
"@babel/preset-env": "^7.26.9",
|
|
72
72
|
"@babel/preset-react": "^7.26.3",
|
|
73
73
|
"@babel/preset-typescript": "^7.26.0",
|
|
74
|
-
"@babel/runtime-corejs3": "^7.26.
|
|
74
|
+
"@babel/runtime-corejs3": "^7.26.9",
|
|
75
75
|
"@testing-library/react": "^16.2.0",
|
|
76
76
|
"@types/pica": "^9.0.5",
|
|
77
77
|
"@types/pulltorefreshjs": "^0.1.7",
|
package/src/app/ReactApp.ts
CHANGED
package/src/app/ServiceApp.ts
CHANGED
|
@@ -14,7 +14,6 @@ import { IServiceUser, ServiceUserToken } from "./IServiceUser";
|
|
|
14
14
|
import { ReactApp } from "./ReactApp";
|
|
15
15
|
import { IActionResult } from "@etsoo/shared";
|
|
16
16
|
|
|
17
|
-
const coreName = "core";
|
|
18
17
|
const coreTokenKey = "core-refresh-token";
|
|
19
18
|
const tryLoginKey = "tryLogin";
|
|
20
19
|
|
|
@@ -57,13 +56,14 @@ export class ServiceApp<
|
|
|
57
56
|
constructor(settings: S, name: string, debug: boolean = false) {
|
|
58
57
|
super(settings, name, debug);
|
|
59
58
|
|
|
60
|
-
|
|
59
|
+
// Custom core API name can be done with override this.coreName
|
|
60
|
+
const coreEndpoint = this.settings.endpoints?.[this.coreName];
|
|
61
61
|
if (coreEndpoint == null) {
|
|
62
62
|
throw new Error("Core API endpont is required.");
|
|
63
63
|
}
|
|
64
64
|
this.coreEndpoint = coreEndpoint;
|
|
65
65
|
this.coreOrigin = new URL(coreEndpoint.webUrl).origin;
|
|
66
|
-
this.coreApi = this.createApi(coreName, coreEndpoint);
|
|
66
|
+
this.coreApi = this.createApi(this.coreName, coreEndpoint);
|
|
67
67
|
|
|
68
68
|
this.keepLogin = true;
|
|
69
69
|
}
|
|
@@ -81,7 +81,7 @@ export class ServiceApp<
|
|
|
81
81
|
const startUrl = tryLogin
|
|
82
82
|
? undefined
|
|
83
83
|
: "".addUrlParam(tryLoginKey, tryLogin);
|
|
84
|
-
BridgeUtils.host.loadApp(coreName, startUrl);
|
|
84
|
+
BridgeUtils.host.loadApp(this.coreName, startUrl);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -117,7 +117,7 @@ export class ServiceApp<
|
|
|
117
117
|
if (BridgeUtils.host == null) {
|
|
118
118
|
globalThis.location.href = url;
|
|
119
119
|
} else {
|
|
120
|
-
BridgeUtils.host.loadApp(coreName, url);
|
|
120
|
+
BridgeUtils.host.loadApp(this.coreName, url);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
});
|
|
@@ -194,7 +194,7 @@ export class ServiceApp<
|
|
|
194
194
|
this.storage.setData(coreTokenKey, this.encrypt(data.refreshToken));
|
|
195
195
|
|
|
196
196
|
// Exchange tokens
|
|
197
|
-
this.exchangeTokenAll(data
|
|
197
|
+
this.exchangeTokenAll(data);
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
/**
|