import { Overlay, ScrollStrategy } from '@angular/cdk/overlay'; import { NgForm, FormGroupDirective, NgControl, ControlValueAccessor } from "@angular/forms"; import { MatFormField, ErrorStateMatcher, MatFormFieldControl, CanDisable, CanUpdateErrorState, HasTabIndex } from "@angular/material"; import { ChangeDetectorRef, ElementRef, InjectionToken, ViewContainerRef, EventEmitter } from '@angular/core'; import { Observable } from 'rxjs/Observable'; import { Subject } from 'rxjs/Subject'; import { TreeWrapComponent } from "./tree-wrapper"; /** Injection token that determines the scroll handling while the autocomplete panel is open. */ export declare const MAT_AUTOCOMPLETE_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>; /** @docs-private */ export declare function MAT_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => ScrollStrategy; /** @docs-private */ export declare const MAT_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER: { provide: InjectionToken<() => ScrollStrategy>; deps: typeof Overlay[]; useFactory: (overlay: Overlay) => () => ScrollStrategy; }; /** Change event object that is emitted when the select value has changed. */ export declare class TreeSelectChange { /** Reference to the select that emitted the change event. */ source: any; /** Current value of the select that emitted the event. */ value: { id; name; data?; }; constructor( /** Reference to the select that emitted the change event. */ source: any, /** Current value of the select that emitted the event. */ value: { id; name; data?; }); } export declare class MatSelectBase { _elementRef: ElementRef; _defaultErrorStateMatcher: ErrorStateMatcher; _parentForm: NgForm; _parentFormGroup: FormGroupDirective; ngControl: NgControl; constructor(_elementRef: ElementRef, _defaultErrorStateMatcher: ErrorStateMatcher, _parentForm: NgForm, _parentFormGroup: FormGroupDirective, ngControl: NgControl); } export declare const _MatSelectMixinBase: (new (...args: any[]) => HasTabIndex) & (new (...args: any[]) => CanDisable) & (new (...args: any[]) => CanUpdateErrorState) & typeof MatSelectBase; export declare class SelectTreeInput extends _MatSelectMixinBase implements MatFormFieldControl, ControlValueAccessor { private _element; private _overlay; private _viewContainerRef; ngControl: NgControl; private _changeDetectorRef; private _scrollStrategy; private _formField; private _document; static nextId: number; id: string; triggerValue: any; private _overlayRef; private _portal; /** Strategy that is used to position the panel. */ private _positionStrategy; private _value; /** Old value of the native input. Used to work around issues with the `input` event on IE. */ private _previousValue; /** The subscription for closing actions (some are bound to document). */ private _closingActionsSubscription; private _panelOpen; /** Whether or not the overlay panel is open. */ readonly panelOpen: boolean; /** The tree panel to be attached to this trigger. */ treeWrap: TreeWrapComponent; displayValue: any; disabled: boolean; /** An object used to control when error messages are shown. */ errorStateMatcher: ErrorStateMatcher; treeSelectChange: EventEmitter; /** Opens the autocomplete suggestion panel. */ openPanel(): void; constructor(_element: ElementRef, _overlay: Overlay, _viewContainerRef: ViewContainerRef, _defaultErrorStateMatcher: ErrorStateMatcher, _parentForm: NgForm, _parentFormGroup: FormGroupDirective, ngControl: NgControl, _changeDetectorRef: ChangeDetectorRef, _scrollStrategy: any, _formField: MatFormField, _document: any); stateChanges: Subject; value: any | null; readonly empty: boolean; readonly shouldLabelFloat: boolean; required: boolean; private _required; /** Handles all keydown events on the select. */ _handleKeydown(event: KeyboardEvent): void; describedBy: string; setDescribedByIds(ids: string[]): void; onContainerClick(event: MouseEvent): void; placeholder: string; private _placeholder; ngOnDestroy(): void; ngOnInit(): void; ngDoCheck(): void; toggle(): void; private _attachOverlay(); generateProtalAndOverlay(): void; /** Closes the autocomplete suggestion panel. */ closePanel(): void; _handleInput(event: KeyboardEvent): void; _handleFocus(): void; private _getOverlayConfig(); private _getOverlayPosition(); private _getConnectedElement(); /** Returns the width of the input element, so the panel width can match it. */ private _getHostWidth(); /** Determines whether the panel can be opened. */ private _canOpen(); readonly panelClosingActions: Observable; private _subscribeToClosingActions(); clearValue($event: MouseEvent): void; /** * This method closes the panel, and if a value is specified, also sets the associated * control to that value. It will also mark the control as dirty if this interaction * stemmed from the user. */ private _setValueAndClose(event); private readonly treeCloseStatus; /** Stream of clicks outside of the autocomplete panel. */ private readonly _outsideClickStream; /** `View -> model callback called when value changes` */ _onChange: (value: any) => void; /** `View -> model callback called when select has been touched` */ _onTouched: () => {}; /** * Sets the select's value. Part of the ControlValueAccessor interface * required to integrate with Angular's core forms API. * * @param value New value to be written to the model. */ writeValue(value: any): void; /** * Saves a callback function to be invoked when the select's value * changes from user input. Part of the ControlValueAccessor interface * required to integrate with Angular's core forms API. * * @param fn Callback to be triggered when the value changes. */ registerOnChange(fn: (value: any) => void): void; /** * Saves a callback function to be invoked when the select is blurred * by the user. Part of the ControlValueAccessor interface required * to integrate with Angular's core forms API. * * @param fn Callback to be triggered when the component has been touched. */ registerOnTouched(fn: () => {}): void; /** * Disables the select. Part of the ControlValueAccessor interface required * to integrate with Angular's core forms API. * * @param isDisabled Sets whether the component is disabled. */ setDisabledState(isDisabled: boolean): void; focused: boolean; _onFocus(): void; /** * Calls the touched callback only if the panel is closed. Otherwise, the trigger will * "blur" to the panel when it opens, causing a false positive. */ _onBlur(): void; }