@elliemae/pui-app-sdk 5.21.2 → 5.22.0-beta.2
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 +2 -1
- package/dist/cjs/index.js +3 -0
- package/dist/cjs/utils/decorators/functionDecorators.js +1 -6
- package/dist/cjs/utils/micro-frontend/app-bridge.js +38 -0
- package/dist/cjs/utils/micro-frontend/guest.js +101 -14
- package/dist/cjs/utils/micro-frontend/host.js +36 -3
- package/dist/cjs/utils/micro-frontend/scripting-objects/analytics.js +8 -14
- package/dist/cjs/utils/micro-frontend/tests/app.config.json +200 -0
- package/dist/cjs/utils/micro-frontend/tests/utils.js +116 -0
- package/dist/cjs/utils/testing/index.js +15 -1
- package/dist/cjs/view/guest-microapp.js +126 -0
- package/dist/cjs/view/micro-iframe-app/iframe/index.js +1 -1
- package/dist/cjs/view/micro-iframe-app/iframe.html +5 -1
- package/dist/cjs/view/micro-iframe-app/use-frame-loaded.js +3 -1
- package/dist/cjs/view/tests/__snapshots__/guest-microapp.test.tsx.snap +21 -0
- package/dist/cjs/view/tests/__snapshots__/micro-iframe-app.test.tsx.snap +208 -0
- package/dist/cjs/view/tests/app.config.json +200 -0
- package/dist/cjs/view/tests/constants.js +44 -0
- package/dist/cjs/view/tests/flights/23.1/app.checksum1.css +3 -0
- package/dist/cjs/view/tests/flights/23.1/app.checksum1.js +52 -0
- package/dist/cjs/view/tests/flights/23.1/manifest.json +4 -0
- package/dist/cjs/view/tests/flights/latest/app.checksum.css +3 -0
- package/dist/cjs/view/tests/flights/latest/app.checksum.js +52 -0
- package/dist/cjs/view/tests/flights/latest/manifest.json +4 -0
- package/dist/cjs/view/tests/hotels/23.1/app.checksum.css +3 -0
- package/dist/cjs/view/tests/hotels/23.1/app.checksum.js +52 -0
- package/dist/cjs/view/tests/hotels/23.1/manifest.json +4 -0
- package/dist/cjs/view/tests/hotels/latest/app.checksum.css +3 -0
- package/dist/cjs/view/tests/hotels/latest/app.checksum.js +52 -0
- package/dist/cjs/view/tests/hotels/latest/manifest.json +4 -0
- package/dist/cjs/view/tests/loan/latest/index.js +116 -0
- package/dist/cjs/view/tests/loan/latest/manifest.json +3 -0
- package/dist/cjs/view/tests/scriptingObjects/appraisalServiceModule.js +81 -0
- package/dist/cjs/{utils/micro-frontend/host-app.js → view/tests/scriptingObjects/constant.js} +5 -10
- package/dist/cjs/view/tests/scriptingObjects/global.js +40 -0
- package/dist/cjs/view/tests/scriptingObjects/loan.js +200 -0
- package/dist/cjs/view/tests/server.js +29 -0
- package/dist/cjs/view/tests/serverHandlers.js +210 -0
- package/dist/cjs/view/tests/task/latest/index.dev.js +67 -0
- package/dist/cjs/view/tests/task/latest/index.js +67 -0
- package/dist/cjs/view/tests/task/latest/manifest.json +4 -0
- package/dist/cjs/view/tests/travelhub/23.1/app.checksum.css +3 -0
- package/dist/cjs/view/tests/travelhub/23.1/app.checksum.js +25 -0
- package/dist/cjs/view/tests/travelhub/23.1/landing.checksum1.css +3 -0
- package/dist/cjs/view/tests/travelhub/23.1/landing.checksum1.js +6 -0
- package/dist/cjs/view/tests/travelhub/23.1/manifest.json +6 -0
- package/dist/cjs/view/tests/travelhub/latest/app.checksum.css +3 -0
- package/dist/cjs/view/tests/travelhub/latest/app.checksum.js +30 -0
- package/dist/cjs/view/tests/travelhub/latest/landing.checksum.css +3 -0
- package/dist/cjs/view/tests/travelhub/latest/landing.checksum.js +8 -0
- package/dist/cjs/view/tests/travelhub/latest/manifest.json +6 -0
- package/dist/cjs/{utils/micro-frontend/ssfguest-adapter.js → view/tests/utils.js} +34 -29
- package/dist/esm/analytics/index.js +2 -1
- package/dist/esm/index.js +7 -1
- package/dist/esm/utils/decorators/functionDecorators.js +1 -6
- package/dist/esm/utils/micro-frontend/app-bridge.js +18 -0
- package/dist/esm/utils/micro-frontend/guest.js +101 -14
- package/dist/esm/utils/micro-frontend/host.js +36 -3
- package/dist/esm/utils/micro-frontend/scripting-objects/analytics.js +8 -4
- package/dist/esm/utils/micro-frontend/tests/app.config.json +200 -0
- package/dist/esm/utils/micro-frontend/tests/utils.js +96 -0
- package/dist/esm/utils/testing/index.js +5 -1
- package/dist/esm/view/guest-microapp.js +96 -0
- package/dist/esm/view/micro-iframe-app/iframe/index.js +1 -1
- package/dist/esm/view/micro-iframe-app/iframe.html +5 -1
- package/dist/esm/view/micro-iframe-app/use-frame-loaded.js +3 -1
- package/dist/esm/view/tests/__snapshots__/guest-microapp.test.tsx.snap +21 -0
- package/dist/esm/view/tests/__snapshots__/micro-iframe-app.test.tsx.snap +208 -0
- package/dist/esm/view/tests/app.config.json +200 -0
- package/dist/esm/view/tests/constants.js +24 -0
- package/dist/esm/view/tests/flights/23.1/app.checksum1.css +3 -0
- package/dist/esm/view/tests/flights/23.1/app.checksum1.js +51 -0
- package/dist/esm/view/tests/flights/23.1/manifest.json +4 -0
- package/dist/esm/view/tests/flights/latest/app.checksum.css +3 -0
- package/dist/esm/view/tests/flights/latest/app.checksum.js +51 -0
- package/dist/esm/view/tests/flights/latest/manifest.json +4 -0
- package/dist/esm/view/tests/hotels/23.1/app.checksum.css +3 -0
- package/dist/esm/view/tests/hotels/23.1/app.checksum.js +51 -0
- package/dist/esm/view/tests/hotels/23.1/manifest.json +4 -0
- package/dist/esm/view/tests/hotels/latest/app.checksum.css +3 -0
- package/dist/esm/view/tests/hotels/latest/app.checksum.js +51 -0
- package/dist/esm/view/tests/hotels/latest/manifest.json +4 -0
- package/dist/esm/view/tests/loan/latest/index.js +115 -0
- package/dist/esm/view/tests/loan/latest/manifest.json +3 -0
- package/dist/esm/view/tests/scriptingObjects/appraisalServiceModule.js +63 -0
- package/dist/esm/view/tests/scriptingObjects/constant.js +4 -0
- package/dist/esm/view/tests/scriptingObjects/global.js +22 -0
- package/dist/esm/view/tests/scriptingObjects/loan.js +180 -0
- package/dist/esm/view/tests/server.js +9 -0
- package/dist/esm/view/tests/serverHandlers.js +180 -0
- package/dist/esm/view/tests/task/latest/index.dev.js +66 -0
- package/dist/esm/view/tests/task/latest/index.js +66 -0
- package/dist/esm/view/tests/task/latest/manifest.json +4 -0
- package/dist/esm/view/tests/travelhub/23.1/app.checksum.css +3 -0
- package/dist/esm/view/tests/travelhub/23.1/app.checksum.js +24 -0
- package/dist/esm/view/tests/travelhub/23.1/landing.checksum1.css +3 -0
- package/dist/esm/view/tests/travelhub/23.1/landing.checksum1.js +5 -0
- package/dist/esm/view/tests/travelhub/23.1/manifest.json +6 -0
- package/dist/esm/view/tests/travelhub/latest/app.checksum.css +3 -0
- package/dist/esm/view/tests/travelhub/latest/app.checksum.js +29 -0
- package/dist/esm/view/tests/travelhub/latest/landing.checksum.css +3 -0
- package/dist/esm/view/tests/travelhub/latest/landing.checksum.js +7 -0
- package/dist/esm/view/tests/travelhub/latest/manifest.json +6 -0
- package/dist/esm/view/tests/utils.js +33 -0
- package/dist/types/lib/index.d.ts +2 -1
- package/dist/types/lib/utils/micro-frontend/app-bridge.d.ts +4 -0
- package/dist/types/lib/utils/micro-frontend/guest.d.ts +46 -11
- package/dist/types/lib/utils/micro-frontend/host.d.ts +27 -10
- package/dist/types/lib/utils/micro-frontend/scripting-objects/analytics.d.ts +8 -5
- package/dist/types/lib/utils/micro-frontend/tests/utils.d.ts +39 -0
- package/dist/types/lib/utils/micro-frontend/types.d.ts +2 -1
- package/dist/types/lib/utils/testing/index.d.ts +57 -1
- package/dist/types/lib/utils/window.d.ts +13 -6
- package/dist/types/lib/view/guest-microapp.d.ts +13 -0
- package/dist/types/lib/view/micro-app/index.d.ts +5 -0
- package/dist/types/lib/view/micro-iframe-app/index.d.ts +5 -0
- package/dist/types/lib/view/tests/constants.d.ts +11 -0
- package/dist/types/lib/view/tests/flights/23.1/app.checksum1.d.ts +7 -0
- package/dist/types/lib/view/tests/flights/latest/app.checksum.d.ts +7 -0
- package/dist/types/lib/view/tests/hotels/23.1/app.checksum.d.ts +7 -0
- package/dist/types/lib/view/tests/hotels/latest/app.checksum.d.ts +7 -0
- package/dist/types/lib/view/tests/loan/latest/index.d.ts +11 -0
- package/dist/types/lib/view/tests/micro-iframe-app.test.d.ts +1 -0
- package/dist/types/lib/view/tests/scriptingObjects/appraisalServiceModule.d.ts +36 -0
- package/dist/types/lib/view/tests/scriptingObjects/constant.d.ts +1 -0
- package/dist/types/lib/view/tests/scriptingObjects/global.d.ts +9 -0
- package/dist/types/lib/view/tests/scriptingObjects/loan.d.ts +31 -0
- package/dist/types/lib/view/tests/server.d.ts +1 -0
- package/dist/types/lib/view/tests/serverHandlers.d.ts +5 -0
- package/dist/types/lib/view/tests/task/latest/index.d.ts +10 -0
- package/dist/types/lib/view/tests/task/latest/index.dev.d.ts +10 -0
- package/dist/types/lib/view/tests/travelhub/23.1/app.checksum.d.ts +7 -0
- package/dist/types/lib/view/tests/travelhub/23.1/landing.checksum1.d.ts +2 -0
- 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 +7 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +44 -44
- package/dist/esm/utils/micro-frontend/host-app.js +0 -9
- package/dist/esm/utils/micro-frontend/ssfguest-adapter.js +0 -28
- package/dist/types/lib/utils/micro-frontend/host-app.d.ts +0 -11
- package/dist/types/lib/utils/micro-frontend/ssfguest-adapter.d.ts +0 -7
- /package/dist/types/lib/{utils/micro-frontend/tests/guest-ssf-host.test.d.ts → view/tests/guest-microapp.test.d.ts} +0 -0
|
@@ -29,7 +29,7 @@ export { SessionTimeout } from './view/session-timeout/index.js';
|
|
|
29
29
|
export { subscribeToSessionExpiryWarning, subscribeToSessionExpiry, subscribeToResetSession, resetUserIdleTime, trackActivity, } from './utils/session.js';
|
|
30
30
|
export { waitMessage as waitMessageAction } from './data/wait-message/actions.js';
|
|
31
31
|
export { initServiceWorker } from './utils/service-worker.js';
|
|
32
|
-
export { CMicroAppGuest } from './utils/micro-frontend/guest.js';
|
|
32
|
+
export { CMicroAppGuest, CMicroAppGuest as CMicroApp, } from './utils/micro-frontend/guest.js';
|
|
33
33
|
export { CMicroAppHost } from './utils/micro-frontend/host.js';
|
|
34
34
|
export { enableReactAppForHostIntegration } from './utils/app-host-integration/react.js';
|
|
35
35
|
export { getAppConfigValue, setAppConfigValue, setAppConfig, } from './utils/app-config/config.js';
|
|
@@ -81,6 +81,7 @@ 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 { GuestMicroApp } from './view/guest-microapp.js';
|
|
84
85
|
export { MicroIFrameApp } from './view/micro-iframe-app/index.js';
|
|
85
86
|
export { getNavigationLinks } from './view/micro-app/utils.js';
|
|
86
87
|
export { getStore } from './data/store.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CAppBridge } from '@elliemae/pui-app-bridge';
|
|
2
|
+
import { ScriptingObjectTypes, Events } from '@elliemae/pui-scripting-object';
|
|
3
|
+
import type { ScriptingObjects, EventListeners } from '@elliemae/microfe-common';
|
|
4
|
+
export declare const getAppBridge: <AppObjects extends ScriptingObjects = Partial<ScriptingObjectTypes>, AppEvents extends EventListeners = Events>() => Promise<CAppBridge<Partial<ScriptingObjectTypes>, Events>>;
|
|
@@ -1,8 +1,12 @@
|
|
|
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';
|
|
4
8
|
import { JSONValue, MicroFrontEndLogger } from '../types.js';
|
|
5
|
-
export interface GuestProps extends InitOptions {
|
|
9
|
+
export interface GuestProps<AppObjects extends ScriptingObjects = Partial<ScriptingObjectTypes>, AppEvents extends EventListeners = Events> extends InitOptions<AppObjects, AppEvents> {
|
|
6
10
|
prevState: JSONValue | null;
|
|
7
11
|
history: History;
|
|
8
12
|
theme: DefaultTheme;
|
|
@@ -19,7 +23,7 @@ interface ConstructorParams {
|
|
|
19
23
|
onGetRef?: OnGetRefCallback;
|
|
20
24
|
history?: History;
|
|
21
25
|
}
|
|
22
|
-
export declare class CMicroAppGuest implements IMicroAppGuest {
|
|
26
|
+
export declare class CMicroAppGuest<AppObjects extends ScriptingObjects = Partial<ScriptingObjectTypes>, AppEvents extends EventListeners = Events> implements IMicroAppGuest<AppObjects, AppEvents> {
|
|
23
27
|
#private;
|
|
24
28
|
private static instance;
|
|
25
29
|
private readonly logger;
|
|
@@ -31,19 +35,50 @@ export declare class CMicroAppGuest implements IMicroAppGuest {
|
|
|
31
35
|
private readonly onUnmount?;
|
|
32
36
|
private readonly onGetRef?;
|
|
33
37
|
private constructor();
|
|
34
|
-
static getInstance(params?: ConstructorParams): CMicroAppGuest
|
|
38
|
+
static getInstance<AppObjects extends ScriptingObjects = Partial<ScriptingObjectTypes>, AppEvents extends EventListeners = Events>(params?: ConstructorParams): CMicroAppGuest<AppObjects, AppEvents>;
|
|
35
39
|
static isInitialized(): boolean;
|
|
36
40
|
static isHosted(): boolean;
|
|
37
|
-
getHost(): IMicroAppHost | undefined;
|
|
41
|
+
getHost(): IMicroAppHost<Partial<ScriptingObjectTypes>, Events> | IMicroFEHost<Partial<ScriptingObjectTypes>, Events> | SSFGuest<Partial<ScriptingObjectTypes>, Events> | undefined;
|
|
38
42
|
getLogger(): MicroFrontEndLogger;
|
|
39
|
-
|
|
43
|
+
getObject<ObjectId extends Extract<keyof AppObjects, string>>(objectId: ObjectId): Promise<AppObjects[ObjectId] | null>;
|
|
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>;
|
|
40
59
|
private getSessionStorageItem;
|
|
41
|
-
private
|
|
60
|
+
private findHost;
|
|
42
61
|
get uuid(): string;
|
|
43
|
-
init(
|
|
44
|
-
mount(
|
|
45
|
-
unmount(
|
|
46
|
-
getRef<T>(
|
|
47
|
-
navigate(
|
|
62
|
+
init(options: InitOptions<AppObjects, AppEvents>): Promise<void>;
|
|
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;
|
|
48
83
|
}
|
|
49
84
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
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
|
-
import
|
|
5
|
-
import { BAEvent } from '@elliemae/pui-scripting-object';
|
|
4
|
+
import { SSFHost } from '@elliemae/ssf-host';
|
|
5
|
+
import { BAEvent, ScriptingObjectTypes, Events } from '@elliemae/pui-scripting-object';
|
|
6
|
+
import type { ScriptingObjects, EventListeners, AddScriptingObjectParams, DispatchEventParam, EventOptions } from '@elliemae/microfe-common';
|
|
6
7
|
import { MicroFrontEndLogger } from '../types.js';
|
|
7
8
|
import { Analytics } from './scripting-objects/analytics.js';
|
|
8
9
|
type HostOptions = {
|
|
@@ -19,10 +20,10 @@ type ConstructorParams = {
|
|
|
19
20
|
scriptingObjects?: Record<string, any>;
|
|
20
21
|
onRenewSessionTimer?: () => void;
|
|
21
22
|
onInit?: OnInitCallback;
|
|
22
|
-
ssfHostRef?:
|
|
23
|
+
ssfHostRef?: SSFHost<ScriptingObjectTypes, Events> | null;
|
|
23
24
|
analytics?: Analytics;
|
|
24
25
|
};
|
|
25
|
-
export declare class CMicroAppHost implements IMicroAppHost {
|
|
26
|
+
export declare class CMicroAppHost<AppObjects extends ScriptingObjects = Partial<ScriptingObjectTypes>, AppEvents extends EventListeners = Events> implements IMicroAppHost<AppObjects, AppEvents> {
|
|
26
27
|
#private;
|
|
27
28
|
private static instance;
|
|
28
29
|
private readonly logger;
|
|
@@ -34,25 +35,25 @@ export declare class CMicroAppHost implements IMicroAppHost {
|
|
|
34
35
|
private readonly throttleRenewSessionTimer;
|
|
35
36
|
scriptingObjects: Record<string, any>;
|
|
36
37
|
private constructor();
|
|
37
|
-
static getInstance(params?: ConstructorParams): CMicroAppHost
|
|
38
|
+
static getInstance<AppObjects extends ScriptingObjects = Partial<ScriptingObjectTypes>, AppEvents extends EventListeners = Events>(params?: ConstructorParams): CMicroAppHost<AppObjects, AppEvents>;
|
|
38
39
|
static isInitialized(): boolean;
|
|
39
|
-
getProps(
|
|
40
|
-
getLogger(
|
|
40
|
+
getProps(): HostOptions;
|
|
41
|
+
getLogger(): MicroFrontEndLogger;
|
|
41
42
|
getItem(key: string): string | null;
|
|
42
43
|
setItem(key: string, value: string): void;
|
|
43
|
-
getGuests(
|
|
44
|
+
getGuests(): Record<string, unknown>;
|
|
44
45
|
getGuest<T>(id: string): T | null;
|
|
45
46
|
publish<Type>(message: string | symbol, data?: Type): boolean;
|
|
46
47
|
subscribe<T>(message: string | symbol, func: SubscriptionListener<T>): string;
|
|
47
48
|
unsubscribe(token: string): void;
|
|
48
|
-
navigate(
|
|
49
|
+
navigate(url: To, state?: any): void;
|
|
49
50
|
openWaitMessage(): void;
|
|
50
51
|
closeWaitMessage(): void;
|
|
51
52
|
openErrorBanner(message: string): void;
|
|
52
53
|
getAuthToken(): string;
|
|
53
54
|
renewAuthToken(): string;
|
|
54
55
|
logout(): void;
|
|
55
|
-
renewSessionTimer(
|
|
56
|
+
renewSessionTimer(): Promise<void>;
|
|
56
57
|
getBreakpoint(): keyof import("@elliemae/pui-theme").BreakPoints;
|
|
57
58
|
getViewportSize(): {
|
|
58
59
|
width: number;
|
|
@@ -63,5 +64,21 @@ export declare class CMicroAppHost implements IMicroAppHost {
|
|
|
63
64
|
setSystemVersion(version?: string): void;
|
|
64
65
|
sendBAEvent(data: BAEvent): void;
|
|
65
66
|
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;
|
|
66
83
|
}
|
|
67
84
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { IAnalytics, BAEvent, TimingOptions } from '@elliemae/pui-scripting-object';
|
|
1
|
+
import { ScriptingObject } from '@elliemae/ssf-host';
|
|
2
|
+
import { IAnalytics, BAEvent, TimingOptions, PerfMark } from '@elliemae/pui-scripting-object';
|
|
3
3
|
import { MicroFrontEndLogger } from '../../types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Analytics constructor parameters
|
|
@@ -19,7 +19,7 @@ type AnalyticsParams = {
|
|
|
19
19
|
/**
|
|
20
20
|
* Analytics scripting object
|
|
21
21
|
*/
|
|
22
|
-
export declare class Analytics extends
|
|
22
|
+
export declare class Analytics extends ScriptingObject implements IAnalytics {
|
|
23
23
|
#private;
|
|
24
24
|
/**
|
|
25
25
|
* Creates new instance of Analytics scripting object
|
|
@@ -38,7 +38,10 @@ export declare class Analytics extends ssfHost.ScriptingObject implements IAnaly
|
|
|
38
38
|
* @param options additional details related to the measurement
|
|
39
39
|
* @returns a promise that resolves to a PerformanceMeasure object
|
|
40
40
|
*/
|
|
41
|
-
startTiming: (name: string, options: TimingOptions) => Promise<
|
|
41
|
+
startTiming: (name: string, options: TimingOptions) => Promise<{
|
|
42
|
+
name: string;
|
|
43
|
+
startTime: number;
|
|
44
|
+
}>;
|
|
42
45
|
/**
|
|
43
46
|
* end timing measure
|
|
44
47
|
* @param start name used to start timing measure or return value of the startTiming method
|
|
@@ -56,6 +59,6 @@ export declare class Analytics extends ssfHost.ScriptingObject implements IAnaly
|
|
|
56
59
|
* await analytics.endTiming('LongTask', { appId: 'loanApp', appUrl: 'https://loanApp.com' });
|
|
57
60
|
* ```
|
|
58
61
|
*/
|
|
59
|
-
endTiming: (start: string |
|
|
62
|
+
endTiming: (start: string | PerfMark, options: TimingOptions) => Promise<void>;
|
|
60
63
|
}
|
|
61
64
|
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type SSFMessage = {
|
|
2
|
+
data: {
|
|
3
|
+
requestId: number;
|
|
4
|
+
type: string;
|
|
5
|
+
body: {
|
|
6
|
+
eventFeedback: boolean;
|
|
7
|
+
objectId: string;
|
|
8
|
+
functionName: string;
|
|
9
|
+
functionParams?: Array<unknown>;
|
|
10
|
+
};
|
|
11
|
+
source: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
type PostMessageOptions = {
|
|
15
|
+
srcWindow: Window;
|
|
16
|
+
targetWindow: Window;
|
|
17
|
+
message: any;
|
|
18
|
+
};
|
|
19
|
+
export declare const applicationScriptingObject: {
|
|
20
|
+
object: {
|
|
21
|
+
events: never[];
|
|
22
|
+
functions: string[];
|
|
23
|
+
objectId: string;
|
|
24
|
+
objectType: string;
|
|
25
|
+
};
|
|
26
|
+
type: string;
|
|
27
|
+
};
|
|
28
|
+
export declare const authScriptingObject: {
|
|
29
|
+
object: {
|
|
30
|
+
events: never[];
|
|
31
|
+
functions: string[];
|
|
32
|
+
objectId: string;
|
|
33
|
+
objectType: string;
|
|
34
|
+
};
|
|
35
|
+
type: string;
|
|
36
|
+
};
|
|
37
|
+
export declare const postMessage: ({ srcWindow, targetWindow, message, }: PostMessageOptions) => void;
|
|
38
|
+
export declare const setupHost: (hostWindow: Window) => () => void;
|
|
39
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { InitOptions } from '@elliemae/pui-micro-frontend-base';
|
|
2
|
+
import { Events, ScriptingObjectTypes } from '@elliemae/pui-scripting-object';
|
|
2
3
|
type EnvConfig = {
|
|
3
4
|
files: Array<string>;
|
|
4
5
|
};
|
|
@@ -13,5 +14,5 @@ export type MicroAppConfig = {
|
|
|
13
14
|
development?: EnvConfig;
|
|
14
15
|
production?: EnvConfig;
|
|
15
16
|
documentEle: Document;
|
|
16
|
-
} & InitOptions
|
|
17
|
+
} & InitOptions<Partial<ScriptingObjectTypes>, Events>;
|
|
17
18
|
export {};
|
|
@@ -1,4 +1,60 @@
|
|
|
1
1
|
import { RenderOptions } from '@testing-library/react';
|
|
2
|
-
declare const customRender: (ui: React.ReactElement, options?: Omit<RenderOptions, "queries">) =>
|
|
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
|
+
};
|
|
3
59
|
export * from '@testing-library/react';
|
|
4
60
|
export { customRender as render };
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { IMicroAppGuest, IMicroAppHost, BAEvent } from '@elliemae/pui-micro-frontend-base';
|
|
2
|
+
import { ScriptingObjectTypes, Events } from '@elliemae/pui-scripting-object';
|
|
3
|
+
import { ScriptingObjects, EventListeners } from '@elliemae/microfe-common';
|
|
4
|
+
import { SSFGuest } from '@elliemae/ssf-guest';
|
|
2
5
|
import { BreakPoint } from '@elliemae/pui-theme';
|
|
3
6
|
import { Logger } from '@elliemae/pui-diagnostics';
|
|
7
|
+
import { IMicroFEHost } from '@elliemae/pui-app-bridge';
|
|
4
8
|
import { LoginParams } from './auth/types';
|
|
5
|
-
export type EMUI = {
|
|
6
|
-
[key: string]: IMicroAppGuest | IMicroAppGuest[];
|
|
9
|
+
export type EMUI<AppObjects extends ScriptingObjects = Partial<ScriptingObjectTypes>, AppEvents extends EventListeners = Events> = {
|
|
10
|
+
[key: string]: IMicroAppGuest<AppObjects, AppEvents> | IMicroAppGuest<AppObjects, AppEvents>[];
|
|
7
11
|
} & {
|
|
8
12
|
_BASE_PATH: string;
|
|
9
13
|
_ASSET_PATH: string;
|
|
10
14
|
version: string;
|
|
11
|
-
MicroAppHost?: IMicroAppHost
|
|
15
|
+
MicroAppHost?: IMicroFEHost<AppObjects, AppEvents> | IMicroAppHost | SSFGuest<AppObjects, AppEvents>;
|
|
12
16
|
logger?: Logger;
|
|
13
17
|
appId: string;
|
|
14
18
|
uuid: string;
|
|
@@ -16,12 +20,15 @@ export type EMUI = {
|
|
|
16
20
|
loginParams: LoginParams;
|
|
17
21
|
};
|
|
18
22
|
declare global {
|
|
19
|
-
interface Window {
|
|
23
|
+
interface Window<AppObjects extends ScriptingObjects = Partial<ScriptingObjectTypes>, AppEvents extends EventListeners = Events> {
|
|
20
24
|
gtmDataLayer: BAEvent[];
|
|
21
|
-
emui: EMUI
|
|
25
|
+
emui: EMUI<AppObjects, AppEvents>;
|
|
26
|
+
__TEST__: {
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
};
|
|
22
29
|
}
|
|
23
30
|
}
|
|
24
|
-
export declare const getWindow: () =>
|
|
31
|
+
export declare const getWindow: () => WindowProxy;
|
|
25
32
|
export declare const getViewportSize: () => {
|
|
26
33
|
width: number;
|
|
27
34
|
height: number;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OpenAppParams } from '@elliemae/pui-app-bridge';
|
|
2
|
+
export type OnLoadCompleteFn = (instanceId: string) => void;
|
|
3
|
+
export type OnUnloadCompleteFn = () => void;
|
|
4
|
+
export type GuestMicroAppParams = OpenAppParams & {
|
|
5
|
+
onLoadComplete?: OnLoadCompleteFn;
|
|
6
|
+
onUnloadComplete?: OnUnloadCompleteFn;
|
|
7
|
+
containerId?: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Component to load a guest microapp
|
|
11
|
+
* @param props - The props for the MicroApp component.
|
|
12
|
+
*/
|
|
13
|
+
export declare const GuestMicroApp: import("react").NamedExoticComponent<GuestMicroAppParams>;
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import { MicroAppProps } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Component to render a guest microapp
|
|
4
|
+
* @deprecated This component is deprecated and will be removed in future versions.
|
|
5
|
+
* Use the `GuestMicroApp` component instead.
|
|
6
|
+
*/
|
|
2
7
|
export declare const MicroApp: import("react").NamedExoticComponent<MicroAppProps>;
|
|
@@ -2,5 +2,10 @@ import { MicroIFrameAppProps } from './types.js';
|
|
|
2
2
|
type Props = MicroIFrameAppProps & {
|
|
3
3
|
entityId?: string;
|
|
4
4
|
};
|
|
5
|
+
/**
|
|
6
|
+
* Component to render a guest microapp in an iframe.
|
|
7
|
+
* @deprecated This component is deprecated and will be removed in future versions.
|
|
8
|
+
* Use the `GuestMicroApp` component instead.
|
|
9
|
+
*/
|
|
5
10
|
export declare const MicroIFrameApp: import("react").NamedExoticComponent<Props>;
|
|
6
11
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const LATEST_VERSION = "latest";
|
|
2
|
+
export declare const RELEASE_VERSION = "23.1.0";
|
|
3
|
+
export declare const LOAN_APP_ID = "loanapp";
|
|
4
|
+
export declare const TASK_APP_ID = "taskapp";
|
|
5
|
+
export declare const FLIGHTS_APP_ID = "flights";
|
|
6
|
+
export declare const HOTELS_APP_ID = "hotels";
|
|
7
|
+
export declare const APP_CONFIG_JSON_URL = "/latest/app.config.json";
|
|
8
|
+
export declare const LOAN_SAVED_EVENT = "loanSaved";
|
|
9
|
+
export declare const PRE_COMMIT_EVENT = "preCommit";
|
|
10
|
+
export declare const FRAME_CONTAINER_ID_PREFIX = "pui-iframe-container-";
|
|
11
|
+
export declare const FRAME_APP_CONTAINER_ID_PREFIX = "pui-app-container-";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const appId: "loanapp";
|
|
2
|
+
declare const appName: "Loan App";
|
|
3
|
+
declare const appElementId: "pui-app-container-flights";
|
|
4
|
+
declare const pipelinePath: "/pipeline";
|
|
5
|
+
declare const pipelineLinkText: "Pipeline";
|
|
6
|
+
declare function getWindow(): Window<Partial<import("@elliemae/pui-scripting-object").ScriptingObjectTypes>, import("@elliemae/pui-scripting-object").Events> & typeof globalThis;
|
|
7
|
+
declare let host: null;
|
|
8
|
+
declare let parentHistory: null;
|
|
9
|
+
declare let logger: null;
|
|
10
|
+
declare const browserWindow: WindowProxy;
|
|
11
|
+
declare function setFrameSize(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { IModule, Listener, Events, LogLevels, LogMessage } from '@elliemae/pui-scripting-object';
|
|
2
|
+
import { ScriptingObject, Event } from '@elliemae/microfe-common';
|
|
3
|
+
export type AppraisalServiceEvents = {
|
|
4
|
+
'appraisalservice.onprecommit': Listener<AppraisalService, {
|
|
5
|
+
loanId: string;
|
|
6
|
+
}, Record<string, unknown>, boolean>;
|
|
7
|
+
'appraisalservice.onsaved': Listener<AppraisalService, {
|
|
8
|
+
loanId: string;
|
|
9
|
+
}, Record<string, unknown>, void>;
|
|
10
|
+
};
|
|
11
|
+
export declare class AppraisalService extends ScriptingObject implements IModule {
|
|
12
|
+
#private;
|
|
13
|
+
Close: Event<Events>;
|
|
14
|
+
Unloading: Event<Events>;
|
|
15
|
+
onPreCommit: Event<AppraisalServiceEvents>;
|
|
16
|
+
onSaved: Event<AppraisalServiceEvents>;
|
|
17
|
+
constructor({ loanId, creditScore, }: {
|
|
18
|
+
loanId: string;
|
|
19
|
+
creditScore: number;
|
|
20
|
+
});
|
|
21
|
+
getCapabilities: () => Promise<{
|
|
22
|
+
isAdmin: boolean;
|
|
23
|
+
los: string;
|
|
24
|
+
}>;
|
|
25
|
+
getParameters: () => Promise<{
|
|
26
|
+
moduleId: string;
|
|
27
|
+
loanId: string;
|
|
28
|
+
creditScore: number;
|
|
29
|
+
}>;
|
|
30
|
+
setCreditScore: (creditScore: number) => Promise<void>;
|
|
31
|
+
saveLoan: () => Promise<void>;
|
|
32
|
+
commit: () => Promise<unknown>;
|
|
33
|
+
delete: () => never;
|
|
34
|
+
log: (message: string | LogMessage, level: keyof typeof LogLevels) => Promise<void>;
|
|
35
|
+
unload: () => Promise<void>;
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const UNLOADING_EVENT_NAME = "Unloading";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Events, IGlobal } from '@elliemae/pui-scripting-object';
|
|
2
|
+
import { ScriptingObject, Event } from '@elliemae/microfe-common';
|
|
3
|
+
export declare class Global extends ScriptingObject implements IGlobal {
|
|
4
|
+
#private;
|
|
5
|
+
constructor();
|
|
6
|
+
readonly Change: Event<Events>;
|
|
7
|
+
set: (key: string, value: string) => Promise<void>;
|
|
8
|
+
get: (key: string) => Promise<string>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ILoan, Events, LoanObject, ActionResponse, LoanLevelActions, LoanCollection, LoanCollectionObject, ApplicationInfo, FieldOptions, FieldOptionsParam, CurrentApplicationOptions, EditModeOptions } from '@elliemae/pui-scripting-object';
|
|
2
|
+
import { ScriptingObject, Event, CAppBridge } from '@elliemae/pui-app-bridge';
|
|
3
|
+
export declare class Loan extends ScriptingObject implements ILoan {
|
|
4
|
+
#private;
|
|
5
|
+
constructor(appBridge: CAppBridge);
|
|
6
|
+
readonly ApplicationSelected: Event<Events>;
|
|
7
|
+
readonly Close: Event<Events>;
|
|
8
|
+
readonly Change: Event<Events>;
|
|
9
|
+
readonly Committed: Event<Events>;
|
|
10
|
+
readonly EditModeChange: Event<Events>;
|
|
11
|
+
readonly MilestoneCompleted: Event<Events>;
|
|
12
|
+
readonly Open: Event<Events>;
|
|
13
|
+
readonly PreCommit: Event<Events>;
|
|
14
|
+
readonly PreMilestoneComplete: Event<Events>;
|
|
15
|
+
readonly Sync: Event<Events>;
|
|
16
|
+
all: () => Promise<LoanObject>;
|
|
17
|
+
applyLock: (fieldId: string, lock: boolean) => Promise<void>;
|
|
18
|
+
calculate: () => Promise<LoanObject>;
|
|
19
|
+
commit: () => Promise<string>;
|
|
20
|
+
execAction: (type: LoanLevelActions, params?: Record<string, unknown>) => Promise<ActionResponse>;
|
|
21
|
+
getCollection: (name: LoanCollection) => Promise<LoanCollectionObject>;
|
|
22
|
+
getCurrentApplication: () => Promise<ApplicationInfo>;
|
|
23
|
+
getField: (id: string) => Promise<string>;
|
|
24
|
+
getFieldOptions: (param: FieldOptionsParam) => Promise<Record<string, FieldOptions[]>>;
|
|
25
|
+
getFields: (ids: string[]) => Promise<Record<string, string>>;
|
|
26
|
+
isReadOnly: () => Promise<boolean>;
|
|
27
|
+
merge: () => Promise<void>;
|
|
28
|
+
setCurrentApplication: (options: CurrentApplicationOptions) => Promise<void>;
|
|
29
|
+
setEditMode: (options: EditModeOptions) => Promise<void>;
|
|
30
|
+
setFields: (fields: Record<string, string>) => Promise<void>;
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const initServer: () => import("msw/lib/glossary-2792c6da.js").K;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RestHandler, DefaultBodyType, MockedRequest } from 'msw';
|
|
2
|
+
type Handlers = Array<RestHandler<MockedRequest<DefaultBodyType>>>;
|
|
3
|
+
export declare const getServerHandlers: () => Handlers;
|
|
4
|
+
export declare const serverHandlers: RestHandler<MockedRequest<DefaultBodyType>>[];
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const appId: "taskapp";
|
|
2
|
+
declare const appName: "Task App";
|
|
3
|
+
declare const appElementId: "pui-app-container-flights";
|
|
4
|
+
declare const pipelinePath: "/pipeline";
|
|
5
|
+
declare const pipelineLinkText: "Pipeline";
|
|
6
|
+
declare function getWindow(): WindowProxy;
|
|
7
|
+
declare let host: null;
|
|
8
|
+
declare let parentHistory: null;
|
|
9
|
+
declare let logger: null;
|
|
10
|
+
declare const browserWindow: WindowProxy;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const appId: "taskapp";
|
|
2
|
+
declare const appName: "Task App Dev";
|
|
3
|
+
declare const appElementId: "pui-app-container-flights";
|
|
4
|
+
declare const pipelinePath: "/pipeline";
|
|
5
|
+
declare const pipelineLinkText: "Pipeline";
|
|
6
|
+
declare function getWindow(): WindowProxy;
|
|
7
|
+
declare let host: null;
|
|
8
|
+
declare let parentHistory: null;
|
|
9
|
+
declare let logger: null;
|
|
10
|
+
declare const browserWindow: WindowProxy;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const appId: "travelhub";
|
|
2
|
+
declare const appName: "Travel Hub";
|
|
3
|
+
declare function getWindow(): WindowProxy;
|
|
4
|
+
declare const browserWindow: WindowProxy;
|
|
5
|
+
declare const mainElement: HTMLElement;
|
|
6
|
+
declare const pageHeaderEle: HTMLHeadingElement;
|
|
7
|
+
declare const versionEle: HTMLParagraphElement;
|
|
File without changes
|
|
File without changes
|