@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
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
1
|
import { useState, useEffect, useMemo } from "react";
|
|
3
2
|
import { useModuleSkeleton, getPropertyByString } from "@m4l/core";
|
|
4
|
-
import {
|
|
3
|
+
import { d as DATAGRID_SELECT_COLUMN_KEY } from "../../../../constants.js";
|
|
5
4
|
import { g as getDragHeaderRenderer } from "../../helpers/getDragHeaderRenderer/getDragHeaderRenderer.js";
|
|
6
5
|
import { S as SkeletonFormatter } from "../../subcomponents/SkeletonFormatter/SkeletonFormatter.js";
|
|
7
6
|
import { a as filterColumnClassName, S as SelectColumn } from "../../subcomponents/SelectColumn/SelectColumn.js";
|
|
8
|
-
import { R as RenderGroupCell } from "../../subcomponents/RenderGroupCell/RenderGroupCell.js";
|
|
9
7
|
import { A as ActionsColumn } from "../../subcomponents/ActionsColumn/ActionsColumn.js";
|
|
10
8
|
import { R as RadioSelectColumn } from "../../subcomponents/RadioSelectColumn/RadioSelectColumn.js";
|
|
11
9
|
import { u as useDataGrid } from "../../../../hooks/shared/useDataGrid/useDataGrid.js";
|
|
@@ -20,6 +18,7 @@ function getComparator(columns, sortColumn) {
|
|
|
20
18
|
return column.customSort;
|
|
21
19
|
}
|
|
22
20
|
switch (typeOrder) {
|
|
21
|
+
//Si el tipo de dato de la columna es un numerico, retorna una función de ordenamiento numérica
|
|
23
22
|
case "number":
|
|
24
23
|
return (a, b) => {
|
|
25
24
|
try {
|
|
@@ -28,6 +27,7 @@ function getComparator(columns, sortColumn) {
|
|
|
28
27
|
return -1;
|
|
29
28
|
}
|
|
30
29
|
};
|
|
30
|
+
//Por defecto retorna una función de ordenamiento de string
|
|
31
31
|
default:
|
|
32
32
|
return (a, b) => {
|
|
33
33
|
try {
|
|
@@ -39,12 +39,6 @@ function getComparator(columns, sortColumn) {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
const getColumIndex = (key, columnsConfig) => columnsConfig.findIndex((columnConfig) => columnConfig.key === key);
|
|
42
|
-
const findKeyInColumns = (key, columns) => {
|
|
43
|
-
const index = columns.findIndex(
|
|
44
|
-
(column) => key === column.key && column.hidden === false
|
|
45
|
-
);
|
|
46
|
-
return index !== -1;
|
|
47
|
-
};
|
|
48
42
|
const getInOrderColumns = (columns, hasCheckedRows, checkedRowsMultiple, columnsConfig, columnsWidths, rowActionsGetter) => {
|
|
49
43
|
let filteredSortedColumns = columns.filter((column) => {
|
|
50
44
|
const columnConfigIndex = getColumIndex(column.key, columnsConfig);
|
|
@@ -106,6 +100,12 @@ const useSortColumnsRows = (sourceColumns, sourceRows, popoverHandlers) => {
|
|
|
106
100
|
);
|
|
107
101
|
const isSkeleton = useModuleSkeleton();
|
|
108
102
|
const { activeFilters, filters } = useFilters();
|
|
103
|
+
const findKeyInColumns = (key, cols) => {
|
|
104
|
+
const index = cols.findIndex(
|
|
105
|
+
(column) => key === column.key && column.hidden === false
|
|
106
|
+
);
|
|
107
|
+
return index !== -1;
|
|
108
|
+
};
|
|
109
109
|
useEffect(() => {
|
|
110
110
|
setColumns(
|
|
111
111
|
getInOrderColumns(
|
|
@@ -124,17 +124,7 @@ const useSortColumnsRows = (sourceColumns, sourceRows, popoverHandlers) => {
|
|
|
124
124
|
if (JSON.stringify(finalSortedColumns) !== JSON.stringify(sortColumns)) {
|
|
125
125
|
setSortColumns(finalSortedColumns);
|
|
126
126
|
}
|
|
127
|
-
}, [
|
|
128
|
-
sourceColumns,
|
|
129
|
-
columnsConfig,
|
|
130
|
-
rowActionsGetter,
|
|
131
|
-
checkedRows,
|
|
132
|
-
onCheckedRowsChange,
|
|
133
|
-
checkedRowsMultiple,
|
|
134
|
-
columnsWidths,
|
|
135
|
-
sortColumns,
|
|
136
|
-
setSortColumns
|
|
137
|
-
]);
|
|
127
|
+
}, [sourceColumns, columnsConfig, rowActionsGetter]);
|
|
138
128
|
const finalColumns = useMemo(() => {
|
|
139
129
|
const DragAndDropHeaderRenderer = getDragHeaderRenderer(
|
|
140
130
|
(sourceKey, targetKey) => onChangeColumnsOrder("table", sourceKey, targetKey),
|
|
@@ -149,7 +139,7 @@ const useSortColumnsRows = (sourceColumns, sourceRows, popoverHandlers) => {
|
|
|
149
139
|
cellClass,
|
|
150
140
|
headerCellClass: cellClass
|
|
151
141
|
};
|
|
152
|
-
if (newColumn.key ===
|
|
142
|
+
if (newColumn.key === DATAGRID_SELECT_COLUMN_KEY || newColumn.isDraggable !== void 0 && newColumn.isDraggable === false) {
|
|
153
143
|
return newColumn;
|
|
154
144
|
}
|
|
155
145
|
if (isSkeleton) {
|
|
@@ -171,20 +161,6 @@ const useSortColumnsRows = (sourceColumns, sourceRows, popoverHandlers) => {
|
|
|
171
161
|
newColumn.headerCellClass = `${newColumn.headerCellClass} ${filterColumnClassName}`.trim();
|
|
172
162
|
}
|
|
173
163
|
newColumn.renderHeaderCell = DragAndDropHeaderRenderer;
|
|
174
|
-
const columnConfig = columnsConfig.find((cfg) => cfg.key === c.key);
|
|
175
|
-
const isGroupedInConfig = columnConfig?.grouped === true;
|
|
176
|
-
const originalColumn = sourceColumns.find((col) => col.key === c.key);
|
|
177
|
-
const hasCustomGroupCell = originalColumn?.renderGroupCell !== void 0;
|
|
178
|
-
if (isGroupedInConfig) {
|
|
179
|
-
const customGroupCell = hasCustomGroupCell ? originalColumn?.renderGroupCell : void 0;
|
|
180
|
-
newColumn.renderGroupCell = (cellProps) => /* @__PURE__ */ jsx(
|
|
181
|
-
RenderGroupCell,
|
|
182
|
-
{
|
|
183
|
-
...cellProps,
|
|
184
|
-
customRenderGroupCell: customGroupCell
|
|
185
|
-
}
|
|
186
|
-
);
|
|
187
|
-
}
|
|
188
164
|
return newColumn;
|
|
189
165
|
});
|
|
190
166
|
}, [
|
|
@@ -192,9 +168,7 @@ const useSortColumnsRows = (sourceColumns, sourceRows, popoverHandlers) => {
|
|
|
192
168
|
columns,
|
|
193
169
|
activeFilters,
|
|
194
170
|
onChangeColumnsOrder,
|
|
195
|
-
popoverHandlers
|
|
196
|
-
columnsConfig,
|
|
197
|
-
sourceColumns
|
|
171
|
+
popoverHandlers
|
|
198
172
|
]);
|
|
199
173
|
const finalRows = useMemo(() => {
|
|
200
174
|
const nextRows = sourceRows.filter((r) => {
|
|
@@ -252,7 +226,7 @@ const useSortColumnsRows = (sourceColumns, sourceRows, popoverHandlers) => {
|
|
|
252
226
|
return 0;
|
|
253
227
|
});
|
|
254
228
|
return nextRows;
|
|
255
|
-
}, [sourceRows, sortColumns, filters
|
|
229
|
+
}, [sourceRows, sortColumns, filters]);
|
|
256
230
|
return { finalColumns, sortColumns, setSortColumns, finalRows };
|
|
257
231
|
};
|
|
258
232
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { f as DATAGRID_SEMANTIC_WIDTHS, e as DATAGRID_ACTIONS_COLUMN_KEY } from "../../../../constants.js";
|
|
3
3
|
import { u as useDataGrid } from "../../../../hooks/shared/useDataGrid/useDataGrid.js";
|
|
4
4
|
import { M as MenuActions } from "../../../../../MenuActions/MenuActions.js";
|
|
5
5
|
function ActionsFormatter(props) {
|
package/components/datagrids/views/TableView/subcomponents/HeaderRenderClick/HeaderRenderClick.js
CHANGED
|
@@ -6,7 +6,7 @@ import { P as MenuListStyled, Q as HeaderRenderClickStyled } from "../../../../s
|
|
|
6
6
|
import { M as MenuDivider } from "../../../../../mui_extended/MenuDivider/MenuDivider.js";
|
|
7
7
|
import { P as Popover } from "../../../../../mui_extended/Popover/Popover.js";
|
|
8
8
|
import { D as DICTIONARY } from "../../../../dictionary.js";
|
|
9
|
-
import {
|
|
9
|
+
import { g as DATAGRID_HEADER_RENDER_CLICK_KEY } from "../../../../constants.js";
|
|
10
10
|
import { u as useFilters } from "../../../../hooks/shared/useFilters/useFilters.js";
|
|
11
11
|
function HeaderRenderClick(props) {
|
|
12
12
|
const {
|
package/components/datagrids/views/TableView/subcomponents/RadioSelectColumn/RadioSelectColumn.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { d as DATAGRID_SELECT_COLUMN_KEY } from "../../../../constants.js";
|
|
3
3
|
import { u as useDataGrid } from "../../../../hooks/shared/useDataGrid/useDataGrid.js";
|
|
4
4
|
import { R as RadioFormatter } from "./subcomponents/RadioFormatter/RadioFormatter.js";
|
|
5
5
|
function RadioSelectGroupFormatter(_props) {
|
|
@@ -28,7 +28,7 @@ function RadioSelectColumnHeaderRenderer(_props) {
|
|
|
28
28
|
return null;
|
|
29
29
|
}
|
|
30
30
|
const RadioSelectColumn = {
|
|
31
|
-
key:
|
|
31
|
+
key: DATAGRID_SELECT_COLUMN_KEY,
|
|
32
32
|
name: "",
|
|
33
33
|
width: 32,
|
|
34
34
|
minWidth: 32,
|
|
@@ -1,49 +1,21 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useRowSelection, SelectCellFormatter } from "react-data-grid";
|
|
3
|
+
import { d as DATAGRID_SELECT_COLUMN_KEY } from "../../../../constants.js";
|
|
3
4
|
import { u as useDataGrid } from "../../../../hooks/shared/useDataGrid/useDataGrid.js";
|
|
4
5
|
const filterColumnClassName = "filter-cell";
|
|
5
6
|
const filterHeight = 35;
|
|
6
|
-
function getAllChildRowIds(childRows, rowKeyGetter) {
|
|
7
|
-
const ids = [];
|
|
8
|
-
for (const row of childRows) {
|
|
9
|
-
if ("childRows" in row && Array.isArray(row.childRows)) {
|
|
10
|
-
ids.push(...getAllChildRowIds(row.childRows, rowKeyGetter));
|
|
11
|
-
} else {
|
|
12
|
-
ids.push(rowKeyGetter(row));
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
return ids;
|
|
16
|
-
}
|
|
17
7
|
function SelectGroupFormatter(props) {
|
|
18
|
-
const {
|
|
19
|
-
const { childRows } = props;
|
|
20
|
-
const childRowIds = getAllChildRowIds(childRows, rowKeyGetter);
|
|
21
|
-
const selectedCount = childRowIds.filter((id) => checkedRows?.has(id)).length;
|
|
22
|
-
const totalCount = childRowIds.length;
|
|
23
|
-
const allChildrenChecked = totalCount > 0 && selectedCount === totalCount;
|
|
24
|
-
const someChildrenChecked = selectedCount > 0 && selectedCount < totalCount;
|
|
8
|
+
const { isRowSelected, onRowSelectionChange } = useRowSelection();
|
|
25
9
|
const onChange = (checked) => {
|
|
26
|
-
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
const newCheckedRows = new Set(checkedRows);
|
|
30
|
-
if (checked) {
|
|
31
|
-
childRowIds.forEach((id) => newCheckedRows.add(id));
|
|
32
|
-
} else {
|
|
33
|
-
childRowIds.forEach((id) => newCheckedRows.delete(id));
|
|
34
|
-
}
|
|
35
|
-
onCheckedRowsChange(newCheckedRows);
|
|
10
|
+
onRowSelectionChange({ row: props.row, checked, isShiftClick: false });
|
|
36
11
|
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"aria-label": "Select Group"
|
|
45
|
-
}
|
|
46
|
-
);
|
|
12
|
+
const cellFormater = SelectCellFormatter({
|
|
13
|
+
value: isRowSelected,
|
|
14
|
+
tabIndex: props.tabIndex,
|
|
15
|
+
onChange,
|
|
16
|
+
"aria-label": "Select Group"
|
|
17
|
+
});
|
|
18
|
+
return cellFormater;
|
|
47
19
|
}
|
|
48
20
|
function SelectFormatter(props) {
|
|
49
21
|
const { checkedRows, onCheckedRowsChange, rowKeyGetter } = useDataGrid();
|
|
@@ -68,30 +40,26 @@ function SelectFormatter(props) {
|
|
|
68
40
|
}
|
|
69
41
|
const SelectColumnHeaderRenderer = (props) => {
|
|
70
42
|
const { rows, rowKeyGetter, onCheckedRowsChange, checkedRows } = useDataGrid();
|
|
71
|
-
const selectedCount = checkedRows?.size ?? 0;
|
|
72
|
-
const totalCount = rows.length;
|
|
73
|
-
const allRowsChecked = totalCount > 0 && selectedCount === totalCount;
|
|
74
|
-
const someRowsChecked = selectedCount > 0 && selectedCount < totalCount;
|
|
75
43
|
const onAllRowsCheckedChange = (checked) => {
|
|
76
44
|
if (!onCheckedRowsChange) {
|
|
77
45
|
return;
|
|
78
46
|
}
|
|
79
47
|
if (checked) {
|
|
80
|
-
onCheckedRowsChange(new Set(rows.map((
|
|
48
|
+
onCheckedRowsChange(new Set(rows.map((r) => rowKeyGetter(r))));
|
|
81
49
|
} else {
|
|
82
50
|
onCheckedRowsChange(/* @__PURE__ */ new Set());
|
|
83
51
|
}
|
|
84
52
|
};
|
|
53
|
+
const allRowsChecked = rows.length === checkedRows?.size;
|
|
85
54
|
return SelectCellFormatter({
|
|
86
55
|
"aria-label": "Select All",
|
|
87
56
|
tabIndex: props.tabIndex,
|
|
88
57
|
value: allRowsChecked,
|
|
89
|
-
indeterminate: someRowsChecked,
|
|
90
58
|
onChange: onAllRowsCheckedChange
|
|
91
59
|
});
|
|
92
60
|
};
|
|
93
61
|
const SelectColumn = {
|
|
94
|
-
key:
|
|
62
|
+
key: DATAGRID_SELECT_COLUMN_KEY,
|
|
95
63
|
name: "",
|
|
96
64
|
width: 32,
|
|
97
65
|
minWidth: 32,
|
|
@@ -11,24 +11,13 @@ import { u as useDataGrid } from "../../../../../../hooks/shared/useDataGrid/use
|
|
|
11
11
|
import { W as WindowBase } from "../../../../../../../WindowBase/WindowBase.js";
|
|
12
12
|
import { A as ActionCancel } from "../../../../../../../CommonActions/components/ActionCancel/ActionCancel.js";
|
|
13
13
|
import { A as ActionIntro } from "../../../../../../../CommonActions/components/ActionIntro/ActionIntro.js";
|
|
14
|
-
const BASE_MODAL_WIDTH = 520;
|
|
15
|
-
const GROUP_COLUMN_WIDTH = 80;
|
|
16
14
|
const useModalSettings = (size, columns) => {
|
|
17
15
|
const { openModal, closeModal } = useModal();
|
|
18
|
-
const {
|
|
19
|
-
columnsConfig,
|
|
20
|
-
onChangeColumnsConfig,
|
|
21
|
-
currentRowHeight,
|
|
22
|
-
classes
|
|
23
|
-
} = useDataGrid();
|
|
16
|
+
const { columnsConfig, onChangeColumnsConfig, currentRowHeight, classes } = useDataGrid();
|
|
24
17
|
const { getLabel } = useModuleDictionary();
|
|
25
18
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
26
19
|
const isMobile = useIsMobile();
|
|
27
20
|
const ref = useRef(null);
|
|
28
|
-
const hasGroupableColumns = columns.some(
|
|
29
|
-
(col) => col.groupable === true || col.grouped === true
|
|
30
|
-
);
|
|
31
|
-
const modalWidth = hasGroupableColumns ? BASE_MODAL_WIDTH + GROUP_COLUMN_WIDTH : BASE_MODAL_WIDTH;
|
|
32
21
|
const onCloseSettings = useCallback(() => {
|
|
33
22
|
closeModal();
|
|
34
23
|
}, [closeModal]);
|
|
@@ -42,7 +31,7 @@ const useModalSettings = (size, columns) => {
|
|
|
42
31
|
};
|
|
43
32
|
const onClickSettings = () => {
|
|
44
33
|
openModal({
|
|
45
|
-
initialWidth:
|
|
34
|
+
initialWidth: 500,
|
|
46
35
|
initialHeight: 680,
|
|
47
36
|
fullScreen: isMobile,
|
|
48
37
|
window: /* @__PURE__ */ jsx(
|
|
@@ -8,24 +8,17 @@ import { v as ColumnsConfigWrapperStyled, w as ColumnsConfigDataGridStyled, x as
|
|
|
8
8
|
import { D as DICTIONARY } from "../../../../../../dictionary.js";
|
|
9
9
|
import { C as ColumnInteractiveCheckFormatter } from "../../../../../../formatters/ColumnInteractiveCheckFormatter/formatter.js";
|
|
10
10
|
function getRowsFromColumnsConfig(columnsConfig, columns) {
|
|
11
|
-
return columnsConfig.filter((cConfig) => !cConfig.hidden).map(
|
|
12
|
-
|
|
13
|
-
const isGroupable = originalColumn?.groupable === true;
|
|
14
|
-
const isGroupedNow = cConfig.grouped === true;
|
|
15
|
-
return {
|
|
11
|
+
return columnsConfig.filter((cConfig) => !cConfig.hidden).map(
|
|
12
|
+
(cConfig) => ({
|
|
16
13
|
key: cConfig.key,
|
|
17
14
|
name: columns?.find((c) => c.key === cConfig.key)?.name ?? "",
|
|
18
15
|
visible: cConfig.visible === void 0 ? true : cConfig.visible,
|
|
19
16
|
frozen: cConfig.frozen === void 0 ? false : cConfig.frozen,
|
|
20
|
-
grouped: isGroupedNow,
|
|
21
|
-
// Checkbox habilitado solo si groupable=true
|
|
22
|
-
groupable: isGroupable,
|
|
23
17
|
originalIndex: cConfig.originalIndex,
|
|
24
18
|
originalFrozen: cConfig.originalFrozen,
|
|
25
|
-
originalVisible: cConfig.originalVisible
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
});
|
|
19
|
+
originalVisible: cConfig.originalVisible
|
|
20
|
+
})
|
|
21
|
+
);
|
|
29
22
|
}
|
|
30
23
|
const getAlignClass = (align) => {
|
|
31
24
|
const cellClass = align !== void 0 ? `rdg-cell-align-${align}` : "";
|
|
@@ -58,8 +51,8 @@ const ColumnsConfig = forwardRef(
|
|
|
58
51
|
onClickIntro: handleIntro,
|
|
59
52
|
current: divRef.current
|
|
60
53
|
}));
|
|
61
|
-
const columnsdata_grid = useMemo(
|
|
62
|
-
|
|
54
|
+
const columnsdata_grid = useMemo(
|
|
55
|
+
() => [
|
|
63
56
|
{
|
|
64
57
|
key: "name",
|
|
65
58
|
name: getLabel(DICTIONARY.SETTINGS_COLUMN_NAME),
|
|
@@ -71,7 +64,7 @@ const ColumnsConfig = forwardRef(
|
|
|
71
64
|
{
|
|
72
65
|
key: "originalIndex",
|
|
73
66
|
name: getLabel(DICTIONARY.SETTINGS_COLUMN_POSITION),
|
|
74
|
-
width:
|
|
67
|
+
width: 50,
|
|
75
68
|
type: "number",
|
|
76
69
|
...getAlignClass("center")
|
|
77
70
|
},
|
|
@@ -91,24 +84,9 @@ const ColumnsConfig = forwardRef(
|
|
|
91
84
|
renderCell: ColumnInteractiveCheckFormatter,
|
|
92
85
|
...getAlignClass("center")
|
|
93
86
|
}
|
|
94
|
-
]
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
);
|
|
98
|
-
if (hasGroupableColumns) {
|
|
99
|
-
baseColumns.push({
|
|
100
|
-
key: "grouped",
|
|
101
|
-
name: getLabel(DICTIONARY.SETTINGS_COLUMN_GROUP),
|
|
102
|
-
width: 80,
|
|
103
|
-
type: "boolean",
|
|
104
|
-
renderCell: ColumnInteractiveCheckFormatter,
|
|
105
|
-
// disabledKey hace que el checkbox esté deshabilitado cuando groupable=false
|
|
106
|
-
disabledKey: "groupable",
|
|
107
|
-
...getAlignClass("center")
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
return baseColumns;
|
|
111
|
-
}, [getLabel, columns]);
|
|
87
|
+
],
|
|
88
|
+
[getLabel]
|
|
89
|
+
);
|
|
112
90
|
const checkAll = () => {
|
|
113
91
|
setRows(rows.map((row) => ({ ...row, visible: true })));
|
|
114
92
|
};
|
|
@@ -121,16 +99,13 @@ const ColumnsConfig = forwardRef(
|
|
|
121
99
|
...row,
|
|
122
100
|
visible: row.originalVisible,
|
|
123
101
|
frozen: row.originalFrozen,
|
|
124
|
-
grouped: row.originalGrouped,
|
|
125
102
|
index: row.originalIndex
|
|
126
103
|
})).sort((a, b) => a.index - b.index)
|
|
127
104
|
);
|
|
128
105
|
};
|
|
129
106
|
useEffect(() => {
|
|
130
107
|
if (isInit === false) {
|
|
131
|
-
setRows(
|
|
132
|
-
getRowsFromColumnsConfig(columnsConfig, columns)
|
|
133
|
-
);
|
|
108
|
+
setRows(getRowsFromColumnsConfig(columnsConfig, columns));
|
|
134
109
|
}
|
|
135
110
|
setIsInit(false);
|
|
136
111
|
}, [columnsConfig]);
|
|
@@ -198,7 +173,6 @@ const ColumnsConfig = forwardRef(
|
|
|
198
173
|
);
|
|
199
174
|
};
|
|
200
175
|
const handleIntro = () => {
|
|
201
|
-
const groupedRows = rows.filter((row) => row.grouped);
|
|
202
176
|
const newColumnsConfig = columnsConfig.map((columnConfig) => {
|
|
203
177
|
const newColumnConfig = { ...columnConfig };
|
|
204
178
|
if (!columnConfig.hidden) {
|
|
@@ -208,19 +182,11 @@ const ColumnsConfig = forwardRef(
|
|
|
208
182
|
newColumnConfig.frozen = columnConfigRow.frozen;
|
|
209
183
|
}
|
|
210
184
|
const rowIndex = rows.findIndex(
|
|
211
|
-
(
|
|
185
|
+
(row) => row.key === columnConfig.key
|
|
212
186
|
);
|
|
213
187
|
if (rowIndex > -1) {
|
|
214
188
|
newColumnConfig.index = rowIndex;
|
|
215
189
|
}
|
|
216
|
-
const rowWithGroupConfig = rows.find((currentRow) => currentRow.key === columnConfig.key);
|
|
217
|
-
if (rowWithGroupConfig) {
|
|
218
|
-
newColumnConfig.grouped = rowWithGroupConfig.grouped;
|
|
219
|
-
const groupOrderIndex = groupedRows.findIndex(
|
|
220
|
-
(groupedRow) => groupedRow.key === columnConfig.key
|
|
221
|
-
);
|
|
222
|
-
newColumnConfig.groupOrder = groupOrderIndex > -1 ? groupOrderIndex : rowIndex;
|
|
223
|
-
}
|
|
224
190
|
}
|
|
225
191
|
return newColumnConfig;
|
|
226
192
|
}).sort((a, b) => getRowIndex(a) - getRowIndex(b));
|
|
@@ -2,49 +2,27 @@ import { DataGridContextProps, IConfigColumn } from '../../../../../../contexts/
|
|
|
2
2
|
import { GridProps } from '../../../../../../types';
|
|
3
3
|
import { Column } from 'react-data-grid';
|
|
4
4
|
export interface Row {
|
|
5
|
-
/** Key única de la columna */
|
|
6
5
|
key: string;
|
|
7
|
-
/** Nombre visible de la columna */
|
|
8
6
|
name: string;
|
|
9
|
-
/** Si la columna está visible */
|
|
10
7
|
visible: boolean;
|
|
11
|
-
/** Si la columna está congelada */
|
|
12
8
|
frozen: boolean;
|
|
13
|
-
/** Si la columna está agrupada actualmente */
|
|
14
|
-
grouped: boolean;
|
|
15
|
-
/** Si la columna PUEDE ser agrupada (está en groupColumns) */
|
|
16
|
-
groupable: boolean;
|
|
17
|
-
/** Ancho de la columna */
|
|
18
9
|
width: number;
|
|
19
|
-
/** Índice actual de la columna */
|
|
20
10
|
index: number;
|
|
21
|
-
/** Índice original de la columna */
|
|
22
11
|
originalIndex: number;
|
|
23
|
-
/** Visibilidad original de la columna */
|
|
24
12
|
originalVisible: boolean;
|
|
25
|
-
/** Estado congelado original de la columna */
|
|
26
13
|
originalFrozen: boolean;
|
|
27
|
-
/** Estado agrupado original de la columna */
|
|
28
|
-
originalGrouped: boolean;
|
|
29
14
|
}
|
|
30
15
|
export type ColumnsConfigRef = {
|
|
31
16
|
onClickIntro: () => void;
|
|
32
17
|
current: HTMLDivElement | null;
|
|
33
18
|
};
|
|
34
19
|
export interface ConfigProps {
|
|
35
|
-
/** Función para cerrar el modal de configuración */
|
|
36
20
|
onCloseSettings: () => void;
|
|
37
|
-
/** Columnas del DataGrid */
|
|
38
21
|
columns: readonly Column<any, any>[];
|
|
39
|
-
/** Configuración actual de las columnas */
|
|
40
22
|
columnsConfig: IConfigColumn[];
|
|
41
|
-
/** Callback para cambiar la configuración de columnas */
|
|
42
23
|
onChangeColumnsConfig: (newColumnsConfig: IConfigColumn[]) => void;
|
|
43
|
-
/** Altura de las filas en el grid interno del modal */
|
|
44
24
|
rowHeight: number;
|
|
45
|
-
/** Clases CSS personalizadas */
|
|
46
25
|
classes: DataGridContextProps<unknown, unknown>['classes'];
|
|
47
|
-
/** Tamaño del componente */
|
|
48
26
|
size: GridProps<unknown, unknown>['size'];
|
|
49
27
|
}
|
|
50
28
|
export interface CheckFormatterProps {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useContext } from "react";
|
|
3
3
|
import { SelectCellFormatter } from "react-data-grid";
|
|
4
|
-
import {
|
|
4
|
+
import { S as CheckboxCellWrapperStyled } from "../../../slots/DataGridSlot.js";
|
|
5
5
|
import { a as DataGridContext } from "../../../contexts/DataGridContext/DataGridContext.js";
|
|
6
6
|
import { R as RadioFormatter } from "../../TableView/subcomponents/RadioSelectColumn/subcomponents/RadioFormatter/RadioFormatter.js";
|
|
7
7
|
import { C as CheckboxFormatter } from "../../TableView/subcomponents/CheckboxFormatter/CheckboxFormatter.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Resizable } from 'react-resizable';
|
|
2
|
-
export declare const RootStyled: import('@emotion/styled').StyledComponent<Pick<import('react-resizable').ResizableProps, "
|
|
2
|
+
export declare const RootStyled: import('@emotion/styled').StyledComponent<Pick<import('react-resizable').ResizableProps, "height" | "width" | "className" | "children" | "onResize" | "resizeHandles" | "handle" | "handleSize" | "lockAspectRatio" | "minConstraints" | "maxConstraints" | "onResizeStop" | "onResizeStart" | "draggableOpts" | "transformScale" | "axis"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, {}, {
|
|
3
3
|
ref?: import('react').Ref<Resizable> | undefined;
|
|
4
4
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ResizableBox } from 'react-resizable';
|
|
2
|
-
export declare const RootStyled: import('@emotion/styled').StyledComponent<Pick<import('react-resizable').ResizableBoxProps, "
|
|
2
|
+
export declare const RootStyled: import('@emotion/styled').StyledComponent<Pick<import('react-resizable').ResizableBoxProps, "height" | "width" | "className" | "style" | "children" | "onResize" | "resizeHandles" | "handle" | "handleSize" | "lockAspectRatio" | "minConstraints" | "maxConstraints" | "onResizeStop" | "onResizeStart" | "draggableOpts" | "transformScale" | "axis"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, {}, {
|
|
3
3
|
ref?: import('react').Ref<ResizableBox> | undefined;
|
|
4
4
|
}>;
|