@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,38 +1,150 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef } from "react";
|
|
3
|
+
import { useModuleSkeleton } from "@m4l/core";
|
|
4
|
+
import { T as TEST_PROP_COLUMNS } from "../../types.js";
|
|
5
|
+
import { T as TEST_PROP_ID } from "../../../../test/constants_no_mock.js";
|
|
6
|
+
import { a as getNameDataTestId } from "../../../../test/getNameDataTestId.js";
|
|
7
|
+
import { T as TEST_SKELETON, D as DATAGRID_PREFIX_NAME } from "../../constants.js";
|
|
8
|
+
import { D as DataGridRootStyled, C as CustomHeaderStyled } from "../../slots/DataGridSlot.js";
|
|
9
|
+
import { a as getComponentSlotRoot } from "../../../../utils/getComponentSlotRoot.js";
|
|
10
|
+
import { u as useComponentSize } from "../../../../hooks/useComponentSize/useComponentSize.js";
|
|
11
|
+
import { D as DataGridProvider } from "../../contexts/DataGridContext/DataGridContext.js";
|
|
12
|
+
import { F as FilterProvider } from "../../contexts/FilterContext/FilterContext.js";
|
|
13
|
+
import { H as HeaderActions } from "../../subcomponents/HeaderActions/HeaderActions.js";
|
|
3
14
|
import { R as RenderContent } from "../../views/adapters/RenderContent/RenderContent.js";
|
|
15
|
+
import { C as ControlNavigate } from "../../subcomponents/ControlNavigate/ControlNavigate.js";
|
|
4
16
|
function DataGrid(props) {
|
|
5
17
|
const {
|
|
6
18
|
id,
|
|
7
|
-
withActions,
|
|
8
|
-
columns,
|
|
19
|
+
withActions = true,
|
|
9
20
|
rows,
|
|
21
|
+
columns,
|
|
22
|
+
actionsProps,
|
|
10
23
|
selectedRows,
|
|
11
24
|
onSelectedRowsChange,
|
|
12
25
|
rowKeyGetter,
|
|
26
|
+
rowActionsGetter,
|
|
13
27
|
onRowsChange,
|
|
14
|
-
|
|
15
|
-
|
|
28
|
+
rowHeaderHeights,
|
|
29
|
+
rowHeights,
|
|
30
|
+
initialRowHeightVariant,
|
|
16
31
|
checkedRows,
|
|
17
|
-
onCheckedRowsChange
|
|
32
|
+
onCheckedRowsChange,
|
|
33
|
+
checkedRowsMultiple,
|
|
34
|
+
dataTestId = "",
|
|
35
|
+
customHeader: CustomHeader,
|
|
36
|
+
visibleCustomHeader = true,
|
|
37
|
+
defaultConfig,
|
|
38
|
+
onChangeConfig,
|
|
39
|
+
defaultUserColumns,
|
|
40
|
+
onChangeUserColumns,
|
|
41
|
+
size,
|
|
42
|
+
externalSortSettings,
|
|
43
|
+
externalFilterSettings,
|
|
44
|
+
defaultViewMode,
|
|
45
|
+
cardsViewConfig,
|
|
46
|
+
focusOnRowKey
|
|
18
47
|
} = props;
|
|
19
|
-
|
|
20
|
-
|
|
48
|
+
const {
|
|
49
|
+
withSettings,
|
|
50
|
+
settingsProps,
|
|
51
|
+
withRowsCount,
|
|
52
|
+
withLocalFilters,
|
|
53
|
+
leftActions,
|
|
54
|
+
rightActions,
|
|
55
|
+
withPager,
|
|
56
|
+
pagerOptions
|
|
57
|
+
} = actionsProps;
|
|
58
|
+
const { currentSize } = useComponentSize(size);
|
|
59
|
+
const refDataGrid = useRef(null);
|
|
60
|
+
const classRoot = getComponentSlotRoot(DATAGRID_PREFIX_NAME);
|
|
61
|
+
const ownerState = {
|
|
62
|
+
visibleCustomHeader
|
|
63
|
+
};
|
|
64
|
+
const isSkeleton = useModuleSkeleton();
|
|
65
|
+
return /* @__PURE__ */ jsx(
|
|
66
|
+
DataGridRootStyled,
|
|
21
67
|
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
68
|
+
ref: refDataGrid,
|
|
69
|
+
className: classRoot,
|
|
70
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
71
|
+
[TEST_PROP_COLUMNS]: JSON.stringify(columns),
|
|
72
|
+
[TEST_PROP_ID]: getNameDataTestId(
|
|
73
|
+
DATAGRID_PREFIX_NAME,
|
|
74
|
+
"root",
|
|
75
|
+
dataTestId
|
|
76
|
+
),
|
|
77
|
+
[TEST_SKELETON]: isSkeleton ? true : false
|
|
78
|
+
} : {},
|
|
79
|
+
children: /* @__PURE__ */ jsx(
|
|
80
|
+
DataGridProvider,
|
|
81
|
+
{
|
|
82
|
+
id: props.id,
|
|
83
|
+
columns,
|
|
84
|
+
rowHeights,
|
|
85
|
+
rowHeaderHeights,
|
|
86
|
+
initialRowHeightVariant,
|
|
87
|
+
rowsCount: rows.length,
|
|
88
|
+
checkedRows,
|
|
89
|
+
rowActionsGetter,
|
|
90
|
+
onCheckedRowsChange,
|
|
91
|
+
checkedRowsMultiple,
|
|
92
|
+
rowKeyGetter,
|
|
93
|
+
rows,
|
|
94
|
+
defaultConfig,
|
|
95
|
+
onChangeConfig,
|
|
96
|
+
defaultUserColumns,
|
|
97
|
+
onChangeUserColumns,
|
|
98
|
+
size: currentSize,
|
|
99
|
+
externalSortSettings,
|
|
100
|
+
externalFilterSettings,
|
|
101
|
+
defaultViewMode,
|
|
102
|
+
cardsViewConfig,
|
|
103
|
+
children: /* @__PURE__ */ jsxs(FilterProvider, { initialActiveFilters: false, children: [
|
|
104
|
+
withActions && actionsProps && /* @__PURE__ */ jsx(
|
|
105
|
+
HeaderActions,
|
|
106
|
+
{
|
|
107
|
+
withSettings,
|
|
108
|
+
settingsProps,
|
|
109
|
+
withRowsCount,
|
|
110
|
+
withLocalFilters,
|
|
111
|
+
leftActions,
|
|
112
|
+
rightActions,
|
|
113
|
+
withPager,
|
|
114
|
+
columns,
|
|
115
|
+
size: currentSize
|
|
116
|
+
}
|
|
117
|
+
),
|
|
118
|
+
CustomHeader ? /* @__PURE__ */ jsx(CustomHeaderStyled, { ownerState, children: CustomHeader }) : null,
|
|
119
|
+
/* @__PURE__ */ jsx(
|
|
120
|
+
RenderContent,
|
|
121
|
+
{
|
|
122
|
+
id,
|
|
123
|
+
withActions,
|
|
124
|
+
columns,
|
|
125
|
+
rows,
|
|
126
|
+
selectedRows,
|
|
127
|
+
onSelectedRowsChange,
|
|
128
|
+
rowKeyGetter,
|
|
129
|
+
onRowsChange,
|
|
130
|
+
cardsViewConfig,
|
|
131
|
+
focusOnRowKey,
|
|
132
|
+
checkedRows,
|
|
133
|
+
onCheckedRowsChange
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
withPager && /* @__PURE__ */ jsx(
|
|
137
|
+
ControlNavigate,
|
|
138
|
+
{
|
|
139
|
+
size: currentSize,
|
|
140
|
+
...{ withPager, pagerOptions }
|
|
141
|
+
}
|
|
142
|
+
)
|
|
143
|
+
] })
|
|
144
|
+
}
|
|
145
|
+
)
|
|
34
146
|
}
|
|
35
|
-
)
|
|
147
|
+
);
|
|
36
148
|
}
|
|
37
149
|
export {
|
|
38
150
|
DataGrid as D
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const DATAGRID_PREFIX_NAME = "M4LDataGrid";
|
|
2
|
+
const DATAGRID_SELECT_COLUMN_KEY = "M4LDataGrid-CheckedColumn";
|
|
2
3
|
const DATAGRID_ACTIONS_COLUMN_KEY = "M4LDataGrid-ActionsColumn";
|
|
3
4
|
const TEST_SKELETON = "data-skeleton";
|
|
4
5
|
const DATAGRID_HEADER_RENDER_CLICK_KEY = "M4LDataGrid-HeaderRenderClick";
|
|
@@ -44,7 +45,8 @@ export {
|
|
|
44
45
|
DATAGRID_ROW_HEIGHTS as a,
|
|
45
46
|
DATAGRID_ROW_HEADER_HEIGHTS as b,
|
|
46
47
|
DATAGRID_ID_DICTIONARY as c,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
DATAGRID_SELECT_COLUMN_KEY as d,
|
|
49
|
+
DATAGRID_ACTIONS_COLUMN_KEY as e,
|
|
50
|
+
DATAGRID_SEMANTIC_WIDTHS as f,
|
|
51
|
+
DATAGRID_HEADER_RENDER_CLICK_KEY as g
|
|
50
52
|
};
|
|
@@ -192,8 +192,8 @@ function DataGridProvider(props) {
|
|
|
192
192
|
columns,
|
|
193
193
|
"table",
|
|
194
194
|
resolvedDefaultConfig?.columnsConfig,
|
|
195
|
-
{ frozen: false
|
|
196
|
-
{ originalFrozen: false
|
|
195
|
+
{ frozen: false },
|
|
196
|
+
{ originalFrozen: false }
|
|
197
197
|
)
|
|
198
198
|
);
|
|
199
199
|
const finalCardsConfig = (() => {
|
|
@@ -267,16 +267,12 @@ function DataGridProvider(props) {
|
|
|
267
267
|
if (newColumnsForView.length > 0) {
|
|
268
268
|
const colLength = currentConfig.length;
|
|
269
269
|
const viewSpecificDefaults = viewModeParam === "cards" ? { showTitle: false } : {
|
|
270
|
-
frozen: false
|
|
271
|
-
grouped: false,
|
|
272
|
-
groupOrder: 0
|
|
270
|
+
frozen: false
|
|
273
271
|
};
|
|
274
272
|
const originalViewSpecificDefaults = viewModeParam === "cards" ? {
|
|
275
273
|
originalShowTitle: false
|
|
276
274
|
} : {
|
|
277
|
-
originalFrozen: false
|
|
278
|
-
originalGrouped: false,
|
|
279
|
-
originalGroupOrder: 0
|
|
275
|
+
originalFrozen: false
|
|
280
276
|
};
|
|
281
277
|
const newColConfig = getInitialColumnsConfig(
|
|
282
278
|
id,
|
|
@@ -23,26 +23,16 @@ export interface BaseConfigColumn {
|
|
|
23
23
|
visible: boolean;
|
|
24
24
|
index: number;
|
|
25
25
|
frozen: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Si la columna está agrupada actualmente.
|
|
28
|
-
* Solo aplica para TreeDataGrid.
|
|
29
|
-
*/
|
|
30
|
-
grouped?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Orden en la jerarquía de agrupación (0 = primer nivel).
|
|
33
|
-
* Solo aplica para TreeDataGrid.
|
|
34
|
-
*/
|
|
35
|
-
groupOrder?: number;
|
|
36
26
|
/**
|
|
37
27
|
* @deprecated internamente el componente usa el name de columns.
|
|
38
28
|
*/
|
|
39
29
|
name?: string;
|
|
40
30
|
}
|
|
41
31
|
/**
|
|
42
|
-
* Configuración base para vista cards - omite frozen
|
|
32
|
+
* Configuración base para vista cards - omite frozen y agrega showTitle
|
|
43
33
|
* USO: Los desarrolladores pasan esto en defaultUserColumns.columnsConfigCards
|
|
44
34
|
*/
|
|
45
|
-
export interface BaseConfigColumnCards extends Omit<BaseConfigColumn, 'frozen'
|
|
35
|
+
export interface BaseConfigColumnCards extends Omit<BaseConfigColumn, 'frozen'> {
|
|
46
36
|
showTitle: boolean;
|
|
47
37
|
}
|
|
48
38
|
/**
|
|
@@ -54,16 +44,12 @@ export interface IConfigColumn extends BaseConfigColumn {
|
|
|
54
44
|
originalIndex: number;
|
|
55
45
|
originalVisible: boolean;
|
|
56
46
|
originalFrozen: boolean;
|
|
57
|
-
/** Valor original de grouped definido en la columna */
|
|
58
|
-
originalGrouped?: boolean;
|
|
59
|
-
/** Valor original de groupOrder */
|
|
60
|
-
originalGroupOrder?: number;
|
|
61
47
|
}
|
|
62
48
|
/**
|
|
63
49
|
* Configuración extendida para cards (estado interno)
|
|
64
50
|
* USO INTERNO: El contexto agrega estas propiedades para tracking y gestión de estado
|
|
65
51
|
*/
|
|
66
|
-
export interface IConfigColumnCards extends Omit<IConfigColumn, 'frozen' | 'originalFrozen'
|
|
52
|
+
export interface IConfigColumnCards extends Omit<IConfigColumn, 'frozen' | 'originalFrozen'> {
|
|
67
53
|
showTitle: boolean;
|
|
68
54
|
originalShowTitle: boolean;
|
|
69
55
|
}
|
|
@@ -74,9 +60,7 @@ export type ViewMode = 'table' | 'cards';
|
|
|
74
60
|
* EXTENSIBILIDAD: Agregar aquí nuevas propiedades para nuevas vistas (ej: columnsConfigList)
|
|
75
61
|
*/
|
|
76
62
|
export interface IGridConfigExtended extends IGridConfig {
|
|
77
|
-
/** Configuración de columnas para vista cards */
|
|
78
63
|
columnsConfigCards?: BaseConfigColumnCards[];
|
|
79
|
-
/** Modo de vista actual (table/cards) */
|
|
80
64
|
viewMode?: ViewMode;
|
|
81
65
|
}
|
|
82
66
|
export interface DataGridProviderProps<TRow, TSummaryRow, TKey extends RowKey = RowKey> extends Pick<GridProps<TRow, TSummaryRow, TKey>, 'rows' | 'columns' | 'rowActionsGetter' | 'rowHeaderHeights' | 'rowHeights' | 'initialRowHeightVariant' | 'checkedRows' | 'onCheckedRowsChange' | 'checkedRowsMultiple' | 'rowKeyGetter' | 'externalSortSettings' | 'externalFilterSettings' | 'defaultViewMode' | 'cardsViewConfig'> {
|
|
@@ -34,9 +34,6 @@ export declare const DICTIONARY: {
|
|
|
34
34
|
UNFREEZE_COLUMN: string;
|
|
35
35
|
HIDE_COLUMN: string;
|
|
36
36
|
ADD_FILTER_COLUMN: string;
|
|
37
|
-
SETTINGS_COLUMN_GROUP: string;
|
|
38
|
-
GROUP_BY_COLUMN: string;
|
|
39
|
-
REMOVE_GROUP_COLUMN: string;
|
|
40
37
|
VIEW_MODE_TABLE: string;
|
|
41
38
|
VIEW_MODE_CARDS: string;
|
|
42
39
|
TOOLTIP_VIEW_MODE: string;
|
|
@@ -34,10 +34,6 @@ const DICTIONARY = {
|
|
|
34
34
|
UNFREEZE_COLUMN: `${DATAGRID_ID_DICTIONARY}.unfreeze_column`,
|
|
35
35
|
HIDE_COLUMN: `${DATAGRID_ID_DICTIONARY}.hide_column`,
|
|
36
36
|
ADD_FILTER_COLUMN: `${DATAGRID_ID_DICTIONARY}.add_filter`,
|
|
37
|
-
// Labels para agrupación de columnas (Row Grouping)
|
|
38
|
-
SETTINGS_COLUMN_GROUP: `${DATAGRID_ID_DICTIONARY}.settings_column_group`,
|
|
39
|
-
GROUP_BY_COLUMN: `${DATAGRID_ID_DICTIONARY}.group_by_column`,
|
|
40
|
-
REMOVE_GROUP_COLUMN: `${DATAGRID_ID_DICTIONARY}.remove_group_column`,
|
|
41
37
|
VIEW_MODE_TABLE: `${DATAGRID_ID_DICTIONARY}.view_mode_table`,
|
|
42
38
|
VIEW_MODE_CARDS: `${DATAGRID_ID_DICTIONARY}.view_mode_cards`,
|
|
43
39
|
TOOLTIP_VIEW_MODE: `${DATAGRID_ID_DICTIONARY}.tooltip_view_mode`,
|
|
@@ -4,7 +4,6 @@ import { ColumnBooleanFormatterProps } from './types';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare const useColumnBoolean: <TRow>(props: ColumnBooleanFormatterProps<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 { g as getFormatBoolean } from "../../../formatters/BooleanFormatter/BooleanFormatter.js";
|
|
2
2
|
import { C as ColumnBooleanFormatter } from "./formatter.js";
|
|
3
|
-
import { C as ColumnBooleanGroupFormatter } from "./ColumnBooleanGroupFormatter.js";
|
|
4
3
|
import { useModuleDictionary, getPropertyByString } from "@m4l/core";
|
|
5
4
|
import { useState, useRef, useEffect, useMemo } from "react";
|
|
6
5
|
import { deepEqual } from "fast-equals";
|
|
@@ -71,7 +70,6 @@ const useColumnBoolean = (props) => {
|
|
|
71
70
|
return useMemo(
|
|
72
71
|
() => ({
|
|
73
72
|
formatter: ColumnBooleanFormatter(stateProps),
|
|
74
|
-
renderGroupCell: ColumnBooleanGroupFormatter(stateProps),
|
|
75
73
|
customFilter: getCustomBooleanFilter(stateProps, getLabel),
|
|
76
74
|
customSort: getCustomBooleanSort(stateProps, getLabel)
|
|
77
75
|
}),
|
|
@@ -4,7 +4,6 @@ import { ColumnChipStatusFormatterProps } from './types';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare const useColumnChipStatus: <TRow>(props: ColumnChipStatusFormatterProps<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 | number) => 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 ColumnChipStatusFormatter } from "./formatter.js";
|
|
3
|
-
import { C as ColumnChipStatusGroupFormatter } from "./ColumnChipStatusGroupFormatter.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";
|
|
@@ -29,7 +28,6 @@ const useColumnChipStatus = (props) => {
|
|
|
29
28
|
}, [props]);
|
|
30
29
|
return useMemo(() => ({
|
|
31
30
|
formatter: ColumnChipStatusFormatter(stateProps),
|
|
32
|
-
renderGroupCell: ColumnChipStatusGroupFormatter(stateProps),
|
|
33
31
|
customFilter: getCustomChipStatusFilter(stateProps),
|
|
34
32
|
customSort: getCustomChipStatusSort(stateProps)
|
|
35
33
|
}), [stateProps]);
|
|
@@ -11,5 +11,4 @@ import { ColumnColorFormatterProps } from './types';
|
|
|
11
11
|
*/
|
|
12
12
|
export declare const useColumnColor: <TRow>(props: ColumnColorFormatterProps<TRow>) => {
|
|
13
13
|
formatter: (renderProps: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
renderGroupCell: (groupProps: import('react-data-grid').RenderGroupCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
15
14
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useState, useRef, useEffect, useMemo } from "react";
|
|
2
2
|
import { deepEqual } from "fast-equals";
|
|
3
3
|
import { C as ColumnColorFormatter } from "./formatter.js";
|
|
4
|
-
import { C as ColumnColorGroupFormatter } from "./ColumnColorGroupFormatter.js";
|
|
5
4
|
const useColumnColor = (props) => {
|
|
6
5
|
const [stateProps, setStateProps] = useState(props);
|
|
7
6
|
const refProps = useRef({ ...props });
|
|
@@ -13,8 +12,7 @@ const useColumnColor = (props) => {
|
|
|
13
12
|
}, [props]);
|
|
14
13
|
return useMemo(
|
|
15
14
|
() => ({
|
|
16
|
-
formatter: ColumnColorFormatter(stateProps)
|
|
17
|
-
renderGroupCell: ColumnColorGroupFormatter(stateProps)
|
|
15
|
+
formatter: ColumnColorFormatter(stateProps)
|
|
18
16
|
}),
|
|
19
17
|
[stateProps]
|
|
20
18
|
);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { ColumnConcatenatedValuesFormatter as ColumnConcatenatedValueFormatter } from './formatter';
|
|
2
|
-
export { ColumnConcatenatedValuesGroupFormatter } from './ColumnConcatenatedValuesGroupFormatter';
|
|
3
2
|
export type { ColumnConcatenatedValuesFormatterProps } from './types';
|
|
4
3
|
export { useColumnConcatenatedValues as useColumnConcatenatedValue } from './useColumnConcatenatedValues';
|
|
@@ -4,7 +4,6 @@ import { ColumnConcatenatedValuesFormatterProps } from './types';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare const useColumnConcatenatedValues: <TRow>(props: ColumnConcatenatedValuesFormatterProps<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 { deepEqual } from "fast-equals";
|
|
3
|
-
import { C as ColumnConcatenatedValuesGroupFormatter } from "./ColumnConcatenatedValuesGroupFormatter.js";
|
|
4
3
|
import { g as getFormatConcatenated } from "../../../formatters/ConcatenatedFormatter/ConcatenatedFormatter.js";
|
|
5
4
|
import { useState, useRef, useEffect, useMemo } from "react";
|
|
6
5
|
import { C as ColumnConcatenatedValuesFormatter } from "./formatter.js";
|
|
@@ -51,7 +50,6 @@ const useColumnConcatenatedValues = (props) => {
|
|
|
51
50
|
}, [props]);
|
|
52
51
|
return useMemo(() => ({
|
|
53
52
|
formatter: ColumnConcatenatedValuesFormatter(stateProps),
|
|
54
|
-
renderGroupCell: ColumnConcatenatedValuesGroupFormatter(stateProps),
|
|
55
53
|
customFilter: getCustomContatenatedValueFilter(stateProps),
|
|
56
54
|
customSort: getCustomConcatenatedValueSort(stateProps)
|
|
57
55
|
}), [stateProps]);
|
|
@@ -9,7 +9,6 @@ export declare const useCustomDateFilter: <TRow>(props: ColumnDateFormatterProps
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const useColumnDate: <TRow>(props: ColumnDateFormatterProps<TRow>) => {
|
|
11
11
|
formatter: (formatterProps: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
renderGroupCell: (groupProps: import('react-data-grid').RenderGroupCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
customFilter: (row: TRow, value: string) => boolean;
|
|
14
13
|
customSort: (a: TRow, b: TRow) => 0 | 1 | -1;
|
|
15
14
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { getPropertyByString } from "@m4l/core";
|
|
2
2
|
import { g as getFormatDate } from "../../../formatters/DateFormatter/DateFormatter.js";
|
|
3
3
|
import { C as ColumnDateFormatter } from "./formatter.js";
|
|
4
|
-
import { C as ColumnDateGroupFormatter } from "./ColumnDateGroupFormatter.js";
|
|
5
4
|
import { useFormatter } from "@m4l/graphics";
|
|
6
5
|
import { g as getValidDate } from "../../../../utils/getValidDate.js";
|
|
7
6
|
import { useState, useRef, useEffect, useMemo, useCallback } from "react";
|
|
@@ -57,7 +56,6 @@ const useColumnDate = (props) => {
|
|
|
57
56
|
}, [props]);
|
|
58
57
|
return useMemo(() => ({
|
|
59
58
|
formatter: ColumnDateFormatter(stateProps),
|
|
60
|
-
renderGroupCell: ColumnDateGroupFormatter(stateProps),
|
|
61
59
|
customFilter,
|
|
62
60
|
customSort: getCustomDateSort(stateProps)
|
|
63
61
|
}), [stateProps, customFilter]);
|
|
@@ -5,5 +5,4 @@ import { ColumnIconFormatterProps } from './types';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const useColumnIcon: <TRow>(props: ColumnIconFormatterProps<TRow>) => {
|
|
7
7
|
formatter: (renderProps: 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
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { deepEqual } from "fast-equals";
|
|
2
2
|
import { useState, useRef, useEffect, useMemo } from "react";
|
|
3
3
|
import { C as ColumnIconFormatter } from "./formatter.js";
|
|
4
|
-
import { C as ColumnIconGroupFormatter } from "./ColumnIconGroupFormatter.js";
|
|
5
4
|
const useColumnIcon = (props) => {
|
|
6
5
|
const [stateProps, setStateProps] = useState(props);
|
|
7
6
|
const refProps = useRef({ ...props });
|
|
@@ -12,8 +11,7 @@ const useColumnIcon = (props) => {
|
|
|
12
11
|
}
|
|
13
12
|
}, [props]);
|
|
14
13
|
return useMemo(() => ({
|
|
15
|
-
formatter: ColumnIconFormatter(stateProps)
|
|
16
|
-
renderGroupCell: ColumnIconGroupFormatter(stateProps)
|
|
14
|
+
formatter: ColumnIconFormatter(stateProps)
|
|
17
15
|
}), [stateProps]);
|
|
18
16
|
};
|
|
19
17
|
export {
|
|
@@ -6,5 +6,4 @@ import { ColumnImageFormatterProps } from './types';
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const useColumnImage: <TRow>(props: ColumnImageFormatterProps<TRow>) => {
|
|
8
8
|
formatter: (formatterProps: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
renderGroupCell: (groupProps: import('react-data-grid').RenderGroupCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useState, useRef, useEffect, useMemo } from "react";
|
|
2
2
|
import { deepEqual } from "fast-equals";
|
|
3
3
|
import { C as ColumnImageFormatter } from "./formatter.js";
|
|
4
|
-
import { C as ColumnImageGroupFormatter } from "./ColumnImageGroupFormatter.js";
|
|
5
4
|
const useColumnImage = (props) => {
|
|
6
5
|
const [stateProps, setStateProps] = useState(props);
|
|
7
6
|
const refProps = useRef({ ...props });
|
|
@@ -13,8 +12,7 @@ const useColumnImage = (props) => {
|
|
|
13
12
|
}, [props]);
|
|
14
13
|
return useMemo(
|
|
15
14
|
() => ({
|
|
16
|
-
formatter: ColumnImageFormatter(stateProps)
|
|
17
|
-
renderGroupCell: ColumnImageGroupFormatter(stateProps)
|
|
15
|
+
formatter: ColumnImageFormatter(stateProps)
|
|
18
16
|
}),
|
|
19
17
|
[stateProps]
|
|
20
18
|
);
|
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
import { ColumnInteractiveCheckFormatterProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* ColumnInteractiveCheckFormatter: Es un formateador de columna booleano que permite la interacción directa
|
|
4
|
-
* (
|
|
5
|
-
*
|
|
6
|
-
* Soporta la propiedad opcional `disabledKey` en la columna, que indica qué campo del row
|
|
7
|
-
* determina si el checkbox está deshabilitado. Si el valor de ese campo es `false`,
|
|
8
|
-
* el checkbox se deshabilita.
|
|
9
|
-
* @example
|
|
10
|
-
* // Columna con checkbox siempre habilitado
|
|
11
|
-
* { key: 'visible', name: 'Visible', renderCell: ColumnInteractiveCheckFormatter }
|
|
12
|
-
* @example
|
|
13
|
-
* // Columna con checkbox condicionalmente deshabilitado
|
|
14
|
-
* { key: 'grouped', name: 'Agrupar', renderCell: ColumnInteractiveCheckFormatter, disabledKey: 'groupable' }
|
|
15
|
-
* // El checkbox se deshabilita cuando row.groupable === false
|
|
4
|
+
* (camnbiar el checked) sin la necesidad de entrar en edición como lo hace un editor
|
|
16
5
|
*/
|
|
17
6
|
export declare function ColumnInteractiveCheckFormatter<Row>(props: ColumnInteractiveCheckFormatterProps<Row>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,12 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { C as CheckBox } from "../../../mui_extended/CheckBox/CheckBox.js";
|
|
3
3
|
function ColumnInteractiveCheckFormatter(props) {
|
|
4
4
|
const { row, onRowChange, column } = props;
|
|
5
|
-
const disabledKey = column.disabledKey;
|
|
6
|
-
const isDisabled = disabledKey ? !row[disabledKey] : false;
|
|
7
5
|
const handleChange = () => {
|
|
8
|
-
if (isDisabled) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
6
|
const newRow = { ...row };
|
|
12
7
|
newRow[column.key] = !row[column.key];
|
|
13
8
|
onRowChange(newRow);
|
|
@@ -17,7 +12,6 @@ function ColumnInteractiveCheckFormatter(props) {
|
|
|
17
12
|
{
|
|
18
13
|
size: "small",
|
|
19
14
|
checked: row[column.key] || false,
|
|
20
|
-
disabled: isDisabled,
|
|
21
15
|
onChange: handleChange
|
|
22
16
|
}
|
|
23
17
|
);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { ColumnNestedValueFormatter } from './formatter';
|
|
2
|
-
export { ColumnNestedValueGroupFormatter } from './ColumnNestedValueGroupFormatter';
|
|
3
2
|
export type { ColumnNestedValueFormatterProps } from './types';
|
|
4
3
|
export { useColumnNestedValue } from './useColumnNestedValue';
|
package/components/datagrids/formatters/ColumnNestedValueFormatter/useColumnNestedValue.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ import { ColumnNestedValueFormatterProps } from './types';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const useColumnNestedValue: <TRow>(props: ColumnNestedValueFormatterProps<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) => any;
|
|
10
9
|
customSort: (a: TRow, b: TRow) => 0 | 1 | -1;
|
|
11
10
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { getPropertyByString } from "@m4l/core";
|
|
2
|
-
import { C as ColumnNestedValueGroupFormatter } from "./ColumnNestedValueGroupFormatter.js";
|
|
3
2
|
import { useState, useRef, useEffect, useMemo } from "react";
|
|
4
3
|
import { deepEqual } from "fast-equals";
|
|
5
4
|
import { g as getNullGuard } from "../../../../utils/getNullGuard.js";
|
|
@@ -42,7 +41,6 @@ const useColumnNestedValue = (props) => {
|
|
|
42
41
|
}, [props]);
|
|
43
42
|
return useMemo(() => ({
|
|
44
43
|
formatter: ColumnNestedValueFormatter(stateProps),
|
|
45
|
-
renderGroupCell: ColumnNestedValueGroupFormatter(stateProps),
|
|
46
44
|
customFilter: getCustomNestedValueFilter(stateProps),
|
|
47
45
|
customSort: getCustomNestedValueSort(stateProps)
|
|
48
46
|
}), [stateProps]);
|
|
@@ -5,7 +5,6 @@ import { ColumnPointsFormatterProps } from './types';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const useColumnPoints: <TRow>(props: ColumnPointsFormatterProps<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 { C as ColumnPointsFormatter } from "./formatter.js";
|
|
4
|
-
import { C as ColumnPointsGroupFormatter } from "./ColumnPointsGroupFormatter.js";
|
|
5
4
|
import { g as getFormatPoints } from "../../../formatters/PointsFormatter/PointsFormatter.js";
|
|
6
5
|
import { g as getColumnKey } from "../../helpers/shared/getColumnKey/getColumnKey.js";
|
|
7
6
|
const getCustomPointsFilter = (props) => {
|
|
@@ -37,7 +36,6 @@ const useColumnPoints = (props) => {
|
|
|
37
36
|
}, [props]);
|
|
38
37
|
return useMemo(() => ({
|
|
39
38
|
formatter: ColumnPointsFormatter(stateProps),
|
|
40
|
-
renderGroupCell: ColumnPointsGroupFormatter(stateProps),
|
|
41
39
|
customFilter: getCustomPointsFilter(stateProps),
|
|
42
40
|
customSort: getCustomPointsSort(stateProps)
|
|
43
41
|
}), [stateProps]);
|