///
import { IComponentController } from 'angular';
export declare type AutoCompleteMatch = string | AutoCompleteMatchObject;
/**
* The match object must contain a `displayValue` property which will be displayed in the dropdown,
* and can be extended with a `cssClass` property which will be applied to the match row in the dropdown.
*/
export interface AutoCompleteMatchObject, S = unknown> {
cssClass?: string;
cssStyle?: S;
displayValue: string;
value: T;
}
export declare function isAutoCompleteMatchObject(x: AutoCompleteMatch): x is AutoCompleteMatchObject;
/**
* This component is used internally by the primary autocomplete input component.
* Its purpose is to decouple the rendering of matches, presentation, and input
* handling so that the dropdown functionality can be implemented in other contexts
* than just an input field (e.g., tag component, comment @ lookups).
*/
export default class AutoCompleteMatchRendererComponentController implements IComponentController {
protected $document: ng.IDocumentService;
protected $element: ng.IAugmentedJQuery;
protected $q: ng.IQService;
protected $scope: ng.IScope;
protected $timeout: ng.ITimeoutService;
delay: number;
keyEventElementId: string;
minLength: number;
testValue: string | undefined;
getMatches: (params: {
input: string;
origin: string;
}) => AutoCompleteMatch[] | ng.IPromise;
onDoneFetching: () => void;
onSelect: (params: {
displayValue: string | undefined | null;
origin: string;
value: string | Record | undefined | null;
}) => void;
onStartedFetching: () => void;
protected interactionMode: 'mouse' | 'keyboard';
protected kbSelectedIndex: number;
protected keyEventElement: HTMLInputElement | null;
protected matches: AutoCompleteMatch[];
private debouncedFetchAndSetMatches;
private fetchRequestCount;
private inputArray;
private observer;
constructor($document: ng.IDocumentService, $element: ng.IAugmentedJQuery, $q: ng.IQService, $scope: ng.IScope, $timeout: ng.ITimeoutService);
$onChanges(changes: {
delay: ng.IChangesObject;
}): void;
$onDestroy(): void;
$onInit(): void;
dropdownWasMousedOver(): void;
fetchAndSetMatches(): void;
matchWasClicked(match: AutoCompleteMatch): void;
private onClickElsewhere;
private onKeyDown;
private scrollToMatch;
}