@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,243 +1,310 @@
1
1
  import { createStore } from "zustand";
2
2
  import { immer } from "zustand/middleware/immer";
3
3
  import cloneDeep from "lodash-es/cloneDeep";
4
- import { c as createDynamicMFStore } from "../../../../../areas/contexts/DynamicMFParmsContext/store.js";
5
- const createPopupsStore = (initProps) => {
4
+ import { c as createDynamicMFStore } from "../../../../../WindowBase/contexts/DynamicMFParmsContext/store.js";
5
+ import { devtools } from "zustand/middleware";
6
+ const createDevtools = (immerMiddlewere, config) => {
7
+ const { enabled = false } = config;
8
+ if (enabled && process.env.NODE_ENV === "development") {
9
+ return devtools(immerMiddlewere, config);
10
+ }
11
+ return immerMiddlewere;
12
+ };
13
+ const createPopupsStore = (initProps, storeDevtoolsEnabled = false) => {
6
14
  const startProps = {
15
+ ...initProps,
7
16
  currentZindex: initProps.baseZindex,
8
17
  popupsIds: [],
9
18
  hashPopups: {},
10
- windowActions: {
11
- setActions: []
12
- //getCookie: () => undefined,
13
- //setCookie: () => {},
14
- //saveModuleCookies: () => {},
15
- //resetModuleCookies: () => {},
16
- },
17
- getContainer: initProps.getContainerElement,
18
- ...initProps
19
+ hashGroups: {}
19
20
  };
20
21
  return createStore(
21
- immer((set, get) => ({
22
- ...startProps,
23
- popupsActions: {
24
- /**
25
- * init: Inicializa los popups
26
- */
27
- init: (initialPopups) => {
28
- set((state) => {
29
- let maxZindex = state.baseZindex;
30
- for (let index = 0; index < initialPopups.length; index++) {
31
- const popupData = cloneDeep(initialPopups[index]);
32
- if (!popupData.dynamicMFStore && popupData.dynamicParams) {
22
+ createDevtools(
23
+ immer((set, get) => ({
24
+ ...startProps,
25
+ popupsActions: {
26
+ /**
27
+ * init: Inicializa los popups
28
+ */
29
+ init: (initialPopups) => {
30
+ set((state) => {
31
+ let maxZindex = state.baseZindex;
32
+ for (let index = 0; index < initialPopups.length; index++) {
33
+ const popupData = cloneDeep(initialPopups[index]);
34
+ popupData.dynamicParams = popupData.dynamicParams || {};
33
35
  popupData.dynamicMFStore = createDynamicMFStore({
34
- dynamicMFParameters: popupData.dynamicParams,
35
- windowId: popupData.popupId
36
+ dynamicMFParameters: popupData.dynamicParams
36
37
  });
38
+ state.hashPopups[initialPopups[index].popupId] = {
39
+ ...popupData
40
+ };
41
+ state.popupsIds.push(initialPopups[index].popupId);
42
+ if (initialPopups[index].zIndex > maxZindex) {
43
+ maxZindex = initialPopups[index].zIndex;
44
+ }
45
+ if (!state.hashGroups[initialPopups[index].groupId]) {
46
+ state.hashGroups[initialPopups[index].groupId] = {
47
+ id: initialPopups[index].groupId,
48
+ count: 0
49
+ };
50
+ }
51
+ state.hashGroups[initialPopups[index].groupId].count += 1;
37
52
  }
38
- state.hashPopups[initialPopups[index].popupId] = {
39
- ...popupData
40
- // component: popupData.functionComponent,
41
- };
42
- state.popupsIds.push(initialPopups[index].popupId);
43
- if (initialPopups[index].zIndex > maxZindex) {
44
- maxZindex = initialPopups[index].zIndex;
45
- }
53
+ state.currentZindex = maxZindex + 1;
54
+ });
55
+ },
56
+ /**
57
+ * addPopup: Añade un popup
58
+ */
59
+ addPopup: (popupProps, options) => {
60
+ const { popupId, dynamicParams, dynamicMFStore, groupId = "global" } = popupProps;
61
+ if (get().hashPopups[popupId]) {
62
+ throw new Error(`Popup with id ${popupId} already exists`);
46
63
  }
47
- state.currentZindex = maxZindex + 1;
48
- });
49
- },
50
- /**
51
- * addPopup: Añade un popup
52
- */
53
- addPopup: (popupProps, options) => {
54
- if (get().hashPopups[popupProps.popupId]) {
55
- throw new Error(`Poupup with id ${popupProps.popupId} already exists`);
56
- }
57
- if (options?.closeOthers) {
58
64
  set((state) => {
59
- state.popupsIds.forEach((popupId) => {
60
- state.hashPopups[popupId].status = "closing";
65
+ if (options?.closeOthers) {
66
+ state.popupsIds.forEach((pId) => {
67
+ if (state.hashPopups[pId].groupId === groupId) {
68
+ state.hashPopups[pId].status = "closing";
69
+ }
70
+ });
71
+ }
72
+ const finalMFStore = dynamicMFStore || createDynamicMFStore({
73
+ dynamicMFParameters: dynamicParams || {}
61
74
  });
62
- state.hashPopups[popupProps.popupId] = {
75
+ state.hashPopups[popupId] = {
63
76
  ...popupProps,
77
+ groupId,
64
78
  status: "init",
65
- zIndex: state.currentZindex
79
+ zIndex: state.currentZindex,
80
+ dynamicMFStore: finalMFStore
66
81
  };
67
- state.popupsIds.push(popupProps.popupId);
68
- state.currentZindex = state.currentZindex + 1;
82
+ state.popupsIds.push(popupId);
83
+ state.currentZindex += 1;
84
+ if (!state.hashGroups[groupId]) {
85
+ state.hashGroups[groupId] = {
86
+ id: groupId,
87
+ count: 0
88
+ };
89
+ }
90
+ state.hashGroups[groupId].count += 1;
91
+ state.hashGroups[groupId].selectedPopupId = popupId;
92
+ state.hashPopups[popupId].onSelectedPopupIdChange?.(state.hashPopups[popupId].groupId, popupId, "add");
69
93
  });
70
- } else {
94
+ },
95
+ /**
96
+ * removePopup: Elimina un popup
97
+ */
98
+ removePopup: (popupId) => {
99
+ if (!get().hashPopups[popupId]) {
100
+ return;
101
+ }
71
102
  set((state) => {
72
- state.hashPopups[popupProps.popupId] = {
73
- ...popupProps,
74
- status: "init",
75
- zIndex: state.currentZindex
76
- };
77
- state.popupsIds.push(popupProps.popupId);
78
- state.currentZindex = state.currentZindex + 1;
103
+ if (state.hashPopups[popupId]?.onRemove) {
104
+ state.hashPopups[popupId].onRemove(popupId);
105
+ }
106
+ state.popupsIds.splice(state.popupsIds.indexOf(popupId), 1);
107
+ if (state.hashGroups[state.hashPopups[popupId].groupId].selectedPopupId === popupId) {
108
+ state.hashGroups[state.hashPopups[popupId].groupId].selectedPopupId = void 0;
109
+ state.hashPopups[popupId].onSelectedPopupIdChange?.(state.hashPopups[popupId].groupId, void 0, "remove");
110
+ }
111
+ state.hashGroups[state.hashPopups[popupId].groupId].count -= 1;
112
+ if (state.hashGroups[state.hashPopups[popupId].groupId].count === 0) {
113
+ delete state.hashGroups[state.hashPopups[popupId].groupId];
114
+ }
115
+ delete state.hashPopups[popupId];
116
+ if (state.popupsIds.length === 0) {
117
+ state.currentZindex = state.baseZindex;
118
+ } else {
119
+ state.currentZindex = state.currentZindex - 1;
120
+ }
79
121
  });
80
- }
81
- },
82
- /**
83
- * removePopup: Elimina un popup
84
- */
85
- removePopup: (popupId) => {
86
- if (!get().hashPopups[popupId]) {
87
- return;
88
- }
89
- set((state) => {
90
- state.popupsIds.splice(state.popupsIds.indexOf(popupId), 1);
91
- delete state.hashPopups[popupId];
92
- if (state.popupsIds.length === 0) {
93
- state.currentZindex = state.baseZindex;
94
- } else {
95
- state.currentZindex = state.currentZindex - 1;
122
+ },
123
+ /**
124
+ * bringPopupOnFront: Establece el popup con mayor zindex
125
+ */
126
+ bringPopupOnFront: (popupId, withEnforceVisible) => {
127
+ if (!get().hashPopups[popupId]) {
128
+ return;
96
129
  }
97
- });
98
- },
99
- /**
100
- * closePopup: Cierra un popup
101
- */
102
- closePopup: (popupId) => {
103
- if (!get().hashPopups[popupId]) {
104
- return;
105
- }
106
- set((state) => {
107
- state.hashPopups[popupId].status = "closing";
108
- });
109
- },
110
- /**
111
- * updatePopup: Actualiza un popup
112
- */
113
- updatePopup: (popupId, popupProps) => {
114
- if (!get().hashPopups[popupId]) {
115
- return;
116
- }
117
- set((state) => {
118
- state.hashPopups[popupId] = { ...state.hashPopups[popupId], ...popupProps };
119
- });
120
- },
121
- /**
122
- * showPopup: Muestra un popup
123
- */
124
- showPopup: (popupId) => {
125
- if (!get().hashPopups[popupId]) {
126
- return;
127
- }
128
- set((state) => {
129
- state.hashPopups[popupId].status = "init";
130
- });
131
- },
132
- /**
133
- * hidePopup: Oculta un popup
134
- */
135
- hidePopup: (popupId) => {
136
- if (!get().hashPopups[popupId]) {
137
- return;
138
- }
139
- set((state) => {
140
- state.hashPopups[popupId].status = "hidden";
141
- });
142
- },
143
- /**
144
- * setActions: Establece las acciones del popup
145
- */
146
- setActions: (popupId, actions, version) => {
147
- set((state) => {
148
- if (state.hashPopups[popupId]) {
149
- state.hashPopups[popupId].moduleActions = actions;
150
- state.hashPopups[popupId].version = version;
151
- }
152
- });
153
- },
154
- /**
155
- * setPopupOnTop: Establece el popup con mayor zindex
156
- */
157
- setPopupOnFront: (popupId) => {
158
- if (!get().hashPopups[popupId]) {
159
- return;
130
+ set((state) => {
131
+ const maxIndex = state.popupsIds.reduce((max, _pId, cIndex) => {
132
+ return state.hashPopups[state.popupsIds[cIndex]].zIndex > max ? state.hashPopups[state.popupsIds[cIndex]].zIndex : max;
133
+ }, state.hashPopups[state.popupsIds[0]].zIndex);
134
+ if (state.hashPopups[popupId].zIndex !== maxIndex) {
135
+ state.hashPopups[popupId].zIndex = state.currentZindex;
136
+ state.currentZindex = state.currentZindex + 1;
137
+ }
138
+ if (withEnforceVisible) {
139
+ state.hashPopups[popupId].enforceVisibleCount = (state.hashPopups[popupId].enforceVisibleCount || 0) + 1;
140
+ }
141
+ state.hashGroups[state.hashPopups[popupId].groupId].selectedPopupId = popupId;
142
+ state.hashPopups[popupId].onSelectedPopupIdChange?.(state.hashPopups[popupId].groupId, popupId, "select");
143
+ });
144
+ },
145
+ /**
146
+ * setFnQueryClose: Establece la función de cierre de la consulta
147
+ */
148
+ setFnQueryClose: (popupId, fn) => {
149
+ set((state) => {
150
+ if (state.hashPopups[popupId]) {
151
+ state.hashPopups[popupId].fnQueryClose = fn;
152
+ }
153
+ });
154
+ },
155
+ /**
156
+ * unColapseLayoutItem
157
+ */
158
+ unColapseLayoutItem: (popupId) => {
159
+ set((state) => {
160
+ if (state.hashPopups[popupId]) {
161
+ state.hashPopups[popupId].collapsed = false;
162
+ }
163
+ });
164
+ },
165
+ /**
166
+ * colapseLayoutItem
167
+ */
168
+ colapseLayoutItem: (popupId) => {
169
+ set((state) => {
170
+ if (state.hashPopups[popupId]) {
171
+ state.hashPopups[popupId].collapsed = true;
172
+ }
173
+ });
174
+ },
175
+ /**
176
+ * removePopupsByGroupId: Elimina los popups de un grupo
177
+ */
178
+ closePopupsByGroupId: (groupId) => {
179
+ set((state) => {
180
+ const popupsToRemove = state.popupsIds.filter((popupId) => {
181
+ const popup = state.hashPopups[popupId];
182
+ return popup.groupId === groupId;
183
+ });
184
+ popupsToRemove.forEach((popupId) => {
185
+ state.hashPopups[popupId].status = "closing";
186
+ });
187
+ });
188
+ },
189
+ /**
190
+ * removeAllPopupsByGroupId: Elimina todos los popups de un grupo
191
+ */
192
+ removeAllPopupsByGroupId: (groupId) => {
193
+ set((state) => {
194
+ const popupsToRemove = state.popupsIds.filter((popupId) => {
195
+ const popup = state.hashPopups[popupId];
196
+ return popup.groupId === groupId;
197
+ });
198
+ state.popupsIds = state.popupsIds.filter((pId) => state.hashPopups[pId].groupId !== groupId);
199
+ popupsToRemove.forEach((popupId) => {
200
+ delete state.hashPopups[popupId];
201
+ });
202
+ delete state.hashGroups[groupId];
203
+ });
204
+ },
205
+ /**
206
+ * closeAllPopupsByParentId: Cierra todos los popups que dependan de un popup padre
207
+ */
208
+ closeAllPopupsByParentId: (parentId) => {
209
+ set((state) => {
210
+ state.popupsIds.forEach((popupId) => {
211
+ if (state.hashPopups[popupId].parentId === parentId) {
212
+ state.hashPopups[popupId].status = "closing";
213
+ }
214
+ });
215
+ });
216
+ },
217
+ /**
218
+ * setSelectedPopupId: Establece el popup seleccionado
219
+ */
220
+ setSelectedPopupId: (groupId, popupId) => {
221
+ set((state) => {
222
+ if (state.hashGroups[groupId]) {
223
+ state.hashGroups[groupId].selectedPopupId = popupId;
224
+ }
225
+ });
160
226
  }
161
- set((state) => {
162
- const maxIndex = state.popupsIds.reduce((max, _pId, cIndex) => {
163
- return state.hashPopups[state.popupsIds[cIndex]].zIndex > max ? state.hashPopups[state.popupsIds[cIndex]].zIndex : max;
164
- }, state.hashPopups[state.popupsIds[0]].zIndex);
165
- if (state.hashPopups[popupId].zIndex !== maxIndex) {
166
- state.hashPopups[popupId].zIndex = state.currentZindex;
167
- state.currentZindex = state.currentZindex + 1;
168
- }
169
- });
170
- },
171
- /**
172
- * setHandlerGetLabel: Establece el manejador de etiquetas
173
- */
174
- setHandlerGetLabel: (newHandler) => {
175
- set((state) => {
176
- state.getLabel = newHandler;
177
- });
178
227
  },
179
- /**
180
- * startProgress: Marca el popup como cargando (loading: true)
181
- */
182
- startProgress: (popupId) => {
183
- set((state) => {
184
- if (state.hashPopups[popupId]) {
185
- state.hashPopups[popupId].loading = true;
228
+ popupActions: {
229
+ /**
230
+ * updatePopup: Actualiza un popup
231
+ */
232
+ update: (popupId, popupProps) => {
233
+ if (!get().hashPopups[popupId]) {
234
+ return;
186
235
  }
187
- });
188
- },
189
- /**
190
- * stopProgress: Marca el popup como finalizado (loading: false)
191
- */
192
- stopProgress: (popupId) => {
193
- set((state) => {
194
- if (state.hashPopups[popupId]) {
195
- state.hashPopups[popupId].loading = false;
196
- }
197
- });
198
- },
199
- /**
200
- * setFnQueryClose: Establece la función de cierre de la consulta
201
- */
202
- setFnQueryClose: (popupId, fn) => {
203
- set((state) => {
204
- if (state.hashPopups[popupId]) {
205
- state.hashPopups[popupId].fnQueryClose = fn;
206
- }
207
- });
208
- },
209
- /**
210
- * setPopupTitle: Establece el título del popup
211
- */
212
- setPopupTitle: (popupId, title) => {
213
- set((state) => {
214
- if (state.hashPopups[popupId]) {
215
- state.hashPopups[popupId].title = title;
236
+ set((state) => {
237
+ state.hashPopups[popupId] = { ...state.hashPopups[popupId], ...popupProps };
238
+ });
239
+ },
240
+ /**
241
+ * showPopup: Muestra un popup
242
+ */
243
+ show: (popupId) => {
244
+ if (!get().hashPopups[popupId]) {
245
+ return;
216
246
  }
217
- });
218
- },
219
- /**
220
- * unColapseLayoutItem
221
- */
222
- unColapseLayoutItem: (popupId) => {
223
- set((state) => {
224
- if (state.hashPopups[popupId]) {
225
- state.hashPopups[popupId].collapsed = false;
247
+ set((state) => {
248
+ state.hashPopups[popupId].status = "init";
249
+ });
250
+ },
251
+ /**
252
+ * hidePopup: Oculta un popup
253
+ */
254
+ hide: (popupId) => {
255
+ if (!get().hashPopups[popupId]) {
256
+ return;
226
257
  }
227
- });
228
- },
229
- /**
230
- * colapseLayoutItem
231
- */
232
- colapseLayoutItem: (popupId) => {
233
- set((state) => {
234
- if (state.hashPopups[popupId]) {
235
- state.hashPopups[popupId].collapsed = true;
258
+ set((state) => {
259
+ state.hashPopups[popupId].status = "hidden";
260
+ });
261
+ },
262
+ /**
263
+ * closePopup: Cierra un popup
264
+ */
265
+ close: (popupId) => {
266
+ if (!get().hashPopups[popupId]) {
267
+ return;
236
268
  }
237
- });
269
+ set((state) => {
270
+ state.hashPopups[popupId].status = "closing";
271
+ });
272
+ },
273
+ /**
274
+ * setActions: Establece las acciones del popup
275
+ */
276
+ setActions: (popupId, actions, version) => {
277
+ set((state) => {
278
+ if (state.hashPopups[popupId]) {
279
+ state.hashPopups[popupId].moduleActions = actions;
280
+ state.hashPopups[popupId].version = version;
281
+ }
282
+ });
283
+ },
284
+ /**
285
+ * startProgress: Marca el popup como cargando (loading: true)
286
+ */
287
+ startProgress: (popupId) => {
288
+ set((state) => {
289
+ if (state.hashPopups[popupId]) {
290
+ state.hashPopups[popupId].loading = true;
291
+ }
292
+ });
293
+ },
294
+ /**
295
+ * stopProgress: Marca el popup como finalizado (loading: false)
296
+ */
297
+ stopProgress: (popupId) => {
298
+ set((state) => {
299
+ if (state.hashPopups[popupId]) {
300
+ state.hashPopups[popupId].loading = false;
301
+ }
302
+ });
303
+ }
238
304
  }
239
- }
240
- }))
305
+ })),
306
+ { name: `PopupsStore: ${initProps.storeId}`, enabled: storeDevtoolsEnabled }
307
+ )
241
308
  );
242
309
  };
243
310
  export {
@@ -0,0 +1,29 @@
1
+ export declare const initMock: import('vitest').Mock<(...args: any[]) => any>;
2
+ export declare const createPopupsStoreMock: import('vitest').Mock<() => {
3
+ getState: import('vitest').Mock<() => {
4
+ popupsActions: {
5
+ init: import('vitest').Mock<(...args: any[]) => any>;
6
+ addPopup: import('vitest').Mock<(...args: any[]) => any>;
7
+ removePopup: import('vitest').Mock<(...args: any[]) => any>;
8
+ bringPopupOnFront: import('vitest').Mock<(...args: any[]) => any>;
9
+ };
10
+ popupActions: {
11
+ update: import('vitest').Mock<(...args: any[]) => any>;
12
+ show: import('vitest').Mock<(...args: any[]) => any>;
13
+ hide: import('vitest').Mock<(...args: any[]) => any>;
14
+ close: import('vitest').Mock<(...args: any[]) => any>;
15
+ };
16
+ popupsIds: string[];
17
+ hashPopups: {
18
+ popup1: {
19
+ popupId: string;
20
+ title: string;
21
+ };
22
+ popup2: {
23
+ popupId: string;
24
+ title: string;
25
+ };
26
+ };
27
+ }>;
28
+ subscribe: import('vitest').Mock<() => () => void>;
29
+ }>;