@elliemae/pui-app-sdk 5.21.0-beta.3 → 5.21.0
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/analytics/index.js +1 -2
- package/dist/cjs/index.js +0 -2
- package/dist/cjs/utils/decorators/functionDecorators.js +35 -2
- package/dist/cjs/utils/decorators/index.js +2 -1
- package/dist/cjs/utils/micro-frontend/guest.js +13 -99
- package/dist/cjs/{view/tests/scriptingObjects/constant.js → utils/micro-frontend/host-app.js} +10 -5
- package/dist/cjs/utils/micro-frontend/host.js +2 -35
- package/dist/cjs/{view/tests/utils.js → utils/micro-frontend/ssfguest-adapter.js} +29 -34
- package/dist/cjs/utils/testing/index.js +1 -15
- package/dist/cjs/view/micro-iframe-app/iframe/index.js +1 -1
- package/dist/cjs/view/micro-iframe-app/iframe.html +1 -5
- package/dist/cjs/view/micro-iframe-app/use-frame-loaded.js +1 -3
- package/dist/esm/analytics/index.js +1 -2
- package/dist/esm/index.js +0 -2
- package/dist/esm/utils/decorators/functionDecorators.js +35 -2
- package/dist/esm/utils/decorators/index.js +4 -2
- package/dist/esm/utils/micro-frontend/guest.js +13 -99
- package/dist/esm/utils/micro-frontend/host-app.js +9 -0
- package/dist/esm/utils/micro-frontend/host.js +2 -35
- package/dist/esm/utils/micro-frontend/ssfguest-adapter.js +28 -0
- package/dist/esm/utils/testing/index.js +1 -5
- package/dist/esm/view/micro-iframe-app/iframe/index.js +1 -1
- package/dist/esm/view/micro-iframe-app/iframe.html +1 -5
- package/dist/esm/view/micro-iframe-app/use-frame-loaded.js +1 -3
- package/dist/types/lib/index.d.ts +0 -1
- package/dist/types/lib/utils/decorators/functionDecorators.d.ts +28 -0
- package/dist/types/lib/utils/decorators/index.d.ts +2 -1
- package/dist/types/lib/utils/micro-frontend/guest.d.ts +11 -46
- package/dist/types/lib/utils/micro-frontend/host-app.d.ts +11 -0
- package/dist/types/lib/utils/micro-frontend/host.d.ts +3 -20
- package/dist/types/lib/utils/micro-frontend/ssfguest-adapter.d.ts +7 -0
- package/dist/types/lib/utils/micro-frontend/types.d.ts +1 -2
- package/dist/types/lib/utils/testing/index.d.ts +1 -57
- package/dist/types/lib/utils/window.d.ts +6 -13
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +44 -43
- package/dist/cjs/utils/micro-frontend/app-bridge.js +0 -36
- package/dist/cjs/utils/micro-frontend/tests/app.config.json +0 -200
- package/dist/cjs/utils/micro-frontend/tests/utils.js +0 -116
- package/dist/cjs/view/microapp-v2.js +0 -91
- package/dist/cjs/view/tests/__snapshots__/micro-iframe-app.test.tsx.snap +0 -208
- package/dist/cjs/view/tests/__snapshots__/microapp-v2.test.tsx.snap +0 -21
- package/dist/cjs/view/tests/app.config.json +0 -200
- package/dist/cjs/view/tests/constants.js +0 -44
- package/dist/cjs/view/tests/flights/23.1/app.checksum1.css +0 -3
- package/dist/cjs/view/tests/flights/23.1/app.checksum1.js +0 -52
- package/dist/cjs/view/tests/flights/23.1/manifest.json +0 -4
- package/dist/cjs/view/tests/flights/latest/app.checksum.css +0 -3
- package/dist/cjs/view/tests/flights/latest/app.checksum.js +0 -52
- package/dist/cjs/view/tests/flights/latest/manifest.json +0 -4
- package/dist/cjs/view/tests/hotels/23.1/app.checksum.css +0 -3
- package/dist/cjs/view/tests/hotels/23.1/app.checksum.js +0 -52
- package/dist/cjs/view/tests/hotels/23.1/manifest.json +0 -4
- package/dist/cjs/view/tests/hotels/latest/app.checksum.css +0 -3
- package/dist/cjs/view/tests/hotels/latest/app.checksum.js +0 -52
- package/dist/cjs/view/tests/hotels/latest/manifest.json +0 -4
- package/dist/cjs/view/tests/loan/latest/index.js +0 -116
- package/dist/cjs/view/tests/loan/latest/manifest.json +0 -3
- package/dist/cjs/view/tests/scriptingObjects/appraisalServiceModule.js +0 -85
- package/dist/cjs/view/tests/scriptingObjects/global.js +0 -40
- package/dist/cjs/view/tests/scriptingObjects/loan.js +0 -207
- package/dist/cjs/view/tests/server.js +0 -29
- package/dist/cjs/view/tests/serverHandlers.js +0 -210
- package/dist/cjs/view/tests/task/latest/index.dev.js +0 -67
- package/dist/cjs/view/tests/task/latest/index.js +0 -67
- package/dist/cjs/view/tests/task/latest/manifest.json +0 -4
- package/dist/cjs/view/tests/travelhub/23.1/app.checksum.css +0 -3
- package/dist/cjs/view/tests/travelhub/23.1/app.checksum.js +0 -25
- package/dist/cjs/view/tests/travelhub/23.1/landing.checksum1.css +0 -3
- package/dist/cjs/view/tests/travelhub/23.1/landing.checksum1.js +0 -6
- package/dist/cjs/view/tests/travelhub/23.1/manifest.json +0 -6
- package/dist/cjs/view/tests/travelhub/latest/app.checksum.css +0 -3
- package/dist/cjs/view/tests/travelhub/latest/app.checksum.js +0 -30
- package/dist/cjs/view/tests/travelhub/latest/landing.checksum.css +0 -3
- package/dist/cjs/view/tests/travelhub/latest/landing.checksum.js +0 -8
- package/dist/cjs/view/tests/travelhub/latest/manifest.json +0 -6
- package/dist/esm/utils/micro-frontend/app-bridge.js +0 -16
- package/dist/esm/utils/micro-frontend/tests/app.config.json +0 -200
- package/dist/esm/utils/micro-frontend/tests/utils.js +0 -96
- package/dist/esm/view/microapp-v2.js +0 -71
- package/dist/esm/view/tests/__snapshots__/micro-iframe-app.test.tsx.snap +0 -208
- package/dist/esm/view/tests/__snapshots__/microapp-v2.test.tsx.snap +0 -21
- package/dist/esm/view/tests/app.config.json +0 -200
- package/dist/esm/view/tests/constants.js +0 -24
- package/dist/esm/view/tests/flights/23.1/app.checksum1.css +0 -3
- package/dist/esm/view/tests/flights/23.1/app.checksum1.js +0 -51
- package/dist/esm/view/tests/flights/23.1/manifest.json +0 -4
- package/dist/esm/view/tests/flights/latest/app.checksum.css +0 -3
- package/dist/esm/view/tests/flights/latest/app.checksum.js +0 -51
- package/dist/esm/view/tests/flights/latest/manifest.json +0 -4
- package/dist/esm/view/tests/hotels/23.1/app.checksum.css +0 -3
- package/dist/esm/view/tests/hotels/23.1/app.checksum.js +0 -51
- package/dist/esm/view/tests/hotels/23.1/manifest.json +0 -4
- package/dist/esm/view/tests/hotels/latest/app.checksum.css +0 -3
- package/dist/esm/view/tests/hotels/latest/app.checksum.js +0 -51
- package/dist/esm/view/tests/hotels/latest/manifest.json +0 -4
- package/dist/esm/view/tests/loan/latest/index.js +0 -115
- package/dist/esm/view/tests/loan/latest/manifest.json +0 -3
- package/dist/esm/view/tests/scriptingObjects/appraisalServiceModule.js +0 -67
- package/dist/esm/view/tests/scriptingObjects/constant.js +0 -4
- package/dist/esm/view/tests/scriptingObjects/global.js +0 -20
- package/dist/esm/view/tests/scriptingObjects/loan.js +0 -187
- package/dist/esm/view/tests/server.js +0 -9
- package/dist/esm/view/tests/serverHandlers.js +0 -180
- package/dist/esm/view/tests/task/latest/index.dev.js +0 -66
- package/dist/esm/view/tests/task/latest/index.js +0 -66
- package/dist/esm/view/tests/task/latest/manifest.json +0 -4
- package/dist/esm/view/tests/travelhub/23.1/app.checksum.css +0 -3
- package/dist/esm/view/tests/travelhub/23.1/app.checksum.js +0 -24
- package/dist/esm/view/tests/travelhub/23.1/landing.checksum1.css +0 -3
- package/dist/esm/view/tests/travelhub/23.1/landing.checksum1.js +0 -5
- package/dist/esm/view/tests/travelhub/23.1/manifest.json +0 -6
- package/dist/esm/view/tests/travelhub/latest/app.checksum.css +0 -3
- package/dist/esm/view/tests/travelhub/latest/app.checksum.js +0 -29
- package/dist/esm/view/tests/travelhub/latest/landing.checksum.css +0 -3
- package/dist/esm/view/tests/travelhub/latest/landing.checksum.js +0 -7
- package/dist/esm/view/tests/travelhub/latest/manifest.json +0 -6
- package/dist/esm/view/tests/utils.js +0 -33
- package/dist/types/lib/utils/micro-frontend/app-bridge.d.ts +0 -4
- package/dist/types/lib/utils/micro-frontend/tests/utils.d.ts +0 -39
- package/dist/types/lib/view/microapp-v2.d.ts +0 -16
- package/dist/types/lib/view/tests/constants.d.ts +0 -11
- package/dist/types/lib/view/tests/flights/23.1/app.checksum1.d.ts +0 -7
- package/dist/types/lib/view/tests/flights/latest/app.checksum.d.ts +0 -7
- package/dist/types/lib/view/tests/hotels/23.1/app.checksum.d.ts +0 -7
- package/dist/types/lib/view/tests/hotels/latest/app.checksum.d.ts +0 -7
- package/dist/types/lib/view/tests/loan/latest/index.d.ts +0 -11
- package/dist/types/lib/view/tests/microapp-v2.test.d.ts +0 -1
- package/dist/types/lib/view/tests/scriptingObjects/appraisalServiceModule.d.ts +0 -36
- package/dist/types/lib/view/tests/scriptingObjects/constant.d.ts +0 -1
- package/dist/types/lib/view/tests/scriptingObjects/global.d.ts +0 -9
- package/dist/types/lib/view/tests/scriptingObjects/loan.d.ts +0 -31
- package/dist/types/lib/view/tests/server.d.ts +0 -1
- package/dist/types/lib/view/tests/serverHandlers.d.ts +0 -5
- package/dist/types/lib/view/tests/task/latest/index.d.ts +0 -10
- package/dist/types/lib/view/tests/task/latest/index.dev.d.ts +0 -10
- package/dist/types/lib/view/tests/travelhub/23.1/app.checksum.d.ts +0 -7
- package/dist/types/lib/view/tests/travelhub/23.1/landing.checksum1.d.ts +0 -2
- package/dist/types/lib/view/tests/travelhub/latest/app.checksum.d.ts +0 -0
- package/dist/types/lib/view/tests/travelhub/latest/landing.checksum.d.ts +0 -0
- package/dist/types/lib/view/tests/utils.d.ts +0 -7
- /package/dist/types/lib/{view/tests/micro-iframe-app.test.d.ts → utils/micro-frontend/tests/guest-ssf-host.test.d.ts} +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _ from "lodash";
|
|
2
2
|
import { v4 as uuidv4 } from "uuid";
|
|
3
3
|
import { getDefaultTheme } from "@elliemae/pui-theme";
|
|
4
|
-
import { SSFGuest } from "@elliemae/ssf-guest";
|
|
5
4
|
import { getWindow } from "../window.js";
|
|
6
5
|
import { loadAppConfig } from "../app-config/index.js";
|
|
7
6
|
import { getAppConfigValue } from "../app-config/config.js";
|
|
@@ -11,7 +10,8 @@ import { setLogger } from "../logger.js";
|
|
|
11
10
|
import { removeStorageEvents } from "../web-storage.js";
|
|
12
11
|
import { updateBAEventParameters } from "./scripting-objects/web-analytics.js";
|
|
13
12
|
import { setAppDynamicsUserData } from "../../analytics/appdynamics.js";
|
|
14
|
-
import {
|
|
13
|
+
import { SSFGuestAdapter } from "./ssfguest-adapter.js";
|
|
14
|
+
import { setHostApp } from "./host-app.js";
|
|
15
15
|
const isCrossDomain = () => {
|
|
16
16
|
try {
|
|
17
17
|
window.parent.document;
|
|
@@ -20,11 +20,6 @@ const isCrossDomain = () => {
|
|
|
20
20
|
return true;
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
var CommunicationMethod = /* @__PURE__ */ ((CommunicationMethod2) => {
|
|
24
|
-
CommunicationMethod2["SSF"] = "ssf";
|
|
25
|
-
CommunicationMethod2["APPSDK"] = "app-sdk";
|
|
26
|
-
return CommunicationMethod2;
|
|
27
|
-
})(CommunicationMethod || {});
|
|
28
23
|
class CMicroAppGuest {
|
|
29
24
|
/**
|
|
30
25
|
* unique microapp id
|
|
@@ -35,14 +30,6 @@ class CMicroAppGuest {
|
|
|
35
30
|
appId;
|
|
36
31
|
props;
|
|
37
32
|
containerId;
|
|
38
|
-
/**
|
|
39
|
-
* communication method used between microapps
|
|
40
|
-
*/
|
|
41
|
-
#communicationMethod;
|
|
42
|
-
/**
|
|
43
|
-
* AppBridge instance
|
|
44
|
-
*/
|
|
45
|
-
#appBridge = null;
|
|
46
33
|
onInit;
|
|
47
34
|
onMount;
|
|
48
35
|
onUnmount;
|
|
@@ -53,7 +40,6 @@ class CMicroAppGuest {
|
|
|
53
40
|
window.emui.uuid = window.emui.uuid || uuidv4();
|
|
54
41
|
this.appId = window.emui?.appId || getAppConfigValue("appId");
|
|
55
42
|
this.#uuid = window.emui.uuid;
|
|
56
|
-
this.#communicationMethod = "app-sdk" /* APPSDK */;
|
|
57
43
|
this.props = {
|
|
58
44
|
host: null,
|
|
59
45
|
hostUrl: null,
|
|
@@ -91,45 +77,6 @@ class CMicroAppGuest {
|
|
|
91
77
|
getLogger() {
|
|
92
78
|
return this.logger;
|
|
93
79
|
}
|
|
94
|
-
getObject(objectId) {
|
|
95
|
-
let host = null;
|
|
96
|
-
if (this.#communicationMethod === "ssf" /* SSF */) {
|
|
97
|
-
host = this.getHost();
|
|
98
|
-
return host.getObject(objectId);
|
|
99
|
-
}
|
|
100
|
-
host = this.getHost();
|
|
101
|
-
return host.getObject(objectId);
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* subscribe to the scripting object event
|
|
105
|
-
* @param {SubscribeParam<EventId, AppEvents[EventId]>} params - the parameters for the subscription
|
|
106
|
-
* @param {string} params.soName - the name of the scripting object
|
|
107
|
-
* @param {string} params.eventName - the name of the event
|
|
108
|
-
* @param {Function} params.callback - the callback function to be called when the event is triggered
|
|
109
|
-
* @returns {void}
|
|
110
|
-
*/
|
|
111
|
-
subscribe(params) {
|
|
112
|
-
let host = null;
|
|
113
|
-
if (this.#communicationMethod === "ssf" /* SSF */) {
|
|
114
|
-
host = this.getHost();
|
|
115
|
-
return host.subscribe(params);
|
|
116
|
-
}
|
|
117
|
-
host = this.getHost();
|
|
118
|
-
return host.subscribe(params);
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* unsubscribe from the scripting object event
|
|
122
|
-
* @param params - parameters for the unsubscription
|
|
123
|
-
*/
|
|
124
|
-
unsubscribe(params) {
|
|
125
|
-
let host = null;
|
|
126
|
-
if (this.#communicationMethod === "ssf" /* SSF */) {
|
|
127
|
-
host = this.getHost();
|
|
128
|
-
host.unsubscribe(params);
|
|
129
|
-
}
|
|
130
|
-
host = this.getHost();
|
|
131
|
-
host.unsubscribe(params);
|
|
132
|
-
}
|
|
133
80
|
getProps() {
|
|
134
81
|
return this.props;
|
|
135
82
|
}
|
|
@@ -194,22 +141,21 @@ class CMicroAppGuest {
|
|
|
194
141
|
}
|
|
195
142
|
getSessionStorageItem(key) {
|
|
196
143
|
let value = sessionStorage.getItem(key);
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
value = host.getItem(key);
|
|
144
|
+
if (!value && this.props.host?.getItem) {
|
|
145
|
+
value = this.props.host.getItem(key);
|
|
200
146
|
}
|
|
201
147
|
return value;
|
|
202
148
|
}
|
|
203
|
-
async
|
|
149
|
+
async getSSFAdapter() {
|
|
204
150
|
let host = null;
|
|
205
151
|
if (window.parent !== window) {
|
|
206
152
|
if (!isCrossDomain()) {
|
|
207
|
-
host = window.parent?.emui?.MicroAppHost
|
|
153
|
+
host = window.parent?.emui?.MicroAppHost || null;
|
|
208
154
|
}
|
|
209
155
|
if (!host) {
|
|
210
|
-
|
|
211
|
-
await
|
|
212
|
-
|
|
156
|
+
const ssfAdapter = new SSFGuestAdapter();
|
|
157
|
+
if (!await ssfAdapter.init()) return null;
|
|
158
|
+
host = ssfAdapter;
|
|
213
159
|
}
|
|
214
160
|
}
|
|
215
161
|
return host;
|
|
@@ -221,21 +167,17 @@ class CMicroAppGuest {
|
|
|
221
167
|
this.props = _.merge(this.props, options);
|
|
222
168
|
this.props.history = options?.history || this.props.history;
|
|
223
169
|
if (!this.props.host) {
|
|
224
|
-
const host = await this.
|
|
225
|
-
if (host)
|
|
226
|
-
this.props.host = host;
|
|
227
|
-
}
|
|
170
|
+
const host = await this.getSSFAdapter();
|
|
171
|
+
if (host) this.props.host = host;
|
|
228
172
|
}
|
|
173
|
+
if (this.props.host) setHostApp(this.props.host);
|
|
229
174
|
__webpack_public_path__ = __webpack_public_path__.replace(/\/?$/, "/");
|
|
230
175
|
return loadAppConfig().then(() => {
|
|
231
176
|
const instanceId = this.getSessionStorageItem("instanceId") || "";
|
|
232
177
|
const userId = this.getSessionStorageItem("userId") || "";
|
|
233
178
|
updateBAEventParameters({ appId: this.appId, instanceId, userId });
|
|
234
179
|
setAppDynamicsUserData({ appId: this.appId, instanceId, userId });
|
|
235
|
-
|
|
236
|
-
this.#appBridge = appBridge;
|
|
237
|
-
if (this.onInit) this.onInit(this.props);
|
|
238
|
-
});
|
|
180
|
+
if (this.onInit) this.onInit(this.props);
|
|
239
181
|
});
|
|
240
182
|
}
|
|
241
183
|
mount(options = { containerId: "app-container" }) {
|
|
@@ -256,34 +198,6 @@ class CMicroAppGuest {
|
|
|
256
198
|
navigate(url, state) {
|
|
257
199
|
if (url) this.props.history.push(url, state);
|
|
258
200
|
}
|
|
259
|
-
/**
|
|
260
|
-
* add scripting object for child microapp to use
|
|
261
|
-
* @param so - The scripting object to be added.
|
|
262
|
-
* @param params - Optional parameters for adding the scripting object.
|
|
263
|
-
*/
|
|
264
|
-
addScriptingObject(so, params) {
|
|
265
|
-
if (this.#appBridge) {
|
|
266
|
-
this.#appBridge.addScriptingObject(so, params);
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* dispatch event to child microapp
|
|
271
|
-
* @param {DispatchEventParams<EventId, Params>} params - event parameters
|
|
272
|
-
*/
|
|
273
|
-
async dispatchEvent(params) {
|
|
274
|
-
if (this.#appBridge) {
|
|
275
|
-
await this.#appBridge.dispatchEvent(params);
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* removes scripting object from child microapp use
|
|
280
|
-
* @param objectId unique id of the scripting object
|
|
281
|
-
*/
|
|
282
|
-
removeScriptingObject(objectId) {
|
|
283
|
-
if (this.#appBridge) {
|
|
284
|
-
this.#appBridge.removeScriptingObject(objectId);
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
201
|
}
|
|
288
202
|
export {
|
|
289
203
|
CMicroAppGuest
|
|
@@ -24,7 +24,7 @@ import { setAppDynamicsUserData } from "../../analytics/appdynamics.js";
|
|
|
24
24
|
import { Analytics } from "./scripting-objects/analytics.js";
|
|
25
25
|
import { updateBAEventParameters } from "./scripting-objects/web-analytics.js";
|
|
26
26
|
import { renewSession } from "../session.js";
|
|
27
|
-
import {
|
|
27
|
+
import { setHostApp } from "./host-app.js";
|
|
28
28
|
class CMicroAppHost {
|
|
29
29
|
static instance;
|
|
30
30
|
logger;
|
|
@@ -36,7 +36,6 @@ class CMicroAppHost {
|
|
|
36
36
|
throttleRenewSessionTimer;
|
|
37
37
|
scriptingObjects;
|
|
38
38
|
#ssfHostRef;
|
|
39
|
-
#appBridge = null;
|
|
40
39
|
// eslint-disable-next-line max-statements
|
|
41
40
|
constructor(params) {
|
|
42
41
|
this.appId = getAppConfigValue("appId");
|
|
@@ -77,11 +76,6 @@ class CMicroAppHost {
|
|
|
77
76
|
}
|
|
78
77
|
);
|
|
79
78
|
loadAppConfig().then(() => {
|
|
80
|
-
getAppBridge().then((appBridge) => {
|
|
81
|
-
this.#appBridge = appBridge;
|
|
82
|
-
}).catch((ex) => {
|
|
83
|
-
throw ex;
|
|
84
|
-
});
|
|
85
79
|
if (this.onInit) this.onInit(this.props);
|
|
86
80
|
}).catch(() => {
|
|
87
81
|
});
|
|
@@ -93,6 +87,7 @@ class CMicroAppHost {
|
|
|
93
87
|
static getInstance(params) {
|
|
94
88
|
if (!this.instance) {
|
|
95
89
|
this.instance = new this(params);
|
|
90
|
+
setHostApp(this.instance);
|
|
96
91
|
}
|
|
97
92
|
return this.instance;
|
|
98
93
|
}
|
|
@@ -186,34 +181,6 @@ class CMicroAppHost {
|
|
|
186
181
|
async getObject(name) {
|
|
187
182
|
return this.scriptingObjects[name];
|
|
188
183
|
}
|
|
189
|
-
/**
|
|
190
|
-
* add scripting object for child microapp to use
|
|
191
|
-
* @param so - The scripting object to be added.
|
|
192
|
-
* @param params - Optional parameters for adding the scripting object.
|
|
193
|
-
*/
|
|
194
|
-
addScriptingObject(so, params) {
|
|
195
|
-
if (this.#appBridge) {
|
|
196
|
-
this.#appBridge.addScriptingObject(so, params);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* dispatch event to child microapp
|
|
201
|
-
* @param {DispatchEventParams<EventId, Params>} params - event parameters
|
|
202
|
-
*/
|
|
203
|
-
async dispatchEvent(params) {
|
|
204
|
-
if (this.#appBridge) {
|
|
205
|
-
await this.#appBridge.dispatchEvent(params);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* removes scripting object from child microapp use
|
|
210
|
-
* @param objectId unique id of the scripting object
|
|
211
|
-
*/
|
|
212
|
-
removeScriptingObject(objectId) {
|
|
213
|
-
if (this.#appBridge) {
|
|
214
|
-
this.#appBridge.removeScriptingObject(objectId);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
184
|
}
|
|
218
185
|
export {
|
|
219
186
|
CMicroAppHost
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import ssfGuest from "@elliemae/em-ssf-guest";
|
|
2
|
+
class SSFGuestAdapter {
|
|
3
|
+
async init() {
|
|
4
|
+
if (!ssfGuest) return false;
|
|
5
|
+
await ssfGuest.connect();
|
|
6
|
+
return true;
|
|
7
|
+
}
|
|
8
|
+
async getObject(name) {
|
|
9
|
+
return ssfGuest.getObject(name);
|
|
10
|
+
}
|
|
11
|
+
subscribe(message, func) {
|
|
12
|
+
const callback = (scriptingObj, eventData) => {
|
|
13
|
+
func(message, eventData);
|
|
14
|
+
};
|
|
15
|
+
const [objectId, eventName] = message.split(".");
|
|
16
|
+
return ssfGuest.subscribe(
|
|
17
|
+
objectId,
|
|
18
|
+
eventName || "",
|
|
19
|
+
callback
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
unsubscribe(token, objectId, eventName) {
|
|
23
|
+
return ssfGuest.unsubscribe(objectId, eventName, token);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
SSFGuestAdapter
|
|
28
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { render } from "@testing-library/react";
|
|
3
|
-
import userEvent from "@testing-library/user-event";
|
|
4
3
|
import { getDefaultTheme } from "@elliemae/pui-theme";
|
|
5
4
|
import { createAppStore } from "../../data/store.js";
|
|
6
5
|
import { AppRoot } from "../../view/app-root/index.js";
|
|
@@ -12,10 +11,7 @@ const AllTheProviders = ({
|
|
|
12
11
|
theme = defaultTheme,
|
|
13
12
|
children
|
|
14
13
|
}) => /* @__PURE__ */ jsx(AppRoot, { store, history: browserHistory, theme, children });
|
|
15
|
-
const customRender = (ui, options) => ({
|
|
16
|
-
user: userEvent.setup(),
|
|
17
|
-
...render(ui, { wrapper: AllTheProviders, ...options })
|
|
18
|
-
});
|
|
14
|
+
const customRender = (ui, options) => render(ui, { wrapper: AllTheProviders, ...options });
|
|
19
15
|
export * from "@testing-library/react";
|
|
20
16
|
export {
|
|
21
17
|
customRender as render
|
|
@@ -69,10 +69,6 @@
|
|
|
69
69
|
<strong>JavaScript has been disabled on your browser</strong>, please
|
|
70
70
|
<strong>enable JS</strong> to make this app work.</noscript
|
|
71
71
|
>
|
|
72
|
-
<div
|
|
73
|
-
id="pui-app-container-"
|
|
74
|
-
data-testid="pui-app-container-"
|
|
75
|
-
class="full-width full-height"
|
|
76
|
-
></div>
|
|
72
|
+
<div id="pui-app-container-" class="full-width full-height"></div>
|
|
77
73
|
</body>
|
|
78
74
|
</html>
|
|
@@ -2,7 +2,6 @@ import { useEffect } from "react";
|
|
|
2
2
|
import { trackActivity } from "../../utils/session.js";
|
|
3
3
|
import { CMicroAppHost } from "../../utils/micro-frontend/host.js";
|
|
4
4
|
import { getMicroFrontEndAppConfig } from "../../utils/micro-frontend/index.js";
|
|
5
|
-
import { APP_CONTAINER_ID_PREFIX } from "../micro-app/const.js";
|
|
6
5
|
const addBaseTag = (id, documentEle) => {
|
|
7
6
|
const { hostUrl, manifestPath } = getMicroFrontEndAppConfig({
|
|
8
7
|
id
|
|
@@ -14,10 +13,9 @@ const addBaseTag = (id, documentEle) => {
|
|
|
14
13
|
documentEle.getElementsByTagName("head")[0].appendChild(base);
|
|
15
14
|
};
|
|
16
15
|
const updateContainerId = (id, documentEle) => {
|
|
17
|
-
const ele = documentEle.getElementById(
|
|
16
|
+
const ele = documentEle.getElementById("pui-app-container-");
|
|
18
17
|
if (ele) {
|
|
19
18
|
ele.id = `${ele.id}${id}`;
|
|
20
|
-
ele.dataset.testid = ele.id;
|
|
21
19
|
}
|
|
22
20
|
};
|
|
23
21
|
const useFrameLoaded = ({ id, documentEle }) => {
|
|
@@ -81,7 +81,6 @@ export { actions as ariaLive } from './data/live-message/index.js';
|
|
|
81
81
|
export { actions as error } from './data/error/index.js';
|
|
82
82
|
export { actions as logout } from './data/logout/actions.js';
|
|
83
83
|
export { MicroApp } from './view/micro-app/index.js';
|
|
84
|
-
export { MicroApp2 } from './view/microapp-v2.js';
|
|
85
84
|
export { MicroIFrameApp } from './view/micro-iframe-app/index.js';
|
|
86
85
|
export { getNavigationLinks } from './view/micro-app/utils.js';
|
|
87
86
|
export { getStore } from './data/store.js';
|
|
@@ -131,3 +131,31 @@ export declare function Throttle(delay?: number): (_target: any, _propertyKey: s
|
|
|
131
131
|
* ```
|
|
132
132
|
*/
|
|
133
133
|
export declare function AsyncSingleExecution(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): PropertyDescriptor;
|
|
134
|
+
/**
|
|
135
|
+
* Retries an async method a specified number of times with a delay between attempts.
|
|
136
|
+
* @param {number} [retries=3] - The number of retry attempts.
|
|
137
|
+
* @param {number} [interval=2000] - The delay in milliseconds between retries.
|
|
138
|
+
* @param {boolean} [reThrowException=true] - Whether to rethrow the exception after all retries fail.
|
|
139
|
+
* @returns {MethodDecorator} A method decorator that modifies the property descriptor.
|
|
140
|
+
* @example
|
|
141
|
+
* class Example {
|
|
142
|
+
* @RetryAsync(3, 1000, true)
|
|
143
|
+
* async fetchData() {
|
|
144
|
+
* console.log('Attempting to fetch data...');
|
|
145
|
+
* if (Math.random() < 0.7) {
|
|
146
|
+
* throw new Error('Fetch failed');
|
|
147
|
+
* }
|
|
148
|
+
* return 'Data fetched successfully';
|
|
149
|
+
* }
|
|
150
|
+
* }
|
|
151
|
+
*
|
|
152
|
+
* const instance = new Example();
|
|
153
|
+
* instance.fetchData().then(console.log).catch(console.error);
|
|
154
|
+
*
|
|
155
|
+
* // Output (example):
|
|
156
|
+
* // Attempting to fetch data...
|
|
157
|
+
* // Attempting to fetch data...
|
|
158
|
+
* // Attempting to fetch data...
|
|
159
|
+
* // Error: Fetch failed
|
|
160
|
+
*/
|
|
161
|
+
export declare function RetryAsync(retries?: number, interval?: number, reThrowException?: boolean): MethodDecorator;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Mixins, Singleton } from './classDecorators.js';
|
|
2
|
-
import { AsyncSingleExecution, CacheUntilResolved, Debounce, ImmutableArgs, Memoize, MemoizeAsync, QueueTask, Throttle } from './functionDecorators.js';
|
|
2
|
+
import { AsyncSingleExecution, CacheUntilResolved, Debounce, ImmutableArgs, Memoize, MemoizeAsync, QueueTask, Throttle, RetryAsync } from './functionDecorators.js';
|
|
3
3
|
declare const decorators: {
|
|
4
4
|
class: {
|
|
5
5
|
Mixins: typeof Mixins;
|
|
@@ -14,6 +14,7 @@ declare const decorators: {
|
|
|
14
14
|
QueueTask: typeof QueueTask;
|
|
15
15
|
Throttle: typeof Throttle;
|
|
16
16
|
AsyncSingleExecution: typeof AsyncSingleExecution;
|
|
17
|
+
RetryAsync: typeof RetryAsync;
|
|
17
18
|
};
|
|
18
19
|
};
|
|
19
20
|
export { decorators };
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { DefaultTheme } from 'styled-components';
|
|
2
2
|
import { History, To } from 'history';
|
|
3
3
|
import type { IMicroAppGuest, IMicroAppHost, InitOptions, MountOptions } from '@elliemae/pui-micro-frontend-base';
|
|
4
|
-
import { ScriptingObjectTypes, Events } from '@elliemae/pui-scripting-object';
|
|
5
|
-
import { IMicroFEHost } from '@elliemae/pui-app-bridge';
|
|
6
|
-
import type { ScriptingObjects, EventListeners, SubscribeParam, UnsubscribeParam, DispatchEventParam, EventOptions, AddScriptingObjectParams } from '@elliemae/microfe-common';
|
|
7
|
-
import { SSFGuest } from '@elliemae/ssf-guest';
|
|
8
4
|
import { JSONValue, MicroFrontEndLogger } from '../types.js';
|
|
9
|
-
export interface GuestProps
|
|
5
|
+
export interface GuestProps extends InitOptions {
|
|
10
6
|
prevState: JSONValue | null;
|
|
11
7
|
history: History;
|
|
12
8
|
theme: DefaultTheme;
|
|
@@ -23,7 +19,7 @@ interface ConstructorParams {
|
|
|
23
19
|
onGetRef?: OnGetRefCallback;
|
|
24
20
|
history?: History;
|
|
25
21
|
}
|
|
26
|
-
export declare class CMicroAppGuest
|
|
22
|
+
export declare class CMicroAppGuest implements IMicroAppGuest {
|
|
27
23
|
#private;
|
|
28
24
|
private static instance;
|
|
29
25
|
private readonly logger;
|
|
@@ -35,50 +31,19 @@ export declare class CMicroAppGuest<AppObjects extends ScriptingObjects = Partia
|
|
|
35
31
|
private readonly onUnmount?;
|
|
36
32
|
private readonly onGetRef?;
|
|
37
33
|
private constructor();
|
|
38
|
-
static getInstance(params?: ConstructorParams): CMicroAppGuest
|
|
34
|
+
static getInstance(params?: ConstructorParams): CMicroAppGuest;
|
|
39
35
|
static isInitialized(): boolean;
|
|
40
36
|
static isHosted(): boolean;
|
|
41
|
-
getHost(): IMicroAppHost
|
|
37
|
+
getHost(): IMicroAppHost | undefined;
|
|
42
38
|
getLogger(): MicroFrontEndLogger;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* subscribe to the scripting object event
|
|
46
|
-
* @param {SubscribeParam<EventId, AppEvents[EventId]>} params - the parameters for the subscription
|
|
47
|
-
* @param {string} params.soName - the name of the scripting object
|
|
48
|
-
* @param {string} params.eventName - the name of the event
|
|
49
|
-
* @param {Function} params.callback - the callback function to be called when the event is triggered
|
|
50
|
-
* @returns {void}
|
|
51
|
-
*/
|
|
52
|
-
subscribe<EventId extends Extract<keyof AppEvents, string>>(params: SubscribeParam<EventId, AppEvents[EventId]>): string;
|
|
53
|
-
/**
|
|
54
|
-
* unsubscribe from the scripting object event
|
|
55
|
-
* @param params - parameters for the unsubscription
|
|
56
|
-
*/
|
|
57
|
-
unsubscribe<EventId extends Extract<keyof AppEvents, string>>(params: UnsubscribeParam<EventId>): void;
|
|
58
|
-
getProps(): GuestProps<Partial<ScriptingObjectTypes>, Events>;
|
|
39
|
+
getProps(): GuestProps;
|
|
59
40
|
private getSessionStorageItem;
|
|
60
|
-
private
|
|
41
|
+
private getSSFAdapter;
|
|
61
42
|
get uuid(): string;
|
|
62
|
-
init(options: InitOptions
|
|
63
|
-
mount(options?: MountOptions): Promise<void>;
|
|
64
|
-
unmount(options: MountOptions): Promise<JSONValue>;
|
|
65
|
-
getRef<T>(): T | null;
|
|
66
|
-
navigate(url: To, state?: any): void;
|
|
67
|
-
/**
|
|
68
|
-
* add scripting object for child microapp to use
|
|
69
|
-
* @param so - The scripting object to be added.
|
|
70
|
-
* @param params - Optional parameters for adding the scripting object.
|
|
71
|
-
*/
|
|
72
|
-
addScriptingObject<SO extends AppObjects[keyof AppObjects]>(so: SO, params?: AddScriptingObjectParams): void;
|
|
73
|
-
/**
|
|
74
|
-
* dispatch event to child microapp
|
|
75
|
-
* @param {DispatchEventParams<EventId, Params>} params - event parameters
|
|
76
|
-
*/
|
|
77
|
-
dispatchEvent<EventId extends Extract<keyof AppEvents, string>, Params extends Parameters<AppEvents[EventId]>[0]['eventParams'], Options extends EventOptions>(params: DispatchEventParam<EventId, Params, Options>): Promise<void>;
|
|
78
|
-
/**
|
|
79
|
-
* removes scripting object from child microapp use
|
|
80
|
-
* @param objectId unique id of the scripting object
|
|
81
|
-
*/
|
|
82
|
-
removeScriptingObject(objectId: Extract<keyof AppObjects, string>): void;
|
|
43
|
+
init(this: CMicroAppGuest, options: InitOptions): Promise<void>;
|
|
44
|
+
mount(this: CMicroAppGuest, options?: MountOptions): Promise<void>;
|
|
45
|
+
unmount(this: CMicroAppGuest, options: MountOptions): Promise<JSONValue>;
|
|
46
|
+
getRef<T>(this: CMicroAppGuest): T | null;
|
|
47
|
+
navigate(this: CMicroAppGuest, url: To, state?: any): void;
|
|
83
48
|
}
|
|
84
49
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IMicroAppHost } from '@elliemae/pui-micro-frontend-base';
|
|
2
|
+
/**
|
|
3
|
+
* set the host app reference
|
|
4
|
+
* @param host global host object
|
|
5
|
+
*/
|
|
6
|
+
export declare const setHostApp: (host: IMicroAppHost) => void;
|
|
7
|
+
/**
|
|
8
|
+
* get the reference to host app
|
|
9
|
+
* @returns the global host object
|
|
10
|
+
*/
|
|
11
|
+
export declare const getHostApp: () => IMicroAppHost | null;
|
|
@@ -2,8 +2,7 @@ import { History, To } from 'history';
|
|
|
2
2
|
import { DefaultTheme } from 'styled-components';
|
|
3
3
|
import { IMicroAppHost, ResizeEventHandler, BreakpointChangeEventHandler, SubscriptionListener } from '@elliemae/pui-micro-frontend-base';
|
|
4
4
|
import ssfHost from '@elliemae/em-ssf-host';
|
|
5
|
-
import { BAEvent
|
|
6
|
-
import type { ScriptingObjects, EventListeners, AddScriptingObjectParams, DispatchEventParam, EventOptions } from '@elliemae/microfe-common';
|
|
5
|
+
import { BAEvent } from '@elliemae/pui-scripting-object';
|
|
7
6
|
import { MicroFrontEndLogger } from '../types.js';
|
|
8
7
|
import { Analytics } from './scripting-objects/analytics.js';
|
|
9
8
|
type HostOptions = {
|
|
@@ -23,7 +22,7 @@ type ConstructorParams = {
|
|
|
23
22
|
ssfHostRef?: typeof ssfHost.Host;
|
|
24
23
|
analytics?: Analytics;
|
|
25
24
|
};
|
|
26
|
-
export declare class CMicroAppHost
|
|
25
|
+
export declare class CMicroAppHost implements IMicroAppHost {
|
|
27
26
|
#private;
|
|
28
27
|
private static instance;
|
|
29
28
|
private readonly logger;
|
|
@@ -35,7 +34,7 @@ export declare class CMicroAppHost<AppObjects extends ScriptingObjects = Partial
|
|
|
35
34
|
private readonly throttleRenewSessionTimer;
|
|
36
35
|
scriptingObjects: Record<string, any>;
|
|
37
36
|
private constructor();
|
|
38
|
-
static getInstance(params?: ConstructorParams): CMicroAppHost
|
|
37
|
+
static getInstance(params?: ConstructorParams): CMicroAppHost;
|
|
39
38
|
static isInitialized(): boolean;
|
|
40
39
|
getProps(this: CMicroAppHost): HostOptions;
|
|
41
40
|
getLogger(this: CMicroAppHost): MicroFrontEndLogger;
|
|
@@ -64,21 +63,5 @@ export declare class CMicroAppHost<AppObjects extends ScriptingObjects = Partial
|
|
|
64
63
|
setSystemVersion(version?: string): void;
|
|
65
64
|
sendBAEvent(data: BAEvent): void;
|
|
66
65
|
getObject<T>(name: string): Promise<T>;
|
|
67
|
-
/**
|
|
68
|
-
* add scripting object for child microapp to use
|
|
69
|
-
* @param so - The scripting object to be added.
|
|
70
|
-
* @param params - Optional parameters for adding the scripting object.
|
|
71
|
-
*/
|
|
72
|
-
addScriptingObject<SO extends AppObjects[keyof AppObjects]>(so: SO, params?: AddScriptingObjectParams): void;
|
|
73
|
-
/**
|
|
74
|
-
* dispatch event to child microapp
|
|
75
|
-
* @param {DispatchEventParams<EventId, Params>} params - event parameters
|
|
76
|
-
*/
|
|
77
|
-
dispatchEvent<EventId extends Extract<keyof AppEvents, string>, Params extends Parameters<AppEvents[EventId]>[0]['eventParams'], Options extends EventOptions>(params: DispatchEventParam<EventId, Params, Options>): Promise<void>;
|
|
78
|
-
/**
|
|
79
|
-
* removes scripting object from child microapp use
|
|
80
|
-
* @param objectId unique id of the scripting object
|
|
81
|
-
*/
|
|
82
|
-
removeScriptingObject(objectId: Extract<keyof AppObjects, string>): void;
|
|
83
66
|
}
|
|
84
67
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SubscriptionListener } from '@elliemae/pui-micro-frontend-base';
|
|
2
|
+
export declare class SSFGuestAdapter {
|
|
3
|
+
init(): Promise<boolean>;
|
|
4
|
+
getObject<T>(name: string): Promise<T>;
|
|
5
|
+
subscribe<T>(message: string, func: SubscriptionListener<T>): string | number;
|
|
6
|
+
unsubscribe(token: string, objectId: string, eventName: string): void;
|
|
7
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { InitOptions } from '@elliemae/pui-micro-frontend-base';
|
|
2
|
-
import { Events, ScriptingObjectTypes } from '@elliemae/pui-scripting-object';
|
|
3
2
|
type EnvConfig = {
|
|
4
3
|
files: Array<string>;
|
|
5
4
|
};
|
|
@@ -14,5 +13,5 @@ export type MicroAppConfig = {
|
|
|
14
13
|
development?: EnvConfig;
|
|
15
14
|
production?: EnvConfig;
|
|
16
15
|
documentEle: Document;
|
|
17
|
-
} & InitOptions
|
|
16
|
+
} & InitOptions;
|
|
18
17
|
export {};
|
|
@@ -1,60 +1,4 @@
|
|
|
1
1
|
import { RenderOptions } from '@testing-library/react';
|
|
2
|
-
declare const customRender: (ui: React.ReactElement, options?: Omit<RenderOptions, "queries">) =>
|
|
3
|
-
container: HTMLElement;
|
|
4
|
-
baseElement: HTMLElement;
|
|
5
|
-
debug: (baseElement?: Element | DocumentFragment | Array<Element | DocumentFragment>, maxLength?: number, options?: import("pretty-format").OptionsReceived) => void;
|
|
6
|
-
rerender: (ui: React.ReactNode) => void;
|
|
7
|
-
unmount: () => void;
|
|
8
|
-
asFragment: () => DocumentFragment;
|
|
9
|
-
getByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement;
|
|
10
|
-
getAllByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
11
|
-
queryByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement | null;
|
|
12
|
-
queryAllByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
13
|
-
findByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
14
|
-
findAllByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
15
|
-
getByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
|
|
16
|
-
getAllByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
17
|
-
queryByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
|
|
18
|
-
queryAllByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
19
|
-
findByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
20
|
-
findAllByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
21
|
-
getByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement;
|
|
22
|
-
getAllByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
23
|
-
queryByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement | null;
|
|
24
|
-
queryAllByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
25
|
-
findByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
26
|
-
findAllByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
27
|
-
getByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
|
|
28
|
-
getAllByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
29
|
-
queryByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
|
|
30
|
-
queryAllByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
31
|
-
findByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
32
|
-
findAllByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
33
|
-
getByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
|
|
34
|
-
getAllByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
35
|
-
queryByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
|
|
36
|
-
queryAllByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
37
|
-
findByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
38
|
-
findAllByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
39
|
-
getByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
|
|
40
|
-
getAllByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
41
|
-
queryByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
|
|
42
|
-
queryAllByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
43
|
-
findByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
44
|
-
findAllByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
45
|
-
getByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement;
|
|
46
|
-
getAllByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement[];
|
|
47
|
-
queryByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement | null;
|
|
48
|
-
queryAllByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement[];
|
|
49
|
-
findByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
50
|
-
findAllByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
51
|
-
getByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
|
|
52
|
-
getAllByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
53
|
-
queryByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
|
|
54
|
-
queryAllByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
55
|
-
findByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
56
|
-
findAllByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
57
|
-
user: import("@testing-library/user-event").UserEvent;
|
|
58
|
-
};
|
|
2
|
+
declare const customRender: (ui: React.ReactElement, options?: Omit<RenderOptions, "queries">) => import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries.js"), HTMLElement, HTMLElement>;
|
|
59
3
|
export * from '@testing-library/react';
|
|
60
4
|
export { customRender as render };
|