import { EventEmitter, OnChanges, OnDestroy, SimpleChanges, TemplateRef } from '@angular/core'; import { AutocompleteGetMoreResultsParams } from '../models/autocomplete.model'; import { BehaviorSubject } from 'rxjs'; import * as i0 from "@angular/core"; export declare class SingAutocompleteComponent implements OnDestroy, OnChanges { /*** * set term in autocomplete input will not emmit change term event */ term: string; /*** * the items to display in autocomplete */ items: any[]; /** * total items from server */ totalItems: number; /** * item per page in scrolling * if using server side make sure that itemsPerPage is bigger then itemsToDisplay */ itemsPerPage: number; /** * item per page in scrolling */ itemsToDisplay: number; /** * single auto complete item (option) height */ singleItemHeightPx: number; /** * template ref of item */ itemTemplateRef: TemplateRef; /** * template ref of first item for custom will be above infinite scroll */ firstItemTemplateRef: TemplateRef; /** * Track by unique property for for loop performance */ trackByIdProp: string; /** * search input placeholder */ placeholder: string; /** * displayWith of mat-autocomplete * function that maps an option's control value to its display value in the trigger. */ autoCompleteDisplayWith: (value: any) => string; /** * disable autocomplete input */ disabled: boolean; /** * if exists icon will be added on the right default is undefined (without icon) | */ searchIconClass: string; /** * display clear (X) icon at the end of the search input | */ displayClearButton: boolean; /** * add custom css class will add to the input container as 'NAME-input' and to autocomplete container as 'NAME-dialog' * default is 'sing-autocomplete' */ customCssClass: string; /** * trigger event change when scrolling change then skip is changing */ skipChanged: EventEmitter; /** * trigger event user start typing * so the consumer component can filter the items by this term */ termChanged: EventEmitter; /** * trigger event when user select item from the autocomplete list */ itemSelected: EventEmitter; /** * trigger event when input is focus */ autoCompleteInputFocus: EventEmitter; /** * trigger event when user start scrolling * so the consumer component can fetch more items and concat them to the existing items */ getMoreItems: EventEmitter; /** * trigger event if the autocomplete closed without selecting option * so the consumer component can decide if to use the term or not */ autocompleteClosedWithoutSelectingOption: EventEmitter; private autoCompleteTrigger; private infiniteScroll; private autocompleteTriggerInput; term$: BehaviorSubject; restAutoCompleteComponent: any; scrollHeight: string; keyboardActiveIndex: number; itemSelectedIndication: boolean; private skip$; private rAFId; ngOnChanges(changes: SimpleChanges): void; /** * get the min div scroll height by if current items are less then the items in page * we will return the min height so we can shrink the autocomplete div for few items */ private getMinScrollHeight; /** * this function trigger when the scroll needs new items */ getMoreItemsFunc({ skip }: { skip: number; take?: number; }): void; /** * this function trigger when autocomplete input */ autoCompleteInputChanged($event: Event): void; /** * trigger when term changed event if needed * reset autocomplete component * reset skip to 0 */ termChangedFunc(term: string, notify?: boolean): void; /** * emit get more items with current params * @private */ private emitGetMoreItems; /** * emit item selected from autocomplete */ autoCompleteValueSelected(selectedOption: string | any): void; /** * clear all auto complete data * can be use from external like ViewChild */ resetToTerm(term?: string, notify?: boolean): void; /** * autocomplete close event */ autoCompleteClosed(): void; triggerClosedWithoutSelectingOptionIfNeeded(): void; autoCompleteOpened(): void; keyboardPressWhenAutoCompletePanelClosed(): void; triggerBlur(): void; triggerFocus(): void; private updateInfiniteScrollViewport; ngOnDestroy(): void; autoCompleteBlur(): void; keyboardScrollUpNeeded(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } //# sourceMappingURL=autocomplete.component.d.ts.map