ngx-virtual-select-field-filterable 1.4.8 → 1.4.10

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,209 +0,0 @@
1
- import { AfterContentInit, ElementRef, OnDestroy, OnInit, QueryList, Signal, TrackByFunction } from '@angular/core';
2
- import { ControlValueAccessor, NgControl } from '@angular/forms';
3
- import { CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';
4
- import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
5
- import { MatFormField, MatFormFieldControl } from '@angular/material/form-field';
6
- import { Observable } from 'rxjs';
7
- import { NgxVirtualSelectFieldOptionForDirective, NgxVirtualSelectFieldOptionModel } from './virtual-select-field-option-for';
8
- import { NgxVirtualSelectFieldTriggerDirective } from './virtual-select-field-trigger';
9
- import { NgxVirtualSelectFieldOptionComponent, NgxVirtualSelectFieldOptionParent } from './virtual-select-field-option';
10
- import { NgxVirtualSelectFieldConfig } from './virtual-select-field.models';
11
- import * as i0 from "@angular/core";
12
- export declare class NgxVirtualSelectFieldComponent<TValue> implements OnInit, OnDestroy, AfterContentInit, MatFormFieldControl<TValue[] | TValue>, ControlValueAccessor, NgxVirtualSelectFieldOptionParent {
13
- private _parentFormField;
14
- private _defaultOptions?;
15
- userAriaDescribedBy: string;
16
- /**
17
- * Width for overlay panel
18
- * @default 'auto'
19
- */
20
- panelWidth: string | number | null;
21
- /**
22
- * Height for an option element
23
- * @default 48
24
- */
25
- optionHeight: number;
26
- /**
27
- * Amount of visible items in list
28
- * @default 8
29
- */
30
- panelViewportPageSize: number;
31
- /**
32
- * Enable multiple selection
33
- * @default false
34
- */
35
- multiple: boolean;
36
- /**
37
- * Tab index for keyboard navigation
38
- * @default 0
39
- */
40
- tabIndex: number;
41
- /**
42
- * Milliseconds to wait before navigating to active element after keyboard search
43
- * @default 300
44
- */
45
- typeaheadDebounceInterval: number;
46
- /**
47
- * CSS class to be added to the panel element
48
- * @default none
49
- */
50
- panelClass: string | string[] | null;
51
- /**
52
- * Enable filtering of options
53
- * @default false
54
- */
55
- filterable: boolean;
56
- /**
57
- * Placeholder text for the filter input
58
- * @default 'Search...'
59
- */
60
- filterPlaceholder: string;
61
- /**
62
- * Show clear button in filter input
63
- * @default true
64
- */
65
- filterClearable: boolean;
66
- /**
67
- * Show clear button in select trigger
68
- * @default false
69
- */
70
- clearable: boolean;
71
- /**
72
- * Show loading spinner
73
- * @default false
74
- */
75
- loading: boolean;
76
- /**
77
- * Value of the select field
78
- * @default null
79
- */
80
- set value(value: TValue[] | TValue | null);
81
- private _value;
82
- /**
83
- * Placeholder for the select field
84
- * @default none
85
- */
86
- set placeholder(placeholder: string);
87
- get placeholder(): string;
88
- private _placeholder;
89
- /**
90
- * Define if fields is required
91
- * @default false
92
- */
93
- set required(req: boolean);
94
- get required(): boolean;
95
- private _required;
96
- /**
97
- * Define if field is disabled
98
- * @default false
99
- */
100
- set disabled(value: boolean);
101
- get disabled(): boolean;
102
- private _disabled;
103
- /**
104
- * Value change event
105
- */
106
- valueChange: import("@angular/core").OutputEmitterRef<any>;
107
- /**
108
- * Selection change event
109
- * Emits after value change and form control update
110
- */
111
- selectionChange: import("@angular/core").OutputEmitterRef<NgxVirtualSelectFieldChange<TValue>>;
112
- cdkVirtualScrollViewport: CdkVirtualScrollViewport;
113
- cdkConnectedOverlay: CdkConnectedOverlay;
114
- filterInput: ElementRef<HTMLInputElement> | undefined;
115
- optionFor: NgxVirtualSelectFieldOptionForDirective<TValue>;
116
- customTrigger: NgxVirtualSelectFieldTriggerDirective | null;
117
- optionsQuery: QueryList<NgxVirtualSelectFieldOptionComponent<TValue>> | null;
118
- readonly id: string;
119
- readonly controlType = "ngx-virtual-select-field";
120
- readonly ngControl: NgControl | null;
121
- autofilled: boolean;
122
- protected readonly POSITIONS: import("@angular/cdk/overlay").ConnectedPosition[];
123
- protected readonly overlayPanelClass: string | string[];
124
- protected readonly inheritedColorTheme: string;
125
- protected readonly overlayWidth: Signal<string | number>;
126
- protected readonly isPanelOpened: import("@angular/core").WritableSignal<boolean>;
127
- protected readonly filterText: import("@angular/core").WritableSignal<string>;
128
- protected readonly options: import("@angular/core").WritableSignal<NgxVirtualSelectFieldOptionModel<TValue>[]>;
129
- protected readonly filteredOptions: Signal<NgxVirtualSelectFieldOptionModel<TValue>[]>;
130
- protected readonly hasOptionsToFilter: Signal<boolean>;
131
- protected readonly hasNoFilteredResults: Signal<boolean>;
132
- protected triggerValue$: Observable<string> | null;
133
- protected preferredOverlayOrigin: CdkOverlayOrigin | ElementRef | undefined;
134
- private readonly _changeDetectorRef;
135
- private readonly _destroyRef;
136
- private readonly _elRef;
137
- private readonly _stateChanges;
138
- private readonly _scrolledIndexChange;
139
- private _onChange;
140
- private _onTouched;
141
- private _selectionModel;
142
- private _keyManager;
143
- constructor(_parentFormField: MatFormField, _defaultOptions?: NgxVirtualSelectFieldConfig | undefined);
144
- private createOverlayWidthSignal;
145
- private resolveOverlayWidth;
146
- get shouldLabelFloat(): boolean;
147
- get empty(): boolean;
148
- get stateChanges(): Observable<void>;
149
- get errorState(): boolean;
150
- get focused(): boolean;
151
- private _focused;
152
- protected get maxPageSize(): number;
153
- ngOnInit(): void;
154
- ngAfterContentInit(): void;
155
- private updateOptionSelection;
156
- ngOnDestroy(): void;
157
- writeValue(value: TValue[]): void;
158
- registerOnChange(fn: (value: TValue[] | TValue) => void): void;
159
- registerOnTouched(fn: () => void): void;
160
- setDisabledState(isDisabled: boolean): void;
161
- setDescribedByIds(ids: string[]): void;
162
- onContainerClick(): void;
163
- onOverlayAttached(): void;
164
- private navigateToFirstSelectedOption;
165
- protected onFocusIn(): void;
166
- protected onFocusOut(): void;
167
- protected optionTrackBy: TrackByFunction<NgxVirtualSelectFieldOptionModel<TValue>>;
168
- protected onScrolledIndexChange(): void;
169
- protected onFilterInput(event: Event): void;
170
- protected onFilterClear(): void;
171
- protected onClear(event: Event): void;
172
- protected onFilterKeyDown(event: KeyboardEvent): void;
173
- protected open(): void;
174
- protected close(): void;
175
- protected onKeyDown(event: KeyboardEvent): void;
176
- private doPanelOpenedKeydown;
177
- private toggleAllOptions;
178
- private doPanelClosedKeydown;
179
- private initListKeyManager;
180
- private normalizeKeyManagerOptions;
181
- private updateActiveOptionComponent;
182
- private shouldScrollToActiveItem;
183
- private setActiveOptionComponentByValue;
184
- private focus;
185
- private selectOptionByValue;
186
- private updateRenderedOptionsState;
187
- private findOptionByValue;
188
- private emitValue;
189
- private assertIsDefined;
190
- private static nextId;
191
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxVirtualSelectFieldComponent<any>, [{ optional: true; }, { optional: true; }]>;
192
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxVirtualSelectFieldComponent<any>, "ngx-virtual-select-field", ["ngxVirtualSelectField"], { "userAriaDescribedBy": { "alias": "aria-describedby"; "required": false; }; "panelWidth": { "alias": "panelWidth"; "required": false; }; "optionHeight": { "alias": "optionHeight"; "required": false; }; "panelViewportPageSize": { "alias": "panelViewportPageSize"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "typeaheadDebounceInterval": { "alias": "typeaheadDebounceInterval"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "filterable": { "alias": "filterable"; "required": false; }; "filterPlaceholder": { "alias": "filterPlaceholder"; "required": false; }; "filterClearable": { "alias": "filterClearable"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "value": { "alias": "value"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "valueChange": "valueChange"; "selectionChange": "selectionChange"; }, ["optionFor", "customTrigger", "optionsQuery"], ["ngx-virtual-select-field-trigger"], true, never>;
193
- static ngAcceptInputType_optionHeight: unknown;
194
- static ngAcceptInputType_panelViewportPageSize: unknown;
195
- static ngAcceptInputType_multiple: unknown;
196
- static ngAcceptInputType_tabIndex: unknown;
197
- static ngAcceptInputType_typeaheadDebounceInterval: unknown;
198
- static ngAcceptInputType_filterable: unknown;
199
- static ngAcceptInputType_filterClearable: unknown;
200
- static ngAcceptInputType_clearable: unknown;
201
- static ngAcceptInputType_loading: unknown;
202
- static ngAcceptInputType_required: unknown;
203
- static ngAcceptInputType_disabled: unknown;
204
- }
205
- export declare class NgxVirtualSelectFieldChange<TValue> {
206
- source: NgxVirtualSelectFieldComponent<TValue>;
207
- value: any;
208
- constructor(source: NgxVirtualSelectFieldComponent<TValue>, value: any);
209
- }
@@ -1,8 +0,0 @@
1
- import { ConnectedPosition } from '@angular/cdk/overlay';
2
- import { InjectionToken } from '@angular/core';
3
- import { NgxVirtualSelectFieldConfig } from './virtual-select-field.models';
4
- export declare const POSITIONS: ConnectedPosition[];
5
- export declare const NGX_VIRTUAL_SELECT_FIELD_CONFIG: InjectionToken<NgxVirtualSelectFieldConfig>;
6
- export declare const PANEL_WIDTH_AUTO = "auto";
7
- export declare const PANEL_VIEWPORT_PAGE_SIZE = 8;
8
- export declare const OPTION_HEIGHT = 48;
@@ -1,18 +0,0 @@
1
- export interface NgxVirtualSelectFieldConfig {
2
- /**
3
- * CSS class to add to the overlay element
4
- */
5
- overlayPanelClass?: string | string[];
6
- /**
7
- * Width for overlay panel
8
- */
9
- panelWidth?: string | number;
10
- /**
11
- * Height for an option element
12
- */
13
- optionHeight?: number;
14
- /**
15
- * Amount of visible items in list
16
- */
17
- panelViewportPageSize?: number;
18
- }