@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,505 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import React__default, { forwardRef, useState, useRef, useCallback, useEffect, useMemo } from "react";
3
- import { D as DraggableCore_1 } from "../../react-draggable-DsCPdgQP.js";
4
- import clsx from "clsx";
5
- import { styled, generateUtilityClasses, useForkRef } from "@mui/material";
6
- import "@mui/base";
7
- import { R as Resizable } from "../../react-resizable-eBbFl2dX.js";
8
- const WrapperDragResizeWindowRoot = styled("div")`
9
- position: absolute;
10
- left: 0px;
11
- top: 0px;
12
- background-color: gray;
13
- prop2: 1;
14
-
15
- &.M4LDraggableWindow-hidden {
16
- visibility: hidden;
17
- pointerevents: none;
18
- }
19
-
20
- ${(props) => props.theme.components?.M4LDragResizeWindow?.styleOverrides}
21
- `;
22
- const COMPONENT_CLASS_NAME = "M4LDraggableWindow";
23
- const DEFAULT_TRANSFORM_SCALE = 1;
24
- const draggableWindowClasses = generateUtilityClasses(
25
- COMPONENT_CLASS_NAME,
26
- [
27
- /* elements */
28
- "root",
29
- "draggableHandle",
30
- "draggableCancel",
31
- // state
32
- "dragging",
33
- "hidden"
34
- ]
35
- );
36
- function setTransform({ top, left, width, height }) {
37
- const translate = `translate(${left}px,${top}px)`;
38
- return {
39
- transform: translate,
40
- WebkitTransform: translate,
41
- MozTransform: translate,
42
- msTransform: translate,
43
- OTransform: translate,
44
- width: `${width}px`,
45
- height: `${height}px`,
46
- position: "absolute",
47
- prop1: 1
48
- };
49
- }
50
- const getInitialSize = (containerSize, defaultPosition) => {
51
- let top;
52
- let bottom;
53
- let height;
54
- let left;
55
- let right;
56
- let width;
57
- if ("top" in defaultPosition.vertical) {
58
- top = defaultPosition.vertical.top;
59
- }
60
- if ("bottom" in defaultPosition.vertical) {
61
- bottom = defaultPosition.vertical.bottom;
62
- }
63
- if ("height" in defaultPosition.vertical) {
64
- height = defaultPosition.vertical.height;
65
- }
66
- if ("left" in defaultPosition.horizontal) {
67
- left = defaultPosition.horizontal.left;
68
- }
69
- if ("right" in defaultPosition.horizontal) {
70
- right = defaultPosition.horizontal.right;
71
- }
72
- if ("width" in defaultPosition.horizontal) {
73
- width = defaultPosition.horizontal.width;
74
- }
75
- console.log("containerSize", containerSize);
76
- const containerHeight = containerSize?.containerHeight || 200;
77
- const containerWidth = containerSize?.containerWidth || 200;
78
- return {
79
- top: top ?? (bottom ? containerHeight - bottom - (height || 0) : 0),
80
- height: height ?? containerHeight - (top || 0) - (bottom || 0),
81
- // top: top || 0,
82
- // height: height ?? containerHeight - (top || 0) - (bottom || 0),
83
- left: left ?? (right ? containerWidth - right - (width || 0) : 0),
84
- width: width ?? containerWidth - (left || 0) - (right || 0)
85
- };
86
- };
87
- const DragResizeWindow = forwardRef((props, ref) => {
88
- const {
89
- //Comunes
90
- style,
91
- className,
92
- children,
93
- defaultPosition = { vertical: { top: 0, height: 100 }, horizontal: { left: 0, width: 100 } },
94
- containerElement,
95
- containerSize,
96
- transformScale = DEFAULT_TRANSFORM_SCALE,
97
- bounds = { left: 5, top: 5, right: -5, bottom: -5 },
98
- minWindowWidth = 200,
99
- minWindowHeight = 100,
100
- //Draggable
101
- draggableHandle = `.${draggableWindowClasses.draggableHandle}`,
102
- draggableCancel = `.${draggableWindowClasses.draggableCancel}`,
103
- draggable = true,
104
- onDragStart,
105
- onDrag,
106
- onDragStop,
107
- onMouseDown,
108
- //ResizeAble
109
- resizeable = true,
110
- resizeHandles = ["se", "nw"],
111
- resizeHandle,
112
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
113
- onResizeStart,
114
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
115
- onResize,
116
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
117
- onResizeStop,
118
- hidden,
119
- //Otras
120
- ...others
121
- } = props;
122
- const [currentState, setCurrentState] = useState(
123
- getInitialSize(containerSize, defaultPosition)
124
- );
125
- const stateRef = useRef({
126
- bounds,
127
- data: void 0,
128
- dragging: void 0,
129
- containerSize: containerSize ? { ...containerSize } : void 0,
130
- left: currentState.left,
131
- top: currentState.top,
132
- width: currentState.width,
133
- height: currentState.height
134
- });
135
- const wrapperRef = useRef(null);
136
- const handleAllRefs = useForkRef(wrapperRef, ref);
137
- const localOnDragStart = useCallback((e, draggableData) => {
138
- const { node } = draggableData;
139
- const newPosition = { top: 0, left: 0 };
140
- const parentRect = containerElement.getBoundingClientRect();
141
- const clientRect = node.getBoundingClientRect();
142
- const cLeft = clientRect.left / transformScale;
143
- const pLeft = parentRect.left / transformScale;
144
- const cTop = clientRect.top / transformScale;
145
- const pTop = parentRect.top / transformScale;
146
- newPosition.left = cLeft - pLeft + containerElement.scrollLeft;
147
- newPosition.top = cTop - pTop + containerElement.scrollTop;
148
- if (onDragStart) {
149
- if (onDragStart(e, draggableData) === false) {
150
- return false;
151
- }
152
- }
153
- stateRef.current.dragging = newPosition;
154
- setCurrentState((prev) => ({
155
- ...prev,
156
- ...newPosition,
157
- shrinkLeftAt: void 0,
158
- //Cancelar los flags de memoria de encogimiento del contenedor padre
159
- shrinkTopAt: void 0,
160
- //Cancelar los flags de memoria de encogimiento del contenedor padre
161
- overflowWidthAt: void 0,
162
- //Cancelar los flags de memoria de encogimiento del contenedor padre
163
- overflowHeightAt: void 0,
164
- //Cancelar los flags de memoria de encogimiento del contenedor padre
165
- dragging: newPosition
166
- }));
167
- }, []);
168
- const localOnDrag = useCallback((e, draggableData) => {
169
- const { deltaX, deltaY } = draggableData;
170
- if (!stateRef.current.dragging) {
171
- return;
172
- }
173
- if (onDrag) {
174
- if (onDrag(e, draggableData) === false) {
175
- return false;
176
- }
177
- }
178
- const top = stateRef.current.dragging.top + deltaY;
179
- const left = stateRef.current.dragging.left + deltaX;
180
- const newPosition = { top, left };
181
- stateRef.current.dragging = newPosition;
182
- setCurrentState((prev) => ({ ...prev, ...newPosition, dragging: newPosition }));
183
- }, []);
184
- const localOnDragStop = useCallback((e, draggableData) => {
185
- if (!stateRef.current.dragging) {
186
- return;
187
- }
188
- const { left, top } = stateRef.current.dragging;
189
- if (onDragStop) {
190
- if (onDragStop(e, draggableData) === false) {
191
- return false;
192
- }
193
- }
194
- const newPosition = { top, left };
195
- stateRef.current.dragging = void 0;
196
- setCurrentState((prev) => ({ ...prev, ...newPosition, dragging: void 0 }));
197
- }, []);
198
- const onResizeHandler = useCallback(
199
- (e, data, handlerName) => {
200
- const { size, handle } = data;
201
- const handler = props[handlerName];
202
- if (handler) {
203
- handler(e, data);
204
- }
205
- if (handlerName === "onResizeStart") {
206
- stateRef.current.initialPostion = {
207
- left: stateRef.current.left,
208
- top: stateRef.current.top,
209
- width: stateRef.current.width,
210
- height: stateRef.current.height
211
- };
212
- }
213
- const resizing = handlerName === "onResizeStop" ? void 0 : { ...size, handle };
214
- setCurrentState((prev) => ({
215
- ...prev,
216
- ...size,
217
- ...handlerName === "onResizeStart" ? {
218
- shrinkLeftAt: void 0,
219
- //Cancelar los flags de memoria de encogimiento del contenedor padre
220
- shrinkTopAt: void 0,
221
- //Cancelar los flags de memoria de encogimiento del contenedor padre
222
- overflowWidthAt: void 0,
223
- //Cancelar los flags de memoria de encogimiento del contenedor padre
224
- overflowHeightAt: void 0
225
- //Cancelar los flags de memoria de encogimiento del contenedor padre
226
- } : {},
227
- resizing
228
- }));
229
- stateRef.current.resizing = resizing;
230
- },
231
- []
232
- );
233
- const localOnResizeStart = useCallback((e, callbackData) => {
234
- onResizeHandler(e, callbackData, "onResizeStart");
235
- }, []);
236
- const localOnResize = useCallback((e, callbackData) => {
237
- onResizeHandler(e, callbackData, "onResize");
238
- }, []);
239
- const localOnResizeStop = useCallback((e, callbackData) => {
240
- onResizeHandler(e, callbackData, "onResizeStop");
241
- }, []);
242
- const shringkingParentContainer = useCallback(
243
- (newState, cState, containerDimension, divRoot, dimension) => {
244
- const lDimension = dimension === "Width" ? "width" : "height";
245
- const leftTop = dimension === "Width" ? "left" : "top";
246
- const shrinkLeftTopAt = dimension === "Width" ? "shrinkLeftAt" : "shrinkTopAt";
247
- const overflowDimensionAt = dimension === "Width" ? "overflowWidthAt" : "overflowHeightAt";
248
- const boundsLefTop = dimension === "Width" ? bounds?.left || 0 : bounds?.top || 0;
249
- const boundsRigthBottom = dimension === "Width" ? bounds?.right || 0 : bounds?.bottom || 0;
250
- const minWindowDimension = dimension === "Width" ? minWindowWidth : minWindowHeight;
251
- const minDimension = containerDimension - boundsLefTop + boundsRigthBottom > minWindowDimension ? containerDimension - boundsLefTop + boundsRigthBottom : minWindowDimension;
252
- let maxDimensionElement = containerDimension - cState[leftTop] + boundsRigthBottom;
253
- if (divRoot[`client${dimension}`] > maxDimensionElement) {
254
- const shrinkedPixels = divRoot[`client${dimension}`] - maxDimensionElement;
255
- if (shrinkedPixels < cState[leftTop] - boundsLefTop) {
256
- newState[leftTop] = newState[leftTop] - shrinkedPixels;
257
- newState[shrinkLeftTopAt] = newState[shrinkLeftTopAt] || cState[leftTop];
258
- } else if (shrinkedPixels > cState[leftTop] - boundsLefTop) {
259
- newState[leftTop] = boundsLefTop;
260
- newState[shrinkLeftTopAt] = newState[shrinkLeftTopAt] || cState[leftTop];
261
- maxDimensionElement = containerDimension - boundsLefTop + boundsRigthBottom;
262
- if (divRoot[`client${dimension}`] > maxDimensionElement) {
263
- newState[lDimension] = maxDimensionElement;
264
- newState[overflowDimensionAt] = newState[overflowDimensionAt] || cState[lDimension];
265
- if (newState[lDimension] < minDimension) {
266
- newState[lDimension] = minDimension;
267
- }
268
- }
269
- }
270
- } else {
271
- return;
272
- }
273
- },
274
- []
275
- );
276
- const expandingParentContainer = useCallback(
277
- (newState, _currentState, containerDimension, _divRoot, dimension) => {
278
- const lDimension = dimension === "Width" ? "width" : "height";
279
- const leftTop = dimension === "Width" ? "left" : "top";
280
- const shrinkLeftTopAt = dimension === "Width" ? "shrinkLeftAt" : "shrinkTopAt";
281
- const overflowDimensionAt = dimension === "Width" ? "overflowWidthAt" : "overflowHeightAt";
282
- const boundsLefTop = dimension === "Width" ? bounds?.left || 0 : bounds?.top || 0;
283
- const boundsRigthBottom = dimension === "Width" ? bounds?.right || 0 : bounds?.bottom || 0;
284
- const maxDimensionElement = containerDimension - boundsLefTop + boundsRigthBottom;
285
- const valOverflowDimensionAt = newState[overflowDimensionAt];
286
- if (valOverflowDimensionAt) {
287
- if (valOverflowDimensionAt > maxDimensionElement) {
288
- newState[lDimension] = maxDimensionElement;
289
- } else {
290
- newState[lDimension] = valOverflowDimensionAt;
291
- newState[overflowDimensionAt] = void 0;
292
- }
293
- }
294
- const valShrinkLeftTopAt = newState[shrinkLeftTopAt];
295
- if (valShrinkLeftTopAt && !newState[overflowDimensionAt]) {
296
- const dimensionAvailable = containerDimension - boundsLefTop - newState[lDimension] + boundsRigthBottom;
297
- if (valShrinkLeftTopAt <= dimensionAvailable) {
298
- newState[leftTop] = valShrinkLeftTopAt;
299
- newState[shrinkLeftTopAt] = void 0;
300
- } else {
301
- newState[leftTop] = dimensionAvailable;
302
- }
303
- }
304
- },
305
- []
306
- );
307
- const draggingOrResizingWindow = useCallback(
308
- (newState, _currentState, containerDimension, divRoot, dimension) => {
309
- const lDimension = dimension === "Width" ? "width" : "height";
310
- const leftTop = dimension === "Width" ? "left" : "top";
311
- const boundsLefTop = dimension === "Width" ? bounds?.left || 0 : bounds?.top || 0;
312
- const boundsRigthBottom = dimension === "Width" ? bounds?.right || 0 : bounds?.bottom || 0;
313
- const maxDimensionWithoutBounds = containerDimension - boundsLefTop + boundsRigthBottom;
314
- let rightBottomBoundary = containerDimension - newState[lDimension] + boundsRigthBottom;
315
- if (newState[lDimension] !== divRoot[`client${dimension}`]) ;
316
- if (newState.resizing && stateRef.current.initialPostion) {
317
- if (!newState.resizing.handle.includes("w")) {
318
- if (newState[leftTop] + newState[lDimension] > containerDimension + boundsRigthBottom) {
319
- newState[lDimension] = containerDimension - newState[leftTop] + boundsRigthBottom;
320
- }
321
- } else {
322
- if (newState[leftTop] < boundsLefTop) {
323
- newState[leftTop] = boundsLefTop;
324
- } else {
325
- const dif = newState[lDimension] - stateRef.current.initialPostion[lDimension];
326
- if (dif > 0) {
327
- if (newState[leftTop] - dif >= boundsLefTop) {
328
- newState[lDimension] = stateRef.current.initialPostion[lDimension] + dif;
329
- newState[leftTop] = newState[leftTop] - dif;
330
- if (newState[leftTop] + newState[lDimension] > maxDimensionWithoutBounds) ;
331
- } else {
332
- newState[leftTop] = boundsLefTop;
333
- newState[lDimension] = stateRef.current.initialPostion[lDimension];
334
- }
335
- } else if (dif < 0) {
336
- newState[leftTop] = newState[leftTop] - dif;
337
- newState[lDimension] = stateRef.current.initialPostion[lDimension] + dif;
338
- }
339
- }
340
- }
341
- }
342
- if (newState[lDimension] > maxDimensionWithoutBounds) {
343
- newState[lDimension] = maxDimensionWithoutBounds;
344
- }
345
- if (newState[leftTop] < boundsLefTop) {
346
- newState[leftTop] = boundsLefTop;
347
- }
348
- rightBottomBoundary = containerDimension + boundsRigthBottom;
349
- if (newState[leftTop] > rightBottomBoundary) {
350
- newState[leftTop] = rightBottomBoundary;
351
- }
352
- if (!newState.resizing && newState[leftTop] + newState[lDimension] > containerDimension + boundsRigthBottom) {
353
- const outWidthHeight = newState[leftTop] + newState[lDimension] - (containerDimension + boundsRigthBottom);
354
- if (newState[leftTop] - boundsLefTop > outWidthHeight) {
355
- newState[leftTop] = newState[leftTop] - outWidthHeight;
356
- }
357
- }
358
- if (newState.resizing && stateRef.current.initialPostion) {
359
- stateRef.current.initialPostion[lDimension] = newState[lDimension];
360
- stateRef.current.initialPostion[leftTop] = newState[leftTop];
361
- }
362
- },
363
- []
364
- );
365
- useEffect(() => {
366
- if (stateRef.current.containerSize === void 0 && containerSize) {
367
- stateRef.current.containerSize = containerSize;
368
- }
369
- if (!(containerSize && wrapperRef?.current && stateRef.current.containerSize)) {
370
- return;
371
- }
372
- if (currentState?.dragging) {
373
- return;
374
- }
375
- const newState = { ...currentState };
376
- const handleDimension = (dimension) => {
377
- if (stateRef.current?.containerSize && wrapperRef.current) {
378
- const containerSizeKey = `container${dimension}`;
379
- const containerSizeValue = containerSize[containerSizeKey];
380
- const previousContainerSizeValue = stateRef.current.containerSize[containerSizeKey];
381
- if (containerSizeValue > previousContainerSizeValue) {
382
- expandingParentContainer(
383
- newState,
384
- currentState,
385
- containerSizeValue,
386
- wrapperRef.current,
387
- dimension
388
- );
389
- } else if (containerSizeValue < previousContainerSizeValue) {
390
- shringkingParentContainer(
391
- newState,
392
- currentState,
393
- containerSizeValue,
394
- wrapperRef.current,
395
- dimension
396
- );
397
- } else {
398
- draggingOrResizingWindow(
399
- newState,
400
- currentState,
401
- containerSizeValue,
402
- wrapperRef.current,
403
- dimension
404
- );
405
- }
406
- }
407
- };
408
- handleDimension("Width");
409
- handleDimension("Height");
410
- stateRef.current.containerSize = { ...containerSize };
411
- if (newState.left !== currentState.left || newState.top !== currentState.top || newState.width !== currentState.width || newState.height !== currentState.height || newState.shrinkLeftAt !== currentState.shrinkLeftAt || newState.shrinkTopAt !== currentState.shrinkTopAt || newState.overflowWidthAt !== currentState.overflowWidthAt || newState.overflowHeightAt !== currentState.overflowHeightAt) {
412
- setCurrentState(newState);
413
- }
414
- if (!newState.resizing) {
415
- stateRef.current.left = newState.left;
416
- stateRef.current.top = newState.top;
417
- stateRef.current.height = newState.height;
418
- stateRef.current.width = newState.width;
419
- }
420
- }, [
421
- currentState,
422
- wrapperRef.current,
423
- bounds?.left,
424
- bounds?.top,
425
- bounds?.right,
426
- bounds?.bottom,
427
- containerSize?.containerWidth,
428
- containerSize?.containerHeight
429
- ]);
430
- const mixinResizable = useCallback(
431
- (child, position) => {
432
- const minConstraints = [minWindowWidth, minWindowHeight];
433
- return /* @__PURE__ */ jsx(
434
- Resizable,
435
- {
436
- draggableOpts: {
437
- disabled: !resizeable
438
- },
439
- className: resizeable ? void 0 : "react-resizable-hide",
440
- width: position.width,
441
- height: position.height,
442
- minConstraints,
443
- onResizeStop: localOnResizeStop,
444
- onResizeStart: localOnResizeStart,
445
- onResize: localOnResize,
446
- transformScale,
447
- resizeHandles,
448
- handle: resizeHandle,
449
- children: child
450
- }
451
- );
452
- },
453
- [resizeable, transformScale]
454
- );
455
- const mixinDraggable = useCallback(
456
- (child) => {
457
- return /* @__PURE__ */ jsx(
458
- DraggableCore_1,
459
- {
460
- onStart: localOnDragStart,
461
- onDrag: localOnDrag,
462
- onStop: localOnDragStop,
463
- handle: draggableHandle,
464
- cancel: ".react-resizable-handle" + (draggableCancel ? "," + draggableCancel : ""),
465
- scale: transformScale,
466
- nodeRef: wrapperRef,
467
- onMouseDown,
468
- ...others,
469
- children: child
470
- }
471
- );
472
- },
473
- [wrapperRef, transformScale, draggableHandle, draggableCancel]
474
- );
475
- const classNameFinal = clsx(draggableWindowClasses.root, className, {
476
- "react-draggable": draggable,
477
- //Requerido para el componente Draggable
478
- [draggableWindowClasses.hidden]: hidden
479
- // dropping: Boolean(droppingPosition),
480
- });
481
- const styleFinal = {
482
- ...style,
483
- ...setTransform(currentState),
484
- prop2: 1
485
- };
486
- const memoChildren = useMemo(() => {
487
- return children;
488
- }, [children]);
489
- const wrapperRoot = /* @__PURE__ */ jsx(
490
- WrapperDragResizeWindowRoot,
491
- {
492
- className: classNameFinal,
493
- ref: handleAllRefs,
494
- style: styleFinal,
495
- role: "none",
496
- children: memoChildren
497
- }
498
- );
499
- const dragResizeWindow = mixinDraggable(mixinResizable(wrapperRoot, currentState));
500
- return /* @__PURE__ */ jsx(React__default.Fragment, { children: dragResizeWindow });
501
- });
502
- export {
503
- DragResizeWindow as D,
504
- draggableWindowClasses as d
505
- };
@@ -1,31 +0,0 @@
1
- const DYNAMIC_FILTER_KEY_COMPONENT = "M4LDynamicFilter";
2
- const ALL_FIELD = {
3
- name: "all",
4
- dictionaryId: "dynamic_filter.all_fields",
5
- urlIcon: "",
6
- type: "string",
7
- multiple: true,
8
- presence: "optional"
9
- };
10
- const STRING_OPERATORS = ["c", "nc"];
11
- const NUMBER_OPERATORS = ["b", "e", "ne", "gt", "gte", "lt", "lte"];
12
- const BOOLEAN_OPERATORS = ["e", "ne"];
13
- const SELECT_OPERATORS = ["in", "nin"];
14
- const DATE_TIME_OPERATORS = [
15
- "b",
16
- "e",
17
- "ne",
18
- "gt",
19
- "gte",
20
- "lt",
21
- "lte"
22
- ];
23
- export {
24
- ALL_FIELD as A,
25
- BOOLEAN_OPERATORS as B,
26
- DYNAMIC_FILTER_KEY_COMPONENT as D,
27
- NUMBER_OPERATORS as N,
28
- SELECT_OPERATORS as S,
29
- DATE_TIME_OPERATORS as a,
30
- STRING_OPERATORS as b
31
- };
@@ -1,51 +0,0 @@
1
- import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index-CuG1pnXW.js";
2
- import { g as getRHFAutocompleteComponentsDictionary } from "../hook-form/RHFAutocomplete/index-BtPL16HR.js";
3
- const DYNAMIC_FILTER_DICTIONARY_ID = "dynamic_filter";
4
- function getDynamicFilterComponentsDictionary() {
5
- return [DYNAMIC_FILTER_DICTIONARY_ID].concat(
6
- getCommonActionsDictionary().concat(getRHFAutocompleteComponentsDictionary())
7
- );
8
- }
9
- const DICCTIONARY = {
10
- input_placeholder: "input_placeholder",
11
- operand_true: "operand_true",
12
- operand_false: "operand_false",
13
- filter_tooltip_refresh: "filter_tooltip_refresh",
14
- filter_tooltip_dirty: "filter_tooltip_dirty",
15
- filter_tooltip_invalid: "filter_tooltip_invalid",
16
- operator_b: "operator_b",
17
- operator_e: "operator_e",
18
- operator_ne: "operator_ne",
19
- operator_gt: "operator_gt",
20
- operator_gte: "operator_gte",
21
- operator_lt: "operator_lt",
22
- operator_lte: "operator_lte",
23
- operator_c: "operator_c",
24
- operator_nc: "operator_nc",
25
- operator_in: "operator_in",
26
- operator_nin: "operator_nin",
27
- label_boolean_operator: "label_boolean_operator",
28
- label_boolean_operand1: "label_boolean_operand1",
29
- label_operator_date_time: "label_operator_date_time",
30
- label_operand1_date_time: "label_operand1_date_time",
31
- label_operand2_date_time: "label_operand2_date_time",
32
- label_operator_number: "label_operator_number",
33
- label_operand1_number: "label_operand1_number",
34
- label_operand2_number: "label_operand2_number",
35
- label_operator_string: "label_operator_string",
36
- label_operand1_string: "label_operand1_string",
37
- operator_required: "operator_required",
38
- error_invalid_date: "error_invalid_date",
39
- error_less_than_start: "error_less_than_start",
40
- label_select_operator: "label_select_operator",
41
- label_select_operands_array: "label_select_operands_array",
42
- error_operand_required: "error_operand_required"
43
- };
44
- const getDynamicFilterDictionary = (key) => {
45
- return `${DYNAMIC_FILTER_DICTIONARY_ID}.${key}`;
46
- };
47
- export {
48
- DICCTIONARY as D,
49
- getDynamicFilterComponentsDictionary as a,
50
- getDynamicFilterDictionary as g
51
- };