@elliemae/pui-app-sdk 3.15.0 → 3.16.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.
Files changed (158) 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/communication/http-client/index.js +4 -1
  6. package/dist/cjs/communication/http-client/response-interceptor.js +4 -1
  7. package/dist/cjs/communication/http-client/retry-axios.js +4 -1
  8. package/dist/cjs/data/auth/reducer.js +14 -8
  9. package/dist/cjs/data/breakpoint/index.js +4 -1
  10. package/dist/cjs/data/store.js +10 -2
  11. package/dist/cjs/data/wait-message/reducer.js +4 -1
  12. package/dist/cjs/index.js +4 -1
  13. package/dist/cjs/sideeffect/error-toast/index.js +3 -1
  14. package/dist/cjs/sideeffect/wait-message/index.js +6 -2
  15. package/dist/cjs/utils/app-config/config.js +4 -1
  16. package/dist/cjs/utils/app-config/index.js +9 -2
  17. package/dist/cjs/utils/auth/helper.js +4 -1
  18. package/dist/cjs/utils/auth/index.js +3 -1
  19. package/dist/cjs/utils/micro-frontend/guest.js +7 -2
  20. package/dist/cjs/utils/micro-frontend/host.js +8 -2
  21. package/dist/cjs/utils/micro-frontend/index.js +27 -10
  22. package/dist/cjs/utils/micro-frontend/ssfguest-adapter.js +9 -2
  23. package/dist/cjs/utils/redact-pii.js +8 -2
  24. package/dist/cjs/utils/session.js +14 -4
  25. package/dist/cjs/utils/testing/index.js +5 -7
  26. package/dist/cjs/utils/testing/render-with-redux.js +5 -7
  27. package/dist/cjs/utils/testing/render-with-router-redux.js +10 -9
  28. package/dist/cjs/utils/testing/render-with-router.js +5 -7
  29. package/dist/cjs/utils/testing/render-with-state-addons.js +7 -9
  30. package/dist/cjs/utils/web-storage.js +4 -1
  31. package/dist/cjs/utils/window.js +8 -2
  32. package/dist/cjs/view/app-root/hosted-app.js +13 -3
  33. package/dist/cjs/view/app-root/index.js +21 -19
  34. package/dist/cjs/view/app-root/stand-alone-app.js +17 -3
  35. package/dist/cjs/view/app-router.js +2 -5
  36. package/dist/cjs/view/breakpoint/use-breakpoint.js +9 -5
  37. package/dist/cjs/view/breakpoint/use-media-query-list.js +3 -1
  38. package/dist/cjs/view/error-boundary/default-error-template.js +11 -5
  39. package/dist/cjs/view/error-boundary/index.js +6 -2
  40. package/dist/cjs/view/error-toast/index.js +2 -5
  41. package/dist/cjs/view/fetch-host-app-data/index.js +4 -1
  42. package/dist/cjs/view/fields/autocomplete/index.js +9 -9
  43. package/dist/cjs/view/fields/check-box/index.js +3 -6
  44. package/dist/cjs/view/fields/combo-box/index.js +3 -6
  45. package/dist/cjs/view/fields/combo-box-v3/index.js +3 -6
  46. package/dist/cjs/view/fields/date-input/index.js +3 -6
  47. package/dist/cjs/view/fields/date-picker/index.js +7 -4
  48. package/dist/cjs/view/fields/date-range-picker/index.js +10 -9
  49. package/dist/cjs/view/fields/date-time-picker/index.js +3 -6
  50. package/dist/cjs/view/fields/form-item-layout/index.js +15 -16
  51. package/dist/cjs/view/fields/form-layout-block-item/index.js +16 -17
  52. package/dist/cjs/view/fields/input-mask/index.js +3 -6
  53. package/dist/cjs/view/fields/input-text/index.js +3 -6
  54. package/dist/cjs/view/fields/large-text-box/index.js +3 -6
  55. package/dist/cjs/view/fields/radio/index.js +3 -6
  56. package/dist/cjs/view/fields/radio-group/index.js +3 -6
  57. package/dist/cjs/view/fields/text-box/index.js +3 -6
  58. package/dist/cjs/view/fields/toggle/index.js +3 -6
  59. package/dist/cjs/view/fields/watch-value.js +25 -3
  60. package/dist/cjs/view/form/index.js +13 -8
  61. package/dist/cjs/view/form/personal-info-section.js +54 -47
  62. package/dist/cjs/view/form/submit-button/index.js +2 -5
  63. package/dist/cjs/view/live-message/index.js +2 -5
  64. package/dist/cjs/view/loadable/index.js +8 -10
  65. package/dist/cjs/view/login/index.js +4 -5
  66. package/dist/cjs/view/micro-app/app-factory/index.js +9 -3
  67. package/dist/cjs/view/micro-app/index.js +6 -3
  68. package/dist/cjs/view/micro-app/resources/manifest.js +10 -3
  69. package/dist/cjs/view/micro-app/use-app-will-render.js +37 -28
  70. package/dist/cjs/view/micro-iframe-app/app.js +23 -18
  71. package/dist/cjs/view/micro-iframe-app/iframe/index.js +22 -15
  72. package/dist/cjs/view/micro-iframe-app/index.js +2 -5
  73. package/dist/cjs/view/modals/error/index.js +21 -12
  74. package/dist/cjs/view/modals/navigation-prompt/index.js +46 -27
  75. package/dist/cjs/view/modals/session-expiry/customHooks.js +6 -2
  76. package/dist/cjs/view/modals/session-expiry/index.js +57 -35
  77. package/dist/cjs/view/modals/wait-message/index.js +26 -27
  78. package/dist/cjs/view/page.js +15 -3
  79. package/dist/cjs/view/render-with-delay/index.js +4 -5
  80. package/dist/cjs/view/render-with-host-data/index.js +2 -5
  81. package/dist/cjs/view/require-auth.js +12 -6
  82. package/dist/cjs/view/session-timeout/index.js +15 -14
  83. package/dist/cjs/view/storybook/decorator.js +5 -7
  84. package/dist/cjs/view/visually-hidden/index.js +11 -6
  85. package/dist/esm/api/auth/index.js +8 -2
  86. package/dist/esm/api/helpers.js +7 -1
  87. package/dist/esm/api/users/index.js +3 -1
  88. package/dist/esm/data/auth/reducer.js +10 -7
  89. package/dist/esm/data/store.js +6 -1
  90. package/dist/esm/sideeffect/error-toast/index.js +3 -1
  91. package/dist/esm/sideeffect/wait-message/index.js +6 -2
  92. package/dist/esm/utils/app-config/index.js +5 -1
  93. package/dist/esm/utils/auth/index.js +3 -1
  94. package/dist/esm/utils/micro-frontend/guest.js +3 -1
  95. package/dist/esm/utils/micro-frontend/host.js +8 -2
  96. package/dist/esm/utils/micro-frontend/index.js +23 -9
  97. package/dist/esm/utils/micro-frontend/ssfguest-adapter.js +5 -1
  98. package/dist/esm/utils/redact-pii.js +8 -2
  99. package/dist/esm/utils/session.js +14 -4
  100. package/dist/esm/utils/testing/index.js +5 -4
  101. package/dist/esm/utils/testing/render-with-redux.js +5 -4
  102. package/dist/esm/utils/testing/render-with-router-redux.js +10 -6
  103. package/dist/esm/utils/testing/render-with-router.js +5 -4
  104. package/dist/esm/utils/testing/render-with-state-addons.js +7 -6
  105. package/dist/esm/utils/window.js +8 -2
  106. package/dist/esm/view/app-root/hosted-app.js +9 -2
  107. package/dist/esm/view/app-root/index.js +21 -16
  108. package/dist/esm/view/app-root/stand-alone-app.js +13 -2
  109. package/dist/esm/view/app-router.js +2 -2
  110. package/dist/esm/view/breakpoint/use-breakpoint.js +9 -5
  111. package/dist/esm/view/breakpoint/use-media-query-list.js +3 -1
  112. package/dist/esm/view/error-boundary/default-error-template.js +11 -2
  113. package/dist/esm/view/error-boundary/index.js +2 -1
  114. package/dist/esm/view/error-toast/index.js +2 -2
  115. package/dist/esm/view/fields/autocomplete/index.js +9 -6
  116. package/dist/esm/view/fields/check-box/index.js +3 -3
  117. package/dist/esm/view/fields/combo-box/index.js +3 -3
  118. package/dist/esm/view/fields/combo-box-v3/index.js +3 -3
  119. package/dist/esm/view/fields/date-input/index.js +3 -3
  120. package/dist/esm/view/fields/date-picker/index.js +3 -3
  121. package/dist/esm/view/fields/date-range-picker/index.js +10 -6
  122. package/dist/esm/view/fields/date-time-picker/index.js +3 -3
  123. package/dist/esm/view/fields/form-item-layout/index.js +15 -13
  124. package/dist/esm/view/fields/form-layout-block-item/index.js +16 -14
  125. package/dist/esm/view/fields/input-mask/index.js +3 -3
  126. package/dist/esm/view/fields/input-text/index.js +3 -3
  127. package/dist/esm/view/fields/large-text-box/index.js +3 -3
  128. package/dist/esm/view/fields/radio/index.js +3 -3
  129. package/dist/esm/view/fields/radio-group/index.js +3 -3
  130. package/dist/esm/view/fields/text-box/index.js +3 -3
  131. package/dist/esm/view/fields/toggle/index.js +3 -3
  132. package/dist/esm/view/fields/watch-value.js +21 -2
  133. package/dist/esm/view/form/index.js +9 -7
  134. package/dist/esm/view/form/personal-info-section.js +50 -46
  135. package/dist/esm/view/form/submit-button/index.js +2 -2
  136. package/dist/esm/view/live-message/index.js +2 -2
  137. package/dist/esm/view/loadable/index.js +8 -7
  138. package/dist/esm/view/login/index.js +4 -2
  139. package/dist/esm/view/micro-app/app-factory/index.js +9 -3
  140. package/dist/esm/view/micro-app/index.js +2 -2
  141. package/dist/esm/view/micro-app/resources/manifest.js +10 -3
  142. package/dist/esm/view/micro-app/use-app-will-render.js +37 -28
  143. package/dist/esm/view/micro-iframe-app/app.js +19 -17
  144. package/dist/esm/view/micro-iframe-app/iframe/index.js +18 -14
  145. package/dist/esm/view/micro-iframe-app/index.js +2 -2
  146. package/dist/esm/view/modals/error/index.js +21 -9
  147. package/dist/esm/view/modals/navigation-prompt/index.js +46 -24
  148. package/dist/esm/view/modals/session-expiry/customHooks.js +6 -2
  149. package/dist/esm/view/modals/session-expiry/index.js +57 -32
  150. package/dist/esm/view/modals/wait-message/index.js +26 -24
  151. package/dist/esm/view/page.js +11 -2
  152. package/dist/esm/view/render-with-delay/index.js +4 -2
  153. package/dist/esm/view/render-with-host-data/index.js +2 -2
  154. package/dist/esm/view/require-auth.js +8 -5
  155. package/dist/esm/view/session-timeout/index.js +15 -11
  156. package/dist/esm/view/storybook/decorator.js +5 -4
  157. package/dist/esm/view/visually-hidden/index.js +7 -5
  158. package/package.json +33 -33
@@ -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;
@@ -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,4 +1,4 @@
1
- import * as React from "react";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { memo, useState } from "react";
3
3
  import frameHtml from "file-loader?name=iframe.[contenthash].[ext]!./iframe/index.html";
4
4
  import { IFrame } from "./iframe/index.js";
@@ -6,22 +6,24 @@ 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
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { useState, useEffect } from "react";
3
3
  import { fetchHostAppData } from "../fetch-host-app-data/index.js";
4
4
  import { WaitMessageLauncher } from "../modals/wait-message/wait-message-launcher.js";
@@ -20,7 +20,7 @@ const renderWithHostData = (data) => {
20
20
  setLoading(false);
21
21
  }
22
22
  }, []);
23
- return loading ? /* @__PURE__ */ React.createElement(WaitMessageLauncher, null) : /* @__PURE__ */ React.createElement(ComponentToRender, null);
23
+ return loading ? /* @__PURE__ */ jsx(WaitMessageLauncher, {}) : /* @__PURE__ */ jsx(ComponentToRender, {});
24
24
  };
25
25
  return HostAppDataWrapper;
26
26
  };
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import { Fragment, jsx } from "react/jsx-runtime";
2
2
  import { useInjectReducer, useInjectSaga } from "redux-injectors";
3
3
  import enums from "../utils/constants.js";
4
4
  import { authReducer } from "../data/auth/reducer.js";
@@ -16,13 +16,16 @@ const RequireAuth = ({
16
16
  useInjectSaga({ key, saga: authentication });
17
17
  const userAuthorized = isUserAuthorized();
18
18
  if (userAuthorized) {
19
- return /* @__PURE__ */ React.createElement(React.Fragment, null, children);
19
+ return /* @__PURE__ */ jsx(Fragment, {
20
+ children
21
+ });
20
22
  }
21
- return /* @__PURE__ */ React.createElement(Login, {
23
+ return /* @__PURE__ */ jsx(Login, {
22
24
  clientId,
23
25
  scope,
24
- responseType
25
- }, children);
26
+ responseType,
27
+ children
28
+ });
26
29
  };
27
30
  export {
28
31
  RequireAuth
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from "react";
3
3
  import { useAppDispatch } from "../../data/react-redux.js";
4
4
  import { logout } from "../../data/logout/actions.js";
@@ -16,12 +16,14 @@ const SessionTimeout = () => {
16
16
  const [warningNotifiedAt, setwarningNotifiedAt] = useState();
17
17
  useEffect(() => {
18
18
  initSessionMonitoring();
19
- const warningCb = subscribeToSessionExpiryWarning((sessionExpiryWarningNotifiedAt) => {
20
- if (!sessionExpiryWarningNotifiedAt)
21
- return;
22
- setwarningNotifiedAt(sessionExpiryWarningNotifiedAt);
23
- setSessionExpiryWarning(true);
24
- });
19
+ const warningCb = subscribeToSessionExpiryWarning(
20
+ (sessionExpiryWarningNotifiedAt) => {
21
+ if (!sessionExpiryWarningNotifiedAt)
22
+ return;
23
+ setwarningNotifiedAt(sessionExpiryWarningNotifiedAt);
24
+ setSessionExpiryWarning(true);
25
+ }
26
+ );
25
27
  const resetCb = subscribeToResetSession((resetWarningModal) => {
26
28
  if (resetWarningModal === true) {
27
29
  setSessionExpiryWarning(false);
@@ -38,10 +40,12 @@ const SessionTimeout = () => {
38
40
  stopSessionMonitoring();
39
41
  };
40
42
  }, [dispatch]);
41
- return /* @__PURE__ */ React.createElement("div", null, showSessionExpiryWarning && /* @__PURE__ */ React.createElement(SessionExpiry, {
42
- open: true,
43
- warningNotifiedAt
44
- }));
43
+ return /* @__PURE__ */ jsx("div", {
44
+ children: showSessionExpiryWarning && /* @__PURE__ */ jsx(SessionExpiry, {
45
+ open: true,
46
+ warningNotifiedAt
47
+ })
48
+ });
45
49
  };
46
50
  export {
47
51
  SessionTimeout