@mui/x-data-grid 5.7.0 → 5.8.0

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 (298) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/DataGrid/DataGrid.d.ts +8 -3
  3. package/DataGrid/DataGrid.js +27 -4
  4. package/DataGrid/useDataGridComponent.js +2 -4
  5. package/DataGrid/useDataGridProps.d.ts +2 -1
  6. package/colDef/gridBooleanColDef.d.ts +1 -1
  7. package/colDef/gridBooleanOperators.d.ts +1 -1
  8. package/colDef/gridDateColDef.d.ts +5 -9
  9. package/colDef/gridDateColDef.js +2 -2
  10. package/colDef/gridDateOperators.d.ts +1 -1
  11. package/{models/colDef → colDef}/gridDefaultColumnTypes.d.ts +1 -1
  12. package/{models/colDef → colDef}/gridDefaultColumnTypes.js +6 -6
  13. package/colDef/gridNumericColDef.d.ts +1 -1
  14. package/colDef/gridNumericOperators.d.ts +2 -2
  15. package/colDef/gridStringColDef.d.ts +1 -1
  16. package/colDef/gridStringOperators.d.ts +1 -1
  17. package/colDef/index.d.ts +1 -0
  18. package/colDef/index.js +2 -1
  19. package/components/GridRow.js +1 -1
  20. package/components/cell/GridCell.d.ts +4 -4
  21. package/components/cell/GridCell.js +2 -2
  22. package/components/cell/GridEditInputCell.js +2 -2
  23. package/components/cell/GridEditSingleSelectCell.js +2 -2
  24. package/components/columnHeaders/GridColumnHeaderFilterIconButton.d.ts +12 -0
  25. package/components/columnHeaders/{ColumnHeaderFilterIcon.js → GridColumnHeaderFilterIconButton.js} +22 -4
  26. package/components/columnHeaders/GridColumnHeaderItem.js +5 -5
  27. package/components/columnHeaders/index.d.ts +1 -0
  28. package/components/columnHeaders/index.js +1 -0
  29. package/components/columnSelection/GridCellCheckboxRenderer.js +2 -2
  30. package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
  31. package/components/containers/GridRoot.js +29 -17
  32. package/components/menu/columnMenu/GridColumnMenu.js +1 -1
  33. package/components/panel/GridPanel.d.ts +2 -2
  34. package/components/panel/GridPreferencesPanel.js +1 -1
  35. package/constants/defaultGridSlotsComponents.js +2 -1
  36. package/constants/gridClasses.d.ts +15 -3
  37. package/hooks/core/index.d.ts +1 -1
  38. package/hooks/core/{preProcessing/gridPreProcessingApi.d.ts → pipeProcessing/gridPipeProcessingApi.d.ts} +19 -18
  39. package/hooks/core/{preProcessing/gridPreProcessingApi.js → pipeProcessing/gridPipeProcessingApi.js} +0 -0
  40. package/hooks/core/pipeProcessing/index.d.ts +3 -0
  41. package/hooks/core/pipeProcessing/index.js +3 -0
  42. package/hooks/core/pipeProcessing/useGridPipeProcessing.d.ts +27 -0
  43. package/hooks/core/pipeProcessing/useGridPipeProcessing.js +74 -0
  44. package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.d.ts +7 -0
  45. package/hooks/core/{preProcessing/useGridRegisterPreProcessor.js → pipeProcessing/useGridRegisterPipeProcessor.js} +2 -2
  46. package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.ts +27 -16
  47. package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +26 -15
  48. package/hooks/core/useGridInitialization.js +2 -2
  49. package/hooks/features/columnHeaders/useGridColumnHeaders.js +1 -1
  50. package/hooks/features/columns/gridColumnsSelector.d.ts +6 -6
  51. package/hooks/features/columns/gridColumnsUtils.d.ts +3 -3
  52. package/hooks/features/columns/gridColumnsUtils.js +49 -17
  53. package/hooks/features/columns/useGridColumns.js +36 -27
  54. package/hooks/features/dimensions/gridDimensionsApi.d.ts +5 -0
  55. package/hooks/features/dimensions/useGridDimensions.js +2 -1
  56. package/hooks/features/editRows/useGridCellEditing.new.d.ts +1 -1
  57. package/hooks/features/editRows/useGridCellEditing.new.js +22 -7
  58. package/hooks/features/editRows/useGridRowEditing.new.d.ts +1 -1
  59. package/hooks/features/editRows/useGridRowEditing.new.js +22 -7
  60. package/hooks/features/events/useGridEvents.d.ts +1 -1
  61. package/hooks/features/events/useGridEvents.js +2 -0
  62. package/hooks/features/filter/gridFilterSelector.d.ts +3 -9
  63. package/hooks/features/filter/useGridFilter.js +4 -4
  64. package/hooks/features/{keyboard → keyboardNavigation}/useGridKeyboardNavigation.d.ts +2 -5
  65. package/hooks/features/{keyboard → keyboardNavigation}/useGridKeyboardNavigation.js +27 -6
  66. package/hooks/features/pagination/gridPaginationSelector.d.ts +1 -3
  67. package/hooks/features/pagination/useGridPage.js +9 -4
  68. package/hooks/features/pagination/useGridPageSize.js +3 -3
  69. package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +18 -5
  70. package/hooks/features/rows/gridRowsSelector.d.ts +1 -1
  71. package/hooks/features/rows/gridRowsUtils.d.ts +8 -0
  72. package/hooks/features/rows/gridRowsUtils.js +11 -0
  73. package/hooks/features/rows/index.d.ts +1 -0
  74. package/hooks/features/rows/index.js +1 -1
  75. package/hooks/features/rows/useGridRows.js +3 -3
  76. package/hooks/features/rows/useGridRowsMeta.js +3 -3
  77. package/hooks/features/scroll/useGridScroll.js +4 -13
  78. package/hooks/features/selection/gridSelectionSelector.d.ts +1 -3
  79. package/hooks/features/selection/useGridSelection.d.ts +4 -2
  80. package/hooks/features/selection/useGridSelection.js +72 -25
  81. package/hooks/features/selection/useGridSelectionPreProcessors.js +2 -2
  82. package/hooks/features/sorting/gridSortingSelector.d.ts +1 -3
  83. package/hooks/features/sorting/gridSortingUtils.d.ts +1 -2
  84. package/hooks/features/sorting/useGridSorting.js +3 -3
  85. package/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
  86. package/hooks/utils/useGridRootProps.d.ts +1 -1
  87. package/hooks/utils/useGridVisibleRows.d.ts +2 -2
  88. package/index.js +1 -1
  89. package/internals/index.d.ts +3 -6
  90. package/internals/index.js +2 -3
  91. package/legacy/DataGrid/DataGrid.js +27 -4
  92. package/legacy/DataGrid/useDataGridComponent.js +2 -4
  93. package/legacy/colDef/gridDateColDef.js +2 -2
  94. package/legacy/{models/colDef → colDef}/gridDefaultColumnTypes.js +6 -6
  95. package/legacy/colDef/index.js +2 -1
  96. package/legacy/components/GridRow.js +1 -1
  97. package/legacy/components/cell/GridCell.js +2 -2
  98. package/legacy/components/cell/GridEditInputCell.js +2 -2
  99. package/legacy/components/cell/GridEditSingleSelectCell.js +2 -2
  100. package/legacy/components/columnHeaders/{ColumnHeaderFilterIcon.js → GridColumnHeaderFilterIconButton.js} +22 -4
  101. package/legacy/components/columnHeaders/GridColumnHeaderItem.js +5 -5
  102. package/legacy/components/columnHeaders/index.js +1 -0
  103. package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +2 -2
  104. package/legacy/components/containers/GridRoot.js +34 -17
  105. package/legacy/components/menu/columnMenu/GridColumnMenu.js +1 -1
  106. package/legacy/components/panel/GridPreferencesPanel.js +1 -1
  107. package/legacy/constants/defaultGridSlotsComponents.js +2 -1
  108. package/legacy/hooks/core/{preProcessing/gridPreProcessingApi.js → pipeProcessing/gridPipeProcessingApi.js} +0 -0
  109. package/legacy/hooks/core/pipeProcessing/index.js +3 -0
  110. package/legacy/hooks/core/pipeProcessing/useGridPipeProcessing.js +83 -0
  111. package/legacy/hooks/core/{preProcessing/useGridRegisterPreProcessor.js → pipeProcessing/useGridRegisterPipeProcessor.js} +2 -2
  112. package/legacy/hooks/core/strategyProcessing/useGridStrategyProcessing.js +26 -15
  113. package/legacy/hooks/core/useGridInitialization.js +2 -2
  114. package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +1 -1
  115. package/legacy/hooks/features/columns/gridColumnsUtils.js +49 -18
  116. package/legacy/hooks/features/columns/useGridColumns.js +36 -27
  117. package/legacy/hooks/features/dimensions/useGridDimensions.js +2 -1
  118. package/legacy/hooks/features/editRows/useGridCellEditing.new.js +22 -7
  119. package/legacy/hooks/features/editRows/useGridRowEditing.new.js +22 -7
  120. package/legacy/hooks/features/events/useGridEvents.js +2 -0
  121. package/legacy/hooks/features/filter/useGridFilter.js +4 -4
  122. package/legacy/hooks/features/{keyboard → keyboardNavigation}/useGridKeyboardNavigation.js +27 -6
  123. package/legacy/hooks/features/pagination/useGridPage.js +11 -4
  124. package/legacy/hooks/features/pagination/useGridPageSize.js +3 -3
  125. package/legacy/hooks/features/preferencesPanel/useGridPreferencesPanel.js +18 -5
  126. package/legacy/hooks/features/rows/gridRowsUtils.js +13 -0
  127. package/legacy/hooks/features/rows/index.js +1 -1
  128. package/legacy/hooks/features/rows/useGridRows.js +5 -5
  129. package/legacy/hooks/features/rows/useGridRowsMeta.js +3 -3
  130. package/legacy/hooks/features/scroll/useGridScroll.js +4 -13
  131. package/legacy/hooks/features/selection/useGridSelection.js +74 -25
  132. package/legacy/hooks/features/selection/useGridSelectionPreProcessors.js +2 -2
  133. package/legacy/hooks/features/sorting/useGridSorting.js +3 -3
  134. package/legacy/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
  135. package/legacy/index.js +1 -1
  136. package/legacy/internals/index.js +2 -3
  137. package/legacy/locales/daDK.js +36 -32
  138. package/legacy/models/colDef/index.js +1 -2
  139. package/legacy/models/events/gridEvents.js +4 -2
  140. package/legacy/models/gridRows.js +1 -33
  141. package/legacy/models/index.js +2 -2
  142. package/{modern/hooks/core/preProcessing/gridPreProcessingApi.js → legacy/models/params/gridPreferencePanelParams.js} +0 -0
  143. package/legacy/models/params/index.js +2 -1
  144. package/locales/daDK.js +32 -32
  145. package/models/api/gridApiCommon.d.ts +2 -2
  146. package/models/api/gridEditingApi.d.ts +2 -2
  147. package/models/api/gridParamsApi.d.ts +5 -5
  148. package/models/api/gridRowApi.d.ts +2 -2
  149. package/models/colDef/gridColDef.d.ts +33 -28
  150. package/models/colDef/index.d.ts +0 -1
  151. package/models/colDef/index.js +1 -2
  152. package/models/events/gridEventLookup.d.ts +12 -6
  153. package/models/events/gridEvents.d.ts +11 -5
  154. package/models/events/gridEvents.js +4 -2
  155. package/models/gridCell.d.ts +1 -0
  156. package/models/gridEditRowModel.d.ts +1 -1
  157. package/models/gridFilterOperator.d.ts +3 -2
  158. package/models/gridRows.d.ts +10 -18
  159. package/models/gridRows.js +1 -31
  160. package/models/gridSlotsComponent.d.ts +5 -0
  161. package/models/gridSlotsComponentsProps.d.ts +1 -0
  162. package/models/gridSortModel.d.ts +3 -4
  163. package/models/index.d.ts +1 -1
  164. package/models/index.js +2 -2
  165. package/models/params/gridCellParams.d.ts +14 -14
  166. package/models/params/gridColumnHeaderParams.d.ts +3 -2
  167. package/models/params/gridEditCellParams.d.ts +2 -3
  168. package/models/params/gridPreferencePanelParams.d.ts +3 -0
  169. package/models/params/gridPreferencePanelParams.js +1 -0
  170. package/models/params/gridRowParams.d.ts +7 -8
  171. package/models/params/gridValueOptionsParams.d.ts +3 -3
  172. package/models/params/index.d.ts +1 -0
  173. package/models/params/index.js +2 -1
  174. package/models/props/DataGridProps.d.ts +36 -16
  175. package/modern/DataGrid/DataGrid.js +27 -4
  176. package/modern/DataGrid/useDataGridComponent.js +2 -4
  177. package/modern/colDef/gridDateColDef.js +2 -2
  178. package/modern/{models/colDef → colDef}/gridDefaultColumnTypes.js +6 -6
  179. package/modern/colDef/index.js +2 -1
  180. package/modern/components/GridRow.js +1 -1
  181. package/modern/components/cell/GridCell.js +2 -2
  182. package/modern/components/cell/GridEditInputCell.js +2 -2
  183. package/modern/components/cell/GridEditSingleSelectCell.js +2 -2
  184. package/modern/components/columnHeaders/{ColumnHeaderFilterIcon.js → GridColumnHeaderFilterIconButton.js} +22 -4
  185. package/modern/components/columnHeaders/GridColumnHeaderItem.js +3 -3
  186. package/modern/components/columnHeaders/index.js +1 -0
  187. package/modern/components/columnSelection/GridCellCheckboxRenderer.js +2 -2
  188. package/modern/components/containers/GridRoot.js +29 -17
  189. package/modern/components/menu/columnMenu/GridColumnMenu.js +1 -1
  190. package/modern/components/panel/GridPreferencesPanel.js +1 -1
  191. package/modern/constants/defaultGridSlotsComponents.js +2 -1
  192. package/modern/hooks/core/pipeProcessing/gridPipeProcessingApi.js +1 -0
  193. package/modern/hooks/core/pipeProcessing/index.js +3 -0
  194. package/modern/hooks/core/pipeProcessing/useGridPipeProcessing.js +74 -0
  195. package/modern/hooks/core/{preProcessing/useGridRegisterPreProcessor.js → pipeProcessing/useGridRegisterPipeProcessor.js} +2 -2
  196. package/modern/hooks/core/strategyProcessing/useGridStrategyProcessing.js +26 -15
  197. package/modern/hooks/core/useGridInitialization.js +2 -2
  198. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +1 -1
  199. package/modern/hooks/features/columns/gridColumnsUtils.js +49 -17
  200. package/modern/hooks/features/columns/useGridColumns.js +36 -27
  201. package/modern/hooks/features/dimensions/useGridDimensions.js +2 -1
  202. package/modern/hooks/features/editRows/useGridCellEditing.new.js +22 -7
  203. package/modern/hooks/features/editRows/useGridRowEditing.new.js +22 -7
  204. package/modern/hooks/features/events/useGridEvents.js +2 -0
  205. package/modern/hooks/features/filter/useGridFilter.js +4 -4
  206. package/modern/hooks/features/{keyboard → keyboardNavigation}/useGridKeyboardNavigation.js +27 -6
  207. package/modern/hooks/features/pagination/useGridPage.js +9 -4
  208. package/modern/hooks/features/pagination/useGridPageSize.js +3 -3
  209. package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +18 -5
  210. package/modern/hooks/features/rows/gridRowsUtils.js +11 -0
  211. package/modern/hooks/features/rows/index.js +1 -1
  212. package/modern/hooks/features/rows/useGridRows.js +1 -1
  213. package/modern/hooks/features/rows/useGridRowsMeta.js +3 -3
  214. package/modern/hooks/features/scroll/useGridScroll.js +4 -9
  215. package/modern/hooks/features/selection/useGridSelection.js +72 -25
  216. package/modern/hooks/features/selection/useGridSelectionPreProcessors.js +2 -2
  217. package/modern/hooks/features/sorting/useGridSorting.js +3 -3
  218. package/modern/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
  219. package/modern/index.js +1 -1
  220. package/modern/internals/index.js +2 -3
  221. package/modern/locales/daDK.js +32 -32
  222. package/modern/models/colDef/index.js +1 -2
  223. package/modern/models/events/gridEvents.js +4 -2
  224. package/modern/models/gridRows.js +1 -31
  225. package/modern/models/index.js +2 -2
  226. package/modern/models/params/gridPreferencePanelParams.js +1 -0
  227. package/modern/models/params/index.js +2 -1
  228. package/node/DataGrid/DataGrid.js +27 -4
  229. package/node/DataGrid/useDataGridComponent.js +2 -5
  230. package/node/colDef/gridDateColDef.js +2 -2
  231. package/node/{models/colDef → colDef}/gridDefaultColumnTypes.js +6 -6
  232. package/node/colDef/index.js +13 -0
  233. package/node/components/GridRow.js +1 -1
  234. package/node/components/cell/GridCell.js +2 -2
  235. package/node/components/cell/GridEditInputCell.js +2 -2
  236. package/node/components/cell/GridEditSingleSelectCell.js +2 -2
  237. package/node/components/columnHeaders/{ColumnHeaderFilterIcon.js → GridColumnHeaderFilterIconButton.js} +23 -5
  238. package/node/components/columnHeaders/GridColumnHeaderItem.js +5 -6
  239. package/node/components/columnHeaders/index.js +13 -0
  240. package/node/components/columnSelection/GridCellCheckboxRenderer.js +2 -2
  241. package/node/components/containers/GridRoot.js +28 -17
  242. package/node/components/menu/columnMenu/GridColumnMenu.js +1 -1
  243. package/node/components/panel/GridPreferencesPanel.js +1 -1
  244. package/node/constants/defaultGridSlotsComponents.js +1 -0
  245. package/node/hooks/core/{preProcessing/gridPreProcessingApi.js → pipeProcessing/gridPipeProcessingApi.js} +0 -0
  246. package/node/hooks/core/pipeProcessing/index.js +44 -0
  247. package/node/hooks/core/pipeProcessing/useGridPipeProcessing.js +93 -0
  248. package/node/hooks/core/{preProcessing/useGridRegisterPreProcessor.js → pipeProcessing/useGridRegisterPipeProcessor.js} +4 -4
  249. package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +26 -15
  250. package/node/hooks/core/useGridInitialization.js +2 -2
  251. package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +1 -1
  252. package/node/hooks/features/columns/gridColumnsUtils.js +54 -21
  253. package/node/hooks/features/columns/useGridColumns.js +36 -27
  254. package/node/hooks/features/dimensions/useGridDimensions.js +2 -1
  255. package/node/hooks/features/editRows/useGridCellEditing.new.js +24 -7
  256. package/node/hooks/features/editRows/useGridRowEditing.new.js +24 -7
  257. package/node/hooks/features/events/useGridEvents.js +2 -0
  258. package/node/hooks/features/filter/useGridFilter.js +4 -4
  259. package/node/hooks/features/{keyboard → keyboardNavigation}/useGridKeyboardNavigation.js +29 -6
  260. package/node/hooks/features/pagination/useGridPage.js +8 -3
  261. package/node/hooks/features/pagination/useGridPageSize.js +3 -3
  262. package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +20 -5
  263. package/node/hooks/features/rows/gridRowsUtils.js +18 -0
  264. package/node/hooks/features/rows/index.js +15 -1
  265. package/node/hooks/features/rows/useGridRows.js +5 -5
  266. package/node/hooks/features/rows/useGridRowsMeta.js +3 -3
  267. package/node/hooks/features/scroll/useGridScroll.js +3 -13
  268. package/node/hooks/features/selection/useGridSelection.js +71 -24
  269. package/node/hooks/features/selection/useGridSelectionPreProcessors.js +2 -2
  270. package/node/hooks/features/sorting/useGridSorting.js +3 -3
  271. package/node/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
  272. package/node/index.js +1 -1
  273. package/node/internals/index.js +4 -12
  274. package/node/locales/daDK.js +32 -32
  275. package/node/models/colDef/index.js +0 -13
  276. package/node/models/events/gridEvents.js +4 -2
  277. package/node/models/gridRows.js +1 -34
  278. package/node/models/index.js +13 -13
  279. package/node/models/params/gridPreferencePanelParams.js +5 -0
  280. package/node/models/params/index.js +13 -0
  281. package/package.json +1 -1
  282. package/components/columnHeaders/ColumnHeaderFilterIcon.d.ts +0 -5
  283. package/hooks/core/preProcessing/index.d.ts +0 -3
  284. package/hooks/core/preProcessing/index.js +0 -3
  285. package/hooks/core/preProcessing/useGridPreProcessing.d.ts +0 -6
  286. package/hooks/core/preProcessing/useGridPreProcessing.js +0 -53
  287. package/hooks/core/preProcessing/useGridRegisterPreProcessor.d.ts +0 -7
  288. package/hooks/features/keyboard/useGridKeyboard.d.ts +0 -10
  289. package/hooks/features/keyboard/useGridKeyboard.js +0 -70
  290. package/legacy/hooks/core/preProcessing/index.js +0 -3
  291. package/legacy/hooks/core/preProcessing/useGridPreProcessing.js +0 -62
  292. package/legacy/hooks/features/keyboard/useGridKeyboard.js +0 -70
  293. package/modern/hooks/core/preProcessing/index.js +0 -3
  294. package/modern/hooks/core/preProcessing/useGridPreProcessing.js +0 -53
  295. package/modern/hooks/features/keyboard/useGridKeyboard.js +0 -70
  296. package/node/hooks/core/preProcessing/index.js +0 -44
  297. package/node/hooks/core/preProcessing/useGridPreProcessing.js +0 -72
  298. package/node/hooks/features/keyboard/useGridKeyboard.js +0 -91
package/locales/daDK.js CHANGED
@@ -6,7 +6,7 @@ const daDKGrid = {
6
6
  noResultsOverlayLabel: 'Ingen resultater',
7
7
  errorOverlayDefaultLabel: 'Der skete en fejl.',
8
8
  // Density selector toolbar button text
9
- // toolbarDensity: 'Density',
9
+ toolbarDensity: 'Tæthed',
10
10
  toolbarDensityLabel: 'Tæthed',
11
11
  toolbarDensityCompact: 'Kompakt',
12
12
  toolbarDensityStandard: 'Standard',
@@ -15,7 +15,7 @@ const daDKGrid = {
15
15
  toolbarColumns: 'Kolonne',
16
16
  toolbarColumnsLabel: 'Vælg kolonne',
17
17
  // Filters toolbar button text
18
- // toolbarFilters: 'Filters',
18
+ toolbarFilters: 'Filtre',
19
19
  toolbarFiltersLabel: 'Vis filtre',
20
20
  toolbarFiltersTooltipHide: 'Skjul filtre',
21
21
  toolbarFiltersTooltipShow: 'Vis filtre',
@@ -24,7 +24,7 @@ const daDKGrid = {
24
24
  // toolbarExport: 'Export',
25
25
  toolbarExportLabel: 'Eksporter',
26
26
  toolbarExportCSV: 'Download som CSV',
27
- // toolbarExportPrint: 'Print',
27
+ toolbarExportPrint: 'Print',
28
28
  // Columns panel text
29
29
  columnsPanelTextFieldLabel: 'Find kolonne',
30
30
  columnsPanelTextFieldPlaceholder: 'Kolonne titel',
@@ -34,11 +34,11 @@ const daDKGrid = {
34
34
  // Filter panel text
35
35
  filterPanelAddFilter: 'Tilføj filter',
36
36
  filterPanelDeleteIconLabel: 'Slet',
37
- // filterPanelLinkOperator: 'Logic operator',
37
+ filterPanelLinkOperator: 'Logisk operator',
38
38
  filterPanelOperators: 'Operatorer',
39
39
  // TODO v6: rename to filterPanelOperator
40
- // filterPanelOperatorAnd: 'And',
41
- // filterPanelOperatorOr: 'Or',
40
+ filterPanelOperatorAnd: 'Og',
41
+ filterPanelOperatorOr: 'Eller',
42
42
  filterPanelColumns: 'Kolonne',
43
43
  filterPanelInputLabel: 'Værdi',
44
44
  filterPanelInputPlaceholder: 'Filter værdi',
@@ -47,46 +47,46 @@ const daDKGrid = {
47
47
  filterOperatorEquals: 'Lig med',
48
48
  filterOperatorStartsWith: 'Begynder med',
49
49
  filterOperatorEndsWith: 'Ender med',
50
- filterOperatorIs: '',
51
- filterOperatorNot: 'Ikke ',
50
+ filterOperatorIs: 'Er lig med',
51
+ filterOperatorNot: 'Er ikke lig med',
52
52
  filterOperatorAfter: 'Efter',
53
53
  filterOperatorOnOrAfter: 'På eller efter',
54
54
  filterOperatorBefore: 'Før',
55
55
  filterOperatorOnOrBefore: 'På eller før',
56
- filterOperatorIsEmpty: 'Indeholder data',
57
- filterOperatorIsNotEmpty: 'Indeholder ikke data',
58
- // filterOperatorIsAnyOf: 'is any of',
56
+ filterOperatorIsEmpty: 'Indeholder ikke data',
57
+ filterOperatorIsNotEmpty: 'Indeholder data',
58
+ filterOperatorIsAnyOf: 'indeholder en af',
59
59
  // Filter values text
60
- // filterValueAny: 'any',
61
- // filterValueTrue: 'true',
62
- // filterValueFalse: 'false',
60
+ filterValueAny: 'hvilken som helst',
61
+ filterValueTrue: 'positiv',
62
+ filterValueFalse: 'negativ',
63
63
  // Column menu text
64
- // columnMenuLabel: 'Menu',
64
+ columnMenuLabel: 'Menu',
65
65
  columnMenuShowColumns: 'Vis Kolonner',
66
- // columnMenuFilter: 'Filter',
66
+ columnMenuFilter: 'Filtre',
67
67
  columnMenuHideColumn: 'Skjul',
68
68
  columnMenuUnsort: 'Fjern sortering',
69
69
  columnMenuSortAsc: 'Sorter stigende',
70
70
  columnMenuSortDesc: 'Sorter faldende',
71
71
  // Column header text
72
- columnHeaderFiltersTooltipActive: count => count !== 1 ? `${count} aktive filtre` : `${count} aktivt filter`,
72
+ columnHeaderFiltersTooltipActive: count => count !== 1 ? `${count} aktive filtre` : `Ét aktivt filter`,
73
73
  columnHeaderFiltersLabel: 'Vis filtre',
74
74
  columnHeaderSortIconLabel: 'Sorter',
75
75
  // Rows selected footer text
76
- footerRowSelected: count => count !== 1 ? `${count.toLocaleString()} rækker valgt` : `${count.toLocaleString()} række valgt`,
76
+ footerRowSelected: count => count !== 1 ? `${count.toLocaleString()} rækker valgt` : `Én række valgt`,
77
77
  // Total row amount footer text
78
- footerTotalRows: 'Totale rækker:',
78
+ footerTotalRows: 'Antal rækker i alt:',
79
79
  // Total visible row amount footer text
80
80
  footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} af ${totalCount.toLocaleString()}`,
81
81
  // Checkbox selection text
82
82
  checkboxSelectionHeaderName: 'Afkrydsningsvalg',
83
- // checkboxSelectionSelectAllRows: 'Select all rows',
84
- // checkboxSelectionUnselectAllRows: 'Unselect all rows',
85
- // checkboxSelectionSelectRow: 'Select row',
86
- // checkboxSelectionUnselectRow: 'Unselect row',
83
+ checkboxSelectionSelectAllRows: 'Vælg alle rækker',
84
+ checkboxSelectionUnselectAllRows: 'Fravælg alle rækker',
85
+ checkboxSelectionSelectRow: 'Vælg række',
86
+ checkboxSelectionUnselectRow: 'Fravælg række',
87
87
  // Boolean cell text
88
- // booleanCellTrueLabel: 'yes',
89
- // booleanCellFalseLabel: 'no',
88
+ booleanCellTrueLabel: 'ja',
89
+ booleanCellFalseLabel: 'nej',
90
90
  // Actions cell more text
91
91
  actionsCellMore: 'mere',
92
92
  // Column pinning text
@@ -96,13 +96,13 @@ const daDKGrid = {
96
96
  // Tree Data
97
97
  treeDataGroupingHeaderName: 'Gruppering',
98
98
  treeDataExpand: 'Vis underelementer',
99
- treeDataCollapse: 'Skjul underelementer' // Grouping columns
100
- // groupingColumnHeaderName: 'Group',
101
- // groupColumn: name => `Group by ${name}`,
102
- // unGroupColumn: name => `Stop grouping by ${name}`,
99
+ treeDataCollapse: 'Skjul underelementer',
100
+ // Grouping columns
101
+ groupingColumnHeaderName: 'Gruppér',
102
+ groupColumn: name => `Gruppér efter ${name}`,
103
+ unGroupColumn: name => `Fjern gruppéring efter ${name}`,
103
104
  // Master/detail
104
- // expandDetailPanel: 'Expand',
105
- // collapseDetailPanel: 'Collapse',
106
-
105
+ expandDetailPanel: 'Udvid',
106
+ collapseDetailPanel: 'Kollaps'
107
107
  };
108
108
  export const daDK = getGridLocalization(daDKGrid, daDKCore);
@@ -20,7 +20,7 @@ import { GridStateApi } from './gridStateApi';
20
20
  import { GridLoggerApi } from './gridLoggerApi';
21
21
  import { GridScrollApi } from './gridScrollApi';
22
22
  import { GridVirtualScrollerApi } from './gridVirtualScrollerApi';
23
- import type { GridPreProcessingApi } from '../../hooks/core/preProcessing';
23
+ import type { GridPipeProcessingApi } from '../../hooks/core/pipeProcessing';
24
24
  import type { GridStrategyProcessingApi } from '../../hooks/core/strategyProcessing';
25
25
  import type { GridDimensionsApi } from '../../hooks/features/dimensions';
26
26
  import type { GridPaginationApi } from '../../hooks/features/pagination';
@@ -28,6 +28,6 @@ import type { GridStatePersistenceApi } from '../../hooks/features/statePersiste
28
28
  declare type GridStateApiUntyped = {
29
29
  [key in keyof (GridStateApi<any> & GridStatePersistenceApi<any>)]: any;
30
30
  };
31
- export interface GridApiCommon extends GridCoreApi, GridLoggerApi, GridPreProcessingApi, GridStrategyProcessingApi, GridDensityApi, GridDimensionsApi, GridRowApi, GridRowsMetaApi, GridEditingApi, GridParamsApi, GridColumnApi, GridSelectionApi, GridSortApi, GridPaginationApi, GridCsvExportApi, GridFocusApi, GridFilterApi, GridColumnMenuApi, GridPreferencesPanelApi, GridPrintExportApi, GridDisableVirtualizationApi, GridVirtualScrollerApi, GridLocaleTextApi, GridClipboardApi, GridScrollApi, GridStateApiUntyped {
31
+ export interface GridApiCommon extends GridCoreApi, GridLoggerApi, GridPipeProcessingApi, GridStrategyProcessingApi, GridDensityApi, GridDimensionsApi, GridRowApi, GridRowsMetaApi, GridEditingApi, GridParamsApi, GridColumnApi, GridSelectionApi, GridSortApi, GridPaginationApi, GridCsvExportApi, GridFocusApi, GridFilterApi, GridColumnMenuApi, GridPreferencesPanelApi, GridPrintExportApi, GridDisableVirtualizationApi, GridVirtualScrollerApi, GridLocaleTextApi, GridClipboardApi, GridScrollApi, GridStateApiUntyped {
32
32
  }
33
33
  export {};
@@ -1,4 +1,4 @@
1
- import { GridCellMode, GridRowMode, GridCellValue } from '../gridCell';
1
+ import { GridCellMode, GridRowMode } from '../gridCell';
2
2
  import { GridEditRowsModel, GridEditCellProps } from '../gridEditRowModel';
3
3
  import { GridRowId } from '../gridRows';
4
4
  import { GridCellParams } from '../params/gridCellParams';
@@ -46,7 +46,7 @@ export interface GridEditingSharedApi {
46
46
  /**
47
47
  * @ignore - do not document.
48
48
  */
49
- unstable_parseValue: (id: GridRowId, field: string, value: GridCellValue) => GridCellValue;
49
+ unstable_parseValue: (id: GridRowId, field: string, value: any) => any;
50
50
  }
51
51
  /**
52
52
  * The row editing API interface.
@@ -1,16 +1,16 @@
1
- import { GridCellValue } from '../gridCell';
2
- import { GridRowId } from '../gridRows';
1
+ import { GridValidRowModel, GridRowId } from '../gridRows';
3
2
  import { GridCellParams } from '../params/gridCellParams';
4
3
  import { GridColumnHeaderParams } from '../params/gridColumnHeaderParams';
5
4
  import { GridRowParams } from '../params/gridRowParams';
6
5
  export interface GridParamsApi {
7
6
  /**
8
7
  * Gets the value of a cell at the given `id` and `field`.
8
+ * @template V
9
9
  * @param {GridRowId} id The id of the row.
10
10
  * @param {string} field The column field.
11
- * @returns {GridCellValue} The cell value.
11
+ * @returns {v} The cell value.
12
12
  */
13
- getCellValue: (id: GridRowId, field: string) => GridCellValue;
13
+ getCellValue: <V extends any = any>(id: GridRowId, field: string) => V;
14
14
  /**
15
15
  * Gets the underlying DOM element for a cell at the given `id` and `field`.
16
16
  * @param {GridRowId} id The id of the row.
@@ -24,7 +24,7 @@ export interface GridParamsApi {
24
24
  * @param {string} field The column field.
25
25
  * @returns {GridCellParams} The cell params.
26
26
  */
27
- getCellParams: <V = any, R = any, F = V>(id: GridRowId, field: string) => GridCellParams<V, R, F>;
27
+ getCellParams: <V = any, R extends GridValidRowModel = any, F = V>(id: GridRowId, field: string) => GridCellParams<R, V, F>;
28
28
  /**
29
29
  * Gets the [[GridRowParams]] object that is passed as argument in events.
30
30
  * @param {GridRowId} id The id of the row.
@@ -1,4 +1,4 @@
1
- import { GridRowModel, GridRowId, GridRowModelUpdate, GridRowTreeNodeConfig } from '../gridRows';
1
+ import { GridRowModel, GridRowId, GridRowModelUpdate, GridRowTreeNodeConfig, GridValidRowModel } from '../gridRows';
2
2
  /**
3
3
  * The Row API interface that is available in the grid `apiRef`.
4
4
  */
@@ -33,7 +33,7 @@ export interface GridRowApi {
33
33
  * @param {GridRowId} id The id of the row.
34
34
  * @returns {GridRowModel} The row data.
35
35
  */
36
- getRow: (id: GridRowId) => GridRowModel | null;
36
+ getRow: <R extends GridValidRowModel = any>(id: GridRowId) => R | null;
37
37
  /**
38
38
  * Gets the row node from the internal tree structure.
39
39
  * @param {GridRowId} id The id of the row.
@@ -1,5 +1,4 @@
1
1
  import * as React from 'react';
2
- import { GridCellValue } from '../gridCell';
3
2
  import { GridCellClassNamePropType } from '../gridCellClass';
4
3
  import { GridColumnHeaderClassNamePropType } from '../gridColumnHeaderClass';
5
4
  import { GridFilterOperator } from '../gridFilterOperator';
@@ -10,8 +9,8 @@ import { GridColType, GridNativeColTypes } from './gridColType';
10
9
  import { GridRowParams } from '../params/gridRowParams';
11
10
  import { GridValueOptionsParams } from '../params/gridValueOptionsParams';
12
11
  import { GridActionsCellItemProps } from '../../components/cell/GridActionsCellItem';
13
- import { GridRowModel } from '../gridRows';
14
12
  import { GridEditCellProps } from '../gridEditRowModel';
13
+ import type { GridValidRowModel } from '../gridRows';
15
14
  /**
16
15
  * Alignment used in position elements in Cells.
17
16
  */
@@ -27,7 +26,7 @@ export declare type GridKeyValue = string | number | boolean;
27
26
  /**
28
27
  * Column Definition interface.
29
28
  */
30
- export interface GridColDef {
29
+ export interface GridColDef<R extends GridValidRowModel = any, V = any, F = V> {
31
30
  /**
32
31
  * The column identifier. It's used to map with [[GridRowModel]] values.
33
32
  */
@@ -103,7 +102,7 @@ export interface GridColDef {
103
102
  /**
104
103
  * A comparator function used to sort rows.
105
104
  */
106
- sortComparator?: GridComparatorFn;
105
+ sortComparator?: GridComparatorFn<V>;
107
106
  /**
108
107
  * Type allows to merge this object with a default definition [[GridColDef]].
109
108
  * @default 'string'
@@ -112,53 +111,58 @@ export interface GridColDef {
112
111
  /**
113
112
  * To be used in combination with `type: 'singleSelect'`. This is an array (or a function returning an array) of the possible cell values and labels.
114
113
  */
115
- valueOptions?: Array<ValueOptions> | ((params: GridValueOptionsParams) => Array<ValueOptions>);
114
+ valueOptions?: Array<ValueOptions> | ((params: GridValueOptionsParams<R>) => Array<ValueOptions>);
116
115
  /**
117
116
  * Allows to align the column values in cells.
118
117
  */
119
118
  align?: GridAlignment;
120
119
  /**
121
120
  * Function that allows to get a specific data instead of field to render in the cell.
122
- * @param {GridValueGetterParams} params Object containing parameters for the getter.
123
- * @returns {GridCellValue} The cell value.
121
+ * @template R, V
122
+ * @param {GridValueGetterParams<any, R>} params Object containing parameters for the getter.
123
+ * @returns {V} The cell value.
124
124
  */
125
- valueGetter?: (params: GridValueGetterParams) => GridCellValue;
125
+ valueGetter?: (params: GridValueGetterParams<any, R>) => V;
126
126
  /**
127
127
  * Function that allows to customize how the entered value is stored in the row.
128
128
  * It only works with cell/row editing.
129
- * @param {GridValueSetterParams} params Object containing parameters for the setter.
130
- * @returns {GridRowModel} The row with the updated field.
129
+ * @template R, V
130
+ * @param {GridValueSetterParams<R, V>} params Object containing parameters for the setter.
131
+ * @returns {R} The row with the updated field.
131
132
  */
132
- valueSetter?: (params: GridValueSetterParams) => GridRowModel;
133
+ valueSetter?: (params: GridValueSetterParams<R, V>) => R;
133
134
  /**
134
135
  * Function that allows to apply a formatter before rendering its value.
135
- * @param {GridValueFormatterParams} params Object containing parameters for the formatter.
136
- * @returns {GridCellValue} The formatted value.
136
+ * @template V, F
137
+ * @param {GridValueFormatterParams<V>} params Object containing parameters for the formatter.
138
+ * @returns {F} The formatted value.
137
139
  */
138
- valueFormatter?: (params: GridValueFormatterParams) => GridCellValue;
140
+ valueFormatter?: (params: GridValueFormatterParams<V>) => F;
139
141
  /**
140
142
  * Function that takes the user-entered value and converts it to a value used internally.
141
- * @param {GridCellValue} value The user-entered value.
142
- * @param {GridCellParams} params The params when called before saving the value.
143
- * @returns {GridCellValue} The converted value to use internally.
143
+ * @template R, V, F
144
+ * @param {F | undefined} value The user-entered value.
145
+ * @param {GridCellParams<V, R, F>} params The params when called before saving the value.
146
+ * @returns {V} The converted value to use internally.
144
147
  */
145
- valueParser?: (value: GridCellValue, params?: GridCellParams) => GridCellValue;
148
+ valueParser?: (value: F | undefined, params?: GridCellParams<V, R, F>) => V;
146
149
  /**
147
150
  * Class name that will be added in cells for that column.
148
151
  */
149
152
  cellClassName?: GridCellClassNamePropType;
150
153
  /**
151
154
  * Allows to override the component rendered as cell for this column.
152
- * @param {GridRenderCellParams} params Object containing parameters for the renderer.
155
+ * @template R, V, F
156
+ * @param {GridRenderCellParams<V, R, F>} params Object containing parameters for the renderer.
153
157
  * @returns {React.ReactNode} The element to be rendered.
154
158
  */
155
- renderCell?: (params: GridRenderCellParams) => React.ReactNode;
159
+ renderCell?: (params: GridRenderCellParams<V, R, F>) => React.ReactNode;
156
160
  /**
157
161
  * Allows to override the component rendered in edit cell mode for this column.
158
162
  * @param {GridRenderEditCellParams} params Object containing parameters for the renderer.
159
163
  * @returns {React.ReactNode} The element to be rendered.
160
164
  */
161
- renderEditCell?: (params: GridRenderEditCellParams) => React.ReactNode;
165
+ renderEditCell?: (params: GridRenderEditCellParams<V>) => React.ReactNode;
162
166
  /**
163
167
  * Callback fired when the edit props of the cell changes.
164
168
  * It allows to process the props that saved into the state.
@@ -172,10 +176,11 @@ export interface GridColDef {
172
176
  headerClassName?: GridColumnHeaderClassNamePropType;
173
177
  /**
174
178
  * Allows to render a component in the column header cell.
175
- * @param {GridColumnHeaderParams} params Object containing parameters for the renderer.
179
+ * @template V, R, F
180
+ * @param {GridColumnHeaderParams<V, R, F>} params Object containing parameters for the renderer.
176
181
  * @returns {React.ReactNode} The element to be rendered.
177
182
  */
178
- renderHeader?: (params: GridColumnHeaderParams) => React.ReactNode;
183
+ renderHeader?: (params: GridColumnHeaderParams<V, R, F>) => React.ReactNode;
179
184
  /**
180
185
  * Header cell element alignment.
181
186
  */
@@ -198,7 +203,7 @@ export interface GridColDef {
198
203
  /**
199
204
  * Allows setting the filter operators for this column.
200
205
  */
201
- filterOperators?: GridFilterOperator[];
206
+ filterOperators?: GridFilterOperator<R, V, F>[];
202
207
  /**
203
208
  * If `true`, this column cannot be reordered.
204
209
  * @default false
@@ -223,12 +228,12 @@ export interface GridActionsColDef extends GridColDef {
223
228
  */
224
229
  getActions: (params: GridRowParams) => React.ReactElement<GridActionsCellItemProps>[];
225
230
  }
226
- export declare type GridEnrichedColDef = GridColDef | GridActionsColDef;
227
- export declare type GridColumns = GridEnrichedColDef[];
228
- export declare type GridColTypeDef = Omit<GridColDef, 'field'> & {
231
+ export declare type GridEnrichedColDef<R extends GridValidRowModel = any, V = any, F = V> = GridColDef<R, V, F> | GridActionsColDef;
232
+ export declare type GridColumns<R extends GridValidRowModel = any> = GridEnrichedColDef<R>[];
233
+ export declare type GridColTypeDef<V = any, F = V> = Omit<GridColDef<V, any, F>, 'field'> & {
229
234
  extendType?: GridNativeColTypes;
230
235
  };
231
- export declare type GridStateColDef = GridEnrichedColDef & {
236
+ export declare type GridStateColDef<R extends GridValidRowModel = any, V = any, F = V> = GridEnrichedColDef<R, V, F> & {
232
237
  computedWidth: number;
233
238
  /**
234
239
  * If `true`, it means that at least one of the dimension's property of this column has been modified since the last time the column prop has changed.
@@ -1,4 +1,3 @@
1
1
  export * from './gridColDef';
2
2
  export * from './gridColType';
3
3
  export * from './gridColumnTypesRecord';
4
- export * from './gridDefaultColumnTypes';
@@ -2,5 +2,4 @@
2
2
  export * from './gridColDef'; // Other types
3
3
 
4
4
  export * from './gridColType';
5
- export * from './gridColumnTypesRecord';
6
- export * from './gridDefaultColumnTypes';
5
+ export * from './gridColumnTypesRecord';
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import type { GridCellEditCommitParams, GridColumnHeaderParams, GridColumnOrderChangeParams, GridColumnResizeParams, GridColumnVisibilityChangeParams, GridEditCellPropsParams, GridHeaderSelectionCheckboxParams, GridRowParams, GridRowSelectionCheckboxParams, GridScrollParams } from '../params';
2
+ import type { GridCellEditCommitParams, GridColumnHeaderParams, GridColumnOrderChangeParams, GridColumnResizeParams, GridColumnVisibilityChangeParams, GridEditCellPropsParams, GridHeaderSelectionCheckboxParams, GridPreferencePanelParams, GridRowParams, GridRowSelectionCheckboxParams, GridScrollParams } from '../params';
3
3
  import { GridCellEditStartParams, GridCellEditStopParams } from '../params/gridEditCellParams';
4
4
  import { GridCellParams } from '../params/gridCellParams';
5
5
  import type { GridFilterModel } from '../gridFilterModel';
@@ -9,7 +9,7 @@ import type { GridSelectionModel } from '../gridSelectionModel';
9
9
  import type { ElementSize } from '../elementSize';
10
10
  import type { MuiBaseEvent } from '../muiEvent';
11
11
  import type { GridRowId, GridRowTreeNodeConfig } from '../gridRows';
12
- import type { GridPreProcessingGroup } from '../../hooks/core/preProcessing';
12
+ import type { GridPipeProcessorGroup } from '../../hooks/core/pipeProcessing';
13
13
  import type { GridColumnVisibilityModel } from '../../hooks/features/columns';
14
14
  import type { GridStrategyProcessorName } from '../../hooks/core/strategyProcessing';
15
15
  import { GridRowEditStartParams, GridRowEditStopParams } from '../params/gridRowParams';
@@ -162,11 +162,11 @@ export interface GridEventLookup extends GridRowEventLookup, GridColumnHeaderEve
162
162
  debouncedResize: {
163
163
  params: ElementSize;
164
164
  };
165
- preProcessorRegister: {
166
- params: GridPreProcessingGroup;
165
+ pipeProcessorRegister: {
166
+ params: GridPipeProcessorGroup;
167
167
  };
168
- preProcessorUnregister: {
169
- params: GridPreProcessingGroup;
168
+ pipeProcessorUnregister: {
169
+ params: GridPipeProcessorGroup;
170
170
  };
171
171
  activeStrategyProcessorChange: {
172
172
  params: GridStrategyProcessorName;
@@ -261,4 +261,10 @@ export interface GridEventLookup extends GridRowEventLookup, GridColumnHeaderEve
261
261
  params: GridRowSelectionCheckboxParams;
262
262
  event: React.ChangeEvent<HTMLElement>;
263
263
  };
264
+ preferencePanelClose: {
265
+ params: GridPreferencePanelParams;
266
+ };
267
+ preferencePanelOpen: {
268
+ params: GridPreferencePanelParams;
269
+ };
264
270
  }
@@ -275,16 +275,14 @@ declare enum GridEvents {
275
275
  pinnedColumnsChange = "pinnedColumnsChange",
276
276
  /**
277
277
  * Fired when a pre-processor is registered.
278
- * TODO: Rename `pipeProcessorRegister`
279
278
  * @ignore - do not document.
280
279
  */
281
- preProcessorRegister = "preProcessorRegister",
280
+ pipeProcessorRegister = "pipeProcessorRegister",
282
281
  /**
283
282
  * Fired when a pre-processor is unregistered.
284
- * TODO: Rename `pipeProcessorUnregister`
285
283
  * @ignore - do not document.
286
284
  */
287
- preProcessorUnregister = "preProcessorUnregister",
285
+ pipeProcessorUnregister = "pipeProcessorUnregister",
288
286
  /**
289
287
  * Fired when a processor of the active strategy changes.
290
288
  * @ignore - do not document.
@@ -322,7 +320,15 @@ declare enum GridEvents {
322
320
  * Fired when the content size used by the `GridVirtualScroller` changes.
323
321
  * @ignore - do not document.
324
322
  */
325
- virtualScrollerContentSizeChange = "virtualScrollerContentSizeChange"
323
+ virtualScrollerContentSizeChange = "virtualScrollerContentSizeChange",
324
+ /**
325
+ * Fired when the preferences panel is closed.
326
+ */
327
+ preferencePanelClose = "preferencePanelClose",
328
+ /**
329
+ * Fired when the preferences panel is opened.
330
+ */
331
+ preferencePanelOpen = "preferencePanelOpen"
326
332
  }
327
333
  export declare type GridEventsStr = keyof GridEventLookup;
328
334
  export { GridEvents };
@@ -63,8 +63,8 @@ var GridEvents;
63
63
  GridEvents["columnsChange"] = "columnsChange";
64
64
  GridEvents["detailPanelsExpandedRowIdsChange"] = "detailPanelsExpandedRowIdsChange";
65
65
  GridEvents["pinnedColumnsChange"] = "pinnedColumnsChange";
66
- GridEvents["preProcessorRegister"] = "preProcessorRegister";
67
- GridEvents["preProcessorUnregister"] = "preProcessorUnregister";
66
+ GridEvents["pipeProcessorRegister"] = "pipeProcessorRegister";
67
+ GridEvents["pipeProcessorUnregister"] = "pipeProcessorUnregister";
68
68
  GridEvents["activeStrategyProcessorChange"] = "activeStrategyProcessorChange";
69
69
  GridEvents["strategyAvailabilityChange"] = "strategyAvailabilityChange";
70
70
  GridEvents["sortModelChange"] = "sortModelChange";
@@ -73,6 +73,8 @@ var GridEvents;
73
73
  GridEvents["stateChange"] = "stateChange";
74
74
  GridEvents["columnVisibilityChange"] = "columnVisibilityChange";
75
75
  GridEvents["virtualScrollerContentSizeChange"] = "virtualScrollerContentSizeChange";
76
+ GridEvents["preferencePanelClose"] = "preferencePanelClose";
77
+ GridEvents["preferencePanelOpen"] = "preferencePanelOpen";
76
78
  })(GridEvents || (GridEvents = {}));
77
79
 
78
80
  export { GridEvents };
@@ -8,6 +8,7 @@ export declare type GridCellMode = 'edit' | 'view';
8
8
  export declare type GridRowMode = 'edit' | 'view';
9
9
  /**
10
10
  * The cell value type.
11
+ * @deprecated Use `any` or the V generic passed to most interfaces.
11
12
  */
12
13
  export declare type GridCellValue = string | number | boolean | Date | null | undefined | object;
13
14
  /**
@@ -1,5 +1,5 @@
1
1
  export interface GridEditCellProps<V = any> {
2
- value: V;
2
+ value: V | undefined;
3
3
  isValidating?: boolean;
4
4
  isProcessingProps?: boolean;
5
5
  [prop: string]: any;
@@ -5,10 +5,11 @@ import { GridFilterInputMultipleSingleSelectProps } from '../components/panel/fi
5
5
  import { GridFilterItem } from './gridFilterItem';
6
6
  import { GridCellParams } from './params/gridCellParams';
7
7
  import type { GridStateColDef } from './colDef/gridColDef';
8
+ import type { GridValidRowModel } from './gridRows';
8
9
  /**
9
10
  * Filter operator definition interface.
10
11
  */
11
- export interface GridFilterOperator {
12
+ export interface GridFilterOperator<R extends GridValidRowModel = any, V = any, F = V> {
12
13
  /**
13
14
  * The label of the filter operator.
14
15
  */
@@ -25,7 +26,7 @@ export interface GridFilterOperator {
25
26
  * @param {GridStateColDef} column The column from which we want to filter the rows.
26
27
  * @returns {null | ((params: GridCellParams) => boolean)} The function to call to check if a row poss this filter item or not.
27
28
  */
28
- getApplyFilterFn: (filterItem: GridFilterItem, column: GridStateColDef) => null | ((params: GridCellParams) => boolean);
29
+ getApplyFilterFn: (filterItem: GridFilterItem, column: GridStateColDef<R, V, F>) => null | ((params: GridCellParams<V, R, F>) => boolean);
29
30
  /**
30
31
  * The input component to render in the filter panel for this filter operator.
31
32
  */
@@ -1,17 +1,16 @@
1
1
  import type { GridKeyValue } from './colDef/gridColDef';
2
- export declare type GridRowsProp = Readonly<GridRowModel[]>;
2
+ export declare type GridValidRowModel = {
3
+ [key: string]: any;
4
+ };
5
+ export declare type GridRowsProp<R = any> = Readonly<GridRowModel<R>[]>;
3
6
  /**
4
7
  * @deprecated prefer GridRowModel.
5
8
  */
6
- export declare type GridRowData<T = {
7
- [key: string]: any;
8
- }> = T;
9
+ export declare type GridRowData = GridValidRowModel;
9
10
  /**
10
11
  * The key value object representing the data of a row.
11
12
  */
12
- export declare type GridRowModel<T = {
13
- [key: string]: any;
14
- }> = T;
13
+ export declare type GridRowModel<R extends GridValidRowModel = any> = R;
15
14
  export declare type GridUpdateAction = 'delete';
16
15
  export interface GridRowModelUpdate extends GridRowModel {
17
16
  _action?: GridUpdateAction;
@@ -68,12 +67,12 @@ export interface GridRowsMeta {
68
67
  positions: number[];
69
68
  }
70
69
  export declare type GridRowTreeConfig = Record<GridRowId, GridRowTreeNodeConfig>;
71
- export declare type GridRowsLookup = Record<GridRowId, GridRowModel>;
70
+ export declare type GridRowsLookup<R extends GridValidRowModel = any> = Record<GridRowId, R>;
72
71
  /**
73
72
  * The type of Id supported by the grid.
74
73
  */
75
74
  export declare type GridRowId = string | number;
76
- export interface GridRowEntry {
75
+ export interface GridRowEntry<R extends GridValidRowModel = any> {
77
76
  /**
78
77
  * The row id.
79
78
  */
@@ -81,16 +80,9 @@ export interface GridRowEntry {
81
80
  /**
82
81
  * The row model.
83
82
  */
84
- model: GridRowModel;
83
+ model: R;
85
84
  }
86
85
  /**
87
86
  * The function to retrieve the id of a [[GridRowModel]].
88
87
  */
89
- export declare type GridRowIdGetter = (row: GridRowModel) => GridRowId;
90
- /**
91
- * An helper function to check if the id provided is valid.
92
- * @param {GridRowId} id Id as [[GridRowId]].
93
- * @param {GridRowModel | Partial<GridRowModel>} row Row as [[GridRowModel]].
94
- * @param {string} detailErrorMessage A custom error message to display for invalid IDs
95
- */
96
- export declare function checkGridRowIdIsValid(id: GridRowId, row: GridRowModel | Partial<GridRowModel>, detailErrorMessage?: string): void;
88
+ export declare type GridRowIdGetter<R extends GridValidRowModel = any> = (row: R) => GridRowId;
@@ -1,31 +1 @@
1
- /**
2
- * @deprecated prefer GridRowModel.
3
- */
4
-
5
- /**
6
- * The key value object representing the data of a row.
7
- */
8
-
9
- /**
10
- * The grid rows total height and row positions.
11
- */
12
-
13
- /**
14
- * The type of Id supported by the grid.
15
- */
16
-
17
- /**
18
- * The function to retrieve the id of a [[GridRowModel]].
19
- */
20
-
21
- /**
22
- * An helper function to check if the id provided is valid.
23
- * @param {GridRowId} id Id as [[GridRowId]].
24
- * @param {GridRowModel | Partial<GridRowModel>} row Row as [[GridRowModel]].
25
- * @param {string} detailErrorMessage A custom error message to display for invalid IDs
26
- */
27
- export function checkGridRowIdIsValid(id, row, detailErrorMessage = 'A row was provided without id in the rows prop:') {
28
- if (id == null) {
29
- throw new Error(['MUI: The data grid component requires all rows to have a unique `id` property.', 'Alternatively, you can use the `getRowId` prop to specify a custom id for each row.', detailErrorMessage, JSON.stringify(row)].join('\n'));
30
- }
31
- }
1
+ export {};
@@ -50,6 +50,11 @@ export interface GridSlotsComponent extends GridIconSlotsComponent {
50
50
  * @default GridCell
51
51
  */
52
52
  Cell: React.JSXElementConstructor<any>;
53
+ /**
54
+ * Filter icon component rendered in each column header.
55
+ * @default GridColumnHeaderFilterIconButton
56
+ */
57
+ ColumnHeaderFilterIconButton: React.JSXElementConstructor<any>;
53
58
  /**
54
59
  * Column menu component rendered by clicking on the 3 dots "kebab" icon in column headers.
55
60
  * @default GridColumnMenu
@@ -11,6 +11,7 @@ export interface GridSlotsComponentsProps {
11
11
  basePopper?: any;
12
12
  baseTooltip?: any;
13
13
  cell?: any;
14
+ columnHeaderFilterIconButton?: any;
14
15
  columnMenu?: any;
15
16
  columnsPanel?: any;
16
17
  errorOverlay?: any;