import { FocusEventHandler, KeyboardEvent, ReactNode } from 'react'; import { Dayjs } from 'dayjs'; import { PopperProps } from 'react-popper'; import { Strategy } from '@floating-ui/react'; import { TBaseInputProps, TBaseProps } from '../../types'; export declare enum CalendarType { BY_DAYS = "by_days", BY_MONTHS = "by_months", BY_YEARS = "by_years", TIME_PICKER = "time_picker" } export declare enum DateTimeControlName { BEGIN = "begin", DEFAULT_NAME = "singleDate", END = "end" } export declare enum TIME_FORMAT { FULL = "HH:mm:ss", SHORT = "HH:mm", HOURS_ONLY = "HH", WITH_MILLISECONDS = "HH:mm:ss.SSS", FULL_WITH_AMPM = "HH:mm:ss a", SHORT_WITH_AMPM = "h:mm a" } export declare enum ControlType { DATE_PICKER = "date-picker", DATE_INTERVAL = "date-interval" } export declare type DatePickerValue = Array<{ defaultTime?: string; name: string | null; value: string | null; }> | string | null; export declare type DateType = string | Dayjs | Date; export declare type Time = { hours: number; minutes: number; seconds: number; }; export declare type TimeExtended = Time & { hasDefaultTime: boolean; }; export declare type DefaultTime = Record; export declare type OnInputChangeHandler = (date: Dayjs | null, inputName: string, callback?: () => void) => void; export declare type PopperPositioningStrategy = PopperProps['strategy']; export declare type PopperPlacement = PopperProps['placement']; export declare type Locale = 'ru' | 'en'; declare type BaseDateProps = TBaseProps & { configLocale?: Locale; dateFormat: string; defaultTime?: string; max?: string; min?: string; openOnFocus?: boolean; outputFormat?: string; timeFormat?: TIME_FORMAT; }; export declare type DateTimeControlProps = BaseDateProps & Omit, 'onChange' | 'onBlur'> & { dateDivider?: string; onBlur?(value: string | null | Array): void; onChange?(value: string | null | Array): void; onFocus?: FocusEventHandler; onKeyDown?(evt: KeyboardEvent): void; popupPlacement?: PopperPlacement; strategy: PopperPositioningStrategy; type?: string; utc?: boolean; value: DatePickerValue; }; export declare type DatePickerProps = BaseDateProps & TBaseInputProps & { date?: DatePickerValue; defaultValue?: DatePickerValue; locale?: Locale; onBlur?(value: string | null | Array): void; onChange?(value: string | null | Array): void; onFocus?: FocusEventHandler; t?(str: string): string; }; declare type IntervalValue = { [DateTimeControlName.BEGIN]: string | null; [DateTimeControlName.END]: string | null; }; export declare type DateIntervalProps = BaseDateProps & TBaseInputProps & { dateDivider?: string; defaultValue?: IntervalValue; locale?: Locale; onBlur?(value: IntervalValue): void; onChange?(value: IntervalValue): void; strategy: Strategy; }; declare type Value = Record; export declare type DateInputGroupProps = BaseDateProps & Omit, 'onBlur' | 'onFocus'> & { inputClassName?: string; onBlur?(value: Dayjs | null, name: string): void; onFocus?: FocusEventHandler; onInputChange?: OnInputChangeHandler; onKeyDown?(evt: KeyboardEvent): void; setControlRef(el?: unknown): void; setVisibility(visible: boolean): void; value: Value; icon?: ReactNode | string; }; export declare type DayProps = TBaseProps & { current?: boolean; day: Dayjs; inputName: string; otherMonth?: boolean; select(day: Dayjs, name: string): void; selected?: boolean; }; export declare type PopUpProps = { dateFormat: string; isTimeSet: Record; locale: Locale; markTimeAsSet(str: string): void; max?: Dayjs | Date | string; min?: Dayjs | Date | string; select(day: Dayjs | null, inputName: string, close?: boolean): void; time: DefaultTime; timeFormat?: string; type?: string; value: Record; }; export declare type CalendarProps = { auto?: boolean; dateFormat: string; hasDefaultTime?: boolean; index: number; inputName: string; locale: 'en' | 'ru'; markTimeAsSet(str: string): void; max?: Dayjs | Date | string; min?: Dayjs | Date | string; select(day: Dayjs, name: string, type?: boolean): void; setPlacement?(): void; setVisibility?(): void; t(key: string): ReactNode; time: Time; timeFormat?: string; type?: string; value: Dayjs | null; values: Record; }; export {};