@mui/x-data-grid-pro 7.13.0 → 7.14.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 CHANGED
@@ -3,6 +3,86 @@
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
+ ## 7.14.0
7
+
8
+ _Aug 23, 2024_
9
+
10
+ We'd like to offer a big thanks to the 14 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 💫 Allow [filtering the axis on zoom](https://mui.com/x/react-charts/zoom-and-pan/#zoom-filtering), making the axis adapt by removing values outside the view.
13
+
14
+ <img width="600" src="https://github.com/user-attachments/assets/e65bbd00-d2a8-4136-81cd-3598f1373c16" alt="filtering the axis on zoom" />
15
+
16
+ - 📊 Improve bar chart performances
17
+ - 🌍 Improve Czech (cs-CZ) and Hebrew (he-IL) locales on the Data Grid
18
+ - 🌍 Improve Chinese (zh-HK), Hebrew (he-IL), and Vietnamese (vi-VN) locales on the Date and Time Pickers
19
+ - 🐞 Bugfixes
20
+
21
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
22
+
23
+ ### Data Grid
24
+
25
+ #### `@mui/x-data-grid@7.14.0`
26
+
27
+ - [DataGrid] Use readonly array result for `getTreeDataPath` (#11743) @pcorpet
28
+ - [DataGrid] Use `event.key` for `Tab` and `Escape` keys (#14170) @k-rajat19
29
+ - [DataGrid] Introduce selectors with arguments (#14236) @MBilalShafi
30
+ - [DataGrid] include `api` in `gridCellParams` interface (#14201) @k-rajat19
31
+ - [l10n] Improve Czech (cs-CZ) locale (#14135) @chirimiri22
32
+ - [l10n] Improve Hebrew (he-IL) locale (#14287) @rotembarsela
33
+
34
+ #### `@mui/x-data-grid-pro@7.14.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
35
+
36
+ Same changes as in `@mui/x-data-grid@7.14.0`.
37
+
38
+ #### `@mui/x-data-grid-premium@7.14.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
39
+
40
+ Same changes as in `@mui/x-data-grid-pro@7.14.0`, plus:
41
+
42
+ - [DataGridPremium] Fix clipboard paste not working for a single cell on non-first page (#14261) @arminmeh
43
+ - [DataGridPremium] Fix `onCellSelectionModelChange` not triggered when additional cell range is selected (#14199) @arminmeh
44
+
45
+ ### Date and Time Pickers
46
+
47
+ #### `@mui/x-date-pickers@7.14.0`
48
+
49
+ - [l10n] Improve Chinese (zh-HK) locale (#13289) @yeeharn
50
+ - [l10n] Improve Hebrew (he-IL) locale (#14287) @rotembarsela
51
+ - [l10n] Improve Vietnamese (vi-VN) locale (#14238) @locnbk2002
52
+ - [TimePicker] Handle `Space` and `Enter` on the `TimeClock` component @arthurbalduini
53
+
54
+ #### `@mui/x-date-pickers-pro@7.14.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
55
+
56
+ Same changes as in `@mui/x-date-pickers@7.14.0`.
57
+
58
+ ### Charts
59
+
60
+ #### `@mui/x-charts@7.14.0`
61
+
62
+ - [charts] Fix grid overflow with zooming (#14280) @alexfauquette
63
+ - [charts] Improve bar chart performances (#14278) @alexfauquette
64
+ - [charts] Test pointer events (#14042) @alexfauquette
65
+ - [charts] Use `isPointInside` function for both graphs and axis (#14222) @JCQuintas
66
+
67
+ #### `@mui/x-charts-pro@7.0.0-alpha.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
68
+
69
+ Same changes as in `@mui/x-charts@7.14.0`, plus:
70
+
71
+ - [charts-pro] Zoom axis filtering (#14121) @JCQuintas
72
+
73
+ ### Docs
74
+
75
+ - [docs] Consistent use of UTC and timezones (#14250) @oliviertassinari
76
+ - [docs] Fix missing leading slashes in URLs (#14249) @oliviertassinari
77
+ - [docs] Dash usage revision on pickers pages (#14260) @arthurbalduini
78
+
79
+ ### Core
80
+
81
+ - [core] Follow JSDocs convention @oliviertassinari
82
+ - [core] Prepare for material v6 (#14143) @LukasTy
83
+ - [code-infra] Set up `eslint-plugin-testing-library` (#14232) @LukasTy
84
+ - [infra] Updated mui-x roadmap links with new project URL (#14271) @michelengelen
85
+
6
86
  ## 7.13.0
7
87
 
8
88
  _Aug 16, 2024_
@@ -58,7 +138,7 @@ Same changes as in `@mui/x-date-pickers@7.13.0`.
58
138
  - [charts] Rename `CartesianContextProvider` to `CartesianProvider` (#14102) @JCQuintas
59
139
  - [charts] Support axis with the same value for all data points (#14191) @alexfauquette
60
140
 
61
- #### `@mui/x-date-charts-pro@7.0.0-alpha.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
141
+ #### `@mui/x-charts-pro@7.0.0-alpha.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
62
142
 
63
143
  Same changes as in `@mui/x-charts@7.13.0`.
64
144
 
@@ -132,7 +212,7 @@ Same changes as in `@mui/x-date-pickers@7.12.1`.
132
212
  - [charts] Fix charts vendor publish config (#14073) @JCQuintas
133
213
  - [charts] Move `plugins` to `PluginProvider` (#14056) @JCQuintas
134
214
 
135
- #### `@mui/x-date-charts-pro@7.0.0-alpha.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
215
+ #### `@mui/x-charts-pro@7.0.0-alpha.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
136
216
 
137
217
  Same changes as in `@mui/x-charts@7.12.1`, plus:
138
218
 
@@ -11,9 +11,11 @@ var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"
11
11
  var _Box = _interopRequireDefault(require("@mui/material/Box"));
12
12
  var _Badge = _interopRequireDefault(require("@mui/material/Badge"));
13
13
  var _xDataGrid = require("@mui/x-data-grid");
14
+ var _internals = require("@mui/x-data-grid/internals");
14
15
  var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularProgress"));
15
16
  var _useGridRootProps = require("../hooks/utils/useGridRootProps");
16
17
  var _useGridPrivateApiContext = require("../hooks/utils/useGridPrivateApiContext");
18
+ var _gridDataSourceSelector = require("../hooks/features/dataSource/gridDataSourceSelector");
17
19
  var _jsxRuntime = require("react/jsx-runtime");
18
20
  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); }
19
21
  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; }
@@ -38,10 +40,8 @@ function GridTreeDataGroupingCellIcon(props) {
38
40
  field,
39
41
  descendantCount
40
42
  } = props;
41
- const loadingSelector = state => state.dataSource.loading[id] ?? false;
42
- const errorSelector = state => state.dataSource.errors[id];
43
- const isDataLoading = (0, _xDataGrid.useGridSelector)(apiRef, loadingSelector);
44
- const error = (0, _xDataGrid.useGridSelector)(apiRef, errorSelector);
43
+ const isDataLoading = (0, _internals.useGridSelectorV8)(apiRef, _gridDataSourceSelector.gridDataSourceLoadingIdSelector, id);
44
+ const error = (0, _internals.useGridSelectorV8)(apiRef, _gridDataSourceSelector.gridDataSourceErrorSelector, id);
45
45
  const handleClick = event => {
46
46
  if (!rowNode.childrenExpanded) {
47
47
  // always fetch/get from cache the children when the node is expanded
@@ -4,9 +4,11 @@ import composeClasses from '@mui/utils/composeClasses';
4
4
  import Box from '@mui/material/Box';
5
5
  import Badge from '@mui/material/Badge';
6
6
  import { getDataGridUtilityClass, useGridSelector } from '@mui/x-data-grid';
7
+ import { useGridSelectorV8 } from '@mui/x-data-grid/internals';
7
8
  import CircularProgress from '@mui/material/CircularProgress';
8
9
  import { useGridRootProps } from '../hooks/utils/useGridRootProps';
9
10
  import { useGridPrivateApiContext } from '../hooks/utils/useGridPrivateApiContext';
11
+ import { gridDataSourceErrorSelector, gridDataSourceLoadingIdSelector } from '../hooks/features/dataSource/gridDataSourceSelector';
10
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
13
  const useUtilityClasses = ownerState => {
12
14
  const {
@@ -29,10 +31,8 @@ function GridTreeDataGroupingCellIcon(props) {
29
31
  field,
30
32
  descendantCount
31
33
  } = props;
32
- const loadingSelector = state => state.dataSource.loading[id] ?? false;
33
- const errorSelector = state => state.dataSource.errors[id];
34
- const isDataLoading = useGridSelector(apiRef, loadingSelector);
35
- const error = useGridSelector(apiRef, errorSelector);
34
+ const isDataLoading = useGridSelectorV8(apiRef, gridDataSourceLoadingIdSelector, id);
35
+ const error = useGridSelectorV8(apiRef, gridDataSourceErrorSelector, id);
36
36
  const handleClick = event => {
37
37
  if (!rowNode.childrenExpanded) {
38
38
  // always fetch/get from cache the children when the node is expanded
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { gridFilterModelSelector, gridSortModelSelector, gridPaginationModelSelector } from '@mui/x-data-grid';
3
- import { createSelector } from '@mui/x-data-grid/internals';
3
+ import { createSelector, createSelectorV8 } from '@mui/x-data-grid/internals';
4
4
  const computeStartEnd = paginationModel => {
5
5
  const start = paginationModel.page * paginationModel.pageSize;
6
6
  const end = start + paginationModel.pageSize - 1;
@@ -21,4 +21,6 @@ export const gridGetRowsParamsSelector = createSelector(gridFilterModelSelector,
21
21
  });
22
22
  export const gridDataSourceStateSelector = state => state.dataSource;
23
23
  export const gridDataSourceLoadingSelector = createSelector(gridDataSourceStateSelector, dataSource => dataSource.loading);
24
- export const gridDataSourceErrorsSelector = createSelector(gridDataSourceStateSelector, dataSource => dataSource.errors);
24
+ export const gridDataSourceLoadingIdSelector = createSelectorV8(gridDataSourceStateSelector, (dataSource, id) => dataSource.loading[id] ?? false);
25
+ export const gridDataSourceErrorsSelector = createSelector(gridDataSourceStateSelector, dataSource => dataSource.errors);
26
+ export const gridDataSourceErrorSelector = createSelectorV8(gridDataSourceStateSelector, (dataSource, id) => dataSource.errors[id]);
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTcyMzc1NTYwMDAwMA==";
3
+ const releaseInfo = "MTcyNDM2MDQwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat
@@ -1,4 +1,4 @@
1
- import { GridPaginationModel } from '@mui/x-data-grid';
1
+ import { GridPaginationModel, GridRowId } from '@mui/x-data-grid';
2
2
  import { GridStatePro } from '../../../models/gridStatePro';
3
3
  export declare const gridGetRowsParamsSelector: import("@mui/x-data-grid").OutputSelector<import("@mui/x-data-grid/models/gridStateCommunity").GridStateCommunity, {
4
4
  start: number;
@@ -10,5 +10,7 @@ export declare const gridGetRowsParamsSelector: import("@mui/x-data-grid").Outpu
10
10
  filterModel: import("@mui/x-data-grid").GridFilterModel;
11
11
  }>;
12
12
  export declare const gridDataSourceStateSelector: (state: GridStatePro) => import("./interfaces").GridDataSourceState;
13
- export declare const gridDataSourceLoadingSelector: import("@mui/x-data-grid").OutputSelector<GridStatePro, Record<import("@mui/x-data-grid").GridRowId, boolean>>;
14
- export declare const gridDataSourceErrorsSelector: import("@mui/x-data-grid").OutputSelector<GridStatePro, Record<import("@mui/x-data-grid").GridRowId, any>>;
13
+ export declare const gridDataSourceLoadingSelector: import("@mui/x-data-grid").OutputSelector<GridStatePro, Record<GridRowId, boolean>>;
14
+ export declare const gridDataSourceLoadingIdSelector: import("@mui/x-data-grid/utils/createSelector").OutputSelectorV8<GridStatePro, GridRowId, boolean>;
15
+ export declare const gridDataSourceErrorsSelector: import("@mui/x-data-grid").OutputSelector<GridStatePro, Record<GridRowId, any>>;
16
+ export declare const gridDataSourceErrorSelector: import("@mui/x-data-grid/utils/createSelector").OutputSelectorV8<GridStatePro, GridRowId, any>;
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.gridGetRowsParamsSelector = exports.gridDataSourceStateSelector = exports.gridDataSourceLoadingSelector = exports.gridDataSourceErrorsSelector = void 0;
7
+ exports.gridGetRowsParamsSelector = exports.gridDataSourceStateSelector = exports.gridDataSourceLoadingSelector = exports.gridDataSourceLoadingIdSelector = exports.gridDataSourceErrorsSelector = exports.gridDataSourceErrorSelector = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _xDataGrid = require("@mui/x-data-grid");
10
10
  var _internals = require("@mui/x-data-grid/internals");
@@ -29,4 +29,6 @@ const gridGetRowsParamsSelector = exports.gridGetRowsParamsSelector = (0, _inter
29
29
  const gridDataSourceStateSelector = state => state.dataSource;
30
30
  exports.gridDataSourceStateSelector = gridDataSourceStateSelector;
31
31
  const gridDataSourceLoadingSelector = exports.gridDataSourceLoadingSelector = (0, _internals.createSelector)(gridDataSourceStateSelector, dataSource => dataSource.loading);
32
- const gridDataSourceErrorsSelector = exports.gridDataSourceErrorsSelector = (0, _internals.createSelector)(gridDataSourceStateSelector, dataSource => dataSource.errors);
32
+ const gridDataSourceLoadingIdSelector = exports.gridDataSourceLoadingIdSelector = (0, _internals.createSelectorV8)(gridDataSourceStateSelector, (dataSource, id) => dataSource.loading[id] ?? false);
33
+ const gridDataSourceErrorsSelector = exports.gridDataSourceErrorsSelector = (0, _internals.createSelector)(gridDataSourceStateSelector, dataSource => dataSource.errors);
34
+ const gridDataSourceErrorSelector = exports.gridDataSourceErrorSelector = (0, _internals.createSelectorV8)(gridDataSourceStateSelector, (dataSource, id) => dataSource.errors[id]);
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v7.13.0
2
+ * @mui/x-data-grid-pro v7.14.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -112,7 +112,7 @@ interface DataGridProRegularProps<R extends GridValidRowModel> {
112
112
  * @param {R} row The row from which we want the path.
113
113
  * @returns {string[]} The path to the row.
114
114
  */
115
- getTreeDataPath?: (row: R) => string[];
115
+ getTreeDataPath?: (row: R) => readonly string[];
116
116
  }
117
117
  export interface DataGridProPropsWithoutDefaultValue<R extends GridValidRowModel = any> extends Omit<DataGridPropsWithoutDefaultValue<R>, 'initialState' | 'componentsProps' | 'slotProps'>, DataGridProRegularProps<R>, DataGridProDataSourceProps, DataGridProSharedPropsWithoutDefaultValue {
118
118
  /**
@@ -4,9 +4,11 @@ import composeClasses from '@mui/utils/composeClasses';
4
4
  import Box from '@mui/material/Box';
5
5
  import Badge from '@mui/material/Badge';
6
6
  import { getDataGridUtilityClass, useGridSelector } from '@mui/x-data-grid';
7
+ import { useGridSelectorV8 } from '@mui/x-data-grid/internals';
7
8
  import CircularProgress from '@mui/material/CircularProgress';
8
9
  import { useGridRootProps } from '../hooks/utils/useGridRootProps';
9
10
  import { useGridPrivateApiContext } from '../hooks/utils/useGridPrivateApiContext';
11
+ import { gridDataSourceErrorSelector, gridDataSourceLoadingIdSelector } from '../hooks/features/dataSource/gridDataSourceSelector';
10
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
13
  const useUtilityClasses = ownerState => {
12
14
  const {
@@ -29,10 +31,8 @@ function GridTreeDataGroupingCellIcon(props) {
29
31
  field,
30
32
  descendantCount
31
33
  } = props;
32
- const loadingSelector = state => state.dataSource.loading[id] ?? false;
33
- const errorSelector = state => state.dataSource.errors[id];
34
- const isDataLoading = useGridSelector(apiRef, loadingSelector);
35
- const error = useGridSelector(apiRef, errorSelector);
34
+ const isDataLoading = useGridSelectorV8(apiRef, gridDataSourceLoadingIdSelector, id);
35
+ const error = useGridSelectorV8(apiRef, gridDataSourceErrorSelector, id);
36
36
  const handleClick = event => {
37
37
  if (!rowNode.childrenExpanded) {
38
38
  // always fetch/get from cache the children when the node is expanded
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { gridFilterModelSelector, gridSortModelSelector, gridPaginationModelSelector } from '@mui/x-data-grid';
3
- import { createSelector } from '@mui/x-data-grid/internals';
3
+ import { createSelector, createSelectorV8 } from '@mui/x-data-grid/internals';
4
4
  const computeStartEnd = paginationModel => {
5
5
  const start = paginationModel.page * paginationModel.pageSize;
6
6
  const end = start + paginationModel.pageSize - 1;
@@ -21,4 +21,6 @@ export const gridGetRowsParamsSelector = createSelector(gridFilterModelSelector,
21
21
  });
22
22
  export const gridDataSourceStateSelector = state => state.dataSource;
23
23
  export const gridDataSourceLoadingSelector = createSelector(gridDataSourceStateSelector, dataSource => dataSource.loading);
24
- export const gridDataSourceErrorsSelector = createSelector(gridDataSourceStateSelector, dataSource => dataSource.errors);
24
+ export const gridDataSourceLoadingIdSelector = createSelectorV8(gridDataSourceStateSelector, (dataSource, id) => dataSource.loading[id] ?? false);
25
+ export const gridDataSourceErrorsSelector = createSelector(gridDataSourceStateSelector, dataSource => dataSource.errors);
26
+ export const gridDataSourceErrorSelector = createSelectorV8(gridDataSourceStateSelector, (dataSource, id) => dataSource.errors[id]);
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v7.13.0
2
+ * @mui/x-data-grid-pro v7.14.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTcyMzc1NTYwMDAwMA==";
3
+ const releaseInfo = "MTcyNDM2MDQwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-pro",
3
- "version": "7.13.0",
3
+ "version": "7.14.0",
4
4
  "description": "The Pro plan edition of the Data Grid components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./index.js",
@@ -34,15 +34,15 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@babel/runtime": "^7.25.0",
37
- "@mui/system": "^5.16.5",
38
- "@mui/utils": "^5.16.5",
37
+ "@mui/system": "^5.16.7",
38
+ "@mui/utils": "^5.16.6",
39
39
  "@types/format-util": "^1.0.4",
40
40
  "clsx": "^2.1.1",
41
41
  "prop-types": "^15.8.1",
42
42
  "reselect": "^4.1.8",
43
- "@mui/x-data-grid": "7.13.0",
44
- "@mui/x-internals": "7.13.0",
45
- "@mui/x-license": "7.13.0"
43
+ "@mui/x-data-grid": "7.14.0",
44
+ "@mui/x-internals": "7.14.0",
45
+ "@mui/x-license": "7.14.0"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "@emotion/react": "^11.9.0",
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getReleaseInfo = void 0;
7
7
  var _utils = require("@mui/utils");
8
8
  const getReleaseInfo = () => {
9
- const releaseInfo = "MTcyMzc1NTYwMDAwMA==";
9
+ const releaseInfo = "MTcyNDM2MDQwMDAwMA==";
10
10
  if (process.env.NODE_ENV !== 'production') {
11
11
  // A simple hack to set the value in the test environment (has no build step).
12
12
  // eslint-disable-next-line no-useless-concat