UNPKG

@ux-aspects/ux-aspects

Version:

Open source user interface framework for building modern, responsive, mobile big data applications

40 lines (39 loc) 1.83 kB
import { EventEmitter } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import * as i0 from "@angular/core"; export declare const TOOLBAR_SEARCH_VALUE_ACCESSOR: { provide: import("@angular/core").InjectionToken<readonly ControlValueAccessor[]>; useExisting: import("@angular/core").Type<any>; multi: boolean; }; export declare class ToolbarSearchFieldDirective implements ControlValueAccessor { private readonly _elementRef; private readonly _changeDetector; /** Emit whenever the escape key is pressed */ cancel: EventEmitter<void>; /** Emit whenever the enter key is pressed */ submitted: EventEmitter<string>; /** Get the current value of the input control */ get text(): string; /** For use with the Forms and ReactiveForms */ private onTouchedCallback; /** Call this function with the latest value to update ngModel or formControl name */ private onChangeCallback; focus(): void; blur(): void; /** Clear the input, if we have an ngModel reset its value otherwise just set the input value to empty */ clear(): void; onEnter(): void; onEscape(): void; onInput(): void; /** Update the input value based on ngModel or formControl */ writeValue(value: string): void; /** Register a function to update form control */ registerOnChange(fn: any): void; /** Register a function to mark form control as touched */ registerOnTouched(fn: any): void; /** Update the value in all required places */ private setValue; static ɵfac: i0.ɵɵFactoryDeclaration<ToolbarSearchFieldDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<ToolbarSearchFieldDirective, "[uxToolbarSearchField]", never, {}, { "cancel": "cancel"; "submitted": "submitted"; }, never, never, false, never>; }