@mui/x-data-grid 8.0.0-alpha.0 → 8.0.0-alpha.2

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 (216) hide show
  1. package/CHANGELOG.md +651 -6
  2. package/DataGrid/DataGrid.js +9 -9
  3. package/README.md +2 -2
  4. package/components/GridLoadingOverlay.d.ts +2 -2
  5. package/components/GridLoadingOverlay.js +4 -4
  6. package/components/GridPagination.js +2 -1
  7. package/components/base/GridOverlays.d.ts +4 -3
  8. package/components/base/GridOverlays.js +2 -24
  9. package/components/base/index.d.ts +0 -1
  10. package/components/base/index.js +1 -2
  11. package/components/cell/GridCell.js +10 -10
  12. package/components/columnSelection/GridCellCheckboxRenderer.js +2 -3
  13. package/components/columnSelection/GridHeaderCheckbox.js +2 -3
  14. package/components/columnsManagement/GridColumnsManagement.d.ts +2 -0
  15. package/components/columnsManagement/GridColumnsManagement.js +53 -6
  16. package/components/toolbar/GridToolbarColumnsButton.js +3 -4
  17. package/components/toolbar/GridToolbarDensitySelector.js +3 -4
  18. package/components/toolbar/GridToolbarExportContainer.js +3 -4
  19. package/components/toolbar/GridToolbarFilterButton.d.ts +2 -0
  20. package/components/toolbar/GridToolbarFilterButton.js +7 -6
  21. package/components/toolbar/GridToolbarQuickFilter.js +1 -0
  22. package/components/virtualization/GridVirtualScroller.js +5 -3
  23. package/constants/dataGridPropsDefaultValues.js +2 -3
  24. package/constants/gridClasses.d.ts +24 -0
  25. package/constants/gridClasses.js +1 -1
  26. package/constants/localeTextConstants.js +11 -0
  27. package/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
  28. package/hooks/features/dimensions/gridDimensionsApi.d.ts +0 -4
  29. package/hooks/features/dimensions/useGridDimensions.js +3 -19
  30. package/hooks/features/index.d.ts +1 -0
  31. package/hooks/features/index.js +1 -0
  32. package/hooks/features/listView/gridListViewSelectors.d.ts +3 -1
  33. package/hooks/features/listView/gridListViewSelectors.js +3 -1
  34. package/hooks/features/listView/index.d.ts +1 -0
  35. package/hooks/features/listView/index.js +1 -0
  36. package/hooks/features/overlays/useGridOverlays.d.ts +7 -4
  37. package/hooks/features/overlays/useGridOverlays.js +19 -1
  38. package/hooks/features/rowSelection/useGridRowSelection.js +0 -9
  39. package/hooks/features/rowSelection/utils.js +2 -2
  40. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +1 -1
  41. package/hooks/features/virtualization/useGridVirtualScroller.js +55 -15
  42. package/index.js +1 -1
  43. package/internals/index.d.ts +1 -0
  44. package/internals/index.js +1 -0
  45. package/joy/joySlots.js +7 -2
  46. package/locales/arSD.js +12 -0
  47. package/locales/beBY.js +12 -0
  48. package/locales/bgBG.js +13 -0
  49. package/locales/csCZ.js +13 -0
  50. package/locales/daDK.js +13 -0
  51. package/locales/deDE.js +11 -0
  52. package/locales/elGR.js +12 -0
  53. package/locales/esES.js +15 -4
  54. package/locales/faIR.js +13 -0
  55. package/locales/fiFI.js +13 -0
  56. package/locales/frFR.js +13 -0
  57. package/locales/heIL.js +13 -0
  58. package/locales/hrHR.js +13 -0
  59. package/locales/huHU.js +13 -0
  60. package/locales/isIS.js +12 -0
  61. package/locales/itIT.js +13 -0
  62. package/locales/jaJP.js +13 -0
  63. package/locales/koKR.js +12 -0
  64. package/locales/nbNO.js +13 -0
  65. package/locales/nlNL.js +13 -0
  66. package/locales/nnNO.js +13 -0
  67. package/locales/plPL.js +13 -0
  68. package/locales/ptBR.js +11 -0
  69. package/locales/ptPT.js +11 -0
  70. package/locales/roRO.js +12 -0
  71. package/locales/ruRU.js +13 -0
  72. package/locales/skSK.js +12 -0
  73. package/locales/svSE.js +17 -5
  74. package/locales/trTR.js +13 -0
  75. package/locales/ukUA.js +12 -0
  76. package/locales/urPK.js +12 -0
  77. package/locales/viVN.js +13 -0
  78. package/locales/zhCN.js +15 -4
  79. package/locales/zhHK.js +12 -0
  80. package/locales/zhTW.js +12 -0
  81. package/models/api/gridCoreApi.d.ts +1 -1
  82. package/models/api/gridLocaleTextApi.d.ts +10 -0
  83. package/models/colDef/gridColDef.d.ts +28 -24
  84. package/models/gridDataSource.d.ts +12 -12
  85. package/models/props/DataGridProps.d.ts +9 -9
  86. package/modern/DataGrid/DataGrid.js +9 -9
  87. package/modern/components/GridLoadingOverlay.js +4 -4
  88. package/modern/components/GridPagination.js +2 -1
  89. package/modern/components/base/GridOverlays.js +2 -24
  90. package/modern/components/base/index.js +1 -2
  91. package/modern/components/cell/GridCell.js +10 -10
  92. package/modern/components/columnSelection/GridCellCheckboxRenderer.js +2 -3
  93. package/modern/components/columnSelection/GridHeaderCheckbox.js +2 -3
  94. package/modern/components/columnsManagement/GridColumnsManagement.js +53 -6
  95. package/modern/components/toolbar/GridToolbarColumnsButton.js +3 -4
  96. package/modern/components/toolbar/GridToolbarDensitySelector.js +3 -4
  97. package/modern/components/toolbar/GridToolbarExportContainer.js +3 -4
  98. package/modern/components/toolbar/GridToolbarFilterButton.js +7 -6
  99. package/modern/components/toolbar/GridToolbarQuickFilter.js +1 -0
  100. package/modern/components/virtualization/GridVirtualScroller.js +5 -3
  101. package/modern/constants/dataGridPropsDefaultValues.js +2 -3
  102. package/modern/constants/gridClasses.js +1 -1
  103. package/modern/constants/localeTextConstants.js +11 -0
  104. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
  105. package/modern/hooks/features/dimensions/useGridDimensions.js +3 -19
  106. package/modern/hooks/features/index.js +1 -0
  107. package/modern/hooks/features/listView/gridListViewSelectors.js +3 -1
  108. package/modern/hooks/features/listView/index.js +1 -0
  109. package/modern/hooks/features/overlays/useGridOverlays.js +19 -1
  110. package/modern/hooks/features/rowSelection/useGridRowSelection.js +0 -9
  111. package/modern/hooks/features/rowSelection/utils.js +2 -2
  112. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +55 -15
  113. package/modern/index.js +1 -1
  114. package/modern/internals/index.js +1 -0
  115. package/modern/joy/joySlots.js +7 -2
  116. package/modern/locales/arSD.js +12 -0
  117. package/modern/locales/beBY.js +12 -0
  118. package/modern/locales/bgBG.js +13 -0
  119. package/modern/locales/csCZ.js +13 -0
  120. package/modern/locales/daDK.js +13 -0
  121. package/modern/locales/deDE.js +11 -0
  122. package/modern/locales/elGR.js +12 -0
  123. package/modern/locales/esES.js +15 -4
  124. package/modern/locales/faIR.js +13 -0
  125. package/modern/locales/fiFI.js +13 -0
  126. package/modern/locales/frFR.js +13 -0
  127. package/modern/locales/heIL.js +13 -0
  128. package/modern/locales/hrHR.js +13 -0
  129. package/modern/locales/huHU.js +13 -0
  130. package/modern/locales/isIS.js +12 -0
  131. package/modern/locales/itIT.js +13 -0
  132. package/modern/locales/jaJP.js +13 -0
  133. package/modern/locales/koKR.js +12 -0
  134. package/modern/locales/nbNO.js +13 -0
  135. package/modern/locales/nlNL.js +13 -0
  136. package/modern/locales/nnNO.js +13 -0
  137. package/modern/locales/plPL.js +13 -0
  138. package/modern/locales/ptBR.js +11 -0
  139. package/modern/locales/ptPT.js +11 -0
  140. package/modern/locales/roRO.js +12 -0
  141. package/modern/locales/ruRU.js +13 -0
  142. package/modern/locales/skSK.js +12 -0
  143. package/modern/locales/svSE.js +17 -5
  144. package/modern/locales/trTR.js +13 -0
  145. package/modern/locales/ukUA.js +12 -0
  146. package/modern/locales/urPK.js +12 -0
  147. package/modern/locales/viVN.js +13 -0
  148. package/modern/locales/zhCN.js +15 -4
  149. package/modern/locales/zhHK.js +12 -0
  150. package/modern/locales/zhTW.js +12 -0
  151. package/node/DataGrid/DataGrid.js +9 -9
  152. package/node/components/GridLoadingOverlay.js +4 -4
  153. package/node/components/GridPagination.js +2 -1
  154. package/node/components/base/GridOverlays.js +2 -24
  155. package/node/components/base/index.js +0 -11
  156. package/node/components/cell/GridCell.js +10 -10
  157. package/node/components/columnSelection/GridCellCheckboxRenderer.js +2 -3
  158. package/node/components/columnSelection/GridHeaderCheckbox.js +2 -3
  159. package/node/components/columnsManagement/GridColumnsManagement.js +53 -6
  160. package/node/components/toolbar/GridToolbarColumnsButton.js +3 -4
  161. package/node/components/toolbar/GridToolbarDensitySelector.js +3 -4
  162. package/node/components/toolbar/GridToolbarExportContainer.js +3 -4
  163. package/node/components/toolbar/GridToolbarFilterButton.js +7 -6
  164. package/node/components/toolbar/GridToolbarQuickFilter.js +1 -0
  165. package/node/components/virtualization/GridVirtualScroller.js +5 -3
  166. package/node/constants/dataGridPropsDefaultValues.js +2 -3
  167. package/node/constants/gridClasses.js +1 -1
  168. package/node/constants/localeTextConstants.js +11 -0
  169. package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
  170. package/node/hooks/features/dimensions/useGridDimensions.js +2 -18
  171. package/node/hooks/features/index.js +11 -0
  172. package/node/hooks/features/listView/gridListViewSelectors.js +3 -1
  173. package/node/hooks/features/listView/index.js +16 -0
  174. package/node/hooks/features/overlays/useGridOverlays.js +21 -1
  175. package/node/hooks/features/rowSelection/useGridRowSelection.js +0 -9
  176. package/node/hooks/features/rowSelection/utils.js +2 -2
  177. package/node/hooks/features/virtualization/useGridVirtualScroller.js +55 -15
  178. package/node/index.js +1 -1
  179. package/node/internals/index.js +9 -2
  180. package/node/joy/joySlots.js +7 -2
  181. package/node/locales/arSD.js +12 -0
  182. package/node/locales/beBY.js +12 -0
  183. package/node/locales/bgBG.js +13 -0
  184. package/node/locales/csCZ.js +13 -0
  185. package/node/locales/daDK.js +13 -0
  186. package/node/locales/deDE.js +11 -0
  187. package/node/locales/elGR.js +12 -0
  188. package/node/locales/esES.js +15 -4
  189. package/node/locales/faIR.js +13 -0
  190. package/node/locales/fiFI.js +13 -0
  191. package/node/locales/frFR.js +13 -0
  192. package/node/locales/heIL.js +13 -0
  193. package/node/locales/hrHR.js +13 -0
  194. package/node/locales/huHU.js +13 -0
  195. package/node/locales/isIS.js +12 -0
  196. package/node/locales/itIT.js +13 -0
  197. package/node/locales/jaJP.js +13 -0
  198. package/node/locales/koKR.js +12 -0
  199. package/node/locales/nbNO.js +13 -0
  200. package/node/locales/nlNL.js +13 -0
  201. package/node/locales/nnNO.js +13 -0
  202. package/node/locales/plPL.js +13 -0
  203. package/node/locales/ptBR.js +11 -0
  204. package/node/locales/ptPT.js +11 -0
  205. package/node/locales/roRO.js +12 -0
  206. package/node/locales/ruRU.js +13 -0
  207. package/node/locales/skSK.js +12 -0
  208. package/node/locales/svSE.js +17 -5
  209. package/node/locales/trTR.js +13 -0
  210. package/node/locales/ukUA.js +12 -0
  211. package/node/locales/urPK.js +12 -0
  212. package/node/locales/viVN.js +13 -0
  213. package/node/locales/zhCN.js +15 -4
  214. package/node/locales/zhHK.js +12 -0
  215. package/node/locales/zhTW.js +12 -0
  216. package/package.json +4 -4
package/locales/urPK.js CHANGED
@@ -23,6 +23,17 @@ const urPKGrid = {
23
23
  toolbarQuickFilterPlaceholder: 'تلاش کریں۔۔۔',
24
24
  toolbarQuickFilterLabel: 'تلاش کریں',
25
25
  toolbarQuickFilterDeleteIconLabel: 'کلئیر کریں',
26
+ // Prompt toolbar field
27
+ // toolbarPromptControlPlaceholder: 'Type a prompt…',
28
+ // toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
29
+ // toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
30
+ // toolbarPromptControlLabel: 'Prompt input',
31
+ // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
32
+ // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
33
+ // toolbarPromptControlSendActionLabel: 'Send',
34
+ // toolbarPromptControlSendActionAriaLabel: 'Send prompt',
35
+ // toolbarPromptControlErrorMessage: 'An error occurred while processing the request. Please try again with a different prompt.',
36
+
26
37
  // Export selector toolbar button text
27
38
  toolbarExport: 'ایکسپورٹ',
28
39
  toolbarExportLabel: 'ایکسپورٹ',
@@ -34,6 +45,7 @@ const urPKGrid = {
34
45
  // columnsManagementNoColumns: 'No columns',
35
46
  // columnsManagementShowHideAllText: 'Show/Hide All',
36
47
  // columnsManagementReset: 'Reset',
48
+ // columnsManagementDeleteIconLabel: 'Clear',
37
49
 
38
50
  // Filter panel text
39
51
  filterPanelAddFilter: 'نیا فلٹر',
package/locales/viVN.js CHANGED
@@ -23,6 +23,17 @@ const viVNGrid = {
23
23
  toolbarQuickFilterPlaceholder: 'Tìm kiếm…',
24
24
  toolbarQuickFilterLabel: 'Tìm kiếm',
25
25
  toolbarQuickFilterDeleteIconLabel: 'Xóa tìm kiếm',
26
+ // Prompt toolbar field
27
+ // toolbarPromptControlPlaceholder: 'Type a prompt…',
28
+ // toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
29
+ // toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
30
+ // toolbarPromptControlLabel: 'Prompt input',
31
+ // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
32
+ // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
33
+ // toolbarPromptControlSendActionLabel: 'Send',
34
+ // toolbarPromptControlSendActionAriaLabel: 'Send prompt',
35
+ // toolbarPromptControlErrorMessage: 'An error occurred while processing the request. Please try again with a different prompt.',
36
+
26
37
  // Export selector toolbar button text
27
38
  toolbarExport: 'Xuất',
28
39
  toolbarExportLabel: 'Xuất',
@@ -34,6 +45,8 @@ const viVNGrid = {
34
45
  columnsManagementNoColumns: 'Không có cột',
35
46
  columnsManagementShowHideAllText: 'Hiện/Ẩn Tất cả',
36
47
  columnsManagementReset: 'Đặt lại',
48
+ // columnsManagementDeleteIconLabel: 'Clear',
49
+
37
50
  // Filter panel text
38
51
  filterPanelAddFilter: 'Thêm bộ lọc',
39
52
  filterPanelRemoveAll: 'Xóa tất cả',
package/locales/zhCN.js CHANGED
@@ -23,6 +23,16 @@ const zhCNGrid = {
23
23
  toolbarQuickFilterPlaceholder: '搜索…',
24
24
  toolbarQuickFilterLabel: '搜索',
25
25
  toolbarQuickFilterDeleteIconLabel: '清除',
26
+ // Prompt toolbar field
27
+ toolbarPromptControlPlaceholder: '输入提示词',
28
+ toolbarPromptControlWithRecordingPlaceholder: '输入提示词或点击录音',
29
+ toolbarPromptControlRecordingPlaceholder: '正在录音…',
30
+ toolbarPromptControlLabel: '提示词输入',
31
+ toolbarPromptControlRecordButtonDefaultLabel: '录音',
32
+ toolbarPromptControlRecordButtonActiveLabel: '停止录音',
33
+ toolbarPromptControlSendActionLabel: '发送',
34
+ toolbarPromptControlSendActionAriaLabel: '发送提示词',
35
+ toolbarPromptControlErrorMessage: '处理请求时出现错误。请使用其他提示词再试。',
26
36
  // Export selector toolbar button text
27
37
  toolbarExport: '导出',
28
38
  toolbarExportLabel: '导出',
@@ -34,6 +44,7 @@ const zhCNGrid = {
34
44
  columnsManagementNoColumns: '没有列',
35
45
  columnsManagementShowHideAllText: '显示/隐藏所有',
36
46
  columnsManagementReset: '重置',
47
+ columnsManagementDeleteIconLabel: '清除',
37
48
  // Filter panel text
38
49
  filterPanelAddFilter: '添加筛选器',
39
50
  filterPanelRemoveAll: '清除全部',
@@ -47,9 +58,9 @@ const zhCNGrid = {
47
58
  filterPanelInputPlaceholder: '筛选值',
48
59
  // Filter operators text
49
60
  filterOperatorContains: '包含',
50
- // filterOperatorDoesNotContain: 'does not contain',
61
+ filterOperatorDoesNotContain: '不包含',
51
62
  filterOperatorEquals: '等于',
52
- // filterOperatorDoesNotEqual: 'does not equal',
63
+ filterOperatorDoesNotEqual: '不等于',
53
64
  filterOperatorStartsWith: '开始于',
54
65
  filterOperatorEndsWith: '结束于',
55
66
  filterOperatorIs: '是',
@@ -69,9 +80,9 @@ const zhCNGrid = {
69
80
  'filterOperator<=': '<=',
70
81
  // Header filter operators text
71
82
  headerFilterOperatorContains: '包含',
72
- // headerFilterOperatorDoesNotContain: 'Does not contain',
83
+ headerFilterOperatorDoesNotContain: '不包含',
73
84
  headerFilterOperatorEquals: '等于',
74
- // headerFilterOperatorDoesNotEqual: 'Does not equal',
85
+ headerFilterOperatorDoesNotEqual: '不等于',
75
86
  headerFilterOperatorStartsWith: '开始于',
76
87
  headerFilterOperatorEndsWith: '结束于',
77
88
  headerFilterOperatorIs: '是',
package/locales/zhHK.js CHANGED
@@ -23,6 +23,17 @@ const zhHKGrid = {
23
23
  toolbarQuickFilterPlaceholder: '搜尋…',
24
24
  toolbarQuickFilterLabel: '搜尋',
25
25
  toolbarQuickFilterDeleteIconLabel: '清除',
26
+ // Prompt toolbar field
27
+ // toolbarPromptControlPlaceholder: 'Type a prompt…',
28
+ // toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
29
+ // toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
30
+ // toolbarPromptControlLabel: 'Prompt input',
31
+ // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
32
+ // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
33
+ // toolbarPromptControlSendActionLabel: 'Send',
34
+ // toolbarPromptControlSendActionAriaLabel: 'Send prompt',
35
+ // toolbarPromptControlErrorMessage: 'An error occurred while processing the request. Please try again with a different prompt.',
36
+
26
37
  // Export selector toolbar button text
27
38
  toolbarExport: '出口',
28
39
  toolbarExportLabel: '出口',
@@ -34,6 +45,7 @@ const zhHKGrid = {
34
45
  // columnsManagementNoColumns: 'No columns',
35
46
  // columnsManagementShowHideAllText: 'Show/Hide All',
36
47
  // columnsManagementReset: 'Reset',
48
+ // columnsManagementDeleteIconLabel: 'Clear',
37
49
 
38
50
  // Filter panel text
39
51
  filterPanelAddFilter: '新增過濾器',
package/locales/zhTW.js CHANGED
@@ -23,6 +23,17 @@ const zhTWGrid = {
23
23
  toolbarQuickFilterPlaceholder: '搜尋…',
24
24
  toolbarQuickFilterLabel: '搜尋',
25
25
  toolbarQuickFilterDeleteIconLabel: '清除',
26
+ // Prompt toolbar field
27
+ // toolbarPromptControlPlaceholder: 'Type a prompt…',
28
+ // toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
29
+ // toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
30
+ // toolbarPromptControlLabel: 'Prompt input',
31
+ // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
32
+ // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
33
+ // toolbarPromptControlSendActionLabel: 'Send',
34
+ // toolbarPromptControlSendActionAriaLabel: 'Send prompt',
35
+ // toolbarPromptControlErrorMessage: 'An error occurred while processing the request. Please try again with a different prompt.',
36
+
26
37
  // Export selector toolbar button text
27
38
  toolbarExport: '匯出',
28
39
  toolbarExportLabel: '匯出',
@@ -34,6 +45,7 @@ const zhTWGrid = {
34
45
  // columnsManagementNoColumns: 'No columns',
35
46
  // columnsManagementShowHideAllText: 'Show/Hide All',
36
47
  // columnsManagementReset: 'Reset',
48
+ // columnsManagementDeleteIconLabel: 'Clear',
37
49
 
38
50
  // Filter panel text
39
51
  filterPanelAddFilter: '增加篩選器',
@@ -59,7 +59,7 @@ export interface GridCorePrivateApi<GridPublicApi extends GridApiCommon, GridPri
59
59
  /**
60
60
  * The React ref of the grid main container div element.
61
61
  */
62
- mainElementRef: React.RefObject<HTMLDivElement>;
62
+ mainElementRef: React.MutableRefObject<HTMLDivElement | null>;
63
63
  /**
64
64
  * The React ref of the grid's virtual scroller container element.
65
65
  */
@@ -26,6 +26,15 @@ export interface GridLocaleText {
26
26
  toolbarQuickFilterPlaceholder: string;
27
27
  toolbarQuickFilterLabel: string;
28
28
  toolbarQuickFilterDeleteIconLabel: string;
29
+ toolbarPromptControlPlaceholder: string;
30
+ toolbarPromptControlWithRecordingPlaceholder: string;
31
+ toolbarPromptControlRecordingPlaceholder: string;
32
+ toolbarPromptControlLabel: string;
33
+ toolbarPromptControlRecordButtonDefaultLabel: string;
34
+ toolbarPromptControlRecordButtonActiveLabel: string;
35
+ toolbarPromptControlSendActionLabel: string;
36
+ toolbarPromptControlSendActionAriaLabel: string;
37
+ toolbarPromptControlErrorMessage: string;
29
38
  toolbarExport: React.ReactNode;
30
39
  toolbarExportLabel: string;
31
40
  toolbarExportCSV: React.ReactNode;
@@ -35,6 +44,7 @@ export interface GridLocaleText {
35
44
  columnsManagementNoColumns: string;
36
45
  columnsManagementShowHideAllText: string;
37
46
  columnsManagementReset: string;
47
+ columnsManagementDeleteIconLabel: string;
38
48
  filterPanelAddFilter: React.ReactNode;
39
49
  filterPanelRemoveAll: React.ReactNode;
40
50
  filterPanelDeleteIconLabel: string;
@@ -36,43 +36,43 @@ export type GridColSpanFn<R extends GridValidRowModel = GridValidRowModel, V = a
36
36
  */
37
37
  export interface GridBaseColDef<R extends GridValidRowModel = GridValidRowModel, V = any, F = V> {
38
38
  /**
39
- * The column identifier. It's used to map with [[GridRowModel]] values.
39
+ * The unique identifier of the column. Used to map with [[GridRowModel]] values.
40
40
  */
41
41
  field: string;
42
42
  /**
43
- * The title of the column rendered in the column header cell.
43
+ * The title displayed in the column header cell.
44
44
  */
45
45
  headerName?: string;
46
46
  /**
47
- * The description of the column rendered as tooltip if the column header name is not fully displayed.
47
+ * The tooltip text shown when the column header name is truncated.
48
48
  */
49
49
  description?: string;
50
50
  /**
51
- * Set the width of the column.
51
+ * The width of the column in pixels.
52
52
  * @default 100
53
53
  */
54
54
  width?: number;
55
55
  /**
56
- * If set, it indicates that a column has fluid width. Range [0, ∞).
56
+ * The flex grow factor of the column. Must be a positive number.
57
57
  */
58
58
  flex?: number;
59
59
  /**
60
- * Sets the minimum width of a column.
60
+ * The minimum width of the column in pixels.
61
61
  * @default 50
62
62
  */
63
63
  minWidth?: number;
64
64
  /**
65
- * Sets the maximum width of a column.
65
+ * The maximum width of the column in pixels.
66
66
  * @default Infinity
67
67
  */
68
68
  maxWidth?: number;
69
69
  /**
70
- * If `false`, removes the buttons for hiding this column.
70
+ * If `false`, removes the option to hide this column.
71
71
  * @default true
72
72
  */
73
73
  hideable?: boolean;
74
74
  /**
75
- * If `true`, the column is sortable.
75
+ * If `false`, disables sorting for this column.
76
76
  * @default true
77
77
  */
78
78
  sortable?: boolean;
@@ -81,7 +81,7 @@ export interface GridBaseColDef<R extends GridValidRowModel = GridValidRowModel,
81
81
  */
82
82
  sortingOrder?: readonly GridSortDirection[];
83
83
  /**
84
- * If `true`, the column is resizable.
84
+ * If `false`, disables resizing for this column.
85
85
  * @default true
86
86
  */
87
87
  resizable?: boolean;
@@ -109,7 +109,7 @@ export interface GridBaseColDef<R extends GridValidRowModel = GridValidRowModel,
109
109
  */
110
110
  sortComparator?: GridComparatorFn<V>;
111
111
  /**
112
- * Allows to use a different comparator function depending on the sort direction.
112
+ * Provide an alternative comparator function for sorting.
113
113
  * Takes precedence over `sortComparator`.
114
114
  * @param {GridSortDirection} sortDirection The direction of the sort.
115
115
  * @returns {GridComparatorFn<V>} The comparator function to use.
@@ -122,25 +122,25 @@ export interface GridBaseColDef<R extends GridValidRowModel = GridValidRowModel,
122
122
  */
123
123
  type?: GridColType;
124
124
  /**
125
- * Allows to align the column values in cells.
125
+ * Align cell content.
126
126
  */
127
127
  align?: GridAlignment;
128
128
  /**
129
- * Function that allows to get a specific data instead of field to render in the cell.
129
+ * Function that returns specific data to render in the cell instead of using the field value.
130
130
  */
131
131
  valueGetter?: GridValueGetter<R, V, F>;
132
132
  /**
133
- * Function that allows to provide a specific value to be used in row spanning.
133
+ * Function that returns a specific value to be used in row spanning.
134
134
  */
135
135
  rowSpanValueGetter?: GridValueGetter<R, V, F>;
136
136
  /**
137
- * Function that allows to customize how the entered value is stored in the row.
138
- * It only works with cell/row editing.
137
+ * Function that customizes how the entered value is stored in the row.
138
+ * Only works with cell/row editing.
139
139
  * @returns {R} The row with the updated field.
140
140
  */
141
141
  valueSetter?: GridValueSetter<R, V, F>;
142
142
  /**
143
- * Function that allows to apply a formatter before rendering its value.
143
+ * Formats the cell value before rendering.
144
144
  */
145
145
  valueFormatter?: GridValueFormatter<R, V, F>;
146
146
  /**
@@ -149,7 +149,7 @@ export interface GridBaseColDef<R extends GridValidRowModel = GridValidRowModel,
149
149
  */
150
150
  valueParser?: GridValueParser<R, V, F>;
151
151
  /**
152
- * Class name that will be added in cells for that column.
152
+ * Class name added to cells in this column.
153
153
  */
154
154
  cellClassName?: GridCellClassNamePropType<R, V>;
155
155
  /**
@@ -159,38 +159,38 @@ export interface GridBaseColDef<R extends GridValidRowModel = GridValidRowModel,
159
159
  */
160
160
  display?: 'text' | 'flex';
161
161
  /**
162
- * Allows to override the component rendered as cell for this column.
162
+ * Override the component rendered as cell for this column.
163
163
  * @template R, V, F
164
164
  * @param {GridRenderCellParams<R, V, F>} params Object containing parameters for the renderer.
165
165
  * @returns {React.ReactNode} The element to be rendered.
166
166
  */
167
167
  renderCell?: (params: GridRenderCellParams<R, V, F>) => React.ReactNode;
168
168
  /**
169
- * Allows to override the component rendered in edit cell mode for this column.
169
+ * Override the component rendered in edit cell mode for this column.
170
170
  * @param {GridRenderEditCellParams} params Object containing parameters for the renderer.
171
171
  * @returns {React.ReactNode} The element to be rendered.
172
172
  */
173
173
  renderEditCell?: (params: GridRenderEditCellParams<R, V, F>) => React.ReactNode;
174
174
  /**
175
175
  * Callback fired when the edit props of the cell changes.
176
- * It allows to process the props that saved into the state.
176
+ * Processes the props before being saved into the state.
177
177
  * @param {GridPreProcessEditCellProps} params Object containing parameters of the cell being edited.
178
178
  * @returns {GridEditCellProps | Promise<GridEditCellProps>} The new edit cell props.
179
179
  */
180
180
  preProcessEditCellProps?: (params: GridPreProcessEditCellProps) => GridEditCellProps | Promise<GridEditCellProps>;
181
181
  /**
182
- * Class name that will be added in the column header cell.
182
+ * Class name added to the column header cell.
183
183
  */
184
184
  headerClassName?: GridColumnHeaderClassNamePropType;
185
185
  /**
186
- * Allows to render a component in the column header cell.
186
+ * Override the component rendered in the column header cell.
187
187
  * @template R, V, F
188
188
  * @param {GridColumnHeaderParams<R, V, F>} params Object containing parameters for the renderer.
189
189
  * @returns {React.ReactNode} The element to be rendered.
190
190
  */
191
191
  renderHeader?: (params: GridColumnHeaderParams<R, V, F>) => React.ReactNode;
192
192
  /**
193
- * Header cell element alignment.
193
+ * Align column header content.
194
194
  */
195
195
  headerAlign?: GridAlignment;
196
196
  /**
@@ -236,6 +236,10 @@ export interface GridBaseColDef<R extends GridValidRowModel = GridValidRowModel,
236
236
  * @default 1
237
237
  */
238
238
  colSpan?: number | GridColSpanFn<R, V, F>;
239
+ /**
240
+ * Example values that can be used by the grid to get more context about the column.
241
+ */
242
+ unstable_examples?: V[];
239
243
  }
240
244
  /**
241
245
  * Column Definition interface used for columns with the `actions` type.
@@ -34,7 +34,7 @@ export interface GridGetRowsResponse {
34
34
  rowCount?: number;
35
35
  /**
36
36
  * Additional `pageInfo` for advanced use-cases.
37
- * `hasNextPage`: When row count is unknown/estimated, `hasNextPage` will be used to check if more records are available on server
37
+ * `hasNextPage`: When row count is unknown/estimated, `hasNextPage` will be used to check if more records are available on server.
38
38
  */
39
39
  pageInfo?: {
40
40
  hasNextPage?: boolean;
@@ -44,25 +44,25 @@ export interface GridGetRowsResponse {
44
44
  export interface GridDataSource {
45
45
  /**
46
46
  * This method will be called when the grid needs to fetch some rows.
47
- * @param {GridGetRowsParams} params The parameters required to fetch the rows
48
- * @returns {Promise<GridGetRowsResponse>} A promise that resolves to the data of type [GridGetRowsResponse]
47
+ * @param {GridGetRowsParams} params The parameters required to fetch the rows.
48
+ * @returns {Promise<GridGetRowsResponse>} A promise that resolves to the data of type [GridGetRowsResponse].
49
49
  */
50
50
  getRows(params: GridGetRowsParams): Promise<GridGetRowsResponse>;
51
51
  /**
52
52
  * This method will be called when the user updates a row [Not yet implemented].
53
- * @param {GridRowModel} updatedRow The updated row
54
- * @returns {Promise<any>} If resolved (synced on the backend), the grid will update the row and mutate the cache
53
+ * @param {GridRowModel} updatedRow The updated row.
54
+ * @returns {Promise<any>} If resolved (synced on the backend), the grid will update the row and mutate the cache.
55
55
  */
56
56
  updateRow?(updatedRow: GridRowModel): Promise<any>;
57
57
  /**
58
58
  * Used to group rows by their parent group. Replaces `getTreeDataPath` used in client side tree-data.
59
- * @param {GridRowModel} row The row to get the group key of
60
- * @returns {string} The group key for the row
59
+ * @param {GridRowModel} row The row to get the group key of.
60
+ * @returns {string} The group key for the row.
61
61
  */
62
62
  getGroupKey?: (row: GridRowModel) => string;
63
63
  /**
64
64
  * Used to determine the number of children a row has on server.
65
- * @param {GridRowModel} row The row to check the number of children
65
+ * @param {GridRowModel} row The row to check the number of children.
66
66
  * @returns {number} The number of children the row has.
67
67
  * If the children count is not available for some reason, but there are some children, `getChildrenCount` should return `-1`.
68
68
  */
@@ -71,14 +71,14 @@ export interface GridDataSource {
71
71
  export interface GridDataSourceCache {
72
72
  /**
73
73
  * Set the cache entry for the given key.
74
- * @param {GridGetRowsParams} key The key of type `GridGetRowsParams`
75
- * @param {GridGetRowsResponse} value The value to be stored in the cache
74
+ * @param {GridGetRowsParams} key The key of type `GridGetRowsParams`.
75
+ * @param {GridGetRowsResponse} value The value to be stored in the cache.
76
76
  */
77
77
  set: (key: GridGetRowsParams, value: GridGetRowsResponse) => void;
78
78
  /**
79
79
  * Get the cache entry for the given key.
80
- * @param {GridGetRowsParams} key The key of type `GridGetRowsParams`
81
- * @returns {GridGetRowsResponse} The value stored in the cache
80
+ * @param {GridGetRowsParams} key The key of type `GridGetRowsParams`.
81
+ * @returns {GridGetRowsResponse} The value stored in the cache.
82
82
  */
83
83
  get: (key: GridGetRowsParams) => GridGetRowsResponse | undefined;
84
84
  /**
@@ -223,14 +223,6 @@ export interface DataGridPropsWithDefaultValues<R extends GridValidRowModel = an
223
223
  * @default false
224
224
  */
225
225
  ignoreDiacritics: boolean;
226
- /**
227
- * If `select`, a group header checkbox in indeterminate state (like "Select All" checkbox)
228
- * will select all the rows under it.
229
- * If `deselect`, it will deselect all the rows under it.
230
- * Works only if `checkboxSelection` is enabled.
231
- * @default "deselect"
232
- */
233
- indeterminateCheckboxAction: 'select' | 'deselect';
234
226
  /**
235
227
  * If `true`, the selection model will retain selected rows that do not exist.
236
228
  * Useful when using server side pagination and row selections need to be retained
@@ -369,6 +361,14 @@ export interface DataGridPropsWithDefaultValues<R extends GridValidRowModel = an
369
361
  * @default false
370
362
  */
371
363
  unstable_rowSpanning: boolean;
364
+ /**
365
+ * If `true`, the Data Grid enables column virtualization when `getRowHeight` is set to `() => 'auto'`.
366
+ * By default, column virtualization is disabled when dynamic row height is enabled to measure the row height correctly.
367
+ * For datasets with a large number of columns, this can cause performance issues.
368
+ * The downside of enabling this prop is that the row height will be estimated based the cells that are currently rendered, which can cause row height change when scrolling horizontally.
369
+ * @default false
370
+ */
371
+ virtualizeColumnsWithAutoRowHeight: boolean;
372
372
  }
373
373
  /**
374
374
  * The Data Grid props with no default value.
@@ -814,7 +814,7 @@ export interface DataGridProSharedPropsWithDefaultValue {
814
814
  * - Deselecting a descendant of a selected parent deselects the parent automatically.
815
815
  *
816
816
  * Works with tree data and row grouping on the client-side only.
817
- * @default { parents: false, descendants: false }
817
+ * @default { parents: true, descendants: true }
818
818
  */
819
819
  rowSelectionPropagation: GridRowSelectionPropagation;
820
820
  /**
@@ -325,14 +325,6 @@ DataGridRaw.propTypes = {
325
325
  clipboardExport: PropTypes.bool,
326
326
  csvExport: PropTypes.bool
327
327
  }), PropTypes.bool]),
328
- /**
329
- * If `select`, a group header checkbox in indeterminate state (like "Select All" checkbox)
330
- * will select all the rows under it.
331
- * If `deselect`, it will deselect all the rows under it.
332
- * Works only if `checkboxSelection` is enabled.
333
- * @default "deselect"
334
- */
335
- indeterminateCheckboxAction: PropTypes.oneOf(['deselect', 'select']),
336
328
  /**
337
329
  * The initial state of the DataGrid.
338
330
  * The data in it will be set in the state on initialization but will not be controlled.
@@ -766,5 +758,13 @@ DataGridRaw.propTypes = {
766
758
  * If `true`, the Data Grid will auto span the cells over the rows having the same value.
767
759
  * @default false
768
760
  */
769
- unstable_rowSpanning: PropTypes.bool
761
+ unstable_rowSpanning: PropTypes.bool,
762
+ /**
763
+ * If `true`, the Data Grid enables column virtualization when `getRowHeight` is set to `() => 'auto'`.
764
+ * By default, column virtualization is disabled when dynamic row height is enabled to measure the row height correctly.
765
+ * For datasets with a large number of columns, this can cause performance issues.
766
+ * The downside of enabling this prop is that the row height will be estimated based the cells that are currently rendered, which can cause row height change when scrolling horizontally.
767
+ * @default false
768
+ */
769
+ virtualizeColumnsWithAutoRowHeight: PropTypes.bool
770
770
  };
@@ -30,8 +30,8 @@ const LOADING_VARIANTS = {
30
30
  };
31
31
  const GridLoadingOverlay = /*#__PURE__*/React.forwardRef(function GridLoadingOverlay(props, ref) {
32
32
  const {
33
- variant = 'circular-progress',
34
- noRowsVariant = 'circular-progress',
33
+ variant = 'linear-progress',
34
+ noRowsVariant = 'skeleton',
35
35
  style
36
36
  } = props,
37
37
  other = _objectWithoutPropertiesLoose(props, _excluded);
@@ -52,13 +52,13 @@ process.env.NODE_ENV !== "production" ? GridLoadingOverlay.propTypes = {
52
52
  // ----------------------------------------------------------------------
53
53
  /**
54
54
  * The variant of the overlay when no rows are displayed.
55
- * @default 'circular-progress'
55
+ * @default 'skeleton'
56
56
  */
57
57
  noRowsVariant: PropTypes.oneOf(['circular-progress', 'linear-progress', 'skeleton']),
58
58
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
59
59
  /**
60
60
  * The variant of the overlay.
61
- * @default 'circular-progress'
61
+ * @default 'linear-progress'
62
62
  */
63
63
  variant: PropTypes.oneOf(['circular-progress', 'linear-progress', 'skeleton'])
64
64
  } : void 0;
@@ -50,7 +50,8 @@ const defaultLabelDisplayedRows = ({
50
50
  if (!estimated) {
51
51
  return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
52
52
  }
53
- return `${from}–${to} of ${count !== -1 ? count : `more than ${estimated > to ? estimated : to}`}`;
53
+ const estimateLabel = estimated && estimated > to ? `around ${estimated}` : `more than ${to}`;
54
+ return `${from}–${to} of ${count !== -1 ? count : estimateLabel}`;
54
55
  };
55
56
 
56
57
  // A mutable version of a readonly array.
@@ -52,7 +52,7 @@ const useUtilityClasses = ownerState => {
52
52
  };
53
53
  return composeClasses(slots, getDataGridUtilityClass, classes);
54
54
  };
55
- function GridOverlayWrapper(props) {
55
+ export function GridOverlayWrapper(props) {
56
56
  const apiRef = useGridApiContext();
57
57
  const rootProps = useGridRootProps();
58
58
  const dimensions = useGridSelector(apiRef, gridDimensionsSelector);
@@ -83,26 +83,4 @@ process.env.NODE_ENV !== "production" ? GridOverlayWrapper.propTypes = {
83
83
  // ----------------------------------------------------------------------
84
84
  loadingOverlayVariant: PropTypes.oneOf(['circular-progress', 'linear-progress', 'skeleton']),
85
85
  overlayType: PropTypes.oneOf(['loadingOverlay', 'noResultsOverlay', 'noRowsOverlay'])
86
- } : void 0;
87
- process.env.NODE_ENV !== "production" ? GridOverlays.propTypes = {
88
- // ----------------------------- Warning --------------------------------
89
- // | These PropTypes are generated from the TypeScript type definitions |
90
- // | To update them edit the TypeScript types and run "pnpm proptypes" |
91
- // ----------------------------------------------------------------------
92
- loadingOverlayVariant: PropTypes.oneOf(['circular-progress', 'linear-progress', 'skeleton']),
93
- overlayType: PropTypes.oneOf(['loadingOverlay', 'noResultsOverlay', 'noRowsOverlay'])
94
- } : void 0;
95
- export function GridOverlays(props) {
96
- const {
97
- overlayType
98
- } = props;
99
- const rootProps = useGridRootProps();
100
- if (!overlayType) {
101
- return null;
102
- }
103
- const Overlay = rootProps.slots?.[overlayType];
104
- const overlayProps = rootProps.slotProps?.[overlayType];
105
- return /*#__PURE__*/_jsx(GridOverlayWrapper, _extends({}, props, {
106
- children: /*#__PURE__*/_jsx(Overlay, _extends({}, overlayProps))
107
- }));
108
- }
86
+ } : void 0;
@@ -1,3 +1,2 @@
1
1
  export * from "./GridBody.js";
2
- export * from "./GridFooterPlaceholder.js";
3
- export * from "./GridOverlays.js";
2
+ export * from "./GridFooterPlaceholder.js";
@@ -15,7 +15,6 @@ import { useGridSelector, objectShallowCompare } from "../../hooks/utils/useGrid
15
15
  import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
16
16
  import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
17
17
  import { gridFocusCellSelector } from "../../hooks/features/focus/gridFocusStateSelector.js";
18
- import { MissingRowIdError } from "../../hooks/features/rows/useGridParamsApi.js";
19
18
  import { shouldCellShowLeftBorder, shouldCellShowRightBorder } from "../../utils/cellBorderUtils.js";
20
19
  import { GridPinnedColumnPosition } from "../../hooks/features/columns/gridColumnsInterfaces.js";
21
20
  import { gridRowSpanningHiddenCellsSelector, gridRowSpanningSpannedCellsSelector } from "../../hooks/features/rows/gridRowSpanningSelectors.js";
@@ -114,16 +113,13 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
114
113
  // This is required because `.getCellParams` tries to get the `state.rows.tree` entry
115
114
  // associated with `rowId`/`fieldId`, but this selector runs after the state has been
116
115
  // updated, while `rowId`/`fieldId` reference an entry in the old state.
117
- try {
118
- const result = apiRef.current.getCellParams(rowId, field);
119
- result.api = apiRef.current;
120
- return result;
121
- } catch (error) {
122
- if (error instanceof MissingRowIdError) {
123
- return EMPTY_CELL_PARAMS;
124
- }
125
- throw error;
116
+ const row = apiRef.current.getRow(rowId);
117
+ if (!row) {
118
+ return EMPTY_CELL_PARAMS;
126
119
  }
120
+ const result = apiRef.current.getCellParams(rowId, field);
121
+ result.api = apiRef.current;
122
+ return result;
127
123
  }, objectShallowCompare);
128
124
  const isSelected = useGridSelector(apiRef, () => apiRef.current.unstable_applyPipeProcessors('isCellSelected', false, {
129
125
  id: rowId,
@@ -211,6 +207,7 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
211
207
  padding: 0,
212
208
  opacity: 0,
213
209
  width: 0,
210
+ height: 0,
214
211
  border: 0
215
212
  };
216
213
  }
@@ -229,6 +226,9 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
229
226
  if (rowSpan > 1) {
230
227
  cellStyle.height = `calc(var(--height) * ${rowSpan})`;
231
228
  cellStyle.zIndex = 5;
229
+ if (isLeftPinned || isRightPinned) {
230
+ cellStyle.zIndex = 6;
231
+ }
232
232
  }
233
233
  return cellStyle;
234
234
  }, [width, isNotVisible, styleProp, pinnedOffset, pinnedPosition, isRtl, rowSpan]);
@@ -79,12 +79,11 @@ const GridCellCheckboxForwardRef = /*#__PURE__*/React.forwardRef(function GridCe
79
79
  if (rowNode.type === 'footer' || rowNode.type === 'pinnedRow') {
80
80
  return null;
81
81
  }
82
- const label = apiRef.current.getLocaleText(isChecked ? 'checkboxSelectionUnselectRow' : 'checkboxSelectionSelectRow');
83
- const checked = rootProps.indeterminateCheckboxAction === 'select' ? isChecked && !isIndeterminate : isChecked;
82
+ const label = apiRef.current.getLocaleText(isChecked && !isIndeterminate ? 'checkboxSelectionUnselectRow' : 'checkboxSelectionSelectRow');
84
83
  return /*#__PURE__*/_jsx(rootProps.slots.baseCheckbox, _extends({
85
84
  ref: handleRef,
86
85
  tabIndex: tabIndex,
87
- checked: checked,
86
+ checked: isChecked && !isIndeterminate,
88
87
  onChange: handleChange,
89
88
  className: classes.root,
90
89
  inputProps: {