import { ConfigurableFocusTrapFactory } from '@angular/cdk/a11y'; import { ConnectedPosition, Overlay, OverlayConfig } from '@angular/cdk/overlay'; import { AfterContentInit, ChangeDetectorRef, EventEmitter, OnInit, QueryList, TemplateRef, ViewContainerRef } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import { Observable } from 'rxjs'; import { KcControl, KcControlType } from '@k5cjs/control'; import { KcOptionComponent } from './components'; import { KcOriginDirective } from './directives'; import { KcGroup, KcOption, KcOptionGroupValue, KcOptionSelection, KcOptionValue, KcSelect } from './types'; import * as i0 from "@angular/core"; export declare class KcSelectComponent extends KcControl | KcOptionGroupValue> implements OnInit, AfterContentInit, ControlValueAccessor, KcSelect, KcControlType | KcOptionGroupValue> { private _overlay; private _viewContainerRef; private _cdr; private _trap; get options(): Observable[] | KcOption[][] | KcGroup>; set options(options: Observable[] | KcOption[][] | KcGroup> | KcOption[] | KcOption[][] | KcGroup); private _options; private _optionsCache; /** * allow user to open selection in modal */ get multiple(): boolean; set multiple(value: boolean | string); private _multiple; /** * allow user to open selection in modal */ get dialog(): boolean; set dialog(value: boolean | string); private _dialog; /** * allow user to change origin from where selection will be opened */ origin: KcOriginDirective | undefined; cdkOverlayConfig: OverlayConfig; positions: ConnectedPosition[]; closed: EventEmitter | KcOptionGroupValue>; submitted: EventEmitter | KcOptionGroupValue>; private _valueRef; templateRef: TemplateRef; optionComponents: QueryList>; private _valueDirective?; private _groupDirectives; private _optionsDirectives; set value(val: KcOptionValue | KcOptionGroupValue); get value(): KcOptionValue | KcOptionGroupValue; private _value; /** * selectionOpened variable is for check if the overlay or dialog is open */ selectionOpened: boolean; selection: KcOptionSelection; allSelected: boolean; allSelectedChanged: Observable; private _allSelectedChanged; private _dialogOverlayRef; private _tabIndex; private _subscriptionOptions?; private _subscriptionChanges?; constructor(_overlay: Overlay, _viewContainerRef: ViewContainerRef, _cdr: ChangeDetectorRef, _trap: ConfigurableFocusTrapFactory, tabIndex: string); ngOnInit(): void; ngAfterContentInit(): void; writeValue(obj: KcOptionValue | KcOptionGroupValue): void; /** * allow element to be focusable */ get tabindex(): number; protected _keydown(event: KeyboardEvent): void; /** * open selection when user click on element */ click(): void; /** * focus on element when user press tab to focus on element * and don't open selection, to open selection user need to press space */ _focus(): void; /** * close selection when user press tab to blur on element */ _blur(): void; open(): void; close(): void; submit(): void; keydown(event: KeyboardEvent): void; selectAll(): void; deselectAll(): void; toggle(): void; clear(): void; private _removeOptionsSubscription; private _initSelectionModel; private _updateSelectionModel; private _getOptions; /** * check selected options */ private get _getSelectedOptions(); private _createObservableOptions; private _openOverlay; private _repositionOnScroll; private _getScrollParent; private _getPositionStrategy; private _closeOverlay; /** Invoked when an option is clicked. */ private _onSelect; static ɵfac: i0.ɵɵFactoryDeclaration, [null, null, null, null, { attribute: "tabindex"; }]>; static ɵcmp: i0.ɵɵComponentDeclaration, "kc-select", ["kcSelect"], { "options": { "alias": "options"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "dialog": { "alias": "dialog"; "required": false; }; "origin": { "alias": "origin"; "required": false; }; "cdkOverlayConfig": { "alias": "cdkOverlayConfig"; "required": false; }; "positions": { "alias": "positions"; "required": false; }; }, { "closed": "closed"; "submitted": "submitted"; }, ["_valueDirective", "optionComponents", "_groupDirectives", "_optionsDirectives"], ["*"], false, never>; }