@mui/x-data-grid 6.18.0 → 7.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +212 -5
- 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 +17 -13
- package/components/cell/GridActionsCell.js +19 -12
- package/components/cell/GridCell.js +4 -4
- package/constants/defaultGridSlotsComponents.js +17 -17
- package/hooks/features/export/useGridPrintExport.js +7 -10
- package/hooks/features/filter/gridFilterUtils.d.ts +1 -0
- package/hooks/features/filter/gridFilterUtils.js +20 -71
- package/hooks/features/filter/useGridFilter.d.ts +1 -1
- package/hooks/features/filter/useGridFilter.js +2 -1
- package/hooks/features/rows/useGridRows.js +4 -1
- package/index.js +1 -1
- package/internals/index.d.ts +1 -1
- package/internals/index.js +1 -1
- package/internals/utils/computeSlots.d.ts +4 -6
- package/internals/utils/computeSlots.js +10 -9
- 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 +17 -13
- package/legacy/components/cell/GridActionsCell.js +21 -12
- package/legacy/components/cell/GridCell.js +6 -4
- package/legacy/constants/defaultGridSlotsComponents.js +17 -17
- package/legacy/hooks/features/export/useGridPrintExport.js +7 -10
- package/legacy/hooks/features/filter/gridFilterUtils.js +20 -71
- package/legacy/hooks/features/filter/useGridFilter.js +2 -1
- package/legacy/hooks/features/rows/useGridRows.js +2 -1
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +1 -1
- package/legacy/internals/utils/computeSlots.js +10 -9
- 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/legacy/utils/getPublicApiRef.js +5 -0
- package/locales/csCZ.js +2 -2
- package/material/index.js +48 -48
- package/models/api/gridFilterApi.d.ts +5 -0
- 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 +17 -13
- package/modern/components/cell/GridActionsCell.js +18 -12
- package/modern/components/cell/GridCell.js +3 -3
- package/modern/constants/defaultGridSlotsComponents.js +17 -17
- package/modern/hooks/features/export/useGridPrintExport.js +6 -10
- package/modern/hooks/features/filter/gridFilterUtils.js +20 -70
- package/modern/hooks/features/filter/useGridFilter.js +2 -1
- package/modern/hooks/features/rows/useGridRows.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.js +1 -1
- package/modern/internals/utils/computeSlots.js +10 -9
- 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/modern/utils/getPublicApiRef.js +5 -0
- 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 +18 -13
- package/node/components/cell/GridActionsCell.js +18 -12
- package/node/components/cell/GridCell.js +3 -3
- package/node/constants/defaultGridSlotsComponents.js +17 -17
- package/node/hooks/features/export/useGridPrintExport.js +5 -9
- package/node/hooks/features/filter/gridFilterUtils.js +21 -70
- package/node/hooks/features/filter/useGridFilter.js +2 -1
- package/node/hooks/features/rows/useGridRows.js +1 -1
- package/node/index.js +1 -1
- package/node/internals/index.js +13 -13
- package/node/internals/utils/computeSlots.js +10 -8
- 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/node/utils/getPublicApiRef.js +11 -0
- package/package.json +1 -1
- package/utils/getPublicApiRef.d.ts +3 -0
- package/utils/getPublicApiRef.js +5 -0
- 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
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
// TODO v7: This file exist only to simplify typing between
|
|
3
|
-
// components/componentsProps and slots/slotProps
|
|
4
|
-
// Should be deleted when components/componentsProps are removed
|
|
5
|
-
|
|
6
|
-
export const uncapitalizeObjectKeys = capitalizedObject => {
|
|
7
|
-
if (capitalizedObject === undefined) {
|
|
8
|
-
return undefined;
|
|
9
|
-
}
|
|
10
|
-
return Object.keys(capitalizedObject).reduce((acc, key) => _extends({}, acc, {
|
|
11
|
-
[`${key.charAt(0).toLowerCase()}${key.slice(1)}`]: capitalizedObject[key]
|
|
12
|
-
}), {});
|
|
13
|
-
};
|
package/legacy/colDef/utils.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
/**
|
|
3
|
-
* A global API ref, for v7-to-legacy converter
|
|
4
|
-
*/
|
|
5
|
-
export var GLOBAL_API_REF = {
|
|
6
|
-
current: null
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* A tagger to determine if the filter is internal or custom user-supplied.
|
|
11
|
-
* To be a valid internal filter, the v7 function *must* be defined/redefined at
|
|
12
|
-
* the same time as the legacy one.
|
|
13
|
-
* https://github.com/mui/mui-x/pull/9254#discussion_r1231095551
|
|
14
|
-
*/
|
|
15
|
-
export function tagInternalFilter(fn) {
|
|
16
|
-
fn.isInternal = true;
|
|
17
|
-
return fn;
|
|
18
|
-
}
|
|
19
|
-
export function isInternalFilter(fn) {
|
|
20
|
-
return fn !== undefined && fn.isInternal === true;
|
|
21
|
-
}
|
|
22
|
-
export function convertFilterV7ToLegacy(fn) {
|
|
23
|
-
return tagInternalFilter(function (filterItem, column) {
|
|
24
|
-
var filterFn = fn(filterItem, column);
|
|
25
|
-
if (!filterFn) {
|
|
26
|
-
return filterFn;
|
|
27
|
-
}
|
|
28
|
-
return function (cellParams) {
|
|
29
|
-
return filterFn(cellParams.value, cellParams.row, column, GLOBAL_API_REF.current);
|
|
30
|
-
};
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
export function convertLegacyOperators(ops) {
|
|
34
|
-
return ops.map(function (op) {
|
|
35
|
-
return _extends({}, op, {
|
|
36
|
-
getApplyFilterFn: convertFilterV7ToLegacy(op.getApplyFilterFnV7),
|
|
37
|
-
getApplyFilterFnV7: tagInternalFilter(op.getApplyFilterFnV7)
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
export function convertQuickFilterV7ToLegacy(fn) {
|
|
42
|
-
return tagInternalFilter(function (filterItem, column, apiRef) {
|
|
43
|
-
var filterFn = fn(filterItem, column, apiRef);
|
|
44
|
-
if (!filterFn) {
|
|
45
|
-
return filterFn;
|
|
46
|
-
}
|
|
47
|
-
return function (cellParams) {
|
|
48
|
-
return filterFn(cellParams.value, cellParams.row, column, apiRef);
|
|
49
|
-
};
|
|
50
|
-
});
|
|
51
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
// TODO v7: This file exist only to simplify typing between
|
|
4
|
-
// components/componentsProps and slots/slotProps
|
|
5
|
-
// Should be deleted when components/componentsProps are removed
|
|
6
|
-
|
|
7
|
-
export var uncapitalizeObjectKeys = function uncapitalizeObjectKeys(capitalizedObject) {
|
|
8
|
-
if (capitalizedObject === undefined) {
|
|
9
|
-
return undefined;
|
|
10
|
-
}
|
|
11
|
-
return Object.keys(capitalizedObject).reduce(function (acc, key) {
|
|
12
|
-
return _extends({}, acc, _defineProperty({}, "".concat(key.charAt(0).toLowerCase()).concat(key.slice(1)), capitalizedObject[key]));
|
|
13
|
-
}, {});
|
|
14
|
-
};
|
package/modern/colDef/utils.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
/**
|
|
3
|
-
* A global API ref, for v7-to-legacy converter
|
|
4
|
-
*/
|
|
5
|
-
export const GLOBAL_API_REF = {
|
|
6
|
-
current: null
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* A tagger to determine if the filter is internal or custom user-supplied.
|
|
11
|
-
* To be a valid internal filter, the v7 function *must* be defined/redefined at
|
|
12
|
-
* the same time as the legacy one.
|
|
13
|
-
* https://github.com/mui/mui-x/pull/9254#discussion_r1231095551
|
|
14
|
-
*/
|
|
15
|
-
export function tagInternalFilter(fn) {
|
|
16
|
-
fn.isInternal = true;
|
|
17
|
-
return fn;
|
|
18
|
-
}
|
|
19
|
-
export function isInternalFilter(fn) {
|
|
20
|
-
return fn !== undefined && fn.isInternal === true;
|
|
21
|
-
}
|
|
22
|
-
export function convertFilterV7ToLegacy(fn) {
|
|
23
|
-
return tagInternalFilter((filterItem, column) => {
|
|
24
|
-
const filterFn = fn(filterItem, column);
|
|
25
|
-
if (!filterFn) {
|
|
26
|
-
return filterFn;
|
|
27
|
-
}
|
|
28
|
-
return cellParams => {
|
|
29
|
-
return filterFn(cellParams.value, cellParams.row, column, GLOBAL_API_REF.current);
|
|
30
|
-
};
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
export function convertLegacyOperators(ops) {
|
|
34
|
-
return ops.map(op => {
|
|
35
|
-
return _extends({}, op, {
|
|
36
|
-
getApplyFilterFn: convertFilterV7ToLegacy(op.getApplyFilterFnV7),
|
|
37
|
-
getApplyFilterFnV7: tagInternalFilter(op.getApplyFilterFnV7)
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
export function convertQuickFilterV7ToLegacy(fn) {
|
|
42
|
-
return tagInternalFilter((filterItem, column, apiRef) => {
|
|
43
|
-
const filterFn = fn(filterItem, column, apiRef);
|
|
44
|
-
if (!filterFn) {
|
|
45
|
-
return filterFn;
|
|
46
|
-
}
|
|
47
|
-
return cellParams => {
|
|
48
|
-
return filterFn(cellParams.value, cellParams.row, column, apiRef);
|
|
49
|
-
};
|
|
50
|
-
});
|
|
51
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
// TODO v7: This file exist only to simplify typing between
|
|
3
|
-
// components/componentsProps and slots/slotProps
|
|
4
|
-
// Should be deleted when components/componentsProps are removed
|
|
5
|
-
|
|
6
|
-
export const uncapitalizeObjectKeys = capitalizedObject => {
|
|
7
|
-
if (capitalizedObject === undefined) {
|
|
8
|
-
return undefined;
|
|
9
|
-
}
|
|
10
|
-
return Object.keys(capitalizedObject).reduce((acc, key) => _extends({}, acc, {
|
|
11
|
-
[`${key.charAt(0).toLowerCase()}${key.slice(1)}`]: capitalizedObject[key]
|
|
12
|
-
}), {});
|
|
13
|
-
};
|
package/node/colDef/utils.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.GLOBAL_API_REF = void 0;
|
|
8
|
-
exports.convertFilterV7ToLegacy = convertFilterV7ToLegacy;
|
|
9
|
-
exports.convertLegacyOperators = convertLegacyOperators;
|
|
10
|
-
exports.convertQuickFilterV7ToLegacy = convertQuickFilterV7ToLegacy;
|
|
11
|
-
exports.isInternalFilter = isInternalFilter;
|
|
12
|
-
exports.tagInternalFilter = tagInternalFilter;
|
|
13
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
|
-
/**
|
|
15
|
-
* A global API ref, for v7-to-legacy converter
|
|
16
|
-
*/
|
|
17
|
-
const GLOBAL_API_REF = exports.GLOBAL_API_REF = {
|
|
18
|
-
current: null
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* A tagger to determine if the filter is internal or custom user-supplied.
|
|
23
|
-
* To be a valid internal filter, the v7 function *must* be defined/redefined at
|
|
24
|
-
* the same time as the legacy one.
|
|
25
|
-
* https://github.com/mui/mui-x/pull/9254#discussion_r1231095551
|
|
26
|
-
*/
|
|
27
|
-
function tagInternalFilter(fn) {
|
|
28
|
-
fn.isInternal = true;
|
|
29
|
-
return fn;
|
|
30
|
-
}
|
|
31
|
-
function isInternalFilter(fn) {
|
|
32
|
-
return fn !== undefined && fn.isInternal === true;
|
|
33
|
-
}
|
|
34
|
-
function convertFilterV7ToLegacy(fn) {
|
|
35
|
-
return tagInternalFilter((filterItem, column) => {
|
|
36
|
-
const filterFn = fn(filterItem, column);
|
|
37
|
-
if (!filterFn) {
|
|
38
|
-
return filterFn;
|
|
39
|
-
}
|
|
40
|
-
return cellParams => {
|
|
41
|
-
return filterFn(cellParams.value, cellParams.row, column, GLOBAL_API_REF.current);
|
|
42
|
-
};
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
function convertLegacyOperators(ops) {
|
|
46
|
-
return ops.map(op => {
|
|
47
|
-
return (0, _extends2.default)({}, op, {
|
|
48
|
-
getApplyFilterFn: convertFilterV7ToLegacy(op.getApplyFilterFnV7),
|
|
49
|
-
getApplyFilterFnV7: tagInternalFilter(op.getApplyFilterFnV7)
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
function convertQuickFilterV7ToLegacy(fn) {
|
|
54
|
-
return tagInternalFilter((filterItem, column, apiRef) => {
|
|
55
|
-
const filterFn = fn(filterItem, column, apiRef);
|
|
56
|
-
if (!filterFn) {
|
|
57
|
-
return filterFn;
|
|
58
|
-
}
|
|
59
|
-
return cellParams => {
|
|
60
|
-
return filterFn(cellParams.value, cellParams.row, column, apiRef);
|
|
61
|
-
};
|
|
62
|
-
});
|
|
63
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.uncapitalizeObjectKeys = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
// TODO v7: This file exist only to simplify typing between
|
|
10
|
-
// components/componentsProps and slots/slotProps
|
|
11
|
-
// Should be deleted when components/componentsProps are removed
|
|
12
|
-
|
|
13
|
-
const uncapitalizeObjectKeys = capitalizedObject => {
|
|
14
|
-
if (capitalizedObject === undefined) {
|
|
15
|
-
return undefined;
|
|
16
|
-
}
|
|
17
|
-
return Object.keys(capitalizedObject).reduce((acc, key) => (0, _extends2.default)({}, acc, {
|
|
18
|
-
[`${key.charAt(0).toLowerCase()}${key.slice(1)}`]: capitalizedObject[key]
|
|
19
|
-
}), {});
|
|
20
|
-
};
|
|
21
|
-
exports.uncapitalizeObjectKeys = uncapitalizeObjectKeys;
|