@mui/x-date-pickers 8.3.0 → 8.4.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.
- package/AdapterDateFns/AdapterDateFns.js +2 -1
- package/AdapterDateFnsJalali/AdapterDateFnsJalali.js +2 -1
- package/AdapterDateFnsJalaliV2/AdapterDateFnsJalaliV2.js +5 -1
- package/AdapterDateFnsV2/AdapterDateFnsV2.js +5 -1
- package/AdapterDayjs/AdapterDayjs.js +12 -9
- package/AdapterLuxon/AdapterLuxon.js +3 -2
- package/AdapterMoment/AdapterMoment.js +2 -2
- package/AdapterMomentHijri/AdapterMomentHijri.js +3 -0
- package/AdapterMomentJalaali/AdapterMomentJalaali.js +1 -0
- package/CHANGELOG.md +206 -10
- package/DateCalendar/DateCalendar.js +1 -0
- package/DateField/DateField.js +1 -0
- package/DatePicker/DatePicker.js +1 -0
- package/DatePicker/DatePickerToolbar.js +1 -0
- package/DateTimeField/DateTimeField.js +1 -0
- package/DateTimePicker/DateTimePicker.js +1 -0
- package/DateTimePicker/DateTimePickerTabs.js +1 -0
- package/DateTimePicker/DateTimePickerToolbar.js +1 -0
- package/DesktopDatePicker/DesktopDatePicker.js +1 -0
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +2 -0
- package/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -0
- package/DesktopTimePicker/DesktopTimePicker.js +1 -0
- package/DigitalClock/DigitalClock.d.ts +1 -1
- package/DigitalClock/DigitalClock.js +1 -0
- package/LocalizationProvider/LocalizationProvider.js +2 -3
- package/MobileDatePicker/MobileDatePicker.js +1 -0
- package/MobileDateTimePicker/MobileDateTimePicker.js +1 -0
- package/MobileTimePicker/MobileTimePicker.js +1 -0
- package/MonthCalendar/MonthCalendar.js +1 -0
- package/MonthCalendar/MonthCalendarButton.js +2 -1
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +5 -4
- package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +2 -1
- package/PickersActionBar/PickersActionBar.js +2 -1
- package/PickersCalendarHeader/PickersCalendarHeader.js +1 -0
- package/PickersDay/PickersDay.js +3 -1
- package/PickersLayout/PickersLayout.d.ts +2 -2
- package/PickersLayout/PickersLayout.js +1 -0
- package/PickersSectionList/PickersSectionList.d.ts +1 -1
- package/PickersSectionList/PickersSectionList.js +1 -0
- package/PickersTextField/PickersFilledInput/PickersFilledInput.js +1 -0
- package/PickersTextField/PickersFilledInput/pickersFilledInputClasses.d.ts +6 -6
- package/PickersTextField/PickersInput/PickersInput.js +1 -0
- package/PickersTextField/PickersInput/pickersInputClasses.d.ts +6 -6
- package/PickersTextField/PickersInputBase/PickersInputBase.d.ts +2 -2
- package/PickersTextField/PickersInputBase/PickersInputBase.js +1 -0
- package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +1 -0
- package/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.d.ts +5 -5
- package/PickersTextField/PickersTextField.js +12 -2
- package/PickersTextField/usePickerTextFieldOwnerState.js +1 -0
- package/StaticDatePicker/StaticDatePicker.js +1 -0
- package/StaticDateTimePicker/StaticDateTimePicker.js +1 -0
- package/StaticTimePicker/StaticTimePicker.js +1 -0
- package/TimeClock/TimeClock.js +1 -0
- package/TimeField/TimeField.js +1 -0
- package/TimePicker/TimePicker.js +1 -0
- package/YearCalendar/YearCalendar.js +1 -0
- package/YearCalendar/YearCalendarButton.js +2 -1
- package/YearCalendar/yearCalendarClasses.d.ts +1 -1
- package/dateViewRenderers/dateViewRenderers.js +2 -1
- package/esm/AdapterDateFns/AdapterDateFns.js +2 -1
- package/esm/AdapterDateFnsJalali/AdapterDateFnsJalali.js +2 -1
- package/esm/AdapterDateFnsJalaliV2/AdapterDateFnsJalaliV2.js +5 -1
- package/esm/AdapterDateFnsV2/AdapterDateFnsV2.js +5 -1
- package/esm/AdapterDayjs/AdapterDayjs.js +12 -9
- package/esm/AdapterLuxon/AdapterLuxon.js +3 -2
- package/esm/AdapterMoment/AdapterMoment.js +2 -2
- package/esm/AdapterMomentHijri/AdapterMomentHijri.js +3 -0
- package/esm/AdapterMomentJalaali/AdapterMomentJalaali.js +1 -0
- package/esm/DateCalendar/DateCalendar.js +1 -0
- package/esm/DateField/DateField.js +1 -0
- package/esm/DatePicker/DatePicker.js +1 -0
- package/esm/DatePicker/DatePickerToolbar.js +1 -0
- package/esm/DateTimeField/DateTimeField.js +1 -0
- package/esm/DateTimePicker/DateTimePicker.js +1 -0
- package/esm/DateTimePicker/DateTimePickerTabs.js +1 -0
- package/esm/DateTimePicker/DateTimePickerToolbar.js +1 -0
- package/esm/DesktopDatePicker/DesktopDatePicker.js +1 -0
- package/esm/DesktopDateTimePicker/DesktopDateTimePicker.js +2 -0
- package/esm/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -0
- package/esm/DesktopTimePicker/DesktopTimePicker.js +1 -0
- package/esm/DigitalClock/DigitalClock.d.ts +1 -1
- package/esm/DigitalClock/DigitalClock.js +1 -0
- package/esm/LocalizationProvider/LocalizationProvider.js +2 -3
- package/esm/MobileDatePicker/MobileDatePicker.js +1 -0
- package/esm/MobileDateTimePicker/MobileDateTimePicker.js +1 -0
- package/esm/MobileTimePicker/MobileTimePicker.js +1 -0
- package/esm/MonthCalendar/MonthCalendar.js +1 -0
- package/esm/MonthCalendar/MonthCalendarButton.js +2 -1
- package/esm/MultiSectionDigitalClock/MultiSectionDigitalClock.js +1 -0
- package/esm/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +2 -1
- package/esm/PickersActionBar/PickersActionBar.js +1 -0
- package/esm/PickersCalendarHeader/PickersCalendarHeader.js +1 -0
- package/esm/PickersDay/PickersDay.js +3 -1
- package/esm/PickersLayout/PickersLayout.d.ts +2 -2
- package/esm/PickersLayout/PickersLayout.js +1 -0
- package/esm/PickersSectionList/PickersSectionList.d.ts +1 -1
- package/esm/PickersSectionList/PickersSectionList.js +1 -0
- package/esm/PickersTextField/PickersFilledInput/PickersFilledInput.js +1 -0
- package/esm/PickersTextField/PickersFilledInput/pickersFilledInputClasses.d.ts +6 -6
- package/esm/PickersTextField/PickersInput/PickersInput.js +1 -0
- package/esm/PickersTextField/PickersInput/pickersInputClasses.d.ts +6 -6
- package/esm/PickersTextField/PickersInputBase/PickersInputBase.d.ts +2 -2
- package/esm/PickersTextField/PickersInputBase/PickersInputBase.js +1 -0
- package/esm/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +1 -0
- package/esm/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.d.ts +5 -5
- package/esm/PickersTextField/PickersTextField.js +12 -2
- package/esm/PickersTextField/usePickerTextFieldOwnerState.js +1 -0
- package/esm/StaticDatePicker/StaticDatePicker.js +1 -0
- package/esm/StaticDateTimePicker/StaticDateTimePicker.js +1 -0
- package/esm/StaticTimePicker/StaticTimePicker.js +1 -0
- package/esm/TimeClock/TimeClock.js +1 -0
- package/esm/TimeField/TimeField.js +1 -0
- package/esm/TimePicker/TimePicker.js +1 -0
- package/esm/YearCalendar/YearCalendar.js +1 -0
- package/esm/YearCalendar/YearCalendarButton.js +2 -1
- package/esm/YearCalendar/yearCalendarClasses.d.ts +1 -1
- package/esm/dateViewRenderers/dateViewRenderers.js +2 -1
- package/esm/hooks/useIsValidValue.js +1 -0
- package/esm/hooks/usePickerContext.js +1 -0
- package/esm/index.js +1 -1
- package/esm/internals/components/PickerFieldUI.js +1 -0
- package/esm/internals/components/PickerPopper/PickerPopper.js +1 -0
- package/esm/internals/components/PickerProvider.js +2 -0
- package/esm/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +2 -1
- package/esm/internals/components/PickersArrowSwitcher/pickersArrowSwitcherClasses.d.ts +1 -1
- package/esm/internals/components/PickersToolbar.js +2 -1
- package/esm/internals/components/PickersToolbarButton.js +2 -1
- package/esm/internals/components/PickersToolbarText.js +2 -1
- package/esm/internals/components/pickersToolbarClasses.d.ts +1 -1
- package/esm/internals/hooks/useDesktopPicker/useDesktopPicker.js +1 -0
- package/esm/internals/hooks/useField/useFieldCharacterEditing.js +27 -11
- package/esm/internals/hooks/useField/useFieldSectionContainerProps.js +2 -3
- package/esm/internals/hooks/useField/useFieldSectionContentProps.js +2 -2
- package/esm/internals/hooks/useField/useFieldState.js +2 -2
- package/esm/internals/hooks/useMobilePicker/useMobilePicker.js +1 -0
- package/esm/internals/hooks/useNullableFieldPrivateContext.js +1 -0
- package/esm/internals/hooks/useStaticPicker/useStaticPicker.js +1 -0
- package/esm/timeViewRenderers/timeViewRenderers.js +4 -1
- package/hooks/useIsValidValue.js +1 -0
- package/hooks/usePickerContext.js +1 -0
- package/index.js +1 -1
- package/internals/components/PickerFieldUI.js +1 -0
- package/internals/components/PickerPopper/PickerPopper.js +1 -0
- package/internals/components/PickerProvider.js +2 -0
- package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +2 -1
- package/internals/components/PickersArrowSwitcher/pickersArrowSwitcherClasses.d.ts +1 -1
- package/internals/components/PickersToolbar.js +2 -1
- package/internals/components/PickersToolbarButton.js +2 -1
- package/internals/components/PickersToolbarText.js +2 -1
- package/internals/components/pickersToolbarClasses.d.ts +1 -1
- package/internals/hooks/useDesktopPicker/useDesktopPicker.js +1 -0
- package/internals/hooks/useField/useFieldCharacterEditing.js +27 -11
- package/internals/hooks/useField/useFieldSectionContainerProps.js +2 -4
- package/internals/hooks/useField/useFieldSectionContentProps.js +2 -2
- package/internals/hooks/useField/useFieldState.js +2 -2
- package/internals/hooks/useMobilePicker/useMobilePicker.js +1 -0
- package/internals/hooks/useNullableFieldPrivateContext.js +1 -0
- package/internals/hooks/useStaticPicker/useStaticPicker.js +1 -0
- package/package.json +2 -2
- package/timeViewRenderers/timeViewRenderers.js +4 -1
|
@@ -15,9 +15,7 @@ var _styles = require("@mui/material/styles");
|
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
16
|
const _excluded = ["localeText"];
|
|
17
17
|
const MuiPickersAdapterContext = exports.MuiPickersAdapterContext = /*#__PURE__*/React.createContext(null);
|
|
18
|
-
if (process.env.NODE_ENV !==
|
|
19
|
-
MuiPickersAdapterContext.displayName = 'MuiPickersAdapterContext';
|
|
20
|
-
}
|
|
18
|
+
if (process.env.NODE_ENV !== "production") MuiPickersAdapterContext.displayName = "MuiPickersAdapterContext";
|
|
21
19
|
/**
|
|
22
20
|
* Demos:
|
|
23
21
|
*
|
|
@@ -95,6 +93,7 @@ const LocalizationProvider = exports.LocalizationProvider = function Localizatio
|
|
|
95
93
|
children: children
|
|
96
94
|
});
|
|
97
95
|
};
|
|
96
|
+
if (process.env.NODE_ENV !== "production") LocalizationProvider.displayName = "LocalizationProvider";
|
|
98
97
|
process.env.NODE_ENV !== "production" ? LocalizationProvider.propTypes = {
|
|
99
98
|
// ----------------------------- Warning --------------------------------
|
|
100
99
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -67,6 +67,7 @@ const MobileDatePicker = exports.MobileDatePicker = /*#__PURE__*/React.forwardRe
|
|
|
67
67
|
});
|
|
68
68
|
return renderPicker();
|
|
69
69
|
});
|
|
70
|
+
if (process.env.NODE_ENV !== "production") MobileDatePicker.displayName = "MobileDatePicker";
|
|
70
71
|
MobileDatePicker.propTypes = {
|
|
71
72
|
// ----------------------------- Warning --------------------------------
|
|
72
73
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -117,6 +117,7 @@ const MobileDateTimePicker = exports.MobileDateTimePicker = /*#__PURE__*/React.f
|
|
|
117
117
|
});
|
|
118
118
|
return renderPicker();
|
|
119
119
|
});
|
|
120
|
+
if (process.env.NODE_ENV !== "production") MobileDateTimePicker.displayName = "MobileDateTimePicker";
|
|
120
121
|
MobileDateTimePicker.propTypes = {
|
|
121
122
|
// ----------------------------- Warning --------------------------------
|
|
122
123
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -70,6 +70,7 @@ const MobileTimePicker = exports.MobileTimePicker = /*#__PURE__*/React.forwardRe
|
|
|
70
70
|
});
|
|
71
71
|
return renderPicker();
|
|
72
72
|
});
|
|
73
|
+
if (process.env.NODE_ENV !== "production") MobileTimePicker.displayName = "MobileTimePicker";
|
|
73
74
|
MobileTimePicker.propTypes = {
|
|
74
75
|
// ----------------------------- Warning --------------------------------
|
|
75
76
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -259,6 +259,7 @@ const MonthCalendar = exports.MonthCalendar = /*#__PURE__*/React.forwardRef(func
|
|
|
259
259
|
})
|
|
260
260
|
}));
|
|
261
261
|
});
|
|
262
|
+
if (process.env.NODE_ENV !== "production") MonthCalendar.displayName = "MonthCalendar";
|
|
262
263
|
process.env.NODE_ENV !== "production" ? MonthCalendar.propTypes = {
|
|
263
264
|
// ----------------------------- Warning --------------------------------
|
|
264
265
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -120,4 +120,5 @@ const MonthCalendarButton = exports.MonthCalendarButton = /*#__PURE__*/React.mem
|
|
|
120
120
|
className: classes.button
|
|
121
121
|
});
|
|
122
122
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(MonthButton, (0, _extends2.default)({}, monthButtonProps));
|
|
123
|
-
});
|
|
123
|
+
});
|
|
124
|
+
if (process.env.NODE_ENV !== "production") MonthCalendarButton.displayName = "MonthCalendarButton";
|
|
@@ -24,7 +24,7 @@ var _dateHelpersHooks = require("../internals/hooks/date-helpers-hooks");
|
|
|
24
24
|
var _PickerViewRoot = require("../internals/components/PickerViewRoot");
|
|
25
25
|
var _multiSectionDigitalClockClasses = require("./multiSectionDigitalClockClasses");
|
|
26
26
|
var _MultiSectionDigitalClockSection = require("./MultiSectionDigitalClockSection");
|
|
27
|
-
var
|
|
27
|
+
var _MultiSectionDigitalClock2 = require("./MultiSectionDigitalClock.utils");
|
|
28
28
|
var _useControlledValue = require("../internals/hooks/useControlledValue");
|
|
29
29
|
var _valueManagers = require("../internals/utils/valueManagers");
|
|
30
30
|
var _useClockReferenceDate = require("../internals/hooks/useClockReferenceDate");
|
|
@@ -237,7 +237,7 @@ const MultiSectionDigitalClock = exports.MultiSectionDigitalClock = /*#__PURE__*
|
|
|
237
237
|
const valueWithMeridiem = (0, _timeUtils.convertValueToMeridiem)(hours, meridiemMode, ampm);
|
|
238
238
|
setValueAndGoToNextView(utils.setHours(valueOrReferenceDate, valueWithMeridiem), 'finish', 'hours');
|
|
239
239
|
},
|
|
240
|
-
items: (0,
|
|
240
|
+
items: (0, _MultiSectionDigitalClock2.getHourSectionOptions)({
|
|
241
241
|
now,
|
|
242
242
|
value,
|
|
243
243
|
ampm,
|
|
@@ -255,7 +255,7 @@ const MultiSectionDigitalClock = exports.MultiSectionDigitalClock = /*#__PURE__*
|
|
|
255
255
|
onChange: minutes => {
|
|
256
256
|
setValueAndGoToNextView(utils.setMinutes(valueOrReferenceDate, minutes), 'finish', 'minutes');
|
|
257
257
|
},
|
|
258
|
-
items: (0,
|
|
258
|
+
items: (0, _MultiSectionDigitalClock2.getTimeSectionOptions)({
|
|
259
259
|
value: utils.getMinutes(valueOrReferenceDate),
|
|
260
260
|
utils,
|
|
261
261
|
isDisabled: minutes => isTimeDisabled(minutes, 'minutes'),
|
|
@@ -272,7 +272,7 @@ const MultiSectionDigitalClock = exports.MultiSectionDigitalClock = /*#__PURE__*
|
|
|
272
272
|
onChange: seconds => {
|
|
273
273
|
setValueAndGoToNextView(utils.setSeconds(valueOrReferenceDate, seconds), 'finish', 'seconds');
|
|
274
274
|
},
|
|
275
|
-
items: (0,
|
|
275
|
+
items: (0, _MultiSectionDigitalClock2.getTimeSectionOptions)({
|
|
276
276
|
value: utils.getSeconds(valueOrReferenceDate),
|
|
277
277
|
utils,
|
|
278
278
|
isDisabled: seconds => isTimeDisabled(seconds, 'seconds'),
|
|
@@ -350,6 +350,7 @@ const MultiSectionDigitalClock = exports.MultiSectionDigitalClock = /*#__PURE__*
|
|
|
350
350
|
}, timeView))
|
|
351
351
|
}));
|
|
352
352
|
});
|
|
353
|
+
if (process.env.NODE_ENV !== "production") MultiSectionDigitalClock.displayName = "MultiSectionDigitalClock";
|
|
353
354
|
process.env.NODE_ENV !== "production" ? MultiSectionDigitalClock.propTypes = {
|
|
354
355
|
// ----------------------------- Warning --------------------------------
|
|
355
356
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -213,4 +213,5 @@ const MultiSectionDigitalClockSection = exports.MultiSectionDigitalClockSection
|
|
|
213
213
|
}), option.label);
|
|
214
214
|
})
|
|
215
215
|
}));
|
|
216
|
-
});
|
|
216
|
+
});
|
|
217
|
+
if (process.env.NODE_ENV !== "production") MultiSectionDigitalClockSection.displayName = "MultiSectionDigitalClockSection";
|
|
@@ -119,4 +119,5 @@ process.env.NODE_ENV !== "production" ? PickersActionBarComponent.propTypes = {
|
|
|
119
119
|
*/
|
|
120
120
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
|
121
121
|
} : void 0;
|
|
122
|
-
const PickersActionBar = exports.PickersActionBar = /*#__PURE__*/React.memo(PickersActionBarComponent);
|
|
122
|
+
const PickersActionBar = exports.PickersActionBar = /*#__PURE__*/React.memo(PickersActionBarComponent);
|
|
123
|
+
if (process.env.NODE_ENV !== "production") PickersActionBar.displayName = "PickersActionBar";
|
|
@@ -232,6 +232,7 @@ const PickersCalendarHeader = exports.PickersCalendarHeader = /*#__PURE__*/React
|
|
|
232
232
|
})]
|
|
233
233
|
}));
|
|
234
234
|
});
|
|
235
|
+
if (process.env.NODE_ENV !== "production") PickersCalendarHeader.displayName = "PickersCalendarHeader";
|
|
235
236
|
process.env.NODE_ENV !== "production" ? PickersCalendarHeader.propTypes = {
|
|
236
237
|
// ----------------------------- Warning --------------------------------
|
|
237
238
|
// | These PropTypes are generated from the TypeScript type definitions |
|
package/PickersDay/PickersDay.js
CHANGED
|
@@ -225,6 +225,7 @@ const PickersDayRaw = /*#__PURE__*/React.forwardRef(function PickersDay(inProps,
|
|
|
225
225
|
children: !children ? utils.format(day, 'dayOfMonth') : children
|
|
226
226
|
}));
|
|
227
227
|
});
|
|
228
|
+
if (process.env.NODE_ENV !== "production") PickersDayRaw.displayName = "PickersDayRaw";
|
|
228
229
|
process.env.NODE_ENV !== "production" ? PickersDayRaw.propTypes = {
|
|
229
230
|
// ----------------------------- Warning --------------------------------
|
|
230
231
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -376,4 +377,5 @@ process.env.NODE_ENV !== "production" ? PickersDayRaw.propTypes = {
|
|
|
376
377
|
*
|
|
377
378
|
* - [PickersDay API](https://mui.com/x/api/date-pickers/pickers-day/)
|
|
378
379
|
*/
|
|
379
|
-
const PickersDay = exports.PickersDay = /*#__PURE__*/React.memo(PickersDayRaw);
|
|
380
|
+
const PickersDay = exports.PickersDay = /*#__PURE__*/React.memo(PickersDayRaw);
|
|
381
|
+
if (process.env.NODE_ENV !== "production") PickersDay.displayName = "PickersDay";
|
|
@@ -3,10 +3,10 @@ import { PickerLayoutOwnerState, PickersLayoutProps } from "./PickersLayout.type
|
|
|
3
3
|
import { PickerValidValue } from "../internals/models/index.js";
|
|
4
4
|
export declare const PickersLayoutRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
5
5
|
ownerState: PickerLayoutOwnerState;
|
|
6
|
-
}, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.
|
|
6
|
+
}, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | keyof React.ClassAttributes<HTMLDivElement>>, {}>;
|
|
7
7
|
export declare const PickersLayoutContentWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
8
8
|
ownerState: PickerLayoutOwnerState;
|
|
9
|
-
}, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.
|
|
9
|
+
}, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | keyof React.ClassAttributes<HTMLDivElement>>, {}>;
|
|
10
10
|
type PickersLayoutComponent = (<TValue extends PickerValidValue>(props: PickersLayoutProps<TValue> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
11
11
|
propTypes?: any;
|
|
12
12
|
};
|
|
@@ -144,6 +144,7 @@ const PickersLayout = exports.PickersLayout = /*#__PURE__*/React.forwardRef(func
|
|
|
144
144
|
}), actionBar]
|
|
145
145
|
});
|
|
146
146
|
});
|
|
147
|
+
if (process.env.NODE_ENV !== "production") PickersLayout.displayName = "PickersLayout";
|
|
147
148
|
process.env.NODE_ENV !== "production" ? PickersLayout.propTypes = {
|
|
148
149
|
// ----------------------------- Warning --------------------------------
|
|
149
150
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { PickersSectionListProps } from "./PickersSectionList.types.js";
|
|
3
|
-
export declare const PickersSectionListRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.
|
|
3
|
+
export declare const PickersSectionListRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | keyof React.ClassAttributes<HTMLDivElement>>, {}>;
|
|
4
4
|
export declare const PickersSectionListSection: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof React.ClassAttributes<HTMLSpanElement> | keyof React.HTMLAttributes<HTMLSpanElement>>, {}>;
|
|
5
5
|
export declare const PickersSectionListSectionSeparator: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof React.ClassAttributes<HTMLSpanElement> | keyof React.HTMLAttributes<HTMLSpanElement>>, {}>;
|
|
6
6
|
export declare const PickersSectionListSectionContent: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof React.ClassAttributes<HTMLSpanElement> | keyof React.HTMLAttributes<HTMLSpanElement>>, {}>;
|
|
@@ -211,6 +211,7 @@ const PickersSectionList = exports.PickersSectionList = /*#__PURE__*/React.forwa
|
|
|
211
211
|
})
|
|
212
212
|
}));
|
|
213
213
|
});
|
|
214
|
+
if (process.env.NODE_ENV !== "production") PickersSectionList.displayName = "PickersSectionList";
|
|
214
215
|
process.env.NODE_ENV !== "production" ? PickersSectionList.propTypes = {
|
|
215
216
|
// ----------------------------- Warning --------------------------------
|
|
216
217
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -234,6 +234,7 @@ const PickersFilledInput = exports.PickersFilledInput = /*#__PURE__*/React.forwa
|
|
|
234
234
|
ownerState: ownerState
|
|
235
235
|
}));
|
|
236
236
|
});
|
|
237
|
+
if (process.env.NODE_ENV !== "production") PickersFilledInput.displayName = "PickersFilledInput";
|
|
237
238
|
process.env.NODE_ENV !== "production" ? PickersFilledInput.propTypes = {
|
|
238
239
|
// ----------------------------- Warning --------------------------------
|
|
239
240
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -6,19 +6,19 @@ export interface PickersFilledInputClasses extends PickersInputBaseClasses {
|
|
|
6
6
|
export type PickersFilledInputClassKey = keyof PickersFilledInputClasses;
|
|
7
7
|
export declare function getPickersFilledInputUtilityClass(slot: string): string;
|
|
8
8
|
export declare const pickersFilledInputClasses: {
|
|
9
|
-
underline: string;
|
|
10
|
-
input: string;
|
|
11
9
|
root: string;
|
|
10
|
+
input: string;
|
|
11
|
+
underline: string;
|
|
12
|
+
sectionContent: string;
|
|
12
13
|
disabled: string;
|
|
13
14
|
readOnly: string;
|
|
14
|
-
error: string;
|
|
15
15
|
focused: string;
|
|
16
|
-
|
|
17
|
-
adornedEnd: string;
|
|
16
|
+
error: string;
|
|
18
17
|
notchedOutline: string;
|
|
19
18
|
sectionsContainer: string;
|
|
20
|
-
sectionContent: string;
|
|
21
19
|
sectionBefore: string;
|
|
22
20
|
sectionAfter: string;
|
|
21
|
+
adornedStart: string;
|
|
22
|
+
adornedEnd: string;
|
|
23
23
|
activeBar: string;
|
|
24
24
|
};
|
|
@@ -151,6 +151,7 @@ const PickersInput = exports.PickersInput = /*#__PURE__*/React.forwardRef(functi
|
|
|
151
151
|
ref: ref
|
|
152
152
|
}));
|
|
153
153
|
});
|
|
154
|
+
if (process.env.NODE_ENV !== "production") PickersInput.displayName = "PickersInput";
|
|
154
155
|
process.env.NODE_ENV !== "production" ? PickersInput.propTypes = {
|
|
155
156
|
// ----------------------------- Warning --------------------------------
|
|
156
157
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -6,19 +6,19 @@ export interface PickersInputClasses extends PickersInputBaseClasses {
|
|
|
6
6
|
export type PickersInputClassKey = keyof PickersInputClasses;
|
|
7
7
|
export declare function getPickersInputUtilityClass(slot: string): string;
|
|
8
8
|
export declare const pickersInputClasses: {
|
|
9
|
-
underline: string;
|
|
10
|
-
input: string;
|
|
11
9
|
root: string;
|
|
10
|
+
input: string;
|
|
11
|
+
underline: string;
|
|
12
|
+
sectionContent: string;
|
|
12
13
|
disabled: string;
|
|
13
14
|
readOnly: string;
|
|
14
|
-
error: string;
|
|
15
15
|
focused: string;
|
|
16
|
-
|
|
17
|
-
adornedEnd: string;
|
|
16
|
+
error: string;
|
|
18
17
|
notchedOutline: string;
|
|
19
18
|
sectionsContainer: string;
|
|
20
|
-
sectionContent: string;
|
|
21
19
|
sectionBefore: string;
|
|
22
20
|
sectionAfter: string;
|
|
21
|
+
adornedStart: string;
|
|
22
|
+
adornedEnd: string;
|
|
23
23
|
activeBar: string;
|
|
24
24
|
};
|
|
@@ -3,8 +3,8 @@ import { PickersInputBaseProps } from "./PickersInputBase.types.js";
|
|
|
3
3
|
import { PickerTextFieldOwnerState } from "../../models/fields.js";
|
|
4
4
|
export declare const PickersInputBaseRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
5
5
|
ownerState: PickerTextFieldOwnerState;
|
|
6
|
-
}, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.
|
|
7
|
-
export declare const PickersInputBaseSectionsContainer: import("@emotion/styled").StyledComponent<Pick<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.
|
|
6
|
+
}, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | keyof React.ClassAttributes<HTMLDivElement>>, {}>;
|
|
7
|
+
export declare const PickersInputBaseSectionsContainer: import("@emotion/styled").StyledComponent<Pick<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | keyof React.ClassAttributes<HTMLDivElement>>, keyof React.HTMLAttributes<HTMLDivElement> | keyof React.ClassAttributes<HTMLDivElement> | keyof import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
8
8
|
ownerState: PickerTextFieldOwnerState;
|
|
9
9
|
}, {}, {}>;
|
|
10
10
|
/**
|
|
@@ -401,6 +401,7 @@ const PickersInputBase = exports.PickersInputBase = /*#__PURE__*/React.forwardRe
|
|
|
401
401
|
})]
|
|
402
402
|
}));
|
|
403
403
|
});
|
|
404
|
+
if (process.env.NODE_ENV !== "production") PickersInputBase.displayName = "PickersInputBase";
|
|
404
405
|
process.env.NODE_ENV !== "production" ? PickersInputBase.propTypes = {
|
|
405
406
|
// ----------------------------- Warning --------------------------------
|
|
406
407
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -128,6 +128,7 @@ const PickersOutlinedInput = exports.PickersOutlinedInput = /*#__PURE__*/React.f
|
|
|
128
128
|
ref: ref
|
|
129
129
|
}));
|
|
130
130
|
});
|
|
131
|
+
if (process.env.NODE_ENV !== "production") PickersOutlinedInput.displayName = "PickersOutlinedInput";
|
|
131
132
|
process.env.NODE_ENV !== "production" ? PickersOutlinedInput.propTypes = {
|
|
132
133
|
// ----------------------------- Warning --------------------------------
|
|
133
134
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -6,18 +6,18 @@ export interface PickersOutlinedInputClasses extends PickersInputBaseClasses {
|
|
|
6
6
|
export type PickersOutlinedInputClassKey = keyof PickersOutlinedInputClasses;
|
|
7
7
|
export declare function getPickersOutlinedInputUtilityClass(slot: string): string;
|
|
8
8
|
export declare const pickersOutlinedInputClasses: {
|
|
9
|
-
input: string;
|
|
10
9
|
root: string;
|
|
10
|
+
input: string;
|
|
11
11
|
notchedOutline: string;
|
|
12
|
+
sectionContent: string;
|
|
12
13
|
disabled: string;
|
|
13
14
|
readOnly: string;
|
|
14
|
-
error: string;
|
|
15
15
|
focused: string;
|
|
16
|
-
|
|
17
|
-
adornedEnd: string;
|
|
16
|
+
error: string;
|
|
18
17
|
sectionsContainer: string;
|
|
19
|
-
sectionContent: string;
|
|
20
18
|
sectionBefore: string;
|
|
21
19
|
sectionAfter: string;
|
|
20
|
+
adornedStart: string;
|
|
21
|
+
adornedEnd: string;
|
|
22
22
|
activeBar: string;
|
|
23
23
|
};
|
|
@@ -36,7 +36,9 @@ const VARIANT_COMPONENT = {
|
|
|
36
36
|
const PickersTextFieldRoot = (0, _styles.styled)(_FormControl.default, {
|
|
37
37
|
name: 'MuiPickersTextField',
|
|
38
38
|
slot: 'Root'
|
|
39
|
-
})({
|
|
39
|
+
})({
|
|
40
|
+
maxWidth: '100%'
|
|
41
|
+
});
|
|
40
42
|
const useUtilityClasses = (classes, ownerState) => {
|
|
41
43
|
const {
|
|
42
44
|
isFieldFocused,
|
|
@@ -119,6 +121,13 @@ const PickersTextField = exports.PickersTextField = /*#__PURE__*/React.forwardRe
|
|
|
119
121
|
}), [fieldOwnerState, areAllSectionsEmpty, focused, error, props.size, color, fullWidth, startAdornment, endAdornment, InputProps?.startAdornment, InputProps?.endAdornment, label]);
|
|
120
122
|
const classes = useUtilityClasses(classesProp, ownerState);
|
|
121
123
|
const PickersInputComponent = VARIANT_COMPONENT[variant];
|
|
124
|
+
const inputAdditionalProps = {};
|
|
125
|
+
if (variant === 'outlined') {
|
|
126
|
+
if (InputLabelProps && typeof InputLabelProps.shrink !== 'undefined') {
|
|
127
|
+
inputAdditionalProps.notched = InputLabelProps.shrink;
|
|
128
|
+
}
|
|
129
|
+
inputAdditionalProps.label = label;
|
|
130
|
+
}
|
|
122
131
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_usePickerTextFieldOwnerState.PickerTextFieldOwnerStateContext.Provider, {
|
|
123
132
|
value: ownerState,
|
|
124
133
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(PickersTextFieldRoot, (0, _extends2.default)({
|
|
@@ -166,7 +175,7 @@ const PickersTextField = exports.PickersTextField = /*#__PURE__*/React.forwardRe
|
|
|
166
175
|
"aria-describedby": helperTextId,
|
|
167
176
|
"aria-live": helperTextId ? 'polite' : undefined,
|
|
168
177
|
"data-active-range-position": dataActiveRangePosition
|
|
169
|
-
}, InputProps)), helperText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormHelperText.default, (0, _extends2.default)({
|
|
178
|
+
}, inputAdditionalProps, InputProps)), helperText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormHelperText.default, (0, _extends2.default)({
|
|
170
179
|
id: helperTextId
|
|
171
180
|
}, FormHelperTextProps, {
|
|
172
181
|
children: helperText
|
|
@@ -174,6 +183,7 @@ const PickersTextField = exports.PickersTextField = /*#__PURE__*/React.forwardRe
|
|
|
174
183
|
}))
|
|
175
184
|
});
|
|
176
185
|
});
|
|
186
|
+
if (process.env.NODE_ENV !== "production") PickersTextField.displayName = "PickersTextField";
|
|
177
187
|
process.env.NODE_ENV !== "production" ? PickersTextField.propTypes = {
|
|
178
188
|
// ----------------------------- Warning --------------------------------
|
|
179
189
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.usePickerTextFieldOwnerState = exports.PickerTextFieldOwnerStateContext = void 0;
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
const PickerTextFieldOwnerStateContext = exports.PickerTextFieldOwnerStateContext = /*#__PURE__*/React.createContext(null);
|
|
11
|
+
if (process.env.NODE_ENV !== "production") PickerTextFieldOwnerStateContext.displayName = "PickerTextFieldOwnerStateContext";
|
|
11
12
|
const usePickerTextFieldOwnerState = () => {
|
|
12
13
|
const value = React.useContext(PickerTextFieldOwnerStateContext);
|
|
13
14
|
if (value == null) {
|
|
@@ -57,6 +57,7 @@ const StaticDatePicker = exports.StaticDatePicker = /*#__PURE__*/React.forwardRe
|
|
|
57
57
|
});
|
|
58
58
|
return renderPicker();
|
|
59
59
|
});
|
|
60
|
+
if (process.env.NODE_ENV !== "production") StaticDatePicker.displayName = "StaticDatePicker";
|
|
60
61
|
StaticDatePicker.propTypes = {
|
|
61
62
|
// ----------------------------- Warning --------------------------------
|
|
62
63
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -106,6 +106,7 @@ const StaticDateTimePicker = exports.StaticDateTimePicker = /*#__PURE__*/React.f
|
|
|
106
106
|
});
|
|
107
107
|
return renderPicker();
|
|
108
108
|
});
|
|
109
|
+
if (process.env.NODE_ENV !== "production") StaticDateTimePicker.displayName = "StaticDateTimePicker";
|
|
109
110
|
StaticDateTimePicker.propTypes = {
|
|
110
111
|
// ----------------------------- Warning --------------------------------
|
|
111
112
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -59,6 +59,7 @@ const StaticTimePicker = exports.StaticTimePicker = /*#__PURE__*/React.forwardRe
|
|
|
59
59
|
});
|
|
60
60
|
return renderPicker();
|
|
61
61
|
});
|
|
62
|
+
if (process.env.NODE_ENV !== "production") StaticTimePicker.displayName = "StaticTimePicker";
|
|
62
63
|
StaticTimePicker.propTypes = {
|
|
63
64
|
// ----------------------------- Warning --------------------------------
|
|
64
65
|
// | These PropTypes are generated from the TypeScript type definitions |
|
package/TimeClock/TimeClock.js
CHANGED
|
@@ -336,6 +336,7 @@ const TimeClock = exports.TimeClock = /*#__PURE__*/React.forwardRef(function Tim
|
|
|
336
336
|
})]
|
|
337
337
|
}));
|
|
338
338
|
});
|
|
339
|
+
if (process.env.NODE_ENV !== "production") TimeClock.displayName = "TimeClock";
|
|
339
340
|
process.env.NODE_ENV !== "production" ? TimeClock.propTypes = {
|
|
340
341
|
// ----------------------------- Warning --------------------------------
|
|
341
342
|
// | These PropTypes are generated from the TypeScript type definitions |
|
package/TimeField/TimeField.js
CHANGED
|
@@ -50,6 +50,7 @@ const TimeField = exports.TimeField = /*#__PURE__*/React.forwardRef(function Tim
|
|
|
50
50
|
defaultOpenPickerIcon: _icons.ClockIcon
|
|
51
51
|
});
|
|
52
52
|
});
|
|
53
|
+
if (process.env.NODE_ENV !== "production") TimeField.displayName = "TimeField";
|
|
53
54
|
process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
54
55
|
// ----------------------------- Warning --------------------------------
|
|
55
56
|
// | These PropTypes are generated from the TypeScript type definitions |
|
package/TimePicker/TimePicker.js
CHANGED
|
@@ -52,6 +52,7 @@ const TimePicker = exports.TimePicker = /*#__PURE__*/React.forwardRef(function T
|
|
|
52
52
|
ref: ref
|
|
53
53
|
}, other));
|
|
54
54
|
});
|
|
55
|
+
if (process.env.NODE_ENV !== "production") TimePicker.displayName = "TimePicker";
|
|
55
56
|
process.env.NODE_ENV !== "production" ? TimePicker.propTypes = {
|
|
56
57
|
// ----------------------------- Warning --------------------------------
|
|
57
58
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -303,6 +303,7 @@ const YearCalendar = exports.YearCalendar = /*#__PURE__*/React.forwardRef(functi
|
|
|
303
303
|
}, (_, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(YearCalendarButtonFiller, {}, index))]
|
|
304
304
|
}));
|
|
305
305
|
});
|
|
306
|
+
if (process.env.NODE_ENV !== "production") YearCalendar.displayName = "YearCalendar";
|
|
306
307
|
process.env.NODE_ENV !== "production" ? YearCalendar.propTypes = {
|
|
307
308
|
// ----------------------------- Warning --------------------------------
|
|
308
309
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -120,4 +120,5 @@ const YearCalendarButton = exports.YearCalendarButton = /*#__PURE__*/React.memo(
|
|
|
120
120
|
className: classes.button
|
|
121
121
|
});
|
|
122
122
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(YearButton, (0, _extends2.default)({}, yearButtonProps));
|
|
123
|
-
});
|
|
123
|
+
});
|
|
124
|
+
if (process.env.NODE_ENV !== "production") YearCalendarButton.displayName = "YearCalendarButton";
|
|
@@ -10,4 +10,4 @@ export interface YearCalendarClasses {
|
|
|
10
10
|
}
|
|
11
11
|
export type YearCalendarClassKey = keyof YearCalendarClasses;
|
|
12
12
|
export declare function getYearCalendarUtilityClass(slot: string): string;
|
|
13
|
-
export declare const yearCalendarClasses: Record<"
|
|
13
|
+
export declare const yearCalendarClasses: Record<"root" | "disabled" | "button" | "selected", string>;
|
|
@@ -88,4 +88,5 @@ const renderDateViewCalendar = ({
|
|
|
88
88
|
displayWeekNumber: displayWeekNumber,
|
|
89
89
|
timezone: timezone
|
|
90
90
|
});
|
|
91
|
-
exports.renderDateViewCalendar = renderDateViewCalendar;
|
|
91
|
+
exports.renderDateViewCalendar = renderDateViewCalendar;
|
|
92
|
+
if (process.env.NODE_ENV !== "production") renderDateViewCalendar.displayName = "renderDateViewCalendar";
|
|
@@ -73,7 +73,7 @@ export class AdapterDateFns extends AdapterDateFnsBase {
|
|
|
73
73
|
locale,
|
|
74
74
|
formats
|
|
75
75
|
} = {}) {
|
|
76
|
-
/*
|
|
76
|
+
/* v8 ignore start */
|
|
77
77
|
if (process.env.NODE_ENV !== 'production') {
|
|
78
78
|
if (typeof addDays !== 'function') {
|
|
79
79
|
throw new Error(['MUI: The `date-fns` package v2.x is not compatible with this adapter.', 'Please, install v3.x or v4.x of the package or use the `AdapterDateFnsV2` instead.'].join('\n'));
|
|
@@ -82,6 +82,7 @@ export class AdapterDateFns extends AdapterDateFnsBase {
|
|
|
82
82
|
throw new Error('MUI: The minimum supported `date-fns` package version compatible with this adapter is `3.2.x`.');
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
+
/* v8 ignore stop */
|
|
85
86
|
super({
|
|
86
87
|
locale: locale ?? enUS,
|
|
87
88
|
formats,
|
|
@@ -109,7 +109,7 @@ export class AdapterDateFnsJalali extends AdapterDateFnsBase {
|
|
|
109
109
|
locale,
|
|
110
110
|
formats
|
|
111
111
|
} = {}) {
|
|
112
|
-
/*
|
|
112
|
+
/* v8 ignore start */
|
|
113
113
|
if (process.env.NODE_ENV !== 'production') {
|
|
114
114
|
if (typeof addDays !== 'function') {
|
|
115
115
|
throw new Error(['MUI: The `date-fns-jalali` package v2.x is not compatible with this adapter.', 'Please, install v3.x or v4.x of the package or use the `AdapterDateFnsJalaliV2` instead.'].join('\n'));
|
|
@@ -118,6 +118,7 @@ export class AdapterDateFnsJalali extends AdapterDateFnsBase {
|
|
|
118
118
|
throw new Error('MUI: The minimum supported `date-fns-jalali` package version compatible with this adapter is `3.2.x`.');
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
+
/* v8 ignore stop */
|
|
121
122
|
super({
|
|
122
123
|
locale: locale ?? defaultLocale,
|
|
123
124
|
// some formats are different in jalali adapter,
|
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
// date-fns-jalali@<3 has no exports field defined
|
|
3
3
|
// See https://github.com/date-fns/date-fns/issues/1781
|
|
4
4
|
/* eslint-disable import/extensions, class-methods-use-this */
|
|
5
|
+
/* v8 ignore start */
|
|
5
6
|
// @ts-nocheck
|
|
6
7
|
import addSeconds from 'date-fns-jalali/addSeconds/index.js';
|
|
7
8
|
import addMinutes from 'date-fns-jalali/addMinutes/index.js';
|
|
@@ -47,6 +48,8 @@ import startOfYear from 'date-fns-jalali/startOfYear/index.js';
|
|
|
47
48
|
import isWithinInterval from 'date-fns-jalali/isWithinInterval/index.js';
|
|
48
49
|
import defaultLocale from 'date-fns-jalali/locale/fa-IR/index.js';
|
|
49
50
|
import longFormatters from 'date-fns-jalali/_lib/format/longFormatters/index.js';
|
|
51
|
+
/* v8 ignore end */
|
|
52
|
+
|
|
50
53
|
import { AdapterDateFnsBase } from "../AdapterDateFnsBase/index.js";
|
|
51
54
|
const defaultFormats = {
|
|
52
55
|
year: 'yyyy',
|
|
@@ -113,12 +116,13 @@ export class AdapterDateFnsJalali extends AdapterDateFnsBase {
|
|
|
113
116
|
locale,
|
|
114
117
|
formats
|
|
115
118
|
} = {}) {
|
|
116
|
-
/*
|
|
119
|
+
/* v8 ignore start */
|
|
117
120
|
if (process.env.NODE_ENV !== 'production') {
|
|
118
121
|
if (typeof addDays !== 'function') {
|
|
119
122
|
throw new Error(['MUI: This adapter is only compatible with `date-fns-jalali` v2.x package versions.', 'Please, install v2.x of the package or use the `AdapterDateFnsJalali` instead.'].join('\n'));
|
|
120
123
|
}
|
|
121
124
|
}
|
|
125
|
+
/* v8 ignore stop */
|
|
122
126
|
super({
|
|
123
127
|
locale: locale ?? defaultLocale,
|
|
124
128
|
// some formats are different in jalali adapter,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// date-fns@<3 has no exports field defined
|
|
2
2
|
// See https://github.com/date-fns/date-fns/issues/1781
|
|
3
3
|
/* eslint-disable import/extensions, class-methods-use-this */
|
|
4
|
+
/* v8 ignore start */
|
|
4
5
|
// @ts-nocheck
|
|
5
6
|
import addDays from 'date-fns/addDays/index.js';
|
|
6
7
|
import addSeconds from 'date-fns/addSeconds/index.js';
|
|
@@ -46,6 +47,8 @@ import startOfYear from 'date-fns/startOfYear/index.js';
|
|
|
46
47
|
import isWithinInterval from 'date-fns/isWithinInterval/index.js';
|
|
47
48
|
import defaultLocale from 'date-fns/locale/en-US/index.js';
|
|
48
49
|
import longFormatters from 'date-fns/_lib/format/longFormatters/index.js';
|
|
50
|
+
/* v8 ignore end */
|
|
51
|
+
|
|
49
52
|
import { AdapterDateFnsBase } from "../AdapterDateFnsBase/index.js";
|
|
50
53
|
/**
|
|
51
54
|
* Based on `@date-io/date-fns`
|
|
@@ -77,12 +80,13 @@ export class AdapterDateFns extends AdapterDateFnsBase {
|
|
|
77
80
|
locale,
|
|
78
81
|
formats
|
|
79
82
|
} = {}) {
|
|
80
|
-
/*
|
|
83
|
+
/* v8 ignore start */
|
|
81
84
|
if (process.env.NODE_ENV !== 'production') {
|
|
82
85
|
if (typeof addDays !== 'function') {
|
|
83
86
|
throw new Error(['MUI: This adapter is only compatible with `date-fns` v2.x package versions.', 'Please, install v2.x of the package or use the `AdapterDateFns` instead.'].join('\n'));
|
|
84
87
|
}
|
|
85
88
|
}
|
|
89
|
+
/* v8 ignore stop */
|
|
86
90
|
super({
|
|
87
91
|
locale: locale ?? defaultLocale,
|
|
88
92
|
formats,
|