import * as i0 from '@angular/core'; import { OnInit, OnChanges, OnDestroy, ChangeDetectorRef, EventEmitter, TemplateRef, ElementRef, SimpleChanges } from '@angular/core'; import { AppService, Query, FormatService } from '@sinequa/core/app-utils'; import { LoginService } from '@sinequa/core/login'; import { FacetService } from '@sinequa/components/facet'; import { SearchService } from '@sinequa/components/search'; import { Subscription } from 'rxjs'; import { NonNullableFormBuilder, FormGroup, FormControl } from '@angular/forms'; import { IntlService } from '@sinequa/core/intl'; import { VoiceRecognitionService } from '@sinequa/components/utils'; import { UserPreferences } from '@sinequa/components/user-settings'; import { NotificationsService } from '@sinequa/core/notification'; declare class SearchFormComponent implements OnInit, OnChanges, OnDestroy { searchService: SearchService; facetService: FacetService; loginService: LoginService; appService: AppService; voiceService: VoiceRecognitionService; prefs: UserPreferences; cdRef: ChangeDetectorRef; query: Query; searchRoute: string; autoApply: boolean; autoSubmit: boolean; showFilterCount: boolean; enableVoiceRecognition: boolean; enableNeuralSearch: boolean; neuralSearchPref: string; persistedFiltersPref: string; searchEvent: EventEmitter; expandedEvent: EventEmitter; dropdown: TemplateRef; searchInput: ElementRef; hovered: boolean; expanded: boolean; filterCount: number; editedQuery: Query; canApply: boolean; voiceState: boolean; fb: NonNullableFormBuilder; form: FormGroup; searchControl: FormControl; formatService: FormatService; intlService: IntlService; notificationService: NotificationsService; constructor(searchService: SearchService, facetService: FacetService, loginService: LoginService, appService: AppService, voiceService: VoiceRecognitionService, prefs: UserPreferences, cdRef: ChangeDetectorRef); ngOnChanges(changes: SimpleChanges): void; ngOnInit(): void; sub: Subscription; ngOnDestroy(): void; /** * Filters might be changed from different external component (facets, filter editor...) * This method aims at catching these changes, updating the state accordingly, * and applying filters automatically, if possible (we are on a search route) */ onFiltersChanged(): void; /** * Apply the current edited query to the input query and trigger * a new search. * @param collapse whether to collapse the form */ applyFilters(collapse?: boolean): void; /** * Trigger a new search with the current query (unless it is not * the global search service query). * In any case emit a search event, so that the parent component * can process the search in a custom way. * @param isSearchTextEvent */ search(isSearchTextEvent: boolean): void; /** * Clear the edited text and filters and trigger onFiltersChanged() */ clearForm(): void; /** * Expand the form, and update its state */ expand(): void; onInputEnter(): void; onInputFocus(): void; onInputText(): void; onInputClick(): void; /** * Handles the input change event for the search control. * * This method is triggered whenever the value of the search control changes. * It parses the input value using the `ExprParser` and sets the appropriate * errors on the search control based on the parsing result. * * - If the parsing result is an instance of `Expr`, it sets the result in the event. * - If the parsing result is an error, it sets the error in the event and marks the search control as incorrect. * * @returns {void} */ onInputChange(): void; onClickOutside(): void; onFilterCountClick(): void; onScopeChange(): void; toggleVoice(): void; get neuralSearch(): boolean; set neuralSearch(val: boolean); toggleNeuralSearch(): void; get persistedFilters(): boolean; set persistedFilters(val: boolean); toggleFiltersPersist(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare const enSearchForm: any; declare const frSearchForm: any; declare const deSearchForm: any; export { SearchFormComponent, deSearchForm, enSearchForm, frSearchForm };