@mui/x-data-grid 6.11.0 → 6.11.2
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 +119 -1
- package/DataGrid/DataGrid.d.ts +10 -0
- package/DataGrid/DataGrid.js +24 -1
- package/DataGrid/useDataGridProps.js +2 -0
- package/components/GridPagination.d.ts +6 -2
- package/components/cell/GridActionsCellItem.d.ts +6 -2
- package/components/panel/GridPanel.d.ts +2 -2
- package/components/panel/filterPanel/GridFilterInputDate.d.ts +0 -1
- package/components/panel/filterPanel/GridFilterInputDate.js +5 -11
- package/components/panel/filterPanel/GridFilterInputValue.d.ts +0 -1
- package/components/panel/filterPanel/GridFilterInputValue.js +16 -18
- package/components/panel/filterPanel/GridFilterPanel.js +1 -3
- package/components/toolbar/GridToolbarQuickFilter.d.ts +1 -1
- package/components/toolbar/GridToolbarQuickFilter.js +5 -5
- package/hooks/features/export/useGridPrintExport.js +0 -5
- package/hooks/features/export/utils.js +7 -1
- package/hooks/features/filter/gridFilterUtils.d.ts +2 -2
- package/hooks/features/filter/gridFilterUtils.js +23 -19
- package/hooks/features/filter/useGridFilter.d.ts +1 -1
- package/hooks/features/filter/useGridFilter.js +2 -2
- package/hooks/features/rows/useGridRows.js +11 -0
- package/hooks/utils/useTimeout.d.ts +9 -0
- package/hooks/utils/useTimeout.js +28 -0
- package/index.js +1 -1
- package/legacy/DataGrid/DataGrid.js +24 -1
- package/legacy/DataGrid/useDataGridProps.js +2 -0
- package/legacy/components/panel/filterPanel/GridFilterInputDate.js +5 -11
- package/legacy/components/panel/filterPanel/GridFilterInputValue.js +16 -18
- package/legacy/components/panel/filterPanel/GridFilterPanel.js +1 -3
- package/legacy/components/toolbar/GridToolbarQuickFilter.js +5 -5
- package/legacy/hooks/features/export/useGridPrintExport.js +0 -5
- package/legacy/hooks/features/export/utils.js +8 -6
- package/legacy/hooks/features/filter/gridFilterUtils.js +23 -19
- package/legacy/hooks/features/filter/useGridFilter.js +2 -2
- package/legacy/hooks/features/rows/useGridRows.js +11 -0
- package/legacy/hooks/utils/useTimeout.js +38 -0
- package/legacy/index.js +1 -1
- package/legacy/locales/esES.js +26 -28
- package/legacy/locales/zhCN.js +25 -27
- package/legacy/locales/zhTW.js +34 -38
- package/locales/esES.js +26 -28
- package/locales/zhCN.js +25 -27
- package/locales/zhTW.js +34 -38
- package/models/api/gridRowApi.d.ts +6 -0
- package/models/props/DataGridProps.d.ts +11 -0
- package/modern/DataGrid/DataGrid.js +24 -1
- package/modern/DataGrid/useDataGridProps.js +2 -0
- package/modern/components/panel/filterPanel/GridFilterInputDate.js +5 -11
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +15 -17
- package/modern/components/panel/filterPanel/GridFilterPanel.js +1 -3
- package/modern/components/toolbar/GridToolbarQuickFilter.js +5 -5
- package/modern/hooks/features/export/useGridPrintExport.js +0 -5
- package/modern/hooks/features/export/utils.js +7 -1
- package/modern/hooks/features/filter/gridFilterUtils.js +23 -19
- package/modern/hooks/features/filter/useGridFilter.js +2 -2
- package/modern/hooks/features/rows/useGridRows.js +11 -0
- package/modern/hooks/utils/useTimeout.js +28 -0
- package/modern/index.js +1 -1
- package/modern/locales/esES.js +26 -28
- package/modern/locales/zhCN.js +25 -27
- package/modern/locales/zhTW.js +34 -38
- package/node/DataGrid/DataGrid.js +26 -1
- package/node/DataGrid/useDataGridProps.js +2 -0
- package/node/components/panel/filterPanel/GridFilterInputDate.js +5 -13
- package/node/components/panel/filterPanel/GridFilterInputValue.js +15 -19
- package/node/components/panel/filterPanel/GridFilterPanel.js +1 -3
- package/node/components/toolbar/GridToolbarQuickFilter.js +5 -5
- package/node/hooks/features/export/useGridPrintExport.js +0 -5
- package/node/hooks/features/export/utils.js +7 -1
- package/node/hooks/features/filter/gridFilterUtils.js +23 -19
- package/node/hooks/features/filter/useGridFilter.js +2 -2
- package/node/hooks/features/rows/useGridRows.js +11 -0
- package/node/hooks/utils/useTimeout.js +34 -0
- package/node/index.js +1 -1
- package/node/locales/esES.js +26 -28
- package/node/locales/zhCN.js +25 -27
- package/node/locales/zhTW.js +34 -38
- package/package.json +3 -3
|
@@ -54,15 +54,15 @@ const GridToolbarQuickFilterRoot = (0, _styles.styled)(_TextField.default, {
|
|
|
54
54
|
const defaultSearchValueParser = searchText => searchText.split(' ').filter(word => word !== '');
|
|
55
55
|
const defaultSearchValueFormatter = values => values.join(' ');
|
|
56
56
|
function GridToolbarQuickFilter(props) {
|
|
57
|
+
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
58
|
+
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
59
|
+
const quickFilterValues = (0, _useGridSelector.useGridSelector)(apiRef, _filter.gridQuickFilterValuesSelector);
|
|
57
60
|
const {
|
|
58
61
|
quickFilterParser = defaultSearchValueParser,
|
|
59
62
|
quickFilterFormatter = defaultSearchValueFormatter,
|
|
60
|
-
debounceMs =
|
|
63
|
+
debounceMs = rootProps.filterDebounceMs
|
|
61
64
|
} = props,
|
|
62
65
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
63
|
-
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
64
|
-
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
65
|
-
const quickFilterValues = (0, _useGridSelector.useGridSelector)(apiRef, _filter.gridQuickFilterValuesSelector);
|
|
66
66
|
const [searchValue, setSearchValue] = React.useState(() => quickFilterFormatter(quickFilterValues ?? []));
|
|
67
67
|
const prevQuickFilterValuesRef = React.useRef(quickFilterValues);
|
|
68
68
|
React.useEffect(() => {
|
|
@@ -125,7 +125,7 @@ process.env.NODE_ENV !== "production" ? GridToolbarQuickFilter.propTypes = {
|
|
|
125
125
|
// ----------------------------------------------------------------------
|
|
126
126
|
/**
|
|
127
127
|
* The debounce time in milliseconds.
|
|
128
|
-
* @default
|
|
128
|
+
* @default 150
|
|
129
129
|
*/
|
|
130
130
|
debounceMs: _propTypes.default.number,
|
|
131
131
|
/**
|
|
@@ -55,11 +55,6 @@ const useGridPrintExport = (apiRef, props) => {
|
|
|
55
55
|
// Returns a promise because updateColumns triggers state update and
|
|
56
56
|
// the new state needs to be in place before the grid can be sized correctly
|
|
57
57
|
const updateGridColumnsForPrint = React.useCallback((fields, allColumns) => new Promise(resolve => {
|
|
58
|
-
// TODO remove unused Promise
|
|
59
|
-
if (!fields && !allColumns) {
|
|
60
|
-
resolve();
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
58
|
const exportedColumnFields = (0, _utils2.getColumnsToExport)({
|
|
64
59
|
apiRef,
|
|
65
60
|
options: {
|
|
@@ -13,7 +13,13 @@ const getColumnsToExport = ({
|
|
|
13
13
|
}) => {
|
|
14
14
|
const columns = (0, _columns.gridColumnDefinitionsSelector)(apiRef);
|
|
15
15
|
if (options.fields) {
|
|
16
|
-
return options.fields.
|
|
16
|
+
return options.fields.reduce((currentColumns, field) => {
|
|
17
|
+
const column = columns.find(col => col.field === field);
|
|
18
|
+
if (column) {
|
|
19
|
+
currentColumns.push(column);
|
|
20
|
+
}
|
|
21
|
+
return currentColumns;
|
|
22
|
+
}, []);
|
|
17
23
|
}
|
|
18
24
|
const validColumns = options.allColumns ? columns : (0, _columns.gridVisibleColumnDefinitionsSelector)(apiRef);
|
|
19
25
|
return validColumns.filter(column => !column.disableExport);
|
|
@@ -11,6 +11,13 @@ var _utils = require("../../../colDef/utils");
|
|
|
11
11
|
var _gridFilterState = require("./gridFilterState");
|
|
12
12
|
var _warning = require("../../../utils/warning");
|
|
13
13
|
var _columns = require("../columns");
|
|
14
|
+
let hasEval;
|
|
15
|
+
try {
|
|
16
|
+
// eslint-disable-next-line no-eval
|
|
17
|
+
hasEval = eval('true');
|
|
18
|
+
} catch (_) {
|
|
19
|
+
hasEval = false;
|
|
20
|
+
}
|
|
14
21
|
/**
|
|
15
22
|
* Adds default values to the optional fields of a filter items.
|
|
16
23
|
* @param {GridFilterItem} item The raw filter item.
|
|
@@ -136,7 +143,7 @@ let filterItemsApplierId = 1;
|
|
|
136
143
|
* @param {React.MutableRefObject<GridApiCommunity>} apiRef The API of the grid.
|
|
137
144
|
* @returns {GridAggregatedFilterItemApplier | null} A method that checks if a row is matching the current filter model. If `null`, we consider that all the rows are matching the filters.
|
|
138
145
|
*/
|
|
139
|
-
const buildAggregatedFilterItemsApplier = (getRowId, filterModel, apiRef) => {
|
|
146
|
+
const buildAggregatedFilterItemsApplier = (getRowId, filterModel, apiRef, disableEval) => {
|
|
140
147
|
const {
|
|
141
148
|
items
|
|
142
149
|
} = filterModel;
|
|
@@ -144,22 +151,19 @@ const buildAggregatedFilterItemsApplier = (getRowId, filterModel, apiRef) => {
|
|
|
144
151
|
if (appliers.length === 0) {
|
|
145
152
|
return null;
|
|
146
153
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
//
|
|
161
|
-
// return resultPerItemId;
|
|
162
|
-
// };
|
|
154
|
+
if (!hasEval || disableEval) {
|
|
155
|
+
// This is the original logic, which is used if `eval()` is not supported (aka prevented by CSP).
|
|
156
|
+
return (row, shouldApplyFilter) => {
|
|
157
|
+
const resultPerItemId = {};
|
|
158
|
+
for (let i = 0; i < appliers.length; i += 1) {
|
|
159
|
+
const applier = appliers[i];
|
|
160
|
+
if (!shouldApplyFilter || shouldApplyFilter(applier.item.field)) {
|
|
161
|
+
resultPerItemId[applier.item.id] = applier.v7 ? applier.fn(row) : applier.fn(getRowId ? getRowId(row) : row.id);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return resultPerItemId;
|
|
165
|
+
};
|
|
166
|
+
}
|
|
163
167
|
|
|
164
168
|
// We generate a new function with `eval()` to avoid expensive patterns for JS engines
|
|
165
169
|
// such as a dynamic object assignment, e.g. `{ [dynamicKey]: value }`.
|
|
@@ -269,8 +273,8 @@ const buildAggregatedQuickFilterApplier = (getRowId, filterModel, apiRef) => {
|
|
|
269
273
|
};
|
|
270
274
|
};
|
|
271
275
|
exports.buildAggregatedQuickFilterApplier = buildAggregatedQuickFilterApplier;
|
|
272
|
-
const buildAggregatedFilterApplier = (getRowId, filterModel, apiRef) => {
|
|
273
|
-
const isRowMatchingFilterItems = buildAggregatedFilterItemsApplier(getRowId, filterModel, apiRef);
|
|
276
|
+
const buildAggregatedFilterApplier = (getRowId, filterModel, apiRef, disableEval) => {
|
|
277
|
+
const isRowMatchingFilterItems = buildAggregatedFilterItemsApplier(getRowId, filterModel, apiRef, disableEval);
|
|
274
278
|
const isRowMatchingQuickFilter = buildAggregatedQuickFilterApplier(getRowId, filterModel, apiRef);
|
|
275
279
|
return function isRowMatchingFilters(row, shouldApplyFilter, result) {
|
|
276
280
|
result.passingFilterItems = isRowMatchingFilterItems?.(row, shouldApplyFilter) ?? null;
|
|
@@ -69,7 +69,7 @@ const useGridFilter = (apiRef, props) => {
|
|
|
69
69
|
const updateFilteredRows = React.useCallback(() => {
|
|
70
70
|
apiRef.current.setState(state => {
|
|
71
71
|
const filterModel = (0, _gridFilterSelector.gridFilterModelSelector)(state, apiRef.current.instanceId);
|
|
72
|
-
const isRowMatchingFilters = props.filterMode === 'client' ? (0, _gridFilterUtils.buildAggregatedFilterApplier)(props.getRowId, filterModel, apiRef) : null;
|
|
72
|
+
const isRowMatchingFilters = props.filterMode === 'client' ? (0, _gridFilterUtils.buildAggregatedFilterApplier)(props.getRowId, filterModel, apiRef, props.disableEval) : null;
|
|
73
73
|
const filteringResult = apiRef.current.applyStrategyProcessor('filtering', {
|
|
74
74
|
isRowMatchingFilters,
|
|
75
75
|
filterModel: filterModel ?? (0, _gridFilterState.getDefaultGridFilterModel)()
|
|
@@ -83,7 +83,7 @@ const useGridFilter = (apiRef, props) => {
|
|
|
83
83
|
});
|
|
84
84
|
});
|
|
85
85
|
apiRef.current.publishEvent('filteredRowsSet');
|
|
86
|
-
}, [apiRef, props.filterMode, props.getRowId]);
|
|
86
|
+
}, [apiRef, props.filterMode, props.getRowId, props.disableEval]);
|
|
87
87
|
const addColumnMenuItem = React.useCallback((columnMenuItems, colDef) => {
|
|
88
88
|
if (colDef == null || colDef.filterable === false || props.disableColumnFilter) {
|
|
89
89
|
return columnMenuItems;
|
|
@@ -62,6 +62,16 @@ const useGridRows = (apiRef, props) => {
|
|
|
62
62
|
}
|
|
63
63
|
return null;
|
|
64
64
|
}, [apiRef]);
|
|
65
|
+
const getRowIdProp = props.getRowId;
|
|
66
|
+
const getRowId = React.useCallback(row => {
|
|
67
|
+
if (_gridRowsUtils.GRID_ID_AUTOGENERATED in row) {
|
|
68
|
+
return row[_gridRowsUtils.GRID_ID_AUTOGENERATED];
|
|
69
|
+
}
|
|
70
|
+
if (getRowIdProp) {
|
|
71
|
+
return getRowIdProp(row);
|
|
72
|
+
}
|
|
73
|
+
return row.id;
|
|
74
|
+
}, [getRowIdProp]);
|
|
65
75
|
const lookup = React.useMemo(() => currentPage.rows.reduce((acc, {
|
|
66
76
|
id
|
|
67
77
|
}, index) => {
|
|
@@ -301,6 +311,7 @@ const useGridRows = (apiRef, props) => {
|
|
|
301
311
|
}, [apiRef, props.signature, props.getRowId]);
|
|
302
312
|
const rowApi = {
|
|
303
313
|
getRow,
|
|
314
|
+
getRowId,
|
|
304
315
|
getRowModels,
|
|
305
316
|
getRowsCount,
|
|
306
317
|
getAllRowIds,
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useTimeout = useTimeout;
|
|
7
|
+
var _useLazyRef = require("./useLazyRef");
|
|
8
|
+
var _useOnMount = require("./useOnMount");
|
|
9
|
+
class Timeout {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.currentId = 0;
|
|
12
|
+
this.clear = () => {
|
|
13
|
+
if (this.currentId !== 0) {
|
|
14
|
+
clearTimeout(this.currentId);
|
|
15
|
+
this.currentId = 0;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
this.disposeEffect = () => {
|
|
19
|
+
return this.clear;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
static create() {
|
|
23
|
+
return new Timeout();
|
|
24
|
+
}
|
|
25
|
+
start(delay, fn) {
|
|
26
|
+
this.clear();
|
|
27
|
+
this.currentId = setTimeout(fn, delay);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function useTimeout() {
|
|
31
|
+
const timeout = (0, _useLazyRef.useLazyRef)(Timeout.create).current;
|
|
32
|
+
(0, _useOnMount.useOnMount)(timeout.disposeEffect);
|
|
33
|
+
return timeout;
|
|
34
|
+
}
|
package/node/index.js
CHANGED
package/node/locales/esES.js
CHANGED
|
@@ -63,37 +63,35 @@ const esESGrid = {
|
|
|
63
63
|
filterOperatorOnOrAfter: 'es en o posterior',
|
|
64
64
|
filterOperatorBefore: 'es anterior',
|
|
65
65
|
filterOperatorOnOrBefore: 'es en o anterior',
|
|
66
|
-
filterOperatorIsEmpty: '
|
|
66
|
+
filterOperatorIsEmpty: 'esta vacío',
|
|
67
67
|
filterOperatorIsNotEmpty: 'no esta vacío',
|
|
68
68
|
filterOperatorIsAnyOf: 'es cualquiera de',
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
'filterOperator=': '=',
|
|
70
|
+
'filterOperator!=': '!=',
|
|
71
|
+
'filterOperator>': '>',
|
|
72
|
+
'filterOperator>=': '>=',
|
|
73
|
+
'filterOperator<': '<',
|
|
74
|
+
'filterOperator<=': '<=',
|
|
76
75
|
// Header filter operators text
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
76
|
+
headerFilterOperatorContains: 'Contiene',
|
|
77
|
+
headerFilterOperatorEquals: 'Es igual a',
|
|
78
|
+
headerFilterOperatorStartsWith: 'Comienza con',
|
|
79
|
+
headerFilterOperatorEndsWith: 'Termina con',
|
|
80
|
+
headerFilterOperatorIs: 'Es',
|
|
81
|
+
headerFilterOperatorNot: 'No es',
|
|
82
|
+
headerFilterOperatorAfter: 'Esta después de',
|
|
83
|
+
headerFilterOperatorOnOrAfter: 'Esta en o después de',
|
|
84
|
+
headerFilterOperatorBefore: 'Esta antes de',
|
|
85
|
+
headerFilterOperatorOnOrBefore: 'Esta en o antes de',
|
|
86
|
+
headerFilterOperatorIsEmpty: 'Esta vacío',
|
|
87
|
+
headerFilterOperatorIsNotEmpty: 'No esta vacío',
|
|
88
|
+
headerFilterOperatorIsAnyOf: 'Es cualquiera de',
|
|
89
|
+
'headerFilterOperator=': 'Es igual a',
|
|
90
|
+
'headerFilterOperator!=': 'Es diferente a',
|
|
91
|
+
'headerFilterOperator>': 'Es mayor que',
|
|
92
|
+
'headerFilterOperator>=': 'Es mayor o igual que',
|
|
93
|
+
'headerFilterOperator<': 'Es menor que',
|
|
94
|
+
'headerFilterOperator<=': 'Es menor o igual que',
|
|
97
95
|
// Filter values text
|
|
98
96
|
filterValueAny: 'cualquiera',
|
|
99
97
|
filterValueTrue: 'verdadero',
|
package/node/locales/zhCN.js
CHANGED
|
@@ -66,34 +66,32 @@ const zhCNGrid = {
|
|
|
66
66
|
filterOperatorIsEmpty: '为空',
|
|
67
67
|
filterOperatorIsNotEmpty: '不为空',
|
|
68
68
|
filterOperatorIsAnyOf: '属于',
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
'filterOperator=': '=',
|
|
70
|
+
'filterOperator!=': '!=',
|
|
71
|
+
'filterOperator>': '>',
|
|
72
|
+
'filterOperator>=': '>=',
|
|
73
|
+
'filterOperator<': '<',
|
|
74
|
+
'filterOperator<=': '<=',
|
|
76
75
|
// Header filter operators text
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
76
|
+
headerFilterOperatorContains: '包含',
|
|
77
|
+
headerFilterOperatorEquals: '等于',
|
|
78
|
+
headerFilterOperatorStartsWith: '开始于',
|
|
79
|
+
headerFilterOperatorEndsWith: '结束于',
|
|
80
|
+
headerFilterOperatorIs: '是',
|
|
81
|
+
headerFilterOperatorNot: '不是',
|
|
82
|
+
headerFilterOperatorAfter: '在后面',
|
|
83
|
+
headerFilterOperatorOnOrAfter: '在当前或后面',
|
|
84
|
+
headerFilterOperatorBefore: '在前面',
|
|
85
|
+
headerFilterOperatorOnOrBefore: '在当前或前面',
|
|
86
|
+
headerFilterOperatorIsEmpty: '为空',
|
|
87
|
+
headerFilterOperatorIsNotEmpty: '不为空',
|
|
88
|
+
headerFilterOperatorIsAnyOf: '属于',
|
|
89
|
+
'headerFilterOperator=': '等于',
|
|
90
|
+
'headerFilterOperator!=': '不等于',
|
|
91
|
+
'headerFilterOperator>': '大于',
|
|
92
|
+
'headerFilterOperator>=': '大于或等于',
|
|
93
|
+
'headerFilterOperator<': '小雨',
|
|
94
|
+
'headerFilterOperator<=': '小于或等于',
|
|
97
95
|
// Filter values text
|
|
98
96
|
filterValueAny: '任何',
|
|
99
97
|
filterValueTrue: '真',
|
package/node/locales/zhTW.js
CHANGED
|
@@ -43,7 +43,7 @@ const zhTWGrid = {
|
|
|
43
43
|
columnsPanelHideAllButton: '隱藏所有',
|
|
44
44
|
// Filter panel text
|
|
45
45
|
filterPanelAddFilter: '增加篩選器',
|
|
46
|
-
|
|
46
|
+
filterPanelRemoveAll: '清除所有',
|
|
47
47
|
filterPanelDeleteIconLabel: '刪除',
|
|
48
48
|
filterPanelLogicOperator: '邏輯運算子',
|
|
49
49
|
filterPanelOperator: '運算子',
|
|
@@ -66,34 +66,32 @@ const zhTWGrid = {
|
|
|
66
66
|
filterOperatorIsEmpty: '為空',
|
|
67
67
|
filterOperatorIsNotEmpty: '不為空',
|
|
68
68
|
filterOperatorIsAnyOf: '是其中之一',
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
'filterOperator=': '=',
|
|
70
|
+
'filterOperator!=': '!=',
|
|
71
|
+
'filterOperator>': '>',
|
|
72
|
+
'filterOperator>=': '>=',
|
|
73
|
+
'filterOperator<': '<',
|
|
74
|
+
'filterOperator<=': '<=',
|
|
76
75
|
// Header filter operators text
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
76
|
+
headerFilterOperatorContains: '包含',
|
|
77
|
+
headerFilterOperatorEquals: '等於',
|
|
78
|
+
headerFilterOperatorStartsWith: '以...開頭',
|
|
79
|
+
headerFilterOperatorEndsWith: '以...結束',
|
|
80
|
+
headerFilterOperatorIs: '為',
|
|
81
|
+
headerFilterOperatorNot: '不為',
|
|
82
|
+
headerFilterOperatorAfter: '...之後',
|
|
83
|
+
headerFilterOperatorOnOrAfter: '...(含)之後',
|
|
84
|
+
headerFilterOperatorBefore: '...之前',
|
|
85
|
+
headerFilterOperatorOnOrBefore: '...(含)之前',
|
|
86
|
+
headerFilterOperatorIsEmpty: '為空',
|
|
87
|
+
headerFilterOperatorIsNotEmpty: '不為空',
|
|
88
|
+
headerFilterOperatorIsAnyOf: '是其中之一',
|
|
89
|
+
'headerFilterOperator=': '等於',
|
|
90
|
+
'headerFilterOperator!=': '不等於',
|
|
91
|
+
'headerFilterOperator>': '大於',
|
|
92
|
+
'headerFilterOperator>=': '大於或等於',
|
|
93
|
+
'headerFilterOperator<': '小於',
|
|
94
|
+
'headerFilterOperator<=': '小於或等於',
|
|
97
95
|
// Filter values text
|
|
98
96
|
filterValueAny: '任何值',
|
|
99
97
|
filterValueTrue: '真',
|
|
@@ -101,7 +99,7 @@ const zhTWGrid = {
|
|
|
101
99
|
// Column menu text
|
|
102
100
|
columnMenuLabel: '選單',
|
|
103
101
|
columnMenuShowColumns: '顯示欄位',
|
|
104
|
-
|
|
102
|
+
columnMenuManageColumns: '管理欄位',
|
|
105
103
|
columnMenuFilter: '篩選器',
|
|
106
104
|
columnMenuHideColumn: '隱藏',
|
|
107
105
|
columnMenuUnsort: '預設排序',
|
|
@@ -145,16 +143,14 @@ const zhTWGrid = {
|
|
|
145
143
|
expandDetailPanel: '展開',
|
|
146
144
|
collapseDetailPanel: '摺疊',
|
|
147
145
|
// Row reordering text
|
|
148
|
-
rowReorderingHeaderName: '排序'
|
|
149
|
-
|
|
146
|
+
rowReorderingHeaderName: '排序',
|
|
150
147
|
// Aggregation
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
148
|
+
aggregationMenuItemHeader: '集合',
|
|
149
|
+
aggregationFunctionLabelSum: '總數',
|
|
150
|
+
aggregationFunctionLabelAvg: '平均數',
|
|
151
|
+
aggregationFunctionLabelMin: '最小',
|
|
152
|
+
aggregationFunctionLabelMax: '最大',
|
|
153
|
+
aggregationFunctionLabelSize: '尺寸'
|
|
157
154
|
};
|
|
158
|
-
|
|
159
155
|
const zhTW = (0, _getGridLocalization.getGridLocalization)(zhTWGrid, _locale.zhTW);
|
|
160
156
|
exports.zhTW = zhTW;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid",
|
|
3
|
-
"version": "6.11.
|
|
3
|
+
"version": "6.11.2",
|
|
4
4
|
"description": "The community edition of the data grid component (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@babel/runtime": "^7.22.6",
|
|
39
|
-
"@mui/utils": "^5.14.
|
|
40
|
-
"clsx": "^
|
|
39
|
+
"@mui/utils": "^5.14.5",
|
|
40
|
+
"clsx": "^2.0.0",
|
|
41
41
|
"prop-types": "^15.8.1",
|
|
42
42
|
"reselect": "^4.1.8"
|
|
43
43
|
},
|