sixseconds-modules 1.6.33 → 1.6.35
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.cjs.js +17 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +17 -4
- package/dist/index.es.js.map +1 -1
- package/dist/utils/common.d.ts +3 -0
- package/package.json +3 -1
package/dist/index.es.js
CHANGED
|
@@ -14,6 +14,7 @@ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
|
14
14
|
import * as React from "react";
|
|
15
15
|
import React__default, { useRef, useEffect, useState, useCallback, useMemo, useLayoutEffect, createContext, forwardRef, createElement, useContext, Component } from "react";
|
|
16
16
|
import { Box, Typography, styled, AppBar, Avatar, ClickAwayListener, Stack as Stack$1, useMediaQuery, Dialog, Button as Button$1, IconButton, Grid, Chip, Link, Divider, MenuItem, Container, Badge, FormLabel, TextField, InputAdornment } from "@mui/material";
|
|
17
|
+
import Cookies from "js-cookie";
|
|
17
18
|
import MenuIcon from "@mui/icons-material/Menu";
|
|
18
19
|
import CheckIcon from "@mui/icons-material/Check";
|
|
19
20
|
import axios from "axios";
|
|
@@ -2640,7 +2641,7 @@ function createEnv(opts) {
|
|
|
2640
2641
|
}
|
|
2641
2642
|
return runtimeEnv;
|
|
2642
2643
|
}
|
|
2643
|
-
const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "
|
|
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" };
|
|
2644
2645
|
const env = createEnv({
|
|
2645
2646
|
runtimeEnv: __vite_import_meta_env__
|
|
2646
2647
|
});
|
|
@@ -2813,6 +2814,17 @@ const handleRedirection = (type, source) => {
|
|
|
2813
2814
|
}
|
|
2814
2815
|
}
|
|
2815
2816
|
};
|
|
2817
|
+
const CookiesUtil = {
|
|
2818
|
+
set: (name, val) => {
|
|
2819
|
+
Cookies.set(name, val, {
|
|
2820
|
+
path: "/",
|
|
2821
|
+
domain: ".6seconds.org",
|
|
2822
|
+
secure: true,
|
|
2823
|
+
sameSite: "None",
|
|
2824
|
+
expires: 7
|
|
2825
|
+
});
|
|
2826
|
+
}
|
|
2827
|
+
};
|
|
2816
2828
|
//! moment.js
|
|
2817
2829
|
//! version : 2.30.1
|
|
2818
2830
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
@@ -10736,10 +10748,11 @@ const IMAGES = {
|
|
|
10736
10748
|
Us
|
|
10737
10749
|
};
|
|
10738
10750
|
const PreviousLoginBanner = ({ t: t2, router }) => {
|
|
10739
|
-
const previousLoginDetails =
|
|
10751
|
+
const previousLoginDetails = Cookies.get("previousLoginDetails") || {};
|
|
10752
|
+
CookiesUtil.set("previousLoginDetails", previousLoginDetails);
|
|
10740
10753
|
const handleAutoLogin = async () => {
|
|
10741
10754
|
try {
|
|
10742
|
-
const res = await autoLoginApi(previousLoginDetails
|
|
10755
|
+
const res = await autoLoginApi(previousLoginDetails?.id);
|
|
10743
10756
|
if (res.remote === "success") {
|
|
10744
10757
|
if (router) {
|
|
10745
10758
|
router.reload();
|
|
@@ -10748,7 +10761,7 @@ const PreviousLoginBanner = ({ t: t2, router }) => {
|
|
|
10748
10761
|
window.location.reload();
|
|
10749
10762
|
window.location.href = ROUTES.home;
|
|
10750
10763
|
}
|
|
10751
|
-
|
|
10764
|
+
Cookies.remove("previousLoginDetails");
|
|
10752
10765
|
}
|
|
10753
10766
|
} catch (err) {
|
|
10754
10767
|
toast.error(t2(ALERT_MESSAGES.fallbackError));
|