@m4l/components 3.1.6 → 3.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/components/mui_extended/IconButton/index.d.ts +1 -1
  2. package/components/mui_extended/MenuActions/slots/MenuActionsSlots.d.ts +2 -4
  3. package/index.js +183 -339
  4. package/node_modules-CQtkw0uG.js +7350 -0
  5. package/package.json +1 -1
  6. package/vendor-AfIOyqRr.js +24636 -0
  7. package/components/AccountPopover/index-BdnzI23R.js +0 -334
  8. package/components/AppBar/index-Dvrx1jsr.js +0 -93
  9. package/components/BaseModule/index-BQ2UIUCy.js +0 -30
  10. package/components/CommonActions/components/ActionCancel/index-DSVEMl41.js +0 -12
  11. package/components/CommonActions/components/ActionFormCancel/index-DMsGH0wx.js +0 -56
  12. package/components/CommonActions/components/ActionFormIntro/index-C8zb7R3W.js +0 -33
  13. package/components/CommonActions/components/ActionIntro/index-BNIG3KAH.js +0 -25
  14. package/components/CommonActions/components/Actions/index-90JsZTzb.js +0 -70
  15. package/components/DataGrid/constants-8L7QgBKi.js +0 -10
  16. package/components/DataGrid/formatters/ColumnBooleanFormatter/index-ZsSxUL_T.js +0 -26
  17. package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/index-D-gZpvcm.js +0 -22
  18. package/components/DataGrid/formatters/ColumnDateFormatter/index-CKg8CJ6A.js +0 -19
  19. package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index-kZGiDU5k.js +0 -23
  20. package/components/DataGrid/formatters/ColumnNestedValueFormatter/index-BslXGK-A.js +0 -14
  21. package/components/DataGrid/formatters/ColumnPointsFormatter/index-BXGW2CsK.js +0 -10
  22. package/components/DataGrid/formatters/ColumnPriceFormatter/index-O11tBykn.js +0 -10
  23. package/components/DataGrid/formatters/ColumnSetCheckFormatter/index-BaCawLr1.js +0 -36
  24. package/components/DataGrid/formatters/ColumnUncertaintyFormatter/index-Cq7a-jnE.js +0 -10
  25. package/components/DataGrid/formatters/index-iKq2iRoa.js +0 -13
  26. package/components/DataGrid/index-DGHnRo8z.js +0 -908
  27. package/components/DataGrid/subcomponents/Actions/index-BhBvobKS.js +0 -549
  28. package/components/DataGrid/subcomponents/editors/TextEditor/index-BIFm8akr.js +0 -80
  29. package/components/DragResizeWindow/index-D2jLYExo.js +0 -505
  30. package/components/DynamicFilter/constants-ByqmFATV.js +0 -31
  31. package/components/DynamicFilter/dictionary-D9Z9YGDb.js +0 -51
  32. package/components/DynamicFilter/index-CRmtRWlr.js +0 -116
  33. package/components/DynamicFilter/slots/SlotsEnum-cawFeNzx.js +0 -34
  34. package/components/DynamicFilter/slots/dynamicFilterSlots-CQiB8TmY.js +0 -151
  35. package/components/DynamicFilter/slots/index-l0sNRNKZ.js +0 -1
  36. package/components/DynamicFilter/store/index-DoIifWTk.js +0 -254
  37. package/components/DynamicFilter/subcomponents/AppliedFilterChip/index-DQESCg04.js +0 -60
  38. package/components/DynamicFilter/subcomponents/AppliedFilters/index-CGmflaoY.js +0 -26
  39. package/components/DynamicFilter/subcomponents/DynamicFilterBase/index-BfH6YHNi.js +0 -40
  40. package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index-Dv3KjuYK.js +0 -129
  41. package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index-BnhNICK4.js +0 -171
  42. package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index-CNN6DeHY.js +0 -153
  43. package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index-C2dNPFtM.js +0 -146
  44. package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index-B03ahaU6.js +0 -114
  45. package/components/DynamicFilter/subcomponents/FieldTypes/index-EF7A6WnZ.js +0 -38
  46. package/components/DynamicFilter/subcomponents/FilterActions/index-CQtA2ELu.js +0 -88
  47. package/components/DynamicFilter/subcomponents/InputFilter/index-EXbXDSZA.js +0 -188
  48. package/components/DynamicFilter/subcomponents/PopoverFilter/index-BX8YCh9v.js +0 -158
  49. package/components/DynamicFilter/subcomponents/PopoverMenuFields/index-DvAYf5-a.js +0 -63
  50. package/components/FieldLabel/index-C8od8D0w.js +0 -54
  51. package/components/GridLayout/index-EPw3AYiQ.js +0 -1044
  52. package/components/GridLayout/subcomponents/Griditem/index-B8Q7iMhr.js +0 -395
  53. package/components/GridLayout/subcomponents/Responsive/index-D6BbBdVx.js +0 -348
  54. package/components/GridLayout/subcomponents/SizeProvider/index-OhbtnEN4.js +0 -71
  55. package/components/HelperText/index-sLK3dYG0.js +0 -50
  56. package/components/Icon/index-BJF_0F6d.js +0 -176
  57. package/components/Image/index-BxphCFC7.js +0 -175
  58. package/components/LanguagePopover/index-CkKie1Ph.js +0 -179
  59. package/components/LinearProgressIndeterminate/index-CTvXOPRx.js +0 -55
  60. package/components/Loadable/index-BMbi9ISF.js +0 -9
  61. package/components/LoadingError/index-BaaPhmyF.js +0 -89
  62. package/components/MFIsolationApp/index-BfHLGDcN.js +0 -169
  63. package/components/MFLoader/index-B8FmSpE7.js +0 -299
  64. package/components/ModalDialog/index-WSVr5sZr.js +0 -77
  65. package/components/NavLink/index-CKgi5l5M.js +0 -55
  66. package/components/NoItemSelected/index-BKsZKc_f.js +0 -54
  67. package/components/ObjectLogs/index-BJkjYQaa.js +0 -233
  68. package/components/PDFViewer/index-Cnbioqzo.js +0 -51
  69. package/components/Page/index-DSSwuNSp.js +0 -117
  70. package/components/PaperForm/index-C1OKDnuY.js +0 -59
  71. package/components/Period/index-DYE7Bj45.js +0 -238
  72. package/components/PrintingSystem/index-BkfHXcTV.js +0 -187
  73. package/components/PrintingSystem/subcomponents/BodyNode/index-Btg2zXVQ.js +0 -49
  74. package/components/PrintingSystem/subcomponents/ChartNode/index-GLjhqKd2.js +0 -105
  75. package/components/PrintingSystem/subcomponents/DividerNode/index-D9T1MWQd.js +0 -20
  76. package/components/PrintingSystem/subcomponents/FooterNode/index-C3LET1ZY.js +0 -49
  77. package/components/PrintingSystem/subcomponents/GridNode/index-BPz7lGvC.js +0 -74
  78. package/components/PrintingSystem/subcomponents/HeaderNode/index-DY4Yci1r.js +0 -49
  79. package/components/PrintingSystem/subcomponents/PaperNode/index-BYoGJll5.js +0 -30
  80. package/components/PrintingSystem/subcomponents/PropertyValueNode/index-vFZ5Skyl.js +0 -47
  81. package/components/PrintingSystem/subcomponents/SectionNode/index-BNqGWpcj.js +0 -49
  82. package/components/PrintingSystem/subcomponents/TextBoxNode/index-wgdfWbfF.js +0 -24
  83. package/components/PropertyValue/index-dwO3Qo0Y.js +0 -264
  84. package/components/Resizeable/index-CHseEYjL.js +0 -20
  85. package/components/ScrollBar/index-BYMy_qJE.js +0 -35
  86. package/components/ScrollToTop/index-TxORk5dB.js +0 -12
  87. package/components/SideBar/index-DqKD_S9_.js +0 -758
  88. package/components/SplitLayout/index-D4lxi0ig.js +0 -89
  89. package/components/ToastContainer/index-jnQcIcV1.js +0 -191
  90. package/components/WrapperComponent/index-BHV-CsDU.js +0 -14
  91. package/components/animate/LoadingScreen/index-CTGGa4Yt.js +0 -70
  92. package/components/animate/MotionContainer/index-eartnWyO.js +0 -34
  93. package/components/animate/MotionLazyContainer/index-Be8osTiG.js +0 -9
  94. package/components/animate/PropagateLoader/index-Bkq8V2SN.js +0 -23
  95. package/components/animate/features-BbnE33u3.js +0 -5
  96. package/components/animate/index-9dC9NmWv.js +0 -89
  97. package/components/animate/variants/bounce-DanQqHAX.js +0 -101
  98. package/components/animate/variants/container-Dmpr6tg5.js +0 -22
  99. package/components/animate/variants/fade-CAOJNn06.js +0 -65
  100. package/components/animate/variants/index-l0sNRNKZ.js +0 -1
  101. package/components/animate/variants/transition-B9W5SWTa.js +0 -20
  102. package/components/areas/components/AreasAdmin/index-BU9AX60_.js +0 -699
  103. package/components/areas/components/AreasViewer/index-CPlZxIzK.js +0 -805
  104. package/components/areas/components/index-l0sNRNKZ.js +0 -1
  105. package/components/areas/constants-rqODZNZe.js +0 -6
  106. package/components/areas/contexts/AreasContext/index-DGguLxcX.js +0 -1110
  107. package/components/areas/contexts/DynamicMFParmsContext/index-22c6E7vK.js +0 -36
  108. package/components/areas/contexts/WindowToolsMFContext/index-DkE30fhm.js +0 -12
  109. package/components/areas/contexts/index-l0sNRNKZ.js +0 -1
  110. package/components/areas/dictionary-YUsP9beq.js +0 -36
  111. package/components/areas/hooks/index-l0sNRNKZ.js +0 -1
  112. package/components/areas/hooks/useAreas/index-DBXtbtIu.js +0 -11
  113. package/components/areas/hooks/useDynamicMFParameters/index-DhbcZPs9.js +0 -12
  114. package/components/areas/hooks/useSetWindowsTitle/useSetWindowsTitle-BzPD-miW.js +0 -31
  115. package/components/areas/hooks/useWindowToolsMF/index-BECQfhbC.js +0 -10
  116. package/components/areas/icons-CwFr-alN.js +0 -24
  117. package/components/areas/index-B_Odny9h.js +0 -22
  118. package/components/commercial/AppBarCommercial/index-faX1fxjn.js +0 -28
  119. package/components/commercial/SectionCommercial/index-Dspd2Hd7.js +0 -56
  120. package/components/commercial/TopBar/index-zACdM_C0.js +0 -232
  121. package/components/commercial/index-9P0yOdH4.js +0 -81
  122. package/components/formatters/BooleanFormatter/index-PoFZ3r_m.js +0 -44
  123. package/components/formatters/DateFormatter/index-CGcRZ8BA.js +0 -43
  124. package/components/formatters/PointsFormatter/index-C7sR8iqk.js +0 -25
  125. package/components/formatters/PriceFormatter/index-CsvRawmc.js +0 -35
  126. package/components/formatters/UncertaintyFormatter/index-B9ESVEVp.js +0 -29
  127. package/components/formatters/index-CEJ6VCMb.js +0 -109
  128. package/components/hook-form/HelperError/index-DRvAkpwm.js +0 -19
  129. package/components/hook-form/RHFAutocomplete/index-DS57m8AX.js +0 -657
  130. package/components/hook-form/RHFAutocompleteAsync/index-Bu6NYmG_.js +0 -226
  131. package/components/hook-form/RHFCheckbox/index-BsB42rRc.js +0 -132
  132. package/components/hook-form/RHFColorPicker/index-Dox0FPrV.js +0 -191
  133. package/components/hook-form/RHFDateTime/index-ef19Az1N.js +0 -190
  134. package/components/hook-form/RHFMultiCheckbox/index-BARudV1A.js +0 -34
  135. package/components/hook-form/RHFPeriod/index-DyRLTD0w.js +0 -98
  136. package/components/hook-form/RHFRadioGroup/index-pgTLVF9t.js +0 -52
  137. package/components/hook-form/RHFSelect/index-LdwRuFz-.js +0 -29
  138. package/components/hook-form/RHFTextField/index-BgsElxUF.js +0 -337
  139. package/components/hook-form/RHFUpload/index-B6m3ypzh.js +0 -253
  140. package/components/maps/components/GpsTools/index-CeLi75XZ.js +0 -1948
  141. package/components/maps/components/Map/index-D4B8Lfgv.js +0 -2545
  142. package/components/maps/index-Ci-7-FHg.js +0 -7
  143. package/components/modal/WindowBase-CkftshqR.js +0 -44
  144. package/components/modal/WindowConfirm-C5YnzF-B.js +0 -73
  145. package/components/modal/index-CydPIpKZ.js +0 -65
  146. package/components/mui_extended/Accordion/index-jF2uxSmi.js +0 -124
  147. package/components/mui_extended/Avatar/index-CHmsrmfc.js +0 -64
  148. package/components/mui_extended/Badge/index-B_BGIjkQ.js +0 -29
  149. package/components/mui_extended/BoxIcon/index-BUTJ2tKw.js +0 -22
  150. package/components/mui_extended/Breadcrumbs/index-DTS7rOZH.js +0 -86
  151. package/components/mui_extended/Button/index-CgvCim_g.js +0 -222
  152. package/components/mui_extended/CheckBox-H73kpinr.js +0 -76
  153. package/components/mui_extended/CircularProgress/index-Bnnti_G6.js +0 -8
  154. package/components/mui_extended/IconButton/classes/constants-ChY2jKkp.js +0 -4
  155. package/components/mui_extended/IconButton/classes/index-BxjJGAqZ.js +0 -45
  156. package/components/mui_extended/IconButton/index-B8lOMybH.js +0 -117
  157. package/components/mui_extended/IconButton/styledIconButton-fAsbGoFS.js +0 -7
  158. package/components/mui_extended/IconButton/types-l0sNRNKZ.js +0 -1
  159. package/components/mui_extended/LinearProgress/index-CGgW8jq2.js +0 -9
  160. package/components/mui_extended/LinkWithRoute/index-BC2miUjR.js +0 -15
  161. package/components/mui_extended/MenuActions/MenuActions-DA_aS7o5.js +0 -149
  162. package/components/mui_extended/MenuActions/constants-BwsU9chA.js +0 -10
  163. package/components/mui_extended/MenuActions/dictionary-Dj_07puT.js +0 -11
  164. package/components/mui_extended/MenuActions/slots/MenuActionsEnum-Bu-L6eWU.js +0 -13
  165. package/components/mui_extended/MenuActions/slots/MenuActionsSlots-BVp0M8fu.js +0 -47
  166. package/components/mui_extended/Pager/index-Dtk4aUiU.js +0 -257
  167. package/components/mui_extended/Popover/index-Dl1PwIS2.js +0 -153
  168. package/components/mui_extended/Stack/index-CRzpVi2a.js +0 -31
  169. package/components/mui_extended/Tab/index-DmrsMLOq.js +0 -129
  170. package/components/mui_extended/ToggleButton/index-CAnHC1N-.js +0 -18
  171. package/components/mui_extended/Tooltip/index-B8QUytCK.js +0 -42
  172. package/components/mui_extended/Typography/index-DXq1fG8k.js +0 -54
  173. package/components/mui_extended/index-l0sNRNKZ.js +0 -1
  174. package/components/popups/PopupsProvider/index-DhSxmtfJ.js +0 -172
  175. package/components/popups/PopupsViewer/constants-DuyD7aCn.js +0 -4
  176. package/components/popups/PopupsViewer/icons-BUujqqbu.js +0 -7
  177. package/components/popups/PopupsViewer/index-CMI1SK_O.js +0 -172
  178. package/components/popups/PopupsViewer/slots/index-B98CiRLa.js +0 -14
  179. package/components/popups/PopupsViewer/slots/popupsViewerSlots-DOkmuvnx.js +0 -46
  180. package/components/popups/index-l0sNRNKZ.js +0 -1
  181. package/contexts/ModalContext/index-Bp_s1qUm.js +0 -39
  182. package/contexts/RHFormContext/index-BQ0XWrpK.js +0 -78
  183. package/hocs/withToggle/index-C1_DMZD3.js +0 -14
  184. package/hooks/useFormAddEdit/index-dLVQB7hC.js +0 -90
  185. package/hooks/useFormReadyForUpdate/index-B3HygFCM.js +0 -20
  186. package/hooks/useModal/index-69rbrQ0v.js +0 -10
  187. package/hooks/useSizeContainer/index-D4hDjM1P.js +0 -37
  188. package/hooks/useStateRef/index-C3P6ZK3m.js +0 -15
  189. package/hooks/useTab/index-DYRxOmMI.js +0 -12
  190. package/react-data-grid-BfYuZ6AK.js +0 -2606
  191. package/react-draggable-DsCPdgQP.js +0 -811
  192. package/react-json-view-bhqIAaNg.js +0 -2576
  193. package/react-resizable-eBbFl2dX.js +0 -618
  194. package/react-spinners-TpKN9lZg.js +0 -123
  195. package/react-splitter-layout-C-JTsNGs.js +0 -158
  196. package/styles/DynamicFilter-CJFsIegc.js +0 -319
  197. package/styles/MenuActions-lTi-ynPM.js +0 -42
  198. package/styles/index-CqpubQQr.js +0 -1691
  199. package/test/constants_no_mock-CF-669v-.js +0 -4
  200. package/test/getNameDataTestId-BaBTWhBr.js +0 -10
  201. package/utils/index-DiMrtgIu.js +0 -502
  202. /package/components/GridLayout/subcomponents/{Griditem → GridItem}/index.d.ts +0 -0
  203. /package/components/GridLayout/subcomponents/{Griditem → GridItem}/types.d.ts +0 -0
@@ -1,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-90JsZTzb.js";
2
- import { g as getRHFAutocompleteComponentsDictionary } from "../hook-form/RHFAutocomplete/index-DS57m8AX.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
- };