@elliemae/pui-app-sdk 5.3.2 → 5.3.4
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.
|
@@ -25,6 +25,7 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
25
25
|
var import_react = require("react");
|
|
26
26
|
var import_ds_button = require("@elliemae/ds-button");
|
|
27
27
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
28
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
28
29
|
var import_ds_dialog = require("@elliemae/ds-dialog");
|
|
29
30
|
var import_react2 = require("../../../data/react.js");
|
|
30
31
|
var import_actions = require("../../../data/logout/actions.js");
|
|
@@ -35,6 +36,9 @@ const SessionExpiry = (0, import_react.memo)(
|
|
|
35
36
|
const [isOpen, setIsOpen] = (0, import_react.useState)(open);
|
|
36
37
|
const timeLeft = (0, import_customHooks.useTrackSessionExpiry)(warningNotifiedAt);
|
|
37
38
|
const dispatch = (0, import_react2.useAppDispatch)();
|
|
39
|
+
const firstElementRef = (0, import_react.useRef)(null);
|
|
40
|
+
const lastElementRef = (0, import_react.useRef)(null);
|
|
41
|
+
const handleOnKeyDown = (0, import_ds_utilities.useFocusTrap)({ firstElementRef, lastElementRef });
|
|
38
42
|
(0, import_react.useEffect)(() => {
|
|
39
43
|
setIsOpen(open);
|
|
40
44
|
}, [open]);
|
|
@@ -48,7 +52,7 @@ const SessionExpiry = (0, import_react.memo)(
|
|
|
48
52
|
setIsOpen(false);
|
|
49
53
|
dispatch(import_actions.logout.confirm());
|
|
50
54
|
};
|
|
51
|
-
return timeLeft ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_dialog.DSDialog, { isOpen, size: "small", children: [
|
|
55
|
+
return timeLeft ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_dialog.DSDialog, { onKeyDown: handleOnKeyDown, isOpen, size: "small", children: [
|
|
52
56
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogBody, { p: "s", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_dialog.DSDialogDefaultLayout, { children: [
|
|
53
57
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.WarningCircle, { size: "xl", color: ["warning", "900"] }),
|
|
54
58
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogPrimaryMessage, { children: `Your session will expire in ${timeLeft}` }),
|
|
@@ -56,8 +60,16 @@ const SessionExpiry = (0, import_react.memo)(
|
|
|
56
60
|
] }) }),
|
|
57
61
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogSeparator, {}),
|
|
58
62
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_dialog.DSDialogFooter, { children: [
|
|
59
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
60
|
-
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
64
|
+
import_ds_button.DSButtonV2,
|
|
65
|
+
{
|
|
66
|
+
innerRef: firstElementRef,
|
|
67
|
+
buttonType: "outline",
|
|
68
|
+
onClick: logoutSession,
|
|
69
|
+
children: "Logout"
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.DSButtonV2, { innerRef: lastElementRef, onClick: resetSession, children: "Reset" })
|
|
61
73
|
] })
|
|
62
74
|
] }) : null;
|
|
63
75
|
}
|
|
@@ -54,6 +54,7 @@ const WaitMessage = (0, import_react.memo)(
|
|
|
54
54
|
tooltipStartPlacementPreference = "center",
|
|
55
55
|
...rest
|
|
56
56
|
}) => {
|
|
57
|
+
const theme = (0, import_react.useContext)(import_styled_components.ThemeContext);
|
|
57
58
|
const ref = (0, import_react.useRef)(false);
|
|
58
59
|
const [show, setShow] = (0, import_react.useState)(false);
|
|
59
60
|
const isOpen = (0, import_react2.useAppSelector)((state) => state.waitMessage?.isOpen);
|
|
@@ -73,7 +74,7 @@ const WaitMessage = (0, import_react.memo)(
|
|
|
73
74
|
}, [isOpen]);
|
|
74
75
|
(0, import_use_html_wait_message.useHTMLWaitMessage)(isOpen !== null);
|
|
75
76
|
return show ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
76
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_backdrop.DSBackdrop, {}),
|
|
77
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_backdrop.DSBackdrop, { zIndex: theme.zIndex.loader }),
|
|
77
78
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
78
79
|
StyledCircularIndicator,
|
|
79
80
|
{
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { memo, useEffect, useState } from "react";
|
|
2
|
+
import { memo, useEffect, useState, useRef } from "react";
|
|
3
3
|
import { DSButtonV2 } from "@elliemae/ds-button";
|
|
4
4
|
import { WarningCircle } from "@elliemae/ds-icons";
|
|
5
|
+
import { useFocusTrap } from "@elliemae/ds-utilities";
|
|
5
6
|
import {
|
|
6
7
|
DSDialog,
|
|
7
8
|
DSDialogDefaultLayout,
|
|
@@ -23,6 +24,9 @@ const SessionExpiry = memo(
|
|
|
23
24
|
const [isOpen, setIsOpen] = useState(open);
|
|
24
25
|
const timeLeft = useTrackSessionExpiry(warningNotifiedAt);
|
|
25
26
|
const dispatch = useAppDispatch();
|
|
27
|
+
const firstElementRef = useRef(null);
|
|
28
|
+
const lastElementRef = useRef(null);
|
|
29
|
+
const handleOnKeyDown = useFocusTrap({ firstElementRef, lastElementRef });
|
|
26
30
|
useEffect(() => {
|
|
27
31
|
setIsOpen(open);
|
|
28
32
|
}, [open]);
|
|
@@ -36,7 +40,7 @@ const SessionExpiry = memo(
|
|
|
36
40
|
setIsOpen(false);
|
|
37
41
|
dispatch(logout.confirm());
|
|
38
42
|
};
|
|
39
|
-
return timeLeft ? /* @__PURE__ */ jsxs(DSDialog, { isOpen, size: "small", children: [
|
|
43
|
+
return timeLeft ? /* @__PURE__ */ jsxs(DSDialog, { onKeyDown: handleOnKeyDown, isOpen, size: "small", children: [
|
|
40
44
|
/* @__PURE__ */ jsx(DSDialogBody, { p: "s", children: /* @__PURE__ */ jsxs(DSDialogDefaultLayout, { children: [
|
|
41
45
|
/* @__PURE__ */ jsx(WarningCircle, { size: "xl", color: ["warning", "900"] }),
|
|
42
46
|
/* @__PURE__ */ jsx(DSDialogPrimaryMessage, { children: `Your session will expire in ${timeLeft}` }),
|
|
@@ -44,8 +48,16 @@ const SessionExpiry = memo(
|
|
|
44
48
|
] }) }),
|
|
45
49
|
/* @__PURE__ */ jsx(DSDialogSeparator, {}),
|
|
46
50
|
/* @__PURE__ */ jsxs(DSDialogFooter, { children: [
|
|
47
|
-
/* @__PURE__ */ jsx(
|
|
48
|
-
|
|
51
|
+
/* @__PURE__ */ jsx(
|
|
52
|
+
DSButtonV2,
|
|
53
|
+
{
|
|
54
|
+
innerRef: firstElementRef,
|
|
55
|
+
buttonType: "outline",
|
|
56
|
+
onClick: logoutSession,
|
|
57
|
+
children: "Logout"
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
/* @__PURE__ */ jsx(DSButtonV2, { innerRef: lastElementRef, onClick: resetSession, children: "Reset" })
|
|
49
61
|
] })
|
|
50
62
|
] }) : null;
|
|
51
63
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { memo, useEffect, useState, useRef } from "react";
|
|
3
|
-
import styled from "styled-components";
|
|
2
|
+
import { memo, useEffect, useState, useRef, useContext } from "react";
|
|
3
|
+
import styled, { ThemeContext } from "styled-components";
|
|
4
4
|
import { DSBackdrop } from "@elliemae/ds-backdrop";
|
|
5
5
|
import { DSCircularIndeterminateIndicator } from "@elliemae/ds-circular-progress-indicator";
|
|
6
6
|
import { useAppSelector } from "../../data/react.js";
|
|
@@ -24,6 +24,7 @@ const WaitMessage = memo(
|
|
|
24
24
|
tooltipStartPlacementPreference = "center",
|
|
25
25
|
...rest
|
|
26
26
|
}) => {
|
|
27
|
+
const theme = useContext(ThemeContext);
|
|
27
28
|
const ref = useRef(false);
|
|
28
29
|
const [show, setShow] = useState(false);
|
|
29
30
|
const isOpen = useAppSelector((state) => state.waitMessage?.isOpen);
|
|
@@ -43,7 +44,7 @@ const WaitMessage = memo(
|
|
|
43
44
|
}, [isOpen]);
|
|
44
45
|
useHTMLWaitMessage(isOpen !== null);
|
|
45
46
|
return show ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
46
|
-
/* @__PURE__ */ jsx(DSBackdrop, {}),
|
|
47
|
+
/* @__PURE__ */ jsx(DSBackdrop, { zIndex: theme.zIndex.loader }),
|
|
47
48
|
/* @__PURE__ */ jsx(
|
|
48
49
|
StyledCircularIndicator,
|
|
49
50
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-app-sdk",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.4",
|
|
4
4
|
"description": "ICE MT UI Platform Application SDK ",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
@@ -159,6 +159,7 @@
|
|
|
159
159
|
"@elliemae/pui-scripting-object": "~1.20.0",
|
|
160
160
|
"@elliemae/pui-theme": "~2.7.0",
|
|
161
161
|
"@elliemae/pui-user-monitoring": "~1.20.0",
|
|
162
|
-
"@types/react-aria-live": "~2.0.2"
|
|
162
|
+
"@types/react-aria-live": "~2.0.2",
|
|
163
|
+
"@elliemae/ds-utilities": "^3.19.0"
|
|
163
164
|
}
|
|
164
165
|
}
|