@elliemae/ds-form-date-time-picker 3.13.1-rc.1 → 3.13.1
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/dist/types/ControlledDateTimePicker.d.ts +7 -0
- package/dist/types/ControlledDateTimePickerCTX.d.ts +5 -0
- package/dist/types/ControlledDateTimePickerDatatestid.d.ts +63 -0
- package/dist/types/ControlledDateTimePickerTypes.d.ts +20 -0
- package/dist/types/config/useChangeHandlers.d.ts +27 -0
- package/dist/types/config/useControlledDateTimePicker.d.ts +16 -0
- package/dist/types/config/useFocusTracker.d.ts +38 -0
- package/dist/types/config/useGetDestructuredValues.d.ts +30 -0
- package/dist/types/config/useGetFlags.d.ts +30 -0
- package/dist/types/config/useGetPropsBasedOnType.d.ts +28 -0
- package/dist/types/config/useGetPropsWithDefault.d.ts +2 -0
- package/dist/types/config/useGetReferences.d.ts +33 -0
- package/dist/types/config/useGlobalKeyHandlers.d.ts +18 -0
- package/dist/types/config/useRelevantValueFromProps.d.ts +10 -0
- package/dist/types/config/useValidateProps.d.ts +2 -0
- package/dist/types/exported-related/theming.d.ts +37 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/parts/ClearButton/ClearButton.d.ts +1 -0
- package/dist/types/parts/ClearButton/useClearButton.d.ts +11 -0
- package/dist/types/parts/ControlledDateTimePickerContent.d.ts +1 -0
- package/dist/types/parts/DateInputs/DDInput.d.ts +16 -0
- package/dist/types/parts/DateInputs/DateInputs.d.ts +1 -0
- package/dist/types/parts/DateInputs/MMInput.d.ts +18 -0
- package/dist/types/parts/DateInputs/YYYYInput.d.ts +16 -0
- package/dist/types/parts/DateInputs/useDateInputs.d.ts +2 -0
- package/dist/types/parts/Pickers/Calendar/Calendar.d.ts +4 -0
- package/dist/types/parts/Pickers/Calendar/CalendarBody.d.ts +6 -0
- package/dist/types/parts/Pickers/Calendar/CalendarContent.d.ts +3 -0
- package/dist/types/parts/Pickers/Calendar/CalendarContext.d.ts +6 -0
- package/dist/types/parts/Pickers/Calendar/CalendarDaysList.d.ts +9 -0
- package/dist/types/parts/Pickers/Calendar/CalendarFooter.d.ts +2 -0
- package/dist/types/parts/Pickers/Calendar/CalendarHead.d.ts +1 -0
- package/dist/types/parts/Pickers/Calendar/CalendarIconTrigger.d.ts +1 -0
- package/dist/types/parts/Pickers/Calendar/CalendarMonthDays.d.ts +1 -0
- package/dist/types/parts/Pickers/Calendar/CalendarWeekDays.d.ts +2 -0
- package/dist/types/parts/Pickers/Calendar/CalendarWrapper.d.ts +1 -0
- package/dist/types/parts/Pickers/Calendar/Day.d.ts +8 -0
- package/dist/types/parts/Pickers/Calendar/Styleds.d.ts +21 -0
- package/dist/types/parts/Pickers/Calendar/useConfigCalendarCTX.d.ts +14 -0
- package/dist/types/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.d.ts +15 -0
- package/dist/types/parts/Pickers/Calendar/useFocusLogic.d.ts +14 -0
- package/dist/types/parts/Pickers/Calendar/useKeyboardHandlers.d.ts +19 -0
- package/dist/types/parts/Pickers/Calendar/usePopperTriggerLogic.d.ts +16 -0
- package/dist/types/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheel.d.ts +1 -0
- package/dist/types/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContent.d.ts +1 -0
- package/dist/types/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContext.d.ts +6 -0
- package/dist/types/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.d.ts +2 -0
- package/dist/types/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.d.ts +1 -0
- package/dist/types/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.d.ts +1 -0
- package/dist/types/parts/Pickers/CalendarWithTimeWheel/Styleds.d.ts +7 -0
- package/dist/types/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.d.ts +14 -0
- package/dist/types/parts/Pickers/PickersIcons.d.ts +1 -0
- package/dist/types/parts/Pickers/TimeWheel/HoursList.d.ts +1 -0
- package/dist/types/parts/Pickers/TimeWheel/MeridiemList.d.ts +2 -0
- package/dist/types/parts/Pickers/TimeWheel/MinutesList.d.ts +2 -0
- package/dist/types/parts/Pickers/TimeWheel/TimeWheel.d.ts +4 -0
- package/dist/types/parts/Pickers/TimeWheel/TimeWheelContent.d.ts +2 -0
- package/dist/types/parts/Pickers/TimeWheel/TimeWheelContext.d.ts +6 -0
- package/dist/types/parts/Pickers/TimeWheel/TimeWheelFooter.d.ts +2 -0
- package/dist/types/parts/Pickers/TimeWheel/TimeWheelIconTrigger.d.ts +1 -0
- package/dist/types/parts/Pickers/TimeWheel/TimeWheelWrapper.d.ts +1 -0
- package/dist/types/parts/Pickers/TimeWheel/useConfigTimePickerCTX.d.ts +5 -0
- package/dist/types/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.d.ts +17 -0
- package/dist/types/parts/Pickers/TimeWheel/useKeyboardHandlers.d.ts +13 -0
- package/dist/types/parts/Pickers/TimeWheel/usePopperTriggerLogic.d.ts +12 -0
- package/dist/types/parts/Styleds.d.ts +13 -0
- package/dist/types/parts/TimeInputs/HHInput.d.ts +17 -0
- package/dist/types/parts/TimeInputs/MeridiemInput.d.ts +16 -0
- package/dist/types/parts/TimeInputs/MinutesInput.d.ts +16 -0
- package/dist/types/parts/TimeInputs/TimeInputs.d.ts +1 -0
- package/dist/types/parts/TimeInputs/useTimeInputs.d.ts +22 -0
- package/dist/types/parts/config.d.ts +5 -0
- package/dist/types/propTypes.d.ts +97 -0
- package/dist/types/sharedTypes.d.ts +95 -0
- package/dist/types/tests/date-time-picker.auto-advance.test.d.ts +1 -0
- package/dist/types/tests/date-time-picker.clear-button.test.d.ts +1 -0
- package/dist/types/tests/date-time-picker.keyboard-focus.test.d.ts +1 -0
- package/dist/types/tests/date-time-picker.keyboard.data-entry-typing.test.d.ts +1 -0
- package/dist/types/tests/date-time-picker.keyboard.fill-with-now.test.d.ts +1 -0
- package/dist/types/tests/date-time-picker.keyboard.regressive-backspace.test.d.ts +1 -0
- package/dist/types/tests/date-time-picker.keyboard.shortcut-clear.test.d.ts +1 -0
- package/dist/types/tests/date-time-picker.manual-delete-values.test.d.ts +1 -0
- package/dist/types/tests/date-time-picker.onChange-meta-info.test.d.ts +1 -0
- package/dist/types/tests/date-time-picker.types-button.test.d.ts +1 -0
- package/dist/types/tests/date-time-picker.types-dom.test.d.ts +1 -0
- package/dist/types/utils/constants.d.ts +38 -0
- package/dist/types/utils/dateHelpers.d.ts +40 -0
- package/dist/types/utils/dateTimeHelpers.d.ts +8 -0
- package/dist/types/utils/hooks/useGetDayFromDateString.d.ts +1 -0
- package/dist/types/utils/hooks/useGetMonthYearFromDateStringOrEmptyStartingMonth.d.ts +5 -0
- package/dist/types/utils/hooks/useGetStartingFocusedDay.d.ts +8 -0
- package/dist/types/utils/hooks/useOnClickOutside.d.ts +1 -0
- package/dist/types/utils/numberHelpers.d.ts +1 -0
- package/dist/types/utils/stringHelpers.d.ts +36 -0
- package/dist/types/utils/timeHelpers.d.ts +2 -0
- package/dist/types/utils/typeGuards.d.ts +4 -0
- package/package.json +8 -8
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { useCurrentDisplayedMonthYearLogic } from './useCurrentDisplayedMonthYearLogic';
|
|
2
|
+
import type { DSControlledDateTimePickerInternalsT } from '../../../sharedTypes';
|
|
3
|
+
interface UseFocusLogicArgsT {
|
|
4
|
+
currentDisplayedMonthLogic: ReturnType<typeof useCurrentDisplayedMonthYearLogic>;
|
|
5
|
+
showCalendar: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface FocusLogicT {
|
|
8
|
+
focusedDay?: DSControlledDateTimePickerInternalsT.MetaMonthDay;
|
|
9
|
+
resetFocusedDayToStartDate: () => void;
|
|
10
|
+
handleFocusMetaDay: (metaDayToFocus: DSControlledDateTimePickerInternalsT.MetaMonthDay) => void;
|
|
11
|
+
handleFocusMetaDayByDay: (day: Date) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const useFocusLogic: ({ currentDisplayedMonthLogic }: UseFocusLogicArgsT) => FocusLogicT;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { DSControlledDateTimePickerInternalsT } from '../../../sharedTypes';
|
|
3
|
+
import type { useFocusLogic } from './useFocusLogic';
|
|
4
|
+
import type { useCurrentDisplayedMonthYearLogic } from './useCurrentDisplayedMonthYearLogic';
|
|
5
|
+
interface UseKeyboardHandlersArgsT {
|
|
6
|
+
currentDisplayedMonthLogic: ReturnType<typeof useCurrentDisplayedMonthYearLogic>;
|
|
7
|
+
focusLogic: ReturnType<typeof useFocusLogic>;
|
|
8
|
+
}
|
|
9
|
+
type HandleDayOnKeyDownT = (e: React.KeyboardEvent, day: DSControlledDateTimePickerInternalsT.MetaMonthDay) => void;
|
|
10
|
+
interface KeyboardHandlersT {
|
|
11
|
+
handleDayOnKeyDown: HandleDayOnKeyDownT;
|
|
12
|
+
handlePrevYearKeyDown: (e: React.KeyboardEvent) => void;
|
|
13
|
+
handlePrevMonthKeyDown: (e: React.KeyboardEvent) => void;
|
|
14
|
+
handleNextMonthKeyDown: (e: React.KeyboardEvent) => void;
|
|
15
|
+
handleNextYearKeyDown: (e: React.KeyboardEvent) => void;
|
|
16
|
+
handlePickerIconKeyDown: (e: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const useKeyboardHandlers: ({ currentDisplayedMonthLogic, focusLogic, }: UseKeyboardHandlersArgsT) => KeyboardHandlersT;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { useFocusLogic } from './useFocusLogic';
|
|
3
|
+
interface UsePopperTriggerLogic {
|
|
4
|
+
focusLogic: ReturnType<typeof useFocusLogic>;
|
|
5
|
+
showCalendar: boolean;
|
|
6
|
+
setShowCalendar: StateSetter<boolean>;
|
|
7
|
+
}
|
|
8
|
+
interface PopperTriggerLogicT {
|
|
9
|
+
referenceElement: HTMLButtonElement | null;
|
|
10
|
+
closeCalendar: () => void;
|
|
11
|
+
handleToggleCalendar: () => void;
|
|
12
|
+
handleSetTriggerRef: (instance: HTMLButtonElement) => void;
|
|
13
|
+
handleMenuWrapperKeyDown: (e: React.KeyboardEvent<HTMLElement>) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const usePopperTriggerLogic: ({ focusLogic, showCalendar, setShowCalendar, }: UsePopperTriggerLogic) => PopperTriggerLogicT;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CalendarWithTimeWheel: () => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CalendarWithTimeWheelContent: () => JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { CalendarWithTimeWheelContextT } from './useConfigCalendarWithTimeWheelCTX';
|
|
3
|
+
export declare const defaultCalendarWithTimeWheelContext: CalendarWithTimeWheelContextT;
|
|
4
|
+
/** Context for cross component communication */
|
|
5
|
+
export declare const CalendarWithTimeWheelContext: import("react").Context<CalendarWithTimeWheelContextT>;
|
|
6
|
+
export default CalendarWithTimeWheelContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CalendarWithTimeWheelIconTrigger: () => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CalendarWithTimeWheelWrapper: () => JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledIconTriggerButton: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-button").DSButtonT.Props>, import("@elliemae/ds-system").Theme, object, never>;
|
|
3
|
+
export declare const StyledCalendarWithTimeWheelWrapper: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & object, never>;
|
|
4
|
+
export declare const StyledCalendar: import("styled-components").StyledComponent<({ className }: {
|
|
5
|
+
className?: string | undefined;
|
|
6
|
+
}) => JSX.Element, import("@elliemae/ds-system").Theme, object, never>;
|
|
7
|
+
export declare const CalendarWithTimeWheelFooterMessage: import("styled-components").StyledComponent<"footer", import("@elliemae/ds-system").Theme, object, never>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export interface CalendarWithTimeWheelContextT {
|
|
3
|
+
referenceElement: HTMLButtonElement | null;
|
|
4
|
+
ariaCurrentValueForInputs: string;
|
|
5
|
+
showCalendarWithTimeWheel: boolean;
|
|
6
|
+
closeCalendar: () => void;
|
|
7
|
+
handleToggleCalendarWithTimeWheel: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
8
|
+
handleSetTriggerRef: (instance: HTMLButtonElement) => void;
|
|
9
|
+
handleMenuWrapperKeyDown: (e: React.KeyboardEvent<HTMLElement>) => void;
|
|
10
|
+
handlePickerIconKeyDown: (e: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
11
|
+
isControllerOnly: boolean;
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const useConfigCalendarWithTimeWheelCTX: () => CalendarWithTimeWheelContextT;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PickersIcons: () => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const HoursList: () => JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { TimeWheelContextT } from './useConfigTimePickerCTX';
|
|
3
|
+
export declare const defaultTimePickerContext: TimeWheelContextT;
|
|
4
|
+
/** Context for cross component communication */
|
|
5
|
+
export declare const TimeWheelContext: import("react").Context<TimeWheelContextT>;
|
|
6
|
+
export default TimeWheelContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TimeWheelIconTrigger: () => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TimeWheelWrapper: () => JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { usePopperTriggerLogic } from './usePopperTriggerLogic';
|
|
2
|
+
import { useCurrentDisplayedWheelsLogic } from './useCurrentDisplayedWheelsLogic';
|
|
3
|
+
import { useKeyboardHandlers } from './useKeyboardHandlers';
|
|
4
|
+
export type TimeWheelContextT = ReturnType<typeof useCurrentDisplayedWheelsLogic> & ReturnType<typeof usePopperTriggerLogic> & ReturnType<typeof useKeyboardHandlers>;
|
|
5
|
+
export declare const useConfigTimePickerCTX: () => TimeWheelContextT;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DSControlledDateTimePickerT } from '../../../propTypes';
|
|
2
|
+
interface UseCurrentDisplayedWheelsLogic {
|
|
3
|
+
currHourNum: number;
|
|
4
|
+
visibleHours: (string | null)[];
|
|
5
|
+
handlePrevHour: (e: DSControlledDateTimePickerT.OnInternalValuesChangeEvent) => void;
|
|
6
|
+
handleNextHour: (e: DSControlledDateTimePickerT.OnInternalValuesChangeEvent) => void;
|
|
7
|
+
handleTimeWheelBtnChangeHours: (newVal: string, e: DSControlledDateTimePickerT.OnInternalValuesChangeEvent) => void;
|
|
8
|
+
currMinuteNum: number;
|
|
9
|
+
visibleMinutes: (string | null)[];
|
|
10
|
+
handlePrevMinute: (e: DSControlledDateTimePickerT.OnInternalValuesChangeEvent) => void;
|
|
11
|
+
handleNextMinute: (e: DSControlledDateTimePickerT.OnInternalValuesChangeEvent) => void;
|
|
12
|
+
handleTimeWheelBtnChangeMinutes: (newVal: string, e: DSControlledDateTimePickerT.OnInternalValuesChangeEvent) => void;
|
|
13
|
+
handleTimeWheelBtnChangeMeridiem: (newMeridiem: string, e: DSControlledDateTimePickerT.OnInternalValuesChangeEvent) => void;
|
|
14
|
+
currMeridiem: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const useCurrentDisplayedWheelsLogic: () => UseCurrentDisplayedWheelsLogic;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { useCurrentDisplayedWheelsLogic } from './useCurrentDisplayedWheelsLogic';
|
|
3
|
+
interface UseKeyboardHandlersArgs {
|
|
4
|
+
currentDisplayedTimeWheelLogic: ReturnType<typeof useCurrentDisplayedWheelsLogic>;
|
|
5
|
+
}
|
|
6
|
+
interface KeyboardHandlersT {
|
|
7
|
+
handleCurrHourOnKeyDown: (e: React.KeyboardEvent) => void;
|
|
8
|
+
handleCurrMinutesOnKeyDown: (e: React.KeyboardEvent) => void;
|
|
9
|
+
handleCurrMeridiemOnKeyDown: (e: React.KeyboardEvent) => void;
|
|
10
|
+
handlePickerIconKeyDown: (e: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const useKeyboardHandlers: ({ currentDisplayedTimeWheelLogic }: UseKeyboardHandlersArgs) => KeyboardHandlersT;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface PopperTriggerLogicT {
|
|
3
|
+
referenceElement: HTMLButtonElement | null;
|
|
4
|
+
showTimePicker: boolean;
|
|
5
|
+
closeTimePicker: () => void;
|
|
6
|
+
setShowTimePicker: StateSetter<boolean>;
|
|
7
|
+
handleToggleTimePicker: () => void;
|
|
8
|
+
handleSetTriggerRef: (instance: HTMLButtonElement) => void;
|
|
9
|
+
handleMenuWrapperKeyDown: (e: React.KeyboardEvent<HTMLElement>) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const usePopperTriggerLogic: () => PopperTriggerLogicT;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledSeparator: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/dist/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, object, never>;
|
|
3
|
+
export declare const StyledColonSeparator: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/dist/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, object, never>;
|
|
4
|
+
export declare const Styled2DigitsInput: import("styled-components").StyledComponent<"input", import("@elliemae/ds-system").Theme, object, never>;
|
|
5
|
+
export declare const StyledMin4DigitsInput: import("styled-components").StyledComponent<"input", import("@elliemae/ds-system").Theme, object, never>;
|
|
6
|
+
export declare const StyledInputsWrapperGrid: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/dist/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, object, never>;
|
|
7
|
+
export declare const StyledDateInputsWrapperGrid: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & object, never>;
|
|
8
|
+
export declare const StyledTimeInputsWrapperGrid: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & object, never>;
|
|
9
|
+
export declare const StyledPickersIconsWrapperGrid: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/dist/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, {
|
|
10
|
+
isControllerOnly: boolean;
|
|
11
|
+
}, never>;
|
|
12
|
+
export declare const StyledFocusWithIn: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/dist/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, object, never>;
|
|
13
|
+
export declare const StyledClearButton: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-button").DSButtonT.Props>, import("@elliemae/ds-system").Theme, object, never>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DSControlledDateTimePickerInternalsT } from '../../sharedTypes';
|
|
3
|
+
interface HHInputsPropsT {
|
|
4
|
+
onChange: DSControlledDateTimePickerInternalsT.OnChangeFunc;
|
|
5
|
+
onBlur: DSControlledDateTimePickerInternalsT.OnBlurFunc;
|
|
6
|
+
onFocus: DSControlledDateTimePickerInternalsT.OnFocusFunc;
|
|
7
|
+
onKeyDown: DSControlledDateTimePickerInternalsT.OnKeyDown;
|
|
8
|
+
value: string;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
contextRef: React.MutableRefObject<HTMLInputElement | null>;
|
|
11
|
+
placeholder: string;
|
|
12
|
+
ariaCurrentValueForInputs: string;
|
|
13
|
+
autoFocusHourInput: boolean;
|
|
14
|
+
isFocused: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const HHInput: React.MemoExoticComponent<({ onChange, onBlur, onFocus, onKeyDown, value, disabled, placeholder, ariaCurrentValueForInputs, contextRef, autoFocusHourInput, isFocused, }: HHInputsPropsT) => JSX.Element>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DSControlledDateTimePickerInternalsT } from '../../sharedTypes';
|
|
3
|
+
interface MeridiemInputsPropsT {
|
|
4
|
+
onChange: DSControlledDateTimePickerInternalsT.OnChangeFunc;
|
|
5
|
+
onBlur: DSControlledDateTimePickerInternalsT.OnBlurFunc;
|
|
6
|
+
onFocus: DSControlledDateTimePickerInternalsT.OnFocusFunc;
|
|
7
|
+
onKeyDown: DSControlledDateTimePickerInternalsT.OnKeyDown;
|
|
8
|
+
value: string;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
contextRef: React.MutableRefObject<HTMLInputElement | null>;
|
|
11
|
+
placeholder: string;
|
|
12
|
+
ariaCurrentValueForInputs: string;
|
|
13
|
+
isFocused: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const MeridiemInput: React.MemoExoticComponent<({ onChange, onBlur, onFocus, onKeyDown, value, disabled, placeholder, ariaCurrentValueForInputs, contextRef, isFocused, }: MeridiemInputsPropsT) => JSX.Element>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DSControlledDateTimePickerInternalsT } from '../../sharedTypes';
|
|
3
|
+
interface MinutesInputsPropsT {
|
|
4
|
+
onChange: DSControlledDateTimePickerInternalsT.OnChangeFunc;
|
|
5
|
+
onBlur: DSControlledDateTimePickerInternalsT.OnBlurFunc;
|
|
6
|
+
onFocus: DSControlledDateTimePickerInternalsT.OnFocusFunc;
|
|
7
|
+
onKeyDown: DSControlledDateTimePickerInternalsT.OnKeyDown;
|
|
8
|
+
value: string;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
contextRef: React.MutableRefObject<HTMLInputElement | null>;
|
|
11
|
+
placeholder: string;
|
|
12
|
+
ariaCurrentValueForInputs: string;
|
|
13
|
+
isFocused: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const MinutesInput: React.MemoExoticComponent<({ onChange, onBlur, onFocus, onKeyDown, value, disabled, placeholder, ariaCurrentValueForInputs, contextRef, isFocused, }: MinutesInputsPropsT) => JSX.Element>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TimeInputs: () => JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { DSControlledDateTimePickerInternalsT } from '../../sharedTypes';
|
|
2
|
+
interface UseTimeInputsR {
|
|
3
|
+
autoFocusHourInput: boolean;
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
handleChangeHours: DSControlledDateTimePickerInternalsT.HandleOnChangeFunc;
|
|
6
|
+
onHoursChange: DSControlledDateTimePickerInternalsT.OnChangeFunc;
|
|
7
|
+
handleChangeMinutes: DSControlledDateTimePickerInternalsT.HandleOnChangeFunc;
|
|
8
|
+
onMinutesChange: DSControlledDateTimePickerInternalsT.OnChangeFunc;
|
|
9
|
+
handleChangeMeridiem: DSControlledDateTimePickerInternalsT.HandleOnChangeFunc;
|
|
10
|
+
onMeridiemChange: DSControlledDateTimePickerInternalsT.OnChangeFunc;
|
|
11
|
+
onHoursFocus: DSControlledDateTimePickerInternalsT.OnFocusFunc;
|
|
12
|
+
onMinutesFocus: DSControlledDateTimePickerInternalsT.OnFocusFunc;
|
|
13
|
+
onMeridiemFocus: DSControlledDateTimePickerInternalsT.OnFocusFunc;
|
|
14
|
+
onHoursBlur: DSControlledDateTimePickerInternalsT.OnBlurFunc;
|
|
15
|
+
onMinutesBlur: DSControlledDateTimePickerInternalsT.OnBlurFunc;
|
|
16
|
+
onMeridiemBlur: DSControlledDateTimePickerInternalsT.OnBlurFunc;
|
|
17
|
+
onHoursKeyDown: DSControlledDateTimePickerInternalsT.OnKeyDown;
|
|
18
|
+
onMinutesKeyDown: DSControlledDateTimePickerInternalsT.OnKeyDown;
|
|
19
|
+
onMeridiemKeyDown: DSControlledDateTimePickerInternalsT.OnKeyDown;
|
|
20
|
+
}
|
|
21
|
+
export declare const useTimeInputs: () => UseTimeInputsR;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { WeakValidationMap } from 'react';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
export declare namespace DSControlledDateTimePickerT {
|
|
4
|
+
type OnInternalValuesChangeEvent = React.ChangeEvent<HTMLInputElement> | React.KeyboardEvent<HTMLInputElement> | React.KeyboardEvent<HTMLButtonElement> | React.KeyboardEvent | React.MouseEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement>;
|
|
5
|
+
type ControlTypes = 'full-date-time' | 'date-time-inputs' | 'date-time-picker' | 'date-time-picker-controller-only' | 'full-date' | 'date-inputs' | 'date-picker' | 'date-picker-controller-only' | 'full-time' | 'time-inputs' | 'time-picker' | 'time-picker-controller-only';
|
|
6
|
+
interface InternalInputsChangeMetaInfo {
|
|
7
|
+
isAutomaticFillTrigger?: boolean;
|
|
8
|
+
isDayPresentInMonth?: boolean;
|
|
9
|
+
isOutOfRangeDay?: boolean;
|
|
10
|
+
isDisabledDay?: boolean;
|
|
11
|
+
isDisabledTime?: boolean;
|
|
12
|
+
suggestedErrorMsg?: string;
|
|
13
|
+
newDateTimeString?: string;
|
|
14
|
+
newDateString?: string;
|
|
15
|
+
newTimeString?: string;
|
|
16
|
+
}
|
|
17
|
+
type OnDateChange = (val: string, metaInfo: InternalInputsChangeMetaInfo) => void;
|
|
18
|
+
type OnTimeChange = (val: string, metaInfo: InternalInputsChangeMetaInfo) => void;
|
|
19
|
+
type OnDateTimeChange = (val: string, metaInfo: InternalInputsChangeMetaInfo) => void;
|
|
20
|
+
type OnInternalInputsChange = (val: string, e: OnInternalValuesChangeEvent, metaInfo?: InternalInputsChangeMetaInfo) => void;
|
|
21
|
+
type AppOnInputChange = (val: string, e: OnInternalValuesChangeEvent, metaInfo: InternalInputsChangeMetaInfo) => void;
|
|
22
|
+
interface DefaultDateProps {
|
|
23
|
+
onMonthChange: AppOnInputChange;
|
|
24
|
+
onDayChange: AppOnInputChange;
|
|
25
|
+
onYearChange: AppOnInputChange;
|
|
26
|
+
onPickerOpen: NoopishFunc;
|
|
27
|
+
onPickerClose: NoopishFunc;
|
|
28
|
+
getIsDisabledDay: BooleanGetter<string>;
|
|
29
|
+
getIsOutOfRangeDay: BooleanGetter<string>;
|
|
30
|
+
getIsStartRangeDay: BooleanGetter<string>;
|
|
31
|
+
getIsDayInRange: BooleanGetter<string>;
|
|
32
|
+
getIsEndRangeDay: BooleanGetter<string>;
|
|
33
|
+
isClearable: boolean;
|
|
34
|
+
disabled: boolean;
|
|
35
|
+
hasError: boolean;
|
|
36
|
+
autoFocus: boolean;
|
|
37
|
+
preventCloseOnSelection: boolean;
|
|
38
|
+
}
|
|
39
|
+
interface OptionalDatePickerProps {
|
|
40
|
+
emptyPickerStartingMonth?: string;
|
|
41
|
+
onCalendarOpenFocusedDay?: string;
|
|
42
|
+
pickerFooterMsg?: string;
|
|
43
|
+
innerRef?: React.MutableRefObject<HTMLInputElement | HTMLButtonElement>;
|
|
44
|
+
}
|
|
45
|
+
interface RequiredDatePickerProps {
|
|
46
|
+
type: 'full-date' | 'date-inputs' | 'date-picker' | 'date-picker-controller-only';
|
|
47
|
+
date: string;
|
|
48
|
+
onDateChange: OnDateChange;
|
|
49
|
+
}
|
|
50
|
+
type DatePickerProps = OptionalDatePickerProps & Partial<DefaultDateProps> & RequiredDatePickerProps;
|
|
51
|
+
type InternalDatePickerProps = OptionalDatePickerProps & DefaultDateProps & RequiredDatePickerProps;
|
|
52
|
+
interface DefaultTimeProps {
|
|
53
|
+
onHourChange: AppOnInputChange;
|
|
54
|
+
onMinuteChange: AppOnInputChange;
|
|
55
|
+
onMeridiemChange: AppOnInputChange;
|
|
56
|
+
onPickerOpen: NoopishFunc;
|
|
57
|
+
onPickerClose: NoopishFunc;
|
|
58
|
+
getIsDisabledTime: BooleanGetter<string>;
|
|
59
|
+
minutesInterval: number;
|
|
60
|
+
isClearable: boolean;
|
|
61
|
+
disabled: boolean;
|
|
62
|
+
hasError: boolean;
|
|
63
|
+
autoFocus: boolean;
|
|
64
|
+
preventCloseOnSelection: boolean;
|
|
65
|
+
}
|
|
66
|
+
interface OptionalTimePickerProps {
|
|
67
|
+
pickerFooterMsg?: string;
|
|
68
|
+
onTimeWheelOpenStartingTime?: string;
|
|
69
|
+
innerRef?: React.MutableRefObject<HTMLInputElement | HTMLButtonElement>;
|
|
70
|
+
}
|
|
71
|
+
interface RequiredTimePickerProps {
|
|
72
|
+
type: 'full-time' | 'time-inputs' | 'time-picker' | 'time-picker-controller-only';
|
|
73
|
+
time: string;
|
|
74
|
+
onTimeChange: OnTimeChange;
|
|
75
|
+
}
|
|
76
|
+
type TimePickerProps = OptionalTimePickerProps & Partial<DefaultTimeProps> & RequiredTimePickerProps;
|
|
77
|
+
type InternalTimePickerProps = OptionalTimePickerProps & DefaultTimeProps & RequiredTimePickerProps;
|
|
78
|
+
type DefaultDateTimeProps = DefaultTimeProps & DefaultDateProps & {
|
|
79
|
+
onDateChange: OnDateChange;
|
|
80
|
+
onTimeChange: OnTimeChange;
|
|
81
|
+
};
|
|
82
|
+
type OptionalDateTimeProps = OptionalTimePickerProps & OptionalDatePickerProps;
|
|
83
|
+
interface RequiredDateTimeProps {
|
|
84
|
+
type: 'full-date-time' | 'date-time-inputs' | 'date-time-picker' | 'date-time-picker-controller-only';
|
|
85
|
+
dateTime: string;
|
|
86
|
+
onDateTimeChange: OnDateTimeChange;
|
|
87
|
+
}
|
|
88
|
+
type DateTimePickerProps = Partial<DefaultDateTimeProps> & OptionalDateTimeProps & RequiredDateTimeProps;
|
|
89
|
+
type InternalDateTimePickerProps = DefaultDateTimeProps & OptionalDateTimeProps & RequiredDateTimeProps;
|
|
90
|
+
type DefaultProps = DefaultDateTimeProps & {
|
|
91
|
+
type: 'full-date-time';
|
|
92
|
+
};
|
|
93
|
+
type Props = DateTimePickerProps | DatePickerProps | TimePickerProps;
|
|
94
|
+
type InternalProps = InternalDateTimePickerProps | InternalDatePickerProps | InternalTimePickerProps;
|
|
95
|
+
}
|
|
96
|
+
export declare const defaultProps: DSControlledDateTimePickerT.DefaultProps;
|
|
97
|
+
export declare const propTypes: WeakValidationMap<unknown>;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { DSControlledDateTimePickerT } from './propTypes';
|
|
3
|
+
export declare namespace DSControlledDateTimePickerInternalsT {
|
|
4
|
+
type DateDay = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31;
|
|
5
|
+
type DateMonth = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
|
|
6
|
+
interface MetaMonthDay {
|
|
7
|
+
day: Date;
|
|
8
|
+
dayAsString: string;
|
|
9
|
+
isPrevMonthDay: boolean;
|
|
10
|
+
isNextMonthDay: boolean;
|
|
11
|
+
isCurrMonthDay: boolean;
|
|
12
|
+
isHidden: boolean;
|
|
13
|
+
dayBtnRef: React.MutableRefObject<HTMLButtonElement>;
|
|
14
|
+
}
|
|
15
|
+
type OnKeyDown<HTMLT = HTMLInputElement> = (e: React.KeyboardEvent<HTMLT>) => void;
|
|
16
|
+
type OnChangeFunc = (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
17
|
+
type OnDSBtnClick = (e: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement> | React.KeyboardEvent) => void;
|
|
18
|
+
type HandleOnChangeFunc = (newVal: string, e: DSControlledDateTimePickerT.OnInternalValuesChangeEvent, metaInfo?: DSControlledDateTimePickerT.InternalInputsChangeMetaInfo) => void;
|
|
19
|
+
type OnBlurFunc = (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
20
|
+
type OnFocusFunc = (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
21
|
+
interface UseDateInputsR {
|
|
22
|
+
month: string;
|
|
23
|
+
day: string;
|
|
24
|
+
year: string;
|
|
25
|
+
autoFocusMonthInput: boolean;
|
|
26
|
+
innerRefMonthInput?: false | React.MutableRefObject<HTMLInputElement | HTMLButtonElement>;
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
onMonthChange: OnChangeFunc;
|
|
29
|
+
onDayChange: OnChangeFunc;
|
|
30
|
+
onYearChange: OnChangeFunc;
|
|
31
|
+
onMonthFocus: OnFocusFunc;
|
|
32
|
+
onDayFocus: OnFocusFunc;
|
|
33
|
+
onYearFocus: OnFocusFunc;
|
|
34
|
+
onMonthBlur: OnBlurFunc;
|
|
35
|
+
onDayBlur: OnBlurFunc;
|
|
36
|
+
onYearBlur: OnBlurFunc;
|
|
37
|
+
onMonthKeyDown: OnKeyDown;
|
|
38
|
+
onDayKeyDown: OnKeyDown;
|
|
39
|
+
onYearKeyDown: OnKeyDown;
|
|
40
|
+
}
|
|
41
|
+
interface InputsReferences {
|
|
42
|
+
monthInputRef: React.RefObject<HTMLInputElement>;
|
|
43
|
+
dayInputRef: React.RefObject<HTMLInputElement>;
|
|
44
|
+
yearInputRef: React.RefObject<HTMLInputElement>;
|
|
45
|
+
hourInputRef: React.RefObject<HTMLInputElement>;
|
|
46
|
+
minutesInputRef: React.RefObject<HTMLInputElement>;
|
|
47
|
+
meridiemInputRef: React.RefObject<HTMLInputElement>;
|
|
48
|
+
clearButtonRef: React.MutableRefObject<HTMLButtonElement>;
|
|
49
|
+
pickerButtonRef: React.MutableRefObject<HTMLButtonElement>;
|
|
50
|
+
}
|
|
51
|
+
interface CalendarReferences {
|
|
52
|
+
prevYearBtnRef: React.MutableRefObject<HTMLButtonElement>;
|
|
53
|
+
prevMonthBtnRef: React.MutableRefObject<HTMLButtonElement>;
|
|
54
|
+
nextMonthBtnRef: React.MutableRefObject<HTMLButtonElement>;
|
|
55
|
+
nextYearBtnRef: React.MutableRefObject<HTMLButtonElement>;
|
|
56
|
+
calendarDaysWrapperRef: React.MutableRefObject<HTMLDivElement>;
|
|
57
|
+
}
|
|
58
|
+
interface TimewheelReferences {
|
|
59
|
+
prevHourBtnRef: React.MutableRefObject<HTMLButtonElement>;
|
|
60
|
+
currHourBtnRef: React.MutableRefObject<HTMLButtonElement>;
|
|
61
|
+
nextHourBtnRef: React.MutableRefObject<HTMLButtonElement>;
|
|
62
|
+
prevMinutesBtnRef: React.MutableRefObject<HTMLButtonElement>;
|
|
63
|
+
currMinutesBtnRef: React.MutableRefObject<HTMLButtonElement>;
|
|
64
|
+
nextMinutesBtnRef: React.MutableRefObject<HTMLButtonElement>;
|
|
65
|
+
prevMeridiemBtnRef: React.MutableRefObject<HTMLButtonElement>;
|
|
66
|
+
currMeridiemBtnRef: React.MutableRefObject<HTMLButtonElement>;
|
|
67
|
+
nextMeridiemBtnRef: React.MutableRefObject<HTMLButtonElement>;
|
|
68
|
+
}
|
|
69
|
+
interface InternalPrecalculatedFlags {
|
|
70
|
+
isControllerOnly: boolean;
|
|
71
|
+
shouldPreserveClearableSpace: boolean;
|
|
72
|
+
isWithTimeWheelToo: boolean;
|
|
73
|
+
isWithCalendarToo: boolean;
|
|
74
|
+
isWithDateInputs: boolean;
|
|
75
|
+
isWithDateInputsOnly: boolean;
|
|
76
|
+
isWithTimeInputs: boolean;
|
|
77
|
+
isWithTimeInputsOnly: boolean;
|
|
78
|
+
autoFocusMonthInput: boolean;
|
|
79
|
+
autoFocusHourInput: boolean;
|
|
80
|
+
autoFocusPrevMonthArrow: boolean;
|
|
81
|
+
autoFocusHourTimeWheel: boolean;
|
|
82
|
+
hideDate: boolean;
|
|
83
|
+
hideTime: boolean;
|
|
84
|
+
hideDateTimePicker: boolean;
|
|
85
|
+
hideDatePicker: boolean;
|
|
86
|
+
hideTimePicker: boolean;
|
|
87
|
+
withAnyInputs: boolean;
|
|
88
|
+
withAnyPicker: boolean;
|
|
89
|
+
withClearBtn: boolean;
|
|
90
|
+
withAnyRightController: boolean;
|
|
91
|
+
isDateSelector: boolean;
|
|
92
|
+
isTimeSelector: boolean;
|
|
93
|
+
isDateTimeSelector: boolean;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare const weekDays: readonly ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
|
|
2
|
+
export declare const monthNames: readonly ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
3
|
+
export declare const announcableCardinalDays: {
|
|
4
|
+
readonly 1: "first";
|
|
5
|
+
readonly 2: "second";
|
|
6
|
+
readonly 3: "third";
|
|
7
|
+
readonly 4: "fourth";
|
|
8
|
+
readonly 5: "fifth";
|
|
9
|
+
readonly 6: "sixth";
|
|
10
|
+
readonly 7: "seventh";
|
|
11
|
+
readonly 8: "eighth";
|
|
12
|
+
readonly 9: "ninth";
|
|
13
|
+
readonly 10: "tenth";
|
|
14
|
+
readonly 11: "eleventh";
|
|
15
|
+
readonly 12: "twelfth";
|
|
16
|
+
readonly 13: "thirteenth";
|
|
17
|
+
readonly 14: "fourteenth";
|
|
18
|
+
readonly 15: "fifteenth";
|
|
19
|
+
readonly 16: "sixteenth";
|
|
20
|
+
readonly 17: "seventeenth";
|
|
21
|
+
readonly 18: "eighteenth";
|
|
22
|
+
readonly 19: "ninteenth";
|
|
23
|
+
readonly 20: "twentieth";
|
|
24
|
+
readonly 21: "twentie first";
|
|
25
|
+
readonly 22: "twentie second";
|
|
26
|
+
readonly 23: "twentie third";
|
|
27
|
+
readonly 24: "twentie fourth";
|
|
28
|
+
readonly 25: "twentie fifth";
|
|
29
|
+
readonly 26: "twentie sixth";
|
|
30
|
+
readonly 27: "twentie seventh";
|
|
31
|
+
readonly 28: "twentie eighth";
|
|
32
|
+
readonly 29: "twentie ninth";
|
|
33
|
+
readonly 30: "thirtieth";
|
|
34
|
+
readonly 31: "thirty first";
|
|
35
|
+
};
|
|
36
|
+
export declare const defaultMetaInfo: {
|
|
37
|
+
isAutomaticFillTrigger: boolean;
|
|
38
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { DSControlledDateTimePickerT } from '../propTypes';
|
|
2
|
+
import type { DSControlledDateTimePickerInternalsT } from '../sharedTypes';
|
|
3
|
+
export declare const getDateValuesFromDate: (day: Date) => DateValuesT;
|
|
4
|
+
export declare const getDateStringFromDay: (day: Date) => string;
|
|
5
|
+
export declare const getTimeStringFromDay: (day: Date) => string;
|
|
6
|
+
export declare const getMonthNameByMonthNumber: (monthNumber: number) => string;
|
|
7
|
+
export declare const isSameDateMoment: (dateA: Date, dateB: Date) => boolean;
|
|
8
|
+
export declare const compareTwoDatesDayEquality: (dayA: Date, dayB: Date) => boolean;
|
|
9
|
+
export declare const getLastDayOfMonth: (month: DSControlledDateTimePickerInternalsT.DateMonth, year: number) => Date;
|
|
10
|
+
export declare const isValidDayForTheMonth: (month: DSControlledDateTimePickerInternalsT.DateMonth, year: number, day: DSControlledDateTimePickerInternalsT.DateDay) => boolean;
|
|
11
|
+
export declare const getDayFromDateString: (dateString: string) => Date | null;
|
|
12
|
+
export declare const isValidDayForTheMonthDateString: (dateString: string) => boolean;
|
|
13
|
+
export declare const getValidationDateStringMetaInfo: (dateString: string, getIsOutOfRangeDay?: (day: string) => boolean, getIsDisabledDay?: (day: string) => boolean) => Partial<DSControlledDateTimePickerT.InternalInputsChangeMetaInfo>;
|
|
14
|
+
export declare const isLeapYear: (year: number) => boolean;
|
|
15
|
+
export declare const getHowManyDaysInMonth: (year: number, month: number) => number;
|
|
16
|
+
export declare const dateIsLeapYear: (date: Date) => boolean;
|
|
17
|
+
export declare const dateGetDaysInMonth: (date: Date) => number;
|
|
18
|
+
export declare const dateAddMonths: (date: Date, value: number) => Date;
|
|
19
|
+
export declare const dateAddYear: (date: Date, value: number) => Date;
|
|
20
|
+
interface DateValuesT {
|
|
21
|
+
month: DSControlledDateTimePickerInternalsT.DateMonth;
|
|
22
|
+
year: number;
|
|
23
|
+
day?: DSControlledDateTimePickerInternalsT.DateDay;
|
|
24
|
+
}
|
|
25
|
+
interface DateSumValuesT {
|
|
26
|
+
monthsToSum?: number;
|
|
27
|
+
yearsToSum?: number;
|
|
28
|
+
daysToSum?: number;
|
|
29
|
+
}
|
|
30
|
+
export declare const sumFromDateValues: ({ month, year, day }: DateValuesT, { monthsToSum, yearsToSum, daysToSum }: DateSumValuesT) => DateValuesT;
|
|
31
|
+
export declare const sumValuesToDate: (day: Date, sumValues: DateSumValuesT) => Date;
|
|
32
|
+
export declare const subtractYears: (date: Date, howManyMore?: number) => Date;
|
|
33
|
+
export declare const subtractMonths: (date: Date, howManyMore?: number) => Date;
|
|
34
|
+
export declare const sumMonths: (date: Date, howManyMore?: number) => Date;
|
|
35
|
+
export declare const sumYears: (date: Date, howManyMore?: number) => Date;
|
|
36
|
+
export declare const getDaysInMonth: (month: number, year: number) => Date[];
|
|
37
|
+
export declare const getLastXDaysFromPreviousMonth: (month: number, year: number, howMany: number) => Date[];
|
|
38
|
+
export declare const getFirstXDaysFromNextMonth: (month: number, year: number, howMany: number) => Date[];
|
|
39
|
+
export declare const getFiveBySevenCurrentMonthDaysMatrix: (month: number, year: number) => DSControlledDateTimePickerInternalsT.MetaMonthDay[];
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DSControlledDateTimePickerT } from '../propTypes';
|
|
2
|
+
interface Validators {
|
|
3
|
+
getIsOutOfRangeDay: (day: string) => boolean;
|
|
4
|
+
getIsDisabledDay: (day: string) => boolean;
|
|
5
|
+
getIsDisabledTime: (val: string) => boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const getValidationDateTimeStringMetaInfo: (dateString: string, timeString: string, validators: Validators) => Partial<DSControlledDateTimePickerT.InternalInputsChangeMetaInfo>;
|
|
8
|
+
export {};
|