import { AfterViewInit, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core'; import { Subject } from 'rxjs'; import { FormGroup } from '@angular/forms'; import { FieldConfig } from '../../models/field-config.model'; import { FormField } from '../../models/form-field.model'; import { AutoCompleteOption } from '../../models/autocomplete-option.model'; import { SelectOption } from '@ieeesa-npm/models'; import { FormUtilityService } from '../../services/form-utility.service'; import { FormOverlayBoundsService } from '../../services/form-overlay-bounds.service'; import * as i0 from "@angular/core"; /** * Provides auto suggestion for the entered input by filtering the options from the given list of options. * @export * @class AutocompleteComponent * @implements {OnInit} * @implements {FormField} * @implements {OnDestroy} */ export declare class AutocompleteComponent implements OnInit, FormField, OnDestroy, AfterViewInit { private formUtilityService; private formOverlayBounds; private elementRef; config: FieldConfig; group: FormGroup; value: string; isEditing: boolean; autoCompleteOptionList: AutoCompleteOption[]; set autoCompleteOptions(value: AutoCompleteOption[]); get autoCompleteOptions(): AutoCompleteOption[]; isSelectedOptionsVisible: boolean; autoCompleteSearchValue: EventEmitter; autoCompleteClearSearchValue: EventEmitter; autoCompleteOptionSelected: EventEmitter; editStarted: EventEmitter; set autoComplete(elementRef: ElementRef | undefined); private autoCompleteInput?; destroy$: Subject; private autoCompleteInputSubscription?; autocompleteConstInfo: any; constructor(formUtilityService: FormUtilityService, formOverlayBounds: FormOverlayBoundsService, elementRef: ElementRef); private formOverlayScrollContainer?; private readonly preferredAutocompleteOverlayHeight; private readonly overlayWheelListener; /** * Implementation of ngOnInit lifecycle hook method to initialize components instance properties. * @memberof AutocompleteComponent */ ngOnInit(): void; /** * Whether the bound control currently holds a value. * @return {boolean} * @memberof AutocompleteComponent */ hasValue(): boolean; /** * The display text for the read-only state. * @return {string} * @memberof AutocompleteComponent */ getDisplayValue(): string; /** * Switches the field from read-only display into edit mode (pencil click). * @memberof AutocompleteComponent */ enableEdit(): void; /** * Initialize the form control change event once the form control is ready on ngAfterViewInit by calling onValueChanges method. * @memberof AutocompleteComponent */ ngAfterViewInit(): void; /** * Emits an autoCompleteSearchValue change event when the value is changed and value is greater than minCharToSearch or equal to zero. * @memberof AutocompleteComponent */ onValueChanges(): void; /** * Emits the selected option when the form on change event is triggered and returns option. * @param {AutoCompleteOption} data // data is an selected option of autoCompleteOptions. * @return {AutoCompleteOption} // Returns selected option as AutoCompleteOption * @memberof AutocompleteComponent */ onChange(data: AutoCompleteOption): AutoCompleteOption; /** * Display the selected option name * @param {AutoCompleteOption} option * @return {string} * @memberof AutocompleteComponent */ displayOptionName(option: AutoCompleteOption): string; /** * Takes the index and the current item as arguments and needs to return the unique identifier for this item. * @param {number} index * @param {SelectOption} option * @return {(number | string)} * @memberof AutocompleteComponent */ trackByFn(index: number, option: SelectOption): number | string; /** * Implementation of ngOnDestroy lifecycle hook method to unsubscribe the open observable subscriptions. * @memberof AutocompleteComponent */ ngOnDestroy(): void; onAutocompleteOpen(): void; onAutocompleteClose(): void; private setOverlayClipBounds; private getFormOverlayScrollContainer; private makeRoomForAutocompleteOverlay; private clearOverlayClipBounds; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }