@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/components",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.2",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"lint-staged": {
|
|
6
6
|
"*.{js,ts,tsx}": "eslint --fix --max-warnings 0 --no-warn-ignored"
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"react-intersection-observer": "^9.4.0",
|
|
43
43
|
"react-leaflet": "^4.2.1",
|
|
44
44
|
"react-resizable": "^3.0.4",
|
|
45
|
+
"react-rnd": "^10.5.2",
|
|
45
46
|
"react-router-dom": "6.3.0",
|
|
46
47
|
"react-spinners": "^0.13.8",
|
|
47
48
|
"react-toastify": "10.0.5",
|
package/storybook/components/Areas/AreasViewer/{AreasViewr.stories.d.ts → AreasViewer.stories.d.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import { PaperForm } from '../../../../src/components/PaperForm';
|
|
3
|
-
import {
|
|
4
|
-
declare const meta: Meta<typeof
|
|
3
|
+
import { AreasViewer } from '../../../../src/components/areas/components/AreasViewer/AreasViewer';
|
|
4
|
+
declare const meta: Meta<typeof AreasViewer>;
|
|
5
5
|
type Story = StoryObj<typeof PaperForm>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export default meta;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface PopupButtonProps {
|
|
3
|
+
title: string;
|
|
4
|
+
iconUrl: string;
|
|
5
|
+
dynamicParams: Record<string, any>;
|
|
6
|
+
/** Si se pasa este id, se intentará reemplazar el popup existente */
|
|
7
|
+
windowType?: 'simple_popup' | 'microfrontend_userd_add_edit_popup' | 'microfrontend_users_list_layout';
|
|
8
|
+
replaceMeId?: string;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
/** Callback para notificar que se ha generado un id, en caso de no recibir uno por props */
|
|
11
|
+
onPopupCreated?: (id: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const heightWindow = 180;
|
|
14
|
+
export declare const widthWindow = 460;
|
|
15
|
+
export declare const marginWindow = 10;
|
|
16
|
+
/**
|
|
17
|
+
* Botón que lanza un popup. Si se proporciona un replaceMeId, se usará ese id para reemplazar el popup existente;
|
|
18
|
+
* si no, se genera uno nuevo (incluyendo el currentAreaId) y se notifica al padre mediante onPopupCreated.
|
|
19
|
+
*/
|
|
20
|
+
export declare const PopupButton: React.FC<PopupButtonProps>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { DragResizeWindowRND } from '../../../../src/components/DragResizeWindowRND/DragResizeWindowRND';
|
|
3
|
+
declare const meta: Meta<typeof DragResizeWindowRND>;
|
|
4
|
+
type Story = StoryObj<typeof DragResizeWindowRND>;
|
|
5
|
+
export declare const Default: Story;
|
|
6
|
+
export declare const AllowHeightResizeContainer: Story;
|
|
7
|
+
export declare const Hidden: Story;
|
|
8
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './RNDWindowsContainer';
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { Meta } from '@storybook/react';
|
|
2
2
|
import { PopupsViewer } from '../../../src/components/popups/components/PopupsViewer/PopupsViewer';
|
|
3
|
-
import { StoryPopupsProviderType } from './types';
|
|
4
3
|
declare const meta: Meta<typeof PopupsViewer>;
|
|
5
4
|
export default meta;
|
|
6
|
-
export declare const Base:
|
|
5
|
+
export declare const Base: {
|
|
6
|
+
parameters: {
|
|
7
|
+
initialPopups: import('../../../src/components/popups/components/PopupsProvider/contexts/PopupsContext/types').PopupInitialProps[] | undefined;
|
|
8
|
+
};
|
|
9
|
+
args: {};
|
|
10
|
+
};
|
|
11
|
+
export declare const DynamicPopups: {
|
|
12
|
+
parameters: {
|
|
13
|
+
initialPopups: import('../../../src/components/popups/components/PopupsProvider/contexts/PopupsContext/types').PopupInitialProps[] | undefined;
|
|
14
|
+
};
|
|
15
|
+
args: {};
|
|
16
|
+
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Componente que define las acciones del popup
|
|
2
|
+
* Componente que define las acciones del popup.
|
|
3
|
+
* Este componente muestra un popup con acciones personalizadas, como mostrar toasts,
|
|
4
|
+
* iniciar/detener la carga y refrescar el contenido.
|
|
3
5
|
*/
|
|
4
6
|
export declare function PopupActions(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,4 +3,4 @@ export declare const heightWindow = 180;
|
|
|
3
3
|
export declare const widthWindow = 260;
|
|
4
4
|
export declare const marginWindow = 10;
|
|
5
5
|
export declare const baseInitialPopups: PopupsProviderProps['initialPopups'];
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const variantSmallInitialPopups: PopupsProviderProps['initialPopups'];
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { GetLabelType } from '@m4l/core';
|
|
2
|
-
import { AreaWindowAction, WindowOptions } from '../../../../../../../../types';
|
|
3
|
-
/**
|
|
4
|
-
* Get the main actions for the window
|
|
5
|
-
*/
|
|
6
|
-
export declare function getMainActions(isMobile: boolean | undefined, moduleActions: AreaWindowAction[]): AreaWindowAction[];
|
|
7
|
-
type GetMenuActionsType = {
|
|
8
|
-
windowId: string;
|
|
9
|
-
isMobile?: boolean;
|
|
10
|
-
moduleActions: AreaWindowAction[];
|
|
11
|
-
urlPrefix: string;
|
|
12
|
-
saveModuleCookies: (wd: string) => void;
|
|
13
|
-
resetModuleCookies: (wd: string) => void;
|
|
14
|
-
version?: string;
|
|
15
|
-
windowOptions?: WindowOptions;
|
|
16
|
-
getLabel: GetLabelType;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Get the menu actions for the window
|
|
20
|
-
*/
|
|
21
|
-
export declare function getMenuActions(options: GetMenuActionsType): AreaWindowAction[];
|
|
22
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { WindowBaseAction } from '../../../../../../../../../WindowBase/types';
|
|
2
|
-
interface UseHeaderActionsParams {
|
|
3
|
-
windowId: string;
|
|
4
|
-
areaId: string;
|
|
5
|
-
menuActions?: WindowBaseAction[];
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Hook useHeaderActions
|
|
9
|
-
*
|
|
10
|
-
* Se encarga de combinar y configurar las acciones del header de una ventana.
|
|
11
|
-
* Utiliza información del entorno (assets, diccionarios) y del store para agregar
|
|
12
|
-
* acciones predefinidas (como collapse/expand y maximize/normalize).
|
|
13
|
-
* @param {UseHeaderActionsParams} params - Parámetros que incluyen las acciones definidas,
|
|
14
|
-
* el id de la ventana y el id del área.
|
|
15
|
-
* @returns {Object} Un objeto con tres arrays: leftActions, menuActions y rightActions.
|
|
16
|
-
* @example
|
|
17
|
-
* const { leftActions, menuActions, rightActions } = useHeaderActions({
|
|
18
|
-
* windowId: 'win_456',
|
|
19
|
-
* areaId: 'area_123',
|
|
20
|
-
* menuActions: [],
|
|
21
|
-
* });
|
|
22
|
-
*/
|
|
23
|
-
export declare const useHeaderActions: ({ windowId, areaId, menuActions, }: UseHeaderActionsParams) => {
|
|
24
|
-
leftActions: WindowBaseAction[];
|
|
25
|
-
menuActions: WindowBaseAction[];
|
|
26
|
-
rightActions: WindowBaseAction[];
|
|
27
|
-
};
|
|
28
|
-
export {};
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import { useMemo } from "react";
|
|
2
|
-
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
3
|
-
import { u as useAreasStore } from "../../../../../../../../hooks/useAreas/index.js";
|
|
4
|
-
import { I as ICONS } from "../../../../../../../../icons.js";
|
|
5
|
-
import { g as getAreasDictionary, A as AREAS_DICCTIONARY } from "../../../../../../../../dictionary.js";
|
|
6
|
-
import { g as getMainActions, a as getMenuActions } from "./helper.js";
|
|
7
|
-
import { shallow } from "zustand/shallow";
|
|
8
|
-
import { useIsMobile } from "@m4l/graphics";
|
|
9
|
-
const useHeaderActions = ({
|
|
10
|
-
windowId,
|
|
11
|
-
areaId,
|
|
12
|
-
menuActions = []
|
|
13
|
-
}) => {
|
|
14
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
15
|
-
const { getLabel } = useModuleDictionary();
|
|
16
|
-
const isMobile = useIsMobile();
|
|
17
|
-
const urlPrefix = `${host_static_assets}/${environment_assets}`;
|
|
18
|
-
const moduleActions = useAreasStore(
|
|
19
|
-
(state) => {
|
|
20
|
-
const window = state.hashWindows[windowId];
|
|
21
|
-
return window?.moduleActions || [];
|
|
22
|
-
},
|
|
23
|
-
shallow
|
|
24
|
-
);
|
|
25
|
-
const mainActions = useMemo(() => {
|
|
26
|
-
return getMainActions(!isMobile, moduleActions).map((action) => ({
|
|
27
|
-
...action,
|
|
28
|
-
place: "left",
|
|
29
|
-
iconUrl: action.iconUrl || "",
|
|
30
|
-
label: action.label || ""
|
|
31
|
-
}));
|
|
32
|
-
}, [!isMobile, moduleActions]);
|
|
33
|
-
const windowOptions = useAreasStore(
|
|
34
|
-
(state) => state.hashWindows[windowId]?.windowOptions,
|
|
35
|
-
shallow
|
|
36
|
-
);
|
|
37
|
-
const { saveModuleCookies, resetModuleCookies } = useAreasStore(
|
|
38
|
-
(state) => state.windowActions,
|
|
39
|
-
shallow
|
|
40
|
-
);
|
|
41
|
-
const menuActionsInside = useMemo(() => {
|
|
42
|
-
return getMenuActions({
|
|
43
|
-
windowId,
|
|
44
|
-
isMobile,
|
|
45
|
-
moduleActions,
|
|
46
|
-
urlPrefix,
|
|
47
|
-
saveModuleCookies,
|
|
48
|
-
resetModuleCookies,
|
|
49
|
-
windowOptions: windowOptions || { allowPersistCookies: false },
|
|
50
|
-
getLabel
|
|
51
|
-
}).map((action) => ({
|
|
52
|
-
...action,
|
|
53
|
-
place: "inside",
|
|
54
|
-
iconUrl: action.iconUrl || "",
|
|
55
|
-
label: action.label || ""
|
|
56
|
-
}));
|
|
57
|
-
}, [windowId, isMobile, moduleActions, urlPrefix, saveModuleCookies, resetModuleCookies, windowOptions, getLabel]);
|
|
58
|
-
const predefActions = useMemo(() => {
|
|
59
|
-
const groups = {
|
|
60
|
-
left: [],
|
|
61
|
-
inside: [],
|
|
62
|
-
right: []
|
|
63
|
-
};
|
|
64
|
-
menuActions.forEach((action) => {
|
|
65
|
-
if (action.place === "left") {
|
|
66
|
-
groups.left.push(action);
|
|
67
|
-
} else if (action.place === "inside") {
|
|
68
|
-
groups.inside.push(action);
|
|
69
|
-
} else if (action.place === "right") {
|
|
70
|
-
groups.right.push(action);
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
return groups;
|
|
74
|
-
}, [menuActions]);
|
|
75
|
-
const collapsed = useAreasStore(
|
|
76
|
-
(state) => {
|
|
77
|
-
const area = state.hashAreas[areaId];
|
|
78
|
-
if (area && area.currentBreakpoint && area.layouts && area.layouts[area.currentBreakpoint]) {
|
|
79
|
-
return area.layouts[area.currentBreakpoint].find(
|
|
80
|
-
(li) => li.i === windowId
|
|
81
|
-
)?.colapsed || false;
|
|
82
|
-
}
|
|
83
|
-
return false;
|
|
84
|
-
},
|
|
85
|
-
shallow
|
|
86
|
-
);
|
|
87
|
-
const maximizedId = useAreasStore(
|
|
88
|
-
(state) => state.hashAreas[areaId]?.maximizedId,
|
|
89
|
-
shallow
|
|
90
|
-
);
|
|
91
|
-
const { maximizeLayout, normalizeLayouts, colapseLayoutItem, unColapseLayoutItem } = useAreasStore((state) => state.areaActions);
|
|
92
|
-
const headerRightActions = useMemo(() => {
|
|
93
|
-
const actions = [];
|
|
94
|
-
actions.push({
|
|
95
|
-
place: "right",
|
|
96
|
-
key: "maximize",
|
|
97
|
-
iconUrl: maximizedId ? `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.NORMALIZE}` : `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.MAXIMIZE}`,
|
|
98
|
-
label: maximizedId ? getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_minimize_window)) : getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_maximize_window)),
|
|
99
|
-
/**
|
|
100
|
-
* Acción de maximize/normalize.
|
|
101
|
-
*/
|
|
102
|
-
onClick: () => {
|
|
103
|
-
if (maximizedId) {
|
|
104
|
-
normalizeLayouts(areaId);
|
|
105
|
-
} else {
|
|
106
|
-
maximizeLayout(areaId, windowId);
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
disabled: false
|
|
110
|
-
});
|
|
111
|
-
if (!maximizedId) {
|
|
112
|
-
actions.push({
|
|
113
|
-
place: "right",
|
|
114
|
-
key: "collapseToggle",
|
|
115
|
-
iconUrl: !collapsed ? `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.COLAPSE}` : `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.UNCOLPASE}`,
|
|
116
|
-
label: !collapsed ? getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_collapse_window)) : getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_uncollapse_window)),
|
|
117
|
-
/**
|
|
118
|
-
* Acción de collapse/expand.
|
|
119
|
-
*/
|
|
120
|
-
onClick: () => {
|
|
121
|
-
if (collapsed) {
|
|
122
|
-
unColapseLayoutItem(areaId, windowId);
|
|
123
|
-
} else {
|
|
124
|
-
colapseLayoutItem(areaId, windowId);
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
disabled: false
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
return actions;
|
|
131
|
-
}, [
|
|
132
|
-
collapsed,
|
|
133
|
-
maximizedId,
|
|
134
|
-
host_static_assets,
|
|
135
|
-
environment_assets,
|
|
136
|
-
getLabel,
|
|
137
|
-
areaId,
|
|
138
|
-
windowId,
|
|
139
|
-
colapseLayoutItem,
|
|
140
|
-
unColapseLayoutItem,
|
|
141
|
-
normalizeLayouts,
|
|
142
|
-
maximizeLayout
|
|
143
|
-
]);
|
|
144
|
-
const combinedInsideActions = useMemo(() => {
|
|
145
|
-
return [...menuActionsInside, ...predefActions.inside];
|
|
146
|
-
}, [menuActionsInside, predefActions.inside]);
|
|
147
|
-
return {
|
|
148
|
-
leftActions: [...mainActions, ...predefActions.left],
|
|
149
|
-
menuActions: combinedInsideActions,
|
|
150
|
-
rightActions: [...predefActions.right, ...headerRightActions]
|
|
151
|
-
};
|
|
152
|
-
};
|
|
153
|
-
export {
|
|
154
|
-
useHeaderActions as u
|
|
155
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { WindowToolsMF } from '../../../../../../../../contexts/WindowToolsMFContext/types';
|
|
2
|
-
import { DynamicMFStore } from '../../../../../../../../contexts/DynamicMFParmsContext/store';
|
|
3
|
-
import { JSX_REACT_NODE } from '../../../../../../../../types';
|
|
4
|
-
export interface ComponentProps {
|
|
5
|
-
moduleId: string;
|
|
6
|
-
windowTools: WindowToolsMF;
|
|
7
|
-
dynamicMFStore: DynamicMFStore;
|
|
8
|
-
component: JSX_REACT_NODE;
|
|
9
|
-
componentProps?: Record<string, any>;
|
|
10
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { MicroFrontendProps } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Componente encargado de renderizar un microfrontend.
|
|
5
|
-
* @param props MicroFrontendProps
|
|
6
|
-
*/
|
|
7
|
-
export declare const MicroFrontend: (props: MicroFrontendProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export declare const MemonizedMicroFrontend: React.MemoExoticComponent<(props: MicroFrontendProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { M as MFLoader } from "../../../../../../../../../MFLoader/MFLoader.js";
|
|
4
|
-
const MicroFrontend = (props) => {
|
|
5
|
-
return /* @__PURE__ */ jsx(MFLoader, { ...props });
|
|
6
|
-
};
|
|
7
|
-
const MemonizedMicroFrontend = React.memo(MicroFrontend);
|
|
8
|
-
export {
|
|
9
|
-
MemonizedMicroFrontend as M
|
|
10
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { MFBaseProps } from '../../../../../../../../types';
|
|
2
|
-
import { WindowToolsMF } from '../../../../../../../../contexts/WindowToolsMFContext/types';
|
|
3
|
-
import { DynamicMFStore } from '../../../../../../../../contexts/DynamicMFParmsContext/store';
|
|
4
|
-
export interface MicroFrontendProps extends MFBaseProps {
|
|
5
|
-
moduleId: string;
|
|
6
|
-
windowTools: WindowToolsMF;
|
|
7
|
-
dynamicMFStore: DynamicMFStore;
|
|
8
|
-
}
|
package/components/popups/components/PopupsProvider/hooks/useHeaderActionsPopups/helper.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { GetLabelType } from '@m4l/core';
|
|
2
|
-
import { AreaWindowAction, WindowOptions } from '../../../../../areas/types';
|
|
3
|
-
/**
|
|
4
|
-
* Obtiene las acciones principales para un popup.
|
|
5
|
-
* @param isDesktop Indica si se está en un dispositivo de escritorio.
|
|
6
|
-
* @param moduleActions Acciones definidas para el módulo.
|
|
7
|
-
* @returns Array de acciones principales.
|
|
8
|
-
*/
|
|
9
|
-
export declare function getMainActionsForPopups(isDesktop: boolean | undefined, moduleActions: AreaWindowAction[]): AreaWindowAction[];
|
|
10
|
-
type GetMenuActionsForPopupsType = {
|
|
11
|
-
popupId: string;
|
|
12
|
-
isDesktop?: boolean;
|
|
13
|
-
moduleActions: AreaWindowAction[];
|
|
14
|
-
urlPrefix: string;
|
|
15
|
-
version?: string;
|
|
16
|
-
windowOptions?: WindowOptions;
|
|
17
|
-
getLabel: GetLabelType;
|
|
18
|
-
saveModuleCookies: (wd: string) => void;
|
|
19
|
-
resetModuleCookies: (wd: string) => void;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Obtiene las acciones del menú para un popup.
|
|
23
|
-
* A diferencia del helper para áreas, aquí no se agregan acciones relacionadas con cookies.
|
|
24
|
-
* @param options Objeto con las opciones para construir las acciones.
|
|
25
|
-
* @returns Array de acciones para el menú.
|
|
26
|
-
*/
|
|
27
|
-
export declare function getMenuActionsForPopups(options: GetMenuActionsForPopupsType): AreaWindowAction[];
|
|
28
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { g as getAreasDictionary, A as AREAS_DICCTIONARY } from "../../../../../areas/dictionary.js";
|
|
2
|
-
import { I as ICONS } from "../../../../../areas/icons.js";
|
|
3
|
-
function getMenuActionsForPopups(options) {
|
|
4
|
-
const {
|
|
5
|
-
popupId,
|
|
6
|
-
isDesktop,
|
|
7
|
-
moduleActions,
|
|
8
|
-
urlPrefix,
|
|
9
|
-
saveModuleCookies,
|
|
10
|
-
resetModuleCookies,
|
|
11
|
-
getLabel,
|
|
12
|
-
windowOptions = { allowPersistCookies: false }
|
|
13
|
-
} = options;
|
|
14
|
-
let menuActions = [...moduleActions.filter((action) => action.visibility !== "allways")];
|
|
15
|
-
if (isDesktop !== void 0 && isDesktop) {
|
|
16
|
-
menuActions = menuActions.filter((action) => action.visibility === "normal");
|
|
17
|
-
}
|
|
18
|
-
if (windowOptions.allowPersistCookies) {
|
|
19
|
-
const saveCookiesAction = {
|
|
20
|
-
type: "menuItem",
|
|
21
|
-
startIcon: `${urlPrefix}/frontend/components/areas/assets/icons/${ICONS.SAVE_COOKIES}`,
|
|
22
|
-
onClick: () => saveModuleCookies(popupId),
|
|
23
|
-
disabled: false,
|
|
24
|
-
visibility: "normal",
|
|
25
|
-
label: getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_persist_module_cookies)),
|
|
26
|
-
key: "save_cookies"
|
|
27
|
-
};
|
|
28
|
-
menuActions.push(saveCookiesAction);
|
|
29
|
-
const resetCookiesAction = {
|
|
30
|
-
type: "menuItem",
|
|
31
|
-
startIcon: `${urlPrefix}/frontend/components/areas/assets/icons/${ICONS.RESET_COOKIES}`,
|
|
32
|
-
onClick: () => resetModuleCookies(popupId),
|
|
33
|
-
disabled: false,
|
|
34
|
-
visibility: "normal",
|
|
35
|
-
label: getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_reset_module_cookies)),
|
|
36
|
-
key: "reset_cookes"
|
|
37
|
-
};
|
|
38
|
-
menuActions.push(resetCookiesAction);
|
|
39
|
-
}
|
|
40
|
-
return menuActions;
|
|
41
|
-
}
|
|
42
|
-
export {
|
|
43
|
-
getMenuActionsForPopups as g
|
|
44
|
-
};
|