import { InputProps } from '../input'; import { PopupProps } from '../popup'; import { SelectInputProps, SelectInputBlurContext, SelectInputValueChangeContext } from '../select-input'; import { TagProps } from '../tag'; import { TreeProps, TreeNodeModel } from '../tree'; import { PopupTriggerEvent, PopupTriggerSource } from '../popup'; import { TNode, TreeOptionData, TreeKeysType } from '../common'; export interface TdTreeSelectProps { autoWidth?: boolean; autofocus?: boolean; borderless?: boolean; clearable?: boolean; collapsedItems?: TNode<{ value: DataOption[]; collapsedSelectedItems: DataOption[]; count: number; }>; data?: Array; disabled?: boolean; empty?: string | TNode; filter?: (filterWords: string, option: DataOption) => boolean; filterable?: boolean; inputProps?: InputProps; inputValue?: string; defaultInputValue?: string; keys?: TreeKeysType; label?: string | TNode; loading?: boolean; loadingText?: string | TNode; max?: number; minCollapsedNum?: number; multiple?: boolean; panelBottomContent?: string | TNode; panelTopContent?: string | TNode; placeholder?: string; popupProps?: PopupProps; popupVisible?: boolean; defaultPopupVisible?: boolean; prefixIcon?: TNode; readonly?: boolean; reserveKeyword?: boolean; selectInputProps?: SelectInputProps; size?: 'small' | 'medium' | 'large'; status?: 'default' | 'success' | 'warning' | 'error'; suffix?: string | TNode; suffixIcon?: TNode; tagProps?: TagProps; tips?: string | TNode; treeProps?: TreeProps; value?: TreeValueType; defaultValue?: TreeValueType; valueDisplay?: string | TNode<{ value: TreeOptionData | TreeOptionData[]; onClose: (index: number) => void; }>; valueType?: 'value' | 'object'; onBlur?: (context: SelectInputBlurContext & { value: TreeSelectValue; }) => void; onChange?: (value: TreeValueType, context: TreeSelectChangeContext) => void; onClear?: (context: { e: MouseEvent; }) => void; onEnter?: (context: { inputValue: string; e: KeyboardEvent; value: TreeValueType; }) => void; onFocus?: (context: { value: TreeSelectValue; e: FocusEvent; }) => void; onInputChange?: (value: string, context: SelectInputValueChangeContext) => void; onPopupVisibleChange?: (visible: boolean, context: TreeSelectPopupVisibleContext) => void; onRemove?: (options: RemoveOptions) => void; onSearch?: (filterWords: string, context: { e: KeyboardEvent | SelectInputValueChangeContext['e']; }) => void; } export declare type TreeSelectValue = string | number | TreeOptionData | Array; export interface TreeSelectChangeContext { node: TreeNodeModel; data: DataOption; index?: number; trigger: TreeSelectValueChangeTrigger; e?: MouseEvent | KeyboardEvent | Event; } export declare type TreeSelectValueChangeTrigger = 'clear' | 'tag-remove' | 'backspace' | 'check' | 'uncheck'; export interface TreeSelectPopupVisibleContext { e?: PopupTriggerEvent | Event; node?: TreeNodeModel; trigger?: PopupTriggerSource | 'clear'; } export interface RemoveOptions { value: N; data: T; index: number; node: TreeNodeModel; e?: MouseEvent | KeyboardEvent; trigger: 'tag-remove' | 'backspace'; }