Interface IComponentDefinition

Definition for a Component.

Index

Properties

ID

ID: string

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

Optional className

className: string

The generated className for this component.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

Optional doExport

doExport: function

Function that can be called to export one or multiple module in the global scope.

Type declaration

    • (): void
    • Returns void

Optional fields

fields: string[]

The optional index fields that the component possess or display.

Optional options

options: any

The available options for the component.

Optional parent

The optional parent of the component, which will be a component itself.

Constructors

constructor

  • Constructor for each component

    Parameters

    • element: HTMLElement

      The HTMLElement on which the component will instantiate.

    • options: any

      The available options for the component.

    • bindings: IComponentBindings

      The bindings (or environment) for the component.For exemple, the QueryController or SearchInterface. Optional, if not provided, the component will resolve those automatically. This has a cost on performance, though, since it has to traverses it's parents to find the correct elements.

    • Rest ...args: any[]

      Optional arguments, depending on the component type. For example, ResultComponent will receive the result there.

    Returns Component

Hierarchy

  • IComponentDefinition