@m4l/components 9.3.12 → 9.3.13-JT010925.beta.1
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/@types/types.d.ts +207 -61
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +0 -2
- package/{storybook/components/DataGrid → components/DataGrid/tests}/helpers/filterFieldsSeedData.d.ts +1 -1
- package/{storybook/components/DataGrid → components/DataGrid/tests}/helpers/getRowsWithBackendSimulation.d.ts +2 -2
- package/{storybook/components/DataGrid → components/DataGrid/tests}/helpers/sortsSeedData.d.ts +1 -1
- package/{storybook/components/DataGrid → components/DataGrid/tests}/helpers/types.d.ts +3 -3
- package/{storybook/components/DataGrid → components/DataGrid/tests}/helpers/useSeed.d.ts +2 -2
- package/components/NumberInput/hooks/useNumberInput/useNumberInput.js +0 -2
- package/components/ObjectLogs/slots/ObjectLogsSlots.d.ts +1 -1
- package/components/ObjectLogs/slots/ObjectLogsSlots.js +2 -2
- package/components/ObjectLogs/subcomponents/DetailDialog/index.js +2 -4
- package/components/SideBar/tests/constants.d.ts +1 -0
- package/components/Stepper/Stepper.d.ts +8 -0
- package/components/Stepper/Stepper.js +77 -0
- package/components/Stepper/Stepper.styles.d.ts +2 -0
- package/components/Stepper/Stepper.styles.js +309 -0
- package/components/Stepper/constants.d.ts +2 -0
- package/components/Stepper/constants.js +6 -0
- package/components/Stepper/dictionary.d.ts +8 -0
- package/components/Stepper/dictionary.js +14 -0
- package/components/Stepper/helpers/evaluateVisibilityStepCondition/index.d.ts +9 -0
- package/components/Stepper/helpers/evaluateVisibilityStepCondition/index.js +17 -0
- package/components/Stepper/helpers/findNextVisibleValidStep/index.d.ts +10 -0
- package/components/Stepper/helpers/findNextVisibleValidStep/index.js +13 -0
- package/components/Stepper/helpers/findPrevVisibleValidStep/index.d.ts +10 -0
- package/components/Stepper/helpers/findPrevVisibleValidStep/index.js +13 -0
- package/components/Stepper/helpers/index.d.ts +4 -0
- package/components/Stepper/helpers/index.js +1 -0
- package/components/Stepper/helpers/isLastVisibleValidStep/index.d.ts +10 -0
- package/components/Stepper/helpers/isLastVisibleValidStep/index.js +16 -0
- package/components/Stepper/hooks/useIsLastVisibleValidStep/index.d.ts +6 -0
- package/components/Stepper/hooks/useIsLastVisibleValidStep/index.js +25 -0
- package/components/Stepper/hooks/useStepper/index.d.ts +5 -0
- package/components/Stepper/hooks/useStepper/index.js +14 -0
- package/components/Stepper/hooks/useStepperActions/index.d.ts +8 -0
- package/components/Stepper/hooks/useStepperActions/index.js +76 -0
- package/components/Stepper/hooks/useStickyStepperFooter/index.d.ts +7 -0
- package/components/Stepper/hooks/useStickyStepperFooter/index.js +20 -0
- package/components/Stepper/icons.d.ts +9 -0
- package/components/Stepper/icons.js +12 -0
- package/components/Stepper/index.d.ts +14 -0
- package/components/Stepper/index.js +1 -0
- package/components/Stepper/slots/StepperEnum.d.ts +27 -0
- package/components/Stepper/slots/StepperEnum.js +37 -0
- package/components/Stepper/slots/StepperSlot.d.ts +60 -0
- package/components/Stepper/slots/StepperSlot.js +102 -0
- package/components/Stepper/store/StepperContext/index.d.ts +17 -0
- package/components/Stepper/store/StepperContext/index.js +91 -0
- package/components/Stepper/store/StepperStore/index.d.ts +16 -0
- package/components/Stepper/store/StepperStore/index.js +131 -0
- package/components/Stepper/store/types.d.ts +61 -0
- package/components/Stepper/subcomponents/ContentArea/index.d.ts +6 -0
- package/components/Stepper/subcomponents/ContentArea/index.js +24 -0
- package/components/Stepper/subcomponents/ContentArea/subcomponents/WrapperIcon/index.d.ts +4 -0
- package/components/Stepper/subcomponents/ContentArea/subcomponents/WrapperIcon/index.js +26 -0
- package/components/Stepper/subcomponents/ContentArea/subcomponents/WrapperTitle/index.d.ts +4 -0
- package/components/Stepper/subcomponents/ContentArea/subcomponents/WrapperTitle/index.js +23 -0
- package/components/Stepper/subcomponents/StepArea/index.d.ts +6 -0
- package/components/Stepper/subcomponents/StepArea/index.js +139 -0
- package/components/Stepper/subcomponents/StepArea/subcomponents/Inidicator/index.d.ts +5 -0
- package/components/Stepper/subcomponents/StepArea/subcomponents/Inidicator/index.js +82 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperCancelButton/index.d.ts +4 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperCancelButton/index.js +25 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperNextButton/index.d.ts +4 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperNextButton/index.js +42 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperPrevButton/index.d.ts +4 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperPrevButton/index.js +49 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperSubmitButton/index.d.ts +4 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperSubmitButton/index.js +20 -0
- package/components/Stepper/subcomponents/StepperButtons/index.d.ts +4 -0
- package/components/Stepper/subcomponents/StepperButtons/index.js +1 -0
- package/components/Stepper/subcomponents/StepperContent/index.d.ts +7 -0
- package/components/Stepper/subcomponents/StepperContent/index.js +23 -0
- package/components/Stepper/subcomponents/StepperContent/subcomponents/Step/index.d.ts +6 -0
- package/components/Stepper/subcomponents/StepperContent/subcomponents/Step/index.js +42 -0
- package/components/Stepper/subcomponents/StepperFooter/index.d.ts +6 -0
- package/components/Stepper/subcomponents/StepperFooter/index.js +48 -0
- package/components/Stepper/subcomponents/StepperFooter/subcomponents/StepperFooterLeftActions/index.d.ts +6 -0
- package/components/Stepper/subcomponents/StepperFooter/subcomponents/StepperFooterLeftActions/index.js +9 -0
- package/components/Stepper/subcomponents/StepperFooter/subcomponents/StepperFooterRightActions/index.d.ts +6 -0
- package/components/Stepper/subcomponents/StepperFooter/subcomponents/StepperFooterRightActions/index.js +33 -0
- package/components/Stepper/types.d.ts +162 -0
- package/components/areas/contexts/AreasContext/store.js +2 -2
- package/components/extended/React-Json-Viewer/ReactJsonViewer.js +2 -2
- package/components/extended/React-Json-Viewer/helpers/getReactJsonViewerTheme/getReactJsonViewerTheme.d.ts +2 -2
- package/components/extended/React-Json-Viewer/helpers/getReactJsonViewerTheme/getReactJsonViewerTheme.js +16 -16
- package/components/extended/React-Json-Viewer/types.d.ts +2 -2
- package/components/hook-form/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.js +0 -5
- package/components/hook-form/RHFormContext/index.d.ts +1 -1
- package/components/hook-form/RHFormContext/index.js +5 -4
- package/components/hook-form/RHFormContext/types.d.ts +3 -1
- package/components/index.d.ts +1 -0
- package/helpers/getStepsAndValidationSchema/getStepsAndValidationSchema.d.ts +11 -0
- package/helpers/getStepsAndValidationSchema/getStepsAndValidationSchema.js +44 -0
- package/helpers/getStepsAndValidationSchema/index.d.ts +2 -0
- package/helpers/getStepsAndValidationSchema/index.js +1 -0
- package/helpers/getStepsAndValidationSchema/types.d.ts +21 -0
- package/helpers/getStepsAndValidationSchema/types.js +1 -0
- package/helpers/index.d.ts +1 -0
- package/helpers/index.js +1 -0
- package/index.d.ts +1 -0
- package/index.js +80 -52
- package/package.json +2 -2
- package/.storybook/constants.d.ts +0 -21
- package/.storybook/decorators/WithAppearanceContext/WithAppearanceContext.d.ts +0 -6
- package/.storybook/decorators/WithAppearanceContext/index.d.ts +0 -0
- package/.storybook/decorators/WithContexts/WithContexts.d.ts +0 -5
- package/.storybook/decorators/WithContexts/constants.d.ts +0 -10
- package/.storybook/decorators/WithContexts/index.d.ts +0 -1
- package/.storybook/decorators/WithContexts/styles.d.ts +0 -1
- package/.storybook/decorators/WithContexts/subcomponents/AppWithTheme.d.ts +0 -6
- package/.storybook/decorators/WithContexts/types.d.ts +0 -7
- package/.storybook/decorators/WithDictionaryContext/WithDictionaryContext.d.ts +0 -21
- package/.storybook/decorators/WithDictionaryContext/contants.d.ts +0 -3
- package/.storybook/decorators/WithDictionaryContext/index.d.ts +0 -1
- package/.storybook/decorators/WithForm/WithForm.d.ts +0 -8
- package/.storybook/decorators/WithForm/index.d.ts +0 -1
- package/.storybook/decorators/WithFormAutoValidation/WithFormAutoValidation.d.ts +0 -7
- package/.storybook/decorators/WithFormAutoValidation/index.d.ts +0 -1
- package/.storybook/decorators/WithPopupsProvider/WithPopupsProvider.d.ts +0 -10
- package/.storybook/decorators/WithPopupsProvider/index.d.ts +0 -1
- package/.storybook/decorators/WithScaleIcons/WithScaleIcons.d.ts +0 -7
- package/.storybook/decorators/WithScaleIcons/index.d.ts +0 -1
- package/.storybook/decorators/WithWindowsContainer/WithWindowsContainer.d.ts +0 -5
- package/.storybook/decorators/WithWindowsContainer/index.d.ts +0 -2
- package/.storybook/decorators/WithWindowsContainer/subcomponents/WindowsContainer/WindowsContainer.d.ts +0 -5
- package/.storybook/decorators/WithWindowsContainer/subcomponents/WindowsContainer/index.d.ts +0 -1
- package/.storybook/decorators/WithWindowsContainer/subcomponents/WindowsContainer/types.d.ts +0 -4
- package/.storybook/decorators/WithWindowsContainerSizer/WithWindowsContainerSizer.d.ts +0 -5
- package/.storybook/decorators/WithWindowsToolsAndParmsMFContexts/WithWindowsToolsAndParmsMFContexts.d.ts +0 -5
- package/.storybook/decorators/WithWrapper/WithWrapper.d.ts +0 -24
- package/.storybook/decorators/WithWrapper/index.d.ts +0 -1
- package/.storybook/decorators/WithWrapper/types.d.ts +0 -11
- package/.storybook/decorators/index.d.ts +0 -7
- package/.storybook/main.d.ts +0 -3
- package/.storybook/mocks/config-msw.d.ts +0 -21
- package/.storybook/mocks/index.d.ts +0 -2
- package/.storybook/mocks/network-mocks.d.ts +0 -1
- package/.storybook/storybook.vite.d.ts +0 -2
- package/.storybook/test-utils/index.d.ts +0 -1
- package/.storybook/test-utils/waitForHelpers.d.ts +0 -4
- package/.storybook/utils/flattenDeep.d.ts +0 -8
- package/.storybook/utils/getGlobalsFromSearchParams.d.ts +0 -7
- package/.storybook/utils/getStylesColorsByMode.d.ts +0 -820
- package/components/extended/React-Resizable/Resizable/stories/constants.d.ts +0 -3
- package/components/extended/React-Resizable/Resizable/stories/types.d.ts +0 -3
- package/components/extended/React-Resizable/ResizableBox/stories/constants.d.ts +0 -3
- package/components/extended/React-Resizable/ResizableBox/stories/types.d.ts +0 -3
- package/components/mui_extended/FormControlLabel/FormControlLabel.stories.d.ts +0 -15
- package/hooks/useComponentSize/useComponentSize.stories.d.ts +0 -47
- package/storybook/components/AccountPopover/AccountPopover.stories.d.ts +0 -11
- package/storybook/components/Areas/AreasAdmin/AreasAdmin.stories.d.ts +0 -8
- package/storybook/components/Areas/AreasViewer/AreasViewer.stories.d.ts +0 -7
- package/storybook/components/Areas/AreasViewer/hooks/useWindowsActions.d.ts +0 -4
- package/storybook/components/Areas/AreasViewer/moks/mokData.d.ts +0 -14
- package/storybook/components/Areas/AreasViewer/subcomponents/AreasViewerRender.d.ts +0 -4
- package/storybook/components/Areas/AreasViewer/subcomponents/Launcher/Launcher.d.ts +0 -5
- package/storybook/components/Areas/AreasViewer/subcomponents/Launcher/PopupButton.d.ts +0 -21
- package/storybook/components/Areas/AreasViewer/subcomponents/Launcher/PopupContentExample.d.ts +0 -4
- package/storybook/components/Areas/AreasViewer/subcomponents/layouts/ClientsLayout.d.ts +0 -4
- package/storybook/components/Areas/AreasViewer/subcomponents/layouts/UsersLayout.d.ts +0 -4
- package/storybook/components/Areas/AreasViewerWithNetwork/AreasViewerWithNetwork.stories.d.ts +0 -7
- package/storybook/components/Areas/AreasViewerWithNetwork/moks/mokData.d.ts +0 -14
- package/storybook/components/Areas/AreasViewerWithNetwork/moks/mokRed.d.ts +0 -1
- package/storybook/components/Areas/AreasViewerWithNetwork/subcomponents/ClientsHeaderActions.d.ts +0 -4
- package/storybook/components/Areas/AreasViewerWithNetwork/subcomponents/UsersHeaderActions.d.ts +0 -4
- package/storybook/components/Areas/AreasViewerWithNetwork/subcomponents/WithExtendedContainer.d.ts +0 -5
- package/storybook/components/Card/Card.stories.d.ts +0 -45
- package/storybook/components/Card/subcomponents/ContentCard.d.ts +0 -8
- package/storybook/components/Card/subcomponents/constants.d.ts +0 -9
- package/storybook/components/Chip/Chip.stories.d.ts +0 -37
- package/storybook/components/Color/Color.stories.d.ts +0 -14
- package/storybook/components/ContainerFlow/ContainerFlow.stories.d.ts +0 -32
- package/storybook/components/ContainerFlow/subcomponents/RenderFlexColumn/index.d.ts +0 -5
- package/storybook/components/ContainerFlow/subcomponents/RenderFlexColumn1Wrappers/index.d.ts +0 -5
- package/storybook/components/ContainerFlow/subcomponents/RenderFlexColumn2Wrappers/index.d.ts +0 -5
- package/storybook/components/ContainerFlow/subcomponents/RenderFlexColumn3Wrappers/index.d.ts +0 -5
- package/storybook/components/ContainerFlow/subcomponents/RenderFlexWrap/index.d.ts +0 -5
- package/storybook/components/ContainerFlow/subcomponents/RenderGridLayout/index.d.ts +0 -5
- package/storybook/components/ContainerFlow/wrapperItems/index.d.ts +0 -10
- package/storybook/components/DataGrid/DataGrid.stories.d.ts +0 -87
- package/storybook/components/DataGrid/MswHandles.d.ts +0 -1
- package/storybook/components/DataGrid/subcomponents/DataGridRender.d.ts +0 -18
- package/storybook/components/DragResizeWindowRND/stories/DragResizeWindowRND.stories.d.ts +0 -10
- package/storybook/components/DragResizeWindowRND/stories/constants.d.ts +0 -3
- package/storybook/components/DragResizeWindowRND/stories/subcomponents/ContentExample.d.ts +0 -4
- package/storybook/components/DragResizeWindowRND/stories/subcomponents/RNDWindowsContainer/RNDWindowsContainer.d.ts +0 -5
- package/storybook/components/DragResizeWindowRND/stories/subcomponents/RNDWindowsContainer/index.d.ts +0 -1
- package/storybook/components/DragResizeWindowRND/stories/subcomponents/RNDWindowsContainer/types.d.ts +0 -4
- package/storybook/components/DragResizeWindowRND/stories/subcomponents/WithExtendedContainer.d.ts +0 -5
- package/storybook/components/DragResizeWindowRND/stories/types.d.ts +0 -3
- package/storybook/components/DynamicFilter/DynamicFilter.stories.d.ts +0 -49
- package/storybook/components/DynamicFilter/mocks/mocksData.d.ts +0 -1
- package/storybook/components/DynamicSort/DynamicSort.stories.d.ts +0 -45
- package/storybook/components/FormContainer/FormContainer.stories.d.ts +0 -9
- package/storybook/components/HelperError/HelperError.stories.d.ts +0 -9
- package/storybook/components/Icon/Icon.stories.d.ts +0 -25
- package/storybook/components/Label/Label.stories.d.ts +0 -18
- package/storybook/components/LanguagePopover/LanguagePopover.stories.d.ts +0 -17
- package/storybook/components/LanguagePopover/moks/mokData.d.ts +0 -4
- package/storybook/components/LoadingError/Loadingerror.stories.d.ts +0 -9
- package/storybook/components/MenuActions/MenuActions.stories.d.ts +0 -72
- package/storybook/components/ModalDialog/ModalDialog.stories.d.ts +0 -8
- package/storybook/components/ModalDialog/subcomponent/WithExtendedContainer.d.ts +0 -33
- package/storybook/components/NoItemPrivileges/NoItemPrivileges.stories.d.ts +0 -12
- package/storybook/components/NoItemSelect/NoItemSelect.stories.d.ts +0 -12
- package/storybook/components/NumberInput/NumberInput.default.stories.d.ts +0 -17
- package/storybook/components/ObjectLogs/ObjectLogs.stories.d.ts +0 -7
- package/storybook/components/ObjectLogs/mockData/index.d.ts +0 -4
- package/storybook/components/PDFViewer/PDFViewer.stories.d.ts +0 -9
- package/storybook/components/Pager/Pager.stories.d.ts +0 -21
- package/storybook/components/Pager/subcomopnents/WithContextDataProvider.d.ts +0 -4
- package/storybook/components/PaperForm/PaperForm.stories.d.ts +0 -31
- package/storybook/components/PopupsViewer/basic.stories.d.ts +0 -16
- package/storybook/components/PopupsViewer/dictionary.d.ts +0 -1
- package/storybook/components/PopupsViewer/subcomponents/PopupActions.d.ts +0 -6
- package/storybook/components/PopupsViewer/subcomponents/PopupContentExample.d.ts +0 -5
- package/storybook/components/PopupsViewer/subcomponents/WithExtendedPopupsContainer.d.ts +0 -5
- package/storybook/components/PopupsViewer/subcomponents/initialPopups.d.ts +0 -6
- package/storybook/components/PopupsViewer/types.d.ts +0 -3
- package/storybook/components/PrintingSystem/PrintingSystem.stories.d.ts +0 -6
- package/storybook/components/PropertyValue/PropertyValue.stories.d.ts +0 -65
- package/storybook/components/ScrollBar/ScrollBar.stories.d.ts +0 -7
- package/storybook/components/SettingsLayout/SettingsLayout.stories.d.ts +0 -6
- package/storybook/components/SettingsLayout/subcomponents/SettingsLayoutRender/SettingsLayoutsRender.d.ts +0 -5
- package/storybook/components/SettingsLayout/subcomponents/SettingsLayoutRender/index.d.ts +0 -1
- package/storybook/components/SideBar/SideBar.stories.d.ts +0 -24
- package/storybook/components/SideBar/data/menuData.d.ts +0 -2
- package/storybook/components/SideBar/subcomponents/FooterComponentHost/FooterComponentHost.d.ts +0 -4
- package/storybook/components/SideBar/subcomponents/FooterComponentHost/constants.d.ts +0 -3
- package/storybook/components/SideBar/subcomponents/FooterComponentHost/index.d.ts +0 -1
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/FooterComponentMicrofrontend.d.ts +0 -4
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/FooterComponentMicrofrontend.stories.d.ts +0 -14
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/constants.d.ts +0 -1
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/index.d.ts +0 -1
- package/storybook/components/SideBar/subcomponents/HeaderComponentHost/HeaderComponentHost.d.ts +0 -5
- package/storybook/components/SideBar/subcomponents/HeaderComponentHost/constants.d.ts +0 -1
- package/storybook/components/SideBar/subcomponents/HeaderComponentMicrofrontend/HeaderComponentMicrofrontend.d.ts +0 -5
- package/storybook/components/SideBar/subcomponents/HeaderComponentMicrofrontend/constants.d.ts +0 -1
- package/storybook/components/SideBar/subcomponents/SibarDecorator.d.ts +0 -3
- package/storybook/components/ToastContainer/ToastContainer.stories.d.ts +0 -47
- package/storybook/components/WindowBase/windowBase.stories.d.ts +0 -69
- package/storybook/components/WindowConfirm/windowConfirm.stories.d.ts +0 -8
- package/storybook/components/appBar/AppBar.stories.d.ts +0 -9
- package/storybook/components/commonActions/components/ActionCancel/ActionCancel.stories.d.ts +0 -22
- package/storybook/components/commonActions/components/ActionFormCancel/ActionFormCancel.stories.d.ts +0 -6
- package/storybook/components/commonActions/components/ActionFormIntro/ActionFormIntro.stories.d.ts +0 -14
- package/storybook/components/commonActions/components/ActionIntro/ActionIntro.stories.d.ts +0 -22
- package/storybook/components/commonActions/components/ActionsContainer/ActionsContainer.stories.d.ts +0 -13
- package/storybook/components/extended/React-Json-Viewer/ReactJsonViewer.stories.d.ts +0 -9
- package/storybook/components/extended/React-Router-Dom/NavLink/NavLInk.stories.d.ts +0 -16
- package/storybook/components/extended/React-Spinners/PropagateLoaderSpinner/PropagateLoaderSpinner.stories.d.ts +0 -9
- package/storybook/components/extended/React-Splitter-Layout/SplitLayout.stories.d.ts +0 -13
- package/storybook/components/extended/React-resizable-panels/SplitLayout.stories.d.ts +0 -13
- package/storybook/components/extended/mui/Accordion/Accordion.stories.d.ts +0 -77
- package/storybook/components/extended/mui/Autocomplete/AutoComple.stories.d.ts +0 -21
- package/storybook/components/extended/mui/Badge/Badge.stories.d.ts +0 -37
- package/storybook/components/extended/mui/Button/Button.stories.d.ts +0 -19
- package/storybook/components/extended/mui/Button/ButtonDataGridWithActions.d.ts +0 -5
- package/storybook/components/extended/mui/CheckBox/CheckBox.stories.d.ts +0 -19
- package/storybook/components/extended/mui/CircularProgress/CircularProgress.default.stories.d.ts +0 -14
- package/storybook/components/extended/mui/CircularProgress/CircularProgress.sizes.stories.d.ts +0 -18
- package/storybook/components/extended/mui/DataTimePicker/DataTimePicker.stories.d.ts +0 -21
- package/storybook/components/extended/mui/Dialog/Dialog.stories.d.ts +0 -7
- package/storybook/components/extended/mui/Dialog/subcomponents/ContentExample.d.ts +0 -29
- package/storybook/components/extended/mui/Dialog/subcomponents/WithExtendedContainer.d.ts +0 -34
- package/storybook/components/extended/mui/Divider/Divider.stories.d.ts +0 -15
- package/storybook/components/extended/mui/IconButton/IconButton.stories.d.ts +0 -39
- package/storybook/components/extended/mui/LoadingButton/LoadingButton.stories.d.ts +0 -42
- package/storybook/components/extended/mui/MenuDivider/MenuDivider.stories.d.ts +0 -25
- package/storybook/components/extended/mui/MenuItem/MenuItem.stories.d.ts +0 -65
- package/storybook/components/extended/mui/Popover/Popover.stories.d.ts +0 -14
- package/storybook/components/extended/mui/Popover/WithPopoverContext.d.ts +0 -11
- package/storybook/components/extended/mui/Popover/types.d.ts +0 -11
- package/storybook/components/extended/mui/Popper/Popper.stories.d.ts +0 -9
- package/storybook/components/extended/mui/Select/Select.stories.d.ts +0 -38
- package/storybook/components/extended/mui/Skeleton/Colors/Default/Variants/Circular/skeleton.defaultCircular.stories.d.ts +0 -14
- package/storybook/components/extended/mui/Skeleton/Colors/Default/Variants/Rectangular/skeleton.defaultRectangular.stories.d.ts +0 -14
- package/storybook/components/extended/mui/Skeleton/Colors/Default/Variants/Rounded/skeleton.defaultRounded.stories.d.ts +0 -15
- package/storybook/components/extended/mui/Skeleton/Colors/Default/Variants/Text/skeleton.defaultText.stories.d.ts +0 -15
- package/storybook/components/extended/mui/Stack/Stack.stories.d.ts +0 -13
- package/storybook/components/extended/mui/Tab/Tab.stories.d.ts +0 -57
- package/storybook/components/extended/mui/TabContent/TabContent.stories.d.ts +0 -17
- package/storybook/components/extended/mui/Tabs/Tabs.stories.d.ts +0 -8
- package/storybook/components/extended/mui/TextField/TextFieldText.stories.d.ts +0 -32
- package/storybook/components/extended/mui/TimePicker/TimePicker.stories.d.ts +0 -21
- package/storybook/components/extended/mui/ToggleButton/ToggleButton.stories.d.ts +0 -53
- package/storybook/components/extended/mui/ToggleIconButton/ToggleIconButton.stories.d.ts +0 -49
- package/storybook/components/extended/mui/Tooltip/Tooltip.stories.d.ts +0 -17
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/body/Estados/typography.body.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/bodyDens/Estados/typography.bodyDens.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/h1/Estados/typography.h1.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/h2/Estados/typography.h2.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/h3/Estados/typography.h3.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/h5/Estados/typography.h5.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/paragraph/Estados/typography.paragraph.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/paragraphDens/Estados/typography.paragraphDens.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/subtitle/Estados/typography.subtitle.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/subtitleDens/Estados/typography.subtitleDens.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/avatar/Avatar.stories.d.ts +0 -12
- package/storybook/components/extended/react-resizable/ResizableBox/resizableBox.stories.d.ts +0 -13
- package/storybook/components/formatters/BooleanFormatter/BooleanFormatter.stories.d.ts +0 -41
- package/storybook/components/formatters/ChipStatusFormatter/ChipStatusFormatter.stories.d.ts +0 -13
- package/storybook/components/formatters/ConcatenatedFormatter/ConcatenatedFormatter.stories.d.ts +0 -13
- package/storybook/components/formatters/DateFormatter/DateFormatter.stories.d.ts +0 -29
- package/storybook/components/formatters/DistanceToNowFormatter/DistanceToNowFormatter.stories.d.ts +0 -157
- package/storybook/components/formatters/DistanceToNowFormatter/subcomponents/WithDTNFProvider.d.ts +0 -5
- package/storybook/components/formatters/DistanceToNowFormatter/types.d.ts +0 -3
- package/storybook/components/formatters/PeriodFormatter/PeriodFormatter.stories.d.ts +0 -36
- package/storybook/components/formatters/PoinsFormatter/PointsFormatter.stories.d.ts +0 -21
- package/storybook/components/formatters/PriceFormatter/PriceFormatter.stories.d.ts +0 -17
- package/storybook/components/formatters/UncertaintyFormatter/UncertaintyFormatter.stories.d.ts +0 -13
- package/storybook/components/image/image.stories.d.ts +0 -11
- package/storybook/hook-form/RHFAutocomplete/RHFAutocomplete.stories.d.ts +0 -22
- package/storybook/hook-form/RHFAutocomplete/constants.d.ts +0 -23
- package/storybook/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.stories.d.ts +0 -23
- package/storybook/hook-form/RHFAutocompleteAsync/constants.d.ts +0 -14
- package/storybook/hook-form/RHFAutocompleteAsync/handlers.d.ts +0 -1
- package/storybook/hook-form/RHFCheckBox/RHFCheckBox.stories.d.ts +0 -8
- package/storybook/hook-form/RHFColorPicker/RHFColorPicker.stories.d.ts +0 -21
- package/storybook/hook-form/RHFDateTime/RHFDateTime.stories.d.ts +0 -21
- package/storybook/hook-form/RHFNumberInput/RHFNumberInput.stories.d.ts +0 -21
- package/storybook/hook-form/RHFPeriod/RHFPeriod.stories.d.ts +0 -8
- package/storybook/hook-form/RHFSelect/RHFSelect.stories.d.ts +0 -32
- package/storybook/hook-form/RHFTextField/RHFTextField.stories.d.ts +0 -25
- package/storybook/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.stories.d.ts +0 -27
- package/storybook/hook-form/RHFTimePicker/RHFTimePicker.stories.d.ts +0 -21
- package/storybook/hook-form/RHFUploadImage/RHFUploadImage.stories.d.ts +0 -8
- package/storybook/hook-form/RHFUploadSingleFile/RHFUploadSingleFile.stories.d.ts +0 -11
- package/storybook/wrappers/LineGuide/LineGuide.d.ts +0 -9
- package/storybook/wrappers/LineGuide/styles.d.ts +0 -1
- package/storybook/wrappers/LineGuide/types.d.ts +0 -5
- /package/{storybook/components/DataGrid → components/DataGrid/tests}/helpers/getRows.d.ts +0 -0
- /package/{storybook/components/DataGrid → components/DataGrid/tests}/helpers/icons.d.ts +0 -0
- /package/{storybook/components/DataGrid → components/DataGrid/tests}/helpers/useColumns.d.ts +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { u as useStepper } from "../../../../hooks/useStepper/index.js";
|
|
4
|
+
import { d as WrapperTitleStyled, T as TitleStyled, D as DescriptionStyled } from "../../../../slots/StepperSlot.js";
|
|
5
|
+
function WrapperTitle() {
|
|
6
|
+
const { steps, currentStep } = useStepper((state) => ({
|
|
7
|
+
steps: state.steps,
|
|
8
|
+
currentStep: state.currentStep
|
|
9
|
+
}));
|
|
10
|
+
const currentStepConfig = useMemo(() => {
|
|
11
|
+
return steps[currentStep];
|
|
12
|
+
}, [steps, currentStep]);
|
|
13
|
+
if (!currentStepConfig) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
return /* @__PURE__ */ jsxs(WrapperTitleStyled, { children: [
|
|
17
|
+
/* @__PURE__ */ jsx(TitleStyled, { variant: "paragraphDens", children: currentStepConfig.title }),
|
|
18
|
+
currentStepConfig.description && /* @__PURE__ */ jsx(DescriptionStyled, { variant: "body", children: currentStepConfig.description })
|
|
19
|
+
] });
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
WrapperTitle as W
|
|
23
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* El componente StepArea renderiza el área de pasos del Stepper.
|
|
3
|
+
* Muestra solo los pasos que cumplen su condition según los datos del formulario.
|
|
4
|
+
* Utiliza el hook useStepper para obtener el estado actual y los pasos definidos.
|
|
5
|
+
*/
|
|
6
|
+
export declare function StepArea(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { useFormContext, useWatch } from "react-hook-form";
|
|
4
|
+
import { u as useStepper } from "../../hooks/useStepper/index.js";
|
|
5
|
+
import { e as StepAreaStyled, f as StepStyled, g as StepNameStyled } from "../../slots/StepperSlot.js";
|
|
6
|
+
import { I as Indicator } from "./subcomponents/Inidicator/index.js";
|
|
7
|
+
import { shallow } from "zustand/shallow";
|
|
8
|
+
import { e as evaluateVisibilityStepCondition } from "../../helpers/evaluateVisibilityStepCondition/index.js";
|
|
9
|
+
function StepArea() {
|
|
10
|
+
const { trigger, clearErrors } = useFormContext();
|
|
11
|
+
const formValues = useWatch();
|
|
12
|
+
const {
|
|
13
|
+
currentStep,
|
|
14
|
+
steps,
|
|
15
|
+
visibleTitle,
|
|
16
|
+
setCurrentStep,
|
|
17
|
+
orientation,
|
|
18
|
+
setStepValidationStatus,
|
|
19
|
+
stepValidationStatus,
|
|
20
|
+
visibilityData
|
|
21
|
+
} = useStepper(
|
|
22
|
+
(state) => ({
|
|
23
|
+
currentStep: state.currentStep,
|
|
24
|
+
steps: state.steps,
|
|
25
|
+
visibleTitle: state.visibleTitle,
|
|
26
|
+
setCurrentStep: state.actions.setCurrentStep,
|
|
27
|
+
indicatorType: state.indicatorType,
|
|
28
|
+
orientation: state.orientation,
|
|
29
|
+
setStepValidationStatus: state.actions.setStepValidationStatus,
|
|
30
|
+
stepValidationStatus: state.stepValidationStatus,
|
|
31
|
+
visibilityData: state.visibilityData
|
|
32
|
+
}),
|
|
33
|
+
shallow
|
|
34
|
+
);
|
|
35
|
+
const validSteps = useMemo(() => {
|
|
36
|
+
return steps.filter(
|
|
37
|
+
(step) => evaluateVisibilityStepCondition(step, formValues || {}, visibilityData)
|
|
38
|
+
);
|
|
39
|
+
}, [steps, formValues, visibilityData]);
|
|
40
|
+
const ownerState = {
|
|
41
|
+
visibleTitle,
|
|
42
|
+
orientation,
|
|
43
|
+
totalSteps: validSteps.length
|
|
44
|
+
};
|
|
45
|
+
const handleStepClick = async (targetIndex) => {
|
|
46
|
+
const currentIndex = validSteps.findIndex(
|
|
47
|
+
(step) => step.key === steps[currentStep].key
|
|
48
|
+
);
|
|
49
|
+
if (targetIndex === currentIndex) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const isNavigatingForward = targetIndex > currentIndex;
|
|
53
|
+
const targetOriginalIndex = steps.findIndex(
|
|
54
|
+
(s) => s.key === validSteps[targetIndex].key
|
|
55
|
+
);
|
|
56
|
+
if (!isNavigatingForward) {
|
|
57
|
+
setCurrentStep(targetOriginalIndex);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const isSkippingSteps = targetIndex > currentIndex + 1;
|
|
61
|
+
if (isSkippingSteps) {
|
|
62
|
+
for (let i = currentIndex; i < targetIndex; i++) {
|
|
63
|
+
const step = validSteps[i];
|
|
64
|
+
const stepOriginalIndex = steps.findIndex((s) => s.key === step.key);
|
|
65
|
+
const isValid = await trigger(step.validationFields);
|
|
66
|
+
if (!isValid) {
|
|
67
|
+
setCurrentStep(stepOriginalIndex);
|
|
68
|
+
setStepValidationStatus(stepOriginalIndex, false);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
setStepValidationStatus(stepOriginalIndex, true);
|
|
72
|
+
}
|
|
73
|
+
} else {
|
|
74
|
+
const currentStepData = validSteps[currentIndex];
|
|
75
|
+
const currentStepOriginalIndex = steps.findIndex(
|
|
76
|
+
(s) => s.key === currentStepData.key
|
|
77
|
+
);
|
|
78
|
+
const isCurrentValid = await trigger(currentStepData.validationFields);
|
|
79
|
+
if (!isCurrentValid) {
|
|
80
|
+
setStepValidationStatus(currentStepOriginalIndex, false);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
setStepValidationStatus(currentStepOriginalIndex, true);
|
|
84
|
+
}
|
|
85
|
+
setCurrentStep(targetOriginalIndex);
|
|
86
|
+
if (isNavigatingForward) {
|
|
87
|
+
const currentStepData = validSteps[currentIndex];
|
|
88
|
+
const currentStepOriginalIndex = steps.findIndex(
|
|
89
|
+
(s) => s.key === currentStepData.key
|
|
90
|
+
);
|
|
91
|
+
const isCurrentStepValid = stepValidationStatus[currentStepOriginalIndex] !== false;
|
|
92
|
+
if (isCurrentStepValid) {
|
|
93
|
+
const targetStep = validSteps[targetIndex];
|
|
94
|
+
const targetStepFields = targetStep.validationFields || [];
|
|
95
|
+
if (targetStepFields.length > 0) {
|
|
96
|
+
clearErrors(targetStepFields);
|
|
97
|
+
setTimeout(() => {
|
|
98
|
+
clearErrors(targetStepFields);
|
|
99
|
+
setStepValidationStatus(targetOriginalIndex, true);
|
|
100
|
+
}, 100);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
return /* @__PURE__ */ jsx(StepAreaStyled, { ownerState, children: validSteps.map((step, validIndex) => {
|
|
106
|
+
const originalIndex = steps.findIndex((s) => s.key === step.key);
|
|
107
|
+
return /* @__PURE__ */ jsxs(
|
|
108
|
+
StepStyled,
|
|
109
|
+
{
|
|
110
|
+
role: "button",
|
|
111
|
+
onClick: () => handleStepClick(validIndex),
|
|
112
|
+
ownerState: { ...ownerState, currentStep, step: validIndex },
|
|
113
|
+
children: [
|
|
114
|
+
visibleTitle && /* @__PURE__ */ jsx(
|
|
115
|
+
StepNameStyled,
|
|
116
|
+
{
|
|
117
|
+
variant: "body",
|
|
118
|
+
ownerState: { ...ownerState, currentStep, step: validIndex },
|
|
119
|
+
children: step.title
|
|
120
|
+
}
|
|
121
|
+
),
|
|
122
|
+
/* @__PURE__ */ jsx(
|
|
123
|
+
Indicator,
|
|
124
|
+
{
|
|
125
|
+
currentStep,
|
|
126
|
+
step: validIndex,
|
|
127
|
+
totalSteps: validSteps.length,
|
|
128
|
+
originalStepIndex: originalIndex
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
step.key
|
|
134
|
+
);
|
|
135
|
+
}) });
|
|
136
|
+
}
|
|
137
|
+
export {
|
|
138
|
+
StepArea as S
|
|
139
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { h as IndicatorStyled, i as TextNumberStyled } from "../../../../slots/StepperSlot.js";
|
|
4
|
+
import { u as useStepper } from "../../../../hooks/useStepper/index.js";
|
|
5
|
+
import { p as pathIcons } from "../../../../icons.js";
|
|
6
|
+
import { useIsMobile } from "@m4l/graphics";
|
|
7
|
+
import { useEnvironment } from "@m4l/core";
|
|
8
|
+
import { shallow } from "zustand/shallow";
|
|
9
|
+
import { u as useComponentSize } from "../../../../../../hooks/useComponentSize/useComponentSize.js";
|
|
10
|
+
import { I as Icon } from "../../../../../Icon/Icon.js";
|
|
11
|
+
function Indicator(props) {
|
|
12
|
+
const { step, currentStep, totalSteps, originalStepIndex } = props;
|
|
13
|
+
const { orientation, size, indicatorType, stepValidationStatus } = useStepper(
|
|
14
|
+
(state) => ({
|
|
15
|
+
orientation: state.orientation,
|
|
16
|
+
size: state.size,
|
|
17
|
+
indicatorType: state.indicatorType,
|
|
18
|
+
stepValidationStatus: state.stepValidationStatus
|
|
19
|
+
}),
|
|
20
|
+
shallow
|
|
21
|
+
);
|
|
22
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
23
|
+
const { currentSize } = useComponentSize(size);
|
|
24
|
+
const ownerState = {
|
|
25
|
+
size: currentSize,
|
|
26
|
+
currentStep,
|
|
27
|
+
step,
|
|
28
|
+
totalSteps,
|
|
29
|
+
orientation,
|
|
30
|
+
indicatorType,
|
|
31
|
+
stepValidationStatus
|
|
32
|
+
};
|
|
33
|
+
const isMobile = useIsMobile();
|
|
34
|
+
const effectiveIndicatorType = useMemo(() => {
|
|
35
|
+
return isMobile ? "dot" : indicatorType;
|
|
36
|
+
}, [isMobile, indicatorType]);
|
|
37
|
+
const { isCompleted, isValidStep, hasBeenValidated } = useMemo(() => {
|
|
38
|
+
const completed = currentStep > originalStepIndex;
|
|
39
|
+
const validationStatus = stepValidationStatus[originalStepIndex];
|
|
40
|
+
const validated = validationStatus !== void 0;
|
|
41
|
+
const valid = validationStatus === true;
|
|
42
|
+
return {
|
|
43
|
+
isCompleted: completed,
|
|
44
|
+
isValidStep: valid,
|
|
45
|
+
hasBeenValidated: validated
|
|
46
|
+
};
|
|
47
|
+
}, [currentStep, originalStepIndex, stepValidationStatus]);
|
|
48
|
+
return /* @__PURE__ */ jsx(IndicatorStyled, { ownerState, children: hasBeenValidated && !isValidStep ? (
|
|
49
|
+
// Mostrar error solo si ha sido validado y es inválido
|
|
50
|
+
/* @__PURE__ */ jsx(
|
|
51
|
+
Icon,
|
|
52
|
+
{
|
|
53
|
+
src: `${host_static_assets}/${environment_assets}/${pathIcons.circleError}`,
|
|
54
|
+
size: "small",
|
|
55
|
+
color: "error.contrastText"
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
) : isCompleted && isValidStep ? (
|
|
59
|
+
// Mostrar completado solo si está completado Y es válido
|
|
60
|
+
/* @__PURE__ */ jsx(
|
|
61
|
+
Icon,
|
|
62
|
+
{
|
|
63
|
+
src: `${host_static_assets}/${environment_assets}/${effectiveIndicatorType === "number" ? pathIcons.circleCheck : pathIcons.dotOutline}`,
|
|
64
|
+
size: "small",
|
|
65
|
+
color: "primary.semanticText"
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
) : (
|
|
69
|
+
// Mostrar estado normal (número o dot) para pasos no validados o actuales
|
|
70
|
+
/* @__PURE__ */ jsx(TextNumberStyled, { variant: "body", ownerState: { currentStep, step }, children: effectiveIndicatorType === "number" ? step + 1 : /* @__PURE__ */ jsx(
|
|
71
|
+
Icon,
|
|
72
|
+
{
|
|
73
|
+
src: `${host_static_assets}/${environment_assets}/${currentStep === originalStepIndex ? pathIcons.dotSelected : pathIcons.dotOutline}`,
|
|
74
|
+
size: "small",
|
|
75
|
+
color: currentStep === originalStepIndex ? "primary.semanticText" : "text.disabled"
|
|
76
|
+
}
|
|
77
|
+
) })
|
|
78
|
+
) });
|
|
79
|
+
}
|
|
80
|
+
export {
|
|
81
|
+
Indicator as I
|
|
82
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { u as useStepperActions } from "../../../hooks/useStepperActions/index.js";
|
|
3
|
+
import { D as DICTIONARY } from "../../../dictionary.js";
|
|
4
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
5
|
+
import { B as Button } from "../../../../mui_extended/Button/Button.js";
|
|
6
|
+
function StepperCancelButton() {
|
|
7
|
+
const { getLabel } = useModuleDictionary();
|
|
8
|
+
const { cancelAction } = useStepperActions();
|
|
9
|
+
const handleCancel = () => {
|
|
10
|
+
cancelAction();
|
|
11
|
+
};
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
Button,
|
|
14
|
+
{
|
|
15
|
+
type: "button",
|
|
16
|
+
label: getLabel(DICTIONARY.LABEL_CANCEL_BUTTON),
|
|
17
|
+
variant: "outlined",
|
|
18
|
+
color: "default",
|
|
19
|
+
onClick: handleCancel
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
StepperCancelButton as S
|
|
25
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { u as useStepperActions } from "../../../hooks/useStepperActions/index.js";
|
|
3
|
+
import { p as pathIcons } from "../../../icons.js";
|
|
4
|
+
import { useIsMobile } from "@m4l/graphics";
|
|
5
|
+
import { D as DICTIONARY } from "../../../dictionary.js";
|
|
6
|
+
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
7
|
+
import { I as IconButton } from "../../../../mui_extended/IconButton/IconButton.js";
|
|
8
|
+
import { B as Button } from "../../../../mui_extended/Button/Button.js";
|
|
9
|
+
function StepperNextButton() {
|
|
10
|
+
const { nextStepAction } = useStepperActions();
|
|
11
|
+
const isMobile = useIsMobile();
|
|
12
|
+
const { getLabel } = useModuleDictionary();
|
|
13
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
14
|
+
const handleNext = async () => {
|
|
15
|
+
await nextStepAction();
|
|
16
|
+
};
|
|
17
|
+
return isMobile ? /* @__PURE__ */ jsx(
|
|
18
|
+
IconButton,
|
|
19
|
+
{
|
|
20
|
+
type: "button",
|
|
21
|
+
onClick: handleNext,
|
|
22
|
+
icon: `${host_static_assets}/${environment_assets}/${pathIcons.arrowRight}`,
|
|
23
|
+
"data-testid": "stepper-next-button",
|
|
24
|
+
variant: "contained",
|
|
25
|
+
color: "primary"
|
|
26
|
+
}
|
|
27
|
+
) : /* @__PURE__ */ jsx(
|
|
28
|
+
Button,
|
|
29
|
+
{
|
|
30
|
+
type: "button",
|
|
31
|
+
label: getLabel(DICTIONARY.LABEL_NEXT_BUTTON),
|
|
32
|
+
variant: "contained",
|
|
33
|
+
color: "primary",
|
|
34
|
+
onClick: handleNext,
|
|
35
|
+
endIcon: `${host_static_assets}/${environment_assets}/${pathIcons.arrowRight}`,
|
|
36
|
+
"data-testid": "stepper-next-button"
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
StepperNextButton as S
|
|
42
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
3
|
+
import { u as useStepper } from "../../../hooks/useStepper/index.js";
|
|
4
|
+
import { u as useStepperActions } from "../../../hooks/useStepperActions/index.js";
|
|
5
|
+
import { p as pathIcons } from "../../../icons.js";
|
|
6
|
+
import { useIsMobile } from "@m4l/graphics";
|
|
7
|
+
import { D as DICTIONARY } from "../../../dictionary.js";
|
|
8
|
+
import { I as IconButton } from "../../../../mui_extended/IconButton/IconButton.js";
|
|
9
|
+
import { B as Button } from "../../../../mui_extended/Button/Button.js";
|
|
10
|
+
function StepperPrevButton() {
|
|
11
|
+
const { currentStep } = useStepper((state) => ({
|
|
12
|
+
currentStep: state.currentStep
|
|
13
|
+
}));
|
|
14
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
15
|
+
const isMobile = useIsMobile();
|
|
16
|
+
const { getLabel } = useModuleDictionary();
|
|
17
|
+
const { prevStepAction } = useStepperActions();
|
|
18
|
+
const handlePrev = () => {
|
|
19
|
+
prevStepAction();
|
|
20
|
+
};
|
|
21
|
+
if (currentStep === 0) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
return isMobile ? /* @__PURE__ */ jsx(
|
|
25
|
+
IconButton,
|
|
26
|
+
{
|
|
27
|
+
type: "button",
|
|
28
|
+
onClick: handlePrev,
|
|
29
|
+
icon: `${host_static_assets}/${environment_assets}/${pathIcons.arrowLeft}`,
|
|
30
|
+
"data-testid": "stepper-prev-button",
|
|
31
|
+
variant: "outline",
|
|
32
|
+
color: "default"
|
|
33
|
+
}
|
|
34
|
+
) : /* @__PURE__ */ jsx(
|
|
35
|
+
Button,
|
|
36
|
+
{
|
|
37
|
+
type: "button",
|
|
38
|
+
label: !isMobile ? getLabel(DICTIONARY.LABEL_PREV_BUTTON) : "",
|
|
39
|
+
variant: "outlined",
|
|
40
|
+
color: "default",
|
|
41
|
+
onClick: handlePrev,
|
|
42
|
+
startIcon: `${host_static_assets}/${environment_assets}/${pathIcons.arrowLeft}`,
|
|
43
|
+
"data-testid": "stepper-prev-button"
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
StepperPrevButton as S
|
|
49
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { D as DICTIONARY } from "../../../dictionary.js";
|
|
3
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
4
|
+
import { B as Button } from "../../../../mui_extended/Button/Button.js";
|
|
5
|
+
function StepperSubmitButton() {
|
|
6
|
+
const { getLabel } = useModuleDictionary();
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
Button,
|
|
9
|
+
{
|
|
10
|
+
type: "submit",
|
|
11
|
+
label: getLabel(DICTIONARY.LABEL_SUBMIT_BUTTON),
|
|
12
|
+
variant: "contained",
|
|
13
|
+
color: "primary",
|
|
14
|
+
"data-testid": "stepper-submit-button"
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
StepperSubmitButton as S
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StepperContentProps } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Componente StepperContent - Contenedor que renderiza todos los Steps
|
|
4
|
+
* Cada Step maneja su propia lógica de renderizado condicional
|
|
5
|
+
* SOLO acepta componentes Step como hijos.
|
|
6
|
+
*/
|
|
7
|
+
export declare function StepperContent(props: StepperContentProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, Children, isValidElement } from "react";
|
|
3
|
+
import { S as Step } from "./subcomponents/Step/index.js";
|
|
4
|
+
function StepperContent(props) {
|
|
5
|
+
const { children } = props;
|
|
6
|
+
const validSteps = useMemo(() => {
|
|
7
|
+
const steps = [];
|
|
8
|
+
Children.forEach(children, (child) => {
|
|
9
|
+
if (isValidElement(child) && child.type === Step) {
|
|
10
|
+
steps.push(child);
|
|
11
|
+
} else {
|
|
12
|
+
throw new Error(
|
|
13
|
+
"StepperContent: Solo se permiten componentes Step como hijos."
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
return steps;
|
|
18
|
+
}, [children]);
|
|
19
|
+
return /* @__PURE__ */ jsx(Fragment, { children: validSteps });
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
StepperContent as S
|
|
23
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StepProps } from '../../../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Componente Step - Representa un paso individual en el Stepper
|
|
4
|
+
* Solo se renderiza cuando el step actual coincide con stepKey Y la condition es true
|
|
5
|
+
*/
|
|
6
|
+
export declare function Step(props: StepProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { u as useStepper } from "../../../../hooks/useStepper/index.js";
|
|
4
|
+
import { useWatch } from "react-hook-form";
|
|
5
|
+
import { e as evaluateVisibilityStepCondition } from "../../../../helpers/evaluateVisibilityStepCondition/index.js";
|
|
6
|
+
function Step(props) {
|
|
7
|
+
const { stepKey, children } = props;
|
|
8
|
+
const formValues = useWatch();
|
|
9
|
+
const { currentStep, steps, visibilityData } = useStepper((state) => ({
|
|
10
|
+
currentStep: state.currentStep,
|
|
11
|
+
steps: state.steps,
|
|
12
|
+
visibilityData: state.visibilityData
|
|
13
|
+
}));
|
|
14
|
+
const currentStepConfig = useMemo(() => {
|
|
15
|
+
return steps[currentStep];
|
|
16
|
+
}, [steps, currentStep]);
|
|
17
|
+
const stepConfig = useMemo(() => {
|
|
18
|
+
return steps.find((step) => step.key === stepKey);
|
|
19
|
+
}, [steps, stepKey]);
|
|
20
|
+
const isStepVisible = useMemo(() => {
|
|
21
|
+
if (!currentStepConfig) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
if (stepKey !== currentStepConfig.key) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
if (stepConfig && !evaluateVisibilityStepCondition(stepConfig, formValues || {}, visibilityData)) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
return true;
|
|
31
|
+
}, [currentStepConfig, stepKey, stepConfig, formValues, visibilityData]);
|
|
32
|
+
const renderedContent = useMemo(() => {
|
|
33
|
+
if (!isStepVisible) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
37
|
+
}, [isStepVisible, children]);
|
|
38
|
+
return renderedContent;
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
Step as S
|
|
42
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StepperFooterProps } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* StepperFooter es el componente footer del Stepper que contiene las acciones de navegación.
|
|
4
|
+
* Puede incluir LeftActions y RightActions como children.
|
|
5
|
+
*/
|
|
6
|
+
export declare function StepperFooter(props: StepperFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, Children, isValidElement } from "react";
|
|
3
|
+
import { j as StepperFooterSectionStyled } from "../../slots/StepperSlot.js";
|
|
4
|
+
import { S as StepperFooterLeftActions } from "./subcomponents/StepperFooterLeftActions/index.js";
|
|
5
|
+
import { S as StepperFooterRightActions } from "./subcomponents/StepperFooterRightActions/index.js";
|
|
6
|
+
function StepperFooter(props) {
|
|
7
|
+
const { children, ownerState } = props;
|
|
8
|
+
const { stepperFooterLeftActions, stepperFooterRightActions } = useMemo(() => {
|
|
9
|
+
let parsedLeftActions = null;
|
|
10
|
+
let parsedRightActions = null;
|
|
11
|
+
let leftActionsCount = 0;
|
|
12
|
+
let rightActionsCount = 0;
|
|
13
|
+
if (children) {
|
|
14
|
+
Children.forEach(children, (child) => {
|
|
15
|
+
if (isValidElement(child)) {
|
|
16
|
+
if (child.type === StepperFooterLeftActions) {
|
|
17
|
+
leftActionsCount++;
|
|
18
|
+
if (leftActionsCount > 1) {
|
|
19
|
+
throw new Error(
|
|
20
|
+
"StepperFooter: Solo se permite un componente StepperFooterLeftActions. Se encontraron múltiples StepperFooterLeftActions."
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
parsedLeftActions = child;
|
|
24
|
+
} else if (child.type === StepperFooterRightActions) {
|
|
25
|
+
rightActionsCount++;
|
|
26
|
+
if (rightActionsCount > 1) {
|
|
27
|
+
throw new Error(
|
|
28
|
+
"StepperFooter: Solo se permite un componente StepperFooterRightActions. Se encontraron múltiples StepperFooterRightActions."
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
parsedRightActions = child;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
stepperFooterLeftActions: parsedLeftActions,
|
|
38
|
+
stepperFooterRightActions: parsedRightActions
|
|
39
|
+
};
|
|
40
|
+
}, [children]);
|
|
41
|
+
return /* @__PURE__ */ jsxs(StepperFooterSectionStyled, { ownerState, children: [
|
|
42
|
+
stepperFooterLeftActions,
|
|
43
|
+
stepperFooterRightActions
|
|
44
|
+
] });
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
StepperFooter as S
|
|
48
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StepperFooterLeftActionsProps } from '../../../../types';
|
|
2
|
+
/**
|
|
3
|
+
* StepperFooterLeftActions es un componente de guía de estilos para acciones del lado izquierdo del footer del Stepper.
|
|
4
|
+
* Puede recibir children para renderizar contenido personalizado.
|
|
5
|
+
*/
|
|
6
|
+
export declare function StepperFooterLeftActions(props: StepperFooterLeftActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { k as StepperFooterLeftActionsStyled } from "../../../../slots/StepperSlot.js";
|
|
3
|
+
function StepperFooterLeftActions(props) {
|
|
4
|
+
const { children } = props;
|
|
5
|
+
return /* @__PURE__ */ jsx(StepperFooterLeftActionsStyled, { children });
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
StepperFooterLeftActions as S
|
|
9
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StepperFooterRightActionsProps } from '../../../../types';
|
|
2
|
+
/**
|
|
3
|
+
* StepperFooterRightActions es un componente de guía de estilos para acciones del lado derecho del footer del Stepper.
|
|
4
|
+
* Puede recibir children para renderizar contenido personalizado.
|
|
5
|
+
*/
|
|
6
|
+
export declare function StepperFooterRightActions(props: StepperFooterRightActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { useMemo } from "react";
|
|
3
|
+
import { u as useIsLastVisibleValidStep } from "../../../../hooks/useIsLastVisibleValidStep/index.js";
|
|
4
|
+
import { l as StepperFooterRightActionsStyled } from "../../../../slots/StepperSlot.js";
|
|
5
|
+
import { S as StepperNextButton } from "../../../StepperButtons/StepperNextButton/index.js";
|
|
6
|
+
import { S as StepperSubmitButton } from "../../../StepperButtons/StepperSubmitButton/index.js";
|
|
7
|
+
function StepperFooterRightActions(props) {
|
|
8
|
+
const { children } = props;
|
|
9
|
+
const isLastVisibleValidStep = useIsLastVisibleValidStep();
|
|
10
|
+
const childrenWithoutNextButton = useMemo(() => {
|
|
11
|
+
if (!isLastVisibleValidStep) {
|
|
12
|
+
return children;
|
|
13
|
+
}
|
|
14
|
+
return React.Children.toArray(children).filter((child) => {
|
|
15
|
+
if (React.isValidElement(child)) {
|
|
16
|
+
if (child.type === StepperNextButton) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return true;
|
|
21
|
+
});
|
|
22
|
+
}, [children, isLastVisibleValidStep]);
|
|
23
|
+
const submitButton = useMemo(() => {
|
|
24
|
+
return isLastVisibleValidStep ? /* @__PURE__ */ jsx(StepperSubmitButton, {}) : null;
|
|
25
|
+
}, [isLastVisibleValidStep]);
|
|
26
|
+
return /* @__PURE__ */ jsxs(StepperFooterRightActionsStyled, { children: [
|
|
27
|
+
childrenWithoutNextButton,
|
|
28
|
+
submitButton
|
|
29
|
+
] });
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
StepperFooterRightActions as S
|
|
33
|
+
};
|