import React from 'react'; import dayjs from 'dayjs'; import { UIInputText } from 'components/Input/InputText'; import { PreparedSelectionRange } from './prepared_selection_range'; import { Picker } from './picker'; interface InputProps { label?: () => React.ReactElement; name: string; value: string | null | undefined; } interface UIRangePickerProps { formLabel: { label: string; showSelectedDays: boolean; }; inputProps: InputProps[]; isSticky: boolean; onApply?: () => void; onRangeChange?: (data: Array) => void; pastOnly: boolean; pickerAlign: 'left' | 'right'; preparedSelectionsInputProps: { name: string; value: string; }; retail?: boolean; showRangePicker?: boolean; siteCreatedAt?: string; timeZoneIdentifier: string; useTalkableInitialDate: boolean; includeTodayInRanges?: boolean; disableBefore?: string; weekStartsOn?: number; } interface UIRangePickerState { customRange: string | undefined; dates: { from: dayjs.Dayjs | undefined; to: dayjs.Dayjs | undefined; }; inputs: { errors: { from?: string; to?: string; }; focus: { from?: boolean; to?: boolean; }; values: { from: string; to: string; }; }; showRangePicker: boolean; disableBeforeDate: dayjs.Dayjs | undefined; } interface GetInitialFromToProps { date?: string | null; preparedSelection?: string; timeZoneIdentifier?: string; } interface GetInitialCustomRangeProps { from?: dayjs.Dayjs; preparedSelection?: string; to?: dayjs.Dayjs; } interface GetCustomRangeProps { from?: dayjs.Dayjs; to?: dayjs.Dayjs; } interface GetErrorsReturn { from: string; to: string; } export interface IPickerPosition { left?: string | number; position: 'fixed' | 'absolute'; right?: string | number; top: number; } export interface OnUpdateRangeProps { customOptionValue?: string; focus?: { from?: boolean; to?: boolean; }; from?: dayjs.Dayjs | Date | null; to?: dayjs.Dayjs | Date | null; } export declare class UIRangePicker extends React.Component { dayPickerRef: React.RefObject; inputFrom: React.RefObject; inputTo: React.RefObject; preparedSelectionRange: PreparedSelectionRange; static defaultProps: { inputProps: never[]; pastOnly: boolean; formLabel: {}; preparedSelectionsInputProps: {}; pickerAlign: string; isSticky: boolean; useTalkableInitialDate: boolean; includeTodayInRanges: boolean; }; constructor(props: UIRangePickerProps); didMountEffect: () => void; hideDayPickerEffect: () => void; componentDidMount(): void; componentDidUpdate(prevProps: UIRangePickerProps): void; getInitialFrom: ({ date, preparedSelection, timeZoneIdentifier, }: GetInitialFromToProps) => dayjs.Dayjs | undefined; getInitialTo: ({ date, preparedSelection, timeZoneIdentifier, }: GetInitialFromToProps) => dayjs.Dayjs | undefined; normalizeCustomRangeIndex: (currentRangeId: number) => string | undefined; getInitialCustomRange: ({ preparedSelection, from, to, }: GetInitialCustomRangeProps) => string | undefined; getCustomRange: ({ from, to }: GetCustomRangeProps) => string | undefined; showRangePicker: () => void; hideDayPicker: () => void; updateCustomRange: (customOptionValue?: string) => void; getErrors: () => GetErrorsReturn; inputValuesHasError: () => string; validateInputValue: ({ name, value }: { name: string; value: string; }) => void; onChangeInput: (name: string) => (event: React.ChangeEvent) => void; resetInputsToLastValidValue: (name: string) => void; handleApply: () => void; handleRangeChange: () => void; timeZoneValidation: (date: Date | dayjs.Dayjs) => dayjs.Dayjs; onUpdateRange: ({ from, to, focus, customOptionValue, }: OnUpdateRangeProps) => void; onFocusInput: (name: string) => () => void; onKeyPressInput: (event: any) => void; getPickerPosition: () => IPickerPosition | null; getInputZIndex: () => number; getSelectedDays: () => string; getSelectedDaysDescription: (days: number) => string; render(): React.ReactElement; } export {};