sevago-sso-fe 1.0.36 → 1.0.37

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
@@ -27656,7 +27656,8 @@ const TimeAgoContentComponent = ({ time: time2, content, height: height2 = HEIGH
27656
27656
  const AppsSidebar = ({
27657
27657
  isOpen,
27658
27658
  onClose,
27659
- position = "left"
27659
+ position = "left",
27660
+ blacklist
27660
27661
  }) => {
27661
27662
  const theme = useTheme();
27662
27663
  const navigate = useNavigate();
@@ -27666,6 +27667,16 @@ const AppsSidebar = ({
27666
27667
  const { setActiveExpandMenu } = useSidebar();
27667
27668
  const { palette } = useTheme();
27668
27669
  if (!isOpen) return null;
27670
+ const displayApps = React__default.useMemo(() => {
27671
+ if (!blacklist || blacklist.length === 0) return allApps;
27672
+ const matched = allApps.filter(
27673
+ (a) => a.path ? blacklist.includes(a.path) : false
27674
+ );
27675
+ return matched.length > 0 ? matched : allApps;
27676
+ }, [allApps, blacklist]);
27677
+ const groups = React__default.useMemo(() => {
27678
+ return Array.from(new Set(displayApps.map((v) => v.group)));
27679
+ }, [displayApps]);
27669
27680
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
27670
27681
  /* @__PURE__ */ jsx(
27671
27682
  Box,
@@ -27742,44 +27753,7 @@ const AppsSidebar = ({
27742
27753
  ]
27743
27754
  }
27744
27755
  ),
27745
- /* @__PURE__ */ jsxs(
27746
- Box,
27747
- {
27748
- sx: {
27749
- gap: PADDING_GAP_ITEM,
27750
- display: "flex",
27751
- flexDirection: "column"
27752
- },
27753
- children: [
27754
- /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", children: "Workflow Engine" }),
27755
- /* @__PURE__ */ jsx(
27756
- AppGrid,
27757
- {
27758
- apps: allApps.filter(
27759
- (app) => app.group === AppGroup.WORKFLOW_ENGINE
27760
- ),
27761
- columns: 4,
27762
- iconSize: 60,
27763
- iconRadius: 5.5,
27764
- gap: PADDING_GAP_ITEM,
27765
- titleVariant: "body1",
27766
- captionVariant: "caption",
27767
- titleColor: theme.palette.grey[800],
27768
- captionColor: theme.palette.grey[600],
27769
- selectedAppId: currentApp?.path,
27770
- onClickItem: async (app) => {
27771
- await dispatch(
27772
- ACTION_ACCOUNT.updateCurrentAccess(app.path)
27773
- ).unwrap();
27774
- setActiveExpandMenu(null);
27775
- onClose();
27776
- }
27777
- }
27778
- )
27779
- ]
27780
- }
27781
- ),
27782
- /* @__PURE__ */ jsxs(
27756
+ groups.map((group) => /* @__PURE__ */ jsxs(
27783
27757
  Box,
27784
27758
  {
27785
27759
  sx: {
@@ -27788,11 +27762,11 @@ const AppsSidebar = ({
27788
27762
  flexDirection: "column"
27789
27763
  },
27790
27764
  children: [
27791
- /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", children: "HRM" }),
27765
+ /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", children: group === AppGroup.PLATFORM_AND_INFO ? "Platform & Info" : group }),
27792
27766
  /* @__PURE__ */ jsx(
27793
27767
  AppGrid,
27794
27768
  {
27795
- apps: allApps.filter((app) => app.group === AppGroup.HRM),
27769
+ apps: displayApps.filter((app) => app.group === group),
27796
27770
  columns: 4,
27797
27771
  iconSize: 60,
27798
27772
  iconRadius: 5.5,
@@ -27812,45 +27786,9 @@ const AppsSidebar = ({
27812
27786
  }
27813
27787
  )
27814
27788
  ]
27815
- }
27816
- ),
27817
- /* @__PURE__ */ jsxs(
27818
- Box,
27819
- {
27820
- sx: {
27821
- gap: PADDING_GAP_ITEM,
27822
- display: "flex",
27823
- flexDirection: "column"
27824
- },
27825
- children: [
27826
- /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", children: "Platform Info" }),
27827
- /* @__PURE__ */ jsx(
27828
- AppGrid,
27829
- {
27830
- apps: allApps.filter(
27831
- (app) => app.group === AppGroup.PLATFORM_AND_INFO
27832
- ),
27833
- columns: 4,
27834
- iconSize: 60,
27835
- iconRadius: 5.5,
27836
- gap: PADDING_GAP_ITEM,
27837
- titleVariant: "body1",
27838
- captionVariant: "caption",
27839
- titleColor: theme.palette.grey[800],
27840
- captionColor: theme.palette.grey[600],
27841
- selectedAppId: currentApp?.path,
27842
- onClickItem: async (app) => {
27843
- await dispatch(
27844
- ACTION_ACCOUNT.updateCurrentAccess(app.path)
27845
- ).unwrap();
27846
- setActiveExpandMenu(null);
27847
- onClose();
27848
- }
27849
- }
27850
- )
27851
- ]
27852
- }
27853
- )
27789
+ },
27790
+ group
27791
+ ))
27854
27792
  ]
27855
27793
  }
27856
27794
  )