@empathyco/x-components 8.6.0 → 8.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/docs/API-reference/api/x-adapter-platform.browseresultschema.md +13 -0
  3. package/docs/API-reference/api/x-adapter-platform.md +11 -0
  4. package/docs/API-reference/api/x-adapter-platform.platformtagging.browseadd2cart.md +11 -0
  5. package/docs/API-reference/api/x-adapter-platform.platformtagging.browsecheckout.md +11 -0
  6. package/docs/API-reference/api/x-adapter-platform.platformtagging.browseproduct.md +11 -0
  7. package/docs/API-reference/api/x-adapter-platform.platformtagging.displaybrowseproduct.md +11 -0
  8. package/docs/API-reference/api/x-adapter-platform.platformtagging.md +68 -0
  9. package/docs/API-reference/api/x-components.hierarchicalfilter.md +1 -0
  10. package/docs/API-reference/api/x-components.md +22 -0
  11. package/docs/API-reference/api/x-components.setbrowsetagginginfo.md +13 -0
  12. package/docs/API-reference/api/x-components.simplefilter.md +1 -0
  13. package/docs/API-reference/api/x-components.snippetcallbacks.md +1 -0
  14. package/docs/API-reference/api/x-components.taggingmutations.md +19 -0
  15. package/docs/API-reference/api/x-components.taggingmutations.setbrowsetagginginfo.md +13 -0
  16. package/docs/API-reference/api/x-components.taggingstate.browsetagginginfo.md +13 -0
  17. package/docs/API-reference/api/x-components.taggingstate.md +19 -0
  18. package/docs/API-reference/api/x-components.taggingxevents.browsetaggingreceived.md +13 -0
  19. package/docs/API-reference/api/x-components.taggingxevents.md +19 -0
  20. package/docs/API-reference/api/x-components.trackbrowsewire.md +13 -0
  21. package/js/index.js +1 -1
  22. package/js/x-modules/facets/wiring.js +1 -0
  23. package/js/x-modules/facets/wiring.js.map +1 -1
  24. package/js/x-modules/search-box/wiring.js +1 -0
  25. package/js/x-modules/search-box/wiring.js.map +1 -1
  26. package/js/x-modules/tagging/store/emitters.js +1 -0
  27. package/js/x-modules/tagging/store/emitters.js.map +1 -1
  28. package/js/x-modules/tagging/store/module.js +4 -0
  29. package/js/x-modules/tagging/store/module.js.map +1 -1
  30. package/js/x-modules/tagging/wiring.js +30 -1
  31. package/js/x-modules/tagging/wiring.js.map +1 -1
  32. package/package.json +3 -3
  33. package/report/x-adapter-platform.api.json +158 -0
  34. package/report/x-components.api.json +218 -3
  35. package/report/x-components.api.md +22 -1
  36. package/tagging/index.js +1 -1
  37. package/types/src/components/snippet-callbacks.vue.d.ts +1 -0
  38. package/types/src/components/snippet-callbacks.vue.d.ts.map +1 -1
  39. package/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts +1 -0
  40. package/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts.map +1 -1
  41. package/types/src/x-modules/facets/components/filters/simple-filter.vue.d.ts +1 -0
  42. package/types/src/x-modules/facets/components/filters/simple-filter.vue.d.ts.map +1 -1
  43. package/types/src/x-modules/facets/wiring.d.ts +1 -0
  44. package/types/src/x-modules/facets/wiring.d.ts.map +1 -1
  45. package/types/src/x-modules/search-box/wiring.d.ts +1 -0
  46. package/types/src/x-modules/search-box/wiring.d.ts.map +1 -1
  47. package/types/src/x-modules/tagging/events.types.d.ts +5 -0
  48. package/types/src/x-modules/tagging/events.types.d.ts.map +1 -1
  49. package/types/src/x-modules/tagging/store/emitters.d.ts +1 -0
  50. package/types/src/x-modules/tagging/store/emitters.d.ts.map +1 -1
  51. package/types/src/x-modules/tagging/store/module.d.ts.map +1 -1
  52. package/types/src/x-modules/tagging/store/types.d.ts +10 -0
  53. package/types/src/x-modules/tagging/store/types.d.ts.map +1 -1
  54. package/types/src/x-modules/tagging/wiring.d.ts +19 -0
  55. package/types/src/x-modules/tagging/wiring.d.ts.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/tagging/wiring.ts"],"sourcesContent":["import type {\n AiSuggestionSearch,\n RelatedPrompt,\n Result,\n SemanticQuery,\n Taggable,\n Tagging,\n TaggingRequest,\n} from '@empathyco/x-types'\nimport type { FeatureLocation } from '../../types/index'\nimport type { DisplayWireMetadata, Wire } from '../../wiring/wiring.types'\nimport { DefaultSessionService } from '@empathyco/x-utils'\nimport { createOrigin } from '../../utils/index'\nimport { namespacedWireCommit, namespacedWireDispatch } from '../../wiring/namespaced-wires.factory'\nimport { namespacedDebounce } from '../../wiring/namespaced-wires.operators'\nimport { wireService, wireServiceWithoutPayload } from '../../wiring/wires.factory'\nimport { filter, mapWire } from '../../wiring/wires.operators'\nimport { createWiring } from '../../wiring/wiring.utils'\nimport { DefaultExternalTaggingService } from './service/external-tagging.service'\n\n/**\n * `tagging` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'tagging'\n\n/**\n * Debounce function for the module.\n */\nconst moduleDebounce = namespacedDebounce(moduleName)\n\n/**\n * WireCommit for {@link TaggingXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit(moduleName)\n\n/**\n * WireDispatch for {@link TaggingXModule}.\n *\n * @internal\n */\nconst wireDispatch = namespacedWireDispatch(moduleName)\n\n/**\n * Wires without payload factory for {@link DefaultSessionService}.\n */\nconst wireSessionServiceWithoutPayload = wireServiceWithoutPayload(DefaultSessionService.instance)\n\n/**\n * Wires factory for {@link DefaultExternalTaggingService}.\n */\nconst wireExternalTaggingService = wireService(DefaultExternalTaggingService.instance)\n\n/**\n * Stores the given result on the local storage.\n *\n * @public\n */\nconst storeClickedResultWire = wireExternalTaggingService('storeResultClicked')\n\n/**\n * Stores the result added to cart on the local storage.\n *\n * @public\n */\nconst storeAddToCartWire = wireExternalTaggingService('storeAddToCart')\n\n/**\n * Moves the result information from the local storage to session storage.\n *\n * @public\n */\nconst moveClickedResultToSessionWire = mapWire(\n wireExternalTaggingService('moveToSessionStorage'),\n (payload: string) => {\n return payload === 'url' ? undefined : payload\n },\n)\n\n/**\n * Triggers the add to cart tracking.\n *\n * @public\n */\nconst trackAddToCartFromSessionStorage = wireExternalTaggingService('trackAddToCart')\n\n/**\n * Clears the session id.\n *\n * @public\n */\nconst clearSessionWire = filter(\n wireSessionServiceWithoutPayload('clearSessionId'),\n ({ eventPayload: consent }) => !consent,\n)\n\n/**\n * Sets the tagging state `consent`.\n *\n * @public\n */\nexport const setConsent = wireCommit('setConsent')\n\n/**\n * Sets the tagging state `noResultsTaggingEnabled`.\n *\n * @public\n */\nexport const setNoResultsTaggingEnabledWire = wireCommit('setNoResultsTaggingEnabled')\n\n/**\n * Sets the tagging config state.\n *\n * @public\n */\nexport const setTaggingConfig = wireCommit('mergeConfig')\n\n/**\n * Tracks the tagging of the query.\n *\n * @public\n */\nexport const trackQueryWire = filter(\n wireDispatch('track'),\n ({ eventPayload, store }) =>\n ((eventPayload as TaggingRequest).params.totalHits as number) > 0 ||\n !store.state.x.tagging.noResultsTaggingEnabled,\n)\n\n/**\n * Sets the tagging state of the query tagging info using a debounce which ends if the user\n * accepts a query.\n *\n * @public\n */\nexport const setQueryTaggingInfo = moduleDebounce(\n wireCommit('setQueryTaggingInfo'),\n ({ state }) => state.config.queryTaggingDebounceMs,\n {\n cancelOn: 'UserClearedQuery',\n forceOn: [\n 'UserClickedAResult',\n 'UserClickedAPromoted',\n 'UserClickedABanner',\n 'UserClickedARedirection',\n 'UserReachedResultsListEnd',\n ],\n },\n)\n\n/**\n * Sets the tagging state of the query tagging info using.\n *\n * @public\n */\nexport const setQueryTaggingFromQueryPreview = createSetQueryTaggingFromQueryPreview()\n\n/**\n * Tracks the tagging of the result.\n *\n * @public\n */\nexport const trackResultClickedWire = createTrackWire('click')\n\n/**\n * Tracks the tagging of the banner.\n *\n * @public\n */\nexport const trackBannerClickedWire = createTrackWire('click')\n\n/**\n * Tracks the click on a promoted result.\n *\n * @public\n */\nexport const trackPromotedClickedWire = createTrackWire('click')\n\n/**\n * Performs a track of a result added to the cart.\n *\n * @public\n */\nexport const trackAddToCartWire = createTrackWire('add2cart')\n\n/**\n * Performs a track of a display result being clicked.\n *\n * @public\n */\nexport const trackDisplayClickedWire = createTrackDisplayWire('displayClick')\n\n/**\n * Performs a track of a display result being clicked.\n *\n * @public\n */\nexport const trackToolingDisplayClickedWire = createTrackToolingDisplayWire()\n\n/**\n * Performs a track of a display result being clicked.\n *\n * @public\n */\nexport const trackToolingAdd2CartWire = createTrackToolingAdd2CartWire()\n\n/**\n * Performs a track of a clicked related prompt.\n *\n * @public\n */\nexport const trackRelatedPromptToolingDisplayClickWire =\n createTrackRelatedPromptToolingDisplayClickWire()\n\n/**\n * Performs a track of a display element appearing.\n *\n * @public\n */\nexport const trackElementDisplayedWire = createTrackDisplayWire('display')\n\n/**\n * Factory helper to create a wire for the track of a taggable element.\n *\n * @param property - Key of the tagging object to track.\n * @returns A new wire for the given property of the taggable element.\n *\n * @public\n */\nexport function createTrackWire(property: keyof Tagging): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload: { tagging }, metadata: { location } }) => {\n const taggingInfo: TaggingRequest = tagging[property]\n taggingInfo.params.location = location as string\n return taggingInfo\n }),\n ({ eventPayload: { tagging }, metadata: { ignoreInModules } }) =>\n // eslint-disable-next-line ts/no-unsafe-member-access\n !!tagging?.[property] && !ignoreInModules?.includes(moduleName),\n )\n}\n\n/**\n * Performs a track of a query with no results that used related prompts or semantic queries as fallback.\n * The totalHits will be changed to -1 if related prompts or semantic queries are found in order to differentiate\n * it from scenarios where the user encounters a no-results page without any related prompts or semantic queries.\n *\n * @public\n */\nexport const trackNoResultsQueryWithFallbackWire = filter(\n wireDispatch('track', ({ eventPayload, state }) => {\n const { queryTaggingInfo } = state\n const totalHits = (eventPayload as RelatedPrompt[] | SemanticQuery[]).length > 0 ? -1 : 0\n return {\n params: { ...queryTaggingInfo?.params, totalHits },\n url: queryTaggingInfo?.url ?? '',\n }\n }),\n ({ store }) => Number(store.state.x.tagging.queryTaggingInfo?.params.totalHits) === 0,\n)\n\n/**.\n * Debounced version of {@link trackNoResultsQueryWithFallbackWire}\n *\n * @public\n */\nexport const trackNoResultsQueryWithFallbackWireDebounced = moduleDebounce(\n trackNoResultsQueryWithFallbackWire,\n ({ state }) => state.config.queryTaggingDebounceMs,\n { cancelOn: ['QueryPreviewUnmounted', 'RelatedPromptsUnmounted'] },\n)\n\n/**\n * Performs a track of a query with no results that used semantic queries as fallback.\n * The totalHits will be changed to -1 if semantic queries are found in order to differentiate\n * it from scenarios where the user encounters a no-results page without any semantic queries.\n *\n * @public\n * @deprecated - Use {@link trackNoResultsQueryWithFallbackWire} instead.\n */\nexport const trackNoResultsQueryWithSemanticsWire = trackNoResultsQueryWithFallbackWire\n\n/**\n * Debounced version of {@link trackNoResultsQueryWithFallbackWire}\n *\n * @public\n * @deprecated - Use {@link trackNoResultsQueryWithFallbackWireDebounced} instead.\n */\nexport const trackNoResultsQueryWithSemanticsWireDebounced =\n trackNoResultsQueryWithFallbackWireDebounced\n\n/**\n * Factory helper to create a wire for the track of the display click.\n *\n * @param property - Key of the tagging object to track.\n * @returns A new wire for the display click of the taggable element.\n *\n * @public\n */\nexport function createTrackDisplayWire(property: keyof Tagging): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload: { tagging }, metadata }) => {\n const taggingInfo: TaggingRequest = tagging[property]\n const location = metadata.location as FeatureLocation\n\n taggingInfo.params.location = location\n taggingInfo.params.displayFamily = createOrigin({\n feature: metadata.feature,\n location,\n })!\n taggingInfo.params.q = (metadata as DisplayWireMetadata).displayOriginalQuery\n\n return taggingInfo\n }),\n // eslint-disable-next-line ts/no-unsafe-member-access\n ({ eventPayload: { tagging } }) => !!tagging?.[property]?.url,\n )\n}\n\n/**\n * Update the tooling tagging params with the result information.\n *\n * @param taggingRequest - The tooling tagging request to be updated.\n * @param result - The clicked result.\n * @returns The tagging request updated.\n *\n * @internal\n */\nfunction updateToolingTaggingWithResult(\n taggingRequest: TaggingRequest,\n result: Result,\n): TaggingRequest {\n taggingRequest.params.productId = result.id\n taggingRequest.params.title = result.name!\n taggingRequest.params.url = result.url!\n\n return taggingRequest\n}\n\n/**\n * Factory helper to create a wire for the track of the tooling display click.\n *\n * @returns A new wire for the tooling display click of the taggable element.\n *\n * @public\n */\nexport function createTrackToolingDisplayWire(): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload, metadata }) => {\n const taggingInfo: TaggingRequest = metadata.toolingTagging as TaggingRequest\n const resultInfo = eventPayload as Result\n\n updateToolingTaggingWithResult(taggingInfo, resultInfo)\n\n return taggingInfo\n }),\n ({ metadata }) => !!metadata?.toolingTagging,\n )\n}\n\n/**\n * Factory helper to create a wire for the track of the tooling display add to cart.\n *\n * @returns A new wire for the tooling display add to cart of the taggable element.\n *\n * @public\n */\nexport function createTrackToolingAdd2CartWire(): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload, metadata }) => {\n const taggingInfo: TaggingRequest = metadata.toolingAdd2CartTagging as TaggingRequest\n const resultInfo = eventPayload as Result\n\n updateToolingTaggingWithResult(taggingInfo, resultInfo)\n\n return taggingInfo\n }),\n ({ metadata }) => !!metadata?.toolingAdd2CartTagging,\n )\n}\n\n/**\n * Factory helper to create a wire for the track of the tooling display click in a related prompt.\n *\n * @returns A new wire for the tooling display click of the taggable element.\n *\n * @public\n */\nexport function createTrackRelatedPromptToolingDisplayClickWire() {\n return filter(\n wireDispatch('track', ({ metadata }) => {\n const relatedPrompt = metadata.relatedPrompt as RelatedPrompt\n const taggingInfo = relatedPrompt.tagging!.toolingDisplayClickTagging as TaggingRequest\n\n taggingInfo.params.productId = 'EXPAND'\n taggingInfo.params.title = relatedPrompt.suggestionText\n taggingInfo.params.url = 'none'\n\n return taggingInfo\n }),\n ({ metadata }) => {\n const relatedPrompt = metadata.relatedPrompt as RelatedPrompt | undefined\n const isUnselected = metadata?.selectedPrompt === -1\n const taggingInfo = relatedPrompt?.tagging?.toolingDisplayClickTagging\n return isUnselected && !!taggingInfo\n },\n )\n}\n\n/**\n * Factory helper to create a wire to set the queryTagging.\n *\n * @returns A new wire for the query of a result of a queryPreview.\n *\n * @public\n */\nexport function createSetQueryTaggingFromQueryPreview(): Wire<Taggable> {\n return filter(\n wireCommit(\n 'setQueryTaggingInfo',\n ({ metadata: { queryTagging } }) => queryTagging as TaggingRequest,\n ),\n ({ metadata: { queryTagging } }) => !!queryTagging,\n )\n}\n\n/**\n * Tracks query tagging of the AI suggestions-search.\n * @public\n */\nexport const trackAiSuggestionsSearchWire = wireDispatch('track', ({ eventPayload }) =>\n (eventPayload as AiSuggestionSearch[]).map(({ tagging }) => tagging.query),\n)\n\n/**\n * Wiring configuration for the {@link TaggingXModule | tagging module}.\n *\n * @internal\n */\nexport const taggingWiring = createWiring({\n ConsentProvided: {\n setConsent,\n },\n ConsentChanged: {\n clearSessionWire,\n },\n PDPIsLoaded: {\n moveClickedResultToSessionWire,\n },\n ResultURLTrackingEnabled: {\n moveClickedResultToSessionWire,\n },\n SearchTaggingChanged: {\n setQueryTaggingInfo,\n },\n SearchTaggingReceived: {\n trackQueryWire,\n },\n TrackableElementDisplayed: {\n trackElementDisplayedWire,\n },\n TaggingConfigProvided: {\n setTaggingConfig,\n },\n UserClickedAResult: {\n trackResultClickedWire,\n storeClickedResultWire,\n },\n UserClickedResultAddToCart: {\n trackAddToCartWire,\n trackResultClickedWire,\n storeAddToCartWire,\n },\n UserClickedPDPAddToCart: {\n trackAddToCartFromSessionStorage,\n },\n UserClickedABanner: {\n trackBannerClickedWire,\n },\n UserClickedAPromoted: {\n trackPromotedClickedWire,\n },\n UserClickedADisplayResult: {\n trackDisplayClickedWire,\n setQueryTaggingFromQueryPreview,\n },\n SemanticQueriesResponseChanged: {\n trackNoResultsQueryWithFallbackWireDebounced,\n },\n RelatedPromptsResponseChanged: {\n trackNoResultsQueryWithFallbackWireDebounced,\n },\n ModuleRegistered: {\n setNoResultsTaggingEnabledWire,\n },\n UserClickedARelatedPromptResult: {\n trackToolingDisplayClickedWire,\n },\n UserClickedARelatedPromptAdd2Cart: {\n trackToolingAdd2CartWire,\n },\n UserSelectedARelatedPrompt: {\n trackRelatedPromptToolingDisplayClickWire,\n },\n AiSuggestionsSearchChanged: {\n trackAiSuggestionsSearchWire,\n },\n UserClickedAnAiCarouselResult: {\n trackToolingDisplayClickedWire,\n },\n UserClickedAnAiCarouselAdd2Cart: {\n trackToolingAdd2CartWire,\n },\n})\n"],"names":[],"mappings":";;;;;;;;;;AAoBA;;;;AAIG;AACH,MAAM,UAAU,GAAG,SAAS;AAE5B;;AAEG;AACH,MAAM,cAAc,GAAG,kBAAkB,CAAC,UAAU,CAAC;AAErD;;;;AAIG;AACH,MAAM,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC;AAEnD;;;;AAIG;AACH,MAAM,YAAY,GAAG,sBAAsB,CAAC,UAAU,CAAC;AAEvD;;AAEG;AACH,MAAM,gCAAgC,GAAG,yBAAyB,CAAC,qBAAqB,CAAC,QAAQ,CAAC;AAElG;;AAEG;AACH,MAAM,0BAA0B,GAAG,WAAW,CAAC,6BAA6B,CAAC,QAAQ,CAAC;AAEtF;;;;AAIG;AACH,MAAM,sBAAsB,GAAG,0BAA0B,CAAC,oBAAoB,CAAC;AAE/E;;;;AAIG;AACH,MAAM,kBAAkB,GAAG,0BAA0B,CAAC,gBAAgB,CAAC;AAEvE;;;;AAIG;AACH,MAAM,8BAA8B,GAAG,OAAO,CAC5C,0BAA0B,CAAC,sBAAsB,CAAC,EAClD,CAAC,OAAe,KAAI;IAClB,OAAO,OAAO,KAAK,KAAK,GAAG,SAAS,GAAG,OAAO;AAChD,CAAC,CACF;AAED;;;;AAIG;AACH,MAAM,gCAAgC,GAAG,0BAA0B,CAAC,gBAAgB,CAAC;AAErF;;;;AAIG;AACH,MAAM,gBAAgB,GAAG,MAAM,CAC7B,gCAAgC,CAAC,gBAAgB,CAAC,EAClD,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,CACxC;AAED;;;;AAIG;MACU,UAAU,GAAG,UAAU,CAAC,YAAY;AAEjD;;;;AAIG;MACU,8BAA8B,GAAG,UAAU,CAAC,4BAA4B;AAErF;;;;AAIG;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B,KAAA;AACD,IAAA,oBAAoB,EAAE;QACpB,wBAAwB;AACzB,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,uBAAuB;QACvB,+BAA+B;AAChC,KAAA;AACD,IAAA,8BAA8B,EAAE;QAC9B,4CAA4C;AAC7C,KAAA;AACD,IAAA,6BAA6B,EAAE;QAC7B,4CAA4C;AAC7C,KAAA;AACD,IAAA,gBAAgB,EAAE;QAChB,8BAA8B;AAC/B,KAAA;AACD,IAAA,+BAA+B,EAAE;QAC/B,8BAA8B;AAC/B,KAAA;AACD,IAAA,iCAAiC,EAAE;QACjC,wBAAwB;AACzB,KAAA;AACD,IAAA,0BAA0B,EAAE;QAC1B,yCAAyC;AAC1C,KAAA;AACD,IAAA,0BAA0B,EAAE;QAC1B,4BAA4B;AAC7B,KAAA;AACD,IAAA,6BAA6B,EAAE;QAC7B,8BAA8B;AAC/B,KAAA;AACD,IAAA,+BAA+B,EAAE;QAC/B,wBAAwB;AACzB,KAAA;AACF,CAAA;;;;"}
1
+ {"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/tagging/wiring.ts"],"sourcesContent":["import type {\n AiSuggestionSearch,\n RelatedPrompt,\n Result,\n SemanticQuery,\n Taggable,\n Tagging,\n TaggingRequest,\n} from '@empathyco/x-types'\nimport type { FeatureLocation } from '../../types/index'\nimport type { DisplayWireMetadata, Wire } from '../../wiring/wiring.types'\nimport { DefaultSessionService } from '@empathyco/x-utils'\nimport { createOrigin } from '../../utils/index'\nimport { namespacedWireCommit, namespacedWireDispatch } from '../../wiring/namespaced-wires.factory'\nimport { namespacedDebounce } from '../../wiring/namespaced-wires.operators'\nimport { wireService, wireServiceWithoutPayload } from '../../wiring/wires.factory'\nimport { filter, mapWire } from '../../wiring/wires.operators'\nimport { createWiring } from '../../wiring/wiring.utils'\nimport { DefaultExternalTaggingService } from './service/external-tagging.service'\n\n/**\n * `tagging` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'tagging'\n\n/**\n * Debounce function for the module.\n */\nconst moduleDebounce = namespacedDebounce(moduleName)\n\n/**\n * WireCommit for {@link TaggingXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit(moduleName)\n\n/**\n * WireDispatch for {@link TaggingXModule}.\n *\n * @internal\n */\nconst wireDispatch = namespacedWireDispatch(moduleName)\n\n/**\n * Wires without payload factory for {@link DefaultSessionService}.\n */\nconst wireSessionServiceWithoutPayload = wireServiceWithoutPayload(DefaultSessionService.instance)\n\n/**\n * Wires factory for {@link DefaultExternalTaggingService}.\n */\nconst wireExternalTaggingService = wireService(DefaultExternalTaggingService.instance)\n\n/**\n * Stores the given result on the local storage.\n *\n * @public\n */\nconst storeClickedResultWire = wireExternalTaggingService('storeResultClicked')\n\n/**\n * Stores the result added to cart on the local storage.\n *\n * @public\n */\nconst storeAddToCartWire = wireExternalTaggingService('storeAddToCart')\n\n/**\n * Moves the result information from the local storage to session storage.\n *\n * @public\n */\nconst moveClickedResultToSessionWire = mapWire(\n wireExternalTaggingService('moveToSessionStorage'),\n (payload: string) => {\n return payload === 'url' ? undefined : payload\n },\n)\n\n/**\n * Triggers the add to cart tracking.\n *\n * @public\n */\nconst trackAddToCartFromSessionStorage = wireExternalTaggingService('trackAddToCart')\n\n/**\n * Clears the session id.\n *\n * @public\n */\nconst clearSessionWire = filter(\n wireSessionServiceWithoutPayload('clearSessionId'),\n ({ eventPayload: consent }) => !consent,\n)\n\n/**\n * Sets the tagging state `consent`.\n *\n * @public\n */\nexport const setConsent = wireCommit('setConsent')\n\n/**\n * Sets the tagging state `noResultsTaggingEnabled`.\n *\n * @public\n */\nexport const setNoResultsTaggingEnabledWire = wireCommit('setNoResultsTaggingEnabled')\n\n/**\n * Sets the tagging config state.\n *\n * @public\n */\nexport const setTaggingConfig = wireCommit('mergeConfig')\n\n/**\n * Tracks the tagging of the query.\n *\n * @public\n */\nexport const trackQueryWire = filter(\n wireDispatch('track'),\n ({ eventPayload, store }) =>\n ((eventPayload as TaggingRequest).params.totalHits as number) > 0 ||\n !store.state.x.tagging.noResultsTaggingEnabled,\n)\n\n/**\n * Tracks the tagging of the browse category.\n *\n * @public\n */\nexport const trackBrowseWire = filter(\n wireDispatch('track'),\n ({ eventPayload, store }) =>\n ((eventPayload as TaggingRequest).params.totalHits as number) > 0 ||\n !store.state.x.tagging.noResultsTaggingEnabled,\n)\n\n/**\n * Sets the tagging state of the query tagging info using a debounce which ends if the user\n * accepts a query.\n *\n * @public\n */\nexport const setQueryTaggingInfo = moduleDebounce(\n wireCommit('setQueryTaggingInfo'),\n ({ state }) => state.config.queryTaggingDebounceMs,\n {\n cancelOn: 'UserClearedQuery',\n forceOn: [\n 'UserClickedAResult',\n 'UserClickedAPromoted',\n 'UserClickedABanner',\n 'UserClickedARedirection',\n 'UserReachedResultsListEnd',\n ],\n },\n)\n\n/**\n * Sets the tagging state of the browse tagging info using a debounce which ends if the user\n * accepts a query.\n *\n * @public\n */\nexport const setBrowseTaggingInfo = moduleDebounce(\n wireCommit('setBrowseTaggingInfo'),\n ({ state }) => state.config.queryTaggingDebounceMs,\n {\n cancelOn: ['UserClickedOpenX', 'UserOpenXProgrammatically'],\n forceOn: [\n 'UserClickedAResult',\n 'UserClickedAPromoted',\n 'UserClickedABanner',\n 'UserClickedARedirection',\n 'UserReachedResultsListEnd',\n ],\n },\n)\n\n/**\n * Sets the tagging state of the query tagging info using.\n *\n * @public\n */\nexport const setQueryTaggingFromQueryPreview = createSetQueryTaggingFromQueryPreview()\n\n/**\n * Tracks the tagging of the result.\n *\n * @public\n */\nexport const trackResultClickedWire = createTrackWire('click')\n\n/**\n * Tracks the tagging of the banner.\n *\n * @public\n */\nexport const trackBannerClickedWire = createTrackWire('click')\n\n/**\n * Tracks the click on a promoted result.\n *\n * @public\n */\nexport const trackPromotedClickedWire = createTrackWire('click')\n\n/**\n * Performs a track of a result added to the cart.\n *\n * @public\n */\nexport const trackAddToCartWire = createTrackWire('add2cart')\n\n/**\n * Performs a track of a display result being clicked.\n *\n * @public\n */\nexport const trackDisplayClickedWire = createTrackDisplayWire('displayClick')\n\n/**\n * Performs a track of a display result being clicked.\n *\n * @public\n */\nexport const trackToolingDisplayClickedWire = createTrackToolingDisplayWire()\n\n/**\n * Performs a track of a display result being clicked.\n *\n * @public\n */\nexport const trackToolingAdd2CartWire = createTrackToolingAdd2CartWire()\n\n/**\n * Performs a track of a clicked related prompt.\n *\n * @public\n */\nexport const trackRelatedPromptToolingDisplayClickWire =\n createTrackRelatedPromptToolingDisplayClickWire()\n\n/**\n * Performs a track of a display element appearing.\n *\n * @public\n */\nexport const trackElementDisplayedWire = createTrackDisplayWire('display')\n\n/**\n * Factory helper to create a wire for the track of a taggable element.\n *\n * @param property - Key of the tagging object to track.\n * @returns A new wire for the given property of the taggable element.\n *\n * @public\n */\nexport function createTrackWire(property: keyof Tagging): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload: { tagging }, metadata: { location } }) => {\n const taggingInfo: TaggingRequest = tagging[property]\n taggingInfo.params.location = location as string\n return taggingInfo\n }),\n ({ eventPayload: { tagging }, metadata: { ignoreInModules } }) =>\n // eslint-disable-next-line ts/no-unsafe-member-access\n !!tagging?.[property] && !ignoreInModules?.includes(moduleName),\n )\n}\n\n/**\n * Performs a track of a query with no results that used related prompts or semantic queries as fallback.\n * The totalHits will be changed to -1 if related prompts or semantic queries are found in order to differentiate\n * it from scenarios where the user encounters a no-results page without any related prompts or semantic queries.\n *\n * @public\n */\nexport const trackNoResultsQueryWithFallbackWire = filter(\n wireDispatch('track', ({ eventPayload, state }) => {\n const { queryTaggingInfo } = state\n const totalHits = (eventPayload as RelatedPrompt[] | SemanticQuery[]).length > 0 ? -1 : 0\n return {\n params: { ...queryTaggingInfo?.params, totalHits },\n url: queryTaggingInfo?.url ?? '',\n }\n }),\n ({ store }) => Number(store.state.x.tagging.queryTaggingInfo?.params.totalHits) === 0,\n)\n\n/**.\n * Debounced version of {@link trackNoResultsQueryWithFallbackWire}\n *\n * @public\n */\nexport const trackNoResultsQueryWithFallbackWireDebounced = moduleDebounce(\n trackNoResultsQueryWithFallbackWire,\n ({ state }) => state.config.queryTaggingDebounceMs,\n { cancelOn: ['QueryPreviewUnmounted', 'RelatedPromptsUnmounted'] },\n)\n\n/**\n * Performs a track of a query with no results that used semantic queries as fallback.\n * The totalHits will be changed to -1 if semantic queries are found in order to differentiate\n * it from scenarios where the user encounters a no-results page without any semantic queries.\n *\n * @public\n * @deprecated - Use {@link trackNoResultsQueryWithFallbackWire} instead.\n */\nexport const trackNoResultsQueryWithSemanticsWire = trackNoResultsQueryWithFallbackWire\n\n/**\n * Debounced version of {@link trackNoResultsQueryWithFallbackWire}\n *\n * @public\n * @deprecated - Use {@link trackNoResultsQueryWithFallbackWireDebounced} instead.\n */\nexport const trackNoResultsQueryWithSemanticsWireDebounced =\n trackNoResultsQueryWithFallbackWireDebounced\n\n/**\n * Factory helper to create a wire for the track of the display click.\n *\n * @param property - Key of the tagging object to track.\n * @returns A new wire for the display click of the taggable element.\n *\n * @public\n */\nexport function createTrackDisplayWire(property: keyof Tagging): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload: { tagging }, metadata }) => {\n const taggingInfo: TaggingRequest = tagging[property]\n const location = metadata.location as FeatureLocation\n\n taggingInfo.params.location = location\n taggingInfo.params.displayFamily = createOrigin({\n feature: metadata.feature,\n location,\n })!\n taggingInfo.params.q = (metadata as DisplayWireMetadata).displayOriginalQuery\n\n return taggingInfo\n }),\n // eslint-disable-next-line ts/no-unsafe-member-access\n ({ eventPayload: { tagging } }) => !!tagging?.[property]?.url,\n )\n}\n\n/**\n * Update the tooling tagging params with the result information.\n *\n * @param taggingRequest - The tooling tagging request to be updated.\n * @param result - The clicked result.\n * @returns The tagging request updated.\n *\n * @internal\n */\nfunction updateToolingTaggingWithResult(\n taggingRequest: TaggingRequest,\n result: Result,\n): TaggingRequest {\n taggingRequest.params.productId = result.id\n taggingRequest.params.title = result.name!\n taggingRequest.params.url = result.url!\n\n return taggingRequest\n}\n\n/**\n * Factory helper to create a wire for the track of the tooling display click.\n *\n * @returns A new wire for the tooling display click of the taggable element.\n *\n * @public\n */\nexport function createTrackToolingDisplayWire(): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload, metadata }) => {\n const taggingInfo: TaggingRequest = metadata.toolingTagging as TaggingRequest\n const resultInfo = eventPayload as Result\n\n updateToolingTaggingWithResult(taggingInfo, resultInfo)\n\n return taggingInfo\n }),\n ({ metadata }) => !!metadata?.toolingTagging,\n )\n}\n\n/**\n * Factory helper to create a wire for the track of the tooling display add to cart.\n *\n * @returns A new wire for the tooling display add to cart of the taggable element.\n *\n * @public\n */\nexport function createTrackToolingAdd2CartWire(): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload, metadata }) => {\n const taggingInfo: TaggingRequest = metadata.toolingAdd2CartTagging as TaggingRequest\n const resultInfo = eventPayload as Result\n\n updateToolingTaggingWithResult(taggingInfo, resultInfo)\n\n return taggingInfo\n }),\n ({ metadata }) => !!metadata?.toolingAdd2CartTagging,\n )\n}\n\n/**\n * Factory helper to create a wire for the track of the tooling display click in a related prompt.\n *\n * @returns A new wire for the tooling display click of the taggable element.\n *\n * @public\n */\nexport function createTrackRelatedPromptToolingDisplayClickWire() {\n return filter(\n wireDispatch('track', ({ metadata }) => {\n const relatedPrompt = metadata.relatedPrompt as RelatedPrompt\n const taggingInfo = relatedPrompt.tagging!.toolingDisplayClickTagging as TaggingRequest\n\n taggingInfo.params.productId = 'EXPAND'\n taggingInfo.params.title = relatedPrompt.suggestionText\n taggingInfo.params.url = 'none'\n\n return taggingInfo\n }),\n ({ metadata }) => {\n const relatedPrompt = metadata.relatedPrompt as RelatedPrompt | undefined\n const isUnselected = metadata?.selectedPrompt === -1\n const taggingInfo = relatedPrompt?.tagging?.toolingDisplayClickTagging\n return isUnselected && !!taggingInfo\n },\n )\n}\n\n/**\n * Factory helper to create a wire to set the queryTagging.\n *\n * @returns A new wire for the query of a result of a queryPreview.\n *\n * @public\n */\nexport function createSetQueryTaggingFromQueryPreview(): Wire<Taggable> {\n return filter(\n wireCommit(\n 'setQueryTaggingInfo',\n ({ metadata: { queryTagging } }) => queryTagging as TaggingRequest,\n ),\n ({ metadata: { queryTagging } }) => !!queryTagging,\n )\n}\n\n/**\n * Tracks query tagging of the AI suggestions-search.\n * @public\n */\nexport const trackAiSuggestionsSearchWire = wireDispatch('track', ({ eventPayload }) =>\n (eventPayload as AiSuggestionSearch[]).map(({ tagging }) => tagging.query),\n)\n\n/**\n * Wiring configuration for the {@link TaggingXModule | tagging module}.\n *\n * @internal\n */\nexport const taggingWiring = createWiring({\n ConsentProvided: {\n setConsent,\n },\n ConsentChanged: {\n clearSessionWire,\n },\n PDPIsLoaded: {\n moveClickedResultToSessionWire,\n },\n ResultURLTrackingEnabled: {\n moveClickedResultToSessionWire,\n },\n SearchTaggingChanged: {\n setQueryTaggingInfo,\n },\n SearchTaggingReceived: {\n trackQueryWire,\n },\n BrowseTaggingChanged: {\n setBrowseTaggingInfo,\n },\n BrowseTaggingReceived: {\n trackBrowseWire,\n },\n TrackableElementDisplayed: {\n trackElementDisplayedWire,\n },\n TaggingConfigProvided: {\n setTaggingConfig,\n },\n UserClickedAResult: {\n trackResultClickedWire,\n storeClickedResultWire,\n },\n UserClickedResultAddToCart: {\n trackAddToCartWire,\n trackResultClickedWire,\n storeAddToCartWire,\n },\n UserClickedPDPAddToCart: {\n trackAddToCartFromSessionStorage,\n },\n UserClickedABanner: {\n trackBannerClickedWire,\n },\n UserClickedAPromoted: {\n trackPromotedClickedWire,\n },\n UserClickedADisplayResult: {\n trackDisplayClickedWire,\n setQueryTaggingFromQueryPreview,\n },\n SemanticQueriesResponseChanged: {\n trackNoResultsQueryWithFallbackWireDebounced,\n },\n RelatedPromptsResponseChanged: {\n trackNoResultsQueryWithFallbackWireDebounced,\n },\n ModuleRegistered: {\n setNoResultsTaggingEnabledWire,\n },\n UserClickedARelatedPromptResult: {\n trackToolingDisplayClickedWire,\n },\n UserClickedARelatedPromptAdd2Cart: {\n trackToolingAdd2CartWire,\n },\n UserSelectedARelatedPrompt: {\n trackRelatedPromptToolingDisplayClickWire,\n },\n AiSuggestionsSearchChanged: {\n trackAiSuggestionsSearchWire,\n },\n UserClickedAnAiCarouselResult: {\n trackToolingDisplayClickedWire,\n },\n UserClickedAnAiCarouselAdd2Cart: {\n trackToolingAdd2CartWire,\n },\n})\n"],"names":[],"mappings":";;;;;;;;;;AAoBA;;;;AAIG;AACH,MAAM,UAAU,GAAG,SAAS;AAE5B;;AAEG;AACH,MAAM,cAAc,GAAG,kBAAkB,CAAC,UAAU,CAAC;AAErD;;;;AAIG;AACH,MAAM,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC;AAEnD;;;;AAIG;AACH,MAAM,YAAY,GAAG,sBAAsB,CAAC,UAAU,CAAC;AAEvD;;AAEG;AACH,MAAM,gCAAgC,GAAG,yBAAyB,CAAC,qBAAqB,CAAC,QAAQ,CAAC;AAElG;;AAEG;AACH,MAAM,0BAA0B,GAAG,WAAW,CAAC,6BAA6B,CAAC,QAAQ,CAAC;AAEtF;;;;AAIG;AACH,MAAM,sBAAsB,GAAG,0BAA0B,CAAC,oBAAoB,CAAC;AAE/E;;;;AAIG;AACH,MAAM,kBAAkB,GAAG,0BAA0B,CAAC,gBAAgB,CAAC;AAEvE;;;;AAIG;AACH,MAAM,8BAA8B,GAAG,OAAO,CAC5C,0BAA0B,CAAC,sBAAsB,CAAC,EAClD,CAAC,OAAe,KAAI;IAClB,OAAO,OAAO,KAAK,KAAK,GAAG,SAAS,GAAG,OAAO;AAChD,CAAC,CACF;AAED;;;;AAIG;AACH,MAAM,gCAAgC,GAAG,0BAA0B,CAAC,gBAAgB,CAAC;AAErF;;;;AAIG;AACH,MAAM,gBAAgB,GAAG,MAAM,CAC7B,gCAAgC,CAAC,gBAAgB,CAAC,EAClD,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,CACxC;AAED;;;;AAIG;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0BAA0B,EAAE;QAC1B,4BAA4B;AAC7B,KAAA;AACD,IAAA,6BAA6B,EAAE;QAC7B,8BAA8B;AAC/B,KAAA;AACD,IAAA,+BAA+B,EAAE;QAC/B,wBAAwB;AACzB,KAAA;AACF,CAAA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empathyco/x-components",
3
- "version": "8.6.0",
3
+ "version": "8.8.0",
4
4
  "description": "Empathy X Components",
5
5
  "author": "Empathy Systems Corporation S.L.",
6
6
  "license": "Apache-2.0",
@@ -68,7 +68,7 @@
68
68
  },
69
69
  "dependencies": {
70
70
  "@empathyco/x-adapter": "8.1.8",
71
- "@empathyco/x-adapter-platform": "1.7.2",
71
+ "@empathyco/x-adapter-platform": "1.8.0",
72
72
  "@empathyco/x-types": "10.7.0",
73
73
  "@empathyco/x-utils": "1.0.9",
74
74
  "@vue/devtools-api": "~6.6.4",
@@ -117,5 +117,5 @@
117
117
  "access": "public",
118
118
  "directory": "dist"
119
119
  },
120
- "gitHead": "b939fa80f9090a85ca9085dfc15fdc4e90cf5958"
120
+ "gitHead": "2b94fed8fd45326a9b2d66c5fb32979945fb1a07"
121
121
  }
@@ -938,6 +938,56 @@
938
938
  "endIndex": 8
939
939
  }
940
940
  },
941
+ {
942
+ "kind": "Variable",
943
+ "canonicalReference": "@empathyco/x-adapter-platform!browseResultSchema:var",
944
+ "docComment": "/**\n * Default implementation for the BrowseResultSchema.\n *\n * @public\n */\n",
945
+ "excerptTokens": [
946
+ {
947
+ "kind": "Content",
948
+ "text": "browseResultSchema: "
949
+ },
950
+ {
951
+ "kind": "Content",
952
+ "text": "import(\"@empathyco/x-adapter\")."
953
+ },
954
+ {
955
+ "kind": "Reference",
956
+ "text": "MutableSchema",
957
+ "canonicalReference": "@empathyco/x-adapter!MutableSchema:type"
958
+ },
959
+ {
960
+ "kind": "Content",
961
+ "text": "<"
962
+ },
963
+ {
964
+ "kind": "Reference",
965
+ "text": "PlatformResult",
966
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformResult:interface"
967
+ },
968
+ {
969
+ "kind": "Content",
970
+ "text": ", "
971
+ },
972
+ {
973
+ "kind": "Reference",
974
+ "text": "Result",
975
+ "canonicalReference": "@empathyco/x-adapter-platform!Result:interface"
976
+ },
977
+ {
978
+ "kind": "Content",
979
+ "text": ">"
980
+ }
981
+ ],
982
+ "fileUrlPath": "dist/types/schemas/models/browse-result.schema.d.ts",
983
+ "isReadonly": true,
984
+ "releaseTag": "Public",
985
+ "name": "browseResultSchema",
986
+ "variableTypeTokenRange": {
987
+ "startIndex": 1,
988
+ "endIndex": 8
989
+ }
990
+ },
941
991
  {
942
992
  "kind": "Variable",
943
993
  "canonicalReference": "@empathyco/x-adapter-platform!experienceControlsEndpointAdapter:var",
@@ -6794,6 +6844,87 @@
6794
6844
  "endIndex": 2
6795
6845
  }
6796
6846
  },
6847
+ {
6848
+ "kind": "PropertySignature",
6849
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformTagging#browseAdd2Cart:member",
6850
+ "docComment": "",
6851
+ "excerptTokens": [
6852
+ {
6853
+ "kind": "Content",
6854
+ "text": "browseAdd2Cart: "
6855
+ },
6856
+ {
6857
+ "kind": "Content",
6858
+ "text": "string"
6859
+ },
6860
+ {
6861
+ "kind": "Content",
6862
+ "text": ";"
6863
+ }
6864
+ ],
6865
+ "isReadonly": false,
6866
+ "isOptional": false,
6867
+ "releaseTag": "Public",
6868
+ "name": "browseAdd2Cart",
6869
+ "propertyTypeTokenRange": {
6870
+ "startIndex": 1,
6871
+ "endIndex": 2
6872
+ }
6873
+ },
6874
+ {
6875
+ "kind": "PropertySignature",
6876
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformTagging#browseCheckout:member",
6877
+ "docComment": "",
6878
+ "excerptTokens": [
6879
+ {
6880
+ "kind": "Content",
6881
+ "text": "browseCheckout: "
6882
+ },
6883
+ {
6884
+ "kind": "Content",
6885
+ "text": "string"
6886
+ },
6887
+ {
6888
+ "kind": "Content",
6889
+ "text": ";"
6890
+ }
6891
+ ],
6892
+ "isReadonly": false,
6893
+ "isOptional": false,
6894
+ "releaseTag": "Public",
6895
+ "name": "browseCheckout",
6896
+ "propertyTypeTokenRange": {
6897
+ "startIndex": 1,
6898
+ "endIndex": 2
6899
+ }
6900
+ },
6901
+ {
6902
+ "kind": "PropertySignature",
6903
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformTagging#browseProduct:member",
6904
+ "docComment": "",
6905
+ "excerptTokens": [
6906
+ {
6907
+ "kind": "Content",
6908
+ "text": "browseProduct: "
6909
+ },
6910
+ {
6911
+ "kind": "Content",
6912
+ "text": "string"
6913
+ },
6914
+ {
6915
+ "kind": "Content",
6916
+ "text": ";"
6917
+ }
6918
+ ],
6919
+ "isReadonly": false,
6920
+ "isOptional": false,
6921
+ "releaseTag": "Public",
6922
+ "name": "browseProduct",
6923
+ "propertyTypeTokenRange": {
6924
+ "startIndex": 1,
6925
+ "endIndex": 2
6926
+ }
6927
+ },
6797
6928
  {
6798
6929
  "kind": "PropertySignature",
6799
6930
  "canonicalReference": "@empathyco/x-adapter-platform!PlatformTagging#checkout:member",
@@ -6848,6 +6979,33 @@
6848
6979
  "endIndex": 2
6849
6980
  }
6850
6981
  },
6982
+ {
6983
+ "kind": "PropertySignature",
6984
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformTagging#displayBrowseProduct:member",
6985
+ "docComment": "",
6986
+ "excerptTokens": [
6987
+ {
6988
+ "kind": "Content",
6989
+ "text": "displayBrowseProduct: "
6990
+ },
6991
+ {
6992
+ "kind": "Content",
6993
+ "text": "string"
6994
+ },
6995
+ {
6996
+ "kind": "Content",
6997
+ "text": ";"
6998
+ }
6999
+ ],
7000
+ "isReadonly": false,
7001
+ "isOptional": false,
7002
+ "releaseTag": "Public",
7003
+ "name": "displayBrowseProduct",
7004
+ "propertyTypeTokenRange": {
7005
+ "startIndex": 1,
7006
+ "endIndex": 2
7007
+ }
7008
+ },
6851
7009
  {
6852
7010
  "kind": "PropertySignature",
6853
7011
  "canonicalReference": "@empathyco/x-adapter-platform!PlatformTagging#displayClick:member",
@@ -36971,6 +36971,15 @@
36971
36971
  "text": "TaggingRequest",
36972
36972
  "canonicalReference": "@empathyco/x-components!TaggingRequest:interface"
36973
36973
  },
36974
+ {
36975
+ "kind": "Content",
36976
+ "text": " | undefined;\n BrowseTaggingReceived?: import(\"@empathyco/x-types\")."
36977
+ },
36978
+ {
36979
+ "kind": "Reference",
36980
+ "text": "TaggingRequest",
36981
+ "canonicalReference": "@empathyco/x-components!TaggingRequest:interface"
36982
+ },
36974
36983
  {
36975
36984
  "kind": "Content",
36976
36985
  "text": " | undefined;\n TrackableElementDisplayed?: import(\"@empathyco/x-types\")."
@@ -37495,7 +37504,7 @@
37495
37504
  "name": "HierarchicalFilter",
37496
37505
  "variableTypeTokenRange": {
37497
37506
  "startIndex": 1,
37498
- "endIndex": 314
37507
+ "endIndex": 316
37499
37508
  }
37500
37509
  },
37501
37510
  {
@@ -72459,6 +72468,43 @@
72459
72468
  "endIndex": 4
72460
72469
  }
72461
72470
  },
72471
+ {
72472
+ "kind": "Variable",
72473
+ "canonicalReference": "@empathyco/x-components!setBrowseTaggingInfo:var",
72474
+ "docComment": "/**\n * Sets the tagging state of the browse tagging info using a debounce which ends if the user accepts a query.\n *\n * @public\n */\n",
72475
+ "excerptTokens": [
72476
+ {
72477
+ "kind": "Content",
72478
+ "text": "setBrowseTaggingInfo: "
72479
+ },
72480
+ {
72481
+ "kind": "Reference",
72482
+ "text": "Wire",
72483
+ "canonicalReference": "@empathyco/x-components!Wire:type"
72484
+ },
72485
+ {
72486
+ "kind": "Content",
72487
+ "text": "<"
72488
+ },
72489
+ {
72490
+ "kind": "Reference",
72491
+ "text": "TaggingRequest",
72492
+ "canonicalReference": "@empathyco/x-components!TaggingRequest:interface"
72493
+ },
72494
+ {
72495
+ "kind": "Content",
72496
+ "text": ">"
72497
+ }
72498
+ ],
72499
+ "fileUrlPath": "src/x-modules/tagging/wiring.ts",
72500
+ "isReadonly": true,
72501
+ "releaseTag": "Public",
72502
+ "name": "setBrowseTaggingInfo",
72503
+ "variableTypeTokenRange": {
72504
+ "startIndex": 1,
72505
+ "endIndex": 5
72506
+ }
72507
+ },
72462
72508
  {
72463
72509
  "kind": "Variable",
72464
72510
  "canonicalReference": "@empathyco/x-components!setBrowseUrlParams:var",
@@ -76262,6 +76308,15 @@
76262
76308
  "text": "TaggingRequest",
76263
76309
  "canonicalReference": "@empathyco/x-components!TaggingRequest:interface"
76264
76310
  },
76311
+ {
76312
+ "kind": "Content",
76313
+ "text": " | undefined;\n BrowseTaggingReceived?: import(\"@empathyco/x-types\")."
76314
+ },
76315
+ {
76316
+ "kind": "Reference",
76317
+ "text": "TaggingRequest",
76318
+ "canonicalReference": "@empathyco/x-components!TaggingRequest:interface"
76319
+ },
76265
76320
  {
76266
76321
  "kind": "Content",
76267
76322
  "text": " | undefined;\n TrackableElementDisplayed?: import(\"@empathyco/x-types\")."
@@ -76687,7 +76742,7 @@
76687
76742
  "name": "SimpleFilter",
76688
76743
  "variableTypeTokenRange": {
76689
76744
  "startIndex": 1,
76690
- "endIndex": 282
76745
+ "endIndex": 284
76691
76746
  }
76692
76747
  },
76693
76748
  {
@@ -79470,6 +79525,24 @@
79470
79525
  "text": "WireMetadata",
79471
79526
  "canonicalReference": "@empathyco/x-components!WireMetadata:interface"
79472
79527
  },
79528
+ {
79529
+ "kind": "Content",
79530
+ "text": ") => unknown;\n BrowseTaggingReceived: (payload: import(\"@empathyco/x-types\")."
79531
+ },
79532
+ {
79533
+ "kind": "Reference",
79534
+ "text": "TaggingRequest",
79535
+ "canonicalReference": "@empathyco/x-components!TaggingRequest:interface"
79536
+ },
79537
+ {
79538
+ "kind": "Content",
79539
+ "text": ", metadata: "
79540
+ },
79541
+ {
79542
+ "kind": "Reference",
79543
+ "text": "WireMetadata",
79544
+ "canonicalReference": "@empathyco/x-components!WireMetadata:interface"
79545
+ },
79473
79546
  {
79474
79547
  "kind": "Content",
79475
79548
  "text": ") => unknown;\n TrackableElementDisplayed: (payload: import(\"@empathyco/x-types\")."
@@ -80084,7 +80157,7 @@
80084
80157
  "name": "SnippetCallbacks",
80085
80158
  "variableTypeTokenRange": {
80086
80159
  "startIndex": 1,
80087
- "endIndex": 600
80160
+ "endIndex": 604
80088
80161
  }
80089
80162
  },
80090
80163
  {
@@ -83658,6 +83731,42 @@
83658
83731
  "name": "TaggingMutations",
83659
83732
  "preserveMemberOrder": false,
83660
83733
  "members": [
83734
+ {
83735
+ "kind": "PropertySignature",
83736
+ "canonicalReference": "@empathyco/x-components!TaggingMutations#setBrowseTaggingInfo:member",
83737
+ "docComment": "/**\n * Sets the {@link TaggingState.browseTaggingInfo} property.\n *\n * @param browseTaggingInfo - The new {@link TaggingState.browseTaggingInfo}.\n */\n",
83738
+ "excerptTokens": [
83739
+ {
83740
+ "kind": "Content",
83741
+ "text": "setBrowseTaggingInfo: "
83742
+ },
83743
+ {
83744
+ "kind": "Content",
83745
+ "text": "(browseTaggingInfo: "
83746
+ },
83747
+ {
83748
+ "kind": "Reference",
83749
+ "text": "TaggingRequest",
83750
+ "canonicalReference": "@empathyco/x-components!TaggingRequest:interface"
83751
+ },
83752
+ {
83753
+ "kind": "Content",
83754
+ "text": ") => void"
83755
+ },
83756
+ {
83757
+ "kind": "Content",
83758
+ "text": ";"
83759
+ }
83760
+ ],
83761
+ "isReadonly": false,
83762
+ "isOptional": false,
83763
+ "releaseTag": "Public",
83764
+ "name": "setBrowseTaggingInfo",
83765
+ "propertyTypeTokenRange": {
83766
+ "startIndex": 1,
83767
+ "endIndex": 4
83768
+ }
83769
+ },
83661
83770
  {
83662
83771
  "kind": "PropertySignature",
83663
83772
  "canonicalReference": "@empathyco/x-components!TaggingMutations#setConsent:member",
@@ -83780,6 +83889,38 @@
83780
83889
  "name": "TaggingState",
83781
83890
  "preserveMemberOrder": false,
83782
83891
  "members": [
83892
+ {
83893
+ "kind": "PropertySignature",
83894
+ "canonicalReference": "@empathyco/x-components!TaggingState#browseTaggingInfo:member",
83895
+ "docComment": "/**\n * Tagging info for last accepted browse category.\n */\n",
83896
+ "excerptTokens": [
83897
+ {
83898
+ "kind": "Content",
83899
+ "text": "browseTaggingInfo: "
83900
+ },
83901
+ {
83902
+ "kind": "Reference",
83903
+ "text": "TaggingRequest",
83904
+ "canonicalReference": "@empathyco/x-components!TaggingRequest:interface"
83905
+ },
83906
+ {
83907
+ "kind": "Content",
83908
+ "text": " | null"
83909
+ },
83910
+ {
83911
+ "kind": "Content",
83912
+ "text": ";"
83913
+ }
83914
+ ],
83915
+ "isReadonly": false,
83916
+ "isOptional": false,
83917
+ "releaseTag": "Public",
83918
+ "name": "browseTaggingInfo",
83919
+ "propertyTypeTokenRange": {
83920
+ "startIndex": 1,
83921
+ "endIndex": 3
83922
+ }
83923
+ },
83783
83924
  {
83784
83925
  "kind": "PropertySignature",
83785
83926
  "canonicalReference": "@empathyco/x-components!TaggingState#config:member",
@@ -83912,6 +84053,34 @@
83912
84053
  "name": "TaggingXEvents",
83913
84054
  "preserveMemberOrder": false,
83914
84055
  "members": [
84056
+ {
84057
+ "kind": "PropertySignature",
84058
+ "canonicalReference": "@empathyco/x-components!TaggingXEvents#BrowseTaggingReceived:member",
84059
+ "docComment": "/**\n * Browse tagging info has changed. Payload: The new browse tagging info.\n */\n",
84060
+ "excerptTokens": [
84061
+ {
84062
+ "kind": "Content",
84063
+ "text": "BrowseTaggingReceived: "
84064
+ },
84065
+ {
84066
+ "kind": "Reference",
84067
+ "text": "TaggingRequest",
84068
+ "canonicalReference": "@empathyco/x-components!TaggingRequest:interface"
84069
+ },
84070
+ {
84071
+ "kind": "Content",
84072
+ "text": ";"
84073
+ }
84074
+ ],
84075
+ "isReadonly": false,
84076
+ "isOptional": false,
84077
+ "releaseTag": "Public",
84078
+ "name": "BrowseTaggingReceived",
84079
+ "propertyTypeTokenRange": {
84080
+ "startIndex": 1,
84081
+ "endIndex": 2
84082
+ }
84083
+ },
83915
84084
  {
83916
84085
  "kind": "PropertySignature",
83917
84086
  "canonicalReference": "@empathyco/x-components!TaggingXEvents#ConsentChanged:member",
@@ -85048,6 +85217,52 @@
85048
85217
  "endIndex": 5
85049
85218
  }
85050
85219
  },
85220
+ {
85221
+ "kind": "Variable",
85222
+ "canonicalReference": "@empathyco/x-components!trackBrowseWire:var",
85223
+ "docComment": "/**\n * Tracks the tagging of the browse category.\n *\n * @public\n */\n",
85224
+ "excerptTokens": [
85225
+ {
85226
+ "kind": "Content",
85227
+ "text": "trackBrowseWire: "
85228
+ },
85229
+ {
85230
+ "kind": "Reference",
85231
+ "text": "Wire",
85232
+ "canonicalReference": "@empathyco/x-components!Wire:type"
85233
+ },
85234
+ {
85235
+ "kind": "Content",
85236
+ "text": "<"
85237
+ },
85238
+ {
85239
+ "kind": "Reference",
85240
+ "text": "TaggingRequest",
85241
+ "canonicalReference": "@empathyco/x-components!TaggingRequest:interface"
85242
+ },
85243
+ {
85244
+ "kind": "Content",
85245
+ "text": " | "
85246
+ },
85247
+ {
85248
+ "kind": "Reference",
85249
+ "text": "TaggingRequest",
85250
+ "canonicalReference": "@empathyco/x-components!TaggingRequest:interface"
85251
+ },
85252
+ {
85253
+ "kind": "Content",
85254
+ "text": "[]>"
85255
+ }
85256
+ ],
85257
+ "fileUrlPath": "src/x-modules/tagging/wiring.ts",
85258
+ "isReadonly": true,
85259
+ "releaseTag": "Public",
85260
+ "name": "trackBrowseWire",
85261
+ "variableTypeTokenRange": {
85262
+ "startIndex": 1,
85263
+ "endIndex": 7
85264
+ }
85265
+ },
85051
85266
  {
85052
85267
  "kind": "Variable",
85053
85268
  "canonicalReference": "@empathyco/x-components!trackDisplayClickedWire:var",