@mui/x-date-pickers-pro 6.11.0 → 6.11.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 (108) hide show
  1. package/CHANGELOG.md +119 -1
  2. package/DateRangeCalendar/DateRangeCalendar.js +2 -2
  3. package/DateRangeCalendar/DateRangeCalendar.types.d.ts +2 -2
  4. package/DateRangePicker/DateRangePicker.js +2 -2
  5. package/DateRangePickerDay/DateRangePickerDay.js +1 -0
  6. package/DesktopDateRangePicker/DesktopDateRangePicker.js +2 -2
  7. package/MobileDateRangePicker/MobileDateRangePicker.js +2 -2
  8. package/MultiInputDateRangeField/MultiInputDateRangeField.d.ts +3 -0
  9. package/MultiInputDateRangeField/MultiInputDateRangeField.js +27 -4
  10. package/MultiInputDateRangeField/MultiInputDateRangeField.types.d.ts +5 -0
  11. package/MultiInputDateRangeField/index.d.ts +1 -1
  12. package/MultiInputDateRangeField/index.js +1 -1
  13. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.d.ts +3 -0
  14. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +27 -4
  15. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.d.ts +5 -0
  16. package/MultiInputDateTimeRangeField/index.d.ts +1 -1
  17. package/MultiInputDateTimeRangeField/index.js +1 -1
  18. package/MultiInputTimeRangeField/MultiInputTimeRangeField.d.ts +3 -0
  19. package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +27 -4
  20. package/MultiInputTimeRangeField/MultiInputTimeRangeField.types.d.ts +5 -0
  21. package/MultiInputTimeRangeField/index.d.ts +1 -1
  22. package/MultiInputTimeRangeField/index.js +1 -1
  23. package/SingleInputDateRangeField/SingleInputDateRangeField.js +1 -0
  24. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +1 -0
  25. package/SingleInputTimeRangeField/SingleInputTimeRangeField.js +1 -0
  26. package/StaticDateRangePicker/StaticDateRangePicker.js +2 -2
  27. package/index.js +1 -1
  28. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +3 -1
  29. package/internals/utils/releaseInfo.js +1 -1
  30. package/legacy/DateRangeCalendar/DateRangeCalendar.js +2 -2
  31. package/legacy/DateRangePicker/DateRangePicker.js +2 -2
  32. package/legacy/DateRangePickerDay/DateRangePickerDay.js +1 -0
  33. package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +2 -2
  34. package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +2 -2
  35. package/legacy/MultiInputDateRangeField/MultiInputDateRangeField.js +26 -3
  36. package/legacy/MultiInputDateRangeField/index.js +1 -1
  37. package/legacy/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +26 -3
  38. package/legacy/MultiInputDateTimeRangeField/index.js +1 -1
  39. package/legacy/MultiInputTimeRangeField/MultiInputTimeRangeField.js +26 -3
  40. package/legacy/MultiInputTimeRangeField/index.js +1 -1
  41. package/legacy/SingleInputDateRangeField/SingleInputDateRangeField.js +1 -0
  42. package/legacy/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +1 -0
  43. package/legacy/SingleInputTimeRangeField/SingleInputTimeRangeField.js +1 -0
  44. package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +2 -2
  45. package/legacy/index.js +1 -1
  46. package/legacy/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +3 -1
  47. package/legacy/internals/utils/releaseInfo.js +1 -1
  48. package/legacy/models/index.js +2 -1
  49. package/legacy/models/multiInputRangeFieldClasses.js +1 -0
  50. package/legacy/tests/describeRangeValidation/testDayViewRangeValidation.js +1 -1
  51. package/legacy/tests/describeRangeValidation/testTextFieldKeyboardRangeValidation.js +1 -1
  52. package/legacy/tests/describeRangeValidation/testTextFieldRangeValidation.js +1 -1
  53. package/models/index.d.ts +1 -0
  54. package/models/index.js +2 -1
  55. package/models/multiInputRangeFieldClasses.d.ts +7 -0
  56. package/models/multiInputRangeFieldClasses.js +1 -0
  57. package/modern/DateRangeCalendar/DateRangeCalendar.js +2 -2
  58. package/modern/DateRangePicker/DateRangePicker.js +2 -2
  59. package/modern/DateRangePickerDay/DateRangePickerDay.js +1 -0
  60. package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +2 -2
  61. package/modern/MobileDateRangePicker/MobileDateRangePicker.js +2 -2
  62. package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +27 -4
  63. package/modern/MultiInputDateRangeField/index.js +1 -1
  64. package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +27 -4
  65. package/modern/MultiInputDateTimeRangeField/index.js +1 -1
  66. package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +27 -4
  67. package/modern/MultiInputTimeRangeField/index.js +1 -1
  68. package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +1 -0
  69. package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +1 -0
  70. package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.js +1 -0
  71. package/modern/StaticDateRangePicker/StaticDateRangePicker.js +2 -2
  72. package/modern/index.js +1 -1
  73. package/modern/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +3 -1
  74. package/modern/internals/utils/releaseInfo.js +1 -1
  75. package/modern/models/index.js +2 -1
  76. package/modern/models/multiInputRangeFieldClasses.js +1 -0
  77. package/modern/tests/describeRangeValidation/testDayViewRangeValidation.js +1 -1
  78. package/modern/tests/describeRangeValidation/testTextFieldKeyboardRangeValidation.js +1 -1
  79. package/modern/tests/describeRangeValidation/testTextFieldRangeValidation.js +1 -1
  80. package/node/DateRangeCalendar/DateRangeCalendar.js +2 -2
  81. package/node/DateRangePicker/DateRangePicker.js +2 -2
  82. package/node/DateRangePickerDay/DateRangePickerDay.js +1 -0
  83. package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +2 -2
  84. package/node/MobileDateRangePicker/MobileDateRangePicker.js +2 -2
  85. package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +30 -5
  86. package/node/MultiInputDateRangeField/index.js +12 -0
  87. package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +30 -5
  88. package/node/MultiInputDateTimeRangeField/index.js +12 -0
  89. package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +30 -5
  90. package/node/MultiInputTimeRangeField/index.js +12 -0
  91. package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +1 -0
  92. package/node/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +1 -0
  93. package/node/SingleInputTimeRangeField/SingleInputTimeRangeField.js +1 -0
  94. package/node/StaticDateRangePicker/StaticDateRangePicker.js +2 -2
  95. package/node/index.js +1 -1
  96. package/node/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +3 -1
  97. package/node/internals/utils/releaseInfo.js +1 -1
  98. package/node/models/index.js +11 -0
  99. package/node/models/multiInputRangeFieldClasses.js +5 -0
  100. package/node/tests/describeRangeValidation/testDayViewRangeValidation.js +21 -21
  101. package/node/tests/describeRangeValidation/testTextFieldKeyboardRangeValidation.js +30 -30
  102. package/node/tests/describeRangeValidation/testTextFieldRangeValidation.js +32 -32
  103. package/package.json +4 -4
  104. package/tests/describeRangeValidation/testDayViewRangeValidation.js +1 -1
  105. package/tests/describeRangeValidation/testTextFieldKeyboardRangeValidation.js +1 -1
  106. package/tests/describeRangeValidation/testTextFieldRangeValidation.js +1 -1
  107. package/themeAugmentation/components.d.ts +0 -7
  108. package/themeAugmentation/overrides.d.ts +4 -14
@@ -10,7 +10,7 @@ var React = _interopRequireWildcard(require("react"));
10
10
  var _chai = require("chai");
11
11
  var _sinon = require("sinon");
12
12
  var _utils = require("@mui/monorepo/test/utils");
13
- var _pickersUtils = require("test/utils/pickers-utils");
13
+ var _pickers = require("test/utils/pickers");
14
14
  var _jsxRuntime = require("react/jsx-runtime");
15
15
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -23,7 +23,7 @@ const testInvalidStatus = (expectedAnswer, isSingleInput) => {
23
23
  });
24
24
  };
25
25
  const dateParser = value => {
26
- return value.map(date => date === null ? date : _pickersUtils.adapterToUse.date(new Date(...date)));
26
+ return value.map(date => date === null ? date : _pickers.adapterToUse.date(new Date(...date)));
27
27
  };
28
28
  const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
29
29
  const {
@@ -66,7 +66,7 @@ const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
66
66
  } = render( /*#__PURE__*/(0, _jsxRuntime.jsx)(ElementToTest, {
67
67
  onError: onErrorMock,
68
68
  value: dateParser([[2018, 2, 9], [2018, 2, 10]]),
69
- shouldDisableDate: date => _pickersUtils.adapterToUse.isAfter(date, _pickersUtils.adapterToUse.date(new Date(2018, 2, 10)))
69
+ shouldDisableDate: date => _pickers.adapterToUse.isAfter(date, _pickers.adapterToUse.date(new Date(2018, 2, 10)))
70
70
  }));
71
71
  (0, _chai.expect)(onErrorMock.callCount).to.equal(0);
72
72
  testInvalidStatus([false, false], isSingleInput);
@@ -84,7 +84,7 @@ const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
84
84
  testInvalidStatus([true, true], isSingleInput);
85
85
  setProps({
86
86
  value: dateParser([[2018, 2, 12], [2018, 2, 13]]),
87
- shouldDisableDate: date => _pickersUtils.adapterToUse.isBefore(date, _pickersUtils.adapterToUse.date(new Date(2018, 2, 13)))
87
+ shouldDisableDate: date => _pickers.adapterToUse.isBefore(date, _pickers.adapterToUse.date(new Date(2018, 2, 13)))
88
88
  });
89
89
  (0, _chai.expect)(onErrorMock.callCount).to.equal(3);
90
90
  (0, _chai.expect)(onErrorMock.lastCall.args[0]).to.deep.equal(['shouldDisableDate', null]);
@@ -100,7 +100,7 @@ const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
100
100
  } = render( /*#__PURE__*/(0, _jsxRuntime.jsx)(ElementToTest, {
101
101
  onError: onErrorMock,
102
102
  value: dateParser([[2018, 2, 9], [2018, 2, 10]]),
103
- shouldDisableDate: (date, position) => position === 'end' ? _pickersUtils.adapterToUse.isAfter(date, _pickersUtils.adapterToUse.date(new Date(2018, 2, 10))) : false
103
+ shouldDisableDate: (date, position) => position === 'end' ? _pickers.adapterToUse.isAfter(date, _pickers.adapterToUse.date(new Date(2018, 2, 10))) : false
104
104
  }));
105
105
  (0, _chai.expect)(onErrorMock.callCount).to.equal(0);
106
106
  testInvalidStatus([false, false], isSingleInput);
@@ -118,7 +118,7 @@ const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
118
118
  testInvalidStatus([false, true], isSingleInput);
119
119
  setProps({
120
120
  value: dateParser([[2018, 2, 12], [2018, 2, 13]]),
121
- shouldDisableDate: (date, position) => position === 'end' ? _pickersUtils.adapterToUse.isBefore(date, _pickersUtils.adapterToUse.date(new Date(2018, 2, 13))) : false
121
+ shouldDisableDate: (date, position) => position === 'end' ? _pickers.adapterToUse.isBefore(date, _pickers.adapterToUse.date(new Date(2018, 2, 13))) : false
122
122
  });
123
123
  (0, _chai.expect)(onErrorMock.callCount).to.equal(2);
124
124
  (0, _chai.expect)(onErrorMock.lastCall.args[0]).to.deep.equal([null, null]);
@@ -134,7 +134,7 @@ const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
134
134
  } = render( /*#__PURE__*/(0, _jsxRuntime.jsx)(ElementToTest, {
135
135
  onError: onErrorMock,
136
136
  value: dateParser([[2018, 2, 9], [2018, 2, 10]]),
137
- shouldDisableDate: (date, position) => position === 'start' ? _pickersUtils.adapterToUse.isAfter(date, _pickersUtils.adapterToUse.date(new Date(2018, 2, 10))) : false
137
+ shouldDisableDate: (date, position) => position === 'start' ? _pickers.adapterToUse.isAfter(date, _pickers.adapterToUse.date(new Date(2018, 2, 10))) : false
138
138
  }));
139
139
  (0, _chai.expect)(onErrorMock.callCount).to.equal(0);
140
140
  testInvalidStatus([false, false], isSingleInput);
@@ -150,7 +150,7 @@ const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
150
150
  (0, _chai.expect)(onErrorMock.lastCall.args[0]).to.deep.equal(['shouldDisableDate', null]);
151
151
  testInvalidStatus([true, false], isSingleInput);
152
152
  setProps({
153
- shouldDisableDate: (date, position) => position === 'start' ? _pickersUtils.adapterToUse.isBefore(date, _pickersUtils.adapterToUse.date(new Date(2018, 2, 13))) : false
153
+ shouldDisableDate: (date, position) => position === 'start' ? _pickers.adapterToUse.isBefore(date, _pickers.adapterToUse.date(new Date(2018, 2, 13))) : false
154
154
  });
155
155
  (0, _chai.expect)(onErrorMock.callCount).to.equal(1);
156
156
  testInvalidStatus([true, false], isSingleInput);
@@ -159,7 +159,7 @@ const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
159
159
  const onErrorMock = (0, _sinon.spy)();
160
160
  let now;
161
161
  function WithFakeTimer(props) {
162
- now = _pickersUtils.adapterToUse.date(new Date());
162
+ now = _pickers.adapterToUse.date(new Date());
163
163
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(ElementToTest, (0, _extends2.default)({
164
164
  value: [now, now]
165
165
  }, props));
@@ -172,9 +172,9 @@ const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
172
172
  }));
173
173
  let past = null;
174
174
  if (withDate) {
175
- past = _pickersUtils.adapterToUse.addDays(now, -1);
176
- } else if (_pickersUtils.adapterToUse.isSameDay(_pickersUtils.adapterToUse.addHours(now, -1), now)) {
177
- past = _pickersUtils.adapterToUse.addHours(now, -1);
175
+ past = _pickers.adapterToUse.addDays(now, -1);
176
+ } else if (_pickers.adapterToUse.isSameDay(_pickers.adapterToUse.addHours(now, -1), now)) {
177
+ past = _pickers.adapterToUse.addHours(now, -1);
178
178
  }
179
179
  if (past === null) {
180
180
  return;
@@ -196,7 +196,7 @@ const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
196
196
  const onErrorMock = (0, _sinon.spy)();
197
197
  let now;
198
198
  function WithFakeTimer(props) {
199
- now = _pickersUtils.adapterToUse.date(new Date());
199
+ now = _pickers.adapterToUse.date(new Date());
200
200
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(ElementToTest, (0, _extends2.default)({
201
201
  value: [now, now]
202
202
  }, props));
@@ -209,9 +209,9 @@ const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
209
209
  }));
210
210
  let future = null;
211
211
  if (withDate) {
212
- future = _pickersUtils.adapterToUse.addDays(now, 1);
213
- } else if (_pickersUtils.adapterToUse.isSameDay(_pickersUtils.adapterToUse.addHours(now, 1), now)) {
214
- future = _pickersUtils.adapterToUse.addHours(now, 1);
212
+ future = _pickers.adapterToUse.addDays(now, 1);
213
+ } else if (_pickers.adapterToUse.isSameDay(_pickers.adapterToUse.addHours(now, 1), now)) {
214
+ future = _pickers.adapterToUse.addHours(now, 1);
215
215
  }
216
216
  if (future === null) {
217
217
  return;
@@ -239,7 +239,7 @@ const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
239
239
  } = render( /*#__PURE__*/(0, _jsxRuntime.jsx)(ElementToTest, {
240
240
  onError: onErrorMock,
241
241
  value: dateParser([[2018, 2, 9], [2018, 2, 10]]),
242
- minDate: _pickersUtils.adapterToUse.date(new Date(2018, 2, 15))
242
+ minDate: _pickers.adapterToUse.date(new Date(2018, 2, 15))
243
243
  }));
244
244
  (0, _chai.expect)(onErrorMock.callCount).to.equal(1);
245
245
  (0, _chai.expect)(onErrorMock.lastCall.args[0]).to.deep.equal(['minDate', 'minDate']);
@@ -267,7 +267,7 @@ const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
267
267
  } = render( /*#__PURE__*/(0, _jsxRuntime.jsx)(ElementToTest, {
268
268
  onError: onErrorMock,
269
269
  value: dateParser([[2018, 2, 9], null]),
270
- minDate: _pickersUtils.adapterToUse.date(new Date(2018, 2, 11))
270
+ minDate: _pickers.adapterToUse.date(new Date(2018, 2, 11))
271
271
  }));
272
272
  (0, _chai.expect)(onErrorMock.callCount).to.equal(1);
273
273
  (0, _chai.expect)(onErrorMock.lastCall.args[0]).to.deep.equal(['minDate', null]);
@@ -289,7 +289,7 @@ const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
289
289
  } = render( /*#__PURE__*/(0, _jsxRuntime.jsx)(ElementToTest, {
290
290
  onError: onErrorMock,
291
291
  value: dateParser([null, [2018, 2, 9]]),
292
- minDate: _pickersUtils.adapterToUse.date(new Date(2018, 2, 15))
292
+ minDate: _pickers.adapterToUse.date(new Date(2018, 2, 15))
293
293
  }));
294
294
  (0, _chai.expect)(onErrorMock.callCount).to.equal(1);
295
295
  (0, _chai.expect)(onErrorMock.lastCall.args[0]).to.deep.equal([null, 'minDate']);
@@ -311,7 +311,7 @@ const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
311
311
  } = render( /*#__PURE__*/(0, _jsxRuntime.jsx)(ElementToTest, {
312
312
  onError: onErrorMock,
313
313
  value: dateParser([[2018, 2, 9], [2018, 2, 10]]),
314
- maxDate: _pickersUtils.adapterToUse.date(new Date(2018, 2, 15))
314
+ maxDate: _pickers.adapterToUse.date(new Date(2018, 2, 15))
315
315
  }));
316
316
  (0, _chai.expect)(onErrorMock.callCount).to.equal(0);
317
317
  testInvalidStatus([false, false], isSingleInput);
@@ -338,7 +338,7 @@ const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
338
338
  } = render( /*#__PURE__*/(0, _jsxRuntime.jsx)(ElementToTest, {
339
339
  onError: onErrorMock,
340
340
  value: dateParser([[2018, 2, 10, 9, 0, 0], [2018, 2, 10, 10, 0, 0]]),
341
- minTime: _pickersUtils.adapterToUse.date(new Date(2018, 2, 10, 12, 0))
341
+ minTime: _pickers.adapterToUse.date(new Date(2018, 2, 10, 12, 0))
342
342
  }));
343
343
  (0, _chai.expect)(onErrorMock.callCount).to.equal(1);
344
344
  (0, _chai.expect)(onErrorMock.lastCall.args[0]).to.deep.equal(['minTime', 'minTime']);
@@ -366,7 +366,7 @@ const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
366
366
  } = render( /*#__PURE__*/(0, _jsxRuntime.jsx)(ElementToTest, {
367
367
  onError: onErrorMock,
368
368
  value: dateParser([[2018, 2, 5, 9, 0, 0], [2018, 2, 15, 10, 0, 0]]),
369
- minTime: _pickersUtils.adapterToUse.date(new Date(2018, 2, 10, 12, 0))
369
+ minTime: _pickers.adapterToUse.date(new Date(2018, 2, 10, 12, 0))
370
370
  }));
371
371
  (0, _chai.expect)(onErrorMock.callCount).to.equal(1);
372
372
  (0, _chai.expect)(onErrorMock.lastCall.args[0]).to.deep.equal(['minTime', 'minTime']);
@@ -388,7 +388,7 @@ const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
388
388
  } = render( /*#__PURE__*/(0, _jsxRuntime.jsx)(ElementToTest, {
389
389
  onError: onErrorMock,
390
390
  value: dateParser([[2018, 1, 1, 15], null]),
391
- minTime: _pickersUtils.adapterToUse.date(new Date(2018, 1, 1, 12))
391
+ minTime: _pickers.adapterToUse.date(new Date(2018, 1, 1, 12))
392
392
  }));
393
393
  (0, _chai.expect)(onErrorMock.callCount).to.equal(0);
394
394
  testInvalidStatus([false, false], isSingleInput);
@@ -409,7 +409,7 @@ const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
409
409
  } = render( /*#__PURE__*/(0, _jsxRuntime.jsx)(ElementToTest, {
410
410
  onError: onErrorMock,
411
411
  value: dateParser([null, [2018, 1, 1, 15]]),
412
- minTime: _pickersUtils.adapterToUse.date(new Date(2018, 1, 1, 12))
412
+ minTime: _pickers.adapterToUse.date(new Date(2018, 1, 1, 12))
413
413
  }));
414
414
  (0, _chai.expect)(onErrorMock.callCount).to.equal(0);
415
415
  testInvalidStatus([false, false], isSingleInput);
@@ -430,7 +430,7 @@ const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
430
430
  } = render( /*#__PURE__*/(0, _jsxRuntime.jsx)(ElementToTest, {
431
431
  onError: onErrorMock,
432
432
  value: dateParser([[2018, 2, 10, 9, 0, 0], [2018, 2, 10, 10, 0, 0]]),
433
- maxTime: _pickersUtils.adapterToUse.date(new Date(2018, 2, 10, 12, 0))
433
+ maxTime: _pickers.adapterToUse.date(new Date(2018, 2, 10, 12, 0))
434
434
  }));
435
435
  (0, _chai.expect)(onErrorMock.callCount).to.equal(0);
436
436
  testInvalidStatus([false, false], isSingleInput);
@@ -457,7 +457,7 @@ const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
457
457
  } = render( /*#__PURE__*/(0, _jsxRuntime.jsx)(ElementToTest, {
458
458
  onError: onErrorMock,
459
459
  value: dateParser([[2018, 2, 5, 9, 0, 0], [2018, 2, 15, 10, 0, 0]]),
460
- maxTime: _pickersUtils.adapterToUse.date(new Date(2018, 2, 10, 12, 0))
460
+ maxTime: _pickers.adapterToUse.date(new Date(2018, 2, 10, 12, 0))
461
461
  }));
462
462
  (0, _chai.expect)(onErrorMock.callCount).to.equal(0);
463
463
  testInvalidStatus([false, false], isSingleInput);
@@ -479,18 +479,18 @@ const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
479
479
  } = render( /*#__PURE__*/(0, _jsxRuntime.jsx)(ElementToTest, {
480
480
  onError: onErrorMock,
481
481
  value: dateParser([[2018, 2, 1, 9, 0, 0], [2018, 2, 2, 12, 0, 0]]),
482
- maxDateTime: _pickersUtils.adapterToUse.date(new Date(2018, 2, 2, 13, 0))
482
+ maxDateTime: _pickers.adapterToUse.date(new Date(2018, 2, 2, 13, 0))
483
483
  }));
484
484
  (0, _chai.expect)(onErrorMock.callCount).to.equal(0);
485
485
  testInvalidStatus([false, false], isSingleInput);
486
486
  setProps({
487
- maxDateTime: _pickersUtils.adapterToUse.date(new Date(2018, 2, 2, 8, 0))
487
+ maxDateTime: _pickers.adapterToUse.date(new Date(2018, 2, 2, 8, 0))
488
488
  });
489
489
  (0, _chai.expect)(onErrorMock.callCount).to.equal(1);
490
490
  (0, _chai.expect)(onErrorMock.lastCall.args[0]).to.deep.equal([null, 'maxTime']);
491
491
  testInvalidStatus([false, true], isSingleInput);
492
492
  setProps({
493
- maxDateTime: _pickersUtils.adapterToUse.date(new Date(2018, 2, 1, 5, 0))
493
+ maxDateTime: _pickers.adapterToUse.date(new Date(2018, 2, 1, 5, 0))
494
494
  });
495
495
  (0, _chai.expect)(onErrorMock.callCount).to.equal(2);
496
496
  (0, _chai.expect)(onErrorMock.lastCall.args[0]).to.deep.equal(['maxTime', 'maxDate']);
@@ -507,19 +507,19 @@ const testTextFieldRangeValidation = (ElementToTest, getOptions) => {
507
507
  } = render( /*#__PURE__*/(0, _jsxRuntime.jsx)(ElementToTest, {
508
508
  onError: onErrorMock,
509
509
  value: dateParser([[2018, 2, 1, 9, 0, 0], [2018, 2, 2, 12, 0, 0]]),
510
- minDateTime: _pickersUtils.adapterToUse.date(new Date(2018, 2, 2, 13, 0))
510
+ minDateTime: _pickers.adapterToUse.date(new Date(2018, 2, 2, 13, 0))
511
511
  }));
512
512
  (0, _chai.expect)(onErrorMock.callCount).to.equal(1);
513
513
  (0, _chai.expect)(onErrorMock.lastCall.args[0]).to.deep.equal(['minDate', 'minTime']);
514
514
  testInvalidStatus([true, true], isSingleInput);
515
515
  setProps({
516
- minDateTime: _pickersUtils.adapterToUse.date(new Date(2018, 2, 2, 8, 0))
516
+ minDateTime: _pickers.adapterToUse.date(new Date(2018, 2, 2, 8, 0))
517
517
  });
518
518
  (0, _chai.expect)(onErrorMock.callCount).to.equal(2);
519
519
  (0, _chai.expect)(onErrorMock.lastCall.args[0]).to.deep.equal(['minDate', null]);
520
520
  testInvalidStatus([true, false], isSingleInput);
521
521
  setProps({
522
- minDateTime: _pickersUtils.adapterToUse.date(new Date(2018, 2, 1, 5, 0))
522
+ minDateTime: _pickers.adapterToUse.date(new Date(2018, 2, 1, 5, 0))
523
523
  });
524
524
  (0, _chai.expect)(onErrorMock.callCount).to.equal(3);
525
525
  (0, _chai.expect)(onErrorMock.lastCall.args[0]).to.deep.equal([null, null]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-date-pickers-pro",
3
- "version": "6.11.0",
3
+ "version": "6.11.2",
4
4
  "description": "The commercial edition of the date picker components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -31,10 +31,10 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.22.6",
34
- "@mui/utils": "^5.14.1",
35
- "@mui/x-date-pickers": "6.11.0",
34
+ "@mui/utils": "^5.14.5",
35
+ "@mui/x-date-pickers": "6.11.2",
36
36
  "@mui/x-license-pro": "6.10.2",
37
- "clsx": "^1.2.1",
37
+ "clsx": "^2.0.0",
38
38
  "prop-types": "^15.8.1",
39
39
  "react-transition-group": "^4.4.5"
40
40
  },
@@ -5,7 +5,7 @@ const _excluded = ["defaultCalendarMonth"],
5
5
  import * as React from 'react';
6
6
  import { expect } from 'chai';
7
7
  import { screen } from '@mui/monorepo/test/utils';
8
- import { adapterToUse } from 'test/utils/pickers-utils';
8
+ import { adapterToUse } from 'test/utils/pickers';
9
9
  import { jsx as _jsx } from "react/jsx-runtime";
10
10
  const isDisable = el => el.getAttribute('disabled') !== null;
11
11
  const testDisabledDate = (day, expectedAnswer, isDesktop) => {
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { expect } from 'chai';
3
3
  import { spy } from 'sinon';
4
4
  import { screen } from '@mui/monorepo/test/utils';
5
- import { adapterToUse } from 'test/utils/pickers-utils';
5
+ import { adapterToUse } from 'test/utils/pickers';
6
6
  import { act } from '@mui/monorepo/test/utils/createRenderer';
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  const testInvalidStatus = (expectedAnswer, isSingleInput) => {
@@ -3,7 +3,7 @@ import * as React from 'react';
3
3
  import { expect } from 'chai';
4
4
  import { spy } from 'sinon';
5
5
  import { screen } from '@mui/monorepo/test/utils';
6
- import { adapterToUse } from 'test/utils/pickers-utils';
6
+ import { adapterToUse } from 'test/utils/pickers';
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  const testInvalidStatus = (expectedAnswer, isSingleInput) => {
9
9
  const answers = isSingleInput ? [expectedAnswer[0] || expectedAnswer[1]] : expectedAnswer;
@@ -31,33 +31,26 @@ export interface PickersProComponents<Theme = unknown> {
31
31
  // Single input range fields
32
32
  MuiSingleInputDateRangeField?: {
33
33
  defaultProps?: ComponentsProps['MuiSingleInputDateRangeField'];
34
- styleOverrides?: ComponentsOverrides['MuiSingleInputDateRangeField'];
35
34
  };
36
35
  MuiSingleInputDateTimeRangeField?: {
37
36
  defaultProps?: ComponentsProps['MuiSingleInputDateTimeRangeField'];
38
- styleOverrides?: ComponentsOverrides['MuiSingleInputDateTimeRangeField'];
39
37
  };
40
38
  MuiSingleInputTimeRangeField?: {
41
39
  defaultProps?: ComponentsProps['MuiSingleInputTimeRangeField'];
42
- styleOverrides?: ComponentsOverrides['MuiSingleInputTimeRangeField'];
43
40
  };
44
41
 
45
42
  // Date Range Pickers
46
43
  MuiDateRangePicker?: {
47
44
  defaultProps?: ComponentsProps['MuiDateRangePicker'];
48
- styleOverrides?: ComponentsOverrides<Theme>['MuiDateRangePicker'];
49
45
  };
50
46
  MuiDesktopDateRangePicker?: {
51
47
  defaultProps?: ComponentsProps['MuiDesktopDateRangePicker'];
52
- styleOverrides?: ComponentsOverrides<Theme>['MuiDesktopDateRangePicker'];
53
48
  };
54
49
  MuiMobileDateRangePicker?: {
55
50
  defaultProps?: ComponentsProps['MuiMobileDateRangePicker'];
56
- styleOverrides?: ComponentsOverrides<Theme>['MuiMobileDateRangePicker'];
57
51
  };
58
52
  MuiStaticDateRangePicker?: {
59
53
  defaultProps?: ComponentsProps['MuiStaticDateRangePicker'];
60
- styleOverrides?: ComponentsOverrides<Theme>['MuiStaticDateRangePicker'];
61
54
  };
62
55
  }
63
56
 
@@ -1,6 +1,7 @@
1
1
  import { DateRangePickerDayClassKey } from '../DateRangePickerDay';
2
2
  import { DateRangeCalendarClassKey } from '../DateRangeCalendar';
3
3
  import { DateRangePickerToolbarClassKey } from '../DateRangePicker';
4
+ import { MultiInputRangeFieldClassKey } from '../models';
4
5
 
5
6
  // prettier-ignore
6
7
  export interface PickersProComponentNameToClassKey {
@@ -9,20 +10,9 @@ export interface PickersProComponentNameToClassKey {
9
10
  MuiDateRangePickerToolbar: DateRangePickerToolbarClassKey;
10
11
 
11
12
  // Multi input range fields
12
- MuiMultiInputDateRangeField: never;
13
- MuiMultiInputDateTimeRangeField: never;
14
- MuiMultiInputTimeRangeField: never;
15
-
16
- // Single input range fields
17
- MuiSingleInputDateRangeField: never;
18
- MuiSingleInputDateTimeRangeField: never;
19
- MuiSingleInputTimeRangeField: never;
20
-
21
- // Date Range Pickers
22
- MuiDateRangePicker: never;
23
- MuiDesktopDateRangePicker: never;
24
- MuiMobileDateRangePicker: never;
25
- MuiStaticDateRangePicker: never;
13
+ MuiMultiInputDateRangeField: MultiInputRangeFieldClassKey;
14
+ MuiMultiInputDateTimeRangeField: MultiInputRangeFieldClassKey;
15
+ MuiMultiInputTimeRangeField: MultiInputRangeFieldClassKey;
26
16
  }
27
17
 
28
18
  declare module '@mui/material/styles' {