@mui/x-data-grid 7.0.0-alpha.6 → 7.0.0-alpha.8
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 +357 -49
- package/DataGrid/DataGrid.js +8 -16
- package/colDef/gridDateColDef.js +1 -1
- package/components/GridPagination.d.ts +4 -4
- package/components/GridPagination.js +1 -1
- package/components/cell/GridActionsCell.js +1 -1
- package/components/cell/GridActionsCellItem.d.ts +5 -5
- package/components/cell/GridCell.js +2 -2
- package/components/panel/GridPanel.d.ts +3 -3
- package/components/panel/filterPanel/GridFilterForm.js +1 -1
- package/components/toolbar/GridToolbarQuickFilter.d.ts +4 -0
- package/components/toolbar/GridToolbarQuickFilter.js +4 -0
- package/hooks/core/useGridLoggerFactory.js +2 -2
- package/hooks/features/columnGrouping/gridColumnGroupsUtils.js +1 -1
- package/hooks/features/columnGrouping/useGridColumnGrouping.js +6 -4
- package/hooks/features/editing/useGridCellEditing.js +4 -4
- package/hooks/features/editing/useGridRowEditing.js +4 -4
- package/hooks/features/export/serializers/csvSerializer.js +1 -1
- package/hooks/features/export/useGridPrintExport.js +1 -1
- package/hooks/features/filter/gridFilterUtils.js +26 -29
- package/hooks/features/pagination/gridPaginationUtils.js +2 -2
- package/hooks/features/rowSelection/useGridRowSelection.js +1 -1
- package/hooks/features/rows/gridRowsUtils.js +2 -2
- package/hooks/features/rows/useGridRows.js +7 -7
- package/hooks/features/rows/useGridRowsMeta.js +2 -2
- package/hooks/features/sorting/gridSortingUtils.js +4 -2
- package/hooks/utils/useGridApiContext.js +1 -1
- package/hooks/utils/useGridPrivateApiContext.js +1 -1
- package/hooks/utils/useGridRootProps.js +1 -1
- package/hooks/utils/useGridSelector.js +1 -1
- package/index.d.ts +0 -1
- package/index.js +1 -2
- package/internals/index.d.ts +1 -0
- package/internals/utils/index.d.ts +1 -0
- package/internals/utils/index.js +2 -1
- package/internals/utils/propValidation.d.ts +4 -0
- package/internals/utils/propValidation.js +19 -0
- package/legacy/DataGrid/DataGrid.js +13 -18
- package/legacy/colDef/gridDateColDef.js +1 -1
- package/legacy/components/GridPagination.js +1 -1
- package/legacy/components/cell/GridActionsCell.js +1 -1
- package/legacy/components/cell/GridCell.js +2 -2
- package/legacy/components/panel/filterPanel/GridFilterForm.js +1 -1
- package/legacy/components/toolbar/GridToolbarQuickFilter.js +4 -0
- package/legacy/hooks/core/useGridLoggerFactory.js +2 -2
- package/legacy/hooks/features/columnGrouping/gridColumnGroupsUtils.js +1 -1
- package/legacy/hooks/features/columnGrouping/useGridColumnGrouping.js +6 -4
- package/legacy/hooks/features/editing/useGridCellEditing.js +4 -4
- package/legacy/hooks/features/editing/useGridRowEditing.js +4 -4
- package/legacy/hooks/features/export/serializers/csvSerializer.js +1 -1
- package/legacy/hooks/features/export/useGridPrintExport.js +1 -1
- package/legacy/hooks/features/filter/gridFilterUtils.js +25 -22
- package/legacy/hooks/features/pagination/gridPaginationUtils.js +2 -2
- package/legacy/hooks/features/rowSelection/useGridRowSelection.js +1 -1
- package/legacy/hooks/features/rows/gridRowsUtils.js +2 -2
- package/legacy/hooks/features/rows/useGridParamsApi.js +4 -5
- package/legacy/hooks/features/rows/useGridRows.js +7 -7
- package/legacy/hooks/features/rows/useGridRowsMeta.js +2 -2
- package/legacy/hooks/features/sorting/gridSortingUtils.js +4 -2
- package/legacy/hooks/utils/useGridApiContext.js +1 -1
- package/legacy/hooks/utils/useGridPrivateApiContext.js +1 -1
- package/legacy/hooks/utils/useGridRootProps.js +1 -1
- package/legacy/hooks/utils/useGridSelector.js +1 -1
- package/legacy/index.js +1 -2
- package/legacy/internals/utils/index.js +2 -1
- package/legacy/internals/utils/propValidation.js +21 -0
- package/legacy/locales/csCZ.js +2 -2
- package/legacy/utils/createSelector.js +1 -1
- package/legacy/utils/exportAs.js +1 -1
- package/locales/csCZ.js +2 -2
- package/models/props/DataGridProps.d.ts +1 -2
- package/modern/DataGrid/DataGrid.js +8 -16
- package/modern/colDef/gridDateColDef.js +1 -1
- package/modern/components/GridPagination.js +1 -1
- package/modern/components/cell/GridActionsCell.js +1 -1
- package/modern/components/cell/GridCell.js +2 -2
- package/modern/components/panel/filterPanel/GridFilterForm.js +1 -1
- package/modern/components/toolbar/GridToolbarQuickFilter.js +4 -0
- package/modern/hooks/core/useGridLoggerFactory.js +2 -2
- package/modern/hooks/features/columnGrouping/gridColumnGroupsUtils.js +1 -1
- package/modern/hooks/features/columnGrouping/useGridColumnGrouping.js +6 -4
- package/modern/hooks/features/editing/useGridCellEditing.js +4 -4
- package/modern/hooks/features/editing/useGridRowEditing.js +4 -4
- package/modern/hooks/features/export/serializers/csvSerializer.js +1 -1
- package/modern/hooks/features/export/useGridPrintExport.js +1 -1
- package/modern/hooks/features/filter/gridFilterUtils.js +26 -29
- package/modern/hooks/features/pagination/gridPaginationUtils.js +2 -2
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +1 -1
- package/modern/hooks/features/rows/gridRowsUtils.js +2 -2
- package/modern/hooks/features/rows/useGridRows.js +7 -7
- package/modern/hooks/features/rows/useGridRowsMeta.js +2 -2
- package/modern/hooks/features/sorting/gridSortingUtils.js +4 -2
- package/modern/hooks/utils/useGridApiContext.js +1 -1
- package/modern/hooks/utils/useGridPrivateApiContext.js +1 -1
- package/modern/hooks/utils/useGridRootProps.js +1 -1
- package/modern/hooks/utils/useGridSelector.js +1 -1
- package/modern/index.js +1 -2
- package/modern/internals/utils/index.js +2 -1
- package/modern/internals/utils/propValidation.js +19 -0
- package/modern/locales/csCZ.js +2 -2
- package/modern/utils/createSelector.js +1 -1
- package/modern/utils/exportAs.js +1 -1
- package/node/DataGrid/DataGrid.js +8 -16
- package/node/colDef/gridDateColDef.js +1 -1
- package/node/components/GridPagination.js +1 -1
- package/node/components/cell/GridActionsCell.js +1 -1
- package/node/components/cell/GridCell.js +2 -2
- package/node/components/panel/filterPanel/GridFilterForm.js +1 -1
- package/node/components/toolbar/GridToolbarQuickFilter.js +4 -0
- package/node/hooks/core/useGridLoggerFactory.js +2 -2
- package/node/hooks/features/columnGrouping/gridColumnGroupsUtils.js +1 -1
- package/node/hooks/features/columnGrouping/useGridColumnGrouping.js +6 -4
- package/node/hooks/features/editing/useGridCellEditing.js +4 -4
- package/node/hooks/features/editing/useGridRowEditing.js +4 -4
- package/node/hooks/features/export/serializers/csvSerializer.js +1 -1
- package/node/hooks/features/export/useGridPrintExport.js +1 -1
- package/node/hooks/features/filter/gridFilterUtils.js +26 -28
- package/node/hooks/features/pagination/gridPaginationUtils.js +2 -2
- package/node/hooks/features/rowSelection/useGridRowSelection.js +1 -1
- package/node/hooks/features/rows/gridRowsUtils.js +2 -2
- package/node/hooks/features/rows/useGridRows.js +7 -7
- package/node/hooks/features/rows/useGridRowsMeta.js +2 -2
- package/node/hooks/features/sorting/gridSortingUtils.js +4 -2
- package/node/hooks/utils/useGridApiContext.js +1 -1
- package/node/hooks/utils/useGridPrivateApiContext.js +1 -1
- package/node/hooks/utils/useGridRootProps.js +1 -1
- package/node/hooks/utils/useGridSelector.js +1 -1
- package/node/index.js +1 -13
- package/node/internals/utils/index.js +11 -0
- package/node/internals/utils/propValidation.js +26 -0
- package/node/locales/csCZ.js +2 -2
- package/node/utils/createSelector.js +1 -1
- package/node/utils/exportAs.js +1 -1
- package/package.json +4 -4
- package/utils/createSelector.js +1 -1
- package/utils/exportAs.js +1 -1
|
@@ -11,7 +11,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
11
11
|
function useGridApiContext() {
|
|
12
12
|
const apiRef = React.useContext(_GridApiContext.GridApiContext);
|
|
13
13
|
if (apiRef === undefined) {
|
|
14
|
-
throw new Error(['MUI: Could not find the data grid context.', 'It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.', 'This can also happen if you are bundling multiple versions of the data grid.'].join('\n'));
|
|
14
|
+
throw new Error(['MUI X: Could not find the data grid context.', 'It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.', 'This can also happen if you are bundling multiple versions of the data grid.'].join('\n'));
|
|
15
15
|
}
|
|
16
16
|
return apiRef;
|
|
17
17
|
}
|
|
@@ -15,7 +15,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
15
15
|
function useGridPrivateApiContext() {
|
|
16
16
|
const privateApiRef = React.useContext(GridPrivateApiContext);
|
|
17
17
|
if (privateApiRef === undefined) {
|
|
18
|
-
throw new Error(['MUI: Could not find the data grid private context.', 'It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.', 'This can also happen if you are bundling multiple versions of the data grid.'].join('\n'));
|
|
18
|
+
throw new Error(['MUI X: Could not find the data grid private context.', 'It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.', 'This can also happen if you are bundling multiple versions of the data grid.'].join('\n'));
|
|
19
19
|
}
|
|
20
20
|
return privateApiRef;
|
|
21
21
|
}
|
|
@@ -11,7 +11,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
11
11
|
const useGridRootProps = () => {
|
|
12
12
|
const contextValue = React.useContext(_GridRootPropsContext.GridRootPropsContext);
|
|
13
13
|
if (!contextValue) {
|
|
14
|
-
throw new Error('MUI: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.');
|
|
14
|
+
throw new Error('MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.');
|
|
15
15
|
}
|
|
16
16
|
return contextValue;
|
|
17
17
|
};
|
|
@@ -11,7 +11,7 @@ var _warning = require("../../utils/warning");
|
|
|
11
11
|
var _fastObjectShallowCompare = require("../../utils/fastObjectShallowCompare");
|
|
12
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
-
const stateNotInitializedWarning = (0, _warning.buildWarning)(['MUI: `useGridSelector` has been called before the initialization of the state.', 'This hook can only be used inside the context of the grid.']);
|
|
14
|
+
const stateNotInitializedWarning = (0, _warning.buildWarning)(['MUI X: `useGridSelector` has been called before the initialization of the state.', 'This hook can only be used inside the context of the grid.']);
|
|
15
15
|
function isOutputSelector(selector) {
|
|
16
16
|
return selector.acceptsApiRef;
|
|
17
17
|
}
|
package/node/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-data-grid v7.0.0-alpha.
|
|
2
|
+
* @mui/x-data-grid v7.0.0-alpha.8
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -112,18 +112,6 @@ Object.keys(_hooks).forEach(function (key) {
|
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
114
|
});
|
|
115
|
-
var _locales = require("./locales");
|
|
116
|
-
Object.keys(_locales).forEach(function (key) {
|
|
117
|
-
if (key === "default" || key === "__esModule") return;
|
|
118
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
119
|
-
if (key in exports && exports[key] === _locales[key]) return;
|
|
120
|
-
Object.defineProperty(exports, key, {
|
|
121
|
-
enumerable: true,
|
|
122
|
-
get: function () {
|
|
123
|
-
return _locales[key];
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
115
|
var _models = require("./models");
|
|
128
116
|
Object.keys(_models).forEach(function (key) {
|
|
129
117
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -24,4 +24,15 @@ Object.keys(_useProps).forEach(function (key) {
|
|
|
24
24
|
return _useProps[key];
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
+
});
|
|
28
|
+
var _propValidation = require("./propValidation");
|
|
29
|
+
Object.keys(_propValidation).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _propValidation[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _propValidation[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
27
38
|
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.validateProps = exports.propValidatorsDataGrid = void 0;
|
|
7
|
+
const propValidatorsDataGrid = exports.propValidatorsDataGrid = [props => props.autoPageSize && props.autoHeight && ['MUI X: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.', 'You can not use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.'].join('\n') || undefined];
|
|
8
|
+
const warnedOnceMap = new Set();
|
|
9
|
+
const warnOnce = message => {
|
|
10
|
+
if (!warnedOnceMap.has(message)) {
|
|
11
|
+
console.error(message);
|
|
12
|
+
warnedOnceMap.add(message);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const validateProps = (props, validators) => {
|
|
16
|
+
if (process.env.NODE_ENV === 'production') {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
validators.forEach(validator => {
|
|
20
|
+
const warning = validator(props);
|
|
21
|
+
if (warning) {
|
|
22
|
+
warnOnce(warning);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
exports.validateProps = validateProps;
|
package/node/locales/csCZ.js
CHANGED
|
@@ -165,8 +165,8 @@ const csCZGrid = {
|
|
|
165
165
|
treeDataCollapse: 'skrýt potomky',
|
|
166
166
|
// Grouping columns
|
|
167
167
|
groupingColumnHeaderName: 'Skupina',
|
|
168
|
-
groupColumn: name => `
|
|
169
|
-
unGroupColumn: name => `Přestat
|
|
168
|
+
groupColumn: name => `Seskupit podle ${name}`,
|
|
169
|
+
unGroupColumn: name => `Přestat seskupovat podle ${name}`,
|
|
170
170
|
// Master/detail
|
|
171
171
|
detailPanelToggle: 'Přepnout detail panelu',
|
|
172
172
|
expandDetailPanel: 'Rozbalit',
|
|
@@ -9,7 +9,7 @@ var _warning = require("./warning");
|
|
|
9
9
|
const cacheContainer = {
|
|
10
10
|
cache: new WeakMap()
|
|
11
11
|
};
|
|
12
|
-
const missingInstanceIdWarning = (0, _warning.buildWarning)(['MUI: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, e.g. `mySelector(apiRef)`, or pass the instance ID explicitly, e.g. `mySelector(state, apiRef.current.instanceId)`.']);
|
|
12
|
+
const missingInstanceIdWarning = (0, _warning.buildWarning)(['MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, e.g. `mySelector(apiRef)`, or pass the instance ID explicitly, e.g. `mySelector(state, apiRef.current.instanceId)`.']);
|
|
13
13
|
function checkIsAPIRef(value) {
|
|
14
14
|
return 'current' in value && 'instanceId' in value.current;
|
|
15
15
|
}
|
package/node/utils/exportAs.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.8",
|
|
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,9 +36,9 @@
|
|
|
36
36
|
"directory": "packages/grid/x-data-grid"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@babel/runtime": "^7.23.
|
|
40
|
-
"@mui/system": "^5.15.
|
|
41
|
-
"@mui/utils": "^5.15.
|
|
39
|
+
"@babel/runtime": "^7.23.7",
|
|
40
|
+
"@mui/system": "^5.15.2",
|
|
41
|
+
"@mui/utils": "^5.15.2",
|
|
42
42
|
"clsx": "^2.0.0",
|
|
43
43
|
"prop-types": "^15.8.1",
|
|
44
44
|
"reselect": "^4.1.8"
|
package/utils/createSelector.js
CHANGED
|
@@ -3,7 +3,7 @@ import { buildWarning } from './warning';
|
|
|
3
3
|
const cacheContainer = {
|
|
4
4
|
cache: new WeakMap()
|
|
5
5
|
};
|
|
6
|
-
const missingInstanceIdWarning = buildWarning(['MUI: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, e.g. `mySelector(apiRef)`, or pass the instance ID explicitly, e.g. `mySelector(state, apiRef.current.instanceId)`.']);
|
|
6
|
+
const missingInstanceIdWarning = buildWarning(['MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, e.g. `mySelector(apiRef)`, or pass the instance ID explicitly, e.g. `mySelector(state, apiRef.current.instanceId)`.']);
|
|
7
7
|
function checkIsAPIRef(value) {
|
|
8
8
|
return 'current' in value && 'instanceId' in value.current;
|
|
9
9
|
}
|
package/utils/exportAs.js
CHANGED