@mui/x-data-grid 7.12.0 → 7.13.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 +151 -2
- package/DataGrid/DataGrid.js +10 -1
- package/components/GridColumnHeaders.js +1 -1
- package/components/GridConfigurationContext.d.ts +2 -0
- package/components/GridConfigurationContext.js +5 -0
- package/components/GridHeaders.js +2 -5
- package/components/GridRow.js +6 -8
- package/components/GridScrollArea.js +1 -1
- package/components/GridSkeletonLoadingOverlay.js +1 -1
- package/components/cell/GridCell.js +1 -1
- package/components/cell/GridSkeletonCell.js +2 -2
- package/components/columnHeaders/GridColumnHeaderItem.js +1 -1
- package/components/containers/GridRootStyles.js +9 -2
- package/components/virtualization/GridMainContainer.js +3 -2
- package/components/virtualization/GridVirtualScrollerFiller.js +1 -1
- package/context/GridContextProvider.d.ts +3 -1
- package/context/GridContextProvider.js +12 -7
- package/hooks/core/useGridRefs.js +3 -1
- package/hooks/core/useGridStateInitialization.js +1 -3
- package/hooks/features/dimensions/useGridDimensions.js +1 -1
- package/hooks/features/export/serializers/csvSerializer.js +4 -3
- package/hooks/features/filter/gridFilterSelector.d.ts +20 -7
- package/hooks/features/filter/gridFilterSelector.js +34 -0
- package/hooks/features/filter/gridFilterState.d.ts +6 -0
- package/hooks/features/filter/index.d.ts +2 -1
- package/hooks/features/filter/index.js +1 -1
- package/hooks/features/filter/useGridFilter.js +3 -0
- package/hooks/features/rowSelection/useGridRowSelection.js +6 -4
- package/hooks/features/rows/useGridRowAriaAttributes.d.ts +2 -0
- package/hooks/features/rows/useGridRowAriaAttributes.js +19 -0
- package/hooks/utils/useGridAriaAttributes.d.ts +2 -6
- package/hooks/utils/useGridAriaAttributes.js +5 -8
- package/hooks/utils/useGridConfiguration.d.ts +2 -0
- package/hooks/utils/useGridConfiguration.js +9 -0
- package/hooks/utils/useGridSelector.d.ts +1 -1
- package/hooks/utils/useGridSelector.js +1 -1
- package/index.js +1 -1
- package/internals/index.d.ts +3 -1
- package/internals/index.js +3 -1
- package/locales/viVN.js +4 -5
- package/models/api/gridCoreApi.d.ts +1 -1
- package/models/configuration/gridConfiguration.d.ts +10 -0
- package/models/configuration/gridConfiguration.js +1 -0
- package/models/configuration/gridRowConfiguration.d.ts +12 -0
- package/models/configuration/gridRowConfiguration.js +1 -0
- package/models/gridDataSource.d.ts +2 -1
- package/models/gridRows.d.ts +2 -2
- package/models/props/DataGridProps.d.ts +1 -1
- package/modern/DataGrid/DataGrid.js +10 -1
- package/modern/components/GridColumnHeaders.js +1 -1
- package/modern/components/GridConfigurationContext.js +5 -0
- package/modern/components/GridHeaders.js +2 -5
- package/modern/components/GridRow.js +6 -8
- package/modern/components/GridScrollArea.js +1 -1
- package/modern/components/GridSkeletonLoadingOverlay.js +1 -1
- package/modern/components/cell/GridCell.js +1 -1
- package/modern/components/cell/GridSkeletonCell.js +2 -2
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +1 -1
- package/modern/components/containers/GridRootStyles.js +9 -2
- package/modern/components/virtualization/GridMainContainer.js +3 -2
- package/modern/components/virtualization/GridVirtualScrollerFiller.js +1 -1
- package/modern/context/GridContextProvider.js +12 -7
- package/modern/hooks/core/useGridRefs.js +3 -1
- package/modern/hooks/core/useGridStateInitialization.js +1 -3
- package/modern/hooks/features/dimensions/useGridDimensions.js +1 -1
- package/modern/hooks/features/export/serializers/csvSerializer.js +4 -3
- package/modern/hooks/features/filter/gridFilterSelector.js +34 -0
- package/modern/hooks/features/filter/index.js +1 -1
- package/modern/hooks/features/filter/useGridFilter.js +3 -0
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +6 -4
- package/modern/hooks/features/rows/useGridRowAriaAttributes.js +19 -0
- package/modern/hooks/utils/useGridAriaAttributes.js +5 -8
- package/modern/hooks/utils/useGridConfiguration.js +9 -0
- package/modern/hooks/utils/useGridSelector.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.js +3 -1
- package/modern/locales/viVN.js +4 -5
- package/modern/models/configuration/gridConfiguration.js +1 -0
- package/modern/models/configuration/gridRowConfiguration.js +1 -0
- package/node/DataGrid/DataGrid.js +10 -1
- package/node/components/GridColumnHeaders.js +1 -1
- package/node/{utils/fastMemo.js → components/GridConfigurationContext.js} +4 -4
- package/node/components/GridHeaders.js +2 -5
- package/node/components/GridRow.js +6 -8
- package/node/components/GridScrollArea.js +1 -1
- package/node/components/GridSkeletonLoadingOverlay.js +1 -1
- package/node/components/cell/GridCell.js +1 -1
- package/node/components/cell/GridSkeletonCell.js +2 -2
- package/node/components/columnHeaders/GridColumnHeaderItem.js +1 -1
- package/node/components/containers/GridRootStyles.js +9 -2
- package/node/components/virtualization/GridMainContainer.js +3 -2
- package/node/components/virtualization/GridVirtualScrollerFiller.js +1 -1
- package/node/context/GridContextProvider.js +12 -7
- package/node/hooks/core/useGridRefs.js +3 -1
- package/node/hooks/core/useGridStateInitialization.js +1 -3
- package/node/hooks/features/dimensions/useGridDimensions.js +1 -1
- package/node/hooks/features/export/serializers/csvSerializer.js +4 -3
- package/node/hooks/features/filter/gridFilterSelector.js +35 -1
- package/node/hooks/features/filter/index.js +97 -15
- package/node/hooks/features/filter/useGridFilter.js +3 -0
- package/node/hooks/features/rowSelection/useGridRowSelection.js +6 -4
- package/node/hooks/features/rows/useGridRowAriaAttributes.js +28 -0
- package/node/hooks/utils/useGridAriaAttributes.js +4 -7
- package/node/hooks/utils/useGridConfiguration.js +18 -0
- package/node/hooks/utils/useGridSelector.js +1 -1
- package/node/index.js +1 -1
- package/node/internals/index.js +31 -12
- package/node/locales/viVN.js +4 -5
- package/node/models/configuration/gridConfiguration.js +5 -0
- package/node/models/configuration/gridRowConfiguration.js +5 -0
- package/package.json +12 -2
- package/modern/utils/fastMemo.js +0 -5
- package/modern/utils/fastObjectShallowCompare.js +0 -28
- package/modern/utils/throttle.js +0 -19
- package/node/utils/fastObjectShallowCompare.js +0 -34
- package/node/utils/throttle.js +0 -25
- package/utils/fastMemo.d.ts +0 -1
- package/utils/fastMemo.js +0 -5
- package/utils/fastObjectShallowCompare.d.ts +0 -1
- package/utils/fastObjectShallowCompare.js +0 -28
- package/utils/throttle.d.ts +0 -4
- package/utils/throttle.js +0 -19
|
@@ -9,7 +9,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _system = require("@mui/system");
|
|
11
11
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
12
|
-
var
|
|
12
|
+
var _useGridConfiguration = require("../../hooks/utils/useGridConfiguration");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
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); }
|
|
15
15
|
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 && {}.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; }
|
|
@@ -28,8 +28,9 @@ const Element = (0, _system.styled)('div', {
|
|
|
28
28
|
overflow: 'hidden'
|
|
29
29
|
});
|
|
30
30
|
const GridMainContainer = exports.GridMainContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
31
|
-
const ariaAttributes = (0, _useGridAriaAttributes.useGridAriaAttributes)();
|
|
32
31
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
32
|
+
const configuration = (0, _useGridConfiguration.useGridConfiguration)();
|
|
33
|
+
const ariaAttributes = configuration.hooks.useGridAriaAttributes();
|
|
33
34
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Element, (0, _extends2.default)({
|
|
34
35
|
ref: ref,
|
|
35
36
|
ownerState: rootProps,
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.GridVirtualScrollerFiller = void 0;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _system = require("@mui/system");
|
|
9
|
-
var _fastMemo = require("
|
|
9
|
+
var _fastMemo = require("@mui/x-internals/fastMemo");
|
|
10
10
|
var _useGridSelector = require("../../hooks/utils/useGridSelector");
|
|
11
11
|
var _useGridApiContext = require("../../hooks/utils/useGridApiContext");
|
|
12
12
|
var _dimensions = require("../../hooks/features/dimensions");
|
|
@@ -8,22 +8,27 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _GridApiContext = require("../components/GridApiContext");
|
|
9
9
|
var _useGridPrivateApiContext = require("../hooks/utils/useGridPrivateApiContext");
|
|
10
10
|
var _GridRootPropsContext = require("./GridRootPropsContext");
|
|
11
|
+
var _GridConfigurationContext = require("../components/GridConfigurationContext");
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
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
14
|
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 && {}.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
15
|
function GridContextProvider({
|
|
15
16
|
privateApiRef,
|
|
17
|
+
configuration,
|
|
16
18
|
props,
|
|
17
19
|
children
|
|
18
20
|
}) {
|
|
19
21
|
const apiRef = React.useRef(privateApiRef.current.getPublicApi());
|
|
20
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
21
|
-
value:
|
|
22
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
23
|
-
value:
|
|
24
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
25
|
-
value:
|
|
26
|
-
children:
|
|
22
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridConfigurationContext.GridConfigurationContext.Provider, {
|
|
23
|
+
value: configuration,
|
|
24
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridRootPropsContext.GridRootPropsContext.Provider, {
|
|
25
|
+
value: props,
|
|
26
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_useGridPrivateApiContext.GridPrivateApiContext.Provider, {
|
|
27
|
+
value: privateApiRef,
|
|
28
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridApiContext.GridApiContext.Provider, {
|
|
29
|
+
value: apiRef,
|
|
30
|
+
children: children
|
|
31
|
+
})
|
|
27
32
|
})
|
|
28
33
|
})
|
|
29
34
|
});
|
|
@@ -11,12 +11,14 @@ const useGridRefs = apiRef => {
|
|
|
11
11
|
const rootElementRef = React.useRef(null);
|
|
12
12
|
const mainElementRef = React.useRef(null);
|
|
13
13
|
const virtualScrollerRef = React.useRef(null);
|
|
14
|
+
const columnHeadersContainerRef = React.useRef(null);
|
|
14
15
|
apiRef.current.register('public', {
|
|
15
16
|
rootElementRef
|
|
16
17
|
});
|
|
17
18
|
apiRef.current.register('private', {
|
|
18
19
|
mainElementRef,
|
|
19
|
-
virtualScrollerRef
|
|
20
|
+
virtualScrollerRef,
|
|
21
|
+
columnHeadersContainerRef
|
|
20
22
|
});
|
|
21
23
|
};
|
|
22
24
|
exports.useGridRefs = useGridRefs;
|
|
@@ -57,9 +57,7 @@ const useGridStateInitialization = apiRef => {
|
|
|
57
57
|
if (!ignoreSetState) {
|
|
58
58
|
// We always assign it as we mutate rows for perf reason.
|
|
59
59
|
apiRef.current.state = newState;
|
|
60
|
-
|
|
61
|
-
apiRef.current.publishEvent('stateChange', newState);
|
|
62
|
-
}
|
|
60
|
+
apiRef.current.publishEvent('stateChange', newState);
|
|
63
61
|
apiRef.current.store.update(newState);
|
|
64
62
|
}
|
|
65
63
|
if (updatedControlStateIds.length === 1) {
|
|
@@ -9,9 +9,9 @@ exports.useGridDimensions = useGridDimensions;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _utils = require("@mui/utils");
|
|
12
|
+
var _throttle = require("@mui/x-internals/throttle");
|
|
12
13
|
var _useGridApiEventHandler = require("../../utils/useGridApiEventHandler");
|
|
13
14
|
var _useGridApiMethod = require("../../utils/useGridApiMethod");
|
|
14
|
-
var _throttle = require("../../../utils/throttle");
|
|
15
15
|
var _useGridLogger = require("../../utils/useGridLogger");
|
|
16
16
|
var _columns = require("../columns");
|
|
17
17
|
var _gridDimensionsSelectors = require("./gridDimensionsSelectors");
|
|
@@ -8,6 +8,9 @@ exports.serializeCellValue = void 0;
|
|
|
8
8
|
var _colDef = require("../../../../colDef");
|
|
9
9
|
var _warning = require("../../../../internals/utils/warning");
|
|
10
10
|
function sanitizeCellValue(value, csvOptions) {
|
|
11
|
+
if (value === null || value === undefined) {
|
|
12
|
+
return '';
|
|
13
|
+
}
|
|
11
14
|
const valueStr = typeof value === 'string' ? value : `${value}`;
|
|
12
15
|
if (csvOptions.shouldAppendQuotes || csvOptions.escapeFormulas) {
|
|
13
16
|
const escapedValue = valueStr.replace(/"/g, '""');
|
|
@@ -59,9 +62,7 @@ class CSVRow {
|
|
|
59
62
|
if (!this.isEmpty) {
|
|
60
63
|
this.rowString += this.options.csvOptions.delimiter;
|
|
61
64
|
}
|
|
62
|
-
if (
|
|
63
|
-
this.rowString += '';
|
|
64
|
-
} else if (typeof this.options.sanitizeCellValue === 'function') {
|
|
65
|
+
if (typeof this.options.sanitizeCellValue === 'function') {
|
|
65
66
|
this.rowString += this.options.sanitizeCellValue(value, this.options.csvOptions);
|
|
66
67
|
} else {
|
|
67
68
|
this.rowString += value;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.gridVisibleRowsLookupSelector = exports.gridQuickFilterValuesSelector = exports.gridFilteredTopLevelRowCountSelector = exports.gridFilteredSortedTopLevelRowEntriesSelector = exports.gridFilteredSortedRowIdsSelector = exports.gridFilteredSortedRowEntriesSelector = exports.gridFilteredRowsLookupSelector = exports.gridFilteredRowCountSelector = exports.gridFilteredDescendantRowCountSelector = exports.gridFilteredDescendantCountLookupSelector = exports.gridFilterModelSelector = exports.gridFilterActiveItemsSelector = exports.gridFilterActiveItemsLookupSelector = exports.gridExpandedSortedRowIdsSelector = exports.gridExpandedSortedRowEntriesSelector = exports.gridExpandedRowCountSelector = void 0;
|
|
6
|
+
exports.gridVisibleRowsLookupSelector = exports.gridQuickFilterValuesSelector = exports.gridFilteredTopLevelRowCountSelector = exports.gridFilteredSortedTopLevelRowEntriesSelector = exports.gridFilteredSortedRowIdsSelector = exports.gridFilteredSortedRowEntriesSelector = exports.gridFilteredRowsLookupSelector = exports.gridFilteredRowCountSelector = exports.gridFilteredDescendantRowCountSelector = exports.gridFilteredDescendantCountLookupSelector = exports.gridFilteredChildrenCountLookupSelector = exports.gridFilterModelSelector = exports.gridFilterActiveItemsSelector = exports.gridFilterActiveItemsLookupSelector = exports.gridExpandedSortedRowTreeLevelPositionLookupSelector = exports.gridExpandedSortedRowIdsSelector = exports.gridExpandedSortedRowEntriesSelector = exports.gridExpandedRowCountSelector = void 0;
|
|
7
7
|
var _createSelector = require("../../../utils/createSelector");
|
|
8
8
|
var _gridSortingSelector = require("../sorting/gridSortingSelector");
|
|
9
9
|
var _gridColumnsSelector = require("../columns/gridColumnsSelector");
|
|
@@ -38,6 +38,12 @@ const gridVisibleRowsLookupSelector = state => state.visibleRowsLookup;
|
|
|
38
38
|
exports.gridVisibleRowsLookupSelector = gridVisibleRowsLookupSelector;
|
|
39
39
|
const gridFilteredRowsLookupSelector = exports.gridFilteredRowsLookupSelector = (0, _createSelector.createSelector)(gridFilterStateSelector, filterState => filterState.filteredRowsLookup);
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* @category Filtering
|
|
43
|
+
* @ignore - do not document.
|
|
44
|
+
*/
|
|
45
|
+
const gridFilteredChildrenCountLookupSelector = exports.gridFilteredChildrenCountLookupSelector = (0, _createSelector.createSelector)(gridFilterStateSelector, filterState => filterState.filteredChildrenCountLookup);
|
|
46
|
+
|
|
41
47
|
/**
|
|
42
48
|
* @category Filtering
|
|
43
49
|
* @ignore - do not document.
|
|
@@ -72,6 +78,34 @@ const gridFilteredSortedRowEntriesSelector = exports.gridFilteredSortedRowEntrie
|
|
|
72
78
|
*/
|
|
73
79
|
const gridFilteredSortedRowIdsSelector = exports.gridFilteredSortedRowIdsSelector = (0, _createSelector.createSelectorMemoized)(gridFilteredSortedRowEntriesSelector, filteredSortedRowEntries => filteredSortedRowEntries.map(row => row.id));
|
|
74
80
|
|
|
81
|
+
/**
|
|
82
|
+
* Get the ids to position in the current tree level lookup of the rows accessible after the filtering process.
|
|
83
|
+
* Does not contain the collapsed children.
|
|
84
|
+
* @category Filtering
|
|
85
|
+
* @ignore - do not document.
|
|
86
|
+
*/
|
|
87
|
+
const gridExpandedSortedRowTreeLevelPositionLookupSelector = exports.gridExpandedSortedRowTreeLevelPositionLookupSelector = (0, _createSelector.createSelectorMemoized)(gridExpandedSortedRowIdsSelector, _gridRowsSelector.gridRowTreeSelector, (visibleSortedRowIds, rowTree) => {
|
|
88
|
+
const depthPositionCounter = {};
|
|
89
|
+
let lastDepth = 0;
|
|
90
|
+
return visibleSortedRowIds.reduce((acc, rowId) => {
|
|
91
|
+
const rowNode = rowTree[rowId];
|
|
92
|
+
if (!depthPositionCounter[rowNode.depth]) {
|
|
93
|
+
depthPositionCounter[rowNode.depth] = 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// going deeper in the tree should reset the counter
|
|
97
|
+
// since it might have been used in some other branch at the same level, up in the tree
|
|
98
|
+
// going back up should keep the counter and continue where it left off
|
|
99
|
+
if (rowNode.depth > lastDepth) {
|
|
100
|
+
depthPositionCounter[rowNode.depth] = 0;
|
|
101
|
+
}
|
|
102
|
+
lastDepth = rowNode.depth;
|
|
103
|
+
depthPositionCounter[rowNode.depth] += 1;
|
|
104
|
+
acc[rowId] = depthPositionCounter[rowNode.depth];
|
|
105
|
+
return acc;
|
|
106
|
+
}, {});
|
|
107
|
+
});
|
|
108
|
+
|
|
75
109
|
/**
|
|
76
110
|
* Get the id and the model of the top level rows accessible after the filtering process.
|
|
77
111
|
* @category Filtering
|
|
@@ -3,25 +3,107 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
getDefaultGridFilterModel: true
|
|
8
|
-
};
|
|
9
6
|
Object.defineProperty(exports, "getDefaultGridFilterModel", {
|
|
10
7
|
enumerable: true,
|
|
11
8
|
get: function () {
|
|
12
9
|
return _gridFilterState.getDefaultGridFilterModel;
|
|
13
10
|
}
|
|
14
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "gridExpandedRowCountSelector", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _gridFilterSelector.gridExpandedRowCountSelector;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "gridExpandedSortedRowEntriesSelector", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _gridFilterSelector.gridExpandedSortedRowEntriesSelector;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "gridExpandedSortedRowIdsSelector", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _gridFilterSelector.gridExpandedSortedRowIdsSelector;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "gridFilterActiveItemsLookupSelector", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _gridFilterSelector.gridFilterActiveItemsLookupSelector;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "gridFilterActiveItemsSelector", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _gridFilterSelector.gridFilterActiveItemsSelector;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "gridFilterModelSelector", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _gridFilterSelector.gridFilterModelSelector;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "gridFilteredDescendantCountLookupSelector", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _gridFilterSelector.gridFilteredDescendantCountLookupSelector;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "gridFilteredDescendantRowCountSelector", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _gridFilterSelector.gridFilteredDescendantRowCountSelector;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "gridFilteredRowCountSelector", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _gridFilterSelector.gridFilteredRowCountSelector;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "gridFilteredRowsLookupSelector", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _gridFilterSelector.gridFilteredRowsLookupSelector;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "gridFilteredSortedRowEntriesSelector", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _gridFilterSelector.gridFilteredSortedRowEntriesSelector;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "gridFilteredSortedRowIdsSelector", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return _gridFilterSelector.gridFilteredSortedRowIdsSelector;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "gridFilteredSortedTopLevelRowEntriesSelector", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () {
|
|
87
|
+
return _gridFilterSelector.gridFilteredSortedTopLevelRowEntriesSelector;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, "gridFilteredTopLevelRowCountSelector", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () {
|
|
93
|
+
return _gridFilterSelector.gridFilteredTopLevelRowCountSelector;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(exports, "gridQuickFilterValuesSelector", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function () {
|
|
99
|
+
return _gridFilterSelector.gridQuickFilterValuesSelector;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
Object.defineProperty(exports, "gridVisibleRowsLookupSelector", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
get: function () {
|
|
105
|
+
return _gridFilterSelector.gridVisibleRowsLookupSelector;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
15
108
|
var _gridFilterState = require("./gridFilterState");
|
|
16
|
-
var _gridFilterSelector = require("./gridFilterSelector");
|
|
17
|
-
Object.keys(_gridFilterSelector).forEach(function (key) {
|
|
18
|
-
if (key === "default" || key === "__esModule") return;
|
|
19
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
20
|
-
if (key in exports && exports[key] === _gridFilterSelector[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _gridFilterSelector[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
109
|
+
var _gridFilterSelector = require("./gridFilterSelector");
|
|
@@ -32,6 +32,7 @@ const filterStateInitializer = (state, props, apiRef) => {
|
|
|
32
32
|
filter: {
|
|
33
33
|
filterModel: (0, _gridFilterUtils.sanitizeFilterModel)(filterModel, props.disableMultipleColumnsFiltering, apiRef),
|
|
34
34
|
filteredRowsLookup: {},
|
|
35
|
+
filteredChildrenCountLookup: {},
|
|
35
36
|
filteredDescendantCountLookup: {}
|
|
36
37
|
},
|
|
37
38
|
visibleRowsLookup: {}
|
|
@@ -283,6 +284,7 @@ const useGridFilter = (apiRef, props) => {
|
|
|
283
284
|
if (props.filterMode !== 'client' || !params.isRowMatchingFilters) {
|
|
284
285
|
return {
|
|
285
286
|
filteredRowsLookup: {},
|
|
287
|
+
filteredChildrenCountLookup: {},
|
|
286
288
|
filteredDescendantCountLookup: {}
|
|
287
289
|
};
|
|
288
290
|
}
|
|
@@ -311,6 +313,7 @@ const useGridFilter = (apiRef, props) => {
|
|
|
311
313
|
}
|
|
312
314
|
return {
|
|
313
315
|
filteredRowsLookup,
|
|
316
|
+
filteredChildrenCountLookup: {},
|
|
314
317
|
filteredDescendantCountLookup: {}
|
|
315
318
|
};
|
|
316
319
|
}, [apiRef, props.filterMode, getRowId, getRowsRef]);
|
|
@@ -115,6 +115,9 @@ const useGridRowSelection = (apiRef, props) => {
|
|
|
115
115
|
}, [apiRef, logger, props.rowSelection, props.signature, canHaveMultipleSelection]);
|
|
116
116
|
const isRowSelected = React.useCallback(id => (0, _gridRowSelectionSelector.gridRowSelectionStateSelector)(apiRef.current.state).includes(id), [apiRef]);
|
|
117
117
|
const isRowSelectable = React.useCallback(id => {
|
|
118
|
+
if (props.rowSelection === false) {
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
118
121
|
if (propIsRowSelectable && !propIsRowSelectable(apiRef.current.getRowParams(id))) {
|
|
119
122
|
return false;
|
|
120
123
|
}
|
|
@@ -123,7 +126,7 @@ const useGridRowSelection = (apiRef, props) => {
|
|
|
123
126
|
return false;
|
|
124
127
|
}
|
|
125
128
|
return true;
|
|
126
|
-
}, [apiRef, propIsRowSelectable]);
|
|
129
|
+
}, [apiRef, props.rowSelection, propIsRowSelectable]);
|
|
127
130
|
const getSelectedRows = React.useCallback(() => (0, _gridRowSelectionSelector.selectedGridRowsSelector)(apiRef), [apiRef]);
|
|
128
131
|
const selectRow = React.useCallback((id, isSelected = true, resetSelection = false) => {
|
|
129
132
|
if (!apiRef.current.isRowSelectable(id)) {
|
|
@@ -282,11 +285,10 @@ const useGridRowSelection = (apiRef, props) => {
|
|
|
282
285
|
}
|
|
283
286
|
}, [apiRef, expandMouseRowRangeSelection, canHaveMultipleSelection]);
|
|
284
287
|
const handleHeaderSelectionCheckboxChange = React.useCallback(params => {
|
|
285
|
-
const
|
|
286
|
-
const rowsToBeSelected = shouldLimitSelectionToCurrentPage ? (0, _pagination.gridPaginatedVisibleSortedGridRowIdsSelector)(apiRef) : (0, _gridFilterSelector.gridExpandedSortedRowIdsSelector)(apiRef);
|
|
288
|
+
const rowsToBeSelected = props.pagination && props.checkboxSelectionVisibleOnly && props.paginationMode === 'client' ? (0, _pagination.gridPaginatedVisibleSortedGridRowIdsSelector)(apiRef) : (0, _gridFilterSelector.gridExpandedSortedRowIdsSelector)(apiRef);
|
|
287
289
|
const filterModel = (0, _gridFilterSelector.gridFilterModelSelector)(apiRef);
|
|
288
290
|
apiRef.current.selectRows(rowsToBeSelected, params.value, filterModel?.items.length > 0);
|
|
289
|
-
}, [apiRef, props.checkboxSelectionVisibleOnly, props.pagination]);
|
|
291
|
+
}, [apiRef, props.checkboxSelectionVisibleOnly, props.pagination, props.paginationMode]);
|
|
290
292
|
const handleCellKeyDown = React.useCallback((params, event) => {
|
|
291
293
|
// Get the most recent cell mode because it may have been changed by another listener
|
|
292
294
|
if (apiRef.current.getCellMode(params.id, params.field) === _gridEditRowModel.GridCellModes.Edit) {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useGridRowAriaAttributes = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _rowSelection = require("../rowSelection");
|
|
9
|
+
var _useGridSelector = require("../../utils/useGridSelector");
|
|
10
|
+
var _gridColumnGroupsSelector = require("../columnGrouping/gridColumnGroupsSelector");
|
|
11
|
+
var _useGridPrivateApiContext = require("../../utils/useGridPrivateApiContext");
|
|
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
|
+
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 && {}.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 useGridRowAriaAttributes = () => {
|
|
15
|
+
const apiRef = (0, _useGridPrivateApiContext.useGridPrivateApiContext)();
|
|
16
|
+
const selectedIdsLookup = (0, _useGridSelector.useGridSelector)(apiRef, _rowSelection.selectedIdsLookupSelector);
|
|
17
|
+
const headerGroupingMaxDepth = (0, _useGridSelector.useGridSelector)(apiRef, _gridColumnGroupsSelector.gridColumnGroupsHeaderMaxDepthSelector);
|
|
18
|
+
return React.useCallback((rowNode, index) => {
|
|
19
|
+
const ariaAttributes = {};
|
|
20
|
+
const ariaRowIndex = index + headerGroupingMaxDepth + 2; // 1 for the header row and 1 as it's 1-based
|
|
21
|
+
ariaAttributes['aria-rowindex'] = ariaRowIndex;
|
|
22
|
+
if (apiRef.current.isRowSelectable(rowNode.id)) {
|
|
23
|
+
ariaAttributes['aria-selected'] = selectedIdsLookup[rowNode.id] !== undefined;
|
|
24
|
+
}
|
|
25
|
+
return ariaAttributes;
|
|
26
|
+
}, [apiRef, selectedIdsLookup, headerGroupingMaxDepth]);
|
|
27
|
+
};
|
|
28
|
+
exports.useGridRowAriaAttributes = useGridRowAriaAttributes;
|
|
@@ -11,21 +11,18 @@ var _gridColumnGroupsSelector = require("../features/columnGrouping/gridColumnGr
|
|
|
11
11
|
var _gridRowsSelector = require("../features/rows/gridRowsSelector");
|
|
12
12
|
var _useGridPrivateApiContext = require("./useGridPrivateApiContext");
|
|
13
13
|
var _utils = require("../features/rowSelection/utils");
|
|
14
|
+
var _gridFilterSelector = require("../features/filter/gridFilterSelector");
|
|
14
15
|
const useGridAriaAttributes = () => {
|
|
15
16
|
const apiRef = (0, _useGridPrivateApiContext.useGridPrivateApiContext)();
|
|
16
17
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
17
18
|
const visibleColumns = (0, _useGridSelector.useGridSelector)(apiRef, _gridColumnsSelector.gridVisibleColumnDefinitionsSelector);
|
|
18
|
-
const
|
|
19
|
+
const accessibleRowCount = (0, _useGridSelector.useGridSelector)(apiRef, _gridFilterSelector.gridExpandedRowCountSelector);
|
|
19
20
|
const headerGroupingMaxDepth = (0, _useGridSelector.useGridSelector)(apiRef, _gridColumnGroupsSelector.gridColumnGroupsHeaderMaxDepthSelector);
|
|
20
21
|
const pinnedRowsCount = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowsSelector.gridPinnedRowsCountSelector);
|
|
21
|
-
let role = 'grid';
|
|
22
|
-
if (rootProps.treeData) {
|
|
23
|
-
role = 'treegrid';
|
|
24
|
-
}
|
|
25
22
|
return {
|
|
26
|
-
role,
|
|
23
|
+
role: 'grid',
|
|
27
24
|
'aria-colcount': visibleColumns.length,
|
|
28
|
-
'aria-rowcount': headerGroupingMaxDepth + 1 + pinnedRowsCount +
|
|
25
|
+
'aria-rowcount': headerGroupingMaxDepth + 1 + pinnedRowsCount + accessibleRowCount,
|
|
29
26
|
'aria-multiselectable': (0, _utils.isMultipleRowSelectionEnabled)(rootProps)
|
|
30
27
|
};
|
|
31
28
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useGridConfiguration = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _GridConfigurationContext = require("../../components/GridConfigurationContext");
|
|
9
|
+
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); }
|
|
10
|
+
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 && {}.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; }
|
|
11
|
+
const useGridConfiguration = () => {
|
|
12
|
+
const configuration = React.useContext(_GridConfigurationContext.GridConfigurationContext);
|
|
13
|
+
if (configuration === undefined) {
|
|
14
|
+
throw new Error(['MUI X: Could not find the data grid configuration 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
|
+
}
|
|
16
|
+
return configuration;
|
|
17
|
+
};
|
|
18
|
+
exports.useGridConfiguration = useGridConfiguration;
|
|
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useGridSelector = exports.objectShallowCompare = void 0;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _fastObjectShallowCompare = require("@mui/x-internals/fastObjectShallowCompare");
|
|
8
9
|
var _useLazyRef = require("./useLazyRef");
|
|
9
10
|
var _useOnMount = require("./useOnMount");
|
|
10
11
|
var _warning = require("../../internals/utils/warning");
|
|
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 && {}.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
14
|
function isOutputSelector(selector) {
|
package/node/index.js
CHANGED
package/node/internals/index.js
CHANGED
|
@@ -33,6 +33,8 @@ var _exportNames = {
|
|
|
33
33
|
useGridFilter: true,
|
|
34
34
|
filterStateInitializer: true,
|
|
35
35
|
passFilterLogic: true,
|
|
36
|
+
gridFilteredChildrenCountLookupSelector: true,
|
|
37
|
+
gridExpandedSortedRowTreeLevelPositionLookupSelector: true,
|
|
36
38
|
isSingleSelectColDef: true,
|
|
37
39
|
useGridFocus: true,
|
|
38
40
|
focusStateInitializer: true,
|
|
@@ -46,6 +48,8 @@ var _exportNames = {
|
|
|
46
48
|
gridEditRowsStateSelector: true,
|
|
47
49
|
useGridRows: true,
|
|
48
50
|
rowsStateInitializer: true,
|
|
51
|
+
useGridAriaAttributes: true,
|
|
52
|
+
useGridRowAriaAttributes: true,
|
|
49
53
|
useGridRowsPreProcessors: true,
|
|
50
54
|
getTreeNodeDescendants: true,
|
|
51
55
|
buildRootGroup: true,
|
|
@@ -289,6 +293,18 @@ Object.defineProperty(exports, "gridEditRowsStateSelector", {
|
|
|
289
293
|
return _gridEditingSelectors.gridEditRowsStateSelector;
|
|
290
294
|
}
|
|
291
295
|
});
|
|
296
|
+
Object.defineProperty(exports, "gridExpandedSortedRowTreeLevelPositionLookupSelector", {
|
|
297
|
+
enumerable: true,
|
|
298
|
+
get: function () {
|
|
299
|
+
return _gridFilterSelector.gridExpandedSortedRowTreeLevelPositionLookupSelector;
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
Object.defineProperty(exports, "gridFilteredChildrenCountLookupSelector", {
|
|
303
|
+
enumerable: true,
|
|
304
|
+
get: function () {
|
|
305
|
+
return _gridFilterSelector.gridFilteredChildrenCountLookupSelector;
|
|
306
|
+
}
|
|
307
|
+
});
|
|
292
308
|
Object.defineProperty(exports, "gridHeaderFilteringEditFieldSelector", {
|
|
293
309
|
enumerable: true,
|
|
294
310
|
get: function () {
|
|
@@ -397,6 +413,12 @@ Object.defineProperty(exports, "unwrapPrivateAPI", {
|
|
|
397
413
|
return _useGridApiInitialization.unwrapPrivateAPI;
|
|
398
414
|
}
|
|
399
415
|
});
|
|
416
|
+
Object.defineProperty(exports, "useGridAriaAttributes", {
|
|
417
|
+
enumerable: true,
|
|
418
|
+
get: function () {
|
|
419
|
+
return _useGridAriaAttributes.useGridAriaAttributes;
|
|
420
|
+
}
|
|
421
|
+
});
|
|
400
422
|
Object.defineProperty(exports, "useGridClipboard", {
|
|
401
423
|
enumerable: true,
|
|
402
424
|
get: function () {
|
|
@@ -541,6 +563,12 @@ Object.defineProperty(exports, "useGridRegisterStrategyProcessor", {
|
|
|
541
563
|
return _strategyProcessing.useGridRegisterStrategyProcessor;
|
|
542
564
|
}
|
|
543
565
|
});
|
|
566
|
+
Object.defineProperty(exports, "useGridRowAriaAttributes", {
|
|
567
|
+
enumerable: true,
|
|
568
|
+
get: function () {
|
|
569
|
+
return _useGridRowAriaAttributes.useGridRowAriaAttributes;
|
|
570
|
+
}
|
|
571
|
+
});
|
|
544
572
|
Object.defineProperty(exports, "useGridRowSelection", {
|
|
545
573
|
enumerable: true,
|
|
546
574
|
get: function () {
|
|
@@ -665,6 +693,7 @@ var _useGridCsvExport = require("../hooks/features/export/useGridCsvExport");
|
|
|
665
693
|
var _useGridPrintExport = require("../hooks/features/export/useGridPrintExport");
|
|
666
694
|
var _useGridFilter = require("../hooks/features/filter/useGridFilter");
|
|
667
695
|
var _gridFilterUtils = require("../hooks/features/filter/gridFilterUtils");
|
|
696
|
+
var _gridFilterSelector = require("../hooks/features/filter/gridFilterSelector");
|
|
668
697
|
var _filterPanelUtils = require("../components/panel/filterPanel/filterPanelUtils");
|
|
669
698
|
var _useGridFocus = require("../hooks/features/focus/useGridFocus");
|
|
670
699
|
var _useGridKeyboardNavigation = require("../hooks/features/keyboardNavigation/useGridKeyboardNavigation");
|
|
@@ -673,6 +702,8 @@ var _useGridPreferencesPanel = require("../hooks/features/preferencesPanel/useGr
|
|
|
673
702
|
var _useGridEditing = require("../hooks/features/editing/useGridEditing");
|
|
674
703
|
var _gridEditingSelectors = require("../hooks/features/editing/gridEditingSelectors");
|
|
675
704
|
var _useGridRows = require("../hooks/features/rows/useGridRows");
|
|
705
|
+
var _useGridAriaAttributes = require("../hooks/utils/useGridAriaAttributes");
|
|
706
|
+
var _useGridRowAriaAttributes = require("../hooks/features/rows/useGridRowAriaAttributes");
|
|
676
707
|
var _useGridRowsPreProcessors = require("../hooks/features/rows/useGridRowsPreProcessors");
|
|
677
708
|
var _gridRowsUtils = require("../hooks/features/rows/gridRowsUtils");
|
|
678
709
|
var _useGridRowsMeta = require("../hooks/features/rows/useGridRowsMeta");
|
|
@@ -731,18 +762,6 @@ Object.keys(_utils2).forEach(function (key) {
|
|
|
731
762
|
}
|
|
732
763
|
});
|
|
733
764
|
});
|
|
734
|
-
var _fastMemo = require("../utils/fastMemo");
|
|
735
|
-
Object.keys(_fastMemo).forEach(function (key) {
|
|
736
|
-
if (key === "default" || key === "__esModule") return;
|
|
737
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
738
|
-
if (key in exports && exports[key] === _fastMemo[key]) return;
|
|
739
|
-
Object.defineProperty(exports, key, {
|
|
740
|
-
enumerable: true,
|
|
741
|
-
get: function () {
|
|
742
|
-
return _fastMemo[key];
|
|
743
|
-
}
|
|
744
|
-
});
|
|
745
|
-
});
|
|
746
765
|
var _exportAs = require("../utils/exportAs");
|
|
747
766
|
var _getPublicApiRef = require("../utils/getPublicApiRef");
|
|
748
767
|
Object.keys(_getPublicApiRef).forEach(function (key) {
|
package/node/locales/viVN.js
CHANGED
|
@@ -36,11 +36,10 @@ const viVNGrid = {
|
|
|
36
36
|
toolbarExportPrint: 'In',
|
|
37
37
|
toolbarExportExcel: 'Xuất Excel',
|
|
38
38
|
// Columns management text
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
columnsManagementSearchTitle: 'Tìm kiếm',
|
|
40
|
+
columnsManagementNoColumns: 'Không có cột',
|
|
41
|
+
columnsManagementShowHideAllText: 'Hiện/Ẩn Tất cả',
|
|
42
|
+
columnsManagementReset: 'Đặt lại',
|
|
44
43
|
// Filter panel text
|
|
45
44
|
filterPanelAddFilter: 'Thêm bộ lọc',
|
|
46
45
|
filterPanelRemoveAll: 'Xóa tất cả',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.13.0",
|
|
4
4
|
"description": "The Community plan edition of the Data Grid components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -43,13 +43,23 @@
|
|
|
43
43
|
"clsx": "^2.1.1",
|
|
44
44
|
"prop-types": "^15.8.1",
|
|
45
45
|
"reselect": "^4.1.8",
|
|
46
|
-
"@mui/x-internals": "7.
|
|
46
|
+
"@mui/x-internals": "7.13.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
+
"@emotion/react": "^11.9.0",
|
|
50
|
+
"@emotion/styled": "^11.8.1",
|
|
49
51
|
"@mui/material": "^5.15.14",
|
|
50
52
|
"react": "^17.0.0 || ^18.0.0",
|
|
51
53
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
52
54
|
},
|
|
55
|
+
"peerDependenciesMeta": {
|
|
56
|
+
"@emotion/react": {
|
|
57
|
+
"optional": true
|
|
58
|
+
},
|
|
59
|
+
"@emotion/styled": {
|
|
60
|
+
"optional": true
|
|
61
|
+
}
|
|
62
|
+
},
|
|
53
63
|
"engines": {
|
|
54
64
|
"node": ">=14.0.0"
|
|
55
65
|
},
|