1 | import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, Renderer2, TemplateRef, ViewContainerRef } from '@angular/core';
|
2 | import { NgControl } from '@angular/forms';
|
3 | import { ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';
|
4 | import { Observable } from 'rxjs';
|
5 | import { TypeaheadOptionItemContext, TypeaheadOptionListContext } from './models';
|
6 | import { TypeaheadContainerComponent } from './typeahead-container.component';
|
7 | import { TypeaheadMatch } from './typeahead-match.class';
|
8 | import { TypeaheadOrder } from './typeahead-order.class';
|
9 | import { TypeaheadConfig } from './typeahead.config';
|
10 | import * as ɵngcc0 from '@angular/core';
|
11 | declare type TypeaheadOption = string | Record<string | number, any>;
|
12 | declare type TypeaheadOptionArr = TypeaheadOption[] | Observable<TypeaheadOption[]>;
|
13 | export declare class TypeaheadDirective implements OnInit, OnDestroy {
|
14 | private changeDetection;
|
15 | private element;
|
16 | private ngControl;
|
17 | private renderer;
|
18 | |
19 |
|
20 |
|
21 | typeahead?: TypeaheadOptionArr;
|
22 | |
23 |
|
24 |
|
25 |
|
26 | typeaheadMinLength: number;
|
27 |
|
28 | adaptivePosition: boolean;
|
29 |
|
30 | isAnimated: boolean;
|
31 |
|
32 | typeaheadWaitMs: number;
|
33 |
|
34 | typeaheadOptionsLimit?: number;
|
35 | |
36 |
|
37 |
|
38 |
|
39 | typeaheadOptionField?: string;
|
40 | |
41 |
|
42 |
|
43 | typeaheadGroupField?: string;
|
44 | |
45 |
|
46 |
|
47 |
|
48 | typeaheadOrderBy?: TypeaheadOrder;
|
49 | |
50 |
|
51 |
|
52 |
|
53 | typeaheadAsync?: boolean;
|
54 | |
55 |
|
56 |
|
57 | typeaheadLatinize: boolean;
|
58 | |
59 |
|
60 |
|
61 | typeaheadSingleWords: boolean;
|
62 | |
63 |
|
64 |
|
65 | typeaheadWordDelimiters: string;
|
66 | |
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 | typeaheadMultipleSearch?: boolean;
|
74 | |
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 | typeaheadMultipleSearchDelimiters: string;
|
81 | |
82 |
|
83 |
|
84 |
|
85 | typeaheadPhraseDelimiters: string;
|
86 | |
87 |
|
88 |
|
89 | typeaheadItemTemplate?: TemplateRef<TypeaheadOptionItemContext>;
|
90 | |
91 |
|
92 |
|
93 | optionsListTemplate?: TemplateRef<TypeaheadOptionListContext>;
|
94 |
|
95 | typeaheadScrollable: boolean;
|
96 |
|
97 | typeaheadOptionsInScrollableView: number;
|
98 |
|
99 | typeaheadHideResultsOnBlur?: boolean;
|
100 | |
101 |
|
102 |
|
103 |
|
104 | typeaheadSelectFirstItem: boolean;
|
105 |
|
106 | typeaheadIsFirstItemActive: boolean;
|
107 | |
108 |
|
109 |
|
110 | typeaheadLoading: EventEmitter<boolean>;
|
111 | |
112 |
|
113 |
|
114 | typeaheadNoResults: EventEmitter<boolean>;
|
115 |
|
116 | typeaheadOnSelect: EventEmitter<TypeaheadMatch>;
|
117 |
|
118 | typeaheadOnPreview: EventEmitter<TypeaheadMatch>;
|
119 |
|
120 | typeaheadOnBlur: EventEmitter<TypeaheadMatch>;
|
121 | |
122 |
|
123 |
|
124 | container?: string;
|
125 |
|
126 | dropup: boolean;
|
127 |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 | activeDescendant?: string;
|
134 | isOpen: boolean;
|
135 | list: string;
|
136 | _container?: TypeaheadContainerComponent;
|
137 | isActiveItemChanged: boolean;
|
138 | isFocused: boolean;
|
139 | cancelRequestOnFocusLost: boolean;
|
140 | protected keyUpEventEmitter: EventEmitter<string>;
|
141 | protected placement: string;
|
142 | protected _matches: TypeaheadMatch[];
|
143 | private _typeahead;
|
144 | private _subscriptions;
|
145 | private _allEnteredValue?;
|
146 | private _outsideClickListener;
|
147 | constructor(cis: ComponentLoaderFactory, config: TypeaheadConfig, changeDetection: ChangeDetectorRef, element: ElementRef, ngControl: NgControl, renderer: Renderer2, viewContainerRef: ViewContainerRef);
|
148 | get matches(): TypeaheadMatch[];
|
149 | ngOnInit(): void;
|
150 | onInput(e: any): void;
|
151 | onChange(event: KeyboardEvent): void;
|
152 | onFocus(): void;
|
153 | onBlur(): void;
|
154 | onKeydown(event: KeyboardEvent): void;
|
155 | changeModel(match?: TypeaheadMatch): void;
|
156 | show(): void;
|
157 | hide(): void;
|
158 | onOutsideClick(): void;
|
159 | ngOnDestroy(): void;
|
160 | protected asyncActions(): void;
|
161 | protected syncActions(): void;
|
162 | protected normalizeOption(option: TypeaheadOption): string;
|
163 | protected tokenizeQuery(currentQuery: string | string[]): string | string[];
|
164 | protected normalizeQuery(value: string): string | string[];
|
165 | protected testMatch(match: string, test: string[] | string): boolean;
|
166 | protected finalizeAsyncCall(matches?: TypeaheadOption | TypeaheadOption[]): void;
|
167 | protected prepareMatches(options: TypeaheadOption | TypeaheadOption[]): void;
|
168 | protected orderMatches(options: TypeaheadOption[]): TypeaheadOption[];
|
169 | protected hasMatches(): boolean;
|
170 | protected checkDelimitersConflict(): void;
|
171 | protected haveCommonCharacters(str1: string, str2: string): boolean;
|
172 | static ɵfac: ɵngcc0.ɵɵFactoryDef<TypeaheadDirective, never>;
|
173 | static ɵdir: ɵngcc0.ɵɵDirectiveDefWithMeta<TypeaheadDirective, "[typeahead]", ["bs-typeahead"], { "typeaheadMinLength": "typeaheadMinLength"; "adaptivePosition": "adaptivePosition"; "isAnimated": "isAnimated"; "typeaheadWaitMs": "typeaheadWaitMs"; "typeaheadLatinize": "typeaheadLatinize"; "typeaheadSingleWords": "typeaheadSingleWords"; "typeaheadWordDelimiters": "typeaheadWordDelimiters"; "typeaheadMultipleSearchDelimiters": "typeaheadMultipleSearchDelimiters"; "typeaheadPhraseDelimiters": "typeaheadPhraseDelimiters"; "typeaheadScrollable": "typeaheadScrollable"; "typeaheadOptionsInScrollableView": "typeaheadOptionsInScrollableView"; "typeaheadSelectFirstItem": "typeaheadSelectFirstItem"; "typeaheadIsFirstItemActive": "typeaheadIsFirstItemActive"; "dropup": "dropup"; "typeaheadOptionsLimit": "typeaheadOptionsLimit"; "typeaheadAsync": "typeaheadAsync"; "typeahead": "typeahead"; "typeaheadOptionField": "typeaheadOptionField"; "typeaheadGroupField": "typeaheadGroupField"; "typeaheadOrderBy": "typeaheadOrderBy"; "typeaheadMultipleSearch": "typeaheadMultipleSearch"; "typeaheadItemTemplate": "typeaheadItemTemplate"; "optionsListTemplate": "optionsListTemplate"; "typeaheadHideResultsOnBlur": "typeaheadHideResultsOnBlur"; "container": "container"; }, { "typeaheadLoading": "typeaheadLoading"; "typeaheadNoResults": "typeaheadNoResults"; "typeaheadOnSelect": "typeaheadOnSelect"; "typeaheadOnPreview": "typeaheadOnPreview"; "typeaheadOnBlur": "typeaheadOnBlur"; }, never>;
|
174 | }
|
175 | export {};
|
176 |
|
177 |
|
\ | No newline at end of file |