@m4l/components 9.4.10-JT14012026.beta.1 → 9.4.11
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/components/AccountPopover/slots/AccountPopoverSlots.d.ts +6 -6
- package/components/ActionsGroup/slots/ActionsGroupSlots.d.ts +2 -2
- package/components/AppBar/slots/AppBarSlots.d.ts +1 -1
- package/components/Card/constants.d.ts +1 -1
- package/components/CheckableList/slots/styled.d.ts +9 -9
- package/components/Chip/slots/ChipSlots.d.ts +2 -2
- package/components/CommonActions/components/ActionCancel/slots/ActionsCancelSlots.d.ts +1 -1
- package/components/CommonActions/components/ActionFormCancel/slots/ActionFormCancelSlots.d.ts +1 -1
- package/components/CommonActions/components/ActionFormSubmitProgrammatic/ActionFormSubmitProgrammatic.d.ts +34 -0
- package/components/CommonActions/components/ActionFormSubmitProgrammatic/ActionFormSubmitProgrammatic.js +46 -0
- package/components/CommonActions/components/ActionFormSubmitProgrammatic/ActionFormSubmitProgrammatic.styles.d.ts +2 -0
- package/components/CommonActions/components/ActionFormSubmitProgrammatic/ActionFormSubmitProgrammatic.styles.js +7 -0
- package/components/CommonActions/components/ActionFormSubmitProgrammatic/constanst.d.ts +6 -0
- package/components/CommonActions/components/ActionFormSubmitProgrammatic/constanst.js +7 -0
- package/components/CommonActions/components/ActionFormSubmitProgrammatic/index.d.ts +2 -0
- package/components/CommonActions/components/ActionFormSubmitProgrammatic/slots/ActionFormSubmitProgrammaticEnum.d.ts +3 -0
- package/components/CommonActions/components/ActionFormSubmitProgrammatic/slots/ActionFormSubmitProgrammaticEnum.js +7 -0
- package/components/CommonActions/components/ActionFormSubmitProgrammatic/slots/ActionFormSubmitProgrammaticSlots.d.ts +1 -0
- package/components/CommonActions/components/ActionFormSubmitProgrammatic/slots/ActionFormSubmitProgrammaticSlots.js +12 -0
- package/components/CommonActions/components/ActionFormSubmitProgrammatic/slots/index.d.ts +2 -0
- package/components/CommonActions/components/ActionFormSubmitProgrammatic/types.d.ts +36 -0
- package/components/CommonActions/components/ActionIntro/slots/ActionsIntroSlots.d.ts +1 -1
- package/components/CommonActions/components/ActionsContainer/slots/ActionsContainerSlots.d.ts +1 -1
- package/components/CommonActions/index.d.ts +1 -0
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +2 -2
- package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.d.ts +21 -1
- package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.js +8 -3
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.d.ts +1 -1
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.js +5 -2
- package/components/DynamicSort/slots/DynamicSortSlots.d.ts +2 -2
- package/components/DynamicSort/subcomponents/PopoverMenuFields/PopoverMenuFields.d.ts +1 -1
- package/components/DynamicSort/subcomponents/PopoverMenuFields/PopoverMenuFields.js +6 -3
- package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.d.ts +21 -1
- package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.js +8 -3
- package/components/EditLabel/slots/EditLabelSlots.d.ts +4 -4
- package/components/GridLayout/classes/index.d.ts +1 -1
- package/components/HelperError/slots/HelperErrorSlots.d.ts +1 -1
- package/components/ImageText/constants.d.ts +1 -1
- package/components/ImageText/slots/ImageTextSlots.d.ts +2 -2
- package/components/Label/slots/LabelSlots.d.ts +3 -3
- package/components/LanguagePopover/slots/LanguagePopoverSlots.d.ts +1 -1
- package/components/LoadingError/slots/LoadingErrorSlots.d.ts +1 -1
- package/components/MFIsolationApp/slots/MFIsolationAppSlots.d.ts +2 -2
- package/components/MenuActions/constants.d.ts +1 -1
- package/components/MenuActions/slots/MenuActionsSlots.d.ts +2 -2
- package/components/ModalDialog/slots/ModalDialogSlots.d.ts +2 -2
- package/components/NumberInput/hooks/useNumberInput/useNumberInput.js +2 -0
- package/components/NumberInput/slots/NumberInputSlots.d.ts +2 -2
- package/components/ObjectLogs/slots/ObjectLogsSlots.d.ts +2 -2
- package/components/Pager/slots/PagerSlots.d.ts +3 -3
- package/components/PaperForm/slots/PaperFormSlots.d.ts +1 -1
- package/components/SettingsLayout/slots/SettingsLayoutSlots.d.ts +3 -3
- package/components/SideBar/slots/SideBarSlots.d.ts +1 -1
- package/components/Stepper/slots/StepperSlot.d.ts +4 -4
- package/components/TabsNavigator/slots/TabsNavigatorSlots.d.ts +2 -2
- package/components/ToastContainer/slots/toastContainerSlots.d.ts +4 -4
- package/components/WindowBase/slots/WindowBaseSlots.d.ts +2 -2
- package/components/areas/components/AreasAdmin/slots/AreasAdminSlots.d.ts +3 -3
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.d.ts +1 -1
- package/components/areas/contexts/AreasContext/store.js +1 -1
- package/components/datagrids/Datagrid.styles.js +0 -24
- package/components/datagrids/components/DataGridMain/DataGridMain.js +134 -22
- package/components/datagrids/constants.js +5 -3
- package/components/datagrids/contexts/DataGridContext/DataGridContext.js +4 -8
- package/components/datagrids/contexts/DataGridContext/types.d.ts +3 -19
- package/components/datagrids/dictionary.d.ts +0 -3
- package/components/datagrids/dictionary.js +0 -4
- package/components/datagrids/formatters/ColumnBooleanFormatter/index.d.ts +0 -1
- package/components/datagrids/formatters/ColumnBooleanFormatter/useColumnBoolean.d.ts +0 -1
- package/components/datagrids/formatters/ColumnBooleanFormatter/useColumnBoolean.js +0 -2
- package/components/datagrids/formatters/ColumnChipStatusFormatter/index.d.ts +0 -1
- package/components/datagrids/formatters/ColumnChipStatusFormatter/useColumnChipStatus.d.ts +0 -1
- package/components/datagrids/formatters/ColumnChipStatusFormatter/useColumnChipStatus.js +0 -2
- package/components/datagrids/formatters/ColumnColorFormatter/index.d.ts +0 -1
- package/components/datagrids/formatters/ColumnColorFormatter/useColumnColor.d.ts +0 -1
- package/components/datagrids/formatters/ColumnColorFormatter/useColumnColor.js +1 -3
- package/components/datagrids/formatters/ColumnConcatenatedValuesFormatter/index.d.ts +0 -1
- package/components/datagrids/formatters/ColumnConcatenatedValuesFormatter/useColumnConcatenatedValues.d.ts +0 -1
- package/components/datagrids/formatters/ColumnConcatenatedValuesFormatter/useColumnConcatenatedValues.js +0 -2
- package/components/datagrids/formatters/ColumnDateFormatter/index.d.ts +0 -1
- package/components/datagrids/formatters/ColumnDateFormatter/useColumnDate.d.ts +0 -1
- package/components/datagrids/formatters/ColumnDateFormatter/useColumnDate.js +0 -2
- package/components/datagrids/formatters/ColumnIconFormatter/index.d.ts +0 -1
- package/components/datagrids/formatters/ColumnIconFormatter/useColumnIcon.d.ts +0 -1
- package/components/datagrids/formatters/ColumnIconFormatter/useColumnIcon.js +1 -3
- package/components/datagrids/formatters/ColumnImageFormatter/index.d.ts +0 -1
- package/components/datagrids/formatters/ColumnImageFormatter/useColumnImage.d.ts +0 -1
- package/components/datagrids/formatters/ColumnImageFormatter/useColumnImage.js +1 -3
- package/components/datagrids/formatters/ColumnInteractiveCheckFormatter/formatter.d.ts +1 -12
- package/components/datagrids/formatters/ColumnInteractiveCheckFormatter/formatter.js +0 -6
- package/components/datagrids/formatters/ColumnNestedValueFormatter/index.d.ts +0 -1
- package/components/datagrids/formatters/ColumnNestedValueFormatter/useColumnNestedValue.d.ts +0 -1
- package/components/datagrids/formatters/ColumnNestedValueFormatter/useColumnNestedValue.js +0 -2
- package/components/datagrids/formatters/ColumnPointsFormatter/index.d.ts +0 -1
- package/components/datagrids/formatters/ColumnPointsFormatter/useColumnPoints.d.ts +0 -1
- package/components/datagrids/formatters/ColumnPointsFormatter/useColumnPoints.js +0 -2
- package/components/datagrids/formatters/ColumnPriceFormatter/index.d.ts +0 -1
- package/components/datagrids/formatters/ColumnPriceFormatter/useColumnPrice.d.ts +0 -1
- package/components/datagrids/formatters/ColumnPriceFormatter/useColumnPrice.js +0 -2
- package/components/datagrids/formatters/ColumnTagsFormatter/index.d.ts +0 -1
- package/components/datagrids/formatters/ColumnTagsFormatter/useColumnTags.d.ts +0 -1
- package/components/datagrids/formatters/ColumnTagsFormatter/useColumnTags.js +0 -2
- package/components/datagrids/formatters/ColumnUncertaintyFormatter/index.d.ts +0 -1
- package/components/datagrids/formatters/ColumnUncertaintyFormatter/useColumnUncertainty.d.ts +0 -1
- package/components/datagrids/formatters/ColumnUncertaintyFormatter/useColumnUncertainty.js +0 -2
- package/components/datagrids/helpers/shared/getInitialColumnsConfig/getInitialColumnsConfig.js +0 -8
- package/components/datagrids/helpers/shared/getViewSpecificConfig/getViewSpecificConfig.js +3 -10
- package/components/datagrids/hooks/useChangeColumnsOrder/useChangeColumnsOrder.d.ts +0 -1
- package/components/datagrids/hooks/useChangeColumnsOrder/useChangeColumnsOrder.js +4 -12
- package/components/datagrids/icons.d.ts +0 -5
- package/components/datagrids/icons.js +1 -5
- package/components/datagrids/index.d.ts +1 -2
- package/components/datagrids/slots/DataGridEnum.d.ts +1 -3
- package/components/datagrids/slots/DataGridEnum.js +0 -2
- package/components/datagrids/slots/DataGridSlot.d.ts +0 -2
- package/components/datagrids/slots/DataGridSlot.js +2 -12
- package/components/datagrids/types.d.ts +0 -52
- package/components/datagrids/views/CardsView/hooks/useProcessedColumns/useProcessedColumns.d.ts +0 -2
- package/components/datagrids/views/CardsView/hooks/useProcessedColumns/useProcessedColumns.js +2 -3
- package/components/datagrids/views/TableView/TableView.d.ts +4 -4
- package/components/datagrids/views/TableView/TableView.js +3 -41
- package/components/datagrids/views/TableView/helpers/index.d.ts +0 -2
- package/components/datagrids/views/TableView/hooks/useHeaderMenuActions/useHeaderMenuActions.js +1 -62
- package/components/datagrids/views/TableView/hooks/useSortColumnsRows/useSortColumnsRows.js +13 -39
- package/components/datagrids/views/TableView/subcomponents/ActionsColumn/ActionsColumn.js +1 -1
- package/components/datagrids/views/TableView/subcomponents/HeaderRenderClick/HeaderRenderClick.js +1 -1
- package/components/datagrids/views/TableView/subcomponents/RadioSelectColumn/RadioSelectColumn.js +2 -2
- package/components/datagrids/views/TableView/subcomponents/SelectColumn/SelectColumn.js +14 -46
- package/components/datagrids/views/TableView/subcomponents/Settings/hooks/useModalSettings/useModalSettings.js +2 -13
- package/components/datagrids/views/TableView/subcomponents/Settings/subcomponents/ColumnsConfig/ColumnsConfig.js +13 -47
- package/components/datagrids/views/TableView/subcomponents/Settings/subcomponents/ColumnsConfig/types.d.ts +0 -22
- package/components/datagrids/views/adapters/CheckboxCellAdapter/CheckboxCellAdapter.js +1 -1
- package/components/extended/React-Resizable/Resizable/slots/ResizableSlots.d.ts +1 -1
- package/components/extended/React-Resizable/ResizableBox/slots/ResizableBoxSlots.d.ts +1 -1
- package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.d.ts +6 -6
- package/components/formatters/BooleanFormatter/slots/BooleanFormatterSlots.d.ts +1 -1
- package/components/formatters/ConcatenatedFormatter/slots/ConcatenatedFormatterSlots.d.ts +1 -1
- package/components/formatters/DateFormatter/slots/DateFormatterSlots.d.ts +1 -1
- package/components/formatters/DistanceToNowFormatter/slots/DistanceToNowFormatterSlots.d.ts +1 -1
- package/components/formatters/ImageFormatter/slots/ImageFormatterSlots.d.ts +1 -1
- package/components/formatters/PeriodFormatter/slots/PeriodFormatterSlots.d.ts +1 -1
- package/components/formatters/PointsFormatter/slots/ointsFormatterSlots.d.ts +1 -1
- package/components/formatters/PriceFormatter/slots/PriceFormatterSlots.d.ts +1 -1
- package/components/formatters/UncertaintyFormatter/slots/UncertaintyFormatterSlots.d.ts +1 -1
- package/components/hook-form/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.js +5 -0
- package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxSlots.d.ts +1 -1
- package/components/hook-form/RHFColorPicker/slots/RHFColorPickerSlots.d.ts +1 -1
- package/components/hook-form/RHFDatePicker/slots/RHFDatePickerSlots.d.ts +3 -3
- package/components/hook-form/RHFPeriod/slots/RHFPeriodSlots.d.ts +1 -1
- package/components/hook-form/RHFSelect/constants.d.ts +1 -1
- package/components/hook-form/RHFSelect/slots/RHFSlots.d.ts +1 -1
- package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +1 -1
- package/components/hook-form/RHFTextFieldPassword/slots/RHFTextFieldPasswordSlots.d.ts +2 -2
- package/components/hook-form/RHFUpload/RHFUploadImage/slots/RHFUploadImageSlots.d.ts +3 -3
- package/components/hook-form/RHFUpload/RHFUploadSingleFile/constants.d.ts +1 -1
- package/components/hook-form/RHFUpload/RHFUploadSingleFile/slots/RHFUploadSingleFileSlots.d.ts +7 -7
- package/components/hook-form/RHFormProvider/classes/index.d.ts +1 -1
- package/components/mui_extended/Accordion/slots/AccordionSlots.d.ts +3 -3
- package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.d.ts +6 -6
- package/components/mui_extended/Avatar/slots/AvatarSlots.d.ts +1 -1
- package/components/mui_extended/Badge/slots/BadgeSlots.d.ts +1 -1
- package/components/mui_extended/Button/slots/ButtonSlots.d.ts +2 -2
- package/components/mui_extended/CheckBox/slots/CheckBoxSlots.d.ts +2 -2
- package/components/mui_extended/DatePicker/constants.d.ts +1 -1
- package/components/mui_extended/DatePicker/slots/DatePickerSlots.d.ts +3 -3
- package/components/mui_extended/DateTimePicker/slots/DateTimePickerSlots.d.ts +4 -4
- package/components/mui_extended/Divider/slots/DividerSlots.d.ts +1 -1
- package/components/mui_extended/IconButton/constants.d.ts +1 -1
- package/components/mui_extended/IconButton/slots/IconButtonSlots.d.ts +1 -1
- package/components/mui_extended/LoadingButton/slots/LoadingButtonSlots.d.ts +1 -1
- package/components/mui_extended/MenuDivider/slots/MenuDividerSlots.d.ts +1 -1
- package/components/mui_extended/MenuItem/slots/MenuItemSlots.d.ts +2 -2
- package/components/mui_extended/NavLink/slots/NavLinkSlots.d.ts +1 -1
- package/components/mui_extended/Popper/slots/PopperStlots.d.ts +1 -1
- package/components/mui_extended/Radio/slots/styled.d.ts +2 -2
- package/components/mui_extended/Select/constants.d.ts +1 -1
- package/components/mui_extended/Select/slots/SelectSlots.d.ts +5 -5
- package/components/mui_extended/Skeleton/Slots/skeletonSlots.d.ts +1 -1
- package/components/mui_extended/Stack/slots/StackSlot.d.ts +1 -1
- package/components/mui_extended/Tab/Slots/TabSlots.d.ts +2 -2
- package/components/mui_extended/Tabs/slots/TabsSlots.d.ts +1 -1
- package/components/mui_extended/TextField/constants.d.ts +1 -1
- package/components/mui_extended/TextField/slots/TextFieldSlots.d.ts +4 -4
- package/components/mui_extended/TimePicker/slots/TimePickerSlots.d.ts +3 -3
- package/components/mui_extended/ToggleButton/slots/ToggleButtonSlots.d.ts +1 -1
- package/components/mui_extended/ToggleIconButton/slots/ToggleIconButtonSlots.d.ts +1 -1
- package/components/mui_extended/Typography/slots/typographySlots.d.ts +1 -1
- package/hooks/useDynamicFilterAndSort/slots/DynamicFilterAndSortSlots.d.ts +4 -4
- package/hooks/usePopoverContainer/index.d.ts +1 -0
- package/hooks/usePopoverContainer/usePopoverContainer.d.ts +35 -6
- package/hooks/usePopoverContainer/usePopoverContainer.js +21 -10
- package/index.js +92 -114
- package/not_recognized/index.js +100 -25
- package/package.json +1 -1
- package/test/mocks.d.ts +2 -2
- package/components/datagrids/components/BaseDataGrid/BaseDataGrid.d.ts +0 -12
- package/components/datagrids/components/BaseDataGrid/BaseDataGrid.js +0 -131
- package/components/datagrids/components/BaseDataGrid/index.d.ts +0 -1
- package/components/datagrids/components/TreeDataGrid/TreeDataGrid.d.ts +0 -22
- package/components/datagrids/components/TreeDataGrid/TreeDataGrid.js +0 -50
- package/components/datagrids/components/TreeDataGrid/TreeDataGrid.test.d.ts +0 -1
- package/components/datagrids/components/TreeDataGrid/index.d.ts +0 -1
- package/components/datagrids/components/TreeDataGrid/index.js +0 -1
- package/components/datagrids/formatters/ColumnBooleanFormatter/ColumnBooleanGroupFormatter.d.ts +0 -15
- package/components/datagrids/formatters/ColumnBooleanFormatter/ColumnBooleanGroupFormatter.js +0 -32
- package/components/datagrids/formatters/ColumnChipStatusFormatter/ColumnChipStatusGroupFormatter.d.ts +0 -16
- package/components/datagrids/formatters/ColumnChipStatusFormatter/ColumnChipStatusGroupFormatter.js +0 -37
- package/components/datagrids/formatters/ColumnColorFormatter/ColumnColorGroupFormatter.d.ts +0 -14
- package/components/datagrids/formatters/ColumnColorFormatter/ColumnColorGroupFormatter.js +0 -24
- package/components/datagrids/formatters/ColumnConcatenatedValuesFormatter/ColumnConcatenatedValuesGroupFormatter.d.ts +0 -15
- package/components/datagrids/formatters/ColumnConcatenatedValuesFormatter/ColumnConcatenatedValuesGroupFormatter.js +0 -35
- package/components/datagrids/formatters/ColumnDateFormatter/ColumnDateGroupFormatter.d.ts +0 -9
- package/components/datagrids/formatters/ColumnDateFormatter/ColumnDateGroupFormatter.js +0 -35
- package/components/datagrids/formatters/ColumnIconFormatter/ColumnIconGroupFormatter.d.ts +0 -13
- package/components/datagrids/formatters/ColumnIconFormatter/ColumnIconGroupFormatter.js +0 -17
- package/components/datagrids/formatters/ColumnImageFormatter/ColumnImageGroupFormatter.d.ts +0 -15
- package/components/datagrids/formatters/ColumnImageFormatter/ColumnImageGroupFormatter.js +0 -33
- package/components/datagrids/formatters/ColumnNestedValueFormatter/ColumnNestedValueGroupFormatter.d.ts +0 -14
- package/components/datagrids/formatters/ColumnNestedValueFormatter/ColumnNestedValueGroupFormatter.js +0 -22
- package/components/datagrids/formatters/ColumnPointsFormatter/ColumnPointsGroupFormatter.d.ts +0 -15
- package/components/datagrids/formatters/ColumnPointsFormatter/ColumnPointsGroupFormatter.js +0 -28
- package/components/datagrids/formatters/ColumnPriceFormatter/ColumnPriceGroupFormatter.d.ts +0 -14
- package/components/datagrids/formatters/ColumnPriceFormatter/ColumnPriceGroupFormatter.js +0 -26
- package/components/datagrids/formatters/ColumnTagsFormatter/ColumnTagsGroupFormatter.d.ts +0 -13
- package/components/datagrids/formatters/ColumnTagsFormatter/ColumnTagsGroupFormatter.js +0 -21
- package/components/datagrids/formatters/ColumnUncertaintyFormatter/ColumnUncertaintyGroupFormatter.d.ts +0 -15
- package/components/datagrids/formatters/ColumnUncertaintyFormatter/ColumnUncertaintyGroupFormatter.js +0 -27
- package/components/datagrids/views/TableView/helpers/defaultRowGrouper/defaultRowGrouper.d.ts +0 -28
- package/components/datagrids/views/TableView/helpers/defaultRowGrouper/defaultRowGrouper.js +0 -15
- package/components/datagrids/views/TableView/helpers/defaultRowGrouper/defaultRowGrouper.test.d.ts +0 -1
- package/components/datagrids/views/TableView/helpers/defaultRowGrouper/index.d.ts +0 -1
- package/components/datagrids/views/TableView/helpers/defaultRowGrouper/index.js +0 -1
- package/components/datagrids/views/TableView/helpers/getGroupBy/getGroupBy.d.ts +0 -20
- package/components/datagrids/views/TableView/helpers/getGroupBy/getGroupBy.js +0 -13
- package/components/datagrids/views/TableView/helpers/getGroupBy/getGroupBy.test.d.ts +0 -1
- package/components/datagrids/views/TableView/helpers/getGroupBy/index.d.ts +0 -1
- package/components/datagrids/views/TableView/helpers/getGroupBy/index.js +0 -1
- package/components/datagrids/views/TableView/subcomponents/RenderGroupCell/RenderGroupCell.d.ts +0 -10
- package/components/datagrids/views/TableView/subcomponents/RenderGroupCell/RenderGroupCell.js +0 -35
- package/components/datagrids/views/TableView/subcomponents/RenderGroupCell/RenderGroupCell.test.d.ts +0 -1
- package/components/datagrids/views/TableView/subcomponents/RenderGroupCell/index.d.ts +0 -2
- package/components/datagrids/views/TableView/subcomponents/RenderGroupCell/index.js +0 -1
- package/components/datagrids/views/TableView/subcomponents/RenderGroupCell/types.d.ts +0 -12
- /package/components/{datagrids/components/BaseDataGrid → CommonActions/components/ActionFormSubmitProgrammatic/slots}/index.js +0 -0
|
@@ -5,7 +5,6 @@ import { ColumnPriceFormatterProps } from './types';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const useColumnPrice: <TRow>(props: ColumnPriceFormatterProps<TRow>) => {
|
|
7
7
|
formatter: (formatterProps: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
renderGroupCell: (groupProps: import('react-data-grid').RenderGroupCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
customFilter: (row: TRow, value: string) => boolean;
|
|
10
9
|
customSort: (a: TRow, b: TRow) => 0 | 1 | -1;
|
|
11
10
|
};
|
|
@@ -3,7 +3,6 @@ import { useFormatter } from "@m4l/graphics";
|
|
|
3
3
|
import { getPropertyByString } from "@m4l/core";
|
|
4
4
|
import { deepEqual } from "fast-equals";
|
|
5
5
|
import { g as getFormatPrice } from "../../../formatters/PriceFormatter/PriceFormatter.js";
|
|
6
|
-
import { C as ColumnPriceGroupFormatter } from "./ColumnPriceGroupFormatter.js";
|
|
7
6
|
import { C as ColumnPriceFormatter } from "./formatter.js";
|
|
8
7
|
import { g as getColumnKey } from "../../helpers/shared/getColumnKey/getColumnKey.js";
|
|
9
8
|
const getCustomPriceFilter = (props) => {
|
|
@@ -52,7 +51,6 @@ const useColumnPrice = (props) => {
|
|
|
52
51
|
}, [props]);
|
|
53
52
|
return useMemo(() => ({
|
|
54
53
|
formatter: ColumnPriceFormatter(stateProps),
|
|
55
|
-
renderGroupCell: ColumnPriceGroupFormatter(stateProps),
|
|
56
54
|
customFilter,
|
|
57
55
|
customSort: getCustomPriceSort(stateProps)
|
|
58
56
|
}), [stateProps, customFilter]);
|
|
@@ -4,7 +4,6 @@ import { ColumnTagsFormatterProps } from './types';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare const useColumnTags: <TRow>(props: ColumnTagsFormatterProps<TRow>) => {
|
|
6
6
|
formatter: (renderProps: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
renderGroupCell: (groupProps: import('react-data-grid').RenderGroupCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
customFilter: (row: TRow, value: string) => boolean;
|
|
9
8
|
customSort: (a: TRow, b: TRow) => 0 | 1 | -1;
|
|
10
9
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { getPropertyByString } from "@m4l/core";
|
|
2
2
|
import { C as ColumnTagsFormatter } from "./formatter.js";
|
|
3
|
-
import { C as ColumnTagsGroupFormatter } from "./ColumnTagsGroupFormatter.js";
|
|
4
3
|
import { deepEqual } from "fast-equals";
|
|
5
4
|
import { useState, useRef, useEffect, useMemo } from "react";
|
|
6
5
|
import { g as getColumnKey } from "../../helpers/shared/getColumnKey/getColumnKey.js";
|
|
@@ -50,7 +49,6 @@ const useColumnTags = (props) => {
|
|
|
50
49
|
return useMemo(
|
|
51
50
|
() => ({
|
|
52
51
|
formatter: ColumnTagsFormatter(stateProps),
|
|
53
|
-
renderGroupCell: ColumnTagsGroupFormatter(stateProps),
|
|
54
52
|
customFilter: getCustomTagFilter(stateProps),
|
|
55
53
|
customSort: getCustomTagSort(stateProps)
|
|
56
54
|
}),
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { ColumnUncertaintyFormatter } from './formatter';
|
|
2
|
-
export { ColumnUncertaintyGroupFormatter } from './ColumnUncertaintyGroupFormatter';
|
|
3
2
|
export type { ColumnUncertaintyFormatterProps } from './types';
|
|
4
3
|
export { useColumnUncertanity } from './useColumnUncertainty';
|
package/components/datagrids/formatters/ColumnUncertaintyFormatter/useColumnUncertainty.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ import { ColumnUncertaintyFormatterProps } from './types';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const useColumnUncertanity: <TRow>(props: ColumnUncertaintyFormatterProps<TRow>) => {
|
|
7
7
|
formatter: (formatterProps: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
renderGroupCell: (groupProps: import('react-data-grid').RenderGroupCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
customFilter: (row: TRow, value: string) => boolean;
|
|
10
9
|
customSort: (a: TRow, b: TRow) => 0 | 1 | -1;
|
|
11
10
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useState, useRef, useEffect, useMemo } from "react";
|
|
2
2
|
import { deepEqual } from "fast-equals";
|
|
3
3
|
import { g as getUncertaintyFormat } from "../../../formatters/UncertaintyFormatter/UncertaintyFormatter.js";
|
|
4
|
-
import { C as ColumnUncertaintyGroupFormatter } from "./ColumnUncertaintyGroupFormatter.js";
|
|
5
4
|
import { C as ColumnUncertaintyFormatter } from "./formatter.js";
|
|
6
5
|
import { g as getColumnKey } from "../../helpers/shared/getColumnKey/getColumnKey.js";
|
|
7
6
|
const getCustomUncertaintyFilter = (props) => {
|
|
@@ -45,7 +44,6 @@ const useColumnUncertanity = (props) => {
|
|
|
45
44
|
}, [props]);
|
|
46
45
|
return useMemo(() => ({
|
|
47
46
|
formatter: ColumnUncertaintyFormatter(stateProps),
|
|
48
|
-
renderGroupCell: ColumnUncertaintyGroupFormatter(stateProps),
|
|
49
47
|
customFilter: getCustomUncertaintyFilter(stateProps),
|
|
50
48
|
customSort: getCustomUncertaintySort(stateProps)
|
|
51
49
|
}), [stateProps]);
|
package/components/datagrids/helpers/shared/getInitialColumnsConfig/getInitialColumnsConfig.js
CHANGED
|
@@ -13,7 +13,6 @@ const getInitialColumnsConfig = (id, columns, viewMode, defaultConfig, viewSpeci
|
|
|
13
13
|
return columns.map((column, index) => {
|
|
14
14
|
const existingConfig = columnsConfig.find((c) => c.key === column.key);
|
|
15
15
|
const columnConfigIndex = existingConfig ? columnsConfig.indexOf(existingConfig) : -1;
|
|
16
|
-
const groupedColumnsCount = columns.slice(0, index).filter((c) => c.grouped === true).length;
|
|
17
16
|
const baseConfig = {
|
|
18
17
|
key: column.key,
|
|
19
18
|
name: typeof column.name === "string" ? column.name : String(column.name),
|
|
@@ -23,17 +22,10 @@ const getInitialColumnsConfig = (id, columns, viewMode, defaultConfig, viewSpeci
|
|
|
23
22
|
originalIndex: index,
|
|
24
23
|
originalVisible: column.visible === void 0 ? true : column.visible
|
|
25
24
|
};
|
|
26
|
-
const groupingConfig = viewMode === "table" ? {
|
|
27
|
-
grouped: existingConfig?.grouped ?? column.grouped ?? false,
|
|
28
|
-
groupOrder: existingConfig?.groupOrder ?? (column.grouped ? groupedColumnsCount : index),
|
|
29
|
-
originalGrouped: column.grouped ?? false,
|
|
30
|
-
originalGroupOrder: column.grouped ? groupedColumnsCount : index
|
|
31
|
-
} : {};
|
|
32
25
|
return {
|
|
33
26
|
...baseConfig,
|
|
34
27
|
...viewSpecificDefaults,
|
|
35
28
|
...originalViewSpecificDefaults,
|
|
36
|
-
...groupingConfig,
|
|
37
29
|
...existingConfig || {}
|
|
38
30
|
};
|
|
39
31
|
}).sort((a, b) => a.index - b.index);
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
const getViewSpecificConfig = (viewMode) => {
|
|
2
2
|
const configs = {
|
|
3
3
|
table: {
|
|
4
|
-
defaults: { frozen: false
|
|
5
|
-
originalDefaults: { originalFrozen: false
|
|
6
|
-
/**
|
|
7
|
-
* Extrae las propiedades originales de frozen, grouped y groupOrder de un item.
|
|
8
|
-
* @param item - Item del cual extraer las propiedades
|
|
9
|
-
* @returns Objeto con las propiedades originales
|
|
10
|
-
*/
|
|
4
|
+
defaults: { frozen: false },
|
|
5
|
+
originalDefaults: { originalFrozen: false },
|
|
11
6
|
dynamicOriginalProperty: (item) => ({
|
|
12
|
-
originalFrozen: item?.frozen ?? false
|
|
13
|
-
originalGrouped: item?.grouped ?? false,
|
|
14
|
-
originalGroupOrder: item?.groupOrder ?? 0
|
|
7
|
+
originalFrozen: item?.frozen ?? false
|
|
15
8
|
})
|
|
16
9
|
},
|
|
17
10
|
cards: {
|
|
@@ -3,7 +3,6 @@ import { UseChangeColumnsOrderParams, UseChangeColumnsOrderReturn } from './type
|
|
|
3
3
|
* Hook para manejar el cambio de orden de columnas.
|
|
4
4
|
*
|
|
5
5
|
* Reordena las columnas y llama a onChangeColumnsConfig para persistir.
|
|
6
|
-
* También recalcula groupOrder si las columnas están agrupadas.
|
|
7
6
|
* @param getConfigColumns Función para obtener la configuración de columnas
|
|
8
7
|
* @param onChangeColumnsConfig Función para cambiar la configuración de columnas
|
|
9
8
|
* @returns Función para cambiar el orden de columnas
|
|
@@ -21,18 +21,10 @@ const useChangeColumnsOrder = ({
|
|
|
21
21
|
0,
|
|
22
22
|
reorderedConfig.splice(sourceColumnIndex, 1)[0]
|
|
23
23
|
);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
index: idx
|
|
29
|
-
};
|
|
30
|
-
if (col.grouped) {
|
|
31
|
-
updatedCol.groupOrder = groupOrderCounter;
|
|
32
|
-
groupOrderCounter++;
|
|
33
|
-
}
|
|
34
|
-
return updatedCol;
|
|
35
|
-
});
|
|
24
|
+
const configWithUpdatedIndexes = reorderedConfig.map((col, idx) => ({
|
|
25
|
+
...col,
|
|
26
|
+
index: idx
|
|
27
|
+
}));
|
|
36
28
|
onChangeColumnsConfig(viewModeParam, configWithUpdatedIndexes);
|
|
37
29
|
},
|
|
38
30
|
[getConfigColumns, onChangeColumnsConfig]
|
|
@@ -20,7 +20,6 @@ export declare const pathIcons: {
|
|
|
20
20
|
freezeColumn: string;
|
|
21
21
|
unfreezeColumn: string;
|
|
22
22
|
hideColumn: string;
|
|
23
|
-
groupColumn: string;
|
|
24
23
|
viewTable: string;
|
|
25
24
|
viewCards: string;
|
|
26
25
|
info: string;
|
|
@@ -29,8 +28,4 @@ export declare const pathIcons: {
|
|
|
29
28
|
smartphone: string;
|
|
30
29
|
internet: string;
|
|
31
30
|
edit: string;
|
|
32
|
-
group: string;
|
|
33
|
-
removeGroup: string;
|
|
34
|
-
groupUp: string;
|
|
35
|
-
groupDown: string;
|
|
36
31
|
};
|
|
@@ -24,11 +24,7 @@ const pathIcons = {
|
|
|
24
24
|
viewCards: "frontend/components/data_grid/assets/icons/card.svg",
|
|
25
25
|
info: "frontend/components/data_grid/assets/icons/info.svg",
|
|
26
26
|
expanded: "frontend/components/data_grid/assets/icons/expanded.svg",
|
|
27
|
-
edit: "frontend/components/EditLabel/assets/icons/pencil.svg"
|
|
28
|
-
group: "frontend/components/data_grid/assets/icons/group.svg",
|
|
29
|
-
removeGroup: "frontend/components/data_grid/assets/icons/remove_group.svg",
|
|
30
|
-
groupUp: "frontend/components/data_grid/assets/icons/group_up.svg",
|
|
31
|
-
groupDown: "frontend/components/data_grid/assets/icons/group_down.svg"
|
|
27
|
+
edit: "frontend/components/EditLabel/assets/icons/pencil.svg"
|
|
32
28
|
};
|
|
33
29
|
export {
|
|
34
30
|
pathIcons as p
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export { DataGrid } from './components/DataGridMain';
|
|
2
|
-
export { TreeDataGrid } from './components/TreeDataGrid';
|
|
3
2
|
export * from './formatters';
|
|
4
3
|
export type { Column, RenderEditCellProps, RenderCellProps, } from 'react-data-grid';
|
|
5
|
-
export type { RowKey, ChangeConfig, ChangeUserColumn, RowActionsGetter, RowKeyGetter,
|
|
4
|
+
export type { RowKey, ChangeConfig, ChangeUserColumn, RowActionsGetter, RowKeyGetter, } from './types';
|
|
6
5
|
export type { IGridConfigExtended, BaseConfigColumn, } from './contexts/DataGridContext/types';
|
|
7
6
|
export type { IGridConfig } from './helpers/persistence/getColumnsWidth/types';
|
|
8
7
|
export { getDataGridComponentsDictionary } from './dictionary';
|
|
@@ -53,9 +53,7 @@ export declare enum TableSlots {
|
|
|
53
53
|
editorCellWrapper = "editorCellWrapper",
|
|
54
54
|
editablePlaceholder = "editablePlaceholder",
|
|
55
55
|
editLabel = "editLabel",
|
|
56
|
-
iconButtonEdit = "iconButtonEdit"
|
|
57
|
-
defaultRenderGroupCellRoot = "defaultRenderGroupCellRoot",
|
|
58
|
-
defaultRenderGroupCellText = "defaultRenderGroupCellText"
|
|
56
|
+
iconButtonEdit = "iconButtonEdit"
|
|
59
57
|
}
|
|
60
58
|
export declare enum TextEditorSlots {
|
|
61
59
|
inputTexEditor = "inputTexEditor"
|
|
@@ -57,8 +57,6 @@ var TableSlots = /* @__PURE__ */ ((TableSlots2) => {
|
|
|
57
57
|
TableSlots2["editablePlaceholder"] = "editablePlaceholder";
|
|
58
58
|
TableSlots2["editLabel"] = "editLabel";
|
|
59
59
|
TableSlots2["iconButtonEdit"] = "iconButtonEdit";
|
|
60
|
-
TableSlots2["defaultRenderGroupCellRoot"] = "defaultRenderGroupCellRoot";
|
|
61
|
-
TableSlots2["defaultRenderGroupCellText"] = "defaultRenderGroupCellText";
|
|
62
60
|
return TableSlots2;
|
|
63
61
|
})(TableSlots || {});
|
|
64
62
|
var TextEditorSlots = /* @__PURE__ */ ((TextEditorSlots2) => {
|
|
@@ -97,5 +97,3 @@ export declare const ControlNavigateStyled: import('@emotion/styled').StyledComp
|
|
|
97
97
|
* ****************
|
|
98
98
|
*/
|
|
99
99
|
export declare const ColumnIconFormatterStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
100
|
-
export declare const DefaultRenderGroupCellRootStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof import('react').ClassAttributes<HTMLSpanElement> | keyof import('react').HTMLAttributes<HTMLSpanElement>>, {}>;
|
|
101
|
-
export declare const DefaultRenderGroupCellTextStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof import('react').ClassAttributes<HTMLSpanElement> | keyof import('react').HTMLAttributes<HTMLSpanElement>>, {}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { styled } from "@mui/material/styles";
|
|
2
2
|
import { MenuList, InputBase } from "@mui/material";
|
|
3
3
|
import { D as DATAGRID_PREFIX_NAME } from "../constants.js";
|
|
4
|
-
import {
|
|
4
|
+
import { D as DataGridSlots, T as TextEditorSlots, A as ActionsSlots, C as ControlNavigateSlots, b as TableSlots, R as RowsCountSlots, a as ColumnsConfigSlots, c as ColumnIconFormatterSlots } from "./DataGridEnum.js";
|
|
5
5
|
import { d as dataGridStyles } from "../Datagrid.styles.js";
|
|
6
6
|
import { I as Icon } from "../../Icon/Icon.js";
|
|
7
7
|
import { C as Card } from "../../Card/Card.js";
|
|
@@ -231,14 +231,6 @@ styled("div", {
|
|
|
231
231
|
name: DATAGRID_PREFIX_NAME,
|
|
232
232
|
slot: ColumnIconFormatterSlots.columnIconFormatter
|
|
233
233
|
})(dataGridStyles.columnIconFormatter);
|
|
234
|
-
const DefaultRenderGroupCellRootStyled = styled("span", {
|
|
235
|
-
name: DATAGRID_PREFIX_NAME,
|
|
236
|
-
slot: TableSlots.defaultRenderGroupCellRoot
|
|
237
|
-
})(dataGridStyles.defaultRenderGroupCellRoot);
|
|
238
|
-
const DefaultRenderGroupCellTextStyled = styled("span", {
|
|
239
|
-
name: DATAGRID_PREFIX_NAME,
|
|
240
|
-
slot: TableSlots.defaultRenderGroupCellText
|
|
241
|
-
})(dataGridStyles.defaultRenderGroupCellText);
|
|
242
234
|
export {
|
|
243
235
|
ActionsRootStyled as A,
|
|
244
236
|
TableContainerStyled as B,
|
|
@@ -258,12 +250,10 @@ export {
|
|
|
258
250
|
MenuListStyled as P,
|
|
259
251
|
HeaderRenderClickStyled as Q,
|
|
260
252
|
RowsCountRootStyled as R,
|
|
261
|
-
|
|
253
|
+
CheckboxCellWrapperStyled as S,
|
|
262
254
|
TextToggleCardButtonStyled as T,
|
|
263
|
-
DefaultRenderGroupCellTextStyled as U,
|
|
264
255
|
ValueColumnStyled as V,
|
|
265
256
|
WrapperSkeletonStyled as W,
|
|
266
|
-
CheckboxCellWrapperStyled as X,
|
|
267
257
|
ControlNavigateStyled as a,
|
|
268
258
|
RowsCountLabelStyled as b,
|
|
269
259
|
RowsCountValueStyled as c,
|
|
@@ -39,18 +39,6 @@ declare module 'react-data-grid' {
|
|
|
39
39
|
formatter?: (props: any) => JSX.Element;
|
|
40
40
|
/** @deprecated Usa renderEditCell en lugar de editor. Este atributo será removido en una futura versión. */
|
|
41
41
|
editor?: Maybe<(props: RenderEditCellProps<TRow, TSummaryRow>) => ReactNode>;
|
|
42
|
-
/**
|
|
43
|
-
* Si true, la columna puede ser agrupada/desagrupada por el usuario.
|
|
44
|
-
* Solo aplica para TreeDataGrid.
|
|
45
|
-
*/
|
|
46
|
-
groupable?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Si true, la columna está agrupada por defecto.
|
|
49
|
-
* - Con `groupable: true`: el usuario puede cambiar la agrupación.
|
|
50
|
-
* - Sin `groupable` o `groupable: false`: agrupación estática, no se puede cambiar.
|
|
51
|
-
* Solo aplica para TreeDataGrid.
|
|
52
|
-
*/
|
|
53
|
-
grouped?: boolean;
|
|
54
42
|
}
|
|
55
43
|
}
|
|
56
44
|
export declare type RowKey = string | number;
|
|
@@ -331,43 +319,3 @@ export type DataGridOwnerState<TRow, TSummaryRow, TKey extends RowKey = RowKey>
|
|
|
331
319
|
};
|
|
332
320
|
export type DataGridSlotsType = DataGridSlots | TextEditorSlots | ActionsSlots | RowsCountSlots | ColumnsConfigSlots | TableSlots | ControlNavigateSlots | ColumnIconFormatterSlots;
|
|
333
321
|
export type DataGridStyles = OverridesStyleRules<DataGridSlotsType, typeof DATAGRID_PREFIX_NAME, Theme>;
|
|
334
|
-
/**
|
|
335
|
-
* Props específicas de TreeDataGrid (de react-data-grid)
|
|
336
|
-
* Estas props controlan la funcionalidad de agrupación jerárquica.
|
|
337
|
-
*
|
|
338
|
-
* NOTA: groupBy se calcula automáticamente desde columnsConfig.grouped
|
|
339
|
-
* ordenadas por groupOrder. El desarrollador define grouped/groupable en columns.
|
|
340
|
-
*/
|
|
341
|
-
export interface TreeProps<TRow> {
|
|
342
|
-
/**
|
|
343
|
-
* Función que agrupa las filas por una columna.
|
|
344
|
-
*
|
|
345
|
-
* OPCIONAL: Si no se pasa, usa un rowGrouper genérico que agrupa
|
|
346
|
-
* por el valor directo de la columna (row[columnKey]).
|
|
347
|
-
*
|
|
348
|
-
* Solo necesitas pasar un rowGrouper personalizado si quieres
|
|
349
|
-
* transformar los valores antes de agrupar, por ejemplo:
|
|
350
|
-
* - Agrupar fechas por mes ("Enero 2024")
|
|
351
|
-
* - Agrupar números por rango ("$40k - $60k")
|
|
352
|
-
* @see defaultRowGrouper en helpers/defaultRowGrouper
|
|
353
|
-
*/
|
|
354
|
-
rowGrouper?: (rows: readonly TRow[], columnKey: string) => Record<string, readonly TRow[]>;
|
|
355
|
-
/** IDs de grupos expandidos */
|
|
356
|
-
expandedGroupIds?: ReadonlySet<unknown>;
|
|
357
|
-
/** Callback cuando cambian los grupos expandidos */
|
|
358
|
-
onExpandedGroupIdsChange?: (expandedGroupIds: Set<unknown>) => void;
|
|
359
|
-
}
|
|
360
|
-
/**
|
|
361
|
-
* Props completas de TreeDataGrid.
|
|
362
|
-
* Extiende DataGridProps pero sin cardsViewConfig ni defaultViewMode
|
|
363
|
-
* ya que TreeDataGrid solo soporta vista de tabla.
|
|
364
|
-
*/
|
|
365
|
-
export interface TreeDataGridProps<TRow, TSummaryRow, TKey extends RowKey = RowKey> extends Omit<DataGridProps<TRow, TSummaryRow, TKey>, 'cardsViewConfig' | 'defaultViewMode'>, TreeProps<TRow> {
|
|
366
|
-
}
|
|
367
|
-
/**
|
|
368
|
-
* Props para TableView con soporte opcional para TreeDataGrid
|
|
369
|
-
*/
|
|
370
|
-
export type TableViewProps<TRow, TSummaryRow, TKey extends RowKey = RowKey> = GridProps<TRow, TSummaryRow, TKey> & {
|
|
371
|
-
/** Props para TreeDataGrid. Si se pasan, usa TreeDataGrid en lugar de DataGrid */
|
|
372
|
-
treeProps?: TreeProps<TRow>;
|
|
373
|
-
};
|
package/components/datagrids/views/CardsView/hooks/useProcessedColumns/useProcessedColumns.d.ts
CHANGED
|
@@ -47,6 +47,4 @@ export declare function useProcessedColumns<TRow, TSummaryRow>(columns: readonly
|
|
|
47
47
|
customSort?: ((a: TRow, b: TRow) => number) | undefined;
|
|
48
48
|
formatter?: ((props: any) => JSX.Element) | undefined;
|
|
49
49
|
editor?: import('@m4l/core').Maybe<(props: import('react-data-grid').RenderEditCellProps<TRow, TSummaryRow>) => import('react').ReactNode>;
|
|
50
|
-
groupable?: boolean;
|
|
51
|
-
grouped?: boolean;
|
|
52
50
|
}[];
|
package/components/datagrids/views/CardsView/hooks/useProcessedColumns/useProcessedColumns.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { d as DATAGRID_ACTIONS_COLUMN_KEY } from "../../../../constants.js";
|
|
2
|
+
import { d as DATAGRID_SELECT_COLUMN_KEY, e as DATAGRID_ACTIONS_COLUMN_KEY } from "../../../../constants.js";
|
|
4
3
|
import { u as useDataGrid } from "../../../../hooks/shared/useDataGrid/useDataGrid.js";
|
|
5
4
|
function useProcessedColumns(columns, options = {}) {
|
|
6
5
|
const { applyVisibilityFilter = true } = options;
|
|
@@ -11,7 +10,7 @@ function useProcessedColumns(columns, options = {}) {
|
|
|
11
10
|
);
|
|
12
11
|
return useMemo(() => {
|
|
13
12
|
const processedColumns = columns.filter((column) => {
|
|
14
|
-
if (column.key ===
|
|
13
|
+
if (column.key === DATAGRID_SELECT_COLUMN_KEY || column.key === DATAGRID_ACTIONS_COLUMN_KEY) {
|
|
15
14
|
return false;
|
|
16
15
|
}
|
|
17
16
|
if (!applyVisibilityFilter) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DataGridProps } from 'react-data-grid';
|
|
2
|
+
import { GridProps, RowKey } from '../../types';
|
|
2
3
|
/**
|
|
3
4
|
* Componente que renderiza la tabla con las filas y columnas
|
|
4
|
-
* Acepta todos los props de DataGrid y prioriza las configuraciones personalizadas
|
|
5
|
-
* Si se proporcionan treeProps, renderiza TreeDataGrid en lugar de DataGrid.
|
|
5
|
+
* Acepta todos los props de DataGrid y prioriza las configuraciones personalizadas
|
|
6
6
|
*/
|
|
7
|
-
export declare function TableView<TRow, TSummaryRow, TKey extends RowKey = RowKey>(props:
|
|
7
|
+
export declare function TableView<TRow, TSummaryRow, TKey extends RowKey = RowKey>(props: GridProps<TRow, TSummaryRow, TKey> & Omit<DataGridProps<TRow, TSummaryRow>, keyof GridProps<TRow, TSummaryRow, TKey>>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo, useState, useRef, useEffect } from "react";
|
|
3
|
-
import DataGrid
|
|
3
|
+
import DataGrid from "react-data-grid";
|
|
4
4
|
import { DndProvider } from "react-dnd";
|
|
5
5
|
import { HTML5Backend } from "react-dnd-html5-backend";
|
|
6
6
|
import { B as TableContainerStyled, y as TableWrapperDataGridStyled } from "../../slots/DataGridSlot.js";
|
|
7
7
|
import { u as useSortColumnsRows } from "./hooks/useSortColumnsRows/useSortColumnsRows.js";
|
|
8
|
-
import { g as getGroupBy } from "./helpers/getGroupBy/getGroupBy.js";
|
|
9
|
-
import { d as defaultRowGrouper } from "./helpers/defaultRowGrouper/defaultRowGrouper.js";
|
|
10
8
|
import { u as useHeaderMenuActions } from "./hooks/useHeaderMenuActions/useHeaderMenuActions.js";
|
|
11
9
|
import { f as filterHeight } from "./subcomponents/SelectColumn/SelectColumn.js";
|
|
12
10
|
import { H as HeaderRenderClick } from "./subcomponents/HeaderRenderClick/HeaderRenderClick.js";
|
|
@@ -23,7 +21,6 @@ function TableView(props) {
|
|
|
23
21
|
onSelectedRowsChange,
|
|
24
22
|
defaultColumnOptions: defaultColumnOptionsProp,
|
|
25
23
|
focusOnRowKey,
|
|
26
|
-
treeProps,
|
|
27
24
|
...restProps
|
|
28
25
|
} = props;
|
|
29
26
|
const renderCheckbox = (formatterProps) => {
|
|
@@ -64,16 +61,8 @@ function TableView(props) {
|
|
|
64
61
|
currentRowHeightVariant,
|
|
65
62
|
size,
|
|
66
63
|
sortColumns,
|
|
67
|
-
setSortColumns
|
|
68
|
-
columnsConfig
|
|
64
|
+
setSortColumns
|
|
69
65
|
} = useDataGrid();
|
|
70
|
-
const groupBy = useMemo(() => {
|
|
71
|
-
if (!treeProps) {
|
|
72
|
-
return [];
|
|
73
|
-
}
|
|
74
|
-
return getGroupBy(columnsConfig);
|
|
75
|
-
}, [columnsConfig, treeProps]);
|
|
76
|
-
const rowGrouper = treeProps?.rowGrouper ?? defaultRowGrouper;
|
|
77
66
|
const ref_data_grid = useRef(null);
|
|
78
67
|
const [popoverState, setPopoverState] = useState({
|
|
79
68
|
anchorEl: null,
|
|
@@ -161,34 +150,7 @@ function TableView(props) {
|
|
|
161
150
|
{
|
|
162
151
|
ownerState: { size, currentRowHeightVariant, currentRowHeight },
|
|
163
152
|
children: [
|
|
164
|
-
/* @__PURE__ */ jsx(DndProvider, { backend: HTML5Backend, context: window, children:
|
|
165
|
-
TreeDataGrid,
|
|
166
|
-
{
|
|
167
|
-
className: "rdg-light",
|
|
168
|
-
ref: ref_data_grid,
|
|
169
|
-
headerRowHeight: activeFilters ? currentRowHeaderHeight + filterHeight : currentRowHeaderHeight,
|
|
170
|
-
columns: finalColumns,
|
|
171
|
-
sortColumns,
|
|
172
|
-
onSortColumnsChange: handleSortColumnsChange,
|
|
173
|
-
onColumnResize,
|
|
174
|
-
rows: finalRows,
|
|
175
|
-
onRowsChange,
|
|
176
|
-
selectedRows,
|
|
177
|
-
onSelectedRowsChange,
|
|
178
|
-
onCellClick,
|
|
179
|
-
rowHeight: currentRowHeight,
|
|
180
|
-
rowKeyGetter,
|
|
181
|
-
renderers: {
|
|
182
|
-
renderCheckbox
|
|
183
|
-
},
|
|
184
|
-
defaultColumnOptions,
|
|
185
|
-
groupBy,
|
|
186
|
-
rowGrouper,
|
|
187
|
-
expandedGroupIds: treeProps.expandedGroupIds,
|
|
188
|
-
onExpandedGroupIdsChange: treeProps.onExpandedGroupIdsChange,
|
|
189
|
-
...restProps
|
|
190
|
-
}
|
|
191
|
-
) : /* @__PURE__ */ jsx(
|
|
153
|
+
/* @__PURE__ */ jsx(DndProvider, { backend: HTML5Backend, context: window, children: /* @__PURE__ */ jsx(
|
|
192
154
|
DataGrid,
|
|
193
155
|
{
|
|
194
156
|
className: "rdg-light",
|
package/components/datagrids/views/TableView/hooks/useHeaderMenuActions/useHeaderMenuActions.js
CHANGED
|
@@ -123,24 +123,6 @@ function useHeaderMenuActions(columnKey, finalColumns, defaultSortable, handleSo
|
|
|
123
123
|
columnKey
|
|
124
124
|
});
|
|
125
125
|
}, [columnKey, column, externalFilterSettings]);
|
|
126
|
-
const canGroup = useMemo(() => {
|
|
127
|
-
if (!columnKey || !column) {
|
|
128
|
-
return false;
|
|
129
|
-
}
|
|
130
|
-
return column.groupable === true;
|
|
131
|
-
}, [columnKey, column]);
|
|
132
|
-
const isGrouped = useMemo(() => {
|
|
133
|
-
if (!columnKey) {
|
|
134
|
-
return false;
|
|
135
|
-
}
|
|
136
|
-
const colConfig = columnsConfig.find((c) => c.key === columnKey);
|
|
137
|
-
return colConfig?.grouped === true;
|
|
138
|
-
}, [columnKey, columnsConfig]);
|
|
139
|
-
const hasGroupableColumns = useMemo(() => {
|
|
140
|
-
return finalColumns.some(
|
|
141
|
-
(col) => col.groupable === true || col.grouped === true
|
|
142
|
-
);
|
|
143
|
-
}, [finalColumns]);
|
|
144
126
|
const isAddFilterDisabled = useMemo(() => {
|
|
145
127
|
if (!columnKey || !column) {
|
|
146
128
|
return true;
|
|
@@ -247,44 +229,6 @@ function useHeaderMenuActions(columnKey, finalColumns, defaultSortable, handleSo
|
|
|
247
229
|
disabled: isAddFilterDisabled
|
|
248
230
|
}
|
|
249
231
|
] : [];
|
|
250
|
-
const toggleGrouped = (grouped) => {
|
|
251
|
-
if (!columnKey) {
|
|
252
|
-
return;
|
|
253
|
-
}
|
|
254
|
-
const currentGroupedColumns = columnsConfig.filter((c) => c.grouped);
|
|
255
|
-
const newGroupOrder = grouped ? currentGroupedColumns.length : 0;
|
|
256
|
-
const next = columnsConfig.map(
|
|
257
|
-
(c) => c.key === columnKey ? {
|
|
258
|
-
...c,
|
|
259
|
-
grouped,
|
|
260
|
-
groupOrder: grouped ? newGroupOrder : c.groupOrder
|
|
261
|
-
} : c
|
|
262
|
-
);
|
|
263
|
-
onChangeColumnsConfig("table", next);
|
|
264
|
-
};
|
|
265
|
-
const groupActions = hasGroupableColumns ? [
|
|
266
|
-
{
|
|
267
|
-
type: "menuItem",
|
|
268
|
-
startIcon: `${host_static_assets}/${environment_assets}/${pathIcons.group}`,
|
|
269
|
-
label: getLabel(DICTIONARY.GROUP_BY_COLUMN),
|
|
270
|
-
dataTestId: "group-add",
|
|
271
|
-
onClick: () => {
|
|
272
|
-
toggleGrouped(true);
|
|
273
|
-
},
|
|
274
|
-
disabled: !canGroup || isGrouped
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
type: "menuItem",
|
|
278
|
-
startIcon: `${host_static_assets}/${environment_assets}/${pathIcons.removeGroup}`,
|
|
279
|
-
label: getLabel(DICTIONARY.REMOVE_GROUP_COLUMN),
|
|
280
|
-
dataTestId: "group-remove",
|
|
281
|
-
onClick: () => {
|
|
282
|
-
toggleGrouped(false);
|
|
283
|
-
},
|
|
284
|
-
// Solo deshabilitado si no está agrupada O si es una agrupación estática (groupable=false)
|
|
285
|
-
disabled: !isGrouped || !canGroup
|
|
286
|
-
}
|
|
287
|
-
] : [];
|
|
288
232
|
const baseActions = [
|
|
289
233
|
{
|
|
290
234
|
type: "menuItem",
|
|
@@ -302,10 +246,9 @@ function useHeaderMenuActions(columnKey, finalColumns, defaultSortable, handleSo
|
|
|
302
246
|
dataTestId: "hide-column"
|
|
303
247
|
}
|
|
304
248
|
];
|
|
305
|
-
return [...sortActions, ...filterAction, ...
|
|
249
|
+
return [...sortActions, ...filterAction, ...baseActions];
|
|
306
250
|
}, [
|
|
307
251
|
columnKey,
|
|
308
|
-
column,
|
|
309
252
|
canSort,
|
|
310
253
|
canSortExternally,
|
|
311
254
|
hasExternalSortAsc,
|
|
@@ -315,12 +258,8 @@ function useHeaderMenuActions(columnKey, finalColumns, defaultSortable, handleSo
|
|
|
315
258
|
toggleFrozen,
|
|
316
259
|
toggleVisible,
|
|
317
260
|
columnsConfig,
|
|
318
|
-
onChangeColumnsConfig,
|
|
319
261
|
externalSortSettings,
|
|
320
262
|
externalFilterSettings,
|
|
321
|
-
hasGroupableColumns,
|
|
322
|
-
canGroup,
|
|
323
|
-
isGrouped,
|
|
324
263
|
host_static_assets,
|
|
325
264
|
environment_assets,
|
|
326
265
|
getLabel,
|