@empathyco/x-components 8.7.0 → 8.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/docs/API-reference/api/x-adapter-platform.browseresultschema.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformtagging.browseadd2cart.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformtagging.browsecheckout.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformtagging.browseproduct.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformtagging.displaybrowseproduct.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformtagging.md +68 -0
- package/docs/API-reference/api/x-components.hierarchicalfilter.md +1 -0
- package/docs/API-reference/api/x-components.md +22 -0
- package/docs/API-reference/api/x-components.setbrowsetagginginfo.md +13 -0
- package/docs/API-reference/api/x-components.simplefilter.md +1 -0
- package/docs/API-reference/api/x-components.snippetcallbacks.md +1 -0
- package/docs/API-reference/api/x-components.taggingmutations.md +19 -0
- package/docs/API-reference/api/x-components.taggingmutations.setbrowsetagginginfo.md +13 -0
- package/docs/API-reference/api/x-components.taggingstate.browsetagginginfo.md +13 -0
- package/docs/API-reference/api/x-components.taggingstate.md +19 -0
- package/docs/API-reference/api/x-components.taggingxevents.browsetaggingreceived.md +13 -0
- package/docs/API-reference/api/x-components.taggingxevents.md +19 -0
- package/docs/API-reference/api/x-components.trackbrowsewire.md +13 -0
- package/js/index.js +1 -1
- package/js/x-modules/tagging/store/emitters.js +1 -0
- package/js/x-modules/tagging/store/emitters.js.map +1 -1
- package/js/x-modules/tagging/store/module.js +4 -0
- package/js/x-modules/tagging/store/module.js.map +1 -1
- package/js/x-modules/tagging/wiring.js +30 -1
- package/js/x-modules/tagging/wiring.js.map +1 -1
- package/package.json +3 -3
- package/report/x-adapter-platform.api.json +158 -0
- package/report/x-components.api.json +218 -3
- package/report/x-components.api.md +20 -1
- package/tagging/index.js +1 -1
- package/types/src/components/snippet-callbacks.vue.d.ts +1 -0
- package/types/src/components/snippet-callbacks.vue.d.ts.map +1 -1
- package/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts +1 -0
- package/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts.map +1 -1
- package/types/src/x-modules/facets/components/filters/simple-filter.vue.d.ts +1 -0
- package/types/src/x-modules/facets/components/filters/simple-filter.vue.d.ts.map +1 -1
- package/types/src/x-modules/tagging/events.types.d.ts +5 -0
- package/types/src/x-modules/tagging/events.types.d.ts.map +1 -1
- package/types/src/x-modules/tagging/store/emitters.d.ts +1 -0
- package/types/src/x-modules/tagging/store/emitters.d.ts.map +1 -1
- package/types/src/x-modules/tagging/store/module.d.ts.map +1 -1
- package/types/src/x-modules/tagging/store/types.d.ts +10 -0
- package/types/src/x-modules/tagging/store/types.d.ts.map +1 -1
- package/types/src/x-modules/tagging/wiring.d.ts +19 -0
- package/types/src/x-modules/tagging/wiring.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [8.8.0](https://github.com/empathyco/x/compare/@empathyco/x-components@8.7.0...@empathyco/x-components@8.8.0) (2026-07-21)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* implement browse tagging (#2129)
|
|
11
|
+
|
|
12
|
+
|
|
6
13
|
## [8.7.0](https://github.com/empathyco/x/compare/@empathyco/x-components@8.6.0...@empathyco/x-components@8.7.0) (2026-07-20)
|
|
7
14
|
|
|
8
15
|
### Features
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-adapter-platform](./x-adapter-platform.md) > [browseResultSchema](./x-adapter-platform.browseresultschema.md)
|
|
4
|
+
|
|
5
|
+
## browseResultSchema variable
|
|
6
|
+
|
|
7
|
+
Default implementation for the BrowseResultSchema.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
browseResultSchema: import("@empathyco/x-adapter").MutableSchema<PlatformResult, Result>
|
|
13
|
+
```
|
|
@@ -750,6 +750,17 @@ Default implementation for the BrowseResponseMapper.
|
|
|
750
750
|
Default implementation for the BrowseResponseSchema.
|
|
751
751
|
|
|
752
752
|
|
|
753
|
+
</td></tr>
|
|
754
|
+
<tr><td>
|
|
755
|
+
|
|
756
|
+
[browseResultSchema](./x-adapter-platform.browseresultschema.md)
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
</td><td>
|
|
760
|
+
|
|
761
|
+
Default implementation for the BrowseResultSchema.
|
|
762
|
+
|
|
763
|
+
|
|
753
764
|
</td></tr>
|
|
754
765
|
<tr><td>
|
|
755
766
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-adapter-platform](./x-adapter-platform.md) > [PlatformTagging](./x-adapter-platform.platformtagging.md) > [browseAdd2Cart](./x-adapter-platform.platformtagging.browseadd2cart.md)
|
|
4
|
+
|
|
5
|
+
## PlatformTagging.browseAdd2Cart property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
browseAdd2Cart: string;
|
|
11
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-adapter-platform](./x-adapter-platform.md) > [PlatformTagging](./x-adapter-platform.platformtagging.md) > [browseCheckout](./x-adapter-platform.platformtagging.browsecheckout.md)
|
|
4
|
+
|
|
5
|
+
## PlatformTagging.browseCheckout property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
browseCheckout: string;
|
|
11
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-adapter-platform](./x-adapter-platform.md) > [PlatformTagging](./x-adapter-platform.platformtagging.md) > [browseProduct](./x-adapter-platform.platformtagging.browseproduct.md)
|
|
4
|
+
|
|
5
|
+
## PlatformTagging.browseProduct property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
browseProduct: string;
|
|
11
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-adapter-platform](./x-adapter-platform.md) > [PlatformTagging](./x-adapter-platform.platformtagging.md) > [displayBrowseProduct](./x-adapter-platform.platformtagging.displaybrowseproduct.md)
|
|
4
|
+
|
|
5
|
+
## PlatformTagging.displayBrowseProduct property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
displayBrowseProduct: string;
|
|
11
|
+
```
|
|
@@ -51,6 +51,57 @@ string
|
|
|
51
51
|
</td><td>
|
|
52
52
|
|
|
53
53
|
|
|
54
|
+
</td></tr>
|
|
55
|
+
<tr><td>
|
|
56
|
+
|
|
57
|
+
[browseAdd2Cart](./x-adapter-platform.platformtagging.browseadd2cart.md)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
</td><td>
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
</td><td>
|
|
64
|
+
|
|
65
|
+
string
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
</td><td>
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
</td></tr>
|
|
72
|
+
<tr><td>
|
|
73
|
+
|
|
74
|
+
[browseCheckout](./x-adapter-platform.platformtagging.browsecheckout.md)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
</td><td>
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
</td><td>
|
|
81
|
+
|
|
82
|
+
string
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
</td><td>
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
</td></tr>
|
|
89
|
+
<tr><td>
|
|
90
|
+
|
|
91
|
+
[browseProduct](./x-adapter-platform.platformtagging.browseproduct.md)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
</td><td>
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
</td><td>
|
|
98
|
+
|
|
99
|
+
string
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
</td><td>
|
|
103
|
+
|
|
104
|
+
|
|
54
105
|
</td></tr>
|
|
55
106
|
<tr><td>
|
|
56
107
|
|
|
@@ -85,6 +136,23 @@ string
|
|
|
85
136
|
</td><td>
|
|
86
137
|
|
|
87
138
|
|
|
139
|
+
</td></tr>
|
|
140
|
+
<tr><td>
|
|
141
|
+
|
|
142
|
+
[displayBrowseProduct](./x-adapter-platform.platformtagging.displaybrowseproduct.md)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
</td><td>
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
</td><td>
|
|
149
|
+
|
|
150
|
+
string
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
</td><td>
|
|
154
|
+
|
|
155
|
+
|
|
88
156
|
</td></tr>
|
|
89
157
|
<tr><td>
|
|
90
158
|
|
|
@@ -184,6 +184,7 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
184
184
|
PDPIsLoaded?: string | undefined;
|
|
185
185
|
ResultURLTrackingEnabled?: string | undefined;
|
|
186
186
|
SearchTaggingReceived?: import("@empathyco/x-types").TaggingRequest | undefined;
|
|
187
|
+
BrowseTaggingReceived?: import("@empathyco/x-types").TaggingRequest | undefined;
|
|
187
188
|
TrackableElementDisplayed?: import("@empathyco/x-types").Taggable | undefined;
|
|
188
189
|
UserClickedPDPAddToCart?: string | undefined;
|
|
189
190
|
TaggingConfigProvided?: import("../../../tagging").TaggingConfig | undefined;
|
|
@@ -6822,6 +6822,17 @@ Sets the browse state `selectedFilters`<!-- -->.
|
|
|
6822
6822
|
Sets the browse state `sort`<!-- -->.
|
|
6823
6823
|
|
|
6824
6824
|
|
|
6825
|
+
</td></tr>
|
|
6826
|
+
<tr><td>
|
|
6827
|
+
|
|
6828
|
+
[setBrowseTaggingInfo](./x-components.setbrowsetagginginfo.md)
|
|
6829
|
+
|
|
6830
|
+
|
|
6831
|
+
</td><td>
|
|
6832
|
+
|
|
6833
|
+
Sets the tagging state of the browse tagging info using a debounce which ends if the user accepts a query.
|
|
6834
|
+
|
|
6835
|
+
|
|
6825
6836
|
</td></tr>
|
|
6826
6837
|
<tr><td>
|
|
6827
6838
|
|
|
@@ -7957,6 +7968,17 @@ Tracks query tagging of the AI suggestions-search.
|
|
|
7957
7968
|
Tracks the tagging of the banner.
|
|
7958
7969
|
|
|
7959
7970
|
|
|
7971
|
+
</td></tr>
|
|
7972
|
+
<tr><td>
|
|
7973
|
+
|
|
7974
|
+
[trackBrowseWire](./x-components.trackbrowsewire.md)
|
|
7975
|
+
|
|
7976
|
+
|
|
7977
|
+
</td><td>
|
|
7978
|
+
|
|
7979
|
+
Tracks the tagging of the browse category.
|
|
7980
|
+
|
|
7981
|
+
|
|
7960
7982
|
</td></tr>
|
|
7961
7983
|
<tr><td>
|
|
7962
7984
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [setBrowseTaggingInfo](./x-components.setbrowsetagginginfo.md)
|
|
4
|
+
|
|
5
|
+
## setBrowseTaggingInfo variable
|
|
6
|
+
|
|
7
|
+
Sets the tagging state of the browse tagging info using a debounce which ends if the user accepts a query.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
setBrowseTaggingInfo: Wire<TaggingRequest>
|
|
13
|
+
```
|
|
@@ -181,6 +181,7 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
181
181
|
PDPIsLoaded?: string | undefined;
|
|
182
182
|
ResultURLTrackingEnabled?: string | undefined;
|
|
183
183
|
SearchTaggingReceived?: import("@empathyco/x-types").TaggingRequest | undefined;
|
|
184
|
+
BrowseTaggingReceived?: import("@empathyco/x-types").TaggingRequest | undefined;
|
|
184
185
|
TrackableElementDisplayed?: import("@empathyco/x-types").Taggable | undefined;
|
|
185
186
|
UserClickedPDPAddToCart?: string | undefined;
|
|
186
187
|
TaggingConfigProvided?: import("../../../tagging").TaggingConfig | undefined;
|
|
@@ -171,6 +171,7 @@ _default: import("vue").DefineComponent<{}, {
|
|
|
171
171
|
PDPIsLoaded: (payload: string, metadata: WireMetadata) => unknown;
|
|
172
172
|
ResultURLTrackingEnabled: (payload: string, metadata: WireMetadata) => unknown;
|
|
173
173
|
SearchTaggingReceived: (payload: import("@empathyco/x-types").TaggingRequest, metadata: WireMetadata) => unknown;
|
|
174
|
+
BrowseTaggingReceived: (payload: import("@empathyco/x-types").TaggingRequest, metadata: WireMetadata) => unknown;
|
|
174
175
|
TrackableElementDisplayed: (payload: import("@empathyco/x-types").Taggable, metadata: WireMetadata) => unknown;
|
|
175
176
|
UserClickedPDPAddToCart: (payload: string | undefined, metadata: WireMetadata) => unknown;
|
|
176
177
|
TaggingConfigProvided: (payload: import("..").TaggingConfig, metadata: WireMetadata) => unknown;
|
|
@@ -38,6 +38,25 @@ Description
|
|
|
38
38
|
</th></tr></thead>
|
|
39
39
|
<tbody><tr><td>
|
|
40
40
|
|
|
41
|
+
[setBrowseTaggingInfo](./x-components.taggingmutations.setbrowsetagginginfo.md)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
</td><td>
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
</td><td>
|
|
48
|
+
|
|
49
|
+
(browseTaggingInfo: TaggingRequest) => void
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
</td><td>
|
|
53
|
+
|
|
54
|
+
Sets the [TaggingState.browseTaggingInfo](./x-components.taggingstate.browsetagginginfo.md) property.
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
</td></tr>
|
|
58
|
+
<tr><td>
|
|
59
|
+
|
|
41
60
|
[setConsent](./x-components.taggingmutations.setconsent.md)
|
|
42
61
|
|
|
43
62
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [TaggingMutations](./x-components.taggingmutations.md) > [setBrowseTaggingInfo](./x-components.taggingmutations.setbrowsetagginginfo.md)
|
|
4
|
+
|
|
5
|
+
## TaggingMutations.setBrowseTaggingInfo property
|
|
6
|
+
|
|
7
|
+
Sets the [TaggingState.browseTaggingInfo](./x-components.taggingstate.browsetagginginfo.md) property.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
setBrowseTaggingInfo: (browseTaggingInfo: TaggingRequest) => void;
|
|
13
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [TaggingState](./x-components.taggingstate.md) > [browseTaggingInfo](./x-components.taggingstate.browsetagginginfo.md)
|
|
4
|
+
|
|
5
|
+
## TaggingState.browseTaggingInfo property
|
|
6
|
+
|
|
7
|
+
Tagging info for last accepted browse category.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
browseTaggingInfo: TaggingRequest | null;
|
|
13
|
+
```
|
|
@@ -37,6 +37,25 @@ Description
|
|
|
37
37
|
</th></tr></thead>
|
|
38
38
|
<tbody><tr><td>
|
|
39
39
|
|
|
40
|
+
[browseTaggingInfo](./x-components.taggingstate.browsetagginginfo.md)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
</td><td>
|
|
47
|
+
|
|
48
|
+
TaggingRequest \| null
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
</td><td>
|
|
52
|
+
|
|
53
|
+
Tagging info for last accepted browse category.
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
</td></tr>
|
|
57
|
+
<tr><td>
|
|
58
|
+
|
|
40
59
|
[config](./x-components.taggingstate.config.md)
|
|
41
60
|
|
|
42
61
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [TaggingXEvents](./x-components.taggingxevents.md) > [BrowseTaggingReceived](./x-components.taggingxevents.browsetaggingreceived.md)
|
|
4
|
+
|
|
5
|
+
## TaggingXEvents.BrowseTaggingReceived property
|
|
6
|
+
|
|
7
|
+
Browse tagging info has changed. Payload: The new browse tagging info.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
BrowseTaggingReceived: TaggingRequest;
|
|
13
|
+
```
|
|
@@ -37,6 +37,25 @@ Description
|
|
|
37
37
|
</th></tr></thead>
|
|
38
38
|
<tbody><tr><td>
|
|
39
39
|
|
|
40
|
+
[BrowseTaggingReceived](./x-components.taggingxevents.browsetaggingreceived.md)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
</td><td>
|
|
47
|
+
|
|
48
|
+
TaggingRequest
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
</td><td>
|
|
52
|
+
|
|
53
|
+
Browse tagging info has changed. Payload: The new browse tagging info.
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
</td></tr>
|
|
57
|
+
<tr><td>
|
|
58
|
+
|
|
40
59
|
[ConsentChanged](./x-components.taggingxevents.consentchanged.md)
|
|
41
60
|
|
|
42
61
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [trackBrowseWire](./x-components.trackbrowsewire.md)
|
|
4
|
+
|
|
5
|
+
## trackBrowseWire variable
|
|
6
|
+
|
|
7
|
+
Tracks the tagging of the browse category.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
trackBrowseWire: Wire<TaggingRequest | TaggingRequest[]>
|
|
13
|
+
```
|
package/js/index.js
CHANGED
|
@@ -451,7 +451,7 @@ export { DefaultExternalTaggingService } from './x-modules/tagging/service/exter
|
|
|
451
451
|
export { track } from './x-modules/tagging/store/actions/track.action.js';
|
|
452
452
|
export { taggingEmitters } from './x-modules/tagging/store/emitters.js';
|
|
453
453
|
export { taggingXStoreModule } from './x-modules/tagging/store/module.js';
|
|
454
|
-
export { createSetQueryTaggingFromQueryPreview, createTrackDisplayWire, createTrackRelatedPromptToolingDisplayClickWire, createTrackToolingAdd2CartWire, createTrackToolingDisplayWire, createTrackWire, setConsent, setNoResultsTaggingEnabledWire, setQueryTaggingFromQueryPreview, setQueryTaggingInfo, setTaggingConfig, taggingWiring, trackAddToCartWire, trackAiSuggestionsSearchWire, trackBannerClickedWire, trackDisplayClickedWire, trackElementDisplayedWire, trackNoResultsQueryWithFallbackWire, trackNoResultsQueryWithFallbackWireDebounced, trackNoResultsQueryWithSemanticsWire, trackNoResultsQueryWithSemanticsWireDebounced, trackPromotedClickedWire, trackQueryWire, trackRelatedPromptToolingDisplayClickWire, trackResultClickedWire, trackToolingAdd2CartWire, trackToolingDisplayClickedWire } from './x-modules/tagging/wiring.js';
|
|
454
|
+
export { createSetQueryTaggingFromQueryPreview, createTrackDisplayWire, createTrackRelatedPromptToolingDisplayClickWire, createTrackToolingAdd2CartWire, createTrackToolingDisplayWire, createTrackWire, setBrowseTaggingInfo, setConsent, setNoResultsTaggingEnabledWire, setQueryTaggingFromQueryPreview, setQueryTaggingInfo, setTaggingConfig, taggingWiring, trackAddToCartWire, trackAiSuggestionsSearchWire, trackBannerClickedWire, trackBrowseWire, trackDisplayClickedWire, trackElementDisplayedWire, trackNoResultsQueryWithFallbackWire, trackNoResultsQueryWithFallbackWireDebounced, trackNoResultsQueryWithSemanticsWire, trackNoResultsQueryWithSemanticsWireDebounced, trackPromotedClickedWire, trackQueryWire, trackRelatedPromptToolingDisplayClickWire, trackResultClickedWire, trackToolingAdd2CartWire, trackToolingDisplayClickedWire } from './x-modules/tagging/wiring.js';
|
|
455
455
|
export { taggingXModule } from './x-modules/tagging/x-module.js';
|
|
456
456
|
export { default as UrlHandler } from './x-modules/url/components/url-handler.vue.js';
|
|
457
457
|
export { replaceableParams, urlEmitters } from './x-modules/url/store/emitters.js';
|
|
@@ -9,6 +9,7 @@ import { taggingXStoreModule } from './module.js';
|
|
|
9
9
|
const taggingEmitters = createStoreEmitters(taggingXStoreModule, {
|
|
10
10
|
ConsentChanged: state => state.consent,
|
|
11
11
|
SearchTaggingReceived: state => state.queryTaggingInfo,
|
|
12
|
+
BrowseTaggingReceived: state => state.browseTaggingInfo,
|
|
12
13
|
ResultURLTrackingEnabled: {
|
|
13
14
|
selector: state => state.config.storageKey,
|
|
14
15
|
filter: newValue => newValue === 'url',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emitters.js","sources":["../../../../../src/x-modules/tagging/store/emitters.ts"],"sourcesContent":["import { createStoreEmitters } from '../../../store/utils/store-emitters.utils'\nimport { taggingXStoreModule } from './module'\n\n/**\n * {@link StoreEmitters} For the tagging module.\n *\n * @internal\n */\nexport const taggingEmitters = createStoreEmitters(taggingXStoreModule, {\n ConsentChanged: state => state.consent!,\n SearchTaggingReceived: state => state.queryTaggingInfo!,\n ResultURLTrackingEnabled: {\n selector: state => state.config.storageKey!,\n filter: newValue => newValue === 'url',\n },\n})\n"],"names":[],"mappings":";;;AAGA;;;;AAIG;AACI,MAAM,eAAe,GAAG,mBAAmB,CAAC,mBAAmB,EAAE;AACtE,IAAA,cAAc,EAAE,KAAK,IAAI,KAAK,CAAC,OAAQ;AACvC,IAAA,qBAAqB,EAAE,KAAK,IAAI,KAAK,CAAC,gBAAiB;AACvD,IAAA,wBAAwB,EAAE;QACxB,QAAQ,EAAE,KAAK,IAAI,KAAK,CAAC,MAAM,CAAC,UAAW;AAC3C,QAAA,MAAM,EAAE,QAAQ,IAAI,QAAQ,KAAK,KAAK;AACvC,KAAA;AACF,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"emitters.js","sources":["../../../../../src/x-modules/tagging/store/emitters.ts"],"sourcesContent":["import { createStoreEmitters } from '../../../store/utils/store-emitters.utils'\nimport { taggingXStoreModule } from './module'\n\n/**\n * {@link StoreEmitters} For the tagging module.\n *\n * @internal\n */\nexport const taggingEmitters = createStoreEmitters(taggingXStoreModule, {\n ConsentChanged: state => state.consent!,\n SearchTaggingReceived: state => state.queryTaggingInfo!,\n BrowseTaggingReceived: state => state.browseTaggingInfo!,\n ResultURLTrackingEnabled: {\n selector: state => state.config.storageKey!,\n filter: newValue => newValue === 'url',\n },\n})\n"],"names":[],"mappings":";;;AAGA;;;;AAIG;AACI,MAAM,eAAe,GAAG,mBAAmB,CAAC,mBAAmB,EAAE;AACtE,IAAA,cAAc,EAAE,KAAK,IAAI,KAAK,CAAC,OAAQ;AACvC,IAAA,qBAAqB,EAAE,KAAK,IAAI,KAAK,CAAC,gBAAiB;AACvD,IAAA,qBAAqB,EAAE,KAAK,IAAI,KAAK,CAAC,iBAAkB;AACxD,IAAA,wBAAwB,EAAE;QACxB,QAAQ,EAAE,KAAK,IAAI,KAAK,CAAC,MAAM,CAAC,UAAW;AAC3C,QAAA,MAAM,EAAE,QAAQ,IAAI,QAAQ,KAAK,KAAK;AACvC,KAAA;AACF,CAAA;;;;"}
|
|
@@ -21,6 +21,7 @@ const taggingXStoreModule = {
|
|
|
21
21
|
toolingDisplayClick: null,
|
|
22
22
|
toolingDisplayAdd2Cart: null,
|
|
23
23
|
},
|
|
24
|
+
browseTaggingInfo: null,
|
|
24
25
|
}),
|
|
25
26
|
getters: {},
|
|
26
27
|
mutations: {
|
|
@@ -30,6 +31,9 @@ const taggingXStoreModule = {
|
|
|
30
31
|
setQueryTaggingInfo(state, queryTaggingInfo) {
|
|
31
32
|
state.queryTaggingInfo = queryTaggingInfo;
|
|
32
33
|
},
|
|
34
|
+
setBrowseTaggingInfo(state, browseTaggingInfo) {
|
|
35
|
+
state.browseTaggingInfo = browseTaggingInfo;
|
|
36
|
+
},
|
|
33
37
|
setNoResultsTaggingEnabled(state, module) {
|
|
34
38
|
if (module === 'semanticQueries' || module === 'relatedPrompts') {
|
|
35
39
|
state.noResultsTaggingEnabled = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sources":["../../../../../src/x-modules/tagging/store/module.ts"],"sourcesContent":["import type { TaggingRequest } from '@empathyco/x-types'\nimport type { TaggingXStoreModule } from './types'\nimport { mergeConfig, setConfig } from '../../../store/utils/config-store.utils'\nimport { track } from './actions/track.action'\n\n/**\n * {@link XStoreModule} For the tagging module.\n *\n * @internal\n */\nexport const taggingXStoreModule: TaggingXStoreModule = {\n state: () => ({\n config: {\n sessionTTLMs: 30 * 60 * 1000,\n queryTaggingDebounceMs: 2000,\n storageKey: null,\n storageTTLMs: null,\n },\n consent: null,\n noResultsTaggingEnabled: false,\n queryTaggingInfo: null,\n toolingTaggingInfo: {\n toolingDisplayClick: null,\n toolingDisplayAdd2Cart: null,\n },\n }),\n getters: {},\n mutations: {\n setConsent(state, consent) {\n state.consent = consent\n },\n setQueryTaggingInfo(state, queryTaggingInfo: TaggingRequest) {\n state.queryTaggingInfo = queryTaggingInfo\n },\n setNoResultsTaggingEnabled(state, module) {\n if (module === 'semanticQueries' || module === 'relatedPrompts') {\n state.noResultsTaggingEnabled = true\n }\n },\n setConfig,\n mergeConfig,\n },\n actions: {\n track,\n },\n}\n"],"names":[],"mappings":";;;AAKA;;;;AAIG;AACI,MAAM,mBAAmB,GAAwB;AACtD,IAAA,KAAK,EAAE,OAAO;AACZ,QAAA,MAAM,EAAE;AACN,YAAA,YAAY,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI;AAC5B,YAAA,sBAAsB,EAAE,IAAI;AAC5B,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,YAAY,EAAE,IAAI;AACnB,SAAA;AACD,QAAA,OAAO,EAAE,IAAI;AACb,QAAA,uBAAuB,EAAE,KAAK;AAC9B,QAAA,gBAAgB,EAAE,IAAI;AACtB,QAAA,kBAAkB,EAAE;AAClB,YAAA,mBAAmB,EAAE,IAAI;AACzB,YAAA,sBAAsB,EAAE,IAAI;AAC7B,SAAA;
|
|
1
|
+
{"version":3,"file":"module.js","sources":["../../../../../src/x-modules/tagging/store/module.ts"],"sourcesContent":["import type { TaggingRequest } from '@empathyco/x-types'\nimport type { TaggingXStoreModule } from './types'\nimport { mergeConfig, setConfig } from '../../../store/utils/config-store.utils'\nimport { track } from './actions/track.action'\n\n/**\n * {@link XStoreModule} For the tagging module.\n *\n * @internal\n */\nexport const taggingXStoreModule: TaggingXStoreModule = {\n state: () => ({\n config: {\n sessionTTLMs: 30 * 60 * 1000,\n queryTaggingDebounceMs: 2000,\n storageKey: null,\n storageTTLMs: null,\n },\n consent: null,\n noResultsTaggingEnabled: false,\n queryTaggingInfo: null,\n toolingTaggingInfo: {\n toolingDisplayClick: null,\n toolingDisplayAdd2Cart: null,\n },\n browseTaggingInfo: null,\n }),\n getters: {},\n mutations: {\n setConsent(state, consent) {\n state.consent = consent\n },\n setQueryTaggingInfo(state, queryTaggingInfo: TaggingRequest) {\n state.queryTaggingInfo = queryTaggingInfo\n },\n setBrowseTaggingInfo(state, browseTaggingInfo: TaggingRequest) {\n state.browseTaggingInfo = browseTaggingInfo\n },\n setNoResultsTaggingEnabled(state, module) {\n if (module === 'semanticQueries' || module === 'relatedPrompts') {\n state.noResultsTaggingEnabled = true\n }\n },\n setConfig,\n mergeConfig,\n },\n actions: {\n track,\n },\n}\n"],"names":[],"mappings":";;;AAKA;;;;AAIG;AACI,MAAM,mBAAmB,GAAwB;AACtD,IAAA,KAAK,EAAE,OAAO;AACZ,QAAA,MAAM,EAAE;AACN,YAAA,YAAY,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI;AAC5B,YAAA,sBAAsB,EAAE,IAAI;AAC5B,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,YAAY,EAAE,IAAI;AACnB,SAAA;AACD,QAAA,OAAO,EAAE,IAAI;AACb,QAAA,uBAAuB,EAAE,KAAK;AAC9B,QAAA,gBAAgB,EAAE,IAAI;AACtB,QAAA,kBAAkB,EAAE;AAClB,YAAA,mBAAmB,EAAE,IAAI;AACzB,YAAA,sBAAsB,EAAE,IAAI;AAC7B,SAAA;AACD,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;AACF,IAAA,OAAO,EAAE,EAAE;AACX,IAAA,SAAS,EAAE;QACT,UAAU,CAAC,KAAK,EAAE,OAAO,EAAA;AACvB,YAAA,KAAK,CAAC,OAAO,GAAG,OAAO;QACzB,CAAC;QACD,mBAAmB,CAAC,KAAK,EAAE,gBAAgC,EAAA;AACzD,YAAA,KAAK,CAAC,gBAAgB,GAAG,gBAAgB;QAC3C,CAAC;QACD,oBAAoB,CAAC,KAAK,EAAE,iBAAiC,EAAA;AAC3D,YAAA,KAAK,CAAC,iBAAiB,GAAG,iBAAiB;QAC7C,CAAC;QACD,0BAA0B,CAAC,KAAK,EAAE,MAAM,EAAA;YACtC,IAAI,MAAM,KAAK,iBAAiB,IAAI,MAAM,KAAK,gBAAgB,EAAE;AAC/D,gBAAA,KAAK,CAAC,uBAAuB,GAAG,IAAI;YACtC;QACF,CAAC;QACD,SAAS;QACT,WAAW;AACZ,KAAA;AACD,IAAA,OAAO,EAAE;QACP,KAAK;AACN,KAAA;;;;;"}
|
|
@@ -95,6 +95,13 @@ const setTaggingConfig = wireCommit('mergeConfig');
|
|
|
95
95
|
*/
|
|
96
96
|
const trackQueryWire = filter(wireDispatch('track'), ({ eventPayload, store }) => eventPayload.params.totalHits > 0 ||
|
|
97
97
|
!store.state.x.tagging.noResultsTaggingEnabled);
|
|
98
|
+
/**
|
|
99
|
+
* Tracks the tagging of the browse category.
|
|
100
|
+
*
|
|
101
|
+
* @public
|
|
102
|
+
*/
|
|
103
|
+
const trackBrowseWire = filter(wireDispatch('track'), ({ eventPayload, store }) => eventPayload.params.totalHits > 0 ||
|
|
104
|
+
!store.state.x.tagging.noResultsTaggingEnabled);
|
|
98
105
|
/**
|
|
99
106
|
* Sets the tagging state of the query tagging info using a debounce which ends if the user
|
|
100
107
|
* accepts a query.
|
|
@@ -111,6 +118,22 @@ const setQueryTaggingInfo = moduleDebounce(wireCommit('setQueryTaggingInfo'), ({
|
|
|
111
118
|
'UserReachedResultsListEnd',
|
|
112
119
|
],
|
|
113
120
|
});
|
|
121
|
+
/**
|
|
122
|
+
* Sets the tagging state of the browse tagging info using a debounce which ends if the user
|
|
123
|
+
* accepts a query.
|
|
124
|
+
*
|
|
125
|
+
* @public
|
|
126
|
+
*/
|
|
127
|
+
const setBrowseTaggingInfo = moduleDebounce(wireCommit('setBrowseTaggingInfo'), ({ state }) => state.config.queryTaggingDebounceMs, {
|
|
128
|
+
cancelOn: ['UserClickedOpenX', 'UserOpenXProgrammatically'],
|
|
129
|
+
forceOn: [
|
|
130
|
+
'UserClickedAResult',
|
|
131
|
+
'UserClickedAPromoted',
|
|
132
|
+
'UserClickedABanner',
|
|
133
|
+
'UserClickedARedirection',
|
|
134
|
+
'UserReachedResultsListEnd',
|
|
135
|
+
],
|
|
136
|
+
});
|
|
114
137
|
/**
|
|
115
138
|
* Sets the tagging state of the query tagging info using.
|
|
116
139
|
*
|
|
@@ -354,6 +377,12 @@ const taggingWiring = createWiring({
|
|
|
354
377
|
SearchTaggingReceived: {
|
|
355
378
|
trackQueryWire,
|
|
356
379
|
},
|
|
380
|
+
BrowseTaggingChanged: {
|
|
381
|
+
setBrowseTaggingInfo,
|
|
382
|
+
},
|
|
383
|
+
BrowseTaggingReceived: {
|
|
384
|
+
trackBrowseWire,
|
|
385
|
+
},
|
|
357
386
|
TrackableElementDisplayed: {
|
|
358
387
|
trackElementDisplayedWire,
|
|
359
388
|
},
|
|
@@ -411,5 +440,5 @@ const taggingWiring = createWiring({
|
|
|
411
440
|
},
|
|
412
441
|
});
|
|
413
442
|
|
|
414
|
-
export { createSetQueryTaggingFromQueryPreview, createTrackDisplayWire, createTrackRelatedPromptToolingDisplayClickWire, createTrackToolingAdd2CartWire, createTrackToolingDisplayWire, createTrackWire, setConsent, setNoResultsTaggingEnabledWire, setQueryTaggingFromQueryPreview, setQueryTaggingInfo, setTaggingConfig, taggingWiring, trackAddToCartWire, trackAiSuggestionsSearchWire, trackBannerClickedWire, trackDisplayClickedWire, trackElementDisplayedWire, trackNoResultsQueryWithFallbackWire, trackNoResultsQueryWithFallbackWireDebounced, trackNoResultsQueryWithSemanticsWire, trackNoResultsQueryWithSemanticsWireDebounced, trackPromotedClickedWire, trackQueryWire, trackRelatedPromptToolingDisplayClickWire, trackResultClickedWire, trackToolingAdd2CartWire, trackToolingDisplayClickedWire };
|
|
443
|
+
export { createSetQueryTaggingFromQueryPreview, createTrackDisplayWire, createTrackRelatedPromptToolingDisplayClickWire, createTrackToolingAdd2CartWire, createTrackToolingDisplayWire, createTrackWire, setBrowseTaggingInfo, setConsent, setNoResultsTaggingEnabledWire, setQueryTaggingFromQueryPreview, setQueryTaggingInfo, setTaggingConfig, taggingWiring, trackAddToCartWire, trackAiSuggestionsSearchWire, trackBannerClickedWire, trackBrowseWire, trackDisplayClickedWire, trackElementDisplayedWire, trackNoResultsQueryWithFallbackWire, trackNoResultsQueryWithFallbackWireDebounced, trackNoResultsQueryWithSemanticsWire, trackNoResultsQueryWithSemanticsWireDebounced, trackPromotedClickedWire, trackQueryWire, trackRelatedPromptToolingDisplayClickWire, trackResultClickedWire, trackToolingAdd2CartWire, trackToolingDisplayClickedWire };
|
|
415
444
|
//# sourceMappingURL=wiring.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/tagging/wiring.ts"],"sourcesContent":["import type {\n AiSuggestionSearch,\n RelatedPrompt,\n Result,\n SemanticQuery,\n Taggable,\n Tagging,\n TaggingRequest,\n} from '@empathyco/x-types'\nimport type { FeatureLocation } from '../../types/index'\nimport type { DisplayWireMetadata, Wire } from '../../wiring/wiring.types'\nimport { DefaultSessionService } from '@empathyco/x-utils'\nimport { createOrigin } from '../../utils/index'\nimport { namespacedWireCommit, namespacedWireDispatch } from '../../wiring/namespaced-wires.factory'\nimport { namespacedDebounce } from '../../wiring/namespaced-wires.operators'\nimport { wireService, wireServiceWithoutPayload } from '../../wiring/wires.factory'\nimport { filter, mapWire } from '../../wiring/wires.operators'\nimport { createWiring } from '../../wiring/wiring.utils'\nimport { DefaultExternalTaggingService } from './service/external-tagging.service'\n\n/**\n * `tagging` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'tagging'\n\n/**\n * Debounce function for the module.\n */\nconst moduleDebounce = namespacedDebounce(moduleName)\n\n/**\n * WireCommit for {@link TaggingXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit(moduleName)\n\n/**\n * WireDispatch for {@link TaggingXModule}.\n *\n * @internal\n */\nconst wireDispatch = namespacedWireDispatch(moduleName)\n\n/**\n * Wires without payload factory for {@link DefaultSessionService}.\n */\nconst wireSessionServiceWithoutPayload = wireServiceWithoutPayload(DefaultSessionService.instance)\n\n/**\n * Wires factory for {@link DefaultExternalTaggingService}.\n */\nconst wireExternalTaggingService = wireService(DefaultExternalTaggingService.instance)\n\n/**\n * Stores the given result on the local storage.\n *\n * @public\n */\nconst storeClickedResultWire = wireExternalTaggingService('storeResultClicked')\n\n/**\n * Stores the result added to cart on the local storage.\n *\n * @public\n */\nconst storeAddToCartWire = wireExternalTaggingService('storeAddToCart')\n\n/**\n * Moves the result information from the local storage to session storage.\n *\n * @public\n */\nconst moveClickedResultToSessionWire = mapWire(\n wireExternalTaggingService('moveToSessionStorage'),\n (payload: string) => {\n return payload === 'url' ? undefined : payload\n },\n)\n\n/**\n * Triggers the add to cart tracking.\n *\n * @public\n */\nconst trackAddToCartFromSessionStorage = wireExternalTaggingService('trackAddToCart')\n\n/**\n * Clears the session id.\n *\n * @public\n */\nconst clearSessionWire = filter(\n wireSessionServiceWithoutPayload('clearSessionId'),\n ({ eventPayload: consent }) => !consent,\n)\n\n/**\n * Sets the tagging state `consent`.\n *\n * @public\n */\nexport const setConsent = wireCommit('setConsent')\n\n/**\n * Sets the tagging state `noResultsTaggingEnabled`.\n *\n * @public\n */\nexport const setNoResultsTaggingEnabledWire = wireCommit('setNoResultsTaggingEnabled')\n\n/**\n * Sets the tagging config state.\n *\n * @public\n */\nexport const setTaggingConfig = wireCommit('mergeConfig')\n\n/**\n * Tracks the tagging of the query.\n *\n * @public\n */\nexport const trackQueryWire = filter(\n wireDispatch('track'),\n ({ eventPayload, store }) =>\n ((eventPayload as TaggingRequest).params.totalHits as number) > 0 ||\n !store.state.x.tagging.noResultsTaggingEnabled,\n)\n\n/**\n * Sets the tagging state of the query tagging info using a debounce which ends if the user\n * accepts a query.\n *\n * @public\n */\nexport const setQueryTaggingInfo = moduleDebounce(\n wireCommit('setQueryTaggingInfo'),\n ({ state }) => state.config.queryTaggingDebounceMs,\n {\n cancelOn: 'UserClearedQuery',\n forceOn: [\n 'UserClickedAResult',\n 'UserClickedAPromoted',\n 'UserClickedABanner',\n 'UserClickedARedirection',\n 'UserReachedResultsListEnd',\n ],\n },\n)\n\n/**\n * Sets the tagging state of the query tagging info using.\n *\n * @public\n */\nexport const setQueryTaggingFromQueryPreview = createSetQueryTaggingFromQueryPreview()\n\n/**\n * Tracks the tagging of the result.\n *\n * @public\n */\nexport const trackResultClickedWire = createTrackWire('click')\n\n/**\n * Tracks the tagging of the banner.\n *\n * @public\n */\nexport const trackBannerClickedWire = createTrackWire('click')\n\n/**\n * Tracks the click on a promoted result.\n *\n * @public\n */\nexport const trackPromotedClickedWire = createTrackWire('click')\n\n/**\n * Performs a track of a result added to the cart.\n *\n * @public\n */\nexport const trackAddToCartWire = createTrackWire('add2cart')\n\n/**\n * Performs a track of a display result being clicked.\n *\n * @public\n */\nexport const trackDisplayClickedWire = createTrackDisplayWire('displayClick')\n\n/**\n * Performs a track of a display result being clicked.\n *\n * @public\n */\nexport const trackToolingDisplayClickedWire = createTrackToolingDisplayWire()\n\n/**\n * Performs a track of a display result being clicked.\n *\n * @public\n */\nexport const trackToolingAdd2CartWire = createTrackToolingAdd2CartWire()\n\n/**\n * Performs a track of a clicked related prompt.\n *\n * @public\n */\nexport const trackRelatedPromptToolingDisplayClickWire =\n createTrackRelatedPromptToolingDisplayClickWire()\n\n/**\n * Performs a track of a display element appearing.\n *\n * @public\n */\nexport const trackElementDisplayedWire = createTrackDisplayWire('display')\n\n/**\n * Factory helper to create a wire for the track of a taggable element.\n *\n * @param property - Key of the tagging object to track.\n * @returns A new wire for the given property of the taggable element.\n *\n * @public\n */\nexport function createTrackWire(property: keyof Tagging): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload: { tagging }, metadata: { location } }) => {\n const taggingInfo: TaggingRequest = tagging[property]\n taggingInfo.params.location = location as string\n return taggingInfo\n }),\n ({ eventPayload: { tagging }, metadata: { ignoreInModules } }) =>\n // eslint-disable-next-line ts/no-unsafe-member-access\n !!tagging?.[property] && !ignoreInModules?.includes(moduleName),\n )\n}\n\n/**\n * Performs a track of a query with no results that used related prompts or semantic queries as fallback.\n * The totalHits will be changed to -1 if related prompts or semantic queries are found in order to differentiate\n * it from scenarios where the user encounters a no-results page without any related prompts or semantic queries.\n *\n * @public\n */\nexport const trackNoResultsQueryWithFallbackWire = filter(\n wireDispatch('track', ({ eventPayload, state }) => {\n const { queryTaggingInfo } = state\n const totalHits = (eventPayload as RelatedPrompt[] | SemanticQuery[]).length > 0 ? -1 : 0\n return {\n params: { ...queryTaggingInfo?.params, totalHits },\n url: queryTaggingInfo?.url ?? '',\n }\n }),\n ({ store }) => Number(store.state.x.tagging.queryTaggingInfo?.params.totalHits) === 0,\n)\n\n/**.\n * Debounced version of {@link trackNoResultsQueryWithFallbackWire}\n *\n * @public\n */\nexport const trackNoResultsQueryWithFallbackWireDebounced = moduleDebounce(\n trackNoResultsQueryWithFallbackWire,\n ({ state }) => state.config.queryTaggingDebounceMs,\n { cancelOn: ['QueryPreviewUnmounted', 'RelatedPromptsUnmounted'] },\n)\n\n/**\n * Performs a track of a query with no results that used semantic queries as fallback.\n * The totalHits will be changed to -1 if semantic queries are found in order to differentiate\n * it from scenarios where the user encounters a no-results page without any semantic queries.\n *\n * @public\n * @deprecated - Use {@link trackNoResultsQueryWithFallbackWire} instead.\n */\nexport const trackNoResultsQueryWithSemanticsWire = trackNoResultsQueryWithFallbackWire\n\n/**\n * Debounced version of {@link trackNoResultsQueryWithFallbackWire}\n *\n * @public\n * @deprecated - Use {@link trackNoResultsQueryWithFallbackWireDebounced} instead.\n */\nexport const trackNoResultsQueryWithSemanticsWireDebounced =\n trackNoResultsQueryWithFallbackWireDebounced\n\n/**\n * Factory helper to create a wire for the track of the display click.\n *\n * @param property - Key of the tagging object to track.\n * @returns A new wire for the display click of the taggable element.\n *\n * @public\n */\nexport function createTrackDisplayWire(property: keyof Tagging): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload: { tagging }, metadata }) => {\n const taggingInfo: TaggingRequest = tagging[property]\n const location = metadata.location as FeatureLocation\n\n taggingInfo.params.location = location\n taggingInfo.params.displayFamily = createOrigin({\n feature: metadata.feature,\n location,\n })!\n taggingInfo.params.q = (metadata as DisplayWireMetadata).displayOriginalQuery\n\n return taggingInfo\n }),\n // eslint-disable-next-line ts/no-unsafe-member-access\n ({ eventPayload: { tagging } }) => !!tagging?.[property]?.url,\n )\n}\n\n/**\n * Update the tooling tagging params with the result information.\n *\n * @param taggingRequest - The tooling tagging request to be updated.\n * @param result - The clicked result.\n * @returns The tagging request updated.\n *\n * @internal\n */\nfunction updateToolingTaggingWithResult(\n taggingRequest: TaggingRequest,\n result: Result,\n): TaggingRequest {\n taggingRequest.params.productId = result.id\n taggingRequest.params.title = result.name!\n taggingRequest.params.url = result.url!\n\n return taggingRequest\n}\n\n/**\n * Factory helper to create a wire for the track of the tooling display click.\n *\n * @returns A new wire for the tooling display click of the taggable element.\n *\n * @public\n */\nexport function createTrackToolingDisplayWire(): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload, metadata }) => {\n const taggingInfo: TaggingRequest = metadata.toolingTagging as TaggingRequest\n const resultInfo = eventPayload as Result\n\n updateToolingTaggingWithResult(taggingInfo, resultInfo)\n\n return taggingInfo\n }),\n ({ metadata }) => !!metadata?.toolingTagging,\n )\n}\n\n/**\n * Factory helper to create a wire for the track of the tooling display add to cart.\n *\n * @returns A new wire for the tooling display add to cart of the taggable element.\n *\n * @public\n */\nexport function createTrackToolingAdd2CartWire(): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload, metadata }) => {\n const taggingInfo: TaggingRequest = metadata.toolingAdd2CartTagging as TaggingRequest\n const resultInfo = eventPayload as Result\n\n updateToolingTaggingWithResult(taggingInfo, resultInfo)\n\n return taggingInfo\n }),\n ({ metadata }) => !!metadata?.toolingAdd2CartTagging,\n )\n}\n\n/**\n * Factory helper to create a wire for the track of the tooling display click in a related prompt.\n *\n * @returns A new wire for the tooling display click of the taggable element.\n *\n * @public\n */\nexport function createTrackRelatedPromptToolingDisplayClickWire() {\n return filter(\n wireDispatch('track', ({ metadata }) => {\n const relatedPrompt = metadata.relatedPrompt as RelatedPrompt\n const taggingInfo = relatedPrompt.tagging!.toolingDisplayClickTagging as TaggingRequest\n\n taggingInfo.params.productId = 'EXPAND'\n taggingInfo.params.title = relatedPrompt.suggestionText\n taggingInfo.params.url = 'none'\n\n return taggingInfo\n }),\n ({ metadata }) => {\n const relatedPrompt = metadata.relatedPrompt as RelatedPrompt | undefined\n const isUnselected = metadata?.selectedPrompt === -1\n const taggingInfo = relatedPrompt?.tagging?.toolingDisplayClickTagging\n return isUnselected && !!taggingInfo\n },\n )\n}\n\n/**\n * Factory helper to create a wire to set the queryTagging.\n *\n * @returns A new wire for the query of a result of a queryPreview.\n *\n * @public\n */\nexport function createSetQueryTaggingFromQueryPreview(): Wire<Taggable> {\n return filter(\n wireCommit(\n 'setQueryTaggingInfo',\n ({ metadata: { queryTagging } }) => queryTagging as TaggingRequest,\n ),\n ({ metadata: { queryTagging } }) => !!queryTagging,\n )\n}\n\n/**\n * Tracks query tagging of the AI suggestions-search.\n * @public\n */\nexport const trackAiSuggestionsSearchWire = wireDispatch('track', ({ eventPayload }) =>\n (eventPayload as AiSuggestionSearch[]).map(({ tagging }) => tagging.query),\n)\n\n/**\n * Wiring configuration for the {@link TaggingXModule | tagging module}.\n *\n * @internal\n */\nexport const taggingWiring = createWiring({\n ConsentProvided: {\n setConsent,\n },\n ConsentChanged: {\n clearSessionWire,\n },\n PDPIsLoaded: {\n moveClickedResultToSessionWire,\n },\n ResultURLTrackingEnabled: {\n moveClickedResultToSessionWire,\n },\n SearchTaggingChanged: {\n setQueryTaggingInfo,\n },\n SearchTaggingReceived: {\n trackQueryWire,\n },\n TrackableElementDisplayed: {\n trackElementDisplayedWire,\n },\n TaggingConfigProvided: {\n setTaggingConfig,\n },\n UserClickedAResult: {\n trackResultClickedWire,\n storeClickedResultWire,\n },\n UserClickedResultAddToCart: {\n trackAddToCartWire,\n trackResultClickedWire,\n storeAddToCartWire,\n },\n UserClickedPDPAddToCart: {\n trackAddToCartFromSessionStorage,\n },\n UserClickedABanner: {\n trackBannerClickedWire,\n },\n UserClickedAPromoted: {\n trackPromotedClickedWire,\n },\n UserClickedADisplayResult: {\n trackDisplayClickedWire,\n setQueryTaggingFromQueryPreview,\n },\n SemanticQueriesResponseChanged: {\n trackNoResultsQueryWithFallbackWireDebounced,\n },\n RelatedPromptsResponseChanged: {\n trackNoResultsQueryWithFallbackWireDebounced,\n },\n ModuleRegistered: {\n setNoResultsTaggingEnabledWire,\n },\n UserClickedARelatedPromptResult: {\n trackToolingDisplayClickedWire,\n },\n UserClickedARelatedPromptAdd2Cart: {\n trackToolingAdd2CartWire,\n },\n UserSelectedARelatedPrompt: {\n trackRelatedPromptToolingDisplayClickWire,\n },\n AiSuggestionsSearchChanged: {\n trackAiSuggestionsSearchWire,\n },\n UserClickedAnAiCarouselResult: {\n trackToolingDisplayClickedWire,\n },\n UserClickedAnAiCarouselAdd2Cart: {\n trackToolingAdd2CartWire,\n },\n})\n"],"names":[],"mappings":";;;;;;;;;;AAoBA;;;;AAIG;AACH,MAAM,UAAU,GAAG,SAAS;AAE5B;;AAEG;AACH,MAAM,cAAc,GAAG,kBAAkB,CAAC,UAAU,CAAC;AAErD;;;;AAIG;AACH,MAAM,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC;AAEnD;;;;AAIG;AACH,MAAM,YAAY,GAAG,sBAAsB,CAAC,UAAU,CAAC;AAEvD;;AAEG;AACH,MAAM,gCAAgC,GAAG,yBAAyB,CAAC,qBAAqB,CAAC,QAAQ,CAAC;AAElG;;AAEG;AACH,MAAM,0BAA0B,GAAG,WAAW,CAAC,6BAA6B,CAAC,QAAQ,CAAC;AAEtF;;;;AAIG;AACH,MAAM,sBAAsB,GAAG,0BAA0B,CAAC,oBAAoB,CAAC;AAE/E;;;;AAIG;AACH,MAAM,k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-modules/tagging/wiring.ts"],"sourcesContent":["import type {\n AiSuggestionSearch,\n RelatedPrompt,\n Result,\n SemanticQuery,\n Taggable,\n Tagging,\n TaggingRequest,\n} from '@empathyco/x-types'\nimport type { FeatureLocation } from '../../types/index'\nimport type { DisplayWireMetadata, Wire } from '../../wiring/wiring.types'\nimport { DefaultSessionService } from '@empathyco/x-utils'\nimport { createOrigin } from '../../utils/index'\nimport { namespacedWireCommit, namespacedWireDispatch } from '../../wiring/namespaced-wires.factory'\nimport { namespacedDebounce } from '../../wiring/namespaced-wires.operators'\nimport { wireService, wireServiceWithoutPayload } from '../../wiring/wires.factory'\nimport { filter, mapWire } from '../../wiring/wires.operators'\nimport { createWiring } from '../../wiring/wiring.utils'\nimport { DefaultExternalTaggingService } from './service/external-tagging.service'\n\n/**\n * `tagging` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'tagging'\n\n/**\n * Debounce function for the module.\n */\nconst moduleDebounce = namespacedDebounce(moduleName)\n\n/**\n * WireCommit for {@link TaggingXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit(moduleName)\n\n/**\n * WireDispatch for {@link TaggingXModule}.\n *\n * @internal\n */\nconst wireDispatch = namespacedWireDispatch(moduleName)\n\n/**\n * Wires without payload factory for {@link DefaultSessionService}.\n */\nconst wireSessionServiceWithoutPayload = wireServiceWithoutPayload(DefaultSessionService.instance)\n\n/**\n * Wires factory for {@link DefaultExternalTaggingService}.\n */\nconst wireExternalTaggingService = wireService(DefaultExternalTaggingService.instance)\n\n/**\n * Stores the given result on the local storage.\n *\n * @public\n */\nconst storeClickedResultWire = wireExternalTaggingService('storeResultClicked')\n\n/**\n * Stores the result added to cart on the local storage.\n *\n * @public\n */\nconst storeAddToCartWire = wireExternalTaggingService('storeAddToCart')\n\n/**\n * Moves the result information from the local storage to session storage.\n *\n * @public\n */\nconst moveClickedResultToSessionWire = mapWire(\n wireExternalTaggingService('moveToSessionStorage'),\n (payload: string) => {\n return payload === 'url' ? undefined : payload\n },\n)\n\n/**\n * Triggers the add to cart tracking.\n *\n * @public\n */\nconst trackAddToCartFromSessionStorage = wireExternalTaggingService('trackAddToCart')\n\n/**\n * Clears the session id.\n *\n * @public\n */\nconst clearSessionWire = filter(\n wireSessionServiceWithoutPayload('clearSessionId'),\n ({ eventPayload: consent }) => !consent,\n)\n\n/**\n * Sets the tagging state `consent`.\n *\n * @public\n */\nexport const setConsent = wireCommit('setConsent')\n\n/**\n * Sets the tagging state `noResultsTaggingEnabled`.\n *\n * @public\n */\nexport const setNoResultsTaggingEnabledWire = wireCommit('setNoResultsTaggingEnabled')\n\n/**\n * Sets the tagging config state.\n *\n * @public\n */\nexport const setTaggingConfig = wireCommit('mergeConfig')\n\n/**\n * Tracks the tagging of the query.\n *\n * @public\n */\nexport const trackQueryWire = filter(\n wireDispatch('track'),\n ({ eventPayload, store }) =>\n ((eventPayload as TaggingRequest).params.totalHits as number) > 0 ||\n !store.state.x.tagging.noResultsTaggingEnabled,\n)\n\n/**\n * Tracks the tagging of the browse category.\n *\n * @public\n */\nexport const trackBrowseWire = filter(\n wireDispatch('track'),\n ({ eventPayload, store }) =>\n ((eventPayload as TaggingRequest).params.totalHits as number) > 0 ||\n !store.state.x.tagging.noResultsTaggingEnabled,\n)\n\n/**\n * Sets the tagging state of the query tagging info using a debounce which ends if the user\n * accepts a query.\n *\n * @public\n */\nexport const setQueryTaggingInfo = moduleDebounce(\n wireCommit('setQueryTaggingInfo'),\n ({ state }) => state.config.queryTaggingDebounceMs,\n {\n cancelOn: 'UserClearedQuery',\n forceOn: [\n 'UserClickedAResult',\n 'UserClickedAPromoted',\n 'UserClickedABanner',\n 'UserClickedARedirection',\n 'UserReachedResultsListEnd',\n ],\n },\n)\n\n/**\n * Sets the tagging state of the browse tagging info using a debounce which ends if the user\n * accepts a query.\n *\n * @public\n */\nexport const setBrowseTaggingInfo = moduleDebounce(\n wireCommit('setBrowseTaggingInfo'),\n ({ state }) => state.config.queryTaggingDebounceMs,\n {\n cancelOn: ['UserClickedOpenX', 'UserOpenXProgrammatically'],\n forceOn: [\n 'UserClickedAResult',\n 'UserClickedAPromoted',\n 'UserClickedABanner',\n 'UserClickedARedirection',\n 'UserReachedResultsListEnd',\n ],\n },\n)\n\n/**\n * Sets the tagging state of the query tagging info using.\n *\n * @public\n */\nexport const setQueryTaggingFromQueryPreview = createSetQueryTaggingFromQueryPreview()\n\n/**\n * Tracks the tagging of the result.\n *\n * @public\n */\nexport const trackResultClickedWire = createTrackWire('click')\n\n/**\n * Tracks the tagging of the banner.\n *\n * @public\n */\nexport const trackBannerClickedWire = createTrackWire('click')\n\n/**\n * Tracks the click on a promoted result.\n *\n * @public\n */\nexport const trackPromotedClickedWire = createTrackWire('click')\n\n/**\n * Performs a track of a result added to the cart.\n *\n * @public\n */\nexport const trackAddToCartWire = createTrackWire('add2cart')\n\n/**\n * Performs a track of a display result being clicked.\n *\n * @public\n */\nexport const trackDisplayClickedWire = createTrackDisplayWire('displayClick')\n\n/**\n * Performs a track of a display result being clicked.\n *\n * @public\n */\nexport const trackToolingDisplayClickedWire = createTrackToolingDisplayWire()\n\n/**\n * Performs a track of a display result being clicked.\n *\n * @public\n */\nexport const trackToolingAdd2CartWire = createTrackToolingAdd2CartWire()\n\n/**\n * Performs a track of a clicked related prompt.\n *\n * @public\n */\nexport const trackRelatedPromptToolingDisplayClickWire =\n createTrackRelatedPromptToolingDisplayClickWire()\n\n/**\n * Performs a track of a display element appearing.\n *\n * @public\n */\nexport const trackElementDisplayedWire = createTrackDisplayWire('display')\n\n/**\n * Factory helper to create a wire for the track of a taggable element.\n *\n * @param property - Key of the tagging object to track.\n * @returns A new wire for the given property of the taggable element.\n *\n * @public\n */\nexport function createTrackWire(property: keyof Tagging): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload: { tagging }, metadata: { location } }) => {\n const taggingInfo: TaggingRequest = tagging[property]\n taggingInfo.params.location = location as string\n return taggingInfo\n }),\n ({ eventPayload: { tagging }, metadata: { ignoreInModules } }) =>\n // eslint-disable-next-line ts/no-unsafe-member-access\n !!tagging?.[property] && !ignoreInModules?.includes(moduleName),\n )\n}\n\n/**\n * Performs a track of a query with no results that used related prompts or semantic queries as fallback.\n * The totalHits will be changed to -1 if related prompts or semantic queries are found in order to differentiate\n * it from scenarios where the user encounters a no-results page without any related prompts or semantic queries.\n *\n * @public\n */\nexport const trackNoResultsQueryWithFallbackWire = filter(\n wireDispatch('track', ({ eventPayload, state }) => {\n const { queryTaggingInfo } = state\n const totalHits = (eventPayload as RelatedPrompt[] | SemanticQuery[]).length > 0 ? -1 : 0\n return {\n params: { ...queryTaggingInfo?.params, totalHits },\n url: queryTaggingInfo?.url ?? '',\n }\n }),\n ({ store }) => Number(store.state.x.tagging.queryTaggingInfo?.params.totalHits) === 0,\n)\n\n/**.\n * Debounced version of {@link trackNoResultsQueryWithFallbackWire}\n *\n * @public\n */\nexport const trackNoResultsQueryWithFallbackWireDebounced = moduleDebounce(\n trackNoResultsQueryWithFallbackWire,\n ({ state }) => state.config.queryTaggingDebounceMs,\n { cancelOn: ['QueryPreviewUnmounted', 'RelatedPromptsUnmounted'] },\n)\n\n/**\n * Performs a track of a query with no results that used semantic queries as fallback.\n * The totalHits will be changed to -1 if semantic queries are found in order to differentiate\n * it from scenarios where the user encounters a no-results page without any semantic queries.\n *\n * @public\n * @deprecated - Use {@link trackNoResultsQueryWithFallbackWire} instead.\n */\nexport const trackNoResultsQueryWithSemanticsWire = trackNoResultsQueryWithFallbackWire\n\n/**\n * Debounced version of {@link trackNoResultsQueryWithFallbackWire}\n *\n * @public\n * @deprecated - Use {@link trackNoResultsQueryWithFallbackWireDebounced} instead.\n */\nexport const trackNoResultsQueryWithSemanticsWireDebounced =\n trackNoResultsQueryWithFallbackWireDebounced\n\n/**\n * Factory helper to create a wire for the track of the display click.\n *\n * @param property - Key of the tagging object to track.\n * @returns A new wire for the display click of the taggable element.\n *\n * @public\n */\nexport function createTrackDisplayWire(property: keyof Tagging): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload: { tagging }, metadata }) => {\n const taggingInfo: TaggingRequest = tagging[property]\n const location = metadata.location as FeatureLocation\n\n taggingInfo.params.location = location\n taggingInfo.params.displayFamily = createOrigin({\n feature: metadata.feature,\n location,\n })!\n taggingInfo.params.q = (metadata as DisplayWireMetadata).displayOriginalQuery\n\n return taggingInfo\n }),\n // eslint-disable-next-line ts/no-unsafe-member-access\n ({ eventPayload: { tagging } }) => !!tagging?.[property]?.url,\n )\n}\n\n/**\n * Update the tooling tagging params with the result information.\n *\n * @param taggingRequest - The tooling tagging request to be updated.\n * @param result - The clicked result.\n * @returns The tagging request updated.\n *\n * @internal\n */\nfunction updateToolingTaggingWithResult(\n taggingRequest: TaggingRequest,\n result: Result,\n): TaggingRequest {\n taggingRequest.params.productId = result.id\n taggingRequest.params.title = result.name!\n taggingRequest.params.url = result.url!\n\n return taggingRequest\n}\n\n/**\n * Factory helper to create a wire for the track of the tooling display click.\n *\n * @returns A new wire for the tooling display click of the taggable element.\n *\n * @public\n */\nexport function createTrackToolingDisplayWire(): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload, metadata }) => {\n const taggingInfo: TaggingRequest = metadata.toolingTagging as TaggingRequest\n const resultInfo = eventPayload as Result\n\n updateToolingTaggingWithResult(taggingInfo, resultInfo)\n\n return taggingInfo\n }),\n ({ metadata }) => !!metadata?.toolingTagging,\n )\n}\n\n/**\n * Factory helper to create a wire for the track of the tooling display add to cart.\n *\n * @returns A new wire for the tooling display add to cart of the taggable element.\n *\n * @public\n */\nexport function createTrackToolingAdd2CartWire(): Wire<Taggable> {\n return filter(\n wireDispatch('track', ({ eventPayload, metadata }) => {\n const taggingInfo: TaggingRequest = metadata.toolingAdd2CartTagging as TaggingRequest\n const resultInfo = eventPayload as Result\n\n updateToolingTaggingWithResult(taggingInfo, resultInfo)\n\n return taggingInfo\n }),\n ({ metadata }) => !!metadata?.toolingAdd2CartTagging,\n )\n}\n\n/**\n * Factory helper to create a wire for the track of the tooling display click in a related prompt.\n *\n * @returns A new wire for the tooling display click of the taggable element.\n *\n * @public\n */\nexport function createTrackRelatedPromptToolingDisplayClickWire() {\n return filter(\n wireDispatch('track', ({ metadata }) => {\n const relatedPrompt = metadata.relatedPrompt as RelatedPrompt\n const taggingInfo = relatedPrompt.tagging!.toolingDisplayClickTagging as TaggingRequest\n\n taggingInfo.params.productId = 'EXPAND'\n taggingInfo.params.title = relatedPrompt.suggestionText\n taggingInfo.params.url = 'none'\n\n return taggingInfo\n }),\n ({ metadata }) => {\n const relatedPrompt = metadata.relatedPrompt as RelatedPrompt | undefined\n const isUnselected = metadata?.selectedPrompt === -1\n const taggingInfo = relatedPrompt?.tagging?.toolingDisplayClickTagging\n return isUnselected && !!taggingInfo\n },\n )\n}\n\n/**\n * Factory helper to create a wire to set the queryTagging.\n *\n * @returns A new wire for the query of a result of a queryPreview.\n *\n * @public\n */\nexport function createSetQueryTaggingFromQueryPreview(): Wire<Taggable> {\n return filter(\n wireCommit(\n 'setQueryTaggingInfo',\n ({ metadata: { queryTagging } }) => queryTagging as TaggingRequest,\n ),\n ({ metadata: { queryTagging } }) => !!queryTagging,\n )\n}\n\n/**\n * Tracks query tagging of the AI suggestions-search.\n * @public\n */\nexport const trackAiSuggestionsSearchWire = wireDispatch('track', ({ eventPayload }) =>\n (eventPayload as AiSuggestionSearch[]).map(({ tagging }) => tagging.query),\n)\n\n/**\n * Wiring configuration for the {@link TaggingXModule | tagging module}.\n *\n * @internal\n */\nexport const taggingWiring = createWiring({\n ConsentProvided: {\n setConsent,\n },\n ConsentChanged: {\n clearSessionWire,\n },\n PDPIsLoaded: {\n moveClickedResultToSessionWire,\n },\n ResultURLTrackingEnabled: {\n moveClickedResultToSessionWire,\n },\n SearchTaggingChanged: {\n setQueryTaggingInfo,\n },\n SearchTaggingReceived: {\n trackQueryWire,\n },\n BrowseTaggingChanged: {\n setBrowseTaggingInfo,\n },\n BrowseTaggingReceived: {\n trackBrowseWire,\n },\n TrackableElementDisplayed: {\n trackElementDisplayedWire,\n },\n TaggingConfigProvided: {\n setTaggingConfig,\n },\n UserClickedAResult: {\n trackResultClickedWire,\n storeClickedResultWire,\n },\n UserClickedResultAddToCart: {\n trackAddToCartWire,\n trackResultClickedWire,\n storeAddToCartWire,\n },\n UserClickedPDPAddToCart: {\n trackAddToCartFromSessionStorage,\n },\n UserClickedABanner: {\n trackBannerClickedWire,\n },\n UserClickedAPromoted: {\n trackPromotedClickedWire,\n },\n UserClickedADisplayResult: {\n trackDisplayClickedWire,\n setQueryTaggingFromQueryPreview,\n },\n SemanticQueriesResponseChanged: {\n trackNoResultsQueryWithFallbackWireDebounced,\n },\n RelatedPromptsResponseChanged: {\n trackNoResultsQueryWithFallbackWireDebounced,\n },\n ModuleRegistered: {\n setNoResultsTaggingEnabledWire,\n },\n UserClickedARelatedPromptResult: {\n trackToolingDisplayClickedWire,\n },\n UserClickedARelatedPromptAdd2Cart: {\n trackToolingAdd2CartWire,\n },\n UserSelectedARelatedPrompt: {\n trackRelatedPromptToolingDisplayClickWire,\n },\n AiSuggestionsSearchChanged: {\n trackAiSuggestionsSearchWire,\n },\n UserClickedAnAiCarouselResult: {\n trackToolingDisplayClickedWire,\n },\n UserClickedAnAiCarouselAdd2Cart: {\n trackToolingAdd2CartWire,\n },\n})\n"],"names":[],"mappings":";;;;;;;;;;AAoBA;;;;AAIG;AACH,MAAM,UAAU,GAAG,SAAS;AAE5B;;AAEG;AACH,MAAM,cAAc,GAAG,kBAAkB,CAAC,UAAU,CAAC;AAErD;;;;AAIG;AACH,MAAM,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC;AAEnD;;;;AAIG;AACH,MAAM,YAAY,GAAG,sBAAsB,CAAC,UAAU,CAAC;AAEvD;;AAEG;AACH,MAAM,gCAAgC,GAAG,yBAAyB,CAAC,qBAAqB,CAAC,QAAQ,CAAC;AAElG;;AAEG;AACH,MAAM,0BAA0B,GAAG,WAAW,CAAC,6BAA6B,CAAC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