@empathyco/x-components 6.0.0-alpha.42 → 6.0.0-alpha.44
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.
- package/CHANGELOG.md +18 -0
- package/design-system/deprecated-full-theme.css +710 -710
- package/docs/API-reference/api/x-adapter-platform.platformrelatedprompttagging.md +1 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedprompttagging.toolingdisplayclick.md +11 -0
- package/docs/API-reference/api/x-components.createtrackrelatedprompttoolingdisplayclickwire.md +19 -0
- package/docs/API-reference/api/x-components.createtracktoolingadd2cartwire.md +1 -1
- package/docs/API-reference/api/x-components.displayclickprovider.md +8 -0
- package/docs/API-reference/api/x-components.empathize.md +1 -1
- package/docs/API-reference/api/x-components.md +3 -1
- package/docs/API-reference/api/x-components.relatedpromptstaglist.md +2 -1
- package/docs/API-reference/api/x-components.trackrelatedprompttoolingdisplayclickwire.md +13 -0
- package/docs/API-reference/api/x-types.relatedprompt.md +2 -2
- package/docs/API-reference/api/x-types.relatedprompt.relatedpromptnextqueries.md +1 -1
- package/docs/API-reference/api/x-types.relatedprompt.tagging.md +1 -0
- package/docs/API-reference/components/common/x-components.display-click-provider.md +1 -0
- package/js/components/display-click-provider.vue.js +5 -0
- package/js/components/display-click-provider.vue.js.map +1 -1
- package/js/index.js +1 -1
- package/js/x-modules/empathize/components/empathize.vue.js.map +1 -1
- package/js/x-modules/empathize/components/empathize.vue2.js +2 -3
- package/js/x-modules/empathize/components/empathize.vue2.js.map +1 -1
- package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue.js.map +1 -1
- package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue2.js +4 -1
- package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue2.js.map +1 -1
- package/js/x-modules/tagging/wiring.js +29 -2
- package/js/x-modules/tagging/wiring.js.map +1 -1
- package/package.json +4 -4
- package/report/x-adapter-platform.api.json +27 -0
- package/report/x-components.api.json +115 -9
- package/report/x-components.api.md +21 -3
- package/report/x-types.api.json +12 -3
- package/tagging/index.js +1 -1
- package/types/components/display-click-provider.vue.d.ts +9 -0
- package/types/components/display-click-provider.vue.d.ts.map +1 -1
- package/types/x-modules/empathize/components/empathize.vue.d.ts +1 -1
- package/types/x-modules/empathize/components/empathize.vue.d.ts.map +1 -1
- package/types/x-modules/related-prompts/components/related-prompts-tag-list.vue.d.ts +2 -1
- package/types/x-modules/related-prompts/components/related-prompts-tag-list.vue.d.ts.map +1 -1
- package/types/x-modules/tagging/wiring.d.ts +18 -1
- package/types/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 { 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;;;;AAIG;AACH,MAAM,8BAA8B,GAAG,OAAO,CAC5C,uBAAuB,CAAC,sBAAsB,CAAC,EAC/C,CAAC,OAAe,KAAI;IAClB,OAAO,OAAO,KAAK,KAAK,GAAG,SAAS,GAAG,OAAO,CAAC;AACjD,CAAC,CACF,CAAC;AAEF;;;;AAIG;AACH,MAAM,gCAAgC,GAAG,uBAAuB,CAAC,gBAAgB,CAAC,CAAC;AAEnF;;;;AAIG;AACH,MAAM,gBAAgB,GAAG,MAAM,CAC7B,gCAAgC,CAAC,gBAAgB,CAAC,EAClD,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,CACxC,CAAC;AAEF;;;;AAIG;MACU,UAAU,GAAG,UAAU,CAAC,YAAY,EAAE;AAEnD;;;;AAIG;MACU,8BA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;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;AACD,IAAA,+BAA+B,EAAE;QAC/B,8BAA8B;AAC/B,KAAA;AACD,IAAA,iCAAiC,EAAE;QACjC,wBAAwB;AACzB,KAAA;AACF,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/tagging/wiring.ts"],"sourcesContent":["import {\n RelatedPrompt,\n Result,\n SemanticQuery,\n Taggable,\n Tagging,\n TaggingRequest\n} 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 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 !!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 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: TaggingRequest = relatedPrompt.tagging\n ?.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 }) => metadata?.selectedPrompt === -1\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 UserSelectedARelatedPrompt: {\n trackRelatedPromptToolingDisplayClickWire\n }\n});\n"],"names":[],"mappings":";;;;;;;;;;AAsBA;;;;AAIG;AACH,MAAM,UAAU,GAAG,SAAS,CAAC;AAE7B;;AAEG;AACH,MAAM,cAAc,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;AAEtD;;;;AAIG;AACH,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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;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;AACF,CAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empathyco/x-components",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.44",
|
|
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.
|
|
73
|
+
"@empathyco/x-adapter-platform": "^1.1.0-alpha.13",
|
|
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.
|
|
78
|
+
"@empathyco/x-types": "^10.1.0-alpha.10",
|
|
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": "
|
|
141
|
+
"gitHead": "7860b6d1aa053348d97266d66dbc72704ebabeb6"
|
|
142
142
|
}
|
|
@@ -4174,6 +4174,33 @@
|
|
|
4174
4174
|
"startIndex": 1,
|
|
4175
4175
|
"endIndex": 2
|
|
4176
4176
|
}
|
|
4177
|
+
},
|
|
4178
|
+
{
|
|
4179
|
+
"kind": "PropertySignature",
|
|
4180
|
+
"canonicalReference": "@empathyco/x-adapter-platform!PlatformRelatedPromptTagging#toolingDisplayClick:member",
|
|
4181
|
+
"docComment": "",
|
|
4182
|
+
"excerptTokens": [
|
|
4183
|
+
{
|
|
4184
|
+
"kind": "Content",
|
|
4185
|
+
"text": "toolingDisplayClick: "
|
|
4186
|
+
},
|
|
4187
|
+
{
|
|
4188
|
+
"kind": "Content",
|
|
4189
|
+
"text": "string"
|
|
4190
|
+
},
|
|
4191
|
+
{
|
|
4192
|
+
"kind": "Content",
|
|
4193
|
+
"text": ";"
|
|
4194
|
+
}
|
|
4195
|
+
],
|
|
4196
|
+
"isReadonly": false,
|
|
4197
|
+
"isOptional": false,
|
|
4198
|
+
"releaseTag": "Public",
|
|
4199
|
+
"name": "toolingDisplayClick",
|
|
4200
|
+
"propertyTypeTokenRange": {
|
|
4201
|
+
"startIndex": 1,
|
|
4202
|
+
"endIndex": 2
|
|
4203
|
+
}
|
|
4177
4204
|
}
|
|
4178
4205
|
],
|
|
4179
4206
|
"extendsTokenRanges": []
|
|
@@ -12970,10 +12970,43 @@
|
|
|
12970
12970
|
],
|
|
12971
12971
|
"name": "createTrackDisplayWire"
|
|
12972
12972
|
},
|
|
12973
|
+
{
|
|
12974
|
+
"kind": "Function",
|
|
12975
|
+
"canonicalReference": "@empathyco/x-components!createTrackRelatedPromptToolingDisplayClickWire:function(1)",
|
|
12976
|
+
"docComment": "/**\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 */\n",
|
|
12977
|
+
"excerptTokens": [
|
|
12978
|
+
{
|
|
12979
|
+
"kind": "Content",
|
|
12980
|
+
"text": "export declare function createTrackRelatedPromptToolingDisplayClickWire(): "
|
|
12981
|
+
},
|
|
12982
|
+
{
|
|
12983
|
+
"kind": "Reference",
|
|
12984
|
+
"text": "Wire",
|
|
12985
|
+
"canonicalReference": "@empathyco/x-components!Wire:type"
|
|
12986
|
+
},
|
|
12987
|
+
{
|
|
12988
|
+
"kind": "Content",
|
|
12989
|
+
"text": "<any>"
|
|
12990
|
+
},
|
|
12991
|
+
{
|
|
12992
|
+
"kind": "Content",
|
|
12993
|
+
"text": ";"
|
|
12994
|
+
}
|
|
12995
|
+
],
|
|
12996
|
+
"fileUrlPath": "src/x-modules/tagging/wiring.ts",
|
|
12997
|
+
"returnTypeTokenRange": {
|
|
12998
|
+
"startIndex": 1,
|
|
12999
|
+
"endIndex": 3
|
|
13000
|
+
},
|
|
13001
|
+
"releaseTag": "Public",
|
|
13002
|
+
"overloadIndex": 1,
|
|
13003
|
+
"parameters": [],
|
|
13004
|
+
"name": "createTrackRelatedPromptToolingDisplayClickWire"
|
|
13005
|
+
},
|
|
12973
13006
|
{
|
|
12974
13007
|
"kind": "Function",
|
|
12975
13008
|
"canonicalReference": "@empathyco/x-components!createTrackToolingAdd2CartWire:function(1)",
|
|
12976
|
-
"docComment": "/**\n * Factory helper to create a wire for the track of the tooling display
|
|
13009
|
+
"docComment": "/**\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 */\n",
|
|
12977
13010
|
"excerptTokens": [
|
|
12978
13011
|
{
|
|
12979
13012
|
"kind": "Content",
|
|
@@ -15903,7 +15936,25 @@
|
|
|
15903
15936
|
},
|
|
15904
15937
|
{
|
|
15905
15938
|
"kind": "Content",
|
|
15906
|
-
"text": "<{\n
|
|
15939
|
+
"text": "<{\n resultFeature: {\n type: "
|
|
15940
|
+
},
|
|
15941
|
+
{
|
|
15942
|
+
"kind": "Reference",
|
|
15943
|
+
"text": "PropType",
|
|
15944
|
+
"canonicalReference": "@vue/runtime-core!PropType:type"
|
|
15945
|
+
},
|
|
15946
|
+
{
|
|
15947
|
+
"kind": "Content",
|
|
15948
|
+
"text": "<"
|
|
15949
|
+
},
|
|
15950
|
+
{
|
|
15951
|
+
"kind": "Reference",
|
|
15952
|
+
"text": "ResultFeature",
|
|
15953
|
+
"canonicalReference": "@empathyco/x-components!ResultFeature:type"
|
|
15954
|
+
},
|
|
15955
|
+
{
|
|
15956
|
+
"kind": "Content",
|
|
15957
|
+
"text": ">;\n required: true;\n };\n ignoreResultClickEvent: {\n type: "
|
|
15907
15958
|
},
|
|
15908
15959
|
{
|
|
15909
15960
|
"kind": "Reference",
|
|
@@ -16038,7 +16089,25 @@
|
|
|
16038
16089
|
},
|
|
16039
16090
|
{
|
|
16040
16091
|
"kind": "Content",
|
|
16041
|
-
"text": "<{\n
|
|
16092
|
+
"text": "<{\n resultFeature: {\n type: "
|
|
16093
|
+
},
|
|
16094
|
+
{
|
|
16095
|
+
"kind": "Reference",
|
|
16096
|
+
"text": "PropType",
|
|
16097
|
+
"canonicalReference": "@vue/runtime-core!PropType:type"
|
|
16098
|
+
},
|
|
16099
|
+
{
|
|
16100
|
+
"kind": "Content",
|
|
16101
|
+
"text": "<"
|
|
16102
|
+
},
|
|
16103
|
+
{
|
|
16104
|
+
"kind": "Reference",
|
|
16105
|
+
"text": "ResultFeature",
|
|
16106
|
+
"canonicalReference": "@empathyco/x-components!ResultFeature:type"
|
|
16107
|
+
},
|
|
16108
|
+
{
|
|
16109
|
+
"kind": "Content",
|
|
16110
|
+
"text": ">;\n required: true;\n };\n ignoreResultClickEvent: {\n type: "
|
|
16042
16111
|
},
|
|
16043
16112
|
{
|
|
16044
16113
|
"kind": "Reference",
|
|
@@ -16137,7 +16206,7 @@
|
|
|
16137
16206
|
"name": "DisplayClickProvider",
|
|
16138
16207
|
"variableTypeTokenRange": {
|
|
16139
16208
|
"startIndex": 1,
|
|
16140
|
-
"endIndex":
|
|
16209
|
+
"endIndex": 62
|
|
16141
16210
|
}
|
|
16142
16211
|
},
|
|
16143
16212
|
{
|
|
@@ -16835,8 +16904,8 @@
|
|
|
16835
16904
|
},
|
|
16836
16905
|
{
|
|
16837
16906
|
"kind": "Reference",
|
|
16838
|
-
"text": "
|
|
16839
|
-
"canonicalReference": "@vue/reactivity!
|
|
16907
|
+
"text": "ComputedRef",
|
|
16908
|
+
"canonicalReference": "@vue/reactivity!ComputedRef:interface"
|
|
16840
16909
|
},
|
|
16841
16910
|
{
|
|
16842
16911
|
"kind": "Content",
|
|
@@ -53562,7 +53631,7 @@
|
|
|
53562
53631
|
},
|
|
53563
53632
|
{
|
|
53564
53633
|
"kind": "Content",
|
|
53565
|
-
"text": "<{\n index: number;\n relatedPromptNextQueries
|
|
53634
|
+
"text": "<{\n index: number;\n relatedPromptNextQueries?: import(\"@empathyco/x-types\")."
|
|
53566
53635
|
},
|
|
53567
53636
|
{
|
|
53568
53637
|
"kind": "Reference",
|
|
@@ -53571,7 +53640,7 @@
|
|
|
53571
53640
|
},
|
|
53572
53641
|
{
|
|
53573
53642
|
"kind": "Content",
|
|
53574
|
-
"text": "[];\n nextQueries: string[];\n suggestionText: string;\n type: string;\n toolingDisplayTagging?: import(\"@empathyco/x-types\")."
|
|
53643
|
+
"text": "[] | undefined;\n nextQueries: string[];\n suggestionText: string;\n type: string;\n toolingDisplayTagging?: import(\"@empathyco/x-types\")."
|
|
53575
53644
|
},
|
|
53576
53645
|
{
|
|
53577
53646
|
"kind": "Reference",
|
|
@@ -53587,6 +53656,15 @@
|
|
|
53587
53656
|
"text": "TaggingRequest",
|
|
53588
53657
|
"canonicalReference": "@empathyco/x-components!TaggingRequest:interface"
|
|
53589
53658
|
},
|
|
53659
|
+
{
|
|
53660
|
+
"kind": "Content",
|
|
53661
|
+
"text": " | undefined;\n toolingDisplayClickTagging?: import(\"@empathyco/x-types\")."
|
|
53662
|
+
},
|
|
53663
|
+
{
|
|
53664
|
+
"kind": "Reference",
|
|
53665
|
+
"text": "TaggingRequest",
|
|
53666
|
+
"canonicalReference": "@empathyco/x-components!TaggingRequest:interface"
|
|
53667
|
+
},
|
|
53590
53668
|
{
|
|
53591
53669
|
"kind": "Content",
|
|
53592
53670
|
"text": " | undefined;\n nextQueriesTagging?: import(\"@empathyco/x-types\")."
|
|
@@ -53877,7 +53955,7 @@
|
|
|
53877
53955
|
"name": "RelatedPromptsTagList",
|
|
53878
53956
|
"variableTypeTokenRange": {
|
|
53879
53957
|
"startIndex": 1,
|
|
53880
|
-
"endIndex":
|
|
53958
|
+
"endIndex": 96
|
|
53881
53959
|
}
|
|
53882
53960
|
},
|
|
53883
53961
|
{
|
|
@@ -76581,6 +76659,34 @@
|
|
|
76581
76659
|
"endIndex": 7
|
|
76582
76660
|
}
|
|
76583
76661
|
},
|
|
76662
|
+
{
|
|
76663
|
+
"kind": "Variable",
|
|
76664
|
+
"canonicalReference": "@empathyco/x-components!trackRelatedPromptToolingDisplayClickWire:var",
|
|
76665
|
+
"docComment": "/**\n * Performs a track of a clicked related prompt.\n *\n * @public\n */\n",
|
|
76666
|
+
"excerptTokens": [
|
|
76667
|
+
{
|
|
76668
|
+
"kind": "Content",
|
|
76669
|
+
"text": "trackRelatedPromptToolingDisplayClickWire: "
|
|
76670
|
+
},
|
|
76671
|
+
{
|
|
76672
|
+
"kind": "Reference",
|
|
76673
|
+
"text": "Wire",
|
|
76674
|
+
"canonicalReference": "@empathyco/x-components!Wire:type"
|
|
76675
|
+
},
|
|
76676
|
+
{
|
|
76677
|
+
"kind": "Content",
|
|
76678
|
+
"text": "<any>"
|
|
76679
|
+
}
|
|
76680
|
+
],
|
|
76681
|
+
"fileUrlPath": "src/x-modules/tagging/wiring.ts",
|
|
76682
|
+
"isReadonly": true,
|
|
76683
|
+
"releaseTag": "Public",
|
|
76684
|
+
"name": "trackRelatedPromptToolingDisplayClickWire",
|
|
76685
|
+
"variableTypeTokenRange": {
|
|
76686
|
+
"startIndex": 1,
|
|
76687
|
+
"endIndex": 3
|
|
76688
|
+
}
|
|
76689
|
+
},
|
|
76584
76690
|
{
|
|
76585
76691
|
"kind": "Variable",
|
|
76586
76692
|
"canonicalReference": "@empathyco/x-components!trackResultClickedWire:var",
|
|
@@ -1805,6 +1805,9 @@ export function createStoreEmitters<Module extends AnyXStoreModule, Emitters ext
|
|
|
1805
1805
|
// @public
|
|
1806
1806
|
export function createTrackDisplayWire(property: keyof Tagging_2): Wire<Taggable>;
|
|
1807
1807
|
|
|
1808
|
+
// @public
|
|
1809
|
+
export function createTrackRelatedPromptToolingDisplayClickWire(): Wire<any>;
|
|
1810
|
+
|
|
1808
1811
|
// @public
|
|
1809
1812
|
export function createTrackToolingAdd2CartWire(): Wire<Taggable>;
|
|
1810
1813
|
|
|
@@ -2069,6 +2072,10 @@ export const DISABLE_ANIMATIONS_KEY: XInjectKey<boolean | undefined>;
|
|
|
2069
2072
|
|
|
2070
2073
|
// @public (undocumented)
|
|
2071
2074
|
export const DisplayClickProvider: DefineComponent< {
|
|
2075
|
+
resultFeature: {
|
|
2076
|
+
type: PropType<ResultFeature>;
|
|
2077
|
+
required: true;
|
|
2078
|
+
};
|
|
2072
2079
|
ignoreResultClickEvent: {
|
|
2073
2080
|
type: BooleanConstructor;
|
|
2074
2081
|
default: boolean;
|
|
@@ -2091,6 +2098,10 @@ default: undefined;
|
|
|
2091
2098
|
}, () => VNode<RendererNode, RendererElement, {
|
|
2092
2099
|
[key: string]: any;
|
|
2093
2100
|
}> | "", unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
2101
|
+
resultFeature: {
|
|
2102
|
+
type: PropType<ResultFeature>;
|
|
2103
|
+
required: true;
|
|
2104
|
+
};
|
|
2094
2105
|
ignoreResultClickEvent: {
|
|
2095
2106
|
type: BooleanConstructor;
|
|
2096
2107
|
default: boolean;
|
|
@@ -2223,7 +2234,7 @@ default: () => DefineComponent< {}, {}, any, ComputedOptions, MethodOptions,
|
|
|
2223
2234
|
}, {
|
|
2224
2235
|
close: () => void;
|
|
2225
2236
|
empathizeRef: Ref<HTMLDivElement | undefined>;
|
|
2226
|
-
hasContent:
|
|
2237
|
+
hasContent: ComputedRef<boolean>;
|
|
2227
2238
|
isOpen: Ref<boolean>;
|
|
2228
2239
|
open: () => void;
|
|
2229
2240
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
@@ -5888,13 +5899,14 @@ onLeave: (el: Element, done: () => void) => void;
|
|
|
5888
5899
|
selectedPromptIndex: ComputedRef<any>;
|
|
5889
5900
|
visibleRelatedPrompts: ComputedRef< {
|
|
5890
5901
|
index: number;
|
|
5891
|
-
relatedPromptNextQueries
|
|
5902
|
+
relatedPromptNextQueries?: RelatedPromptNextQuery[] | undefined;
|
|
5892
5903
|
nextQueries: string[];
|
|
5893
5904
|
suggestionText: string;
|
|
5894
5905
|
type: string;
|
|
5895
5906
|
toolingDisplayTagging?: TaggingRequest | undefined;
|
|
5896
5907
|
tagging?: {
|
|
5897
5908
|
toolingDisplayTagging?: TaggingRequest | undefined;
|
|
5909
|
+
toolingDisplayClickTagging?: TaggingRequest | undefined;
|
|
5898
5910
|
nextQueriesTagging?: RelatedPromptNextQuery[] | undefined;
|
|
5899
5911
|
} | undefined;
|
|
5900
5912
|
modelName: "RelatedPrompt";
|
|
@@ -8286,6 +8298,9 @@ export const taggingWiring: {
|
|
|
8286
8298
|
UserClickedARelatedPromptAdd2Cart: {
|
|
8287
8299
|
trackToolingAdd2CartWire: Wire<Taggable>;
|
|
8288
8300
|
};
|
|
8301
|
+
UserSelectedARelatedPrompt: {
|
|
8302
|
+
trackRelatedPromptToolingDisplayClickWire: Wire<any>;
|
|
8303
|
+
};
|
|
8289
8304
|
};
|
|
8290
8305
|
|
|
8291
8306
|
// @public
|
|
@@ -8375,6 +8390,9 @@ export const trackNoResultsQueryWithSemanticsWireDebounced: Wire<any>;
|
|
|
8375
8390
|
// @public
|
|
8376
8391
|
export const trackQueryWire: Wire<TaggingRequest | TaggingRequest[]>;
|
|
8377
8392
|
|
|
8393
|
+
// @public
|
|
8394
|
+
export const trackRelatedPromptToolingDisplayClickWire: Wire<any>;
|
|
8395
|
+
|
|
8378
8396
|
// @public
|
|
8379
8397
|
export const trackResultClickedWire: Wire<Taggable>;
|
|
8380
8398
|
|
|
@@ -9164,7 +9182,7 @@ export type XStoreModuleOptions<StoreModule extends AnyXStoreModule> = StoreModu
|
|
|
9164
9182
|
// dist/types/components/base-dropdown.vue.d.ts:11:9 - (ae-forgotten-export) The symbol "DropdownItem" needs to be exported by the entry point index.d.ts
|
|
9165
9183
|
// dist/types/components/base-grid.vue.d.ts:45:5 - (ae-forgotten-export) The symbol "GridItem" needs to be exported by the entry point index.d.ts
|
|
9166
9184
|
// dist/types/components/column-picker/base-column-picker-list.vue.d.ts:29:5 - (ae-forgotten-export) The symbol "ColumnPickerItem" needs to be exported by the entry point index.d.ts
|
|
9167
|
-
// dist/types/components/display-click-provider.vue.d.ts:
|
|
9185
|
+
// dist/types/components/display-click-provider.vue.d.ts:14:9 - (ae-forgotten-export) The symbol "TaggingRequest" needs to be exported by the entry point index.d.ts
|
|
9168
9186
|
// dist/types/components/filters/labels/base-price-filter-label.vue.d.ts:13:13 - (ae-forgotten-export) The symbol "RangeValue" needs to be exported by the entry point index.d.ts
|
|
9169
9187
|
// dist/types/components/filters/labels/base-rating-filter-label.vue.d.ts:16:9 - (ae-forgotten-export) The symbol "BooleanFilter" needs to be exported by the entry point index.d.ts
|
|
9170
9188
|
// dist/types/components/global-x-bus.vue.d.ts:38:17 - (ae-forgotten-export) The symbol "ResultVariant" needs to be exported by the entry point index.d.ts
|
package/report/x-types.api.json
CHANGED
|
@@ -4642,7 +4642,7 @@
|
|
|
4642
4642
|
"excerptTokens": [
|
|
4643
4643
|
{
|
|
4644
4644
|
"kind": "Content",
|
|
4645
|
-
"text": "relatedPromptNextQueries
|
|
4645
|
+
"text": "relatedPromptNextQueries?: "
|
|
4646
4646
|
},
|
|
4647
4647
|
{
|
|
4648
4648
|
"kind": "Reference",
|
|
@@ -4659,7 +4659,7 @@
|
|
|
4659
4659
|
}
|
|
4660
4660
|
],
|
|
4661
4661
|
"isReadonly": false,
|
|
4662
|
-
"isOptional":
|
|
4662
|
+
"isOptional": true,
|
|
4663
4663
|
"releaseTag": "Public",
|
|
4664
4664
|
"name": "relatedPromptNextQueries",
|
|
4665
4665
|
"propertyTypeTokenRange": {
|
|
@@ -4712,6 +4712,15 @@
|
|
|
4712
4712
|
"text": "TaggingRequest",
|
|
4713
4713
|
"canonicalReference": "@empathyco/x-types!TaggingRequest:interface"
|
|
4714
4714
|
},
|
|
4715
|
+
{
|
|
4716
|
+
"kind": "Content",
|
|
4717
|
+
"text": ";\n toolingDisplayClickTagging?: "
|
|
4718
|
+
},
|
|
4719
|
+
{
|
|
4720
|
+
"kind": "Reference",
|
|
4721
|
+
"text": "TaggingRequest",
|
|
4722
|
+
"canonicalReference": "@empathyco/x-types!TaggingRequest:interface"
|
|
4723
|
+
},
|
|
4715
4724
|
{
|
|
4716
4725
|
"kind": "Content",
|
|
4717
4726
|
"text": ";\n nextQueriesTagging?: "
|
|
@@ -4736,7 +4745,7 @@
|
|
|
4736
4745
|
"name": "tagging",
|
|
4737
4746
|
"propertyTypeTokenRange": {
|
|
4738
4747
|
"startIndex": 1,
|
|
4739
|
-
"endIndex":
|
|
4748
|
+
"endIndex": 8
|
|
4740
4749
|
}
|
|
4741
4750
|
},
|
|
4742
4751
|
{
|
package/tagging/index.js
CHANGED
|
@@ -3,5 +3,5 @@ export { DefaultPDPAddToCartService } from '../js/x-modules/tagging/service/pdp-
|
|
|
3
3
|
export { track } from '../js/x-modules/tagging/store/actions/track.action.js';
|
|
4
4
|
export { taggingEmitters } from '../js/x-modules/tagging/store/emitters.js';
|
|
5
5
|
export { taggingXStoreModule } from '../js/x-modules/tagging/store/module.js';
|
|
6
|
-
export { createSetQueryTaggingFromQueryPreview, createTrackDisplayWire, createTrackToolingAdd2CartWire, createTrackToolingDisplayWire, createTrackWire, setConsent, setNoResultsTaggingEnabledWire, setQueryTaggingFromQueryPreview, setQueryTaggingInfo, setTaggingConfig, taggingWiring, trackAddToCartWire, trackBannerClickedWire, trackDisplayClickedWire, trackElementDisplayedWire, trackNoResultsQueryWithSemanticsWire, trackNoResultsQueryWithSemanticsWireDebounced, trackQueryWire, trackResultClickedWire, trackToolingAdd2CartWire, trackToolingDisplayClickedWire } from '../js/x-modules/tagging/wiring.js';
|
|
6
|
+
export { createSetQueryTaggingFromQueryPreview, createTrackDisplayWire, createTrackRelatedPromptToolingDisplayClickWire, createTrackToolingAdd2CartWire, createTrackToolingDisplayWire, createTrackWire, setConsent, setNoResultsTaggingEnabledWire, setQueryTaggingFromQueryPreview, setQueryTaggingInfo, setTaggingConfig, taggingWiring, trackAddToCartWire, trackBannerClickedWire, trackDisplayClickedWire, trackElementDisplayedWire, trackNoResultsQueryWithSemanticsWire, trackNoResultsQueryWithSemanticsWireDebounced, trackQueryWire, trackRelatedPromptToolingDisplayClickWire, trackResultClickedWire, trackToolingAdd2CartWire, trackToolingDisplayClickedWire } from '../js/x-modules/tagging/wiring.js';
|
|
7
7
|
export { taggingXModule } from '../js/x-modules/tagging/x-module.js';
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { TaggingRequest } from '@empathyco/x-types';
|
|
2
2
|
import type { PropType } from 'vue';
|
|
3
|
+
import type { ResultFeature } from '../types/index';
|
|
3
4
|
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
resultFeature: {
|
|
6
|
+
type: PropType<ResultFeature>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
4
9
|
ignoreResultClickEvent: {
|
|
5
10
|
type: BooleanConstructor;
|
|
6
11
|
default: boolean;
|
|
@@ -23,6 +28,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
23
28
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
24
29
|
[key: string]: any;
|
|
25
30
|
}> | "", unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
|
+
resultFeature: {
|
|
32
|
+
type: PropType<ResultFeature>;
|
|
33
|
+
required: true;
|
|
34
|
+
};
|
|
26
35
|
ignoreResultClickEvent: {
|
|
27
36
|
type: BooleanConstructor;
|
|
28
37
|
default: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display-click-provider.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../src/components/display-click-provider.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC
|
|
1
|
+
{"version":3,"file":"display-click-provider.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../src/components/display-click-provider.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAKpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEpD,wBA2DG"}
|
|
@@ -24,7 +24,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
24
24
|
}, {
|
|
25
25
|
close: () => void;
|
|
26
26
|
empathizeRef: import("vue").Ref<HTMLDivElement | undefined>;
|
|
27
|
-
hasContent: import("vue").
|
|
27
|
+
hasContent: import("vue").ComputedRef<boolean>;
|
|
28
28
|
isOpen: import("vue").Ref<boolean>;
|
|
29
29
|
open: () => void;
|
|
30
30
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empathize.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/empathize/components/empathize.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACE,OAAO,EAAmB,QAAQ,
|
|
1
|
+
{"version":3,"file":"empathize.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/empathize/components/empathize.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACE,OAAO,EAAmB,QAAQ,EAAiB,MAAM,KAAK,CAAC;AAQ/D;;;;;GAKG;;IAKC,qDAAqD;;;;;IAKrD,sDAAsD;;;;;IAUtD,sEAAsE;;;;;;;;;;;;IAftE,qDAAqD;;;;;IAKrD,sDAAsD;;;;;IAUtD,sEAAsE;;;;;;;;;;AAnB1E,wBAkFG"}
|
|
@@ -60,13 +60,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
60
60
|
selectedPromptIndex: import("vue").ComputedRef<any>;
|
|
61
61
|
visibleRelatedPrompts: import("vue").ComputedRef<{
|
|
62
62
|
index: number;
|
|
63
|
-
relatedPromptNextQueries
|
|
63
|
+
relatedPromptNextQueries?: import("@empathyco/x-types").RelatedPromptNextQuery[] | undefined;
|
|
64
64
|
nextQueries: string[];
|
|
65
65
|
suggestionText: string;
|
|
66
66
|
type: string;
|
|
67
67
|
toolingDisplayTagging?: import("@empathyco/x-types").TaggingRequest | undefined;
|
|
68
68
|
tagging?: {
|
|
69
69
|
toolingDisplayTagging?: import("@empathyco/x-types").TaggingRequest | undefined;
|
|
70
|
+
toolingDisplayClickTagging?: import("@empathyco/x-types").TaggingRequest | undefined;
|
|
70
71
|
nextQueriesTagging?: import("@empathyco/x-types").RelatedPromptNextQuery[] | undefined;
|
|
71
72
|
} | undefined;
|
|
72
73
|
modelName: "RelatedPrompt";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"related-prompts-tag-list.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/related-prompts/components/related-prompts-tag-list.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AAEE,OAAO,EAA6B,QAAQ,EAAc,MAAM,KAAK,CAAC;AAOtE;;;;;;;GAOG;;IAMC;;;;OAIG;;IAEH;;;;OAIG;;;;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;;OAKG;;IAEH;;;;OAIG;;;;;;
|
|
1
|
+
{"version":3,"file":"related-prompts-tag-list.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/related-prompts/components/related-prompts-tag-list.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AAEE,OAAO,EAA6B,QAAQ,EAAc,MAAM,KAAK,CAAC;AAOtE;;;;;;;GAOG;;IAMC;;;;OAIG;;IAEH;;;;OAIG;;;;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;;OAKG;;IAEH;;;;OAIG;;;;;;wBA2LwB,MAAM,KAAG,OAAO;8BA/GV,MAAM,KAAG,IAAI;wBAiEnB,OAAO;kBAeb,OAAO,QAAQ,MAAM,IAAI;kBAkBzB,OAAO,QAAQ,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;IAjN9C;;;;OAIG;;IAEH;;;;OAIG;;;;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;;OAKG;;IAEH;;;;OAIG;;;;;;;;;AAxCP,wBAsPG"}
|
|
@@ -73,6 +73,12 @@ export declare const trackToolingDisplayClickedWire: Wire<Taggable>;
|
|
|
73
73
|
* @public
|
|
74
74
|
*/
|
|
75
75
|
export declare const trackToolingAdd2CartWire: Wire<Taggable>;
|
|
76
|
+
/**
|
|
77
|
+
* Performs a track of a clicked related prompt.
|
|
78
|
+
*
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
81
|
+
export declare const trackRelatedPromptToolingDisplayClickWire: Wire<any>;
|
|
76
82
|
/**
|
|
77
83
|
* Performs a track of a display element appearing.
|
|
78
84
|
*
|
|
@@ -120,13 +126,21 @@ export declare function createTrackDisplayWire(property: keyof Tagging): Wire<Ta
|
|
|
120
126
|
*/
|
|
121
127
|
export declare function createTrackToolingDisplayWire(): Wire<Taggable>;
|
|
122
128
|
/**
|
|
123
|
-
* Factory helper to create a wire for the track of the tooling display
|
|
129
|
+
* Factory helper to create a wire for the track of the tooling display add to cart.
|
|
124
130
|
*
|
|
125
131
|
* @returns A new wire for the tooling display add to cart of the taggable element.
|
|
126
132
|
*
|
|
127
133
|
* @public
|
|
128
134
|
*/
|
|
129
135
|
export declare function createTrackToolingAdd2CartWire(): Wire<Taggable>;
|
|
136
|
+
/**
|
|
137
|
+
* Factory helper to create a wire for the track of the tooling display click in a related prompt.
|
|
138
|
+
*
|
|
139
|
+
* @returns A new wire for the tooling display click of the taggable element.
|
|
140
|
+
*
|
|
141
|
+
* @public
|
|
142
|
+
*/
|
|
143
|
+
export declare function createTrackRelatedPromptToolingDisplayClickWire(): Wire<any>;
|
|
130
144
|
/**
|
|
131
145
|
* Factory helper to create a wire to set the queryTagging.
|
|
132
146
|
*
|
|
@@ -195,5 +209,8 @@ export declare const taggingWiring: {
|
|
|
195
209
|
UserClickedARelatedPromptAdd2Cart: {
|
|
196
210
|
trackToolingAdd2CartWire: Wire<Taggable>;
|
|
197
211
|
};
|
|
212
|
+
UserSelectedARelatedPrompt: {
|
|
213
|
+
trackRelatedPromptToolingDisplayClickWire: Wire<any>;
|
|
214
|
+
};
|
|
198
215
|
};
|
|
199
216
|
//# sourceMappingURL=wiring.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/tagging/wiring.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/tagging/wiring.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAEN,QAAQ,EACR,OAAO,EACP,cAAc,EACf,MAAM,oBAAoB,CAAC;AAS5B,OAAO,EAAuB,IAAI,EAAE,MAAM,2BAA2B,CAAC;AA8EtE;;;;GAIG;AACH,eAAO,MAAM,UAAU,eAA2B,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,uDAA2C,CAAC;AAEvF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,8CAA4B,CAAC;AAE1D;;;;GAIG;AACH,eAAO,MAAM,cAAc,yCAK1B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,sBAa/B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,gBAA0C,CAAC;AAEvF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