@m4l/components 3.1.6 → 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.
Files changed (203) hide show
  1. package/components/mui_extended/IconButton/index.d.ts +1 -1
  2. package/components/mui_extended/MenuActions/slots/MenuActionsSlots.d.ts +2 -4
  3. package/index.js +183 -339
  4. package/node_modules-CQtkw0uG.js +7350 -0
  5. package/package.json +1 -1
  6. package/vendor-AfIOyqRr.js +24636 -0
  7. package/components/AccountPopover/index-BdnzI23R.js +0 -334
  8. package/components/AppBar/index-Dvrx1jsr.js +0 -93
  9. package/components/BaseModule/index-BQ2UIUCy.js +0 -30
  10. package/components/CommonActions/components/ActionCancel/index-DSVEMl41.js +0 -12
  11. package/components/CommonActions/components/ActionFormCancel/index-DMsGH0wx.js +0 -56
  12. package/components/CommonActions/components/ActionFormIntro/index-C8zb7R3W.js +0 -33
  13. package/components/CommonActions/components/ActionIntro/index-BNIG3KAH.js +0 -25
  14. package/components/CommonActions/components/Actions/index-90JsZTzb.js +0 -70
  15. package/components/DataGrid/constants-8L7QgBKi.js +0 -10
  16. package/components/DataGrid/formatters/ColumnBooleanFormatter/index-ZsSxUL_T.js +0 -26
  17. package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/index-D-gZpvcm.js +0 -22
  18. package/components/DataGrid/formatters/ColumnDateFormatter/index-CKg8CJ6A.js +0 -19
  19. package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index-kZGiDU5k.js +0 -23
  20. package/components/DataGrid/formatters/ColumnNestedValueFormatter/index-BslXGK-A.js +0 -14
  21. package/components/DataGrid/formatters/ColumnPointsFormatter/index-BXGW2CsK.js +0 -10
  22. package/components/DataGrid/formatters/ColumnPriceFormatter/index-O11tBykn.js +0 -10
  23. package/components/DataGrid/formatters/ColumnSetCheckFormatter/index-BaCawLr1.js +0 -36
  24. package/components/DataGrid/formatters/ColumnUncertaintyFormatter/index-Cq7a-jnE.js +0 -10
  25. package/components/DataGrid/formatters/index-iKq2iRoa.js +0 -13
  26. package/components/DataGrid/index-DGHnRo8z.js +0 -908
  27. package/components/DataGrid/subcomponents/Actions/index-BhBvobKS.js +0 -549
  28. package/components/DataGrid/subcomponents/editors/TextEditor/index-BIFm8akr.js +0 -80
  29. package/components/DragResizeWindow/index-D2jLYExo.js +0 -505
  30. package/components/DynamicFilter/constants-ByqmFATV.js +0 -31
  31. package/components/DynamicFilter/dictionary-D9Z9YGDb.js +0 -51
  32. package/components/DynamicFilter/index-CRmtRWlr.js +0 -116
  33. package/components/DynamicFilter/slots/SlotsEnum-cawFeNzx.js +0 -34
  34. package/components/DynamicFilter/slots/dynamicFilterSlots-CQiB8TmY.js +0 -151
  35. package/components/DynamicFilter/slots/index-l0sNRNKZ.js +0 -1
  36. package/components/DynamicFilter/store/index-DoIifWTk.js +0 -254
  37. package/components/DynamicFilter/subcomponents/AppliedFilterChip/index-DQESCg04.js +0 -60
  38. package/components/DynamicFilter/subcomponents/AppliedFilters/index-CGmflaoY.js +0 -26
  39. package/components/DynamicFilter/subcomponents/DynamicFilterBase/index-BfH6YHNi.js +0 -40
  40. package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index-Dv3KjuYK.js +0 -129
  41. package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index-BnhNICK4.js +0 -171
  42. package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index-CNN6DeHY.js +0 -153
  43. package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index-C2dNPFtM.js +0 -146
  44. package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index-B03ahaU6.js +0 -114
  45. package/components/DynamicFilter/subcomponents/FieldTypes/index-EF7A6WnZ.js +0 -38
  46. package/components/DynamicFilter/subcomponents/FilterActions/index-CQtA2ELu.js +0 -88
  47. package/components/DynamicFilter/subcomponents/InputFilter/index-EXbXDSZA.js +0 -188
  48. package/components/DynamicFilter/subcomponents/PopoverFilter/index-BX8YCh9v.js +0 -158
  49. package/components/DynamicFilter/subcomponents/PopoverMenuFields/index-DvAYf5-a.js +0 -63
  50. package/components/FieldLabel/index-C8od8D0w.js +0 -54
  51. package/components/GridLayout/index-EPw3AYiQ.js +0 -1044
  52. package/components/GridLayout/subcomponents/Griditem/index-B8Q7iMhr.js +0 -395
  53. package/components/GridLayout/subcomponents/Responsive/index-D6BbBdVx.js +0 -348
  54. package/components/GridLayout/subcomponents/SizeProvider/index-OhbtnEN4.js +0 -71
  55. package/components/HelperText/index-sLK3dYG0.js +0 -50
  56. package/components/Icon/index-BJF_0F6d.js +0 -176
  57. package/components/Image/index-BxphCFC7.js +0 -175
  58. package/components/LanguagePopover/index-CkKie1Ph.js +0 -179
  59. package/components/LinearProgressIndeterminate/index-CTvXOPRx.js +0 -55
  60. package/components/Loadable/index-BMbi9ISF.js +0 -9
  61. package/components/LoadingError/index-BaaPhmyF.js +0 -89
  62. package/components/MFIsolationApp/index-BfHLGDcN.js +0 -169
  63. package/components/MFLoader/index-B8FmSpE7.js +0 -299
  64. package/components/ModalDialog/index-WSVr5sZr.js +0 -77
  65. package/components/NavLink/index-CKgi5l5M.js +0 -55
  66. package/components/NoItemSelected/index-BKsZKc_f.js +0 -54
  67. package/components/ObjectLogs/index-BJkjYQaa.js +0 -233
  68. package/components/PDFViewer/index-Cnbioqzo.js +0 -51
  69. package/components/Page/index-DSSwuNSp.js +0 -117
  70. package/components/PaperForm/index-C1OKDnuY.js +0 -59
  71. package/components/Period/index-DYE7Bj45.js +0 -238
  72. package/components/PrintingSystem/index-BkfHXcTV.js +0 -187
  73. package/components/PrintingSystem/subcomponents/BodyNode/index-Btg2zXVQ.js +0 -49
  74. package/components/PrintingSystem/subcomponents/ChartNode/index-GLjhqKd2.js +0 -105
  75. package/components/PrintingSystem/subcomponents/DividerNode/index-D9T1MWQd.js +0 -20
  76. package/components/PrintingSystem/subcomponents/FooterNode/index-C3LET1ZY.js +0 -49
  77. package/components/PrintingSystem/subcomponents/GridNode/index-BPz7lGvC.js +0 -74
  78. package/components/PrintingSystem/subcomponents/HeaderNode/index-DY4Yci1r.js +0 -49
  79. package/components/PrintingSystem/subcomponents/PaperNode/index-BYoGJll5.js +0 -30
  80. package/components/PrintingSystem/subcomponents/PropertyValueNode/index-vFZ5Skyl.js +0 -47
  81. package/components/PrintingSystem/subcomponents/SectionNode/index-BNqGWpcj.js +0 -49
  82. package/components/PrintingSystem/subcomponents/TextBoxNode/index-wgdfWbfF.js +0 -24
  83. package/components/PropertyValue/index-dwO3Qo0Y.js +0 -264
  84. package/components/Resizeable/index-CHseEYjL.js +0 -20
  85. package/components/ScrollBar/index-BYMy_qJE.js +0 -35
  86. package/components/ScrollToTop/index-TxORk5dB.js +0 -12
  87. package/components/SideBar/index-DqKD_S9_.js +0 -758
  88. package/components/SplitLayout/index-D4lxi0ig.js +0 -89
  89. package/components/ToastContainer/index-jnQcIcV1.js +0 -191
  90. package/components/WrapperComponent/index-BHV-CsDU.js +0 -14
  91. package/components/animate/LoadingScreen/index-CTGGa4Yt.js +0 -70
  92. package/components/animate/MotionContainer/index-eartnWyO.js +0 -34
  93. package/components/animate/MotionLazyContainer/index-Be8osTiG.js +0 -9
  94. package/components/animate/PropagateLoader/index-Bkq8V2SN.js +0 -23
  95. package/components/animate/features-BbnE33u3.js +0 -5
  96. package/components/animate/index-9dC9NmWv.js +0 -89
  97. package/components/animate/variants/bounce-DanQqHAX.js +0 -101
  98. package/components/animate/variants/container-Dmpr6tg5.js +0 -22
  99. package/components/animate/variants/fade-CAOJNn06.js +0 -65
  100. package/components/animate/variants/index-l0sNRNKZ.js +0 -1
  101. package/components/animate/variants/transition-B9W5SWTa.js +0 -20
  102. package/components/areas/components/AreasAdmin/index-BU9AX60_.js +0 -699
  103. package/components/areas/components/AreasViewer/index-CPlZxIzK.js +0 -805
  104. package/components/areas/components/index-l0sNRNKZ.js +0 -1
  105. package/components/areas/constants-rqODZNZe.js +0 -6
  106. package/components/areas/contexts/AreasContext/index-DGguLxcX.js +0 -1110
  107. package/components/areas/contexts/DynamicMFParmsContext/index-22c6E7vK.js +0 -36
  108. package/components/areas/contexts/WindowToolsMFContext/index-DkE30fhm.js +0 -12
  109. package/components/areas/contexts/index-l0sNRNKZ.js +0 -1
  110. package/components/areas/dictionary-YUsP9beq.js +0 -36
  111. package/components/areas/hooks/index-l0sNRNKZ.js +0 -1
  112. package/components/areas/hooks/useAreas/index-DBXtbtIu.js +0 -11
  113. package/components/areas/hooks/useDynamicMFParameters/index-DhbcZPs9.js +0 -12
  114. package/components/areas/hooks/useSetWindowsTitle/useSetWindowsTitle-BzPD-miW.js +0 -31
  115. package/components/areas/hooks/useWindowToolsMF/index-BECQfhbC.js +0 -10
  116. package/components/areas/icons-CwFr-alN.js +0 -24
  117. package/components/areas/index-B_Odny9h.js +0 -22
  118. package/components/commercial/AppBarCommercial/index-faX1fxjn.js +0 -28
  119. package/components/commercial/SectionCommercial/index-Dspd2Hd7.js +0 -56
  120. package/components/commercial/TopBar/index-zACdM_C0.js +0 -232
  121. package/components/commercial/index-9P0yOdH4.js +0 -81
  122. package/components/formatters/BooleanFormatter/index-PoFZ3r_m.js +0 -44
  123. package/components/formatters/DateFormatter/index-CGcRZ8BA.js +0 -43
  124. package/components/formatters/PointsFormatter/index-C7sR8iqk.js +0 -25
  125. package/components/formatters/PriceFormatter/index-CsvRawmc.js +0 -35
  126. package/components/formatters/UncertaintyFormatter/index-B9ESVEVp.js +0 -29
  127. package/components/formatters/index-CEJ6VCMb.js +0 -109
  128. package/components/hook-form/HelperError/index-DRvAkpwm.js +0 -19
  129. package/components/hook-form/RHFAutocomplete/index-DS57m8AX.js +0 -657
  130. package/components/hook-form/RHFAutocompleteAsync/index-Bu6NYmG_.js +0 -226
  131. package/components/hook-form/RHFCheckbox/index-BsB42rRc.js +0 -132
  132. package/components/hook-form/RHFColorPicker/index-Dox0FPrV.js +0 -191
  133. package/components/hook-form/RHFDateTime/index-ef19Az1N.js +0 -190
  134. package/components/hook-form/RHFMultiCheckbox/index-BARudV1A.js +0 -34
  135. package/components/hook-form/RHFPeriod/index-DyRLTD0w.js +0 -98
  136. package/components/hook-form/RHFRadioGroup/index-pgTLVF9t.js +0 -52
  137. package/components/hook-form/RHFSelect/index-LdwRuFz-.js +0 -29
  138. package/components/hook-form/RHFTextField/index-BgsElxUF.js +0 -337
  139. package/components/hook-form/RHFUpload/index-B6m3ypzh.js +0 -253
  140. package/components/maps/components/GpsTools/index-CeLi75XZ.js +0 -1948
  141. package/components/maps/components/Map/index-D4B8Lfgv.js +0 -2545
  142. package/components/maps/index-Ci-7-FHg.js +0 -7
  143. package/components/modal/WindowBase-CkftshqR.js +0 -44
  144. package/components/modal/WindowConfirm-C5YnzF-B.js +0 -73
  145. package/components/modal/index-CydPIpKZ.js +0 -65
  146. package/components/mui_extended/Accordion/index-jF2uxSmi.js +0 -124
  147. package/components/mui_extended/Avatar/index-CHmsrmfc.js +0 -64
  148. package/components/mui_extended/Badge/index-B_BGIjkQ.js +0 -29
  149. package/components/mui_extended/BoxIcon/index-BUTJ2tKw.js +0 -22
  150. package/components/mui_extended/Breadcrumbs/index-DTS7rOZH.js +0 -86
  151. package/components/mui_extended/Button/index-CgvCim_g.js +0 -222
  152. package/components/mui_extended/CheckBox-H73kpinr.js +0 -76
  153. package/components/mui_extended/CircularProgress/index-Bnnti_G6.js +0 -8
  154. package/components/mui_extended/IconButton/classes/constants-ChY2jKkp.js +0 -4
  155. package/components/mui_extended/IconButton/classes/index-BxjJGAqZ.js +0 -45
  156. package/components/mui_extended/IconButton/index-B8lOMybH.js +0 -117
  157. package/components/mui_extended/IconButton/styledIconButton-fAsbGoFS.js +0 -7
  158. package/components/mui_extended/IconButton/types-l0sNRNKZ.js +0 -1
  159. package/components/mui_extended/LinearProgress/index-CGgW8jq2.js +0 -9
  160. package/components/mui_extended/LinkWithRoute/index-BC2miUjR.js +0 -15
  161. package/components/mui_extended/MenuActions/MenuActions-DA_aS7o5.js +0 -149
  162. package/components/mui_extended/MenuActions/constants-BwsU9chA.js +0 -10
  163. package/components/mui_extended/MenuActions/dictionary-Dj_07puT.js +0 -11
  164. package/components/mui_extended/MenuActions/slots/MenuActionsEnum-Bu-L6eWU.js +0 -13
  165. package/components/mui_extended/MenuActions/slots/MenuActionsSlots-BVp0M8fu.js +0 -47
  166. package/components/mui_extended/Pager/index-Dtk4aUiU.js +0 -257
  167. package/components/mui_extended/Popover/index-Dl1PwIS2.js +0 -153
  168. package/components/mui_extended/Stack/index-CRzpVi2a.js +0 -31
  169. package/components/mui_extended/Tab/index-DmrsMLOq.js +0 -129
  170. package/components/mui_extended/ToggleButton/index-CAnHC1N-.js +0 -18
  171. package/components/mui_extended/Tooltip/index-B8QUytCK.js +0 -42
  172. package/components/mui_extended/Typography/index-DXq1fG8k.js +0 -54
  173. package/components/mui_extended/index-l0sNRNKZ.js +0 -1
  174. package/components/popups/PopupsProvider/index-DhSxmtfJ.js +0 -172
  175. package/components/popups/PopupsViewer/constants-DuyD7aCn.js +0 -4
  176. package/components/popups/PopupsViewer/icons-BUujqqbu.js +0 -7
  177. package/components/popups/PopupsViewer/index-CMI1SK_O.js +0 -172
  178. package/components/popups/PopupsViewer/slots/index-B98CiRLa.js +0 -14
  179. package/components/popups/PopupsViewer/slots/popupsViewerSlots-DOkmuvnx.js +0 -46
  180. package/components/popups/index-l0sNRNKZ.js +0 -1
  181. package/contexts/ModalContext/index-Bp_s1qUm.js +0 -39
  182. package/contexts/RHFormContext/index-BQ0XWrpK.js +0 -78
  183. package/hocs/withToggle/index-C1_DMZD3.js +0 -14
  184. package/hooks/useFormAddEdit/index-dLVQB7hC.js +0 -90
  185. package/hooks/useFormReadyForUpdate/index-B3HygFCM.js +0 -20
  186. package/hooks/useModal/index-69rbrQ0v.js +0 -10
  187. package/hooks/useSizeContainer/index-D4hDjM1P.js +0 -37
  188. package/hooks/useStateRef/index-C3P6ZK3m.js +0 -15
  189. package/hooks/useTab/index-DYRxOmMI.js +0 -12
  190. package/react-data-grid-BfYuZ6AK.js +0 -2606
  191. package/react-draggable-DsCPdgQP.js +0 -811
  192. package/react-json-view-bhqIAaNg.js +0 -2576
  193. package/react-resizable-eBbFl2dX.js +0 -618
  194. package/react-spinners-TpKN9lZg.js +0 -123
  195. package/react-splitter-layout-C-JTsNGs.js +0 -158
  196. package/styles/DynamicFilter-CJFsIegc.js +0 -319
  197. package/styles/MenuActions-lTi-ynPM.js +0 -42
  198. package/styles/index-CqpubQQr.js +0 -1691
  199. package/test/constants_no_mock-CF-669v-.js +0 -4
  200. package/test/getNameDataTestId-BaBTWhBr.js +0 -10
  201. package/utils/index-DiMrtgIu.js +0 -502
  202. /package/components/GridLayout/subcomponents/{Griditem → GridItem}/index.d.ts +0 -0
  203. /package/components/GridLayout/subcomponents/{Griditem → GridItem}/types.d.ts +0 -0
@@ -1,36 +0,0 @@
1
- import { createStore } from "zustand";
2
- import { immer } from "zustand/middleware/immer";
3
- import { jsx } from "react/jsx-runtime";
4
- import React__default, { createContext } from "react";
5
- const createDynamicMFStore = (initProps) => {
6
- const startProps = {
7
- ...initProps
8
- };
9
- return createStore(
10
- immer((set, _get) => ({
11
- ...startProps,
12
- actions: {
13
- changeData: (newDynamicMFState) => {
14
- set((state) => {
15
- state.dynamicMFParameters = {
16
- ...state.dynamicMFParameters,
17
- ...newDynamicMFState
18
- };
19
- });
20
- }
21
- }
22
- }))
23
- );
24
- };
25
- const DynamicMFParmsContext = createContext(null);
26
- function DynamicMFParmsProvider(props) {
27
- const { children, store } = props;
28
- return /* @__PURE__ */ jsx(DynamicMFParmsContext.Provider, { value: store, children });
29
- }
30
- const MemonizedDynamicMFParmsProvider = React__default.memo(DynamicMFParmsProvider);
31
- export {
32
- DynamicMFParmsProvider as D,
33
- MemonizedDynamicMFParmsProvider as M,
34
- DynamicMFParmsContext as a,
35
- createDynamicMFStore as c
36
- };
@@ -1,12 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import React__default, { createContext } from "react";
3
- const WindowToolsMFContext = createContext(null);
4
- function WindowToolsMFProvider(props) {
5
- const { children, ...other } = props;
6
- return /* @__PURE__ */ jsx(WindowToolsMFContext.Provider, { value: { ...other }, children });
7
- }
8
- React__default.memo(WindowToolsMFProvider);
9
- export {
10
- WindowToolsMFProvider as W,
11
- WindowToolsMFContext as a
12
- };
@@ -1,36 +0,0 @@
1
- const AREAS_DICTIONARY_ID = "areas";
2
- function getAreasComponentsDictionary() {
3
- return [AREAS_DICTIONARY_ID];
4
- }
5
- const LABEL_FILTER_BUTTON = "filter_tooltip";
6
- const DICCTIONARY = {
7
- label_new_area: "label_new_area",
8
- label_persist_module_cookies: "label_persist_module_cookies",
9
- validation_edit_area: "validation_edit_area",
10
- label_edit_area: "label_edit_area",
11
- label_delete_area: "label_delete_area",
12
- label_window_colapse: "label_window_colapse",
13
- label_window_un_colapse: "label_window_un_colapse",
14
- area_error_title: "area_error_title",
15
- area_error_description: "area_error_description",
16
- area_error_recommendation: "area_error_recommendation",
17
- area_error_intro: "area_error_intro",
18
- area_add_new: "area_add_new",
19
- label_reset_module_cookies: "label_reset_module_cookies",
20
- label_close_window: "label_close_window",
21
- label_maximize_window: "label_maximize_window",
22
- label_minimize_window: "label_minimize_window",
23
- label_collapse_window: "label_collapse_window",
24
- label_uncollapse_window: "label_uncollapse_window",
25
- label_module_actions: "label_module_actions"
26
- };
27
- const getAreasDictionary = (key) => {
28
- return `${AREAS_DICTIONARY_ID}.${key}`;
29
- };
30
- export {
31
- AREAS_DICTIONARY_ID as A,
32
- DICCTIONARY as D,
33
- LABEL_FILTER_BUTTON as L,
34
- getAreasComponentsDictionary as a,
35
- getAreasDictionary as g
36
- };
@@ -1,11 +0,0 @@
1
- import { useContext } from "react";
2
- import { useStore } from "zustand";
3
- import { b as AreasContext } from "../../contexts/AreasContext/index-DGguLxcX.js";
4
- function useAreasStore(selector, equalityFn) {
5
- const context = useContext(AreasContext);
6
- if (!context) throw new Error("useAreasStore context must be use inside AreasContext");
7
- return useStore(context, selector, equalityFn);
8
- }
9
- export {
10
- useAreasStore as u
11
- };
@@ -1,12 +0,0 @@
1
- import { useContext } from "react";
2
- import { useStore } from "zustand";
3
- import { a as DynamicMFParmsContext } from "../../contexts/DynamicMFParmsContext/index-22c6E7vK.js";
4
- function useDynamicMFParametersStore(selector, equalityFn) {
5
- const store = useContext(DynamicMFParmsContext);
6
- if (!store)
7
- throw new Error("useDynamicMFParametersStore context must be use inside DynamicMFParmsContext");
8
- return useStore(store, selector, equalityFn);
9
- }
10
- export {
11
- useDynamicMFParametersStore as u
12
- };
@@ -1,31 +0,0 @@
1
- import { useEffect } from "react";
2
- import { shallow } from "zustand/shallow";
3
- import { useFlagsPresent, CommonFlags, useModuleDictionary } from "@m4l/core";
4
- import { u as useWindowToolsMF } from "../useWindowToolsMF/index-BECQfhbC.js";
5
- import { u as useDynamicMFParametersStore } from "../useDynamicMFParameters/index-DhbcZPs9.js";
6
- const titleLabels = {
7
- moduleName: "module_name",
8
- moduleNameAdd: "module_name_add",
9
- moduleNameEdit: "module_name_edit"
10
- };
11
- function useSetWindowsTitle({
12
- isAddEditModule = false
13
- } = {}) {
14
- const isFlagPresent = useFlagsPresent([CommonFlags.FLAG_DICTIONARY_LOADED]);
15
- const { getLabel } = useModuleDictionary();
16
- const { setWindowTitle } = useWindowToolsMF();
17
- const id = useDynamicMFParametersStore(
18
- // objectId or id puede ser el nombre del parametro del con el Id que se está editando en los modulos add/edit
19
- (state) => state.dynamicMFParameters?.objectId || state.dynamicMFParameters?.id,
20
- shallow
21
- );
22
- useEffect(() => {
23
- if (isFlagPresent) {
24
- const labelKey = isAddEditModule ? id ? titleLabels.moduleNameEdit : titleLabels.moduleNameAdd : titleLabels.moduleName;
25
- setWindowTitle(getLabel(labelKey));
26
- }
27
- }, [getLabel, isFlagPresent]);
28
- }
29
- export {
30
- useSetWindowsTitle as u
31
- };
@@ -1,10 +0,0 @@
1
- import { useContext } from "react";
2
- import { a as WindowToolsMFContext } from "../../contexts/WindowToolsMFContext/index-DkE30fhm.js";
3
- const useWindowToolsMF = () => {
4
- const context = useContext(WindowToolsMFContext);
5
- if (!context) throw new Error("useWindowToolsMF context must be use inside WindowToolsMFContext");
6
- return context;
7
- };
8
- export {
9
- useWindowToolsMF as u
10
- };
@@ -1,24 +0,0 @@
1
- const ICONS = {
2
- CLOSE: "close.svg",
3
- MAXIMIZE: "maximize.svg",
4
- NORMALIZE: "normalize.svg",
5
- COLAPSE: "colapse.svg",
6
- UNCOLPASE: "uncolapse.svg",
7
- RESET_COOKIES: "reset_cookies.svg",
8
- SAVE_COOKIES: "save_cookies.svg",
9
- DELETE_AREA: "delete_area.svg",
10
- ADD_AREA: "add_area.svg",
11
- LAYERS: "layers.svg",
12
- NAVIGATE_ERROR: "navegate_error.svg",
13
- EDIT_AREA: "edit.svg",
14
- CHECK: "checkmarkInCircle.svg",
15
- RESIZE: "controlSize.svg",
16
- VERSION: "version.svg",
17
- SHOW_OPTIONS: "showMoreVertical.svg",
18
- CHEVRON_DOWN: "chevronDown.svg",
19
- MODULE: "module.svg",
20
- POPUP: "popup.svg"
21
- };
22
- export {
23
- ICONS as I
24
- };
@@ -1,22 +0,0 @@
1
- import { useEffect } from "react";
2
- function useOnClickOutside(ref, handler, noRef) {
3
- useEffect(() => {
4
- const listener = (event) => {
5
- const el = ref?.current;
6
- const noEl = noRef?.current;
7
- if (!el || el.contains(event.target) || noEl && noEl.contains(event.target)) {
8
- return;
9
- }
10
- handler(event);
11
- };
12
- document.addEventListener("mousedown", listener);
13
- document.addEventListener("touchstart", listener);
14
- return () => {
15
- document.removeEventListener("mousedown", listener);
16
- document.removeEventListener("touchstart", listener);
17
- };
18
- }, [ref, handler]);
19
- }
20
- export {
21
- useOnClickOutside as u
22
- };
@@ -1,28 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { generateUtilityClasses } from "@mui/material";
3
- import { unstable_composeClasses } from "@mui/base";
4
- import { g as getComponentUtilityClass } from "../../../utils/index-DiMrtgIu.js";
5
- import { ab as AppBarComercialRoot } from "../../../styles/index-CqpubQQr.js";
6
- const componentName = "M4LAppBarCommercial";
7
- generateUtilityClasses(
8
- componentName,
9
- [
10
- /* elements */
11
- "root"
12
- /* states or variants of elements */
13
- ]
14
- );
15
- const useAppBarComercialUtilityClasses = () => {
16
- const slots = {
17
- root: ["root"]
18
- };
19
- return unstable_composeClasses(slots, getComponentUtilityClass(componentName), {});
20
- };
21
- const AppBarComercial = (props) => {
22
- const { children } = props;
23
- const classes = useAppBarComercialUtilityClasses();
24
- return /* @__PURE__ */ jsx(AppBarComercialRoot, { className: classes.root, children });
25
- };
26
- export {
27
- AppBarComercial as A
28
- };
@@ -1,56 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { generateUtilityClasses } from "@mui/material";
3
- import { unstable_composeClasses } from "@mui/base";
4
- import { g as getComponentUtilityClass } from "../../../utils/index-DiMrtgIu.js";
5
- import { ac as SectionCommercialRoot } from "../../../styles/index-CqpubQQr.js";
6
- const componentName = "M4LSectionCommercial";
7
- generateUtilityClasses(
8
- componentName,
9
- [
10
- /* elements */
11
- "root",
12
- /* states or variants of elements */
13
- "fullWidth",
14
- "boxed",
15
- "columnReverse"
16
- ]
17
- );
18
- const useAppBarComercialUtilityClasses = (ownerState) => {
19
- const slots = {
20
- root: [
21
- "root",
22
- ownerState.contentWith === "fullWidth" && "fullWidth",
23
- ownerState.contentWith === "boxed" && "boxed",
24
- ownerState.columnReverse && "columnReverse"
25
- ]
26
- };
27
- return unstable_composeClasses(slots, getComponentUtilityClass(componentName), {});
28
- };
29
- const SectionCommercial = (props) => {
30
- const {
31
- children,
32
- contentWith = "boxed",
33
- paddingX = "40px",
34
- paddingY,
35
- columnReverse = false,
36
- ...others
37
- } = props;
38
- const ownerState = {
39
- contentWith,
40
- columnReverse
41
- };
42
- const classes = useAppBarComercialUtilityClasses(ownerState);
43
- return /* @__PURE__ */ jsx(
44
- SectionCommercialRoot,
45
- {
46
- className: classes.root,
47
- paddingY,
48
- ...others,
49
- ...contentWith === "boxed" ? { paddingX } : null,
50
- children
51
- }
52
- );
53
- };
54
- export {
55
- SectionCommercial as S
56
- };
@@ -1,232 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { T as TEST_PROP_ID } from "../../../test/constants_no_mock-CF-669v-.js";
3
- import { generateUtilityClasses, useTheme, Box, Grid, styled } from "@mui/material";
4
- import { unstable_composeClasses } from "@mui/base";
5
- import { g as getComponentUtilityClass } from "../../../utils/index-DiMrtgIu.js";
6
- import { createContext, useContext, useState } from "react";
7
- import { useEnvironment } from "@m4l/core";
8
- import { ad as ArrowIconRoot } from "../../../styles/index-CqpubQQr.js";
9
- import { I as Icon } from "../../Icon/index-BJF_0F6d.js";
10
- import clsx from "clsx";
11
- import { g as getNameDataTestId } from "../../../test/getNameDataTestId-BaBTWhBr.js";
12
- import { A as Accordion } from "../../mui_extended/Accordion/index-jF2uxSmi.js";
13
- import { B as Button } from "../../mui_extended/Button/index-CgvCim_g.js";
14
- import { P as Popover } from "../../mui_extended/Popover/index-Dl1PwIS2.js";
15
- const componentName = "M4LTopBar";
16
- const TopBarClasses = generateUtilityClasses(componentName, [
17
- /* elements */
18
- "root",
19
- "ContainerImageComercial",
20
- "SimplebarComercial",
21
- "ItemRoot",
22
- "ItemSelect",
23
- "ContainerAccordion",
24
- "ContainerAccordionCase1",
25
- "IconAndButton",
26
- /* states or variants of elements */
27
- "IsActive"
28
- ]);
29
- function getTopBarClassesUtilityClass() {
30
- const slots = {
31
- root: ["root"],
32
- ContainerImageComercial: ["ContainerImageComercial"],
33
- SimplebarComercial: ["SimplebarComercial"],
34
- ItemRoot: ["ItemRoot"],
35
- ItemSelect: ["ItemSelect"],
36
- ContainerAccordion: ["ContainerAccordion"],
37
- ContainerAccordionCase1: ["ContainerAccordionCase1"],
38
- IconAndButton: ["IconAndButton"]
39
- };
40
- const composedClasses = unstable_composeClasses(slots, getComponentUtilityClass(componentName), {});
41
- return {
42
- ...composedClasses
43
- };
44
- }
45
- const initialstate = {
46
- dataMenu: [],
47
- classes: getTopBarClassesUtilityClass(),
48
- dataTestId: ""
49
- };
50
- const TopBarContext = createContext(initialstate);
51
- const TopBarProvider = (props) => {
52
- const { children, value } = props;
53
- const { dataMenu: DataMenu, classes, dataTestId } = value;
54
- return /* @__PURE__ */ jsx(
55
- TopBarContext.Provider,
56
- {
57
- value: { dataMenu: DataMenu, classes, dataTestId },
58
- children
59
- }
60
- );
61
- };
62
- const useTopBar = () => useContext(TopBarContext);
63
- function ArrowIcon(props) {
64
- const { openState } = props;
65
- const { host_static_assets, environment_assets } = useEnvironment();
66
- return /* @__PURE__ */ jsx(ArrowIconRoot, { className: "", children: /* @__PURE__ */ jsx(
67
- Icon,
68
- {
69
- src: `${host_static_assets}/${environment_assets}/frontend/components/sidebar/assets/icons/ChevronRight.svg`,
70
- rotationAngle: openState ? 270 : 90,
71
- size: "medium"
72
- }
73
- ) });
74
- }
75
- const isActive = (data) => {
76
- const path = window.location.pathname;
77
- if (data.path === path) {
78
- return true;
79
- }
80
- if (data.children) {
81
- return data.children.some((item) => isActive(item));
82
- }
83
- return false;
84
- };
85
- const NavItemRoot = (props) => {
86
- const theme = useTheme();
87
- const { classes, dataTestId } = useTopBar();
88
- const { itemRootData } = props;
89
- const { title, children, module_id } = itemRootData;
90
- const [anchorEl, setAnchorEl] = useState(null);
91
- const [openedPopoverId, setOpenedPopoverId] = useState(null);
92
- const handleClick = (event, popoverId) => {
93
- setAnchorEl(event.currentTarget);
94
- setOpenedPopoverId(popoverId);
95
- };
96
- const handleClose = () => {
97
- setAnchorEl(null);
98
- setOpenedPopoverId(null);
99
- };
100
- const renderMenuItems = (items) => {
101
- return items.map((item, index) => /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: item.children ? item.children && item.children.length > 0 && /* @__PURE__ */ jsx(Accordion, { label: item.title, children: renderMenuItems(item.children) }) : /* @__PURE__ */ jsx(
102
- "div",
103
- {
104
- className: clsx(
105
- classes.ItemSelect,
106
- item.path === window.location.pathname ? TopBarClasses.IsActive : null
107
- ),
108
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId(componentName, "ItemSelect", dataTestId) } : {},
109
- children: /* @__PURE__ */ jsx(Button, { variant: "text", href: item.path, fullWidth: true, children: item.title })
110
- }
111
- ) }, index));
112
- };
113
- const renderPopover = () => {
114
- return /* @__PURE__ */ jsx(
115
- Popover,
116
- {
117
- elevation: 3,
118
- id: module_id,
119
- open: openedPopoverId === itemRootData.module_id ? true : false,
120
- anchorEl,
121
- onClose: handleClose,
122
- anchorOrigin: {
123
- vertical: "bottom",
124
- horizontal: "center"
125
- },
126
- transformOrigin: {
127
- vertical: "top",
128
- horizontal: "center"
129
- },
130
- arrowType: "top-center",
131
- sx: { ...theme.components?.M4LPopoverTopBar?.styleOverrides },
132
- children: /* @__PURE__ */ jsx(Grid, { container: true, spacing: 0.5, children: children && children.length > 0 && renderMenuItems(children) })
133
- }
134
- );
135
- };
136
- const render = () => {
137
- if (itemRootData.children && itemRootData.path) {
138
- return /* @__PURE__ */ jsxs(
139
- "div",
140
- {
141
- className: classes.ContainerAccordionCase1,
142
- ...process.env.NODE_ENV !== "production" ? {
143
- [TEST_PROP_ID]: getNameDataTestId(
144
- componentName,
145
- "ContainerAccordionCase1",
146
- dataTestId
147
- )
148
- } : {},
149
- children: [
150
- /* @__PURE__ */ jsx(Button, { size: "medium", variant: "text", href: itemRootData.path, children: title }),
151
- /* @__PURE__ */ jsx(
152
- Button,
153
- {
154
- variant: "text",
155
- id: module_id,
156
- onClick: (e) => handleClick(e, module_id),
157
- endIcon: /* @__PURE__ */ jsx(ArrowIcon, { openState: openedPopoverId === module_id ? true : false })
158
- }
159
- ),
160
- renderPopover()
161
- ]
162
- }
163
- );
164
- }
165
- if (itemRootData.children) {
166
- return /* @__PURE__ */ jsxs(
167
- "div",
168
- {
169
- className: classes.ContainerAccordion,
170
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId(componentName, "ContainerAccordion", dataTestId) } : {},
171
- children: [
172
- /* @__PURE__ */ jsx(
173
- Button,
174
- {
175
- "aria-describedby": module_id,
176
- variant: "text",
177
- size: "medium",
178
- onClick: (e) => handleClick(e, itemRootData.module_id),
179
- endIcon: /* @__PURE__ */ jsx(ArrowIcon, { openState: openedPopoverId === module_id ? true : false }),
180
- children: title
181
- }
182
- ),
183
- renderPopover()
184
- ]
185
- }
186
- );
187
- }
188
- if (itemRootData.path)
189
- return /* @__PURE__ */ jsx(Button, { variant: "text", size: "medium", href: itemRootData.path, "aria-describedby": module_id, children: /* @__PURE__ */ jsx("div", { children: title }) });
190
- };
191
- return /* @__PURE__ */ jsx(
192
- Box,
193
- {
194
- className: clsx(
195
- classes.ItemRoot,
196
- isActive(itemRootData) || openedPopoverId === itemRootData.module_id ? TopBarClasses.IsActive : null
197
- ),
198
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId(componentName, "ItemRoot", dataTestId) } : {},
199
- children: render()
200
- }
201
- );
202
- };
203
- const ConteinItem = () => {
204
- const { dataMenu: DataMenu, classes, dataTestId } = useTopBar();
205
- return /* @__PURE__ */ jsx(
206
- "div",
207
- {
208
- className: classes.SimplebarComercial,
209
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId(componentName, "SimplebarComercial", dataTestId) } : {},
210
- //Map que se encarga de cargar el iNavItemRoot
211
- children: DataMenu.map((group) => /* @__PURE__ */ jsx(NavItemRoot, { itemRootData: group }, group.module_id))
212
- }
213
- );
214
- };
215
- const TopBarRoot = styled("header")(({ theme }) => ({
216
- ...theme.components?.M4LTopBar?.styleOverrides
217
- }));
218
- const TopBar = (props) => {
219
- const { dataMenu: DataMenu, dataTestId } = props;
220
- const classes = getTopBarClassesUtilityClass();
221
- return /* @__PURE__ */ jsx(
222
- TopBarRoot,
223
- {
224
- className: classes.root,
225
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId(componentName, "root", dataTestId) } : {},
226
- children: /* @__PURE__ */ jsx(TopBarProvider, { value: { dataMenu: DataMenu, classes, dataTestId }, children: /* @__PURE__ */ jsx(ConteinItem, {}) })
227
- }
228
- );
229
- };
230
- export {
231
- TopBar as T
232
- };
@@ -1,81 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { useState } from "react";
3
- import { ae as HamburgerMenuRoot } from "../../styles/index-CqpubQQr.js";
4
- import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
5
- import { unstable_composeClasses } from "@mui/base";
6
- import { T as TEST_PROP_ID } from "../../test/constants_no_mock-CF-669v-.js";
7
- import { useEnvironment } from "@m4l/core";
8
- import { S as SideBar } from "../SideBar/index-DqKD_S9_.js";
9
- import { I as IconButton } from "../mui_extended/IconButton/index-B8lOMybH.js";
10
- const componentName = "M4LHamburgerMenuCommercial";
11
- generateUtilityClasses(componentName, ["root", "ImageLogo"]);
12
- function getHamburgerMenuComercialClassesUtilityClass(slot) {
13
- return generateUtilityClass(componentName, slot);
14
- }
15
- const useHamburgerMenuComercialUtilityClasses = () => {
16
- const slots = {
17
- root: ["root"],
18
- ImageLogo: ["ImageLogo"]
19
- };
20
- const composedClasses = unstable_composeClasses(slots, getHamburgerMenuComercialClassesUtilityClass, {});
21
- return {
22
- ...composedClasses
23
- };
24
- };
25
- const HAMBURGER_MENU_PREFIX = "M4LHamburgerMenu";
26
- const getNameDataTestId = (KEY) => {
27
- return `${HAMBURGER_MENU_PREFIX}-${KEY}`;
28
- };
29
- const HamburgerMenu = (props) => {
30
- const { data, itemClick } = props;
31
- const [visible, setVisible] = useState(false);
32
- const { host_static_assets, environment_assets } = useEnvironment();
33
- const handlerOnVisible = () => {
34
- setVisible((val) => !val);
35
- };
36
- const handleCollapseToggle = () => {
37
- if (visible) {
38
- setVisible(false);
39
- }
40
- };
41
- const classes = useHamburgerMenuComercialUtilityClasses();
42
- const handlerItemActive = (item) => {
43
- return window.location.pathname === item.path;
44
- };
45
- return /* @__PURE__ */ jsxs(
46
- HamburgerMenuRoot,
47
- {
48
- className: classes.root,
49
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("root") } : {},
50
- children: [
51
- /* @__PURE__ */ jsx(
52
- IconButton,
53
- {
54
- src: `${host_static_assets}/${environment_assets}/frontend/web_comercial/menu.svg`,
55
- className: classes.ImageLogo,
56
- variant: "secondary",
57
- onClick: () => handlerOnVisible()
58
- }
59
- ),
60
- /* @__PURE__ */ jsx(
61
- SideBar,
62
- {
63
- menuData: data,
64
- visible,
65
- onClick: (item) => itemClick(item),
66
- isItemActive: handlerItemActive,
67
- onToggleCollapse: handleCollapseToggle,
68
- onToggleVisible: handlerOnVisible,
69
- collapsed: false,
70
- companyLogoSmallUrl: "",
71
- companyName: "",
72
- variantStyle: "variantComercial"
73
- }
74
- )
75
- ]
76
- }
77
- );
78
- };
79
- export {
80
- HamburgerMenu as H
81
- };
@@ -1,44 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { useMemo } from "react";
3
- import { useModuleDictionary, useEnvironment } from "@m4l/core";
4
- import { I as Icon } from "../../Icon/index-BJF_0F6d.js";
5
- import { W as WrapperComponent } from "../../WrapperComponent/index-BHV-CsDU.js";
6
- import { F as FormatterRoot, f as formatterClasses } from "../index-CEJ6VCMb.js";
7
- import clsx from "clsx";
8
- const BOOLEAN_FORMATTER_DICTIONARY_KEY = `boolean_formatter`;
9
- const LABEL_BOOLEAN_YES = `${BOOLEAN_FORMATTER_DICTIONARY_KEY}.boolean_yes`;
10
- const LABEL_BOOLEAN_NO = `${BOOLEAN_FORMATTER_DICTIONARY_KEY}.boolean_no`;
11
- const LABEL_BOOLEAN_TRUE = `${BOOLEAN_FORMATTER_DICTIONARY_KEY}.boolean_true`;
12
- const LABEL_BOOLEAN_FALSE = `${BOOLEAN_FORMATTER_DICTIONARY_KEY}.boolean_false`;
13
- function BooleanFormatter(props) {
14
- const { presentationType, value, Component = WrapperComponent } = props;
15
- const { getLabel } = useModuleDictionary();
16
- const { host_static_assets, environment_assets } = useEnvironment();
17
- const final_value = value ?? false;
18
- const srcCheckTrue = `${host_static_assets}/${environment_assets}/frontend/components/data_grid/components/boolean_formatter/assets/icons/check_true.svg`;
19
- const srcCheckFalse = `${host_static_assets}/${environment_assets}/frontend/components/data_grid/components/boolean_formatter/assets/icons/check_false.svg`;
20
- const memoComponent = useMemo(() => {
21
- if (presentationType === "string_yes_no") {
22
- return /* @__PURE__ */ jsx(Component, { children: final_value ? getLabel(LABEL_BOOLEAN_YES) : getLabel(LABEL_BOOLEAN_NO) });
23
- }
24
- if (presentationType === "string_true_false") {
25
- return /* @__PURE__ */ jsx(Component, { children: final_value ? getLabel(LABEL_BOOLEAN_TRUE) : getLabel(LABEL_BOOLEAN_FALSE) });
26
- }
27
- return /* @__PURE__ */ jsx(FormatterRoot, { children: /* @__PURE__ */ jsx(Component, { children: /* @__PURE__ */ jsx(
28
- Icon,
29
- {
30
- src: final_value ? srcCheckTrue : srcCheckFalse,
31
- className: clsx(
32
- formatterClasses.root,
33
- formatterClasses.booleanFormatterIcon,
34
- final_value && formatterClasses.booleanFormatterCheck
35
- )
36
- }
37
- ) }) });
38
- }, [final_value]);
39
- return memoComponent;
40
- }
41
- export {
42
- BooleanFormatter as B,
43
- BOOLEAN_FORMATTER_DICTIONARY_KEY as a
44
- };