@getlupa/client 1.21.1 → 1.22.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/dist/constants/searchResults.const.d.ts +0 -7
- package/dist/lupaSearch.iife.js +160 -87
- package/dist/lupaSearch.js +160 -87
- package/dist/lupaSearch.mjs +160 -87
- package/dist/lupaSearch.umd.js +160 -87
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/lupaSearch.mjs
CHANGED
|
@@ -18641,13 +18641,13 @@ const unfoldRangeFilter = (key, filter, price = {}) => {
|
|
|
18641
18641
|
}
|
|
18642
18642
|
];
|
|
18643
18643
|
}
|
|
18644
|
-
return [{ key, value: `${gt} - ${lt}`, type: "range" }];
|
|
18644
|
+
return [{ key, value: `${gt != null ? gt : "*"} - ${lt != null ? lt : "*"}`, type: "range" }];
|
|
18645
18645
|
};
|
|
18646
18646
|
const unfoldFilter = (key, filter, price = {}) => {
|
|
18647
18647
|
if (Array.isArray(filter)) {
|
|
18648
18648
|
return unfoldTermFilter(key, filter);
|
|
18649
18649
|
}
|
|
18650
|
-
if (filter.gte) {
|
|
18650
|
+
if (filter.gte || filter.lte || filter.gt || filter.lt) {
|
|
18651
18651
|
return unfoldRangeFilter(key, filter, price);
|
|
18652
18652
|
}
|
|
18653
18653
|
if (filter.terms) {
|
|
@@ -18700,8 +18700,9 @@ const recursiveFilterItem = (item, query = "") => {
|
|
|
18700
18700
|
}) : void 0;
|
|
18701
18701
|
};
|
|
18702
18702
|
const rangeFilterToString = (rangeFilter, separator) => {
|
|
18703
|
+
var _a25, _b25, _c;
|
|
18703
18704
|
separator = separator || FACET_TERM_RANGE_SEPARATOR;
|
|
18704
|
-
return rangeFilter && Object.keys(rangeFilter).length ? rangeFilter.gte + separator + (rangeFilter.lte || rangeFilter.lt) : "";
|
|
18705
|
+
return rangeFilter && Object.keys(rangeFilter).length ? ((_a25 = rangeFilter.gte) != null ? _a25 : "") + separator + (((_b25 = rangeFilter.lte) != null ? _b25 : "") || ((_c = rangeFilter.lt) != null ? _c : "")) : "";
|
|
18705
18706
|
};
|
|
18706
18707
|
const pick = (obj, keys) => {
|
|
18707
18708
|
const ret = /* @__PURE__ */ Object.create({});
|
|
@@ -18760,14 +18761,15 @@ const parseFacetKey = (key, searchParams) => {
|
|
|
18760
18761
|
return (_b25 = (_a25 = searchParams.getAll(key)) == null ? void 0 : _a25.map((v) => decodeURIComponent(v))) != null ? _b25 : [];
|
|
18761
18762
|
}
|
|
18762
18763
|
if (key.startsWith(FACET_PARAMS_TYPE.RANGE)) {
|
|
18764
|
+
const isPrice = key == null ? void 0 : key.includes(CURRENCY_KEY_INDICATOR);
|
|
18763
18765
|
const range2 = searchParams.get(key);
|
|
18764
18766
|
if (!range2) {
|
|
18765
18767
|
return {};
|
|
18766
18768
|
}
|
|
18767
18769
|
const [min, max] = range2.split(FACET_RANGE_SEPARATOR);
|
|
18768
18770
|
return {
|
|
18769
|
-
gte: min,
|
|
18770
|
-
lte: max
|
|
18771
|
+
gte: min || void 0,
|
|
18772
|
+
[isPrice ? "lte" : "lt"]: max || void 0
|
|
18771
18773
|
};
|
|
18772
18774
|
}
|
|
18773
18775
|
if (key.startsWith(FACET_PARAMS_TYPE.HIERARCHY)) {
|
|
@@ -18967,16 +18969,27 @@ const toggleHierarchyFilter = (appendParams, facetAction, getQueryParamName, cur
|
|
|
18967
18969
|
paramsToRemove: [getQueryParamName ? getQueryParamName(QUERY_PARAMS$1.PAGE) : QUERY_PARAMS$1.PAGE]
|
|
18968
18970
|
});
|
|
18969
18971
|
};
|
|
18970
|
-
const toggleRangeFilter = (appendParams, facetAction, getQueryParamName, currentFilters) => {
|
|
18972
|
+
const toggleRangeFilter = (appendParams, removeParameters, facetAction, getQueryParamName, currentFilters) => {
|
|
18973
|
+
var _a25, _b25;
|
|
18971
18974
|
const currentFilter = rangeFilterToString(
|
|
18972
18975
|
currentFilters == null ? void 0 : currentFilters[facetAction.key],
|
|
18973
18976
|
FACET_RANGE_SEPARATOR
|
|
18974
18977
|
);
|
|
18975
|
-
let facetValue = facetAction.value.join(FACET_RANGE_SEPARATOR);
|
|
18978
|
+
let facetValue = (_b25 = (_a25 = facetAction == null ? void 0 : facetAction.value) == null ? void 0 : _a25.join(FACET_RANGE_SEPARATOR)) != null ? _b25 : "";
|
|
18976
18979
|
facetValue = currentFilter === facetValue ? "" : facetValue;
|
|
18980
|
+
const paramsToRemove = getQueryParamName ? [getQueryParamName(QUERY_PARAMS$1.PAGE)] : [QUERY_PARAMS$1.PAGE];
|
|
18981
|
+
if (!facetValue) {
|
|
18982
|
+
removeParameters({
|
|
18983
|
+
paramsToRemove: [
|
|
18984
|
+
getFacetParam(facetAction.key, "", FACET_PARAMS_TYPE.RANGE).name,
|
|
18985
|
+
...paramsToRemove
|
|
18986
|
+
]
|
|
18987
|
+
});
|
|
18988
|
+
return;
|
|
18989
|
+
}
|
|
18977
18990
|
appendParams({
|
|
18978
18991
|
params: [getFacetParam(facetAction.key, facetValue, FACET_PARAMS_TYPE.RANGE)],
|
|
18979
|
-
paramsToRemove
|
|
18992
|
+
paramsToRemove,
|
|
18980
18993
|
encode: false
|
|
18981
18994
|
});
|
|
18982
18995
|
};
|
|
@@ -19769,7 +19782,7 @@ const _hoisted_1$1l = {
|
|
|
19769
19782
|
};
|
|
19770
19783
|
const _hoisted_2$W = { class: "lupa-dialog-content" };
|
|
19771
19784
|
const _hoisted_3$E = { class: "lupa-listening-text" };
|
|
19772
|
-
const _hoisted_4$
|
|
19785
|
+
const _hoisted_4$v = { class: "lupa-mic-button-wrapper" };
|
|
19773
19786
|
const _hoisted_5$l = ["aria-label"];
|
|
19774
19787
|
const _sfc_main$1z = /* @__PURE__ */ defineComponent({
|
|
19775
19788
|
__name: "VoiceSearchDialog",
|
|
@@ -19883,7 +19896,7 @@ const _sfc_main$1z = /* @__PURE__ */ defineComponent({
|
|
|
19883
19896
|
}),
|
|
19884
19897
|
createBaseVNode("div", _hoisted_2$W, [
|
|
19885
19898
|
createBaseVNode("p", _hoisted_3$E, toDisplayString(description.value), 1),
|
|
19886
|
-
createBaseVNode("div", _hoisted_4$
|
|
19899
|
+
createBaseVNode("div", _hoisted_4$v, [
|
|
19887
19900
|
createBaseVNode("button", {
|
|
19888
19901
|
class: normalizeClass(["lupa-mic-button", { recording: unref(isRecording) }]),
|
|
19889
19902
|
onClick: handleRecordingButtonClick,
|
|
@@ -19908,7 +19921,7 @@ const _sfc_main$1z = /* @__PURE__ */ defineComponent({
|
|
|
19908
19921
|
const _hoisted_1$1k = { id: "lupa-search-box-input-container" };
|
|
19909
19922
|
const _hoisted_2$V = { class: "lupa-input-clear" };
|
|
19910
19923
|
const _hoisted_3$D = { id: "lupa-search-box-input" };
|
|
19911
|
-
const _hoisted_4$
|
|
19924
|
+
const _hoisted_4$u = ["value"];
|
|
19912
19925
|
const _hoisted_5$k = ["aria-label", "placeholder"];
|
|
19913
19926
|
const _hoisted_6$8 = {
|
|
19914
19927
|
key: 0,
|
|
@@ -20061,7 +20074,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
|
|
|
20061
20074
|
"aria-hidden": "true",
|
|
20062
20075
|
value: showHint.value ? suggestedValue.value.item.suggestion : "",
|
|
20063
20076
|
disabled: ""
|
|
20064
|
-
}, null, 8, _hoisted_4$
|
|
20077
|
+
}, null, 8, _hoisted_4$u),
|
|
20065
20078
|
withDirectives(createBaseVNode("input", mergeProps({
|
|
20066
20079
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
|
|
20067
20080
|
}, inputAttributes.value, {
|
|
@@ -20311,7 +20324,7 @@ const _hoisted_3$C = {
|
|
|
20311
20324
|
class: "lupa-suggestion-facet",
|
|
20312
20325
|
"data-cy": "lupa-suggestion-facet"
|
|
20313
20326
|
};
|
|
20314
|
-
const _hoisted_4$
|
|
20327
|
+
const _hoisted_4$t = {
|
|
20315
20328
|
class: "lupa-suggestion-facet-label",
|
|
20316
20329
|
"data-cy": "lupa-suggestion-facet-label"
|
|
20317
20330
|
};
|
|
@@ -20358,7 +20371,7 @@ const _sfc_main$1t = /* @__PURE__ */ defineComponent({
|
|
|
20358
20371
|
innerHTML: _ctx.suggestion.displayHighlight
|
|
20359
20372
|
}, null, 8, _hoisted_1$1g)) : (openBlock(), createElementBlock("div", _hoisted_2$T, toDisplayString(_ctx.suggestion.display), 1)),
|
|
20360
20373
|
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$C, [
|
|
20361
|
-
createBaseVNode("span", _hoisted_4$
|
|
20374
|
+
createBaseVNode("span", _hoisted_4$t, toDisplayString(facetLabel.value), 1),
|
|
20362
20375
|
createBaseVNode("span", _hoisted_5$j, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
20363
20376
|
])) : createCommentVNode("", true)
|
|
20364
20377
|
]);
|
|
@@ -30098,7 +30111,7 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
30098
30111
|
const _hoisted_1$1a = ["innerHTML"];
|
|
30099
30112
|
const _hoisted_2$P = { key: 0 };
|
|
30100
30113
|
const _hoisted_3$B = { key: 1 };
|
|
30101
|
-
const _hoisted_4$
|
|
30114
|
+
const _hoisted_4$s = { class: "lupa-search-box-custom-label" };
|
|
30102
30115
|
const _hoisted_5$i = { class: "lupa-search-box-custom-text" };
|
|
30103
30116
|
const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
30104
30117
|
__name: "SearchBoxProductCustom",
|
|
@@ -30131,7 +30144,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
30131
30144
|
class: [className.value, "lupa-search-box-product-custom"]
|
|
30132
30145
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), [
|
|
30133
30146
|
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$P, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$B, [
|
|
30134
|
-
createBaseVNode("div", _hoisted_4$
|
|
30147
|
+
createBaseVNode("div", _hoisted_4$s, toDisplayString(label.value), 1),
|
|
30135
30148
|
createBaseVNode("div", _hoisted_5$i, toDisplayString(text.value), 1)
|
|
30136
30149
|
]))
|
|
30137
30150
|
], 16));
|
|
@@ -30482,7 +30495,7 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
|
|
|
30482
30495
|
const _hoisted_1$18 = { class: "lupa-search-box-add-to-cart-wrapper" };
|
|
30483
30496
|
const _hoisted_2$O = { class: "lupa-search-box-product-addtocart" };
|
|
30484
30497
|
const _hoisted_3$A = ["disabled"];
|
|
30485
|
-
const _hoisted_4$
|
|
30498
|
+
const _hoisted_4$r = ["href"];
|
|
30486
30499
|
const _hoisted_5$h = ["disabled"];
|
|
30487
30500
|
const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
30488
30501
|
__name: "SearchBoxProductAddToCart",
|
|
@@ -30504,6 +30517,13 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
30504
30517
|
const { addToCartAmount } = storeToRefs(searchResultStore);
|
|
30505
30518
|
const emit2 = __emit;
|
|
30506
30519
|
const loading = ref(false);
|
|
30520
|
+
const addToCartButtonClass = computed(() => {
|
|
30521
|
+
return {
|
|
30522
|
+
[props.options.className]: Boolean(props.options.className),
|
|
30523
|
+
"lupa-add-to-cart-loading": loading.value,
|
|
30524
|
+
"lupa-add-to-cart": !loading.value
|
|
30525
|
+
};
|
|
30526
|
+
});
|
|
30507
30527
|
const label = computed(() => {
|
|
30508
30528
|
return props.options.labels.addToCart;
|
|
30509
30529
|
});
|
|
@@ -30527,15 +30547,15 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
30527
30547
|
createBaseVNode("div", _hoisted_2$O, [
|
|
30528
30548
|
hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
|
|
30529
30549
|
key: 0,
|
|
30530
|
-
class:
|
|
30550
|
+
class: addToCartButtonClass.value,
|
|
30531
30551
|
"data-cy": "lupa-add-to-cart",
|
|
30532
30552
|
disabled: !inStockValue.value || loading.value
|
|
30533
30553
|
}, _ctx.dynamicAttributes, { onClick: handleClick }), [
|
|
30534
|
-
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$
|
|
30554
|
+
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$r)
|
|
30535
30555
|
], 16, _hoisted_3$A)) : (openBlock(), createElementBlock("button", mergeProps({
|
|
30536
30556
|
key: 1,
|
|
30537
30557
|
onClick: withModifiers(handleClick, ["stop", "prevent"]),
|
|
30538
|
-
class:
|
|
30558
|
+
class: addToCartButtonClass.value,
|
|
30539
30559
|
"data-cy": "lupa-add-to-cart",
|
|
30540
30560
|
type: "button",
|
|
30541
30561
|
disabled: !inStockValue.value || loading.value
|
|
@@ -30651,7 +30671,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
30651
30671
|
const _hoisted_1$16 = { class: "lupa-badge-title" };
|
|
30652
30672
|
const _hoisted_2$N = ["src"];
|
|
30653
30673
|
const _hoisted_3$z = { key: 1 };
|
|
30654
|
-
const _hoisted_4$
|
|
30674
|
+
const _hoisted_4$q = {
|
|
30655
30675
|
key: 0,
|
|
30656
30676
|
class: "lupa-badge-full-text"
|
|
30657
30677
|
};
|
|
@@ -30695,7 +30715,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
30695
30715
|
}, null, 8, _hoisted_2$N)) : createCommentVNode("", true),
|
|
30696
30716
|
hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$z, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
|
|
30697
30717
|
]),
|
|
30698
|
-
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
30718
|
+
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$q, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
|
|
30699
30719
|
], 6);
|
|
30700
30720
|
};
|
|
30701
30721
|
}
|
|
@@ -31436,7 +31456,16 @@ const extractFromHtmlElementAttribute = (options) => {
|
|
|
31436
31456
|
if (attr === "value" && (element == null ? void 0 : element.value)) {
|
|
31437
31457
|
return element.value;
|
|
31438
31458
|
}
|
|
31439
|
-
|
|
31459
|
+
const attributeValue = element.getAttribute(attr);
|
|
31460
|
+
if (attributeValue === null || attributeValue === void 0) {
|
|
31461
|
+
return options.default;
|
|
31462
|
+
}
|
|
31463
|
+
if (options.regex) {
|
|
31464
|
+
const regex = new RegExp(options.regex);
|
|
31465
|
+
const match = attributeValue.match(regex);
|
|
31466
|
+
return match ? match[1] : options.default;
|
|
31467
|
+
}
|
|
31468
|
+
return attributeValue;
|
|
31440
31469
|
};
|
|
31441
31470
|
const getValueFromPath = (obj, path) => {
|
|
31442
31471
|
return path.split(".").reduce((value, key) => value && value[key] || null, obj);
|
|
@@ -31654,7 +31683,7 @@ const _hoisted_3$x = {
|
|
|
31654
31683
|
key: 0,
|
|
31655
31684
|
class: "lupa-panel-title lupa-panel-title-top-results"
|
|
31656
31685
|
};
|
|
31657
|
-
const _hoisted_4$
|
|
31686
|
+
const _hoisted_4$p = {
|
|
31658
31687
|
key: 1,
|
|
31659
31688
|
class: "lupa-panel-title"
|
|
31660
31689
|
};
|
|
@@ -31850,7 +31879,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
31850
31879
|
"data-cy": "lupa-panel-" + panel.type + "-index"
|
|
31851
31880
|
}, [
|
|
31852
31881
|
((_a25 = panel.labels) == null ? void 0 : _a25.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$x, toDisplayString((_b25 = panel.labels) == null ? void 0 : _b25.topResultsTitle), 1)) : createCommentVNode("", true),
|
|
31853
|
-
((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
31882
|
+
((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$p, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
|
|
31854
31883
|
panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
|
|
31855
31884
|
key: 2,
|
|
31856
31885
|
panel,
|
|
@@ -32348,7 +32377,7 @@ const _hoisted_3$w = {
|
|
|
32348
32377
|
key: 1,
|
|
32349
32378
|
"data-cy": "did-you-mean-label"
|
|
32350
32379
|
};
|
|
32351
|
-
const _hoisted_4$
|
|
32380
|
+
const _hoisted_4$o = { key: 1 };
|
|
32352
32381
|
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
32353
32382
|
__name: "SearchResultsDidYouMean",
|
|
32354
32383
|
props: {
|
|
@@ -32399,7 +32428,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
32399
32428
|
class: "lupa-did-you-mean lupa-highlighted-search-text",
|
|
32400
32429
|
"data-cy": "did-you-mean-value",
|
|
32401
32430
|
onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
|
|
32402
|
-
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$
|
|
32431
|
+
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$o, toDisplayString(label) + " ", 1))
|
|
32403
32432
|
]);
|
|
32404
32433
|
}), 128))
|
|
32405
32434
|
])) : createCommentVNode("", true)
|
|
@@ -32449,7 +32478,7 @@ const _hoisted_3$v = {
|
|
|
32449
32478
|
key: 1,
|
|
32450
32479
|
class: "lupa-results-total-count"
|
|
32451
32480
|
};
|
|
32452
|
-
const _hoisted_4$
|
|
32481
|
+
const _hoisted_4$n = { class: "lupa-results-total-count-number" };
|
|
32453
32482
|
const _hoisted_5$f = ["innerHTML"];
|
|
32454
32483
|
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
32455
32484
|
__name: "SearchResultsTitle",
|
|
@@ -32499,7 +32528,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
32499
32528
|
queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$G, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
|
|
32500
32529
|
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$v, [
|
|
32501
32530
|
createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
|
|
32502
|
-
createBaseVNode("span", _hoisted_4$
|
|
32531
|
+
createBaseVNode("span", _hoisted_4$n, toDisplayString(unref(totalItems)), 1),
|
|
32503
32532
|
_cache[0] || (_cache[0] = createTextVNode(")"))
|
|
32504
32533
|
])) : createCommentVNode("", true)
|
|
32505
32534
|
])) : createCommentVNode("", true),
|
|
@@ -32581,7 +32610,7 @@ const _hoisted_3$u = {
|
|
|
32581
32610
|
key: 0,
|
|
32582
32611
|
class: "filter-values"
|
|
32583
32612
|
};
|
|
32584
|
-
const _hoisted_4$
|
|
32613
|
+
const _hoisted_4$m = { class: "lupa-current-filter-list" };
|
|
32585
32614
|
const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
32586
32615
|
__name: "CurrentFilters",
|
|
32587
32616
|
props: {
|
|
@@ -32673,7 +32702,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
32673
32702
|
}, null, 2)) : createCommentVNode("", true)
|
|
32674
32703
|
]),
|
|
32675
32704
|
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$u, [
|
|
32676
|
-
createBaseVNode("div", _hoisted_4$
|
|
32705
|
+
createBaseVNode("div", _hoisted_4$m, [
|
|
32677
32706
|
(openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter) => {
|
|
32678
32707
|
return openBlock(), createBlock(_sfc_main$$, {
|
|
32679
32708
|
key: filter.key + "_" + filter.value,
|
|
@@ -32742,7 +32771,7 @@ const _hoisted_1$R = {
|
|
|
32742
32771
|
};
|
|
32743
32772
|
const _hoisted_2$D = { class: "lupa-category-back" };
|
|
32744
32773
|
const _hoisted_3$t = ["href"];
|
|
32745
|
-
const _hoisted_4$
|
|
32774
|
+
const _hoisted_4$l = ["href"];
|
|
32746
32775
|
const _hoisted_5$e = { class: "lupa-child-category-list" };
|
|
32747
32776
|
const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
32748
32777
|
__name: "CategoryFilter",
|
|
@@ -32849,7 +32878,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
32849
32878
|
href: parentUrlLink.value,
|
|
32850
32879
|
class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
|
|
32851
32880
|
onClick: handleNavigationParent
|
|
32852
|
-
}, toDisplayString(parentTitle.value), 11, _hoisted_4$
|
|
32881
|
+
}, toDisplayString(parentTitle.value), 11, _hoisted_4$l)
|
|
32853
32882
|
], 2),
|
|
32854
32883
|
createBaseVNode("div", _hoisted_5$e, [
|
|
32855
32884
|
(openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
|
|
@@ -32870,7 +32899,7 @@ const _hoisted_1$Q = {
|
|
|
32870
32899
|
};
|
|
32871
32900
|
const _hoisted_2$C = ["placeholder"];
|
|
32872
32901
|
const _hoisted_3$s = { class: "lupa-terms-list" };
|
|
32873
|
-
const _hoisted_4$
|
|
32902
|
+
const _hoisted_4$k = ["onClick"];
|
|
32874
32903
|
const _hoisted_5$d = { class: "lupa-term-checkbox-wrapper" };
|
|
32875
32904
|
const _hoisted_6$7 = { class: "lupa-term-label" };
|
|
32876
32905
|
const _hoisted_7$4 = {
|
|
@@ -32941,7 +32970,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
32941
32970
|
});
|
|
32942
32971
|
const handleFacetClick = (item) => {
|
|
32943
32972
|
var _a25;
|
|
32944
|
-
const value = isRange.value ? item.
|
|
32973
|
+
const value = isRange.value ? [item.from, item.to] : (_a25 = item.title) == null ? void 0 : _a25.toString();
|
|
32945
32974
|
emit2("select", {
|
|
32946
32975
|
key: facet.value.key,
|
|
32947
32976
|
value,
|
|
@@ -32955,7 +32984,11 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
32955
32984
|
var _a25, _b25;
|
|
32956
32985
|
let selectedItems = (_a25 = currentFiltersValue.value) != null ? _a25 : [];
|
|
32957
32986
|
selectedItems = isRange.value && selectedItems ? [rangeFilterToString(selectedItems)] : selectedItems;
|
|
32958
|
-
|
|
32987
|
+
if (isRange.value) {
|
|
32988
|
+
return selectedItems == null ? void 0 : selectedItems.includes(rangeFilterToString({ gte: item.from, lt: item.to }));
|
|
32989
|
+
} else {
|
|
32990
|
+
return selectedItems == null ? void 0 : selectedItems.includes((_b25 = item.title) == null ? void 0 : _b25.toString());
|
|
32991
|
+
}
|
|
32959
32992
|
};
|
|
32960
32993
|
const getItemLabel = (item) => {
|
|
32961
32994
|
var _a25;
|
|
@@ -32998,7 +33031,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
32998
33031
|
createBaseVNode("span", _hoisted_6$7, toDisplayString(getItemLabel(item)), 1),
|
|
32999
33032
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_7$4, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
|
|
33000
33033
|
], 2)
|
|
33001
|
-
], 10, _hoisted_4$
|
|
33034
|
+
], 10, _hoisted_4$k);
|
|
33002
33035
|
}), 128))
|
|
33003
33036
|
]),
|
|
33004
33037
|
displayShowMore.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -33915,7 +33948,7 @@ const _hoisted_3$r = {
|
|
|
33915
33948
|
key: 1,
|
|
33916
33949
|
class: "lupa-stats-facet-summary-input"
|
|
33917
33950
|
};
|
|
33918
|
-
const _hoisted_4$
|
|
33951
|
+
const _hoisted_4$j = { class: "lupa-stats-from" };
|
|
33919
33952
|
const _hoisted_5$c = {
|
|
33920
33953
|
key: 0,
|
|
33921
33954
|
class: "lupa-stats-range-label"
|
|
@@ -34153,7 +34186,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
34153
34186
|
return (_ctx, _cache) => {
|
|
34154
34187
|
return openBlock(), createElementBlock("div", _hoisted_1$P, [
|
|
34155
34188
|
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$B, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$r, [
|
|
34156
|
-
createBaseVNode("div", _hoisted_4$
|
|
34189
|
+
createBaseVNode("div", _hoisted_4$j, [
|
|
34157
34190
|
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_5$c, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
|
|
34158
34191
|
withDirectives(createBaseVNode("input", {
|
|
34159
34192
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
|
|
@@ -34222,7 +34255,7 @@ const _hoisted_3$q = {
|
|
|
34222
34255
|
key: 0,
|
|
34223
34256
|
class: "lupa-term-count"
|
|
34224
34257
|
};
|
|
34225
|
-
const _hoisted_4$
|
|
34258
|
+
const _hoisted_4$i = {
|
|
34226
34259
|
key: 0,
|
|
34227
34260
|
class: "lupa-facet-level"
|
|
34228
34261
|
};
|
|
@@ -34292,7 +34325,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
34292
34325
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_3$q, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
|
|
34293
34326
|
], 2)
|
|
34294
34327
|
]),
|
|
34295
|
-
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
34328
|
+
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$i, [
|
|
34296
34329
|
(openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
|
|
34297
34330
|
return openBlock(), createBlock(_component_HierarchyFacetLevel, {
|
|
34298
34331
|
key: itemChild.title,
|
|
@@ -34429,7 +34462,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
34429
34462
|
},
|
|
34430
34463
|
emits: ["select", "clear"],
|
|
34431
34464
|
setup(__props, { emit: __emit }) {
|
|
34432
|
-
var _a25, _b25;
|
|
34465
|
+
var _a25, _b25, _c;
|
|
34433
34466
|
const props = __props;
|
|
34434
34467
|
const facet = computed(() => {
|
|
34435
34468
|
var _a26;
|
|
@@ -34441,10 +34474,19 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
34441
34474
|
});
|
|
34442
34475
|
const searchResultStore = useSearchResultStore();
|
|
34443
34476
|
const optionsStore = useOptionsStore();
|
|
34477
|
+
const screenStore = useScreenStore();
|
|
34444
34478
|
const { currentFilterKeys } = storeToRefs(searchResultStore);
|
|
34445
34479
|
const { searchResultOptions } = storeToRefs(optionsStore);
|
|
34480
|
+
const { isMobileWidth } = storeToRefs(screenStore);
|
|
34446
34481
|
const emit2 = __emit;
|
|
34447
|
-
const
|
|
34482
|
+
const allExpanded = computed(() => {
|
|
34483
|
+
var _a26, _b26, _c2, _d, _e, _f;
|
|
34484
|
+
if (isMobileWidth.value) {
|
|
34485
|
+
return (_c2 = (_b26 = (_a26 = props.options) == null ? void 0 : _a26.expandAll) == null ? void 0 : _b26.mobile) != null ? _c2 : false;
|
|
34486
|
+
}
|
|
34487
|
+
return (_f = (_e = (_d = props.options) == null ? void 0 : _d.expandAll) == null ? void 0 : _e.desktop) != null ? _f : false;
|
|
34488
|
+
});
|
|
34489
|
+
const isOpen = ref((_c = ((_b25 = (_a25 = props.options) == null ? void 0 : _a25.expand) == null ? void 0 : _b25.includes(props.facet.key)) || allExpanded.value) != null ? _c : false);
|
|
34448
34490
|
const facetPanel = ref(null);
|
|
34449
34491
|
const facetType = computed(() => {
|
|
34450
34492
|
switch (facet.value.type) {
|
|
@@ -34707,6 +34749,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
34707
34749
|
case "range":
|
|
34708
34750
|
toggleRangeFilter(
|
|
34709
34751
|
paramStore.appendParams,
|
|
34752
|
+
paramStore.removeParameters,
|
|
34710
34753
|
facetAction,
|
|
34711
34754
|
optionsStore.getQueryParamName,
|
|
34712
34755
|
filters.value
|
|
@@ -34830,7 +34873,7 @@ const _hoisted_1$I = {
|
|
|
34830
34873
|
};
|
|
34831
34874
|
const _hoisted_2$w = { class: "lupa-mobile-sidebar-content" };
|
|
34832
34875
|
const _hoisted_3$o = { class: "lupa-sidebar-top" };
|
|
34833
|
-
const _hoisted_4$
|
|
34876
|
+
const _hoisted_4$h = { class: "lupa-sidebar-title" };
|
|
34834
34877
|
const _hoisted_5$b = {
|
|
34835
34878
|
key: 0,
|
|
34836
34879
|
class: "lupa-sidebar-filter-count"
|
|
@@ -34875,7 +34918,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
34875
34918
|
}),
|
|
34876
34919
|
createBaseVNode("div", _hoisted_2$w, [
|
|
34877
34920
|
createBaseVNode("div", _hoisted_3$o, [
|
|
34878
|
-
createBaseVNode("div", _hoisted_4$
|
|
34921
|
+
createBaseVNode("div", _hoisted_4$h, [
|
|
34879
34922
|
createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
|
|
34880
34923
|
isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_5$b, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
34881
34924
|
]),
|
|
@@ -34902,7 +34945,7 @@ const _hoisted_3$n = {
|
|
|
34902
34945
|
key: 1,
|
|
34903
34946
|
class: "lupa-search-results-breadcrumb-text"
|
|
34904
34947
|
};
|
|
34905
|
-
const _hoisted_4$
|
|
34948
|
+
const _hoisted_4$g = { key: 2 };
|
|
34906
34949
|
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
34907
34950
|
__name: "SearchResultsBreadcrumbs",
|
|
34908
34951
|
props: {
|
|
@@ -34944,7 +34987,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
34944
34987
|
return handleNavigation(e2, (_a26 = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a26 : "");
|
|
34945
34988
|
}
|
|
34946
34989
|
}, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$v)) : (openBlock(), createElementBlock("span", _hoisted_3$n, toDisplayString(getLabel(breadcrumb.label)), 1)),
|
|
34947
|
-
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
34990
|
+
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$g, toDisplayString((_a25 = breadcrumb.separator) != null ? _a25 : "/"), 1)) : createCommentVNode("", true)
|
|
34948
34991
|
]);
|
|
34949
34992
|
}), 128))
|
|
34950
34993
|
]);
|
|
@@ -35107,7 +35150,7 @@ const _hoisted_2$u = {
|
|
|
35107
35150
|
class: "lupa-page-number-separator"
|
|
35108
35151
|
};
|
|
35109
35152
|
const _hoisted_3$m = ["onClick"];
|
|
35110
|
-
const _hoisted_4$
|
|
35153
|
+
const _hoisted_4$f = {
|
|
35111
35154
|
key: 0,
|
|
35112
35155
|
class: "lupa-page-number-separator"
|
|
35113
35156
|
};
|
|
@@ -35213,7 +35256,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
35213
35256
|
}, toDisplayString(page), 11, _hoisted_3$m);
|
|
35214
35257
|
}), 128)),
|
|
35215
35258
|
showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
35216
|
-
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
35259
|
+
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$f, "...")) : createCommentVNode("", true),
|
|
35217
35260
|
createBaseVNode("div", {
|
|
35218
35261
|
class: "lupa-page-number lupa-page-number-last",
|
|
35219
35262
|
onClick: _cache[2] || (_cache[2] = () => {
|
|
@@ -35241,7 +35284,7 @@ const _hoisted_3$l = {
|
|
|
35241
35284
|
class: "lupa-select-label",
|
|
35242
35285
|
for: "lupa-page-size-select-dropdown"
|
|
35243
35286
|
};
|
|
35244
|
-
const _hoisted_4$
|
|
35287
|
+
const _hoisted_4$e = ["aria-label"];
|
|
35245
35288
|
const _hoisted_5$a = ["value"];
|
|
35246
35289
|
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
35247
35290
|
__name: "SearchResultsPageSize",
|
|
@@ -35291,7 +35334,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
35291
35334
|
value: option
|
|
35292
35335
|
}, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$a);
|
|
35293
35336
|
}), 128))
|
|
35294
|
-
], 40, _hoisted_4$
|
|
35337
|
+
], 40, _hoisted_4$e)
|
|
35295
35338
|
])
|
|
35296
35339
|
]);
|
|
35297
35340
|
};
|
|
@@ -35306,7 +35349,7 @@ const _hoisted_3$k = {
|
|
|
35306
35349
|
class: "lupa-select-label",
|
|
35307
35350
|
for: "lupa-sort-select-dropdown"
|
|
35308
35351
|
};
|
|
35309
|
-
const _hoisted_4$
|
|
35352
|
+
const _hoisted_4$d = ["aria-label"];
|
|
35310
35353
|
const _hoisted_5$9 = ["value"];
|
|
35311
35354
|
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
35312
35355
|
__name: "SearchResultsSort",
|
|
@@ -35377,7 +35420,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
35377
35420
|
value: option.key
|
|
35378
35421
|
}, toDisplayString(option.label), 9, _hoisted_5$9);
|
|
35379
35422
|
}), 128))
|
|
35380
|
-
], 40, _hoisted_4$
|
|
35423
|
+
], 40, _hoisted_4$d), [
|
|
35381
35424
|
[vModelSelect, selectedKey.value]
|
|
35382
35425
|
])
|
|
35383
35426
|
])
|
|
@@ -35391,7 +35434,7 @@ const _hoisted_2$r = {
|
|
|
35391
35434
|
class: "lupa-toolbar-right-title"
|
|
35392
35435
|
};
|
|
35393
35436
|
const _hoisted_3$j = { key: 2 };
|
|
35394
|
-
const _hoisted_4$
|
|
35437
|
+
const _hoisted_4$c = { key: 4 };
|
|
35395
35438
|
const _hoisted_5$8 = { key: 6 };
|
|
35396
35439
|
const _hoisted_6$4 = { class: "lupa-toolbar-right" };
|
|
35397
35440
|
const _hoisted_7$2 = {
|
|
@@ -35519,7 +35562,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
35519
35562
|
label: searchSummaryLabel.value,
|
|
35520
35563
|
clearable: unref(hasAnyFilter) && showFilterClear.value,
|
|
35521
35564
|
onClear: handleClearAll
|
|
35522
|
-
}, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$
|
|
35565
|
+
}, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$c)),
|
|
35523
35566
|
displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$I, {
|
|
35524
35567
|
key: 5,
|
|
35525
35568
|
options: paginationOptions.value.pageSelect,
|
|
@@ -35572,7 +35615,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
35572
35615
|
const _hoisted_1$z = ["title", "innerHTML"];
|
|
35573
35616
|
const _hoisted_2$q = ["title"];
|
|
35574
35617
|
const _hoisted_3$i = ["href", "innerHTML"];
|
|
35575
|
-
const _hoisted_4$
|
|
35618
|
+
const _hoisted_4$b = ["title"];
|
|
35576
35619
|
const _hoisted_5$7 = {
|
|
35577
35620
|
key: 0,
|
|
35578
35621
|
class: "lupa-search-results-product-title-text"
|
|
@@ -35640,7 +35683,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
35640
35683
|
class: "lupa-search-results-product-title-text lupa-title-link",
|
|
35641
35684
|
onClick: handleNavigation
|
|
35642
35685
|
}, toDisplayString(title.value), 9, _hoisted_6$3)) : createCommentVNode("", true)
|
|
35643
|
-
], 12, _hoisted_4$
|
|
35686
|
+
], 12, _hoisted_4$b));
|
|
35644
35687
|
};
|
|
35645
35688
|
}
|
|
35646
35689
|
});
|
|
@@ -35683,7 +35726,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
35683
35726
|
const _hoisted_1$x = { id: "lupa-search-results-rating" };
|
|
35684
35727
|
const _hoisted_2$p = { class: "lupa-ratings" };
|
|
35685
35728
|
const _hoisted_3$h = { class: "lupa-ratings-base" };
|
|
35686
|
-
const _hoisted_4$
|
|
35729
|
+
const _hoisted_4$a = ["innerHTML"];
|
|
35687
35730
|
const _hoisted_5$6 = { class: "lupa-rating-wrapper" };
|
|
35688
35731
|
const _hoisted_6$2 = ["innerHTML"];
|
|
35689
35732
|
const _hoisted_7$1 = ["href"];
|
|
@@ -35733,7 +35776,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
35733
35776
|
key: index,
|
|
35734
35777
|
innerHTML: star,
|
|
35735
35778
|
class: "lupa-rating lupa-rating-not-highlighted"
|
|
35736
|
-
}, null, 8, _hoisted_4$
|
|
35779
|
+
}, null, 8, _hoisted_4$a);
|
|
35737
35780
|
}), 128))
|
|
35738
35781
|
]),
|
|
35739
35782
|
createBaseVNode("div", _hoisted_5$6, [
|
|
@@ -35826,7 +35869,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
35826
35869
|
const _hoisted_1$v = { class: "lupa-search-results-add-to-cart-wrapper" };
|
|
35827
35870
|
const _hoisted_2$o = { class: "lupa-search-results-product-addtocart" };
|
|
35828
35871
|
const _hoisted_3$g = ["disabled"];
|
|
35829
|
-
const _hoisted_4$
|
|
35872
|
+
const _hoisted_4$9 = ["href"];
|
|
35830
35873
|
const _hoisted_5$5 = ["id", "disabled"];
|
|
35831
35874
|
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
35832
35875
|
__name: "SearchResultsProductAddToCart",
|
|
@@ -35864,6 +35907,13 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
35864
35907
|
const hasLink = computed(() => {
|
|
35865
35908
|
return Boolean(props.link && props.options.link);
|
|
35866
35909
|
});
|
|
35910
|
+
const addToCartButtonClass = computed(() => {
|
|
35911
|
+
return {
|
|
35912
|
+
[props.options.className]: Boolean(props.options.className),
|
|
35913
|
+
"lupa-add-to-cart-loading": loading.value,
|
|
35914
|
+
"lupa-add-to-cart": !loading.value
|
|
35915
|
+
};
|
|
35916
|
+
});
|
|
35867
35917
|
const handleClick = (e2) => __async2(null, null, function* () {
|
|
35868
35918
|
if (productCardIsClickable.value && !hasLink.value) {
|
|
35869
35919
|
e2.preventDefault();
|
|
@@ -35884,15 +35934,15 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
35884
35934
|
createBaseVNode("div", _hoisted_2$o, [
|
|
35885
35935
|
hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
|
|
35886
35936
|
key: 0,
|
|
35887
|
-
class:
|
|
35937
|
+
class: addToCartButtonClass.value,
|
|
35888
35938
|
"data-cy": "lupa-add-to-cart",
|
|
35889
35939
|
disabled: !inStockValue.value || loading.value
|
|
35890
35940
|
}, _ctx.dynamicAttributes, { onClick: handleClick }), [
|
|
35891
|
-
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$
|
|
35941
|
+
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$9)
|
|
35892
35942
|
], 16, _hoisted_3$g)) : (openBlock(), createElementBlock("button", mergeProps({
|
|
35893
35943
|
key: 1,
|
|
35894
35944
|
id: id.value,
|
|
35895
|
-
class:
|
|
35945
|
+
class: addToCartButtonClass.value,
|
|
35896
35946
|
"data-cy": "lupa-add-to-cart",
|
|
35897
35947
|
disabled: !inStockValue.value || loading.value
|
|
35898
35948
|
}, _ctx.dynamicAttributes, {
|
|
@@ -35906,7 +35956,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
35906
35956
|
const _hoisted_1$u = ["innerHTML"];
|
|
35907
35957
|
const _hoisted_2$n = { key: 0 };
|
|
35908
35958
|
const _hoisted_3$f = { key: 1 };
|
|
35909
|
-
const _hoisted_4$
|
|
35959
|
+
const _hoisted_4$8 = { class: "lupa-search-box-custom-label" };
|
|
35910
35960
|
const _hoisted_5$4 = { class: "lupa-search-box-custom-text" };
|
|
35911
35961
|
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
35912
35962
|
__name: "SearchResultsProductCustom",
|
|
@@ -35935,7 +35985,11 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
35935
35985
|
var _a25;
|
|
35936
35986
|
return (_a25 = props.options.isHtml) != null ? _a25 : false;
|
|
35937
35987
|
});
|
|
35938
|
-
const handleClick = () => __async2(null, null, function* () {
|
|
35988
|
+
const handleClick = (e2) => __async2(null, null, function* () {
|
|
35989
|
+
if (e2 && props.options.stopPropagationOnClick) {
|
|
35990
|
+
e2.stopPropagation();
|
|
35991
|
+
e2.preventDefault();
|
|
35992
|
+
}
|
|
35939
35993
|
if (!props.options.action) {
|
|
35940
35994
|
return;
|
|
35941
35995
|
}
|
|
@@ -35951,7 +36005,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
35951
36005
|
class: className.value
|
|
35952
36006
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), [
|
|
35953
36007
|
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$n, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$f, [
|
|
35954
|
-
createBaseVNode("div", _hoisted_4$
|
|
36008
|
+
createBaseVNode("div", _hoisted_4$8, toDisplayString(label.value), 1),
|
|
35955
36009
|
createBaseVNode("div", _hoisted_5$4, toDisplayString(text.value), 1)
|
|
35956
36010
|
]))
|
|
35957
36011
|
], 16));
|
|
@@ -35978,7 +36032,11 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
35978
36032
|
const className = computed(() => {
|
|
35979
36033
|
return props.options.className;
|
|
35980
36034
|
});
|
|
35981
|
-
const handleClick = () => __async2(null, null, function* () {
|
|
36035
|
+
const handleClick = (e2) => __async2(null, null, function* () {
|
|
36036
|
+
if (e2 && props.options.stopPropagationOnClick) {
|
|
36037
|
+
e2.stopPropagation();
|
|
36038
|
+
e2.preventDefault();
|
|
36039
|
+
}
|
|
35982
36040
|
if (!props.options.action) {
|
|
35983
36041
|
return;
|
|
35984
36042
|
}
|
|
@@ -35998,7 +36056,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
35998
36056
|
const _hoisted_1$s = { id: "lupa-search-results-rating" };
|
|
35999
36057
|
const _hoisted_2$m = ["innerHTML"];
|
|
36000
36058
|
const _hoisted_3$e = { class: "lupa-ratings" };
|
|
36001
|
-
const _hoisted_4$
|
|
36059
|
+
const _hoisted_4$7 = ["href"];
|
|
36002
36060
|
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
36003
36061
|
__name: "SearchResultsProductSingleStarRating",
|
|
36004
36062
|
props: {
|
|
@@ -36036,7 +36094,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
36036
36094
|
createBaseVNode("a", {
|
|
36037
36095
|
href: ratingLink.value,
|
|
36038
36096
|
class: "lupa-total-ratings"
|
|
36039
|
-
}, toDisplayString(totalRatings.value), 9, _hoisted_4$
|
|
36097
|
+
}, toDisplayString(totalRatings.value), 9, _hoisted_4$7)
|
|
36040
36098
|
]);
|
|
36041
36099
|
};
|
|
36042
36100
|
}
|
|
@@ -36393,7 +36451,7 @@ const _hoisted_3$c = {
|
|
|
36393
36451
|
class: "lupa-similar-query-label",
|
|
36394
36452
|
"data-cy": "lupa-similar-query-label"
|
|
36395
36453
|
};
|
|
36396
|
-
const _hoisted_4$
|
|
36454
|
+
const _hoisted_4$6 = ["onClick"];
|
|
36397
36455
|
const _hoisted_5$3 = ["innerHTML"];
|
|
36398
36456
|
const _hoisted_6$1 = { key: 0 };
|
|
36399
36457
|
const _hoisted_7 = {
|
|
@@ -36454,7 +36512,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
36454
36512
|
innerHTML: getSimilarQueryContent(similarQuery.displayQuery)
|
|
36455
36513
|
}, null, 8, _hoisted_5$3),
|
|
36456
36514
|
similarQuery.count ? (openBlock(), createElementBlock("span", _hoisted_6$1, " (" + toDisplayString(similarQuery.count) + ")", 1)) : createCommentVNode("", true)
|
|
36457
|
-
], 8, _hoisted_4$
|
|
36515
|
+
], 8, _hoisted_4$6)
|
|
36458
36516
|
]),
|
|
36459
36517
|
createBaseVNode("div", _hoisted_7, [
|
|
36460
36518
|
(openBlock(true), createElementBlock(Fragment, null, renderList(similarQuery.items, (product, index2) => {
|
|
@@ -36786,7 +36844,7 @@ const extractRelatedSource = (source, searchResults2, options, activeFilters) =>
|
|
|
36786
36844
|
const _hoisted_1$l = { class: "lupa-related-query-item" };
|
|
36787
36845
|
const _hoisted_2$g = { class: "lupa-related-query-image" };
|
|
36788
36846
|
const _hoisted_3$a = { class: "lupa-related-query-label" };
|
|
36789
|
-
const _hoisted_4$
|
|
36847
|
+
const _hoisted_4$5 = { class: "lupa-related-query-title" };
|
|
36790
36848
|
const _hoisted_5$2 = {
|
|
36791
36849
|
key: 0,
|
|
36792
36850
|
class: "lupa-related-query-count"
|
|
@@ -36898,7 +36956,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
36898
36956
|
}, null, 8, ["item", "options"])) : createCommentVNode("", true)
|
|
36899
36957
|
]),
|
|
36900
36958
|
createBaseVNode("div", _hoisted_3$a, [
|
|
36901
|
-
createBaseVNode("span", _hoisted_4$
|
|
36959
|
+
createBaseVNode("span", _hoisted_4$5, toDisplayString(_ctx.query), 1),
|
|
36902
36960
|
((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$2, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
|
|
36903
36961
|
])
|
|
36904
36962
|
]);
|
|
@@ -37125,7 +37183,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
37125
37183
|
const _hoisted_1$h = { class: "lupa-related-query-item" };
|
|
37126
37184
|
const _hoisted_2$d = { class: "lupa-related-query-image" };
|
|
37127
37185
|
const _hoisted_3$7 = { class: "lupa-related-query-label" };
|
|
37128
|
-
const _hoisted_4$
|
|
37186
|
+
const _hoisted_4$4 = { class: "lupa-related-query-title" };
|
|
37129
37187
|
const _hoisted_5$1 = {
|
|
37130
37188
|
key: 0,
|
|
37131
37189
|
class: "lupa-related-query-count"
|
|
@@ -37173,7 +37231,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
37173
37231
|
}, null, 8, ["item", "options"])) : createCommentVNode("", true)
|
|
37174
37232
|
]),
|
|
37175
37233
|
createBaseVNode("div", _hoisted_3$7, [
|
|
37176
|
-
createBaseVNode("span", _hoisted_4$
|
|
37234
|
+
createBaseVNode("span", _hoisted_4$4, toDisplayString(query.value), 1),
|
|
37177
37235
|
((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$1, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
|
|
37178
37236
|
])
|
|
37179
37237
|
]);
|
|
@@ -37317,7 +37375,7 @@ const _hoisted_3$5 = {
|
|
|
37317
37375
|
class: "lupa-empty-results",
|
|
37318
37376
|
"data-cy": "lupa-no-results-in-page"
|
|
37319
37377
|
};
|
|
37320
|
-
const _hoisted_4$
|
|
37378
|
+
const _hoisted_4$3 = {
|
|
37321
37379
|
key: 5,
|
|
37322
37380
|
class: "lupa-empty-results",
|
|
37323
37381
|
"data-cy": "lupa-no-results"
|
|
@@ -37538,7 +37596,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
37538
37596
|
location: "bottom",
|
|
37539
37597
|
sdkOptions: _ctx.options.options
|
|
37540
37598
|
}, null, 8, ["options", "sdkOptions"])
|
|
37541
|
-
], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
37599
|
+
], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
|
|
37542
37600
|
createVNode(_sfc_main$h, {
|
|
37543
37601
|
emptyResultsLabel: (_b25 = _ctx.options.labels) == null ? void 0 : _b25.emptyResults,
|
|
37544
37602
|
currentQueryText: unref(currentQueryText),
|
|
@@ -37574,7 +37632,7 @@ const _hoisted_2$9 = {
|
|
|
37574
37632
|
class: "lupa-category-back"
|
|
37575
37633
|
};
|
|
37576
37634
|
const _hoisted_3$4 = ["href"];
|
|
37577
|
-
const _hoisted_4$
|
|
37635
|
+
const _hoisted_4$2 = {
|
|
37578
37636
|
key: 1,
|
|
37579
37637
|
class: "lupa-child-category-list"
|
|
37580
37638
|
};
|
|
@@ -37634,7 +37692,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
37634
37692
|
onClick: handleNavigationBack
|
|
37635
37693
|
}, toDisplayString(backTitle.value), 9, _hoisted_3$4)
|
|
37636
37694
|
])) : createCommentVNode("", true),
|
|
37637
|
-
hasRelatedCategoryChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
37695
|
+
hasRelatedCategoryChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
|
|
37638
37696
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(relatedCategoryChildren), (child) => {
|
|
37639
37697
|
return openBlock(), createBlock(_sfc_main$Z, {
|
|
37640
37698
|
key: getCategoryKey(child),
|
|
@@ -39551,12 +39609,13 @@ const _hoisted_1$9 = {
|
|
|
39551
39609
|
key: 0,
|
|
39552
39610
|
class: "lupa-recommendation-section-title"
|
|
39553
39611
|
};
|
|
39554
|
-
const _hoisted_2$6 =
|
|
39612
|
+
const _hoisted_2$6 = ["href"];
|
|
39613
|
+
const _hoisted_3$3 = {
|
|
39555
39614
|
key: 1,
|
|
39556
39615
|
class: "lupa-recommended-products",
|
|
39557
39616
|
"data-cy": "lupa-recommended-products"
|
|
39558
39617
|
};
|
|
39559
|
-
const
|
|
39618
|
+
const _hoisted_4$1 = {
|
|
39560
39619
|
key: 1,
|
|
39561
39620
|
class: "lupa-products",
|
|
39562
39621
|
"data-cy": "lupa-products"
|
|
@@ -39600,6 +39659,10 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
39600
39659
|
var _a25, _b25;
|
|
39601
39660
|
return (_b25 = (_a25 = props.options.recommendationLabels) == null ? void 0 : _a25.title) != null ? _b25 : "";
|
|
39602
39661
|
});
|
|
39662
|
+
const hasTitleLink = computed(() => {
|
|
39663
|
+
var _a25;
|
|
39664
|
+
return Boolean((_a25 = props.options.recommendationLabels) == null ? void 0 : _a25.titleLink);
|
|
39665
|
+
});
|
|
39603
39666
|
const hasRecommendations = computed(() => {
|
|
39604
39667
|
return recommendations2.value.length > 0;
|
|
39605
39668
|
});
|
|
@@ -39689,6 +39752,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
39689
39752
|
var _a25, _b25;
|
|
39690
39753
|
return (_b25 = (_a25 = carouselOptions.value) == null ? void 0 : _a25.wrapAround) != null ? _b25 : true;
|
|
39691
39754
|
});
|
|
39755
|
+
const recommendationFilters = computed(() => {
|
|
39756
|
+
return __spreadValues2({}, processExtractionObject(props.options.recommendationFilters));
|
|
39757
|
+
});
|
|
39692
39758
|
const loadLupaRecommendations = () => __async2(null, null, function* () {
|
|
39693
39759
|
var _a25, _b25;
|
|
39694
39760
|
recommendationsType.value = "recommendations_lupasearch";
|
|
@@ -39697,7 +39763,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
39697
39763
|
const result2 = yield LupaSearchSdk.recommend(
|
|
39698
39764
|
props.options.queryKey,
|
|
39699
39765
|
itemId.value,
|
|
39700
|
-
|
|
39766
|
+
recommendationFilters.value,
|
|
39701
39767
|
props.options.options
|
|
39702
39768
|
);
|
|
39703
39769
|
if (!result2.success) {
|
|
@@ -39715,14 +39781,22 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
39715
39781
|
});
|
|
39716
39782
|
__expose({ fetch: fetch2 });
|
|
39717
39783
|
return (_ctx, _cache) => {
|
|
39784
|
+
var _a25;
|
|
39718
39785
|
return openBlock(), createElementBlock("div", {
|
|
39719
39786
|
class: "lupa-search-product-recommendations-wrapper",
|
|
39720
39787
|
ref_key: "rootElement",
|
|
39721
39788
|
ref: rootElement
|
|
39722
39789
|
}, [
|
|
39723
39790
|
hasRecommendations.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
39724
|
-
title.value ? (openBlock(), createElementBlock("h2", _hoisted_1$9,
|
|
39725
|
-
|
|
39791
|
+
title.value ? (openBlock(), createElementBlock("h2", _hoisted_1$9, [
|
|
39792
|
+
!hasTitleLink.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
39793
|
+
createTextVNode(toDisplayString(title.value), 1)
|
|
39794
|
+
], 64)) : (openBlock(), createElementBlock("a", {
|
|
39795
|
+
key: 1,
|
|
39796
|
+
href: (_a25 = _ctx.options.recommendationLabels) == null ? void 0 : _a25.titleLink
|
|
39797
|
+
}, toDisplayString(title.value), 9, _hoisted_2$6))
|
|
39798
|
+
])) : createCommentVNode("", true),
|
|
39799
|
+
!loading.value ? (openBlock(), createElementBlock("div", _hoisted_3$3, [
|
|
39726
39800
|
layoutType.value === "carousel" ? (openBlock(), createBlock(unref(Carousel), mergeProps({ key: 0 }, carouselOptions.value, { "wrap-around": wrapAround.value }), {
|
|
39727
39801
|
addons: withCtx(() => [
|
|
39728
39802
|
createVNode(unref(Navigation))
|
|
@@ -39746,7 +39820,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
39746
39820
|
}), 128))
|
|
39747
39821
|
]),
|
|
39748
39822
|
_: 1
|
|
39749
|
-
}, 16, ["wrap-around"])) : (openBlock(), createElementBlock("div",
|
|
39823
|
+
}, 16, ["wrap-around"])) : (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
|
39750
39824
|
(openBlock(true), createElementBlock(Fragment, null, renderList(recommendations2.value, (product, index) => {
|
|
39751
39825
|
return openBlock(), createBlock(_sfc_main$t, {
|
|
39752
39826
|
style: normalizeStyle(columnSize.value),
|
|
@@ -46485,8 +46559,7 @@ const DEFAULT_OPTIONS_RESULTS = {
|
|
|
46485
46559
|
links: {
|
|
46486
46560
|
details: "/{id}"
|
|
46487
46561
|
},
|
|
46488
|
-
elements: []
|
|
46489
|
-
breadcrumbs: [{ label: "Main Page", link: "/" }, { label: "Search: {1}" }]
|
|
46562
|
+
elements: []
|
|
46490
46563
|
};
|
|
46491
46564
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
46492
46565
|
__name: "SearchResultsEntry",
|