import { EventEmitter } from '../../stencil-public-runtime'; import { DnnAutocompleteSuggestion, NeedMoreItemsEventArgs } from './types'; export declare class DnnAutocomplete { /** The label for this autocomplete. */ label?: string; /** The name for this autocomplete when used in forms. */ name?: string; /** Defines the help label displayed under the field. */ helpText?: string; /** Defines the value for this autocomplete */ value: string; /** Defines whether the field requires having a value. */ required?: boolean; /** Defines whether the field is disabled. */ disabled?: boolean; /** Sets the list of suggestions. */ suggestions: DnnAutocompleteSuggestion[]; /** Callback to render suggestions, if not provided, only the label will be rendered. */ renderSuggestion?: (suggestion: DnnAutocompleteSuggestion) => HTMLElement; /** The total amount of suggestions for the given search query. * This can be used to show virtual scroll and pagination progressive feeding. * The needMoreItems event should be used to request more items. */ totalSuggestions?: number; /** How many suggestions to preload in pixels of their height. * This is used to calculate the virtual scroll height and request * more items before they get into view. */ preloadThresholdPixels: number; /** Defines the type of automatic completion the browser could use. * See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete */ autocomplete: string; element: HTMLDnnAutocompleteElement; /** Fires when the value has changed and the user exits the input. */ valueChange: EventEmitter; /** Fires when the using is inputing data (on keystrokes). */ valueInput: EventEmitter; /** Fires when the component needs to display more items in the suggestions. */ needMoreItems: EventEmitter; /** Fires when the search query has changed. * This is almost like valueInput, but it is debounced * and can be used to trigger a search query without overloading * API endpoints while typing. */ searchQueryChanged: EventEmitter; /** Fires when an item is selected. */ itemSelected: EventEmitter; /** Reports the input validity details. See https://developer.mozilla.org/en-US/docs/Web/API/ValidityState */ checkValidity(): Promise; /** Can be used to set a custom validity message. */ setCustomValidity(message: string): Promise; focused: boolean; valid: boolean; customValidityMessage?: string; selectedIndex?: number; positionInitialized: boolean; lastScrollTop: number; displayValue: string; handleValueChange(newValue: string): void; /** attacth the internals for form validation */ internals: ElementInternals; /** Listener for mouse down event */ handleClick(e: MouseEvent): void; componentDidLoad(): void; componentDidRender(): void; private inputField; private suggestionsContainer; private fieldset; private labelId; formResetCallback(): void; private handleInput; private handleSearchQueryChanged; private selectItemFromValue; private handleInvalid; private handleChange; /** Check if the label should float */ private shouldLabelFloat; private findAverageSuggestionHeight; private readonly adjustDropdownPosition; private handleKeyDown; private selectItem; private getVirtualScrollHeight; private handleDropdownClick; private handleSuggestionsScroll; private checkIfMoreItemsNeeded; private handleBlur; render(): any; }