@elliemae/pui-app-bridge 2.29.0-alpha.0 → 2.29.1
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 +88 -35
- package/dist/cjs/config/app.js +7 -2
- package/dist/cjs/config/microFE.js +28 -30
- package/dist/cjs/eventManager.js +6 -7
- package/dist/cjs/frame.js +7 -10
- package/dist/cjs/loaders/manifest.js +1 -1
- package/dist/cjs/microfeHost.js +2 -5
- package/dist/cjs/tests/scriptingObjects/analytics.js +21 -6
- package/dist/cjs/tests/scriptingObjects/appraisalServiceModule.js +4 -1
- package/dist/cjs/tests/utils.js +1 -76
- package/dist/cjs/typings/window.js +1 -1
- package/dist/esm/appBridge.js +88 -35
- package/dist/esm/config/app.js +7 -2
- package/dist/esm/config/microFE.js +28 -30
- package/dist/esm/eventManager.js +6 -7
- package/dist/esm/frame.js +7 -10
- package/dist/esm/loaders/manifest.js +1 -1
- package/dist/esm/microfeHost.js +2 -5
- package/dist/esm/tests/scriptingObjects/analytics.js +21 -6
- package/dist/esm/tests/scriptingObjects/appraisalServiceModule.js +4 -1
- package/dist/esm/tests/serverHandlers.js +1 -3
- package/dist/esm/tests/utils.js +1 -76
- package/dist/esm/typings/window.js +1 -1
- package/dist/public/e2e-host.html +1 -1
- package/dist/public/e2e-index.html +1 -1
- package/dist/public/frame.html +1 -1
- package/dist/public/index.html +1 -1
- package/dist/public/js/emuiAppBridge.02aa5aed856e7e070591.js +17 -0
- package/dist/public/js/emuiAppBridge.02aa5aed856e7e070591.js.br +0 -0
- package/dist/public/js/emuiAppBridge.02aa5aed856e7e070591.js.gz +0 -0
- package/dist/public/js/emuiAppBridge.02aa5aed856e7e070591.js.map +1 -0
- package/dist/types/lib/appBridge.d.ts +6 -6
- package/dist/types/lib/appRegistry.d.ts +1 -1
- package/dist/types/lib/config/app.d.ts +1 -1
- package/dist/types/lib/config/microFE.d.ts +2 -2
- package/dist/types/lib/eventManager.d.ts +3 -3
- package/dist/types/lib/loaders/script.d.ts +1 -1
- package/dist/types/lib/loaders/style.d.ts +1 -1
- package/dist/types/lib/microfeHost.d.ts +6 -5
- package/dist/types/lib/tests/scriptingObjects/analytics.d.ts +5 -5
- package/dist/types/lib/tests/scriptingObjects/appraisalServiceModule.d.ts +5 -8
- package/dist/types/lib/tests/scriptingObjects/global.d.ts +1 -1
- package/dist/types/lib/tests/server.d.ts +1 -1
- package/dist/types/lib/tests/serverHandlers.d.ts +1 -1
- package/dist/types/lib/tests/utils.d.ts +2 -64
- package/dist/types/lib/typings/appInfo.d.ts +1 -1
- package/dist/types/lib/typings/common.d.ts +0 -10
- package/dist/types/lib/typings/guest.d.ts +6 -6
- package/dist/types/lib/typings/host.d.ts +4 -4
- package/dist/types/lib/typings/index.d.ts +1 -1
- package/dist/types/lib/typings/window.d.ts +4 -4
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/umd/index.js +14 -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/package.json +13 -14
- package/dist/public/js/emuiAppBridge.e4cfaa7d8c810b09c233.js +0 -12
- package/dist/public/js/emuiAppBridge.e4cfaa7d8c810b09c233.js.br +0 -0
- package/dist/public/js/emuiAppBridge.e4cfaa7d8c810b09c233.js.gz +0 -0
- package/dist/public/js/emuiAppBridge.e4cfaa7d8c810b09c233.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { Logger } from '@elliemae/pui-diagnostics';
|
|
2
|
+
import { Events, ScriptingObjectTypes, IScriptingObjectProxy } from '@elliemae/pui-scripting-object';
|
|
3
|
+
import { EventListeners, AddScriptingObjectParams, DispatchEventParam, EventOptions, ScriptingObjects } from '@elliemae/microfe-common';
|
|
4
|
+
import { IMicroFEGuest } from './typings/guest.js';
|
|
5
|
+
import { OpenAppParams } from './typings/host.js';
|
|
6
|
+
import { ValueOf } from './typings/common.js';
|
|
7
7
|
/**
|
|
8
8
|
* AppBridge constructor parameter
|
|
9
9
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { AppInfo } from '../typings/appInfo.js';
|
|
2
|
+
import { CAppConfig } from './app.js';
|
|
3
3
|
export declare class CMicroFEConfig {
|
|
4
4
|
#private;
|
|
5
5
|
init: ({ version, appConfig, }: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { Logger } from '@elliemae/pui-diagnostics';
|
|
2
|
+
import { IScriptingObject, Events } from '@elliemae/pui-scripting-object';
|
|
3
3
|
import type { EventListeners, Listener, SubscribeParam, UnsubscribeParam, DispatchEventParam, EventOptions, FilterCriteria } from '@elliemae/microfe-common';
|
|
4
4
|
/**
|
|
5
5
|
* details of an event listener
|
|
@@ -12,7 +12,7 @@ type EventListenerDetails = {
|
|
|
12
12
|
/**
|
|
13
13
|
* event listener
|
|
14
14
|
*/
|
|
15
|
-
callback: Listener<
|
|
15
|
+
callback: Listener<any, any, any, any>;
|
|
16
16
|
/**
|
|
17
17
|
* subscription id
|
|
18
18
|
*/
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import type { EventListeners, GuestContext, SubscribeParam, UnsubscribeParam
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { Events, ScriptingObjectTypes } from '@elliemae/pui-scripting-object';
|
|
2
|
+
import { Logger } from '@elliemae/pui-diagnostics';
|
|
3
|
+
import type { EventListeners, GuestContext, SubscribeParam, UnsubscribeParam } from '@elliemae/microfe-common';
|
|
4
|
+
import { ScriptingObjectManager, ScriptingObjects } from '@elliemae/microfe-common';
|
|
5
|
+
import { EventManager } from './eventManager.js';
|
|
6
|
+
import { IMicroFEHost, AppWindowSize } from './typings/host.js';
|
|
6
7
|
/**
|
|
7
8
|
* Constructor parameters for the host application
|
|
8
9
|
*/
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { IAnalytics, BAEvent, TimingOptions, PerfMark } from '@elliemae/pui-scripting-object';
|
|
2
2
|
import { ScriptingObject } from '@elliemae/microfe-common';
|
|
3
3
|
export declare class Analytics extends ScriptingObject implements IAnalytics {
|
|
4
4
|
constructor();
|
|
5
|
-
deleteTimingEventSamplingRatio: (
|
|
5
|
+
deleteTimingEventSamplingRatio: (names: string[]) => void;
|
|
6
6
|
getAllTimingEventSamplingRatios: () => {};
|
|
7
|
-
getTimingEventSamplingRatio: (
|
|
8
|
-
setTimingEventSamplingRatio: (
|
|
9
|
-
sendBAEvent: (
|
|
7
|
+
getTimingEventSamplingRatio: (names: string[]) => {};
|
|
8
|
+
setTimingEventSamplingRatio: (ratios: Record<string, number>) => void;
|
|
9
|
+
sendBAEvent: (event: BAEvent) => Promise<void>;
|
|
10
10
|
startTiming: (name: string, options: TimingOptions) => Promise<PerformanceMark>;
|
|
11
11
|
endTiming: (start: string | PerfMark, options: TimingOptions) => Promise<void>;
|
|
12
12
|
}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IModule, Listener, Events, LogLevels, LogMessage } from '@elliemae/pui-scripting-object';
|
|
2
2
|
import { ScriptingObject, Event } from '@elliemae/microfe-common';
|
|
3
|
-
export type AppraisalOnSavedEventParams = {
|
|
4
|
-
loanId: string;
|
|
5
|
-
tags?: string | string[];
|
|
6
|
-
creditScore?: number | string;
|
|
7
|
-
};
|
|
8
3
|
export type AppraisalServiceEvents = {
|
|
9
4
|
'appraisalservice.onprecommit': Listener<AppraisalService, {
|
|
10
5
|
loanId: string;
|
|
11
6
|
}, Record<string, unknown>, boolean>;
|
|
12
|
-
'appraisalservice.onsaved': Listener<AppraisalService,
|
|
7
|
+
'appraisalservice.onsaved': Listener<AppraisalService, {
|
|
8
|
+
loanId: string;
|
|
9
|
+
}, Record<string, unknown>, void>;
|
|
13
10
|
};
|
|
14
11
|
export declare class AppraisalService extends ScriptingObject implements IModule {
|
|
15
12
|
#private;
|
|
@@ -34,6 +31,6 @@ export declare class AppraisalService extends ScriptingObject implements IModule
|
|
|
34
31
|
saveLoan: () => Promise<void>;
|
|
35
32
|
commit: () => Promise<unknown>;
|
|
36
33
|
delete: () => never;
|
|
37
|
-
log: (
|
|
34
|
+
log: (message: string | LogMessage, level: keyof typeof LogLevels) => Promise<void>;
|
|
38
35
|
unload: () => Promise<void>;
|
|
39
36
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Events, IGlobal } from '@elliemae/pui-scripting-object';
|
|
2
2
|
import { ScriptingObject, Event } from '@elliemae/microfe-common';
|
|
3
3
|
export declare class Global extends ScriptingObject implements IGlobal {
|
|
4
4
|
#private;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const initServer: () => import("msw/
|
|
1
|
+
export declare const initServer: () => import("msw/lib/glossary-2792c6da").K;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RestHandler, DefaultBodyType, MockedRequest } from 'msw';
|
|
2
2
|
type Handlers = Array<RestHandler<MockedRequest<DefaultBodyType>>>;
|
|
3
3
|
export declare const getServerHandlers: () => Handlers;
|
|
4
4
|
export declare const serverHandlers: RestHandler<MockedRequest<DefaultBodyType>>[];
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import type { InitParams, MountParams } from '../index.js';
|
|
4
|
-
import type { IMicroFEGuest } from '../typings/guest.js';
|
|
5
|
-
import type { EMUI } from '../typings/window.js';
|
|
1
|
+
import { rest } from 'msw';
|
|
2
|
+
import { InitParams, MountParams } from '../index.js';
|
|
6
3
|
export type Params = Parameters<Parameters<typeof rest.get>[1]>;
|
|
7
4
|
export type TestGuestWindow = Window & typeof globalThis & {
|
|
8
5
|
__TEST__: {
|
|
@@ -10,65 +7,6 @@ export type TestGuestWindow = Window & typeof globalThis & {
|
|
|
10
7
|
mountOptions: MountParams;
|
|
11
8
|
};
|
|
12
9
|
};
|
|
13
|
-
/** Minimal guest registration payload for registry tests. */
|
|
14
|
-
export type MockGuestApp = Partial<Omit<IMicroFEGuest, 'guestWindow' | 'init' | 'mount' | 'unmount'>> & {
|
|
15
|
-
uuid: string;
|
|
16
|
-
init?: jest.Mock | (() => Promise<void>);
|
|
17
|
-
mount?: jest.Mock;
|
|
18
|
-
};
|
|
19
|
-
export type TestIframeWindow = Window & {
|
|
20
|
-
emui: EMUI;
|
|
21
|
-
};
|
|
22
|
-
export declare const getIframeWindow: (frame: HTMLIFrameElement) => TestIframeWindow;
|
|
23
|
-
export declare const getEmuiApps: (emui: EMUI, appId: string) => Array<Omit<IMicroFEGuest, "guestWindow">>;
|
|
24
|
-
export declare const setEmuiAppEntry: (emui: EMUI, appId: string, entry: MockGuestApp) => void;
|
|
25
|
-
export declare const clearWindowEmui: () => void;
|
|
26
|
-
/** Module scripting object shape used in self-initialize tests. */
|
|
27
|
-
export type TestModuleScriptingObject = {
|
|
28
|
-
getParameters: () => Promise<{
|
|
29
|
-
moduleId: string;
|
|
30
|
-
homeRoute: string;
|
|
31
|
-
}>;
|
|
32
|
-
_setUnloadHandler?: (handler: () => Promise<void>) => void;
|
|
33
|
-
};
|
|
34
|
-
export declare const createTestModuleSO: () => ScriptingObject & TestModuleScriptingObject;
|
|
35
|
-
export declare const expectInitHistoryShape: (history: InitParams["history"]) => void;
|
|
36
|
-
export declare const expectInitThemeShape: (theme: InitParams["theme"]) => void;
|
|
37
|
-
export declare const expectInitLoggerShape: (initLogger: InitParams["logger"]) => void;
|
|
38
|
-
export declare const snapshotInitOptionsPayload: (initOptions: InitParams) => {
|
|
39
|
-
logger: undefined;
|
|
40
|
-
history: {
|
|
41
|
-
action: import("history").Action;
|
|
42
|
-
location: import("history").Location;
|
|
43
|
-
} | undefined;
|
|
44
|
-
theme: {
|
|
45
|
-
breakpoints: import("@elliemae/pui-theme").BreakPoints;
|
|
46
|
-
colors: import("node_modules/@elliemae/pui-theme/dist/types/lib/theme-type.js").Colors;
|
|
47
|
-
fontSizes: import("node_modules/@elliemae/pui-theme/dist/types/lib/theme-type.js").FontSizes;
|
|
48
|
-
fontWeights: import("node_modules/@elliemae/pui-theme/dist/types/lib/theme-type.js").FontWeights;
|
|
49
|
-
fonts: import("node_modules/@elliemae/pui-theme/dist/types/lib/theme-type.js").Fonts;
|
|
50
|
-
letterSpacings: import("node_modules/@elliemae/pui-theme/dist/types/lib/theme-type.js").LetterSpacings;
|
|
51
|
-
lineHeights: import("node_modules/@elliemae/pui-theme/dist/types/lib/theme-type.js").LineHeights;
|
|
52
|
-
shadows: {
|
|
53
|
-
xs: string;
|
|
54
|
-
s: string;
|
|
55
|
-
m: string;
|
|
56
|
-
l: string;
|
|
57
|
-
xl: string;
|
|
58
|
-
};
|
|
59
|
-
space: import("node_modules/@elliemae/pui-theme/dist/types/lib/theme-type.js").Space;
|
|
60
|
-
zIndex: import("node_modules/@elliemae/pui-theme/dist/types/lib/theme-type.js").ZIndex;
|
|
61
|
-
} | undefined;
|
|
62
|
-
host: import("../index.js").IMicroFEHost<Partial<import("@elliemae/pui-scripting-object").ScriptingObjectTypes>, import("@elliemae/pui-scripting-object").Events>;
|
|
63
|
-
hostName?: string;
|
|
64
|
-
hostUrl?: string;
|
|
65
|
-
manifestPath?: string;
|
|
66
|
-
homeRoute?: string;
|
|
67
|
-
initialRoute?: import("history").To;
|
|
68
|
-
prevState?: Record<string, unknown> | null;
|
|
69
|
-
hostBreakpoint?: import("@elliemae/pui-theme").BreakPoint;
|
|
70
|
-
hostViewportSize?: import("../typings/guest.js").ViewportSize;
|
|
71
|
-
};
|
|
72
10
|
export declare const getMajorMinorVersion: (version: string) => string;
|
|
73
11
|
export declare const sendJS: (res: Params[1], ctx: Params[2], filePath: string) => Promise<import("msw").MockedResponse<import("msw").DefaultBodyType>>;
|
|
74
12
|
export declare const sendJSText: (res: Params[1], ctx: Params[2], fileContent: string) => Promise<import("msw").MockedResponse<import("msw").DefaultBodyType>>;
|
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
import type { CallerInfo, GuestContext } from '@elliemae/microfe-common';
|
|
2
1
|
export type ValueOf<T> = T[keyof T];
|
|
3
|
-
/** Context attached to scripting object function invocations. */
|
|
4
|
-
export type CallContext = {
|
|
5
|
-
guest?: GuestContext;
|
|
6
|
-
callChain?: CallerInfo[];
|
|
7
|
-
};
|
|
8
|
-
/** Function that may carry host-verified caller context. */
|
|
9
|
-
export type CallableWithCallContext = ((...args: unknown[]) => unknown) & {
|
|
10
|
-
callContext?: CallContext;
|
|
11
|
-
};
|
|
12
2
|
/**
|
|
13
3
|
* security context under which the guest application is running
|
|
14
4
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { History, To } from 'history';
|
|
2
|
+
import { DefaultTheme } from 'styled-components';
|
|
3
|
+
import { Logger } from '@elliemae/pui-diagnostics';
|
|
4
|
+
import { BreakPoint } from '@elliemae/pui-theme';
|
|
5
|
+
import { ScriptingObjectTypes, Events } from '@elliemae/pui-scripting-object';
|
|
6
6
|
import type { EventListeners, ScriptingObjects } from '@elliemae/microfe-common';
|
|
7
|
-
import
|
|
7
|
+
import { IMicroFEHost } from './host.js';
|
|
8
8
|
/**
|
|
9
9
|
* Viewport size
|
|
10
10
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { History } from 'history';
|
|
2
|
+
import { DefaultTheme } from 'styled-components';
|
|
3
|
+
import { ScriptingObjectTypes, Events } from '@elliemae/pui-scripting-object';
|
|
4
4
|
import type { EventListeners, ScriptingObjects, SubscribeParam, UnsubscribeParam } from '@elliemae/microfe-common';
|
|
5
|
-
import
|
|
5
|
+
import { FrameOptions } from '../frame.js';
|
|
6
6
|
export type AppWindowSize = {
|
|
7
7
|
appId: string;
|
|
8
8
|
size: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { IScriptingObject } from '@elliemae/pui-scripting-object';
|
|
2
2
|
export type ScriptingObjects = Record<string, IScriptingObject>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { BreakPoint } from '@elliemae/pui-theme';
|
|
2
|
+
import { Logger } from '@elliemae/pui-diagnostics';
|
|
3
|
+
import { IMicroFEGuest } from './guest.js';
|
|
4
|
+
import { IMicroFEHost } from './host.js';
|
|
5
5
|
export type EMUI = {
|
|
6
6
|
[key: string]: Omit<IMicroFEGuest, 'guestWindow'> | Omit<IMicroFEGuest, 'guestWindow'>[];
|
|
7
7
|
} & {
|