@m4l/components 9.2.60-19062025.beta.1 → 9.2.60-J18062025.beta.1
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 +0 -8
- package/components/DataGrid/DataGrid.js +17 -3
- package/components/DataGrid/Datagrid.styles.js +67 -24
- 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 +6 -0
- package/components/DataGrid/icons.js +7 -1
- package/components/DataGrid/slots/DataGridEnum.d.ts +5 -1
- package/components/DataGrid/slots/DataGridEnum.js +4 -0
- package/components/DataGrid/slots/DataGridSlot.d.ts +4 -0
- package/components/DataGrid/slots/DataGridSlot.js +22 -2
- 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 +259 -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 +42 -3
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.d.ts +5 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.js +136 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/index.d.ts +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 +90 -99
- package/components/DynamicFilter/slots/SlotsEnum.d.ts +3 -0
- package/components/DynamicFilter/slots/SlotsEnum.js +3 -0
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +9 -0
- package/components/DynamicFilter/slots/dynamicFilterSlots.js +19 -3
- package/components/DynamicFilter/store/DynamicFilterContext.js +67 -26
- 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 +0 -1
- package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.js +1 -2
- package/components/DynamicFilter/subcomponents/InputFilter/InputFilter.js +0 -2
- package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.js +18 -23
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.js +1 -4
- package/components/DynamicFilter/types.d.ts +3 -0
- package/components/DynamicSort/DynamicSort.js +10 -6
- package/components/DynamicSort/DynamicSort.styles.js +88 -90
- package/components/DynamicSort/slots/DynamicSortSlots.d.ts +9 -0
- package/components/DynamicSort/slots/DynamicSortSlots.js +21 -5
- package/components/DynamicSort/slots/SlotsEnum.d.ts +4 -1
- package/components/DynamicSort/slots/SlotsEnum.js +4 -1
- 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 +0 -2
- package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.js +17 -21
- package/components/DynamicSort/subcomponents/SortActions/SortActions.js +2 -2
- package/components/DynamicSort/subcomponents/SortActions/useSortActions.d.ts +0 -2
- package/components/DynamicSort/subcomponents/SortActions/useSortActions.js +1 -2
- package/components/DynamicSort/types.d.ts +4 -0
- package/components/LanguagePopover/LanguagePopover.js +6 -8
- package/components/LanguagePopover/LanguagePopover.styles.js +4 -25
- package/components/LanguagePopover/slots/LanguagePopoverSlots.d.ts +3 -9
- package/components/LanguagePopover/slots/LanguagePopoverSlots.js +3 -1
- package/components/LanguagePopover/types.d.ts +1 -6
- package/components/PaperForm/styles.js +1 -2
- package/components/PropertyValue/PropertyValue.js +1 -2
- package/components/PropertyValue/PropertyValue.styles.js +4 -7
- package/components/PropertyValue/types.d.ts +0 -4
- package/components/SideBar/SideBar.js +2 -4
- package/components/SideBar/constants.d.ts +2 -26
- package/components/SideBar/constants.js +7 -19
- package/components/SideBar/context/sideBarContext/index.js +5 -19
- package/components/SideBar/context/sideBarContext/types.d.ts +1 -22
- package/components/SideBar/helpers/getMenuDataWithState/index.js +8 -25
- package/components/SideBar/slots/SideBarEnum.d.ts +5 -5
- package/components/SideBar/slots/SideBarEnum.js +11 -9
- package/components/SideBar/slots/SideBarSlots.d.ts +3 -9
- package/components/SideBar/slots/SideBarSlots.js +28 -36
- package/components/SideBar/styles.js +4 -2
- package/components/SideBar/subcomponents/ContentComponent/index.js +19 -39
- package/components/SideBar/subcomponents/ContentComponent/style.js +22 -171
- package/components/SideBar/subcomponents/ContentGroups/index.d.ts +5 -0
- package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups}/index.js +18 -16
- package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups}/styles.js +7 -5
- package/components/SideBar/subcomponents/{TreeGroupItems/subcomponents/NodeMenuItem → ContentGroups/subcomponents/ContainerMenuItemsMain}/index.d.ts +3 -3
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/index.js +63 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.d.ts +2 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +47 -0
- package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups/subcomponents/ContainerMenuItemsMain}/subcomponents/ArrowIcon/index.js +7 -10
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/types.d.ts +7 -0
- package/components/SideBar/subcomponents/ContentGroups/types.d.ts +4 -0
- package/components/SideBar/subcomponents/{Promotion → FooterSidebar}/index.d.ts +2 -2
- package/components/SideBar/subcomponents/{Promotion → FooterSidebar}/index.js +15 -8
- package/components/SideBar/subcomponents/{Promotion → FooterSidebar}/styles.js +2 -2
- package/components/SideBar/subcomponents/FooterSidebar/types.d.ts +5 -0
- package/components/SideBar/subcomponents/HeaderSidebar/index.js +25 -0
- package/components/SideBar/subcomponents/SideBarDesktop/index.js +1 -1
- package/components/SideBar/subcomponents/SideBarDesktop/styles.js +14 -10
- package/components/SideBar/subcomponents/SideBarMobile/index.js +1 -1
- package/components/SideBar/types.d.ts +3 -7
- package/components/WindowBase/WindowBase.js +1 -4
- package/components/WindowBase/WindowBase.styles.js +13 -48
- package/components/WindowBase/constants.d.ts +0 -1
- package/components/WindowBase/constants.js +1 -5
- package/components/WindowBase/slots/WindowBaseEnum.d.ts +1 -2
- package/components/WindowBase/slots/WindowBaseEnum.js +0 -1
- package/components/WindowBase/slots/WindowBaseSlots.d.ts +0 -3
- package/components/WindowBase/slots/WindowBaseSlots.js +1 -6
- package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +4 -8
- package/components/WindowBase/subcomponents/Header/useButtonActions.js +2 -4
- 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 +0 -5
- package/components/WindowBase/types.d.ts +0 -11
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +0 -13
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.js +20 -21
- package/components/extended/React-Resizable/helpers.js +1 -1
- package/components/extended/React-resizable-panels/SplitLayout.js +3 -6
- package/components/extended/React-resizable-panels/SplitLayout.styles.js +36 -78
- package/components/extended/React-resizable-panels/constants.d.ts +0 -6
- package/components/extended/React-resizable-panels/constants.js +1 -5
- package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.d.ts +1 -2
- package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.js +0 -1
- package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.d.ts +0 -3
- package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.js +1 -7
- package/components/hook-form/RHFAutocomplete/RFHAutocompleteStyles.js +1 -1
- package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.styles.js +1 -1
- package/components/mui_extended/Accordion/styles.js +2 -10
- package/components/mui_extended/Tab/Tab.styles.js +1 -2
- package/components/mui_extended/TabContent/TabContent.styles.js +8 -2
- package/components/mui_extended/TextField/TextField.js +1 -1
- package/components/mui_extended/TextField/TextField.styles.js +10 -12
- package/components/mui_extended/index.d.ts +0 -1
- package/hooks/useDynamicFilterAndSort/styles.js +1 -1
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.d.ts +7 -0
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +300 -88
- package/index.d.ts +0 -1
- package/index.js +20 -23
- package/package.json +5 -6
- 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/DataGridRenderWithExternalFiltersAndSorts.d.ts +16 -0
- package/storybook/components/DynamicFilter/DynamicFilter.stories.d.ts +11 -27
- package/storybook/components/DynamicSort/DynamicSort.stories.d.ts +10 -26
- package/storybook/components/extended/mui/IconButton/IconButton.stories.d.ts +0 -1
- package/storybook/components/extended/mui/TextField/TextFieldText.stories.d.ts +0 -1
- package/utils/index.d.ts +0 -1
- package/components/SideBar/hooks/useCollapse/index.d.ts +0 -1
- package/components/SideBar/hooks/useCollapse/useCollapse.d.ts +0 -11
- package/components/SideBar/hooks/useCollapse/useCollapse.js +0 -23
- package/components/SideBar/subcomponents/Promotion/types.d.ts +0 -5
- package/components/SideBar/subcomponents/TreeGroupItems/index.d.ts +0 -5
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/index.js +0 -69
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/types.d.ts +0 -9
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.d.ts +0 -5
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.js +0 -56
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/index.d.ts +0 -1
- package/components/SideBar/subcomponents/TreeGroupItems/types.d.ts +0 -4
- package/components/mui_extended/Divider/index.d.ts +0 -1
- package/components/mui_extended/Divider/index.js +0 -1
- package/storybook/components/SideBar/subcomponents/FooterPromotion/FooterPromotion.d.ts +0 -4
- package/storybook/components/SideBar/subcomponents/FooterPromotion/constants.d.ts +0 -3
- package/storybook/components/SideBar/subcomponents/FooterPromotion/index.d.ts +0 -1
- /package/components/{SideBar/hooks/useCollapse → DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick}/index.js +0 -0
- /package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups}/styles.d.ts +0 -0
- /package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups/subcomponents/ContainerMenuItemsMain}/subcomponents/ArrowIcon/index.d.ts +0 -0
- /package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups/subcomponents/ContainerMenuItemsMain}/subcomponents/ArrowIcon/types.d.ts +0 -0
- /package/components/SideBar/subcomponents/{Promotion → FooterSidebar}/styles.d.ts +0 -0
package/@types/types.d.ts
CHANGED
|
@@ -148,7 +148,6 @@ import { ScrollBarOwnerState, ScrollBarSlotsType } from '../components/ScrollBar
|
|
|
148
148
|
|
|
149
149
|
import { SplitLayoutOwnerState } from '../components/extended/React-resizable-panels/types';
|
|
150
150
|
import { ObjectLogsOwnerState, ObjectLogsSlotsType } from '../components/ObjectLogs/types';
|
|
151
|
-
import { LanguagePopoverOwnerState, LanguagePopoverSlotsType } from '../components/LanguagePopover/types';
|
|
152
151
|
declare module '@mui/material/styles' {
|
|
153
152
|
// Define the slots in the theme
|
|
154
153
|
interface ComponentNameToClassKey {
|
|
@@ -227,7 +226,6 @@ declare module '@mui/material/styles' {
|
|
|
227
226
|
M4LScrollbar: ScrollBarSlotsType;
|
|
228
227
|
M4LSplitLayout: SplitLayoutOwnerState;
|
|
229
228
|
M4LObjectLogs: ObjectLogsSlotsType;
|
|
230
|
-
M4LLanguagePopover: LanguagePopoverSlotsType;
|
|
231
229
|
}
|
|
232
230
|
interface ComponentsPropsList {
|
|
233
231
|
// Extend ComponentsProps or ComponentsOwnerState(this extend ComponentProps)
|
|
@@ -306,7 +304,6 @@ declare module '@mui/material/styles' {
|
|
|
306
304
|
M4LScrollBar: Partial<ScrollBarOwnerState>;
|
|
307
305
|
M4LSplitLayout: Partial<SplitLayoutOwnerState>;
|
|
308
306
|
M4LObjectLogs: Partial<ObjectLogsOwnerState>;
|
|
309
|
-
M4LLanguagePopover: Partial<LanguagePopoverOwnerState>;
|
|
310
307
|
}
|
|
311
308
|
interface Components {
|
|
312
309
|
M4LDynamicFilter?: {
|
|
@@ -694,10 +691,5 @@ declare module '@mui/material/styles' {
|
|
|
694
691
|
styleOverrides?: ComponentsOverrides<Theme>['M4LObjectLogs'];
|
|
695
692
|
variants?: ComponentsVariants['M4LObjectLogs'];
|
|
696
693
|
};
|
|
697
|
-
M4LLanguagePopover?: {
|
|
698
|
-
defaultProps?: ComponentsPropsList['M4LLanguagePopover'];
|
|
699
|
-
styleOverrides?: ComponentsOverrides<Theme>['M4LLanguagePopover'];
|
|
700
|
-
variants?: ComponentsVariants['M4LLanguagePopover'];
|
|
701
|
-
};
|
|
702
694
|
}
|
|
703
695
|
}
|
|
@@ -35,7 +35,9 @@ function DataGrid(props) {
|
|
|
35
35
|
visibleCustomHeader = true,
|
|
36
36
|
defaultUserColumns,
|
|
37
37
|
onChangeUserColumns,
|
|
38
|
-
size
|
|
38
|
+
size,
|
|
39
|
+
externalSortSettings,
|
|
40
|
+
externalFilterSettings
|
|
39
41
|
} = props;
|
|
40
42
|
const {
|
|
41
43
|
withSettings,
|
|
@@ -63,7 +65,11 @@ function DataGrid(props) {
|
|
|
63
65
|
className: classRoot,
|
|
64
66
|
...process.env.NODE_ENV !== "production" ? {
|
|
65
67
|
[TEST_PROP_COLUMNS]: JSON.stringify(columns),
|
|
66
|
-
[TEST_PROP_ID]: getNameDataTestId(
|
|
68
|
+
[TEST_PROP_ID]: getNameDataTestId(
|
|
69
|
+
DATAGRID_PREFIX_NAME,
|
|
70
|
+
"root",
|
|
71
|
+
dataTestId
|
|
72
|
+
),
|
|
67
73
|
[TEST_SKELETON]: isSkeleton ? true : false
|
|
68
74
|
} : {},
|
|
69
75
|
children: /* @__PURE__ */ jsx(
|
|
@@ -83,6 +89,8 @@ function DataGrid(props) {
|
|
|
83
89
|
onChangeUserColumns,
|
|
84
90
|
defaultUserColumns,
|
|
85
91
|
size: currentSize,
|
|
92
|
+
externalSortSettings,
|
|
93
|
+
externalFilterSettings,
|
|
86
94
|
children: /* @__PURE__ */ jsxs(FilterProvider, { initialActiveFilters: false, children: [
|
|
87
95
|
withActions && actionsProps && /* @__PURE__ */ jsx(
|
|
88
96
|
HeaderActions,
|
|
@@ -112,7 +120,13 @@ function DataGrid(props) {
|
|
|
112
120
|
onRowsChange
|
|
113
121
|
}
|
|
114
122
|
),
|
|
115
|
-
withPager && /* @__PURE__ */ jsx(
|
|
123
|
+
withPager && /* @__PURE__ */ jsx(
|
|
124
|
+
ControlNavigate,
|
|
125
|
+
{
|
|
126
|
+
size: currentSize,
|
|
127
|
+
...{ withPager, pagerOptions }
|
|
128
|
+
}
|
|
129
|
+
)
|
|
116
130
|
] })
|
|
117
131
|
}
|
|
118
132
|
)
|
|
@@ -60,14 +60,23 @@ const dataGridStyles = {
|
|
|
60
60
|
/**
|
|
61
61
|
* Estilos del contenedor de las acciones
|
|
62
62
|
*/
|
|
63
|
-
actionsRoot: ({ theme }) => ({
|
|
63
|
+
actionsRoot: ({ theme, ownerState }) => ({
|
|
64
64
|
display: "flex",
|
|
65
65
|
alignItems: "center",
|
|
66
66
|
justifyContent: "space-between",
|
|
67
67
|
background: theme.vars.palette.background.default,
|
|
68
68
|
borderRadius: theme.vars.size.borderRadius.r1,
|
|
69
69
|
gap: theme.vars.size.baseSpacings.sp1,
|
|
70
|
-
|
|
70
|
+
// Tamaño del contenedor
|
|
71
|
+
...getSizeStyles(
|
|
72
|
+
theme,
|
|
73
|
+
ownerState?.size || "medium",
|
|
74
|
+
"container",
|
|
75
|
+
(size) => ({
|
|
76
|
+
minHeight: size,
|
|
77
|
+
height: size
|
|
78
|
+
})
|
|
79
|
+
),
|
|
71
80
|
"& .mobile-menu-actions": {
|
|
72
81
|
marginRight: "auto"
|
|
73
82
|
}
|
|
@@ -83,8 +92,7 @@ const dataGridStyles = {
|
|
|
83
92
|
borderRadius: theme.vars.size.borderRadius.r2,
|
|
84
93
|
border: theme.vars.size.borderStroke.container,
|
|
85
94
|
borderColor: theme.vars.palette?.border.disabled,
|
|
86
|
-
padding: theme.vars.size.baseSpacings.sp1
|
|
87
|
-
boxShadow: theme.vars.customShadows?.z1
|
|
95
|
+
padding: theme.vars.size.baseSpacings.sp1
|
|
88
96
|
}),
|
|
89
97
|
/**
|
|
90
98
|
* Estilos para el contenedor de las acciones derecho
|
|
@@ -134,7 +142,11 @@ const dataGridStyles = {
|
|
|
134
142
|
//Se utiliza directamente el valor porque no está tokenizado
|
|
135
143
|
height: "100%",
|
|
136
144
|
lineHeight: theme.vars.size.baseSpacings.sp4,
|
|
137
|
-
fontSize: getTypographyStyles(
|
|
145
|
+
fontSize: getTypographyStyles(
|
|
146
|
+
theme.generalSettings.isMobile,
|
|
147
|
+
ownerState?.size || "medium",
|
|
148
|
+
"body"
|
|
149
|
+
).fontSize
|
|
138
150
|
}),
|
|
139
151
|
/**
|
|
140
152
|
* Estilos para el valor de RowsCount
|
|
@@ -147,7 +159,11 @@ const dataGridStyles = {
|
|
|
147
159
|
paddingRight: "6px",
|
|
148
160
|
//No hay token para este valor
|
|
149
161
|
paddingTop: theme.vars.size.baseSpacings.sp1,
|
|
150
|
-
fontSize: getTypographyStyles(
|
|
162
|
+
fontSize: getTypographyStyles(
|
|
163
|
+
theme.generalSettings.isMobile,
|
|
164
|
+
ownerState?.size || "medium",
|
|
165
|
+
"body"
|
|
166
|
+
).fontSize
|
|
151
167
|
}),
|
|
152
168
|
/**
|
|
153
169
|
* Estilos para el contenedor de las columnas
|
|
@@ -568,15 +584,10 @@ const dataGridStyles = {
|
|
|
568
584
|
padding: theme.vars.size.baseSpacings.sp1,
|
|
569
585
|
gap: theme.vars.size.baseSpacings.sp1,
|
|
570
586
|
borderRadius: theme.vars.size.borderRadius.r1,
|
|
571
|
-
...getSizeStyles(
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
(size) => ({
|
|
576
|
-
minHeight: size,
|
|
577
|
-
height: size
|
|
578
|
-
})
|
|
579
|
-
)
|
|
587
|
+
...getSizeStyles(theme, ownerState?.size || "medium", "action", (size) => ({
|
|
588
|
+
minHeight: size,
|
|
589
|
+
height: size
|
|
590
|
+
}))
|
|
580
591
|
}),
|
|
581
592
|
/**
|
|
582
593
|
* Estilos de los inputs del header para el filtro
|
|
@@ -595,15 +606,10 @@ const dataGridStyles = {
|
|
|
595
606
|
height: "100%",
|
|
596
607
|
alignItems: "center",
|
|
597
608
|
"& .MuiSkeleton-root": {
|
|
598
|
-
...getSizeStyles(
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
(size) => ({
|
|
603
|
-
minHeight: `${size}!important`,
|
|
604
|
-
height: `${size}!important`
|
|
605
|
-
})
|
|
606
|
-
)
|
|
609
|
+
...getSizeStyles(theme, ownerState?.size || "medium", "base", (size) => ({
|
|
610
|
+
minHeight: `${size}!important`,
|
|
611
|
+
height: `${size}!important`
|
|
612
|
+
}))
|
|
607
613
|
}
|
|
608
614
|
}),
|
|
609
615
|
/**
|
|
@@ -615,6 +621,43 @@ const dataGridStyles = {
|
|
|
615
621
|
flexDirection: "column",
|
|
616
622
|
height: "100%"
|
|
617
623
|
}
|
|
624
|
+
}),
|
|
625
|
+
/**
|
|
626
|
+
* Estilos para el contenedor del nombre de la columna y el icono de sort
|
|
627
|
+
*/
|
|
628
|
+
nameColumnIcon: () => ({
|
|
629
|
+
display: "flex",
|
|
630
|
+
alignItems: "center",
|
|
631
|
+
justifyContent: "space-between",
|
|
632
|
+
gap: "5px"
|
|
633
|
+
}),
|
|
634
|
+
/**
|
|
635
|
+
* Estilos para el popover del header actions
|
|
636
|
+
*/
|
|
637
|
+
headerRenderClick: () => ({
|
|
638
|
+
width: "fit-content"
|
|
639
|
+
}),
|
|
640
|
+
/**
|
|
641
|
+
* Estilos para el menuList del header actions
|
|
642
|
+
*/
|
|
643
|
+
menuList: ({ theme }) => ({
|
|
644
|
+
padding: theme.vars.size.baseSpacings.sp3,
|
|
645
|
+
display: "flex",
|
|
646
|
+
flexDirection: "column",
|
|
647
|
+
gap: theme.vars.size.baseSpacings.sp1,
|
|
648
|
+
"& > div": {
|
|
649
|
+
paddingLeft: theme.vars.size.baseSpacings.sp4,
|
|
650
|
+
paddingRight: theme.vars.size.baseSpacings.sp4
|
|
651
|
+
}
|
|
652
|
+
}),
|
|
653
|
+
/**
|
|
654
|
+
* Estilos para el contenedor del boton de acciones del header
|
|
655
|
+
*/
|
|
656
|
+
buttonHeaderActions: () => ({
|
|
657
|
+
display: "flex",
|
|
658
|
+
alignItems: "center",
|
|
659
|
+
justifyContent: "space-between",
|
|
660
|
+
width: "100%"
|
|
618
661
|
})
|
|
619
662
|
};
|
|
620
663
|
export {
|
|
@@ -2,6 +2,8 @@ export declare const DATAGRID_PREFIX_NAME = "M4LDataGrid";
|
|
|
2
2
|
export declare const DATAGRID_SELECT_COLUMN_KEY = "M4LDataGrid-CheckedColumn";
|
|
3
3
|
export declare const DATAGRID_ACTIONS_COLUMN_KEY = "M4LDataGrid-ActionsColumn";
|
|
4
4
|
export declare const TEST_SKELETON = "data-skeleton";
|
|
5
|
+
export declare const DATAGRID_HEADER_RENDER_CLICK_KEY = "M4LDataGrid-HeaderRenderClick";
|
|
6
|
+
export declare const DATAGRID_ID_DICTIONARY = "data_grid";
|
|
5
7
|
export declare enum DATAGRID_SEMANTIC_WIDTHS {
|
|
6
8
|
actions = 40,
|
|
7
9
|
bigChip = 190,
|
|
@@ -2,6 +2,8 @@ const DATAGRID_PREFIX_NAME = "M4LDataGrid";
|
|
|
2
2
|
const DATAGRID_SELECT_COLUMN_KEY = "M4LDataGrid-CheckedColumn";
|
|
3
3
|
const DATAGRID_ACTIONS_COLUMN_KEY = "M4LDataGrid-ActionsColumn";
|
|
4
4
|
const TEST_SKELETON = "data-skeleton";
|
|
5
|
+
const DATAGRID_HEADER_RENDER_CLICK_KEY = "M4LDataGrid-HeaderRenderClick";
|
|
6
|
+
const DATAGRID_ID_DICTIONARY = "data_grid";
|
|
5
7
|
var DATAGRID_SEMANTIC_WIDTHS = /* @__PURE__ */ ((DATAGRID_SEMANTIC_WIDTHS2) => {
|
|
6
8
|
DATAGRID_SEMANTIC_WIDTHS2[DATAGRID_SEMANTIC_WIDTHS2["actions"] = 40] = "actions";
|
|
7
9
|
DATAGRID_SEMANTIC_WIDTHS2[DATAGRID_SEMANTIC_WIDTHS2["bigChip"] = 190] = "bigChip";
|
|
@@ -31,7 +33,9 @@ export {
|
|
|
31
33
|
TEST_SKELETON as T,
|
|
32
34
|
DATAGRID_ROW_HEIGHTS as a,
|
|
33
35
|
DATAGRID_ROW_HEADER_HEIGHTS as b,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
DATAGRID_ID_DICTIONARY as c,
|
|
37
|
+
DATAGRID_SELECT_COLUMN_KEY as d,
|
|
38
|
+
DATAGRID_SEMANTIC_WIDTHS as e,
|
|
39
|
+
DATAGRID_ACTIONS_COLUMN_KEY as f,
|
|
40
|
+
DATAGRID_HEADER_RENDER_CLICK_KEY as g
|
|
37
41
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState,
|
|
2
|
+
import { useState, useEffect, useMemo, useCallback, createContext } from "react";
|
|
3
3
|
import { c as castMapColumnsWidthToRecord } from "../../helpers/castMapColumnsWidthToRecord.js";
|
|
4
4
|
import { useFirstRender } from "@m4l/graphics";
|
|
5
5
|
import { g as getComponentClasses } from "../../../../utils/getComponentSlotRoot.js";
|
|
@@ -32,10 +32,7 @@ function getColumnsConfig(id, columns, defaultUserColumns = void 0) {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
return columns.map((column, index) => {
|
|
35
|
-
const [columnConfig = { ...column }, columnConfigIndex] = getColumnConfigByKey(
|
|
36
|
-
column.key,
|
|
37
|
-
columnsConfig
|
|
38
|
-
);
|
|
35
|
+
const [columnConfig = { ...column }, columnConfigIndex] = getColumnConfigByKey(column.key, columnsConfig);
|
|
39
36
|
return {
|
|
40
37
|
key: column.key,
|
|
41
38
|
name: typeof column.name === "string" ? column.name : String(column.name),
|
|
@@ -81,10 +78,16 @@ function getColumnsWidth(id, columns, defaultUserColumns) {
|
|
|
81
78
|
function saveColumnsWidth(id, storeColumnsWidth, onChangeUserColumns) {
|
|
82
79
|
if (onChangeUserColumns) {
|
|
83
80
|
const columnsWidthObject = castMapColumnsWidthToRecord(storeColumnsWidth);
|
|
84
|
-
onChangeUserColumns({
|
|
81
|
+
onChangeUserColumns({
|
|
82
|
+
reason: "columnsWidths",
|
|
83
|
+
userConfig: columnsWidthObject
|
|
84
|
+
});
|
|
85
85
|
return;
|
|
86
86
|
}
|
|
87
|
-
localStorage.setItem(
|
|
87
|
+
localStorage.setItem(
|
|
88
|
+
`${id}_columns_width`,
|
|
89
|
+
JSON.stringify([...storeColumnsWidth])
|
|
90
|
+
);
|
|
88
91
|
}
|
|
89
92
|
function saveColumnsConfig(id, columnsConfig, onChangeUserColumns) {
|
|
90
93
|
if (onChangeUserColumns) {
|
|
@@ -118,26 +121,26 @@ function DataGridProvider(props) {
|
|
|
118
121
|
onCheckedRowsChange,
|
|
119
122
|
rowKeyGetter,
|
|
120
123
|
onChangeUserColumns,
|
|
124
|
+
externalSortSettings: sortSettings,
|
|
125
|
+
externalFilterSettings: filterSettings,
|
|
121
126
|
size
|
|
122
127
|
} = props;
|
|
123
128
|
const isFirstRender = useFirstRender([columns, id]);
|
|
124
|
-
const classes = getComponentClasses(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
const [columnsWidths, setColumnsWidths] = useState(
|
|
137
|
-
/* @__PURE__ */ new Map()
|
|
129
|
+
const classes = getComponentClasses(DATAGRID_PREFIX_NAME, {
|
|
130
|
+
...DataGridSlots,
|
|
131
|
+
...ActionsSlots,
|
|
132
|
+
...RowsCountSlots,
|
|
133
|
+
...TableSlots,
|
|
134
|
+
...TextEditorSlots,
|
|
135
|
+
...ColumnsConfigSlots,
|
|
136
|
+
...ControlNavigateSlots
|
|
137
|
+
});
|
|
138
|
+
const [columnsWidths, setColumnsWidths] = useState(/* @__PURE__ */ new Map());
|
|
139
|
+
const [columnsConfig, setColumnsConfigOptions] = useState(
|
|
140
|
+
() => []
|
|
138
141
|
);
|
|
139
|
-
const [columnsConfig, setColumnsConfigOptions] = useState(() => []);
|
|
140
142
|
const [rowsFilterCount, setRowFilterCount] = useState(rowsCount);
|
|
143
|
+
const [sortColumns, setSortColumns] = useState([]);
|
|
141
144
|
const [currentRowHeightVariant, setCurrentRowHeightVariant] = useState(() => {
|
|
142
145
|
if (typeof rowHeights !== typeof rowHeaderHeights) {
|
|
143
146
|
throw new Error("Must be same type rowheights and rowHeaderTypes");
|
|
@@ -161,19 +164,44 @@ function DataGridProvider(props) {
|
|
|
161
164
|
rowHeaderHeight: typeof rowHeaderHeights !== "number" ? rowHeaderHeights[getIndexRowHeightVariant(initialRowHeightVariant)] : rowHeaderHeights
|
|
162
165
|
};
|
|
163
166
|
});
|
|
167
|
+
useEffect(() => {
|
|
168
|
+
const keys = new Set(columns.map((c) => c.key));
|
|
169
|
+
if (sortSettings?.sortsColumns) {
|
|
170
|
+
for (const sort of sortSettings.sortsColumns) {
|
|
171
|
+
if (!keys.has(sort)) {
|
|
172
|
+
throw new Error(
|
|
173
|
+
`DataGridProvider: Sorts incluye "${sort}", pero no existe ninguna columna con key="${sort}".`
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
if (filterSettings?.filterColumns) {
|
|
179
|
+
for (const filterField of filterSettings.filterColumns) {
|
|
180
|
+
if (!keys.has(filterField.name)) {
|
|
181
|
+
throw new Error(
|
|
182
|
+
`DataGridProvider: Fields incluye "${filterField.name}", pero no existe ninguna columna con key="${filterField.name}".`
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}, [columns, sortSettings, filterSettings]);
|
|
164
188
|
const finalRowHeights = useMemo(() => rowHeights, [rowHeights]);
|
|
165
189
|
let timerSaveColumns;
|
|
166
190
|
useEffect(() => {
|
|
167
191
|
if (isFirstRender) {
|
|
168
192
|
setColumnsWidths(getColumnsWidth(id, columns, defaultUserColumns));
|
|
169
|
-
setColumnsConfigOptions(
|
|
193
|
+
setColumnsConfigOptions(
|
|
194
|
+
getColumnsConfig(id, columns, defaultUserColumns)
|
|
195
|
+
);
|
|
170
196
|
}
|
|
171
197
|
}, [defaultUserColumns]);
|
|
172
198
|
useEffect(() => {
|
|
173
199
|
if (!isFirstRender) {
|
|
174
200
|
const finalColumnsConfig = [];
|
|
175
201
|
for (let i = 0; i < columnsConfig.length; i++) {
|
|
176
|
-
const columnIndex = columns.findIndex(
|
|
202
|
+
const columnIndex = columns.findIndex(
|
|
203
|
+
(c) => c.key === columnsConfig[i]?.key
|
|
204
|
+
);
|
|
177
205
|
if (columnIndex !== -1) {
|
|
178
206
|
const column = columns[columnIndex];
|
|
179
207
|
finalColumnsConfig.push({
|
|
@@ -185,11 +213,18 @@ function DataGridProvider(props) {
|
|
|
185
213
|
});
|
|
186
214
|
}
|
|
187
215
|
}
|
|
188
|
-
const newColumns = columns.filter(
|
|
216
|
+
const newColumns = columns.filter(
|
|
217
|
+
(column, index) => column.key !== columnsConfig[index]?.key
|
|
218
|
+
);
|
|
189
219
|
if (newColumns.length > 0) {
|
|
190
220
|
const colLength = finalColumnsConfig.length;
|
|
191
|
-
const newColConfig = getColumnsConfig(
|
|
192
|
-
|
|
221
|
+
const newColConfig = getColumnsConfig(
|
|
222
|
+
id,
|
|
223
|
+
newColumns
|
|
224
|
+
).map((columnConfig, index) => {
|
|
225
|
+
const columnIndex = columns.findIndex(
|
|
226
|
+
(c) => c.key === newColumns[index].key
|
|
227
|
+
);
|
|
193
228
|
const column = newColumns[index];
|
|
194
229
|
const indexNewCol = index + colLength;
|
|
195
230
|
return {
|
|
@@ -206,7 +241,11 @@ function DataGridProvider(props) {
|
|
|
206
241
|
if (deepEqual(columnsConfig, finalColumnsConfig)) {
|
|
207
242
|
return;
|
|
208
243
|
}
|
|
209
|
-
console.log(
|
|
244
|
+
console.log(
|
|
245
|
+
"useEffect columnsConfig changed",
|
|
246
|
+
columnsConfig,
|
|
247
|
+
finalColumnsConfig
|
|
248
|
+
);
|
|
210
249
|
setColumnsConfigOptions(finalColumnsConfig);
|
|
211
250
|
}
|
|
212
251
|
}, [columns, id]);
|
|
@@ -223,8 +262,12 @@ function DataGridProvider(props) {
|
|
|
223
262
|
if (sourceKey === targetKey) {
|
|
224
263
|
return;
|
|
225
264
|
}
|
|
226
|
-
const sourceColumnIndex = columnsConfig.findIndex(
|
|
227
|
-
|
|
265
|
+
const sourceColumnIndex = columnsConfig.findIndex(
|
|
266
|
+
(c) => c.key === sourceKey
|
|
267
|
+
);
|
|
268
|
+
const targetColumnIndex = columnsConfig.findIndex(
|
|
269
|
+
(c) => c.key === targetKey
|
|
270
|
+
);
|
|
228
271
|
const reorderedColumnsConfig = [...columnsConfig];
|
|
229
272
|
reorderedColumnsConfig.splice(
|
|
230
273
|
targetColumnIndex,
|
|
@@ -282,6 +325,10 @@ function DataGridProvider(props) {
|
|
|
282
325
|
onCheckedRowsChange,
|
|
283
326
|
rowKeyGetter,
|
|
284
327
|
onChangeUserColumns,
|
|
328
|
+
sortColumns,
|
|
329
|
+
setSortColumns,
|
|
330
|
+
externalSortSettings: sortSettings,
|
|
331
|
+
externalFilterSettings: filterSettings,
|
|
285
332
|
classes,
|
|
286
333
|
size
|
|
287
334
|
},
|
|
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { RowKey, RowHeightVariants, GridProps } from '../../types';
|
|
3
3
|
import { Maybe } from '@m4l/core';
|
|
4
4
|
import { ActionsSlots, ColumnsConfigSlots, ControlNavigateSlots, DataGridSlots, RowsCountSlots, TableSlots, TextEditorSlots } from '../../slots/DataGridEnum';
|
|
5
|
+
import { SortColumn } from 'react-data-grid';
|
|
5
6
|
export interface BaseConfigColumn {
|
|
6
7
|
key: string;
|
|
7
8
|
visible: boolean;
|
|
@@ -22,7 +23,7 @@ export interface IGridConfig {
|
|
|
22
23
|
columnsConfig: BaseConfigColumn[];
|
|
23
24
|
columnsWidths: Record<RowKey, number>;
|
|
24
25
|
}
|
|
25
|
-
export interface DataGridProviderProps<TRow, TSummaryRow, TKey extends RowKey = RowKey> extends Pick<GridProps<TRow, TSummaryRow, TKey>, 'rows' | 'columns' | 'rowActionsGetter' | 'rowHeaderHeights' | 'rowHeights' | 'initialRowHeightVariant' | 'checkedRows' | 'onCheckedRowsChange' | 'rowKeyGetter' | 'onChangeUserColumns' | 'defaultUserColumns'> {
|
|
26
|
+
export interface DataGridProviderProps<TRow, TSummaryRow, TKey extends RowKey = RowKey> extends Pick<GridProps<TRow, TSummaryRow, TKey>, 'rows' | 'columns' | 'rowActionsGetter' | 'rowHeaderHeights' | 'rowHeights' | 'initialRowHeightVariant' | 'checkedRows' | 'onCheckedRowsChange' | 'rowKeyGetter' | 'onChangeUserColumns' | 'defaultUserColumns' | 'externalSortSettings' | 'externalFilterSettings'> {
|
|
26
27
|
id: number | string;
|
|
27
28
|
children: ReactNode;
|
|
28
29
|
rowsCount: number;
|
|
@@ -33,7 +34,7 @@ export type RowHeightState = {
|
|
|
33
34
|
rowHeight: number;
|
|
34
35
|
rowHeaderHeight: number;
|
|
35
36
|
};
|
|
36
|
-
export interface DataGridContextProps<TRow, TSummaryRow, TKey extends RowKey = RowKey> extends Pick<DataGridProviderProps<TRow, TSummaryRow, TKey>, 'rows' | 'checkedRows' | 'onCheckedRowsChange' | 'rowHeights' | 'rowsCount' | 'rowActionsGetter' | 'rowKeyGetter' | 'onChangeUserColumns'> {
|
|
37
|
+
export interface DataGridContextProps<TRow, TSummaryRow, TKey extends RowKey = RowKey> extends Pick<DataGridProviderProps<TRow, TSummaryRow, TKey>, 'rows' | 'checkedRows' | 'onCheckedRowsChange' | 'rowHeights' | 'rowsCount' | 'rowActionsGetter' | 'rowKeyGetter' | 'onChangeUserColumns' | 'externalSortSettings' | 'externalFilterSettings'> {
|
|
37
38
|
columnsConfig: IConfigColumn[];
|
|
38
39
|
columnsWidths: Map<string, Maybe<string | number>>;
|
|
39
40
|
setRowsCount: (newRowsCount: number) => void;
|
|
@@ -46,4 +47,6 @@ export interface DataGridContextProps<TRow, TSummaryRow, TKey extends RowKey = R
|
|
|
46
47
|
onChangeColumnWidth: (columnKey: string, width: number) => void;
|
|
47
48
|
classes?: Record<DataGridSlots | ActionsSlots | RowsCountSlots | TableSlots | TextEditorSlots | ColumnsConfigSlots | ControlNavigateSlots, string>;
|
|
48
49
|
size: GridProps<any, any, any>['size'];
|
|
50
|
+
sortColumns: SortColumn[];
|
|
51
|
+
setSortColumns: React.Dispatch<React.SetStateAction<SortColumn[]>>;
|
|
49
52
|
}
|
|
@@ -25,4 +25,12 @@ export declare const DICTIONARY: {
|
|
|
25
25
|
SETTINGS_VISIBLE_ALL: string;
|
|
26
26
|
SETTINGS_NO_VISIBLE_ALL: string;
|
|
27
27
|
SETTINGS_RESTORE: string;
|
|
28
|
+
NO_ACTIONS_LABEL: string;
|
|
29
|
+
ORDER_ASC_COLUMN: string;
|
|
30
|
+
ORDER_DESC_COLUMN: string;
|
|
31
|
+
REMOVE_ORDER_COLUMN: string;
|
|
32
|
+
FREEZE_COLUMN: string;
|
|
33
|
+
UNFREEZE_COLUMN: string;
|
|
34
|
+
HIDE_COLUMN: string;
|
|
35
|
+
ADD_FILTER_COLUMN: string;
|
|
28
36
|
};
|
|
@@ -1,29 +1,38 @@
|
|
|
1
1
|
import { g as getMenuActionsComponentsDictionary } from "../MenuActions/dictionary.js";
|
|
2
2
|
import { g as getModalDictionary } from "../ModalDialog/dictionary.js";
|
|
3
3
|
import { g as getPagerComponentsDictionary } from "../Pager/dicctionary.js";
|
|
4
|
+
import { c as DATAGRID_ID_DICTIONARY } from "./constants.js";
|
|
4
5
|
const DATAGRID_DICTIONARY_ID = "data_grid";
|
|
5
6
|
function getDataGridComponentsDictionary() {
|
|
6
7
|
return [DATAGRID_DICTIONARY_ID].concat(getPagerComponentsDictionary()).concat(getMenuActionsComponentsDictionary()).concat(getModalDictionary());
|
|
7
8
|
}
|
|
8
9
|
const DICTIONARY = {
|
|
9
10
|
DENSITY_COMPACT: `${DATAGRID_DICTIONARY_ID}.density_compact`,
|
|
10
|
-
DENSITY_STANDARD: `${
|
|
11
|
-
DENSITY_CONFORTABLE: `${
|
|
12
|
-
DENSITY_TOOLTIP: `${
|
|
13
|
-
TOOLTIP_FILTER_HIDE: `${
|
|
14
|
-
TOOLTIP_FILTER_SHOW: `${
|
|
15
|
-
SETTINGS_COLUMN_NAME: `${
|
|
16
|
-
SETTINGS_COLUMN_POSITION: `${
|
|
17
|
-
SETTINGS_COLUMN_VISIBLE: `${
|
|
18
|
-
SETTINGS_COLUMNS_FROZEN: `${
|
|
19
|
-
SETTINGS_SEL_COLUMNS: `${
|
|
20
|
-
SETTINGS_MOVE_FIRST: `${
|
|
21
|
-
SETTINGS_MOVE_UP: `${
|
|
22
|
-
SETTINGS_MOVE_LAST: `${
|
|
23
|
-
SETTINGS_MOVE_DOWN: `${
|
|
24
|
-
SETTINGS_VISIBLE_ALL: `${
|
|
25
|
-
SETTINGS_NO_VISIBLE_ALL: `${
|
|
26
|
-
SETTINGS_RESTORE: `${
|
|
11
|
+
DENSITY_STANDARD: `${DATAGRID_ID_DICTIONARY}.density_standard`,
|
|
12
|
+
DENSITY_CONFORTABLE: `${DATAGRID_ID_DICTIONARY}.density_confortable`,
|
|
13
|
+
DENSITY_TOOLTIP: `${DATAGRID_ID_DICTIONARY}.tooltip_density`,
|
|
14
|
+
TOOLTIP_FILTER_HIDE: `${DATAGRID_ID_DICTIONARY}.tooltip_filter_hide`,
|
|
15
|
+
TOOLTIP_FILTER_SHOW: `${DATAGRID_ID_DICTIONARY}.tooltip_filter_show`,
|
|
16
|
+
SETTINGS_COLUMN_NAME: `${DATAGRID_ID_DICTIONARY}.settings_column_name`,
|
|
17
|
+
SETTINGS_COLUMN_POSITION: `${DATAGRID_ID_DICTIONARY}.settings_column_position`,
|
|
18
|
+
SETTINGS_COLUMN_VISIBLE: `${DATAGRID_ID_DICTIONARY}.settings_column_visible`,
|
|
19
|
+
SETTINGS_COLUMNS_FROZEN: `${DATAGRID_ID_DICTIONARY}.settings_column_frozen`,
|
|
20
|
+
SETTINGS_SEL_COLUMNS: `${DATAGRID_ID_DICTIONARY}.settings_sel_columns`,
|
|
21
|
+
SETTINGS_MOVE_FIRST: `${DATAGRID_ID_DICTIONARY}.settings_move_first`,
|
|
22
|
+
SETTINGS_MOVE_UP: `${DATAGRID_ID_DICTIONARY}.settings_move_up`,
|
|
23
|
+
SETTINGS_MOVE_LAST: `${DATAGRID_ID_DICTIONARY}.settings_move_last`,
|
|
24
|
+
SETTINGS_MOVE_DOWN: `${DATAGRID_ID_DICTIONARY}.settings_move_down`,
|
|
25
|
+
SETTINGS_VISIBLE_ALL: `${DATAGRID_ID_DICTIONARY}.settings_visible_all`,
|
|
26
|
+
SETTINGS_NO_VISIBLE_ALL: `${DATAGRID_ID_DICTIONARY}.settings_no_visible_all`,
|
|
27
|
+
SETTINGS_RESTORE: `${DATAGRID_ID_DICTIONARY}.settings_restore`,
|
|
28
|
+
NO_ACTIONS_LABEL: `${DATAGRID_ID_DICTIONARY}.no_actions_label`,
|
|
29
|
+
ORDER_ASC_COLUMN: `${DATAGRID_ID_DICTIONARY}.order_asc_column`,
|
|
30
|
+
ORDER_DESC_COLUMN: `${DATAGRID_ID_DICTIONARY}.order_desc_column`,
|
|
31
|
+
REMOVE_ORDER_COLUMN: `${DATAGRID_ID_DICTIONARY}.remove_order_column`,
|
|
32
|
+
FREEZE_COLUMN: `${DATAGRID_ID_DICTIONARY}.freeze_column`,
|
|
33
|
+
UNFREEZE_COLUMN: `${DATAGRID_ID_DICTIONARY}.unfreeze_column`,
|
|
34
|
+
HIDE_COLUMN: `${DATAGRID_ID_DICTIONARY}.hide_column`,
|
|
35
|
+
ADD_FILTER_COLUMN: `${DATAGRID_ID_DICTIONARY}.add_filter`
|
|
27
36
|
};
|
|
28
37
|
export {
|
|
29
38
|
DICTIONARY as D,
|
|
@@ -12,7 +12,13 @@ const pathIcons = {
|
|
|
12
12
|
checkAll: "frontend/components/data_grid/assets/icons/check_all.svg",
|
|
13
13
|
uncheckAll: "frontend/components/data_grid/assets/icons/uncheck_all.svg",
|
|
14
14
|
restoreColumns: "frontend/components/data_grid/assets/icons/restore_columns.svg",
|
|
15
|
-
search: "frontend/components/data_grid/assets/icons/search.svg"
|
|
15
|
+
search: "frontend/components/data_grid/assets/icons/search.svg",
|
|
16
|
+
sortAsc: "frontend/components/data_grid/assets/icons/sort_asc.svg",
|
|
17
|
+
sortDesc: "frontend/components/data_grid/assets/icons/sort_desc.svg",
|
|
18
|
+
removeSort: "frontend/components/data_grid/assets/icons/eraser.svg",
|
|
19
|
+
freezeColumn: "frontend/components/data_grid/assets/icons/pin.svg",
|
|
20
|
+
unfreezeColumn: "frontend/components/data_grid/assets/icons/pin-off.svg",
|
|
21
|
+
hideColumn: "frontend/components/data_grid/assets/icons/eye-off.svg"
|
|
16
22
|
};
|
|
17
23
|
export {
|
|
18
24
|
pathIcons as p
|
|
@@ -21,7 +21,11 @@ export declare enum TableSlots {
|
|
|
21
21
|
draggableWrapperInputBase = "draggableWrapperInputBase",
|
|
22
22
|
headerInputBase = "headerInputBase",
|
|
23
23
|
wrapperSkeleton = "wrapperSkeleton",
|
|
24
|
-
contentModalSetting = "contentModalSetting"
|
|
24
|
+
contentModalSetting = "contentModalSetting",
|
|
25
|
+
headerRenderClick = "headerRenderClick",
|
|
26
|
+
menuList = "menuList",
|
|
27
|
+
buttonHeaderActions = "buttonHeaderActions",
|
|
28
|
+
nameColumnIcon = "nameColumnIcon"
|
|
25
29
|
}
|
|
26
30
|
export declare enum TextEditorSlots {
|
|
27
31
|
inputTexEditor = "inputTexEditor"
|
|
@@ -25,6 +25,10 @@ var TableSlots = /* @__PURE__ */ ((TableSlots2) => {
|
|
|
25
25
|
TableSlots2["headerInputBase"] = "headerInputBase";
|
|
26
26
|
TableSlots2["wrapperSkeleton"] = "wrapperSkeleton";
|
|
27
27
|
TableSlots2["contentModalSetting"] = "contentModalSetting";
|
|
28
|
+
TableSlots2["headerRenderClick"] = "headerRenderClick";
|
|
29
|
+
TableSlots2["menuList"] = "menuList";
|
|
30
|
+
TableSlots2["buttonHeaderActions"] = "buttonHeaderActions";
|
|
31
|
+
TableSlots2["nameColumnIcon"] = "nameColumnIcon";
|
|
28
32
|
return TableSlots2;
|
|
29
33
|
})(TableSlots || {});
|
|
30
34
|
var TextEditorSlots = /* @__PURE__ */ ((TextEditorSlots2) => {
|
|
@@ -44,6 +44,10 @@ export declare const DraggableWrapperInputBaseStyled: import('@emotion/styled').
|
|
|
44
44
|
export declare const HeaderInputBaseStyled: import('@emotion/styled').StyledComponent<any, {}, {}>;
|
|
45
45
|
export declare const WrapperSkeletonStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
46
46
|
export declare const ContentModalSettingStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
47
|
+
export declare const HeaderRenderClickStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
48
|
+
export declare const MenuListStyled: import('@emotion/styled').StyledComponent<any, {}, {}>;
|
|
49
|
+
export declare const ButtonHeaderActionsStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
50
|
+
export declare const NameColumnIconStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
47
51
|
/**
|
|
48
52
|
* ****************
|
|
49
53
|
* Slots TextEditor
|