@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.iife.js
CHANGED
|
@@ -19173,6 +19173,18 @@ var __async = (__this, __arguments, generator) => {
|
|
|
19173
19173
|
params.value = parseParams(optionsStore.getQueryParamName, url.searchParams);
|
|
19174
19174
|
searchString.value = url.search;
|
|
19175
19175
|
};
|
|
19176
|
+
const getPageUrlWithNewParams = ({
|
|
19177
|
+
params: newParams,
|
|
19178
|
+
paramsToRemove,
|
|
19179
|
+
encode: encode2 = true,
|
|
19180
|
+
searchResultsLink: searchResultsLink2
|
|
19181
|
+
}) => {
|
|
19182
|
+
const url = getPageUrl(searchResultsLink2);
|
|
19183
|
+
paramsToRemove = getRemovableParams(url, optionsStore.getQueryParamName, paramsToRemove);
|
|
19184
|
+
removeParams(url, paramsToRemove);
|
|
19185
|
+
newParams.forEach((p2) => appendParam(url, p2, encode2));
|
|
19186
|
+
return url.search;
|
|
19187
|
+
};
|
|
19176
19188
|
const removeParameters = ({
|
|
19177
19189
|
paramsToRemove,
|
|
19178
19190
|
save = true
|
|
@@ -19310,6 +19322,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
19310
19322
|
sortParams,
|
|
19311
19323
|
lastChangedParams,
|
|
19312
19324
|
skipFacetReload,
|
|
19325
|
+
getPageUrlWithNewParams,
|
|
19313
19326
|
add,
|
|
19314
19327
|
removeAllFilters,
|
|
19315
19328
|
removeParameters,
|
|
@@ -31458,7 +31471,16 @@ and ensure you are accounting for this risk.
|
|
|
31458
31471
|
if (attr === "value" && (element == null ? void 0 : element.value)) {
|
|
31459
31472
|
return element.value;
|
|
31460
31473
|
}
|
|
31461
|
-
|
|
31474
|
+
const attributeValue = element.getAttribute(attr);
|
|
31475
|
+
if (attributeValue === null || attributeValue === void 0) {
|
|
31476
|
+
return options.default;
|
|
31477
|
+
}
|
|
31478
|
+
if (options.regex) {
|
|
31479
|
+
const regex = new RegExp(options.regex);
|
|
31480
|
+
const match = attributeValue.match(regex);
|
|
31481
|
+
return match ? match[1] : options.default;
|
|
31482
|
+
}
|
|
31483
|
+
return attributeValue;
|
|
31462
31484
|
};
|
|
31463
31485
|
const getValueFromPath = (obj, path) => {
|
|
31464
31486
|
return path.split(".").reduce((value, key) => value && value[key] || null, obj);
|
|
@@ -35142,8 +35164,7 @@ and ensure you are accounting for this risk.
|
|
|
35142
35164
|
key: 0,
|
|
35143
35165
|
class: "lupa-page-number-separator"
|
|
35144
35166
|
};
|
|
35145
|
-
const _hoisted_3$m =
|
|
35146
|
-
const _hoisted_4$e = {
|
|
35167
|
+
const _hoisted_3$m = {
|
|
35147
35168
|
key: 0,
|
|
35148
35169
|
class: "lupa-page-number-separator"
|
|
35149
35170
|
};
|
|
@@ -35210,7 +35231,24 @@ and ensure you are accounting for this risk.
|
|
|
35210
35231
|
timeout: (_f = (_e = searchResultOptions.value.scrollToResults) == null ? void 0 : _e.timeout) != null ? _f : 500
|
|
35211
35232
|
};
|
|
35212
35233
|
});
|
|
35213
|
-
const
|
|
35234
|
+
const tagName = computed(() => {
|
|
35235
|
+
return props.options.renderAsLinks ? "a" : "div";
|
|
35236
|
+
});
|
|
35237
|
+
const getPageUrlWithNewParams = (page) => {
|
|
35238
|
+
return paramStore.getPageUrlWithNewParams({
|
|
35239
|
+
params: [{ name: optionsStore.getQueryParamName(QUERY_PARAMS$1.PAGE), value: page.toString() }]
|
|
35240
|
+
});
|
|
35241
|
+
};
|
|
35242
|
+
const getHref = (page) => {
|
|
35243
|
+
if (props.options.renderAsLinks) {
|
|
35244
|
+
return getPageUrlWithNewParams(page);
|
|
35245
|
+
}
|
|
35246
|
+
return null;
|
|
35247
|
+
};
|
|
35248
|
+
const handlePageChange = (e2, page) => {
|
|
35249
|
+
if (e2 && props.options.renderAsLinks) {
|
|
35250
|
+
e2.preventDefault();
|
|
35251
|
+
}
|
|
35214
35252
|
if (page > 0) {
|
|
35215
35253
|
paramStore.appendParams({
|
|
35216
35254
|
params: [{ name: optionsStore.getQueryParamName(QUERY_PARAMS$1.PAGE), value: page.toString() }]
|
|
@@ -35224,46 +35262,78 @@ and ensure you are accounting for this risk.
|
|
|
35224
35262
|
}
|
|
35225
35263
|
};
|
|
35226
35264
|
return (_ctx, _cache) => {
|
|
35265
|
+
var _a25;
|
|
35227
35266
|
return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$D, [
|
|
35228
|
-
showBack.value ? (openBlock(),
|
|
35267
|
+
showBack.value ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35229
35268
|
key: 0,
|
|
35230
35269
|
class: normalizeClass(firstPageLabel.value === "<" ? "lupa-page-arrow" : "lupa-show-less"),
|
|
35231
|
-
|
|
35232
|
-
|
|
35270
|
+
href: getHref(_ctx.options.selectedPage - 1),
|
|
35271
|
+
onClick: _cache[0] || (_cache[0] = (e2) => handlePageChange(e2, _ctx.options.selectedPage - 1))
|
|
35272
|
+
}, {
|
|
35273
|
+
default: withCtx(() => [
|
|
35274
|
+
createTextVNode(toDisplayString(firstPageLabel.value), 1)
|
|
35275
|
+
]),
|
|
35276
|
+
_: 1
|
|
35277
|
+
}, 8, ["class", "href"])) : createCommentVNode("", true),
|
|
35233
35278
|
showFirstPage.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
35234
|
-
|
|
35279
|
+
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35280
|
+
href: getHref(1),
|
|
35235
35281
|
class: "lupa-page-number lupa-page-number-first",
|
|
35236
|
-
onClick: _cache[1] || (_cache[1] = () => handlePageChange(1))
|
|
35237
|
-
},
|
|
35282
|
+
onClick: _cache[1] || (_cache[1] = (e2) => handlePageChange(e2, 1))
|
|
35283
|
+
}, {
|
|
35284
|
+
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
35285
|
+
createTextVNode(" 1 ")
|
|
35286
|
+
])),
|
|
35287
|
+
_: 1,
|
|
35288
|
+
__: [4]
|
|
35289
|
+
}, 8, ["href"])),
|
|
35238
35290
|
showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$u, "...")) : createCommentVNode("", true)
|
|
35239
35291
|
], 64)) : createCommentVNode("", true),
|
|
35240
35292
|
(openBlock(true), createElementBlock(Fragment, null, renderList(pages.value, (page) => {
|
|
35241
|
-
return openBlock(),
|
|
35293
|
+
return openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35242
35294
|
key: page,
|
|
35243
|
-
|
|
35295
|
+
href: getHref(page),
|
|
35296
|
+
onClick: (e2) => handlePageChange(e2, page),
|
|
35244
35297
|
class: normalizeClass([
|
|
35245
35298
|
"lupa-page-number",
|
|
35246
35299
|
page === _ctx.options.selectedPage ? "lupa-page-number-selected" : ""
|
|
35247
35300
|
]),
|
|
35248
35301
|
"data-cy": "lupa-page-number"
|
|
35249
|
-
},
|
|
35302
|
+
}, {
|
|
35303
|
+
default: withCtx(() => [
|
|
35304
|
+
createTextVNode(toDisplayString(page), 1)
|
|
35305
|
+
]),
|
|
35306
|
+
_: 2
|
|
35307
|
+
}, 1032, ["href", "onClick", "class"]);
|
|
35250
35308
|
}), 128)),
|
|
35251
35309
|
showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
35252
|
-
showLastPageSeparator.value ? (openBlock(), createElementBlock("div",
|
|
35253
|
-
|
|
35310
|
+
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_3$m, "...")) : createCommentVNode("", true),
|
|
35311
|
+
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35312
|
+
href: getHref((_a25 = lastPage.value) != null ? _a25 : 1),
|
|
35254
35313
|
class: "lupa-page-number lupa-page-number-last",
|
|
35255
|
-
onClick: _cache[2] || (_cache[2] = () => {
|
|
35256
|
-
var
|
|
35257
|
-
return handlePageChange((
|
|
35314
|
+
onClick: _cache[2] || (_cache[2] = (e2) => {
|
|
35315
|
+
var _a26;
|
|
35316
|
+
return handlePageChange(e2, (_a26 = lastPage.value) != null ? _a26 : 1);
|
|
35258
35317
|
})
|
|
35259
|
-
},
|
|
35318
|
+
}, {
|
|
35319
|
+
default: withCtx(() => [
|
|
35320
|
+
createTextVNode(toDisplayString(lastPage.value), 1)
|
|
35321
|
+
]),
|
|
35322
|
+
_: 1
|
|
35323
|
+
}, 8, ["href"]))
|
|
35260
35324
|
], 64)) : createCommentVNode("", true),
|
|
35261
|
-
_ctx.options.selectedPage < _ctx.options.count ? (openBlock(),
|
|
35325
|
+
_ctx.options.selectedPage < _ctx.options.count ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35262
35326
|
key: 3,
|
|
35263
35327
|
class: normalizeClass(lastPageLabel.value === ">" ? "lupa-page-arrow" : "lupa-show-more"),
|
|
35328
|
+
href: getHref(_ctx.options.selectedPage + 1),
|
|
35264
35329
|
"data-cy": "lupa-show-more",
|
|
35265
|
-
onClick: _cache[3] || (_cache[3] = () => handlePageChange(_ctx.options.selectedPage + 1))
|
|
35266
|
-
},
|
|
35330
|
+
onClick: _cache[3] || (_cache[3] = (e2) => handlePageChange(e2, _ctx.options.selectedPage + 1))
|
|
35331
|
+
}, {
|
|
35332
|
+
default: withCtx(() => [
|
|
35333
|
+
createTextVNode(toDisplayString(lastPageLabel.value), 1)
|
|
35334
|
+
]),
|
|
35335
|
+
_: 1
|
|
35336
|
+
}, 8, ["class", "href"])) : createCommentVNode("", true)
|
|
35267
35337
|
])) : createCommentVNode("", true);
|
|
35268
35338
|
};
|
|
35269
35339
|
}
|
|
@@ -35277,7 +35347,7 @@ and ensure you are accounting for this risk.
|
|
|
35277
35347
|
class: "lupa-select-label",
|
|
35278
35348
|
for: "lupa-page-size-select-dropdown"
|
|
35279
35349
|
};
|
|
35280
|
-
const _hoisted_4$
|
|
35350
|
+
const _hoisted_4$e = ["aria-label"];
|
|
35281
35351
|
const _hoisted_5$a = ["value"];
|
|
35282
35352
|
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
35283
35353
|
__name: "SearchResultsPageSize",
|
|
@@ -35327,7 +35397,7 @@ and ensure you are accounting for this risk.
|
|
|
35327
35397
|
value: option
|
|
35328
35398
|
}, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$a);
|
|
35329
35399
|
}), 128))
|
|
35330
|
-
], 40, _hoisted_4$
|
|
35400
|
+
], 40, _hoisted_4$e)
|
|
35331
35401
|
])
|
|
35332
35402
|
]);
|
|
35333
35403
|
};
|
|
@@ -35342,7 +35412,7 @@ and ensure you are accounting for this risk.
|
|
|
35342
35412
|
class: "lupa-select-label",
|
|
35343
35413
|
for: "lupa-sort-select-dropdown"
|
|
35344
35414
|
};
|
|
35345
|
-
const _hoisted_4$
|
|
35415
|
+
const _hoisted_4$d = ["aria-label"];
|
|
35346
35416
|
const _hoisted_5$9 = ["value"];
|
|
35347
35417
|
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
35348
35418
|
__name: "SearchResultsSort",
|
|
@@ -35413,7 +35483,7 @@ and ensure you are accounting for this risk.
|
|
|
35413
35483
|
value: option.key
|
|
35414
35484
|
}, toDisplayString(option.label), 9, _hoisted_5$9);
|
|
35415
35485
|
}), 128))
|
|
35416
|
-
], 40, _hoisted_4$
|
|
35486
|
+
], 40, _hoisted_4$d), [
|
|
35417
35487
|
[vModelSelect, selectedKey.value]
|
|
35418
35488
|
])
|
|
35419
35489
|
])
|
|
@@ -35427,7 +35497,7 @@ and ensure you are accounting for this risk.
|
|
|
35427
35497
|
class: "lupa-toolbar-right-title"
|
|
35428
35498
|
};
|
|
35429
35499
|
const _hoisted_3$j = { key: 2 };
|
|
35430
|
-
const _hoisted_4$
|
|
35500
|
+
const _hoisted_4$c = { key: 4 };
|
|
35431
35501
|
const _hoisted_5$8 = { key: 6 };
|
|
35432
35502
|
const _hoisted_6$4 = { class: "lupa-toolbar-right" };
|
|
35433
35503
|
const _hoisted_7$2 = {
|
|
@@ -35497,6 +35567,7 @@ and ensure you are accounting for this risk.
|
|
|
35497
35567
|
}
|
|
35498
35568
|
});
|
|
35499
35569
|
const paginationOptions = computed(() => {
|
|
35570
|
+
var _a25;
|
|
35500
35571
|
const pageSelect = optionsValue.value.pagination.pageSelection;
|
|
35501
35572
|
return {
|
|
35502
35573
|
pageSize: {
|
|
@@ -35507,7 +35578,8 @@ and ensure you are accounting for this risk.
|
|
|
35507
35578
|
count: getPageCount(searchResult.value.total, limit.value),
|
|
35508
35579
|
selectedPage: page.value,
|
|
35509
35580
|
display: pageSelect.display,
|
|
35510
|
-
displayMobile: pageSelect.displayMobile
|
|
35581
|
+
displayMobile: pageSelect.displayMobile,
|
|
35582
|
+
renderAsLinks: (_a25 = pageSelect.renderAsLinks) != null ? _a25 : false
|
|
35511
35583
|
},
|
|
35512
35584
|
labels: optionsValue.value.labels
|
|
35513
35585
|
};
|
|
@@ -35555,7 +35627,7 @@ and ensure you are accounting for this risk.
|
|
|
35555
35627
|
label: searchSummaryLabel.value,
|
|
35556
35628
|
clearable: unref(hasAnyFilter) && showFilterClear.value,
|
|
35557
35629
|
onClear: handleClearAll
|
|
35558
|
-
}, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$
|
|
35630
|
+
}, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$c)),
|
|
35559
35631
|
displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$I, {
|
|
35560
35632
|
key: 5,
|
|
35561
35633
|
options: paginationOptions.value.pageSelect,
|
|
@@ -35608,7 +35680,7 @@ and ensure you are accounting for this risk.
|
|
|
35608
35680
|
const _hoisted_1$z = ["title", "innerHTML"];
|
|
35609
35681
|
const _hoisted_2$q = ["title"];
|
|
35610
35682
|
const _hoisted_3$i = ["href", "innerHTML"];
|
|
35611
|
-
const _hoisted_4$
|
|
35683
|
+
const _hoisted_4$b = ["title"];
|
|
35612
35684
|
const _hoisted_5$7 = {
|
|
35613
35685
|
key: 0,
|
|
35614
35686
|
class: "lupa-search-results-product-title-text"
|
|
@@ -35676,7 +35748,7 @@ and ensure you are accounting for this risk.
|
|
|
35676
35748
|
class: "lupa-search-results-product-title-text lupa-title-link",
|
|
35677
35749
|
onClick: handleNavigation
|
|
35678
35750
|
}, toDisplayString(title.value), 9, _hoisted_6$3)) : createCommentVNode("", true)
|
|
35679
|
-
], 12, _hoisted_4$
|
|
35751
|
+
], 12, _hoisted_4$b));
|
|
35680
35752
|
};
|
|
35681
35753
|
}
|
|
35682
35754
|
});
|
|
@@ -35719,7 +35791,7 @@ and ensure you are accounting for this risk.
|
|
|
35719
35791
|
const _hoisted_1$x = { id: "lupa-search-results-rating" };
|
|
35720
35792
|
const _hoisted_2$p = { class: "lupa-ratings" };
|
|
35721
35793
|
const _hoisted_3$h = { class: "lupa-ratings-base" };
|
|
35722
|
-
const _hoisted_4$
|
|
35794
|
+
const _hoisted_4$a = ["innerHTML"];
|
|
35723
35795
|
const _hoisted_5$6 = { class: "lupa-rating-wrapper" };
|
|
35724
35796
|
const _hoisted_6$2 = ["innerHTML"];
|
|
35725
35797
|
const _hoisted_7$1 = ["href"];
|
|
@@ -35769,7 +35841,7 @@ and ensure you are accounting for this risk.
|
|
|
35769
35841
|
key: index,
|
|
35770
35842
|
innerHTML: star,
|
|
35771
35843
|
class: "lupa-rating lupa-rating-not-highlighted"
|
|
35772
|
-
}, null, 8, _hoisted_4$
|
|
35844
|
+
}, null, 8, _hoisted_4$a);
|
|
35773
35845
|
}), 128))
|
|
35774
35846
|
]),
|
|
35775
35847
|
createBaseVNode("div", _hoisted_5$6, [
|
|
@@ -35862,7 +35934,7 @@ and ensure you are accounting for this risk.
|
|
|
35862
35934
|
const _hoisted_1$v = { class: "lupa-search-results-add-to-cart-wrapper" };
|
|
35863
35935
|
const _hoisted_2$o = { class: "lupa-search-results-product-addtocart" };
|
|
35864
35936
|
const _hoisted_3$g = ["disabled"];
|
|
35865
|
-
const _hoisted_4$
|
|
35937
|
+
const _hoisted_4$9 = ["href"];
|
|
35866
35938
|
const _hoisted_5$5 = ["id", "disabled"];
|
|
35867
35939
|
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
35868
35940
|
__name: "SearchResultsProductAddToCart",
|
|
@@ -35931,7 +36003,7 @@ and ensure you are accounting for this risk.
|
|
|
35931
36003
|
"data-cy": "lupa-add-to-cart",
|
|
35932
36004
|
disabled: !inStockValue.value || loading.value
|
|
35933
36005
|
}, _ctx.dynamicAttributes, { onClick: handleClick }), [
|
|
35934
|
-
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$
|
|
36006
|
+
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$9)
|
|
35935
36007
|
], 16, _hoisted_3$g)) : (openBlock(), createElementBlock("button", mergeProps({
|
|
35936
36008
|
key: 1,
|
|
35937
36009
|
id: id.value,
|
|
@@ -35949,7 +36021,7 @@ and ensure you are accounting for this risk.
|
|
|
35949
36021
|
const _hoisted_1$u = ["innerHTML"];
|
|
35950
36022
|
const _hoisted_2$n = { key: 0 };
|
|
35951
36023
|
const _hoisted_3$f = { key: 1 };
|
|
35952
|
-
const _hoisted_4$
|
|
36024
|
+
const _hoisted_4$8 = { class: "lupa-search-box-custom-label" };
|
|
35953
36025
|
const _hoisted_5$4 = { class: "lupa-search-box-custom-text" };
|
|
35954
36026
|
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
35955
36027
|
__name: "SearchResultsProductCustom",
|
|
@@ -35978,7 +36050,11 @@ and ensure you are accounting for this risk.
|
|
|
35978
36050
|
var _a25;
|
|
35979
36051
|
return (_a25 = props.options.isHtml) != null ? _a25 : false;
|
|
35980
36052
|
});
|
|
35981
|
-
const handleClick = () => __async2(null, null, function* () {
|
|
36053
|
+
const handleClick = (e2) => __async2(null, null, function* () {
|
|
36054
|
+
if (e2 && props.options.stopPropagationOnClick) {
|
|
36055
|
+
e2.stopPropagation();
|
|
36056
|
+
e2.preventDefault();
|
|
36057
|
+
}
|
|
35982
36058
|
if (!props.options.action) {
|
|
35983
36059
|
return;
|
|
35984
36060
|
}
|
|
@@ -35994,7 +36070,7 @@ and ensure you are accounting for this risk.
|
|
|
35994
36070
|
class: className.value
|
|
35995
36071
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), [
|
|
35996
36072
|
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$n, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$f, [
|
|
35997
|
-
createBaseVNode("div", _hoisted_4$
|
|
36073
|
+
createBaseVNode("div", _hoisted_4$8, toDisplayString(label.value), 1),
|
|
35998
36074
|
createBaseVNode("div", _hoisted_5$4, toDisplayString(text.value), 1)
|
|
35999
36075
|
]))
|
|
36000
36076
|
], 16));
|
|
@@ -36021,7 +36097,11 @@ and ensure you are accounting for this risk.
|
|
|
36021
36097
|
const className = computed(() => {
|
|
36022
36098
|
return props.options.className;
|
|
36023
36099
|
});
|
|
36024
|
-
const handleClick = () => __async2(null, null, function* () {
|
|
36100
|
+
const handleClick = (e2) => __async2(null, null, function* () {
|
|
36101
|
+
if (e2 && props.options.stopPropagationOnClick) {
|
|
36102
|
+
e2.stopPropagation();
|
|
36103
|
+
e2.preventDefault();
|
|
36104
|
+
}
|
|
36025
36105
|
if (!props.options.action) {
|
|
36026
36106
|
return;
|
|
36027
36107
|
}
|
|
@@ -36041,7 +36121,7 @@ and ensure you are accounting for this risk.
|
|
|
36041
36121
|
const _hoisted_1$s = { id: "lupa-search-results-rating" };
|
|
36042
36122
|
const _hoisted_2$m = ["innerHTML"];
|
|
36043
36123
|
const _hoisted_3$e = { class: "lupa-ratings" };
|
|
36044
|
-
const _hoisted_4$
|
|
36124
|
+
const _hoisted_4$7 = ["href"];
|
|
36045
36125
|
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
36046
36126
|
__name: "SearchResultsProductSingleStarRating",
|
|
36047
36127
|
props: {
|
|
@@ -36079,7 +36159,7 @@ and ensure you are accounting for this risk.
|
|
|
36079
36159
|
createBaseVNode("a", {
|
|
36080
36160
|
href: ratingLink.value,
|
|
36081
36161
|
class: "lupa-total-ratings"
|
|
36082
|
-
}, toDisplayString(totalRatings.value), 9, _hoisted_4$
|
|
36162
|
+
}, toDisplayString(totalRatings.value), 9, _hoisted_4$7)
|
|
36083
36163
|
]);
|
|
36084
36164
|
};
|
|
36085
36165
|
}
|
|
@@ -36436,7 +36516,7 @@ and ensure you are accounting for this risk.
|
|
|
36436
36516
|
class: "lupa-similar-query-label",
|
|
36437
36517
|
"data-cy": "lupa-similar-query-label"
|
|
36438
36518
|
};
|
|
36439
|
-
const _hoisted_4$
|
|
36519
|
+
const _hoisted_4$6 = ["onClick"];
|
|
36440
36520
|
const _hoisted_5$3 = ["innerHTML"];
|
|
36441
36521
|
const _hoisted_6$1 = { key: 0 };
|
|
36442
36522
|
const _hoisted_7 = {
|
|
@@ -36497,7 +36577,7 @@ and ensure you are accounting for this risk.
|
|
|
36497
36577
|
innerHTML: getSimilarQueryContent(similarQuery.displayQuery)
|
|
36498
36578
|
}, null, 8, _hoisted_5$3),
|
|
36499
36579
|
similarQuery.count ? (openBlock(), createElementBlock("span", _hoisted_6$1, " (" + toDisplayString(similarQuery.count) + ")", 1)) : createCommentVNode("", true)
|
|
36500
|
-
], 8, _hoisted_4$
|
|
36580
|
+
], 8, _hoisted_4$6)
|
|
36501
36581
|
]),
|
|
36502
36582
|
createBaseVNode("div", _hoisted_7, [
|
|
36503
36583
|
(openBlock(true), createElementBlock(Fragment, null, renderList(similarQuery.items, (product, index2) => {
|
|
@@ -36829,7 +36909,7 @@ and ensure you are accounting for this risk.
|
|
|
36829
36909
|
const _hoisted_1$l = { class: "lupa-related-query-item" };
|
|
36830
36910
|
const _hoisted_2$g = { class: "lupa-related-query-image" };
|
|
36831
36911
|
const _hoisted_3$a = { class: "lupa-related-query-label" };
|
|
36832
|
-
const _hoisted_4$
|
|
36912
|
+
const _hoisted_4$5 = { class: "lupa-related-query-title" };
|
|
36833
36913
|
const _hoisted_5$2 = {
|
|
36834
36914
|
key: 0,
|
|
36835
36915
|
class: "lupa-related-query-count"
|
|
@@ -36941,7 +37021,7 @@ and ensure you are accounting for this risk.
|
|
|
36941
37021
|
}, null, 8, ["item", "options"])) : createCommentVNode("", true)
|
|
36942
37022
|
]),
|
|
36943
37023
|
createBaseVNode("div", _hoisted_3$a, [
|
|
36944
|
-
createBaseVNode("span", _hoisted_4$
|
|
37024
|
+
createBaseVNode("span", _hoisted_4$5, toDisplayString(_ctx.query), 1),
|
|
36945
37025
|
((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$2, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
|
|
36946
37026
|
])
|
|
36947
37027
|
]);
|
|
@@ -37168,7 +37248,7 @@ and ensure you are accounting for this risk.
|
|
|
37168
37248
|
const _hoisted_1$h = { class: "lupa-related-query-item" };
|
|
37169
37249
|
const _hoisted_2$d = { class: "lupa-related-query-image" };
|
|
37170
37250
|
const _hoisted_3$7 = { class: "lupa-related-query-label" };
|
|
37171
|
-
const _hoisted_4$
|
|
37251
|
+
const _hoisted_4$4 = { class: "lupa-related-query-title" };
|
|
37172
37252
|
const _hoisted_5$1 = {
|
|
37173
37253
|
key: 0,
|
|
37174
37254
|
class: "lupa-related-query-count"
|
|
@@ -37216,7 +37296,7 @@ and ensure you are accounting for this risk.
|
|
|
37216
37296
|
}, null, 8, ["item", "options"])) : createCommentVNode("", true)
|
|
37217
37297
|
]),
|
|
37218
37298
|
createBaseVNode("div", _hoisted_3$7, [
|
|
37219
|
-
createBaseVNode("span", _hoisted_4$
|
|
37299
|
+
createBaseVNode("span", _hoisted_4$4, toDisplayString(query.value), 1),
|
|
37220
37300
|
((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$1, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
|
|
37221
37301
|
])
|
|
37222
37302
|
]);
|
|
@@ -37360,7 +37440,7 @@ and ensure you are accounting for this risk.
|
|
|
37360
37440
|
class: "lupa-empty-results",
|
|
37361
37441
|
"data-cy": "lupa-no-results-in-page"
|
|
37362
37442
|
};
|
|
37363
|
-
const _hoisted_4$
|
|
37443
|
+
const _hoisted_4$3 = {
|
|
37364
37444
|
key: 5,
|
|
37365
37445
|
class: "lupa-empty-results",
|
|
37366
37446
|
"data-cy": "lupa-no-results"
|
|
@@ -37581,7 +37661,7 @@ and ensure you are accounting for this risk.
|
|
|
37581
37661
|
location: "bottom",
|
|
37582
37662
|
sdkOptions: _ctx.options.options
|
|
37583
37663
|
}, null, 8, ["options", "sdkOptions"])
|
|
37584
|
-
], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
37664
|
+
], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
|
|
37585
37665
|
createVNode(_sfc_main$h, {
|
|
37586
37666
|
emptyResultsLabel: (_b25 = _ctx.options.labels) == null ? void 0 : _b25.emptyResults,
|
|
37587
37667
|
currentQueryText: unref(currentQueryText),
|
|
@@ -37617,7 +37697,7 @@ and ensure you are accounting for this risk.
|
|
|
37617
37697
|
class: "lupa-category-back"
|
|
37618
37698
|
};
|
|
37619
37699
|
const _hoisted_3$4 = ["href"];
|
|
37620
|
-
const _hoisted_4$
|
|
37700
|
+
const _hoisted_4$2 = {
|
|
37621
37701
|
key: 1,
|
|
37622
37702
|
class: "lupa-child-category-list"
|
|
37623
37703
|
};
|
|
@@ -37677,7 +37757,7 @@ and ensure you are accounting for this risk.
|
|
|
37677
37757
|
onClick: handleNavigationBack
|
|
37678
37758
|
}, toDisplayString(backTitle.value), 9, _hoisted_3$4)
|
|
37679
37759
|
])) : createCommentVNode("", true),
|
|
37680
|
-
hasRelatedCategoryChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
37760
|
+
hasRelatedCategoryChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
|
|
37681
37761
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(relatedCategoryChildren), (child) => {
|
|
37682
37762
|
return openBlock(), createBlock(_sfc_main$Z, {
|
|
37683
37763
|
key: getCategoryKey(child),
|
|
@@ -39594,12 +39674,13 @@ and ensure you are accounting for this risk.
|
|
|
39594
39674
|
key: 0,
|
|
39595
39675
|
class: "lupa-recommendation-section-title"
|
|
39596
39676
|
};
|
|
39597
|
-
const _hoisted_2$6 =
|
|
39677
|
+
const _hoisted_2$6 = ["href"];
|
|
39678
|
+
const _hoisted_3$3 = {
|
|
39598
39679
|
key: 1,
|
|
39599
39680
|
class: "lupa-recommended-products",
|
|
39600
39681
|
"data-cy": "lupa-recommended-products"
|
|
39601
39682
|
};
|
|
39602
|
-
const
|
|
39683
|
+
const _hoisted_4$1 = {
|
|
39603
39684
|
key: 1,
|
|
39604
39685
|
class: "lupa-products",
|
|
39605
39686
|
"data-cy": "lupa-products"
|
|
@@ -39643,6 +39724,10 @@ and ensure you are accounting for this risk.
|
|
|
39643
39724
|
var _a25, _b25;
|
|
39644
39725
|
return (_b25 = (_a25 = props.options.recommendationLabels) == null ? void 0 : _a25.title) != null ? _b25 : "";
|
|
39645
39726
|
});
|
|
39727
|
+
const hasTitleLink = computed(() => {
|
|
39728
|
+
var _a25;
|
|
39729
|
+
return Boolean((_a25 = props.options.recommendationLabels) == null ? void 0 : _a25.titleLink);
|
|
39730
|
+
});
|
|
39646
39731
|
const hasRecommendations = computed(() => {
|
|
39647
39732
|
return recommendations2.value.length > 0;
|
|
39648
39733
|
});
|
|
@@ -39732,6 +39817,9 @@ and ensure you are accounting for this risk.
|
|
|
39732
39817
|
var _a25, _b25;
|
|
39733
39818
|
return (_b25 = (_a25 = carouselOptions.value) == null ? void 0 : _a25.wrapAround) != null ? _b25 : true;
|
|
39734
39819
|
});
|
|
39820
|
+
const recommendationFilters = computed(() => {
|
|
39821
|
+
return __spreadValues2({}, processExtractionObject(props.options.recommendationFilters));
|
|
39822
|
+
});
|
|
39735
39823
|
const loadLupaRecommendations = () => __async2(null, null, function* () {
|
|
39736
39824
|
var _a25, _b25;
|
|
39737
39825
|
recommendationsType.value = "recommendations_lupasearch";
|
|
@@ -39740,7 +39828,7 @@ and ensure you are accounting for this risk.
|
|
|
39740
39828
|
const result2 = yield LupaSearchSdk.recommend(
|
|
39741
39829
|
props.options.queryKey,
|
|
39742
39830
|
itemId.value,
|
|
39743
|
-
|
|
39831
|
+
recommendationFilters.value,
|
|
39744
39832
|
props.options.options
|
|
39745
39833
|
);
|
|
39746
39834
|
if (!result2.success) {
|
|
@@ -39758,14 +39846,22 @@ and ensure you are accounting for this risk.
|
|
|
39758
39846
|
});
|
|
39759
39847
|
__expose({ fetch: fetch2 });
|
|
39760
39848
|
return (_ctx, _cache) => {
|
|
39849
|
+
var _a25;
|
|
39761
39850
|
return openBlock(), createElementBlock("div", {
|
|
39762
39851
|
class: "lupa-search-product-recommendations-wrapper",
|
|
39763
39852
|
ref_key: "rootElement",
|
|
39764
39853
|
ref: rootElement
|
|
39765
39854
|
}, [
|
|
39766
39855
|
hasRecommendations.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
39767
|
-
title.value ? (openBlock(), createElementBlock("h2", _hoisted_1$9,
|
|
39768
|
-
|
|
39856
|
+
title.value ? (openBlock(), createElementBlock("h2", _hoisted_1$9, [
|
|
39857
|
+
!hasTitleLink.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
39858
|
+
createTextVNode(toDisplayString(title.value), 1)
|
|
39859
|
+
], 64)) : (openBlock(), createElementBlock("a", {
|
|
39860
|
+
key: 1,
|
|
39861
|
+
href: (_a25 = _ctx.options.recommendationLabels) == null ? void 0 : _a25.titleLink
|
|
39862
|
+
}, toDisplayString(title.value), 9, _hoisted_2$6))
|
|
39863
|
+
])) : createCommentVNode("", true),
|
|
39864
|
+
!loading.value ? (openBlock(), createElementBlock("div", _hoisted_3$3, [
|
|
39769
39865
|
layoutType.value === "carousel" ? (openBlock(), createBlock(unref(Carousel), mergeProps({ key: 0 }, carouselOptions.value, { "wrap-around": wrapAround.value }), {
|
|
39770
39866
|
addons: withCtx(() => [
|
|
39771
39867
|
createVNode(unref(Navigation))
|
|
@@ -39789,7 +39885,7 @@ and ensure you are accounting for this risk.
|
|
|
39789
39885
|
}), 128))
|
|
39790
39886
|
]),
|
|
39791
39887
|
_: 1
|
|
39792
|
-
}, 16, ["wrap-around"])) : (openBlock(), createElementBlock("div",
|
|
39888
|
+
}, 16, ["wrap-around"])) : (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
|
39793
39889
|
(openBlock(true), createElementBlock(Fragment, null, renderList(recommendations2.value, (product, index) => {
|
|
39794
39890
|
return openBlock(), createBlock(_sfc_main$t, {
|
|
39795
39891
|
style: normalizeStyle(columnSize.value),
|