coveo-search-ui-extensions
Version:
Small generic components to extend the functionality of Coveo's Search UI framework.
51 lines (50 loc) • 2.1 kB
TypeScript
import { Component, IComponentBindings, IQueryResult } from 'coveo-search-ui';
import './Strings';
/**
* The options for the ViewedByCustomerComponent
*/
export interface IViewedByCustomerOptions {
/**
* If true, will display an icon when the component is displayed itself.
*/
showIcon?: boolean;
/**
* The label that should be displayed when the component is displayed.
*/
label?: string;
}
/**
* The _ViewedByCustomer_ component allows your agents to see, within the Salesforce Lightning console, every result which the user clicked. It displays an icon and a label on each result, if already viewed by the customer who created the case (see [Coveo Component ViewedByCustomer](https://docs.coveo.com/en/3073/coveoforsalesforce/viewedbycustomercomponent)).
* ```html
* <div class="CoveoViewedByCustomer"></div>
* ```
*/
export declare class ViewedByCustomer extends Component {
element: HTMLElement;
options: IViewedByCustomerOptions;
bindings: IComponentBindings;
/**
* Unique Identifier used by the Search-UI.
*/
static readonly ID = "ViewedByCustomer";
/**
* Default options used by the component.
*/
static readonly options: IViewedByCustomerOptions;
private static readonly ICON_CLASS;
private static readonly LABEL_CLASS;
/**
* Create an instance of {@link ViewedByCustomer}.
* @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: IViewedByCustomerOptions, bindings: IComponentBindings, result?: IQueryResult);
private render;
/**
* Generate a ViewedByCustomer in a preformated Dom ready to be inserted in a result
* @param bindings bindings to be used by the {@link ViewedByCustomer}
* @param result result to be used by the {@link ViewedByCustomer}
*/
static getViewedByCustomerResultRowDom(bindings: IComponentBindings, result: IQueryResult): HTMLElement;
}