@nova-ui/bits
Version:
SolarWinds Nova Framework
67 lines (66 loc) • 2.74 kB
TypeScript
import { EventEmitter, OnDestroy } from "@angular/core";
import { Subject } from "rxjs";
import { IFilter, IFilterPub } from "../../services/data-source/public-api";
import * as i0 from "@angular/core";
export declare class SearchComponent implements IFilterPub, OnDestroy {
detectFilterChanges: boolean;
/**
* default text of placeholder if no custom ones is provided
*/
defaultPlaceholder: string;
/** @ignore */
onDestroy$: Subject<void>;
/**
* Controls focus of input field (true means focused).
*/
captureFocus: boolean;
/**
* Name of input the element.
*/
name: string;
/**
* Input to apply error state styles
*/
isInErrorState: boolean;
/**
* A string that will be placed as a watermark inside of the search when it's empty.
*/
placeholder: string;
/**
* Initial value of input field.
*/
value: string;
/**
* Event fired on each 'cancel' button click. Emits empty string.
*/
cancel: EventEmitter<string>;
/**
* Event fired on external focus changes (e.g. initiated by user via UI).
* Use it if you bind an external input to 'captureFocus' property for matching them both.
*/
focusChange: EventEmitter<boolean>;
/**
* Event fired when input field value is changed (via either keyboard or typeahead select item).
* Pay attention, that host property bound to 'value' is not being changed by component on this event,
* it is the responsibility of host component. The same with clearing of 'busy' status - if you want
* to clear it on inputChange - handle it in host component
*/
inputChange: EventEmitter<string>;
/**
* Event fired on 'search' button click or 'ENTER' key pressed
*/
search: EventEmitter<string>;
searchIconColor: string;
constructor();
getFilters(): IFilter<string>;
getPlaceholder(): string;
onCancel(): void;
onFocusChange(event: boolean): void;
onInputChange(): void;
onKeyup(event: KeyboardEvent): void;
isButtonDisabled(): boolean;
onSearch(): void;
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<SearchComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SearchComponent, "nui-search", never, { "captureFocus": { "alias": "captureFocus"; "required": false; }; "name": { "alias": "name"; "required": false; }; "isInErrorState": { "alias": "isInErrorState"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "cancel": "cancel"; "focusChange": "focusChange"; "inputChange": "inputChange"; "search": "search"; }, never, never, false, never>;
}