import { BasicTreeSelectInnerData, BasicTreeSelectProps, BasicTriggerRenderProps, Size } from '@douyinfe/semi-foundation/lib/es/treeSelect/foundation'; import '@douyinfe/semi-foundation/lib/es/tree/tree.css'; import '@douyinfe/semi-foundation/lib/es/treeSelect/treeSelect.css'; import { ValidateStatus } from '../_base/baseComponent'; import { InputProps } from '../input/index'; import type { TreeNodeData, TreeProps, TreeState } from '../tree/interface'; import { Motion } from '../_base/base'; import { CSSProperties, VNode } from 'vue'; import { AriaAttributes } from '../AriaAttributes'; import { CombineProps, VueJsxNode } from '../interface'; import { PopoverProps } from '../popover/index'; export type ListItemKeySelector = (index: number, data: T) => string | number; export type ExpandAction = false | 'click' | 'doubleClick'; export interface TriggerRenderProps extends Omit { [x: string]: any; componentProps: TreeSelectProps; value: TreeNodeData[]; onClear: (e: MouseEvent) => void; } export interface OnChange { (value: TreeNodeData['value'] | Array, node: TreeNodeData[] | TreeNodeData, e: MouseEvent): void; (node: TreeNodeData[] | TreeNodeData, e: MouseEvent): void; } export type RenderSelectedItemInSingle = (treeNode: TreeNodeData) => VueJsxNode; export type RenderSelectedItemInMultiple = (treeNode: TreeNodeData, otherProps: { index: number | string; onClose: (tagContent: any, e: MouseEvent) => void; }) => { isRenderInTag: boolean; content: VueJsxNode; }; export type RenderSelectedItem = RenderSelectedItemInSingle | RenderSelectedItemInMultiple; export type OverrideCommonProps = 'renderFullLabel' | 'renderLabel' | 'defaultValue' | 'emptyContent' | 'filterTreeNode' | 'style' | 'treeData' | 'value' | 'onExpand' | 'keyMaps' | 'showLine'; /** * Type definition description: * TreeSelectProps inherits some properties from BasicTreeSelectProps (from foundation) and TreeProps (from semi-ui-react). */ export interface TreeSelectProps extends Omit, Pick { 'aria-describedby'?: AriaAttributes['aria-describedby']; 'aria-errormessage'?: AriaAttributes['aria-errormessage']; 'aria-invalid'?: AriaAttributes['aria-invalid']; 'aria-labelledby'?: AriaAttributes['aria-labelledby']; 'aria-required'?: AriaAttributes['aria-required']; motion?: Motion; mouseEnterDelay?: number; mouseLeaveDelay?: number; arrowIcon?: VueJsxNode; clearIcon?: VueJsxNode; autoAdjustOverflow?: boolean; clickToHide?: boolean; defaultOpen?: boolean; dropdownClassName?: string; dropdownMatchSelectWidth?: boolean; dropdownStyle?: CSSProperties; dropdownMargin?: PopoverProps['margin']; insetLabel?: VueJsxNode; insetLabelId?: string; maxTagCount?: number; motionExpand?: boolean; optionListStyle?: CSSProperties; outerBottomSlot?: VueJsxNode; outerTopSlot?: VueJsxNode; placeholder?: string; prefix?: VueJsxNode; position?: PopoverProps['position']; searchAutoFocus?: boolean; searchPlaceholder?: string; showSearchClear?: boolean; size?: Size; suffix?: VueJsxNode; treeNodeLabelProp?: string; validateStatus?: ValidateStatus; zIndex?: number; searchPosition?: string; stopPropagation?: boolean | string; restTagsPopoverProps?: PopoverProps; expandIcon?: VNode | ((props: { onClick: (e: MouseEvent) => void; className: string; expanded: boolean; }) => VNode); searchRender?: boolean | ((inputProps: InputProps) => VueJsxNode); onSelect?: (selectedKey: string, selected: boolean, selectedNode: TreeNodeData) => void; renderSelectedItem?: RenderSelectedItem; getPopupContainer?: () => HTMLElement; triggerRender?: (props?: TriggerRenderProps) => VueJsxNode; onBlur?: (e: MouseEvent) => void; onChange?: OnChange; onFocus?: (e: MouseEvent) => void; onVisibleChange?: (isVisible: boolean) => void; onClear?: (e: MouseEvent | KeyboardEvent) => void; autoMergeValue?: boolean; id?: string; } export type OverrideCommonState = 'keyEntities' | 'treeData' | 'disabledKeys' | 'flattenNodes'; export interface TreeSelectState extends Omit, Pick { inputTriggerFocus: boolean; isOpen: boolean; rePosKey: number; dropdownMinWidth: null | number; isHovering: boolean; prevProps: TreeSelectProps; isFocus: boolean; } export declare const vuePropsType: CombineProps; declare const TreeSelect: import("vue").DefineComponent>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; export default TreeSelect;