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.

181 lines (176 loc) 7.08 kB
import * as i0 from '@angular/core'; import { ChangeDetectorRef, OnInit, OnDestroy, ElementRef, EventEmitter } from '@angular/core'; import { MatInput } from '@angular/material/input'; import { MatFormFieldAppearance } from '@angular/material/form-field'; import { IControlValueAccessor } from '@covalent/core/common'; import { ControlValueAccessor } from '@angular/forms'; declare class TdSearchInputBase { _changeDetectorRef: ChangeDetectorRef; constructor(_changeDetectorRef: ChangeDetectorRef); } declare const _TdSearchInputMixinBase: (new (...args: any[]) => IControlValueAccessor) & typeof TdSearchInputBase; declare class TdSearchInputComponent extends _TdSearchInputMixinBase implements IControlValueAccessor, OnInit, OnDestroy { private _dir; 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. */ searchChange: 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(); 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, never>; 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"; "searchChange": "searchChange"; "clear": "clear"; "blurSearch": "blurSearch"; }, never, never, true, never>; } declare class TdSearchBoxBase { _changeDetectorRef: ChangeDetectorRef; constructor(_changeDetectorRef: ChangeDetectorRef); } declare class TdSearchBoxComponent implements ControlValueAccessor { private _changeDetectorRef; private _searchVisible; _searchInput?: TdSearchInputComponent; get searchVisible(): boolean; /** * backIcon?: string * The icon used to close the search toggle, only shown when [alwaysVisible] is false. * Defaults to 'search' icon. */ backIcon: string; /** * searchIcon?: string * The icon used to open/focus the search toggle. * Defaults to 'search' icon. */ searchIcon: string; /** * clearIcon?: string * The icon used to clear the search input. * Defaults to 'cancel' icon. */ clearIcon: string; /** * 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; /** * alwaysVisible?: boolean * Sets if the input should always be visible. Defaults to 'false'. */ alwaysVisible: boolean; /** * placeholder?: string * Placeholder for the underlying input component. */ placeholder: 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. */ searchChange: 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>; writeValue(value: unknown): void; registerOnChange(): void; registerOnTouched(): void; /** * Method executed when the search icon is clicked. */ searchClicked(): void; toggleVisibility(): void; handleSearchDebounce(value: string): void; handleSearch(value: string): void; handleClear(): void; handleBlur(): void; static ɵfac: i0.ɵɵFactoryDeclaration<TdSearchBoxComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<TdSearchBoxComponent, "td-search-box", never, { "backIcon": { "alias": "backIcon"; "required": false; }; "searchIcon": { "alias": "searchIcon"; "required": false; }; "clearIcon": { "alias": "clearIcon"; "required": false; }; "showUnderline": { "alias": "showUnderline"; "required": false; }; "debounce": { "alias": "debounce"; "required": false; }; "alwaysVisible": { "alias": "alwaysVisible"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "searchDebounce": "searchDebounce"; "searchChange": "searchChange"; "clear": "clear"; "blurSearch": "blurSearch"; }, never, never, true, never>; } /** * @deprecated This module is deprecated and will be removed in future versions. * Please migrate to using standalone components as soon as possible. */ declare class CovalentSearchModule { static ɵfac: i0.ɵɵFactoryDeclaration<CovalentSearchModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<CovalentSearchModule, never, [typeof TdSearchInputComponent, typeof TdSearchBoxComponent], [typeof TdSearchInputComponent, typeof TdSearchBoxComponent]>; static ɵinj: i0.ɵɵInjectorDeclaration<CovalentSearchModule>; } export { CovalentSearchModule, TdSearchBoxBase, TdSearchBoxComponent, TdSearchInputBase, TdSearchInputComponent, _TdSearchInputMixinBase };