@mui/x-date-pickers-pro 7.25.0 → 7.27.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.
Files changed (29) hide show
  1. package/CHANGELOG.md +133 -0
  2. package/MobileDateRangePicker/MobileDateRangePicker.js +2 -0
  3. package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +2 -0
  4. package/MultiInputDateRangeField/MultiInputDateRangeField.js +1 -1
  5. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +1 -1
  6. package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +1 -1
  7. package/index.js +1 -1
  8. package/internals/hooks/useEnrichedRangePickerFieldProps.js +1 -0
  9. package/internals/hooks/useRangePosition.js +5 -0
  10. package/internals/utils/releaseInfo.js +1 -1
  11. package/modern/MobileDateRangePicker/MobileDateRangePicker.js +2 -0
  12. package/modern/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +2 -0
  13. package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +1 -1
  14. package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +1 -1
  15. package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +1 -1
  16. package/modern/index.js +1 -1
  17. package/modern/internals/hooks/useEnrichedRangePickerFieldProps.js +1 -0
  18. package/modern/internals/hooks/useRangePosition.js +5 -0
  19. package/modern/internals/utils/releaseInfo.js +1 -1
  20. package/node/MobileDateRangePicker/MobileDateRangePicker.js +2 -0
  21. package/node/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +2 -0
  22. package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +1 -1
  23. package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +1 -1
  24. package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +1 -1
  25. package/node/index.js +1 -1
  26. package/node/internals/hooks/useEnrichedRangePickerFieldProps.js +1 -0
  27. package/node/internals/hooks/useRangePosition.js +5 -0
  28. package/node/internals/utils/releaseInfo.js +1 -1
  29. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -3,6 +3,139 @@
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.27.0
7
+
8
+ _Feb 17, 2025_
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 Data Grid Excel export serialization performance
13
+ - 🐞 Bugfixes
14
+ - 🌍 Improve Polish (pl-PL) and Ukrainian (uk-UA) locale on the Data Grid
15
+
16
+ Special thanks go out to the community contributors who have helped make this release possible:
17
+ @pawelkula, @Neonin.
18
+ Following are all team members who have contributed to this release:
19
+ @cherniavskii, @JCQuintas, @oliviertassinari, @arminmeh and @LukasTy
20
+
21
+ ### Data Grid
22
+
23
+ #### `@mui/x-data-grid@7.27.0`
24
+
25
+ - [DataGrid] Add `resetPageOnSortFilter` prop that resets the page after sorting and filtering (#16580) @arminmeh
26
+ - [DataGrid] Avoid `undefined` value for pagination `rowCount` (#16558) @cherniavskii
27
+ - [l10n] Improve Polish (pl-PL) locale (#16594) @pawelkula
28
+ - [l10n] Improve Ukrainian (uk-UA) locale (#16593) @Neonin
29
+
30
+ #### `@mui/x-data-grid-pro@7.27.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
31
+
32
+ Same changes as in `@mui/x-data-grid@7.27.0`.
33
+
34
+ #### `@mui/x-data-grid-premium@7.27.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
35
+
36
+ Same changes as in `@mui/x-data-grid-pro@7.27.0`, plus:
37
+
38
+ - [DataGridPremium] Fix Excel export Web Worker demo not working in dev mode (#16532) @cherniavskii
39
+ - [DataGridPremium] Improve Excel export serialization performance (#16545) @cherniavskii
40
+ - [DataGridPremium] Namespace Excel export worker (#16539) @oliviertassinari
41
+
42
+ ### Date and Time Pickers
43
+
44
+ #### `@mui/x-date-pickers@7.27.0`
45
+
46
+ Internal changes.
47
+
48
+ #### `@mui/x-date-pickers-pro@7.27.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
49
+
50
+ Same changes as in `@mui/x-date-pickers@7.27.0`, plus:
51
+
52
+ - [DateRangePicker] Avoid unnecessary field section focusing (#16569) @LukasTy
53
+
54
+ ### Charts
55
+
56
+ #### `@mui/x-charts@7.27.0`
57
+
58
+ Internal changes.
59
+
60
+ #### `@mui/x-charts-pro@7.27.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
61
+
62
+ - [charts-pro] Fix automatic type overloads (#16579) @JCQuintas
63
+
64
+ ### Core
65
+
66
+ - [test] Fix Data Grid data source error test on React 18 (#16565) @arminmeh
67
+
68
+ ## 7.26.0
69
+
70
+ _Feb 7, 2025_
71
+
72
+ We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
73
+
74
+ - ⚡ Mount and resize performance improvements for the Data Grid
75
+ - 🐞 Bugfixes
76
+
77
+ Special thanks go out to the community contributors who have helped make this release possible:
78
+ @lauri865.
79
+ Following are all team members who have contributed to this release:
80
+ @arminmeh, @noraleonte, @LukasTy, @KenanYusuf, @flaviendelangle.
81
+
82
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
83
+
84
+ ### Data Grid
85
+
86
+ #### `@mui/x-data-grid@7.26.0`
87
+
88
+ - [DataGrid] Avoid `<GridRoot />` double-render pass on mount in SPA mode (#16480) @lauri865
89
+
90
+ #### `@mui/x-data-grid-pro@7.26.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
91
+
92
+ Same changes as in `@mui/x-data-grid@7.26.0`, plus:
93
+
94
+ - [DataGridPro] Fix the return type of `useGridApiContext()` for Pro and Premium packages on React < 19 (#16446) @arminmeh
95
+
96
+ #### `@mui/x-data-grid-premium@7.26.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
97
+
98
+ Same changes as in `@mui/x-data-grid-pro@7.26.0`, plus:
99
+
100
+ - [DataGridPremium] Fix "no rows" overlay not showing with active aggregation (#16468) @KenanYusuf
101
+
102
+ ### Date and Time Pickers
103
+
104
+ #### `@mui/x-date-pickers@7.26.0`
105
+
106
+ Internal changes.
107
+
108
+ #### `@mui/x-date-pickers-pro@7.26.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
109
+
110
+ Same changes as in `@mui/x-date-pickers@7.26.0`, plus:
111
+
112
+ - [DateRangePicker] Fix `currentMonthCalendarPosition` prop behavior on mobile (#16457) @LukasTy
113
+ - [DateRangePicker] Fix vertical alignment for multi input fields (#16490) @noraleonte
114
+
115
+ ### Charts
116
+
117
+ #### `@mui/x-charts@7.26.0`
118
+
119
+ Internal changes.
120
+
121
+ #### `@mui/x-charts-pro@7.26.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
122
+
123
+ Same changes as in `@mui/x-charts@7.26.0`.
124
+
125
+ ### Tree View
126
+
127
+ #### `@mui/x-tree-view@7.26.0`
128
+
129
+ Internal changes.
130
+
131
+ #### `@mui/x-tree-view-pro@7.26.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
132
+
133
+ Same changes as in `@mui/x-tree-view@7.26.0`.
134
+
135
+ ### Core
136
+
137
+ - [core] Fix corepack and pnpm installation in CircleCI (#16452) @flaviendelangle
138
+
6
139
  ## 7.25.0
7
140
 
8
141
  _Jan 31, 2025_
@@ -32,6 +32,8 @@ const MobileDateRangePicker = /*#__PURE__*/React.forwardRef(function MobileDateR
32
32
  viewRenderers,
33
33
  // Force one calendar on mobile to avoid layout issues
34
34
  calendars: 1,
35
+ // force current calendar position, since we only have one calendar
36
+ currentMonthCalendarPosition: 1,
35
37
  views: ['day'],
36
38
  openTo: 'day',
37
39
  slots: _extends({
@@ -103,6 +103,8 @@ const MobileDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function MobileD
103
103
  calendars: 1,
104
104
  // force true to correctly handle `renderTimeViewClock` as a renderer
105
105
  ampmInClock: true,
106
+ // force current calendar position, since we only have one calendar
107
+ currentMonthCalendarPosition: 1,
106
108
  slots: _extends({
107
109
  field: MultiInputDateTimeRangeField
108
110
  }, defaultizedProps.slots),
@@ -33,7 +33,7 @@ const MultiInputDateRangeFieldRoot = styled(/*#__PURE__*/React.forwardRef((props
33
33
  ref: ref,
34
34
  spacing: 2,
35
35
  direction: "row",
36
- alignItems: "center"
36
+ alignItems: "baseline"
37
37
  }, props))), {
38
38
  name: 'MuiMultiInputDateRangeField',
39
39
  slot: 'Root',
@@ -33,7 +33,7 @@ const MultiInputDateTimeRangeFieldRoot = styled(/*#__PURE__*/React.forwardRef((p
33
33
  ref: ref,
34
34
  spacing: 2,
35
35
  direction: "row",
36
- alignItems: "center"
36
+ alignItems: "baseline"
37
37
  }, props))), {
38
38
  name: 'MuiMultiInputDateTimeRangeField',
39
39
  slot: 'Root',
@@ -33,7 +33,7 @@ const MultiInputTimeRangeFieldRoot = styled(/*#__PURE__*/React.forwardRef((props
33
33
  ref: ref,
34
34
  spacing: 2,
35
35
  direction: "row",
36
- alignItems: "center"
36
+ alignItems: "baseline"
37
37
  }, props))), {
38
38
  name: 'MuiMultiInputTimeRangeField',
39
39
  slot: 'Root',
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers-pro v7.25.0
2
+ * @mui/x-date-pickers-pro v7.27.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -45,6 +45,7 @@ const useMultiInputFieldSlotProps = ({
45
45
  }
46
46
 
47
47
  // bring back focus to the field
48
+ // currentView is present on DateTimeRangePicker
48
49
  currentFieldRef.current.setSelectedSections(
49
50
  // use the current view or `0` when the range position has just been swapped
50
51
  previousRangePosition.current === rangePosition ? currentView : 0);
@@ -16,6 +16,11 @@ export const useRangePosition = (props, singleInputFieldRef) => {
16
16
  }
17
17
  const sections = singleInputFieldRef.current.getSections();
18
18
  const targetActiveSectionIndex = newRangePosition === 'start' ? 0 : sections.length / 2;
19
+ const activeSectionIndex = singleInputFieldRef.current.getActiveSectionIndex();
20
+ // if the active section is already within the target range, we don't need to update it.
21
+ if (activeSectionIndex && activeSectionIndex >= targetActiveSectionIndex && activeSectionIndex < targetActiveSectionIndex + sections.length / 2) {
22
+ return;
23
+ }
19
24
  singleInputFieldRef.current.setSelectedSections(targetActiveSectionIndex);
20
25
  };
21
26
  const handleRangePositionChange = useEventCallback(newRangePosition => {
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTczODI5OTYwMDAwMA==";
3
+ const releaseInfo = "MTczOTc0NjgwMDAwMA==";
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
@@ -32,6 +32,8 @@ const MobileDateRangePicker = /*#__PURE__*/React.forwardRef(function MobileDateR
32
32
  viewRenderers,
33
33
  // Force one calendar on mobile to avoid layout issues
34
34
  calendars: 1,
35
+ // force current calendar position, since we only have one calendar
36
+ currentMonthCalendarPosition: 1,
35
37
  views: ['day'],
36
38
  openTo: 'day',
37
39
  slots: _extends({
@@ -103,6 +103,8 @@ const MobileDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function MobileD
103
103
  calendars: 1,
104
104
  // force true to correctly handle `renderTimeViewClock` as a renderer
105
105
  ampmInClock: true,
106
+ // force current calendar position, since we only have one calendar
107
+ currentMonthCalendarPosition: 1,
106
108
  slots: _extends({
107
109
  field: MultiInputDateTimeRangeField
108
110
  }, defaultizedProps.slots),
@@ -33,7 +33,7 @@ const MultiInputDateRangeFieldRoot = styled(/*#__PURE__*/React.forwardRef((props
33
33
  ref: ref,
34
34
  spacing: 2,
35
35
  direction: "row",
36
- alignItems: "center"
36
+ alignItems: "baseline"
37
37
  }, props))), {
38
38
  name: 'MuiMultiInputDateRangeField',
39
39
  slot: 'Root',
@@ -33,7 +33,7 @@ const MultiInputDateTimeRangeFieldRoot = styled(/*#__PURE__*/React.forwardRef((p
33
33
  ref: ref,
34
34
  spacing: 2,
35
35
  direction: "row",
36
- alignItems: "center"
36
+ alignItems: "baseline"
37
37
  }, props))), {
38
38
  name: 'MuiMultiInputDateTimeRangeField',
39
39
  slot: 'Root',
@@ -33,7 +33,7 @@ const MultiInputTimeRangeFieldRoot = styled(/*#__PURE__*/React.forwardRef((props
33
33
  ref: ref,
34
34
  spacing: 2,
35
35
  direction: "row",
36
- alignItems: "center"
36
+ alignItems: "baseline"
37
37
  }, props))), {
38
38
  name: 'MuiMultiInputTimeRangeField',
39
39
  slot: 'Root',
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers-pro v7.25.0
2
+ * @mui/x-date-pickers-pro v7.27.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -45,6 +45,7 @@ const useMultiInputFieldSlotProps = ({
45
45
  }
46
46
 
47
47
  // bring back focus to the field
48
+ // currentView is present on DateTimeRangePicker
48
49
  currentFieldRef.current.setSelectedSections(
49
50
  // use the current view or `0` when the range position has just been swapped
50
51
  previousRangePosition.current === rangePosition ? currentView : 0);
@@ -16,6 +16,11 @@ export const useRangePosition = (props, singleInputFieldRef) => {
16
16
  }
17
17
  const sections = singleInputFieldRef.current.getSections();
18
18
  const targetActiveSectionIndex = newRangePosition === 'start' ? 0 : sections.length / 2;
19
+ const activeSectionIndex = singleInputFieldRef.current.getActiveSectionIndex();
20
+ // if the active section is already within the target range, we don't need to update it.
21
+ if (activeSectionIndex && activeSectionIndex >= targetActiveSectionIndex && activeSectionIndex < targetActiveSectionIndex + sections.length / 2) {
22
+ return;
23
+ }
19
24
  singleInputFieldRef.current.setSelectedSections(targetActiveSectionIndex);
20
25
  };
21
26
  const handleRangePositionChange = useEventCallback(newRangePosition => {
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTczODI5OTYwMDAwMA==";
3
+ const releaseInfo = "MTczOTc0NjgwMDAwMA==";
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
@@ -39,6 +39,8 @@ const MobileDateRangePicker = exports.MobileDateRangePicker = /*#__PURE__*/React
39
39
  viewRenderers,
40
40
  // Force one calendar on mobile to avoid layout issues
41
41
  calendars: 1,
42
+ // force current calendar position, since we only have one calendar
43
+ currentMonthCalendarPosition: 1,
42
44
  views: ['day'],
43
45
  openTo: 'day',
44
46
  slots: (0, _extends2.default)({
@@ -110,6 +110,8 @@ const MobileDateTimeRangePicker = exports.MobileDateTimeRangePicker = /*#__PURE_
110
110
  calendars: 1,
111
111
  // force true to correctly handle `renderTimeViewClock` as a renderer
112
112
  ampmInClock: true,
113
+ // force current calendar position, since we only have one calendar
114
+ currentMonthCalendarPosition: 1,
113
115
  slots: (0, _extends2.default)({
114
116
  field: _MultiInputDateTimeRangeField.MultiInputDateTimeRangeField
115
117
  }, defaultizedProps.slots),
@@ -41,7 +41,7 @@ const MultiInputDateRangeFieldRoot = (0, _styles.styled)(/*#__PURE__*/React.forw
41
41
  ref: ref,
42
42
  spacing: 2,
43
43
  direction: "row",
44
- alignItems: "center"
44
+ alignItems: "baseline"
45
45
  }, props))), {
46
46
  name: 'MuiMultiInputDateRangeField',
47
47
  slot: 'Root',
@@ -41,7 +41,7 @@ const MultiInputDateTimeRangeFieldRoot = (0, _styles.styled)(/*#__PURE__*/React.
41
41
  ref: ref,
42
42
  spacing: 2,
43
43
  direction: "row",
44
- alignItems: "center"
44
+ alignItems: "baseline"
45
45
  }, props))), {
46
46
  name: 'MuiMultiInputDateTimeRangeField',
47
47
  slot: 'Root',
@@ -41,7 +41,7 @@ const MultiInputTimeRangeFieldRoot = (0, _styles.styled)(/*#__PURE__*/React.forw
41
41
  ref: ref,
42
42
  spacing: 2,
43
43
  direction: "row",
44
- alignItems: "center"
44
+ alignItems: "baseline"
45
45
  }, props))), {
46
46
  name: 'MuiMultiInputTimeRangeField',
47
47
  slot: 'Root',
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers-pro v7.25.0
2
+ * @mui/x-date-pickers-pro v7.27.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -53,6 +53,7 @@ const useMultiInputFieldSlotProps = ({
53
53
  }
54
54
 
55
55
  // bring back focus to the field
56
+ // currentView is present on DateTimeRangePicker
56
57
  currentFieldRef.current.setSelectedSections(
57
58
  // use the current view or `0` when the range position has just been swapped
58
59
  previousRangePosition.current === rangePosition ? currentView : 0);
@@ -23,6 +23,11 @@ const useRangePosition = (props, singleInputFieldRef) => {
23
23
  }
24
24
  const sections = singleInputFieldRef.current.getSections();
25
25
  const targetActiveSectionIndex = newRangePosition === 'start' ? 0 : sections.length / 2;
26
+ const activeSectionIndex = singleInputFieldRef.current.getActiveSectionIndex();
27
+ // if the active section is already within the target range, we don't need to update it.
28
+ if (activeSectionIndex && activeSectionIndex >= targetActiveSectionIndex && activeSectionIndex < targetActiveSectionIndex + sections.length / 2) {
29
+ return;
30
+ }
26
31
  singleInputFieldRef.current.setSelectedSections(targetActiveSectionIndex);
27
32
  };
28
33
  const handleRangePositionChange = (0, _useEventCallback.default)(newRangePosition => {
@@ -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 = "MTczODI5OTYwMDAwMA==";
9
+ const releaseInfo = "MTczOTc0NjgwMDAwMA==";
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-date-pickers-pro",
3
- "version": "7.25.0",
3
+ "version": "7.27.0",
4
4
  "description": "The Pro plan edition of the Date and Time Picker components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -37,9 +37,9 @@
37
37
  "clsx": "^2.1.1",
38
38
  "prop-types": "^15.8.1",
39
39
  "react-transition-group": "^4.4.5",
40
- "@mui/x-date-pickers": "7.25.0",
41
- "@mui/x-internals": "7.25.0",
42
- "@mui/x-license": "7.25.0"
40
+ "@mui/x-date-pickers": "7.27.0",
41
+ "@mui/x-internals": "7.26.0",
42
+ "@mui/x-license": "7.26.0"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@emotion/react": "^11.9.0",