@mui/x-date-pickers 6.19.7 → 6.19.9

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,76 @@
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.19.9
7
+
8
+ _Apr 5, 2024_
9
+
10
+ We'd like to offer a big thanks to the 3 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🐞 Bugfixes
13
+ - 📚 Documentation improvements
14
+
15
+ ### Data Grid
16
+
17
+ #### `@mui/x-data-grid@6.19.9`
18
+
19
+ - [DataGrid] Remove legacy editing API event: `rowEditCommit` (#12087) @MBilalShafi
20
+
21
+ #### `@mui/x-data-grid-pro@6.19.9` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
22
+
23
+ Same changes as in `@mui/x-data-grid@6.19.9`.
24
+
25
+ #### `@mui/x-data-grid-premium@6.19.9` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
26
+
27
+ Same changes as in `@mui/x-data-grid-pro@6.19.9`.
28
+
29
+ ### Date Pickers
30
+
31
+ #### `@mui/x-date-pickers@6.19.9`
32
+
33
+ No changes.
34
+
35
+ #### `@mui/x-date-pickers-pro@6.19.9` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
36
+
37
+ - [DateRangePicker] Fix selection behavior with single input field when `readOnly` (#12605) @LukasTy
38
+
39
+ ### Docs
40
+
41
+ - [docs] Adds a recipe for the `checkboxSelectionVisibleOnly` prop (#12667) @michelengelen
42
+ - [docs] Explain the use of `_action: 'delete'` in `processRowUpdate` (#12673) @michelengelen
43
+
44
+ ### Core
45
+
46
+ - [core] Use Circle CI context (#12607) @cherniavskii
47
+
48
+ ## 6.19.8
49
+
50
+ _Mar 20, 2024_
51
+
52
+ We'd like to offer a big thanks to the 3 contributors who made this release possible.
53
+
54
+ ### Data Grid
55
+
56
+ #### `@mui/x-data-grid@6.19.8`
57
+
58
+ - [DataGrid] Fix `ElementType` usage (#12505) @cherniavskii
59
+ - [DataGrid] Fix cell value formatting on copy (#12483) @sai6855
60
+ - [DataGrid] Fix checkbox selection when filtering (#12485) @g1mishra
61
+
62
+ #### `@mui/x-data-grid-pro@6.19.8` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
63
+
64
+ Same changes as in `@mui/x-data-grid@6.19.8`.
65
+
66
+ #### `@mui/x-data-grid-premium@6.19.8` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
67
+
68
+ Same changes as in `@mui/x-data-grid-pro@6.19.8`, plus:
69
+
70
+ - [DataGridPremium] Add support for confirmation before clipboard paste (#12466) @cherniavskii
71
+
72
+ ### Docs
73
+
74
+ - [docs] Update links to v7 (#12495) @cherniavskii
75
+
6
76
  ## 6.19.7
7
77
 
8
78
  _Mar 14, 2024_
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v6.19.7
2
+ * @mui/x-date-pickers v6.19.9
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -403,10 +403,11 @@ export const useField = params => {
403
403
  React.useImperativeHandle(unstableFieldRef, () => ({
404
404
  getSections: () => state.sections,
405
405
  getActiveSectionIndex: () => {
406
- var _selectionStart2, _selectionEnd;
406
+ var _selectionStart2, _selectionEnd, _inputRef$current;
407
407
  const browserStartIndex = (_selectionStart2 = inputRef.current.selectionStart) != null ? _selectionStart2 : 0;
408
408
  const browserEndIndex = (_selectionEnd = inputRef.current.selectionEnd) != null ? _selectionEnd : 0;
409
- if (browserStartIndex === 0 && browserEndIndex === 0) {
409
+ const isInputReadOnly = !!((_inputRef$current = inputRef.current) != null && _inputRef$current.readOnly);
410
+ if (browserStartIndex === 0 && browserEndIndex === 0 || isInputReadOnly) {
410
411
  return null;
411
412
  }
412
413
  const nextSectionIndex = browserStartIndex <= state.sections[0].startInInput ? 1 // Special case if browser index is in invisible characters at the beginning.
@@ -416,11 +417,11 @@ export const useField = params => {
416
417
  setSelectedSections: activeSectionIndex => setSelectedSections(activeSectionIndex)
417
418
  }));
418
419
  const handleClearValue = useEventCallback((event, ...args) => {
419
- var _inputRef$current;
420
+ var _inputRef$current2;
420
421
  event.preventDefault();
421
422
  onClear == null || onClear(event, ...args);
422
423
  clearValue();
423
- inputRef == null || (_inputRef$current = inputRef.current) == null || _inputRef$current.focus();
424
+ inputRef == null || (_inputRef$current2 = inputRef.current) == null || _inputRef$current2.focus();
424
425
  setSelectedSections(0);
425
426
  });
426
427
  return _extends({
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v6.19.7
2
+ * @mui/x-date-pickers v6.19.9
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -417,10 +417,11 @@ export var useField = function useField(params) {
417
417
  return state.sections;
418
418
  },
419
419
  getActiveSectionIndex: function getActiveSectionIndex() {
420
- var _selectionStart2, _selectionEnd;
420
+ var _selectionStart2, _selectionEnd, _inputRef$current;
421
421
  var browserStartIndex = (_selectionStart2 = inputRef.current.selectionStart) != null ? _selectionStart2 : 0;
422
422
  var browserEndIndex = (_selectionEnd = inputRef.current.selectionEnd) != null ? _selectionEnd : 0;
423
- if (browserStartIndex === 0 && browserEndIndex === 0) {
423
+ var isInputReadOnly = !!((_inputRef$current = inputRef.current) != null && _inputRef$current.readOnly);
424
+ if (browserStartIndex === 0 && browserEndIndex === 0 || isInputReadOnly) {
424
425
  return null;
425
426
  }
426
427
  var nextSectionIndex = browserStartIndex <= state.sections[0].startInInput ? 1 // Special case if browser index is in invisible characters at the beginning.
@@ -435,14 +436,14 @@ export var useField = function useField(params) {
435
436
  };
436
437
  });
437
438
  var handleClearValue = useEventCallback(function (event) {
438
- var _inputRef$current;
439
+ var _inputRef$current2;
439
440
  event.preventDefault();
440
441
  for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
441
442
  args[_key4 - 1] = arguments[_key4];
442
443
  }
443
444
  onClear == null || onClear.apply(void 0, [event].concat(_toConsumableArray(args)));
444
445
  clearValue();
445
- inputRef == null || (_inputRef$current = inputRef.current) == null || _inputRef$current.focus();
446
+ inputRef == null || (_inputRef$current2 = inputRef.current) == null || _inputRef$current2.focus();
446
447
  _setSelectedSections(0);
447
448
  });
448
449
  return _extends({
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v6.19.7
2
+ * @mui/x-date-pickers v6.19.9
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -401,7 +401,8 @@ export const useField = params => {
401
401
  getActiveSectionIndex: () => {
402
402
  const browserStartIndex = inputRef.current.selectionStart ?? 0;
403
403
  const browserEndIndex = inputRef.current.selectionEnd ?? 0;
404
- if (browserStartIndex === 0 && browserEndIndex === 0) {
404
+ const isInputReadOnly = !!inputRef.current?.readOnly;
405
+ if (browserStartIndex === 0 && browserEndIndex === 0 || isInputReadOnly) {
405
406
  return null;
406
407
  }
407
408
  const nextSectionIndex = browserStartIndex <= state.sections[0].startInInput ? 1 // Special case if browser index is in invisible characters at the beginning.
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v6.19.7
2
+ * @mui/x-date-pickers v6.19.9
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -410,7 +410,8 @@ const useField = params => {
410
410
  getActiveSectionIndex: () => {
411
411
  const browserStartIndex = inputRef.current.selectionStart ?? 0;
412
412
  const browserEndIndex = inputRef.current.selectionEnd ?? 0;
413
- if (browserStartIndex === 0 && browserEndIndex === 0) {
413
+ const isInputReadOnly = !!inputRef.current?.readOnly;
414
+ if (browserStartIndex === 0 && browserEndIndex === 0 || isInputReadOnly) {
414
415
  return null;
415
416
  }
416
417
  const nextSectionIndex = browserStartIndex <= state.sections[0].startInInput ? 1 // Special case if browser index is in invisible characters at the beginning.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-date-pickers",
3
- "version": "6.19.7",
3
+ "version": "6.19.9",
4
4
  "description": "The community edition of the date picker components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",