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 | import * as i0 from "@angular/core";
|
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 |
|
55 | export declare class NbAutocompleteDirective<T> implements OnDestroy, AfterViewInit, ControlValueAccessor {
|
56 | protected hostRef: ElementRef;
|
57 | protected overlay: NbOverlayService;
|
58 | protected cd: ChangeDetectorRef;
|
59 | protected triggerStrategyBuilder: NbTriggerStrategyBuilderService;
|
60 | protected positionBuilder: NbPositionBuilderService;
|
61 | protected activeDescendantKeyManagerFactory: NbActiveDescendantKeyManagerFactoryService<NbOptionComponent<T>>;
|
62 | protected renderer: Renderer2;
|
63 | |
64 |
|
65 |
|
66 | protected _autocomplete: NbAutocompleteComponent<T>;
|
67 | |
68 |
|
69 |
|
70 |
|
71 | protected triggerStrategy: NbTriggerStrategy;
|
72 | protected positionStrategy: NbAdjustableConnectedPositionStrategy;
|
73 | protected overlayRef: NbOverlayRef;
|
74 | protected keyManager: NbActiveDescendantKeyManager<NbOptionComponent<T>>;
|
75 | protected destroy$: Subject<void>;
|
76 | protected _onChange: (value: T) => void;
|
77 | protected _onTouched: () => void;
|
78 | |
79 |
|
80 |
|
81 | get isOpen(): boolean;
|
82 | |
83 |
|
84 |
|
85 | get isClosed(): boolean;
|
86 | |
87 |
|
88 |
|
89 | get autocomplete(): NbAutocompleteComponent<T>;
|
90 | set autocomplete(autocomplete: NbAutocompleteComponent<T>);
|
91 | |
92 |
|
93 |
|
94 | overlayOffset: number;
|
95 | |
96 |
|
97 |
|
98 | scrollStrategy: NbScrollStrategies;
|
99 | customOverlayHost: ElementRef;
|
100 | get top(): boolean;
|
101 | get bottom(): boolean;
|
102 | role: string;
|
103 | ariaAutocomplete: string;
|
104 | hasPopup: string;
|
105 | get ariaExpanded(): string;
|
106 | get ariaOwns(): string;
|
107 | get ariaActiveDescendant(): string;
|
108 | constructor(hostRef: ElementRef, overlay: NbOverlayService, cd: ChangeDetectorRef, triggerStrategyBuilder: NbTriggerStrategyBuilderService, positionBuilder: NbPositionBuilderService, activeDescendantKeyManagerFactory: NbActiveDescendantKeyManagerFactoryService<NbOptionComponent<T>>, renderer: Renderer2);
|
109 | ngAfterViewInit(): void;
|
110 | ngOnDestroy(): void;
|
111 | handleInput(): void;
|
112 | handleKeydown(): void;
|
113 | handleBlur(): void;
|
114 | show(): void;
|
115 | hide(): void;
|
116 | writeValue(value: T): void;
|
117 | registerOnChange(fn: (value: any) => {}): void;
|
118 | registerOnTouched(fn: any): void;
|
119 | setDisabledState(disabled: boolean): void;
|
120 | protected subscribeOnOptionClick(): void;
|
121 | protected subscribeOnPositionChange(): void;
|
122 | protected getActiveItem(): NbOptionComponent<T>;
|
123 | protected setupAutocomplete(): void;
|
124 | protected getDisplayValue(value: string): string;
|
125 | protected getContainer(): ComponentRef<any>;
|
126 | protected handleInputValueUpdate(value: T, focusInput?: boolean): void;
|
127 | protected subscribeOnTriggers(): void;
|
128 | protected createTriggerStrategy(): NbTriggerStrategy;
|
129 | protected createKeyManager(): void;
|
130 | protected setHostInputValue(value: any): void;
|
131 | protected createPositionStrategy(): NbAdjustableConnectedPositionStrategy;
|
132 | protected subscribeOnOverlayKeys(): void;
|
133 | protected setActiveItem(): void;
|
134 | protected attachToOverlay(): void;
|
135 | protected createOverlay(): void;
|
136 | protected initOverlay(): void;
|
137 | protected checkOverlayVisibility(): void;
|
138 | protected createScrollStrategy(): NbScrollStrategy;
|
139 | protected shouldShow(): boolean;
|
140 | static ɵfac: i0.ɵɵFactoryDeclaration<NbAutocompleteDirective<any>, never>;
|
141 | static ɵdir: i0.ɵɵDirectiveDeclaration<NbAutocompleteDirective<any>, "input[nbAutocomplete]", never, { "autocomplete": { "alias": "nbAutocomplete"; "required": false; }; "overlayOffset": { "alias": "overlayOffset"; "required": false; }; "scrollStrategy": { "alias": "scrollStrategy"; "required": false; }; "customOverlayHost": { "alias": "customOverlayHost"; "required": false; }; }, {}, never, never, false, never>;
|
142 | }
|