@elliemae/pui-app-sdk 3.15.0 → 4.0.0-alpha.10

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 (182) hide show
  1. package/dist/cjs/analytics/appdynamics.js +4 -1
  2. package/dist/cjs/api/auth/index.js +8 -2
  3. package/dist/cjs/api/helpers.js +7 -1
  4. package/dist/cjs/api/users/index.js +3 -1
  5. package/dist/cjs/app.config.json +42 -25
  6. package/dist/cjs/communication/http-client/index.js +4 -1
  7. package/dist/cjs/communication/http-client/response-interceptor.js +4 -1
  8. package/dist/cjs/communication/http-client/retry-axios.js +4 -1
  9. package/dist/cjs/data/auth/reducer.js +14 -8
  10. package/dist/cjs/data/breakpoint/index.js +4 -1
  11. package/dist/cjs/data/index.js +1 -0
  12. package/dist/cjs/data/store.js +10 -2
  13. package/dist/cjs/data/wait-message/reducer.js +4 -1
  14. package/dist/cjs/index.js +5 -1
  15. package/dist/cjs/sideeffect/error-toast/index.js +3 -1
  16. package/dist/cjs/sideeffect/wait-message/index.js +6 -2
  17. package/dist/cjs/utils/app-config/config.js +6 -2
  18. package/dist/cjs/utils/app-config/index.js +12 -4
  19. package/dist/cjs/utils/auth/helper.js +4 -1
  20. package/dist/cjs/utils/auth/index.js +3 -1
  21. package/dist/cjs/utils/micro-frontend/guest.js +8 -7
  22. package/dist/cjs/utils/micro-frontend/host.js +9 -3
  23. package/dist/cjs/utils/micro-frontend/index.js +27 -10
  24. package/dist/cjs/utils/micro-frontend/ssfguest-adapter.js +9 -2
  25. package/dist/cjs/utils/redact-pii.js +8 -2
  26. package/dist/cjs/utils/session.js +14 -4
  27. package/dist/cjs/utils/storybook/cjs/webpack.js +1 -4
  28. package/dist/cjs/utils/storybook/preview.js +1 -1
  29. package/dist/cjs/utils/testing/index.js +5 -7
  30. package/dist/cjs/utils/testing/render-with-redux.js +5 -7
  31. package/dist/cjs/utils/testing/render-with-router-redux.js +10 -9
  32. package/dist/cjs/utils/testing/render-with-router.js +5 -7
  33. package/dist/cjs/utils/testing/render-with-state-addons.js +7 -9
  34. package/dist/cjs/utils/web-storage.js +4 -1
  35. package/dist/cjs/utils/window.js +10 -2
  36. package/dist/cjs/view/app-root/hosted-app.js +13 -3
  37. package/dist/cjs/view/app-root/index.js +24 -19
  38. package/dist/cjs/view/app-root/stand-alone-app.js +17 -3
  39. package/dist/cjs/view/app-router.js +2 -5
  40. package/dist/cjs/view/breakpoint/use-breakpoint.js +9 -5
  41. package/dist/cjs/view/breakpoint/use-media-query-list.js +3 -1
  42. package/dist/cjs/view/error-boundary/default-error-template.js +14 -5
  43. package/dist/cjs/view/error-boundary/index.js +6 -2
  44. package/dist/cjs/view/error-toast/index.js +2 -5
  45. package/dist/cjs/view/fetch-host-app-data/index.js +4 -1
  46. package/dist/cjs/view/fields/autocomplete/index.js +9 -9
  47. package/dist/cjs/view/fields/check-box/index.js +3 -6
  48. package/dist/cjs/view/fields/combo-box/index.js +3 -6
  49. package/dist/cjs/view/fields/combo-box-v3/index.js +3 -6
  50. package/dist/cjs/view/fields/date-input/index.js +3 -6
  51. package/dist/cjs/view/fields/date-picker/index.js +7 -4
  52. package/dist/cjs/view/fields/date-range-picker/index.js +10 -9
  53. package/dist/cjs/view/fields/date-time-picker/index.js +3 -6
  54. package/dist/cjs/view/fields/form-item-layout/index.js +15 -16
  55. package/dist/cjs/view/fields/form-layout-block-item/index.js +16 -17
  56. package/dist/cjs/view/fields/input-mask/index.js +3 -6
  57. package/dist/cjs/view/fields/input-text/index.js +3 -6
  58. package/dist/cjs/view/fields/large-text-box/index.js +3 -6
  59. package/dist/cjs/view/fields/radio/index.js +3 -6
  60. package/dist/cjs/view/fields/radio-group/index.js +3 -6
  61. package/dist/cjs/view/fields/text-box/index.js +3 -6
  62. package/dist/cjs/view/fields/toggle/index.js +3 -6
  63. package/dist/cjs/view/fields/watch-value.js +25 -3
  64. package/dist/cjs/view/form/index.js +13 -8
  65. package/dist/cjs/view/form/personal-info-section.js +54 -47
  66. package/dist/cjs/view/form/submit-button/index.js +2 -5
  67. package/dist/cjs/view/live-message/index.js +2 -5
  68. package/dist/cjs/view/loadable/index.js +8 -10
  69. package/dist/cjs/view/login/index.js +4 -5
  70. package/dist/cjs/view/micro-app/app-factory/index.js +9 -3
  71. package/dist/cjs/view/micro-app/index.js +6 -3
  72. package/dist/cjs/view/micro-app/resources/manifest.js +10 -3
  73. package/dist/cjs/view/micro-app/resources/script.js +24 -15
  74. package/dist/cjs/view/micro-app/resources/style.js +20 -11
  75. package/dist/cjs/view/micro-app/use-app-will-render.js +37 -28
  76. package/dist/cjs/view/micro-iframe-app/app.js +24 -19
  77. package/dist/cjs/view/micro-iframe-app/iframe/index.js +22 -15
  78. package/dist/cjs/view/micro-iframe-app/index.js +2 -5
  79. package/dist/cjs/view/modals/error/index.js +21 -12
  80. package/dist/cjs/view/modals/navigation-prompt/index.js +46 -27
  81. package/dist/cjs/view/modals/session-expiry/customHooks.js +6 -2
  82. package/dist/cjs/view/modals/session-expiry/index.js +57 -35
  83. package/dist/cjs/view/modals/wait-message/index.js +26 -27
  84. package/dist/cjs/view/page.js +15 -3
  85. package/dist/cjs/view/render-with-delay/index.js +4 -5
  86. package/dist/cjs/view/render-with-host-data/index.js +2 -5
  87. package/dist/cjs/view/require-auth.js +22 -10
  88. package/dist/cjs/view/session-timeout/index.js +15 -14
  89. package/dist/cjs/view/storybook/decorator.js +5 -7
  90. package/dist/cjs/view/visually-hidden/index.js +11 -6
  91. package/dist/esm/api/auth/index.js +8 -2
  92. package/dist/esm/api/helpers.js +7 -1
  93. package/dist/esm/api/users/index.js +3 -1
  94. package/dist/esm/app.config.json +42 -25
  95. package/dist/esm/data/auth/reducer.js +10 -7
  96. package/dist/esm/data/index.js +6 -1
  97. package/dist/esm/data/store.js +6 -1
  98. package/dist/esm/index.js +6 -1
  99. package/dist/esm/sideeffect/error-toast/index.js +3 -1
  100. package/dist/esm/sideeffect/wait-message/index.js +6 -2
  101. package/dist/esm/utils/app-config/config.js +2 -1
  102. package/dist/esm/utils/app-config/index.js +8 -3
  103. package/dist/esm/utils/auth/index.js +3 -1
  104. package/dist/esm/utils/micro-frontend/guest.js +4 -6
  105. package/dist/esm/utils/micro-frontend/host.js +9 -3
  106. package/dist/esm/utils/micro-frontend/index.js +23 -9
  107. package/dist/esm/utils/micro-frontend/ssfguest-adapter.js +5 -1
  108. package/dist/esm/utils/redact-pii.js +8 -2
  109. package/dist/esm/utils/session.js +14 -4
  110. package/dist/esm/utils/storybook/preview.js +1 -1
  111. package/dist/esm/utils/testing/index.js +5 -4
  112. package/dist/esm/utils/testing/render-with-redux.js +5 -4
  113. package/dist/esm/utils/testing/render-with-router-redux.js +10 -6
  114. package/dist/esm/utils/testing/render-with-router.js +5 -4
  115. package/dist/esm/utils/testing/render-with-state-addons.js +7 -6
  116. package/dist/esm/utils/window.js +10 -2
  117. package/dist/esm/view/app-root/hosted-app.js +9 -2
  118. package/dist/esm/view/app-root/index.js +24 -16
  119. package/dist/esm/view/app-root/stand-alone-app.js +13 -2
  120. package/dist/esm/view/app-router.js +2 -2
  121. package/dist/esm/view/breakpoint/use-breakpoint.js +9 -5
  122. package/dist/esm/view/breakpoint/use-media-query-list.js +3 -1
  123. package/dist/esm/view/error-boundary/default-error-template.js +14 -2
  124. package/dist/esm/view/error-boundary/index.js +2 -1
  125. package/dist/esm/view/error-toast/index.js +2 -2
  126. package/dist/esm/view/fields/autocomplete/index.js +9 -6
  127. package/dist/esm/view/fields/check-box/index.js +3 -3
  128. package/dist/esm/view/fields/combo-box/index.js +3 -3
  129. package/dist/esm/view/fields/combo-box-v3/index.js +3 -3
  130. package/dist/esm/view/fields/date-input/index.js +3 -3
  131. package/dist/esm/view/fields/date-picker/index.js +3 -3
  132. package/dist/esm/view/fields/date-range-picker/index.js +10 -6
  133. package/dist/esm/view/fields/date-time-picker/index.js +3 -3
  134. package/dist/esm/view/fields/form-item-layout/index.js +15 -13
  135. package/dist/esm/view/fields/form-layout-block-item/index.js +16 -14
  136. package/dist/esm/view/fields/input-mask/index.js +3 -3
  137. package/dist/esm/view/fields/input-text/index.js +3 -3
  138. package/dist/esm/view/fields/large-text-box/index.js +3 -3
  139. package/dist/esm/view/fields/radio/index.js +3 -3
  140. package/dist/esm/view/fields/radio-group/index.js +3 -3
  141. package/dist/esm/view/fields/text-box/index.js +3 -3
  142. package/dist/esm/view/fields/toggle/index.js +3 -3
  143. package/dist/esm/view/fields/watch-value.js +21 -2
  144. package/dist/esm/view/form/index.js +9 -7
  145. package/dist/esm/view/form/personal-info-section.js +50 -46
  146. package/dist/esm/view/form/submit-button/index.js +2 -2
  147. package/dist/esm/view/live-message/index.js +2 -2
  148. package/dist/esm/view/loadable/index.js +8 -7
  149. package/dist/esm/view/login/index.js +4 -2
  150. package/dist/esm/view/micro-app/app-factory/index.js +9 -3
  151. package/dist/esm/view/micro-app/index.js +2 -2
  152. package/dist/esm/view/micro-app/resources/manifest.js +10 -3
  153. package/dist/esm/view/micro-app/resources/script.js +24 -15
  154. package/dist/esm/view/micro-app/resources/style.js +20 -11
  155. package/dist/esm/view/micro-app/use-app-will-render.js +37 -28
  156. package/dist/esm/view/micro-iframe-app/app.js +20 -18
  157. package/dist/esm/view/micro-iframe-app/iframe/index.js +18 -14
  158. package/dist/esm/view/micro-iframe-app/index.js +2 -2
  159. package/dist/esm/view/modals/error/index.js +21 -9
  160. package/dist/esm/view/modals/navigation-prompt/index.js +46 -24
  161. package/dist/esm/view/modals/session-expiry/customHooks.js +6 -2
  162. package/dist/esm/view/modals/session-expiry/index.js +57 -32
  163. package/dist/esm/view/modals/wait-message/index.js +26 -24
  164. package/dist/esm/view/page.js +11 -2
  165. package/dist/esm/view/render-with-delay/index.js +4 -2
  166. package/dist/esm/view/render-with-host-data/index.js +2 -2
  167. package/dist/esm/view/require-auth.js +19 -10
  168. package/dist/esm/view/session-timeout/index.js +15 -11
  169. package/dist/esm/view/storybook/decorator.js +5 -4
  170. package/dist/esm/view/visually-hidden/index.js +7 -5
  171. package/dist/types/lib/data/index.d.ts +1 -1
  172. package/dist/types/lib/index.d.ts +2 -2
  173. package/dist/types/lib/utils/app-config/config.d.ts +5 -7
  174. package/dist/types/lib/utils/app-config/index.d.ts +1 -1
  175. package/dist/types/lib/utils/micro-frontend/host.d.ts +1 -1
  176. package/dist/types/lib/utils/window.d.ts +3 -0
  177. package/dist/types/lib/view/error-boundary/default-error-template.d.ts +1 -1
  178. package/dist/types/lib/view/error-boundary/index.d.ts +2 -1
  179. package/dist/types/lib/view/fields/form-item-layout/index.d.ts +1 -1
  180. package/dist/types/lib/view/micro-app/resources/script.d.ts +1 -1
  181. package/dist/types/lib/view/micro-app/resources/style.d.ts +2 -2
  182. package/package.json +45 -42
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { memo } from "react";
3
3
  import styled from "styled-components";
4
4
  import { APP_CONTAINER_ID_PREFIX } from "./const.js";
@@ -9,7 +9,7 @@ const Div = styled.div`
9
9
  `;
10
10
  const MicroApp = memo((props) => {
11
11
  useAppWillRender(props);
12
- return /* @__PURE__ */ React.createElement(Div, {
12
+ return /* @__PURE__ */ jsx(Div, {
13
13
  id: `${APP_CONTAINER_ID_PREFIX}${props.id}`
14
14
  });
15
15
  });
@@ -8,9 +8,16 @@ const getAppManifest = async ({
8
8
  manifestPath
9
9
  }) => {
10
10
  if (!hostUrl || !manifestPath)
11
- throw new Error("Unable to get app manifest. hostUrl and manifestPath are required.");
12
- const url = new URL(`${manifestPath.replace(/\/?$/, "/")}manifest.json`, hostUrl);
13
- const response = await getHTTPClient().get(removeDoubleSlash(url.href));
11
+ throw new Error(
12
+ "Unable to get app manifest. hostUrl and manifestPath are required."
13
+ );
14
+ const url = new URL(
15
+ `${manifestPath.replace(/\/?$/, "/")}manifest.json`,
16
+ hostUrl
17
+ );
18
+ const response = await getHTTPClient().get(
19
+ removeDoubleSlash(url.href)
20
+ );
14
21
  const { headers } = response;
15
22
  if (headers["content-type"] && headers["content-type"].includes("application/json"))
16
23
  return response.data;
@@ -2,21 +2,30 @@ 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(
8
+ "Unable to add scripts to DOM. hostUrl and manifestPath are required."
9
+ );
10
+ return new Promise((resolve, reject) => {
11
+ const ele = documentEle.createElement("script");
12
+ if (!ele)
13
+ reject(new Error("Unable to insert Application scripts."));
14
+ ele.id = `${APP_SCRIPT_ID_PREFIX}${name}-${index}`;
15
+ const url = new URL(
16
+ `${manifestPath.replace(/\/?$/, "/")}${fileName}`,
17
+ hostUrl
18
+ );
19
+ ele.src = removeDoubleSlash(url.href);
20
+ ele.onload = resolve.bind(null, ele.id);
21
+ ele.onerror = reject.bind(null, ele.id);
22
+ ele.async = false;
23
+ if (isHeadScript(ele.src))
24
+ documentEle.head.appendChild(ele);
25
+ else
26
+ documentEle.body.appendChild(ele);
27
+ });
28
+ };
20
29
  const removeScriptFromDOM = (elementId = "", documentEle = document) => new Promise((resolve) => {
21
30
  const ele = documentEle.getElementById(elementId);
22
31
  if (!ele)
@@ -1,16 +1,25 @@
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(
6
+ "Unable to add styles to DOM. hostUrl and manifestPath are required."
7
+ );
8
+ return new Promise((resolve, reject) => {
9
+ const ele = documentEle.createElement("link");
10
+ if (!ele)
11
+ reject(new Error("Unable to insert Application styles."));
12
+ ele.id = `${APP_STYLE_ID_PREFIX}${name}-${index}`;
13
+ ele.rel = "stylesheet";
14
+ const url = new URL(
15
+ `${manifestPath.replace(/\/?$/, "/")}${fileName}`,
16
+ hostUrl
17
+ );
18
+ ele.href = removeDoubleSlash(url.href);
19
+ ele.onload = resolve.bind(null, ele.id);
20
+ documentEle.head.appendChild(ele);
21
+ });
22
+ };
14
23
  const removeStyleFromDOM = (elementId = "", documentEle = document) => new Promise((resolve) => {
15
24
  const ele = documentEle.getElementById(elementId);
16
25
  if (!ele)
@@ -23,34 +23,43 @@ const useAppWillRender = ({
23
23
  }) => {
24
24
  const dispatch = useDispatch ? useDispatch() : null;
25
25
  const ref = useRef(Promise.resolve());
26
- const getConfig = useCallback(() => getMicroFrontEndAppConfig({
27
- id
28
- }), [id]);
29
- const unload = useCallback(async (appConfig, loadFailed = false) => {
30
- await unmountApp(appConfig);
31
- unloadApp(appConfig);
32
- if (!loadFailed && onUnloadComplete)
33
- onUnloadComplete();
34
- }, []);
35
- const load = useCallback(async (appConfig) => {
36
- if (dispatch)
37
- dispatch(waitMessage.open());
38
- try {
39
- if (ref.current)
40
- await ref.current;
41
- await loadApp(appConfig);
42
- await mountApp(appConfig);
43
- } catch (ex) {
44
- getLogger().error({
45
- ...logRecords.APP_CONFIG_LOAD_FAILED,
46
- exception: ex
47
- });
48
- await unload(appConfig, true);
49
- throw ex;
50
- }
51
- if (dispatch)
52
- dispatch(waitMessage.close());
53
- }, [dispatch, unload]);
26
+ const getConfig = useCallback(
27
+ () => getMicroFrontEndAppConfig({
28
+ id
29
+ }),
30
+ [id]
31
+ );
32
+ const unload = useCallback(
33
+ async (appConfig, loadFailed = false) => {
34
+ await unmountApp(appConfig);
35
+ unloadApp(appConfig);
36
+ if (!loadFailed && onUnloadComplete)
37
+ onUnloadComplete();
38
+ },
39
+ []
40
+ );
41
+ const load = useCallback(
42
+ async (appConfig) => {
43
+ if (dispatch)
44
+ dispatch(waitMessage.open());
45
+ try {
46
+ if (ref.current)
47
+ await ref.current;
48
+ await loadApp(appConfig);
49
+ await mountApp(appConfig);
50
+ } catch (ex) {
51
+ getLogger().error({
52
+ ...logRecords.APP_CONFIG_LOAD_FAILED,
53
+ exception: ex
54
+ });
55
+ await unload(appConfig, true);
56
+ throw ex;
57
+ }
58
+ if (dispatch)
59
+ dispatch(waitMessage.close());
60
+ },
61
+ [dispatch, unload]
62
+ );
54
63
  useLayoutEffect(() => {
55
64
  if (!documentEle)
56
65
  return () => {
@@ -1,27 +1,29 @@
1
- import * as React from "react";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { memo, useState } from "react";
3
- import frameHtml from "file-loader?name=iframe.[contenthash].[ext]!./iframe/index.html";
3
+ import frameHtml from "./iframe/index.html?resource";
4
4
  import { IFrame } from "./iframe/index.js";
5
5
  import { useFrameLoaded } from "./use-frame-loaded.js";
6
6
  import {
7
7
  useAppWillRender
8
8
  } from "../micro-app/use-app-will-render.js";
9
- const App = memo(({ id, dispose, onUnloadComplete, ...rest }) => {
10
- const [documentEle, setDocumentEle] = useState(null);
11
- useFrameLoaded({ id, documentEle, ...rest });
12
- useAppWillRender({
13
- id,
14
- documentEle: dispose ? null : documentEle,
15
- onUnloadComplete,
16
- ...rest
17
- });
18
- return /* @__PURE__ */ React.createElement(IFrame, {
19
- id,
20
- src: frameHtml,
21
- ...rest,
22
- onFrameReady: setDocumentEle
23
- });
24
- });
9
+ const App = memo(
10
+ ({ id, dispose, onUnloadComplete, ...rest }) => {
11
+ const [documentEle, setDocumentEle] = useState(null);
12
+ useFrameLoaded({ id, documentEle, ...rest });
13
+ useAppWillRender({
14
+ id,
15
+ documentEle: dispose ? null : documentEle,
16
+ onUnloadComplete,
17
+ ...rest
18
+ });
19
+ return /* @__PURE__ */ jsx(IFrame, {
20
+ id,
21
+ src: frameHtml,
22
+ ...rest,
23
+ onFrameReady: setDocumentEle
24
+ });
25
+ }
26
+ );
25
27
  export {
26
28
  App
27
29
  };
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { memo, useRef } from "react";
3
3
  import styled from "styled-components";
4
4
  import { IFRAME_CONTAINER_ID_PREFIX } from "./const.js";
@@ -17,19 +17,23 @@ const Iframe = styled.iframe`
17
17
  display: block;
18
18
  height: 100%;
19
19
  `;
20
- const IFrame = memo(({ id, name: title, src, sandbox, onFrameReady }) => {
21
- const frameRef = useRef(null);
22
- const sandboxProps = sandbox ? { sandbox } : {};
23
- return /* @__PURE__ */ React.createElement(Div, null, /* @__PURE__ */ React.createElement(Iframe, {
24
- id: `${IFRAME_CONTAINER_ID_PREFIX}${id}`,
25
- ref: frameRef,
26
- title,
27
- src,
28
- scrolling: "no",
29
- ...sandboxProps,
30
- onLoad: () => frameRef?.current?.contentDocument && onFrameReady(frameRef.current.contentDocument)
31
- }));
32
- });
20
+ const IFrame = memo(
21
+ ({ id, name: title, src, sandbox, onFrameReady }) => {
22
+ const frameRef = useRef(null);
23
+ const sandboxProps = sandbox ? { sandbox } : {};
24
+ return /* @__PURE__ */ jsx(Div, {
25
+ children: /* @__PURE__ */ jsx(Iframe, {
26
+ id: `${IFRAME_CONTAINER_ID_PREFIX}${id}`,
27
+ ref: frameRef,
28
+ title,
29
+ src,
30
+ scrolling: "no",
31
+ ...sandboxProps,
32
+ onLoad: () => frameRef?.current?.contentDocument && onFrameReady(frameRef.current.contentDocument)
33
+ })
34
+ });
35
+ }
36
+ );
33
37
  export {
34
38
  IFrame
35
39
  };
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import { createElement } from "react";
2
2
  import { useEffect, useState, memo } from "react";
3
3
  import { usePrevious } from "../use-previous.js";
4
4
  import { App } from "./app.js";
@@ -11,7 +11,7 @@ const MicroIFrameApp = memo(({ entityId = null, ...rest }) => {
11
11
  setDisposePrevApp(true);
12
12
  }
13
13
  }, [entityId]);
14
- return /* @__PURE__ */ React.createElement(App, {
14
+ return /* @__PURE__ */ createElement(App, {
15
15
  ...rest,
16
16
  key: appKey,
17
17
  dispose: disposePrevApp,
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useState, useCallback } from "react";
3
3
  import {
4
4
  DSDialog,
@@ -17,16 +17,28 @@ const Error = ({
17
17
  const handleClick = useCallback(() => {
18
18
  setOpen((prev) => !prev);
19
19
  }, []);
20
- return /* @__PURE__ */ React.createElement(DSDialog, {
20
+ return /* @__PURE__ */ jsx(DSDialog, {
21
21
  isOpen,
22
22
  onClickOutside: handleClick,
23
- size: "small"
24
- }, /* @__PURE__ */ React.createElement(DSDialogBody, {
25
- p: "s"
26
- }, /* @__PURE__ */ React.createElement(DSDialogDefaultLayout, null, /* @__PURE__ */ React.createElement(ErrorHexegon, {
27
- size: "xxl",
28
- color: ["danger", "900"]
29
- }), /* @__PURE__ */ React.createElement(DSDialogPrimaryMessage, null, primaryMessage), secondaryMessage && /* @__PURE__ */ React.createElement(DSDialogSecondaryMessage, null, secondaryMessage))));
23
+ size: "small",
24
+ children: /* @__PURE__ */ jsx(DSDialogBody, {
25
+ p: "s",
26
+ children: /* @__PURE__ */ jsxs(DSDialogDefaultLayout, {
27
+ children: [
28
+ /* @__PURE__ */ jsx(ErrorHexegon, {
29
+ size: "xxl",
30
+ color: ["danger", "900"]
31
+ }),
32
+ /* @__PURE__ */ jsx(DSDialogPrimaryMessage, {
33
+ children: primaryMessage
34
+ }),
35
+ secondaryMessage && /* @__PURE__ */ jsx(DSDialogSecondaryMessage, {
36
+ children: secondaryMessage
37
+ })
38
+ ]
39
+ })
40
+ })
41
+ });
30
42
  };
31
43
  export {
32
44
  Error
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { memo } from "react";
3
3
  import { Close } from "@elliemae/ds-icons";
4
4
  import { DSButtonV2 } from "@elliemae/ds-button";
@@ -12,29 +12,51 @@ import {
12
12
  } from "@elliemae/ds-dialog";
13
13
  import { useAppDispatch } from "../../../data/react-redux.js";
14
14
  import { navigationPrompt } from "../../../data/navigation-prompt/actions.js";
15
- const NavigationPrompt = memo(({ open = false }) => {
16
- const dispatch = useAppDispatch();
17
- const cancelDialog = () => dispatch(navigationPrompt.cancel());
18
- const confirmDialog = () => dispatch(navigationPrompt.confirm());
19
- return /* @__PURE__ */ React.createElement(DSDialog, {
20
- isOpen: open,
21
- onClickOutside: cancelDialog,
22
- centered: true
23
- }, /* @__PURE__ */ React.createElement(DSDialogHeader, null, /* @__PURE__ */ React.createElement(DSDialogAddon, null, /* @__PURE__ */ React.createElement(DSButtonV2, {
24
- buttonType: "icon",
25
- onClick: cancelDialog
26
- }, /* @__PURE__ */ React.createElement(Close, {
27
- color: ["neutral", "900"]
28
- })))), /* @__PURE__ */ React.createElement(DSDialogSeparator, null), /* @__PURE__ */ React.createElement(DSDialogBody, {
29
- px: 24,
30
- mb: 16
31
- }, "You currently have unsaved changes. Are you sure you want to proceed without saving?"), /* @__PURE__ */ React.createElement(DSDialogSeparator, null), /* @__PURE__ */ React.createElement(DSDialogFooter, null, /* @__PURE__ */ React.createElement(DSButtonV2, {
32
- buttonType: "outline",
33
- onClick: cancelDialog
34
- }, "Continue without saving"), /* @__PURE__ */ React.createElement(DSButtonV2, {
35
- onClick: confirmDialog
36
- }, "Save & Continue")));
37
- });
15
+ const NavigationPrompt = memo(
16
+ ({ open = false }) => {
17
+ const dispatch = useAppDispatch();
18
+ const cancelDialog = () => dispatch(navigationPrompt.cancel());
19
+ const confirmDialog = () => dispatch(navigationPrompt.confirm());
20
+ return /* @__PURE__ */ jsxs(DSDialog, {
21
+ isOpen: open,
22
+ onClickOutside: cancelDialog,
23
+ centered: true,
24
+ children: [
25
+ /* @__PURE__ */ jsx(DSDialogHeader, {
26
+ children: /* @__PURE__ */ jsx(DSDialogAddon, {
27
+ children: /* @__PURE__ */ jsx(DSButtonV2, {
28
+ buttonType: "icon",
29
+ onClick: cancelDialog,
30
+ children: /* @__PURE__ */ jsx(Close, {
31
+ color: ["neutral", "900"]
32
+ })
33
+ })
34
+ })
35
+ }),
36
+ /* @__PURE__ */ jsx(DSDialogSeparator, {}),
37
+ /* @__PURE__ */ jsx(DSDialogBody, {
38
+ px: 24,
39
+ mb: 16,
40
+ children: "You currently have unsaved changes. Are you sure you want to proceed without saving?"
41
+ }),
42
+ /* @__PURE__ */ jsx(DSDialogSeparator, {}),
43
+ /* @__PURE__ */ jsxs(DSDialogFooter, {
44
+ children: [
45
+ /* @__PURE__ */ jsx(DSButtonV2, {
46
+ buttonType: "outline",
47
+ onClick: cancelDialog,
48
+ children: "Continue without saving"
49
+ }),
50
+ /* @__PURE__ */ jsx(DSButtonV2, {
51
+ onClick: confirmDialog,
52
+ children: "Save & Continue"
53
+ })
54
+ ]
55
+ })
56
+ ]
57
+ });
58
+ }
59
+ );
38
60
  export {
39
61
  NavigationPrompt
40
62
  };
@@ -6,8 +6,12 @@ const useTrackSessionExpiry = (warningNotifiedAt) => {
6
6
  const [timeData, setTimeData] = useState();
7
7
  useEffect(() => {
8
8
  const timeLeftForExpiryAfterWarning = () => {
9
- const userWarnInterval = getAppConfigValue("sessionTimeoutWarnInterval");
10
- const userTimeoutInterval = getAppConfigValue("sessionTimeoutInterval");
9
+ const userWarnInterval = getAppConfigValue(
10
+ "sessionTimeoutWarnInterval"
11
+ );
12
+ const userTimeoutInterval = getAppConfigValue(
13
+ "sessionTimeoutInterval"
14
+ );
11
15
  const warnInterval = userWarnInterval ? parseFloat(userWarnInterval) : SESSION_TIMEOUT_INTERVAL.WARN;
12
16
  const sessionTimeout = userTimeoutInterval ? parseFloat(userTimeoutInterval) : SESSION_TIMEOUT_INTERVAL.EXPIRY;
13
17
  const diffTime = sessionTimeout - warnInterval;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { memo, useEffect, useState } from "react";
3
3
  import { DSButtonV2 } from "@elliemae/ds-button";
4
4
  import { WarningCircle } from "@elliemae/ds-icons";
@@ -15,37 +15,62 @@ import { useAppDispatch } from "../../../data/react-redux.js";
15
15
  import { logout } from "../../../data/logout/actions.js";
16
16
  import { resetUserIdleTime } from "../../../utils/session.js";
17
17
  import { useTrackSessionExpiry } from "./customHooks.js";
18
- const SessionExpiry = memo(({ open, warningNotifiedAt = 0 }) => {
19
- const [isOpen, setIsOpen] = useState(open);
20
- const timeLeft = useTrackSessionExpiry(warningNotifiedAt);
21
- const dispatch = useAppDispatch();
22
- useEffect(() => {
23
- setIsOpen(open);
24
- }, [open]);
25
- const resetSession = () => {
26
- setIsOpen(false);
27
- resetUserIdleTime(true);
28
- dispatch(logout.cancel());
29
- };
30
- const logoutSession = () => {
31
- setIsOpen(false);
32
- dispatch(logout.confirm());
33
- };
34
- return timeLeft ? /* @__PURE__ */ React.createElement(DSDialog, {
35
- isOpen,
36
- size: "small"
37
- }, /* @__PURE__ */ React.createElement(DSDialogBody, {
38
- p: "s"
39
- }, /* @__PURE__ */ React.createElement(DSDialogDefaultLayout, null, /* @__PURE__ */ React.createElement(WarningCircle, {
40
- size: "xl",
41
- color: ["warning", "900"]
42
- }), /* @__PURE__ */ React.createElement(DSDialogPrimaryMessage, null, `Your session will expire in ${timeLeft}`), /* @__PURE__ */ React.createElement(DSDialogSecondaryMessage, null, "Please logout or reset your session"))), /* @__PURE__ */ React.createElement(DSDialogSeparator, null), /* @__PURE__ */ React.createElement(DSDialogFooter, null, /* @__PURE__ */ React.createElement(DSButtonV2, {
43
- buttonType: "outline",
44
- onClick: logoutSession
45
- }, "Logout"), /* @__PURE__ */ React.createElement(DSButtonV2, {
46
- onClick: resetSession
47
- }, "Reset"))) : null;
48
- });
18
+ const SessionExpiry = memo(
19
+ ({ open, warningNotifiedAt = 0 }) => {
20
+ const [isOpen, setIsOpen] = useState(open);
21
+ const timeLeft = useTrackSessionExpiry(warningNotifiedAt);
22
+ const dispatch = useAppDispatch();
23
+ useEffect(() => {
24
+ setIsOpen(open);
25
+ }, [open]);
26
+ const resetSession = () => {
27
+ setIsOpen(false);
28
+ resetUserIdleTime(true);
29
+ dispatch(logout.cancel());
30
+ };
31
+ const logoutSession = () => {
32
+ setIsOpen(false);
33
+ dispatch(logout.confirm());
34
+ };
35
+ return timeLeft ? /* @__PURE__ */ jsxs(DSDialog, {
36
+ isOpen,
37
+ size: "small",
38
+ children: [
39
+ /* @__PURE__ */ jsx(DSDialogBody, {
40
+ p: "s",
41
+ children: /* @__PURE__ */ jsxs(DSDialogDefaultLayout, {
42
+ children: [
43
+ /* @__PURE__ */ jsx(WarningCircle, {
44
+ size: "xl",
45
+ color: ["warning", "900"]
46
+ }),
47
+ /* @__PURE__ */ jsx(DSDialogPrimaryMessage, {
48
+ children: `Your session will expire in ${timeLeft}`
49
+ }),
50
+ /* @__PURE__ */ jsx(DSDialogSecondaryMessage, {
51
+ children: "Please logout or reset your session"
52
+ })
53
+ ]
54
+ })
55
+ }),
56
+ /* @__PURE__ */ jsx(DSDialogSeparator, {}),
57
+ /* @__PURE__ */ jsxs(DSDialogFooter, {
58
+ children: [
59
+ /* @__PURE__ */ jsx(DSButtonV2, {
60
+ buttonType: "outline",
61
+ onClick: logoutSession,
62
+ children: "Logout"
63
+ }),
64
+ /* @__PURE__ */ jsx(DSButtonV2, {
65
+ onClick: resetSession,
66
+ children: "Reset"
67
+ })
68
+ ]
69
+ })
70
+ ]
71
+ }) : null;
72
+ }
73
+ );
49
74
  export {
50
75
  SessionExpiry
51
76
  };
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { memo, useEffect } from "react";
3
3
  import { DSLoadingIndicator } from "@elliemae/ds-loading-indicator";
4
4
  import { useAppSelector } from "../../../data/react-redux.js";
@@ -7,29 +7,31 @@ import {
7
7
  waitStartEvent,
8
8
  waitEndEvent
9
9
  } from "../../../analytics/user-wait-event.js";
10
- const WaitMessage = memo(({
11
- size = "m",
12
- style = { color: "white", fontSize: "1.25rem" },
13
- ...rest
14
- }) => {
15
- const isOpen = useAppSelector((state) => state.waitMessage?.isOpen);
16
- const message = useAppSelector((state) => state.waitMessage?.message);
17
- useEffect(() => {
18
- if (isOpen)
19
- waitStartEvent();
20
- else
21
- waitEndEvent();
22
- }, [isOpen]);
23
- useHTMLWaitMessage(isOpen !== null);
24
- return /* @__PURE__ */ React.createElement(DSLoadingIndicator, {
25
- id: "em-loading",
26
- size,
27
- style,
28
- ...rest,
29
- loading: isOpen,
30
- message
31
- });
32
- });
10
+ const WaitMessage = memo(
11
+ ({
12
+ size = "m",
13
+ style = { color: "white", fontSize: "1.25rem" },
14
+ ...rest
15
+ }) => {
16
+ const isOpen = useAppSelector((state) => state.waitMessage?.isOpen);
17
+ const message = useAppSelector((state) => state.waitMessage?.message);
18
+ useEffect(() => {
19
+ if (isOpen)
20
+ waitStartEvent();
21
+ else
22
+ waitEndEvent();
23
+ }, [isOpen]);
24
+ useHTMLWaitMessage(isOpen !== null);
25
+ return /* @__PURE__ */ jsx(DSLoadingIndicator, {
26
+ id: "em-loading",
27
+ size,
28
+ style,
29
+ ...rest,
30
+ loading: isOpen,
31
+ message
32
+ });
33
+ }
34
+ );
33
35
  export {
34
36
  WaitMessage
35
37
  };
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Helmet } from "react-helmet";
3
3
  import * as brum from "@elliemae/pui-user-monitoring";
4
4
  import { pageViewEvent } from "../analytics/page-view-event.js";
@@ -14,7 +14,16 @@ const onPageView = (pageTitle) => {
14
14
  };
15
15
  const Page = ({ pageTitle = "ICE", children }) => {
16
16
  onPageView(pageTitle);
17
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Helmet, null, /* @__PURE__ */ React.createElement("title", null, pageTitle)), children);
17
+ return /* @__PURE__ */ jsxs(Fragment, {
18
+ children: [
19
+ /* @__PURE__ */ jsx(Helmet, {
20
+ children: /* @__PURE__ */ jsx("title", {
21
+ children: pageTitle
22
+ })
23
+ }),
24
+ children
25
+ ]
26
+ });
18
27
  };
19
28
  export {
20
29
  Page,
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import { Fragment, jsx } from "react/jsx-runtime";
2
2
  import { useEffect, useState, memo } from "react";
3
3
  const RenderWithDelay = memo(({ render }) => {
4
4
  const [show, showComponents] = useState(false);
@@ -8,7 +8,9 @@ const RenderWithDelay = memo(({ render }) => {
8
8
  clearTimeout(timeoutId);
9
9
  };
10
10
  }, []);
11
- return /* @__PURE__ */ React.createElement(React.Fragment, null, show ? render() : "");
11
+ return /* @__PURE__ */ jsx(Fragment, {
12
+ children: show ? render() : ""
13
+ });
12
14
  });
13
15
  export {
14
16
  RenderWithDelay