@mui/x-data-grid 8.16.0 → 8.18.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 (180) hide show
  1. package/CHANGELOG.md +208 -1
  2. package/colDef/gridCheckboxSelectionColDef.js +0 -2
  3. package/components/GridColumnSortButton.d.ts +1 -1
  4. package/components/GridFooter.d.ts +2 -3
  5. package/components/GridFooter.js +0 -2
  6. package/components/GridHeader.d.ts +1 -2
  7. package/components/GridHeaders.d.ts +1 -2
  8. package/components/GridHeaders.js +0 -2
  9. package/components/GridNoColumnsOverlay.d.ts +2 -3
  10. package/components/GridNoColumnsOverlay.js +0 -2
  11. package/components/GridNoResultsOverlay.d.ts +2 -3
  12. package/components/GridNoResultsOverlay.js +0 -2
  13. package/components/GridNoRowsOverlay.d.ts +2 -3
  14. package/components/GridNoRowsOverlay.js +0 -2
  15. package/components/GridPagination.d.ts +1 -2
  16. package/components/GridScrollArea.d.ts +1 -2
  17. package/components/GridScrollShadows.d.ts +1 -2
  18. package/components/GridScrollbarFillerCell.d.ts +1 -2
  19. package/components/GridScrollbarFillerCell.js +0 -2
  20. package/components/base/GridFooterPlaceholder.d.ts +1 -2
  21. package/components/base/GridFooterPlaceholder.js +0 -2
  22. package/components/base/GridOverlays.d.ts +1 -1
  23. package/components/cell/GridActionsCell.d.ts +2 -3
  24. package/components/cell/GridActionsCellItem.js +1 -18
  25. package/components/cell/GridBooleanCell.d.ts +1 -1
  26. package/components/cell/GridCell.js +8 -1
  27. package/components/cell/GridEditBooleanCell.d.ts +2 -2
  28. package/components/cell/GridEditDateCell.d.ts +2 -2
  29. package/components/cell/GridEditInputCell.d.ts +1 -1
  30. package/components/cell/GridEditInputCell.js +0 -68
  31. package/components/cell/GridEditSingleSelectCell.d.ts +2 -3
  32. package/components/cell/GridSkeletonCell.d.ts +1 -1
  33. package/components/columnHeaders/ColumnHeaderMenuIcon.d.ts +1 -1
  34. package/components/columnHeaders/GridColumnGroupHeader.d.ts +1 -1
  35. package/components/columnHeaders/GridColumnHeaderFilterIconButton.d.ts +1 -1
  36. package/components/columnHeaders/GridColumnHeaderItem.d.ts +1 -1
  37. package/components/columnHeaders/GridColumnHeaderSeparator.d.ts +1 -1
  38. package/components/columnHeaders/GridColumnHeaderSortIcon.d.ts +1 -1
  39. package/components/columnHeaders/GridColumnHeaderTitle.d.ts +1 -1
  40. package/components/columnsManagement/GridColumnsManagement.d.ts +1 -2
  41. package/components/menu/GridMenu.d.ts +1 -1
  42. package/components/menu/columnMenu/GridColumnHeaderMenu.d.ts +1 -1
  43. package/components/menu/columnMenu/GridColumnMenu.d.ts +2 -3
  44. package/components/menu/columnMenu/GridColumnMenu.js +0 -2
  45. package/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.d.ts +1 -2
  46. package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.d.ts +1 -2
  47. package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.d.ts +1 -2
  48. package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.d.ts +1 -2
  49. package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.d.ts +1 -2
  50. package/components/panel/GridColumnsPanel.d.ts +1 -2
  51. package/components/panel/GridColumnsPanel.js +0 -2
  52. package/components/panel/GridPanelContent.d.ts +1 -1
  53. package/components/panel/GridPanelContext.d.ts +1 -1
  54. package/components/panel/GridPanelFooter.d.ts +1 -1
  55. package/components/panel/GridPanelHeader.d.ts +1 -1
  56. package/components/panel/GridPreferencesPanel.d.ts +1 -2
  57. package/components/panel/GridPreferencesPanel.js +0 -2
  58. package/components/panel/filterPanel/GridFilterInputBoolean.d.ts +1 -2
  59. package/components/panel/filterPanel/GridFilterInputDate.d.ts +1 -2
  60. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +1 -2
  61. package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +1 -2
  62. package/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +1 -2
  63. package/components/panel/filterPanel/GridFilterInputValue.d.ts +1 -2
  64. package/components/quickFilter/QuickFilter.d.ts +1 -1
  65. package/components/toolbar/GridToolbar.d.ts +1 -2
  66. package/components/toolbar/GridToolbar.js +0 -2
  67. package/components/toolbar/GridToolbarExport.d.ts +2 -2
  68. package/components/toolbar/GridToolbarQuickFilter.d.ts +1 -2
  69. package/components/toolbar/GridToolbarQuickFilter.js +0 -2
  70. package/components/toolbarV8/GridToolbar.d.ts +3 -3
  71. package/components/virtualization/GridBottomContainer.d.ts +1 -1
  72. package/components/virtualization/GridTopContainer.d.ts +1 -1
  73. package/components/virtualization/GridVirtualScroller.d.ts +1 -1
  74. package/components/virtualization/GridVirtualScrollerFiller.d.ts +1 -2
  75. package/context/GridContextProvider.d.ts +1 -1
  76. package/esm/colDef/gridCheckboxSelectionColDef.js +0 -1
  77. package/esm/components/GridColumnSortButton.d.ts +1 -1
  78. package/esm/components/GridFooter.d.ts +2 -3
  79. package/esm/components/GridFooter.js +0 -1
  80. package/esm/components/GridHeader.d.ts +1 -2
  81. package/esm/components/GridHeaders.d.ts +1 -2
  82. package/esm/components/GridHeaders.js +0 -1
  83. package/esm/components/GridNoColumnsOverlay.d.ts +2 -3
  84. package/esm/components/GridNoColumnsOverlay.js +0 -1
  85. package/esm/components/GridNoResultsOverlay.d.ts +2 -3
  86. package/esm/components/GridNoResultsOverlay.js +0 -1
  87. package/esm/components/GridNoRowsOverlay.d.ts +2 -3
  88. package/esm/components/GridNoRowsOverlay.js +0 -1
  89. package/esm/components/GridPagination.d.ts +1 -2
  90. package/esm/components/GridScrollArea.d.ts +1 -2
  91. package/esm/components/GridScrollShadows.d.ts +1 -2
  92. package/esm/components/GridScrollbarFillerCell.d.ts +1 -2
  93. package/esm/components/GridScrollbarFillerCell.js +0 -1
  94. package/esm/components/base/GridFooterPlaceholder.d.ts +1 -2
  95. package/esm/components/base/GridFooterPlaceholder.js +0 -1
  96. package/esm/components/base/GridOverlays.d.ts +1 -1
  97. package/esm/components/cell/GridActionsCell.d.ts +2 -3
  98. package/esm/components/cell/GridActionsCellItem.js +0 -17
  99. package/esm/components/cell/GridBooleanCell.d.ts +1 -1
  100. package/esm/components/cell/GridCell.js +8 -1
  101. package/esm/components/cell/GridEditBooleanCell.d.ts +2 -2
  102. package/esm/components/cell/GridEditDateCell.d.ts +2 -2
  103. package/esm/components/cell/GridEditInputCell.d.ts +1 -1
  104. package/esm/components/cell/GridEditInputCell.js +0 -68
  105. package/esm/components/cell/GridEditSingleSelectCell.d.ts +2 -3
  106. package/esm/components/cell/GridSkeletonCell.d.ts +1 -1
  107. package/esm/components/columnHeaders/ColumnHeaderMenuIcon.d.ts +1 -1
  108. package/esm/components/columnHeaders/GridColumnGroupHeader.d.ts +1 -1
  109. package/esm/components/columnHeaders/GridColumnHeaderFilterIconButton.d.ts +1 -1
  110. package/esm/components/columnHeaders/GridColumnHeaderItem.d.ts +1 -1
  111. package/esm/components/columnHeaders/GridColumnHeaderSeparator.d.ts +1 -1
  112. package/esm/components/columnHeaders/GridColumnHeaderSortIcon.d.ts +1 -1
  113. package/esm/components/columnHeaders/GridColumnHeaderTitle.d.ts +1 -1
  114. package/esm/components/columnsManagement/GridColumnsManagement.d.ts +1 -2
  115. package/esm/components/menu/GridMenu.d.ts +1 -1
  116. package/esm/components/menu/columnMenu/GridColumnHeaderMenu.d.ts +1 -1
  117. package/esm/components/menu/columnMenu/GridColumnMenu.d.ts +2 -3
  118. package/esm/components/menu/columnMenu/GridColumnMenu.js +0 -1
  119. package/esm/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.d.ts +1 -2
  120. package/esm/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.d.ts +1 -2
  121. package/esm/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.d.ts +1 -2
  122. package/esm/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.d.ts +1 -2
  123. package/esm/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.d.ts +1 -2
  124. package/esm/components/panel/GridColumnsPanel.d.ts +1 -2
  125. package/esm/components/panel/GridColumnsPanel.js +0 -1
  126. package/esm/components/panel/GridPanelContent.d.ts +1 -1
  127. package/esm/components/panel/GridPanelContext.d.ts +1 -1
  128. package/esm/components/panel/GridPanelFooter.d.ts +1 -1
  129. package/esm/components/panel/GridPanelHeader.d.ts +1 -1
  130. package/esm/components/panel/GridPreferencesPanel.d.ts +1 -2
  131. package/esm/components/panel/GridPreferencesPanel.js +0 -1
  132. package/esm/components/panel/filterPanel/GridFilterInputBoolean.d.ts +1 -2
  133. package/esm/components/panel/filterPanel/GridFilterInputDate.d.ts +1 -2
  134. package/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +1 -2
  135. package/esm/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +1 -2
  136. package/esm/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +1 -2
  137. package/esm/components/panel/filterPanel/GridFilterInputValue.d.ts +1 -2
  138. package/esm/components/quickFilter/QuickFilter.d.ts +1 -1
  139. package/esm/components/toolbar/GridToolbar.d.ts +1 -2
  140. package/esm/components/toolbar/GridToolbar.js +0 -1
  141. package/esm/components/toolbar/GridToolbarExport.d.ts +2 -2
  142. package/esm/components/toolbar/GridToolbarQuickFilter.d.ts +1 -2
  143. package/esm/components/toolbar/GridToolbarQuickFilter.js +0 -1
  144. package/esm/components/toolbarV8/GridToolbar.d.ts +3 -3
  145. package/esm/components/virtualization/GridBottomContainer.d.ts +1 -1
  146. package/esm/components/virtualization/GridTopContainer.d.ts +1 -1
  147. package/esm/components/virtualization/GridVirtualScroller.d.ts +1 -1
  148. package/esm/components/virtualization/GridVirtualScrollerFiller.d.ts +1 -2
  149. package/esm/context/GridContextProvider.d.ts +1 -1
  150. package/esm/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +2 -2
  151. package/esm/hooks/features/pagination/useGridPaginationModel.js +5 -3
  152. package/esm/hooks/features/rows/gridRowSpanningUtils.js +8 -5
  153. package/esm/hooks/features/rows/useGridParamsApi.js +2 -12
  154. package/esm/hooks/utils/useGridApiRef.d.ts +1 -2
  155. package/esm/index.js +1 -1
  156. package/esm/internals/demo/TailwindDemoContainer.d.ts +1 -1
  157. package/esm/locales/arSD.js +12 -12
  158. package/esm/locales/caES.d.ts +2 -0
  159. package/esm/locales/caES.js +291 -0
  160. package/esm/locales/index.d.ts +1 -0
  161. package/esm/locales/index.js +1 -0
  162. package/esm/material/icons/index.d.ts +0 -1
  163. package/esm/material/icons/index.js +0 -1
  164. package/esm/utils/css/context.d.ts +3 -3
  165. package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +2 -2
  166. package/hooks/features/pagination/useGridPaginationModel.js +5 -3
  167. package/hooks/features/rows/gridRowSpanningUtils.js +8 -5
  168. package/hooks/features/rows/useGridParamsApi.js +2 -12
  169. package/hooks/utils/useGridApiRef.d.ts +1 -2
  170. package/index.js +1 -1
  171. package/internals/demo/TailwindDemoContainer.d.ts +1 -1
  172. package/locales/arSD.js +12 -12
  173. package/locales/caES.d.ts +2 -0
  174. package/locales/caES.js +297 -0
  175. package/locales/index.d.ts +1 -0
  176. package/locales/index.js +11 -0
  177. package/material/icons/index.d.ts +0 -1
  178. package/material/icons/index.js +0 -2
  179. package/package.json +4 -4
  180. package/utils/css/context.d.ts +3 -3
@@ -0,0 +1,291 @@
1
+ import { getGridLocalization } from "../utils/getGridLocalization.js";
2
+ const caESGrid = {
3
+ // Root
4
+ noRowsLabel: 'Sense files',
5
+ noResultsOverlayLabel: "No s'han trobat resultats",
6
+ noColumnsOverlayLabel: 'Cap columna',
7
+ noColumnsOverlayManageColumns: 'Gestiona les columnes',
8
+ emptyPivotOverlayLabel: 'Afegiu camps a files, columnes i valors per crear una taula dinàmica',
9
+ // Density selector toolbar button text
10
+ toolbarDensity: 'Densitat',
11
+ toolbarDensityLabel: 'Densitat',
12
+ toolbarDensityCompact: 'Compacta',
13
+ toolbarDensityStandard: 'Estàndard',
14
+ toolbarDensityComfortable: 'Còmoda',
15
+ // Columns selector toolbar button text
16
+ toolbarColumns: 'Columnes',
17
+ toolbarColumnsLabel: 'Selecciona columnes',
18
+ // Filters toolbar button text
19
+ toolbarFilters: 'Filtres',
20
+ toolbarFiltersLabel: 'Mostra filtres',
21
+ toolbarFiltersTooltipHide: 'Amaga filtres',
22
+ toolbarFiltersTooltipShow: 'Mostra filtres',
23
+ toolbarFiltersTooltipActive: count => count > 1 ? `${count} filtres actius` : `${count} filtre actiu`,
24
+ // Quick filter toolbar field
25
+ toolbarQuickFilterPlaceholder: 'Cerca…',
26
+ toolbarQuickFilterLabel: 'Cerca',
27
+ toolbarQuickFilterDeleteIconLabel: 'Neteja',
28
+ // Export selector toolbar button text
29
+ toolbarExport: 'Exporta',
30
+ toolbarExportLabel: 'Exporta',
31
+ toolbarExportCSV: 'Baixa com a CSV',
32
+ toolbarExportPrint: 'Imprimeix',
33
+ toolbarExportExcel: 'Baixa com a Excel',
34
+ // Toolbar pivot button
35
+ toolbarPivot: 'Taula dinàmica',
36
+ // Toolbar charts button
37
+ toolbarCharts: 'Gràfics',
38
+ // Toolbar AI Assistant button
39
+ toolbarAssistant: "Assistent d'IA",
40
+ // Columns management text
41
+ columnsManagementSearchTitle: 'Cerca',
42
+ columnsManagementNoColumns: 'Sense columnes',
43
+ columnsManagementShowHideAllText: 'Mostra/Amaga-ho tot',
44
+ columnsManagementReset: 'Restableix',
45
+ columnsManagementDeleteIconLabel: 'Neteja',
46
+ // Filter panel text
47
+ filterPanelAddFilter: 'Afegeix filtre',
48
+ filterPanelRemoveAll: "Elimina'ls tots",
49
+ filterPanelDeleteIconLabel: 'Esborra',
50
+ filterPanelLogicOperator: 'Operador lògic',
51
+ filterPanelOperator: 'Operadors',
52
+ filterPanelOperatorAnd: 'I',
53
+ filterPanelOperatorOr: 'O',
54
+ filterPanelColumns: 'Columnes',
55
+ filterPanelInputLabel: 'Valor',
56
+ filterPanelInputPlaceholder: 'Valor del filtre',
57
+ // Filter operators text
58
+ filterOperatorContains: 'conté',
59
+ filterOperatorDoesNotContain: 'no conté',
60
+ filterOperatorEquals: 'és igual a',
61
+ filterOperatorDoesNotEqual: 'no és igual a',
62
+ filterOperatorStartsWith: 'comença per',
63
+ filterOperatorEndsWith: 'acaba en',
64
+ filterOperatorIs: 'és',
65
+ filterOperatorNot: 'no és',
66
+ filterOperatorAfter: 'és posterior',
67
+ filterOperatorOnOrAfter: 'és igual o posterior',
68
+ filterOperatorBefore: 'és anterior',
69
+ filterOperatorOnOrBefore: 'és igual o anterior',
70
+ filterOperatorIsEmpty: 'està buit',
71
+ filterOperatorIsNotEmpty: 'no està buit',
72
+ filterOperatorIsAnyOf: 'és qualsevol de',
73
+ 'filterOperator=': '=',
74
+ 'filterOperator!=': '!=',
75
+ 'filterOperator>': '>',
76
+ 'filterOperator>=': '>=',
77
+ 'filterOperator<': '<',
78
+ 'filterOperator<=': '<=',
79
+ // Header filter operators text
80
+ headerFilterOperatorContains: 'Conté',
81
+ headerFilterOperatorDoesNotContain: 'No conté',
82
+ headerFilterOperatorEquals: 'És igual a',
83
+ headerFilterOperatorDoesNotEqual: 'No és igual a',
84
+ headerFilterOperatorStartsWith: 'Comença per',
85
+ headerFilterOperatorEndsWith: 'Acaba en',
86
+ headerFilterOperatorIs: 'És',
87
+ headerFilterOperatorNot: 'No és',
88
+ headerFilterOperatorAfter: 'És posterior a',
89
+ headerFilterOperatorOnOrAfter: 'És igual o posterior a',
90
+ headerFilterOperatorBefore: 'És anterior a',
91
+ headerFilterOperatorOnOrBefore: 'És igual o anterior a',
92
+ headerFilterOperatorIsEmpty: 'Està buit',
93
+ headerFilterOperatorIsNotEmpty: 'No està buit',
94
+ headerFilterOperatorIsAnyOf: 'És qualsevol de',
95
+ 'headerFilterOperator=': 'És igual a',
96
+ 'headerFilterOperator!=': 'No és igual a',
97
+ 'headerFilterOperator>': 'És més gran que',
98
+ 'headerFilterOperator>=': 'És més gran o igual que',
99
+ 'headerFilterOperator<': 'És més petit que',
100
+ 'headerFilterOperator<=': 'És més petit o igual que',
101
+ headerFilterClear: 'Neteja filtres',
102
+ // Filter values text
103
+ filterValueAny: 'qualsevol',
104
+ filterValueTrue: 'veritable',
105
+ filterValueFalse: 'fals',
106
+ // Column menu text
107
+ columnMenuLabel: 'Menú',
108
+ columnMenuAriaLabel: columnName => `Menú de la columna ${columnName}`,
109
+ columnMenuShowColumns: 'Mostra columnes',
110
+ columnMenuManageColumns: 'Gestiona columnes',
111
+ columnMenuFilter: 'Filtre',
112
+ columnMenuHideColumn: 'Amaga',
113
+ columnMenuUnsort: 'Desordena',
114
+ columnMenuSortAsc: 'Ordena ASC',
115
+ columnMenuSortDesc: 'Ordena DESC',
116
+ columnMenuManagePivot: 'Gestiona la taula dinàmica',
117
+ columnMenuManageCharts: 'Gestiona els gràfics',
118
+ // Column header text
119
+ columnHeaderFiltersTooltipActive: count => count > 1 ? `${count} filtres actius` : `${count} filtre actiu`,
120
+ columnHeaderFiltersLabel: 'Mostra filtres',
121
+ columnHeaderSortIconLabel: 'Ordena',
122
+ // Rows selected footer text
123
+ footerRowSelected: count => count > 1 ? `${count.toLocaleString()} files seleccionades` : `${count.toLocaleString()} fila seleccionada`,
124
+ // Total row amount footer text
125
+ footerTotalRows: 'Files totals:',
126
+ // Total visible row amount footer text
127
+ footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} de ${totalCount.toLocaleString()}`,
128
+ // Checkbox selection text
129
+ checkboxSelectionHeaderName: 'Casella de selecció',
130
+ checkboxSelectionSelectAllRows: 'Selecciona totes les files',
131
+ checkboxSelectionUnselectAllRows: 'Desselecciona totes les files',
132
+ checkboxSelectionSelectRow: 'Selecciona fila',
133
+ checkboxSelectionUnselectRow: 'Desselecciona fila',
134
+ // Boolean cell text
135
+ booleanCellTrueLabel: 'sí',
136
+ booleanCellFalseLabel: 'no',
137
+ // Actions cell more text
138
+ actionsCellMore: 'més',
139
+ // Column pinning text
140
+ pinToLeft: "Fixa a l'esquerra",
141
+ pinToRight: 'Fixa a la dreta',
142
+ unpin: 'Desfixa',
143
+ // Tree Data
144
+ treeDataGroupingHeaderName: 'Grup',
145
+ treeDataExpand: 'mostra fills',
146
+ treeDataCollapse: 'amaga fills',
147
+ // Grouping columns
148
+ groupingColumnHeaderName: 'Grup',
149
+ groupColumn: name => `Agrupa per ${name}`,
150
+ unGroupColumn: name => `No agrupis per ${name}`,
151
+ // Master/detail
152
+ detailPanelToggle: 'Alterna detall',
153
+ expandDetailPanel: 'Expandeix',
154
+ collapseDetailPanel: 'Contrau',
155
+ // Pagination
156
+ paginationRowsPerPage: 'Files per pàgina:',
157
+ paginationDisplayedRows: ({
158
+ from,
159
+ to,
160
+ count,
161
+ estimated
162
+ }) => {
163
+ if (!estimated) {
164
+ return `${from}–${to} de ${count !== -1 ? count : `més de ${to}`}`;
165
+ }
166
+ const estimatedLabel = estimated && estimated > to ? `al voltant de ${estimated}` : `més de ${to}`;
167
+ return `${from}–${to} de ${count !== -1 ? count : estimatedLabel}`;
168
+ },
169
+ paginationItemAriaLabel: type => {
170
+ if (type === 'first') {
171
+ return 'Vés a la primera pàgina';
172
+ }
173
+ if (type === 'last') {
174
+ return "Vés a l'última pàgina";
175
+ }
176
+ if (type === 'next') {
177
+ return 'Vés a la pàgina següent';
178
+ }
179
+ // if (type === 'previous') {
180
+ return 'Vés a la pàgina anterior';
181
+ },
182
+ // Row reordering text
183
+ rowReorderingHeaderName: 'Reordena files',
184
+ // Aggregation
185
+ aggregationMenuItemHeader: 'Agregació',
186
+ aggregationFunctionLabelNone: 'cap',
187
+ aggregationFunctionLabelSum: 'suma',
188
+ aggregationFunctionLabelAvg: 'mitjana',
189
+ aggregationFunctionLabelMin: 'mínim',
190
+ aggregationFunctionLabelMax: 'màxim',
191
+ aggregationFunctionLabelSize: 'recompte',
192
+ // Pivot panel
193
+ pivotToggleLabel: 'Taula dinàmica',
194
+ pivotRows: 'Files',
195
+ pivotColumns: 'Columnes',
196
+ pivotValues: 'Valors',
197
+ pivotCloseButton: 'Tanca la configuració de taula dinàmica',
198
+ pivotSearchButton: 'Camps de cerca',
199
+ pivotSearchControlPlaceholder: 'Camps de cerca',
200
+ pivotSearchControlLabel: 'Camps de cerca',
201
+ pivotSearchControlClear: 'Neteja la cerca',
202
+ pivotNoFields: 'Cap camp',
203
+ pivotMenuMoveUp: 'Mou amunt',
204
+ pivotMenuMoveDown: 'Mou avall',
205
+ pivotMenuMoveToTop: 'Mou al principi',
206
+ pivotMenuMoveToBottom: 'Mou al final',
207
+ pivotMenuRows: 'Files',
208
+ pivotMenuColumns: 'Columnes',
209
+ pivotMenuValues: 'Valors',
210
+ pivotMenuOptions: 'Opcions del camp',
211
+ pivotMenuAddToRows: 'Afegeix a files',
212
+ pivotMenuAddToColumns: 'Afegeix a columnes',
213
+ pivotMenuAddToValues: 'Afegeix a valors',
214
+ pivotMenuRemove: 'Elimina',
215
+ pivotDragToRows: 'Arrossega aquí per crear files',
216
+ pivotDragToColumns: 'Arrossega aquí per crear columnes',
217
+ pivotDragToValues: 'Arrossega aquí per crear valors',
218
+ pivotYearColumnHeaderName: '(Any)',
219
+ pivotQuarterColumnHeaderName: '(Trimestre)',
220
+ // Charts configuration panel
221
+ chartsNoCharts: 'No hi ha cap gràfic disponible',
222
+ chartsChartNotSelected: 'Selecciona un tipus de gràfic per configurar les seves opcions',
223
+ chartsTabChart: 'Gràfic',
224
+ chartsTabFields: 'Camps',
225
+ chartsTabCustomize: 'Personalitza',
226
+ chartsCloseButton: 'Tanca la configuració de gràfics',
227
+ chartsSyncButtonLabel: 'Sincronitza gràfic',
228
+ chartsSearchPlaceholder: 'Camps de cerca',
229
+ chartsSearchLabel: 'Camps de cerca',
230
+ chartsSearchClear: 'Neteja la cerca',
231
+ chartsNoFields: 'Cap camp',
232
+ chartsFieldBlocked: 'Aquest camp no es pot afegir a cap secció',
233
+ chartsCategories: 'Categories',
234
+ chartsSeries: 'Sèries',
235
+ chartsMenuAddToDimensions: dimensionLabel => `Afegeix a ${dimensionLabel}`,
236
+ chartsMenuAddToValues: valuesLabel => `Afegeix a ${valuesLabel}`,
237
+ chartsMenuMoveUp: 'Mou amunt',
238
+ chartsMenuMoveDown: 'Mou avall',
239
+ chartsMenuMoveToTop: 'Mou al principi',
240
+ chartsMenuMoveToBottom: 'Mou al final',
241
+ chartsMenuOptions: 'Opcions del camp',
242
+ chartsMenuRemove: 'Elimina',
243
+ chartsDragToDimensions: dimensionLabel => `Arrossega aquí per utilitzar la columna com a ${dimensionLabel}`,
244
+ chartsDragToValues: valuesLabel => `Arrossega aquí per utilitzar la columna com a ${valuesLabel}`,
245
+ // AI Assistant panel
246
+ aiAssistantPanelTitle: "Assistent d'IA",
247
+ aiAssistantPanelClose: "Tanca l'assistent d'IA",
248
+ aiAssistantPanelNewConversation: 'Nova conversa',
249
+ aiAssistantPanelConversationHistory: 'Historial de converses',
250
+ aiAssistantPanelEmptyConversation: "L'historial de converses és buit",
251
+ aiAssistantSuggestions: 'Suggeriments',
252
+ // Prompt field
253
+ promptFieldLabel: 'Petició',
254
+ promptFieldPlaceholder: 'Escriu una petició…',
255
+ promptFieldPlaceholderWithRecording: 'Escriu o enregistra una petició…',
256
+ promptFieldPlaceholderListening: 'Esperant una petició…',
257
+ promptFieldSpeechRecognitionNotSupported: 'El reconeixement de veu no és compatible amb aquest navegador',
258
+ promptFieldSend: 'Envia',
259
+ promptFieldRecord: 'Enregistra',
260
+ promptFieldStopRecording: "Atura l'enregistrament",
261
+ // Prompt
262
+ promptRerun: 'Torna a executar',
263
+ promptProcessing: 'Processant…',
264
+ promptAppliedChanges: "S'han aplicat els canvis",
265
+ // Prompt changes
266
+ promptChangeGroupDescription: column => `Agrupa per ${column}`,
267
+ promptChangeAggregationLabel: (column, aggregation) => `${column} (${aggregation})`,
268
+ promptChangeAggregationDescription: (column, aggregation) => `Agrega ${column} (${aggregation})`,
269
+ promptChangeFilterLabel: (column, operator, value) => {
270
+ if (operator === 'is any of') {
271
+ return `${column} és un de: ${value}`;
272
+ }
273
+ return `${column} ${operator} ${value}`;
274
+ },
275
+ promptChangeFilterDescription: (column, operator, value) => {
276
+ if (operator === 'is any of') {
277
+ return `Filtra per ${column} quan sigui un de: ${value}`;
278
+ }
279
+ return `Filtra per ${column} ${operator} ${value}`;
280
+ },
281
+ promptChangeSortDescription: (column, direction) => `Ordena per ${column} (${direction})`,
282
+ promptChangePivotEnableLabel: 'Taula dinàmica',
283
+ promptChangePivotEnableDescription: 'Activa la taula dinàmica',
284
+ promptChangePivotColumnsLabel: count => `Columnes (${count})`,
285
+ promptChangePivotColumnsDescription: (column, direction) => `${column}${direction ? ` (${direction})` : ''}`,
286
+ promptChangePivotRowsLabel: count => `Files (${count})`,
287
+ promptChangePivotValuesLabel: count => `Valors (${count})`,
288
+ promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`,
289
+ promptChangeChartsLabel: (dimensionsCount, valuesCount) => `Dimensions (${dimensionsCount}), Valors (${valuesCount})`
290
+ };
291
+ export const caES = getGridLocalization(caESGrid);
@@ -3,6 +3,7 @@ export * from "./beBY.js";
3
3
  export * from "./bgBG.js";
4
4
  export * from "./bnBD.js";
5
5
  export * from "./csCZ.js";
6
+ export * from "./caES.js";
6
7
  export * from "./daDK.js";
7
8
  export * from "./deDE.js";
8
9
  export * from "./elGR.js";
@@ -4,6 +4,7 @@ export * from "./beBY.js";
4
4
  export * from "./bgBG.js";
5
5
  export * from "./bnBD.js";
6
6
  export * from "./csCZ.js";
7
+ export * from "./caES.js";
7
8
  export * from "./daDK.js";
8
9
  export * from "./deDE.js";
9
10
  export * from "./elGR.js";
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  export declare const GridArrowUpwardIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
3
2
  export declare const GridArrowDownwardIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
4
3
  export declare const GridKeyboardArrowRight: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import { createSvgIcon } from "./createSvgIcon.js";
3
2
  import { jsx as _jsx } from "react/jsx-runtime";
4
3
  export const GridArrowUpwardIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
@@ -2,13 +2,13 @@ import * as React from 'react';
2
2
  export declare function useCSSVariablesClass(): string;
3
3
  export declare function useCSSVariablesContext(): {
4
4
  className: string;
5
- tag: React.JSX.Element;
5
+ tag: import("react/jsx-runtime").JSX.Element;
6
6
  };
7
7
  export declare function GridPortalWrapper({
8
8
  children
9
9
  }: {
10
10
  children: React.ReactNode;
11
- }): React.JSX.Element;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
12
  export declare function GridCSSVariablesContext(props: {
13
13
  children: any;
14
- }): React.JSX.Element;
14
+ }): import("react/jsx-runtime").JSX.Element;
@@ -48,8 +48,8 @@ export declare const useGridColumnHeaders: (props: UseGridColumnHeadersProps) =>
48
48
  };
49
49
  visibleColumns: GridStateColDef[];
50
50
  columnPositions: number[];
51
- getFillers: (params: GetHeadersParams | undefined, children: React.ReactNode, leftOverflow: number, borderBottom?: boolean) => React.JSX.Element;
52
- getColumnHeadersRow: () => React.JSX.Element;
51
+ getFillers: (params: GetHeadersParams | undefined, children: React.ReactNode, leftOverflow: number, borderBottom?: boolean) => import("react/jsx-runtime").JSX.Element;
52
+ getColumnHeadersRow: () => import("react/jsx-runtime").JSX.Element;
53
53
  getColumnsToRender: (params?: GetHeadersParams) => {
54
54
  renderedColumns: GridStateColDef[];
55
55
  firstColumnToRender: number;
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "__esModule", {
9
9
  exports.useGridPaginationModel = exports.getDerivedPaginationModel = void 0;
10
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
11
  var React = _interopRequireWildcard(require("react"));
12
+ var _debounce = _interopRequireDefault(require("@mui/utils/debounce"));
12
13
  var _isDeepEqual = require("@mui/x-internals/isDeepEqual");
13
14
  var _gridFilterSelector = require("../filter/gridFilterSelector");
14
15
  var _density = require("../density");
@@ -182,6 +183,7 @@ const useGridPaginationModel = (apiRef, props) => {
182
183
  });
183
184
  }
184
185
  }, [apiRef]);
186
+ const debouncedNavigateToStart = React.useMemo(() => (0, _debounce.default)(navigateToStart, 0), [navigateToStart]);
185
187
 
186
188
  /**
187
189
  * Resets the page only if the active items or quick filter has changed from the last time.
@@ -198,12 +200,12 @@ const useGridPaginationModel = (apiRef, props) => {
198
200
  return;
199
201
  }
200
202
  previousFilterModel.current = currentActiveFilters;
201
- navigateToStart();
202
- }, [apiRef, navigateToStart]);
203
+ debouncedNavigateToStart();
204
+ }, [apiRef, debouncedNavigateToStart]);
203
205
  (0, _utils.useGridEvent)(apiRef, 'viewportInnerSizeChange', handleUpdateAutoPageSize);
204
206
  (0, _utils.useGridEvent)(apiRef, 'paginationModelChange', handlePaginationModelChange);
205
207
  (0, _utils.useGridEvent)(apiRef, 'rowCountChange', handleRowCountChange);
206
- (0, _utils.useGridEvent)(apiRef, 'sortModelChange', navigateToStart);
208
+ (0, _utils.useGridEvent)(apiRef, 'sortModelChange', debouncedNavigateToStart);
207
209
  (0, _utils.useGridEvent)(apiRef, 'filterModelChange', handleFilterModelChange);
208
210
 
209
211
  /**
@@ -7,6 +7,7 @@ exports.getCellValue = void 0;
7
7
  exports.getUnprocessedRange = getUnprocessedRange;
8
8
  exports.isRowContextInitialized = isRowContextInitialized;
9
9
  exports.isRowRangeUpdated = isRowRangeUpdated;
10
+ var _gridRowsUtils = require("./gridRowsUtils");
10
11
  function getUnprocessedRange(testRange, processedRange) {
11
12
  if (testRange.firstRowIndex >= processedRange.firstRowIndex && testRange.lastRowIndex <= processedRange.lastRowIndex) {
12
13
  return null;
@@ -42,11 +43,13 @@ const getCellValue = (row, colDef, apiRef) => {
42
43
  if (!row) {
43
44
  return null;
44
45
  }
45
- let cellValue = row[colDef.field];
46
- const valueGetter = colDef.rowSpanValueGetter ?? colDef.valueGetter;
47
- if (valueGetter) {
48
- cellValue = valueGetter(cellValue, row, colDef, apiRef);
46
+ const cellValue = row[colDef.field];
47
+ if (colDef.rowSpanValueGetter) {
48
+ return colDef.rowSpanValueGetter(cellValue, row, colDef, apiRef);
49
49
  }
50
- return cellValue;
50
+
51
+ // This util is also called during the state initialization
52
+ // Use util method directly instead of calling apiRef.current.getRowValue
53
+ return (0, _gridRowsUtils.getRowValue)(row, colDef, apiRef);
51
54
  };
52
55
  exports.getCellValue = getCellValue;
@@ -49,18 +49,8 @@ function useGridParamsApi(apiRef, props, configuration) {
49
49
  value: forcedValue,
50
50
  formattedValue: forcedFormattedValue
51
51
  }) => {
52
- let value = row[field];
53
- if (forcedValue !== undefined) {
54
- value = forcedValue;
55
- } else if (colDef?.valueGetter) {
56
- value = colDef.valueGetter(value, row, colDef, apiRef);
57
- }
58
- let formattedValue = value;
59
- if (forcedFormattedValue !== undefined) {
60
- formattedValue = forcedFormattedValue;
61
- } else if (colDef?.valueFormatter) {
62
- formattedValue = colDef.valueFormatter(value, row, colDef, apiRef);
63
- }
52
+ const value = forcedValue !== undefined ? forcedValue : apiRef.current.getRowValue(row, colDef);
53
+ const formattedValue = forcedFormattedValue !== undefined ? forcedFormattedValue : apiRef.current.getRowFormattedValue(row, colDef);
64
54
  const params = {
65
55
  id,
66
56
  field,
@@ -1,7 +1,6 @@
1
1
  import { RefObject } from '@mui/x-internals/types';
2
- import { GridApiCommon } from "../../models/index.js";
3
2
  import { GridApiCommunity } from "../../models/api/gridApiCommunity.js";
4
3
  /**
5
4
  * Hook that instantiate a [[GridApiRef]].
6
5
  */
7
- export declare const useGridApiRef: <Api extends GridApiCommon = GridApiCommunity>() => RefObject<Api | null>;
6
+ export declare const useGridApiRef: () => RefObject<GridApiCommunity | null>;
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v8.16.0
2
+ * @mui/x-data-grid v8.18.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -7,5 +7,5 @@ interface TailwindDemoContainerProps {
7
7
  * WARNING: This is an internal component used in documentation to inject the Tailwind script.
8
8
  * Please do not use it in your application.
9
9
  */
10
- export declare function TailwindDemoContainer(props: TailwindDemoContainerProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
10
+ export declare function TailwindDemoContainer(props: TailwindDemoContainerProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
11
11
  export {};
package/locales/arSD.js CHANGED
@@ -166,18 +166,18 @@ const arSDGrid = {
166
166
  collapseDetailPanel: 'طوي',
167
167
  // Pagination
168
168
  paginationRowsPerPage: 'عدد الصفوف في الصفحة:',
169
- // paginationDisplayedRows: ({
170
- // from,
171
- // to,
172
- // count,
173
- // estimated
174
- // }) => {
175
- // if (!estimated) {
176
- // return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
177
- // }
178
- // const estimatedLabel = estimated && estimated > to ? `around ${estimated}` : `more than ${to}`;
179
- // return `${from}–${to} of ${count !== -1 ? count : estimatedLabel}`;
180
- // },
169
+ paginationDisplayedRows: ({
170
+ from,
171
+ to,
172
+ count,
173
+ estimated
174
+ }) => {
175
+ if (!estimated) {
176
+ return `\u200E${to}-${from}\u200E من ${count !== -1 ? count : `أكثر من ${to}`}`;
177
+ }
178
+ const estimatedLabel = estimated && estimated > to ? `حوالي ${estimated}` : `أكثر من ${to}`;
179
+ return `\u200E${to}-${from}\u200E من ${count !== -1 ? count : estimatedLabel}`;
180
+ },
181
181
  paginationItemAriaLabel: type => {
182
182
  if (type === 'first') {
183
183
  return 'انتقل إلى الصفحة الأولى';
@@ -0,0 +1,2 @@
1
+ import { Localization } from "../utils/getGridLocalization.js";
2
+ export declare const caES: Localization;