@elliemae/pui-app-sdk 4.0.0-beta.1 → 4.0.0-beta.4
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/dist/cjs/app.config.json +42 -25
- package/dist/cjs/utils/app-config/config.js +2 -1
- package/dist/cjs/view/micro-app/resources/script.js +19 -15
- package/dist/cjs/view/micro-app/resources/style.js +15 -11
- package/dist/cjs/view/micro-iframe-app/app.js +1 -1
- package/dist/esm/app.config.json +42 -25
- package/dist/esm/utils/app-config/config.js +2 -1
- package/dist/esm/view/micro-app/resources/script.js +19 -15
- package/dist/esm/view/micro-app/resources/style.js +15 -11
- package/dist/esm/view/micro-iframe-app/app.js +1 -1
- package/dist/types/utils/app-config/config.d.ts +5 -7
- package/dist/types/view/micro-app/resources/script.d.ts +1 -1
- package/dist/types/view/micro-app/resources/style.d.ts +2 -2
- package/package.json +29 -29
package/dist/cjs/app.config.json
CHANGED
|
@@ -1,128 +1,145 @@
|
|
|
1
1
|
{
|
|
2
2
|
"appId": "app-sdk",
|
|
3
|
-
"brand": "primary",
|
|
4
3
|
"activeEnv": "localhost",
|
|
5
|
-
"hosted": true,
|
|
6
4
|
"sessionTimeoutWarnInterval": "60000",
|
|
7
5
|
"sessionTimeoutInterval": "70000",
|
|
8
6
|
"serviceEndpoints": {
|
|
9
7
|
"api": "",
|
|
10
|
-
"idp": ""
|
|
8
|
+
"idp": "https://int.idp.ellielabs.com",
|
|
9
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
11
10
|
},
|
|
12
|
-
"walkMeUrl": "https://cdn.walkme.com/users/897bcebc13fd48038c790e2866e6a9fb/test/walkme_897bcebc13fd48038c790e2866e6a9fb_https.js",
|
|
13
11
|
"env": {
|
|
14
12
|
"localhost": {
|
|
15
13
|
"serviceEndpoints": {
|
|
16
14
|
"api": "",
|
|
17
|
-
"idp": ""
|
|
15
|
+
"idp": "https://int.idp.ellielabs.com",
|
|
16
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
18
17
|
}
|
|
19
18
|
},
|
|
20
19
|
"dev": {
|
|
21
20
|
"serviceEndpoints": {
|
|
22
|
-
"api": "https://dev
|
|
23
|
-
"idp": "https://int.idp.ellielabs.com"
|
|
21
|
+
"api": "https://dev.api.puiservice.rd.elliemae.io",
|
|
22
|
+
"idp": "https://int.idp.ellielabs.com",
|
|
23
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dev2": {
|
|
27
27
|
"serviceEndpoints": {
|
|
28
28
|
"api": "https://int.api.ellielabs.com",
|
|
29
|
-
"idp": "https://int.idp.ellielabs.com"
|
|
29
|
+
"idp": "https://int.idp.ellielabs.com",
|
|
30
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
30
31
|
}
|
|
31
32
|
},
|
|
32
33
|
"qa": {
|
|
33
34
|
"serviceEndpoints": {
|
|
34
|
-
"api": "https://
|
|
35
|
-
"idp": "https://int.idp.ellielabs.com"
|
|
35
|
+
"api": "https://dev.api.puiservice.rd.elliemae.io",
|
|
36
|
+
"idp": "https://int.idp.ellielabs.com",
|
|
37
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
36
38
|
}
|
|
37
39
|
},
|
|
38
40
|
"qa2": {
|
|
39
41
|
"serviceEndpoints": {
|
|
40
42
|
"api": "https://int.api.ellielabs.com",
|
|
41
|
-
"idp": "https://int.idp.ellielabs.com"
|
|
43
|
+
"idp": "https://int.idp.ellielabs.com",
|
|
44
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
42
45
|
}
|
|
43
46
|
},
|
|
44
47
|
"qa3": {
|
|
45
48
|
"serviceEndpoints": {
|
|
46
49
|
"api": "https://int.api.ellielabs.com",
|
|
47
|
-
"idp": "https://int.idp.ellielabs.com"
|
|
50
|
+
"idp": "https://int.idp.ellielabs.com",
|
|
51
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
48
52
|
}
|
|
49
53
|
},
|
|
50
54
|
"int": {
|
|
51
55
|
"serviceEndpoints": {
|
|
52
56
|
"api": "https://int.api.ellielabs.com",
|
|
53
|
-
"idp": "https://int.idp.ellielabs.com"
|
|
57
|
+
"idp": "https://int.idp.ellielabs.com",
|
|
58
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
54
59
|
}
|
|
55
60
|
},
|
|
56
61
|
"peg-osb1": {
|
|
57
62
|
"serviceEndpoints": {
|
|
58
63
|
"api": "https://encompass-peg-api.elliemae.com",
|
|
59
|
-
"idp": "https://peg.idp.ellielabs.com/authorize"
|
|
64
|
+
"idp": "https://peg.idp.ellielabs.com/authorize",
|
|
65
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
60
66
|
}
|
|
61
67
|
},
|
|
62
68
|
"peg-osb2": {
|
|
63
69
|
"serviceEndpoints": {
|
|
64
70
|
"api": "https://encompass-peg2-api.elliemae.com",
|
|
65
|
-
"idp": "https://peg.idp.ellielabs.com/authorize"
|
|
71
|
+
"idp": "https://peg.idp.ellielabs.com/authorize",
|
|
72
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
66
73
|
}
|
|
67
74
|
},
|
|
68
75
|
"peg": {
|
|
69
76
|
"serviceEndpoints": {
|
|
70
77
|
"api": "https://peg2-west.api.ellielabs.com",
|
|
71
|
-
"idp": "https://peg.idp.ellielabs.com/authorize"
|
|
78
|
+
"idp": "https://peg.idp.ellielabs.com/authorize",
|
|
79
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
72
80
|
}
|
|
73
81
|
},
|
|
74
82
|
"peg-oapi-west": {
|
|
75
83
|
"serviceEndpoints": {
|
|
76
84
|
"api": "https://peg2-west.api.ellielabs.com",
|
|
77
|
-
"idp": "https://peg.idp.ellielabs.com/authorize"
|
|
85
|
+
"idp": "https://peg.idp.ellielabs.com/authorize",
|
|
86
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
78
87
|
}
|
|
79
88
|
},
|
|
80
89
|
"peg-oapi-east": {
|
|
81
90
|
"serviceEndpoints": {
|
|
82
91
|
"api": "https://peg2-east.api.ellielabs.com",
|
|
83
|
-
"idp": "https://peg.idp.ellielabs.com/authorize"
|
|
92
|
+
"idp": "https://peg.idp.ellielabs.com/authorize",
|
|
93
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
84
94
|
}
|
|
85
95
|
},
|
|
86
96
|
"peg2-oapi-east": {
|
|
87
97
|
"serviceEndpoints": {
|
|
88
98
|
"api": "https://peg2-east.api.ellielabs.com",
|
|
89
|
-
"idp": "https://peg.idp.ellielabs.com/authorize"
|
|
99
|
+
"idp": "https://peg.idp.ellielabs.com/authorize",
|
|
100
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
90
101
|
}
|
|
91
102
|
},
|
|
92
103
|
"peg3": {
|
|
93
104
|
"serviceEndpoints": {
|
|
94
105
|
"api": "https://pel1.api.ellielabs.com",
|
|
95
|
-
"idp": "https://peg3.idp.ellielabs.com/authorize"
|
|
106
|
+
"idp": "https://peg3.idp.ellielabs.com/authorize",
|
|
107
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
96
108
|
}
|
|
97
109
|
},
|
|
98
110
|
"stage": {
|
|
99
111
|
"serviceEndpoints": {
|
|
100
112
|
"api": "https://stg.api.elliemae.com",
|
|
101
|
-
"idp": "https://stg.idp.elliemae.com/authorize"
|
|
113
|
+
"idp": "https://stg.idp.elliemae.com/authorize",
|
|
114
|
+
"logger": "https://stg.api.puidiagnostics.elliemae.com/v1/logging"
|
|
102
115
|
}
|
|
103
116
|
},
|
|
104
117
|
"beta": {
|
|
105
118
|
"serviceEndpoints": {
|
|
106
119
|
"api": "https://concept.api.elliemae.com",
|
|
107
|
-
"idp": "https://concept.idp.elliemae.com/authorize"
|
|
120
|
+
"idp": "https://concept.idp.elliemae.com/authorize",
|
|
121
|
+
"logger": "https://concept.api.puidiagnostics.elliemae.com/v1/logging"
|
|
108
122
|
}
|
|
109
123
|
},
|
|
110
124
|
"demo": {
|
|
111
125
|
"serviceEndpoints": {
|
|
112
126
|
"api": "https://concept.api.elliemae.com",
|
|
113
|
-
"idp": "https://concept.idp.elliemae.com/authorize"
|
|
127
|
+
"idp": "https://concept.idp.elliemae.com/authorize",
|
|
128
|
+
"logger": "https://concept.api.puidiagnostics.elliemae.com/v1/logging"
|
|
114
129
|
}
|
|
115
130
|
},
|
|
116
131
|
"epc": {
|
|
117
132
|
"serviceEndpoints": {
|
|
118
133
|
"api": "https://concept.api.elliemae.com",
|
|
119
|
-
"idp": "https://concept.idp.elliemae.com/authorize"
|
|
134
|
+
"idp": "https://concept.idp.elliemae.com/authorize",
|
|
135
|
+
"logger": "https://concept.api.puidiagnostics.elliemae.com/v1/logging"
|
|
120
136
|
}
|
|
121
137
|
},
|
|
122
138
|
"prod": {
|
|
123
139
|
"serviceEndpoints": {
|
|
124
140
|
"api": "https://api.elliemae.com",
|
|
125
|
-
"idp": "https://idp.elliemae.com/authorize"
|
|
141
|
+
"idp": "https://idp.elliemae.com/authorize",
|
|
142
|
+
"logger": "https://api.puidiagnostics.elliemae.com/v1/logging"
|
|
126
143
|
}
|
|
127
144
|
}
|
|
128
145
|
}
|
|
@@ -27,7 +27,8 @@ __export(config_exports, {
|
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(config_exports);
|
|
29
29
|
var import_lodash = __toESM(require("lodash"));
|
|
30
|
-
|
|
30
|
+
var import_app_config = __toESM(require("../../app.config.json"));
|
|
31
|
+
let gAppConfig = import_app_config.default;
|
|
31
32
|
const setAppConfig = (config) => {
|
|
32
33
|
gAppConfig = config;
|
|
33
34
|
};
|
|
@@ -28,21 +28,25 @@ var import_url = require("../../../utils/url.js");
|
|
|
28
28
|
const APP_SCRIPT_ID_PREFIX = "emui-script-";
|
|
29
29
|
const HEAD_SCRIPTS = /(?:emuiDiagnostics|global|global-prod|emuiUserMonitoring)(?:..*)?.js/;
|
|
30
30
|
const isHeadScript = (scriptSrc) => HEAD_SCRIPTS.test(scriptSrc);
|
|
31
|
-
const addScriptToDOM = ({ name, hostUrl, documentEle }, fileName, index) =>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
31
|
+
const addScriptToDOM = ({ name, hostUrl, documentEle, manifestPath }, fileName, index) => {
|
|
32
|
+
if (!hostUrl || !manifestPath)
|
|
33
|
+
throw new Error("Unable to add scripts to DOM. hostUrl and manifestPath are required.");
|
|
34
|
+
return new Promise((resolve, reject) => {
|
|
35
|
+
const ele = documentEle.createElement("script");
|
|
36
|
+
if (!ele)
|
|
37
|
+
reject(new Error("Unable to insert Application scripts."));
|
|
38
|
+
ele.id = `${APP_SCRIPT_ID_PREFIX}${name}-${index}`;
|
|
39
|
+
const url = new URL(`${manifestPath.replace(/\/?$/, "/")}${fileName}`, hostUrl);
|
|
40
|
+
ele.src = (0, import_url.removeDoubleSlash)(url.href);
|
|
41
|
+
ele.onload = resolve.bind(null, ele.id);
|
|
42
|
+
ele.onerror = reject.bind(null, ele.id);
|
|
43
|
+
ele.async = false;
|
|
44
|
+
if (isHeadScript(ele.src))
|
|
45
|
+
documentEle.head.appendChild(ele);
|
|
46
|
+
else
|
|
47
|
+
documentEle.body.appendChild(ele);
|
|
48
|
+
});
|
|
49
|
+
};
|
|
46
50
|
const removeScriptFromDOM = (elementId = "", documentEle = document) => new Promise((resolve) => {
|
|
47
51
|
const ele = documentEle.getElementById(elementId);
|
|
48
52
|
if (!ele)
|
|
@@ -25,17 +25,21 @@ __export(style_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(style_exports);
|
|
26
26
|
var import_url = require("../../../utils/url.js");
|
|
27
27
|
const APP_STYLE_ID_PREFIX = "emui-style-";
|
|
28
|
-
const addStylesToDOM = ({ name, hostUrl, documentEle }, fileName, index) =>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
const addStylesToDOM = ({ name, hostUrl, documentEle, manifestPath }, fileName, index) => {
|
|
29
|
+
if (!hostUrl || !manifestPath)
|
|
30
|
+
throw new Error("Unable to add styles to DOM. hostUrl and manifestPath are required.");
|
|
31
|
+
return new Promise((resolve, reject) => {
|
|
32
|
+
const ele = documentEle.createElement("link");
|
|
33
|
+
if (!ele)
|
|
34
|
+
reject(new Error("Unable to insert Application styles."));
|
|
35
|
+
ele.id = `${APP_STYLE_ID_PREFIX}${name}-${index}`;
|
|
36
|
+
ele.rel = "stylesheet";
|
|
37
|
+
const url = new URL(`${manifestPath.replace(/\/?$/, "/")}${fileName}`, hostUrl);
|
|
38
|
+
ele.href = (0, import_url.removeDoubleSlash)(url.href);
|
|
39
|
+
ele.onload = resolve.bind(null, ele.id);
|
|
40
|
+
documentEle.head.appendChild(ele);
|
|
41
|
+
});
|
|
42
|
+
};
|
|
39
43
|
const removeStyleFromDOM = (elementId = "", documentEle = document) => new Promise((resolve) => {
|
|
40
44
|
const ele = documentEle.getElementById(elementId);
|
|
41
45
|
if (!ele)
|
|
@@ -54,7 +54,7 @@ __export(app_exports, {
|
|
|
54
54
|
module.exports = __toCommonJS(app_exports);
|
|
55
55
|
var React = __toESM(require("react"));
|
|
56
56
|
var import_react = require("react");
|
|
57
|
-
var import_iframe = __toESM(require("
|
|
57
|
+
var import_iframe = __toESM(require("./iframe/index.html?resource"));
|
|
58
58
|
var import_iframe2 = require("./iframe/index.js");
|
|
59
59
|
var import_use_frame_loaded = require("./use-frame-loaded.js");
|
|
60
60
|
var import_use_app_will_render = require("../micro-app/use-app-will-render.js");
|
package/dist/esm/app.config.json
CHANGED
|
@@ -1,128 +1,145 @@
|
|
|
1
1
|
{
|
|
2
2
|
"appId": "app-sdk",
|
|
3
|
-
"brand": "primary",
|
|
4
3
|
"activeEnv": "localhost",
|
|
5
|
-
"hosted": true,
|
|
6
4
|
"sessionTimeoutWarnInterval": "60000",
|
|
7
5
|
"sessionTimeoutInterval": "70000",
|
|
8
6
|
"serviceEndpoints": {
|
|
9
7
|
"api": "",
|
|
10
|
-
"idp": ""
|
|
8
|
+
"idp": "https://int.idp.ellielabs.com",
|
|
9
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
11
10
|
},
|
|
12
|
-
"walkMeUrl": "https://cdn.walkme.com/users/897bcebc13fd48038c790e2866e6a9fb/test/walkme_897bcebc13fd48038c790e2866e6a9fb_https.js",
|
|
13
11
|
"env": {
|
|
14
12
|
"localhost": {
|
|
15
13
|
"serviceEndpoints": {
|
|
16
14
|
"api": "",
|
|
17
|
-
"idp": ""
|
|
15
|
+
"idp": "https://int.idp.ellielabs.com",
|
|
16
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
18
17
|
}
|
|
19
18
|
},
|
|
20
19
|
"dev": {
|
|
21
20
|
"serviceEndpoints": {
|
|
22
|
-
"api": "https://dev
|
|
23
|
-
"idp": "https://int.idp.ellielabs.com"
|
|
21
|
+
"api": "https://dev.api.puiservice.rd.elliemae.io",
|
|
22
|
+
"idp": "https://int.idp.ellielabs.com",
|
|
23
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dev2": {
|
|
27
27
|
"serviceEndpoints": {
|
|
28
28
|
"api": "https://int.api.ellielabs.com",
|
|
29
|
-
"idp": "https://int.idp.ellielabs.com"
|
|
29
|
+
"idp": "https://int.idp.ellielabs.com",
|
|
30
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
30
31
|
}
|
|
31
32
|
},
|
|
32
33
|
"qa": {
|
|
33
34
|
"serviceEndpoints": {
|
|
34
|
-
"api": "https://
|
|
35
|
-
"idp": "https://int.idp.ellielabs.com"
|
|
35
|
+
"api": "https://dev.api.puiservice.rd.elliemae.io",
|
|
36
|
+
"idp": "https://int.idp.ellielabs.com",
|
|
37
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
36
38
|
}
|
|
37
39
|
},
|
|
38
40
|
"qa2": {
|
|
39
41
|
"serviceEndpoints": {
|
|
40
42
|
"api": "https://int.api.ellielabs.com",
|
|
41
|
-
"idp": "https://int.idp.ellielabs.com"
|
|
43
|
+
"idp": "https://int.idp.ellielabs.com",
|
|
44
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
42
45
|
}
|
|
43
46
|
},
|
|
44
47
|
"qa3": {
|
|
45
48
|
"serviceEndpoints": {
|
|
46
49
|
"api": "https://int.api.ellielabs.com",
|
|
47
|
-
"idp": "https://int.idp.ellielabs.com"
|
|
50
|
+
"idp": "https://int.idp.ellielabs.com",
|
|
51
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
48
52
|
}
|
|
49
53
|
},
|
|
50
54
|
"int": {
|
|
51
55
|
"serviceEndpoints": {
|
|
52
56
|
"api": "https://int.api.ellielabs.com",
|
|
53
|
-
"idp": "https://int.idp.ellielabs.com"
|
|
57
|
+
"idp": "https://int.idp.ellielabs.com",
|
|
58
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
54
59
|
}
|
|
55
60
|
},
|
|
56
61
|
"peg-osb1": {
|
|
57
62
|
"serviceEndpoints": {
|
|
58
63
|
"api": "https://encompass-peg-api.elliemae.com",
|
|
59
|
-
"idp": "https://peg.idp.ellielabs.com/authorize"
|
|
64
|
+
"idp": "https://peg.idp.ellielabs.com/authorize",
|
|
65
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
60
66
|
}
|
|
61
67
|
},
|
|
62
68
|
"peg-osb2": {
|
|
63
69
|
"serviceEndpoints": {
|
|
64
70
|
"api": "https://encompass-peg2-api.elliemae.com",
|
|
65
|
-
"idp": "https://peg.idp.ellielabs.com/authorize"
|
|
71
|
+
"idp": "https://peg.idp.ellielabs.com/authorize",
|
|
72
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
66
73
|
}
|
|
67
74
|
},
|
|
68
75
|
"peg": {
|
|
69
76
|
"serviceEndpoints": {
|
|
70
77
|
"api": "https://peg2-west.api.ellielabs.com",
|
|
71
|
-
"idp": "https://peg.idp.ellielabs.com/authorize"
|
|
78
|
+
"idp": "https://peg.idp.ellielabs.com/authorize",
|
|
79
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
72
80
|
}
|
|
73
81
|
},
|
|
74
82
|
"peg-oapi-west": {
|
|
75
83
|
"serviceEndpoints": {
|
|
76
84
|
"api": "https://peg2-west.api.ellielabs.com",
|
|
77
|
-
"idp": "https://peg.idp.ellielabs.com/authorize"
|
|
85
|
+
"idp": "https://peg.idp.ellielabs.com/authorize",
|
|
86
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
78
87
|
}
|
|
79
88
|
},
|
|
80
89
|
"peg-oapi-east": {
|
|
81
90
|
"serviceEndpoints": {
|
|
82
91
|
"api": "https://peg2-east.api.ellielabs.com",
|
|
83
|
-
"idp": "https://peg.idp.ellielabs.com/authorize"
|
|
92
|
+
"idp": "https://peg.idp.ellielabs.com/authorize",
|
|
93
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
84
94
|
}
|
|
85
95
|
},
|
|
86
96
|
"peg2-oapi-east": {
|
|
87
97
|
"serviceEndpoints": {
|
|
88
98
|
"api": "https://peg2-east.api.ellielabs.com",
|
|
89
|
-
"idp": "https://peg.idp.ellielabs.com/authorize"
|
|
99
|
+
"idp": "https://peg.idp.ellielabs.com/authorize",
|
|
100
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
90
101
|
}
|
|
91
102
|
},
|
|
92
103
|
"peg3": {
|
|
93
104
|
"serviceEndpoints": {
|
|
94
105
|
"api": "https://pel1.api.ellielabs.com",
|
|
95
|
-
"idp": "https://peg3.idp.ellielabs.com/authorize"
|
|
106
|
+
"idp": "https://peg3.idp.ellielabs.com/authorize",
|
|
107
|
+
"logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
|
|
96
108
|
}
|
|
97
109
|
},
|
|
98
110
|
"stage": {
|
|
99
111
|
"serviceEndpoints": {
|
|
100
112
|
"api": "https://stg.api.elliemae.com",
|
|
101
|
-
"idp": "https://stg.idp.elliemae.com/authorize"
|
|
113
|
+
"idp": "https://stg.idp.elliemae.com/authorize",
|
|
114
|
+
"logger": "https://stg.api.puidiagnostics.elliemae.com/v1/logging"
|
|
102
115
|
}
|
|
103
116
|
},
|
|
104
117
|
"beta": {
|
|
105
118
|
"serviceEndpoints": {
|
|
106
119
|
"api": "https://concept.api.elliemae.com",
|
|
107
|
-
"idp": "https://concept.idp.elliemae.com/authorize"
|
|
120
|
+
"idp": "https://concept.idp.elliemae.com/authorize",
|
|
121
|
+
"logger": "https://concept.api.puidiagnostics.elliemae.com/v1/logging"
|
|
108
122
|
}
|
|
109
123
|
},
|
|
110
124
|
"demo": {
|
|
111
125
|
"serviceEndpoints": {
|
|
112
126
|
"api": "https://concept.api.elliemae.com",
|
|
113
|
-
"idp": "https://concept.idp.elliemae.com/authorize"
|
|
127
|
+
"idp": "https://concept.idp.elliemae.com/authorize",
|
|
128
|
+
"logger": "https://concept.api.puidiagnostics.elliemae.com/v1/logging"
|
|
114
129
|
}
|
|
115
130
|
},
|
|
116
131
|
"epc": {
|
|
117
132
|
"serviceEndpoints": {
|
|
118
133
|
"api": "https://concept.api.elliemae.com",
|
|
119
|
-
"idp": "https://concept.idp.elliemae.com/authorize"
|
|
134
|
+
"idp": "https://concept.idp.elliemae.com/authorize",
|
|
135
|
+
"logger": "https://concept.api.puidiagnostics.elliemae.com/v1/logging"
|
|
120
136
|
}
|
|
121
137
|
},
|
|
122
138
|
"prod": {
|
|
123
139
|
"serviceEndpoints": {
|
|
124
140
|
"api": "https://api.elliemae.com",
|
|
125
|
-
"idp": "https://idp.elliemae.com/authorize"
|
|
141
|
+
"idp": "https://idp.elliemae.com/authorize",
|
|
142
|
+
"logger": "https://api.puidiagnostics.elliemae.com/v1/logging"
|
|
126
143
|
}
|
|
127
144
|
}
|
|
128
145
|
}
|
|
@@ -2,21 +2,25 @@ import { removeDoubleSlash } from "../../../utils/url.js";
|
|
|
2
2
|
const APP_SCRIPT_ID_PREFIX = "emui-script-";
|
|
3
3
|
const HEAD_SCRIPTS = /(?:emuiDiagnostics|global|global-prod|emuiUserMonitoring)(?:..*)?.js/;
|
|
4
4
|
const isHeadScript = (scriptSrc) => HEAD_SCRIPTS.test(scriptSrc);
|
|
5
|
-
const addScriptToDOM = ({ name, hostUrl, documentEle }, fileName, index) =>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
5
|
+
const addScriptToDOM = ({ name, hostUrl, documentEle, manifestPath }, fileName, index) => {
|
|
6
|
+
if (!hostUrl || !manifestPath)
|
|
7
|
+
throw new Error("Unable to add scripts to DOM. hostUrl and manifestPath are required.");
|
|
8
|
+
return new Promise((resolve, reject) => {
|
|
9
|
+
const ele = documentEle.createElement("script");
|
|
10
|
+
if (!ele)
|
|
11
|
+
reject(new Error("Unable to insert Application scripts."));
|
|
12
|
+
ele.id = `${APP_SCRIPT_ID_PREFIX}${name}-${index}`;
|
|
13
|
+
const url = new URL(`${manifestPath.replace(/\/?$/, "/")}${fileName}`, hostUrl);
|
|
14
|
+
ele.src = removeDoubleSlash(url.href);
|
|
15
|
+
ele.onload = resolve.bind(null, ele.id);
|
|
16
|
+
ele.onerror = reject.bind(null, ele.id);
|
|
17
|
+
ele.async = false;
|
|
18
|
+
if (isHeadScript(ele.src))
|
|
19
|
+
documentEle.head.appendChild(ele);
|
|
20
|
+
else
|
|
21
|
+
documentEle.body.appendChild(ele);
|
|
22
|
+
});
|
|
23
|
+
};
|
|
20
24
|
const removeScriptFromDOM = (elementId = "", documentEle = document) => new Promise((resolve) => {
|
|
21
25
|
const ele = documentEle.getElementById(elementId);
|
|
22
26
|
if (!ele)
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { removeDoubleSlash } from "../../../utils/url.js";
|
|
2
2
|
const APP_STYLE_ID_PREFIX = "emui-style-";
|
|
3
|
-
const addStylesToDOM = ({ name, hostUrl, documentEle }, fileName, index) =>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
const addStylesToDOM = ({ name, hostUrl, documentEle, manifestPath }, fileName, index) => {
|
|
4
|
+
if (!hostUrl || !manifestPath)
|
|
5
|
+
throw new Error("Unable to add styles to DOM. hostUrl and manifestPath are required.");
|
|
6
|
+
return new Promise((resolve, reject) => {
|
|
7
|
+
const ele = documentEle.createElement("link");
|
|
8
|
+
if (!ele)
|
|
9
|
+
reject(new Error("Unable to insert Application styles."));
|
|
10
|
+
ele.id = `${APP_STYLE_ID_PREFIX}${name}-${index}`;
|
|
11
|
+
ele.rel = "stylesheet";
|
|
12
|
+
const url = new URL(`${manifestPath.replace(/\/?$/, "/")}${fileName}`, hostUrl);
|
|
13
|
+
ele.href = removeDoubleSlash(url.href);
|
|
14
|
+
ele.onload = resolve.bind(null, ele.id);
|
|
15
|
+
documentEle.head.appendChild(ele);
|
|
16
|
+
});
|
|
17
|
+
};
|
|
14
18
|
const removeStyleFromDOM = (elementId = "", documentEle = document) => new Promise((resolve) => {
|
|
15
19
|
const ele = documentEle.getElementById(elementId);
|
|
16
20
|
if (!ele)
|
|
@@ -31,7 +31,7 @@ var __objRest = (source, exclude) => {
|
|
|
31
31
|
};
|
|
32
32
|
import * as React from "react";
|
|
33
33
|
import { memo, useState } from "react";
|
|
34
|
-
import frameHtml from "
|
|
34
|
+
import frameHtml from "./iframe/index.html?resource";
|
|
35
35
|
import { IFrame } from "./iframe/index.js";
|
|
36
36
|
import { useFrameLoaded } from "./use-frame-loaded.js";
|
|
37
37
|
import {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface ServiceEndpoints {
|
|
2
|
-
api
|
|
3
|
-
idp
|
|
2
|
+
api?: string;
|
|
3
|
+
idp?: string;
|
|
4
4
|
logger: string;
|
|
5
5
|
}
|
|
6
6
|
interface Env {
|
|
@@ -8,13 +8,11 @@ interface Env {
|
|
|
8
8
|
}
|
|
9
9
|
export interface AppConfig {
|
|
10
10
|
appId: string;
|
|
11
|
-
brand
|
|
11
|
+
brand?: string;
|
|
12
12
|
activeEnv: string;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
sessionTimeoutInterval: string;
|
|
13
|
+
sessionTimeoutWarnInterval?: string;
|
|
14
|
+
sessionTimeoutInterval?: string;
|
|
16
15
|
serviceEndpoints: ServiceEndpoints;
|
|
17
|
-
walkMeUrl: string;
|
|
18
16
|
env: {
|
|
19
17
|
[key: string]: Env;
|
|
20
18
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MicroAppConfig } from '../../../utils/micro-frontend/types.js';
|
|
2
2
|
export declare const APP_SCRIPT_ID_PREFIX = "emui-script-";
|
|
3
|
-
export declare const addScriptToDOM: ({ name, hostUrl, documentEle }: MicroAppConfig, fileName: string, index: number) => Promise<string>;
|
|
3
|
+
export declare const addScriptToDOM: ({ name, hostUrl, documentEle, manifestPath }: MicroAppConfig, fileName: string, index: number) => Promise<string>;
|
|
4
4
|
export declare const removeScriptFromDOM: (elementId?: string, documentEle?: Document) => Promise<void>;
|
|
5
5
|
export declare const removeDynamicImportedScripts: (hostUrl: string, documentEle: HTMLDocument) => void;
|
|
6
6
|
export declare const removePrefetchLinks: (hostUrl: string, documentEle: HTMLDocument) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MicroAppConfig } from '../../../utils/micro-frontend/types.js';
|
|
2
2
|
export declare const APP_STYLE_ID_PREFIX = "emui-style-";
|
|
3
|
-
export declare const addStylesToDOM: ({ name, hostUrl, documentEle }: MicroAppConfig, fileName: string, index: number) => Promise<string>;
|
|
3
|
+
export declare const addStylesToDOM: ({ name, hostUrl, documentEle, manifestPath }: MicroAppConfig, fileName: string, index: number) => Promise<string>;
|
|
4
4
|
export declare const removeStyleFromDOM: (elementId?: string, documentEle?: Document) => Promise<void>;
|
|
5
|
-
export declare const removeDynamicImportedStyles: (hostUrl: string, documentEle:
|
|
5
|
+
export declare const removeDynamicImportedStyles: (hostUrl: string, documentEle: Document) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-app-sdk",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.4",
|
|
4
4
|
"description": "ICE MT UI Platform Application SDK ",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
@@ -104,19 +104,19 @@
|
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
106
|
"@elliemae/app-react-dependencies": "^3.2.0",
|
|
107
|
-
"@elliemae/ds-basic": "^2.4.
|
|
108
|
-
"@elliemae/ds-button": "^2.4.
|
|
109
|
-
"@elliemae/ds-controlled-form": "^2.4.
|
|
110
|
-
"@elliemae/ds-date-picker": "^2.4.
|
|
111
|
-
"@elliemae/ds-date-range-picker": "^2.4.
|
|
112
|
-
"@elliemae/ds-dialog": "^2.4.
|
|
113
|
-
"@elliemae/ds-form": "^2.4.
|
|
114
|
-
"@elliemae/ds-form-layout-blocks": "^2.4.
|
|
115
|
-
"@elliemae/ds-grid": "^2.4.
|
|
116
|
-
"@elliemae/ds-loading-indicator": "^2.4.
|
|
117
|
-
"@elliemae/ds-modal": "^2.4.
|
|
118
|
-
"@elliemae/ds-popperjs": "^2.4.
|
|
119
|
-
"@elliemae/ds-toast": "^2.4.
|
|
107
|
+
"@elliemae/ds-basic": "^2.4.10",
|
|
108
|
+
"@elliemae/ds-button": "^2.4.10",
|
|
109
|
+
"@elliemae/ds-controlled-form": "^2.4.10",
|
|
110
|
+
"@elliemae/ds-date-picker": "^2.4.10",
|
|
111
|
+
"@elliemae/ds-date-range-picker": "^2.4.10",
|
|
112
|
+
"@elliemae/ds-dialog": "^2.4.10",
|
|
113
|
+
"@elliemae/ds-form": "^2.4.10",
|
|
114
|
+
"@elliemae/ds-form-layout-blocks": "^2.4.10",
|
|
115
|
+
"@elliemae/ds-grid": "^2.4.10",
|
|
116
|
+
"@elliemae/ds-loading-indicator": "^2.4.10",
|
|
117
|
+
"@elliemae/ds-modal": "^2.4.10",
|
|
118
|
+
"@elliemae/ds-popperjs": "^2.4.10",
|
|
119
|
+
"@elliemae/ds-toast": "^2.4.10",
|
|
120
120
|
"@elliemae/em-ssf-guest": "^1.11.1",
|
|
121
121
|
"@elliemae/pui-diagnostics": "^2.7.3",
|
|
122
122
|
"@elliemae/pui-micro-frontend-base": "^1.10.1",
|
|
@@ -126,25 +126,25 @@
|
|
|
126
126
|
"devDependencies": {
|
|
127
127
|
"@elliemae/app-react-dependencies": "~3.3.0",
|
|
128
128
|
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.3.0",
|
|
129
|
-
"@elliemae/ds-basic": "2.4.
|
|
130
|
-
"@elliemae/ds-button": "2.4.
|
|
131
|
-
"@elliemae/ds-controlled-form": "2.4.
|
|
132
|
-
"@elliemae/ds-date-picker": "2.4.
|
|
133
|
-
"@elliemae/ds-date-range-picker": "2.4.
|
|
134
|
-
"@elliemae/ds-dialog": "2.4.
|
|
135
|
-
"@elliemae/ds-form": "2.4.
|
|
136
|
-
"@elliemae/ds-form-layout-blocks": "2.4.
|
|
137
|
-
"@elliemae/ds-grid": "2.4.
|
|
138
|
-
"@elliemae/ds-loading-indicator": "2.4.
|
|
139
|
-
"@elliemae/ds-modal": "2.4.
|
|
140
|
-
"@elliemae/ds-popperjs": "2.4.
|
|
141
|
-
"@elliemae/ds-toast": "2.4.
|
|
129
|
+
"@elliemae/ds-basic": "~2.4.10",
|
|
130
|
+
"@elliemae/ds-button": "~2.4.10",
|
|
131
|
+
"@elliemae/ds-controlled-form": "~2.4.10",
|
|
132
|
+
"@elliemae/ds-date-picker": "~2.4.10",
|
|
133
|
+
"@elliemae/ds-date-range-picker": "~2.4.10",
|
|
134
|
+
"@elliemae/ds-dialog": "~2.4.10",
|
|
135
|
+
"@elliemae/ds-form": "~2.4.10",
|
|
136
|
+
"@elliemae/ds-form-layout-blocks": "~2.4.10",
|
|
137
|
+
"@elliemae/ds-grid": "~2.4.10",
|
|
138
|
+
"@elliemae/ds-loading-indicator": "~2.4.10",
|
|
139
|
+
"@elliemae/ds-modal": "~2.4.10",
|
|
140
|
+
"@elliemae/ds-popperjs": "~2.4.10",
|
|
141
|
+
"@elliemae/ds-toast": "~2.4.10",
|
|
142
142
|
"@elliemae/em-ssf-guest": "~1.11.1",
|
|
143
|
-
"@elliemae/pui-cli": "~
|
|
143
|
+
"@elliemae/pui-cli": "~7.0.0-beta.5",
|
|
144
144
|
"@elliemae/pui-diagnostics": "~2.7.3",
|
|
145
145
|
"@elliemae/pui-e2e-test-sdk": "~7.3.3",
|
|
146
146
|
"@elliemae/pui-micro-frontend-base": "~1.10.1",
|
|
147
|
-
"@elliemae/pui-theme": "2.4.1",
|
|
147
|
+
"@elliemae/pui-theme": "~2.4.1",
|
|
148
148
|
"@elliemae/pui-user-monitoring": "~1.15.0"
|
|
149
149
|
}
|
|
150
150
|
}
|