InteractiveCitation
InteractiveCitation
|
|
Note
This component was introduced in version |
The InteractiveCitation controller provides an interface for triggering desirable side effects, such as logging UA events to the Coveo Platform, when a user selects a generated answer citation.
Methods
beginDelayedSelect
Prepares to select the result after a certain delay, sending analytics if it was never selected before.
In a DOM context, it’s recommended to call this method on the touchstart event.
cancelPendingSelect
Cancels the pending selection caused by beginDelayedSelect.
In a DOM context, it’s recommended to call this method on the touchend event.
select
Selects the result, logging a UA event to the Coveo Platform if the result wasn’t selected before.
In a DOM context, it’s recommended to call this method on all of the following events:
-
contextmenu*click*mouseup*mousedown
Initialize
buildInteractiveCitation
Creates an InteractiveCitation controller instance.
Parameters
-
engine:
SearchEngineThe headless engine.
-
props:
InteractiveCitationPropsThe configurable
InteractiveCitationproperties.
Returns InteractiveCitation
InteractiveCitationProps
The configurable InteractiveCitation properties.
Properties
-
options:
InteractiveCitationOptionsThe options for the
InteractiveCitationcontroller.
InteractiveCitationOptions
The options for the InteractiveCitation controller.
Properties
-
citation:
GeneratedAnswerCitationThe generated answer citation.
-
debounceWait?:
numberThe number of seconds for which the debounced function should continue catching subsequent calls.
Default:
1000 -
selectionDelay?:
numberThe amount of time to wait before selecting the result after calling
beginDelayedSelect.Default:
1000
Related types
GeneratedAnswerCitation
Properties
-
id:
string -
permanentid:
string -
title:
string -
uri:
string -
clickUri?:
string -
fields?:
Raw -
text?:
string
Raw
Properties
-
[key: string]:
unknownCustom keys that depend on the documents in the index.