sevago-sso-fe 1.0.10 → 1.0.11

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
@@ -24153,6 +24153,37 @@ const NotFoundPage = ({}) => {
24153
24153
  /* @__PURE__ */ jsx(ButtonElement, { content: "Quay lại trang chủ", fullWidth: false, onClick: () => navigate(PAGE.AUTH.path) })
24154
24154
  ] });
24155
24155
  };
24156
+ const SidebarContext = createContext(
24157
+ void 0
24158
+ );
24159
+ const SidebarProvider = ({
24160
+ children
24161
+ }) => {
24162
+ const [isCollapsed, setIsCollapsed] = useState(false);
24163
+ const [activeExpandMenu, setActiveExpandMenu] = useState(
24164
+ null
24165
+ );
24166
+ const { current_access } = useSelector(
24167
+ (state) => state.account
24168
+ );
24169
+ useEffect(() => {
24170
+ setActiveExpandMenu(null);
24171
+ }, [current_access]);
24172
+ const sidebarWidth = activeExpandMenu ? isCollapsed ? STYLE.WIDTH_COLLAPSE + STYLE.WIDTH_SIDEBAR_EXPAND : STYLE.WIDTH_SIDEBAR + STYLE.WIDTH_SIDEBAR_EXPAND : isCollapsed ? STYLE.WIDTH_COLLAPSE : STYLE.WIDTH_SIDEBAR;
24173
+ return /* @__PURE__ */ jsx(
24174
+ SidebarContext.Provider,
24175
+ {
24176
+ value: {
24177
+ isCollapsed,
24178
+ setIsCollapsed,
24179
+ activeExpandMenu,
24180
+ setActiveExpandMenu,
24181
+ sidebarWidth: `${sidebarWidth}px`
24182
+ },
24183
+ children
24184
+ }
24185
+ );
24186
+ };
24156
24187
  const LayoutGroupContext = createContext({});
24157
24188
  function useConstant(init) {
24158
24189
  const ref = useRef(null);
@@ -31782,9 +31813,6 @@ const routes = [
31782
31813
  ]
31783
31814
  }
31784
31815
  ];
31785
- const SidebarContext = createContext(
31786
- void 0
31787
- );
31788
31816
  const useSidebar = () => {
31789
31817
  const context = useContext(SidebarContext);
31790
31818
  if (context === void 0) {
@@ -32117,6 +32145,8 @@ export {
32117
32145
  SCALE_VALUE,
32118
32146
  STYLE,
32119
32147
  SYSTEM_MODULES,
32148
+ SidebarContext,
32149
+ SidebarProvider,
32120
32150
  SmallIcon,
32121
32151
  SocketNamespace,
32122
32152
  SocketSystemEvent,