@getlupa/client 1.17.11 → 1.17.14
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 +134 -91
- package/dist/lupaSearch.js +134 -91
- package/dist/lupaSearch.mjs +134 -91
- package/dist/lupaSearch.umd.js +134 -91
- package/package.json +2 -2
package/dist/lupaSearch.mjs
CHANGED
|
@@ -14296,8 +14296,8 @@ const useSearchBoxStore = defineStore("searchBox", () => {
|
|
|
14296
14296
|
const _hoisted_1$1i = { id: "lupa-search-box-input-container" };
|
|
14297
14297
|
const _hoisted_2$T = { class: "lupa-input-clear" };
|
|
14298
14298
|
const _hoisted_3$C = { id: "lupa-search-box-input" };
|
|
14299
|
-
const _hoisted_4$
|
|
14300
|
-
const _hoisted_5$
|
|
14299
|
+
const _hoisted_4$u = ["value"];
|
|
14300
|
+
const _hoisted_5$k = ["aria-label", "placeholder"];
|
|
14301
14301
|
const _hoisted_6$9 = /* @__PURE__ */ createBaseVNode("span", { class: "lupa-search-submit-icon" }, null, -1);
|
|
14302
14302
|
const _hoisted_7$7 = [
|
|
14303
14303
|
_hoisted_6$9
|
|
@@ -14403,7 +14403,7 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
|
|
|
14403
14403
|
"aria-hidden": "true",
|
|
14404
14404
|
value: showHint.value ? suggestedValue.value.item.suggestion : "",
|
|
14405
14405
|
disabled: ""
|
|
14406
|
-
}, null, 8, _hoisted_4$
|
|
14406
|
+
}, null, 8, _hoisted_4$u),
|
|
14407
14407
|
withDirectives(createBaseVNode("input", mergeProps({
|
|
14408
14408
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
|
|
14409
14409
|
}, inputAttributes.value, {
|
|
@@ -14417,7 +14417,7 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
|
|
|
14417
14417
|
placeholder: labels.value.placeholder,
|
|
14418
14418
|
onInput: handleInput,
|
|
14419
14419
|
onFocus: handleFocus
|
|
14420
|
-
}), null, 16, _hoisted_5$
|
|
14420
|
+
}), null, 16, _hoisted_5$k), [
|
|
14421
14421
|
[vModelText, inputValue.value]
|
|
14422
14422
|
]),
|
|
14423
14423
|
_ctx.options.showSubmitButton ? (openBlock(), createElementBlock("button", {
|
|
@@ -14629,11 +14629,11 @@ const _hoisted_3$B = {
|
|
|
14629
14629
|
class: "lupa-suggestion-facet",
|
|
14630
14630
|
"data-cy": "lupa-suggestion-facet"
|
|
14631
14631
|
};
|
|
14632
|
-
const _hoisted_4$
|
|
14632
|
+
const _hoisted_4$t = {
|
|
14633
14633
|
class: "lupa-suggestion-facet-label",
|
|
14634
14634
|
"data-cy": "lupa-suggestion-facet-label"
|
|
14635
14635
|
};
|
|
14636
|
-
const _hoisted_5$
|
|
14636
|
+
const _hoisted_5$j = {
|
|
14637
14637
|
class: "lupa-suggestion-facet-value",
|
|
14638
14638
|
"data-cy": "lupa-suggestion-facet-value"
|
|
14639
14639
|
};
|
|
@@ -14675,8 +14675,8 @@ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
|
|
|
14675
14675
|
innerHTML: _ctx.suggestion.displayHighlight
|
|
14676
14676
|
}, null, 8, _hoisted_1$1e)) : (openBlock(), createElementBlock("div", _hoisted_2$R, toDisplayString(_ctx.suggestion.display), 1)),
|
|
14677
14677
|
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$B, [
|
|
14678
|
-
createBaseVNode("span", _hoisted_4$
|
|
14679
|
-
createBaseVNode("span", _hoisted_5$
|
|
14678
|
+
createBaseVNode("span", _hoisted_4$t, toDisplayString(facetLabel.value), 1),
|
|
14679
|
+
createBaseVNode("span", _hoisted_5$j, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
14680
14680
|
])) : createCommentVNode("", true)
|
|
14681
14681
|
]);
|
|
14682
14682
|
};
|
|
@@ -24169,8 +24169,8 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
24169
24169
|
const _hoisted_1$18 = ["innerHTML"];
|
|
24170
24170
|
const _hoisted_2$N = { key: 0 };
|
|
24171
24171
|
const _hoisted_3$A = { key: 1 };
|
|
24172
|
-
const _hoisted_4$
|
|
24173
|
-
const _hoisted_5$
|
|
24172
|
+
const _hoisted_4$s = { class: "lupa-search-box-custom-label" };
|
|
24173
|
+
const _hoisted_5$i = { class: "lupa-search-box-custom-text" };
|
|
24174
24174
|
const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
24175
24175
|
__name: "SearchBoxProductCustom",
|
|
24176
24176
|
props: {
|
|
@@ -24202,8 +24202,8 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
24202
24202
|
class: [className.value, "lupa-search-box-product-custom"]
|
|
24203
24203
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
24204
24204
|
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$N, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$A, [
|
|
24205
|
-
createBaseVNode("div", _hoisted_4$
|
|
24206
|
-
createBaseVNode("div", _hoisted_5$
|
|
24205
|
+
createBaseVNode("div", _hoisted_4$s, toDisplayString(label.value), 1),
|
|
24206
|
+
createBaseVNode("div", _hoisted_5$i, toDisplayString(text.value), 1)
|
|
24207
24207
|
]))
|
|
24208
24208
|
], 16));
|
|
24209
24209
|
};
|
|
@@ -24296,13 +24296,11 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
24296
24296
|
const relatedCategoryChildren = ref([]);
|
|
24297
24297
|
const lastRequestId = ref("");
|
|
24298
24298
|
const searchRequestResults = ref({});
|
|
24299
|
+
const lastResultsSource = ref(void 0);
|
|
24299
24300
|
const optionsStore = useOptionsStore();
|
|
24300
24301
|
const paramsStore = useParamsStore();
|
|
24301
24302
|
const screenStore = useScreenStore();
|
|
24302
24303
|
const { searchResultOptions } = storeToRefs(optionsStore);
|
|
24303
|
-
computed(
|
|
24304
|
-
() => loading.value || loadingFacets.value || loadingRefiners.value
|
|
24305
|
-
);
|
|
24306
24304
|
const facets2 = computed(() => searchResult.value.facets);
|
|
24307
24305
|
const filters = computed(() => searchResult.value.filters);
|
|
24308
24306
|
const currentQueryText = computed(() => searchResult.value.searchText);
|
|
@@ -24399,13 +24397,14 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
24399
24397
|
});
|
|
24400
24398
|
searchResult.value = updatedResult;
|
|
24401
24399
|
});
|
|
24402
|
-
const saveRequestResult = (requestId, result2) => {
|
|
24400
|
+
const saveRequestResult = (requestId, result2, source = "items") => {
|
|
24403
24401
|
var _a;
|
|
24404
24402
|
const existingResult = (_a = searchRequestResults.value[requestId]) != null ? _a : {};
|
|
24405
24403
|
const combinedResult = __spreadValues2(__spreadValues2({}, existingResult), result2);
|
|
24406
24404
|
searchRequestResults.value = __spreadProps2(__spreadValues2({}, searchRequestResults.value), {
|
|
24407
24405
|
[requestId]: combinedResult
|
|
24408
24406
|
});
|
|
24407
|
+
lastResultsSource.value = source;
|
|
24409
24408
|
searchResult.value = combinedResult;
|
|
24410
24409
|
};
|
|
24411
24410
|
const setLastRequestId = (requestId) => {
|
|
@@ -24431,14 +24430,13 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
24431
24430
|
} else {
|
|
24432
24431
|
saveRequestResult(requestId, newSearchResult);
|
|
24433
24432
|
}
|
|
24434
|
-
saveRequestResult(requestId, newSearchResult);
|
|
24435
24433
|
return { searchResult: newSearchResult };
|
|
24436
24434
|
};
|
|
24437
|
-
const addPartial = (requestId, newSearchResult) => {
|
|
24435
|
+
const addPartial = (requestId, newSearchResult, source) => {
|
|
24438
24436
|
if (lastRequestId.value !== requestId || !newSearchResult) {
|
|
24439
24437
|
return;
|
|
24440
24438
|
}
|
|
24441
|
-
saveRequestResult(requestId, newSearchResult);
|
|
24439
|
+
saveRequestResult(requestId, newSearchResult, source);
|
|
24442
24440
|
return { searchResult: searchResult.value };
|
|
24443
24441
|
};
|
|
24444
24442
|
const setColumnCount = ({ width, grid }) => {
|
|
@@ -24505,6 +24503,7 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
24505
24503
|
hideFiltersOnExactMatchForKeys,
|
|
24506
24504
|
relatedCategoryChildren,
|
|
24507
24505
|
searchRequestResults,
|
|
24506
|
+
lastResultsSource,
|
|
24508
24507
|
setSidebarState,
|
|
24509
24508
|
queryFacet,
|
|
24510
24509
|
setLastRequestId,
|
|
@@ -24521,14 +24520,17 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
24521
24520
|
});
|
|
24522
24521
|
const _hoisted_1$16 = { class: "lupa-search-box-add-to-cart-wrapper" };
|
|
24523
24522
|
const _hoisted_2$M = { class: "lupa-search-box-product-addtocart" };
|
|
24524
|
-
const _hoisted_3$z = ["
|
|
24523
|
+
const _hoisted_3$z = ["disabled"];
|
|
24524
|
+
const _hoisted_4$r = ["href"];
|
|
24525
|
+
const _hoisted_5$h = ["onClick", "disabled"];
|
|
24525
24526
|
const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
24526
24527
|
__name: "SearchBoxProductAddToCart",
|
|
24527
24528
|
props: {
|
|
24528
24529
|
item: {},
|
|
24529
24530
|
options: {},
|
|
24530
24531
|
inStock: { type: Boolean },
|
|
24531
|
-
dynamicAttributes: {}
|
|
24532
|
+
dynamicAttributes: {},
|
|
24533
|
+
link: {}
|
|
24532
24534
|
},
|
|
24533
24535
|
emits: ["productEvent"],
|
|
24534
24536
|
setup(__props, { emit: emit2 }) {
|
|
@@ -24555,16 +24557,27 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
24555
24557
|
emit2("productEvent", { type: "addToCart" });
|
|
24556
24558
|
loading.value = false;
|
|
24557
24559
|
});
|
|
24560
|
+
const hasLink = computed(() => {
|
|
24561
|
+
return Boolean(props.link && props.options.link);
|
|
24562
|
+
});
|
|
24558
24563
|
return (_ctx, _cache) => {
|
|
24559
24564
|
return openBlock(), createElementBlock("div", _hoisted_1$16, [
|
|
24560
24565
|
createBaseVNode("div", _hoisted_2$M, [
|
|
24561
|
-
|
|
24566
|
+
hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
|
|
24567
|
+
key: 0,
|
|
24568
|
+
class: loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart",
|
|
24569
|
+
"data-cy": "lupa-add-to-cart",
|
|
24570
|
+
disabled: !inStockValue.value || loading.value
|
|
24571
|
+
}, _ctx.dynamicAttributes, { onClick: handleClick }), [
|
|
24572
|
+
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$r)
|
|
24573
|
+
], 16, _hoisted_3$z)) : (openBlock(), createElementBlock("button", mergeProps({
|
|
24574
|
+
key: 1,
|
|
24562
24575
|
onClick: withModifiers(handleClick, ["stop", "prevent"]),
|
|
24563
24576
|
class: loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart",
|
|
24564
24577
|
"data-cy": "lupa-add-to-cart",
|
|
24565
24578
|
type: "button",
|
|
24566
24579
|
disabled: !inStockValue.value || loading.value
|
|
24567
|
-
}, _ctx.dynamicAttributes), toDisplayString(label.value), 17,
|
|
24580
|
+
}, _ctx.dynamicAttributes), toDisplayString(label.value), 17, _hoisted_5$h))
|
|
24568
24581
|
])
|
|
24569
24582
|
]);
|
|
24570
24583
|
};
|
|
@@ -24592,7 +24605,8 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
24592
24605
|
item: {},
|
|
24593
24606
|
element: {},
|
|
24594
24607
|
labels: {},
|
|
24595
|
-
isInStock: { type: Boolean }
|
|
24608
|
+
isInStock: { type: Boolean },
|
|
24609
|
+
link: {}
|
|
24596
24610
|
},
|
|
24597
24611
|
setup(__props) {
|
|
24598
24612
|
const props = __props;
|
|
@@ -24654,17 +24668,19 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
24654
24668
|
labels: _ctx.labels,
|
|
24655
24669
|
class: { "lupa-loading-dynamic-data": isLoadingDynamicData((_a = _ctx.item) == null ? void 0 : _a.id) },
|
|
24656
24670
|
inStock: _ctx.isInStock,
|
|
24657
|
-
"dynamic-attributes": dynamicAttributes.value
|
|
24658
|
-
|
|
24671
|
+
"dynamic-attributes": dynamicAttributes.value,
|
|
24672
|
+
link: _ctx.link
|
|
24673
|
+
}, renderDynamicAttributesOnParentElement.value && dynamicAttributes.value), null, 16, ["item", "options", "labels", "class", "inStock", "dynamic-attributes", "link"])) : createCommentVNode("", true)
|
|
24659
24674
|
], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$15, [
|
|
24660
24675
|
displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
|
|
24661
24676
|
key: 0,
|
|
24662
24677
|
item: enhancedItem.value,
|
|
24663
24678
|
options: _ctx.element,
|
|
24664
24679
|
labels: _ctx.labels,
|
|
24680
|
+
link: _ctx.link,
|
|
24665
24681
|
class: normalizeClass({ "lupa-loading-dynamic-data": isLoadingDynamicData((_b = _ctx.item) == null ? void 0 : _b.id) }),
|
|
24666
24682
|
inStock: _ctx.isInStock
|
|
24667
|
-
}, null, 8, ["item", "options", "labels", "class", "inStock"])) : createCommentVNode("", true),
|
|
24683
|
+
}, null, 8, ["item", "options", "labels", "link", "class", "inStock"])) : createCommentVNode("", true),
|
|
24668
24684
|
renderSlot(_ctx.$slots, "badges")
|
|
24669
24685
|
]));
|
|
24670
24686
|
};
|
|
@@ -24673,7 +24689,7 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
24673
24689
|
const _hoisted_1$14 = { class: "lupa-badge-title" };
|
|
24674
24690
|
const _hoisted_2$L = ["src"];
|
|
24675
24691
|
const _hoisted_3$y = { key: 1 };
|
|
24676
|
-
const _hoisted_4$
|
|
24692
|
+
const _hoisted_4$q = {
|
|
24677
24693
|
key: 0,
|
|
24678
24694
|
class: "lupa-badge-full-text"
|
|
24679
24695
|
};
|
|
@@ -24717,7 +24733,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
24717
24733
|
}, null, 8, _hoisted_2$L)) : createCommentVNode("", true),
|
|
24718
24734
|
hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$y, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
|
|
24719
24735
|
]),
|
|
24720
|
-
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
24736
|
+
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$q, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
|
|
24721
24737
|
], 6);
|
|
24722
24738
|
};
|
|
24723
24739
|
}
|
|
@@ -25632,11 +25648,11 @@ const _hoisted_3$w = {
|
|
|
25632
25648
|
key: 0,
|
|
25633
25649
|
class: "lupa-panel-title lupa-panel-title-top-results"
|
|
25634
25650
|
};
|
|
25635
|
-
const _hoisted_4$
|
|
25651
|
+
const _hoisted_4$p = {
|
|
25636
25652
|
key: 1,
|
|
25637
25653
|
class: "lupa-panel-title"
|
|
25638
25654
|
};
|
|
25639
|
-
const _hoisted_5$
|
|
25655
|
+
const _hoisted_5$g = {
|
|
25640
25656
|
key: 1,
|
|
25641
25657
|
id: "lupa-search-box-panel"
|
|
25642
25658
|
};
|
|
@@ -25825,7 +25841,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
25825
25841
|
"data-cy": "lupa-panel-" + panel.type + "-index"
|
|
25826
25842
|
}, [
|
|
25827
25843
|
((_a = panel.labels) == null ? void 0 : _a.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$w, toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : createCommentVNode("", true),
|
|
25828
|
-
((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
25844
|
+
((_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),
|
|
25829
25845
|
panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
|
|
25830
25846
|
key: 2,
|
|
25831
25847
|
panel,
|
|
@@ -25860,7 +25876,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
25860
25876
|
options: _ctx.options,
|
|
25861
25877
|
onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
|
|
25862
25878
|
}, null, 8, ["labels", "options"])) : createCommentVNode("", true)
|
|
25863
|
-
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
25879
|
+
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$g, [
|
|
25864
25880
|
createVNode(_sfc_main$1s, {
|
|
25865
25881
|
options: _ctx.options.history,
|
|
25866
25882
|
history: history.value,
|
|
@@ -26323,7 +26339,7 @@ const _hoisted_3$v = {
|
|
|
26323
26339
|
key: 1,
|
|
26324
26340
|
"data-cy": "did-you-mean-label"
|
|
26325
26341
|
};
|
|
26326
|
-
const _hoisted_4$
|
|
26342
|
+
const _hoisted_4$o = { key: 1 };
|
|
26327
26343
|
const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
26328
26344
|
__name: "SearchResultsDidYouMean",
|
|
26329
26345
|
props: {
|
|
@@ -26374,7 +26390,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
26374
26390
|
class: "lupa-did-you-mean lupa-highlighted-search-text",
|
|
26375
26391
|
"data-cy": "did-you-mean-value",
|
|
26376
26392
|
onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
|
|
26377
|
-
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$
|
|
26393
|
+
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$o, toDisplayString(label) + " ", 1))
|
|
26378
26394
|
]);
|
|
26379
26395
|
}), 128))
|
|
26380
26396
|
])) : createCommentVNode("", true)
|
|
@@ -26424,8 +26440,8 @@ const _hoisted_3$u = {
|
|
|
26424
26440
|
key: 1,
|
|
26425
26441
|
class: "lupa-results-total-count"
|
|
26426
26442
|
};
|
|
26427
|
-
const _hoisted_4$
|
|
26428
|
-
const _hoisted_5$
|
|
26443
|
+
const _hoisted_4$n = { class: "lupa-results-total-count-number" };
|
|
26444
|
+
const _hoisted_5$f = ["innerHTML"];
|
|
26429
26445
|
const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
26430
26446
|
__name: "SearchResultsTitle",
|
|
26431
26447
|
props: {
|
|
@@ -26474,7 +26490,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
26474
26490
|
queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$E, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
|
|
26475
26491
|
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$u, [
|
|
26476
26492
|
createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
|
|
26477
|
-
createBaseVNode("span", _hoisted_4$
|
|
26493
|
+
createBaseVNode("span", _hoisted_4$n, toDisplayString(unref(totalItems)), 1),
|
|
26478
26494
|
createTextVNode(")")
|
|
26479
26495
|
])) : createCommentVNode("", true)
|
|
26480
26496
|
])) : createCommentVNode("", true),
|
|
@@ -26486,7 +26502,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
26486
26502
|
key: 2,
|
|
26487
26503
|
class: "lupa-result-page-description-top",
|
|
26488
26504
|
innerHTML: descriptionTop.value
|
|
26489
|
-
}, null, 8, _hoisted_5$
|
|
26505
|
+
}, null, 8, _hoisted_5$f)) : createCommentVNode("", true)
|
|
26490
26506
|
]);
|
|
26491
26507
|
};
|
|
26492
26508
|
}
|
|
@@ -26536,7 +26552,7 @@ const _hoisted_3$t = {
|
|
|
26536
26552
|
key: 0,
|
|
26537
26553
|
class: "filter-values"
|
|
26538
26554
|
};
|
|
26539
|
-
const _hoisted_4$
|
|
26555
|
+
const _hoisted_4$m = { class: "lupa-current-filter-list" };
|
|
26540
26556
|
const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
26541
26557
|
__name: "CurrentFilters",
|
|
26542
26558
|
props: {
|
|
@@ -26620,7 +26636,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
26620
26636
|
}, null, 2)) : createCommentVNode("", true)
|
|
26621
26637
|
]),
|
|
26622
26638
|
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$t, [
|
|
26623
|
-
createBaseVNode("div", _hoisted_4$
|
|
26639
|
+
createBaseVNode("div", _hoisted_4$m, [
|
|
26624
26640
|
(openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter2) => {
|
|
26625
26641
|
return openBlock(), createBlock(_sfc_main$Y, {
|
|
26626
26642
|
key: filter2.key + "_" + filter2.value,
|
|
@@ -26688,8 +26704,8 @@ const _hoisted_1$P = {
|
|
|
26688
26704
|
};
|
|
26689
26705
|
const _hoisted_2$B = { class: "lupa-category-back" };
|
|
26690
26706
|
const _hoisted_3$s = ["href"];
|
|
26691
|
-
const _hoisted_4$
|
|
26692
|
-
const _hoisted_5$
|
|
26707
|
+
const _hoisted_4$l = ["href"];
|
|
26708
|
+
const _hoisted_5$e = { class: "lupa-child-category-list" };
|
|
26693
26709
|
const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
26694
26710
|
__name: "CategoryFilter",
|
|
26695
26711
|
props: {
|
|
@@ -26795,9 +26811,9 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
26795
26811
|
href: parentUrlLink.value,
|
|
26796
26812
|
class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
|
|
26797
26813
|
onClick: handleNavigationParent
|
|
26798
|
-
}, toDisplayString(parentTitle.value), 11, _hoisted_4$
|
|
26814
|
+
}, toDisplayString(parentTitle.value), 11, _hoisted_4$l)
|
|
26799
26815
|
], 2),
|
|
26800
|
-
createBaseVNode("div", _hoisted_5$
|
|
26816
|
+
createBaseVNode("div", _hoisted_5$e, [
|
|
26801
26817
|
(openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
|
|
26802
26818
|
return openBlock(), createBlock(_sfc_main$W, {
|
|
26803
26819
|
key: getCategoryKey(child),
|
|
@@ -26816,8 +26832,8 @@ const _hoisted_1$O = {
|
|
|
26816
26832
|
};
|
|
26817
26833
|
const _hoisted_2$A = ["placeholder"];
|
|
26818
26834
|
const _hoisted_3$r = { class: "lupa-terms-list" };
|
|
26819
|
-
const _hoisted_4$
|
|
26820
|
-
const _hoisted_5$
|
|
26835
|
+
const _hoisted_4$k = ["onClick"];
|
|
26836
|
+
const _hoisted_5$d = { class: "lupa-term-checkbox-wrapper" };
|
|
26821
26837
|
const _hoisted_6$8 = { class: "lupa-term-label" };
|
|
26822
26838
|
const _hoisted_7$6 = {
|
|
26823
26839
|
key: 0,
|
|
@@ -26932,7 +26948,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
26932
26948
|
key: item.title,
|
|
26933
26949
|
onClick: ($event) => handleFacetClick(item)
|
|
26934
26950
|
}, [
|
|
26935
|
-
createBaseVNode("div", _hoisted_5$
|
|
26951
|
+
createBaseVNode("div", _hoisted_5$d, [
|
|
26936
26952
|
createBaseVNode("span", {
|
|
26937
26953
|
class: normalizeClass(["lupa-term-checkbox", { checked: isChecked(item) }])
|
|
26938
26954
|
}, null, 2)
|
|
@@ -26943,7 +26959,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
26943
26959
|
createBaseVNode("span", _hoisted_6$8, toDisplayString(getItemLabel(item)), 1),
|
|
26944
26960
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_7$6, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
|
|
26945
26961
|
], 2)
|
|
26946
|
-
], 10, _hoisted_4$
|
|
26962
|
+
], 10, _hoisted_4$k);
|
|
26947
26963
|
}), 128))
|
|
26948
26964
|
]),
|
|
26949
26965
|
displayShowMore.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -27943,11 +27959,11 @@ const _hoisted_3$q = {
|
|
|
27943
27959
|
key: 1,
|
|
27944
27960
|
class: "lupa-stats-facet-summary-input"
|
|
27945
27961
|
};
|
|
27946
|
-
const _hoisted_4$
|
|
27962
|
+
const _hoisted_4$j = {
|
|
27947
27963
|
key: 0,
|
|
27948
27964
|
class: "lupa-stats-range-label"
|
|
27949
27965
|
};
|
|
27950
|
-
const _hoisted_5$
|
|
27966
|
+
const _hoisted_5$c = { class: "lupa-stats-from" };
|
|
27951
27967
|
const _hoisted_6$7 = ["max", "min", "pattern", "aria-label"];
|
|
27952
27968
|
const _hoisted_7$5 = { key: 0 };
|
|
27953
27969
|
const _hoisted_8$1 = /* @__PURE__ */ createBaseVNode("div", { class: "lupa-stats-separator" }, null, -1);
|
|
@@ -28146,8 +28162,8 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
28146
28162
|
return openBlock(), createElementBlock("div", _hoisted_1$N, [
|
|
28147
28163
|
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$z, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$q, [
|
|
28148
28164
|
createBaseVNode("div", null, [
|
|
28149
|
-
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
28150
|
-
createBaseVNode("div", _hoisted_5$
|
|
28165
|
+
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$j, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
|
|
28166
|
+
createBaseVNode("div", _hoisted_5$c, [
|
|
28151
28167
|
withDirectives(createBaseVNode("input", {
|
|
28152
28168
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
|
|
28153
28169
|
type: "text",
|
|
@@ -28216,7 +28232,7 @@ const _hoisted_3$p = {
|
|
|
28216
28232
|
key: 0,
|
|
28217
28233
|
class: "lupa-term-count"
|
|
28218
28234
|
};
|
|
28219
|
-
const _hoisted_4$
|
|
28235
|
+
const _hoisted_4$i = {
|
|
28220
28236
|
key: 0,
|
|
28221
28237
|
class: "lupa-facet-level"
|
|
28222
28238
|
};
|
|
@@ -28285,7 +28301,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
28285
28301
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_3$p, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
|
|
28286
28302
|
], 2)
|
|
28287
28303
|
]),
|
|
28288
|
-
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
28304
|
+
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$i, [
|
|
28289
28305
|
(openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
|
|
28290
28306
|
return openBlock(), createBlock(_component_HierarchyFacetLevel, {
|
|
28291
28307
|
key: itemChild.title,
|
|
@@ -28818,8 +28834,8 @@ const _hoisted_1$F = {
|
|
|
28818
28834
|
};
|
|
28819
28835
|
const _hoisted_2$u = ["onClick"];
|
|
28820
28836
|
const _hoisted_3$n = { class: "lupa-mobile-sidebar-content" };
|
|
28821
|
-
const _hoisted_4$
|
|
28822
|
-
const _hoisted_5$
|
|
28837
|
+
const _hoisted_4$h = { class: "lupa-sidebar-top" };
|
|
28838
|
+
const _hoisted_5$b = { class: "lupa-sidebar-title" };
|
|
28823
28839
|
const _hoisted_6$6 = {
|
|
28824
28840
|
key: 0,
|
|
28825
28841
|
class: "lupa-sidebar-filter-count"
|
|
@@ -28862,8 +28878,8 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
28862
28878
|
onClick: withModifiers(handleMobileToggle, ["stop"])
|
|
28863
28879
|
}, null, 8, _hoisted_2$u),
|
|
28864
28880
|
createBaseVNode("div", _hoisted_3$n, [
|
|
28865
|
-
createBaseVNode("div", _hoisted_4$
|
|
28866
|
-
createBaseVNode("div", _hoisted_5$
|
|
28881
|
+
createBaseVNode("div", _hoisted_4$h, [
|
|
28882
|
+
createBaseVNode("div", _hoisted_5$b, [
|
|
28867
28883
|
createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
|
|
28868
28884
|
isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_6$6, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
28869
28885
|
]),
|
|
@@ -28890,7 +28906,7 @@ const _hoisted_3$m = {
|
|
|
28890
28906
|
key: 1,
|
|
28891
28907
|
class: "lupa-search-results-breadcrumb-text"
|
|
28892
28908
|
};
|
|
28893
|
-
const _hoisted_4$
|
|
28909
|
+
const _hoisted_4$g = { key: 2 };
|
|
28894
28910
|
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
28895
28911
|
__name: "SearchResultsBreadcrumbs",
|
|
28896
28912
|
props: {
|
|
@@ -28932,7 +28948,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
28932
28948
|
return handleNavigation(e2, (_a2 = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a2 : "");
|
|
28933
28949
|
}
|
|
28934
28950
|
}, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$t)) : (openBlock(), createElementBlock("span", _hoisted_3$m, toDisplayString(getLabel(breadcrumb.label)), 1)),
|
|
28935
|
-
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
28951
|
+
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$g, toDisplayString((_a = breadcrumb.separator) != null ? _a : "/"), 1)) : createCommentVNode("", true)
|
|
28936
28952
|
]);
|
|
28937
28953
|
}), 128))
|
|
28938
28954
|
]);
|
|
@@ -29094,7 +29110,7 @@ const _hoisted_2$s = {
|
|
|
29094
29110
|
class: "lupa-page-number-separator"
|
|
29095
29111
|
};
|
|
29096
29112
|
const _hoisted_3$l = ["onClick"];
|
|
29097
|
-
const _hoisted_4$
|
|
29113
|
+
const _hoisted_4$f = {
|
|
29098
29114
|
key: 0,
|
|
29099
29115
|
class: "lupa-page-number-separator"
|
|
29100
29116
|
};
|
|
@@ -29200,7 +29216,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
29200
29216
|
}, toDisplayString(page), 11, _hoisted_3$l);
|
|
29201
29217
|
}), 128)),
|
|
29202
29218
|
showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
29203
|
-
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
29219
|
+
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$f, "...")) : createCommentVNode("", true),
|
|
29204
29220
|
createBaseVNode("div", {
|
|
29205
29221
|
class: "lupa-page-number lupa-page-number-last",
|
|
29206
29222
|
onClick: _cache[2] || (_cache[2] = () => {
|
|
@@ -29225,8 +29241,8 @@ const _hoisted_1$z = {
|
|
|
29225
29241
|
};
|
|
29226
29242
|
const _hoisted_2$r = { id: "lupa-select" };
|
|
29227
29243
|
const _hoisted_3$k = { class: "lupa-select-label" };
|
|
29228
|
-
const _hoisted_4$
|
|
29229
|
-
const _hoisted_5$
|
|
29244
|
+
const _hoisted_4$e = ["aria-label"];
|
|
29245
|
+
const _hoisted_5$a = ["value"];
|
|
29230
29246
|
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
29231
29247
|
__name: "SearchResultsPageSize",
|
|
29232
29248
|
props: {
|
|
@@ -29270,9 +29286,9 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
29270
29286
|
return openBlock(), createElementBlock("option", {
|
|
29271
29287
|
key: option,
|
|
29272
29288
|
value: option
|
|
29273
|
-
}, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$
|
|
29289
|
+
}, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$a);
|
|
29274
29290
|
}), 128))
|
|
29275
|
-
], 40, _hoisted_4$
|
|
29291
|
+
], 40, _hoisted_4$e)
|
|
29276
29292
|
])
|
|
29277
29293
|
]);
|
|
29278
29294
|
};
|
|
@@ -29284,8 +29300,8 @@ const _hoisted_1$y = {
|
|
|
29284
29300
|
};
|
|
29285
29301
|
const _hoisted_2$q = { id: "lupa-select" };
|
|
29286
29302
|
const _hoisted_3$j = { class: "lupa-select-label" };
|
|
29287
|
-
const _hoisted_4$
|
|
29288
|
-
const _hoisted_5$
|
|
29303
|
+
const _hoisted_4$d = ["aria-label"];
|
|
29304
|
+
const _hoisted_5$9 = ["value"];
|
|
29289
29305
|
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
29290
29306
|
__name: "SearchResultsSort",
|
|
29291
29307
|
props: {
|
|
@@ -29350,9 +29366,9 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
29350
29366
|
return openBlock(), createElementBlock("option", {
|
|
29351
29367
|
key: option.key,
|
|
29352
29368
|
value: option.key
|
|
29353
|
-
}, toDisplayString(option.label), 9, _hoisted_5$
|
|
29369
|
+
}, toDisplayString(option.label), 9, _hoisted_5$9);
|
|
29354
29370
|
}), 128))
|
|
29355
|
-
], 40, _hoisted_4$
|
|
29371
|
+
], 40, _hoisted_4$d), [
|
|
29356
29372
|
[vModelSelect, selectedKey.value]
|
|
29357
29373
|
])
|
|
29358
29374
|
])
|
|
@@ -29366,8 +29382,8 @@ const _hoisted_2$p = {
|
|
|
29366
29382
|
class: "lupa-toolbar-right-title"
|
|
29367
29383
|
};
|
|
29368
29384
|
const _hoisted_3$i = { key: 2 };
|
|
29369
|
-
const _hoisted_4$
|
|
29370
|
-
const _hoisted_5$
|
|
29385
|
+
const _hoisted_4$c = { key: 4 };
|
|
29386
|
+
const _hoisted_5$8 = { key: 6 };
|
|
29371
29387
|
const _hoisted_6$5 = { class: "lupa-toolbar-right" };
|
|
29372
29388
|
const _hoisted_7$3 = {
|
|
29373
29389
|
key: 0,
|
|
@@ -29494,13 +29510,13 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
29494
29510
|
label: searchSummaryLabel.value,
|
|
29495
29511
|
clearable: unref(hasAnyFilter) && showFilterClear.value,
|
|
29496
29512
|
onClear: handleClearAll
|
|
29497
|
-
}, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$
|
|
29513
|
+
}, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$c)),
|
|
29498
29514
|
displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$F, {
|
|
29499
29515
|
key: 5,
|
|
29500
29516
|
options: paginationOptions.value.pageSelect,
|
|
29501
29517
|
"last-page-label": paginationOptions.value.labels.showMore,
|
|
29502
29518
|
"first-page-label": paginationOptions.value.labels.showLess
|
|
29503
|
-
}, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$
|
|
29519
|
+
}, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$8))
|
|
29504
29520
|
]),
|
|
29505
29521
|
createBaseVNode("div", _hoisted_6$5, [
|
|
29506
29522
|
toolbarRightLabel.value ? (openBlock(), createElementBlock("div", _hoisted_7$3, toDisplayString(toolbarRightLabel.value), 1)) : createCommentVNode("", true),
|
|
@@ -29547,8 +29563,8 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
29547
29563
|
const _hoisted_1$w = ["title", "innerHTML"];
|
|
29548
29564
|
const _hoisted_2$o = ["title"];
|
|
29549
29565
|
const _hoisted_3$h = ["href", "innerHTML"];
|
|
29550
|
-
const _hoisted_4$
|
|
29551
|
-
const _hoisted_5$
|
|
29566
|
+
const _hoisted_4$b = ["title"];
|
|
29567
|
+
const _hoisted_5$7 = {
|
|
29552
29568
|
key: 0,
|
|
29553
29569
|
class: "lupa-search-results-product-title-text"
|
|
29554
29570
|
};
|
|
@@ -29608,14 +29624,14 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
29608
29624
|
style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
|
|
29609
29625
|
title: title.value
|
|
29610
29626
|
}, [
|
|
29611
|
-
!_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
29627
|
+
!_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$7, toDisplayString(title.value), 1)) : createCommentVNode("", true),
|
|
29612
29628
|
_ctx.options.link ? (openBlock(), createElementBlock("a", {
|
|
29613
29629
|
key: 1,
|
|
29614
29630
|
href: _ctx.link,
|
|
29615
29631
|
class: "lupa-search-results-product-title-text lupa-title-link",
|
|
29616
29632
|
onClick: handleNavigation
|
|
29617
29633
|
}, toDisplayString(title.value), 9, _hoisted_6$4)) : createCommentVNode("", true)
|
|
29618
|
-
], 12, _hoisted_4$
|
|
29634
|
+
], 12, _hoisted_4$b));
|
|
29619
29635
|
};
|
|
29620
29636
|
}
|
|
29621
29637
|
});
|
|
@@ -29658,8 +29674,8 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
29658
29674
|
const _hoisted_1$u = { id: "lupa-search-results-rating" };
|
|
29659
29675
|
const _hoisted_2$n = { class: "lupa-ratings" };
|
|
29660
29676
|
const _hoisted_3$g = { class: "lupa-ratings-base" };
|
|
29661
|
-
const _hoisted_4$
|
|
29662
|
-
const _hoisted_5$
|
|
29677
|
+
const _hoisted_4$a = ["innerHTML"];
|
|
29678
|
+
const _hoisted_5$6 = { class: "lupa-rating-wrapper" };
|
|
29663
29679
|
const _hoisted_6$3 = ["innerHTML"];
|
|
29664
29680
|
const _hoisted_7$2 = ["href"];
|
|
29665
29681
|
const STAR_COUNT = 5;
|
|
@@ -29708,10 +29724,10 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
29708
29724
|
key: index,
|
|
29709
29725
|
innerHTML: star,
|
|
29710
29726
|
class: "lupa-rating lupa-rating-not-highlighted"
|
|
29711
|
-
}, null, 8, _hoisted_4$
|
|
29727
|
+
}, null, 8, _hoisted_4$a);
|
|
29712
29728
|
}), 128))
|
|
29713
29729
|
]),
|
|
29714
|
-
createBaseVNode("div", _hoisted_5$
|
|
29730
|
+
createBaseVNode("div", _hoisted_5$6, [
|
|
29715
29731
|
createBaseVNode("div", {
|
|
29716
29732
|
class: "lupa-ratings-highlighted",
|
|
29717
29733
|
style: normalizeStyle({ width: ratingPercentage.value + "%" })
|
|
@@ -29794,14 +29810,17 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
29794
29810
|
});
|
|
29795
29811
|
const _hoisted_1$s = { class: "lupa-search-results-add-to-cart-wrapper" };
|
|
29796
29812
|
const _hoisted_2$m = { class: "lupa-search-results-product-addtocart" };
|
|
29797
|
-
const _hoisted_3$f = ["
|
|
29813
|
+
const _hoisted_3$f = ["disabled"];
|
|
29814
|
+
const _hoisted_4$9 = ["href"];
|
|
29815
|
+
const _hoisted_5$5 = ["id", "disabled", "onClick"];
|
|
29798
29816
|
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
29799
29817
|
__name: "SearchResultsProductAddToCart",
|
|
29800
29818
|
props: {
|
|
29801
29819
|
item: {},
|
|
29802
29820
|
options: {},
|
|
29803
29821
|
inStock: { type: Boolean },
|
|
29804
|
-
dynamicAttributes: {}
|
|
29822
|
+
dynamicAttributes: {},
|
|
29823
|
+
link: {}
|
|
29805
29824
|
},
|
|
29806
29825
|
emits: ["productEvent"],
|
|
29807
29826
|
setup(__props, { emit: emit2 }) {
|
|
@@ -29833,17 +29852,28 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
29833
29852
|
emit2("productEvent", { type: "addToCart" });
|
|
29834
29853
|
loading.value = false;
|
|
29835
29854
|
});
|
|
29855
|
+
const hasLink = computed(() => {
|
|
29856
|
+
return Boolean(props.link && props.options.link);
|
|
29857
|
+
});
|
|
29836
29858
|
return (_ctx, _cache) => {
|
|
29837
29859
|
return openBlock(), createElementBlock("div", _hoisted_1$s, [
|
|
29838
29860
|
createBaseVNode("div", _hoisted_2$m, [
|
|
29839
|
-
|
|
29861
|
+
hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
|
|
29862
|
+
key: 0,
|
|
29863
|
+
class: loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart",
|
|
29864
|
+
"data-cy": "lupa-add-to-cart",
|
|
29865
|
+
disabled: !inStockValue.value || loading.value
|
|
29866
|
+
}, _ctx.dynamicAttributes, { onClick: handleClick }), [
|
|
29867
|
+
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$9)
|
|
29868
|
+
], 16, _hoisted_3$f)) : (openBlock(), createElementBlock("button", mergeProps({
|
|
29869
|
+
key: 1,
|
|
29840
29870
|
id: id.value,
|
|
29841
29871
|
class: loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart",
|
|
29842
29872
|
"data-cy": "lupa-add-to-cart",
|
|
29843
29873
|
disabled: !inStockValue.value || loading.value
|
|
29844
29874
|
}, _ctx.dynamicAttributes, {
|
|
29845
29875
|
onClick: withModifiers(handleClick, ["stop"])
|
|
29846
|
-
}), toDisplayString(label.value), 17,
|
|
29876
|
+
}), toDisplayString(label.value), 17, _hoisted_5$5))
|
|
29847
29877
|
])
|
|
29848
29878
|
]);
|
|
29849
29879
|
};
|
|
@@ -30856,7 +30886,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
30856
30886
|
const searchResultStore = useSearchResultStore();
|
|
30857
30887
|
const paramsStore = useParamsStore();
|
|
30858
30888
|
const optionsStore = useOptionsStore();
|
|
30859
|
-
const { searchResult } = storeToRefs(searchResultStore);
|
|
30889
|
+
const { searchResult, lastResultsSource } = storeToRefs(searchResultStore);
|
|
30860
30890
|
const { searchResultOptions } = storeToRefs(optionsStore);
|
|
30861
30891
|
const relatedQueries = ref([]);
|
|
30862
30892
|
const allDisplayItems = ref({});
|
|
@@ -30882,8 +30912,12 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
30882
30912
|
return filters;
|
|
30883
30913
|
});
|
|
30884
30914
|
watch(searchResult, () => __async2(this, null, function* () {
|
|
30915
|
+
var _a;
|
|
30885
30916
|
allDisplayItems.value = {};
|
|
30886
30917
|
querySourceResultMap.value = {};
|
|
30918
|
+
if (((_a = searchResult.value) == null ? void 0 : _a.searchText) === void 0 || lastResultsSource.value !== "items") {
|
|
30919
|
+
return;
|
|
30920
|
+
}
|
|
30887
30921
|
if (!props.options || !searchResult.value) {
|
|
30888
30922
|
relatedQueries.value = [];
|
|
30889
30923
|
}
|
|
@@ -31484,7 +31518,12 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
31484
31518
|
const hasResults2 = Boolean(
|
|
31485
31519
|
results.total > 0 || ((_a = results.similarQueries) == null ? void 0 : _a.length) || ((_b = results.didYouMean) == null ? void 0 : _b.options) || ((_d = (_c = results.similarResults) == null ? void 0 : _c.items) == null ? void 0 : _d.length)
|
|
31486
31520
|
);
|
|
31487
|
-
(_f = (_e = props.options.callbacks) == null ? void 0 : _e.onSearchResults) == null ? void 0 : _f.call(_e, {
|
|
31521
|
+
(_f = (_e = props.options.callbacks) == null ? void 0 : _e.onSearchResults) == null ? void 0 : _f.call(_e, {
|
|
31522
|
+
queryKey,
|
|
31523
|
+
hasResults: hasResults2,
|
|
31524
|
+
params: paramStore.params,
|
|
31525
|
+
results
|
|
31526
|
+
});
|
|
31488
31527
|
if (!hasResults2) {
|
|
31489
31528
|
return;
|
|
31490
31529
|
}
|
|
@@ -31543,7 +31582,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
31543
31582
|
if (!res.success) {
|
|
31544
31583
|
return;
|
|
31545
31584
|
}
|
|
31546
|
-
searchResultStore.addPartial(requestId, __spreadValues2({}, res));
|
|
31585
|
+
searchResultStore.addPartial(requestId, __spreadValues2({}, res), "facets");
|
|
31547
31586
|
}).catch((err) => {
|
|
31548
31587
|
console.error(err);
|
|
31549
31588
|
}).finally(() => {
|
|
@@ -31561,7 +31600,11 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
31561
31600
|
if (!res.success) {
|
|
31562
31601
|
return;
|
|
31563
31602
|
}
|
|
31564
|
-
searchResultStore.addPartial(
|
|
31603
|
+
searchResultStore.addPartial(
|
|
31604
|
+
requestId,
|
|
31605
|
+
__spreadValues2({}, res),
|
|
31606
|
+
"refiners"
|
|
31607
|
+
);
|
|
31565
31608
|
}).catch((err) => {
|
|
31566
31609
|
console.error(err);
|
|
31567
31610
|
}).finally(() => {
|