import { OnChanges, OnDestroy, OnInit, AfterViewInit, ChangeDetectorRef, EventEmitter, TemplateRef, ElementRef, SimpleChanges, QueryList, InjectionToken } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import { Subject } from 'rxjs'; import { ConsoleService } from './console.service'; import { ItemsList } from './items-list'; import { NgOption, DropdownPosition } from './ng-select.types'; import { NgDropdownPanelComponent } from './ng-dropdown-panel.component'; import { NgOptionComponent } from './ng-option.component'; import { SelectionModelFactory } from './selection-model'; import { NgSelectConfig } from './config.service'; import * as i0 from "@angular/core"; export declare const SELECTION_MODEL_FACTORY: InjectionToken; export type AddTagFn = ((term: string) => any | Promise); export type CompareWithFn = (a: any, b: any) => boolean; export type GroupValueFn = (key: string | any, children: any[]) => string | any; export declare class NgSelectComponent implements OnDestroy, OnChanges, OnInit, AfterViewInit, ControlValueAccessor { classes: string; private autoFocus; config: NgSelectConfig; private _cd; private _console; bindLabel: string; bindValue: string; markFirst: boolean; placeholder: string; notFoundText: string; typeToSearchText: string; addTagText: string; loadingText: string; clearAllText: string; appearance: string; dropdownPosition: DropdownPosition; appendTo: string; loading: boolean; closeOnSelect: boolean; hideSelected: boolean; selectOnTab: boolean; openOnEnter: boolean; maxSelectedItems: number; groupBy: string | ((value: any) => any); groupValue: GroupValueFn; bufferAmount: number; virtualScroll: boolean; selectableGroup: boolean; selectableGroupAsModel: boolean; searchFn: any; trackByFn: any; clearOnBackspace: boolean; labelForId: any; inputAttrs: { [key: string]: string; }; tabIndex: number; readonly: boolean; searchWhileComposing: boolean; minTermLength: number; editableSearchTerm: boolean; keyDownFn: (_: KeyboardEvent) => boolean; typeahead: Subject; multiple: boolean; addTag: boolean | AddTagFn; searchable: boolean; clearable: boolean; isOpen?: boolean; get items(): readonly any[] | null | undefined; set items(value: readonly any[] | null | undefined); get compareWith(): CompareWithFn; set compareWith(fn: CompareWithFn); get clearSearchOnAdd(): boolean; set clearSearchOnAdd(value: boolean); get deselectOnClick(): boolean; set deselectOnClick(value: boolean); blurEvent: EventEmitter; focusEvent: EventEmitter; changeEvent: EventEmitter; openEvent: EventEmitter; closeEvent: EventEmitter; searchEvent: EventEmitter<{ term: string; items: any[]; }>; clearEvent: EventEmitter; addEvent: EventEmitter; removeEvent: EventEmitter; scroll: EventEmitter<{ start: number; end: number; }>; scrollToEnd: EventEmitter; optionTemplate: TemplateRef; optgroupTemplate: TemplateRef; labelTemplate: TemplateRef; multiLabelTemplate: TemplateRef; headerTemplate: TemplateRef; footerTemplate: TemplateRef; notFoundTemplate: TemplateRef; typeToSearchTemplate: TemplateRef; loadingTextTemplate: TemplateRef; tagTemplate: TemplateRef; loadingSpinnerTemplate: TemplateRef; dropdownPanel: NgDropdownPanelComponent; searchInput: ElementRef; clearButton: ElementRef; ngOptions: QueryList; useDefaultClass: boolean; get disabled(): boolean; get filtered(): boolean; get single(): boolean; itemsList: ItemsList; viewPortItems: NgOption[]; searchTerm: string; dropdownId: string; element: HTMLElement; focused: boolean; escapeHTML: boolean; private _items; private _itemsAreUsed; private _defaultLabel; private _primitive; private _manualOpen; private _disabled; private _pressedKeys; private _compareWith; private _clearSearchOnAdd; private _deselectOnClick; private _isComposing; private get _editableSearchTerm(); private readonly _destroy$; private readonly _keyPress$; private _onChange; private _onTouched; clearItem: (item: any) => void; constructor(classes: string, autoFocus: any, config: NgSelectConfig, newSelectionModel: SelectionModelFactory, _elementRef: ElementRef, _cd: ChangeDetectorRef, _console: ConsoleService); get selectedItems(): NgOption[]; get selectedValues(): any[]; get hasValue(): boolean; get currentPanelPosition(): DropdownPosition; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; ngAfterViewInit(): void; ngOnDestroy(): void; handleKeyDown($event: KeyboardEvent): void; handleKeyCode($event: KeyboardEvent): void; handleKeyCodeInput($event: KeyboardEvent): void; handleKeyCodeClear($event: KeyboardEvent): void; handleMousedown($event: MouseEvent): void; handleArrowClick(): void; handleClearClick(): void; clearModel(): void; writeValue(value: any | any[]): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; setDisabledState(state: boolean): void; toggle(): void; open(): void; close(): void; toggleItem(item: NgOption): void; select(item: NgOption): void; focus(): void; blur(): void; unselect(item: NgOption): void; selectTag(): void; showClear(): boolean; focusOnClear(): void; trackByOption: (_: number, item: NgOption) => any; get showAddTag(): boolean; showNoItemsFound(): boolean; showTypeToSearch(): boolean; onCompositionStart(): void; onCompositionEnd(term: string): void; filter(term: string): void; onInputFocus($event: any): void; onInputBlur($event: any): void; onItemHover(item: NgOption): void; detectChanges(): void; private _setSearchTermFromItems; private _setItems; private _setItemsFromNgOptions; private _isValidWriteValue; private _handleWriteValue; private _handleKeyPresses; private _setInputAttributes; private _updateNgModel; private _clearSearch; private _changeSearch; private _scrollToMarked; private _scrollToTag; private _onSelectionChanged; private _handleTab; private _handleEnter; private _handleSpace; private _handleArrowDown; private _handleArrowUp; private _nextItemIsTag; private _handleBackspace; private get _isTypeahead(); private get _validTerm(); private _mergeGlobalConfig; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_markFirst: unknown; static ngAcceptInputType_loading: unknown; static ngAcceptInputType_closeOnSelect: unknown; static ngAcceptInputType_hideSelected: unknown; static ngAcceptInputType_selectOnTab: unknown; static ngAcceptInputType_openOnEnter: unknown; static ngAcceptInputType_maxSelectedItems: unknown; static ngAcceptInputType_bufferAmount: unknown; static ngAcceptInputType_virtualScroll: unknown; static ngAcceptInputType_selectableGroup: unknown; static ngAcceptInputType_selectableGroupAsModel: unknown; static ngAcceptInputType_clearOnBackspace: unknown; static ngAcceptInputType_tabIndex: unknown; static ngAcceptInputType_readonly: unknown; static ngAcceptInputType_searchWhileComposing: unknown; static ngAcceptInputType_minTermLength: unknown; static ngAcceptInputType_editableSearchTerm: unknown; static ngAcceptInputType_multiple: unknown; static ngAcceptInputType_searchable: unknown; static ngAcceptInputType_clearable: unknown; static ngAcceptInputType_isOpen: unknown; }