@elliemae/pui-app-sdk 5.14.0 → 5.14.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/index.js CHANGED
@@ -80,6 +80,7 @@ __export(lib_exports, {
80
80
  createManager: () => import_redux_injectors.createManager,
81
81
  createSideEffect: () => import_listenerMiddleware.createSideEffect,
82
82
  enableReactAppForHostIntegration: () => import_react2.enableReactAppForHostIntegration,
83
+ endSession: () => import_auth.endSession,
83
84
  error: () => import_error.actions,
84
85
  errorMiddleware: () => import_errorMiddleware.errorMiddleware,
85
86
  fetchHostAppData: () => import_fetch_host_app_data.fetchHostAppData,
@@ -98,6 +99,7 @@ __export(lib_exports, {
98
99
  getStore: () => import_store3.getStore,
99
100
  globalConstants: () => import_constants.default,
100
101
  history: () => import_history.browserHistory,
102
+ httpClientProps: () => import_props.httpClientProps,
101
103
  initServiceWorker: () => import_service_worker.initServiceWorker,
102
104
  isCIBuild: () => import_helpers.isCIBuild,
103
105
  isProd: () => import_helpers.isProd,
@@ -151,6 +153,7 @@ module.exports = __toCommonJS(lib_exports);
151
153
  var import_auth = require("./utils/auth/index.js");
152
154
  var import_loginParams = require("./utils/auth/loginParams.js");
153
155
  var import_http_client = require("./communication/http-client/index.js");
156
+ var import_props = require("./communication/http-client/props.js");
154
157
  var import_baseQuery = require("./communication/http-client/baseQuery.js");
155
158
  var import_response_interceptor = require("./communication/http-client/response-interceptor.js");
156
159
  var import_actions = require("./data/auth/actions.js");
@@ -43,6 +43,7 @@ var import_web_storage = require("../web-storage.js");
43
43
  var import_web_analytics = require("./scripting-objects/web-analytics.js");
44
44
  var import_appdynamics = require("../../analytics/appdynamics.js");
45
45
  var import_ssfguest_adapter = require("./ssfguest-adapter.js");
46
+ var import_host_app = require("./host-app.js");
46
47
  const isCrossDomain = () => {
47
48
  try {
48
49
  window.parent.document;
@@ -140,6 +141,7 @@ class CMicroAppGuest {
140
141
  const host = await this.getSSFAdapter();
141
142
  if (host) this.props.host = host;
142
143
  }
144
+ if (this.props.host) (0, import_host_app.setHostApp)(this.props.host);
143
145
  __webpack_public_path__ = __webpack_public_path__.replace(/\/?$/, "/");
144
146
  return (0, import_app_config.loadAppConfig)().then(() => {
145
147
  const instanceId = this.getSessionStorageItem("instanceId") || "";
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var host_app_exports = {};
20
+ __export(host_app_exports, {
21
+ getHostApp: () => getHostApp,
22
+ setHostApp: () => setHostApp
23
+ });
24
+ module.exports = __toCommonJS(host_app_exports);
25
+ let hostApp = null;
26
+ const setHostApp = (host) => {
27
+ hostApp = host;
28
+ };
29
+ const getHostApp = () => hostApp;
@@ -38,6 +38,7 @@ var import_appdynamics = require("../../analytics/appdynamics.js");
38
38
  var import_analytics = require("./scripting-objects/analytics.js");
39
39
  var import_web_analytics = require("./scripting-objects/web-analytics.js");
40
40
  var import_session = require("../session.js");
41
+ var import_host_app = require("./host-app.js");
41
42
  class CMicroAppHost {
42
43
  static instance;
43
44
  logger;
@@ -89,6 +90,7 @@ class CMicroAppHost {
89
90
  static getInstance(params) {
90
91
  if (!this.instance) {
91
92
  this.instance = new this(params);
93
+ (0, import_host_app.setHostApp)(this.instance);
92
94
  }
93
95
  return this.instance;
94
96
  }
package/dist/esm/index.js CHANGED
@@ -1,9 +1,15 @@
1
- import { isUserAuthorized, login, authorize } from "./utils/auth/index.js";
1
+ import {
2
+ isUserAuthorized,
3
+ login,
4
+ authorize,
5
+ endSession
6
+ } from "./utils/auth/index.js";
2
7
  import { setLoginParams } from "./utils/auth/loginParams.js";
3
8
  import {
4
9
  getHTTPClient,
5
10
  getAuthHTTPClient
6
11
  } from "./communication/http-client/index.js";
12
+ import { httpClientProps } from "./communication/http-client/props.js";
7
13
  import { sdkBaseQuery } from "./communication/http-client/baseQuery.js";
8
14
  import { onAuthorizationFailure } from "./communication/http-client/response-interceptor.js";
9
15
  import { auth } from "./data/auth/actions.js";
@@ -186,6 +192,7 @@ export {
186
192
  createManager,
187
193
  createSideEffect,
188
194
  enableReactAppForHostIntegration,
195
+ endSession,
189
196
  actions2 as error,
190
197
  errorMiddleware,
191
198
  fetchHostAppData,
@@ -204,6 +211,7 @@ export {
204
211
  getStore,
205
212
  default2 as globalConstants,
206
213
  browserHistory as history,
214
+ httpClientProps,
207
215
  initServiceWorker,
208
216
  isCIBuild,
209
217
  isProd,
@@ -10,6 +10,7 @@ import { removeStorageEvents } from "../web-storage.js";
10
10
  import { updateBAEventParameters } from "./scripting-objects/web-analytics.js";
11
11
  import { setAppDynamicsUserData } from "../../analytics/appdynamics.js";
12
12
  import { SSFGuestAdapter } from "./ssfguest-adapter.js";
13
+ import { setHostApp } from "./host-app.js";
13
14
  const isCrossDomain = () => {
14
15
  try {
15
16
  window.parent.document;
@@ -107,6 +108,7 @@ class CMicroAppGuest {
107
108
  const host = await this.getSSFAdapter();
108
109
  if (host) this.props.host = host;
109
110
  }
111
+ if (this.props.host) setHostApp(this.props.host);
110
112
  __webpack_public_path__ = __webpack_public_path__.replace(/\/?$/, "/");
111
113
  return loadAppConfig().then(() => {
112
114
  const instanceId = this.getSessionStorageItem("instanceId") || "";
@@ -0,0 +1,9 @@
1
+ let hostApp = null;
2
+ const setHostApp = (host) => {
3
+ hostApp = host;
4
+ };
5
+ const getHostApp = () => hostApp;
6
+ export {
7
+ getHostApp,
8
+ setHostApp
9
+ };
@@ -22,6 +22,7 @@ import { setAppDynamicsUserData } from "../../analytics/appdynamics.js";
22
22
  import { Analytics } from "./scripting-objects/analytics.js";
23
23
  import { updateBAEventParameters } from "./scripting-objects/web-analytics.js";
24
24
  import { renewSession } from "../session.js";
25
+ import { setHostApp } from "./host-app.js";
25
26
  class CMicroAppHost {
26
27
  static instance;
27
28
  logger;
@@ -73,6 +74,7 @@ class CMicroAppHost {
73
74
  static getInstance(params) {
74
75
  if (!this.instance) {
75
76
  this.instance = new this(params);
77
+ setHostApp(this.instance);
76
78
  }
77
79
  return this.instance;
78
80
  }
@@ -1,6 +1,7 @@
1
- export { isUserAuthorized, login, authorize } from './utils/auth/index.js';
1
+ export { isUserAuthorized, login, authorize, endSession, } from './utils/auth/index.js';
2
2
  export { setLoginParams } from './utils/auth/loginParams.js';
3
3
  export { getHTTPClient, getAuthHTTPClient, } from './communication/http-client/index.js';
4
+ export { httpClientProps } from './communication/http-client/props.js';
4
5
  export { sdkBaseQuery } from './communication/http-client/baseQuery.js';
5
6
  export { onAuthorizationFailure } from './communication/http-client/response-interceptor.js';
6
7
  export { auth } from './data/auth/actions.js';
@@ -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;