@empathyco/x-components 6.0.0-alpha.36 → 6.0.0-alpha.38

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 (99) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/design-system/deprecated-full-theme.css +578 -578
  3. package/docs/API-reference/api/x-adapter-platform.md +3 -0
  4. package/docs/API-reference/api/x-adapter-platform.nextqueriesrelatedpromptsschema.md +11 -0
  5. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompt.md +1 -0
  6. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompt.tagging.md +11 -0
  7. package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptnextqueriestagging.md +22 -0
  8. package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptnextqueriestagging.toolingdisplay.md +11 -0
  9. package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptnextqueriestagging.toolingdisplayadd2cart.md +11 -0
  10. package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptnextqueriestagging.toolingdisplayclick.md +11 -0
  11. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompttagging.md +21 -0
  12. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompttagging.nextqueries.md +11 -0
  13. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompttagging.toolingdisplay.md +11 -0
  14. package/docs/API-reference/api/x-components.baseaddtocart.md +1 -0
  15. package/docs/API-reference/api/x-components.createtracktoolingadd2cartwire.md +19 -0
  16. package/docs/API-reference/api/x-components.createtracktoolingdisplaywire.md +19 -0
  17. package/docs/API-reference/api/x-components.featurelocation.md +1 -1
  18. package/docs/API-reference/api/x-components.globalxbus.md +4 -0
  19. package/docs/API-reference/api/x-components.hierarchicalfilter.md +2 -0
  20. package/docs/API-reference/api/x-components.md +7 -2
  21. package/docs/API-reference/api/x-components.queryfeature.md +1 -1
  22. package/docs/API-reference/api/x-components.relatedprompt.md +4 -25
  23. package/docs/API-reference/api/x-components.relatedpromptstaglist.md +40 -6
  24. package/docs/API-reference/api/x-components.relatedpromptsxevents.md +2 -0
  25. package/docs/API-reference/api/x-components.relatedpromptsxevents.userclickedarelatedpromptadd2cart.md +13 -0
  26. package/docs/API-reference/api/x-components.relatedpromptsxevents.userclickedarelatedpromptresult.md +13 -0
  27. package/docs/API-reference/api/x-components.simplefilter.md +2 -0
  28. package/docs/API-reference/api/x-components.snippetcallbacks.md +2 -0
  29. package/docs/API-reference/api/x-components.tracktoolingadd2cartwire.md +13 -0
  30. package/docs/API-reference/api/x-components.tracktoolingdisplayclickedwire.md +13 -0
  31. package/docs/API-reference/api/x-components.typingoptions.md +22 -0
  32. package/docs/API-reference/api/x-components.typingoptions.speed.md +13 -0
  33. package/docs/API-reference/api/x-components.typingoptions.targetattr.md +18 -0
  34. package/docs/API-reference/api/x-components.typingoptions.text.md +13 -0
  35. package/docs/API-reference/api/x-types.md +1 -0
  36. package/docs/API-reference/api/x-types.relatedprompt.md +2 -1
  37. package/docs/API-reference/api/x-types.relatedprompt.relatedpromptnextqueries.md +13 -0
  38. package/docs/API-reference/api/x-types.relatedprompt.toolingdisplaytagging.md +13 -0
  39. package/docs/API-reference/api/x-types.relatedpromptnextquery.md +23 -0
  40. package/docs/API-reference/api/x-types.relatedpromptnextquery.query.md +13 -0
  41. package/docs/API-reference/api/x-types.relatedpromptnextquery.toolingdisplayadd2carttagging.md +13 -0
  42. package/docs/API-reference/api/x-types.relatedpromptnextquery.toolingdisplayclicktagging.md +13 -0
  43. package/docs/API-reference/api/x-types.relatedpromptnextquery.toolingdisplaytagging.md +13 -0
  44. package/docs/API-reference/components/related-prompts/x-components.related-prompt.md +4 -14
  45. package/docs/API-reference/components/related-prompts/x-components.related-prompts-tag-list.md +16 -10
  46. package/js/components/result/base-result-add-to-cart.vue.js +2 -1
  47. package/js/components/result/base-result-add-to-cart.vue.js.map +1 -1
  48. package/js/components/result/base-result-add-to-cart.vue2.js +19 -5
  49. package/js/components/result/base-result-add-to-cart.vue2.js.map +1 -1
  50. package/js/directives/typing.js +52 -0
  51. package/js/directives/typing.js.map +1 -0
  52. package/js/index.js +1 -1
  53. package/js/x-modules/related-prompts/components/related-prompt.vue.js +16 -43
  54. package/js/x-modules/related-prompts/components/related-prompt.vue.js.map +1 -1
  55. package/js/x-modules/related-prompts/components/related-prompt.vue2.js +5 -36
  56. package/js/x-modules/related-prompts/components/related-prompt.vue2.js.map +1 -1
  57. package/js/x-modules/related-prompts/components/related-prompt.vue3.js +7 -0
  58. package/js/x-modules/related-prompts/components/related-prompt.vue3.js.map +1 -0
  59. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue.js +76 -68
  60. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue.js.map +1 -1
  61. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue2.js +176 -22
  62. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue2.js.map +1 -1
  63. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue3.js +1 -1
  64. package/js/x-modules/tagging/store/module.js +5 -1
  65. package/js/x-modules/tagging/store/module.js.map +1 -1
  66. package/js/x-modules/tagging/wiring.js +64 -1
  67. package/js/x-modules/tagging/wiring.js.map +1 -1
  68. package/package.json +4 -4
  69. package/report/x-adapter-platform.api.json +254 -0
  70. package/report/x-components.api.json +746 -64
  71. package/report/x-components.api.md +84 -34
  72. package/report/x-types.api.json +167 -5
  73. package/tagging/index.js +1 -1
  74. package/types/components/global-x-bus.vue.d.ts +4 -0
  75. package/types/components/global-x-bus.vue.d.ts.map +1 -1
  76. package/types/components/result/base-result-add-to-cart.vue.d.ts +2 -0
  77. package/types/components/result/base-result-add-to-cart.vue.d.ts.map +1 -1
  78. package/types/components/snippet-callbacks.vue.d.ts +2 -0
  79. package/types/components/snippet-callbacks.vue.d.ts.map +1 -1
  80. package/types/directives/index.d.ts +1 -0
  81. package/types/directives/index.d.ts.map +1 -1
  82. package/types/directives/typing.d.ts +30 -0
  83. package/types/directives/typing.d.ts.map +1 -0
  84. package/types/types/origin.d.ts +2 -2
  85. package/types/types/origin.d.ts.map +1 -1
  86. package/types/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts +2 -0
  87. package/types/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts.map +1 -1
  88. package/types/x-modules/facets/components/filters/simple-filter.vue.d.ts +2 -0
  89. package/types/x-modules/facets/components/filters/simple-filter.vue.d.ts.map +1 -1
  90. package/types/x-modules/related-prompts/components/related-prompt.vue.d.ts +4 -27
  91. package/types/x-modules/related-prompts/components/related-prompt.vue.d.ts.map +1 -1
  92. package/types/x-modules/related-prompts/components/related-prompts-tag-list.vue.d.ts +87 -6
  93. package/types/x-modules/related-prompts/components/related-prompts-tag-list.vue.d.ts.map +1 -1
  94. package/types/x-modules/related-prompts/events.types.d.ts +11 -1
  95. package/types/x-modules/related-prompts/events.types.d.ts.map +1 -1
  96. package/types/x-modules/tagging/store/module.d.ts.map +1 -1
  97. package/types/x-modules/tagging/wiring.d.ts +36 -2
  98. package/types/x-modules/tagging/wiring.d.ts.map +1 -1
  99. package/docs/API-reference/api/x-types.relatedprompt.nextqueries.md +0 -13
@@ -1 +1 @@
1
- {"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/tagging/wiring.ts"],"sourcesContent":["import { SemanticQuery, Taggable, Tagging, TaggingRequest } from '@empathyco/x-types';\nimport { DefaultSessionService } from '@empathyco/x-utils';\nimport {\n namespacedWireCommit,\n namespacedWireDispatch\n} 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 { DisplayWireMetadata, Wire } from '../../wiring/wiring.types';\nimport { createWiring } from '../../wiring/wiring.utils';\nimport { createOrigin } from '../../utils/index';\nimport { FeatureLocation } from '../../types/index';\nimport { DefaultPDPAddToCartService } from './service/pdp-add-to-cart.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 DefaultPDPAddToCartService}.\n */\nconst wirePDPAddToCartService = wireService(DefaultPDPAddToCartService.instance);\n\n/**\n * Stores the given result on the local storage.\n *\n * @public\n */\nconst storeClickedResultWire = wirePDPAddToCartService('storeResultClicked');\n\n/**\n * Moves the result information from the local storage to session storage.\n *\n * @public\n */\nconst moveClickedResultToSessionWire = mapWire(\n wirePDPAddToCartService('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 = wirePDPAddToCartService('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 > 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 * 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 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 !!tagging?.[property] && !ignoreInModules?.includes(moduleName)\n );\n}\n\n/**\n * Performs a track of a query with no results that used semantics 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 */\nexport const trackNoResultsQueryWithSemanticsWire = filter(\n wireDispatch('track', ({ eventPayload, state }) => {\n const { queryTaggingInfo } = state;\n const totalHits = (eventPayload as 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 trackNoResultsQueryWithSemanticsWire}\n *\n * @public\n */\nexport const trackNoResultsQueryWithSemanticsWireDebounced = moduleDebounce(\n trackNoResultsQueryWithSemanticsWire,\n ({ state }) => state.config.queryTaggingDebounceMs,\n { cancelOn: 'QueryPreviewUnmounted' }\n);\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 ({ eventPayload: { tagging } }) => !!tagging?.[property]\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 * 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 },\n UserClickedPDPAddToCart: {\n trackAddToCartFromSessionStorage\n },\n UserClickedABanner: {\n trackBannerClickedWire\n },\n UserClickedADisplayResult: {\n trackDisplayClickedWire,\n setQueryTaggingFromQueryPreview\n },\n SemanticQueriesResponseChanged: {\n trackNoResultsQueryWithSemanticsWireDebounced\n },\n ModuleRegistered: {\n setNoResultsTaggingEnabledWire\n }\n});\n"],"names":[],"mappings":";;;;;;;;;;AAeA;;;;AAIG;AACH,MAAM,UAAU,GAAG,SAAS,CAAC;AAE7B;;AAEG;AACH,MAAM,cAAc,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;AAEtD;;;;AAIG;AACH,MAAM,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAC;AAEpD;;;;AAIG;AACH,MAAM,YAAY,GAAG,sBAAsB,CAAC,UAAU,CAAC,CAAC;AAExD;;AAEG;AACH,MAAM,gCAAgC,GAAG,yBAAyB,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;AAEnG;;AAEG;AACH,MAAM,uBAAuB,GAAG,WAAW,CAAC,0BAA0B,CAAC,QAAQ,CAAC,CAAC;AAEjF;;;;AAIG;AACH,MAAM,sBAAsB,GAAG,uBAAuB,CAAC,oBAAoB,CAAC,CAAC;AAE7E;;;;AAIG;AACH,MAAM,8BAA8B,GAAG,OAAO,CAC5C,uBAAuB,CAAC,sBAAsB,CAAC,EAC/C,CAAC,OAAe,KAAI;IAClB,OAAO,OAAO,KAAK,KAAK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,CAAC;AACJ,CAAC;AAED;;;;AAIG;AACI,MAAM,aAAa,GAAG,YAAY,CAAC;AACxC,IAAA,eAAe,EAAE;QACf,UAAU;AACX,KAAA;AACD,IAAA,cAAc,EAAE;QACd,gBAAgB;AACjB,KAAA;AACD,IAAA,WAAW,EAAE;QACX,8BAA8B;AAC/B,KAAA;AACD,IAAA,wBAAwB,EAAE;QACxB,8BAA8B;AAC/B,KAAA;AACD,IAAA,oBAAoB,EAAE;QACpB,mBAAmB;AACpB,KAAA;AACD,IAAA,qBAAqB,EAAE;QACrB,cAAc;AACf,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,yBAAyB;AAC1B,KAAA;AACD,IAAA,qBAAqB,EAAE;QACrB,gBAAgB;AACjB,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,sBAAsB;QACtB,sBAAsB;AACvB,KAAA;AACD,IAAA,0BAA0B,EAAE;QAC1B,kBAAkB;QAClB,sBAAsB;AACvB,KAAA;AACD,IAAA,uBAAuB,EAAE;QACvB,gCAAgC;AACjC,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,sBAAsB;AACvB,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,uBAAuB;QACvB,+BAA+B;AAChC,KAAA;AACD,IAAA,8BAA8B,EAAE;QAC9B,6CAA6C;AAC9C,KAAA;AACD,IAAA,gBAAgB,EAAE;QAChB,8BAA8B;AAC/B,KAAA;AACF,CAAA;;;;"}
1
+ {"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/tagging/wiring.ts"],"sourcesContent":["import { Result, SemanticQuery, Taggable, Tagging, TaggingRequest } from '@empathyco/x-types';\nimport { DefaultSessionService } from '@empathyco/x-utils';\nimport {\n namespacedWireCommit,\n namespacedWireDispatch\n} 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 { DisplayWireMetadata, Wire } from '../../wiring/wiring.types';\nimport { createWiring } from '../../wiring/wiring.utils';\nimport { createOrigin } from '../../utils/index';\nimport { FeatureLocation } from '../../types/index';\nimport { DefaultPDPAddToCartService } from './service/pdp-add-to-cart.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 DefaultPDPAddToCartService}.\n */\nconst wirePDPAddToCartService = wireService(DefaultPDPAddToCartService.instance);\n\n/**\n * Stores the given result on the local storage.\n *\n * @public\n */\nconst storeClickedResultWire = wirePDPAddToCartService('storeResultClicked');\n\n/**\n * Moves the result information from the local storage to session storage.\n *\n * @public\n */\nconst moveClickedResultToSessionWire = mapWire(\n wirePDPAddToCartService('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 = wirePDPAddToCartService('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 > 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 * 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 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 !!tagging?.[property] && !ignoreInModules?.includes(moduleName)\n );\n}\n\n/**\n * Performs a track of a query with no results that used semantics 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 */\nexport const trackNoResultsQueryWithSemanticsWire = filter(\n wireDispatch('track', ({ eventPayload, state }) => {\n const { queryTaggingInfo } = state;\n const totalHits = (eventPayload as 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 trackNoResultsQueryWithSemanticsWire}\n *\n * @public\n */\nexport const trackNoResultsQueryWithSemanticsWireDebounced = moduleDebounce(\n trackNoResultsQueryWithSemanticsWire,\n ({ state }) => state.config.queryTaggingDebounceMs,\n { cancelOn: 'QueryPreviewUnmounted' }\n);\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 ({ eventPayload: { tagging } }) => !!tagging?.[property]\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 click.\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 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 * 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 },\n UserClickedPDPAddToCart: {\n trackAddToCartFromSessionStorage\n },\n UserClickedABanner: {\n trackBannerClickedWire\n },\n UserClickedADisplayResult: {\n trackDisplayClickedWire,\n setQueryTaggingFromQueryPreview\n },\n SemanticQueriesResponseChanged: {\n trackNoResultsQueryWithSemanticsWireDebounced\n },\n ModuleRegistered: {\n setNoResultsTaggingEnabledWire\n },\n UserClickedARelatedPromptResult: {\n trackToolingDisplayClickedWire\n },\n UserClickedARelatedPromptAdd2Cart: {\n trackToolingAdd2CartWire\n }\n});\n"],"names":[],"mappings":";;;;;;;;;;AAeA;;;;AAIG;AACH,MAAM,UAAU,GAAG,SAAS,CAAC;AAE7B;;AAEG;AACH,MAAM,cAAc,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;AAEtD;;;;AAIG;AACH,MAAM,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAC;AAEpD;;;;AAIG;AACH,MAAM,YAAY,GAAG,sBAAsB,CAAC,UAAU,CAAC,CAAC;AAExD;;AAEG;AACH,MAAM,gCAAgC,GAAG,yBAAyB,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;AAEnG;;AAEG;AACH,MAAM,uBAAuB,GAAG,WAAW,CAAC,0BAA0B,CAAC,QAAQ,CAAC,CAAC;AAEjF;;;;AAIG;AACH,MAAM,sBAAsB,GAAG,uBAAuB,CAAC,oBAAoB,CAAC,CAAC;AAE7E;;;;AAI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@empathyco/x-components",
3
- "version": "6.0.0-alpha.36",
3
+ "version": "6.0.0-alpha.38",
4
4
  "description": "Empathy X Components",
5
5
  "author": "Empathy Systems Corporation S.L.",
6
6
  "license": "Apache-2.0",
@@ -70,12 +70,12 @@
70
70
  },
71
71
  "dependencies": {
72
72
  "@empathyco/x-adapter": "^8.1.0-alpha.1",
73
- "@empathyco/x-adapter-platform": "^1.1.0-alpha.10",
73
+ "@empathyco/x-adapter-platform": "^1.1.0-alpha.11",
74
74
  "@empathyco/x-bus": "^1.0.3-alpha.2",
75
75
  "@empathyco/x-deep-merge": "^2.0.3-alpha.2",
76
76
  "@empathyco/x-logger": "^1.2.0-alpha.11",
77
77
  "@empathyco/x-storage-service": "^2.0.3-alpha.1",
78
- "@empathyco/x-types": "^10.1.0-alpha.7",
78
+ "@empathyco/x-types": "^10.1.0-alpha.8",
79
79
  "@empathyco/x-utils": "^1.0.3-alpha.2",
80
80
  "@vue/devtools-api": "~6.5.0",
81
81
  "@vueuse/core": "~10.7.1",
@@ -138,5 +138,5 @@
138
138
  "access": "public",
139
139
  "directory": "dist"
140
140
  },
141
- "gitHead": "c0f4da50910ea0653b954cdc5cb503f0fb6d9193"
141
+ "gitHead": "924c8c5f088e2a70ba33c0e52488269b020363a1"
142
142
  }
@@ -1166,6 +1166,47 @@
1166
1166
  "endIndex": 8
1167
1167
  }
1168
1168
  },
1169
+ {
1170
+ "kind": "Variable",
1171
+ "canonicalReference": "@empathyco/x-adapter-platform!nextQueriesRelatedPromptsSchema:var",
1172
+ "docComment": "",
1173
+ "excerptTokens": [
1174
+ {
1175
+ "kind": "Content",
1176
+ "text": "nextQueriesRelatedPromptsSchema: "
1177
+ },
1178
+ {
1179
+ "kind": "Content",
1180
+ "text": "import(\"@empathyco/x-adapter\")."
1181
+ },
1182
+ {
1183
+ "kind": "Reference",
1184
+ "text": "MutableSchema",
1185
+ "canonicalReference": "@empathyco/x-adapter!MutableSchema:type"
1186
+ },
1187
+ {
1188
+ "kind": "Content",
1189
+ "text": "<string, "
1190
+ },
1191
+ {
1192
+ "kind": "Reference",
1193
+ "text": "RelatedPromptNextQuery",
1194
+ "canonicalReference": "@empathyco/x-adapter-platform!RelatedPromptNextQuery:interface"
1195
+ },
1196
+ {
1197
+ "kind": "Content",
1198
+ "text": ">"
1199
+ }
1200
+ ],
1201
+ "fileUrlPath": "dist/types/schemas/models/related-prompt.schema.d.ts",
1202
+ "isReadonly": true,
1203
+ "releaseTag": "Public",
1204
+ "name": "nextQueriesRelatedPromptsSchema",
1205
+ "variableTypeTokenRange": {
1206
+ "startIndex": 1,
1207
+ "endIndex": 6
1208
+ }
1209
+ },
1169
1210
  {
1170
1211
  "kind": "Variable",
1171
1212
  "canonicalReference": "@empathyco/x-adapter-platform!nextQueriesRequestMapper:var",
@@ -3769,6 +3810,34 @@
3769
3810
  "endIndex": 2
3770
3811
  }
3771
3812
  },
3813
+ {
3814
+ "kind": "PropertySignature",
3815
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformRelatedPrompt#tagging:member",
3816
+ "docComment": "",
3817
+ "excerptTokens": [
3818
+ {
3819
+ "kind": "Content",
3820
+ "text": "tagging: "
3821
+ },
3822
+ {
3823
+ "kind": "Reference",
3824
+ "text": "PlatformRelatedPromptTagging",
3825
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformRelatedPromptTagging:interface"
3826
+ },
3827
+ {
3828
+ "kind": "Content",
3829
+ "text": ";"
3830
+ }
3831
+ ],
3832
+ "isReadonly": false,
3833
+ "isOptional": false,
3834
+ "releaseTag": "Public",
3835
+ "name": "tagging",
3836
+ "propertyTypeTokenRange": {
3837
+ "startIndex": 1,
3838
+ "endIndex": 2
3839
+ }
3840
+ },
3772
3841
  {
3773
3842
  "kind": "PropertySignature",
3774
3843
  "canonicalReference": "@empathyco/x-adapter-platform!PlatformRelatedPrompt#type:member",
@@ -3799,6 +3868,105 @@
3799
3868
  ],
3800
3869
  "extendsTokenRanges": []
3801
3870
  },
3871
+ {
3872
+ "kind": "Interface",
3873
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformRelatedPromptNextQueriesTagging:interface",
3874
+ "docComment": "/**\n * Related prompt model for the `platform` API.\n *\n * @public\n */\n",
3875
+ "excerptTokens": [
3876
+ {
3877
+ "kind": "Content",
3878
+ "text": "export interface PlatformRelatedPromptNextQueriesTagging "
3879
+ }
3880
+ ],
3881
+ "fileUrlPath": "dist/types/types/models/related-prompt.model.d.ts",
3882
+ "releaseTag": "Public",
3883
+ "name": "PlatformRelatedPromptNextQueriesTagging",
3884
+ "preserveMemberOrder": false,
3885
+ "members": [
3886
+ {
3887
+ "kind": "PropertySignature",
3888
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformRelatedPromptNextQueriesTagging#toolingDisplay:member",
3889
+ "docComment": "",
3890
+ "excerptTokens": [
3891
+ {
3892
+ "kind": "Content",
3893
+ "text": "toolingDisplay: "
3894
+ },
3895
+ {
3896
+ "kind": "Content",
3897
+ "text": "string"
3898
+ },
3899
+ {
3900
+ "kind": "Content",
3901
+ "text": ";"
3902
+ }
3903
+ ],
3904
+ "isReadonly": false,
3905
+ "isOptional": false,
3906
+ "releaseTag": "Public",
3907
+ "name": "toolingDisplay",
3908
+ "propertyTypeTokenRange": {
3909
+ "startIndex": 1,
3910
+ "endIndex": 2
3911
+ }
3912
+ },
3913
+ {
3914
+ "kind": "PropertySignature",
3915
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformRelatedPromptNextQueriesTagging#toolingDisplayAdd2Cart:member",
3916
+ "docComment": "",
3917
+ "excerptTokens": [
3918
+ {
3919
+ "kind": "Content",
3920
+ "text": "toolingDisplayAdd2Cart: "
3921
+ },
3922
+ {
3923
+ "kind": "Content",
3924
+ "text": "string"
3925
+ },
3926
+ {
3927
+ "kind": "Content",
3928
+ "text": ";"
3929
+ }
3930
+ ],
3931
+ "isReadonly": false,
3932
+ "isOptional": false,
3933
+ "releaseTag": "Public",
3934
+ "name": "toolingDisplayAdd2Cart",
3935
+ "propertyTypeTokenRange": {
3936
+ "startIndex": 1,
3937
+ "endIndex": 2
3938
+ }
3939
+ },
3940
+ {
3941
+ "kind": "PropertySignature",
3942
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformRelatedPromptNextQueriesTagging#toolingDisplayClick:member",
3943
+ "docComment": "",
3944
+ "excerptTokens": [
3945
+ {
3946
+ "kind": "Content",
3947
+ "text": "toolingDisplayClick: "
3948
+ },
3949
+ {
3950
+ "kind": "Content",
3951
+ "text": "string"
3952
+ },
3953
+ {
3954
+ "kind": "Content",
3955
+ "text": ";"
3956
+ }
3957
+ ],
3958
+ "isReadonly": false,
3959
+ "isOptional": false,
3960
+ "releaseTag": "Public",
3961
+ "name": "toolingDisplayClick",
3962
+ "propertyTypeTokenRange": {
3963
+ "startIndex": 1,
3964
+ "endIndex": 2
3965
+ }
3966
+ }
3967
+ ],
3968
+ "extendsTokenRanges": []
3969
+ },
3802
3970
  {
3803
3971
  "kind": "Interface",
3804
3972
  "canonicalReference": "@empathyco/x-adapter-platform!PlatformRelatedPromptsRequest:interface",
@@ -3924,6 +4092,92 @@
3924
4092
  ],
3925
4093
  "extendsTokenRanges": []
3926
4094
  },
4095
+ {
4096
+ "kind": "Interface",
4097
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformRelatedPromptTagging:interface",
4098
+ "docComment": "/**\n * Related prompt model for the `platform` API.\n *\n * @public\n */\n",
4099
+ "excerptTokens": [
4100
+ {
4101
+ "kind": "Content",
4102
+ "text": "export interface PlatformRelatedPromptTagging "
4103
+ }
4104
+ ],
4105
+ "fileUrlPath": "dist/types/types/models/related-prompt.model.d.ts",
4106
+ "releaseTag": "Public",
4107
+ "name": "PlatformRelatedPromptTagging",
4108
+ "preserveMemberOrder": false,
4109
+ "members": [
4110
+ {
4111
+ "kind": "PropertySignature",
4112
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformRelatedPromptTagging#nextQueries:member",
4113
+ "docComment": "",
4114
+ "excerptTokens": [
4115
+ {
4116
+ "kind": "Content",
4117
+ "text": "nextQueries: "
4118
+ },
4119
+ {
4120
+ "kind": "Reference",
4121
+ "text": "Dictionary",
4122
+ "canonicalReference": "@empathyco/x-utils!Dictionary:type"
4123
+ },
4124
+ {
4125
+ "kind": "Content",
4126
+ "text": "<"
4127
+ },
4128
+ {
4129
+ "kind": "Reference",
4130
+ "text": "PlatformRelatedPromptNextQueriesTagging",
4131
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformRelatedPromptNextQueriesTagging:interface"
4132
+ },
4133
+ {
4134
+ "kind": "Content",
4135
+ "text": ">"
4136
+ },
4137
+ {
4138
+ "kind": "Content",
4139
+ "text": ";"
4140
+ }
4141
+ ],
4142
+ "isReadonly": false,
4143
+ "isOptional": false,
4144
+ "releaseTag": "Public",
4145
+ "name": "nextQueries",
4146
+ "propertyTypeTokenRange": {
4147
+ "startIndex": 1,
4148
+ "endIndex": 5
4149
+ }
4150
+ },
4151
+ {
4152
+ "kind": "PropertySignature",
4153
+ "canonicalReference": "@empathyco/x-adapter-platform!PlatformRelatedPromptTagging#toolingDisplay:member",
4154
+ "docComment": "",
4155
+ "excerptTokens": [
4156
+ {
4157
+ "kind": "Content",
4158
+ "text": "toolingDisplay: "
4159
+ },
4160
+ {
4161
+ "kind": "Content",
4162
+ "text": "string"
4163
+ },
4164
+ {
4165
+ "kind": "Content",
4166
+ "text": ";"
4167
+ }
4168
+ ],
4169
+ "isReadonly": false,
4170
+ "isOptional": false,
4171
+ "releaseTag": "Public",
4172
+ "name": "toolingDisplay",
4173
+ "propertyTypeTokenRange": {
4174
+ "startIndex": 1,
4175
+ "endIndex": 2
4176
+ }
4177
+ }
4178
+ ],
4179
+ "extendsTokenRanges": []
4180
+ },
3927
4181
  {
3928
4182
  "kind": "Interface",
3929
4183
  "canonicalReference": "@empathyco/x-adapter-platform!PlatformRelatedTag:interface",