@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.
89 lines (88 loc) • 3.43 kB
TypeScript
import { EventEmitter, ChangeDetectorRef } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
import { TdSearchInputComponent } from '../search-input/search-input.component';
import * as i0 from "@angular/core";
export declare class TdSearchBoxBase {
_changeDetectorRef: ChangeDetectorRef;
constructor(_changeDetectorRef: ChangeDetectorRef);
}
export 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.
*/
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>;
constructor(_changeDetectorRef: ChangeDetectorRef);
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"; "search": "search"; "clear": "clear"; "blurSearch": "blurSearch"; }, never, never, false, never>;
}