@empathyco/x-components 6.1.3 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/ai/index.js +0 -1
- package/core/index.js.map +1 -1
- package/docs/API-reference/api/x-components.aicarousel.md +24 -28
- package/docs/API-reference/api/x-components.aimutations.md +1 -58
- package/docs/API-reference/api/x-components.aimutations.setexcludedresultids.md +1 -1
- package/docs/API-reference/api/x-components.aistate.md +0 -55
- package/docs/API-reference/api/x-components.aixevents.md +3 -3
- package/docs/API-reference/api/{x-components.aixevents.userclickedaioverviewexpandbutton.md → x-components.aixevents.userclickedanaicarouseladd2cart.md} +3 -3
- package/docs/API-reference/api/{x-components.aixevents.userclickedanaioverviewresult.md → x-components.aixevents.userclickedanaicarouselresult.md} +3 -3
- package/docs/API-reference/api/x-components.hierarchicalfilter.md +2 -2
- package/docs/API-reference/api/x-components.md +0 -9
- package/docs/API-reference/api/x-components.simplefilter.md +2 -2
- package/docs/API-reference/api/x-components.snippetcallbacks.md +2 -2
- package/docs/API-reference/components/ai/x-components.ai-carousel.md +9 -7
- package/docs/API-reference/components/ai/x-components.ai-grouped-carousel.md +25 -0
- package/docs/API-reference/components/common/x-components.display-click-provider.md +1 -1
- package/js/components/display-click-provider.vue.js +3 -3
- package/js/components/display-click-provider.vue.js.map +1 -1
- package/js/components/icons/spinner.vue.js +2 -2
- package/js/index.js +0 -1
- package/js/index.js.map +1 -1
- package/js/x-modules/ai/components/ai-carousel.vue.js +121 -66
- package/js/x-modules/ai/components/ai-carousel.vue.js.map +1 -1
- package/js/x-modules/ai/components/ai-carousel.vue2.js +18 -17
- package/js/x-modules/ai/components/ai-carousel.vue2.js.map +1 -1
- package/js/x-modules/ai/components/ai-carousel.vue3.js +1 -1
- package/js/x-modules/ai/components/ai-grouped-carousel.vue.js +68 -0
- package/js/x-modules/ai/components/ai-grouped-carousel.vue.js.map +1 -0
- package/js/x-modules/ai/components/{ai-overview.vue2.js → ai-grouped-carousel.vue2.js} +24 -86
- package/js/x-modules/ai/components/ai-grouped-carousel.vue2.js.map +1 -0
- package/js/x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.js +2 -10
- package/js/x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.js.map +1 -1
- package/js/x-modules/ai/store/module.js +6 -18
- package/js/x-modules/ai/store/module.js.map +1 -1
- package/js/x-modules/tagging/wiring.js +2 -2
- package/js/x-modules/tagging/wiring.js.map +1 -1
- package/package.json +9 -10
- package/report/x-components.api.json +102 -709
- package/report/x-components.api.md +37 -128
- package/types/src/components/snippet-callbacks.vue.d.ts +2 -2
- package/types/src/x-modules/ai/components/ai-carousel.vue.d.ts +24 -28
- package/types/src/x-modules/ai/components/ai-carousel.vue.d.ts.map +1 -1
- package/types/src/x-modules/ai/components/ai-grouped-carousel.vue.d.ts +19 -0
- package/types/src/x-modules/ai/components/ai-grouped-carousel.vue.d.ts.map +1 -0
- package/types/src/x-modules/ai/components/index.d.ts +0 -1
- package/types/src/x-modules/ai/components/index.d.ts.map +1 -1
- package/types/src/x-modules/ai/events.types.d.ts +2 -2
- package/types/src/x-modules/ai/events.types.d.ts.map +1 -1
- package/types/src/x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.d.ts.map +1 -1
- package/types/src/x-modules/ai/store/module.d.ts.map +1 -1
- package/types/src/x-modules/ai/store/types.d.ts +6 -29
- package/types/src/x-modules/ai/store/types.d.ts.map +1 -1
- package/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts +2 -2
- package/types/src/x-modules/facets/components/filters/simple-filter.vue.d.ts +2 -2
- package/types/src/x-modules/tagging/wiring.d.ts +2 -2
- package/docs/API-reference/api/x-components.aimutations.setisnoresults.md +0 -13
- package/docs/API-reference/api/x-components.aimutations.setresponsetext.md +0 -13
- package/docs/API-reference/api/x-components.aimutations.setsuggestiontext.md +0 -13
- package/docs/API-reference/api/x-components.aioverview.md +0 -88
- package/docs/API-reference/api/x-components.aistate.isnoresults.md +0 -13
- package/docs/API-reference/api/x-components.aistate.responsetext.md +0 -13
- package/docs/API-reference/api/x-components.aistate.suggestiontext.md +0 -11
- package/docs/API-reference/components/ai/x-components.ai-overview.md +0 -96
- package/js/x-modules/ai/components/ai-overview.vue.js +0 -267
- package/js/x-modules/ai/components/ai-overview.vue.js.map +0 -1
- package/js/x-modules/ai/components/ai-overview.vue2.js.map +0 -1
- package/js/x-modules/ai/components/ai-overview.vue3.js +0 -7
- package/js/x-modules/ai/components/ai-overview.vue3.js.map +0 -1
- package/types/src/x-modules/ai/components/ai-overview.vue.d.ts +0 -81
- package/types/src/x-modules/ai/components/ai-overview.vue.d.ts.map +0 -1
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { defineComponent, ref, computed, onMounted } from 'vue';
|
|
1
|
+
import { defineComponent } from 'vue';
|
|
3
2
|
import '../../../components/animations/animate-clip-path.vue2.js';
|
|
4
3
|
import '../../../components/animations/animate-scale.vue2.js';
|
|
5
4
|
import '../../../components/animations/animate-translate.vue2.js';
|
|
6
5
|
import '../../../components/animations/animate-width.vue2.js';
|
|
7
6
|
import '../../../components/animations/animate-width.vue3.js';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import '../../../components/animations/change-height.vue2.js';
|
|
8
|
+
import '../../../components/animations/change-height.vue3.js';
|
|
9
|
+
import '../../../components/animations/collapse-height.vue2.js';
|
|
10
|
+
import '../../../components/animations/collapse-height.vue3.js';
|
|
10
11
|
import '../../../components/animations/collapse-width.vue2.js';
|
|
11
12
|
import '../../../components/animations/collapse-width.vue3.js';
|
|
12
13
|
import '../../../components/animations/cross-fade.vue2.js';
|
|
13
14
|
import '../../../components/animations/cross-fade.vue3.js';
|
|
14
15
|
import '../../../components/animations/fade-and-slide.vue2.js';
|
|
15
16
|
import '../../../components/animations/fade-and-slide.vue3.js';
|
|
16
|
-
import
|
|
17
|
+
import '../../../components/animations/fade.vue2.js';
|
|
18
|
+
import '../../../components/animations/fade.vue3.js';
|
|
17
19
|
import '../../../components/animations/no-animation.vue.js';
|
|
18
20
|
import '../../../components/animations/staggered-fade-and-slide.vue2.js';
|
|
19
21
|
import '../../../components/animations/staggered-fade-and-slide.vue3.js';
|
|
@@ -21,7 +23,7 @@ import '../../../components/auto-progress-bar.vue2.js';
|
|
|
21
23
|
import '../../../components/auto-progress-bar.vue3.js';
|
|
22
24
|
import '../../../components/base-dropdown.vue2.js';
|
|
23
25
|
import '../../../components/base-dropdown.vue3.js';
|
|
24
|
-
import
|
|
26
|
+
import '../../../components/base-event-button.vue2.js';
|
|
25
27
|
import '../../../components/base-grid.vue2.js';
|
|
26
28
|
import '../../../components/base-grid.vue3.js';
|
|
27
29
|
import '../../../components/base-keyboard-navigation.vue2.js';
|
|
@@ -37,14 +39,11 @@ import '../../../components/column-picker/base-column-picker-dropdown.vue2.js';
|
|
|
37
39
|
import '../../../components/column-picker/base-column-picker-list.vue2.js';
|
|
38
40
|
import '../../../components/currency/base-currency.vue2.js';
|
|
39
41
|
import _sfc_main$1 from '../../../components/display-click-provider.vue.js';
|
|
40
|
-
import
|
|
42
|
+
import '../../../components/display-emitter.vue.js';
|
|
41
43
|
import '../../../components/filters/labels/base-price-filter-label.vue.js';
|
|
42
44
|
import '../../../components/filters/labels/base-rating-filter-label.vue2.js';
|
|
43
45
|
import '../../../components/global-x-bus.vue.js';
|
|
44
46
|
import '../../../components/highlight.vue2.js';
|
|
45
|
-
import AIStarIcon from '../../../components/icons/ai-star.vue.js';
|
|
46
|
-
import ArrowRightIcon from '../../../components/icons/arrow-right.vue.js';
|
|
47
|
-
import SpinnerIcon from '../../../components/icons/spinner.vue.js';
|
|
48
47
|
import '../../../components/items-list.vue2.js';
|
|
49
48
|
import '../../../components/location-provider.vue.js';
|
|
50
49
|
import '../../../components/modals/base-events-modal-close.vue2.js';
|
|
@@ -83,103 +82,42 @@ import '../../../components/result/result-variant-selector.vue3.js';
|
|
|
83
82
|
import '../../../components/result/result-variants-provider.vue.js';
|
|
84
83
|
import '../../../components/scroll/base-scroll.vue2.js';
|
|
85
84
|
import '@empathyco/x-utils';
|
|
86
|
-
import
|
|
85
|
+
import 'vuex';
|
|
86
|
+
import '../../../plugins/x-bus.js';
|
|
87
|
+
import '../../../plugins/x-plugin.js';
|
|
88
|
+
import 'rxjs';
|
|
87
89
|
import SlidingPanel from '../../../components/sliding-panel.vue.js';
|
|
88
90
|
import '../../../components/snippet-callbacks.vue2.js';
|
|
89
91
|
import '../../../components/suggestions/base-suggestion.vue2.js';
|
|
90
92
|
import '../../../components/suggestions/base-suggestions.vue2.js';
|
|
91
93
|
import '../../../components/suggestions/base-suggestions.vue3.js';
|
|
92
94
|
import '../../../composables/create-use-device.js';
|
|
93
|
-
import 'vuex';
|
|
94
|
-
import '../../../plugins/x-bus.js';
|
|
95
|
-
import '../../../plugins/x-plugin.js';
|
|
96
95
|
import '@vueuse/core';
|
|
97
|
-
import 'rxjs';
|
|
98
96
|
import { useState } from '../../../composables/use-state.js';
|
|
99
|
-
import { typing } from '../../../directives/typing.js';
|
|
100
|
-
import { aiXModule } from '../x-module.js';
|
|
101
97
|
|
|
102
98
|
var _sfc_main = defineComponent({
|
|
103
|
-
directives: {
|
|
104
|
-
typing,
|
|
105
|
-
},
|
|
106
|
-
xModule: aiXModule.name,
|
|
107
99
|
components: {
|
|
108
|
-
AIStarIcon,
|
|
109
|
-
ArrowRightIcon,
|
|
110
|
-
BaseEventButton,
|
|
111
|
-
CollapseHeight,
|
|
112
|
-
ChangeHeight,
|
|
113
|
-
Fade,
|
|
114
|
-
SlidingPanel,
|
|
115
|
-
SpinnerIcon,
|
|
116
|
-
DisplayEmitter: _sfc_main$2,
|
|
117
100
|
DisplayClickProvider: _sfc_main$1,
|
|
101
|
+
SlidingPanel,
|
|
118
102
|
},
|
|
119
103
|
props: {
|
|
120
|
-
/* The text displayed
|
|
121
|
-
title:
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
/* The
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
},
|
|
129
|
-
/* Auto expand the AI Overview when there are queries in AI and no-results in search. */
|
|
130
|
-
autoExpandInSearchNoResults: {
|
|
131
|
-
type: Boolean,
|
|
132
|
-
default: true,
|
|
133
|
-
},
|
|
134
|
-
/* The classes added to the parsed response text container. */
|
|
135
|
-
contentClasses: {
|
|
136
|
-
type: String,
|
|
137
|
-
},
|
|
138
|
-
/* The classes added to each sliding panel for each query. */
|
|
139
|
-
slidingPanelsClasses: {
|
|
140
|
-
type: String,
|
|
141
|
-
},
|
|
142
|
-
/* The classes added to each sliding panel container of each query. */
|
|
143
|
-
slidingPanelContainersClasses: {
|
|
144
|
-
type: String,
|
|
145
|
-
},
|
|
146
|
-
/* The classes added to each sliding panel button of each query. */
|
|
147
|
-
slidingPanelButtonsClasses: {
|
|
148
|
-
type: String,
|
|
149
|
-
},
|
|
104
|
+
/* The title text displayed */
|
|
105
|
+
title: String,
|
|
106
|
+
/* The classes added to the sliding panel. */
|
|
107
|
+
slidingPanelClasses: String,
|
|
108
|
+
/* The classes added to the sliding panel container. */
|
|
109
|
+
slidingPanelContainerClasses: String,
|
|
110
|
+
/* The classes added to the sliding panel buttons. */
|
|
111
|
+
slidingPanelButtonsClasses: String,
|
|
150
112
|
},
|
|
151
113
|
setup() {
|
|
152
|
-
const
|
|
153
|
-
const { suggestionText, responseText, suggestionsSearch, suggestionsStatus, tagging, isNoResults, queries, query, } = useState('ai');
|
|
154
|
-
const emptyTaggingRequest = { url: '', params: {} };
|
|
155
|
-
const aiOverviewRef = ref(null);
|
|
156
|
-
const expanded = ref(false);
|
|
157
|
-
const shouldAnimateSuggestion = ref(true);
|
|
158
|
-
const parsedResponseText = computed(() => marked.parse(responseText.value));
|
|
159
|
-
const suggestionsLoading = computed(() => suggestionsStatus.value !== 'success' && suggestionsStatus.value !== 'error');
|
|
160
|
-
$x.on('AiSuggestionsRequestUpdated', false).subscribe(() => {
|
|
161
|
-
expanded.value = false;
|
|
162
|
-
shouldAnimateSuggestion.value = true;
|
|
163
|
-
});
|
|
164
|
-
onMounted(() => {
|
|
165
|
-
$x.emit('AiComponentMounted', undefined, { feature: 'overview' });
|
|
166
|
-
});
|
|
114
|
+
const { suggestionsSearch, tagging } = useState('ai');
|
|
167
115
|
return {
|
|
168
|
-
aiOverviewRef,
|
|
169
|
-
emptyTaggingRequest,
|
|
170
|
-
expanded,
|
|
171
|
-
parsedResponseText,
|
|
172
|
-
suggestionsLoading,
|
|
173
116
|
suggestionsSearch,
|
|
174
|
-
suggestionText,
|
|
175
|
-
shouldAnimateSuggestion,
|
|
176
|
-
query,
|
|
177
117
|
tagging,
|
|
178
|
-
isNoResults,
|
|
179
|
-
queries,
|
|
180
118
|
};
|
|
181
119
|
},
|
|
182
120
|
});
|
|
183
121
|
|
|
184
122
|
export { _sfc_main as default };
|
|
185
|
-
//# sourceMappingURL=ai-
|
|
123
|
+
//# sourceMappingURL=ai-grouped-carousel.vue2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-grouped-carousel.vue2.js","sources":["../../../../../src/x-modules/ai/components/ai-grouped-carousel.vue"],"sourcesContent":["<template>\n <SlidingPanel\n :class=\"slidingPanelClasses\"\n :scroll-container-class=\"slidingPanelContainerClasses\"\n :button-class=\"slidingPanelButtonsClasses\"\n :reset-on-content-change=\"false\"\n >\n <template #sliding-panel-addons=\"{ arrivedState }\">\n <slot name=\"sliding-panels-addons\" :arrived-state=\"arrivedState\" />\n </template>\n <template #sliding-panel-left-button>\n <slot name=\"sliding-panels-left-button\" />\n </template>\n <template #sliding-panel-right-button>\n <slot name=\"sliding-panels-right-button\" />\n </template>\n <ul class=\"x-ai-carousel-suggestion-results\">\n <DisplayClickProvider\n v-for=\"suggestion in suggestionsSearch\"\n :key=\"suggestion.query\"\n :tooling-display-tagging=\"tagging?.searchQueries[suggestion.query].toolingDisplayClick\"\n :tooling-add2-cart-tagging=\"tagging?.searchQueries[suggestion.query].toolingDisplayAdd2Cart\"\n result-feature=\"ai_carousel\"\n >\n <li\n v-for=\"result in suggestion.results\"\n :key=\"result.id\"\n data-test=\"ai-carousel-suggestion-result\"\n >\n <!-- @slot (required) result card -->\n <slot name=\"result\" :result=\"result\" />\n </li>\n </DisplayClickProvider>\n </ul>\n </SlidingPanel>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue'\nimport { DisplayClickProvider, SlidingPanel } from '../../../components'\nimport { useState } from '../../../composables'\n\nexport default defineComponent({\n components: {\n DisplayClickProvider,\n SlidingPanel,\n },\n props: {\n /* The title text displayed */\n title: String,\n /* The classes added to the sliding panel. */\n slidingPanelClasses: String,\n /* The classes added to the sliding panel container. */\n slidingPanelContainerClasses: String,\n /* The classes added to the sliding panel buttons. */\n slidingPanelButtonsClasses: String,\n },\n setup() {\n const { suggestionsSearch, tagging } = useState('ai')\n\n return {\n suggestionsSearch,\n tagging,\n }\n },\n})\n</script>\n"],"names":["DisplayClickProvider"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,gBAAe,eAAe,CAAC;AAC7B,IAAA,UAAU,EAAE;8BACVA,WAAoB;QACpB,YAAY;AACb,KAAA;AACD,IAAA,KAAK,EAAE;;AAEL,QAAA,KAAK,EAAE,MAAM;;AAEb,QAAA,mBAAmB,EAAE,MAAM;;AAE3B,QAAA,4BAA4B,EAAE,MAAM;;AAEpC,QAAA,0BAA0B,EAAE,MAAM;AACnC,KAAA;IACD,KAAK,GAAA;QACH,MAAM,EAAE,iBAAiB,EAAE,OAAM,EAAE,GAAI,QAAQ,CAAC,IAAI,CAAA;QAEpD,OAAO;YACL,iBAAiB;YACjB,OAAO;SACT;IACF,CAAC;AACF,CAAA,CAAA;;;;"}
|
|
@@ -27,8 +27,8 @@ const fetchAndSaveAiSuggestions = async ({ commit }, request) => {
|
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
};
|
|
30
|
-
function mapTaggingData(
|
|
31
|
-
const { toolingDisplay, toolingDisplayClick, searchQueries } =
|
|
30
|
+
function mapTaggingData(taggingData) {
|
|
31
|
+
const { toolingDisplay, toolingDisplayClick, searchQueries } = taggingData.tagging[0];
|
|
32
32
|
// TODO: Using the getTaggingInfoFromUrl util here is a temporary solution.
|
|
33
33
|
// It creates a dependency with the x-adapter-platform project that should be avoided.
|
|
34
34
|
return {
|
|
@@ -62,14 +62,6 @@ function readAnswer(reader, commit) {
|
|
|
62
62
|
continue;
|
|
63
63
|
const raw = line.startsWith('data:') ? line.slice(5).trim() : line.trim();
|
|
64
64
|
const data = JSON.parse(raw);
|
|
65
|
-
if ('suggestionText' in data) {
|
|
66
|
-
commit('setIsNoResults', false);
|
|
67
|
-
commit('setSuggestionText', data.suggestionText);
|
|
68
|
-
}
|
|
69
|
-
if ('responseText' in data) {
|
|
70
|
-
commit('setIsNoResults', false);
|
|
71
|
-
commit('setResponseText', data.responseText);
|
|
72
|
-
}
|
|
73
65
|
if ('queries' in data) {
|
|
74
66
|
commit('setQueries', data.queries);
|
|
75
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-ai-suggestions.action.js","sources":["../../../../../../src/x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.ts"],"sourcesContent":["import type { AiSuggestionQuery, AiSuggestionTagging } from '@empathyco/x-types'\nimport type { AiActionContext, AiXStoreModule } from '../types'\nimport { getTaggingInfoFromUrl } from '@empathyco/x-adapter-platform'\nimport { XPlugin } from '../../../../plugins'\n\ninterface TaggingData {\n tagging: {\n toolingDisplay: string\n toolingDisplayClick: string\n searchQueries: Record<\n string,\n {\n toolingDisplay: string\n toolingDisplayClick: string\n toolingDisplayAdd2Cart: string\n }\n >\n }[]\n}\n\ntype AnswerData
|
|
1
|
+
{"version":3,"file":"fetch-and-save-ai-suggestions.action.js","sources":["../../../../../../src/x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.ts"],"sourcesContent":["import type { AiSuggestionQuery, AiSuggestionTagging } from '@empathyco/x-types'\nimport type { AiActionContext, AiXStoreModule } from '../types'\nimport { getTaggingInfoFromUrl } from '@empathyco/x-adapter-platform'\nimport { XPlugin } from '../../../../plugins'\n\ninterface TaggingData {\n tagging: {\n toolingDisplay: string\n toolingDisplayClick: string\n searchQueries: Record<\n string,\n {\n toolingDisplay: string\n toolingDisplayClick: string\n toolingDisplayAdd2Cart: string\n }\n >\n }[]\n}\n\ntype AnswerData = { queries: AiSuggestionQuery[] } | TaggingData\n\n/**\n * Default implementation for the {@link AiActions.fetchAndSaveAiSuggestions}.\n *\n * @param _ - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n * @param request - The AI request to make.\n * @returns The AI response.\n * @public\n */\nexport const fetchAndSaveAiSuggestions: AiXStoreModule['actions']['fetchAndSaveAiSuggestions'] =\n async ({ commit }, request) => {\n if (!request) {\n return\n }\n commit('setSuggestionsStatus', 'loading')\n\n return XPlugin.adapter.aiSuggestions(request).then(({ body, status }) => {\n if (status !== 200) {\n return\n }\n if (body) {\n const reader = body.getReader()\n readAnswer(reader, commit)\n }\n })\n }\n\nfunction mapTaggingData(taggingData: TaggingData): AiSuggestionTagging {\n const { toolingDisplay, toolingDisplayClick, searchQueries } = taggingData.tagging[0]\n // TODO: Using the getTaggingInfoFromUrl util here is a temporary solution.\n // It creates a dependency with the x-adapter-platform project that should be avoided.\n return {\n toolingDisplay: getTaggingInfoFromUrl(toolingDisplay),\n toolingDisplayClick: getTaggingInfoFromUrl(toolingDisplayClick),\n searchQueries: Object.fromEntries(\n Object.entries(searchQueries).map(\n ([query, { toolingDisplay, toolingDisplayClick, toolingDisplayAdd2Cart }]) => [\n query,\n {\n toolingDisplay: getTaggingInfoFromUrl(toolingDisplay),\n toolingDisplayClick: getTaggingInfoFromUrl(toolingDisplayClick),\n toolingDisplayAdd2Cart: getTaggingInfoFromUrl(toolingDisplayAdd2Cart),\n },\n ],\n ),\n ),\n }\n}\n\nfunction readAnswer(\n reader: ReadableStreamDefaultReader<Uint8Array>,\n commit: AiActionContext['commit'],\n): void {\n reader\n .read()\n .then(({ value, done }) => {\n if (done) {\n commit('setSuggestionsStatus', 'success')\n return\n }\n\n const result = new TextDecoder().decode(value, { stream: true })\n const parts = result.split('\\n\\n')\n for (const part of parts) {\n const lines = part.split('\\n')\n\n for (const line of lines) {\n // line.length check to avoid event lines or empty lines\n if (line.length <= 5 || line.startsWith('event:')) continue\n\n const raw = line.startsWith('data:') ? line.slice(5).trim() : line.trim()\n const data = JSON.parse(raw) as AnswerData\n\n if ('queries' in data) {\n commit('setQueries', data.queries)\n }\n if ('tagging' in data) {\n commit('setTagging', mapTaggingData(data))\n }\n }\n }\n readAnswer(reader, commit)\n })\n .catch((error: { code: number }) => {\n commit('setSuggestionsStatus', 'error')\n // AbortError code === 20\n if (error.code !== 20) {\n console.error(error)\n }\n })\n}\n"],"names":[],"mappings":";;;;;AAsBA;;;;;;;;AAQG;AACI,MAAM,yBAAyB,GACpC,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,KAAI;IAC5B,IAAI,CAAC,OAAO,EAAE;QACZ;IACF;AACA,IAAA,MAAM,CAAC,sBAAsB,EAAE,SAAS,CAAC;AAEzC,IAAA,OAAO,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAI;AACtE,QAAA,IAAI,MAAM,KAAK,GAAG,EAAE;YAClB;QACF;QACA,IAAI,IAAI,EAAE;AACR,YAAA,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE;AAC/B,YAAA,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC;QAC5B;AACF,IAAA,CAAC,CAAC;AACJ;AAEF,SAAS,cAAc,CAAC,WAAwB,EAAA;AAC9C,IAAA,MAAM,EAAE,cAAc,EA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,CAAC,QAAQ,CAAC;oBAAE;gBAEnD,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE;gBACzE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAe;AAE1C,gBAAA,IAAI,SAAS,IAAI,IAAI,EAAE;AACrB,oBAAA,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC;gBACpC;AACA,gBAAA,IAAI,SAAS,IAAI,IAAI,EAAE;oBACrB,MAAM,CAAC,YAAY,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC;gBAC5C;YACF;QACF;AACA,QAAA,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC;AAC5B,IAAA,CAAC;AACA,SAAA,KAAK,CAAC,CAAC,KAAuB,KAAI;AACjC,QAAA,MAAM,CAAC,sBAAsB,EAAE,OAAO,CAAC;;AAEvC,QAAA,IAAI,KAAK,CAAC,IAAI,KAAK,EAAE,EAAE;AACrB,YAAA,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;QACtB;AACF,IAAA,CAAC,CAAC;AACN;;;;"}
|
|
@@ -27,6 +27,9 @@ const aiXStoreModule = {
|
|
|
27
27
|
origin: null,
|
|
28
28
|
relatedTags: [],
|
|
29
29
|
searchTotalResults: 0,
|
|
30
|
+
excludeOptions: {
|
|
31
|
+
resultIds: [],
|
|
32
|
+
},
|
|
30
33
|
}),
|
|
31
34
|
getters: {
|
|
32
35
|
suggestionsRequest,
|
|
@@ -34,18 +37,9 @@ const aiXStoreModule = {
|
|
|
34
37
|
},
|
|
35
38
|
mutations: {
|
|
36
39
|
/* Streamed fields */
|
|
37
|
-
setResponseText: (state, responseText) => {
|
|
38
|
-
state.responseText = responseText;
|
|
39
|
-
},
|
|
40
|
-
setSuggestionText: (state, suggestionText) => {
|
|
41
|
-
state.suggestionText = suggestionText;
|
|
42
|
-
},
|
|
43
40
|
setQueries: (state, queries) => {
|
|
44
41
|
state.queries = queries;
|
|
45
42
|
},
|
|
46
|
-
setExcludedResultIds: (state, resultIds) => {
|
|
47
|
-
state.excludeOptions.resultIds = resultIds;
|
|
48
|
-
},
|
|
49
43
|
setTagging: (state, tagging) => {
|
|
50
44
|
state.tagging = tagging;
|
|
51
45
|
},
|
|
@@ -59,6 +53,9 @@ const aiXStoreModule = {
|
|
|
59
53
|
setSuggestionsSearchStatus: (state, status) => {
|
|
60
54
|
state.suggestionsSearchStatus = status;
|
|
61
55
|
},
|
|
56
|
+
setExcludedResultIds: (state, resultIds) => {
|
|
57
|
+
state.excludeOptions.resultIds = resultIds;
|
|
58
|
+
},
|
|
62
59
|
setQuery,
|
|
63
60
|
setParams(state, params) {
|
|
64
61
|
state.params = params;
|
|
@@ -72,9 +69,6 @@ const aiXStoreModule = {
|
|
|
72
69
|
setAiRelatedTags(state, relatedTags) {
|
|
73
70
|
state.relatedTags = relatedTags;
|
|
74
71
|
},
|
|
75
|
-
setIsNoResults(state, isNoResults) {
|
|
76
|
-
state.isNoResults = isNoResults;
|
|
77
|
-
},
|
|
78
72
|
setSelectedFilters(state, selectedFilters) {
|
|
79
73
|
state.selectedFilters = groupItemsBy(selectedFilters, filter => isFacetFilter(filter) ? filter.facetId : UNKNOWN_FACET_KEY);
|
|
80
74
|
},
|
|
@@ -101,17 +95,11 @@ const aiXStoreModule = {
|
|
|
101
95
|
*/
|
|
102
96
|
function resettableAiState() {
|
|
103
97
|
return {
|
|
104
|
-
responseText: '',
|
|
105
|
-
suggestionText: '',
|
|
106
98
|
queries: [],
|
|
107
|
-
excludeOptions: {
|
|
108
|
-
resultIds: [],
|
|
109
|
-
},
|
|
110
99
|
tagging: undefined,
|
|
111
100
|
suggestionsSearch: [],
|
|
112
101
|
suggestionsStatus: 'initial',
|
|
113
102
|
suggestionsSearchStatus: 'initial',
|
|
114
|
-
isNoResults: true,
|
|
115
103
|
};
|
|
116
104
|
}
|
|
117
105
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sources":["../../../../../src/x-modules/ai/store/module.ts"],"sourcesContent":["import type { AiSuggestionQuery, AiSuggestionSearch, Result } from '@empathyco/x-types'\nimport type { RequestStatus } from '../../../store/utils/status-store.utils'\nimport type { AiState, AiXStoreModule } from './types'\nimport { isFacetFilter } from '@empathyco/x-types'\nimport { mergeConfig, setConfig } from '../../../store/utils/config-store.utils'\nimport { setQuery } from '../../../store/utils/query.utils'\nimport { groupItemsBy } from '../../../utils/array'\nimport { UNKNOWN_FACET_KEY } from '../../facets/store/constants'\nimport { fetchAndSaveAiSuggestionsSearch } from './actions/fetch-and-save-ai-suggestions-search.action'\nimport { fetchAndSaveAiSuggestions } from './actions/fetch-and-save-ai-suggestions.action'\nimport { saveOrigin } from './actions/save-origin.action'\nimport { setUrlParams } from './actions/set-url-params.action'\nimport {\n aiSuggestionsRequest as suggestionsRequest,\n aiSuggestionsSearchRequest as suggestionsSearchRequest,\n} from './getters'\n\n/**\n * {@link XStoreModule} For the ai module.\n *\n * @internal\n */\nexport const aiXStoreModule: AiXStoreModule = {\n state: () => ({\n ...resettableAiState(),\n selectedFilters: {},\n query: '',\n config: {\n lowResultsThreshold: 50,\n },\n params: {},\n origin: null,\n relatedTags: [],\n searchTotalResults: 0,\n }),\n getters: {\n suggestionsRequest,\n suggestionsSearchRequest,\n },\n mutations: {\n /* Streamed fields */\n
|
|
1
|
+
{"version":3,"file":"module.js","sources":["../../../../../src/x-modules/ai/store/module.ts"],"sourcesContent":["import type { AiSuggestionQuery, AiSuggestionSearch, Result } from '@empathyco/x-types'\nimport type { RequestStatus } from '../../../store/utils/status-store.utils'\nimport type { AiState, AiXStoreModule } from './types'\nimport { isFacetFilter } from '@empathyco/x-types'\nimport { mergeConfig, setConfig } from '../../../store/utils/config-store.utils'\nimport { setQuery } from '../../../store/utils/query.utils'\nimport { groupItemsBy } from '../../../utils/array'\nimport { UNKNOWN_FACET_KEY } from '../../facets/store/constants'\nimport { fetchAndSaveAiSuggestionsSearch } from './actions/fetch-and-save-ai-suggestions-search.action'\nimport { fetchAndSaveAiSuggestions } from './actions/fetch-and-save-ai-suggestions.action'\nimport { saveOrigin } from './actions/save-origin.action'\nimport { setUrlParams } from './actions/set-url-params.action'\nimport {\n aiSuggestionsRequest as suggestionsRequest,\n aiSuggestionsSearchRequest as suggestionsSearchRequest,\n} from './getters'\n\n/**\n * {@link XStoreModule} For the ai module.\n *\n * @internal\n */\nexport const aiXStoreModule: AiXStoreModule = {\n state: () => ({\n ...resettableAiState(),\n selectedFilters: {},\n query: '',\n config: {\n lowResultsThreshold: 50,\n },\n params: {},\n origin: null,\n relatedTags: [],\n searchTotalResults: 0,\n excludeOptions: {\n resultIds: [],\n },\n }),\n getters: {\n suggestionsRequest,\n suggestionsSearchRequest,\n },\n mutations: {\n /* Streamed fields */\n setQueries: (state, queries: AiSuggestionQuery[]) => {\n state.queries = queries\n },\n setTagging: (state, tagging) => {\n state.tagging = tagging\n },\n /* END Streamed fields */\n setSuggestionsSearch: (state, suggestionsSearch: AiSuggestionSearch[]) => {\n state.suggestionsSearch = suggestionsSearch\n },\n setSuggestionsStatus: (state, status: RequestStatus) => {\n state.suggestionsStatus = status\n },\n setSuggestionsSearchStatus: (state, status: RequestStatus) => {\n state.suggestionsSearchStatus = status\n },\n setExcludedResultIds: (state, resultIds: Result['id'][]) => {\n state.excludeOptions.resultIds = resultIds\n },\n setQuery,\n setParams(state, params) {\n state.params = params\n },\n setOrigin(state, origin = null) {\n state.origin = origin\n },\n resetAiState(state) {\n Object.assign(state, resettableAiState())\n },\n setAiRelatedTags(state, relatedTags) {\n state.relatedTags = relatedTags\n },\n setSelectedFilters(state, selectedFilters) {\n state.selectedFilters = groupItemsBy(selectedFilters, filter =>\n isFacetFilter(filter) ? filter.facetId : UNKNOWN_FACET_KEY,\n )\n },\n setSearchTotalResults(state, totalResults) {\n state.searchTotalResults = totalResults\n },\n setConfig,\n mergeConfig,\n },\n actions: {\n fetchAndSaveAiSuggestions,\n fetchAndSaveAiSuggestionsSearch,\n setUrlParams,\n saveOrigin,\n },\n}\n\n/**\n * Function to return the \"resettable\" part of the state. This will be used in the `resetState`\n * mutation to reset to the initial state.\n *\n * @returns The \"resettable\" part of the {@link AiState}.\n *\n * @internal\n */\nfunction resettableAiState() {\n return {\n queries: [],\n tagging: undefined,\n suggestionsSearch: [],\n suggestionsStatus: 'initial' as RequestStatus,\n suggestionsSearchStatus: 'initial' as RequestStatus,\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAiBA;;;;AAIG;AACI,MAAM,cAAc,GAAmB;AAC5C,IAAA,KAAK,EAAE,OAAO;AACZ,QAAA,GAAG,iBAAiB,EAAE;AACtB,QAAA,eAAe,EAAE,EAAE;AACnB,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,MAAM,EAAE;AACN,YAAA,mBAAmB,EAAE,EAAE;AACxB,SAAA;AACD,QAAA,MAAM,EAAE,EAAE;AACV,QAAA,MAAM,EAAE,IAAI;AACZ,QAAA,WAAW,EAAE,EAAE;AACf,QAAA,kBAAkB,EAAE,CAAC;AACrB,QAAA,cAAc,EAAE;AACd,YAAA,SAAS,EAAE,EAAE;AACd,SAAA;KACF,CAAC;AACF,IAAA,OAAO,EAAE;QACP,kBAAkB;QAClB,wBAAwB;AACzB,KAAA;AACD,IAAA,SAAS,EAAE;;AAET,QAAA,UAAU,EAAE,CAAC,KAAK,EAAE,OAA4B,KAAI;AAClD,YAAA,KAAK,CAAC,OAAO,GAAG,OAAO;QACzB,CAAC;AACD,QAAA,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,KAAI;AAC7B,YAAA,KAAK,CAAC,OAAO,GAAG,OAAO;QACzB,CAAC;;AAED,QAAA,oBAAoB,EAAE,CAAC,KAAK,EAAE,iBAAuC,KAAI;AACvE,YAAA,KAAK,CAAC,iBAAiB,GAAG,iBAAiB;QAC7C,CAAC;AACD,QAAA,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,OAAO;AACL,QAAA,OAAO,EAAE,EAAE;AACX,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,iBAAiB,EAAE,EAAE;AACrB,QAAA,iBAAiB,EAAE,SAA0B;AAC7C,QAAA,uBAAuB,EAAE,SAA0B;KACpD;AACH;;;;"}
|
|
@@ -403,10 +403,10 @@ const taggingWiring = createWiring({
|
|
|
403
403
|
AiSuggestionsSearchChanged: {
|
|
404
404
|
trackAiSuggestionsSearchWire,
|
|
405
405
|
},
|
|
406
|
-
|
|
406
|
+
UserClickedAnAiCarouselResult: {
|
|
407
407
|
trackToolingDisplayClickedWire,
|
|
408
408
|
},
|
|
409
|
-
|
|
409
|
+
UserClickedAnAiCarouselAdd2Cart: {
|
|
410
410
|
trackToolingAdd2CartWire,
|
|
411
411
|
},
|
|
412
412
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/tagging/wiring.ts"],"sourcesContent":["import type {\n AiSuggestionSearch,\n RelatedPrompt,\n Result,\n SemanticQuery,\n Taggable,\n Tagging,\n TaggingRequest,\n} from '@empathyco/x-types'\nimport type { FeatureLocation } from '../../types/index'\nimport type { DisplayWireMetadata, Wire } from '../../wiring/wiring.types'\nimport { DefaultSessionService } from '@empathyco/x-utils'\nimport { createOrigin } from '../../utils/index'\nimport { namespacedWireCommit, namespacedWireDispatch } from '../../wiring/namespaced-wires.factory'\nimport { namespacedDebounce } from '../../wiring/namespaced-wires.operators'\nimport { wireService, wireServiceWithoutPayload } from '../../wiring/wires.factory'\nimport { filter, mapWire } from '../../wiring/wires.operators'\nimport { createWiring } from '../../wiring/wiring.utils'\nimport { DefaultExternalTaggingService } from './service/external-tagging.service'\n\n/**\n * `tagging` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'tagging'\n\n/**\n * Debounce function for the module.\n */\nconst moduleDebounce = namespacedDebounce(moduleName)\n\n/**\n * WireCommit for {@link TaggingXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit(moduleName)\n\n/**\n * WireDispatch for {@link TaggingXModule}.\n *\n * @internal\n */\nconst wireDispatch = namespacedWireDispatch(moduleName)\n\n/**\n * Wires without payload factory for {@link DefaultSessionService}.\n */\nconst wireSessionServiceWithoutPayload = wireServiceWithoutPayload(DefaultSessionService.instance)\n\n/**\n * Wires factory for {@link DefaultExternalTaggingService}.\n */\nconst wireExternalTaggingService = wireService(DefaultExternalTaggingService.instance)\n\n/**\n * Stores the given result on the local storage.\n *\n * @public\n */\nconst storeClickedResultWire = wireExternalTaggingService('storeResultClicked')\n\n/**\n * Stores the result added to cart on the local storage.\n *\n * @public\n */\nconst storeAddToCartWire = wireExternalTaggingService('storeAddToCart')\n\n/**\n * Moves the result information from the local storage to session storage.\n *\n * @public\n */\nconst moveClickedResultToSessionWire = mapWire(\n wireExternalTaggingService('moveToSessionStorage'),\n (payload: string) => {\n return payload === 'url' ? undefined : payload\n },\n)\n\n/**\n * Triggers the add to cart tracking.\n *\n * @public\n */\nconst trackAddToCartFromSessionStorage = wireExternalTaggingService('trackAddToCart')\n\n/**\n * Clears the session id.\n *\n * @public\n */\nconst clearSessionWire = filter(\n wireSessionServiceWithoutPayload('clearSessionId'),\n ({ eventPayload: consent }) => !consent,\n)\n\n/**\n * Sets the tagging state `consent`.\n *\n * @public\n */\nexport const setConsent = wireCommit('setConsent')\n\n/**\n * Sets the tagging state `noResultsTaggingEnabled`.\n *\n * @public\n */\nexport const setNoResultsTaggingEnabledWire = wireCommit('setNoResultsTaggingEnabled')\n\n/**\n * Sets the tagging config state.\n *\n * @public\n */\nexport const setTaggingConfig = wireCommit('mergeConfig')\n\n/**\n * Tracks the tagging of the query.\n *\n * @public\n */\nexport const trackQueryWire = filter(\n wireDispatch('track'),\n ({ eventPayload, store }) =>\n ((eventPayload as TaggingRequest).params.totalHits as number) > 0 ||\n !store.state.x.tagging.noResultsTaggingEnabled,\n)\n\n/**\n * Sets the tagging state of the query tagging info using a debounce which ends if the user\n * accepts a query.\n *\n * @public\n */\nexport const setQueryTaggingInfo = moduleDebounce(\n wireCommit('setQueryTaggingInfo'),\n ({ state }) => state.config.queryTaggingDebounceMs,\n {\n cancelOn: 'UserClearedQuery',\n forceOn: [\n 'UserClickedAResult',\n 'UserClickedAPromoted',\n 'UserClickedABanner',\n 'UserClickedARedirection',\n 'UserReachedResultsListEnd',\n ],\n },\n)\n\n/**\n * Sets the tagging state of the query tagging info using.\n *\n * @public\n */\nexport const setQueryTaggingFromQueryPreview = createSetQueryTaggingFromQueryPreview()\n\n/**\n * Tracks the tagging of the result.\n *\n * @public\n */\nexport const trackResultClickedWire = createTrackWire('click')\n\n/**\n * Tracks the tagging of the banner.\n *\n * @public\n */\nexport const trackBannerClickedWire = createTrackWire('click')\n\n/**\n * Tracks the click on a promoted result.\n *\n * @public\n */\nexport const trackPromotedClickedWire = createTrackWire('click')\n\n/**\n * Performs a track of a result added to the cart.\n *\n * @public\n */\nexport const trackAddToCartWire = createTrackWire('add2cart')\n\n/**\n * Performs a track of a display result being clicked.\n *\n * @public\n */\nexport const trackDisplayClickedWire = createTrackDisplayWire('displayClick')\n\n/**\n * Performs a track of a display result being clicked.\n *\n * @public\n */\nexport const trackToolingDisplayClickedWire = createTrackToolingDisplayWire()\n\n/**\n * Performs a track of a display result being clicked.\n *\n * @public\n */\nexport const trackToolingAdd2CartWire = createTrackToolingAdd2CartWire()\n\n/**\n * Performs a track of a clicked related prompt.\n *\n * @public\n */\nexport const trackRelatedPromptToolingDisplayClickWire =\n createTrackRelatedPromptToolingDisplayClickWire()\n\n/**\n * Performs a track of a display element appearing.\n *\n * @public\n */\nexport const trackElementDisplayedWire = createTrackDisplayWire('display')\n\n/**\n * Factory helper to create a wire for the track of a taggable element.\n *\n * @param property - Key of the tagging object to track.\n * @returns A new wire for the given property of the taggable element.\n *\n * @public\n */\nexport function createTrackWire(property: keyof Tagging): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload: { tagging }, metadata: { location } }) => {\n const taggingInfo: TaggingRequest = tagging[property]\n taggingInfo.params.location = location as string\n return taggingInfo\n }),\n ({ eventPayload: { tagging }, metadata: { ignoreInModules } }) =>\n // eslint-disable-next-line ts/no-unsafe-member-access\n !!tagging?.[property] && !ignoreInModules?.includes(moduleName),\n )\n}\n\n/**\n * Performs a track of a query with no results that used related prompts or semantic queries as fallback.\n * The totalHits will be changed to -1 if related prompts or semantic queries are found in order to differentiate\n * it from scenarios where the user encounters a no-results page without any related prompts or semantic queries.\n *\n * @public\n */\nexport const trackNoResultsQueryWithFallbackWire = filter(\n wireDispatch('track', ({ eventPayload, state }) => {\n const { queryTaggingInfo } = state\n const totalHits = (eventPayload as RelatedPrompt[] | SemanticQuery[]).length > 0 ? -1 : 0\n return {\n params: { ...queryTaggingInfo?.params, totalHits },\n url: queryTaggingInfo?.url ?? '',\n }\n }),\n ({ store }) => Number(store.state.x.tagging.queryTaggingInfo?.params.totalHits) === 0,\n)\n\n/**.\n * Debounced version of {@link trackNoResultsQueryWithFallbackWire}\n *\n * @public\n */\nexport const trackNoResultsQueryWithFallbackWireDebounced = moduleDebounce(\n trackNoResultsQueryWithFallbackWire,\n ({ state }) => state.config.queryTaggingDebounceMs,\n { cancelOn: ['QueryPreviewUnmounted', 'RelatedPromptsUnmounted'] },\n)\n\n/**\n * Performs a track of a query with no results that used semantic queries as fallback.\n * The totalHits will be changed to -1 if semantic queries are found in order to differentiate\n * it from scenarios where the user encounters a no-results page without any semantic queries.\n *\n * @public\n * @deprecated - Use {@link trackNoResultsQueryWithFallbackWire} instead.\n */\nexport const trackNoResultsQueryWithSemanticsWire = trackNoResultsQueryWithFallbackWire\n\n/**\n * Debounced version of {@link trackNoResultsQueryWithFallbackWire}\n *\n * @public\n * @deprecated - Use {@link trackNoResultsQueryWithFallbackWireDebounced} instead.\n */\nexport const trackNoResultsQueryWithSemanticsWireDebounced =\n trackNoResultsQueryWithFallbackWireDebounced\n\n/**\n * Factory helper to create a wire for the track of the display click.\n *\n * @param property - Key of the tagging object to track.\n * @returns A new wire for the display click of the taggable element.\n *\n * @public\n */\nexport function createTrackDisplayWire(property: keyof Tagging): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload: { tagging }, metadata }) => {\n const taggingInfo: TaggingRequest = tagging[property]\n const location = metadata.location as FeatureLocation\n\n taggingInfo.params.location = location\n taggingInfo.params.displayFamily = createOrigin({\n feature: metadata.feature,\n location,\n })!\n taggingInfo.params.q = (metadata as DisplayWireMetadata).displayOriginalQuery\n\n return taggingInfo\n }),\n // eslint-disable-next-line ts/no-unsafe-member-access\n ({ eventPayload: { tagging } }) => !!tagging?.[property]?.url,\n )\n}\n\n/**\n * Update the tooling tagging params with the result information.\n *\n * @param taggingRequest - The tooling tagging request to be updated.\n * @param result - The clicked result.\n * @returns The tagging request updated.\n *\n * @internal\n */\nfunction updateToolingTaggingWithResult(\n taggingRequest: TaggingRequest,\n result: Result,\n): TaggingRequest {\n taggingRequest.params.productId = result.id\n taggingRequest.params.title = result.name!\n taggingRequest.params.url = result.url!\n\n return taggingRequest\n}\n\n/**\n * Factory helper to create a wire for the track of the tooling display click.\n *\n * @returns A new wire for the tooling display click of the taggable element.\n *\n * @public\n */\nexport function createTrackToolingDisplayWire(): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload, metadata }) => {\n const taggingInfo: TaggingRequest = metadata.toolingTagging as TaggingRequest\n const resultInfo = eventPayload as Result\n\n updateToolingTaggingWithResult(taggingInfo, resultInfo)\n\n return taggingInfo\n }),\n ({ metadata }) => !!metadata?.toolingTagging,\n )\n}\n\n/**\n * Factory helper to create a wire for the track of the tooling display add to cart.\n *\n * @returns A new wire for the tooling display add to cart of the taggable element.\n *\n * @public\n */\nexport function createTrackToolingAdd2CartWire(): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload, metadata }) => {\n const taggingInfo: TaggingRequest = metadata.toolingAdd2CartTagging as TaggingRequest\n const resultInfo = eventPayload as Result\n\n updateToolingTaggingWithResult(taggingInfo, resultInfo)\n\n return taggingInfo\n }),\n ({ metadata }) => !!metadata?.toolingAdd2CartTagging,\n )\n}\n\n/**\n * Factory helper to create a wire for the track of the tooling display click in a related prompt.\n *\n * @returns A new wire for the tooling display click of the taggable element.\n *\n * @public\n */\nexport function createTrackRelatedPromptToolingDisplayClickWire() {\n return filter(\n wireDispatch('track', ({ metadata }) => {\n const relatedPrompt = metadata.relatedPrompt as RelatedPrompt\n const taggingInfo = relatedPrompt.tagging!.toolingDisplayClickTagging as TaggingRequest\n\n taggingInfo.params.productId = 'EXPAND'\n taggingInfo.params.title = relatedPrompt.suggestionText\n taggingInfo.params.url = 'none'\n\n return taggingInfo\n }),\n ({ metadata }) => {\n const relatedPrompt = metadata.relatedPrompt as RelatedPrompt | undefined\n const isUnselected = metadata?.selectedPrompt === -1\n const taggingInfo = relatedPrompt?.tagging?.toolingDisplayClickTagging\n return isUnselected && !!taggingInfo\n },\n )\n}\n\n/**\n * Factory helper to create a wire to set the queryTagging.\n *\n * @returns A new wire for the query of a result of a queryPreview.\n *\n * @public\n */\nexport function createSetQueryTaggingFromQueryPreview(): Wire<Taggable> {\n return filter(\n wireCommit(\n 'setQueryTaggingInfo',\n ({ metadata: { queryTagging } }) => queryTagging as TaggingRequest,\n ),\n ({ metadata: { queryTagging } }) => !!queryTagging,\n )\n}\n\n/**\n * Tracks query tagging of the AI suggestions-search.\n * @public\n */\nexport const trackAiSuggestionsSearchWire = wireDispatch('track', ({ eventPayload }) =>\n (eventPayload as AiSuggestionSearch[]).map(({ tagging }) => tagging.query),\n)\n\n/**\n * Wiring configuration for the {@link TaggingXModule | tagging module}.\n *\n * @internal\n */\nexport const taggingWiring = createWiring({\n ConsentProvided: {\n setConsent,\n },\n ConsentChanged: {\n clearSessionWire,\n },\n PDPIsLoaded: {\n moveClickedResultToSessionWire,\n },\n ResultURLTrackingEnabled: {\n moveClickedResultToSessionWire,\n },\n SearchTaggingChanged: {\n setQueryTaggingInfo,\n },\n SearchTaggingReceived: {\n trackQueryWire,\n },\n TrackableElementDisplayed: {\n trackElementDisplayedWire,\n },\n TaggingConfigProvided: {\n setTaggingConfig,\n },\n UserClickedAResult: {\n trackResultClickedWire,\n storeClickedResultWire,\n },\n UserClickedResultAddToCart: {\n trackAddToCartWire,\n trackResultClickedWire,\n storeAddToCartWire,\n },\n UserClickedPDPAddToCart: {\n trackAddToCartFromSessionStorage,\n },\n UserClickedABanner: {\n trackBannerClickedWire,\n },\n UserClickedAPromoted: {\n trackPromotedClickedWire,\n },\n UserClickedADisplayResult: {\n trackDisplayClickedWire,\n setQueryTaggingFromQueryPreview,\n },\n SemanticQueriesResponseChanged: {\n trackNoResultsQueryWithFallbackWireDebounced,\n },\n RelatedPromptsResponseChanged: {\n trackNoResultsQueryWithFallbackWireDebounced,\n },\n ModuleRegistered: {\n setNoResultsTaggingEnabledWire,\n },\n UserClickedARelatedPromptResult: {\n trackToolingDisplayClickedWire,\n },\n UserClickedARelatedPromptAdd2Cart: {\n trackToolingAdd2CartWire,\n },\n UserSelectedARelatedPrompt: {\n trackRelatedPromptToolingDisplayClickWire,\n },\n AiSuggestionsSearchChanged: {\n trackAiSuggestionsSearchWire,\n },\n UserClickedAnAiOverviewResult: {\n trackToolingDisplayClickedWire,\n },\n UserClickedAnAiOverviewAdd2Cart: {\n trackToolingAdd2CartWire,\n },\n})\n"],"names":[],"mappings":";;;;;;;;;;AAoBA;;;;AAIG;AACH,MAAM,UAAU,GAAG,SAAS;AAE5B;;AAEG;AACH,MAAM,cAAc,GAAG,kBAAkB,CAAC,UAAU,CAAC;AAErD;;;;AAIG;AACH,MAAM,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC;AAEnD;;;;AAIG;AACH,MAAM,YAAY,GAAG,sBAAsB,CAAC,UAAU,CAAC;AAEvD;;AAEG;AACH,MAAM,gCAAgC,GAAG,yBAAyB,CAAC,qBAAqB,CAAC,QAAQ,CAAC;AAElG;;AAEG;AACH,MAAM,0BAA0B,GAAG,WAAW,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A8B;AAC/B,KAAA;AACD,IAAA,+BAA+B,EAAE;QAC/B,wBAAwB;AACzB,KAAA;AACF,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/tagging/wiring.ts"],"sourcesContent":["import type {\n AiSuggestionSearch,\n RelatedPrompt,\n Result,\n SemanticQuery,\n Taggable,\n Tagging,\n TaggingRequest,\n} from '@empathyco/x-types'\nimport type { FeatureLocation } from '../../types/index'\nimport type { DisplayWireMetadata, Wire } from '../../wiring/wiring.types'\nimport { DefaultSessionService } from '@empathyco/x-utils'\nimport { createOrigin } from '../../utils/index'\nimport { namespacedWireCommit, namespacedWireDispatch } from '../../wiring/namespaced-wires.factory'\nimport { namespacedDebounce } from '../../wiring/namespaced-wires.operators'\nimport { wireService, wireServiceWithoutPayload } from '../../wiring/wires.factory'\nimport { filter, mapWire } from '../../wiring/wires.operators'\nimport { createWiring } from '../../wiring/wiring.utils'\nimport { DefaultExternalTaggingService } from './service/external-tagging.service'\n\n/**\n * `tagging` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'tagging'\n\n/**\n * Debounce function for the module.\n */\nconst moduleDebounce = namespacedDebounce(moduleName)\n\n/**\n * WireCommit for {@link TaggingXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit(moduleName)\n\n/**\n * WireDispatch for {@link TaggingXModule}.\n *\n * @internal\n */\nconst wireDispatch = namespacedWireDispatch(moduleName)\n\n/**\n * Wires without payload factory for {@link DefaultSessionService}.\n */\nconst wireSessionServiceWithoutPayload = wireServiceWithoutPayload(DefaultSessionService.instance)\n\n/**\n * Wires factory for {@link DefaultExternalTaggingService}.\n */\nconst wireExternalTaggingService = wireService(DefaultExternalTaggingService.instance)\n\n/**\n * Stores the given result on the local storage.\n *\n * @public\n */\nconst storeClickedResultWire = wireExternalTaggingService('storeResultClicked')\n\n/**\n * Stores the result added to cart on the local storage.\n *\n * @public\n */\nconst storeAddToCartWire = wireExternalTaggingService('storeAddToCart')\n\n/**\n * Moves the result information from the local storage to session storage.\n *\n * @public\n */\nconst moveClickedResultToSessionWire = mapWire(\n wireExternalTaggingService('moveToSessionStorage'),\n (payload: string) => {\n return payload === 'url' ? undefined : payload\n },\n)\n\n/**\n * Triggers the add to cart tracking.\n *\n * @public\n */\nconst trackAddToCartFromSessionStorage = wireExternalTaggingService('trackAddToCart')\n\n/**\n * Clears the session id.\n *\n * @public\n */\nconst clearSessionWire = filter(\n wireSessionServiceWithoutPayload('clearSessionId'),\n ({ eventPayload: consent }) => !consent,\n)\n\n/**\n * Sets the tagging state `consent`.\n *\n * @public\n */\nexport const setConsent = wireCommit('setConsent')\n\n/**\n * Sets the tagging state `noResultsTaggingEnabled`.\n *\n * @public\n */\nexport const setNoResultsTaggingEnabledWire = wireCommit('setNoResultsTaggingEnabled')\n\n/**\n * Sets the tagging config state.\n *\n * @public\n */\nexport const setTaggingConfig = wireCommit('mergeConfig')\n\n/**\n * Tracks the tagging of the query.\n *\n * @public\n */\nexport const trackQueryWire = filter(\n wireDispatch('track'),\n ({ eventPayload, store }) =>\n ((eventPayload as TaggingRequest).params.totalHits as number) > 0 ||\n !store.state.x.tagging.noResultsTaggingEnabled,\n)\n\n/**\n * Sets the tagging state of the query tagging info using a debounce which ends if the user\n * accepts a query.\n *\n * @public\n */\nexport const setQueryTaggingInfo = moduleDebounce(\n wireCommit('setQueryTaggingInfo'),\n ({ state }) => state.config.queryTaggingDebounceMs,\n {\n cancelOn: 'UserClearedQuery',\n forceOn: [\n 'UserClickedAResult',\n 'UserClickedAPromoted',\n 'UserClickedABanner',\n 'UserClickedARedirection',\n 'UserReachedResultsListEnd',\n ],\n },\n)\n\n/**\n * Sets the tagging state of the query tagging info using.\n *\n * @public\n */\nexport const setQueryTaggingFromQueryPreview = createSetQueryTaggingFromQueryPreview()\n\n/**\n * Tracks the tagging of the result.\n *\n * @public\n */\nexport const trackResultClickedWire = createTrackWire('click')\n\n/**\n * Tracks the tagging of the banner.\n *\n * @public\n */\nexport const trackBannerClickedWire = createTrackWire('click')\n\n/**\n * Tracks the click on a promoted result.\n *\n * @public\n */\nexport const trackPromotedClickedWire = createTrackWire('click')\n\n/**\n * Performs a track of a result added to the cart.\n *\n * @public\n */\nexport const trackAddToCartWire = createTrackWire('add2cart')\n\n/**\n * Performs a track of a display result being clicked.\n *\n * @public\n */\nexport const trackDisplayClickedWire = createTrackDisplayWire('displayClick')\n\n/**\n * Performs a track of a display result being clicked.\n *\n * @public\n */\nexport const trackToolingDisplayClickedWire = createTrackToolingDisplayWire()\n\n/**\n * Performs a track of a display result being clicked.\n *\n * @public\n */\nexport const trackToolingAdd2CartWire = createTrackToolingAdd2CartWire()\n\n/**\n * Performs a track of a clicked related prompt.\n *\n * @public\n */\nexport const trackRelatedPromptToolingDisplayClickWire =\n createTrackRelatedPromptToolingDisplayClickWire()\n\n/**\n * Performs a track of a display element appearing.\n *\n * @public\n */\nexport const trackElementDisplayedWire = createTrackDisplayWire('display')\n\n/**\n * Factory helper to create a wire for the track of a taggable element.\n *\n * @param property - Key of the tagging object to track.\n * @returns A new wire for the given property of the taggable element.\n *\n * @public\n */\nexport function createTrackWire(property: keyof Tagging): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload: { tagging }, metadata: { location } }) => {\n const taggingInfo: TaggingRequest = tagging[property]\n taggingInfo.params.location = location as string\n return taggingInfo\n }),\n ({ eventPayload: { tagging }, metadata: { ignoreInModules } }) =>\n // eslint-disable-next-line ts/no-unsafe-member-access\n !!tagging?.[property] && !ignoreInModules?.includes(moduleName),\n )\n}\n\n/**\n * Performs a track of a query with no results that used related prompts or semantic queries as fallback.\n * The totalHits will be changed to -1 if related prompts or semantic queries are found in order to differentiate\n * it from scenarios where the user encounters a no-results page without any related prompts or semantic queries.\n *\n * @public\n */\nexport const trackNoResultsQueryWithFallbackWire = filter(\n wireDispatch('track', ({ eventPayload, state }) => {\n const { queryTaggingInfo } = state\n const totalHits = (eventPayload as RelatedPrompt[] | SemanticQuery[]).length > 0 ? -1 : 0\n return {\n params: { ...queryTaggingInfo?.params, totalHits },\n url: queryTaggingInfo?.url ?? '',\n }\n }),\n ({ store }) => Number(store.state.x.tagging.queryTaggingInfo?.params.totalHits) === 0,\n)\n\n/**.\n * Debounced version of {@link trackNoResultsQueryWithFallbackWire}\n *\n * @public\n */\nexport const trackNoResultsQueryWithFallbackWireDebounced = moduleDebounce(\n trackNoResultsQueryWithFallbackWire,\n ({ state }) => state.config.queryTaggingDebounceMs,\n { cancelOn: ['QueryPreviewUnmounted', 'RelatedPromptsUnmounted'] },\n)\n\n/**\n * Performs a track of a query with no results that used semantic queries as fallback.\n * The totalHits will be changed to -1 if semantic queries are found in order to differentiate\n * it from scenarios where the user encounters a no-results page without any semantic queries.\n *\n * @public\n * @deprecated - Use {@link trackNoResultsQueryWithFallbackWire} instead.\n */\nexport const trackNoResultsQueryWithSemanticsWire = trackNoResultsQueryWithFallbackWire\n\n/**\n * Debounced version of {@link trackNoResultsQueryWithFallbackWire}\n *\n * @public\n * @deprecated - Use {@link trackNoResultsQueryWithFallbackWireDebounced} instead.\n */\nexport const trackNoResultsQueryWithSemanticsWireDebounced =\n trackNoResultsQueryWithFallbackWireDebounced\n\n/**\n * Factory helper to create a wire for the track of the display click.\n *\n * @param property - Key of the tagging object to track.\n * @returns A new wire for the display click of the taggable element.\n *\n * @public\n */\nexport function createTrackDisplayWire(property: keyof Tagging): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload: { tagging }, metadata }) => {\n const taggingInfo: TaggingRequest = tagging[property]\n const location = metadata.location as FeatureLocation\n\n taggingInfo.params.location = location\n taggingInfo.params.displayFamily = createOrigin({\n feature: metadata.feature,\n location,\n })!\n taggingInfo.params.q = (metadata as DisplayWireMetadata).displayOriginalQuery\n\n return taggingInfo\n }),\n // eslint-disable-next-line ts/no-unsafe-member-access\n ({ eventPayload: { tagging } }) => !!tagging?.[property]?.url,\n )\n}\n\n/**\n * Update the tooling tagging params with the result information.\n *\n * @param taggingRequest - The tooling tagging request to be updated.\n * @param result - The clicked result.\n * @returns The tagging request updated.\n *\n * @internal\n */\nfunction updateToolingTaggingWithResult(\n taggingRequest: TaggingRequest,\n result: Result,\n): TaggingRequest {\n taggingRequest.params.productId = result.id\n taggingRequest.params.title = result.name!\n taggingRequest.params.url = result.url!\n\n return taggingRequest\n}\n\n/**\n * Factory helper to create a wire for the track of the tooling display click.\n *\n * @returns A new wire for the tooling display click of the taggable element.\n *\n * @public\n */\nexport function createTrackToolingDisplayWire(): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload, metadata }) => {\n const taggingInfo: TaggingRequest = metadata.toolingTagging as TaggingRequest\n const resultInfo = eventPayload as Result\n\n updateToolingTaggingWithResult(taggingInfo, resultInfo)\n\n return taggingInfo\n }),\n ({ metadata }) => !!metadata?.toolingTagging,\n )\n}\n\n/**\n * Factory helper to create a wire for the track of the tooling display add to cart.\n *\n * @returns A new wire for the tooling display add to cart of the taggable element.\n *\n * @public\n */\nexport function createTrackToolingAdd2CartWire(): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload, metadata }) => {\n const taggingInfo: TaggingRequest = metadata.toolingAdd2CartTagging as TaggingRequest\n const resultInfo = eventPayload as Result\n\n updateToolingTaggingWithResult(taggingInfo, resultInfo)\n\n return taggingInfo\n }),\n ({ metadata }) => !!metadata?.toolingAdd2CartTagging,\n )\n}\n\n/**\n * Factory helper to create a wire for the track of the tooling display click in a related prompt.\n *\n * @returns A new wire for the tooling display click of the taggable element.\n *\n * @public\n */\nexport function createTrackRelatedPromptToolingDisplayClickWire() {\n return filter(\n wireDispatch('track', ({ metadata }) => {\n const relatedPrompt = metadata.relatedPrompt as RelatedPrompt\n const taggingInfo = relatedPrompt.tagging!.toolingDisplayClickTagging as TaggingRequest\n\n taggingInfo.params.productId = 'EXPAND'\n taggingInfo.params.title = relatedPrompt.suggestionText\n taggingInfo.params.url = 'none'\n\n return taggingInfo\n }),\n ({ metadata }) => {\n const relatedPrompt = metadata.relatedPrompt as RelatedPrompt | undefined\n const isUnselected = metadata?.selectedPrompt === -1\n const taggingInfo = relatedPrompt?.tagging?.toolingDisplayClickTagging\n return isUnselected && !!taggingInfo\n },\n )\n}\n\n/**\n * Factory helper to create a wire to set the queryTagging.\n *\n * @returns A new wire for the query of a result of a queryPreview.\n *\n * @public\n */\nexport function createSetQueryTaggingFromQueryPreview(): Wire<Taggable> {\n return filter(\n wireCommit(\n 'setQueryTaggingInfo',\n ({ metadata: { queryTagging } }) => queryTagging as TaggingRequest,\n ),\n ({ metadata: { queryTagging } }) => !!queryTagging,\n )\n}\n\n/**\n * Tracks query tagging of the AI suggestions-search.\n * @public\n */\nexport const trackAiSuggestionsSearchWire = wireDispatch('track', ({ eventPayload }) =>\n (eventPayload as AiSuggestionSearch[]).map(({ tagging }) => tagging.query),\n)\n\n/**\n * Wiring configuration for the {@link TaggingXModule | tagging module}.\n *\n * @internal\n */\nexport const taggingWiring = createWiring({\n ConsentProvided: {\n setConsent,\n },\n ConsentChanged: {\n clearSessionWire,\n },\n PDPIsLoaded: {\n moveClickedResultToSessionWire,\n },\n ResultURLTrackingEnabled: {\n moveClickedResultToSessionWire,\n },\n SearchTaggingChanged: {\n setQueryTaggingInfo,\n },\n SearchTaggingReceived: {\n trackQueryWire,\n },\n TrackableElementDisplayed: {\n trackElementDisplayedWire,\n },\n TaggingConfigProvided: {\n setTaggingConfig,\n },\n UserClickedAResult: {\n trackResultClickedWire,\n storeClickedResultWire,\n },\n UserClickedResultAddToCart: {\n trackAddToCartWire,\n trackResultClickedWire,\n storeAddToCartWire,\n },\n UserClickedPDPAddToCart: {\n trackAddToCartFromSessionStorage,\n },\n UserClickedABanner: {\n trackBannerClickedWire,\n },\n UserClickedAPromoted: {\n trackPromotedClickedWire,\n },\n UserClickedADisplayResult: {\n trackDisplayClickedWire,\n setQueryTaggingFromQueryPreview,\n },\n SemanticQueriesResponseChanged: {\n trackNoResultsQueryWithFallbackWireDebounced,\n },\n RelatedPromptsResponseChanged: {\n trackNoResultsQueryWithFallbackWireDebounced,\n },\n ModuleRegistered: {\n setNoResultsTaggingEnabledWire,\n },\n UserClickedARelatedPromptResult: {\n trackToolingDisplayClickedWire,\n },\n UserClickedARelatedPromptAdd2Cart: {\n trackToolingAdd2CartWire,\n },\n UserSelectedARelatedPrompt: {\n trackRelatedPromptToolingDisplayClickWire,\n },\n AiSuggestionsSearchChanged: {\n trackAiSuggestionsSearchWire,\n },\n UserClickedAnAiCarouselResult: {\n trackToolingDisplayClickedWire,\n },\n UserClickedAnAiCarouselAdd2Cart: {\n trackToolingAdd2CartWire,\n },\n})\n"],"names":[],"mappings":";;;;;;;;;;AAoBA;;;;AAIG;AACH,MAAM,UAAU,GAAG,SAAS;AAE5B;;AAEG;AACH,MAAM,cAAc,GAAG,kBAAkB,CAAC,UAAU,CAAC;AAErD;;;;AAIG;AACH,MAAM,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC;AAEnD;;;;AAIG;AACH,MAAM,YAAY,GAAG,sBAAsB,CAAC,UAAU,CAAC;AAEvD;;AAEG;AACH,MAAM,gCAAgC,GAAG,yBAAyB,CAAC,qBAAqB,CAAC,QAAQ,CAAC;AAElG;;AAEG;AACH,MAAM,0BAA0B,GAAG,WAAW,CAAC,6BAA6B,CAAC,QAAQ,CAAC;AAEtF;;;;AAIG;AACH,MAAM,sBAAsB,GAAG,0BAA0B,CAAC,oBAAoB,CAAC;AAE/E;;;;AAIG;AACH,MAAM,kBAAkB,GAAG,0BAA0B,CAAC,gBAAgB,CAAC;AAEvE;;;;AAIG;AACH,MAAM,8BAA8B,GAAG,OAAO,CAC5C,0BAA0B,CAAC,sBAAsB,CAAC,EAClD,CAAC,OAAe,KAAI;IAClB,OAAO,OAAO,KAAK,KAAK,GAAG,SAAS,GAAG,OAAO;AAChD,CAAC,CACF;AAED;;;;AAIG;AACH,MAAM,gCAAgC,GAAG,0BAA0B,CAAC,gBAAgB,CAAC;AAErF;;;;AAIG;AAC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jB,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,sBAAsB;QACtB,sBAAsB;AACvB,KAAA;AACD,IAAA,0BAA0B,EAAE;QAC1B,kBAAkB;QAClB,sBAAsB;QACtB,kBAAkB;AACnB,KAAA;AACD,IAAA,uBAAuB,EAAE;QACvB,gCAAgC;AACjC,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,sBAAsB;AACvB,KAAA;AACD,IAAA,oBAAoB,EAAE;QACpB,wBAAwB;AACzB,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,uBAAuB;QACvB,+BAA+B;AAChC,KAAA;AACD,IAAA,8BAA8B,EAAE;QAC9B,4CAA4C;AAC7C,KAAA;AACD,IAAA,6BAA6B,EAAE;QAC7B,4CAA4C;AAC7C,KAAA;AACD,IAAA,gBAAgB,EAAE;QAChB,8BAA8B;AAC/B,KAAA;AACD,IAAA,+BAA+B,EAAE;QAC/B,8BAA8B;AAC/B,KAAA;AACD,IAAA,iCAAiC,EAAE;QACjC,wBAAwB;AACzB,KAAA;AACD,IAAA,0BAA0B,EAAE;QAC1B,yCAAyC;AAC1C,KAAA;AACD,IAAA,0BAA0B,EAAE;QAC1B,4BAA4B;AAC7B,KAAA;AACD,IAAA,6BAA6B,EAAE;QAC7B,8BAA8B;AAC/B,KAAA;AACD,IAAA,+BAA+B,EAAE;QAC/B,wBAAwB;AACzB,KAAA;AACF,CAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empathyco/x-components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"description": "Empathy X Components",
|
|
5
5
|
"author": "Empathy Systems Corporation S.L.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"prepublishOnly": "pnpm run build"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"vue": "^3.5.
|
|
66
|
+
"vue": "^3.5.34",
|
|
67
67
|
"vuex": "4.0.2"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
@@ -74,22 +74,21 @@
|
|
|
74
74
|
"@vue/devtools-api": "~6.6.4",
|
|
75
75
|
"@vueuse/core": "~12.8.2",
|
|
76
76
|
"js-md5": "~0.8.3",
|
|
77
|
-
"marked": "~17.0.6",
|
|
78
77
|
"nouislider": "~15.8.1",
|
|
79
78
|
"rxjs": "~7.8.2",
|
|
80
79
|
"tslib": "~2.8.1",
|
|
81
80
|
"vue-global-events": "~3.0.1",
|
|
82
|
-
"vue-tsc": "~3.2.
|
|
81
|
+
"vue-tsc": "~3.2.8"
|
|
83
82
|
},
|
|
84
83
|
"devDependencies": {
|
|
85
|
-
"@babel/preset-env": "7.29.
|
|
86
|
-
"@empathyco/x-design-system": "1.0.
|
|
84
|
+
"@babel/preset-env": "7.29.5",
|
|
85
|
+
"@empathyco/x-design-system": "1.0.5",
|
|
87
86
|
"@microsoft/api-documenter": "7.30.5",
|
|
88
87
|
"@microsoft/api-extractor": "7.58.7",
|
|
89
88
|
"@tailwindcss/vite": "4.2.4",
|
|
90
89
|
"@testing-library/vue": "8.1.0",
|
|
91
90
|
"@types/aria-query": "5.0.4",
|
|
92
|
-
"@types/node": "24.12.
|
|
91
|
+
"@types/node": "24.12.3",
|
|
93
92
|
"@vitejs/plugin-vue": "5.2.4",
|
|
94
93
|
"@vitest/browser": "4.1.5",
|
|
95
94
|
"@vitest/ui": "4.1.5",
|
|
@@ -97,7 +96,7 @@
|
|
|
97
96
|
"convert-source-map": "2.0.0",
|
|
98
97
|
"esbuild": "0.28.0",
|
|
99
98
|
"jsdom": "29.1.1",
|
|
100
|
-
"rollup": "4.60.
|
|
99
|
+
"rollup": "4.60.3",
|
|
101
100
|
"rollup-plugin-copy": "3.5.0",
|
|
102
101
|
"rollup-plugin-delete": "2.2.0",
|
|
103
102
|
"rollup-plugin-styles": "4.0.0",
|
|
@@ -109,7 +108,7 @@
|
|
|
109
108
|
"vite": "6.4.2",
|
|
110
109
|
"vite-plugin-vue-inspector": "5.4.0",
|
|
111
110
|
"vitest": "4.1.5",
|
|
112
|
-
"vue": "3.5.
|
|
111
|
+
"vue": "3.5.34",
|
|
113
112
|
"vue-docgen-cli": "4.79.0",
|
|
114
113
|
"vue-router": "4.6.4",
|
|
115
114
|
"vuex": "4.0.2"
|
|
@@ -118,5 +117,5 @@
|
|
|
118
117
|
"access": "public",
|
|
119
118
|
"directory": "dist"
|
|
120
119
|
},
|
|
121
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "224c2769be86c8a79b7d9078fb8a989d0b64a065"
|
|
122
121
|
}
|