@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,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 "../../../../../
|
|
5
|
-
|
|
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
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
60
|
-
state.
|
|
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[
|
|
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(
|
|
68
|
-
state.currentZindex
|
|
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
|
-
}
|
|
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[
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
if (
|
|
185
|
-
|
|
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
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
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
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
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 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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
|
+
}>;
|