sevago-library 1.3.1 → 1.3.3

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.esm.js CHANGED
@@ -453,7 +453,7 @@ const APP_OBJ = {
453
453
  production_vps: ""
454
454
  },
455
455
  icon: ICONS.iconDefault,
456
- content: "Kho Nguyên liệu",
456
+ content: "Kho nội bộ",
457
457
  group: AppGroup.MANUFACTURING,
458
458
  color: APP_GROUP_COLOR[AppGroup.MANUFACTURING]
459
459
  },
@@ -77382,9 +77382,10 @@ const LogoComponent = ({
77382
77382
  env,
77383
77383
  logoName = "logoMain",
77384
77384
  height: height2 = HEIGHT_LOGO_DEFAULT,
77385
- sx = {}
77385
+ sx = {},
77386
+ isLongSubDomain = false
77386
77387
  }) => {
77387
- return /* @__PURE__ */ jsx(LinkElement, { href: SSO[env], children: /* @__PURE__ */ jsx(ImageElement, { url: ICONS[logoName], sx: { height: height2, borderRadius: "unset", width: "auto", ...sx } }) });
77388
+ return /* @__PURE__ */ jsx(LinkElement, { href: isLongSubDomain ? SSO[env].replace("dev.", "develop.").replace("sta.", "staging.") : SSO[env], children: /* @__PURE__ */ jsx(ImageElement, { url: ICONS[logoName], sx: { height: height2, borderRadius: "unset", width: "auto", ...sx } }) });
77388
77389
  };
77389
77390
  const NoteComponent = ({ content, contentHref, href, type = "info" }) => {
77390
77391
  const { palette } = useTheme$4();
@@ -78096,13 +78097,18 @@ const AppsSidebar = ({
78096
78097
  position = "left",
78097
78098
  blacklist = [],
78098
78099
  env,
78099
- onClickApp
78100
+ onClickApp,
78101
+ isLongSubDomain = false
78100
78102
  }) => {
78101
78103
  if (!isOpen) return null;
78102
78104
  const appsGroupObj = Object.keys(APP_OBJ).reduce(
78103
78105
  (r2, key) => {
78104
78106
  if (blacklist.includes(key)) return r2;
78105
78107
  const e = APP_OBJ[key];
78108
+ if (isLongSubDomain) {
78109
+ e.path.develop = e.path.develop.replace("dev.", "develop.");
78110
+ e.path.staging = e.path.staging.replace("sta.", "staging.");
78111
+ }
78106
78112
  if (r2[e.group]) r2[e.group].push(e);
78107
78113
  else r2[e.group] = [e];
78108
78114
  return r2;
@@ -78144,7 +78150,13 @@ const AppsSidebar = ({
78144
78150
  children: [
78145
78151
  /* @__PURE__ */ jsxs(StackRowAlignCenterJustBetween, { children: [
78146
78152
  /* @__PURE__ */ jsx(IconElement, { icon: "close", onClick: onClose }),
78147
- /* @__PURE__ */ jsx(IconElement, { icon: "home", onClick: () => window.location.href = SSO[env] })
78153
+ /* @__PURE__ */ jsx(
78154
+ IconElement,
78155
+ {
78156
+ icon: "home",
78157
+ onClick: () => window.location.href = isLongSubDomain ? SSO[env].replace("dev.", "develop.").replace("sta.", "staging.") : SSO[env]
78158
+ }
78159
+ )
78148
78160
  ] }),
78149
78161
  Object.keys(appsGroupObj).map((group) => /* @__PURE__ */ jsxs(Stack, { children: [
78150
78162
  /* @__PURE__ */ jsx(Typography$1, { variant: "subtitle2", children: group === AppGroup.PLATFORM_AND_INFO ? "Platform & Info" : group }),
@@ -78175,7 +78187,8 @@ const SystemMonitorSidebarPart = ({
78175
78187
  onClickApp,
78176
78188
  showNameApps,
78177
78189
  showIconApps,
78178
- direction = "row"
78190
+ direction = "row",
78191
+ isLongSubDomain = false
78179
78192
  }) => {
78180
78193
  const [open2, setOpen] = useState(false);
78181
78194
  const app = useMemo(() => {
@@ -78202,12 +78215,18 @@ const SystemMonitorSidebarPart = ({
78202
78215
  position,
78203
78216
  blacklist,
78204
78217
  env,
78205
- onClickApp
78218
+ onClickApp,
78219
+ isLongSubDomain
78206
78220
  }
78207
78221
  )
78208
78222
  ] });
78209
78223
  };
78210
- const SystemMonitorScreen = ({ blacklist, onClickApp, sx = {} }) => {
78224
+ const SystemMonitorScreen = ({
78225
+ blacklist,
78226
+ onClickApp,
78227
+ sx = {},
78228
+ isLongSubDomain = false
78229
+ }) => {
78211
78230
  const theme = useTheme();
78212
78231
  const [tab, setTab] = useState(AppGroup.ALL);
78213
78232
  const getAppsForGroup = (group) => Object.keys(APP_OBJ).filter((key) => {
@@ -78217,6 +78236,12 @@ const SystemMonitorScreen = ({ blacklist, onClickApp, sx = {} }) => {
78217
78236
  return !isBlacklisted && isInSelectedGroup;
78218
78237
  }).map((key) => APP_OBJ[key]);
78219
78238
  const appsForCurrentTab = getAppsForGroup(tab);
78239
+ if (isLongSubDomain) {
78240
+ appsForCurrentTab.forEach((e) => {
78241
+ e.path.develop = e.path.develop.replace("dev.", "develop.");
78242
+ e.path.staging = e.path.staging.replace("sta.", "staging.");
78243
+ });
78244
+ }
78220
78245
  return /* @__PURE__ */ jsxs(StackAlignCenter, { preset: "fadeInUp", component: MotionBox, sx: { padding: "150px", gap: 3, width: "100%", ...sx }, children: [
78221
78246
  /* @__PURE__ */ jsx(StackRow, { children: Object.values(AppGroup).map((g) => {
78222
78247
  const appsForGroup = getAppsForGroup(g);