tp-react-elements-dev 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -53619,7 +53619,7 @@ newStyled(DialogTitle)(({ theme }) => ({
|
|
|
53619
53619
|
borderBottom: "1px solid rgb(229 231 235 / 1)",
|
|
53620
53620
|
}));
|
|
53621
53621
|
|
|
53622
|
-
const ConfirmationDialog = ({ openConfirmDialog, handleCancel, onClickSubmit, text, Submit = 'Submit', Cancel = 'Cancel' }) => {
|
|
53622
|
+
const ConfirmationDialog = ({ openConfirmDialog, handleCancel, onClickSubmit, text, Submit = 'Submit', Cancel = 'Cancel', buttonStyleProps }) => {
|
|
53623
53623
|
return (jsxRuntimeExports.jsxs(Dialog, Object.assign({ open: openConfirmDialog, TransitionComponent: Slide, fullWidth: true, sx: {
|
|
53624
53624
|
position: "fixed",
|
|
53625
53625
|
top: "10%",
|
|
@@ -53649,7 +53649,7 @@ const ConfirmationDialog = ({ openConfirmDialog, handleCancel, onClickSubmit, te
|
|
|
53649
53649
|
display: "flex",
|
|
53650
53650
|
justifyContent: "flex-end",
|
|
53651
53651
|
gap: "8px",
|
|
53652
|
-
} }, { children: [jsxRuntimeExports.jsx(SubmitButton, Object.assign({ variant: "contained", size: "small", type: "submit", onClick: () => onClickSubmit() }, { children: Submit })), jsxRuntimeExports.jsx(Button, Object.assign({ variant: "text",
|
|
53652
|
+
} }, { children: [jsxRuntimeExports.jsx(SubmitButton, Object.assign({ variant: "contained", size: "small", type: "submit", onClick: () => onClickSubmit(), sx: Object.assign({}, buttonStyleProps) }, { children: Submit })), jsxRuntimeExports.jsx(Button, Object.assign({ variant: "text",
|
|
53653
53653
|
// color="error"
|
|
53654
53654
|
size: "small", sx: {
|
|
53655
53655
|
textTransform: "none",
|
|
@@ -53687,7 +53687,7 @@ const secondsToMMSS = (totalSeconds) => {
|
|
|
53687
53687
|
return `${formattedMinutes}:${formattedSeconds}`;
|
|
53688
53688
|
};
|
|
53689
53689
|
const promptBeforeValue = 120000;
|
|
53690
|
-
const SessionTimeOut = ({ sessionTime, handleSubmitSession, onSessionExpire, handleSessionCancel }) => {
|
|
53690
|
+
const SessionTimeOut = ({ sessionTime, handleSubmitSession, onSessionExpire, handleSessionCancel, SubmitButtonName = 'Submit', buttonStyleProps }) => {
|
|
53691
53691
|
const [openConfirmModal, setOpenConfirmModal] = React$1.useState(false);
|
|
53692
53692
|
const expiryDetails = sessionTime;
|
|
53693
53693
|
const providedTimestamp = new Date(expiryDetails).getTime();
|
|
@@ -53733,7 +53733,7 @@ const SessionTimeOut = ({ sessionTime, handleSubmitSession, onSessionExpire, han
|
|
|
53733
53733
|
}, [promptBeforeIdle, getRemainingTime]);
|
|
53734
53734
|
const sessionMessage = `Your session will expire in ${formattedRemainingTime} seconds. Do you want to extend the session?`;
|
|
53735
53735
|
console.log(promptBeforeIdle, 'promptBeforeIdle');
|
|
53736
|
-
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: jsxRuntimeExports.jsx(ConfirmationDialog, { openConfirmDialog: openConfirmModal, handleCancel: handleCancel, onClickSubmit: handleSubmit, text: sessionMessage }) }));
|
|
53736
|
+
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: jsxRuntimeExports.jsx(ConfirmationDialog, { openConfirmDialog: openConfirmModal, handleCancel: handleCancel, onClickSubmit: handleSubmit, text: sessionMessage, Submit: SubmitButtonName, buttonStyleProps: buttonStyleProps }) }));
|
|
53737
53737
|
};
|
|
53738
53738
|
|
|
53739
53739
|
exports.DeleteField = DeleteField;
|