@m4l/components 9.2.55 → 9.2.56-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/decorators/WithWindowsToolsContext/WithContextWindowTools.d.ts +5 -0
- package/.storybook/utils/flattenDeep.d.ts +8 -0
- package/.storybook/utils/getStylesColorsByMode.d.ts +4 -4
- package/@types/augmentations.d.ts +1 -1
- package/@types/types.d.ts +10 -9
- package/components/AccountPopover/AccountPopover.js +3 -4
- package/components/AccountPopover/slots/AccountPopoverSlots.d.ts +32 -32
- package/components/AccountPopover/subcomponents/MenuPopover/MenuPopover.js +13 -14
- package/components/AccountPopover/types.d.ts +2 -2
- package/components/AppBar/AppBar.js +6 -9
- package/components/AppBar/slots/AppBarSlots.d.ts +16 -16
- package/components/AppBar/styles.js +2 -1
- package/components/AppBar/types.d.ts +2 -2
- package/components/Chip/ChipStyles.js +12 -12
- package/components/Chip/slots/ChipSlots.d.ts +6 -6
- package/components/Color/Color.styles.js +11 -11
- package/components/Color/slots/ColorSlots.d.ts +5 -5
- package/components/CommonActions/components/ActionFormIntro/ActionFormIntro.js +0 -1
- package/components/CommonActions/components/ActionFormIntro/slots/ActionFormIntroSlots.d.ts +2 -2
- package/components/CommonActions/components/ActionFormIntro/types.d.ts +2 -2
- package/components/DataGrid/DataGrid.js +36 -7
- package/components/DataGrid/Datagrid.styles.js +600 -0
- package/components/DataGrid/constants.d.ts +1 -0
- package/components/DataGrid/constants.js +2 -0
- package/components/DataGrid/contexts/DataGridContext/index.js +62 -13
- package/components/DataGrid/contexts/DataGridContext/types.d.ts +5 -2
- package/components/DataGrid/dictionary.d.ts +2 -1
- package/components/DataGrid/dictionary.js +22 -21
- package/components/DataGrid/formatters/ColumnIconFormatter/formatter.js +0 -2
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/formatter.js +2 -2
- package/components/DataGrid/icons.d.ts +1 -0
- package/components/DataGrid/icons.js +4 -3
- package/components/DataGrid/slots/DataGridEnum.d.ts +6 -0
- package/components/DataGrid/slots/DataGridEnum.js +10 -2
- package/components/DataGrid/slots/DataGridSlot.d.ts +9 -0
- package/components/DataGrid/slots/DataGridSlot.js +35 -14
- package/components/DataGrid/subcomponents/ControlNavigate/ControlNavigate.d.ts +5 -0
- package/components/DataGrid/subcomponents/ControlNavigate/ControlNavigate.js +30 -0
- package/components/DataGrid/subcomponents/ControlNavigate/index.d.ts +2 -0
- package/components/DataGrid/subcomponents/ControlNavigate/types.d.ts +7 -0
- package/components/DataGrid/subcomponents/HeaderActions/index.d.ts +5 -0
- package/components/DataGrid/subcomponents/HeaderActions/index.js +40 -0
- package/components/DataGrid/subcomponents/{Actions → HeaderActions}/subcomponents/Density/index.js +8 -7
- package/components/DataGrid/subcomponents/{Actions → HeaderActions}/subcomponents/Filter/index.js +2 -2
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/MobileMenuActions/index.d.ts +7 -0
- package/components/DataGrid/subcomponents/{Actions → HeaderActions}/subcomponents/MobileMenuActions/index.js +5 -3
- package/components/DataGrid/subcomponents/{Actions → HeaderActions}/subcomponents/RowsCount/index.js +4 -4
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Settings/index.d.ts +5 -0
- package/components/DataGrid/subcomponents/{Actions → HeaderActions}/subcomponents/Settings/index.js +7 -3
- package/components/DataGrid/subcomponents/{Actions → HeaderActions}/subcomponents/Settings/subcomponents/ColumnsConfig/index.js +57 -47
- package/components/DataGrid/subcomponents/{Actions → HeaderActions}/subcomponents/Settings/subcomponents/ColumnsConfig/types.d.ts +6 -1
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Settings/types.d.ts +4 -0
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/hooks/useModalSettings/index.d.ts +8 -0
- package/components/DataGrid/subcomponents/{Actions → HeaderActions}/subcomponents/hooks/useModalSettings/index.js +13 -7
- package/components/DataGrid/subcomponents/HeaderActions/types.d.ts +5 -0
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +5 -3
- package/components/DataGrid/subcomponents/Table/index.js +4 -4
- package/components/DataGrid/subcomponents/Table/subcomponents/CustomIcons.js +12 -3
- package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.js +28 -13
- package/components/DataGrid/subcomponents/Table/subcomponents/SelectColumn.js +2 -2
- package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/index.js +4 -2
- package/components/DataGrid/subcomponents/editors/TextEditor/index.js +1 -1
- package/components/DataGrid/types.d.ts +20 -3
- package/components/DragResizeWindowRND/DragResizeWindowRND.styles.js +1 -1
- package/components/DragResizeWindowRND/slots/DragResizeWindowRNDSlots.d.ts +3 -5
- package/components/DynamicFilter/DynamicFilter.styles.js +13 -13
- package/components/DynamicFilter/dictionary.d.ts +1 -0
- package/components/DynamicFilter/dictionary.js +2 -1
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +19 -19
- package/components/DynamicFilter/store/DynamicFilterStore.js +2 -2
- package/components/DynamicFilter/subcomponents/AppliedFilters/AppliedFilters.js +2 -2
- package/components/DynamicFilter/subcomponents/AppliedFilters/useAppliedFilters.js +1 -1
- package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.js +2 -3
- package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.js +2 -2
- package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.js +3 -4
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.js +0 -1
- package/components/DynamicFilter/types.d.ts +1 -1
- package/components/DynamicSort/DynamicSort.styles.js +13 -13
- package/components/DynamicSort/slots/DynamicSortSlots.d.ts +19 -19
- package/components/DynamicSort/store/DynamicSortStore.js +2 -2
- package/components/DynamicSort/subcomponents/AppliedSorts/AppliedSorts.js +2 -2
- package/components/DynamicSort/subcomponents/PopoverMenuFields/PopoverMenuFields.js +0 -1
- package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.js +4 -5
- package/components/DynamicSort/subcomponents/SortActions/SortActions.js +2 -3
- package/components/DynamicSort/subcomponents/SortActions/useSortActions.js +2 -2
- package/components/GridLayout/styles.js +4 -82
- package/components/HelperError/HelperError.styles.js +4 -4
- package/components/Icon/Icon.js +1 -1
- package/components/Icon/Icon.styles.js +10 -10
- package/components/Image/Image.js +1 -1
- package/components/Image/image.styles.js +1 -1
- package/components/Image/slots/ImageSlots.d.ts +12 -12
- package/components/Image/subcomponents/IntersectComponent/index.js +0 -1
- package/components/Image/types.d.ts +2 -2
- package/components/Label/Label.styles.js +11 -11
- package/components/LinearProgressIndeterminate/LinearProgressIndeterminate.styles.js +3 -3
- package/components/LoadingError/LoadingError.js +1 -2
- package/components/MenuActions/MenuActions.js +4 -4
- package/components/MenuActions/MenuActions.styles.js +4 -4
- package/components/MenuActions/slots/MenuActionsSlots.d.ts +12 -12
- package/components/MenuActions/types.d.ts +3 -3
- package/components/NoItemSelected/NoItemSelected.js +3 -5
- package/components/NoItemSelected/NoItemSelected.styles.js +4 -4
- package/components/NoItemSelected/slots/NoItemSelectedSlots.d.ts +7 -7
- package/components/NumberInput/NumberInput.styles.js +20 -20
- package/components/NumberInput/slots/NumberInputSlots.d.ts +2 -2
- package/components/ObjectLogs/hooks/useDetailFormatter.js +3 -2
- package/components/ObjectLogs/slots/ObjectLogsSlots.d.ts +20 -20
- package/components/ObjectLogs/subcomponents/ObjectLogsByM4L/ObjectLogsByM4L.js +1 -3
- package/components/ObjectLogs/subcomponents/ObjectLogsByOthers/ObjectLogsByOthers.js +1 -3
- package/components/ObjectLogs/types.d.ts +2 -2
- package/components/Pager/Pager.js +2 -3
- package/components/Pager/Pager.styles.js +13 -12
- package/components/Pager/index.d.ts +2 -0
- package/components/Pager/slots/PagerEnum.d.ts +2 -1
- package/components/Pager/slots/PagerEnum.js +1 -0
- package/components/Pager/slots/PagerSlots.d.ts +1 -0
- package/components/Pager/slots/PagerSlots.js +7 -2
- package/components/Pager/subcomponents/CustomTablePagination/CustomTablePagination.js +16 -18
- package/components/Pager/subcomponents/PagerActions/PagerActions.js +4 -2
- package/components/Pager/subcomponents/PagerActions/types.d.ts +1 -0
- package/components/PaperForm/components/Header.js +2 -2
- package/components/PaperForm/slots/PaperFormSlots.d.ts +10 -10
- package/components/PaperForm/styles.js +7 -7
- package/components/PaperForm/types.d.ts +2 -2
- package/components/PrintingSystem/slots/PrintingSystemSlots.d.ts +42 -42
- package/components/PrintingSystem/subcomponents/BodyNode/index.js +0 -1
- package/components/PrintingSystem/subcomponents/ChartNode/index.js +0 -1
- package/components/PrintingSystem/subcomponents/DividerNode/index.js +0 -1
- package/components/PrintingSystem/subcomponents/FooterNode/index.js +0 -1
- package/components/PrintingSystem/subcomponents/GridNode/index.js +0 -5
- package/components/PrintingSystem/subcomponents/HeaderNode/index.js +0 -1
- package/components/PrintingSystem/subcomponents/PageNode/index.js +0 -1
- package/components/PrintingSystem/subcomponents/PaperNode/index.js +0 -5
- package/components/PrintingSystem/subcomponents/PropertyValueNode/index.js +0 -2
- package/components/PrintingSystem/subcomponents/SectionNode/index.js +0 -1
- package/components/PrintingSystem/types.d.ts +2 -2
- package/components/PropertyValue/PropertyValue.js +3 -4
- package/components/PropertyValue/PropertyValue.styles.js +3 -3
- package/components/PropertyValue/slots/PropertyValueSlots.d.ts +3 -3
- package/components/ScrollBar/ScrollBar.d.ts +3 -3
- package/components/ScrollBar/ScrollBar.js +5 -45
- package/components/ScrollBar/ScrollBar.styles.js +5 -52
- package/components/ScrollBar/constants.d.ts +4 -2
- package/components/ScrollBar/constants.js +2 -5
- package/components/ScrollBar/index.d.ts +2 -0
- package/components/ScrollBar/index.js +1 -0
- package/components/ScrollBar/slots/ScrollBarSlots.d.ts +1 -6
- package/components/ScrollBar/slots/ScrollBarSlots.js +7 -13
- package/components/ScrollBar/slots/ScrollbarEnum.d.ts +3 -0
- package/components/ScrollBar/slots/ScrollbarEnum.js +7 -0
- package/components/ScrollBar/types.d.ts +12 -42
- package/components/SideBar/slots/SideBarSlots.d.ts +34 -34
- package/components/SideBar/subcomponents/ContentComponent/style.d.ts +2 -2
- package/components/SideBar/subcomponents/ContentComponent/style.js +4 -4
- package/components/SideBar/subcomponents/ContentGroups/index.js +3 -3
- package/components/SideBar/subcomponents/ContentGroups/styles.d.ts +2 -2
- package/components/SideBar/subcomponents/ContentGroups/styles.js +11 -2
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.d.ts +2 -2
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +1 -10
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/subcomponents/ArrowIcon/index.js +0 -1
- package/components/SideBar/subcomponents/FooterSidebar/styles.d.ts +2 -2
- package/components/SideBar/subcomponents/HeaderSidebar/index.js +2 -2
- package/components/SideBar/subcomponents/HeaderSidebar/styles.d.ts +2 -2
- package/components/SideBar/subcomponents/SideBarDesktop/styles.d.ts +2 -2
- package/components/SideBar/subcomponents/SideBarDesktop/styles.js +2 -2
- package/components/SideBar/subcomponents/SideBarMobile/index.js +0 -1
- package/components/SideBar/subcomponents/SideBarMobile/styles.d.ts +2 -2
- package/components/SideBar/types.d.ts +9 -2
- package/components/ToastContainer/slots/toastContainerSlots.d.ts +2 -2
- package/components/WindowBase/WindowBase.js +8 -6
- package/components/WindowBase/WindowBase.styles.js +208 -107
- package/components/WindowBase/icons.js +2 -2
- package/components/WindowBase/slots/WindowBaseEnum.d.ts +3 -3
- package/components/WindowBase/slots/WindowBaseEnum.js +2 -2
- package/components/WindowBase/slots/WindowBaseSlots.d.ts +18 -23
- package/components/WindowBase/slots/WindowBaseSlots.js +13 -12
- package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +22 -12
- package/components/WindowBase/subcomponents/Header/types.d.ts +1 -1
- package/components/WindowBase/subcomponents/Header/useButtonActions.js +5 -2
- package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.d.ts +1 -1
- package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.js +1 -1
- package/components/WindowBase/subcomponents/MemoizedIconButton/types.d.ts +9 -0
- package/components/WindowBase/types.d.ts +10 -0
- package/components/WindowConfirm/WindowConfirm.js +2 -3
- package/components/WindowConfirm/WindowConfirm.styles.js +4 -4
- package/components/areas/components/AreasAdmin/AreasAdmin.js +12 -17
- package/components/areas/components/AreasAdmin/AreasAdmin.styles.js +13 -21
- package/components/areas/components/AreasAdmin/slots/AreasAdminSlots.d.ts +22 -22
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/AreaChip.js +1 -4
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.js +3 -4
- package/components/areas/components/AreasAdmin/types.d.ts +1 -1
- package/components/areas/components/AreasViewer/AreasViewer.js +1 -1
- package/components/areas/components/AreasViewer/AreasViewer.styles.js +2 -2
- package/components/areas/components/AreasViewer/slots/AreasViewerSlots.d.ts +5 -5
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/BaseArea.js +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +8 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.js +7 -3
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowModal/WindowModal.js +0 -1
- package/components/areas/contexts/AreasContext/index.js +1 -1
- package/components/areas/contexts/AreasContext/store.js +1 -1
- package/components/areas/contexts/AreasContext/types.d.ts +1 -1
- package/components/areas/icons.d.ts +2 -2
- package/components/areas/icons.js +4 -4
- package/components/commercial/SectionCommercial/classes/index.d.ts +2 -2
- package/components/commercial/SectionCommercial/classes/index.js +3 -3
- package/components/commercial/SectionCommercial/types.d.ts +1 -1
- package/components/extended/React-Resizable/helpers.d.ts +2 -9
- package/components/extended/React-Resizable/helpers.js +15 -13
- package/components/extended/React-Spinners/PropagateLoaderSpinner/PropagateLoaderSpinner.js +0 -1
- package/components/extended/React-Spinners/PropagateLoaderSpinner/PropagateLoaderSpinner.styles.js +1 -1
- package/components/extended/React-Spinners/PropagateLoaderSpinner/slots/PropagateLoaderSpinnerSlots.d.ts +4 -4
- package/components/extended/React-Spinners/PropagateLoaderSpinner/types.d.ts +2 -2
- package/components/extended/React-Splitter-Layout/slots/SplitLayoutSlots.d.ts +3 -3
- package/components/extended/React-resizable-panels/SplitLayout.styles.js +6 -6
- package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.d.ts +7 -7
- package/components/formatters/ChipStatusFormatter/slots/ChipStatusFormatterSlots.d.ts +2 -2
- package/components/formatters/PeriodFormatter/PeriodFormatter.styles.js +1 -1
- package/components/hook-form/RHFAutocomplete/RFHAutocompleteStyles.js +1 -1
- package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.d.ts +2 -1
- package/components/hook-form/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.js +2 -1
- package/components/hook-form/RHFDateTime/types.d.ts +1 -1
- package/components/hook-form/RHFPeriod/slots/RHFPeriodSlots.d.ts +2 -2
- package/components/hook-form/RHFSelect/RHFSelect.js +1 -1
- package/components/hook-form/RHFSelect/slots/RHFSlots.d.ts +1 -1
- package/components/hook-form/RHFSelect/slots/RHFSlots.js +1 -1
- package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +1 -1
- package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.js +1 -1
- package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.styles.js +2 -2
- package/components/hook-form/RHFTextFieldPassword/slots/RHFTextFieldPasswordSlots.d.ts +8 -8
- package/components/hook-form/RHFTextFieldPassword/types.d.ts +2 -2
- package/components/hook-form/RHFTimePicker/types.d.ts +1 -1
- package/components/hook-form/RHFUpload/RHFUploadImage/RHFUploadImage.js +1 -1
- package/components/hook-form/RHFUpload/RHFUploadImage/RHFUploadImage.styles.js +3 -3
- package/components/hook-form/RHFUpload/RHFUploadImage/slots/RHFUploadImageSlots.d.ts +22 -22
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/UploadImage.js +9 -10
- package/components/hook-form/RHFUpload/RHFUploadImage/types.d.ts +2 -2
- package/components/hook-form/RHFUpload/RHFUploadSingleFile/RHFUploadSingleFile.styles.js +2 -2
- package/components/hook-form/RHFUpload/RHFUploadSingleFile/slots/RHFUploadSingleFileSlots.d.ts +21 -21
- package/components/hook-form/RHFUpload/RHFUploadSingleFile/subcomponents/BlockContent/BlockContent.js +2 -7
- package/components/hook-form/RHFUpload/RHFUploadSingleFile/subcomponents/Preview/Preview.js +5 -6
- package/components/index.d.ts +2 -0
- package/components/mui_extended/Accordion/Accordion.js +31 -21
- package/components/mui_extended/Accordion/slots/AccordionSlots.d.ts +12 -12
- package/components/mui_extended/Accordion/styles.js +56 -33
- package/components/mui_extended/Accordion/types.d.ts +39 -6
- package/components/mui_extended/Autocomplete/Autocomplete.styles.js +3 -3
- package/components/mui_extended/Autocomplete/hooks/useEndAdornments.js +1 -1
- package/components/mui_extended/Autocomplete/renderOptions/index.d.ts +3 -1
- package/components/mui_extended/Autocomplete/renderOptions/index.js +3 -2
- package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.d.ts +16 -16
- package/components/mui_extended/Avatar/Avatar.js +1 -1
- package/components/mui_extended/Avatar/styles.js +3 -3
- package/components/mui_extended/Badge/Badge.js +14 -8
- package/components/mui_extended/Badge/Badge.styles.js +23 -33
- package/components/mui_extended/Badge/slots/BadgeSlots.d.ts +2 -2
- package/components/mui_extended/Badge/slots/BadgeSlots.js +2 -2
- package/components/mui_extended/Badge/types.d.ts +4 -3
- package/components/mui_extended/Button/ButtonStyles.js +25 -25
- package/components/mui_extended/CheckBox/CheckBox.js +2 -2
- package/components/mui_extended/CheckBox/CheckBox.styles.js +12 -12
- package/components/mui_extended/CheckBox/slots/CheckBoxSlots.d.ts +12 -12
- package/components/mui_extended/CheckBox/types.d.ts +2 -2
- package/components/mui_extended/CircularProgress/CircularProgress.styles.js +5 -5
- package/components/mui_extended/DateTimePicker/DateTimePicker.styles.js +49 -49
- package/components/mui_extended/DateTimePicker/slots/DateTimePickerSlots.d.ts +10 -10
- package/components/mui_extended/Divider/Divider.js +1 -2
- package/components/mui_extended/Divider/Divider.styles.js +9 -9
- package/components/mui_extended/IconButton/IconButton.js +39 -12
- package/components/mui_extended/IconButton/IconButton.styles.js +64 -54
- package/components/mui_extended/IconButton/helpers/evalIconColor.d.ts +1 -1
- package/components/mui_extended/IconButton/helpers/getIconButtonColors.d.ts +1 -1
- package/components/mui_extended/IconButton/helpers/getIconButtonColors.js +4 -4
- package/components/mui_extended/IconButton/slots/IconButtonSlots.d.ts +5 -7
- package/components/mui_extended/IconButton/slots/IconButtonSlots.js +4 -3
- package/components/mui_extended/IconButton/types.d.ts +10 -8
- package/components/mui_extended/LoadingButton/LoadingButton.styles.js +5 -5
- package/components/mui_extended/MenuDivider/MenuDivider.js +1 -2
- package/components/mui_extended/MenuDivider/MenuDivider.styles.js +9 -9
- package/components/mui_extended/MenuItem/MenuItem.styles.js +10 -10
- package/components/mui_extended/MenuItem/slots/MenuItemSlots.d.ts +6 -6
- package/components/mui_extended/MenuItem/types.d.ts +8 -3
- package/components/mui_extended/NavLink/NavLink.js +1 -2
- package/components/mui_extended/NavLink/NavLink.styles.js +9 -9
- package/components/mui_extended/NavLink/slots/NavLinkSlots.d.ts +4 -4
- package/components/mui_extended/Popover/Popover.js +0 -1
- package/components/mui_extended/Popover/slots/PopoverSlots.d.ts +2 -2
- package/components/mui_extended/Popover/types.d.ts +3 -3
- package/components/mui_extended/Popper/PopperStyles.js +1 -1
- package/components/mui_extended/Popper/slots/PopperStlots.d.ts +1 -1
- package/components/mui_extended/Select/Select.js +2 -3
- package/components/mui_extended/Select/Select.styles.js +10 -10
- package/components/mui_extended/Select/slots/SelectSlots.d.ts +12 -12
- package/components/mui_extended/Select/slots/SelectSlots.js +1 -1
- package/components/mui_extended/Skeleton/skeleton.styles.js +4 -4
- package/components/mui_extended/Stack/Stack.js +4 -2
- package/components/mui_extended/Stack/Stack.styles.js +7 -4
- package/components/mui_extended/Stack/slots/StackSlot.d.ts +1 -1
- package/components/mui_extended/Tab/Tab.js +2 -0
- package/components/mui_extended/Tab/Tab.styles.js +26 -48
- package/components/mui_extended/Tab/types.d.ts +4 -0
- package/components/mui_extended/TabContent/TabContent.js +1 -1
- package/components/mui_extended/TabContent/TabContent.styles.js +2 -4
- package/components/mui_extended/TabContent/slots/TabContentSlots.d.ts +2 -2
- package/components/mui_extended/TabContent/types.d.ts +2 -2
- package/components/mui_extended/Tabs/Tabs.styles.js +2 -1
- package/components/mui_extended/TextField/TextField.styles.js +22 -22
- package/components/mui_extended/TextField/slots/TextFieldSlots.d.ts +3 -3
- package/components/mui_extended/TimePicker/slots/TimePickerSlots.d.ts +8 -8
- package/components/mui_extended/ToggleIconButton/ToggleIconButton.js +12 -5
- package/components/mui_extended/ToggleIconButton/ToggleIconButton.styles.js +21 -11
- package/components/mui_extended/ToggleIconButton/constants.d.ts +7 -0
- package/components/mui_extended/ToggleIconButton/constants.js +3 -1
- package/components/mui_extended/ToggleIconButton/slots/ToggleIconButtonSlots.d.ts +1 -1
- package/components/mui_extended/ToggleIconButton/types.d.ts +9 -3
- package/components/mui_extended/Tooltip/Tooltip.styles.js +1 -1
- package/components/mui_extended/Tooltip/slots/TooltipSlots.d.ts +3 -3
- package/components/mui_extended/Typography/typography.styles.js +7 -7
- package/components/mui_extended/index.d.ts +0 -2
- package/components/popups/components/PopupsViewer/PopupsViewer.styles.js +2 -2
- package/components/popups/components/PopupsViewer/slots/popupsViewerSlots.d.ts +7 -9
- package/components/popups/components/PopupsViewer/subcomponents/Popup/Popup.js +2 -0
- package/hooks/useComponentSize/useComponentSize.d.ts +3 -3
- package/hooks/useComponentSize/useComponentSize.js +5 -2
- package/hooks/useDynamicFilterAndSort/slots/DynamicFilterAndSortSlots.d.ts +6 -6
- package/hooks/useDynamicFilterAndSort/styles.js +7 -13
- package/hooks/useDynamicFilterAndSort/types.d.ts +2 -2
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +17 -28
- package/index.js +43 -42
- package/package.json +3 -3
- package/storybook/components/Chip/Chip.stories.d.ts +4 -0
- package/storybook/components/DataGrid/DataGrid.stories.d.ts +16 -0
- package/storybook/components/Icon/Icon.stories.d.ts +4 -0
- package/storybook/components/WindowBase/windowBase.stories.d.ts +60 -7
- package/storybook/components/extended/mui/Accordion/Accordion.stories.d.ts +72 -20
- package/storybook/components/extended/mui/Badge/Badge.stories.d.ts +4 -0
- package/storybook/components/extended/mui/IconButton/IconButton.stories.d.ts +12 -0
- package/storybook/components/extended/mui/Tab/Tab.stories.d.ts +24 -24
- package/storybook/components/extended/mui/ToggleIconButton/ToggleIconButton.stories.d.ts +12 -0
- package/storybook/tootls/WrapperLineGuide/WrapperLineGuide.d.ts +9 -0
- package/storybook/tootls/WrapperLineGuide/styles.d.ts +1 -0
- package/storybook/tootls/WrapperLineGuide/types.d.ts +5 -0
- package/components/DataGrid/styles.js +0 -484
- package/components/DataGrid/subcomponents/Actions/index.d.ts +0 -5
- package/components/DataGrid/subcomponents/Actions/index.js +0 -48
- package/components/DataGrid/subcomponents/Actions/subcomponents/MobileMenuActions/index.d.ts +0 -4
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/index.d.ts +0 -4
- package/components/DataGrid/subcomponents/Actions/subcomponents/hooks/useModalSettings/index.d.ts +0 -6
- package/components/DataGrid/subcomponents/Actions/subcomponents/types.d.ts +0 -2
- package/components/DataGrid/subcomponents/Actions/types.d.ts +0 -13
- package/components/ScrollBar/slots/ScrollBarEnum.d.ts +0 -4
- package/components/ScrollBar/slots/ScrollBarEnum.js +0 -8
- package/components/ScrollBar/slots/index.d.ts +0 -2
- package/storybook/components/extended/scrollBar/ScrollBar.stories.d.ts +0 -7
- package/storybook/components/extended/scrollBar/ScrollBarDecorator.d.ts +0 -11
- /package/components/DataGrid/{styles.d.ts → Datagrid.styles.d.ts} +0 -0
- /package/components/DataGrid/subcomponents/{Actions → HeaderActions}/subcomponents/Density/index.d.ts +0 -0
- /package/components/DataGrid/subcomponents/{Actions → HeaderActions}/subcomponents/Density/types.d.ts +0 -0
- /package/components/DataGrid/subcomponents/{Actions → HeaderActions}/subcomponents/Filter/index.d.ts +0 -0
- /package/components/DataGrid/subcomponents/{Actions → HeaderActions}/subcomponents/RowsCount/index.d.ts +0 -0
- /package/components/DataGrid/subcomponents/{Actions → HeaderActions}/subcomponents/Settings/subcomponents/ColumnsConfig/index.d.ts +0 -0
- /package/components/DataGrid/subcomponents/{Actions → HeaderActions}/subcomponents/hooks/useModalSettings/types.d.ts +0 -0
- /package/components/{ScrollBar/slots → Pager}/index.js +0 -0
|
@@ -2,6 +2,10 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState, useMemo, useEffect, useCallback, createContext } from "react";
|
|
3
3
|
import { c as castMapColumnsWidthToRecord } from "../../helpers/castMapColumnsWidthToRecord.js";
|
|
4
4
|
import { useFirstRender } from "@m4l/graphics";
|
|
5
|
+
import { g as getComponentClasses } from "../../../../utils/getComponentSlotRoot.js";
|
|
6
|
+
import { D as DATAGRID_PREFIX_NAME } from "../../constants.js";
|
|
7
|
+
import { C as ControlNavigateSlots, a as ColumnsConfigSlots, T as TextEditorSlots, b as TableSlots, R as RowsCountSlots, A as ActionsSlots, D as DataGridSlots } from "../../slots/DataGridEnum.js";
|
|
8
|
+
import { deepEqual } from "fast-equals";
|
|
5
9
|
const DataGridContext = createContext(null);
|
|
6
10
|
const getColumnConfigByKey = (key, storeColumnsConfig) => {
|
|
7
11
|
let indexFind = -1;
|
|
@@ -39,7 +43,7 @@ function getColumnsConfig(id, columns, defaultUserColumns = void 0) {
|
|
|
39
43
|
index: columnConfigIndex > -1 ? columnConfigIndex : index,
|
|
40
44
|
visible: columnConfig.visible === void 0 ? true : columnConfig.visible,
|
|
41
45
|
frozen: columnConfig.frozen ?? false,
|
|
42
|
-
|
|
46
|
+
originalIndex: index,
|
|
43
47
|
originalVisible: column.visible === void 0 ? true : column.visible,
|
|
44
48
|
originalFrozen: column.frozen ?? false
|
|
45
49
|
};
|
|
@@ -107,15 +111,28 @@ function DataGridProvider(props) {
|
|
|
107
111
|
rows,
|
|
108
112
|
rowsCount,
|
|
109
113
|
rowActionsGetter,
|
|
110
|
-
rowHeights = [
|
|
111
|
-
rowHeaderHeights = [
|
|
112
|
-
initialRowHeightVariant = "
|
|
114
|
+
rowHeights = [32, 40, 48],
|
|
115
|
+
rowHeaderHeights = [32, 40, 48],
|
|
116
|
+
initialRowHeightVariant = "standard",
|
|
113
117
|
checkedRows,
|
|
114
118
|
onCheckedRowsChange,
|
|
115
119
|
rowKeyGetter,
|
|
116
|
-
onChangeUserColumns
|
|
120
|
+
onChangeUserColumns,
|
|
121
|
+
size
|
|
117
122
|
} = props;
|
|
118
|
-
const isFirstRender = useFirstRender();
|
|
123
|
+
const isFirstRender = useFirstRender([columns, id]);
|
|
124
|
+
const classes = getComponentClasses(
|
|
125
|
+
DATAGRID_PREFIX_NAME,
|
|
126
|
+
{
|
|
127
|
+
...DataGridSlots,
|
|
128
|
+
...ActionsSlots,
|
|
129
|
+
...RowsCountSlots,
|
|
130
|
+
...TableSlots,
|
|
131
|
+
...TextEditorSlots,
|
|
132
|
+
...ColumnsConfigSlots,
|
|
133
|
+
...ControlNavigateSlots
|
|
134
|
+
}
|
|
135
|
+
);
|
|
119
136
|
const [columnsWidths, setColumnsWidths] = useState(
|
|
120
137
|
/* @__PURE__ */ new Map()
|
|
121
138
|
);
|
|
@@ -154,13 +171,43 @@ function DataGridProvider(props) {
|
|
|
154
171
|
}, [defaultUserColumns]);
|
|
155
172
|
useEffect(() => {
|
|
156
173
|
if (!isFirstRender) {
|
|
174
|
+
const finalColumnsConfig = [];
|
|
175
|
+
for (let i = 0; i < columnsConfig.length; i++) {
|
|
176
|
+
const columnIndex = columns.findIndex((c) => c.key === columnsConfig[i]?.key);
|
|
177
|
+
if (columnIndex !== -1) {
|
|
178
|
+
const column = columns[columnIndex];
|
|
179
|
+
finalColumnsConfig.push({
|
|
180
|
+
...columnsConfig[i],
|
|
181
|
+
// name: column.name as string,
|
|
182
|
+
originalIndex: columnIndex,
|
|
183
|
+
originalFrozen: column.frozen ?? false,
|
|
184
|
+
originalVisible: column.visible ?? true
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
}
|
|
157
188
|
const newColumns = columns.filter((column, index) => column.key !== columnsConfig[index]?.key);
|
|
158
|
-
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
189
|
+
if (newColumns.length > 0) {
|
|
190
|
+
const colLength = finalColumnsConfig.length;
|
|
191
|
+
const newColConfig = getColumnsConfig(id, newColumns).map((columnConfig, index) => {
|
|
192
|
+
const columnIndex = columns.findIndex((c) => c.key === newColumns[index].key);
|
|
193
|
+
const column = newColumns[index];
|
|
194
|
+
const indexNewCol = index + colLength;
|
|
195
|
+
return {
|
|
196
|
+
...columnConfig,
|
|
197
|
+
index: indexNewCol,
|
|
198
|
+
name: column.name,
|
|
199
|
+
originalIndex: columnIndex,
|
|
200
|
+
originalFrozen: column.frozen ?? false,
|
|
201
|
+
originalVisible: column.visible ?? true
|
|
202
|
+
};
|
|
203
|
+
});
|
|
204
|
+
finalColumnsConfig.push(...newColConfig);
|
|
205
|
+
}
|
|
206
|
+
if (deepEqual(columnsConfig, finalColumnsConfig)) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
console.log("useEffect columnsConfig changed", columnsConfig, finalColumnsConfig);
|
|
210
|
+
setColumnsConfigOptions(finalColumnsConfig);
|
|
164
211
|
}
|
|
165
212
|
}, [columns, id]);
|
|
166
213
|
const onChangeColumnsConfig = useCallback(
|
|
@@ -234,7 +281,9 @@ function DataGridProvider(props) {
|
|
|
234
281
|
setRowHeightVariant: setCurrentRowHeightInternal,
|
|
235
282
|
onCheckedRowsChange,
|
|
236
283
|
rowKeyGetter,
|
|
237
|
-
onChangeUserColumns
|
|
284
|
+
onChangeUserColumns,
|
|
285
|
+
classes,
|
|
286
|
+
size
|
|
238
287
|
},
|
|
239
288
|
children
|
|
240
289
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { RowKey, RowHeightVariants, GridProps } from '../../types';
|
|
3
3
|
import { Maybe } from '@m4l/core';
|
|
4
|
+
import { ActionsSlots, ColumnsConfigSlots, ControlNavigateSlots, DataGridSlots, RowsCountSlots, TableSlots, TextEditorSlots } from '../../slots/DataGridEnum';
|
|
4
5
|
export interface BaseConfigColumn {
|
|
5
6
|
key: string;
|
|
6
7
|
visible: boolean;
|
|
7
8
|
index: number;
|
|
8
9
|
frozen: boolean;
|
|
9
|
-
name: string;
|
|
10
10
|
}
|
|
11
11
|
export interface IConfigColumn extends BaseConfigColumn {
|
|
12
12
|
hidden: boolean;
|
|
13
|
-
|
|
13
|
+
originalIndex: number;
|
|
14
14
|
originalVisible: boolean;
|
|
15
15
|
originalFrozen: boolean;
|
|
16
16
|
}
|
|
@@ -22,6 +22,7 @@ export interface DataGridProviderProps<TRow, TSummaryRow, TKey extends RowKey =
|
|
|
22
22
|
id: number | string;
|
|
23
23
|
children: ReactNode;
|
|
24
24
|
rowsCount: number;
|
|
25
|
+
size: GridProps<any, any, any>['size'];
|
|
25
26
|
}
|
|
26
27
|
export type RowHeightState = {
|
|
27
28
|
rowHVariant: RowHeightVariants;
|
|
@@ -39,4 +40,6 @@ export interface DataGridContextProps<TRow, TSummaryRow, TKey extends RowKey = R
|
|
|
39
40
|
onChangeColumnsConfig: (newColumnsConfig: IConfigColumn[]) => void;
|
|
40
41
|
onChangeColumnsOrder: (sourceKey: string, targetKey: string) => void;
|
|
41
42
|
onChangeColumnWidth: (columnKey: string, width: number) => void;
|
|
43
|
+
classes?: Record<DataGridSlots | ActionsSlots | RowsCountSlots | TableSlots | TextEditorSlots | ColumnsConfigSlots | ControlNavigateSlots, string>;
|
|
44
|
+
size: GridProps<any, any, any>['size'];
|
|
42
45
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
export declare const DATAGRID_DICTIONARY_ID = "data_grid";
|
|
1
2
|
/**
|
|
2
3
|
* TODO: Documentar
|
|
3
4
|
*/
|
|
4
5
|
export declare function getDataGridComponentsDictionary(): string[];
|
|
5
|
-
export declare const
|
|
6
|
+
export declare const DICTIONARY: {
|
|
6
7
|
LABEL_ACTIONS: string;
|
|
7
8
|
LABEL_ROWS_PER_PAGE: string;
|
|
8
9
|
LABEL_OF: string;
|
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
import { g as getMenuActionsComponentsDictionary } from "../MenuActions/dictionary.js";
|
|
2
2
|
import { g as getModalDictionary } from "../ModalDialog/dictionary.js";
|
|
3
3
|
import { g as getPagerComponentsDictionary } from "../Pager/dicctionary.js";
|
|
4
|
+
const DATAGRID_DICTIONARY_ID = "data_grid";
|
|
4
5
|
function getDataGridComponentsDictionary() {
|
|
5
|
-
return [
|
|
6
|
+
return [DATAGRID_DICTIONARY_ID].concat(getPagerComponentsDictionary()).concat(getMenuActionsComponentsDictionary()).concat(getModalDictionary());
|
|
6
7
|
}
|
|
7
|
-
const
|
|
8
|
-
DENSITY_COMPACT: `${
|
|
9
|
-
DENSITY_STANDARD: `${
|
|
10
|
-
DENSITY_CONFORTABLE: `${
|
|
11
|
-
DENSITY_TOOLTIP: `${
|
|
12
|
-
TOOLTIP_FILTER_HIDE: `${
|
|
13
|
-
TOOLTIP_FILTER_SHOW: `${
|
|
14
|
-
SETTINGS_COLUMN_NAME: `${
|
|
15
|
-
SETTINGS_COLUMN_POSITION: `${
|
|
16
|
-
SETTINGS_COLUMN_VISIBLE: `${
|
|
17
|
-
SETTINGS_COLUMNS_FROZEN: `${
|
|
18
|
-
SETTINGS_SEL_COLUMNS: `${
|
|
19
|
-
SETTINGS_MOVE_FIRST: `${
|
|
20
|
-
SETTINGS_MOVE_UP: `${
|
|
21
|
-
SETTINGS_MOVE_LAST: `${
|
|
22
|
-
SETTINGS_MOVE_DOWN: `${
|
|
23
|
-
SETTINGS_VISIBLE_ALL: `${
|
|
24
|
-
SETTINGS_NO_VISIBLE_ALL: `${
|
|
25
|
-
SETTINGS_RESTORE: `${
|
|
8
|
+
const DICTIONARY = {
|
|
9
|
+
DENSITY_COMPACT: `${DATAGRID_DICTIONARY_ID}.density_compact`,
|
|
10
|
+
DENSITY_STANDARD: `${DATAGRID_DICTIONARY_ID}.density_standard`,
|
|
11
|
+
DENSITY_CONFORTABLE: `${DATAGRID_DICTIONARY_ID}.density_confortable`,
|
|
12
|
+
DENSITY_TOOLTIP: `${DATAGRID_DICTIONARY_ID}.tooltip_density`,
|
|
13
|
+
TOOLTIP_FILTER_HIDE: `${DATAGRID_DICTIONARY_ID}.tooltip_filter_hide`,
|
|
14
|
+
TOOLTIP_FILTER_SHOW: `${DATAGRID_DICTIONARY_ID}.tooltip_filter_show`,
|
|
15
|
+
SETTINGS_COLUMN_NAME: `${DATAGRID_DICTIONARY_ID}.settings_column_name`,
|
|
16
|
+
SETTINGS_COLUMN_POSITION: `${DATAGRID_DICTIONARY_ID}.settings_column_position`,
|
|
17
|
+
SETTINGS_COLUMN_VISIBLE: `${DATAGRID_DICTIONARY_ID}.settings_column_visible`,
|
|
18
|
+
SETTINGS_COLUMNS_FROZEN: `${DATAGRID_DICTIONARY_ID}.settings_column_frozen`,
|
|
19
|
+
SETTINGS_SEL_COLUMNS: `${DATAGRID_DICTIONARY_ID}.settings_sel_columns`,
|
|
20
|
+
SETTINGS_MOVE_FIRST: `${DATAGRID_DICTIONARY_ID}.settings_move_first`,
|
|
21
|
+
SETTINGS_MOVE_UP: `${DATAGRID_DICTIONARY_ID}.settings_move_up`,
|
|
22
|
+
SETTINGS_MOVE_LAST: `${DATAGRID_DICTIONARY_ID}.settings_move_last`,
|
|
23
|
+
SETTINGS_MOVE_DOWN: `${DATAGRID_DICTIONARY_ID}.settings_move_down`,
|
|
24
|
+
SETTINGS_VISIBLE_ALL: `${DATAGRID_DICTIONARY_ID}.settings_visible_all`,
|
|
25
|
+
SETTINGS_NO_VISIBLE_ALL: `${DATAGRID_DICTIONARY_ID}.settings_no_visible_all`,
|
|
26
|
+
SETTINGS_RESTORE: `${DATAGRID_DICTIONARY_ID}.settings_restore`
|
|
26
27
|
};
|
|
27
28
|
export {
|
|
28
|
-
|
|
29
|
+
DICTIONARY as D,
|
|
29
30
|
getDataGridComponentsDictionary as g
|
|
30
31
|
};
|
|
@@ -24,7 +24,6 @@ function ColumnIconFormatter(props) {
|
|
|
24
24
|
children: /* @__PURE__ */ jsx(
|
|
25
25
|
IconStyled,
|
|
26
26
|
{
|
|
27
|
-
ownerState: {},
|
|
28
27
|
src: iconUrl,
|
|
29
28
|
onClick,
|
|
30
29
|
tooltipContent: tooltip,
|
|
@@ -38,7 +37,6 @@ function ColumnIconFormatter(props) {
|
|
|
38
37
|
return /* @__PURE__ */ jsx(
|
|
39
38
|
IconStyled,
|
|
40
39
|
{
|
|
41
|
-
ownerState: {},
|
|
42
40
|
src: iconUrl,
|
|
43
41
|
onClick,
|
|
44
42
|
tooltipContent: tooltip,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { C as CheckBox } from "../../../mui_extended/CheckBox/CheckBox.js";
|
|
3
3
|
function ColumnInteractiveCheckFormatter(props) {
|
|
4
4
|
const { row, onRowChange, column } = props;
|
|
5
5
|
const handleChange = () => {
|
|
@@ -8,7 +8,7 @@ function ColumnInteractiveCheckFormatter(props) {
|
|
|
8
8
|
onRowChange(newRow);
|
|
9
9
|
};
|
|
10
10
|
return /* @__PURE__ */ jsx(
|
|
11
|
-
|
|
11
|
+
CheckBox,
|
|
12
12
|
{
|
|
13
13
|
size: "small",
|
|
14
14
|
checked: row[column.key] || false,
|
|
@@ -2,8 +2,8 @@ const pathIcons = {
|
|
|
2
2
|
compact: "frontend/components/data_grid/assets/icons/compact.svg",
|
|
3
3
|
standard: "frontend/components/data_grid/assets/icons/standard.svg",
|
|
4
4
|
confortable: "frontend/components/data_grid/assets/icons/confortable.svg",
|
|
5
|
-
filter: "frontend/components/data_grid/assets/icons/filter.svg",
|
|
6
|
-
configuration: "frontend/components/data_grid/assets/icons/
|
|
5
|
+
filter: "frontend/components/data_grid/assets/icons/list-filter.svg",
|
|
6
|
+
configuration: "frontend/components/data_grid/assets/icons/settings.svg",
|
|
7
7
|
menu: "frontend/components/data_grid/assets/icons/menu.svg",
|
|
8
8
|
moveFirstPlace: "frontend/components/data_grid/assets/icons/move_first_place.svg",
|
|
9
9
|
moveUpPlace: "frontend/components/data_grid/assets/icons/move_up_place.svg",
|
|
@@ -11,7 +11,8 @@ const pathIcons = {
|
|
|
11
11
|
moveDownPlace: "frontend/components/data_grid/assets/icons/move_down_place.svg",
|
|
12
12
|
checkAll: "frontend/components/data_grid/assets/icons/check_all.svg",
|
|
13
13
|
uncheckAll: "frontend/components/data_grid/assets/icons/uncheck_all.svg",
|
|
14
|
-
restoreColumns: "frontend/components/data_grid/assets/icons/restore_columns.svg"
|
|
14
|
+
restoreColumns: "frontend/components/data_grid/assets/icons/restore_columns.svg",
|
|
15
|
+
search: "frontend/components/data_grid/assets/icons/search.svg"
|
|
15
16
|
};
|
|
16
17
|
export {
|
|
17
18
|
pathIcons as p
|
|
@@ -4,6 +4,8 @@ export declare enum DataGridSlots {
|
|
|
4
4
|
}
|
|
5
5
|
export declare enum ActionsSlots {
|
|
6
6
|
actionsRoot = "actionsRoot",
|
|
7
|
+
containerLeftActions = "containerLeftActions",
|
|
8
|
+
containerRightActions = "containerRightActions",
|
|
7
9
|
actionsConfigContainer = "actionsConfigContainer"
|
|
8
10
|
}
|
|
9
11
|
export declare enum RowsCountSlots {
|
|
@@ -15,6 +17,7 @@ export declare enum TableSlots {
|
|
|
15
17
|
tableContaniner = "tableContaniner",
|
|
16
18
|
tableWrapperDataGrid = "tableWrapperDataGrid",
|
|
17
19
|
draggableHeaderRoot = "draggableHeaderRoot",
|
|
20
|
+
iconSearch = "iconSearch",
|
|
18
21
|
draggableWrapperInputBase = "draggableWrapperInputBase",
|
|
19
22
|
headerInputBase = "headerInputBase",
|
|
20
23
|
wrapperSkeleton = "wrapperSkeleton",
|
|
@@ -29,3 +32,6 @@ export declare enum ColumnsConfigSlots {
|
|
|
29
32
|
columnsConfigDataGrid = "columnsConfigDataGrid",
|
|
30
33
|
columnsConfigActios = "columnsConfigActios"
|
|
31
34
|
}
|
|
35
|
+
export declare enum ControlNavigateSlots {
|
|
36
|
+
controlNavigate = "controlNavigate"
|
|
37
|
+
}
|
|
@@ -5,6 +5,8 @@ var DataGridSlots = /* @__PURE__ */ ((DataGridSlots2) => {
|
|
|
5
5
|
})(DataGridSlots || {});
|
|
6
6
|
var ActionsSlots = /* @__PURE__ */ ((ActionsSlots2) => {
|
|
7
7
|
ActionsSlots2["actionsRoot"] = "actionsRoot";
|
|
8
|
+
ActionsSlots2["containerLeftActions"] = "containerLeftActions";
|
|
9
|
+
ActionsSlots2["containerRightActions"] = "containerRightActions";
|
|
8
10
|
ActionsSlots2["actionsConfigContainer"] = "actionsConfigContainer";
|
|
9
11
|
return ActionsSlots2;
|
|
10
12
|
})(ActionsSlots || {});
|
|
@@ -18,6 +20,7 @@ var TableSlots = /* @__PURE__ */ ((TableSlots2) => {
|
|
|
18
20
|
TableSlots2["tableContaniner"] = "tableContaniner";
|
|
19
21
|
TableSlots2["tableWrapperDataGrid"] = "tableWrapperDataGrid";
|
|
20
22
|
TableSlots2["draggableHeaderRoot"] = "draggableHeaderRoot";
|
|
23
|
+
TableSlots2["iconSearch"] = "iconSearch";
|
|
21
24
|
TableSlots2["draggableWrapperInputBase"] = "draggableWrapperInputBase";
|
|
22
25
|
TableSlots2["headerInputBase"] = "headerInputBase";
|
|
23
26
|
TableSlots2["wrapperSkeleton"] = "wrapperSkeleton";
|
|
@@ -35,11 +38,16 @@ var ColumnsConfigSlots = /* @__PURE__ */ ((ColumnsConfigSlots2) => {
|
|
|
35
38
|
ColumnsConfigSlots2["columnsConfigActios"] = "columnsConfigActios";
|
|
36
39
|
return ColumnsConfigSlots2;
|
|
37
40
|
})(ColumnsConfigSlots || {});
|
|
41
|
+
var ControlNavigateSlots = /* @__PURE__ */ ((ControlNavigateSlots2) => {
|
|
42
|
+
ControlNavigateSlots2["controlNavigate"] = "controlNavigate";
|
|
43
|
+
return ControlNavigateSlots2;
|
|
44
|
+
})(ControlNavigateSlots || {});
|
|
38
45
|
export {
|
|
39
46
|
ActionsSlots as A,
|
|
40
|
-
|
|
47
|
+
ControlNavigateSlots as C,
|
|
41
48
|
DataGridSlots as D,
|
|
42
49
|
RowsCountSlots as R,
|
|
43
50
|
TextEditorSlots as T,
|
|
44
|
-
|
|
51
|
+
ColumnsConfigSlots as a,
|
|
52
|
+
TableSlots as b
|
|
45
53
|
};
|
|
@@ -11,6 +11,8 @@ export declare const CustomHeaderStyled: import('@emotion/styled').StyledCompone
|
|
|
11
11
|
* ****************
|
|
12
12
|
*/
|
|
13
13
|
export declare const ActionsRootStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
14
|
+
export declare const ContainerLeftActionsStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
15
|
+
export declare const ContainerRightActionsStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
14
16
|
export declare const ActionsConfigContainerStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
15
17
|
/**
|
|
16
18
|
* ****************
|
|
@@ -37,6 +39,7 @@ export declare const ColumnsConfigActiosStyled: import('@emotion/styled').Styled
|
|
|
37
39
|
export declare const TableContainerStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
38
40
|
export declare const TableWrapperDataGridStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
39
41
|
export declare const DraggableHeaderRootStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
42
|
+
export declare const IconSearchStyled: import('@emotion/styled').StyledComponent<any, {}, {}>;
|
|
40
43
|
export declare const DraggableWrapperInputBaseStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
41
44
|
export declare const HeaderInputBaseStyled: import('@emotion/styled').StyledComponent<any, {}, {}>;
|
|
42
45
|
export declare const WrapperSkeletonStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
@@ -47,3 +50,9 @@ export declare const ContentModalSettingStyled: import('@emotion/styled').Styled
|
|
|
47
50
|
* ****************
|
|
48
51
|
*/
|
|
49
52
|
export declare const InputTextEditorStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, keyof import('react').ClassAttributes<HTMLInputElement> | keyof import('react').InputHTMLAttributes<HTMLInputElement>>, {}>;
|
|
53
|
+
/**
|
|
54
|
+
* ****************
|
|
55
|
+
* Slots ControlNavigate
|
|
56
|
+
* ****************
|
|
57
|
+
*/
|
|
58
|
+
export declare const ControlNavigateStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { styled } from "@mui/material/styles";
|
|
2
2
|
import { InputBase } from "@mui/material";
|
|
3
3
|
import { D as DATAGRID_PREFIX_NAME } from "../constants.js";
|
|
4
|
-
import { D as DataGridSlots, T as TextEditorSlots, A as ActionsSlots,
|
|
5
|
-
import { d as dataGridStyles } from "../styles.js";
|
|
4
|
+
import { D as DataGridSlots, T as TextEditorSlots, A as ActionsSlots, b as TableSlots, C as ControlNavigateSlots, R as RowsCountSlots, a as ColumnsConfigSlots } from "./DataGridEnum.js";
|
|
5
|
+
import { d as dataGridStyles } from "../Datagrid.styles.js";
|
|
6
|
+
import { I as Icon } from "../../Icon/Icon.js";
|
|
6
7
|
const DataGridRootStyled = styled("div", {
|
|
7
8
|
name: DATAGRID_PREFIX_NAME,
|
|
8
9
|
slot: DataGridSlots.datagridRoot
|
|
@@ -15,6 +16,14 @@ const ActionsRootStyled = styled("div", {
|
|
|
15
16
|
name: DATAGRID_PREFIX_NAME,
|
|
16
17
|
slot: ActionsSlots.actionsRoot
|
|
17
18
|
})(dataGridStyles.actionsRoot);
|
|
19
|
+
const ContainerLeftActionsStyled = styled("div", {
|
|
20
|
+
name: DATAGRID_PREFIX_NAME,
|
|
21
|
+
slot: ActionsSlots.containerLeftActions
|
|
22
|
+
})(dataGridStyles.containerLeftActions);
|
|
23
|
+
const ContainerRightActionsStyled = styled("div", {
|
|
24
|
+
name: DATAGRID_PREFIX_NAME,
|
|
25
|
+
slot: ActionsSlots.containerRightActions
|
|
26
|
+
})(dataGridStyles.containerRightActions);
|
|
18
27
|
const ActionsConfigContainerStyled = styled("div", {
|
|
19
28
|
name: DATAGRID_PREFIX_NAME,
|
|
20
29
|
slot: ActionsSlots.actionsConfigContainer
|
|
@@ -59,6 +68,10 @@ const DraggableHeaderRootStyled = styled("div", {
|
|
|
59
68
|
name: DATAGRID_PREFIX_NAME,
|
|
60
69
|
slot: TableSlots.draggableHeaderRoot
|
|
61
70
|
})(dataGridStyles.draggableHeaderRoot);
|
|
71
|
+
const IconSearchStyled = styled(Icon, {
|
|
72
|
+
name: DATAGRID_PREFIX_NAME,
|
|
73
|
+
slot: TableSlots.iconSearch
|
|
74
|
+
})(dataGridStyles.iconSearch);
|
|
62
75
|
const DraggableWrapperInputBaseStyled = styled("div", {
|
|
63
76
|
name: DATAGRID_PREFIX_NAME,
|
|
64
77
|
slot: TableSlots.draggableWrapperInputBase
|
|
@@ -79,24 +92,32 @@ const InputTextEditorStyled = styled("input", {
|
|
|
79
92
|
name: DATAGRID_PREFIX_NAME,
|
|
80
93
|
slot: TextEditorSlots.inputTexEditor
|
|
81
94
|
})(dataGridStyles.inputTexEditor);
|
|
95
|
+
const ControlNavigateStyled = styled("div", {
|
|
96
|
+
name: DATAGRID_PREFIX_NAME,
|
|
97
|
+
slot: ControlNavigateSlots.controlNavigate
|
|
98
|
+
})(dataGridStyles.controlNavigate);
|
|
82
99
|
export {
|
|
83
100
|
ActionsRootStyled as A,
|
|
84
101
|
CustomHeaderStyled as C,
|
|
85
102
|
DataGridRootStyled as D,
|
|
86
103
|
HeaderInputBaseStyled as H,
|
|
87
|
-
|
|
104
|
+
IconSearchStyled as I,
|
|
88
105
|
RowsCountRootStyled as R,
|
|
89
106
|
TableWrapperDataGridStyled as T,
|
|
90
107
|
WrapperSkeletonStyled as W,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
108
|
+
ControlNavigateStyled as a,
|
|
109
|
+
ActionsConfigContainerStyled as b,
|
|
110
|
+
ContainerLeftActionsStyled as c,
|
|
111
|
+
ContainerRightActionsStyled as d,
|
|
112
|
+
RowsCountLabelStyled as e,
|
|
113
|
+
RowsCountValueStyled as f,
|
|
114
|
+
ColumnsConfigWrapperStyled as g,
|
|
115
|
+
ColumnsConfigDataGridStyled as h,
|
|
116
|
+
ColumnsConfigSelColumnsStyled as i,
|
|
117
|
+
ColumnsConfigActiosStyled as j,
|
|
118
|
+
ContentModalSettingStyled as k,
|
|
119
|
+
TableContainerStyled as l,
|
|
120
|
+
DraggableHeaderRootStyled as m,
|
|
121
|
+
DraggableWrapperInputBaseStyled as n,
|
|
122
|
+
InputTextEditorStyled as o
|
|
102
123
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useIsMobile } from "@m4l/graphics";
|
|
3
|
+
import { a as ControlNavigateStyled } from "../../slots/DataGridSlot.js";
|
|
4
|
+
import { R as RowsCount } from "../HeaderActions/subcomponents/RowsCount/index.js";
|
|
5
|
+
import { u as useComponentSize } from "../../../../hooks/useComponentSize/useComponentSize.js";
|
|
6
|
+
import { P as Pager } from "../../../Pager/Pager.js";
|
|
7
|
+
const ControlNavigate = (props) => {
|
|
8
|
+
const {
|
|
9
|
+
withRowsCount = true,
|
|
10
|
+
withPager = true,
|
|
11
|
+
pagerOptions,
|
|
12
|
+
size
|
|
13
|
+
} = props;
|
|
14
|
+
const isMobile = useIsMobile();
|
|
15
|
+
const { currentSize } = useComponentSize(size);
|
|
16
|
+
return /* @__PURE__ */ jsxs(ControlNavigateStyled, { ownerState: { size: currentSize }, children: [
|
|
17
|
+
withRowsCount && !withPager && !isMobile && /* @__PURE__ */ jsx(RowsCount, {}),
|
|
18
|
+
withPager && pagerOptions && /* @__PURE__ */ jsx(
|
|
19
|
+
Pager,
|
|
20
|
+
{
|
|
21
|
+
...pagerOptions,
|
|
22
|
+
size,
|
|
23
|
+
totalRecords: pagerOptions.totalRecords
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
] });
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
ControlNavigate as C
|
|
30
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ActionsProps, DataGridProps } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Props del componente ControlNavigate
|
|
4
|
+
*/
|
|
5
|
+
export interface ControlNavigateProps extends Pick<ActionsProps, 'withRowsCount' | 'withPager' | 'pagerOptions'> {
|
|
6
|
+
size?: DataGridProps<unknown, unknown>['size'];
|
|
7
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { F as Filter } from "./subcomponents/Filter/index.js";
|
|
3
|
+
import { S as Settings } from "./subcomponents/Settings/index.js";
|
|
4
|
+
import { D as Density } from "./subcomponents/Density/index.js";
|
|
5
|
+
import { u as useDataGrid } from "../../hooks/useDataGrid.js";
|
|
6
|
+
import { useIsMobile } from "@m4l/graphics";
|
|
7
|
+
import { M as MobileMenuActions } from "./subcomponents/MobileMenuActions/index.js";
|
|
8
|
+
import { A as ActionsRootStyled, b as ActionsConfigContainerStyled, c as ContainerLeftActionsStyled, d as ContainerRightActionsStyled } from "../../slots/DataGridSlot.js";
|
|
9
|
+
import { u as useComponentSize } from "../../../../hooks/useComponentSize/useComponentSize.js";
|
|
10
|
+
function HeaderActions(props) {
|
|
11
|
+
const {
|
|
12
|
+
withSettings = true,
|
|
13
|
+
settingsProps,
|
|
14
|
+
withLocalFilters,
|
|
15
|
+
leftActions: LeftActions,
|
|
16
|
+
rightActions: RightActions,
|
|
17
|
+
withPager,
|
|
18
|
+
size,
|
|
19
|
+
columns
|
|
20
|
+
} = props;
|
|
21
|
+
const isMobile = useIsMobile();
|
|
22
|
+
const { rowHeights } = useDataGrid();
|
|
23
|
+
const { currentSize } = useComponentSize(size);
|
|
24
|
+
return /* @__PURE__ */ jsx(ActionsRootStyled, { ownerState: { size: currentSize }, children: isMobile ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
25
|
+
LeftActions,
|
|
26
|
+
/* @__PURE__ */ jsx(MobileMenuActions, { columns }),
|
|
27
|
+
RightActions
|
|
28
|
+
] }) : /* @__PURE__ */ jsxs(ActionsConfigContainerStyled, { ownerState: { withPager }, children: [
|
|
29
|
+
/* @__PURE__ */ jsxs(ContainerLeftActionsStyled, { children: [
|
|
30
|
+
LeftActions,
|
|
31
|
+
typeof rowHeights !== "number" && /* @__PURE__ */ jsx(Density, {}),
|
|
32
|
+
withLocalFilters && /* @__PURE__ */ jsx(Filter, {}),
|
|
33
|
+
withSettings && /* @__PURE__ */ jsx(Settings, { ...settingsProps, columns })
|
|
34
|
+
] }),
|
|
35
|
+
RightActions && /* @__PURE__ */ jsx(ContainerRightActionsStyled, { children: RightActions })
|
|
36
|
+
] }) });
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
HeaderActions as H
|
|
40
|
+
};
|
package/components/DataGrid/subcomponents/{Actions → HeaderActions}/subcomponents/Density/index.js
RENAMED
|
@@ -5,7 +5,7 @@ import { useTheme } from "@mui/material";
|
|
|
5
5
|
import { M as MenuActions } from "../../../../../MenuActions/MenuActions.js";
|
|
6
6
|
import { u as useDataGrid } from "../../../../hooks/useDataGrid.js";
|
|
7
7
|
import { p as pathIcons } from "../../../../icons.js";
|
|
8
|
-
import {
|
|
8
|
+
import { D as DICTIONARY } from "../../../../dictionary.js";
|
|
9
9
|
function Density() {
|
|
10
10
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
11
11
|
const { rowHeights, currentRowHeightVariant, setRowHeightVariant } = useDataGrid();
|
|
@@ -20,21 +20,21 @@ function Density() {
|
|
|
20
20
|
startIcon: `${host_static_assets}/${environment_assets}/${pathIcons.compact}`,
|
|
21
21
|
onClick: () => setRowHeightVariant("compact"),
|
|
22
22
|
disabled: currentRowHeightVariant === "compact",
|
|
23
|
-
label: getLabel(
|
|
23
|
+
label: getLabel(DICTIONARY.DENSITY_COMPACT)
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
type: "menuItem",
|
|
27
27
|
startIcon: `${host_static_assets}/${environment_assets}/${pathIcons.standard}`,
|
|
28
28
|
onClick: () => setRowHeightVariant("standard"),
|
|
29
29
|
disabled: currentRowHeightVariant === "standard",
|
|
30
|
-
label: getLabel(
|
|
30
|
+
label: getLabel(DICTIONARY.DENSITY_STANDARD)
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
type: "menuItem",
|
|
34
34
|
startIcon: `${host_static_assets}/${environment_assets}/${pathIcons.confortable}`,
|
|
35
35
|
onClick: () => setRowHeightVariant("confortable"),
|
|
36
36
|
disabled: currentRowHeightVariant === "confortable",
|
|
37
|
-
label: getLabel(
|
|
37
|
+
label: getLabel(DICTIONARY.DENSITY_CONFORTABLE)
|
|
38
38
|
}
|
|
39
39
|
];
|
|
40
40
|
}, [
|
|
@@ -62,11 +62,12 @@ function Density() {
|
|
|
62
62
|
{
|
|
63
63
|
arrowType: "right-top",
|
|
64
64
|
menuActionSx: theme.components?.M4LDataGridDensityPopover?.styleOverrides,
|
|
65
|
-
anchorOrigin: { vertical: "
|
|
66
|
-
transformOrigin: { vertical: "top", horizontal: "
|
|
65
|
+
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
66
|
+
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
67
67
|
menuActions,
|
|
68
68
|
icon: currenViewIcon,
|
|
69
|
-
toolTip: getLabel(
|
|
69
|
+
toolTip: getLabel(DICTIONARY.DENSITY_TOOLTIP),
|
|
70
|
+
paperProps: { style: { marginTop: "5px" } }
|
|
70
71
|
}
|
|
71
72
|
);
|
|
72
73
|
}
|
package/components/DataGrid/subcomponents/{Actions → HeaderActions}/subcomponents/Filter/index.js
RENAMED
|
@@ -3,7 +3,7 @@ import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
|
3
3
|
import { u as useFilters } from "../../../../hooks/useFilters.js";
|
|
4
4
|
import { I as IconButton } from "../../../../../mui_extended/IconButton/IconButton.js";
|
|
5
5
|
import { p as pathIcons } from "../../../../icons.js";
|
|
6
|
-
import {
|
|
6
|
+
import { D as DICTIONARY } from "../../../../dictionary.js";
|
|
7
7
|
function Filter() {
|
|
8
8
|
const { activeFilters, setActiveFilters } = useFilters();
|
|
9
9
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
@@ -14,7 +14,7 @@ function Filter() {
|
|
|
14
14
|
return /* @__PURE__ */ jsx(
|
|
15
15
|
IconButton,
|
|
16
16
|
{
|
|
17
|
-
tooltip: activeFilters ? getLabel(
|
|
17
|
+
tooltip: activeFilters ? getLabel(DICTIONARY.TOOLTIP_FILTER_HIDE) : getLabel(DICTIONARY.TOOLTIP_FILTER_SHOW),
|
|
18
18
|
onClick: toggleIcon,
|
|
19
19
|
"aria-label": "filter",
|
|
20
20
|
icon: `${host_static_assets}/${environment_assets}/${pathIcons.filter}`
|