import { MutableRefObject } from 'react'; export type RawInfoType = { startTime: string | number; endTime: string | number; granularity?: number; timeInterval?: number; timeSpanKey?: string; previous?: SelectOptions | null; }; export type TimeRangePickerChange = { startTime: number; endTime: number; timePeriod: number; granularity: number; raw: RawInfoType; previous: SelectOptions | null; isFrist: boolean; isRelative: boolean; isInterval: boolean; }; export type ITimeRef = { refresh: () => void; refreshCache: () => void; }; export type TimeRangePicker = { timeRef?: MutableRefObject | undefined>; className?: string; defaultValue?: RawInfoType; value?: RawInfoType; disabled?: boolean; size?: 'large' | 'middle' | 'small'; format?: string; locale?: 'en' | 'zh'; showTimeSpan?: boolean; showTimeInterval?: boolean; showTimeGranularity?: boolean; showTimePrevious?: boolean; showHandShank?: boolean; mask?: boolean; isReadCache?: boolean; isWriteCache?: boolean; onChange?: (obj: TimeRangePickerChange) => void; [key: string]: any; }; export type TimeType = 'years' | 'months' | 'weeks' | 'days' | 'hours' | 'minutes' | 'seconds'; export type SelectOptions = { label: string; value: string | number; type?: TimeType; [key: string]: any; }; export type ScopeList = { name: string; value: string[]; }; export type TimeGranularity = { gName: string; gValue: number; defaultVal: number; scopeData: SelectOptions[]; };