@mui/x-date-pickers 7.11.0 → 7.12.0

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 (196) hide show
  1. package/AdapterDateFns/AdapterDateFns.js +5 -2
  2. package/AdapterDateFnsBase/AdapterDateFnsBase.d.ts +4 -4
  3. package/AdapterDateFnsBase/AdapterDateFnsBase.js +5 -9
  4. package/AdapterDateFnsJalali/AdapterDateFnsJalali.d.ts +0 -1
  5. package/AdapterDateFnsJalali/AdapterDateFnsJalali.js +5 -5
  6. package/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.d.ts +0 -1
  7. package/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.js +8 -8
  8. package/AdapterDateFnsV3/AdapterDateFnsV3.js +8 -5
  9. package/AdapterDayjs/AdapterDayjs.js +6 -4
  10. package/AdapterLuxon/AdapterLuxon.js +1 -0
  11. package/AdapterMomentJalaali/AdapterMomentJalaali.d.ts +1 -0
  12. package/AdapterMomentJalaali/AdapterMomentJalaali.js +3 -0
  13. package/CHANGELOG.md +194 -4
  14. package/DateCalendar/DateCalendar.js +3 -1
  15. package/DateCalendar/DateCalendar.types.d.ts +1 -1
  16. package/DateCalendar/DayCalendar.js +1 -1
  17. package/DateField/DateField.js +3 -1
  18. package/DateField/DateField.types.d.ts +1 -1
  19. package/DatePicker/DatePicker.js +2 -0
  20. package/DatePicker/DatePickerToolbar.js +1 -1
  21. package/DateTimeField/DateTimeField.js +3 -1
  22. package/DateTimeField/DateTimeField.types.d.ts +1 -1
  23. package/DateTimePicker/DateTimePicker.js +2 -0
  24. package/DayCalendarSkeleton/DayCalendarSkeleton.js +1 -1
  25. package/DesktopDatePicker/DesktopDatePicker.js +3 -1
  26. package/DesktopDateTimePicker/DesktopDateTimePicker.js +3 -1
  27. package/DesktopTimePicker/DesktopTimePicker.js +1 -1
  28. package/DigitalClock/DigitalClock.js +1 -1
  29. package/DigitalClock/DigitalClock.types.d.ts +1 -1
  30. package/MobileDatePicker/MobileDatePicker.js +3 -1
  31. package/MobileDateTimePicker/MobileDateTimePicker.js +3 -1
  32. package/MobileTimePicker/MobileTimePicker.js +1 -1
  33. package/MonthCalendar/MonthCalendar.js +2 -0
  34. package/MonthCalendar/PickersMonth.js +1 -1
  35. package/MultiSectionDigitalClock/MultiSectionDigitalClock.types.d.ts +1 -1
  36. package/PickersCalendarHeader/PickersCalendarHeader.js +2 -2
  37. package/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +1 -1
  38. package/PickersLayout/PickersLayout.js +1 -1
  39. package/PickersLayout/PickersLayout.types.d.ts +1 -1
  40. package/PickersLayout/usePickerLayout.js +2 -2
  41. package/PickersSectionList/PickersSectionList.js +1 -1
  42. package/PickersSectionList/PickersSectionList.types.d.ts +1 -1
  43. package/PickersTextField/PickersInputBase/PickersInputBase.js +1 -1
  44. package/StaticDatePicker/StaticDatePicker.js +2 -0
  45. package/StaticDateTimePicker/StaticDateTimePicker.js +2 -0
  46. package/TimeClock/ClockNumber.js +1 -1
  47. package/TimeClock/ClockPointer.js +1 -1
  48. package/TimeField/TimeField.js +1 -1
  49. package/TimeField/TimeField.types.d.ts +1 -1
  50. package/TimePicker/TimePickerToolbar.js +1 -1
  51. package/YearCalendar/PickersYear.js +1 -1
  52. package/YearCalendar/YearCalendar.js +2 -0
  53. package/hooks/useClearableField.d.ts +1 -1
  54. package/hooks/useClearableField.js +1 -1
  55. package/index.js +1 -1
  56. package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +2 -2
  57. package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.types.d.ts +1 -1
  58. package/internals/components/PickersPopper.d.ts +2 -2
  59. package/internals/components/PickersPopper.js +1 -1
  60. package/internals/components/PickersToolbar.js +1 -1
  61. package/internals/components/PickersToolbarButton.js +1 -1
  62. package/internals/components/PickersToolbarText.js +1 -1
  63. package/internals/hooks/useDesktopPicker/useDesktopPicker.js +1 -1
  64. package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +1 -1
  65. package/internals/hooks/useField/useField.js +3 -1
  66. package/internals/hooks/useField/useField.utils.js +1 -1
  67. package/internals/hooks/useField/useFieldV6TextField.js +3 -2
  68. package/internals/hooks/useField/useFieldV7TextField.js +1 -1
  69. package/internals/hooks/useMobilePicker/useMobilePicker.js +1 -1
  70. package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +1 -1
  71. package/internals/hooks/usePicker/usePicker.js +2 -3
  72. package/internals/index.d.ts +1 -1
  73. package/internals/index.js +1 -1
  74. package/internals/models/validation.d.ts +2 -0
  75. package/internals/utils/warning.d.ts +2 -4
  76. package/internals/utils/warning.js +17 -24
  77. package/locales/fiFI.js +2 -2
  78. package/locales/index.d.ts +1 -0
  79. package/locales/index.js +1 -0
  80. package/locales/nnNO.d.ts +80 -0
  81. package/locales/nnNO.js +73 -0
  82. package/modern/AdapterDateFns/AdapterDateFns.js +5 -2
  83. package/modern/AdapterDateFnsBase/AdapterDateFnsBase.js +5 -9
  84. package/modern/AdapterDateFnsJalali/AdapterDateFnsJalali.js +5 -5
  85. package/modern/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.js +8 -8
  86. package/modern/AdapterDateFnsV3/AdapterDateFnsV3.js +8 -5
  87. package/modern/AdapterDayjs/AdapterDayjs.js +6 -4
  88. package/modern/AdapterLuxon/AdapterLuxon.js +1 -0
  89. package/modern/AdapterMomentJalaali/AdapterMomentJalaali.js +3 -0
  90. package/modern/DateCalendar/DateCalendar.js +3 -1
  91. package/modern/DateCalendar/DayCalendar.js +1 -1
  92. package/modern/DateField/DateField.js +3 -1
  93. package/modern/DatePicker/DatePicker.js +2 -0
  94. package/modern/DatePicker/DatePickerToolbar.js +1 -1
  95. package/modern/DateTimeField/DateTimeField.js +3 -1
  96. package/modern/DateTimePicker/DateTimePicker.js +2 -0
  97. package/modern/DayCalendarSkeleton/DayCalendarSkeleton.js +1 -1
  98. package/modern/DesktopDatePicker/DesktopDatePicker.js +3 -1
  99. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +3 -1
  100. package/modern/DesktopTimePicker/DesktopTimePicker.js +1 -1
  101. package/modern/DigitalClock/DigitalClock.js +1 -1
  102. package/modern/MobileDatePicker/MobileDatePicker.js +3 -1
  103. package/modern/MobileDateTimePicker/MobileDateTimePicker.js +3 -1
  104. package/modern/MobileTimePicker/MobileTimePicker.js +1 -1
  105. package/modern/MonthCalendar/MonthCalendar.js +2 -0
  106. package/modern/MonthCalendar/PickersMonth.js +1 -1
  107. package/modern/PickersCalendarHeader/PickersCalendarHeader.js +2 -2
  108. package/modern/PickersLayout/PickersLayout.js +1 -1
  109. package/modern/PickersLayout/usePickerLayout.js +2 -2
  110. package/modern/PickersSectionList/PickersSectionList.js +1 -1
  111. package/modern/PickersTextField/PickersInputBase/PickersInputBase.js +1 -1
  112. package/modern/StaticDatePicker/StaticDatePicker.js +2 -0
  113. package/modern/StaticDateTimePicker/StaticDateTimePicker.js +2 -0
  114. package/modern/TimeClock/ClockNumber.js +1 -1
  115. package/modern/TimeClock/ClockPointer.js +1 -1
  116. package/modern/TimeField/TimeField.js +1 -1
  117. package/modern/TimePicker/TimePickerToolbar.js +1 -1
  118. package/modern/YearCalendar/PickersYear.js +1 -1
  119. package/modern/YearCalendar/YearCalendar.js +2 -0
  120. package/modern/hooks/useClearableField.js +1 -1
  121. package/modern/index.js +1 -1
  122. package/modern/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +2 -2
  123. package/modern/internals/components/PickersPopper.js +1 -1
  124. package/modern/internals/components/PickersToolbar.js +1 -1
  125. package/modern/internals/components/PickersToolbarButton.js +1 -1
  126. package/modern/internals/components/PickersToolbarText.js +1 -1
  127. package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.js +1 -1
  128. package/modern/internals/hooks/useField/useField.js +3 -1
  129. package/modern/internals/hooks/useField/useField.utils.js +1 -1
  130. package/modern/internals/hooks/useField/useFieldV6TextField.js +3 -2
  131. package/modern/internals/hooks/useField/useFieldV7TextField.js +1 -1
  132. package/modern/internals/hooks/useMobilePicker/useMobilePicker.js +1 -1
  133. package/modern/internals/hooks/usePicker/usePicker.js +2 -3
  134. package/modern/internals/index.js +1 -1
  135. package/modern/internals/utils/warning.js +17 -24
  136. package/modern/locales/fiFI.js +2 -2
  137. package/modern/locales/index.js +1 -0
  138. package/modern/locales/nnNO.js +73 -0
  139. package/node/AdapterDateFns/AdapterDateFns.js +5 -2
  140. package/node/AdapterDateFnsBase/AdapterDateFnsBase.js +5 -9
  141. package/node/AdapterDateFnsJalali/AdapterDateFnsJalali.js +5 -5
  142. package/node/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.js +8 -8
  143. package/node/AdapterDateFnsV3/AdapterDateFnsV3.js +8 -5
  144. package/node/AdapterDayjs/AdapterDayjs.js +5 -3
  145. package/node/AdapterLuxon/AdapterLuxon.js +1 -0
  146. package/node/AdapterMomentJalaali/AdapterMomentJalaali.js +3 -0
  147. package/node/DateCalendar/DateCalendar.js +10 -8
  148. package/node/DateCalendar/DayCalendar.js +5 -5
  149. package/node/DateField/DateField.js +6 -4
  150. package/node/DatePicker/DatePicker.js +2 -0
  151. package/node/DatePicker/DatePickerToolbar.js +2 -2
  152. package/node/DateTimeField/DateTimeField.js +6 -4
  153. package/node/DateTimePicker/DateTimePicker.js +2 -0
  154. package/node/DayCalendarSkeleton/DayCalendarSkeleton.js +2 -2
  155. package/node/DesktopDatePicker/DesktopDatePicker.js +6 -4
  156. package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +7 -5
  157. package/node/DesktopTimePicker/DesktopTimePicker.js +4 -4
  158. package/node/DigitalClock/DigitalClock.js +2 -2
  159. package/node/MobileDatePicker/MobileDatePicker.js +6 -4
  160. package/node/MobileDateTimePicker/MobileDateTimePicker.js +6 -4
  161. package/node/MobileTimePicker/MobileTimePicker.js +4 -4
  162. package/node/MonthCalendar/MonthCalendar.js +2 -0
  163. package/node/MonthCalendar/PickersMonth.js +2 -2
  164. package/node/PickersCalendarHeader/PickersCalendarHeader.js +5 -5
  165. package/node/PickersLayout/PickersLayout.js +2 -2
  166. package/node/PickersLayout/usePickerLayout.js +6 -6
  167. package/node/PickersSectionList/PickersSectionList.js +6 -6
  168. package/node/PickersTextField/PickersInputBase/PickersInputBase.js +2 -2
  169. package/node/StaticDatePicker/StaticDatePicker.js +2 -0
  170. package/node/StaticDateTimePicker/StaticDateTimePicker.js +2 -0
  171. package/node/TimeClock/ClockNumber.js +2 -2
  172. package/node/TimeClock/ClockPointer.js +2 -2
  173. package/node/TimeField/TimeField.js +4 -4
  174. package/node/TimePicker/TimePickerToolbar.js +6 -6
  175. package/node/YearCalendar/PickersYear.js +2 -2
  176. package/node/YearCalendar/YearCalendar.js +2 -0
  177. package/node/hooks/useClearableField.js +3 -3
  178. package/node/index.js +1 -1
  179. package/node/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +7 -7
  180. package/node/internals/components/PickersPopper.js +13 -13
  181. package/node/internals/components/PickersToolbar.js +2 -2
  182. package/node/internals/components/PickersToolbarButton.js +2 -2
  183. package/node/internals/components/PickersToolbarText.js +2 -2
  184. package/node/internals/hooks/useDesktopPicker/useDesktopPicker.js +4 -4
  185. package/node/internals/hooks/useField/useField.js +3 -1
  186. package/node/internals/hooks/useField/useField.utils.js +1 -1
  187. package/node/internals/hooks/useField/useFieldV6TextField.js +3 -2
  188. package/node/internals/hooks/useField/useFieldV7TextField.js +1 -1
  189. package/node/internals/hooks/useMobilePicker/useMobilePicker.js +4 -4
  190. package/node/internals/hooks/usePicker/usePicker.js +1 -2
  191. package/node/internals/index.js +6 -12
  192. package/node/internals/utils/warning.js +19 -27
  193. package/node/locales/fiFI.js +2 -2
  194. package/node/locales/index.js +11 -0
  195. package/node/locales/nnNO.js +79 -0
  196. package/package.json +4 -5
@@ -75,8 +75,11 @@ export class AdapterDateFns extends AdapterDateFnsBase {
75
75
  locale,
76
76
  formats
77
77
  } = {}) {
78
- if (typeof addDays !== 'function') {
79
- throw new Error(['MUI: The `date-fns` package v3.x is not compatible with this adapter.', 'Please, install v2.x of the package or use the `AdapterDateFnsV3` instead.'].join('\n'));
78
+ /* istanbul ignore next */
79
+ if (process.env.NODE_ENV !== 'production') {
80
+ if (typeof addDays !== 'function') {
81
+ throw new Error(['MUI: The `date-fns` package v3.x is not compatible with this adapter.', 'Please, install v2.x of the package or use the `AdapterDateFnsV3` instead.'].join('\n'));
82
+ }
80
83
  }
81
84
  super({
82
85
  locale: locale ?? defaultLocale,
@@ -2,14 +2,14 @@ import { AdapterFormats, AdapterOptions, DateBuilderReturnType, FieldFormatToken
2
2
  import { MakeRequired } from '../internals/models/helpers';
3
3
  type DateFnsLocaleBase = {
4
4
  formatLong?: {
5
- date?: any;
6
- time?: any;
7
- dateTime?: any;
5
+ date: (...args: Array<any>) => any;
6
+ time: (...args: Array<any>) => any;
7
+ dateTime: (...args: Array<any>) => any;
8
8
  };
9
9
  code?: string;
10
10
  };
11
11
  type DateFnsAdapterBaseOptions<DateFnsLocale extends DateFnsLocaleBase> = MakeRequired<AdapterOptions<DateFnsLocale, never>, 'locale'> & {
12
- longFormatters: Record<'p' | 'P', (token: string, formatLong: any) => string>;
12
+ longFormatters: Record<'p' | 'P', (token: string, formatLong: DateFnsLocaleBase['formatLong']) => string>;
13
13
  lib?: string;
14
14
  };
15
15
  /**
@@ -249,19 +249,15 @@ export class AdapterDateFnsBase {
249
249
  return value;
250
250
  };
251
251
  this.getCurrentLocaleCode = () => {
252
- return this.locale?.code || 'en-US';
252
+ // `code` is undefined only in `date-fns` types, but all locales have it
253
+ return this.locale.code;
253
254
  };
254
255
  // Note: date-fns input types are more lenient than this adapter, so we need to expose our more
255
256
  // strict signature and delegate to the more lenient signature. Otherwise, we have downstream type errors upon usage.
256
257
  this.is12HourCycleInCurrentLocale = () => {
257
- if (this.locale) {
258
- return /a/.test(this.locale.formatLong.time({
259
- width: 'short'
260
- }));
261
- }
262
-
263
- // By default, date-fns is using en-US locale with am/pm enabled
264
- return true;
258
+ return /a/.test(this.locale.formatLong.time({
259
+ width: 'short'
260
+ }));
265
261
  };
266
262
  this.expandFormat = format => {
267
263
  const longFormatRegexp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
@@ -35,7 +35,6 @@ declare module '@mui/x-date-pickers/models' {
35
35
  export declare class AdapterDateFnsJalali extends AdapterDateFnsBase<DateFnsLocale> implements MuiPickersAdapter<Date, DateFnsLocale> {
36
36
  constructor({ locale, formats }?: AdapterOptions<DateFnsLocale, never>);
37
37
  parse: (value: string, format: string) => Date | null;
38
- getCurrentLocaleCode: () => string;
39
38
  isValid: (value: Date | null) => boolean;
40
39
  format: (value: Date, formatKey: keyof AdapterFormats) => string;
41
40
  formatByString: (value: Date, formatString: string) => string;
@@ -113,8 +113,11 @@ export class AdapterDateFnsJalali extends AdapterDateFnsBase {
113
113
  locale,
114
114
  formats
115
115
  } = {}) {
116
- if (typeof addDays !== 'function') {
117
- throw new Error(['MUI: The `date-fns-jalali` package v3.x is not compatible with this adapter.', 'Please, install v2.x of the package or use the `AdapterDateFnsJalaliV3` instead.'].join('\n'));
116
+ /* istanbul ignore next */
117
+ if (process.env.NODE_ENV !== 'production') {
118
+ if (typeof addDays !== 'function') {
119
+ throw new Error(['MUI: The `date-fns-jalali` package v3.x is not compatible with this adapter.', 'Please, install v2.x of the package or use the `AdapterDateFnsJalaliV3` instead.'].join('\n'));
120
+ }
118
121
  }
119
122
  super({
120
123
  locale: locale ?? defaultLocale,
@@ -132,9 +135,6 @@ export class AdapterDateFnsJalali extends AdapterDateFnsBase {
132
135
  locale: this.locale
133
136
  });
134
137
  };
135
- this.getCurrentLocaleCode = () => {
136
- return this.locale?.code || 'fa-IR';
137
- };
138
138
  this.isValid = value => {
139
139
  if (value == null) {
140
140
  return false;
@@ -34,7 +34,6 @@ declare module '@mui/x-date-pickers/models' {
34
34
  export declare class AdapterDateFnsJalali extends AdapterDateFnsBase<DateFnsLocale> implements MuiPickersAdapter<Date, DateFnsLocale> {
35
35
  constructor({ locale, formats }?: AdapterOptions<DateFnsLocale, never>);
36
36
  parse: (value: string, format: string) => Date | null;
37
- getCurrentLocaleCode: () => string;
38
37
  isValid: (value: Date | null) => boolean;
39
38
  format: (value: Date, formatKey: keyof AdapterFormats) => string;
40
39
  formatByString: (value: Date, formatString: string) => string;
@@ -116,11 +116,14 @@ export class AdapterDateFnsJalali extends AdapterDateFnsBase {
116
116
  locale,
117
117
  formats
118
118
  } = {}) {
119
- if (typeof addDays !== 'function') {
120
- throw new Error([`MUI: The \`date-fns-jalali\` package v2.x is not compatible with this adapter.`, 'Please, install v3.x of the package or use the `AdapterDateFnsJalali` instead.'].join('\n'));
121
- }
122
- if (!longFormatters) {
123
- throw new Error('MUI: The minimum supported `date-fns-jalali` package version compatible with this adapter is `3.2.x`.');
119
+ /* istanbul ignore next */
120
+ if (process.env.NODE_ENV !== 'production') {
121
+ if (typeof addDays !== 'function') {
122
+ throw new Error([`MUI: The \`date-fns-jalali\` package v2.x is not compatible with this adapter.`, 'Please, install v3.x of the package or use the `AdapterDateFnsJalali` instead.'].join('\n'));
123
+ }
124
+ if (!longFormatters) {
125
+ throw new Error('MUI: The minimum supported `date-fns-jalali` package version compatible with this adapter is `3.2.x`.');
126
+ }
124
127
  }
125
128
  super({
126
129
  locale: locale ?? defaultLocale,
@@ -139,9 +142,6 @@ export class AdapterDateFnsJalali extends AdapterDateFnsBase {
139
142
  locale: this.locale
140
143
  });
141
144
  };
142
- this.getCurrentLocaleCode = () => {
143
- return this.locale?.code || 'fa-IR';
144
- };
145
145
  this.isValid = value => {
146
146
  if (value == null) {
147
147
  return false;
@@ -79,11 +79,14 @@ export class AdapterDateFns extends AdapterDateFnsBase {
79
79
  locale,
80
80
  formats
81
81
  } = {}) {
82
- if (typeof addDays !== 'function') {
83
- throw new Error([`MUI: The \`date-fns\` package v2.x is not compatible with this adapter.`, 'Please, install v3.x of the package or use the `AdapterDateFns` instead.'].join('\n'));
84
- }
85
- if (!longFormatters) {
86
- throw new Error('MUI: The minimum supported `date-fns` package version compatible with this adapter is `3.2.x`.');
82
+ /* istanbul ignore next */
83
+ if (process.env.NODE_ENV !== 'production') {
84
+ if (typeof addDays !== 'function') {
85
+ throw new Error([`MUI: The \`date-fns\` package v2.x is not compatible with this adapter.`, 'Please, install v3.x of the package or use the `AdapterDateFns` instead.'].join('\n'));
86
+ }
87
+ if (!longFormatters) {
88
+ throw new Error('MUI: The minimum supported `date-fns` package version compatible with this adapter is `3.2.x`.');
89
+ }
87
90
  }
88
91
  super({
89
92
  locale: locale ?? enUS,
@@ -6,12 +6,11 @@ import customParseFormatPlugin from 'dayjs/plugin/customParseFormat';
6
6
  import localizedFormatPlugin from 'dayjs/plugin/localizedFormat';
7
7
  import isBetweenPlugin from 'dayjs/plugin/isBetween';
8
8
  import advancedFormatPlugin from 'dayjs/plugin/advancedFormat';
9
- import { buildWarning } from '../internals/utils/warning';
9
+ import { warnOnce } from '../internals/utils/warning';
10
10
  defaultDayjs.extend(localizedFormatPlugin);
11
11
  defaultDayjs.extend(weekOfYearPlugin);
12
12
  defaultDayjs.extend(isBetweenPlugin);
13
13
  defaultDayjs.extend(advancedFormatPlugin);
14
- const localeNotFoundWarning = buildWarning(['Your locale has not been found.', 'Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale', "Or you forget to import the locale from 'dayjs/locale/{localeUsed}'", 'fallback on English locale']);
15
14
  const formatTokenMap = {
16
15
  // Year
17
16
  YY: 'year',
@@ -234,7 +233,10 @@ export class AdapterDayjs {
234
233
  const locale = this.locale || 'en';
235
234
  let localeObject = locales[locale];
236
235
  if (localeObject === undefined) {
237
- localeNotFoundWarning();
236
+ /* istanbul ignore next */
237
+ if (process.env.NODE_ENV !== 'production') {
238
+ warnOnce(['MUI X: Your locale has not been found.', 'Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale.', "Or you forget to import the locale from 'dayjs/locale/{localeUsed}'", 'fallback on English locale.']);
239
+ }
238
240
  localeObject = locales.en;
239
241
  }
240
242
  return localeObject.formats;
@@ -253,7 +255,7 @@ export class AdapterDayjs {
253
255
  if (timezone !== 'UTC') {
254
256
  const fixedValue = value.tz(this.cleanTimezone(timezone), true);
255
257
  // @ts-ignore
256
- if ((fixedValue.$offset ?? 0) === (value.$offset ?? 0)) {
258
+ if (fixedValue.$offset === (value.$offset ?? 0)) {
257
259
  return value;
258
260
  }
259
261
  // Change only what is needed to avoid creating a new object with unwanted data
@@ -480,6 +480,7 @@ export class AdapterLuxon {
480
480
  return weeks;
481
481
  };
482
482
  this.getWeekNumber = value => {
483
+ /* istanbul ignore next */
483
484
  return value.localWeekNumber ?? value.weekNumber;
484
485
  };
485
486
  this.getDayOfWeek = value => {
@@ -55,6 +55,7 @@ export declare class AdapterMomentJalaali extends AdapterMoment implements MuiPi
55
55
  getYear: (value: Moment) => number;
56
56
  getMonth: (value: Moment) => number;
57
57
  getDate: (value: Moment) => number;
58
+ getDaysInMonth: (value: Moment) => number;
58
59
  setYear: (value: Moment, year: number) => defaultJMoment.Moment;
59
60
  setMonth: (value: Moment, month: number) => defaultJMoment.Moment;
60
61
  setDate: (value: Moment, date: number) => defaultJMoment.Moment;
@@ -201,6 +201,9 @@ export class AdapterMomentJalaali extends AdapterMoment {
201
201
  this.getDate = value => {
202
202
  return value.jDate();
203
203
  };
204
+ this.getDaysInMonth = value => {
205
+ return this.moment.jDaysInMonth(value.jYear(), value.jMonth());
206
+ };
204
207
  this.setYear = (value, year) => {
205
208
  return value.clone().jYear(year);
206
209
  };
package/CHANGELOG.md CHANGED
@@ -3,6 +3,196 @@
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.12.0
7
+
8
+ _Aug 1, 2024_
9
+
10
+ ### 💵 Our commercial offering is evolving
11
+
12
+ The [Pro plan](https://mui.com/x/introduction/licensing/#pro-plan) is receiving two new packages:
13
+
14
+ - `@mui/x-tree-view-pro` (available today!)
15
+ - `@mui/x-charts-pro` (available in the coming weeks)
16
+
17
+ As always, every feature released as part of the MIT plan will remain free and MIT licensed forever.
18
+
19
+ This expansion of the Pro plan comes with some adjustments to our pricing strategy. Learn more about those in the [Upcoming changes to MUI X pricing in 2024](https://mui.com/blog/mui-x-sep-2024-price-update/) blog post.
20
+
21
+ ### Highlights
22
+
23
+ We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
24
+
25
+ - 🎁 Introduce [item reordering using drag and drop](https://mui.com/x/react-tree-view/rich-tree-view/ordering/) on the `RichTreeViewPro` component
26
+
27
+ <img width="384" src="https://github.com/user-attachments/assets/78bd83c5-7ce4-4ed7-acf9-be70b2dbce54" alt="Item reordering using drag and drop" />
28
+
29
+ - 📦 Support Common JS bundle out of the box on `@mui/x-charts` by adding vendored D3 dependencies.
30
+
31
+ - This modifies how the package imports D3.js. It will impact you if you use `d3` packages installed by `@mui/x-charts` and don't have them in your `package.json`. You shouldn't be affected otherwise.
32
+ - For more context, the initial issue is caused by D3 only exporting ESM.
33
+
34
+ ![image](https://github.com/user-attachments/assets/d705b4de-0c93-420e-a416-528e7a044c1d)
35
+
36
+ - The solution up until now was to export charts with only ESM. But some frameworks are confused by this configuration.
37
+
38
+ ![image](https://github.com/user-attachments/assets/18a09703-9dd4-4226-a33d-167af059219c)
39
+
40
+ - So in order to fix this, we are providing a CJS version of D3.
41
+
42
+ ![image](https://github.com/user-attachments/assets/56387fe6-85d8-4750-bb9d-9866d5be68fa)
43
+
44
+ - 🌍 Improve Turkish (tr-TR) locale on the Data Grid
45
+ - 🌍 Improve Finnish (fi-FI) locale on the Date and Time Pickers
46
+ - 🐞 Bugfixes
47
+ - 📚 Documentation improvements
48
+
49
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
50
+
51
+ ### Data Grid
52
+
53
+ #### `@mui/x-data-grid@7.12.0`
54
+
55
+ - [DataGrid] Fix crash when updating columns immediately after scrolling (#13781) @cherniavskii
56
+ - [DataGrid] Fix `role=presentation` a11y issue (#13891) @romgrk
57
+ - [DataGrid] Fix top corner pixels & outline radius (#13943) @romgrk
58
+ - [DataGrid] Refactor: remove useless copy (#14039) @romgrk
59
+ - [l10n] Improve Turkish (tr-TR) locale (#13996) @bagcivan
60
+
61
+ #### `@mui/x-data-grid-pro@7.12.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
62
+
63
+ Same changes as in `@mui/x-data-grid@7.12.0`.
64
+
65
+ #### `@mui/x-data-grid-premium@7.12.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
66
+
67
+ Same changes as in `@mui/x-data-grid-pro@7.12.0`.
68
+
69
+ ### Date and Time Pickers
70
+
71
+ #### `@mui/x-date-pickers@7.12.0`
72
+
73
+ - [l10n] Improve Finnish (fi-FI) locale (#14054) @frozenzia
74
+
75
+ #### `@mui/x-date-pickers-pro@7.12.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
76
+
77
+ Same changes as in `@mui/x-date-pickers@7.12.0`.
78
+
79
+ ### Charts
80
+
81
+ #### `@mui/x-charts@7.12.0`
82
+
83
+ - [charts] Fix incorrect `axisId` prop being allowed in xAxis/yAxis config. Use `id` instead. (#13986) @JCQuintas
84
+ - [charts] Use vendor to have Common JS bundle working out of the box (#13608) @alexfauquette
85
+ - [charts] Divide the `SeriesProvider` to use in filtering (#14026) @JCQuintas
86
+
87
+ ### Tree View
88
+
89
+ #### `@mui/x-tree-view@7.12.0`
90
+
91
+ - [TreeView] Add new prop `onItemClick` on the Tree View components (#14018) @flaviendelangle
92
+ - [TreeView] Add new utility function `isEventTargetInDescendants` (#13982) @flaviendelangle
93
+ - [TreeView] Support item reordering using drag and drop (#12213) @flaviendelangle
94
+
95
+ ### Docs
96
+
97
+ - [docs] Add Pickers `minDate` and `maxDate` `default` description (#14024) @LukasTy
98
+ - [docs] Fix 404 (#13989) @alexfauquette
99
+ - [docs] Fix Vale errors (#14025) @oliviertassinari
100
+ - [docs] Update on `renderCell` & autogenerated rows (#13879) @romgrk
101
+
102
+ ### Core
103
+
104
+ - [core] Fix event naming convention @oliviertassinari
105
+ - [core] Replace @mui/base with @mui/utils + @mui/material (#13823) @mnajdova
106
+ - [core] Test `charts` performance with codspeed (#13952) @JCQuintas
107
+ - [infra] Consolidate issue cleanup and support labeling action (#14031) @michelengelen
108
+ - [infra] Revert `vale` action `paths` filtering (#14038) @LukasTy
109
+ - [test] Fix adapters code coverage (#13969) @alexfauquette
110
+ - [test] Fix mocha config to run charts tests (#14041) @alexfauquette
111
+
112
+ ## 7.11.1
113
+
114
+ _Jul 25, 2024_
115
+
116
+ We'd like to offer a big thanks to the 18 contributors who made this release possible. Here are some highlights ✨:
117
+
118
+ - 🔎 Allow `Zoom` to be controllable for charts (#13858) @JCQuintas
119
+ - 🌍 Add Icelandic (is-IS) and Norwegian Nynorsk (nn-NO) locales on the Data Grid
120
+ - 🌍 Improve Norwegian Bokmål (nb-NO) and German (de-DE) locales on the Data Grid
121
+ - 🌍 Add Norwegian Nynorsk (nn-NO) locale on the Date and Time Pickers
122
+ - 🐞 Bugfixes
123
+ - 📚 Documentation improvements
124
+
125
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
126
+
127
+ ### Data Grid
128
+
129
+ #### `@mui/x-data-grid@7.11.1`
130
+
131
+ - [DataGrid] Remove dead code in internal `GridPreferencesPanel` (#13934) @k-rajat19
132
+ - [DataGrid] Do not miss to escape formulas in CSV export (#13888) @arminmeh
133
+ - [l10n] Add Icelandic (is-IS) locale (#13283) @magnimarels
134
+ - [l10n] Add Norwegian nynorsk (nn-NO) locale and improve Norwegian bokmål (nb-NO) locale (#13588) @AnderzL7
135
+ - [l10n] Improve German (de-DE) locale (#13910) @lhilgert9
136
+
137
+ #### `@mui/x-data-grid-pro@7.11.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
138
+
139
+ Same changes as in `@mui/x-data-grid@7.11.1`.
140
+
141
+ #### `@mui/x-data-grid-premium@7.11.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
142
+
143
+ Same changes as in `@mui/x-data-grid-pro@7.11.1`, plus:
144
+
145
+ - [DataGridPremium] Pass the `api` object to events (#13893) @pcorpet
146
+ - [DataGridPremium] Fix paste to selected cells (#13967) @romgrk
147
+
148
+ ### Date and Time Pickers
149
+
150
+ #### `@mui/x-date-pickers@7.11.1`
151
+
152
+ - [fields] Prevent keyboard editing when disabled (#13900) @arthurbalduini
153
+ - [l10n] Add Norwegian Nynorsk (nn-NO) locale (#13946) @AnderzL7
154
+
155
+ #### `@mui/x-date-pickers-pro@7.11.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
156
+
157
+ Same changes as in `@mui/x-date-pickers@7.11.1`.
158
+
159
+ ### Charts
160
+
161
+ #### `@mui/x-charts@7.11.1`
162
+
163
+ - [charts] Add `ownerState` function to `slotProps` typing when available (#13965) @alexfauquette
164
+ - [charts] Allow `Zoom` to be controllable (#13858) @JCQuintas
165
+ - [charts] Deprecate `xAxisKey` /`zAxisKey` in favor of `xAxisId`/`zAxisId` (#13940) @alexfauquette
166
+ - [charts] Hide empty arcs in the PieChart (#13897) @alexfauquette
167
+ - [charts] Limit the trigger of exit charts (#13682) @alexfauquette
168
+
169
+ ### Tree View
170
+
171
+ #### `@mui/x-tree-view@7.11.1`
172
+
173
+ - [TreeView] Allow the plugins to enrich the props passed to the item slots (#13953) @flaviendelangle
174
+
175
+ ### Docs
176
+
177
+ - [docs] Bump pnpm priority as a package manager (#13894) @oliviertassinari
178
+ - [docs] Explicitly mark charts pro as not released (#13905) @alexfauquette
179
+ - [docs] Fix dot consistency a11y table @oliviertassinari
180
+ - [docs] Fix some typos in charts docs (#13906) @cratiu222
181
+ - [docs] Fix spelling (#13902) @nnsW3
182
+ - [docs] Improve error message when moving between plans (#13874) @oliviertassinari
183
+ - [docs] Update `SparkLineChart` reference not being correctly capitalised (#13960) @duckboy81
184
+ - [docs] Fix scroll demos disorientation (#13909) @oliviertassinari
185
+
186
+ ### Core
187
+
188
+ - [core] Add `@mui/material-nextjs` to `MUI Core` renovate group (#13966) @LukasTy
189
+ - [core] Remove warning message in production (#13911) @oliviertassinari
190
+ - [code-infra] Reuse `useReactVersion` script from the monorepo (#13710) @cherniavskii
191
+ - [infra] Adds order id validation action (#13957) @michelengelen
192
+ - [infra] Fix order id validator action (#13971) @michelengelen
193
+ - [infra] Fix regex in order id validation (#13976) @michelengelen
194
+ - [infra] Issue template improvement (#13954) @michelengelen
195
+
6
196
  ## 7.11.0
7
197
 
8
198
  _Jul 18, 2024_
@@ -59,8 +249,8 @@ Same changes as in `@mui/x-date-pickers@7.11.0`, plus:
59
249
  - [charts] Defaultize axis on top level `useChartContainerProps` (#13817) @JCQuintas
60
250
  - [charts] Fix charts not passing `className` to root element (#13647) @JCQuintas
61
251
  - [charts] Generate API documentation for pro components (#13822) @alexfauquette
62
- - [charts] Improve zoomed highlight behaviour (unreleased) (#13868) @JCQuintas
63
- - [charts] Allow zoom on Y axis and add zoom options to configure zooming behaviour (unreleased) (#13726) @JCQuintas
252
+ - [charts] Improve zoomed highlight behavior (unreleased) (#13868) @JCQuintas
253
+ - [charts] Allow zoom on Y axis and add zoom options to configure zooming behavior (unreleased) (#13726) @JCQuintas
64
254
  - [charts] Disable animations while zooming (unreleased) (#13807) @JCQuintas
65
255
 
66
256
  ### Tree View
@@ -533,7 +723,7 @@ Same changes as in `@mui/x-date-pickers@7.6.2`.
533
723
 
534
724
  #### `@mui/x-charts@7.6.2`
535
725
 
536
- - [charts] Add `Initializable` type and behaviour to allow checking if a complex context has been initialized. (#13365) @JCQuintas
726
+ - [charts] Add `Initializable` type and behavior to allow checking if a complex context has been initialized. (#13365) @JCQuintas
537
727
  - [charts] Fix some props not working in `xAxis` and `yAxis` (#13372) @Valyok26
538
728
  - [charts] Harmonize charts types (#13366) @alexfauquette
539
729
  - [charts] Introduce plugins system (#13367) @alexfauquette
@@ -541,7 +731,7 @@ Same changes as in `@mui/x-date-pickers@7.6.2`.
541
731
 
542
732
  ### Docs
543
733
 
544
- - [docs] Add badges like in Material UI @oliviertassinari
734
+ - [docs] Add badges like in Material UI @oliviertassinari
545
735
  - [docs] Update twitter.com to x.com @oliviertassinari
546
736
  - [docs] Fix the description of `tickInterval` (#13355) @alexfauquette
547
737
  - [docs] Adjust the code example for `quickFilterValues` (#12919) @michelengelen
@@ -4,7 +4,7 @@ const _excluded = ["autoFocus", "onViewChange", "value", "defaultValue", "refere
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
7
- import { useSlotProps } from '@mui/base/utils';
7
+ import useSlotProps from '@mui/utils/useSlotProps';
8
8
  import { styled, useThemeProps } from '@mui/material/styles';
9
9
  import { unstable_composeClasses as composeClasses, unstable_useId as useId, unstable_useEventCallback as useEventCallback } from '@mui/utils';
10
10
  import { useCalendarState } from './useCalendarState';
@@ -412,10 +412,12 @@ process.env.NODE_ENV !== "production" ? DateCalendar.propTypes = {
412
412
  loading: PropTypes.bool,
413
413
  /**
414
414
  * Maximal selectable date.
415
+ * @default 2099-12-31
415
416
  */
416
417
  maxDate: PropTypes.object,
417
418
  /**
418
419
  * Minimal selectable date.
420
+ * @default 1900-01-01
419
421
  */
420
422
  minDate: PropTypes.object,
421
423
  /**
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { SxProps } from '@mui/system';
3
3
  import { Theme } from '@mui/material/styles';
4
- import { SlotComponentProps } from '@mui/base/utils';
4
+ import { SlotComponentProps } from '@mui/utils';
5
5
  import { PickersCalendarHeader, PickersCalendarHeaderProps, PickersCalendarHeaderSlots, PickersCalendarHeaderSlotProps } from '../PickersCalendarHeader';
6
6
  import { DayCalendarSlots, DayCalendarSlotProps, ExportedDayCalendarProps } from './DayCalendar';
7
7
  import { DateCalendarClasses } from './dateCalendarClasses';
@@ -5,7 +5,7 @@ const _excluded = ["parentProps", "day", "focusableDay", "selectedDays", "isDate
5
5
  import * as React from 'react';
6
6
  import useEventCallback from '@mui/utils/useEventCallback';
7
7
  import Typography from '@mui/material/Typography';
8
- import { useSlotProps } from '@mui/base/utils';
8
+ import useSlotProps from '@mui/utils/useSlotProps';
9
9
  import { useRtl } from '@mui/system/RtlProvider';
10
10
  import { styled, useThemeProps } from '@mui/material/styles';
11
11
  import { unstable_composeClasses as composeClasses, unstable_useControlled as useControlled } from '@mui/utils';
@@ -5,7 +5,7 @@ import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import MuiTextField from '@mui/material/TextField';
7
7
  import { useThemeProps } from '@mui/material/styles';
8
- import { useSlotProps } from '@mui/base/utils';
8
+ import useSlotProps from '@mui/utils/useSlotProps';
9
9
  import { refType } from '@mui/utils';
10
10
  import { useDateField } from './useDateField';
11
11
  import { useClearableField } from '../hooks';
@@ -174,10 +174,12 @@ process.env.NODE_ENV !== "production" ? DateField.propTypes = {
174
174
  margin: PropTypes.oneOf(['dense', 'none', 'normal']),
175
175
  /**
176
176
  * Maximal selectable date.
177
+ * @default 2099-12-31
177
178
  */
178
179
  maxDate: PropTypes.object,
179
180
  /**
180
181
  * Minimal selectable date.
182
+ * @default 1900-01-01
181
183
  */
182
184
  minDate: PropTypes.object,
183
185
  /**
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { SlotComponentProps } from '@mui/base/utils';
2
+ import { SlotComponentProps } from '@mui/utils';
3
3
  import TextField from '@mui/material/TextField';
4
4
  import { ExportedUseClearableFieldProps, UseClearableFieldSlots, UseClearableFieldSlotProps } from '../hooks/useClearableField';
5
5
  import { DateValidationError, FieldSection, PickerValidDate, BuiltInFieldTextFieldProps } from '../models';
@@ -149,10 +149,12 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes = {
149
149
  localeText: PropTypes.object,
150
150
  /**
151
151
  * Maximal selectable date.
152
+ * @default 2099-12-31
152
153
  */
153
154
  maxDate: PropTypes.object,
154
155
  /**
155
156
  * Minimal selectable date.
157
+ * @default 1900-01-01
156
158
  */
157
159
  minDate: PropTypes.object,
158
160
  /**
@@ -6,7 +6,7 @@ import clsx from 'clsx';
6
6
  import PropTypes from 'prop-types';
7
7
  import Typography from '@mui/material/Typography';
8
8
  import { styled, useThemeProps } from '@mui/material/styles';
9
- import { unstable_composeClasses as composeClasses } from '@mui/utils';
9
+ import composeClasses from '@mui/utils/composeClasses';
10
10
  import { PickersToolbar } from '../internals/components/PickersToolbar';
11
11
  import { usePickersTranslations } from '../hooks/usePickersTranslations';
12
12
  import { useUtils } from '../internals/hooks/useUtils';
@@ -5,7 +5,7 @@ import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import MuiTextField from '@mui/material/TextField';
7
7
  import { useThemeProps } from '@mui/material/styles';
8
- import { useSlotProps } from '@mui/base/utils';
8
+ import useSlotProps from '@mui/utils/useSlotProps';
9
9
  import { refType } from '@mui/utils';
10
10
  import { useDateTimeField } from './useDateTimeField';
11
11
  import { useClearableField } from '../hooks';
@@ -184,6 +184,7 @@ process.env.NODE_ENV !== "production" ? DateTimeField.propTypes = {
184
184
  margin: PropTypes.oneOf(['dense', 'none', 'normal']),
185
185
  /**
186
186
  * Maximal selectable date.
187
+ * @default 2099-12-31
187
188
  */
188
189
  maxDate: PropTypes.object,
189
190
  /**
@@ -197,6 +198,7 @@ process.env.NODE_ENV !== "production" ? DateTimeField.propTypes = {
197
198
  maxTime: PropTypes.object,
198
199
  /**
199
200
  * Minimal selectable date.
201
+ * @default 1900-01-01
200
202
  */
201
203
  minDate: PropTypes.object,
202
204
  /**
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { SlotComponentProps } from '@mui/base/utils';
2
+ import { SlotComponentProps } from '@mui/utils';
3
3
  import TextField from '@mui/material/TextField';
4
4
  import { DateTimeValidationError, FieldSection, PickerValidDate, BuiltInFieldTextFieldProps } from '../models';
5
5
  import { UseFieldInternalProps } from '../internals/hooks/useField';
@@ -164,6 +164,7 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
164
164
  localeText: PropTypes.object,
165
165
  /**
166
166
  * Maximal selectable date.
167
+ * @default 2099-12-31
167
168
  */
168
169
  maxDate: PropTypes.object,
169
170
  /**
@@ -177,6 +178,7 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
177
178
  maxTime: PropTypes.object,
178
179
  /**
179
180
  * Minimal selectable date.
181
+ * @default 1900-01-01
180
182
  */
181
183
  minDate: PropTypes.object,
182
184
  /**
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
7
7
  import Skeleton from '@mui/material/Skeleton';
8
8
  import { styled, useThemeProps } from '@mui/material/styles';
9
- import { unstable_composeClasses as composeClasses } from '@mui/utils';
9
+ import composeClasses from '@mui/utils/composeClasses';
10
10
  import { DAY_SIZE, DAY_MARGIN } from '../internals/constants/dimensions';
11
11
  import { getDayCalendarSkeletonUtilityClass } from './dayCalendarSkeletonClasses';
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import PropTypes from 'prop-types';
4
- import { resolveComponentProps } from '@mui/base/utils';
4
+ import resolveComponentProps from '@mui/utils/resolveComponentProps';
5
5
  import { refType } from '@mui/utils';
6
6
  import { singleItemValueManager } from '../internals/utils/valueManagers';
7
7
  import { useDatePickerDefaultizedProps } from '../DatePicker/shared';
@@ -165,10 +165,12 @@ DesktopDatePicker.propTypes = {
165
165
  localeText: PropTypes.object,
166
166
  /**
167
167
  * Maximal selectable date.
168
+ * @default 2099-12-31
168
169
  */
169
170
  maxDate: PropTypes.object,
170
171
  /**
171
172
  * Minimal selectable date.
173
+ * @default 1900-01-01
172
174
  */
173
175
  minDate: PropTypes.object,
174
176
  /**