@elliemae/pui-app-sdk 5.31.0-beta.2 → 5.31.0-beta.3
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/utils/micro-frontend/guest.js +10 -7
- package/dist/cjs/utils/micro-frontend/host.js +11 -7
- package/dist/cjs/view/guest-microapp.js +2 -1
- package/dist/esm/utils/micro-frontend/guest.js +10 -7
- package/dist/esm/utils/micro-frontend/host.js +11 -7
- package/dist/esm/view/guest-microapp.js +2 -1
- package/dist/types/lib/utils/micro-frontend/host.d.ts +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -332,14 +332,17 @@ class CMicroAppGuest {
|
|
|
332
332
|
* @returns {Promise<any[]>} A promise that resolves with the combined results of dispatched events.
|
|
333
333
|
*/
|
|
334
334
|
async dispatchEvent(params) {
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
335
|
+
if (this.#appBridge) {
|
|
336
|
+
const [appBridgeResult, ssfResult] = await Promise.all([
|
|
337
|
+
this.#appBridge.dispatchEvent(params),
|
|
338
|
+
this.#ssfHostRef.dispatchEvent(params)
|
|
339
|
+
]);
|
|
340
|
+
if (Array.isArray(appBridgeResult) && Array.isArray(ssfResult)) {
|
|
341
|
+
return appBridgeResult.concat(ssfResult);
|
|
342
|
+
}
|
|
343
|
+
return Promise.resolve();
|
|
341
344
|
}
|
|
342
|
-
return
|
|
345
|
+
return this.#ssfHostRef.dispatchEvent(params);
|
|
343
346
|
}
|
|
344
347
|
/**
|
|
345
348
|
* removes scripting object from child microapp use
|
|
@@ -221,16 +221,20 @@ class CMicroAppHost {
|
|
|
221
221
|
/**
|
|
222
222
|
* dispatch event to child microapp
|
|
223
223
|
* @param {DispatchEventParams<EventId, Params>} params - event parameters
|
|
224
|
+
* @returns {Promise<any>} A promise that resolves with the combined results of dispatched events.
|
|
224
225
|
*/
|
|
225
226
|
async dispatchEvent(params) {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
227
|
+
if (this.#appBridge) {
|
|
228
|
+
const [appBridgeResult, ssfResult] = await Promise.all([
|
|
229
|
+
this.#appBridge.dispatchEvent(params),
|
|
230
|
+
this.#ssfHostRef.dispatchEvent(params)
|
|
231
|
+
]);
|
|
232
|
+
if (Array.isArray(appBridgeResult) && Array.isArray(ssfResult)) {
|
|
233
|
+
return appBridgeResult.concat(ssfResult);
|
|
234
|
+
}
|
|
235
|
+
return Promise.resolve();
|
|
232
236
|
}
|
|
233
|
-
return
|
|
237
|
+
return this.#ssfHostRef.dispatchEvent(params);
|
|
234
238
|
}
|
|
235
239
|
/**
|
|
236
240
|
* removes scripting object from child microapp use
|
|
@@ -78,6 +78,7 @@ const useAppRenderer = (props) => {
|
|
|
78
78
|
const {
|
|
79
79
|
microappManager = import_types.MicroAppManager.APPSDK,
|
|
80
80
|
hostUrl,
|
|
81
|
+
title,
|
|
81
82
|
name
|
|
82
83
|
} = getConfig();
|
|
83
84
|
if (microappManager === import_types.MicroAppManager.SSF) {
|
|
@@ -89,7 +90,7 @@ const useAppRenderer = (props) => {
|
|
|
89
90
|
const guest = ssfHost.loadGuest({
|
|
90
91
|
id,
|
|
91
92
|
url: hostUrl,
|
|
92
|
-
title: name,
|
|
93
|
+
title: title ?? name,
|
|
93
94
|
targetElement: document.getElementById(containerId),
|
|
94
95
|
searchParams,
|
|
95
96
|
onLoad: onLoadComplete,
|
|
@@ -299,14 +299,17 @@ class CMicroAppGuest {
|
|
|
299
299
|
* @returns {Promise<any[]>} A promise that resolves with the combined results of dispatched events.
|
|
300
300
|
*/
|
|
301
301
|
async dispatchEvent(params) {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
302
|
+
if (this.#appBridge) {
|
|
303
|
+
const [appBridgeResult, ssfResult] = await Promise.all([
|
|
304
|
+
this.#appBridge.dispatchEvent(params),
|
|
305
|
+
this.#ssfHostRef.dispatchEvent(params)
|
|
306
|
+
]);
|
|
307
|
+
if (Array.isArray(appBridgeResult) && Array.isArray(ssfResult)) {
|
|
308
|
+
return appBridgeResult.concat(ssfResult);
|
|
309
|
+
}
|
|
310
|
+
return Promise.resolve();
|
|
308
311
|
}
|
|
309
|
-
return
|
|
312
|
+
return this.#ssfHostRef.dispatchEvent(params);
|
|
310
313
|
}
|
|
311
314
|
/**
|
|
312
315
|
* removes scripting object from child microapp use
|
|
@@ -206,16 +206,20 @@ class CMicroAppHost {
|
|
|
206
206
|
/**
|
|
207
207
|
* dispatch event to child microapp
|
|
208
208
|
* @param {DispatchEventParams<EventId, Params>} params - event parameters
|
|
209
|
+
* @returns {Promise<any>} A promise that resolves with the combined results of dispatched events.
|
|
209
210
|
*/
|
|
210
211
|
async dispatchEvent(params) {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
212
|
+
if (this.#appBridge) {
|
|
213
|
+
const [appBridgeResult, ssfResult] = await Promise.all([
|
|
214
|
+
this.#appBridge.dispatchEvent(params),
|
|
215
|
+
this.#ssfHostRef.dispatchEvent(params)
|
|
216
|
+
]);
|
|
217
|
+
if (Array.isArray(appBridgeResult) && Array.isArray(ssfResult)) {
|
|
218
|
+
return appBridgeResult.concat(ssfResult);
|
|
219
|
+
}
|
|
220
|
+
return Promise.resolve();
|
|
217
221
|
}
|
|
218
|
-
return
|
|
222
|
+
return this.#ssfHostRef.dispatchEvent(params);
|
|
219
223
|
}
|
|
220
224
|
/**
|
|
221
225
|
* removes scripting object from child microapp use
|
|
@@ -48,6 +48,7 @@ const useAppRenderer = (props) => {
|
|
|
48
48
|
const {
|
|
49
49
|
microappManager = MicroAppManager.APPSDK,
|
|
50
50
|
hostUrl,
|
|
51
|
+
title,
|
|
51
52
|
name
|
|
52
53
|
} = getConfig();
|
|
53
54
|
if (microappManager === MicroAppManager.SSF) {
|
|
@@ -59,7 +60,7 @@ const useAppRenderer = (props) => {
|
|
|
59
60
|
const guest = ssfHost.loadGuest({
|
|
60
61
|
id,
|
|
61
62
|
url: hostUrl,
|
|
62
|
-
title: name,
|
|
63
|
+
title: title ?? name,
|
|
63
64
|
targetElement: document.getElementById(containerId),
|
|
64
65
|
searchParams,
|
|
65
66
|
onLoad: onLoadComplete,
|
|
@@ -75,6 +75,7 @@ export declare class CMicroAppHost<AppObjects extends ScriptingObjects = Partial
|
|
|
75
75
|
/**
|
|
76
76
|
* dispatch event to child microapp
|
|
77
77
|
* @param {DispatchEventParams<EventId, Params>} params - event parameters
|
|
78
|
+
* @returns {Promise<any>} A promise that resolves with the combined results of dispatched events.
|
|
78
79
|
*/
|
|
79
80
|
dispatchEvent<EventId extends Extract<keyof AppEvents, string>, Params extends Parameters<AppEvents[EventId]>[0]['eventParams'], Options extends EventOptions>(params: DispatchEventParam<EventId, Params, Options>): Promise<void | any[]>;
|
|
80
81
|
/**
|