@m4l/components 9.2.60 → 9.2.62
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/@types/types.d.ts +8 -0
- package/components/Chip/Chip.js +9 -10
- package/components/Chip/ChipStyles.js +13 -2
- package/components/Chip/constants.d.ts +9 -0
- package/components/Chip/constants.js +6 -2
- package/components/Chip/slots/ChipEnum.d.ts +3 -0
- package/components/Chip/slots/ChipEnum.js +6 -1
- package/components/Chip/slots/ChipSlots.js +1 -1
- package/components/DataGrid/DataGrid.js +17 -3
- package/components/DataGrid/Datagrid.styles.js +80 -33
- package/components/DataGrid/constants.d.ts +2 -0
- package/components/DataGrid/constants.js +7 -3
- package/components/DataGrid/contexts/DataGridContext/index.js +77 -30
- package/components/DataGrid/contexts/DataGridContext/types.d.ts +5 -2
- package/components/DataGrid/dictionary.d.ts +8 -0
- package/components/DataGrid/dictionary.js +26 -17
- package/components/DataGrid/icons.d.ts +7 -0
- package/components/DataGrid/icons.js +8 -1
- package/components/DataGrid/slots/DataGridEnum.d.ts +7 -1
- package/components/DataGrid/slots/DataGridEnum.js +6 -0
- package/components/DataGrid/slots/DataGridSlot.d.ts +6 -0
- package/components/DataGrid/slots/DataGridSlot.js +35 -5
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Filter/index.js +9 -1
- package/components/DataGrid/subcomponents/Table/hooks/getDragHeaderRenderer.d.ts +3 -1
- package/components/DataGrid/subcomponents/Table/hooks/getDragHeaderRenderer.js +9 -2
- package/components/DataGrid/subcomponents/Table/hooks/useHeaderMenuActions.d.ts +6 -0
- package/components/DataGrid/subcomponents/Table/hooks/useHeaderMenuActions.js +262 -0
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.d.ts +6 -4
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +35 -18
- package/components/DataGrid/subcomponents/Table/index.js +97 -34
- package/components/DataGrid/subcomponents/Table/subcomponents/ActionsColumn.js +1 -1
- package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.d.ts +1 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.js +79 -4
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.d.ts +5 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.js +146 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/index.d.ts +1 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/index.js +1 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/types.d.ts +131 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/SelectColumn.js +1 -1
- package/components/DataGrid/subcomponents/editors/TextEditor/index.js +1 -1
- package/components/DataGrid/tests/HeaderRenderClick.test.d.ts +1 -0
- package/components/DataGrid/tests/useHeaderMenuActions.test.d.ts +1 -0
- package/components/DataGrid/types.d.ts +53 -0
- package/components/DynamicFilter/DynamicFilter.styles.js +99 -90
- package/components/DynamicFilter/slots/SlotsEnum.d.ts +0 -3
- package/components/DynamicFilter/slots/SlotsEnum.js +0 -3
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +0 -9
- package/components/DynamicFilter/slots/dynamicFilterSlots.js +3 -19
- package/components/DynamicFilter/store/DynamicFilterContext.js +67 -28
- package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.js +1 -1
- package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.d.ts +1 -0
- package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.js +2 -1
- package/components/DynamicFilter/subcomponents/InputFilter/InputFilter.js +2 -0
- package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.js +24 -18
- package/components/DynamicFilter/subcomponents/PopoverFilter/usePopoverFilter.d.ts +3 -3
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.js +4 -1
- package/components/DynamicFilter/types.d.ts +3 -0
- package/components/DynamicSort/DynamicSort.js +10 -6
- package/components/DynamicSort/DynamicSort.styles.js +92 -90
- package/components/DynamicSort/slots/DynamicSortSlots.d.ts +0 -9
- package/components/DynamicSort/slots/DynamicSortSlots.js +7 -23
- package/components/DynamicSort/slots/SlotsEnum.d.ts +1 -4
- package/components/DynamicSort/slots/SlotsEnum.js +1 -4
- package/components/DynamicSort/store/DynamicSortContext.js +96 -67
- package/components/DynamicSort/store/DynamicSortStore.js +53 -4
- package/components/DynamicSort/store/types.d.ts +11 -0
- package/components/DynamicSort/subcomponents/FieldTypes/StringSort/index.js +2 -2
- package/components/DynamicSort/subcomponents/InputSort/InputSort.js +2 -0
- package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.js +22 -17
- package/components/DynamicSort/subcomponents/PopoverSort/usePopoverSort.d.ts +3 -3
- package/components/DynamicSort/subcomponents/SortActions/SortActions.js +2 -2
- package/components/DynamicSort/subcomponents/SortActions/useSortActions.d.ts +2 -0
- package/components/DynamicSort/subcomponents/SortActions/useSortActions.js +2 -1
- package/components/DynamicSort/types.d.ts +4 -0
- package/components/LanguagePopover/LanguagePopover.js +7 -5
- package/components/LanguagePopover/LanguagePopover.styles.js +32 -4
- package/components/LanguagePopover/slots/LanguagePopoverSlots.d.ts +9 -3
- package/components/LanguagePopover/slots/LanguagePopoverSlots.js +1 -3
- package/components/LanguagePopover/types.d.ts +6 -1
- package/components/PaperForm/styles.js +2 -1
- package/components/PropertyValue/PropertyValue.js +2 -1
- package/components/PropertyValue/PropertyValue.styles.js +7 -4
- package/components/PropertyValue/types.d.ts +4 -0
- package/components/SideBar/SideBar.js +4 -2
- package/components/SideBar/constants.d.ts +26 -2
- package/components/SideBar/constants.js +19 -7
- package/components/SideBar/context/sideBarContext/index.js +19 -5
- package/components/SideBar/context/sideBarContext/types.d.ts +22 -1
- package/components/SideBar/helpers/getMenuDataWithState/index.js +25 -8
- package/components/SideBar/hooks/useCollapse/index.d.ts +1 -0
- package/components/SideBar/hooks/useCollapse/index.js +1 -0
- package/components/SideBar/hooks/useCollapse/useCollapse.d.ts +11 -0
- package/components/SideBar/hooks/useCollapse/useCollapse.js +23 -0
- package/components/SideBar/slots/SideBarEnum.d.ts +5 -5
- package/components/SideBar/slots/SideBarEnum.js +9 -11
- package/components/SideBar/slots/SideBarSlots.d.ts +9 -3
- package/components/SideBar/slots/SideBarSlots.js +36 -28
- package/components/SideBar/styles.js +2 -4
- package/components/SideBar/subcomponents/ContentComponent/index.js +39 -19
- package/components/SideBar/subcomponents/ContentComponent/style.js +171 -22
- package/components/SideBar/subcomponents/{FooterSidebar → Promotion}/index.d.ts +2 -2
- package/components/SideBar/subcomponents/{FooterSidebar → Promotion}/index.js +8 -15
- package/components/SideBar/subcomponents/{FooterSidebar → Promotion}/styles.js +2 -2
- package/components/SideBar/subcomponents/Promotion/types.d.ts +5 -0
- package/components/SideBar/subcomponents/SideBarDesktop/index.js +1 -1
- package/components/SideBar/subcomponents/SideBarDesktop/styles.js +10 -14
- package/components/SideBar/subcomponents/SideBarMobile/index.js +1 -1
- package/components/SideBar/subcomponents/TreeGroupItems/index.d.ts +5 -0
- package/components/SideBar/subcomponents/{ContentGroups → TreeGroupItems}/index.js +16 -18
- package/components/SideBar/subcomponents/{ContentGroups → TreeGroupItems}/styles.js +5 -7
- package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems}/subcomponents/ArrowIcon/index.js +10 -7
- package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems/subcomponents/NodeMenuItem}/index.d.ts +3 -3
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/index.js +69 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/types.d.ts +9 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.d.ts +5 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.js +56 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/index.d.ts +1 -0
- package/components/SideBar/subcomponents/TreeGroupItems/types.d.ts +4 -0
- package/components/SideBar/types.d.ts +7 -3
- package/components/WindowBase/WindowBase.js +7 -1
- package/components/WindowBase/WindowBase.styles.js +50 -15
- package/components/WindowBase/constants.d.ts +1 -0
- package/components/WindowBase/constants.js +5 -1
- package/components/WindowBase/slots/WindowBaseEnum.d.ts +2 -1
- package/components/WindowBase/slots/WindowBaseEnum.js +1 -0
- package/components/WindowBase/slots/WindowBaseSlots.d.ts +3 -0
- package/components/WindowBase/slots/WindowBaseSlots.js +6 -1
- package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +11 -5
- package/components/WindowBase/subcomponents/Header/types.d.ts +1 -1
- package/components/WindowBase/subcomponents/Header/useButtonActions.js +4 -2
- package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.d.ts +1 -1
- package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.js +1 -1
- package/components/WindowBase/subcomponents/MemoizedIconButton/types.d.ts +5 -0
- package/components/WindowBase/types.d.ts +16 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +13 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.js +26 -20
- package/components/areas/contexts/AreasContext/store.js +2 -2
- package/components/extended/React-Resizable/helpers.js +1 -1
- package/components/extended/React-resizable-panels/SplitLayout.js +6 -3
- package/components/extended/React-resizable-panels/SplitLayout.styles.js +78 -36
- package/components/extended/React-resizable-panels/constants.d.ts +6 -0
- package/components/extended/React-resizable-panels/constants.js +5 -1
- package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.d.ts +2 -1
- package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.js +1 -0
- package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.d.ts +3 -0
- package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.js +7 -1
- package/components/hook-form/RHFAutocomplete/RFHAutocompleteStyles.js +1 -1
- package/components/hook-form/RHFTextField/RHFTextField.js +1 -0
- package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.styles.js +3 -38
- package/components/hook-form/RHFormContext/index.d.ts +1 -1
- package/components/mui_extended/Accordion/styles.js +10 -2
- package/components/mui_extended/Button/Button.js +3 -1
- package/components/mui_extended/Button/ButtonStyles.js +6 -1
- package/components/mui_extended/Button/types.d.ts +1 -1
- package/components/mui_extended/CheckBox/CheckBox.styles.js +2 -1
- package/components/mui_extended/Divider/index.d.ts +1 -0
- package/components/mui_extended/Divider/index.js +1 -0
- package/components/mui_extended/NavLink/NavLink.js +3 -1
- package/components/mui_extended/NavLink/NavLink.styles.js +2 -1
- package/components/mui_extended/NavLink/types.d.ts +3 -1
- package/components/mui_extended/Tab/Tab.styles.js +2 -1
- package/components/mui_extended/TabContent/TabContent.styles.js +2 -8
- package/components/mui_extended/TextField/TextField.js +1 -1
- package/components/mui_extended/TextField/TextField.styles.js +20 -18
- package/components/mui_extended/Typography/slots/typographySlots.d.ts +1 -1
- package/components/mui_extended/index.d.ts +1 -0
- package/hooks/useDynamicFilterAndSort/styles.js +1 -1
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.d.ts +3 -0
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +334 -88
- package/index.d.ts +1 -0
- package/index.js +23 -20
- package/package.json +4 -3
- package/storybook/components/DataGrid/DataGrid.stories.d.ts +22 -0
- package/storybook/components/DataGrid/MswHandles.d.ts +1 -0
- package/storybook/components/DataGrid/helpers/filterFieldsSeedData.d.ts +5 -0
- package/storybook/components/DataGrid/helpers/getRows.d.ts +4 -0
- package/storybook/components/DataGrid/helpers/getRowsWithBackendSimulation.d.ts +9 -0
- package/storybook/components/DataGrid/helpers/sortsSeedData.d.ts +5 -0
- package/storybook/components/DataGrid/helpers/types.d.ts +1 -0
- package/storybook/components/DataGrid/helpers/useSeed.d.ts +3 -0
- package/storybook/components/DataGrid/subcomponents/DataGridRender.d.ts +2 -0
- package/storybook/components/DynamicFilter/DynamicFilter.stories.d.ts +27 -11
- package/storybook/components/DynamicSort/DynamicSort.stories.d.ts +26 -10
- package/storybook/components/SideBar/subcomponents/FooterPromotion/FooterPromotion.d.ts +4 -0
- package/storybook/components/SideBar/subcomponents/FooterPromotion/constants.d.ts +3 -0
- package/storybook/components/SideBar/subcomponents/FooterPromotion/index.d.ts +1 -0
- package/storybook/components/extended/mui/IconButton/IconButton.stories.d.ts +1 -0
- package/storybook/components/extended/mui/TextField/TextFieldText.stories.d.ts +1 -0
- package/utils/index.d.ts +1 -0
- package/components/SideBar/subcomponents/ContentGroups/index.d.ts +0 -5
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/index.js +0 -63
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.d.ts +0 -2
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +0 -47
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/types.d.ts +0 -7
- package/components/SideBar/subcomponents/ContentGroups/types.d.ts +0 -4
- package/components/SideBar/subcomponents/FooterSidebar/types.d.ts +0 -5
- package/components/SideBar/subcomponents/HeaderSidebar/index.js +0 -25
- /package/components/SideBar/subcomponents/{FooterSidebar → Promotion}/styles.d.ts +0 -0
- /package/components/SideBar/subcomponents/{ContentGroups → TreeGroupItems}/styles.d.ts +0 -0
- /package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems}/subcomponents/ArrowIcon/index.d.ts +0 -0
- /package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems}/subcomponents/ArrowIcon/types.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useRef, useEffect } from "react";
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useState, useRef, useEffect } from "react";
|
|
3
3
|
import DataGrid from "react-data-grid";
|
|
4
4
|
import { DndProvider } from "react-dnd";
|
|
5
5
|
import { HTML5Backend } from "react-dnd-html5-backend";
|
|
@@ -9,15 +9,52 @@ import { u as useSortColumnsRows } from "./hooks/useSortColumnsRows.js";
|
|
|
9
9
|
import { u as useFilters } from "../../hooks/useFilters.js";
|
|
10
10
|
import { u as useDataGrid } from "../../hooks/useDataGrid.js";
|
|
11
11
|
import { l as TableContainerStyled, T as TableWrapperDataGridStyled } from "../../slots/DataGridSlot.js";
|
|
12
|
+
import { u as useHeaderMenuActions } from "./hooks/useHeaderMenuActions.js";
|
|
13
|
+
import { H as HeaderRenderClick } from "./subcomponents/HeaderRenderClick/HeaderRenderClick.js";
|
|
12
14
|
function Table(props) {
|
|
13
|
-
const {
|
|
14
|
-
const { finalColumns, sortColumns, setSortColumns, finalRows } = useSortColumnsRows(
|
|
15
|
+
const {
|
|
15
16
|
columns,
|
|
16
|
-
rows
|
|
17
|
+
rows,
|
|
18
|
+
onRowsChange,
|
|
19
|
+
rowKeyGetter,
|
|
20
|
+
selectedRows,
|
|
21
|
+
onSelectedRowsChange
|
|
22
|
+
} = props;
|
|
23
|
+
const { finalColumns, finalRows } = useSortColumnsRows(
|
|
24
|
+
columns,
|
|
25
|
+
rows,
|
|
26
|
+
useMemo(
|
|
27
|
+
() => ({
|
|
28
|
+
/**
|
|
29
|
+
* Función que abre el menú de acciones para una columna
|
|
30
|
+
*/
|
|
31
|
+
openPopover: (anchorEl, columnKey) => {
|
|
32
|
+
if (anchorEl instanceof HTMLDivElement) {
|
|
33
|
+
setPopoverState({
|
|
34
|
+
anchorEl,
|
|
35
|
+
columnKey
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}),
|
|
40
|
+
[]
|
|
41
|
+
)
|
|
17
42
|
);
|
|
18
43
|
const { activeFilters } = useFilters();
|
|
19
|
-
const {
|
|
44
|
+
const {
|
|
45
|
+
onChangeColumnWidth,
|
|
46
|
+
setRowsCount,
|
|
47
|
+
currentRowHeight,
|
|
48
|
+
currentRowHeaderHeight,
|
|
49
|
+
size,
|
|
50
|
+
sortColumns,
|
|
51
|
+
setSortColumns
|
|
52
|
+
} = useDataGrid();
|
|
20
53
|
const ref_data_grid = useRef(null);
|
|
54
|
+
const [popoverState, setPopoverState] = useState({
|
|
55
|
+
anchorEl: null,
|
|
56
|
+
columnKey: null
|
|
57
|
+
});
|
|
21
58
|
const onRowClick = (row) => {
|
|
22
59
|
if (selectedRows && onSelectedRowsChange) {
|
|
23
60
|
if (selectedRows.entries().next().value) {
|
|
@@ -32,11 +69,17 @@ function Table(props) {
|
|
|
32
69
|
useEffect(() => {
|
|
33
70
|
let columnIndice = 0;
|
|
34
71
|
for (const column of finalColumns) {
|
|
35
|
-
const index = sortColumns.findIndex(
|
|
72
|
+
const index = sortColumns.findIndex(
|
|
73
|
+
(sortColumn) => column.key === sortColumn.columnKey
|
|
74
|
+
);
|
|
36
75
|
if (index !== -1) {
|
|
37
|
-
ref_data_grid.current?.element?.querySelector(
|
|
76
|
+
ref_data_grid.current?.element?.querySelector(
|
|
77
|
+
`[role="columnheader"][aria-colindex="${columnIndice + 1}"]`
|
|
78
|
+
)?.setAttribute("aria-columnsort", `${sortColumns[index].direction}`);
|
|
38
79
|
} else {
|
|
39
|
-
ref_data_grid.current?.element?.querySelector(
|
|
80
|
+
ref_data_grid.current?.element?.querySelector(
|
|
81
|
+
`[role="columnheader"][aria-colindex="${columnIndice + 1}"]`
|
|
82
|
+
)?.removeAttribute("aria-columnsort");
|
|
40
83
|
}
|
|
41
84
|
columnIndice++;
|
|
42
85
|
}
|
|
@@ -47,31 +90,51 @@ function Table(props) {
|
|
|
47
90
|
const onColumnResize = (idx, width) => {
|
|
48
91
|
onChangeColumnWidth(finalColumns[idx].key, width);
|
|
49
92
|
};
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
93
|
+
const defaultColumnOptions = { resizable: true, sortable: true };
|
|
94
|
+
const menuActions = useHeaderMenuActions(
|
|
95
|
+
popoverState.columnKey,
|
|
96
|
+
finalColumns,
|
|
97
|
+
defaultColumnOptions.sortable
|
|
98
|
+
);
|
|
99
|
+
return /* @__PURE__ */ jsx(TableContainerStyled, { id: "WrapperTable", children: /* @__PURE__ */ jsxs(TableWrapperDataGridStyled, { ownerState: { size }, children: [
|
|
100
|
+
/* @__PURE__ */ jsx(DndProvider, { backend: HTML5Backend, context: window, children: /* @__PURE__ */ jsx(
|
|
101
|
+
DataGrid,
|
|
102
|
+
{
|
|
103
|
+
className: "rdg-light",
|
|
104
|
+
ref: ref_data_grid,
|
|
105
|
+
headerRowHeight: activeFilters ? currentRowHeaderHeight + filterHeight : currentRowHeaderHeight,
|
|
106
|
+
columns: finalColumns,
|
|
107
|
+
sortColumns,
|
|
108
|
+
onSortColumnsChange: setSortColumns,
|
|
109
|
+
onColumnResize,
|
|
110
|
+
rows: finalRows,
|
|
111
|
+
onRowsChange,
|
|
112
|
+
selectedRows,
|
|
113
|
+
onSelectedRowsChange,
|
|
114
|
+
onRowClick,
|
|
115
|
+
rowHeight: currentRowHeight,
|
|
116
|
+
rowKeyGetter,
|
|
117
|
+
cellNavigationMode: "LOOP_OVER_ROW",
|
|
118
|
+
components: { checkboxFormatter: CheckboxFormatter },
|
|
119
|
+
defaultColumnOptions
|
|
120
|
+
}
|
|
121
|
+
) }),
|
|
122
|
+
popoverState.columnKey && popoverState.anchorEl instanceof HTMLDivElement && /* @__PURE__ */ jsx(
|
|
123
|
+
HeaderRenderClick,
|
|
124
|
+
{
|
|
125
|
+
externalOpen: popoverState.anchorEl,
|
|
126
|
+
onOpen: (open) => {
|
|
127
|
+
if (!open) {
|
|
128
|
+
setPopoverState({
|
|
129
|
+
anchorEl: null,
|
|
130
|
+
columnKey: null
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
menuActions
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
] }) });
|
|
75
138
|
}
|
|
76
139
|
export {
|
|
77
140
|
Table as T
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { u as useDataGrid } from "../../../hooks/useDataGrid.js";
|
|
3
3
|
import { useTheme } from "@mui/material";
|
|
4
|
-
import {
|
|
4
|
+
import { e as DATAGRID_SEMANTIC_WIDTHS, f as DATAGRID_ACTIONS_COLUMN_KEY } from "../../../constants.js";
|
|
5
5
|
import { M as MenuActions } from "../../../../MenuActions/MenuActions.js";
|
|
6
6
|
function ActionsFormatter(props) {
|
|
7
7
|
const { rowActionsGetter } = useDataGrid();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HeaderRendererProps } from 'react-data-grid';
|
|
2
2
|
interface DraggableHeaderRendererProps<TRow> extends HeaderRendererProps<TRow> {
|
|
3
3
|
onColumnsReorder: (sourceKey: string, targetKey: string) => void;
|
|
4
|
+
openPopover?: (anchorEl: HTMLElement, columnKey: string) => void;
|
|
4
5
|
}
|
|
5
6
|
/**
|
|
6
7
|
* TODO: Documentar
|
|
@@ -5,17 +5,31 @@ import { useDrag, useDrop } from "react-dnd";
|
|
|
5
5
|
import { HeaderRenderer } from "react-data-grid";
|
|
6
6
|
import { u as useFocusRef } from "../hooks/useFocusRef.js";
|
|
7
7
|
import { u as useFilters } from "../../../hooks/useFilters.js";
|
|
8
|
-
import { m as
|
|
8
|
+
import { N as NameColumnIconStyled, m as NameColumnStyled, I as IconColumnStyled, n as DraggableHeaderRootStyled, B as ButtonHeaderActionsStyled, o as DraggableWrapperInputBaseStyled, p as IconSearchStyled, H as HeaderInputBaseStyled } from "../../../slots/DataGridSlot.js";
|
|
9
9
|
import { p as pathIcons } from "../../../icons.js";
|
|
10
10
|
import { u as useDataGrid } from "../../../hooks/useDataGrid.js";
|
|
11
|
+
import { I as Icon } from "../../../../Icon/Icon.js";
|
|
11
12
|
function DraggableHeaderRenderer(props) {
|
|
12
|
-
const {
|
|
13
|
+
const {
|
|
14
|
+
onColumnsReorder,
|
|
15
|
+
column,
|
|
16
|
+
isCellSelected,
|
|
17
|
+
openPopover,
|
|
18
|
+
onSort,
|
|
19
|
+
...others
|
|
20
|
+
} = props;
|
|
13
21
|
const { ref, tabIndex } = useFocusRef(isCellSelected);
|
|
14
22
|
const { getLabel } = useModuleDictionary();
|
|
15
|
-
const { size, classes } = useDataGrid();
|
|
23
|
+
const { size, classes, externalSortSettings, externalFilterSettings } = useDataGrid();
|
|
16
24
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
17
25
|
const { activeFilters, filters, onChangeFilter } = useFilters();
|
|
18
26
|
const [filter, setFilter] = useState(filters?.get(column.key) || "");
|
|
27
|
+
const currentExternalSort = externalSortSettings?.sortsApplied?.find(
|
|
28
|
+
(s) => s.columnKey === column.key
|
|
29
|
+
);
|
|
30
|
+
const currentExternalFilter = externalFilterSettings?.filtersApplied?.find(
|
|
31
|
+
(f) => f.columnKey === column.key
|
|
32
|
+
);
|
|
19
33
|
const [{ isDragging }, drag] = useDrag({
|
|
20
34
|
type: "COLUMN_DRAG",
|
|
21
35
|
item: { key: column.key },
|
|
@@ -44,6 +58,39 @@ function DraggableHeaderRenderer(props) {
|
|
|
44
58
|
}
|
|
45
59
|
setFilter(e.target.value);
|
|
46
60
|
};
|
|
61
|
+
const getSortIcon = (direction) => direction === "asc" ? `${host_static_assets}/${environment_assets}/${pathIcons.sortAsc}` : `${host_static_assets}/${environment_assets}/${pathIcons.sortDesc}`;
|
|
62
|
+
const getColumnIcons = () => {
|
|
63
|
+
const icons = [];
|
|
64
|
+
if (currentExternalSort) {
|
|
65
|
+
const sortIconPath = getSortIcon(currentExternalSort.direction);
|
|
66
|
+
icons.push(
|
|
67
|
+
/* @__PURE__ */ jsx(
|
|
68
|
+
Icon,
|
|
69
|
+
{
|
|
70
|
+
src: sortIconPath,
|
|
71
|
+
size: "small",
|
|
72
|
+
color: "text.secondary"
|
|
73
|
+
},
|
|
74
|
+
"sort-icon"
|
|
75
|
+
)
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
if (currentExternalFilter?.isValid) {
|
|
79
|
+
const filterIconPath = `${host_static_assets}/${environment_assets}/${pathIcons.filter2}`;
|
|
80
|
+
icons.push(
|
|
81
|
+
/* @__PURE__ */ jsx(
|
|
82
|
+
Icon,
|
|
83
|
+
{
|
|
84
|
+
src: filterIconPath,
|
|
85
|
+
size: "small",
|
|
86
|
+
color: "text.secondary"
|
|
87
|
+
},
|
|
88
|
+
"filter-icon"
|
|
89
|
+
)
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
return icons.length > 0 ? icons : null;
|
|
93
|
+
};
|
|
47
94
|
useEffect(() => {
|
|
48
95
|
if (!activeFilters) {
|
|
49
96
|
setFilter("");
|
|
@@ -53,6 +100,15 @@ function DraggableHeaderRenderer(props) {
|
|
|
53
100
|
if (newColumn.withinHeaderRenderer) {
|
|
54
101
|
newColumn.name = newColumn.withinHeaderRenderer(props);
|
|
55
102
|
}
|
|
103
|
+
if (!newColumn.withinHeaderRenderer) {
|
|
104
|
+
const columnIcons = getColumnIcons();
|
|
105
|
+
if (columnIcons) {
|
|
106
|
+
newColumn.name = /* @__PURE__ */ jsxs(NameColumnIconStyled, { children: [
|
|
107
|
+
/* @__PURE__ */ jsx(NameColumnStyled, { children: newColumn.name }),
|
|
108
|
+
/* @__PURE__ */ jsx(IconColumnStyled, { children: columnIcons })
|
|
109
|
+
] });
|
|
110
|
+
}
|
|
111
|
+
}
|
|
56
112
|
return /* @__PURE__ */ jsxs(
|
|
57
113
|
DraggableHeaderRootStyled,
|
|
58
114
|
{
|
|
@@ -66,7 +122,26 @@ function DraggableHeaderRenderer(props) {
|
|
|
66
122
|
backgroundColor: isOver ? "#ececec" : void 0
|
|
67
123
|
},
|
|
68
124
|
children: [
|
|
69
|
-
/* @__PURE__ */ jsx(
|
|
125
|
+
/* @__PURE__ */ jsx(
|
|
126
|
+
ButtonHeaderActionsStyled,
|
|
127
|
+
{
|
|
128
|
+
role: "button",
|
|
129
|
+
"aria-label": `header-column-button-${column.key}`,
|
|
130
|
+
onClick: (e) => {
|
|
131
|
+
openPopover?.(e.currentTarget, column.key);
|
|
132
|
+
},
|
|
133
|
+
children: /* @__PURE__ */ jsx(
|
|
134
|
+
HeaderRenderer,
|
|
135
|
+
{
|
|
136
|
+
column: newColumn,
|
|
137
|
+
isCellSelected,
|
|
138
|
+
onSort: () => {
|
|
139
|
+
},
|
|
140
|
+
...others
|
|
141
|
+
}
|
|
142
|
+
)
|
|
143
|
+
}
|
|
144
|
+
),
|
|
70
145
|
activeFilters && (column?.withFilter === void 0 || column.withFilter === true) && /* @__PURE__ */ jsxs(DraggableWrapperInputBaseStyled, { children: [
|
|
71
146
|
/* @__PURE__ */ jsx(
|
|
72
147
|
IconSearchStyled,
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { HeaderRenderClickProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Componente que renderiza un menú de acciones para un encabezado de columna en un DataGrid.
|
|
4
|
+
*/
|
|
5
|
+
export declare function HeaderRenderClick(props: HeaderRenderClickProps): import("react/jsx-runtime").JSX.Element;
|
package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.js
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useMemo, useEffect, useCallback } from "react";
|
|
3
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
4
|
+
import { M as MenuItem } from "../../../../../mui_extended/MenuItem/MenuItem.js";
|
|
5
|
+
import { M as MenuListStyled, q as HeaderRenderClickStyled } from "../../../../slots/DataGridSlot.js";
|
|
6
|
+
import { M as MenuDivider } from "../../../../../mui_extended/MenuDivider/MenuDivider.js";
|
|
7
|
+
import { P as Popover } from "../../../../../mui_extended/Popover/Popover.js";
|
|
8
|
+
import { D as DICTIONARY } from "../../../../dictionary.js";
|
|
9
|
+
import { g as DATAGRID_HEADER_RENDER_CLICK_KEY } from "../../../../constants.js";
|
|
10
|
+
import { u as useFilters } from "../../../../hooks/useFilters.js";
|
|
11
|
+
function HeaderRenderClick(props) {
|
|
12
|
+
const {
|
|
13
|
+
menuActions,
|
|
14
|
+
size = "medium",
|
|
15
|
+
externalOpen,
|
|
16
|
+
onOpen,
|
|
17
|
+
objItem = {},
|
|
18
|
+
actionKey,
|
|
19
|
+
className,
|
|
20
|
+
arrowType = "right-top",
|
|
21
|
+
paperProps = {},
|
|
22
|
+
slots = {},
|
|
23
|
+
...other
|
|
24
|
+
} = props;
|
|
25
|
+
const { getLabel } = useModuleDictionary();
|
|
26
|
+
const { activeFilters } = useFilters();
|
|
27
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
28
|
+
const resolvedAnchorEl = externalOpen ?? anchorEl;
|
|
29
|
+
const open = typeof externalOpen !== "undefined" ? Boolean(externalOpen) : Boolean(anchorEl);
|
|
30
|
+
const ownerState = useMemo(
|
|
31
|
+
() => ({
|
|
32
|
+
selected: open
|
|
33
|
+
}),
|
|
34
|
+
[open]
|
|
35
|
+
);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
if (!open) {
|
|
38
|
+
setAnchorEl(null);
|
|
39
|
+
}
|
|
40
|
+
}, [open]);
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
if (onOpen) {
|
|
43
|
+
onOpen(open);
|
|
44
|
+
}
|
|
45
|
+
}, [open, onOpen]);
|
|
46
|
+
const handleOpenClose = useCallback(() => {
|
|
47
|
+
setAnchorEl(null);
|
|
48
|
+
if (onOpen) {
|
|
49
|
+
onOpen(false);
|
|
50
|
+
}
|
|
51
|
+
}, [onOpen]);
|
|
52
|
+
const handleClick = useCallback(
|
|
53
|
+
(e, menuAction) => {
|
|
54
|
+
e.stopPropagation();
|
|
55
|
+
setAnchorEl(null);
|
|
56
|
+
if (onOpen) {
|
|
57
|
+
onOpen(false);
|
|
58
|
+
}
|
|
59
|
+
menuAction.onClick && menuAction.onClick(e);
|
|
60
|
+
},
|
|
61
|
+
[onOpen]
|
|
62
|
+
);
|
|
63
|
+
const renderMenuContent = useCallback(() => {
|
|
64
|
+
let processedActions = [];
|
|
65
|
+
let finalActions = [];
|
|
66
|
+
if (menuActions) {
|
|
67
|
+
if (typeof menuActions === "function") {
|
|
68
|
+
processedActions = menuActions(objItem);
|
|
69
|
+
} else {
|
|
70
|
+
processedActions = menuActions;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (Array.isArray(processedActions)) {
|
|
74
|
+
finalActions = processedActions;
|
|
75
|
+
}
|
|
76
|
+
if (finalActions.length === 0) {
|
|
77
|
+
return /* @__PURE__ */ jsx(
|
|
78
|
+
MenuItem,
|
|
79
|
+
{
|
|
80
|
+
disabled: true,
|
|
81
|
+
role: "menu-no-actions",
|
|
82
|
+
label: getLabel(DICTIONARY.NO_ACTIONS_LABEL)
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
return /* @__PURE__ */ jsx(MenuListStyled, { ownerState: {}, children: finalActions.map((menuAction, index) => {
|
|
87
|
+
const key = actionKey ?? index;
|
|
88
|
+
switch (menuAction.type ?? "menuItem") {
|
|
89
|
+
case "divider":
|
|
90
|
+
return /* @__PURE__ */ jsx(
|
|
91
|
+
MenuDivider,
|
|
92
|
+
{
|
|
93
|
+
variant: "solid",
|
|
94
|
+
size
|
|
95
|
+
},
|
|
96
|
+
`divider-${key}`
|
|
97
|
+
);
|
|
98
|
+
case "customNode":
|
|
99
|
+
return menuAction.customNode;
|
|
100
|
+
case "menuItem":
|
|
101
|
+
return /* @__PURE__ */ jsx(
|
|
102
|
+
MenuItem,
|
|
103
|
+
{
|
|
104
|
+
size,
|
|
105
|
+
...menuAction,
|
|
106
|
+
label: menuAction.label ?? getLabel(DICTIONARY.NO_ACTIONS_LABEL),
|
|
107
|
+
onClick: menuAction.onClick ? (e) => handleClick(e, menuAction) : void 0,
|
|
108
|
+
"aria-label": menuAction.type === "menuItem" && menuAction.dataTestId ? menuAction.dataTestId : "header-render-click-menu-item"
|
|
109
|
+
},
|
|
110
|
+
`${DATAGRID_HEADER_RENDER_CLICK_KEY}${menuAction.label ?? key}`
|
|
111
|
+
);
|
|
112
|
+
default:
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
}) });
|
|
116
|
+
}, [menuActions, size, objItem, getLabel, actionKey, handleClick]);
|
|
117
|
+
return /* @__PURE__ */ jsx(HeaderRenderClickStyled, { className, ownerState: { ownerState }, children: open && /* @__PURE__ */ jsx(
|
|
118
|
+
Popover,
|
|
119
|
+
{
|
|
120
|
+
id: "Popover",
|
|
121
|
+
open,
|
|
122
|
+
anchorEl: resolvedAnchorEl,
|
|
123
|
+
onClose: handleOpenClose,
|
|
124
|
+
arrowType,
|
|
125
|
+
...other,
|
|
126
|
+
slots: { ...slots },
|
|
127
|
+
slotProps: {
|
|
128
|
+
paper: {
|
|
129
|
+
...paperProps,
|
|
130
|
+
sx: {
|
|
131
|
+
mt: !activeFilters ? 0.3 : 6.5,
|
|
132
|
+
...paperProps?.sx
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
disableAutoFocus: true,
|
|
137
|
+
disableEnforceFocus: true,
|
|
138
|
+
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
139
|
+
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
140
|
+
children: renderMenuContent()
|
|
141
|
+
}
|
|
142
|
+
) });
|
|
143
|
+
}
|
|
144
|
+
export {
|
|
145
|
+
HeaderRenderClick as H
|
|
146
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './HeaderRenderClick';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { Sizes, ComponentPalletColor } from '@m4l/styles';
|
|
3
|
+
import { PopoverProps } from '../../../../../mui_extended/Popover/types';
|
|
4
|
+
import { MenuItemProps } from '../../../../../mui_extended/MenuItem/types';
|
|
5
|
+
import { ComponentNameToClassKey, PaperProps, SxProps } from '@mui/material';
|
|
6
|
+
import { Theme } from '@mui/material/styles';
|
|
7
|
+
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
8
|
+
export type MenuTypes = 'menuItem' | 'divider' | 'loader' | 'customNode';
|
|
9
|
+
interface BaseMenuAction {
|
|
10
|
+
type?: MenuTypes;
|
|
11
|
+
}
|
|
12
|
+
export interface MenuItemAction extends BaseMenuAction, Pick<MenuItemProps, 'startIcon' | 'endIcon' | 'label' | 'selected' | 'color' | 'disabled' | 'checkable' | 'checked'> {
|
|
13
|
+
type?: 'menuItem';
|
|
14
|
+
onClick?: (arg?: any) => void;
|
|
15
|
+
customNode?: never;
|
|
16
|
+
error?: boolean;
|
|
17
|
+
dataTestId?: string;
|
|
18
|
+
}
|
|
19
|
+
interface DividerAction extends BaseMenuAction {
|
|
20
|
+
type: 'divider';
|
|
21
|
+
label?: never;
|
|
22
|
+
onClick?: never;
|
|
23
|
+
customNode?: never;
|
|
24
|
+
error?: never;
|
|
25
|
+
}
|
|
26
|
+
interface CustomNodeAction extends BaseMenuAction {
|
|
27
|
+
type: 'customNode';
|
|
28
|
+
customNode: ReactNode;
|
|
29
|
+
label?: never;
|
|
30
|
+
onClick?: never;
|
|
31
|
+
error?: never;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Define una acción del menú, con propiedades heredadas de `MenuItemProps`.
|
|
35
|
+
* [onClick] - Función opcional a ejecutar al hacer clic en la acción del menú.
|
|
36
|
+
* [error] - Indicador de error en la acción del menú.
|
|
37
|
+
*/
|
|
38
|
+
export type MenuAction = MenuItemAction | DividerAction | CustomNodeAction;
|
|
39
|
+
export interface HeaderRenderClickProps extends Omit<PopoverProps, 'open' | 'anchorEl'> {
|
|
40
|
+
/**
|
|
41
|
+
* Tamaño opcional del menú (pequeño o mediano).
|
|
42
|
+
*/
|
|
43
|
+
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
44
|
+
/**
|
|
45
|
+
* Objeto personalizado a pasar al componente.
|
|
46
|
+
*/
|
|
47
|
+
objItem?: any;
|
|
48
|
+
/**
|
|
49
|
+
* Acciones del menú, puede ser un array o una función que genere acciones.
|
|
50
|
+
*/
|
|
51
|
+
menuActions: MenuAction[] | ((row: any) => MenuAction[]);
|
|
52
|
+
/**
|
|
53
|
+
* Texto del tooltip opcional.
|
|
54
|
+
*/
|
|
55
|
+
toolTip?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Elemento opcional que se renderiza al final de la lista del menú.
|
|
58
|
+
*/
|
|
59
|
+
endListElement?: ReactElement;
|
|
60
|
+
/**
|
|
61
|
+
* Estilos personalizados para las acciones del menú.
|
|
62
|
+
*/
|
|
63
|
+
menuActionSx?: SxProps<Theme> | Partial<OverridesStyleRules<string, ComponentNameToClassKey, Theme>>;
|
|
64
|
+
/**
|
|
65
|
+
* Contenido del `Badge` si está presente.
|
|
66
|
+
*/
|
|
67
|
+
badgeContent?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Elemento externo para abrir el menú.
|
|
70
|
+
*/
|
|
71
|
+
externalOpen?: HTMLDivElement | null;
|
|
72
|
+
/**
|
|
73
|
+
* Función externa para cerrar el menú.
|
|
74
|
+
*/
|
|
75
|
+
externalClose?: (element: null | HTMLDivElement) => void;
|
|
76
|
+
/**
|
|
77
|
+
* Tipo de flecha del menú.
|
|
78
|
+
*/
|
|
79
|
+
disabled?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* The components used for each slot inside.
|
|
82
|
+
* @default {}
|
|
83
|
+
*/
|
|
84
|
+
slots?: {
|
|
85
|
+
root?: React.ElementType;
|
|
86
|
+
paper?: React.ElementType;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Propiedad objeto que se usa para poder editar las propiedades del paper o agregar estilos desde su sx
|
|
90
|
+
*/
|
|
91
|
+
paperProps?: PaperProps;
|
|
92
|
+
/**
|
|
93
|
+
* Propiedad checked
|
|
94
|
+
*/
|
|
95
|
+
checked?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Propiedad checkable para el menú
|
|
98
|
+
*/
|
|
99
|
+
checkable?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Propiedad para agregar un node al menú
|
|
102
|
+
*/
|
|
103
|
+
customNode?: ReactNode;
|
|
104
|
+
/**
|
|
105
|
+
* Define el color del componente.
|
|
106
|
+
*/
|
|
107
|
+
color?: Extract<ComponentPalletColor, 'primary'>;
|
|
108
|
+
/**
|
|
109
|
+
* Define la clave de la acción.
|
|
110
|
+
*/
|
|
111
|
+
actionKey?: string;
|
|
112
|
+
/**
|
|
113
|
+
* agrega un header al menú
|
|
114
|
+
*/
|
|
115
|
+
header?: ReactNode;
|
|
116
|
+
/**
|
|
117
|
+
* agrega un footer al menú
|
|
118
|
+
*/
|
|
119
|
+
footer?: ReactNode;
|
|
120
|
+
/**
|
|
121
|
+
* Define el tipo de flecha del menú.
|
|
122
|
+
*/
|
|
123
|
+
onOpen?: (param: boolean) => void;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Estado del propietario para `HeaderRenderClick`.
|
|
127
|
+
*/
|
|
128
|
+
export interface HeaderRenderClickOwnerState {
|
|
129
|
+
selected: boolean;
|
|
130
|
+
}
|
|
131
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useRowSelection, SelectCellFormatter } from "react-data-grid";
|
|
3
3
|
import { u as useDataGrid } from "../../../hooks/useDataGrid.js";
|
|
4
|
-
import {
|
|
4
|
+
import { d as DATAGRID_SELECT_COLUMN_KEY } from "../../../constants.js";
|
|
5
5
|
const filterColumnClassName = "filter-cell";
|
|
6
6
|
const filterHeight = 35;
|
|
7
7
|
function SelectGroupFormatter(props) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { r as InputTextEditorStyled } from "../../../slots/DataGridSlot.js";
|
|
3
3
|
function autoFocusAndSelect(input) {
|
|
4
4
|
input?.focus();
|
|
5
5
|
input?.select();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|