UNPKG

@alfresco/adf-content-services

Version:
70 lines (69 loc) 3.2 kB
/*! * @license * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { SearchService } from '../services/search.service'; import { AfterContentInit, ElementRef, EventEmitter, OnChanges, SimpleChanges, TemplateRef } from '@angular/core'; import { NodePaging, ResultSetPaging } from '@alfresco/js-api'; import { Subject } from 'rxjs'; import { SearchComponentInterface } from '@alfresco/adf-core'; import * as i0 from "@angular/core"; export declare class SearchComponent implements SearchComponentInterface, AfterContentInit, OnChanges { private searchService; private _elementRef; panel: ElementRef; template: TemplateRef<any>; /** Function that maps an option's value to its display value in the trigger. */ displayWith: ((value: any) => string) | null; /** Maximum number of results to show in the search. */ maxResults: number; /** Number of results to skip from the results pagination. */ skipResults: number; /** * Search term to use when executing the search. Updating this value will * run a new search and update the results. */ searchTerm: string; /** CSS class for display. */ set classList(classList: string); /** Emitted when search results have fully loaded. */ resultLoaded: EventEmitter<NodePaging>; /** Emitted when an error occurs. */ error: EventEmitter<any>; showPanel: boolean; results: NodePaging; get isOpen(): boolean; set isOpen(value: boolean); _isOpen: boolean; keyPressedStream: Subject<string>; _classList: { [key: string]: boolean; }; constructor(searchService: SearchService, _elementRef: ElementRef); ngAfterContentInit(): void; ngOnChanges(changes: SimpleChanges): void; resetResults(): void; reload(): void; private cleanResults; private loadSearchResults; onSearchDataLoaded(resultSetPaging: ResultSetPaging): void; onSearchDataError(error: { status: number; }): void; hidePanel(): void; setVisibility(): void; static ɵfac: i0.ɵɵFactoryDeclaration<SearchComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<SearchComponent, "adf-search", ["searchAutocomplete"], { "displayWith": { "alias": "displayWith"; "required": false; }; "maxResults": { "alias": "maxResults"; "required": false; }; "skipResults": { "alias": "skipResults"; "required": false; }; "searchTerm": { "alias": "searchTerm"; "required": false; }; "classList": { "alias": "class"; "required": false; }; }, { "resultLoaded": "resultLoaded"; "error": "error"; }, ["template"], never, true, never>; }