@mui/x-data-grid 5.13.1 → 5.14.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 (269) hide show
  1. package/CHANGELOG.md +44 -1
  2. package/DataGrid/useDataGridComponent.js +1 -1
  3. package/colDef/gridActionsColDef.js +2 -0
  4. package/colDef/gridBooleanColDef.js +3 -1
  5. package/colDef/gridCheckboxSelectionColDef.js +2 -0
  6. package/colDef/gridDateOperators.d.ts +1 -1
  7. package/colDef/gridStringColDef.d.ts +3 -0
  8. package/colDef/gridStringColDef.js +6 -0
  9. package/components/base/GridOverlays.js +4 -1
  10. package/components/cell/GridBooleanCell.d.ts +5 -2
  11. package/components/cell/GridBooleanCell.js +93 -2
  12. package/components/cell/GridEditDateCell.js +5 -1
  13. package/components/cell/index.d.ts +1 -0
  14. package/components/cell/index.js +1 -0
  15. package/components/columnSelection/GridCellCheckboxRenderer.js +7 -1
  16. package/components/containers/GridRootStyles.js +10 -0
  17. package/components/toolbar/GridToolbarExport.js +20 -10
  18. package/constants/gridClasses.d.ts +25 -1
  19. package/constants/gridClasses.js +1 -1
  20. package/constants/localeTextConstants.js +8 -1
  21. package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +2 -1
  22. package/hooks/features/columns/useGridColumnSpanning.js +9 -7
  23. package/hooks/features/columns/useGridColumns.d.ts +1 -1
  24. package/hooks/features/columns/useGridColumns.js +13 -6
  25. package/hooks/features/export/utils.d.ts +1 -1
  26. package/hooks/features/export/utils.js +9 -2
  27. package/hooks/features/filter/gridFilterUtils.js +6 -0
  28. package/hooks/features/filter/useGridFilter.d.ts +1 -1
  29. package/hooks/features/filter/useGridFilter.js +11 -4
  30. package/hooks/features/pagination/useGridPage.js +4 -3
  31. package/hooks/features/pagination/useGridPageSize.js +4 -3
  32. package/hooks/features/preferencesPanel/useGridPreferencesPanel.d.ts +1 -1
  33. package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +12 -4
  34. package/hooks/features/rows/gridRowsUtils.d.ts +1 -1
  35. package/hooks/features/selection/useGridSelection.js +24 -10
  36. package/hooks/features/sorting/gridSortingUtils.d.ts +1 -0
  37. package/hooks/features/sorting/gridSortingUtils.js +10 -11
  38. package/hooks/features/sorting/useGridSorting.d.ts +1 -1
  39. package/hooks/features/sorting/useGridSorting.js +34 -6
  40. package/hooks/features/statePersistence/gridStatePersistenceInterface.d.ts +12 -1
  41. package/hooks/features/statePersistence/index.d.ts +1 -1
  42. package/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
  43. package/hooks/features/virtualization/useGridVirtualScroller.js +3 -4
  44. package/hooks/utils/useGridApiEventHandler.d.ts +2 -2
  45. package/hooks/utils/useGridNativeEventListener.d.ts +1 -1
  46. package/hooks/utils/useGridNativeEventListener.js +1 -1
  47. package/index.js +1 -1
  48. package/internals/index.d.ts +2 -2
  49. package/internals/index.js +2 -2
  50. package/legacy/DataGrid/useDataGridComponent.js +1 -1
  51. package/legacy/colDef/gridActionsColDef.js +2 -0
  52. package/legacy/colDef/gridBooleanColDef.js +3 -1
  53. package/legacy/colDef/gridCheckboxSelectionColDef.js +2 -0
  54. package/legacy/colDef/gridStringColDef.js +6 -0
  55. package/legacy/components/base/GridOverlays.js +4 -1
  56. package/legacy/components/cell/GridBooleanCell.js +93 -2
  57. package/legacy/components/cell/GridEditDateCell.js +5 -1
  58. package/legacy/components/cell/index.js +1 -0
  59. package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +6 -1
  60. package/legacy/components/containers/GridRootStyles.js +3 -3
  61. package/legacy/components/toolbar/GridToolbarExport.js +20 -10
  62. package/legacy/constants/gridClasses.js +1 -1
  63. package/legacy/constants/localeTextConstants.js +8 -1
  64. package/legacy/hooks/features/columns/useGridColumnSpanning.js +9 -7
  65. package/legacy/hooks/features/columns/useGridColumns.js +13 -8
  66. package/legacy/hooks/features/export/utils.js +9 -2
  67. package/legacy/hooks/features/filter/gridFilterUtils.js +6 -0
  68. package/legacy/hooks/features/filter/useGridFilter.js +11 -4
  69. package/legacy/hooks/features/pagination/useGridPage.js +4 -3
  70. package/legacy/hooks/features/pagination/useGridPageSize.js +4 -3
  71. package/legacy/hooks/features/preferencesPanel/useGridPreferencesPanel.js +12 -4
  72. package/legacy/hooks/features/selection/useGridSelection.js +26 -12
  73. package/legacy/hooks/features/sorting/gridSortingUtils.js +11 -12
  74. package/legacy/hooks/features/sorting/useGridSorting.js +34 -6
  75. package/legacy/hooks/features/statePersistence/useGridStatePersistence.js +2 -1
  76. package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +3 -4
  77. package/legacy/hooks/utils/useGridNativeEventListener.js +1 -1
  78. package/legacy/index.js +1 -1
  79. package/legacy/internals/index.js +2 -2
  80. package/legacy/locales/arSD.js +7 -0
  81. package/legacy/locales/bgBG.js +7 -0
  82. package/legacy/locales/csCZ.js +7 -0
  83. package/legacy/locales/daDK.js +7 -0
  84. package/legacy/locales/deDE.js +8 -1
  85. package/legacy/locales/elGR.js +7 -0
  86. package/legacy/locales/esES.js +7 -0
  87. package/legacy/locales/faIR.js +7 -0
  88. package/legacy/locales/fiFI.js +7 -0
  89. package/legacy/locales/frFR.js +8 -1
  90. package/legacy/locales/heIL.js +8 -1
  91. package/legacy/locales/huHU.js +7 -0
  92. package/legacy/locales/index.js +2 -1
  93. package/legacy/locales/itIT.js +7 -0
  94. package/legacy/locales/jaJP.js +8 -1
  95. package/legacy/locales/koKR.js +7 -0
  96. package/legacy/locales/nbNO.js +8 -1
  97. package/legacy/locales/nlNL.js +8 -1
  98. package/legacy/locales/plPL.js +7 -0
  99. package/legacy/locales/ptBR.js +8 -1
  100. package/legacy/locales/roRO.js +8 -1
  101. package/legacy/locales/ruRU.js +7 -0
  102. package/legacy/locales/skSK.js +8 -1
  103. package/legacy/locales/svSE.js +8 -1
  104. package/legacy/locales/trTR.js +7 -0
  105. package/legacy/locales/ukUA.js +7 -0
  106. package/legacy/locales/viVN.js +7 -0
  107. package/legacy/locales/zhCN.js +7 -0
  108. package/legacy/locales/zhTW.js +135 -0
  109. package/legacy/models/events/gridEvents.js +1 -0
  110. package/locales/arSD.js +7 -0
  111. package/locales/bgBG.js +7 -0
  112. package/locales/csCZ.js +7 -0
  113. package/locales/daDK.js +7 -0
  114. package/locales/deDE.js +8 -1
  115. package/locales/elGR.js +7 -0
  116. package/locales/esES.js +7 -0
  117. package/locales/faIR.js +7 -0
  118. package/locales/fiFI.js +7 -0
  119. package/locales/frFR.js +8 -1
  120. package/locales/heIL.js +8 -1
  121. package/locales/huHU.js +7 -0
  122. package/locales/index.d.ts +1 -0
  123. package/locales/index.js +2 -1
  124. package/locales/itIT.js +7 -0
  125. package/locales/jaJP.js +8 -1
  126. package/locales/koKR.js +7 -0
  127. package/locales/nbNO.js +8 -1
  128. package/locales/nlNL.js +8 -1
  129. package/locales/plPL.js +7 -0
  130. package/locales/ptBR.js +8 -1
  131. package/locales/roRO.js +8 -1
  132. package/locales/ruRU.js +7 -0
  133. package/locales/skSK.js +8 -1
  134. package/locales/svSE.js +8 -1
  135. package/locales/trTR.js +7 -0
  136. package/locales/ukUA.js +7 -0
  137. package/locales/viVN.js +7 -0
  138. package/locales/zhCN.js +7 -0
  139. package/locales/zhTW.d.ts +2 -0
  140. package/locales/zhTW.js +123 -0
  141. package/models/api/gridColumnSpanning.d.ts +2 -0
  142. package/models/api/gridLocaleTextApi.d.ts +8 -2
  143. package/models/api/gridSelectionApi.d.ts +6 -0
  144. package/models/events/gridEvents.d.ts +1 -0
  145. package/models/events/gridEvents.js +1 -0
  146. package/models/gridRows.d.ts +10 -1
  147. package/models/params/gridCellParams.d.ts +4 -4
  148. package/modern/DataGrid/useDataGridComponent.js +1 -1
  149. package/modern/colDef/gridActionsColDef.js +2 -0
  150. package/modern/colDef/gridBooleanColDef.js +3 -1
  151. package/modern/colDef/gridCheckboxSelectionColDef.js +2 -0
  152. package/modern/colDef/gridStringColDef.js +6 -0
  153. package/modern/components/base/GridOverlays.js +4 -1
  154. package/modern/components/cell/GridBooleanCell.js +93 -2
  155. package/modern/components/cell/GridEditDateCell.js +5 -1
  156. package/modern/components/cell/index.js +1 -0
  157. package/modern/components/columnSelection/GridCellCheckboxRenderer.js +7 -1
  158. package/modern/components/containers/GridRootStyles.js +10 -0
  159. package/modern/components/toolbar/GridToolbarExport.js +20 -10
  160. package/modern/constants/gridClasses.js +1 -1
  161. package/modern/constants/localeTextConstants.js +8 -1
  162. package/modern/hooks/features/columns/useGridColumnSpanning.js +9 -7
  163. package/modern/hooks/features/columns/useGridColumns.js +10 -5
  164. package/modern/hooks/features/export/utils.js +5 -2
  165. package/modern/hooks/features/filter/gridFilterUtils.js +6 -0
  166. package/modern/hooks/features/filter/useGridFilter.js +8 -3
  167. package/modern/hooks/features/pagination/useGridPage.js +4 -3
  168. package/modern/hooks/features/pagination/useGridPageSize.js +4 -3
  169. package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +8 -4
  170. package/modern/hooks/features/selection/useGridSelection.js +22 -10
  171. package/modern/hooks/features/sorting/gridSortingUtils.js +10 -11
  172. package/modern/hooks/features/sorting/useGridSorting.js +30 -6
  173. package/modern/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
  174. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +3 -4
  175. package/modern/hooks/utils/useGridNativeEventListener.js +1 -1
  176. package/modern/index.js +1 -1
  177. package/modern/internals/index.js +2 -2
  178. package/modern/locales/arSD.js +7 -0
  179. package/modern/locales/bgBG.js +7 -0
  180. package/modern/locales/csCZ.js +7 -0
  181. package/modern/locales/daDK.js +7 -0
  182. package/modern/locales/deDE.js +8 -1
  183. package/modern/locales/elGR.js +7 -0
  184. package/modern/locales/esES.js +7 -0
  185. package/modern/locales/faIR.js +7 -0
  186. package/modern/locales/fiFI.js +7 -0
  187. package/modern/locales/frFR.js +8 -1
  188. package/modern/locales/heIL.js +8 -1
  189. package/modern/locales/huHU.js +7 -0
  190. package/modern/locales/index.js +2 -1
  191. package/modern/locales/itIT.js +7 -0
  192. package/modern/locales/jaJP.js +8 -1
  193. package/modern/locales/koKR.js +7 -0
  194. package/modern/locales/nbNO.js +8 -1
  195. package/modern/locales/nlNL.js +8 -1
  196. package/modern/locales/plPL.js +7 -0
  197. package/modern/locales/ptBR.js +8 -1
  198. package/modern/locales/roRO.js +8 -1
  199. package/modern/locales/ruRU.js +7 -0
  200. package/modern/locales/skSK.js +8 -1
  201. package/modern/locales/svSE.js +8 -1
  202. package/modern/locales/trTR.js +7 -0
  203. package/modern/locales/ukUA.js +7 -0
  204. package/modern/locales/viVN.js +7 -0
  205. package/modern/locales/zhCN.js +7 -0
  206. package/modern/locales/zhTW.js +123 -0
  207. package/modern/models/events/gridEvents.js +1 -0
  208. package/node/DataGrid/useDataGridComponent.js +1 -1
  209. package/node/colDef/gridActionsColDef.js +2 -0
  210. package/node/colDef/gridBooleanColDef.js +3 -1
  211. package/node/colDef/gridCheckboxSelectionColDef.js +2 -0
  212. package/node/colDef/gridStringColDef.js +5 -0
  213. package/node/components/base/GridOverlays.js +4 -1
  214. package/node/components/cell/GridBooleanCell.js +93 -2
  215. package/node/components/cell/GridEditDateCell.js +7 -1
  216. package/node/components/cell/index.js +13 -0
  217. package/node/components/columnSelection/GridCellCheckboxRenderer.js +7 -1
  218. package/node/components/containers/GridRootStyles.js +10 -0
  219. package/node/components/toolbar/GridToolbarExport.js +16 -10
  220. package/node/constants/gridClasses.js +1 -1
  221. package/node/constants/localeTextConstants.js +8 -1
  222. package/node/hooks/features/columns/useGridColumnSpanning.js +9 -7
  223. package/node/hooks/features/columns/useGridColumns.js +13 -6
  224. package/node/hooks/features/export/utils.js +10 -2
  225. package/node/hooks/features/filter/gridFilterUtils.js +7 -0
  226. package/node/hooks/features/filter/useGridFilter.js +11 -4
  227. package/node/hooks/features/pagination/useGridPage.js +4 -3
  228. package/node/hooks/features/pagination/useGridPageSize.js +4 -3
  229. package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +12 -4
  230. package/node/hooks/features/selection/useGridSelection.js +24 -10
  231. package/node/hooks/features/sorting/gridSortingUtils.js +10 -11
  232. package/node/hooks/features/sorting/useGridSorting.js +34 -6
  233. package/node/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
  234. package/node/hooks/features/virtualization/useGridVirtualScroller.js +3 -4
  235. package/node/hooks/utils/useGridNativeEventListener.js +1 -1
  236. package/node/index.js +1 -1
  237. package/node/internals/index.js +18 -0
  238. package/node/locales/arSD.js +7 -0
  239. package/node/locales/bgBG.js +7 -0
  240. package/node/locales/csCZ.js +7 -0
  241. package/node/locales/daDK.js +7 -0
  242. package/node/locales/deDE.js +8 -1
  243. package/node/locales/elGR.js +7 -0
  244. package/node/locales/esES.js +7 -0
  245. package/node/locales/faIR.js +7 -0
  246. package/node/locales/fiFI.js +7 -0
  247. package/node/locales/frFR.js +8 -1
  248. package/node/locales/heIL.js +8 -1
  249. package/node/locales/huHU.js +7 -0
  250. package/node/locales/index.js +13 -0
  251. package/node/locales/itIT.js +7 -0
  252. package/node/locales/jaJP.js +8 -1
  253. package/node/locales/koKR.js +7 -0
  254. package/node/locales/nbNO.js +8 -1
  255. package/node/locales/nlNL.js +8 -1
  256. package/node/locales/plPL.js +7 -0
  257. package/node/locales/ptBR.js +8 -1
  258. package/node/locales/roRO.js +8 -1
  259. package/node/locales/ruRU.js +7 -0
  260. package/node/locales/skSK.js +8 -1
  261. package/node/locales/svSE.js +8 -1
  262. package/node/locales/trTR.js +7 -0
  263. package/node/locales/ukUA.js +7 -0
  264. package/node/locales/viVN.js +7 -0
  265. package/node/locales/zhCN.js +7 -0
  266. package/node/locales/zhTW.js +133 -0
  267. package/node/models/events/gridEvents.js +1 -0
  268. package/package.json +1 -1
  269. package/utils/getGridLocalization.d.ts +1 -1
@@ -111,6 +111,13 @@ const heILGrid = {
111
111
  expandDetailPanel: 'הרחב',
112
112
  collapseDetailPanel: 'כווץ',
113
113
  // Row reordering text
114
- rowReorderingHeaderName: 'סידור שורות'
114
+ rowReorderingHeaderName: 'סידור שורות' // Aggregation
115
+ // aggregationMenuItemHeader: 'Aggregation',
116
+ // aggregationFunctionLabelSum: 'sum',
117
+ // aggregationFunctionLabelAvg: 'avg',
118
+ // aggregationFunctionLabelMin: 'min',
119
+ // aggregationFunctionLabelMax: 'max',
120
+ // aggregationFunctionLabelSize: 'size',
121
+
115
122
  };
116
123
  export const heIL = getGridLocalization(heILGrid, heILCore);
@@ -111,6 +111,13 @@ const huHUGrid = {
111
111
  expandDetailPanel: 'Kibontás',
112
112
  collapseDetailPanel: 'Összecsukás' // Row reordering text
113
113
  // rowReorderingHeaderName: 'Row reordering',
114
+ // Aggregation
115
+ // aggregationMenuItemHeader: 'Aggregation',
116
+ // aggregationFunctionLabelSum: 'sum',
117
+ // aggregationFunctionLabelAvg: 'avg',
118
+ // aggregationFunctionLabelMin: 'min',
119
+ // aggregationFunctionLabelMax: 'max',
120
+ // aggregationFunctionLabelSize: 'size',
114
121
 
115
122
  };
116
123
  export const huHU = getGridLocalization(huHUGrid, huHUCore);
@@ -26,4 +26,5 @@ export * from './svSE';
26
26
  export * from './trTR';
27
27
  export * from './ukUA';
28
28
  export * from './viVN';
29
- export * from './zhCN';
29
+ export * from './zhCN';
30
+ export * from './zhTW';
@@ -111,6 +111,13 @@ const itITGrid = {
111
111
  // collapseDetailPanel: 'Collapse',
112
112
  // Row reordering text
113
113
  // rowReorderingHeaderName: 'Row reordering',
114
+ // Aggregation
115
+ // aggregationMenuItemHeader: 'Aggregation',
116
+ // aggregationFunctionLabelSum: 'sum',
117
+ // aggregationFunctionLabelAvg: 'avg',
118
+ // aggregationFunctionLabelMin: 'min',
119
+ // aggregationFunctionLabelMax: 'max',
120
+ // aggregationFunctionLabelSize: 'size',
114
121
 
115
122
  };
116
123
  export const itIT = getGridLocalization(itITGrid, itITCore);
@@ -111,6 +111,13 @@ const jaJPGrid = {
111
111
  expandDetailPanel: '展開',
112
112
  collapseDetailPanel: '折りたたみ',
113
113
  // Row reordering text
114
- rowReorderingHeaderName: '行並び替え'
114
+ rowReorderingHeaderName: '行並び替え' // Aggregation
115
+ // aggregationMenuItemHeader: 'Aggregation',
116
+ // aggregationFunctionLabelSum: 'sum',
117
+ // aggregationFunctionLabelAvg: 'avg',
118
+ // aggregationFunctionLabelMin: 'min',
119
+ // aggregationFunctionLabelMax: 'max',
120
+ // aggregationFunctionLabelSize: 'size',
121
+
115
122
  };
116
123
  export const jaJP = getGridLocalization(jaJPGrid, jaJPCore);
@@ -111,6 +111,13 @@ const koKRGrid = {
111
111
  // collapseDetailPanel: 'Collapse',
112
112
  // Row reordering text
113
113
  // rowReorderingHeaderName: 'Row reordering',
114
+ // Aggregation
115
+ // aggregationMenuItemHeader: 'Aggregation',
116
+ // aggregationFunctionLabelSum: 'sum',
117
+ // aggregationFunctionLabelAvg: 'avg',
118
+ // aggregationFunctionLabelMin: 'min',
119
+ // aggregationFunctionLabelMax: 'max',
120
+ // aggregationFunctionLabelSize: 'size',
114
121
 
115
122
  };
116
123
  export const koKR = getGridLocalization(koKRGrid, koKRCore);
@@ -111,6 +111,13 @@ const nbNOGrid = {
111
111
  expandDetailPanel: 'Utvid',
112
112
  collapseDetailPanel: 'Kollaps',
113
113
  // Row reordering text
114
- rowReorderingHeaderName: 'Rad reorganisering'
114
+ rowReorderingHeaderName: 'Rad reorganisering' // Aggregation
115
+ // aggregationMenuItemHeader: 'Aggregation',
116
+ // aggregationFunctionLabelSum: 'sum',
117
+ // aggregationFunctionLabelAvg: 'avg',
118
+ // aggregationFunctionLabelMin: 'min',
119
+ // aggregationFunctionLabelMax: 'max',
120
+ // aggregationFunctionLabelSize: 'size',
121
+
115
122
  };
116
123
  export const nbNO = getGridLocalization(nbNOGrid, nbNOCore);
@@ -111,6 +111,13 @@ const nlNLGrid = {
111
111
  expandDetailPanel: 'Uitklappen',
112
112
  collapseDetailPanel: 'Inklappen',
113
113
  // Row reordering text
114
- rowReorderingHeaderName: 'Rijen hersorteren'
114
+ rowReorderingHeaderName: 'Rijen hersorteren' // Aggregation
115
+ // aggregationMenuItemHeader: 'Aggregation',
116
+ // aggregationFunctionLabelSum: 'sum',
117
+ // aggregationFunctionLabelAvg: 'avg',
118
+ // aggregationFunctionLabelMin: 'min',
119
+ // aggregationFunctionLabelMax: 'max',
120
+ // aggregationFunctionLabelSize: 'size',
121
+
115
122
  };
116
123
  export const nlNL = getGridLocalization(nlNLGrid, nlNLCore);
@@ -111,6 +111,13 @@ const plPLGrid = {
111
111
  expandDetailPanel: 'Rozwiń',
112
112
  collapseDetailPanel: 'Zwiń' // Row reordering text
113
113
  // rowReorderingHeaderName: 'Row reordering',
114
+ // Aggregation
115
+ // aggregationMenuItemHeader: 'Aggregation',
116
+ // aggregationFunctionLabelSum: 'sum',
117
+ // aggregationFunctionLabelAvg: 'avg',
118
+ // aggregationFunctionLabelMin: 'min',
119
+ // aggregationFunctionLabelMax: 'max',
120
+ // aggregationFunctionLabelSize: 'size',
114
121
 
115
122
  };
116
123
  export const plPL = getGridLocalization(plPLGrid, plPLCore);
@@ -111,6 +111,13 @@ const ptBRGrid = {
111
111
  expandDetailPanel: 'Expandir',
112
112
  collapseDetailPanel: 'Esconder',
113
113
  // Row reordering text
114
- rowReorderingHeaderName: 'Reorganizar linhas'
114
+ rowReorderingHeaderName: 'Reorganizar linhas' // Aggregation
115
+ // aggregationMenuItemHeader: 'Aggregation',
116
+ // aggregationFunctionLabelSum: 'sum',
117
+ // aggregationFunctionLabelAvg: 'avg',
118
+ // aggregationFunctionLabelMin: 'min',
119
+ // aggregationFunctionLabelMax: 'max',
120
+ // aggregationFunctionLabelSize: 'size',
121
+
115
122
  };
116
123
  export const ptBR = getGridLocalization(ptBRGrid, ptBRCore);
@@ -111,6 +111,13 @@ const roROGrid = {
111
111
  expandDetailPanel: 'Extindere',
112
112
  collapseDetailPanel: 'Restrângere',
113
113
  // Row reordering text
114
- rowReorderingHeaderName: 'Reordonare rânduri'
114
+ rowReorderingHeaderName: 'Reordonare rânduri' // Aggregation
115
+ // aggregationMenuItemHeader: 'Aggregation',
116
+ // aggregationFunctionLabelSum: 'sum',
117
+ // aggregationFunctionLabelAvg: 'avg',
118
+ // aggregationFunctionLabelMin: 'min',
119
+ // aggregationFunctionLabelMax: 'max',
120
+ // aggregationFunctionLabelSize: 'size',
121
+
115
122
  };
116
123
  export const roRO = getGridLocalization(roROGrid, roROCore);
@@ -144,6 +144,13 @@ const ruRUGrid = {
144
144
  expandDetailPanel: 'Развернуть',
145
145
  collapseDetailPanel: 'Свернуть' // Row reordering text
146
146
  // rowReorderingHeaderName: 'Row reordering',
147
+ // Aggregation
148
+ // aggregationMenuItemHeader: 'Aggregation',
149
+ // aggregationFunctionLabelSum: 'sum',
150
+ // aggregationFunctionLabelAvg: 'avg',
151
+ // aggregationFunctionLabelMin: 'min',
152
+ // aggregationFunctionLabelMax: 'max',
153
+ // aggregationFunctionLabelSize: 'size',
147
154
 
148
155
  };
149
156
  export const ruRU = getGridLocalization(ruRUGrid, ruRUCore);
@@ -146,6 +146,13 @@ const skSKGrid = {
146
146
  expandDetailPanel: 'Rozbaliť',
147
147
  collapseDetailPanel: 'Zbaliť',
148
148
  // Row reordering text
149
- rowReorderingHeaderName: 'Preusporiadávanie riadkov'
149
+ rowReorderingHeaderName: 'Preusporiadávanie riadkov' // Aggregation
150
+ // aggregationMenuItemHeader: 'Aggregation',
151
+ // aggregationFunctionLabelSum: 'sum',
152
+ // aggregationFunctionLabelAvg: 'avg',
153
+ // aggregationFunctionLabelMin: 'min',
154
+ // aggregationFunctionLabelMax: 'max',
155
+ // aggregationFunctionLabelSize: 'size',
156
+
150
157
  };
151
158
  export const skSK = getGridLocalization(skSKGrid, skSKCore);
@@ -111,6 +111,13 @@ const svSEGrid = {
111
111
  expandDetailPanel: 'Expandera',
112
112
  collapseDetailPanel: 'Kollapsa',
113
113
  // Row reordering text
114
- rowReorderingHeaderName: 'Ordna om rader'
114
+ rowReorderingHeaderName: 'Ordna om rader' // Aggregation
115
+ // aggregationMenuItemHeader: 'Aggregation',
116
+ // aggregationFunctionLabelSum: 'sum',
117
+ // aggregationFunctionLabelAvg: 'avg',
118
+ // aggregationFunctionLabelMin: 'min',
119
+ // aggregationFunctionLabelMax: 'max',
120
+ // aggregationFunctionLabelSize: 'size',
121
+
115
122
  };
116
123
  export const svSE = getGridLocalization(svSEGrid, svSECore);
@@ -111,6 +111,13 @@ const trTRGrid = {
111
111
  expandDetailPanel: 'Genişlet',
112
112
  collapseDetailPanel: 'Gizle' // Row reordering text
113
113
  // rowReorderingHeaderName: 'Row reordering',
114
+ // Aggregation
115
+ // aggregationMenuItemHeader: 'Aggregation',
116
+ // aggregationFunctionLabelSum: 'sum',
117
+ // aggregationFunctionLabelAvg: 'avg',
118
+ // aggregationFunctionLabelMin: 'min',
119
+ // aggregationFunctionLabelMax: 'max',
120
+ // aggregationFunctionLabelSize: 'size',
114
121
 
115
122
  };
116
123
  export const trTR = getGridLocalization(trTRGrid, trTRCore);
@@ -137,6 +137,13 @@ const ukUAGrid = {
137
137
  // collapseDetailPanel: 'Collapse',
138
138
  // Row reordering text
139
139
  // rowReorderingHeaderName: 'Row reordering',
140
+ // Aggregation
141
+ // aggregationMenuItemHeader: 'Aggregation',
142
+ // aggregationFunctionLabelSum: 'sum',
143
+ // aggregationFunctionLabelAvg: 'avg',
144
+ // aggregationFunctionLabelMin: 'min',
145
+ // aggregationFunctionLabelMax: 'max',
146
+ // aggregationFunctionLabelSize: 'size',
140
147
 
141
148
  };
142
149
  export const ukUA = getGridLocalization(ukUAGrid, ukUACore);
@@ -111,6 +111,13 @@ const viVNGrid = {
111
111
  // collapseDetailPanel: 'Collapse',
112
112
  // Row reordering text
113
113
  // rowReorderingHeaderName: 'Row reordering',
114
+ // Aggregation
115
+ // aggregationMenuItemHeader: 'Aggregation',
116
+ // aggregationFunctionLabelSum: 'sum',
117
+ // aggregationFunctionLabelAvg: 'avg',
118
+ // aggregationFunctionLabelMin: 'min',
119
+ // aggregationFunctionLabelMax: 'max',
120
+ // aggregationFunctionLabelSize: 'size',
114
121
 
115
122
  };
116
123
  export const viVN = getGridLocalization(viVNGrid, viVNCore);
@@ -111,6 +111,13 @@ const zhCNGrid = {
111
111
  // collapseDetailPanel: 'Collapse',
112
112
  // Row reordering text
113
113
  // rowReorderingHeaderName: 'Row reordering',
114
+ // Aggregation
115
+ // aggregationMenuItemHeader: 'Aggregation',
116
+ // aggregationFunctionLabelSum: 'sum',
117
+ // aggregationFunctionLabelAvg: 'avg',
118
+ // aggregationFunctionLabelMin: 'min',
119
+ // aggregationFunctionLabelMax: 'max',
120
+ // aggregationFunctionLabelSize: 'size',
114
121
 
115
122
  };
116
123
  export const zhCN = getGridLocalization(zhCNGrid, zhCNCore);
@@ -0,0 +1,123 @@
1
+ import { zhTW as zhTWCore } from '@mui/material/locale';
2
+ import { getGridLocalization } from '../utils/getGridLocalization';
3
+ const zhTWGrid = {
4
+ // Root
5
+ noRowsLabel: '沒有資料',
6
+ noResultsOverlayLabel: '沒有結果',
7
+ errorOverlayDefaultLabel: '發生錯誤',
8
+ // Density selector toolbar button text
9
+ toolbarDensity: '表格密度',
10
+ toolbarDensityLabel: '表格密度',
11
+ toolbarDensityCompact: '緊湊',
12
+ toolbarDensityStandard: '標準',
13
+ toolbarDensityComfortable: '舒適',
14
+ // Columns selector toolbar button text
15
+ toolbarColumns: '欄位',
16
+ toolbarColumnsLabel: '選擇欄位',
17
+ // Filters toolbar button text
18
+ toolbarFilters: '篩選器',
19
+ toolbarFiltersLabel: '顯示篩選器',
20
+ toolbarFiltersTooltipHide: '隱藏篩選器',
21
+ toolbarFiltersTooltipShow: '顯示篩選器',
22
+ toolbarFiltersTooltipActive: count => `${count} 個篩選器`,
23
+ // Quick filter toolbar field
24
+ toolbarQuickFilterPlaceholder: '搜尋...',
25
+ toolbarQuickFilterLabel: '搜尋',
26
+ toolbarQuickFilterDeleteIconLabel: '清除',
27
+ // Export selector toolbar button text
28
+ toolbarExport: '匯出',
29
+ toolbarExportLabel: '匯出',
30
+ toolbarExportCSV: '匯出 CSV',
31
+ toolbarExportPrint: '列印',
32
+ toolbarExportExcel: '匯出 Excel',
33
+ // Columns panel text
34
+ columnsPanelTextFieldLabel: '欄位搜尋',
35
+ columnsPanelTextFieldPlaceholder: '欄位名稱',
36
+ columnsPanelDragIconLabel: '排序欄位',
37
+ columnsPanelShowAllButton: '顯示所有',
38
+ columnsPanelHideAllButton: '隱藏所有',
39
+ // Filter panel text
40
+ filterPanelAddFilter: '增加篩選器',
41
+ filterPanelDeleteIconLabel: '刪除',
42
+ filterPanelLinkOperator: '邏輯運算子',
43
+ filterPanelOperators: '運算子',
44
+ // TODO v6: rename to filterPanelOperator
45
+ filterPanelOperatorAnd: '且',
46
+ filterPanelOperatorOr: '或',
47
+ filterPanelColumns: '欄位',
48
+ filterPanelInputLabel: '值',
49
+ filterPanelInputPlaceholder: '篩選值',
50
+ // Filter operators text
51
+ filterOperatorContains: '包含',
52
+ filterOperatorEquals: '等於',
53
+ filterOperatorStartsWith: '以...開頭',
54
+ filterOperatorEndsWith: '以...結束',
55
+ filterOperatorIs: '為',
56
+ filterOperatorNot: '不為',
57
+ filterOperatorAfter: '...之後',
58
+ filterOperatorOnOrAfter: '...(含)之後',
59
+ filterOperatorBefore: '...之前',
60
+ filterOperatorOnOrBefore: '...(含)之前',
61
+ filterOperatorIsEmpty: '為空',
62
+ filterOperatorIsNotEmpty: '不為空',
63
+ filterOperatorIsAnyOf: '是其中之一',
64
+ // Filter values text
65
+ filterValueAny: '任何值',
66
+ filterValueTrue: '真',
67
+ filterValueFalse: '假',
68
+ // Column menu text
69
+ columnMenuLabel: '選單',
70
+ columnMenuShowColumns: '顯示欄位',
71
+ columnMenuFilter: '篩選器',
72
+ columnMenuHideColumn: '隱藏',
73
+ columnMenuUnsort: '預設排序',
74
+ columnMenuSortAsc: '升序',
75
+ columnMenuSortDesc: '降序',
76
+ // Column header text
77
+ columnHeaderFiltersTooltipActive: count => `${count} 個篩選器`,
78
+ columnHeaderFiltersLabel: '顯示篩選器',
79
+ columnHeaderSortIconLabel: '排序',
80
+ // Rows selected footer text
81
+ footerRowSelected: count => `已選取 ${count.toLocaleString()} 個`,
82
+ // Total row amount footer text
83
+ footerTotalRows: '總數:',
84
+ // Total visible row amount footer text
85
+ footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} / ${totalCount.toLocaleString()}`,
86
+ // Checkbox selection text
87
+ checkboxSelectionHeaderName: '核取方塊',
88
+ checkboxSelectionSelectAllRows: '全選',
89
+ checkboxSelectionUnselectAllRows: '取消全選',
90
+ checkboxSelectionSelectRow: '選取',
91
+ checkboxSelectionUnselectRow: '取消選取',
92
+ // Boolean cell text
93
+ booleanCellTrueLabel: '真',
94
+ booleanCellFalseLabel: '假',
95
+ // Actions cell more text
96
+ actionsCellMore: '查看更多',
97
+ // Column pinning text
98
+ pinToLeft: '釘選在左側',
99
+ pinToRight: '釘選在右側',
100
+ unpin: '取消釘選',
101
+ // Tree Data
102
+ treeDataGroupingHeaderName: '群組',
103
+ treeDataExpand: '查看子項目',
104
+ treeDataCollapse: '隱藏子項目',
105
+ // Grouping columns
106
+ groupingColumnHeaderName: '群組',
107
+ groupColumn: name => `以 ${name} 分組`,
108
+ unGroupColumn: name => `取消以 ${name} 分組`,
109
+ // Master/detail
110
+ detailPanelToggle: '切換顯示詳細資訊',
111
+ expandDetailPanel: '展開',
112
+ collapseDetailPanel: '摺疊',
113
+ // Row reordering text
114
+ rowReorderingHeaderName: '排序' // Aggregation
115
+ // aggregationMenuItemHeader: 'Aggregation',
116
+ // aggregationFunctionLabelSum: 'sum',
117
+ // aggregationFunctionLabelAvg: 'avg',
118
+ // aggregationFunctionLabelMin: 'min',
119
+ // aggregationFunctionLabelMax: 'max',
120
+ // aggregationFunctionLabelSize: 'size',
121
+
122
+ };
123
+ export const zhTW = getGridLocalization(zhTWGrid, zhTWCore);
@@ -54,6 +54,7 @@ var GridEvents;
54
54
  GridEvents["pageChange"] = "pageChange";
55
55
  GridEvents["pageSizeChange"] = "pageSizeChange";
56
56
  GridEvents["rowGroupingModelChange"] = "rowGroupingModelChange";
57
+ GridEvents["aggregationModelChange"] = "aggregationModelChange";
57
58
  GridEvents["rowsScroll"] = "rowsScroll";
58
59
  GridEvents["rowsScrollEnd"] = "rowsScrollEnd";
59
60
  GridEvents["columnSeparatorMouseDown"] = "columnSeparatorMouseDown";
@@ -94,7 +94,7 @@ const useDataGridComponent = props => {
94
94
  const useGridEditing = (_props$experimentalFe2 = props.experimentalFeatures) != null && _props$experimentalFe2.newEditingApi ? _useGridEditing2.useGridEditing : _useGridEditing.useGridEditing;
95
95
  useGridEditing(apiRef, props);
96
96
  (0, _useGridFocus.useGridFocus)(apiRef, props);
97
- (0, _useGridPreferencesPanel.useGridPreferencesPanel)(apiRef);
97
+ (0, _useGridPreferencesPanel.useGridPreferencesPanel)(apiRef, props);
98
98
  (0, _useGridFilter.useGridFilter)(apiRef, props);
99
99
  (0, _useGridSorting.useGridSorting)(apiRef, props);
100
100
  (0, _useGridDensity.useGridDensity)(apiRef, props);
@@ -18,6 +18,8 @@ exports.GRID_ACTIONS_COLUMN_TYPE = GRID_ACTIONS_COLUMN_TYPE;
18
18
  const GRID_ACTIONS_COL_DEF = (0, _extends2.default)({}, _gridStringColDef.GRID_STRING_COL_DEF, {
19
19
  sortable: false,
20
20
  filterable: false,
21
+ // @ts-ignore
22
+ aggregable: false,
21
23
  width: 100,
22
24
  align: 'center',
23
25
  headerAlign: 'center',
@@ -35,6 +35,8 @@ const GRID_BOOLEAN_COL_DEF = (0, _extends2.default)({}, _gridStringColDef.GRID_S
35
35
  sortComparator: _gridSortingUtils.gridNumberComparator,
36
36
  valueFormatter: gridBooleanFormatter,
37
37
  filterOperators: (0, _gridBooleanOperators.getGridBooleanOperators)(),
38
- getApplyQuickFilterFn: undefined
38
+ getApplyQuickFilterFn: undefined,
39
+ // @ts-ignore
40
+ aggregable: false
39
41
  });
40
42
  exports.GRID_BOOLEAN_COL_DEF = GRID_BOOLEAN_COL_DEF;
@@ -34,6 +34,8 @@ const GRID_CHECKBOX_SELECTION_COL_DEF = (0, _extends2.default)({}, _gridBooleanC
34
34
  resizable: false,
35
35
  sortable: false,
36
36
  filterable: false,
37
+ // @ts-ignore
38
+ aggregable: false,
37
39
  disableColumnMenu: true,
38
40
  disableReorder: true,
39
41
  disableExport: true,
@@ -11,6 +11,9 @@ var _gridSortingUtils = require("../hooks/features/sorting/gridSortingUtils");
11
11
 
12
12
  var _gridStringOperators = require("./gridStringOperators");
13
13
 
14
+ /**
15
+ * TODO: Move pro and premium properties outside of this Community file
16
+ */
14
17
  const GRID_STRING_COL_DEF = {
15
18
  width: 100,
16
19
  minWidth: 50,
@@ -22,6 +25,8 @@ const GRID_STRING_COL_DEF = {
22
25
  filterable: true,
23
26
  groupable: true,
24
27
  pinnable: true,
28
+ // @ts-ignore
29
+ private_aggregable: true,
25
30
  editable: false,
26
31
  sortComparator: _gridSortingUtils.gridStringOrNumberComparator,
27
32
  type: 'string',
@@ -66,7 +66,10 @@ function GridOverlayWrapper(props) {
66
66
  width: (_viewportInnerSize$wi = viewportInnerSize == null ? void 0 : viewportInnerSize.width) != null ? _viewportInnerSize$wi : 0,
67
67
  position: 'absolute',
68
68
  top: headerHeight,
69
- bottom: height === 'auto' ? 0 : undefined
69
+ bottom: height === 'auto' ? 0 : undefined,
70
+ zIndex: 3,
71
+ // should be above pinned columns and detail panel
72
+ pointerEvents: 'none'
70
73
  }
71
74
  }, props));
72
75
  }
@@ -13,6 +13,8 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
13
13
 
14
14
  var React = _interopRequireWildcard(require("react"));
15
15
 
16
+ var _propTypes = _interopRequireDefault(require("prop-types"));
17
+
16
18
  var _material = require("@mui/material");
17
19
 
18
20
  var _gridClasses = require("../../constants/gridClasses");
@@ -39,7 +41,7 @@ const useUtilityClasses = ownerState => {
39
41
  return (0, _material.unstable_composeClasses)(slots, _gridClasses.getDataGridUtilityClass, classes);
40
42
  };
41
43
 
42
- const GridBooleanCell = /*#__PURE__*/React.memo(props => {
44
+ const GridBooleanCellRaw = props => {
43
45
  const {
44
46
  value
45
47
  } = props,
@@ -57,7 +59,96 @@ const GridBooleanCell = /*#__PURE__*/React.memo(props => {
57
59
  titleAccess: apiRef.current.getLocaleText(value ? 'booleanCellTrueLabel' : 'booleanCellFalseLabel'),
58
60
  "data-value": Boolean(value)
59
61
  }, other));
60
- });
62
+ };
63
+
64
+ process.env.NODE_ENV !== "production" ? GridBooleanCellRaw.propTypes = {
65
+ // ----------------------------- Warning --------------------------------
66
+ // | These PropTypes are generated from the TypeScript type definitions |
67
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
68
+ // ----------------------------------------------------------------------
69
+
70
+ /**
71
+ * GridApi that let you manipulate the grid.
72
+ * @deprecated Use the `apiRef` returned by `useGridApiContext` or `useGridApiRef` (only available in `@mui/x-data-grid-pro`)
73
+ */
74
+ api: _propTypes.default.any.isRequired,
75
+
76
+ /**
77
+ * The mode of the cell.
78
+ */
79
+ cellMode: _propTypes.default.oneOf(['edit', 'view']).isRequired,
80
+
81
+ /**
82
+ * The column of the row that the current cell belongs to.
83
+ */
84
+ colDef: _propTypes.default.object.isRequired,
85
+
86
+ /**
87
+ * The column field of the cell that triggered the event.
88
+ */
89
+ field: _propTypes.default.string.isRequired,
90
+
91
+ /**
92
+ * A ref allowing to set imperative focus.
93
+ * It can be passed to the element that should receive focus.
94
+ * @ignore - do not document.
95
+ */
96
+ focusElementRef: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.shape({
97
+ current: _propTypes.default.shape({
98
+ focus: _propTypes.default.func.isRequired
99
+ })
100
+ })]),
101
+
102
+ /**
103
+ * The cell value formatted with the column valueFormatter.
104
+ */
105
+ formattedValue: _propTypes.default.any,
106
+
107
+ /**
108
+ * Get the cell value of a row and field.
109
+ * @param {GridRowId} id The row id.
110
+ * @param {string} field The field.
111
+ * @returns {any} The cell value.
112
+ * @deprecated Use `params.row` to directly access the fields you want instead.
113
+ */
114
+ getValue: _propTypes.default.func.isRequired,
115
+
116
+ /**
117
+ * If true, the cell is the active element.
118
+ */
119
+ hasFocus: _propTypes.default.bool.isRequired,
120
+
121
+ /**
122
+ * The grid row id.
123
+ */
124
+ id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
125
+
126
+ /**
127
+ * If true, the cell is editable.
128
+ */
129
+ isEditable: _propTypes.default.bool,
130
+
131
+ /**
132
+ * The row model of the row that the current cell belongs to.
133
+ */
134
+ row: _propTypes.default.object.isRequired,
135
+
136
+ /**
137
+ * The node of the row that the current cell belongs to.
138
+ */
139
+ rowNode: _propTypes.default.object.isRequired,
140
+
141
+ /**
142
+ * the tabIndex value.
143
+ */
144
+ tabIndex: _propTypes.default.oneOf([-1, 0]).isRequired,
145
+
146
+ /**
147
+ * The cell value, but if the column has valueGetter, use getValue.
148
+ */
149
+ value: _propTypes.default.any
150
+ } : void 0;
151
+ const GridBooleanCell = /*#__PURE__*/React.memo(GridBooleanCellRaw);
61
152
  exports.GridBooleanCell = GridBooleanCell;
62
153
 
63
154
  const renderBooleanCell = params => {
@@ -22,6 +22,8 @@ var _utils = require("@mui/material/utils");
22
22
 
23
23
  var _InputBase = _interopRequireDefault(require("@mui/material/InputBase"));
24
24
 
25
+ var _styles = require("@mui/material/styles");
26
+
25
27
  var _gridClasses = require("../../constants/gridClasses");
26
28
 
27
29
  var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
@@ -36,6 +38,10 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
36
38
 
37
39
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
38
40
 
41
+ const StyledInputBase = (0, _styles.styled)(_InputBase.default)({
42
+ fontSize: 'inherit'
43
+ });
44
+
39
45
  const useUtilityClasses = ownerState => {
40
46
  const {
41
47
  classes
@@ -140,7 +146,7 @@ function GridEditDateCell(props) {
140
146
  inputRef.current.focus();
141
147
  }
142
148
  }, [hasFocus]);
143
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputBase.default, (0, _extends2.default)({
149
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledInputBase, (0, _extends2.default)({
144
150
  inputRef: inputRef,
145
151
  fullWidth: true,
146
152
  className: classes.root,
@@ -17,6 +17,19 @@ Object.keys(_GridCell).forEach(function (key) {
17
17
  });
18
18
  });
19
19
 
20
+ var _GridBooleanCell = require("./GridBooleanCell");
21
+
22
+ Object.keys(_GridBooleanCell).forEach(function (key) {
23
+ if (key === "default" || key === "__esModule") return;
24
+ if (key in exports && exports[key] === _GridBooleanCell[key]) return;
25
+ Object.defineProperty(exports, key, {
26
+ enumerable: true,
27
+ get: function () {
28
+ return _GridBooleanCell[key];
29
+ }
30
+ });
31
+ });
32
+
20
33
  var _GridEditBooleanCell = require("./GridEditBooleanCell");
21
34
 
22
35
  Object.keys(_GridEditBooleanCell).forEach(function (key) {