@empathyco/x-components
Version:
Empathy X Components
56 lines (44 loc) • 11.2 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [XEventsTypes](./x-components.xeventstypes.md)
## XEventsTypes interface
. Dictionary of all the [XEvents](./x-components.xevent.md)<!-- -->, where each key is the event name, and the value is the event payload type or `void` if it has no payload. All the events listed in this file are common to all X components modules, so they might be fired by components of any module.
**Signature:**
```typescript
export interface XEventsTypes extends DeviceXEvents, EmpathizeXEvents, ExtraParamsXEvents, FacetsXEvents, HistoryQueriesXEvents, IdentifierResultsXEvents, NextQueriesXEvents, PopularSearchesXEvents, QueriesPreviewXEvents, QuerySuggestionsXEvents, RecommendationsXEvents, RelatedTagsXEvents, ScrollXEvents, SearchBoxXEvents, SearchXEvents, SemanticQueriesXEvents, TaggingXEvents, ExperienceControlsXEvents, UrlXEvents, RelatedPromptsXEvents, AiXEvents
```
**Extends:** [DeviceXEvents](./x-components.devicexevents.md)<!-- -->, [EmpathizeXEvents](./x-components.empathizexevents.md)<!-- -->, [ExtraParamsXEvents](./x-components.extraparamsxevents.md)<!-- -->, [FacetsXEvents](./x-components.facetsxevents.md)<!-- -->, [HistoryQueriesXEvents](./x-components.historyqueriesxevents.md)<!-- -->, [IdentifierResultsXEvents](./x-components.identifierresultsxevents.md)<!-- -->, [NextQueriesXEvents](./x-components.nextqueriesxevents.md)<!-- -->, [PopularSearchesXEvents](./x-components.popularsearchesxevents.md)<!-- -->, [QueriesPreviewXEvents](./x-components.queriespreviewxevents.md)<!-- -->, [QuerySuggestionsXEvents](./x-components.querysuggestionsxevents.md)<!-- -->, [RecommendationsXEvents](./x-components.recommendationsxevents.md)<!-- -->, [RelatedTagsXEvents](./x-components.relatedtagsxevents.md)<!-- -->, [ScrollXEvents](./x-components.scrollxevents.md)<!-- -->, [SearchBoxXEvents](./x-components.searchboxxevents.md)<!-- -->, [SearchXEvents](./x-components.searchxevents.md)<!-- -->, [SemanticQueriesXEvents](./x-components.semanticqueriesxevents.md)<!-- -->, [TaggingXEvents](./x-components.taggingxevents.md)<!-- -->, [ExperienceControlsXEvents](./x-components.experiencecontrolsxevents.md)<!-- -->, [UrlXEvents](./x-components.urlxevents.md)<!-- -->, [RelatedPromptsXEvents](./x-components.relatedpromptsxevents.md)<!-- -->, [AiXEvents](./x-components.aixevents.md)
## Remarks
Aside from common events, this interface also extends the different XModule's XEventsTypes. If you arrived here from eDocs portal, please find the event you are looking for in the specific module. In the following links you will find the events that are special for each module:
[DeviceXEvents](https://github.com/empathyco/x/blob/main/packages/x-components/src/x-modules/device/events.types.ts) [EmpathizeXEvents](https://github.com/empathyco/x/blob/main/packages/x-components/src/x-modules/empathize/events.types.ts) [FacetsXEvents](https://github.com/empathyco/x/blob/main/packages/x-components/src/x-modules/facets/events.types.ts) [HistoryQueriesXEvents](https://github.com/empathyco/x/blob/main/packages/x-components/src/x-modules/history-queries/events.types.ts) [IdentifierResultsXEvents](https://github.com/empathyco/x/blob/main/packages/x-components/src/x-modules/identifier-results/events.types.ts) [NextQueriesXEvents](https://github.com/empathyco/x/blob/main/packages/x-components/src/x-modules/next-queries/events.types.ts) [PopularSearchesXEvents](https://github.com/empathyco/x/blob/main/packages/x-components/src/x-modules/popular-searches/events.types.ts) [QueriesPreviewXEvents](https://github.com/empathyco/x/blob/main/packages/x-components/src/x-modules/queries-preview/events.types.ts) [QuerySuggestionsXEvents](https://github.com/empathyco/x/blob/main/packages/x-components/src/x-modules/query-suggestions/events.types.ts) [RecommendationsXEvents](https://github.com/empathyco/x/blob/main/packages/x-components/src/x-modules/recommendations/events.types.ts) [RelatedTagsXEvents](https://github.com/empathyco/x/blob/main/packages/x-components/src/x-modules/related-tags/events.types.ts) [ScrollXEvents](https://github.com/empathyco/x/blob/main/packages/x-components/src/x-modules/scroll/events.types.ts) [SearchBoxXEvents](https://github.com/empathyco/x/blob/main/packages/x-components/src/x-modules/search-box/events.types.ts) [SearchXEvents](https://github.com/empathyco/x/blob/main/packages/x-components/src/x-modules/search/events.types.ts) [TaggingXEvents](https://github.com/empathyco/x/blob/main/packages/x-components/src/x-modules/tagging/events.types.ts) [UrlXEvents](https://github.com/empathyco/x/blob/main/packages/x-components/src/x-modules/url/events.types.ts) [RelatedPromptsXEvents](https://github.com/empathyco/x/blob/main/packages/x-components/src/x-modules/related-prompts/events.types.ts)
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [ColumnsNumberProvided](./x-components.xeventstypes.columnsnumberprovided.md) | | number | The provided number of columns of a grid has changed. Payload: the columns number. |
| [ModuleRegistered](./x-components.xeventstypes.moduleregistered.md) | | [XModuleName](./x-components.xmodulename.md) | A new [XModule](./x-components.xmodule.md) has been registered. Payload: The name of the XModule that has been registered. |
| [RenderedColumnsNumberChanged](./x-components.xeventstypes.renderedcolumnsnumberchanged.md) | | number | The rendered number of columns of a grid has changed. Payload: the columns number. |
| [SnippetCallbackExecuted](./x-components.xeventstypes.snippetcallbackexecuted.md) | | { event: [XEvent](./x-components.xevent.md)<!-- -->; callbackReturn: unknown; payload: [ExtractPayload](./x-components.extractpayload.md)<!-- --><[XEvent](./x-components.xevent.md)<!-- -->>; metadata: [WireMetadata](./x-components.wiremetadata.md)<!-- -->; } | A callback from the snippet has been executed. Payload: An object containing the event that executed the callback, the callback result, and the original event payload and metadata. |
| [SuggestionsDisplayed](./x-components.xeventstypes.suggestionsdisplayed.md) | | Suggestion\[\] | Any kind of suggestions have been displayed (query-suggestions, popular searches...) Payload: The displayed [suggestions](./x-types.suggestion.md)<!-- -->. |
| [TogglePanelStateChanged](./x-components.xeventstypes.togglepanelstatechanged.md) | | boolean | The <code>BaseToggleIdPanel</code> <code>isOpen</code> state changed. Payload: the new state. |
| [UserAcceptedAQuery](./x-components.xeventstypes.useracceptedaquery.md) | | string | The user has accepted a query Payload: the accepted query. |
| [UserAcceptedSpellcheckQuery](./x-components.xeventstypes.useracceptedspellcheckquery.md) | | string | The user has accepted the spellcheck Payload: the spellcheck query. |
| [UserClickedADisplayResult](./x-components.xeventstypes.userclickedadisplayresult.md) | | Result | The user has clicked on a display result. Payload: The [result](./x-types.result.md) that the user clicked. |
| [UserClickedAResult](./x-components.xeventstypes.userclickedaresult.md) | | Result | The user has clicked on a result. Payload: The [result](./x-types.result.md) that the user clicked. |
| [UserClickedAResultRating](./x-components.xeventstypes.userclickedaresultrating.md) | | Result | The user has clicked on the rating of a result. Payload: The [result](./x-types.result.md) that the user clicked. |
| [UserClickedCloseEventsModal](./x-components.xeventstypes.userclickedcloseeventsmodal.md) | | void | The user clicked the button to close the events modal. Payload: none. |
| [UserClickedCloseModal](./x-components.xeventstypes.userclickedclosemodal.md) | | string | The user clicked the button to close a modal. Payload: the id of the modal to close. |
| [UserClickedCloseX](./x-components.xeventstypes.userclickedclosex.md) | | void | The user clicked the button to close X. Payload: none. |
| [UserClickedColumnPicker](./x-components.xeventstypes.userclickedcolumnpicker.md) | | number | The user clicked the button to select the number of columns. Payload: the column number. |
| [UserClickedOpenEventsModal](./x-components.xeventstypes.userclickedopeneventsmodal.md) | | void | The user clicked the button to open the events modal. Payload: none. |
| [UserClickedOpenModal](./x-components.xeventstypes.userclickedopenmodal.md) | | string | The user clicked the button to open a modal. Payload: the id of the modal to open. |
| [UserClickedOpenX](./x-components.xeventstypes.userclickedopenx.md) | | void | The user clicked the button to open X. Payload: none. |
| [UserClickedOutOfEventsModal](./x-components.xeventstypes.userclickedoutofeventsmodal.md) | | void | The user clicked out of the events modal while it is opened. Payload: none. |
| [UserClickedOutOfMainModal](./x-components.xeventstypes.userclickedoutofmainmodal.md) | | void | The user clicked out of the main modal. Payload: none. |
| [UserClickedOutOfModal](./x-components.xeventstypes.userclickedoutofmodal.md) | | string | The user clicked out of a modal while it was opened. Payload: the id of the modal. |
| [UserClickedPanelToggleButton](./x-components.xeventstypes.userclickedpaneltogglebutton.md) | | string | The user clicked the button to toggle a panel. Payload: the id of the panel to toggle. |
| [UserClickedResultAddToCart](./x-components.xeventstypes.userclickedresultaddtocart.md) | | Result | The user has clicked on the add to cart button of a result. Payload: The [result](./x-types.result.md) that the user clicked. |
| [UserClickedScrollToTop](./x-components.xeventstypes.userclickedscrolltotop.md) | | string | The user has clicked the scroll to top button. Payload: The scroll id which has scrolled to top. |
| [UserOpenXProgrammatically](./x-components.xeventstypes.useropenxprogrammatically.md) | | void | The user opened X programmatically. Payload: none. |
| [UserPressedArrowKey](./x-components.xeventstypes.userpressedarrowkey.md) | | [ArrowKey](./x-components.arrowkey.md) | The user pressed an [arrow key](./x-components.arrowkey.md) with the focus on the search-box. Payload: the pressed [arrow key](./x-components.arrowkey.md)<!-- -->. |
| [UserReachedEmpathizeTop](./x-components.xeventstypes.userreachedempathizetop.md) | | void | The user has reached the top of the empathize and keeps navigating in that direction. Payload: none. |
| [UserSelectedAResultVariant](./x-components.xeventstypes.userselectedaresultvariant.md) | | { result: Result; variant: ResultVariant; level: number; queryPreviewHash: ComputedRef<string> \| null; } | The user selected a result variant. Payload: And object containing the result, the selected variant, the level of the selected variant and the query preview hash. |
| [UserSelectedASuggestion](./x-components.xeventstypes.userselectedasuggestion.md) | | Suggestion | User selected any kind of suggestion (query-suggestion, popular-search...) Payload: The [suggestion](./x-types.suggestion.md) that the user selected. |