@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,10 +1,12 @@
1
1
  import { GetLabelType, NetworkProps } from '@m4l/core';
2
2
  import { ReactNode } from 'react';
3
- import { CookieType, HashWindowsByModals, ModalStateProps, AreaWindowAction, NewModalProps, NewLayoutMoveableProps, NewWindowProps, WinType, WindowStateProps, NewLayoutMagnetizableProps } from '../../types';
3
+ import { CookieType, EmmitNewModalProps, EmmitNewPopupProps, EmmitNewWindowProps, AreaWindowProps, EmmitNewLayoutProps } from '../../types';
4
4
  import { DebouncedFunc } from 'lodash';
5
5
  import { LayoutItem } from '../../../GridLayout';
6
6
  import { ContainerChangeEvent } from '../../../GridLayout/subcomponents/Responsive/types';
7
7
  import { Layout, Breakpoint, Layouts } from '../../../GridLayout/types';
8
+ import { PopupsProviderStoreStateWithActions } from '../../../popups/components/PopupsProvider/contexts/PopupsContext/types';
9
+ import { ModuleAction, WinType } from '../../../WindowBase/types';
8
10
  export type WinLayoutItem = LayoutItem & {
9
11
  winType: WinType;
10
12
  };
@@ -17,22 +19,61 @@ export type Cols = {
17
19
  export type ViewAreaMode = 'multiple' | 'single';
18
20
  export type AreaStatus = 'init' | 'loading' | 'load' | 'loaded' | 'error';
19
21
  export interface Area {
22
+ /**
23
+ * "id" Id del area de trabajo
24
+ */
20
25
  id: string;
26
+ /**
27
+ * "name" Nombre del area de trabajo
28
+ */
21
29
  name: string;
30
+ /**
31
+ * "status" Estado del area de trabajo
32
+ */
22
33
  status: AreaStatus;
34
+ /**
35
+ * "zPopUpIndex" Indice de la ventana emergente
36
+ * @deprecated El indice ya es manejado por el PopupsProvider
37
+ */
23
38
  zPopUpIndex: number;
39
+ /**
40
+ * Indica si se deben cargar las ventanas de la area de trabajo, por defecto cuando se agrega una area,
41
+ * no se cargan las ventanas, ya que no hay, pero cuando se abre un area, se cargan las ventanas.
42
+ */
24
43
  loadWindows: boolean;
25
44
  /**
26
- * "containerHeight" Altura del contendor de area, se deja en cada área porque solo llegan en eventos de resize cuando está diferente a display "none"
45
+ * "containerHeight" Altura del contendor de area, se deja en cada área porque solo llegan en eventos de resize cuando está diferente a display "none"
46
+ * Este valor se actualiza en el evento "onContainerChange" que emite el componente ResponsiveGridLayout
47
+ * Es necesario para poder calcular el tamaño de las ventanas nuevas que se agregan al area.
27
48
  */
28
49
  containerHeight?: number;
50
+ /**
51
+ * "currentBreakpoint" Breakpoint actual del area de trabajo
52
+ */
29
53
  currentBreakpoint?: Breakpoint;
54
+ /**
55
+ * "layouts" Layouts del area de trabajo
56
+ */
30
57
  layouts: Layouts;
58
+ /**
59
+ * "maximizedId" Id de la ventana que está maximizada, si es undefined, no hay ninguna ventana maximizada
60
+ */
31
61
  maximizedId?: string | undefined;
62
+ /**
63
+ * Son los ids de las ventanas, en el orden en que se agregaron
64
+ */
32
65
  layoutItemsIds: string[];
66
+ /**
67
+ * "currentLayoutId" Id de la ventana actual seleccionada
68
+ */
33
69
  currentLayoutId: string;
34
- currentPopUpId: string;
70
+ /**
71
+ * "breakpoints" Breakpoints del area de trabajo, se usa para el responsive son los pixeles que representan cada breakpoint
72
+ */
35
73
  breakpoints: Breakpoints;
74
+ /**
75
+ * "cols" numero de columnas por cada breakpoint
76
+ */
36
77
  cols: Cols;
37
78
  }
38
79
  /**
@@ -48,10 +89,6 @@ export type OwnerState = {
48
89
  * "readyForHooks" indica si el componente ejecutó el efecto de carga y se suscrubió al eventemitter. Utilizado normalmente en storybook
49
90
  */
50
91
  readyForHooks: boolean;
51
- /**
52
- * focus: Estado de selección asignado por el usuario.
53
- */
54
- focus: boolean;
55
92
  };
56
93
  /**
57
94
  * Estados que se actulizan por fuera del store, a través de hooks
@@ -60,7 +97,11 @@ export type ExternalOwnerState = Pick<OwnerState, 'readyForHooks'>;
60
97
  /**
61
98
  * Interface que define el estado del componente (variables y funciones )
62
99
  */
63
- export interface AreasState {
100
+ export interface AreasStoreState {
101
+ /**
102
+ * "storeId" Id del store
103
+ */
104
+ storeId?: string;
64
105
  /**
65
106
  * "loadAreasFromNetwork" Indica si se deben cargar/grabar las áreas de trabajo en la API
66
107
  */
@@ -82,11 +123,9 @@ export interface AreasState {
82
123
  */
83
124
  ownerState: OwnerState;
84
125
  /**
85
- * "windowsModals" id de ventans modales abiertas
126
+ * "windowsModalsIds" id de ventans modales abiertas, en el orden en que se agregaron
86
127
  */
87
- windowsModals: string[];
88
- hashWindowsModals: HashWindowsByModals;
89
- windowModal?: ModalStateProps;
128
+ windowsModalsIds: string[];
90
129
  /**
91
130
  * "areasIds" Areas de trabajo para saber en que orden se muestran en el AreasAdmin
92
131
  */
@@ -96,19 +135,30 @@ export interface AreasState {
96
135
  */
97
136
  hashAreas: Record<string, Area>;
98
137
  /**
99
- * "hashWindows" Todas las ventanas de todas las áreas cagadas
138
+ * "hashWindows" Todas las ventanas de todas las áreas cagadas, incluyendo layouts, popups y modals
100
139
  */
101
- hashWindows: Record<string, WindowStateProps>;
140
+ hashWindows: Record<string, AreaWindowProps>;
102
141
  /**
103
142
  * "networkOperation" funcion que usará el Store para enviar las peticiones de red
104
143
  */
105
144
  networkOperation: (props: NetworkProps) => Promise<any>;
106
145
  /**
107
- * "getLabel" funcion que usará para traducir las etiquetas de diccionario
146
+ * "getLabel" funcion que usará para traducir las etiquetas de diccionario, cuando se agrega una nueva area, se requier tener acceso al diccionario
108
147
  */
109
148
  getLabel: GetLabelType;
149
+ /**
150
+ * Como desde zustand no se puede acceder a meotodos de un contexto de react, se deben proporcionar en el momento de creación.
151
+ */
152
+ popupsProviderMethods: {
153
+ addPopup: PopupsProviderStoreStateWithActions['popupsActions']['addPopup'];
154
+ removePopup: PopupsProviderStoreStateWithActions['popupsActions']['removePopup'];
155
+ removePopupsByGroupId: PopupsProviderStoreStateWithActions['popupsActions']['closePopupsByGroupId'];
156
+ bringPopupOnFront: PopupsProviderStoreStateWithActions['popupsActions']['bringPopupOnFront'];
157
+ closeAllPopupsByParentId: PopupsProviderStoreStateWithActions['popupsActions']['closeAllPopupsByParentId'];
158
+ setSelectedPopupId: PopupsProviderStoreStateWithActions['popupsActions']['setSelectedPopupId'];
159
+ };
110
160
  }
111
- export interface AreasStateWithActions extends AreasState {
161
+ export interface AreasStoreStateWithActions extends AreasStoreState {
112
162
  areasActions: {
113
163
  /**
114
164
  * inicializa el store cargando las áreas de trabajo.
@@ -158,24 +208,80 @@ export interface AreasStateWithActions extends AreasState {
158
208
  setExternalState: (newExternalState: Partial<ExternalOwnerState>) => void;
159
209
  };
160
210
  areaActions: {
161
- addWindow: (newWindow: NewWindowProps) => void;
162
- closeWindowModal: (removeModalId: string) => void;
163
- addWindowModal: (areaId: string, windowId: string, newWindowModalProps: NewModalProps) => void;
211
+ /**
212
+ * Agrega una ventana aca se deriva de acuerdo al emergeType si va para popup, modal o layout
213
+ */
214
+ addWindow: (newWindow: EmmitNewWindowProps) => void;
215
+ /**
216
+ * Agrega un layout al AreaGridLayout
217
+ */
218
+ addLayout: (areaId: string, windowId: string, newWindow: EmmitNewLayoutProps) => void;
219
+ /**
220
+ * Cierra un layout y lo retira del AreaGridLayout
221
+ */
164
222
  closeLayout: (areaId: string, removePopUpId: string) => void;
165
- selectLayout: (areaId: string, layoutId: string) => void;
166
- addLayout: (areaId: string, windowId: string, newWindow: NewLayoutMagnetizableProps | NewLayoutMoveableProps) => void;
223
+ /**
224
+ * Selecciona un layout, para marcarlo como el layout actual
225
+ */
226
+ selectLayout: (areaId: string, layoutId: string, saveCookie?: boolean) => void;
227
+ /**
228
+ * Colapsa un layout, para que se vea solo la barra de titulo
229
+ */
230
+ colapseLayoutItem: (areaId: string, layoutId: string) => void;
231
+ /**
232
+ * Descolapsa un layout, para que se vea el layout completo
233
+ */
234
+ unColapseLayoutItem: (areaId: string, layoutId: string) => void;
235
+ /**
236
+ * Normaliza los layouts, remueve el maximizado
237
+ * TODO: Revisar como debe interactuar con popups
238
+ */
239
+ normalizeLayouts: (areaId: string) => void;
240
+ /**
241
+ * Maximiza un layout, establece el maximizedId del area
242
+ */
243
+ maximizeLayout: (areaId: string, layoutId?: string) => void;
244
+ /**
245
+ * Guarda los layouts en la API
246
+ */
167
247
  saveLayouts: (areaId: string) => void;
248
+ /**
249
+ * Actualiza los layouts en el AreaGridLayout cuando se redimensiona la ventana del navegador
250
+ * siempre y cuando no este maximizada una ventana
251
+ */
168
252
  onBreakpointsLayoutsChange: (areaId: string, currentLayout: Layout, newAllLayouts: Layouts) => void;
253
+ /**
254
+ * Agrega un popup al PopupsProvider
255
+ */
256
+ addPopup: (areaId: string, windowId: string, newWindowProps: EmmitNewPopupProps) => void;
257
+ /**
258
+ * Se remueve de hashWindows y se envia a PopupsProvider que cierr el popup
259
+ * TODO: Reivisar si funciona bien
260
+ */
261
+ closePopup: (areaId: string, removePopupId: string) => void;
262
+ /**
263
+ * Agrega un modal a hashWindows y windowsModalsIds
264
+ */
265
+ addWindowModal: (areaId: string, windowId: string, newWindowModalProps: EmmitNewModalProps) => void;
266
+ /**
267
+ * Se remueve de hashWindows, y lo remueve de windowsModalsIds
268
+ */
269
+ closeWindowModal: (removeModalId: string) => void;
270
+ /**
271
+ * Actualiza el estado de la ventana cuando cambia el tamaño de la ventana del navegador
272
+ */
169
273
  onContainerChange: (areaId: string, e: ContainerChangeEvent) => void;
274
+ /**
275
+ * Guarda los layouts en la API con bounced
276
+ */
170
277
  bouncedSaveBreakpointsLayouts: DebouncedFunc<(areaId: string) => void>;
171
- colapseLayoutItem: (areaId: string, layoutId: string) => void;
172
- unColapseLayoutItem: (areaId: string, layoutId: string) => void;
173
- maximizeLayout: (areaId: string, layoutId?: string) => void;
174
- normalizeLayouts: (areaId: string) => void;
278
+ /**
279
+ * Carga las ventanas de la API cuando se selecciona una area por primera vez
280
+ */
175
281
  loadWindowsFromApi: (areaId: string) => void;
176
282
  };
177
283
  windowActions: {
178
- setActions: (windowId: string, newActions: AreaWindowAction[], version?: string) => void;
284
+ setActions: (windowId: string, newActions: ModuleAction[], version?: string) => void;
179
285
  getCookie: (windowId: string, id: string) => Record<string, any> | undefined;
180
286
  getCookies: (windowId: string, type: CookieType) => Record<string, any>;
181
287
  setCookie: (windowId: string, id: string, type: CookieType, cookie: Record<string, any>) => void;
@@ -188,13 +294,18 @@ export interface AreasStateWithActions extends AreasState {
188
294
  setFnQueryClose: (windowId: string, fnQueryClose: () => void) => void;
189
295
  setWindowTitle: (windowId: string, title: string) => void;
190
296
  };
191
- areaAdminActions: {
192
- setFocus: (value: boolean) => void;
193
- };
194
297
  }
195
- export type DefaultAreasStoreProps = Omit<AreasState, 'currentArea'>;
196
- export type InitialAreasStoreProps = Pick<AreasState, 'networkOperation' | 'loadAreasFromNetwork' | 'loadCookiesFromNetwork' | 'getLabel' | 'ownerState'> & Partial<DefaultAreasStoreProps>;
298
+ export type DefaultAreasStoreProps = Omit<AreasStoreState, 'currentArea'>;
299
+ export type InitialAreasStoreProps = Pick<AreasStoreState, 'networkOperation' | 'loadAreasFromNetwork' | 'loadCookiesFromNetwork' | 'getLabel' | 'ownerState' | 'popupsProviderMethods' | 'storeId'> & Partial<DefaultAreasStoreProps>;
197
300
  export interface AreasProviderProps {
301
+ /**
302
+ * "storeId" identificador del store
303
+ */
304
+ storeId?: string;
305
+ /**
306
+ * "storeDevtoolsEnabled" determina si se debe usar devtools para el store
307
+ */
308
+ storeDevtoolsEnabled?: boolean;
198
309
  children: ReactNode;
199
310
  loadAreasFromNetwork: boolean;
200
311
  loadCookiesFromNetwork: boolean;
@@ -1,7 +1 @@
1
1
  export * from './AreasContext';
2
- export type { DynamicMFParameters } from './DynamicMFParmsContext/types';
3
- export type { DynamicMFStore } from './DynamicMFParmsContext/store';
4
- export type { WindowToolsMF } from './WindowToolsMFContext/types';
5
- export type { AreaWindowAction as ModuleAction } from '../types';
6
- export { WindowToolsMFProvider, WindowToolsMFContext } from './WindowToolsMFContext';
7
- export { createDynamicMFStore } from './DynamicMFParmsContext/store';
@@ -1,4 +1,2 @@
1
- export { useDynamicMFParametersStore } from './useDynamicMFParameters';
2
- export { useWindowToolsMF } from './useWindowToolsMF';
3
1
  export { useSetWindowsTitle } from './useSetWindowsTitle';
4
2
  export { useAreasStore } from './useAreas';
@@ -1,18 +1,18 @@
1
- import { AreasStateWithActions } from '../../contexts/AreasContext/types';
1
+ import { AreasStoreStateWithActions } from '../../contexts/AreasContext/types';
2
2
  /**
3
3
  * TODO: Documentar
4
4
  */
5
- export declare function useAreas(): Omit<Omit<import('zustand').StoreApi<AreasStateWithActions>, "setState"> & {
5
+ export declare function useAreas(): Omit<Omit<import('zustand').StoreApi<AreasStoreStateWithActions>, "setState"> & {
6
6
  setState<A extends string | {
7
7
  type: unknown;
8
- }>(partial: AreasStateWithActions | Partial<AreasStateWithActions> | ((state: AreasStateWithActions) => AreasStateWithActions | Partial<AreasStateWithActions>), replace?: boolean | undefined, action?: A | undefined): void;
8
+ }>(partial: AreasStoreStateWithActions | Partial<AreasStoreStateWithActions> | ((state: AreasStoreStateWithActions) => AreasStoreStateWithActions | Partial<AreasStoreStateWithActions>), replace?: boolean | undefined, action?: A | undefined): void;
9
9
  }, "setState"> & {
10
- setState(nextStateOrUpdater: AreasStateWithActions | Partial<AreasStateWithActions> | ((state: import('immer/dist/internal').WritableDraft<AreasStateWithActions>) => void), shouldReplace?: boolean | undefined, action?: string | {
10
+ setState(nextStateOrUpdater: AreasStoreStateWithActions | Partial<AreasStoreStateWithActions> | ((state: import('immer/dist/internal').WritableDraft<AreasStoreStateWithActions>) => void), shouldReplace?: boolean | undefined, action?: string | {
11
11
  type: unknown;
12
12
  } | undefined): void;
13
13
  };
14
14
  /**
15
15
  * TODO: Documentar
16
16
  */
17
- export declare function useAreasStore<T>(selector: (state: AreasStateWithActions) => T, equalityFn?: (left: T, right: T) => boolean): T;
17
+ export declare function useAreasStore<T>(selector: (state: AreasStoreStateWithActions) => T, equalityFn?: (left: T, right: T) => boolean): T;
18
18
  export default useAreas;
@@ -1,8 +1,8 @@
1
1
  import { useEffect } from "react";
2
2
  import { shallow } from "zustand/shallow";
3
3
  import { useFlagsPresent, CommonFlags, useModuleDictionary } from "@m4l/core";
4
- import { u as useWindowToolsMF } from "../useWindowToolsMF/index.js";
5
- import { u as useDynamicMFParametersStore } from "../useDynamicMFParameters/index.js";
4
+ import { u as useWindowToolsMF } from "../../../WindowBase/hooks/useWindowToolsMF/index.js";
5
+ import { u as useDynamicMFParametersStore } from "../../../WindowBase/hooks/useDynamicMFParameters/index.js";
6
6
  const titleLabels = {
7
7
  moduleName: "module_name",
8
8
  moduleNameAdd: "module_name_add",
@@ -1,35 +1,11 @@
1
- import { ReactNode } from 'react';
2
- import { DynamicMFParameters } from './contexts/DynamicMFParmsContext/types';
3
- import { DynamicMFStore } from './contexts/DynamicMFParmsContext/store';
4
- import { MenuItemAction } from '../MenuActions/types';
1
+ import { DynamicMFParameters } from '../WindowBase/contexts/DynamicMFParmsContext/types';
2
+ import { DynamicMFStore } from '../WindowBase/contexts/DynamicMFParmsContext/store';
5
3
  import { LayoutItem } from '../GridLayout';
6
- export type WindowActionType = 'main' | 'allways' | 'normal';
7
- export interface AreaWindowAction extends MenuItemAction {
8
- /**
9
- * Tipo de visibilidad de la acción de ventana.
10
- */
11
- visibility: WindowActionType;
12
- /**
13
- * Clave única de la acción de ventana.
14
- */
15
- key: string;
16
- /**
17
- * Etiqueta opcional para la acción de ventana.
18
- */
19
- tag?: any;
20
- /**
21
- * Clase CSS opcional para la acción de ventana.
22
- */
23
- className?: string;
24
- /**
25
- * Icono opcional para la acción de ventana.
26
- */
27
- iconUrl?: string;
28
- }
29
- /**
30
- * Tipo que representa el tipo de ventana: microfrontend o componente.
31
- */
32
- export type WinType = 'microfrontend' | 'component';
4
+ import { MFBaseProps } from '../MFLoader/types';
5
+ import { ModuleAction } from '../WindowBase';
6
+ import { PopupAddProps } from '../popups/components/PopupsProvider/contexts/PopupsContext/types';
7
+ import { DragResizeWindowProps } from '../DragResizeWindow/types';
8
+ import { JSX_REACT_NODE, WindowOptions, WinType } from '../WindowBase/types';
33
9
  /**
34
10
  * Tipo que representa el tipo de emergencia de la ventana: diseño, popup o modal.
35
11
  */
@@ -38,24 +14,6 @@ export type EmergeType = 'layout' | 'popup' | 'modal';
38
14
  * Tipo que representa el tipo de apertura de la ventana: normal o maximizado.
39
15
  */
40
16
  export type OpenType = 'normal' | 'maximized';
41
- /**
42
- * Propiedades base de un microfrontend.
43
- */
44
- export interface MFBaseProps {
45
- /**
46
- * Puerto de depuración utilizado para cargar el microfrontend en entornos locales.
47
- */
48
- debugPort: number;
49
- /**
50
- * Indica si se debe almacenar en caché el microfrontend para futuros usos.
51
- */
52
- cache?: boolean;
53
- /**
54
- * Prefijo utilizado para identificar los microfrontends. Por ejemplo, "m4labs", "guardian", etc.
55
- */
56
- prefix: string;
57
- }
58
- export type JSX_REACT_NODE = ((props?: any) => JSX.Element) | ReactNode;
59
17
  /**
60
18
  * Tipo que representa el tipo de cookie: ventana o módulo.
61
19
  */
@@ -81,14 +39,20 @@ export type WindowState = {
81
39
  * loading indica si la barra de progress aparece o no
82
40
  */
83
41
  loading: boolean;
42
+ /**
43
+ * version del Microfrontend, esta version es actualizada normalmente por el ModuleLayout del microfrontend
44
+ */
84
45
  version?: string;
85
46
  /**
86
47
  * Acciones del módulo.
87
48
  */
88
- moduleActions: AreaWindowAction[];
49
+ moduleActions: ModuleAction[];
50
+ /**
51
+ * Cookies de la ventana.
52
+ */
89
53
  cookies: Cookies;
90
54
  /**
91
- * "fnQueryClose" función que reemplaza la opción de cerrado normal de la ventana
55
+ * "fnQueryClose" función que reemplaza la opción de cerrado normal de la ventana, utilizado en Los MFs Add/Edit para confirmar la acción
92
56
  * @returns void
93
57
  */
94
58
  fnQueryClose?: () => void;
@@ -99,102 +63,147 @@ export type WindowState = {
99
63
  moduleCount?: number;
100
64
  };
101
65
  /**
102
- * Opciones para la ventana.
66
+ * Propiedades base para cuando se crea una ventana en la aplicación. En terminos generales son las propiedas base del Emmit
103
67
  */
104
- export type WindowOptions = {
68
+ export interface EmmitNewWindowBase {
105
69
  /**
106
- * Indica si se permitirá persistir las cookies.
70
+ * Tipo de emergencia de la ventana: diseño, popup o modal.
107
71
  */
108
- allowPersistCookies: boolean;
109
- };
110
- /**
111
- * Propiedades base para una ventana en la aplicación.
112
- */
113
- export interface WindowBaseProps {
72
+ emergeType: EmergeType;
114
73
  /**
115
- * Tipo de ventana ('microfrontend' o 'component').
74
+ * Tipo de ventana: microfrontend o componente.
116
75
  */
117
76
  winType: WinType;
118
- emergeType: EmergeType;
119
- openType?: OpenType;
120
- areaId: string;
77
+ /**
78
+ * Id del módulo. Este es el dado por el Backend
79
+ */
121
80
  moduleId: string;
122
- windowId: string;
81
+ /**
82
+ * Parámetros dinámicos del módulo. Estos paramtros son lo que un modulo puede enviarle a otro modulo para comunicarse entre ellos.
83
+ * Los parametros pueden ser datos tipo string, number, boolean, object, array, etc. y tambien pueden ser funciones.
84
+ */
123
85
  dynamicParams: DynamicMFParameters;
86
+ /**
87
+ * Url del icono del módulo.
88
+ */
124
89
  iconUrl: string;
90
+ /**
91
+ * Título de la ventana.
92
+ */
125
93
  title: string;
126
- onClose?: (windowId: string) => void;
127
- devCookies?: Cookies;
94
+ /**
95
+ * Subtítulo de la ventana.
96
+ */
97
+ subTitle?: string;
98
+ /**
99
+ * Opciones de la ventana. Son acciones que permiten persistir las cookies de la ventana a nivel de módulo, para que aunque se cierre esta,
100
+ * Cuando se abra de nuevo venga con las cookies guardadas.
101
+ * TODO: Se daño con la migración de ventanas a WindowBase, se debe revisar
102
+ */
128
103
  windowOptions?: WindowOptions;
129
- parentLayoutId?: string;
104
+ /**
105
+ * Id del padre de la ventana.
106
+ */
107
+ parentId?: string;
108
+ /**
109
+ * Tipo de apertura de la ventana: normal o maximizado.
110
+ */
111
+ openType?: OpenType;
112
+ /**
113
+ * Id de la ventana que puede ser reemplazada. Esto permite avisarle a una ventana existente que debe repintar su contenido, en vez de lanzar una nueva ventana.
114
+ */
130
115
  replaceMeId?: string;
131
116
  }
132
- export interface LayoutMagnetizableBaseProps extends WindowBaseProps {
117
+ /**
118
+ * Propiedades base para una ventana en la aplicación. En terminos generales es lo que el store aporta en el metodo AddWindow
119
+ */
120
+ export interface AreaWindowBaseProps extends EmmitNewWindowBase {
121
+ areaId: string;
122
+ windowId: string;
123
+ onClose?: (windowId: string) => void;
124
+ devCookies?: Cookies;
125
+ }
126
+ export interface AreaLayoutBaseProps extends AreaWindowBaseProps {
133
127
  emergeType: 'layout';
134
128
  layoutProps: Omit<LayoutItem, 'i'>;
135
129
  }
136
- export interface LayoutMagnetizableMFProps extends LayoutMagnetizableBaseProps {
130
+ export interface AreaLayoutMFProps extends AreaLayoutBaseProps {
137
131
  winType: 'microfrontend';
138
132
  mfProps: MFBaseProps;
139
133
  }
140
- export interface LayoutMagnetizableComponentProps extends LayoutMagnetizableBaseProps {
134
+ export interface AreaLayoutComponentProps extends AreaLayoutBaseProps {
141
135
  winType: 'component';
142
136
  component: JSX_REACT_NODE;
143
137
  }
144
- export type LayoutMagentizableProps = LayoutMagnetizableMFProps | LayoutMagnetizableComponentProps;
145
- export type LayoutMagnetizableStateProps = LayoutMagentizableProps & WindowState;
146
- export type NewLayoutMagnetizableProps = Omit<LayoutMagnetizableMFProps, 'windowId' | 'onClose' | 'areaId'> | Omit<LayoutMagnetizableComponentProps, 'windowId' | 'onClose' | 'areaId'>;
138
+ export type AreaLayoutProps = AreaLayoutMFProps | AreaLayoutComponentProps;
139
+ export type AreaLayoutStateProps = AreaLayoutProps & WindowState;
140
+ export type EmmitNewLayoutProps = Omit<AreaLayoutMFProps, 'windowId' | 'onClose' | 'areaId'> | Omit<AreaLayoutComponentProps, 'windowId' | 'onClose' | 'areaId'> & {
141
+ winType: string;
142
+ emergeType: string;
143
+ layoutProps: any;
144
+ moduleId: string;
145
+ dynamicParams: Record<string, any>;
146
+ iconUrl: string;
147
+ title: string;
148
+ };
149
+ /**
150
+ * Retirar la props que ya entran por el Emmit, y dejar solo las que ingresan directamente al Popup
151
+ */
152
+ type PopupPropsForAdd = Partial<Pick<PopupAddProps, 'bounds' | 'defaultPosition' | 'minWidth' | 'minHeight' | 'maxWidth' | 'maxHeight' | 'resizable' | 'draggable'>>;
147
153
  export type Position = {
148
154
  x: number;
149
155
  y: number;
150
156
  width: number;
151
157
  height: number;
152
158
  };
153
- export interface LayoutMoveableBaseProps extends WindowBaseProps {
159
+ export interface AreaPopupBaseProps extends AreaWindowBaseProps {
154
160
  emergeType: 'popup';
155
- layoutProps: Omit<LayoutItem, 'i'>;
156
- parentLayoutId: string;
161
+ popupProps: PopupPropsForAdd;
157
162
  replaceMeId?: string;
158
163
  }
159
- export interface LayoutMoveableMFProps extends LayoutMoveableBaseProps {
164
+ export interface AreaPopupMFProps extends AreaPopupBaseProps {
160
165
  winType: 'microfrontend';
161
166
  mfProps: MFBaseProps;
162
167
  }
163
- export interface LayoutMoveableComponentProps extends LayoutMoveableBaseProps {
168
+ export interface AreaPopupComponentProps extends AreaPopupBaseProps {
164
169
  winType: 'component';
165
170
  component: JSX_REACT_NODE;
166
171
  }
167
- export type LayoutMoveableProps = LayoutMoveableMFProps | LayoutMoveableComponentProps;
168
- export type LayoutMoveableStateProps = LayoutMoveableProps & WindowState;
169
- export type NewLayoutMoveableProps = Omit<LayoutMoveableMFProps, 'windowId' | 'onClose' | 'areaId'> | Omit<LayoutMoveableComponentProps, 'windowId' | 'onClose' | 'areaId'>;
170
- export interface HashWindowsByPopups {
171
- [P: string]: LayoutMoveableStateProps;
172
+ export interface EmmitNewPopupMFProps extends EmmitNewWindowBase {
173
+ emergeType: 'popup';
174
+ winType: 'microfrontend';
175
+ mfProps: MFBaseProps;
176
+ popupProps: PopupPropsForAdd;
172
177
  }
178
+ export interface EmmitNewPopupComponentProps extends EmmitNewWindowBase {
179
+ emergeType: 'popup';
180
+ winType: 'component';
181
+ component: JSX_REACT_NODE;
182
+ popupProps: PopupPropsForAdd;
183
+ }
184
+ export type EmmitNewPopupProps = EmmitNewPopupMFProps | EmmitNewPopupComponentProps;
173
185
  export interface HashWindowsByLayouts {
174
- [P: string]: LayoutMagnetizableStateProps | LayoutMoveableStateProps;
186
+ [P: string]: AreaLayoutStateProps;
175
187
  }
176
- export interface ModalBaseProps extends WindowBaseProps {
188
+ type AreaModalPropsForAdd = Pick<DOMRect, 'width' | 'height'> & Pick<DragResizeWindowProps, 'minWindowWidth' | 'minWindowHeight'>;
189
+ export interface AreaModalBaseProps extends AreaWindowBaseProps {
177
190
  emergeType: 'modal';
178
191
  zIndex?: number;
179
- windowProps?: Pick<DOMRect, 'width' | 'height'>;
192
+ modalProps: AreaModalPropsForAdd;
180
193
  }
181
- export interface ModalMFProps extends ModalBaseProps {
194
+ export interface AreaModalMFProps extends AreaModalBaseProps {
182
195
  winType: 'microfrontend';
183
196
  mfProps: MFBaseProps;
184
197
  }
185
- export interface ModalComponentProps extends ModalBaseProps {
198
+ export interface AreaModalComponentProps extends AreaModalBaseProps {
186
199
  winType: 'component';
187
- component: ReactNode;
188
- }
189
- export type ModalProps = ModalMFProps | ModalComponentProps;
190
- export type ModalStateProps = ModalProps & WindowState;
191
- export type NewModalProps = Omit<ModalMFProps, 'windowId' | 'onClose' | 'areaId'> | Omit<ModalComponentProps, 'windowId' | 'onClose' | 'areaId'>;
192
- export interface HashWindowsByModals {
193
- [P: string]: ModalStateProps;
200
+ component: JSX_REACT_NODE;
194
201
  }
195
- export type WindowStateProps = (LayoutMagnetizableMFProps & WindowState) | (LayoutMagnetizableComponentProps & WindowState) | (LayoutMoveableMFProps & WindowState) | (LayoutMoveableComponentProps & WindowState) | (ModalMFProps & WindowState) | (ModalComponentProps & WindowState);
202
+ export type EmmitNewModalProps = Omit<AreaModalMFProps, 'windowId' | 'onClose' | 'areaId'> | Omit<AreaModalComponentProps, 'windowId' | 'onClose' | 'areaId'>;
203
+ export type AreaWindowProps = (AreaLayoutMFProps & WindowState) | (AreaLayoutComponentProps & WindowState) | (AreaPopupMFProps & WindowState) | (AreaPopupComponentProps & WindowState) | (AreaModalMFProps & WindowState) | (AreaModalComponentProps & WindowState);
196
204
  export interface HashWindows {
197
- [P: string]: WindowStateProps;
205
+ [P: string]: AreaWindowProps;
198
206
  }
199
- export type NewWindowProps = NewLayoutMagnetizableProps | NewLayoutMoveableProps | NewModalProps;
200
- export type AddWindow = (newWindow: NewWindowProps) => string;
207
+ export type EmmitNewWindowProps = EmmitNewLayoutProps | EmmitNewPopupProps | EmmitNewModalProps;
208
+ export type AddWindow = (newWindow: EmmitNewWindowProps) => string;
209
+ export {};
@@ -2,6 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { R as RootStyled } from "./slots/ResizableSlots.js";
3
3
  import { u as useResizable } from "../hooks/useResizable.js";
4
4
  import { R as RESIZING_CLASS_NAME } from "./constants.js";
5
+ import clsx from "clsx";
5
6
  const Resizable = (props) => {
6
7
  const { onResizeStart, onResizeStop, ...other } = props;
7
8
  const { isResizing, localHandleResizeStart, localHandleResizeStop } = useResizable(onResizeStart, onResizeStop);
@@ -11,7 +12,7 @@ const Resizable = (props) => {
11
12
  ...other,
12
13
  onResizeStart: localHandleResizeStart,
13
14
  onResizeStop: localHandleResizeStop,
14
- className: isResizing ? RESIZING_CLASS_NAME : ""
15
+ className: clsx(isResizing ? RESIZING_CLASS_NAME : "", other.className)
15
16
  }
16
17
  );
17
18
  };
@@ -1,4 +1,4 @@
1
1
  import { Resizable } from 'react-resizable';
2
- export declare const RootStyled: import('@emotion/styled').StyledComponent<Pick<import('react-resizable').ResizableProps, "children" | "width" | "height" | "className" | "onResize" | "axis" | "resizeHandles" | "handle" | "handleSize" | "lockAspectRatio" | "minConstraints" | "maxConstraints" | "onResizeStop" | "onResizeStart" | "draggableOpts" | "transformScale"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, {}, {
2
+ export declare const RootStyled: import('@emotion/styled').StyledComponent<Pick<import('react-resizable').ResizableProps, "children" | "resizeHandles" | "width" | "height" | "className" | "onResize" | "handle" | "handleSize" | "lockAspectRatio" | "minConstraints" | "maxConstraints" | "onResizeStop" | "onResizeStart" | "draggableOpts" | "transformScale" | "axis"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, {}, {
3
3
  ref?: import('react').Ref<Resizable> | undefined;
4
4
  }>;
@@ -1,4 +1,4 @@
1
1
  import { ResizableBox } from 'react-resizable';
2
- export declare const RootStyled: import('@emotion/styled').StyledComponent<Pick<import('react-resizable').ResizableBoxProps, "children" | "style" | "width" | "height" | "className" | "onResize" | "axis" | "resizeHandles" | "handle" | "handleSize" | "lockAspectRatio" | "minConstraints" | "maxConstraints" | "onResizeStop" | "onResizeStart" | "draggableOpts" | "transformScale"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, {}, {
2
+ export declare const RootStyled: import('@emotion/styled').StyledComponent<Pick<import('react-resizable').ResizableBoxProps, "children" | "resizeHandles" | "style" | "width" | "height" | "className" | "onResize" | "handle" | "handleSize" | "lockAspectRatio" | "minConstraints" | "maxConstraints" | "onResizeStop" | "onResizeStart" | "draggableOpts" | "transformScale" | "axis"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, {}, {
3
3
  ref?: import('react').Ref<ResizableBox> | undefined;
4
4
  }>;
@@ -22,8 +22,13 @@ export declare const getReactResizableStyles: (theme: Theme, ownerState: {
22
22
  '& .react-resizable-handle': {
23
23
  display: string;
24
24
  };
25
- '&:hover .react-resizable-handle, &.M4L-resizing .react-resizable-handle': {
25
+ '&:hover:not(.react-resizable-hide) .react-resizable-handle': {
26
26
  display: string;
27
+ prop1: number;
28
+ };
29
+ '&.M4L-resizing .react-resizable-handle': {
30
+ display: string;
31
+ prop1: number;
27
32
  };
28
33
  };
29
34
  '& .react-resizable-handle-sw': {