@m4l/components 0.2.21 → 0.2.24

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.b00671fa.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.3a694645.js → index.7106417d.js} +2 -2
  11. package/components/AppBar/types.d.ts +6 -0
  12. package/components/CommonActions/components/ActionCancel/{index.bd595785.js → index.de862adf.js} +2 -2
  13. package/components/CommonActions/components/ActionFormCancel/{index.6fd990b7.js → index.3fd5c858.js} +4 -4
  14. package/components/CommonActions/components/ActionFormIntro/{index.798cb977.js → index.07394f62.js} +2 -2
  15. package/components/CommonActions/components/ActionIntro/{index.64498081.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.6faecd3c.js → index.36270dd1.js} +1 -1
  18. package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/{index.3cabb920.js → index.8b008692.js} +1 -1
  19. package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/{index.fd1bea19.js → index.cb308086.js} +1 -1
  20. package/components/DataGrid/{index.660a6e7b.js → index.b1eafce1.js} +3 -3
  21. package/components/DataGrid/subcomponents/Actions/{index.e07a52bf.js → index.9af87fa1.js} +10 -10
  22. package/components/DragResizeWindow/{index.7c402375.js → index.62b6a916.js} +3 -3
  23. package/components/DynamicFilter/{index.0d1fcfa7.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.770f86ae.js → index.b920baf8.js} +1 -1
  30. package/components/Image/{index.6dd3b128.js → index.d034ca68.js} +9 -13
  31. package/components/LanguagePopover/{index.b7f2816d.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.3a86956f.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.544940c7.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.08ec6c48.js → index.1024b856.js} +1 -1
  44. package/components/ObjectLogs/{index.0d263f80.js → index.d10f4a2f.js} +5 -5
  45. package/components/PDFViewer/{index.de51408a.js → index.98852f91.js} +1 -1
  46. package/components/Page/{index.09e28ba1.js → index.def863f2.js} +1 -1
  47. package/components/PaperForm/{index.130ce6ad.js → index.8a617a66.js} +1 -1
  48. package/components/Period/{index.3c7e8590.js → index.d80dff10.js} +2 -2
  49. package/components/PrintingSystem/{index.9dcfb35d.js → index.2e17cae5.js} +13 -13
  50. package/components/PrintingSystem/subcomponents/BodyNode/{index.a3897785.js → index.c5ffe20a.js} +1 -1
  51. package/components/PrintingSystem/subcomponents/ChartNode/{index.ecd5e809.js → index.020c037c.js} +25 -9
  52. package/components/PrintingSystem/subcomponents/DividerNode/{index.6e177f94.js → index.78b023bb.js} +1 -1
  53. package/components/PrintingSystem/subcomponents/FooterNode/{index.82f1e38f.js → index.b29fc1e9.js} +1 -1
  54. package/components/PrintingSystem/subcomponents/GridNode/{index.2b8fef69.js → index.11626284.js} +4 -2
  55. package/components/PrintingSystem/subcomponents/HeaderNode/{index.a5d48adf.js → index.ef44c8ab.js} +1 -1
  56. package/components/PrintingSystem/subcomponents/PaperNode/{index.a4c5c3e6.js → index.d72d224b.js} +1 -1
  57. package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.3764b312.js → index.8e53440c.js} +1 -1
  58. package/components/PrintingSystem/subcomponents/SectionNode/{index.4941ecf4.js → index.0b66458e.js} +1 -1
  59. package/components/PrintingSystem/subcomponents/TextBoxNode/{index.9cc3b262.js → index.b4c72fef.js} +1 -1
  60. package/components/PropertyValue/{index.d975c7f3.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.e55c9b7c.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.b5f27f85.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.c802bb2f.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.214d8c7d.js → index.f87c63ca.js} +14 -14
  94. package/components/areas/contexts/AreasContext/{index.055ab6e2.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.5da0bc90.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.1a73fecb.js +275 -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.7a463493.js → index.b3052107.js} +2 -2
  139. package/components/formatters/{index.648cf3b0.js → index.95cc337e.js} +1 -1
  140. package/components/hook-form/RHFAutocomplete/{index.d05ae217.js → index.cf399b24.js} +6 -2
  141. package/components/hook-form/RHFAutocompleteAsync/{index.699b8aaf.js → index.b2b75475.js} +1 -1
  142. package/components/hook-form/RHFColorPicker/{index.c069ef4d.js → index.48a1ee1b.js} +3 -3
  143. package/components/hook-form/RHFDateTime/{index.97bd36d7.js → index.5a673a96.js} +1 -1
  144. package/components/hook-form/RHFPeriod/{index.4e10efa3.js → index.4205c8ab.js} +1 -1
  145. package/components/hook-form/RHFTextField/{index.78934e84.js → index.fbb29ee1.js} +2 -2
  146. package/components/hook-form/RHFUpload/{index.7178a50b.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.14255209.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.f79ee169.js → WindowConfirm.55ac3c8f.js} +23 -20
  154. package/components/mui_extended/Accordion/{index.fb6849e8.js → index.fb4eb664.js} +2 -2
  155. package/components/mui_extended/Button/Button.d.ts +1 -2
  156. package/components/mui_extended/Button/{index.928f05b7.js → index.e520bd15.js} +1 -1
  157. package/components/mui_extended/IconButton/{index.023c369f.js → index.9ea23f87.js} +1 -1
  158. package/components/mui_extended/MenuActions/{index.34293162.js → index.fa7c26a5.js} +2 -2
  159. package/components/mui_extended/Pager/{index.212ee603.js → index.0c703574.js} +1 -1
  160. package/components/mui_extended/ToggleButton/{index.cb0fb441.js → index.bcaea74b.js} +1 -1
  161. package/components/mui_extended/ToggleIconButton/{index.49390b68.js → index.131772d7.js} +1 -1
  162. package/contexts/ModalContext/{index.e8f5ad3e.js → index.978a412d.js} +1 -1
  163. package/hooks/useFormAddEdit/{index.5e748884.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.448153f1.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.2c881bac.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.daffbfe5.js +0 -114
  178. package/utils/{index.79b6a2c1.js → index.de903261.js} +3 -3
@@ -0,0 +1,275 @@
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
+ } = itemRootData;
115
+ const [anchorEl, setAnchorEl] = useState(null);
116
+ const [openedPopoverId, setOpenedPopoverId] = useState(null);
117
+ const handleClick = (event, popoverId) => {
118
+ setAnchorEl(event.currentTarget);
119
+ setOpenedPopoverId(popoverId);
120
+ };
121
+ const handleClose = () => {
122
+ setAnchorEl(null);
123
+ setOpenedPopoverId(null);
124
+ };
125
+ const renderMenuItems = (items) => {
126
+ return items.map((item, index) => /* @__PURE__ */ jsx(Grid, {
127
+ item: true,
128
+ xs: 12,
129
+ children: item.children ? item.children && item.children.length > 0 && /* @__PURE__ */ jsx(Accordion, {
130
+ label: item.title,
131
+ children: renderMenuItems(item.children)
132
+ }) : /* @__PURE__ */ jsx("div", {
133
+ className: clsx(classes.ItemSelect, item.path === window.location.pathname ? TopBarClasses.IsActive : null),
134
+ ...process.env.NODE_ENV !== "production" ? {
135
+ [TEST_PROP_ID]: getNameDataTestId(componentName, "ItemSelect", dataTestId)
136
+ } : {},
137
+ children: /* @__PURE__ */ jsx(Button, {
138
+ variant: "text",
139
+ href: item.path,
140
+ fullWidth: true,
141
+ children: item.title
142
+ })
143
+ })
144
+ }, index));
145
+ };
146
+ const renderPopover = () => {
147
+ return /* @__PURE__ */ jsx(Popover, {
148
+ elevation: 3,
149
+ id: module_id,
150
+ open: openedPopoverId === itemRootData.module_id ? true : false,
151
+ anchorEl,
152
+ onClose: handleClose,
153
+ anchorOrigin: {
154
+ vertical: "bottom",
155
+ horizontal: "center"
156
+ },
157
+ transformOrigin: {
158
+ vertical: "top",
159
+ horizontal: "center"
160
+ },
161
+ arrowType: "top-center",
162
+ sx: {
163
+ ...theme.components?.M4LPopoverTopBar?.styleOverrides
164
+ },
165
+ children: /* @__PURE__ */ jsx(Grid, {
166
+ container: true,
167
+ spacing: 0.5,
168
+ children: children && children.length > 0 && renderMenuItems(children)
169
+ })
170
+ });
171
+ };
172
+ const render = () => {
173
+ if (itemRootData.children && itemRootData.path) {
174
+ return /* @__PURE__ */ jsxs("div", {
175
+ className: classes.ContainerAccordionCase1,
176
+ ...process.env.NODE_ENV !== "production" ? {
177
+ [TEST_PROP_ID]: getNameDataTestId(componentName, "ContainerAccordionCase1", dataTestId)
178
+ } : {},
179
+ children: [/* @__PURE__ */ jsx(Button, {
180
+ size: "medium",
181
+ variant: "text",
182
+ href: itemRootData.path,
183
+ children: title
184
+ }), /* @__PURE__ */ jsx(Button, {
185
+ variant: "text",
186
+ id: module_id,
187
+ onClick: (e) => handleClick(e, module_id),
188
+ endIcon: /* @__PURE__ */ jsx(ArrowIcon, {
189
+ openState: openedPopoverId === module_id ? true : false
190
+ })
191
+ }), renderPopover()]
192
+ });
193
+ }
194
+ if (itemRootData.children) {
195
+ return /* @__PURE__ */ jsxs("div", {
196
+ className: classes.ContainerAccordion,
197
+ ...process.env.NODE_ENV !== "production" ? {
198
+ [TEST_PROP_ID]: getNameDataTestId(componentName, "ContainerAccordion", dataTestId)
199
+ } : {},
200
+ children: [/* @__PURE__ */ jsx(Button, {
201
+ "aria-describedby": module_id,
202
+ variant: "text",
203
+ size: "medium",
204
+ onClick: (e) => handleClick(e, itemRootData.module_id),
205
+ endIcon: /* @__PURE__ */ jsx(ArrowIcon, {
206
+ openState: openedPopoverId === module_id ? true : false
207
+ }),
208
+ children: title
209
+ }), renderPopover()]
210
+ });
211
+ }
212
+ if (itemRootData.path)
213
+ return /* @__PURE__ */ jsx(Button, {
214
+ variant: "text",
215
+ size: "medium",
216
+ href: itemRootData.path,
217
+ "aria-describedby": module_id,
218
+ children: /* @__PURE__ */ jsx("div", {
219
+ children: title
220
+ })
221
+ });
222
+ };
223
+ return /* @__PURE__ */ jsx(Box, {
224
+ className: clsx(classes.ItemRoot, isActive(itemRootData) || openedPopoverId === itemRootData.module_id ? TopBarClasses.IsActive : null),
225
+ ...process.env.NODE_ENV !== "production" ? {
226
+ [TEST_PROP_ID]: getNameDataTestId(componentName, "ItemRoot", dataTestId)
227
+ } : {},
228
+ children: render()
229
+ });
230
+ };
231
+ const ConteinItem = () => {
232
+ const {
233
+ dataMenu: DataMenu,
234
+ classes,
235
+ dataTestId
236
+ } = useTopBar$1();
237
+ return /* @__PURE__ */ jsx(Fragment, {
238
+ children: /* @__PURE__ */ jsx("div", {
239
+ className: classes.SimplebarComercial,
240
+ ...process.env.NODE_ENV !== "production" ? {
241
+ [TEST_PROP_ID]: getNameDataTestId(componentName, "SimplebarComercial", dataTestId)
242
+ } : {},
243
+ children: DataMenu.map((group) => /* @__PURE__ */ jsx(NavItemRoot, {
244
+ itemRootData: group
245
+ }, group.module_id))
246
+ })
247
+ });
248
+ };
249
+ const TopBarRoot = styled("header")(({ theme }) => ({
250
+ ...theme.components?.M4LTopBar?.styleOverrides
251
+ }));
252
+ const TopBar = (props) => {
253
+ const {
254
+ dataMenu: DataMenu,
255
+ dataTestId
256
+ } = props;
257
+ const classes = getTopBarClassesUtilityClass();
258
+ return /* @__PURE__ */ jsx(TopBarRoot, {
259
+ className: classes.root,
260
+ ...process.env.NODE_ENV !== "production" ? {
261
+ [TEST_PROP_ID]: getNameDataTestId(componentName, "root", dataTestId)
262
+ } : {},
263
+ children: /* @__PURE__ */ jsx(TopBarProvider, {
264
+ value: {
265
+ dataMenu: DataMenu,
266
+ classes,
267
+ dataTestId
268
+ },
269
+ children: /* @__PURE__ */ jsx(ConteinItem, {})
270
+ })
271
+ });
272
+ };
273
+ export {
274
+ TopBar as T
275
+ };
@@ -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.770f86ae.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.648cf3b0.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.7a463493.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.6dd3b128.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.023c369f.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.d05ae217.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.448153f1.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.770f86ae.js";
14
- import { B as Button } from "../../mui_extended/Button/index.928f05b7.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.770f86ae.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.3c7e8590.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.023c369f.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.6dd3b128.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.928f05b7.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.023c369f.js";
6
- import { I as Icon } from "../Icon/index.770f86ae.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.6dd3b128.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.14255209.js";
9
- import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index.bd595785.js";
10
- import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index.64498081.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.023c369f.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.770f86ae.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.6dd3b128.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";
@@ -1,7 +1,7 @@
1
1
  import { useMemo, useState } from "react";
2
2
  import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
3
3
  import { Skeleton, styled, generateUtilityClasses, generateUtilityClass, Tooltip, IconButton as IconButton$1 } from "@mui/material";
4
- import { I as Icon } from "../../Icon/index.770f86ae.js";
4
+ import { I as Icon } from "../../Icon/index.b920baf8.js";
5
5
  import { jsx, Fragment } from "react/jsx-runtime";
6
6
  import { unstable_composeClasses } from "@mui/base";
7
7
  import clsx from "clsx";