/** * @file 时间选择器的快捷键 */ import React from 'react'; import Sortable from 'sortablejs'; import { FormControlProps, Option } from 'amis-core'; import { BaseEventContext } from 'amis-editor-core'; declare const CertainPresetShorcut: { today: string; yesterday: string; thisweek: string; prevweek: string; thismonth: string; prevmonth: string; thisquarter: string; prevquarter: string; thisyear: string; }; declare const ModifyPresetShorcut: { $hoursago: string; $daysago: string; $dayslater: string; $weeksago: string; $weekslater: string; $monthsago: string; $monthslater: string; $quartersago: string; $quarterslater: string; $yearsago: string; $yearslater: string; }; export interface DateShortCutControlProps extends FormControlProps { className?: string; /** * 编辑器上下文数据,用于获取字段所在Form的其他字段 */ context: BaseEventContext; certainOptions: Array; modifyOptions: Array; } type PresetShorCutType = string; type CustomShortCutType = { label: string; startDate: string; endDate: string; }; type ModifyOptionType = { key: keyof typeof ModifyPresetShorcut; value: string; }; declare enum OptionType { Custom = 1, Certain = 2, Modify = 3 } interface OptionDataType { data: PresetShorCutType | CustomShortCutType | ModifyOptionType; type?: OptionType; } interface DateShortCutControlState { options: Array; } export declare class DateShortCutControl extends React.PureComponent { sortable?: Sortable; drag?: HTMLElement | null; target: HTMLElement | null; certainDropDownOptions: Array