UNPKG

@covalent/core

Version:

Core Teradata UI Platform for layouts, icons, custom components and themes. This should be added as a dependency for any project that wants to use layouts, icons and themes for Angular Material.

85 lines (84 loc) 3.39 kB
import { OnInit, EventEmitter, ChangeDetectorRef, OnDestroy, ElementRef, NgZone } from '@angular/core'; import { Dir } from '@angular/cdk/bidi'; import { MatInput } from '@angular/material/input'; import { MatFormFieldAppearance } from '@angular/material/form-field'; import { IControlValueAccessor } from '@covalent/core/common'; import * as i0 from "@angular/core"; export declare class TdSearchInputBase { _changeDetectorRef: ChangeDetectorRef; constructor(_changeDetectorRef: ChangeDetectorRef); } export declare const _TdSearchInputMixinBase: (new (...args: any[]) => IControlValueAccessor) & typeof TdSearchInputBase; export declare class TdSearchInputComponent extends _TdSearchInputMixinBase implements IControlValueAccessor, OnInit, OnDestroy { private _dir; _changeDetectorRef: ChangeDetectorRef; private _ngZone; _input?: MatInput; _searchElement: ElementRef<HTMLInputElement>; /** * appearance?: MatFormFieldAppearance * Appearance style for the underlying input component. */ appearance: MatFormFieldAppearance; /** * showUnderline?: boolean * Sets if the input underline should be visible. Defaults to 'false'. */ showUnderline: boolean; /** * debounce?: number * Debounce timeout between keypresses. Defaults to 400. */ debounce: number; /** * placeholder?: string * Placeholder for the underlying input component. */ placeholder: string; /** * clearIcon?: string * The icon used to clear the search input. * Defaults to 'cancel' icon. */ clearIcon: string; value: unknown; /** * searchDebounce: function($event) * Event emitted after the [debounce] timeout. */ searchDebounce: EventEmitter<string>; /** * search: function($event) * Event emitted after the key enter has been pressed. */ search: EventEmitter<string>; /** * clear: function() * Event emitted after the clear icon has been clicked. */ clear: EventEmitter<void>; /** * blur: function() * Event emitted after the blur event has been called in underlying input. */ blurSearch: EventEmitter<void>; get isRTL(): boolean; private _destroy$; constructor(_dir: Dir, _changeDetectorRef: ChangeDetectorRef, _ngZone: NgZone); ngOnInit(): void; ngOnDestroy(): void; /** * Method to focus to underlying input. */ focus(): void; handleBlur(): void; handleSearch(event: Event): void; /** * Method to clear the underlying input. */ clearSearch(): void; private _searchTermChanged; private _stopPropagation; static ɵfac: i0.ɵɵFactoryDeclaration<TdSearchInputComponent, [{ optional: true; }, null, null]>; static ɵcmp: i0.ɵɵComponentDeclaration<TdSearchInputComponent, "td-search-input", never, { "appearance": { "alias": "appearance"; "required": false; }; "showUnderline": { "alias": "showUnderline"; "required": false; }; "debounce": { "alias": "debounce"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "clearIcon": { "alias": "clearIcon"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "searchDebounce": "searchDebounce"; "search": "search"; "clear": "clear"; "blurSearch": "blurSearch"; }, never, never, true, never>; }