@m4l/components 3.1.7 → 3.1.8
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/index.js +183 -340
- package/node_modules-CQtkw0uG.js +7350 -0
- package/package.json +1 -1
- package/vendor-AfIOyqRr.js +24636 -0
- package/components/AccountPopover/index-Dm2-k-Mv.js +0 -334
- package/components/AppBar/index-i0rhG3J1.js +0 -93
- package/components/BaseModule/index-CiNNlxzS.js +0 -30
- package/components/CommonActions/components/ActionCancel/index-CIdpDXkr.js +0 -12
- package/components/CommonActions/components/ActionFormCancel/index-CpyASN3q.js +0 -56
- package/components/CommonActions/components/ActionFormIntro/index-7KKtcUra.js +0 -33
- package/components/CommonActions/components/ActionIntro/index-CqqDZZcG.js +0 -25
- package/components/CommonActions/components/Actions/index-CuG1pnXW.js +0 -70
- package/components/DataGrid/constants-8L7QgBKi.js +0 -10
- package/components/DataGrid/formatters/ColumnBooleanFormatter/index-CveSCbq_.js +0 -26
- package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/index-CHqvieM2.js +0 -22
- package/components/DataGrid/formatters/ColumnDateFormatter/index-CKg8CJ6A.js +0 -19
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index-DE6bwaKP.js +0 -23
- package/components/DataGrid/formatters/ColumnNestedValueFormatter/index-BslXGK-A.js +0 -14
- package/components/DataGrid/formatters/ColumnPointsFormatter/index-BXGW2CsK.js +0 -10
- package/components/DataGrid/formatters/ColumnPriceFormatter/index-O11tBykn.js +0 -10
- package/components/DataGrid/formatters/ColumnSetCheckFormatter/index-BaCawLr1.js +0 -36
- package/components/DataGrid/formatters/ColumnUncertaintyFormatter/index-Cq7a-jnE.js +0 -10
- package/components/DataGrid/formatters/index-CrZXPa0e.js +0 -13
- package/components/DataGrid/index-BZ-lbmuU.js +0 -908
- package/components/DataGrid/subcomponents/Actions/index-CHvPZ4Ru.js +0 -549
- package/components/DataGrid/subcomponents/editors/TextEditor/index-BIFm8akr.js +0 -80
- package/components/DragResizeWindow/index-D2jLYExo.js +0 -505
- package/components/DynamicFilter/constants-ByqmFATV.js +0 -31
- package/components/DynamicFilter/dictionary-PrbXU3VZ.js +0 -51
- package/components/DynamicFilter/index-DZiJc9h7.js +0 -116
- package/components/DynamicFilter/slots/SlotsEnum-cawFeNzx.js +0 -34
- package/components/DynamicFilter/slots/dynamicFilterSlots-DHxelhXP.js +0 -151
- package/components/DynamicFilter/slots/index-l0sNRNKZ.js +0 -1
- package/components/DynamicFilter/store/index-BT-eWVnJ.js +0 -254
- package/components/DynamicFilter/subcomponents/AppliedFilterChip/index-B32bAzi-.js +0 -60
- package/components/DynamicFilter/subcomponents/AppliedFilters/index-Bha19drV.js +0 -26
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/index-BmvzoHit.js +0 -40
- package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index-BcO3SlP5.js +0 -129
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index-BCJhpNS8.js +0 -171
- package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index-DCNhz68u.js +0 -153
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index-BdypjM1Y.js +0 -146
- package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index-D-NFIVnK.js +0 -114
- package/components/DynamicFilter/subcomponents/FieldTypes/index-BwQHJqk9.js +0 -38
- package/components/DynamicFilter/subcomponents/FilterActions/index-B9UWmk07.js +0 -88
- package/components/DynamicFilter/subcomponents/InputFilter/index-CfGb1TfV.js +0 -188
- package/components/DynamicFilter/subcomponents/PopoverFilter/index-DkfRGrlO.js +0 -158
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/index-DSegwAm2.js +0 -63
- package/components/FieldLabel/index-CI57EizR.js +0 -54
- package/components/GridLayout/index-C4HyxNYX.js +0 -1044
- package/components/GridLayout/subcomponents/Griditem/index-C7jT4s8t.js +0 -395
- package/components/GridLayout/subcomponents/Responsive/index-BKcU2OnF.js +0 -348
- package/components/GridLayout/subcomponents/SizeProvider/index-1aJ-e_54.js +0 -71
- package/components/HelperText/index-Crn_XIPF.js +0 -50
- package/components/Icon/index-C89MAkeH.js +0 -176
- package/components/Image/index-COp8vP0X.js +0 -175
- package/components/LanguagePopover/index-BA2Igs9L.js +0 -179
- package/components/LinearProgressIndeterminate/index-BwI756Mb.js +0 -55
- package/components/Loadable/index-BMbi9ISF.js +0 -9
- package/components/LoadingError/index-Cf0oGUrL.js +0 -89
- package/components/MFIsolationApp/index-V4R55hNU.js +0 -169
- package/components/MFLoader/index-BI8vQZSH.js +0 -299
- package/components/ModalDialog/index-CEVQBQ7W.js +0 -77
- package/components/NavLink/index-D1S_vtFO.js +0 -55
- package/components/NoItemSelected/index-B9oM26AX.js +0 -54
- package/components/ObjectLogs/index-CiXOJpS4.js +0 -233
- package/components/PDFViewer/index-GVN2rfd6.js +0 -51
- package/components/Page/index-DZMkYmr4.js +0 -117
- package/components/PaperForm/index-DwgAfjci.js +0 -59
- package/components/Period/index-2pJG3VmY.js +0 -238
- package/components/PrintingSystem/index-B2qcnfw0.js +0 -187
- package/components/PrintingSystem/subcomponents/BodyNode/index-Cv2aoy8S.js +0 -49
- package/components/PrintingSystem/subcomponents/ChartNode/index-BmJm8v_C.js +0 -105
- package/components/PrintingSystem/subcomponents/DividerNode/index-MpFhE-H0.js +0 -20
- package/components/PrintingSystem/subcomponents/FooterNode/index-ZEcWdMSM.js +0 -49
- package/components/PrintingSystem/subcomponents/GridNode/index-SsKax2xu.js +0 -74
- package/components/PrintingSystem/subcomponents/HeaderNode/index-Cs8TOOBL.js +0 -49
- package/components/PrintingSystem/subcomponents/PaperNode/index-DBb25Ecg.js +0 -30
- package/components/PrintingSystem/subcomponents/PropertyValueNode/index-CTVn7J9Q.js +0 -47
- package/components/PrintingSystem/subcomponents/SectionNode/index-iYPM3EaS.js +0 -49
- package/components/PrintingSystem/subcomponents/TextBoxNode/index-DGjXCFKJ.js +0 -24
- package/components/PropertyValue/index-Bh-Jnrte.js +0 -264
- package/components/Resizeable/index-DdP1xfE9.js +0 -20
- package/components/ScrollBar/index-f2URPPE2.js +0 -35
- package/components/ScrollToTop/index-TxORk5dB.js +0 -12
- package/components/SideBar/index-PUBBe0yH.js +0 -758
- package/components/SplitLayout/index-Bu1hcO6G.js +0 -89
- package/components/ToastContainer/index-DK1d8NNd.js +0 -191
- package/components/WrapperComponent/index-BHV-CsDU.js +0 -14
- package/components/animate/LoadingScreen/index-CkVLOrMz.js +0 -70
- package/components/animate/MotionContainer/index-eartnWyO.js +0 -34
- package/components/animate/MotionLazyContainer/index-Be8osTiG.js +0 -9
- package/components/animate/PropagateLoader/index-Bkq8V2SN.js +0 -23
- package/components/animate/features-BbnE33u3.js +0 -5
- package/components/animate/index-BsWiJfzp.js +0 -89
- package/components/animate/variants/bounce-DanQqHAX.js +0 -101
- package/components/animate/variants/container-Dmpr6tg5.js +0 -22
- package/components/animate/variants/fade-CAOJNn06.js +0 -65
- package/components/animate/variants/index-l0sNRNKZ.js +0 -1
- package/components/animate/variants/transition-B9W5SWTa.js +0 -20
- package/components/areas/components/AreasAdmin/index-OxQU3P8Y.js +0 -699
- package/components/areas/components/AreasViewer/index-DQ0aPioP.js +0 -805
- package/components/areas/components/index-l0sNRNKZ.js +0 -1
- package/components/areas/constants-rqODZNZe.js +0 -6
- package/components/areas/contexts/AreasContext/index-BqRlA7JA.js +0 -1110
- package/components/areas/contexts/DynamicMFParmsContext/index-22c6E7vK.js +0 -36
- package/components/areas/contexts/WindowToolsMFContext/index-DkE30fhm.js +0 -12
- package/components/areas/contexts/index-l0sNRNKZ.js +0 -1
- package/components/areas/dictionary-YUsP9beq.js +0 -36
- package/components/areas/hooks/index-l0sNRNKZ.js +0 -1
- package/components/areas/hooks/useAreas/index-BSbwbJLS.js +0 -11
- package/components/areas/hooks/useDynamicMFParameters/index-DhbcZPs9.js +0 -12
- package/components/areas/hooks/useSetWindowsTitle/useSetWindowsTitle-BzPD-miW.js +0 -31
- package/components/areas/hooks/useWindowToolsMF/index-BECQfhbC.js +0 -10
- package/components/areas/icons-CwFr-alN.js +0 -24
- package/components/areas/index-B_Odny9h.js +0 -22
- package/components/commercial/AppBarCommercial/index-CHq3P3GY.js +0 -28
- package/components/commercial/SectionCommercial/index-BeABGtdr.js +0 -56
- package/components/commercial/TopBar/index-F1repmti.js +0 -232
- package/components/commercial/index-CxDzs6Ax.js +0 -81
- package/components/formatters/BooleanFormatter/index-DktIidqW.js +0 -44
- package/components/formatters/DateFormatter/index-CGcRZ8BA.js +0 -43
- package/components/formatters/PointsFormatter/index-C7sR8iqk.js +0 -25
- package/components/formatters/PriceFormatter/index-CsvRawmc.js +0 -35
- package/components/formatters/UncertaintyFormatter/index-B9ESVEVp.js +0 -29
- package/components/formatters/index-pnJhDYKe.js +0 -109
- package/components/hook-form/HelperError/index-BVnmUazV.js +0 -19
- package/components/hook-form/RHFAutocomplete/index-BtPL16HR.js +0 -657
- package/components/hook-form/RHFAutocompleteAsync/index-BfzjLHG8.js +0 -226
- package/components/hook-form/RHFCheckbox/index-Vyttu8Vx.js +0 -132
- package/components/hook-form/RHFColorPicker/index-Cxxb5Wa_.js +0 -191
- package/components/hook-form/RHFDateTime/index-CW1Slb-f.js +0 -190
- package/components/hook-form/RHFMultiCheckbox/index-BARudV1A.js +0 -34
- package/components/hook-form/RHFPeriod/index-r-HeIOoZ.js +0 -98
- package/components/hook-form/RHFRadioGroup/index-CTD-0zKo.js +0 -52
- package/components/hook-form/RHFSelect/index-LdwRuFz-.js +0 -29
- package/components/hook-form/RHFTextField/index-B6ufruSB.js +0 -337
- package/components/hook-form/RHFUpload/index-CDPbm8NR.js +0 -253
- package/components/maps/components/GpsTools/index-5MXlhIEt.js +0 -1948
- package/components/maps/components/Map/index-2Lx5ARXa.js +0 -2546
- package/components/maps/index-Ci-7-FHg.js +0 -7
- package/components/modal/WindowBase-Gd27v5FU.js +0 -44
- package/components/modal/WindowConfirm-u6vAMFo7.js +0 -73
- package/components/modal/index-CydPIpKZ.js +0 -65
- package/components/mui_extended/Accordion/index-DMLYJL7o.js +0 -124
- package/components/mui_extended/Avatar/index-ClBa-6eF.js +0 -64
- package/components/mui_extended/Badge/index-zI-F_Qkq.js +0 -29
- package/components/mui_extended/BoxIcon/index-BUTJ2tKw.js +0 -22
- package/components/mui_extended/Breadcrumbs/index-DTS7rOZH.js +0 -86
- package/components/mui_extended/Button/index-CGfZbaea.js +0 -222
- package/components/mui_extended/CheckBox-BXUrbonB.js +0 -76
- package/components/mui_extended/CircularProgress/index-Bnnti_G6.js +0 -8
- package/components/mui_extended/IconButton/classes/constants-ChY2jKkp.js +0 -4
- package/components/mui_extended/IconButton/classes/index-BxjJGAqZ.js +0 -45
- package/components/mui_extended/IconButton/index-CusYFjie.js +0 -97
- package/components/mui_extended/IconButton/styledIconButton-fAsbGoFS.js +0 -7
- package/components/mui_extended/LinearProgress/index-CGgW8jq2.js +0 -9
- package/components/mui_extended/LinkWithRoute/index-BC2miUjR.js +0 -15
- package/components/mui_extended/MenuActions/MenuActions-C6CjSU6C.js +0 -149
- package/components/mui_extended/MenuActions/constants-BwsU9chA.js +0 -10
- package/components/mui_extended/MenuActions/dictionary-Dj_07puT.js +0 -11
- package/components/mui_extended/MenuActions/slots/MenuActionsEnum-Bu-L6eWU.js +0 -13
- package/components/mui_extended/MenuActions/slots/MenuActionsSlots-D65KZAKF.js +0 -46
- package/components/mui_extended/Pager/index-DCbxiTZA.js +0 -257
- package/components/mui_extended/Popover/index-DfrJAQkV.js +0 -153
- package/components/mui_extended/Stack/index-DzEeCYfp.js +0 -31
- package/components/mui_extended/Tab/index-Bu3dPidV.js +0 -129
- package/components/mui_extended/ToggleButton/index-C9cBkT1V.js +0 -18
- package/components/mui_extended/ToggleIconButton/index--0b3Td6C.js +0 -26
- package/components/mui_extended/Tooltip/index-B8QUytCK.js +0 -42
- package/components/mui_extended/Typography/index-Cf_4Zw8f.js +0 -54
- package/components/mui_extended/index-l0sNRNKZ.js +0 -1
- package/components/popups/PopupsProvider/index-DhSxmtfJ.js +0 -172
- package/components/popups/PopupsViewer/constants-DuyD7aCn.js +0 -4
- package/components/popups/PopupsViewer/icons-BUujqqbu.js +0 -7
- package/components/popups/PopupsViewer/index-BecevSns.js +0 -172
- package/components/popups/PopupsViewer/slots/index-B98CiRLa.js +0 -14
- package/components/popups/PopupsViewer/slots/popupsViewerSlots-BXH77nCF.js +0 -46
- package/components/popups/index-l0sNRNKZ.js +0 -1
- package/contexts/ModalContext/index-CPfNnfTL.js +0 -39
- package/contexts/RHFormContext/index-D_nK759o.js +0 -78
- package/hocs/withToggle/index-C1_DMZD3.js +0 -14
- package/hooks/useFormAddEdit/index-D9oSjUn1.js +0 -90
- package/hooks/useFormReadyForUpdate/index-B3HygFCM.js +0 -20
- package/hooks/useModal/index-BJSQOX3U.js +0 -10
- package/hooks/useSizeContainer/index-D4hDjM1P.js +0 -37
- package/hooks/useStateRef/index-C3P6ZK3m.js +0 -15
- package/hooks/useTab/index-B_GEQFOP.js +0 -12
- package/react-data-grid-BfYuZ6AK.js +0 -2606
- package/react-draggable-DsCPdgQP.js +0 -811
- package/react-json-view-bhqIAaNg.js +0 -2576
- package/react-resizable-eBbFl2dX.js +0 -618
- package/react-spinners-TpKN9lZg.js +0 -123
- package/react-splitter-layout-C-JTsNGs.js +0 -158
- package/styles/DynamicFilter-CJFsIegc.js +0 -319
- package/styles/MenuActions-lTi-ynPM.js +0 -42
- package/styles/index-DKj6m8SL.js +0 -1691
- package/test/constants_no_mock-CF-669v-.js +0 -4
- package/test/getNameDataTestId-BaBTWhBr.js +0 -10
- package/utils/index-DiMrtgIu.js +0 -502
- /package/components/GridLayout/subcomponents/{Griditem → GridItem}/index.d.ts +0 -0
- /package/components/GridLayout/subcomponents/{Griditem → GridItem}/types.d.ts +0 -0
|
@@ -1,758 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { O as NavItemMainRoot, Q as NavSubItemContentRoot, T as NavListSubItemRoot, U as ContainerListSubItem, V as ContentGroupsRoot, X as WrapperGroup, Y as WrapperGroupTitle, Z as CollapseButtonRoot, _ as WrapperContentMobile, $ as SideBarRoot } from "../../styles/index-DKj6m8SL.js";
|
|
3
|
-
import { createContext, useState, useContext, useEffect } from "react";
|
|
4
|
-
import { generateUtilityClasses, Collapse, Drawer as Drawer$1, useTheme } from "@mui/material";
|
|
5
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
6
|
-
import { g as getComponentUtilityClass } from "../../utils/index-DiMrtgIu.js";
|
|
7
|
-
import { T as TEST_PROP_ID } from "../../test/constants_no_mock-CF-669v-.js";
|
|
8
|
-
import { useEnvironment, useBase, BaseProvider } from "@m4l/core";
|
|
9
|
-
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
10
|
-
import { I as Icon, A as ArrowIcon } from "../Icon/index-C89MAkeH.js";
|
|
11
|
-
import { T as Typography } from "../mui_extended/Typography/index-Cf_4Zw8f.js";
|
|
12
|
-
import clsx from "clsx";
|
|
13
|
-
import { useLocation } from "react-router-dom";
|
|
14
|
-
import { I as Image } from "../Image/index-COp8vP0X.js";
|
|
15
|
-
import { I as IconButton } from "../mui_extended/IconButton/index-CusYFjie.js";
|
|
16
|
-
import { useResponsive } from "@m4l/styles";
|
|
17
|
-
const componentName = "M4LSideBar";
|
|
18
|
-
generateUtilityClasses(
|
|
19
|
-
componentName,
|
|
20
|
-
[
|
|
21
|
-
/* elements */
|
|
22
|
-
"root",
|
|
23
|
-
"containerSideBarLogo",
|
|
24
|
-
"contentDesktop",
|
|
25
|
-
"contentMobile",
|
|
26
|
-
"footer",
|
|
27
|
-
"collapseButton",
|
|
28
|
-
"collapseButtonSecondary",
|
|
29
|
-
"containerLogo",
|
|
30
|
-
"contentGroups",
|
|
31
|
-
"wrapperGroup",
|
|
32
|
-
"wrapperGroupTitle",
|
|
33
|
-
"itemListMainRootContainer",
|
|
34
|
-
"itemListMainRoot",
|
|
35
|
-
"containerListSubItem",
|
|
36
|
-
"navItemMainRoot",
|
|
37
|
-
"navItemRootContent",
|
|
38
|
-
"arrowIconRoot",
|
|
39
|
-
"navListSubItemRoot",
|
|
40
|
-
"navSubItemContentRoot",
|
|
41
|
-
"skeleton",
|
|
42
|
-
"lineLeft",
|
|
43
|
-
"wrapperSideBar",
|
|
44
|
-
"areaExpandMenu",
|
|
45
|
-
"navItemMainTriangleTop",
|
|
46
|
-
"navItemMainTriangleBottom",
|
|
47
|
-
"navItemRootContentIconTypo",
|
|
48
|
-
"navSubItemContentBullet",
|
|
49
|
-
"containerLogoButtonLogo",
|
|
50
|
-
"collapseButtontriangleTop",
|
|
51
|
-
"collapseButtontriangleBottom",
|
|
52
|
-
"subItemCollapseActive",
|
|
53
|
-
"containerContentGroupsFooter",
|
|
54
|
-
"contentGroupsLine",
|
|
55
|
-
"drawer",
|
|
56
|
-
"popover",
|
|
57
|
-
"wrapperLogoFooter",
|
|
58
|
-
/* states or variants of elements */
|
|
59
|
-
"collapsed",
|
|
60
|
-
"visible",
|
|
61
|
-
"subItemActive",
|
|
62
|
-
"itemMainActive",
|
|
63
|
-
"variantDefault",
|
|
64
|
-
"variantComercial",
|
|
65
|
-
"overlapping"
|
|
66
|
-
]
|
|
67
|
-
/* returna un objeto igual a:
|
|
68
|
-
{
|
|
69
|
-
root: 'M4LSideBar-root',
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
*/
|
|
73
|
-
);
|
|
74
|
-
const getSideBarClassesByState = (ownerState) => {
|
|
75
|
-
const slots = {
|
|
76
|
-
root: [
|
|
77
|
-
"root",
|
|
78
|
-
ownerState.collapsed && "collapsed",
|
|
79
|
-
ownerState.visible && "visible",
|
|
80
|
-
ownerState.variantStyle === "variantDefault" && "variantDefault",
|
|
81
|
-
ownerState.variantStyle === "variantComercial" && "variantComercial"
|
|
82
|
-
],
|
|
83
|
-
containerSideBarLogo: ["containerSideBarLogo"],
|
|
84
|
-
contentDesktop: ["contentDesktop"],
|
|
85
|
-
contentMobile: ["contentMobile"],
|
|
86
|
-
footer: ["footer"],
|
|
87
|
-
collapseButton: ["collapseButton"],
|
|
88
|
-
collapseButtonSecondary: ["collapseButtonSecondary"],
|
|
89
|
-
containerLogo: ["containerLogo"],
|
|
90
|
-
contentGroups: ["contentGroups"],
|
|
91
|
-
wrapperGroup: ["wrapperGroup"],
|
|
92
|
-
wrapperGroupTitle: ["wrapperGroupTitle"],
|
|
93
|
-
itemListMainRootContainer: ["itemListMainRootContainer"],
|
|
94
|
-
itemListMainRoot: ["itemListMainRoot"],
|
|
95
|
-
containerListSubItem: ["containerListSubItem"],
|
|
96
|
-
navItemMainRoot: ["navItemMainRoot"],
|
|
97
|
-
navItemRootContent: ["navItemRootContent"],
|
|
98
|
-
arrowIconRoot: ["arrowIconRoot"],
|
|
99
|
-
navListSubItemRoot: ["navListSubItemRoot"],
|
|
100
|
-
navSubItemContentRoot: ["navSubItemContentRoot"],
|
|
101
|
-
skeleton: ["skeleton"],
|
|
102
|
-
subItemActive: ["subItemActive"],
|
|
103
|
-
lineLeft: ["lineLeft"],
|
|
104
|
-
wrapperSideBar: ["wrapperSideBar"],
|
|
105
|
-
areaExpandMenu: ["areaExpandMenu"],
|
|
106
|
-
itemMainActive: ["itemMainActive"],
|
|
107
|
-
navItemMainTriangleTop: ["navItemMainTriangleTop"],
|
|
108
|
-
navItemMainTriangleBottom: ["navItemMainTriangleBottom"],
|
|
109
|
-
navItemRootContentIconTypo: ["navItemRootContentIconTypo"],
|
|
110
|
-
navSubItemContentBullet: ["navSubItemContentBullet"],
|
|
111
|
-
containerLogoButtonLogo: ["containerLogoButtonLogo"],
|
|
112
|
-
collapseButtontriangleTop: ["collapseButtontriangleTop"],
|
|
113
|
-
collapseButtontriangleBottom: ["collapseButtontriangleBottom"],
|
|
114
|
-
subItemCollapseActive: ["subItemCollapseActive"],
|
|
115
|
-
containerContentGroupsFooter: ["containerContentGroupsFooter"],
|
|
116
|
-
contentGroupsLine: ["contentGroupsLine"],
|
|
117
|
-
drawer: [
|
|
118
|
-
"drawer",
|
|
119
|
-
ownerState.variantStyle === "variantDefault" && "variantDefault",
|
|
120
|
-
ownerState.variantStyle === "variantComercial" && "variantComercial"
|
|
121
|
-
],
|
|
122
|
-
popover: [
|
|
123
|
-
"popover",
|
|
124
|
-
ownerState.variantStyle === "variantDefault" && "variantDefault",
|
|
125
|
-
ownerState.variantStyle === "variantComercial" && "variantComercial"
|
|
126
|
-
],
|
|
127
|
-
overlapping: ["overlapping"],
|
|
128
|
-
wrapperLogoFooter: ["wrapperLogoFooter"]
|
|
129
|
-
};
|
|
130
|
-
const composedClasses = unstable_composeClasses(slots, getComponentUtilityClass(componentName), {});
|
|
131
|
-
return {
|
|
132
|
-
...composedClasses
|
|
133
|
-
/* retorna un objeto para una variante de tipo = 'password':
|
|
134
|
-
{
|
|
135
|
-
input : "M4LRHFTextField-input"
|
|
136
|
-
root: "M4LRHFTextField-root M4LRHFTextField-variantPassword"
|
|
137
|
-
skeleton: "M4LRHFTextField-skeleton"
|
|
138
|
-
};
|
|
139
|
-
*/
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
const initialState = {
|
|
143
|
-
collapsed: false,
|
|
144
|
-
visible: true,
|
|
145
|
-
onToggleCollapse: () => {
|
|
146
|
-
},
|
|
147
|
-
onToggleVisible: () => {
|
|
148
|
-
},
|
|
149
|
-
onToggleOverlay: () => {
|
|
150
|
-
},
|
|
151
|
-
overlay: false,
|
|
152
|
-
menuData: [],
|
|
153
|
-
companyLogoNormalUrl: "",
|
|
154
|
-
companyLogoSmallUrl: "",
|
|
155
|
-
onClick: () => {
|
|
156
|
-
},
|
|
157
|
-
isItemActive: () => false,
|
|
158
|
-
expandedWidth: "",
|
|
159
|
-
// Obtener las clases iniciales para la barra lateral
|
|
160
|
-
classes: getSideBarClassesByState({ collapsed: false, visible: true }),
|
|
161
|
-
companyName: ""
|
|
162
|
-
};
|
|
163
|
-
const SideBarContext = createContext(initialState);
|
|
164
|
-
const SideBarProvider = (props) => {
|
|
165
|
-
const { value, children } = props;
|
|
166
|
-
const [overlay, setOverlay] = useState(false);
|
|
167
|
-
const onToggleOverlay = (value2) => {
|
|
168
|
-
setOverlay(value2);
|
|
169
|
-
};
|
|
170
|
-
const {
|
|
171
|
-
collapsed,
|
|
172
|
-
visible,
|
|
173
|
-
onToggleCollapse,
|
|
174
|
-
onToggleVisible,
|
|
175
|
-
menuData,
|
|
176
|
-
onClick,
|
|
177
|
-
companyLogoNormalUrl,
|
|
178
|
-
companyLogoSmallUrl,
|
|
179
|
-
isItemActive,
|
|
180
|
-
expandedWidth,
|
|
181
|
-
classes,
|
|
182
|
-
companyName
|
|
183
|
-
} = value;
|
|
184
|
-
return (
|
|
185
|
-
// Proporcionar el contexto con las propiedades desestructuradas
|
|
186
|
-
/* @__PURE__ */ jsx(
|
|
187
|
-
SideBarContext.Provider,
|
|
188
|
-
{
|
|
189
|
-
value: {
|
|
190
|
-
collapsed,
|
|
191
|
-
visible,
|
|
192
|
-
onToggleCollapse,
|
|
193
|
-
onToggleVisible,
|
|
194
|
-
menuData,
|
|
195
|
-
onClick,
|
|
196
|
-
companyLogoNormalUrl,
|
|
197
|
-
companyLogoSmallUrl,
|
|
198
|
-
isItemActive,
|
|
199
|
-
expandedWidth,
|
|
200
|
-
classes,
|
|
201
|
-
companyName,
|
|
202
|
-
onToggleOverlay,
|
|
203
|
-
overlay
|
|
204
|
-
},
|
|
205
|
-
children
|
|
206
|
-
}
|
|
207
|
-
)
|
|
208
|
-
);
|
|
209
|
-
};
|
|
210
|
-
const useSideBar = () => useContext(SideBarContext);
|
|
211
|
-
const SIDEBAR_PREFIX = "M4LSideBar";
|
|
212
|
-
const getNameDataTestId = (KEY) => {
|
|
213
|
-
return `${SIDEBAR_PREFIX}-${KEY}`;
|
|
214
|
-
};
|
|
215
|
-
const NavItemMainContent = (props) => {
|
|
216
|
-
const { item, onClick, handlerOpen, changeVisible, open } = props;
|
|
217
|
-
const { title, icon_url: icon, children } = item;
|
|
218
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
219
|
-
const { classes } = useSideBar();
|
|
220
|
-
const isDesktop = useResponsiveDesktop();
|
|
221
|
-
const handlerClick = (event) => {
|
|
222
|
-
onClick && onClick(item);
|
|
223
|
-
handlerOpen && handlerOpen(event);
|
|
224
|
-
!isDesktop && changeVisible && changeVisible();
|
|
225
|
-
};
|
|
226
|
-
return /* @__PURE__ */ jsxs(
|
|
227
|
-
"div",
|
|
228
|
-
{
|
|
229
|
-
role: "button",
|
|
230
|
-
tabIndex: 0,
|
|
231
|
-
className: classes.navItemRootContent,
|
|
232
|
-
id: "WrapperNavItemRootContent",
|
|
233
|
-
onClick: handlerClick,
|
|
234
|
-
children: [
|
|
235
|
-
/* @__PURE__ */ jsxs("div", { className: classes.navItemRootContentIconTypo, children: [
|
|
236
|
-
icon ? /* @__PURE__ */ jsx(
|
|
237
|
-
Icon,
|
|
238
|
-
{
|
|
239
|
-
src: `${host_static_assets}/${environment_assets}/frontend/domain/microfrontends/${icon}`
|
|
240
|
-
}
|
|
241
|
-
) : null,
|
|
242
|
-
/* @__PURE__ */ jsx(Typography, { variant: "paragraph", color: "text.secondary", children: title })
|
|
243
|
-
] }),
|
|
244
|
-
children ? /* @__PURE__ */ jsx(ArrowIcon, { openState: open }) : null
|
|
245
|
-
]
|
|
246
|
-
}
|
|
247
|
-
);
|
|
248
|
-
};
|
|
249
|
-
function NavItemMain(props) {
|
|
250
|
-
const { item, setOpen, open } = props;
|
|
251
|
-
const { children } = item;
|
|
252
|
-
const { onClick, isItemActive, onToggleVisible, classes } = useSideBar();
|
|
253
|
-
const active = isItemActive(item);
|
|
254
|
-
if (children) {
|
|
255
|
-
return /* @__PURE__ */ jsx(
|
|
256
|
-
NavItemMainRoot,
|
|
257
|
-
{
|
|
258
|
-
className: classes.navItemMainRoot,
|
|
259
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("navItemMainRoot") } : {},
|
|
260
|
-
onClick: () => setOpen((lastOpen) => !lastOpen),
|
|
261
|
-
activeRoot: active,
|
|
262
|
-
children: /* @__PURE__ */ jsx(NavItemMainContent, { item, open })
|
|
263
|
-
}
|
|
264
|
-
);
|
|
265
|
-
}
|
|
266
|
-
return /* @__PURE__ */ jsx(
|
|
267
|
-
NavItemMainRoot,
|
|
268
|
-
{
|
|
269
|
-
activeRoot: active,
|
|
270
|
-
className: classes.navItemMainRoot,
|
|
271
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("navItemMainRoot") } : {},
|
|
272
|
-
children: /* @__PURE__ */ jsx(
|
|
273
|
-
NavItemMainContent,
|
|
274
|
-
{
|
|
275
|
-
item,
|
|
276
|
-
onClick,
|
|
277
|
-
changeVisible: onToggleVisible,
|
|
278
|
-
open
|
|
279
|
-
}
|
|
280
|
-
)
|
|
281
|
-
}
|
|
282
|
-
);
|
|
283
|
-
}
|
|
284
|
-
const NavSubItemContent = (props) => {
|
|
285
|
-
const { item, onClick, closePopover = () => {
|
|
286
|
-
}, setOpenSub, openSub } = props;
|
|
287
|
-
const { title, icon_url } = item;
|
|
288
|
-
const { isItemActive, onToggleVisible, classes } = useSideBar();
|
|
289
|
-
const active = isItemActive(item);
|
|
290
|
-
const isDesktop = useResponsiveDesktop();
|
|
291
|
-
const hasChildren = item.children && Array.isArray(item.children) && item.children.length > 0;
|
|
292
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
293
|
-
const handlerClick = () => {
|
|
294
|
-
onClick(item);
|
|
295
|
-
if (!hasChildren || hasChildren === void 0) {
|
|
296
|
-
closePopover();
|
|
297
|
-
}
|
|
298
|
-
setOpenSub((val) => !val);
|
|
299
|
-
if (!isDesktop && (!hasChildren || hasChildren === void 0)) {
|
|
300
|
-
onToggleVisible();
|
|
301
|
-
}
|
|
302
|
-
};
|
|
303
|
-
return /* @__PURE__ */ jsxs(
|
|
304
|
-
NavSubItemContentRoot,
|
|
305
|
-
{
|
|
306
|
-
onClick: handlerClick,
|
|
307
|
-
disableRipple: true,
|
|
308
|
-
className: clsx(
|
|
309
|
-
classes.navSubItemContentRoot,
|
|
310
|
-
active && classes.subItemActive,
|
|
311
|
-
hasChildren && openSub ? classes.subItemCollapseActive : ""
|
|
312
|
-
),
|
|
313
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("navSubItemContentRoot") } : {},
|
|
314
|
-
children: [
|
|
315
|
-
icon_url && /* @__PURE__ */ jsx(
|
|
316
|
-
Icon,
|
|
317
|
-
{
|
|
318
|
-
src: `${host_static_assets}/${environment_assets}/frontend/domain/microfrontends/${icon_url}`
|
|
319
|
-
}
|
|
320
|
-
),
|
|
321
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", children: title }),
|
|
322
|
-
hasChildren ? /* @__PURE__ */ jsx(ArrowIcon, { openState: openSub }) : null
|
|
323
|
-
]
|
|
324
|
-
}
|
|
325
|
-
);
|
|
326
|
-
};
|
|
327
|
-
function NavSubItem(props) {
|
|
328
|
-
const { item, closePopover, setOpenSub, openSub } = props;
|
|
329
|
-
const { onClick } = useSideBar();
|
|
330
|
-
return /* @__PURE__ */ jsx(
|
|
331
|
-
NavSubItemContent,
|
|
332
|
-
{
|
|
333
|
-
item,
|
|
334
|
-
onClick: () => onClick(item),
|
|
335
|
-
closePopover,
|
|
336
|
-
setOpenSub,
|
|
337
|
-
openSub
|
|
338
|
-
}
|
|
339
|
-
);
|
|
340
|
-
}
|
|
341
|
-
function NavListSubItem(props) {
|
|
342
|
-
const { item: list, closePopover = () => {
|
|
343
|
-
} } = props;
|
|
344
|
-
const { setAncestorActive } = useBase();
|
|
345
|
-
const [internalItemActive, setInternalItemActive] = useState(false);
|
|
346
|
-
const { classes, isItemActive } = useSideBar();
|
|
347
|
-
const active = isItemActive(list);
|
|
348
|
-
const [openSub, setOpenSub] = useState(false);
|
|
349
|
-
const hasChildren = list.children && Array.isArray(list.children) && list.children.length > 0;
|
|
350
|
-
const location = useLocation();
|
|
351
|
-
useEffect(() => {
|
|
352
|
-
let mounted = true;
|
|
353
|
-
if (mounted) {
|
|
354
|
-
if (active || internalItemActive) {
|
|
355
|
-
setAncestorActive(true);
|
|
356
|
-
} else {
|
|
357
|
-
setAncestorActive(false);
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
return function cleanUp() {
|
|
361
|
-
setAncestorActive(false);
|
|
362
|
-
mounted = false;
|
|
363
|
-
};
|
|
364
|
-
}, [active, internalItemActive, location.search]);
|
|
365
|
-
return /* @__PURE__ */ jsx(
|
|
366
|
-
NavListSubItemRoot,
|
|
367
|
-
{
|
|
368
|
-
className: clsx(
|
|
369
|
-
classes.navListSubItemRoot,
|
|
370
|
-
active || internalItemActive ? classes.subItemActive : null
|
|
371
|
-
),
|
|
372
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("navListSubItemRoot") } : {},
|
|
373
|
-
children: hasChildren ? /* @__PURE__ */ jsx(
|
|
374
|
-
BaseProvider,
|
|
375
|
-
{
|
|
376
|
-
value: {
|
|
377
|
-
ancestorActive: internalItemActive,
|
|
378
|
-
setAncestorActive: setInternalItemActive
|
|
379
|
-
},
|
|
380
|
-
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
381
|
-
/* @__PURE__ */ jsx(
|
|
382
|
-
NavSubItem,
|
|
383
|
-
{
|
|
384
|
-
item: list,
|
|
385
|
-
openSub,
|
|
386
|
-
setOpenSub,
|
|
387
|
-
closePopover
|
|
388
|
-
}
|
|
389
|
-
),
|
|
390
|
-
/* @__PURE__ */ jsx(Collapse, { in: openSub, timeout: "auto", unmountOnExit: true, children: (list.children || []).map((item) => /* @__PURE__ */ jsx(NavListSubItem, { item, closePopover }, item.title)) })
|
|
391
|
-
] })
|
|
392
|
-
}
|
|
393
|
-
) : /* @__PURE__ */ jsx(
|
|
394
|
-
NavSubItem,
|
|
395
|
-
{
|
|
396
|
-
item: list,
|
|
397
|
-
openSub,
|
|
398
|
-
setOpenSub,
|
|
399
|
-
closePopover
|
|
400
|
-
}
|
|
401
|
-
)
|
|
402
|
-
}
|
|
403
|
-
);
|
|
404
|
-
}
|
|
405
|
-
function ItemListMain(props) {
|
|
406
|
-
const { list } = props;
|
|
407
|
-
const { isItemActive, classes } = useSideBar();
|
|
408
|
-
const location = useLocation();
|
|
409
|
-
const [internalItemActive, setInternalItemActive] = useState(false);
|
|
410
|
-
const [active, setActive] = useState(false);
|
|
411
|
-
const childrens = [];
|
|
412
|
-
const findChildren = (list2) => {
|
|
413
|
-
const moduleId = list2.children ? list2.children[0].module_id : void 0;
|
|
414
|
-
if (moduleId) {
|
|
415
|
-
childrens.push(moduleId);
|
|
416
|
-
list2.children && findChildren(list2.children[0]);
|
|
417
|
-
}
|
|
418
|
-
};
|
|
419
|
-
useEffect(() => {
|
|
420
|
-
let mounted = true;
|
|
421
|
-
if (mounted) {
|
|
422
|
-
setActive(false);
|
|
423
|
-
setActive(isItemActive(list));
|
|
424
|
-
if (mounted && !active) {
|
|
425
|
-
findChildren(list);
|
|
426
|
-
for (let i = 0; i < childrens.length; i++) {
|
|
427
|
-
if (isItemActive({ title: "", module_id: childrens[i] })) {
|
|
428
|
-
setActive(true);
|
|
429
|
-
break;
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
return function cleanUp() {
|
|
435
|
-
mounted = false;
|
|
436
|
-
};
|
|
437
|
-
}, [location.search]);
|
|
438
|
-
const [open, setOpen] = useState(true);
|
|
439
|
-
const hasChildren = list.children && Array.isArray(list.children) && list.children.length > 0;
|
|
440
|
-
if (hasChildren) {
|
|
441
|
-
return /* @__PURE__ */ jsx(
|
|
442
|
-
"div",
|
|
443
|
-
{
|
|
444
|
-
role: "presentation",
|
|
445
|
-
className: clsx(
|
|
446
|
-
classes.itemListMainRoot,
|
|
447
|
-
active || internalItemActive ? classes.itemMainActive : null
|
|
448
|
-
),
|
|
449
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("itemListMainRoot") } : {},
|
|
450
|
-
children: /* @__PURE__ */ jsxs(
|
|
451
|
-
BaseProvider,
|
|
452
|
-
{
|
|
453
|
-
value: {
|
|
454
|
-
ancestorActive: internalItemActive,
|
|
455
|
-
setAncestorActive: setInternalItemActive
|
|
456
|
-
},
|
|
457
|
-
children: [
|
|
458
|
-
/* @__PURE__ */ jsx(NavItemMain, { item: list, open, setOpen }),
|
|
459
|
-
/* @__PURE__ */ jsx(Collapse, { in: open, timeout: "auto", unmountOnExit: true, children: (list.children || []).map((item) => /* @__PURE__ */ jsx(
|
|
460
|
-
ContainerListSubItem,
|
|
461
|
-
{
|
|
462
|
-
className: classes.containerListSubItem,
|
|
463
|
-
...process.env.NODE_ENV !== "production" ? {
|
|
464
|
-
[TEST_PROP_ID]: getNameDataTestId("containerListSubItem")
|
|
465
|
-
} : {},
|
|
466
|
-
children: /* @__PURE__ */ jsx(NavListSubItem, { item }, item.title)
|
|
467
|
-
},
|
|
468
|
-
item.title
|
|
469
|
-
)) })
|
|
470
|
-
]
|
|
471
|
-
}
|
|
472
|
-
)
|
|
473
|
-
}
|
|
474
|
-
);
|
|
475
|
-
}
|
|
476
|
-
return /* @__PURE__ */ jsx(
|
|
477
|
-
"div",
|
|
478
|
-
{
|
|
479
|
-
className: clsx(classes.itemListMainRoot, active ? classes.itemMainActive : null),
|
|
480
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("itemListMainRoot") } : {},
|
|
481
|
-
children: /* @__PURE__ */ jsx(NavItemMain, { item: list, open, setOpen })
|
|
482
|
-
}
|
|
483
|
-
);
|
|
484
|
-
}
|
|
485
|
-
const ContentGroups = () => {
|
|
486
|
-
const { menuData, classes } = useSideBar();
|
|
487
|
-
const [itemMainActive, setItemMainActive] = useState(-1);
|
|
488
|
-
if (menuData && menuData.length > 0) {
|
|
489
|
-
return /* @__PURE__ */ jsxs(
|
|
490
|
-
ContentGroupsRoot,
|
|
491
|
-
{
|
|
492
|
-
className: classes.contentGroups,
|
|
493
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("contentGroups") } : {},
|
|
494
|
-
children: [
|
|
495
|
-
/* @__PURE__ */ jsx("div", { className: classes.contentGroupsLine }),
|
|
496
|
-
menuData.map((group) => /* @__PURE__ */ jsxs(
|
|
497
|
-
WrapperGroup,
|
|
498
|
-
{
|
|
499
|
-
className: classes.wrapperGroup,
|
|
500
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("wrapperGroup") } : {},
|
|
501
|
-
children: [
|
|
502
|
-
/* @__PURE__ */ jsx(WrapperGroupTitle, { className: classes.wrapperGroupTitle, children: /* @__PURE__ */ jsx(Typography, { variant: "paragraphDens", skeletonWidth: "100px", children: group.title }) }),
|
|
503
|
-
/* @__PURE__ */ jsx("div", { className: classes.itemListMainRootContainer, children: group.children?.map((list, id) => /* @__PURE__ */ jsx(
|
|
504
|
-
ItemListMain,
|
|
505
|
-
{
|
|
506
|
-
list,
|
|
507
|
-
itemMainActive,
|
|
508
|
-
setItemMainActive,
|
|
509
|
-
id
|
|
510
|
-
},
|
|
511
|
-
id
|
|
512
|
-
)) })
|
|
513
|
-
]
|
|
514
|
-
},
|
|
515
|
-
group.title
|
|
516
|
-
))
|
|
517
|
-
]
|
|
518
|
-
}
|
|
519
|
-
);
|
|
520
|
-
}
|
|
521
|
-
return /* @__PURE__ */ jsx(
|
|
522
|
-
ContentGroupsRoot,
|
|
523
|
-
{
|
|
524
|
-
className: classes.contentGroups,
|
|
525
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("contentGroups") } : {}
|
|
526
|
-
}
|
|
527
|
-
);
|
|
528
|
-
};
|
|
529
|
-
function FooterSidebar(_props) {
|
|
530
|
-
const { classes, companyLogoNormalUrl } = useSideBar();
|
|
531
|
-
return /* @__PURE__ */ jsx(
|
|
532
|
-
CollapseButtonRoot,
|
|
533
|
-
{
|
|
534
|
-
className: classes.footer,
|
|
535
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("footer") } : {},
|
|
536
|
-
children: /* @__PURE__ */ jsx("div", { className: classes.wrapperLogoFooter, children: /* @__PURE__ */ jsx("div", { className: classes.containerLogoButtonLogo, children: /* @__PURE__ */ jsx(
|
|
537
|
-
Image,
|
|
538
|
-
{
|
|
539
|
-
width: "192px",
|
|
540
|
-
height: "28px",
|
|
541
|
-
src: companyLogoNormalUrl || "",
|
|
542
|
-
alt: "logo"
|
|
543
|
-
},
|
|
544
|
-
"Logo"
|
|
545
|
-
) }) })
|
|
546
|
-
}
|
|
547
|
-
);
|
|
548
|
-
}
|
|
549
|
-
const MENU_COLLAPSED_SIZE = "14px";
|
|
550
|
-
const MENU_COLLAPSED_CONTAINER_SIZE = "15px";
|
|
551
|
-
const ContentComponent = () => {
|
|
552
|
-
const { collapsed, onToggleCollapse, classes, onToggleOverlay, overlay } = useSideBar();
|
|
553
|
-
const handlerOnMouseEnter = () => {
|
|
554
|
-
if (collapsed) {
|
|
555
|
-
onToggleOverlay(true);
|
|
556
|
-
}
|
|
557
|
-
};
|
|
558
|
-
const handlerOnMouseLeave = () => {
|
|
559
|
-
if (collapsed) {
|
|
560
|
-
onToggleOverlay(false);
|
|
561
|
-
}
|
|
562
|
-
};
|
|
563
|
-
const handlerOnMouseEnterIconButton = () => {
|
|
564
|
-
if (collapsed && overlay) {
|
|
565
|
-
onToggleOverlay(true);
|
|
566
|
-
}
|
|
567
|
-
};
|
|
568
|
-
const handlerOnMouseLeaveIconButton = () => {
|
|
569
|
-
if (collapsed && overlay) {
|
|
570
|
-
onToggleOverlay(false);
|
|
571
|
-
}
|
|
572
|
-
};
|
|
573
|
-
const handleButtonClick = () => {
|
|
574
|
-
onToggleCollapse();
|
|
575
|
-
};
|
|
576
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
577
|
-
return /* @__PURE__ */ jsxs(
|
|
578
|
-
"div",
|
|
579
|
-
{
|
|
580
|
-
className: clsx(classes.contentDesktop, overlay && classes.overlapping),
|
|
581
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("contentDesktop") } : {},
|
|
582
|
-
children: [
|
|
583
|
-
/* @__PURE__ */ jsx(
|
|
584
|
-
IconButton,
|
|
585
|
-
{
|
|
586
|
-
variant: "line",
|
|
587
|
-
rotationAngle: !collapsed ? 180 : 0,
|
|
588
|
-
onClick: () => handleButtonClick(),
|
|
589
|
-
onMouseEnter: () => handlerOnMouseEnterIconButton(),
|
|
590
|
-
onMouseLeave: () => handlerOnMouseLeaveIconButton(),
|
|
591
|
-
className: classes.collapseButton,
|
|
592
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/sidebar/assets/icons/arrow_right.svg`
|
|
593
|
-
}
|
|
594
|
-
),
|
|
595
|
-
/* @__PURE__ */ jsxs(
|
|
596
|
-
"div",
|
|
597
|
-
{
|
|
598
|
-
className: classes.containerContentGroupsFooter,
|
|
599
|
-
style: { minWidth: MENU_COLLAPSED_CONTAINER_SIZE },
|
|
600
|
-
onMouseEnter: () => handlerOnMouseEnter(),
|
|
601
|
-
onMouseLeave: () => handlerOnMouseLeave(),
|
|
602
|
-
children: [
|
|
603
|
-
/* @__PURE__ */ jsx(ContentGroups, {}),
|
|
604
|
-
/* @__PURE__ */ jsx(FooterSidebar, { onToggleCollapse, collapsed })
|
|
605
|
-
]
|
|
606
|
-
}
|
|
607
|
-
)
|
|
608
|
-
]
|
|
609
|
-
}
|
|
610
|
-
);
|
|
611
|
-
};
|
|
612
|
-
const ContentDesktop = () => {
|
|
613
|
-
const { classes, collapsed, expandedWidth, overlay } = useSideBar();
|
|
614
|
-
const areaExpandMenuSize = collapsed ? !overlay ? MENU_COLLAPSED_SIZE : expandedWidth : expandedWidth;
|
|
615
|
-
return /* @__PURE__ */ jsx("div", { className: classes.areaExpandMenu, style: { width: areaExpandMenuSize }, children: /* @__PURE__ */ jsx(ContentComponent, {}) });
|
|
616
|
-
};
|
|
617
|
-
const Drawer = (props) => {
|
|
618
|
-
const { children } = props;
|
|
619
|
-
return /* @__PURE__ */ jsx(Drawer$1, { ...props, children });
|
|
620
|
-
};
|
|
621
|
-
const ContentMobile = () => {
|
|
622
|
-
const {
|
|
623
|
-
visible,
|
|
624
|
-
onToggleVisible,
|
|
625
|
-
companyLogoSmallUrl,
|
|
626
|
-
expandedWidth,
|
|
627
|
-
collapsed,
|
|
628
|
-
classes,
|
|
629
|
-
companyName
|
|
630
|
-
} = useSideBar();
|
|
631
|
-
const theme = useTheme();
|
|
632
|
-
return /* @__PURE__ */ jsx(
|
|
633
|
-
Drawer,
|
|
634
|
-
{
|
|
635
|
-
open: visible,
|
|
636
|
-
onClose: onToggleVisible,
|
|
637
|
-
PaperProps: { sx: { width: expandedWidth } },
|
|
638
|
-
className: classes.drawer,
|
|
639
|
-
sx: { ...theme.components?.M4LSideBarDrawer?.styleOverrides },
|
|
640
|
-
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
641
|
-
/* @__PURE__ */ jsx(
|
|
642
|
-
"div",
|
|
643
|
-
{
|
|
644
|
-
className: classes.lineLeft,
|
|
645
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("lineLeft") } : {}
|
|
646
|
-
}
|
|
647
|
-
),
|
|
648
|
-
/* @__PURE__ */ jsxs(
|
|
649
|
-
WrapperContentMobile,
|
|
650
|
-
{
|
|
651
|
-
className: classes.contentMobile,
|
|
652
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("contentMobile") } : {},
|
|
653
|
-
children: [
|
|
654
|
-
companyLogoSmallUrl ? /* @__PURE__ */ jsx(
|
|
655
|
-
"div",
|
|
656
|
-
{
|
|
657
|
-
className: classes.containerSideBarLogo,
|
|
658
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("containerSideBarLogo") } : {},
|
|
659
|
-
children: /* @__PURE__ */ jsxs(
|
|
660
|
-
"div",
|
|
661
|
-
{
|
|
662
|
-
className: classes.containerLogo,
|
|
663
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("containerLogo") } : {},
|
|
664
|
-
children: [
|
|
665
|
-
/* @__PURE__ */ jsx(
|
|
666
|
-
Image,
|
|
667
|
-
{
|
|
668
|
-
width: "40px",
|
|
669
|
-
height: "40px",
|
|
670
|
-
src: companyLogoSmallUrl,
|
|
671
|
-
alt: "logo"
|
|
672
|
-
},
|
|
673
|
-
"Logo"
|
|
674
|
-
),
|
|
675
|
-
!collapsed && /* @__PURE__ */ jsx(Typography, { variant: "subtitleDens", skeletonWidth: "100px", children: companyName })
|
|
676
|
-
]
|
|
677
|
-
}
|
|
678
|
-
)
|
|
679
|
-
}
|
|
680
|
-
) : null,
|
|
681
|
-
/* @__PURE__ */ jsx(ContentGroups, {})
|
|
682
|
-
]
|
|
683
|
-
}
|
|
684
|
-
)
|
|
685
|
-
] })
|
|
686
|
-
}
|
|
687
|
-
);
|
|
688
|
-
};
|
|
689
|
-
const SideBar = (props) => {
|
|
690
|
-
const {
|
|
691
|
-
collapsed,
|
|
692
|
-
visible,
|
|
693
|
-
onToggleCollapse,
|
|
694
|
-
onToggleVisible,
|
|
695
|
-
menuData,
|
|
696
|
-
onClick,
|
|
697
|
-
companyLogoNormalUrl,
|
|
698
|
-
companyLogoSmallUrl,
|
|
699
|
-
isItemActive,
|
|
700
|
-
expandedWidth = "280px",
|
|
701
|
-
companyName,
|
|
702
|
-
variantStyle = "variantDefault"
|
|
703
|
-
} = props;
|
|
704
|
-
const isMobile = useResponsive("down", "md");
|
|
705
|
-
const ownerState = {
|
|
706
|
-
collapsed,
|
|
707
|
-
visible,
|
|
708
|
-
variantStyle
|
|
709
|
-
};
|
|
710
|
-
const classes = getSideBarClassesByState(ownerState);
|
|
711
|
-
return (
|
|
712
|
-
/**
|
|
713
|
-
* Componente SideBarRoot.
|
|
714
|
-
* Este componente representa la raíz de la barra lateral.
|
|
715
|
-
*
|
|
716
|
-
*/
|
|
717
|
-
/* @__PURE__ */ jsx(
|
|
718
|
-
SideBarRoot,
|
|
719
|
-
{
|
|
720
|
-
className: classes.root,
|
|
721
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("root") } : {},
|
|
722
|
-
children: /* @__PURE__ */ jsx(
|
|
723
|
-
SideBarProvider,
|
|
724
|
-
{
|
|
725
|
-
value: {
|
|
726
|
-
// Propiedades y funciones proporcionadas a través del contexto
|
|
727
|
-
collapsed,
|
|
728
|
-
visible,
|
|
729
|
-
onToggleCollapse,
|
|
730
|
-
onToggleVisible,
|
|
731
|
-
menuData,
|
|
732
|
-
onClick,
|
|
733
|
-
companyLogoNormalUrl,
|
|
734
|
-
companyLogoSmallUrl,
|
|
735
|
-
isItemActive,
|
|
736
|
-
expandedWidth,
|
|
737
|
-
classes,
|
|
738
|
-
companyName
|
|
739
|
-
},
|
|
740
|
-
children: /* @__PURE__ */ jsx(
|
|
741
|
-
"div",
|
|
742
|
-
{
|
|
743
|
-
className: classes.wrapperSideBar,
|
|
744
|
-
style: { width: collapsed ? MENU_COLLAPSED_SIZE : expandedWidth },
|
|
745
|
-
children: !isMobile ? /* @__PURE__ */ jsx(ContentDesktop, {}) : /* @__PURE__ */ jsx(ContentMobile, {})
|
|
746
|
-
}
|
|
747
|
-
)
|
|
748
|
-
}
|
|
749
|
-
)
|
|
750
|
-
}
|
|
751
|
-
)
|
|
752
|
-
);
|
|
753
|
-
};
|
|
754
|
-
export {
|
|
755
|
-
SideBar as S,
|
|
756
|
-
getNameDataTestId as g,
|
|
757
|
-
useSideBar as u
|
|
758
|
-
};
|