1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | import { ChangeDetectorRef, ElementRef, EventEmitter, QueryList, AfterContentInit, OnDestroy } from '@angular/core';
|
7 | import { NgClass } from '@angular/common';
|
8 | import { Subject } from 'rxjs';
|
9 | import { NbComponentSize } from '../component-size';
|
10 | import { NbPosition } from '../cdk/overlay/overlay-position';
|
11 | import { NbOptionComponent } from '../option/option.component';
|
12 | import { NbPortalDirective } from '../cdk/overlay/mapping';
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | export declare class NbAutocompleteComponent<T> implements AfterContentInit, OnDestroy {
|
18 | protected cd: ChangeDetectorRef;
|
19 | protected destroy$: Subject<void>;
|
20 | |
21 |
|
22 |
|
23 | hostRef: ElementRef;
|
24 | |
25 |
|
26 |
|
27 | id: string;
|
28 | |
29 |
|
30 |
|
31 |
|
32 |
|
33 | _overlayPosition: NbPosition;
|
34 | get overlayPosition(): NbPosition;
|
35 | set overlayPosition(value: NbPosition);
|
36 | |
37 |
|
38 |
|
39 | get hostWidth(): number;
|
40 | |
41 |
|
42 |
|
43 | handleDisplayFn: ((value: any) => string);
|
44 | /**
|
45 | * Autocomplete size, available sizes:
|
46 | * `tiny`, `small`, `medium` (default), `large`, `giant`
|
47 | */
|
48 | size: NbComponentSize;
|
49 | /**
|
50 | * Flag passed as input to always make first option active.
|
51 | * */
|
52 | activeFirst: boolean;
|
53 | /**
|
54 | * Specifies class to be set on `nb-option`s container (`nb-option-list`)
|
55 | * */
|
56 | optionsListClass: NgClass['ngClass'];
|
57 | /**
|
58 | * Specifies class for the overlay panel with options
|
59 | * */
|
60 | optionsPanelClass: string | string[];
|
61 | /**
|
62 | * Will be emitted when selected value changes.
|
63 | * */
|
64 | selectedChange: EventEmitter<T>;
|
65 | /**
|
66 | * List of `NbOptionComponent`'s components passed as content.
|
67 | * */
|
68 | options: QueryList<NbOptionComponent<T>>;
|
69 | /**
|
70 | * NbOptionList with options content.
|
71 | * */
|
72 | portal: NbPortalDirective;
|
73 | constructor(cd: ChangeDetectorRef);
|
74 | ngAfterContentInit(): void;
|
75 | ngOnDestroy(): void;
|
76 | /**
|
77 | * Autocomplete knows nothing about host html input element.
|
78 | * So, attach method set input hostRef for styling.
|
79 | * */
|
80 | setHost(hostRef: ElementRef): void;
|
81 | /**
|
82 | * Propagate selected value.
|
83 | * */
|
84 | emitSelected(selected: T): void;
|
85 | get tiny(): boolean;
|
86 | get small(): boolean;
|
87 | get medium(): boolean;
|
88 | get large(): boolean;
|
89 | get giant(): boolean;
|
90 | }
|
91 |
|
\ | No newline at end of file |