UNPKG

coveo-search-ui-extensions

Version:

Small generic components to extend the functionality of Coveo's Search UI framework.

61 lines (60 loc) 1.86 kB
import { Component, IComponentBindings, Template } from 'coveo-search-ui'; import './Strings'; /** * Initialization options of the **ClickedDocumentList** class. */ export interface IClickedDocumentList { /** * Number of Clicked Documents shown. * * Default: `3` * Minimum: `1` */ numberOfItems: number; /** * Label of the list of Clicked Documents. * * Default: `Most Recent Clicked Documents` */ listLabel: string; /** * Template used to display Clicked Documents. * Default: `<a class="CoveoResultLink"></a>` */ template: Template; /** * Identifier of the user from which Clicked Documents are shown. * * **Require** */ userId: string; } /** * Display the list of the most recent clicked documents of a user. */ export declare class ClickedDocumentList extends Component { element: HTMLElement; options: IClickedDocumentList; bindings: IComponentBindings; /** * Identifier of the Search-UI component. */ static readonly ID = "ClickedDocumentList"; /** * Default initialization options of the **ClickedDocumentList** class. */ static readonly options: IClickedDocumentList; private userProfileModel; private sortedDocumentsList; /** * Create an instance of **ClickedDocumentList**. Initialize is needed the **UserProfileModel** and fetch user actions related to the **UserId**. * * @param element Element on which to bind the component. * @param options Initialization options of the component. * @param bindings Bindings of the Search-UI environment. */ constructor(element: HTMLElement, options: IClickedDocumentList, bindings: IComponentBindings); private filterDuplicatesClickAction; private render; private addTooltipElement; }