# Coveo JavaScript Search Framework - Reference Documentation

## Index

### Coveo components

- AdvancedSearch
- Aggregate
- Analytics
- AnalyticsSuggestions
- AuthenticationProvider
- Backdrop
- Badge
- Breadcrumb
- CardActionBar
- CardOverlay
- CategoryFacet
- CommerceQuery
- DidYouMean
- DistanceResources
- DynamicFacet
- DynamicFacetManager
- DynamicFacetRange
- DynamicHierarchicalFacet
- ErrorReport
- Excerpt
- ExportToExcel
- Facet
- FacetRange
- FacetSlider
- FacetValueSuggestions
- FacetsMobileMode
- FieldSuggestions
- FieldTable
- FieldValue
- Folding
- FollowItem
- HiddenQuery
- HierarchicalFacet
- Icon
- ImageFieldValue
- Logo
- Matrix
- MissingTerms
- Omnibox
- OmniboxResultList
- Pager
- PipelineContext
- PreferencesPanel
- PrintableUri
- PromotedResultsBadge
- QueryDuration
- QuerySuggestPreview
- QuerySummary
- Querybox
- Quickview
- QuickviewDocument
- Recommendation
- ResultActionsMenu
- ResultAttachments
- ResultFolding
- ResultLayoutSelector
- ResultLink
- ResultList
- ResultRating
- ResultTagging
- ResultsFiltersPreferences
- ResultsPerPage
- ResultsPreferences
- SearchAlerts
- SearchAlertsMessage
- SearchButton
- SearchInterface
- Searchbox
- Settings
- ShareQuery
- SimpleFilter
- SmartSnippet
- SmartSnippetSuggestions
- Sort
- SortDropdown
- StarRating
- Tab
- TemplateLoader
- Text
- Thumbnail
- TimespanFacet
- Triggers
- YouTubeThumbnail

### Modules

- MagicBox

### Enumerations

- AllowedValuesPatternType
- DynamicFacetRangeValueFormat
- FacetSearchType
- FacetSortCriteria
- FacetType
- FacetValueState

### Classes

- AdvancedSearchEvents
- AnalyticsEvents
- BaseComponent
- BreadcrumbEvents
- CardOverlayEvents
- Cell
- Checkbox
- Component
- ComponentEvents
- ComponentOptions
- DatePicker
- DateUtils
- DistanceEvents
- Dom
- Dropdown
- EndpointCaller
- ExecutionPlan
- ExpressionBuilder
- FacetSearch
- FacetSettings
- FacetValue
- FacetsMobileModeEvents
- FoldingForThread
- FormGroup
- GoogleApiPositionProvider
- HistoryController
- Initialization
- InitializationEvents
- LocalStorageHistoryController
- Model
- MultiSelect
- NavigatorPositionProvider
- NumericSpinner
- OmniboxEvents
- PublicPathUtils
- QueryBuilder
- QueryController
- QueryEvents
- QueryStateModel
- QuerySummaryEvents
- QuickviewEvents
- RadioButton
- ResponsiveComponents
- ResultListEvents
- ResultPreviewsManagerEvents
- SearchEndpoint
- StandaloneSearchInterfaceEvents
- StaticPositionProvider
- TemplateCache
- TemplateHelpers
- TextInput

### Interfaces

- IAdvancedSearchSection
- IAnalyticsActionCause
- IAnalyticsClickQuerySuggestPreviewMeta
- IAnalyticsClient
- IAnalyticsDocumentViewEventArgs
- IAnalyticsEvent
- IAnalyticsEventArgs
- IAnalyticsFacetState
- IAnchorUtilsOptions
- IBadgeColors
- IBeforeRedirectEventArgs
- IBreadcrumbItem
- IBuildingAdvancedSearchEventArgs
- IBuildingQueryEventArgs
- IChangeAnalyticsCustomDataEventArgs
- IChangeLayoutEventArgs
- IChangeableAnalyticsDataObject
- IChangeableAnalyticsMetaObject
- IClickEvent
- ICommerceRequest
- IComponentBindings
- IComponentDefinition
- IComponentLocalizedStringOptionArgs
- IComponentOptions
- IComponentOptionsFieldOption
- IComponentOptionsFieldOptionArgs
- IComponentOptionsFieldsOptionArgs
- IComponentOptionsListOptionArgs
- IComponentOptionsNumberOptionArgs
- IComponentOptionsPostProcessing
- IComputedFieldRequest
- ICoreHelpers
- ICurrencyToStringOptions
- ICustomEvent
- IDateToStringOptions
- IDisplayedNewResultEventArgs
- IDisplayedNewResultsEventArgs
- IDoneBuildingQueryEventArgs
- IDuringQueryEventArgs
- IEndpointCallOptions
- IEndpointCallParameters
- IEndpointCallerOptions
- IErrorResponse
- IExtension
- IExternalAdvancedSearchSection
- IFacetOptions
- IFacetRequest
- IFacetRequestValue
- IFacetResponse
- IFacetResponseValue
- IFacetSearchRequest
- IFacetSearchResponse
- IFacetValueSuggestionRow
- IFacetValueSuggestionsProvider
- IFacetValueSuggestionsProviderOptions
- IFetchMoreSuccessEventArgs
- IFieldConditionOption
- IFieldDescription
- IFieldOption
- IFormWidget
- IGeolocationPosition
- IGeolocationPositionProvider
- IGetDocumentOptions
- IGroupByRequest
- IGroupByResult
- IGroupByValue
- IHighlight
- IHighlightPhrase
- IHighlightTerm
- IIconOptions
- IImageUtilsOptions
- IIndexFieldValue
- IInitializationEventArgs
- IInitializationParameters
- IListFieldValuesBatchRequest
- IListFieldValuesRequest
- INewQueryEventArgs
- INoResultsEventArgs
- IOmniboxDataRow
- IOpenQuickviewEventArgs
- IPlanResponse
- IPopulateBreadcrumbEventArgs
- IPopulateOmniboxObject
- IPopulateOmniboxQueryExpression
- IPopulateOmniboxSuggestionsEventArgs
- IPopulateSearchResultPreviewsEventArgs
- IPositionResolvedEventArgs
- IPreprocessMoreResultsEventArgs
- IPreprocessResultsEventArgs
- IQuery
- IQueryBuilderExpression
- IQueryCorrection
- IQueryErrorEventArgs
- IQueryException
- IQueryFunction
- IQueryOptions
- IQueryResult
- IQueryResults
- IQuerySuccessEventArgs
- IQuerySuggestCompletion
- IQuerySuggestRequest
- IQuerySuggestResponse
- IQuerySuggestSelection
- IQuerySummaryCancelLastActionArgs
- IQuickviewLoadedEventArgs
- IRangeValue
- IRankingExpression
- IRankingFunction
- IRatingRequest
- IRequestInfo
- IResolvingPositionEventArgs
- IResponse
- IResultsComponentBindings
- ISearchEndpointOptions
- ISearchEvent
- ISizeOptions
- IStreamHighlightOptions
- IStringMap
- ISubscription
- ISubscriptionItemRequest
- ISubscriptionQueryRequest
- ISubscriptionRequest
- ISubscriptionUser
- ISuccessResponse
- ITaggingRequest
- ITemplateHelperFunction
- ITimeSpanUtilsOptions
- ITopQueries
- ITrigger
- ITriggerExecute
- ITriggerNotify
- ITriggerQuery
- ITriggerRedirect
- IUpdateResultPreviewsManagerOptionsEventArgs
- IUserActionsRequest
- IUserIdentity
- IViewAsHtmlOptions

### Type aliases

- BaseFormTypes
- Context
- IAnalyticsDocumentViewMeta
- IQueryExpression
- ResponseFormat
- ValidLayout
- ValidTooltipPlacement

### Functions

- $$
- addActionCauseToList
- clearLocalData
- configureResourceRoot
- disableAnalytics
- enableAnalytics
- executeQuery
- get
- init
- initRecommendation
- initSearchbox
- load
- logClickEvent
- logCustomEvent
- logSearchAsYouTypeEvent
- logSearchEvent
- options
- patch
- racePromises
- removeActionCauseFromList
- state

### Object literals

- ResponsiveFacetOptions

## Type aliases

### BaseFormTypes

BaseFormTypes: NumericSpinner | DatePicker | Dropdown | TextInput | RadioButton

- Defined in ui/AdvancedSearch/AdvancedSearchInput.ts :11

### Context

Context: IStringMap<string | string[]>

- Defined in ui/PipelineContext/PipelineGlobalExports.ts :6

### IAnalyticsDocumentViewMeta

IAnalyticsDocumentViewMeta: object

- Defined in ui/Analytics/AnalyticsActionListMeta.ts :50

#### Type declaration

- ##### author: string

- ##### Optional documentTitle?: string

- ##### Optional documentURL?: string

### IQueryExpression

IQueryExpression: string

- Defined in ui/Base/IComponentOptions.ts :35

### ResponseFormat

ResponseFormat: "json" | "opensearch-atom" | "opensearch-rss" | "xlsx"

- Defined in rest/Query.ts :11

### ValidLayout

ValidLayout: "list" | "card" | "table"

- Defined in ui/ResultLayoutSelector/ValidLayout.ts :6

### ValidTooltipPlacement

ValidTooltipPlacement: "auto-start" | "auto" | "auto-end" | "top-start" | "top" | "top-end" | "right-start" | "right" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left" | "left-start"

- Defined in ui/Quickview/Quickview.ts :32

## Functions

### $$

- $$(dom: Dom): Dom

- - Defined in utils/Dom.ts :897

  #### Parameters

  - ##### dom: Dom

  #### Returns Dom

### addActionCauseToList

- addActionCauseToList(newActionCause: IAnalyticsActionCause): void

- - Defined in ui/Base/RegisteredNamedMethods.ts :554

  #### Parameters

  - ##### newActionCause: IAnalyticsActionCause

  #### Returns void

### clearLocalData

- clearLocalData(searchRoot?: HTMLElement): void

- - Defined in ui/Base/RegisteredNamedMethods.ts :506

  #### Parameters

  - ##### Default value searchRoot: HTMLElement = document.querySelector(Component.computeSelectorForType(SearchInterface.ID)) as HTMLElement

  #### Returns void

### configureResourceRoot

- configureResourceRoot(path: string): void

- - Defined in ui/Base/RegisteredNamedMethods.ts :466

  #### Parameters

  - ##### path: string

  #### Returns void

### disableAnalytics

- disableAnalytics(searchRoot?: HTMLElement): void

- - Defined in ui/Base/RegisteredNamedMethods.ts :530

  #### Parameters

  - ##### Default value searchRoot: HTMLElement = document.querySelector(Component.computeSelectorForType(SearchInterface.ID)) as HTMLElement

  #### Returns void

### enableAnalytics

- enableAnalytics(searchRoot?: HTMLElement): void

- - Defined in ui/Base/RegisteredNamedMethods.ts :484

  #### Parameters

  - ##### Default value searchRoot: HTMLElement = document.querySelector(Component.computeSelectorForType(SearchInterface.ID)) as HTMLElement

  #### Returns void

### executeQuery

- executeQuery(element: HTMLElement): Promise<IQueryResults>

- - Defined in ui/Base/RegisteredNamedMethods.ts :125

  #### Parameters

  - ##### element: HTMLElement

  #### Returns Promise<IQueryResults>

### get

- get(element: HTMLElement, componentClass?: any, noThrow?: boolean): BaseComponent

- - Defined in ui/Base/RegisteredNamedMethods.ts :203

  #### Parameters

  - ##### element: HTMLElement

  - ##### Optional componentClass: any

  - ##### Optional noThrow: boolean

  #### Returns BaseComponent

### init

- init(element: HTMLElement, options?: any): Promise<object>

- - Defined in ui/Base/RegisteredNamedMethods.ts :32

  #### Parameters

  - ##### element: HTMLElement

  - ##### Default value options: any = {}

  #### Returns Promise<object>

  > }

### initRecommendation

- initRecommendation(element: HTMLElement, mainSearchInterface?: HTMLElement, userContext?: object, options?: any): Promise<object>

- - Defined in ui/Base/RegisteredNamedMethods.ts :79

  #### Parameters

  - ##### element: HTMLElement

  - ##### Optional mainSearchInterface: HTMLElement

  - ##### Optional userContext: object

    - ##### [name: string]: any

  - ##### Default value options: any = {}

  #### Returns Promise<object>

  > }

### initSearchbox

- initSearchbox(element: HTMLElement, searchPageUri: string, options?: any): Promise<object>

- - Defined in ui/Base/RegisteredNamedMethods.ts :51

  #### Parameters

  - ##### element: HTMLElement

  - ##### searchPageUri: string

  - ##### Default value options: any = {}

  #### Returns Promise<object>

  > }

### load

- load<T>(id: string): Promise<T>

- - Defined in ui/Base/RegisteredNamedMethods.ts :608

  #### Type parameters

  - #### T

  #### Parameters

  - ##### id: string

  #### Returns Promise<T>

  A Promise of the module, or chunk.

### logClickEvent

- logClickEvent<TMeta>(element: HTMLElement, clickEventCause: IAnalyticsActionCause, metadata: TMeta, result: IQueryResult): void

- - Defined in ui/Base/RegisteredNamedMethods.ts :367

  #### Type parameters

  - #### TMeta: IStringMap<any>

  #### Parameters

  - ##### element: HTMLElement

  - ##### clickEventCause: IAnalyticsActionCause

  - ##### metadata: TMeta

  - ##### result: IQueryResult

  #### Returns void

### logCustomEvent

- logCustomEvent<TMeta>(element: HTMLElement, customEventCause: IAnalyticsActionCause, metadata: TMeta, result?: IQueryResult): void

- - Defined in ui/Base/RegisteredNamedMethods.ts :262

  #### Type parameters

  - #### TMeta: IStringMap<any>

  #### Parameters

  - ##### element: HTMLElement

  - ##### customEventCause: IAnalyticsActionCause

  - ##### metadata: TMeta

  - ##### Optional result: IQueryResult

  #### Returns void

### logSearchAsYouTypeEvent

- logSearchAsYouTypeEvent<TMeta>(element: HTMLElement, searchAsYouTypeEventCause: IAnalyticsActionCause, metadata: TMeta): void

- - Defined in ui/Base/RegisteredNamedMethods.ts :333

  #### Type parameters

  - #### TMeta: IStringMap<any>

  #### Parameters

  - ##### element: HTMLElement

  - ##### searchAsYouTypeEventCause: IAnalyticsActionCause

  - ##### metadata: TMeta

  #### Returns void

### logSearchEvent

- logSearchEvent(element: HTMLElement, searchEventCause: IAnalyticsActionCause, metadata: IStringMap<string>): void

- - Defined in ui/Base/RegisteredNamedMethods.ts :297

  #### Parameters

  - ##### element: HTMLElement

  - ##### searchEventCause: IAnalyticsActionCause

  - ##### metadata: IStringMap<string>

  #### Returns void

### options

- options(element: HTMLElement, optionsToSet?: any): void

- - Defined in ui/Base/RegisteredNamedMethods.ts :392

  #### Parameters

  - ##### element: HTMLElement

  - ##### Default value optionsToSet: any = {}

  #### Returns void

### patch

- patch(element: HTMLElement, methodName: string, handler: function): void

- - Defined in ui/Base/RegisteredNamedMethods.ts :406

  #### Parameters

  - ##### element: HTMLElement

  - ##### methodName: string

  - ##### handler: function

    - - (...args: any[]): any

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns any

  #### Returns void

### racePromises

- racePromises<T>(promises: Thenable<T>[]): Promise<T>

- - Defined in magicbox/QueryProcessor.ts :22

  #### Type parameters

  - #### T

  #### Parameters

  - ##### promises: Thenable<T>[]

  #### Returns Promise<T>

### removeActionCauseFromList

- removeActionCauseFromList(actionCauseToRemoveName: string): void

- - Defined in ui/Base/RegisteredNamedMethods.ts :566

  #### Parameters

  - ##### actionCauseToRemoveName: string

  #### Returns void

### state

- state(element: HTMLElement, ...args: any[]): any

- - Defined in ui/Base/RegisteredNamedMethods.ts :182

  #### Parameters

  - ##### element: HTMLElement

  - ##### Rest ...args: any[]

  #### Returns any

  Depends on the action performed.

## Object literals

### Const ResponsiveFacetOptions

ResponsiveFacetOptions: object

- Defined in ui/ResponsiveComponents/ResponsiveFacetOptions.ts :6

### dropdownHeaderLabel

dropdownHeaderLabel: string

- Defined in ui/ResponsiveComponents/ResponsiveFacetOptions.ts :35

### enableResponsiveMode

enableResponsiveMode: boolean

- Defined in ui/ResponsiveComponents/ResponsiveFacetOptions.ts :20