import { EventEmitter, OnDestroy, OnInit } from '@angular/core'; import { ControlValueAccessor, FormGroup } from '@angular/forms'; import { MatIconRegistry } from '@angular/material/icon'; import { DomSanitizer } from '@angular/platform-browser'; import { SearchData, SearchResults, SearchTerms } from './searchbox.model'; import { SearchboxService } from './searchbox.service'; import * as i0 from "@angular/core"; /** * Searchbox component, sized to fit a toolbar, to which a set of search data is provided, and which can then * perform a search on the provided data and emit a result to a parent component. */ export declare class NgxMatSearchboxComponent implements OnInit, OnDestroy, ControlValueAccessor { private iconRegistry; private sanitizer; private searchService; /** * Full search dataset, in format suitable for reporting search results */ private allResults; /** * Supplies search dataset to component */ set searchData(data: SearchData); /** * Determines if search happens on each key stroke or only when search button is clicked (or on enter key stoke) */ searchContinuous: boolean; /** * Localization */ private terms; get searchTerms(): SearchTerms; set searchTerms(searchTerms: SearchTerms); /** * Determines whether search component is disabled */ private disabled; get searchDisabled(): boolean; set searchDisabled(disabled: boolean); /** * Determine if search looks for first match and then each click of the button looks for next match, * or whether all occurrences are searched for in each search request (=true) */ searchMultiple: boolean; /** * When searching for next match, skip other matched entries in cells on same row */ searchNextRow: boolean; /** * When doing continuous searches, the debounce time in milliseconds to be applied to key stokes */ searchDebounceMS: number; /** * Width of component, pixels */ searchComponentWidth: number; /** * Determine is the search comparison are case sensitive by default */ searchCaseSensitive: boolean; /** * Determine if search string is to be identified only at the start of the searched value, * otherwise it can occur anywhere in the value */ searchStartsWith: boolean; /** * Strip these characters (or strings) from the search value before evaluating */ searchExcludeChars: string[]; /** * Determine if options for extended search are available i.e. * startWith, caseSensitive and range */ searchExtended: boolean; /** * Panel to enter extended search params open on hovering over * extended (+) button. This determines how long the delay is in milliseconds * before the panel appears */ searchExtendedPopupDelay: number; /** * Applies angular material apperance to the field */ searchFieldAppearance: 'outline' | 'standard' | 'fill' | 'legacy'; /** * If 'small' then the field has a font of 9pt and the margins, padding etc. are reduced so that * the field can comfortably fit on a toolbar. */ searchFieldSize: 'small' | 'default'; /** * Range rather than a single search value */ private searchRange; private searchFrom; private searchTo; /** * Output result of search */ searchResults: EventEmitter; /** * Form containing search input field */ searchForm: FormGroup; /** * Track changes to search string being entered */ private searchTextChanged$; /** * Track last search match */ private lastFoundResult; /** * Form containing extended search options */ extendedSearchForm: FormGroup; /** * Track changes to extended search options (popup) */ private extendedSearchChanged$; /** * Track if component has been touched, i.e if a search string has been entered */ private touched; constructor(iconRegistry: MatIconRegistry, sanitizer: DomSanitizer, searchService: SearchboxService); ngOnInit(): void; /** * Loads an SVG image to the MatIconRegistry from a string literal, * representing an svg */ private loadImage; /** * When the extended search option box closes perform a search */ extendedSearchClose(): void; /** * Respond to each keystoke in the search box */ private continuousSearch; /** * Performs a search */ search(search: string): void; /** * Find cell value in search dataset based on row and column indexes */ private searchCellValue; /** * Create SearchParams object from search string and current parameter values (set by default or extended dialog) */ private searchParams; /** * Prevents button from taking focus on mouse down */ mouseDown(e: MouseEvent): void; get placeholder(): keyof SearchTerms; clearSearchField(): void; /** ControlValueAccessor implementation */ private onChange; private onTouched; writeValue(search: string | undefined): void; registerOnChange(fn: (searchResults: SearchResults) => void): void; registerOnTouched(fn: () => void): void; setDisabledState(disabled: boolean): void; private markAsTouched; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }