sixseconds-modules 1.6.45 → 1.6.49
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 -46
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +45 -46
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/header/previousLoginBanner.d.ts +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './previousLoginBanner';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { IHeaderProps } from './type';
|
|
2
|
-
export declare const Header: ({ router, frontCustomComponent, endCustomComponents, totallyEndCustomComponent, userData, interFaceLangList, centerCustomComponents, updateInterfaceLang, selectedInterFaceLang, logoutHandler, logo, isNotification, extraMenuOptions, isMenu, isAccessAppMenu, notificationAccessApps,
|
|
2
|
+
export declare const Header: ({ router, frontCustomComponent, endCustomComponents, totallyEndCustomComponent, userData, interFaceLangList, centerCustomComponents, updateInterfaceLang, selectedInterFaceLang, logoutHandler, logo, isNotification, extraMenuOptions, isMenu, isAccessAppMenu, notificationAccessApps, sx, t, }: IHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/index.cjs.js
CHANGED
|
@@ -2659,7 +2659,7 @@ function createEnv(opts) {
|
|
|
2659
2659
|
}
|
|
2660
2660
|
return runtimeEnv;
|
|
2661
2661
|
}
|
|
2662
|
-
const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "
|
|
2662
|
+
const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "development", "PROD": true, "SSR": false, "VITE_MODULES_CARDS_ADMIN_FRONTEND_BASE_URL": "https://dev-sso.6seconds.org", "VITE_MODULES_CARDS_HOME_FRONTEND_BASE_URL": "https://dev-sso.6seconds.org", "VITE_MODULES_CERT_FRONTEND_BASE_URL": "https://dev-sso.6seconds.org", "VITE_MODULES_EVENTS_FRONTEND_BASE_URL": "https://dev-sso.6seconds.org", "VITE_MODULES_SSO_BACKEND_BASE_URL": "https://dev-ssoapi.6seconds.org", "VITE_MODULES_SSO_FRONTEND_BASE_URL": "https://dev-sso.6seconds.org", "VITE_MODULES_TOOLS_FRONTEND_BASE_URL": "https://dev-sso.6seconds.org" };
|
|
2663
2663
|
const env = createEnv({
|
|
2664
2664
|
runtimeEnv: __vite_import_meta_env__
|
|
2665
2665
|
});
|
|
@@ -10773,48 +10773,6 @@ function ChangePasswordDialog({ isOpen, email, t: t2, setInitialState }) {
|
|
|
10773
10773
|
const IMAGES = {
|
|
10774
10774
|
Us
|
|
10775
10775
|
};
|
|
10776
|
-
const PreviousLoginBanner = ({ t: t2, router }) => {
|
|
10777
|
-
const previousLoginDetails = CookiesUtil.get("previousLoginDetails") || {};
|
|
10778
|
-
CookiesUtil.set("previousLoginDetails", previousLoginDetails);
|
|
10779
|
-
const handleAutoLogin = async () => {
|
|
10780
|
-
try {
|
|
10781
|
-
const res = await autoLoginApi(previousLoginDetails?.id);
|
|
10782
|
-
if (res.remote === "success") {
|
|
10783
|
-
CookiesUtil.remove("previousLoginDetails");
|
|
10784
|
-
if (router) {
|
|
10785
|
-
router.reload();
|
|
10786
|
-
router.replace(ROUTES.home);
|
|
10787
|
-
} else {
|
|
10788
|
-
window.location.reload();
|
|
10789
|
-
window.location.href = ROUTES.home;
|
|
10790
|
-
}
|
|
10791
|
-
}
|
|
10792
|
-
} catch (err) {
|
|
10793
|
-
toast.error(t2(ALERT_MESSAGES.fallbackError));
|
|
10794
|
-
}
|
|
10795
|
-
};
|
|
10796
|
-
return previousLoginDetails.id && previousLoginDetails.isAllowToAccess && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10797
|
-
material.Box,
|
|
10798
|
-
{
|
|
10799
|
-
sx: {
|
|
10800
|
-
height: "auto",
|
|
10801
|
-
width: "100%",
|
|
10802
|
-
backgroundColor: "#007FC0",
|
|
10803
|
-
p: 1,
|
|
10804
|
-
color: "#fff",
|
|
10805
|
-
mt: "70px",
|
|
10806
|
-
textTransform: "capitalize"
|
|
10807
|
-
},
|
|
10808
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(material.Typography, { variant: "h6", align: "center", children: [
|
|
10809
|
-
"Go back to",
|
|
10810
|
-
" ",
|
|
10811
|
-
/* @__PURE__ */ jsxRuntime.jsx("strong", { onClick: handleAutoLogin, style: { cursor: "pointer", textDecoration: "underline" }, children: previousLoginDetails.name || previousLoginDetails.email || previousLoginDetails.id }),
|
|
10812
|
-
" ",
|
|
10813
|
-
"Profile"
|
|
10814
|
-
] })
|
|
10815
|
-
}
|
|
10816
|
-
);
|
|
10817
|
-
};
|
|
10818
10776
|
const Header = ({
|
|
10819
10777
|
router,
|
|
10820
10778
|
frontCustomComponent,
|
|
@@ -10832,7 +10790,6 @@ const Header = ({
|
|
|
10832
10790
|
isMenu,
|
|
10833
10791
|
isAccessAppMenu,
|
|
10834
10792
|
notificationAccessApps,
|
|
10835
|
-
isPreviousLoginBanner = false,
|
|
10836
10793
|
sx,
|
|
10837
10794
|
t
|
|
10838
10795
|
}) => {
|
|
@@ -11005,7 +10962,6 @@ const Header = ({
|
|
|
11005
10962
|
}
|
|
11006
10963
|
)
|
|
11007
10964
|
] }) }),
|
|
11008
|
-
isPreviousLoginBanner && /* @__PURE__ */ jsxRuntime.jsx(PreviousLoginBanner, { t }),
|
|
11009
10965
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11010
10966
|
DangerDialog,
|
|
11011
10967
|
{
|
|
@@ -11317,12 +11273,54 @@ const ButtonStyled = material.styled("div")(() => ({
|
|
|
11317
11273
|
function Button({ isLoading = false, btnTitle, className, disabled = false, ...rest }) {
|
|
11318
11274
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(ButtonStyled, { children: /* @__PURE__ */ jsxRuntime.jsx(material.Button, { disabled, className: `btn ${className}`, ...rest, size: "small", children: isLoading ? ALERT_MESSAGES.commonLoadingMessage : btnTitle }) }) });
|
|
11319
11275
|
}
|
|
11276
|
+
const PreviousLoginBanner = ({ t: t2, router, sx }) => {
|
|
11277
|
+
const previousLoginDetails = CookiesUtil.get("previousLoginDetails") || {};
|
|
11278
|
+
CookiesUtil.set("previousLoginDetails", previousLoginDetails);
|
|
11279
|
+
const handleAutoLogin = async () => {
|
|
11280
|
+
try {
|
|
11281
|
+
const res = await autoLoginApi(previousLoginDetails?.id);
|
|
11282
|
+
if (res.remote === "success") {
|
|
11283
|
+
CookiesUtil.remove("previousLoginDetails");
|
|
11284
|
+
if (router) {
|
|
11285
|
+
router.reload();
|
|
11286
|
+
router.replace(ROUTES.home);
|
|
11287
|
+
} else {
|
|
11288
|
+
window.location.reload();
|
|
11289
|
+
window.location.href = ROUTES.home;
|
|
11290
|
+
}
|
|
11291
|
+
}
|
|
11292
|
+
} catch (err) {
|
|
11293
|
+
toast.error(t2(ALERT_MESSAGES.fallbackError));
|
|
11294
|
+
}
|
|
11295
|
+
};
|
|
11296
|
+
return previousLoginDetails.id && previousLoginDetails.isAllowToAccess && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11297
|
+
material.Box,
|
|
11298
|
+
{
|
|
11299
|
+
sx: {
|
|
11300
|
+
height: "auto",
|
|
11301
|
+
width: "100%",
|
|
11302
|
+
backgroundColor: "#007FC0",
|
|
11303
|
+
p: 1,
|
|
11304
|
+
color: "#fff",
|
|
11305
|
+
mt: "70px",
|
|
11306
|
+
textTransform: "capitalize",
|
|
11307
|
+
...sx
|
|
11308
|
+
},
|
|
11309
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(material.Typography, { variant: "h6", align: "center", children: [
|
|
11310
|
+
"Go back to",
|
|
11311
|
+
" ",
|
|
11312
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { onClick: handleAutoLogin, style: { cursor: "pointer", textDecoration: "underline" }, children: previousLoginDetails.name || previousLoginDetails.email || previousLoginDetails.id }),
|
|
11313
|
+
" ",
|
|
11314
|
+
"Profile"
|
|
11315
|
+
] })
|
|
11316
|
+
}
|
|
11317
|
+
);
|
|
11318
|
+
};
|
|
11320
11319
|
const App = () => {
|
|
11321
11320
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11322
11321
|
Header,
|
|
11323
11322
|
{
|
|
11324
11323
|
isAccessAppMenu: true,
|
|
11325
|
-
isPreviousLoginBanner: true,
|
|
11326
11324
|
isMenu: true,
|
|
11327
11325
|
updateInterfaceLang: () => {
|
|
11328
11326
|
},
|
|
@@ -11473,6 +11471,7 @@ exports.DangerDialog = DangerDialog;
|
|
|
11473
11471
|
exports.Header = Header;
|
|
11474
11472
|
exports.IMAGES = IMAGES;
|
|
11475
11473
|
exports.Logo = Logo;
|
|
11474
|
+
exports.PreviousLoginBanner = PreviousLoginBanner;
|
|
11476
11475
|
exports.SVG = SVG;
|
|
11477
11476
|
exports.Warning = Warning;
|
|
11478
11477
|
exports.default = App;
|