ng-select2-component 11.1.0 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,55 +1,55 @@
1
- import { Select2 } from './select2.component';
2
- export interface Select2Group {
3
- /** label of group */
4
- label: string;
5
- /** options list */
6
- options: Select2Option[];
7
- /** add classes */
8
- classes?: string;
9
- /** template id */
10
- templateId?: string;
11
- /** template data */
12
- data?: any;
13
- }
14
- export interface Select2Option {
15
- /** value */
16
- value: Select2Value;
17
- /** label of option */
18
- label: string;
19
- /** no selectable is disabled */
20
- disabled?: boolean;
21
- /** for identification */
22
- id?: string;
23
- /** add classes */
24
- classes?: string;
25
- /** template id */
26
- templateId?: string;
27
- /** template data */
28
- data?: any;
29
- /** hide this option */
30
- hide?: boolean;
31
- }
32
- export type Select2Value = string | number | boolean | object;
33
- export type Select2UpdateValue = Select2Value | Select2Value[];
34
- export type Select2Data = (Select2Group | Select2Option)[];
35
- export interface Select2UpdateEvent<U extends Select2UpdateValue = Select2Value> {
36
- component: Select2;
37
- value: U;
38
- options: Select2Option[];
39
- }
40
- export interface Select2SearchEvent<U extends Select2UpdateValue = Select2Value> {
41
- component: Select2;
42
- value: U;
43
- search: string;
44
- }
45
- export interface Select2RemoveEvent<U extends Select2UpdateValue = Select2Value> {
46
- component: Select2;
47
- value: U;
48
- removedOption: Select2Option;
49
- }
50
- export interface Select2ScrollEvent {
51
- component: Select2;
52
- way: 'up' | 'down';
53
- search: string;
54
- }
1
+ import { Select2 } from './select2.component';
2
+ export interface Select2Group {
3
+ /** label of group */
4
+ label: string;
5
+ /** options list */
6
+ options: Select2Option[];
7
+ /** add classes */
8
+ classes?: string;
9
+ /** template id */
10
+ templateId?: string;
11
+ /** template data */
12
+ data?: any;
13
+ }
14
+ export interface Select2Option {
15
+ /** value */
16
+ value: Select2Value;
17
+ /** label of option */
18
+ label: string;
19
+ /** no selectable is disabled */
20
+ disabled?: boolean;
21
+ /** for identification */
22
+ id?: string;
23
+ /** add classes */
24
+ classes?: string;
25
+ /** template id */
26
+ templateId?: string;
27
+ /** template data */
28
+ data?: any;
29
+ /** hide this option */
30
+ hide?: boolean;
31
+ }
32
+ export type Select2Value = string | number | boolean | object;
33
+ export type Select2UpdateValue = Select2Value | Select2Value[];
34
+ export type Select2Data = (Select2Group | Select2Option)[];
35
+ export interface Select2UpdateEvent<U extends Select2UpdateValue = Select2Value> {
36
+ component: Select2;
37
+ value: U;
38
+ options: Select2Option[];
39
+ }
40
+ export interface Select2SearchEvent<U extends Select2UpdateValue = Select2Value> {
41
+ component: Select2;
42
+ value: U;
43
+ search: string;
44
+ }
45
+ export interface Select2RemoveEvent<U extends Select2UpdateValue = Select2Value> {
46
+ component: Select2;
47
+ value: U;
48
+ removedOption: Select2Option;
49
+ }
50
+ export interface Select2ScrollEvent {
51
+ component: Select2;
52
+ way: 'up' | 'down';
53
+ search: string;
54
+ }
55
55
  //# sourceMappingURL=select2-interfaces.d.ts.map
@@ -1,6 +1,6 @@
1
- import * as i0 from "@angular/core";
2
- export declare class Select2Label {
3
- static ɵfac: i0.ɵɵFactoryDeclaration<Select2Label, never>;
4
- static ɵdir: i0.ɵɵDirectiveDeclaration<Select2Label, "select2-label", never, {}, {}, never, never, false, never>;
5
- }
1
+ import * as i0 from "@angular/core";
2
+ export declare class Select2Label {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<Select2Label, never>;
4
+ static ɵdir: i0.ɵɵDirectiveDeclaration<Select2Label, "select2-label", never, {}, {}, never, never, false, never>;
5
+ }
6
6
  //# sourceMappingURL=select2-label.component.d.ts.map
@@ -1,25 +1,25 @@
1
- import { Select2Data, Select2Option, Select2UpdateValue, Select2Value } from './select2-interfaces';
2
- export declare class Select2Utils {
3
- static getOptionByValue(data: Select2Data, value: Select2Value | null | undefined): Select2Option;
4
- static getOptionsByValue(data: Select2Data, value: Select2UpdateValue | null | undefined, multiple: boolean | null | undefined): Select2Option | Select2Option[];
5
- static getFirstAvailableOption(data: Select2Data): Select2Value;
6
- static valueIsNotInFilteredData(filteredData: Select2Data, value: Select2Value | null | undefined): boolean;
7
- static getPreviousOption(filteredData: Select2Data, hoveringValue: Select2Value | null | undefined): Select2Option;
8
- static getNextOption(filteredData: Select2Data, hoveringValue: Select2Value | null | undefined): Select2Option;
9
- static getReduceData(data: Select2Data, maxResults?: number): {
10
- result: Select2Data;
11
- reduce: boolean;
12
- };
13
- static getFilteredData(data: Select2Data, searchText: string | null, editPattern?: (str: string) => string): Select2Data;
14
- static getFilteredSelectedData(data: Select2Data, selectedOptions: Select2Option | Select2Option[] | null): Select2Data;
15
- static isSearchboxHiddex(data: Select2Data, minCountForSearch?: number | string): boolean;
16
- static isSelected(options: Select2Option | Select2Option[] | null, option: Select2Option, multiple: boolean | null | undefined): "true" | "false";
17
- static removeSelection(options: Select2Option | Select2Option[] | null, option: Select2Option): void;
18
- private static getOptionsCount;
19
- private static isNullOrUndefined;
20
- private static containSearchText;
21
- private static protectPattern;
22
- private static formatSansUnicode;
23
- private static formatPattern;
24
- }
1
+ import { Select2Data, Select2Option, Select2UpdateValue, Select2Value } from './select2-interfaces';
2
+ export declare class Select2Utils {
3
+ static getOptionByValue(data: Select2Data, value: Select2Value | null | undefined): Select2Option;
4
+ static getOptionsByValue(data: Select2Data, value: Select2UpdateValue | null | undefined, multiple: boolean | null | undefined): Select2Option | Select2Option[];
5
+ static getFirstAvailableOption(data: Select2Data): Select2Value;
6
+ static valueIsNotInFilteredData(filteredData: Select2Data, value: Select2Value | null | undefined): boolean;
7
+ static getPreviousOption(filteredData: Select2Data, hoveringValue: Select2Value | null | undefined): Select2Option;
8
+ static getNextOption(filteredData: Select2Data, hoveringValue: Select2Value | null | undefined): Select2Option;
9
+ static getReduceData(data: Select2Data, maxResults?: number): {
10
+ result: Select2Data;
11
+ reduce: boolean;
12
+ };
13
+ static getFilteredData(data: Select2Data, searchText: string | null, editPattern?: (str: string) => string): Select2Data;
14
+ static getFilteredSelectedData(data: Select2Data, selectedOptions: Select2Option | Select2Option[] | null): Select2Data;
15
+ static isSearchboxHiddex(data: Select2Data, minCountForSearch?: number | string): boolean;
16
+ static isSelected(options: Select2Option | Select2Option[] | null, option: Select2Option, multiple: boolean | null | undefined): "true" | "false";
17
+ static removeSelection(options: Select2Option | Select2Option[] | null, option: Select2Option): void;
18
+ private static getOptionsCount;
19
+ private static isNullOrUndefined;
20
+ private static containSearchText;
21
+ private static protectPattern;
22
+ private static formatSansUnicode;
23
+ private static formatPattern;
24
+ }
25
25
  //# sourceMappingURL=select2-utils.d.ts.map
@@ -1,236 +1,236 @@
1
- import { ConnectedPosition } from '@angular/cdk/overlay';
2
- import { ViewportRuler } from '@angular/cdk/scrolling';
3
- import { AfterViewInit, ChangeDetectorRef, DoCheck, EventEmitter, OnDestroy, OnInit, TemplateRef } from '@angular/core';
4
- import { ControlValueAccessor, FormGroupDirective, NgControl, NgForm } from '@angular/forms';
5
- import { Select2Data, Select2Group, Select2Option, Select2RemoveEvent, Select2ScrollEvent, Select2SearchEvent, Select2UpdateEvent, Select2UpdateValue } from './select2-interfaces';
6
- import * as i0 from "@angular/core";
7
- export declare class Select2 implements ControlValueAccessor, OnInit, OnDestroy, DoCheck, AfterViewInit {
8
- protected _viewportRuler: ViewportRuler;
9
- private _changeDetectorRef;
10
- private _parentForm;
11
- private _parentFormGroup;
12
- _control: NgControl;
13
- _data: Select2Data;
14
- /** data of options & optiongrps */
15
- set data(data: Select2Data);
16
- minCharForSearch: number;
17
- displaySearchStatus: 'default' | 'hidden' | 'always';
18
- placeholder: string;
19
- customSearchEnabled: boolean;
20
- limitSelection: number;
21
- listPosition: 'above' | 'below' | 'auto';
22
- get multiple(): any;
23
- set multiple(value: any);
24
- /** use the material style */
25
- get overlay(): any;
26
- set overlay(value: any);
27
- /** use the material style */
28
- styleMode: 'material' | 'noStyle' | 'default';
29
- /** message when no result */
30
- noResultMessage: string;
31
- /** maximum results limit (0 = no limit) */
32
- maxResults: number;
33
- /** message when maximum results */
34
- maxResultsMessage: string;
35
- /** infinite scroll distance */
36
- infiniteScrollDistance: number;
37
- /** infinite scroll distance */
38
- infiniteScrollThrottle: number;
39
- /** infinite scroll activated */
40
- get infiniteScroll(): any;
41
- set infiniteScroll(value: any);
42
- /** auto create if not existe */
43
- get autoCreate(): any;
44
- set autoCreate(value: any);
45
- /** no template for label selection */
46
- get noLabelTemplate(): any;
47
- set noLabelTemplate(value: any);
48
- /** use it for change the pattern of the filter search */
49
- editPattern: (str: string) => string;
50
- /** template for formating */
51
- templates: TemplateRef<any> | {
52
- [key: string]: TemplateRef<any>;
53
- };
54
- /** the max height of the results container when opening the select */
55
- resultMaxHeight: string;
56
- update: EventEmitter<Select2UpdateEvent<Select2UpdateValue>>;
57
- open: EventEmitter<Select2>;
58
- close: EventEmitter<Select2>;
59
- focus: EventEmitter<Select2>;
60
- blur: EventEmitter<Select2>;
61
- search: EventEmitter<Select2SearchEvent<Select2UpdateValue>>;
62
- scroll: EventEmitter<Select2ScrollEvent>;
63
- removeOption: EventEmitter<Select2RemoveEvent<Select2UpdateValue>>;
64
- option: Select2Option | Select2Option[] | null;
65
- isOpen: boolean;
66
- searchStyle: string;
67
- /** Whether the element is focused or not. */
68
- focused: boolean;
69
- filteredData: Select2Data;
70
- get select2Options(): Select2Option[];
71
- get select2Option(): Select2Option;
72
- get searchText(): string;
73
- set searchText(text: string);
74
- /** minimal data of show the search field */
75
- get minCountForSearch(): number | string;
76
- set minCountForSearch(value: number | string);
77
- /** Unique id of the element. */
78
- get id(): string;
79
- set id(value: string);
80
- /** Whether the element is required. */
81
- get required(): any;
82
- set required(value: any);
83
- /** Whether selected items should be hidden. */
84
- get disabled(): any;
85
- set disabled(value: any);
86
- /** Whether items are hidden when has. */
87
- get hideSelectedItems(): any;
88
- set hideSelectedItems(value: any);
89
- /** Whether the element is readonly. */
90
- get readonly(): any;
91
- set readonly(value: any);
92
- /** The input element's value. */
93
- get value(): Select2UpdateValue;
94
- set value(value: Select2UpdateValue);
95
- /** Tab index for the select2 element. */
96
- get tabIndex(): number;
97
- set tabIndex(value: number);
98
- /** reset with no selected value */
99
- get resettable(): any;
100
- set resettable(value: any);
101
- get ariaInvalid(): boolean;
102
- get classMaterial(): boolean;
103
- get classNostyle(): boolean;
104
- get select2above(): boolean;
105
- overlayWidth: number;
106
- overlayHeight: number;
107
- _triggerRect: DOMRect;
108
- _dropdownRect: DOMRect;
109
- get _positions(): ConnectedPosition[];
110
- maxResultsExceeded: boolean;
111
- private _minCountForSearch?;
112
- private cdkConnectedOverlay;
113
- private selection;
114
- private resultContainer;
115
- private results;
116
- private searchInput;
117
- private dropdown;
118
- private hoveringValue;
119
- private innerSearchText;
120
- private isSearchboxHidden;
121
- private selectionElement;
122
- private get resultsElement();
123
- private _stateChanges;
124
- /** Tab index for the element. */
125
- private _tabIndex;
126
- private _disabled;
127
- private _required;
128
- private _readonly;
129
- private _multiple;
130
- private _overlay;
131
- private _resettable;
132
- private _hideSelectedItems;
133
- private _clickDetection;
134
- private _clickDetectionFc;
135
- private _id;
136
- private _uid;
137
- private _value;
138
- private _previousNativeValue;
139
- private _infiniteScroll;
140
- private _autoCreate;
141
- private _noLabelTemplate;
142
- private _overlayPosition;
143
- constructor(_viewportRuler: ViewportRuler, _changeDetectorRef: ChangeDetectorRef, _parentForm: NgForm, _parentFormGroup: FormGroupDirective, _control: NgControl, tabIndex: string);
144
- /** View -> model callback called when select has been touched */
145
- private _onTouched;
146
- /** View -> model callback called when value changes */
147
- private _onChange;
148
- ngOnInit(): void;
149
- ngAfterViewInit(): void;
150
- ngDoCheck(): void;
151
- ngOnDestroy(): void;
152
- updateSearchBox(): void;
153
- hideSearch(): boolean;
154
- getOptionStyle(option: Select2Option): string;
155
- mouseenter(option: Select2Option): void;
156
- click(option: Select2Option): void;
157
- reset(event: MouseEvent): void;
158
- prevChange(event: Event): void;
159
- stopEvent(event: Event): void;
160
- toggleOpenAndClose(focus?: boolean, open?: boolean): void;
161
- hasTemplate(option: Select2Option | Select2Group, defaut: string): boolean;
162
- getTemplate(option: Select2Option | Select2Group, defaut: string): any;
163
- triggerRect(): void;
164
- private testSelection;
165
- private testValueChange;
166
- private updateFilteredData;
167
- private clickDetection;
168
- private clickExit;
169
- private ifParentContainsClass;
170
- private ifParentContainsId;
171
- private getParentElementByClass;
172
- private getParentElementById;
173
- private containClasses;
174
- focusin(): void;
175
- focusout(): void;
176
- select(option: Select2Option | null): void;
177
- keyDown(e: KeyboardEvent, create?: boolean): void;
178
- openKey(e: KeyboardEvent, create?: boolean): void;
179
- searchUpdate(e: Event): void;
180
- trackBy(_index: number, item: Select2Option): any;
181
- isSelected(option: Select2Option): "true" | "false";
182
- isDisabled(option: Select2Option): "true" | "false";
183
- removeSelection(e: MouseEvent | KeyboardEvent, option: Select2Option): void;
184
- /**
185
- * Sets the model value. Implemented as part of ControlValueAccessor.
186
- * @param value
187
- */
188
- writeValue(value: any): void;
189
- /**
190
- * Saves a callback function to be invoked when the select's value
191
- * changes from user input. Part of the ControlValueAccessor interface
192
- * required to integrate with Angular's core forms API.
193
- *
194
- * @param fn Callback to be triggered when the value changes.
195
- */
196
- registerOnChange(fn: (value: any) => void): void;
197
- /**
198
- * Saves a callback function to be invoked when the select is blurred
199
- * by the user. Part of the ControlValueAccessor interface required
200
- * to integrate with Angular's core forms API.
201
- *
202
- * @param fn Callback to be triggered when the component has been touched.
203
- */
204
- registerOnTouched(fn: () => {}): void;
205
- /**
206
- * Sets whether the component should be disabled.
207
- * Implemented as part of ControlValueAccessor.
208
- * @param isDisabled
209
- */
210
- setDisabledState(isDisabled: boolean): void;
211
- onScroll(way: 'up' | 'down'): void;
212
- _isErrorState(): boolean;
213
- private addItem;
214
- private createAndAdd;
215
- private moveUp;
216
- private moveDown;
217
- private updateScrollFromOption;
218
- private selectByEnter;
219
- private _testKey;
220
- private _getKey;
221
- private _isKey;
222
- /**
223
- * Sets the selected option based on a value. If no option can be
224
- * found with the designated value, the select trigger is cleared.
225
- */
226
- private _setSelectionByValue;
227
- /** Does some manual dirty checking on the native input `value` property. */
228
- private _dirtyCheckNativeValue;
229
- private _coerceBooleanProperty;
230
- private _focusSearchboxOrResultsElement;
231
- private _focus;
232
- private _isAbobeOverlay;
233
- static ɵfac: i0.ɵɵFactoryDeclaration<Select2, [null, null, { optional: true; }, { optional: true; }, { optional: true; self: true; }, { attribute: "tabindex"; }]>;
234
- static ɵcmp: i0.ɵɵComponentDeclaration<Select2, "select2", never, { "data": "data"; "minCharForSearch": "minCharForSearch"; "displaySearchStatus": "displaySearchStatus"; "placeholder": "placeholder"; "customSearchEnabled": "customSearchEnabled"; "limitSelection": "limitSelection"; "listPosition": "listPosition"; "multiple": "multiple"; "overlay": "overlay"; "styleMode": "styleMode"; "noResultMessage": "noResultMessage"; "maxResults": "maxResults"; "maxResultsMessage": "maxResultsMessage"; "infiniteScrollDistance": "infiniteScrollDistance"; "infiniteScrollThrottle": "infiniteScrollThrottle"; "infiniteScroll": "infiniteScroll"; "autoCreate": "autoCreate"; "noLabelTemplate": "noLabelTemplate"; "editPattern": "editPattern"; "templates": "templates"; "resultMaxHeight": "resultMaxHeight"; "minCountForSearch": "minCountForSearch"; "id": "id"; "required": "required"; "disabled": "disabled"; "hideSelectedItems": "hideSelectedItems"; "readonly": "readonly"; "value": "value"; "tabIndex": "tabIndex"; "resettable": "resettable"; }, { "update": "update"; "open": "open"; "close": "close"; "focus": "focus"; "blur": "blur"; "search": "search"; "scroll": "scroll"; "removeOption": "removeOption"; }, never, ["select2-label", "select2-hint"], false, never>;
235
- }
1
+ import { ConnectedPosition } from '@angular/cdk/overlay';
2
+ import { ViewportRuler } from '@angular/cdk/scrolling';
3
+ import { AfterViewInit, ChangeDetectorRef, DoCheck, EventEmitter, OnDestroy, OnInit, TemplateRef } from '@angular/core';
4
+ import { ControlValueAccessor, FormGroupDirective, NgControl, NgForm } from '@angular/forms';
5
+ import { Select2Data, Select2Group, Select2Option, Select2RemoveEvent, Select2ScrollEvent, Select2SearchEvent, Select2UpdateEvent, Select2UpdateValue } from './select2-interfaces';
6
+ import * as i0 from "@angular/core";
7
+ export declare class Select2 implements ControlValueAccessor, OnInit, OnDestroy, DoCheck, AfterViewInit {
8
+ protected _viewportRuler: ViewportRuler;
9
+ private _changeDetectorRef;
10
+ private _parentForm;
11
+ private _parentFormGroup;
12
+ _control: NgControl;
13
+ _data: Select2Data;
14
+ /** data of options & optiongrps */
15
+ set data(data: Select2Data);
16
+ minCharForSearch: number;
17
+ displaySearchStatus: 'default' | 'hidden' | 'always';
18
+ placeholder: string;
19
+ customSearchEnabled: boolean;
20
+ limitSelection: number;
21
+ listPosition: 'above' | 'below' | 'auto';
22
+ get multiple(): any;
23
+ set multiple(value: any);
24
+ /** use the material style */
25
+ get overlay(): any;
26
+ set overlay(value: any);
27
+ /** use the material style */
28
+ styleMode: 'material' | 'noStyle' | 'default';
29
+ /** message when no result */
30
+ noResultMessage: string;
31
+ /** maximum results limit (0 = no limit) */
32
+ maxResults: number;
33
+ /** message when maximum results */
34
+ maxResultsMessage: string;
35
+ /** infinite scroll distance */
36
+ infiniteScrollDistance: number;
37
+ /** infinite scroll distance */
38
+ infiniteScrollThrottle: number;
39
+ /** infinite scroll activated */
40
+ get infiniteScroll(): any;
41
+ set infiniteScroll(value: any);
42
+ /** auto create if not existe */
43
+ get autoCreate(): any;
44
+ set autoCreate(value: any);
45
+ /** no template for label selection */
46
+ get noLabelTemplate(): any;
47
+ set noLabelTemplate(value: any);
48
+ /** use it for change the pattern of the filter search */
49
+ editPattern: (str: string) => string;
50
+ /** template for formating */
51
+ templates: TemplateRef<any> | {
52
+ [key: string]: TemplateRef<any>;
53
+ };
54
+ /** the max height of the results container when opening the select */
55
+ resultMaxHeight: string;
56
+ update: EventEmitter<Select2UpdateEvent<Select2UpdateValue>>;
57
+ open: EventEmitter<Select2>;
58
+ close: EventEmitter<Select2>;
59
+ focus: EventEmitter<Select2>;
60
+ blur: EventEmitter<Select2>;
61
+ search: EventEmitter<Select2SearchEvent<Select2UpdateValue>>;
62
+ scroll: EventEmitter<Select2ScrollEvent>;
63
+ removeOption: EventEmitter<Select2RemoveEvent<Select2UpdateValue>>;
64
+ option: Select2Option | Select2Option[] | null;
65
+ isOpen: boolean;
66
+ searchStyle: string;
67
+ /** Whether the element is focused or not. */
68
+ focused: boolean;
69
+ filteredData: Select2Data;
70
+ get select2Options(): Select2Option[];
71
+ get select2Option(): Select2Option;
72
+ get searchText(): string;
73
+ set searchText(text: string);
74
+ /** minimal data of show the search field */
75
+ get minCountForSearch(): number | string;
76
+ set minCountForSearch(value: number | string);
77
+ /** Unique id of the element. */
78
+ get id(): string;
79
+ set id(value: string);
80
+ /** Whether the element is required. */
81
+ get required(): any;
82
+ set required(value: any);
83
+ /** Whether selected items should be hidden. */
84
+ get disabled(): any;
85
+ set disabled(value: any);
86
+ /** Whether items are hidden when has. */
87
+ get hideSelectedItems(): any;
88
+ set hideSelectedItems(value: any);
89
+ /** Whether the element is readonly. */
90
+ get readonly(): any;
91
+ set readonly(value: any);
92
+ /** The input element's value. */
93
+ get value(): Select2UpdateValue;
94
+ set value(value: Select2UpdateValue);
95
+ /** Tab index for the select2 element. */
96
+ get tabIndex(): number;
97
+ set tabIndex(value: number);
98
+ /** reset with no selected value */
99
+ get resettable(): any;
100
+ set resettable(value: any);
101
+ get ariaInvalid(): boolean;
102
+ get classMaterial(): boolean;
103
+ get classNostyle(): boolean;
104
+ get select2above(): boolean;
105
+ overlayWidth: number;
106
+ overlayHeight: number;
107
+ _triggerRect: DOMRect;
108
+ _dropdownRect: DOMRect;
109
+ get _positions(): ConnectedPosition[];
110
+ maxResultsExceeded: boolean;
111
+ private _minCountForSearch?;
112
+ private cdkConnectedOverlay;
113
+ private selection;
114
+ private resultContainer;
115
+ private results;
116
+ private searchInput;
117
+ private dropdown;
118
+ private hoveringValue;
119
+ private innerSearchText;
120
+ private isSearchboxHidden;
121
+ private selectionElement;
122
+ private get resultsElement();
123
+ private _stateChanges;
124
+ /** Tab index for the element. */
125
+ private _tabIndex;
126
+ private _disabled;
127
+ private _required;
128
+ private _readonly;
129
+ private _multiple;
130
+ private _overlay;
131
+ private _resettable;
132
+ private _hideSelectedItems;
133
+ private _clickDetection;
134
+ private _clickDetectionFc;
135
+ private _id;
136
+ private _uid;
137
+ private _value;
138
+ private _previousNativeValue;
139
+ private _infiniteScroll;
140
+ private _autoCreate;
141
+ private _noLabelTemplate;
142
+ private _overlayPosition;
143
+ constructor(_viewportRuler: ViewportRuler, _changeDetectorRef: ChangeDetectorRef, _parentForm: NgForm, _parentFormGroup: FormGroupDirective, _control: NgControl, tabIndex: string);
144
+ /** View -> model callback called when select has been touched */
145
+ private _onTouched;
146
+ /** View -> model callback called when value changes */
147
+ private _onChange;
148
+ ngOnInit(): void;
149
+ ngAfterViewInit(): void;
150
+ ngDoCheck(): void;
151
+ ngOnDestroy(): void;
152
+ updateSearchBox(): void;
153
+ hideSearch(): boolean;
154
+ getOptionStyle(option: Select2Option): string;
155
+ mouseenter(option: Select2Option): void;
156
+ click(option: Select2Option): void;
157
+ reset(event: MouseEvent): void;
158
+ prevChange(event: Event): void;
159
+ stopEvent(event: Event): void;
160
+ toggleOpenAndClose(focus?: boolean, open?: boolean): void;
161
+ hasTemplate(option: Select2Option | Select2Group, defaut: string): boolean;
162
+ getTemplate(option: Select2Option | Select2Group, defaut: string): any;
163
+ triggerRect(): void;
164
+ private testSelection;
165
+ private testValueChange;
166
+ private updateFilteredData;
167
+ private clickDetection;
168
+ private clickExit;
169
+ private ifParentContainsClass;
170
+ private ifParentContainsId;
171
+ private getParentElementByClass;
172
+ private getParentElementById;
173
+ private containClasses;
174
+ focusin(): void;
175
+ focusout(): void;
176
+ select(option: Select2Option | null): void;
177
+ keyDown(e: KeyboardEvent, create?: boolean): void;
178
+ openKey(e: KeyboardEvent, create?: boolean): void;
179
+ searchUpdate(e: Event): void;
180
+ trackBy(_index: number, item: Select2Option): any;
181
+ isSelected(option: Select2Option): "true" | "false";
182
+ isDisabled(option: Select2Option): "true" | "false";
183
+ removeSelection(e: MouseEvent | KeyboardEvent, option: Select2Option): void;
184
+ /**
185
+ * Sets the model value. Implemented as part of ControlValueAccessor.
186
+ * @param value
187
+ */
188
+ writeValue(value: any): void;
189
+ /**
190
+ * Saves a callback function to be invoked when the select's value
191
+ * changes from user input. Part of the ControlValueAccessor interface
192
+ * required to integrate with Angular's core forms API.
193
+ *
194
+ * @param fn Callback to be triggered when the value changes.
195
+ */
196
+ registerOnChange(fn: (value: any) => void): void;
197
+ /**
198
+ * Saves a callback function to be invoked when the select is blurred
199
+ * by the user. Part of the ControlValueAccessor interface required
200
+ * to integrate with Angular's core forms API.
201
+ *
202
+ * @param fn Callback to be triggered when the component has been touched.
203
+ */
204
+ registerOnTouched(fn: () => {}): void;
205
+ /**
206
+ * Sets whether the component should be disabled.
207
+ * Implemented as part of ControlValueAccessor.
208
+ * @param isDisabled
209
+ */
210
+ setDisabledState(isDisabled: boolean): void;
211
+ onScroll(way: 'up' | 'down'): void;
212
+ _isErrorState(): boolean;
213
+ private addItem;
214
+ private createAndAdd;
215
+ private moveUp;
216
+ private moveDown;
217
+ private updateScrollFromOption;
218
+ private selectByEnter;
219
+ private _testKey;
220
+ private _getKey;
221
+ private _isKey;
222
+ /**
223
+ * Sets the selected option based on a value. If no option can be
224
+ * found with the designated value, the select trigger is cleared.
225
+ */
226
+ private _setSelectionByValue;
227
+ /** Does some manual dirty checking on the native input `value` property. */
228
+ private _dirtyCheckNativeValue;
229
+ private _coerceBooleanProperty;
230
+ private _focusSearchboxOrResultsElement;
231
+ private _focus;
232
+ private _isAbobeOverlay;
233
+ static ɵfac: i0.ɵɵFactoryDeclaration<Select2, [null, null, { optional: true; }, { optional: true; }, { optional: true; self: true; }, { attribute: "tabindex"; }]>;
234
+ static ɵcmp: i0.ɵɵComponentDeclaration<Select2, "select2", never, { "data": { "alias": "data"; "required": false; }; "minCharForSearch": { "alias": "minCharForSearch"; "required": false; }; "displaySearchStatus": { "alias": "displaySearchStatus"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "customSearchEnabled": { "alias": "customSearchEnabled"; "required": false; }; "limitSelection": { "alias": "limitSelection"; "required": false; }; "listPosition": { "alias": "listPosition"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "overlay": { "alias": "overlay"; "required": false; }; "styleMode": { "alias": "styleMode"; "required": false; }; "noResultMessage": { "alias": "noResultMessage"; "required": false; }; "maxResults": { "alias": "maxResults"; "required": false; }; "maxResultsMessage": { "alias": "maxResultsMessage"; "required": false; }; "infiniteScrollDistance": { "alias": "infiniteScrollDistance"; "required": false; }; "infiniteScrollThrottle": { "alias": "infiniteScrollThrottle"; "required": false; }; "infiniteScroll": { "alias": "infiniteScroll"; "required": false; }; "autoCreate": { "alias": "autoCreate"; "required": false; }; "noLabelTemplate": { "alias": "noLabelTemplate"; "required": false; }; "editPattern": { "alias": "editPattern"; "required": false; }; "templates": { "alias": "templates"; "required": false; }; "resultMaxHeight": { "alias": "resultMaxHeight"; "required": false; }; "minCountForSearch": { "alias": "minCountForSearch"; "required": false; }; "id": { "alias": "id"; "required": false; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "hideSelectedItems": { "alias": "hideSelectedItems"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "value": { "alias": "value"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "resettable": { "alias": "resettable"; "required": false; }; }, { "update": "update"; "open": "open"; "close": "close"; "focus": "focus"; "blur": "blur"; "search": "search"; "scroll": "scroll"; "removeOption": "removeOption"; }, never, ["select2-label", "select2-hint"], false, never>;
235
+ }
236
236
  //# sourceMappingURL=select2.component.d.ts.map