@mui/x-data-grid 6.18.1 → 7.0.0-alpha.1

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 (123) hide show
  1. package/CHANGELOG.md +558 -1
  2. package/DataGrid/DataGrid.js +0 -10
  3. package/DataGrid/useDataGridProps.js +9 -14
  4. package/colDef/gridActionsColDef.js +1 -2
  5. package/colDef/gridBooleanColDef.js +0 -1
  6. package/colDef/gridBooleanOperators.js +3 -4
  7. package/colDef/gridCheckboxSelectionColDef.js +0 -1
  8. package/colDef/gridDateOperators.js +10 -11
  9. package/colDef/gridNumericColDef.js +1 -3
  10. package/colDef/gridNumericOperators.d.ts +2 -2
  11. package/colDef/gridNumericOperators.js +13 -14
  12. package/colDef/gridSingleSelectOperators.js +5 -6
  13. package/colDef/gridStringColDef.js +1 -3
  14. package/colDef/gridStringOperators.d.ts +2 -2
  15. package/colDef/gridStringOperators.js +11 -12
  16. package/components/toolbar/GridToolbarFilterButton.js +3 -1
  17. package/constants/defaultGridSlotsComponents.js +17 -17
  18. package/hooks/features/export/useGridPrintExport.js +7 -10
  19. package/hooks/features/filter/gridFilterUtils.js +14 -68
  20. package/hooks/features/rows/useGridRows.js +4 -1
  21. package/index.js +1 -1
  22. package/internals/index.d.ts +0 -1
  23. package/internals/index.js +0 -1
  24. package/internals/utils/computeSlots.d.ts +4 -6
  25. package/internals/utils/computeSlots.js +2 -8
  26. package/internals/utils/index.d.ts +0 -1
  27. package/internals/utils/index.js +0 -1
  28. package/internals/utils/useProps.d.ts +1 -8
  29. package/internals/utils/useProps.js +5 -8
  30. package/joy/icons.d.ts +1 -2
  31. package/joy/joySlots.d.ts +1 -2
  32. package/legacy/DataGrid/DataGrid.js +0 -10
  33. package/legacy/DataGrid/useDataGridProps.js +10 -18
  34. package/legacy/colDef/gridActionsColDef.js +1 -2
  35. package/legacy/colDef/gridBooleanColDef.js +0 -1
  36. package/legacy/colDef/gridBooleanOperators.js +3 -4
  37. package/legacy/colDef/gridCheckboxSelectionColDef.js +0 -1
  38. package/legacy/colDef/gridDateOperators.js +10 -11
  39. package/legacy/colDef/gridNumericColDef.js +1 -3
  40. package/legacy/colDef/gridNumericOperators.js +13 -14
  41. package/legacy/colDef/gridSingleSelectOperators.js +5 -6
  42. package/legacy/colDef/gridStringColDef.js +1 -3
  43. package/legacy/colDef/gridStringOperators.js +11 -12
  44. package/legacy/components/toolbar/GridToolbarFilterButton.js +3 -1
  45. package/legacy/constants/defaultGridSlotsComponents.js +17 -17
  46. package/legacy/hooks/features/export/useGridPrintExport.js +7 -10
  47. package/legacy/hooks/features/filter/gridFilterUtils.js +14 -68
  48. package/legacy/hooks/features/rows/useGridRows.js +2 -1
  49. package/legacy/index.js +1 -1
  50. package/legacy/internals/index.js +0 -1
  51. package/legacy/internals/utils/computeSlots.js +2 -8
  52. package/legacy/internals/utils/index.js +0 -1
  53. package/legacy/internals/utils/useProps.js +5 -6
  54. package/legacy/locales/csCZ.js +2 -2
  55. package/legacy/material/index.js +48 -48
  56. package/locales/csCZ.js +2 -2
  57. package/material/index.js +48 -48
  58. package/models/colDef/gridColDef.d.ts +4 -14
  59. package/models/colDef/index.d.ts +1 -1
  60. package/models/gridFilterOperator.d.ts +4 -16
  61. package/models/gridIconSlotsComponent.d.ts +35 -36
  62. package/models/gridSlotsComponent.d.ts +31 -34
  63. package/models/index.d.ts +1 -1
  64. package/models/props/DataGridProps.d.ts +3 -14
  65. package/modern/DataGrid/DataGrid.js +0 -10
  66. package/modern/DataGrid/useDataGridProps.js +7 -9
  67. package/modern/colDef/gridActionsColDef.js +1 -2
  68. package/modern/colDef/gridBooleanColDef.js +0 -1
  69. package/modern/colDef/gridBooleanOperators.js +3 -4
  70. package/modern/colDef/gridCheckboxSelectionColDef.js +0 -1
  71. package/modern/colDef/gridDateOperators.js +10 -11
  72. package/modern/colDef/gridNumericColDef.js +1 -3
  73. package/modern/colDef/gridNumericOperators.js +13 -14
  74. package/modern/colDef/gridSingleSelectOperators.js +5 -6
  75. package/modern/colDef/gridStringColDef.js +1 -3
  76. package/modern/colDef/gridStringOperators.js +11 -12
  77. package/modern/components/toolbar/GridToolbarFilterButton.js +3 -1
  78. package/modern/constants/defaultGridSlotsComponents.js +17 -17
  79. package/modern/hooks/features/export/useGridPrintExport.js +6 -10
  80. package/modern/hooks/features/filter/gridFilterUtils.js +14 -67
  81. package/modern/hooks/features/rows/useGridRows.js +1 -1
  82. package/modern/index.js +1 -1
  83. package/modern/internals/index.js +0 -1
  84. package/modern/internals/utils/computeSlots.js +2 -8
  85. package/modern/internals/utils/index.js +0 -1
  86. package/modern/internals/utils/useProps.js +5 -8
  87. package/modern/locales/csCZ.js +2 -2
  88. package/modern/material/index.js +48 -48
  89. package/node/DataGrid/DataGrid.js +0 -10
  90. package/node/DataGrid/useDataGridProps.js +6 -8
  91. package/node/colDef/gridActionsColDef.js +1 -2
  92. package/node/colDef/gridBooleanColDef.js +0 -1
  93. package/node/colDef/gridBooleanOperators.js +3 -4
  94. package/node/colDef/gridCheckboxSelectionColDef.js +0 -1
  95. package/node/colDef/gridDateOperators.js +10 -11
  96. package/node/colDef/gridNumericColDef.js +1 -3
  97. package/node/colDef/gridNumericOperators.js +14 -14
  98. package/node/colDef/gridSingleSelectOperators.js +5 -6
  99. package/node/colDef/gridStringColDef.js +1 -3
  100. package/node/colDef/gridStringOperators.js +12 -12
  101. package/node/components/toolbar/GridToolbarFilterButton.js +3 -1
  102. package/node/constants/defaultGridSlotsComponents.js +17 -17
  103. package/node/hooks/features/export/useGridPrintExport.js +5 -9
  104. package/node/hooks/features/filter/gridFilterUtils.js +14 -67
  105. package/node/hooks/features/rows/useGridRows.js +1 -1
  106. package/node/index.js +1 -1
  107. package/node/internals/index.js +1 -13
  108. package/node/internals/utils/computeSlots.js +2 -7
  109. package/node/internals/utils/index.js +0 -11
  110. package/node/internals/utils/useProps.js +4 -8
  111. package/node/locales/csCZ.js +2 -2
  112. package/node/material/index.js +48 -48
  113. package/package.json +1 -1
  114. package/colDef/utils.d.ts +0 -21
  115. package/colDef/utils.js +0 -51
  116. package/internals/utils/slotsMigration.d.ts +0 -4
  117. package/internals/utils/slotsMigration.js +0 -13
  118. package/legacy/colDef/utils.js +0 -51
  119. package/legacy/internals/utils/slotsMigration.js +0 -14
  120. package/modern/colDef/utils.js +0 -51
  121. package/modern/internals/utils/slotsMigration.js +0 -13
  122. package/node/colDef/utils.js +0 -63
  123. package/node/internals/utils/slotsMigration.js +0 -21
@@ -10,7 +10,7 @@ import { gridColumnDefinitionsSelector, gridColumnVisibilityModelSelector } from
10
10
  import { gridClasses } from '../../../constants/gridClasses';
11
11
  import { useGridApiMethod } from '../../utils/useGridApiMethod';
12
12
  import { gridRowsMetaSelector } from '../rows/gridRowsMetaSelector';
13
- import { getColumnsToExport } from './utils';
13
+ import { defaultGetRowsToExport, getColumnsToExport } from './utils';
14
14
  import { mergeStateWithPaginationModel } from '../pagination/useGridPagination';
15
15
  import { useGridRegisterPipeProcessor } from '../../core/pipeProcessing';
16
16
  import { GridPrintExportMenuItem } from '../../../components/toolbar/GridToolbarExport';
@@ -130,12 +130,10 @@ export var useGridPrintExport = function useGridPrintExport(apiRef, props) {
130
130
  // the footer is always being placed at the bottom of the page as if all rows are exported
131
131
  // so if getRowsToExport is being used to only export a subset of rows then we need to
132
132
  // adjust the footer position to be correctly placed at the bottom of the grid
133
- if (options != null && options.getRowsToExport) {
134
- var gridFooterElement = gridClone.querySelector(".".concat(gridClasses.footerContainer));
135
- gridFooterElement.style.position = 'absolute';
136
- gridFooterElement.style.width = '100%';
137
- gridFooterElement.style.top = "".concat(computedTotalHeight - gridFooterElementHeight, "px");
138
- }
133
+ var gridFooterElement = gridClone.querySelector(".".concat(gridClasses.footerContainer));
134
+ gridFooterElement.style.position = 'absolute';
135
+ gridFooterElement.style.width = '100%';
136
+ gridFooterElement.style.top = "".concat(computedTotalHeight - gridFooterElementHeight, "px");
139
137
 
140
138
  // printDoc.body.appendChild(gridClone); should be enough but a clone isolation bug in Safari
141
139
  // prevents us to do it
@@ -226,6 +224,7 @@ export var useGridPrintExport = function useGridPrintExport(apiRef, props) {
226
224
  }, [apiRef]);
227
225
  var exportDataAsPrint = React.useCallback( /*#__PURE__*/function () {
228
226
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(options) {
227
+ var _options$getRowsToExp;
229
228
  var visibleRowCount, paginationModel, printWindow;
230
229
  return _regeneratorRuntime.wrap(function _callee$(_context) {
231
230
  while (1) switch (_context.prev = _context.next) {
@@ -255,9 +254,7 @@ export var useGridPrintExport = function useGridPrintExport(apiRef, props) {
255
254
  _context.next = 9;
256
255
  return updateGridColumnsForPrint(options == null ? void 0 : options.fields, options == null ? void 0 : options.allColumns, options == null ? void 0 : options.includeCheckboxes);
257
256
  case 9:
258
- if (options != null && options.getRowsToExport) {
259
- updateGridRowsForPrint(options.getRowsToExport);
260
- }
257
+ updateGridRowsForPrint((_options$getRowsToExp = options == null ? void 0 : options.getRowsToExport) != null ? _options$getRowsToExp : defaultGetRowsToExport);
261
258
  apiRef.current.unstable_setVirtualization(false);
262
259
  _context.next = 13;
263
260
  return raf();
@@ -1,6 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { GridLogicOperator } from '../../../models';
3
- import { GLOBAL_API_REF, isInternalFilter } from '../../../colDef/utils';
4
3
  import { getDefaultGridFilterModel } from './gridFilterState';
5
4
  import { buildWarning } from '../../../utils/warning';
6
5
  import { getPublicApiRef } from '../../../utils/getPublicApiRef';
@@ -121,42 +120,19 @@ var getFilterCallbackFromItem = function getFilterCallbackFromItem(filterItem, a
121
120
  if (!filterOperator) {
122
121
  throw new Error("MUI: No filter operator found for column '".concat(column.field, "' and operator value '").concat(newFilterItem.operator, "'."));
123
122
  }
124
- var hasUserFunctionLegacy = !isInternalFilter(filterOperator.getApplyFilterFn);
125
- var hasUserFunctionV7 = !isInternalFilter(filterOperator.getApplyFilterFnV7);
126
123
  var publicApiRef = getPublicApiRef(apiRef);
127
- if (filterOperator.getApplyFilterFnV7 && !(hasUserFunctionLegacy && !hasUserFunctionV7)) {
128
- var _applyFilterOnRow = filterOperator.getApplyFilterFnV7(newFilterItem, column);
129
- if (typeof _applyFilterOnRow !== 'function') {
130
- return null;
131
- }
132
- return {
133
- v7: true,
134
- item: newFilterItem,
135
- fn: function fn(row) {
136
- var value = apiRef.current.getRowValue(row, column);
137
- if (ignoreDiacritics) {
138
- value = removeDiacritics(value);
139
- }
140
- return _applyFilterOnRow(value, row, column, publicApiRef);
141
- }
142
- };
143
- }
144
124
  var applyFilterOnRow = filterOperator.getApplyFilterFn(newFilterItem, column);
145
125
  if (typeof applyFilterOnRow !== 'function') {
146
126
  return null;
147
127
  }
148
128
  return {
149
- v7: false,
150
129
  item: newFilterItem,
151
- fn: function fn(rowId) {
152
- var params = apiRef.current.getCellParams(rowId, newFilterItem.field);
153
- GLOBAL_API_REF.current = publicApiRef;
130
+ fn: function fn(row) {
131
+ var value = apiRef.current.getRowValue(row, column);
154
132
  if (ignoreDiacritics) {
155
- params.value = removeDiacritics(params.value);
133
+ value = removeDiacritics(value);
156
134
  }
157
- var result = applyFilterOnRow(params);
158
- GLOBAL_API_REF.current = null;
159
- return result;
135
+ return applyFilterOnRow(value, row, column, publicApiRef);
160
136
  }
161
137
  };
162
138
  };
@@ -185,7 +161,7 @@ var buildAggregatedFilterItemsApplier = function buildAggregatedFilterItemsAppli
185
161
  for (var i = 0; i < appliers.length; i += 1) {
186
162
  var applier = appliers[i];
187
163
  if (!shouldApplyFilter || shouldApplyFilter(applier.item.field)) {
188
- resultPerItemId[applier.item.id] = applier.v7 ? applier.fn(row) : applier.fn(apiRef.current.getRowId(row));
164
+ resultPerItemId[applier.item.id] = applier.fn(row);
189
165
  }
190
166
  }
191
167
  return resultPerItemId;
@@ -197,7 +173,7 @@ var buildAggregatedFilterItemsApplier = function buildAggregatedFilterItemsAppli
197
173
  var filterItemTemplate = "(function filterItem$$(getRowId, appliers, row, shouldApplyFilter) {\n ".concat(appliers.map(function (applier, i) {
198
174
  return "const shouldApply".concat(i, " = !shouldApplyFilter || shouldApplyFilter(").concat(JSON.stringify(applier.item.field), ");");
199
175
  }).join('\n'), "\n\n const result$$ = {\n ").concat(appliers.map(function (applier, i) {
200
- return "".concat(JSON.stringify(String(applier.item.id)), ":\n !shouldApply").concat(i, " ?\n false :\n ").concat(applier.v7 ? "appliers[".concat(i, "].fn(row)") : "appliers[".concat(i, "].fn(getRowId(row))"), ",\n ");
176
+ return "".concat(JSON.stringify(String(applier.item.id)), ":\n !shouldApply").concat(i, " ?\n false :\n appliers[").concat(i, "].fn(row),\n ");
201
177
  }).join('\n'), "};\n\n return result$$;\n })");
202
178
  var filterItemCore = evalCode(filterItemTemplate.replaceAll('$$', String(filterItemsApplierId)));
203
179
  var filterItem = function filterItem(row, shouldApplyItem) {
@@ -227,27 +203,12 @@ var buildAggregatedQuickFilterApplier = function buildAggregatedQuickFilterAppli
227
203
  columnFields.forEach(function (field) {
228
204
  var column = apiRef.current.getColumn(field);
229
205
  var getApplyQuickFilterFn = column == null ? void 0 : column.getApplyQuickFilterFn;
230
- var getApplyQuickFilterFnV7 = column == null ? void 0 : column.getApplyQuickFilterFnV7;
231
- var hasUserFunctionLegacy = !isInternalFilter(getApplyQuickFilterFn);
232
- var hasUserFunctionV7 = !isInternalFilter(getApplyQuickFilterFnV7);
233
- if (getApplyQuickFilterFnV7 && !(hasUserFunctionLegacy && !hasUserFunctionV7)) {
206
+ if (getApplyQuickFilterFn) {
234
207
  appliersPerField.push({
235
208
  column: column,
236
209
  appliers: quickFilterValues.map(function (quickFilterValue) {
237
210
  var value = ignoreDiacritics ? removeDiacritics(quickFilterValue) : quickFilterValue;
238
211
  return {
239
- v7: true,
240
- fn: getApplyQuickFilterFnV7(value, column, publicApiRef)
241
- };
242
- })
243
- });
244
- } else if (getApplyQuickFilterFn) {
245
- appliersPerField.push({
246
- column: column,
247
- appliers: quickFilterValues.map(function (quickFilterValue) {
248
- var value = ignoreDiacritics ? removeDiacritics(quickFilterValue) : quickFilterValue;
249
- return {
250
- v7: false,
251
212
  fn: getApplyQuickFilterFn(value, column, publicApiRef)
252
213
  };
253
214
  })
@@ -256,7 +217,6 @@ var buildAggregatedQuickFilterApplier = function buildAggregatedQuickFilterAppli
256
217
  });
257
218
  return function isRowMatchingQuickFilter(row, shouldApplyFilter) {
258
219
  var result = {};
259
- var usedCellParams = {};
260
220
 
261
221
  /* eslint-disable no-restricted-syntax, no-labels */
262
222
  outer: for (var v = 0; v < quickFilterValues.length; v += 1) {
@@ -274,27 +234,13 @@ var buildAggregatedQuickFilterApplier = function buildAggregatedQuickFilterAppli
274
234
  if (applier.fn === null) {
275
235
  continue;
276
236
  }
277
- if (applier.v7) {
278
- if (ignoreDiacritics) {
279
- value = removeDiacritics(value);
280
- }
281
- var isMatching = applier.fn(value, row, column, publicApiRef);
282
- if (isMatching) {
283
- result[filterValue] = true;
284
- continue outer;
285
- }
286
- } else {
287
- var _usedCellParams$_fiel;
288
- var cellParams = (_usedCellParams$_fiel = usedCellParams[_field]) != null ? _usedCellParams$_fiel : apiRef.current.getCellParams(apiRef.current.getRowId(row), _field);
289
- if (ignoreDiacritics) {
290
- cellParams.value = removeDiacritics(cellParams.value);
291
- }
292
- usedCellParams[_field] = cellParams;
293
- var _isMatching = applier.fn(cellParams);
294
- if (_isMatching) {
295
- result[filterValue] = true;
296
- continue outer;
297
- }
237
+ if (ignoreDiacritics) {
238
+ value = removeDiacritics(value);
239
+ }
240
+ var isMatching = applier.fn(value, row, column, publicApiRef);
241
+ if (isMatching) {
242
+ result[filterValue] = true;
243
+ continue outer;
298
244
  }
299
245
  }
300
246
  result[filterValue] = false;
@@ -303,7 +303,8 @@ export var useGridRows = function useGridRows(apiRef, props) {
303
303
 
304
304
  // Removes potential remaining skeleton rows from the dataRowIds.
305
305
  var dataRowIds = rootGroupChildren.filter(function (childId) {
306
- return tree[childId].type === 'leaf';
306
+ var _tree$childId;
307
+ return ((_tree$childId = tree[childId]) == null ? void 0 : _tree$childId.type) === 'leaf';
307
308
  });
308
309
  apiRef.current.caches.rows.dataRowIdToModelLookup = dataRowIdToModelLookup;
309
310
  apiRef.current.caches.rows.dataRowIdToIdLookup = dataRowIdToIdLookup;
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v6.18.1
2
+ * @mui/x-data-grid v7.0.0-alpha.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -63,5 +63,4 @@ export * from '../utils/getPublicApiRef';
63
63
  export { useGridPrivateApiContext } from '../hooks/utils/useGridPrivateApiContext';
64
64
  export * from '../hooks/utils/useOnMount';
65
65
  export { serializeCellValue } from '../hooks/features/export/serializers/csvSerializer';
66
- export * from '../colDef/utils';
67
66
  export * from './utils';
@@ -1,14 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import { uncapitalizeObjectKeys } from './slotsMigration';
3
-
4
- // TODO v7: Remove `components` and usages of `UncapitalizeObjectKeys` type
5
- // after converting keys in Grid(Pro|Premium)SlotsComponent to camelCase.
6
- // https://github.com/mui/mui-x/issues/7940
7
2
  export function computeSlots(_ref) {
8
3
  var defaultSlots = _ref.defaultSlots,
9
- slots = _ref.slots,
10
- components = _ref.components;
11
- var overrides = slots != null ? slots : components ? uncapitalizeObjectKeys(components) : null;
4
+ slots = _ref.slots;
5
+ var overrides = slots;
12
6
  if (!overrides || Object.keys(overrides).length === 0) {
13
7
  return defaultSlots;
14
8
  }
@@ -1,3 +1,2 @@
1
1
  export * from './computeSlots';
2
- export * from './slotsMigration';
3
2
  export * from './useProps';
@@ -1,6 +1,7 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
- var _excluded = ["components", "componentsProps"];
1
+ import _objectDestructuringEmpty from "@babel/runtime/helpers/esm/objectDestructuringEmpty";
2
+ import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import * as React from 'react';
4
+
4
5
  /** Gathers props for the root element into a single `.forwardedProps` field */
5
6
  function groupForwardedProps(props) {
6
7
  var _props$forwardedProps;
@@ -25,9 +26,7 @@ function groupForwardedProps(props) {
25
26
  }
26
27
  export function useProps(allProps) {
27
28
  return React.useMemo(function () {
28
- var components = allProps.components,
29
- componentsProps = allProps.componentsProps,
30
- themedProps = _objectWithoutProperties(allProps, _excluded);
31
- return [components, componentsProps, groupForwardedProps(themedProps)];
29
+ var themedProps = _extends({}, (_objectDestructuringEmpty(allProps), allProps));
30
+ return groupForwardedProps(themedProps);
32
31
  }, [allProps]);
33
32
  }
@@ -150,8 +150,8 @@ var csCZGrid = {
150
150
  // Actions cell more text
151
151
  actionsCellMore: 'více',
152
152
  // Column pinning text
153
- pinToLeft: 'Připnout na levo',
154
- pinToRight: 'Připnout na pravo',
153
+ pinToLeft: 'Připnout vlevo',
154
+ pinToRight: 'Připnout vpravo',
155
155
  unpin: 'Odepnout',
156
156
  // Tree Data
157
157
  treeDataGroupingHeaderName: 'Skupina',
@@ -15,55 +15,55 @@ import { GridColumnUnsortedIcon } from './icons/GridColumnUnsortedIcon';
15
15
  import { GridAddIcon, GridArrowDownwardIcon, GridArrowUpwardIcon, GridCheckIcon, GridCloseIcon, GridColumnIcon, GridDragIcon, GridExpandMoreIcon, GridFilterAltIcon, GridFilterListIcon, GridKeyboardArrowRight, GridMoreVertIcon, GridRemoveIcon, GridSaveAltIcon, GridSearchIcon, GridSeparatorIcon, GridTableRowsIcon, GridTripleDotsVerticalIcon, GridViewHeadlineIcon, GridViewStreamIcon, GridVisibilityOffIcon, GridViewColumnIcon, GridClearIcon, GridLoadIcon, GridDeleteForeverIcon } from './icons';
16
16
  import MUISelectOption from './components/MUISelectOption';
17
17
  var iconSlots = {
18
- BooleanCellTrueIcon: GridCheckIcon,
19
- BooleanCellFalseIcon: GridCloseIcon,
20
- ColumnMenuIcon: GridTripleDotsVerticalIcon,
21
- OpenFilterButtonIcon: GridFilterListIcon,
22
- FilterPanelDeleteIcon: GridCloseIcon,
23
- ColumnFilteredIcon: GridFilterAltIcon,
24
- ColumnSelectorIcon: GridColumnIcon,
25
- ColumnUnsortedIcon: GridColumnUnsortedIcon,
26
- ColumnSortedAscendingIcon: GridArrowUpwardIcon,
27
- ColumnSortedDescendingIcon: GridArrowDownwardIcon,
28
- ColumnResizeIcon: GridSeparatorIcon,
29
- DensityCompactIcon: GridViewHeadlineIcon,
30
- DensityStandardIcon: GridTableRowsIcon,
31
- DensityComfortableIcon: GridViewStreamIcon,
32
- ExportIcon: GridSaveAltIcon,
33
- MoreActionsIcon: GridMoreVertIcon,
34
- TreeDataCollapseIcon: GridExpandMoreIcon,
35
- TreeDataExpandIcon: GridKeyboardArrowRight,
36
- GroupingCriteriaCollapseIcon: GridExpandMoreIcon,
37
- GroupingCriteriaExpandIcon: GridKeyboardArrowRight,
38
- DetailPanelExpandIcon: GridAddIcon,
39
- DetailPanelCollapseIcon: GridRemoveIcon,
40
- RowReorderIcon: GridDragIcon,
41
- QuickFilterIcon: GridSearchIcon,
42
- QuickFilterClearIcon: GridCloseIcon,
43
- ColumnMenuHideIcon: GridVisibilityOffIcon,
44
- ColumnMenuSortAscendingIcon: GridArrowUpwardIcon,
45
- ColumnMenuSortDescendingIcon: GridArrowDownwardIcon,
46
- ColumnMenuFilterIcon: GridFilterAltIcon,
47
- ColumnMenuManageColumnsIcon: GridViewColumnIcon,
48
- ColumnMenuClearIcon: GridClearIcon,
49
- LoadIcon: GridLoadIcon,
50
- FilterPanelAddIcon: GridAddIcon,
51
- FilterPanelRemoveAllIcon: GridDeleteForeverIcon,
52
- ColumnReorderIcon: GridDragIcon
18
+ booleanCellTrueIcon: GridCheckIcon,
19
+ booleanCellFalseIcon: GridCloseIcon,
20
+ columnMenuIcon: GridTripleDotsVerticalIcon,
21
+ openFilterButtonIcon: GridFilterListIcon,
22
+ filterPanelDeleteIcon: GridCloseIcon,
23
+ columnFilteredIcon: GridFilterAltIcon,
24
+ columnSelectorIcon: GridColumnIcon,
25
+ columnUnsortedIcon: GridColumnUnsortedIcon,
26
+ columnSortedAscendingIcon: GridArrowUpwardIcon,
27
+ columnSortedDescendingIcon: GridArrowDownwardIcon,
28
+ columnResizeIcon: GridSeparatorIcon,
29
+ densityCompactIcon: GridViewHeadlineIcon,
30
+ densityStandardIcon: GridTableRowsIcon,
31
+ densityComfortableIcon: GridViewStreamIcon,
32
+ exportIcon: GridSaveAltIcon,
33
+ moreActionsIcon: GridMoreVertIcon,
34
+ treeDataCollapseIcon: GridExpandMoreIcon,
35
+ treeDataExpandIcon: GridKeyboardArrowRight,
36
+ groupingCriteriaCollapseIcon: GridExpandMoreIcon,
37
+ groupingCriteriaExpandIcon: GridKeyboardArrowRight,
38
+ detailPanelExpandIcon: GridAddIcon,
39
+ detailPanelCollapseIcon: GridRemoveIcon,
40
+ rowReorderIcon: GridDragIcon,
41
+ quickFilterIcon: GridSearchIcon,
42
+ quickFilterClearIcon: GridCloseIcon,
43
+ columnMenuHideIcon: GridVisibilityOffIcon,
44
+ columnMenuSortAscendingIcon: GridArrowUpwardIcon,
45
+ columnMenuSortDescendingIcon: GridArrowDownwardIcon,
46
+ columnMenuFilterIcon: GridFilterAltIcon,
47
+ columnMenuManageColumnsIcon: GridViewColumnIcon,
48
+ columnMenuClearIcon: GridClearIcon,
49
+ loadIcon: GridLoadIcon,
50
+ filterPanelAddIcon: GridAddIcon,
51
+ filterPanelRemoveAllIcon: GridDeleteForeverIcon,
52
+ columnReorderIcon: GridDragIcon
53
53
  };
54
54
  var materialSlots = _extends({}, iconSlots, {
55
- BaseCheckbox: MUICheckbox,
56
- BaseTextField: MUITextField,
57
- BaseFormControl: MUIFormControl,
58
- BaseSelect: MUISelect,
59
- BaseSwitch: MUISwitch,
60
- BaseButton: MUIButton,
61
- BaseIconButton: MUIIconButton,
62
- BaseInputAdornment: MUIInputAdornment,
63
- BaseTooltip: MUITooltip,
64
- BasePopper: MUIPopper,
65
- BaseInputLabel: MUIInputLabel,
66
- BaseSelectOption: MUISelectOption,
67
- BaseChip: MUIChip
55
+ baseCheckbox: MUICheckbox,
56
+ baseTextField: MUITextField,
57
+ baseFormControl: MUIFormControl,
58
+ baseSelect: MUISelect,
59
+ baseSwitch: MUISwitch,
60
+ baseButton: MUIButton,
61
+ baseIconButton: MUIIconButton,
62
+ baseInputAdornment: MUIInputAdornment,
63
+ baseTooltip: MUITooltip,
64
+ basePopper: MUIPopper,
65
+ baseInputLabel: MUIInputLabel,
66
+ baseSelectOption: MUISelectOption,
67
+ baseChip: MUIChip
68
68
  });
69
69
  export default materialSlots;
package/locales/csCZ.js CHANGED
@@ -150,8 +150,8 @@ const csCZGrid = {
150
150
  // Actions cell more text
151
151
  actionsCellMore: 'více',
152
152
  // Column pinning text
153
- pinToLeft: 'Připnout na levo',
154
- pinToRight: 'Připnout na pravo',
153
+ pinToLeft: 'Připnout vlevo',
154
+ pinToRight: 'Připnout vpravo',
155
155
  unpin: 'Odepnout',
156
156
  // Tree Data
157
157
  treeDataGroupingHeaderName: 'Skupina',
package/material/index.js CHANGED
@@ -15,55 +15,55 @@ import { GridColumnUnsortedIcon } from './icons/GridColumnUnsortedIcon';
15
15
  import { GridAddIcon, GridArrowDownwardIcon, GridArrowUpwardIcon, GridCheckIcon, GridCloseIcon, GridColumnIcon, GridDragIcon, GridExpandMoreIcon, GridFilterAltIcon, GridFilterListIcon, GridKeyboardArrowRight, GridMoreVertIcon, GridRemoveIcon, GridSaveAltIcon, GridSearchIcon, GridSeparatorIcon, GridTableRowsIcon, GridTripleDotsVerticalIcon, GridViewHeadlineIcon, GridViewStreamIcon, GridVisibilityOffIcon, GridViewColumnIcon, GridClearIcon, GridLoadIcon, GridDeleteForeverIcon } from './icons';
16
16
  import MUISelectOption from './components/MUISelectOption';
17
17
  const iconSlots = {
18
- BooleanCellTrueIcon: GridCheckIcon,
19
- BooleanCellFalseIcon: GridCloseIcon,
20
- ColumnMenuIcon: GridTripleDotsVerticalIcon,
21
- OpenFilterButtonIcon: GridFilterListIcon,
22
- FilterPanelDeleteIcon: GridCloseIcon,
23
- ColumnFilteredIcon: GridFilterAltIcon,
24
- ColumnSelectorIcon: GridColumnIcon,
25
- ColumnUnsortedIcon: GridColumnUnsortedIcon,
26
- ColumnSortedAscendingIcon: GridArrowUpwardIcon,
27
- ColumnSortedDescendingIcon: GridArrowDownwardIcon,
28
- ColumnResizeIcon: GridSeparatorIcon,
29
- DensityCompactIcon: GridViewHeadlineIcon,
30
- DensityStandardIcon: GridTableRowsIcon,
31
- DensityComfortableIcon: GridViewStreamIcon,
32
- ExportIcon: GridSaveAltIcon,
33
- MoreActionsIcon: GridMoreVertIcon,
34
- TreeDataCollapseIcon: GridExpandMoreIcon,
35
- TreeDataExpandIcon: GridKeyboardArrowRight,
36
- GroupingCriteriaCollapseIcon: GridExpandMoreIcon,
37
- GroupingCriteriaExpandIcon: GridKeyboardArrowRight,
38
- DetailPanelExpandIcon: GridAddIcon,
39
- DetailPanelCollapseIcon: GridRemoveIcon,
40
- RowReorderIcon: GridDragIcon,
41
- QuickFilterIcon: GridSearchIcon,
42
- QuickFilterClearIcon: GridCloseIcon,
43
- ColumnMenuHideIcon: GridVisibilityOffIcon,
44
- ColumnMenuSortAscendingIcon: GridArrowUpwardIcon,
45
- ColumnMenuSortDescendingIcon: GridArrowDownwardIcon,
46
- ColumnMenuFilterIcon: GridFilterAltIcon,
47
- ColumnMenuManageColumnsIcon: GridViewColumnIcon,
48
- ColumnMenuClearIcon: GridClearIcon,
49
- LoadIcon: GridLoadIcon,
50
- FilterPanelAddIcon: GridAddIcon,
51
- FilterPanelRemoveAllIcon: GridDeleteForeverIcon,
52
- ColumnReorderIcon: GridDragIcon
18
+ booleanCellTrueIcon: GridCheckIcon,
19
+ booleanCellFalseIcon: GridCloseIcon,
20
+ columnMenuIcon: GridTripleDotsVerticalIcon,
21
+ openFilterButtonIcon: GridFilterListIcon,
22
+ filterPanelDeleteIcon: GridCloseIcon,
23
+ columnFilteredIcon: GridFilterAltIcon,
24
+ columnSelectorIcon: GridColumnIcon,
25
+ columnUnsortedIcon: GridColumnUnsortedIcon,
26
+ columnSortedAscendingIcon: GridArrowUpwardIcon,
27
+ columnSortedDescendingIcon: GridArrowDownwardIcon,
28
+ columnResizeIcon: GridSeparatorIcon,
29
+ densityCompactIcon: GridViewHeadlineIcon,
30
+ densityStandardIcon: GridTableRowsIcon,
31
+ densityComfortableIcon: GridViewStreamIcon,
32
+ exportIcon: GridSaveAltIcon,
33
+ moreActionsIcon: GridMoreVertIcon,
34
+ treeDataCollapseIcon: GridExpandMoreIcon,
35
+ treeDataExpandIcon: GridKeyboardArrowRight,
36
+ groupingCriteriaCollapseIcon: GridExpandMoreIcon,
37
+ groupingCriteriaExpandIcon: GridKeyboardArrowRight,
38
+ detailPanelExpandIcon: GridAddIcon,
39
+ detailPanelCollapseIcon: GridRemoveIcon,
40
+ rowReorderIcon: GridDragIcon,
41
+ quickFilterIcon: GridSearchIcon,
42
+ quickFilterClearIcon: GridCloseIcon,
43
+ columnMenuHideIcon: GridVisibilityOffIcon,
44
+ columnMenuSortAscendingIcon: GridArrowUpwardIcon,
45
+ columnMenuSortDescendingIcon: GridArrowDownwardIcon,
46
+ columnMenuFilterIcon: GridFilterAltIcon,
47
+ columnMenuManageColumnsIcon: GridViewColumnIcon,
48
+ columnMenuClearIcon: GridClearIcon,
49
+ loadIcon: GridLoadIcon,
50
+ filterPanelAddIcon: GridAddIcon,
51
+ filterPanelRemoveAllIcon: GridDeleteForeverIcon,
52
+ columnReorderIcon: GridDragIcon
53
53
  };
54
54
  const materialSlots = _extends({}, iconSlots, {
55
- BaseCheckbox: MUICheckbox,
56
- BaseTextField: MUITextField,
57
- BaseFormControl: MUIFormControl,
58
- BaseSelect: MUISelect,
59
- BaseSwitch: MUISwitch,
60
- BaseButton: MUIButton,
61
- BaseIconButton: MUIIconButton,
62
- BaseInputAdornment: MUIInputAdornment,
63
- BaseTooltip: MUITooltip,
64
- BasePopper: MUIPopper,
65
- BaseInputLabel: MUIInputLabel,
66
- BaseSelectOption: MUISelectOption,
67
- BaseChip: MUIChip
55
+ baseCheckbox: MUICheckbox,
56
+ baseTextField: MUITextField,
57
+ baseFormControl: MUIFormControl,
58
+ baseSelect: MUISelect,
59
+ baseSwitch: MUISwitch,
60
+ baseButton: MUIButton,
61
+ baseIconButton: MUIIconButton,
62
+ baseInputAdornment: MUIInputAdornment,
63
+ baseTooltip: MUITooltip,
64
+ basePopper: MUIPopper,
65
+ baseInputLabel: MUIInputLabel,
66
+ baseSelectOption: MUISelectOption,
67
+ baseChip: MUIChip
68
68
  });
69
69
  export default materialSlots;
@@ -24,9 +24,8 @@ export type ValueOptions = string | number | {
24
24
  * Value that can be used as a key for grouping rows
25
25
  */
26
26
  export type GridKeyValue = string | number | boolean;
27
- export type GridApplyQuickFilterV7<R extends GridValidRowModel = GridValidRowModel, V = any> = (value: V, row: R, column: GridColDef, apiRef: React.MutableRefObject<GridApiCommunity>) => boolean;
28
- export type GetApplyQuickFilterFnLegacy<R extends GridValidRowModel = GridValidRowModel, V = any, F = V> = (value: any, colDef: GridStateColDef, apiRef: React.MutableRefObject<GridApiCommunity>) => null | ((params: GridCellParams<R, V, F>) => boolean);
29
- export type GetApplyQuickFilterFnV7<R extends GridValidRowModel = GridValidRowModel, V = any> = (value: any, colDef: GridStateColDef, apiRef: React.MutableRefObject<GridApiCommunity>) => null | GridApplyQuickFilterV7<R, V>;
27
+ export type GridApplyQuickFilter<R extends GridValidRowModel = GridValidRowModel, V = any> = (value: V, row: R, column: GridColDef, apiRef: React.MutableRefObject<GridApiCommunity>) => boolean;
28
+ export type GetApplyQuickFilterFn<R extends GridValidRowModel = GridValidRowModel, V = any> = (value: any, colDef: GridStateColDef<R, V>, apiRef: React.MutableRefObject<GridApiCommunity>) => null | GridApplyQuickFilter<R, V>;
30
29
  /**
31
30
  * Column Definition base interface.
32
31
  */
@@ -208,18 +207,9 @@ export interface GridBaseColDef<R extends GridValidRowModel = GridValidRowModel,
208
207
  * @param {any} value The value with which we want to filter the column.
209
208
  * @param {GridStateColDef} colDef The column from which we want to filter the rows.
210
209
  * @param {React.MutableRefObject<GridApiCommunity>} apiRef Deprecated: The API of the grid.
211
- * @returns {null | ((params: GridCellParams) => boolean)} The function to call to check if a row pass this filter value or not.
210
+ * @returns {null | GridApplyQuickFilter} The function to call to check if a row pass this filter value or not.
212
211
  */
213
- getApplyQuickFilterFn?: GetApplyQuickFilterFnLegacy<R, V, F>;
214
- /**
215
- * The callback that generates a filtering function for a given quick filter value.
216
- * This function can return `null` to skip filtering for this value and column.
217
- * @param {any} value The value with which we want to filter the column.
218
- * @param {GridStateColDef} colDef The column from which we want to filter the rows.
219
- * @param {React.MutableRefObject<GridApiCommunity>} apiRef Deprecated: The API of the grid.
220
- * @returns {null | GridApplyQuickFilterV7} The function to call to check if a row pass this filter value or not.
221
- */
222
- getApplyQuickFilterFnV7?: GetApplyQuickFilterFnV7<R, V>;
212
+ getApplyQuickFilterFn?: GetApplyQuickFilterFn<R, V>;
223
213
  /**
224
214
  * If `true`, this column cannot be reordered.
225
215
  * @default false
@@ -1,3 +1,3 @@
1
- export type { GridAlignment, ValueOptions, GridKeyValue, GridColDef, GridColTypeDef, GridColumnsMeta, GridSingleSelectColDef, GridActionsColDef, } from './gridColDef';
1
+ export type { GridAlignment, ValueOptions, GridKeyValue, GridColDef, GridColTypeDef, GridColumnsMeta, GridSingleSelectColDef, GridActionsColDef, GetApplyQuickFilterFn, } from './gridColDef';
2
2
  export * from './gridColType';
3
3
  export * from './gridColumnTypesRecord';
@@ -1,13 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { GridFilterItem } from './gridFilterItem';
3
- import { GridCellParams } from './params/gridCellParams';
4
3
  import type { GridColDef } from './colDef/gridColDef';
5
4
  import type { GridValidRowModel } from './gridRows';
6
5
  import type { GridApiCommunity } from './api/gridApiCommunity';
7
- type ApplyFilterFnLegacy<R extends GridValidRowModel = any, V = any, F = V> = (params: GridCellParams<R, V, F>) => boolean;
8
- type ApplyFilterFnV7<R extends GridValidRowModel = any, V = any, F = V> = (value: V, row: R, column: GridColDef<R, V, F>, apiRef: React.MutableRefObject<GridApiCommunity>) => boolean;
9
- export type GetApplyFilterFnV7<R extends GridValidRowModel = any, V = any, F = V> = (filterItem: GridFilterItem, column: GridColDef<R, V, F>) => null | ApplyFilterFnV7<R, V, F>;
10
- export type GetApplyFilterFnLegacy<R extends GridValidRowModel = any, V = any, F = V> = (filterItem: GridFilterItem, column: GridColDef<R, V, F>) => null | ApplyFilterFnLegacy<R, V, F>;
6
+ type ApplyFilterFn<R extends GridValidRowModel = any, V = any, F = V> = (value: V, row: R, column: GridColDef<R, V, F>, apiRef: React.MutableRefObject<GridApiCommunity>) => boolean;
7
+ export type GetApplyFilterFn<R extends GridValidRowModel = any, V = any, F = V> = (filterItem: GridFilterItem, column: GridColDef<R, V, F>) => null | ApplyFilterFn<R, V, F>;
11
8
  /**
12
9
  * Filter operator definition interface.
13
10
  * @demos
@@ -32,18 +29,9 @@ export interface GridFilterOperator<R extends GridValidRowModel = any, V = any,
32
29
  * This function can return `null` to skip filtering for this item and column.
33
30
  * @param {GridFilterItem} filterItem The filter item with which we want to filter the column.
34
31
  * @param {GridColDef} column The column from which we want to filter the rows.
35
- * @returns {null | ApplyFilterFnLegacy} The function to call to check if a row pass this filter item or not.
32
+ * @returns {null | ApplyFilterFn} The function to call to check if a row pass this filter item or not.
36
33
  */
37
- getApplyFilterFn: GetApplyFilterFnLegacy<R, V, F>;
38
- /**
39
- * The callback that generates a filtering function for a given filter item and column.
40
- * This function can return `null` to skip filtering for this item and column.
41
- * This function uses the more performant v7 API.
42
- * @param {GridFilterItem} filterItem The filter item with which we want to filter the column.
43
- * @param {GridColDef} column The column from which we want to filter the rows.
44
- * @returns {null | ApplyFilterFnV7} The function to call to check if a row pass this filter item or not.
45
- */
46
- getApplyFilterFnV7?: GetApplyFilterFnV7<R, V, F>;
34
+ getApplyFilterFn: GetApplyFilterFn<R, V, F>;
47
35
  /**
48
36
  * The input component to render in the filter panel for this filter operator.
49
37
  */