@pisell/date-picker 1.0.143 → 1.0.144
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/README.md +2 -2
- package/es/ActionBar/index.d.ts +19 -20
- package/es/ActionBar/index.less +70 -70
- package/es/AdapterDateFns/index.d.ts +1 -1
- package/es/AdapterDateFnsJalali/index.d.ts +1 -1
- package/es/AdapterDayjs/index.d.ts +1 -1
- package/es/AdapterLuxon/index.d.ts +1 -1
- package/es/AdapterMoment/index.d.ts +1 -1
- package/es/AdapterMomentHijri/index.d.ts +1 -1
- package/es/AdapterMomentJalaali/index.d.ts +1 -1
- package/es/CustomCalendarHeader/index.d.ts +2 -3
- package/es/DatePickerLocales/index.d.ts +1 -1
- package/es/DateRangeCalendar/DateRangeCalendar.d.ts +7 -7
- package/es/DateRangeCalendar/DateRangeCalendar.js +122 -122
- package/es/DateRangeCalendar/DateRangeCalendar.types.d.ts +123 -123
- package/es/DateRangeCalendar/dateRangeCalendarClasses.d.ts +11 -11
- package/es/DateRangeCalendar/index.d.ts +4 -4
- package/es/DateRangeCalendar/useDragRange.d.ts +33 -33
- package/es/DateRangePicker/DateRangePicker.d.ts +7 -7
- package/es/DateRangePicker/DateRangePicker.js +184 -184
- package/es/DateRangePicker/DateRangePicker.types.d.ts +37 -37
- package/es/DateRangePicker/DateRangePickerToolbar.d.ts +12 -12
- package/es/DateRangePicker/DateRangePickerToolbar.js +10 -10
- package/es/DateRangePicker/dateRangePickerToolbarClasses.d.ts +9 -9
- package/es/DateRangePicker/index.d.ts +6 -6
- package/es/DateRangePicker/shared.d.ts +51 -51
- package/es/DateRangePickerDay/DateRangePickerDay.d.ts +50 -50
- package/es/DateRangePickerDay/DateRangePickerDay.js +96 -96
- package/es/DateRangePickerDay/dateRangePickerDayClasses.d.ts +41 -41
- package/es/DateRangePickerDay/index.d.ts +4 -4
- package/es/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +7 -7
- package/es/DesktopDateRangePicker/DesktopDateRangePicker.js +180 -180
- package/es/DesktopDateRangePicker/DesktopDateRangePicker.types.d.ts +36 -36
- package/es/DesktopDateRangePicker/index.d.ts +2 -2
- package/es/Dialog/index.d.ts +2 -3
- package/es/Drawer/index.d.ts +11 -11
- package/es/Drawer/index.less +39 -39
- package/es/MobileDateRangePicker/MobileDateRangePicker.d.ts +7 -7
- package/es/MobileDateRangePicker/MobileDateRangePicker.js +180 -180
- package/es/MobileDateRangePicker/MobileDateRangePicker.types.d.ts +36 -36
- package/es/MobileDateRangePicker/index.d.ts +2 -2
- package/es/MultiInputDateRangeField/MultiInputDateRangeField.d.ts +7 -7
- package/es/MultiInputDateRangeField/MultiInputDateRangeField.js +113 -113
- package/es/MultiInputDateRangeField/MultiInputDateRangeField.types.d.ts +69 -69
- package/es/MultiInputDateRangeField/index.d.ts +3 -3
- package/es/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.d.ts +7 -7
- package/es/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +144 -144
- package/es/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.d.ts +70 -70
- package/es/MultiInputDateTimeRangeField/index.d.ts +3 -3
- package/es/MultiInputTimeRangeField/MultiInputTimeRangeField.d.ts +7 -7
- package/es/MultiInputTimeRangeField/MultiInputTimeRangeField.js +130 -130
- package/es/MultiInputTimeRangeField/MultiInputTimeRangeField.types.d.ts +70 -70
- package/es/MultiInputTimeRangeField/index.d.ts +3 -3
- package/es/OldActionBar/index.d.ts +18 -19
- package/es/OldActionBar/index.less +17 -17
- package/es/OldPisellDateRangePicker/index.d.ts +79 -79
- package/es/OldPisellDateRangePicker/index.less +102 -102
- package/es/PisellDateRangePicker/LocaleContext.d.ts +7 -7
- package/es/PisellDateRangePicker/index.d.ts +83 -83
- package/es/PisellDateRangePicker/index.less +183 -183
- package/es/PisellDateRangePicker/useCssVariables.d.ts +8 -8
- package/es/Shortcuts/index.d.ts +15 -16
- package/es/Shortcuts/index.less +17 -17
- package/es/SingleInputDateRangeField/SingleInputDateRangeField.d.ts +8 -8
- package/es/SingleInputDateRangeField/SingleInputDateRangeField.js +152 -152
- package/es/SingleInputDateRangeField/SingleInputDateRangeField.types.d.ts +49 -49
- package/es/SingleInputDateRangeField/index.d.ts +3 -3
- package/es/SingleInputDateRangeField/useSingleInputDateRangeField.d.ts +3 -3
- package/es/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.d.ts +8 -8
- package/es/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +183 -183
- package/es/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.d.ts +50 -50
- package/es/SingleInputDateTimeRangeField/index.d.ts +3 -3
- package/es/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.d.ts +3 -3
- package/es/SingleInputTimeRangeField/SingleInputTimeRangeField.d.ts +8 -8
- package/es/SingleInputTimeRangeField/SingleInputTimeRangeField.js +169 -169
- package/es/SingleInputTimeRangeField/SingleInputTimeRangeField.types.d.ts +50 -50
- package/es/SingleInputTimeRangeField/index.d.ts +3 -3
- package/es/SingleInputTimeRangeField/useSingleInputTimeRangeField.d.ts +3 -3
- package/es/StaticDateRangePicker/StaticDateRangePicker.d.ts +7 -7
- package/es/StaticDateRangePicker/StaticDateRangePicker.js +148 -148
- package/es/StaticDateRangePicker/StaticDateRangePicker.types.d.ts +31 -31
- package/es/StaticDateRangePicker/index.d.ts +2 -2
- package/es/Toolbar/index.d.ts +3 -4
- package/es/Toolbar/index.less +34 -34
- package/es/browserSelect/index.d.ts +15 -15
- package/es/browserSelect/index.js +7 -7
- package/es/browserSelect/index.less +17 -17
- package/es/constants.d.ts +58 -58
- package/es/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +12 -13
- package/es/dateRangeViewRenderers/dateRangeViewRenderers.js +3 -3
- package/es/dateRangeViewRenderers/index.d.ts +2 -2
- package/es/hooks/useDocumentVisibility.d.ts +2 -2
- package/es/hooks/useNextDay.d.ts +2 -2
- package/es/hooks/useUpdateEffect.d.ts +2 -2
- package/es/icon/ChevronLeft.d.ts +5 -6
- package/es/icon/ChevronLeftDouble.d.ts +5 -6
- package/es/icon/ChevronRight.d.ts +5 -6
- package/es/icon/ChevronRightDouble.d.ts +5 -6
- package/es/icon/CloseCircle.d.ts +5 -6
- package/es/index.d.ts +26 -26
- package/es/internals/hooks/useDesktopRangePicker/index.d.ts +2 -2
- package/es/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.d.ts +5 -6
- package/es/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +34 -34
- package/es/internals/hooks/useEnrichedRangePickerFieldProps.d.ts +54 -54
- package/es/internals/hooks/useMobileRangePicker/index.d.ts +2 -2
- package/es/internals/hooks/useMobileRangePicker/useMobileRangePicker.d.ts +5 -6
- package/es/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.d.ts +30 -30
- package/es/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.d.ts +3 -3
- package/es/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.d.ts +4 -4
- package/es/internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types.d.ts +17 -17
- package/es/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.d.ts +4 -4
- package/es/internals/hooks/useRangePosition.d.ts +28 -28
- package/es/internals/hooks/useStaticRangePicker/index.d.ts +2 -2
- package/es/internals/hooks/useStaticRangePicker/useStaticRangePicker.d.ts +9 -10
- package/es/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +3 -3
- package/es/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.d.ts +33 -33
- package/es/internals/models/dateRange.d.ts +30 -30
- package/es/internals/models/dateTimeRange.d.ts +13 -13
- package/es/internals/models/fields.d.ts +43 -43
- package/es/internals/models/index.d.ts +6 -6
- package/es/internals/models/range.d.ts +3 -3
- package/es/internals/models/rangePickerProps.d.ts +17 -17
- package/es/internals/models/timeRange.d.ts +13 -13
- package/es/internals/utils/date-fields-utils.d.ts +25 -25
- package/es/internals/utils/date-range-manager.d.ts +21 -21
- package/es/internals/utils/date-utils.d.ts +6 -6
- package/es/internals/utils/releaseInfo.d.ts +1 -1
- package/es/internals/utils/validation/validateDateRange.d.ts +7 -7
- package/es/internals/utils/validation/validateDateTimeRange.d.ts +8 -8
- package/es/internals/utils/validation/validateTimeRange.d.ts +7 -7
- package/es/internals/utils/valueManagers.d.ts +7 -7
- package/es/locales/en-US.d.ts +26 -26
- package/es/locales/index.d.ts +2 -2
- package/es/locales/ja.d.ts +26 -26
- package/es/locales/pt.d.ts +26 -26
- package/es/locales/zh-CN.d.ts +26 -26
- package/es/locales/zh-TW.d.ts +26 -26
- package/es/models/index.d.ts +1 -1
- package/es/models/validation.d.ts +9 -9
- package/es/themeAugmentation/components.d.ts +66 -66
- package/es/themeAugmentation/index.d.ts +3 -3
- package/es/themeAugmentation/overrides.d.ts +33 -33
- package/es/themeAugmentation/props.d.ts +42 -42
- package/es/typings.d.ts +4 -4
- package/es/utils/index.d.ts +42 -42
- package/es/utils/index.js +19 -19
- package/lib/ActionBar/index.d.ts +19 -20
- package/lib/ActionBar/index.less +70 -70
- package/lib/AdapterDateFns/index.d.ts +1 -1
- package/lib/AdapterDateFnsJalali/index.d.ts +1 -1
- package/lib/AdapterDayjs/index.d.ts +1 -1
- package/lib/AdapterLuxon/index.d.ts +1 -1
- package/lib/AdapterMoment/index.d.ts +1 -1
- package/lib/AdapterMomentHijri/index.d.ts +1 -1
- package/lib/AdapterMomentJalaali/index.d.ts +1 -1
- package/lib/CustomCalendarHeader/index.d.ts +2 -3
- package/lib/DatePickerLocales/index.d.ts +1 -1
- package/lib/DateRangeCalendar/DateRangeCalendar.d.ts +7 -7
- package/lib/DateRangeCalendar/DateRangeCalendar.types.d.ts +123 -123
- package/lib/DateRangeCalendar/dateRangeCalendarClasses.d.ts +11 -11
- package/lib/DateRangeCalendar/index.d.ts +4 -4
- package/lib/DateRangeCalendar/useDragRange.d.ts +33 -33
- package/lib/DateRangePicker/DateRangePicker.d.ts +7 -7
- package/lib/DateRangePicker/DateRangePicker.types.d.ts +37 -37
- package/lib/DateRangePicker/DateRangePickerToolbar.d.ts +12 -12
- package/lib/DateRangePicker/dateRangePickerToolbarClasses.d.ts +9 -9
- package/lib/DateRangePicker/index.d.ts +6 -6
- package/lib/DateRangePicker/shared.d.ts +51 -51
- package/lib/DateRangePickerDay/DateRangePickerDay.d.ts +50 -50
- package/lib/DateRangePickerDay/dateRangePickerDayClasses.d.ts +41 -41
- package/lib/DateRangePickerDay/index.d.ts +4 -4
- package/lib/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +7 -7
- package/lib/DesktopDateRangePicker/DesktopDateRangePicker.types.d.ts +36 -36
- package/lib/DesktopDateRangePicker/index.d.ts +2 -2
- package/lib/Dialog/index.d.ts +2 -3
- package/lib/Drawer/index.d.ts +11 -11
- package/lib/Drawer/index.less +39 -39
- package/lib/MobileDateRangePicker/MobileDateRangePicker.d.ts +7 -7
- package/lib/MobileDateRangePicker/MobileDateRangePicker.types.d.ts +36 -36
- package/lib/MobileDateRangePicker/index.d.ts +2 -2
- package/lib/MultiInputDateRangeField/MultiInputDateRangeField.d.ts +7 -7
- package/lib/MultiInputDateRangeField/MultiInputDateRangeField.types.d.ts +69 -69
- package/lib/MultiInputDateRangeField/index.d.ts +3 -3
- package/lib/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.d.ts +7 -7
- package/lib/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.d.ts +70 -70
- package/lib/MultiInputDateTimeRangeField/index.d.ts +3 -3
- package/lib/MultiInputTimeRangeField/MultiInputTimeRangeField.d.ts +7 -7
- package/lib/MultiInputTimeRangeField/MultiInputTimeRangeField.types.d.ts +70 -70
- package/lib/MultiInputTimeRangeField/index.d.ts +3 -3
- package/lib/OldActionBar/index.d.ts +18 -19
- package/lib/OldActionBar/index.less +17 -17
- package/lib/OldPisellDateRangePicker/index.d.ts +79 -79
- package/lib/OldPisellDateRangePicker/index.less +102 -102
- package/lib/PisellDateRangePicker/LocaleContext.d.ts +7 -7
- package/lib/PisellDateRangePicker/index.d.ts +83 -83
- package/lib/PisellDateRangePicker/index.less +183 -183
- package/lib/PisellDateRangePicker/useCssVariables.d.ts +8 -8
- package/lib/Shortcuts/index.d.ts +15 -16
- package/lib/Shortcuts/index.less +17 -17
- package/lib/SingleInputDateRangeField/SingleInputDateRangeField.d.ts +8 -8
- package/lib/SingleInputDateRangeField/SingleInputDateRangeField.types.d.ts +49 -49
- package/lib/SingleInputDateRangeField/index.d.ts +3 -3
- package/lib/SingleInputDateRangeField/useSingleInputDateRangeField.d.ts +3 -3
- package/lib/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.d.ts +8 -8
- package/lib/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.d.ts +50 -50
- package/lib/SingleInputDateTimeRangeField/index.d.ts +3 -3
- package/lib/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.d.ts +3 -3
- package/lib/SingleInputTimeRangeField/SingleInputTimeRangeField.d.ts +8 -8
- package/lib/SingleInputTimeRangeField/SingleInputTimeRangeField.types.d.ts +50 -50
- package/lib/SingleInputTimeRangeField/index.d.ts +3 -3
- package/lib/SingleInputTimeRangeField/useSingleInputTimeRangeField.d.ts +3 -3
- package/lib/StaticDateRangePicker/StaticDateRangePicker.d.ts +7 -7
- package/lib/StaticDateRangePicker/StaticDateRangePicker.types.d.ts +31 -31
- package/lib/StaticDateRangePicker/index.d.ts +2 -2
- package/lib/Toolbar/index.d.ts +3 -4
- package/lib/Toolbar/index.less +34 -34
- package/lib/browserSelect/index.d.ts +15 -15
- package/lib/browserSelect/index.less +17 -17
- package/lib/constants.d.ts +58 -58
- package/lib/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +12 -13
- package/lib/dateRangeViewRenderers/index.d.ts +2 -2
- package/lib/hooks/useDocumentVisibility.d.ts +2 -2
- package/lib/hooks/useNextDay.d.ts +2 -2
- package/lib/hooks/useUpdateEffect.d.ts +2 -2
- package/lib/icon/ChevronLeft.d.ts +5 -6
- package/lib/icon/ChevronLeftDouble.d.ts +5 -6
- package/lib/icon/ChevronRight.d.ts +5 -6
- package/lib/icon/ChevronRightDouble.d.ts +5 -6
- package/lib/icon/CloseCircle.d.ts +5 -6
- package/lib/index.d.ts +26 -26
- package/lib/internals/hooks/useDesktopRangePicker/index.d.ts +2 -2
- package/lib/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.d.ts +5 -6
- package/lib/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +34 -34
- package/lib/internals/hooks/useEnrichedRangePickerFieldProps.d.ts +54 -54
- package/lib/internals/hooks/useMobileRangePicker/index.d.ts +2 -2
- package/lib/internals/hooks/useMobileRangePicker/useMobileRangePicker.d.ts +5 -6
- package/lib/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.d.ts +30 -30
- package/lib/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.d.ts +3 -3
- package/lib/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.d.ts +4 -4
- package/lib/internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types.d.ts +17 -17
- package/lib/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.d.ts +4 -4
- package/lib/internals/hooks/useRangePosition.d.ts +28 -28
- package/lib/internals/hooks/useStaticRangePicker/index.d.ts +2 -2
- package/lib/internals/hooks/useStaticRangePicker/useStaticRangePicker.d.ts +9 -10
- package/lib/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.d.ts +33 -33
- package/lib/internals/models/dateRange.d.ts +30 -30
- package/lib/internals/models/dateTimeRange.d.ts +13 -13
- package/lib/internals/models/fields.d.ts +43 -43
- package/lib/internals/models/index.d.ts +6 -6
- package/lib/internals/models/range.d.ts +3 -3
- package/lib/internals/models/rangePickerProps.d.ts +17 -17
- package/lib/internals/models/timeRange.d.ts +13 -13
- package/lib/internals/utils/date-fields-utils.d.ts +25 -25
- package/lib/internals/utils/date-range-manager.d.ts +21 -21
- package/lib/internals/utils/date-utils.d.ts +6 -6
- package/lib/internals/utils/releaseInfo.d.ts +1 -1
- package/lib/internals/utils/validation/validateDateRange.d.ts +7 -7
- package/lib/internals/utils/validation/validateDateTimeRange.d.ts +8 -8
- package/lib/internals/utils/validation/validateTimeRange.d.ts +7 -7
- package/lib/internals/utils/valueManagers.d.ts +7 -7
- package/lib/locales/en-US.d.ts +26 -26
- package/lib/locales/index.d.ts +2 -2
- package/lib/locales/ja.d.ts +26 -26
- package/lib/locales/pt.d.ts +26 -26
- package/lib/locales/zh-CN.d.ts +26 -26
- package/lib/locales/zh-TW.d.ts +26 -26
- package/lib/models/index.d.ts +1 -1
- package/lib/models/validation.d.ts +9 -9
- package/lib/themeAugmentation/components.d.ts +66 -66
- package/lib/themeAugmentation/index.d.ts +3 -3
- package/lib/themeAugmentation/overrides.d.ts +33 -33
- package/lib/themeAugmentation/props.d.ts +42 -42
- package/lib/typings.d.ts +4 -4
- package/lib/utils/index.d.ts +42 -42
- package/package.json +2 -2
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { BasePickerProps, UsePickerParams, ExportedBaseToolbarProps, StaticOnlyPickerProps, UncapitalizeObjectKeys } from '@mui/x-date-pickers/internals';
|
|
3
|
-
import { ExportedPickersLayoutSlotsComponent, ExportedPickersLayoutSlotsComponentsProps } from '@mui/x-date-pickers/PickersLayout';
|
|
4
|
-
import { DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals/models';
|
|
5
|
-
import { DateRange } from '../../models/range';
|
|
6
|
-
import { UseRangePositionProps } from '../useRangePosition';
|
|
7
|
-
import { RangeFieldSection } from '../../models/fields';
|
|
8
|
-
export interface UseStaticRangePickerSlotsComponent<TDate, TView extends DateOrTimeViewWithMeridiem> extends ExportedPickersLayoutSlotsComponent<DateRange<TDate>, TDate, TView> {
|
|
9
|
-
}
|
|
10
|
-
export interface UseStaticRangePickerSlotsComponentsProps<TDate, TView extends DateOrTimeViewWithMeridiem> extends ExportedPickersLayoutSlotsComponentsProps<DateRange<TDate>, TDate, TView> {
|
|
11
|
-
toolbar?: ExportedBaseToolbarProps;
|
|
12
|
-
}
|
|
13
|
-
export interface StaticRangeOnlyPickerProps extends StaticOnlyPickerProps, UseRangePositionProps {
|
|
14
|
-
}
|
|
15
|
-
export interface UseStaticRangePickerProps<TDate, TView extends DateOrTimeViewWithMeridiem, TError, TExternalProps extends UseStaticRangePickerProps<TDate, TView, any, TExternalProps>> extends BasePickerProps<DateRange<TDate>, TDate, TView, TError, TExternalProps, {}>, StaticRangeOnlyPickerProps {
|
|
16
|
-
/**
|
|
17
|
-
* Overridable components.
|
|
18
|
-
* @default {}
|
|
19
|
-
*/
|
|
20
|
-
slots?: UncapitalizeObjectKeys<UseStaticRangePickerSlotsComponent<TDate, TView>>;
|
|
21
|
-
/**
|
|
22
|
-
* The props used for each component slot.
|
|
23
|
-
* @default {}
|
|
24
|
-
*/
|
|
25
|
-
slotProps?: UseStaticRangePickerSlotsComponentsProps<TDate, TView>;
|
|
26
|
-
}
|
|
27
|
-
export interface UseStaticRangePickerParams<TDate, TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UseStaticRangePickerProps<TDate, TView, any, TExternalProps>> extends Pick<UsePickerParams<DateRange<TDate>, TDate, TView, RangeFieldSection, TExternalProps, {}>, 'valueManager' | 'valueType' | 'validator'> {
|
|
28
|
-
props: TExternalProps;
|
|
29
|
-
/**
|
|
30
|
-
* Ref to pass to the root element
|
|
31
|
-
*/
|
|
32
|
-
ref: React.Ref<HTMLDivElement> | undefined;
|
|
33
|
-
}
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { BasePickerProps, UsePickerParams, ExportedBaseToolbarProps, StaticOnlyPickerProps, UncapitalizeObjectKeys } from '@mui/x-date-pickers/internals';
|
|
3
|
+
import { ExportedPickersLayoutSlotsComponent, ExportedPickersLayoutSlotsComponentsProps } from '@mui/x-date-pickers/PickersLayout';
|
|
4
|
+
import { DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals/models';
|
|
5
|
+
import { DateRange } from '../../models/range';
|
|
6
|
+
import { UseRangePositionProps } from '../useRangePosition';
|
|
7
|
+
import { RangeFieldSection } from '../../models/fields';
|
|
8
|
+
export interface UseStaticRangePickerSlotsComponent<TDate, TView extends DateOrTimeViewWithMeridiem> extends ExportedPickersLayoutSlotsComponent<DateRange<TDate>, TDate, TView> {
|
|
9
|
+
}
|
|
10
|
+
export interface UseStaticRangePickerSlotsComponentsProps<TDate, TView extends DateOrTimeViewWithMeridiem> extends ExportedPickersLayoutSlotsComponentsProps<DateRange<TDate>, TDate, TView> {
|
|
11
|
+
toolbar?: ExportedBaseToolbarProps;
|
|
12
|
+
}
|
|
13
|
+
export interface StaticRangeOnlyPickerProps extends StaticOnlyPickerProps, UseRangePositionProps {
|
|
14
|
+
}
|
|
15
|
+
export interface UseStaticRangePickerProps<TDate, TView extends DateOrTimeViewWithMeridiem, TError, TExternalProps extends UseStaticRangePickerProps<TDate, TView, any, TExternalProps>> extends BasePickerProps<DateRange<TDate>, TDate, TView, TError, TExternalProps, {}>, StaticRangeOnlyPickerProps {
|
|
16
|
+
/**
|
|
17
|
+
* Overridable components.
|
|
18
|
+
* @default {}
|
|
19
|
+
*/
|
|
20
|
+
slots?: UncapitalizeObjectKeys<UseStaticRangePickerSlotsComponent<TDate, TView>>;
|
|
21
|
+
/**
|
|
22
|
+
* The props used for each component slot.
|
|
23
|
+
* @default {}
|
|
24
|
+
*/
|
|
25
|
+
slotProps?: UseStaticRangePickerSlotsComponentsProps<TDate, TView>;
|
|
26
|
+
}
|
|
27
|
+
export interface UseStaticRangePickerParams<TDate, TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UseStaticRangePickerProps<TDate, TView, any, TExternalProps>> extends Pick<UsePickerParams<DateRange<TDate>, TDate, TView, RangeFieldSection, TExternalProps, {}>, 'valueManager' | 'valueType' | 'validator'> {
|
|
28
|
+
props: TExternalProps;
|
|
29
|
+
/**
|
|
30
|
+
* Ref to pass to the root element
|
|
31
|
+
*/
|
|
32
|
+
ref: React.Ref<HTMLDivElement> | undefined;
|
|
33
|
+
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { BaseDateValidationProps, DefaultizedProps, MakeOptional, UseFieldInternalProps } from '@mui/x-date-pickers/internals';
|
|
2
|
-
import { DateRange } from './range';
|
|
3
|
-
import type { DateRangeValidationError } from '../../models';
|
|
4
|
-
import { RangeFieldSection } from './fields';
|
|
5
|
-
/**
|
|
6
|
-
* Props used to validate a day value in range pickers.
|
|
7
|
-
*/
|
|
8
|
-
export interface DayRangeValidationProps<TDate> {
|
|
9
|
-
/**
|
|
10
|
-
* Disable specific date.
|
|
11
|
-
* @template TDate
|
|
12
|
-
* @param {TDate} day The date to test.
|
|
13
|
-
* @param {string} position The date to test, 'start' or 'end'.
|
|
14
|
-
* @returns {boolean} Returns `true` if the date should be disabled.
|
|
15
|
-
*/
|
|
16
|
-
shouldDisableDate?: (day: TDate, position: 'start' | 'end') => boolean;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Props used in every range picker.
|
|
20
|
-
*/
|
|
21
|
-
export interface BaseRangeProps {
|
|
22
|
-
/**
|
|
23
|
-
* If `true`, the component is disabled.
|
|
24
|
-
* @default false
|
|
25
|
-
*/
|
|
26
|
-
disabled?: boolean;
|
|
27
|
-
}
|
|
28
|
-
export interface UseDateRangeFieldProps<TDate> extends MakeOptional<UseFieldInternalProps<DateRange<TDate>, TDate, RangeFieldSection, DateRangeValidationError>, 'format'>, DayRangeValidationProps<TDate>, BaseDateValidationProps<TDate>, BaseRangeProps {
|
|
29
|
-
}
|
|
30
|
-
export declare type UseDateRangeFieldDefaultizedProps<TDate> = DefaultizedProps<UseDateRangeFieldProps<TDate>, keyof BaseDateValidationProps<TDate> | 'format'>;
|
|
1
|
+
import { BaseDateValidationProps, DefaultizedProps, MakeOptional, UseFieldInternalProps } from '@mui/x-date-pickers/internals';
|
|
2
|
+
import { DateRange } from './range';
|
|
3
|
+
import type { DateRangeValidationError } from '../../models';
|
|
4
|
+
import { RangeFieldSection } from './fields';
|
|
5
|
+
/**
|
|
6
|
+
* Props used to validate a day value in range pickers.
|
|
7
|
+
*/
|
|
8
|
+
export interface DayRangeValidationProps<TDate> {
|
|
9
|
+
/**
|
|
10
|
+
* Disable specific date.
|
|
11
|
+
* @template TDate
|
|
12
|
+
* @param {TDate} day The date to test.
|
|
13
|
+
* @param {string} position The date to test, 'start' or 'end'.
|
|
14
|
+
* @returns {boolean} Returns `true` if the date should be disabled.
|
|
15
|
+
*/
|
|
16
|
+
shouldDisableDate?: (day: TDate, position: 'start' | 'end') => boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Props used in every range picker.
|
|
20
|
+
*/
|
|
21
|
+
export interface BaseRangeProps {
|
|
22
|
+
/**
|
|
23
|
+
* If `true`, the component is disabled.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface UseDateRangeFieldProps<TDate> extends MakeOptional<UseFieldInternalProps<DateRange<TDate>, TDate, RangeFieldSection, DateRangeValidationError>, 'format'>, DayRangeValidationProps<TDate>, BaseDateValidationProps<TDate>, BaseRangeProps {
|
|
29
|
+
}
|
|
30
|
+
export declare type UseDateRangeFieldDefaultizedProps<TDate> = DefaultizedProps<UseDateRangeFieldProps<TDate>, keyof BaseDateValidationProps<TDate> | 'format'>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { BaseDateValidationProps, TimeValidationProps, DefaultizedProps, MakeOptional, UseFieldInternalProps, DateTimeValidationProps } from '@mui/x-date-pickers/internals';
|
|
2
|
-
import { BaseRangeProps, DayRangeValidationProps } from './dateRange';
|
|
3
|
-
import { DateRange } from './range';
|
|
4
|
-
import { DateTimeRangeValidationError } from '../../models';
|
|
5
|
-
import { RangeFieldSection } from './fields';
|
|
6
|
-
export interface UseDateTimeRangeFieldProps<TDate> extends MakeOptional<UseFieldInternalProps<DateRange<TDate>, TDate, RangeFieldSection, DateTimeRangeValidationError>, 'format'>, DayRangeValidationProps<TDate>, TimeValidationProps<TDate>, BaseDateValidationProps<TDate>, DateTimeValidationProps<TDate>, BaseRangeProps {
|
|
7
|
-
/**
|
|
8
|
-
* 12h/24h view for hour selection clock.
|
|
9
|
-
* @default `utils.is12HourCycleInCurrentLocale()`
|
|
10
|
-
*/
|
|
11
|
-
ampm?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare type UseDateTimeRangeFieldDefaultizedProps<TDate> = DefaultizedProps<UseDateTimeRangeFieldProps<TDate>, keyof BaseDateValidationProps<TDate> | 'format' | 'disableIgnoringDatePartForTimeValidation'>;
|
|
1
|
+
import { BaseDateValidationProps, TimeValidationProps, DefaultizedProps, MakeOptional, UseFieldInternalProps, DateTimeValidationProps } from '@mui/x-date-pickers/internals';
|
|
2
|
+
import { BaseRangeProps, DayRangeValidationProps } from './dateRange';
|
|
3
|
+
import { DateRange } from './range';
|
|
4
|
+
import { DateTimeRangeValidationError } from '../../models';
|
|
5
|
+
import { RangeFieldSection } from './fields';
|
|
6
|
+
export interface UseDateTimeRangeFieldProps<TDate> extends MakeOptional<UseFieldInternalProps<DateRange<TDate>, TDate, RangeFieldSection, DateTimeRangeValidationError>, 'format'>, DayRangeValidationProps<TDate>, TimeValidationProps<TDate>, BaseDateValidationProps<TDate>, DateTimeValidationProps<TDate>, BaseRangeProps {
|
|
7
|
+
/**
|
|
8
|
+
* 12h/24h view for hour selection clock.
|
|
9
|
+
* @default `utils.is12HourCycleInCurrentLocale()`
|
|
10
|
+
*/
|
|
11
|
+
ampm?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare type UseDateTimeRangeFieldDefaultizedProps<TDate> = DefaultizedProps<UseDateTimeRangeFieldProps<TDate>, keyof BaseDateValidationProps<TDate> | 'format' | 'disableIgnoringDatePartForTimeValidation'>;
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { SlotComponentProps } from '@mui/base/utils';
|
|
3
|
-
import { BaseFieldProps } from '@mui/x-date-pickers/internals';
|
|
4
|
-
import { FieldSection } from '@mui/x-date-pickers/models';
|
|
5
|
-
export interface RangeFieldSection extends FieldSection {
|
|
6
|
-
dateName: 'start' | 'end';
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Props the `textField` slot of the multi input field can receive when used inside a picker.
|
|
10
|
-
*/
|
|
11
|
-
export interface MultiInputFieldSlotTextFieldProps {
|
|
12
|
-
inputRef?: React.Ref<HTMLInputElement>;
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
readOnly?: boolean;
|
|
15
|
-
id?: string;
|
|
16
|
-
label?: React.ReactNode;
|
|
17
|
-
onKeyDown?: React.KeyboardEventHandler;
|
|
18
|
-
onFocus?: React.FocusEventHandler;
|
|
19
|
-
focused?: boolean;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Props the `root` slot of the multi input field can receive when used inside a picker.
|
|
23
|
-
*/
|
|
24
|
-
export interface MultiInputFieldSlotRootProps {
|
|
25
|
-
onBlur?: React.FocusEventHandler;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Props the multi input field can receive when used inside a picker.
|
|
29
|
-
* Only contains what the MUI component are passing to the field, not what users can pass using the `props.slotProps.field`.
|
|
30
|
-
*/
|
|
31
|
-
export interface BaseMultiInputFieldProps<TValue, TDate, TSection extends FieldSection, TError> extends BaseFieldProps<TValue, TDate, TSection, TError> {
|
|
32
|
-
slots?: {
|
|
33
|
-
root?: React.ElementType;
|
|
34
|
-
separator?: React.ElementType;
|
|
35
|
-
textField?: React.ElementType;
|
|
36
|
-
};
|
|
37
|
-
slotProps?: {
|
|
38
|
-
root?: SlotComponentProps<React.ElementType<MultiInputFieldSlotRootProps>, {}, Record<string, any>>;
|
|
39
|
-
textField?: SlotComponentProps<React.ElementType<MultiInputFieldSlotTextFieldProps>, {}, {
|
|
40
|
-
position?: 'start' | 'end';
|
|
41
|
-
} & Record<string, any>>;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { SlotComponentProps } from '@mui/base/utils';
|
|
3
|
+
import { BaseFieldProps } from '@mui/x-date-pickers/internals';
|
|
4
|
+
import { FieldSection } from '@mui/x-date-pickers/models';
|
|
5
|
+
export interface RangeFieldSection extends FieldSection {
|
|
6
|
+
dateName: 'start' | 'end';
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Props the `textField` slot of the multi input field can receive when used inside a picker.
|
|
10
|
+
*/
|
|
11
|
+
export interface MultiInputFieldSlotTextFieldProps {
|
|
12
|
+
inputRef?: React.Ref<HTMLInputElement>;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
readOnly?: boolean;
|
|
15
|
+
id?: string;
|
|
16
|
+
label?: React.ReactNode;
|
|
17
|
+
onKeyDown?: React.KeyboardEventHandler;
|
|
18
|
+
onFocus?: React.FocusEventHandler;
|
|
19
|
+
focused?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Props the `root` slot of the multi input field can receive when used inside a picker.
|
|
23
|
+
*/
|
|
24
|
+
export interface MultiInputFieldSlotRootProps {
|
|
25
|
+
onBlur?: React.FocusEventHandler;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Props the multi input field can receive when used inside a picker.
|
|
29
|
+
* Only contains what the MUI component are passing to the field, not what users can pass using the `props.slotProps.field`.
|
|
30
|
+
*/
|
|
31
|
+
export interface BaseMultiInputFieldProps<TValue, TDate, TSection extends FieldSection, TError> extends BaseFieldProps<TValue, TDate, TSection, TError> {
|
|
32
|
+
slots?: {
|
|
33
|
+
root?: React.ElementType;
|
|
34
|
+
separator?: React.ElementType;
|
|
35
|
+
textField?: React.ElementType;
|
|
36
|
+
};
|
|
37
|
+
slotProps?: {
|
|
38
|
+
root?: SlotComponentProps<React.ElementType<MultiInputFieldSlotRootProps>, {}, Record<string, any>>;
|
|
39
|
+
textField?: SlotComponentProps<React.ElementType<MultiInputFieldSlotTextFieldProps>, {}, {
|
|
40
|
+
position?: 'start' | 'end';
|
|
41
|
+
} & Record<string, any>>;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './dateRange';
|
|
2
|
-
export * from './range';
|
|
3
|
-
export * from './dateTimeRange';
|
|
4
|
-
export * from './timeRange';
|
|
5
|
-
export * from './fields';
|
|
6
|
-
export * from './rangePickerProps';
|
|
1
|
+
export * from './dateRange';
|
|
2
|
+
export * from './range';
|
|
3
|
+
export * from './dateTimeRange';
|
|
4
|
+
export * from './timeRange';
|
|
5
|
+
export * from './fields';
|
|
6
|
+
export * from './rangePickerProps';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare type DateRange<TDate> = [TDate | null, TDate | null];
|
|
2
|
-
export declare type NonEmptyDateRange<TDate> = [TDate, TDate];
|
|
3
|
-
export declare type RangePosition = 'start' | 'end';
|
|
1
|
+
export declare type DateRange<TDate> = [TDate | null, TDate | null];
|
|
2
|
+
export declare type NonEmptyDateRange<TDate> = [TDate, TDate];
|
|
3
|
+
export declare type RangePosition = 'start' | 'end';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Props common to all range non-static pickers.
|
|
4
|
-
* These props are handled by the headless wrappers.
|
|
5
|
-
*/
|
|
6
|
-
export interface BaseRangeNonStaticPickerProps {
|
|
7
|
-
/**
|
|
8
|
-
* The label content.
|
|
9
|
-
* Ignored if the field has several inputs.
|
|
10
|
-
*/
|
|
11
|
-
label?: React.ReactNode;
|
|
12
|
-
/**
|
|
13
|
-
* Pass a ref to the `input` element.
|
|
14
|
-
* Ignored if the field has several inputs.
|
|
15
|
-
*/
|
|
16
|
-
inputRef?: React.Ref<HTMLInputElement>;
|
|
17
|
-
}
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props common to all range non-static pickers.
|
|
4
|
+
* These props are handled by the headless wrappers.
|
|
5
|
+
*/
|
|
6
|
+
export interface BaseRangeNonStaticPickerProps {
|
|
7
|
+
/**
|
|
8
|
+
* The label content.
|
|
9
|
+
* Ignored if the field has several inputs.
|
|
10
|
+
*/
|
|
11
|
+
label?: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Pass a ref to the `input` element.
|
|
14
|
+
* Ignored if the field has several inputs.
|
|
15
|
+
*/
|
|
16
|
+
inputRef?: React.Ref<HTMLInputElement>;
|
|
17
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { BaseTimeValidationProps, TimeValidationProps, DefaultizedProps, MakeOptional, UseFieldInternalProps } from '@mui/x-date-pickers/internals';
|
|
2
|
-
import { DateRange } from './range';
|
|
3
|
-
import { TimeRangeValidationError } from '../../models';
|
|
4
|
-
import { BaseRangeProps } from './dateRange';
|
|
5
|
-
import { RangeFieldSection } from './fields';
|
|
6
|
-
export interface UseTimeRangeFieldProps<TDate> extends MakeOptional<UseFieldInternalProps<DateRange<TDate>, TDate, RangeFieldSection, TimeRangeValidationError>, 'format'>, TimeValidationProps<TDate>, BaseTimeValidationProps, BaseRangeProps {
|
|
7
|
-
/**
|
|
8
|
-
* 12h/24h view for hour selection clock.
|
|
9
|
-
* @default `utils.is12HourCycleInCurrentLocale()`
|
|
10
|
-
*/
|
|
11
|
-
ampm?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare type UseTimeRangeFieldDefaultizedProps<TDate> = DefaultizedProps<UseTimeRangeFieldProps<TDate>, keyof BaseTimeValidationProps | 'format'>;
|
|
1
|
+
import { BaseTimeValidationProps, TimeValidationProps, DefaultizedProps, MakeOptional, UseFieldInternalProps } from '@mui/x-date-pickers/internals';
|
|
2
|
+
import { DateRange } from './range';
|
|
3
|
+
import { TimeRangeValidationError } from '../../models';
|
|
4
|
+
import { BaseRangeProps } from './dateRange';
|
|
5
|
+
import { RangeFieldSection } from './fields';
|
|
6
|
+
export interface UseTimeRangeFieldProps<TDate> extends MakeOptional<UseFieldInternalProps<DateRange<TDate>, TDate, RangeFieldSection, TimeRangeValidationError>, 'format'>, TimeValidationProps<TDate>, BaseTimeValidationProps, BaseRangeProps {
|
|
7
|
+
/**
|
|
8
|
+
* 12h/24h view for hour selection clock.
|
|
9
|
+
* @default `utils.is12HourCycleInCurrentLocale()`
|
|
10
|
+
*/
|
|
11
|
+
ampm?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare type UseTimeRangeFieldDefaultizedProps<TDate> = DefaultizedProps<UseTimeRangeFieldProps<TDate>, keyof BaseTimeValidationProps | 'format'>;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { RangeFieldSection } from '../models/fields';
|
|
2
|
-
export declare const splitDateRangeSections: (sections: RangeFieldSection[]) => {
|
|
3
|
-
startDate: RangeFieldSection[];
|
|
4
|
-
endDate: RangeFieldSection[];
|
|
5
|
-
};
|
|
6
|
-
export declare const removeLastSeparator: (dateSections: RangeFieldSection[]) => (RangeFieldSection | {
|
|
7
|
-
separator: null;
|
|
8
|
-
dateName: "end" | "start";
|
|
9
|
-
value: string;
|
|
10
|
-
format: string;
|
|
11
|
-
maxLength: number | null;
|
|
12
|
-
placeholder: string;
|
|
13
|
-
type: import("@mui/x-date-pickers").FieldSectionType;
|
|
14
|
-
contentType: import("@mui/x-date-pickers").FieldSectionContentType;
|
|
15
|
-
hasLeadingZeros: boolean;
|
|
16
|
-
hasLeadingZerosInFormat: boolean;
|
|
17
|
-
hasLeadingZerosInInput: boolean;
|
|
18
|
-
modified: boolean;
|
|
19
|
-
start: number;
|
|
20
|
-
end: number;
|
|
21
|
-
startInInput: number;
|
|
22
|
-
endInInput: number;
|
|
23
|
-
startSeparator: string;
|
|
24
|
-
endSeparator: string;
|
|
25
|
-
})[];
|
|
1
|
+
import { RangeFieldSection } from '../models/fields';
|
|
2
|
+
export declare const splitDateRangeSections: (sections: RangeFieldSection[]) => {
|
|
3
|
+
startDate: RangeFieldSection[];
|
|
4
|
+
endDate: RangeFieldSection[];
|
|
5
|
+
};
|
|
6
|
+
export declare const removeLastSeparator: (dateSections: RangeFieldSection[]) => (RangeFieldSection | {
|
|
7
|
+
separator: null;
|
|
8
|
+
dateName: "end" | "start";
|
|
9
|
+
value: string;
|
|
10
|
+
format: string;
|
|
11
|
+
maxLength: number | null;
|
|
12
|
+
placeholder: string;
|
|
13
|
+
type: import("@mui/x-date-pickers").FieldSectionType;
|
|
14
|
+
contentType: import("@mui/x-date-pickers").FieldSectionContentType;
|
|
15
|
+
hasLeadingZeros: boolean;
|
|
16
|
+
hasLeadingZerosInFormat: boolean;
|
|
17
|
+
hasLeadingZerosInInput: boolean;
|
|
18
|
+
modified: boolean;
|
|
19
|
+
start: number;
|
|
20
|
+
end: number;
|
|
21
|
+
startInInput: number;
|
|
22
|
+
endInInput: number;
|
|
23
|
+
startSeparator: string;
|
|
24
|
+
endSeparator: string;
|
|
25
|
+
})[];
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { MuiPickersAdapter } from '@mui/x-date-pickers/models';
|
|
2
|
-
import { DateRange, RangePosition } from '../models/range';
|
|
3
|
-
interface CalculateRangeChangeOptions<TDate> {
|
|
4
|
-
utils: MuiPickersAdapter<TDate>;
|
|
5
|
-
range: DateRange<TDate>;
|
|
6
|
-
newDate: TDate | null;
|
|
7
|
-
rangePosition: RangePosition;
|
|
8
|
-
/**
|
|
9
|
-
* Should allow flipping range `start` and `end` dates if the `newDate` would result in a new range creation.
|
|
10
|
-
*
|
|
11
|
-
* It is used to allow dragging range `start` date past `end` date essentially becoming the new `end` date and vice versa.
|
|
12
|
-
*/
|
|
13
|
-
allowRangeFlip?: boolean;
|
|
14
|
-
}
|
|
15
|
-
interface CalculateRangeChangeResponse<TDate> {
|
|
16
|
-
nextSelection: RangePosition;
|
|
17
|
-
newRange: DateRange<TDate>;
|
|
18
|
-
}
|
|
19
|
-
export declare function calculateRangeChange<TDate>({ utils, range, newDate: selectedDate, rangePosition, allowRangeFlip, }: CalculateRangeChangeOptions<TDate>): CalculateRangeChangeResponse<TDate>;
|
|
20
|
-
export declare function calculateRangePreview<TDate>(options: CalculateRangeChangeOptions<TDate>): DateRange<TDate>;
|
|
21
|
-
export {};
|
|
1
|
+
import { MuiPickersAdapter } from '@mui/x-date-pickers/models';
|
|
2
|
+
import { DateRange, RangePosition } from '../models/range';
|
|
3
|
+
interface CalculateRangeChangeOptions<TDate> {
|
|
4
|
+
utils: MuiPickersAdapter<TDate>;
|
|
5
|
+
range: DateRange<TDate>;
|
|
6
|
+
newDate: TDate | null;
|
|
7
|
+
rangePosition: RangePosition;
|
|
8
|
+
/**
|
|
9
|
+
* Should allow flipping range `start` and `end` dates if the `newDate` would result in a new range creation.
|
|
10
|
+
*
|
|
11
|
+
* It is used to allow dragging range `start` date past `end` date essentially becoming the new `end` date and vice versa.
|
|
12
|
+
*/
|
|
13
|
+
allowRangeFlip?: boolean;
|
|
14
|
+
}
|
|
15
|
+
interface CalculateRangeChangeResponse<TDate> {
|
|
16
|
+
nextSelection: RangePosition;
|
|
17
|
+
newRange: DateRange<TDate>;
|
|
18
|
+
}
|
|
19
|
+
export declare function calculateRangeChange<TDate>({ utils, range, newDate: selectedDate, rangePosition, allowRangeFlip, }: CalculateRangeChangeOptions<TDate>): CalculateRangeChangeResponse<TDate>;
|
|
20
|
+
export declare function calculateRangePreview<TDate>(options: CalculateRangeChangeOptions<TDate>): DateRange<TDate>;
|
|
21
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MuiPickersAdapter } from '@mui/x-date-pickers/models';
|
|
2
|
-
import { DateRange, NonEmptyDateRange } from '../models/range';
|
|
3
|
-
export declare const isRangeValid: <TDate>(utils: MuiPickersAdapter<TDate, any>, range: DateRange<TDate> | null) => range is NonEmptyDateRange<TDate>;
|
|
4
|
-
export declare const isWithinRange: <TDate>(utils: MuiPickersAdapter<TDate, any>, day: TDate, range: DateRange<TDate> | null) => boolean;
|
|
5
|
-
export declare const isStartOfRange: <TDate>(utils: MuiPickersAdapter<TDate, any>, day: TDate, range: DateRange<TDate> | null) => boolean;
|
|
6
|
-
export declare const isEndOfRange: <TDate>(utils: MuiPickersAdapter<TDate, any>, day: TDate, range: DateRange<TDate> | null) => boolean;
|
|
1
|
+
import { MuiPickersAdapter } from '@mui/x-date-pickers/models';
|
|
2
|
+
import { DateRange, NonEmptyDateRange } from '../models/range';
|
|
3
|
+
export declare const isRangeValid: <TDate>(utils: MuiPickersAdapter<TDate, any>, range: DateRange<TDate> | null) => range is NonEmptyDateRange<TDate>;
|
|
4
|
+
export declare const isWithinRange: <TDate>(utils: MuiPickersAdapter<TDate, any>, day: TDate, range: DateRange<TDate> | null) => boolean;
|
|
5
|
+
export declare const isStartOfRange: <TDate>(utils: MuiPickersAdapter<TDate, any>, day: TDate, range: DateRange<TDate> | null) => boolean;
|
|
6
|
+
export declare const isEndOfRange: <TDate>(utils: MuiPickersAdapter<TDate, any>, day: TDate, range: DateRange<TDate> | null) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getReleaseInfo: () => any;
|
|
1
|
+
export declare const getReleaseInfo: () => any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TimezoneProps } from '@mui/x-date-pickers/models';
|
|
2
|
-
import { Validator, BaseDateValidationProps, DefaultizedProps } from '@mui/x-date-pickers/internals';
|
|
3
|
-
import { DateRange, DayRangeValidationProps } from '../../models';
|
|
4
|
-
import { DateRangeValidationError } from '../../../models';
|
|
5
|
-
export interface DateRangeComponentValidationProps<TDate> extends DayRangeValidationProps<TDate>, Required<BaseDateValidationProps<TDate>>, DefaultizedProps<TimezoneProps, 'timezone'> {
|
|
6
|
-
}
|
|
7
|
-
export declare const validateDateRange: Validator<DateRange<any>, any, DateRangeValidationError, DateRangeComponentValidationProps<any>>;
|
|
1
|
+
import { TimezoneProps } from '@mui/x-date-pickers/models';
|
|
2
|
+
import { Validator, BaseDateValidationProps, DefaultizedProps } from '@mui/x-date-pickers/internals';
|
|
3
|
+
import { DateRange, DayRangeValidationProps } from '../../models';
|
|
4
|
+
import { DateRangeValidationError } from '../../../models';
|
|
5
|
+
export interface DateRangeComponentValidationProps<TDate> extends DayRangeValidationProps<TDate>, Required<BaseDateValidationProps<TDate>>, DefaultizedProps<TimezoneProps, 'timezone'> {
|
|
6
|
+
}
|
|
7
|
+
export declare const validateDateRange: Validator<DateRange<any>, any, DateRangeValidationError, DateRangeComponentValidationProps<any>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TimezoneProps } from '@mui/x-date-pickers/models';
|
|
2
|
-
import { Validator, BaseDateValidationProps, TimeValidationProps, DefaultizedProps } from '@mui/x-date-pickers/internals';
|
|
3
|
-
import { DayRangeValidationProps } from '../../models/dateRange';
|
|
4
|
-
import { DateRange } from '../../models/range';
|
|
5
|
-
import { DateTimeRangeValidationError } from '../../../models';
|
|
6
|
-
export interface DateTimeRangeComponentValidationProps<TDate> extends DayRangeValidationProps<TDate>, TimeValidationProps<TDate>, Required<BaseDateValidationProps<TDate>>, DefaultizedProps<TimezoneProps, 'timezone'> {
|
|
7
|
-
}
|
|
8
|
-
export declare const validateDateTimeRange: Validator<DateRange<any>, any, DateTimeRangeValidationError, DateTimeRangeComponentValidationProps<any>>;
|
|
1
|
+
import { TimezoneProps } from '@mui/x-date-pickers/models';
|
|
2
|
+
import { Validator, BaseDateValidationProps, TimeValidationProps, DefaultizedProps } from '@mui/x-date-pickers/internals';
|
|
3
|
+
import { DayRangeValidationProps } from '../../models/dateRange';
|
|
4
|
+
import { DateRange } from '../../models/range';
|
|
5
|
+
import { DateTimeRangeValidationError } from '../../../models';
|
|
6
|
+
export interface DateTimeRangeComponentValidationProps<TDate> extends DayRangeValidationProps<TDate>, TimeValidationProps<TDate>, Required<BaseDateValidationProps<TDate>>, DefaultizedProps<TimezoneProps, 'timezone'> {
|
|
7
|
+
}
|
|
8
|
+
export declare const validateDateTimeRange: Validator<DateRange<any>, any, DateTimeRangeValidationError, DateTimeRangeComponentValidationProps<any>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TimezoneProps } from '@mui/x-date-pickers/models';
|
|
2
|
-
import { Validator, BaseTimeValidationProps, DefaultizedProps } from '@mui/x-date-pickers/internals';
|
|
3
|
-
import { DateRange } from '../../models/range';
|
|
4
|
-
import { TimeRangeValidationError } from '../../../models';
|
|
5
|
-
export interface TimeRangeComponentValidationProps extends Required<BaseTimeValidationProps>, DefaultizedProps<TimezoneProps, 'timezone'> {
|
|
6
|
-
}
|
|
7
|
-
export declare const validateTimeRange: Validator<DateRange<any>, any, TimeRangeValidationError, TimeRangeComponentValidationProps>;
|
|
1
|
+
import { TimezoneProps } from '@mui/x-date-pickers/models';
|
|
2
|
+
import { Validator, BaseTimeValidationProps, DefaultizedProps } from '@mui/x-date-pickers/internals';
|
|
3
|
+
import { DateRange } from '../../models/range';
|
|
4
|
+
import { TimeRangeValidationError } from '../../../models';
|
|
5
|
+
export interface TimeRangeComponentValidationProps extends Required<BaseTimeValidationProps>, DefaultizedProps<TimezoneProps, 'timezone'> {
|
|
6
|
+
}
|
|
7
|
+
export declare const validateTimeRange: Validator<DateRange<any>, any, TimeRangeValidationError, TimeRangeComponentValidationProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PickerValueManager, FieldValueManager } from '@mui/x-date-pickers/internals';
|
|
2
|
-
import { DateRange } from '../models/range';
|
|
3
|
-
import type { DateRangeValidationError, DateTimeRangeValidationError, TimeRangeValidationError } from '../../models';
|
|
4
|
-
import { RangeFieldSection } from '../models/fields';
|
|
5
|
-
export declare type RangePickerValueManager<TValue = [any, any], TDate = any, TError extends DateRangeValidationError | TimeRangeValidationError | DateTimeRangeValidationError = any> = PickerValueManager<TValue, TDate, TError>;
|
|
6
|
-
export declare const rangeValueManager: RangePickerValueManager;
|
|
7
|
-
export declare const rangeFieldValueManager: FieldValueManager<DateRange<any>, any, RangeFieldSection>;
|
|
1
|
+
import { PickerValueManager, FieldValueManager } from '@mui/x-date-pickers/internals';
|
|
2
|
+
import { DateRange } from '../models/range';
|
|
3
|
+
import type { DateRangeValidationError, DateTimeRangeValidationError, TimeRangeValidationError } from '../../models';
|
|
4
|
+
import { RangeFieldSection } from '../models/fields';
|
|
5
|
+
export declare type RangePickerValueManager<TValue = [any, any], TDate = any, TError extends DateRangeValidationError | TimeRangeValidationError | DateTimeRangeValidationError = any> = PickerValueManager<TValue, TDate, TError>;
|
|
6
|
+
export declare const rangeValueManager: RangePickerValueManager;
|
|
7
|
+
export declare const rangeFieldValueManager: FieldValueManager<DateRange<any>, any, RangeFieldSection>;
|
package/lib/locales/en-US.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
'action-bar-cancel': string;
|
|
3
|
-
'action-bar-apply': string;
|
|
4
|
-
'action-bar-start.time': string;
|
|
5
|
-
'action-bar-end.time': string;
|
|
6
|
-
'toolbar-date-range-shortcut-custom': string;
|
|
7
|
-
"toolbar-date-range-shortcut-date-range": string;
|
|
8
|
-
"toolbar-date-range-shortcut-starting": string;
|
|
9
|
-
"toolbar-date-range-shortcut-ending": string;
|
|
10
|
-
"toolbar-date-range-shortcut-today": string;
|
|
11
|
-
"toolbar-date-range-shortcut-yesterday": string;
|
|
12
|
-
"toolbar-date-range-shortcut-tomorrow": string;
|
|
13
|
-
"toolbar-date-range-shortcut-last-3-days": string;
|
|
14
|
-
"toolbar-date-range-shortcut-last-7-days": string;
|
|
15
|
-
"toolbar-date-range-shortcut-last-30-days": string;
|
|
16
|
-
"toolbar-date-range-shortcut-last-90-days": string;
|
|
17
|
-
"toolbar-date-range-shortcut-last-180-days": string;
|
|
18
|
-
"toolbar-date-range-shortcut-next-3-days": string;
|
|
19
|
-
"toolbar-date-range-shortcut-next-7-days": string;
|
|
20
|
-
"toolbar-date-range-shortcut-next-30-days": string;
|
|
21
|
-
"toolbar-date-range-shortcut-next-90-days": string;
|
|
22
|
-
"toolbar-date-range-shortcut-next-180-days": string;
|
|
23
|
-
"toolbar-date-range-invalid-start-date": string;
|
|
24
|
-
"toolbar-date-range-invalid-end-date": string;
|
|
25
|
-
};
|
|
26
|
-
export default _default;
|
|
1
|
+
declare const _default: {
|
|
2
|
+
'action-bar-cancel': string;
|
|
3
|
+
'action-bar-apply': string;
|
|
4
|
+
'action-bar-start.time': string;
|
|
5
|
+
'action-bar-end.time': string;
|
|
6
|
+
'toolbar-date-range-shortcut-custom': string;
|
|
7
|
+
"toolbar-date-range-shortcut-date-range": string;
|
|
8
|
+
"toolbar-date-range-shortcut-starting": string;
|
|
9
|
+
"toolbar-date-range-shortcut-ending": string;
|
|
10
|
+
"toolbar-date-range-shortcut-today": string;
|
|
11
|
+
"toolbar-date-range-shortcut-yesterday": string;
|
|
12
|
+
"toolbar-date-range-shortcut-tomorrow": string;
|
|
13
|
+
"toolbar-date-range-shortcut-last-3-days": string;
|
|
14
|
+
"toolbar-date-range-shortcut-last-7-days": string;
|
|
15
|
+
"toolbar-date-range-shortcut-last-30-days": string;
|
|
16
|
+
"toolbar-date-range-shortcut-last-90-days": string;
|
|
17
|
+
"toolbar-date-range-shortcut-last-180-days": string;
|
|
18
|
+
"toolbar-date-range-shortcut-next-3-days": string;
|
|
19
|
+
"toolbar-date-range-shortcut-next-7-days": string;
|
|
20
|
+
"toolbar-date-range-shortcut-next-30-days": string;
|
|
21
|
+
"toolbar-date-range-shortcut-next-90-days": string;
|
|
22
|
+
"toolbar-date-range-shortcut-next-180-days": string;
|
|
23
|
+
"toolbar-date-range-invalid-start-date": string;
|
|
24
|
+
"toolbar-date-range-invalid-end-date": string;
|
|
25
|
+
};
|
|
26
|
+
export default _default;
|
package/lib/locales/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const pLocaleMap: Record<string, any>;
|
|
2
|
-
export declare const getText: (id: string, pLocale?: string) => any;
|
|
1
|
+
export declare const pLocaleMap: Record<string, any>;
|
|
2
|
+
export declare const getText: (id: string, pLocale?: string) => any;
|