@mui/x-date-pickers-pro 7.0.0-alpha.7 → 7.0.0-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/AdapterDateFnsV3/index.d.ts +1 -0
  2. package/AdapterDateFnsV3/index.js +1 -0
  3. package/AdapterDateFnsV3/package.json +6 -0
  4. package/CHANGELOG.md +554 -51
  5. package/DateRangeCalendar/DateRangeCalendar.types.d.ts +2 -1
  6. package/DateRangeCalendar/useDragRange.d.ts +1 -1
  7. package/DateRangePicker/DateRangePicker.js +0 -3
  8. package/DateRangePicker/DateRangePickerToolbar.d.ts +1 -1
  9. package/DateRangePicker/DateRangePickerToolbar.js +0 -3
  10. package/DateRangePicker/shared.d.ts +1 -2
  11. package/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -3
  12. package/MobileDateRangePicker/MobileDateRangePicker.js +0 -3
  13. package/MultiInputDateRangeField/MultiInputDateRangeField.types.d.ts +1 -2
  14. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.d.ts +1 -2
  15. package/MultiInputTimeRangeField/MultiInputTimeRangeField.types.d.ts +1 -2
  16. package/README.md +1 -1
  17. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.d.ts +1 -1
  18. package/SingleInputTimeRangeField/SingleInputTimeRangeField.types.d.ts +1 -1
  19. package/StaticDateRangePicker/StaticDateRangePicker.js +0 -3
  20. package/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +1 -1
  21. package/index.d.ts +0 -1
  22. package/index.js +1 -1
  23. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.d.ts +1 -1
  24. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +3 -3
  25. package/internals/hooks/useEnrichedRangePickerFieldProps.d.ts +3 -3
  26. package/internals/hooks/useMobileRangePicker/useMobileRangePicker.d.ts +1 -1
  27. package/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.d.ts +3 -3
  28. package/internals/hooks/useRangePosition.d.ts +1 -1
  29. package/internals/hooks/useStaticRangePicker/useStaticRangePicker.d.ts +1 -1
  30. package/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.d.ts +2 -3
  31. package/internals/models/dateRange.d.ts +1 -2
  32. package/internals/models/dateTimeRange.d.ts +1 -2
  33. package/internals/models/index.d.ts +0 -1
  34. package/internals/models/index.js +0 -1
  35. package/internals/models/timeRange.d.ts +1 -2
  36. package/internals/utils/date-range-manager.d.ts +1 -1
  37. package/internals/utils/date-utils.d.ts +1 -1
  38. package/internals/utils/releaseInfo.js +1 -1
  39. package/internals/utils/validation/validateDateRange.d.ts +2 -2
  40. package/internals/utils/validation/validateDateTimeRange.d.ts +1 -2
  41. package/internals/utils/validation/validateTimeRange.d.ts +1 -2
  42. package/internals/utils/valueManagers.d.ts +1 -2
  43. package/internals/utils/valueManagers.js +5 -5
  44. package/legacy/AdapterDateFnsV3/index.js +1 -0
  45. package/legacy/DateRangePicker/DateRangePicker.js +0 -3
  46. package/legacy/DateRangePicker/DateRangePickerToolbar.js +0 -3
  47. package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -3
  48. package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +0 -3
  49. package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +0 -3
  50. package/legacy/index.js +1 -1
  51. package/legacy/internals/models/index.js +0 -1
  52. package/legacy/internals/utils/releaseInfo.js +1 -1
  53. package/legacy/internals/utils/valueManagers.js +5 -5
  54. package/legacy/locales/index.js +1 -0
  55. package/legacy/models/index.js +1 -0
  56. package/locales/index.d.ts +1 -0
  57. package/locales/index.js +1 -0
  58. package/locales/package.json +6 -0
  59. package/models/index.d.ts +1 -0
  60. package/models/index.js +1 -0
  61. package/modern/AdapterDateFnsV3/index.js +1 -0
  62. package/modern/DateRangePicker/DateRangePicker.js +0 -3
  63. package/modern/DateRangePicker/DateRangePickerToolbar.js +0 -3
  64. package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -3
  65. package/modern/MobileDateRangePicker/MobileDateRangePicker.js +0 -3
  66. package/modern/StaticDateRangePicker/StaticDateRangePicker.js +0 -3
  67. package/modern/index.js +1 -1
  68. package/modern/internals/models/index.js +0 -1
  69. package/modern/internals/utils/releaseInfo.js +1 -1
  70. package/modern/internals/utils/valueManagers.js +5 -5
  71. package/modern/locales/index.js +1 -0
  72. package/modern/models/index.js +1 -0
  73. package/node/AdapterDateFnsV3/index.js +12 -0
  74. package/node/DateRangePicker/DateRangePicker.js +0 -3
  75. package/node/DateRangePicker/DateRangePickerToolbar.js +0 -3
  76. package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -3
  77. package/node/MobileDateRangePicker/MobileDateRangePicker.js +0 -3
  78. package/node/StaticDateRangePicker/StaticDateRangePicker.js +0 -3
  79. package/node/index.js +1 -1
  80. package/node/internals/models/index.js +0 -11
  81. package/node/internals/utils/releaseInfo.js +1 -1
  82. package/node/internals/utils/valueManagers.js +5 -5
  83. package/node/locales/index.js +16 -0
  84. package/node/models/index.js +11 -0
  85. package/package.json +10 -10
  86. /package/{internals → legacy}/models/range.js +0 -0
  87. /package/{internals/models → models}/range.d.ts +0 -0
  88. /package/{legacy/internals/models → models}/range.js +0 -0
  89. /package/modern/{internals/models → models}/range.js +0 -0
  90. /package/node/{internals/models → models}/range.js +0 -0
@@ -94,9 +94,6 @@ process.env.NODE_ENV !== "production" ? DateRangePickerToolbar.propTypes = {
94
94
  // | To update them edit the TypeScript types and run "yarn proptypes" |
95
95
  // ----------------------------------------------------------------------
96
96
  classes: PropTypes.object,
97
- /**
98
- * className applied to the root component.
99
- */
100
97
  className: PropTypes.string,
101
98
  disabled: PropTypes.bool,
102
99
  /**
@@ -70,9 +70,6 @@ DesktopDateRangePicker.propTypes = {
70
70
  * @default 2
71
71
  */
72
72
  calendars: PropTypes.oneOf([1, 2, 3]),
73
- /**
74
- * Class name applied to the root element.
75
- */
76
73
  className: PropTypes.string,
77
74
  /**
78
75
  * If `true`, the popover or modal will close after submitting the full date.
@@ -70,9 +70,6 @@ MobileDateRangePicker.propTypes = {
70
70
  * @default 2
71
71
  */
72
72
  calendars: PropTypes.oneOf([1, 2, 3]),
73
- /**
74
- * Class name applied to the root element.
75
- */
76
73
  className: PropTypes.string,
77
74
  /**
78
75
  * If `true`, the popover or modal will close after submitting the full date.
@@ -64,9 +64,6 @@ StaticDateRangePicker.propTypes = {
64
64
  * @default 2
65
65
  */
66
66
  calendars: PropTypes.oneOf([1, 2, 3]),
67
- /**
68
- * Class name applied to the root element.
69
- */
70
67
  className: PropTypes.string,
71
68
  /**
72
69
  * Position the current month is rendered in.
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers-pro v7.0.0-alpha.7
2
+ * @mui/x-date-pickers-pro v7.0.0-alpha.9
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -1,5 +1,4 @@
1
1
  export * from './dateRange';
2
- export * from './range';
3
2
  export * from './dateTimeRange';
4
3
  export * from './timeRange';
5
4
  export * from './fields';
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTcwNDQwOTIwMDAwMA==";
3
+ const releaseInfo = "MTcwNTYxODgwMDAwMA==";
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
@@ -29,7 +29,7 @@ export const rangeValueManager = {
29
29
  const timezoneStart = value[0] == null || !utils.isValid(value[0]) ? null : utils.getTimezone(value[0]);
30
30
  const timezoneEnd = value[1] == null || !utils.isValid(value[1]) ? null : utils.getTimezone(value[1]);
31
31
  if (timezoneStart != null && timezoneEnd != null && timezoneStart !== timezoneEnd) {
32
- throw new Error('MUI: The timezone of the start and the end date should be the same');
32
+ throw new Error('MUI X: The timezone of the start and the end date should be the same.');
33
33
  }
34
34
  return timezoneStart ?? timezoneEnd;
35
35
  },
@@ -50,7 +50,7 @@ export const rangeFieldValueManager = {
50
50
  }
51
51
  return [prevReferenceValue[1], value[1]];
52
52
  },
53
- getSectionsFromValue: (utils, [start, end], fallbackSections, isRTL, getSectionsFromDate) => {
53
+ getSectionsFromValue: (utils, [start, end], fallbackSections, localizedDigits, isRTL, getSectionsFromDate) => {
54
54
  const separatedFallbackSections = fallbackSections == null ? {
55
55
  startDate: null,
56
56
  endDate: null
@@ -73,11 +73,11 @@ export const rangeFieldValueManager = {
73
73
  });
74
74
  });
75
75
  };
76
- return addPositionPropertiesToSections([...getSections(start, separatedFallbackSections.startDate, 'start'), ...getSections(end, separatedFallbackSections.endDate, 'end')], isRTL);
76
+ return addPositionPropertiesToSections([...getSections(start, separatedFallbackSections.startDate, 'start'), ...getSections(end, separatedFallbackSections.endDate, 'end')], localizedDigits, isRTL);
77
77
  },
78
- getValueStrFromSections: (sections, isRTL) => {
78
+ getValueStrFromSections: (sections, localizedDigits, isRTL) => {
79
79
  const dateRangeSections = splitDateRangeSections(sections);
80
- return createDateStrForInputFromSections([...dateRangeSections.startDate, ...dateRangeSections.endDate], isRTL);
80
+ return createDateStrForInputFromSections([...dateRangeSections.startDate, ...dateRangeSections.endDate], localizedDigits, isRTL);
81
81
  },
82
82
  parseValueStr: (valueStr, referenceValue, parseDate) => {
83
83
  // TODO: Improve because it would not work if the date format has `–` as a separator.
@@ -0,0 +1 @@
1
+ export * from '@mui/x-date-pickers/locales';
@@ -1,2 +1,3 @@
1
+ export * from './range';
1
2
  export * from './validation';
2
3
  export * from './multiInputRangeFieldClasses';
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "AdapterDateFns", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _AdapterDateFnsV.AdapterDateFns;
10
+ }
11
+ });
12
+ var _AdapterDateFnsV = require("@mui/x-date-pickers/AdapterDateFnsV3");
@@ -68,9 +68,6 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
68
68
  * @default 2
69
69
  */
70
70
  calendars: _propTypes.default.oneOf([1, 2, 3]),
71
- /**
72
- * Class name applied to the root element.
73
- */
74
71
  className: _propTypes.default.string,
75
72
  /**
76
73
  * If `true`, the popover or modal will close after submitting the full date.
@@ -102,9 +102,6 @@ process.env.NODE_ENV !== "production" ? DateRangePickerToolbar.propTypes = {
102
102
  // | To update them edit the TypeScript types and run "yarn proptypes" |
103
103
  // ----------------------------------------------------------------------
104
104
  classes: _propTypes.default.object,
105
- /**
106
- * className applied to the root component.
107
- */
108
105
  className: _propTypes.default.string,
109
106
  disabled: _propTypes.default.bool,
110
107
  /**
@@ -79,9 +79,6 @@ DesktopDateRangePicker.propTypes = {
79
79
  * @default 2
80
80
  */
81
81
  calendars: _propTypes.default.oneOf([1, 2, 3]),
82
- /**
83
- * Class name applied to the root element.
84
- */
85
82
  className: _propTypes.default.string,
86
83
  /**
87
84
  * If `true`, the popover or modal will close after submitting the full date.
@@ -79,9 +79,6 @@ MobileDateRangePicker.propTypes = {
79
79
  * @default 2
80
80
  */
81
81
  calendars: _propTypes.default.oneOf([1, 2, 3]),
82
- /**
83
- * Class name applied to the root element.
84
- */
85
82
  className: _propTypes.default.string,
86
83
  /**
87
84
  * If `true`, the popover or modal will close after submitting the full date.
@@ -73,9 +73,6 @@ StaticDateRangePicker.propTypes = {
73
73
  * @default 2
74
74
  */
75
75
  calendars: _propTypes.default.oneOf([1, 2, 3]),
76
- /**
77
- * Class name applied to the root element.
78
- */
79
76
  className: _propTypes.default.string,
80
77
  /**
81
78
  * Position the current month is rendered in.
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers-pro v7.0.0-alpha.7
2
+ * @mui/x-date-pickers-pro v7.0.0-alpha.9
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -14,17 +14,6 @@ Object.keys(_dateRange).forEach(function (key) {
14
14
  }
15
15
  });
16
16
  });
17
- var _range = require("./range");
18
- Object.keys(_range).forEach(function (key) {
19
- if (key === "default" || key === "__esModule") return;
20
- if (key in exports && exports[key] === _range[key]) return;
21
- Object.defineProperty(exports, key, {
22
- enumerable: true,
23
- get: function () {
24
- return _range[key];
25
- }
26
- });
27
- });
28
17
  var _dateTimeRange = require("./dateTimeRange");
29
18
  Object.keys(_dateTimeRange).forEach(function (key) {
30
19
  if (key === "default" || key === "__esModule") return;
@@ -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 = "MTcwNDQwOTIwMDAwMA==";
9
+ const releaseInfo = "MTcwNTYxODgwMDAwMA==";
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
@@ -36,7 +36,7 @@ const rangeValueManager = exports.rangeValueManager = {
36
36
  const timezoneStart = value[0] == null || !utils.isValid(value[0]) ? null : utils.getTimezone(value[0]);
37
37
  const timezoneEnd = value[1] == null || !utils.isValid(value[1]) ? null : utils.getTimezone(value[1]);
38
38
  if (timezoneStart != null && timezoneEnd != null && timezoneStart !== timezoneEnd) {
39
- throw new Error('MUI: The timezone of the start and the end date should be the same');
39
+ throw new Error('MUI X: The timezone of the start and the end date should be the same.');
40
40
  }
41
41
  return timezoneStart ?? timezoneEnd;
42
42
  },
@@ -57,7 +57,7 @@ const rangeFieldValueManager = exports.rangeFieldValueManager = {
57
57
  }
58
58
  return [prevReferenceValue[1], value[1]];
59
59
  },
60
- getSectionsFromValue: (utils, [start, end], fallbackSections, isRTL, getSectionsFromDate) => {
60
+ getSectionsFromValue: (utils, [start, end], fallbackSections, localizedDigits, isRTL, getSectionsFromDate) => {
61
61
  const separatedFallbackSections = fallbackSections == null ? {
62
62
  startDate: null,
63
63
  endDate: null
@@ -80,11 +80,11 @@ const rangeFieldValueManager = exports.rangeFieldValueManager = {
80
80
  });
81
81
  });
82
82
  };
83
- return (0, _internals.addPositionPropertiesToSections)([...getSections(start, separatedFallbackSections.startDate, 'start'), ...getSections(end, separatedFallbackSections.endDate, 'end')], isRTL);
83
+ return (0, _internals.addPositionPropertiesToSections)([...getSections(start, separatedFallbackSections.startDate, 'start'), ...getSections(end, separatedFallbackSections.endDate, 'end')], localizedDigits, isRTL);
84
84
  },
85
- getValueStrFromSections: (sections, isRTL) => {
85
+ getValueStrFromSections: (sections, localizedDigits, isRTL) => {
86
86
  const dateRangeSections = (0, _dateFieldsUtils.splitDateRangeSections)(sections);
87
- return (0, _internals.createDateStrForInputFromSections)([...dateRangeSections.startDate, ...dateRangeSections.endDate], isRTL);
87
+ return (0, _internals.createDateStrForInputFromSections)([...dateRangeSections.startDate, ...dateRangeSections.endDate], localizedDigits, isRTL);
88
88
  },
89
89
  parseValueStr: (valueStr, referenceValue, parseDate) => {
90
90
  // TODO: Improve because it would not work if the date format has `–` as a separator.
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _locales = require("@mui/x-date-pickers/locales");
7
+ Object.keys(_locales).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _locales[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _locales[key];
14
+ }
15
+ });
16
+ });
@@ -3,6 +3,17 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ var _range = require("./range");
7
+ Object.keys(_range).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _range[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _range[key];
14
+ }
15
+ });
16
+ });
6
17
  var _validation = require("./validation");
7
18
  Object.keys(_validation).forEach(function (key) {
8
19
  if (key === "default" || key === "__esModule") return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-date-pickers-pro",
3
- "version": "7.0.0-alpha.7",
3
+ "version": "7.0.0-alpha.9",
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,21 +31,21 @@
31
31
  "directory": "packages/x-date-pickers-pro"
32
32
  },
33
33
  "dependencies": {
34
- "@babel/runtime": "^7.23.7",
35
- "@mui/base": "^5.0.0-beta.29",
36
- "@mui/system": "^5.15.2",
37
- "@mui/utils": "^5.15.2",
38
- "@mui/x-date-pickers": "7.0.0-alpha.7",
39
- "@mui/x-license-pro": "7.0.0-alpha.1",
40
- "clsx": "^2.0.0",
34
+ "@babel/runtime": "^7.23.8",
35
+ "@mui/base": "^5.0.0-beta.32",
36
+ "@mui/system": "^5.15.5",
37
+ "@mui/utils": "^5.15.5",
38
+ "@mui/x-date-pickers": "7.0.0-alpha.9",
39
+ "@mui/x-license-pro": "7.0.0-alpha.9",
40
+ "clsx": "^2.1.0",
41
41
  "prop-types": "^15.8.1",
42
42
  "react-transition-group": "^4.4.5"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@emotion/react": "^11.9.0",
46
46
  "@emotion/styled": "^11.8.1",
47
- "@mui/material": "^5.8.6",
48
- "date-fns": "^2.25.0",
47
+ "@mui/material": "^5.15.0",
48
+ "date-fns": "^2.25.0 || ^3.2.0",
49
49
  "date-fns-jalali": "^2.13.0-0",
50
50
  "dayjs": "^1.10.7",
51
51
  "luxon": "^3.0.2",
File without changes
File without changes
File without changes
File without changes
File without changes