@elliemae/pui-app-sdk 3.7.0 → 4.0.0-alpha.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.
Files changed (80) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/app.config.json +42 -25
  3. package/dist/cjs/utils/app-config/config.js +2 -1
  4. package/dist/cjs/utils/app-config/index.js +3 -2
  5. package/dist/cjs/utils/micro-frontend/guest.js +1 -5
  6. package/dist/cjs/utils/micro-frontend/host.js +1 -1
  7. package/dist/cjs/utils/storybook/cjs/webpack.js +1 -4
  8. package/dist/cjs/utils/storybook/preview.js +1 -1
  9. package/dist/cjs/utils/testing/index.js +1 -1
  10. package/dist/cjs/utils/testing/render-with-redux.js +1 -1
  11. package/dist/cjs/utils/testing/render-with-router-redux.js +1 -1
  12. package/dist/cjs/utils/testing/render-with-router.js +1 -1
  13. package/dist/cjs/utils/testing/render-with-state-addons.js +1 -1
  14. package/dist/cjs/utils/window.js +2 -0
  15. package/dist/cjs/view/app-root/hosted-app.js +1 -1
  16. package/dist/cjs/view/app-root/index.js +4 -3
  17. package/dist/cjs/view/app-root/stand-alone-app.js +1 -1
  18. package/dist/cjs/view/app-router.js +1 -1
  19. package/dist/cjs/view/error-boundary/default-error-template.js +5 -2
  20. package/dist/cjs/view/error-toast/index.js +1 -1
  21. package/dist/cjs/view/fields/check-box/index.js +1 -1
  22. package/dist/cjs/view/fields/combo-box/index.js +1 -1
  23. package/dist/cjs/view/fields/date-input/index.js +1 -1
  24. package/dist/cjs/view/fields/date-picker/index.js +1 -1
  25. package/dist/cjs/view/fields/date-range-picker/index.js +1 -1
  26. package/dist/cjs/view/fields/date-time-picker/index.js +1 -1
  27. package/dist/cjs/view/fields/form-item-layout/index.js +1 -1
  28. package/dist/cjs/view/fields/form-layout-block-item/index.js +1 -1
  29. package/dist/cjs/view/fields/input-mask/index.js +1 -1
  30. package/dist/cjs/view/fields/input-text/index.js +1 -1
  31. package/dist/cjs/view/fields/large-text-box/index.js +1 -1
  32. package/dist/cjs/view/fields/radio/index.js +1 -1
  33. package/dist/cjs/view/fields/radio-group/index.js +1 -1
  34. package/dist/cjs/view/fields/text-box/index.js +1 -1
  35. package/dist/cjs/view/fields/toggle/index.js +1 -1
  36. package/dist/cjs/view/fields/watch-value.js +1 -1
  37. package/dist/cjs/view/form/index.js +1 -1
  38. package/dist/cjs/view/form/personal-info-section.js +1 -1
  39. package/dist/cjs/view/form/submit-button/index.js +1 -1
  40. package/dist/cjs/view/live-message/index.js +1 -1
  41. package/dist/cjs/view/loadable/index.js +1 -1
  42. package/dist/cjs/view/micro-app/index.js +1 -1
  43. package/dist/cjs/view/micro-app/resources/script.js +19 -15
  44. package/dist/cjs/view/micro-app/resources/style.js +15 -11
  45. package/dist/cjs/view/micro-iframe-app/app.js +2 -2
  46. package/dist/cjs/view/micro-iframe-app/iframe/index.js +1 -1
  47. package/dist/cjs/view/micro-iframe-app/index.js +1 -1
  48. package/dist/cjs/view/modals/error/index.js +1 -1
  49. package/dist/cjs/view/modals/navigation-prompt/index.js +1 -1
  50. package/dist/cjs/view/modals/session-expiry/index.js +1 -1
  51. package/dist/cjs/view/modals/wait-message/index.js +1 -1
  52. package/dist/cjs/view/page.js +1 -1
  53. package/dist/cjs/view/render-with-delay/index.js +1 -1
  54. package/dist/cjs/view/render-with-host-data/index.js +1 -1
  55. package/dist/cjs/view/require-auth.js +1 -1
  56. package/dist/cjs/view/session-timeout/index.js +1 -1
  57. package/dist/cjs/view/storybook/decorator.js +1 -1
  58. package/dist/cjs/view/visually-hidden/index.js +1 -1
  59. package/dist/esm/app.config.json +42 -25
  60. package/dist/esm/utils/app-config/config.js +2 -1
  61. package/dist/esm/utils/app-config/index.js +3 -2
  62. package/dist/esm/utils/micro-frontend/guest.js +1 -5
  63. package/dist/esm/utils/micro-frontend/host.js +1 -1
  64. package/dist/esm/utils/storybook/preview.js +1 -1
  65. package/dist/esm/utils/window.js +2 -0
  66. package/dist/esm/view/app-root/index.js +3 -2
  67. package/dist/esm/view/error-boundary/default-error-template.js +4 -1
  68. package/dist/esm/view/micro-app/resources/script.js +19 -15
  69. package/dist/esm/view/micro-app/resources/style.js +15 -11
  70. package/dist/esm/view/micro-iframe-app/app.js +1 -1
  71. package/dist/types/index.d.ts +1 -1
  72. package/dist/types/utils/app-config/config.d.ts +5 -7
  73. package/dist/types/utils/app-config/index.d.ts +1 -1
  74. package/dist/types/utils/window.d.ts +3 -0
  75. package/dist/types/view/error-boundary/default-error-template.d.ts +1 -1
  76. package/dist/types/view/error-boundary/index.d.ts +2 -1
  77. package/dist/types/view/fields/form-item-layout/index.d.ts +1 -1
  78. package/dist/types/view/micro-app/resources/script.d.ts +1 -1
  79. package/dist/types/view/micro-app/resources/style.d.ts +2 -2
  80. package/package.json +38 -38
@@ -37,7 +37,7 @@ __export(loadable_exports, {
37
37
  loadable: () => loadable
38
38
  });
39
39
  module.exports = __toCommonJS(loadable_exports);
40
- var React = __toESM(require("react"));
40
+ var React = __toESM(require("react"), 1);
41
41
  var import_react = require("react");
42
42
  var import_wait_message_launcher = require("../modals/wait-message/wait-message-launcher.js");
43
43
  const loadable = (importFunc, fallback = /* @__PURE__ */ React.createElement(import_wait_message_launcher.WaitMessageLauncher, null)) => {
@@ -23,7 +23,7 @@ __export(micro_app_exports, {
23
23
  MicroApp: () => MicroApp
24
24
  });
25
25
  module.exports = __toCommonJS(micro_app_exports);
26
- var React = __toESM(require("react"));
26
+ var React = __toESM(require("react"), 1);
27
27
  var import_react = require("react");
28
28
  var import_styled_components = __toESM(require("styled-components"));
29
29
  var import_const = require("./const.js");
@@ -28,21 +28,25 @@ var import_url = require("../../../utils/url.js");
28
28
  const APP_SCRIPT_ID_PREFIX = "emui-script-";
29
29
  const HEAD_SCRIPTS = /(?:emuiDiagnostics|global|global-prod|emuiUserMonitoring)(?:..*)?.js/;
30
30
  const isHeadScript = (scriptSrc) => HEAD_SCRIPTS.test(scriptSrc);
31
- const addScriptToDOM = ({ name, hostUrl, documentEle }, fileName, index) => new Promise((resolve, reject) => {
32
- const ele = documentEle.createElement("script");
33
- if (!ele)
34
- reject(new Error("Unable to insert Application scripts."));
35
- ele.id = `${APP_SCRIPT_ID_PREFIX}${name}-${index}`;
36
- const url = new URL(fileName, hostUrl);
37
- ele.src = (0, import_url.removeDoubleSlash)(url.href);
38
- ele.onload = resolve.bind(null, ele.id);
39
- ele.onerror = reject.bind(null, ele.id);
40
- ele.async = false;
41
- if (isHeadScript(ele.src))
42
- documentEle.head.appendChild(ele);
43
- else
44
- documentEle.body.appendChild(ele);
45
- });
31
+ const addScriptToDOM = ({ name, hostUrl, documentEle, manifestPath }, fileName, index) => {
32
+ if (!hostUrl || !manifestPath)
33
+ throw new Error("Unable to add scripts to DOM. hostUrl and manifestPath are required.");
34
+ return new Promise((resolve, reject) => {
35
+ const ele = documentEle.createElement("script");
36
+ if (!ele)
37
+ reject(new Error("Unable to insert Application scripts."));
38
+ ele.id = `${APP_SCRIPT_ID_PREFIX}${name}-${index}`;
39
+ const url = new URL(`${manifestPath.replace(/\/?$/, "/")}${fileName}`, hostUrl);
40
+ ele.src = (0, import_url.removeDoubleSlash)(url.href);
41
+ ele.onload = resolve.bind(null, ele.id);
42
+ ele.onerror = reject.bind(null, ele.id);
43
+ ele.async = false;
44
+ if (isHeadScript(ele.src))
45
+ documentEle.head.appendChild(ele);
46
+ else
47
+ documentEle.body.appendChild(ele);
48
+ });
49
+ };
46
50
  const removeScriptFromDOM = (elementId = "", documentEle = document) => new Promise((resolve) => {
47
51
  const ele = documentEle.getElementById(elementId);
48
52
  if (!ele)
@@ -25,17 +25,21 @@ __export(style_exports, {
25
25
  module.exports = __toCommonJS(style_exports);
26
26
  var import_url = require("../../../utils/url.js");
27
27
  const APP_STYLE_ID_PREFIX = "emui-style-";
28
- const addStylesToDOM = ({ name, hostUrl, documentEle }, fileName, index) => new Promise((resolve, reject) => {
29
- const ele = documentEle.createElement("link");
30
- if (!ele)
31
- reject(new Error("Unable to insert Application styles."));
32
- ele.id = `${APP_STYLE_ID_PREFIX}${name}-${index}`;
33
- ele.rel = "stylesheet";
34
- const url = new URL(fileName, hostUrl);
35
- ele.href = (0, import_url.removeDoubleSlash)(url.href);
36
- ele.onload = resolve.bind(null, ele.id);
37
- documentEle.head.appendChild(ele);
38
- });
28
+ const addStylesToDOM = ({ name, hostUrl, documentEle, manifestPath }, fileName, index) => {
29
+ if (!hostUrl || !manifestPath)
30
+ throw new Error("Unable to add styles to DOM. hostUrl and manifestPath are required.");
31
+ return new Promise((resolve, reject) => {
32
+ const ele = documentEle.createElement("link");
33
+ if (!ele)
34
+ reject(new Error("Unable to insert Application styles."));
35
+ ele.id = `${APP_STYLE_ID_PREFIX}${name}-${index}`;
36
+ ele.rel = "stylesheet";
37
+ const url = new URL(`${manifestPath.replace(/\/?$/, "/")}${fileName}`, hostUrl);
38
+ ele.href = (0, import_url.removeDoubleSlash)(url.href);
39
+ ele.onload = resolve.bind(null, ele.id);
40
+ documentEle.head.appendChild(ele);
41
+ });
42
+ };
39
43
  const removeStyleFromDOM = (elementId = "", documentEle = document) => new Promise((resolve) => {
40
44
  const ele = documentEle.getElementById(elementId);
41
45
  if (!ele)
@@ -52,9 +52,9 @@ __export(app_exports, {
52
52
  App: () => App
53
53
  });
54
54
  module.exports = __toCommonJS(app_exports);
55
- var React = __toESM(require("react"));
55
+ var React = __toESM(require("react"), 1);
56
56
  var import_react = require("react");
57
- var import_iframe = __toESM(require("file-loader?name=iframe.[contenthash].[ext]!./iframe/index.html"));
57
+ var import_iframe = __toESM(require("./iframe/index.html?resource"));
58
58
  var import_iframe2 = require("./iframe/index.js");
59
59
  var import_use_frame_loaded = require("./use-frame-loaded.js");
60
60
  var import_use_app_will_render = require("../micro-app/use-app-will-render.js");
@@ -40,7 +40,7 @@ __export(iframe_exports, {
40
40
  IFrame: () => IFrame
41
41
  });
42
42
  module.exports = __toCommonJS(iframe_exports);
43
- var React = __toESM(require("react"));
43
+ var React = __toESM(require("react"), 1);
44
44
  var import_react = require("react");
45
45
  var import_styled_components = __toESM(require("styled-components"));
46
46
  var import_const = require("./const.js");
@@ -52,7 +52,7 @@ __export(micro_iframe_app_exports, {
52
52
  MicroIFrameApp: () => MicroIFrameApp
53
53
  });
54
54
  module.exports = __toCommonJS(micro_iframe_app_exports);
55
- var React = __toESM(require("react"));
55
+ var React = __toESM(require("react"), 1);
56
56
  var import_react = require("react");
57
57
  var import_use_previous = require("../use-previous.js");
58
58
  var import_app = require("./app.js");
@@ -23,7 +23,7 @@ __export(error_exports, {
23
23
  Error: () => Error2
24
24
  });
25
25
  module.exports = __toCommonJS(error_exports);
26
- var React = __toESM(require("react"));
26
+ var React = __toESM(require("react"), 1);
27
27
  var import_react = require("react");
28
28
  var import_ds_dialog = require("@elliemae/ds-dialog");
29
29
  var import_ds_icons = require("@elliemae/ds-icons");
@@ -23,7 +23,7 @@ __export(navigation_prompt_exports, {
23
23
  NavigationPrompt: () => NavigationPrompt
24
24
  });
25
25
  module.exports = __toCommonJS(navigation_prompt_exports);
26
- var React = __toESM(require("react"));
26
+ var React = __toESM(require("react"), 1);
27
27
  var import_react = require("react");
28
28
  var import_ds_icons = require("@elliemae/ds-icons");
29
29
  var import_ds_button = require("@elliemae/ds-button");
@@ -23,7 +23,7 @@ __export(session_expiry_exports, {
23
23
  SessionExpiry: () => SessionExpiry
24
24
  });
25
25
  module.exports = __toCommonJS(session_expiry_exports);
26
- var React = __toESM(require("react"));
26
+ var React = __toESM(require("react"), 1);
27
27
  var import_react = require("react");
28
28
  var import_ds_button = require("@elliemae/ds-button");
29
29
  var import_ds_icons = require("@elliemae/ds-icons");
@@ -52,7 +52,7 @@ __export(wait_message_exports, {
52
52
  WaitMessage: () => WaitMessage
53
53
  });
54
54
  module.exports = __toCommonJS(wait_message_exports);
55
- var React = __toESM(require("react"));
55
+ var React = __toESM(require("react"), 1);
56
56
  var import_react = require("react");
57
57
  var import_ds_loading_indicator = require("@elliemae/ds-loading-indicator");
58
58
  var import_react_redux = require("../../../data/react-redux.js");
@@ -24,7 +24,7 @@ __export(page_exports, {
24
24
  onPageView: () => onPageView
25
25
  });
26
26
  module.exports = __toCommonJS(page_exports);
27
- var React = __toESM(require("react"));
27
+ var React = __toESM(require("react"), 1);
28
28
  var import_react_helmet = require("react-helmet");
29
29
  var brum = __toESM(require("@elliemae/pui-user-monitoring"));
30
30
  var import_page_view_event = require("../analytics/page-view-event.js");
@@ -23,7 +23,7 @@ __export(render_with_delay_exports, {
23
23
  RenderWithDelay: () => RenderWithDelay
24
24
  });
25
25
  module.exports = __toCommonJS(render_with_delay_exports);
26
- var React = __toESM(require("react"));
26
+ var React = __toESM(require("react"), 1);
27
27
  var import_react = require("react");
28
28
  const RenderWithDelay = (0, import_react.memo)(({ render }) => {
29
29
  const [show, showComponents] = (0, import_react.useState)(false);
@@ -23,7 +23,7 @@ __export(render_with_host_data_exports, {
23
23
  renderWithHostData: () => renderWithHostData
24
24
  });
25
25
  module.exports = __toCommonJS(render_with_host_data_exports);
26
- var React = __toESM(require("react"));
26
+ var React = __toESM(require("react"), 1);
27
27
  var import_react = require("react");
28
28
  var import_fetch_host_app_data = require("../fetch-host-app-data/index.js");
29
29
  var import_wait_message_launcher = require("../modals/wait-message/wait-message-launcher.js");
@@ -23,7 +23,7 @@ __export(require_auth_exports, {
23
23
  RequireAuth: () => RequireAuth
24
24
  });
25
25
  module.exports = __toCommonJS(require_auth_exports);
26
- var React = __toESM(require("react"));
26
+ var React = __toESM(require("react"), 1);
27
27
  var import_redux_injectors = require("redux-injectors");
28
28
  var import_constants = __toESM(require("../utils/constants.js"));
29
29
  var import_reducer = require("../data/auth/reducer.js");
@@ -23,7 +23,7 @@ __export(session_timeout_exports, {
23
23
  SessionTimeout: () => SessionTimeout
24
24
  });
25
25
  module.exports = __toCommonJS(session_timeout_exports);
26
- var React = __toESM(require("react"));
26
+ var React = __toESM(require("react"), 1);
27
27
  var import_react = require("react");
28
28
  var import_react_redux = require("../../data/react-redux.js");
29
29
  var import_actions = require("../../data/logout/actions.js");
@@ -23,7 +23,7 @@ __export(decorator_exports, {
23
23
  withAppDecorator: () => withAppDecorator
24
24
  });
25
25
  module.exports = __toCommonJS(decorator_exports);
26
- var React = __toESM(require("react"));
26
+ var React = __toESM(require("react"), 1);
27
27
  var import_history = require("../../utils/history.js");
28
28
  var import_app_root = require("../app-root/index.js");
29
29
  const withAppDecorator = (theme, store, story) => /* @__PURE__ */ React.createElement(import_app_root.AppRoot, {
@@ -37,7 +37,7 @@ __export(visually_hidden_exports, {
37
37
  VisuallyHidden: () => VisuallyHidden
38
38
  });
39
39
  module.exports = __toCommonJS(visually_hidden_exports);
40
- var React = __toESM(require("react"));
40
+ var React = __toESM(require("react"), 1);
41
41
  var import_react = require("react");
42
42
  var import_styled_components = __toESM(require("styled-components"));
43
43
  const Span = import_styled_components.default.span`
@@ -1,128 +1,145 @@
1
1
  {
2
2
  "appId": "app-sdk",
3
- "brand": "primary",
4
3
  "activeEnv": "localhost",
5
- "hosted": true,
6
4
  "sessionTimeoutWarnInterval": "60000",
7
5
  "sessionTimeoutInterval": "70000",
8
6
  "serviceEndpoints": {
9
7
  "api": "",
10
- "idp": ""
8
+ "idp": "https://int.idp.ellielabs.com",
9
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
11
10
  },
12
- "walkMeUrl": "https://cdn.walkme.com/users/897bcebc13fd48038c790e2866e6a9fb/test/walkme_897bcebc13fd48038c790e2866e6a9fb_https.js",
13
11
  "env": {
14
12
  "localhost": {
15
13
  "serviceEndpoints": {
16
14
  "api": "",
17
- "idp": ""
15
+ "idp": "https://int.idp.ellielabs.com",
16
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
18
17
  }
19
18
  },
20
19
  "dev": {
21
20
  "serviceEndpoints": {
22
- "api": "https://dev-api.appsdk.rd.elliemae.io",
23
- "idp": "https://int.idp.ellielabs.com"
21
+ "api": "https://dev.api.puiservice.rd.elliemae.io",
22
+ "idp": "https://int.idp.ellielabs.com",
23
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
24
24
  }
25
25
  },
26
26
  "dev2": {
27
27
  "serviceEndpoints": {
28
28
  "api": "https://int.api.ellielabs.com",
29
- "idp": "https://int.idp.ellielabs.com"
29
+ "idp": "https://int.idp.ellielabs.com",
30
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
30
31
  }
31
32
  },
32
33
  "qa": {
33
34
  "serviceEndpoints": {
34
- "api": "https://qa-api.appsdk.rd.elliemae.io",
35
- "idp": "https://int.idp.ellielabs.com"
35
+ "api": "https://dev.api.puiservice.rd.elliemae.io",
36
+ "idp": "https://int.idp.ellielabs.com",
37
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
36
38
  }
37
39
  },
38
40
  "qa2": {
39
41
  "serviceEndpoints": {
40
42
  "api": "https://int.api.ellielabs.com",
41
- "idp": "https://int.idp.ellielabs.com"
43
+ "idp": "https://int.idp.ellielabs.com",
44
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
42
45
  }
43
46
  },
44
47
  "qa3": {
45
48
  "serviceEndpoints": {
46
49
  "api": "https://int.api.ellielabs.com",
47
- "idp": "https://int.idp.ellielabs.com"
50
+ "idp": "https://int.idp.ellielabs.com",
51
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
48
52
  }
49
53
  },
50
54
  "int": {
51
55
  "serviceEndpoints": {
52
56
  "api": "https://int.api.ellielabs.com",
53
- "idp": "https://int.idp.ellielabs.com"
57
+ "idp": "https://int.idp.ellielabs.com",
58
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
54
59
  }
55
60
  },
56
61
  "peg-osb1": {
57
62
  "serviceEndpoints": {
58
63
  "api": "https://encompass-peg-api.elliemae.com",
59
- "idp": "https://peg.idp.ellielabs.com/authorize"
64
+ "idp": "https://peg.idp.ellielabs.com/authorize",
65
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
60
66
  }
61
67
  },
62
68
  "peg-osb2": {
63
69
  "serviceEndpoints": {
64
70
  "api": "https://encompass-peg2-api.elliemae.com",
65
- "idp": "https://peg.idp.ellielabs.com/authorize"
71
+ "idp": "https://peg.idp.ellielabs.com/authorize",
72
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
66
73
  }
67
74
  },
68
75
  "peg": {
69
76
  "serviceEndpoints": {
70
77
  "api": "https://peg2-west.api.ellielabs.com",
71
- "idp": "https://peg.idp.ellielabs.com/authorize"
78
+ "idp": "https://peg.idp.ellielabs.com/authorize",
79
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
72
80
  }
73
81
  },
74
82
  "peg-oapi-west": {
75
83
  "serviceEndpoints": {
76
84
  "api": "https://peg2-west.api.ellielabs.com",
77
- "idp": "https://peg.idp.ellielabs.com/authorize"
85
+ "idp": "https://peg.idp.ellielabs.com/authorize",
86
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
78
87
  }
79
88
  },
80
89
  "peg-oapi-east": {
81
90
  "serviceEndpoints": {
82
91
  "api": "https://peg2-east.api.ellielabs.com",
83
- "idp": "https://peg.idp.ellielabs.com/authorize"
92
+ "idp": "https://peg.idp.ellielabs.com/authorize",
93
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
84
94
  }
85
95
  },
86
96
  "peg2-oapi-east": {
87
97
  "serviceEndpoints": {
88
98
  "api": "https://peg2-east.api.ellielabs.com",
89
- "idp": "https://peg.idp.ellielabs.com/authorize"
99
+ "idp": "https://peg.idp.ellielabs.com/authorize",
100
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
90
101
  }
91
102
  },
92
103
  "peg3": {
93
104
  "serviceEndpoints": {
94
105
  "api": "https://pel1.api.ellielabs.com",
95
- "idp": "https://peg3.idp.ellielabs.com/authorize"
106
+ "idp": "https://peg3.idp.ellielabs.com/authorize",
107
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
96
108
  }
97
109
  },
98
110
  "stage": {
99
111
  "serviceEndpoints": {
100
112
  "api": "https://stg.api.elliemae.com",
101
- "idp": "https://stg.idp.elliemae.com/authorize"
113
+ "idp": "https://stg.idp.elliemae.com/authorize",
114
+ "logger": "https://stg.api.puidiagnostics.elliemae.com/v1/logging"
102
115
  }
103
116
  },
104
117
  "beta": {
105
118
  "serviceEndpoints": {
106
119
  "api": "https://concept.api.elliemae.com",
107
- "idp": "https://concept.idp.elliemae.com/authorize"
120
+ "idp": "https://concept.idp.elliemae.com/authorize",
121
+ "logger": "https://concept.api.puidiagnostics.elliemae.com/v1/logging"
108
122
  }
109
123
  },
110
124
  "demo": {
111
125
  "serviceEndpoints": {
112
126
  "api": "https://concept.api.elliemae.com",
113
- "idp": "https://concept.idp.elliemae.com/authorize"
127
+ "idp": "https://concept.idp.elliemae.com/authorize",
128
+ "logger": "https://concept.api.puidiagnostics.elliemae.com/v1/logging"
114
129
  }
115
130
  },
116
131
  "epc": {
117
132
  "serviceEndpoints": {
118
133
  "api": "https://concept.api.elliemae.com",
119
- "idp": "https://concept.idp.elliemae.com/authorize"
134
+ "idp": "https://concept.idp.elliemae.com/authorize",
135
+ "logger": "https://concept.api.puidiagnostics.elliemae.com/v1/logging"
120
136
  }
121
137
  },
122
138
  "prod": {
123
139
  "serviceEndpoints": {
124
140
  "api": "https://api.elliemae.com",
125
- "idp": "https://idp.elliemae.com/authorize"
141
+ "idp": "https://idp.elliemae.com/authorize",
142
+ "logger": "https://api.puidiagnostics.elliemae.com/v1/logging"
126
143
  }
127
144
  }
128
145
  }
@@ -1,5 +1,6 @@
1
1
  import _ from "lodash";
2
- let gAppConfig = APP_CONFIG;
2
+ import appConfig from "../../app.config.json";
3
+ let gAppConfig = appConfig;
3
4
  const setAppConfig = (config) => {
4
5
  gAppConfig = config;
5
6
  };
@@ -3,6 +3,7 @@ import { getHTTPClient } from "../../communication/http-client/index.js";
3
3
  import { setAppConfig } from "./config.js";
4
4
  import { setAppDynamicsUserData } from "../../analytics/appdynamics.js";
5
5
  import { updateBAEventParameters } from "../../analytics/web-analytics.js";
6
+ import { getAssetPath } from "../window.js";
6
7
  const parseAppConfig = (data) => {
7
8
  const { activeEnv } = data;
8
9
  const activeEnvConfig = data.env[activeEnv] || {};
@@ -13,8 +14,8 @@ const parseAppConfig = (data) => {
13
14
  setAppDynamicsUserData({ envName: activeEnv });
14
15
  updateBAEventParameters({ envName: activeEnv });
15
16
  };
16
- const loadAppConfig = (hostUrl = "./") => new Promise((resolve, reject) => {
17
- getHTTPClient({ baseURL: hostUrl }).get("app.config.json").then(({ data }) => {
17
+ const loadAppConfig = () => new Promise((resolve, reject) => {
18
+ getHTTPClient().get(`${getAssetPath()}app.config.json`).then(({ data }) => {
18
19
  parseAppConfig(data);
19
20
  resolve();
20
21
  }).catch((err) => {
@@ -1,4 +1,3 @@
1
- import ReactDOM from "react-dom";
2
1
  import _ from "lodash";
3
2
  import { getDefaultTheme } from "@elliemae/pui-theme";
4
3
  import { getWindow } from "../window.js";
@@ -99,7 +98,7 @@ class CMicroAppGuest {
99
98
  this.props.host = host;
100
99
  }
101
100
  __webpack_public_path__ = __webpack_public_path__.replace(/\/?$/, "/");
102
- return loadAppConfig(__webpack_public_path__).then(() => {
101
+ return loadAppConfig().then(() => {
103
102
  const instanceId = this.getSessionStorageItem("instanceId") || "";
104
103
  const userId = this.getSessionStorageItem("userId") || "";
105
104
  updateBAEventParameters({ appId: this.appId, instanceId, userId });
@@ -116,9 +115,6 @@ class CMicroAppGuest {
116
115
  });
117
116
  }
118
117
  unmount(options) {
119
- const appEle = document.getElementById(this.containerId);
120
- if (appEle)
121
- ReactDOM.unmountComponentAtNode(appEle);
122
118
  removeStorageEvents();
123
119
  return Promise.resolve().then(() => this.onUnmount ? this.onUnmount(options) : null);
124
120
  }
@@ -41,7 +41,7 @@ class CMicroAppHost {
41
41
  this.getObject = this.getObject.bind(this);
42
42
  this.renewSessionTimer = this.renewSessionTimer.bind(this);
43
43
  this.setSystemVersion = this.setSystemVersion.bind(this);
44
- loadAppConfig(__webpack_public_path__).then(() => {
44
+ loadAppConfig().then(() => {
45
45
  if (this.onInit)
46
46
  this.onInit(this.props);
47
47
  }).catch(() => {
@@ -41,7 +41,7 @@ const getParameters = (storyBookTheme) => ({
41
41
  const decorators = [appDecorator];
42
42
  const loaders = [
43
43
  async () => {
44
- await loadAppConfig(__webpack_public_path__ || "./");
44
+ await loadAppConfig();
45
45
  }
46
46
  ];
47
47
  export {
@@ -21,7 +21,9 @@ const getCurrentBreakpoint = () => {
21
21
  return "medium";
22
22
  return "large";
23
23
  };
24
+ const getAssetPath = () => window?.emui?._ASSET_PATH || "latest/";
24
25
  export {
26
+ getAssetPath,
25
27
  getCurrentBreakpoint,
26
28
  getViewportSize,
27
29
  getWindow
@@ -15,6 +15,7 @@ var __spreadValues = (a, b) => {
15
15
  return a;
16
16
  };
17
17
  import * as React from "react";
18
+ import { StrictMode } from "react";
18
19
  import { Provider } from "react-redux";
19
20
  import { ThemeProvider } from "styled-components";
20
21
  import { getDefaultTheme } from "@elliemae/pui-theme";
@@ -35,7 +36,7 @@ const AppRoot = ({
35
36
  WaitMessage,
36
37
  errorTemplate,
37
38
  children
38
- }) => /* @__PURE__ */ React.createElement(ErrorBoundary, {
39
+ }) => /* @__PURE__ */ React.createElement(StrictMode, null, /* @__PURE__ */ React.createElement(ErrorBoundary, {
39
40
  errorTemplate
40
41
  }, /* @__PURE__ */ React.createElement(Provider, {
41
42
  store
@@ -46,7 +47,7 @@ const AppRoot = ({
46
47
  }, /* @__PURE__ */ React.createElement(AppToRender, {
47
48
  manageSession,
48
49
  WaitMessage
49
- }, children)))));
50
+ }, children))))));
50
51
  export {
51
52
  AppRoot
52
53
  };
@@ -1,5 +1,8 @@
1
1
  import * as React from "react";
2
- const DefaultErrorTemplate = (props) => /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("h2", null, "We are unable to process your request"), /* @__PURE__ */ React.createElement("section", null, "Please close your browser and login again"));
2
+ const DefaultErrorTemplate = ({
3
+ error = new Error("We are unable to process your request"),
4
+ errorInfo = { componentStack: "Please close your browser and login again" }
5
+ }) => /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("h2", null, error?.message), /* @__PURE__ */ React.createElement("section", null, errorInfo?.componentStack));
3
6
  export {
4
7
  DefaultErrorTemplate
5
8
  };
@@ -2,21 +2,25 @@ import { removeDoubleSlash } from "../../../utils/url.js";
2
2
  const APP_SCRIPT_ID_PREFIX = "emui-script-";
3
3
  const HEAD_SCRIPTS = /(?:emuiDiagnostics|global|global-prod|emuiUserMonitoring)(?:..*)?.js/;
4
4
  const isHeadScript = (scriptSrc) => HEAD_SCRIPTS.test(scriptSrc);
5
- const addScriptToDOM = ({ name, hostUrl, documentEle }, fileName, index) => new Promise((resolve, reject) => {
6
- const ele = documentEle.createElement("script");
7
- if (!ele)
8
- reject(new Error("Unable to insert Application scripts."));
9
- ele.id = `${APP_SCRIPT_ID_PREFIX}${name}-${index}`;
10
- const url = new URL(fileName, hostUrl);
11
- ele.src = removeDoubleSlash(url.href);
12
- ele.onload = resolve.bind(null, ele.id);
13
- ele.onerror = reject.bind(null, ele.id);
14
- ele.async = false;
15
- if (isHeadScript(ele.src))
16
- documentEle.head.appendChild(ele);
17
- else
18
- documentEle.body.appendChild(ele);
19
- });
5
+ const addScriptToDOM = ({ name, hostUrl, documentEle, manifestPath }, fileName, index) => {
6
+ if (!hostUrl || !manifestPath)
7
+ throw new Error("Unable to add scripts to DOM. hostUrl and manifestPath are required.");
8
+ return new Promise((resolve, reject) => {
9
+ const ele = documentEle.createElement("script");
10
+ if (!ele)
11
+ reject(new Error("Unable to insert Application scripts."));
12
+ ele.id = `${APP_SCRIPT_ID_PREFIX}${name}-${index}`;
13
+ const url = new URL(`${manifestPath.replace(/\/?$/, "/")}${fileName}`, hostUrl);
14
+ ele.src = removeDoubleSlash(url.href);
15
+ ele.onload = resolve.bind(null, ele.id);
16
+ ele.onerror = reject.bind(null, ele.id);
17
+ ele.async = false;
18
+ if (isHeadScript(ele.src))
19
+ documentEle.head.appendChild(ele);
20
+ else
21
+ documentEle.body.appendChild(ele);
22
+ });
23
+ };
20
24
  const removeScriptFromDOM = (elementId = "", documentEle = document) => new Promise((resolve) => {
21
25
  const ele = documentEle.getElementById(elementId);
22
26
  if (!ele)
@@ -1,16 +1,20 @@
1
1
  import { removeDoubleSlash } from "../../../utils/url.js";
2
2
  const APP_STYLE_ID_PREFIX = "emui-style-";
3
- const addStylesToDOM = ({ name, hostUrl, documentEle }, fileName, index) => new Promise((resolve, reject) => {
4
- const ele = documentEle.createElement("link");
5
- if (!ele)
6
- reject(new Error("Unable to insert Application styles."));
7
- ele.id = `${APP_STYLE_ID_PREFIX}${name}-${index}`;
8
- ele.rel = "stylesheet";
9
- const url = new URL(fileName, hostUrl);
10
- ele.href = removeDoubleSlash(url.href);
11
- ele.onload = resolve.bind(null, ele.id);
12
- documentEle.head.appendChild(ele);
13
- });
3
+ const addStylesToDOM = ({ name, hostUrl, documentEle, manifestPath }, fileName, index) => {
4
+ if (!hostUrl || !manifestPath)
5
+ throw new Error("Unable to add styles to DOM. hostUrl and manifestPath are required.");
6
+ return new Promise((resolve, reject) => {
7
+ const ele = documentEle.createElement("link");
8
+ if (!ele)
9
+ reject(new Error("Unable to insert Application styles."));
10
+ ele.id = `${APP_STYLE_ID_PREFIX}${name}-${index}`;
11
+ ele.rel = "stylesheet";
12
+ const url = new URL(`${manifestPath.replace(/\/?$/, "/")}${fileName}`, hostUrl);
13
+ ele.href = removeDoubleSlash(url.href);
14
+ ele.onload = resolve.bind(null, ele.id);
15
+ documentEle.head.appendChild(ele);
16
+ });
17
+ };
14
18
  const removeStyleFromDOM = (elementId = "", documentEle = document) => new Promise((resolve) => {
15
19
  const ele = documentEle.getElementById(elementId);
16
20
  if (!ele)
@@ -31,7 +31,7 @@ var __objRest = (source, exclude) => {
31
31
  };
32
32
  import * as React from "react";
33
33
  import { memo, useState } from "react";
34
- import frameHtml from "file-loader?name=iframe.[contenthash].[ext]!./iframe/index.html";
34
+ import frameHtml from "./iframe/index.html?resource";
35
35
  import { IFrame } from "./iframe/index.js";
36
36
  import { useFrameLoaded } from "./use-frame-loaded.js";
37
37
  import {
@@ -75,5 +75,5 @@ export type { EMUI } from './utils/window.js';
75
75
  export type { Await } from './utils/await.js';
76
76
  export type { RootState, AppStore } from './data/store.js';
77
77
  export type { AppConfig } from './utils/app-config/config.js';
78
- export type { OnInitCallback, OnMountCallback, } from './utils/micro-frontend/guest.js';
78
+ export type { OnInitCallback, OnMountCallback, OnUnMountCallback, } from './utils/micro-frontend/guest.js';
79
79
  export type { OnInitCallback as OnHostInitCallback } from './utils/micro-frontend/host.js';