@mui/x-date-pickers-pro 7.14.0 → 7.16.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/CHANGELOG.md +167 -1
- package/DateRangeCalendar/DateRangeCalendar.js +11 -11
- package/DateRangeCalendar/index.js +2 -2
- package/DateRangeCalendar/useDragRange.js +1 -1
- package/DateRangePicker/DateRangePicker.js +13 -13
- package/DateRangePicker/DateRangePickerToolbar.js +1 -1
- package/DateRangePicker/index.js +3 -3
- package/DateRangePicker/shared.js +1 -1
- package/DateRangePickerDay/DateRangePickerDay.js +2 -2
- package/DateRangePickerDay/index.js +2 -2
- package/DateTimeRangePicker/DateTimeRangePicker.js +13 -13
- package/DateTimeRangePicker/DateTimeRangePickerTabs.js +1 -1
- package/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +2 -2
- package/DateTimeRangePicker/DateTimeRangePickerToolbar.js +2 -2
- package/DateTimeRangePicker/index.js +5 -5
- package/DateTimeRangePicker/shared.js +2 -2
- package/DesktopDateRangePicker/DesktopDateRangePicker.js +17 -17
- package/DesktopDateRangePicker/index.js +1 -1
- package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +20 -20
- package/DesktopDateTimeRangePicker/index.js +1 -1
- package/MobileDateRangePicker/MobileDateRangePicker.js +17 -17
- package/MobileDateRangePicker/index.js +1 -1
- package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +20 -20
- package/MobileDateTimeRangePicker/index.js +1 -1
- package/MultiInputDateRangeField/MultiInputDateRangeField.js +11 -9
- package/MultiInputDateRangeField/index.js +2 -2
- package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +11 -9
- package/MultiInputDateTimeRangeField/index.js +2 -2
- package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +11 -9
- package/MultiInputTimeRangeField/index.js +2 -2
- package/PickersRangeCalendarHeader/index.js +1 -1
- package/SingleInputDateRangeField/SingleInputDateRangeField.js +10 -8
- package/SingleInputDateRangeField/index.js +2 -2
- package/SingleInputDateRangeField/useSingleInputDateRangeField.js +2 -2
- package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +10 -8
- package/SingleInputDateTimeRangeField/index.js +2 -2
- package/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +2 -2
- package/SingleInputTimeRangeField/SingleInputTimeRangeField.js +10 -8
- package/SingleInputTimeRangeField/index.js +2 -2
- package/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +2 -2
- package/StaticDateRangePicker/StaticDateRangePicker.js +16 -16
- package/StaticDateRangePicker/index.js +1 -1
- package/dateRangeViewRenderers/dateRangeViewRenderers.js +1 -1
- package/dateRangeViewRenderers/index.js +1 -1
- package/index.js +19 -19
- package/internals/hooks/useDesktopRangePicker/index.js +1 -1
- package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +3 -3
- package/internals/hooks/useMobileRangePicker/index.js +1 -1
- package/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +3 -3
- package/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +4 -4
- package/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +4 -4
- package/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +4 -4
- package/internals/hooks/useStaticRangePicker/index.js +1 -1
- package/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +1 -1
- package/internals/models/index.js +4 -4
- package/internals/utils/releaseInfo.js +1 -1
- package/internals/utils/validation/validateDateRange.js +1 -1
- package/internals/utils/validation/validateDateTimeRange.js +1 -1
- package/internals/utils/validation/validateTimeRange.js +1 -1
- package/internals/utils/valueManagers.js +1 -1
- package/models/index.js +5 -5
- package/modern/DateRangeCalendar/DateRangeCalendar.js +11 -11
- package/modern/DateRangeCalendar/index.js +2 -2
- package/modern/DateRangeCalendar/useDragRange.js +1 -1
- package/modern/DateRangePicker/DateRangePicker.js +13 -13
- package/modern/DateRangePicker/DateRangePickerToolbar.js +1 -1
- package/modern/DateRangePicker/index.js +3 -3
- package/modern/DateRangePicker/shared.js +1 -1
- package/modern/DateRangePickerDay/DateRangePickerDay.js +2 -2
- package/modern/DateRangePickerDay/index.js +2 -2
- package/modern/DateTimeRangePicker/DateTimeRangePicker.js +13 -13
- package/modern/DateTimeRangePicker/DateTimeRangePickerTabs.js +1 -1
- package/modern/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +2 -2
- package/modern/DateTimeRangePicker/DateTimeRangePickerToolbar.js +2 -2
- package/modern/DateTimeRangePicker/index.js +5 -5
- package/modern/DateTimeRangePicker/shared.js +2 -2
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +17 -17
- package/modern/DesktopDateRangePicker/index.js +1 -1
- package/modern/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +20 -20
- package/modern/DesktopDateTimeRangePicker/index.js +1 -1
- package/modern/MobileDateRangePicker/MobileDateRangePicker.js +17 -17
- package/modern/MobileDateRangePicker/index.js +1 -1
- package/modern/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +20 -20
- package/modern/MobileDateTimeRangePicker/index.js +1 -1
- package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +11 -9
- package/modern/MultiInputDateRangeField/index.js +2 -2
- package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +11 -9
- package/modern/MultiInputDateTimeRangeField/index.js +2 -2
- package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +11 -9
- package/modern/MultiInputTimeRangeField/index.js +2 -2
- package/modern/PickersRangeCalendarHeader/index.js +1 -1
- package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +10 -8
- package/modern/SingleInputDateRangeField/index.js +2 -2
- package/modern/SingleInputDateRangeField/useSingleInputDateRangeField.js +2 -2
- package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +10 -8
- package/modern/SingleInputDateTimeRangeField/index.js +2 -2
- package/modern/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +2 -2
- package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.js +10 -8
- package/modern/SingleInputTimeRangeField/index.js +2 -2
- package/modern/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +2 -2
- package/modern/StaticDateRangePicker/StaticDateRangePicker.js +16 -16
- package/modern/StaticDateRangePicker/index.js +1 -1
- package/modern/dateRangeViewRenderers/dateRangeViewRenderers.js +1 -1
- package/modern/dateRangeViewRenderers/index.js +1 -1
- package/modern/index.js +19 -19
- package/modern/internals/hooks/useDesktopRangePicker/index.js +1 -1
- package/modern/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +3 -3
- package/modern/internals/hooks/useMobileRangePicker/index.js +1 -1
- package/modern/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +3 -3
- package/modern/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +4 -4
- package/modern/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +4 -4
- package/modern/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +4 -4
- package/modern/internals/hooks/useStaticRangePicker/index.js +1 -1
- package/modern/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +1 -1
- package/modern/internals/models/index.js +4 -4
- package/modern/internals/utils/releaseInfo.js +1 -1
- package/modern/internals/utils/validation/validateDateRange.js +1 -1
- package/modern/internals/utils/validation/validateDateTimeRange.js +1 -1
- package/modern/internals/utils/validation/validateTimeRange.js +1 -1
- package/modern/internals/utils/valueManagers.js +1 -1
- package/modern/models/index.js +5 -5
- package/modern/themeAugmentation/index.js +1 -4
- package/node/DateRangeCalendar/DateRangeCalendar.js +3 -4
- package/node/DateRangeCalendar/useDragRange.js +2 -3
- package/node/DateRangePicker/DateRangePicker.js +13 -14
- package/node/DateRangePicker/DateRangePickerToolbar.js +2 -3
- package/node/DateRangePicker/shared.js +2 -3
- package/node/DateRangePickerDay/DateRangePickerDay.js +2 -3
- package/node/DateTimeRangePicker/DateTimeRangePicker.js +13 -14
- package/node/DateTimeRangePicker/DateTimeRangePickerTabs.js +2 -3
- package/node/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +1 -1
- package/node/DateTimeRangePicker/DateTimeRangePickerToolbar.js +2 -3
- package/node/DateTimeRangePicker/dateTimeRangePickerTabsClasses.js +1 -1
- package/node/DateTimeRangePicker/shared.js +1 -1
- package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +13 -14
- package/node/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +14 -15
- package/node/MobileDateRangePicker/MobileDateRangePicker.js +13 -14
- package/node/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +14 -15
- package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +12 -11
- package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +12 -11
- package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +12 -11
- package/node/PickersRangeCalendarHeader/PickersRangeCalendarHeader.js +2 -3
- package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +11 -10
- package/node/SingleInputDateRangeField/useSingleInputDateRangeField.js +1 -2
- package/node/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +11 -10
- package/node/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +1 -2
- package/node/SingleInputTimeRangeField/SingleInputTimeRangeField.js +11 -10
- package/node/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +1 -2
- package/node/StaticDateRangePicker/StaticDateRangePicker.js +13 -14
- package/node/dateRangeViewRenderers/dateRangeViewRenderers.js +1 -2
- package/node/index.js +1 -1
- package/node/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +2 -3
- package/node/internals/hooks/useEnrichedRangePickerFieldProps.js +2 -3
- package/node/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +2 -3
- package/node/internals/hooks/useMultiInputFieldSelectedSections.js +2 -3
- package/node/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +1 -1
- package/node/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +1 -1
- package/node/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +1 -1
- package/node/internals/hooks/useRangePosition.js +1 -1
- package/node/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +2 -3
- package/node/internals/utils/date-fields-utils.js +1 -1
- package/node/internals/utils/releaseInfo.js +1 -1
- package/node/internals/utils/validation/validateDateRange.js +1 -1
- package/node/internals/utils/validation/validateDateTimeRange.js +1 -1
- package/node/internals/utils/valueManagers.js +1 -1
- package/node/themeAugmentation/index.js +0 -33
- package/package.json +7 -6
- package/themeAugmentation/index.d.ts +3 -3
- package/themeAugmentation/index.js +1 -4
|
@@ -4,12 +4,12 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import { extractValidationProps } from '@mui/x-date-pickers/internals';
|
|
5
5
|
import resolveComponentProps from '@mui/utils/resolveComponentProps';
|
|
6
6
|
import { refType } from '@mui/utils';
|
|
7
|
-
import { rangeValueManager } from
|
|
8
|
-
import { useDateRangePickerDefaultizedProps } from
|
|
9
|
-
import { renderDateRangeViewCalendar } from
|
|
10
|
-
import { MultiInputDateRangeField } from
|
|
11
|
-
import { useMobileRangePicker } from
|
|
12
|
-
import { validateDateRange } from
|
|
7
|
+
import { rangeValueManager } from "../internals/utils/valueManagers.js";
|
|
8
|
+
import { useDateRangePickerDefaultizedProps } from "../DateRangePicker/shared.js";
|
|
9
|
+
import { renderDateRangeViewCalendar } from "../dateRangeViewRenderers/index.js";
|
|
10
|
+
import { MultiInputDateRangeField } from "../MultiInputDateRangeField/index.js";
|
|
11
|
+
import { useMobileRangePicker } from "../internals/hooks/useMobileRangePicker/index.js";
|
|
12
|
+
import { validateDateRange } from "../internals/utils/validation/validateDateRange.js";
|
|
13
13
|
/**
|
|
14
14
|
* Demos:
|
|
15
15
|
*
|
|
@@ -192,16 +192,16 @@ MobileDateRangePicker.propTypes = {
|
|
|
192
192
|
name: PropTypes.string,
|
|
193
193
|
/**
|
|
194
194
|
* Callback fired when the value is accepted.
|
|
195
|
-
* @template TValue The value type.
|
|
196
|
-
* @template TError The validation error type.
|
|
195
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
196
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
197
197
|
* @param {TValue} value The value that was just accepted.
|
|
198
198
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
199
199
|
*/
|
|
200
200
|
onAccept: PropTypes.func,
|
|
201
201
|
/**
|
|
202
202
|
* Callback fired when the value changes.
|
|
203
|
-
* @template TValue The value type.
|
|
204
|
-
* @template TError The validation error type.
|
|
203
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
204
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
205
205
|
* @param {TValue} value The new value.
|
|
206
206
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
207
207
|
*/
|
|
@@ -212,13 +212,13 @@ MobileDateRangePicker.propTypes = {
|
|
|
212
212
|
*/
|
|
213
213
|
onClose: PropTypes.func,
|
|
214
214
|
/**
|
|
215
|
-
* Callback fired when the error associated
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
* @template
|
|
219
|
-
* @template
|
|
220
|
-
* @param {TError} error The
|
|
221
|
-
* @param {TValue} value The value associated
|
|
215
|
+
* Callback fired when the error associated with the current value changes.
|
|
216
|
+
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
217
|
+
* This can be used to render an appropriate form error.
|
|
218
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
219
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
220
|
+
* @param {TError} error The reason why the current value is not valid.
|
|
221
|
+
* @param {TValue} value The value associated with the error.
|
|
222
222
|
*/
|
|
223
223
|
onError: PropTypes.func,
|
|
224
224
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MobileDateRangePicker } from
|
|
1
|
+
export { MobileDateRangePicker } from "./MobileDateRangePicker.js";
|
|
@@ -9,14 +9,14 @@ import resolveComponentProps from '@mui/utils/resolveComponentProps';
|
|
|
9
9
|
import { renderDigitalClockTimeView, renderMultiSectionDigitalClockTimeView } from '@mui/x-date-pickers/timeViewRenderers';
|
|
10
10
|
import { multiSectionDigitalClockClasses, multiSectionDigitalClockSectionClasses } from '@mui/x-date-pickers/MultiSectionDigitalClock';
|
|
11
11
|
import { digitalClockClasses } from '@mui/x-date-pickers/DigitalClock';
|
|
12
|
-
import { rangeValueManager } from
|
|
13
|
-
import { renderDateRangeViewCalendar } from
|
|
14
|
-
import { useMobileRangePicker } from
|
|
15
|
-
import { validateDateTimeRange } from
|
|
16
|
-
import { useDateTimeRangePickerDefaultizedProps } from
|
|
17
|
-
import { MultiInputDateTimeRangeField } from
|
|
18
|
-
import { DateTimeRangePickerTimeWrapper } from
|
|
19
|
-
import { RANGE_VIEW_HEIGHT } from
|
|
12
|
+
import { rangeValueManager } from "../internals/utils/valueManagers.js";
|
|
13
|
+
import { renderDateRangeViewCalendar } from "../dateRangeViewRenderers/index.js";
|
|
14
|
+
import { useMobileRangePicker } from "../internals/hooks/useMobileRangePicker/index.js";
|
|
15
|
+
import { validateDateTimeRange } from "../internals/utils/validation/validateDateTimeRange.js";
|
|
16
|
+
import { useDateTimeRangePickerDefaultizedProps } from "../DateTimeRangePicker/shared.js";
|
|
17
|
+
import { MultiInputDateTimeRangeField } from "../MultiInputDateTimeRangeField/index.js";
|
|
18
|
+
import { DateTimeRangePickerTimeWrapper } from "../DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js";
|
|
19
|
+
import { RANGE_VIEW_HEIGHT } from "../internals/constants/dimensions.js";
|
|
20
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
21
|
const rendererInterceptor = function rendererInterceptor(inViewRenderers, popperView, rendererProps) {
|
|
22
22
|
const {
|
|
@@ -95,7 +95,7 @@ const MobileDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function MobileD
|
|
|
95
95
|
}, defaultizedProps.viewRenderers);
|
|
96
96
|
const props = _extends({}, defaultizedProps, {
|
|
97
97
|
viewRenderers,
|
|
98
|
-
format: resolveDateTimeFormat(utils, defaultizedProps),
|
|
98
|
+
format: resolveDateTimeFormat(utils, defaultizedProps, true),
|
|
99
99
|
// Force one calendar on mobile to avoid layout issues
|
|
100
100
|
calendars: 1,
|
|
101
101
|
// force true to correctly handle `renderTimeViewClock` as a renderer
|
|
@@ -298,16 +298,16 @@ MobileDateTimeRangePicker.propTypes = {
|
|
|
298
298
|
name: PropTypes.string,
|
|
299
299
|
/**
|
|
300
300
|
* Callback fired when the value is accepted.
|
|
301
|
-
* @template TValue The value type.
|
|
302
|
-
* @template TError The validation error type.
|
|
301
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
302
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
303
303
|
* @param {TValue} value The value that was just accepted.
|
|
304
304
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
305
305
|
*/
|
|
306
306
|
onAccept: PropTypes.func,
|
|
307
307
|
/**
|
|
308
308
|
* Callback fired when the value changes.
|
|
309
|
-
* @template TValue The value type.
|
|
310
|
-
* @template TError The validation error type.
|
|
309
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
310
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
311
311
|
* @param {TValue} value The new value.
|
|
312
312
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
313
313
|
*/
|
|
@@ -318,13 +318,13 @@ MobileDateTimeRangePicker.propTypes = {
|
|
|
318
318
|
*/
|
|
319
319
|
onClose: PropTypes.func,
|
|
320
320
|
/**
|
|
321
|
-
* Callback fired when the error associated
|
|
322
|
-
*
|
|
323
|
-
*
|
|
324
|
-
* @template
|
|
325
|
-
* @template
|
|
326
|
-
* @param {TError} error The
|
|
327
|
-
* @param {TValue} value The value associated
|
|
321
|
+
* Callback fired when the error associated with the current value changes.
|
|
322
|
+
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
323
|
+
* This can be used to render an appropriate form error.
|
|
324
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
325
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
326
|
+
* @param {TError} error The reason why the current value is not valid.
|
|
327
|
+
* @param {TValue} value The value associated with the error.
|
|
328
328
|
*/
|
|
329
329
|
onError: PropTypes.func,
|
|
330
330
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MobileDateTimeRangePicker } from
|
|
1
|
+
export { MobileDateTimeRangePicker } from "./MobileDateTimeRangePicker.js";
|
|
@@ -12,7 +12,7 @@ import useSlotProps from '@mui/utils/useSlotProps';
|
|
|
12
12
|
import { unstable_composeClasses as composeClasses, unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
|
|
13
13
|
import { splitFieldInternalAndForwardedProps, convertFieldResponseIntoMuiTextFieldProps } from '@mui/x-date-pickers/internals';
|
|
14
14
|
import { PickersTextField } from '@mui/x-date-pickers/PickersTextField';
|
|
15
|
-
import { useMultiInputDateRangeField } from
|
|
15
|
+
import { useMultiInputDateRangeField } from "../internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js";
|
|
16
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
17
|
export const multiInputDateRangeFieldClasses = generateUtilityClasses('MuiMultiInputDateRangeField', ['root', 'separator']);
|
|
18
18
|
export const getMultiInputDateRangeFieldUtilityClass = slot => generateUtilityClass('MuiMultiInputDateRangeField', slot);
|
|
@@ -26,7 +26,7 @@ const useUtilityClasses = ownerState => {
|
|
|
26
26
|
};
|
|
27
27
|
return composeClasses(slots, getMultiInputDateRangeFieldUtilityClass, classes);
|
|
28
28
|
};
|
|
29
|
-
const MultiInputDateRangeFieldRoot = styled(
|
|
29
|
+
const MultiInputDateRangeFieldRoot = styled(/*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/_jsx(Stack, _extends({
|
|
30
30
|
ref: ref,
|
|
31
31
|
spacing: 2,
|
|
32
32
|
direction: "row",
|
|
@@ -200,18 +200,20 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
|
|
|
200
200
|
minDate: PropTypes.object,
|
|
201
201
|
/**
|
|
202
202
|
* Callback fired when the value changes.
|
|
203
|
-
* @template TValue The value type.
|
|
204
|
-
* @template TError The validation error type.
|
|
203
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
204
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
205
205
|
* @param {TValue} value The new value.
|
|
206
206
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
207
207
|
*/
|
|
208
208
|
onChange: PropTypes.func,
|
|
209
209
|
/**
|
|
210
|
-
* Callback fired when the error associated
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
* @
|
|
214
|
-
* @
|
|
210
|
+
* Callback fired when the error associated with the current value changes.
|
|
211
|
+
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
212
|
+
* This can be used to render an appropriate form error.
|
|
213
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
214
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
215
|
+
* @param {TError} error The reason why the current value is not valid.
|
|
216
|
+
* @param {TValue} value The value associated with the error.
|
|
215
217
|
*/
|
|
216
218
|
onError: PropTypes.func,
|
|
217
219
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { MultiInputDateRangeField, getMultiInputDateRangeFieldUtilityClass, multiInputDateRangeFieldClasses } from
|
|
2
|
-
export { useMultiInputDateRangeField as unstable_useMultiInputDateRangeField } from
|
|
1
|
+
export { MultiInputDateRangeField, getMultiInputDateRangeFieldUtilityClass, multiInputDateRangeFieldClasses } from "./MultiInputDateRangeField.js";
|
|
2
|
+
export { useMultiInputDateRangeField as unstable_useMultiInputDateRangeField } from "../internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js";
|
|
@@ -12,7 +12,7 @@ import useSlotProps from '@mui/utils/useSlotProps';
|
|
|
12
12
|
import { unstable_composeClasses as composeClasses, unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
|
|
13
13
|
import { splitFieldInternalAndForwardedProps, convertFieldResponseIntoMuiTextFieldProps } from '@mui/x-date-pickers/internals';
|
|
14
14
|
import { PickersTextField } from '@mui/x-date-pickers/PickersTextField';
|
|
15
|
-
import { useMultiInputDateTimeRangeField } from
|
|
15
|
+
import { useMultiInputDateTimeRangeField } from "../internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js";
|
|
16
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
17
|
export const multiInputDateTimeRangeFieldClasses = generateUtilityClasses('MuiMultiInputDateTimeRangeField', ['root', 'separator']);
|
|
18
18
|
export const getMultiInputDateTimeRangeFieldUtilityClass = slot => generateUtilityClass('MuiMultiInputDateTimeRangeField', slot);
|
|
@@ -26,7 +26,7 @@ const useUtilityClasses = ownerState => {
|
|
|
26
26
|
};
|
|
27
27
|
return composeClasses(slots, getMultiInputDateTimeRangeFieldUtilityClass, classes);
|
|
28
28
|
};
|
|
29
|
-
const MultiInputDateTimeRangeFieldRoot = styled(
|
|
29
|
+
const MultiInputDateTimeRangeFieldRoot = styled(/*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/_jsx(Stack, _extends({
|
|
30
30
|
ref: ref,
|
|
31
31
|
spacing: 2,
|
|
32
32
|
direction: "row",
|
|
@@ -233,18 +233,20 @@ process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes =
|
|
|
233
233
|
minutesStep: PropTypes.number,
|
|
234
234
|
/**
|
|
235
235
|
* Callback fired when the value changes.
|
|
236
|
-
* @template TValue The value type.
|
|
237
|
-
* @template TError The validation error type.
|
|
236
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
237
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
238
238
|
* @param {TValue} value The new value.
|
|
239
239
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
240
240
|
*/
|
|
241
241
|
onChange: PropTypes.func,
|
|
242
242
|
/**
|
|
243
|
-
* Callback fired when the error associated
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
* @
|
|
247
|
-
* @
|
|
243
|
+
* Callback fired when the error associated with the current value changes.
|
|
244
|
+
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
245
|
+
* This can be used to render an appropriate form error.
|
|
246
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
247
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
248
|
+
* @param {TError} error The reason why the current value is not valid.
|
|
249
|
+
* @param {TValue} value The value associated with the error.
|
|
248
250
|
*/
|
|
249
251
|
onError: PropTypes.func,
|
|
250
252
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { MultiInputDateTimeRangeField, getMultiInputDateTimeRangeFieldUtilityClass, multiInputDateTimeRangeFieldClasses } from
|
|
2
|
-
export { useMultiInputDateTimeRangeField as unstable_useMultiInputDateTimeRangeField } from
|
|
1
|
+
export { MultiInputDateTimeRangeField, getMultiInputDateTimeRangeFieldUtilityClass, multiInputDateTimeRangeFieldClasses } from "./MultiInputDateTimeRangeField.js";
|
|
2
|
+
export { useMultiInputDateTimeRangeField as unstable_useMultiInputDateTimeRangeField } from "../internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js";
|
|
@@ -12,7 +12,7 @@ import useSlotProps from '@mui/utils/useSlotProps';
|
|
|
12
12
|
import { unstable_composeClasses as composeClasses, unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
|
|
13
13
|
import { splitFieldInternalAndForwardedProps, convertFieldResponseIntoMuiTextFieldProps } from '@mui/x-date-pickers/internals';
|
|
14
14
|
import { PickersTextField } from '@mui/x-date-pickers/PickersTextField';
|
|
15
|
-
import { useMultiInputTimeRangeField } from
|
|
15
|
+
import { useMultiInputTimeRangeField } from "../internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js";
|
|
16
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
17
|
export const multiInputTimeRangeFieldClasses = generateUtilityClasses('MuiMultiInputTimeRangeField', ['root', 'separator']);
|
|
18
18
|
export const getMultiInputTimeRangeFieldUtilityClass = slot => generateUtilityClass('MuiMultiInputTimeRangeField', slot);
|
|
@@ -26,7 +26,7 @@ const useUtilityClasses = ownerState => {
|
|
|
26
26
|
};
|
|
27
27
|
return composeClasses(slots, getMultiInputTimeRangeFieldUtilityClass, classes);
|
|
28
28
|
};
|
|
29
|
-
const MultiInputTimeRangeFieldRoot = styled(
|
|
29
|
+
const MultiInputTimeRangeFieldRoot = styled(/*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/_jsx(Stack, _extends({
|
|
30
30
|
ref: ref,
|
|
31
31
|
spacing: 2,
|
|
32
32
|
direction: "row",
|
|
@@ -215,18 +215,20 @@ process.env.NODE_ENV !== "production" ? MultiInputTimeRangeField.propTypes = {
|
|
|
215
215
|
minutesStep: PropTypes.number,
|
|
216
216
|
/**
|
|
217
217
|
* Callback fired when the value changes.
|
|
218
|
-
* @template TValue The value type.
|
|
219
|
-
* @template TError The validation error type.
|
|
218
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
219
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
220
220
|
* @param {TValue} value The new value.
|
|
221
221
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
222
222
|
*/
|
|
223
223
|
onChange: PropTypes.func,
|
|
224
224
|
/**
|
|
225
|
-
* Callback fired when the error associated
|
|
226
|
-
*
|
|
227
|
-
*
|
|
228
|
-
* @
|
|
229
|
-
* @
|
|
225
|
+
* Callback fired when the error associated with the current value changes.
|
|
226
|
+
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
227
|
+
* This can be used to render an appropriate form error.
|
|
228
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
229
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
230
|
+
* @param {TError} error The reason why the current value is not valid.
|
|
231
|
+
* @param {TValue} value The value associated with the error.
|
|
230
232
|
*/
|
|
231
233
|
onError: PropTypes.func,
|
|
232
234
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { MultiInputTimeRangeField, getMultiInputTimeRangeFieldUtilityClass, multiInputTimeRangeFieldClasses } from
|
|
2
|
-
export { useMultiInputTimeRangeField as unstable_useMultiInputTimeRangeField } from
|
|
1
|
+
export { MultiInputTimeRangeField, getMultiInputTimeRangeFieldUtilityClass, multiInputTimeRangeFieldClasses } from "./MultiInputTimeRangeField.js";
|
|
2
|
+
export { useMultiInputTimeRangeField as unstable_useMultiInputTimeRangeField } from "../internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { PickersRangeCalendarHeader } from
|
|
1
|
+
export { PickersRangeCalendarHeader } from "./PickersRangeCalendarHeader.js";
|
|
@@ -10,7 +10,7 @@ import { refType } from '@mui/utils';
|
|
|
10
10
|
import { useClearableField } from '@mui/x-date-pickers/hooks';
|
|
11
11
|
import { convertFieldResponseIntoMuiTextFieldProps } from '@mui/x-date-pickers/internals';
|
|
12
12
|
import { PickersTextField } from '@mui/x-date-pickers/PickersTextField';
|
|
13
|
-
import { useSingleInputDateRangeField } from
|
|
13
|
+
import { useSingleInputDateRangeField } from "./useSingleInputDateRangeField.js";
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
/**
|
|
16
16
|
* Demos:
|
|
@@ -195,8 +195,8 @@ process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
|
|
|
195
195
|
onBlur: PropTypes.func,
|
|
196
196
|
/**
|
|
197
197
|
* Callback fired when the value changes.
|
|
198
|
-
* @template TValue The value type.
|
|
199
|
-
* @template TError The validation error type.
|
|
198
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
199
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
200
200
|
* @param {TValue} value The new value.
|
|
201
201
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
202
202
|
*/
|
|
@@ -206,11 +206,13 @@ process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
|
|
|
206
206
|
*/
|
|
207
207
|
onClear: PropTypes.func,
|
|
208
208
|
/**
|
|
209
|
-
* Callback fired when the error associated
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
* @
|
|
213
|
-
* @
|
|
209
|
+
* Callback fired when the error associated with the current value changes.
|
|
210
|
+
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
211
|
+
* This can be used to render an appropriate form error.
|
|
212
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
213
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
214
|
+
* @param {TError} error The reason why the current value is not valid.
|
|
215
|
+
* @param {TValue} value The value associated with the error.
|
|
214
216
|
*/
|
|
215
217
|
onError: PropTypes.func,
|
|
216
218
|
onFocus: PropTypes.func,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { SingleInputDateRangeField } from
|
|
2
|
-
export { useSingleInputDateRangeField as unstable_useSingleInputDateRangeField } from
|
|
1
|
+
export { SingleInputDateRangeField } from "./SingleInputDateRangeField.js";
|
|
2
|
+
export { useSingleInputDateRangeField as unstable_useSingleInputDateRangeField } from "./useSingleInputDateRangeField.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useField, splitFieldInternalAndForwardedProps, useDefaultizedDateField } from '@mui/x-date-pickers/internals';
|
|
3
|
-
import { rangeValueManager, getRangeFieldValueManager } from
|
|
4
|
-
import { validateDateRange } from
|
|
3
|
+
import { rangeValueManager, getRangeFieldValueManager } from "../internals/utils/valueManagers.js";
|
|
4
|
+
import { validateDateRange } from "../internals/utils/validation/validateDateRange.js";
|
|
5
5
|
export const useSingleInputDateRangeField = inProps => {
|
|
6
6
|
const props = useDefaultizedDateField(inProps);
|
|
7
7
|
const {
|
|
@@ -10,7 +10,7 @@ import { useThemeProps } from '@mui/material/styles';
|
|
|
10
10
|
import { refType } from '@mui/utils';
|
|
11
11
|
import useSlotProps from '@mui/utils/useSlotProps';
|
|
12
12
|
import { useClearableField } from '@mui/x-date-pickers/hooks';
|
|
13
|
-
import { useSingleInputDateTimeRangeField } from
|
|
13
|
+
import { useSingleInputDateTimeRangeField } from "./useSingleInputDateTimeRangeField.js";
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
/**
|
|
16
16
|
* Demos:
|
|
@@ -228,8 +228,8 @@ process.env.NODE_ENV !== "production" ? SingleInputDateTimeRangeField.propTypes
|
|
|
228
228
|
onBlur: PropTypes.func,
|
|
229
229
|
/**
|
|
230
230
|
* Callback fired when the value changes.
|
|
231
|
-
* @template TValue The value type.
|
|
232
|
-
* @template TError The validation error type.
|
|
231
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
232
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
233
233
|
* @param {TValue} value The new value.
|
|
234
234
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
235
235
|
*/
|
|
@@ -239,11 +239,13 @@ process.env.NODE_ENV !== "production" ? SingleInputDateTimeRangeField.propTypes
|
|
|
239
239
|
*/
|
|
240
240
|
onClear: PropTypes.func,
|
|
241
241
|
/**
|
|
242
|
-
* Callback fired when the error associated
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
* @
|
|
246
|
-
* @
|
|
242
|
+
* Callback fired when the error associated with the current value changes.
|
|
243
|
+
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
244
|
+
* This can be used to render an appropriate form error.
|
|
245
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
246
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
247
|
+
* @param {TError} error The reason why the current value is not valid.
|
|
248
|
+
* @param {TValue} value The value associated with the error.
|
|
247
249
|
*/
|
|
248
250
|
onError: PropTypes.func,
|
|
249
251
|
onFocus: PropTypes.func,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { SingleInputDateTimeRangeField } from
|
|
2
|
-
export { useSingleInputDateTimeRangeField as unstable_useSingleInputDateTimeRangeField } from
|
|
1
|
+
export { SingleInputDateTimeRangeField } from "./SingleInputDateTimeRangeField.js";
|
|
2
|
+
export { useSingleInputDateTimeRangeField as unstable_useSingleInputDateTimeRangeField } from "./useSingleInputDateTimeRangeField.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useField, splitFieldInternalAndForwardedProps, useDefaultizedDateTimeField } from '@mui/x-date-pickers/internals';
|
|
3
|
-
import { rangeValueManager, getRangeFieldValueManager } from
|
|
4
|
-
import { validateDateTimeRange } from
|
|
3
|
+
import { rangeValueManager, getRangeFieldValueManager } from "../internals/utils/valueManagers.js";
|
|
4
|
+
import { validateDateTimeRange } from "../internals/utils/validation/validateDateTimeRange.js";
|
|
5
5
|
export const useSingleInputDateTimeRangeField = inProps => {
|
|
6
6
|
const props = useDefaultizedDateTimeField(inProps);
|
|
7
7
|
const {
|
|
@@ -10,7 +10,7 @@ import { PickersTextField } from '@mui/x-date-pickers/PickersTextField';
|
|
|
10
10
|
import { useThemeProps } from '@mui/material/styles';
|
|
11
11
|
import useSlotProps from '@mui/utils/useSlotProps';
|
|
12
12
|
import { refType } from '@mui/utils';
|
|
13
|
-
import { useSingleInputTimeRangeField } from
|
|
13
|
+
import { useSingleInputTimeRangeField } from "./useSingleInputTimeRangeField.js";
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
/**
|
|
16
16
|
* Demos:
|
|
@@ -210,8 +210,8 @@ process.env.NODE_ENV !== "production" ? SingleInputTimeRangeField.propTypes = {
|
|
|
210
210
|
onBlur: PropTypes.func,
|
|
211
211
|
/**
|
|
212
212
|
* Callback fired when the value changes.
|
|
213
|
-
* @template TValue The value type.
|
|
214
|
-
* @template TError The validation error type.
|
|
213
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
214
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
215
215
|
* @param {TValue} value The new value.
|
|
216
216
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
217
217
|
*/
|
|
@@ -221,11 +221,13 @@ process.env.NODE_ENV !== "production" ? SingleInputTimeRangeField.propTypes = {
|
|
|
221
221
|
*/
|
|
222
222
|
onClear: PropTypes.func,
|
|
223
223
|
/**
|
|
224
|
-
* Callback fired when the error associated
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
* @
|
|
228
|
-
* @
|
|
224
|
+
* Callback fired when the error associated with the current value changes.
|
|
225
|
+
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
226
|
+
* This can be used to render an appropriate form error.
|
|
227
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
228
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
229
|
+
* @param {TError} error The reason why the current value is not valid.
|
|
230
|
+
* @param {TValue} value The value associated with the error.
|
|
229
231
|
*/
|
|
230
232
|
onError: PropTypes.func,
|
|
231
233
|
onFocus: PropTypes.func,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { SingleInputTimeRangeField } from
|
|
2
|
-
export { useSingleInputTimeRangeField as unstable_useSingleInputTimeRangeField } from
|
|
1
|
+
export { SingleInputTimeRangeField } from "./SingleInputTimeRangeField.js";
|
|
2
|
+
export { useSingleInputTimeRangeField as unstable_useSingleInputTimeRangeField } from "./useSingleInputTimeRangeField.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useField, splitFieldInternalAndForwardedProps, useDefaultizedTimeField } from '@mui/x-date-pickers/internals';
|
|
3
|
-
import { rangeValueManager, getRangeFieldValueManager } from
|
|
4
|
-
import { validateTimeRange } from
|
|
3
|
+
import { rangeValueManager, getRangeFieldValueManager } from "../internals/utils/valueManagers.js";
|
|
4
|
+
import { validateTimeRange } from "../internals/utils/validation/validateTimeRange.js";
|
|
5
5
|
export const useSingleInputTimeRangeField = inProps => {
|
|
6
6
|
const props = useDefaultizedTimeField(inProps);
|
|
7
7
|
const {
|
|
@@ -1,11 +1,11 @@
|
|
|
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 { useStaticRangePicker } from
|
|
5
|
-
import { useDateRangePickerDefaultizedProps } from
|
|
6
|
-
import { renderDateRangeViewCalendar } from
|
|
7
|
-
import { rangeValueManager } from
|
|
8
|
-
import { validateDateRange } from
|
|
4
|
+
import { useStaticRangePicker } from "../internals/hooks/useStaticRangePicker/index.js";
|
|
5
|
+
import { useDateRangePickerDefaultizedProps } from "../DateRangePicker/shared.js";
|
|
6
|
+
import { renderDateRangeViewCalendar } from "../dateRangeViewRenderers/index.js";
|
|
7
|
+
import { rangeValueManager } from "../internals/utils/valueManagers.js";
|
|
8
|
+
import { validateDateRange } from "../internals/utils/validation/validateDateRange.js";
|
|
9
9
|
/**
|
|
10
10
|
* Demos:
|
|
11
11
|
*
|
|
@@ -155,16 +155,16 @@ StaticDateRangePicker.propTypes = {
|
|
|
155
155
|
minDate: PropTypes.object,
|
|
156
156
|
/**
|
|
157
157
|
* Callback fired when the value is accepted.
|
|
158
|
-
* @template TValue The value type.
|
|
159
|
-
* @template TError The validation error type.
|
|
158
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
159
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
160
160
|
* @param {TValue} value The value that was just accepted.
|
|
161
161
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
162
162
|
*/
|
|
163
163
|
onAccept: PropTypes.func,
|
|
164
164
|
/**
|
|
165
165
|
* Callback fired when the value changes.
|
|
166
|
-
* @template TValue The value type.
|
|
167
|
-
* @template TError The validation error type.
|
|
166
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
167
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
168
168
|
* @param {TValue} value The new value.
|
|
169
169
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
170
170
|
*/
|
|
@@ -176,13 +176,13 @@ StaticDateRangePicker.propTypes = {
|
|
|
176
176
|
*/
|
|
177
177
|
onClose: PropTypes.func,
|
|
178
178
|
/**
|
|
179
|
-
* Callback fired when the error associated
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
* @template
|
|
183
|
-
* @template
|
|
184
|
-
* @param {TError} error The
|
|
185
|
-
* @param {TValue} value The value associated
|
|
179
|
+
* Callback fired when the error associated with the current value changes.
|
|
180
|
+
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
181
|
+
* This can be used to render an appropriate form error.
|
|
182
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
183
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
184
|
+
* @param {TError} error The reason why the current value is not valid.
|
|
185
|
+
* @param {TValue} value The value associated with the error.
|
|
186
186
|
*/
|
|
187
187
|
onError: PropTypes.func,
|
|
188
188
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { StaticDateRangePicker } from
|
|
1
|
+
export { StaticDateRangePicker } from "./StaticDateRangePicker.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { DateRangeCalendar } from
|
|
2
|
+
import { DateRangeCalendar } from "../DateRangeCalendar/index.js";
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
/**
|
|
5
5
|
* We don't pass all the props down to `DateRangeCalendar`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { renderDateRangeViewCalendar } from
|
|
1
|
+
export { renderDateRangeViewCalendar } from "./dateRangeViewRenderers.js";
|