@getlupa/client 1.21.3 → 1.22.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/dist/lupaSearch.iife.js +153 -57
- package/dist/lupaSearch.js +153 -57
- package/dist/lupaSearch.mjs +153 -57
- package/dist/lupaSearch.umd.js +153 -57
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/lupaSearch.umd.js
CHANGED
|
@@ -19175,6 +19175,18 @@ var __async = (__this, __arguments, generator) => {
|
|
|
19175
19175
|
params.value = parseParams(optionsStore.getQueryParamName, url.searchParams);
|
|
19176
19176
|
searchString.value = url.search;
|
|
19177
19177
|
};
|
|
19178
|
+
const getPageUrlWithNewParams = ({
|
|
19179
|
+
params: newParams,
|
|
19180
|
+
paramsToRemove,
|
|
19181
|
+
encode: encode2 = true,
|
|
19182
|
+
searchResultsLink: searchResultsLink2
|
|
19183
|
+
}) => {
|
|
19184
|
+
const url = getPageUrl(searchResultsLink2);
|
|
19185
|
+
paramsToRemove = getRemovableParams(url, optionsStore.getQueryParamName, paramsToRemove);
|
|
19186
|
+
removeParams(url, paramsToRemove);
|
|
19187
|
+
newParams.forEach((p2) => appendParam(url, p2, encode2));
|
|
19188
|
+
return url.search;
|
|
19189
|
+
};
|
|
19178
19190
|
const removeParameters = ({
|
|
19179
19191
|
paramsToRemove,
|
|
19180
19192
|
save = true
|
|
@@ -19312,6 +19324,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
19312
19324
|
sortParams,
|
|
19313
19325
|
lastChangedParams,
|
|
19314
19326
|
skipFacetReload,
|
|
19327
|
+
getPageUrlWithNewParams,
|
|
19315
19328
|
add,
|
|
19316
19329
|
removeAllFilters,
|
|
19317
19330
|
removeParameters,
|
|
@@ -31460,7 +31473,16 @@ and ensure you are accounting for this risk.
|
|
|
31460
31473
|
if (attr === "value" && (element == null ? void 0 : element.value)) {
|
|
31461
31474
|
return element.value;
|
|
31462
31475
|
}
|
|
31463
|
-
|
|
31476
|
+
const attributeValue = element.getAttribute(attr);
|
|
31477
|
+
if (attributeValue === null || attributeValue === void 0) {
|
|
31478
|
+
return options.default;
|
|
31479
|
+
}
|
|
31480
|
+
if (options.regex) {
|
|
31481
|
+
const regex = new RegExp(options.regex);
|
|
31482
|
+
const match = attributeValue.match(regex);
|
|
31483
|
+
return match ? match[1] : options.default;
|
|
31484
|
+
}
|
|
31485
|
+
return attributeValue;
|
|
31464
31486
|
};
|
|
31465
31487
|
const getValueFromPath = (obj, path) => {
|
|
31466
31488
|
return path.split(".").reduce((value, key) => value && value[key] || null, obj);
|
|
@@ -35144,8 +35166,7 @@ and ensure you are accounting for this risk.
|
|
|
35144
35166
|
key: 0,
|
|
35145
35167
|
class: "lupa-page-number-separator"
|
|
35146
35168
|
};
|
|
35147
|
-
const _hoisted_3$m =
|
|
35148
|
-
const _hoisted_4$e = {
|
|
35169
|
+
const _hoisted_3$m = {
|
|
35149
35170
|
key: 0,
|
|
35150
35171
|
class: "lupa-page-number-separator"
|
|
35151
35172
|
};
|
|
@@ -35212,7 +35233,24 @@ and ensure you are accounting for this risk.
|
|
|
35212
35233
|
timeout: (_f = (_e = searchResultOptions.value.scrollToResults) == null ? void 0 : _e.timeout) != null ? _f : 500
|
|
35213
35234
|
};
|
|
35214
35235
|
});
|
|
35215
|
-
const
|
|
35236
|
+
const tagName = computed(() => {
|
|
35237
|
+
return props.options.renderAsLinks ? "a" : "div";
|
|
35238
|
+
});
|
|
35239
|
+
const getPageUrlWithNewParams = (page) => {
|
|
35240
|
+
return paramStore.getPageUrlWithNewParams({
|
|
35241
|
+
params: [{ name: optionsStore.getQueryParamName(QUERY_PARAMS$1.PAGE), value: page.toString() }]
|
|
35242
|
+
});
|
|
35243
|
+
};
|
|
35244
|
+
const getHref = (page) => {
|
|
35245
|
+
if (props.options.renderAsLinks) {
|
|
35246
|
+
return getPageUrlWithNewParams(page);
|
|
35247
|
+
}
|
|
35248
|
+
return null;
|
|
35249
|
+
};
|
|
35250
|
+
const handlePageChange = (e2, page) => {
|
|
35251
|
+
if (e2 && props.options.renderAsLinks) {
|
|
35252
|
+
e2.preventDefault();
|
|
35253
|
+
}
|
|
35216
35254
|
if (page > 0) {
|
|
35217
35255
|
paramStore.appendParams({
|
|
35218
35256
|
params: [{ name: optionsStore.getQueryParamName(QUERY_PARAMS$1.PAGE), value: page.toString() }]
|
|
@@ -35226,46 +35264,78 @@ and ensure you are accounting for this risk.
|
|
|
35226
35264
|
}
|
|
35227
35265
|
};
|
|
35228
35266
|
return (_ctx, _cache) => {
|
|
35267
|
+
var _a25;
|
|
35229
35268
|
return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$D, [
|
|
35230
|
-
showBack.value ? (openBlock(),
|
|
35269
|
+
showBack.value ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35231
35270
|
key: 0,
|
|
35232
35271
|
class: normalizeClass(firstPageLabel.value === "<" ? "lupa-page-arrow" : "lupa-show-less"),
|
|
35233
|
-
|
|
35234
|
-
|
|
35272
|
+
href: getHref(_ctx.options.selectedPage - 1),
|
|
35273
|
+
onClick: _cache[0] || (_cache[0] = (e2) => handlePageChange(e2, _ctx.options.selectedPage - 1))
|
|
35274
|
+
}, {
|
|
35275
|
+
default: withCtx(() => [
|
|
35276
|
+
createTextVNode(toDisplayString(firstPageLabel.value), 1)
|
|
35277
|
+
]),
|
|
35278
|
+
_: 1
|
|
35279
|
+
}, 8, ["class", "href"])) : createCommentVNode("", true),
|
|
35235
35280
|
showFirstPage.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
35236
|
-
|
|
35281
|
+
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35282
|
+
href: getHref(1),
|
|
35237
35283
|
class: "lupa-page-number lupa-page-number-first",
|
|
35238
|
-
onClick: _cache[1] || (_cache[1] = () => handlePageChange(1))
|
|
35239
|
-
},
|
|
35284
|
+
onClick: _cache[1] || (_cache[1] = (e2) => handlePageChange(e2, 1))
|
|
35285
|
+
}, {
|
|
35286
|
+
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
35287
|
+
createTextVNode(" 1 ")
|
|
35288
|
+
])),
|
|
35289
|
+
_: 1,
|
|
35290
|
+
__: [4]
|
|
35291
|
+
}, 8, ["href"])),
|
|
35240
35292
|
showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$u, "...")) : createCommentVNode("", true)
|
|
35241
35293
|
], 64)) : createCommentVNode("", true),
|
|
35242
35294
|
(openBlock(true), createElementBlock(Fragment, null, renderList(pages.value, (page) => {
|
|
35243
|
-
return openBlock(),
|
|
35295
|
+
return openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35244
35296
|
key: page,
|
|
35245
|
-
|
|
35297
|
+
href: getHref(page),
|
|
35298
|
+
onClick: (e2) => handlePageChange(e2, page),
|
|
35246
35299
|
class: normalizeClass([
|
|
35247
35300
|
"lupa-page-number",
|
|
35248
35301
|
page === _ctx.options.selectedPage ? "lupa-page-number-selected" : ""
|
|
35249
35302
|
]),
|
|
35250
35303
|
"data-cy": "lupa-page-number"
|
|
35251
|
-
},
|
|
35304
|
+
}, {
|
|
35305
|
+
default: withCtx(() => [
|
|
35306
|
+
createTextVNode(toDisplayString(page), 1)
|
|
35307
|
+
]),
|
|
35308
|
+
_: 2
|
|
35309
|
+
}, 1032, ["href", "onClick", "class"]);
|
|
35252
35310
|
}), 128)),
|
|
35253
35311
|
showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
35254
|
-
showLastPageSeparator.value ? (openBlock(), createElementBlock("div",
|
|
35255
|
-
|
|
35312
|
+
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_3$m, "...")) : createCommentVNode("", true),
|
|
35313
|
+
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35314
|
+
href: getHref((_a25 = lastPage.value) != null ? _a25 : 1),
|
|
35256
35315
|
class: "lupa-page-number lupa-page-number-last",
|
|
35257
|
-
onClick: _cache[2] || (_cache[2] = () => {
|
|
35258
|
-
var
|
|
35259
|
-
return handlePageChange((
|
|
35316
|
+
onClick: _cache[2] || (_cache[2] = (e2) => {
|
|
35317
|
+
var _a26;
|
|
35318
|
+
return handlePageChange(e2, (_a26 = lastPage.value) != null ? _a26 : 1);
|
|
35260
35319
|
})
|
|
35261
|
-
},
|
|
35320
|
+
}, {
|
|
35321
|
+
default: withCtx(() => [
|
|
35322
|
+
createTextVNode(toDisplayString(lastPage.value), 1)
|
|
35323
|
+
]),
|
|
35324
|
+
_: 1
|
|
35325
|
+
}, 8, ["href"]))
|
|
35262
35326
|
], 64)) : createCommentVNode("", true),
|
|
35263
|
-
_ctx.options.selectedPage < _ctx.options.count ? (openBlock(),
|
|
35327
|
+
_ctx.options.selectedPage < _ctx.options.count ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35264
35328
|
key: 3,
|
|
35265
35329
|
class: normalizeClass(lastPageLabel.value === ">" ? "lupa-page-arrow" : "lupa-show-more"),
|
|
35330
|
+
href: getHref(_ctx.options.selectedPage + 1),
|
|
35266
35331
|
"data-cy": "lupa-show-more",
|
|
35267
|
-
onClick: _cache[3] || (_cache[3] = () => handlePageChange(_ctx.options.selectedPage + 1))
|
|
35268
|
-
},
|
|
35332
|
+
onClick: _cache[3] || (_cache[3] = (e2) => handlePageChange(e2, _ctx.options.selectedPage + 1))
|
|
35333
|
+
}, {
|
|
35334
|
+
default: withCtx(() => [
|
|
35335
|
+
createTextVNode(toDisplayString(lastPageLabel.value), 1)
|
|
35336
|
+
]),
|
|
35337
|
+
_: 1
|
|
35338
|
+
}, 8, ["class", "href"])) : createCommentVNode("", true)
|
|
35269
35339
|
])) : createCommentVNode("", true);
|
|
35270
35340
|
};
|
|
35271
35341
|
}
|
|
@@ -35279,7 +35349,7 @@ and ensure you are accounting for this risk.
|
|
|
35279
35349
|
class: "lupa-select-label",
|
|
35280
35350
|
for: "lupa-page-size-select-dropdown"
|
|
35281
35351
|
};
|
|
35282
|
-
const _hoisted_4$
|
|
35352
|
+
const _hoisted_4$e = ["aria-label"];
|
|
35283
35353
|
const _hoisted_5$a = ["value"];
|
|
35284
35354
|
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
35285
35355
|
__name: "SearchResultsPageSize",
|
|
@@ -35329,7 +35399,7 @@ and ensure you are accounting for this risk.
|
|
|
35329
35399
|
value: option
|
|
35330
35400
|
}, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$a);
|
|
35331
35401
|
}), 128))
|
|
35332
|
-
], 40, _hoisted_4$
|
|
35402
|
+
], 40, _hoisted_4$e)
|
|
35333
35403
|
])
|
|
35334
35404
|
]);
|
|
35335
35405
|
};
|
|
@@ -35344,7 +35414,7 @@ and ensure you are accounting for this risk.
|
|
|
35344
35414
|
class: "lupa-select-label",
|
|
35345
35415
|
for: "lupa-sort-select-dropdown"
|
|
35346
35416
|
};
|
|
35347
|
-
const _hoisted_4$
|
|
35417
|
+
const _hoisted_4$d = ["aria-label"];
|
|
35348
35418
|
const _hoisted_5$9 = ["value"];
|
|
35349
35419
|
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
35350
35420
|
__name: "SearchResultsSort",
|
|
@@ -35415,7 +35485,7 @@ and ensure you are accounting for this risk.
|
|
|
35415
35485
|
value: option.key
|
|
35416
35486
|
}, toDisplayString(option.label), 9, _hoisted_5$9);
|
|
35417
35487
|
}), 128))
|
|
35418
|
-
], 40, _hoisted_4$
|
|
35488
|
+
], 40, _hoisted_4$d), [
|
|
35419
35489
|
[vModelSelect, selectedKey.value]
|
|
35420
35490
|
])
|
|
35421
35491
|
])
|
|
@@ -35429,7 +35499,7 @@ and ensure you are accounting for this risk.
|
|
|
35429
35499
|
class: "lupa-toolbar-right-title"
|
|
35430
35500
|
};
|
|
35431
35501
|
const _hoisted_3$j = { key: 2 };
|
|
35432
|
-
const _hoisted_4$
|
|
35502
|
+
const _hoisted_4$c = { key: 4 };
|
|
35433
35503
|
const _hoisted_5$8 = { key: 6 };
|
|
35434
35504
|
const _hoisted_6$4 = { class: "lupa-toolbar-right" };
|
|
35435
35505
|
const _hoisted_7$2 = {
|
|
@@ -35499,6 +35569,7 @@ and ensure you are accounting for this risk.
|
|
|
35499
35569
|
}
|
|
35500
35570
|
});
|
|
35501
35571
|
const paginationOptions = computed(() => {
|
|
35572
|
+
var _a25;
|
|
35502
35573
|
const pageSelect = optionsValue.value.pagination.pageSelection;
|
|
35503
35574
|
return {
|
|
35504
35575
|
pageSize: {
|
|
@@ -35509,7 +35580,8 @@ and ensure you are accounting for this risk.
|
|
|
35509
35580
|
count: getPageCount(searchResult.value.total, limit.value),
|
|
35510
35581
|
selectedPage: page.value,
|
|
35511
35582
|
display: pageSelect.display,
|
|
35512
|
-
displayMobile: pageSelect.displayMobile
|
|
35583
|
+
displayMobile: pageSelect.displayMobile,
|
|
35584
|
+
renderAsLinks: (_a25 = pageSelect.renderAsLinks) != null ? _a25 : false
|
|
35513
35585
|
},
|
|
35514
35586
|
labels: optionsValue.value.labels
|
|
35515
35587
|
};
|
|
@@ -35557,7 +35629,7 @@ and ensure you are accounting for this risk.
|
|
|
35557
35629
|
label: searchSummaryLabel.value,
|
|
35558
35630
|
clearable: unref(hasAnyFilter) && showFilterClear.value,
|
|
35559
35631
|
onClear: handleClearAll
|
|
35560
|
-
}, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$
|
|
35632
|
+
}, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$c)),
|
|
35561
35633
|
displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$I, {
|
|
35562
35634
|
key: 5,
|
|
35563
35635
|
options: paginationOptions.value.pageSelect,
|
|
@@ -35610,7 +35682,7 @@ and ensure you are accounting for this risk.
|
|
|
35610
35682
|
const _hoisted_1$z = ["title", "innerHTML"];
|
|
35611
35683
|
const _hoisted_2$q = ["title"];
|
|
35612
35684
|
const _hoisted_3$i = ["href", "innerHTML"];
|
|
35613
|
-
const _hoisted_4$
|
|
35685
|
+
const _hoisted_4$b = ["title"];
|
|
35614
35686
|
const _hoisted_5$7 = {
|
|
35615
35687
|
key: 0,
|
|
35616
35688
|
class: "lupa-search-results-product-title-text"
|
|
@@ -35678,7 +35750,7 @@ and ensure you are accounting for this risk.
|
|
|
35678
35750
|
class: "lupa-search-results-product-title-text lupa-title-link",
|
|
35679
35751
|
onClick: handleNavigation
|
|
35680
35752
|
}, toDisplayString(title.value), 9, _hoisted_6$3)) : createCommentVNode("", true)
|
|
35681
|
-
], 12, _hoisted_4$
|
|
35753
|
+
], 12, _hoisted_4$b));
|
|
35682
35754
|
};
|
|
35683
35755
|
}
|
|
35684
35756
|
});
|
|
@@ -35721,7 +35793,7 @@ and ensure you are accounting for this risk.
|
|
|
35721
35793
|
const _hoisted_1$x = { id: "lupa-search-results-rating" };
|
|
35722
35794
|
const _hoisted_2$p = { class: "lupa-ratings" };
|
|
35723
35795
|
const _hoisted_3$h = { class: "lupa-ratings-base" };
|
|
35724
|
-
const _hoisted_4$
|
|
35796
|
+
const _hoisted_4$a = ["innerHTML"];
|
|
35725
35797
|
const _hoisted_5$6 = { class: "lupa-rating-wrapper" };
|
|
35726
35798
|
const _hoisted_6$2 = ["innerHTML"];
|
|
35727
35799
|
const _hoisted_7$1 = ["href"];
|
|
@@ -35771,7 +35843,7 @@ and ensure you are accounting for this risk.
|
|
|
35771
35843
|
key: index,
|
|
35772
35844
|
innerHTML: star,
|
|
35773
35845
|
class: "lupa-rating lupa-rating-not-highlighted"
|
|
35774
|
-
}, null, 8, _hoisted_4$
|
|
35846
|
+
}, null, 8, _hoisted_4$a);
|
|
35775
35847
|
}), 128))
|
|
35776
35848
|
]),
|
|
35777
35849
|
createBaseVNode("div", _hoisted_5$6, [
|
|
@@ -35864,7 +35936,7 @@ and ensure you are accounting for this risk.
|
|
|
35864
35936
|
const _hoisted_1$v = { class: "lupa-search-results-add-to-cart-wrapper" };
|
|
35865
35937
|
const _hoisted_2$o = { class: "lupa-search-results-product-addtocart" };
|
|
35866
35938
|
const _hoisted_3$g = ["disabled"];
|
|
35867
|
-
const _hoisted_4$
|
|
35939
|
+
const _hoisted_4$9 = ["href"];
|
|
35868
35940
|
const _hoisted_5$5 = ["id", "disabled"];
|
|
35869
35941
|
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
35870
35942
|
__name: "SearchResultsProductAddToCart",
|
|
@@ -35933,7 +36005,7 @@ and ensure you are accounting for this risk.
|
|
|
35933
36005
|
"data-cy": "lupa-add-to-cart",
|
|
35934
36006
|
disabled: !inStockValue.value || loading.value
|
|
35935
36007
|
}, _ctx.dynamicAttributes, { onClick: handleClick }), [
|
|
35936
|
-
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$
|
|
36008
|
+
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$9)
|
|
35937
36009
|
], 16, _hoisted_3$g)) : (openBlock(), createElementBlock("button", mergeProps({
|
|
35938
36010
|
key: 1,
|
|
35939
36011
|
id: id.value,
|
|
@@ -35951,7 +36023,7 @@ and ensure you are accounting for this risk.
|
|
|
35951
36023
|
const _hoisted_1$u = ["innerHTML"];
|
|
35952
36024
|
const _hoisted_2$n = { key: 0 };
|
|
35953
36025
|
const _hoisted_3$f = { key: 1 };
|
|
35954
|
-
const _hoisted_4$
|
|
36026
|
+
const _hoisted_4$8 = { class: "lupa-search-box-custom-label" };
|
|
35955
36027
|
const _hoisted_5$4 = { class: "lupa-search-box-custom-text" };
|
|
35956
36028
|
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
35957
36029
|
__name: "SearchResultsProductCustom",
|
|
@@ -35980,7 +36052,11 @@ and ensure you are accounting for this risk.
|
|
|
35980
36052
|
var _a25;
|
|
35981
36053
|
return (_a25 = props.options.isHtml) != null ? _a25 : false;
|
|
35982
36054
|
});
|
|
35983
|
-
const handleClick = () => __async2(null, null, function* () {
|
|
36055
|
+
const handleClick = (e2) => __async2(null, null, function* () {
|
|
36056
|
+
if (e2 && props.options.stopPropagationOnClick) {
|
|
36057
|
+
e2.stopPropagation();
|
|
36058
|
+
e2.preventDefault();
|
|
36059
|
+
}
|
|
35984
36060
|
if (!props.options.action) {
|
|
35985
36061
|
return;
|
|
35986
36062
|
}
|
|
@@ -35996,7 +36072,7 @@ and ensure you are accounting for this risk.
|
|
|
35996
36072
|
class: className.value
|
|
35997
36073
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), [
|
|
35998
36074
|
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$n, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$f, [
|
|
35999
|
-
createBaseVNode("div", _hoisted_4$
|
|
36075
|
+
createBaseVNode("div", _hoisted_4$8, toDisplayString(label.value), 1),
|
|
36000
36076
|
createBaseVNode("div", _hoisted_5$4, toDisplayString(text.value), 1)
|
|
36001
36077
|
]))
|
|
36002
36078
|
], 16));
|
|
@@ -36023,7 +36099,11 @@ and ensure you are accounting for this risk.
|
|
|
36023
36099
|
const className = computed(() => {
|
|
36024
36100
|
return props.options.className;
|
|
36025
36101
|
});
|
|
36026
|
-
const handleClick = () => __async2(null, null, function* () {
|
|
36102
|
+
const handleClick = (e2) => __async2(null, null, function* () {
|
|
36103
|
+
if (e2 && props.options.stopPropagationOnClick) {
|
|
36104
|
+
e2.stopPropagation();
|
|
36105
|
+
e2.preventDefault();
|
|
36106
|
+
}
|
|
36027
36107
|
if (!props.options.action) {
|
|
36028
36108
|
return;
|
|
36029
36109
|
}
|
|
@@ -36043,7 +36123,7 @@ and ensure you are accounting for this risk.
|
|
|
36043
36123
|
const _hoisted_1$s = { id: "lupa-search-results-rating" };
|
|
36044
36124
|
const _hoisted_2$m = ["innerHTML"];
|
|
36045
36125
|
const _hoisted_3$e = { class: "lupa-ratings" };
|
|
36046
|
-
const _hoisted_4$
|
|
36126
|
+
const _hoisted_4$7 = ["href"];
|
|
36047
36127
|
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
36048
36128
|
__name: "SearchResultsProductSingleStarRating",
|
|
36049
36129
|
props: {
|
|
@@ -36081,7 +36161,7 @@ and ensure you are accounting for this risk.
|
|
|
36081
36161
|
createBaseVNode("a", {
|
|
36082
36162
|
href: ratingLink.value,
|
|
36083
36163
|
class: "lupa-total-ratings"
|
|
36084
|
-
}, toDisplayString(totalRatings.value), 9, _hoisted_4$
|
|
36164
|
+
}, toDisplayString(totalRatings.value), 9, _hoisted_4$7)
|
|
36085
36165
|
]);
|
|
36086
36166
|
};
|
|
36087
36167
|
}
|
|
@@ -36438,7 +36518,7 @@ and ensure you are accounting for this risk.
|
|
|
36438
36518
|
class: "lupa-similar-query-label",
|
|
36439
36519
|
"data-cy": "lupa-similar-query-label"
|
|
36440
36520
|
};
|
|
36441
|
-
const _hoisted_4$
|
|
36521
|
+
const _hoisted_4$6 = ["onClick"];
|
|
36442
36522
|
const _hoisted_5$3 = ["innerHTML"];
|
|
36443
36523
|
const _hoisted_6$1 = { key: 0 };
|
|
36444
36524
|
const _hoisted_7 = {
|
|
@@ -36499,7 +36579,7 @@ and ensure you are accounting for this risk.
|
|
|
36499
36579
|
innerHTML: getSimilarQueryContent(similarQuery.displayQuery)
|
|
36500
36580
|
}, null, 8, _hoisted_5$3),
|
|
36501
36581
|
similarQuery.count ? (openBlock(), createElementBlock("span", _hoisted_6$1, " (" + toDisplayString(similarQuery.count) + ")", 1)) : createCommentVNode("", true)
|
|
36502
|
-
], 8, _hoisted_4$
|
|
36582
|
+
], 8, _hoisted_4$6)
|
|
36503
36583
|
]),
|
|
36504
36584
|
createBaseVNode("div", _hoisted_7, [
|
|
36505
36585
|
(openBlock(true), createElementBlock(Fragment, null, renderList(similarQuery.items, (product, index2) => {
|
|
@@ -36831,7 +36911,7 @@ and ensure you are accounting for this risk.
|
|
|
36831
36911
|
const _hoisted_1$l = { class: "lupa-related-query-item" };
|
|
36832
36912
|
const _hoisted_2$g = { class: "lupa-related-query-image" };
|
|
36833
36913
|
const _hoisted_3$a = { class: "lupa-related-query-label" };
|
|
36834
|
-
const _hoisted_4$
|
|
36914
|
+
const _hoisted_4$5 = { class: "lupa-related-query-title" };
|
|
36835
36915
|
const _hoisted_5$2 = {
|
|
36836
36916
|
key: 0,
|
|
36837
36917
|
class: "lupa-related-query-count"
|
|
@@ -36943,7 +37023,7 @@ and ensure you are accounting for this risk.
|
|
|
36943
37023
|
}, null, 8, ["item", "options"])) : createCommentVNode("", true)
|
|
36944
37024
|
]),
|
|
36945
37025
|
createBaseVNode("div", _hoisted_3$a, [
|
|
36946
|
-
createBaseVNode("span", _hoisted_4$
|
|
37026
|
+
createBaseVNode("span", _hoisted_4$5, toDisplayString(_ctx.query), 1),
|
|
36947
37027
|
((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$2, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
|
|
36948
37028
|
])
|
|
36949
37029
|
]);
|
|
@@ -37170,7 +37250,7 @@ and ensure you are accounting for this risk.
|
|
|
37170
37250
|
const _hoisted_1$h = { class: "lupa-related-query-item" };
|
|
37171
37251
|
const _hoisted_2$d = { class: "lupa-related-query-image" };
|
|
37172
37252
|
const _hoisted_3$7 = { class: "lupa-related-query-label" };
|
|
37173
|
-
const _hoisted_4$
|
|
37253
|
+
const _hoisted_4$4 = { class: "lupa-related-query-title" };
|
|
37174
37254
|
const _hoisted_5$1 = {
|
|
37175
37255
|
key: 0,
|
|
37176
37256
|
class: "lupa-related-query-count"
|
|
@@ -37218,7 +37298,7 @@ and ensure you are accounting for this risk.
|
|
|
37218
37298
|
}, null, 8, ["item", "options"])) : createCommentVNode("", true)
|
|
37219
37299
|
]),
|
|
37220
37300
|
createBaseVNode("div", _hoisted_3$7, [
|
|
37221
|
-
createBaseVNode("span", _hoisted_4$
|
|
37301
|
+
createBaseVNode("span", _hoisted_4$4, toDisplayString(query.value), 1),
|
|
37222
37302
|
((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$1, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
|
|
37223
37303
|
])
|
|
37224
37304
|
]);
|
|
@@ -37362,7 +37442,7 @@ and ensure you are accounting for this risk.
|
|
|
37362
37442
|
class: "lupa-empty-results",
|
|
37363
37443
|
"data-cy": "lupa-no-results-in-page"
|
|
37364
37444
|
};
|
|
37365
|
-
const _hoisted_4$
|
|
37445
|
+
const _hoisted_4$3 = {
|
|
37366
37446
|
key: 5,
|
|
37367
37447
|
class: "lupa-empty-results",
|
|
37368
37448
|
"data-cy": "lupa-no-results"
|
|
@@ -37583,7 +37663,7 @@ and ensure you are accounting for this risk.
|
|
|
37583
37663
|
location: "bottom",
|
|
37584
37664
|
sdkOptions: _ctx.options.options
|
|
37585
37665
|
}, null, 8, ["options", "sdkOptions"])
|
|
37586
|
-
], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
37666
|
+
], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
|
|
37587
37667
|
createVNode(_sfc_main$h, {
|
|
37588
37668
|
emptyResultsLabel: (_b25 = _ctx.options.labels) == null ? void 0 : _b25.emptyResults,
|
|
37589
37669
|
currentQueryText: unref(currentQueryText),
|
|
@@ -37619,7 +37699,7 @@ and ensure you are accounting for this risk.
|
|
|
37619
37699
|
class: "lupa-category-back"
|
|
37620
37700
|
};
|
|
37621
37701
|
const _hoisted_3$4 = ["href"];
|
|
37622
|
-
const _hoisted_4$
|
|
37702
|
+
const _hoisted_4$2 = {
|
|
37623
37703
|
key: 1,
|
|
37624
37704
|
class: "lupa-child-category-list"
|
|
37625
37705
|
};
|
|
@@ -37679,7 +37759,7 @@ and ensure you are accounting for this risk.
|
|
|
37679
37759
|
onClick: handleNavigationBack
|
|
37680
37760
|
}, toDisplayString(backTitle.value), 9, _hoisted_3$4)
|
|
37681
37761
|
])) : createCommentVNode("", true),
|
|
37682
|
-
hasRelatedCategoryChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
37762
|
+
hasRelatedCategoryChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
|
|
37683
37763
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(relatedCategoryChildren), (child) => {
|
|
37684
37764
|
return openBlock(), createBlock(_sfc_main$Z, {
|
|
37685
37765
|
key: getCategoryKey(child),
|
|
@@ -39596,12 +39676,13 @@ and ensure you are accounting for this risk.
|
|
|
39596
39676
|
key: 0,
|
|
39597
39677
|
class: "lupa-recommendation-section-title"
|
|
39598
39678
|
};
|
|
39599
|
-
const _hoisted_2$6 =
|
|
39679
|
+
const _hoisted_2$6 = ["href"];
|
|
39680
|
+
const _hoisted_3$3 = {
|
|
39600
39681
|
key: 1,
|
|
39601
39682
|
class: "lupa-recommended-products",
|
|
39602
39683
|
"data-cy": "lupa-recommended-products"
|
|
39603
39684
|
};
|
|
39604
|
-
const
|
|
39685
|
+
const _hoisted_4$1 = {
|
|
39605
39686
|
key: 1,
|
|
39606
39687
|
class: "lupa-products",
|
|
39607
39688
|
"data-cy": "lupa-products"
|
|
@@ -39645,6 +39726,10 @@ and ensure you are accounting for this risk.
|
|
|
39645
39726
|
var _a25, _b25;
|
|
39646
39727
|
return (_b25 = (_a25 = props.options.recommendationLabels) == null ? void 0 : _a25.title) != null ? _b25 : "";
|
|
39647
39728
|
});
|
|
39729
|
+
const hasTitleLink = computed(() => {
|
|
39730
|
+
var _a25;
|
|
39731
|
+
return Boolean((_a25 = props.options.recommendationLabels) == null ? void 0 : _a25.titleLink);
|
|
39732
|
+
});
|
|
39648
39733
|
const hasRecommendations = computed(() => {
|
|
39649
39734
|
return recommendations2.value.length > 0;
|
|
39650
39735
|
});
|
|
@@ -39734,6 +39819,9 @@ and ensure you are accounting for this risk.
|
|
|
39734
39819
|
var _a25, _b25;
|
|
39735
39820
|
return (_b25 = (_a25 = carouselOptions.value) == null ? void 0 : _a25.wrapAround) != null ? _b25 : true;
|
|
39736
39821
|
});
|
|
39822
|
+
const recommendationFilters = computed(() => {
|
|
39823
|
+
return __spreadValues2({}, processExtractionObject(props.options.recommendationFilters));
|
|
39824
|
+
});
|
|
39737
39825
|
const loadLupaRecommendations = () => __async2(null, null, function* () {
|
|
39738
39826
|
var _a25, _b25;
|
|
39739
39827
|
recommendationsType.value = "recommendations_lupasearch";
|
|
@@ -39742,7 +39830,7 @@ and ensure you are accounting for this risk.
|
|
|
39742
39830
|
const result2 = yield LupaSearchSdk.recommend(
|
|
39743
39831
|
props.options.queryKey,
|
|
39744
39832
|
itemId.value,
|
|
39745
|
-
|
|
39833
|
+
recommendationFilters.value,
|
|
39746
39834
|
props.options.options
|
|
39747
39835
|
);
|
|
39748
39836
|
if (!result2.success) {
|
|
@@ -39760,14 +39848,22 @@ and ensure you are accounting for this risk.
|
|
|
39760
39848
|
});
|
|
39761
39849
|
__expose({ fetch: fetch2 });
|
|
39762
39850
|
return (_ctx, _cache) => {
|
|
39851
|
+
var _a25;
|
|
39763
39852
|
return openBlock(), createElementBlock("div", {
|
|
39764
39853
|
class: "lupa-search-product-recommendations-wrapper",
|
|
39765
39854
|
ref_key: "rootElement",
|
|
39766
39855
|
ref: rootElement
|
|
39767
39856
|
}, [
|
|
39768
39857
|
hasRecommendations.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
39769
|
-
title.value ? (openBlock(), createElementBlock("h2", _hoisted_1$9,
|
|
39770
|
-
|
|
39858
|
+
title.value ? (openBlock(), createElementBlock("h2", _hoisted_1$9, [
|
|
39859
|
+
!hasTitleLink.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
39860
|
+
createTextVNode(toDisplayString(title.value), 1)
|
|
39861
|
+
], 64)) : (openBlock(), createElementBlock("a", {
|
|
39862
|
+
key: 1,
|
|
39863
|
+
href: (_a25 = _ctx.options.recommendationLabels) == null ? void 0 : _a25.titleLink
|
|
39864
|
+
}, toDisplayString(title.value), 9, _hoisted_2$6))
|
|
39865
|
+
])) : createCommentVNode("", true),
|
|
39866
|
+
!loading.value ? (openBlock(), createElementBlock("div", _hoisted_3$3, [
|
|
39771
39867
|
layoutType.value === "carousel" ? (openBlock(), createBlock(unref(Carousel), mergeProps({ key: 0 }, carouselOptions.value, { "wrap-around": wrapAround.value }), {
|
|
39772
39868
|
addons: withCtx(() => [
|
|
39773
39869
|
createVNode(unref(Navigation))
|
|
@@ -39791,7 +39887,7 @@ and ensure you are accounting for this risk.
|
|
|
39791
39887
|
}), 128))
|
|
39792
39888
|
]),
|
|
39793
39889
|
_: 1
|
|
39794
|
-
}, 16, ["wrap-around"])) : (openBlock(), createElementBlock("div",
|
|
39890
|
+
}, 16, ["wrap-around"])) : (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
|
39795
39891
|
(openBlock(true), createElementBlock(Fragment, null, renderList(recommendations2.value, (product, index) => {
|
|
39796
39892
|
return openBlock(), createBlock(_sfc_main$t, {
|
|
39797
39893
|
style: normalizeStyle(columnSize.value),
|