@elliemae/pui-app-bridge 2.9.9 → 2.17.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/appBridge.js +380 -93
- package/dist/cjs/appRegistry.js +136 -0
- package/dist/cjs/config/app.js +15 -2
- package/dist/cjs/config/microFE.js +3 -3
- package/dist/cjs/eventManager.js +16 -16
- package/dist/cjs/frame.html +2 -2
- package/dist/cjs/frame.js +39 -14
- package/dist/cjs/index.html +1 -1
- package/dist/cjs/loaders/script.js +5 -5
- package/dist/cjs/loaders/style.js +1 -0
- package/dist/cjs/microfeHost.js +51 -31
- package/dist/cjs/tests/flights/23.1/app.checksum1.js +25 -24
- package/dist/cjs/tests/flights/latest/app.checksum.js +25 -24
- package/dist/cjs/tests/hotels/23.1/app.checksum.js +27 -24
- package/dist/cjs/tests/hotels/latest/app.checksum.js +27 -24
- package/dist/cjs/tests/loan/latest/index.js +49 -57
- package/dist/cjs/tests/scriptingObjects/analytics.js +7 -7
- package/dist/cjs/tests/scriptingObjects/appraisalServiceModule.js +8 -8
- package/dist/cjs/tests/scriptingObjects/global.js +1 -2
- package/dist/cjs/tests/task/latest/index.dev.js +29 -28
- package/dist/cjs/tests/task/latest/index.js +29 -28
- package/dist/cjs/tests/travelhub/23.1/app.checksum.js +24 -26
- package/dist/cjs/tests/travelhub/23.1/landing.checksum1.js +5 -7
- package/dist/cjs/utils.js +31 -1
- package/dist/esm/appBridge.js +390 -95
- package/dist/esm/appRegistry.js +116 -0
- package/dist/esm/config/app.js +15 -2
- package/dist/esm/config/microFE.js +3 -3
- package/dist/esm/eventManager.js +16 -16
- package/dist/esm/frame.html +2 -2
- package/dist/esm/frame.js +29 -14
- package/dist/esm/index.html +1 -1
- package/dist/esm/loaders/script.js +5 -5
- package/dist/esm/loaders/style.js +1 -0
- package/dist/esm/microfeHost.js +55 -31
- package/dist/esm/tests/flights/23.1/app.checksum1.js +25 -24
- package/dist/esm/tests/flights/latest/app.checksum.js +25 -24
- package/dist/esm/tests/hotels/23.1/app.checksum.js +27 -24
- package/dist/esm/tests/hotels/latest/app.checksum.js +27 -24
- package/dist/esm/tests/loan/latest/index.js +49 -57
- package/dist/esm/tests/scriptingObjects/analytics.js +7 -7
- package/dist/esm/tests/scriptingObjects/appraisalServiceModule.js +8 -8
- package/dist/esm/tests/scriptingObjects/global.js +1 -2
- package/dist/esm/tests/task/latest/index.dev.js +29 -28
- package/dist/esm/tests/task/latest/index.js +29 -28
- package/dist/esm/tests/travelhub/23.1/app.checksum.js +24 -26
- package/dist/esm/tests/travelhub/23.1/landing.checksum1.js +5 -7
- package/dist/esm/utils.js +31 -1
- package/dist/public/assets/frame.671d9de68be598da64ca.html +47 -0
- package/dist/public/creditService/latest/creditService.checksum.js.gz +0 -0
- package/dist/public/frame.html +1 -1
- package/dist/public/guest/businessObjects.js.gz +0 -0
- package/dist/public/guest/util.js.gz +0 -0
- package/dist/public/index.html +1 -1
- package/dist/public/init.js.gz +0 -0
- package/dist/public/js/emuiAppBridge.2993b666256d6dd7148d.js +51 -0
- package/dist/public/js/emuiAppBridge.2993b666256d6dd7148d.js.br +0 -0
- package/dist/public/js/emuiAppBridge.2993b666256d6dd7148d.js.gz +0 -0
- package/dist/public/js/emuiAppBridge.2993b666256d6dd7148d.js.map +1 -0
- package/dist/public/loan-object.js +1 -1
- package/dist/public/loan-object.js.br +0 -0
- package/dist/public/loan-object.js.gz +0 -0
- package/dist/public/loan-object.js.map +1 -1
- package/dist/public/loanValidation/latest/loanValidation.checksum.js.gz +0 -0
- package/dist/public/pricingService/latest/pricingService.checksum.js.gz +0 -0
- package/dist/public/utils.js.gz +0 -0
- package/dist/types/lib/appBridge.d.ts +38 -28
- package/dist/types/lib/appRegistry.d.ts +41 -0
- package/dist/types/lib/eventManager.d.ts +4 -4
- package/dist/types/lib/frame.d.ts +45 -4
- package/dist/types/lib/index.d.ts +3 -3
- package/dist/types/lib/loaders/script.d.ts +2 -1
- package/dist/types/lib/microfeHost.d.ts +15 -25
- package/dist/types/lib/tests/flights/23.1/app.checksum1.d.ts +7 -0
- package/dist/types/lib/tests/flights/latest/app.checksum.d.ts +7 -0
- package/dist/types/lib/tests/hotels/23.1/app.checksum.d.ts +7 -0
- package/dist/types/lib/tests/hotels/latest/app.checksum.d.ts +7 -0
- package/dist/types/lib/tests/loan/latest/index.d.ts +11 -0
- package/dist/types/lib/tests/scriptingObjects/analytics.d.ts +3 -3
- package/dist/types/lib/tests/scriptingObjects/appraisalServiceModule.d.ts +2 -1
- package/dist/types/lib/tests/task/latest/index.d.ts +10 -0
- package/dist/types/lib/tests/task/latest/index.dev.d.ts +10 -0
- package/dist/types/lib/tests/travelhub/23.1/app.checksum.d.ts +7 -0
- package/dist/types/lib/tests/travelhub/23.1/landing.checksum1.d.ts +2 -0
- package/dist/types/lib/typings/appInfo.d.ts +1 -0
- package/dist/types/lib/typings/common.d.ts +0 -66
- package/dist/types/lib/typings/guest.d.ts +10 -3
- package/dist/types/lib/typings/host.d.ts +32 -32
- package/dist/types/lib/typings/window.d.ts +6 -1
- package/dist/types/lib/utils.d.ts +7 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/umd/671d9de68be598da64ca.html +47 -0
- package/dist/umd/creditService/latest/creditService.checksum.js.gz +0 -0
- package/dist/umd/frame.html +1 -1
- package/dist/umd/guest/businessObjects.js.gz +0 -0
- package/dist/umd/guest/util.js.gz +0 -0
- package/dist/umd/index.html +1 -1
- package/dist/umd/index.js +35 -9
- package/dist/umd/index.js.br +0 -0
- package/dist/umd/index.js.gz +0 -0
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/init.js.gz +0 -0
- package/dist/umd/loan-object.js +1 -1
- package/dist/umd/loan-object.js.br +0 -0
- package/dist/umd/loan-object.js.gz +0 -0
- package/dist/umd/loan-object.js.map +1 -1
- package/dist/umd/loanValidation/latest/loanValidation.checksum.js.gz +0 -0
- package/dist/umd/pricingService/latest/pricingService.checksum.js.gz +0 -0
- package/dist/umd/utils.js.gz +0 -0
- package/package.json +9 -12
- package/dist/public/js/emuiAppBridge.530390c3bb03f32357f7.js +0 -25
- package/dist/public/js/emuiAppBridge.530390c3bb03f32357f7.js.br +0 -0
- package/dist/public/js/emuiAppBridge.530390c3bb03f32357f7.js.gz +0 -0
- package/dist/public/js/emuiAppBridge.530390c3bb03f32357f7.js.map +0 -1
- package/dist/types/lib/tests/pubsubAPI.test.d.ts +0 -1
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import { History } from 'history';
|
|
2
2
|
import { DefaultTheme } from 'styled-components';
|
|
3
3
|
import { ScriptingObjectTypes, Events } from '@elliemae/pui-scripting-object';
|
|
4
|
-
import type { EventListeners } from '@elliemae/microfe-common';
|
|
5
|
-
import { ScriptingObjects, SubscribeParam, UnsubscribeParam } from './common.js';
|
|
4
|
+
import type { EventListeners, ScriptingObjects, SubscribeParam, UnsubscribeParam } from '@elliemae/microfe-common';
|
|
6
5
|
import { FrameOptions } from '../frame.js';
|
|
7
|
-
/**
|
|
8
|
-
* event listner callback function
|
|
9
|
-
* @typeParam T - type of the data
|
|
10
|
-
* @param message - message
|
|
11
|
-
* @param data - data
|
|
12
|
-
*/
|
|
13
|
-
export type SubscriptionListener<T> = (message: string, data?: T) => void;
|
|
14
6
|
export type AppWindowSize = {
|
|
15
7
|
appId: string;
|
|
16
8
|
size: {
|
|
@@ -22,11 +14,34 @@ export type AppWindowSize = {
|
|
|
22
14
|
* Parameters to open a guest application
|
|
23
15
|
*/
|
|
24
16
|
export type OpenAppParams = {
|
|
17
|
+
/**
|
|
18
|
+
* Unique identifier for the application
|
|
19
|
+
* This should be a globally unique identifier to avoid conflicts
|
|
20
|
+
* across different applications in the micro frontend ecosystem.
|
|
21
|
+
*/
|
|
25
22
|
id: string;
|
|
23
|
+
/**
|
|
24
|
+
* iframe options for the application
|
|
25
|
+
*/
|
|
26
26
|
frameOptions?: Partial<FrameOptions>;
|
|
27
|
+
/**
|
|
28
|
+
* browser history object to use for navigation
|
|
29
|
+
*/
|
|
27
30
|
history?: History;
|
|
31
|
+
/**
|
|
32
|
+
* ui theme for the application
|
|
33
|
+
*/
|
|
28
34
|
theme?: DefaultTheme;
|
|
29
|
-
|
|
35
|
+
/**
|
|
36
|
+
* home route for the application
|
|
37
|
+
*/
|
|
38
|
+
homeRoute?: string;
|
|
39
|
+
/**
|
|
40
|
+
* default route to navigate to when the application is opened.
|
|
41
|
+
* by default it is the home route defined by the application.
|
|
42
|
+
* This setting is useful only when the application doesn't share parent history
|
|
43
|
+
*/
|
|
44
|
+
initialRoute?: string;
|
|
30
45
|
};
|
|
31
46
|
/**
|
|
32
47
|
* Interface to connect and communicate with parent host
|
|
@@ -38,41 +53,26 @@ export interface IMicroFEHost<AppObjects extends ScriptingObjects = Partial<Scri
|
|
|
38
53
|
* application release version
|
|
39
54
|
*/
|
|
40
55
|
version: string;
|
|
41
|
-
/**
|
|
42
|
-
* add listener to the scripting object event
|
|
43
|
-
* @param {SubscribeParam<EventId, EventType>} params - parameters to add event listener
|
|
44
|
-
* @returns subscription id
|
|
45
|
-
*/
|
|
46
|
-
addEventListener: <EventId extends Extract<keyof AppEvents, string>>(params: SubscribeParam<EventId, AppEvents[EventId]>) => string;
|
|
47
56
|
/**
|
|
48
57
|
* Get reference to the scripting object (or proxy) by name
|
|
49
58
|
* @param name unique name of the scripting object
|
|
50
59
|
* @returns scripting object reference
|
|
51
60
|
*/
|
|
52
61
|
getObject<ObjectId extends Extract<keyof AppObjects, string>>(objectId: ObjectId): Promise<AppObjects[ObjectId] | null>;
|
|
53
|
-
/**
|
|
54
|
-
* removes listener from the scripting object event
|
|
55
|
-
* @param {UnsubscribeParam<EventId>} params - parameters to remove event listener
|
|
56
|
-
*/
|
|
57
|
-
removeEventListener: <EventId extends Extract<keyof AppEvents, string>>(params: UnsubscribeParam<EventId>) => void;
|
|
58
62
|
/**
|
|
59
63
|
* set the size of the guest application iframe window
|
|
60
64
|
* @param {AppWindowSize} appSize window size of the application
|
|
61
65
|
*/
|
|
62
66
|
setAppWindowSize(appSize: AppWindowSize): void;
|
|
63
67
|
/**
|
|
64
|
-
*
|
|
65
|
-
* @
|
|
66
|
-
* @
|
|
67
|
-
* @param listener callback function to be called when the event is fired
|
|
68
|
-
* @returns token to be used to unsubscribe
|
|
68
|
+
* add listener to the scripting object event
|
|
69
|
+
* @param {SubscribeParam<EventId, EventType>} params - parameters to add event listener
|
|
70
|
+
* @returns subscription id
|
|
69
71
|
*/
|
|
70
|
-
subscribe
|
|
72
|
+
subscribe: <EventId extends Extract<keyof AppEvents, string>>(params: SubscribeParam<EventId, AppEvents[EventId]>) => string;
|
|
71
73
|
/**
|
|
72
|
-
*
|
|
73
|
-
* @
|
|
74
|
-
* @param token unique token returned by subscribe
|
|
75
|
-
* @param eventId unique id of the event. The format is [scripting object name].[event name]
|
|
74
|
+
* removes listener from the scripting object event
|
|
75
|
+
* @param {UnsubscribeParam<EventId>} params - parameters to remove event listener
|
|
76
76
|
*/
|
|
77
|
-
unsubscribe
|
|
77
|
+
unsubscribe: <EventId extends Extract<keyof AppEvents, string>>(params: UnsubscribeParam<EventId>) => void;
|
|
78
78
|
}
|
|
@@ -3,7 +3,7 @@ import { Logger } from '@elliemae/pui-diagnostics';
|
|
|
3
3
|
import { IMicroFEGuest } from './guest.js';
|
|
4
4
|
import { IMicroFEHost } from './host.js';
|
|
5
5
|
export type EMUI = {
|
|
6
|
-
[key: string]: Omit<IMicroFEGuest, 'guestWindow'
|
|
6
|
+
[key: string]: Omit<IMicroFEGuest, 'guestWindow'> | Omit<IMicroFEGuest, 'guestWindow'>[];
|
|
7
7
|
} & {
|
|
8
8
|
_BASE_PATH: string;
|
|
9
9
|
_ASSET_PATH: string;
|
|
@@ -11,6 +11,11 @@ export type EMUI = {
|
|
|
11
11
|
MicroAppHost?: IMicroFEHost;
|
|
12
12
|
logger?: Logger;
|
|
13
13
|
appId?: string;
|
|
14
|
+
registerApp?: (options: {
|
|
15
|
+
appId: string;
|
|
16
|
+
app: IMicroFEGuest;
|
|
17
|
+
}) => void;
|
|
18
|
+
unregisterApp?: (instanceId: string) => void;
|
|
14
19
|
};
|
|
15
20
|
declare global {
|
|
16
21
|
interface Window {
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
+
import { IApplication } from '@elliemae/pui-scripting-object';
|
|
2
|
+
import { Logger } from '@elliemae/pui-diagnostics';
|
|
1
3
|
export declare const removeDoubleSlash: (url: string) => string;
|
|
2
4
|
export declare const getAbsoluteUrl: (url: string) => string;
|
|
3
5
|
export declare const appendTrailingSlash: (url: string) => string;
|
|
6
|
+
export declare const appendPath: (base: string, path: string) => string;
|
|
4
7
|
export declare const isJSDOM: () => boolean;
|
|
8
|
+
export declare const startKeepSessionAlive: ({ appObj, logger, }: {
|
|
9
|
+
appObj: IApplication;
|
|
10
|
+
logger: Logger;
|
|
11
|
+
}) => void;
|