/// import { BorderType, InputSiteType } from '../input/input'; import { DisabledDataProps } from './date-picker'; export declare type WeekTitleType = [string, string, string, string, string, string, string]; export declare type MonthTitleType = [string, string, string, string, string, string, string, string, string, string, string, string]; export interface Locale { 'DatePicker.placeholder': string; 'DatePicker.yearPlaceholder': string; 'DatePicker.quarterPlaceholder': string; 'DatePicker.monthPlaceholder': string; 'DatePicker.weekPlaceholder': string; 'DatePicker.timePlaceholder': string; 'DatePicker.now': string; 'DatePicker.confrim': string; 'DatePicker.today': string; 'DatePicker.year': string; 'DatePicker.month': string; 'DatePicker.weekTitle': WeekTitleType; 'DatePicker.monthTitle': MonthTitleType; 'DatePicker.rangePlaceholder': [string, string]; 'DatePicker.rangeYearPlaceholder': [string, string]; 'DatePicker.rangeMonthPlaceholder': [string, string]; 'DatePicker.rangeWeekPlaceholder': [string, string]; 'DatePicker.rangeQuarterPlaceholder': [string, string]; 'DatePicker.rangeTimePlaceholder': [string, string]; 'DatePicker.monthBeforeYear': boolean; } export interface InnerLocale { locale: string; placeholder: string; yearPlaceholder: string; quarterPlaceholder: string; monthPlaceholder: string; weekPlaceholder: string; timePlaceholder: string; now: string; confrim: string; today: string; year: string; month: string; weekTitle: WeekTitleType; monthTitle: MonthTitleType; rangePlaceholder: [string, string]; rangeYearPlaceholder: [string, string]; rangeMonthPlaceholder: [string, string]; rangeWeekPlaceholder: [string, string]; rangeQuarterPlaceholder: [string, string]; rangeTimePlaceholder: [string, string]; monthBeforeYear: boolean; } export declare type InnerLocaleKey = keyof InnerLocale; export declare type PanelMode = 'time' | 'date' | 'week' | 'month' | 'quarter' | 'year' | 'decade'; export declare type PickerMode = Exclude; export declare type DateType = Date; export declare type CustomFormat = (value: DateType) => string; export declare type DateFormat = string; export declare type DateFormats = Array; export declare type NullableDateType = DateType | null | undefined; export declare type OnSelect = (value: DateType, type: 'key' | 'mouse' | 'submit') => void; export interface DisabledTimes { disabledHours?: () => number[]; disabledMinutes?: (hour: number) => number[]; disabledSeconds?: (hour: number, minute: number) => number[]; } export declare type DisabledTime = (date: DateType | null) => DisabledTimes; export declare type OnPanelChange = (value: DateType, mode: PanelMode) => void; export declare type EventValue = DateType | null; export declare type RangeValue = [EventValue, EventValue] | null; export declare type RangeList = { label: string; onClick: () => void; onMouseEnter: () => void; onMouseLeave: () => void; }[]; export interface Components { button?: React.ComponentType | string; rangeItem?: React.ComponentType | string; } export interface PanelSharedProps { value?: NullableDateType; defaultPickerValue?: DateType; locale: InnerLocale; disabledDate?: DisabledDataProps; prevIcon?: React.ReactNode; nextIcon?: React.ReactNode; superPrevIcon?: React.ReactNode; superNextIcon?: React.ReactNode; } export declare type DateRender = (currentDate: DateType, today: DateType) => React.ReactNode; export declare type CellRender = (currentDate: DateType) => React.ReactNode; export declare type RangeType = 'start' | 'end'; export interface RangeInfo { range: RangeType; } export declare type RangeDateRender = (currentDate: DateType, today: DateType, info: RangeInfo) => React.ReactNode; export interface SharedTimeProps extends DisabledTimes { format?: string; showNow?: boolean; showHour?: boolean; showMinute?: boolean; showSecond?: boolean; use12Hours?: boolean; hourStep?: number; minuteStep?: number; secondStep?: number; hideDisabledOptions?: boolean; defaultValue?: DateType; } export interface OutInputCommonProps { format: DateFormat; picker: PickerMode; id?: string; autoFocus?: boolean; allowClear?: boolean; className?: string; borderType?: BorderType; style?: React.CSSProperties; size?: InputSiteType; readOnly?: boolean; suffixIcon?: React.ReactNode; clearIcon?: React.ReactNode; onFocus?: React.FocusEventHandler; onBlur?: React.FocusEventHandler; onMouseDown?: React.MouseEventHandler; onMouseUp?: React.MouseEventHandler; onMouseEnter?: React.MouseEventHandler; onMouseLeave?: React.MouseEventHandler; onClick?: React.MouseEventHandler; onContextMenu?: React.MouseEventHandler; } export interface InputCommonProps { panelDivRef: React.RefObject; needConfirmButton: boolean; open: boolean; prefixCls: string; locale: InnerLocale; dataOrAriaProps?: Record; status?: 'error'; } export interface OutPopperProps { dropdownClassName?: string; popupStyle?: React.CSSProperties; showArrow?: boolean; } export interface TimeUnit { label: React.ReactText; value: number; disabled: boolean; }