@mui/x-data-grid 8.0.0-alpha.1 → 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 (192) hide show
  1. package/CHANGELOG.md +228 -7
  2. package/DataGrid/DataGrid.js +9 -9
  3. package/components/GridPagination.js +2 -1
  4. package/components/base/GridOverlays.d.ts +4 -3
  5. package/components/base/GridOverlays.js +2 -24
  6. package/components/base/index.d.ts +0 -1
  7. package/components/base/index.js +1 -2
  8. package/components/cell/GridCell.js +7 -10
  9. package/components/columnSelection/GridCellCheckboxRenderer.js +2 -3
  10. package/components/columnSelection/GridHeaderCheckbox.js +2 -3
  11. package/components/toolbar/GridToolbarColumnsButton.js +3 -4
  12. package/components/toolbar/GridToolbarDensitySelector.js +3 -4
  13. package/components/toolbar/GridToolbarExportContainer.js +3 -4
  14. package/components/toolbar/GridToolbarFilterButton.d.ts +2 -0
  15. package/components/toolbar/GridToolbarFilterButton.js +7 -6
  16. package/components/toolbar/GridToolbarQuickFilter.js +1 -0
  17. package/components/virtualization/GridVirtualScroller.js +5 -3
  18. package/constants/dataGridPropsDefaultValues.js +2 -3
  19. package/constants/localeTextConstants.js +0 -1
  20. package/hooks/features/dimensions/gridDimensionsApi.d.ts +0 -4
  21. package/hooks/features/dimensions/useGridDimensions.js +3 -19
  22. package/hooks/features/index.d.ts +1 -0
  23. package/hooks/features/index.js +1 -0
  24. package/hooks/features/listView/gridListViewSelectors.d.ts +3 -1
  25. package/hooks/features/listView/gridListViewSelectors.js +3 -1
  26. package/hooks/features/listView/index.d.ts +1 -0
  27. package/hooks/features/listView/index.js +1 -0
  28. package/hooks/features/overlays/useGridOverlays.d.ts +7 -4
  29. package/hooks/features/overlays/useGridOverlays.js +19 -1
  30. package/hooks/features/rowSelection/useGridRowSelection.js +0 -9
  31. package/hooks/features/rowSelection/utils.js +2 -2
  32. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +1 -1
  33. package/hooks/features/virtualization/useGridVirtualScroller.js +55 -15
  34. package/index.js +1 -1
  35. package/locales/arSD.js +0 -1
  36. package/locales/beBY.js +0 -1
  37. package/locales/bgBG.js +0 -1
  38. package/locales/csCZ.js +0 -1
  39. package/locales/daDK.js +0 -1
  40. package/locales/deDE.js +10 -13
  41. package/locales/elGR.js +0 -1
  42. package/locales/esES.js +10 -13
  43. package/locales/faIR.js +0 -1
  44. package/locales/fiFI.js +0 -1
  45. package/locales/frFR.js +0 -1
  46. package/locales/heIL.js +0 -1
  47. package/locales/hrHR.js +0 -1
  48. package/locales/huHU.js +0 -1
  49. package/locales/isIS.js +0 -1
  50. package/locales/itIT.js +0 -1
  51. package/locales/jaJP.js +0 -1
  52. package/locales/koKR.js +0 -1
  53. package/locales/nbNO.js +0 -1
  54. package/locales/nlNL.js +0 -1
  55. package/locales/nnNO.js +0 -1
  56. package/locales/plPL.js +0 -1
  57. package/locales/ptBR.js +10 -13
  58. package/locales/ptPT.js +10 -13
  59. package/locales/roRO.js +0 -1
  60. package/locales/ruRU.js +0 -1
  61. package/locales/skSK.js +0 -1
  62. package/locales/svSE.js +0 -1
  63. package/locales/trTR.js +0 -1
  64. package/locales/ukUA.js +0 -1
  65. package/locales/urPK.js +0 -1
  66. package/locales/viVN.js +0 -1
  67. package/locales/zhCN.js +10 -13
  68. package/locales/zhHK.js +0 -1
  69. package/locales/zhTW.js +0 -1
  70. package/models/api/gridCoreApi.d.ts +1 -1
  71. package/models/api/gridLocaleTextApi.d.ts +0 -1
  72. package/models/colDef/gridColDef.d.ts +24 -24
  73. package/models/props/DataGridProps.d.ts +9 -9
  74. package/modern/DataGrid/DataGrid.js +9 -9
  75. package/modern/components/GridPagination.js +2 -1
  76. package/modern/components/base/GridOverlays.js +2 -24
  77. package/modern/components/base/index.js +1 -2
  78. package/modern/components/cell/GridCell.js +7 -10
  79. package/modern/components/columnSelection/GridCellCheckboxRenderer.js +2 -3
  80. package/modern/components/columnSelection/GridHeaderCheckbox.js +2 -3
  81. package/modern/components/toolbar/GridToolbarColumnsButton.js +3 -4
  82. package/modern/components/toolbar/GridToolbarDensitySelector.js +3 -4
  83. package/modern/components/toolbar/GridToolbarExportContainer.js +3 -4
  84. package/modern/components/toolbar/GridToolbarFilterButton.js +7 -6
  85. package/modern/components/toolbar/GridToolbarQuickFilter.js +1 -0
  86. package/modern/components/virtualization/GridVirtualScroller.js +5 -3
  87. package/modern/constants/dataGridPropsDefaultValues.js +2 -3
  88. package/modern/constants/localeTextConstants.js +0 -1
  89. package/modern/hooks/features/dimensions/useGridDimensions.js +3 -19
  90. package/modern/hooks/features/index.js +1 -0
  91. package/modern/hooks/features/listView/gridListViewSelectors.js +3 -1
  92. package/modern/hooks/features/listView/index.js +1 -0
  93. package/modern/hooks/features/overlays/useGridOverlays.js +19 -1
  94. package/modern/hooks/features/rowSelection/useGridRowSelection.js +0 -9
  95. package/modern/hooks/features/rowSelection/utils.js +2 -2
  96. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +55 -15
  97. package/modern/index.js +1 -1
  98. package/modern/locales/arSD.js +0 -1
  99. package/modern/locales/beBY.js +0 -1
  100. package/modern/locales/bgBG.js +0 -1
  101. package/modern/locales/csCZ.js +0 -1
  102. package/modern/locales/daDK.js +0 -1
  103. package/modern/locales/deDE.js +10 -13
  104. package/modern/locales/elGR.js +0 -1
  105. package/modern/locales/esES.js +10 -13
  106. package/modern/locales/faIR.js +0 -1
  107. package/modern/locales/fiFI.js +0 -1
  108. package/modern/locales/frFR.js +0 -1
  109. package/modern/locales/heIL.js +0 -1
  110. package/modern/locales/hrHR.js +0 -1
  111. package/modern/locales/huHU.js +0 -1
  112. package/modern/locales/isIS.js +0 -1
  113. package/modern/locales/itIT.js +0 -1
  114. package/modern/locales/jaJP.js +0 -1
  115. package/modern/locales/koKR.js +0 -1
  116. package/modern/locales/nbNO.js +0 -1
  117. package/modern/locales/nlNL.js +0 -1
  118. package/modern/locales/nnNO.js +0 -1
  119. package/modern/locales/plPL.js +0 -1
  120. package/modern/locales/ptBR.js +10 -13
  121. package/modern/locales/ptPT.js +10 -13
  122. package/modern/locales/roRO.js +0 -1
  123. package/modern/locales/ruRU.js +0 -1
  124. package/modern/locales/skSK.js +0 -1
  125. package/modern/locales/svSE.js +0 -1
  126. package/modern/locales/trTR.js +0 -1
  127. package/modern/locales/ukUA.js +0 -1
  128. package/modern/locales/urPK.js +0 -1
  129. package/modern/locales/viVN.js +0 -1
  130. package/modern/locales/zhCN.js +10 -13
  131. package/modern/locales/zhHK.js +0 -1
  132. package/modern/locales/zhTW.js +0 -1
  133. package/node/DataGrid/DataGrid.js +9 -9
  134. package/node/components/GridPagination.js +2 -1
  135. package/node/components/base/GridOverlays.js +2 -24
  136. package/node/components/base/index.js +0 -11
  137. package/node/components/cell/GridCell.js +7 -10
  138. package/node/components/columnSelection/GridCellCheckboxRenderer.js +2 -3
  139. package/node/components/columnSelection/GridHeaderCheckbox.js +2 -3
  140. package/node/components/toolbar/GridToolbarColumnsButton.js +3 -4
  141. package/node/components/toolbar/GridToolbarDensitySelector.js +3 -4
  142. package/node/components/toolbar/GridToolbarExportContainer.js +3 -4
  143. package/node/components/toolbar/GridToolbarFilterButton.js +7 -6
  144. package/node/components/toolbar/GridToolbarQuickFilter.js +1 -0
  145. package/node/components/virtualization/GridVirtualScroller.js +5 -3
  146. package/node/constants/dataGridPropsDefaultValues.js +2 -3
  147. package/node/constants/localeTextConstants.js +0 -1
  148. package/node/hooks/features/dimensions/useGridDimensions.js +2 -18
  149. package/node/hooks/features/index.js +11 -0
  150. package/node/hooks/features/listView/gridListViewSelectors.js +3 -1
  151. package/node/hooks/features/listView/index.js +16 -0
  152. package/node/hooks/features/overlays/useGridOverlays.js +21 -1
  153. package/node/hooks/features/rowSelection/useGridRowSelection.js +0 -9
  154. package/node/hooks/features/rowSelection/utils.js +2 -2
  155. package/node/hooks/features/virtualization/useGridVirtualScroller.js +55 -15
  156. package/node/index.js +1 -1
  157. package/node/locales/arSD.js +0 -1
  158. package/node/locales/beBY.js +0 -1
  159. package/node/locales/bgBG.js +0 -1
  160. package/node/locales/csCZ.js +0 -1
  161. package/node/locales/daDK.js +0 -1
  162. package/node/locales/deDE.js +10 -13
  163. package/node/locales/elGR.js +0 -1
  164. package/node/locales/esES.js +10 -13
  165. package/node/locales/faIR.js +0 -1
  166. package/node/locales/fiFI.js +0 -1
  167. package/node/locales/frFR.js +0 -1
  168. package/node/locales/heIL.js +0 -1
  169. package/node/locales/hrHR.js +0 -1
  170. package/node/locales/huHU.js +0 -1
  171. package/node/locales/isIS.js +0 -1
  172. package/node/locales/itIT.js +0 -1
  173. package/node/locales/jaJP.js +0 -1
  174. package/node/locales/koKR.js +0 -1
  175. package/node/locales/nbNO.js +0 -1
  176. package/node/locales/nlNL.js +0 -1
  177. package/node/locales/nnNO.js +0 -1
  178. package/node/locales/plPL.js +0 -1
  179. package/node/locales/ptBR.js +10 -13
  180. package/node/locales/ptPT.js +10 -13
  181. package/node/locales/roRO.js +0 -1
  182. package/node/locales/ruRU.js +0 -1
  183. package/node/locales/skSK.js +0 -1
  184. package/node/locales/svSE.js +0 -1
  185. package/node/locales/trTR.js +0 -1
  186. package/node/locales/ukUA.js +0 -1
  187. package/node/locales/urPK.js +0 -1
  188. package/node/locales/viVN.js +0 -1
  189. package/node/locales/zhCN.js +10 -13
  190. package/node/locales/zhHK.js +0 -1
  191. package/node/locales/zhTW.js +0 -1
  192. package/package.json +2 -2
package/locales/ptBR.js CHANGED
@@ -24,17 +24,15 @@ const ptBRGrid = {
24
24
  toolbarQuickFilterLabel: 'Procurar',
25
25
  toolbarQuickFilterDeleteIconLabel: 'Limpar',
26
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
- // toolbarPromptControlDeleteIconLabel: 'Clear',
32
- // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
33
- // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
34
- // toolbarPromptControlSendActionLabel: 'Send',
35
- // toolbarPromptControlSendActionAriaLabel: 'Send prompt',
36
- // toolbarPromptControlErrorMessage: 'An error occurred while processing the request. Please try again with a different prompt.',
37
-
27
+ toolbarPromptControlPlaceholder: 'Digite um prompt…',
28
+ toolbarPromptControlWithRecordingPlaceholder: 'Digite ou grave um prompt…',
29
+ toolbarPromptControlRecordingPlaceholder: 'Ouvindo o prompt…',
30
+ toolbarPromptControlLabel: 'Entrada de prompt',
31
+ toolbarPromptControlRecordButtonDefaultLabel: 'Gravar',
32
+ toolbarPromptControlRecordButtonActiveLabel: 'Parar gravação',
33
+ toolbarPromptControlSendActionLabel: 'Enviar',
34
+ toolbarPromptControlSendActionAriaLabel: 'Enviar prompt',
35
+ toolbarPromptControlErrorMessage: 'Ocorreu um erro ao processar a solicitação. Por favor, tente novamente com um prompt diferente.',
38
36
  // Export selector toolbar button text
39
37
  toolbarExport: 'Exportar',
40
38
  toolbarExportLabel: 'Exportar',
@@ -46,8 +44,7 @@ const ptBRGrid = {
46
44
  columnsManagementNoColumns: 'Nenhuma coluna',
47
45
  columnsManagementShowHideAllText: 'Mostrar/Ocultar Todas',
48
46
  columnsManagementReset: 'Redefinir',
49
- // columnsManagementDeleteIconLabel: 'Clear',
50
-
47
+ columnsManagementDeleteIconLabel: 'Limpar',
51
48
  // Filter panel text
52
49
  filterPanelAddFilter: 'Adicionar filtro',
53
50
  filterPanelRemoveAll: 'Remover todos',
package/locales/ptPT.js CHANGED
@@ -24,17 +24,15 @@ const ptPTGrid = {
24
24
  toolbarQuickFilterLabel: 'Procurar',
25
25
  toolbarQuickFilterDeleteIconLabel: 'Claro',
26
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
- // toolbarPromptControlDeleteIconLabel: 'Clear',
32
- // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
33
- // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
34
- // toolbarPromptControlSendActionLabel: 'Send',
35
- // toolbarPromptControlSendActionAriaLabel: 'Send prompt',
36
- // toolbarPromptControlErrorMessage: 'An error occurred while processing the request. Please try again with a different prompt.',
37
-
27
+ toolbarPromptControlPlaceholder: 'Digite um prompt…',
28
+ toolbarPromptControlWithRecordingPlaceholder: 'Digite ou grave um prompt…',
29
+ toolbarPromptControlRecordingPlaceholder: 'Ouvindo o prompt…',
30
+ toolbarPromptControlLabel: 'Entrada de prompt',
31
+ toolbarPromptControlRecordButtonDefaultLabel: 'Gravar',
32
+ toolbarPromptControlRecordButtonActiveLabel: 'Parar gravação',
33
+ toolbarPromptControlSendActionLabel: 'Enviar',
34
+ toolbarPromptControlSendActionAriaLabel: 'Enviar prompt',
35
+ toolbarPromptControlErrorMessage: 'Ocorreu um erro ao processar a solicitação. Por favor, tente novamente com um prompt diferente.',
38
36
  // Export selector toolbar button text
39
37
  toolbarExport: 'Exportar',
40
38
  toolbarExportLabel: 'Exportar',
@@ -46,8 +44,7 @@ const ptPTGrid = {
46
44
  columnsManagementNoColumns: 'Sem colunas',
47
45
  columnsManagementShowHideAllText: 'Mostrar/Ocultar Todas',
48
46
  columnsManagementReset: 'Repor',
49
- // columnsManagementDeleteIconLabel: 'Clear',
50
-
47
+ columnsManagementDeleteIconLabel: 'Limpar',
51
48
  // Filter panel text
52
49
  filterPanelAddFilter: 'Adicionar filtro',
53
50
  filterPanelRemoveAll: 'Excluir todos',
package/locales/roRO.js CHANGED
@@ -28,7 +28,6 @@ const roROGrid = {
28
28
  // toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
29
29
  // toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
30
30
  // toolbarPromptControlLabel: 'Prompt input',
31
- // toolbarPromptControlDeleteIconLabel: 'Clear',
32
31
  // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
33
32
  // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
34
33
  // toolbarPromptControlSendActionLabel: 'Send',
package/locales/ruRU.js CHANGED
@@ -43,7 +43,6 @@ const ruRUGrid = {
43
43
  // toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
44
44
  // toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
45
45
  // toolbarPromptControlLabel: 'Prompt input',
46
- // toolbarPromptControlDeleteIconLabel: 'Clear',
47
46
  // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
48
47
  // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
49
48
  // toolbarPromptControlSendActionLabel: 'Send',
package/locales/skSK.js CHANGED
@@ -36,7 +36,6 @@ const skSKGrid = {
36
36
  // toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
37
37
  // toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
38
38
  // toolbarPromptControlLabel: 'Prompt input',
39
- // toolbarPromptControlDeleteIconLabel: 'Clear',
40
39
  // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
41
40
  // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
42
41
  // toolbarPromptControlSendActionLabel: 'Send',
package/locales/svSE.js CHANGED
@@ -28,7 +28,6 @@ const svSEGrid = {
28
28
  // toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
29
29
  // toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
30
30
  // toolbarPromptControlLabel: 'Prompt input',
31
- // toolbarPromptControlDeleteIconLabel: 'Clear',
32
31
  // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
33
32
  // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
34
33
  // toolbarPromptControlSendActionLabel: 'Send',
package/locales/trTR.js CHANGED
@@ -28,7 +28,6 @@ const trTRGrid = {
28
28
  // toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
29
29
  // toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
30
30
  // toolbarPromptControlLabel: 'Prompt input',
31
- // toolbarPromptControlDeleteIconLabel: 'Clear',
32
31
  // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
33
32
  // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
34
33
  // toolbarPromptControlSendActionLabel: 'Send',
package/locales/ukUA.js CHANGED
@@ -43,7 +43,6 @@ const ukUAGrid = {
43
43
  // toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
44
44
  // toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
45
45
  // toolbarPromptControlLabel: 'Prompt input',
46
- // toolbarPromptControlDeleteIconLabel: 'Clear',
47
46
  // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
48
47
  // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
49
48
  // toolbarPromptControlSendActionLabel: 'Send',
package/locales/urPK.js CHANGED
@@ -28,7 +28,6 @@ const urPKGrid = {
28
28
  // toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
29
29
  // toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
30
30
  // toolbarPromptControlLabel: 'Prompt input',
31
- // toolbarPromptControlDeleteIconLabel: 'Clear',
32
31
  // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
33
32
  // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
34
33
  // toolbarPromptControlSendActionLabel: 'Send',
package/locales/viVN.js CHANGED
@@ -28,7 +28,6 @@ const viVNGrid = {
28
28
  // toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
29
29
  // toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
30
30
  // toolbarPromptControlLabel: 'Prompt input',
31
- // toolbarPromptControlDeleteIconLabel: 'Clear',
32
31
  // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
33
32
  // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
34
33
  // toolbarPromptControlSendActionLabel: 'Send',
package/locales/zhCN.js CHANGED
@@ -24,17 +24,15 @@ const zhCNGrid = {
24
24
  toolbarQuickFilterLabel: '搜索',
25
25
  toolbarQuickFilterDeleteIconLabel: '清除',
26
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
- // toolbarPromptControlDeleteIconLabel: 'Clear',
32
- // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
33
- // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
34
- // toolbarPromptControlSendActionLabel: 'Send',
35
- // toolbarPromptControlSendActionAriaLabel: 'Send prompt',
36
- // toolbarPromptControlErrorMessage: 'An error occurred while processing the request. Please try again with a different prompt.',
37
-
27
+ toolbarPromptControlPlaceholder: '输入提示词',
28
+ toolbarPromptControlWithRecordingPlaceholder: '输入提示词或点击录音',
29
+ toolbarPromptControlRecordingPlaceholder: '正在录音…',
30
+ toolbarPromptControlLabel: '提示词输入',
31
+ toolbarPromptControlRecordButtonDefaultLabel: '录音',
32
+ toolbarPromptControlRecordButtonActiveLabel: '停止录音',
33
+ toolbarPromptControlSendActionLabel: '发送',
34
+ toolbarPromptControlSendActionAriaLabel: '发送提示词',
35
+ toolbarPromptControlErrorMessage: '处理请求时出现错误。请使用其他提示词再试。',
38
36
  // Export selector toolbar button text
39
37
  toolbarExport: '导出',
40
38
  toolbarExportLabel: '导出',
@@ -46,8 +44,7 @@ const zhCNGrid = {
46
44
  columnsManagementNoColumns: '没有列',
47
45
  columnsManagementShowHideAllText: '显示/隐藏所有',
48
46
  columnsManagementReset: '重置',
49
- // columnsManagementDeleteIconLabel: 'Clear',
50
-
47
+ columnsManagementDeleteIconLabel: '清除',
51
48
  // Filter panel text
52
49
  filterPanelAddFilter: '添加筛选器',
53
50
  filterPanelRemoveAll: '清除全部',
package/locales/zhHK.js CHANGED
@@ -28,7 +28,6 @@ const zhHKGrid = {
28
28
  // toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
29
29
  // toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
30
30
  // toolbarPromptControlLabel: 'Prompt input',
31
- // toolbarPromptControlDeleteIconLabel: 'Clear',
32
31
  // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
33
32
  // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
34
33
  // toolbarPromptControlSendActionLabel: 'Send',
package/locales/zhTW.js CHANGED
@@ -28,7 +28,6 @@ const zhTWGrid = {
28
28
  // toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
29
29
  // toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
30
30
  // toolbarPromptControlLabel: 'Prompt input',
31
- // toolbarPromptControlDeleteIconLabel: 'Clear',
32
31
  // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
33
32
  // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
34
33
  // toolbarPromptControlSendActionLabel: 'Send',
@@ -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
  */
@@ -30,7 +30,6 @@ export interface GridLocaleText {
30
30
  toolbarPromptControlWithRecordingPlaceholder: string;
31
31
  toolbarPromptControlRecordingPlaceholder: string;
32
32
  toolbarPromptControlLabel: string;
33
- toolbarPromptControlDeleteIconLabel: string;
34
33
  toolbarPromptControlRecordButtonDefaultLabel: string;
35
34
  toolbarPromptControlRecordButtonActiveLabel: string;
36
35
  toolbarPromptControlSendActionLabel: 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
  /**
@@ -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
  };
@@ -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
  }
@@ -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: {
@@ -92,12 +92,11 @@ const GridHeaderCheckbox = /*#__PURE__*/React.forwardRef(function GridHeaderChec
92
92
  React.useEffect(() => {
93
93
  return apiRef.current.subscribeEvent('rowSelectionChange', handleSelectionChange);
94
94
  }, [apiRef, handleSelectionChange]);
95
- const label = apiRef.current.getLocaleText(isChecked ? 'checkboxSelectionUnselectAllRows' : 'checkboxSelectionSelectAllRows');
96
- const checked = rootProps.indeterminateCheckboxAction === 'select' ? isChecked && !isIndeterminate : isChecked;
95
+ const label = apiRef.current.getLocaleText(isChecked && !isIndeterminate ? 'checkboxSelectionUnselectAllRows' : 'checkboxSelectionSelectAllRows');
97
96
  return /*#__PURE__*/_jsx(rootProps.slots.baseCheckbox, _extends({
98
97
  ref: ref,
99
98
  indeterminate: isIndeterminate,
100
- checked: checked,
99
+ checked: isChecked && !isIndeterminate,
101
100
  onChange: handleChange,
102
101
  className: classes.root,
103
102
  inputProps: {
@@ -36,7 +36,7 @@ const GridToolbarColumnsButton = /*#__PURE__*/React.forwardRef(function GridTool
36
36
  return /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({
37
37
  title: apiRef.current.getLocaleText('toolbarColumnsLabel'),
38
38
  enterDelay: 1000
39
- }, tooltipProps, rootProps.slotProps?.baseTooltip, {
39
+ }, rootProps.slotProps?.baseTooltip, tooltipProps, {
40
40
  children: /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({
41
41
  ref: ref,
42
42
  id: columnButtonId,
@@ -45,10 +45,9 @@ const GridToolbarColumnsButton = /*#__PURE__*/React.forwardRef(function GridTool
45
45
  "aria-haspopup": "menu",
46
46
  "aria-expanded": isOpen,
47
47
  "aria-controls": isOpen ? columnPanelId : undefined,
48
- startIcon: /*#__PURE__*/_jsx(rootProps.slots.columnSelectorIcon, {})
49
- }, buttonProps, {
48
+ startIcon: /*#__PURE__*/_jsx(rootProps.slots.columnSelectorIcon, {}),
50
49
  onClick: showColumns
51
- }, rootProps.slotProps?.baseButton, {
50
+ }, rootProps.slotProps?.baseButton, buttonProps, {
52
51
  children: apiRef.current.getLocaleText('toolbarColumns')
53
52
  }))
54
53
  }));
@@ -83,7 +83,7 @@ const GridToolbarDensitySelector = /*#__PURE__*/React.forwardRef(function GridTo
83
83
  children: [/*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({
84
84
  title: apiRef.current.getLocaleText('toolbarDensityLabel'),
85
85
  enterDelay: 1000
86
- }, tooltipProps, rootProps.slotProps?.baseTooltip, {
86
+ }, rootProps.slotProps?.baseTooltip, tooltipProps, {
87
87
  children: /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({
88
88
  ref: handleRef,
89
89
  size: "small",
@@ -92,10 +92,9 @@ const GridToolbarDensitySelector = /*#__PURE__*/React.forwardRef(function GridTo
92
92
  "aria-haspopup": "menu",
93
93
  "aria-expanded": open,
94
94
  "aria-controls": open ? densityMenuId : undefined,
95
- id: densityButtonId
96
- }, buttonProps, {
95
+ id: densityButtonId,
97
96
  onClick: handleDensitySelectorOpen
98
- }, rootProps.slotProps?.baseButton, {
97
+ }, rootProps.slotProps?.baseButton, buttonProps, {
99
98
  children: apiRef.current.getLocaleText('toolbarDensity')
100
99
  }))
101
100
  })), /*#__PURE__*/_jsx(GridMenu, {