@mui/x-date-pickers-pro 7.22.1 → 7.22.3

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,145 @@
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.22.3
7
+
8
+ _Nov 21, 2024_
9
+
10
+ We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 📊 Charts Pro get stable. The [zoom](https://mui.com/x/react-charts/zoom-and-pan/) and [Heatmap](https://mui.com/x/react-charts/heatmap/) are now stable.
13
+ - 🌍 Improve Chinese, Spanish, Swedish, and Turkish locales on the Data Grid
14
+ - 🐞 Bugfixes
15
+
16
+ Special thanks go out to the community contributors who have helped make this release possible:
17
+ @CarlosLopezLg, @headironc, @viktormelin, @qerkules, @DungTiger, @hendrikpeilke, @k-rajat19.
18
+ Following are all team members who have contributed to this release:
19
+ @alexfauquette, @LukasTy, @MBilalShafi, @flaviendelangle.
20
+
21
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
22
+
23
+ ### Data Grid
24
+
25
+ #### `@mui/x-data-grid@7.22.3`
26
+
27
+ - [DataGrid] Add prop to override search input props in `GridColumnsManagement` (#15476) @k-rajat19
28
+ - [DataGrid] Add test coverage for issues fixed in #15184 @MBilalShafi
29
+ - [DataGrid] Fix memoized selectors with arguments (#15336) @MBilalShafi
30
+ - [DataGrid] Fix right column group header border with virtualization (#15503) @hendrikpeilke
31
+ - [DataGrid] Pass reason to `onPaginationModelChange` (#15402) @DungTiger
32
+ - [DataGrid] Set default overlay height in flex parent layout (#15535) @cherniavskii
33
+ - [l10n] Improve Chinese (zh-CN) locale (#15365) @headironc
34
+ - [l10n] Improve Spanish (es-ES) locale (#15369) @CarlosLopezLg
35
+ - [l10n] Improve Swedish (sv-SE) locale (#15371) @viktormelin
36
+ - [l10n] Improve Turkish (tr-TR) locale (#15414) @qerkules
37
+
38
+ #### `@mui/x-data-grid-pro@7.22.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
39
+
40
+ Same changes as in `@mui/x-data-grid@7.22.3`.
41
+
42
+ #### `@mui/x-data-grid-premium@7.22.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
43
+
44
+ Same changes as in `@mui/x-data-grid-pro@7.22.3`.
45
+
46
+ ### Date and Time Pickers
47
+
48
+ #### `@mui/x-date-pickers@7.22.3`
49
+
50
+ - [pickers] Always use `props.value` when it changes (#15500) @flaviendelangle
51
+ - [pickers] Ensure internal value timezone is updated (#15491) @LukasTy
52
+ - [pickers] Fix `DateTimeRangePicker` error when using format without time (#15341) @fxnoob
53
+ - [pickers] Fix unused code in `PickersToolbar` component (#15525) @LukasTy
54
+
55
+ #### `@mui/x-date-pickers-pro@7.22.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
56
+
57
+ Same changes as in `@mui/x-date-pickers@7.22.3`, plus:
58
+
59
+ - [DateTimeRangePicker] Use time in `referenceDate` when selecting date (#15431) @LukasTy
60
+
61
+ ### Charts
62
+
63
+ #### `@mui/x-charts@7.22.3`
64
+
65
+ No changes since `@mui/x-charts@7.22.2`.
66
+
67
+ #### `@mui/x-charts-pro@7.22.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
68
+
69
+ - [charts-pro] Fix missing typeOverload (#15400) @alexfauquette
70
+
71
+ ### Docs
72
+
73
+ - [docs] Add `PickersPopper` component to customization playground (#15397) @LukasTy
74
+ - [docs] Add `next` version links (#15423) @LukasTy
75
+ - [docs] Use the `loading` state in the demos (#15538) @cherniavskii
76
+
77
+ - [code-infra] Tentative fix for Argos flaky screenshot tests (#15399) @JCQuintas
78
+ - [docs-infra] Transpile `.ts` demo files (#15421) @KenanYusuf
79
+ - [core] Clarify release version bump strategy (#15536) @cherniavskii
80
+
81
+ ## 7.22.2
82
+
83
+ _Nov 8, 2024_
84
+
85
+ We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
86
+
87
+ - 👨🏽‍💻 API enhancements
88
+ - 🐞 Bugfixes
89
+
90
+ Special thanks go out to the community contributors who have helped make this release possible:
91
+ @clins1994, @GuillaumeMeheut, @k-rajat19.
92
+ Following are all team members who have contributed to this release:
93
+ @LukasTy, @MBilalShafi, @KenanYusuf, @arminmeh.
94
+
95
+ ### Upcoming alpha
96
+
97
+ Keep an eye out for the MUI⠀X `v8.0.0-aplha.0` release soon. It will follow a weekly release schedule as always until it is stable.
98
+
99
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
100
+
101
+ ### Data Grid
102
+
103
+ #### `@mui/x-data-grid@7.22.2`
104
+
105
+ - [DataGrid] Fix `null` reference error in `GridVirtualScrollbar` (#15289) @MBilalShafi
106
+ - [DataGrid] Fix filtering with `boolean` column type (#15257) @k-rajat19
107
+ - [DataGrid] Improve row selection propagation trigger (#15274) @MBilalShafi
108
+ - [DataGrid] Preprocess edit cell props on backspace/delete (#15223) @KenanYusuf
109
+ - [DataGrid] Add a recipe to persist column width and order (#15309) @MBilalShafi
110
+
111
+ #### `@mui/x-data-grid-pro@7.22.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
112
+
113
+ Same changes as in `@mui/x-data-grid@7.22.2`, plus:
114
+
115
+ - [DataGridPro] Apply default properties if they are not passed in a reorder column (#15320) @k-rajat19
116
+ - [DataGridPro] Toggle row expansion with `Enter` key in Tree data (#15313) @k-rajat19
117
+
118
+ #### `@mui/x-data-grid-premium@7.22.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
119
+
120
+ Same changes as in `@mui/x-data-grid-pro@7.22.2`, plus:
121
+
122
+ - [DataGridPremium] Fix incorrect rows selection count when selection propagation is enabled with row grouping (#15222) @arminmeh
123
+
124
+ ### Date and Time Pickers
125
+
126
+ #### `@mui/x-date-pickers@7.22.2`
127
+
128
+ - [pickers] Add support for `moment-hijri@3.0.0` (#15248) @LukasTy
129
+
130
+ #### `@mui/x-date-pickers-pro@7.22.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
131
+
132
+ Same changes as in `@mui/x-date-pickers@7.22.2`.
133
+
134
+ ### Charts
135
+
136
+ #### `@mui/x-charts@7.22.2`
137
+
138
+ - [charts] Allow `SeriesValueFormatter` to return `null` value (#15295) @clins1994
139
+ - [charts] Allow configuring the `domainLimit` for each axis. (#15325) @GuillaumeMeheut
140
+
141
+ #### `@mui/x-charts-pro@7.0.0-beta.7` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
142
+
143
+ Same changes as in `@mui/x-charts@7.22.2`.
144
+
6
145
  ## 7.22.1
7
146
 
8
147
  _Nov 1, 2024_
@@ -213,7 +213,8 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
213
213
  range: value,
214
214
  rangePosition,
215
215
  allowRangeFlip,
216
- shouldMergeDateAndTime: true
216
+ shouldMergeDateAndTime: true,
217
+ referenceDate
217
218
  });
218
219
  const isNextSectionAvailable = availableRangePositions.includes(nextSelection);
219
220
  if (isNextSectionAvailable) {
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers-pro v7.22.1
2
+ * @mui/x-date-pickers-pro v7.22.3
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -12,11 +12,12 @@ interface CalculateRangeChangeOptions<TDate extends PickerValidDate> {
12
12
  */
13
13
  allowRangeFlip?: boolean;
14
14
  shouldMergeDateAndTime?: boolean;
15
+ referenceDate?: TDate | null;
15
16
  }
16
17
  interface CalculateRangeChangeResponse<TDate extends PickerValidDate> {
17
18
  nextSelection: RangePosition;
18
19
  newRange: DateRange<TDate>;
19
20
  }
20
- export declare function calculateRangeChange<TDate extends PickerValidDate>({ utils, range, newDate: selectedDate, rangePosition, allowRangeFlip, shouldMergeDateAndTime, }: CalculateRangeChangeOptions<TDate>): CalculateRangeChangeResponse<TDate>;
21
+ export declare function calculateRangeChange<TDate extends PickerValidDate>({ utils, range, newDate: selectedDate, rangePosition, allowRangeFlip, shouldMergeDateAndTime, referenceDate, }: CalculateRangeChangeOptions<TDate>): CalculateRangeChangeResponse<TDate>;
21
22
  export declare function calculateRangePreview<TDate extends PickerValidDate>(options: CalculateRangeChangeOptions<TDate>): DateRange<TDate>;
22
23
  export {};
@@ -5,7 +5,8 @@ export function calculateRangeChange({
5
5
  newDate: selectedDate,
6
6
  rangePosition,
7
7
  allowRangeFlip = false,
8
- shouldMergeDateAndTime = false
8
+ shouldMergeDateAndTime = false,
9
+ referenceDate
9
10
  }) {
10
11
  const [start, end] = range;
11
12
  if (shouldMergeDateAndTime && selectedDate) {
@@ -17,29 +18,30 @@ export function calculateRangeChange({
17
18
  selectedDate = mergeDateAndTime(utils, selectedDate, end);
18
19
  }
19
20
  }
21
+ const newSelectedDate = referenceDate && selectedDate && shouldMergeDateAndTime ? mergeDateAndTime(utils, selectedDate, referenceDate) : selectedDate;
20
22
  if (rangePosition === 'start') {
21
23
  const truthyResult = allowRangeFlip ? {
22
24
  nextSelection: 'start',
23
- newRange: [end, selectedDate]
25
+ newRange: [end, newSelectedDate]
24
26
  } : {
25
27
  nextSelection: 'end',
26
- newRange: [selectedDate, null]
28
+ newRange: [newSelectedDate, null]
27
29
  };
28
- return Boolean(end) && utils.isAfter(selectedDate, end) ? truthyResult : {
30
+ return Boolean(end) && utils.isAfter(newSelectedDate, end) ? truthyResult : {
29
31
  nextSelection: 'end',
30
- newRange: [selectedDate, end]
32
+ newRange: [newSelectedDate, end]
31
33
  };
32
34
  }
33
35
  const truthyResult = allowRangeFlip ? {
34
36
  nextSelection: 'end',
35
- newRange: [selectedDate, start]
37
+ newRange: [newSelectedDate, start]
36
38
  } : {
37
39
  nextSelection: 'end',
38
- newRange: [selectedDate, null]
40
+ newRange: [newSelectedDate, null]
39
41
  };
40
- return Boolean(start) && utils.isBeforeDay(selectedDate, start) ? truthyResult : {
42
+ return Boolean(start) && utils.isBeforeDay(newSelectedDate, start) ? truthyResult : {
41
43
  nextSelection: 'start',
42
- newRange: [start, selectedDate]
44
+ newRange: [start, newSelectedDate]
43
45
  };
44
46
  }
45
47
  export function calculateRangePreview(options) {
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTczMDQzMzYwMDAwMA==";
3
+ const releaseInfo = "MTczMjE0MzYwMDAwMA==";
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
@@ -213,7 +213,8 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
213
213
  range: value,
214
214
  rangePosition,
215
215
  allowRangeFlip,
216
- shouldMergeDateAndTime: true
216
+ shouldMergeDateAndTime: true,
217
+ referenceDate
217
218
  });
218
219
  const isNextSectionAvailable = availableRangePositions.includes(nextSelection);
219
220
  if (isNextSectionAvailable) {
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers-pro v7.22.1
2
+ * @mui/x-date-pickers-pro v7.22.3
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -5,7 +5,8 @@ export function calculateRangeChange({
5
5
  newDate: selectedDate,
6
6
  rangePosition,
7
7
  allowRangeFlip = false,
8
- shouldMergeDateAndTime = false
8
+ shouldMergeDateAndTime = false,
9
+ referenceDate
9
10
  }) {
10
11
  const [start, end] = range;
11
12
  if (shouldMergeDateAndTime && selectedDate) {
@@ -17,29 +18,30 @@ export function calculateRangeChange({
17
18
  selectedDate = mergeDateAndTime(utils, selectedDate, end);
18
19
  }
19
20
  }
21
+ const newSelectedDate = referenceDate && selectedDate && shouldMergeDateAndTime ? mergeDateAndTime(utils, selectedDate, referenceDate) : selectedDate;
20
22
  if (rangePosition === 'start') {
21
23
  const truthyResult = allowRangeFlip ? {
22
24
  nextSelection: 'start',
23
- newRange: [end, selectedDate]
25
+ newRange: [end, newSelectedDate]
24
26
  } : {
25
27
  nextSelection: 'end',
26
- newRange: [selectedDate, null]
28
+ newRange: [newSelectedDate, null]
27
29
  };
28
- return Boolean(end) && utils.isAfter(selectedDate, end) ? truthyResult : {
30
+ return Boolean(end) && utils.isAfter(newSelectedDate, end) ? truthyResult : {
29
31
  nextSelection: 'end',
30
- newRange: [selectedDate, end]
32
+ newRange: [newSelectedDate, end]
31
33
  };
32
34
  }
33
35
  const truthyResult = allowRangeFlip ? {
34
36
  nextSelection: 'end',
35
- newRange: [selectedDate, start]
37
+ newRange: [newSelectedDate, start]
36
38
  } : {
37
39
  nextSelection: 'end',
38
- newRange: [selectedDate, null]
40
+ newRange: [newSelectedDate, null]
39
41
  };
40
- return Boolean(start) && utils.isBeforeDay(selectedDate, start) ? truthyResult : {
42
+ return Boolean(start) && utils.isBeforeDay(newSelectedDate, start) ? truthyResult : {
41
43
  nextSelection: 'start',
42
- newRange: [start, selectedDate]
44
+ newRange: [start, newSelectedDate]
43
45
  };
44
46
  }
45
47
  export function calculateRangePreview(options) {
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTczMDQzMzYwMDAwMA==";
3
+ const releaseInfo = "MTczMjE0MzYwMDAwMA==";
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
@@ -220,7 +220,8 @@ const DateRangeCalendar = exports.DateRangeCalendar = /*#__PURE__*/React.forward
220
220
  range: value,
221
221
  rangePosition,
222
222
  allowRangeFlip,
223
- shouldMergeDateAndTime: true
223
+ shouldMergeDateAndTime: true,
224
+ referenceDate
224
225
  });
225
226
  const isNextSectionAvailable = availableRangePositions.includes(nextSelection);
226
227
  if (isNextSectionAvailable) {
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers-pro v7.22.1
2
+ * @mui/x-date-pickers-pro v7.22.3
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -12,7 +12,8 @@ function calculateRangeChange({
12
12
  newDate: selectedDate,
13
13
  rangePosition,
14
14
  allowRangeFlip = false,
15
- shouldMergeDateAndTime = false
15
+ shouldMergeDateAndTime = false,
16
+ referenceDate
16
17
  }) {
17
18
  const [start, end] = range;
18
19
  if (shouldMergeDateAndTime && selectedDate) {
@@ -24,29 +25,30 @@ function calculateRangeChange({
24
25
  selectedDate = (0, _internals.mergeDateAndTime)(utils, selectedDate, end);
25
26
  }
26
27
  }
28
+ const newSelectedDate = referenceDate && selectedDate && shouldMergeDateAndTime ? (0, _internals.mergeDateAndTime)(utils, selectedDate, referenceDate) : selectedDate;
27
29
  if (rangePosition === 'start') {
28
30
  const truthyResult = allowRangeFlip ? {
29
31
  nextSelection: 'start',
30
- newRange: [end, selectedDate]
32
+ newRange: [end, newSelectedDate]
31
33
  } : {
32
34
  nextSelection: 'end',
33
- newRange: [selectedDate, null]
35
+ newRange: [newSelectedDate, null]
34
36
  };
35
- return Boolean(end) && utils.isAfter(selectedDate, end) ? truthyResult : {
37
+ return Boolean(end) && utils.isAfter(newSelectedDate, end) ? truthyResult : {
36
38
  nextSelection: 'end',
37
- newRange: [selectedDate, end]
39
+ newRange: [newSelectedDate, end]
38
40
  };
39
41
  }
40
42
  const truthyResult = allowRangeFlip ? {
41
43
  nextSelection: 'end',
42
- newRange: [selectedDate, start]
44
+ newRange: [newSelectedDate, start]
43
45
  } : {
44
46
  nextSelection: 'end',
45
- newRange: [selectedDate, null]
47
+ newRange: [newSelectedDate, null]
46
48
  };
47
- return Boolean(start) && utils.isBeforeDay(selectedDate, start) ? truthyResult : {
49
+ return Boolean(start) && utils.isBeforeDay(newSelectedDate, start) ? truthyResult : {
48
50
  nextSelection: 'start',
49
- newRange: [start, selectedDate]
51
+ newRange: [start, newSelectedDate]
50
52
  };
51
53
  }
52
54
  function calculateRangePreview(options) {
@@ -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 = "MTczMDQzMzYwMDAwMA==";
9
+ const releaseInfo = "MTczMjE0MzYwMDAwMA==";
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.22.1",
3
+ "version": "7.22.3",
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,7 +37,7 @@
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.22.1",
40
+ "@mui/x-date-pickers": "7.22.3",
41
41
  "@mui/x-internals": "7.21.0",
42
42
  "@mui/x-license": "7.21.0"
43
43
  },
@@ -51,7 +51,7 @@
51
51
  "dayjs": "^1.10.7",
52
52
  "luxon": "^3.0.2",
53
53
  "moment": "^2.29.4",
54
- "moment-hijri": "^2.1.2",
54
+ "moment-hijri": "^2.1.2 || ^3.0.0",
55
55
  "moment-jalaali": "^0.7.4 || ^0.8.0 || ^0.9.0 || ^0.10.0",
56
56
  "react": "^17.0.0 || ^18.0.0",
57
57
  "react-dom": "^17.0.0 || ^18.0.0"