@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.js
CHANGED
|
@@ -7316,7 +7316,7 @@ const DEFAULT_OPTIONS_RESULTS$1 = {
|
|
|
7316
7316
|
top: false,
|
|
7317
7317
|
bottom: true
|
|
7318
7318
|
},
|
|
7319
|
-
sizes: [10, 20, 25
|
|
7319
|
+
sizes: [10, 20, 25]
|
|
7320
7320
|
},
|
|
7321
7321
|
pageSelection: {
|
|
7322
7322
|
position: {
|
|
@@ -7642,38 +7642,39 @@ const unfoldHierarchyFilter = (key, filter) => {
|
|
|
7642
7642
|
const seed = [];
|
|
7643
7643
|
return filter.terms.reduce((a, c2) => [...a, { key, value: c2, type: "hierarchy" }], seed);
|
|
7644
7644
|
};
|
|
7645
|
-
const unfoldRangeFilter = (key, filter) => {
|
|
7645
|
+
const unfoldRangeFilter = (key, filter, price = {}) => {
|
|
7646
|
+
var _a;
|
|
7646
7647
|
const gt = filter.gte || filter.gt;
|
|
7647
7648
|
const lt = filter.lte || filter.lt;
|
|
7648
|
-
if (key.includes(CURRENCY_KEY_INDICATOR)) {
|
|
7649
|
+
if (key.includes(CURRENCY_KEY_INDICATOR) || ((_a = price == null ? void 0 : price.keys) == null ? void 0 : _a.includes(key))) {
|
|
7649
7650
|
return [
|
|
7650
7651
|
{
|
|
7651
7652
|
key,
|
|
7652
|
-
value: formatPriceSummary([gt, lt]),
|
|
7653
|
+
value: formatPriceSummary([gt, lt], price.currency, price.separator),
|
|
7653
7654
|
type: "range"
|
|
7654
7655
|
}
|
|
7655
7656
|
];
|
|
7656
7657
|
}
|
|
7657
7658
|
return [{ key, value: `${gt} - ${lt}`, type: "range" }];
|
|
7658
7659
|
};
|
|
7659
|
-
const unfoldFilter = (key, filter) => {
|
|
7660
|
+
const unfoldFilter = (key, filter, price = {}) => {
|
|
7660
7661
|
if (Array.isArray(filter)) {
|
|
7661
7662
|
return unfoldTermFilter(key, filter);
|
|
7662
7663
|
}
|
|
7663
7664
|
if (filter.gte) {
|
|
7664
|
-
return unfoldRangeFilter(key, filter);
|
|
7665
|
+
return unfoldRangeFilter(key, filter, price);
|
|
7665
7666
|
}
|
|
7666
7667
|
if (filter.terms) {
|
|
7667
7668
|
return unfoldHierarchyFilter(key, filter);
|
|
7668
7669
|
}
|
|
7669
7670
|
return [];
|
|
7670
7671
|
};
|
|
7671
|
-
const unfoldFilters = (filters) => {
|
|
7672
|
+
const unfoldFilters = (filters, price = {}) => {
|
|
7672
7673
|
if (!filters) {
|
|
7673
7674
|
return [];
|
|
7674
7675
|
}
|
|
7675
7676
|
const seed = [];
|
|
7676
|
-
return Object.entries(filters).reduce((a, c2) => [...a, ...unfoldFilter(...c2)], seed);
|
|
7677
|
+
return Object.entries(filters).reduce((a, c2) => [...a, ...unfoldFilter(...c2, price)], seed);
|
|
7677
7678
|
};
|
|
7678
7679
|
const getLabeledFilters = (filters, facets) => {
|
|
7679
7680
|
return filters.map((f2) => {
|
|
@@ -8445,8 +8446,8 @@ const useSearchBoxStore = defineStore("searchBox", () => {
|
|
|
8445
8446
|
resetHighlightIndex
|
|
8446
8447
|
};
|
|
8447
8448
|
});
|
|
8448
|
-
const _hoisted_1$
|
|
8449
|
-
const _hoisted_2$
|
|
8449
|
+
const _hoisted_1$1e = { id: "lupa-search-box-input-container" };
|
|
8450
|
+
const _hoisted_2$Q = { class: "lupa-input-clear" };
|
|
8450
8451
|
const _hoisted_3$A = { id: "lupa-search-box-input" };
|
|
8451
8452
|
const _hoisted_4$s = ["value"];
|
|
8452
8453
|
const _hoisted_5$h = ["aria-label", "placeholder"];
|
|
@@ -8454,7 +8455,7 @@ const _hoisted_6$9 = {
|
|
|
8454
8455
|
key: 0,
|
|
8455
8456
|
class: "lupa-close-label"
|
|
8456
8457
|
};
|
|
8457
|
-
const _sfc_main$
|
|
8458
|
+
const _sfc_main$1m = /* @__PURE__ */ defineComponent({
|
|
8458
8459
|
__name: "SearchBoxInput",
|
|
8459
8460
|
props: {
|
|
8460
8461
|
options: {},
|
|
@@ -8535,8 +8536,8 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
8535
8536
|
};
|
|
8536
8537
|
__expose({ focus });
|
|
8537
8538
|
return (_ctx, _cache) => {
|
|
8538
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8539
|
-
createBaseVNode("div", _hoisted_2$
|
|
8539
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1e, [
|
|
8540
|
+
createBaseVNode("div", _hoisted_2$Q, [
|
|
8540
8541
|
createBaseVNode("div", {
|
|
8541
8542
|
class: normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
|
|
8542
8543
|
onClick: clear2
|
|
@@ -8577,7 +8578,7 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
8577
8578
|
};
|
|
8578
8579
|
}
|
|
8579
8580
|
});
|
|
8580
|
-
const _sfc_main$
|
|
8581
|
+
const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
8581
8582
|
__name: "SearchBoxMoreResults",
|
|
8582
8583
|
props: {
|
|
8583
8584
|
labels: {},
|
|
@@ -8609,9 +8610,9 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
8609
8610
|
};
|
|
8610
8611
|
}
|
|
8611
8612
|
});
|
|
8612
|
-
const _hoisted_1$
|
|
8613
|
-
const _hoisted_2$
|
|
8614
|
-
const _sfc_main$
|
|
8613
|
+
const _hoisted_1$1d = { class: "lupa-search-box-history-item" };
|
|
8614
|
+
const _hoisted_2$P = { class: "lupa-search-box-history-item-content" };
|
|
8615
|
+
const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
8615
8616
|
__name: "SearchBoxHistoryItem",
|
|
8616
8617
|
props: {
|
|
8617
8618
|
item: {},
|
|
@@ -8627,8 +8628,8 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
8627
8628
|
emit2("click", { query: props.item });
|
|
8628
8629
|
};
|
|
8629
8630
|
return (_ctx, _cache) => {
|
|
8630
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8631
|
-
createBaseVNode("div", _hoisted_2$
|
|
8631
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1d, [
|
|
8632
|
+
createBaseVNode("div", _hoisted_2$P, [
|
|
8632
8633
|
createBaseVNode("div", {
|
|
8633
8634
|
class: normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
|
|
8634
8635
|
onClick: click2
|
|
@@ -8642,11 +8643,11 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
8642
8643
|
};
|
|
8643
8644
|
}
|
|
8644
8645
|
});
|
|
8645
|
-
const _hoisted_1$
|
|
8646
|
+
const _hoisted_1$1c = {
|
|
8646
8647
|
key: 0,
|
|
8647
8648
|
class: "lupa-search-box-history-panel"
|
|
8648
8649
|
};
|
|
8649
|
-
const _sfc_main$
|
|
8650
|
+
const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
8650
8651
|
__name: "SearchBoxHistoryPanel",
|
|
8651
8652
|
props: {
|
|
8652
8653
|
options: {}
|
|
@@ -8687,9 +8688,9 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
8687
8688
|
}
|
|
8688
8689
|
};
|
|
8689
8690
|
return (_ctx, _cache) => {
|
|
8690
|
-
return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
8691
|
+
return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1c, [
|
|
8691
8692
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(history), (item, index) => {
|
|
8692
|
-
return openBlock(), createBlock(_sfc_main$
|
|
8693
|
+
return openBlock(), createBlock(_sfc_main$1k, {
|
|
8693
8694
|
key: item,
|
|
8694
8695
|
item,
|
|
8695
8696
|
highlighted: index === highlightIndex.value,
|
|
@@ -8705,20 +8706,20 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
8705
8706
|
};
|
|
8706
8707
|
}
|
|
8707
8708
|
});
|
|
8708
|
-
const _hoisted_1$
|
|
8709
|
-
const _sfc_main$
|
|
8709
|
+
const _hoisted_1$1b = { class: "lupa-search-box-no-results" };
|
|
8710
|
+
const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
8710
8711
|
__name: "SearchBoxNoResults",
|
|
8711
8712
|
props: {
|
|
8712
8713
|
labels: {}
|
|
8713
8714
|
},
|
|
8714
8715
|
setup(__props) {
|
|
8715
8716
|
return (_ctx, _cache) => {
|
|
8716
|
-
return openBlock(), createElementBlock("p", _hoisted_1$
|
|
8717
|
+
return openBlock(), createElementBlock("p", _hoisted_1$1b, toDisplayString(_ctx.labels.noResults), 1);
|
|
8717
8718
|
};
|
|
8718
8719
|
}
|
|
8719
8720
|
});
|
|
8720
|
-
const _hoisted_1$
|
|
8721
|
-
const _hoisted_2$
|
|
8721
|
+
const _hoisted_1$1a = ["innerHTML"];
|
|
8722
|
+
const _hoisted_2$O = {
|
|
8722
8723
|
key: 1,
|
|
8723
8724
|
"data-cy": "lupa-suggestion-value",
|
|
8724
8725
|
class: "lupa-suggestion-value"
|
|
@@ -8736,7 +8737,7 @@ const _hoisted_5$g = {
|
|
|
8736
8737
|
class: "lupa-suggestion-facet-value",
|
|
8737
8738
|
"data-cy": "lupa-suggestion-facet-value"
|
|
8738
8739
|
};
|
|
8739
|
-
const _sfc_main$
|
|
8740
|
+
const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
8740
8741
|
__name: "SearchBoxSuggestion",
|
|
8741
8742
|
props: {
|
|
8742
8743
|
suggestion: {},
|
|
@@ -8772,7 +8773,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
8772
8773
|
class: "lupa-suggestion-value",
|
|
8773
8774
|
"data-cy": "lupa-suggestion-value",
|
|
8774
8775
|
innerHTML: _ctx.suggestion.displayHighlight
|
|
8775
|
-
}, null, 8, _hoisted_1$
|
|
8776
|
+
}, null, 8, _hoisted_1$1a)) : (openBlock(), createElementBlock("div", _hoisted_2$O, toDisplayString(_ctx.suggestion.display), 1)),
|
|
8776
8777
|
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$z, [
|
|
8777
8778
|
createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
|
|
8778
8779
|
createBaseVNode("span", _hoisted_5$g, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
@@ -8781,11 +8782,11 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
8781
8782
|
};
|
|
8782
8783
|
}
|
|
8783
8784
|
});
|
|
8784
|
-
const _hoisted_1$
|
|
8785
|
+
const _hoisted_1$19 = {
|
|
8785
8786
|
id: "lupa-search-box-suggestions",
|
|
8786
8787
|
"data-cy": "lupa-search-box-suggestions"
|
|
8787
8788
|
};
|
|
8788
|
-
const _sfc_main$
|
|
8789
|
+
const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
8789
8790
|
__name: "SearchBoxSuggestions",
|
|
8790
8791
|
props: {
|
|
8791
8792
|
items: {},
|
|
@@ -8845,9 +8846,9 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
8845
8846
|
});
|
|
8846
8847
|
});
|
|
8847
8848
|
return (_ctx, _cache) => {
|
|
8848
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8849
|
+
return openBlock(), createElementBlock("div", _hoisted_1$19, [
|
|
8849
8850
|
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
|
|
8850
|
-
return openBlock(), createBlock(_sfc_main$
|
|
8851
|
+
return openBlock(), createBlock(_sfc_main$1h, {
|
|
8851
8852
|
key: getSuggestionKey(item),
|
|
8852
8853
|
class: normalizeClass(["lupa-suggestion", index === highlightedIndex.value ? "lupa-suggestion-highlighted" : ""]),
|
|
8853
8854
|
suggestion: item,
|
|
@@ -8875,7 +8876,7 @@ const debounce$1 = (func, timeout) => {
|
|
|
8875
8876
|
}, timeout);
|
|
8876
8877
|
};
|
|
8877
8878
|
};
|
|
8878
|
-
const _sfc_main$
|
|
8879
|
+
const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
8879
8880
|
__name: "SearchBoxSuggestionsWrapper",
|
|
8880
8881
|
props: {
|
|
8881
8882
|
panel: {},
|
|
@@ -8916,7 +8917,7 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
|
8916
8917
|
};
|
|
8917
8918
|
const getSuggestionsDebounced = debounce$1(getSuggestions, props.debounce);
|
|
8918
8919
|
return (_ctx, _cache) => {
|
|
8919
|
-
return openBlock(), createBlock(_sfc_main$
|
|
8920
|
+
return openBlock(), createBlock(_sfc_main$1g, {
|
|
8920
8921
|
items: searchResult.value,
|
|
8921
8922
|
highlight: _ctx.panel.highlight,
|
|
8922
8923
|
queryKey: _ctx.panel.queryKey,
|
|
@@ -9019,8 +9020,8 @@ const replaceImageWithPlaceholder = (e, placeholder) => {
|
|
|
9019
9020
|
targetImage.src = placeholder;
|
|
9020
9021
|
}
|
|
9021
9022
|
};
|
|
9022
|
-
const _hoisted_1$
|
|
9023
|
-
const _sfc_main$
|
|
9023
|
+
const _hoisted_1$18 = ["src"];
|
|
9024
|
+
const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
9024
9025
|
__name: "ProductImage",
|
|
9025
9026
|
props: {
|
|
9026
9027
|
item: {},
|
|
@@ -9138,7 +9139,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
9138
9139
|
}, { alt: imageAlt.value ? imageAlt.value : void 0 }, {
|
|
9139
9140
|
onError: replaceWithPlaceholder,
|
|
9140
9141
|
key: finalUrl.value
|
|
9141
|
-
}), null, 16, _hoisted_1$
|
|
9142
|
+
}), null, 16, _hoisted_1$18))
|
|
9142
9143
|
]),
|
|
9143
9144
|
_: 1
|
|
9144
9145
|
})
|
|
@@ -9146,7 +9147,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
9146
9147
|
};
|
|
9147
9148
|
}
|
|
9148
9149
|
});
|
|
9149
|
-
const _sfc_main$
|
|
9150
|
+
const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
9150
9151
|
__name: "SearchBoxProductImage",
|
|
9151
9152
|
props: {
|
|
9152
9153
|
item: {},
|
|
@@ -9154,7 +9155,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
9154
9155
|
},
|
|
9155
9156
|
setup(__props) {
|
|
9156
9157
|
return (_ctx, _cache) => {
|
|
9157
|
-
return openBlock(), createBlock(_sfc_main$
|
|
9158
|
+
return openBlock(), createBlock(_sfc_main$1e, {
|
|
9158
9159
|
item: _ctx.item,
|
|
9159
9160
|
options: _ctx.options,
|
|
9160
9161
|
"wrapper-class": "lupa-search-box-image-wrapper",
|
|
@@ -9163,12 +9164,12 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
9163
9164
|
};
|
|
9164
9165
|
}
|
|
9165
9166
|
});
|
|
9166
|
-
const _hoisted_1$
|
|
9167
|
-
const _hoisted_2$
|
|
9167
|
+
const _hoisted_1$17 = ["innerHTML"];
|
|
9168
|
+
const _hoisted_2$N = {
|
|
9168
9169
|
key: 1,
|
|
9169
9170
|
class: "lupa-search-box-product-title"
|
|
9170
9171
|
};
|
|
9171
|
-
const _sfc_main$
|
|
9172
|
+
const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
9172
9173
|
__name: "SearchBoxProductTitle",
|
|
9173
9174
|
props: {
|
|
9174
9175
|
item: {},
|
|
@@ -9188,18 +9189,18 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
9188
9189
|
key: 0,
|
|
9189
9190
|
class: "lupa-search-box-product-title",
|
|
9190
9191
|
innerHTML: title.value
|
|
9191
|
-
}, null, 8, _hoisted_1$
|
|
9192
|
+
}, null, 8, _hoisted_1$17)) : (openBlock(), createElementBlock("div", _hoisted_2$N, [
|
|
9192
9193
|
createBaseVNode("strong", null, toDisplayString(title.value), 1)
|
|
9193
9194
|
]));
|
|
9194
9195
|
};
|
|
9195
9196
|
}
|
|
9196
9197
|
});
|
|
9197
|
-
const _hoisted_1$
|
|
9198
|
-
const _hoisted_2$
|
|
9198
|
+
const _hoisted_1$16 = ["innerHTML"];
|
|
9199
|
+
const _hoisted_2$M = {
|
|
9199
9200
|
key: 1,
|
|
9200
9201
|
class: "lupa-search-box-product-description"
|
|
9201
9202
|
};
|
|
9202
|
-
const _sfc_main$
|
|
9203
|
+
const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
9203
9204
|
__name: "SearchBoxProductDescription",
|
|
9204
9205
|
props: {
|
|
9205
9206
|
item: {},
|
|
@@ -9219,12 +9220,12 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
|
9219
9220
|
key: 0,
|
|
9220
9221
|
class: "lupa-search-box-product-description",
|
|
9221
9222
|
innerHTML: description.value
|
|
9222
|
-
}, null, 8, _hoisted_1$
|
|
9223
|
+
}, null, 8, _hoisted_1$16)) : (openBlock(), createElementBlock("div", _hoisted_2$M, toDisplayString(description.value), 1));
|
|
9223
9224
|
};
|
|
9224
9225
|
}
|
|
9225
9226
|
});
|
|
9226
|
-
const _hoisted_1$
|
|
9227
|
-
const _sfc_main$
|
|
9227
|
+
const _hoisted_1$15 = { class: "lupa-search-box-product-price" };
|
|
9228
|
+
const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
9228
9229
|
__name: "SearchBoxProductPrice",
|
|
9229
9230
|
props: {
|
|
9230
9231
|
item: {},
|
|
@@ -9242,14 +9243,14 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
9242
9243
|
);
|
|
9243
9244
|
});
|
|
9244
9245
|
return (_ctx, _cache) => {
|
|
9245
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9246
|
+
return openBlock(), createElementBlock("div", _hoisted_1$15, [
|
|
9246
9247
|
createBaseVNode("strong", null, toDisplayString(price.value), 1)
|
|
9247
9248
|
]);
|
|
9248
9249
|
};
|
|
9249
9250
|
}
|
|
9250
9251
|
});
|
|
9251
|
-
const _hoisted_1$
|
|
9252
|
-
const _sfc_main$
|
|
9252
|
+
const _hoisted_1$14 = { class: "lupa-search-box-product-regular-price" };
|
|
9253
|
+
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
9253
9254
|
__name: "SearchBoxProductRegularPrice",
|
|
9254
9255
|
props: {
|
|
9255
9256
|
item: {},
|
|
@@ -9267,16 +9268,16 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
9267
9268
|
);
|
|
9268
9269
|
});
|
|
9269
9270
|
return (_ctx, _cache) => {
|
|
9270
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9271
|
+
return openBlock(), createElementBlock("div", _hoisted_1$14, toDisplayString(price.value), 1);
|
|
9271
9272
|
};
|
|
9272
9273
|
}
|
|
9273
9274
|
});
|
|
9274
|
-
const _hoisted_1$
|
|
9275
|
-
const _hoisted_2$
|
|
9275
|
+
const _hoisted_1$13 = ["innerHTML"];
|
|
9276
|
+
const _hoisted_2$L = { key: 0 };
|
|
9276
9277
|
const _hoisted_3$y = { key: 1 };
|
|
9277
9278
|
const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
|
|
9278
9279
|
const _hoisted_5$f = { class: "lupa-search-box-custom-text" };
|
|
9279
|
-
const _sfc_main$
|
|
9280
|
+
const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
9280
9281
|
__name: "SearchBoxProductCustom",
|
|
9281
9282
|
props: {
|
|
9282
9283
|
item: {},
|
|
@@ -9302,11 +9303,11 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
9302
9303
|
key: 0,
|
|
9303
9304
|
class: [className.value, "lupa-search-box-product-custom"],
|
|
9304
9305
|
innerHTML: text.value
|
|
9305
|
-
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$
|
|
9306
|
+
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$13)) : (openBlock(), createElementBlock("div", mergeProps({
|
|
9306
9307
|
key: 1,
|
|
9307
9308
|
class: [className.value, "lupa-search-box-product-custom"]
|
|
9308
9309
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
9309
|
-
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
9310
|
+
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$L, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$y, [
|
|
9310
9311
|
createBaseVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
|
|
9311
9312
|
createBaseVNode("div", _hoisted_5$f, toDisplayString(text.value), 1)
|
|
9312
9313
|
]))
|
|
@@ -9314,8 +9315,8 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
9314
9315
|
};
|
|
9315
9316
|
}
|
|
9316
9317
|
});
|
|
9317
|
-
const _hoisted_1$
|
|
9318
|
-
const _sfc_main$
|
|
9318
|
+
const _hoisted_1$12 = ["innerHTML"];
|
|
9319
|
+
const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
9319
9320
|
__name: "SearchBoxProductCustomHtml",
|
|
9320
9321
|
props: {
|
|
9321
9322
|
item: {},
|
|
@@ -9335,7 +9336,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
9335
9336
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
9336
9337
|
class: className.value,
|
|
9337
9338
|
innerHTML: text.value
|
|
9338
|
-
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$
|
|
9339
|
+
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$12);
|
|
9339
9340
|
};
|
|
9340
9341
|
}
|
|
9341
9342
|
});
|
|
@@ -9393,13 +9394,33 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
9393
9394
|
const isMobileSidebarVisible = ref(false);
|
|
9394
9395
|
const optionsStore = useOptionsStore();
|
|
9395
9396
|
const paramsStore = useParamsStore();
|
|
9397
|
+
const { searchResultOptions } = storeToRefs(optionsStore);
|
|
9396
9398
|
const facets = computed(() => searchResult.value.facets);
|
|
9397
9399
|
const filters = computed(() => searchResult.value.filters);
|
|
9398
9400
|
const currentQueryText = computed(() => searchResult.value.searchText);
|
|
9399
9401
|
const totalItems = computed(() => searchResult.value.total);
|
|
9400
9402
|
const hasResults = computed(() => totalItems.value > 0);
|
|
9403
|
+
const priceKeys = computed(() => {
|
|
9404
|
+
var _a, _b;
|
|
9405
|
+
return (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.priceKeys) != null ? _b : [];
|
|
9406
|
+
});
|
|
9407
|
+
const currency = computed(() => {
|
|
9408
|
+
var _a, _b, _c;
|
|
9409
|
+
return (_c = (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.labels) == null ? void 0 : _b.currency) != null ? _c : "";
|
|
9410
|
+
});
|
|
9411
|
+
const priceSeparator = computed(() => {
|
|
9412
|
+
var _a, _b, _c;
|
|
9413
|
+
return (_c = (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.labels) == null ? void 0 : _b.priceSeparator) != null ? _c : "";
|
|
9414
|
+
});
|
|
9401
9415
|
const labeledFilters = computed(
|
|
9402
|
-
() => getLabeledFilters(
|
|
9416
|
+
() => getLabeledFilters(
|
|
9417
|
+
unfoldFilters(filters.value, {
|
|
9418
|
+
keys: priceKeys.value,
|
|
9419
|
+
currency: currency.value,
|
|
9420
|
+
separator: priceSeparator.value
|
|
9421
|
+
}),
|
|
9422
|
+
facets.value
|
|
9423
|
+
)
|
|
9403
9424
|
);
|
|
9404
9425
|
const displayFilters = computed(() => {
|
|
9405
9426
|
var _a, _b;
|
|
@@ -9533,10 +9554,10 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
9533
9554
|
clearSearchResult
|
|
9534
9555
|
};
|
|
9535
9556
|
});
|
|
9536
|
-
const _hoisted_1$
|
|
9537
|
-
const _hoisted_2$
|
|
9557
|
+
const _hoisted_1$11 = { class: "lupa-search-box-add-to-cart-wrapper" };
|
|
9558
|
+
const _hoisted_2$K = { class: "lupa-search-box-product-addtocart" };
|
|
9538
9559
|
const _hoisted_3$x = ["onClick", "disabled"];
|
|
9539
|
-
const _sfc_main$
|
|
9560
|
+
const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
9540
9561
|
__name: "SearchBoxProductAddToCart",
|
|
9541
9562
|
props: {
|
|
9542
9563
|
item: {},
|
|
@@ -9563,8 +9584,8 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
9563
9584
|
loading.value = false;
|
|
9564
9585
|
});
|
|
9565
9586
|
return (_ctx, _cache) => {
|
|
9566
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9567
|
-
createBaseVNode("div", _hoisted_2$
|
|
9587
|
+
return openBlock(), createElementBlock("div", _hoisted_1$11, [
|
|
9588
|
+
createBaseVNode("div", _hoisted_2$K, [
|
|
9568
9589
|
createBaseVNode("button", {
|
|
9569
9590
|
onClick: withModifiers(handleClick, ["stop", "prevent"]),
|
|
9570
9591
|
class: normalizeClass(loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart"),
|
|
@@ -9577,23 +9598,23 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
9577
9598
|
};
|
|
9578
9599
|
}
|
|
9579
9600
|
});
|
|
9580
|
-
const _hoisted_1
|
|
9601
|
+
const _hoisted_1$10 = {
|
|
9581
9602
|
key: 1,
|
|
9582
9603
|
class: "lupa-search-box-element-badge-wrapper"
|
|
9583
9604
|
};
|
|
9584
9605
|
const __default__$4 = {
|
|
9585
9606
|
components: {
|
|
9586
|
-
SearchBoxProductImage: _sfc_main$
|
|
9587
|
-
SearchBoxProductTitle: _sfc_main$
|
|
9588
|
-
SearchBoxProductDescription: _sfc_main$
|
|
9589
|
-
SearchBoxProductPrice: _sfc_main$
|
|
9590
|
-
SearchBoxProductRegularPrice: _sfc_main$
|
|
9591
|
-
SearchBoxProductCustom: _sfc_main$
|
|
9592
|
-
SearchBoxProductCustomHtml: _sfc_main$
|
|
9593
|
-
SearchBoxProductAddToCart: _sfc_main$
|
|
9607
|
+
SearchBoxProductImage: _sfc_main$1d,
|
|
9608
|
+
SearchBoxProductTitle: _sfc_main$1c,
|
|
9609
|
+
SearchBoxProductDescription: _sfc_main$1b,
|
|
9610
|
+
SearchBoxProductPrice: _sfc_main$1a,
|
|
9611
|
+
SearchBoxProductRegularPrice: _sfc_main$19,
|
|
9612
|
+
SearchBoxProductCustom: _sfc_main$18,
|
|
9613
|
+
SearchBoxProductCustomHtml: _sfc_main$17,
|
|
9614
|
+
SearchBoxProductAddToCart: _sfc_main$16
|
|
9594
9615
|
}
|
|
9595
9616
|
};
|
|
9596
|
-
const _sfc_main$
|
|
9617
|
+
const _sfc_main$15 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
|
|
9597
9618
|
__name: "SearchBoxProductElement",
|
|
9598
9619
|
props: {
|
|
9599
9620
|
item: {},
|
|
@@ -9651,7 +9672,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
9651
9672
|
class: normalizeClass({ "lupa-loading-dynamic-data": isLoadingDynamicData((_a = _ctx.item) == null ? void 0 : _a.id) }),
|
|
9652
9673
|
inStock: _ctx.isInStock
|
|
9653
9674
|
}, null, 8, ["item", "options", "labels", "class", "inStock"])) : createCommentVNode("", true)
|
|
9654
|
-
], 64)) : (openBlock(), createElementBlock("div", _hoisted_1
|
|
9675
|
+
], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$10, [
|
|
9655
9676
|
displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
|
|
9656
9677
|
key: 0,
|
|
9657
9678
|
item: enhancedItem.value,
|
|
@@ -9665,14 +9686,14 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
9665
9686
|
};
|
|
9666
9687
|
}
|
|
9667
9688
|
}));
|
|
9668
|
-
const _hoisted_1
|
|
9669
|
-
const _hoisted_2$
|
|
9689
|
+
const _hoisted_1$$ = { class: "lupa-badge-title" };
|
|
9690
|
+
const _hoisted_2$J = ["src"];
|
|
9670
9691
|
const _hoisted_3$w = { key: 1 };
|
|
9671
9692
|
const _hoisted_4$p = {
|
|
9672
9693
|
key: 0,
|
|
9673
9694
|
class: "lupa-badge-full-text"
|
|
9674
9695
|
};
|
|
9675
|
-
const _sfc_main$
|
|
9696
|
+
const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
9676
9697
|
__name: "SearchResultGeneratedBadge",
|
|
9677
9698
|
props: {
|
|
9678
9699
|
options: {},
|
|
@@ -9705,11 +9726,11 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
9705
9726
|
class: normalizeClass(["lupa-dynamic-badge", customClassName.value]),
|
|
9706
9727
|
style: normalizeStyle({ background: _ctx.badge.backgroundColor, color: _ctx.badge.color })
|
|
9707
9728
|
}, [
|
|
9708
|
-
createBaseVNode("span", _hoisted_1
|
|
9729
|
+
createBaseVNode("span", _hoisted_1$$, [
|
|
9709
9730
|
image.value ? (openBlock(), createElementBlock("img", {
|
|
9710
9731
|
key: 0,
|
|
9711
9732
|
src: image.value
|
|
9712
|
-
}, null, 8, _hoisted_2$
|
|
9733
|
+
}, null, 8, _hoisted_2$J)) : createCommentVNode("", true),
|
|
9713
9734
|
hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$w, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
|
|
9714
9735
|
]),
|
|
9715
9736
|
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
|
|
@@ -9717,8 +9738,8 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
9717
9738
|
};
|
|
9718
9739
|
}
|
|
9719
9740
|
});
|
|
9720
|
-
const _hoisted_1$
|
|
9721
|
-
const _sfc_main$
|
|
9741
|
+
const _hoisted_1$_ = { class: "lupa-generated-badges" };
|
|
9742
|
+
const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
9722
9743
|
__name: "SearchResultGeneratedBadges",
|
|
9723
9744
|
props: {
|
|
9724
9745
|
options: {}
|
|
@@ -9744,9 +9765,9 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
9744
9765
|
})).filter((b) => Boolean(b.id));
|
|
9745
9766
|
});
|
|
9746
9767
|
return (_ctx, _cache) => {
|
|
9747
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9768
|
+
return openBlock(), createElementBlock("div", _hoisted_1$_, [
|
|
9748
9769
|
(openBlock(true), createElementBlock(Fragment, null, renderList(badges.value, (badge) => {
|
|
9749
|
-
return openBlock(), createBlock(_sfc_main$
|
|
9770
|
+
return openBlock(), createBlock(_sfc_main$14, {
|
|
9750
9771
|
key: badge.id,
|
|
9751
9772
|
badge,
|
|
9752
9773
|
options: _ctx.options
|
|
@@ -9756,8 +9777,8 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
9756
9777
|
};
|
|
9757
9778
|
}
|
|
9758
9779
|
});
|
|
9759
|
-
const _hoisted_1$
|
|
9760
|
-
const _sfc_main$
|
|
9780
|
+
const _hoisted_1$Z = ["innerHTML"];
|
|
9781
|
+
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
9761
9782
|
__name: "CustomBadge",
|
|
9762
9783
|
props: {
|
|
9763
9784
|
badge: {}
|
|
@@ -9776,12 +9797,12 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
9776
9797
|
return openBlock(), createElementBlock("div", {
|
|
9777
9798
|
class: normalizeClass(className.value),
|
|
9778
9799
|
innerHTML: text.value
|
|
9779
|
-
}, null, 10, _hoisted_1$
|
|
9800
|
+
}, null, 10, _hoisted_1$Z);
|
|
9780
9801
|
};
|
|
9781
9802
|
}
|
|
9782
9803
|
});
|
|
9783
|
-
const _hoisted_1$
|
|
9784
|
-
const _sfc_main$
|
|
9804
|
+
const _hoisted_1$Y = { class: "lupa-text-badges" };
|
|
9805
|
+
const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
9785
9806
|
__name: "TextBadge",
|
|
9786
9807
|
props: {
|
|
9787
9808
|
badge: {}
|
|
@@ -9796,7 +9817,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
9796
9817
|
return badges.value.slice(0, props.badge.maxItems);
|
|
9797
9818
|
});
|
|
9798
9819
|
return (_ctx, _cache) => {
|
|
9799
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9820
|
+
return openBlock(), createElementBlock("div", _hoisted_1$Y, [
|
|
9800
9821
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
|
|
9801
9822
|
return openBlock(), createElementBlock("div", {
|
|
9802
9823
|
class: "lupa-badge lupa-text-badge",
|
|
@@ -9807,9 +9828,9 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
9807
9828
|
};
|
|
9808
9829
|
}
|
|
9809
9830
|
});
|
|
9810
|
-
const _hoisted_1$
|
|
9811
|
-
const _hoisted_2$
|
|
9812
|
-
const _sfc_main
|
|
9831
|
+
const _hoisted_1$X = { class: "lupa-image-badges" };
|
|
9832
|
+
const _hoisted_2$I = ["src"];
|
|
9833
|
+
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
9813
9834
|
__name: "ImageBadge",
|
|
9814
9835
|
props: {
|
|
9815
9836
|
badge: {}
|
|
@@ -9829,7 +9850,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
9829
9850
|
return `${props.badge.rootImageUrl}${src}`;
|
|
9830
9851
|
};
|
|
9831
9852
|
return (_ctx, _cache) => {
|
|
9832
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9853
|
+
return openBlock(), createElementBlock("div", _hoisted_1$X, [
|
|
9833
9854
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
|
|
9834
9855
|
return openBlock(), createElementBlock("div", {
|
|
9835
9856
|
class: "lupa-badge lupa-image-badge",
|
|
@@ -9837,22 +9858,22 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
9837
9858
|
}, [
|
|
9838
9859
|
createBaseVNode("img", {
|
|
9839
9860
|
src: getImageUrl(item)
|
|
9840
|
-
}, null, 8, _hoisted_2$
|
|
9861
|
+
}, null, 8, _hoisted_2$I)
|
|
9841
9862
|
]);
|
|
9842
9863
|
}), 128))
|
|
9843
9864
|
]);
|
|
9844
9865
|
};
|
|
9845
9866
|
}
|
|
9846
9867
|
});
|
|
9847
|
-
const _hoisted_1$
|
|
9868
|
+
const _hoisted_1$W = { id: "lupa-search-results-badges" };
|
|
9848
9869
|
const __default__$3 = {
|
|
9849
9870
|
components: {
|
|
9850
|
-
CustomBadge: _sfc_main$
|
|
9851
|
-
TextBadge: _sfc_main$
|
|
9852
|
-
ImageBadge: _sfc_main
|
|
9871
|
+
CustomBadge: _sfc_main$12,
|
|
9872
|
+
TextBadge: _sfc_main$11,
|
|
9873
|
+
ImageBadge: _sfc_main$10
|
|
9853
9874
|
}
|
|
9854
9875
|
};
|
|
9855
|
-
const _sfc_main
|
|
9876
|
+
const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
|
|
9856
9877
|
__name: "SearchResultsBadgeWrapper",
|
|
9857
9878
|
props: {
|
|
9858
9879
|
position: {},
|
|
@@ -9908,7 +9929,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
9908
9929
|
}
|
|
9909
9930
|
};
|
|
9910
9931
|
return (_ctx, _cache) => {
|
|
9911
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9932
|
+
return openBlock(), createElementBlock("div", _hoisted_1$W, [
|
|
9912
9933
|
createBaseVNode("div", {
|
|
9913
9934
|
id: "lupa-badges",
|
|
9914
9935
|
class: normalizeClass(anchorPosition.value)
|
|
@@ -9919,7 +9940,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
9919
9940
|
badge
|
|
9920
9941
|
}, null, 8, ["badge"]);
|
|
9921
9942
|
}), 128)),
|
|
9922
|
-
positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$
|
|
9943
|
+
positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$13, {
|
|
9923
9944
|
key: 0,
|
|
9924
9945
|
options: _ctx.options
|
|
9925
9946
|
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
@@ -9928,14 +9949,14 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
9928
9949
|
};
|
|
9929
9950
|
}
|
|
9930
9951
|
}));
|
|
9931
|
-
const _hoisted_1$
|
|
9932
|
-
const _hoisted_2$
|
|
9952
|
+
const _hoisted_1$V = ["href"];
|
|
9953
|
+
const _hoisted_2$H = { class: "lupa-search-box-product-image-section" };
|
|
9933
9954
|
const _hoisted_3$v = { class: "lupa-search-box-product-details-section" };
|
|
9934
9955
|
const _hoisted_4$o = {
|
|
9935
9956
|
key: 0,
|
|
9936
9957
|
class: "lupa-search-box-product-add-to-cart-section"
|
|
9937
9958
|
};
|
|
9938
|
-
const _sfc_main$
|
|
9959
|
+
const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
9939
9960
|
__name: "SearchBoxProduct",
|
|
9940
9961
|
props: {
|
|
9941
9962
|
item: {},
|
|
@@ -9994,9 +10015,9 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
9994
10015
|
"data-cy": "lupa-search-box-product",
|
|
9995
10016
|
onClick: handleClick
|
|
9996
10017
|
}), [
|
|
9997
|
-
createBaseVNode("div", _hoisted_2$
|
|
10018
|
+
createBaseVNode("div", _hoisted_2$H, [
|
|
9998
10019
|
(openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
|
|
9999
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10020
|
+
return openBlock(), createBlock(_sfc_main$15, {
|
|
10000
10021
|
class: "lupa-search-box-product-element",
|
|
10001
10022
|
item: _ctx.item,
|
|
10002
10023
|
element,
|
|
@@ -10009,7 +10030,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
10009
10030
|
createBaseVNode("div", _hoisted_3$v, [
|
|
10010
10031
|
(openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
|
|
10011
10032
|
var _a;
|
|
10012
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10033
|
+
return openBlock(), createBlock(_sfc_main$15, {
|
|
10013
10034
|
key: element.key,
|
|
10014
10035
|
class: "lupa-search-box-product-element",
|
|
10015
10036
|
item: _ctx.item,
|
|
@@ -10020,7 +10041,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
10020
10041
|
badgeOptions.value && ((_a = badgeOptions.value) == null ? void 0 : _a.anchorElementKey) === element.key ? {
|
|
10021
10042
|
name: "badges",
|
|
10022
10043
|
fn: withCtx(() => [
|
|
10023
|
-
createVNode(_sfc_main
|
|
10044
|
+
createVNode(_sfc_main$$, {
|
|
10024
10045
|
options: badgeOptions.value,
|
|
10025
10046
|
position: "card"
|
|
10026
10047
|
}, null, 8, ["options"])
|
|
@@ -10031,7 +10052,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
10031
10052
|
}), 128))
|
|
10032
10053
|
]),
|
|
10033
10054
|
addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_4$o, [
|
|
10034
|
-
createVNode(_sfc_main$
|
|
10055
|
+
createVNode(_sfc_main$15, {
|
|
10035
10056
|
class: "lupa-search-box-product-element",
|
|
10036
10057
|
item: _ctx.item,
|
|
10037
10058
|
element: addToCartElement.value,
|
|
@@ -10040,7 +10061,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
10040
10061
|
isInStock: isInStock.value
|
|
10041
10062
|
}, null, 8, ["item", "element", "labels", "link", "isInStock"])
|
|
10042
10063
|
])) : createCommentVNode("", true)
|
|
10043
|
-
], 16, _hoisted_1$
|
|
10064
|
+
], 16, _hoisted_1$V);
|
|
10044
10065
|
};
|
|
10045
10066
|
}
|
|
10046
10067
|
});
|
|
@@ -10101,8 +10122,8 @@ const useTrackingStore = defineStore("tracking", () => {
|
|
|
10101
10122
|
};
|
|
10102
10123
|
return { trackSearch, trackResults, trackEvent };
|
|
10103
10124
|
});
|
|
10104
|
-
const _hoisted_1$
|
|
10105
|
-
const _sfc_main$
|
|
10125
|
+
const _hoisted_1$U = { id: "lupa-search-box-products" };
|
|
10126
|
+
const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
10106
10127
|
__name: "SearchBoxProducts",
|
|
10107
10128
|
props: {
|
|
10108
10129
|
items: {},
|
|
@@ -10163,7 +10184,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
10163
10184
|
handleRoutingEvent(link, event, boxRoutingBehavior.value === "event");
|
|
10164
10185
|
};
|
|
10165
10186
|
return (_ctx, _cache) => {
|
|
10166
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
10187
|
+
return openBlock(), createElementBlock("div", _hoisted_1$U, [
|
|
10167
10188
|
_ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.items, (item, index) => {
|
|
10168
10189
|
return renderSlot(_ctx.$slots, "productCard", {
|
|
10169
10190
|
key: index,
|
|
@@ -10175,7 +10196,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
10175
10196
|
itemClicked: handleProductClick
|
|
10176
10197
|
});
|
|
10177
10198
|
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.items, (item, index) => {
|
|
10178
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10199
|
+
return openBlock(), createBlock(_sfc_main$_, {
|
|
10179
10200
|
key: index,
|
|
10180
10201
|
item,
|
|
10181
10202
|
panelOptions: _ctx.panelOptions,
|
|
@@ -10189,7 +10210,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
10189
10210
|
};
|
|
10190
10211
|
}
|
|
10191
10212
|
});
|
|
10192
|
-
const _sfc_main$
|
|
10213
|
+
const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
10193
10214
|
__name: "SearchBoxProductsWrapper",
|
|
10194
10215
|
props: {
|
|
10195
10216
|
panel: {},
|
|
@@ -10241,7 +10262,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
10241
10262
|
const getItemsDebounced = debounce$1(getItems, props.debounce);
|
|
10242
10263
|
return (_ctx, _cache) => {
|
|
10243
10264
|
var _a, _b;
|
|
10244
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10265
|
+
return openBlock(), createBlock(_sfc_main$Z, {
|
|
10245
10266
|
items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
|
|
10246
10267
|
panelOptions: _ctx.panel,
|
|
10247
10268
|
labels: _ctx.labels,
|
|
@@ -10259,7 +10280,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
10259
10280
|
};
|
|
10260
10281
|
}
|
|
10261
10282
|
});
|
|
10262
|
-
const _sfc_main$
|
|
10283
|
+
const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
10263
10284
|
__name: "SearchBoxRelatedSourceWrapper",
|
|
10264
10285
|
props: {
|
|
10265
10286
|
panel: {},
|
|
@@ -10331,7 +10352,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
10331
10352
|
});
|
|
10332
10353
|
return (_ctx, _cache) => {
|
|
10333
10354
|
var _a, _b;
|
|
10334
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10355
|
+
return openBlock(), createBlock(_sfc_main$Z, {
|
|
10335
10356
|
items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
|
|
10336
10357
|
panelOptions: documentPanelOptions.value,
|
|
10337
10358
|
labels: _ctx.labels,
|
|
@@ -10349,11 +10370,11 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
10349
10370
|
};
|
|
10350
10371
|
}
|
|
10351
10372
|
});
|
|
10352
|
-
const _hoisted_1$
|
|
10373
|
+
const _hoisted_1$T = {
|
|
10353
10374
|
key: 0,
|
|
10354
10375
|
id: "lupa-search-box-panel"
|
|
10355
10376
|
};
|
|
10356
|
-
const _hoisted_2$
|
|
10377
|
+
const _hoisted_2$G = ["data-cy"];
|
|
10357
10378
|
const _hoisted_3$u = {
|
|
10358
10379
|
key: 0,
|
|
10359
10380
|
class: "lupa-panel-title lupa-panel-title-top-results"
|
|
@@ -10368,12 +10389,12 @@ const _hoisted_5$e = {
|
|
|
10368
10389
|
};
|
|
10369
10390
|
const __default__$2 = {
|
|
10370
10391
|
components: {
|
|
10371
|
-
SearchBoxSuggestionsWrapper: _sfc_main$
|
|
10372
|
-
SearchBoxProductsWrapper: _sfc_main$
|
|
10373
|
-
SearchBoxRelatedSourceWrapper: _sfc_main$
|
|
10392
|
+
SearchBoxSuggestionsWrapper: _sfc_main$1f,
|
|
10393
|
+
SearchBoxProductsWrapper: _sfc_main$Y,
|
|
10394
|
+
SearchBoxRelatedSourceWrapper: _sfc_main$X
|
|
10374
10395
|
}
|
|
10375
10396
|
};
|
|
10376
|
-
const _sfc_main$
|
|
10397
|
+
const _sfc_main$W = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
|
|
10377
10398
|
__name: "SearchBoxMainPanel",
|
|
10378
10399
|
props: {
|
|
10379
10400
|
options: {},
|
|
@@ -10519,7 +10540,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
10519
10540
|
ref_key: "panelContainer",
|
|
10520
10541
|
ref: panelContainer
|
|
10521
10542
|
}, [
|
|
10522
|
-
displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
10543
|
+
displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$T, [
|
|
10523
10544
|
labels.value.closePanel ? (openBlock(), createElementBlock("a", {
|
|
10524
10545
|
key: 0,
|
|
10525
10546
|
class: "lupa-search-box-close-panel",
|
|
@@ -10561,21 +10582,21 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
10561
10582
|
key: "0"
|
|
10562
10583
|
} : void 0
|
|
10563
10584
|
]), 1064, ["panel", "options", "debounce", "inputValue", "labels"])) : createCommentVNode("", true)
|
|
10564
|
-
], 10, _hoisted_2$
|
|
10585
|
+
], 10, _hoisted_2$G);
|
|
10565
10586
|
}), 128))
|
|
10566
10587
|
], 4),
|
|
10567
|
-
!unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$
|
|
10588
|
+
!unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1i, {
|
|
10568
10589
|
key: 1,
|
|
10569
10590
|
labels: labels.value
|
|
10570
10591
|
}, null, 8, ["labels"])) : createCommentVNode("", true),
|
|
10571
|
-
unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$
|
|
10592
|
+
unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$1l, {
|
|
10572
10593
|
key: 2,
|
|
10573
10594
|
labels: labels.value,
|
|
10574
10595
|
showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
|
|
10575
10596
|
onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
|
|
10576
10597
|
}, null, 8, ["labels", "showTotalCount"])) : createCommentVNode("", true)
|
|
10577
10598
|
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$e, [
|
|
10578
|
-
createVNode(_sfc_main$
|
|
10599
|
+
createVNode(_sfc_main$1j, {
|
|
10579
10600
|
options: _ctx.options.history,
|
|
10580
10601
|
history: history.value,
|
|
10581
10602
|
onGoToResults: handleGoToResults,
|
|
@@ -10600,9 +10621,9 @@ const unbindSearchTriggers = (triggers = [], event) => {
|
|
|
10600
10621
|
const elements = getElements(triggers);
|
|
10601
10622
|
elements.forEach((e) => e == null ? void 0 : e.removeEventListener(BIND_EVENT, event));
|
|
10602
10623
|
};
|
|
10603
|
-
const _hoisted_1$
|
|
10604
|
-
const _hoisted_2$
|
|
10605
|
-
const _sfc_main$
|
|
10624
|
+
const _hoisted_1$S = { id: "lupa-search-box" };
|
|
10625
|
+
const _hoisted_2$F = { class: "lupa-search-box-wrapper" };
|
|
10626
|
+
const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
10606
10627
|
__name: "SearchBox",
|
|
10607
10628
|
props: {
|
|
10608
10629
|
options: {},
|
|
@@ -10847,9 +10868,9 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
10847
10868
|
};
|
|
10848
10869
|
return (_ctx, _cache) => {
|
|
10849
10870
|
var _a2;
|
|
10850
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
10851
|
-
createBaseVNode("div", _hoisted_2$
|
|
10852
|
-
createVNode(_sfc_main$
|
|
10871
|
+
return openBlock(), createElementBlock("div", _hoisted_1$S, [
|
|
10872
|
+
createBaseVNode("div", _hoisted_2$F, [
|
|
10873
|
+
createVNode(_sfc_main$1m, {
|
|
10853
10874
|
options: inputOptions.value,
|
|
10854
10875
|
suggestedValue: suggestedValue.value,
|
|
10855
10876
|
"can-close": (_a2 = _ctx.isSearchContainer) != null ? _a2 : false,
|
|
@@ -10860,7 +10881,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
10860
10881
|
onFocus: _cache[0] || (_cache[0] = ($event) => opened.value = true),
|
|
10861
10882
|
onClose: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("close"))
|
|
10862
10883
|
}, null, 8, ["options", "suggestedValue", "can-close", "emit-input-on-focus"]),
|
|
10863
|
-
opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$
|
|
10884
|
+
opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$W, {
|
|
10864
10885
|
key: 0,
|
|
10865
10886
|
options: panelOptions.value,
|
|
10866
10887
|
inputValue: inputValue.value,
|
|
@@ -10948,11 +10969,11 @@ const getSearchParams = (url, params, baseUrl) => {
|
|
|
10948
10969
|
}
|
|
10949
10970
|
return searchParams;
|
|
10950
10971
|
};
|
|
10951
|
-
const _hoisted_1$
|
|
10972
|
+
const _hoisted_1$R = {
|
|
10952
10973
|
key: 0,
|
|
10953
10974
|
id: "lupa-search-results-did-you-mean"
|
|
10954
10975
|
};
|
|
10955
|
-
const _hoisted_2$
|
|
10976
|
+
const _hoisted_2$E = {
|
|
10956
10977
|
key: 0,
|
|
10957
10978
|
"data-cy": "suggested-search-text-label"
|
|
10958
10979
|
};
|
|
@@ -10961,7 +10982,7 @@ const _hoisted_3$t = {
|
|
|
10961
10982
|
"data-cy": "did-you-mean-label"
|
|
10962
10983
|
};
|
|
10963
10984
|
const _hoisted_4$m = { key: 1 };
|
|
10964
|
-
const _sfc_main$
|
|
10985
|
+
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
10965
10986
|
__name: "SearchResultsDidYouMean",
|
|
10966
10987
|
props: {
|
|
10967
10988
|
labels: {}
|
|
@@ -10993,8 +11014,8 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
10993
11014
|
paramStore.goToResults({ searchText, facet });
|
|
10994
11015
|
};
|
|
10995
11016
|
return (_ctx, _cache) => {
|
|
10996
|
-
return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
10997
|
-
unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
11017
|
+
return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$R, [
|
|
11018
|
+
unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$E, [
|
|
10998
11019
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.noResultsSuggestion.split(" "), (label, index) => {
|
|
10999
11020
|
return openBlock(), createElementBlock("span", { key: index }, [
|
|
11000
11021
|
createBaseVNode("span", {
|
|
@@ -11019,12 +11040,12 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
11019
11040
|
};
|
|
11020
11041
|
}
|
|
11021
11042
|
});
|
|
11022
|
-
const _hoisted_1$
|
|
11043
|
+
const _hoisted_1$Q = {
|
|
11023
11044
|
key: 0,
|
|
11024
11045
|
class: "lupa-search-results-summary"
|
|
11025
11046
|
};
|
|
11026
|
-
const _hoisted_2$
|
|
11027
|
-
const _sfc_main$
|
|
11047
|
+
const _hoisted_2$D = ["innerHTML"];
|
|
11048
|
+
const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
11028
11049
|
__name: "SearchResultsSummary",
|
|
11029
11050
|
props: {
|
|
11030
11051
|
label: {},
|
|
@@ -11039,8 +11060,8 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
11039
11060
|
return addParamsToLabel(props.label, range, `<span>${totalItems.value}</span>`);
|
|
11040
11061
|
});
|
|
11041
11062
|
return (_ctx, _cache) => {
|
|
11042
|
-
return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
11043
|
-
createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$
|
|
11063
|
+
return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$Q, [
|
|
11064
|
+
createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$D),
|
|
11044
11065
|
_ctx.clearable ? (openBlock(), createElementBlock("span", {
|
|
11045
11066
|
key: 0,
|
|
11046
11067
|
class: "lupa-filter-clear",
|
|
@@ -11051,18 +11072,18 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
11051
11072
|
};
|
|
11052
11073
|
}
|
|
11053
11074
|
});
|
|
11054
|
-
const _hoisted_1$
|
|
11075
|
+
const _hoisted_1$P = {
|
|
11055
11076
|
key: 0,
|
|
11056
11077
|
class: "lupa-result-page-title",
|
|
11057
11078
|
"data-cy": "lupa-result-page-title"
|
|
11058
11079
|
};
|
|
11059
|
-
const _hoisted_2$
|
|
11080
|
+
const _hoisted_2$C = { key: 0 };
|
|
11060
11081
|
const _hoisted_3$s = {
|
|
11061
11082
|
key: 1,
|
|
11062
11083
|
class: "lupa-results-total-count"
|
|
11063
11084
|
};
|
|
11064
11085
|
const _hoisted_4$l = ["innerHTML"];
|
|
11065
|
-
const _sfc_main$
|
|
11086
|
+
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
11066
11087
|
__name: "SearchResultsTitle",
|
|
11067
11088
|
props: {
|
|
11068
11089
|
options: {},
|
|
@@ -11097,12 +11118,12 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
11097
11118
|
});
|
|
11098
11119
|
return (_ctx, _cache) => {
|
|
11099
11120
|
return openBlock(), createElementBlock("div", null, [
|
|
11100
|
-
showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$
|
|
11121
|
+
showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$P, [
|
|
11101
11122
|
createTextVNode(toDisplayString(_ctx.options.labels.searchResults), 1),
|
|
11102
|
-
queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
11123
|
+
queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$C, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
|
|
11103
11124
|
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$s, "(" + toDisplayString(unref(totalItems)) + ")", 1)) : createCommentVNode("", true)
|
|
11104
11125
|
])) : createCommentVNode("", true),
|
|
11105
|
-
_ctx.showSummary ? (openBlock(), createBlock(_sfc_main$
|
|
11126
|
+
_ctx.showSummary ? (openBlock(), createBlock(_sfc_main$T, {
|
|
11106
11127
|
key: 1,
|
|
11107
11128
|
label: summaryLabel.value
|
|
11108
11129
|
}, null, 8, ["label"])) : createCommentVNode("", true),
|
|
@@ -11115,8 +11136,8 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
11115
11136
|
};
|
|
11116
11137
|
}
|
|
11117
11138
|
});
|
|
11118
|
-
const _hoisted_1$
|
|
11119
|
-
const _hoisted_2$
|
|
11139
|
+
const _hoisted_1$O = { class: "lupa-search-result-filter-value" };
|
|
11140
|
+
const _hoisted_2$B = {
|
|
11120
11141
|
class: "lupa-current-filter-label",
|
|
11121
11142
|
"data-cy": "lupa-current-filter-label"
|
|
11122
11143
|
};
|
|
@@ -11124,7 +11145,7 @@ const _hoisted_3$r = {
|
|
|
11124
11145
|
class: "lupa-current-filter-value",
|
|
11125
11146
|
"data-cy": "lupa-current-filter-value"
|
|
11126
11147
|
};
|
|
11127
|
-
const _sfc_main$
|
|
11148
|
+
const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
11128
11149
|
__name: "CurrentFilterDisplay",
|
|
11129
11150
|
props: {
|
|
11130
11151
|
filter: {}
|
|
@@ -11136,19 +11157,19 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
11136
11157
|
emit2("remove", { filter: props.filter });
|
|
11137
11158
|
};
|
|
11138
11159
|
return (_ctx, _cache) => {
|
|
11139
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11160
|
+
return openBlock(), createElementBlock("div", _hoisted_1$O, [
|
|
11140
11161
|
createBaseVNode("div", {
|
|
11141
11162
|
class: "lupa-current-filter-action",
|
|
11142
11163
|
onClick: handleClick
|
|
11143
11164
|
}, "⨉"),
|
|
11144
|
-
createBaseVNode("div", _hoisted_2$
|
|
11165
|
+
createBaseVNode("div", _hoisted_2$B, toDisplayString(_ctx.filter.label) + ": ", 1),
|
|
11145
11166
|
createBaseVNode("div", _hoisted_3$r, toDisplayString(_ctx.filter.value), 1)
|
|
11146
11167
|
]);
|
|
11147
11168
|
};
|
|
11148
11169
|
}
|
|
11149
11170
|
});
|
|
11150
|
-
const _hoisted_1$
|
|
11151
|
-
const _hoisted_2$
|
|
11171
|
+
const _hoisted_1$N = { class: "lupa-filter-title-text" };
|
|
11172
|
+
const _hoisted_2$A = {
|
|
11152
11173
|
key: 0,
|
|
11153
11174
|
class: "lupa-filter-count"
|
|
11154
11175
|
};
|
|
@@ -11157,7 +11178,7 @@ const _hoisted_3$q = {
|
|
|
11157
11178
|
class: "filter-values"
|
|
11158
11179
|
};
|
|
11159
11180
|
const _hoisted_4$k = { class: "lupa-current-filter-list" };
|
|
11160
|
-
const _sfc_main$
|
|
11181
|
+
const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
11161
11182
|
__name: "CurrentFilters",
|
|
11162
11183
|
props: {
|
|
11163
11184
|
options: {},
|
|
@@ -11218,9 +11239,9 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
11218
11239
|
class: "lupa-current-filter-title",
|
|
11219
11240
|
onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
|
|
11220
11241
|
}, [
|
|
11221
|
-
createBaseVNode("div", _hoisted_1$
|
|
11242
|
+
createBaseVNode("div", _hoisted_1$N, [
|
|
11222
11243
|
createTextVNode(toDisplayString((_c = (_b = (_a = _ctx.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.title) != null ? _c : "") + " ", 1),
|
|
11223
|
-
_ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
11244
|
+
_ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$A, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
|
|
11224
11245
|
]),
|
|
11225
11246
|
_ctx.expandable ? (openBlock(), createElementBlock("div", {
|
|
11226
11247
|
key: 0,
|
|
@@ -11230,7 +11251,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
11230
11251
|
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$q, [
|
|
11231
11252
|
createBaseVNode("div", _hoisted_4$k, [
|
|
11232
11253
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(displayFilters), (filter) => {
|
|
11233
|
-
return openBlock(), createBlock(_sfc_main$
|
|
11254
|
+
return openBlock(), createBlock(_sfc_main$R, {
|
|
11234
11255
|
key: filter.key + "_" + filter.value,
|
|
11235
11256
|
filter,
|
|
11236
11257
|
onRemove: handleRemove
|
|
@@ -11247,8 +11268,8 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
11247
11268
|
};
|
|
11248
11269
|
}
|
|
11249
11270
|
});
|
|
11250
|
-
const _hoisted_1$
|
|
11251
|
-
const _sfc_main$
|
|
11271
|
+
const _hoisted_1$M = ["href"];
|
|
11272
|
+
const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
11252
11273
|
__name: "CategoryFilterItem",
|
|
11253
11274
|
props: {
|
|
11254
11275
|
options: {},
|
|
@@ -11285,20 +11306,20 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
11285
11306
|
"data-cy": "lupa-child-category-item",
|
|
11286
11307
|
href: urlLink.value,
|
|
11287
11308
|
onClick: handleNavigation
|
|
11288
|
-
}, toDisplayString(title.value), 9, _hoisted_1$
|
|
11309
|
+
}, toDisplayString(title.value), 9, _hoisted_1$M)
|
|
11289
11310
|
], 2);
|
|
11290
11311
|
};
|
|
11291
11312
|
}
|
|
11292
11313
|
});
|
|
11293
|
-
const _hoisted_1$
|
|
11314
|
+
const _hoisted_1$L = {
|
|
11294
11315
|
class: "lupa-category-filter",
|
|
11295
11316
|
"data-cy": "lupa-category-filter"
|
|
11296
11317
|
};
|
|
11297
|
-
const _hoisted_2$
|
|
11318
|
+
const _hoisted_2$z = { class: "lupa-category-back" };
|
|
11298
11319
|
const _hoisted_3$p = ["href"];
|
|
11299
11320
|
const _hoisted_4$j = ["href"];
|
|
11300
11321
|
const _hoisted_5$d = { class: "lupa-child-category-list" };
|
|
11301
|
-
const _sfc_main$
|
|
11322
|
+
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
11302
11323
|
__name: "CategoryFilter",
|
|
11303
11324
|
props: {
|
|
11304
11325
|
options: {}
|
|
@@ -11384,8 +11405,8 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
11384
11405
|
};
|
|
11385
11406
|
__expose({ fetch: fetch2 });
|
|
11386
11407
|
return (_ctx, _cache) => {
|
|
11387
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11388
|
-
createBaseVNode("div", _hoisted_2$
|
|
11408
|
+
return openBlock(), createElementBlock("div", _hoisted_1$L, [
|
|
11409
|
+
createBaseVNode("div", _hoisted_2$z, [
|
|
11389
11410
|
hasBackButton.value ? (openBlock(), createElementBlock("a", {
|
|
11390
11411
|
key: 0,
|
|
11391
11412
|
"data-cy": "lupa-category-back",
|
|
@@ -11405,7 +11426,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
11405
11426
|
], 2),
|
|
11406
11427
|
createBaseVNode("div", _hoisted_5$d, [
|
|
11407
11428
|
(openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
|
|
11408
|
-
return openBlock(), createBlock(_sfc_main$
|
|
11429
|
+
return openBlock(), createBlock(_sfc_main$P, {
|
|
11409
11430
|
key: getCategoryKey(child),
|
|
11410
11431
|
item: child,
|
|
11411
11432
|
options: _ctx.options
|
|
@@ -11416,11 +11437,11 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
11416
11437
|
};
|
|
11417
11438
|
}
|
|
11418
11439
|
});
|
|
11419
|
-
const _hoisted_1$
|
|
11440
|
+
const _hoisted_1$K = {
|
|
11420
11441
|
class: "lupa-search-result-facet-term-values",
|
|
11421
11442
|
"data-cy": "lupa-search-result-facet-term-values"
|
|
11422
11443
|
};
|
|
11423
|
-
const _hoisted_2$
|
|
11444
|
+
const _hoisted_2$y = ["placeholder"];
|
|
11424
11445
|
const _hoisted_3$o = { class: "lupa-terms-list" };
|
|
11425
11446
|
const _hoisted_4$i = ["onClick"];
|
|
11426
11447
|
const _hoisted_5$c = { class: "lupa-term-checkbox-wrapper" };
|
|
@@ -11432,7 +11453,7 @@ const _hoisted_8$1 = {
|
|
|
11432
11453
|
};
|
|
11433
11454
|
const _hoisted_9$1 = { key: 0 };
|
|
11434
11455
|
const _hoisted_10$1 = { key: 1 };
|
|
11435
|
-
const _sfc_main$
|
|
11456
|
+
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
11436
11457
|
__name: "TermFacet",
|
|
11437
11458
|
props: {
|
|
11438
11459
|
options: {},
|
|
@@ -11501,14 +11522,14 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
11501
11522
|
return selectedItems == null ? void 0 : selectedItems.includes((_b = item.title) == null ? void 0 : _b.toString());
|
|
11502
11523
|
};
|
|
11503
11524
|
return (_ctx, _cache) => {
|
|
11504
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11525
|
+
return openBlock(), createElementBlock("div", _hoisted_1$K, [
|
|
11505
11526
|
isFilterable.value ? withDirectives((openBlock(), createElementBlock("input", {
|
|
11506
11527
|
key: 0,
|
|
11507
11528
|
class: "lupa-term-filter",
|
|
11508
11529
|
"data-cy": "lupa-term-filter",
|
|
11509
11530
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
|
|
11510
11531
|
placeholder: _ctx.options.labels.facetFilter
|
|
11511
|
-
}, null, 8, _hoisted_2$
|
|
11532
|
+
}, null, 8, _hoisted_2$y)), [
|
|
11512
11533
|
[vModelText, termFilter.value]
|
|
11513
11534
|
]) : createCommentVNode("", true),
|
|
11514
11535
|
createBaseVNode("div", _hoisted_3$o, [
|
|
@@ -12519,8 +12540,8 @@ var m = { name: "Slider", emits: ["input", "update:modelValue", "start", "slide"
|
|
|
12519
12540
|
m.render = function(e, t, r, i, n, o) {
|
|
12520
12541
|
return openBlock(), createElementBlock("div", mergeProps(e.sliderProps, { ref: "slider" }), null, 16);
|
|
12521
12542
|
}, m.__file = "src/Slider.vue";
|
|
12522
|
-
const _hoisted_1$
|
|
12523
|
-
const _hoisted_2$
|
|
12543
|
+
const _hoisted_1$J = { class: "lupa-search-result-facet-stats-values" };
|
|
12544
|
+
const _hoisted_2$x = {
|
|
12524
12545
|
key: 0,
|
|
12525
12546
|
class: "lupa-stats-facet-summary"
|
|
12526
12547
|
};
|
|
@@ -12547,7 +12568,7 @@ const _hoisted_13 = {
|
|
|
12547
12568
|
key: 2,
|
|
12548
12569
|
class: "lupa-stats-slider-wrapper"
|
|
12549
12570
|
};
|
|
12550
|
-
const _sfc_main$
|
|
12571
|
+
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
12551
12572
|
__name: "StatsFacet",
|
|
12552
12573
|
props: {
|
|
12553
12574
|
options: {},
|
|
@@ -12580,6 +12601,10 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
12580
12601
|
var _a;
|
|
12581
12602
|
return (_a = searchResultOptions.value) == null ? void 0 : _a.labels.currency;
|
|
12582
12603
|
});
|
|
12604
|
+
const priceKeys = computed(() => {
|
|
12605
|
+
var _a, _b;
|
|
12606
|
+
return (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.priceKeys) != null ? _b : [];
|
|
12607
|
+
});
|
|
12583
12608
|
const isSliderVisible = computed(() => {
|
|
12584
12609
|
var _a, _b;
|
|
12585
12610
|
return Boolean((_b = (_a = props.options.stats) == null ? void 0 : _a.slider) != null ? _b : true);
|
|
@@ -12643,8 +12668,8 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
12643
12668
|
}
|
|
12644
12669
|
});
|
|
12645
12670
|
const isPrice = computed(() => {
|
|
12646
|
-
var _a;
|
|
12647
|
-
return (_a = facetValue.value.key) == null ? void 0 :
|
|
12671
|
+
var _a, _b, _c;
|
|
12672
|
+
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));
|
|
12648
12673
|
});
|
|
12649
12674
|
const facetMin = computed(() => {
|
|
12650
12675
|
return Math.floor(facetValue.value.min);
|
|
@@ -12716,8 +12741,8 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
12716
12741
|
innerSliderRange.value = value;
|
|
12717
12742
|
};
|
|
12718
12743
|
return (_ctx, _cache) => {
|
|
12719
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12720
|
-
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
12744
|
+
return openBlock(), createElementBlock("div", _hoisted_1$J, [
|
|
12745
|
+
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$x, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$n, [
|
|
12721
12746
|
createBaseVNode("div", null, [
|
|
12722
12747
|
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$h, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
|
|
12723
12748
|
createBaseVNode("div", _hoisted_5$b, [
|
|
@@ -12783,8 +12808,8 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
12783
12808
|
};
|
|
12784
12809
|
}
|
|
12785
12810
|
});
|
|
12786
|
-
const _hoisted_1$
|
|
12787
|
-
const _hoisted_2$
|
|
12811
|
+
const _hoisted_1$I = { class: "lupa-term-checkbox-wrapper" };
|
|
12812
|
+
const _hoisted_2$w = { class: "lupa-term-checkbox-label" };
|
|
12788
12813
|
const _hoisted_3$m = { class: "lupa-term-label" };
|
|
12789
12814
|
const _hoisted_4$g = {
|
|
12790
12815
|
key: 0,
|
|
@@ -12794,7 +12819,7 @@ const _hoisted_5$a = {
|
|
|
12794
12819
|
key: 0,
|
|
12795
12820
|
class: "lupa-facet-level"
|
|
12796
12821
|
};
|
|
12797
|
-
const _sfc_main$
|
|
12822
|
+
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
12798
12823
|
__name: "HierarchyFacetLevel",
|
|
12799
12824
|
props: {
|
|
12800
12825
|
options: {},
|
|
@@ -12840,12 +12865,12 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
12840
12865
|
"data-cy": "lupa-facet-term",
|
|
12841
12866
|
onClick: _cache[0] || (_cache[0] = ($event) => handleFacetClick(_ctx.item))
|
|
12842
12867
|
}, [
|
|
12843
|
-
createBaseVNode("div", _hoisted_1$
|
|
12868
|
+
createBaseVNode("div", _hoisted_1$I, [
|
|
12844
12869
|
createBaseVNode("span", {
|
|
12845
12870
|
class: normalizeClass(["lupa-term-checkbox", { checked: isChecked.value }])
|
|
12846
12871
|
}, null, 2)
|
|
12847
12872
|
]),
|
|
12848
|
-
createBaseVNode("div", _hoisted_2$
|
|
12873
|
+
createBaseVNode("div", _hoisted_2$w, [
|
|
12849
12874
|
createBaseVNode("span", _hoisted_3$m, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
|
|
12850
12875
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$g, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
|
|
12851
12876
|
])
|
|
@@ -12866,13 +12891,13 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
12866
12891
|
};
|
|
12867
12892
|
}
|
|
12868
12893
|
});
|
|
12869
|
-
const _hoisted_1$
|
|
12894
|
+
const _hoisted_1$H = {
|
|
12870
12895
|
class: "lupa-search-result-facet-term-values lupa-search-result-facet-hierarchy-values",
|
|
12871
12896
|
"data-cy": "lupa-search-result-facet-term-values"
|
|
12872
12897
|
};
|
|
12873
|
-
const _hoisted_2$
|
|
12898
|
+
const _hoisted_2$v = { key: 0 };
|
|
12874
12899
|
const _hoisted_3$l = ["placeholder"];
|
|
12875
|
-
const _sfc_main$
|
|
12900
|
+
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
12876
12901
|
__name: "HierarchyFacet",
|
|
12877
12902
|
props: {
|
|
12878
12903
|
options: {},
|
|
@@ -12922,8 +12947,8 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
12922
12947
|
showAll.value = true;
|
|
12923
12948
|
};
|
|
12924
12949
|
return (_ctx, _cache) => {
|
|
12925
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12926
|
-
isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
12950
|
+
return openBlock(), createElementBlock("div", _hoisted_1$H, [
|
|
12951
|
+
isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$v, [
|
|
12927
12952
|
withDirectives(createBaseVNode("input", {
|
|
12928
12953
|
class: "lupa-term-filter",
|
|
12929
12954
|
"data-cy": "lupa-term-filter",
|
|
@@ -12934,7 +12959,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
12934
12959
|
])
|
|
12935
12960
|
])) : createCommentVNode("", true),
|
|
12936
12961
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
|
|
12937
|
-
return openBlock(), createBlock(_sfc_main$
|
|
12962
|
+
return openBlock(), createBlock(_sfc_main$L, {
|
|
12938
12963
|
key: item.title,
|
|
12939
12964
|
options: _ctx.options,
|
|
12940
12965
|
item,
|
|
@@ -12954,20 +12979,20 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
12954
12979
|
};
|
|
12955
12980
|
}
|
|
12956
12981
|
});
|
|
12957
|
-
const _hoisted_1$
|
|
12958
|
-
const _hoisted_2$
|
|
12982
|
+
const _hoisted_1$G = { class: "lupa-facet-label-text" };
|
|
12983
|
+
const _hoisted_2$u = {
|
|
12959
12984
|
key: 0,
|
|
12960
12985
|
class: "lupa-facet-content",
|
|
12961
12986
|
"data-cy": "lupa-facet-content"
|
|
12962
12987
|
};
|
|
12963
12988
|
const __default__$1 = {
|
|
12964
12989
|
components: {
|
|
12965
|
-
TermFacet: _sfc_main$
|
|
12966
|
-
StatsFacet: _sfc_main$
|
|
12967
|
-
HierarchyFacet: _sfc_main$
|
|
12990
|
+
TermFacet: _sfc_main$N,
|
|
12991
|
+
StatsFacet: _sfc_main$M,
|
|
12992
|
+
HierarchyFacet: _sfc_main$K
|
|
12968
12993
|
}
|
|
12969
12994
|
};
|
|
12970
|
-
const _sfc_main$
|
|
12995
|
+
const _sfc_main$J = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
|
|
12971
12996
|
__name: "FacetDisplay",
|
|
12972
12997
|
props: {
|
|
12973
12998
|
options: {},
|
|
@@ -13079,12 +13104,12 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
13079
13104
|
"data-cy": "lupa-search-result-facet-label",
|
|
13080
13105
|
onClick: toggleFacet
|
|
13081
13106
|
}, [
|
|
13082
|
-
createBaseVNode("div", _hoisted_1$
|
|
13107
|
+
createBaseVNode("div", _hoisted_1$G, toDisplayString(facet.value.label), 1),
|
|
13083
13108
|
createBaseVNode("div", {
|
|
13084
13109
|
class: normalizeClass(["lupa-facet-label-caret", isOpen.value && "open"])
|
|
13085
13110
|
}, null, 2)
|
|
13086
13111
|
], 2),
|
|
13087
|
-
isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
13112
|
+
isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$u, [
|
|
13088
13113
|
(openBlock(), createBlock(resolveDynamicComponent(facetType.value), {
|
|
13089
13114
|
facet: facet.value,
|
|
13090
13115
|
currentFilters: currentFilters.value[facet.value.key],
|
|
@@ -13102,12 +13127,12 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
13102
13127
|
};
|
|
13103
13128
|
}
|
|
13104
13129
|
}));
|
|
13105
|
-
const _hoisted_1$
|
|
13106
|
-
const _hoisted_2$
|
|
13130
|
+
const _hoisted_1$F = { class: "lupa-search-result-facet-section" };
|
|
13131
|
+
const _hoisted_2$t = {
|
|
13107
13132
|
key: 0,
|
|
13108
13133
|
class: "lupa-facets-title"
|
|
13109
13134
|
};
|
|
13110
|
-
const _sfc_main$
|
|
13135
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
13111
13136
|
__name: "FacetList",
|
|
13112
13137
|
props: {
|
|
13113
13138
|
options: {},
|
|
@@ -13141,14 +13166,14 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
13141
13166
|
};
|
|
13142
13167
|
return (_ctx, _cache) => {
|
|
13143
13168
|
var _a;
|
|
13144
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
13145
|
-
_ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
13169
|
+
return openBlock(), createElementBlock("div", _hoisted_1$F, [
|
|
13170
|
+
_ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$t, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
|
|
13146
13171
|
createBaseVNode("div", {
|
|
13147
13172
|
class: normalizeClass(["lupa-search-result-facet-list", "lupa-" + ((_a = _ctx.facetStyle) != null ? _a : "")])
|
|
13148
13173
|
}, [
|
|
13149
13174
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayFacets.value, (facet) => {
|
|
13150
13175
|
var _a2;
|
|
13151
|
-
return openBlock(), createBlock(_sfc_main$
|
|
13176
|
+
return openBlock(), createBlock(_sfc_main$J, {
|
|
13152
13177
|
key: facet.key,
|
|
13153
13178
|
facet,
|
|
13154
13179
|
currentFilters: currentFiltersValue.value,
|
|
@@ -13163,7 +13188,33 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
13163
13188
|
};
|
|
13164
13189
|
}
|
|
13165
13190
|
});
|
|
13191
|
+
const _hoisted_1$E = ["onClick"];
|
|
13192
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
13193
|
+
__name: "FacetsButton",
|
|
13194
|
+
props: {
|
|
13195
|
+
options: {}
|
|
13196
|
+
},
|
|
13197
|
+
emits: ["filter"],
|
|
13198
|
+
setup(__props, { emit: emit2 }) {
|
|
13199
|
+
const props = __props;
|
|
13200
|
+
const label = computed(() => {
|
|
13201
|
+
var _a, _b;
|
|
13202
|
+
return (_b = (_a = props.options.labels) == null ? void 0 : _a.facetFilterButton) != null ? _b : "";
|
|
13203
|
+
});
|
|
13204
|
+
const handleClick = () => {
|
|
13205
|
+
emit2("filter");
|
|
13206
|
+
};
|
|
13207
|
+
return (_ctx, _cache) => {
|
|
13208
|
+
return label.value ? (openBlock(), createElementBlock("button", {
|
|
13209
|
+
key: 0,
|
|
13210
|
+
class: "lupa-facets-button-filter",
|
|
13211
|
+
onClick: withModifiers(handleClick, ["stop"])
|
|
13212
|
+
}, toDisplayString(label.value), 9, _hoisted_1$E)) : createCommentVNode("", true);
|
|
13213
|
+
};
|
|
13214
|
+
}
|
|
13215
|
+
});
|
|
13166
13216
|
const _hoisted_1$D = { class: "lupa-search-result-facets" };
|
|
13217
|
+
const _hoisted_2$s = { class: "lupa-facets-filter-button-wrapper" };
|
|
13167
13218
|
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
13168
13219
|
__name: "Facets",
|
|
13169
13220
|
props: {
|
|
@@ -13171,7 +13222,8 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
13171
13222
|
facetStyle: {},
|
|
13172
13223
|
clearable: { type: Boolean }
|
|
13173
13224
|
},
|
|
13174
|
-
|
|
13225
|
+
emits: ["filter"],
|
|
13226
|
+
setup(__props, { emit: emit2 }) {
|
|
13175
13227
|
const props = __props;
|
|
13176
13228
|
const paramStore = useParamsStore();
|
|
13177
13229
|
const searchResultStore = useSearchResultStore();
|
|
@@ -13201,6 +13253,9 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
13201
13253
|
timeout: (_f = (_e = searchResultOptions.value.scrollToResults) == null ? void 0 : _e.timeout) != null ? _f : 500
|
|
13202
13254
|
};
|
|
13203
13255
|
});
|
|
13256
|
+
const showFilterButton = computed(() => {
|
|
13257
|
+
return props.options.filterBehavior === "withFilterButton";
|
|
13258
|
+
});
|
|
13204
13259
|
const handleFacetSelect = (facetAction) => {
|
|
13205
13260
|
switch (facetAction.type) {
|
|
13206
13261
|
case "terms":
|
|
@@ -13239,9 +13294,12 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
13239
13294
|
const param = getFacetKey(facet.key, facet.type);
|
|
13240
13295
|
paramStore.removeParameters({ paramsToRemove: [param] });
|
|
13241
13296
|
};
|
|
13297
|
+
const filter = () => {
|
|
13298
|
+
emit2("filter");
|
|
13299
|
+
};
|
|
13242
13300
|
return (_ctx, _cache) => {
|
|
13243
13301
|
return openBlock(), createElementBlock("div", _hoisted_1$D, [
|
|
13244
|
-
regularFacets.value ? (openBlock(), createBlock(_sfc_main$
|
|
13302
|
+
regularFacets.value ? (openBlock(), createBlock(_sfc_main$I, {
|
|
13245
13303
|
key: 0,
|
|
13246
13304
|
options: _ctx.options,
|
|
13247
13305
|
facets: regularFacets.value,
|
|
@@ -13250,7 +13308,14 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
13250
13308
|
clearable: _ctx.clearable,
|
|
13251
13309
|
onSelect: handleFacetSelect,
|
|
13252
13310
|
onClear: clear2
|
|
13253
|
-
}, null, 8, ["options", "facets", "currentFilters", "facetStyle", "clearable"])) : createCommentVNode("", true)
|
|
13311
|
+
}, null, 8, ["options", "facets", "currentFilters", "facetStyle", "clearable"])) : createCommentVNode("", true),
|
|
13312
|
+
createBaseVNode("div", _hoisted_2$s, [
|
|
13313
|
+
showFilterButton.value ? (openBlock(), createBlock(_sfc_main$H, {
|
|
13314
|
+
key: 0,
|
|
13315
|
+
options: _ctx.options,
|
|
13316
|
+
onFilter: filter
|
|
13317
|
+
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
13318
|
+
])
|
|
13254
13319
|
]);
|
|
13255
13320
|
};
|
|
13256
13321
|
}
|
|
@@ -13265,7 +13330,8 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
13265
13330
|
options: {},
|
|
13266
13331
|
expandable: { type: Boolean }
|
|
13267
13332
|
},
|
|
13268
|
-
|
|
13333
|
+
emits: ["filter"],
|
|
13334
|
+
setup(__props, { expose: __expose, emit: emit2 }) {
|
|
13269
13335
|
const props = __props;
|
|
13270
13336
|
const categoryFilters = ref(null);
|
|
13271
13337
|
const desktopFiltersVisible = computed(() => {
|
|
@@ -13279,6 +13345,9 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
13279
13345
|
const showCurrentFilters = computed(() => {
|
|
13280
13346
|
return currentFiltersVisible.value ? Boolean(props.options.facets) : false;
|
|
13281
13347
|
});
|
|
13348
|
+
const filter = () => {
|
|
13349
|
+
emit2("filter");
|
|
13350
|
+
};
|
|
13282
13351
|
const fetch2 = () => {
|
|
13283
13352
|
var _a;
|
|
13284
13353
|
if (categoryFilters.value) {
|
|
@@ -13289,12 +13358,12 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
13289
13358
|
return (_ctx, _cache) => {
|
|
13290
13359
|
var _a;
|
|
13291
13360
|
return openBlock(), createElementBlock("div", _hoisted_1$C, [
|
|
13292
|
-
showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$
|
|
13361
|
+
showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$Q, {
|
|
13293
13362
|
key: 0,
|
|
13294
13363
|
options: _ctx.options.currentFilters,
|
|
13295
13364
|
expandable: (_a = _ctx.expandable) != null ? _a : false
|
|
13296
13365
|
}, null, 8, ["options", "expandable"])) : createCommentVNode("", true),
|
|
13297
|
-
_ctx.options.categories ? (openBlock(), createBlock(_sfc_main$
|
|
13366
|
+
_ctx.options.categories ? (openBlock(), createBlock(_sfc_main$O, {
|
|
13298
13367
|
key: 1,
|
|
13299
13368
|
options: _ctx.options.categories,
|
|
13300
13369
|
ref_key: "categoryFilters",
|
|
@@ -13302,7 +13371,8 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
13302
13371
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
13303
13372
|
_ctx.options.facets ? (openBlock(), createBlock(_sfc_main$G, {
|
|
13304
13373
|
key: 2,
|
|
13305
|
-
options: _ctx.options.facets
|
|
13374
|
+
options: _ctx.options.facets,
|
|
13375
|
+
onFilter: filter
|
|
13306
13376
|
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
13307
13377
|
]);
|
|
13308
13378
|
};
|
|
@@ -13326,7 +13396,8 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
13326
13396
|
props: {
|
|
13327
13397
|
options: {}
|
|
13328
13398
|
},
|
|
13329
|
-
|
|
13399
|
+
emits: ["filter"],
|
|
13400
|
+
setup(__props, { emit: emit2 }) {
|
|
13330
13401
|
const props = __props;
|
|
13331
13402
|
const searchResultStore = useSearchResultStore();
|
|
13332
13403
|
const { currentFilterCount } = storeToRefs(searchResultStore);
|
|
@@ -13346,6 +13417,10 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
13346
13417
|
const handleMobileToggle = () => {
|
|
13347
13418
|
searchResultStore.setSidebarState({ visible: false });
|
|
13348
13419
|
};
|
|
13420
|
+
const filter = () => {
|
|
13421
|
+
emit2("filter");
|
|
13422
|
+
handleMobileToggle();
|
|
13423
|
+
};
|
|
13349
13424
|
return (_ctx, _cache) => {
|
|
13350
13425
|
return isMobileSidebarVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$B, [
|
|
13351
13426
|
createBaseVNode("div", {
|
|
@@ -13366,7 +13441,8 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
13366
13441
|
createBaseVNode("div", _hoisted_7$4, [
|
|
13367
13442
|
createVNode(_sfc_main$F, {
|
|
13368
13443
|
options: _ctx.options,
|
|
13369
|
-
expandable: isActiveFiltersExpanded.value
|
|
13444
|
+
expandable: isActiveFiltersExpanded.value,
|
|
13445
|
+
onFilter: filter
|
|
13370
13446
|
}, null, 8, ["options", "expandable"])
|
|
13371
13447
|
])
|
|
13372
13448
|
])
|
|
@@ -13437,7 +13513,11 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
13437
13513
|
props: {
|
|
13438
13514
|
options: {}
|
|
13439
13515
|
},
|
|
13440
|
-
|
|
13516
|
+
emits: ["filter"],
|
|
13517
|
+
setup(__props, { emit: emit2 }) {
|
|
13518
|
+
const filter = () => {
|
|
13519
|
+
emit2("filter");
|
|
13520
|
+
};
|
|
13441
13521
|
return (_ctx, _cache) => {
|
|
13442
13522
|
var _a;
|
|
13443
13523
|
return openBlock(), createElementBlock("div", _hoisted_1$z, [
|
|
@@ -13445,7 +13525,8 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
13445
13525
|
key: 0,
|
|
13446
13526
|
options: _ctx.options.facets,
|
|
13447
13527
|
"facet-style": (_a = _ctx.options.facets.style) == null ? void 0 : _a.type,
|
|
13448
|
-
clearable: true
|
|
13528
|
+
clearable: true,
|
|
13529
|
+
onFilter: filter
|
|
13449
13530
|
}, null, 8, ["options", "facet-style"])) : createCommentVNode("", true)
|
|
13450
13531
|
]);
|
|
13451
13532
|
};
|
|
@@ -13882,7 +13963,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
13882
13963
|
}, [
|
|
13883
13964
|
createBaseVNode("div", _hoisted_1$t, [
|
|
13884
13965
|
showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$B, { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_2$m)),
|
|
13885
|
-
showItemSummary.value ? (openBlock(), createBlock(_sfc_main$
|
|
13966
|
+
showItemSummary.value ? (openBlock(), createBlock(_sfc_main$T, {
|
|
13886
13967
|
key: 2,
|
|
13887
13968
|
label: searchSummaryLabel.value,
|
|
13888
13969
|
clearable: unref(hasAnyFilter) && showFilterClear.value,
|
|
@@ -13923,7 +14004,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
13923
14004
|
},
|
|
13924
14005
|
setup(__props) {
|
|
13925
14006
|
return (_ctx, _cache) => {
|
|
13926
|
-
return openBlock(), createBlock(_sfc_main$
|
|
14007
|
+
return openBlock(), createBlock(_sfc_main$1e, {
|
|
13927
14008
|
item: _ctx.item,
|
|
13928
14009
|
options: _ctx.options,
|
|
13929
14010
|
"wrapper-class": "lupa-search-results-image-wrapper",
|
|
@@ -14254,7 +14335,8 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
14254
14335
|
item: {},
|
|
14255
14336
|
options: {}
|
|
14256
14337
|
},
|
|
14257
|
-
|
|
14338
|
+
emits: ["productEvent"],
|
|
14339
|
+
setup(__props, { emit: emit2 }) {
|
|
14258
14340
|
const props = __props;
|
|
14259
14341
|
const text = computed(() => {
|
|
14260
14342
|
return props.options.html(props.item);
|
|
@@ -14266,6 +14348,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
14266
14348
|
if (!props.options.action) {
|
|
14267
14349
|
return;
|
|
14268
14350
|
}
|
|
14351
|
+
if (props.options.reportEventOnClick) {
|
|
14352
|
+
emit2("productEvent", { type: props.options.reportEventOnClick });
|
|
14353
|
+
}
|
|
14269
14354
|
yield props.options.action(props.item);
|
|
14270
14355
|
});
|
|
14271
14356
|
return (_ctx, _cache) => {
|
|
@@ -14561,7 +14646,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
14561
14646
|
"data-cy": "lupa-search-result-product-card",
|
|
14562
14647
|
class: ["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]
|
|
14563
14648
|
}, customDocumentHtmlAttributes.value, { onClick: handleClick }), [
|
|
14564
|
-
createVNode(_sfc_main
|
|
14649
|
+
createVNode(_sfc_main$$, { options: badgesOptions.value }, null, 8, ["options"]),
|
|
14565
14650
|
createBaseVNode("div", {
|
|
14566
14651
|
class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
|
|
14567
14652
|
}, [
|
|
@@ -14578,10 +14663,11 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
14578
14663
|
key: element.key,
|
|
14579
14664
|
labels: labels.value,
|
|
14580
14665
|
inStock: isInStock.value,
|
|
14581
|
-
link: link.value
|
|
14666
|
+
link: link.value,
|
|
14667
|
+
onProductEvent: handleProductEvent
|
|
14582
14668
|
}, null, 8, ["item", "element", "labels", "inStock", "link"]);
|
|
14583
14669
|
}), 128)),
|
|
14584
|
-
createVNode(_sfc_main
|
|
14670
|
+
createVNode(_sfc_main$$, {
|
|
14585
14671
|
options: badgesOptions.value,
|
|
14586
14672
|
position: "image",
|
|
14587
14673
|
class: "lupa-image-badges"
|
|
@@ -14924,7 +15010,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
14924
15010
|
options: {},
|
|
14925
15011
|
ssr: { type: Boolean }
|
|
14926
15012
|
},
|
|
14927
|
-
|
|
15013
|
+
emits: ["filter"],
|
|
15014
|
+
setup(__props, { emit: emit2 }) {
|
|
14928
15015
|
const props = __props;
|
|
14929
15016
|
const searchResultStore = useSearchResultStore();
|
|
14930
15017
|
const paramStore = useParamsStore();
|
|
@@ -15015,6 +15102,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
15015
15102
|
params: [{ name: optionStore.getQueryParamName(QUERY_PARAMS$1.PAGE), value: "1" }]
|
|
15016
15103
|
});
|
|
15017
15104
|
};
|
|
15105
|
+
const filter = () => {
|
|
15106
|
+
emit2("filter");
|
|
15107
|
+
};
|
|
15018
15108
|
return (_ctx, _cache) => {
|
|
15019
15109
|
var _a;
|
|
15020
15110
|
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
@@ -15031,9 +15121,10 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
15031
15121
|
key: 1,
|
|
15032
15122
|
class: "lupa-toolbar-mobile",
|
|
15033
15123
|
options: _ctx.options,
|
|
15034
|
-
"pagination-location": "top"
|
|
15124
|
+
"pagination-location": "top",
|
|
15125
|
+
onFilter: filter
|
|
15035
15126
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
15036
|
-
currentFilterOptions.value ? (openBlock(), createBlock(_sfc_main$
|
|
15127
|
+
currentFilterOptions.value ? (openBlock(), createBlock(_sfc_main$Q, {
|
|
15037
15128
|
key: 2,
|
|
15038
15129
|
class: normalizeClass(currentFiltersClass.value),
|
|
15039
15130
|
"data-cy": "lupa-search-result-filters-mobile-toolbar",
|
|
@@ -15388,8 +15479,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
15388
15479
|
class: normalizeClass(["lupa-search-result-wrapper", { "lupa-search-wrapper-no-results": !unref(hasResults) }])
|
|
15389
15480
|
}, [
|
|
15390
15481
|
_ctx.isContainer ? (openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
15391
|
-
createVNode(_sfc_main$
|
|
15392
|
-
createVNode(_sfc_main$
|
|
15482
|
+
createVNode(_sfc_main$U, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
15483
|
+
createVNode(_sfc_main$S, {
|
|
15393
15484
|
"show-summary": true,
|
|
15394
15485
|
options: _ctx.options,
|
|
15395
15486
|
"is-product-list": (_a = _ctx.isProductList) != null ? _a : false
|
|
@@ -15401,7 +15492,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
15401
15492
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
15402
15493
|
_ctx.options.filters ? (openBlock(), createBlock(_sfc_main$E, {
|
|
15403
15494
|
key: 2,
|
|
15404
|
-
options: _ctx.options.filters
|
|
15495
|
+
options: _ctx.options.filters,
|
|
15496
|
+
onFilter: handleParamsChange
|
|
15405
15497
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
15406
15498
|
unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$D, {
|
|
15407
15499
|
key: 3,
|
|
@@ -15412,17 +15504,19 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
15412
15504
|
key: 0,
|
|
15413
15505
|
options: (_b = _ctx.options.filters) != null ? _b : {},
|
|
15414
15506
|
ref_key: "searchResultsFilters",
|
|
15415
|
-
ref: searchResultsFilters
|
|
15507
|
+
ref: searchResultsFilters,
|
|
15508
|
+
onFilter: handleParamsChange
|
|
15416
15509
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
15417
15510
|
createBaseVNode("div", _hoisted_3$4, [
|
|
15418
|
-
createVNode(_sfc_main$
|
|
15419
|
-
createVNode(_sfc_main$
|
|
15511
|
+
createVNode(_sfc_main$U, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
15512
|
+
createVNode(_sfc_main$S, {
|
|
15420
15513
|
options: _ctx.options,
|
|
15421
15514
|
"is-product-list": (_c = _ctx.isProductList) != null ? _c : false
|
|
15422
15515
|
}, null, 8, ["options", "is-product-list"]),
|
|
15423
15516
|
createVNode(_sfc_main$e, {
|
|
15424
15517
|
options: _ctx.options,
|
|
15425
|
-
ssr: ssrEnabled.value
|
|
15518
|
+
ssr: ssrEnabled.value,
|
|
15519
|
+
onFilter: handleParamsChange
|
|
15426
15520
|
}, {
|
|
15427
15521
|
append: withCtx(() => [
|
|
15428
15522
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -15431,8 +15525,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
15431
15525
|
}, 8, ["options", "ssr"])
|
|
15432
15526
|
])
|
|
15433
15527
|
])) : (openBlock(), createElementBlock(Fragment, { key: 5 }, [
|
|
15434
|
-
createVNode(_sfc_main$
|
|
15435
|
-
createVNode(_sfc_main$
|
|
15528
|
+
createVNode(_sfc_main$U, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
15529
|
+
createVNode(_sfc_main$S, {
|
|
15436
15530
|
options: _ctx.options,
|
|
15437
15531
|
"is-product-list": (_d = _ctx.isProductList) != null ? _d : false
|
|
15438
15532
|
}, null, 8, ["options", "is-product-list"]),
|
|
@@ -15441,11 +15535,13 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
15441
15535
|
key: 0,
|
|
15442
15536
|
options: (_e = _ctx.options.filters) != null ? _e : {},
|
|
15443
15537
|
ref_key: "searchResultsFilters",
|
|
15444
|
-
ref: searchResultsFilters
|
|
15538
|
+
ref: searchResultsFilters,
|
|
15539
|
+
onFilter: handleParamsChange
|
|
15445
15540
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
15446
15541
|
createVNode(_sfc_main$e, {
|
|
15447
15542
|
options: _ctx.options,
|
|
15448
|
-
ssr: ssrEnabled.value
|
|
15543
|
+
ssr: ssrEnabled.value,
|
|
15544
|
+
onFilter: handleParamsChange
|
|
15449
15545
|
}, createSlots({
|
|
15450
15546
|
append: withCtx(() => [
|
|
15451
15547
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -21067,7 +21163,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
21067
21163
|
onClick: withModifiers(innerClick, ["stop"])
|
|
21068
21164
|
}, [
|
|
21069
21165
|
createBaseVNode("div", _hoisted_2$7, [
|
|
21070
|
-
createVNode(_sfc_main$
|
|
21166
|
+
createVNode(_sfc_main$V, {
|
|
21071
21167
|
options: fullSearchBoxOptions.value,
|
|
21072
21168
|
"is-search-container": true,
|
|
21073
21169
|
ref_key: "searchBox",
|
|
@@ -22438,7 +22534,7 @@ const _hoisted_4 = {
|
|
|
22438
22534
|
class: "lupa-chat-spinner-main"
|
|
22439
22535
|
};
|
|
22440
22536
|
const _hoisted_5 = { class: "lupasearch-chat-input" };
|
|
22441
|
-
const _sfc_main$
|
|
22537
|
+
const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
22442
22538
|
__name: "ChatContainer",
|
|
22443
22539
|
props: {
|
|
22444
22540
|
options: {}
|
|
@@ -28079,7 +28175,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
28079
28175
|
};
|
|
28080
28176
|
__expose({ fetch: fetch2 });
|
|
28081
28177
|
return (_ctx, _cache) => {
|
|
28082
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
28178
|
+
return openBlock(), createBlock(unref(_sfc_main$V), {
|
|
28083
28179
|
options: fullSearchBoxOptions.value,
|
|
28084
28180
|
ref_key: "searchBox",
|
|
28085
28181
|
ref: searchBox2
|
|
@@ -28916,7 +29012,7 @@ const chat = (options, mountOptions) => {
|
|
|
28916
29012
|
}
|
|
28917
29013
|
return;
|
|
28918
29014
|
}
|
|
28919
|
-
const instance = createVue(options.displayOptions.containerSelector, _sfc_main$
|
|
29015
|
+
const instance = createVue(options.displayOptions.containerSelector, _sfc_main$1n, {
|
|
28920
29016
|
options
|
|
28921
29017
|
});
|
|
28922
29018
|
if (!instance) {
|