@getlupa/client 1.11.0 → 1.11.2
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 +346 -250
- package/dist/lupaSearch.js +346 -250
- package/dist/lupaSearch.mjs +346 -250
- package/dist/lupaSearch.umd.js +346 -250
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/lupaSearch.mjs
CHANGED
|
@@ -7314,7 +7314,7 @@ const DEFAULT_OPTIONS_RESULTS$1 = {
|
|
|
7314
7314
|
top: false,
|
|
7315
7315
|
bottom: true
|
|
7316
7316
|
},
|
|
7317
|
-
sizes: [10, 20, 25
|
|
7317
|
+
sizes: [10, 20, 25]
|
|
7318
7318
|
},
|
|
7319
7319
|
pageSelection: {
|
|
7320
7320
|
position: {
|
|
@@ -7640,38 +7640,39 @@ const unfoldHierarchyFilter = (key, filter) => {
|
|
|
7640
7640
|
const seed = [];
|
|
7641
7641
|
return filter.terms.reduce((a, c2) => [...a, { key, value: c2, type: "hierarchy" }], seed);
|
|
7642
7642
|
};
|
|
7643
|
-
const unfoldRangeFilter = (key, filter) => {
|
|
7643
|
+
const unfoldRangeFilter = (key, filter, price = {}) => {
|
|
7644
|
+
var _a;
|
|
7644
7645
|
const gt = filter.gte || filter.gt;
|
|
7645
7646
|
const lt = filter.lte || filter.lt;
|
|
7646
|
-
if (key.includes(CURRENCY_KEY_INDICATOR)) {
|
|
7647
|
+
if (key.includes(CURRENCY_KEY_INDICATOR) || ((_a = price == null ? void 0 : price.keys) == null ? void 0 : _a.includes(key))) {
|
|
7647
7648
|
return [
|
|
7648
7649
|
{
|
|
7649
7650
|
key,
|
|
7650
|
-
value: formatPriceSummary([gt, lt]),
|
|
7651
|
+
value: formatPriceSummary([gt, lt], price.currency, price.separator),
|
|
7651
7652
|
type: "range"
|
|
7652
7653
|
}
|
|
7653
7654
|
];
|
|
7654
7655
|
}
|
|
7655
7656
|
return [{ key, value: `${gt} - ${lt}`, type: "range" }];
|
|
7656
7657
|
};
|
|
7657
|
-
const unfoldFilter = (key, filter) => {
|
|
7658
|
+
const unfoldFilter = (key, filter, price = {}) => {
|
|
7658
7659
|
if (Array.isArray(filter)) {
|
|
7659
7660
|
return unfoldTermFilter(key, filter);
|
|
7660
7661
|
}
|
|
7661
7662
|
if (filter.gte) {
|
|
7662
|
-
return unfoldRangeFilter(key, filter);
|
|
7663
|
+
return unfoldRangeFilter(key, filter, price);
|
|
7663
7664
|
}
|
|
7664
7665
|
if (filter.terms) {
|
|
7665
7666
|
return unfoldHierarchyFilter(key, filter);
|
|
7666
7667
|
}
|
|
7667
7668
|
return [];
|
|
7668
7669
|
};
|
|
7669
|
-
const unfoldFilters = (filters) => {
|
|
7670
|
+
const unfoldFilters = (filters, price = {}) => {
|
|
7670
7671
|
if (!filters) {
|
|
7671
7672
|
return [];
|
|
7672
7673
|
}
|
|
7673
7674
|
const seed = [];
|
|
7674
|
-
return Object.entries(filters).reduce((a, c2) => [...a, ...unfoldFilter(...c2)], seed);
|
|
7675
|
+
return Object.entries(filters).reduce((a, c2) => [...a, ...unfoldFilter(...c2, price)], seed);
|
|
7675
7676
|
};
|
|
7676
7677
|
const getLabeledFilters = (filters, facets) => {
|
|
7677
7678
|
return filters.map((f2) => {
|
|
@@ -8443,8 +8444,8 @@ const useSearchBoxStore = defineStore("searchBox", () => {
|
|
|
8443
8444
|
resetHighlightIndex
|
|
8444
8445
|
};
|
|
8445
8446
|
});
|
|
8446
|
-
const _hoisted_1$
|
|
8447
|
-
const _hoisted_2$
|
|
8447
|
+
const _hoisted_1$1e = { id: "lupa-search-box-input-container" };
|
|
8448
|
+
const _hoisted_2$Q = { class: "lupa-input-clear" };
|
|
8448
8449
|
const _hoisted_3$A = { id: "lupa-search-box-input" };
|
|
8449
8450
|
const _hoisted_4$s = ["value"];
|
|
8450
8451
|
const _hoisted_5$h = ["aria-label", "placeholder"];
|
|
@@ -8452,7 +8453,7 @@ const _hoisted_6$9 = {
|
|
|
8452
8453
|
key: 0,
|
|
8453
8454
|
class: "lupa-close-label"
|
|
8454
8455
|
};
|
|
8455
|
-
const _sfc_main$
|
|
8456
|
+
const _sfc_main$1m = /* @__PURE__ */ defineComponent({
|
|
8456
8457
|
__name: "SearchBoxInput",
|
|
8457
8458
|
props: {
|
|
8458
8459
|
options: {},
|
|
@@ -8533,8 +8534,8 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
8533
8534
|
};
|
|
8534
8535
|
__expose({ focus });
|
|
8535
8536
|
return (_ctx, _cache) => {
|
|
8536
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8537
|
-
createBaseVNode("div", _hoisted_2$
|
|
8537
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1e, [
|
|
8538
|
+
createBaseVNode("div", _hoisted_2$Q, [
|
|
8538
8539
|
createBaseVNode("div", {
|
|
8539
8540
|
class: normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
|
|
8540
8541
|
onClick: clear2
|
|
@@ -8575,7 +8576,7 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
8575
8576
|
};
|
|
8576
8577
|
}
|
|
8577
8578
|
});
|
|
8578
|
-
const _sfc_main$
|
|
8579
|
+
const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
8579
8580
|
__name: "SearchBoxMoreResults",
|
|
8580
8581
|
props: {
|
|
8581
8582
|
labels: {},
|
|
@@ -8607,9 +8608,9 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
8607
8608
|
};
|
|
8608
8609
|
}
|
|
8609
8610
|
});
|
|
8610
|
-
const _hoisted_1$
|
|
8611
|
-
const _hoisted_2$
|
|
8612
|
-
const _sfc_main$
|
|
8611
|
+
const _hoisted_1$1d = { class: "lupa-search-box-history-item" };
|
|
8612
|
+
const _hoisted_2$P = { class: "lupa-search-box-history-item-content" };
|
|
8613
|
+
const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
8613
8614
|
__name: "SearchBoxHistoryItem",
|
|
8614
8615
|
props: {
|
|
8615
8616
|
item: {},
|
|
@@ -8625,8 +8626,8 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
8625
8626
|
emit2("click", { query: props.item });
|
|
8626
8627
|
};
|
|
8627
8628
|
return (_ctx, _cache) => {
|
|
8628
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8629
|
-
createBaseVNode("div", _hoisted_2$
|
|
8629
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1d, [
|
|
8630
|
+
createBaseVNode("div", _hoisted_2$P, [
|
|
8630
8631
|
createBaseVNode("div", {
|
|
8631
8632
|
class: normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
|
|
8632
8633
|
onClick: click2
|
|
@@ -8640,11 +8641,11 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
8640
8641
|
};
|
|
8641
8642
|
}
|
|
8642
8643
|
});
|
|
8643
|
-
const _hoisted_1$
|
|
8644
|
+
const _hoisted_1$1c = {
|
|
8644
8645
|
key: 0,
|
|
8645
8646
|
class: "lupa-search-box-history-panel"
|
|
8646
8647
|
};
|
|
8647
|
-
const _sfc_main$
|
|
8648
|
+
const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
8648
8649
|
__name: "SearchBoxHistoryPanel",
|
|
8649
8650
|
props: {
|
|
8650
8651
|
options: {}
|
|
@@ -8685,9 +8686,9 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
8685
8686
|
}
|
|
8686
8687
|
};
|
|
8687
8688
|
return (_ctx, _cache) => {
|
|
8688
|
-
return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
8689
|
+
return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1c, [
|
|
8689
8690
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(history), (item, index) => {
|
|
8690
|
-
return openBlock(), createBlock(_sfc_main$
|
|
8691
|
+
return openBlock(), createBlock(_sfc_main$1k, {
|
|
8691
8692
|
key: item,
|
|
8692
8693
|
item,
|
|
8693
8694
|
highlighted: index === highlightIndex.value,
|
|
@@ -8703,20 +8704,20 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
8703
8704
|
};
|
|
8704
8705
|
}
|
|
8705
8706
|
});
|
|
8706
|
-
const _hoisted_1$
|
|
8707
|
-
const _sfc_main$
|
|
8707
|
+
const _hoisted_1$1b = { class: "lupa-search-box-no-results" };
|
|
8708
|
+
const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
8708
8709
|
__name: "SearchBoxNoResults",
|
|
8709
8710
|
props: {
|
|
8710
8711
|
labels: {}
|
|
8711
8712
|
},
|
|
8712
8713
|
setup(__props) {
|
|
8713
8714
|
return (_ctx, _cache) => {
|
|
8714
|
-
return openBlock(), createElementBlock("p", _hoisted_1$
|
|
8715
|
+
return openBlock(), createElementBlock("p", _hoisted_1$1b, toDisplayString(_ctx.labels.noResults), 1);
|
|
8715
8716
|
};
|
|
8716
8717
|
}
|
|
8717
8718
|
});
|
|
8718
|
-
const _hoisted_1$
|
|
8719
|
-
const _hoisted_2$
|
|
8719
|
+
const _hoisted_1$1a = ["innerHTML"];
|
|
8720
|
+
const _hoisted_2$O = {
|
|
8720
8721
|
key: 1,
|
|
8721
8722
|
"data-cy": "lupa-suggestion-value",
|
|
8722
8723
|
class: "lupa-suggestion-value"
|
|
@@ -8734,7 +8735,7 @@ const _hoisted_5$g = {
|
|
|
8734
8735
|
class: "lupa-suggestion-facet-value",
|
|
8735
8736
|
"data-cy": "lupa-suggestion-facet-value"
|
|
8736
8737
|
};
|
|
8737
|
-
const _sfc_main$
|
|
8738
|
+
const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
8738
8739
|
__name: "SearchBoxSuggestion",
|
|
8739
8740
|
props: {
|
|
8740
8741
|
suggestion: {},
|
|
@@ -8770,7 +8771,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
8770
8771
|
class: "lupa-suggestion-value",
|
|
8771
8772
|
"data-cy": "lupa-suggestion-value",
|
|
8772
8773
|
innerHTML: _ctx.suggestion.displayHighlight
|
|
8773
|
-
}, null, 8, _hoisted_1$
|
|
8774
|
+
}, null, 8, _hoisted_1$1a)) : (openBlock(), createElementBlock("div", _hoisted_2$O, toDisplayString(_ctx.suggestion.display), 1)),
|
|
8774
8775
|
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$z, [
|
|
8775
8776
|
createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
|
|
8776
8777
|
createBaseVNode("span", _hoisted_5$g, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
@@ -8779,11 +8780,11 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
8779
8780
|
};
|
|
8780
8781
|
}
|
|
8781
8782
|
});
|
|
8782
|
-
const _hoisted_1$
|
|
8783
|
+
const _hoisted_1$19 = {
|
|
8783
8784
|
id: "lupa-search-box-suggestions",
|
|
8784
8785
|
"data-cy": "lupa-search-box-suggestions"
|
|
8785
8786
|
};
|
|
8786
|
-
const _sfc_main$
|
|
8787
|
+
const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
8787
8788
|
__name: "SearchBoxSuggestions",
|
|
8788
8789
|
props: {
|
|
8789
8790
|
items: {},
|
|
@@ -8843,9 +8844,9 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
8843
8844
|
});
|
|
8844
8845
|
});
|
|
8845
8846
|
return (_ctx, _cache) => {
|
|
8846
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8847
|
+
return openBlock(), createElementBlock("div", _hoisted_1$19, [
|
|
8847
8848
|
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
|
|
8848
|
-
return openBlock(), createBlock(_sfc_main$
|
|
8849
|
+
return openBlock(), createBlock(_sfc_main$1h, {
|
|
8849
8850
|
key: getSuggestionKey(item),
|
|
8850
8851
|
class: normalizeClass(["lupa-suggestion", index === highlightedIndex.value ? "lupa-suggestion-highlighted" : ""]),
|
|
8851
8852
|
suggestion: item,
|
|
@@ -8873,7 +8874,7 @@ const debounce$1 = (func, timeout) => {
|
|
|
8873
8874
|
}, timeout);
|
|
8874
8875
|
};
|
|
8875
8876
|
};
|
|
8876
|
-
const _sfc_main$
|
|
8877
|
+
const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
8877
8878
|
__name: "SearchBoxSuggestionsWrapper",
|
|
8878
8879
|
props: {
|
|
8879
8880
|
panel: {},
|
|
@@ -8914,7 +8915,7 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
|
8914
8915
|
};
|
|
8915
8916
|
const getSuggestionsDebounced = debounce$1(getSuggestions, props.debounce);
|
|
8916
8917
|
return (_ctx, _cache) => {
|
|
8917
|
-
return openBlock(), createBlock(_sfc_main$
|
|
8918
|
+
return openBlock(), createBlock(_sfc_main$1g, {
|
|
8918
8919
|
items: searchResult.value,
|
|
8919
8920
|
highlight: _ctx.panel.highlight,
|
|
8920
8921
|
queryKey: _ctx.panel.queryKey,
|
|
@@ -9017,8 +9018,8 @@ const replaceImageWithPlaceholder = (e, placeholder) => {
|
|
|
9017
9018
|
targetImage.src = placeholder;
|
|
9018
9019
|
}
|
|
9019
9020
|
};
|
|
9020
|
-
const _hoisted_1$
|
|
9021
|
-
const _sfc_main$
|
|
9021
|
+
const _hoisted_1$18 = ["src"];
|
|
9022
|
+
const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
9022
9023
|
__name: "ProductImage",
|
|
9023
9024
|
props: {
|
|
9024
9025
|
item: {},
|
|
@@ -9136,7 +9137,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
9136
9137
|
}, { alt: imageAlt.value ? imageAlt.value : void 0 }, {
|
|
9137
9138
|
onError: replaceWithPlaceholder,
|
|
9138
9139
|
key: finalUrl.value
|
|
9139
|
-
}), null, 16, _hoisted_1$
|
|
9140
|
+
}), null, 16, _hoisted_1$18))
|
|
9140
9141
|
]),
|
|
9141
9142
|
_: 1
|
|
9142
9143
|
})
|
|
@@ -9144,7 +9145,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
9144
9145
|
};
|
|
9145
9146
|
}
|
|
9146
9147
|
});
|
|
9147
|
-
const _sfc_main$
|
|
9148
|
+
const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
9148
9149
|
__name: "SearchBoxProductImage",
|
|
9149
9150
|
props: {
|
|
9150
9151
|
item: {},
|
|
@@ -9152,7 +9153,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
9152
9153
|
},
|
|
9153
9154
|
setup(__props) {
|
|
9154
9155
|
return (_ctx, _cache) => {
|
|
9155
|
-
return openBlock(), createBlock(_sfc_main$
|
|
9156
|
+
return openBlock(), createBlock(_sfc_main$1e, {
|
|
9156
9157
|
item: _ctx.item,
|
|
9157
9158
|
options: _ctx.options,
|
|
9158
9159
|
"wrapper-class": "lupa-search-box-image-wrapper",
|
|
@@ -9161,12 +9162,12 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
9161
9162
|
};
|
|
9162
9163
|
}
|
|
9163
9164
|
});
|
|
9164
|
-
const _hoisted_1$
|
|
9165
|
-
const _hoisted_2$
|
|
9165
|
+
const _hoisted_1$17 = ["innerHTML"];
|
|
9166
|
+
const _hoisted_2$N = {
|
|
9166
9167
|
key: 1,
|
|
9167
9168
|
class: "lupa-search-box-product-title"
|
|
9168
9169
|
};
|
|
9169
|
-
const _sfc_main$
|
|
9170
|
+
const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
9170
9171
|
__name: "SearchBoxProductTitle",
|
|
9171
9172
|
props: {
|
|
9172
9173
|
item: {},
|
|
@@ -9186,18 +9187,18 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
9186
9187
|
key: 0,
|
|
9187
9188
|
class: "lupa-search-box-product-title",
|
|
9188
9189
|
innerHTML: title.value
|
|
9189
|
-
}, null, 8, _hoisted_1$
|
|
9190
|
+
}, null, 8, _hoisted_1$17)) : (openBlock(), createElementBlock("div", _hoisted_2$N, [
|
|
9190
9191
|
createBaseVNode("strong", null, toDisplayString(title.value), 1)
|
|
9191
9192
|
]));
|
|
9192
9193
|
};
|
|
9193
9194
|
}
|
|
9194
9195
|
});
|
|
9195
|
-
const _hoisted_1$
|
|
9196
|
-
const _hoisted_2$
|
|
9196
|
+
const _hoisted_1$16 = ["innerHTML"];
|
|
9197
|
+
const _hoisted_2$M = {
|
|
9197
9198
|
key: 1,
|
|
9198
9199
|
class: "lupa-search-box-product-description"
|
|
9199
9200
|
};
|
|
9200
|
-
const _sfc_main$
|
|
9201
|
+
const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
9201
9202
|
__name: "SearchBoxProductDescription",
|
|
9202
9203
|
props: {
|
|
9203
9204
|
item: {},
|
|
@@ -9217,12 +9218,12 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
|
9217
9218
|
key: 0,
|
|
9218
9219
|
class: "lupa-search-box-product-description",
|
|
9219
9220
|
innerHTML: description.value
|
|
9220
|
-
}, null, 8, _hoisted_1$
|
|
9221
|
+
}, null, 8, _hoisted_1$16)) : (openBlock(), createElementBlock("div", _hoisted_2$M, toDisplayString(description.value), 1));
|
|
9221
9222
|
};
|
|
9222
9223
|
}
|
|
9223
9224
|
});
|
|
9224
|
-
const _hoisted_1$
|
|
9225
|
-
const _sfc_main$
|
|
9225
|
+
const _hoisted_1$15 = { class: "lupa-search-box-product-price" };
|
|
9226
|
+
const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
9226
9227
|
__name: "SearchBoxProductPrice",
|
|
9227
9228
|
props: {
|
|
9228
9229
|
item: {},
|
|
@@ -9240,14 +9241,14 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
9240
9241
|
);
|
|
9241
9242
|
});
|
|
9242
9243
|
return (_ctx, _cache) => {
|
|
9243
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9244
|
+
return openBlock(), createElementBlock("div", _hoisted_1$15, [
|
|
9244
9245
|
createBaseVNode("strong", null, toDisplayString(price.value), 1)
|
|
9245
9246
|
]);
|
|
9246
9247
|
};
|
|
9247
9248
|
}
|
|
9248
9249
|
});
|
|
9249
|
-
const _hoisted_1$
|
|
9250
|
-
const _sfc_main$
|
|
9250
|
+
const _hoisted_1$14 = { class: "lupa-search-box-product-regular-price" };
|
|
9251
|
+
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
9251
9252
|
__name: "SearchBoxProductRegularPrice",
|
|
9252
9253
|
props: {
|
|
9253
9254
|
item: {},
|
|
@@ -9265,16 +9266,16 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
9265
9266
|
);
|
|
9266
9267
|
});
|
|
9267
9268
|
return (_ctx, _cache) => {
|
|
9268
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9269
|
+
return openBlock(), createElementBlock("div", _hoisted_1$14, toDisplayString(price.value), 1);
|
|
9269
9270
|
};
|
|
9270
9271
|
}
|
|
9271
9272
|
});
|
|
9272
|
-
const _hoisted_1$
|
|
9273
|
-
const _hoisted_2$
|
|
9273
|
+
const _hoisted_1$13 = ["innerHTML"];
|
|
9274
|
+
const _hoisted_2$L = { key: 0 };
|
|
9274
9275
|
const _hoisted_3$y = { key: 1 };
|
|
9275
9276
|
const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
|
|
9276
9277
|
const _hoisted_5$f = { class: "lupa-search-box-custom-text" };
|
|
9277
|
-
const _sfc_main$
|
|
9278
|
+
const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
9278
9279
|
__name: "SearchBoxProductCustom",
|
|
9279
9280
|
props: {
|
|
9280
9281
|
item: {},
|
|
@@ -9300,11 +9301,11 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
9300
9301
|
key: 0,
|
|
9301
9302
|
class: [className.value, "lupa-search-box-product-custom"],
|
|
9302
9303
|
innerHTML: text.value
|
|
9303
|
-
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$
|
|
9304
|
+
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$13)) : (openBlock(), createElementBlock("div", mergeProps({
|
|
9304
9305
|
key: 1,
|
|
9305
9306
|
class: [className.value, "lupa-search-box-product-custom"]
|
|
9306
9307
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
9307
|
-
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
9308
|
+
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$L, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$y, [
|
|
9308
9309
|
createBaseVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
|
|
9309
9310
|
createBaseVNode("div", _hoisted_5$f, toDisplayString(text.value), 1)
|
|
9310
9311
|
]))
|
|
@@ -9312,8 +9313,8 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
9312
9313
|
};
|
|
9313
9314
|
}
|
|
9314
9315
|
});
|
|
9315
|
-
const _hoisted_1$
|
|
9316
|
-
const _sfc_main$
|
|
9316
|
+
const _hoisted_1$12 = ["innerHTML"];
|
|
9317
|
+
const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
9317
9318
|
__name: "SearchBoxProductCustomHtml",
|
|
9318
9319
|
props: {
|
|
9319
9320
|
item: {},
|
|
@@ -9333,7 +9334,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
9333
9334
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
9334
9335
|
class: className.value,
|
|
9335
9336
|
innerHTML: text.value
|
|
9336
|
-
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$
|
|
9337
|
+
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$12);
|
|
9337
9338
|
};
|
|
9338
9339
|
}
|
|
9339
9340
|
});
|
|
@@ -9391,13 +9392,33 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
9391
9392
|
const isMobileSidebarVisible = ref(false);
|
|
9392
9393
|
const optionsStore = useOptionsStore();
|
|
9393
9394
|
const paramsStore = useParamsStore();
|
|
9395
|
+
const { searchResultOptions } = storeToRefs(optionsStore);
|
|
9394
9396
|
const facets = computed(() => searchResult.value.facets);
|
|
9395
9397
|
const filters = computed(() => searchResult.value.filters);
|
|
9396
9398
|
const currentQueryText = computed(() => searchResult.value.searchText);
|
|
9397
9399
|
const totalItems = computed(() => searchResult.value.total);
|
|
9398
9400
|
const hasResults = computed(() => totalItems.value > 0);
|
|
9401
|
+
const priceKeys = computed(() => {
|
|
9402
|
+
var _a, _b;
|
|
9403
|
+
return (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.priceKeys) != null ? _b : [];
|
|
9404
|
+
});
|
|
9405
|
+
const currency = computed(() => {
|
|
9406
|
+
var _a, _b, _c;
|
|
9407
|
+
return (_c = (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.labels) == null ? void 0 : _b.currency) != null ? _c : "";
|
|
9408
|
+
});
|
|
9409
|
+
const priceSeparator = computed(() => {
|
|
9410
|
+
var _a, _b, _c;
|
|
9411
|
+
return (_c = (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.labels) == null ? void 0 : _b.priceSeparator) != null ? _c : "";
|
|
9412
|
+
});
|
|
9399
9413
|
const labeledFilters = computed(
|
|
9400
|
-
() => getLabeledFilters(
|
|
9414
|
+
() => getLabeledFilters(
|
|
9415
|
+
unfoldFilters(filters.value, {
|
|
9416
|
+
keys: priceKeys.value,
|
|
9417
|
+
currency: currency.value,
|
|
9418
|
+
separator: priceSeparator.value
|
|
9419
|
+
}),
|
|
9420
|
+
facets.value
|
|
9421
|
+
)
|
|
9401
9422
|
);
|
|
9402
9423
|
const displayFilters = computed(() => {
|
|
9403
9424
|
var _a, _b;
|
|
@@ -9531,10 +9552,10 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
9531
9552
|
clearSearchResult
|
|
9532
9553
|
};
|
|
9533
9554
|
});
|
|
9534
|
-
const _hoisted_1$
|
|
9535
|
-
const _hoisted_2$
|
|
9555
|
+
const _hoisted_1$11 = { class: "lupa-search-box-add-to-cart-wrapper" };
|
|
9556
|
+
const _hoisted_2$K = { class: "lupa-search-box-product-addtocart" };
|
|
9536
9557
|
const _hoisted_3$x = ["onClick", "disabled"];
|
|
9537
|
-
const _sfc_main$
|
|
9558
|
+
const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
9538
9559
|
__name: "SearchBoxProductAddToCart",
|
|
9539
9560
|
props: {
|
|
9540
9561
|
item: {},
|
|
@@ -9561,8 +9582,8 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
9561
9582
|
loading.value = false;
|
|
9562
9583
|
});
|
|
9563
9584
|
return (_ctx, _cache) => {
|
|
9564
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9565
|
-
createBaseVNode("div", _hoisted_2$
|
|
9585
|
+
return openBlock(), createElementBlock("div", _hoisted_1$11, [
|
|
9586
|
+
createBaseVNode("div", _hoisted_2$K, [
|
|
9566
9587
|
createBaseVNode("button", {
|
|
9567
9588
|
onClick: withModifiers(handleClick, ["stop", "prevent"]),
|
|
9568
9589
|
class: normalizeClass(loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart"),
|
|
@@ -9575,23 +9596,23 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
9575
9596
|
};
|
|
9576
9597
|
}
|
|
9577
9598
|
});
|
|
9578
|
-
const _hoisted_1
|
|
9599
|
+
const _hoisted_1$10 = {
|
|
9579
9600
|
key: 1,
|
|
9580
9601
|
class: "lupa-search-box-element-badge-wrapper"
|
|
9581
9602
|
};
|
|
9582
9603
|
const __default__$4 = {
|
|
9583
9604
|
components: {
|
|
9584
|
-
SearchBoxProductImage: _sfc_main$
|
|
9585
|
-
SearchBoxProductTitle: _sfc_main$
|
|
9586
|
-
SearchBoxProductDescription: _sfc_main$
|
|
9587
|
-
SearchBoxProductPrice: _sfc_main$
|
|
9588
|
-
SearchBoxProductRegularPrice: _sfc_main$
|
|
9589
|
-
SearchBoxProductCustom: _sfc_main$
|
|
9590
|
-
SearchBoxProductCustomHtml: _sfc_main$
|
|
9591
|
-
SearchBoxProductAddToCart: _sfc_main$
|
|
9605
|
+
SearchBoxProductImage: _sfc_main$1d,
|
|
9606
|
+
SearchBoxProductTitle: _sfc_main$1c,
|
|
9607
|
+
SearchBoxProductDescription: _sfc_main$1b,
|
|
9608
|
+
SearchBoxProductPrice: _sfc_main$1a,
|
|
9609
|
+
SearchBoxProductRegularPrice: _sfc_main$19,
|
|
9610
|
+
SearchBoxProductCustom: _sfc_main$18,
|
|
9611
|
+
SearchBoxProductCustomHtml: _sfc_main$17,
|
|
9612
|
+
SearchBoxProductAddToCart: _sfc_main$16
|
|
9592
9613
|
}
|
|
9593
9614
|
};
|
|
9594
|
-
const _sfc_main$
|
|
9615
|
+
const _sfc_main$15 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
|
|
9595
9616
|
__name: "SearchBoxProductElement",
|
|
9596
9617
|
props: {
|
|
9597
9618
|
item: {},
|
|
@@ -9649,7 +9670,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
9649
9670
|
class: normalizeClass({ "lupa-loading-dynamic-data": isLoadingDynamicData((_a = _ctx.item) == null ? void 0 : _a.id) }),
|
|
9650
9671
|
inStock: _ctx.isInStock
|
|
9651
9672
|
}, null, 8, ["item", "options", "labels", "class", "inStock"])) : createCommentVNode("", true)
|
|
9652
|
-
], 64)) : (openBlock(), createElementBlock("div", _hoisted_1
|
|
9673
|
+
], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$10, [
|
|
9653
9674
|
displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
|
|
9654
9675
|
key: 0,
|
|
9655
9676
|
item: enhancedItem.value,
|
|
@@ -9663,14 +9684,14 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
9663
9684
|
};
|
|
9664
9685
|
}
|
|
9665
9686
|
}));
|
|
9666
|
-
const _hoisted_1
|
|
9667
|
-
const _hoisted_2$
|
|
9687
|
+
const _hoisted_1$$ = { class: "lupa-badge-title" };
|
|
9688
|
+
const _hoisted_2$J = ["src"];
|
|
9668
9689
|
const _hoisted_3$w = { key: 1 };
|
|
9669
9690
|
const _hoisted_4$p = {
|
|
9670
9691
|
key: 0,
|
|
9671
9692
|
class: "lupa-badge-full-text"
|
|
9672
9693
|
};
|
|
9673
|
-
const _sfc_main$
|
|
9694
|
+
const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
9674
9695
|
__name: "SearchResultGeneratedBadge",
|
|
9675
9696
|
props: {
|
|
9676
9697
|
options: {},
|
|
@@ -9703,11 +9724,11 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
9703
9724
|
class: normalizeClass(["lupa-dynamic-badge", customClassName.value]),
|
|
9704
9725
|
style: normalizeStyle({ background: _ctx.badge.backgroundColor, color: _ctx.badge.color })
|
|
9705
9726
|
}, [
|
|
9706
|
-
createBaseVNode("span", _hoisted_1
|
|
9727
|
+
createBaseVNode("span", _hoisted_1$$, [
|
|
9707
9728
|
image.value ? (openBlock(), createElementBlock("img", {
|
|
9708
9729
|
key: 0,
|
|
9709
9730
|
src: image.value
|
|
9710
|
-
}, null, 8, _hoisted_2$
|
|
9731
|
+
}, null, 8, _hoisted_2$J)) : createCommentVNode("", true),
|
|
9711
9732
|
hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$w, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
|
|
9712
9733
|
]),
|
|
9713
9734
|
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
|
|
@@ -9715,8 +9736,8 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
9715
9736
|
};
|
|
9716
9737
|
}
|
|
9717
9738
|
});
|
|
9718
|
-
const _hoisted_1$
|
|
9719
|
-
const _sfc_main$
|
|
9739
|
+
const _hoisted_1$_ = { class: "lupa-generated-badges" };
|
|
9740
|
+
const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
9720
9741
|
__name: "SearchResultGeneratedBadges",
|
|
9721
9742
|
props: {
|
|
9722
9743
|
options: {}
|
|
@@ -9742,9 +9763,9 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
9742
9763
|
})).filter((b) => Boolean(b.id));
|
|
9743
9764
|
});
|
|
9744
9765
|
return (_ctx, _cache) => {
|
|
9745
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9766
|
+
return openBlock(), createElementBlock("div", _hoisted_1$_, [
|
|
9746
9767
|
(openBlock(true), createElementBlock(Fragment, null, renderList(badges.value, (badge) => {
|
|
9747
|
-
return openBlock(), createBlock(_sfc_main$
|
|
9768
|
+
return openBlock(), createBlock(_sfc_main$14, {
|
|
9748
9769
|
key: badge.id,
|
|
9749
9770
|
badge,
|
|
9750
9771
|
options: _ctx.options
|
|
@@ -9754,8 +9775,8 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
9754
9775
|
};
|
|
9755
9776
|
}
|
|
9756
9777
|
});
|
|
9757
|
-
const _hoisted_1$
|
|
9758
|
-
const _sfc_main$
|
|
9778
|
+
const _hoisted_1$Z = ["innerHTML"];
|
|
9779
|
+
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
9759
9780
|
__name: "CustomBadge",
|
|
9760
9781
|
props: {
|
|
9761
9782
|
badge: {}
|
|
@@ -9774,12 +9795,12 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
9774
9795
|
return openBlock(), createElementBlock("div", {
|
|
9775
9796
|
class: normalizeClass(className.value),
|
|
9776
9797
|
innerHTML: text.value
|
|
9777
|
-
}, null, 10, _hoisted_1$
|
|
9798
|
+
}, null, 10, _hoisted_1$Z);
|
|
9778
9799
|
};
|
|
9779
9800
|
}
|
|
9780
9801
|
});
|
|
9781
|
-
const _hoisted_1$
|
|
9782
|
-
const _sfc_main$
|
|
9802
|
+
const _hoisted_1$Y = { class: "lupa-text-badges" };
|
|
9803
|
+
const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
9783
9804
|
__name: "TextBadge",
|
|
9784
9805
|
props: {
|
|
9785
9806
|
badge: {}
|
|
@@ -9794,7 +9815,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
9794
9815
|
return badges.value.slice(0, props.badge.maxItems);
|
|
9795
9816
|
});
|
|
9796
9817
|
return (_ctx, _cache) => {
|
|
9797
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9818
|
+
return openBlock(), createElementBlock("div", _hoisted_1$Y, [
|
|
9798
9819
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
|
|
9799
9820
|
return openBlock(), createElementBlock("div", {
|
|
9800
9821
|
class: "lupa-badge lupa-text-badge",
|
|
@@ -9805,9 +9826,9 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
9805
9826
|
};
|
|
9806
9827
|
}
|
|
9807
9828
|
});
|
|
9808
|
-
const _hoisted_1$
|
|
9809
|
-
const _hoisted_2$
|
|
9810
|
-
const _sfc_main
|
|
9829
|
+
const _hoisted_1$X = { class: "lupa-image-badges" };
|
|
9830
|
+
const _hoisted_2$I = ["src"];
|
|
9831
|
+
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
9811
9832
|
__name: "ImageBadge",
|
|
9812
9833
|
props: {
|
|
9813
9834
|
badge: {}
|
|
@@ -9827,7 +9848,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
9827
9848
|
return `${props.badge.rootImageUrl}${src}`;
|
|
9828
9849
|
};
|
|
9829
9850
|
return (_ctx, _cache) => {
|
|
9830
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9851
|
+
return openBlock(), createElementBlock("div", _hoisted_1$X, [
|
|
9831
9852
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
|
|
9832
9853
|
return openBlock(), createElementBlock("div", {
|
|
9833
9854
|
class: "lupa-badge lupa-image-badge",
|
|
@@ -9835,22 +9856,22 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
9835
9856
|
}, [
|
|
9836
9857
|
createBaseVNode("img", {
|
|
9837
9858
|
src: getImageUrl(item)
|
|
9838
|
-
}, null, 8, _hoisted_2$
|
|
9859
|
+
}, null, 8, _hoisted_2$I)
|
|
9839
9860
|
]);
|
|
9840
9861
|
}), 128))
|
|
9841
9862
|
]);
|
|
9842
9863
|
};
|
|
9843
9864
|
}
|
|
9844
9865
|
});
|
|
9845
|
-
const _hoisted_1$
|
|
9866
|
+
const _hoisted_1$W = { id: "lupa-search-results-badges" };
|
|
9846
9867
|
const __default__$3 = {
|
|
9847
9868
|
components: {
|
|
9848
|
-
CustomBadge: _sfc_main$
|
|
9849
|
-
TextBadge: _sfc_main$
|
|
9850
|
-
ImageBadge: _sfc_main
|
|
9869
|
+
CustomBadge: _sfc_main$12,
|
|
9870
|
+
TextBadge: _sfc_main$11,
|
|
9871
|
+
ImageBadge: _sfc_main$10
|
|
9851
9872
|
}
|
|
9852
9873
|
};
|
|
9853
|
-
const _sfc_main
|
|
9874
|
+
const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
|
|
9854
9875
|
__name: "SearchResultsBadgeWrapper",
|
|
9855
9876
|
props: {
|
|
9856
9877
|
position: {},
|
|
@@ -9906,7 +9927,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
9906
9927
|
}
|
|
9907
9928
|
};
|
|
9908
9929
|
return (_ctx, _cache) => {
|
|
9909
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9930
|
+
return openBlock(), createElementBlock("div", _hoisted_1$W, [
|
|
9910
9931
|
createBaseVNode("div", {
|
|
9911
9932
|
id: "lupa-badges",
|
|
9912
9933
|
class: normalizeClass(anchorPosition.value)
|
|
@@ -9917,7 +9938,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
9917
9938
|
badge
|
|
9918
9939
|
}, null, 8, ["badge"]);
|
|
9919
9940
|
}), 128)),
|
|
9920
|
-
positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$
|
|
9941
|
+
positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$13, {
|
|
9921
9942
|
key: 0,
|
|
9922
9943
|
options: _ctx.options
|
|
9923
9944
|
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
@@ -9926,14 +9947,14 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
9926
9947
|
};
|
|
9927
9948
|
}
|
|
9928
9949
|
}));
|
|
9929
|
-
const _hoisted_1$
|
|
9930
|
-
const _hoisted_2$
|
|
9950
|
+
const _hoisted_1$V = ["href"];
|
|
9951
|
+
const _hoisted_2$H = { class: "lupa-search-box-product-image-section" };
|
|
9931
9952
|
const _hoisted_3$v = { class: "lupa-search-box-product-details-section" };
|
|
9932
9953
|
const _hoisted_4$o = {
|
|
9933
9954
|
key: 0,
|
|
9934
9955
|
class: "lupa-search-box-product-add-to-cart-section"
|
|
9935
9956
|
};
|
|
9936
|
-
const _sfc_main$
|
|
9957
|
+
const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
9937
9958
|
__name: "SearchBoxProduct",
|
|
9938
9959
|
props: {
|
|
9939
9960
|
item: {},
|
|
@@ -9992,9 +10013,9 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
9992
10013
|
"data-cy": "lupa-search-box-product",
|
|
9993
10014
|
onClick: handleClick
|
|
9994
10015
|
}), [
|
|
9995
|
-
createBaseVNode("div", _hoisted_2$
|
|
10016
|
+
createBaseVNode("div", _hoisted_2$H, [
|
|
9996
10017
|
(openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
|
|
9997
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10018
|
+
return openBlock(), createBlock(_sfc_main$15, {
|
|
9998
10019
|
class: "lupa-search-box-product-element",
|
|
9999
10020
|
item: _ctx.item,
|
|
10000
10021
|
element,
|
|
@@ -10007,7 +10028,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
10007
10028
|
createBaseVNode("div", _hoisted_3$v, [
|
|
10008
10029
|
(openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
|
|
10009
10030
|
var _a;
|
|
10010
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10031
|
+
return openBlock(), createBlock(_sfc_main$15, {
|
|
10011
10032
|
key: element.key,
|
|
10012
10033
|
class: "lupa-search-box-product-element",
|
|
10013
10034
|
item: _ctx.item,
|
|
@@ -10018,7 +10039,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
10018
10039
|
badgeOptions.value && ((_a = badgeOptions.value) == null ? void 0 : _a.anchorElementKey) === element.key ? {
|
|
10019
10040
|
name: "badges",
|
|
10020
10041
|
fn: withCtx(() => [
|
|
10021
|
-
createVNode(_sfc_main
|
|
10042
|
+
createVNode(_sfc_main$$, {
|
|
10022
10043
|
options: badgeOptions.value,
|
|
10023
10044
|
position: "card"
|
|
10024
10045
|
}, null, 8, ["options"])
|
|
@@ -10029,7 +10050,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
10029
10050
|
}), 128))
|
|
10030
10051
|
]),
|
|
10031
10052
|
addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_4$o, [
|
|
10032
|
-
createVNode(_sfc_main$
|
|
10053
|
+
createVNode(_sfc_main$15, {
|
|
10033
10054
|
class: "lupa-search-box-product-element",
|
|
10034
10055
|
item: _ctx.item,
|
|
10035
10056
|
element: addToCartElement.value,
|
|
@@ -10038,7 +10059,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
10038
10059
|
isInStock: isInStock.value
|
|
10039
10060
|
}, null, 8, ["item", "element", "labels", "link", "isInStock"])
|
|
10040
10061
|
])) : createCommentVNode("", true)
|
|
10041
|
-
], 16, _hoisted_1$
|
|
10062
|
+
], 16, _hoisted_1$V);
|
|
10042
10063
|
};
|
|
10043
10064
|
}
|
|
10044
10065
|
});
|
|
@@ -10099,8 +10120,8 @@ const useTrackingStore = defineStore("tracking", () => {
|
|
|
10099
10120
|
};
|
|
10100
10121
|
return { trackSearch, trackResults, trackEvent };
|
|
10101
10122
|
});
|
|
10102
|
-
const _hoisted_1$
|
|
10103
|
-
const _sfc_main$
|
|
10123
|
+
const _hoisted_1$U = { id: "lupa-search-box-products" };
|
|
10124
|
+
const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
10104
10125
|
__name: "SearchBoxProducts",
|
|
10105
10126
|
props: {
|
|
10106
10127
|
items: {},
|
|
@@ -10161,7 +10182,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
10161
10182
|
handleRoutingEvent(link, event, boxRoutingBehavior.value === "event");
|
|
10162
10183
|
};
|
|
10163
10184
|
return (_ctx, _cache) => {
|
|
10164
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
10185
|
+
return openBlock(), createElementBlock("div", _hoisted_1$U, [
|
|
10165
10186
|
_ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.items, (item, index) => {
|
|
10166
10187
|
return renderSlot(_ctx.$slots, "productCard", {
|
|
10167
10188
|
key: index,
|
|
@@ -10173,7 +10194,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
10173
10194
|
itemClicked: handleProductClick
|
|
10174
10195
|
});
|
|
10175
10196
|
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.items, (item, index) => {
|
|
10176
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10197
|
+
return openBlock(), createBlock(_sfc_main$_, {
|
|
10177
10198
|
key: index,
|
|
10178
10199
|
item,
|
|
10179
10200
|
panelOptions: _ctx.panelOptions,
|
|
@@ -10187,7 +10208,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
10187
10208
|
};
|
|
10188
10209
|
}
|
|
10189
10210
|
});
|
|
10190
|
-
const _sfc_main$
|
|
10211
|
+
const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
10191
10212
|
__name: "SearchBoxProductsWrapper",
|
|
10192
10213
|
props: {
|
|
10193
10214
|
panel: {},
|
|
@@ -10239,7 +10260,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
10239
10260
|
const getItemsDebounced = debounce$1(getItems, props.debounce);
|
|
10240
10261
|
return (_ctx, _cache) => {
|
|
10241
10262
|
var _a, _b;
|
|
10242
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10263
|
+
return openBlock(), createBlock(_sfc_main$Z, {
|
|
10243
10264
|
items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
|
|
10244
10265
|
panelOptions: _ctx.panel,
|
|
10245
10266
|
labels: _ctx.labels,
|
|
@@ -10257,7 +10278,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
10257
10278
|
};
|
|
10258
10279
|
}
|
|
10259
10280
|
});
|
|
10260
|
-
const _sfc_main$
|
|
10281
|
+
const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
10261
10282
|
__name: "SearchBoxRelatedSourceWrapper",
|
|
10262
10283
|
props: {
|
|
10263
10284
|
panel: {},
|
|
@@ -10329,7 +10350,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
10329
10350
|
});
|
|
10330
10351
|
return (_ctx, _cache) => {
|
|
10331
10352
|
var _a, _b;
|
|
10332
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10353
|
+
return openBlock(), createBlock(_sfc_main$Z, {
|
|
10333
10354
|
items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
|
|
10334
10355
|
panelOptions: documentPanelOptions.value,
|
|
10335
10356
|
labels: _ctx.labels,
|
|
@@ -10347,11 +10368,11 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
10347
10368
|
};
|
|
10348
10369
|
}
|
|
10349
10370
|
});
|
|
10350
|
-
const _hoisted_1$
|
|
10371
|
+
const _hoisted_1$T = {
|
|
10351
10372
|
key: 0,
|
|
10352
10373
|
id: "lupa-search-box-panel"
|
|
10353
10374
|
};
|
|
10354
|
-
const _hoisted_2$
|
|
10375
|
+
const _hoisted_2$G = ["data-cy"];
|
|
10355
10376
|
const _hoisted_3$u = {
|
|
10356
10377
|
key: 0,
|
|
10357
10378
|
class: "lupa-panel-title lupa-panel-title-top-results"
|
|
@@ -10366,12 +10387,12 @@ const _hoisted_5$e = {
|
|
|
10366
10387
|
};
|
|
10367
10388
|
const __default__$2 = {
|
|
10368
10389
|
components: {
|
|
10369
|
-
SearchBoxSuggestionsWrapper: _sfc_main$
|
|
10370
|
-
SearchBoxProductsWrapper: _sfc_main$
|
|
10371
|
-
SearchBoxRelatedSourceWrapper: _sfc_main$
|
|
10390
|
+
SearchBoxSuggestionsWrapper: _sfc_main$1f,
|
|
10391
|
+
SearchBoxProductsWrapper: _sfc_main$Y,
|
|
10392
|
+
SearchBoxRelatedSourceWrapper: _sfc_main$X
|
|
10372
10393
|
}
|
|
10373
10394
|
};
|
|
10374
|
-
const _sfc_main$
|
|
10395
|
+
const _sfc_main$W = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
|
|
10375
10396
|
__name: "SearchBoxMainPanel",
|
|
10376
10397
|
props: {
|
|
10377
10398
|
options: {},
|
|
@@ -10517,7 +10538,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
10517
10538
|
ref_key: "panelContainer",
|
|
10518
10539
|
ref: panelContainer
|
|
10519
10540
|
}, [
|
|
10520
|
-
displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
10541
|
+
displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$T, [
|
|
10521
10542
|
labels.value.closePanel ? (openBlock(), createElementBlock("a", {
|
|
10522
10543
|
key: 0,
|
|
10523
10544
|
class: "lupa-search-box-close-panel",
|
|
@@ -10559,21 +10580,21 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
10559
10580
|
key: "0"
|
|
10560
10581
|
} : void 0
|
|
10561
10582
|
]), 1064, ["panel", "options", "debounce", "inputValue", "labels"])) : createCommentVNode("", true)
|
|
10562
|
-
], 10, _hoisted_2$
|
|
10583
|
+
], 10, _hoisted_2$G);
|
|
10563
10584
|
}), 128))
|
|
10564
10585
|
], 4),
|
|
10565
|
-
!unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$
|
|
10586
|
+
!unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1i, {
|
|
10566
10587
|
key: 1,
|
|
10567
10588
|
labels: labels.value
|
|
10568
10589
|
}, null, 8, ["labels"])) : createCommentVNode("", true),
|
|
10569
|
-
unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$
|
|
10590
|
+
unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$1l, {
|
|
10570
10591
|
key: 2,
|
|
10571
10592
|
labels: labels.value,
|
|
10572
10593
|
showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
|
|
10573
10594
|
onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
|
|
10574
10595
|
}, null, 8, ["labels", "showTotalCount"])) : createCommentVNode("", true)
|
|
10575
10596
|
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$e, [
|
|
10576
|
-
createVNode(_sfc_main$
|
|
10597
|
+
createVNode(_sfc_main$1j, {
|
|
10577
10598
|
options: _ctx.options.history,
|
|
10578
10599
|
history: history.value,
|
|
10579
10600
|
onGoToResults: handleGoToResults,
|
|
@@ -10598,9 +10619,9 @@ const unbindSearchTriggers = (triggers = [], event) => {
|
|
|
10598
10619
|
const elements = getElements(triggers);
|
|
10599
10620
|
elements.forEach((e) => e == null ? void 0 : e.removeEventListener(BIND_EVENT, event));
|
|
10600
10621
|
};
|
|
10601
|
-
const _hoisted_1$
|
|
10602
|
-
const _hoisted_2$
|
|
10603
|
-
const _sfc_main$
|
|
10622
|
+
const _hoisted_1$S = { id: "lupa-search-box" };
|
|
10623
|
+
const _hoisted_2$F = { class: "lupa-search-box-wrapper" };
|
|
10624
|
+
const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
10604
10625
|
__name: "SearchBox",
|
|
10605
10626
|
props: {
|
|
10606
10627
|
options: {},
|
|
@@ -10845,9 +10866,9 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
10845
10866
|
};
|
|
10846
10867
|
return (_ctx, _cache) => {
|
|
10847
10868
|
var _a2;
|
|
10848
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
10849
|
-
createBaseVNode("div", _hoisted_2$
|
|
10850
|
-
createVNode(_sfc_main$
|
|
10869
|
+
return openBlock(), createElementBlock("div", _hoisted_1$S, [
|
|
10870
|
+
createBaseVNode("div", _hoisted_2$F, [
|
|
10871
|
+
createVNode(_sfc_main$1m, {
|
|
10851
10872
|
options: inputOptions.value,
|
|
10852
10873
|
suggestedValue: suggestedValue.value,
|
|
10853
10874
|
"can-close": (_a2 = _ctx.isSearchContainer) != null ? _a2 : false,
|
|
@@ -10858,7 +10879,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
10858
10879
|
onFocus: _cache[0] || (_cache[0] = ($event) => opened.value = true),
|
|
10859
10880
|
onClose: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("close"))
|
|
10860
10881
|
}, null, 8, ["options", "suggestedValue", "can-close", "emit-input-on-focus"]),
|
|
10861
|
-
opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$
|
|
10882
|
+
opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$W, {
|
|
10862
10883
|
key: 0,
|
|
10863
10884
|
options: panelOptions.value,
|
|
10864
10885
|
inputValue: inputValue.value,
|
|
@@ -10946,11 +10967,11 @@ const getSearchParams = (url, params, baseUrl) => {
|
|
|
10946
10967
|
}
|
|
10947
10968
|
return searchParams;
|
|
10948
10969
|
};
|
|
10949
|
-
const _hoisted_1$
|
|
10970
|
+
const _hoisted_1$R = {
|
|
10950
10971
|
key: 0,
|
|
10951
10972
|
id: "lupa-search-results-did-you-mean"
|
|
10952
10973
|
};
|
|
10953
|
-
const _hoisted_2$
|
|
10974
|
+
const _hoisted_2$E = {
|
|
10954
10975
|
key: 0,
|
|
10955
10976
|
"data-cy": "suggested-search-text-label"
|
|
10956
10977
|
};
|
|
@@ -10959,7 +10980,7 @@ const _hoisted_3$t = {
|
|
|
10959
10980
|
"data-cy": "did-you-mean-label"
|
|
10960
10981
|
};
|
|
10961
10982
|
const _hoisted_4$m = { key: 1 };
|
|
10962
|
-
const _sfc_main$
|
|
10983
|
+
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
10963
10984
|
__name: "SearchResultsDidYouMean",
|
|
10964
10985
|
props: {
|
|
10965
10986
|
labels: {}
|
|
@@ -10991,8 +11012,8 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
10991
11012
|
paramStore.goToResults({ searchText, facet });
|
|
10992
11013
|
};
|
|
10993
11014
|
return (_ctx, _cache) => {
|
|
10994
|
-
return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
10995
|
-
unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
11015
|
+
return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$R, [
|
|
11016
|
+
unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$E, [
|
|
10996
11017
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.noResultsSuggestion.split(" "), (label, index) => {
|
|
10997
11018
|
return openBlock(), createElementBlock("span", { key: index }, [
|
|
10998
11019
|
createBaseVNode("span", {
|
|
@@ -11017,12 +11038,12 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
11017
11038
|
};
|
|
11018
11039
|
}
|
|
11019
11040
|
});
|
|
11020
|
-
const _hoisted_1$
|
|
11041
|
+
const _hoisted_1$Q = {
|
|
11021
11042
|
key: 0,
|
|
11022
11043
|
class: "lupa-search-results-summary"
|
|
11023
11044
|
};
|
|
11024
|
-
const _hoisted_2$
|
|
11025
|
-
const _sfc_main$
|
|
11045
|
+
const _hoisted_2$D = ["innerHTML"];
|
|
11046
|
+
const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
11026
11047
|
__name: "SearchResultsSummary",
|
|
11027
11048
|
props: {
|
|
11028
11049
|
label: {},
|
|
@@ -11037,8 +11058,8 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
11037
11058
|
return addParamsToLabel(props.label, range, `<span>${totalItems.value}</span>`);
|
|
11038
11059
|
});
|
|
11039
11060
|
return (_ctx, _cache) => {
|
|
11040
|
-
return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
11041
|
-
createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$
|
|
11061
|
+
return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$Q, [
|
|
11062
|
+
createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$D),
|
|
11042
11063
|
_ctx.clearable ? (openBlock(), createElementBlock("span", {
|
|
11043
11064
|
key: 0,
|
|
11044
11065
|
class: "lupa-filter-clear",
|
|
@@ -11049,18 +11070,18 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
11049
11070
|
};
|
|
11050
11071
|
}
|
|
11051
11072
|
});
|
|
11052
|
-
const _hoisted_1$
|
|
11073
|
+
const _hoisted_1$P = {
|
|
11053
11074
|
key: 0,
|
|
11054
11075
|
class: "lupa-result-page-title",
|
|
11055
11076
|
"data-cy": "lupa-result-page-title"
|
|
11056
11077
|
};
|
|
11057
|
-
const _hoisted_2$
|
|
11078
|
+
const _hoisted_2$C = { key: 0 };
|
|
11058
11079
|
const _hoisted_3$s = {
|
|
11059
11080
|
key: 1,
|
|
11060
11081
|
class: "lupa-results-total-count"
|
|
11061
11082
|
};
|
|
11062
11083
|
const _hoisted_4$l = ["innerHTML"];
|
|
11063
|
-
const _sfc_main$
|
|
11084
|
+
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
11064
11085
|
__name: "SearchResultsTitle",
|
|
11065
11086
|
props: {
|
|
11066
11087
|
options: {},
|
|
@@ -11095,12 +11116,12 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
11095
11116
|
});
|
|
11096
11117
|
return (_ctx, _cache) => {
|
|
11097
11118
|
return openBlock(), createElementBlock("div", null, [
|
|
11098
|
-
showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$
|
|
11119
|
+
showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$P, [
|
|
11099
11120
|
createTextVNode(toDisplayString(_ctx.options.labels.searchResults), 1),
|
|
11100
|
-
queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
11121
|
+
queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$C, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
|
|
11101
11122
|
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$s, "(" + toDisplayString(unref(totalItems)) + ")", 1)) : createCommentVNode("", true)
|
|
11102
11123
|
])) : createCommentVNode("", true),
|
|
11103
|
-
_ctx.showSummary ? (openBlock(), createBlock(_sfc_main$
|
|
11124
|
+
_ctx.showSummary ? (openBlock(), createBlock(_sfc_main$T, {
|
|
11104
11125
|
key: 1,
|
|
11105
11126
|
label: summaryLabel.value
|
|
11106
11127
|
}, null, 8, ["label"])) : createCommentVNode("", true),
|
|
@@ -11113,8 +11134,8 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
11113
11134
|
};
|
|
11114
11135
|
}
|
|
11115
11136
|
});
|
|
11116
|
-
const _hoisted_1$
|
|
11117
|
-
const _hoisted_2$
|
|
11137
|
+
const _hoisted_1$O = { class: "lupa-search-result-filter-value" };
|
|
11138
|
+
const _hoisted_2$B = {
|
|
11118
11139
|
class: "lupa-current-filter-label",
|
|
11119
11140
|
"data-cy": "lupa-current-filter-label"
|
|
11120
11141
|
};
|
|
@@ -11122,7 +11143,7 @@ const _hoisted_3$r = {
|
|
|
11122
11143
|
class: "lupa-current-filter-value",
|
|
11123
11144
|
"data-cy": "lupa-current-filter-value"
|
|
11124
11145
|
};
|
|
11125
|
-
const _sfc_main$
|
|
11146
|
+
const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
11126
11147
|
__name: "CurrentFilterDisplay",
|
|
11127
11148
|
props: {
|
|
11128
11149
|
filter: {}
|
|
@@ -11134,19 +11155,19 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
11134
11155
|
emit2("remove", { filter: props.filter });
|
|
11135
11156
|
};
|
|
11136
11157
|
return (_ctx, _cache) => {
|
|
11137
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11158
|
+
return openBlock(), createElementBlock("div", _hoisted_1$O, [
|
|
11138
11159
|
createBaseVNode("div", {
|
|
11139
11160
|
class: "lupa-current-filter-action",
|
|
11140
11161
|
onClick: handleClick
|
|
11141
11162
|
}, "⨉"),
|
|
11142
|
-
createBaseVNode("div", _hoisted_2$
|
|
11163
|
+
createBaseVNode("div", _hoisted_2$B, toDisplayString(_ctx.filter.label) + ": ", 1),
|
|
11143
11164
|
createBaseVNode("div", _hoisted_3$r, toDisplayString(_ctx.filter.value), 1)
|
|
11144
11165
|
]);
|
|
11145
11166
|
};
|
|
11146
11167
|
}
|
|
11147
11168
|
});
|
|
11148
|
-
const _hoisted_1$
|
|
11149
|
-
const _hoisted_2$
|
|
11169
|
+
const _hoisted_1$N = { class: "lupa-filter-title-text" };
|
|
11170
|
+
const _hoisted_2$A = {
|
|
11150
11171
|
key: 0,
|
|
11151
11172
|
class: "lupa-filter-count"
|
|
11152
11173
|
};
|
|
@@ -11155,7 +11176,7 @@ const _hoisted_3$q = {
|
|
|
11155
11176
|
class: "filter-values"
|
|
11156
11177
|
};
|
|
11157
11178
|
const _hoisted_4$k = { class: "lupa-current-filter-list" };
|
|
11158
|
-
const _sfc_main$
|
|
11179
|
+
const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
11159
11180
|
__name: "CurrentFilters",
|
|
11160
11181
|
props: {
|
|
11161
11182
|
options: {},
|
|
@@ -11216,9 +11237,9 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
11216
11237
|
class: "lupa-current-filter-title",
|
|
11217
11238
|
onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
|
|
11218
11239
|
}, [
|
|
11219
|
-
createBaseVNode("div", _hoisted_1$
|
|
11240
|
+
createBaseVNode("div", _hoisted_1$N, [
|
|
11220
11241
|
createTextVNode(toDisplayString((_c = (_b = (_a = _ctx.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.title) != null ? _c : "") + " ", 1),
|
|
11221
|
-
_ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
11242
|
+
_ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$A, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
|
|
11222
11243
|
]),
|
|
11223
11244
|
_ctx.expandable ? (openBlock(), createElementBlock("div", {
|
|
11224
11245
|
key: 0,
|
|
@@ -11228,7 +11249,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
11228
11249
|
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$q, [
|
|
11229
11250
|
createBaseVNode("div", _hoisted_4$k, [
|
|
11230
11251
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(displayFilters), (filter) => {
|
|
11231
|
-
return openBlock(), createBlock(_sfc_main$
|
|
11252
|
+
return openBlock(), createBlock(_sfc_main$R, {
|
|
11232
11253
|
key: filter.key + "_" + filter.value,
|
|
11233
11254
|
filter,
|
|
11234
11255
|
onRemove: handleRemove
|
|
@@ -11245,8 +11266,8 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
11245
11266
|
};
|
|
11246
11267
|
}
|
|
11247
11268
|
});
|
|
11248
|
-
const _hoisted_1$
|
|
11249
|
-
const _sfc_main$
|
|
11269
|
+
const _hoisted_1$M = ["href"];
|
|
11270
|
+
const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
11250
11271
|
__name: "CategoryFilterItem",
|
|
11251
11272
|
props: {
|
|
11252
11273
|
options: {},
|
|
@@ -11283,20 +11304,20 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
11283
11304
|
"data-cy": "lupa-child-category-item",
|
|
11284
11305
|
href: urlLink.value,
|
|
11285
11306
|
onClick: handleNavigation
|
|
11286
|
-
}, toDisplayString(title.value), 9, _hoisted_1$
|
|
11307
|
+
}, toDisplayString(title.value), 9, _hoisted_1$M)
|
|
11287
11308
|
], 2);
|
|
11288
11309
|
};
|
|
11289
11310
|
}
|
|
11290
11311
|
});
|
|
11291
|
-
const _hoisted_1$
|
|
11312
|
+
const _hoisted_1$L = {
|
|
11292
11313
|
class: "lupa-category-filter",
|
|
11293
11314
|
"data-cy": "lupa-category-filter"
|
|
11294
11315
|
};
|
|
11295
|
-
const _hoisted_2$
|
|
11316
|
+
const _hoisted_2$z = { class: "lupa-category-back" };
|
|
11296
11317
|
const _hoisted_3$p = ["href"];
|
|
11297
11318
|
const _hoisted_4$j = ["href"];
|
|
11298
11319
|
const _hoisted_5$d = { class: "lupa-child-category-list" };
|
|
11299
|
-
const _sfc_main$
|
|
11320
|
+
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
11300
11321
|
__name: "CategoryFilter",
|
|
11301
11322
|
props: {
|
|
11302
11323
|
options: {}
|
|
@@ -11382,8 +11403,8 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
11382
11403
|
};
|
|
11383
11404
|
__expose({ fetch: fetch2 });
|
|
11384
11405
|
return (_ctx, _cache) => {
|
|
11385
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11386
|
-
createBaseVNode("div", _hoisted_2$
|
|
11406
|
+
return openBlock(), createElementBlock("div", _hoisted_1$L, [
|
|
11407
|
+
createBaseVNode("div", _hoisted_2$z, [
|
|
11387
11408
|
hasBackButton.value ? (openBlock(), createElementBlock("a", {
|
|
11388
11409
|
key: 0,
|
|
11389
11410
|
"data-cy": "lupa-category-back",
|
|
@@ -11403,7 +11424,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
11403
11424
|
], 2),
|
|
11404
11425
|
createBaseVNode("div", _hoisted_5$d, [
|
|
11405
11426
|
(openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
|
|
11406
|
-
return openBlock(), createBlock(_sfc_main$
|
|
11427
|
+
return openBlock(), createBlock(_sfc_main$P, {
|
|
11407
11428
|
key: getCategoryKey(child),
|
|
11408
11429
|
item: child,
|
|
11409
11430
|
options: _ctx.options
|
|
@@ -11414,11 +11435,11 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
11414
11435
|
};
|
|
11415
11436
|
}
|
|
11416
11437
|
});
|
|
11417
|
-
const _hoisted_1$
|
|
11438
|
+
const _hoisted_1$K = {
|
|
11418
11439
|
class: "lupa-search-result-facet-term-values",
|
|
11419
11440
|
"data-cy": "lupa-search-result-facet-term-values"
|
|
11420
11441
|
};
|
|
11421
|
-
const _hoisted_2$
|
|
11442
|
+
const _hoisted_2$y = ["placeholder"];
|
|
11422
11443
|
const _hoisted_3$o = { class: "lupa-terms-list" };
|
|
11423
11444
|
const _hoisted_4$i = ["onClick"];
|
|
11424
11445
|
const _hoisted_5$c = { class: "lupa-term-checkbox-wrapper" };
|
|
@@ -11430,7 +11451,7 @@ const _hoisted_8$1 = {
|
|
|
11430
11451
|
};
|
|
11431
11452
|
const _hoisted_9$1 = { key: 0 };
|
|
11432
11453
|
const _hoisted_10$1 = { key: 1 };
|
|
11433
|
-
const _sfc_main$
|
|
11454
|
+
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
11434
11455
|
__name: "TermFacet",
|
|
11435
11456
|
props: {
|
|
11436
11457
|
options: {},
|
|
@@ -11499,14 +11520,14 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
11499
11520
|
return selectedItems == null ? void 0 : selectedItems.includes((_b = item.title) == null ? void 0 : _b.toString());
|
|
11500
11521
|
};
|
|
11501
11522
|
return (_ctx, _cache) => {
|
|
11502
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11523
|
+
return openBlock(), createElementBlock("div", _hoisted_1$K, [
|
|
11503
11524
|
isFilterable.value ? withDirectives((openBlock(), createElementBlock("input", {
|
|
11504
11525
|
key: 0,
|
|
11505
11526
|
class: "lupa-term-filter",
|
|
11506
11527
|
"data-cy": "lupa-term-filter",
|
|
11507
11528
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
|
|
11508
11529
|
placeholder: _ctx.options.labels.facetFilter
|
|
11509
|
-
}, null, 8, _hoisted_2$
|
|
11530
|
+
}, null, 8, _hoisted_2$y)), [
|
|
11510
11531
|
[vModelText, termFilter.value]
|
|
11511
11532
|
]) : createCommentVNode("", true),
|
|
11512
11533
|
createBaseVNode("div", _hoisted_3$o, [
|
|
@@ -12517,8 +12538,8 @@ var m = { name: "Slider", emits: ["input", "update:modelValue", "start", "slide"
|
|
|
12517
12538
|
m.render = function(e, t, r, i, n, o) {
|
|
12518
12539
|
return openBlock(), createElementBlock("div", mergeProps(e.sliderProps, { ref: "slider" }), null, 16);
|
|
12519
12540
|
}, m.__file = "src/Slider.vue";
|
|
12520
|
-
const _hoisted_1$
|
|
12521
|
-
const _hoisted_2$
|
|
12541
|
+
const _hoisted_1$J = { class: "lupa-search-result-facet-stats-values" };
|
|
12542
|
+
const _hoisted_2$x = {
|
|
12522
12543
|
key: 0,
|
|
12523
12544
|
class: "lupa-stats-facet-summary"
|
|
12524
12545
|
};
|
|
@@ -12545,7 +12566,7 @@ const _hoisted_13 = {
|
|
|
12545
12566
|
key: 2,
|
|
12546
12567
|
class: "lupa-stats-slider-wrapper"
|
|
12547
12568
|
};
|
|
12548
|
-
const _sfc_main$
|
|
12569
|
+
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
12549
12570
|
__name: "StatsFacet",
|
|
12550
12571
|
props: {
|
|
12551
12572
|
options: {},
|
|
@@ -12578,6 +12599,10 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
12578
12599
|
var _a;
|
|
12579
12600
|
return (_a = searchResultOptions.value) == null ? void 0 : _a.labels.currency;
|
|
12580
12601
|
});
|
|
12602
|
+
const priceKeys = computed(() => {
|
|
12603
|
+
var _a, _b;
|
|
12604
|
+
return (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.priceKeys) != null ? _b : [];
|
|
12605
|
+
});
|
|
12581
12606
|
const isSliderVisible = computed(() => {
|
|
12582
12607
|
var _a, _b;
|
|
12583
12608
|
return Boolean((_b = (_a = props.options.stats) == null ? void 0 : _a.slider) != null ? _b : true);
|
|
@@ -12641,8 +12666,8 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
12641
12666
|
}
|
|
12642
12667
|
});
|
|
12643
12668
|
const isPrice = computed(() => {
|
|
12644
|
-
var _a;
|
|
12645
|
-
return (_a = facetValue.value.key) == null ? void 0 :
|
|
12669
|
+
var _a, _b, _c;
|
|
12670
|
+
return ((_b = (_a = facetValue.value) == null ? void 0 : _a.key) == null ? void 0 : _b.includes(CURRENCY_KEY_INDICATOR)) || ((_c = priceKeys.value) == null ? void 0 : _c.includes(facetValue.value.key));
|
|
12646
12671
|
});
|
|
12647
12672
|
const facetMin = computed(() => {
|
|
12648
12673
|
return Math.floor(facetValue.value.min);
|
|
@@ -12714,8 +12739,8 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
12714
12739
|
innerSliderRange.value = value;
|
|
12715
12740
|
};
|
|
12716
12741
|
return (_ctx, _cache) => {
|
|
12717
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12718
|
-
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
12742
|
+
return openBlock(), createElementBlock("div", _hoisted_1$J, [
|
|
12743
|
+
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$x, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$n, [
|
|
12719
12744
|
createBaseVNode("div", null, [
|
|
12720
12745
|
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$h, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
|
|
12721
12746
|
createBaseVNode("div", _hoisted_5$b, [
|
|
@@ -12781,8 +12806,8 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
12781
12806
|
};
|
|
12782
12807
|
}
|
|
12783
12808
|
});
|
|
12784
|
-
const _hoisted_1$
|
|
12785
|
-
const _hoisted_2$
|
|
12809
|
+
const _hoisted_1$I = { class: "lupa-term-checkbox-wrapper" };
|
|
12810
|
+
const _hoisted_2$w = { class: "lupa-term-checkbox-label" };
|
|
12786
12811
|
const _hoisted_3$m = { class: "lupa-term-label" };
|
|
12787
12812
|
const _hoisted_4$g = {
|
|
12788
12813
|
key: 0,
|
|
@@ -12792,7 +12817,7 @@ const _hoisted_5$a = {
|
|
|
12792
12817
|
key: 0,
|
|
12793
12818
|
class: "lupa-facet-level"
|
|
12794
12819
|
};
|
|
12795
|
-
const _sfc_main$
|
|
12820
|
+
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
12796
12821
|
__name: "HierarchyFacetLevel",
|
|
12797
12822
|
props: {
|
|
12798
12823
|
options: {},
|
|
@@ -12838,12 +12863,12 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
12838
12863
|
"data-cy": "lupa-facet-term",
|
|
12839
12864
|
onClick: _cache[0] || (_cache[0] = ($event) => handleFacetClick(_ctx.item))
|
|
12840
12865
|
}, [
|
|
12841
|
-
createBaseVNode("div", _hoisted_1$
|
|
12866
|
+
createBaseVNode("div", _hoisted_1$I, [
|
|
12842
12867
|
createBaseVNode("span", {
|
|
12843
12868
|
class: normalizeClass(["lupa-term-checkbox", { checked: isChecked.value }])
|
|
12844
12869
|
}, null, 2)
|
|
12845
12870
|
]),
|
|
12846
|
-
createBaseVNode("div", _hoisted_2$
|
|
12871
|
+
createBaseVNode("div", _hoisted_2$w, [
|
|
12847
12872
|
createBaseVNode("span", _hoisted_3$m, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
|
|
12848
12873
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$g, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
|
|
12849
12874
|
])
|
|
@@ -12864,13 +12889,13 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
12864
12889
|
};
|
|
12865
12890
|
}
|
|
12866
12891
|
});
|
|
12867
|
-
const _hoisted_1$
|
|
12892
|
+
const _hoisted_1$H = {
|
|
12868
12893
|
class: "lupa-search-result-facet-term-values lupa-search-result-facet-hierarchy-values",
|
|
12869
12894
|
"data-cy": "lupa-search-result-facet-term-values"
|
|
12870
12895
|
};
|
|
12871
|
-
const _hoisted_2$
|
|
12896
|
+
const _hoisted_2$v = { key: 0 };
|
|
12872
12897
|
const _hoisted_3$l = ["placeholder"];
|
|
12873
|
-
const _sfc_main$
|
|
12898
|
+
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
12874
12899
|
__name: "HierarchyFacet",
|
|
12875
12900
|
props: {
|
|
12876
12901
|
options: {},
|
|
@@ -12920,8 +12945,8 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
12920
12945
|
showAll.value = true;
|
|
12921
12946
|
};
|
|
12922
12947
|
return (_ctx, _cache) => {
|
|
12923
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12924
|
-
isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
12948
|
+
return openBlock(), createElementBlock("div", _hoisted_1$H, [
|
|
12949
|
+
isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$v, [
|
|
12925
12950
|
withDirectives(createBaseVNode("input", {
|
|
12926
12951
|
class: "lupa-term-filter",
|
|
12927
12952
|
"data-cy": "lupa-term-filter",
|
|
@@ -12932,7 +12957,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
12932
12957
|
])
|
|
12933
12958
|
])) : createCommentVNode("", true),
|
|
12934
12959
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
|
|
12935
|
-
return openBlock(), createBlock(_sfc_main$
|
|
12960
|
+
return openBlock(), createBlock(_sfc_main$L, {
|
|
12936
12961
|
key: item.title,
|
|
12937
12962
|
options: _ctx.options,
|
|
12938
12963
|
item,
|
|
@@ -12952,20 +12977,20 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
12952
12977
|
};
|
|
12953
12978
|
}
|
|
12954
12979
|
});
|
|
12955
|
-
const _hoisted_1$
|
|
12956
|
-
const _hoisted_2$
|
|
12980
|
+
const _hoisted_1$G = { class: "lupa-facet-label-text" };
|
|
12981
|
+
const _hoisted_2$u = {
|
|
12957
12982
|
key: 0,
|
|
12958
12983
|
class: "lupa-facet-content",
|
|
12959
12984
|
"data-cy": "lupa-facet-content"
|
|
12960
12985
|
};
|
|
12961
12986
|
const __default__$1 = {
|
|
12962
12987
|
components: {
|
|
12963
|
-
TermFacet: _sfc_main$
|
|
12964
|
-
StatsFacet: _sfc_main$
|
|
12965
|
-
HierarchyFacet: _sfc_main$
|
|
12988
|
+
TermFacet: _sfc_main$N,
|
|
12989
|
+
StatsFacet: _sfc_main$M,
|
|
12990
|
+
HierarchyFacet: _sfc_main$K
|
|
12966
12991
|
}
|
|
12967
12992
|
};
|
|
12968
|
-
const _sfc_main$
|
|
12993
|
+
const _sfc_main$J = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
|
|
12969
12994
|
__name: "FacetDisplay",
|
|
12970
12995
|
props: {
|
|
12971
12996
|
options: {},
|
|
@@ -13077,12 +13102,12 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
13077
13102
|
"data-cy": "lupa-search-result-facet-label",
|
|
13078
13103
|
onClick: toggleFacet
|
|
13079
13104
|
}, [
|
|
13080
|
-
createBaseVNode("div", _hoisted_1$
|
|
13105
|
+
createBaseVNode("div", _hoisted_1$G, toDisplayString(facet.value.label), 1),
|
|
13081
13106
|
createBaseVNode("div", {
|
|
13082
13107
|
class: normalizeClass(["lupa-facet-label-caret", isOpen.value && "open"])
|
|
13083
13108
|
}, null, 2)
|
|
13084
13109
|
], 2),
|
|
13085
|
-
isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
13110
|
+
isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$u, [
|
|
13086
13111
|
(openBlock(), createBlock(resolveDynamicComponent(facetType.value), {
|
|
13087
13112
|
facet: facet.value,
|
|
13088
13113
|
currentFilters: currentFilters.value[facet.value.key],
|
|
@@ -13100,12 +13125,12 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
13100
13125
|
};
|
|
13101
13126
|
}
|
|
13102
13127
|
}));
|
|
13103
|
-
const _hoisted_1$
|
|
13104
|
-
const _hoisted_2$
|
|
13128
|
+
const _hoisted_1$F = { class: "lupa-search-result-facet-section" };
|
|
13129
|
+
const _hoisted_2$t = {
|
|
13105
13130
|
key: 0,
|
|
13106
13131
|
class: "lupa-facets-title"
|
|
13107
13132
|
};
|
|
13108
|
-
const _sfc_main$
|
|
13133
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
13109
13134
|
__name: "FacetList",
|
|
13110
13135
|
props: {
|
|
13111
13136
|
options: {},
|
|
@@ -13139,14 +13164,14 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
13139
13164
|
};
|
|
13140
13165
|
return (_ctx, _cache) => {
|
|
13141
13166
|
var _a;
|
|
13142
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
13143
|
-
_ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
13167
|
+
return openBlock(), createElementBlock("div", _hoisted_1$F, [
|
|
13168
|
+
_ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$t, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
|
|
13144
13169
|
createBaseVNode("div", {
|
|
13145
13170
|
class: normalizeClass(["lupa-search-result-facet-list", "lupa-" + ((_a = _ctx.facetStyle) != null ? _a : "")])
|
|
13146
13171
|
}, [
|
|
13147
13172
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayFacets.value, (facet) => {
|
|
13148
13173
|
var _a2;
|
|
13149
|
-
return openBlock(), createBlock(_sfc_main$
|
|
13174
|
+
return openBlock(), createBlock(_sfc_main$J, {
|
|
13150
13175
|
key: facet.key,
|
|
13151
13176
|
facet,
|
|
13152
13177
|
currentFilters: currentFiltersValue.value,
|
|
@@ -13161,7 +13186,33 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
13161
13186
|
};
|
|
13162
13187
|
}
|
|
13163
13188
|
});
|
|
13189
|
+
const _hoisted_1$E = ["onClick"];
|
|
13190
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
13191
|
+
__name: "FacetsButton",
|
|
13192
|
+
props: {
|
|
13193
|
+
options: {}
|
|
13194
|
+
},
|
|
13195
|
+
emits: ["filter"],
|
|
13196
|
+
setup(__props, { emit: emit2 }) {
|
|
13197
|
+
const props = __props;
|
|
13198
|
+
const label = computed(() => {
|
|
13199
|
+
var _a, _b;
|
|
13200
|
+
return (_b = (_a = props.options.labels) == null ? void 0 : _a.facetFilterButton) != null ? _b : "";
|
|
13201
|
+
});
|
|
13202
|
+
const handleClick = () => {
|
|
13203
|
+
emit2("filter");
|
|
13204
|
+
};
|
|
13205
|
+
return (_ctx, _cache) => {
|
|
13206
|
+
return label.value ? (openBlock(), createElementBlock("button", {
|
|
13207
|
+
key: 0,
|
|
13208
|
+
class: "lupa-facets-button-filter",
|
|
13209
|
+
onClick: withModifiers(handleClick, ["stop"])
|
|
13210
|
+
}, toDisplayString(label.value), 9, _hoisted_1$E)) : createCommentVNode("", true);
|
|
13211
|
+
};
|
|
13212
|
+
}
|
|
13213
|
+
});
|
|
13164
13214
|
const _hoisted_1$D = { class: "lupa-search-result-facets" };
|
|
13215
|
+
const _hoisted_2$s = { class: "lupa-facets-filter-button-wrapper" };
|
|
13165
13216
|
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
13166
13217
|
__name: "Facets",
|
|
13167
13218
|
props: {
|
|
@@ -13169,7 +13220,8 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
13169
13220
|
facetStyle: {},
|
|
13170
13221
|
clearable: { type: Boolean }
|
|
13171
13222
|
},
|
|
13172
|
-
|
|
13223
|
+
emits: ["filter"],
|
|
13224
|
+
setup(__props, { emit: emit2 }) {
|
|
13173
13225
|
const props = __props;
|
|
13174
13226
|
const paramStore = useParamsStore();
|
|
13175
13227
|
const searchResultStore = useSearchResultStore();
|
|
@@ -13199,6 +13251,9 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
13199
13251
|
timeout: (_f = (_e = searchResultOptions.value.scrollToResults) == null ? void 0 : _e.timeout) != null ? _f : 500
|
|
13200
13252
|
};
|
|
13201
13253
|
});
|
|
13254
|
+
const showFilterButton = computed(() => {
|
|
13255
|
+
return props.options.filterBehavior === "withFilterButton";
|
|
13256
|
+
});
|
|
13202
13257
|
const handleFacetSelect = (facetAction) => {
|
|
13203
13258
|
switch (facetAction.type) {
|
|
13204
13259
|
case "terms":
|
|
@@ -13237,9 +13292,12 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
13237
13292
|
const param = getFacetKey(facet.key, facet.type);
|
|
13238
13293
|
paramStore.removeParameters({ paramsToRemove: [param] });
|
|
13239
13294
|
};
|
|
13295
|
+
const filter = () => {
|
|
13296
|
+
emit2("filter");
|
|
13297
|
+
};
|
|
13240
13298
|
return (_ctx, _cache) => {
|
|
13241
13299
|
return openBlock(), createElementBlock("div", _hoisted_1$D, [
|
|
13242
|
-
regularFacets.value ? (openBlock(), createBlock(_sfc_main$
|
|
13300
|
+
regularFacets.value ? (openBlock(), createBlock(_sfc_main$I, {
|
|
13243
13301
|
key: 0,
|
|
13244
13302
|
options: _ctx.options,
|
|
13245
13303
|
facets: regularFacets.value,
|
|
@@ -13248,7 +13306,14 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
13248
13306
|
clearable: _ctx.clearable,
|
|
13249
13307
|
onSelect: handleFacetSelect,
|
|
13250
13308
|
onClear: clear2
|
|
13251
|
-
}, null, 8, ["options", "facets", "currentFilters", "facetStyle", "clearable"])) : createCommentVNode("", true)
|
|
13309
|
+
}, null, 8, ["options", "facets", "currentFilters", "facetStyle", "clearable"])) : createCommentVNode("", true),
|
|
13310
|
+
createBaseVNode("div", _hoisted_2$s, [
|
|
13311
|
+
showFilterButton.value ? (openBlock(), createBlock(_sfc_main$H, {
|
|
13312
|
+
key: 0,
|
|
13313
|
+
options: _ctx.options,
|
|
13314
|
+
onFilter: filter
|
|
13315
|
+
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
13316
|
+
])
|
|
13252
13317
|
]);
|
|
13253
13318
|
};
|
|
13254
13319
|
}
|
|
@@ -13263,7 +13328,8 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
13263
13328
|
options: {},
|
|
13264
13329
|
expandable: { type: Boolean }
|
|
13265
13330
|
},
|
|
13266
|
-
|
|
13331
|
+
emits: ["filter"],
|
|
13332
|
+
setup(__props, { expose: __expose, emit: emit2 }) {
|
|
13267
13333
|
const props = __props;
|
|
13268
13334
|
const categoryFilters = ref(null);
|
|
13269
13335
|
const desktopFiltersVisible = computed(() => {
|
|
@@ -13277,6 +13343,9 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
13277
13343
|
const showCurrentFilters = computed(() => {
|
|
13278
13344
|
return currentFiltersVisible.value ? Boolean(props.options.facets) : false;
|
|
13279
13345
|
});
|
|
13346
|
+
const filter = () => {
|
|
13347
|
+
emit2("filter");
|
|
13348
|
+
};
|
|
13280
13349
|
const fetch2 = () => {
|
|
13281
13350
|
var _a;
|
|
13282
13351
|
if (categoryFilters.value) {
|
|
@@ -13287,12 +13356,12 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
13287
13356
|
return (_ctx, _cache) => {
|
|
13288
13357
|
var _a;
|
|
13289
13358
|
return openBlock(), createElementBlock("div", _hoisted_1$C, [
|
|
13290
|
-
showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$
|
|
13359
|
+
showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$Q, {
|
|
13291
13360
|
key: 0,
|
|
13292
13361
|
options: _ctx.options.currentFilters,
|
|
13293
13362
|
expandable: (_a = _ctx.expandable) != null ? _a : false
|
|
13294
13363
|
}, null, 8, ["options", "expandable"])) : createCommentVNode("", true),
|
|
13295
|
-
_ctx.options.categories ? (openBlock(), createBlock(_sfc_main$
|
|
13364
|
+
_ctx.options.categories ? (openBlock(), createBlock(_sfc_main$O, {
|
|
13296
13365
|
key: 1,
|
|
13297
13366
|
options: _ctx.options.categories,
|
|
13298
13367
|
ref_key: "categoryFilters",
|
|
@@ -13300,7 +13369,8 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
13300
13369
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
13301
13370
|
_ctx.options.facets ? (openBlock(), createBlock(_sfc_main$G, {
|
|
13302
13371
|
key: 2,
|
|
13303
|
-
options: _ctx.options.facets
|
|
13372
|
+
options: _ctx.options.facets,
|
|
13373
|
+
onFilter: filter
|
|
13304
13374
|
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
13305
13375
|
]);
|
|
13306
13376
|
};
|
|
@@ -13324,7 +13394,8 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
13324
13394
|
props: {
|
|
13325
13395
|
options: {}
|
|
13326
13396
|
},
|
|
13327
|
-
|
|
13397
|
+
emits: ["filter"],
|
|
13398
|
+
setup(__props, { emit: emit2 }) {
|
|
13328
13399
|
const props = __props;
|
|
13329
13400
|
const searchResultStore = useSearchResultStore();
|
|
13330
13401
|
const { currentFilterCount } = storeToRefs(searchResultStore);
|
|
@@ -13344,6 +13415,10 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
13344
13415
|
const handleMobileToggle = () => {
|
|
13345
13416
|
searchResultStore.setSidebarState({ visible: false });
|
|
13346
13417
|
};
|
|
13418
|
+
const filter = () => {
|
|
13419
|
+
emit2("filter");
|
|
13420
|
+
handleMobileToggle();
|
|
13421
|
+
};
|
|
13347
13422
|
return (_ctx, _cache) => {
|
|
13348
13423
|
return isMobileSidebarVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$B, [
|
|
13349
13424
|
createBaseVNode("div", {
|
|
@@ -13364,7 +13439,8 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
13364
13439
|
createBaseVNode("div", _hoisted_7$4, [
|
|
13365
13440
|
createVNode(_sfc_main$F, {
|
|
13366
13441
|
options: _ctx.options,
|
|
13367
|
-
expandable: isActiveFiltersExpanded.value
|
|
13442
|
+
expandable: isActiveFiltersExpanded.value,
|
|
13443
|
+
onFilter: filter
|
|
13368
13444
|
}, null, 8, ["options", "expandable"])
|
|
13369
13445
|
])
|
|
13370
13446
|
])
|
|
@@ -13435,7 +13511,11 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
13435
13511
|
props: {
|
|
13436
13512
|
options: {}
|
|
13437
13513
|
},
|
|
13438
|
-
|
|
13514
|
+
emits: ["filter"],
|
|
13515
|
+
setup(__props, { emit: emit2 }) {
|
|
13516
|
+
const filter = () => {
|
|
13517
|
+
emit2("filter");
|
|
13518
|
+
};
|
|
13439
13519
|
return (_ctx, _cache) => {
|
|
13440
13520
|
var _a;
|
|
13441
13521
|
return openBlock(), createElementBlock("div", _hoisted_1$z, [
|
|
@@ -13443,7 +13523,8 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
13443
13523
|
key: 0,
|
|
13444
13524
|
options: _ctx.options.facets,
|
|
13445
13525
|
"facet-style": (_a = _ctx.options.facets.style) == null ? void 0 : _a.type,
|
|
13446
|
-
clearable: true
|
|
13526
|
+
clearable: true,
|
|
13527
|
+
onFilter: filter
|
|
13447
13528
|
}, null, 8, ["options", "facet-style"])) : createCommentVNode("", true)
|
|
13448
13529
|
]);
|
|
13449
13530
|
};
|
|
@@ -13880,7 +13961,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
13880
13961
|
}, [
|
|
13881
13962
|
createBaseVNode("div", _hoisted_1$t, [
|
|
13882
13963
|
showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$B, { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_2$m)),
|
|
13883
|
-
showItemSummary.value ? (openBlock(), createBlock(_sfc_main$
|
|
13964
|
+
showItemSummary.value ? (openBlock(), createBlock(_sfc_main$T, {
|
|
13884
13965
|
key: 2,
|
|
13885
13966
|
label: searchSummaryLabel.value,
|
|
13886
13967
|
clearable: unref(hasAnyFilter) && showFilterClear.value,
|
|
@@ -13921,7 +14002,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
13921
14002
|
},
|
|
13922
14003
|
setup(__props) {
|
|
13923
14004
|
return (_ctx, _cache) => {
|
|
13924
|
-
return openBlock(), createBlock(_sfc_main$
|
|
14005
|
+
return openBlock(), createBlock(_sfc_main$1e, {
|
|
13925
14006
|
item: _ctx.item,
|
|
13926
14007
|
options: _ctx.options,
|
|
13927
14008
|
"wrapper-class": "lupa-search-results-image-wrapper",
|
|
@@ -14252,7 +14333,8 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
14252
14333
|
item: {},
|
|
14253
14334
|
options: {}
|
|
14254
14335
|
},
|
|
14255
|
-
|
|
14336
|
+
emits: ["productEvent"],
|
|
14337
|
+
setup(__props, { emit: emit2 }) {
|
|
14256
14338
|
const props = __props;
|
|
14257
14339
|
const text = computed(() => {
|
|
14258
14340
|
return props.options.html(props.item);
|
|
@@ -14264,6 +14346,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
14264
14346
|
if (!props.options.action) {
|
|
14265
14347
|
return;
|
|
14266
14348
|
}
|
|
14349
|
+
if (props.options.reportEventOnClick) {
|
|
14350
|
+
emit2("productEvent", { type: props.options.reportEventOnClick });
|
|
14351
|
+
}
|
|
14267
14352
|
yield props.options.action(props.item);
|
|
14268
14353
|
});
|
|
14269
14354
|
return (_ctx, _cache) => {
|
|
@@ -14559,7 +14644,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
14559
14644
|
"data-cy": "lupa-search-result-product-card",
|
|
14560
14645
|
class: ["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]
|
|
14561
14646
|
}, customDocumentHtmlAttributes.value, { onClick: handleClick }), [
|
|
14562
|
-
createVNode(_sfc_main
|
|
14647
|
+
createVNode(_sfc_main$$, { options: badgesOptions.value }, null, 8, ["options"]),
|
|
14563
14648
|
createBaseVNode("div", {
|
|
14564
14649
|
class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
|
|
14565
14650
|
}, [
|
|
@@ -14576,10 +14661,11 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
14576
14661
|
key: element.key,
|
|
14577
14662
|
labels: labels.value,
|
|
14578
14663
|
inStock: isInStock.value,
|
|
14579
|
-
link: link.value
|
|
14664
|
+
link: link.value,
|
|
14665
|
+
onProductEvent: handleProductEvent
|
|
14580
14666
|
}, null, 8, ["item", "element", "labels", "inStock", "link"]);
|
|
14581
14667
|
}), 128)),
|
|
14582
|
-
createVNode(_sfc_main
|
|
14668
|
+
createVNode(_sfc_main$$, {
|
|
14583
14669
|
options: badgesOptions.value,
|
|
14584
14670
|
position: "image",
|
|
14585
14671
|
class: "lupa-image-badges"
|
|
@@ -14922,7 +15008,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
14922
15008
|
options: {},
|
|
14923
15009
|
ssr: { type: Boolean }
|
|
14924
15010
|
},
|
|
14925
|
-
|
|
15011
|
+
emits: ["filter"],
|
|
15012
|
+
setup(__props, { emit: emit2 }) {
|
|
14926
15013
|
const props = __props;
|
|
14927
15014
|
const searchResultStore = useSearchResultStore();
|
|
14928
15015
|
const paramStore = useParamsStore();
|
|
@@ -15013,6 +15100,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
15013
15100
|
params: [{ name: optionStore.getQueryParamName(QUERY_PARAMS$1.PAGE), value: "1" }]
|
|
15014
15101
|
});
|
|
15015
15102
|
};
|
|
15103
|
+
const filter = () => {
|
|
15104
|
+
emit2("filter");
|
|
15105
|
+
};
|
|
15016
15106
|
return (_ctx, _cache) => {
|
|
15017
15107
|
var _a;
|
|
15018
15108
|
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
@@ -15029,9 +15119,10 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
15029
15119
|
key: 1,
|
|
15030
15120
|
class: "lupa-toolbar-mobile",
|
|
15031
15121
|
options: _ctx.options,
|
|
15032
|
-
"pagination-location": "top"
|
|
15122
|
+
"pagination-location": "top",
|
|
15123
|
+
onFilter: filter
|
|
15033
15124
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
15034
|
-
currentFilterOptions.value ? (openBlock(), createBlock(_sfc_main$
|
|
15125
|
+
currentFilterOptions.value ? (openBlock(), createBlock(_sfc_main$Q, {
|
|
15035
15126
|
key: 2,
|
|
15036
15127
|
class: normalizeClass(currentFiltersClass.value),
|
|
15037
15128
|
"data-cy": "lupa-search-result-filters-mobile-toolbar",
|
|
@@ -15386,8 +15477,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
15386
15477
|
class: normalizeClass(["lupa-search-result-wrapper", { "lupa-search-wrapper-no-results": !unref(hasResults) }])
|
|
15387
15478
|
}, [
|
|
15388
15479
|
_ctx.isContainer ? (openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
15389
|
-
createVNode(_sfc_main$
|
|
15390
|
-
createVNode(_sfc_main$
|
|
15480
|
+
createVNode(_sfc_main$U, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
15481
|
+
createVNode(_sfc_main$S, {
|
|
15391
15482
|
"show-summary": true,
|
|
15392
15483
|
options: _ctx.options,
|
|
15393
15484
|
"is-product-list": (_a = _ctx.isProductList) != null ? _a : false
|
|
@@ -15399,7 +15490,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
15399
15490
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
15400
15491
|
_ctx.options.filters ? (openBlock(), createBlock(_sfc_main$E, {
|
|
15401
15492
|
key: 2,
|
|
15402
|
-
options: _ctx.options.filters
|
|
15493
|
+
options: _ctx.options.filters,
|
|
15494
|
+
onFilter: handleParamsChange
|
|
15403
15495
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
15404
15496
|
unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$D, {
|
|
15405
15497
|
key: 3,
|
|
@@ -15410,17 +15502,19 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
15410
15502
|
key: 0,
|
|
15411
15503
|
options: (_b = _ctx.options.filters) != null ? _b : {},
|
|
15412
15504
|
ref_key: "searchResultsFilters",
|
|
15413
|
-
ref: searchResultsFilters
|
|
15505
|
+
ref: searchResultsFilters,
|
|
15506
|
+
onFilter: handleParamsChange
|
|
15414
15507
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
15415
15508
|
createBaseVNode("div", _hoisted_3$4, [
|
|
15416
|
-
createVNode(_sfc_main$
|
|
15417
|
-
createVNode(_sfc_main$
|
|
15509
|
+
createVNode(_sfc_main$U, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
15510
|
+
createVNode(_sfc_main$S, {
|
|
15418
15511
|
options: _ctx.options,
|
|
15419
15512
|
"is-product-list": (_c = _ctx.isProductList) != null ? _c : false
|
|
15420
15513
|
}, null, 8, ["options", "is-product-list"]),
|
|
15421
15514
|
createVNode(_sfc_main$e, {
|
|
15422
15515
|
options: _ctx.options,
|
|
15423
|
-
ssr: ssrEnabled.value
|
|
15516
|
+
ssr: ssrEnabled.value,
|
|
15517
|
+
onFilter: handleParamsChange
|
|
15424
15518
|
}, {
|
|
15425
15519
|
append: withCtx(() => [
|
|
15426
15520
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -15429,8 +15523,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
15429
15523
|
}, 8, ["options", "ssr"])
|
|
15430
15524
|
])
|
|
15431
15525
|
])) : (openBlock(), createElementBlock(Fragment, { key: 5 }, [
|
|
15432
|
-
createVNode(_sfc_main$
|
|
15433
|
-
createVNode(_sfc_main$
|
|
15526
|
+
createVNode(_sfc_main$U, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
15527
|
+
createVNode(_sfc_main$S, {
|
|
15434
15528
|
options: _ctx.options,
|
|
15435
15529
|
"is-product-list": (_d = _ctx.isProductList) != null ? _d : false
|
|
15436
15530
|
}, null, 8, ["options", "is-product-list"]),
|
|
@@ -15439,11 +15533,13 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
15439
15533
|
key: 0,
|
|
15440
15534
|
options: (_e = _ctx.options.filters) != null ? _e : {},
|
|
15441
15535
|
ref_key: "searchResultsFilters",
|
|
15442
|
-
ref: searchResultsFilters
|
|
15536
|
+
ref: searchResultsFilters,
|
|
15537
|
+
onFilter: handleParamsChange
|
|
15443
15538
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
15444
15539
|
createVNode(_sfc_main$e, {
|
|
15445
15540
|
options: _ctx.options,
|
|
15446
|
-
ssr: ssrEnabled.value
|
|
15541
|
+
ssr: ssrEnabled.value,
|
|
15542
|
+
onFilter: handleParamsChange
|
|
15447
15543
|
}, createSlots({
|
|
15448
15544
|
append: withCtx(() => [
|
|
15449
15545
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -21065,7 +21161,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
21065
21161
|
onClick: withModifiers(innerClick, ["stop"])
|
|
21066
21162
|
}, [
|
|
21067
21163
|
createBaseVNode("div", _hoisted_2$7, [
|
|
21068
|
-
createVNode(_sfc_main$
|
|
21164
|
+
createVNode(_sfc_main$V, {
|
|
21069
21165
|
options: fullSearchBoxOptions.value,
|
|
21070
21166
|
"is-search-container": true,
|
|
21071
21167
|
ref_key: "searchBox",
|
|
@@ -22436,7 +22532,7 @@ const _hoisted_4 = {
|
|
|
22436
22532
|
class: "lupa-chat-spinner-main"
|
|
22437
22533
|
};
|
|
22438
22534
|
const _hoisted_5 = { class: "lupasearch-chat-input" };
|
|
22439
|
-
const _sfc_main$
|
|
22535
|
+
const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
22440
22536
|
__name: "ChatContainer",
|
|
22441
22537
|
props: {
|
|
22442
22538
|
options: {}
|
|
@@ -28077,7 +28173,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
28077
28173
|
};
|
|
28078
28174
|
__expose({ fetch: fetch2 });
|
|
28079
28175
|
return (_ctx, _cache) => {
|
|
28080
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
28176
|
+
return openBlock(), createBlock(unref(_sfc_main$V), {
|
|
28081
28177
|
options: fullSearchBoxOptions.value,
|
|
28082
28178
|
ref_key: "searchBox",
|
|
28083
28179
|
ref: searchBox2
|
|
@@ -28914,7 +29010,7 @@ const chat = (options, mountOptions) => {
|
|
|
28914
29010
|
}
|
|
28915
29011
|
return;
|
|
28916
29012
|
}
|
|
28917
|
-
const instance = createVue(options.displayOptions.containerSelector, _sfc_main$
|
|
29013
|
+
const instance = createVue(options.displayOptions.containerSelector, _sfc_main$1n, {
|
|
28918
29014
|
options
|
|
28919
29015
|
});
|
|
28920
29016
|
if (!instance) {
|