-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathselect.component.d.ts
More file actions
116 lines (116 loc) · 3.79 KB
/
select.component.d.ts
File metadata and controls
116 lines (116 loc) · 3.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
import { OnChanges, OnInit, EventEmitter, ExistingProvider, ElementRef, SimpleChanges, TemplateRef } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
import { SelectDropdownComponent } from './select-dropdown.component';
import { IOption } from './option.interface';
import { Option } from './option';
export declare const SELECT_VALUE_ACCESSOR: ExistingProvider;
export declare class SelectComponent implements ControlValueAccessor, OnChanges, OnInit {
private hostElement;
options: Array<IOption>;
allowClear: boolean;
disabled: boolean;
multiple: boolean;
noFilter: number;
highlightColor: string;
highlightTextColor: string;
notFoundMsg: string;
placeholder: string;
filterPlaceholder: string;
label: string;
opened: EventEmitter<null>;
closed: EventEmitter<null>;
selected: EventEmitter<IOption>;
deselected: EventEmitter<IOption | IOption[]>;
focus: EventEmitter<null>;
blur: EventEmitter<null>;
noOptionsFound: EventEmitter<string>;
filterInputChanged: EventEmitter<string>;
selectionSpan: ElementRef;
dropdown: SelectDropdownComponent;
filterInput: ElementRef;
optionTemplate: TemplateRef<any>;
private _value;
private optionList;
hasFocus: boolean;
isOpen: boolean;
isBelow: boolean;
private filterEnabled;
private filterInputWidth;
private isDisabled;
private placeholderView;
private clearClicked;
private selectContainerClicked;
private optionListClicked;
private optionClicked;
private width;
private top;
private left;
private onChange;
private onTouched;
constructor(hostElement: ElementRef);
/** Event handlers. **/
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
ngAfterViewInit(): void;
onWindowBlur(): void;
onWindowClick(): void;
onWindowResize(): void;
onSelectContainerClick(event: any): void;
onSelectContainerFocus(): void;
onSelectContainerKeydown(event: any): void;
onOptionsListClick(): void;
onDropdownOptionClicked(option: Option): void;
onSingleFilterClick(): void;
onSingleFilterFocus(): void;
onFilterInput(term: string): void;
onSingleFilterKeydown(event: any): void;
onMultipleFilterKeydown(event: any): void;
onMultipleFilterFocus(): void;
onClearSelectionClick(event: any): void;
onDeselectOptionClick(option: Option): void;
/** API. **/
open(): void;
close(): void;
clear(): void;
select(value: string | Array<string>): void;
/** ControlValueAccessor interface methods. **/
writeValue(value: any): void;
registerOnChange(fn: (_: any) => void): void;
registerOnTouched(fn: () => void): void;
setDisabledState(isDisabled: boolean): void;
/** Input change handling. **/
private handleInputChanges(changes);
private updateOptionList(options);
private updateFilterEnabled();
/** Value. **/
value: string | string[];
private valueChanged();
private updateState();
/** Select. **/
private selectOption(option);
private deselectOption(option);
private clearSelection();
private toggleSelectOption(option);
private selectHighlightedOption();
private deselectLast();
/** Dropdown. **/
private toggleDropdown();
private openDropdown();
private closeDropdown(focus);
/** Filter. **/
private filter(term);
private clearFilterInput();
private setMultipleFilterInput(value);
/** Keys. **/
private KEYS;
private handleSelectContainerKeydown(event);
private handleMultipleFilterKeydown(event);
private handleSingleFilterKeydown(event);
/** View. **/
_blur(): void;
_focus(): void;
_focusSelectContainer(): void;
private updateWidth();
private updatePosition();
private updateFilterWidth();
}