@m4l/components 9.2.0 → 9.2.2

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 (288) hide show
  1. package/.storybook/decorators/WithPopupsProvider/WithPopupsProvider.d.ts +6 -1
  2. package/.storybook/decorators/WithWindowsContainerSizer/WithWindowsContainerSizer.d.ts +5 -0
  3. package/@types/types.d.ts +11 -0
  4. package/components/AccountPopover/slots/AccountPopoverSlots.d.ts +3 -3
  5. package/components/AppBar/slots/AppBarSlots.d.ts +2 -2
  6. package/components/Chip/slots/ChipSlots.d.ts +1 -1
  7. package/components/Color/slots/ColorSlots.d.ts +1 -1
  8. package/components/CommonActions/components/ActionCancel/slots/ActionsCancelSlots.d.ts +1 -1
  9. package/components/CommonActions/components/ActionFormCancel/ActionFormCancel.js +1 -1
  10. package/components/CommonActions/components/ActionFormCancel/slots/ActionFormCancelSlots.d.ts +1 -1
  11. package/components/CommonActions/components/ActionIntro/slots/ActionsIntroSlots.d.ts +1 -1
  12. package/components/CommonActions/components/ActionsContainer/slots/ActionsContainerSlots.d.ts +1 -1
  13. package/components/DragResizeWindow/DragResizeWindow.d.ts +2 -2
  14. package/components/DragResizeWindow/DragResizeWindow.js +69 -11
  15. package/components/DragResizeWindow/DragResizeWindow.styles.js +0 -2
  16. package/components/DragResizeWindow/classes/index.js +1 -0
  17. package/components/DragResizeWindow/classes/types.d.ts +1 -0
  18. package/components/DragResizeWindow/helpers/draggingOrResizingWindow.d.ts +7 -0
  19. package/components/DragResizeWindow/helpers/draggingOrResizingWindow.js +1 -0
  20. package/components/DragResizeWindow/helpers/expandingParentContainer.d.ts +12 -0
  21. package/components/DragResizeWindow/helpers/expandingParentContainer.js +31 -0
  22. package/components/DragResizeWindow/helpers/getInitialSize.d.ts +15 -0
  23. package/components/DragResizeWindow/helpers/getInitialSize.js +56 -0
  24. package/components/DragResizeWindow/helpers/index.d.ts +6 -15
  25. package/components/DragResizeWindow/helpers/index.js +1 -37
  26. package/components/DragResizeWindow/helpers/isElmentInViewport.d.ts +15 -0
  27. package/components/DragResizeWindow/helpers/isElmentInViewport.js +1 -0
  28. package/components/DragResizeWindow/helpers/pointPosition.d.ts +36 -0
  29. package/components/DragResizeWindow/helpers/pointPosition.js +82 -0
  30. package/components/DragResizeWindow/helpers/shrinkingParentContainer.d.ts +6 -0
  31. package/components/DragResizeWindow/helpers/shrinkingParentContainer.js +34 -0
  32. package/components/DragResizeWindow/hooks/useDimensionEffects.d.ts +2 -0
  33. package/components/DragResizeWindow/hooks/useDimensionEffects.js +20 -223
  34. package/components/DragResizeWindow/hooks/useDragOptions.d.ts +8 -1
  35. package/components/DragResizeWindow/hooks/useDragOptions.js +79 -6
  36. package/components/DragResizeWindow/hooks/useResizeOptions.d.ts +11 -0
  37. package/components/DragResizeWindow/hooks/useResizeOptions.js +164 -19
  38. package/components/DragResizeWindow/slots/DragResizeWindowSlots.d.ts +2 -2
  39. package/components/DragResizeWindow/types.d.ts +53 -4
  40. package/components/DragResizeWindow/utils.d.ts +5 -2
  41. package/components/DragResizeWindow/utils.js +32 -13
  42. package/components/DragResizeWindowRND/DragResizeWindowRND.d.ts +19 -0
  43. package/components/DragResizeWindowRND/DragResizeWindowRND.js +224 -0
  44. package/components/DragResizeWindowRND/DragResizeWindowRND.styles.d.ts +5 -0
  45. package/components/DragResizeWindowRND/DragResizeWindowRND.styles.js +75 -0
  46. package/components/DragResizeWindowRND/classes/index.d.ts +2 -0
  47. package/components/DragResizeWindowRND/classes/index.js +18 -0
  48. package/components/DragResizeWindowRND/classes/types.d.ts +9 -0
  49. package/components/DragResizeWindowRND/constants.d.ts +3 -0
  50. package/components/DragResizeWindowRND/constants.js +6 -0
  51. package/components/DragResizeWindowRND/helpers/expandingParentContainer.d.ts +12 -0
  52. package/components/DragResizeWindowRND/helpers/expandingParentContainer.js +31 -0
  53. package/components/DragResizeWindowRND/helpers/getInitialSize.d.ts +15 -0
  54. package/components/DragResizeWindowRND/helpers/getInitialSize.js +56 -0
  55. package/components/DragResizeWindowRND/helpers/index.d.ts +5 -0
  56. package/components/DragResizeWindowRND/helpers/index.js +1 -0
  57. package/components/DragResizeWindowRND/helpers/isElmentInViewport.d.ts +15 -0
  58. package/components/DragResizeWindowRND/helpers/isElmentInViewport.js +1 -0
  59. package/components/DragResizeWindowRND/helpers/pointPosition.d.ts +36 -0
  60. package/components/DragResizeWindowRND/helpers/pointPosition.js +1 -0
  61. package/components/DragResizeWindowRND/helpers/shrinkingParentContainer.d.ts +6 -0
  62. package/components/DragResizeWindowRND/helpers/shrinkingParentContainer.js +34 -0
  63. package/components/DragResizeWindowRND/hooks/useRNDDimensionEffects.d.ts +23 -0
  64. package/components/DragResizeWindowRND/hooks/useRNDDimensionEffects.js +90 -0
  65. package/components/DragResizeWindowRND/hooks/useRNDDragOptions.d.ts +28 -0
  66. package/components/DragResizeWindowRND/hooks/useRNDDragOptions.js +220 -0
  67. package/components/DragResizeWindowRND/hooks/useRNDReResizeOptions.d.ts +45 -0
  68. package/components/DragResizeWindowRND/hooks/useRNDReResizeOptions.js +173 -0
  69. package/components/DragResizeWindowRND/icons.d.ts +3 -0
  70. package/components/DragResizeWindowRND/index.d.ts +2 -0
  71. package/components/DragResizeWindowRND/index.js +1 -0
  72. package/components/DragResizeWindowRND/slots/DragResizeWindowRNDSlots.d.ts +12 -0
  73. package/components/DragResizeWindowRND/slots/DragResizeWindowRNDSlots.js +19 -0
  74. package/components/DragResizeWindowRND/slots/slots.d.ts +5 -0
  75. package/components/DragResizeWindowRND/slots/slots.js +9 -0
  76. package/components/DragResizeWindowRND/types.d.ts +295 -0
  77. package/components/DragResizeWindowRND/utils.d.ts +15 -0
  78. package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +4 -4
  79. package/components/DynamicFilter/subcomponents/PopoverFilter/usePopoverFilter.d.ts +3 -3
  80. package/components/DynamicSort/slots/DynamicSortSlots.d.ts +2 -2
  81. package/components/DynamicSort/subcomponents/PopoverSort/usePopoverSort.d.ts +3 -3
  82. package/components/GridLayout/GridLayout.d.ts +2 -1
  83. package/components/GridLayout/GridLayout.js +10 -5
  84. package/components/GridLayout/classes/index.d.ts +1 -1
  85. package/components/GridLayout/subcomponents/Responsive/index.d.ts +1 -1
  86. package/components/GridLayout/subcomponents/Responsive/index.js +4 -3
  87. package/components/GridLayout/subcomponents/Responsive/types.d.ts +4 -0
  88. package/components/GridLayout/subcomponents/withSizeProvider/index.d.ts +3 -1
  89. package/components/GridLayout/subcomponents/withSizeProvider/index.js +11 -15
  90. package/components/GridLayout/types.d.ts +4 -0
  91. package/components/Label/slots/LabelSlots.d.ts +1 -1
  92. package/components/LanguagePopover/slots/LanguagePopoverSlots.d.ts +1 -1
  93. package/components/MFIsolationApp/MFIsolationApp.js +24 -11
  94. package/components/MFIsolationApp/types.d.ts +8 -1
  95. package/components/MFLoader/styles.js +17 -2
  96. package/components/MFLoader/types.d.ts +19 -2
  97. package/components/MenuActions/slots/MenuActionsSlots.d.ts +2 -2
  98. package/components/ModalDialog/ModalDialog.js +2 -2
  99. package/components/ModalDialog/slots/ModalDialogSlots.d.ts +2 -2
  100. package/components/NumberInput/slots/NumberInputSlots.d.ts +2 -2
  101. package/components/ToastContainer/slots/toastContainerSlots.d.ts +2 -2
  102. package/components/ToastContainer/slots/toastContainerSlots.js +1 -1
  103. package/components/WindowBase/WindowBase.js +3 -5
  104. package/components/WindowBase/WindowBase.styles.js +26 -17
  105. package/components/{areas/contexts/DynamicMFParmsContext/index.js → WindowBase/contexts/DynamicMFParmsContext/DynamicMFParmsContext.js} +2 -2
  106. package/components/WindowBase/contexts/DynamicMFParmsContext/index.d.ts +4 -0
  107. package/components/WindowBase/contexts/DynamicMFParmsContext/index.js +1 -0
  108. package/components/{areas → WindowBase}/contexts/DynamicMFParmsContext/store.d.ts +0 -1
  109. package/components/{areas/contexts/WindowToolsMFContext/index.js → WindowBase/contexts/WindowToolsMFContext/WindowToolsMFContext.js} +4 -3
  110. package/components/WindowBase/contexts/WindowToolsMFContext/index.d.ts +2 -0
  111. package/components/WindowBase/contexts/WindowToolsMFContext/index.js +1 -0
  112. package/components/{areas → WindowBase}/contexts/WindowToolsMFContext/types.d.ts +3 -2
  113. package/components/WindowBase/contexts/index.d.ts +2 -0
  114. package/components/WindowBase/helpers.d.ts +22 -0
  115. package/components/{areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions/helper.js → WindowBase/helpers.js} +17 -13
  116. package/components/{areas → WindowBase}/hooks/useDynamicMFParameters/index.js +9 -1
  117. package/components/{areas → WindowBase}/hooks/useWindowToolsMF/index.js +1 -1
  118. package/components/WindowBase/index.d.ts +5 -0
  119. package/components/WindowBase/slots/WindowBaseEnum.d.ts +2 -1
  120. package/components/WindowBase/slots/WindowBaseEnum.js +1 -0
  121. package/components/WindowBase/slots/WindowBaseSlots.d.ts +45 -14
  122. package/components/WindowBase/slots/WindowBaseSlots.js +10 -5
  123. package/components/{areas/components/AreasViewer/subcomponents/Area/subcomponents/Window → WindowBase}/subcomponents/Component/index.d.ts +1 -1
  124. package/components/{areas/components/AreasViewer/subcomponents/Area/subcomponents/Window → WindowBase}/subcomponents/Component/index.js +6 -6
  125. package/components/WindowBase/subcomponents/Component/types.d.ts +9 -0
  126. package/components/WindowBase/subcomponents/EditionInfo/EditionInfo.js +1 -1
  127. package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +52 -24
  128. package/components/WindowBase/subcomponents/Header/types.d.ts +1 -38
  129. package/components/WindowBase/subcomponents/MicroFrontend/MicroFrontend.d.ts +8 -0
  130. package/components/WindowBase/subcomponents/MicroFrontend/MicroFrontend.js +10 -0
  131. package/components/WindowBase/subcomponents/MicroFrontend/types.d.ts +8 -0
  132. package/components/WindowBase/types.d.ts +52 -18
  133. package/components/WindowConfirm/WindowConfirm.js +1 -1
  134. package/components/areas/components/AreasAdmin/slots/AreasAdminSlots.d.ts +2 -2
  135. package/components/areas/components/AreasViewer/AreasViewer.d.ts +1 -1
  136. package/components/areas/components/AreasViewer/AreasViewer.js +7 -9
  137. package/components/areas/components/AreasViewer/AreasViewer.styles.js +12 -11
  138. package/components/areas/components/AreasViewer/slots/AreasViewerEnum.d.ts +2 -2
  139. package/components/areas/components/AreasViewer/slots/AreasViewerEnum.js +1 -1
  140. package/components/areas/components/AreasViewer/slots/AreasViewerSlots.d.ts +3 -3
  141. package/components/areas/components/AreasViewer/slots/AreasViewerSlots.js +6 -5
  142. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.js +44 -4
  143. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.d.ts +7 -5
  144. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +9 -9
  145. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions.d.ts +12 -0
  146. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions.js +58 -0
  147. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.d.ts +6 -0
  148. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.js +88 -0
  149. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/{useWindow/useWindow.d.ts → useWindow.d.ts} +7 -7
  150. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/{useWindow/useWindow.js → useWindow.js} +13 -11
  151. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/types.d.ts +7 -3
  152. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowModal/WindowModal.d.ts +5 -4
  153. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowModal/WindowModal.js +25 -25
  154. package/components/areas/components/AreasViewer/types.d.ts +3 -1
  155. package/components/areas/components/index.d.ts +1 -1
  156. package/components/areas/constants.d.ts +1 -0
  157. package/components/areas/constants.js +3 -1
  158. package/components/areas/contexts/AreasContext/helpers/generateModuleCount.d.ts +2 -2
  159. package/components/areas/contexts/AreasContext/helpers/getWindowForAreaTest.d.ts +2 -2
  160. package/components/areas/contexts/AreasContext/helpers/helper.d.ts +4 -4
  161. package/components/areas/contexts/AreasContext/helpers/helper.js +6 -8
  162. package/components/areas/contexts/AreasContext/helpers/selectLayout.d.ts +6 -0
  163. package/components/areas/contexts/AreasContext/helpers/selectLayout.js +27 -0
  164. package/components/areas/contexts/AreasContext/index.d.ts +4 -4
  165. package/components/areas/contexts/AreasContext/index.js +24 -4
  166. package/components/areas/contexts/AreasContext/store.d.ts +4 -4
  167. package/components/areas/contexts/AreasContext/store.js +128 -86
  168. package/components/areas/contexts/AreasContext/types.d.ts +142 -31
  169. package/components/areas/contexts/index.d.ts +0 -6
  170. package/components/areas/hooks/index.d.ts +0 -2
  171. package/components/areas/hooks/useAreas/index.d.ts +5 -5
  172. package/components/areas/hooks/useSetWindowsTitle/useSetWindowsTitle.js +2 -2
  173. package/components/areas/types.d.ts +109 -100
  174. package/components/extended/React-Resizable/Resizable/Resizable.js +2 -1
  175. package/components/extended/React-Resizable/Resizable/slots/ResizableSlots.d.ts +1 -1
  176. package/components/extended/React-Resizable/ResizableBox/slots/ResizableBoxSlots.d.ts +1 -1
  177. package/components/extended/React-Resizable/helpers.d.ts +6 -1
  178. package/components/extended/React-Resizable/helpers.js +11 -2
  179. package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxSlots.d.ts +1 -1
  180. package/components/hook-form/RHFPeriod/slots/RHFPeriodSlots.d.ts +2 -2
  181. package/components/hook-form/RHFSelect/slots/RHFSlots.d.ts +1 -1
  182. package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +1 -1
  183. package/components/hook-form/RHFTextFieldPassword/slots/RHFTextFieldPasswordSlots.d.ts +2 -2
  184. package/components/index.d.ts +1 -0
  185. package/components/mui_extended/Accordion/slots/AccordionSlots.d.ts +2 -2
  186. package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.d.ts +4 -4
  187. package/components/mui_extended/Avatar/slots/AvatarSlots.d.ts +1 -1
  188. package/components/mui_extended/Badge/slots/BadgeSlots.d.ts +1 -1
  189. package/components/mui_extended/Button/slots/ButtonSlots.d.ts +1 -1
  190. package/components/mui_extended/CheckBox/slots/CheckBoxSlots.d.ts +1 -1
  191. package/components/mui_extended/DateTimePicker/slots/DateTimePickerSlots.d.ts +4 -4
  192. package/components/mui_extended/Divider/slots/DividerSlots.d.ts +1 -1
  193. package/components/mui_extended/IconButton/slots/IconButtonSlots.d.ts +2 -2
  194. package/components/mui_extended/LoadingButton/slots/LoadingButtonSlots.d.ts +1 -1
  195. package/components/mui_extended/MenuDivider/slots/MenuDividerSlots.d.ts +1 -1
  196. package/components/mui_extended/MenuItem/slots/MenuItemSlots.d.ts +1 -1
  197. package/components/mui_extended/MenuItem/types.d.ts +1 -1
  198. package/components/mui_extended/Popper/slots/PopperStlots.d.ts +1 -1
  199. package/components/mui_extended/Select/slots/SelectSlots.d.ts +2 -2
  200. package/components/mui_extended/Select/slots/SelectSlots.js +1 -1
  201. package/components/mui_extended/Skeleton/Slots/skeletonSlots.d.ts +1 -1
  202. package/components/mui_extended/Stack/slots/StackSlot.d.ts +1 -1
  203. package/components/mui_extended/Tab/Slots/TabSlots.d.ts +1 -1
  204. package/components/mui_extended/Tabs/slots/TabsSlots.d.ts +1 -1
  205. package/components/mui_extended/TextField/slots/TextFieldSlots.d.ts +1 -1
  206. package/components/mui_extended/TimePicker/slots/TimePickerSlots.d.ts +3 -3
  207. package/components/mui_extended/ToggleButton/slots/ToggleButtonSlots.d.ts +1 -1
  208. package/components/mui_extended/ToggleIconButton/slots/ToggleIconButtonSlots.d.ts +1 -1
  209. package/components/mui_extended/Typography/slots/typographySlots.d.ts +1 -1
  210. package/components/popups/components/PopupsProvider/contexts/PopupsContext/PopupsContext.d.ts +8 -2
  211. package/components/popups/components/PopupsProvider/contexts/PopupsContext/PopupsContext.js +6 -24
  212. package/components/popups/components/PopupsProvider/contexts/PopupsContext/store.d.ts +9 -3
  213. package/components/popups/components/PopupsProvider/contexts/PopupsContext/store.js +278 -211
  214. package/components/popups/components/PopupsProvider/contexts/PopupsContext/tests/PopupContext.test.d.ts +1 -0
  215. package/components/popups/components/PopupsProvider/contexts/PopupsContext/tests/PopusContext.store.test.d.ts +1 -0
  216. package/components/popups/components/PopupsProvider/contexts/PopupsContext/tests/__mocks__/storeMock.d.ts +29 -0
  217. package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +183 -79
  218. package/components/popups/components/PopupsProvider/hooks/{useHeaderActionsPopups/useHeaderActionsPopups.d.ts → useHeaderActionsPopups.d.ts} +2 -8
  219. package/components/popups/components/PopupsProvider/hooks/useHeaderActionsPopups.js +60 -0
  220. package/components/popups/components/PopupsProvider/hooks/usePopups.d.ts +43 -0
  221. package/components/popups/components/PopupsProvider/hooks/usePopups.js +138 -0
  222. package/components/popups/components/PopupsProvider/hooks/usePopupsStore.d.ts +5 -0
  223. package/components/popups/components/PopupsProvider/hooks/{usePopupsStore/index.js → usePopupsStore.js} +1 -1
  224. package/components/popups/components/PopupsViewer/PopupsViewer.d.ts +13 -4
  225. package/components/popups/components/PopupsViewer/PopupsViewer.js +27 -6
  226. package/components/popups/components/PopupsViewer/PopupsViewer.styles.js +3 -11
  227. package/components/popups/components/PopupsViewer/slots/popupsViewerSlots.d.ts +7 -10
  228. package/components/popups/components/PopupsViewer/slots/popupsViewerSlots.js +3 -8
  229. package/components/popups/components/PopupsViewer/slots/slots.d.ts +1 -2
  230. package/components/popups/components/PopupsViewer/slots/slots.js +0 -1
  231. package/components/popups/components/PopupsViewer/subcomponents/Popup/Popup.d.ts +1 -1
  232. package/components/popups/components/PopupsViewer/subcomponents/Popup/Popup.js +69 -53
  233. package/components/popups/components/PopupsViewer/subcomponents/Popup/types.d.ts +16 -0
  234. package/components/popups/components/PopupsViewer/tests/PopupsViewer.integration.test.d.ts +1 -0
  235. package/components/popups/components/PopupsViewer/types.d.ts +13 -5
  236. package/contexts/AppearanceComponentContext/AppearanceComponentContext.d.ts +8 -0
  237. package/contexts/AppearanceComponentContext/AppearanceComponentContext.js +4 -3
  238. package/contexts/AppearanceComponentContext/AppearanceComponentStore.d.ts +8 -1
  239. package/contexts/AppearanceComponentContext/AppearanceComponentStore.js +10 -3
  240. package/contexts/index.d.ts +1 -1
  241. package/hooks/useDataGridPersistence/useDataGridPersistence.js +4 -4
  242. package/hooks/useDynamicFilterAndSort/types.d.ts +1 -1
  243. package/hooks/useSizeContainer/index.js +2 -2
  244. package/index.js +91 -85
  245. package/not_recognized/index.js +1280 -0
  246. package/package.json +2 -1
  247. package/storybook/components/Areas/AreasViewer/{AreasViewr.stories.d.ts → AreasViewer.stories.d.ts} +2 -2
  248. package/storybook/components/Areas/AreasViewer/hooks/useWindowsActions.d.ts +4 -0
  249. package/storybook/components/Areas/AreasViewer/subcomponents/AreasViewerRender.d.ts +4 -0
  250. package/storybook/components/Areas/AreasViewer/subcomponents/Launcher/Launcher.d.ts +5 -0
  251. package/storybook/components/Areas/AreasViewer/subcomponents/Launcher/PopupButton.d.ts +21 -0
  252. package/storybook/components/Areas/AreasViewer/subcomponents/Launcher/PopupContentExample.d.ts +4 -0
  253. package/storybook/components/Areas/AreasViewer/subcomponents/layouts/ClientsLayout.d.ts +4 -0
  254. package/storybook/components/Areas/AreasViewer/subcomponents/layouts/UsersLayout.d.ts +4 -0
  255. package/storybook/components/DragResizeWindowRND/stories/DragResizeWindowRND.stories.d.ts +8 -0
  256. package/storybook/components/DragResizeWindowRND/stories/constants.d.ts +3 -0
  257. package/storybook/components/DragResizeWindowRND/stories/subcomponents/ContentExample.d.ts +4 -0
  258. package/storybook/components/DragResizeWindowRND/stories/subcomponents/RNDWindowsContainer/RNDWindowsContainer.d.ts +5 -0
  259. package/storybook/components/DragResizeWindowRND/stories/subcomponents/RNDWindowsContainer/index.d.ts +1 -0
  260. package/storybook/components/DragResizeWindowRND/stories/subcomponents/RNDWindowsContainer/types.d.ts +4 -0
  261. package/storybook/components/{Areas/AreasViewer → DragResizeWindowRND/stories}/subcomponents/WithExtendedContainer.d.ts +1 -1
  262. package/storybook/components/DragResizeWindowRND/stories/types.d.ts +3 -0
  263. package/storybook/components/PopupsViewer/basic.stories.d.ts +12 -2
  264. package/storybook/components/PopupsViewer/subcomponents/PopupActions.d.ts +3 -1
  265. package/storybook/components/PopupsViewer/subcomponents/PopupContentExample.d.ts +2 -1
  266. package/storybook/components/PopupsViewer/subcomponents/initialPopups.d.ts +1 -1
  267. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions/helper.d.ts +0 -22
  268. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions/useHeaderActions.d.ts +0 -28
  269. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions/useHeaderActions.js +0 -155
  270. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Component/types.d.ts +0 -10
  271. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/MicroFrontend.d.ts +0 -8
  272. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/MicroFrontend.js +0 -10
  273. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/types.d.ts +0 -8
  274. package/components/popups/components/PopupsProvider/hooks/useHeaderActionsPopups/helper.d.ts +0 -28
  275. package/components/popups/components/PopupsProvider/hooks/useHeaderActionsPopups/helper.js +0 -44
  276. package/components/popups/components/PopupsProvider/hooks/useHeaderActionsPopups/useHeaderActionsPopups.js +0 -157
  277. package/components/popups/components/PopupsProvider/hooks/usePopops/usePopups.d.ts +0 -28
  278. package/components/popups/components/PopupsProvider/hooks/usePopops/usePopups.js +0 -117
  279. package/components/popups/components/PopupsProvider/hooks/usePopupsStore/index.d.ts +0 -6
  280. package/storybook/components/Areas/AreasViewer/subcomponents/ClientsHeaderActions.d.ts +0 -4
  281. package/storybook/components/Areas/AreasViewer/subcomponents/UsersHeaderActions.d.ts +0 -4
  282. /package/components/{popups/components/PopupsProvider/tests/PopupsProvider.test.d.ts → DragResizeWindowRND/tests/DragResizeWindow.test.d.ts} +0 -0
  283. /package/components/{areas/contexts/DynamicMFParmsContext/index.d.ts → WindowBase/contexts/DynamicMFParmsContext/DynamicMFParmsContext.d.ts} +0 -0
  284. /package/components/{areas → WindowBase}/contexts/DynamicMFParmsContext/store.js +0 -0
  285. /package/components/{areas → WindowBase}/contexts/DynamicMFParmsContext/types.d.ts +0 -0
  286. /package/components/{areas/contexts/WindowToolsMFContext/index.d.ts → WindowBase/contexts/WindowToolsMFContext/WindowToolsMFContext.d.ts} +0 -0
  287. /package/components/{areas → WindowBase}/hooks/useDynamicMFParameters/index.d.ts +0 -0
  288. /package/components/{areas → WindowBase}/hooks/useWindowToolsMF/index.d.ts +0 -0
@@ -1,11 +1,12 @@
1
- import { ReactNode } from 'react';
1
+ import { ReactNode, ForwardedRef } from 'react';
2
2
  import { DraggableCoreProps, DraggableData, DraggableEventHandler } from 'react-draggable';
3
3
  import { ContainerSize } from '../../utils/types';
4
4
  import { Theme } from '@mui/material/styles';
5
- import { OverridesStyleRules } from '@mui/material/styles/overrides';
6
5
  import { DragResizeWindowSlots } from './slots/slots';
7
6
  import { COMPONENT_KEY_COMPONENT } from './constants';
8
7
  import { ResizeCallbackData, ResizeHandle } from '../extended/React-Resizable';
8
+ import { ResizeDirection } from 're-resizable';
9
+ import { M4LOverridesStyleRules } from '../../@types/augmentations';
9
10
  /**
10
11
  * Tipo que define la corrección de la posición
11
12
  * - nCorrection: Cantidad de corrección
@@ -44,7 +45,11 @@ export interface CurrentState extends Position {
44
45
  resizing?: {
45
46
  width: number;
46
47
  height: number;
47
- handle: ResizeHandle;
48
+ handle: ResizeHandle | ResizeDirection;
49
+ startClientX?: number;
50
+ startClientY?: number;
51
+ startHeight?: number;
52
+ startWidth?: number;
48
53
  };
49
54
  /**
50
55
  * Posición inicial antes de comenzar el dragging o resizing
@@ -66,6 +71,10 @@ export interface CurrentState extends Position {
66
71
  * "overflowHeightAt" Indica en que valor estaba el Height antes de compactar padre en un resize
67
72
  */
68
73
  overflowHeightAt?: number;
74
+ /**
75
+ * "minConstraints" Indica los límites mínimos de la ventana
76
+ */
77
+ minConstraints?: [number, number];
69
78
  }
70
79
  /**
71
80
  * Representa una posición parcial, solo incluye las propiedades left y top.
@@ -117,9 +126,13 @@ export interface DefaultPosition {
117
126
  } | {
118
127
  top: number;
119
128
  height: number;
129
+ } | {
130
+ height: number;
120
131
  } | {
121
132
  bottom: number;
122
133
  height: number;
134
+ } | {
135
+ percent: number;
123
136
  };
124
137
  horizontal: {
125
138
  left: number;
@@ -130,8 +143,16 @@ export interface DefaultPosition {
130
143
  } | {
131
144
  right: number;
132
145
  width: number;
146
+ } | {
147
+ percent: number;
148
+ } | {
149
+ width: number;
133
150
  };
134
151
  }
152
+ export interface DragResizeWindowRefHandler {
153
+ ensureVisible: () => void;
154
+ current: HTMLDivElement | null;
155
+ }
135
156
  /**
136
157
  * Propiedades del componente DragResizeWindow, que incluye tanto los controles de arrastre como de redimensionamiento.
137
158
  */
@@ -233,6 +254,18 @@ export interface DragResizeWindowProps extends Partial<Omit<DraggableCoreProps,
233
254
  * "hidden" permite definir si la ventana está oculta o no. Por defecto es "false"
234
255
  */
235
256
  hidden?: boolean;
257
+ /**
258
+ * "allowResizeContainer" permite definir si se puede redimensionar el contenedor padre
259
+ */
260
+ allowHeightResizeContainer?: boolean;
261
+ /**
262
+ * "allowWidthResizeContainer" permite definir si se puede redimensionar el contenedor padre
263
+ */
264
+ allowWidthResizeContainer?: boolean;
265
+ /**
266
+ * "windowRef" permite definir una referencia a la ventana
267
+ */
268
+ windowRef?: ForwardedRef<HTMLDivElement | undefined>;
236
269
  }
237
270
  /**
238
271
  * Referencia del estado del componente DragResizeWindow.
@@ -243,6 +276,22 @@ export interface StateRef extends Pick<DragResizeWindowProps, 'bounds'>, Current
243
276
  * containerSize: Tamaño del contenedor padre la ultima vez que se actualizó
244
277
  */
245
278
  containerSize?: ContainerSize | undefined;
279
+ /**
280
+ * isAbove: Indica si el cursor esta por encima del contenedor padre and se esta arrastrando hacia arriba
281
+ */
282
+ isAbove?: boolean;
283
+ /**
284
+ * scrollTop: Valor del scroll del contenedor padre
285
+ */
286
+ scrollTop?: number;
287
+ /**
288
+ * scrollLeft: Valor del scroll del contenedor padre
289
+ */
290
+ scrollLeft?: number;
291
+ /**
292
+ * resizeByScroll: Indica si el resize se esta haciendo por scroll o el eventHandler del resize
293
+ */
294
+ resizeByScroll?: boolean;
246
295
  }
247
296
  /**
248
297
  * Tipos para los slots del componente DragResizeWindow.
@@ -264,4 +313,4 @@ export type DragResizeWindowOwnerState = {
264
313
  /**
265
314
  * Tipo de reglas de estilo para el componente DragResizeWindow.
266
315
  */
267
- export type DragResizeWindowStyles = Partial<OverridesStyleRules<DragResizeWindowSlotsType, typeof COMPONENT_KEY_COMPONENT, Theme> | undefined> | undefined;
316
+ export type DragResizeWindowStyles = M4LOverridesStyleRules<DragResizeWindowSlotsType, typeof COMPONENT_KEY_COMPONENT, Theme>;
@@ -1,4 +1,4 @@
1
- import { Position } from './types';
1
+ import { CurrentState } from './types';
2
2
  /**
3
3
  * Generates a style object with transform properties to position an element.
4
4
  *
@@ -9,4 +9,7 @@ import { Position } from './types';
9
9
  * @param {Position} position - An object containing `top`, `left`, `width`, and `height` properties.
10
10
  * @returns {Record<string, any>} A style object with applied transform, dimension, and positioning properties.
11
11
  */
12
- export declare function setTransform({ top, left, width, height }: Position): Record<string, any>;
12
+ /**
13
+ * setTransform
14
+ */
15
+ export declare function setTransform({ top, left, width, height, dragging }: CurrentState): Record<string, any>;
@@ -1,16 +1,35 @@
1
- function setTransform({ top, left, width, height }) {
2
- const translate = `translate(${left}px,${top}px)`;
3
- return {
4
- transform: translate,
5
- WebkitTransform: translate,
6
- MozTransform: translate,
7
- msTransform: translate,
8
- OTransform: translate,
9
- width: `${width}px`,
10
- height: `${height}px`,
11
- position: "absolute",
12
- prop1: 1
13
- };
1
+ function setTransform({ top, left, width, height, dragging }) {
2
+ const roundedTop = Math.round(top);
3
+ const roundedLeft = Math.round(left);
4
+ const roundedWidth = Math.round(width);
5
+ const roundedHeight = Math.round(height);
6
+ if (dragging) {
7
+ return {
8
+ position: "absolute",
9
+ top: `${roundedTop}px`,
10
+ left: `${roundedLeft}px`,
11
+ width: `${roundedWidth}px`,
12
+ height: `${roundedHeight}px`,
13
+ pointerEvents: "none",
14
+ // Sin transiciones, sin transformaciones, sin filtros
15
+ transition: "none",
16
+ transform: "none",
17
+ filter: "none"
18
+ // Opcionalmente, usa una versión simplificada durante el arrastre
19
+ };
20
+ } else {
21
+ return {
22
+ position: "absolute",
23
+ top: `${roundedTop}px`,
24
+ left: `${roundedLeft}px`,
25
+ width: `${roundedWidth}px`,
26
+ height: `${roundedHeight}px`,
27
+ // Sin efectos especiales
28
+ transform: "none",
29
+ filter: "none",
30
+ transition: "none"
31
+ };
32
+ }
14
33
  }
15
34
  export {
16
35
  setTransform as s
@@ -0,0 +1,19 @@
1
+ import { DragResizeWindowPropsRND, DragResizeWindowRefHandler } from './types';
2
+ /**
3
+ * Este component es un wrapper o ventana draggable y resizable al children.
4
+ * Características
5
+ * - Permite definir bounds para que la ventana no se salga del contenedor padre.
6
+ * - Es obligarlo pasarle como props el containerElement (HTMLElement) del padre.
7
+ * - Reajusta el Resizable para que los handlers n, w, crezcan en la dirección correcta.
8
+ * Funcionamiento interno:
9
+ * - DraggableCore clona el children y le agrega un handle para poder arrastrar la ventana
10
+ * - DraggableCore recomienda pasarle el nodeRef del wrapper Element , para que no tenga que hacer FindDOMNode.
11
+ * - DraggableCore No se le puede poner estilo, ya que no aporta className ni html, solo clona el children
12
+ * internamente le agrega las clases propias del componente: react-draggable,react-draggable-dragging,react-draggable-dragged
13
+ * Por lo tanto todo el estilo, va directamente a WrapperWindowRoot.
14
+ * Consideraciones:
15
+ * @param props
16
+ * @returns
17
+ */
18
+ export declare const DragResizeWindowRND: import('react').ForwardRefExoticComponent<Omit<DragResizeWindowPropsRND, "ref"> & import('react').RefAttributes<DragResizeWindowRefHandler>>;
19
+ export default DragResizeWindowRND;
@@ -0,0 +1,224 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef, useState, useMemo, useRef, useImperativeHandle } from "react";
3
+ import clsx from "clsx";
4
+ import { d as dragResizeWindowRNDClasses } from "./classes/index.js";
5
+ import { D as DEFAULT_TRANSFORM_SCALE } from "./constants.js";
6
+ import { u as useDragOptions } from "./hooks/useRNDDragOptions.js";
7
+ import { u as useResizeOptions } from "./hooks/useRNDReResizeOptions.js";
8
+ import { u as useRNDDimensionEffects } from "./hooks/useRNDDimensionEffects.js";
9
+ import { R as RndStyled } from "./slots/DragResizeWindowRNDSlots.js";
10
+ import { g as getInitialSize } from "./helpers/getInitialSize.js";
11
+ const DragResizeWindowRND = forwardRef((props, ref) => {
12
+ const {
13
+ //Comunes
14
+ style,
15
+ className,
16
+ children,
17
+ defaultPosition = { vertical: { top: 0, height: 100 }, horizontal: { left: 0, width: 100 } },
18
+ containerElement,
19
+ containerSize,
20
+ transformScale = DEFAULT_TRANSFORM_SCALE,
21
+ bounds = { left: 5, top: 5, right: -5, bottom: -5 },
22
+ minWidth = 200,
23
+ minHeight = 100,
24
+ // maxWidth = 1000,
25
+ // maxHeight = 1000,
26
+ //Draggable
27
+ draggableHandle = `${dragResizeWindowRNDClasses.draggableHandle}`,
28
+ draggableCancel = `.${dragResizeWindowRNDClasses.draggableCancel}`,
29
+ draggable = true,
30
+ onDragStart,
31
+ onDrag,
32
+ onDragStop,
33
+ onMouseDown,
34
+ //resizable
35
+ resizable = true,
36
+ onResizeStart,
37
+ onResize,
38
+ onResizeStop,
39
+ hidden,
40
+ allowHeightResizeContainer = false,
41
+ allowWidthResizeContainer = false,
42
+ windowRef,
43
+ //Otras
44
+ ...others
45
+ } = props;
46
+ const [currentState, setCurrentState] = useState(
47
+ () => getInitialSize(containerSize, defaultPosition, containerElement)
48
+ );
49
+ const minConstraints = useMemo(() => [minWidth, minHeight], [minWidth, minHeight]);
50
+ const stateRef = useRef({
51
+ bounds,
52
+ data: void 0,
53
+ dragging: void 0,
54
+ containerSize: containerSize ? { ...containerSize } : void 0,
55
+ x: currentState.x,
56
+ y: currentState.y,
57
+ width: currentState.width,
58
+ height: currentState.height,
59
+ minConstraints
60
+ });
61
+ if (containerSize && (stateRef.current.containerSize?.containerWidth !== containerSize.containerWidth || stateRef.current.containerSize?.containerHeight !== containerSize.containerHeight)) {
62
+ stateRef.current.containerSize = { ...containerSize };
63
+ }
64
+ const wrapperRef = useRef(null);
65
+ useImperativeHandle(ref, () => ({
66
+ /**
67
+ * "ensureVisible" enfoca la ventana para que esté visible, cuando se requiere desde afuera ubicarla en el contenedor padre
68
+ */
69
+ ensureVisible: () => {
70
+ if (!wrapperRef.current || !containerElement) {
71
+ return;
72
+ }
73
+ const containerRect = containerElement.getBoundingClientRect();
74
+ const elementRect = wrapperRef.current.getBoundingClientRect();
75
+ const elementHeight = elementRect.height;
76
+ const elementWidth = elementRect.width;
77
+ const relativeTop = elementRect.top - containerRect.top + containerElement.scrollTop;
78
+ const relativeLeft = elementRect.left - containerRect.left + containerElement.scrollLeft;
79
+ const relativeBottom = relativeTop + elementHeight;
80
+ const relativeRight = relativeLeft + elementWidth;
81
+ const containerViewportHeight = containerElement.clientHeight;
82
+ const containerViewportWidth = containerElement.clientWidth;
83
+ const containerRelativeBottom = containerElement.scrollTop + containerViewportHeight;
84
+ const tolerance = 0.5;
85
+ const isInViewportVertically = relativeTop >= containerElement.scrollTop - tolerance && relativeBottom <= containerRelativeBottom + tolerance;
86
+ const isInViewportHorizontally = relativeLeft >= containerElement.scrollLeft - tolerance && relativeRight <= containerElement.scrollLeft + containerViewportWidth + tolerance;
87
+ if (!isInViewportVertically || !isInViewportHorizontally) {
88
+ let newScrollTop, newScrollLeft;
89
+ if (elementHeight > containerViewportHeight) {
90
+ newScrollTop = relativeTop;
91
+ } else {
92
+ newScrollTop = relativeTop - containerViewportHeight / 2 + elementHeight / 2;
93
+ }
94
+ if (elementWidth > containerViewportWidth) {
95
+ newScrollLeft = relativeLeft;
96
+ } else {
97
+ newScrollLeft = relativeLeft - containerViewportWidth / 2 + elementWidth / 2;
98
+ }
99
+ containerElement.scrollTo({
100
+ top: Math.max(0, newScrollTop),
101
+ left: Math.max(0, newScrollLeft),
102
+ behavior: "smooth"
103
+ });
104
+ }
105
+ },
106
+ /**
107
+ * "current" devuelve el elemento DOM de la ventana
108
+ */
109
+ current: wrapperRef.current
110
+ }), [containerElement]);
111
+ const { localOnDragStart, localOnDrag, localOnDragStop } = useDragOptions({
112
+ allowHeightResizeContainer,
113
+ allowWidthResizeContainer,
114
+ containerElement,
115
+ transformScale,
116
+ onDragStart,
117
+ onDrag,
118
+ onDragStop,
119
+ stateRef,
120
+ setCurrentState
121
+ });
122
+ const { localOnResize, localOnResizeStart, localOnResizeStop } = useResizeOptions({
123
+ allowHeightResizeContainer,
124
+ allowWidthResizeContainer,
125
+ containerElement,
126
+ onResizeStart,
127
+ onResize,
128
+ onResizeStop,
129
+ stateRef,
130
+ setCurrentState
131
+ });
132
+ useRNDDimensionEffects({
133
+ containerElement,
134
+ bounds,
135
+ containerSize,
136
+ setCurrentState,
137
+ stateRef,
138
+ minWindowWidth: minWidth,
139
+ minWindowHeight: minHeight,
140
+ wrapperRef,
141
+ currentState,
142
+ allowHeightResizeContainer,
143
+ allowWidthResizeContainer
144
+ });
145
+ const ownerState = {
146
+ hidden,
147
+ dragging: !!currentState.dragging,
148
+ resizing: !!currentState.resizing,
149
+ draggingActive: !!currentState.dragging,
150
+ x: currentState.x,
151
+ y: currentState.y,
152
+ width: currentState.width,
153
+ height: currentState.height
154
+ };
155
+ const classNameFinal = clsx(className, {
156
+ //Requerido para el componente Draggable
157
+ [dragResizeWindowRNDClasses.hidden]: hidden,
158
+ [dragResizeWindowRNDClasses.dragging]: !!currentState.dragging,
159
+ [dragResizeWindowRNDClasses.resizing]: !!currentState.resizing,
160
+ [dragResizeWindowRNDClasses.draggingActive]: !!currentState.dragging
161
+ // dropping: Boolean(droppingPosition),
162
+ });
163
+ const memoChildren = useMemo(() => {
164
+ return children;
165
+ }, [children]);
166
+ if (!containerElement) {
167
+ return null;
168
+ }
169
+ return /* @__PURE__ */ jsx(
170
+ RndStyled,
171
+ {
172
+ ownerState,
173
+ ...others,
174
+ onMouseDown,
175
+ ref: (c) => {
176
+ if (c) {
177
+ wrapperRef.current = c.resizableElement.current;
178
+ }
179
+ },
180
+ style: { ...{}, ...style },
181
+ dragHandleClassName: draggableHandle,
182
+ enableResizing: resizable,
183
+ disableDragging: !draggable,
184
+ minWidth,
185
+ minHeight,
186
+ cancel: draggableCancel,
187
+ className: classNameFinal,
188
+ enableUserSelectHack: true,
189
+ resizeHandleStyles: {
190
+ //Se debe mover lo handler de resize para queden dentro de la ventana, o genería un scroll innecesario.
191
+ bottom: { bottom: "0px" },
192
+ right: { right: "0px" },
193
+ top: { top: "0px" },
194
+ left: { left: "0px" },
195
+ bottomRight: { bottom: "0px", right: "0px", height: "10px", width: "10px" },
196
+ bottomLeft: { bottom: "0px", left: "0px", height: "10px", width: "10px" },
197
+ topRight: { top: "0px", right: "0px", height: "10px", width: "10px" },
198
+ topLeft: { top: "0px", left: "0px", height: "10px", width: "10px" }
199
+ },
200
+ resizeHandleClasses: {
201
+ left: "resize-handle-left",
202
+ right: "resize-handle-right",
203
+ top: "resize-handle-top",
204
+ bottom: "resize-handle-bottom",
205
+ bottomRight: "resize-handle-bottom-right",
206
+ bottomLeft: "resize-handle-bottom-left",
207
+ topRight: "resize-handle-top-right",
208
+ topLeft: "resize-handle-top-left"
209
+ },
210
+ size: { width: currentState.width, height: currentState.height },
211
+ position: { x: currentState.x, y: currentState.y },
212
+ onDragStart: localOnDragStart,
213
+ onDrag: localOnDrag,
214
+ onDragStop: localOnDragStop,
215
+ onResizeStart: localOnResizeStart,
216
+ onResize: localOnResize,
217
+ onResizeStop: localOnResizeStop,
218
+ children: memoChildren
219
+ }
220
+ );
221
+ });
222
+ export {
223
+ DragResizeWindowRND as D
224
+ };
@@ -0,0 +1,5 @@
1
+ import { DragResizeWindowRNDStyles } from '../DragResizeWindowRND/types';
2
+ /**
3
+ * Style definitions for the DragResizeWindow component.
4
+ */
5
+ export declare const dragResizeWindowStyles: DragResizeWindowRNDStyles;
@@ -0,0 +1,75 @@
1
+ const CONTAINER_QUERY_NAME = "window_root";
2
+ const dragResizeWindowStyles = {
3
+ /**
4
+ * Styles for the root container of the DragResizeWindow component.
5
+ * @param {Object} params - Object containing theme and ownerState properties.
6
+ * @param {Object} params.theme - Theme object for accessing theme variables.
7
+ * @param {Object} params.ownerState - Object holding the component's current state.
8
+ * @param {boolean} [params.ownerState.hidden] - Controls visibility; if true, sets the component to be hidden and disables pointer events.
9
+ * @returns {Object} - Style object for the root container.
10
+ */
11
+ root: ({ theme, ownerState }) => ({
12
+ containerName: CONTAINER_QUERY_NAME,
13
+ containerType: "inline-size",
14
+ position: "absolute",
15
+ left: "0px",
16
+ top: "0px",
17
+ width: "0px",
18
+ height: "0px",
19
+ backgroundColor: theme.vars.palette.background.default,
20
+ ...ownerState?.hidden ? {
21
+ visibility: "hidden",
22
+ pointerEvents: "none"
23
+ } : {}
24
+ }),
25
+ /**
26
+ * Styles for the icon formatter container in the DragResizeWindow component.
27
+ *
28
+ * This container serves as the base for resize icons, setting up initial styles
29
+ * like position, size, and default background color. Adjustments for cursor style
30
+ * and additional customization are also defined here.
31
+ * @returns {Object} - Style object for the icon formatter container.
32
+ */
33
+ iconResizeFormatterRoot: () => ({
34
+ containerName: CONTAINER_QUERY_NAME,
35
+ containerType: "inline-size",
36
+ position: "absolute",
37
+ left: "0px",
38
+ top: "0px",
39
+ width: "0px",
40
+ height: "0px",
41
+ backgroundColor: "gray",
42
+ cursor: "default"
43
+ }),
44
+ /**
45
+ * Styles for the rnd component in the DragResizeWindowRND component.
46
+ */
47
+ rnd: ({ ownerState }) => ({
48
+ transition: "none",
49
+ // Elimina transiciones para una mayor nitidez
50
+ backfaceVisibility: "hidden",
51
+ // Mejora la nitidez
52
+ WebkitFontSmoothing: "subpixel-antialiased",
53
+ // Mejora el texto
54
+ // ...(ownerState?.dragging && {
55
+ // left: '0px',
56
+ // top: '0px',
57
+ // }),
58
+ // ...(!(ownerState?.dragging) && {
59
+ // left: `${ownerState?.x}px !important`,
60
+ // top: `${ownerState?.y}px !important`,
61
+ // transform: 'unset !important',
62
+ // }),
63
+ ...ownerState?.dragging || ownerState?.resizing && {
64
+ "&.react-draggable": {
65
+ pointerEvents: "auto !important",
66
+ userSelect: "none !important",
67
+ touchAction: "none !important",
68
+ prop1: "value1"
69
+ }
70
+ }
71
+ })
72
+ };
73
+ export {
74
+ dragResizeWindowStyles as d
75
+ };
@@ -0,0 +1,2 @@
1
+ import { DraggableWindowRNDClasses } from './types';
2
+ export declare const dragResizeWindowRNDClasses: DraggableWindowRNDClasses;
@@ -0,0 +1,18 @@
1
+ import { generateUtilityClasses } from "@mui/material";
2
+ import { C as COMPONENT_KEY_COMPONENT } from "../constants.js";
3
+ const dragResizeWindowRNDClasses = generateUtilityClasses(
4
+ COMPONENT_KEY_COMPONENT,
5
+ [
6
+ /* elements */
7
+ "draggableHandle",
8
+ "draggableCancel",
9
+ // state
10
+ "dragging",
11
+ "resizing",
12
+ "hidden",
13
+ "draggingActive"
14
+ ]
15
+ );
16
+ export {
17
+ dragResizeWindowRNDClasses as d
18
+ };
@@ -0,0 +1,9 @@
1
+ export interface DraggableWindowRNDClasses {
2
+ draggableHandle: string;
3
+ draggableCancel: string;
4
+ dragging: string;
5
+ resizing: string;
6
+ hidden: string;
7
+ draggingActive: string;
8
+ }
9
+ export type DraggableWindowRNDClassesKey = keyof DraggableWindowRNDClasses;
@@ -0,0 +1,3 @@
1
+ export declare const COMPONENT_TEST_ID = "M4LDragResizeWindowRND";
2
+ export declare const COMPONENT_KEY_COMPONENT = "M4LDragResizeWindowRND";
3
+ export declare const DEFAULT_TRANSFORM_SCALE = 1;
@@ -0,0 +1,6 @@
1
+ const COMPONENT_KEY_COMPONENT = "M4LDragResizeWindowRND";
2
+ const DEFAULT_TRANSFORM_SCALE = 1;
3
+ export {
4
+ COMPONENT_KEY_COMPONENT as C,
5
+ DEFAULT_TRANSFORM_SCALE as D
6
+ };
@@ -0,0 +1,12 @@
1
+ import { CurrentState, DraggableWindowBounds } from '../types';
2
+ /**
3
+ * "expandingParentContainer": Encargada de manejar la expansión de la ventana padre
4
+ * 1. Si el ancho y alto fue compactado, los recupera si es el contenedor padre volvió a crecer
5
+ * 2. Si el left o top fue desplazado, recupera de nuevo las posiciones donde estaban.
6
+ *
7
+ * Consideraciones:
8
+ * Si por alguna razón el cliente mueve o redimensiona la ventana,
9
+ * se borran los flags que indican que hay que recuperar el ancho y alto, o el left y top.
10
+ * (shrinkLeftTopAt, overflowDimensionAt)
11
+ */
12
+ export declare const expandingParentContainer: (newState: CurrentState, containerDimension: number, dimension: "Width" | "Height", bounds?: DraggableWindowBounds) => void;
@@ -0,0 +1,31 @@
1
+ const expandingParentContainer = (newState, containerDimension, dimension, bounds) => {
2
+ const lDimension = dimension === "Width" ? "width" : "height";
3
+ const leftTop = dimension === "Width" ? "x" : "y";
4
+ const shrinkLeftTopAt = dimension === "Width" ? "shrinkLeftAt" : "shrinkTopAt";
5
+ const overflowDimensionAt = dimension === "Width" ? "overflowWidthAt" : "overflowHeightAt";
6
+ const boundsLefTop = dimension === "Width" ? 0 : 0;
7
+ const initialPosition = dimension === "Width" ? 0 : 0;
8
+ const maxDimensionElement = containerDimension - boundsLefTop + initialPosition;
9
+ const valOverflowDimensionAt = newState[overflowDimensionAt];
10
+ if (valOverflowDimensionAt) {
11
+ if (valOverflowDimensionAt > maxDimensionElement) {
12
+ newState[lDimension] = maxDimensionElement;
13
+ } else {
14
+ newState[lDimension] = valOverflowDimensionAt;
15
+ newState[overflowDimensionAt] = void 0;
16
+ }
17
+ }
18
+ const valShrinkLeftTopAt = newState[shrinkLeftTopAt];
19
+ if (valShrinkLeftTopAt && !newState[overflowDimensionAt]) {
20
+ const dimensionAvailable = containerDimension - boundsLefTop - newState[lDimension] + initialPosition;
21
+ if (valShrinkLeftTopAt <= dimensionAvailable) {
22
+ newState[leftTop] = valShrinkLeftTopAt;
23
+ newState[shrinkLeftTopAt] = void 0;
24
+ } else {
25
+ newState[leftTop] = dimensionAvailable;
26
+ }
27
+ }
28
+ };
29
+ export {
30
+ expandingParentContainer as e
31
+ };
@@ -0,0 +1,15 @@
1
+ import { ContainerSize } from '../../../utils/types';
2
+ import { CurrentState, DefaultPosition } from '../types';
3
+ /**
4
+ * Calculates the initial size and position of an element based on the provided container size
5
+ * and default position values.
6
+ *
7
+ * This function returns an object with `top`, `left`, `width`, and `height` properties,
8
+ * which specify the initial position and size of the element. If values for `right` or `bottom`
9
+ * are provided instead of `top` and `left`, the function calculates the starting position based
10
+ * on the container dimensions, ensuring that the element is correctly positioned.
11
+ * @param {ContainerSize | undefined} containerSize - Object containing `containerHeight` and `containerWidth`. Defaults to 200 for both if not provided.
12
+ * @param {DefaultPosition} defaultPosition - Object defining the default vertical and horizontal positions (`top`, `bottom`, `height`, `left`, `right`, `width`).
13
+ * @returns {CurrentState} - The initial size and position of the element with `top`, `left`, `width`, and `height` properties.
14
+ */
15
+ export declare const getInitialSize: (containerSize: ContainerSize | undefined, defaultPosition: DefaultPosition, containerElement: HTMLElement | undefined) => CurrentState;
@@ -0,0 +1,56 @@
1
+ const getInitialSize = (containerSize, defaultPosition, containerElement) => {
2
+ let top;
3
+ let bottom;
4
+ let height;
5
+ let left;
6
+ let right;
7
+ let width;
8
+ const containerHeight = containerSize?.containerHeight || 200;
9
+ const containerWidth = containerSize?.containerWidth || 200;
10
+ const scrollTop = containerElement?.scrollTop || 0;
11
+ const scrollLeft = containerElement?.scrollLeft || 0;
12
+ if ("top" in defaultPosition.vertical) {
13
+ top = defaultPosition.vertical.top;
14
+ }
15
+ if ("bottom" in defaultPosition.vertical) {
16
+ bottom = defaultPosition.vertical.bottom;
17
+ }
18
+ if ("height" in defaultPosition.vertical) {
19
+ height = defaultPosition.vertical.height;
20
+ }
21
+ if ("left" in defaultPosition.horizontal) {
22
+ left = defaultPosition.horizontal.left;
23
+ }
24
+ if ("right" in defaultPosition.horizontal) {
25
+ right = defaultPosition.horizontal.right;
26
+ }
27
+ if ("width" in defaultPosition.horizontal) {
28
+ width = defaultPosition.horizontal.width;
29
+ if (!("left" in defaultPosition.horizontal)) {
30
+ left = scrollLeft + (containerWidth - width) / 2;
31
+ }
32
+ }
33
+ if ("height" in defaultPosition.vertical) {
34
+ height = defaultPosition.vertical.height;
35
+ if (!("top" in defaultPosition.vertical)) {
36
+ top = scrollTop + (containerHeight - height) / 2;
37
+ }
38
+ }
39
+ if ("percent" in defaultPosition.vertical) {
40
+ height = containerHeight * defaultPosition.vertical.percent;
41
+ top = (containerHeight - height) / 2;
42
+ }
43
+ if ("percent" in defaultPosition.horizontal) {
44
+ width = containerWidth * defaultPosition.horizontal.percent;
45
+ left = (containerWidth - width) / 2;
46
+ }
47
+ return {
48
+ y: Math.round(top ?? (bottom ? containerHeight - bottom - (height || 0) : 0)),
49
+ height: Math.round(height ?? containerHeight - (top || 0) - (bottom || 0)),
50
+ x: Math.round(left ?? (right ? containerWidth - right - (width || 0) : 0)),
51
+ width: Math.round(width ?? containerWidth - (left || 0) - (right || 0))
52
+ };
53
+ };
54
+ export {
55
+ getInitialSize as g
56
+ };