import { PropertyValues } from "lit"; import { IDataSourceData } from "../../models/common/IDataSourceData"; import { IMicrosoftSearchQuery, ISearchRequestAggregation, EntityType, ISearchSortProperty } from "../../models/search/IMicrosoftSearchRequest"; import { IMicrosoftSearchService } from "../../services/microsoftSearchService/IMicrosoftSearchService"; import { BaseComponent } from "../BaseComponent"; import { PaginationComponent } from "./sub-components/pagination/PaginationComponent"; import { ILocalizedString } from "../../models/common/ILocalizedString"; import { nothing } from "lit"; import { ErrorMessageComponent } from "./sub-components/error-message/ErrorMessageComponent"; import { ISortFieldConfiguration } from "../../models/common/ISortFieldConfiguration"; import { MonacoEditorComponent } from "./sub-components/monaco-editor/MonacoEditorComponent"; import { MgtFile } from "@microsoft/mgt-components/dist/es6/components/mgt-file/mgt-file"; import { MgtPerson } from "@microsoft/mgt-components/dist/es6/components/mgt-person/mgt-person"; export declare class MgtFileScopedElement extends MgtFile { } export declare class MgtPersonScopedElement extends MgtPerson { } export declare class SearchResultsComponent extends BaseComponent { /** * Flag indicating if the beta endpoint for Microsoft Graph API should be used */ useBetaEndpoint: boolean; /** * The Microsoft Search entity types to query */ entityTypes: EntityType[]; /** * The default query text to apply. * Query string parameter and search box have priority over this value during first load */ defaultQueryText: string; /** * The search query template to use. Support tokens https://learn.microsoft.com/en-us/graph/search-concept-query-template */ queryTemplate: string; /** * If specified, get the default query text from this query string parameter name */ defaultQueryStringParameter: string; /** * Search managed properties to retrieve for results and usable in the results template. * Comma separated. Refer to the [Microsoft Search API documentation](https://learn.microsoft.com/en-us/graph/api/resources/search-api-overview?view=graph-rest-1.0&preserve-view=true#scope-search-based-on-entity-types) to know what properties can be used according to entity types. */ selectedFields: string[]; /** * Sort properties for the request */ sortFieldsConfiguration: ISortFieldConfiguration[]; /** * Flag indicating if the pagination control should be displayed */ showPaging: boolean; /** * The number of results to show per results page */ pageSize: number; /** * The number of pages to display in the pagination control */ numberOfPagesToDisplay: number; /** * Flag indicating if Micrsoft Search result types should be applied in results */ enableResultTypes: boolean; /** * If "entityTypes" contains "externalItem", specify the connection id of the external source */ connectionIds: string[]; /** * Indicates whether spelling modifications are enabled. If enabled, the user will get the search results for the corrected query in case of no results for the original query with typos. */ enableModification: boolean; /** * Indicates whether spelling suggestions are enabled. If enabled, the user will get the search results for the original search query and suggestions for spelling correction */ enableSuggestion: boolean; /** * If specified, shows the title on top of the results */ componentTitle: string | ILocalizedString; /** * If specified, shows a "See all" link at top top of the results */ seeAllLink: string; /** * If specified, show the results count at the top of the results */ showCount: boolean; /** * The search filters component ID if connected to a search filters */ searchFiltersComponentId: string; /** * The search input component ID if connected to a search input */ searchInputComponentId: string; /** * The search verticals component ID if connected to a search verticals */ searchVerticalsComponentId: string; /** * The search sort component ID if connected to a search sort component */ searchSortComponentId: string; /** * If connected to a search verticals component on the same page, determines on which keys this component should be displayed */ selectedVerticalKeys: string[]; /** * Flag indicating if the loading indication (spinner/shimmers) should be displayed when fectching the data */ noLoadingIndicator: boolean; data: IDataSourceData; isLoading: boolean; shouldRender: boolean; error: Error; searchQuery: IMicrosoftSearchQuery; msSearchService: IMicrosoftSearchService; private templateService; private tokenService; private dateHelper; private searchResultsHelper; private dayJs; private currentLanguage; sortProperties: ISearchSortProperty[]; _searchRequestAggregations: ISearchRequestAggregation[]; private renderDefaultItems; private renderHeader; private renderSeeAllLink; private renderOverlay; private renderErrorMessage; private renderPagination; private renderDriveItem; /** * Renders a site entity * * @param result * @returns */ private renderSite; /** * Renders a list entity * * @param result * @returns */ private renderList; /** * Renders a listItem entity * * @param result * @returns */ private renderListItem; /** * Renders a person entity * * @param result * @returns */ private renderPerson; /** * Renders a bookmark entity * * @param result */ private renderBookmark; /** * Renders an acronym entity * * @param result */ private renderAcronym; /** * Renders a qna entity * * @param result */ private renderQnA; /** * Renders an answer entity * * @param result */ private renderAnswer; /** * Renders any entity * * @param result */ private renderDefault; static get scopedElements(): { "pnp-pagination": typeof PaginationComponent; "pnp-error-message": typeof ErrorMessageComponent; "pnp-monaco-editor": typeof MonacoEditorComponent; "pnp-mgt-file": typeof MgtFileScopedElement; "pnp-mgt-person": typeof MgtPersonScopedElement; }; constructor(); render(): import("lit").TemplateResult<1> | typeof nothing; connectedCallback(): Promise; disconnectedCallback(): void; updated(changedProperties: PropertyValues): Promise; private updateBinding; /** * Only calls when the provider is in ProviderState.SignedIn state * @returns */ loadState(): Promise; static get styles(): import("lit").CSSResultGroup[]; protected get strings(): { [x: string]: string; }; private _search; private buildAggregationsFromFiltersConfig; /** * Builds the search query according to the current component parameters and context */ private buildSearchQuery; private handleSearchFilters; private handleSearchInput; /** * Handler when a new vertical is selected * @param e the selected vertical information */ private handleSearchVertical; private handleSearchSort; private getSearchInputBinding; private getSearchVerticalsBinding; private getSearchSortBinding; private getSearchFiltersBinding; private getDefaultQueryText; private goToPage; private resetPagination; private resetFilters; private initSortProperties; private initVerticalSelectedKeys; private resetQueryText; /** * Gets default resource icon * * @param resource */ private getResourceIcon; /** * Gets default resource URLs * * @param resource */ private getResourceUrl; /** * Gets default resource Names * * @param resource */ private getResourceName; /** * Gets default result summary * * @param resource */ private getResultSummary; }