sixseconds-modules 1.6.16 → 1.6.17

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.
@@ -6,6 +6,7 @@ interface HeaderMenuProps {
6
6
  setInitialState: SetStateAction<IState>;
7
7
  t: t;
8
8
  appName: string;
9
+ router: any;
9
10
  }
10
11
  declare const AppMenus: React.FC<HeaderMenuProps>;
11
12
  export default AppMenus;
package/dist/index.cjs.js CHANGED
@@ -2492,7 +2492,7 @@ function createEnv(opts) {
2492
2492
  }
2493
2493
  return runtimeEnv;
2494
2494
  }
2495
- 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" };
2495
+ 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" };
2496
2496
  const env = createEnv({
2497
2497
  runtimeEnv: __vite_import_meta_env__
2498
2498
  });
@@ -8856,7 +8856,7 @@ const UserProfile = ({ t: t2, userData, setInitialState, extraMenuOptions, route
8856
8856
  direction: "row",
8857
8857
  spacing: 1,
8858
8858
  alignItems: "center",
8859
- onClick: () => handleRedirection2(userData?.appName, SSO_ROUTES().editProfile),
8859
+ onClick: () => handleRedirection2(userData?.appName, SSO_ROUTES(userData?.appName).editProfile),
8860
8860
  sx: { color: "#1A1919", textDecoration: "none" },
8861
8861
  children: [
8862
8862
  /* @__PURE__ */ jsxRuntime.jsx(SVG.UserEdit, {}),
@@ -10320,13 +10320,22 @@ const Notification = ({ setInitialState, notificationAccessApps, initialState, t
10320
10320
  }
10321
10321
  ) });
10322
10322
  };
10323
- const AppMenus = ({ menuItems, setInitialState, t: t2, appName }) => {
10323
+ const AppMenus = ({ menuItems, setInitialState, t: t2, appName, router }) => {
10324
+ const handleRedirection2 = (appName2, url2, type) => {
10325
+ if (router && appName2 === APP_NAMES.sso) {
10326
+ router.push(url2);
10327
+ } else {
10328
+ if (type === "app") {
10329
+ window.open(`${url2}?source=${appName2}`, "_blank");
10330
+ } else {
10331
+ router.push(`${url2}?source=${appName2}`);
10332
+ }
10333
+ }
10334
+ };
10324
10335
  return /* @__PURE__ */ jsxRuntime.jsx(material.ClickAwayListener, { onClickAway: () => handleCloseUtil(setInitialState), children: /* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: { p: 2 }, children: /* @__PURE__ */ jsxRuntime.jsx(material.Grid, { container: true, rowGap: 3, children: menuItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
10325
10336
  material.Grid,
10326
10337
  {
10327
- component: material.Link,
10328
- href: item.link + (appName === APP_NAMES.sso ? "" : `?source=${appName}`),
10329
- target: item.type === "tab" ? "_self" : "_blank",
10338
+ onClick: () => handleRedirection2(appName, item.link, item.type),
10330
10339
  item: true,
10331
10340
  md: 4,
10332
10341
  xs: 6,
@@ -10559,6 +10568,7 @@ const Header = ({
10559
10568
  state.toggles.appMenus && userData?.appAccess?.length && /* @__PURE__ */ jsxRuntime.jsx(material.Box, { className: "profile headerMenu", sx: { width: "400px !important", p: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(
10560
10569
  AppMenus,
10561
10570
  {
10571
+ router,
10562
10572
  t,
10563
10573
  appName: userData?.appName,
10564
10574
  menuItems: userData?.appAccess,