@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.
- package/.storybook/decorators/WithPopupsProvider/WithPopupsProvider.d.ts +6 -1
- package/.storybook/decorators/WithWindowsContainerSizer/WithWindowsContainerSizer.d.ts +5 -0
- package/@types/types.d.ts +11 -0
- package/components/AccountPopover/slots/AccountPopoverSlots.d.ts +3 -3
- package/components/AppBar/slots/AppBarSlots.d.ts +2 -2
- package/components/Chip/slots/ChipSlots.d.ts +1 -1
- package/components/Color/slots/ColorSlots.d.ts +1 -1
- package/components/CommonActions/components/ActionCancel/slots/ActionsCancelSlots.d.ts +1 -1
- package/components/CommonActions/components/ActionFormCancel/ActionFormCancel.js +1 -1
- package/components/CommonActions/components/ActionFormCancel/slots/ActionFormCancelSlots.d.ts +1 -1
- package/components/CommonActions/components/ActionIntro/slots/ActionsIntroSlots.d.ts +1 -1
- package/components/CommonActions/components/ActionsContainer/slots/ActionsContainerSlots.d.ts +1 -1
- package/components/DragResizeWindow/DragResizeWindow.d.ts +2 -2
- package/components/DragResizeWindow/DragResizeWindow.js +69 -11
- package/components/DragResizeWindow/DragResizeWindow.styles.js +0 -2
- package/components/DragResizeWindow/classes/index.js +1 -0
- package/components/DragResizeWindow/classes/types.d.ts +1 -0
- package/components/DragResizeWindow/helpers/draggingOrResizingWindow.d.ts +7 -0
- package/components/DragResizeWindow/helpers/draggingOrResizingWindow.js +1 -0
- package/components/DragResizeWindow/helpers/expandingParentContainer.d.ts +12 -0
- package/components/DragResizeWindow/helpers/expandingParentContainer.js +31 -0
- package/components/DragResizeWindow/helpers/getInitialSize.d.ts +15 -0
- package/components/DragResizeWindow/helpers/getInitialSize.js +56 -0
- package/components/DragResizeWindow/helpers/index.d.ts +6 -15
- package/components/DragResizeWindow/helpers/index.js +1 -37
- package/components/DragResizeWindow/helpers/isElmentInViewport.d.ts +15 -0
- package/components/DragResizeWindow/helpers/isElmentInViewport.js +1 -0
- package/components/DragResizeWindow/helpers/pointPosition.d.ts +36 -0
- package/components/DragResizeWindow/helpers/pointPosition.js +82 -0
- package/components/DragResizeWindow/helpers/shrinkingParentContainer.d.ts +6 -0
- package/components/DragResizeWindow/helpers/shrinkingParentContainer.js +34 -0
- package/components/DragResizeWindow/hooks/useDimensionEffects.d.ts +2 -0
- package/components/DragResizeWindow/hooks/useDimensionEffects.js +20 -223
- package/components/DragResizeWindow/hooks/useDragOptions.d.ts +8 -1
- package/components/DragResizeWindow/hooks/useDragOptions.js +79 -6
- package/components/DragResizeWindow/hooks/useResizeOptions.d.ts +11 -0
- package/components/DragResizeWindow/hooks/useResizeOptions.js +164 -19
- package/components/DragResizeWindow/slots/DragResizeWindowSlots.d.ts +2 -2
- package/components/DragResizeWindow/types.d.ts +53 -4
- package/components/DragResizeWindow/utils.d.ts +5 -2
- package/components/DragResizeWindow/utils.js +32 -13
- package/components/DragResizeWindowRND/DragResizeWindowRND.d.ts +19 -0
- package/components/DragResizeWindowRND/DragResizeWindowRND.js +224 -0
- package/components/DragResizeWindowRND/DragResizeWindowRND.styles.d.ts +5 -0
- package/components/DragResizeWindowRND/DragResizeWindowRND.styles.js +75 -0
- package/components/DragResizeWindowRND/classes/index.d.ts +2 -0
- package/components/DragResizeWindowRND/classes/index.js +18 -0
- package/components/DragResizeWindowRND/classes/types.d.ts +9 -0
- package/components/DragResizeWindowRND/constants.d.ts +3 -0
- package/components/DragResizeWindowRND/constants.js +6 -0
- package/components/DragResizeWindowRND/helpers/expandingParentContainer.d.ts +12 -0
- package/components/DragResizeWindowRND/helpers/expandingParentContainer.js +31 -0
- package/components/DragResizeWindowRND/helpers/getInitialSize.d.ts +15 -0
- package/components/DragResizeWindowRND/helpers/getInitialSize.js +56 -0
- package/components/DragResizeWindowRND/helpers/index.d.ts +5 -0
- package/components/DragResizeWindowRND/helpers/index.js +1 -0
- package/components/DragResizeWindowRND/helpers/isElmentInViewport.d.ts +15 -0
- package/components/DragResizeWindowRND/helpers/isElmentInViewport.js +1 -0
- package/components/DragResizeWindowRND/helpers/pointPosition.d.ts +36 -0
- package/components/DragResizeWindowRND/helpers/pointPosition.js +1 -0
- package/components/DragResizeWindowRND/helpers/shrinkingParentContainer.d.ts +6 -0
- package/components/DragResizeWindowRND/helpers/shrinkingParentContainer.js +34 -0
- package/components/DragResizeWindowRND/hooks/useRNDDimensionEffects.d.ts +23 -0
- package/components/DragResizeWindowRND/hooks/useRNDDimensionEffects.js +90 -0
- package/components/DragResizeWindowRND/hooks/useRNDDragOptions.d.ts +28 -0
- package/components/DragResizeWindowRND/hooks/useRNDDragOptions.js +220 -0
- package/components/DragResizeWindowRND/hooks/useRNDReResizeOptions.d.ts +45 -0
- package/components/DragResizeWindowRND/hooks/useRNDReResizeOptions.js +173 -0
- package/components/DragResizeWindowRND/icons.d.ts +3 -0
- package/components/DragResizeWindowRND/index.d.ts +2 -0
- package/components/DragResizeWindowRND/index.js +1 -0
- package/components/DragResizeWindowRND/slots/DragResizeWindowRNDSlots.d.ts +12 -0
- package/components/DragResizeWindowRND/slots/DragResizeWindowRNDSlots.js +19 -0
- package/components/DragResizeWindowRND/slots/slots.d.ts +5 -0
- package/components/DragResizeWindowRND/slots/slots.js +9 -0
- package/components/DragResizeWindowRND/types.d.ts +295 -0
- package/components/DragResizeWindowRND/utils.d.ts +15 -0
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +4 -4
- package/components/DynamicFilter/subcomponents/PopoverFilter/usePopoverFilter.d.ts +3 -3
- package/components/DynamicSort/slots/DynamicSortSlots.d.ts +2 -2
- package/components/DynamicSort/subcomponents/PopoverSort/usePopoverSort.d.ts +3 -3
- package/components/GridLayout/GridLayout.d.ts +2 -1
- package/components/GridLayout/GridLayout.js +10 -5
- package/components/GridLayout/classes/index.d.ts +1 -1
- package/components/GridLayout/subcomponents/Responsive/index.d.ts +1 -1
- package/components/GridLayout/subcomponents/Responsive/index.js +4 -3
- package/components/GridLayout/subcomponents/Responsive/types.d.ts +4 -0
- package/components/GridLayout/subcomponents/withSizeProvider/index.d.ts +3 -1
- package/components/GridLayout/subcomponents/withSizeProvider/index.js +11 -15
- package/components/GridLayout/types.d.ts +4 -0
- package/components/Label/slots/LabelSlots.d.ts +1 -1
- package/components/LanguagePopover/slots/LanguagePopoverSlots.d.ts +1 -1
- package/components/MFIsolationApp/MFIsolationApp.js +24 -11
- package/components/MFIsolationApp/types.d.ts +8 -1
- package/components/MFLoader/styles.js +17 -2
- package/components/MFLoader/types.d.ts +19 -2
- package/components/MenuActions/slots/MenuActionsSlots.d.ts +2 -2
- package/components/ModalDialog/ModalDialog.js +2 -2
- package/components/ModalDialog/slots/ModalDialogSlots.d.ts +2 -2
- package/components/NumberInput/slots/NumberInputSlots.d.ts +2 -2
- package/components/ToastContainer/slots/toastContainerSlots.d.ts +2 -2
- package/components/ToastContainer/slots/toastContainerSlots.js +1 -1
- package/components/WindowBase/WindowBase.js +3 -5
- package/components/WindowBase/WindowBase.styles.js +26 -17
- package/components/{areas/contexts/DynamicMFParmsContext/index.js → WindowBase/contexts/DynamicMFParmsContext/DynamicMFParmsContext.js} +2 -2
- package/components/WindowBase/contexts/DynamicMFParmsContext/index.d.ts +4 -0
- package/components/WindowBase/contexts/DynamicMFParmsContext/index.js +1 -0
- package/components/{areas → WindowBase}/contexts/DynamicMFParmsContext/store.d.ts +0 -1
- package/components/{areas/contexts/WindowToolsMFContext/index.js → WindowBase/contexts/WindowToolsMFContext/WindowToolsMFContext.js} +4 -3
- package/components/WindowBase/contexts/WindowToolsMFContext/index.d.ts +2 -0
- package/components/WindowBase/contexts/WindowToolsMFContext/index.js +1 -0
- package/components/{areas → WindowBase}/contexts/WindowToolsMFContext/types.d.ts +3 -2
- package/components/WindowBase/contexts/index.d.ts +2 -0
- package/components/WindowBase/helpers.d.ts +22 -0
- package/components/{areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions/helper.js → WindowBase/helpers.js} +17 -13
- package/components/{areas → WindowBase}/hooks/useDynamicMFParameters/index.js +9 -1
- package/components/{areas → WindowBase}/hooks/useWindowToolsMF/index.js +1 -1
- package/components/WindowBase/index.d.ts +5 -0
- package/components/WindowBase/slots/WindowBaseEnum.d.ts +2 -1
- package/components/WindowBase/slots/WindowBaseEnum.js +1 -0
- package/components/WindowBase/slots/WindowBaseSlots.d.ts +45 -14
- package/components/WindowBase/slots/WindowBaseSlots.js +10 -5
- package/components/{areas/components/AreasViewer/subcomponents/Area/subcomponents/Window → WindowBase}/subcomponents/Component/index.d.ts +1 -1
- package/components/{areas/components/AreasViewer/subcomponents/Area/subcomponents/Window → WindowBase}/subcomponents/Component/index.js +6 -6
- package/components/WindowBase/subcomponents/Component/types.d.ts +9 -0
- package/components/WindowBase/subcomponents/EditionInfo/EditionInfo.js +1 -1
- package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +52 -24
- package/components/WindowBase/subcomponents/Header/types.d.ts +1 -38
- package/components/WindowBase/subcomponents/MicroFrontend/MicroFrontend.d.ts +8 -0
- package/components/WindowBase/subcomponents/MicroFrontend/MicroFrontend.js +10 -0
- package/components/WindowBase/subcomponents/MicroFrontend/types.d.ts +8 -0
- package/components/WindowBase/types.d.ts +52 -18
- package/components/WindowConfirm/WindowConfirm.js +1 -1
- package/components/areas/components/AreasAdmin/slots/AreasAdminSlots.d.ts +2 -2
- package/components/areas/components/AreasViewer/AreasViewer.d.ts +1 -1
- package/components/areas/components/AreasViewer/AreasViewer.js +7 -9
- package/components/areas/components/AreasViewer/AreasViewer.styles.js +12 -11
- package/components/areas/components/AreasViewer/slots/AreasViewerEnum.d.ts +2 -2
- package/components/areas/components/AreasViewer/slots/AreasViewerEnum.js +1 -1
- package/components/areas/components/AreasViewer/slots/AreasViewerSlots.d.ts +3 -3
- package/components/areas/components/AreasViewer/slots/AreasViewerSlots.js +6 -5
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.js +44 -4
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.d.ts +7 -5
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +9 -9
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions.d.ts +12 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions.js +58 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.d.ts +6 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.js +88 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/{useWindow/useWindow.d.ts → useWindow.d.ts} +7 -7
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/{useWindow/useWindow.js → useWindow.js} +13 -11
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/types.d.ts +7 -3
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowModal/WindowModal.d.ts +5 -4
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowModal/WindowModal.js +25 -25
- package/components/areas/components/AreasViewer/types.d.ts +3 -1
- package/components/areas/components/index.d.ts +1 -1
- package/components/areas/constants.d.ts +1 -0
- package/components/areas/constants.js +3 -1
- package/components/areas/contexts/AreasContext/helpers/generateModuleCount.d.ts +2 -2
- package/components/areas/contexts/AreasContext/helpers/getWindowForAreaTest.d.ts +2 -2
- package/components/areas/contexts/AreasContext/helpers/helper.d.ts +4 -4
- package/components/areas/contexts/AreasContext/helpers/helper.js +6 -8
- package/components/areas/contexts/AreasContext/helpers/selectLayout.d.ts +6 -0
- package/components/areas/contexts/AreasContext/helpers/selectLayout.js +27 -0
- package/components/areas/contexts/AreasContext/index.d.ts +4 -4
- package/components/areas/contexts/AreasContext/index.js +24 -4
- package/components/areas/contexts/AreasContext/store.d.ts +4 -4
- package/components/areas/contexts/AreasContext/store.js +128 -86
- package/components/areas/contexts/AreasContext/types.d.ts +142 -31
- package/components/areas/contexts/index.d.ts +0 -6
- package/components/areas/hooks/index.d.ts +0 -2
- package/components/areas/hooks/useAreas/index.d.ts +5 -5
- package/components/areas/hooks/useSetWindowsTitle/useSetWindowsTitle.js +2 -2
- package/components/areas/types.d.ts +109 -100
- package/components/extended/React-Resizable/Resizable/Resizable.js +2 -1
- package/components/extended/React-Resizable/Resizable/slots/ResizableSlots.d.ts +1 -1
- package/components/extended/React-Resizable/ResizableBox/slots/ResizableBoxSlots.d.ts +1 -1
- package/components/extended/React-Resizable/helpers.d.ts +6 -1
- package/components/extended/React-Resizable/helpers.js +11 -2
- package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxSlots.d.ts +1 -1
- package/components/hook-form/RHFPeriod/slots/RHFPeriodSlots.d.ts +2 -2
- package/components/hook-form/RHFSelect/slots/RHFSlots.d.ts +1 -1
- package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +1 -1
- package/components/hook-form/RHFTextFieldPassword/slots/RHFTextFieldPasswordSlots.d.ts +2 -2
- package/components/index.d.ts +1 -0
- package/components/mui_extended/Accordion/slots/AccordionSlots.d.ts +2 -2
- package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.d.ts +4 -4
- package/components/mui_extended/Avatar/slots/AvatarSlots.d.ts +1 -1
- package/components/mui_extended/Badge/slots/BadgeSlots.d.ts +1 -1
- package/components/mui_extended/Button/slots/ButtonSlots.d.ts +1 -1
- package/components/mui_extended/CheckBox/slots/CheckBoxSlots.d.ts +1 -1
- package/components/mui_extended/DateTimePicker/slots/DateTimePickerSlots.d.ts +4 -4
- package/components/mui_extended/Divider/slots/DividerSlots.d.ts +1 -1
- package/components/mui_extended/IconButton/slots/IconButtonSlots.d.ts +2 -2
- package/components/mui_extended/LoadingButton/slots/LoadingButtonSlots.d.ts +1 -1
- package/components/mui_extended/MenuDivider/slots/MenuDividerSlots.d.ts +1 -1
- package/components/mui_extended/MenuItem/slots/MenuItemSlots.d.ts +1 -1
- package/components/mui_extended/MenuItem/types.d.ts +1 -1
- package/components/mui_extended/Popper/slots/PopperStlots.d.ts +1 -1
- package/components/mui_extended/Select/slots/SelectSlots.d.ts +2 -2
- package/components/mui_extended/Select/slots/SelectSlots.js +1 -1
- package/components/mui_extended/Skeleton/Slots/skeletonSlots.d.ts +1 -1
- package/components/mui_extended/Stack/slots/StackSlot.d.ts +1 -1
- package/components/mui_extended/Tab/Slots/TabSlots.d.ts +1 -1
- package/components/mui_extended/Tabs/slots/TabsSlots.d.ts +1 -1
- package/components/mui_extended/TextField/slots/TextFieldSlots.d.ts +1 -1
- package/components/mui_extended/TimePicker/slots/TimePickerSlots.d.ts +3 -3
- package/components/mui_extended/ToggleButton/slots/ToggleButtonSlots.d.ts +1 -1
- package/components/mui_extended/ToggleIconButton/slots/ToggleIconButtonSlots.d.ts +1 -1
- package/components/mui_extended/Typography/slots/typographySlots.d.ts +1 -1
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/PopupsContext.d.ts +8 -2
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/PopupsContext.js +6 -24
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/store.d.ts +9 -3
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/store.js +278 -211
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/tests/PopupContext.test.d.ts +1 -0
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/tests/PopusContext.store.test.d.ts +1 -0
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/tests/__mocks__/storeMock.d.ts +29 -0
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +183 -79
- package/components/popups/components/PopupsProvider/hooks/{useHeaderActionsPopups/useHeaderActionsPopups.d.ts → useHeaderActionsPopups.d.ts} +2 -8
- package/components/popups/components/PopupsProvider/hooks/useHeaderActionsPopups.js +60 -0
- package/components/popups/components/PopupsProvider/hooks/usePopups.d.ts +43 -0
- package/components/popups/components/PopupsProvider/hooks/usePopups.js +138 -0
- package/components/popups/components/PopupsProvider/hooks/usePopupsStore.d.ts +5 -0
- package/components/popups/components/PopupsProvider/hooks/{usePopupsStore/index.js → usePopupsStore.js} +1 -1
- package/components/popups/components/PopupsViewer/PopupsViewer.d.ts +13 -4
- package/components/popups/components/PopupsViewer/PopupsViewer.js +27 -6
- package/components/popups/components/PopupsViewer/PopupsViewer.styles.js +3 -11
- package/components/popups/components/PopupsViewer/slots/popupsViewerSlots.d.ts +7 -10
- package/components/popups/components/PopupsViewer/slots/popupsViewerSlots.js +3 -8
- package/components/popups/components/PopupsViewer/slots/slots.d.ts +1 -2
- package/components/popups/components/PopupsViewer/slots/slots.js +0 -1
- package/components/popups/components/PopupsViewer/subcomponents/Popup/Popup.d.ts +1 -1
- package/components/popups/components/PopupsViewer/subcomponents/Popup/Popup.js +69 -53
- package/components/popups/components/PopupsViewer/subcomponents/Popup/types.d.ts +16 -0
- package/components/popups/components/PopupsViewer/tests/PopupsViewer.integration.test.d.ts +1 -0
- package/components/popups/components/PopupsViewer/types.d.ts +13 -5
- package/contexts/AppearanceComponentContext/AppearanceComponentContext.d.ts +8 -0
- package/contexts/AppearanceComponentContext/AppearanceComponentContext.js +4 -3
- package/contexts/AppearanceComponentContext/AppearanceComponentStore.d.ts +8 -1
- package/contexts/AppearanceComponentContext/AppearanceComponentStore.js +10 -3
- package/contexts/index.d.ts +1 -1
- package/hooks/useDataGridPersistence/useDataGridPersistence.js +4 -4
- package/hooks/useDynamicFilterAndSort/types.d.ts +1 -1
- package/hooks/useSizeContainer/index.js +2 -2
- package/index.js +91 -85
- package/not_recognized/index.js +1280 -0
- package/package.json +2 -1
- package/storybook/components/Areas/AreasViewer/{AreasViewr.stories.d.ts → AreasViewer.stories.d.ts} +2 -2
- package/storybook/components/Areas/AreasViewer/hooks/useWindowsActions.d.ts +4 -0
- package/storybook/components/Areas/AreasViewer/subcomponents/AreasViewerRender.d.ts +4 -0
- package/storybook/components/Areas/AreasViewer/subcomponents/Launcher/Launcher.d.ts +5 -0
- package/storybook/components/Areas/AreasViewer/subcomponents/Launcher/PopupButton.d.ts +21 -0
- package/storybook/components/Areas/AreasViewer/subcomponents/Launcher/PopupContentExample.d.ts +4 -0
- package/storybook/components/Areas/AreasViewer/subcomponents/layouts/ClientsLayout.d.ts +4 -0
- package/storybook/components/Areas/AreasViewer/subcomponents/layouts/UsersLayout.d.ts +4 -0
- package/storybook/components/DragResizeWindowRND/stories/DragResizeWindowRND.stories.d.ts +8 -0
- package/storybook/components/DragResizeWindowRND/stories/constants.d.ts +3 -0
- package/storybook/components/DragResizeWindowRND/stories/subcomponents/ContentExample.d.ts +4 -0
- package/storybook/components/DragResizeWindowRND/stories/subcomponents/RNDWindowsContainer/RNDWindowsContainer.d.ts +5 -0
- package/storybook/components/DragResizeWindowRND/stories/subcomponents/RNDWindowsContainer/index.d.ts +1 -0
- package/storybook/components/DragResizeWindowRND/stories/subcomponents/RNDWindowsContainer/types.d.ts +4 -0
- package/storybook/components/{Areas/AreasViewer → DragResizeWindowRND/stories}/subcomponents/WithExtendedContainer.d.ts +1 -1
- package/storybook/components/DragResizeWindowRND/stories/types.d.ts +3 -0
- package/storybook/components/PopupsViewer/basic.stories.d.ts +12 -2
- package/storybook/components/PopupsViewer/subcomponents/PopupActions.d.ts +3 -1
- package/storybook/components/PopupsViewer/subcomponents/PopupContentExample.d.ts +2 -1
- package/storybook/components/PopupsViewer/subcomponents/initialPopups.d.ts +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions/helper.d.ts +0 -22
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions/useHeaderActions.d.ts +0 -28
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions/useHeaderActions.js +0 -155
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Component/types.d.ts +0 -10
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/MicroFrontend.d.ts +0 -8
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/MicroFrontend.js +0 -10
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/types.d.ts +0 -8
- package/components/popups/components/PopupsProvider/hooks/useHeaderActionsPopups/helper.d.ts +0 -28
- package/components/popups/components/PopupsProvider/hooks/useHeaderActionsPopups/helper.js +0 -44
- package/components/popups/components/PopupsProvider/hooks/useHeaderActionsPopups/useHeaderActionsPopups.js +0 -157
- package/components/popups/components/PopupsProvider/hooks/usePopops/usePopups.d.ts +0 -28
- package/components/popups/components/PopupsProvider/hooks/usePopops/usePopups.js +0 -117
- package/components/popups/components/PopupsProvider/hooks/usePopupsStore/index.d.ts +0 -6
- package/storybook/components/Areas/AreasViewer/subcomponents/ClientsHeaderActions.d.ts +0 -4
- package/storybook/components/Areas/AreasViewer/subcomponents/UsersHeaderActions.d.ts +0 -4
- /package/components/{popups/components/PopupsProvider/tests/PopupsProvider.test.d.ts → DragResizeWindowRND/tests/DragResizeWindow.test.d.ts} +0 -0
- /package/components/{areas/contexts/DynamicMFParmsContext/index.d.ts → WindowBase/contexts/DynamicMFParmsContext/DynamicMFParmsContext.d.ts} +0 -0
- /package/components/{areas → WindowBase}/contexts/DynamicMFParmsContext/store.js +0 -0
- /package/components/{areas → WindowBase}/contexts/DynamicMFParmsContext/types.d.ts +0 -0
- /package/components/{areas/contexts/WindowToolsMFContext/index.d.ts → WindowBase/contexts/WindowToolsMFContext/WindowToolsMFContext.d.ts} +0 -0
- /package/components/{areas → WindowBase}/hooks/useDynamicMFParameters/index.d.ts +0 -0
- /package/components/{areas → WindowBase}/hooks/useWindowToolsMF/index.d.ts +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PopupsViewerProps } from './types';
|
|
1
2
|
/**
|
|
2
3
|
* Componente PopupsViewer
|
|
3
4
|
*
|
|
@@ -10,12 +11,12 @@
|
|
|
10
11
|
*
|
|
11
12
|
* - **Estado de popups:**
|
|
12
13
|
* Se obtienen los identificadores de los popups activos desde el store mediante `usePopupsStore`,
|
|
13
|
-
* filtrando aquellos popups cuyo estado no sea `'closing'
|
|
14
|
+
* filtrando aquellos popups cuyo estado no sea `'closing'` y que pertenezcan al grupo especificado. Además, se obtiene el valor de `baseZindex`
|
|
14
15
|
* para establecer la jerarquía de apilamiento (z-index) de los popups.
|
|
15
16
|
*
|
|
16
17
|
* - **Contenedor:**
|
|
17
|
-
* Se recupera el elemento contenedor a través del método `
|
|
18
|
-
* no están disponibles, el componente retorna `null` y no se renderiza nada.
|
|
18
|
+
* Se recupera el elemento contenedor a través del método `getContainerElement` del store. Si el contenedor o su tamaño
|
|
19
|
+
* no están disponibles, el componente retorna `null` y no se renderiza nada. Normalmente este se establece cuando ya se renderizo este a través de un ref personalizado.
|
|
19
20
|
*
|
|
20
21
|
* - **Animaciones:**
|
|
21
22
|
* Cada popup se envuelve en un componente `CSSTransition` para gestionar las animaciones. Se definen
|
|
@@ -26,5 +27,13 @@
|
|
|
26
27
|
* Los popups se renderizan dentro de un `TransitionGroup` que gestiona la secuencia de aparición y salida de
|
|
27
28
|
* cada popup. El componente `Popup` recibe propiedades como `popupId`, el contenedor y su tamaño, lo que permite
|
|
28
29
|
* que cada popup se posicione correctamente en la pantalla.
|
|
30
|
+
*
|
|
31
|
+
* - **Remoción de popups:**
|
|
32
|
+
* Cuando se cierra un popup se espera a que finalice la animación de salida, una vez termina,
|
|
33
|
+
* se invoca la función `removePopup` para que se pueda eliminar el popup del store.
|
|
34
|
+
* Importante:
|
|
35
|
+
* Cuando se destruye el componente `PopupsViewer`, se eliminan todos los popups del grupo especificado,
|
|
36
|
+
* invocando la función `removeAllPopupsByGroupId` debido a que las transiciones de salida no se ejecutaran.
|
|
29
37
|
*/
|
|
30
|
-
export declare const PopupsViewer: () => import("react/jsx-runtime").JSX.Element | null;
|
|
38
|
+
export declare const PopupsViewer: (props: PopupsViewerProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
39
|
+
export declare const MemonizePopupsViewer: import('react').MemoExoticComponent<(props: PopupsViewerProps) => import("react/jsx-runtime").JSX.Element | null>;
|
|
@@ -2,18 +2,30 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { TransitionGroup, CSSTransition } from "react-transition-group";
|
|
3
3
|
import { shallow } from "zustand/shallow";
|
|
4
4
|
import { P as Popup } from "./subcomponents/Popup/Popup.js";
|
|
5
|
-
import { u as usePopupsStore } from "../PopupsProvider/hooks/usePopupsStore
|
|
5
|
+
import { u as usePopupsStore } from "../PopupsProvider/hooks/usePopupsStore.js";
|
|
6
6
|
import { u as useSizeContainer } from "../../../../hooks/useSizeContainer/index.js";
|
|
7
7
|
import { R as RootStyled } from "./slots/popupsViewerSlots.js";
|
|
8
|
-
|
|
8
|
+
import { useRef, createRef, useEffect, memo } from "react";
|
|
9
|
+
const PopupsViewer = (props) => {
|
|
10
|
+
const { groupId = "global", onResizeStart, onResizeStop, onDragStart, onDragStop, containerElement } = props;
|
|
9
11
|
const popupsIds = usePopupsStore(
|
|
10
|
-
(state) => state.popupsIds.filter((pId) => state.hashPopups[pId].status !== "closing"),
|
|
12
|
+
(state) => state.popupsIds.filter((pId) => groupId === state.hashPopups[pId].groupId && state.hashPopups[pId].status !== "closing"),
|
|
11
13
|
shallow
|
|
12
14
|
);
|
|
15
|
+
const popupRefsMap = useRef({});
|
|
16
|
+
popupsIds.forEach((id) => {
|
|
17
|
+
if (!popupRefsMap.current[id]) {
|
|
18
|
+
popupRefsMap.current[id] = createRef();
|
|
19
|
+
}
|
|
20
|
+
});
|
|
13
21
|
const baseZindex = usePopupsStore((state) => state.baseZindex, shallow);
|
|
14
|
-
const
|
|
15
|
-
const { removePopup } = usePopupsStore((state) => state.popupsActions, shallow);
|
|
22
|
+
const { removePopup, removeAllPopupsByGroupId } = usePopupsStore((state) => state.popupsActions, shallow);
|
|
16
23
|
const containerSize = useSizeContainer(containerElement);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
return () => {
|
|
26
|
+
removeAllPopupsByGroupId(groupId);
|
|
27
|
+
};
|
|
28
|
+
}, [groupId, removeAllPopupsByGroupId]);
|
|
17
29
|
if (!containerElement || !containerSize) {
|
|
18
30
|
return null;
|
|
19
31
|
}
|
|
@@ -22,19 +34,26 @@ const PopupsViewer = () => {
|
|
|
22
34
|
CSSTransition,
|
|
23
35
|
{
|
|
24
36
|
timeout: { appear: 0, enter: 1300, exit: 0 },
|
|
37
|
+
nodeRef: popupRefsMap.current[id],
|
|
25
38
|
unmountOnExit: true,
|
|
39
|
+
onEntered: () => {
|
|
40
|
+
},
|
|
26
41
|
onExited: () => {
|
|
27
42
|
removePopup(id);
|
|
28
43
|
},
|
|
29
44
|
classNames: {
|
|
30
45
|
enter: "fade-enter",
|
|
31
|
-
// Clases para la animación de entrada
|
|
32
46
|
enterActive: "fade-enter-active",
|
|
33
47
|
enterDone: "fade-enter-done"
|
|
34
48
|
},
|
|
35
49
|
children: /* @__PURE__ */ jsx(
|
|
36
50
|
Popup,
|
|
37
51
|
{
|
|
52
|
+
ref: popupRefsMap.current[id],
|
|
53
|
+
onResizeStart,
|
|
54
|
+
onResizeStop,
|
|
55
|
+
onDragStart,
|
|
56
|
+
onDragStop,
|
|
38
57
|
"data-testid": "popup",
|
|
39
58
|
popupId: id,
|
|
40
59
|
containerElement,
|
|
@@ -47,6 +66,8 @@ const PopupsViewer = () => {
|
|
|
47
66
|
);
|
|
48
67
|
}) }) });
|
|
49
68
|
};
|
|
69
|
+
const MemonizePopupsViewer = memo(PopupsViewer);
|
|
50
70
|
export {
|
|
71
|
+
MemonizePopupsViewer as M,
|
|
51
72
|
PopupsViewer as P
|
|
52
73
|
};
|
|
@@ -15,7 +15,9 @@ const popupsViewerStyles = {
|
|
|
15
15
|
zIndex: ownerState.baseZindex || 0
|
|
16
16
|
}),
|
|
17
17
|
/**
|
|
18
|
-
* TODO: Documentar
|
|
18
|
+
* TODO: Documentar global: {
|
|
19
|
+
* id: 'global',
|
|
20
|
+
* },
|
|
19
21
|
*/
|
|
20
22
|
popupDragWindowRoot: ({ theme, ownerState }) => ({
|
|
21
23
|
display: "flex",
|
|
@@ -45,9 +47,6 @@ const popupsViewerStyles = {
|
|
|
45
47
|
...ownerState?.status === "hidden" ? {
|
|
46
48
|
visibility: "hidden",
|
|
47
49
|
pointerEvents: "none"
|
|
48
|
-
} : {},
|
|
49
|
-
...ownerState?.variant === "small" ? {
|
|
50
|
-
border: "1px solid red"
|
|
51
50
|
} : {}
|
|
52
51
|
}),
|
|
53
52
|
/**
|
|
@@ -105,13 +104,6 @@ const popupsViewerStyles = {
|
|
|
105
104
|
display: "flex",
|
|
106
105
|
position: "relative",
|
|
107
106
|
overflow: "auto"
|
|
108
|
-
}),
|
|
109
|
-
/**
|
|
110
|
-
* TODO: Documentar
|
|
111
|
-
*/
|
|
112
|
-
windowBaseContent: ({ theme, ownerState }) => ({
|
|
113
|
-
width: "100%",
|
|
114
|
-
height: ownerState.collapsed ? `${theme.vars.size.baseSpacings["sp10-5"]}` : "100%"
|
|
115
107
|
})
|
|
116
108
|
};
|
|
117
109
|
export {
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
export declare const RootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> &
|
|
1
|
+
export declare const RootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
2
2
|
ownerState: Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown>;
|
|
3
3
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
4
|
-
export declare const PopupDragWindowRootStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../../
|
|
4
|
+
export declare const PopupDragWindowRootStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../../../DragResizeWindowRND/types').DragResizeWindowPropsRND, "ref"> & import('react').RefAttributes<import('../../../../DragResizeWindowRND/types').DragResizeWindowRefHandler>, string | number> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
5
5
|
ownerState: Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown>;
|
|
6
6
|
}, {}, {}>;
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const PopupHeaderContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
8
8
|
ownerState: Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown>;
|
|
9
9
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
10
|
-
export declare const
|
|
11
|
-
ownerState: Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown>;
|
|
12
|
-
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
13
|
-
export declare const PopupHeaderTitleStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown> & {
|
|
10
|
+
export declare const PopupHeaderTitleStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
14
11
|
ownerState: Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown>;
|
|
15
12
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof import('react').ClassAttributes<HTMLSpanElement> | keyof import('react').HTMLAttributes<HTMLSpanElement>>, {}>;
|
|
16
|
-
export declare const PopupHeaderSubTitleStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> &
|
|
13
|
+
export declare const PopupHeaderSubTitleStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
17
14
|
ownerState: Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown>;
|
|
18
15
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof import('react').ClassAttributes<HTMLSpanElement> | keyof import('react').HTMLAttributes<HTMLSpanElement>>, {}>;
|
|
19
|
-
export declare const PopupContentRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> &
|
|
16
|
+
export declare const PopupContentRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
20
17
|
ownerState: Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown>;
|
|
21
18
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
22
|
-
export declare const PopupContentWrapperStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> &
|
|
19
|
+
export declare const PopupContentWrapperStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
23
20
|
ownerState: Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown>;
|
|
24
21
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
@@ -2,18 +2,14 @@ import { styled } from "@mui/material/styles";
|
|
|
2
2
|
import { P as POPUPS_VIEWER_KEY_COMPONENT } from "../constants.js";
|
|
3
3
|
import { p as popupsViewerStyles } from "../PopupsViewer.styles.js";
|
|
4
4
|
import { P as PopupViewerSlots } from "./slots.js";
|
|
5
|
-
import { D as
|
|
5
|
+
import { D as DragResizeWindowRND } from "../../../../DragResizeWindowRND/DragResizeWindowRND.js";
|
|
6
6
|
const RootStyled = styled("div", { name: POPUPS_VIEWER_KEY_COMPONENT, slot: PopupViewerSlots.root })(
|
|
7
7
|
popupsViewerStyles?.root
|
|
8
8
|
);
|
|
9
|
-
const PopupDragWindowRootStyled = styled(
|
|
9
|
+
const PopupDragWindowRootStyled = styled(DragResizeWindowRND, {
|
|
10
10
|
name: POPUPS_VIEWER_KEY_COMPONENT,
|
|
11
11
|
slot: PopupViewerSlots.popupDragWindowRoot
|
|
12
12
|
})(popupsViewerStyles?.popupDragWindowRoot);
|
|
13
|
-
const WindowBaseContentStyled = styled("div", {
|
|
14
|
-
name: POPUPS_VIEWER_KEY_COMPONENT,
|
|
15
|
-
slot: PopupViewerSlots.windowBaseContent
|
|
16
|
-
})(popupsViewerStyles?.windowBaseContent);
|
|
17
13
|
styled("div", {
|
|
18
14
|
name: POPUPS_VIEWER_KEY_COMPONENT,
|
|
19
15
|
slot: PopupViewerSlots.pDWHeaderContainer
|
|
@@ -36,6 +32,5 @@ styled("div", {
|
|
|
36
32
|
})(popupsViewerStyles?.pDWContentWrapper);
|
|
37
33
|
export {
|
|
38
34
|
PopupDragWindowRootStyled as P,
|
|
39
|
-
RootStyled as R
|
|
40
|
-
WindowBaseContentStyled as W
|
|
35
|
+
RootStyled as R
|
|
41
36
|
};
|
|
@@ -5,6 +5,5 @@ export declare enum PopupViewerSlots {
|
|
|
5
5
|
pDWHeaderTitle = "pDWHeaderTitle",
|
|
6
6
|
pDWHeaderSubTitle = "pDWHeaderSubTitle",
|
|
7
7
|
pDWContentRoot = "pDWContentRoot",
|
|
8
|
-
pDWContentWrapper = "pDWContentWrapper"
|
|
9
|
-
windowBaseContent = "windowBaseContent"
|
|
8
|
+
pDWContentWrapper = "pDWContentWrapper"
|
|
10
9
|
}
|
|
@@ -6,7 +6,6 @@ var PopupViewerSlots = /* @__PURE__ */ ((PopupViewerSlots2) => {
|
|
|
6
6
|
PopupViewerSlots2["pDWHeaderSubTitle"] = "pDWHeaderSubTitle";
|
|
7
7
|
PopupViewerSlots2["pDWContentRoot"] = "pDWContentRoot";
|
|
8
8
|
PopupViewerSlots2["pDWContentWrapper"] = "pDWContentWrapper";
|
|
9
|
-
PopupViewerSlots2["windowBaseContent"] = "windowBaseContent";
|
|
10
9
|
return PopupViewerSlots2;
|
|
11
10
|
})(PopupViewerSlots || {});
|
|
12
11
|
export {
|
|
@@ -6,4 +6,4 @@ import { PopupProps } from './types';
|
|
|
6
6
|
* @param props
|
|
7
7
|
* @returns
|
|
8
8
|
*/
|
|
9
|
-
export declare const Popup: import('react').ForwardRefExoticComponent<PopupProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export declare const Popup: import('react').ForwardRefExoticComponent<PopupProps & import('react').RefAttributes<HTMLDivElement | undefined>>;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
2
|
+
import { forwardRef, useRef, useEffect } from "react";
|
|
3
3
|
import { shallow } from "zustand/shallow";
|
|
4
|
-
import { u as usePopupsStore } from "../../../PopupsProvider/hooks/usePopupsStore
|
|
5
|
-
import { P as PopupDragWindowRootStyled
|
|
6
|
-
import {
|
|
7
|
-
import { C as Component } from "../../../../../areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Component/index.js";
|
|
8
|
-
import { u as usePopups } from "../../../PopupsProvider/hooks/usePopops/usePopups.js";
|
|
4
|
+
import { u as usePopupsStore } from "../../../PopupsProvider/hooks/usePopupsStore.js";
|
|
5
|
+
import { P as PopupDragWindowRootStyled } from "../../slots/popupsViewerSlots.js";
|
|
6
|
+
import { u as usePopups } from "../../../PopupsProvider/hooks/usePopups.js";
|
|
9
7
|
import { T as TEST_PROP_ID } from "../../../../../../test/constants_no_mock.js";
|
|
10
8
|
import { a as POPUPS_VIEWER_CLASS_NAME } from "../../constants.js";
|
|
11
9
|
import { a as getNameDataTestId } from "../../../../../../test/getNameDataTestId.js";
|
|
10
|
+
import { M as MemonizedWindowBaseMicroFrontend } from "../../../../../WindowBase/subcomponents/MicroFrontend/MicroFrontend.js";
|
|
11
|
+
import { W as WindowBaseComponent } from "../../../../../WindowBase/subcomponents/Component/index.js";
|
|
12
12
|
import { W as WindowBase } from "../../../../../WindowBase/WindowBase.js";
|
|
13
13
|
const Popup = forwardRef((props, ref) => {
|
|
14
|
-
const { popupId, containerElement, containerSize, style } = props;
|
|
14
|
+
const { popupId, containerElement, containerSize, style, onResizeStart, onResizeStop, onDragStart, onDragStop } = props;
|
|
15
15
|
const popup = usePopupsStore((state) => state.hashPopups[popupId], shallow);
|
|
16
|
-
const {
|
|
17
|
-
const {
|
|
16
|
+
const { bringPopupOnFront } = usePopupsStore((state) => state.popupsActions, shallow);
|
|
17
|
+
const { close } = usePopupsStore((state) => state.popupActions, shallow);
|
|
18
|
+
const refHandler = useRef(null);
|
|
18
19
|
const { collapsed, maximized } = usePopupsStore(
|
|
19
20
|
(state) => ({
|
|
20
21
|
collapsed: state.hashPopups[popupId]?.collapsed || false,
|
|
@@ -34,9 +35,7 @@ const Popup = forwardRef((props, ref) => {
|
|
|
34
35
|
//onTouch,
|
|
35
36
|
memoizedActions,
|
|
36
37
|
loading,
|
|
37
|
-
version
|
|
38
|
-
} = usePopups(popupId);
|
|
39
|
-
const {
|
|
38
|
+
version,
|
|
40
39
|
status,
|
|
41
40
|
subTitle,
|
|
42
41
|
editionInfo,
|
|
@@ -47,8 +46,15 @@ const Popup = forwardRef((props, ref) => {
|
|
|
47
46
|
defaultPosition,
|
|
48
47
|
bounds,
|
|
49
48
|
onMouseDown,
|
|
49
|
+
allowHeightResizeContainer,
|
|
50
|
+
allowWidthResizeContainer,
|
|
51
|
+
maxHeight,
|
|
52
|
+
maxWidth,
|
|
53
|
+
minHeight,
|
|
54
|
+
minWidth,
|
|
55
|
+
selected,
|
|
50
56
|
...others
|
|
51
|
-
} =
|
|
57
|
+
} = usePopups(popupId);
|
|
52
58
|
const ownerState = {
|
|
53
59
|
status,
|
|
54
60
|
variant,
|
|
@@ -59,11 +65,16 @@ const Popup = forwardRef((props, ref) => {
|
|
|
59
65
|
maximized
|
|
60
66
|
};
|
|
61
67
|
const onMouseDownLocal = (e) => {
|
|
62
|
-
|
|
68
|
+
bringPopupOnFront(popupId);
|
|
63
69
|
if (onMouseDown) {
|
|
64
70
|
onMouseDown(e);
|
|
65
71
|
}
|
|
66
72
|
};
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
if (popup.enforceVisibleCount && popup.enforceVisibleCount > 0) {
|
|
75
|
+
refHandler.current?.ensureVisible();
|
|
76
|
+
}
|
|
77
|
+
}, [popup.enforceVisibleCount, popupId]);
|
|
67
78
|
if (!popup) {
|
|
68
79
|
return null;
|
|
69
80
|
}
|
|
@@ -71,57 +82,62 @@ const Popup = forwardRef((props, ref) => {
|
|
|
71
82
|
PopupDragWindowRootStyled,
|
|
72
83
|
{
|
|
73
84
|
ownerState,
|
|
74
|
-
ref,
|
|
85
|
+
windowRef: ref,
|
|
86
|
+
ref: refHandler,
|
|
87
|
+
onResizeStart,
|
|
88
|
+
onResizeStop,
|
|
89
|
+
onDragStart,
|
|
90
|
+
onDragStop,
|
|
75
91
|
hidden: popup.status === "hidden",
|
|
76
92
|
onMouseDown: onMouseDownLocal,
|
|
77
93
|
containerElement,
|
|
78
94
|
containerSize,
|
|
79
95
|
bounds,
|
|
80
96
|
draggable,
|
|
81
|
-
|
|
97
|
+
resizable,
|
|
82
98
|
defaultPosition,
|
|
83
99
|
style: { ...style, zIndex },
|
|
100
|
+
allowHeightResizeContainer,
|
|
101
|
+
allowWidthResizeContainer,
|
|
102
|
+
maxHeight,
|
|
103
|
+
maxWidth,
|
|
104
|
+
minHeight,
|
|
105
|
+
minWidth,
|
|
84
106
|
...others,
|
|
85
107
|
children: /* @__PURE__ */ jsx(
|
|
86
|
-
|
|
108
|
+
WindowBase,
|
|
87
109
|
{
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
110
|
+
...others,
|
|
111
|
+
version,
|
|
112
|
+
onClose: () => close(popupId),
|
|
113
|
+
title: title ?? "",
|
|
114
|
+
subTitle,
|
|
115
|
+
iconUrl,
|
|
116
|
+
editionInfo,
|
|
117
|
+
actions: memoizedActions,
|
|
118
|
+
isLoading: loading,
|
|
119
|
+
windowId: popupId,
|
|
120
|
+
selected,
|
|
121
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
122
|
+
[TEST_PROP_ID]: getNameDataTestId(
|
|
123
|
+
POPUPS_VIEWER_CLASS_NAME,
|
|
124
|
+
"root"
|
|
125
|
+
)
|
|
126
|
+
} : {},
|
|
127
|
+
children: winType === "microfrontend" ? /* @__PURE__ */ jsx(
|
|
128
|
+
MemonizedWindowBaseMicroFrontend,
|
|
129
|
+
{
|
|
130
|
+
moduleId,
|
|
131
|
+
dynamicMFStore,
|
|
132
|
+
windowTools,
|
|
133
|
+
...mfProps ?? { debugPort: 0, prefix: "" }
|
|
134
|
+
}
|
|
135
|
+
) : /* @__PURE__ */ jsx(
|
|
136
|
+
WindowBaseComponent,
|
|
91
137
|
{
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
title: title ?? "",
|
|
96
|
-
subTitle,
|
|
97
|
-
iconUrl,
|
|
98
|
-
editionInfo,
|
|
99
|
-
actions: memoizedActions,
|
|
100
|
-
isLoading: loading,
|
|
101
|
-
windowId: popupId,
|
|
102
|
-
...process.env.NODE_ENV !== "production" ? {
|
|
103
|
-
[TEST_PROP_ID]: getNameDataTestId(
|
|
104
|
-
POPUPS_VIEWER_CLASS_NAME,
|
|
105
|
-
"root"
|
|
106
|
-
)
|
|
107
|
-
} : {},
|
|
108
|
-
children: winType === "microfrontend" ? /* @__PURE__ */ jsx(
|
|
109
|
-
MemonizedMicroFrontend,
|
|
110
|
-
{
|
|
111
|
-
moduleId,
|
|
112
|
-
dynamicMFStore,
|
|
113
|
-
windowTools,
|
|
114
|
-
...mfProps
|
|
115
|
-
}
|
|
116
|
-
) : /* @__PURE__ */ jsx(
|
|
117
|
-
Component,
|
|
118
|
-
{
|
|
119
|
-
moduleId,
|
|
120
|
-
dynamicMFStore,
|
|
121
|
-
windowTools,
|
|
122
|
-
component
|
|
123
|
-
}
|
|
124
|
-
)
|
|
138
|
+
dynamicMFStore,
|
|
139
|
+
windowTools,
|
|
140
|
+
component
|
|
125
141
|
}
|
|
126
142
|
)
|
|
127
143
|
}
|
|
@@ -18,4 +18,20 @@ export interface PopupProps {
|
|
|
18
18
|
* "style" Estilos del popup
|
|
19
19
|
*/
|
|
20
20
|
style?: CSSProperties;
|
|
21
|
+
/**
|
|
22
|
+
* "onResizeStart" Función que se ejecuta cuando se comienza a redimensionar el popup
|
|
23
|
+
*/
|
|
24
|
+
onResizeStart?: () => void;
|
|
25
|
+
/**
|
|
26
|
+
* "onResizeStop" Función que se ejecuta cuando se termina de redimensionar el popup
|
|
27
|
+
*/
|
|
28
|
+
onResizeStop?: () => void;
|
|
29
|
+
/**
|
|
30
|
+
* "onDragStart" Función que se ejecuta cuando se comienza a arrastrar el popup
|
|
31
|
+
*/
|
|
32
|
+
onDragStart?: () => void;
|
|
33
|
+
/**
|
|
34
|
+
* "onDragStop" Función que se ejecuta cuando se termina de arrastrar el popup
|
|
35
|
+
*/
|
|
36
|
+
onDragStop?: () => void;
|
|
21
37
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { Theme } from '@mui/material/styles';
|
|
2
|
-
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
3
2
|
import { PopupViewerSlots } from './slots/slots';
|
|
4
3
|
import { POPUPS_VIEWER_KEY_COMPONENT } from './constants';
|
|
5
|
-
import { PopupStoreProps,
|
|
4
|
+
import { PopupStoreProps, PopupsProviderStoreState } from '../PopupsProvider/contexts/PopupsContext/types';
|
|
5
|
+
import { M4LOverridesStyleRules } from '../../../../@types/augmentations';
|
|
6
6
|
export type PopupViewerSlotsType = keyof typeof PopupViewerSlots;
|
|
7
|
-
export type PopupsViewerProps = {
|
|
7
|
+
export type PopupsViewerProps = {
|
|
8
|
+
containerElement?: HTMLElement;
|
|
9
|
+
groupId?: string;
|
|
10
|
+
onResizeStart?: () => void;
|
|
11
|
+
onResizeStop?: () => void;
|
|
12
|
+
onDragStart?: () => void;
|
|
13
|
+
onDragStop?: () => void;
|
|
14
|
+
};
|
|
8
15
|
export type PopupStatus = 'init' | 'closing' | 'hidden';
|
|
9
16
|
export interface PopupOwnerState extends Pick<PopupStoreProps, 'status' | 'subTitle' | 'editionInfo' | 'zIndex' | 'variant'> {
|
|
10
17
|
/**
|
|
@@ -13,7 +20,8 @@ export interface PopupOwnerState extends Pick<PopupStoreProps, 'status' | 'subTi
|
|
|
13
20
|
isMobile?: boolean;
|
|
14
21
|
collapsed?: boolean;
|
|
15
22
|
maximized?: boolean;
|
|
23
|
+
isVisible?: boolean;
|
|
16
24
|
}
|
|
17
|
-
export interface PopupsViewerOwnerState extends Pick<
|
|
25
|
+
export interface PopupsViewerOwnerState extends Pick<PopupsProviderStoreState, 'baseZindex'>, PopupOwnerState {
|
|
18
26
|
}
|
|
19
|
-
export type PopupsViewerStyles =
|
|
27
|
+
export type PopupsViewerStyles = M4LOverridesStyleRules<PopupViewerSlotsType, typeof POPUPS_VIEWER_KEY_COMPONENT, Theme>;
|
|
@@ -11,6 +11,14 @@ export declare const AppearanceComponentContext: import('react').Context<(Omit<O
|
|
|
11
11
|
}) | null>;
|
|
12
12
|
interface AppearanceComponentContextProps extends Partial<AppearanceComponentState> {
|
|
13
13
|
children: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* "storeId" Id del store
|
|
16
|
+
*/
|
|
17
|
+
storeId?: string;
|
|
18
|
+
/**
|
|
19
|
+
* "storeDevtoolsEnabled" determina si se debe usar devtools para el store
|
|
20
|
+
*/
|
|
21
|
+
storeDevtoolsEnabled?: boolean;
|
|
14
22
|
}
|
|
15
23
|
/**
|
|
16
24
|
* TODO: Documentar
|
|
@@ -4,12 +4,13 @@ import { DEFAULT_SIZE } from "@m4l/styles";
|
|
|
4
4
|
import { c as createAppearanceComponentStore } from "./AppearanceComponentStore.js";
|
|
5
5
|
const AppearanceComponentContext = createContext(null);
|
|
6
6
|
function AppearanceComponentProvider(props) {
|
|
7
|
-
const { defaultSize, children } = props;
|
|
7
|
+
const { defaultSize, children, storeId, storeDevtoolsEnabled } = props;
|
|
8
8
|
const appearanceComponentStoreRef = useRef();
|
|
9
9
|
if (!appearanceComponentStoreRef.current) {
|
|
10
10
|
appearanceComponentStoreRef.current = createAppearanceComponentStore({
|
|
11
|
-
defaultSize: defaultSize || DEFAULT_SIZE
|
|
12
|
-
|
|
11
|
+
defaultSize: defaultSize || DEFAULT_SIZE,
|
|
12
|
+
storeId
|
|
13
|
+
}, storeDevtoolsEnabled);
|
|
13
14
|
}
|
|
14
15
|
return /* @__PURE__ */ jsx(AppearanceComponentContext.Provider, { value: appearanceComponentStoreRef.current, children });
|
|
15
16
|
}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { Sizes } from '@m4l/styles';
|
|
2
2
|
export interface AppearanceComponentState {
|
|
3
|
+
/**
|
|
4
|
+
* "storeId" Id del store
|
|
5
|
+
*/
|
|
6
|
+
storeId?: string;
|
|
7
|
+
/**
|
|
8
|
+
* "defaultSize" Tamaño por defecto
|
|
9
|
+
*/
|
|
3
10
|
defaultSize: Sizes;
|
|
4
11
|
}
|
|
5
12
|
export interface AppearanceComponentActions {
|
|
@@ -11,7 +18,7 @@ export type AppearanceComponentStore = AppearanceComponentState & AppearanceComp
|
|
|
11
18
|
/**
|
|
12
19
|
* TODO: Documentar
|
|
13
20
|
*/
|
|
14
|
-
export declare const createAppearanceComponentStore: (initProps: AppearanceComponentState) => Omit<Omit<import('zustand').StoreApi<AppearanceComponentStore>, "setState"> & {
|
|
21
|
+
export declare const createAppearanceComponentStore: (initProps: AppearanceComponentState, storeDevtoolsEnabled?: boolean) => Omit<Omit<import('zustand').StoreApi<AppearanceComponentStore>, "setState"> & {
|
|
15
22
|
setState<A extends string | {
|
|
16
23
|
type: unknown;
|
|
17
24
|
}>(partial: AppearanceComponentStore | Partial<AppearanceComponentStore> | ((state: AppearanceComponentStore) => AppearanceComponentStore | Partial<AppearanceComponentStore>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
@@ -2,9 +2,16 @@ import { createStore } from "zustand";
|
|
|
2
2
|
import { devtools } from "zustand/middleware";
|
|
3
3
|
import { immer } from "zustand/middleware/immer";
|
|
4
4
|
import { DEFAULT_SIZE } from "@m4l/styles";
|
|
5
|
-
const
|
|
5
|
+
const createDevtools = (immerMiddlewere, config) => {
|
|
6
|
+
const { enabled = false } = config;
|
|
7
|
+
if (enabled && process.env.NODE_ENV === "development") {
|
|
8
|
+
return devtools(immerMiddlewere, config);
|
|
9
|
+
}
|
|
10
|
+
return immerMiddlewere;
|
|
11
|
+
};
|
|
12
|
+
const createAppearanceComponentStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
6
13
|
return createStore(
|
|
7
|
-
|
|
14
|
+
createDevtools(
|
|
8
15
|
immer((set) => ({
|
|
9
16
|
defaultSize: initProps.defaultSize ?? DEFAULT_SIZE,
|
|
10
17
|
actions: {
|
|
@@ -18,7 +25,7 @@ const createAppearanceComponentStore = (initProps) => {
|
|
|
18
25
|
}
|
|
19
26
|
}
|
|
20
27
|
})),
|
|
21
|
-
{ name:
|
|
28
|
+
{ name: `AppearanceComponentStore: ${initProps.storeId}`, enabled: storeDevtoolsEnabled }
|
|
22
29
|
)
|
|
23
30
|
);
|
|
24
31
|
};
|
package/contexts/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { DynamicMFParmsProvider, DynamicMFParmsContext, MemonizedDynamicMFParmsProvider, } from '../components/
|
|
1
|
+
export { DynamicMFParmsProvider, DynamicMFParmsContext, MemonizedDynamicMFParmsProvider, } from '../components/WindowBase/contexts/DynamicMFParmsContext';
|
|
2
2
|
export * from './ModalContext/index';
|
|
3
3
|
export * from './ModalContext/types';
|
|
4
4
|
export type { FormInitialValues, FormStatusLoad, } from '../components/hook-form/RHFormContext/types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState, useCallback } from "react";
|
|
2
2
|
import { g as getColumnsConfigCookie } from "./helpers.js";
|
|
3
3
|
import { C as COOKIE_COLUMNS_WIDTHS, a as COOKIE_COLUMNS_CONFIG } from "./constants.js";
|
|
4
|
-
import { u as useWindowToolsMF } from "../../components/
|
|
4
|
+
import { u as useWindowToolsMF } from "../../components/WindowBase/hooks/useWindowToolsMF/index.js";
|
|
5
5
|
const useDataGridPersistence = (props) => {
|
|
6
6
|
const { prefixCookie } = props;
|
|
7
7
|
const { setCookie, getCookie } = useWindowToolsMF();
|
|
@@ -14,11 +14,11 @@ const useDataGridPersistence = (props) => {
|
|
|
14
14
|
const onChangeUserColumns = useCallback((newProps) => {
|
|
15
15
|
const { reason, userConfig } = newProps;
|
|
16
16
|
if (reason === "columnsConfig") {
|
|
17
|
-
setCookie(COOKIE_COLUMNS_CONFIG, "window", userConfig);
|
|
17
|
+
setCookie(prefixCookie ? `${prefixCookie}_${COOKIE_COLUMNS_CONFIG}` : COOKIE_COLUMNS_CONFIG, "window", userConfig);
|
|
18
18
|
} else if (reason === "columnsWidths") {
|
|
19
|
-
setCookie(COOKIE_COLUMNS_WIDTHS, "window", userConfig);
|
|
19
|
+
setCookie(prefixCookie ? `${prefixCookie}_${COOKIE_COLUMNS_WIDTHS}` : COOKIE_COLUMNS_WIDTHS, "window", userConfig);
|
|
20
20
|
}
|
|
21
|
-
}, [setCookie]);
|
|
21
|
+
}, [setCookie, prefixCookie]);
|
|
22
22
|
return {
|
|
23
23
|
onChangeUserColumns,
|
|
24
24
|
defaultUserColumns
|
|
@@ -4,7 +4,7 @@ import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
|
4
4
|
import { DynamicFilterAndSortSlots } from './slots/DynamicFilterAndSortEnum';
|
|
5
5
|
import { M4LDYNAMIC_KEY_FILTER_AND_SORT } from './constants';
|
|
6
6
|
import { Theme } from '@mui/material/styles';
|
|
7
|
-
import { WindowToolsMF } from '../../components/
|
|
7
|
+
import { WindowToolsMF } from '../../components/WindowBase';
|
|
8
8
|
interface ChangeFilter {
|
|
9
9
|
filters?: Array<InitialFilterApplied>;
|
|
10
10
|
rawFilters?: Array<RawFilterFieldApply>;
|
|
@@ -16,8 +16,8 @@ function useSizeContainer(containerElement) {
|
|
|
16
16
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
17
17
|
for (const entry of entries) {
|
|
18
18
|
throttleResize({
|
|
19
|
-
containerWidth: entry.contentRect.width,
|
|
20
|
-
containerHeight: entry.contentRect.height
|
|
19
|
+
containerWidth: Math.round(entry.contentRect.width),
|
|
20
|
+
containerHeight: Math.round(entry.contentRect.height)
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
});
|