@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.
- package/dist/cjs/utils/micro-frontend/host.js +4 -4
- package/dist/cjs/utils/window.js +4 -2
- package/dist/es/utils/micro-frontend/host.js +5 -5
- package/dist/es/utils/window.js +3 -2
- package/dist/types/utils/testing/render-with-redux.d.ts +1 -1
- package/dist/types/utils/testing/render-with-router.d.ts +1 -1
- package/dist/types/utils/window.d.ts +2 -2
- package/package.json +1 -1
|
@@ -89,11 +89,11 @@ class CMicroAppHost {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
getItem(key) {
|
|
92
|
-
return
|
|
92
|
+
return (0, _window.getWindow)().sessionStorage.getItem(key);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
setItem(key, value) {
|
|
96
|
-
|
|
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
|
|
143
|
+
return (0, _window.getWindow)().sessionStorage.getItem('Authorization');
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
renewAuthToken() {
|
|
147
|
-
return
|
|
147
|
+
return (0, _window.getWindow)().sessionStorage.getItem('Authorization');
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
logout() {
|
package/dist/cjs/utils/window.js
CHANGED
|
@@ -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
|
-
|
|
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
|
|
75
|
+
return getWindow().sessionStorage.getItem(key);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
setItem(key, value) {
|
|
79
|
-
|
|
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
|
|
126
|
+
return getWindow().sessionStorage.getItem('Authorization');
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
renewAuthToken() {
|
|
130
|
-
return
|
|
130
|
+
return getWindow().sessionStorage.getItem('Authorization');
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
logout() {
|
package/dist/es/utils/window.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDefaultTheme } from '@elliemae/pui-theme';
|
|
2
|
-
export
|
|
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
|
|
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
|
|
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
|
|
17
|
-
export 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;
|