@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.
- package/CHANGELOG.md +211 -0
- package/colDef/gridBooleanColDef.js +0 -1
- package/colDef/gridDateOperators.js +6 -6
- package/components/GridPagination.js +3 -1
- package/components/cell/GridBooleanCell.js +9 -1
- package/components/cell/GridEditDateCell.js +3 -1
- package/components/cell/GridFooterCell.d.ts +9 -0
- package/components/cell/GridFooterCell.js +54 -0
- package/components/containers/GridRootStyles.js +8 -0
- package/components/menu/columnMenu/GridColumnMenuContainer.js +3 -1
- package/components/virtualization/GridBottomContainer.js +4 -1
- package/components/virtualization/GridMainContainer.js +4 -1
- package/components/virtualization/GridTopContainer.js +4 -1
- package/components/virtualization/GridVirtualScrollbar.d.ts +1 -1
- package/components/virtualization/GridVirtualScrollbar.js +13 -4
- package/components/virtualization/GridVirtualScrollerFiller.js +18 -5
- package/esm/colDef/gridBooleanColDef.js +0 -1
- package/esm/colDef/gridDateOperators.js +6 -6
- package/esm/components/GridPagination.js +3 -1
- package/esm/components/cell/GridBooleanCell.js +9 -1
- package/esm/components/cell/GridEditDateCell.js +3 -1
- package/esm/components/cell/GridFooterCell.d.ts +9 -0
- package/esm/components/cell/GridFooterCell.js +48 -0
- package/esm/components/containers/GridRootStyles.js +8 -0
- package/esm/components/menu/columnMenu/GridColumnMenuContainer.js +3 -1
- package/esm/components/virtualization/GridBottomContainer.js +4 -1
- package/esm/components/virtualization/GridMainContainer.js +4 -1
- package/esm/components/virtualization/GridTopContainer.js +4 -1
- package/esm/components/virtualization/GridVirtualScrollbar.d.ts +1 -1
- package/esm/components/virtualization/GridVirtualScrollbar.js +13 -4
- package/esm/components/virtualization/GridVirtualScrollerFiller.js +18 -5
- package/esm/hooks/features/columnResize/gridColumnResizeApi.d.ts +7 -0
- package/esm/hooks/features/columnResize/gridColumnResizeApi.js +1 -0
- package/esm/hooks/features/columnResize/useGridColumnResize.js +13 -1
- package/esm/hooks/features/columns/gridColumnsUtils.js +1 -4
- package/esm/hooks/features/dataSource/useGridDataSourceBase.d.ts +3 -3
- package/esm/hooks/features/editing/useGridCellEditing.js +1 -0
- package/esm/hooks/features/pagination/gridPaginationSelector.js +3 -0
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +17 -15
- package/esm/hooks/features/rowSelection/utils.js +2 -2
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +2 -0
- package/esm/internals/index.js +1 -0
- package/esm/locales/arSD.js +1 -1
- package/esm/locales/daDK.js +3 -4
- package/esm/locales/faIR.js +1 -1
- package/esm/locales/jaJP.js +33 -38
- package/esm/locales/ptPT.d.ts +2 -1
- package/esm/locales/ptPT.js +114 -125
- package/esm/material/index.js +14 -4
- package/esm/models/gridAggregation.d.ts +18 -0
- package/esm/models/gridAggregation.js +1 -0
- package/esm/utils/domUtils.d.ts +1 -0
- package/esm/utils/domUtils.js +4 -0
- package/esm/utils/utils.d.ts +1 -1
- package/esm/utils/utils.js +2 -2
- package/hooks/features/columnResize/gridColumnResizeApi.d.ts +7 -0
- package/hooks/features/columnResize/gridColumnResizeApi.js +1 -0
- package/hooks/features/columnResize/useGridColumnResize.js +12 -0
- package/hooks/features/columns/gridColumnsUtils.js +1 -4
- package/hooks/features/dataSource/useGridDataSourceBase.d.ts +3 -3
- package/hooks/features/editing/useGridCellEditing.js +1 -0
- package/hooks/features/pagination/gridPaginationSelector.js +3 -0
- package/hooks/features/rowSelection/useGridRowSelection.js +17 -15
- package/hooks/features/rowSelection/utils.js +2 -2
- package/index.js +1 -1
- package/internals/index.d.ts +2 -0
- package/internals/index.js +8 -0
- package/locales/arSD.js +1 -1
- package/locales/daDK.js +3 -4
- package/locales/faIR.js +1 -1
- package/locales/jaJP.js +33 -38
- package/locales/ptPT.d.ts +2 -1
- package/locales/ptPT.js +114 -125
- package/material/index.js +14 -4
- package/models/gridAggregation.d.ts +18 -0
- package/models/gridAggregation.js +5 -0
- package/package.json +3 -3
- package/utils/domUtils.d.ts +1 -0
- package/utils/domUtils.js +5 -0
- package/utils/utils.d.ts +1 -1
- package/utils/utils.js +2 -2
package/locales/ptPT.js
CHANGED
|
@@ -9,10 +9,9 @@ const ptPTGrid = {
|
|
|
9
9
|
// Root
|
|
10
10
|
noRowsLabel: 'Nenhuma linha',
|
|
11
11
|
noResultsOverlayLabel: 'Nenhum resultado encontrado.',
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
noColumnsOverlayLabel: 'Sem colunas',
|
|
13
|
+
noColumnsOverlayManageColumns: 'Gerir colunas',
|
|
14
|
+
emptyPivotOverlayLabel: 'Adicione campos às linhas, colunas e valores para criar uma tabela dinâmica',
|
|
16
15
|
// Density selector toolbar button text
|
|
17
16
|
toolbarDensity: 'Densidade',
|
|
18
17
|
toolbarDensityLabel: 'Densidade',
|
|
@@ -39,14 +38,11 @@ const ptPTGrid = {
|
|
|
39
38
|
toolbarExportPrint: 'Imprimir',
|
|
40
39
|
toolbarExportExcel: 'Descarregar como Excel',
|
|
41
40
|
// Toolbar pivot button
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
toolbarPivot: 'Pivot',
|
|
44
42
|
// Toolbar charts button
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
toolbarCharts: 'Gráficos',
|
|
47
44
|
// Toolbar AI Assistant button
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
toolbarAssistant: 'Assistente de IA',
|
|
50
46
|
// Columns management text
|
|
51
47
|
columnsManagementSearchTitle: 'Procurar',
|
|
52
48
|
columnsManagementNoColumns: 'Sem colunas',
|
|
@@ -105,18 +101,17 @@ const ptPTGrid = {
|
|
|
105
101
|
'headerFilterOperator=': 'É igual a',
|
|
106
102
|
'headerFilterOperator!=': 'Não é igual',
|
|
107
103
|
'headerFilterOperator>': 'Maior que',
|
|
108
|
-
'headerFilterOperator>=': '
|
|
104
|
+
'headerFilterOperator>=': 'Maior que ou igual a',
|
|
109
105
|
'headerFilterOperator<': 'Menor que',
|
|
110
|
-
'headerFilterOperator<=': '
|
|
111
|
-
|
|
112
|
-
|
|
106
|
+
'headerFilterOperator<=': 'Menor que ou igual a',
|
|
107
|
+
headerFilterClear: 'Limpar filtro',
|
|
113
108
|
// Filter values text
|
|
114
109
|
filterValueAny: 'qualquer',
|
|
115
110
|
filterValueTrue: 'verdadeiro',
|
|
116
111
|
filterValueFalse: 'falso',
|
|
117
112
|
// Column menu text
|
|
118
113
|
columnMenuLabel: 'Menu',
|
|
119
|
-
|
|
114
|
+
columnMenuAriaLabel: columnName => `Menu da coluna ${columnName}`,
|
|
120
115
|
columnMenuShowColumns: 'Mostrar colunas',
|
|
121
116
|
columnMenuManageColumns: 'Gerir colunas',
|
|
122
117
|
columnMenuFilter: 'Filtro',
|
|
@@ -124,9 +119,8 @@ const ptPTGrid = {
|
|
|
124
119
|
columnMenuUnsort: 'Desclassificar',
|
|
125
120
|
columnMenuSortAsc: 'Classificar por ordem crescente',
|
|
126
121
|
columnMenuSortDesc: 'Classificar por ordem decrescente',
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
122
|
+
columnMenuManagePivot: 'Gerir pivot',
|
|
123
|
+
columnMenuManageCharts: 'Gerir gráficos',
|
|
130
124
|
// Column header text
|
|
131
125
|
columnHeaderFiltersTooltipActive: count => count !== 1 ? `${count} filtros ativos` : `${count} filtro ativo`,
|
|
132
126
|
columnHeaderFiltersLabel: 'Mostrar filtros',
|
|
@@ -166,18 +160,18 @@ const ptPTGrid = {
|
|
|
166
160
|
collapseDetailPanel: 'Colapsar',
|
|
167
161
|
// Pagination
|
|
168
162
|
paginationRowsPerPage: 'Linhas por página:',
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
163
|
+
paginationDisplayedRows: ({
|
|
164
|
+
from,
|
|
165
|
+
to,
|
|
166
|
+
count,
|
|
167
|
+
estimated
|
|
168
|
+
}) => {
|
|
169
|
+
if (!estimated) {
|
|
170
|
+
return `${from}–${to} de ${count !== -1 ? count : `mais do que ${to}`}`;
|
|
171
|
+
}
|
|
172
|
+
const estimatedLabel = estimated && estimated > to ? `cerca de ${estimated}` : `mais do que ${to}`;
|
|
173
|
+
return `${from}–${to} de ${count !== -1 ? count : estimatedLabel}`;
|
|
174
|
+
},
|
|
181
175
|
paginationItemAriaLabel: type => {
|
|
182
176
|
if (type === 'first') {
|
|
183
177
|
return 'Primeira página';
|
|
@@ -195,114 +189,109 @@ const ptPTGrid = {
|
|
|
195
189
|
rowReorderingHeaderName: 'Reordenação de linhas',
|
|
196
190
|
// Aggregation
|
|
197
191
|
aggregationMenuItemHeader: 'Agregação',
|
|
198
|
-
|
|
192
|
+
aggregationFunctionLabelNone: 'nenhuma',
|
|
199
193
|
aggregationFunctionLabelSum: 'soma',
|
|
200
194
|
aggregationFunctionLabelAvg: 'média',
|
|
201
195
|
aggregationFunctionLabelMin: 'min',
|
|
202
196
|
aggregationFunctionLabelMax: 'máx.',
|
|
203
197
|
aggregationFunctionLabelSize: 'tamanho',
|
|
204
198
|
// Pivot panel
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
199
|
+
pivotToggleLabel: 'Pivot',
|
|
200
|
+
pivotRows: 'Linhas',
|
|
201
|
+
pivotColumns: 'Colunas',
|
|
202
|
+
pivotValues: 'Valores',
|
|
203
|
+
pivotCloseButton: 'Fechar configurações de pivot',
|
|
204
|
+
pivotSearchButton: 'Pesquisar campos',
|
|
205
|
+
pivotSearchControlPlaceholder: 'Pesquisar campos',
|
|
206
|
+
pivotSearchControlLabel: 'Pesquisar campos',
|
|
207
|
+
pivotSearchControlClear: 'Limpar pesquisa',
|
|
208
|
+
pivotNoFields: 'Nenhum campo',
|
|
209
|
+
pivotMenuMoveUp: 'Mover para cima',
|
|
210
|
+
pivotMenuMoveDown: 'Mover para baixo',
|
|
211
|
+
pivotMenuMoveToTop: 'Mover para o topo',
|
|
212
|
+
pivotMenuMoveToBottom: 'Mover para o fundo',
|
|
213
|
+
pivotMenuRows: 'Linhas',
|
|
214
|
+
pivotMenuColumns: 'Colunas',
|
|
215
|
+
pivotMenuValues: 'Valores',
|
|
216
|
+
pivotMenuOptions: 'Opções do campo',
|
|
217
|
+
pivotMenuAddToRows: 'Adicionar às Linhas',
|
|
218
|
+
pivotMenuAddToColumns: 'Adicionar às Colunas',
|
|
219
|
+
pivotMenuAddToValues: 'Adicionar aos Valores',
|
|
220
|
+
pivotMenuRemove: 'Remover',
|
|
221
|
+
pivotDragToRows: 'Arraste para aqui para criar linhas',
|
|
222
|
+
pivotDragToColumns: 'Arraste para aqui para criar colunas',
|
|
223
|
+
pivotDragToValues: 'Arraste para aqui para criar valores',
|
|
224
|
+
pivotYearColumnHeaderName: '(Ano)',
|
|
225
|
+
pivotQuarterColumnHeaderName: '(Trimestre)',
|
|
233
226
|
// Charts configuration panel
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
227
|
+
chartsNoCharts: 'Não há gráficos disponíveis',
|
|
228
|
+
chartsChartNotSelected: 'Selecione um tipo de gráfico para configurar as suas opções',
|
|
229
|
+
chartsTabChart: 'Gráfico',
|
|
230
|
+
chartsTabFields: 'Campos',
|
|
231
|
+
chartsTabCustomize: 'Personalizar',
|
|
232
|
+
chartsCloseButton: 'Fechar configuração de gráficos',
|
|
233
|
+
chartsSyncButtonLabel: 'Sincronizar gráfico',
|
|
234
|
+
chartsSearchPlaceholder: 'Pesquisar campos',
|
|
235
|
+
chartsSearchLabel: 'Pesquisar campos',
|
|
236
|
+
chartsSearchClear: 'Limpar pesquisa',
|
|
237
|
+
chartsNoFields: 'Nenhum campo',
|
|
238
|
+
chartsFieldBlocked: 'Este campo não pode ser adicionado a nenhuma secção',
|
|
239
|
+
chartsCategories: 'Categorias',
|
|
240
|
+
chartsSeries: 'Séries',
|
|
241
|
+
chartsMenuAddToDimensions: dimensionLabel => `Adicionar a ${dimensionLabel}`,
|
|
242
|
+
chartsMenuAddToValues: valuesLabel => `Adicionar a ${valuesLabel}`,
|
|
243
|
+
chartsMenuMoveUp: 'Mover para cima',
|
|
244
|
+
chartsMenuMoveDown: 'Mover para baixo',
|
|
245
|
+
chartsMenuMoveToTop: 'Mover para o topo',
|
|
246
|
+
chartsMenuMoveToBottom: 'Mover para o fundo',
|
|
247
|
+
chartsMenuOptions: 'Opções do campo',
|
|
248
|
+
chartsMenuRemove: 'Remover',
|
|
249
|
+
chartsDragToDimensions: dimensionLabel => `Arraste para aqui para usar a coluna como ${dimensionLabel}`,
|
|
250
|
+
chartsDragToValues: valuesLabel => `Arraste para aqui para usar a coluna como ${valuesLabel}`,
|
|
259
251
|
// AI Assistant panel
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
252
|
+
aiAssistantPanelTitle: 'Assistente de IA',
|
|
253
|
+
aiAssistantPanelClose: 'Fechar Assistente de IA',
|
|
254
|
+
aiAssistantPanelNewConversation: 'Nova conversa',
|
|
255
|
+
aiAssistantPanelConversationHistory: 'Histórico de conversas',
|
|
256
|
+
aiAssistantPanelEmptyConversation: 'Nenhum histórico de prompts',
|
|
257
|
+
aiAssistantSuggestions: 'Sugestões',
|
|
267
258
|
// Prompt field
|
|
268
259
|
promptFieldLabel: 'Prompt',
|
|
269
|
-
promptFieldPlaceholder: 'Digite um prompt
|
|
270
|
-
promptFieldPlaceholderWithRecording: 'Digite ou grave um prompt
|
|
271
|
-
promptFieldPlaceholderListening: 'Ouvindo o prompt
|
|
272
|
-
|
|
260
|
+
promptFieldPlaceholder: 'Digite um prompt',
|
|
261
|
+
promptFieldPlaceholderWithRecording: 'Digite ou grave um prompt',
|
|
262
|
+
promptFieldPlaceholderListening: 'Ouvindo o prompt',
|
|
263
|
+
promptFieldSpeechRecognitionNotSupported: 'Reconhecimento de voz não é suportado neste navegador',
|
|
273
264
|
promptFieldSend: 'Enviar',
|
|
274
265
|
promptFieldRecord: 'Gravar',
|
|
275
|
-
promptFieldStopRecording: 'Parar gravação'
|
|
276
|
-
|
|
266
|
+
promptFieldStopRecording: 'Parar gravação',
|
|
277
267
|
// Prompt
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
268
|
+
promptRerun: 'Executar novamente',
|
|
269
|
+
promptProcessing: 'Processando…',
|
|
270
|
+
promptAppliedChanges: 'Alterações aplicadas',
|
|
282
271
|
// Prompt changes
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
272
|
+
promptChangeGroupDescription: column => `Agrupar por ${column}`,
|
|
273
|
+
promptChangeAggregationLabel: (column, aggregation) => `${column} (${aggregation})`,
|
|
274
|
+
promptChangeAggregationDescription: (column, aggregation) => `Agregar ${column} (${aggregation})`,
|
|
275
|
+
promptChangeFilterLabel: (column, operator, value) => {
|
|
276
|
+
if (operator === 'is any of') {
|
|
277
|
+
return `${column} é um de: ${value}`;
|
|
278
|
+
}
|
|
279
|
+
return `${column} ${operator} ${value}`;
|
|
280
|
+
},
|
|
281
|
+
promptChangeFilterDescription: (column, operator, value) => {
|
|
282
|
+
if (operator === 'is any of') {
|
|
283
|
+
return `Filtrar onde ${column} é um de: ${value}`;
|
|
284
|
+
}
|
|
285
|
+
return `Filtrar onde ${column} ${operator} ${value}`;
|
|
286
|
+
},
|
|
287
|
+
promptChangeSortDescription: (column, direction) => `Ordenar por ${column} (${direction})`,
|
|
288
|
+
promptChangePivotEnableLabel: 'Pivot',
|
|
289
|
+
promptChangePivotEnableDescription: 'Ativar pivot',
|
|
290
|
+
promptChangePivotColumnsLabel: count => `Colunas (${count})`,
|
|
291
|
+
promptChangePivotColumnsDescription: (column, direction) => `${column}${direction ? ` (${direction})` : ''}`,
|
|
292
|
+
promptChangePivotRowsLabel: count => `Linhas (${count})`,
|
|
293
|
+
promptChangePivotValuesLabel: count => `Valores (${count})`,
|
|
294
|
+
promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`,
|
|
295
|
+
promptChangeChartsLabel: (dimensionsCount, valuesCount) => `Dimensões (${dimensionsCount}), Valores (${valuesCount})`
|
|
307
296
|
};
|
|
308
297
|
const ptPT = exports.ptPT = (0, _getGridLocalization.getGridLocalization)(ptPTGrid);
|
package/material/index.js
CHANGED
|
@@ -87,7 +87,9 @@ const _excluded = ["id", "label", "labelId", "material", "disabled", "slotProps"
|
|
|
87
87
|
_excluded23 = ["items", "value", "material"];
|
|
88
88
|
/* eslint-disable material-ui/disallow-react-api-in-server-components */
|
|
89
89
|
|
|
90
|
-
const InputAdornment = (0, _styles.styled)(_InputAdornment.default
|
|
90
|
+
const InputAdornment = (0, _styles.styled)(_InputAdornment.default, {
|
|
91
|
+
slot: 'internal'
|
|
92
|
+
})(({
|
|
91
93
|
theme
|
|
92
94
|
}) => ({
|
|
93
95
|
[`&.${_InputAdornment.inputAdornmentClasses.positionEnd} .${_IconButton.iconButtonClasses.sizeSmall}`]: {
|
|
@@ -95,6 +97,7 @@ const InputAdornment = (0, _styles.styled)(_InputAdornment.default)(({
|
|
|
95
97
|
}
|
|
96
98
|
}));
|
|
97
99
|
const FormControlLabel = (0, _styles.styled)(_FormControlLabel.default, {
|
|
100
|
+
slot: 'internal',
|
|
98
101
|
shouldForwardProp: prop => prop !== 'fullWidth'
|
|
99
102
|
})(({
|
|
100
103
|
theme
|
|
@@ -118,6 +121,7 @@ const FormControlLabel = (0, _styles.styled)(_FormControlLabel.default, {
|
|
|
118
121
|
}]
|
|
119
122
|
}));
|
|
120
123
|
const Checkbox = (0, _styles.styled)(_Checkbox.default, {
|
|
124
|
+
slot: 'internal',
|
|
121
125
|
shouldForwardProp: prop => prop !== 'density'
|
|
122
126
|
})(({
|
|
123
127
|
theme
|
|
@@ -131,7 +135,9 @@ const Checkbox = (0, _styles.styled)(_Checkbox.default, {
|
|
|
131
135
|
}
|
|
132
136
|
}]
|
|
133
137
|
}));
|
|
134
|
-
const ListItemText = (0, _styles.styled)(_ListItemText.default
|
|
138
|
+
const ListItemText = (0, _styles.styled)(_ListItemText.default, {
|
|
139
|
+
slot: 'internal'
|
|
140
|
+
})({
|
|
135
141
|
[`& .${_ListItemText.listItemTextClasses.primary}`]: {
|
|
136
142
|
overflowX: 'clip',
|
|
137
143
|
textOverflow: 'ellipsis',
|
|
@@ -195,7 +201,9 @@ const BaseSelect = (0, _forwardRef.forwardRef)(function BaseSelect(props, ref) {
|
|
|
195
201
|
});
|
|
196
202
|
});
|
|
197
203
|
if (process.env.NODE_ENV !== "production") BaseSelect.displayName = "BaseSelect";
|
|
198
|
-
const StyledPagination = (0, _styles.styled)(_TablePagination.default
|
|
204
|
+
const StyledPagination = (0, _styles.styled)(_TablePagination.default, {
|
|
205
|
+
slot: 'internal'
|
|
206
|
+
})(({
|
|
199
207
|
theme
|
|
200
208
|
}) => ({
|
|
201
209
|
[`& .${_TablePagination.tablePaginationClasses.selectLabel}`]: {
|
|
@@ -346,7 +354,9 @@ const BaseButton = (0, _forwardRef.forwardRef)(function BaseButton(props, ref) {
|
|
|
346
354
|
}));
|
|
347
355
|
});
|
|
348
356
|
if (process.env.NODE_ENV !== "production") BaseButton.displayName = "BaseButton";
|
|
349
|
-
const StyledToggleButton = (0, _styles.styled)(_ToggleButton.default
|
|
357
|
+
const StyledToggleButton = (0, _styles.styled)(_ToggleButton.default, {
|
|
358
|
+
slot: 'internal'
|
|
359
|
+
})(({
|
|
350
360
|
theme
|
|
351
361
|
}) => ({
|
|
352
362
|
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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.24.0",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The Community plan edition of the MUI X Data Grid components.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"clsx": "^2.1.1",
|
|
43
43
|
"prop-types": "^15.8.1",
|
|
44
44
|
"use-sync-external-store": "^1.6.0",
|
|
45
|
-
"@mui/x-internals": "8.
|
|
46
|
-
"@mui/x-virtualizer": "0.
|
|
45
|
+
"@mui/x-internals": "8.24.0",
|
|
46
|
+
"@mui/x-virtualizer": "0.3.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@emotion/react": "^11.9.0",
|
package/utils/domUtils.d.ts
CHANGED
|
@@ -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[];
|
package/utils/domUtils.js
CHANGED
|
@@ -8,6 +8,7 @@ exports.findGridCellElementsFromCol = findGridCellElementsFromCol;
|
|
|
8
8
|
exports.findGridCells = findGridCells;
|
|
9
9
|
exports.findGridElement = findGridElement;
|
|
10
10
|
exports.findGridHeader = findGridHeader;
|
|
11
|
+
exports.findGridHeaderFilter = findGridHeaderFilter;
|
|
11
12
|
exports.findGroupHeaderElementsFromField = findGroupHeaderElementsFromField;
|
|
12
13
|
exports.findHeaderElementFromField = findHeaderElementFromField;
|
|
13
14
|
exports.findLeftPinnedCellsAfterCol = findLeftPinnedCellsAfterCol;
|
|
@@ -212,6 +213,10 @@ function findGridHeader(api, field) {
|
|
|
212
213
|
const headers = api.columnHeadersContainerRef.current;
|
|
213
214
|
return headers.querySelector(`:scope > div > [data-field="${escapeOperandAttributeSelector(field)}"][role="columnheader"]`);
|
|
214
215
|
}
|
|
216
|
+
function findGridHeaderFilter(api, field) {
|
|
217
|
+
const headers = api.columnHeadersContainerRef.current;
|
|
218
|
+
return headers.querySelector(`:scope > .${_gridClasses.gridClasses.headerFilterRow} > [data-field="${escapeOperandAttributeSelector(field)}"]`);
|
|
219
|
+
}
|
|
215
220
|
function findGridCells(api, field) {
|
|
216
221
|
const container = api.virtualScrollerRef.current;
|
|
217
222
|
return Array.from(container.querySelectorAll(`:scope > div > div > div > [data-field="${escapeOperandAttributeSelector(field)}"][role="gridcell"]`));
|
package/utils/utils.d.ts
CHANGED
|
@@ -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;
|
package/utils/utils.js
CHANGED
|
@@ -92,9 +92,9 @@ function deepClone(obj) {
|
|
|
92
92
|
* that hint disables checks on all values instead of just one.
|
|
93
93
|
*/
|
|
94
94
|
function eslintUseValue(_) {}
|
|
95
|
-
const runIf = (condition, fn) => params => {
|
|
95
|
+
const runIf = (condition, fn) => (...params) => {
|
|
96
96
|
if (condition) {
|
|
97
|
-
fn(params);
|
|
97
|
+
fn(...params);
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
100
|
exports.runIf = runIf;
|