@etsoo/materialui 1.3.97 → 1.3.99
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
CHANGED
package/lib/app/ServiceApp.d.ts
CHANGED
|
@@ -19,6 +19,10 @@ export declare class ServiceApp<U extends IServiceUser = IServiceUser, P extends
|
|
|
19
19
|
* Core system API
|
|
20
20
|
*/
|
|
21
21
|
readonly coreApi: IApi;
|
|
22
|
+
/**
|
|
23
|
+
* Core system origin
|
|
24
|
+
*/
|
|
25
|
+
readonly coreOrigin: string;
|
|
22
26
|
/**
|
|
23
27
|
* Constructor
|
|
24
28
|
* @param settings Settings
|
package/lib/app/ServiceApp.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BridgeUtils } from "@etsoo/appscript";
|
|
1
|
+
import { AuthApi, BridgeUtils } from "@etsoo/appscript";
|
|
2
2
|
import { ReactApp } from "./ReactApp";
|
|
3
3
|
const coreName = "core";
|
|
4
4
|
/**
|
|
@@ -21,6 +21,7 @@ export class ServiceApp extends ReactApp {
|
|
|
21
21
|
throw new Error("Core API endpont is required.");
|
|
22
22
|
}
|
|
23
23
|
this.coreEndpoint = coreEndpoint;
|
|
24
|
+
this.coreOrigin = new URL(coreEndpoint.webUrl).origin;
|
|
24
25
|
this.coreApi = this.createApi(coreName, coreEndpoint);
|
|
25
26
|
}
|
|
26
27
|
/**
|
|
@@ -43,8 +44,8 @@ export class ServiceApp extends ReactApp {
|
|
|
43
44
|
// Cache current URL
|
|
44
45
|
this.cachedUrl = removeUrl ? undefined : globalThis.location.href;
|
|
45
46
|
// Get the redirect URL
|
|
46
|
-
this
|
|
47
|
-
.
|
|
47
|
+
new AuthApi(this)
|
|
48
|
+
.getSigninUrl({
|
|
48
49
|
region: this.region,
|
|
49
50
|
device: this.deviceId
|
|
50
51
|
})
|
|
@@ -55,7 +56,7 @@ export class ServiceApp extends ReactApp {
|
|
|
55
56
|
url = url.addUrlParam("tryLogin", tryLogin ?? false);
|
|
56
57
|
// Is it inside an iframe?
|
|
57
58
|
if (globalThis.self !== globalThis.parent) {
|
|
58
|
-
globalThis.parent.postMessage(["login", url],
|
|
59
|
+
globalThis.parent.postMessage(["login", url], this.coreOrigin);
|
|
59
60
|
}
|
|
60
61
|
else {
|
|
61
62
|
if (BridgeUtils.host == null) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/materialui",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.99",
|
|
4
4
|
"description": "TypeScript Material-UI Implementation",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -50,13 +50,13 @@
|
|
|
50
50
|
"@emotion/css": "^11.13.4",
|
|
51
51
|
"@emotion/react": "^11.13.3",
|
|
52
52
|
"@emotion/styled": "^11.13.0",
|
|
53
|
-
"@etsoo/appscript": "^1.5.
|
|
53
|
+
"@etsoo/appscript": "^1.5.32",
|
|
54
54
|
"@etsoo/notificationbase": "^1.1.49",
|
|
55
|
-
"@etsoo/react": "^1.7.
|
|
55
|
+
"@etsoo/react": "^1.7.70",
|
|
56
56
|
"@etsoo/shared": "^1.2.48",
|
|
57
57
|
"@mui/icons-material": "^6.1.3",
|
|
58
58
|
"@mui/material": "^6.1.3",
|
|
59
|
-
"@mui/x-data-grid": "^7.
|
|
59
|
+
"@mui/x-data-grid": "^7.20.0",
|
|
60
60
|
"chart.js": "^4.4.4",
|
|
61
61
|
"chartjs-plugin-datalabels": "^2.2.0",
|
|
62
62
|
"eventemitter3": "^5.0.1",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"@types/pulltorefreshjs": "^0.1.7",
|
|
85
85
|
"@types/react": "^18.3.11",
|
|
86
86
|
"@types/react-avatar-editor": "^13.0.3",
|
|
87
|
-
"@types/react-dom": "^18.3.
|
|
87
|
+
"@types/react-dom": "^18.3.1",
|
|
88
88
|
"@types/react-input-mask": "^3.0.5",
|
|
89
89
|
"@types/react-window": "^1.8.8",
|
|
90
90
|
"@typescript-eslint/eslint-plugin": "^8.8.1",
|
package/src/app/IServiceApp.ts
CHANGED
package/src/app/ServiceApp.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ApiRefreshTokenDto,
|
|
3
|
+
AuthApi,
|
|
3
4
|
BridgeUtils,
|
|
4
5
|
ExternalEndpoint,
|
|
5
6
|
IApi
|
|
@@ -36,6 +37,11 @@ export class ServiceApp<
|
|
|
36
37
|
*/
|
|
37
38
|
readonly coreApi: IApi;
|
|
38
39
|
|
|
40
|
+
/**
|
|
41
|
+
* Core system origin
|
|
42
|
+
*/
|
|
43
|
+
readonly coreOrigin: string;
|
|
44
|
+
|
|
39
45
|
/**
|
|
40
46
|
* Constructor
|
|
41
47
|
* @param settings Settings
|
|
@@ -50,7 +56,7 @@ export class ServiceApp<
|
|
|
50
56
|
throw new Error("Core API endpont is required.");
|
|
51
57
|
}
|
|
52
58
|
this.coreEndpoint = coreEndpoint;
|
|
53
|
-
|
|
59
|
+
this.coreOrigin = new URL(coreEndpoint.webUrl).origin;
|
|
54
60
|
this.coreApi = this.createApi(coreName, coreEndpoint);
|
|
55
61
|
}
|
|
56
62
|
|
|
@@ -75,8 +81,8 @@ export class ServiceApp<
|
|
|
75
81
|
this.cachedUrl = removeUrl ? undefined : globalThis.location.href;
|
|
76
82
|
|
|
77
83
|
// Get the redirect URL
|
|
78
|
-
this
|
|
79
|
-
.
|
|
84
|
+
new AuthApi(this)
|
|
85
|
+
.getSigninUrl({
|
|
80
86
|
region: this.region,
|
|
81
87
|
device: this.deviceId
|
|
82
88
|
})
|
|
@@ -88,10 +94,7 @@ export class ServiceApp<
|
|
|
88
94
|
|
|
89
95
|
// Is it inside an iframe?
|
|
90
96
|
if (globalThis.self !== globalThis.parent) {
|
|
91
|
-
globalThis.parent.postMessage(
|
|
92
|
-
["login", url],
|
|
93
|
-
new URL(this.coreEndpoint.webUrl).origin
|
|
94
|
-
);
|
|
97
|
+
globalThis.parent.postMessage(["login", url], this.coreOrigin);
|
|
95
98
|
} else {
|
|
96
99
|
if (BridgeUtils.host == null) {
|
|
97
100
|
globalThis.location.href = url;
|