@m4l/components 9.3.12-JT290825.beta.1 → 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/{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/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.styles.js +23 -3
- package/components/Stepper/hooks/useIsLastVisibleValidStep/index.js +15 -6
- package/components/Stepper/hooks/useStepper/index.js +4 -10
- package/components/Stepper/hooks/useStepperActions/index.d.ts +8 -1
- package/components/Stepper/hooks/useStepperActions/index.js +76 -1
- package/components/Stepper/slots/StepperEnum.d.ts +1 -0
- package/components/Stepper/slots/StepperEnum.js +1 -0
- package/components/Stepper/slots/StepperSlot.d.ts +3 -0
- package/components/Stepper/slots/StepperSlot.js +14 -9
- package/components/Stepper/store/StepperContext/index.d.ts +9 -4
- package/components/Stepper/store/StepperContext/index.js +1 -13
- package/components/Stepper/store/StepperStore/index.js +9 -30
- package/components/Stepper/store/types.d.ts +1 -18
- package/components/Stepper/subcomponents/ContentArea/index.js +2 -2
- package/components/Stepper/subcomponents/ContentArea/subcomponents/WrapperIcon/index.js +3 -3
- package/components/Stepper/subcomponents/ContentArea/subcomponents/WrapperTitle/index.js +1 -1
- package/components/Stepper/subcomponents/StepArea/index.js +16 -12
- package/components/Stepper/subcomponents/StepArea/subcomponents/Inidicator/index.js +13 -16
- package/components/Stepper/subcomponents/StepperButtons/StepperCancelButton/index.js +1 -1
- package/components/Stepper/subcomponents/StepperButtons/StepperNextButton/index.js +3 -7
- package/components/Stepper/subcomponents/StepperButtons/StepperPrevButton/index.js +6 -9
- package/components/Stepper/subcomponents/StepperFooter/index.js +1 -1
- package/components/Stepper/subcomponents/StepperFooter/subcomponents/StepperFooterLeftActions/index.js +1 -1
- package/components/Stepper/subcomponents/StepperFooter/subcomponents/StepperFooterRightActions/index.js +1 -1
- 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/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/Stepper/hooks/useStepperActions/useStepperActions.d.ts +0 -8
- package/components/Stepper/hooks/useStepperActions/useStepperActions.js +0 -63
- 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/Stepper/Stepper.stories.d.ts +0 -28
- package/storybook/components/Stepper/api/userApi.d.ts +0 -6
- package/storybook/components/Stepper/components/AdminPermissionsStep.d.ts +0 -4
- package/storybook/components/Stepper/components/CompanySocialMediaStep.d.ts +0 -4
- package/storybook/components/Stepper/components/CompanyStep.d.ts +0 -4
- package/storybook/components/Stepper/components/ContactStep.d.ts +0 -4
- package/storybook/components/Stepper/components/ExtraInformationStep.d.ts +0 -4
- package/storybook/components/Stepper/components/ModulePermissionsStep.d.ts +0 -4
- package/storybook/components/Stepper/components/PrivilegesStep.d.ts +0 -4
- package/storybook/components/Stepper/helpers/useSteps.d.ts +0 -43
- package/storybook/components/Stepper/subcomponents/StepperDecorator.d.ts +0 -9
- package/storybook/components/Stepper/validations/CompanyData.d.ts +0 -18
- package/storybook/components/Stepper/validations/ContactData.d.ts +0 -11
- package/storybook/components/Stepper/validations/ExtraInformationData.d.ts +0 -9
- package/storybook/components/Stepper/validations/PrivilegesData.d.ts +0 -14
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RowType } from './types';
|
|
2
|
-
import { RawFilterFieldApply } from '
|
|
3
|
-
import { RawSortFieldApply } from '
|
|
2
|
+
import { RawFilterFieldApply } from '../../../DynamicFilter/types';
|
|
3
|
+
import { RawSortFieldApply } from '../../../DynamicSort/types';
|
|
4
4
|
/**
|
|
5
5
|
* Función que simula el comportamiento del backend
|
|
6
6
|
* Recibe exactamente los mismos parámetros que se enviarían al backend real
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RenderHeaderCellProps } from 'react-data-grid';
|
|
2
|
-
import { ChipStatusFormatterProps } from '
|
|
3
|
-
import { DeepKeyOf } from '../../../../
|
|
4
|
-
import { ColumnAlign } from '
|
|
2
|
+
import { ChipStatusFormatterProps } from '../../../formatters/ChipStatusFormatter/types';
|
|
3
|
+
import { DeepKeyOf } from '../../../../utils/types';
|
|
4
|
+
import { ColumnAlign } from '../../types';
|
|
5
5
|
export interface SeedProps {
|
|
6
6
|
quantity: number;
|
|
7
7
|
withBoolean?: boolean;
|
|
@@ -4,8 +4,8 @@ import { SeedProps } from './types';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare const useSeed: (props: SeedProps) => {
|
|
6
6
|
columns: readonly import('react-data-grid').Column<import('./types').RowType, unknown>[];
|
|
7
|
-
filters: import('
|
|
8
|
-
sorts: import('
|
|
7
|
+
filters: import('../../..').FilterField[];
|
|
8
|
+
sorts: import('../../..').SortField[];
|
|
9
9
|
rows: import('./types').RowType[];
|
|
10
10
|
rowsMultiSort: import('./types').RowType[];
|
|
11
11
|
};
|
|
@@ -28,6 +28,6 @@ export declare const IconStyled: import('@emotion/styled').StyledComponent<Pick<
|
|
|
28
28
|
export declare const IconClickeableStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Icon').IconProps, keyof import('../../Icon').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
29
29
|
ownerState?: (Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown>) | undefined;
|
|
30
30
|
}, {}, {}>;
|
|
31
|
-
export declare const ReactJsonSlot: import('@emotion/styled').StyledComponent<Pick<import('
|
|
31
|
+
export declare const ReactJsonSlot: import('@emotion/styled').StyledComponent<Pick<import('../../extended/React-Json-Viewer/types').ReactJsonViewerProps, keyof import('../../extended/React-Json-Viewer/types').ReactJsonViewerProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
32
32
|
ownerState?: (Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown>) | undefined;
|
|
33
33
|
}, {}, {}>;
|
|
@@ -4,7 +4,7 @@ import { o as objectLogsStyles } from "../ObjectLogs.styles.js";
|
|
|
4
4
|
import { S as Stack } from "../../mui_extended/Stack/Stack.js";
|
|
5
5
|
import { W as WindowBase } from "../../WindowBase/WindowBase.js";
|
|
6
6
|
import { D as DetailDialog } from "../subcomponents/DetailDialog/index.js";
|
|
7
|
-
import
|
|
7
|
+
import { R as ReactJsonViewer } from "../../extended/React-Json-Viewer/ReactJsonViewer.js";
|
|
8
8
|
import { O as ObjectLogsSlots } from "./ObjectLogsEnum.js";
|
|
9
9
|
import { T as Tooltip } from "../../mui_extended/Tooltip/Tooltip.js";
|
|
10
10
|
import { I as IconButton } from "../../mui_extended/IconButton/IconButton.js";
|
|
@@ -49,7 +49,7 @@ const IconClickeableStyled = styled(Icon, {
|
|
|
49
49
|
name: OBJECT_LOGS_KEY_COMPONENT,
|
|
50
50
|
slot: ObjectLogsSlots.iconClickeableStyled
|
|
51
51
|
})(objectLogsStyles?.iconClickeableStyled);
|
|
52
|
-
styled(
|
|
52
|
+
styled(ReactJsonViewer, {
|
|
53
53
|
name: OBJECT_LOGS_KEY_COMPONENT,
|
|
54
54
|
slot: ObjectLogsSlots.reactJsonSlot
|
|
55
55
|
})(objectLogsStyles?.reactJsonSlot);
|
|
@@ -18,6 +18,9 @@ const stepperStyles = {
|
|
|
18
18
|
*/
|
|
19
19
|
contentSection: ({ theme, ownerState }) => ({
|
|
20
20
|
display: "flex",
|
|
21
|
+
flex: 1,
|
|
22
|
+
height: "100%",
|
|
23
|
+
overflow: "hidden",
|
|
21
24
|
flexDirection: ownerState?.orientation === "vertical" || theme.generalSettings.isMobile ? "column" : "row",
|
|
22
25
|
gap: theme.vars.size.baseSpacings.sp8
|
|
23
26
|
}),
|
|
@@ -30,9 +33,11 @@ const stepperStyles = {
|
|
|
30
33
|
alignItems: "start",
|
|
31
34
|
width: "100%",
|
|
32
35
|
minWidth: "350px",
|
|
33
|
-
overflowX: "auto"
|
|
36
|
+
overflowX: "auto",
|
|
37
|
+
overflowY: "hidden"
|
|
34
38
|
} : {
|
|
35
|
-
maxWidth: "116px"
|
|
39
|
+
maxWidth: "116px",
|
|
40
|
+
overflowY: "auto"
|
|
36
41
|
}
|
|
37
42
|
}),
|
|
38
43
|
/**
|
|
@@ -194,7 +199,22 @@ const stepperStyles = {
|
|
|
194
199
|
contentAreaHeader: ({ theme }) => ({
|
|
195
200
|
display: "flex",
|
|
196
201
|
alignItems: "center",
|
|
197
|
-
gap: theme.size.baseSpacings.sp3
|
|
202
|
+
gap: theme.size.baseSpacings.sp3,
|
|
203
|
+
position: "sticky",
|
|
204
|
+
top: 0,
|
|
205
|
+
backgroundColor: theme.vars.palette.background.default,
|
|
206
|
+
zIndex: 10,
|
|
207
|
+
paddingBottom: theme.vars.size.baseSpacings.sp2
|
|
208
|
+
}),
|
|
209
|
+
/**
|
|
210
|
+
* Estilos para el cuerpo del área de contenido del Stepper
|
|
211
|
+
*/
|
|
212
|
+
contentAreaBody: ({ theme }) => ({
|
|
213
|
+
flex: 1,
|
|
214
|
+
overflowY: "auto",
|
|
215
|
+
display: "flex",
|
|
216
|
+
flexDirection: "column",
|
|
217
|
+
gap: theme.vars.size.baseSpacings.sp6
|
|
198
218
|
}),
|
|
199
219
|
/**
|
|
200
220
|
* Estilos para el contenedor del icono del titulo del Stepper.
|
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
import { useFormContext } from "react-hook-form";
|
|
2
2
|
import { u as useStepper } from "../useStepper/index.js";
|
|
3
|
+
import { shallow } from "zustand/shallow";
|
|
3
4
|
import { i as isLastVisibleValidStep } from "../../helpers/isLastVisibleValidStep/index.js";
|
|
4
5
|
const useIsLastVisibleValidStep = () => {
|
|
5
6
|
const { getValues } = useFormContext();
|
|
6
|
-
const { currentStep, steps, visibilityData } = useStepper(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
const { currentStep, steps, visibilityData } = useStepper(
|
|
8
|
+
(state) => ({
|
|
9
|
+
currentStep: state.currentStep,
|
|
10
|
+
steps: state.steps,
|
|
11
|
+
visibilityData: state.visibilityData
|
|
12
|
+
}),
|
|
13
|
+
shallow
|
|
14
|
+
);
|
|
11
15
|
const formData = getValues();
|
|
12
|
-
return isLastVisibleValidStep(
|
|
16
|
+
return isLastVisibleValidStep(
|
|
17
|
+
currentStep,
|
|
18
|
+
steps || [],
|
|
19
|
+
formData,
|
|
20
|
+
visibilityData
|
|
21
|
+
);
|
|
13
22
|
};
|
|
14
23
|
export {
|
|
15
24
|
useIsLastVisibleValidStep as u
|
|
@@ -3,17 +3,11 @@ import { useStore } from "zustand";
|
|
|
3
3
|
import { shallow } from "zustand/shallow";
|
|
4
4
|
import { a as StepperContext } from "../../store/StepperContext/index.js";
|
|
5
5
|
function useStepper(selector, equalityFn) {
|
|
6
|
-
const
|
|
7
|
-
if (!
|
|
8
|
-
throw new Error(
|
|
9
|
-
"useStepperStore context must be use inside StepperContext"
|
|
10
|
-
);
|
|
6
|
+
const store = useContext(StepperContext);
|
|
7
|
+
if (!store) {
|
|
8
|
+
throw new Error("useStepper context must be use inside StepperContext");
|
|
11
9
|
}
|
|
12
|
-
|
|
13
|
-
const storeData = useStore(store, selector, equalityFn ?? shallow);
|
|
14
|
-
return {
|
|
15
|
-
...storeData
|
|
16
|
-
};
|
|
10
|
+
return useStore(store, selector, equalityFn ?? shallow);
|
|
17
11
|
}
|
|
18
12
|
export {
|
|
19
13
|
useStepper as u
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* useActions - Hook/función que expone las acciones del Stepper para uso externo
|
|
3
|
+
*/
|
|
4
|
+
export declare function useStepperActions(): {
|
|
5
|
+
prevStepAction: () => void;
|
|
6
|
+
nextStepAction: () => Promise<boolean>;
|
|
7
|
+
cancelAction: () => void;
|
|
8
|
+
};
|
|
@@ -1 +1,76 @@
|
|
|
1
|
-
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
import { u as useStepper } from "../useStepper/index.js";
|
|
3
|
+
import { useFormContext } from "react-hook-form";
|
|
4
|
+
import { shallow } from "zustand/shallow";
|
|
5
|
+
function useStepperActions() {
|
|
6
|
+
const { trigger, clearErrors, getValues, reset } = useFormContext();
|
|
7
|
+
const {
|
|
8
|
+
nextStep,
|
|
9
|
+
prevStep,
|
|
10
|
+
currentStep,
|
|
11
|
+
steps,
|
|
12
|
+
setStepValidationStatus,
|
|
13
|
+
resetStepper
|
|
14
|
+
} = useStepper(
|
|
15
|
+
(state) => ({
|
|
16
|
+
nextStep: state.actions.nextStep,
|
|
17
|
+
prevStep: state.actions.prevStep,
|
|
18
|
+
currentStep: state.currentStep,
|
|
19
|
+
steps: state.steps,
|
|
20
|
+
setStepValidationStatus: state.actions.setStepValidationStatus,
|
|
21
|
+
resetStepper: state.actions.resetStepper
|
|
22
|
+
}),
|
|
23
|
+
shallow
|
|
24
|
+
);
|
|
25
|
+
const prevStepAction = useCallback(() => {
|
|
26
|
+
const formData = getValues();
|
|
27
|
+
prevStep(formData);
|
|
28
|
+
}, [prevStep, getValues]);
|
|
29
|
+
const nextStepAction = useCallback(async () => {
|
|
30
|
+
const formData = getValues();
|
|
31
|
+
const futureSteps = steps.slice(currentStep + 1);
|
|
32
|
+
const futureFields = [];
|
|
33
|
+
futureSteps.forEach((step) => {
|
|
34
|
+
if (step.validationFields) {
|
|
35
|
+
futureFields.push(...step.validationFields);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
const validateFn = async () => {
|
|
39
|
+
const currentStepData = steps[currentStep];
|
|
40
|
+
const fieldsToValidate = currentStepData?.validationFields || [];
|
|
41
|
+
if (fieldsToValidate.length === 0) {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
return await trigger(fieldsToValidate);
|
|
45
|
+
};
|
|
46
|
+
const success = await nextStep(validateFn, formData);
|
|
47
|
+
if (success && futureFields.length > 0) {
|
|
48
|
+
clearErrors(futureFields);
|
|
49
|
+
setTimeout(() => {
|
|
50
|
+
clearErrors(futureFields);
|
|
51
|
+
futureSteps.forEach((_, index) => {
|
|
52
|
+
const stepIndex = currentStep + 1 + index;
|
|
53
|
+
setStepValidationStatus(stepIndex, true);
|
|
54
|
+
});
|
|
55
|
+
}, 100);
|
|
56
|
+
}
|
|
57
|
+
return success;
|
|
58
|
+
}, [
|
|
59
|
+
nextStep,
|
|
60
|
+
clearErrors,
|
|
61
|
+
setStepValidationStatus,
|
|
62
|
+
steps,
|
|
63
|
+
currentStep,
|
|
64
|
+
trigger,
|
|
65
|
+
getValues
|
|
66
|
+
]);
|
|
67
|
+
const cancelAction = useCallback(() => {
|
|
68
|
+
reset();
|
|
69
|
+
clearErrors();
|
|
70
|
+
resetStepper();
|
|
71
|
+
}, [reset, clearErrors, resetStepper]);
|
|
72
|
+
return { prevStepAction, nextStepAction, cancelAction };
|
|
73
|
+
}
|
|
74
|
+
export {
|
|
75
|
+
useStepperActions as u
|
|
76
|
+
};
|
|
@@ -12,6 +12,7 @@ export declare enum ContentSlots {
|
|
|
12
12
|
export declare enum ContentAreaSlots {
|
|
13
13
|
contentArea = "contentArea",
|
|
14
14
|
contentAreaHeader = "contentAreaHeader",
|
|
15
|
+
contentAreaBody = "contentAreaBody",
|
|
15
16
|
wrapperIcon = "wrapperIcon",
|
|
16
17
|
wrapperTitle = "wrapperTitle",
|
|
17
18
|
icon = "icon",
|
|
@@ -14,6 +14,7 @@ var ContentSlots = /* @__PURE__ */ ((ContentSlots2) => {
|
|
|
14
14
|
var ContentAreaSlots = /* @__PURE__ */ ((ContentAreaSlots2) => {
|
|
15
15
|
ContentAreaSlots2["contentArea"] = "contentArea";
|
|
16
16
|
ContentAreaSlots2["contentAreaHeader"] = "contentAreaHeader";
|
|
17
|
+
ContentAreaSlots2["contentAreaBody"] = "contentAreaBody";
|
|
17
18
|
ContentAreaSlots2["wrapperIcon"] = "wrapperIcon";
|
|
18
19
|
ContentAreaSlots2["wrapperTitle"] = "wrapperTitle";
|
|
19
20
|
ContentAreaSlots2["icon"] = "icon";
|
|
@@ -25,6 +25,9 @@ export declare const IndicatorStyled: import('@emotion/styled').StyledComponent<
|
|
|
25
25
|
export declare const TextNumberStyled: import('@emotion/styled').StyledComponent<Pick<import('../../mui_extended/Typography/types').TypographyProps, keyof import('../../mui_extended/Typography/types').TypographyProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
26
26
|
ownerState?: (Partial<import('../types').StepperOwnerState> & Record<string, unknown>) | undefined;
|
|
27
27
|
}, {}, {}>;
|
|
28
|
+
export declare const ContentAreaBodyStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
29
|
+
ownerState?: (Partial<import('../types').StepperOwnerState> & Record<string, unknown>) | undefined;
|
|
30
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
28
31
|
export declare const ContentAreaHeaderStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
29
32
|
ownerState?: (Partial<import('../types').StepperOwnerState> & Record<string, unknown>) | undefined;
|
|
30
33
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
@@ -36,6 +36,10 @@ const TextNumberStyled = styled(Typography, {
|
|
|
36
36
|
name: STEPPER_PREFIX_NAME,
|
|
37
37
|
slot: ContentSlots.textNumber
|
|
38
38
|
})(stepperStyles.textNumber);
|
|
39
|
+
const ContentAreaBodyStyled = styled("div", {
|
|
40
|
+
name: STEPPER_PREFIX_NAME,
|
|
41
|
+
slot: ContentAreaSlots.contentAreaBody
|
|
42
|
+
})(stepperStyles.contentAreaBody);
|
|
39
43
|
const ContentAreaHeaderStyled = styled("div", {
|
|
40
44
|
name: STEPPER_PREFIX_NAME,
|
|
41
45
|
slot: ContentAreaSlots.contentAreaHeader
|
|
@@ -85,13 +89,14 @@ export {
|
|
|
85
89
|
WrapperIconStyled as W,
|
|
86
90
|
ContentAreaStyled as a,
|
|
87
91
|
ContentAreaHeaderStyled as b,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
92
|
+
ContentAreaBodyStyled as c,
|
|
93
|
+
WrapperTitleStyled as d,
|
|
94
|
+
StepAreaStyled as e,
|
|
95
|
+
StepStyled as f,
|
|
96
|
+
StepNameStyled as g,
|
|
97
|
+
IndicatorStyled as h,
|
|
98
|
+
TextNumberStyled as i,
|
|
99
|
+
StepperFooterSectionStyled as j,
|
|
100
|
+
StepperFooterLeftActionsStyled as k,
|
|
101
|
+
StepperFooterRightActionsStyled as l
|
|
97
102
|
};
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { StepperContextProps } from '../types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} |
|
|
2
|
+
declare const StepperContext: import('react').Context<(Omit<Omit<import('zustand').StoreApi<import('../types').StepperStateWithActions>, "setState"> & {
|
|
3
|
+
setState<A extends string | {
|
|
4
|
+
type: unknown;
|
|
5
|
+
}>(partial: import('../types').StepperStateWithActions | Partial<import('../types').StepperStateWithActions> | ((state: import('../types').StepperStateWithActions) => import('../types').StepperStateWithActions | Partial<import('../types').StepperStateWithActions>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
6
|
+
}, "setState"> & {
|
|
7
|
+
setState(nextStateOrUpdater: import('../types').StepperStateWithActions | Partial<import('../types').StepperStateWithActions> | ((state: import('immer/dist/internal').WritableDraft<import('../types').StepperStateWithActions>) => void), shouldReplace?: boolean | undefined, action?: string | {
|
|
8
|
+
type: unknown;
|
|
9
|
+
} | undefined): void;
|
|
10
|
+
}) | null>;
|
|
6
11
|
/**
|
|
7
12
|
* Contexto que crea y da alcance al Store (Zustand) para ser usado desde cualquier parte del componente.
|
|
8
13
|
* @param props StepperProps
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { createContext, useRef, useEffect } from "react";
|
|
3
|
-
import { useEnvironment } from "@m4l/core";
|
|
4
3
|
import { c as createStepperStore } from "../StepperStore/index.js";
|
|
5
4
|
import { f as findNextVisibleValidStep } from "../../helpers/findNextVisibleValidStep/index.js";
|
|
6
5
|
const StepperContext = createContext(null);
|
|
@@ -15,7 +14,6 @@ const StepperProvider = (props) => {
|
|
|
15
14
|
visibilityData,
|
|
16
15
|
children
|
|
17
16
|
} = props;
|
|
18
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
19
17
|
const stepperStoreRef = useRef();
|
|
20
18
|
const prevVisibilityDataRef = useRef(visibilityData);
|
|
21
19
|
if (!stepperStoreRef.current) {
|
|
@@ -25,8 +23,6 @@ const StepperProvider = (props) => {
|
|
|
25
23
|
steps,
|
|
26
24
|
visibleTitle,
|
|
27
25
|
ownerState: {},
|
|
28
|
-
host_static_assets,
|
|
29
|
-
environment_assets,
|
|
30
26
|
indicatorType,
|
|
31
27
|
orientation,
|
|
32
28
|
visibilityData
|
|
@@ -87,15 +83,7 @@ const StepperProvider = (props) => {
|
|
|
87
83
|
}
|
|
88
84
|
prevVisibilityDataRef.current = visibilityData;
|
|
89
85
|
}, [steps, visibilityData]);
|
|
90
|
-
return /* @__PURE__ */ jsx(
|
|
91
|
-
StepperContext.Provider,
|
|
92
|
-
{
|
|
93
|
-
value: {
|
|
94
|
-
store: stepperStoreRef.current
|
|
95
|
-
},
|
|
96
|
-
children
|
|
97
|
-
}
|
|
98
|
-
);
|
|
86
|
+
return /* @__PURE__ */ jsx(StepperContext.Provider, { value: stepperStoreRef.current, children });
|
|
99
87
|
};
|
|
100
88
|
export {
|
|
101
89
|
StepperProvider as S,
|
|
@@ -14,7 +14,6 @@ const createDevtools = (immerMiddlewere, config) => {
|
|
|
14
14
|
const createStepperStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
15
15
|
const startProps = {
|
|
16
16
|
currentStep: 0,
|
|
17
|
-
completedSteps: [],
|
|
18
17
|
stepValidationStatus: {},
|
|
19
18
|
isValidating: false,
|
|
20
19
|
...initProps
|
|
@@ -33,7 +32,6 @@ const createStepperStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
|
33
32
|
init: (steps) => {
|
|
34
33
|
set((state) => {
|
|
35
34
|
state.steps = steps;
|
|
36
|
-
state.completedSteps = [];
|
|
37
35
|
state.stepValidationStatus = {};
|
|
38
36
|
});
|
|
39
37
|
},
|
|
@@ -45,17 +43,6 @@ const createStepperStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
|
45
43
|
state.currentStep = currentStep;
|
|
46
44
|
});
|
|
47
45
|
},
|
|
48
|
-
/**
|
|
49
|
-
* setCompletedStep es la acción que se ejecuta para marcar un paso como completado
|
|
50
|
-
* @param stepIndex - Índice del paso a marcar como completado
|
|
51
|
-
*/
|
|
52
|
-
setCompletedStep: (stepIndex) => {
|
|
53
|
-
set((state) => {
|
|
54
|
-
if (!state.completedSteps.includes(stepIndex)) {
|
|
55
|
-
state.completedSteps.push(stepIndex);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
},
|
|
59
46
|
/**
|
|
60
47
|
* setStepValidationStatus es la acción que se ejecuta para establecer el estado de validación de un paso
|
|
61
48
|
* @param stepIndex
|
|
@@ -99,31 +86,24 @@ const createStepperStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
|
99
86
|
const state = get();
|
|
100
87
|
const { currentStep, steps } = state;
|
|
101
88
|
const dataForVisibility = visibilityData ?? state.visibilityData;
|
|
102
|
-
set((draft) => {
|
|
103
|
-
draft.isValidating = true;
|
|
104
|
-
});
|
|
105
89
|
const isValid = await validateFn();
|
|
106
|
-
if (!isValid) {
|
|
107
|
-
set((draft) => {
|
|
108
|
-
draft.isValidating = false;
|
|
109
|
-
});
|
|
110
|
-
state.actions.setStepValidationStatus(currentStep, false);
|
|
111
|
-
return false;
|
|
112
|
-
}
|
|
113
|
-
state.actions.setStepValidationStatus(currentStep, true);
|
|
114
90
|
const nextValidStepIndex = findNextVisibleValidStep(
|
|
115
91
|
currentStep,
|
|
116
92
|
steps,
|
|
117
93
|
formData,
|
|
118
94
|
dataForVisibility
|
|
119
95
|
);
|
|
120
|
-
|
|
96
|
+
if (!isValid) {
|
|
97
|
+
set((draft) => {
|
|
98
|
+
draft.isValidating = false;
|
|
99
|
+
draft.stepValidationStatus[currentStep] = false;
|
|
100
|
+
});
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
121
103
|
set((draft) => {
|
|
122
|
-
if (!draft.completedSteps.includes(currentStep)) {
|
|
123
|
-
draft.completedSteps.push(currentStep);
|
|
124
|
-
}
|
|
125
|
-
draft.currentStep = nextValidStepIndex;
|
|
126
104
|
draft.isValidating = false;
|
|
105
|
+
draft.stepValidationStatus[currentStep] = true;
|
|
106
|
+
draft.currentStep = nextValidStepIndex;
|
|
127
107
|
});
|
|
128
108
|
return true;
|
|
129
109
|
},
|
|
@@ -133,7 +113,6 @@ const createStepperStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
|
133
113
|
resetStepper: () => {
|
|
134
114
|
set((state) => {
|
|
135
115
|
state.currentStep = 0;
|
|
136
|
-
state.completedSteps = [];
|
|
137
116
|
state.stepValidationStatus = {};
|
|
138
117
|
state.isValidating = false;
|
|
139
118
|
});
|
|
@@ -9,18 +9,6 @@ export interface StepperState extends Pick<StepperProps, 'storeId' | 'visibleTit
|
|
|
9
9
|
* "currentStep" step actual
|
|
10
10
|
*/
|
|
11
11
|
currentStep: number;
|
|
12
|
-
/**
|
|
13
|
-
* "host_static_assets" ruta base de los assets estáticos
|
|
14
|
-
*/
|
|
15
|
-
host_static_assets: string;
|
|
16
|
-
/**
|
|
17
|
-
* "environment_assets" ruta del entorno de assets
|
|
18
|
-
*/
|
|
19
|
-
environment_assets: string;
|
|
20
|
-
/**
|
|
21
|
-
* "completedSteps" pasos completados
|
|
22
|
-
*/
|
|
23
|
-
completedSteps: number[];
|
|
24
12
|
/**
|
|
25
13
|
* "stepValidationStatus" estado de validación por cada step
|
|
26
14
|
* - true: el paso es válido
|
|
@@ -42,11 +30,6 @@ export interface StepperStateWithActions extends StepperState {
|
|
|
42
30
|
* @param currentStep - Índice del paso actual
|
|
43
31
|
*/
|
|
44
32
|
setCurrentStep: (currentStep: number) => void;
|
|
45
|
-
/**
|
|
46
|
-
* Marca un paso como completado
|
|
47
|
-
* @param stepIndex - Índice del paso
|
|
48
|
-
*/
|
|
49
|
-
setCompletedStep: (stepIndex: number) => void;
|
|
50
33
|
/**
|
|
51
34
|
* Establece el estado de validación de un paso
|
|
52
35
|
* @param stepIndex - Índice del paso
|
|
@@ -75,4 +58,4 @@ export interface StepperStateWithActions extends StepperState {
|
|
|
75
58
|
export interface StepperContextProps extends StepperProps {
|
|
76
59
|
children: ReactNode;
|
|
77
60
|
}
|
|
78
|
-
export type InitialStoreProps = Pick<StepperState, 'ownerState' | 'storeId' | 'steps' | 'visibleTitle' | '
|
|
61
|
+
export type InitialStoreProps = Pick<StepperState, 'ownerState' | 'storeId' | 'steps' | 'visibleTitle' | 'indicatorType' | 'orientation' | 'visibilityData'>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { u as useStepper } from "../../hooks/useStepper/index.js";
|
|
3
|
-
import { a as ContentAreaStyled, b as ContentAreaHeaderStyled } from "../../slots/StepperSlot.js";
|
|
3
|
+
import { a as ContentAreaStyled, b as ContentAreaHeaderStyled, c as ContentAreaBodyStyled } from "../../slots/StepperSlot.js";
|
|
4
4
|
import { W as WrapperIcon } from "./subcomponents/WrapperIcon/index.js";
|
|
5
5
|
import { W as WrapperTitle } from "./subcomponents/WrapperTitle/index.js";
|
|
6
6
|
function ContentArea(props) {
|
|
@@ -16,7 +16,7 @@ function ContentArea(props) {
|
|
|
16
16
|
/* @__PURE__ */ jsx(WrapperIcon, {}),
|
|
17
17
|
/* @__PURE__ */ jsx(WrapperTitle, {})
|
|
18
18
|
] }),
|
|
19
|
-
children
|
|
19
|
+
/* @__PURE__ */ jsx(ContentAreaBodyStyled, { children })
|
|
20
20
|
] });
|
|
21
21
|
}
|
|
22
22
|
export {
|
|
@@ -3,13 +3,13 @@ import { useMemo } from "react";
|
|
|
3
3
|
import { W as WrapperIconStyled, I as IconStyled } from "../../../../slots/StepperSlot.js";
|
|
4
4
|
import { p as pathIcons } from "../../../../icons.js";
|
|
5
5
|
import { u as useStepper } from "../../../../hooks/useStepper/index.js";
|
|
6
|
+
import { useEnvironment } from "@m4l/core";
|
|
6
7
|
function WrapperIcon() {
|
|
7
|
-
const { steps, currentStep
|
|
8
|
-
host_static_assets: state.host_static_assets,
|
|
9
|
-
environment_assets: state.environment_assets,
|
|
8
|
+
const { steps, currentStep } = useStepper((state) => ({
|
|
10
9
|
steps: state.steps,
|
|
11
10
|
currentStep: state.currentStep
|
|
12
11
|
}));
|
|
12
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
13
13
|
const currentStepConfig = useMemo(() => {
|
|
14
14
|
return steps[currentStep];
|
|
15
15
|
}, [steps, currentStep]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { u as useStepper } from "../../../../hooks/useStepper/index.js";
|
|
4
|
-
import {
|
|
4
|
+
import { d as WrapperTitleStyled, T as TitleStyled, D as DescriptionStyled } from "../../../../slots/StepperSlot.js";
|
|
5
5
|
function WrapperTitle() {
|
|
6
6
|
const { steps, currentStep } = useStepper((state) => ({
|
|
7
7
|
steps: state.steps,
|
|
@@ -2,8 +2,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { useFormContext, useWatch } from "react-hook-form";
|
|
4
4
|
import { u as useStepper } from "../../hooks/useStepper/index.js";
|
|
5
|
-
import {
|
|
5
|
+
import { e as StepAreaStyled, f as StepStyled, g as StepNameStyled } from "../../slots/StepperSlot.js";
|
|
6
6
|
import { I as Indicator } from "./subcomponents/Inidicator/index.js";
|
|
7
|
+
import { shallow } from "zustand/shallow";
|
|
7
8
|
import { e as evaluateVisibilityStepCondition } from "../../helpers/evaluateVisibilityStepCondition/index.js";
|
|
8
9
|
function StepArea() {
|
|
9
10
|
const { trigger, clearErrors } = useFormContext();
|
|
@@ -17,17 +18,20 @@ function StepArea() {
|
|
|
17
18
|
setStepValidationStatus,
|
|
18
19
|
stepValidationStatus,
|
|
19
20
|
visibilityData
|
|
20
|
-
} = useStepper(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
+
);
|
|
31
35
|
const validSteps = useMemo(() => {
|
|
32
36
|
return steps.filter(
|
|
33
37
|
(step) => evaluateVisibilityStepCondition(step, formValues || {}, visibilityData)
|