@mui/x-data-grid-pro 5.15.1 → 5.15.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 CHANGED
@@ -3,6 +3,50 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 5.15.2
7
+
8
+ _Aug 11, 2022_
9
+
10
+ We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - ✨ Improve quick filtering with row grouping (#5701) @alexfauquette
13
+ - 📚 Documentation improvements
14
+ - 🐞 Bugfixes
15
+
16
+ ### `@mui/x-data-grid@5.15.2` / `@mui/x-data-grid-pro@5.15.2` / `@mui/x-data-grid-premium@5.15.2`
17
+
18
+ #### Changes
19
+
20
+ - [DataGrid] Catch errors if rows freezing is not supported (#5711) @cherniavskii
21
+ - [DataGrid] Preserve cell mode when entering edit mode while commiting (#5686) @m4theushw
22
+ - [DataGridPremium] Let quick filter search in row grouping children (#5701) @alexfauquette
23
+
24
+ ### `@mui/x-date-pickers@v5.0.0-beta.5` / `@mui/x-date-picker-pro@5.0.0-beta.5`
25
+
26
+ #### Changes
27
+
28
+ - [pickers] Add `react-dom` to peerDependencies (#5752) @cherniavskii
29
+ - [TimePicker] Set clock focus outline to `none` (#5758) @LukasTy
30
+ - [pickers] Fix theme augmentation with TypeScript (#5596) @alexfauquette
31
+ - [pickers] Reset input value when locale is modified (#5310) @alexfauquette
32
+ - [pickers] Support `disableHighlightToday` on `MonthPicker` and `YearPicker` (#5562) @flaviendelangle
33
+ - [pickers] Fallback to desktop mode when `matchMedia` is unavailable (#5684) @LukasTy
34
+ - [pickers] Trigger `onChange` when clearing or accepting `Invalid date` (#5740) @LukasTy
35
+
36
+ ### Docs
37
+
38
+ - [docs] Add RFC GH issue template (#5739) @bytasv
39
+ - [docs] Add description to the `GridExportStateParams` page (#5654) @oliviertassinari
40
+ - [docs] Improve the Events page (#5413) @flaviendelangle
41
+ - [docs] Use new editing API in the introduction demos (#5728) @oliviertassinari
42
+
43
+ ### Core
44
+
45
+ - [core] Remove duplicated `FUNDING.yml` file (#5656) @oliviertassinari
46
+ - [core] Remove outdated Next.js options (#5727) @oliviertassinari
47
+ - [core] Update tooling to run with React 18 (#4155) @m4theushw
48
+ - [test] Fix failing dynamic row height tests on Edge (#5707) @m4theushw
49
+
6
50
  ## 5.15.1
7
51
 
8
52
  _Aug 4, 2022_
@@ -822,7 +822,7 @@ DataGridProRaw.propTypes = {
822
822
  * @param {GridState} state The new state.
823
823
  * @param {MuiEvent<{}>} event The event object.
824
824
  * @param {GridCallbackDetails} details Additional details for this callback.
825
- * @internal
825
+ * @ignore - do not document.
826
826
  */
827
827
  onStateChange: PropTypes.func,
828
828
 
@@ -1,9 +1,10 @@
1
- import { GridRowTreeConfig, GridFilterState } from '@mui/x-data-grid';
1
+ import { GridRowTreeConfig, GridFilterState, GridFilterModel } from '@mui/x-data-grid';
2
2
  import { GridAggregatedFilterItemApplier } from '@mui/x-data-grid/internals';
3
3
  interface FilterRowTreeFromTreeDataParams {
4
4
  rowTree: GridRowTreeConfig;
5
5
  disableChildrenFiltering: boolean;
6
6
  isRowMatchingFilters: GridAggregatedFilterItemApplier | null;
7
+ filterModel: GridFilterModel;
7
8
  }
8
9
  export declare const TREE_DATA_STRATEGY = "tree-data";
9
10
  /**
@@ -1,3 +1,4 @@
1
+ import { passFilterLogic } from '@mui/x-data-grid/internals';
1
2
  export const TREE_DATA_STRATEGY = 'tree-data';
2
3
  /**
3
4
  * A node is visible if one of the following criteria is met:
@@ -23,10 +24,14 @@ export const filterRowTreeFromTreeData = params => {
23
24
 
24
25
  if (shouldSkipFilters) {
25
26
  isMatchingFilters = null;
26
- } else if (!isRowMatchingFilters) {
27
+ } else if (!isRowMatchingFilters || node.position === 'footer') {
27
28
  isMatchingFilters = true;
28
29
  } else {
29
- isMatchingFilters = isRowMatchingFilters(node.id);
30
+ const {
31
+ passingFilterItems,
32
+ passingQuickFilterValues
33
+ } = isRowMatchingFilters(node.id);
34
+ isMatchingFilters = passFilterLogic([passingFilterItems], [passingQuickFilterValues], params.filterModel);
30
35
  }
31
36
 
32
37
  let filteredDescendantCount = 0;
@@ -99,7 +99,8 @@ export const useGridTreeDataPreProcessors = (apiRef, props) => {
99
99
  return filterRowTreeFromTreeData({
100
100
  rowTree,
101
101
  isRowMatchingFilters: params.isRowMatchingFilters,
102
- disableChildrenFiltering: props.disableChildrenFiltering
102
+ disableChildrenFiltering: props.disableChildrenFiltering,
103
+ filterModel: params.filterModel
103
104
  });
104
105
  }, [apiRef, props.disableChildrenFiltering]);
105
106
  const sortRows = React.useCallback(params => {
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.15.1
1
+ /** @license MUI v5.15.2
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -822,7 +822,7 @@ DataGridProRaw.propTypes = {
822
822
  * @param {GridState} state The new state.
823
823
  * @param {MuiEvent<{}>} event The event object.
824
824
  * @param {GridCallbackDetails} details Additional details for this callback.
825
- * @internal
825
+ * @ignore - do not document.
826
826
  */
827
827
  onStateChange: PropTypes.func,
828
828
 
@@ -1,3 +1,4 @@
1
+ import { passFilterLogic } from '@mui/x-data-grid/internals';
1
2
  export var TREE_DATA_STRATEGY = 'tree-data';
2
3
  /**
3
4
  * A node is visible if one of the following criteria is met:
@@ -21,10 +22,14 @@ export var filterRowTreeFromTreeData = function filterRowTreeFromTreeData(params
21
22
 
22
23
  if (shouldSkipFilters) {
23
24
  isMatchingFilters = null;
24
- } else if (!isRowMatchingFilters) {
25
+ } else if (!isRowMatchingFilters || node.position === 'footer') {
25
26
  isMatchingFilters = true;
26
27
  } else {
27
- isMatchingFilters = isRowMatchingFilters(node.id);
28
+ var _isRowMatchingFilters = isRowMatchingFilters(node.id),
29
+ passingFilterItems = _isRowMatchingFilters.passingFilterItems,
30
+ passingQuickFilterValues = _isRowMatchingFilters.passingQuickFilterValues;
31
+
32
+ isMatchingFilters = passFilterLogic([passingFilterItems], [passingQuickFilterValues], params.filterModel);
28
33
  }
29
34
 
30
35
  var filteredDescendantCount = 0;
@@ -114,7 +114,8 @@ export var useGridTreeDataPreProcessors = function useGridTreeDataPreProcessors(
114
114
  return filterRowTreeFromTreeData({
115
115
  rowTree: rowTree,
116
116
  isRowMatchingFilters: params.isRowMatchingFilters,
117
- disableChildrenFiltering: props.disableChildrenFiltering
117
+ disableChildrenFiltering: props.disableChildrenFiltering,
118
+ filterModel: params.filterModel
118
119
  });
119
120
  }, [apiRef, props.disableChildrenFiltering]);
120
121
  var sortRows = React.useCallback(function (params) {
package/legacy/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.15.1
1
+ /** @license MUI v5.15.2
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export var getReleaseInfo = function getReleaseInfo() {
3
- var releaseInfo = "MTY1OTU2NDAwMDAwMA==";
3
+ var releaseInfo = "MTY2MDE2NTIwMDAwMA==";
4
4
 
5
5
  if (process.env.NODE_ENV !== 'production') {
6
6
  // A simple hack to set the value in the test environment (has no build step).
@@ -822,7 +822,7 @@ DataGridProRaw.propTypes = {
822
822
  * @param {GridState} state The new state.
823
823
  * @param {MuiEvent<{}>} event The event object.
824
824
  * @param {GridCallbackDetails} details Additional details for this callback.
825
- * @internal
825
+ * @ignore - do not document.
826
826
  */
827
827
  onStateChange: PropTypes.func,
828
828
 
@@ -1,3 +1,4 @@
1
+ import { passFilterLogic } from '@mui/x-data-grid/internals';
1
2
  export const TREE_DATA_STRATEGY = 'tree-data';
2
3
  /**
3
4
  * A node is visible if one of the following criteria is met:
@@ -21,10 +22,14 @@ export const filterRowTreeFromTreeData = params => {
21
22
 
22
23
  if (shouldSkipFilters) {
23
24
  isMatchingFilters = null;
24
- } else if (!isRowMatchingFilters) {
25
+ } else if (!isRowMatchingFilters || node.position === 'footer') {
25
26
  isMatchingFilters = true;
26
27
  } else {
27
- isMatchingFilters = isRowMatchingFilters(node.id);
28
+ const {
29
+ passingFilterItems,
30
+ passingQuickFilterValues
31
+ } = isRowMatchingFilters(node.id);
32
+ isMatchingFilters = passFilterLogic([passingFilterItems], [passingQuickFilterValues], params.filterModel);
28
33
  }
29
34
 
30
35
  let filteredDescendantCount = 0;
@@ -97,7 +97,8 @@ export const useGridTreeDataPreProcessors = (apiRef, props) => {
97
97
  return filterRowTreeFromTreeData({
98
98
  rowTree,
99
99
  isRowMatchingFilters: params.isRowMatchingFilters,
100
- disableChildrenFiltering: props.disableChildrenFiltering
100
+ disableChildrenFiltering: props.disableChildrenFiltering,
101
+ filterModel: params.filterModel
101
102
  });
102
103
  }, [apiRef, props.disableChildrenFiltering]);
103
104
  const sortRows = React.useCallback(params => {
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.15.1
1
+ /** @license MUI v5.15.2
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTY1OTU2NDAwMDAwMA==";
3
+ const releaseInfo = "MTY2MDE2NTIwMDAwMA==";
4
4
 
5
5
  if (process.env.NODE_ENV !== 'production') {
6
6
  // A simple hack to set the value in the test environment (has no build step).
@@ -846,7 +846,7 @@ DataGridProRaw.propTypes = {
846
846
  * @param {GridState} state The new state.
847
847
  * @param {MuiEvent<{}>} event The event object.
848
848
  * @param {GridCallbackDetails} details Additional details for this callback.
849
- * @internal
849
+ * @ignore - do not document.
850
850
  */
851
851
  onStateChange: _propTypes.default.func,
852
852
 
@@ -4,6 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.filterRowTreeFromTreeData = exports.TREE_DATA_STRATEGY = void 0;
7
+
8
+ var _internals = require("@mui/x-data-grid/internals");
9
+
7
10
  const TREE_DATA_STRATEGY = 'tree-data';
8
11
  /**
9
12
  * A node is visible if one of the following criteria is met:
@@ -31,10 +34,14 @@ const filterRowTreeFromTreeData = params => {
31
34
 
32
35
  if (shouldSkipFilters) {
33
36
  isMatchingFilters = null;
34
- } else if (!isRowMatchingFilters) {
37
+ } else if (!isRowMatchingFilters || node.position === 'footer') {
35
38
  isMatchingFilters = true;
36
39
  } else {
37
- isMatchingFilters = isRowMatchingFilters(node.id);
40
+ const {
41
+ passingFilterItems,
42
+ passingQuickFilterValues
43
+ } = isRowMatchingFilters(node.id);
44
+ isMatchingFilters = (0, _internals.passFilterLogic)([passingFilterItems], [passingQuickFilterValues], params.filterModel);
38
45
  }
39
46
 
40
47
  let filteredDescendantCount = 0;
@@ -123,7 +123,8 @@ const useGridTreeDataPreProcessors = (apiRef, props) => {
123
123
  return (0, _gridTreeDataUtils.filterRowTreeFromTreeData)({
124
124
  rowTree,
125
125
  isRowMatchingFilters: params.isRowMatchingFilters,
126
- disableChildrenFiltering: props.disableChildrenFiltering
126
+ disableChildrenFiltering: props.disableChildrenFiltering,
127
+ filterModel: params.filterModel
127
128
  });
128
129
  }, [apiRef, props.disableChildrenFiltering]);
129
130
  const sortRows = React.useCallback(params => {
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.15.1
1
+ /** @license MUI v5.15.2
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -8,7 +8,7 @@ exports.getReleaseInfo = void 0;
8
8
  var _utils = require("@mui/utils");
9
9
 
10
10
  const getReleaseInfo = () => {
11
- const releaseInfo = "MTY1OTU2NDAwMDAwMA==";
11
+ const releaseInfo = "MTY2MDE2NTIwMDAwMA==";
12
12
 
13
13
  if (process.env.NODE_ENV !== 'production') {
14
14
  // A simple hack to set the value in the test environment (has no build step).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-pro",
3
- "version": "5.15.1",
3
+ "version": "5.15.2",
4
4
  "description": "The Pro plan edition of the data grid component (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -33,7 +33,7 @@
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.18.6",
35
35
  "@mui/utils": "^5.4.1",
36
- "@mui/x-data-grid": "5.15.1",
36
+ "@mui/x-data-grid": "5.15.2",
37
37
  "@mui/x-license-pro": "5.15.0",
38
38
  "@types/format-util": "^1.0.2",
39
39
  "clsx": "^1.2.1",
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTY1OTU2NDAwMDAwMA==";
3
+ const releaseInfo = "MTY2MDE2NTIwMDAwMA==";
4
4
 
5
5
  if (process.env.NODE_ENV !== 'production') {
6
6
  // A simple hack to set the value in the test environment (has no build step).