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.cjs.js +33 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +33 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/pages/dashboard/parts/index.d.ts +1 -0
- package/dist/pages/dashboard/parts/sidebar/index.d.ts +2 -2
- package/dist/pages/dashboard/parts/sidebar/sidebar-context/index.d.ts +1 -0
- package/dist/pages/dashboard/parts/sidebar/{sidebar.context.d.ts → sidebar-context/sidebar.context.d.ts} +1 -1
- package/dist/pages/dashboard/parts/sidebar/sidebar-provider/index.d.ts +1 -0
- package/package.json +1 -1
- /package/dist/pages/dashboard/parts/sidebar/{sidebar.provider.d.ts → sidebar-provider/sidebar.provider.d.ts} +0 -0
package/dist/index.cjs.js
CHANGED
|
@@ -24171,6 +24171,37 @@ const NotFoundPage = ({}) => {
|
|
|
24171
24171
|
/* @__PURE__ */ jsxRuntime.jsx(ButtonElement, { content: "Quay lại trang chủ", fullWidth: false, onClick: () => navigate(PAGE.AUTH.path) })
|
|
24172
24172
|
] });
|
|
24173
24173
|
};
|
|
24174
|
+
const SidebarContext = React.createContext(
|
|
24175
|
+
void 0
|
|
24176
|
+
);
|
|
24177
|
+
const SidebarProvider = ({
|
|
24178
|
+
children
|
|
24179
|
+
}) => {
|
|
24180
|
+
const [isCollapsed, setIsCollapsed] = React.useState(false);
|
|
24181
|
+
const [activeExpandMenu, setActiveExpandMenu] = React.useState(
|
|
24182
|
+
null
|
|
24183
|
+
);
|
|
24184
|
+
const { current_access } = reactRedux.useSelector(
|
|
24185
|
+
(state) => state.account
|
|
24186
|
+
);
|
|
24187
|
+
React.useEffect(() => {
|
|
24188
|
+
setActiveExpandMenu(null);
|
|
24189
|
+
}, [current_access]);
|
|
24190
|
+
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;
|
|
24191
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
24192
|
+
SidebarContext.Provider,
|
|
24193
|
+
{
|
|
24194
|
+
value: {
|
|
24195
|
+
isCollapsed,
|
|
24196
|
+
setIsCollapsed,
|
|
24197
|
+
activeExpandMenu,
|
|
24198
|
+
setActiveExpandMenu,
|
|
24199
|
+
sidebarWidth: `${sidebarWidth}px`
|
|
24200
|
+
},
|
|
24201
|
+
children
|
|
24202
|
+
}
|
|
24203
|
+
);
|
|
24204
|
+
};
|
|
24174
24205
|
const LayoutGroupContext = React.createContext({});
|
|
24175
24206
|
function useConstant(init) {
|
|
24176
24207
|
const ref = React.useRef(null);
|
|
@@ -31800,9 +31831,6 @@ const routes = [
|
|
|
31800
31831
|
]
|
|
31801
31832
|
}
|
|
31802
31833
|
];
|
|
31803
|
-
const SidebarContext = React.createContext(
|
|
31804
|
-
void 0
|
|
31805
|
-
);
|
|
31806
31834
|
const useSidebar = () => {
|
|
31807
31835
|
const context = React.useContext(SidebarContext);
|
|
31808
31836
|
if (context === void 0) {
|
|
@@ -32134,6 +32162,8 @@ exports.RouteType = RouteType;
|
|
|
32134
32162
|
exports.SCALE_VALUE = SCALE_VALUE;
|
|
32135
32163
|
exports.STYLE = STYLE;
|
|
32136
32164
|
exports.SYSTEM_MODULES = SYSTEM_MODULES;
|
|
32165
|
+
exports.SidebarContext = SidebarContext;
|
|
32166
|
+
exports.SidebarProvider = SidebarProvider;
|
|
32137
32167
|
exports.SmallIcon = SmallIcon;
|
|
32138
32168
|
exports.SocketNamespace = SocketNamespace;
|
|
32139
32169
|
exports.SocketSystemEvent = SocketSystemEvent;
|