@elliemae/pui-app-sdk 1.86.0 → 1.86.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.
@@ -89,11 +89,11 @@ class CMicroAppHost {
89
89
  }
90
90
 
91
91
  getItem(key) {
92
- return window.parent.sessionStorage.getItem(key);
92
+ return (0, _window.getWindow)().sessionStorage.getItem(key);
93
93
  }
94
94
 
95
95
  setItem(key, value) {
96
- window.parent.sessionStorage.setItem(key, value);
96
+ (0, _window.getWindow)().sessionStorage.setItem(key, value);
97
97
  }
98
98
 
99
99
  getGuests() {
@@ -140,11 +140,11 @@ class CMicroAppHost {
140
140
  }
141
141
 
142
142
  getAuthToken() {
143
- return window.parent.sessionStorage.getItem('Authorization');
143
+ return (0, _window.getWindow)().sessionStorage.getItem('Authorization');
144
144
  }
145
145
 
146
146
  renewAuthToken() {
147
- return window.parent.sessionStorage.getItem('Authorization');
147
+ return (0, _window.getWindow)().sessionStorage.getItem('Authorization');
148
148
  }
149
149
 
150
150
  logout() {
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.getViewportSize = exports.getCurrentBreakpoint = exports.default = void 0;
6
+ exports.getWindow = exports.getViewportSize = exports.getCurrentBreakpoint = exports.default = void 0;
7
7
 
8
8
  var _puiTheme = require("@elliemae/pui-theme");
9
9
 
10
- var _default = () => {
10
+ const getWindow = () => {
11
11
  try {
12
12
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
13
13
  window.parent.document;
@@ -17,6 +17,8 @@ var _default = () => {
17
17
  }
18
18
  };
19
19
 
20
+ exports.getWindow = getWindow;
21
+ var _default = getWindow;
20
22
  exports.default = _default;
21
23
 
22
24
  const getViewportSize = () => ({
@@ -14,7 +14,7 @@ import { loadAppConfig } from "../app-config/index.js";
14
14
  import browserHistory from "../history.js";
15
15
  import { logger } from "./console-logger.js";
16
16
  import { HOST_WINDOW_RESIZED, HOST_WINDOW_BREAKPOINT_CHANGED } from "../constants.js";
17
- import { getCurrentBreakpoint, getViewportSize as getWindowViewportSize } from "../window.js";
17
+ import { getCurrentBreakpoint, getViewportSize as getWindowViewportSize, getWindow } from "../window.js";
18
18
  export class CMicroAppHost {
19
19
  constructor(params) {
20
20
  _defineProperty(this, "logger", void 0);
@@ -72,11 +72,11 @@ export class CMicroAppHost {
72
72
  }
73
73
 
74
74
  getItem(key) {
75
- return window.parent.sessionStorage.getItem(key);
75
+ return getWindow().sessionStorage.getItem(key);
76
76
  }
77
77
 
78
78
  setItem(key, value) {
79
- window.parent.sessionStorage.setItem(key, value);
79
+ getWindow().sessionStorage.setItem(key, value);
80
80
  }
81
81
 
82
82
  getGuests() {
@@ -123,11 +123,11 @@ export class CMicroAppHost {
123
123
  }
124
124
 
125
125
  getAuthToken() {
126
- return window.parent.sessionStorage.getItem('Authorization');
126
+ return getWindow().sessionStorage.getItem('Authorization');
127
127
  }
128
128
 
129
129
  renewAuthToken() {
130
- return window.parent.sessionStorage.getItem('Authorization');
130
+ return getWindow().sessionStorage.getItem('Authorization');
131
131
  }
132
132
 
133
133
  logout() {
@@ -1,5 +1,5 @@
1
1
  import { getDefaultTheme } from '@elliemae/pui-theme';
2
- export default (() => {
2
+ export const getWindow = () => {
3
3
  try {
4
4
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
5
5
  window.parent.document;
@@ -7,7 +7,8 @@ export default (() => {
7
7
  } catch (err) {
8
8
  return window;
9
9
  }
10
- });
10
+ };
11
+ export default getWindow;
11
12
  export const getViewportSize = () => ({
12
13
  width: Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0),
13
14
  height: Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0)
@@ -5,7 +5,7 @@ export function renderWithRedux(ui: any, { initialState, store }?: {
5
5
  store: any;
6
6
  container: HTMLElement;
7
7
  baseElement: Element;
8
- debug: (baseElement?: Element | DocumentFragment | (Element | DocumentFragment)[] | undefined, maxLength?: number | undefined, options?: import("pretty-format/build/types").PrettyFormatOptions | undefined) => void;
8
+ debug: (baseElement?: Element | DocumentFragment | (Element | DocumentFragment)[] | undefined, maxLength?: number | undefined, options?: import("pretty-format").PrettyFormatOptions | undefined) => void;
9
9
  rerender: (ui: React.ReactElement<any, string | React.JSXElementConstructor<any>>) => void;
10
10
  unmount: () => void;
11
11
  asFragment: () => DocumentFragment;
@@ -5,7 +5,7 @@ export function renderWithRouter(ui: any, { route, history, }?: {
5
5
  history: import("history").MemoryHistory<unknown>;
6
6
  container: HTMLElement;
7
7
  baseElement: Element;
8
- debug: (baseElement?: Element | DocumentFragment | (Element | DocumentFragment)[] | undefined, maxLength?: number | undefined, options?: import("pretty-format/build/types").PrettyFormatOptions | undefined) => void;
8
+ debug: (baseElement?: Element | DocumentFragment | (Element | DocumentFragment)[] | undefined, maxLength?: number | undefined, options?: import("pretty-format").PrettyFormatOptions | undefined) => void;
9
9
  rerender: (ui: React.ReactElement<any, string | React.JSXElementConstructor<any>>) => void;
10
10
  unmount: () => void;
11
11
  asFragment: () => DocumentFragment;
@@ -13,8 +13,8 @@ declare global {
13
13
  emui: EMUI;
14
14
  }
15
15
  }
16
- declare const _default: () => Window;
17
- export default _default;
16
+ export declare const getWindow: () => Window;
17
+ export default getWindow;
18
18
  export declare const getViewportSize: () => {
19
19
  width: number;
20
20
  height: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-app-sdk",
3
- "version": "1.86.0",
3
+ "version": "1.86.1",
4
4
  "description": "ICE MT UI Platform Application SDK ",
5
5
  "sideEffects": [
6
6
  "./utils/app-config/config.js",