@mui/x-data-grid-premium 6.13.0 → 6.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,83 @@
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.14.0
7
+
8
+ _Sep 14, 2023_
9
+
10
+ We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🎁 Fix `YearCalendar` and `MonthCalendar` accessibility (#10312) @LukasTy
13
+
14
+ The `YearCalendar` and `MonthCalendar` items role has been changed from `button` to `radio` in order to improve the component's a11y support.
15
+ If you were relying on the mentioned components having a `button` role for items, you will need to update your usage to expect a `radio` role instead.
16
+
17
+ - 🌍 Improve Japanese (ja-JP), Persian (fa-IR), and Vietnamese (vi-VN) locales on the data grid
18
+ - 🐞 Bugfixes
19
+ - 📚 Documentation improvements
20
+
21
+ ### Data Grid
22
+
23
+ #### `@mui/x-data-grid@6.14.0`
24
+
25
+ - [l10n] Improve Japanese (ja-JP) locale (#10299) @makoto14
26
+ - [l10n] Improve Persian (fa-IR) locale (#10277) @aminsaedi
27
+ - [l10n] Improve Vietnamese (vi-VN) locale (#10280) @khangnguyen2100
28
+
29
+ #### `@mui/x-data-grid-pro@6.14.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
30
+
31
+ Same changes as in `@mui/x-data-grid@6.14.0`.
32
+
33
+ #### `@mui/x-data-grid-premium@6.14.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
34
+
35
+ Same changes as in `@mui/x-data-grid-pro@6.14.0`, plus:
36
+
37
+ - [DataGridPremium] Fix clipboard import cutting off at 100 rows (#9930) @gitstart
38
+
39
+ ### Date Pickers
40
+
41
+ #### `@mui/x-date-pickers@6.14.0`
42
+
43
+ - [pickers] Fix `YearCalendar` and `MonthCalendar` a11y (#10312) @LukasTy
44
+ - [pickers] Localize `TimeClock` meridiem text (#10324) @LukasTy
45
+
46
+ #### `@mui/x-date-pickers-pro@6.14.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
47
+
48
+ Same changes as in `@mui/x-date-pickers@6.14.0`.
49
+
50
+ ### Charts / `@mui/x-charts@6.0.0-alpha.11`
51
+
52
+ - [charts] Add default `barGapRatio` and increase `categoryGapRatio` (#10317) @LukasTy
53
+ - [charts] Enable `eslint` on the package (#10330) @LukasTy
54
+
55
+ ### Tree View / `@mui/x-tree-view@6.0.0-alpha.3`
56
+
57
+ - [TreeView] Fix box-sizing dependency (#10255) @oliviertassinari
58
+
59
+ ### Docs
60
+
61
+ - [docs] Add conditional range picker props example (#10227) @LukasTy
62
+ - [docs] Add toolbar to the multi-filters demo (#10223) @MBilalShafi
63
+ - [docs] Avoid the use of "We" @oliviertassinari
64
+ - [docs] Clarify MUI vs. MUI Core difference @oliviertassinari
65
+ - [docs] Enable `ariaV7` flag for demos using `useDemoData` hook (#10204) @cherniavskii
66
+ - [docs] Fix Tree View link to API references (#10282) @oliviertassinari
67
+ - [docs] Fix image layout shift (#10313) @oliviertassinari
68
+ - [docs] Fix link to MUI X from readme logo @oliviertassinari
69
+ - [docs] Fix redirection to Base UI URLs @oliviertassinari
70
+ - [docs] Improve Tree View demos (#10268) @oliviertassinari
71
+ - [docs] Improve docs for ref type props (#10273) @michelengelen
72
+ - [docs] Improve npm package README (#10269) @oliviertassinari
73
+ - [docs] Improve the clarity of the npm links @oliviertassinari
74
+ - [docs] Keep installation readme simple @oliviertassinari
75
+ - [docs] Make each component feel more standalone @oliviertassinari
76
+
77
+ ### Core
78
+
79
+ - [core] Add types extension for clarity @oliviertassinari
80
+ - [core] Set logo height to fix layout shift in GitHub @oliviertassinari
81
+ - [core] TrapFocus was renamed to FocusTrap @oliviertassinari
82
+
6
83
  ## 6.13.0
7
84
 
8
85
  _Sep 8, 2023_
@@ -12,6 +89,7 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
12
89
  - 🎁 Fix `anchorRef` behavior on range pickers (#10077) @LukasTy
13
90
 
14
91
  The range picker popup will now be anchored to the first input element and left aligned like other pickers.
92
+
15
93
  - 🌍 Improve Slovak (sk-SK) locale on the data grid
16
94
  - 🐞 Bugfixes
17
95
  - 📚 Documentation improvements
@@ -1838,7 +1916,7 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
1838
1916
  #### Changes
1839
1917
 
1840
1918
  - [DataGrid] Add interface for `singleSelect` column (#7685) @m4theushw
1841
- - [DataGrid] Allow to pass props to the `TrapFocus` inside the panel wrapper (#7733) @ivek-Prajapatii
1919
+ - [DataGrid] Allow to pass props to the `FocusTrap` inside the panel wrapper (#7733) @ivek-Prajapatii
1842
1920
  - [DataGrid] Avoid unnecessary rerenders after `updateRows` (#7857) @cherniavskii
1843
1921
  - [DataGridPro] Change cursor when dragging a column (#7725) @sai6855
1844
1922
  - [DataGridPremium] Fix `leafField` to have correct focus value (#7950) @MBilalShafi
package/README.md CHANGED
@@ -1,18 +1,14 @@
1
- # @mui/x-data-grid-premium
1
+ # MUI X Data Grid Premium
2
2
 
3
3
  This package is the Premium plan edition of the data grid component.
4
- It's part of MUI X, an open core extension of MUI, with advanced components.
4
+ It's part of [MUI X](https://mui.com/x/), an open-core extension of MUI Core, with advanced components.
5
5
 
6
6
  ## Installation
7
7
 
8
8
  Install the package in your project directory with:
9
9
 
10
10
  ```bash
11
- // with npm
12
11
  npm install @mui/x-data-grid-premium
13
-
14
- // with yarn
15
- yarn add @mui/x-data-grid-premium
16
12
  ```
17
13
 
18
14
  This component has the following peer dependencies that you will need to install as well.
@@ -28,4 +24,4 @@ This component has the following peer dependencies that you will need to install
28
24
 
29
25
  ## Documentation
30
26
 
31
- [The documentation](https://mui.com/x/react-data-grid/)
27
+ Visit [https://mui.com/x/react-data-grid/](https://mui.com/x/react-data-grid/) to view the full documentation.
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
- import { GRID_CHECKBOX_SELECTION_FIELD, gridFocusCellSelector, gridVisibleColumnFieldsSelector, useGridApiOptionHandler, useGridApiEventHandler, gridPaginatedVisibleSortedGridRowIdsSelector } from '@mui/x-data-grid';
3
+ import { GRID_CHECKBOX_SELECTION_FIELD, gridFocusCellSelector, gridVisibleColumnFieldsSelector, useGridApiOptionHandler, useGridApiEventHandler, gridPaginatedVisibleSortedGridRowIdsSelector, gridExpandedSortedRowIdsSelector } from '@mui/x-data-grid';
4
4
  import { buildWarning, getRowIdFromRowModel, getActiveElement, useGridRegisterPipeProcessor } from '@mui/x-data-grid/internals';
5
5
  import { GRID_DETAIL_PANEL_TOGGLE_FIELD, GRID_REORDER_COL_DEF } from '@mui/x-data-grid-pro';
6
6
  import { unstable_debounce as debounce } from '@mui/utils';
@@ -156,7 +156,8 @@ class CellValueUpdater {
156
156
  function defaultPasteResolver({
157
157
  pastedData,
158
158
  apiRef,
159
- updateCell
159
+ updateCell,
160
+ pagination
160
161
  }) {
161
162
  const isSingleValuePasted = pastedData.length === 1 && pastedData[0].length === 1;
162
163
  const cellSelectionModel = apiRef.current.unstable_getCellSelectionModel();
@@ -220,7 +221,7 @@ function defaultPasteResolver({
220
221
  }
221
222
  const selectedRowId = selectedCell.id;
222
223
  const selectedRowIndex = apiRef.current.getRowIndexRelativeToVisibleRows(selectedRowId);
223
- const visibleRowIds = gridPaginatedVisibleSortedGridRowIdsSelector(apiRef);
224
+ const visibleRowIds = pagination ? gridPaginatedVisibleSortedGridRowIdsSelector(apiRef) : gridExpandedSortedRowIdsSelector(apiRef);
224
225
  const selectedFieldIndex = visibleColumnFields.indexOf(selectedCell.field);
225
226
  pastedData.forEach((rowData, index) => {
226
227
  const rowId = visibleRowIds[selectedRowIndex + index];
@@ -291,10 +292,11 @@ export const useGridClipboardImport = (apiRef, props) => {
291
292
  },
292
293
  updateCell: (...args) => {
293
294
  cellUpdater.updateCell(...args);
294
- }
295
+ },
296
+ pagination: props.pagination
295
297
  });
296
298
  cellUpdater.applyUpdates();
297
- }, [apiRef, processRowUpdate, onProcessRowUpdateError, getRowId, enableClipboardPaste, rootEl, splitClipboardPastedText]);
299
+ }, [apiRef, processRowUpdate, onProcessRowUpdateError, getRowId, enableClipboardPaste, rootEl, splitClipboardPastedText, props.pagination]);
298
300
  const checkIfCanStartEditing = React.useCallback((initialValue, {
299
301
  event
300
302
  }) => {
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v6.13.0
2
+ * @mui/x-data-grid-premium v6.14.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -4,7 +4,7 @@ import _createClass from "@babel/runtime/helpers/esm/createClass";
4
4
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
5
5
  import _regeneratorRuntime from "@babel/runtime/regenerator";
6
6
  import * as React from 'react';
7
- import { GRID_CHECKBOX_SELECTION_FIELD, gridFocusCellSelector, gridVisibleColumnFieldsSelector, useGridApiOptionHandler, useGridApiEventHandler, gridPaginatedVisibleSortedGridRowIdsSelector } from '@mui/x-data-grid';
7
+ import { GRID_CHECKBOX_SELECTION_FIELD, gridFocusCellSelector, gridVisibleColumnFieldsSelector, useGridApiOptionHandler, useGridApiEventHandler, gridPaginatedVisibleSortedGridRowIdsSelector, gridExpandedSortedRowIdsSelector } from '@mui/x-data-grid';
8
8
  import { buildWarning, getRowIdFromRowModel, getActiveElement, useGridRegisterPipeProcessor } from '@mui/x-data-grid/internals';
9
9
  import { GRID_DETAIL_PANEL_TOGGLE_FIELD, GRID_REORDER_COL_DEF } from '@mui/x-data-grid-pro';
10
10
  import { unstable_debounce as debounce } from '@mui/utils';
@@ -202,7 +202,8 @@ var CellValueUpdater = /*#__PURE__*/function () {
202
202
  function defaultPasteResolver(_ref3) {
203
203
  var pastedData = _ref3.pastedData,
204
204
  apiRef = _ref3.apiRef,
205
- updateCell = _ref3.updateCell;
205
+ updateCell = _ref3.updateCell,
206
+ pagination = _ref3.pagination;
206
207
  var isSingleValuePasted = pastedData.length === 1 && pastedData[0].length === 1;
207
208
  var cellSelectionModel = apiRef.current.unstable_getCellSelectionModel();
208
209
  if (cellSelectionModel && apiRef.current.unstable_getSelectedCellsAsArray().length > 1) {
@@ -265,7 +266,7 @@ function defaultPasteResolver(_ref3) {
265
266
  }
266
267
  var selectedRowId = selectedCell.id;
267
268
  var selectedRowIndex = apiRef.current.getRowIndexRelativeToVisibleRows(selectedRowId);
268
- var visibleRowIds = gridPaginatedVisibleSortedGridRowIdsSelector(apiRef);
269
+ var visibleRowIds = pagination ? gridPaginatedVisibleSortedGridRowIdsSelector(apiRef) : gridExpandedSortedRowIdsSelector(apiRef);
269
270
  var selectedFieldIndex = visibleColumnFields.indexOf(selectedCell.field);
270
271
  pastedData.forEach(function (rowData, index) {
271
272
  var rowId = visibleRowIds[selectedRowIndex + index];
@@ -363,7 +364,8 @@ export var useGridClipboardImport = function useGridClipboardImport(apiRef, prop
363
364
  },
364
365
  updateCell: function updateCell() {
365
366
  cellUpdater.updateCell.apply(cellUpdater, arguments);
366
- }
367
+ },
368
+ pagination: props.pagination
367
369
  });
368
370
  cellUpdater.applyUpdates();
369
371
  case 23:
@@ -375,7 +377,7 @@ export var useGridClipboardImport = function useGridClipboardImport(apiRef, prop
375
377
  return function (_x3, _x4) {
376
378
  return _ref5.apply(this, arguments);
377
379
  };
378
- }(), [apiRef, processRowUpdate, onProcessRowUpdateError, getRowId, enableClipboardPaste, rootEl, splitClipboardPastedText]);
380
+ }(), [apiRef, processRowUpdate, onProcessRowUpdateError, getRowId, enableClipboardPaste, rootEl, splitClipboardPastedText, props.pagination]);
379
381
  var checkIfCanStartEditing = React.useCallback(function (initialValue, _ref6) {
380
382
  var event = _ref6.event;
381
383
  if (isPasteShortcut(event) && enableClipboardPaste) {
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v6.13.0
2
+ * @mui/x-data-grid-premium v6.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 var getReleaseInfo = function getReleaseInfo() {
3
- var releaseInfo = "MTY5NDEyMDQwMDAwMA==";
3
+ var releaseInfo = "MTY5NDY0MjQwMDAwMA==";
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,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
- import { GRID_CHECKBOX_SELECTION_FIELD, gridFocusCellSelector, gridVisibleColumnFieldsSelector, useGridApiOptionHandler, useGridApiEventHandler, gridPaginatedVisibleSortedGridRowIdsSelector } from '@mui/x-data-grid';
3
+ import { GRID_CHECKBOX_SELECTION_FIELD, gridFocusCellSelector, gridVisibleColumnFieldsSelector, useGridApiOptionHandler, useGridApiEventHandler, gridPaginatedVisibleSortedGridRowIdsSelector, gridExpandedSortedRowIdsSelector } from '@mui/x-data-grid';
4
4
  import { buildWarning, getRowIdFromRowModel, getActiveElement, useGridRegisterPipeProcessor } from '@mui/x-data-grid/internals';
5
5
  import { GRID_DETAIL_PANEL_TOGGLE_FIELD, GRID_REORDER_COL_DEF } from '@mui/x-data-grid-pro';
6
6
  import { unstable_debounce as debounce } from '@mui/utils';
@@ -155,7 +155,8 @@ class CellValueUpdater {
155
155
  function defaultPasteResolver({
156
156
  pastedData,
157
157
  apiRef,
158
- updateCell
158
+ updateCell,
159
+ pagination
159
160
  }) {
160
161
  const isSingleValuePasted = pastedData.length === 1 && pastedData[0].length === 1;
161
162
  const cellSelectionModel = apiRef.current.unstable_getCellSelectionModel();
@@ -219,7 +220,7 @@ function defaultPasteResolver({
219
220
  }
220
221
  const selectedRowId = selectedCell.id;
221
222
  const selectedRowIndex = apiRef.current.getRowIndexRelativeToVisibleRows(selectedRowId);
222
- const visibleRowIds = gridPaginatedVisibleSortedGridRowIdsSelector(apiRef);
223
+ const visibleRowIds = pagination ? gridPaginatedVisibleSortedGridRowIdsSelector(apiRef) : gridExpandedSortedRowIdsSelector(apiRef);
223
224
  const selectedFieldIndex = visibleColumnFields.indexOf(selectedCell.field);
224
225
  pastedData.forEach((rowData, index) => {
225
226
  const rowId = visibleRowIds[selectedRowIndex + index];
@@ -289,10 +290,11 @@ export const useGridClipboardImport = (apiRef, props) => {
289
290
  },
290
291
  updateCell: (...args) => {
291
292
  cellUpdater.updateCell(...args);
292
- }
293
+ },
294
+ pagination: props.pagination
293
295
  });
294
296
  cellUpdater.applyUpdates();
295
- }, [apiRef, processRowUpdate, onProcessRowUpdateError, getRowId, enableClipboardPaste, rootEl, splitClipboardPastedText]);
297
+ }, [apiRef, processRowUpdate, onProcessRowUpdateError, getRowId, enableClipboardPaste, rootEl, splitClipboardPastedText, props.pagination]);
296
298
  const checkIfCanStartEditing = React.useCallback((initialValue, {
297
299
  event
298
300
  }) => {
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v6.13.0
2
+ * @mui/x-data-grid-premium v6.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 = "MTY5NDEyMDQwMDAwMA==";
3
+ const releaseInfo = "MTY5NDY0MjQwMDAwMA==";
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
@@ -164,7 +164,8 @@ class CellValueUpdater {
164
164
  function defaultPasteResolver({
165
165
  pastedData,
166
166
  apiRef,
167
- updateCell
167
+ updateCell,
168
+ pagination
168
169
  }) {
169
170
  const isSingleValuePasted = pastedData.length === 1 && pastedData[0].length === 1;
170
171
  const cellSelectionModel = apiRef.current.unstable_getCellSelectionModel();
@@ -228,7 +229,7 @@ function defaultPasteResolver({
228
229
  }
229
230
  const selectedRowId = selectedCell.id;
230
231
  const selectedRowIndex = apiRef.current.getRowIndexRelativeToVisibleRows(selectedRowId);
231
- const visibleRowIds = (0, _xDataGrid.gridPaginatedVisibleSortedGridRowIdsSelector)(apiRef);
232
+ const visibleRowIds = pagination ? (0, _xDataGrid.gridPaginatedVisibleSortedGridRowIdsSelector)(apiRef) : (0, _xDataGrid.gridExpandedSortedRowIdsSelector)(apiRef);
232
233
  const selectedFieldIndex = visibleColumnFields.indexOf(selectedCell.field);
233
234
  pastedData.forEach((rowData, index) => {
234
235
  const rowId = visibleRowIds[selectedRowIndex + index];
@@ -298,10 +299,11 @@ const useGridClipboardImport = (apiRef, props) => {
298
299
  },
299
300
  updateCell: (...args) => {
300
301
  cellUpdater.updateCell(...args);
301
- }
302
+ },
303
+ pagination: props.pagination
302
304
  });
303
305
  cellUpdater.applyUpdates();
304
- }, [apiRef, processRowUpdate, onProcessRowUpdateError, getRowId, enableClipboardPaste, rootEl, splitClipboardPastedText]);
306
+ }, [apiRef, processRowUpdate, onProcessRowUpdateError, getRowId, enableClipboardPaste, rootEl, splitClipboardPastedText, props.pagination]);
305
307
  const checkIfCanStartEditing = React.useCallback((initialValue, {
306
308
  event
307
309
  }) => {
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v6.13.0
2
+ * @mui/x-data-grid-premium v6.14.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 = "MTY5NDEyMDQwMDAwMA==";
9
+ const releaseInfo = "MTY5NDY0MjQwMDAwMA==";
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-premium",
3
- "version": "6.13.0",
3
+ "version": "6.14.0",
4
4
  "description": "The Premium plan edition of the data grid component (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -32,9 +32,9 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.22.15",
35
- "@mui/utils": "^5.14.7",
36
- "@mui/x-data-grid": "6.13.0",
37
- "@mui/x-data-grid-pro": "6.13.0",
35
+ "@mui/utils": "^5.14.8",
36
+ "@mui/x-data-grid": "6.14.0",
37
+ "@mui/x-data-grid-pro": "6.14.0",
38
38
  "@mui/x-license-pro": "6.10.2",
39
39
  "@types/format-util": "^1.0.2",
40
40
  "clsx": "^2.0.0",
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTY5NDEyMDQwMDAwMA==";
3
+ const releaseInfo = "MTY5NDY0MjQwMDAwMA==";
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