@mui/x-data-grid-pro 6.17.0 → 6.18.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,67 @@
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
+ ## 6.18.0
7
+
8
+ _Nov 3, 2023_
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
+ - 🎁 The Charts package is now officially stable!
13
+ - 🥧 Pie charts are now animated.
14
+ - 📈 Line charts now support partial data, and can interpolate missing data.
15
+
16
+ <img width="380" alt="line charts with partial data" src="https://github.com/mui/mui-x/assets/45398769/385ecf77-19b2-4a03-8aef-5d547db1d9ad">
17
+
18
+ - ✨ Allow to ignore [diacritics](https://en.wikipedia.org/wiki/Diacritic) when filtering
19
+ - 📚 Documentation improvements
20
+
21
+ ### Data Grid
22
+
23
+ #### `@mui/x-data-grid@6.18.0`
24
+
25
+ - [DataGrid] Allow to ignore [diacritics](https://en.wikipedia.org/wiki/Diacritic) when filtering (#10569) @cherniavskii
26
+ - [DataGrid] Fix a typo in `gridFilterApi` (#10786) @vu-dao-93
27
+ - [DataGrid] Fix `undefined` row id (#10670) @romgrk
28
+ - [DataGrid] Make column autosizing work with dynamic row height (#10693) @cherniavskii
29
+ - [l10n] Allow to customize sorting label per column (#10839) @JerryWu1234
30
+
31
+ #### `@mui/x-data-grid-pro@6.18.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
32
+
33
+ Same changes as in `@mui/x-data-grid@6.18.0`.
34
+
35
+ #### `@mui/x-data-grid-premium@6.18.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
36
+
37
+ Same changes as in `@mui/x-data-grid-pro@6.18.0`.
38
+
39
+ ### Date Pickers
40
+
41
+ #### `@mui/x-date-pickers@6.18.0`
42
+
43
+ - [pickers] Add reference links to calendar components (#10644) @michelengelen
44
+
45
+ #### `@mui/x-date-pickers-pro@6.18.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
46
+
47
+ Same changes as in `@mui/x-date-pickers@6.18.0`.
48
+
49
+ ### Charts / `@mui/x-charts@6.18.0`
50
+
51
+ - [charts] Add animation on pie chart (#10782) @alexfauquette
52
+ - [charts] Add reference links to shared/misc chart components (#10660) @michelengelen
53
+ - [charts] Allows to connect nulls (#10803) @alexfauquette
54
+ - [charts] Fix axis highlight in dark mode (#10820) @LukasTy
55
+
56
+ ### Docs
57
+
58
+ - [docs] Add a data grid recipe for autosizing columns after fetching row-data (#10822) @michelengelen
59
+ - [docs] Add a data grid recipe showing how to remove cell outline on `focus` (#10843) @michelengelen
60
+ - [docs] Add demo about how to use charts margin (#10886) @alexfauquette
61
+ - [docs] Improve custom field input demos readability (#10559) @LukasTy
62
+
63
+ ### Core
64
+
65
+ - [core] Generate `slot` API descriptions based on `slots` or `components` (#10879) @LukasTy
66
+
6
67
  ## 6.17.0
7
68
 
8
69
  _Oct 27, 2023_
@@ -390,6 +390,12 @@ DataGridProRaw.propTypes = {
390
390
  * @default false
391
391
  */
392
392
  hideFooterSelectedRowCount: PropTypes.bool,
393
+ /**
394
+ * If `true`, the diacritics (accents) are ignored when filtering or quick filtering.
395
+ * E.g. when filter value is `cafe`, the rows with `café` will be visible.
396
+ * @default false
397
+ */
398
+ ignoreDiacritics: PropTypes.bool,
393
399
  /**
394
400
  * The initial state of the DataGridPro.
395
401
  * The data in it will be set in the state on initialization but will not be controlled.
@@ -134,13 +134,7 @@ function extractColumnWidths(apiRef, options, columns) {
134
134
  columns.forEach(column => {
135
135
  const cells = findGridCells(apiRef.current, column.field);
136
136
  const widths = cells.map(cell => {
137
- var _getAttribute, _cell$firstElementChi, _cell$firstElementChi2;
138
- const id = (_getAttribute = cell.parentElement.getAttribute('data-id')) != null ? _getAttribute : '';
139
- const hasAutoHeight = apiRef.current.rowHasAutoHeight(id);
140
- if (hasAutoHeight) {
141
- var _computedWidth;
142
- return (_computedWidth = column.computedWidth) != null ? _computedWidth : column.width;
143
- }
137
+ var _cell$firstElementChi, _cell$firstElementChi2;
144
138
  const style = window.getComputedStyle(cell, null);
145
139
  const paddingWidth = parseInt(style.paddingLeft, 10) + parseInt(style.paddingRight, 10);
146
140
  const contentWidth = (_cell$firstElementChi = (_cell$firstElementChi2 = cell.firstElementChild) == null ? void 0 : _cell$firstElementChi2.getBoundingClientRect().width) != null ? _cell$firstElementChi : 0;
@@ -1,12 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  import { GridRowTreeConfig, GridFilterState, GridFilterModel } from '@mui/x-data-grid';
3
- import { GridAggregatedFilterItemApplier, GridApiCommunity } from '@mui/x-data-grid/internals';
3
+ import { GridAggregatedFilterItemApplier } from '@mui/x-data-grid/internals';
4
+ import type { GridPrivateApiPro } from '../../../models/gridApiPro';
4
5
  interface FilterRowTreeFromTreeDataParams {
5
6
  rowTree: GridRowTreeConfig;
6
7
  disableChildrenFiltering: boolean;
7
8
  isRowMatchingFilters: GridAggregatedFilterItemApplier | null;
8
9
  filterModel: GridFilterModel;
9
- apiRef: React.MutableRefObject<GridApiCommunity>;
10
+ apiRef: React.MutableRefObject<GridPrivateApiPro>;
10
11
  }
11
12
  export declare const TREE_DATA_STRATEGY = "tree-data";
12
13
  /**
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v6.17.0
2
+ * @mui/x-data-grid-pro v6.18.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -390,6 +390,12 @@ DataGridProRaw.propTypes = {
390
390
  * @default false
391
391
  */
392
392
  hideFooterSelectedRowCount: PropTypes.bool,
393
+ /**
394
+ * If `true`, the diacritics (accents) are ignored when filtering or quick filtering.
395
+ * E.g. when filter value is `cafe`, the rows with `café` will be visible.
396
+ * @default false
397
+ */
398
+ ignoreDiacritics: PropTypes.bool,
393
399
  /**
394
400
  * The initial state of the DataGridPro.
395
401
  * The data in it will be set in the state on initialization but will not be controlled.
@@ -143,13 +143,7 @@ function extractColumnWidths(apiRef, options, columns) {
143
143
  columns.forEach(function (column) {
144
144
  var cells = findGridCells(apiRef.current, column.field);
145
145
  var widths = cells.map(function (cell) {
146
- var _getAttribute, _cell$firstElementChi, _cell$firstElementChi2;
147
- var id = (_getAttribute = cell.parentElement.getAttribute('data-id')) != null ? _getAttribute : '';
148
- var hasAutoHeight = apiRef.current.rowHasAutoHeight(id);
149
- if (hasAutoHeight) {
150
- var _computedWidth;
151
- return (_computedWidth = column.computedWidth) != null ? _computedWidth : column.width;
152
- }
146
+ var _cell$firstElementChi, _cell$firstElementChi2;
153
147
  var style = window.getComputedStyle(cell, null);
154
148
  var paddingWidth = parseInt(style.paddingLeft, 10) + parseInt(style.paddingRight, 10);
155
149
  var contentWidth = (_cell$firstElementChi = (_cell$firstElementChi2 = cell.firstElementChild) == null ? void 0 : _cell$firstElementChi2.getBoundingClientRect().width) != null ? _cell$firstElementChi : 0;
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v6.17.0
2
+ * @mui/x-data-grid-pro v6.18.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 var getReleaseInfo = function getReleaseInfo() {
3
- var releaseInfo = "MTY5ODM1NzYwMDAwMA==";
3
+ var releaseInfo = "MTY5ODk2NjAwMDAwMA==";
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
@@ -2,10 +2,11 @@ import { GridApiCommon, GridColumnReorderApi, GridRowMultiSelectionApi, GridRowP
2
2
  import { GridPrivateOnlyApiCommon } from '@mui/x-data-grid/internals';
3
3
  import { GridInitialStatePro, GridStatePro } from './gridStatePro';
4
4
  import type { GridColumnPinningApi, GridColumnResizeApi, GridDetailPanelApi, GridRowPinningApi, GridDetailPanelPrivateApi } from '../hooks';
5
+ import type { DataGridProProcessedProps } from './dataGridProProps';
5
6
  /**
6
7
  * The api of `DataGridPro`.
7
8
  */
8
9
  export interface GridApiPro extends GridApiCommon<GridStatePro, GridInitialStatePro>, GridRowProApi, GridColumnPinningApi, GridColumnResizeApi, GridDetailPanelApi, GridRowPinningApi, GridRowMultiSelectionApi, GridColumnReorderApi {
9
10
  }
10
- export interface GridPrivateApiPro extends GridApiPro, GridPrivateOnlyApiCommon<GridApiPro, GridPrivateApiPro>, GridDetailPanelPrivateApi {
11
+ export interface GridPrivateApiPro extends GridApiPro, GridPrivateOnlyApiCommon<GridApiPro, GridPrivateApiPro, DataGridProProcessedProps>, GridDetailPanelPrivateApi {
11
12
  }
@@ -390,6 +390,12 @@ DataGridProRaw.propTypes = {
390
390
  * @default false
391
391
  */
392
392
  hideFooterSelectedRowCount: PropTypes.bool,
393
+ /**
394
+ * If `true`, the diacritics (accents) are ignored when filtering or quick filtering.
395
+ * E.g. when filter value is `cafe`, the rows with `café` will be visible.
396
+ * @default false
397
+ */
398
+ ignoreDiacritics: PropTypes.bool,
393
399
  /**
394
400
  * The initial state of the DataGridPro.
395
401
  * The data in it will be set in the state on initialization but will not be controlled.
@@ -134,11 +134,6 @@ function extractColumnWidths(apiRef, options, columns) {
134
134
  columns.forEach(column => {
135
135
  const cells = findGridCells(apiRef.current, column.field);
136
136
  const widths = cells.map(cell => {
137
- const id = cell.parentElement.getAttribute('data-id') ?? '';
138
- const hasAutoHeight = apiRef.current.rowHasAutoHeight(id);
139
- if (hasAutoHeight) {
140
- return column.computedWidth ?? column.width;
141
- }
142
137
  const style = window.getComputedStyle(cell, null);
143
138
  const paddingWidth = parseInt(style.paddingLeft, 10) + parseInt(style.paddingRight, 10);
144
139
  const contentWidth = cell.firstElementChild?.getBoundingClientRect().width ?? 0;
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v6.17.0
2
+ * @mui/x-data-grid-pro v6.18.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 = "MTY5ODM1NzYwMDAwMA==";
3
+ const releaseInfo = "MTY5ODk2NjAwMDAwMA==";
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
@@ -398,6 +398,12 @@ DataGridProRaw.propTypes = {
398
398
  * @default false
399
399
  */
400
400
  hideFooterSelectedRowCount: _propTypes.default.bool,
401
+ /**
402
+ * If `true`, the diacritics (accents) are ignored when filtering or quick filtering.
403
+ * E.g. when filter value is `cafe`, the rows with `café` will be visible.
404
+ * @default false
405
+ */
406
+ ignoreDiacritics: _propTypes.default.bool,
401
407
  /**
402
408
  * The initial state of the DataGridPro.
403
409
  * The data in it will be set in the state on initialization but will not be controlled.
@@ -143,11 +143,6 @@ function extractColumnWidths(apiRef, options, columns) {
143
143
  columns.forEach(column => {
144
144
  const cells = (0, _domUtils.findGridCells)(apiRef.current, column.field);
145
145
  const widths = cells.map(cell => {
146
- const id = cell.parentElement.getAttribute('data-id') ?? '';
147
- const hasAutoHeight = apiRef.current.rowHasAutoHeight(id);
148
- if (hasAutoHeight) {
149
- return column.computedWidth ?? column.width;
150
- }
151
146
  const style = window.getComputedStyle(cell, null);
152
147
  const paddingWidth = parseInt(style.paddingLeft, 10) + parseInt(style.paddingRight, 10);
153
148
  const contentWidth = cell.firstElementChild?.getBoundingClientRect().width ?? 0;
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v6.17.0
2
+ * @mui/x-data-grid-pro v6.18.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -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 = "MTY5ODM1NzYwMDAwMA==";
9
+ const releaseInfo = "MTY5ODk2NjAwMDAwMA==";
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-pro",
3
- "version": "6.17.0",
3
+ "version": "6.18.0",
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",
@@ -32,8 +32,8 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.23.2",
35
- "@mui/utils": "^5.14.14",
36
- "@mui/x-data-grid": "6.17.0",
35
+ "@mui/utils": "^5.14.16",
36
+ "@mui/x-data-grid": "6.18.0",
37
37
  "@mui/x-license-pro": "6.10.2",
38
38
  "@types/format-util": "^1.0.3",
39
39
  "clsx": "^2.0.0",
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTY5ODM1NzYwMDAwMA==";
3
+ const releaseInfo = "MTY5ODk2NjAwMDAwMA==";
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