@elliemae/pui-app-sdk 5.22.0-beta.1 → 5.22.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.
Files changed (158) hide show
  1. package/dist/cjs/analytics/index.js +1 -2
  2. package/dist/cjs/api/users/index.js +6 -4
  3. package/dist/cjs/data/auth/actions.js +10 -2
  4. package/dist/cjs/index.js +0 -3
  5. package/dist/cjs/utils/auth/index.js +8 -5
  6. package/dist/cjs/utils/decorators/functionDecorators.js +6 -1
  7. package/dist/cjs/utils/micro-frontend/guest.js +14 -101
  8. package/dist/cjs/{view/tests/scriptingObjects/constant.js → utils/micro-frontend/host-app.js} +10 -5
  9. package/dist/cjs/utils/micro-frontend/host.js +3 -36
  10. package/dist/cjs/utils/micro-frontend/scripting-objects/analytics.js +12 -2
  11. package/dist/cjs/{view/tests/utils.js → utils/micro-frontend/ssfguest-adapter.js} +29 -34
  12. package/dist/cjs/utils/testing/index.js +1 -15
  13. package/dist/cjs/view/login/index.js +4 -3
  14. package/dist/cjs/view/micro-iframe-app/iframe/index.js +1 -1
  15. package/dist/cjs/view/micro-iframe-app/iframe.html +1 -5
  16. package/dist/cjs/view/micro-iframe-app/use-frame-loaded.js +1 -3
  17. package/dist/cjs/view/require-auth.js +12 -2
  18. package/dist/esm/analytics/index.js +1 -2
  19. package/dist/esm/api/users/index.js +6 -4
  20. package/dist/esm/data/auth/actions.js +10 -2
  21. package/dist/esm/index.js +1 -7
  22. package/dist/esm/utils/auth/index.js +8 -5
  23. package/dist/esm/utils/decorators/functionDecorators.js +6 -1
  24. package/dist/esm/utils/micro-frontend/guest.js +14 -101
  25. package/dist/esm/utils/micro-frontend/host-app.js +9 -0
  26. package/dist/esm/utils/micro-frontend/host.js +3 -36
  27. package/dist/esm/utils/micro-frontend/scripting-objects/analytics.js +2 -2
  28. package/dist/esm/utils/micro-frontend/ssfguest-adapter.js +28 -0
  29. package/dist/esm/utils/testing/index.js +1 -5
  30. package/dist/esm/view/login/index.js +4 -3
  31. package/dist/esm/view/micro-iframe-app/iframe/index.js +1 -1
  32. package/dist/esm/view/micro-iframe-app/iframe.html +1 -5
  33. package/dist/esm/view/micro-iframe-app/use-frame-loaded.js +1 -3
  34. package/dist/esm/view/require-auth.js +12 -2
  35. package/dist/types/lib/api/users/index.d.ts +2 -1
  36. package/dist/types/lib/data/auth/actions.d.ts +2 -1
  37. package/dist/types/lib/index.d.ts +1 -2
  38. package/dist/types/lib/utils/auth/index.d.ts +4 -2
  39. package/dist/types/lib/utils/micro-frontend/guest.d.ts +11 -46
  40. package/dist/types/lib/utils/micro-frontend/host-app.d.ts +11 -0
  41. package/dist/types/lib/utils/micro-frontend/host.d.ts +10 -27
  42. package/dist/types/lib/utils/micro-frontend/scripting-objects/analytics.d.ts +2 -2
  43. package/dist/types/lib/utils/micro-frontend/ssfguest-adapter.d.ts +7 -0
  44. package/dist/types/lib/utils/micro-frontend/types.d.ts +1 -2
  45. package/dist/types/lib/utils/testing/index.d.ts +1 -57
  46. package/dist/types/lib/utils/window.d.ts +6 -13
  47. package/dist/types/lib/view/login/index.d.ts +2 -1
  48. package/dist/types/lib/view/micro-app/index.d.ts +0 -5
  49. package/dist/types/lib/view/micro-iframe-app/index.d.ts +0 -5
  50. package/dist/types/lib/view/require-auth.d.ts +2 -1
  51. package/dist/types/tsconfig.tsbuildinfo +1 -1
  52. package/package.json +43 -43
  53. package/dist/cjs/utils/micro-frontend/app-bridge.js +0 -40
  54. package/dist/cjs/utils/micro-frontend/tests/app.config.json +0 -200
  55. package/dist/cjs/utils/micro-frontend/tests/utils.js +0 -116
  56. package/dist/cjs/view/guest-microapp.js +0 -126
  57. package/dist/cjs/view/tests/__snapshots__/guest-microapp.test.tsx.snap +0 -21
  58. package/dist/cjs/view/tests/__snapshots__/micro-iframe-app.test.tsx.snap +0 -208
  59. package/dist/cjs/view/tests/app.config.json +0 -200
  60. package/dist/cjs/view/tests/constants.js +0 -44
  61. package/dist/cjs/view/tests/flights/23.1/app.checksum1.css +0 -3
  62. package/dist/cjs/view/tests/flights/23.1/app.checksum1.js +0 -52
  63. package/dist/cjs/view/tests/flights/23.1/manifest.json +0 -4
  64. package/dist/cjs/view/tests/flights/latest/app.checksum.css +0 -3
  65. package/dist/cjs/view/tests/flights/latest/app.checksum.js +0 -52
  66. package/dist/cjs/view/tests/flights/latest/manifest.json +0 -4
  67. package/dist/cjs/view/tests/hotels/23.1/app.checksum.css +0 -3
  68. package/dist/cjs/view/tests/hotels/23.1/app.checksum.js +0 -52
  69. package/dist/cjs/view/tests/hotels/23.1/manifest.json +0 -4
  70. package/dist/cjs/view/tests/hotels/latest/app.checksum.css +0 -3
  71. package/dist/cjs/view/tests/hotels/latest/app.checksum.js +0 -52
  72. package/dist/cjs/view/tests/hotels/latest/manifest.json +0 -4
  73. package/dist/cjs/view/tests/loan/latest/index.js +0 -116
  74. package/dist/cjs/view/tests/loan/latest/manifest.json +0 -3
  75. package/dist/cjs/view/tests/scriptingObjects/appraisalServiceModule.js +0 -81
  76. package/dist/cjs/view/tests/scriptingObjects/global.js +0 -40
  77. package/dist/cjs/view/tests/scriptingObjects/loan.js +0 -200
  78. package/dist/cjs/view/tests/server.js +0 -29
  79. package/dist/cjs/view/tests/serverHandlers.js +0 -210
  80. package/dist/cjs/view/tests/task/latest/index.dev.js +0 -67
  81. package/dist/cjs/view/tests/task/latest/index.js +0 -67
  82. package/dist/cjs/view/tests/task/latest/manifest.json +0 -4
  83. package/dist/cjs/view/tests/travelhub/23.1/app.checksum.css +0 -3
  84. package/dist/cjs/view/tests/travelhub/23.1/app.checksum.js +0 -25
  85. package/dist/cjs/view/tests/travelhub/23.1/landing.checksum1.css +0 -3
  86. package/dist/cjs/view/tests/travelhub/23.1/landing.checksum1.js +0 -6
  87. package/dist/cjs/view/tests/travelhub/23.1/manifest.json +0 -6
  88. package/dist/cjs/view/tests/travelhub/latest/app.checksum.css +0 -3
  89. package/dist/cjs/view/tests/travelhub/latest/app.checksum.js +0 -30
  90. package/dist/cjs/view/tests/travelhub/latest/landing.checksum.css +0 -3
  91. package/dist/cjs/view/tests/travelhub/latest/landing.checksum.js +0 -8
  92. package/dist/cjs/view/tests/travelhub/latest/manifest.json +0 -6
  93. package/dist/esm/utils/micro-frontend/app-bridge.js +0 -20
  94. package/dist/esm/utils/micro-frontend/tests/app.config.json +0 -200
  95. package/dist/esm/utils/micro-frontend/tests/utils.js +0 -96
  96. package/dist/esm/view/guest-microapp.js +0 -96
  97. package/dist/esm/view/tests/__snapshots__/guest-microapp.test.tsx.snap +0 -21
  98. package/dist/esm/view/tests/__snapshots__/micro-iframe-app.test.tsx.snap +0 -208
  99. package/dist/esm/view/tests/app.config.json +0 -200
  100. package/dist/esm/view/tests/constants.js +0 -24
  101. package/dist/esm/view/tests/flights/23.1/app.checksum1.css +0 -3
  102. package/dist/esm/view/tests/flights/23.1/app.checksum1.js +0 -51
  103. package/dist/esm/view/tests/flights/23.1/manifest.json +0 -4
  104. package/dist/esm/view/tests/flights/latest/app.checksum.css +0 -3
  105. package/dist/esm/view/tests/flights/latest/app.checksum.js +0 -51
  106. package/dist/esm/view/tests/flights/latest/manifest.json +0 -4
  107. package/dist/esm/view/tests/hotels/23.1/app.checksum.css +0 -3
  108. package/dist/esm/view/tests/hotels/23.1/app.checksum.js +0 -51
  109. package/dist/esm/view/tests/hotels/23.1/manifest.json +0 -4
  110. package/dist/esm/view/tests/hotels/latest/app.checksum.css +0 -3
  111. package/dist/esm/view/tests/hotels/latest/app.checksum.js +0 -51
  112. package/dist/esm/view/tests/hotels/latest/manifest.json +0 -4
  113. package/dist/esm/view/tests/loan/latest/index.js +0 -115
  114. package/dist/esm/view/tests/loan/latest/manifest.json +0 -3
  115. package/dist/esm/view/tests/scriptingObjects/appraisalServiceModule.js +0 -63
  116. package/dist/esm/view/tests/scriptingObjects/constant.js +0 -4
  117. package/dist/esm/view/tests/scriptingObjects/global.js +0 -22
  118. package/dist/esm/view/tests/scriptingObjects/loan.js +0 -180
  119. package/dist/esm/view/tests/server.js +0 -9
  120. package/dist/esm/view/tests/serverHandlers.js +0 -180
  121. package/dist/esm/view/tests/task/latest/index.dev.js +0 -66
  122. package/dist/esm/view/tests/task/latest/index.js +0 -66
  123. package/dist/esm/view/tests/task/latest/manifest.json +0 -4
  124. package/dist/esm/view/tests/travelhub/23.1/app.checksum.css +0 -3
  125. package/dist/esm/view/tests/travelhub/23.1/app.checksum.js +0 -24
  126. package/dist/esm/view/tests/travelhub/23.1/landing.checksum1.css +0 -3
  127. package/dist/esm/view/tests/travelhub/23.1/landing.checksum1.js +0 -5
  128. package/dist/esm/view/tests/travelhub/23.1/manifest.json +0 -6
  129. package/dist/esm/view/tests/travelhub/latest/app.checksum.css +0 -3
  130. package/dist/esm/view/tests/travelhub/latest/app.checksum.js +0 -29
  131. package/dist/esm/view/tests/travelhub/latest/landing.checksum.css +0 -3
  132. package/dist/esm/view/tests/travelhub/latest/landing.checksum.js +0 -7
  133. package/dist/esm/view/tests/travelhub/latest/manifest.json +0 -6
  134. package/dist/esm/view/tests/utils.js +0 -33
  135. package/dist/types/lib/utils/micro-frontend/app-bridge.d.ts +0 -4
  136. package/dist/types/lib/utils/micro-frontend/tests/utils.d.ts +0 -39
  137. package/dist/types/lib/view/guest-microapp.d.ts +0 -13
  138. package/dist/types/lib/view/tests/constants.d.ts +0 -11
  139. package/dist/types/lib/view/tests/flights/23.1/app.checksum1.d.ts +0 -7
  140. package/dist/types/lib/view/tests/flights/latest/app.checksum.d.ts +0 -7
  141. package/dist/types/lib/view/tests/hotels/23.1/app.checksum.d.ts +0 -7
  142. package/dist/types/lib/view/tests/hotels/latest/app.checksum.d.ts +0 -7
  143. package/dist/types/lib/view/tests/loan/latest/index.d.ts +0 -11
  144. package/dist/types/lib/view/tests/micro-iframe-app.test.d.ts +0 -1
  145. package/dist/types/lib/view/tests/scriptingObjects/appraisalServiceModule.d.ts +0 -36
  146. package/dist/types/lib/view/tests/scriptingObjects/constant.d.ts +0 -1
  147. package/dist/types/lib/view/tests/scriptingObjects/global.d.ts +0 -9
  148. package/dist/types/lib/view/tests/scriptingObjects/loan.d.ts +0 -31
  149. package/dist/types/lib/view/tests/server.d.ts +0 -1
  150. package/dist/types/lib/view/tests/serverHandlers.d.ts +0 -5
  151. package/dist/types/lib/view/tests/task/latest/index.d.ts +0 -10
  152. package/dist/types/lib/view/tests/task/latest/index.dev.d.ts +0 -10
  153. package/dist/types/lib/view/tests/travelhub/23.1/app.checksum.d.ts +0 -7
  154. package/dist/types/lib/view/tests/travelhub/23.1/landing.checksum1.d.ts +0 -2
  155. package/dist/types/lib/view/tests/travelhub/latest/app.checksum.d.ts +0 -0
  156. package/dist/types/lib/view/tests/travelhub/latest/landing.checksum.d.ts +0 -0
  157. package/dist/types/lib/view/tests/utils.d.ts +0 -7
  158. /package/dist/types/lib/{view/tests/guest-microapp.test.d.ts → utils/micro-frontend/tests/guest-ssf-host.test.d.ts} +0 -0
@@ -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<AppObjects extends ScriptingObjects = Partial<ScriptingObjectTypes>, AppEvents extends EventListeners = Events> extends InitOptions<AppObjects, AppEvents> {
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<AppObjects extends ScriptingObjects = Partial<ScriptingObjectTypes>, AppEvents extends EventListeners = Events> implements IMicroAppGuest<AppObjects, AppEvents> {
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<AppObjects extends ScriptingObjects = Partial<ScriptingObjectTypes>, AppEvents extends EventListeners = Events>(params?: ConstructorParams): CMicroAppGuest<AppObjects, AppEvents>;
34
+ static getInstance(params?: ConstructorParams): CMicroAppGuest;
39
35
  static isInitialized(): boolean;
40
36
  static isHosted(): boolean;
41
- getHost(): IMicroAppHost<Partial<ScriptingObjectTypes>, Events> | IMicroFEHost<Partial<ScriptingObjectTypes>, Events> | SSFGuest<Partial<ScriptingObjectTypes>, Events> | undefined;
37
+ getHost(): IMicroAppHost | undefined;
42
38
  getLogger(): MicroFrontEndLogger;
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>;
39
+ getProps(): GuestProps;
59
40
  private getSessionStorageItem;
60
- private findHost;
41
+ private getSSFAdapter;
61
42
  get uuid(): string;
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;
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;
@@ -1,9 +1,8 @@
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 { 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';
4
+ import ssfHost from '@elliemae/em-ssf-host';
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 = {
@@ -20,10 +19,10 @@ type ConstructorParams = {
20
19
  scriptingObjects?: Record<string, any>;
21
20
  onRenewSessionTimer?: () => void;
22
21
  onInit?: OnInitCallback;
23
- ssfHostRef?: SSFHost<ScriptingObjectTypes, Events> | null;
22
+ ssfHostRef?: typeof ssfHost.Host;
24
23
  analytics?: Analytics;
25
24
  };
26
- export declare class CMicroAppHost<AppObjects extends ScriptingObjects = Partial<ScriptingObjectTypes>, AppEvents extends EventListeners = Events> implements IMicroAppHost<AppObjects, AppEvents> {
25
+ export declare class CMicroAppHost implements IMicroAppHost {
27
26
  #private;
28
27
  private static instance;
29
28
  private readonly logger;
@@ -35,25 +34,25 @@ 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<AppObjects extends ScriptingObjects = Partial<ScriptingObjectTypes>, AppEvents extends EventListeners = Events>(params?: ConstructorParams): CMicroAppHost<AppObjects, AppEvents>;
37
+ static getInstance(params?: ConstructorParams): CMicroAppHost;
39
38
  static isInitialized(): boolean;
40
- getProps(): HostOptions;
41
- getLogger(): MicroFrontEndLogger;
39
+ getProps(this: CMicroAppHost): HostOptions;
40
+ getLogger(this: CMicroAppHost): MicroFrontEndLogger;
42
41
  getItem(key: string): string | null;
43
42
  setItem(key: string, value: string): void;
44
- getGuests(): Record<string, unknown>;
43
+ getGuests(this: CMicroAppHost): Record<string, unknown>;
45
44
  getGuest<T>(id: string): T | null;
46
45
  publish<Type>(message: string | symbol, data?: Type): boolean;
47
46
  subscribe<T>(message: string | symbol, func: SubscriptionListener<T>): string;
48
47
  unsubscribe(token: string): void;
49
- navigate(url: To, state?: any): void;
48
+ navigate(this: CMicroAppHost, url: To, state?: any): void;
50
49
  openWaitMessage(): void;
51
50
  closeWaitMessage(): void;
52
51
  openErrorBanner(message: string): void;
53
52
  getAuthToken(): string;
54
53
  renewAuthToken(): string;
55
54
  logout(): void;
56
- renewSessionTimer(): Promise<void>;
55
+ renewSessionTimer(this: CMicroAppHost): Promise<void>;
57
56
  getBreakpoint(): keyof import("@elliemae/pui-theme").BreakPoints;
58
57
  getViewportSize(): {
59
58
  width: number;
@@ -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 {};
@@ -1,4 +1,4 @@
1
- import { ScriptingObject } from '@elliemae/ssf-host';
1
+ import ssfHost from '@elliemae/em-ssf-host';
2
2
  import { IAnalytics, BAEvent, TimingOptions } from '@elliemae/pui-scripting-object';
3
3
  import { MicroFrontEndLogger } from '../../types.js';
4
4
  /**
@@ -19,7 +19,7 @@ type AnalyticsParams = {
19
19
  /**
20
20
  * Analytics scripting object
21
21
  */
22
- export declare class Analytics extends ScriptingObject implements IAnalytics {
22
+ export declare class Analytics extends ssfHost.ScriptingObject implements IAnalytics {
23
23
  #private;
24
24
  /**
25
25
  * Creates new instance of Analytics scripting object
@@ -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<Partial<ScriptingObjectTypes>, Events>;
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 };
@@ -1,18 +1,14 @@
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';
5
2
  import { BreakPoint } from '@elliemae/pui-theme';
6
3
  import { Logger } from '@elliemae/pui-diagnostics';
7
- import { IMicroFEHost } from '@elliemae/pui-app-bridge';
8
4
  import { LoginParams } from './auth/types';
9
- export type EMUI<AppObjects extends ScriptingObjects = Partial<ScriptingObjectTypes>, AppEvents extends EventListeners = Events> = {
10
- [key: string]: IMicroAppGuest<AppObjects, AppEvents> | IMicroAppGuest<AppObjects, AppEvents>[];
5
+ export type EMUI = {
6
+ [key: string]: IMicroAppGuest | IMicroAppGuest[];
11
7
  } & {
12
8
  _BASE_PATH: string;
13
9
  _ASSET_PATH: string;
14
10
  version: string;
15
- MicroAppHost?: IMicroFEHost<AppObjects, AppEvents> | IMicroAppHost | SSFGuest<AppObjects, AppEvents>;
11
+ MicroAppHost?: IMicroAppHost;
16
12
  logger?: Logger;
17
13
  appId: string;
18
14
  uuid: string;
@@ -20,15 +16,12 @@ export type EMUI<AppObjects extends ScriptingObjects = Partial<ScriptingObjectTy
20
16
  loginParams: LoginParams;
21
17
  };
22
18
  declare global {
23
- interface Window<AppObjects extends ScriptingObjects = Partial<ScriptingObjectTypes>, AppEvents extends EventListeners = Events> {
19
+ interface Window {
24
20
  gtmDataLayer: BAEvent[];
25
- emui: EMUI<AppObjects, AppEvents>;
26
- __TEST__: {
27
- [key: string]: unknown;
28
- };
21
+ emui: EMUI;
29
22
  }
30
23
  }
31
- export declare const getWindow: () => WindowProxy;
24
+ export declare const getWindow: () => Window;
32
25
  export declare const getViewportSize: () => {
33
26
  width: number;
34
27
  height: number;
@@ -3,6 +3,7 @@ interface LoginParams {
3
3
  scope: string;
4
4
  responseType: string;
5
5
  children: React.ReactNode;
6
+ isConsumerUser: boolean;
6
7
  }
7
- export declare const Login: ({ clientId, scope, responseType, children, }: LoginParams) => import("react/jsx-runtime.js").JSX.Element | null;
8
+ export declare const Login: ({ clientId, scope, responseType, children, isConsumerUser, }: LoginParams) => import("react/jsx-runtime.js").JSX.Element | null;
8
9
  export {};
@@ -1,7 +1,2 @@
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
- */
7
2
  export declare const MicroApp: import("react").NamedExoticComponent<MicroAppProps>;
@@ -2,10 +2,5 @@ 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
- */
10
5
  export declare const MicroIFrameApp: import("react").NamedExoticComponent<Props>;
11
6
  export {};
@@ -3,5 +3,6 @@ export interface RequireAuthProps {
3
3
  scope?: string;
4
4
  responseType?: string;
5
5
  children: React.ReactNode;
6
+ isConsumerUser?: boolean;
6
7
  }
7
- export declare const RequireAuth: ({ children, clientId, scope, responseType, }: RequireAuthProps) => import("react/jsx-runtime.js").JSX.Element;
8
+ export declare const RequireAuth: ({ children, clientId, scope, responseType, isConsumerUser, }: RequireAuthProps) => import("react/jsx-runtime.js").JSX.Element;