@elliemae/pui-app-sdk 3.13.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.
- package/dist/cjs/analytics/appdynamics.js +4 -1
- package/dist/cjs/api/auth/index.js +8 -2
- package/dist/cjs/api/helpers.js +7 -1
- package/dist/cjs/api/users/index.js +3 -1
- package/dist/cjs/communication/http-client/index.js +4 -1
- package/dist/cjs/communication/http-client/response-interceptor.js +4 -1
- package/dist/cjs/communication/http-client/retry-axios.js +4 -1
- package/dist/cjs/data/auth/reducer.js +14 -8
- package/dist/cjs/data/breakpoint/index.js +4 -1
- package/dist/cjs/data/store.js +10 -2
- package/dist/cjs/data/wait-message/reducer.js +4 -1
- package/dist/cjs/index.js +8 -1
- package/dist/cjs/sideeffect/error-toast/index.js +3 -1
- package/dist/cjs/sideeffect/wait-message/index.js +6 -2
- package/dist/cjs/utils/app-config/config.js +4 -1
- package/dist/cjs/utils/app-config/index.js +9 -2
- package/dist/cjs/utils/auth/helper.js +4 -1
- package/dist/cjs/utils/auth/index.js +3 -1
- package/dist/cjs/utils/micro-frontend/guest.js +7 -2
- package/dist/cjs/utils/micro-frontend/host.js +8 -2
- package/dist/cjs/utils/micro-frontend/index.js +27 -10
- package/dist/cjs/utils/micro-frontend/ssfguest-adapter.js +9 -2
- package/dist/cjs/utils/redact-pii.js +8 -2
- package/dist/cjs/utils/session.js +14 -4
- package/dist/cjs/utils/testing/index.js +5 -7
- package/dist/cjs/utils/testing/render-with-redux.js +5 -7
- package/dist/cjs/utils/testing/render-with-router-redux.js +10 -9
- package/dist/cjs/utils/testing/render-with-router.js +5 -7
- package/dist/cjs/utils/testing/render-with-state-addons.js +7 -9
- package/dist/cjs/utils/web-storage.js +4 -1
- package/dist/cjs/utils/window.js +8 -2
- package/dist/cjs/view/app-root/hosted-app.js +13 -3
- package/dist/cjs/view/app-root/index.js +21 -19
- package/dist/cjs/view/app-root/stand-alone-app.js +17 -3
- package/dist/cjs/view/app-router.js +2 -5
- package/dist/cjs/view/breakpoint/use-breakpoint.js +9 -5
- package/dist/cjs/view/breakpoint/use-media-query-list.js +3 -1
- package/dist/cjs/view/error-boundary/default-error-template.js +11 -5
- package/dist/cjs/view/error-boundary/index.js +6 -2
- package/dist/cjs/view/error-toast/index.js +2 -5
- package/dist/cjs/view/fetch-host-app-data/index.js +4 -1
- package/dist/cjs/view/fields/autocomplete/index.js +47 -0
- package/dist/cjs/view/fields/check-box/index.js +3 -6
- package/dist/cjs/view/fields/combo-box/index.js +3 -6
- package/dist/cjs/view/fields/combo-box-v3/index.js +42 -0
- package/dist/cjs/view/fields/date-input/index.js +3 -6
- package/dist/cjs/view/fields/date-picker/index.js +7 -4
- package/dist/cjs/view/fields/date-range-picker/index.js +10 -9
- package/dist/cjs/view/fields/date-time-picker/index.js +3 -6
- package/dist/cjs/view/fields/form-item-layout/index.js +15 -16
- package/dist/cjs/view/fields/form-layout-block-item/index.js +16 -17
- package/dist/cjs/view/fields/input-mask/index.js +3 -6
- package/dist/cjs/view/fields/input-text/index.js +3 -6
- package/dist/cjs/view/fields/large-text-box/index.js +3 -6
- package/dist/cjs/view/fields/radio/index.js +3 -6
- package/dist/cjs/view/fields/radio-group/index.js +3 -6
- package/dist/cjs/view/fields/text-box/index.js +3 -6
- package/dist/cjs/view/fields/toggle/index.js +3 -6
- package/dist/cjs/view/fields/watch-value.js +25 -3
- package/dist/cjs/view/form/index.js +13 -8
- package/dist/cjs/view/form/personal-info-section.js +54 -47
- package/dist/cjs/view/form/submit-button/index.js +2 -5
- package/dist/cjs/view/live-message/index.js +2 -5
- package/dist/cjs/view/loadable/index.js +8 -10
- package/dist/cjs/view/login/index.js +4 -5
- package/dist/cjs/view/micro-app/app-factory/index.js +9 -3
- package/dist/cjs/view/micro-app/index.js +6 -3
- package/dist/cjs/view/micro-app/resources/manifest.js +10 -3
- package/dist/cjs/view/micro-app/use-app-will-render.js +37 -28
- package/dist/cjs/view/micro-iframe-app/app.js +23 -18
- package/dist/cjs/view/micro-iframe-app/iframe/index.js +22 -15
- package/dist/cjs/view/micro-iframe-app/index.js +2 -5
- package/dist/cjs/view/modals/error/index.js +21 -12
- package/dist/cjs/view/modals/navigation-prompt/index.js +46 -27
- package/dist/cjs/view/modals/session-expiry/customHooks.js +6 -2
- package/dist/cjs/view/modals/session-expiry/index.js +57 -35
- package/dist/cjs/view/modals/wait-message/index.js +26 -27
- package/dist/cjs/view/page.js +15 -3
- package/dist/cjs/view/render-with-delay/index.js +4 -5
- package/dist/cjs/view/render-with-host-data/index.js +2 -5
- package/dist/cjs/view/require-auth.js +12 -6
- package/dist/cjs/view/session-timeout/index.js +15 -14
- package/dist/cjs/view/storybook/decorator.js +5 -7
- package/dist/cjs/view/visually-hidden/index.js +11 -6
- package/dist/esm/analytics/appdynamics.js +0 -1
- package/dist/esm/analytics/index.js +0 -1
- package/dist/esm/analytics/page-view-event.js +0 -1
- package/dist/esm/analytics/user-session-event.js +0 -1
- package/dist/esm/analytics/user-wait-event.js +0 -1
- package/dist/esm/analytics/web-analytics.js +0 -1
- package/dist/esm/api/auth/index.js +8 -3
- package/dist/esm/api/helpers.js +7 -2
- package/dist/esm/api/users/index.js +3 -2
- package/dist/esm/communication/http-client/index.js +0 -1
- package/dist/esm/communication/http-client/request-interceptor.js +0 -1
- package/dist/esm/communication/http-client/response-interceptor.js +0 -1
- package/dist/esm/communication/http-client/retry-axios.js +0 -1
- package/dist/esm/communication/http-client/retry.js +0 -1
- package/dist/esm/data/auth/actions.js +0 -1
- package/dist/esm/data/auth/reducer.js +10 -8
- package/dist/esm/data/breakpoint/index.js +0 -1
- package/dist/esm/data/error/index.js +0 -1
- package/dist/esm/data/index.js +0 -1
- package/dist/esm/data/live-message/index.js +0 -1
- package/dist/esm/data/logout/actions.js +0 -1
- package/dist/esm/data/navigation-prompt/actions.js +0 -1
- package/dist/esm/data/react-redux.js +0 -1
- package/dist/esm/data/reducers.js +0 -1
- package/dist/esm/data/saga.js +0 -1
- package/dist/esm/data/store.js +6 -2
- package/dist/esm/data/wait-message/actions.js +0 -1
- package/dist/esm/data/wait-message/reducer.js +0 -1
- package/dist/esm/data/webpack-hmr.js +0 -1
- package/dist/esm/index.js +4 -1
- package/dist/esm/micro-frontend.js +0 -1
- package/dist/esm/sideeffect/auth/index.js +0 -1
- package/dist/esm/sideeffect/error-toast/index.js +3 -2
- package/dist/esm/sideeffect/wait-message/index.js +6 -3
- package/dist/esm/utils/app-config/config.js +0 -1
- package/dist/esm/utils/app-config/index.js +5 -2
- package/dist/esm/utils/app-host-integration/react.js +0 -1
- package/dist/esm/utils/auth/helper.js +0 -1
- package/dist/esm/utils/auth/index.js +3 -2
- package/dist/esm/utils/await.js +0 -1
- package/dist/esm/utils/constants.js +0 -1
- package/dist/esm/utils/font-size.js +0 -1
- package/dist/esm/utils/guest-with-service.js +0 -1
- package/dist/esm/utils/helpers.js +0 -1
- package/dist/esm/utils/history.js +0 -1
- package/dist/esm/utils/log-records.js +0 -1
- package/dist/esm/utils/micro-frontend/console-logger.js +0 -1
- package/dist/esm/utils/micro-frontend/guest.js +3 -2
- package/dist/esm/utils/micro-frontend/host.js +8 -3
- package/dist/esm/utils/micro-frontend/index.js +23 -10
- package/dist/esm/utils/micro-frontend/ssfguest-adapter.js +5 -2
- package/dist/esm/utils/micro-frontend/types.js +0 -1
- package/dist/esm/utils/redact-pii.js +8 -3
- package/dist/esm/utils/service-worker.js +0 -1
- package/dist/esm/utils/session.js +14 -5
- package/dist/esm/utils/storybook/manager.js +0 -1
- package/dist/esm/utils/storybook/preview.js +0 -1
- package/dist/esm/utils/storybook/theme.js +0 -1
- package/dist/esm/utils/testing/index.js +5 -5
- package/dist/esm/utils/testing/render-with-redux.js +5 -5
- package/dist/esm/utils/testing/render-with-router-redux.js +10 -7
- package/dist/esm/utils/testing/render-with-router.js +5 -5
- package/dist/esm/utils/testing/render-with-state-addons.js +7 -7
- package/dist/esm/utils/types.js +0 -1
- package/dist/esm/utils/url.js +0 -1
- package/dist/esm/utils/web-storage.js +0 -1
- package/dist/esm/utils/window.js +8 -3
- package/dist/esm/view/app-root/hosted-app.js +9 -3
- package/dist/esm/view/app-root/index.js +21 -17
- package/dist/esm/view/app-root/stand-alone-app.js +13 -3
- package/dist/esm/view/app-root/style.js +0 -1
- package/dist/esm/view/app-router.js +2 -3
- package/dist/esm/view/breakpoint/use-breakpoint.js +9 -6
- package/dist/esm/view/breakpoint/use-media-query-list.js +3 -2
- package/dist/esm/view/error-boundary/default-error-template.js +11 -3
- package/dist/esm/view/error-boundary/index.js +2 -2
- package/dist/esm/view/error-toast/index.js +2 -3
- package/dist/esm/view/fetch-host-app-data/index.js +0 -1
- package/dist/esm/view/fetch-host-app-data/store.js +0 -1
- package/dist/esm/view/fields/autocomplete/index.js +27 -0
- package/dist/esm/view/fields/check-box/index.js +3 -4
- package/dist/esm/view/fields/combo-box/index.js +3 -4
- package/dist/esm/view/fields/combo-box-v3/index.js +24 -0
- package/dist/esm/view/fields/connect-form.js +0 -1
- package/dist/esm/view/fields/date-input/index.js +3 -4
- package/dist/esm/view/fields/date-picker/index.js +3 -4
- package/dist/esm/view/fields/date-range-picker/index.js +10 -7
- package/dist/esm/view/fields/date-time-picker/index.js +3 -4
- package/dist/esm/view/fields/form-item-layout/index.js +15 -14
- package/dist/esm/view/fields/form-layout-block-item/index.js +16 -15
- package/dist/esm/view/fields/input-mask/index.js +3 -4
- package/dist/esm/view/fields/input-text/index.js +3 -4
- package/dist/esm/view/fields/large-text-box/index.js +3 -4
- package/dist/esm/view/fields/radio/index.js +3 -4
- package/dist/esm/view/fields/radio-group/index.js +3 -4
- package/dist/esm/view/fields/text-box/index.js +3 -4
- package/dist/esm/view/fields/toggle/index.js +3 -4
- package/dist/esm/view/fields/watch-value.js +21 -3
- package/dist/esm/view/form/index.js +9 -8
- package/dist/esm/view/form/personal-info-section.js +50 -47
- package/dist/esm/view/form/submit-button/index.js +2 -3
- package/dist/esm/view/guest-unload-handlers/index.js +0 -1
- package/dist/esm/view/host-binding-events/index.js +0 -1
- package/dist/esm/view/live-message/index.js +2 -3
- package/dist/esm/view/loadable/index.js +8 -8
- package/dist/esm/view/login/index.js +4 -3
- package/dist/esm/view/message-to-host-app/index.js +0 -1
- package/dist/esm/view/micro-app/app-factory/index.js +9 -4
- package/dist/esm/view/micro-app/const.js +0 -1
- package/dist/esm/view/micro-app/index.js +2 -3
- package/dist/esm/view/micro-app/resources/manifest.js +10 -4
- package/dist/esm/view/micro-app/resources/script.js +0 -1
- package/dist/esm/view/micro-app/resources/style.js +0 -1
- package/dist/esm/view/micro-app/types.js +0 -1
- package/dist/esm/view/micro-app/use-app-will-render.js +37 -29
- package/dist/esm/view/micro-app/utils.js +0 -1
- package/dist/esm/view/micro-iframe-app/app.js +19 -18
- package/dist/esm/view/micro-iframe-app/iframe/const.js +0 -1
- package/dist/esm/view/micro-iframe-app/iframe/index.js +18 -15
- package/dist/esm/view/micro-iframe-app/index.js +2 -3
- package/dist/esm/view/micro-iframe-app/types.js +0 -1
- package/dist/esm/view/micro-iframe-app/use-frame-loaded.js +0 -1
- package/dist/esm/view/modals/error/index.js +21 -10
- package/dist/esm/view/modals/navigation-prompt/index.js +46 -25
- package/dist/esm/view/modals/session-expiry/customHooks.js +6 -3
- package/dist/esm/view/modals/session-expiry/index.js +57 -33
- package/dist/esm/view/modals/wait-message/index.js +26 -25
- package/dist/esm/view/modals/wait-message/use-html-wait-message.js +0 -1
- package/dist/esm/view/modals/wait-message/wait-message-launcher.js +0 -1
- package/dist/esm/view/page.js +11 -3
- package/dist/esm/view/render-with-delay/index.js +4 -3
- package/dist/esm/view/render-with-host-data/index.js +2 -3
- package/dist/esm/view/require-auth.js +8 -6
- package/dist/esm/view/session-timeout/index.js +15 -12
- package/dist/esm/view/storybook/decorator.js +5 -5
- package/dist/esm/view/use-previous.js +0 -1
- package/dist/esm/view/use-window-size-change.js +0 -1
- package/dist/esm/view/visually-hidden/index.js +7 -6
- package/dist/types/lib/index.d.ts +2 -0
- package/dist/types/lib/view/fields/autocomplete/index.d.ts +13 -0
- package/dist/types/lib/view/fields/autocomplete/index.stories.d.ts +5 -0
- package/dist/types/lib/view/fields/combo-box-v3/index.d.ts +9 -0
- package/dist/types/lib/view/fields/combo-box-v3/index.stories.d.ts +5 -0
- package/package.json +34 -34
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { memo, useState } from "react";
|
|
4
3
|
import frameHtml from "file-loader?name=iframe.[contenthash].[ext]!./iframe/index.html";
|
|
5
4
|
import { IFrame } from "./iframe/index.js";
|
|
@@ -7,22 +6,24 @@ import { useFrameLoaded } from "./use-frame-loaded.js";
|
|
|
7
6
|
import {
|
|
8
7
|
useAppWillRender
|
|
9
8
|
} from "../micro-app/use-app-will-render.js";
|
|
10
|
-
const App = memo(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
});
|
|
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
|
+
);
|
|
26
27
|
export {
|
|
27
28
|
App
|
|
28
29
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { memo, useRef } from "react";
|
|
4
3
|
import styled from "styled-components";
|
|
5
4
|
import { IFRAME_CONTAINER_ID_PREFIX } from "./const.js";
|
|
@@ -18,19 +17,23 @@ const Iframe = styled.iframe`
|
|
|
18
17
|
display: block;
|
|
19
18
|
height: 100%;
|
|
20
19
|
`;
|
|
21
|
-
const IFrame = memo(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
+
);
|
|
34
37
|
export {
|
|
35
38
|
IFrame
|
|
36
39
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { createElement } from "react";
|
|
3
2
|
import { useEffect, useState, memo } from "react";
|
|
4
3
|
import { usePrevious } from "../use-previous.js";
|
|
5
4
|
import { App } from "./app.js";
|
|
@@ -12,7 +11,7 @@ const MicroIFrameApp = memo(({ entityId = null, ...rest }) => {
|
|
|
12
11
|
setDisposePrevApp(true);
|
|
13
12
|
}
|
|
14
13
|
}, [entityId]);
|
|
15
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ createElement(App, {
|
|
16
15
|
...rest,
|
|
17
16
|
key: appKey,
|
|
18
17
|
dispose: disposePrevApp,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
2
|
import { useState, useCallback } from "react";
|
|
4
3
|
import {
|
|
5
4
|
DSDialog,
|
|
@@ -18,16 +17,28 @@ const Error = ({
|
|
|
18
17
|
const handleClick = useCallback(() => {
|
|
19
18
|
setOpen((prev) => !prev);
|
|
20
19
|
}, []);
|
|
21
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ jsx(DSDialog, {
|
|
22
21
|
isOpen,
|
|
23
22
|
onClickOutside: handleClick,
|
|
24
|
-
size: "small"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
+
});
|
|
31
42
|
};
|
|
32
43
|
export {
|
|
33
44
|
Error
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
2
|
import { memo } from "react";
|
|
4
3
|
import { Close } from "@elliemae/ds-icons";
|
|
5
4
|
import { DSButtonV2 } from "@elliemae/ds-button";
|
|
@@ -13,29 +12,51 @@ import {
|
|
|
13
12
|
} from "@elliemae/ds-dialog";
|
|
14
13
|
import { useAppDispatch } from "../../../data/react-redux.js";
|
|
15
14
|
import { navigationPrompt } from "../../../data/navigation-prompt/actions.js";
|
|
16
|
-
const NavigationPrompt = memo(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
+
);
|
|
39
60
|
export {
|
|
40
61
|
NavigationPrompt
|
|
41
62
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { useEffect, useState } from "react";
|
|
3
2
|
import { getSeconds, differenceInMinutes } from "date-fns";
|
|
4
3
|
import { SESSION_TIMEOUT_INTERVAL } from "../../../utils/constants.js";
|
|
@@ -7,8 +6,12 @@ const useTrackSessionExpiry = (warningNotifiedAt) => {
|
|
|
7
6
|
const [timeData, setTimeData] = useState();
|
|
8
7
|
useEffect(() => {
|
|
9
8
|
const timeLeftForExpiryAfterWarning = () => {
|
|
10
|
-
const userWarnInterval = getAppConfigValue(
|
|
11
|
-
|
|
9
|
+
const userWarnInterval = getAppConfigValue(
|
|
10
|
+
"sessionTimeoutWarnInterval"
|
|
11
|
+
);
|
|
12
|
+
const userTimeoutInterval = getAppConfigValue(
|
|
13
|
+
"sessionTimeoutInterval"
|
|
14
|
+
);
|
|
12
15
|
const warnInterval = userWarnInterval ? parseFloat(userWarnInterval) : SESSION_TIMEOUT_INTERVAL.WARN;
|
|
13
16
|
const sessionTimeout = userTimeoutInterval ? parseFloat(userTimeoutInterval) : SESSION_TIMEOUT_INTERVAL.EXPIRY;
|
|
14
17
|
const diffTime = sessionTimeout - warnInterval;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
2
|
import { memo, useEffect, useState } from "react";
|
|
4
3
|
import { DSButtonV2 } from "@elliemae/ds-button";
|
|
5
4
|
import { WarningCircle } from "@elliemae/ds-icons";
|
|
@@ -16,37 +15,62 @@ import { useAppDispatch } from "../../../data/react-redux.js";
|
|
|
16
15
|
import { logout } from "../../../data/logout/actions.js";
|
|
17
16
|
import { resetUserIdleTime } from "../../../utils/session.js";
|
|
18
17
|
import { useTrackSessionExpiry } from "./customHooks.js";
|
|
19
|
-
const SessionExpiry = memo(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
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
|
+
);
|
|
50
74
|
export {
|
|
51
75
|
SessionExpiry
|
|
52
76
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { memo, useEffect } from "react";
|
|
4
3
|
import { DSLoadingIndicator } from "@elliemae/ds-loading-indicator";
|
|
5
4
|
import { useAppSelector } from "../../../data/react-redux.js";
|
|
@@ -8,29 +7,31 @@ import {
|
|
|
8
7
|
waitStartEvent,
|
|
9
8
|
waitEndEvent
|
|
10
9
|
} from "../../../analytics/user-wait-event.js";
|
|
11
|
-
const WaitMessage = memo(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
});
|
|
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
|
+
);
|
|
34
35
|
export {
|
|
35
36
|
WaitMessage
|
|
36
37
|
};
|
package/dist/esm/view/page.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
2
|
import { Helmet } from "react-helmet";
|
|
4
3
|
import * as brum from "@elliemae/pui-user-monitoring";
|
|
5
4
|
import { pageViewEvent } from "../analytics/page-view-event.js";
|
|
@@ -15,7 +14,16 @@ const onPageView = (pageTitle) => {
|
|
|
15
14
|
};
|
|
16
15
|
const Page = ({ pageTitle = "ICE", children }) => {
|
|
17
16
|
onPageView(pageTitle);
|
|
18
|
-
return /* @__PURE__ */
|
|
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
|
+
});
|
|
19
27
|
};
|
|
20
28
|
export {
|
|
21
29
|
Page,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
2
|
import { useEffect, useState, memo } from "react";
|
|
4
3
|
const RenderWithDelay = memo(({ render }) => {
|
|
5
4
|
const [show, showComponents] = useState(false);
|
|
@@ -9,7 +8,9 @@ const RenderWithDelay = memo(({ render }) => {
|
|
|
9
8
|
clearTimeout(timeoutId);
|
|
10
9
|
};
|
|
11
10
|
}, []);
|
|
12
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
12
|
+
children: show ? render() : ""
|
|
13
|
+
});
|
|
13
14
|
});
|
|
14
15
|
export {
|
|
15
16
|
RenderWithDelay
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { useState, useEffect } from "react";
|
|
4
3
|
import { fetchHostAppData } from "../fetch-host-app-data/index.js";
|
|
5
4
|
import { WaitMessageLauncher } from "../modals/wait-message/wait-message-launcher.js";
|
|
@@ -21,7 +20,7 @@ const renderWithHostData = (data) => {
|
|
|
21
20
|
setLoading(false);
|
|
22
21
|
}
|
|
23
22
|
}, []);
|
|
24
|
-
return loading ? /* @__PURE__ */
|
|
23
|
+
return loading ? /* @__PURE__ */ jsx(WaitMessageLauncher, {}) : /* @__PURE__ */ jsx(ComponentToRender, {});
|
|
25
24
|
};
|
|
26
25
|
return HostAppDataWrapper;
|
|
27
26
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
2
|
import { useInjectReducer, useInjectSaga } from "redux-injectors";
|
|
4
3
|
import enums from "../utils/constants.js";
|
|
5
4
|
import { authReducer } from "../data/auth/reducer.js";
|
|
@@ -17,13 +16,16 @@ const RequireAuth = ({
|
|
|
17
16
|
useInjectSaga({ key, saga: authentication });
|
|
18
17
|
const userAuthorized = isUserAuthorized();
|
|
19
18
|
if (userAuthorized) {
|
|
20
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
20
|
+
children
|
|
21
|
+
});
|
|
21
22
|
}
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ jsx(Login, {
|
|
23
24
|
clientId,
|
|
24
25
|
scope,
|
|
25
|
-
responseType
|
|
26
|
-
|
|
26
|
+
responseType,
|
|
27
|
+
children
|
|
28
|
+
});
|
|
27
29
|
};
|
|
28
30
|
export {
|
|
29
31
|
RequireAuth
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { useEffect, useState } from "react";
|
|
4
3
|
import { useAppDispatch } from "../../data/react-redux.js";
|
|
5
4
|
import { logout } from "../../data/logout/actions.js";
|
|
@@ -17,12 +16,14 @@ const SessionTimeout = () => {
|
|
|
17
16
|
const [warningNotifiedAt, setwarningNotifiedAt] = useState();
|
|
18
17
|
useEffect(() => {
|
|
19
18
|
initSessionMonitoring();
|
|
20
|
-
const warningCb = subscribeToSessionExpiryWarning(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
const warningCb = subscribeToSessionExpiryWarning(
|
|
20
|
+
(sessionExpiryWarningNotifiedAt) => {
|
|
21
|
+
if (!sessionExpiryWarningNotifiedAt)
|
|
22
|
+
return;
|
|
23
|
+
setwarningNotifiedAt(sessionExpiryWarningNotifiedAt);
|
|
24
|
+
setSessionExpiryWarning(true);
|
|
25
|
+
}
|
|
26
|
+
);
|
|
26
27
|
const resetCb = subscribeToResetSession((resetWarningModal) => {
|
|
27
28
|
if (resetWarningModal === true) {
|
|
28
29
|
setSessionExpiryWarning(false);
|
|
@@ -39,10 +40,12 @@ const SessionTimeout = () => {
|
|
|
39
40
|
stopSessionMonitoring();
|
|
40
41
|
};
|
|
41
42
|
}, [dispatch]);
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
return /* @__PURE__ */ jsx("div", {
|
|
44
|
+
children: showSessionExpiryWarning && /* @__PURE__ */ jsx(SessionExpiry, {
|
|
45
|
+
open: true,
|
|
46
|
+
warningNotifiedAt
|
|
47
|
+
})
|
|
48
|
+
});
|
|
46
49
|
};
|
|
47
50
|
export {
|
|
48
51
|
SessionTimeout
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { browserHistory } from "../../utils/history.js";
|
|
4
3
|
import { AppRoot } from "../app-root/index.js";
|
|
5
|
-
const withAppDecorator = (theme, store, story) => /* @__PURE__ */
|
|
4
|
+
const withAppDecorator = (theme, store, story) => /* @__PURE__ */ jsx(AppRoot, {
|
|
6
5
|
store,
|
|
7
6
|
history: browserHistory,
|
|
8
|
-
theme
|
|
9
|
-
|
|
7
|
+
theme,
|
|
8
|
+
children: story()
|
|
9
|
+
});
|
|
10
10
|
export {
|
|
11
11
|
withAppDecorator
|
|
12
12
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { forwardRef } from "react";
|
|
4
3
|
import styled from "styled-components";
|
|
5
4
|
const Span = styled.span`
|
|
@@ -14,10 +13,12 @@ const Span = styled.span`
|
|
|
14
13
|
white-space: nowrap;
|
|
15
14
|
word-wrap: normal;
|
|
16
15
|
`;
|
|
17
|
-
const VisuallyHidden = forwardRef(
|
|
18
|
-
ref,
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
const VisuallyHidden = forwardRef(
|
|
17
|
+
(props, ref) => /* @__PURE__ */ jsx(Span, {
|
|
18
|
+
ref,
|
|
19
|
+
...props
|
|
20
|
+
})
|
|
21
|
+
);
|
|
21
22
|
export {
|
|
22
23
|
VisuallyHidden
|
|
23
24
|
};
|