@coveo/atomic 3.61.0 → 3.61.1
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/custom-elements.json +321 -295
- package/dist/cjs/components/commerce/atomic-commerce-product-list/atomic-commerce-product-list.cjs +6 -3
- package/dist/cjs/components/commerce/atomic-commerce-recommendation-list/atomic-commerce-recommendation-list.cjs +4 -1
- package/dist/cjs/components/commerce/atomic-product-field-condition/atomic-product-field-condition.cjs +7 -2
- package/dist/cjs/components/search/atomic-field-condition/atomic-field-condition.cjs +5 -3
- package/dist/cjs/components/search/result-template-components/quickview-iframe/quickview-iframe.cjs +4 -2
- package/dist/cjs/generated/dayjs-locales-data.cjs +16 -16
- package/dist/cjs/global/environment.cjs +1 -1
- package/dist/cjs/versions.cjs +1 -1
- package/dist/esm/components/commerce/atomic-commerce-product-list/atomic-commerce-product-list.js +6 -3
- package/dist/esm/components/commerce/atomic-commerce-recommendation-list/atomic-commerce-recommendation-list.js +4 -1
- package/dist/esm/components/commerce/atomic-product-field-condition/atomic-product-field-condition.js +8 -3
- package/dist/esm/components/search/atomic-field-condition/atomic-field-condition.js +6 -4
- package/dist/esm/components/search/result-template-components/quickview-iframe/quickview-iframe.js +4 -2
- package/dist/esm/generated/dayjs-locales-data.js +16 -16
- package/dist/esm/global/environment.js +1 -1
- package/dist/esm/versions.js +1 -1
- package/dist/types/components/commerce/atomic-commerce-product-list/atomic-commerce-product-list.d.ts +1 -0
- package/dist/types/components/commerce/atomic-commerce-recommendation-list/atomic-commerce-recommendation-list.d.ts +1 -0
- package/dist/types/components/commerce/atomic-product-field-condition/atomic-product-field-condition.d.ts +2 -2
- package/dist/types/components/search/atomic-field-condition/atomic-field-condition.d.ts +2 -2
- package/package.json +10 -10
package/dist/cjs/components/commerce/atomic-commerce-product-list/atomic-commerce-product-list.cjs
CHANGED
|
@@ -208,6 +208,9 @@ class AtomicCommerceProductList extends (0, children_update_complete_mixin_cjs_n
|
|
|
208
208
|
const displayPlaceholders = !(this.isAppLoaded && this.isEveryProductReady);
|
|
209
209
|
return (0, item_layout_utils_cjs_namespaceObject.getItemListDisplayClasses)(this.display, this.density, this.imageSize, this.searchOrListingState?.isLoading, displayPlaceholders);
|
|
210
210
|
}
|
|
211
|
+
getProductId(product) {
|
|
212
|
+
return this.productListCommon.getResultId(product.permanentid, product.responseId ?? this.searchOrListingState.responseId, this.density, this.imageSize);
|
|
213
|
+
}
|
|
211
214
|
renderGrid() {
|
|
212
215
|
return (0, external_lit_namespaceObject.html)`${(0, map_js_namespaceObject.map)(this.searchOrListingState.products, (product, index)=>(0, grid_layout_cjs_namespaceObject.renderGridLayout)({
|
|
213
216
|
props: {
|
|
@@ -220,7 +223,7 @@ class AtomicCommerceProductList extends (0, children_update_complete_mixin_cjs_n
|
|
|
220
223
|
element instanceof HTMLElement && this.productListCommon.setNewResultRef(element, index);
|
|
221
224
|
}
|
|
222
225
|
}
|
|
223
|
-
})((0, external_lit_namespaceObject.html)`${(0, keyed_js_namespaceObject.keyed)(this.
|
|
226
|
+
})((0, external_lit_namespaceObject.html)`${(0, keyed_js_namespaceObject.keyed)(this.getProductId(product), (0, external_lit_namespaceObject.html)`<atomic-product
|
|
224
227
|
.content=${this.productTemplateProvider.getTemplateContent(product)}
|
|
225
228
|
.density=${this.density}
|
|
226
229
|
.display=${this.display}
|
|
@@ -238,7 +241,7 @@ class AtomicCommerceProductList extends (0, children_update_complete_mixin_cjs_n
|
|
|
238
241
|
></atomic-product>`)}`))}`;
|
|
239
242
|
}
|
|
240
243
|
renderList() {
|
|
241
|
-
return (0, external_lit_namespaceObject.html)`${(0, map_js_namespaceObject.map)(this.searchOrListingState.products, (product, index)=>(0, external_lit_namespaceObject.html)`${(0, keyed_js_namespaceObject.keyed)(this.
|
|
244
|
+
return (0, external_lit_namespaceObject.html)`${(0, map_js_namespaceObject.map)(this.searchOrListingState.products, (product, index)=>(0, external_lit_namespaceObject.html)`${(0, keyed_js_namespaceObject.keyed)(this.getProductId(product), (0, external_lit_namespaceObject.html)`<atomic-product
|
|
242
245
|
part="outline"
|
|
243
246
|
${(0, ref_js_namespaceObject.ref)((element)=>element instanceof HTMLElement && this.productListCommon.setNewResultRef(element, index))}
|
|
244
247
|
.content=${this.productTemplateProvider.getTemplateContent(product)}
|
|
@@ -273,7 +276,7 @@ class AtomicCommerceProductList extends (0, children_update_complete_mixin_cjs_n
|
|
|
273
276
|
templateContentForFirstItem
|
|
274
277
|
}
|
|
275
278
|
})((0, external_lit_namespaceObject.html)`${(0, map_js_namespaceObject.map)(this.searchOrListingState.products, (product, index)=>{
|
|
276
|
-
const key = this.
|
|
279
|
+
const key = this.getProductId(product);
|
|
277
280
|
return (0, table_layout_cjs_namespaceObject.renderTableRow)({
|
|
278
281
|
props: {
|
|
279
282
|
key,
|
|
@@ -187,6 +187,9 @@ class AtomicCommerceRecommendationList extends (0, children_update_complete_mixi
|
|
|
187
187
|
if (this.summaryState.firstRequestExecuted) this.bindings.store.unsetLoadingFlag(this.loadingFlag);
|
|
188
188
|
});
|
|
189
189
|
}
|
|
190
|
+
getProductId(product) {
|
|
191
|
+
return this.productListCommon.getResultId(product.permanentid, product.responseId ?? this.recommendationsState.responseId, this.density, this.imageSize);
|
|
192
|
+
}
|
|
190
193
|
getAtomicProductProps(product) {
|
|
191
194
|
const linkContent = this.productTemplateProvider.getLinkTemplateContent(product);
|
|
192
195
|
return {
|
|
@@ -198,7 +201,7 @@ class AtomicCommerceRecommendationList extends (0, children_update_complete_mixi
|
|
|
198
201
|
product: product,
|
|
199
202
|
renderingFunction: this.itemRenderingFunction,
|
|
200
203
|
loadingFlag: this.loadingFlag,
|
|
201
|
-
key: this.
|
|
204
|
+
key: this.getProductId(product),
|
|
202
205
|
content: this.productTemplateProvider.getTemplateContent(product),
|
|
203
206
|
linkContent,
|
|
204
207
|
stopPropagation: !!linkContent,
|
|
@@ -58,8 +58,13 @@ class AtomicProductFieldCondition extends (0, light_dom_cjs_namespaceObject.Ligh
|
|
|
58
58
|
}
|
|
59
59
|
render() {
|
|
60
60
|
const product = this.productController.item;
|
|
61
|
-
if (!product
|
|
62
|
-
|
|
61
|
+
if (!product) {
|
|
62
|
+
this.hidden = true;
|
|
63
|
+
return external_lit_namespaceObject.nothing;
|
|
64
|
+
}
|
|
65
|
+
const conditionsMet = this.conditions.every((condition)=>condition(product));
|
|
66
|
+
this.hidden = !conditionsMet;
|
|
67
|
+
return conditionsMet ? (0, external_lit_namespaceObject.html)`<slot></slot>` : external_lit_namespaceObject.nothing;
|
|
63
68
|
}
|
|
64
69
|
constructor(...args){
|
|
65
70
|
super(...args), this.productController = (0, product_context_controller_cjs_namespaceObject.createProductContextController)(this);
|
|
@@ -63,11 +63,13 @@ class AtomicFieldCondition extends (0, light_dom_cjs_namespaceObject.LightDomMix
|
|
|
63
63
|
}
|
|
64
64
|
render() {
|
|
65
65
|
const result = this.getResult();
|
|
66
|
-
if (!result
|
|
66
|
+
if (!result) {
|
|
67
67
|
this.hidden = true;
|
|
68
|
-
return
|
|
68
|
+
return external_lit_namespaceObject.nothing;
|
|
69
69
|
}
|
|
70
|
-
|
|
70
|
+
const conditionsMet = this.conditions.every((condition)=>condition(result));
|
|
71
|
+
this.hidden = !conditionsMet;
|
|
72
|
+
return conditionsMet ? (0, external_lit_namespaceObject.html)`<slot></slot>` : external_lit_namespaceObject.nothing;
|
|
71
73
|
}
|
|
72
74
|
constructor(...args){
|
|
73
75
|
super(...args), this.resultController = (0, result_context_controller_cjs_namespaceObject.createResultContextController)(this);
|
package/dist/cjs/components/search/result-template-components/quickview-iframe/quickview-iframe.cjs
CHANGED
|
@@ -65,7 +65,6 @@ const iframeConnectedEvent = async (iframe, logger)=>{
|
|
|
65
65
|
};
|
|
66
66
|
const renderQuickviewIframe = ({ props })=>{
|
|
67
67
|
const { title, onSetIframeRef, uniqueIdentifier, content, sandbox, src, logger } = props;
|
|
68
|
-
const waitForIframeContentToBeWritten = ()=>new Promise((resolve)=>setTimeout(resolve));
|
|
69
68
|
const handleRef = (el)=>{
|
|
70
69
|
if (!el) return;
|
|
71
70
|
const iframeRef = el;
|
|
@@ -81,9 +80,12 @@ const renderQuickviewIframe = ({ props })=>{
|
|
|
81
80
|
return;
|
|
82
81
|
}
|
|
83
82
|
if (currentResultAlreadyWrittenToDocument(documentWriter, uniqueIdentifier)) return;
|
|
83
|
+
const contentLoaded = (0, event_utils_cjs_namespaceObject.eventPromise)(iframeRef, 'load', 5000);
|
|
84
84
|
writeDocument(documentWriter, content);
|
|
85
85
|
ensureSameResultIsNotOverwritten(documentWriter, uniqueIdentifier);
|
|
86
|
-
await
|
|
86
|
+
await contentLoaded.catch(()=>{
|
|
87
|
+
logger?.warn('Quickview timed out waiting for the iframe content to load.');
|
|
88
|
+
});
|
|
87
89
|
onSetIframeRef(iframeRef);
|
|
88
90
|
};
|
|
89
91
|
writeContentWhenReady();
|
|
@@ -30,8 +30,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
30
30
|
const locales = {
|
|
31
31
|
af: ()=>import("dayjs/locale/af"),
|
|
32
32
|
am: ()=>import("dayjs/locale/am"),
|
|
33
|
-
'ar-DZ': ()=>import("dayjs/locale/ar-dz"),
|
|
34
33
|
'ar-IQ': ()=>import("dayjs/locale/ar-iq"),
|
|
34
|
+
'ar-DZ': ()=>import("dayjs/locale/ar-dz"),
|
|
35
35
|
'ar-KW': ()=>import("dayjs/locale/ar-kw"),
|
|
36
36
|
'ar-LY': ()=>import("dayjs/locale/ar-ly"),
|
|
37
37
|
'ar-MA': ()=>import("dayjs/locale/ar-ma"),
|
|
@@ -54,12 +54,11 @@ const locales = {
|
|
|
54
54
|
cy: ()=>import("dayjs/locale/cy"),
|
|
55
55
|
da: ()=>import("dayjs/locale/da"),
|
|
56
56
|
'de-AT': ()=>import("dayjs/locale/de-at"),
|
|
57
|
-
de: ()=>import("dayjs/locale/de"),
|
|
58
57
|
'de-CH': ()=>import("dayjs/locale/de-ch"),
|
|
58
|
+
de: ()=>import("dayjs/locale/de"),
|
|
59
59
|
dv: ()=>import("dayjs/locale/dv"),
|
|
60
60
|
'en-AU': ()=>import("dayjs/locale/en-au"),
|
|
61
61
|
el: ()=>import("dayjs/locale/el"),
|
|
62
|
-
'en-CA': ()=>import("dayjs/locale/en-ca"),
|
|
63
62
|
'en-GB': ()=>import("dayjs/locale/en-gb"),
|
|
64
63
|
'en-IE': ()=>import("dayjs/locale/en-ie"),
|
|
65
64
|
'en-IL': ()=>import("dayjs/locale/en-il"),
|
|
@@ -67,26 +66,26 @@ const locales = {
|
|
|
67
66
|
'en-NZ': ()=>import("dayjs/locale/en-nz"),
|
|
68
67
|
'en-SG': ()=>import("dayjs/locale/en-sg"),
|
|
69
68
|
'en-TT': ()=>import("dayjs/locale/en-tt"),
|
|
69
|
+
'en-CA': ()=>import("dayjs/locale/en-ca"),
|
|
70
70
|
en: ()=>import("dayjs/locale/en"),
|
|
71
71
|
eo: ()=>import("dayjs/locale/eo"),
|
|
72
|
-
'es-DO': ()=>import("dayjs/locale/es-do"),
|
|
73
72
|
'es-MX': ()=>import("dayjs/locale/es-mx"),
|
|
74
73
|
'es-PR': ()=>import("dayjs/locale/es-pr"),
|
|
75
74
|
'es-US': ()=>import("dayjs/locale/es-us"),
|
|
76
|
-
es: ()=>import("dayjs/locale/es"),
|
|
75
|
+
'es-DO': ()=>import("dayjs/locale/es-do"),
|
|
77
76
|
et: ()=>import("dayjs/locale/et"),
|
|
78
77
|
eu: ()=>import("dayjs/locale/eu"),
|
|
79
78
|
fa: ()=>import("dayjs/locale/fa"),
|
|
80
79
|
fi: ()=>import("dayjs/locale/fi"),
|
|
81
|
-
fo: ()=>import("dayjs/locale/fo"),
|
|
82
80
|
'fr-CA': ()=>import("dayjs/locale/fr-ca"),
|
|
83
81
|
'fr-CH': ()=>import("dayjs/locale/fr-ch"),
|
|
84
82
|
fr: ()=>import("dayjs/locale/fr"),
|
|
83
|
+
fo: ()=>import("dayjs/locale/fo"),
|
|
85
84
|
fy: ()=>import("dayjs/locale/fy"),
|
|
86
85
|
ga: ()=>import("dayjs/locale/ga"),
|
|
86
|
+
gd: ()=>import("dayjs/locale/gd"),
|
|
87
87
|
gl: ()=>import("dayjs/locale/gl"),
|
|
88
88
|
'gom-LATN': ()=>import("dayjs/locale/gom-latn"),
|
|
89
|
-
gd: ()=>import("dayjs/locale/gd"),
|
|
90
89
|
gu: ()=>import("dayjs/locale/gu"),
|
|
91
90
|
he: ()=>import("dayjs/locale/he"),
|
|
92
91
|
hi: ()=>import("dayjs/locale/hi"),
|
|
@@ -98,17 +97,16 @@ const locales = {
|
|
|
98
97
|
is: ()=>import("dayjs/locale/is"),
|
|
99
98
|
'it-CH': ()=>import("dayjs/locale/it-ch"),
|
|
100
99
|
it: ()=>import("dayjs/locale/it"),
|
|
101
|
-
ja: ()=>import("dayjs/locale/ja"),
|
|
102
100
|
jv: ()=>import("dayjs/locale/jv"),
|
|
103
101
|
ka: ()=>import("dayjs/locale/ka"),
|
|
104
102
|
kk: ()=>import("dayjs/locale/kk"),
|
|
105
103
|
km: ()=>import("dayjs/locale/km"),
|
|
106
|
-
kn: ()=>import("dayjs/locale/kn"),
|
|
107
104
|
ko: ()=>import("dayjs/locale/ko"),
|
|
108
105
|
ku: ()=>import("dayjs/locale/ku"),
|
|
109
106
|
ky: ()=>import("dayjs/locale/ky"),
|
|
107
|
+
kn: ()=>import("dayjs/locale/kn"),
|
|
110
108
|
lb: ()=>import("dayjs/locale/lb"),
|
|
111
|
-
|
|
109
|
+
ja: ()=>import("dayjs/locale/ja"),
|
|
112
110
|
lt: ()=>import("dayjs/locale/lt"),
|
|
113
111
|
lv: ()=>import("dayjs/locale/lv"),
|
|
114
112
|
me: ()=>import("dayjs/locale/me"),
|
|
@@ -120,19 +118,20 @@ const locales = {
|
|
|
120
118
|
'ms-MY': ()=>import("dayjs/locale/ms-my"),
|
|
121
119
|
ms: ()=>import("dayjs/locale/ms"),
|
|
122
120
|
mt: ()=>import("dayjs/locale/mt"),
|
|
121
|
+
lo: ()=>import("dayjs/locale/lo"),
|
|
123
122
|
my: ()=>import("dayjs/locale/my"),
|
|
124
123
|
nb: ()=>import("dayjs/locale/nb"),
|
|
125
124
|
ne: ()=>import("dayjs/locale/ne"),
|
|
126
|
-
'nl-BE': ()=>import("dayjs/locale/nl-be"),
|
|
127
125
|
nl: ()=>import("dayjs/locale/nl"),
|
|
126
|
+
'nl-BE': ()=>import("dayjs/locale/nl-be"),
|
|
128
127
|
nn: ()=>import("dayjs/locale/nn"),
|
|
129
|
-
'oc-LNC': ()=>import("dayjs/locale/oc-lnc"),
|
|
130
128
|
'pa-IN': ()=>import("dayjs/locale/pa-in"),
|
|
131
129
|
pl: ()=>import("dayjs/locale/pl"),
|
|
132
130
|
'pt-BR': ()=>import("dayjs/locale/pt-br"),
|
|
133
131
|
pt: ()=>import("dayjs/locale/pt"),
|
|
134
132
|
rn: ()=>import("dayjs/locale/rn"),
|
|
135
133
|
ro: ()=>import("dayjs/locale/ro"),
|
|
134
|
+
es: ()=>import("dayjs/locale/es"),
|
|
136
135
|
ru: ()=>import("dayjs/locale/ru"),
|
|
137
136
|
rw: ()=>import("dayjs/locale/rw"),
|
|
138
137
|
sd: ()=>import("dayjs/locale/sd"),
|
|
@@ -140,6 +139,7 @@ const locales = {
|
|
|
140
139
|
si: ()=>import("dayjs/locale/si"),
|
|
141
140
|
sk: ()=>import("dayjs/locale/sk"),
|
|
142
141
|
sl: ()=>import("dayjs/locale/sl"),
|
|
142
|
+
'oc-LNC': ()=>import("dayjs/locale/oc-lnc"),
|
|
143
143
|
sq: ()=>import("dayjs/locale/sq"),
|
|
144
144
|
'sr-CYRL': ()=>import("dayjs/locale/sr-cyrl"),
|
|
145
145
|
sr: ()=>import("dayjs/locale/sr"),
|
|
@@ -151,21 +151,21 @@ const locales = {
|
|
|
151
151
|
te: ()=>import("dayjs/locale/te"),
|
|
152
152
|
tet: ()=>import("dayjs/locale/tet"),
|
|
153
153
|
tg: ()=>import("dayjs/locale/tg"),
|
|
154
|
-
tk: ()=>import("dayjs/locale/tk"),
|
|
155
154
|
th: ()=>import("dayjs/locale/th"),
|
|
156
155
|
'tl-PH': ()=>import("dayjs/locale/tl-ph"),
|
|
157
|
-
tr: ()=>import("dayjs/locale/tr"),
|
|
158
156
|
tlh: ()=>import("dayjs/locale/tlh"),
|
|
159
|
-
|
|
160
|
-
tzm: ()=>import("dayjs/locale/tzm"),
|
|
157
|
+
tr: ()=>import("dayjs/locale/tr"),
|
|
161
158
|
tzl: ()=>import("dayjs/locale/tzl"),
|
|
159
|
+
tzm: ()=>import("dayjs/locale/tzm"),
|
|
162
160
|
'ug-CN': ()=>import("dayjs/locale/ug-cn"),
|
|
163
161
|
uk: ()=>import("dayjs/locale/uk"),
|
|
162
|
+
tk: ()=>import("dayjs/locale/tk"),
|
|
164
163
|
ur: ()=>import("dayjs/locale/ur"),
|
|
165
164
|
'uz-LATN': ()=>import("dayjs/locale/uz-latn"),
|
|
166
165
|
uz: ()=>import("dayjs/locale/uz"),
|
|
167
166
|
vi: ()=>import("dayjs/locale/vi"),
|
|
168
167
|
'x-PSEUDO': ()=>import("dayjs/locale/x-pseudo"),
|
|
168
|
+
'tzm-LATN': ()=>import("dayjs/locale/tzm-latn"),
|
|
169
169
|
yo: ()=>import("dayjs/locale/yo"),
|
|
170
170
|
'zh-CN': ()=>import("dayjs/locale/zh-cn"),
|
|
171
171
|
'zh-HK': ()=>import("dayjs/locale/zh-hk"),
|
package/dist/cjs/versions.cjs
CHANGED
|
@@ -32,7 +32,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
32
32
|
headlessVersion: ()=>package_json_namespaceObject.version
|
|
33
33
|
});
|
|
34
34
|
const package_json_namespaceObject = require("@coveo/headless/package.json");
|
|
35
|
-
const atomicVersion = "3.61.
|
|
35
|
+
const atomicVersion = "3.61.1";
|
|
36
36
|
exports.atomicVersion = __webpack_exports__.atomicVersion;
|
|
37
37
|
exports.headlessVersion = __webpack_exports__.headlessVersion;
|
|
38
38
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
package/dist/esm/components/commerce/atomic-commerce-product-list/atomic-commerce-product-list.js
CHANGED
|
@@ -163,6 +163,9 @@ class AtomicCommerceProductList extends ChildrenUpdateCompleteMixin(LitElement)
|
|
|
163
163
|
const displayPlaceholders = !(this.isAppLoaded && this.isEveryProductReady);
|
|
164
164
|
return getItemListDisplayClasses(this.display, this.density, this.imageSize, this.searchOrListingState?.isLoading, displayPlaceholders);
|
|
165
165
|
}
|
|
166
|
+
getProductId(product) {
|
|
167
|
+
return this.productListCommon.getResultId(product.permanentid, product.responseId ?? this.searchOrListingState.responseId, this.density, this.imageSize);
|
|
168
|
+
}
|
|
166
169
|
renderGrid() {
|
|
167
170
|
return html`${map(this.searchOrListingState.products, (product, index)=>renderGridLayout({
|
|
168
171
|
props: {
|
|
@@ -175,7 +178,7 @@ class AtomicCommerceProductList extends ChildrenUpdateCompleteMixin(LitElement)
|
|
|
175
178
|
element instanceof HTMLElement && this.productListCommon.setNewResultRef(element, index);
|
|
176
179
|
}
|
|
177
180
|
}
|
|
178
|
-
})(html`${keyed(this.
|
|
181
|
+
})(html`${keyed(this.getProductId(product), html`<atomic-product
|
|
179
182
|
.content=${this.productTemplateProvider.getTemplateContent(product)}
|
|
180
183
|
.density=${this.density}
|
|
181
184
|
.display=${this.display}
|
|
@@ -193,7 +196,7 @@ class AtomicCommerceProductList extends ChildrenUpdateCompleteMixin(LitElement)
|
|
|
193
196
|
></atomic-product>`)}`))}`;
|
|
194
197
|
}
|
|
195
198
|
renderList() {
|
|
196
|
-
return html`${map(this.searchOrListingState.products, (product, index)=>html`${keyed(this.
|
|
199
|
+
return html`${map(this.searchOrListingState.products, (product, index)=>html`${keyed(this.getProductId(product), html`<atomic-product
|
|
197
200
|
part="outline"
|
|
198
201
|
${ref((element)=>element instanceof HTMLElement && this.productListCommon.setNewResultRef(element, index))}
|
|
199
202
|
.content=${this.productTemplateProvider.getTemplateContent(product)}
|
|
@@ -228,7 +231,7 @@ class AtomicCommerceProductList extends ChildrenUpdateCompleteMixin(LitElement)
|
|
|
228
231
|
templateContentForFirstItem
|
|
229
232
|
}
|
|
230
233
|
})(html`${map(this.searchOrListingState.products, (product, index)=>{
|
|
231
|
-
const key = this.
|
|
234
|
+
const key = this.getProductId(product);
|
|
232
235
|
return renderTableRow({
|
|
233
236
|
props: {
|
|
234
237
|
key,
|
|
@@ -145,6 +145,9 @@ class AtomicCommerceRecommendationList extends ChildrenUpdateCompleteMixin(LitEl
|
|
|
145
145
|
if (this.summaryState.firstRequestExecuted) this.bindings.store.unsetLoadingFlag(this.loadingFlag);
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
+
getProductId(product) {
|
|
149
|
+
return this.productListCommon.getResultId(product.permanentid, product.responseId ?? this.recommendationsState.responseId, this.density, this.imageSize);
|
|
150
|
+
}
|
|
148
151
|
getAtomicProductProps(product) {
|
|
149
152
|
const linkContent = this.productTemplateProvider.getLinkTemplateContent(product);
|
|
150
153
|
return {
|
|
@@ -156,7 +159,7 @@ class AtomicCommerceRecommendationList extends ChildrenUpdateCompleteMixin(LitEl
|
|
|
156
159
|
product: product,
|
|
157
160
|
renderingFunction: this.itemRenderingFunction,
|
|
158
161
|
loadingFlag: this.loadingFlag,
|
|
159
|
-
key: this.
|
|
162
|
+
key: this.getProductId(product),
|
|
160
163
|
content: this.productTemplateProvider.getTemplateContent(product),
|
|
161
164
|
linkContent,
|
|
162
165
|
stopPropagation: !!linkContent,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProductTemplatesHelpers } from "@coveo/headless/commerce";
|
|
2
|
-
import { LitElement, html } from "lit";
|
|
2
|
+
import { LitElement, html, nothing } from "lit";
|
|
3
3
|
import { customElement, property, state } from "lit/decorators.js";
|
|
4
4
|
import { createProductContextController } from "../product-template-component-utils/context/product-context-controller.js";
|
|
5
5
|
import { makeDefinedConditions, makeMatchConditions } from "../../common/template-controller/template-utils.js";
|
|
@@ -26,8 +26,13 @@ class AtomicProductFieldCondition extends LightDomMixin(LitElement) {
|
|
|
26
26
|
}
|
|
27
27
|
render() {
|
|
28
28
|
const product = this.productController.item;
|
|
29
|
-
if (!product
|
|
30
|
-
|
|
29
|
+
if (!product) {
|
|
30
|
+
this.hidden = true;
|
|
31
|
+
return nothing;
|
|
32
|
+
}
|
|
33
|
+
const conditionsMet = this.conditions.every((condition)=>condition(product));
|
|
34
|
+
this.hidden = !conditionsMet;
|
|
35
|
+
return conditionsMet ? html`<slot></slot>` : nothing;
|
|
31
36
|
}
|
|
32
37
|
constructor(...args){
|
|
33
38
|
super(...args), this.productController = createProductContextController(this);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ResultTemplatesHelpers } from "@coveo/headless";
|
|
2
|
-
import { LitElement, html } from "lit";
|
|
2
|
+
import { LitElement, html, nothing } from "lit";
|
|
3
3
|
import { customElement, property, state } from "lit/decorators.js";
|
|
4
4
|
import { makeDefinedConditions, makeMatchConditions } from "../../common/template-controller/template-utils.js";
|
|
5
5
|
import { createResultContextController } from "../result-template-component-utils/context/result-context-controller.js";
|
|
@@ -31,11 +31,13 @@ class AtomicFieldCondition extends LightDomMixin(LitElement) {
|
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
33
|
const result = this.getResult();
|
|
34
|
-
if (!result
|
|
34
|
+
if (!result) {
|
|
35
35
|
this.hidden = true;
|
|
36
|
-
return
|
|
36
|
+
return nothing;
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
const conditionsMet = this.conditions.every((condition)=>condition(result));
|
|
39
|
+
this.hidden = !conditionsMet;
|
|
40
|
+
return conditionsMet ? html`<slot></slot>` : nothing;
|
|
39
41
|
}
|
|
40
42
|
constructor(...args){
|
|
41
43
|
super(...args), this.resultController = createResultContextController(this);
|
package/dist/esm/components/search/result-template-components/quickview-iframe/quickview-iframe.js
CHANGED
|
@@ -33,7 +33,6 @@ const iframeConnectedEvent = async (iframe, logger)=>{
|
|
|
33
33
|
};
|
|
34
34
|
const renderQuickviewIframe = ({ props })=>{
|
|
35
35
|
const { title, onSetIframeRef, uniqueIdentifier, content, sandbox, src, logger } = props;
|
|
36
|
-
const waitForIframeContentToBeWritten = ()=>new Promise((resolve)=>setTimeout(resolve));
|
|
37
36
|
const handleRef = (el)=>{
|
|
38
37
|
if (!el) return;
|
|
39
38
|
const iframeRef = el;
|
|
@@ -49,9 +48,12 @@ const renderQuickviewIframe = ({ props })=>{
|
|
|
49
48
|
return;
|
|
50
49
|
}
|
|
51
50
|
if (currentResultAlreadyWrittenToDocument(documentWriter, uniqueIdentifier)) return;
|
|
51
|
+
const contentLoaded = eventPromise(iframeRef, 'load', 5000);
|
|
52
52
|
writeDocument(documentWriter, content);
|
|
53
53
|
ensureSameResultIsNotOverwritten(documentWriter, uniqueIdentifier);
|
|
54
|
-
await
|
|
54
|
+
await contentLoaded.catch(()=>{
|
|
55
|
+
logger?.warn('Quickview timed out waiting for the iframe content to load.');
|
|
56
|
+
});
|
|
55
57
|
onSetIframeRef(iframeRef);
|
|
56
58
|
};
|
|
57
59
|
writeContentWhenReady();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const locales = {
|
|
2
2
|
af: ()=>import("dayjs/locale/af"),
|
|
3
3
|
am: ()=>import("dayjs/locale/am"),
|
|
4
|
-
'ar-DZ': ()=>import("dayjs/locale/ar-dz"),
|
|
5
4
|
'ar-IQ': ()=>import("dayjs/locale/ar-iq"),
|
|
5
|
+
'ar-DZ': ()=>import("dayjs/locale/ar-dz"),
|
|
6
6
|
'ar-KW': ()=>import("dayjs/locale/ar-kw"),
|
|
7
7
|
'ar-LY': ()=>import("dayjs/locale/ar-ly"),
|
|
8
8
|
'ar-MA': ()=>import("dayjs/locale/ar-ma"),
|
|
@@ -25,12 +25,11 @@ const locales = {
|
|
|
25
25
|
cy: ()=>import("dayjs/locale/cy"),
|
|
26
26
|
da: ()=>import("dayjs/locale/da"),
|
|
27
27
|
'de-AT': ()=>import("dayjs/locale/de-at"),
|
|
28
|
-
de: ()=>import("dayjs/locale/de"),
|
|
29
28
|
'de-CH': ()=>import("dayjs/locale/de-ch"),
|
|
29
|
+
de: ()=>import("dayjs/locale/de"),
|
|
30
30
|
dv: ()=>import("dayjs/locale/dv"),
|
|
31
31
|
'en-AU': ()=>import("dayjs/locale/en-au"),
|
|
32
32
|
el: ()=>import("dayjs/locale/el"),
|
|
33
|
-
'en-CA': ()=>import("dayjs/locale/en-ca"),
|
|
34
33
|
'en-GB': ()=>import("dayjs/locale/en-gb"),
|
|
35
34
|
'en-IE': ()=>import("dayjs/locale/en-ie"),
|
|
36
35
|
'en-IL': ()=>import("dayjs/locale/en-il"),
|
|
@@ -38,26 +37,26 @@ const locales = {
|
|
|
38
37
|
'en-NZ': ()=>import("dayjs/locale/en-nz"),
|
|
39
38
|
'en-SG': ()=>import("dayjs/locale/en-sg"),
|
|
40
39
|
'en-TT': ()=>import("dayjs/locale/en-tt"),
|
|
40
|
+
'en-CA': ()=>import("dayjs/locale/en-ca"),
|
|
41
41
|
en: ()=>import("dayjs/locale/en"),
|
|
42
42
|
eo: ()=>import("dayjs/locale/eo"),
|
|
43
|
-
'es-DO': ()=>import("dayjs/locale/es-do"),
|
|
44
43
|
'es-MX': ()=>import("dayjs/locale/es-mx"),
|
|
45
44
|
'es-PR': ()=>import("dayjs/locale/es-pr"),
|
|
46
45
|
'es-US': ()=>import("dayjs/locale/es-us"),
|
|
47
|
-
es: ()=>import("dayjs/locale/es"),
|
|
46
|
+
'es-DO': ()=>import("dayjs/locale/es-do"),
|
|
48
47
|
et: ()=>import("dayjs/locale/et"),
|
|
49
48
|
eu: ()=>import("dayjs/locale/eu"),
|
|
50
49
|
fa: ()=>import("dayjs/locale/fa"),
|
|
51
50
|
fi: ()=>import("dayjs/locale/fi"),
|
|
52
|
-
fo: ()=>import("dayjs/locale/fo"),
|
|
53
51
|
'fr-CA': ()=>import("dayjs/locale/fr-ca"),
|
|
54
52
|
'fr-CH': ()=>import("dayjs/locale/fr-ch"),
|
|
55
53
|
fr: ()=>import("dayjs/locale/fr"),
|
|
54
|
+
fo: ()=>import("dayjs/locale/fo"),
|
|
56
55
|
fy: ()=>import("dayjs/locale/fy"),
|
|
57
56
|
ga: ()=>import("dayjs/locale/ga"),
|
|
57
|
+
gd: ()=>import("dayjs/locale/gd"),
|
|
58
58
|
gl: ()=>import("dayjs/locale/gl"),
|
|
59
59
|
'gom-LATN': ()=>import("dayjs/locale/gom-latn"),
|
|
60
|
-
gd: ()=>import("dayjs/locale/gd"),
|
|
61
60
|
gu: ()=>import("dayjs/locale/gu"),
|
|
62
61
|
he: ()=>import("dayjs/locale/he"),
|
|
63
62
|
hi: ()=>import("dayjs/locale/hi"),
|
|
@@ -69,17 +68,16 @@ const locales = {
|
|
|
69
68
|
is: ()=>import("dayjs/locale/is"),
|
|
70
69
|
'it-CH': ()=>import("dayjs/locale/it-ch"),
|
|
71
70
|
it: ()=>import("dayjs/locale/it"),
|
|
72
|
-
ja: ()=>import("dayjs/locale/ja"),
|
|
73
71
|
jv: ()=>import("dayjs/locale/jv"),
|
|
74
72
|
ka: ()=>import("dayjs/locale/ka"),
|
|
75
73
|
kk: ()=>import("dayjs/locale/kk"),
|
|
76
74
|
km: ()=>import("dayjs/locale/km"),
|
|
77
|
-
kn: ()=>import("dayjs/locale/kn"),
|
|
78
75
|
ko: ()=>import("dayjs/locale/ko"),
|
|
79
76
|
ku: ()=>import("dayjs/locale/ku"),
|
|
80
77
|
ky: ()=>import("dayjs/locale/ky"),
|
|
78
|
+
kn: ()=>import("dayjs/locale/kn"),
|
|
81
79
|
lb: ()=>import("dayjs/locale/lb"),
|
|
82
|
-
|
|
80
|
+
ja: ()=>import("dayjs/locale/ja"),
|
|
83
81
|
lt: ()=>import("dayjs/locale/lt"),
|
|
84
82
|
lv: ()=>import("dayjs/locale/lv"),
|
|
85
83
|
me: ()=>import("dayjs/locale/me"),
|
|
@@ -91,19 +89,20 @@ const locales = {
|
|
|
91
89
|
'ms-MY': ()=>import("dayjs/locale/ms-my"),
|
|
92
90
|
ms: ()=>import("dayjs/locale/ms"),
|
|
93
91
|
mt: ()=>import("dayjs/locale/mt"),
|
|
92
|
+
lo: ()=>import("dayjs/locale/lo"),
|
|
94
93
|
my: ()=>import("dayjs/locale/my"),
|
|
95
94
|
nb: ()=>import("dayjs/locale/nb"),
|
|
96
95
|
ne: ()=>import("dayjs/locale/ne"),
|
|
97
|
-
'nl-BE': ()=>import("dayjs/locale/nl-be"),
|
|
98
96
|
nl: ()=>import("dayjs/locale/nl"),
|
|
97
|
+
'nl-BE': ()=>import("dayjs/locale/nl-be"),
|
|
99
98
|
nn: ()=>import("dayjs/locale/nn"),
|
|
100
|
-
'oc-LNC': ()=>import("dayjs/locale/oc-lnc"),
|
|
101
99
|
'pa-IN': ()=>import("dayjs/locale/pa-in"),
|
|
102
100
|
pl: ()=>import("dayjs/locale/pl"),
|
|
103
101
|
'pt-BR': ()=>import("dayjs/locale/pt-br"),
|
|
104
102
|
pt: ()=>import("dayjs/locale/pt"),
|
|
105
103
|
rn: ()=>import("dayjs/locale/rn"),
|
|
106
104
|
ro: ()=>import("dayjs/locale/ro"),
|
|
105
|
+
es: ()=>import("dayjs/locale/es"),
|
|
107
106
|
ru: ()=>import("dayjs/locale/ru"),
|
|
108
107
|
rw: ()=>import("dayjs/locale/rw"),
|
|
109
108
|
sd: ()=>import("dayjs/locale/sd"),
|
|
@@ -111,6 +110,7 @@ const locales = {
|
|
|
111
110
|
si: ()=>import("dayjs/locale/si"),
|
|
112
111
|
sk: ()=>import("dayjs/locale/sk"),
|
|
113
112
|
sl: ()=>import("dayjs/locale/sl"),
|
|
113
|
+
'oc-LNC': ()=>import("dayjs/locale/oc-lnc"),
|
|
114
114
|
sq: ()=>import("dayjs/locale/sq"),
|
|
115
115
|
'sr-CYRL': ()=>import("dayjs/locale/sr-cyrl"),
|
|
116
116
|
sr: ()=>import("dayjs/locale/sr"),
|
|
@@ -122,21 +122,21 @@ const locales = {
|
|
|
122
122
|
te: ()=>import("dayjs/locale/te"),
|
|
123
123
|
tet: ()=>import("dayjs/locale/tet"),
|
|
124
124
|
tg: ()=>import("dayjs/locale/tg"),
|
|
125
|
-
tk: ()=>import("dayjs/locale/tk"),
|
|
126
125
|
th: ()=>import("dayjs/locale/th"),
|
|
127
126
|
'tl-PH': ()=>import("dayjs/locale/tl-ph"),
|
|
128
|
-
tr: ()=>import("dayjs/locale/tr"),
|
|
129
127
|
tlh: ()=>import("dayjs/locale/tlh"),
|
|
130
|
-
|
|
131
|
-
tzm: ()=>import("dayjs/locale/tzm"),
|
|
128
|
+
tr: ()=>import("dayjs/locale/tr"),
|
|
132
129
|
tzl: ()=>import("dayjs/locale/tzl"),
|
|
130
|
+
tzm: ()=>import("dayjs/locale/tzm"),
|
|
133
131
|
'ug-CN': ()=>import("dayjs/locale/ug-cn"),
|
|
134
132
|
uk: ()=>import("dayjs/locale/uk"),
|
|
133
|
+
tk: ()=>import("dayjs/locale/tk"),
|
|
135
134
|
ur: ()=>import("dayjs/locale/ur"),
|
|
136
135
|
'uz-LATN': ()=>import("dayjs/locale/uz-latn"),
|
|
137
136
|
uz: ()=>import("dayjs/locale/uz"),
|
|
138
137
|
vi: ()=>import("dayjs/locale/vi"),
|
|
139
138
|
'x-PSEUDO': ()=>import("dayjs/locale/x-pseudo"),
|
|
139
|
+
'tzm-LATN': ()=>import("dayjs/locale/tzm-latn"),
|
|
140
140
|
yo: ()=>import("dayjs/locale/yo"),
|
|
141
141
|
'zh-CN': ()=>import("dayjs/locale/zh-cn"),
|
|
142
142
|
'zh-HK': ()=>import("dayjs/locale/zh-hk"),
|
package/dist/esm/versions.js
CHANGED
|
@@ -85,6 +85,7 @@ export declare class AtomicCommerceProductList extends AtomicCommerceProductList
|
|
|
85
85
|
private createSelectChildProductListener;
|
|
86
86
|
private selectChildProductCallback;
|
|
87
87
|
private computeListDisplayClasses;
|
|
88
|
+
private getProductId;
|
|
88
89
|
private renderGrid;
|
|
89
90
|
private renderList;
|
|
90
91
|
private renderTable;
|
|
@@ -114,6 +114,7 @@ export declare class AtomicCommerceRecommendationList extends AtomicCommerceReco
|
|
|
114
114
|
private get hasNoProducts();
|
|
115
115
|
private initRecommendations;
|
|
116
116
|
private initSummary;
|
|
117
|
+
private getProductId;
|
|
117
118
|
private getAtomicProductProps;
|
|
118
119
|
private initProductTemplateProvider;
|
|
119
120
|
private initProductListCommon;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
1
|
+
import { LitElement, nothing } from 'lit';
|
|
2
2
|
import type { InitializableComponent } from '../../../decorators/types';
|
|
3
3
|
import type { CommerceBindings } from '../atomic-commerce-interface/atomic-commerce-interface';
|
|
4
4
|
declare const AtomicProductFieldCondition_base: import("../../../mixins/mixin-common").Constructor<{
|
|
@@ -34,7 +34,7 @@ export declare class AtomicProductFieldCondition extends AtomicProductFieldCondi
|
|
|
34
34
|
mustNotMatch: Record<string, string[]>;
|
|
35
35
|
initialize(): void;
|
|
36
36
|
private get conditions();
|
|
37
|
-
render(): import("lit-html").TemplateResult<1
|
|
37
|
+
render(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
38
38
|
}
|
|
39
39
|
declare global {
|
|
40
40
|
interface HTMLElementTagNameMap {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
1
|
+
import { LitElement, nothing } from 'lit';
|
|
2
2
|
import type { Bindings } from '../atomic-search-interface/interfaces';
|
|
3
3
|
import type { InitializableComponent } from '../../../decorators/types';
|
|
4
4
|
declare const AtomicFieldCondition_base: import("../../../mixins/mixin-common").Constructor<{
|
|
@@ -35,7 +35,7 @@ export declare class AtomicFieldCondition extends AtomicFieldCondition_base impl
|
|
|
35
35
|
initialize(): void;
|
|
36
36
|
private get conditions();
|
|
37
37
|
private getResult;
|
|
38
|
-
render(): import("lit-html").TemplateResult<1
|
|
38
|
+
render(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
39
39
|
}
|
|
40
40
|
declare global {
|
|
41
41
|
interface HTMLElementTagNameMap {
|