sixseconds-modules 1.6.44 → 1.6.46
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/components/features/index.d.ts +1 -0
- package/dist/components/features/previousLoginBanner.d.ts +8 -0
- package/dist/components/header/index.d.ts +1 -1
- package/dist/components/header/type.d.ts +0 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/index.cjs.js +45 -45
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +45 -45
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/header/previousLoginBanner.d.ts +0 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const App: () => import("react/jsx-runtime").JSX.Element;
|
|
2
|
-
export { Header } from './components';
|
|
2
|
+
export { Header, PreviousLoginBanner } from './components';
|
|
3
3
|
export { Logo, Warning } from './components/elements';
|
|
4
4
|
export { DangerDialog } from './components/dialogs';
|
|
5
5
|
export { default as IMAGES } from './assets/images';
|
package/dist/index.es.js
CHANGED
|
@@ -10755,48 +10755,6 @@ function ChangePasswordDialog({ isOpen, email, t: t2, setInitialState }) {
|
|
|
10755
10755
|
const IMAGES = {
|
|
10756
10756
|
Us
|
|
10757
10757
|
};
|
|
10758
|
-
const PreviousLoginBanner = ({ t: t2, router }) => {
|
|
10759
|
-
const previousLoginDetails = CookiesUtil.get("previousLoginDetails") || {};
|
|
10760
|
-
CookiesUtil.set("previousLoginDetails", previousLoginDetails);
|
|
10761
|
-
const handleAutoLogin = async () => {
|
|
10762
|
-
try {
|
|
10763
|
-
const res = await autoLoginApi(previousLoginDetails?.id);
|
|
10764
|
-
if (res.remote === "success") {
|
|
10765
|
-
CookiesUtil.remove("previousLoginDetails");
|
|
10766
|
-
if (router) {
|
|
10767
|
-
router.reload();
|
|
10768
|
-
router.replace(ROUTES.home);
|
|
10769
|
-
} else {
|
|
10770
|
-
window.location.reload();
|
|
10771
|
-
window.location.href = ROUTES.home;
|
|
10772
|
-
}
|
|
10773
|
-
}
|
|
10774
|
-
} catch (err) {
|
|
10775
|
-
toast.error(t2(ALERT_MESSAGES.fallbackError));
|
|
10776
|
-
}
|
|
10777
|
-
};
|
|
10778
|
-
return previousLoginDetails.id && previousLoginDetails.isAllowToAccess && /* @__PURE__ */ jsx(
|
|
10779
|
-
Box,
|
|
10780
|
-
{
|
|
10781
|
-
sx: {
|
|
10782
|
-
height: "auto",
|
|
10783
|
-
width: "100%",
|
|
10784
|
-
backgroundColor: "#007FC0",
|
|
10785
|
-
p: 1,
|
|
10786
|
-
color: "#fff",
|
|
10787
|
-
mt: "70px",
|
|
10788
|
-
textTransform: "capitalize"
|
|
10789
|
-
},
|
|
10790
|
-
children: /* @__PURE__ */ jsxs(Typography, { variant: "h6", align: "center", children: [
|
|
10791
|
-
"Go back to",
|
|
10792
|
-
" ",
|
|
10793
|
-
/* @__PURE__ */ jsx("strong", { onClick: handleAutoLogin, style: { cursor: "pointer", textDecoration: "underline" }, children: previousLoginDetails.name || previousLoginDetails.email || previousLoginDetails.id }),
|
|
10794
|
-
" ",
|
|
10795
|
-
"Profile"
|
|
10796
|
-
] })
|
|
10797
|
-
}
|
|
10798
|
-
);
|
|
10799
|
-
};
|
|
10800
10758
|
const Header = ({
|
|
10801
10759
|
router,
|
|
10802
10760
|
frontCustomComponent,
|
|
@@ -10814,7 +10772,6 @@ const Header = ({
|
|
|
10814
10772
|
isMenu,
|
|
10815
10773
|
isAccessAppMenu,
|
|
10816
10774
|
notificationAccessApps,
|
|
10817
|
-
isPreviousLoginBanner = false,
|
|
10818
10775
|
sx,
|
|
10819
10776
|
t
|
|
10820
10777
|
}) => {
|
|
@@ -10987,7 +10944,7 @@ const Header = ({
|
|
|
10987
10944
|
}
|
|
10988
10945
|
)
|
|
10989
10946
|
] }) }),
|
|
10990
|
-
|
|
10947
|
+
/* @__PURE__ */ jsx(PreviousLoginBanner, { t }),
|
|
10991
10948
|
/* @__PURE__ */ jsx(
|
|
10992
10949
|
DangerDialog,
|
|
10993
10950
|
{
|
|
@@ -11299,12 +11256,54 @@ const ButtonStyled = styled("div")(() => ({
|
|
|
11299
11256
|
function Button({ isLoading = false, btnTitle, className, disabled = false, ...rest }) {
|
|
11300
11257
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(ButtonStyled, { children: /* @__PURE__ */ jsx(Button$1, { disabled, className: `btn ${className}`, ...rest, size: "small", children: isLoading ? ALERT_MESSAGES.commonLoadingMessage : btnTitle }) }) });
|
|
11301
11258
|
}
|
|
11259
|
+
const PreviousLoginBanner = ({ t: t2, router, sx }) => {
|
|
11260
|
+
const previousLoginDetails = CookiesUtil.get("previousLoginDetails") || {};
|
|
11261
|
+
CookiesUtil.set("previousLoginDetails", previousLoginDetails);
|
|
11262
|
+
const handleAutoLogin = async () => {
|
|
11263
|
+
try {
|
|
11264
|
+
const res = await autoLoginApi(previousLoginDetails?.id);
|
|
11265
|
+
if (res.remote === "success") {
|
|
11266
|
+
CookiesUtil.remove("previousLoginDetails");
|
|
11267
|
+
if (router) {
|
|
11268
|
+
router.reload();
|
|
11269
|
+
router.replace(ROUTES.home);
|
|
11270
|
+
} else {
|
|
11271
|
+
window.location.reload();
|
|
11272
|
+
window.location.href = ROUTES.home;
|
|
11273
|
+
}
|
|
11274
|
+
}
|
|
11275
|
+
} catch (err) {
|
|
11276
|
+
toast.error(t2(ALERT_MESSAGES.fallbackError));
|
|
11277
|
+
}
|
|
11278
|
+
};
|
|
11279
|
+
return previousLoginDetails.id && previousLoginDetails.isAllowToAccess && /* @__PURE__ */ jsx(
|
|
11280
|
+
Box,
|
|
11281
|
+
{
|
|
11282
|
+
sx: {
|
|
11283
|
+
height: "auto",
|
|
11284
|
+
width: "100%",
|
|
11285
|
+
backgroundColor: "#007FC0",
|
|
11286
|
+
p: 1,
|
|
11287
|
+
color: "#fff",
|
|
11288
|
+
mt: "70px",
|
|
11289
|
+
textTransform: "capitalize",
|
|
11290
|
+
...sx
|
|
11291
|
+
},
|
|
11292
|
+
children: /* @__PURE__ */ jsxs(Typography, { variant: "h6", align: "center", children: [
|
|
11293
|
+
"Go back to",
|
|
11294
|
+
" ",
|
|
11295
|
+
/* @__PURE__ */ jsx("strong", { onClick: handleAutoLogin, style: { cursor: "pointer", textDecoration: "underline" }, children: previousLoginDetails.name || previousLoginDetails.email || previousLoginDetails.id }),
|
|
11296
|
+
" ",
|
|
11297
|
+
"Profile"
|
|
11298
|
+
] })
|
|
11299
|
+
}
|
|
11300
|
+
);
|
|
11301
|
+
};
|
|
11302
11302
|
const App = () => {
|
|
11303
11303
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
11304
11304
|
Header,
|
|
11305
11305
|
{
|
|
11306
11306
|
isAccessAppMenu: true,
|
|
11307
|
-
isPreviousLoginBanner: true,
|
|
11308
11307
|
isMenu: true,
|
|
11309
11308
|
updateInterfaceLang: () => {
|
|
11310
11309
|
},
|
|
@@ -11456,6 +11455,7 @@ export {
|
|
|
11456
11455
|
Header,
|
|
11457
11456
|
IMAGES,
|
|
11458
11457
|
Logo,
|
|
11458
|
+
PreviousLoginBanner,
|
|
11459
11459
|
SVG,
|
|
11460
11460
|
Warning,
|
|
11461
11461
|
App as default
|