1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | import { AfterViewInit, ChangeDetectorRef, ComponentRef, ElementRef, OnDestroy, Renderer2 } from '@angular/core';
|
7 | import { ControlValueAccessor } from '@angular/forms';
|
8 | import { Subject } from 'rxjs';
|
9 | import { NbOverlayRef, NbScrollStrategy } from '../cdk/overlay/mapping';
|
10 | import { NbTriggerStrategy, NbTriggerStrategyBuilderService } from '../cdk/overlay/overlay-trigger';
|
11 | import { NbOverlayService } from '../cdk/overlay/overlay-service';
|
12 | import { NbAdjustableConnectedPositionStrategy, NbPositionBuilderService } from '../cdk/overlay/overlay-position';
|
13 | import { NbActiveDescendantKeyManager, NbActiveDescendantKeyManagerFactoryService } from '../cdk/a11y/descendant-key-manager';
|
14 | import { NbScrollStrategies } from '../cdk/adapter/block-scroll-strategy-adapter';
|
15 | import { NbOptionComponent } from '../option/option.component';
|
16 | import { NbAutocompleteComponent } from './autocomplete.component';
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 | export declare class NbAutocompleteDirective<T> implements OnDestroy, AfterViewInit, ControlValueAccessor {
|
55 | protected hostRef: ElementRef;
|
56 | protected overlay: NbOverlayService;
|
57 | protected cd: ChangeDetectorRef;
|
58 | protected triggerStrategyBuilder: NbTriggerStrategyBuilderService;
|
59 | protected positionBuilder: NbPositionBuilderService;
|
60 | protected activeDescendantKeyManagerFactory: NbActiveDescendantKeyManagerFactoryService<NbOptionComponent<T>>;
|
61 | protected renderer: Renderer2;
|
62 | |
63 |
|
64 |
|
65 | protected _autocomplete: NbAutocompleteComponent<T>;
|
66 | |
67 |
|
68 |
|
69 |
|
70 | protected triggerStrategy: NbTriggerStrategy;
|
71 | protected positionStrategy: NbAdjustableConnectedPositionStrategy;
|
72 | protected overlayRef: NbOverlayRef;
|
73 | protected keyManager: NbActiveDescendantKeyManager<NbOptionComponent<T>>;
|
74 | protected destroy$: Subject<void>;
|
75 | protected _onChange: (value: T) => void;
|
76 | protected _onTouched: () => void;
|
77 | |
78 |
|
79 |
|
80 | get isOpen(): boolean;
|
81 | |
82 |
|
83 |
|
84 | get isClosed(): boolean;
|
85 | |
86 |
|
87 |
|
88 | get autocomplete(): NbAutocompleteComponent<T>;
|
89 | set autocomplete(autocomplete: NbAutocompleteComponent<T>);
|
90 | |
91 |
|
92 |
|
93 | overlayOffset: number;
|
94 | |
95 |
|
96 |
|
97 | get focusInputOnValueChange(): boolean;
|
98 | set focusInputOnValueChange(value: boolean);
|
99 | protected _focusInputOnValueChange: boolean;
|
100 | |
101 |
|
102 |
|
103 | scrollStrategy: NbScrollStrategies;
|
104 | customOverlayHost: ElementRef;
|
105 | get top(): boolean;
|
106 | get bottom(): boolean;
|
107 | role: string;
|
108 | ariaAutocomplete: string;
|
109 | hasPopup: string;
|
110 | get ariaExpanded(): string;
|
111 | get ariaOwns(): string;
|
112 | get ariaActiveDescendant(): string;
|
113 | constructor(hostRef: ElementRef, overlay: NbOverlayService, cd: ChangeDetectorRef, triggerStrategyBuilder: NbTriggerStrategyBuilderService, positionBuilder: NbPositionBuilderService, activeDescendantKeyManagerFactory: NbActiveDescendantKeyManagerFactoryService<NbOptionComponent<T>>, renderer: Renderer2);
|
114 | ngAfterViewInit(): void;
|
115 | ngOnDestroy(): void;
|
116 | handleInput(): void;
|
117 | handleKeydown(): void;
|
118 | handleBlur(): void;
|
119 | show(): void;
|
120 | hide(): void;
|
121 | writeValue(value: T): void;
|
122 | registerOnChange(fn: (value: any) => {}): void;
|
123 | registerOnTouched(fn: any): void;
|
124 | setDisabledState(disabled: boolean): void;
|
125 | protected subscribeOnOptionClick(): void;
|
126 | protected subscribeOnPositionChange(): void;
|
127 | protected getActiveItem(): NbOptionComponent<T>;
|
128 | protected setupAutocomplete(): void;
|
129 | protected getDisplayValue(value: string): string;
|
130 | protected getContainer(): ComponentRef<any>;
|
131 | protected handleInputValueUpdate(value: T): void;
|
132 | protected subscribeOnTriggers(): void;
|
133 | protected createTriggerStrategy(): NbTriggerStrategy;
|
134 | protected createKeyManager(): void;
|
135 | protected setHostInputValue(value: any): void;
|
136 | protected createPositionStrategy(): NbAdjustableConnectedPositionStrategy;
|
137 | protected subscribeOnOverlayKeys(): void;
|
138 | protected setActiveItem(): void;
|
139 | protected attachToOverlay(): void;
|
140 | protected createOverlay(): void;
|
141 | protected initOverlay(): void;
|
142 | protected checkOverlayVisibility(): void;
|
143 | protected createScrollStrategy(): NbScrollStrategy;
|
144 | }
|