@mui/x-date-pickers 7.6.2 → 7.7.1

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 (105) hide show
  1. package/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.d.ts +48 -48
  2. package/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.js +1 -0
  3. package/AdapterDateFnsV3/AdapterDateFnsV3.d.ts +47 -47
  4. package/AdapterDateFnsV3/AdapterDateFnsV3.js +1 -0
  5. package/CHANGELOG.md +163 -0
  6. package/DateCalendar/DateCalendar.js +3 -3
  7. package/DateCalendar/DateCalendar.types.d.ts +4 -4
  8. package/DateCalendar/DayCalendar.d.ts +3 -4
  9. package/DatePicker/DatePicker.js +2 -0
  10. package/DateTimePicker/DateTimePicker.js +2 -0
  11. package/DesktopDatePicker/DesktopDatePicker.js +2 -0
  12. package/DesktopDateTimePicker/DesktopDateTimePicker.js +2 -0
  13. package/DesktopTimePicker/DesktopTimePicker.js +2 -0
  14. package/MobileDatePicker/MobileDatePicker.js +2 -0
  15. package/MobileDateTimePicker/MobileDateTimePicker.js +2 -0
  16. package/MobileTimePicker/MobileTimePicker.js +2 -0
  17. package/MonthCalendar/MonthCalendar.js +17 -3
  18. package/MonthCalendar/MonthCalendar.types.d.ts +25 -0
  19. package/MonthCalendar/PickersMonth.d.ts +4 -0
  20. package/MonthCalendar/PickersMonth.js +38 -21
  21. package/MonthCalendar/index.d.ts +1 -1
  22. package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +16 -3
  23. package/PickersCalendarHeader/PickersCalendarHeader.js +4 -0
  24. package/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +5 -1
  25. package/PickersLayout/usePickerLayout.js +0 -5
  26. package/StaticDatePicker/StaticDatePicker.js +2 -0
  27. package/StaticDateTimePicker/StaticDateTimePicker.js +2 -0
  28. package/StaticTimePicker/StaticTimePicker.js +2 -0
  29. package/TimePicker/TimePicker.js +2 -0
  30. package/YearCalendar/PickersYear.d.ts +3 -0
  31. package/YearCalendar/PickersYear.js +34 -22
  32. package/YearCalendar/YearCalendar.js +17 -3
  33. package/YearCalendar/YearCalendar.types.d.ts +25 -0
  34. package/YearCalendar/index.d.ts +1 -1
  35. package/index.js +1 -1
  36. package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +4 -2
  37. package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.types.d.ts +1 -0
  38. package/internals/hooks/useField/useField.utils.js +2 -1
  39. package/internals/hooks/usePicker/usePickerValue.js +45 -38
  40. package/internals/hooks/usePicker/usePickerValue.types.d.ts +3 -1
  41. package/internals/hooks/usePicker/usePickerViews.js +2 -1
  42. package/locales/daDK.js +15 -19
  43. package/locales/faIR.js +19 -22
  44. package/locales/koKR.js +2 -2
  45. package/modern/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.js +1 -0
  46. package/modern/AdapterDateFnsV3/AdapterDateFnsV3.js +1 -0
  47. package/modern/DateCalendar/DateCalendar.js +3 -3
  48. package/modern/DatePicker/DatePicker.js +2 -0
  49. package/modern/DateTimePicker/DateTimePicker.js +2 -0
  50. package/modern/DesktopDatePicker/DesktopDatePicker.js +2 -0
  51. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +2 -0
  52. package/modern/DesktopTimePicker/DesktopTimePicker.js +2 -0
  53. package/modern/MobileDatePicker/MobileDatePicker.js +2 -0
  54. package/modern/MobileDateTimePicker/MobileDateTimePicker.js +2 -0
  55. package/modern/MobileTimePicker/MobileTimePicker.js +2 -0
  56. package/modern/MonthCalendar/MonthCalendar.js +17 -3
  57. package/modern/MonthCalendar/PickersMonth.js +38 -21
  58. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +16 -3
  59. package/modern/PickersCalendarHeader/PickersCalendarHeader.js +4 -0
  60. package/modern/PickersLayout/usePickerLayout.js +0 -5
  61. package/modern/StaticDatePicker/StaticDatePicker.js +2 -0
  62. package/modern/StaticDateTimePicker/StaticDateTimePicker.js +2 -0
  63. package/modern/StaticTimePicker/StaticTimePicker.js +2 -0
  64. package/modern/TimePicker/TimePicker.js +2 -0
  65. package/modern/YearCalendar/PickersYear.js +34 -22
  66. package/modern/YearCalendar/YearCalendar.js +17 -3
  67. package/modern/index.js +1 -1
  68. package/modern/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +4 -2
  69. package/modern/internals/hooks/useField/useField.utils.js +2 -1
  70. package/modern/internals/hooks/usePicker/usePickerValue.js +45 -38
  71. package/modern/internals/hooks/usePicker/usePickerViews.js +2 -1
  72. package/modern/locales/daDK.js +15 -19
  73. package/modern/locales/faIR.js +19 -22
  74. package/modern/locales/koKR.js +2 -2
  75. package/node/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.js +1 -0
  76. package/node/AdapterDateFnsV3/AdapterDateFnsV3.js +1 -0
  77. package/node/DateCalendar/DateCalendar.js +3 -3
  78. package/node/DatePicker/DatePicker.js +2 -0
  79. package/node/DateTimePicker/DateTimePicker.js +2 -0
  80. package/node/DesktopDatePicker/DesktopDatePicker.js +2 -0
  81. package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +2 -0
  82. package/node/DesktopTimePicker/DesktopTimePicker.js +2 -0
  83. package/node/MobileDatePicker/MobileDatePicker.js +2 -0
  84. package/node/MobileDateTimePicker/MobileDateTimePicker.js +2 -0
  85. package/node/MobileTimePicker/MobileTimePicker.js +2 -0
  86. package/node/MonthCalendar/MonthCalendar.js +17 -3
  87. package/node/MonthCalendar/PickersMonth.js +40 -23
  88. package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +16 -3
  89. package/node/PickersCalendarHeader/PickersCalendarHeader.js +4 -0
  90. package/node/PickersLayout/usePickerLayout.js +0 -5
  91. package/node/StaticDatePicker/StaticDatePicker.js +2 -0
  92. package/node/StaticDateTimePicker/StaticDateTimePicker.js +2 -0
  93. package/node/StaticTimePicker/StaticTimePicker.js +2 -0
  94. package/node/TimePicker/TimePicker.js +2 -0
  95. package/node/YearCalendar/PickersYear.js +34 -22
  96. package/node/YearCalendar/YearCalendar.js +17 -3
  97. package/node/index.js +1 -1
  98. package/node/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +4 -2
  99. package/node/internals/hooks/useField/useField.utils.js +2 -1
  100. package/node/internals/hooks/usePicker/usePickerValue.js +45 -38
  101. package/node/internals/hooks/usePicker/usePickerViews.js +2 -1
  102. package/node/locales/daDK.js +15 -19
  103. package/node/locales/faIR.js +19 -22
  104. package/node/locales/koKR.js +2 -2
  105. package/package.json +4 -4
@@ -33,55 +33,55 @@ declare module '@mui/x-date-pickers/models' {
33
33
  */
34
34
  export declare class AdapterDateFnsJalali extends AdapterDateFnsBase<DateFnsLocale> implements MuiPickersAdapter<Date, DateFnsLocale> {
35
35
  constructor({ locale, formats }?: AdapterOptions<DateFnsLocale, never>);
36
- parse: (value: string, format: string) => any;
37
- getCurrentLocaleCode: () => any;
38
- isValid: (value: Date | null) => any;
39
- format: (value: Date, formatKey: keyof AdapterFormats) => any;
40
- formatByString: (value: Date, formatString: string) => any;
36
+ parse: (value: string, format: string) => Date | null;
37
+ getCurrentLocaleCode: () => string;
38
+ isValid: (value: Date | null) => boolean;
39
+ format: (value: Date, formatKey: keyof AdapterFormats) => string;
40
+ formatByString: (value: Date, formatString: string) => string;
41
41
  formatNumber: (numberToFormat: string) => string;
42
- isEqual: (value: Date | null, comparing: Date | null) => any;
43
- isSameYear: (value: Date, comparing: Date) => any;
44
- isSameMonth: (value: Date, comparing: Date) => any;
45
- isSameDay: (value: Date, comparing: Date) => any;
46
- isSameHour: (value: Date, comparing: Date) => any;
47
- isAfter: (value: Date, comparing: Date) => any;
48
- isAfterYear: (value: Date, comparing: Date) => any;
49
- isAfterDay: (value: Date, comparing: Date) => any;
50
- isBefore: (value: Date, comparing: Date) => any;
51
- isBeforeYear: (value: Date, comparing: Date) => any;
52
- isBeforeDay: (value: Date, comparing: Date) => any;
53
- isWithinRange: (value: Date, [start, end]: [Date, Date]) => any;
54
- startOfYear: (value: Date) => any;
55
- startOfMonth: (value: Date) => any;
56
- startOfWeek: (value: Date) => any;
57
- startOfDay: (value: Date) => any;
58
- endOfYear: (value: Date) => any;
59
- endOfMonth: (value: Date) => any;
60
- endOfWeek: (value: Date) => any;
61
- endOfDay: (value: Date) => any;
62
- addYears: (value: Date, amount: number) => any;
63
- addMonths: (value: Date, amount: number) => any;
64
- addWeeks: (value: Date, amount: number) => any;
65
- addDays: (value: Date, amount: number) => any;
66
- addHours: (value: Date, amount: number) => any;
67
- addMinutes: (value: Date, amount: number) => any;
68
- addSeconds: (value: Date, amount: number) => any;
69
- getYear: (value: Date) => any;
70
- getMonth: (value: Date) => any;
71
- getDate: (value: Date) => any;
72
- getHours: (value: Date) => any;
73
- getMinutes: (value: Date) => any;
74
- getSeconds: (value: Date) => any;
75
- getMilliseconds: (value: Date) => any;
76
- setYear: (value: Date, year: number) => any;
77
- setMonth: (value: Date, month: number) => any;
78
- setDate: (value: Date, date: number) => any;
79
- setHours: (value: Date, hours: number) => any;
80
- setMinutes: (value: Date, minutes: number) => any;
81
- setSeconds: (value: Date, seconds: number) => any;
82
- setMilliseconds: (value: Date, milliseconds: number) => any;
83
- getDaysInMonth: (value: Date) => any;
42
+ isEqual: (value: Date | null, comparing: Date | null) => boolean;
43
+ isSameYear: (value: Date, comparing: Date) => boolean;
44
+ isSameMonth: (value: Date, comparing: Date) => boolean;
45
+ isSameDay: (value: Date, comparing: Date) => boolean;
46
+ isSameHour: (value: Date, comparing: Date) => boolean;
47
+ isAfter: (value: Date, comparing: Date) => boolean;
48
+ isAfterYear: (value: Date, comparing: Date) => boolean;
49
+ isAfterDay: (value: Date, comparing: Date) => boolean;
50
+ isBefore: (value: Date, comparing: Date) => boolean;
51
+ isBeforeYear: (value: Date, comparing: Date) => boolean;
52
+ isBeforeDay: (value: Date, comparing: Date) => boolean;
53
+ isWithinRange: (value: Date, [start, end]: [Date, Date]) => boolean;
54
+ startOfYear: (value: Date) => Date;
55
+ startOfMonth: (value: Date) => Date;
56
+ startOfWeek: (value: Date) => Date;
57
+ startOfDay: (value: Date) => Date;
58
+ endOfYear: (value: Date) => Date;
59
+ endOfMonth: (value: Date) => Date;
60
+ endOfWeek: (value: Date) => Date;
61
+ endOfDay: (value: Date) => Date;
62
+ addYears: (value: Date, amount: number) => Date;
63
+ addMonths: (value: Date, amount: number) => Date;
64
+ addWeeks: (value: Date, amount: number) => Date;
65
+ addDays: (value: Date, amount: number) => Date;
66
+ addHours: (value: Date, amount: number) => Date;
67
+ addMinutes: (value: Date, amount: number) => Date;
68
+ addSeconds: (value: Date, amount: number) => Date;
69
+ getYear: (value: Date) => number;
70
+ getMonth: (value: Date) => number;
71
+ getDate: (value: Date) => number;
72
+ getHours: (value: Date) => number;
73
+ getMinutes: (value: Date) => number;
74
+ getSeconds: (value: Date) => number;
75
+ getMilliseconds: (value: Date) => number;
76
+ setYear: (value: Date, year: number) => Date;
77
+ setMonth: (value: Date, month: number) => Date;
78
+ setDate: (value: Date, date: number) => Date;
79
+ setHours: (value: Date, hours: number) => Date;
80
+ setMinutes: (value: Date, minutes: number) => Date;
81
+ setSeconds: (value: Date, seconds: number) => Date;
82
+ setMilliseconds: (value: Date, milliseconds: number) => Date;
83
+ getDaysInMonth: (value: Date) => number;
84
84
  getWeekArray: (value: Date) => Date[][];
85
- getWeekNumber: (date: Date) => any;
85
+ getWeekNumber: (date: Date) => number;
86
86
  getYearRange: ([start, end]: [Date, Date]) => Date[];
87
87
  }
@@ -130,6 +130,7 @@ export class AdapterDateFnsJalali extends AdapterDateFnsBase {
130
130
  longFormatters,
131
131
  lib: 'date-fns-jalali'
132
132
  });
133
+ // TODO: explicit return types can be removed once there is only one date-fns version supported
133
134
  this.parse = (value, format) => {
134
135
  if (value === '') {
135
136
  return null;
@@ -33,53 +33,53 @@ declare module '@mui/x-date-pickers/models' {
33
33
  */
34
34
  export declare class AdapterDateFns extends AdapterDateFnsBase<DateFnsLocale> implements MuiPickersAdapter<Date, DateFnsLocale> {
35
35
  constructor({ locale, formats }?: AdapterOptions<DateFnsLocale, never>);
36
- parse: (value: string, format: string) => any;
37
- isValid: (value: Date | null) => any;
38
- format: (value: Date, formatKey: keyof AdapterFormats) => any;
39
- formatByString: (value: Date, formatString: string) => any;
40
- isEqual: (value: Date | null, comparing: Date | null) => any;
41
- isSameYear: (value: Date, comparing: Date) => any;
42
- isSameMonth: (value: Date, comparing: Date) => any;
43
- isSameDay: (value: Date, comparing: Date) => any;
44
- isSameHour: (value: Date, comparing: Date) => any;
45
- isAfter: (value: Date, comparing: Date) => any;
46
- isAfterYear: (value: Date, comparing: Date) => any;
47
- isAfterDay: (value: Date, comparing: Date) => any;
48
- isBefore: (value: Date, comparing: Date) => any;
49
- isBeforeYear: (value: Date, comparing: Date) => any;
50
- isBeforeDay: (value: Date, comparing: Date) => any;
51
- isWithinRange: (value: Date, [start, end]: [Date, Date]) => any;
52
- startOfYear: (value: Date) => any;
53
- startOfMonth: (value: Date) => any;
54
- startOfWeek: (value: Date) => any;
55
- startOfDay: (value: Date) => any;
56
- endOfYear: (value: Date) => any;
57
- endOfMonth: (value: Date) => any;
58
- endOfWeek: (value: Date) => any;
59
- endOfDay: (value: Date) => any;
60
- addYears: (value: Date, amount: number) => any;
61
- addMonths: (value: Date, amount: number) => any;
62
- addWeeks: (value: Date, amount: number) => any;
63
- addDays: (value: Date, amount: number) => any;
64
- addHours: (value: Date, amount: number) => any;
65
- addMinutes: (value: Date, amount: number) => any;
66
- addSeconds: (value: Date, amount: number) => any;
67
- getYear: (value: Date) => any;
68
- getMonth: (value: Date) => any;
69
- getDate: (value: Date) => any;
70
- getHours: (value: Date) => any;
71
- getMinutes: (value: Date) => any;
72
- getSeconds: (value: Date) => any;
73
- getMilliseconds: (value: Date) => any;
74
- setYear: (value: Date, year: number) => any;
75
- setMonth: (value: Date, month: number) => any;
76
- setDate: (value: Date, date: number) => any;
77
- setHours: (value: Date, hours: number) => any;
78
- setMinutes: (value: Date, minutes: number) => any;
79
- setSeconds: (value: Date, seconds: number) => any;
80
- setMilliseconds: (value: Date, milliseconds: number) => any;
81
- getDaysInMonth: (value: Date) => any;
36
+ parse: (value: string, format: string) => Date | null;
37
+ isValid: (value: Date | null) => boolean;
38
+ format: (value: Date, formatKey: keyof AdapterFormats) => string;
39
+ formatByString: (value: Date, formatString: string) => string;
40
+ isEqual: (value: Date | null, comparing: Date | null) => boolean;
41
+ isSameYear: (value: Date, comparing: Date) => boolean;
42
+ isSameMonth: (value: Date, comparing: Date) => boolean;
43
+ isSameDay: (value: Date, comparing: Date) => boolean;
44
+ isSameHour: (value: Date, comparing: Date) => boolean;
45
+ isAfter: (value: Date, comparing: Date) => boolean;
46
+ isAfterYear: (value: Date, comparing: Date) => boolean;
47
+ isAfterDay: (value: Date, comparing: Date) => boolean;
48
+ isBefore: (value: Date, comparing: Date) => boolean;
49
+ isBeforeYear: (value: Date, comparing: Date) => boolean;
50
+ isBeforeDay: (value: Date, comparing: Date) => boolean;
51
+ isWithinRange: (value: Date, [start, end]: [Date, Date]) => boolean;
52
+ startOfYear: (value: Date) => Date;
53
+ startOfMonth: (value: Date) => Date;
54
+ startOfWeek: (value: Date) => Date;
55
+ startOfDay: (value: Date) => Date;
56
+ endOfYear: (value: Date) => Date;
57
+ endOfMonth: (value: Date) => Date;
58
+ endOfWeek: (value: Date) => Date;
59
+ endOfDay: (value: Date) => Date;
60
+ addYears: (value: Date, amount: number) => Date;
61
+ addMonths: (value: Date, amount: number) => Date;
62
+ addWeeks: (value: Date, amount: number) => Date;
63
+ addDays: (value: Date, amount: number) => Date;
64
+ addHours: (value: Date, amount: number) => Date;
65
+ addMinutes: (value: Date, amount: number) => Date;
66
+ addSeconds: (value: Date, amount: number) => Date;
67
+ getYear: (value: Date) => number;
68
+ getMonth: (value: Date) => number;
69
+ getDate: (value: Date) => number;
70
+ getHours: (value: Date) => number;
71
+ getMinutes: (value: Date) => number;
72
+ getSeconds: (value: Date) => number;
73
+ getMilliseconds: (value: Date) => number;
74
+ setYear: (value: Date, year: number) => Date;
75
+ setMonth: (value: Date, month: number) => Date;
76
+ setDate: (value: Date, date: number) => Date;
77
+ setHours: (value: Date, hours: number) => Date;
78
+ setMinutes: (value: Date, minutes: number) => Date;
79
+ setSeconds: (value: Date, seconds: number) => Date;
80
+ setMilliseconds: (value: Date, milliseconds: number) => Date;
81
+ getDaysInMonth: (value: Date) => number;
82
82
  getWeekArray: (value: Date) => Date[][];
83
- getWeekNumber: (value: Date) => any;
83
+ getWeekNumber: (value: Date) => number;
84
84
  getYearRange: ([start, end]: [Date, Date]) => Date[];
85
85
  }
@@ -90,6 +90,7 @@ export class AdapterDateFns extends AdapterDateFnsBase {
90
90
  formats,
91
91
  longFormatters
92
92
  });
93
+ // TODO: explicit return types can be removed once there is only one date-fns version supported
93
94
  this.parse = (value, format) => {
94
95
  if (value === '') {
95
96
  return null;
package/CHANGELOG.md CHANGED
@@ -3,6 +3,169 @@
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.7.1
7
+
8
+ _Jun 21, 2024_
9
+
10
+ We'd like to offer a big thanks to the 14 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🌍 Improve Portuguese (pt-PT) locale on the Data Grid
13
+ - 🌍 Improve Danish (da-DK) locale on the Date and Time Pickers
14
+ - 🐞 Bugfixes
15
+ - 📚 Documentation improvements
16
+
17
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
18
+
19
+ ### Data Grid
20
+
21
+ #### `@mui/x-data-grid@7.7.1`
22
+
23
+ - [DataGrid][docs] Clarify enabling pagination (#13350) @oliviertassinari
24
+ - [DataGrid] Fix CSV export escaping for non-string values (#13560) @joeycumines-scw
25
+ - [l10n] Improve Portuguese (pt-PT) locale (#13348) @joaosreis
26
+
27
+ #### `@mui/x-data-grid-pro@7.7.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
28
+
29
+ Same changes as in `@mui/x-data-grid@7.7.1`, plus:
30
+
31
+ - [DataGrid] Warn about `getTreeDataPath` reference (#13519) @cherniavskii
32
+
33
+ #### `@mui/x-data-grid-premium@7.7.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
34
+
35
+ Same changes as in `@mui/x-data-grid-pro@7.7.1`.
36
+
37
+ ### Date and Time Pickers
38
+
39
+ #### `@mui/x-date-pickers@7.7.1`
40
+
41
+ - [fields] Prevent digit editing on the `Space` key down (#13510) @flaviendelangle
42
+ - [l10n] Improve Danish (da-DK) locale (#13375) @jacrowland1
43
+ - [pickers] Add context to `onAccept` callback (#13511) @flaviendelangle
44
+ - [pickers] Always use the same timezone in the field, the view and the layout components (#13481) @flaviendelangle
45
+ - [pickers] Fix `AdapterDateFnsV3` generated method types (#13464) @alexey-kozlenkov
46
+ - [pickers] Fix controlled `view` behavior (#13552) @LukasTy
47
+ - [TimePicker] Improves RTL verification for the time pickers default views (#13447) @arthurbalduini
48
+
49
+ #### `@mui/x-date-pickers-pro@7.7.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
50
+
51
+ Same changes as in `@mui/x-date-pickers@7.7.1`, plus:
52
+
53
+ - [DateRangePicker] Add accessible name to calendar grid (#13538) @LukasTy
54
+
55
+ ### Charts
56
+
57
+ #### `@mui/x-charts@7.7.1`
58
+
59
+ - [charts] Divide `CartesianProvider` to use logic in Pro package (#13531) @JCQuintas
60
+ - [charts] Do not publish the pro package (#13539) @alexfauquette
61
+ - [charts] Export `Pro` versions of regular charts (#13547) @JCQuintas
62
+ - [charts] Prepare `ChartContainerPro` for future Zoom changes (#13532) @JCQuintas
63
+ - [charts] Remove unnecessary proptypes from internal component (#13518) @JCQuintas
64
+
65
+ ### Tree View
66
+
67
+ #### `@mui/x-tree-view@7.7.1`
68
+
69
+ - [TreeView] Improve typing to support optional dependencies in plugins and in the item (#13523) @flaviendelangle
70
+ - [TreeView] Move `useTreeViewId` to the core plugins (#13566) @flaviendelangle
71
+ - [TreeView] Remove unused state from `useTreeViewId` (#13579) @flaviendelangle
72
+ - [TreeView] Support `itemId` with escaping characters when using `SimpleTreeView` (#13487) @oukunan
73
+
74
+ ### Docs
75
+
76
+ - [docs] Add section about the new uncovered product watermark (#13568) @michelengelen
77
+ - [docs] Document the `PickerValidDate` type override (#13476) @flaviendelangle
78
+ - [docs] Fix typo (#13507) @anshtiwatne
79
+ - [docs] Remove "-" in heat-map and tree-map urls (#13569) @alexfauquette
80
+ - [docs] Use dedicated tab for weather dataset (#13513) @alexfauquette
81
+ - [x-license] license update proposal (#13459) @michelengelen
82
+
83
+ ### Core
84
+
85
+ - [core] Fix failing CI test (#13574) @alexfauquette
86
+ - [infra] Remove explicit `@testing-library/react` dependency (#13478) @LukasTy
87
+
88
+ ## 7.7.0
89
+
90
+ _Jun 13, 2024_
91
+
92
+ We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
93
+
94
+ - 🎁 Allow customization of the Pickers month and the year buttons
95
+ - 🌍 Improve Persian (fa-IR), Portuguese (pt-PT), and Russian (ru-RU) locales on the Data Grid
96
+ - 🌍 Improve Korean (ko-KR) and Persian (fa-IR) locales on the Date and Time Pickers
97
+ - 🐞 Bugfixes
98
+ - 📚 Documentation improvements
99
+
100
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
101
+
102
+ ### Data Grid
103
+
104
+ #### `@mui/x-data-grid@7.7.0`
105
+
106
+ - [DataGrid] Add `getFilterState` method (#13418) @cherniavskii
107
+ - [DataGrid] Do not show resize separators for column groups (#13455) @cherniavskii
108
+ - [l10n] Improve Persian (fa-IR) locale (#13402) @fakhamatia
109
+ - [l10n] Improve Portuguese (pt-PT) locale (#13384) @olavocarvalho
110
+ - [l10n] Improve Russian (ru-RU) locale (#11210) @dastan-akhmetov-scity
111
+
112
+ #### `@mui/x-data-grid-pro@7.7.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
113
+
114
+ Same changes as in `@mui/x-data-grid@7.7.0`, plus:
115
+
116
+ - [DataGridPro] Do not render detail panel if the focused cell is not visible (#13456) @cherniavskii
117
+
118
+ #### `@mui/x-data-grid-premium@7.7.0` [![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.7.0`.
121
+
122
+ ### Date and Time Pickers
123
+
124
+ #### `@mui/x-date-pickers@7.7.0`
125
+
126
+ - [l10n] Improve Korean (ko-KR) locale (#13452) @ryxxn
127
+ - [l10n] Improve Persian (fa-IR) locale (#13402) @fakhamatia
128
+ - [pickers] Allow to customize the month and the year buttons (#13321) @flaviendelangle
129
+
130
+ #### `@mui/x-date-pickers-pro@7.7.0` [![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.7.0`.
133
+
134
+ ### Charts
135
+
136
+ #### `@mui/x-charts@7.7.0`
137
+
138
+ - [charts] Add watermark on the pro `ResponsiveChartContainer` (#13398) @alexfauquette
139
+ - [charts] Allow to specify y-axis configuration (#13438) @alexfauquette
140
+ - [charts] Fix eslint for react compiler (#13444) @alexfauquette
141
+ - [charts] Improve themeAugmentation typing (#13433) @noraleonte
142
+ - [charts] Move the `ZAxisContextProvider` by default in the `ChartContainer` (#13465) @alexfauquette
143
+ - [charts] Use plugins to define series extremum and colors (#13397) @alexfauquette
144
+
145
+ ### Tree View
146
+
147
+ #### `@mui/x-tree-view@7.7.0`
148
+
149
+ - [TreeView] Improve TypeScript for plugins (#13380) @flaviendelangle
150
+ - [TreeView] Improve the typing of the cancelable events (#13152) @flaviendelangle
151
+ - [TreeView] Prepare support for PigmentCSS (#13412) @flaviendelangle
152
+ - [TreeView] Refactor the tree view internals to prepare for headless API (#13311) @flaviendelangle
153
+
154
+ ### Docs
155
+
156
+ - [docs] Add `renderHeader` recipe to the Master Details docs (#13370) @michelengelen
157
+ - [docs] Add lazy loading detail panel demo (#13453) @cherniavskii
158
+ - [docs] Add small edits to the Data Grid overview page (#13060) @danilo-leal
159
+ - [docs] Update a11y pages description (#13417) @danilo-leal
160
+ - [docs] improve the writing on the "Quick filter outside of the grid" example (#13155) @michelengelen
161
+
162
+ ### Core
163
+
164
+ - [core] Add `eslint-plugin-react-compiler` experimental version and rules (#13415) @JCQuintas
165
+ - [core] Minor setup cleanup (#13467) @LukasTy
166
+ - [infra] Adjust CI setup (#13448) @LukasTy
167
+ - [test] Add tests for the custom slots of `TreeItem2` (#13314) @flaviendelangle
168
+
6
169
  ## 7.6.2
7
170
 
8
171
  _Jun 6, 2024_
@@ -272,7 +272,9 @@ export const DateCalendar = /*#__PURE__*/React.forwardRef(function DateCalendar(
272
272
  readOnly,
273
273
  disabled,
274
274
  timezone,
275
- gridLabelId
275
+ gridLabelId,
276
+ slots,
277
+ slotProps
276
278
  };
277
279
  const prevOpenViewRef = React.useRef(view);
278
280
  React.useEffect(() => {
@@ -333,8 +335,6 @@ export const DateCalendar = /*#__PURE__*/React.forwardRef(function DateCalendar(
333
335
  fixedWeekNumber: fixedWeekNumber,
334
336
  dayOfWeekFormatter: dayOfWeekFormatter,
335
337
  displayWeekNumber: displayWeekNumber,
336
- slots: slots,
337
- slotProps: slotProps,
338
338
  loading: loading,
339
339
  renderLoading: renderLoading
340
340
  }))]
@@ -9,9 +9,9 @@ import { BaseDateValidationProps, YearValidationProps, MonthValidationProps, Day
9
9
  import { ExportedUseViewsOptions } from '../internals/hooks/useViews';
10
10
  import { DateView, PickerValidDate, TimezoneProps } from '../models';
11
11
  import { DefaultizedProps } from '../internals/models/helpers';
12
- import { ExportedYearCalendarProps } from '../YearCalendar/YearCalendar.types';
13
- import { ExportedMonthCalendarProps } from '../MonthCalendar/MonthCalendar.types';
14
- export interface DateCalendarSlots<TDate extends PickerValidDate> extends PickersCalendarHeaderSlots, DayCalendarSlots<TDate> {
12
+ import { ExportedYearCalendarProps, YearCalendarSlots, YearCalendarSlotProps } from '../YearCalendar/YearCalendar.types';
13
+ import { ExportedMonthCalendarProps, MonthCalendarSlots, MonthCalendarSlotProps } from '../MonthCalendar/MonthCalendar.types';
14
+ export interface DateCalendarSlots<TDate extends PickerValidDate> extends PickersCalendarHeaderSlots, DayCalendarSlots<TDate>, MonthCalendarSlots, YearCalendarSlots {
15
15
  /**
16
16
  * Custom component for calendar header.
17
17
  * Check the [PickersCalendarHeader](https://mui.com/x/api/date-pickers/pickers-calendar-header/) component.
@@ -19,7 +19,7 @@ export interface DateCalendarSlots<TDate extends PickerValidDate> extends Picker
19
19
  */
20
20
  calendarHeader?: React.ElementType<PickersCalendarHeaderProps<TDate>>;
21
21
  }
22
- export interface DateCalendarSlotProps<TDate extends PickerValidDate> extends PickersCalendarHeaderSlotProps<TDate>, DayCalendarSlotProps<TDate> {
22
+ export interface DateCalendarSlotProps<TDate extends PickerValidDate> extends PickersCalendarHeaderSlotProps<TDate>, DayCalendarSlotProps<TDate>, MonthCalendarSlotProps, YearCalendarSlotProps {
23
23
  calendarHeader?: SlotComponentProps<typeof PickersCalendarHeader, {}, DateCalendarProps<TDate>>;
24
24
  }
25
25
  export interface ExportedDateCalendarProps<TDate extends PickerValidDate> extends ExportedDayCalendarProps<TDate>, ExportedMonthCalendarProps, ExportedYearCalendarProps, BaseDateValidationProps<TDate>, DayValidationProps<TDate>, YearValidationProps<TDate>, MonthValidationProps<TDate>, TimezoneProps {
@@ -1,12 +1,11 @@
1
1
  import * as React from 'react';
2
- import { SlotComponentProps } from '@mui/base/utils';
3
- import { PickersDay, PickersDayProps, ExportedPickersDayProps } from '../PickersDay/PickersDay';
2
+ import { PickersDayProps, ExportedPickersDayProps } from '../PickersDay/PickersDay';
4
3
  import { PickerOnChangeFn } from '../internals/hooks/useViews';
5
4
  import { SlideDirection, SlideTransitionProps } from './PickersSlideTransition';
6
5
  import { BaseDateValidationProps, DayValidationProps, MonthValidationProps, YearValidationProps } from '../internals/models/validation';
7
6
  import { DayCalendarClasses } from './dayCalendarClasses';
8
7
  import { PickerValidDate, TimezoneProps } from '../models';
9
- import { DefaultizedProps } from '../internals/models/helpers';
8
+ import { DefaultizedProps, SlotComponentPropsFromProps } from '../internals/models/helpers';
10
9
  export interface DayCalendarSlots<TDate extends PickerValidDate> {
11
10
  /**
12
11
  * Custom component for day.
@@ -16,7 +15,7 @@ export interface DayCalendarSlots<TDate extends PickerValidDate> {
16
15
  day?: React.ElementType<PickersDayProps<TDate>>;
17
16
  }
18
17
  export interface DayCalendarSlotProps<TDate extends PickerValidDate> {
19
- day?: SlotComponentProps<typeof PickersDay, {}, DayCalendarProps<TDate> & {
18
+ day?: SlotComponentPropsFromProps<PickersDayProps<TDate>, {}, DayCalendarProps<TDate> & {
20
19
  day: TDate;
21
20
  selected: boolean;
22
21
  }>;
@@ -167,7 +167,9 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes = {
167
167
  /**
168
168
  * Callback fired when the value is accepted.
169
169
  * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
170
+ * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
170
171
  * @param {TValue} value The value that was just accepted.
172
+ * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
171
173
  */
172
174
  onAccept: PropTypes.func,
173
175
  /**
@@ -205,7 +205,9 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
205
205
  /**
206
206
  * Callback fired when the value is accepted.
207
207
  * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
208
+ * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
208
209
  * @param {TValue} value The value that was just accepted.
210
+ * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
209
211
  */
210
212
  onAccept: PropTypes.func,
211
213
  /**
@@ -182,7 +182,9 @@ DesktopDatePicker.propTypes = {
182
182
  /**
183
183
  * Callback fired when the value is accepted.
184
184
  * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
185
+ * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
185
186
  * @param {TValue} value The value that was just accepted.
187
+ * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
186
188
  */
187
189
  onAccept: PropTypes.func,
188
190
  /**
@@ -305,7 +305,9 @@ DesktopDateTimePicker.propTypes = {
305
305
  /**
306
306
  * Callback fired when the value is accepted.
307
307
  * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
308
+ * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
308
309
  * @param {TValue} value The value that was just accepted.
310
+ * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
309
311
  */
310
312
  onAccept: PropTypes.func,
311
313
  /**
@@ -193,7 +193,9 @@ DesktopTimePicker.propTypes = {
193
193
  /**
194
194
  * Callback fired when the value is accepted.
195
195
  * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
196
+ * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
196
197
  * @param {TValue} value The value that was just accepted.
198
+ * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
197
199
  */
198
200
  onAccept: PropTypes.func,
199
201
  /**
@@ -179,7 +179,9 @@ MobileDatePicker.propTypes = {
179
179
  /**
180
180
  * Callback fired when the value is accepted.
181
181
  * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
182
+ * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
182
183
  * @param {TValue} value The value that was just accepted.
184
+ * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
183
185
  */
184
186
  onAccept: PropTypes.func,
185
187
  /**
@@ -227,7 +227,9 @@ MobileDateTimePicker.propTypes = {
227
227
  /**
228
228
  * Callback fired when the value is accepted.
229
229
  * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
230
+ * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
230
231
  * @param {TValue} value The value that was just accepted.
232
+ * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
231
233
  */
232
234
  onAccept: PropTypes.func,
233
235
  /**
@@ -172,7 +172,9 @@ MobileTimePicker.propTypes = {
172
172
  /**
173
173
  * Callback fired when the value is accepted.
174
174
  * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
175
+ * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
175
176
  * @param {TValue} value The value that was just accepted.
177
+ * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
176
178
  */
177
179
  onAccept: PropTypes.func,
178
180
  /**
@@ -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 = ["className", "value", "defaultValue", "referenceDate", "disabled", "disableFuture", "disablePast", "maxDate", "minDate", "onChange", "shouldDisableMonth", "readOnly", "disableHighlightToday", "autoFocus", "onMonthFocus", "hasFocus", "onFocusedViewChange", "monthsPerRow", "timezone", "gridLabelId"];
3
+ const _excluded = ["className", "value", "defaultValue", "referenceDate", "disabled", "disableFuture", "disablePast", "maxDate", "minDate", "onChange", "shouldDisableMonth", "readOnly", "disableHighlightToday", "autoFocus", "onMonthFocus", "hasFocus", "onFocusedViewChange", "monthsPerRow", "timezone", "gridLabelId", "slots", "slotProps"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
@@ -83,7 +83,9 @@ export const MonthCalendar = /*#__PURE__*/React.forwardRef(function MonthCalenda
83
83
  onFocusedViewChange,
84
84
  monthsPerRow = 3,
85
85
  timezone: timezoneProp,
86
- gridLabelId
86
+ gridLabelId,
87
+ slots,
88
+ slotProps
87
89
  } = props,
88
90
  other = _objectWithoutPropertiesLoose(props, _excluded);
89
91
  const {
@@ -218,12 +220,14 @@ export const MonthCalendar = /*#__PURE__*/React.forwardRef(function MonthCalenda
218
220
  onKeyDown: handleKeyDown,
219
221
  autoFocus: internalHasFocus && monthNumber === focusedMonth,
220
222
  disabled: isDisabled,
221
- tabIndex: monthNumber === focusedMonth ? 0 : -1,
223
+ tabIndex: monthNumber === focusedMonth && !isDisabled ? 0 : -1,
222
224
  onFocus: handleMonthFocus,
223
225
  onBlur: handleMonthBlur,
224
226
  "aria-current": todayMonth === monthNumber ? 'date' : undefined,
225
227
  "aria-label": monthLabel,
226
228
  monthsPerRow: monthsPerRow,
229
+ slots: slots,
230
+ slotProps: slotProps,
227
231
  children: monthText
228
232
  }, monthText);
229
233
  })
@@ -303,6 +307,16 @@ process.env.NODE_ENV !== "production" ? MonthCalendar.propTypes = {
303
307
  * @returns {boolean} If `true`, the month will be disabled.
304
308
  */
305
309
  shouldDisableMonth: PropTypes.func,
310
+ /**
311
+ * The props used for each component slot.
312
+ * @default {}
313
+ */
314
+ slotProps: PropTypes.object,
315
+ /**
316
+ * Overridable component slots.
317
+ * @default {}
318
+ */
319
+ slots: PropTypes.object,
306
320
  /**
307
321
  * The system prop that allows defining system overrides as well as additional CSS styles.
308
322
  */
@@ -1,8 +1,23 @@
1
+ import * as React from 'react';
1
2
  import { SxProps } from '@mui/system';
2
3
  import { Theme } from '@mui/material/styles';
3
4
  import { MonthCalendarClasses } from './monthCalendarClasses';
4
5
  import { BaseDateValidationProps, MonthValidationProps } from '../internals/models/validation';
5
6
  import { PickerValidDate, TimezoneProps } from '../models';
7
+ import type { PickersMonthProps } from './PickersMonth';
8
+ import { SlotComponentPropsFromProps } from '../internals/models/helpers';
9
+ export interface MonthCalendarSlots {
10
+ /**
11
+ * Button displayed to render a single month in the "month" view.
12
+ * @default MonthCalendarButton
13
+ */
14
+ monthButton?: React.ElementType;
15
+ }
16
+ export interface MonthCalendarSlotProps {
17
+ monthButton?: SlotComponentPropsFromProps<React.HTMLAttributes<HTMLButtonElement> & {
18
+ sx: SxProps;
19
+ }, {}, PickersMonthProps>;
20
+ }
6
21
  export interface ExportedMonthCalendarProps {
7
22
  /**
8
23
  * Months rendered per row.
@@ -17,6 +32,16 @@ export interface MonthCalendarProps<TDate extends PickerValidDate> extends Expor
17
32
  * Override or extend the styles applied to the component.
18
33
  */
19
34
  classes?: Partial<MonthCalendarClasses>;
35
+ /**
36
+ * Overridable component slots.
37
+ * @default {}
38
+ */
39
+ slots?: MonthCalendarSlots;
40
+ /**
41
+ * The props used for each component slot.
42
+ * @default {}
43
+ */
44
+ slotProps?: MonthCalendarSlotProps;
20
45
  /**
21
46
  * The system prop that allows defining system overrides as well as additional CSS styles.
22
47
  */