import { Overlay, OverlayRef, PositionStrategy } from '@angular/cdk/overlay'; import { ElementRef, EventEmitter, OnChanges, OnInit, TemplateRef, ViewContainerRef } from '@angular/core'; import { MatMenuTrigger } from '@angular/material/menu'; import { KnoraApiConnection, ReadProject } from '@dasch-swiss/dsp-js'; import { NotificationService } from '../../action/services/notification.service'; import { SortingService } from '../../action/services/sorting.service'; import { SearchParams } from '../../viewer/views/list-view/list-view.component'; export interface PrevSearchItem { projectIri?: string; projectLabel?: string; query: string; } export declare class FulltextSearchComponent implements OnInit, OnChanges { private _dspApiConnection; private _notification; private _sortingService; private _overlay; private _viewContainerRef; /** * * @param [projectfilter] If true it shows the selection * of projects to filter by one of them */ projectfilter?: boolean; /** * @deprecated Use `limitToProject` instead * * @param [filterbyproject] If the full-text search should be * filtered by one project, you can define it with project iri. */ filterbyproject?: string; /** * Filter ontologies in advanced search or query in fulltext search by specified project IRI * * @param limitToProject */ limitToProject?: string; /** * Emits selected project in case of projectfilter */ limitToProjectChange: EventEmitter; /** * The data event emitter of type SearchParams * * @param search */ search: EventEmitter; searchPanel: ElementRef; searchInput: ElementRef; searchInputMobile: ElementRef; searchMenu: TemplateRef; selectProject: MatMenuTrigger; searchQuery: string; prevSearch: PrevSearchItem[]; projects: ReadProject[]; project: ReadProject; defaultProjectLabel: string; projectLabel: string; projectIri: string; error: any; searchPanelFocus: boolean; overlayRef: OverlayRef; doNotDisplay: string[]; displayPhonePanel: boolean; constructor(_dspApiConnection: KnoraApiConnection, _notification: NotificationService, _sortingService: SortingService, _overlay: Overlay, _viewContainerRef: ViewContainerRef); ngOnInit(): void; ngOnChanges(): void; /** * Get all public projects from DSP-API */ getAllProjects(): void; /** * Get project by IRI * @param id Project Id */ getProject(id: string): void; /** * Set current project and switch focus to input field. * @params project */ setProject(project?: ReadProject): void; /** * Open the search panel with backdrop */ openPanelWithBackdrop(): void; /** * Return the correct overlay position */ getOverlayPosition(): PositionStrategy; /** * Send the search query to parent and store the new query in the local storage * to have a search history list */ doSearch(): void; /** * Clear the whole list of search */ resetSearch(): void; /** * Set the focus on the search panel */ setFocus(): void; /** * Perform a search with a selected search item from the search history * @params prevSearch */ doPrevSearch(prevSearch: PrevSearchItem): void; /** * Remove one search item from the search history * @params prevSearchItem */ resetPrevSearch(prevSearchItem?: PrevSearchItem): void; /** * Change the focus on the search input field */ changeFocus(): void; emitSearchParams(): void; togglePhonePanel(): void; }