@m4l/components 9.2.60 → 9.2.62-B07072025beta.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.
Files changed (241) hide show
  1. package/@types/types.d.ts +8 -0
  2. package/components/AppBar/AppBar.js +12 -10
  3. package/components/AppBar/slots/AppBarEnum.d.ts +1 -5
  4. package/components/AppBar/slots/AppBarEnum.js +0 -4
  5. package/components/AppBar/slots/AppBarSlots.d.ts +4 -18
  6. package/components/AppBar/slots/AppBarSlots.js +3 -27
  7. package/components/AppBar/styles.js +0 -42
  8. package/components/AppBar/types.d.ts +8 -0
  9. package/components/Chip/Chip.js +9 -10
  10. package/components/Chip/ChipStyles.js +13 -2
  11. package/components/Chip/constants.d.ts +9 -0
  12. package/components/Chip/constants.js +6 -2
  13. package/components/Chip/slots/ChipEnum.d.ts +3 -0
  14. package/components/Chip/slots/ChipEnum.js +6 -1
  15. package/components/Chip/slots/ChipSlots.js +1 -1
  16. package/components/DataGrid/DataGrid.js +17 -3
  17. package/components/DataGrid/Datagrid.styles.js +80 -33
  18. package/components/DataGrid/constants.d.ts +2 -0
  19. package/components/DataGrid/constants.js +7 -3
  20. package/components/DataGrid/contexts/DataGridContext/index.js +77 -30
  21. package/components/DataGrid/contexts/DataGridContext/types.d.ts +5 -2
  22. package/components/DataGrid/dictionary.d.ts +8 -0
  23. package/components/DataGrid/dictionary.js +26 -17
  24. package/components/DataGrid/icons.d.ts +7 -0
  25. package/components/DataGrid/icons.js +8 -1
  26. package/components/DataGrid/slots/DataGridEnum.d.ts +7 -1
  27. package/components/DataGrid/slots/DataGridEnum.js +6 -0
  28. package/components/DataGrid/slots/DataGridSlot.d.ts +6 -0
  29. package/components/DataGrid/slots/DataGridSlot.js +35 -5
  30. package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Filter/index.js +9 -1
  31. package/components/DataGrid/subcomponents/Table/hooks/getDragHeaderRenderer.d.ts +3 -1
  32. package/components/DataGrid/subcomponents/Table/hooks/getDragHeaderRenderer.js +9 -2
  33. package/components/DataGrid/subcomponents/Table/hooks/useHeaderMenuActions.d.ts +6 -0
  34. package/components/DataGrid/subcomponents/Table/hooks/useHeaderMenuActions.js +262 -0
  35. package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.d.ts +6 -4
  36. package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +35 -18
  37. package/components/DataGrid/subcomponents/Table/index.js +97 -34
  38. package/components/DataGrid/subcomponents/Table/subcomponents/ActionsColumn.js +1 -1
  39. package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.d.ts +1 -0
  40. package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.js +79 -4
  41. package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.d.ts +5 -0
  42. package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.js +146 -0
  43. package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/index.d.ts +1 -0
  44. package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/index.js +1 -0
  45. package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/types.d.ts +131 -0
  46. package/components/DataGrid/subcomponents/Table/subcomponents/SelectColumn.js +1 -1
  47. package/components/DataGrid/subcomponents/editors/TextEditor/index.js +1 -1
  48. package/components/DataGrid/tests/HeaderRenderClick.test.d.ts +1 -0
  49. package/components/DataGrid/tests/useHeaderMenuActions.test.d.ts +1 -0
  50. package/components/DataGrid/types.d.ts +53 -0
  51. package/components/DynamicFilter/DynamicFilter.styles.js +99 -90
  52. package/components/DynamicFilter/slots/SlotsEnum.d.ts +0 -3
  53. package/components/DynamicFilter/slots/SlotsEnum.js +0 -3
  54. package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +0 -9
  55. package/components/DynamicFilter/slots/dynamicFilterSlots.js +3 -19
  56. package/components/DynamicFilter/store/DynamicFilterContext.js +67 -28
  57. package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index.js +2 -2
  58. package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index.js +2 -2
  59. package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index.js +2 -2
  60. package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/index.js +2 -2
  61. package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index.js +2 -2
  62. package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index.js +2 -2
  63. package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.js +1 -1
  64. package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.d.ts +1 -0
  65. package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.js +2 -1
  66. package/components/DynamicFilter/subcomponents/InputFilter/InputFilter.js +2 -0
  67. package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.js +24 -18
  68. package/components/DynamicFilter/subcomponents/PopoverFilter/usePopoverFilter.d.ts +3 -3
  69. package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.js +4 -1
  70. package/components/DynamicFilter/types.d.ts +3 -0
  71. package/components/DynamicSort/DynamicSort.js +10 -6
  72. package/components/DynamicSort/DynamicSort.styles.js +92 -90
  73. package/components/DynamicSort/slots/DynamicSortSlots.d.ts +0 -9
  74. package/components/DynamicSort/slots/DynamicSortSlots.js +7 -23
  75. package/components/DynamicSort/slots/SlotsEnum.d.ts +1 -4
  76. package/components/DynamicSort/slots/SlotsEnum.js +1 -4
  77. package/components/DynamicSort/store/DynamicSortContext.js +96 -67
  78. package/components/DynamicSort/store/DynamicSortStore.js +53 -4
  79. package/components/DynamicSort/store/types.d.ts +11 -0
  80. package/components/DynamicSort/subcomponents/FieldTypes/StringSort/index.js +2 -2
  81. package/components/DynamicSort/subcomponents/InputSort/InputSort.js +2 -0
  82. package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.js +22 -17
  83. package/components/DynamicSort/subcomponents/PopoverSort/usePopoverSort.d.ts +3 -3
  84. package/components/DynamicSort/subcomponents/SortActions/SortActions.js +2 -2
  85. package/components/DynamicSort/subcomponents/SortActions/useSortActions.d.ts +2 -0
  86. package/components/DynamicSort/subcomponents/SortActions/useSortActions.js +2 -1
  87. package/components/DynamicSort/types.d.ts +4 -0
  88. package/components/LanguagePopover/LanguagePopover.js +7 -5
  89. package/components/LanguagePopover/LanguagePopover.styles.js +32 -4
  90. package/components/LanguagePopover/slots/LanguagePopoverSlots.d.ts +9 -3
  91. package/components/LanguagePopover/slots/LanguagePopoverSlots.js +1 -3
  92. package/components/LanguagePopover/types.d.ts +6 -1
  93. package/components/LoadingError/slots/LoadingErrorSlots.js +1 -1
  94. package/components/PaperForm/styles.js +2 -1
  95. package/components/PropertyValue/PropertyValue.js +2 -1
  96. package/components/PropertyValue/PropertyValue.styles.js +7 -4
  97. package/components/PropertyValue/types.d.ts +4 -0
  98. package/components/SideBar/SideBar.js +8 -2
  99. package/components/SideBar/constants.d.ts +26 -2
  100. package/components/SideBar/constants.js +20 -10
  101. package/components/SideBar/context/sideBarContext/index.js +17 -4
  102. package/components/SideBar/context/sideBarContext/types.d.ts +14 -1
  103. package/components/SideBar/helpers/getMenuDataWithState/index.js +25 -8
  104. package/components/SideBar/hooks/useCollapse/index.d.ts +1 -0
  105. package/components/SideBar/hooks/useCollapse/index.js +1 -0
  106. package/components/SideBar/hooks/useCollapse/useCollapse.d.ts +11 -0
  107. package/components/SideBar/hooks/useCollapse/useCollapse.js +23 -0
  108. package/components/SideBar/slots/SideBarEnum.d.ts +11 -11
  109. package/components/SideBar/slots/SideBarEnum.js +13 -15
  110. package/components/SideBar/slots/SideBarSlots.d.ts +15 -9
  111. package/components/SideBar/slots/SideBarSlots.js +50 -39
  112. package/components/SideBar/styles.js +4 -6
  113. package/components/SideBar/subcomponents/ContentComponent/index.js +13 -49
  114. package/components/SideBar/subcomponents/ContentComponent/style.js +148 -23
  115. package/components/SideBar/subcomponents/{FooterSidebar → FooterComponent}/index.d.ts +2 -2
  116. package/components/SideBar/subcomponents/{FooterSidebar → FooterComponent}/index.js +8 -15
  117. package/components/SideBar/subcomponents/{FooterSidebar → FooterComponent}/styles.js +8 -2
  118. package/components/SideBar/subcomponents/FooterComponent/types.d.ts +5 -0
  119. package/components/SideBar/subcomponents/HeaderComponent/HeaderComponent.d.ts +5 -0
  120. package/components/SideBar/subcomponents/HeaderComponent/HeaderComponent.js +37 -0
  121. package/components/SideBar/subcomponents/HeaderComponent/index.d.ts +1 -0
  122. package/components/SideBar/subcomponents/HeaderComponent/index.js +1 -0
  123. package/components/SideBar/subcomponents/HeaderComponent/styles.d.ts +2 -0
  124. package/components/SideBar/subcomponents/HeaderComponent/styles.js +43 -0
  125. package/components/SideBar/subcomponents/SideBarDesktop/index.js +4 -3
  126. package/components/SideBar/subcomponents/SideBarDesktop/styles.js +3 -35
  127. package/components/SideBar/subcomponents/SideBarMobile/index.js +1 -1
  128. package/components/SideBar/subcomponents/TreeGroupItems/index.d.ts +5 -0
  129. package/components/SideBar/subcomponents/TreeGroupItems/index.js +51 -0
  130. package/components/SideBar/subcomponents/TreeGroupItems/styles.js +146 -0
  131. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/AdormentIcon/AdormentIcon.d.ts +7 -0
  132. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/AdormentIcon/AdormentIcon.js +12 -0
  133. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/AdormentIcon/types.d.ts +4 -0
  134. package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems}/subcomponents/ArrowIcon/index.js +10 -7
  135. package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems/subcomponents/NodeMenuItem}/index.d.ts +3 -3
  136. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/index.js +70 -0
  137. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/types.d.ts +10 -0
  138. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.d.ts +5 -0
  139. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.js +61 -0
  140. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/index.d.ts +1 -0
  141. package/components/SideBar/subcomponents/TreeGroupItems/types.d.ts +4 -0
  142. package/components/SideBar/types.d.ts +17 -8
  143. package/components/WindowBase/WindowBase.js +7 -1
  144. package/components/WindowBase/WindowBase.styles.js +50 -15
  145. package/components/WindowBase/constants.d.ts +1 -0
  146. package/components/WindowBase/constants.js +5 -1
  147. package/components/WindowBase/slots/WindowBaseEnum.d.ts +2 -1
  148. package/components/WindowBase/slots/WindowBaseEnum.js +1 -0
  149. package/components/WindowBase/slots/WindowBaseSlots.d.ts +3 -0
  150. package/components/WindowBase/slots/WindowBaseSlots.js +6 -1
  151. package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +11 -5
  152. package/components/WindowBase/subcomponents/Header/types.d.ts +1 -1
  153. package/components/WindowBase/subcomponents/Header/useButtonActions.js +4 -2
  154. package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.d.ts +1 -1
  155. package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.js +1 -1
  156. package/components/WindowBase/subcomponents/MemoizedIconButton/types.d.ts +5 -0
  157. package/components/WindowBase/types.d.ts +16 -0
  158. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +13 -0
  159. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.js +26 -20
  160. package/components/areas/contexts/AreasContext/store.js +2 -2
  161. package/components/commercial/HamburgerMenu/HamburgerMenu.js +1 -2
  162. package/components/extended/React-Resizable/helpers.js +1 -1
  163. package/components/extended/React-resizable-panels/SplitLayout.js +6 -3
  164. package/components/extended/React-resizable-panels/SplitLayout.styles.js +78 -36
  165. package/components/extended/React-resizable-panels/constants.d.ts +6 -0
  166. package/components/extended/React-resizable-panels/constants.js +5 -1
  167. package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.d.ts +2 -1
  168. package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.js +1 -0
  169. package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.d.ts +3 -0
  170. package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.js +7 -1
  171. package/components/hook-form/RHFAutocomplete/RFHAutocompleteStyles.js +1 -1
  172. package/components/hook-form/RHFPeriod/subcomponents/Period/dictionary.js +5 -4
  173. package/components/hook-form/RHFTextField/RHFTextField.js +1 -0
  174. package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.styles.js +3 -38
  175. package/components/hook-form/RHFormContext/index.d.ts +1 -1
  176. package/components/mui_extended/Accordion/styles.js +10 -2
  177. package/components/mui_extended/Button/Button.js +3 -1
  178. package/components/mui_extended/Button/ButtonStyles.js +6 -1
  179. package/components/mui_extended/Button/types.d.ts +1 -1
  180. package/components/mui_extended/CheckBox/CheckBox.styles.js +2 -1
  181. package/components/mui_extended/Divider/index.d.ts +1 -0
  182. package/components/mui_extended/Divider/index.js +1 -0
  183. package/components/mui_extended/NavLink/NavLink.js +3 -1
  184. package/components/mui_extended/NavLink/NavLink.styles.js +2 -1
  185. package/components/mui_extended/NavLink/types.d.ts +3 -1
  186. package/components/mui_extended/Tab/Tab.styles.js +2 -1
  187. package/components/mui_extended/TabContent/TabContent.styles.js +2 -8
  188. package/components/mui_extended/TextField/TextField.js +1 -1
  189. package/components/mui_extended/TextField/TextField.styles.js +20 -18
  190. package/components/mui_extended/Typography/slots/typographySlots.d.ts +1 -1
  191. package/components/mui_extended/index.d.ts +1 -0
  192. package/hooks/useDynamicFilterAndSort/styles.js +1 -1
  193. package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.d.ts +3 -0
  194. package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +334 -88
  195. package/index.d.ts +1 -0
  196. package/index.js +23 -20
  197. package/package.json +5 -4
  198. package/storybook/components/DataGrid/DataGrid.stories.d.ts +22 -0
  199. package/storybook/components/DataGrid/MswHandles.d.ts +1 -0
  200. package/storybook/components/DataGrid/helpers/filterFieldsSeedData.d.ts +5 -0
  201. package/storybook/components/DataGrid/helpers/getRows.d.ts +4 -0
  202. package/storybook/components/DataGrid/helpers/getRowsWithBackendSimulation.d.ts +9 -0
  203. package/storybook/components/DataGrid/helpers/sortsSeedData.d.ts +5 -0
  204. package/storybook/components/DataGrid/helpers/types.d.ts +1 -0
  205. package/storybook/components/DataGrid/helpers/useSeed.d.ts +3 -0
  206. package/storybook/components/DataGrid/subcomponents/DataGridRender.d.ts +2 -0
  207. package/storybook/components/DynamicFilter/DynamicFilter.stories.d.ts +27 -11
  208. package/storybook/components/DynamicSort/DynamicSort.stories.d.ts +26 -10
  209. package/storybook/components/SideBar/SideBar.stories.d.ts +5 -11
  210. package/storybook/components/SideBar/subcomponents/FooterComponentHost/FooterComponentHost.d.ts +4 -0
  211. package/storybook/components/SideBar/subcomponents/FooterComponentHost/constants.d.ts +3 -0
  212. package/storybook/components/SideBar/subcomponents/FooterComponentHost/index.d.ts +1 -0
  213. package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/FooterComponentMicrofrontend.d.ts +4 -0
  214. package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/FooterComponentMicrofrontend.stories.d.ts +14 -0
  215. package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/constants.d.ts +1 -0
  216. package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/index.d.ts +1 -0
  217. package/storybook/components/SideBar/subcomponents/HeaderComponentHost/HeaderComponentHost.d.ts +5 -0
  218. package/storybook/components/SideBar/subcomponents/HeaderComponentHost/constants.d.ts +1 -0
  219. package/storybook/components/SideBar/subcomponents/HeaderComponentMicrofrontend/HeaderComponentMicrofrontend.d.ts +5 -0
  220. package/storybook/components/SideBar/subcomponents/HeaderComponentMicrofrontend/constants.d.ts +1 -0
  221. package/storybook/components/extended/mui/IconButton/IconButton.stories.d.ts +1 -0
  222. package/storybook/components/extended/mui/TextField/TextFieldText.stories.d.ts +1 -0
  223. package/utils/index.d.ts +1 -0
  224. package/components/SideBar/subcomponents/ContentGroups/index.d.ts +0 -5
  225. package/components/SideBar/subcomponents/ContentGroups/index.js +0 -52
  226. package/components/SideBar/subcomponents/ContentGroups/styles.js +0 -71
  227. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/index.js +0 -63
  228. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.d.ts +0 -2
  229. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +0 -47
  230. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/types.d.ts +0 -7
  231. package/components/SideBar/subcomponents/ContentGroups/types.d.ts +0 -4
  232. package/components/SideBar/subcomponents/FooterSidebar/types.d.ts +0 -5
  233. package/components/SideBar/subcomponents/HeaderSidebar/index.d.ts +0 -6
  234. package/components/SideBar/subcomponents/HeaderSidebar/index.js +0 -25
  235. package/components/SideBar/subcomponents/HeaderSidebar/styles.d.ts +0 -2
  236. package/components/SideBar/subcomponents/HeaderSidebar/styles.js +0 -24
  237. package/components/SideBar/subcomponents/HeaderSidebar/types.d.ts +0 -5
  238. /package/components/SideBar/subcomponents/{FooterSidebar → FooterComponent}/styles.d.ts +0 -0
  239. /package/components/SideBar/subcomponents/{ContentGroups → TreeGroupItems}/styles.d.ts +0 -0
  240. /package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems}/subcomponents/ArrowIcon/index.d.ts +0 -0
  241. /package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems}/subcomponents/ArrowIcon/types.d.ts +0 -0
@@ -22,7 +22,7 @@ const dataGridStyles = {
22
22
  height: "100%",
23
23
  width: "100%",
24
24
  flex: 1,
25
- overflow: "auto",
25
+ overflow: "hidden",
26
26
  "& .rdg .MuiCheckbox-root": {
27
27
  "& > svg": {
28
28
  color: theme.vars.palette.text.secondary
@@ -60,23 +60,17 @@ const dataGridStyles = {
60
60
  /**
61
61
  * Estilos del contenedor de las acciones
62
62
  */
63
- actionsRoot: ({ theme, ownerState }) => ({
63
+ actionsRoot: ({ theme }) => ({
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
- // Tamaño del contenedor
71
- ...getSizeStyles(
72
- theme,
73
- ownerState?.size || "medium",
74
- "container",
75
- (size) => ({
76
- minHeight: size,
77
- height: size
78
- })
79
- ),
70
+ height: "fit-content",
71
+ ...theme.generalSettings.isMobile && {
72
+ minHeight: theme.vars.size.baseSpacings.sp10
73
+ },
80
74
  "& .mobile-menu-actions": {
81
75
  marginRight: "auto"
82
76
  }
@@ -92,7 +86,8 @@ const dataGridStyles = {
92
86
  borderRadius: theme.vars.size.borderRadius.r2,
93
87
  border: theme.vars.size.borderStroke.container,
94
88
  borderColor: theme.vars.palette?.border.disabled,
95
- padding: theme.vars.size.baseSpacings.sp1
89
+ padding: theme.vars.size.baseSpacings.sp1,
90
+ boxShadow: theme.vars.customShadows?.z1
96
91
  }),
97
92
  /**
98
93
  * Estilos para el contenedor de las acciones derecho
@@ -142,7 +137,11 @@ const dataGridStyles = {
142
137
  //Se utiliza directamente el valor porque no está tokenizado
143
138
  height: "100%",
144
139
  lineHeight: theme.vars.size.baseSpacings.sp4,
145
- fontSize: getTypographyStyles(theme.generalSettings.isMobile, ownerState?.size || "medium", "body").fontSize
140
+ fontSize: getTypographyStyles(
141
+ theme.generalSettings.isMobile,
142
+ ownerState?.size || "medium",
143
+ "body"
144
+ ).fontSize
146
145
  }),
147
146
  /**
148
147
  * Estilos para el valor de RowsCount
@@ -155,7 +154,11 @@ const dataGridStyles = {
155
154
  paddingRight: "6px",
156
155
  //No hay token para este valor
157
156
  paddingTop: theme.vars.size.baseSpacings.sp1,
158
- fontSize: getTypographyStyles(theme.generalSettings.isMobile, ownerState?.size || "medium", "body").fontSize
157
+ fontSize: getTypographyStyles(
158
+ theme.generalSettings.isMobile,
159
+ ownerState?.size || "medium",
160
+ "body"
161
+ ).fontSize
159
162
  }),
160
163
  /**
161
164
  * Estilos para el contenedor de las columnas
@@ -576,15 +579,10 @@ const dataGridStyles = {
576
579
  padding: theme.vars.size.baseSpacings.sp1,
577
580
  gap: theme.vars.size.baseSpacings.sp1,
578
581
  borderRadius: theme.vars.size.borderRadius.r1,
579
- ...getSizeStyles(
580
- theme,
581
- ownerState?.size || "medium",
582
- "action",
583
- (size) => ({
584
- minHeight: size,
585
- height: size
586
- })
587
- )
582
+ ...getSizeStyles(theme, ownerState?.size || "medium", "action", (size) => ({
583
+ minHeight: size,
584
+ height: size
585
+ }))
588
586
  }),
589
587
  /**
590
588
  * Estilos de los inputs del header para el filtro
@@ -603,15 +601,10 @@ const dataGridStyles = {
603
601
  height: "100%",
604
602
  alignItems: "center",
605
603
  "& .MuiSkeleton-root": {
606
- ...getSizeStyles(
607
- theme,
608
- ownerState?.size || "medium",
609
- "base",
610
- (size) => ({
611
- minHeight: `${size}!important`,
612
- height: `${size}!important`
613
- })
614
- )
604
+ ...getSizeStyles(theme, ownerState?.size || "medium", "base", (size) => ({
605
+ minHeight: `${size}!important`,
606
+ height: `${size}!important`
607
+ }))
615
608
  }
616
609
  }),
617
610
  /**
@@ -623,6 +616,60 @@ const dataGridStyles = {
623
616
  flexDirection: "column",
624
617
  height: "100%"
625
618
  }
619
+ }),
620
+ /**
621
+ * Estilos para el contenedor del nombre de la columna y el icono de sort
622
+ */
623
+ nameColumnIcon: ({ theme }) => ({
624
+ display: "flex",
625
+ alignItems: "center",
626
+ gap: theme.vars.size.baseSpacings.sp1,
627
+ position: "relative",
628
+ overflow: "visible"
629
+ }),
630
+ /**
631
+ * Estilos para el contenedor del nombre de la columna
632
+ */
633
+ nameColumn: () => ({
634
+ textOverflow: "ellipsis",
635
+ overflow: "hidden",
636
+ whiteSpace: "nowrap"
637
+ }),
638
+ /**
639
+ * Estilos para el contenedor del icono de la columna
640
+ */
641
+ iconColumn: ({ theme }) => ({
642
+ display: "flex",
643
+ alignItems: "center",
644
+ gap: theme.vars.size.baseSpacings.sp1
645
+ }),
646
+ /**
647
+ * Estilos para el popover del header actions
648
+ */
649
+ headerRenderClick: () => ({
650
+ width: "fit-content"
651
+ }),
652
+ /**
653
+ * Estilos para el menuList del header actions
654
+ */
655
+ menuList: ({ theme }) => ({
656
+ padding: theme.vars.size.baseSpacings.sp3,
657
+ display: "flex",
658
+ flexDirection: "column",
659
+ gap: theme.vars.size.baseSpacings.sp1,
660
+ "& > div": {
661
+ paddingLeft: theme.vars.size.baseSpacings.sp4,
662
+ paddingRight: theme.vars.size.baseSpacings.sp4
663
+ }
664
+ }),
665
+ /**
666
+ * Estilos para el contenedor del boton de acciones del header
667
+ */
668
+ buttonHeaderActions: () => ({
669
+ display: "flex",
670
+ alignItems: "center",
671
+ justifyContent: "space-between",
672
+ width: "100%"
626
673
  })
627
674
  };
628
675
  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
- DATAGRID_SELECT_COLUMN_KEY as c,
35
- DATAGRID_SEMANTIC_WIDTHS as d,
36
- DATAGRID_ACTIONS_COLUMN_KEY as e
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, useMemo, useEffect, useCallback, createContext } from "react";
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({ reason: "columnsWidths", userConfig: columnsWidthObject });
81
+ onChangeUserColumns({
82
+ reason: "columnsWidths",
83
+ userConfig: columnsWidthObject
84
+ });
85
85
  return;
86
86
  }
87
- localStorage.setItem(`${id}_columns_width`, JSON.stringify([...storeColumnsWidth]));
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
- DATAGRID_PREFIX_NAME,
126
- {
127
- ...DataGridSlots,
128
- ...ActionsSlots,
129
- ...RowsCountSlots,
130
- ...TableSlots,
131
- ...TextEditorSlots,
132
- ...ColumnsConfigSlots,
133
- ...ControlNavigateSlots
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(getColumnsConfig(id, columns, defaultUserColumns));
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((c) => c.key === columnsConfig[i]?.key);
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((column, index) => column.key !== columnsConfig[index]?.key);
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(id, newColumns).map((columnConfig, index) => {
192
- const columnIndex = columns.findIndex((c) => c.key === newColumns[index].key);
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("useEffect columnsConfig changed", columnsConfig, finalColumnsConfig);
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((c) => c.key === sourceKey);
227
- const targetColumnIndex = columnsConfig.findIndex((c) => c.key === targetKey);
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: `${DATAGRID_DICTIONARY_ID}.density_standard`,
11
- DENSITY_CONFORTABLE: `${DATAGRID_DICTIONARY_ID}.density_confortable`,
12
- DENSITY_TOOLTIP: `${DATAGRID_DICTIONARY_ID}.tooltip_density`,
13
- TOOLTIP_FILTER_HIDE: `${DATAGRID_DICTIONARY_ID}.tooltip_filter_hide`,
14
- TOOLTIP_FILTER_SHOW: `${DATAGRID_DICTIONARY_ID}.tooltip_filter_show`,
15
- SETTINGS_COLUMN_NAME: `${DATAGRID_DICTIONARY_ID}.settings_column_name`,
16
- SETTINGS_COLUMN_POSITION: `${DATAGRID_DICTIONARY_ID}.settings_column_position`,
17
- SETTINGS_COLUMN_VISIBLE: `${DATAGRID_DICTIONARY_ID}.settings_column_visible`,
18
- SETTINGS_COLUMNS_FROZEN: `${DATAGRID_DICTIONARY_ID}.settings_column_frozen`,
19
- SETTINGS_SEL_COLUMNS: `${DATAGRID_DICTIONARY_ID}.settings_sel_columns`,
20
- SETTINGS_MOVE_FIRST: `${DATAGRID_DICTIONARY_ID}.settings_move_first`,
21
- SETTINGS_MOVE_UP: `${DATAGRID_DICTIONARY_ID}.settings_move_up`,
22
- SETTINGS_MOVE_LAST: `${DATAGRID_DICTIONARY_ID}.settings_move_last`,
23
- SETTINGS_MOVE_DOWN: `${DATAGRID_DICTIONARY_ID}.settings_move_down`,
24
- SETTINGS_VISIBLE_ALL: `${DATAGRID_DICTIONARY_ID}.settings_visible_all`,
25
- SETTINGS_NO_VISIBLE_ALL: `${DATAGRID_DICTIONARY_ID}.settings_no_visible_all`,
26
- SETTINGS_RESTORE: `${DATAGRID_DICTIONARY_ID}.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,
@@ -13,4 +13,11 @@ export declare const pathIcons: {
13
13
  uncheckAll: string;
14
14
  restoreColumns: string;
15
15
  search: string;
16
+ sortAsc: string;
17
+ sortDesc: string;
18
+ filter2: string;
19
+ removeSort: string;
20
+ freezeColumn: string;
21
+ unfreezeColumn: string;
22
+ hideColumn: string;
16
23
  };
@@ -12,7 +12,14 @@ 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
+ filter2: "frontend/components/data_grid/assets/icons/filter.svg",
19
+ removeSort: "frontend/components/data_grid/assets/icons/eraser.svg",
20
+ freezeColumn: "frontend/components/data_grid/assets/icons/pin.svg",
21
+ unfreezeColumn: "frontend/components/data_grid/assets/icons/pin-off.svg",
22
+ hideColumn: "frontend/components/data_grid/assets/icons/eye-off.svg"
16
23
  };
17
24
  export {
18
25
  pathIcons as p
@@ -21,7 +21,13 @@ 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",
29
+ iconColumn = "iconColumn",
30
+ nameColumn = "nameColumn"
25
31
  }
26
32
  export declare enum TextEditorSlots {
27
33
  inputTexEditor = "inputTexEditor"
@@ -25,6 +25,12 @@ 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";
32
+ TableSlots2["iconColumn"] = "iconColumn";
33
+ TableSlots2["nameColumn"] = "nameColumn";
28
34
  return TableSlots2;
29
35
  })(TableSlots || {});
30
36
  var TextEditorSlots = /* @__PURE__ */ ((TextEditorSlots2) => {
@@ -44,6 +44,12 @@ 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>>, {}>;
51
+ export declare const IconColumnStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
52
+ export declare const NameColumnStyled: 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
53
  /**
48
54
  * ****************
49
55
  * Slots TextEditor
@@ -1,5 +1,5 @@
1
1
  import { styled } from "@mui/material/styles";
2
- import { InputBase } from "@mui/material";
2
+ import { MenuList, InputBase } from "@mui/material";
3
3
  import { D as DATAGRID_PREFIX_NAME } from "../constants.js";
4
4
  import { D as DataGridSlots, T as TextEditorSlots, A as ActionsSlots, b as TableSlots, C as ControlNavigateSlots, R as RowsCountSlots, a as ColumnsConfigSlots } from "./DataGridEnum.js";
5
5
  import { d as dataGridStyles } from "../Datagrid.styles.js";
@@ -88,6 +88,30 @@ const ContentModalSettingStyled = styled("div", {
88
88
  name: DATAGRID_PREFIX_NAME,
89
89
  slot: TableSlots.contentModalSetting
90
90
  })(dataGridStyles.contentModalSetting);
91
+ const HeaderRenderClickStyled = styled("div", {
92
+ name: DATAGRID_PREFIX_NAME,
93
+ slot: TableSlots.headerRenderClick
94
+ })(dataGridStyles.headerRenderClick);
95
+ const MenuListStyled = styled(MenuList, {
96
+ name: DATAGRID_PREFIX_NAME,
97
+ slot: TableSlots.menuList
98
+ })(dataGridStyles.menuList);
99
+ const ButtonHeaderActionsStyled = styled("div", {
100
+ name: DATAGRID_PREFIX_NAME,
101
+ slot: TableSlots.buttonHeaderActions
102
+ })(dataGridStyles.buttonHeaderActions);
103
+ const NameColumnIconStyled = styled("div", {
104
+ name: DATAGRID_PREFIX_NAME,
105
+ slot: TableSlots.nameColumnIcon
106
+ })(dataGridStyles.nameColumnIcon);
107
+ const IconColumnStyled = styled("div", {
108
+ name: DATAGRID_PREFIX_NAME,
109
+ slot: TableSlots.iconColumn
110
+ })(dataGridStyles.iconColumn);
111
+ const NameColumnStyled = styled("div", {
112
+ name: DATAGRID_PREFIX_NAME,
113
+ slot: TableSlots.nameColumn
114
+ })(dataGridStyles.nameColumn);
91
115
  const InputTextEditorStyled = styled("input", {
92
116
  name: DATAGRID_PREFIX_NAME,
93
117
  slot: TextEditorSlots.inputTexEditor
@@ -98,10 +122,13 @@ const ControlNavigateStyled = styled("div", {
98
122
  })(dataGridStyles.controlNavigate);
99
123
  export {
100
124
  ActionsRootStyled as A,
125
+ ButtonHeaderActionsStyled as B,
101
126
  CustomHeaderStyled as C,
102
127
  DataGridRootStyled as D,
103
128
  HeaderInputBaseStyled as H,
104
- IconSearchStyled as I,
129
+ IconColumnStyled as I,
130
+ MenuListStyled as M,
131
+ NameColumnIconStyled as N,
105
132
  RowsCountRootStyled as R,
106
133
  TableWrapperDataGridStyled as T,
107
134
  WrapperSkeletonStyled as W,
@@ -117,7 +144,10 @@ export {
117
144
  ColumnsConfigActiosStyled as j,
118
145
  ContentModalSettingStyled as k,
119
146
  TableContainerStyled as l,
120
- DraggableHeaderRootStyled as m,
121
- DraggableWrapperInputBaseStyled as n,
122
- InputTextEditorStyled as o
147
+ NameColumnStyled as m,
148
+ DraggableHeaderRootStyled as n,
149
+ DraggableWrapperInputBaseStyled as o,
150
+ IconSearchStyled as p,
151
+ HeaderRenderClickStyled as q,
152
+ InputTextEditorStyled as r
123
153
  };
@@ -4,12 +4,20 @@ import { u as useFilters } from "../../../../hooks/useFilters.js";
4
4
  import { I as IconButton } from "../../../../../mui_extended/IconButton/IconButton.js";
5
5
  import { p as pathIcons } from "../../../../icons.js";
6
6
  import { D as DICTIONARY } from "../../../../dictionary.js";
7
+ import { u as useDataGrid } from "../../../../hooks/useDataGrid.js";
7
8
  function Filter() {
8
9
  const { activeFilters, setActiveFilters } = useFilters();
9
10
  const { host_static_assets, environment_assets } = useEnvironment();
10
11
  const { getLabel } = useModuleDictionary();
12
+ const { externalFilterSettings } = useDataGrid();
11
13
  const toggleIcon = () => {
12
- setActiveFilters(!activeFilters);
14
+ if (externalFilterSettings) {
15
+ externalFilterSettings.onChange?.({
16
+ action: "openPopoverMenuFields"
17
+ });
18
+ } else {
19
+ setActiveFilters(!activeFilters);
20
+ }
13
21
  };
14
22
  return /* @__PURE__ */ jsx(
15
23
  IconButton,