@m4l/components 0.2.23 → 0.2.25

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.
Files changed (178) hide show
  1. package/@types/export.d.ts +15 -1
  2. package/components/AccountPopover/classes/index.d.ts +9 -0
  3. package/components/AccountPopover/classes/types.d.ts +10 -0
  4. package/components/AccountPopover/{index.5d50006d.js → index.505e278a.js} +1 -1
  5. package/components/AccountPopover/subcomponents/MyAvatar/index.d.ts +7 -0
  6. package/components/AccountPopover/subcomponents/MyAvatar/types.d.ts +12 -0
  7. package/components/AccountPopover/subcomponents/PopOver/index.d.ts +1 -0
  8. package/components/AccountPopover/subcomponents/PopOver/types.d.ts +15 -0
  9. package/components/AppBar/classes/index.d.ts +17 -0
  10. package/components/AppBar/{index.25161cf9.js → index.7106417d.js} +2 -2
  11. package/components/AppBar/types.d.ts +6 -0
  12. package/components/CommonActions/components/ActionCancel/{index.a29b596a.js → index.de862adf.js} +2 -2
  13. package/components/CommonActions/components/ActionFormCancel/{index.00a61ea9.js → index.3fd5c858.js} +4 -4
  14. package/components/CommonActions/components/ActionFormIntro/{index.911bca41.js → index.07394f62.js} +2 -2
  15. package/components/CommonActions/components/ActionIntro/{index.44b80eb3.js → index.79fc2386.js} +2 -2
  16. package/components/CommonActions/components/Actions/{index.b8a1d42a.js → index.2f6286eb.js} +1 -1
  17. package/components/DataGrid/formatters/ColumnBooleanFormatter/{index.0b8b64ff.js → index.36270dd1.js} +1 -1
  18. package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/{index.b54e968c.js → index.8b008692.js} +1 -1
  19. package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/{index.20762ae8.js → index.cb308086.js} +1 -1
  20. package/components/DataGrid/{index.f4623c6b.js → index.b1eafce1.js} +3 -3
  21. package/components/DataGrid/subcomponents/Actions/{index.ecd849b9.js → index.9af87fa1.js} +10 -10
  22. package/components/DragResizeWindow/{index.7b1dfc74.js → index.051c743d.js} +3 -3
  23. package/components/DynamicFilter/{index.3297b25f.js → index.b93e5649.js} +10 -10
  24. package/components/GridLayout/{index.88b62a5d.js → index.0996cd19.js} +2 -2
  25. package/components/GridLayout/subcomponents/Griditem/{index.5256b153.js → index.ded0e80e.js} +3 -3
  26. package/components/GridLayout/subcomponents/Responsive/{index.dfed4e68.js → index.0fd1b7f8.js} +1 -1
  27. package/components/GridLayout/subcomponents/SizeProvider/{index.6b5de802.js → index.7669a2cd.js} +1 -1
  28. package/components/HamburgerMenu/index.25029e23.js +82 -0
  29. package/components/Icon/{index.b99160ae.js → index.b920baf8.js} +1 -1
  30. package/components/Image/{index.2b8dec69.js → index.d034ca68.js} +9 -13
  31. package/components/LanguagePopover/{index.730b4b7e.js → index.e54c5cc7.js} +2 -2
  32. package/components/LinearProgressIndeterminate/LinearProgressIndeterminate.d.ts +4 -0
  33. package/components/LinearProgressIndeterminate/{index.32caeee2.js → index.a0ad2d9e.js} +1 -1
  34. package/components/Loadable/index.d.ts +5 -0
  35. package/components/LoadingError/LoadingError.d.ts +12 -0
  36. package/components/LoadingError/classes/index.d.ts +12 -0
  37. package/components/LoadingError/{index.8a4ce00b.js → index.123e16f8.js} +3 -3
  38. package/components/LoadingError/types.d.ts +7 -0
  39. package/components/MFLoader/MFLoader.d.ts +11 -0
  40. package/components/MFLoader/{index.d0b06c1d.js → index.52096ea5.js} +1 -1
  41. package/components/MFLoader/types.d.ts +12 -0
  42. package/components/ModalDialog/{index.9ac45602.js → index.2e931b5f.js} +4 -4
  43. package/components/NoItemSelected/{index.b4afe0ba.js → index.1024b856.js} +1 -1
  44. package/components/ObjectLogs/{index.d467f09f.js → index.d10f4a2f.js} +5 -5
  45. package/components/PDFViewer/{index.6be96baf.js → index.98852f91.js} +1 -1
  46. package/components/Page/{index.ba64b2c4.js → index.def863f2.js} +1 -1
  47. package/components/PaperForm/{index.bcf95def.js → index.8a617a66.js} +1 -1
  48. package/components/Period/{index.fbaf483d.js → index.d80dff10.js} +2 -2
  49. package/components/PrintingSystem/{index.1e83a6c5.js → index.2e17cae5.js} +13 -13
  50. package/components/PrintingSystem/subcomponents/BodyNode/{index.6f508c56.js → index.c5ffe20a.js} +1 -1
  51. package/components/PrintingSystem/subcomponents/ChartNode/{index.f8892226.js → index.020c037c.js} +1 -1
  52. package/components/PrintingSystem/subcomponents/DividerNode/{index.31415ece.js → index.78b023bb.js} +1 -1
  53. package/components/PrintingSystem/subcomponents/FooterNode/{index.e635b0e3.js → index.b29fc1e9.js} +1 -1
  54. package/components/PrintingSystem/subcomponents/GridNode/{index.d0f23fe4.js → index.11626284.js} +1 -1
  55. package/components/PrintingSystem/subcomponents/HeaderNode/{index.9c404c02.js → index.ef44c8ab.js} +1 -1
  56. package/components/PrintingSystem/subcomponents/PaperNode/{index.750602dd.js → index.d72d224b.js} +1 -1
  57. package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.2e67247f.js → index.8e53440c.js} +1 -1
  58. package/components/PrintingSystem/subcomponents/SectionNode/{index.68cacbbf.js → index.0b66458e.js} +1 -1
  59. package/components/PrintingSystem/subcomponents/TextBoxNode/{index.62188b50.js → index.b4c72fef.js} +1 -1
  60. package/components/PropertyValue/{index.f88a296e.js → index.3b6670d4.js} +1 -1
  61. package/components/Resizeable/{index.14ab4804.js → index.0eb66c37.js} +1 -1
  62. package/components/SideBar/SideBar.d.ts +55 -0
  63. package/components/SideBar/classes/types.d.ts +2 -0
  64. package/components/SideBar/context/sideBarContext/index.d.ts +10 -0
  65. package/components/SideBar/context/sideBarContext/types.d.ts +12 -0
  66. package/components/SideBar/hooks/useSideBar/index.d.ts +3 -0
  67. package/components/SideBar/{index.62a5659b.js → index.cdb70977.js} +29 -18
  68. package/components/SideBar/subcomponents/ContentDesktop/index.d.ts +4 -0
  69. package/components/SideBar/subcomponents/ContentDesktop/subcomponents/CollapseButton/index.d.ts +9 -0
  70. package/components/SideBar/subcomponents/ContentGroups/index.d.ts +4 -0
  71. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/index.d.ts +7 -0
  72. package/components/SideBar/subcomponents/ContentMobile/index.d.ts +4 -0
  73. package/components/SideBar/types.d.ts +32 -1
  74. package/components/SplitLayout/SplitLayout.d.ts +12 -0
  75. package/components/SplitLayout/classes/index.d.ts +7 -0
  76. package/components/SplitLayout/types.d.ts +9 -0
  77. package/components/ToastContainer/{index.7c9bc5be.js → index.97fdba82.js} +3 -3
  78. package/components/animate/AnimatedScroll/animatedScroll.d.ts +5 -0
  79. package/components/animate/AnimatedScroll/types.d.ts +9 -0
  80. package/components/animate/IconButtonAnimate/index.d.ts +9 -0
  81. package/components/animate/IconButtonAnimate/types.d.ts +5 -0
  82. package/components/animate/LoadingScreen/index.d.ts +5 -0
  83. package/components/animate/LoadingScreen/types.d.ts +12 -0
  84. package/components/animate/MotionContainer/index.d.ts +20 -0
  85. package/components/animate/MotionLazyContainer/index.d.ts +8 -0
  86. package/components/animate/PropagateLoader/index.d.ts +5 -0
  87. package/components/animate/type.d.ts +32 -0
  88. package/components/areas/components/AreasAdmin/classes/index.d.ts +6 -0
  89. package/components/areas/components/AreasAdmin/classes/types.d.ts +30 -0
  90. package/components/areas/components/AreasAdmin/index.d.ts +6 -0
  91. package/components/areas/components/AreasAdmin/{index.df17052d.js → index.e4f0ccc1.js} +10 -10
  92. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/index.d.ts +3 -0
  93. package/components/areas/components/AreasViewer/{index.36975375.js → index.f87c63ca.js} +14 -14
  94. package/components/areas/contexts/AreasContext/{index.4fed7a17.js → index.3e3d8c62.js} +4 -4
  95. package/components/areas/contexts/DynamicMFParmsContext/index.d.ts +11 -0
  96. package/components/areas/contexts/DynamicMFParmsContext/store.d.ts +14 -0
  97. package/components/areas/contexts/DynamicMFParmsContext/types.d.ts +12 -0
  98. package/components/areas/contexts/WindowToolsMFContext/index.d.ts +14 -0
  99. package/components/areas/contexts/WindowToolsMFContext/types.d.ts +51 -0
  100. package/components/areas/hooks/useAreas/{index.511b843f.js → index.b18fe111.js} +1 -1
  101. package/components/areas/types.d.ts +80 -0
  102. package/components/commercial/AppBarCommercial/classes/constants.d.ts +1 -0
  103. package/components/commercial/AppBarCommercial/classes/index.d.ts +4 -0
  104. package/components/commercial/AppBarCommercial/classes/types.d.ts +6 -0
  105. package/components/commercial/AppBarCommercial/index.c5022fdd.js +30 -0
  106. package/components/commercial/AppBarCommercial/index.d.ts +2 -0
  107. package/components/commercial/AppBarCommercial/types.d.ts +4 -0
  108. package/components/commercial/HamburgerMenu/HamburgerMenu.d.ts +29 -0
  109. package/components/commercial/HamburgerMenu/classes/constants.d.ts +1 -0
  110. package/components/commercial/HamburgerMenu/classes/index.d.ts +7 -0
  111. package/components/commercial/HamburgerMenu/classes/type.d.ts +7 -0
  112. package/components/commercial/HamburgerMenu/index.d.ts +2 -0
  113. package/components/commercial/HamburgerMenu/test/constants.d.ts +1 -0
  114. package/components/commercial/HamburgerMenu/test/utils.d.ts +2 -0
  115. package/components/commercial/HamburgerMenu/types.d.ts +5 -0
  116. package/components/commercial/SectionCommercial/classes/constants.d.ts +1 -0
  117. package/components/commercial/SectionCommercial/classes/index.d.ts +5 -0
  118. package/components/commercial/SectionCommercial/classes/types.d.ts +9 -0
  119. package/components/commercial/SectionCommercial/index.d.ts +2 -0
  120. package/components/commercial/SectionCommercial/types.d.ts +9 -0
  121. package/components/commercial/TopBar/TopBar.d.ts +16 -0
  122. package/components/commercial/TopBar/classes/constants.d.ts +1 -0
  123. package/components/commercial/TopBar/classes/index.d.ts +12 -0
  124. package/components/commercial/TopBar/classes/types.d.ts +12 -0
  125. package/components/commercial/TopBar/component/ConteinItem/index.d.ts +5 -0
  126. package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/index.d.ts +12 -0
  127. package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/subcomponents/ArrowIcon/index.d.ts +2 -0
  128. package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/subcomponents/ArrowIcon/types.d.ts +4 -0
  129. package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/types.d.ts +4 -0
  130. package/components/commercial/TopBar/context/index.d.ts +16 -0
  131. package/components/commercial/TopBar/context/type.d.ts +12 -0
  132. package/components/commercial/TopBar/hook/topBarContext/index.d.ts +5 -0
  133. package/components/commercial/TopBar/index.8e2163f7.js +288 -0
  134. package/components/commercial/TopBar/index.d.ts +1 -0
  135. package/components/commercial/TopBar/type.d.ts +7 -0
  136. package/components/commercial/TopBar/utils/isActive/index.d.ts +12 -0
  137. package/components/commercial/index.d.ts +4 -0
  138. package/components/formatters/BooleanFormatter/{index.c6f50487.js → index.b3052107.js} +2 -2
  139. package/components/formatters/{index.611e3264.js → index.95cc337e.js} +1 -1
  140. package/components/hook-form/RHFAutocomplete/{index.2c851533.js → index.cf399b24.js} +6 -2
  141. package/components/hook-form/RHFAutocompleteAsync/{index.e35ebd61.js → index.b2b75475.js} +1 -1
  142. package/components/hook-form/RHFColorPicker/{index.1b42bae4.js → index.48a1ee1b.js} +3 -3
  143. package/components/hook-form/RHFDateTime/{index.f8bbac56.js → index.5a673a96.js} +1 -1
  144. package/components/hook-form/RHFPeriod/{index.fe6f9b45.js → index.4205c8ab.js} +1 -1
  145. package/components/hook-form/RHFTextField/{index.09c5da15.js → index.fbb29ee1.js} +2 -2
  146. package/components/hook-form/RHFUpload/{index.f424caee.js → index.05d7e2a7.js} +2 -2
  147. package/components/index.d.ts +1 -0
  148. package/components/modal/WindowBase/index.d.ts +5 -0
  149. package/components/modal/WindowBase/types.d.ts +4 -0
  150. package/components/modal/{WindowBase.321fa298.js → WindowBase.998b8a38.js} +3 -3
  151. package/components/modal/WindowConfirm/index.d.ts +6 -0
  152. package/components/modal/WindowConfirm/types.d.ts +33 -0
  153. package/components/modal/{WindowConfirm.aae5a438.js → WindowConfirm.55ac3c8f.js} +23 -20
  154. package/components/mui_extended/Accordion/{index.e06aaefc.js → index.fb4eb664.js} +2 -2
  155. package/components/mui_extended/Button/Button.d.ts +1 -2
  156. package/components/mui_extended/Button/{index.717945f3.js → index.e520bd15.js} +1 -1
  157. package/components/mui_extended/IconButton/{index.b3fe7a6e.js → index.9ea23f87.js} +1 -1
  158. package/components/mui_extended/MenuActions/{index.5871d199.js → index.fa7c26a5.js} +2 -2
  159. package/components/mui_extended/Pager/{index.eda63c51.js → index.0c703574.js} +1 -1
  160. package/components/mui_extended/ToggleButton/{index.5222f1ac.js → index.bcaea74b.js} +1 -1
  161. package/components/mui_extended/ToggleIconButton/{index.b2e79e73.js → index.131772d7.js} +1 -1
  162. package/contexts/ModalContext/{index.e8f5ad3e.js → index.978a412d.js} +1 -1
  163. package/hooks/useFormAddEdit/{index.aa4e720e.js → index.4caddd24.js} +2 -2
  164. package/hooks/useModal/{index.50b23c06.js → index.786a4439.js} +1 -1
  165. package/index.js +85 -76
  166. package/{node_modules.3c6b318a.js → node_modules.71622512.js} +1 -1
  167. package/package.json +1 -1
  168. package/{react-draggable.38b6012b.js → react-draggable.ee21cb7e.js} +1 -1
  169. package/{react-resizable.3cdda6a7.js → react-resizable.ee028152.js} +2 -2
  170. package/utils/index.d.ts +7 -5
  171. package/vendor.a735310a.js +162 -0
  172. package/utils/getComponentUtilityClass.d.ts +0 -1
  173. package/utils/getPaletteColor.d.ts +0 -2
  174. package/utils/getThemeVariantColor.d.ts +0 -3
  175. package/utils/getTransformXY.d.ts +0 -4
  176. package/utils/isValidDate.d.ts +0 -1
  177. package/vendor.9acc9c5b.js +0 -114
  178. package/utils/{index.79b6a2c1.js → index.de903261.js} +3 -3
@@ -0,0 +1,288 @@
1
+ import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
2
+ import { generateUtilityClasses, styled, useTheme, Box, Grid } from "@mui/material";
3
+ import { unstable_composeClasses } from "@mui/base";
4
+ import { g as getComponentUtilityClass } from "../../../utils/index.de903261.js";
5
+ import { createContext, useContext, useState } from "react";
6
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
7
+ import { useEnvironment } from "@m4l/core";
8
+ import { I as Icon } from "../../Icon/index.b920baf8.js";
9
+ import clsx from "clsx";
10
+ import { g as getNameDataTestId } from "../../../test/getNameDataTestId.14875ec7.js";
11
+ import { A as Accordion } from "../../mui_extended/Accordion/index.fb4eb664.js";
12
+ import { B as Button } from "../../mui_extended/Button/index.e520bd15.js";
13
+ import { P as Popover } from "../../mui_extended/Popover/index.b3eca6b1.js";
14
+ const componentName = "M4LTopBar";
15
+ const TopBarClasses = generateUtilityClasses(componentName, [
16
+ "root",
17
+ "ContainerImageComercial",
18
+ "SimplebarComercial",
19
+ "ItemRoot",
20
+ "ItemSelect",
21
+ "ContainerAccordion",
22
+ "ContainerAccordionCase1",
23
+ "IconAndButton",
24
+ "IsActive"
25
+ ]);
26
+ function getTopBarClassesUtilityClass() {
27
+ const slots = {
28
+ root: ["root"],
29
+ ContainerImageComercial: ["ContainerImageComercial"],
30
+ SimplebarComercial: ["SimplebarComercial"],
31
+ ItemRoot: ["ItemRoot"],
32
+ ItemSelect: ["ItemSelect"],
33
+ ContainerAccordion: ["ContainerAccordion"],
34
+ ContainerAccordionCase1: ["ContainerAccordionCase1"],
35
+ IconAndButton: ["IconAndButton"]
36
+ };
37
+ const composedClasses = unstable_composeClasses(slots, getComponentUtilityClass(componentName), {});
38
+ return {
39
+ ...composedClasses
40
+ };
41
+ }
42
+ const initialstate = {
43
+ dataMenu: [],
44
+ classes: getTopBarClassesUtilityClass(),
45
+ dataTestId: ""
46
+ };
47
+ const TopBarContext = createContext(initialstate);
48
+ const TopBarProvider = (props) => {
49
+ const {
50
+ children,
51
+ value
52
+ } = props;
53
+ const {
54
+ dataMenu: DataMenu,
55
+ classes,
56
+ dataTestId
57
+ } = value;
58
+ return /* @__PURE__ */ jsx(TopBarContext.Provider, {
59
+ value: {
60
+ dataMenu: DataMenu,
61
+ classes,
62
+ dataTestId
63
+ },
64
+ children
65
+ });
66
+ };
67
+ const useTopBar = () => useContext(TopBarContext);
68
+ const useTopBar$1 = useTopBar;
69
+ const ArrowIconRoot = styled("div")(() => ({
70
+ display: "flex",
71
+ alignSelf: "center",
72
+ lineHeight: 0
73
+ }));
74
+ function ArrowIcon(props) {
75
+ const {
76
+ openState
77
+ } = props;
78
+ const {
79
+ host_static_assets,
80
+ environment_assets
81
+ } = useEnvironment();
82
+ return /* @__PURE__ */ jsx(ArrowIconRoot, {
83
+ className: "",
84
+ children: /* @__PURE__ */ jsx(Icon, {
85
+ src: `${host_static_assets}/${environment_assets}/frontend/components/sidebar/assets/icons/ChevronRight.svg`,
86
+ rotationAngle: openState ? 270 : 90,
87
+ size: "medium"
88
+ })
89
+ });
90
+ }
91
+ const isActive = (data) => {
92
+ const path = window.location.pathname;
93
+ if (data.path === path) {
94
+ return true;
95
+ }
96
+ if (data.children) {
97
+ return data.children.some((item) => isActive(item));
98
+ }
99
+ return false;
100
+ };
101
+ const NavItemRoot = (props) => {
102
+ const theme = useTheme();
103
+ const {
104
+ classes,
105
+ dataTestId
106
+ } = useTopBar$1();
107
+ const {
108
+ itemRootData
109
+ } = props;
110
+ const {
111
+ title,
112
+ children,
113
+ module_id,
114
+ icon_url
115
+ } = itemRootData;
116
+ const [anchorEl, setAnchorEl] = useState(null);
117
+ const [openedPopoverId, setOpenedPopoverId] = useState(null);
118
+ const handleClick = (event, popoverId) => {
119
+ setAnchorEl(event.currentTarget);
120
+ setOpenedPopoverId(popoverId);
121
+ };
122
+ const handleClose = () => {
123
+ setAnchorEl(null);
124
+ setOpenedPopoverId(null);
125
+ };
126
+ const renderMenuItems = (items) => {
127
+ return items.map((item, index) => /* @__PURE__ */ jsx(Grid, {
128
+ item: true,
129
+ xs: 12,
130
+ children: item.children ? item.children && item.children.length > 0 && /* @__PURE__ */ jsx(Accordion, {
131
+ label: item.title,
132
+ children: renderMenuItems(item.children)
133
+ }) : /* @__PURE__ */ jsx("div", {
134
+ className: clsx(classes.ItemSelect, item.path === window.location.pathname ? TopBarClasses.IsActive : null),
135
+ ...process.env.NODE_ENV !== "production" ? {
136
+ [TEST_PROP_ID]: getNameDataTestId(componentName, "ItemSelect", dataTestId)
137
+ } : {},
138
+ children: /* @__PURE__ */ jsx(Button, {
139
+ variant: "text",
140
+ href: item.path,
141
+ fullWidth: true,
142
+ children: item.title
143
+ })
144
+ })
145
+ }, index));
146
+ };
147
+ const renderPopover = () => {
148
+ return /* @__PURE__ */ jsx(Popover, {
149
+ elevation: 3,
150
+ id: module_id,
151
+ open: openedPopoverId === itemRootData.module_id ? true : false,
152
+ anchorEl,
153
+ onClose: handleClose,
154
+ anchorOrigin: {
155
+ vertical: "bottom",
156
+ horizontal: "center"
157
+ },
158
+ transformOrigin: {
159
+ vertical: "top",
160
+ horizontal: "center"
161
+ },
162
+ arrowType: "top-center",
163
+ sx: {
164
+ ...theme.components?.M4LPopoverTopBar?.styleOverrides
165
+ },
166
+ children: /* @__PURE__ */ jsx(Grid, {
167
+ container: true,
168
+ spacing: 0.5,
169
+ children: children && children.length > 0 && renderMenuItems(children)
170
+ })
171
+ });
172
+ };
173
+ const render = () => {
174
+ if (itemRootData.children && itemRootData.path) {
175
+ return /* @__PURE__ */ jsxs("div", {
176
+ className: classes.ContainerAccordionCase1,
177
+ ...process.env.NODE_ENV !== "production" ? {
178
+ [TEST_PROP_ID]: getNameDataTestId(componentName, "ContainerAccordionCase1", dataTestId)
179
+ } : {},
180
+ children: [/* @__PURE__ */ jsx(Button, {
181
+ size: "medium",
182
+ variant: "text",
183
+ href: itemRootData.path,
184
+ startIcon: /* @__PURE__ */ jsx(Icon, {
185
+ src: `${icon_url}`
186
+ }),
187
+ children: title
188
+ }), /* @__PURE__ */ jsx(Button, {
189
+ variant: "text",
190
+ id: module_id,
191
+ onClick: (e) => handleClick(e, module_id),
192
+ endIcon: /* @__PURE__ */ jsx(ArrowIcon, {
193
+ openState: openedPopoverId === module_id ? true : false
194
+ }),
195
+ startIcon: /* @__PURE__ */ jsx(Icon, {
196
+ src: `${icon_url}`
197
+ })
198
+ }), renderPopover()]
199
+ });
200
+ }
201
+ if (itemRootData.children) {
202
+ return /* @__PURE__ */ jsxs("div", {
203
+ className: classes.ContainerAccordion,
204
+ ...process.env.NODE_ENV !== "production" ? {
205
+ [TEST_PROP_ID]: getNameDataTestId(componentName, "ContainerAccordion", dataTestId)
206
+ } : {},
207
+ children: [/* @__PURE__ */ jsx(Button, {
208
+ "aria-describedby": module_id,
209
+ variant: "text",
210
+ size: "medium",
211
+ onClick: (e) => handleClick(e, itemRootData.module_id),
212
+ endIcon: /* @__PURE__ */ jsx(ArrowIcon, {
213
+ openState: openedPopoverId === module_id ? true : false
214
+ }),
215
+ startIcon: /* @__PURE__ */ jsx(Icon, {
216
+ src: `${icon_url}`
217
+ }),
218
+ children: title
219
+ }), renderPopover()]
220
+ });
221
+ }
222
+ if (itemRootData.path)
223
+ return /* @__PURE__ */ jsx(Button, {
224
+ variant: "text",
225
+ size: "medium",
226
+ href: itemRootData.path,
227
+ "aria-describedby": module_id,
228
+ startIcon: /* @__PURE__ */ jsx(Icon, {
229
+ src: `${icon_url}`
230
+ }),
231
+ children: /* @__PURE__ */ jsx("div", {
232
+ children: title
233
+ })
234
+ });
235
+ };
236
+ return /* @__PURE__ */ jsx(Box, {
237
+ className: clsx(classes.ItemRoot, isActive(itemRootData) || openedPopoverId === itemRootData.module_id ? TopBarClasses.IsActive : null),
238
+ ...process.env.NODE_ENV !== "production" ? {
239
+ [TEST_PROP_ID]: getNameDataTestId(componentName, "ItemRoot", dataTestId)
240
+ } : {},
241
+ children: render()
242
+ });
243
+ };
244
+ const ConteinItem = () => {
245
+ const {
246
+ dataMenu: DataMenu,
247
+ classes,
248
+ dataTestId
249
+ } = useTopBar$1();
250
+ return /* @__PURE__ */ jsx(Fragment, {
251
+ children: /* @__PURE__ */ jsx("div", {
252
+ className: classes.SimplebarComercial,
253
+ ...process.env.NODE_ENV !== "production" ? {
254
+ [TEST_PROP_ID]: getNameDataTestId(componentName, "SimplebarComercial", dataTestId)
255
+ } : {},
256
+ children: DataMenu.map((group) => /* @__PURE__ */ jsx(NavItemRoot, {
257
+ itemRootData: group
258
+ }, group.module_id))
259
+ })
260
+ });
261
+ };
262
+ const TopBarRoot = styled("header")(({ theme }) => ({
263
+ ...theme.components?.M4LTopBar?.styleOverrides
264
+ }));
265
+ const TopBar = (props) => {
266
+ const {
267
+ dataMenu: DataMenu,
268
+ dataTestId
269
+ } = props;
270
+ const classes = getTopBarClassesUtilityClass();
271
+ return /* @__PURE__ */ jsx(TopBarRoot, {
272
+ className: classes.root,
273
+ ...process.env.NODE_ENV !== "production" ? {
274
+ [TEST_PROP_ID]: getNameDataTestId(componentName, "root", dataTestId)
275
+ } : {},
276
+ children: /* @__PURE__ */ jsx(TopBarProvider, {
277
+ value: {
278
+ dataMenu: DataMenu,
279
+ classes,
280
+ dataTestId
281
+ },
282
+ children: /* @__PURE__ */ jsx(ConteinItem, {})
283
+ })
284
+ });
285
+ };
286
+ export {
287
+ TopBar as T
288
+ };
@@ -0,0 +1 @@
1
+ export { TopBar } from './TopBar';
@@ -0,0 +1,7 @@
1
+ import { MenuDataType } from "../HamburgerMenu";
2
+ import { getTopBarClassesUtilityClass } from "./classes";
3
+ export interface TopBarProps {
4
+ dataMenu: Array<MenuDataType>;
5
+ dataTestId: string;
6
+ }
7
+ export declare type Classes = ReturnType<typeof getTopBarClassesUtilityClass>;
@@ -0,0 +1,12 @@
1
+ import { MenuDataType } from "../../../../SideBar";
2
+ /**
3
+ * @description Util que sirve para verificar si la ruta actual del navegador es igual a un data.src del array
4
+ * @param {TopBarMenuDataType} data - Propiedades de isActive
5
+ * @param {string} data.src - URLS del array
6
+ *
7
+ *
8
+ * @returns Boolean
9
+ *
10
+ * @example isActive(itemRootData)
11
+ */
12
+ export declare const isActive: (data: MenuDataType) => boolean;
@@ -0,0 +1,4 @@
1
+ export * from './AppBarCommercial';
2
+ export * from './HamburgerMenu';
3
+ export * from './TopBar';
4
+ export * from './SectionCommercial';
@@ -1,8 +1,8 @@
1
1
  import { useMemo } from "react";
2
2
  import { useModuleDictionary, useEnvironment } from "@m4l/core";
3
- import { I as Icon } from "../../Icon/index.b99160ae.js";
3
+ import { I as Icon } from "../../Icon/index.b920baf8.js";
4
4
  import { W as WrapperComponent } from "../../WrapperComponent/index.5e872594.js";
5
- import { F as FormatterRoot, f as formatterClasses } from "../index.611e3264.js";
5
+ import { F as FormatterRoot, f as formatterClasses } from "../index.95cc337e.js";
6
6
  import clsx from "clsx";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  const BOOLEAN_FORMATTER_DICTIONARY_KEY = `boolean_formatter`;
@@ -3,7 +3,7 @@ import "@mui/base";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { W as WrapperComponent } from "../WrapperComponent/index.5e872594.js";
5
5
  import { useModuleDictionary } from "@m4l/core";
6
- import { a as BOOLEAN_FORMATTER_DICTIONARY_KEY } from "./BooleanFormatter/index.c6f50487.js";
6
+ import { a as BOOLEAN_FORMATTER_DICTIONARY_KEY } from "./BooleanFormatter/index.b3052107.js";
7
7
  const COMPONENT_CLASS_NAME = "M4LFormatter";
8
8
  const formatterClasses = generateUtilityClasses(COMPONENT_CLASS_NAME, [
9
9
  "root",
@@ -2,7 +2,7 @@ import { useModuleDictionary, useModuleSkeleton, useEnvironment } from "@m4l/cor
2
2
  import { useFormContext, Controller } from "react-hook-form";
3
3
  import { Skeleton, generateUtilityClasses, generateUtilityClass, useTheme, Autocomplete, Popper, TextField, CircularProgress } from "@mui/material";
4
4
  import { styled } from "@mui/material/styles";
5
- import { I as Image } from "../../Image/index.2b8dec69.js";
5
+ import { I as Image } from "../../Image/index.d034ca68.js";
6
6
  import { useMemo, useRef, useState, useEffect } from "react";
7
7
  import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
8
8
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
@@ -10,7 +10,7 @@ import { T as Typography } from "../../mui_extended/Typography/index.379dd374.js
10
10
  import { unstable_composeClasses } from "@mui/base";
11
11
  import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
12
12
  import { useResponsiveDesktop } from "@m4l/graphics";
13
- import { I as IconButton } from "../../mui_extended/IconButton/index.b3fe7a6e.js";
13
+ import { I as IconButton } from "../../mui_extended/IconButton/index.9ea23f87.js";
14
14
  const AutocompleteRoot = styled("div")(({
15
15
  theme
16
16
  }) => ({
@@ -284,6 +284,10 @@ function RHFAutocomplete(props) {
284
284
  className: classes.popper,
285
285
  placement: "bottom-start",
286
286
  placeholder: void 0,
287
+ onPointerEnterCapture: () => {
288
+ },
289
+ onPointerLeaveCapture: () => {
290
+ },
287
291
  sx: {
288
292
  ...theme.components?.M4LRHFAutocompletePopover?.styleOverrides
289
293
  }
@@ -6,7 +6,7 @@ import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
6
6
  import { unstable_composeClasses } from "@mui/base";
7
7
  import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
8
8
  import { jsx } from "react/jsx-runtime";
9
- import { R as RHFAutocomplete, g as getRHFAutocompleteComponentsDictionary } from "../RHFAutocomplete/index.2c851533.js";
9
+ import { R as RHFAutocomplete, g as getRHFAutocompleteComponentsDictionary } from "../RHFAutocomplete/index.cf399b24.js";
10
10
  styled("div")(() => ({
11
11
  display: "flex",
12
12
  width: "100%",
@@ -1,7 +1,7 @@
1
1
  import { useState } from "react";
2
2
  import { useFormContext, useWatch, Controller } from "react-hook-form";
3
3
  import { useModuleSkeleton, useEnvironment, useModuleDictionary } from "@m4l/core";
4
- import { S as SketchPicker } from "../../../node_modules.3c6b318a.js";
4
+ import { S as SketchPicker } from "../../../node_modules.71622512.js";
5
5
  import "lodash-es/debounce";
6
6
  import "lodash-es/each";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -10,8 +10,8 @@ import { generateUtilityClasses, generateUtilityClass, styled, Skeleton as Skele
10
10
  import { unstable_composeClasses } from "@mui/base";
11
11
  import { useTheme } from "@mui/material/styles";
12
12
  import { P as Popover } from "../../mui_extended/Popover/index.b3eca6b1.js";
13
- import { I as Icon } from "../../Icon/index.b99160ae.js";
14
- import { B as Button } from "../../mui_extended/Button/index.717945f3.js";
13
+ import { I as Icon } from "../../Icon/index.b920baf8.js";
14
+ import { B as Button } from "../../mui_extended/Button/index.e520bd15.js";
15
15
  const componentName = "M4LRHFColorPicker";
16
16
  const colorPickerClasses = generateUtilityClasses(componentName, [
17
17
  "root",
@@ -11,7 +11,7 @@ import clsx from "clsx";
11
11
  import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
12
12
  import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
13
13
  import { T as Typography } from "../../mui_extended/Typography/index.379dd374.js";
14
- import { I as Icon } from "../../Icon/index.b99160ae.js";
14
+ import { I as Icon } from "../../Icon/index.b920baf8.js";
15
15
  const SKTRHFWrapperTextField = styled("div")(({
16
16
  theme
17
17
  }) => ({
@@ -3,7 +3,7 @@ import { useFormContext, Controller } from "react-hook-form";
3
3
  import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
4
4
  import { unstable_composeClasses } from "@mui/base";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
- import { P as Period } from "../../Period/index.fbaf483d.js";
6
+ import { P as Period } from "../../Period/index.d80dff10.js";
7
7
  const RHFPeriodRoot = styled("div")(({
8
8
  theme
9
9
  }) => ({
@@ -1,13 +1,13 @@
1
1
  import { useModuleSkeleton, useEnvironment } from "@m4l/core";
2
2
  import { styled, Skeleton, generateUtilityClasses, TextField, InputAdornment, generateUtilityClass } from "@mui/material";
3
3
  import { forwardRef, useState, useEffect } from "react";
4
- import { I as IconButton } from "../../mui_extended/IconButton/index.b3fe7a6e.js";
4
+ import { I as IconButton } from "../../mui_extended/IconButton/index.9ea23f87.js";
5
5
  import { useFormContext, Controller } from "react-hook-form";
6
6
  import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
7
7
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
8
8
  import { styled as styled$1 } from "@mui/material/styles";
9
9
  import { unstable_composeClasses } from "@mui/base";
10
- import { g as getComponentUtilityClass } from "../../../utils/index.79b6a2c1.js";
10
+ import { g as getComponentUtilityClass } from "../../../utils/index.de903261.js";
11
11
  import { T as Typography } from "../../mui_extended/Typography/index.379dd374.js";
12
12
  import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
13
13
  import { useResponsiveDesktop } from "@m4l/graphics";
@@ -2,7 +2,7 @@ import { useCallback } from "react";
2
2
  import { useFormContext, Controller } from "react-hook-form";
3
3
  import require$$0 from "lodash/isString";
4
4
  import { useDropzone } from "react-dropzone";
5
- import { I as Image } from "../../Image/index.2b8dec69.js";
5
+ import { I as Image } from "../../Image/index.d034ca68.js";
6
6
  import { useEnvironment, useModuleDictionary, useModuleSkeleton } from "@m4l/core";
7
7
  import { styled } from "@mui/material/styles";
8
8
  import { Skeleton, generateUtilityClasses, generateUtilityClass, styled as styled$1 } from "@mui/material";
@@ -10,7 +10,7 @@ import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
10
10
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
11
11
  import { unstable_composeClasses } from "@mui/base";
12
12
  import { T as Typography } from "../../mui_extended/Typography/index.379dd374.js";
13
- import { B as Button } from "../../mui_extended/Button/index.717945f3.js";
13
+ import { B as Button } from "../../mui_extended/Button/index.e520bd15.js";
14
14
  import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
15
15
  const UploadImageRoot = styled("div")(({
16
16
  theme
@@ -46,4 +46,5 @@ export * from './SideBar';
46
46
  export * from './AppBar';
47
47
  export * from './AccountPopover';
48
48
  export * from './AppBar/AppBar';
49
+ export * from './commercial';
49
50
  export type { SplitPosition } from './SplitLayout/types';
@@ -1,2 +1,7 @@
1
1
  import { WindowBaseProps } from './types';
2
+ /**
3
+ * Componente base de ventana.
4
+ * Este componente proporciona una estructura básica para una ventana modal.
5
+ * Utiliza hooks como useModal y clases de utilidad de estilos.
6
+ */
2
7
  export declare const WindowBase: (props: WindowBaseProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
2
  export interface WindowBaseProps {
3
+ /** El título de la ventana modal. */
3
4
  title: string;
5
+ /** El contenido de la ventana modal.*/
4
6
  children: ReactNode;
7
+ /** La URL del icono de la ventana modal (opcional). */
5
8
  urlIcon?: string;
9
+ /**La función que se ejecuta al hacer clic en el botón de cancelar (opcional). */
6
10
  onClickCancel?: () => void;
7
11
  }
@@ -2,9 +2,9 @@ import { m as modalUtilityClasses } from "./index.61389369.js";
2
2
  import { useEnvironment } from "@m4l/core";
3
3
  import clsx from "clsx";
4
4
  import { jsxs, jsx } from "react/jsx-runtime";
5
- import { I as IconButton } from "../mui_extended/IconButton/index.b3fe7a6e.js";
6
- import { I as Icon } from "../Icon/index.b99160ae.js";
7
- import { u as useModal } from "../../hooks/useModal/index.50b23c06.js";
5
+ import { I as IconButton } from "../mui_extended/IconButton/index.9ea23f87.js";
6
+ import { I as Icon } from "../Icon/index.b920baf8.js";
7
+ import { u as useModal } from "../../hooks/useModal/index.786a4439.js";
8
8
  const Header = (props) => {
9
9
  const {
10
10
  title,
@@ -1,2 +1,8 @@
1
1
  import { WindowConfirmProps } from './types';
2
+ /**
3
+ * Componente de ventana de confirmación.
4
+ * Este componente muestra una ventana modal de confirmación con un mensaje y opciones de acción.
5
+ * Utiliza hooks como useModal, useModuleDictionary y useEnvironment de @m4l/core.
6
+ * También importa componentes y clases necesarios de CommonActions, subcomponents y classes.
7
+ */
2
8
  export declare const WindowConfirm: (props: WindowConfirmProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,44 @@
1
+ /**
2
+ * Colores disponibles para el estado de la ventana de confirmación.
3
+ * Puede ser 'warning', 'delete', 'info', 'success' o undefined.
4
+ */
1
5
  export declare type StateColors = 'warning' | 'delete' | 'info' | 'success' | undefined;
6
+ /**
7
+ * Propiedades de la ventana de confirmación.
8
+ */
2
9
  export interface WindowConfirmProps {
10
+ /**
11
+ * Título de la ventana de confirmación.
12
+ */
3
13
  title: string;
14
+ /**
15
+ * Variante de color para el estado de la ventana.
16
+ * Puede ser uno de los colores definidos en StateColors.
17
+ */
4
18
  variant?: StateColors;
19
+ /**
20
+ * Título del botón de aceptar.
21
+ */
5
22
  titleAccept?: string;
23
+ /**
24
+ * Mensaje de la ventana de confirmación.
25
+ */
6
26
  msg: string;
27
+ /**
28
+ * Función de clic en el botón de introducción.
29
+ */
7
30
  onClickIntro?: () => void;
31
+ /**
32
+ * Función de clic en el botón de cancelar.
33
+ */
8
34
  onClickCancel?: () => void;
9
35
  }
36
+ /**
37
+ * Propiedades relacionadas con la variante de color de la ventana de confirmación.
38
+ */
10
39
  export declare type VariantProps = Pick<WindowConfirmProps, 'variant'>;
40
+ /**
41
+ * Estado del propietario de la ventana de confirmación.
42
+ * Contiene las propiedades relacionadas con la variante de color.
43
+ */
11
44
  export declare type OwnerStateWindowConfim = VariantProps;
@@ -1,13 +1,13 @@
1
- import { A as Actions } from "../CommonActions/components/Actions/index.b8a1d42a.js";
1
+ import { A as Actions } from "../CommonActions/components/Actions/index.2f6286eb.js";
2
2
  import { Typography } from "@mui/material";
3
3
  import { useModuleDictionary, useEnvironment } from "@m4l/core";
4
- import { u as useModal } from "../../hooks/useModal/index.50b23c06.js";
4
+ import { u as useModal } from "../../hooks/useModal/index.786a4439.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
- import { I as Image } from "../Image/index.2b8dec69.js";
6
+ import { I as Image } from "../Image/index.d034ca68.js";
7
7
  import { m as modalUtilityClasses } from "./index.61389369.js";
8
- import { W as WindowBase } from "./WindowBase.321fa298.js";
9
- import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index.a29b596a.js";
10
- import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index.44b80eb3.js";
8
+ import { W as WindowBase } from "./WindowBase.998b8a38.js";
9
+ import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index.de862adf.js";
10
+ import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index.79fc2386.js";
11
11
  const dictionary = {
12
12
  MESSAGE: "common_actions.confirm_quit_msg"
13
13
  };
@@ -81,21 +81,24 @@ const WindowConfirm = (props) => {
81
81
  const classes = modalUtilityClasses({
82
82
  variant
83
83
  });
84
- return /* @__PURE__ */ jsxs(WindowBase, {
85
- title: getLabel("modal_dialog.label_window_confirm"),
86
- urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/dialog/assets/icons/window_confirm.svg`,
87
- children: [/* @__PURE__ */ jsx(MessageIlustration, {
88
- classes,
89
- msg,
90
- title
91
- }), /* @__PURE__ */ jsxs(Actions, {
92
- children: [/* @__PURE__ */ jsx(ActionCancel, {
93
- onClick: onCloseCancel
94
- }), /* @__PURE__ */ jsx(ActionIntro, {
95
- onClick: onClickIntro
84
+ return /* @__PURE__ */ jsxs(
85
+ WindowBase,
86
+ {
87
+ title: getLabel("modal_dialog.label_window_confirm"),
88
+ urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/dialog/assets/icons/window_confirm.svg`,
89
+ children: [/* @__PURE__ */ jsx(MessageIlustration, {
90
+ classes,
91
+ msg,
92
+ title
93
+ }), /* @__PURE__ */ jsxs(Actions, {
94
+ children: [/* @__PURE__ */ jsx(ActionCancel, {
95
+ onClick: onCloseCancel
96
+ }), /* @__PURE__ */ jsx(ActionIntro, {
97
+ onClick: onClickIntro
98
+ })]
96
99
  })]
97
- })]
98
- });
100
+ }
101
+ );
99
102
  };
100
103
  export {
101
104
  WindowConfirm as W
@@ -1,12 +1,12 @@
1
1
  import { generateUtilityClasses, generateUtilityClass, styled, Accordion as Accordion$1, AccordionSummary, AccordionDetails } from "@mui/material";
2
- import { I as IconButton } from "../IconButton/index.b3fe7a6e.js";
2
+ import { I as IconButton } from "../IconButton/index.9ea23f87.js";
3
3
  import { useEnvironment } from "@m4l/core";
4
4
  import { unstable_composeClasses } from "@mui/base";
5
5
  import clsx from "clsx";
6
6
  import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
7
7
  import { g as getNameDataTestId } from "../../../test/getNameDataTestId.14875ec7.js";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
- import { I as Icon } from "../../Icon/index.b99160ae.js";
9
+ import { I as Icon } from "../../Icon/index.b920baf8.js";
10
10
  import { T as Typography } from "../Typography/index.379dd374.js";
11
11
  const componentName = "M4LAccordion";
12
12
  generateUtilityClasses(componentName, [
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ButtonProps } from './types';
3
2
  /**
4
3
  * Provee un botón para que los clientes ejecuten acciones en la plataforma web.
@@ -6,4 +5,4 @@ import { ButtonProps } from './types';
6
5
  * @param props
7
6
  * @returns
8
7
  */
9
- export declare const Button: React.FC<ButtonProps>;
8
+ export declare const Button: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -5,7 +5,7 @@ import { unstable_composeClasses } from "@mui/base";
5
5
  import clsx from "clsx";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  import { useMemo } from "react";
8
- import { I as Image } from "../../Image/index.2b8dec69.js";
8
+ import { I as Image } from "../../Image/index.d034ca68.js";
9
9
  import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
10
10
  import { LoadingButton as LoadingButton$1 } from "@mui/lab";
11
11
  import { T as Typography } from "../Typography/index.379dd374.js";