import React from "react"; import { AttributeValue } from "./AttributeSelect"; import { WithConfigProps } from "../_util/config-context"; export interface TagInputProps extends WithConfigProps { /** * 触发标签相关事件 */ dispatchTagEvent: (type: string, payload?: any) => void; /** * 所有属性集合 */ attributes: Array; /** * 是否为 Focus 态 */ isFocused: boolean; /** * 搜索框是否处于展开状态 */ active: boolean; /** * 输入框类型(用于修改标签值的 Input type 为 "edit") */ type?: "edit" | "add"; /** * 是否隐藏 */ hidden?: boolean; /** * 最大宽度 */ maxWidth: number; /** * 处理按键事件 */ handleKeyDown?: (e: any) => void; /** * 位置偏移 */ inputOffset?: number; } export interface InputState { inputWidth: number; inputValue: string; fullInputValue: string; attribute: AttributeValue; values: Array; showAttrSelect: boolean; showValueSelect: boolean; valueSelectOffset: number; } export declare class ITagInput extends React.Component { static contextType: React.Context; state: InputState; _scheduleUpdate: () => any; wrapperRef: React.RefObject; constructor(props: any); componentDidMount(): void; /** * 刷新下拉列表位置 */ scheduleUpdate: () => any; /** * 刷新选择组件显示 */ refreshShow: () => void; focusInput: () => void; moveToEnd: () => void; selectValue: () => void; selectAttr: () => void; setInfo(info: any, callback?: Function): void; setInputValue: (value: string, callback?: Function) => void; /** * 包含输入法过程的输入值 */ setFullInputValue: (value: string) => void; resetInput: (callback?: Function) => void; getInputValue: () => string; addTagByInputValue: () => boolean; handleInputChange: (value: any) => void; handleInputClick: (e: any) => void; handleAttrSelect: (attr: AttributeValue) => void; handleValueChange: (values: Array) => void; /** * 值选择组件完成选择 */ handleValueSelect: (values: Array) => void; /** * 值选择组件取消选择 */ handleValueCancel: () => void; /** * 处理粘贴事件 */ handlePaste: (e: any) => void; handleKeyDown: (e: React.KeyboardEvent) => void; getAttrStrAndValueStr: (str: string) => any; render(): JSX.Element; } export declare const TagInput: typeof ITagInput;