@elliemae/pui-app-sdk 2.17.0 → 2.19.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.
- package/dist/cjs/analytics/page-view-event.js +15 -2
- package/dist/cjs/view/header/logo-region/index.js +2 -2
- package/dist/cjs/view/header/nav-region/notification/index.js +2 -2
- package/dist/cjs/view/header/nav-region/user/index.js +2 -2
- package/dist/cjs/view/micro-app/app-factory/index.js +1 -0
- package/dist/cjs/view/micro-app/resources/manifest.js +1 -0
- package/dist/cjs/view/micro-iframe-app/use-frame-loaded.js +1 -0
- package/dist/es/analytics/page-view-event.js +16 -2
- package/dist/es/view/header/logo-region/index.js +1 -1
- package/dist/es/view/header/nav-region/notification/index.js +1 -1
- package/dist/es/view/header/nav-region/user/index.js +1 -1
- package/dist/es/view/micro-app/app-factory/index.js +1 -0
- package/dist/es/view/micro-app/resources/manifest.js +1 -0
- package/dist/es/view/micro-iframe-app/use-frame-loaded.js +1 -0
- package/dist/types/utils/micro-frontend/guest.d.ts +1 -1
- package/dist/types/view/micro-app/app-factory/index.d.ts +1 -1
- package/dist/types/view/micro-app/resources/manifest.d.ts +2 -2
- package/package.json +10 -10
- package/dist/cjs/typings/custom.d.js +0 -1
- package/dist/cjs/typings/elliemae.d.js +0 -1
- package/dist/cjs/typings/styled.d.js +0 -3
- package/dist/cjs/typings/thirdparty.d.js +0 -0
- package/dist/es/typings/custom.d.js +0 -0
- package/dist/es/typings/elliemae.d.js +0 -0
- package/dist/es/typings/styled.d.js +0 -1
- package/dist/es/typings/thirdparty.d.js +0 -0
|
@@ -7,16 +7,29 @@ exports.pageViewEvent = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _index = require("./index.js");
|
|
9
9
|
|
|
10
|
+
const getWindow = () => {
|
|
11
|
+
try {
|
|
12
|
+
var _window$top;
|
|
13
|
+
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
15
|
+
(_window$top = window.top) === null || _window$top === void 0 ? void 0 : _window$top.document;
|
|
16
|
+
return window.top || window.self;
|
|
17
|
+
} catch (e) {
|
|
18
|
+
return window.self;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
|
|
10
22
|
const pageViewEvent = ({
|
|
11
23
|
pageTitle
|
|
12
24
|
}) => {
|
|
25
|
+
const pageWindow = getWindow();
|
|
13
26
|
const {
|
|
14
27
|
pathname,
|
|
15
28
|
href
|
|
16
|
-
} =
|
|
29
|
+
} = pageWindow.location;
|
|
17
30
|
const {
|
|
18
31
|
title
|
|
19
|
-
} =
|
|
32
|
+
} = pageWindow.document;
|
|
20
33
|
const {
|
|
21
34
|
pathname: guestPagePath,
|
|
22
35
|
href: guestPageUrl
|
|
@@ -11,7 +11,7 @@ var _jsx2 = _interopRequireDefault(require("@babel/runtime/helpers/jsx"));
|
|
|
11
11
|
|
|
12
12
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
13
|
|
|
14
|
-
var _logo = require("./logo.svg");
|
|
14
|
+
var _logo = _interopRequireDefault(require("./logo.svg"));
|
|
15
15
|
|
|
16
16
|
var _LogoContainer;
|
|
17
17
|
|
|
@@ -19,6 +19,6 @@ const LogoContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
|
19
19
|
componentId: "sc-a4sia6-0"
|
|
20
20
|
})(["align-self:center;"]);
|
|
21
21
|
|
|
22
|
-
const LogoRegion = () => _LogoContainer || (_LogoContainer = /*#__PURE__*/(0, _jsx2.default)(LogoContainer, {}, void 0, /*#__PURE__*/(0, _jsx2.default)(_logo.
|
|
22
|
+
const LogoRegion = () => _LogoContainer || (_LogoContainer = /*#__PURE__*/(0, _jsx2.default)(LogoContainer, {}, void 0, /*#__PURE__*/(0, _jsx2.default)(_logo.default, {})));
|
|
23
23
|
|
|
24
24
|
exports.LogoRegion = LogoRegion;
|
|
@@ -9,13 +9,13 @@ exports.Notification = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _jsx2 = _interopRequireDefault(require("@babel/runtime/helpers/jsx"));
|
|
11
11
|
|
|
12
|
-
var _index = require("./index.svg");
|
|
12
|
+
var _index = _interopRequireDefault(require("./index.svg"));
|
|
13
13
|
|
|
14
14
|
var _a;
|
|
15
15
|
|
|
16
16
|
const Notification = () => /*#__PURE__*/(0, _jsx2.default)("li", {}, void 0, _a || (_a = /*#__PURE__*/(0, _jsx2.default)("a", {
|
|
17
17
|
href: "#",
|
|
18
18
|
"aria-label": "Notifications"
|
|
19
|
-
}, void 0, /*#__PURE__*/(0, _jsx2.default)(_index.
|
|
19
|
+
}, void 0, /*#__PURE__*/(0, _jsx2.default)(_index.default, {}))));
|
|
20
20
|
|
|
21
21
|
exports.Notification = Notification;
|
|
@@ -9,13 +9,13 @@ exports.User = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _jsx2 = _interopRequireDefault(require("@babel/runtime/helpers/jsx"));
|
|
11
11
|
|
|
12
|
-
var _index = require("./index.svg");
|
|
12
|
+
var _index = _interopRequireDefault(require("./index.svg"));
|
|
13
13
|
|
|
14
14
|
var _a;
|
|
15
15
|
|
|
16
16
|
const User = () => /*#__PURE__*/(0, _jsx2.default)("li", {}, void 0, _a || (_a = /*#__PURE__*/(0, _jsx2.default)("a", {
|
|
17
17
|
href: "#",
|
|
18
18
|
"aria-label": "profile"
|
|
19
|
-
}, void 0, /*#__PURE__*/(0, _jsx2.default)(_index.
|
|
19
|
+
}, void 0, /*#__PURE__*/(0, _jsx2.default)(_index.default, {}))));
|
|
20
20
|
|
|
21
21
|
exports.User = User;
|
|
@@ -175,6 +175,7 @@ const unloadApp = ({
|
|
|
175
175
|
hostUrl,
|
|
176
176
|
documentEle
|
|
177
177
|
}) => {
|
|
178
|
+
if (!hostUrl) throw new Error('hostUrl is required');
|
|
178
179
|
(0, _index.getLogger)().info(_logRecords.logRecords.APP_UNLOADING(id));
|
|
179
180
|
const app = (window.emui || {})[id];
|
|
180
181
|
if (!app) return;
|
|
@@ -19,6 +19,7 @@ const getAppManifest = async ({
|
|
|
19
19
|
hostUrl,
|
|
20
20
|
manifestPath
|
|
21
21
|
}) => {
|
|
22
|
+
if (!hostUrl || !manifestPath) throw new Error('Missing required parameters');
|
|
22
23
|
const url = new URL(`${manifestPath.replace(/\/?$/, '/')}manifest.json`, hostUrl);
|
|
23
24
|
const response = await (0, _index.getHTTPClient)().get((0, _url.removeDoubleSlash)(url.href));
|
|
24
25
|
const {
|
|
@@ -20,6 +20,7 @@ const addBaseTag = (id, documentEle) => {
|
|
|
20
20
|
} = (0, _index.getMicroFrontEndAppConfig)({
|
|
21
21
|
id
|
|
22
22
|
});
|
|
23
|
+
if (!hostUrl || !manifestPath) throw new Error('hostUrl or manifestPath is not defined');
|
|
23
24
|
const base = documentEle.createElement('base');
|
|
24
25
|
base.href = new URL(manifestPath, hostUrl).href;
|
|
25
26
|
documentEle.getElementsByTagName('head')[0].appendChild(base);
|
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
import { sendBAEvent } from "./index.js";
|
|
2
|
+
|
|
3
|
+
const getWindow = () => {
|
|
4
|
+
try {
|
|
5
|
+
var _window$top;
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
8
|
+
(_window$top = window.top) === null || _window$top === void 0 ? void 0 : _window$top.document;
|
|
9
|
+
return window.top || window.self;
|
|
10
|
+
} catch (e) {
|
|
11
|
+
return window.self;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
2
15
|
export const pageViewEvent = ({
|
|
3
16
|
pageTitle
|
|
4
17
|
}) => {
|
|
18
|
+
const pageWindow = getWindow();
|
|
5
19
|
const {
|
|
6
20
|
pathname,
|
|
7
21
|
href
|
|
8
|
-
} =
|
|
22
|
+
} = pageWindow.location;
|
|
9
23
|
const {
|
|
10
24
|
title
|
|
11
|
-
} =
|
|
25
|
+
} = pageWindow.document;
|
|
12
26
|
const {
|
|
13
27
|
pathname: guestPagePath,
|
|
14
28
|
href: guestPageUrl
|
|
@@ -3,7 +3,7 @@ import _jsx from "@babel/runtime/helpers/jsx";
|
|
|
3
3
|
var _LogoContainer;
|
|
4
4
|
|
|
5
5
|
import styled from 'styled-components';
|
|
6
|
-
import
|
|
6
|
+
import LogoImg from "./logo.svg";
|
|
7
7
|
const LogoContainer = /*#__PURE__*/styled.div.withConfig({
|
|
8
8
|
componentId: "sc-a4sia6-0"
|
|
9
9
|
})(["align-self:center;"]);
|
|
@@ -2,7 +2,7 @@ import _jsx from "@babel/runtime/helpers/jsx";
|
|
|
2
2
|
|
|
3
3
|
var _a;
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import NotificationIcon from "./index.svg";
|
|
6
6
|
export const Notification = () => /*#__PURE__*/_jsx("li", {}, void 0, _a || (_a = /*#__PURE__*/_jsx("a", {
|
|
7
7
|
href: "#",
|
|
8
8
|
"aria-label": "Notifications"
|
|
@@ -2,7 +2,7 @@ import _jsx from "@babel/runtime/helpers/jsx";
|
|
|
2
2
|
|
|
3
3
|
var _a;
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import UserIcon from "./index.svg";
|
|
6
6
|
export const User = () => /*#__PURE__*/_jsx("li", {}, void 0, _a || (_a = /*#__PURE__*/_jsx("a", {
|
|
7
7
|
href: "#",
|
|
8
8
|
"aria-label": "profile"
|
|
@@ -9,6 +9,7 @@ export const getAppManifest = async ({
|
|
|
9
9
|
hostUrl,
|
|
10
10
|
manifestPath
|
|
11
11
|
}) => {
|
|
12
|
+
if (!hostUrl || !manifestPath) throw new Error('Missing required parameters');
|
|
12
13
|
const url = new URL(`${manifestPath.replace(/\/?$/, '/')}manifest.json`, hostUrl);
|
|
13
14
|
const response = await getHTTPClient().get(removeDoubleSlash(url.href));
|
|
14
15
|
const {
|
|
@@ -10,6 +10,7 @@ const addBaseTag = (id, documentEle) => {
|
|
|
10
10
|
} = getMicroFrontEndAppConfig({
|
|
11
11
|
id
|
|
12
12
|
});
|
|
13
|
+
if (!hostUrl || !manifestPath) throw new Error('hostUrl or manifestPath is not defined');
|
|
13
14
|
const base = documentEle.createElement('base');
|
|
14
15
|
base.href = new URL(manifestPath, hostUrl).href;
|
|
15
16
|
documentEle.getElementsByTagName('head')[0].appendChild(base);
|
|
@@ -33,7 +33,7 @@ export declare class CMicroAppGuest implements IMicroAppGuest {
|
|
|
33
33
|
static getInstance(params?: ConstructorParams): CMicroAppGuest;
|
|
34
34
|
static isInitialized(): boolean;
|
|
35
35
|
static isHosted(): boolean;
|
|
36
|
-
getHost(): IMicroAppHost;
|
|
36
|
+
getHost(): IMicroAppHost | undefined;
|
|
37
37
|
getLogger(): MicroFrontEndLogger;
|
|
38
38
|
getProps(): GuestProps;
|
|
39
39
|
private getSessionStorageItem;
|
|
@@ -4,6 +4,6 @@ export declare const unmountApp: ({ id, name }: MicroAppConfig) => Promise<void
|
|
|
4
4
|
export declare const loadApp: (appConfig: MicroAppConfig) => Promise<void>;
|
|
5
5
|
export declare const unloadApp: ({ id, hostUrl, documentEle, }: {
|
|
6
6
|
id: string;
|
|
7
|
-
hostUrl
|
|
7
|
+
hostUrl?: string | undefined;
|
|
8
8
|
documentEle: HTMLDocument;
|
|
9
9
|
}) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare type Manifest = Record<string, string>;
|
|
2
2
|
export declare const getAppManifest: ({ hostUrl, manifestPath, }: {
|
|
3
|
-
hostUrl
|
|
4
|
-
manifestPath
|
|
3
|
+
hostUrl?: string | undefined;
|
|
4
|
+
manifestPath?: string | undefined;
|
|
5
5
|
}) => Promise<Manifest>;
|
|
6
6
|
export declare const getFullFileNameofAssetsFromManifest: (manifest: Record<string, string>, assetNames?: Array<string>) => Array<string>;
|
|
7
7
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-app-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.19.0",
|
|
4
4
|
"description": "ICE MT UI Platform Application SDK ",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
@@ -94,10 +94,10 @@
|
|
|
94
94
|
"@elliemae/ds-modal": "^1.60.0",
|
|
95
95
|
"@elliemae/ds-popperjs": "^1.60.0",
|
|
96
96
|
"@elliemae/em-ssf-guest": "^1.11.1",
|
|
97
|
-
"@elliemae/pui-diagnostics": "^2.7.
|
|
98
|
-
"@elliemae/pui-micro-frontend-base": "^1.
|
|
99
|
-
"@elliemae/pui-theme": "^2.
|
|
100
|
-
"@elliemae/pui-user-monitoring": "^1.
|
|
97
|
+
"@elliemae/pui-diagnostics": "^2.7.2",
|
|
98
|
+
"@elliemae/pui-micro-frontend-base": "^1.10.0",
|
|
99
|
+
"@elliemae/pui-theme": "^2.3.0",
|
|
100
|
+
"@elliemae/pui-user-monitoring": "^1.12.1"
|
|
101
101
|
},
|
|
102
102
|
"devDependencies": {
|
|
103
103
|
"@elliemae/app-react-dependencies": "~2.10.0",
|
|
@@ -107,11 +107,11 @@
|
|
|
107
107
|
"@elliemae/ds-modal": "~1.60.0",
|
|
108
108
|
"@elliemae/ds-popperjs": "~1.60.0",
|
|
109
109
|
"@elliemae/em-ssf-guest": "~1.11.1",
|
|
110
|
-
"@elliemae/pui-cli": "~5.
|
|
111
|
-
"@elliemae/pui-diagnostics": "~2.7.
|
|
110
|
+
"@elliemae/pui-cli": "~5.21.1",
|
|
111
|
+
"@elliemae/pui-diagnostics": "~2.7.2",
|
|
112
112
|
"@elliemae/pui-e2e-test-sdk": "~6.8.0",
|
|
113
|
-
"@elliemae/pui-micro-frontend-base": "~1.
|
|
114
|
-
"@elliemae/pui-theme": "~2.
|
|
115
|
-
"@elliemae/pui-user-monitoring": "~1.
|
|
113
|
+
"@elliemae/pui-micro-frontend-base": "~1.10.0",
|
|
114
|
+
"@elliemae/pui-theme": "~2.3.0",
|
|
115
|
+
"@elliemae/pui-user-monitoring": "~1.12.1"
|
|
116
116
|
}
|
|
117
117
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import 'styled-components';
|
|
File without changes
|