@mui/x-data-grid 8.22.1 → 8.24.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 (82) hide show
  1. package/CHANGELOG.md +211 -0
  2. package/colDef/gridBooleanColDef.js +0 -1
  3. package/colDef/gridDateOperators.js +6 -6
  4. package/components/GridPagination.js +3 -1
  5. package/components/cell/GridBooleanCell.js +9 -1
  6. package/components/cell/GridEditDateCell.js +3 -1
  7. package/components/cell/GridFooterCell.d.ts +9 -0
  8. package/components/cell/GridFooterCell.js +54 -0
  9. package/components/containers/GridRootStyles.js +8 -0
  10. package/components/menu/columnMenu/GridColumnMenuContainer.js +3 -1
  11. package/components/virtualization/GridBottomContainer.js +4 -1
  12. package/components/virtualization/GridMainContainer.js +4 -1
  13. package/components/virtualization/GridTopContainer.js +4 -1
  14. package/components/virtualization/GridVirtualScrollbar.d.ts +1 -1
  15. package/components/virtualization/GridVirtualScrollbar.js +13 -4
  16. package/components/virtualization/GridVirtualScrollerFiller.js +18 -5
  17. package/esm/colDef/gridBooleanColDef.js +0 -1
  18. package/esm/colDef/gridDateOperators.js +6 -6
  19. package/esm/components/GridPagination.js +3 -1
  20. package/esm/components/cell/GridBooleanCell.js +9 -1
  21. package/esm/components/cell/GridEditDateCell.js +3 -1
  22. package/esm/components/cell/GridFooterCell.d.ts +9 -0
  23. package/esm/components/cell/GridFooterCell.js +48 -0
  24. package/esm/components/containers/GridRootStyles.js +8 -0
  25. package/esm/components/menu/columnMenu/GridColumnMenuContainer.js +3 -1
  26. package/esm/components/virtualization/GridBottomContainer.js +4 -1
  27. package/esm/components/virtualization/GridMainContainer.js +4 -1
  28. package/esm/components/virtualization/GridTopContainer.js +4 -1
  29. package/esm/components/virtualization/GridVirtualScrollbar.d.ts +1 -1
  30. package/esm/components/virtualization/GridVirtualScrollbar.js +13 -4
  31. package/esm/components/virtualization/GridVirtualScrollerFiller.js +18 -5
  32. package/esm/hooks/features/columnResize/gridColumnResizeApi.d.ts +7 -0
  33. package/esm/hooks/features/columnResize/gridColumnResizeApi.js +1 -0
  34. package/esm/hooks/features/columnResize/useGridColumnResize.js +13 -1
  35. package/esm/hooks/features/columns/gridColumnsUtils.js +1 -4
  36. package/esm/hooks/features/dataSource/useGridDataSourceBase.d.ts +3 -3
  37. package/esm/hooks/features/editing/useGridCellEditing.js +1 -0
  38. package/esm/hooks/features/pagination/gridPaginationSelector.js +3 -0
  39. package/esm/hooks/features/rowSelection/useGridRowSelection.js +17 -15
  40. package/esm/hooks/features/rowSelection/utils.js +2 -2
  41. package/esm/index.js +1 -1
  42. package/esm/internals/index.d.ts +2 -0
  43. package/esm/internals/index.js +1 -0
  44. package/esm/locales/arSD.js +1 -1
  45. package/esm/locales/daDK.js +3 -4
  46. package/esm/locales/faIR.js +1 -1
  47. package/esm/locales/jaJP.js +33 -38
  48. package/esm/locales/ptPT.d.ts +2 -1
  49. package/esm/locales/ptPT.js +114 -125
  50. package/esm/material/index.js +14 -4
  51. package/esm/models/gridAggregation.d.ts +18 -0
  52. package/esm/models/gridAggregation.js +1 -0
  53. package/esm/utils/domUtils.d.ts +1 -0
  54. package/esm/utils/domUtils.js +4 -0
  55. package/esm/utils/utils.d.ts +1 -1
  56. package/esm/utils/utils.js +2 -2
  57. package/hooks/features/columnResize/gridColumnResizeApi.d.ts +7 -0
  58. package/hooks/features/columnResize/gridColumnResizeApi.js +1 -0
  59. package/hooks/features/columnResize/useGridColumnResize.js +12 -0
  60. package/hooks/features/columns/gridColumnsUtils.js +1 -4
  61. package/hooks/features/dataSource/useGridDataSourceBase.d.ts +3 -3
  62. package/hooks/features/editing/useGridCellEditing.js +1 -0
  63. package/hooks/features/pagination/gridPaginationSelector.js +3 -0
  64. package/hooks/features/rowSelection/useGridRowSelection.js +17 -15
  65. package/hooks/features/rowSelection/utils.js +2 -2
  66. package/index.js +1 -1
  67. package/internals/index.d.ts +2 -0
  68. package/internals/index.js +8 -0
  69. package/locales/arSD.js +1 -1
  70. package/locales/daDK.js +3 -4
  71. package/locales/faIR.js +1 -1
  72. package/locales/jaJP.js +33 -38
  73. package/locales/ptPT.d.ts +2 -1
  74. package/locales/ptPT.js +114 -125
  75. package/material/index.js +14 -4
  76. package/models/gridAggregation.d.ts +18 -0
  77. package/models/gridAggregation.js +5 -0
  78. package/package.json +3 -3
  79. package/utils/domUtils.d.ts +1 -0
  80. package/utils/domUtils.js +5 -0
  81. package/utils/utils.d.ts +1 -1
  82. package/utils/utils.js +2 -2
@@ -103,8 +103,7 @@ const jaJPGrid = {
103
103
  'headerFilterOperator>=': '以上',
104
104
  'headerFilterOperator<': '未満',
105
105
  'headerFilterOperator<=': '以下',
106
- // headerFilterClear: 'Clear filter',
107
-
106
+ headerFilterClear: 'フィルターを削除',
108
107
  // Filter values text
109
108
  filterValueAny: 'いずれか',
110
109
  filterValueTrue: '真',
@@ -119,9 +118,8 @@ const jaJPGrid = {
119
118
  columnMenuUnsort: 'ソート解除',
120
119
  columnMenuSortAsc: '昇順ソート',
121
120
  columnMenuSortDesc: '降順ソート',
122
- // columnMenuManagePivot: 'Manage pivot',
123
- // columnMenuManageCharts: 'Manage charts',
124
-
121
+ columnMenuManagePivot: 'ピボットを管理',
122
+ columnMenuManageCharts: 'チャートを管理',
125
123
  // Column header text
126
124
  columnHeaderFiltersTooltipActive: count => `${count}件のフィルターを適用中`,
127
125
  columnHeaderFiltersLabel: 'フィルター表示',
@@ -161,18 +159,18 @@ const jaJPGrid = {
161
159
  collapseDetailPanel: '折りたたみ',
162
160
  // Pagination
163
161
  paginationRowsPerPage: 'ページあたりの行数:',
164
- // paginationDisplayedRows: ({
165
- // from,
166
- // to,
167
- // count,
168
- // estimated
169
- // }) => {
170
- // if (!estimated) {
171
- // return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
172
- // }
173
- // const estimatedLabel = estimated && estimated > to ? `around ${estimated}` : `more than ${to}`;
174
- // return `${from}–${to} of ${count !== -1 ? count : estimatedLabel}`;
175
- // },
162
+ paginationDisplayedRows: ({
163
+ from,
164
+ to,
165
+ count,
166
+ estimated
167
+ }) => {
168
+ if (!estimated) {
169
+ return `${from}–${to} of ${count !== -1 ? count : `${to}以上`}`;
170
+ }
171
+ const estimatedLabel = estimated && estimated > to ? `${estimated}前後` : `${to}以上`;
172
+ return `${from}–${to} of ${count !== -1 ? count : estimatedLabel}`;
173
+ },
176
174
  paginationItemAriaLabel: type => {
177
175
  if (type === 'first') {
178
176
  return '最初のページへ';
@@ -195,8 +193,7 @@ const jaJPGrid = {
195
193
  aggregationFunctionLabelAvg: '平均',
196
194
  aggregationFunctionLabelMin: '最小値',
197
195
  aggregationFunctionLabelMax: '最大値',
198
- aggregationFunctionLabelSize: 'サイズ'
199
-
196
+ aggregationFunctionLabelSize: 'サイズ',
200
197
  // Pivot panel
201
198
  // pivotToggleLabel: 'Pivot',
202
199
  // pivotRows: 'Rows',
@@ -231,16 +228,16 @@ const jaJPGrid = {
231
228
  // chartsChartNotSelected: 'Select a chart type to configure its options',
232
229
  // chartsTabChart: 'Chart',
233
230
  // chartsTabFields: 'Fields',
234
- // chartsTabCustomize: 'Customize',
231
+ chartsTabCustomize: 'カスタマイズ',
235
232
  // chartsCloseButton: 'Close charts configuration',
236
233
  // chartsSyncButtonLabel: 'Sync chart',
237
234
  // chartsSearchPlaceholder: 'Search fields',
238
- // chartsSearchLabel: 'Search fields',
235
+ chartsSearchLabel: 'フィールドを検索する',
239
236
  // chartsSearchClear: 'Clear search',
240
237
  // chartsNoFields: 'No fields',
241
238
  // chartsFieldBlocked: 'This field cannot be added to any section',
242
- // chartsCategories: 'Categories',
243
- // chartsSeries: 'Series',
239
+ chartsCategories: 'カテゴリ',
240
+ chartsSeries: 'シリーズ',
244
241
  // chartsMenuAddToDimensions: (dimensionLabel: string) => `Add to ${dimensionLabel}`,
245
242
  // chartsMenuAddToValues: (valuesLabel: string) => `Add to ${valuesLabel}`,
246
243
  // chartsMenuMoveUp: 'Move up',
@@ -253,27 +250,25 @@ const jaJPGrid = {
253
250
  // chartsDragToValues: (valuesLabel: string) => `Drag here to use column as ${valuesLabel}`,
254
251
 
255
252
  // AI Assistant panel
256
- // aiAssistantPanelTitle: 'AI Assistant',
257
- // aiAssistantPanelClose: 'Close AI Assistant',
258
- // aiAssistantPanelNewConversation: 'New conversation',
259
- // aiAssistantPanelConversationHistory: 'Conversation history',
253
+ aiAssistantPanelTitle: 'AIアシスタント',
254
+ aiAssistantPanelClose: 'AIアシスタントパネルを閉じる',
255
+ aiAssistantPanelNewConversation: '新しい会話を開始する',
256
+ aiAssistantPanelConversationHistory: '会話の履歴',
260
257
  // aiAssistantPanelEmptyConversation: 'No prompt history',
261
- // aiAssistantSuggestions: 'Suggestions',
262
-
258
+ aiAssistantSuggestions: '提案',
263
259
  // Prompt field
264
- // promptFieldLabel: 'Prompt',
265
- // promptFieldPlaceholder: 'Type a prompt…',
260
+ promptFieldLabel: 'プロンプト',
261
+ promptFieldPlaceholder: 'プロンプトを入力...',
266
262
  // promptFieldPlaceholderWithRecording: 'Type or record a prompt…',
267
263
  // promptFieldPlaceholderListening: 'Listening for prompt…',
268
264
  // promptFieldSpeechRecognitionNotSupported: 'Speech recognition is not supported in this browser',
269
- // promptFieldSend: 'Send',
270
- // promptFieldRecord: 'Record',
271
- // promptFieldStopRecording: 'Stop recording',
272
-
265
+ promptFieldSend: '送信',
266
+ promptFieldRecord: '録音',
267
+ promptFieldStopRecording: '録音を止める',
273
268
  // Prompt
274
- // promptRerun: 'Run again',
275
- // promptProcessing: 'Processing…',
276
- // promptAppliedChanges: 'Applied changes',
269
+ promptRerun: '再試行',
270
+ promptProcessing: '実行中…',
271
+ promptAppliedChanges: '変更を適用済み'
277
272
 
278
273
  // Prompt changes
279
274
  // promptChangeGroupDescription: (column: string) => `Group by ${column}`,
@@ -1 +1,2 @@
1
- export declare const ptPT: import("../internals/index.js").Localization;
1
+ import { Localization } from "../utils/getGridLocalization.js";
2
+ export declare const ptPT: Localization;
@@ -3,10 +3,9 @@ const ptPTGrid = {
3
3
  // Root
4
4
  noRowsLabel: 'Nenhuma linha',
5
5
  noResultsOverlayLabel: 'Nenhum resultado encontrado.',
6
- // noColumnsOverlayLabel: 'No columns',
7
- // noColumnsOverlayManageColumns: 'Manage columns',
8
- // emptyPivotOverlayLabel: 'Add fields to rows, columns, and values to create a pivot table',
9
-
6
+ noColumnsOverlayLabel: 'Sem colunas',
7
+ noColumnsOverlayManageColumns: 'Gerir colunas',
8
+ emptyPivotOverlayLabel: 'Adicione campos às linhas, colunas e valores para criar uma tabela dinâmica',
10
9
  // Density selector toolbar button text
11
10
  toolbarDensity: 'Densidade',
12
11
  toolbarDensityLabel: 'Densidade',
@@ -33,14 +32,11 @@ const ptPTGrid = {
33
32
  toolbarExportPrint: 'Imprimir',
34
33
  toolbarExportExcel: 'Descarregar como Excel',
35
34
  // Toolbar pivot button
36
- // toolbarPivot: 'Pivot',
37
-
35
+ toolbarPivot: 'Pivot',
38
36
  // Toolbar charts button
39
- // toolbarCharts: 'Charts',
40
-
37
+ toolbarCharts: 'Gráficos',
41
38
  // Toolbar AI Assistant button
42
- // toolbarAssistant: 'AI Assistant',
43
-
39
+ toolbarAssistant: 'Assistente de IA',
44
40
  // Columns management text
45
41
  columnsManagementSearchTitle: 'Procurar',
46
42
  columnsManagementNoColumns: 'Sem colunas',
@@ -99,18 +95,17 @@ const ptPTGrid = {
99
95
  'headerFilterOperator=': 'É igual a',
100
96
  'headerFilterOperator!=': 'Não é igual',
101
97
  'headerFilterOperator>': 'Maior que',
102
- 'headerFilterOperator>=': 'Melhor que ou igual a',
98
+ 'headerFilterOperator>=': 'Maior que ou igual a',
103
99
  'headerFilterOperator<': 'Menor que',
104
- 'headerFilterOperator<=': 'Menos que ou igual a',
105
- // headerFilterClear: 'Clear filter',
106
-
100
+ 'headerFilterOperator<=': 'Menor que ou igual a',
101
+ headerFilterClear: 'Limpar filtro',
107
102
  // Filter values text
108
103
  filterValueAny: 'qualquer',
109
104
  filterValueTrue: 'verdadeiro',
110
105
  filterValueFalse: 'falso',
111
106
  // Column menu text
112
107
  columnMenuLabel: 'Menu',
113
- // columnMenuAriaLabel: (columnName: string) => `${columnName} column menu`,
108
+ columnMenuAriaLabel: columnName => `Menu da coluna ${columnName}`,
114
109
  columnMenuShowColumns: 'Mostrar colunas',
115
110
  columnMenuManageColumns: 'Gerir colunas',
116
111
  columnMenuFilter: 'Filtro',
@@ -118,9 +113,8 @@ const ptPTGrid = {
118
113
  columnMenuUnsort: 'Desclassificar',
119
114
  columnMenuSortAsc: 'Classificar por ordem crescente',
120
115
  columnMenuSortDesc: 'Classificar por ordem decrescente',
121
- // columnMenuManagePivot: 'Manage pivot',
122
- // columnMenuManageCharts: 'Manage charts',
123
-
116
+ columnMenuManagePivot: 'Gerir pivot',
117
+ columnMenuManageCharts: 'Gerir gráficos',
124
118
  // Column header text
125
119
  columnHeaderFiltersTooltipActive: count => count !== 1 ? `${count} filtros ativos` : `${count} filtro ativo`,
126
120
  columnHeaderFiltersLabel: 'Mostrar filtros',
@@ -160,18 +154,18 @@ const ptPTGrid = {
160
154
  collapseDetailPanel: 'Colapsar',
161
155
  // Pagination
162
156
  paginationRowsPerPage: 'Linhas por página:',
163
- // paginationDisplayedRows: ({
164
- // from,
165
- // to,
166
- // count,
167
- // estimated
168
- // }) => {
169
- // if (!estimated) {
170
- // return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
171
- // }
172
- // const estimatedLabel = estimated && estimated > to ? `around ${estimated}` : `more than ${to}`;
173
- // return `${from}–${to} of ${count !== -1 ? count : estimatedLabel}`;
174
- // },
157
+ paginationDisplayedRows: ({
158
+ from,
159
+ to,
160
+ count,
161
+ estimated
162
+ }) => {
163
+ if (!estimated) {
164
+ return `${from}–${to} de ${count !== -1 ? count : `mais do que ${to}`}`;
165
+ }
166
+ const estimatedLabel = estimated && estimated > to ? `cerca de ${estimated}` : `mais do que ${to}`;
167
+ return `${from}–${to} de ${count !== -1 ? count : estimatedLabel}`;
168
+ },
175
169
  paginationItemAriaLabel: type => {
176
170
  if (type === 'first') {
177
171
  return 'Primeira página';
@@ -189,114 +183,109 @@ const ptPTGrid = {
189
183
  rowReorderingHeaderName: 'Reordenação de linhas',
190
184
  // Aggregation
191
185
  aggregationMenuItemHeader: 'Agregação',
192
- // aggregationFunctionLabelNone: 'none',
186
+ aggregationFunctionLabelNone: 'nenhuma',
193
187
  aggregationFunctionLabelSum: 'soma',
194
188
  aggregationFunctionLabelAvg: 'média',
195
189
  aggregationFunctionLabelMin: 'min',
196
190
  aggregationFunctionLabelMax: 'máx.',
197
191
  aggregationFunctionLabelSize: 'tamanho',
198
192
  // Pivot panel
199
- // pivotToggleLabel: 'Pivot',
200
- // pivotRows: 'Rows',
201
- // pivotColumns: 'Columns',
202
- // pivotValues: 'Values',
203
- // pivotCloseButton: 'Close pivot settings',
204
- // pivotSearchButton: 'Search fields',
205
- // pivotSearchControlPlaceholder: 'Search fields',
206
- // pivotSearchControlLabel: 'Search fields',
207
- // pivotSearchControlClear: 'Clear search',
208
- // pivotNoFields: 'No fields',
209
- // pivotMenuMoveUp: 'Move up',
210
- // pivotMenuMoveDown: 'Move down',
211
- // pivotMenuMoveToTop: 'Move to top',
212
- // pivotMenuMoveToBottom: 'Move to bottom',
213
- // pivotMenuRows: 'Rows',
214
- // pivotMenuColumns: 'Columns',
215
- // pivotMenuValues: 'Values',
216
- // pivotMenuOptions: 'Field options',
217
- // pivotMenuAddToRows: 'Add to Rows',
218
- // pivotMenuAddToColumns: 'Add to Columns',
219
- // pivotMenuAddToValues: 'Add to Values',
220
- // pivotMenuRemove: 'Remove',
221
- // pivotDragToRows: 'Drag here to create rows',
222
- // pivotDragToColumns: 'Drag here to create columns',
223
- // pivotDragToValues: 'Drag here to create values',
224
- // pivotYearColumnHeaderName: '(Year)',
225
- // pivotQuarterColumnHeaderName: '(Quarter)',
226
-
193
+ pivotToggleLabel: 'Pivot',
194
+ pivotRows: 'Linhas',
195
+ pivotColumns: 'Colunas',
196
+ pivotValues: 'Valores',
197
+ pivotCloseButton: 'Fechar configurações de pivot',
198
+ pivotSearchButton: 'Pesquisar campos',
199
+ pivotSearchControlPlaceholder: 'Pesquisar campos',
200
+ pivotSearchControlLabel: 'Pesquisar campos',
201
+ pivotSearchControlClear: 'Limpar pesquisa',
202
+ pivotNoFields: 'Nenhum campo',
203
+ pivotMenuMoveUp: 'Mover para cima',
204
+ pivotMenuMoveDown: 'Mover para baixo',
205
+ pivotMenuMoveToTop: 'Mover para o topo',
206
+ pivotMenuMoveToBottom: 'Mover para o fundo',
207
+ pivotMenuRows: 'Linhas',
208
+ pivotMenuColumns: 'Colunas',
209
+ pivotMenuValues: 'Valores',
210
+ pivotMenuOptions: 'Opções do campo',
211
+ pivotMenuAddToRows: 'Adicionar às Linhas',
212
+ pivotMenuAddToColumns: 'Adicionar às Colunas',
213
+ pivotMenuAddToValues: 'Adicionar aos Valores',
214
+ pivotMenuRemove: 'Remover',
215
+ pivotDragToRows: 'Arraste para aqui para criar linhas',
216
+ pivotDragToColumns: 'Arraste para aqui para criar colunas',
217
+ pivotDragToValues: 'Arraste para aqui para criar valores',
218
+ pivotYearColumnHeaderName: '(Ano)',
219
+ pivotQuarterColumnHeaderName: '(Trimestre)',
227
220
  // Charts configuration panel
228
- // chartsNoCharts: 'There are no charts available',
229
- // chartsChartNotSelected: 'Select a chart type to configure its options',
230
- // chartsTabChart: 'Chart',
231
- // chartsTabFields: 'Fields',
232
- // chartsTabCustomize: 'Customize',
233
- // chartsCloseButton: 'Close charts configuration',
234
- // chartsSyncButtonLabel: 'Sync chart',
235
- // chartsSearchPlaceholder: 'Search fields',
236
- // chartsSearchLabel: 'Search fields',
237
- // chartsSearchClear: 'Clear search',
238
- // chartsNoFields: 'No fields',
239
- // chartsFieldBlocked: 'This field cannot be added to any section',
240
- // chartsCategories: 'Categories',
241
- // chartsSeries: 'Series',
242
- // chartsMenuAddToDimensions: (dimensionLabel: string) => `Add to ${dimensionLabel}`,
243
- // chartsMenuAddToValues: (valuesLabel: string) => `Add to ${valuesLabel}`,
244
- // chartsMenuMoveUp: 'Move up',
245
- // chartsMenuMoveDown: 'Move down',
246
- // chartsMenuMoveToTop: 'Move to top',
247
- // chartsMenuMoveToBottom: 'Move to bottom',
248
- // chartsMenuOptions: 'Field options',
249
- // chartsMenuRemove: 'Remove',
250
- // chartsDragToDimensions: (dimensionLabel: string) => `Drag here to use column as ${dimensionLabel}`,
251
- // chartsDragToValues: (valuesLabel: string) => `Drag here to use column as ${valuesLabel}`,
252
-
221
+ chartsNoCharts: 'Não gráficos disponíveis',
222
+ chartsChartNotSelected: 'Selecione um tipo de gráfico para configurar as suas opções',
223
+ chartsTabChart: 'Gráfico',
224
+ chartsTabFields: 'Campos',
225
+ chartsTabCustomize: 'Personalizar',
226
+ chartsCloseButton: 'Fechar configuração de gráficos',
227
+ chartsSyncButtonLabel: 'Sincronizar gráfico',
228
+ chartsSearchPlaceholder: 'Pesquisar campos',
229
+ chartsSearchLabel: 'Pesquisar campos',
230
+ chartsSearchClear: 'Limpar pesquisa',
231
+ chartsNoFields: 'Nenhum campo',
232
+ chartsFieldBlocked: 'Este campo não pode ser adicionado a nenhuma secção',
233
+ chartsCategories: 'Categorias',
234
+ chartsSeries: 'Séries',
235
+ chartsMenuAddToDimensions: dimensionLabel => `Adicionar a ${dimensionLabel}`,
236
+ chartsMenuAddToValues: valuesLabel => `Adicionar a ${valuesLabel}`,
237
+ chartsMenuMoveUp: 'Mover para cima',
238
+ chartsMenuMoveDown: 'Mover para baixo',
239
+ chartsMenuMoveToTop: 'Mover para o topo',
240
+ chartsMenuMoveToBottom: 'Mover para o fundo',
241
+ chartsMenuOptions: 'Opções do campo',
242
+ chartsMenuRemove: 'Remover',
243
+ chartsDragToDimensions: dimensionLabel => `Arraste para aqui para usar a coluna como ${dimensionLabel}`,
244
+ chartsDragToValues: valuesLabel => `Arraste para aqui para usar a coluna como ${valuesLabel}`,
253
245
  // AI Assistant panel
254
- // aiAssistantPanelTitle: 'AI Assistant',
255
- // aiAssistantPanelClose: 'Close AI Assistant',
256
- // aiAssistantPanelNewConversation: 'New conversation',
257
- // aiAssistantPanelConversationHistory: 'Conversation history',
258
- // aiAssistantPanelEmptyConversation: 'No prompt history',
259
- // aiAssistantSuggestions: 'Suggestions',
260
-
246
+ aiAssistantPanelTitle: 'Assistente de IA',
247
+ aiAssistantPanelClose: 'Fechar Assistente de IA',
248
+ aiAssistantPanelNewConversation: 'Nova conversa',
249
+ aiAssistantPanelConversationHistory: 'Histórico de conversas',
250
+ aiAssistantPanelEmptyConversation: 'Nenhum histórico de prompts',
251
+ aiAssistantSuggestions: 'Sugestões',
261
252
  // Prompt field
262
253
  promptFieldLabel: 'Prompt',
263
- promptFieldPlaceholder: 'Digite um prompt',
264
- promptFieldPlaceholderWithRecording: 'Digite ou grave um prompt',
265
- promptFieldPlaceholderListening: 'Ouvindo o prompt',
266
- // promptFieldSpeechRecognitionNotSupported: 'Speech recognition is not supported in this browser',
254
+ promptFieldPlaceholder: 'Digite um prompt',
255
+ promptFieldPlaceholderWithRecording: 'Digite ou grave um prompt',
256
+ promptFieldPlaceholderListening: 'Ouvindo o prompt',
257
+ promptFieldSpeechRecognitionNotSupported: 'Reconhecimento de voz não é suportado neste navegador',
267
258
  promptFieldSend: 'Enviar',
268
259
  promptFieldRecord: 'Gravar',
269
- promptFieldStopRecording: 'Parar gravação'
270
-
260
+ promptFieldStopRecording: 'Parar gravação',
271
261
  // Prompt
272
- // promptRerun: 'Run again',
273
- // promptProcessing: 'Processing…',
274
- // promptAppliedChanges: 'Applied changes',
275
-
262
+ promptRerun: 'Executar novamente',
263
+ promptProcessing: 'Processando…',
264
+ promptAppliedChanges: 'Alterações aplicadas',
276
265
  // Prompt changes
277
- // promptChangeGroupDescription: (column: string) => `Group by ${column}`,
278
- // promptChangeAggregationLabel: (column: string, aggregation: string) => `${column} (${aggregation})`,
279
- // promptChangeAggregationDescription: (column: string, aggregation: string) => `Aggregate ${column} (${aggregation})`,
280
- // promptChangeFilterLabel: (column: string, operator: string, value: string) => {
281
- // if (operator === 'is any of') {
282
- // return `${column} is any of: ${value}`;
283
- // }
284
- // return `${column} ${operator} ${value}`;
285
- // },
286
- // promptChangeFilterDescription: (column: string, operator: string, value: string) => {
287
- // if (operator === 'is any of') {
288
- // return `Filter where ${column} is any of: ${value}`;
289
- // }
290
- // return `Filter where ${column} ${operator} ${value}`;
291
- // },
292
- // promptChangeSortDescription: (column: string, direction: string) => `Sort by ${column} (${direction})`,
293
- // promptChangePivotEnableLabel: 'Pivot',
294
- // promptChangePivotEnableDescription: 'Enable pivot',
295
- // promptChangePivotColumnsLabel: (count: number) => `Columns (${count})`,
296
- // promptChangePivotColumnsDescription: (column: string, direction: string) => `${column}${direction ? ` (${direction})` : ''}`,
297
- // promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
298
- // promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
299
- // promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
300
- // promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
266
+ promptChangeGroupDescription: column => `Agrupar por ${column}`,
267
+ promptChangeAggregationLabel: (column, aggregation) => `${column} (${aggregation})`,
268
+ promptChangeAggregationDescription: (column, aggregation) => `Agregar ${column} (${aggregation})`,
269
+ promptChangeFilterLabel: (column, operator, value) => {
270
+ if (operator === 'is any of') {
271
+ return `${column} é um de: ${value}`;
272
+ }
273
+ return `${column} ${operator} ${value}`;
274
+ },
275
+ promptChangeFilterDescription: (column, operator, value) => {
276
+ if (operator === 'is any of') {
277
+ return `Filtrar onde ${column} é um de: ${value}`;
278
+ }
279
+ return `Filtrar onde ${column} ${operator} ${value}`;
280
+ },
281
+ promptChangeSortDescription: (column, direction) => `Ordenar por ${column} (${direction})`,
282
+ promptChangePivotEnableLabel: 'Pivot',
283
+ promptChangePivotEnableDescription: 'Ativar pivot',
284
+ promptChangePivotColumnsLabel: count => `Colunas (${count})`,
285
+ promptChangePivotColumnsDescription: (column, direction) => `${column}${direction ? ` (${direction})` : ''}`,
286
+ promptChangePivotRowsLabel: count => `Linhas (${count})`,
287
+ promptChangePivotValuesLabel: count => `Valores (${count})`,
288
+ promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`,
289
+ promptChangeChartsLabel: (dimensionsCount, valuesCount) => `Dimensões (${dimensionsCount}), Valores (${valuesCount})`
301
290
  };
302
291
  export const ptPT = getGridLocalization(ptPTGrid);
@@ -74,7 +74,9 @@ export { useMaterialCSSVariables } from "./variables.js";
74
74
 
75
75
  /* eslint-disable material-ui/disallow-react-api-in-server-components */
76
76
 
77
- const InputAdornment = styled(MUIInputAdornment)(({
77
+ const InputAdornment = styled(MUIInputAdornment, {
78
+ slot: 'internal'
79
+ })(({
78
80
  theme
79
81
  }) => ({
80
82
  [`&.${inputAdornmentClasses.positionEnd} .${iconButtonClasses.sizeSmall}`]: {
@@ -82,6 +84,7 @@ const InputAdornment = styled(MUIInputAdornment)(({
82
84
  }
83
85
  }));
84
86
  const FormControlLabel = styled(MUIFormControlLabel, {
87
+ slot: 'internal',
85
88
  shouldForwardProp: prop => prop !== 'fullWidth'
86
89
  })(({
87
90
  theme
@@ -105,6 +108,7 @@ const FormControlLabel = styled(MUIFormControlLabel, {
105
108
  }]
106
109
  }));
107
110
  const Checkbox = styled(MUICheckbox, {
111
+ slot: 'internal',
108
112
  shouldForwardProp: prop => prop !== 'density'
109
113
  })(({
110
114
  theme
@@ -118,7 +122,9 @@ const Checkbox = styled(MUICheckbox, {
118
122
  }
119
123
  }]
120
124
  }));
121
- const ListItemText = styled(MUIListItemText)({
125
+ const ListItemText = styled(MUIListItemText, {
126
+ slot: 'internal'
127
+ })({
122
128
  [`& .${listItemTextClasses.primary}`]: {
123
129
  overflowX: 'clip',
124
130
  textOverflow: 'ellipsis',
@@ -182,7 +188,9 @@ const BaseSelect = forwardRef(function BaseSelect(props, ref) {
182
188
  });
183
189
  });
184
190
  if (process.env.NODE_ENV !== "production") BaseSelect.displayName = "BaseSelect";
185
- const StyledPagination = styled(MUIPagination)(({
191
+ const StyledPagination = styled(MUIPagination, {
192
+ slot: 'internal'
193
+ })(({
186
194
  theme
187
195
  }) => ({
188
196
  [`& .${tablePaginationClasses.selectLabel}`]: {
@@ -333,7 +341,9 @@ const BaseButton = forwardRef(function BaseButton(props, ref) {
333
341
  }));
334
342
  });
335
343
  if (process.env.NODE_ENV !== "production") BaseButton.displayName = "BaseButton";
336
- const StyledToggleButton = styled(MUIToggleButton)(({
344
+ const StyledToggleButton = styled(MUIToggleButton, {
345
+ slot: 'internal'
346
+ })(({
337
347
  theme
338
348
  }) => ({
339
349
  gap: theme.spacing(1),
@@ -0,0 +1,18 @@
1
+ export type GridAggregationPosition = 'inline' | 'footer';
2
+ export interface GridAggregationCellMeta {
3
+ /**
4
+ * If `true`, the current aggregated value has the same unit as the value of the other cells of this row.
5
+ * For instance, "min" / "max" aggregation have the same unit as the other cells.
6
+ * If `false`, the current aggregated value has another unit or not unit.
7
+ * For instance, "size" aggregation has no unit.
8
+ */
9
+ hasCellUnit: boolean;
10
+ /**
11
+ * Name of the aggregation function currently applied on this cell.
12
+ */
13
+ aggregationFunctionName: string;
14
+ /**
15
+ * Position of the aggregated value.
16
+ */
17
+ position: GridAggregationPosition;
18
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -26,4 +26,5 @@ export declare function findRightPinnedCellsBeforeCol(api: GridPrivateApiCommuni
26
26
  export declare function findLeftPinnedHeadersAfterCol(api: GridPrivateApiCommunity, col: HTMLElement, isRtl: boolean): HTMLElement[];
27
27
  export declare function findRightPinnedHeadersBeforeCol(api: GridPrivateApiCommunity, col: HTMLElement, isRtl: boolean): HTMLElement[];
28
28
  export declare function findGridHeader(api: GridPrivateApiCommunity, field: string): Element | null;
29
+ export declare function findGridHeaderFilter(api: GridPrivateApiCommunity, field: string): Element | null;
29
30
  export declare function findGridCells(api: GridPrivateApiCommunity, field: string): Element[];
@@ -186,6 +186,10 @@ export function findGridHeader(api, field) {
186
186
  const headers = api.columnHeadersContainerRef.current;
187
187
  return headers.querySelector(`:scope > div > [data-field="${escapeOperandAttributeSelector(field)}"][role="columnheader"]`);
188
188
  }
189
+ export function findGridHeaderFilter(api, field) {
190
+ const headers = api.columnHeadersContainerRef.current;
191
+ return headers.querySelector(`:scope > .${gridClasses.headerFilterRow} > [data-field="${escapeOperandAttributeSelector(field)}"]`);
192
+ }
189
193
  export function findGridCells(api, field) {
190
194
  const container = api.virtualScrollerRef.current;
191
195
  return Array.from(container.querySelectorAll(`:scope > div > div > div > [data-field="${escapeOperandAttributeSelector(field)}"][role="gridcell"]`));
@@ -27,4 +27,4 @@ export declare function deepClone(obj: Record<string, any>): any;
27
27
  * that hint disables checks on all values instead of just one.
28
28
  */
29
29
  export declare function eslintUseValue(_: any): void;
30
- export declare const runIf: (condition: boolean, fn: Function) => (params: unknown) => void;
30
+ export declare const runIf: (condition: boolean, fn: Function) => (...params: unknown[]) => void;
@@ -75,8 +75,8 @@ export function deepClone(obj) {
75
75
  * that hint disables checks on all values instead of just one.
76
76
  */
77
77
  export function eslintUseValue(_) {}
78
- export const runIf = (condition, fn) => params => {
78
+ export const runIf = (condition, fn) => (...params) => {
79
79
  if (condition) {
80
- fn(params);
80
+ fn(...params);
81
81
  }
82
82
  };
@@ -1,6 +1,7 @@
1
1
  import type { GridColDef } from "../../../models/colDef/gridColDef.js";
2
2
  export declare const DEFAULT_GRID_AUTOSIZE_OPTIONS: {
3
3
  includeHeaders: boolean;
4
+ includeHeaderFilters: boolean;
4
5
  includeOutliers: boolean;
5
6
  outliersFactor: number;
6
7
  expand: boolean;
@@ -16,6 +17,12 @@ export type GridAutosizeOptions = {
16
17
  * @default false
17
18
  */
18
19
  includeHeaders?: boolean;
20
+ /**
21
+ * If true, include header filter widths in the calculation.
22
+ * Only applies when header filters are enabled.
23
+ * @default false
24
+ */
25
+ includeHeaderFilters?: boolean;
19
26
  /**
20
27
  * If true, width outliers will be ignored.
21
28
  * @default false
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.DEFAULT_GRID_AUTOSIZE_OPTIONS = void 0;
7
7
  const DEFAULT_GRID_AUTOSIZE_OPTIONS = exports.DEFAULT_GRID_AUTOSIZE_OPTIONS = {
8
8
  includeHeaders: true,
9
+ includeHeaderFilters: false,
9
10
  includeOutliers: false,
10
11
  outliersFactor: 1.5,
11
12
  expand: false,
@@ -24,6 +24,7 @@ var _useTimeout = require("../../utils/useTimeout");
24
24
  var _gridColumnsInterfaces = require("../columns/gridColumnsInterfaces");
25
25
  var _columns = require("../columns");
26
26
  var _dimensions = require("../dimensions");
27
+ var _headerFiltering = require("../headerFiltering");
27
28
  var _columnResizeSelector = require("./columnResizeSelector");
28
29
  function trackFinger(event, currentTouchId) {
29
30
  if (currentTouchId !== undefined && event.changedTouches) {
@@ -141,6 +142,7 @@ function extractColumnWidths(apiRef, options, columns) {
141
142
  const widthByField = {};
142
143
  const root = apiRef.current.rootElementRef.current;
143
144
  root.classList.add(_gridClasses.gridClasses.autosizing);
145
+ const includeHeaderFilters = options.includeHeaderFilters && (0, _headerFiltering.gridHeaderFilteringEnabledSelector)(apiRef);
144
146
  columns.forEach(column => {
145
147
  const cells = (0, _domUtils.findGridCells)(apiRef.current, column.field);
146
148
  const widths = cells.map(cell => {
@@ -171,6 +173,16 @@ function extractColumnWidths(apiRef, options, columns) {
171
173
  filteredWidths.push(width);
172
174
  }
173
175
  }
176
+ if (includeHeaderFilters) {
177
+ const headerFilter = (0, _domUtils.findGridHeaderFilter)(apiRef.current, column.field);
178
+ if (headerFilter) {
179
+ const style = window.getComputedStyle(headerFilter, null);
180
+ const paddingWidth = parseInt(style.paddingLeft, 10) + parseInt(style.paddingRight, 10);
181
+ const contentWidth = headerFilter.scrollWidth;
182
+ const width = contentWidth + paddingWidth;
183
+ filteredWidths.push(width);
184
+ }
185
+ }
174
186
  const hasColumnMin = column.minWidth !== -Infinity && column.minWidth !== undefined;
175
187
  const hasColumnMax = column.maxWidth !== Infinity && column.maxWidth !== undefined;
176
188
  const min = hasColumnMin ? column.minWidth : 0;