@mui/x-date-pickers-pro 7.0.0-alpha.1 → 7.0.0-alpha.2

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 (65) hide show
  1. package/CHANGELOG.md +366 -188
  2. package/DateRangeCalendar/DateRangeCalendar.js +2 -8
  3. package/DateRangeCalendar/DateRangeCalendar.types.d.ts +0 -4
  4. package/DateRangeCalendar/useDragRange.js +1 -1
  5. package/DateRangePicker/DateRangePicker.js +1 -5
  6. package/DesktopDateRangePicker/DesktopDateRangePicker.js +1 -5
  7. package/MobileDateRangePicker/MobileDateRangePicker.js +1 -5
  8. package/MultiInputDateRangeField/MultiInputDateRangeField.js +1 -1
  9. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +1 -9
  10. package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +1 -9
  11. package/SingleInputDateRangeField/SingleInputDateRangeField.js +1 -1
  12. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +1 -9
  13. package/SingleInputTimeRangeField/SingleInputTimeRangeField.js +1 -9
  14. package/StaticDateRangePicker/StaticDateRangePicker.js +1 -5
  15. package/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +1 -1
  16. package/dateRangeViewRenderers/dateRangeViewRenderers.js +0 -2
  17. package/index.js +1 -1
  18. package/internals/utils/releaseInfo.js +1 -1
  19. package/legacy/DateRangeCalendar/DateRangeCalendar.js +7 -14
  20. package/legacy/DateRangeCalendar/useDragRange.js +1 -1
  21. package/legacy/DateRangePicker/DateRangePicker.js +1 -5
  22. package/legacy/DateRangePickerDay/DateRangePickerDay.js +3 -4
  23. package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +1 -5
  24. package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +1 -5
  25. package/legacy/MultiInputDateRangeField/MultiInputDateRangeField.js +1 -1
  26. package/legacy/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +1 -9
  27. package/legacy/MultiInputTimeRangeField/MultiInputTimeRangeField.js +1 -9
  28. package/legacy/SingleInputDateRangeField/SingleInputDateRangeField.js +1 -1
  29. package/legacy/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +1 -9
  30. package/legacy/SingleInputTimeRangeField/SingleInputTimeRangeField.js +1 -9
  31. package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +1 -5
  32. package/legacy/dateRangeViewRenderers/dateRangeViewRenderers.js +0 -2
  33. package/legacy/index.js +1 -1
  34. package/legacy/internals/utils/releaseInfo.js +1 -1
  35. package/modern/DateRangeCalendar/DateRangeCalendar.js +2 -8
  36. package/modern/DateRangeCalendar/useDragRange.js +1 -1
  37. package/modern/DateRangePicker/DateRangePicker.js +1 -5
  38. package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +1 -5
  39. package/modern/MobileDateRangePicker/MobileDateRangePicker.js +1 -5
  40. package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +1 -1
  41. package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +1 -9
  42. package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +1 -9
  43. package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +1 -1
  44. package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +1 -9
  45. package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.js +1 -9
  46. package/modern/StaticDateRangePicker/StaticDateRangePicker.js +1 -5
  47. package/modern/dateRangeViewRenderers/dateRangeViewRenderers.js +0 -2
  48. package/modern/index.js +1 -1
  49. package/modern/internals/utils/releaseInfo.js +1 -1
  50. package/node/DateRangeCalendar/DateRangeCalendar.js +2 -8
  51. package/node/DateRangeCalendar/useDragRange.js +1 -1
  52. package/node/DateRangePicker/DateRangePicker.js +1 -5
  53. package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +1 -5
  54. package/node/MobileDateRangePicker/MobileDateRangePicker.js +1 -5
  55. package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +1 -1
  56. package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +1 -9
  57. package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +1 -9
  58. package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +1 -1
  59. package/node/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +1 -9
  60. package/node/SingleInputTimeRangeField/SingleInputTimeRangeField.js +1 -9
  61. package/node/StaticDateRangePicker/StaticDateRangePicker.js +1 -5
  62. package/node/dateRangeViewRenderers/dateRangeViewRenderers.js +0 -2
  63. package/node/index.js +1 -1
  64. package/node/internals/utils/releaseInfo.js +1 -1
  65. package/package.json +6 -5
@@ -19,7 +19,6 @@ export var renderDateRangeViewCalendar = function renderDateRangeViewCalendar(_r
19
19
  shouldDisableDate = _ref.shouldDisableDate,
20
20
  reduceAnimations = _ref.reduceAnimations,
21
21
  onMonthChange = _ref.onMonthChange,
22
- defaultCalendarMonth = _ref.defaultCalendarMonth,
23
22
  rangePosition = _ref.rangePosition,
24
23
  defaultRangePosition = _ref.defaultRangePosition,
25
24
  onRangePositionChange = _ref.onRangePositionChange,
@@ -55,7 +54,6 @@ export var renderDateRangeViewCalendar = function renderDateRangeViewCalendar(_r
55
54
  shouldDisableDate: shouldDisableDate,
56
55
  reduceAnimations: reduceAnimations,
57
56
  onMonthChange: onMonthChange,
58
- defaultCalendarMonth: defaultCalendarMonth,
59
57
  rangePosition: rangePosition,
60
58
  defaultRangePosition: defaultRangePosition,
61
59
  onRangePositionChange: onRangePositionChange,
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers-pro v7.0.0-alpha.1
2
+ * @mui/x-date-pickers-pro v7.0.0-alpha.2
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 = "MTcwMDE3MjAwMDAwMA==";
3
+ var releaseInfo = "MTcwMDY5MDQwMDAwMA==";
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 _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["value", "defaultValue", "referenceDate", "onChange", "className", "disableFuture", "disablePast", "minDate", "maxDate", "shouldDisableDate", "reduceAnimations", "onMonthChange", "defaultCalendarMonth", "rangePosition", "defaultRangePosition", "onRangePositionChange", "calendars", "currentMonthCalendarPosition", "slots", "slotProps", "loading", "renderLoading", "disableHighlightToday", "readOnly", "disabled", "showDaysOutsideCurrentMonth", "dayOfWeekFormatter", "disableAutoMonthSwitching", "autoFocus", "fixedWeekNumber", "disableDragEditing", "displayWeekNumber", "timezone"],
3
+ const _excluded = ["value", "defaultValue", "referenceDate", "onChange", "className", "disableFuture", "disablePast", "minDate", "maxDate", "shouldDisableDate", "reduceAnimations", "onMonthChange", "rangePosition", "defaultRangePosition", "onRangePositionChange", "calendars", "currentMonthCalendarPosition", "slots", "slotProps", "loading", "renderLoading", "disableHighlightToday", "readOnly", "disabled", "showDaysOutsideCurrentMonth", "dayOfWeekFormatter", "disableAutoMonthSwitching", "autoFocus", "fixedWeekNumber", "disableDragEditing", "displayWeekNumber", "timezone"],
4
4
  _excluded2 = ["isDragging", "rangeDragDay", "draggingDatePosition"];
5
5
  import * as React from 'react';
6
6
  import PropTypes from 'prop-types';
@@ -136,7 +136,6 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
136
136
  shouldDisableDate,
137
137
  reduceAnimations,
138
138
  onMonthChange,
139
- defaultCalendarMonth,
140
139
  rangePosition: rangePositionProp,
141
140
  defaultRangePosition: inDefaultRangePosition,
142
141
  onRangePositionChange: inOnRangePositionChange,
@@ -256,7 +255,6 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
256
255
  } = useCalendarState({
257
256
  value: value[0] || value[1],
258
257
  referenceDate,
259
- defaultCalendarMonth,
260
258
  disableFuture,
261
259
  disablePast,
262
260
  disableSwitchToMonthOnDayFocus: true,
@@ -511,10 +509,6 @@ process.env.NODE_ENV !== "production" ? DateRangeCalendar.propTypes = {
511
509
  * @default (_day: string, date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
512
510
  */
513
511
  dayOfWeekFormatter: PropTypes.func,
514
- /**
515
- * Default calendar month displayed when `value={[null, null]}`.
516
- */
517
- defaultCalendarMonth: PropTypes.any,
518
512
  /**
519
513
  * The initial position in the edited date range.
520
514
  * Used when the component is not controlled.
@@ -664,7 +658,7 @@ process.env.NODE_ENV !== "production" ? DateRangeCalendar.propTypes = {
664
658
  * Choose which timezone to use for the value.
665
659
  * Example: "default", "system", "UTC", "America/New_York".
666
660
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
667
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
661
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
668
662
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
669
663
  */
670
664
  timezone: PropTypes.string,
@@ -8,7 +8,7 @@ const resolveDateFromTarget = (target, utils, timezone) => {
8
8
  return null;
9
9
  }
10
10
  const timestamp = +timestampString;
11
- return utils.dateWithTimezone(new Date(timestamp).toISOString(), timezone);
11
+ return utils.date(new Date(timestamp).toISOString(), timezone);
12
12
  };
13
13
  const isSameAsDraggingDate = event => {
14
14
  const timestampString = event.target.dataset.timestamp;
@@ -80,10 +80,6 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
80
80
  * @default (_day: string, date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
81
81
  */
82
82
  dayOfWeekFormatter: PropTypes.func,
83
- /**
84
- * Default calendar month displayed when `value={[null, null]}`.
85
- */
86
- defaultCalendarMonth: PropTypes.any,
87
83
  /**
88
84
  * The initial position in the edited date range.
89
85
  * Used when the component is not controlled.
@@ -316,7 +312,7 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
316
312
  * Choose which timezone to use for the value.
317
313
  * Example: "default", "system", "UTC", "America/New_York".
318
314
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
319
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
315
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
320
316
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
321
317
  */
322
318
  timezone: PropTypes.string,
@@ -91,10 +91,6 @@ DesktopDateRangePicker.propTypes = {
91
91
  * @default (_day: string, date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
92
92
  */
93
93
  dayOfWeekFormatter: PropTypes.func,
94
- /**
95
- * Default calendar month displayed when `value={[null, null]}`.
96
- */
97
- defaultCalendarMonth: PropTypes.any,
98
94
  /**
99
95
  * The initial position in the edited date range.
100
96
  * Used when the component is not controlled.
@@ -321,7 +317,7 @@ DesktopDateRangePicker.propTypes = {
321
317
  * Choose which timezone to use for the value.
322
318
  * Example: "default", "system", "UTC", "America/New_York".
323
319
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
324
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
320
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
325
321
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
326
322
  */
327
323
  timezone: PropTypes.string,
@@ -91,10 +91,6 @@ MobileDateRangePicker.propTypes = {
91
91
  * @default (_day: string, date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
92
92
  */
93
93
  dayOfWeekFormatter: PropTypes.func,
94
- /**
95
- * Default calendar month displayed when `value={[null, null]}`.
96
- */
97
- defaultCalendarMonth: PropTypes.any,
98
94
  /**
99
95
  * The initial position in the edited date range.
100
96
  * Used when the component is not controlled.
@@ -321,7 +317,7 @@ MobileDateRangePicker.propTypes = {
321
317
  * Choose which timezone to use for the value.
322
318
  * Example: "default", "system", "UTC", "America/New_York".
323
319
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
324
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
320
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
325
321
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
326
322
  */
327
323
  timezone: PropTypes.string,
@@ -321,7 +321,7 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
321
321
  * Choose which timezone to use for the value.
322
322
  * Example: "default", "system", "UTC", "America/New_York".
323
323
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
324
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
324
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
325
325
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
326
326
  */
327
327
  timezone: PropTypes.string,
@@ -304,14 +304,6 @@ process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes =
304
304
  endIndex: PropTypes.number.isRequired,
305
305
  startIndex: PropTypes.number.isRequired
306
306
  })]),
307
- /**
308
- * Disable specific clock time.
309
- * @param {number} clockValue The value to check.
310
- * @param {TimeView} view The clock type of the timeValue.
311
- * @returns {boolean} If `true` the time will be disabled.
312
- * @deprecated Consider using `shouldDisableTime`.
313
- */
314
- shouldDisableClock: PropTypes.func,
315
307
  /**
316
308
  * Disable specific date.
317
309
  *
@@ -370,7 +362,7 @@ process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes =
370
362
  * Choose which timezone to use for the value.
371
363
  * Example: "default", "system", "UTC", "America/New_York".
372
364
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
373
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
365
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
374
366
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
375
367
  */
376
368
  timezone: PropTypes.string,
@@ -288,14 +288,6 @@ process.env.NODE_ENV !== "production" ? MultiInputTimeRangeField.propTypes = {
288
288
  endIndex: PropTypes.number.isRequired,
289
289
  startIndex: PropTypes.number.isRequired
290
290
  })]),
291
- /**
292
- * Disable specific clock time.
293
- * @param {number} clockValue The value to check.
294
- * @param {TimeView} view The clock type of the timeValue.
295
- * @returns {boolean} If `true` the time will be disabled.
296
- * @deprecated Consider using `shouldDisableTime`.
297
- */
298
- shouldDisableClock: PropTypes.func,
299
291
  /**
300
292
  * Disable specific time.
301
293
  * @template TDate
@@ -343,7 +335,7 @@ process.env.NODE_ENV !== "production" ? MultiInputTimeRangeField.propTypes = {
343
335
  * Choose which timezone to use for the value.
344
336
  * Example: "default", "system", "UTC", "America/New_York".
345
337
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
346
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
338
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
347
339
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
348
340
  */
349
341
  timezone: PropTypes.string,
@@ -319,7 +319,7 @@ process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
319
319
  * Choose which timezone to use for the value.
320
320
  * Example: "default", "system", "UTC", "America/New_York".
321
321
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
322
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
322
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
323
323
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
324
324
  */
325
325
  timezone: PropTypes.string,
@@ -303,14 +303,6 @@ process.env.NODE_ENV !== "production" ? SingleInputDateTimeRangeField.propTypes
303
303
  endIndex: PropTypes.number.isRequired,
304
304
  startIndex: PropTypes.number.isRequired
305
305
  })]),
306
- /**
307
- * Disable specific clock time.
308
- * @param {number} clockValue The value to check.
309
- * @param {TimeView} view The clock type of the timeValue.
310
- * @returns {boolean} If `true` the time will be disabled.
311
- * @deprecated Consider using `shouldDisableTime`.
312
- */
313
- shouldDisableClock: PropTypes.func,
314
306
  /**
315
307
  * Disable specific date.
316
308
  *
@@ -368,7 +360,7 @@ process.env.NODE_ENV !== "production" ? SingleInputDateTimeRangeField.propTypes
368
360
  * Choose which timezone to use for the value.
369
361
  * Example: "default", "system", "UTC", "America/New_York".
370
362
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
371
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
363
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
372
364
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
373
365
  */
374
366
  timezone: PropTypes.string,
@@ -287,14 +287,6 @@ process.env.NODE_ENV !== "production" ? SingleInputTimeRangeField.propTypes = {
287
287
  endIndex: PropTypes.number.isRequired,
288
288
  startIndex: PropTypes.number.isRequired
289
289
  })]),
290
- /**
291
- * Disable specific clock time.
292
- * @param {number} clockValue The value to check.
293
- * @param {TimeView} view The clock type of the timeValue.
294
- * @returns {boolean} If `true` the time will be disabled.
295
- * @deprecated Consider using `shouldDisableTime`.
296
- */
297
- shouldDisableClock: PropTypes.func,
298
290
  /**
299
291
  * Disable specific time.
300
292
  * @template TDate
@@ -341,7 +333,7 @@ process.env.NODE_ENV !== "production" ? SingleInputTimeRangeField.propTypes = {
341
333
  * Choose which timezone to use for the value.
342
334
  * Example: "default", "system", "UTC", "America/New_York".
343
335
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
344
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
336
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
345
337
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
346
338
  */
347
339
  timezone: PropTypes.string,
@@ -80,10 +80,6 @@ StaticDateRangePicker.propTypes = {
80
80
  * @default (_day: string, date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
81
81
  */
82
82
  dayOfWeekFormatter: PropTypes.func,
83
- /**
84
- * Default calendar month displayed when `value={[null, null]}`.
85
- */
86
- defaultCalendarMonth: PropTypes.any,
87
83
  /**
88
84
  * The initial position in the edited date range.
89
85
  * Used when the component is not controlled.
@@ -262,7 +258,7 @@ StaticDateRangePicker.propTypes = {
262
258
  * Choose which timezone to use for the value.
263
259
  * Example: "default", "system", "UTC", "America/New_York".
264
260
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
265
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
261
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
266
262
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
267
263
  */
268
264
  timezone: PropTypes.string,
@@ -19,7 +19,6 @@ export const renderDateRangeViewCalendar = ({
19
19
  shouldDisableDate,
20
20
  reduceAnimations,
21
21
  onMonthChange,
22
- defaultCalendarMonth,
23
22
  rangePosition,
24
23
  defaultRangePosition,
25
24
  onRangePositionChange,
@@ -55,7 +54,6 @@ export const renderDateRangeViewCalendar = ({
55
54
  shouldDisableDate: shouldDisableDate,
56
55
  reduceAnimations: reduceAnimations,
57
56
  onMonthChange: onMonthChange,
58
- defaultCalendarMonth: defaultCalendarMonth,
59
57
  rangePosition: rangePosition,
60
58
  defaultRangePosition: defaultRangePosition,
61
59
  onRangePositionChange: onRangePositionChange,
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers-pro v7.0.0-alpha.1
2
+ * @mui/x-date-pickers-pro v7.0.0-alpha.2
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 = "MTcwMDE3MjAwMDAwMA==";
3
+ const releaseInfo = "MTcwMDY5MDQwMDAwMA==";
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
@@ -27,7 +27,7 @@ var _valueManagers = require("../internals/utils/valueManagers");
27
27
  var _useDragRange2 = require("./useDragRange");
28
28
  var _useRangePosition = require("../internals/hooks/useRangePosition");
29
29
  var _jsxRuntime = require("react/jsx-runtime");
30
- const _excluded = ["value", "defaultValue", "referenceDate", "onChange", "className", "disableFuture", "disablePast", "minDate", "maxDate", "shouldDisableDate", "reduceAnimations", "onMonthChange", "defaultCalendarMonth", "rangePosition", "defaultRangePosition", "onRangePositionChange", "calendars", "currentMonthCalendarPosition", "slots", "slotProps", "loading", "renderLoading", "disableHighlightToday", "readOnly", "disabled", "showDaysOutsideCurrentMonth", "dayOfWeekFormatter", "disableAutoMonthSwitching", "autoFocus", "fixedWeekNumber", "disableDragEditing", "displayWeekNumber", "timezone"],
30
+ const _excluded = ["value", "defaultValue", "referenceDate", "onChange", "className", "disableFuture", "disablePast", "minDate", "maxDate", "shouldDisableDate", "reduceAnimations", "onMonthChange", "rangePosition", "defaultRangePosition", "onRangePositionChange", "calendars", "currentMonthCalendarPosition", "slots", "slotProps", "loading", "renderLoading", "disableHighlightToday", "readOnly", "disabled", "showDaysOutsideCurrentMonth", "dayOfWeekFormatter", "disableAutoMonthSwitching", "autoFocus", "fixedWeekNumber", "disableDragEditing", "displayWeekNumber", "timezone"],
31
31
  _excluded2 = ["isDragging", "rangeDragDay", "draggingDatePosition"];
32
32
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
33
33
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -144,7 +144,6 @@ const DateRangeCalendar = exports.DateRangeCalendar = /*#__PURE__*/React.forward
144
144
  shouldDisableDate,
145
145
  reduceAnimations,
146
146
  onMonthChange,
147
- defaultCalendarMonth,
148
147
  rangePosition: rangePositionProp,
149
148
  defaultRangePosition: inDefaultRangePosition,
150
149
  onRangePositionChange: inOnRangePositionChange,
@@ -264,7 +263,6 @@ const DateRangeCalendar = exports.DateRangeCalendar = /*#__PURE__*/React.forward
264
263
  } = (0, _internals.useCalendarState)({
265
264
  value: value[0] || value[1],
266
265
  referenceDate,
267
- defaultCalendarMonth,
268
266
  disableFuture,
269
267
  disablePast,
270
268
  disableSwitchToMonthOnDayFocus: true,
@@ -519,10 +517,6 @@ process.env.NODE_ENV !== "production" ? DateRangeCalendar.propTypes = {
519
517
  * @default (_day: string, date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
520
518
  */
521
519
  dayOfWeekFormatter: _propTypes.default.func,
522
- /**
523
- * Default calendar month displayed when `value={[null, null]}`.
524
- */
525
- defaultCalendarMonth: _propTypes.default.any,
526
520
  /**
527
521
  * The initial position in the edited date range.
528
522
  * Used when the component is not controlled.
@@ -672,7 +666,7 @@ process.env.NODE_ENV !== "production" ? DateRangeCalendar.propTypes = {
672
666
  * Choose which timezone to use for the value.
673
667
  * Example: "default", "system", "UTC", "America/New_York".
674
668
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
675
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
669
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
676
670
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
677
671
  */
678
672
  timezone: _propTypes.default.string,
@@ -17,7 +17,7 @@ const resolveDateFromTarget = (target, utils, timezone) => {
17
17
  return null;
18
18
  }
19
19
  const timestamp = +timestampString;
20
- return utils.dateWithTimezone(new Date(timestamp).toISOString(), timezone);
20
+ return utils.date(new Date(timestamp).toISOString(), timezone);
21
21
  };
22
22
  const isSameAsDraggingDate = event => {
23
23
  const timestampString = event.target.dataset.timestamp;
@@ -89,10 +89,6 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
89
89
  * @default (_day: string, date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
90
90
  */
91
91
  dayOfWeekFormatter: _propTypes.default.func,
92
- /**
93
- * Default calendar month displayed when `value={[null, null]}`.
94
- */
95
- defaultCalendarMonth: _propTypes.default.any,
96
92
  /**
97
93
  * The initial position in the edited date range.
98
94
  * Used when the component is not controlled.
@@ -325,7 +321,7 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
325
321
  * Choose which timezone to use for the value.
326
322
  * Example: "default", "system", "UTC", "America/New_York".
327
323
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
328
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
324
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
329
325
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
330
326
  */
331
327
  timezone: _propTypes.default.string,
@@ -100,10 +100,6 @@ DesktopDateRangePicker.propTypes = {
100
100
  * @default (_day: string, date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
101
101
  */
102
102
  dayOfWeekFormatter: _propTypes.default.func,
103
- /**
104
- * Default calendar month displayed when `value={[null, null]}`.
105
- */
106
- defaultCalendarMonth: _propTypes.default.any,
107
103
  /**
108
104
  * The initial position in the edited date range.
109
105
  * Used when the component is not controlled.
@@ -330,7 +326,7 @@ DesktopDateRangePicker.propTypes = {
330
326
  * Choose which timezone to use for the value.
331
327
  * Example: "default", "system", "UTC", "America/New_York".
332
328
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
333
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
329
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
334
330
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
335
331
  */
336
332
  timezone: _propTypes.default.string,
@@ -100,10 +100,6 @@ MobileDateRangePicker.propTypes = {
100
100
  * @default (_day: string, date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
101
101
  */
102
102
  dayOfWeekFormatter: _propTypes.default.func,
103
- /**
104
- * Default calendar month displayed when `value={[null, null]}`.
105
- */
106
- defaultCalendarMonth: _propTypes.default.any,
107
103
  /**
108
104
  * The initial position in the edited date range.
109
105
  * Used when the component is not controlled.
@@ -330,7 +326,7 @@ MobileDateRangePicker.propTypes = {
330
326
  * Choose which timezone to use for the value.
331
327
  * Example: "default", "system", "UTC", "America/New_York".
332
328
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
333
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
329
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
334
330
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
335
331
  */
336
332
  timezone: _propTypes.default.string,
@@ -330,7 +330,7 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
330
330
  * Choose which timezone to use for the value.
331
331
  * Example: "default", "system", "UTC", "America/New_York".
332
332
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
333
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
333
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
334
334
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
335
335
  */
336
336
  timezone: _propTypes.default.string,
@@ -313,14 +313,6 @@ process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes =
313
313
  endIndex: _propTypes.default.number.isRequired,
314
314
  startIndex: _propTypes.default.number.isRequired
315
315
  })]),
316
- /**
317
- * Disable specific clock time.
318
- * @param {number} clockValue The value to check.
319
- * @param {TimeView} view The clock type of the timeValue.
320
- * @returns {boolean} If `true` the time will be disabled.
321
- * @deprecated Consider using `shouldDisableTime`.
322
- */
323
- shouldDisableClock: _propTypes.default.func,
324
316
  /**
325
317
  * Disable specific date.
326
318
  *
@@ -379,7 +371,7 @@ process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes =
379
371
  * Choose which timezone to use for the value.
380
372
  * Example: "default", "system", "UTC", "America/New_York".
381
373
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
382
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
374
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
383
375
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
384
376
  */
385
377
  timezone: _propTypes.default.string,
@@ -297,14 +297,6 @@ process.env.NODE_ENV !== "production" ? MultiInputTimeRangeField.propTypes = {
297
297
  endIndex: _propTypes.default.number.isRequired,
298
298
  startIndex: _propTypes.default.number.isRequired
299
299
  })]),
300
- /**
301
- * Disable specific clock time.
302
- * @param {number} clockValue The value to check.
303
- * @param {TimeView} view The clock type of the timeValue.
304
- * @returns {boolean} If `true` the time will be disabled.
305
- * @deprecated Consider using `shouldDisableTime`.
306
- */
307
- shouldDisableClock: _propTypes.default.func,
308
300
  /**
309
301
  * Disable specific time.
310
302
  * @template TDate
@@ -352,7 +344,7 @@ process.env.NODE_ENV !== "production" ? MultiInputTimeRangeField.propTypes = {
352
344
  * Choose which timezone to use for the value.
353
345
  * Example: "default", "system", "UTC", "America/New_York".
354
346
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
355
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
347
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
356
348
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
357
349
  */
358
350
  timezone: _propTypes.default.string,
@@ -328,7 +328,7 @@ process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
328
328
  * Choose which timezone to use for the value.
329
329
  * Example: "default", "system", "UTC", "America/New_York".
330
330
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
331
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
331
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
332
332
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
333
333
  */
334
334
  timezone: _propTypes.default.string,
@@ -312,14 +312,6 @@ process.env.NODE_ENV !== "production" ? SingleInputDateTimeRangeField.propTypes
312
312
  endIndex: _propTypes.default.number.isRequired,
313
313
  startIndex: _propTypes.default.number.isRequired
314
314
  })]),
315
- /**
316
- * Disable specific clock time.
317
- * @param {number} clockValue The value to check.
318
- * @param {TimeView} view The clock type of the timeValue.
319
- * @returns {boolean} If `true` the time will be disabled.
320
- * @deprecated Consider using `shouldDisableTime`.
321
- */
322
- shouldDisableClock: _propTypes.default.func,
323
315
  /**
324
316
  * Disable specific date.
325
317
  *
@@ -377,7 +369,7 @@ process.env.NODE_ENV !== "production" ? SingleInputDateTimeRangeField.propTypes
377
369
  * Choose which timezone to use for the value.
378
370
  * Example: "default", "system", "UTC", "America/New_York".
379
371
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
380
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
372
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
381
373
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
382
374
  */
383
375
  timezone: _propTypes.default.string,
@@ -296,14 +296,6 @@ process.env.NODE_ENV !== "production" ? SingleInputTimeRangeField.propTypes = {
296
296
  endIndex: _propTypes.default.number.isRequired,
297
297
  startIndex: _propTypes.default.number.isRequired
298
298
  })]),
299
- /**
300
- * Disable specific clock time.
301
- * @param {number} clockValue The value to check.
302
- * @param {TimeView} view The clock type of the timeValue.
303
- * @returns {boolean} If `true` the time will be disabled.
304
- * @deprecated Consider using `shouldDisableTime`.
305
- */
306
- shouldDisableClock: _propTypes.default.func,
307
299
  /**
308
300
  * Disable specific time.
309
301
  * @template TDate
@@ -350,7 +342,7 @@ process.env.NODE_ENV !== "production" ? SingleInputTimeRangeField.propTypes = {
350
342
  * Choose which timezone to use for the value.
351
343
  * Example: "default", "system", "UTC", "America/New_York".
352
344
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
353
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
345
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
354
346
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
355
347
  */
356
348
  timezone: _propTypes.default.string,
@@ -89,10 +89,6 @@ StaticDateRangePicker.propTypes = {
89
89
  * @default (_day: string, date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
90
90
  */
91
91
  dayOfWeekFormatter: _propTypes.default.func,
92
- /**
93
- * Default calendar month displayed when `value={[null, null]}`.
94
- */
95
- defaultCalendarMonth: _propTypes.default.any,
96
92
  /**
97
93
  * The initial position in the edited date range.
98
94
  * Used when the component is not controlled.
@@ -271,7 +267,7 @@ StaticDateRangePicker.propTypes = {
271
267
  * Choose which timezone to use for the value.
272
268
  * Example: "default", "system", "UTC", "America/New_York".
273
269
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
274
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
270
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
275
271
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
276
272
  */
277
273
  timezone: _propTypes.default.string,
@@ -27,7 +27,6 @@ const renderDateRangeViewCalendar = ({
27
27
  shouldDisableDate,
28
28
  reduceAnimations,
29
29
  onMonthChange,
30
- defaultCalendarMonth,
31
30
  rangePosition,
32
31
  defaultRangePosition,
33
32
  onRangePositionChange,
@@ -63,7 +62,6 @@ const renderDateRangeViewCalendar = ({
63
62
  shouldDisableDate: shouldDisableDate,
64
63
  reduceAnimations: reduceAnimations,
65
64
  onMonthChange: onMonthChange,
66
- defaultCalendarMonth: defaultCalendarMonth,
67
65
  rangePosition: rangePosition,
68
66
  defaultRangePosition: defaultRangePosition,
69
67
  onRangePositionChange: onRangePositionChange,
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers-pro v7.0.0-alpha.1
2
+ * @mui/x-date-pickers-pro v7.0.0-alpha.2
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 = "MTcwMDE3MjAwMDAwMA==";
9
+ const releaseInfo = "MTcwMDY5MDQwMDAwMA==";
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