@m4l/components 0.2.25 → 0.2.26
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/@types/export.d.ts +3 -0
- package/components/AccountPopover/{index.505e278a.js → index.e31fc908.js} +2 -2
- package/components/AppBar/{index.7106417d.js → index.4945897e.js} +3 -4
- package/components/CommonActions/components/ActionCancel/{index.de862adf.js → index.33a748be.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.3fd5c858.js → index.9a965204.js} +4 -4
- package/components/CommonActions/components/ActionFormIntro/{index.07394f62.js → index.7add0125.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.79fc2386.js → index.ac7cd0ee.js} +2 -2
- package/components/CommonActions/components/Actions/{index.2f6286eb.js → index.389f9b28.js} +1 -2
- package/components/DataGrid/formatters/ColumnBooleanFormatter/{index.36270dd1.js → index.f731d23f.js} +1 -1
- package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/{index.8b008692.js → index.ad82747c.js} +1 -1
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/{index.cb308086.js → index.64854fdd.js} +1 -1
- package/components/DataGrid/formatters/ColumnPointsFormatter/{index.f3d6036f.js → index.4335c26b.js} +1 -1
- package/components/DataGrid/{index.b1eafce1.js → index.1c695ed3.js} +4 -5
- package/components/DataGrid/subcomponents/Actions/{index.9af87fa1.js → index.4a402633.js} +11 -12
- package/components/DataGrid/subcomponents/editors/TextEditor/{index.91380a55.js → index.eac1749c.js} +12 -1
- package/components/DragResizeWindow/{index.051c743d.js → index.f84451f8.js} +2 -3
- package/components/DynamicFilter/{index.b93e5649.js → index.22ba3195.js} +16 -16
- package/components/FieldLabel/FieldLabel.d.ts +2 -0
- package/components/FieldLabel/classes/constants.d.ts +1 -0
- package/components/FieldLabel/classes/index.d.ts +10 -0
- package/components/FieldLabel/classes/types.d.ts +11 -0
- package/components/FieldLabel/index.1da2a28d.js +82 -0
- package/components/FieldLabel/index.d.ts +1 -0
- package/components/FieldLabel/types.d.ts +8 -0
- package/components/HamburgerMenu/{index.25029e23.js → index.1663edef.js} +2 -2
- package/components/Icon/{index.b920baf8.js → index.8c744412.js} +1 -1
- package/components/Image/{index.d034ca68.js → index.39b3b9d9.js} +3 -4
- package/components/LanguagePopover/{index.e54c5cc7.js → index.80896e49.js} +3 -3
- package/components/LoadingError/{index.123e16f8.js → index.9c64680a.js} +2 -2
- package/components/MFLoader/{index.52096ea5.js → index.7cd7c372.js} +1 -1
- package/components/ModalDialog/{index.2e931b5f.js → index.ce0f4d16.js} +3 -3
- package/components/NoItemSelected/{index.1024b856.js → index.ffba558b.js} +2 -3
- package/components/ObjectLogs/{index.d10f4a2f.js → index.dd6a5009.js} +7 -8
- package/components/PDFViewer/{index.98852f91.js → index.093ddd35.js} +1 -1
- package/components/Page/{index.def863f2.js → index.1b20a73e.js} +1 -1
- package/components/PaperForm/{index.8a617a66.js → index.42e78a24.js} +2 -3
- package/components/Period/classes/index.d.ts +3 -1
- package/components/Period/classes/types.d.ts +6 -1
- package/components/Period/{index.d80dff10.js → index.6e8d92dc.js} +76 -61
- package/components/Period/subcomponents/SkeletonPeriod/index.d.ts +2 -0
- package/components/Period/subcomponents/SkeletonPeriod/types.d.ts +4 -0
- package/components/Period/types.d.ts +4 -1
- package/components/PrintingSystem/{index.2e17cae5.js → index.c2d21657.js} +14 -14
- package/components/PrintingSystem/subcomponents/BodyNode/{index.c5ffe20a.js → index.c7b59f3f.js} +1 -1
- package/components/PrintingSystem/subcomponents/ChartNode/{index.020c037c.js → index.263f02f0.js} +1 -1
- package/components/PrintingSystem/subcomponents/DividerNode/{index.78b023bb.js → index.f00c44f3.js} +1 -1
- package/components/PrintingSystem/subcomponents/FooterNode/{index.b29fc1e9.js → index.fb323704.js} +1 -1
- package/components/PrintingSystem/subcomponents/GridNode/{index.11626284.js → index.1ed935be.js} +1 -1
- package/components/PrintingSystem/subcomponents/HeaderNode/{index.ef44c8ab.js → index.5173c74a.js} +1 -1
- package/components/PrintingSystem/subcomponents/PaperNode/{index.d72d224b.js → index.fad64696.js} +1 -1
- package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.8e53440c.js → index.3a3e5fd0.js} +1 -1
- package/components/PrintingSystem/subcomponents/SectionNode/{index.0b66458e.js → index.2890fc12.js} +1 -1
- package/components/PrintingSystem/subcomponents/TextBoxNode/{index.b4c72fef.js → index.148708e6.js} +1 -1
- package/components/PropertyValue/{index.3b6670d4.js → index.4ea5af0f.js} +2 -3
- package/components/Resizeable/{index.0eb66c37.js → index.8db8f77d.js} +1 -1
- package/components/ScrollBar/{index.010f1b9d.js → index.7dfc2f29.js} +4 -3
- package/components/ScrollBar/index.d.ts +2 -2
- package/components/SideBar/classes/index.d.ts +7 -2
- package/components/SideBar/classes/types.d.ts +6 -1
- package/components/SideBar/constants.d.ts +2 -0
- package/components/SideBar/context/sideBarContext/types.d.ts +3 -1
- package/components/SideBar/{index.cdb70977.js → index.141dac10.js} +251 -410
- package/components/SideBar/subcomponents/ContentDesktop/subcomponents/CollapseButton/index.d.ts +1 -1
- package/components/SideBar/subcomponents/ContentDesktop/subcomponents/ContentComponent/index.d.ts +1 -0
- package/components/SideBar/subcomponents/ContentGroups/index.d.ts +1 -1
- package/components/SideBar/types.d.ts +1 -4
- package/components/SplitLayout/{index.30fd5861.js → index.3856385c.js} +1 -2
- package/components/ToastContainer/{index.97fdba82.js → index.98c4873e.js} +2 -2
- package/components/areas/components/AreasAdmin/{index.e4f0ccc1.js → index.debe3e3d.js} +13 -14
- package/components/areas/components/AreasViewer/{index.f87c63ca.js → index.82a22acb.js} +9 -10
- package/components/areas/contexts/AreasContext/{index.3e3d8c62.js → index.0dc69929.js} +2 -2
- package/components/areas/hooks/useAreas/{index.b18fe111.js → index.ca15a4b6.js} +1 -1
- package/components/commercial/TopBar/{index.8e2163f7.js → index.32a332c4.js} +5 -18
- package/components/formatters/BooleanFormatter/{index.b3052107.js → index.0703a256.js} +2 -2
- package/components/formatters/PointsFormatter/{index.5c94c5e8.js → index.8a4fa393.js} +4 -4
- package/components/formatters/{index.95cc337e.js → index.94be7098.js} +1 -1
- package/components/hook-form/RHFAutocomplete/{index.cf399b24.js → index.993794f8.js} +22 -11
- package/components/hook-form/RHFAutocomplete/types.d.ts +5 -6
- package/components/hook-form/RHFAutocompleteAsync/{index.b2b75475.js → index.924c6473.js} +2 -3
- package/components/hook-form/RHFCheckbox/{index.a38715e3.js → index.f1fd5789.js} +18 -8
- package/components/hook-form/RHFCheckbox/types.d.ts +2 -1
- package/components/hook-form/RHFColorPicker/RFHColorPicker.d.ts +8 -0
- package/components/hook-form/RHFColorPicker/classes/index.d.ts +2 -1
- package/components/hook-form/RHFColorPicker/classes/types.d.ts +2 -0
- package/components/hook-form/RHFColorPicker/dictionary.d.ts +1 -0
- package/components/hook-form/RHFColorPicker/index.60b50052.js +188 -0
- package/components/hook-form/RHFColorPicker/index.d.ts +2 -8
- package/components/hook-form/RHFColorPicker/subcomponents/Skeleton/indext.d.ts +2 -1
- package/components/hook-form/RHFColorPicker/subcomponents/Skeleton/types.d.ts +3 -0
- package/components/hook-form/RHFColorPicker/types.d.ts +11 -2
- package/components/hook-form/RHFDateTime/classes/types.d.ts +2 -0
- package/components/hook-form/RHFDateTime/{index.5a673a96.js → index.2396ea4a.js} +35 -37
- package/components/hook-form/RHFDateTime/subcomponents/Skeleton/types.d.ts +3 -2
- package/components/hook-form/RHFDateTime/types.d.ts +2 -1
- package/components/hook-form/RHFPeriod/{index.4205c8ab.js → index.011965ef.js} +18 -4
- package/components/hook-form/RHFPeriod/types.d.ts +3 -1
- package/components/hook-form/RHFTextField/{index.fbb29ee1.js → index.fb0d1cac.js} +21 -12
- package/components/hook-form/RHFTextField/types.d.ts +2 -2
- package/components/hook-form/RHFTextFieldPassword/types.d.ts +0 -1
- package/components/hook-form/RHFUpload/{index.05d7e2a7.js → index.e5f734b8.js} +4 -5
- package/components/hook-form/index.d.ts +1 -1
- package/components/index.d.ts +1 -0
- package/components/modal/{WindowBase.998b8a38.js → WindowBase.dd1d2d7b.js} +3 -3
- package/components/modal/{WindowConfirm.55ac3c8f.js → WindowConfirm.4501497a.js} +6 -6
- package/components/mui_extended/Accordion/{index.fb4eb664.js → index.4393eca9.js} +2 -2
- package/components/mui_extended/Button/{index.e520bd15.js → index.93389adb.js} +1 -1
- package/components/mui_extended/CheckBox/types.d.ts +2 -1
- package/components/mui_extended/{CheckBox.e662d20c.js → CheckBox.840a443f.js} +21 -23
- package/components/mui_extended/IconButton/{index.9ea23f87.js → index.383f5496.js} +1 -1
- package/components/mui_extended/MenuActions/{index.fa7c26a5.js → index.e6e3aac8.js} +4 -5
- package/components/mui_extended/Pager/{index.0c703574.js → index.5791276c.js} +2 -3
- package/components/mui_extended/Popover/{index.b3eca6b1.js → index.d85de73b.js} +1 -2
- package/components/mui_extended/Tab/{index.409b9c74.js → index.2068925d.js} +2 -3
- package/components/mui_extended/ToggleButton/{index.bcaea74b.js → index.4ac1f974.js} +1 -1
- package/components/mui_extended/ToggleIconButton/{index.131772d7.js → index.8ca0114f.js} +1 -1
- package/contexts/ModalContext/{index.978a412d.js → index.dde4e35a.js} +1 -1
- package/contexts/RHFormContext/{index.7769076a.js → index.7b2a8723.js} +1 -2
- package/hooks/useFormAddEdit/{index.4caddd24.js → index.7fdad61d.js} +2 -2
- package/hooks/useModal/{index.786a4439.js → index.2f1d6a07.js} +1 -1
- package/hooks/useTab/{index.eee18a49.js → index.c0564138.js} +1 -1
- package/index.js +118 -115
- package/{node_modules.71622512.js → node_modules.585eab0e.js} +1 -1
- package/package.json +1 -1
- package/{vendor.a735310a.js → vendor.173d0b89.js} +68 -67
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/Skeleton/index.d.ts +0 -1
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/Skeleton/types.d.ts +0 -3
- package/components/SideBar/subcomponents/ContentGroups/type.d.ts +0 -7
- package/components/hook-form/RHFColorPicker/index.48a1ee1b.js +0 -153
- package/components/mui_extended/Popover/index.d.ts +0 -2
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import { styled,
|
|
2
|
-
import {
|
|
3
|
-
import { useEnvironment, useBase, BaseProvider } from "@m4l/core";
|
|
4
|
-
import { createContext, useContext, useState, useEffect } from "react";
|
|
1
|
+
import { styled, generateUtilityClasses, ListItemText, ListItemButton, Collapse, Drawer as Drawer$1, useTheme } from "@mui/material";
|
|
2
|
+
import { createContext, useState, useContext, useEffect } from "react";
|
|
5
3
|
import { unstable_composeClasses } from "@mui/base";
|
|
6
4
|
import { g as getComponentUtilityClass } from "../../utils/index.de903261.js";
|
|
7
5
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
8
6
|
import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { styled as styled$1, alpha } from "@mui/material/styles";
|
|
8
|
+
import { useEnvironment, useBase, BaseProvider } from "@m4l/core";
|
|
11
9
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
12
|
-
import { I as Icon, A as ArrowIcon } from "../Icon/index.
|
|
10
|
+
import { I as Icon, A as ArrowIcon } from "../Icon/index.8c744412.js";
|
|
13
11
|
import { T as Typography } from "../mui_extended/Typography/index.379dd374.js";
|
|
14
12
|
import clsx from "clsx";
|
|
15
13
|
import { useLocation } from "react-router-dom";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
14
|
+
import { I as Image } from "../Image/index.39b3b9d9.js";
|
|
15
|
+
import { I as IconButton } from "../mui_extended/IconButton/index.383f5496.js";
|
|
18
16
|
import { useResponsive } from "@m4l/styles";
|
|
19
17
|
const SideBarRoot = styled("div")(({
|
|
20
18
|
theme
|
|
@@ -33,11 +31,9 @@ styled("div", {
|
|
|
33
31
|
const WrapperSideBar = styled("div", {
|
|
34
32
|
shouldForwardProp: (props) => props !== "width" && props !== "visible"
|
|
35
33
|
})(({
|
|
36
|
-
width,
|
|
37
34
|
visible,
|
|
38
35
|
theme
|
|
39
36
|
}) => ({
|
|
40
|
-
width,
|
|
41
37
|
transition: theme.transitions.create("width", {
|
|
42
38
|
duration: theme.transitions.duration.shorter
|
|
43
39
|
}),
|
|
@@ -47,23 +43,6 @@ const WrapperSideBar = styled("div", {
|
|
|
47
43
|
opacity: 0
|
|
48
44
|
}
|
|
49
45
|
}));
|
|
50
|
-
const WrapperContentDesktop = styled$1("div")(() => ({
|
|
51
|
-
display: "flex",
|
|
52
|
-
flexDirection: "column",
|
|
53
|
-
height: "100%",
|
|
54
|
-
"& .m4l_image": {
|
|
55
|
-
display: "flex",
|
|
56
|
-
flexDirection: "row",
|
|
57
|
-
justifyContent: "center",
|
|
58
|
-
alignItems: "center"
|
|
59
|
-
}
|
|
60
|
-
}));
|
|
61
|
-
const CollapseButtonRoot = styled$1("div")(() => ({
|
|
62
|
-
display: "flex"
|
|
63
|
-
}));
|
|
64
|
-
styled$1("div")(() => ({
|
|
65
|
-
display: "flex"
|
|
66
|
-
}));
|
|
67
46
|
const componentName = "M4LSideBar";
|
|
68
47
|
generateUtilityClasses(
|
|
69
48
|
componentName,
|
|
@@ -72,7 +51,9 @@ generateUtilityClasses(
|
|
|
72
51
|
"containerSideBarLogo",
|
|
73
52
|
"contentDesktop",
|
|
74
53
|
"contentMobile",
|
|
54
|
+
"footer",
|
|
75
55
|
"collapseButton",
|
|
56
|
+
"collapseButtonSecondary",
|
|
76
57
|
"containerLogo",
|
|
77
58
|
"contentGroups",
|
|
78
59
|
"wrapperGroup",
|
|
@@ -87,24 +68,27 @@ generateUtilityClasses(
|
|
|
87
68
|
"skeleton",
|
|
88
69
|
"lineLeft",
|
|
89
70
|
"wrapperSideBar",
|
|
71
|
+
"areaExpandMenu",
|
|
90
72
|
"navItemMainTriangleTop",
|
|
91
73
|
"navItemMainTriangleBottom",
|
|
92
74
|
"navItemRootContentIconTypo",
|
|
93
75
|
"navSubItemContentBullet",
|
|
94
76
|
"containerLogoButtonLogo",
|
|
95
|
-
"containerLogoButtonIcon",
|
|
96
77
|
"collapseButtontriangleTop",
|
|
97
78
|
"collapseButtontriangleBottom",
|
|
98
79
|
"subItemCollapseActive",
|
|
80
|
+
"containerContentGroupsFooter",
|
|
99
81
|
"contentGroupsLine",
|
|
100
82
|
"drawer",
|
|
101
83
|
"popover",
|
|
84
|
+
"wrapperLogoFooter",
|
|
102
85
|
"collapsed",
|
|
103
86
|
"visible",
|
|
104
87
|
"subItemActive",
|
|
105
88
|
"itemMainActive",
|
|
106
89
|
"variantDefault",
|
|
107
|
-
"variantComercial"
|
|
90
|
+
"variantComercial",
|
|
91
|
+
"overlapping"
|
|
108
92
|
]
|
|
109
93
|
);
|
|
110
94
|
const getSideBarClassesByState = (ownerState) => {
|
|
@@ -113,7 +97,9 @@ const getSideBarClassesByState = (ownerState) => {
|
|
|
113
97
|
containerSideBarLogo: ["containerSideBarLogo"],
|
|
114
98
|
contentDesktop: ["contentDesktop"],
|
|
115
99
|
contentMobile: ["contentMobile"],
|
|
100
|
+
footer: ["footer"],
|
|
116
101
|
collapseButton: ["collapseButton"],
|
|
102
|
+
collapseButtonSecondary: ["collapseButtonSecondary"],
|
|
117
103
|
containerLogo: ["containerLogo"],
|
|
118
104
|
contentGroups: ["contentGroups"],
|
|
119
105
|
wrapperGroup: ["wrapperGroup"],
|
|
@@ -129,19 +115,22 @@ const getSideBarClassesByState = (ownerState) => {
|
|
|
129
115
|
subItemActive: ["subItemActive"],
|
|
130
116
|
lineLeft: ["lineLeft"],
|
|
131
117
|
wrapperSideBar: ["wrapperSideBar"],
|
|
118
|
+
areaExpandMenu: ["areaExpandMenu"],
|
|
132
119
|
itemMainActive: ["itemMainActive"],
|
|
133
120
|
navItemMainTriangleTop: ["navItemMainTriangleTop"],
|
|
134
121
|
navItemMainTriangleBottom: ["navItemMainTriangleBottom"],
|
|
135
122
|
navItemRootContentIconTypo: ["navItemRootContentIconTypo"],
|
|
136
123
|
navSubItemContentBullet: ["navSubItemContentBullet"],
|
|
137
124
|
containerLogoButtonLogo: ["containerLogoButtonLogo"],
|
|
138
|
-
containerLogoButtonIcon: ["containerLogoButtonIcon"],
|
|
139
125
|
collapseButtontriangleTop: ["collapseButtontriangleTop"],
|
|
140
126
|
collapseButtontriangleBottom: ["collapseButtontriangleBottom"],
|
|
141
127
|
subItemCollapseActive: ["subItemCollapseActive"],
|
|
128
|
+
containerContentGroupsFooter: ["containerContentGroupsFooter"],
|
|
142
129
|
contentGroupsLine: ["contentGroupsLine"],
|
|
143
130
|
drawer: ["drawer", ownerState.variantStyle === "variantDefault" && "variantDefault", ownerState.variantStyle === "variantComercial" && "variantComercial"],
|
|
144
|
-
popover: ["popover", ownerState.variantStyle === "variantDefault" && "variantDefault", ownerState.variantStyle === "variantComercial" && "variantComercial"]
|
|
131
|
+
popover: ["popover", ownerState.variantStyle === "variantDefault" && "variantDefault", ownerState.variantStyle === "variantComercial" && "variantComercial"],
|
|
132
|
+
overlapping: ["overlapping"],
|
|
133
|
+
wrapperLogoFooter: ["wrapperLogoFooter"]
|
|
145
134
|
};
|
|
146
135
|
const composedClasses = unstable_composeClasses(slots, getComponentUtilityClass(componentName), {});
|
|
147
136
|
return {
|
|
@@ -155,14 +144,16 @@ const initialState = {
|
|
|
155
144
|
},
|
|
156
145
|
onToggleVisible: () => {
|
|
157
146
|
},
|
|
147
|
+
onToggleOverlay: () => {
|
|
148
|
+
},
|
|
149
|
+
overlay: false,
|
|
158
150
|
menuData: [],
|
|
159
151
|
companyLogoNormalUrl: "",
|
|
160
152
|
companyLogoSmallUrl: "",
|
|
161
153
|
onClick: () => {
|
|
162
154
|
},
|
|
163
155
|
isItemActive: () => false,
|
|
164
|
-
|
|
165
|
-
unCollapsedWidht: "",
|
|
156
|
+
expandedWidth: "",
|
|
166
157
|
classes: getSideBarClassesByState({
|
|
167
158
|
collapsed: false,
|
|
168
159
|
visible: true
|
|
@@ -175,6 +166,10 @@ const SideBarProvider = (props) => {
|
|
|
175
166
|
value,
|
|
176
167
|
children
|
|
177
168
|
} = props;
|
|
169
|
+
const [overlay, setOverlay] = useState(false);
|
|
170
|
+
const onToggleOverlay = (value2) => {
|
|
171
|
+
setOverlay(value2);
|
|
172
|
+
};
|
|
178
173
|
const {
|
|
179
174
|
collapsed,
|
|
180
175
|
visible,
|
|
@@ -185,11 +180,11 @@ const SideBarProvider = (props) => {
|
|
|
185
180
|
companyLogoNormalUrl,
|
|
186
181
|
companyLogoSmallUrl,
|
|
187
182
|
isItemActive,
|
|
188
|
-
|
|
189
|
-
unCollapsedWidht,
|
|
183
|
+
expandedWidth,
|
|
190
184
|
classes,
|
|
191
185
|
companyName
|
|
192
186
|
} = value;
|
|
187
|
+
console.log("status collapsed", collapsed);
|
|
193
188
|
return /* @__PURE__ */ jsx(SideBarContext.Provider, {
|
|
194
189
|
value: {
|
|
195
190
|
collapsed,
|
|
@@ -201,10 +196,11 @@ const SideBarProvider = (props) => {
|
|
|
201
196
|
companyLogoNormalUrl,
|
|
202
197
|
companyLogoSmallUrl,
|
|
203
198
|
isItemActive,
|
|
204
|
-
|
|
205
|
-
unCollapsedWidht,
|
|
199
|
+
expandedWidth,
|
|
206
200
|
classes,
|
|
207
|
-
companyName
|
|
201
|
+
companyName,
|
|
202
|
+
onToggleOverlay,
|
|
203
|
+
overlay
|
|
208
204
|
},
|
|
209
205
|
children
|
|
210
206
|
});
|
|
@@ -215,51 +211,7 @@ const SIDEBAR_PREFIX = "M4LSideBar";
|
|
|
215
211
|
const getNameDataTestId = (KEY) => {
|
|
216
212
|
return `${SIDEBAR_PREFIX}-${KEY}`;
|
|
217
213
|
};
|
|
218
|
-
|
|
219
|
-
const {
|
|
220
|
-
onToggleCollapse,
|
|
221
|
-
collapsed
|
|
222
|
-
} = props;
|
|
223
|
-
const {
|
|
224
|
-
host_static_assets,
|
|
225
|
-
environment_assets
|
|
226
|
-
} = useEnvironment();
|
|
227
|
-
const {
|
|
228
|
-
classes,
|
|
229
|
-
companyLogoNormalUrl
|
|
230
|
-
} = useSideBar$1();
|
|
231
|
-
const handleButtonClick = () => {
|
|
232
|
-
onToggleCollapse();
|
|
233
|
-
};
|
|
234
|
-
return /* @__PURE__ */ jsxs(CollapseButtonRoot, {
|
|
235
|
-
className: classes.collapseButton,
|
|
236
|
-
...process.env.NODE_ENV !== "production" ? {
|
|
237
|
-
[TEST_PROP_ID]: getNameDataTestId("collapseButton")
|
|
238
|
-
} : {},
|
|
239
|
-
children: [!collapsed && /* @__PURE__ */ jsx("div", {
|
|
240
|
-
className: classes.containerLogoButtonLogo,
|
|
241
|
-
children: /* @__PURE__ */ jsx(Image, {
|
|
242
|
-
width: "100%",
|
|
243
|
-
height: "100%",
|
|
244
|
-
src: companyLogoNormalUrl || "",
|
|
245
|
-
alt: "logo"
|
|
246
|
-
}, "Logo")
|
|
247
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
248
|
-
className: classes.containerLogoButtonIcon,
|
|
249
|
-
style: {
|
|
250
|
-
transform: `rotate(${collapsed ? 0 : 180}deg)`
|
|
251
|
-
},
|
|
252
|
-
children: /* @__PURE__ */ jsx(
|
|
253
|
-
IconButton,
|
|
254
|
-
{
|
|
255
|
-
onClick: handleButtonClick,
|
|
256
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/sidebar/assets/icons/arrow_right.svg`
|
|
257
|
-
}
|
|
258
|
-
)
|
|
259
|
-
})]
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
const WrapperGroup = styled$1("ul")(({
|
|
214
|
+
const WrapperGroup = styled("ul")(({
|
|
263
215
|
theme
|
|
264
216
|
}) => ({
|
|
265
217
|
display: "flex",
|
|
@@ -269,15 +221,12 @@ const WrapperGroup = styled$1("ul")(({
|
|
|
269
221
|
listStyle: "none",
|
|
270
222
|
padding: "0px"
|
|
271
223
|
}));
|
|
272
|
-
const ContentGroupsRoot = styled
|
|
224
|
+
const ContentGroupsRoot = styled("ul")(() => ({
|
|
273
225
|
display: "flex",
|
|
274
226
|
width: "100%",
|
|
275
227
|
height: "100%"
|
|
276
228
|
}));
|
|
277
|
-
const WrapperGroupTitle = styled
|
|
278
|
-
shouldForwardProp: (props) => props !== "collapsed"
|
|
279
|
-
})(({
|
|
280
|
-
collapsed,
|
|
229
|
+
const WrapperGroupTitle = styled("li")(({
|
|
281
230
|
theme
|
|
282
231
|
}) => ({
|
|
283
232
|
...theme.typography.overline,
|
|
@@ -287,14 +236,9 @@ const WrapperGroupTitle = styled$1("li", {
|
|
|
287
236
|
color: theme.palette.text.primary,
|
|
288
237
|
transition: theme.transitions.create("opacity", {
|
|
289
238
|
duration: theme.transitions.duration.shorter
|
|
290
|
-
})
|
|
291
|
-
...collapsed && {
|
|
292
|
-
opacity: 0,
|
|
293
|
-
width: 0,
|
|
294
|
-
overflow: "hidden"
|
|
295
|
-
}
|
|
239
|
+
})
|
|
296
240
|
}));
|
|
297
|
-
const NavItemMainRoot = styled("div", {
|
|
241
|
+
const NavItemMainRoot = styled$1("div", {
|
|
298
242
|
shouldForwardProp: (prop) => prop !== "activeRoot"
|
|
299
243
|
})(({
|
|
300
244
|
activeRoot,
|
|
@@ -306,7 +250,7 @@ const NavItemMainRoot = styled("div", {
|
|
|
306
250
|
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity)
|
|
307
251
|
}
|
|
308
252
|
}));
|
|
309
|
-
styled(ListItemText, {
|
|
253
|
+
styled$1(ListItemText, {
|
|
310
254
|
shouldForwardProp: (prop) => prop !== "isCollapse"
|
|
311
255
|
})(({
|
|
312
256
|
isCollapse,
|
|
@@ -321,28 +265,6 @@ styled(ListItemText, {
|
|
|
321
265
|
opacity: 0
|
|
322
266
|
}
|
|
323
267
|
}));
|
|
324
|
-
const NavItemMainContentRoot = styled$1("div", {
|
|
325
|
-
shouldForwardProp: (props) => props !== "collapsed"
|
|
326
|
-
})(({
|
|
327
|
-
collapsed
|
|
328
|
-
}) => ({
|
|
329
|
-
...collapsed && {
|
|
330
|
-
padding: "0",
|
|
331
|
-
display: "block"
|
|
332
|
-
},
|
|
333
|
-
"& .M4LTypography-root": {
|
|
334
|
-
...collapsed && {
|
|
335
|
-
width: 0,
|
|
336
|
-
opacity: 0
|
|
337
|
-
}
|
|
338
|
-
},
|
|
339
|
-
"& .m4l_icon": {
|
|
340
|
-
...collapsed && {
|
|
341
|
-
width: "100%",
|
|
342
|
-
height: "100%"
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
}));
|
|
346
268
|
const NavItemMainContent = (props) => {
|
|
347
269
|
const {
|
|
348
270
|
item,
|
|
@@ -361,7 +283,6 @@ const NavItemMainContent = (props) => {
|
|
|
361
283
|
environment_assets
|
|
362
284
|
} = useEnvironment();
|
|
363
285
|
const {
|
|
364
|
-
collapsed,
|
|
365
286
|
classes
|
|
366
287
|
} = useSideBar$1();
|
|
367
288
|
const isDesktop = useResponsiveDesktop();
|
|
@@ -370,34 +291,82 @@ const NavItemMainContent = (props) => {
|
|
|
370
291
|
handlerOpen && handlerOpen(event);
|
|
371
292
|
!isDesktop && changeVisible && changeVisible();
|
|
372
293
|
};
|
|
373
|
-
return /* @__PURE__ */
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
})]
|
|
390
|
-
}), !collapsed && children ? /* @__PURE__ */ jsx(ArrowIcon, {
|
|
391
|
-
openState: open
|
|
392
|
-
}) : null]
|
|
393
|
-
})
|
|
294
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
295
|
+
className: classes.navItemRootContent,
|
|
296
|
+
id: "WrapperNavItemRootContent",
|
|
297
|
+
onClick: handlerClick,
|
|
298
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
299
|
+
className: classes.navItemRootContentIconTypo,
|
|
300
|
+
children: [icon ? /* @__PURE__ */ jsx(Icon, {
|
|
301
|
+
src: `${host_static_assets}/${environment_assets}/frontend/domain/microfrontends/${icon}`
|
|
302
|
+
}) : null, /* @__PURE__ */ jsx(Typography, {
|
|
303
|
+
variant: "paragraph",
|
|
304
|
+
color: "text.secondary",
|
|
305
|
+
children: title
|
|
306
|
+
})]
|
|
307
|
+
}), children ? /* @__PURE__ */ jsx(ArrowIcon, {
|
|
308
|
+
openState: open
|
|
309
|
+
}) : null]
|
|
394
310
|
});
|
|
395
311
|
};
|
|
396
|
-
|
|
312
|
+
function NavItemMain(props) {
|
|
313
|
+
const {
|
|
314
|
+
item,
|
|
315
|
+
setOpen,
|
|
316
|
+
open
|
|
317
|
+
} = props;
|
|
318
|
+
const {
|
|
319
|
+
children
|
|
320
|
+
} = item;
|
|
321
|
+
const {
|
|
322
|
+
onClick,
|
|
323
|
+
isItemActive,
|
|
324
|
+
onToggleVisible,
|
|
325
|
+
classes
|
|
326
|
+
} = useSideBar$1();
|
|
327
|
+
const active = isItemActive(item);
|
|
328
|
+
if (children) {
|
|
329
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
330
|
+
children: /* @__PURE__ */ jsx(NavItemMainRoot, {
|
|
331
|
+
className: classes.navItemMainRoot,
|
|
332
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
333
|
+
[TEST_PROP_ID]: getNameDataTestId("navItemMainRoot")
|
|
334
|
+
} : {},
|
|
335
|
+
onClick: () => setOpen((lastOpen) => !lastOpen),
|
|
336
|
+
activeRoot: active,
|
|
337
|
+
children: /* @__PURE__ */ jsx(NavItemMainContent, {
|
|
338
|
+
item,
|
|
339
|
+
open
|
|
340
|
+
})
|
|
341
|
+
})
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
return /* @__PURE__ */ jsx(NavItemMainRoot, {
|
|
345
|
+
activeRoot: active,
|
|
346
|
+
className: classes.navItemMainRoot,
|
|
347
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
348
|
+
[TEST_PROP_ID]: getNameDataTestId("navItemMainRoot")
|
|
349
|
+
} : {},
|
|
350
|
+
children: /* @__PURE__ */ jsx(NavItemMainContent, {
|
|
351
|
+
item,
|
|
352
|
+
onClick,
|
|
353
|
+
changeVisible: onToggleVisible,
|
|
354
|
+
open
|
|
355
|
+
})
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
const ContainerListSubItem = styled("div")(({
|
|
359
|
+
theme
|
|
360
|
+
}) => ({
|
|
361
|
+
width: "100%",
|
|
362
|
+
height: "auto",
|
|
363
|
+
paddingLeft: theme.spacing(2.75)
|
|
364
|
+
}));
|
|
365
|
+
const NavListSubItemRoot = styled("div")(() => ({
|
|
397
366
|
display: "flex",
|
|
398
367
|
flexDirection: "column"
|
|
399
368
|
}));
|
|
400
|
-
const NavSubItemContentRoot = styled
|
|
369
|
+
const NavSubItemContentRoot = styled(ListItemButton)(({
|
|
401
370
|
theme
|
|
402
371
|
}) => ({
|
|
403
372
|
display: "flex",
|
|
@@ -409,7 +378,7 @@ const NavSubItemContentRoot = styled$1(ListItemButton)(({
|
|
|
409
378
|
marginRight: theme.spacing(1)
|
|
410
379
|
}
|
|
411
380
|
}));
|
|
412
|
-
styled
|
|
381
|
+
styled("span", {
|
|
413
382
|
shouldForwardProp: (props) => props !== "active"
|
|
414
383
|
})(({
|
|
415
384
|
theme,
|
|
@@ -572,107 +541,11 @@ function NavListSubItem(props) {
|
|
|
572
541
|
})
|
|
573
542
|
});
|
|
574
543
|
}
|
|
575
|
-
function NavItemMain(props) {
|
|
576
|
-
const {
|
|
577
|
-
item,
|
|
578
|
-
setOpen,
|
|
579
|
-
open
|
|
580
|
-
} = props;
|
|
581
|
-
const {
|
|
582
|
-
children
|
|
583
|
-
} = item;
|
|
584
|
-
const {
|
|
585
|
-
collapsed,
|
|
586
|
-
onClick,
|
|
587
|
-
isItemActive,
|
|
588
|
-
onToggleVisible,
|
|
589
|
-
classes
|
|
590
|
-
} = useSideBar$1();
|
|
591
|
-
const [popoverStatus, setPopoverStatus] = useState(null);
|
|
592
|
-
const theme = useTheme();
|
|
593
|
-
const active = isItemActive(item);
|
|
594
|
-
const handleOpen = (event) => {
|
|
595
|
-
setPopoverStatus(event.currentTarget);
|
|
596
|
-
};
|
|
597
|
-
const handleClose = () => {
|
|
598
|
-
setPopoverStatus(null);
|
|
599
|
-
};
|
|
600
|
-
if (children) {
|
|
601
|
-
return /* @__PURE__ */ jsxs(Fragment, {
|
|
602
|
-
children: [collapsed && /* @__PURE__ */ jsxs(NavItemMainRoot, {
|
|
603
|
-
activeRoot: active,
|
|
604
|
-
className: classes.navItemMainRoot,
|
|
605
|
-
...process.env.NODE_ENV !== "production" ? {
|
|
606
|
-
[TEST_PROP_ID]: getNameDataTestId("navItemMainRoot")
|
|
607
|
-
} : {},
|
|
608
|
-
children: [/* @__PURE__ */ jsx(NavItemMainContent, {
|
|
609
|
-
item,
|
|
610
|
-
handlerOpen: handleOpen,
|
|
611
|
-
open
|
|
612
|
-
}), /* @__PURE__ */ jsx(Popover, {
|
|
613
|
-
className: classes.popover,
|
|
614
|
-
open: Boolean(popoverStatus),
|
|
615
|
-
anchorEl: popoverStatus,
|
|
616
|
-
onClose: handleClose,
|
|
617
|
-
arrowType: "left-center",
|
|
618
|
-
sx: {
|
|
619
|
-
...theme.components?.M4LSideBarPopover?.styleOverrides,
|
|
620
|
-
ml: "14px"
|
|
621
|
-
},
|
|
622
|
-
anchorOrigin: {
|
|
623
|
-
vertical: "center",
|
|
624
|
-
horizontal: "right"
|
|
625
|
-
},
|
|
626
|
-
transformOrigin: {
|
|
627
|
-
vertical: "center",
|
|
628
|
-
horizontal: "left"
|
|
629
|
-
},
|
|
630
|
-
children: (item.children || []).map((itemList) => /* @__PURE__ */ jsx(NavListSubItem, {
|
|
631
|
-
item: itemList,
|
|
632
|
-
closePopover: handleClose
|
|
633
|
-
}, itemList.title))
|
|
634
|
-
})]
|
|
635
|
-
}), !collapsed && /* @__PURE__ */ jsx(NavItemMainRoot, {
|
|
636
|
-
className: classes.navItemMainRoot,
|
|
637
|
-
...process.env.NODE_ENV !== "production" ? {
|
|
638
|
-
[TEST_PROP_ID]: getNameDataTestId("navItemMainRoot")
|
|
639
|
-
} : {},
|
|
640
|
-
onClick: () => setOpen((lastOpen) => !lastOpen),
|
|
641
|
-
activeRoot: active,
|
|
642
|
-
children: /* @__PURE__ */ jsx(NavItemMainContent, {
|
|
643
|
-
item,
|
|
644
|
-
open
|
|
645
|
-
})
|
|
646
|
-
})]
|
|
647
|
-
});
|
|
648
|
-
}
|
|
649
|
-
return /* @__PURE__ */ jsx(NavItemMainRoot, {
|
|
650
|
-
activeRoot: active,
|
|
651
|
-
className: classes.navItemMainRoot,
|
|
652
|
-
...process.env.NODE_ENV !== "production" ? {
|
|
653
|
-
[TEST_PROP_ID]: getNameDataTestId("navItemMainRoot")
|
|
654
|
-
} : {},
|
|
655
|
-
children: /* @__PURE__ */ jsx(NavItemMainContent, {
|
|
656
|
-
item,
|
|
657
|
-
onClick,
|
|
658
|
-
changeVisible: onToggleVisible,
|
|
659
|
-
open
|
|
660
|
-
})
|
|
661
|
-
});
|
|
662
|
-
}
|
|
663
|
-
const ContainerListSubItem = styled$1("div")(({
|
|
664
|
-
theme
|
|
665
|
-
}) => ({
|
|
666
|
-
width: "100%",
|
|
667
|
-
height: "auto",
|
|
668
|
-
paddingLeft: theme.spacing(2.75)
|
|
669
|
-
}));
|
|
670
544
|
function ItemListMain(props) {
|
|
671
545
|
const {
|
|
672
546
|
list
|
|
673
547
|
} = props;
|
|
674
548
|
const {
|
|
675
|
-
collapsed: isSideBarCollapsed,
|
|
676
549
|
isItemActive,
|
|
677
550
|
classes
|
|
678
551
|
} = useSideBar$1();
|
|
@@ -727,7 +600,7 @@ function ItemListMain(props) {
|
|
|
727
600
|
item: list,
|
|
728
601
|
open,
|
|
729
602
|
setOpen
|
|
730
|
-
}),
|
|
603
|
+
}), /* @__PURE__ */ jsx(Collapse, {
|
|
731
604
|
in: open,
|
|
732
605
|
timeout: "auto",
|
|
733
606
|
unmountOnExit: true,
|
|
@@ -756,101 +629,8 @@ function ItemListMain(props) {
|
|
|
756
629
|
})
|
|
757
630
|
});
|
|
758
631
|
}
|
|
759
|
-
const WrapperSKTNavSectionVertical = styled$1("div", {
|
|
760
|
-
shouldForwardProp: (props) => props !== "collapse"
|
|
761
|
-
})(() => ({
|
|
762
|
-
margin: "0",
|
|
763
|
-
padding: "0",
|
|
764
|
-
position: "relative",
|
|
765
|
-
height: "100%"
|
|
766
|
-
}));
|
|
767
|
-
const NavSectionVerticalItem = styled$1("div")(() => ({
|
|
768
|
-
display: "grid",
|
|
769
|
-
gridTemplateColumns: "16px 1fr",
|
|
770
|
-
gap: "8px",
|
|
771
|
-
alignItems: "center",
|
|
772
|
-
width: "100%",
|
|
773
|
-
padding: "8px",
|
|
774
|
-
height: "36px"
|
|
775
|
-
}));
|
|
776
|
-
const NavSectionVerticalTitle = styled$1("div")(() => ({
|
|
777
|
-
display: "flex",
|
|
778
|
-
justifyContent: "flex-start",
|
|
779
|
-
height: "60px",
|
|
780
|
-
padding: "20px",
|
|
781
|
-
alignItems: "center"
|
|
782
|
-
}));
|
|
783
|
-
const NavSectionVerticalItemDivider = styled$1("div")(({
|
|
784
|
-
theme
|
|
785
|
-
}) => ({
|
|
786
|
-
display: "flex",
|
|
787
|
-
height: "2px",
|
|
788
|
-
marginRight: "14px",
|
|
789
|
-
backgroundColor: theme.palette.state?.default
|
|
790
|
-
}));
|
|
791
|
-
const SkeletonNavSectionVertical = () => {
|
|
792
|
-
const {
|
|
793
|
-
collapsed,
|
|
794
|
-
classes
|
|
795
|
-
} = useSideBar$1();
|
|
796
|
-
return /* @__PURE__ */ jsxs(WrapperSKTNavSectionVertical, {
|
|
797
|
-
collapse: collapsed,
|
|
798
|
-
className: classes.skeleton,
|
|
799
|
-
...process.env.NODE_ENV !== "production" ? {
|
|
800
|
-
[TEST_PROP_ID]: getNameDataTestId("skeleton")
|
|
801
|
-
} : {},
|
|
802
|
-
children: [/* @__PURE__ */ jsx(NavSectionVerticalItemDivider, {}), /* @__PURE__ */ jsx(NavSectionVerticalTitle, {
|
|
803
|
-
children: !collapsed && /* @__PURE__ */ jsx(Skeleton, {
|
|
804
|
-
variant: "text",
|
|
805
|
-
height: "20px",
|
|
806
|
-
width: "80px"
|
|
807
|
-
})
|
|
808
|
-
}), /* @__PURE__ */ jsxs(NavSectionVerticalItem, {
|
|
809
|
-
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
810
|
-
variant: "circular",
|
|
811
|
-
width: "16px",
|
|
812
|
-
height: "16px"
|
|
813
|
-
}), !collapsed && /* @__PURE__ */ jsx(Skeleton, {
|
|
814
|
-
variant: "text",
|
|
815
|
-
height: "20px",
|
|
816
|
-
width: "40%"
|
|
817
|
-
})]
|
|
818
|
-
}), /* @__PURE__ */ jsxs(NavSectionVerticalItem, {
|
|
819
|
-
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
820
|
-
variant: "circular",
|
|
821
|
-
width: "16px",
|
|
822
|
-
height: "16px"
|
|
823
|
-
}), !collapsed && /* @__PURE__ */ jsx(Skeleton, {
|
|
824
|
-
variant: "text",
|
|
825
|
-
height: "20px",
|
|
826
|
-
width: "70%"
|
|
827
|
-
})]
|
|
828
|
-
}), /* @__PURE__ */ jsxs(NavSectionVerticalItem, {
|
|
829
|
-
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
830
|
-
variant: "circular",
|
|
831
|
-
width: "16px",
|
|
832
|
-
height: "16px"
|
|
833
|
-
}), !collapsed && /* @__PURE__ */ jsx(Skeleton, {
|
|
834
|
-
variant: "text",
|
|
835
|
-
height: "20px",
|
|
836
|
-
width: "30%"
|
|
837
|
-
})]
|
|
838
|
-
}), /* @__PURE__ */ jsxs(NavSectionVerticalItem, {
|
|
839
|
-
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
840
|
-
variant: "circular",
|
|
841
|
-
width: "16px",
|
|
842
|
-
height: "16px"
|
|
843
|
-
}), !collapsed && /* @__PURE__ */ jsx(Skeleton, {
|
|
844
|
-
variant: "text",
|
|
845
|
-
height: "20px",
|
|
846
|
-
width: "50%"
|
|
847
|
-
})]
|
|
848
|
-
})]
|
|
849
|
-
});
|
|
850
|
-
};
|
|
851
632
|
const ContentGroups = () => {
|
|
852
633
|
const {
|
|
853
|
-
collapsed,
|
|
854
634
|
menuData,
|
|
855
635
|
classes
|
|
856
636
|
} = useSideBar$1();
|
|
@@ -863,88 +643,148 @@ const ContentGroups = () => {
|
|
|
863
643
|
} : {},
|
|
864
644
|
children: [/* @__PURE__ */ jsx("div", {
|
|
865
645
|
className: classes.contentGroupsLine
|
|
866
|
-
}), /* @__PURE__ */
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
id
|
|
894
|
-
}, id))
|
|
895
|
-
})
|
|
896
|
-
})]
|
|
897
|
-
}, group.title))
|
|
898
|
-
})
|
|
899
|
-
})]
|
|
646
|
+
}), menuData.map((group) => /* @__PURE__ */ jsxs(WrapperGroup, {
|
|
647
|
+
className: classes.wrapperGroup,
|
|
648
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
649
|
+
[TEST_PROP_ID]: getNameDataTestId("wrapperGroup")
|
|
650
|
+
} : {},
|
|
651
|
+
children: [/* @__PURE__ */ jsx(WrapperGroupTitle, {
|
|
652
|
+
className: classes.wrapperGroupTitle,
|
|
653
|
+
children: /* @__PURE__ */ jsx(Typography, {
|
|
654
|
+
variant: "paragraphDens",
|
|
655
|
+
skeletonWidth: "100px",
|
|
656
|
+
children: group.title
|
|
657
|
+
})
|
|
658
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
659
|
+
style: {
|
|
660
|
+
display: "flex",
|
|
661
|
+
flexDirection: "column",
|
|
662
|
+
width: "100%",
|
|
663
|
+
height: "auto"
|
|
664
|
+
},
|
|
665
|
+
children: group.children?.map((list, id) => /* @__PURE__ */ jsx(ItemListMain, {
|
|
666
|
+
list,
|
|
667
|
+
itemMainActive,
|
|
668
|
+
setItemMainActive,
|
|
669
|
+
id
|
|
670
|
+
}, id))
|
|
671
|
+
})]
|
|
672
|
+
}, group.title))]
|
|
900
673
|
});
|
|
901
674
|
}
|
|
902
|
-
return
|
|
675
|
+
return null;
|
|
903
676
|
};
|
|
904
|
-
const
|
|
677
|
+
const CollapseButtonRoot = styled("div")(() => ({
|
|
678
|
+
display: "flex"
|
|
679
|
+
}));
|
|
680
|
+
styled("div")(() => ({
|
|
681
|
+
display: "flex"
|
|
682
|
+
}));
|
|
683
|
+
function FooterSidebar(_props) {
|
|
684
|
+
const {
|
|
685
|
+
classes,
|
|
686
|
+
companyLogoNormalUrl
|
|
687
|
+
} = useSideBar$1();
|
|
688
|
+
return /* @__PURE__ */ jsx(CollapseButtonRoot, {
|
|
689
|
+
className: classes.footer,
|
|
690
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
691
|
+
[TEST_PROP_ID]: getNameDataTestId("footer")
|
|
692
|
+
} : {},
|
|
693
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
694
|
+
className: classes.wrapperLogoFooter,
|
|
695
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
696
|
+
className: classes.containerLogoButtonLogo,
|
|
697
|
+
children: /* @__PURE__ */ jsx(Image, {
|
|
698
|
+
width: "192px",
|
|
699
|
+
height: "28px",
|
|
700
|
+
src: companyLogoNormalUrl || "",
|
|
701
|
+
alt: "logo"
|
|
702
|
+
}, "Logo")
|
|
703
|
+
})
|
|
704
|
+
})
|
|
705
|
+
});
|
|
706
|
+
}
|
|
707
|
+
const MENU_COLLAPSED_SIZE = "14px";
|
|
708
|
+
const MENU_COLLAPSED_CONTAINER_SIZE = "15px";
|
|
709
|
+
const ContentComponent = () => {
|
|
905
710
|
const {
|
|
906
711
|
collapsed,
|
|
907
712
|
onToggleCollapse,
|
|
908
|
-
companyLogoSmallUrl,
|
|
909
713
|
classes,
|
|
910
|
-
|
|
714
|
+
onToggleOverlay,
|
|
715
|
+
overlay
|
|
911
716
|
} = useSideBar$1();
|
|
912
|
-
|
|
913
|
-
|
|
717
|
+
const handlerOnMouseEnter = () => {
|
|
718
|
+
if (collapsed) {
|
|
719
|
+
onToggleOverlay(true);
|
|
720
|
+
}
|
|
721
|
+
};
|
|
722
|
+
const handlerOnMouseLeave = () => {
|
|
723
|
+
if (collapsed) {
|
|
724
|
+
onToggleOverlay(false);
|
|
725
|
+
}
|
|
726
|
+
};
|
|
727
|
+
const handlerOnMouseEnterIconButton = () => {
|
|
728
|
+
if (collapsed && overlay) {
|
|
729
|
+
onToggleOverlay(true);
|
|
730
|
+
}
|
|
731
|
+
};
|
|
732
|
+
const handlerOnMouseLeaveIconButton = () => {
|
|
733
|
+
if (collapsed && overlay) {
|
|
734
|
+
onToggleOverlay(false);
|
|
735
|
+
}
|
|
736
|
+
};
|
|
737
|
+
const handleButtonClick = () => {
|
|
738
|
+
onToggleCollapse();
|
|
739
|
+
};
|
|
740
|
+
const {
|
|
741
|
+
host_static_assets,
|
|
742
|
+
environment_assets
|
|
743
|
+
} = useEnvironment();
|
|
744
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
745
|
+
className: clsx(classes.contentDesktop, overlay && classes.overlapping),
|
|
914
746
|
...process.env.NODE_ENV !== "production" ? {
|
|
915
747
|
[TEST_PROP_ID]: getNameDataTestId("contentDesktop")
|
|
916
748
|
} : {},
|
|
917
|
-
children: [
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
width: collapsed ? "0px" : "auto"
|
|
937
|
-
},
|
|
938
|
-
children: companyName
|
|
939
|
-
}) : null]
|
|
940
|
-
})
|
|
941
|
-
}) : null, /* @__PURE__ */ jsx(ContentGroups, {}), /* @__PURE__ */ jsx(CollapseButton, {
|
|
942
|
-
onToggleCollapse,
|
|
943
|
-
collapsed
|
|
749
|
+
children: [/* @__PURE__ */ jsx(IconButton, {
|
|
750
|
+
variant: "line",
|
|
751
|
+
rotationAngle: !collapsed ? 180 : 0,
|
|
752
|
+
onClick: () => handleButtonClick(),
|
|
753
|
+
onMouseEnter: () => handlerOnMouseEnterIconButton(),
|
|
754
|
+
onMouseLeave: () => handlerOnMouseLeaveIconButton(),
|
|
755
|
+
className: classes.collapseButton,
|
|
756
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/sidebar/assets/icons/arrow_right.svg`
|
|
757
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
758
|
+
className: classes.containerContentGroupsFooter,
|
|
759
|
+
style: {
|
|
760
|
+
minWidth: MENU_COLLAPSED_CONTAINER_SIZE
|
|
761
|
+
},
|
|
762
|
+
onMouseEnter: () => handlerOnMouseEnter(),
|
|
763
|
+
onMouseLeave: () => handlerOnMouseLeave(),
|
|
764
|
+
children: [/* @__PURE__ */ jsx(ContentGroups, {}), /* @__PURE__ */ jsx(FooterSidebar, {
|
|
765
|
+
onToggleCollapse,
|
|
766
|
+
collapsed
|
|
767
|
+
})]
|
|
944
768
|
})]
|
|
945
769
|
});
|
|
946
770
|
};
|
|
947
|
-
const
|
|
771
|
+
const ContentDesktop = () => {
|
|
772
|
+
const {
|
|
773
|
+
classes,
|
|
774
|
+
collapsed,
|
|
775
|
+
expandedWidth,
|
|
776
|
+
overlay
|
|
777
|
+
} = useSideBar$1();
|
|
778
|
+
const areaExpandMenuSize = collapsed ? !overlay ? MENU_COLLAPSED_SIZE : expandedWidth : expandedWidth;
|
|
779
|
+
return /* @__PURE__ */ jsx("div", {
|
|
780
|
+
className: classes.areaExpandMenu,
|
|
781
|
+
style: {
|
|
782
|
+
width: areaExpandMenuSize
|
|
783
|
+
},
|
|
784
|
+
children: /* @__PURE__ */ jsx(ContentComponent, {})
|
|
785
|
+
});
|
|
786
|
+
};
|
|
787
|
+
const WrapperContentMobile = styled("div")(({
|
|
948
788
|
theme
|
|
949
789
|
}) => ({
|
|
950
790
|
"& .m4l_image": {
|
|
@@ -955,7 +795,7 @@ const WrapperContentMobile = styled$1("div")(({
|
|
|
955
795
|
flexShrink: 0
|
|
956
796
|
}
|
|
957
797
|
}));
|
|
958
|
-
styled
|
|
798
|
+
styled("div")(({
|
|
959
799
|
theme
|
|
960
800
|
}) => ({
|
|
961
801
|
width: "100%",
|
|
@@ -976,7 +816,7 @@ const ContentMobile = () => {
|
|
|
976
816
|
visible,
|
|
977
817
|
onToggleVisible,
|
|
978
818
|
companyLogoSmallUrl,
|
|
979
|
-
|
|
819
|
+
expandedWidth,
|
|
980
820
|
collapsed,
|
|
981
821
|
classes,
|
|
982
822
|
companyName
|
|
@@ -987,7 +827,7 @@ const ContentMobile = () => {
|
|
|
987
827
|
onClose: onToggleVisible,
|
|
988
828
|
PaperProps: {
|
|
989
829
|
sx: {
|
|
990
|
-
width:
|
|
830
|
+
width: expandedWidth
|
|
991
831
|
}
|
|
992
832
|
},
|
|
993
833
|
className: classes.drawer,
|
|
@@ -1042,12 +882,12 @@ const SideBar = (props) => {
|
|
|
1042
882
|
companyLogoNormalUrl,
|
|
1043
883
|
companyLogoSmallUrl,
|
|
1044
884
|
isItemActive,
|
|
1045
|
-
|
|
1046
|
-
unCollapsedWidht = "52px",
|
|
885
|
+
expandedWidth = "280px",
|
|
1047
886
|
companyName,
|
|
1048
887
|
variantStyle = "variantDefault"
|
|
1049
888
|
} = props;
|
|
1050
889
|
const isMobile = useResponsive("down", "md");
|
|
890
|
+
console.log("collapsed status", collapsed);
|
|
1051
891
|
const ownerState = {
|
|
1052
892
|
collapsed,
|
|
1053
893
|
visible,
|
|
@@ -1070,15 +910,16 @@ const SideBar = (props) => {
|
|
|
1070
910
|
companyLogoNormalUrl,
|
|
1071
911
|
companyLogoSmallUrl,
|
|
1072
912
|
isItemActive,
|
|
1073
|
-
|
|
1074
|
-
unCollapsedWidht,
|
|
913
|
+
expandedWidth,
|
|
1075
914
|
classes,
|
|
1076
915
|
companyName
|
|
1077
916
|
},
|
|
1078
917
|
children: /* @__PURE__ */ jsx(WrapperSideBar, {
|
|
1079
918
|
className: classes.wrapperSideBar,
|
|
1080
|
-
width: !collapsed ? collapsedWidht : unCollapsedWidht,
|
|
1081
919
|
visible,
|
|
920
|
+
style: {
|
|
921
|
+
width: collapsed ? MENU_COLLAPSED_SIZE : expandedWidth
|
|
922
|
+
},
|
|
1082
923
|
children: !isMobile ? /* @__PURE__ */ jsx(ContentDesktop, {}) : /* @__PURE__ */ jsx(ContentMobile, {})
|
|
1083
924
|
})
|
|
1084
925
|
})
|