@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.
- package/CHANGELOG.md +558 -1
- package/DataGrid/DataGrid.js +0 -10
- package/DataGrid/useDataGridProps.js +9 -14
- package/colDef/gridActionsColDef.js +1 -2
- package/colDef/gridBooleanColDef.js +0 -1
- package/colDef/gridBooleanOperators.js +3 -4
- package/colDef/gridCheckboxSelectionColDef.js +0 -1
- package/colDef/gridDateOperators.js +10 -11
- package/colDef/gridNumericColDef.js +1 -3
- package/colDef/gridNumericOperators.d.ts +2 -2
- package/colDef/gridNumericOperators.js +13 -14
- package/colDef/gridSingleSelectOperators.js +5 -6
- package/colDef/gridStringColDef.js +1 -3
- package/colDef/gridStringOperators.d.ts +2 -2
- package/colDef/gridStringOperators.js +11 -12
- package/components/toolbar/GridToolbarFilterButton.js +3 -1
- package/constants/defaultGridSlotsComponents.js +17 -17
- package/hooks/features/export/useGridPrintExport.js +7 -10
- package/hooks/features/filter/gridFilterUtils.js +14 -68
- package/hooks/features/rows/useGridRows.js +4 -1
- package/index.js +1 -1
- package/internals/index.d.ts +0 -1
- package/internals/index.js +0 -1
- package/internals/utils/computeSlots.d.ts +4 -6
- package/internals/utils/computeSlots.js +2 -8
- package/internals/utils/index.d.ts +0 -1
- package/internals/utils/index.js +0 -1
- package/internals/utils/useProps.d.ts +1 -8
- package/internals/utils/useProps.js +5 -8
- package/joy/icons.d.ts +1 -2
- package/joy/joySlots.d.ts +1 -2
- package/legacy/DataGrid/DataGrid.js +0 -10
- package/legacy/DataGrid/useDataGridProps.js +10 -18
- package/legacy/colDef/gridActionsColDef.js +1 -2
- package/legacy/colDef/gridBooleanColDef.js +0 -1
- package/legacy/colDef/gridBooleanOperators.js +3 -4
- package/legacy/colDef/gridCheckboxSelectionColDef.js +0 -1
- package/legacy/colDef/gridDateOperators.js +10 -11
- package/legacy/colDef/gridNumericColDef.js +1 -3
- package/legacy/colDef/gridNumericOperators.js +13 -14
- package/legacy/colDef/gridSingleSelectOperators.js +5 -6
- package/legacy/colDef/gridStringColDef.js +1 -3
- package/legacy/colDef/gridStringOperators.js +11 -12
- package/legacy/components/toolbar/GridToolbarFilterButton.js +3 -1
- package/legacy/constants/defaultGridSlotsComponents.js +17 -17
- package/legacy/hooks/features/export/useGridPrintExport.js +7 -10
- package/legacy/hooks/features/filter/gridFilterUtils.js +14 -68
- package/legacy/hooks/features/rows/useGridRows.js +2 -1
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +0 -1
- package/legacy/internals/utils/computeSlots.js +2 -8
- package/legacy/internals/utils/index.js +0 -1
- package/legacy/internals/utils/useProps.js +5 -6
- package/legacy/locales/csCZ.js +2 -2
- package/legacy/material/index.js +48 -48
- package/locales/csCZ.js +2 -2
- package/material/index.js +48 -48
- package/models/colDef/gridColDef.d.ts +4 -14
- package/models/colDef/index.d.ts +1 -1
- package/models/gridFilterOperator.d.ts +4 -16
- package/models/gridIconSlotsComponent.d.ts +35 -36
- package/models/gridSlotsComponent.d.ts +31 -34
- package/models/index.d.ts +1 -1
- package/models/props/DataGridProps.d.ts +3 -14
- package/modern/DataGrid/DataGrid.js +0 -10
- package/modern/DataGrid/useDataGridProps.js +7 -9
- package/modern/colDef/gridActionsColDef.js +1 -2
- package/modern/colDef/gridBooleanColDef.js +0 -1
- package/modern/colDef/gridBooleanOperators.js +3 -4
- package/modern/colDef/gridCheckboxSelectionColDef.js +0 -1
- package/modern/colDef/gridDateOperators.js +10 -11
- package/modern/colDef/gridNumericColDef.js +1 -3
- package/modern/colDef/gridNumericOperators.js +13 -14
- package/modern/colDef/gridSingleSelectOperators.js +5 -6
- package/modern/colDef/gridStringColDef.js +1 -3
- package/modern/colDef/gridStringOperators.js +11 -12
- package/modern/components/toolbar/GridToolbarFilterButton.js +3 -1
- package/modern/constants/defaultGridSlotsComponents.js +17 -17
- package/modern/hooks/features/export/useGridPrintExport.js +6 -10
- package/modern/hooks/features/filter/gridFilterUtils.js +14 -67
- package/modern/hooks/features/rows/useGridRows.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.js +0 -1
- package/modern/internals/utils/computeSlots.js +2 -8
- package/modern/internals/utils/index.js +0 -1
- package/modern/internals/utils/useProps.js +5 -8
- package/modern/locales/csCZ.js +2 -2
- package/modern/material/index.js +48 -48
- package/node/DataGrid/DataGrid.js +0 -10
- package/node/DataGrid/useDataGridProps.js +6 -8
- package/node/colDef/gridActionsColDef.js +1 -2
- package/node/colDef/gridBooleanColDef.js +0 -1
- package/node/colDef/gridBooleanOperators.js +3 -4
- package/node/colDef/gridCheckboxSelectionColDef.js +0 -1
- package/node/colDef/gridDateOperators.js +10 -11
- package/node/colDef/gridNumericColDef.js +1 -3
- package/node/colDef/gridNumericOperators.js +14 -14
- package/node/colDef/gridSingleSelectOperators.js +5 -6
- package/node/colDef/gridStringColDef.js +1 -3
- package/node/colDef/gridStringOperators.js +12 -12
- package/node/components/toolbar/GridToolbarFilterButton.js +3 -1
- package/node/constants/defaultGridSlotsComponents.js +17 -17
- package/node/hooks/features/export/useGridPrintExport.js +5 -9
- package/node/hooks/features/filter/gridFilterUtils.js +14 -67
- package/node/hooks/features/rows/useGridRows.js +1 -1
- package/node/index.js +1 -1
- package/node/internals/index.js +1 -13
- package/node/internals/utils/computeSlots.js +2 -7
- package/node/internals/utils/index.js +0 -11
- package/node/internals/utils/useProps.js +4 -8
- package/node/locales/csCZ.js +2 -2
- package/node/material/index.js +48 -48
- package/package.json +1 -1
- package/colDef/utils.d.ts +0 -21
- package/colDef/utils.js +0 -51
- package/internals/utils/slotsMigration.d.ts +0 -4
- package/internals/utils/slotsMigration.js +0 -13
- package/legacy/colDef/utils.js +0 -51
- package/legacy/internals/utils/slotsMigration.js +0 -14
- package/modern/colDef/utils.js +0 -51
- package/modern/internals/utils/slotsMigration.js +0 -13
- package/node/colDef/utils.js +0 -63
- 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
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
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
|
-
|
|
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(
|
|
152
|
-
var
|
|
153
|
-
GLOBAL_API_REF.current = publicApiRef;
|
|
130
|
+
fn: function fn(row) {
|
|
131
|
+
var value = apiRef.current.getRowValue(row, column);
|
|
154
132
|
if (ignoreDiacritics) {
|
|
155
|
-
|
|
133
|
+
value = removeDiacritics(value);
|
|
156
134
|
}
|
|
157
|
-
|
|
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.
|
|
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
|
|
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
|
-
|
|
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 (
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
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
|
-
|
|
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
|
@@ -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
|
-
|
|
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,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
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
|
|
29
|
-
|
|
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
|
}
|
package/legacy/locales/csCZ.js
CHANGED
|
@@ -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
|
|
154
|
-
pinToRight: 'Připnout
|
|
153
|
+
pinToLeft: 'Připnout vlevo',
|
|
154
|
+
pinToRight: 'Připnout vpravo',
|
|
155
155
|
unpin: 'Odepnout',
|
|
156
156
|
// Tree Data
|
|
157
157
|
treeDataGroupingHeaderName: 'Skupina',
|
package/legacy/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
|
var iconSlots = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
|
154
|
-
pinToRight: 'Připnout
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
|
28
|
-
export type
|
|
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 |
|
|
210
|
+
* @returns {null | GridApplyQuickFilter} The function to call to check if a row pass this filter value or not.
|
|
212
211
|
*/
|
|
213
|
-
getApplyQuickFilterFn?:
|
|
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
|
package/models/colDef/index.d.ts
CHANGED
|
@@ -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
|
|
8
|
-
type
|
|
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 |
|
|
32
|
+
* @returns {null | ApplyFilterFn} The function to call to check if a row pass this filter item or not.
|
|
36
33
|
*/
|
|
37
|
-
getApplyFilterFn:
|
|
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
|
*/
|