{"version":3,"file":"typeahead.directive.d.ts","sources":["typeahead.directive.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA","sourcesContent":["import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, Renderer2, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';\nimport { Observable } from 'rxjs';\nimport { TypeaheadOptionItemContext, TypeaheadOptionListContext } from './models';\nimport { TypeaheadContainerComponent } from './typeahead-container.component';\nimport { TypeaheadMatch } from './typeahead-match.class';\nimport { TypeaheadOrder } from './typeahead-order.class';\nimport { TypeaheadConfig } from './typeahead.config';\ndeclare type TypeaheadOption = string | Record<string | number, any>;\ndeclare type TypeaheadOptionArr = TypeaheadOption[] | Observable<TypeaheadOption[]>;\nexport declare class TypeaheadDirective implements OnInit, OnDestroy {\n    private changeDetection;\n    private element;\n    private ngControl;\n    private renderer;\n    /** options source, can be Array of strings, objects or\n     * an Observable for external matching process\n     */\n    typeahead?: TypeaheadOptionArr;\n    /** minimal no of characters that needs to be entered before\n     * typeahead kicks-in. When set to 0, typeahead shows on focus with full\n     * list of options (limited as normal by typeaheadOptionsLimit)\n     */\n    typeaheadMinLength: number;\n    /** sets use adaptive position */\n    adaptivePosition: boolean;\n    /** turn on/off animation */\n    isAnimated: boolean;\n    /** minimal wait time after last character typed before typeahead kicks-in */\n    typeaheadWaitMs: number;\n    /** maximum length of options items list. The default value is 20 */\n    typeaheadOptionsLimit?: number;\n    /** when options source is an array of objects, the name of field\n     * that contains the options value, we use array item as option in case\n     * of this field is missing. Supports nested properties and methods.\n     */\n    typeaheadOptionField?: string;\n    /** when options source is an array of objects, the name of field that\n     * contains the group value, matches are grouped by this field when set.\n     */\n    typeaheadGroupField?: string;\n    /** Used to specify a custom order of matches. When options source is an array of objects\n     * a field for sorting has to be set up. In case of options source is an array of string,\n     * a field for sorting is absent. The ordering direction could be changed to ascending or descending.\n     */\n    typeaheadOrderBy?: TypeaheadOrder;\n    /** should be used only in case of typeahead attribute is Observable of array.\n     * If true - loading of options will be async, otherwise - sync.\n     * true make sense if options array is large.\n     */\n    typeaheadAsync?: boolean;\n    /** match latin symbols.\n     * If true the word súper would match super and vice versa.\n     */\n    typeaheadLatinize: boolean;\n    /** Can be use to search words by inserting a single white space between each characters\n     *  for example 'C a l i f o r n i a' will match 'California'.\n     */\n    typeaheadSingleWords: boolean;\n    /** should be used only in case typeaheadSingleWords attribute is true.\n     * Sets the word delimiter to break words. Defaults to space.\n     */\n    typeaheadWordDelimiters: string;\n    /** Can be used to conduct a search of multiple items and have suggestion not for the\n     * whole value of the input but for the value that comes after a delimiter provided via\n     * typeaheadMultipleSearchDelimiters attribute. This option can only be used together with\n     * typeaheadSingleWords option if typeaheadWordDelimiters and typeaheadPhraseDelimiters\n     * are different from typeaheadMultipleSearchDelimiters to avoid conflict in determining\n     * when to delimit multiple searches and when a single word.\n     */\n    typeaheadMultipleSearch?: boolean;\n    /** should be used only in case typeaheadMultipleSearch attribute is true.\n     * Sets the multiple search delimiter to know when to start a new search. Defaults to comma.\n     * If space needs to be used, then explicitly set typeaheadWordDelimiters to something else than space\n     * because space is used by default OR set typeaheadSingleWords attribute to false if you don't need\n     * to use it together with multiple search.\n     */\n    typeaheadMultipleSearchDelimiters: string;\n    /** should be used only in case typeaheadSingleWords attribute is true.\n     * Sets the word delimiter to match exact phrase.\n     * Defaults to simple and double quotes.\n     */\n    typeaheadPhraseDelimiters: string;\n    /** used to specify a custom item template.\n     * Template variables exposed are called item and index;\n     */\n    typeaheadItemTemplate?: TemplateRef<TypeaheadOptionItemContext>;\n    /** used to specify a custom options list template.\n     * Template variables: matches, itemTemplate, query\n     */\n    optionsListTemplate?: TemplateRef<TypeaheadOptionListContext>;\n    /** specifies if typeahead is scrollable  */\n    typeaheadScrollable: boolean;\n    /** specifies number of options to show in scroll view  */\n    typeaheadOptionsInScrollableView: number;\n    /** used to hide result on blur */\n    typeaheadHideResultsOnBlur?: boolean;\n    /** fired when an options list was opened and the user clicked Tab\n     * If a value equal true, it will be chosen first or active item in the list\n     * If value equal false, it will be chosen an active item in the list or nothing\n     */\n    typeaheadSelectFirstItem: boolean;\n    /** makes active first item in a list */\n    typeaheadIsFirstItemActive: boolean;\n    /** fired when 'busy' state of this component was changed,\n     * fired on async mode only, returns boolean\n     */\n    typeaheadLoading: EventEmitter<boolean>;\n    /** fired on every key event and returns true\n     * in case of matches are not detected\n     */\n    typeaheadNoResults: EventEmitter<boolean>;\n    /** fired when option was selected, return object with data of this option. */\n    typeaheadOnSelect: EventEmitter<TypeaheadMatch>;\n    /** fired when option was previewed, return object with data of this option. */\n    typeaheadOnPreview: EventEmitter<TypeaheadMatch>;\n    /** fired when blur event occurs. returns the active item */\n    typeaheadOnBlur: EventEmitter<TypeaheadMatch>;\n    /**\n     * A selector specifying the element the typeahead should be appended to.\n     */\n    container?: string;\n    /** This attribute indicates that the dropdown should be opened upwards */\n    dropup: boolean;\n    /** if false restrict model values to the ones selected from the popup only will be provided */\n    /** if false the first match automatically will not be focused as you type */\n    /** format the ng-model result after selection */\n    /** if true automatically select an item when there is one option that exactly matches the user input */\n    /**  if true select the currently highlighted match on blur */\n    /**  if false don't focus the input element the typeahead directive is associated with on selection */\n    activeDescendant?: string;\n    isOpen: boolean;\n    list: string;\n    _container?: TypeaheadContainerComponent;\n    isActiveItemChanged: boolean;\n    isFocused: boolean;\n    cancelRequestOnFocusLost: boolean;\n    protected keyUpEventEmitter: EventEmitter<string>;\n    protected placement: string;\n    protected _matches: TypeaheadMatch[];\n    private _typeahead;\n    private _subscriptions;\n    private _allEnteredValue?;\n    private _outsideClickListener;\n    constructor(cis: ComponentLoaderFactory, config: TypeaheadConfig, changeDetection: ChangeDetectorRef, element: ElementRef, ngControl: NgControl, renderer: Renderer2, viewContainerRef: ViewContainerRef);\n    get matches(): TypeaheadMatch[];\n    ngOnInit(): void;\n    onInput(e: any): void;\n    onChange(event: KeyboardEvent): void;\n    onFocus(): void;\n    onBlur(): void;\n    onKeydown(event: KeyboardEvent): void;\n    changeModel(match?: TypeaheadMatch): void;\n    show(): void;\n    hide(): void;\n    onOutsideClick(): void;\n    ngOnDestroy(): void;\n    protected asyncActions(): void;\n    protected syncActions(): void;\n    protected normalizeOption(option: TypeaheadOption): string;\n    protected tokenizeQuery(currentQuery: string | string[]): string | string[];\n    protected normalizeQuery(value: string): string | string[];\n    protected testMatch(match: string, test: string[] | string): boolean;\n    protected finalizeAsyncCall(matches?: TypeaheadOption | TypeaheadOption[]): void;\n    protected prepareMatches(options: TypeaheadOption | TypeaheadOption[]): void;\n    protected orderMatches(options: TypeaheadOption[]): TypeaheadOption[];\n    protected hasMatches(): boolean;\n    protected checkDelimitersConflict(): void;\n    protected haveCommonCharacters(str1: string, str2: string): boolean;\n}\nexport {};\n"]}