@m4l/components 3.1.7 → 3.1.9

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 (232) hide show
  1. package/@types/export.d.ts +0 -3
  2. package/@types/types.d.ts +29 -11
  3. package/components/DynamicSort/constants.d.ts +12 -0
  4. package/components/DynamicSort/slots/DynamicSortSlots.d.ts +84 -0
  5. package/components/DynamicSort/slots/SlotsEnum.d.ts +30 -0
  6. package/components/DynamicSort/slots/index.d.ts +2 -0
  7. package/components/DynamicSort/types.d.ts +183 -0
  8. package/components/FieldLabel/types.d.ts +1 -0
  9. package/components/ObjectLogs/types.d.ts +1 -1
  10. package/components/areas/contexts/AreasContext/helper.d.ts +3 -0
  11. package/components/hook-form/RHFTextField/constant.d.ts +1 -0
  12. package/components/hook-form/RHFTextField/index.d.ts +0 -1
  13. package/components/hook-form/RHFTextField/slots/RHFTextFieldEnum.d.ts +7 -0
  14. package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +18 -0
  15. package/components/hook-form/RHFTextField/slots/index.d.ts +2 -0
  16. package/components/hook-form/RHFTextField/subcomponents/Skeleton/types.d.ts +3 -4
  17. package/components/hook-form/RHFTextField/types.d.ts +11 -3
  18. package/helpers/cookies/cookies.d.ts +4 -0
  19. package/helpers/cookies/index.d.ts +1 -0
  20. package/helpers/cookies/types.d.ts +42 -0
  21. package/index.js +180 -340
  22. package/node_modules-CQtkw0uG.js +7350 -0
  23. package/package.json +1 -1
  24. package/styles/DynamicSort.styles.d.ts +2 -0
  25. package/styles/MenuActions.styles.d.ts +1 -1
  26. package/styles/RHFTextField.styles.d.ts +2 -0
  27. package/utils/index.d.ts +1 -1
  28. package/vendor-BDLrgGjq.js +24692 -0
  29. package/components/AccountPopover/index-Dm2-k-Mv.js +0 -334
  30. package/components/AppBar/index-i0rhG3J1.js +0 -93
  31. package/components/BaseModule/index-CiNNlxzS.js +0 -30
  32. package/components/CommonActions/components/ActionCancel/index-CIdpDXkr.js +0 -12
  33. package/components/CommonActions/components/ActionFormCancel/index-CpyASN3q.js +0 -56
  34. package/components/CommonActions/components/ActionFormIntro/index-7KKtcUra.js +0 -33
  35. package/components/CommonActions/components/ActionIntro/index-CqqDZZcG.js +0 -25
  36. package/components/CommonActions/components/Actions/index-CuG1pnXW.js +0 -70
  37. package/components/DataGrid/constants-8L7QgBKi.js +0 -10
  38. package/components/DataGrid/formatters/ColumnBooleanFormatter/index-CveSCbq_.js +0 -26
  39. package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/index-CHqvieM2.js +0 -22
  40. package/components/DataGrid/formatters/ColumnDateFormatter/index-CKg8CJ6A.js +0 -19
  41. package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index-DE6bwaKP.js +0 -23
  42. package/components/DataGrid/formatters/ColumnNestedValueFormatter/index-BslXGK-A.js +0 -14
  43. package/components/DataGrid/formatters/ColumnPointsFormatter/index-BXGW2CsK.js +0 -10
  44. package/components/DataGrid/formatters/ColumnPriceFormatter/index-O11tBykn.js +0 -10
  45. package/components/DataGrid/formatters/ColumnSetCheckFormatter/index-BaCawLr1.js +0 -36
  46. package/components/DataGrid/formatters/ColumnUncertaintyFormatter/index-Cq7a-jnE.js +0 -10
  47. package/components/DataGrid/formatters/index-CrZXPa0e.js +0 -13
  48. package/components/DataGrid/index-BZ-lbmuU.js +0 -908
  49. package/components/DataGrid/subcomponents/Actions/index-CHvPZ4Ru.js +0 -549
  50. package/components/DataGrid/subcomponents/editors/TextEditor/index-BIFm8akr.js +0 -80
  51. package/components/DragResizeWindow/index-D2jLYExo.js +0 -505
  52. package/components/DynamicFilter/constants-ByqmFATV.js +0 -31
  53. package/components/DynamicFilter/dictionary-PrbXU3VZ.js +0 -51
  54. package/components/DynamicFilter/index-DZiJc9h7.js +0 -116
  55. package/components/DynamicFilter/slots/SlotsEnum-cawFeNzx.js +0 -34
  56. package/components/DynamicFilter/slots/dynamicFilterSlots-DHxelhXP.js +0 -151
  57. package/components/DynamicFilter/slots/index-l0sNRNKZ.js +0 -1
  58. package/components/DynamicFilter/store/index-BT-eWVnJ.js +0 -254
  59. package/components/DynamicFilter/subcomponents/AppliedFilterChip/index-B32bAzi-.js +0 -60
  60. package/components/DynamicFilter/subcomponents/AppliedFilters/index-Bha19drV.js +0 -26
  61. package/components/DynamicFilter/subcomponents/DynamicFilterBase/index-BmvzoHit.js +0 -40
  62. package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index-BcO3SlP5.js +0 -129
  63. package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index-BCJhpNS8.js +0 -171
  64. package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index-DCNhz68u.js +0 -153
  65. package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index-BdypjM1Y.js +0 -146
  66. package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index-D-NFIVnK.js +0 -114
  67. package/components/DynamicFilter/subcomponents/FieldTypes/index-BwQHJqk9.js +0 -38
  68. package/components/DynamicFilter/subcomponents/FilterActions/index-B9UWmk07.js +0 -88
  69. package/components/DynamicFilter/subcomponents/InputFilter/index-CfGb1TfV.js +0 -188
  70. package/components/DynamicFilter/subcomponents/PopoverFilter/index-DkfRGrlO.js +0 -158
  71. package/components/DynamicFilter/subcomponents/PopoverMenuFields/index-DSegwAm2.js +0 -63
  72. package/components/FieldLabel/index-CI57EizR.js +0 -54
  73. package/components/GridLayout/index-C4HyxNYX.js +0 -1044
  74. package/components/GridLayout/subcomponents/Griditem/index-C7jT4s8t.js +0 -395
  75. package/components/GridLayout/subcomponents/Responsive/index-BKcU2OnF.js +0 -348
  76. package/components/GridLayout/subcomponents/SizeProvider/index-1aJ-e_54.js +0 -71
  77. package/components/HelperText/index-Crn_XIPF.js +0 -50
  78. package/components/Icon/index-C89MAkeH.js +0 -176
  79. package/components/Image/index-COp8vP0X.js +0 -175
  80. package/components/LanguagePopover/index-BA2Igs9L.js +0 -179
  81. package/components/LinearProgressIndeterminate/index-BwI756Mb.js +0 -55
  82. package/components/Loadable/index-BMbi9ISF.js +0 -9
  83. package/components/LoadingError/index-Cf0oGUrL.js +0 -89
  84. package/components/MFIsolationApp/index-V4R55hNU.js +0 -169
  85. package/components/MFLoader/index-BI8vQZSH.js +0 -299
  86. package/components/ModalDialog/index-CEVQBQ7W.js +0 -77
  87. package/components/NavLink/index-D1S_vtFO.js +0 -55
  88. package/components/NoItemSelected/index-B9oM26AX.js +0 -54
  89. package/components/ObjectLogs/index-CiXOJpS4.js +0 -233
  90. package/components/PDFViewer/index-GVN2rfd6.js +0 -51
  91. package/components/Page/index-DZMkYmr4.js +0 -117
  92. package/components/PaperForm/index-DwgAfjci.js +0 -59
  93. package/components/Period/index-2pJG3VmY.js +0 -238
  94. package/components/PrintingSystem/index-B2qcnfw0.js +0 -187
  95. package/components/PrintingSystem/subcomponents/BodyNode/index-Cv2aoy8S.js +0 -49
  96. package/components/PrintingSystem/subcomponents/ChartNode/index-BmJm8v_C.js +0 -105
  97. package/components/PrintingSystem/subcomponents/DividerNode/index-MpFhE-H0.js +0 -20
  98. package/components/PrintingSystem/subcomponents/FooterNode/index-ZEcWdMSM.js +0 -49
  99. package/components/PrintingSystem/subcomponents/GridNode/index-SsKax2xu.js +0 -74
  100. package/components/PrintingSystem/subcomponents/HeaderNode/index-Cs8TOOBL.js +0 -49
  101. package/components/PrintingSystem/subcomponents/PaperNode/index-DBb25Ecg.js +0 -30
  102. package/components/PrintingSystem/subcomponents/PropertyValueNode/index-CTVn7J9Q.js +0 -47
  103. package/components/PrintingSystem/subcomponents/SectionNode/index-iYPM3EaS.js +0 -49
  104. package/components/PrintingSystem/subcomponents/TextBoxNode/index-DGjXCFKJ.js +0 -24
  105. package/components/PropertyValue/index-Bh-Jnrte.js +0 -264
  106. package/components/Resizeable/index-DdP1xfE9.js +0 -20
  107. package/components/ScrollBar/index-f2URPPE2.js +0 -35
  108. package/components/ScrollToTop/index-TxORk5dB.js +0 -12
  109. package/components/SideBar/index-PUBBe0yH.js +0 -758
  110. package/components/SplitLayout/index-Bu1hcO6G.js +0 -89
  111. package/components/ToastContainer/index-DK1d8NNd.js +0 -191
  112. package/components/WrapperComponent/index-BHV-CsDU.js +0 -14
  113. package/components/animate/LoadingScreen/index-CkVLOrMz.js +0 -70
  114. package/components/animate/MotionContainer/index-eartnWyO.js +0 -34
  115. package/components/animate/MotionLazyContainer/index-Be8osTiG.js +0 -9
  116. package/components/animate/PropagateLoader/index-Bkq8V2SN.js +0 -23
  117. package/components/animate/features-BbnE33u3.js +0 -5
  118. package/components/animate/index-BsWiJfzp.js +0 -89
  119. package/components/animate/variants/bounce-DanQqHAX.js +0 -101
  120. package/components/animate/variants/container-Dmpr6tg5.js +0 -22
  121. package/components/animate/variants/fade-CAOJNn06.js +0 -65
  122. package/components/animate/variants/index-l0sNRNKZ.js +0 -1
  123. package/components/animate/variants/transition-B9W5SWTa.js +0 -20
  124. package/components/areas/components/AreasAdmin/index-OxQU3P8Y.js +0 -699
  125. package/components/areas/components/AreasViewer/index-DQ0aPioP.js +0 -805
  126. package/components/areas/components/index-l0sNRNKZ.js +0 -1
  127. package/components/areas/constants-rqODZNZe.js +0 -6
  128. package/components/areas/contexts/AreasContext/index-BqRlA7JA.js +0 -1110
  129. package/components/areas/contexts/DynamicMFParmsContext/index-22c6E7vK.js +0 -36
  130. package/components/areas/contexts/WindowToolsMFContext/index-DkE30fhm.js +0 -12
  131. package/components/areas/contexts/index-l0sNRNKZ.js +0 -1
  132. package/components/areas/dictionary-YUsP9beq.js +0 -36
  133. package/components/areas/hooks/index-l0sNRNKZ.js +0 -1
  134. package/components/areas/hooks/useAreas/index-BSbwbJLS.js +0 -11
  135. package/components/areas/hooks/useDynamicMFParameters/index-DhbcZPs9.js +0 -12
  136. package/components/areas/hooks/useSetWindowsTitle/useSetWindowsTitle-BzPD-miW.js +0 -31
  137. package/components/areas/hooks/useWindowToolsMF/index-BECQfhbC.js +0 -10
  138. package/components/areas/icons-CwFr-alN.js +0 -24
  139. package/components/areas/index-B_Odny9h.js +0 -22
  140. package/components/commercial/AppBarCommercial/index-CHq3P3GY.js +0 -28
  141. package/components/commercial/SectionCommercial/index-BeABGtdr.js +0 -56
  142. package/components/commercial/TopBar/index-F1repmti.js +0 -232
  143. package/components/commercial/index-CxDzs6Ax.js +0 -81
  144. package/components/formatters/BooleanFormatter/index-DktIidqW.js +0 -44
  145. package/components/formatters/DateFormatter/index-CGcRZ8BA.js +0 -43
  146. package/components/formatters/PointsFormatter/index-C7sR8iqk.js +0 -25
  147. package/components/formatters/PriceFormatter/index-CsvRawmc.js +0 -35
  148. package/components/formatters/UncertaintyFormatter/index-B9ESVEVp.js +0 -29
  149. package/components/formatters/index-pnJhDYKe.js +0 -109
  150. package/components/hook-form/HelperError/index-BVnmUazV.js +0 -19
  151. package/components/hook-form/RHFAutocomplete/index-BtPL16HR.js +0 -657
  152. package/components/hook-form/RHFAutocompleteAsync/index-BfzjLHG8.js +0 -226
  153. package/components/hook-form/RHFCheckbox/index-Vyttu8Vx.js +0 -132
  154. package/components/hook-form/RHFColorPicker/index-Cxxb5Wa_.js +0 -191
  155. package/components/hook-form/RHFDateTime/index-CW1Slb-f.js +0 -190
  156. package/components/hook-form/RHFMultiCheckbox/index-BARudV1A.js +0 -34
  157. package/components/hook-form/RHFPeriod/index-r-HeIOoZ.js +0 -98
  158. package/components/hook-form/RHFRadioGroup/index-CTD-0zKo.js +0 -52
  159. package/components/hook-form/RHFSelect/index-LdwRuFz-.js +0 -29
  160. package/components/hook-form/RHFTextField/classes/constants.d.ts +0 -1
  161. package/components/hook-form/RHFTextField/classes/index.d.ts +0 -8
  162. package/components/hook-form/RHFTextField/classes/types.d.ts +0 -17
  163. package/components/hook-form/RHFTextField/index-B6ufruSB.js +0 -337
  164. package/components/hook-form/RHFTextField/styles.d.ts +0 -3
  165. package/components/hook-form/RHFTextField/subcomponents/Skeleton/styles.d.ts +0 -3
  166. package/components/hook-form/RHFTextField/tests/constants.d.ts +0 -3
  167. package/components/hook-form/RHFTextField/tests/utils.d.ts +0 -2
  168. package/components/hook-form/RHFUpload/index-CDPbm8NR.js +0 -253
  169. package/components/maps/components/GpsTools/index-5MXlhIEt.js +0 -1948
  170. package/components/maps/components/Map/index-2Lx5ARXa.js +0 -2546
  171. package/components/maps/index-Ci-7-FHg.js +0 -7
  172. package/components/modal/WindowBase-Gd27v5FU.js +0 -44
  173. package/components/modal/WindowConfirm-u6vAMFo7.js +0 -73
  174. package/components/modal/index-CydPIpKZ.js +0 -65
  175. package/components/mui_extended/Accordion/index-DMLYJL7o.js +0 -124
  176. package/components/mui_extended/Avatar/index-ClBa-6eF.js +0 -64
  177. package/components/mui_extended/Badge/index-zI-F_Qkq.js +0 -29
  178. package/components/mui_extended/BoxIcon/index-BUTJ2tKw.js +0 -22
  179. package/components/mui_extended/Breadcrumbs/index-DTS7rOZH.js +0 -86
  180. package/components/mui_extended/Button/index-CGfZbaea.js +0 -222
  181. package/components/mui_extended/CheckBox-BXUrbonB.js +0 -76
  182. package/components/mui_extended/CircularProgress/index-Bnnti_G6.js +0 -8
  183. package/components/mui_extended/IconButton/classes/constants-ChY2jKkp.js +0 -4
  184. package/components/mui_extended/IconButton/classes/index-BxjJGAqZ.js +0 -45
  185. package/components/mui_extended/IconButton/index-CusYFjie.js +0 -97
  186. package/components/mui_extended/IconButton/styledIconButton-fAsbGoFS.js +0 -7
  187. package/components/mui_extended/LinearProgress/index-CGgW8jq2.js +0 -9
  188. package/components/mui_extended/LinkWithRoute/index-BC2miUjR.js +0 -15
  189. package/components/mui_extended/MenuActions/MenuActions-C6CjSU6C.js +0 -149
  190. package/components/mui_extended/MenuActions/constants-BwsU9chA.js +0 -10
  191. package/components/mui_extended/MenuActions/dictionary-Dj_07puT.js +0 -11
  192. package/components/mui_extended/MenuActions/slots/MenuActionsEnum-Bu-L6eWU.js +0 -13
  193. package/components/mui_extended/MenuActions/slots/MenuActionsSlots-D65KZAKF.js +0 -46
  194. package/components/mui_extended/Pager/index-DCbxiTZA.js +0 -257
  195. package/components/mui_extended/Popover/index-DfrJAQkV.js +0 -153
  196. package/components/mui_extended/Stack/index-DzEeCYfp.js +0 -31
  197. package/components/mui_extended/Tab/index-Bu3dPidV.js +0 -129
  198. package/components/mui_extended/ToggleButton/index-C9cBkT1V.js +0 -18
  199. package/components/mui_extended/ToggleIconButton/index--0b3Td6C.js +0 -26
  200. package/components/mui_extended/Tooltip/index-B8QUytCK.js +0 -42
  201. package/components/mui_extended/Typography/index-Cf_4Zw8f.js +0 -54
  202. package/components/mui_extended/index-l0sNRNKZ.js +0 -1
  203. package/components/popups/PopupsProvider/index-DhSxmtfJ.js +0 -172
  204. package/components/popups/PopupsViewer/constants-DuyD7aCn.js +0 -4
  205. package/components/popups/PopupsViewer/icons-BUujqqbu.js +0 -7
  206. package/components/popups/PopupsViewer/index-BecevSns.js +0 -172
  207. package/components/popups/PopupsViewer/slots/index-B98CiRLa.js +0 -14
  208. package/components/popups/PopupsViewer/slots/popupsViewerSlots-BXH77nCF.js +0 -46
  209. package/components/popups/index-l0sNRNKZ.js +0 -1
  210. package/contexts/ModalContext/index-CPfNnfTL.js +0 -39
  211. package/contexts/RHFormContext/index-D_nK759o.js +0 -78
  212. package/hocs/withToggle/index-C1_DMZD3.js +0 -14
  213. package/hooks/useFormAddEdit/index-D9oSjUn1.js +0 -90
  214. package/hooks/useFormReadyForUpdate/index-B3HygFCM.js +0 -20
  215. package/hooks/useModal/index-BJSQOX3U.js +0 -10
  216. package/hooks/useSizeContainer/index-D4hDjM1P.js +0 -37
  217. package/hooks/useStateRef/index-C3P6ZK3m.js +0 -15
  218. package/hooks/useTab/index-B_GEQFOP.js +0 -12
  219. package/react-data-grid-BfYuZ6AK.js +0 -2606
  220. package/react-draggable-DsCPdgQP.js +0 -811
  221. package/react-json-view-bhqIAaNg.js +0 -2576
  222. package/react-resizable-eBbFl2dX.js +0 -618
  223. package/react-spinners-TpKN9lZg.js +0 -123
  224. package/react-splitter-layout-C-JTsNGs.js +0 -158
  225. package/styles/DynamicFilter-CJFsIegc.js +0 -319
  226. package/styles/MenuActions-lTi-ynPM.js +0 -42
  227. package/styles/index-DKj6m8SL.js +0 -1691
  228. package/test/constants_no_mock-CF-669v-.js +0 -4
  229. package/test/getNameDataTestId-BaBTWhBr.js +0 -10
  230. package/utils/index-DiMrtgIu.js +0 -502
  231. /package/components/GridLayout/subcomponents/{Griditem → GridItem}/index.d.ts +0 -0
  232. /package/components/GridLayout/subcomponents/{Griditem → GridItem}/types.d.ts +0 -0
@@ -1,348 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { r as cloneLayoutItem, t as cloneLayout, u as compact, v as correctBounds, w as isEqualLayout, o as DEFAULT_COLAPSED_HEIGHT, x as DEFAULT_RESPONSIVE_BREAKPOINTS, m as DEFAULT_CONTAINER_PADDING, l as DEFAULT_MARGIN, y as DEFAULT_RESPONSIVE_COLS, i as DEFAULT_ROW_HEIGHT, z as isEqualLayouts, G as GridLayout, A as noop } from "../../index-C4HyxNYX.js";
3
- import { useState, useRef, useEffect, useCallback } from "react";
4
- import { useFirstRender } from "@m4l/graphics";
5
- import { deepEqual } from "fast-equals";
6
- function getBreakpointFromWidth(breakpoints, width) {
7
- const sorted = sortBreakpoints(breakpoints);
8
- let matching = sorted[0];
9
- for (let i = 1, len = sorted.length; i < len; i++) {
10
- const breakpointName = sorted[i];
11
- if (width > breakpoints[breakpointName]) matching = breakpointName;
12
- }
13
- return matching;
14
- }
15
- function getColsFromBreakpoint(breakpoint, cols) {
16
- if (!cols[breakpoint]) {
17
- throw new Error(
18
- "ResponsiveReactGridLayout: `cols` entry for breakpoint " + breakpoint + " is missing!"
19
- );
20
- }
21
- return cols[breakpoint];
22
- }
23
- function findOrGenerateResponsiveLayout(layouts, breakpoints, breakpoint, lastBreakpoint, cols, compactType, brekpointsCols, colapsedHeight, rowHeight) {
24
- let layout = layouts[breakpoint];
25
- const breakpointsSorted = sortBreakpoints(breakpoints);
26
- const indexBreakointInit = breakpointsSorted.indexOf(breakpoint);
27
- let compareBreakpoint;
28
- if (!layout) {
29
- if (lastBreakpoint !== breakpoint && layouts[lastBreakpoint]) {
30
- compareBreakpoint = lastBreakpoint;
31
- } else {
32
- const rotatedBreakpoints = [
33
- ...breakpointsSorted.splice(indexBreakointInit),
34
- ...breakpointsSorted.reverse()
35
- ];
36
- for (let i = 0, len = rotatedBreakpoints.length; i < len; i++) {
37
- const b = rotatedBreakpoints[i];
38
- if (layouts[b]) {
39
- compareBreakpoint = b;
40
- break;
41
- }
42
- }
43
- }
44
- if (compareBreakpoint) {
45
- layout = [];
46
- for (let i = 0, len = layouts[compareBreakpoint].length; i < len; i++) {
47
- const li = cloneLayoutItem(layouts[compareBreakpoint][i]);
48
- if (brekpointsCols[compareBreakpoint]) {
49
- const newW = Math.round(li.w * cols / brekpointsCols[compareBreakpoint]);
50
- li.w = newW;
51
- }
52
- layout.push(li);
53
- }
54
- }
55
- if (!layout) {
56
- layout = [];
57
- }
58
- } else {
59
- layout = cloneLayout(layout);
60
- }
61
- layout = cloneLayout(layout);
62
- const ret = compact(
63
- correctBounds(layout, { cols }, colapsedHeight, colapsedHeight),
64
- compactType,
65
- cols,
66
- colapsedHeight,
67
- rowHeight
68
- );
69
- return ret;
70
- }
71
- function sortBreakpoints(breakpoints) {
72
- const keys = Object.keys(breakpoints);
73
- return keys.sort(function(a, b) {
74
- return breakpoints[a] - breakpoints[b];
75
- });
76
- }
77
- function getIndentationValue(param, breakpoint) {
78
- if (!param) return [0, 0];
79
- return Array.isArray(param) ? param : param[breakpoint];
80
- }
81
- function addLayoutItemToBreakPointIfNoExists(layouts, breakpoint, layoutItem, cols, margin, containerPadding, rowHeight, containerHeight, currentBreakpoint) {
82
- if (!layouts[breakpoint]) return;
83
- if (layouts[breakpoint].findIndex((l) => l.i === layoutItem.i) === -1) {
84
- const l = cloneLayoutItem(layoutItem);
85
- const rowHeightBreakpoint = typeof rowHeight === "number" ? rowHeight : rowHeight[breakpoint];
86
- const heigthUnits = containerHeight !== void 0 ? (containerHeight + getIndentationValue(margin, breakpoint)[1] - 2 * getIndentationValue(containerPadding, breakpoint)[1]) / (rowHeightBreakpoint + getIndentationValue(margin, breakpoint)[1]) : l.h;
87
- if (l.freeMove) {
88
- l.x = Math.round(cols[breakpoint] / 4);
89
- l.y = Math.round(heigthUnits / 4);
90
- l.w = Math.round(cols[breakpoint] / 2);
91
- l.h = heigthUnits / 2;
92
- if (breakpoint === "xxs") {
93
- l.visible = false;
94
- for (let index = 0; index < layouts[breakpoint].length; index++) {
95
- if (layouts[breakpoint][index].freeMove) {
96
- layouts[breakpoint][index].visible = false;
97
- }
98
- }
99
- if (currentBreakpoint === "xxs") {
100
- l.visible = true;
101
- }
102
- }
103
- } else {
104
- l.w = cols[breakpoint];
105
- l.h = Math.round(heigthUnits * 0.8);
106
- }
107
- if (l.freeMove) {
108
- layouts[breakpoint].push(l);
109
- } else {
110
- layouts[breakpoint].unshift(l);
111
- }
112
- }
113
- }
114
- function addLayoutItemToBreakPoints(layouts, layoutItem, cols, margin, containerPadding, rowHeight, containerHeight, currentBreakpoint) {
115
- const newLayouts = {};
116
- for (const key in layouts) {
117
- const layoutBreakpoint = cloneLayout(layouts[key]);
118
- newLayouts[key] = layoutBreakpoint;
119
- addLayoutItemToBreakPointIfNoExists(
120
- newLayouts,
121
- key,
122
- layoutItem,
123
- cols,
124
- margin,
125
- containerPadding,
126
- rowHeight,
127
- containerHeight,
128
- currentBreakpoint
129
- );
130
- }
131
- return newLayouts;
132
- }
133
- function cloneLayouts(layouts, layoutItemReplaceProps) {
134
- const newLayouts = {};
135
- for (const breakPoint in layouts) {
136
- newLayouts[breakPoint] = cloneLayout(layouts[breakPoint], layoutItemReplaceProps);
137
- }
138
- return newLayouts;
139
- }
140
- function generateInitialState(props) {
141
- const {
142
- containerWidth,
143
- breakpoint,
144
- breakpoints = DEFAULT_RESPONSIVE_BREAKPOINTS,
145
- containerPadding = DEFAULT_CONTAINER_PADDING,
146
- containerMargin = DEFAULT_MARGIN,
147
- layouts: defaultLayouts = {},
148
- cols = DEFAULT_RESPONSIVE_COLS,
149
- compactType = null,
150
- colapsedHeight = DEFAULT_COLAPSED_HEIGHT,
151
- rowHeight = DEFAULT_ROW_HEIGHT
152
- } = props;
153
- const newBreakpoint = breakpoint || getBreakpointFromWidth(breakpoints, containerWidth);
154
- const newCols = getColsFromBreakpoint(newBreakpoint, cols);
155
- let fireOnLoadLayoutChange = true;
156
- const initialColapsedHeight = getHeight(colapsedHeight, newBreakpoint);
157
- const initialrowHeight = getHeight(rowHeight, newBreakpoint);
158
- const initialLayout = findOrGenerateResponsiveLayout(
159
- defaultLayouts,
160
- breakpoints,
161
- newBreakpoint,
162
- newBreakpoint,
163
- newCols,
164
- compactType,
165
- { [newBreakpoint]: newCols },
166
- initialColapsedHeight,
167
- initialrowHeight
168
- );
169
- if (defaultLayouts[newBreakpoint]) {
170
- if (isEqualLayout(defaultLayouts[newBreakpoint], initialLayout)) {
171
- fireOnLoadLayoutChange = false;
172
- }
173
- }
174
- const ret = {
175
- breakpointLayout: initialLayout,
176
- breakpoint: newBreakpoint,
177
- cols: newCols,
178
- contaierMargin: getIndentationValue(containerMargin, newBreakpoint),
179
- contaierPadding: getIndentationValue(containerPadding, newBreakpoint),
180
- fireOnLoadLayoutChange,
181
- colapsedHeight: initialColapsedHeight,
182
- rowHeight: initialrowHeight
183
- };
184
- return ret;
185
- }
186
- const getHeight = (objectOrHeight, currentBreakpoint) => {
187
- if (typeof objectOrHeight == "number") {
188
- return objectOrHeight;
189
- }
190
- if (objectOrHeight[currentBreakpoint]) {
191
- return objectOrHeight[currentBreakpoint];
192
- }
193
- return DEFAULT_COLAPSED_HEIGHT;
194
- };
195
- function Responsive(props) {
196
- const {
197
- layoutItemRender,
198
- containerWidth,
199
- containerHeight,
200
- breakpoint,
201
- compactType = null,
202
- breakpoints = DEFAULT_RESPONSIVE_BREAKPOINTS,
203
- cols = DEFAULT_RESPONSIVE_COLS,
204
- containerPadding = DEFAULT_CONTAINER_PADDING,
205
- containerMargin = DEFAULT_MARGIN,
206
- layouts = {},
207
- // onBreakpointChange = noop,
208
- onLayoutChange = noop,
209
- onContainerChange = noop,
210
- colapsedHeight = DEFAULT_COLAPSED_HEIGHT,
211
- rowHeight = DEFAULT_ROW_HEIGHT,
212
- ...other
213
- } = props;
214
- const [currentState, setCurrentState] = useState(
215
- () => generateInitialState(props)
216
- );
217
- const refState = useRef({
218
- layouts: {
219
- ...layouts,
220
- [currentState.breakpoint]: currentState.breakpointLayout
221
- },
222
- cols,
223
- currentBreakpointCols: currentState.cols,
224
- currentBreakpoint: currentState.breakpoint,
225
- breakpoints,
226
- containerWidth,
227
- containerHeight,
228
- colapsedHeight: currentState.colapsedHeight,
229
- rowHeight: currentState.rowHeight
230
- });
231
- const isFirstRenderFull = useFirstRender([
232
- containerWidth,
233
- containerHeight,
234
- layouts,
235
- breakpoint,
236
- breakpoints,
237
- cols
238
- ]);
239
- const isFirstRenderBreakpointLayout = useFirstRender([currentState.breakpointLayout]);
240
- useEffect(() => {
241
- if (!isFirstRenderBreakpointLayout) {
242
- onLayoutChange(currentState.breakpointLayout, refState.current.layouts);
243
- }
244
- }, [currentState.breakpointLayout]);
245
- useEffect(() => {
246
- if (isFirstRenderFull) {
247
- onContainerChange({
248
- containerWidth: refState.current.containerWidth,
249
- containerHeight: refState.current.containerHeight,
250
- breakpoint: currentState.breakpoint,
251
- cols: currentState.cols
252
- });
253
- if (currentState.fireOnLoadLayoutChange) {
254
- onLayoutChange(currentState.breakpointLayout, {
255
- ...layouts,
256
- [currentState.breakpoint]: currentState.breakpointLayout
257
- });
258
- }
259
- return;
260
- }
261
- const lastBreakpoint = refState.current.currentBreakpoint;
262
- const lastContainerWidth = refState.current.containerWidth;
263
- const lastContainerHeight = refState.current.containerHeight;
264
- const lastBreakpointCols = refState.current.currentBreakpointCols;
265
- const newBreakpoint = breakpoint || getBreakpointFromWidth(breakpoints, containerWidth);
266
- const newCols = getColsFromBreakpoint(newBreakpoint, cols);
267
- const newLayouts = { ...layouts };
268
- let newContainerMargin = currentState.contaierMargin;
269
- let newContainerPadding = currentState.contaierPadding;
270
- if (newBreakpoint !== lastBreakpoint || newCols !== lastBreakpointCols || !deepEqual(cols, refState.current.cols) || !deepEqual(breakpoints, refState.current.breakpoints) || !isEqualLayouts(layouts, refState.current.layouts)) {
271
- newContainerMargin = getIndentationValue(containerMargin, newBreakpoint);
272
- newContainerPadding = getIndentationValue(containerPadding, newBreakpoint);
273
- const newColapsedHeight = getHeight(colapsedHeight, newBreakpoint);
274
- const newRowHeight = getHeight(rowHeight, newBreakpoint);
275
- if (!(lastBreakpoint in newLayouts)) {
276
- console.error("useEffect casi imposible", lastBreakpoint, newLayouts);
277
- newLayouts[lastBreakpoint] = cloneLayout(currentState.breakpointLayout);
278
- }
279
- const layout = findOrGenerateResponsiveLayout(
280
- newLayouts,
281
- breakpoints,
282
- newBreakpoint,
283
- lastBreakpoint,
284
- newCols,
285
- compactType,
286
- cols,
287
- newColapsedHeight,
288
- newRowHeight
289
- );
290
- newLayouts[newBreakpoint] = layout;
291
- refState.current.layouts = newLayouts;
292
- refState.current.breakpoints = breakpoints;
293
- refState.current.currentBreakpoint = newBreakpoint;
294
- refState.current.currentBreakpointCols = newCols;
295
- refState.current.colapsedHeight = newColapsedHeight;
296
- setCurrentState({
297
- breakpoint: newBreakpoint,
298
- breakpointLayout: layout,
299
- cols: newCols,
300
- contaierMargin: newContainerMargin,
301
- contaierPadding: newContainerPadding,
302
- colapsedHeight: newColapsedHeight,
303
- rowHeight: newRowHeight
304
- });
305
- }
306
- if (newBreakpoint !== lastBreakpoint || newCols !== lastBreakpointCols || lastContainerWidth !== containerWidth || lastContainerHeight != containerHeight) {
307
- onContainerChange({
308
- containerWidth,
309
- containerHeight,
310
- // containerMargin: newContainerMargin,
311
- // containerPadding: newContainerPadding,
312
- breakpoint: newBreakpoint,
313
- cols: newCols
314
- });
315
- }
316
- }, [containerWidth, containerHeight, layouts, breakpoint, breakpoints, cols]);
317
- const localOnLayoutChange = useCallback(
318
- (newlayout) => {
319
- const newLayoutClone = cloneLayout(newlayout);
320
- refState.current.layouts[refState.current.currentBreakpoint] = newLayoutClone;
321
- setCurrentState((prev) => ({ ...prev, breakpointLayout: newLayoutClone }));
322
- },
323
- [onLayoutChange]
324
- );
325
- return /* @__PURE__ */ jsx(
326
- GridLayout,
327
- {
328
- rowHeight: currentState.rowHeight,
329
- containerWidth,
330
- containerHeight,
331
- colapsedHeight: currentState.colapsedHeight,
332
- layoutItemRender,
333
- margin: currentState.contaierMargin,
334
- containerPadding: getIndentationValue(containerPadding, currentState.breakpoint),
335
- onLayoutChange: localOnLayoutChange,
336
- layout: currentState.breakpointLayout,
337
- cols: currentState.cols,
338
- compactType,
339
- ...other
340
- }
341
- );
342
- }
343
- export {
344
- Responsive as R,
345
- addLayoutItemToBreakPointIfNoExists as a,
346
- addLayoutItemToBreakPoints as b,
347
- cloneLayouts as c
348
- };
@@ -1,71 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { useRef, useState, useMemo, useCallback, useEffect } from "react";
3
- import clsx from "clsx";
4
- import { throttle } from "lodash";
5
- import { useResizeObserver } from "@m4l/graphics";
6
- import { j as DEFAULT_CONTAINER_WIDTH, k as DEFAULT_CONTAINER_HEIGHT, T as THROTTLE_RESIZE_TIMEOUT, C as COMPONENT_CLASS_NAME } from "../../index-C4HyxNYX.js";
7
- function withSizeProvider(ComposedComponent) {
8
- return (props) => {
9
- const { measureBeforeMount = true, ...rest } = props;
10
- const refMounted = useRef(false);
11
- const [currentState, setCurrentState] = useState({
12
- mounted: false,
13
- width: DEFAULT_CONTAINER_WIDTH,
14
- height: DEFAULT_CONTAINER_HEIGHT
15
- });
16
- const onWindowResizeMemo = useMemo(
17
- () => () => {
18
- const node = elementRef.current;
19
- if (node instanceof HTMLElement && node.clientWidth) {
20
- setCurrentState((prev) => ({
21
- ...prev,
22
- width: node.clientWidth,
23
- //
24
- height: node.offsetHeight
25
- }));
26
- }
27
- },
28
- []
29
- );
30
- const throttleResize = throttle(onWindowResizeMemo, THROTTLE_RESIZE_TIMEOUT, {
31
- leading: false,
32
- // No enviar el primer evento de resizing
33
- trailing: true
34
- // Incluir siempre el ultimo evento en la cola, para que no quede se quedee a la mitad de resizing
35
- });
36
- const onResize = useCallback((_target) => {
37
- throttleResize();
38
- }, []);
39
- const elementRef = useResizeObserver(onResize);
40
- useEffect(() => {
41
- setCurrentState((prev) => ({ ...prev, mounted: true }));
42
- refMounted.current = true;
43
- onWindowResizeMemo();
44
- }, []);
45
- if (measureBeforeMount && !currentState.mounted) {
46
- return /* @__PURE__ */ jsx(
47
- "div",
48
- {
49
- className: clsx(props.className, COMPONENT_CLASS_NAME),
50
- style: props.style,
51
- ref: elementRef
52
- }
53
- );
54
- }
55
- return (
56
- //@ts-expect-error
57
- /* @__PURE__ */ jsx(
58
- ComposedComponent,
59
- {
60
- innerRef: elementRef,
61
- containerWidth: currentState.width,
62
- containerHeight: currentState.height,
63
- ...rest
64
- }
65
- )
66
- );
67
- };
68
- }
69
- export {
70
- withSizeProvider as w
71
- };
@@ -1,50 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { H as HelperTextRoot } from "../../styles/index-DKj6m8SL.js";
3
- import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
4
- import { unstable_composeClasses } from "@mui/base";
5
- import { T as Typography } from "../mui_extended/Typography/index-Cf_4Zw8f.js";
6
- const componentName = "M4LHelperText";
7
- const errorLabelClasses = generateUtilityClasses(componentName, [
8
- /* elements */
9
- "root",
10
- /* states or variants of elements */
11
- "variantInfo",
12
- "variantSuccess",
13
- "variantWarning",
14
- "variantError"
15
- ]);
16
- function getHelperTextUtilityClass(slot) {
17
- return generateUtilityClass(componentName, slot);
18
- }
19
- const useUtilityClasses = (ownerSate) => {
20
- const slots = {
21
- root: [
22
- "root",
23
- ownerSate.variant === "info" && "variantInfo",
24
- ownerSate.variant === "success" && "variantSuccess",
25
- ownerSate.variant === "warning" && "variantWarning",
26
- ownerSate.variant === "error" && "variantError"
27
- ]
28
- };
29
- const composedClasses = unstable_composeClasses(slots, getHelperTextUtilityClass, {});
30
- return {
31
- ...composedClasses
32
- };
33
- };
34
- const HelperText = (props) => {
35
- const { message = "", skeletonWidth, skeletongHeight, variant } = props;
36
- const ownerSate = {
37
- variant
38
- };
39
- const classes = useUtilityClasses(ownerSate);
40
- return (
41
- /* ErrorLabelRoot: Contenedor principal del componente, es usado para aplicar los estilos css de los overrides
42
- que provienen del objeto del tema. Se usa para garantizar de que estos estilos no se propaguen a otros
43
- componentes de la plataforna web. */
44
- /* @__PURE__ */ jsx(HelperTextRoot, { className: classes.root, children: /* @__PURE__ */ jsx(Typography, { variant: "body", skeletonWidth, skeletongHeight, children: message }) })
45
- );
46
- };
47
- export {
48
- HelperText as H,
49
- errorLabelClasses as e
50
- };
@@ -1,176 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { Marker } from "react-leaflet";
3
- import L__default from "leaflet";
4
- import { m as mapClasses, L as LABEL_BK_COLOR_DEFAULT, a as LABEL_COLOR_DEFAULT } from "../maps/components/Map/index-2Lx5ARXa.js";
5
- import clsx from "clsx";
6
- import { useEnvironment } from "@m4l/core";
7
- import { I as IconRoot, e as DivIcon, f as ArrowIconRoot } from "../../styles/index-DKj6m8SL.js";
8
- import { u as useSideBar, g as getNameDataTestId$1 } from "../SideBar/index-PUBBe0yH.js";
9
- import { T as TEST_PROP_ID } from "../../test/constants_no_mock-CF-669v-.js";
10
- import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
11
- import { unstable_composeClasses } from "@mui/base";
12
- import { useResponsiveDesktop } from "@m4l/graphics";
13
- const componentName = "M4LIcon";
14
- generateUtilityClasses(componentName, [
15
- /* elements */
16
- "root",
17
- "icon",
18
- "variantSkeleton",
19
- /* states or variants of elements */
20
- "sizeExtraSmall",
21
- "sizeSmall",
22
- "sizeMedium",
23
- "sizeLarge",
24
- "sizeExtraLarge",
25
- "rotationAngle"
26
- ]);
27
- function getIconClassesUtilityClass(slot) {
28
- return generateUtilityClass(componentName, slot);
29
- }
30
- const useUtilityClasses = (ownerState) => {
31
- const slots = {
32
- root: ["root"],
33
- icon: [
34
- "icon",
35
- ownerState.size === "extraSmall" && "sizeExtraSmall",
36
- ownerState.size === "small" && "sizeSmall",
37
- ownerState.size === "medium" && "sizeMedium",
38
- ownerState.size === "large" && "sizeLarge",
39
- ownerState.size === "extraLarge" && "sizeExtraLarge",
40
- ownerState.rotationAngle ? "rotationAngle" : ""
41
- ],
42
- variantSkeleton: [
43
- "variantSkeleton",
44
- ownerState.size === "extraSmall" && "sizeExtraSmall",
45
- ownerState.size === "small" && "sizeSmall",
46
- ownerState.size === "medium" && "sizeMedium",
47
- ownerState.size === "large" && "sizeLarge",
48
- ownerState.size === "extraLarge" && "sizeExtraLarge"
49
- ]
50
- };
51
- const composedClasses = unstable_composeClasses(slots, getIconClassesUtilityClass, {});
52
- return {
53
- ...composedClasses
54
- };
55
- };
56
- const ICON_PREFIX = "Icon";
57
- const getNameDataTestId = (KEY) => {
58
- return `${ICON_PREFIX}-${KEY}`;
59
- };
60
- function Icon(props) {
61
- const { src, size = "small", rotationAngle, className } = props;
62
- const isDesktop = useResponsiveDesktop();
63
- const ownerState = {
64
- size: isDesktop ? size : "medium",
65
- rotationAngle
66
- };
67
- const classes = useUtilityClasses(ownerState);
68
- return /* @__PURE__ */ jsx(
69
- IconRoot,
70
- {
71
- className: clsx(classes.root, className),
72
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("root") } : {},
73
- children: /* @__PURE__ */ jsx(
74
- DivIcon,
75
- {
76
- className: classes.icon,
77
- src,
78
- rotationAngle,
79
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("icon") } : {}
80
- }
81
- )
82
- }
83
- );
84
- }
85
- const FeatureDivIconLabel = (props) => {
86
- const {
87
- label,
88
- iconSrc,
89
- iconScale: scale = 1,
90
- iconRotate,
91
- labelBkColor: bkColor = LABEL_BK_COLOR_DEFAULT,
92
- labelColor: color = LABEL_COLOR_DEFAULT,
93
- iconWidth = 24,
94
- iconHeight = 24,
95
- offsetLeftTop = [24, 0]
96
- } = props;
97
- let html = label ? `<div class="${mapClasses.featureLabel}"
98
- style="background-color:${bkColor}; color:${color};left:${offsetLeftTop[0]}px;top:${offsetLeftTop[1]}px;">${label}</div>` : "";
99
- if (iconSrc) {
100
- html = `<div class="${mapClasses.markerLayerIcon}" style="transform: rotate(${iconRotate}deg) scale(${scale}); transform-origin: center center;">
101
- <img src=${iconSrc}></img>
102
- </div>` + html;
103
- }
104
- return L__default.divIcon({
105
- className: clsx(mapClasses.markerLayerRoot, ""),
106
- iconSize: [iconWidth, iconHeight],
107
- // iconAnchor: [-width, height/2],
108
- html
109
- });
110
- };
111
- const MarkerIconLabel = (props) => {
112
- const {
113
- position,
114
- draggable = true,
115
- iconSrc,
116
- iconRotate,
117
- iconScale: scale,
118
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
119
- className,
120
- label,
121
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
122
- markerColor,
123
- labelBkColor: bkColor,
124
- labelColor: color,
125
- iconWidth,
126
- iconHeight,
127
- offsetLeftTop,
128
- ...properties
129
- } = props;
130
- const makerIcon = FeatureDivIconLabel({
131
- iconSrc,
132
- iconRotate,
133
- iconScale: scale,
134
- label,
135
- iconWidth,
136
- iconHeight,
137
- labelBkColor: bkColor,
138
- labelColor: color,
139
- offsetLeftTop
140
- });
141
- return /* @__PURE__ */ jsx(
142
- Marker,
143
- {
144
- position,
145
- draggable,
146
- riseOnHover: true,
147
- icon: makerIcon,
148
- ...properties
149
- },
150
- Math.random()
151
- );
152
- };
153
- function ArrowIcon(props) {
154
- const { openState } = props;
155
- const { host_static_assets, environment_assets } = useEnvironment();
156
- const { classes } = useSideBar();
157
- return /* @__PURE__ */ jsx(
158
- ArrowIconRoot,
159
- {
160
- className: classes.arrowIconRoot,
161
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId$1("arrowIconRoot") } : {},
162
- children: /* @__PURE__ */ jsx(
163
- Icon,
164
- {
165
- src: `${host_static_assets}/${environment_assets}/frontend/components/sidebar/assets/icons/ChevronRight.svg`,
166
- rotationAngle: openState ? 90 : 0
167
- }
168
- )
169
- }
170
- );
171
- }
172
- export {
173
- ArrowIcon as A,
174
- Icon as I,
175
- MarkerIconLabel as M
176
- };