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/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
@@ -2641,7 +2641,7 @@ function createEnv(opts) {
2641
2641
  }
2642
2642
  return runtimeEnv;
2643
2643
  }
2644
- const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "qa", "PROD": true, "SSR": false, "VITE_MODULES_CARDS_ADMIN_FRONTEND_BASE_URL": "https://qa-sso.6seconds.org", "VITE_MODULES_CARDS_HOME_FRONTEND_BASE_URL": "https://qa-sso.6seconds.org", "VITE_MODULES_CERT_FRONTEND_BASE_URL": "https://qa-sso.6seconds.org", "VITE_MODULES_EVENTS_FRONTEND_BASE_URL": "https://qa-sso.6seconds.org", "VITE_MODULES_SSO_BACKEND_BASE_URL": "https://qa-ssoapi.6seconds.org", "VITE_MODULES_SSO_FRONTEND_BASE_URL": "https://qa-sso.6seconds.org", "VITE_MODULES_TOOLS_FRONTEND_BASE_URL": "https://qa-sso.6seconds.org" };
2644
+ 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" };
2645
2645
  const env = createEnv({
2646
2646
  runtimeEnv: __vite_import_meta_env__
2647
2647
  });
@@ -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,6 @@ const Header = ({
10987
10944
  }
10988
10945
  )
10989
10946
  ] }) }),
10990
- isPreviousLoginBanner && /* @__PURE__ */ jsx(PreviousLoginBanner, { t }),
10991
10947
  /* @__PURE__ */ jsx(
10992
10948
  DangerDialog,
10993
10949
  {
@@ -11299,12 +11255,54 @@ const ButtonStyled = styled("div")(() => ({
11299
11255
  function Button({ isLoading = false, btnTitle, className, disabled = false, ...rest }) {
11300
11256
  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
11257
  }
11258
+ const PreviousLoginBanner = ({ t: t2, router, sx }) => {
11259
+ const previousLoginDetails = CookiesUtil.get("previousLoginDetails") || {};
11260
+ CookiesUtil.set("previousLoginDetails", previousLoginDetails);
11261
+ const handleAutoLogin = async () => {
11262
+ try {
11263
+ const res = await autoLoginApi(previousLoginDetails?.id);
11264
+ if (res.remote === "success") {
11265
+ CookiesUtil.remove("previousLoginDetails");
11266
+ if (router) {
11267
+ router.reload();
11268
+ router.replace(ROUTES.home);
11269
+ } else {
11270
+ window.location.reload();
11271
+ window.location.href = ROUTES.home;
11272
+ }
11273
+ }
11274
+ } catch (err) {
11275
+ toast.error(t2(ALERT_MESSAGES.fallbackError));
11276
+ }
11277
+ };
11278
+ return previousLoginDetails.id && previousLoginDetails.isAllowToAccess && /* @__PURE__ */ jsx(
11279
+ Box,
11280
+ {
11281
+ sx: {
11282
+ height: "auto",
11283
+ width: "100%",
11284
+ backgroundColor: "#007FC0",
11285
+ p: 1,
11286
+ color: "#fff",
11287
+ mt: "70px",
11288
+ textTransform: "capitalize",
11289
+ ...sx
11290
+ },
11291
+ children: /* @__PURE__ */ jsxs(Typography, { variant: "h6", align: "center", children: [
11292
+ "Go back to",
11293
+ " ",
11294
+ /* @__PURE__ */ jsx("strong", { onClick: handleAutoLogin, style: { cursor: "pointer", textDecoration: "underline" }, children: previousLoginDetails.name || previousLoginDetails.email || previousLoginDetails.id }),
11295
+ " ",
11296
+ "Profile"
11297
+ ] })
11298
+ }
11299
+ );
11300
+ };
11302
11301
  const App = () => {
11303
11302
  return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
11304
11303
  Header,
11305
11304
  {
11306
11305
  isAccessAppMenu: true,
11307
- isPreviousLoginBanner: true,
11308
11306
  isMenu: true,
11309
11307
  updateInterfaceLang: () => {
11310
11308
  },
@@ -11456,6 +11454,7 @@ export {
11456
11454
  Header,
11457
11455
  IMAGES,
11458
11456
  Logo,
11457
+ PreviousLoginBanner,
11459
11458
  SVG,
11460
11459
  Warning,
11461
11460
  App as default