@m4l/components 3.1.7 → 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 (201) hide show
  1. package/index.js +183 -340
  2. package/node_modules-CQtkw0uG.js +7350 -0
  3. package/package.json +1 -1
  4. package/vendor-AfIOyqRr.js +24636 -0
  5. package/components/AccountPopover/index-Dm2-k-Mv.js +0 -334
  6. package/components/AppBar/index-i0rhG3J1.js +0 -93
  7. package/components/BaseModule/index-CiNNlxzS.js +0 -30
  8. package/components/CommonActions/components/ActionCancel/index-CIdpDXkr.js +0 -12
  9. package/components/CommonActions/components/ActionFormCancel/index-CpyASN3q.js +0 -56
  10. package/components/CommonActions/components/ActionFormIntro/index-7KKtcUra.js +0 -33
  11. package/components/CommonActions/components/ActionIntro/index-CqqDZZcG.js +0 -25
  12. package/components/CommonActions/components/Actions/index-CuG1pnXW.js +0 -70
  13. package/components/DataGrid/constants-8L7QgBKi.js +0 -10
  14. package/components/DataGrid/formatters/ColumnBooleanFormatter/index-CveSCbq_.js +0 -26
  15. package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/index-CHqvieM2.js +0 -22
  16. package/components/DataGrid/formatters/ColumnDateFormatter/index-CKg8CJ6A.js +0 -19
  17. package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index-DE6bwaKP.js +0 -23
  18. package/components/DataGrid/formatters/ColumnNestedValueFormatter/index-BslXGK-A.js +0 -14
  19. package/components/DataGrid/formatters/ColumnPointsFormatter/index-BXGW2CsK.js +0 -10
  20. package/components/DataGrid/formatters/ColumnPriceFormatter/index-O11tBykn.js +0 -10
  21. package/components/DataGrid/formatters/ColumnSetCheckFormatter/index-BaCawLr1.js +0 -36
  22. package/components/DataGrid/formatters/ColumnUncertaintyFormatter/index-Cq7a-jnE.js +0 -10
  23. package/components/DataGrid/formatters/index-CrZXPa0e.js +0 -13
  24. package/components/DataGrid/index-BZ-lbmuU.js +0 -908
  25. package/components/DataGrid/subcomponents/Actions/index-CHvPZ4Ru.js +0 -549
  26. package/components/DataGrid/subcomponents/editors/TextEditor/index-BIFm8akr.js +0 -80
  27. package/components/DragResizeWindow/index-D2jLYExo.js +0 -505
  28. package/components/DynamicFilter/constants-ByqmFATV.js +0 -31
  29. package/components/DynamicFilter/dictionary-PrbXU3VZ.js +0 -51
  30. package/components/DynamicFilter/index-DZiJc9h7.js +0 -116
  31. package/components/DynamicFilter/slots/SlotsEnum-cawFeNzx.js +0 -34
  32. package/components/DynamicFilter/slots/dynamicFilterSlots-DHxelhXP.js +0 -151
  33. package/components/DynamicFilter/slots/index-l0sNRNKZ.js +0 -1
  34. package/components/DynamicFilter/store/index-BT-eWVnJ.js +0 -254
  35. package/components/DynamicFilter/subcomponents/AppliedFilterChip/index-B32bAzi-.js +0 -60
  36. package/components/DynamicFilter/subcomponents/AppliedFilters/index-Bha19drV.js +0 -26
  37. package/components/DynamicFilter/subcomponents/DynamicFilterBase/index-BmvzoHit.js +0 -40
  38. package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index-BcO3SlP5.js +0 -129
  39. package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index-BCJhpNS8.js +0 -171
  40. package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index-DCNhz68u.js +0 -153
  41. package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index-BdypjM1Y.js +0 -146
  42. package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index-D-NFIVnK.js +0 -114
  43. package/components/DynamicFilter/subcomponents/FieldTypes/index-BwQHJqk9.js +0 -38
  44. package/components/DynamicFilter/subcomponents/FilterActions/index-B9UWmk07.js +0 -88
  45. package/components/DynamicFilter/subcomponents/InputFilter/index-CfGb1TfV.js +0 -188
  46. package/components/DynamicFilter/subcomponents/PopoverFilter/index-DkfRGrlO.js +0 -158
  47. package/components/DynamicFilter/subcomponents/PopoverMenuFields/index-DSegwAm2.js +0 -63
  48. package/components/FieldLabel/index-CI57EizR.js +0 -54
  49. package/components/GridLayout/index-C4HyxNYX.js +0 -1044
  50. package/components/GridLayout/subcomponents/Griditem/index-C7jT4s8t.js +0 -395
  51. package/components/GridLayout/subcomponents/Responsive/index-BKcU2OnF.js +0 -348
  52. package/components/GridLayout/subcomponents/SizeProvider/index-1aJ-e_54.js +0 -71
  53. package/components/HelperText/index-Crn_XIPF.js +0 -50
  54. package/components/Icon/index-C89MAkeH.js +0 -176
  55. package/components/Image/index-COp8vP0X.js +0 -175
  56. package/components/LanguagePopover/index-BA2Igs9L.js +0 -179
  57. package/components/LinearProgressIndeterminate/index-BwI756Mb.js +0 -55
  58. package/components/Loadable/index-BMbi9ISF.js +0 -9
  59. package/components/LoadingError/index-Cf0oGUrL.js +0 -89
  60. package/components/MFIsolationApp/index-V4R55hNU.js +0 -169
  61. package/components/MFLoader/index-BI8vQZSH.js +0 -299
  62. package/components/ModalDialog/index-CEVQBQ7W.js +0 -77
  63. package/components/NavLink/index-D1S_vtFO.js +0 -55
  64. package/components/NoItemSelected/index-B9oM26AX.js +0 -54
  65. package/components/ObjectLogs/index-CiXOJpS4.js +0 -233
  66. package/components/PDFViewer/index-GVN2rfd6.js +0 -51
  67. package/components/Page/index-DZMkYmr4.js +0 -117
  68. package/components/PaperForm/index-DwgAfjci.js +0 -59
  69. package/components/Period/index-2pJG3VmY.js +0 -238
  70. package/components/PrintingSystem/index-B2qcnfw0.js +0 -187
  71. package/components/PrintingSystem/subcomponents/BodyNode/index-Cv2aoy8S.js +0 -49
  72. package/components/PrintingSystem/subcomponents/ChartNode/index-BmJm8v_C.js +0 -105
  73. package/components/PrintingSystem/subcomponents/DividerNode/index-MpFhE-H0.js +0 -20
  74. package/components/PrintingSystem/subcomponents/FooterNode/index-ZEcWdMSM.js +0 -49
  75. package/components/PrintingSystem/subcomponents/GridNode/index-SsKax2xu.js +0 -74
  76. package/components/PrintingSystem/subcomponents/HeaderNode/index-Cs8TOOBL.js +0 -49
  77. package/components/PrintingSystem/subcomponents/PaperNode/index-DBb25Ecg.js +0 -30
  78. package/components/PrintingSystem/subcomponents/PropertyValueNode/index-CTVn7J9Q.js +0 -47
  79. package/components/PrintingSystem/subcomponents/SectionNode/index-iYPM3EaS.js +0 -49
  80. package/components/PrintingSystem/subcomponents/TextBoxNode/index-DGjXCFKJ.js +0 -24
  81. package/components/PropertyValue/index-Bh-Jnrte.js +0 -264
  82. package/components/Resizeable/index-DdP1xfE9.js +0 -20
  83. package/components/ScrollBar/index-f2URPPE2.js +0 -35
  84. package/components/ScrollToTop/index-TxORk5dB.js +0 -12
  85. package/components/SideBar/index-PUBBe0yH.js +0 -758
  86. package/components/SplitLayout/index-Bu1hcO6G.js +0 -89
  87. package/components/ToastContainer/index-DK1d8NNd.js +0 -191
  88. package/components/WrapperComponent/index-BHV-CsDU.js +0 -14
  89. package/components/animate/LoadingScreen/index-CkVLOrMz.js +0 -70
  90. package/components/animate/MotionContainer/index-eartnWyO.js +0 -34
  91. package/components/animate/MotionLazyContainer/index-Be8osTiG.js +0 -9
  92. package/components/animate/PropagateLoader/index-Bkq8V2SN.js +0 -23
  93. package/components/animate/features-BbnE33u3.js +0 -5
  94. package/components/animate/index-BsWiJfzp.js +0 -89
  95. package/components/animate/variants/bounce-DanQqHAX.js +0 -101
  96. package/components/animate/variants/container-Dmpr6tg5.js +0 -22
  97. package/components/animate/variants/fade-CAOJNn06.js +0 -65
  98. package/components/animate/variants/index-l0sNRNKZ.js +0 -1
  99. package/components/animate/variants/transition-B9W5SWTa.js +0 -20
  100. package/components/areas/components/AreasAdmin/index-OxQU3P8Y.js +0 -699
  101. package/components/areas/components/AreasViewer/index-DQ0aPioP.js +0 -805
  102. package/components/areas/components/index-l0sNRNKZ.js +0 -1
  103. package/components/areas/constants-rqODZNZe.js +0 -6
  104. package/components/areas/contexts/AreasContext/index-BqRlA7JA.js +0 -1110
  105. package/components/areas/contexts/DynamicMFParmsContext/index-22c6E7vK.js +0 -36
  106. package/components/areas/contexts/WindowToolsMFContext/index-DkE30fhm.js +0 -12
  107. package/components/areas/contexts/index-l0sNRNKZ.js +0 -1
  108. package/components/areas/dictionary-YUsP9beq.js +0 -36
  109. package/components/areas/hooks/index-l0sNRNKZ.js +0 -1
  110. package/components/areas/hooks/useAreas/index-BSbwbJLS.js +0 -11
  111. package/components/areas/hooks/useDynamicMFParameters/index-DhbcZPs9.js +0 -12
  112. package/components/areas/hooks/useSetWindowsTitle/useSetWindowsTitle-BzPD-miW.js +0 -31
  113. package/components/areas/hooks/useWindowToolsMF/index-BECQfhbC.js +0 -10
  114. package/components/areas/icons-CwFr-alN.js +0 -24
  115. package/components/areas/index-B_Odny9h.js +0 -22
  116. package/components/commercial/AppBarCommercial/index-CHq3P3GY.js +0 -28
  117. package/components/commercial/SectionCommercial/index-BeABGtdr.js +0 -56
  118. package/components/commercial/TopBar/index-F1repmti.js +0 -232
  119. package/components/commercial/index-CxDzs6Ax.js +0 -81
  120. package/components/formatters/BooleanFormatter/index-DktIidqW.js +0 -44
  121. package/components/formatters/DateFormatter/index-CGcRZ8BA.js +0 -43
  122. package/components/formatters/PointsFormatter/index-C7sR8iqk.js +0 -25
  123. package/components/formatters/PriceFormatter/index-CsvRawmc.js +0 -35
  124. package/components/formatters/UncertaintyFormatter/index-B9ESVEVp.js +0 -29
  125. package/components/formatters/index-pnJhDYKe.js +0 -109
  126. package/components/hook-form/HelperError/index-BVnmUazV.js +0 -19
  127. package/components/hook-form/RHFAutocomplete/index-BtPL16HR.js +0 -657
  128. package/components/hook-form/RHFAutocompleteAsync/index-BfzjLHG8.js +0 -226
  129. package/components/hook-form/RHFCheckbox/index-Vyttu8Vx.js +0 -132
  130. package/components/hook-form/RHFColorPicker/index-Cxxb5Wa_.js +0 -191
  131. package/components/hook-form/RHFDateTime/index-CW1Slb-f.js +0 -190
  132. package/components/hook-form/RHFMultiCheckbox/index-BARudV1A.js +0 -34
  133. package/components/hook-form/RHFPeriod/index-r-HeIOoZ.js +0 -98
  134. package/components/hook-form/RHFRadioGroup/index-CTD-0zKo.js +0 -52
  135. package/components/hook-form/RHFSelect/index-LdwRuFz-.js +0 -29
  136. package/components/hook-form/RHFTextField/index-B6ufruSB.js +0 -337
  137. package/components/hook-form/RHFUpload/index-CDPbm8NR.js +0 -253
  138. package/components/maps/components/GpsTools/index-5MXlhIEt.js +0 -1948
  139. package/components/maps/components/Map/index-2Lx5ARXa.js +0 -2546
  140. package/components/maps/index-Ci-7-FHg.js +0 -7
  141. package/components/modal/WindowBase-Gd27v5FU.js +0 -44
  142. package/components/modal/WindowConfirm-u6vAMFo7.js +0 -73
  143. package/components/modal/index-CydPIpKZ.js +0 -65
  144. package/components/mui_extended/Accordion/index-DMLYJL7o.js +0 -124
  145. package/components/mui_extended/Avatar/index-ClBa-6eF.js +0 -64
  146. package/components/mui_extended/Badge/index-zI-F_Qkq.js +0 -29
  147. package/components/mui_extended/BoxIcon/index-BUTJ2tKw.js +0 -22
  148. package/components/mui_extended/Breadcrumbs/index-DTS7rOZH.js +0 -86
  149. package/components/mui_extended/Button/index-CGfZbaea.js +0 -222
  150. package/components/mui_extended/CheckBox-BXUrbonB.js +0 -76
  151. package/components/mui_extended/CircularProgress/index-Bnnti_G6.js +0 -8
  152. package/components/mui_extended/IconButton/classes/constants-ChY2jKkp.js +0 -4
  153. package/components/mui_extended/IconButton/classes/index-BxjJGAqZ.js +0 -45
  154. package/components/mui_extended/IconButton/index-CusYFjie.js +0 -97
  155. package/components/mui_extended/IconButton/styledIconButton-fAsbGoFS.js +0 -7
  156. package/components/mui_extended/LinearProgress/index-CGgW8jq2.js +0 -9
  157. package/components/mui_extended/LinkWithRoute/index-BC2miUjR.js +0 -15
  158. package/components/mui_extended/MenuActions/MenuActions-C6CjSU6C.js +0 -149
  159. package/components/mui_extended/MenuActions/constants-BwsU9chA.js +0 -10
  160. package/components/mui_extended/MenuActions/dictionary-Dj_07puT.js +0 -11
  161. package/components/mui_extended/MenuActions/slots/MenuActionsEnum-Bu-L6eWU.js +0 -13
  162. package/components/mui_extended/MenuActions/slots/MenuActionsSlots-D65KZAKF.js +0 -46
  163. package/components/mui_extended/Pager/index-DCbxiTZA.js +0 -257
  164. package/components/mui_extended/Popover/index-DfrJAQkV.js +0 -153
  165. package/components/mui_extended/Stack/index-DzEeCYfp.js +0 -31
  166. package/components/mui_extended/Tab/index-Bu3dPidV.js +0 -129
  167. package/components/mui_extended/ToggleButton/index-C9cBkT1V.js +0 -18
  168. package/components/mui_extended/ToggleIconButton/index--0b3Td6C.js +0 -26
  169. package/components/mui_extended/Tooltip/index-B8QUytCK.js +0 -42
  170. package/components/mui_extended/Typography/index-Cf_4Zw8f.js +0 -54
  171. package/components/mui_extended/index-l0sNRNKZ.js +0 -1
  172. package/components/popups/PopupsProvider/index-DhSxmtfJ.js +0 -172
  173. package/components/popups/PopupsViewer/constants-DuyD7aCn.js +0 -4
  174. package/components/popups/PopupsViewer/icons-BUujqqbu.js +0 -7
  175. package/components/popups/PopupsViewer/index-BecevSns.js +0 -172
  176. package/components/popups/PopupsViewer/slots/index-B98CiRLa.js +0 -14
  177. package/components/popups/PopupsViewer/slots/popupsViewerSlots-BXH77nCF.js +0 -46
  178. package/components/popups/index-l0sNRNKZ.js +0 -1
  179. package/contexts/ModalContext/index-CPfNnfTL.js +0 -39
  180. package/contexts/RHFormContext/index-D_nK759o.js +0 -78
  181. package/hocs/withToggle/index-C1_DMZD3.js +0 -14
  182. package/hooks/useFormAddEdit/index-D9oSjUn1.js +0 -90
  183. package/hooks/useFormReadyForUpdate/index-B3HygFCM.js +0 -20
  184. package/hooks/useModal/index-BJSQOX3U.js +0 -10
  185. package/hooks/useSizeContainer/index-D4hDjM1P.js +0 -37
  186. package/hooks/useStateRef/index-C3P6ZK3m.js +0 -15
  187. package/hooks/useTab/index-B_GEQFOP.js +0 -12
  188. package/react-data-grid-BfYuZ6AK.js +0 -2606
  189. package/react-draggable-DsCPdgQP.js +0 -811
  190. package/react-json-view-bhqIAaNg.js +0 -2576
  191. package/react-resizable-eBbFl2dX.js +0 -618
  192. package/react-spinners-TpKN9lZg.js +0 -123
  193. package/react-splitter-layout-C-JTsNGs.js +0 -158
  194. package/styles/DynamicFilter-CJFsIegc.js +0 -319
  195. package/styles/MenuActions-lTi-ynPM.js +0 -42
  196. package/styles/index-DKj6m8SL.js +0 -1691
  197. package/test/constants_no_mock-CF-669v-.js +0 -4
  198. package/test/getNameDataTestId-BaBTWhBr.js +0 -10
  199. package/utils/index-DiMrtgIu.js +0 -502
  200. /package/components/GridLayout/subcomponents/{Griditem → GridItem}/index.d.ts +0 -0
  201. /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
- };