@mui/x-date-pickers-pro 8.0.0-beta.3 → 8.0.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 +282 -96
- package/DateRangeCalendar/DateRangeCalendar.js +1 -2
- package/DateRangePicker/DateRangePicker.js +1 -1
- package/DateRangePickerDay/DateRangePickerDay.js +1 -3
- package/DateTimeRangePicker/DateTimeRangePicker.js +1 -1
- package/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +1 -8
- package/DesktopDateRangePicker/DesktopDateRangePicker.js +2 -7
- package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +1 -2
- package/DesktopTimeRangePicker/DesktopTimeRangePicker.js +1 -1
- package/MobileDateRangePicker/MobileDateRangePicker.js +1 -1
- package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +1 -2
- package/MobileTimeRangePicker/MobileTimeRangePicker.js +1 -1
- package/TimeRangePicker/TimeRangePicker.js +1 -1
- package/TimeRangePicker/TimeRangePickerTimeWrapper.js +1 -6
- package/esm/DateRangeCalendar/DateRangeCalendar.js +1 -2
- package/esm/DateRangePicker/DateRangePicker.js +1 -1
- package/esm/DateRangePickerDay/DateRangePickerDay.js +1 -3
- package/esm/DateTimeRangePicker/DateTimeRangePicker.js +1 -1
- package/esm/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +2 -9
- package/esm/DesktopDateRangePicker/DesktopDateRangePicker.js +2 -7
- package/esm/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +1 -2
- package/esm/DesktopTimeRangePicker/DesktopTimeRangePicker.js +1 -1
- package/esm/MobileDateRangePicker/MobileDateRangePicker.js +1 -1
- package/esm/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +1 -2
- package/esm/MobileTimeRangePicker/MobileTimeRangePicker.js +1 -1
- package/esm/TimeRangePicker/TimeRangePicker.js +1 -1
- package/esm/TimeRangePicker/TimeRangePickerTimeWrapper.js +1 -6
- package/esm/index.js +1 -1
- package/esm/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +8 -5
- package/esm/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +4 -4
- package/esm/internals/utils/createMultiInputRangeField/useTextFieldProps.js +1 -0
- package/esm/internals/utils/createRangePickerStepNavigation.js +3 -3
- package/esm/internals/utils/date-fields-utils.d.ts +1 -0
- package/index.js +1 -1
- package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +8 -5
- package/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +4 -4
- package/internals/utils/createMultiInputRangeField/useTextFieldProps.js +1 -0
- package/internals/utils/createRangePickerStepNavigation.js +3 -3
- package/internals/utils/date-fields-utils.d.ts +1 -0
- package/package.json +5 -13
- package/esm/internals/utils/releaseInfo.d.ts +0 -1
- package/esm/internals/utils/releaseInfo.js +0 -13
- package/internals/utils/releaseInfo.d.ts +0 -1
- package/internals/utils/releaseInfo.js +0 -20
- package/modern/AdapterDateFns/index.d.ts +0 -1
- package/modern/AdapterDateFns/index.js +0 -1
- package/modern/AdapterDateFnsJalali/index.d.ts +0 -1
- package/modern/AdapterDateFnsJalali/index.js +0 -1
- package/modern/AdapterDateFnsJalaliV2/index.d.ts +0 -1
- package/modern/AdapterDateFnsJalaliV2/index.js +0 -1
- package/modern/AdapterDateFnsV2/index.d.ts +0 -1
- package/modern/AdapterDateFnsV2/index.js +0 -1
- package/modern/AdapterDayjs/index.d.ts +0 -1
- package/modern/AdapterDayjs/index.js +0 -1
- package/modern/AdapterLuxon/index.d.ts +0 -1
- package/modern/AdapterLuxon/index.js +0 -1
- package/modern/AdapterMoment/index.d.ts +0 -1
- package/modern/AdapterMoment/index.js +0 -1
- package/modern/AdapterMomentHijri/index.d.ts +0 -1
- package/modern/AdapterMomentHijri/index.js +0 -1
- package/modern/AdapterMomentJalaali/index.d.ts +0 -1
- package/modern/AdapterMomentJalaali/index.js +0 -1
- package/modern/DateRangeCalendar/DateRangeCalendar.d.ts +0 -17
- package/modern/DateRangeCalendar/DateRangeCalendar.js +0 -748
- package/modern/DateRangeCalendar/DateRangeCalendar.types.d.ts +0 -113
- package/modern/DateRangeCalendar/DateRangeCalendar.types.js +0 -1
- package/modern/DateRangeCalendar/dateRangeCalendarClasses.d.ts +0 -11
- package/modern/DateRangeCalendar/dateRangeCalendarClasses.js +0 -3
- package/modern/DateRangeCalendar/index.d.ts +0 -4
- package/modern/DateRangeCalendar/index.js +0 -2
- package/modern/DateRangeCalendar/useDragRange.d.ts +0 -40
- package/modern/DateRangeCalendar/useDragRange.js +0 -250
- package/modern/DateRangePicker/DateRangePicker.d.ts +0 -17
- package/modern/DateRangePicker/DateRangePicker.js +0 -344
- package/modern/DateRangePicker/DateRangePicker.types.d.ts +0 -33
- package/modern/DateRangePicker/DateRangePicker.types.js +0 -1
- package/modern/DateRangePicker/DateRangePickerToolbar.d.ts +0 -25
- package/modern/DateRangePicker/DateRangePickerToolbar.js +0 -131
- package/modern/DateRangePicker/dateRangePickerToolbarClasses.d.ts +0 -9
- package/modern/DateRangePicker/dateRangePickerToolbarClasses.js +0 -5
- package/modern/DateRangePicker/index.d.ts +0 -6
- package/modern/DateRangePicker/index.js +0 -3
- package/modern/DateRangePicker/shared.d.ts +0 -40
- package/modern/DateRangePicker/shared.js +0 -26
- package/modern/DateRangePickerDay/DateRangePickerDay.d.ts +0 -14
- package/modern/DateRangePickerDay/DateRangePickerDay.js +0 -472
- package/modern/DateRangePickerDay/DateRangePickerDay.types.d.ts +0 -91
- package/modern/DateRangePickerDay/DateRangePickerDay.types.js +0 -1
- package/modern/DateRangePickerDay/dateRangePickerDayClasses.d.ts +0 -41
- package/modern/DateRangePickerDay/dateRangePickerDayClasses.js +0 -5
- package/modern/DateRangePickerDay/index.d.ts +0 -4
- package/modern/DateRangePickerDay/index.js +0 -2
- package/modern/DateTimeRangePicker/DateTimeRangePicker.d.ts +0 -17
- package/modern/DateTimeRangePicker/DateTimeRangePicker.js +0 -431
- package/modern/DateTimeRangePicker/DateTimeRangePicker.types.d.ts +0 -28
- package/modern/DateTimeRangePicker/DateTimeRangePicker.types.js +0 -1
- package/modern/DateTimeRangePicker/DateTimeRangePickerTabs.d.ts +0 -30
- package/modern/DateTimeRangePicker/DateTimeRangePickerTabs.js +0 -193
- package/modern/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.d.ts +0 -17
- package/modern/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +0 -60
- package/modern/DateTimeRangePicker/DateTimeRangePickerToolbar.d.ts +0 -17
- package/modern/DateTimeRangePicker/DateTimeRangePickerToolbar.js +0 -200
- package/modern/DateTimeRangePicker/dateTimeRangePickerTabsClasses.d.ts +0 -13
- package/modern/DateTimeRangePicker/dateTimeRangePickerTabsClasses.js +0 -6
- package/modern/DateTimeRangePicker/dateTimeRangePickerToolbarClasses.d.ts +0 -11
- package/modern/DateTimeRangePicker/dateTimeRangePickerToolbarClasses.js +0 -5
- package/modern/DateTimeRangePicker/index.d.ts +0 -10
- package/modern/DateTimeRangePicker/index.js +0 -5
- package/modern/DateTimeRangePicker/shared.d.ts +0 -63
- package/modern/DateTimeRangePicker/shared.js +0 -51
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +0 -17
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -358
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.types.d.ts +0 -27
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.types.js +0 -1
- package/modern/DesktopDateRangePicker/index.d.ts +0 -2
- package/modern/DesktopDateRangePicker/index.js +0 -1
- package/modern/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.d.ts +0 -17
- package/modern/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +0 -520
- package/modern/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.types.d.ts +0 -22
- package/modern/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.types.js +0 -1
- package/modern/DesktopDateTimeRangePicker/index.d.ts +0 -2
- package/modern/DesktopDateTimeRangePicker/index.js +0 -1
- package/modern/DesktopTimeRangePicker/DesktopTimeRangePicker.d.ts +0 -7
- package/modern/DesktopTimeRangePicker/DesktopTimeRangePicker.js +0 -397
- package/modern/DesktopTimeRangePicker/DesktopTimeRangePicker.types.d.ts +0 -18
- package/modern/DesktopTimeRangePicker/DesktopTimeRangePicker.types.js +0 -1
- package/modern/DesktopTimeRangePicker/index.d.ts +0 -2
- package/modern/DesktopTimeRangePicker/index.js +0 -1
- package/modern/LocalizationProvider/index.d.ts +0 -1
- package/modern/LocalizationProvider/index.js +0 -1
- package/modern/MobileDateRangePicker/MobileDateRangePicker.d.ts +0 -17
- package/modern/MobileDateRangePicker/MobileDateRangePicker.js +0 -350
- package/modern/MobileDateRangePicker/MobileDateRangePicker.types.d.ts +0 -17
- package/modern/MobileDateRangePicker/MobileDateRangePicker.types.js +0 -1
- package/modern/MobileDateRangePicker/index.d.ts +0 -2
- package/modern/MobileDateRangePicker/index.js +0 -1
- package/modern/MobileDateTimeRangePicker/MobileDateTimeRangePicker.d.ts +0 -17
- package/modern/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +0 -526
- package/modern/MobileDateTimeRangePicker/MobileDateTimeRangePicker.types.d.ts +0 -17
- package/modern/MobileDateTimeRangePicker/MobileDateTimeRangePicker.types.js +0 -1
- package/modern/MobileDateTimeRangePicker/index.d.ts +0 -2
- package/modern/MobileDateTimeRangePicker/index.js +0 -1
- package/modern/MobileTimeRangePicker/MobileTimeRangePicker.d.ts +0 -7
- package/modern/MobileTimeRangePicker/MobileTimeRangePicker.js +0 -380
- package/modern/MobileTimeRangePicker/MobileTimeRangePicker.types.d.ts +0 -17
- package/modern/MobileTimeRangePicker/MobileTimeRangePicker.types.js +0 -1
- package/modern/MobileTimeRangePicker/index.d.ts +0 -2
- package/modern/MobileTimeRangePicker/index.js +0 -1
- package/modern/MultiInputDateRangeField/MultiInputDateRangeField.d.ts +0 -25
- package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +0 -215
- package/modern/MultiInputDateRangeField/index.d.ts +0 -5
- package/modern/MultiInputDateRangeField/index.js +0 -2
- package/modern/MultiInputDateRangeField/multiInputDateRangeFieldClasses.d.ts +0 -5
- package/modern/MultiInputDateRangeField/multiInputDateRangeFieldClasses.js +0 -4
- package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.d.ts +0 -25
- package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +0 -255
- package/modern/MultiInputDateTimeRangeField/index.d.ts +0 -5
- package/modern/MultiInputDateTimeRangeField/index.js +0 -2
- package/modern/MultiInputDateTimeRangeField/multiInputDateTimeRangeFieldClasses.d.ts +0 -5
- package/modern/MultiInputDateTimeRangeField/multiInputDateTimeRangeFieldClasses.js +0 -4
- package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.d.ts +0 -25
- package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +0 -228
- package/modern/MultiInputTimeRangeField/index.d.ts +0 -5
- package/modern/MultiInputTimeRangeField/index.js +0 -2
- package/modern/MultiInputTimeRangeField/multiInputTimeRangeFieldClasses.d.ts +0 -5
- package/modern/MultiInputTimeRangeField/multiInputTimeRangeFieldClasses.js +0 -4
- package/modern/PickersRangeCalendarHeader/PickersRangeCalendarHeader.d.ts +0 -7
- package/modern/PickersRangeCalendarHeader/PickersRangeCalendarHeader.js +0 -137
- package/modern/PickersRangeCalendarHeader/PickersRangeCalendarHeader.types.d.ts +0 -17
- package/modern/PickersRangeCalendarHeader/PickersRangeCalendarHeader.types.js +0 -1
- package/modern/PickersRangeCalendarHeader/index.d.ts +0 -2
- package/modern/PickersRangeCalendarHeader/index.js +0 -1
- package/modern/SingleInputDateRangeField/SingleInputDateRangeField.d.ts +0 -19
- package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +0 -316
- package/modern/SingleInputDateRangeField/SingleInputDateRangeField.types.d.ts +0 -18
- package/modern/SingleInputDateRangeField/SingleInputDateRangeField.types.js +0 -1
- package/modern/SingleInputDateRangeField/index.d.ts +0 -3
- package/modern/SingleInputDateRangeField/index.js +0 -2
- package/modern/SingleInputDateRangeField/useSingleInputDateRangeField.d.ts +0 -2
- package/modern/SingleInputDateRangeField/useSingleInputDateRangeField.js +0 -11
- package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.d.ts +0 -19
- package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +0 -356
- package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.d.ts +0 -18
- package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.js +0 -1
- package/modern/SingleInputDateTimeRangeField/index.d.ts +0 -3
- package/modern/SingleInputDateTimeRangeField/index.js +0 -2
- package/modern/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.d.ts +0 -2
- package/modern/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +0 -11
- package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.d.ts +0 -19
- package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.js +0 -328
- package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.types.d.ts +0 -18
- package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.types.js +0 -1
- package/modern/SingleInputTimeRangeField/index.d.ts +0 -3
- package/modern/SingleInputTimeRangeField/index.js +0 -2
- package/modern/SingleInputTimeRangeField/useSingleInputTimeRangeField.d.ts +0 -2
- package/modern/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +0 -11
- package/modern/StaticDateRangePicker/StaticDateRangePicker.d.ts +0 -17
- package/modern/StaticDateRangePicker/StaticDateRangePicker.js +0 -286
- package/modern/StaticDateRangePicker/StaticDateRangePicker.types.d.ts +0 -22
- package/modern/StaticDateRangePicker/StaticDateRangePicker.types.js +0 -1
- package/modern/StaticDateRangePicker/index.d.ts +0 -2
- package/modern/StaticDateRangePicker/index.js +0 -1
- package/modern/TimeRangePicker/TimeRangePicker.d.ts +0 -17
- package/modern/TimeRangePicker/TimeRangePicker.js +0 -333
- package/modern/TimeRangePicker/TimeRangePicker.types.d.ts +0 -22
- package/modern/TimeRangePicker/TimeRangePicker.types.js +0 -1
- package/modern/TimeRangePicker/TimeRangePickerTabs.d.ts +0 -35
- package/modern/TimeRangePicker/TimeRangePickerTabs.js +0 -138
- package/modern/TimeRangePicker/TimeRangePickerTimeWrapper.d.ts +0 -17
- package/modern/TimeRangePicker/TimeRangePickerTimeWrapper.js +0 -58
- package/modern/TimeRangePicker/TimeRangePickerToolbar.d.ts +0 -14
- package/modern/TimeRangePicker/TimeRangePickerToolbar.js +0 -256
- package/modern/TimeRangePicker/index.d.ts +0 -10
- package/modern/TimeRangePicker/index.js +0 -5
- package/modern/TimeRangePicker/shared.d.ts +0 -73
- package/modern/TimeRangePicker/shared.js +0 -61
- package/modern/TimeRangePicker/timeRangePickerTabsClasses.d.ts +0 -9
- package/modern/TimeRangePicker/timeRangePickerTabsClasses.js +0 -5
- package/modern/TimeRangePicker/timeRangePickerToolbarClasses.d.ts +0 -13
- package/modern/TimeRangePicker/timeRangePickerToolbarClasses.js +0 -5
- package/modern/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +0 -49
- package/modern/dateRangeViewRenderers/dateRangeViewRenderers.js +0 -85
- package/modern/dateRangeViewRenderers/index.d.ts +0 -2
- package/modern/dateRangeViewRenderers/index.js +0 -1
- package/modern/hooks/index.d.ts +0 -3
- package/modern/hooks/index.js +0 -2
- package/modern/hooks/useMultiInputRangeField/index.d.ts +0 -2
- package/modern/hooks/useMultiInputRangeField/index.js +0 -1
- package/modern/hooks/useMultiInputRangeField/useMultiInputRangeField.d.ts +0 -72
- package/modern/hooks/useMultiInputRangeField/useMultiInputRangeField.js +0 -140
- package/modern/hooks/useMultiInputRangeField/useMultiInputRangeFieldRootProps.d.ts +0 -11
- package/modern/hooks/useMultiInputRangeField/useMultiInputRangeFieldRootProps.js +0 -25
- package/modern/hooks/useMultiInputRangeField/useMultiInputRangeFieldSelectedSections.d.ts +0 -19
- package/modern/hooks/useMultiInputRangeField/useMultiInputRangeFieldSelectedSections.js +0 -43
- package/modern/hooks/useMultiInputRangeField/useTextFieldProps.d.ts +0 -30
- package/modern/hooks/useMultiInputRangeField/useTextFieldProps.js +0 -129
- package/modern/hooks/usePickerRangePositionContext.d.ts +0 -7
- package/modern/hooks/usePickerRangePositionContext.js +0 -15
- package/modern/index.d.ts +0 -25
- package/modern/index.js +0 -40
- package/modern/internals/constants/dimensions.d.ts +0 -3
- package/modern/internals/constants/dimensions.js +0 -5
- package/modern/internals/hooks/useDesktopRangePicker/index.d.ts +0 -2
- package/modern/internals/hooks/useDesktopRangePicker/index.js +0 -1
- package/modern/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.d.ts +0 -10
- package/modern/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +0 -79
- package/modern/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +0 -35
- package/modern/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.js +0 -1
- package/modern/internals/hooks/useMobileRangePicker/index.d.ts +0 -2
- package/modern/internals/hooks/useMobileRangePicker/index.js +0 -1
- package/modern/internals/hooks/useMobileRangePicker/useMobileRangePicker.d.ts +0 -10
- package/modern/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +0 -117
- package/modern/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.d.ts +0 -31
- package/modern/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.js +0 -1
- package/modern/internals/hooks/useNullablePickerRangePositionContext.d.ts +0 -5
- package/modern/internals/hooks/useNullablePickerRangePositionContext.js +0 -10
- package/modern/internals/hooks/useRangePosition.d.ts +0 -24
- package/modern/internals/hooks/useRangePosition.js +0 -18
- package/modern/internals/hooks/useStaticRangePicker/index.d.ts +0 -2
- package/modern/internals/hooks/useStaticRangePicker/index.js +0 -1
- package/modern/internals/hooks/useStaticRangePicker/useStaticRangePicker.d.ts +0 -14
- package/modern/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +0 -71
- package/modern/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.d.ts +0 -30
- package/modern/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.js +0 -1
- package/modern/internals/models/dateRange.d.ts +0 -16
- package/modern/internals/models/dateRange.js +0 -1
- package/modern/internals/models/dateTimeRange.d.ts +0 -3
- package/modern/internals/models/dateTimeRange.js +0 -1
- package/modern/internals/models/fields.d.ts +0 -22
- package/modern/internals/models/fields.js +0 -1
- package/modern/internals/models/index.d.ts +0 -3
- package/modern/internals/models/index.js +0 -3
- package/modern/internals/models/managers.d.ts +0 -3
- package/modern/internals/models/managers.js +0 -1
- package/modern/internals/models/rangePickerProps.d.ts +0 -36
- package/modern/internals/models/rangePickerProps.js +0 -1
- package/modern/internals/utils/createMultiInputRangeField/createMultiInputRangeField.d.ts +0 -8
- package/modern/internals/utils/createMultiInputRangeField/createMultiInputRangeField.js +0 -133
- package/modern/internals/utils/createMultiInputRangeField/createMultiInputRangeField.types.d.ts +0 -73
- package/modern/internals/utils/createMultiInputRangeField/createMultiInputRangeField.types.js +0 -1
- package/modern/internals/utils/createMultiInputRangeField/index.d.ts +0 -3
- package/modern/internals/utils/createMultiInputRangeField/index.js +0 -2
- package/modern/internals/utils/createMultiInputRangeField/useTextFieldProps.d.ts +0 -14
- package/modern/internals/utils/createMultiInputRangeField/useTextFieldProps.js +0 -43
- package/modern/internals/utils/createRangePickerStepNavigation.d.ts +0 -16
- package/modern/internals/utils/createRangePickerStepNavigation.js +0 -31
- package/modern/internals/utils/date-fields-utils.d.ts +0 -23
- package/modern/internals/utils/date-fields-utils.js +0 -28
- package/modern/internals/utils/date-range-manager.d.ts +0 -32
- package/modern/internals/utils/date-range-manager.js +0 -61
- package/modern/internals/utils/date-utils.d.ts +0 -7
- package/modern/internals/utils/date-utils.js +0 -18
- package/modern/internals/utils/releaseInfo.d.ts +0 -1
- package/modern/internals/utils/releaseInfo.js +0 -13
- package/modern/internals/utils/valueManagers.d.ts +0 -10
- package/modern/internals/utils/valueManagers.js +0 -119
- package/modern/locales/index.d.ts +0 -1
- package/modern/locales/index.js +0 -1
- package/modern/managers/index.d.ts +0 -6
- package/modern/managers/index.js +0 -3
- package/modern/managers/useDateRangeManager.d.ts +0 -11
- package/modern/managers/useDateRangeManager.js +0 -40
- package/modern/managers/useDateTimeRangeManager.d.ts +0 -11
- package/modern/managers/useDateTimeRangeManager.js +0 -41
- package/modern/managers/useTimeRangeManager.d.ts +0 -11
- package/modern/managers/useTimeRangeManager.js +0 -45
- package/modern/models/fields.d.ts +0 -34
- package/modern/models/fields.js +0 -1
- package/modern/models/index.d.ts +0 -4
- package/modern/models/index.js +0 -4
- package/modern/models/range.d.ts +0 -2
- package/modern/models/range.js +0 -1
- package/modern/models/validation.d.ts +0 -6
- package/modern/models/validation.js +0 -1
- package/modern/package.json +0 -1
- package/modern/themeAugmentation/components.d.ts +0 -79
- package/modern/themeAugmentation/index.d.ts +0 -4
- package/modern/themeAugmentation/index.js +0 -1
- package/modern/themeAugmentation/overrides.d.ts +0 -27
- package/modern/themeAugmentation/props.d.ts +0 -54
- package/modern/validation/index.d.ts +0 -6
- package/modern/validation/index.js +0 -3
- package/modern/validation/validateDateRange.d.ts +0 -18
- package/modern/validation/validateDateRange.js +0 -59
- package/modern/validation/validateDateTimeRange.d.ts +0 -15
- package/modern/validation/validateDateTimeRange.js +0 -55
- package/modern/validation/validateTimeRange.d.ts +0 -17
- package/modern/validation/validateTimeRange.js +0 -48
- package/tsconfig.build.tsbuildinfo +0 -1
|
@@ -1,431 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["desktopModeMediaQuery"];
|
|
6
|
-
import * as React from 'react';
|
|
7
|
-
import PropTypes from 'prop-types';
|
|
8
|
-
import { refType } from '@mui/utils';
|
|
9
|
-
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
10
|
-
import { useThemeProps } from '@mui/material/styles';
|
|
11
|
-
import { DEFAULT_DESKTOP_MODE_MEDIA_QUERY } from '@mui/x-date-pickers/internals';
|
|
12
|
-
import { DesktopDateTimeRangePicker } from "../DesktopDateTimeRangePicker/index.js";
|
|
13
|
-
import { MobileDateTimeRangePicker } from "../MobileDateTimeRangePicker/index.js";
|
|
14
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
-
/**
|
|
16
|
-
* Demos:
|
|
17
|
-
*
|
|
18
|
-
* - [DateTimeRangePicker](https://mui.com/x/react-date-pickers/date-time-range-picker/)
|
|
19
|
-
* - [Validation](https://mui.com/x/react-date-pickers/validation/)
|
|
20
|
-
*
|
|
21
|
-
* API:
|
|
22
|
-
*
|
|
23
|
-
* - [DateTimeRangePicker API](https://mui.com/x/api/date-pickers/date-time-range-picker/)
|
|
24
|
-
*/
|
|
25
|
-
const DateTimeRangePicker = /*#__PURE__*/React.forwardRef(function DateTimeRangePicker(inProps, ref) {
|
|
26
|
-
const props = useThemeProps({
|
|
27
|
-
props: inProps,
|
|
28
|
-
name: 'MuiDateTimeRangePicker'
|
|
29
|
-
});
|
|
30
|
-
const {
|
|
31
|
-
desktopModeMediaQuery = DEFAULT_DESKTOP_MODE_MEDIA_QUERY
|
|
32
|
-
} = props,
|
|
33
|
-
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
34
|
-
|
|
35
|
-
// defaults to `true` in environments where `window.matchMedia` would not be available (i.e. test/jsdom)
|
|
36
|
-
const isDesktop = useMediaQuery(desktopModeMediaQuery, {
|
|
37
|
-
defaultMatches: true
|
|
38
|
-
});
|
|
39
|
-
if (isDesktop) {
|
|
40
|
-
return /*#__PURE__*/_jsx(DesktopDateTimeRangePicker, _extends({
|
|
41
|
-
ref: ref
|
|
42
|
-
}, other));
|
|
43
|
-
}
|
|
44
|
-
return /*#__PURE__*/_jsx(MobileDateTimeRangePicker, _extends({
|
|
45
|
-
ref: ref
|
|
46
|
-
}, other));
|
|
47
|
-
});
|
|
48
|
-
process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
|
|
49
|
-
// ----------------------------- Warning --------------------------------
|
|
50
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
51
|
-
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
52
|
-
// ----------------------------------------------------------------------
|
|
53
|
-
/**
|
|
54
|
-
* 12h/24h view for hour selection clock.
|
|
55
|
-
* @default utils.is12HourCycleInCurrentLocale()
|
|
56
|
-
*/
|
|
57
|
-
ampm: PropTypes.bool,
|
|
58
|
-
/**
|
|
59
|
-
* If `true`, the main element is focused during the first mount.
|
|
60
|
-
* This main element is:
|
|
61
|
-
* - the element chosen by the visible view if any (i.e: the selected day on the `day` view).
|
|
62
|
-
* - the `input` element if there is a field rendered.
|
|
63
|
-
*/
|
|
64
|
-
autoFocus: PropTypes.bool,
|
|
65
|
-
/**
|
|
66
|
-
* The number of calendars to render on **desktop**.
|
|
67
|
-
* @default 1
|
|
68
|
-
*/
|
|
69
|
-
calendars: PropTypes.oneOf([1, 2, 3]),
|
|
70
|
-
className: PropTypes.string,
|
|
71
|
-
/**
|
|
72
|
-
* If `true`, the Picker will close after submitting the full date.
|
|
73
|
-
* @default false
|
|
74
|
-
*/
|
|
75
|
-
closeOnSelect: PropTypes.bool,
|
|
76
|
-
/**
|
|
77
|
-
* Position the current month is rendered in.
|
|
78
|
-
* @default 1
|
|
79
|
-
*/
|
|
80
|
-
currentMonthCalendarPosition: PropTypes.oneOf([1, 2, 3]),
|
|
81
|
-
/**
|
|
82
|
-
* Formats the day of week displayed in the calendar header.
|
|
83
|
-
* @param {PickerValidDate} date The date of the day of week provided by the adapter.
|
|
84
|
-
* @returns {string} The name to display.
|
|
85
|
-
* @default (date: PickerValidDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
|
|
86
|
-
*/
|
|
87
|
-
dayOfWeekFormatter: PropTypes.func,
|
|
88
|
-
/**
|
|
89
|
-
* The initial position in the edited date range.
|
|
90
|
-
* Used when the component is not controlled.
|
|
91
|
-
* @default 'start'
|
|
92
|
-
*/
|
|
93
|
-
defaultRangePosition: PropTypes.oneOf(['end', 'start']),
|
|
94
|
-
/**
|
|
95
|
-
* The default value.
|
|
96
|
-
* Used when the component is not controlled.
|
|
97
|
-
*/
|
|
98
|
-
defaultValue: PropTypes.arrayOf(PropTypes.object),
|
|
99
|
-
/**
|
|
100
|
-
* CSS media query when `Mobile` mode will be changed to `Desktop`.
|
|
101
|
-
* @default '@media (pointer: fine)'
|
|
102
|
-
* @example '@media (min-width: 720px)' or theme.breakpoints.up("sm")
|
|
103
|
-
*/
|
|
104
|
-
desktopModeMediaQuery: PropTypes.string,
|
|
105
|
-
/**
|
|
106
|
-
* If `true`, after selecting `start` date calendar will not automatically switch to the month of `end` date.
|
|
107
|
-
* @default false
|
|
108
|
-
*/
|
|
109
|
-
disableAutoMonthSwitching: PropTypes.bool,
|
|
110
|
-
/**
|
|
111
|
-
* If `true`, the component is disabled.
|
|
112
|
-
* When disabled, the value cannot be changed and no interaction is possible.
|
|
113
|
-
* @default false
|
|
114
|
-
*/
|
|
115
|
-
disabled: PropTypes.bool,
|
|
116
|
-
/**
|
|
117
|
-
* If `true`, editing dates by dragging is disabled.
|
|
118
|
-
* @default false
|
|
119
|
-
*/
|
|
120
|
-
disableDragEditing: PropTypes.bool,
|
|
121
|
-
/**
|
|
122
|
-
* If `true`, disable values after the current date for date components, time for time components and both for date time components.
|
|
123
|
-
* @default false
|
|
124
|
-
*/
|
|
125
|
-
disableFuture: PropTypes.bool,
|
|
126
|
-
/**
|
|
127
|
-
* If `true`, today's date is rendering without highlighting with circle.
|
|
128
|
-
* @default false
|
|
129
|
-
*/
|
|
130
|
-
disableHighlightToday: PropTypes.bool,
|
|
131
|
-
/**
|
|
132
|
-
* Do not ignore date part when validating min/max time.
|
|
133
|
-
* @default false
|
|
134
|
-
*/
|
|
135
|
-
disableIgnoringDatePartForTimeValidation: PropTypes.bool,
|
|
136
|
-
/**
|
|
137
|
-
* If `true`, the button to open the Picker will not be rendered (it will only render the field).
|
|
138
|
-
* @deprecated Use the [field component](https://next.mui.com/x/react-date-pickers/fields/) instead.
|
|
139
|
-
* @default false
|
|
140
|
-
*/
|
|
141
|
-
disableOpenPicker: PropTypes.bool,
|
|
142
|
-
/**
|
|
143
|
-
* If `true`, disable values before the current date for date components, time for time components and both for date time components.
|
|
144
|
-
* @default false
|
|
145
|
-
*/
|
|
146
|
-
disablePast: PropTypes.bool,
|
|
147
|
-
/**
|
|
148
|
-
* If `true`, the week number will be display in the calendar.
|
|
149
|
-
*/
|
|
150
|
-
displayWeekNumber: PropTypes.bool,
|
|
151
|
-
/**
|
|
152
|
-
* @default true
|
|
153
|
-
*/
|
|
154
|
-
enableAccessibleFieldDOMStructure: PropTypes.any,
|
|
155
|
-
/**
|
|
156
|
-
* The day view will show as many weeks as needed after the end of the current month to match this value.
|
|
157
|
-
* Put it to 6 to have a fixed number of weeks in Gregorian calendars
|
|
158
|
-
*/
|
|
159
|
-
fixedWeekNumber: PropTypes.number,
|
|
160
|
-
/**
|
|
161
|
-
* Format of the date when rendered in the input(s).
|
|
162
|
-
* Defaults to localized format based on the used `views`.
|
|
163
|
-
*/
|
|
164
|
-
format: PropTypes.string,
|
|
165
|
-
/**
|
|
166
|
-
* Density of the format when rendered in the input.
|
|
167
|
-
* Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
|
|
168
|
-
* @default "dense"
|
|
169
|
-
*/
|
|
170
|
-
formatDensity: PropTypes.oneOf(['dense', 'spacious']),
|
|
171
|
-
/**
|
|
172
|
-
* Pass a ref to the `input` element.
|
|
173
|
-
*/
|
|
174
|
-
inputRef: refType,
|
|
175
|
-
/**
|
|
176
|
-
* The label content.
|
|
177
|
-
*/
|
|
178
|
-
label: PropTypes.node,
|
|
179
|
-
/**
|
|
180
|
-
* If `true`, calls `renderLoading` instead of rendering the day calendar.
|
|
181
|
-
* Can be used to preload information and show it in calendar.
|
|
182
|
-
* @default false
|
|
183
|
-
*/
|
|
184
|
-
loading: PropTypes.bool,
|
|
185
|
-
/**
|
|
186
|
-
* Locale for components texts.
|
|
187
|
-
* Allows overriding texts coming from `LocalizationProvider` and `theme`.
|
|
188
|
-
*/
|
|
189
|
-
localeText: PropTypes.object,
|
|
190
|
-
/**
|
|
191
|
-
* Maximal selectable date.
|
|
192
|
-
* @default 2099-12-31
|
|
193
|
-
*/
|
|
194
|
-
maxDate: PropTypes.object,
|
|
195
|
-
/**
|
|
196
|
-
* Maximal selectable moment of time with binding to date, to set max time in each day use `maxTime`.
|
|
197
|
-
*/
|
|
198
|
-
maxDateTime: PropTypes.object,
|
|
199
|
-
/**
|
|
200
|
-
* Maximal selectable time.
|
|
201
|
-
* The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
|
|
202
|
-
*/
|
|
203
|
-
maxTime: PropTypes.object,
|
|
204
|
-
/**
|
|
205
|
-
* Minimal selectable date.
|
|
206
|
-
* @default 1900-01-01
|
|
207
|
-
*/
|
|
208
|
-
minDate: PropTypes.object,
|
|
209
|
-
/**
|
|
210
|
-
* Minimal selectable moment of time with binding to date, to set min time in each day use `minTime`.
|
|
211
|
-
*/
|
|
212
|
-
minDateTime: PropTypes.object,
|
|
213
|
-
/**
|
|
214
|
-
* Minimal selectable time.
|
|
215
|
-
* The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
|
|
216
|
-
*/
|
|
217
|
-
minTime: PropTypes.object,
|
|
218
|
-
/**
|
|
219
|
-
* Step over minutes.
|
|
220
|
-
* @default 1
|
|
221
|
-
*/
|
|
222
|
-
minutesStep: PropTypes.number,
|
|
223
|
-
/**
|
|
224
|
-
* Name attribute used by the `input` element in the Field.
|
|
225
|
-
*/
|
|
226
|
-
name: PropTypes.string,
|
|
227
|
-
/**
|
|
228
|
-
* Callback fired when the value is accepted.
|
|
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
|
-
* @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.
|
|
231
|
-
* @param {TValue} value The value that was just accepted.
|
|
232
|
-
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
233
|
-
*/
|
|
234
|
-
onAccept: PropTypes.func,
|
|
235
|
-
/**
|
|
236
|
-
* Callback fired when the value changes.
|
|
237
|
-
* @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.
|
|
238
|
-
* @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.
|
|
239
|
-
* @param {TValue} value The new value.
|
|
240
|
-
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
241
|
-
*/
|
|
242
|
-
onChange: PropTypes.func,
|
|
243
|
-
/**
|
|
244
|
-
* Callback fired when the popup requests to be closed.
|
|
245
|
-
* Use in controlled mode (see `open`).
|
|
246
|
-
*/
|
|
247
|
-
onClose: PropTypes.func,
|
|
248
|
-
/**
|
|
249
|
-
* Callback fired when the error associated with the current value changes.
|
|
250
|
-
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
251
|
-
* This can be used to render an appropriate form error.
|
|
252
|
-
* @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.
|
|
253
|
-
* @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.
|
|
254
|
-
* @param {TError} error The reason why the current value is not valid.
|
|
255
|
-
* @param {TValue} value The value associated with the error.
|
|
256
|
-
*/
|
|
257
|
-
onError: PropTypes.func,
|
|
258
|
-
/**
|
|
259
|
-
* Callback fired on month change.
|
|
260
|
-
* @param {PickerValidDate} month The new month.
|
|
261
|
-
*/
|
|
262
|
-
onMonthChange: PropTypes.func,
|
|
263
|
-
/**
|
|
264
|
-
* Callback fired when the popup requests to be opened.
|
|
265
|
-
* Use in controlled mode (see `open`).
|
|
266
|
-
*/
|
|
267
|
-
onOpen: PropTypes.func,
|
|
268
|
-
/**
|
|
269
|
-
* Callback fired when the range position changes.
|
|
270
|
-
* @param {RangePosition} rangePosition The new range position.
|
|
271
|
-
*/
|
|
272
|
-
onRangePositionChange: PropTypes.func,
|
|
273
|
-
/**
|
|
274
|
-
* Callback fired when the selected sections change.
|
|
275
|
-
* @param {FieldSelectedSections} newValue The new selected sections.
|
|
276
|
-
*/
|
|
277
|
-
onSelectedSectionsChange: PropTypes.func,
|
|
278
|
-
/**
|
|
279
|
-
* Callback fired on view change.
|
|
280
|
-
* @template TView
|
|
281
|
-
* @param {TView} view The new view.
|
|
282
|
-
*/
|
|
283
|
-
onViewChange: PropTypes.func,
|
|
284
|
-
/**
|
|
285
|
-
* Control the popup or dialog open state.
|
|
286
|
-
* @default false
|
|
287
|
-
*/
|
|
288
|
-
open: PropTypes.bool,
|
|
289
|
-
/**
|
|
290
|
-
* The default visible view.
|
|
291
|
-
* Used when the component view is not controlled.
|
|
292
|
-
* Must be a valid option from `views` list.
|
|
293
|
-
*/
|
|
294
|
-
openTo: PropTypes.oneOf(['day', 'hours', 'minutes', 'seconds']),
|
|
295
|
-
/**
|
|
296
|
-
* The position in the currently edited date range.
|
|
297
|
-
* Used when the component position is controlled.
|
|
298
|
-
*/
|
|
299
|
-
rangePosition: PropTypes.oneOf(['end', 'start']),
|
|
300
|
-
/**
|
|
301
|
-
* If `true`, the component is read-only.
|
|
302
|
-
* When read-only, the value cannot be changed but the user can interact with the interface.
|
|
303
|
-
* @default false
|
|
304
|
-
*/
|
|
305
|
-
readOnly: PropTypes.bool,
|
|
306
|
-
/**
|
|
307
|
-
* If `true`, disable heavy animations.
|
|
308
|
-
* @default `@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13
|
|
309
|
-
*/
|
|
310
|
-
reduceAnimations: PropTypes.bool,
|
|
311
|
-
/**
|
|
312
|
-
* The date used to generate the new value when both `value` and `defaultValue` are empty.
|
|
313
|
-
* @default The closest valid date-time using the validation props, except callbacks like `shouldDisable<...>`.
|
|
314
|
-
*/
|
|
315
|
-
referenceDate: PropTypes.object,
|
|
316
|
-
/**
|
|
317
|
-
* Component rendered on the "day" view when `props.loading` is true.
|
|
318
|
-
* @returns {React.ReactNode} The node to render when loading.
|
|
319
|
-
* @default () => "..."
|
|
320
|
-
*/
|
|
321
|
-
renderLoading: PropTypes.func,
|
|
322
|
-
/**
|
|
323
|
-
* The currently selected sections.
|
|
324
|
-
* This prop accepts four formats:
|
|
325
|
-
* 1. If a number is provided, the section at this index will be selected.
|
|
326
|
-
* 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
|
|
327
|
-
* 3. If `"all"` is provided, all the sections will be selected.
|
|
328
|
-
* 4. If `null` is provided, no section will be selected.
|
|
329
|
-
* If not provided, the selected sections will be handled internally.
|
|
330
|
-
*/
|
|
331
|
-
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number]),
|
|
332
|
-
/**
|
|
333
|
-
* Disable specific date.
|
|
334
|
-
*
|
|
335
|
-
* Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.
|
|
336
|
-
*
|
|
337
|
-
* @param {PickerValidDate} day The date to test.
|
|
338
|
-
* @param {string} position The date to test, 'start' or 'end'.
|
|
339
|
-
* @returns {boolean} Returns `true` if the date should be disabled.
|
|
340
|
-
*/
|
|
341
|
-
shouldDisableDate: PropTypes.func,
|
|
342
|
-
/**
|
|
343
|
-
* Disable specific time.
|
|
344
|
-
* @param {PickerValidDate} value The value to check.
|
|
345
|
-
* @param {TimeView} view The clock type of the timeValue.
|
|
346
|
-
* @returns {boolean} If `true` the time will be disabled.
|
|
347
|
-
*/
|
|
348
|
-
shouldDisableTime: PropTypes.func,
|
|
349
|
-
/**
|
|
350
|
-
* If `true`, days outside the current month are rendered:
|
|
351
|
-
*
|
|
352
|
-
* - if `fixedWeekNumber` is defined, renders days to have the weeks requested.
|
|
353
|
-
*
|
|
354
|
-
* - if `fixedWeekNumber` is not defined, renders day to fill the first and last week of the current month.
|
|
355
|
-
*
|
|
356
|
-
* - ignored if `calendars` equals more than `1` on range pickers.
|
|
357
|
-
* @default false
|
|
358
|
-
*/
|
|
359
|
-
showDaysOutsideCurrentMonth: PropTypes.bool,
|
|
360
|
-
/**
|
|
361
|
-
* If `true`, disabled digital clock items will not be rendered.
|
|
362
|
-
* @default false
|
|
363
|
-
*/
|
|
364
|
-
skipDisabled: PropTypes.bool,
|
|
365
|
-
/**
|
|
366
|
-
* The props used for each component slot.
|
|
367
|
-
* @default {}
|
|
368
|
-
*/
|
|
369
|
-
slotProps: PropTypes.object,
|
|
370
|
-
/**
|
|
371
|
-
* Overridable component slots.
|
|
372
|
-
* @default {}
|
|
373
|
-
*/
|
|
374
|
-
slots: PropTypes.object,
|
|
375
|
-
/**
|
|
376
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
377
|
-
*/
|
|
378
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
379
|
-
/**
|
|
380
|
-
* Amount of time options below or at which the single column time renderer is used.
|
|
381
|
-
* @default 24
|
|
382
|
-
*/
|
|
383
|
-
thresholdToRenderTimeInASingleColumn: PropTypes.number,
|
|
384
|
-
/**
|
|
385
|
-
* The time steps between two time unit options.
|
|
386
|
-
* For example, if `timeStep.minutes = 8`, then the available minute options will be `[0, 8, 16, 24, 32, 40, 48, 56]`.
|
|
387
|
-
* When single column time renderer is used, only `timeStep.minutes` will be used.
|
|
388
|
-
* @default{ hours: 1, minutes: 5, seconds: 5 }
|
|
389
|
-
*/
|
|
390
|
-
timeSteps: PropTypes.shape({
|
|
391
|
-
hours: PropTypes.number,
|
|
392
|
-
minutes: PropTypes.number,
|
|
393
|
-
seconds: PropTypes.number
|
|
394
|
-
}),
|
|
395
|
-
/**
|
|
396
|
-
* Choose which timezone to use for the value.
|
|
397
|
-
* Example: "default", "system", "UTC", "America/New_York".
|
|
398
|
-
* If you pass values from other timezones to some props, they will be converted to this timezone before being used.
|
|
399
|
-
* @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
|
|
400
|
-
* @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
|
|
401
|
-
*/
|
|
402
|
-
timezone: PropTypes.string,
|
|
403
|
-
/**
|
|
404
|
-
* The selected value.
|
|
405
|
-
* Used when the component is controlled.
|
|
406
|
-
*/
|
|
407
|
-
value: PropTypes.arrayOf(PropTypes.object),
|
|
408
|
-
/**
|
|
409
|
-
* The visible view.
|
|
410
|
-
* Used when the component view is controlled.
|
|
411
|
-
* Must be a valid option from `views` list.
|
|
412
|
-
*/
|
|
413
|
-
view: PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'seconds']),
|
|
414
|
-
/**
|
|
415
|
-
* Define custom view renderers for each section.
|
|
416
|
-
* If `null`, the section will only have field editing.
|
|
417
|
-
* If `undefined`, internally defined view will be used.
|
|
418
|
-
*/
|
|
419
|
-
viewRenderers: PropTypes.shape({
|
|
420
|
-
day: PropTypes.func,
|
|
421
|
-
hours: PropTypes.func,
|
|
422
|
-
meridiem: PropTypes.func,
|
|
423
|
-
minutes: PropTypes.func,
|
|
424
|
-
seconds: PropTypes.func
|
|
425
|
-
}),
|
|
426
|
-
/**
|
|
427
|
-
* Available views.
|
|
428
|
-
*/
|
|
429
|
-
views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'hours', 'minutes', 'seconds']).isRequired)
|
|
430
|
-
} : void 0;
|
|
431
|
-
export { DateTimeRangePicker };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { BaseSingleInputFieldProps } from '@mui/x-date-pickers/internals';
|
|
2
|
-
import { DesktopDateTimeRangePickerProps, DesktopDateTimeRangePickerSlots, DesktopDateTimeRangePickerSlotProps } from "../DesktopDateTimeRangePicker/index.js";
|
|
3
|
-
import { MobileDateTimeRangePickerProps, MobileDateTimeRangePickerSlots, MobileDateTimeRangePickerSlotProps } from "../MobileDateTimeRangePicker/index.js";
|
|
4
|
-
import type { ValidateDateTimeRangeProps } from '../validation';
|
|
5
|
-
export interface DateTimeRangePickerSlots extends DesktopDateTimeRangePickerSlots, MobileDateTimeRangePickerSlots {}
|
|
6
|
-
export interface DateTimeRangePickerSlotProps<TEnableAccessibleFieldDOMStructure extends boolean> extends DesktopDateTimeRangePickerSlotProps<TEnableAccessibleFieldDOMStructure>, MobileDateTimeRangePickerSlotProps<TEnableAccessibleFieldDOMStructure> {}
|
|
7
|
-
export interface DateTimeRangePickerProps<TEnableAccessibleFieldDOMStructure extends boolean = true> extends DesktopDateTimeRangePickerProps<TEnableAccessibleFieldDOMStructure>, MobileDateTimeRangePickerProps<TEnableAccessibleFieldDOMStructure> {
|
|
8
|
-
/**
|
|
9
|
-
* CSS media query when `Mobile` mode will be changed to `Desktop`.
|
|
10
|
-
* @default '@media (pointer: fine)'
|
|
11
|
-
* @example '@media (min-width: 720px)' or theme.breakpoints.up("sm")
|
|
12
|
-
*/
|
|
13
|
-
desktopModeMediaQuery?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Overridable component slots.
|
|
16
|
-
* @default {}
|
|
17
|
-
*/
|
|
18
|
-
slots?: DateTimeRangePickerSlots;
|
|
19
|
-
/**
|
|
20
|
-
* The props used for each component slot.
|
|
21
|
-
* @default {}
|
|
22
|
-
*/
|
|
23
|
-
slotProps?: DateTimeRangePickerSlotProps<TEnableAccessibleFieldDOMStructure>;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Props the field can receive when used inside a Date Time Range Picker (<DateTimeRangePicker />, <DesktopDateTimeRangePicker /> or <MobileDateTimeRangePicker /> component).
|
|
27
|
-
*/
|
|
28
|
-
export type DateTimeRangePickerFieldProps = ValidateDateTimeRangeProps & BaseSingleInputFieldProps;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ExportedBaseTabsProps } from '@mui/x-date-pickers/internals';
|
|
3
|
-
import { DateTimeRangePickerTabsClasses } from "./dateTimeRangePickerTabsClasses.js";
|
|
4
|
-
export interface ExportedDateTimeRangePickerTabsProps extends ExportedBaseTabsProps {
|
|
5
|
-
/**
|
|
6
|
-
* Toggles visibility of the tabs allowing view switching.
|
|
7
|
-
* @default `window.innerHeight < 667` for `DesktopDateTimeRangePicker` and `MobileDateTimeRangePicker`
|
|
8
|
-
*/
|
|
9
|
-
hidden?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Date tab icon.
|
|
12
|
-
* @default DateRangeIcon
|
|
13
|
-
*/
|
|
14
|
-
dateIcon?: React.ReactElement<any>;
|
|
15
|
-
/**
|
|
16
|
-
* Time tab icon.
|
|
17
|
-
* @default TimeIcon
|
|
18
|
-
*/
|
|
19
|
-
timeIcon?: React.ReactElement<any>;
|
|
20
|
-
/**
|
|
21
|
-
* Override or extend the styles applied to the component.
|
|
22
|
-
*/
|
|
23
|
-
classes?: Partial<DateTimeRangePickerTabsClasses>;
|
|
24
|
-
}
|
|
25
|
-
export interface DateTimeRangePickerTabsProps extends ExportedDateTimeRangePickerTabsProps {}
|
|
26
|
-
declare const DateTimeRangePickerTabs: {
|
|
27
|
-
(inProps: DateTimeRangePickerTabsProps): React.JSX.Element | null;
|
|
28
|
-
propTypes: any;
|
|
29
|
-
};
|
|
30
|
-
export { DateTimeRangePickerTabs };
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import clsx from 'clsx';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
|
-
import { styled, useThemeProps } from '@mui/material/styles';
|
|
7
|
-
import composeClasses from '@mui/utils/composeClasses';
|
|
8
|
-
import useEventCallback from '@mui/utils/useEventCallback';
|
|
9
|
-
import { TimeIcon, DateRangeIcon, ArrowLeftIcon, ArrowRightIcon } from '@mui/x-date-pickers/icons';
|
|
10
|
-
import { isDatePickerView, usePickerPrivateContext } from '@mui/x-date-pickers/internals';
|
|
11
|
-
import { usePickerContext, usePickerTranslations } from '@mui/x-date-pickers/hooks';
|
|
12
|
-
import IconButton from '@mui/material/IconButton';
|
|
13
|
-
import Button from '@mui/material/Button';
|
|
14
|
-
import { getDateTimeRangePickerTabsUtilityClass } from "./dateTimeRangePickerTabsClasses.js";
|
|
15
|
-
import { usePickerRangePositionContext } from "../hooks/index.js";
|
|
16
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
-
const viewToTab = (view, rangePosition) => {
|
|
18
|
-
if (isDatePickerView(view)) {
|
|
19
|
-
return rangePosition === 'start' ? 'start-date' : 'end-date';
|
|
20
|
-
}
|
|
21
|
-
return rangePosition === 'start' ? 'start-time' : 'end-time';
|
|
22
|
-
};
|
|
23
|
-
const tabToView = tab => {
|
|
24
|
-
if (tab === 'start-date' || tab === 'end-date') {
|
|
25
|
-
return 'day';
|
|
26
|
-
}
|
|
27
|
-
return 'hours';
|
|
28
|
-
};
|
|
29
|
-
const useUtilityClasses = classes => {
|
|
30
|
-
const slots = {
|
|
31
|
-
root: ['root'],
|
|
32
|
-
tabButton: ['tabButton'],
|
|
33
|
-
navigationButton: ['navigationButton'],
|
|
34
|
-
filler: ['filler']
|
|
35
|
-
};
|
|
36
|
-
return composeClasses(slots, getDateTimeRangePickerTabsUtilityClass, classes);
|
|
37
|
-
};
|
|
38
|
-
const DateTimeRangePickerTabsRoot = styled('div', {
|
|
39
|
-
name: 'MuiDateTimeRangePickerTabs',
|
|
40
|
-
slot: 'Root',
|
|
41
|
-
overridesResolver: (_, styles) => styles.root
|
|
42
|
-
})(({
|
|
43
|
-
theme
|
|
44
|
-
}) => ({
|
|
45
|
-
display: 'flex',
|
|
46
|
-
justifyContent: 'space-between',
|
|
47
|
-
alignItems: 'center',
|
|
48
|
-
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
49
|
-
minHeight: 48
|
|
50
|
-
}));
|
|
51
|
-
const DateTimeRangePickerTab = styled(Button, {
|
|
52
|
-
name: 'MuiDateTimeRangePickerTabs',
|
|
53
|
-
slot: 'TabButton',
|
|
54
|
-
overridesResolver: (_, styles) => styles.tabButton
|
|
55
|
-
})({
|
|
56
|
-
textTransform: 'none'
|
|
57
|
-
});
|
|
58
|
-
const DateTimeRangePickerTabFiller = styled('div', {
|
|
59
|
-
name: 'MuiDateTimeRangePickerTabs',
|
|
60
|
-
slot: 'Filler',
|
|
61
|
-
overridesResolver: (_, styles) => styles.filler
|
|
62
|
-
})({
|
|
63
|
-
width: 40
|
|
64
|
-
});
|
|
65
|
-
const tabOptions = ['start-date', 'start-time', 'end-date', 'end-time'];
|
|
66
|
-
const DateTimeRangePickerTabs = function DateTimeRangePickerTabs(inProps) {
|
|
67
|
-
const props = useThemeProps({
|
|
68
|
-
props: inProps,
|
|
69
|
-
name: 'MuiDateTimeRangePickerTabs'
|
|
70
|
-
});
|
|
71
|
-
const {
|
|
72
|
-
dateIcon = /*#__PURE__*/_jsx(DateRangeIcon, {}),
|
|
73
|
-
timeIcon = /*#__PURE__*/_jsx(TimeIcon, {}),
|
|
74
|
-
hidden = typeof window === 'undefined' || window.innerHeight < 667,
|
|
75
|
-
className,
|
|
76
|
-
classes: classesProp,
|
|
77
|
-
sx
|
|
78
|
-
} = props;
|
|
79
|
-
const translations = usePickerTranslations();
|
|
80
|
-
const {
|
|
81
|
-
ownerState
|
|
82
|
-
} = usePickerPrivateContext();
|
|
83
|
-
const {
|
|
84
|
-
view,
|
|
85
|
-
setView
|
|
86
|
-
} = usePickerContext();
|
|
87
|
-
const classes = useUtilityClasses(classesProp);
|
|
88
|
-
const {
|
|
89
|
-
rangePosition,
|
|
90
|
-
setRangePosition
|
|
91
|
-
} = usePickerRangePositionContext();
|
|
92
|
-
const value = React.useMemo(() => view == null ? null : viewToTab(view, rangePosition), [view, rangePosition]);
|
|
93
|
-
const isPreviousHidden = value === 'start-date';
|
|
94
|
-
const isNextHidden = value === 'end-time';
|
|
95
|
-
const tabLabel = React.useMemo(() => {
|
|
96
|
-
switch (value) {
|
|
97
|
-
case 'start-date':
|
|
98
|
-
return translations.startDate;
|
|
99
|
-
case 'start-time':
|
|
100
|
-
return translations.startTime;
|
|
101
|
-
case 'end-date':
|
|
102
|
-
return translations.endDate;
|
|
103
|
-
case 'end-time':
|
|
104
|
-
return translations.endTime;
|
|
105
|
-
default:
|
|
106
|
-
return '';
|
|
107
|
-
}
|
|
108
|
-
}, [translations.endDate, translations.endTime, translations.startDate, translations.startTime, value]);
|
|
109
|
-
const handleRangePositionChange = useEventCallback(newTab => {
|
|
110
|
-
if (newTab.includes('start')) {
|
|
111
|
-
setRangePosition('start');
|
|
112
|
-
} else {
|
|
113
|
-
setRangePosition('end');
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
const changeToPreviousTab = useEventCallback(() => {
|
|
117
|
-
const previousTab = value == null ? tabOptions[0] : tabOptions[tabOptions.indexOf(value) - 1];
|
|
118
|
-
setView(tabToView(previousTab));
|
|
119
|
-
handleRangePositionChange(previousTab);
|
|
120
|
-
});
|
|
121
|
-
const changeToNextTab = useEventCallback(() => {
|
|
122
|
-
const nextTab = value == null ? tabOptions[0] : tabOptions[tabOptions.indexOf(value) + 1];
|
|
123
|
-
setView(tabToView(nextTab));
|
|
124
|
-
handleRangePositionChange(nextTab);
|
|
125
|
-
});
|
|
126
|
-
if (hidden) {
|
|
127
|
-
return null;
|
|
128
|
-
}
|
|
129
|
-
let startIcon;
|
|
130
|
-
if (view == null) {
|
|
131
|
-
startIcon = null;
|
|
132
|
-
} else if (isDatePickerView(view)) {
|
|
133
|
-
startIcon = dateIcon;
|
|
134
|
-
} else {
|
|
135
|
-
startIcon = timeIcon;
|
|
136
|
-
}
|
|
137
|
-
return /*#__PURE__*/_jsxs(DateTimeRangePickerTabsRoot, {
|
|
138
|
-
ownerState: ownerState,
|
|
139
|
-
className: clsx(classes.root, className),
|
|
140
|
-
sx: sx,
|
|
141
|
-
children: [!isPreviousHidden ? /*#__PURE__*/_jsx(IconButton, {
|
|
142
|
-
onClick: changeToPreviousTab,
|
|
143
|
-
className: classes.navigationButton,
|
|
144
|
-
title: translations.openPreviousView,
|
|
145
|
-
children: /*#__PURE__*/_jsx(ArrowLeftIcon, {})
|
|
146
|
-
}) : /*#__PURE__*/_jsx(DateTimeRangePickerTabFiller, {
|
|
147
|
-
className: classes.filler
|
|
148
|
-
}), /*#__PURE__*/_jsx(DateTimeRangePickerTab, {
|
|
149
|
-
startIcon: startIcon,
|
|
150
|
-
className: classes.tabButton,
|
|
151
|
-
size: "large",
|
|
152
|
-
children: tabLabel
|
|
153
|
-
}), !isNextHidden ? /*#__PURE__*/_jsx(IconButton, {
|
|
154
|
-
onClick: changeToNextTab,
|
|
155
|
-
className: classes.navigationButton,
|
|
156
|
-
title: translations.openNextView,
|
|
157
|
-
children: /*#__PURE__*/_jsx(ArrowRightIcon, {})
|
|
158
|
-
}) : /*#__PURE__*/_jsx(DateTimeRangePickerTabFiller, {
|
|
159
|
-
className: classes.filler
|
|
160
|
-
})]
|
|
161
|
-
});
|
|
162
|
-
};
|
|
163
|
-
process.env.NODE_ENV !== "production" ? DateTimeRangePickerTabs.propTypes = {
|
|
164
|
-
// ----------------------------- Warning --------------------------------
|
|
165
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
166
|
-
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
167
|
-
// ----------------------------------------------------------------------
|
|
168
|
-
/**
|
|
169
|
-
* Override or extend the styles applied to the component.
|
|
170
|
-
*/
|
|
171
|
-
classes: PropTypes.object,
|
|
172
|
-
className: PropTypes.string,
|
|
173
|
-
/**
|
|
174
|
-
* Date tab icon.
|
|
175
|
-
* @default DateRangeIcon
|
|
176
|
-
*/
|
|
177
|
-
dateIcon: PropTypes.element,
|
|
178
|
-
/**
|
|
179
|
-
* Toggles visibility of the tabs allowing view switching.
|
|
180
|
-
* @default `window.innerHeight < 667` for `DesktopDateTimeRangePicker` and `MobileDateTimeRangePicker`
|
|
181
|
-
*/
|
|
182
|
-
hidden: PropTypes.bool,
|
|
183
|
-
/**
|
|
184
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
185
|
-
*/
|
|
186
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
187
|
-
/**
|
|
188
|
-
* Time tab icon.
|
|
189
|
-
* @default TimeIcon
|
|
190
|
-
*/
|
|
191
|
-
timeIcon: PropTypes.element
|
|
192
|
-
} : void 0;
|
|
193
|
-
export { DateTimeRangePickerTabs };
|