import * as vue from 'vue'; import { Ref, ComputedRef, ExtractPropTypes } from 'vue'; import { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from './shared.type.js'; declare const autoCompleteProps: { _constants: { type: ObjectConstructor; default: () => { WARP_CLS: string; ITEM_CLS: string; }; }; autofocus: BooleanConstructor; clearable: { type: BooleanConstructor; default: () => boolean; }; customItem: StringConstructor; debounce: { type: NumberConstructor; default: () => number; }; disabled: BooleanConstructor; fetchSuggestions: FunctionConstructor; hideLoading: BooleanConstructor; highlightFirstItem: { type: BooleanConstructor; default: () => boolean; }; label: StringConstructor; maxlength: NumberConstructor; minlength: NumberConstructor; modelValue: StringConstructor; name: StringConstructor; placeholder: StringConstructor; placement: { type: StringConstructor; default: () => string; }; popperAppendToBody: { type: BooleanConstructor; default: () => boolean; }; popperClass: StringConstructor; popperOptions: ObjectConstructor; prefixIcon: (StringConstructor | ObjectConstructor)[]; selectWhenUnmatched: { type: BooleanConstructor; default: () => boolean; }; size: StringConstructor; suffixIcon: (StringConstructor | ObjectConstructor)[]; triggerOnFocus: { type: BooleanConstructor; default: () => boolean; }; valueKey: { type: StringConstructor; default: () => string; }; displayOnly: { type: BooleanConstructor; default: boolean; }; validateEvent: { type: BooleanConstructor; default: undefined; }; tiny_mode: StringConstructor; tiny_mode_root: BooleanConstructor; tiny_template: (FunctionConstructor | ObjectConstructor)[]; tiny_renderless: FunctionConstructor; tiny_theme: StringConstructor; tiny_mcp_config: ObjectConstructor; tiny_chart_theme: ObjectConstructor; }; declare const initSuggestionState: ({ reactive, parent, showPopper, popperElm, referenceElm }: { reactive: IAutoCompleteRenderlessParams['reactive']; parent: IAutoCompleteRenderlessParamUtils['parent']; showPopper: Ref; popperElm: Ref; referenceElm: Ref; }) => { parent: { [x: string]: any; $attrs: Record; $listeners: Record; $children: any[]; $constants: { WARP_CLS: string; ITEM_CLS: string; }; $el: HTMLElement; $mode: "pc" | "mobile-first" | "mobile"; $nextTick: typeof vue.nextTick; $emit: (...args: any[]) => void; $off: (eventname?: string | undefined, callback?: Function | undefined) => void; $on: (eventname: string, callback: Function) => void; $once: (eventname: string, callback: Function) => void; $options: { componentName: string | undefined; }; $parent: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase, {}, {}>; $refs: Record; $slots: Record; $scopedSlots: Record; $set: (target: any, propertyName: any, value: any) => void; $renderless: Function; $template: any; }; dropdownWidth: string; showPopper: boolean; popperElm: HTMLElement; referenceElm: HTMLElement; }; /** * Copyright (c) 2022 - present TinyVue Authors. * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. * * Use of this source code is governed by an MIT-style license. * * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. * */ declare const handleChange: ({ api, emit, state, props, dispatch }: Pick) => (value: any) => void; declare const handleFocus: ({ api, emit, props, state }: { api: IAutoCompleteApi; emit: IAutoCompleteRenderlessParamUtils['emit']; state: IAutoCompleteState; props: IAutoCompleteProps; }) => (event: any) => void; declare const handleBlur: ({ emit, state, dispatch, props }: Pick) => () => void; declare const handleClear: ({ emit, state }: { emit: IAutoCompleteRenderlessParamUtils['emit']; state: IAutoCompleteState; }) => () => void; declare const close: (state: IAutoCompleteState) => () => void; declare const handleKeyEnter: ({ api, emit, nextTick, props, state }: { api: IAutoCompleteApi; emit: IAutoCompleteRenderlessParamUtils['emit']; nextTick: IAutoCompleteRenderlessParamUtils['nextTick']; props: IAutoCompleteProps; state: IAutoCompleteState; }) => (event: any) => void; declare const select: ({ emit, nextTick, props, state, dispatch }: { emit: IAutoCompleteRenderlessParamUtils['emit']; nextTick: IAutoCompleteRenderlessParamUtils['nextTick']; props: IAutoCompleteProps; state: IAutoCompleteState; }) => (item: any) => void; declare const highlight: ({ constants, vm, state }: { constants: IAutoCompleteConstants; state: IAutoCompleteState; }) => (index: any) => void; declare const watchVisible: ({ suggestionState, vm }: { suggestionState: IAutoCompleteApi['suggestionState']; }) => (val: any) => void; declare const mounted: ({ vm, state, suggestionState }: { state: IAutoCompleteState; suggestionState: IAutoCompleteApi['suggestionState']; }) => () => void; interface IAutoCompleteState { showAutoWidth: boolean | null; popperElm: Element | null; activated: boolean; suggestions: unknown[]; loading: boolean; highlightedIndex: number; suggestionDisabled: boolean; id: string; suggestionVisible: ComputedRef; validateEvent: boolean; } type IAutoCompleteProps = ExtractPropTypes; type IAutoCompleteRenderlessParams = ISharedRenderlessFunctionParams & { state: IAutoCompleteState; props: IAutoCompleteProps; api: IAutoCompleteApi; }; interface IAutoCompleteApi { state: IAutoCompleteState; doDestroy: (forceDestroy?: boolean | undefined) => void; suggestionState: ReturnType; close: ReturnType; handleBlur: ReturnType; mounted: ReturnType; highlight: ReturnType; handleClear: ReturnType; select: ReturnType; watchVisible: ReturnType; handleChange: ReturnType; handleFocus: ReturnType; handleKeyEnter: ReturnType; debouncedGetData: Function; } type IAutoCompleteConstants = ReturnType; type IAutoCompleteRenderlessParamUtils = ISharedRenderlessParamUtils; export { IAutoCompleteApi, IAutoCompleteConstants, IAutoCompleteProps, IAutoCompleteRenderlessParamUtils, IAutoCompleteRenderlessParams, IAutoCompleteState };