@getlupa/client 1.22.1 → 1.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lupaSearch.iife.js +1210 -780
- package/dist/lupaSearch.js +1210 -780
- package/dist/lupaSearch.mjs +1210 -780
- package/dist/lupaSearch.umd.js +1210 -780
- package/dist/style.css +1 -1
- package/dist/types/ResolvedOptions.d.ts +6 -0
- package/package.json +2 -2
package/dist/lupaSearch.mjs
CHANGED
|
@@ -18057,8 +18057,18 @@ const useOptionsStore = /* @__PURE__ */ defineStore("options", () => {
|
|
|
18057
18057
|
);
|
|
18058
18058
|
const trackingOptions = ref({});
|
|
18059
18059
|
const searchResultInitialFilters = ref({});
|
|
18060
|
+
const expandedFacetsInner = ref([]);
|
|
18060
18061
|
const productRecommendationOptions = ref({});
|
|
18061
18062
|
const screenStore = useScreenStore();
|
|
18063
|
+
const expandedFacets = computed({
|
|
18064
|
+
get: () => {
|
|
18065
|
+
var _a25, _b25, _c, _d, _e;
|
|
18066
|
+
return ((_a25 = expandedFacetsInner.value) == null ? void 0 : _a25.length) ? expandedFacetsInner.value : (_e = (_d = (_c = (_b25 = searchResultOptions.value) == null ? void 0 : _b25.filters) == null ? void 0 : _c.facets) == null ? void 0 : _d.expand) != null ? _e : [];
|
|
18067
|
+
},
|
|
18068
|
+
set: (value) => {
|
|
18069
|
+
expandedFacetsInner.value = value;
|
|
18070
|
+
}
|
|
18071
|
+
});
|
|
18062
18072
|
const envOptions = computed(
|
|
18063
18073
|
() => {
|
|
18064
18074
|
var _a25;
|
|
@@ -18158,6 +18168,7 @@ const useOptionsStore = /* @__PURE__ */ defineStore("options", () => {
|
|
|
18158
18168
|
currentResolutionPageSizes,
|
|
18159
18169
|
productRecommendationOptions,
|
|
18160
18170
|
ariaLabels,
|
|
18171
|
+
expandedFacets,
|
|
18161
18172
|
setSearchBoxOptions,
|
|
18162
18173
|
setTrackingOptions,
|
|
18163
18174
|
setSearchResultOptions,
|
|
@@ -19576,7 +19587,7 @@ const getApiUrl = (environment, customBaseUrl) => {
|
|
|
19576
19587
|
}
|
|
19577
19588
|
return Env[environment] || Env["production"];
|
|
19578
19589
|
};
|
|
19579
|
-
const _sfc_main$
|
|
19590
|
+
const _sfc_main$1G = /* @__PURE__ */ defineComponent({
|
|
19580
19591
|
__name: "VoiceSearchProgressCircle",
|
|
19581
19592
|
props: {
|
|
19582
19593
|
isRecording: { type: Boolean },
|
|
@@ -19789,15 +19800,15 @@ function useVoiceRecorder(options) {
|
|
|
19789
19800
|
closeSocket
|
|
19790
19801
|
};
|
|
19791
19802
|
}
|
|
19792
|
-
const _hoisted_1$
|
|
19803
|
+
const _hoisted_1$1o = {
|
|
19793
19804
|
key: 0,
|
|
19794
19805
|
class: "lupa-dialog-overlay"
|
|
19795
19806
|
};
|
|
19796
|
-
const _hoisted_2$
|
|
19797
|
-
const _hoisted_3$
|
|
19798
|
-
const _hoisted_4$
|
|
19799
|
-
const _hoisted_5$
|
|
19800
|
-
const _sfc_main$
|
|
19807
|
+
const _hoisted_2$Y = { class: "lupa-dialog-content" };
|
|
19808
|
+
const _hoisted_3$G = { class: "lupa-listening-text" };
|
|
19809
|
+
const _hoisted_4$w = { class: "lupa-mic-button-wrapper" };
|
|
19810
|
+
const _hoisted_5$m = ["aria-label"];
|
|
19811
|
+
const _sfc_main$1F = /* @__PURE__ */ defineComponent({
|
|
19801
19812
|
__name: "VoiceSearchDialog",
|
|
19802
19813
|
props: {
|
|
19803
19814
|
isOpen: { type: Boolean },
|
|
@@ -19902,21 +19913,21 @@ const _sfc_main$1z = /* @__PURE__ */ defineComponent({
|
|
|
19902
19913
|
return (_ctx, _cache) => {
|
|
19903
19914
|
var _a25, _b25;
|
|
19904
19915
|
return openBlock(), createElementBlock("div", null, [
|
|
19905
|
-
props.isOpen ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
19916
|
+
props.isOpen ? (openBlock(), createElementBlock("div", _hoisted_1$1o, [
|
|
19906
19917
|
createBaseVNode("button", {
|
|
19907
19918
|
class: "lupa-dialog-box-close-button",
|
|
19908
19919
|
onClick: _cache[0] || (_cache[0] = () => emit2("close"))
|
|
19909
19920
|
}),
|
|
19910
|
-
createBaseVNode("div", _hoisted_2$
|
|
19911
|
-
createBaseVNode("p", _hoisted_3$
|
|
19912
|
-
createBaseVNode("div", _hoisted_4$
|
|
19921
|
+
createBaseVNode("div", _hoisted_2$Y, [
|
|
19922
|
+
createBaseVNode("p", _hoisted_3$G, toDisplayString(description.value), 1),
|
|
19923
|
+
createBaseVNode("div", _hoisted_4$w, [
|
|
19913
19924
|
createBaseVNode("button", {
|
|
19914
19925
|
class: normalizeClass(["lupa-mic-button", { recording: unref(isRecording) }]),
|
|
19915
19926
|
onClick: handleRecordingButtonClick,
|
|
19916
19927
|
"aria-controls": "voice-search-microphone",
|
|
19917
19928
|
"aria-label": ((_b25 = (_a25 = labels.value) == null ? void 0 : _a25.aria) == null ? void 0 : _b25.microphone) || "Toggle microphone"
|
|
19918
|
-
}, null, 10, _hoisted_5$
|
|
19919
|
-
createVNode(_sfc_main$
|
|
19929
|
+
}, null, 10, _hoisted_5$m),
|
|
19930
|
+
createVNode(_sfc_main$1G, {
|
|
19920
19931
|
ref_key: "voiceSearchProgressBar",
|
|
19921
19932
|
ref: voiceSearchProgressBar,
|
|
19922
19933
|
class: "lupa-progress-circle",
|
|
@@ -19931,18 +19942,18 @@ const _sfc_main$1z = /* @__PURE__ */ defineComponent({
|
|
|
19931
19942
|
};
|
|
19932
19943
|
}
|
|
19933
19944
|
});
|
|
19934
|
-
const _hoisted_1$
|
|
19935
|
-
const _hoisted_2$
|
|
19936
|
-
const _hoisted_3$
|
|
19937
|
-
const _hoisted_4$
|
|
19938
|
-
const _hoisted_5$
|
|
19939
|
-
const _hoisted_6$
|
|
19945
|
+
const _hoisted_1$1n = { id: "lupa-search-box-input-container" };
|
|
19946
|
+
const _hoisted_2$X = { class: "lupa-input-clear" };
|
|
19947
|
+
const _hoisted_3$F = { id: "lupa-search-box-input" };
|
|
19948
|
+
const _hoisted_4$v = ["value"];
|
|
19949
|
+
const _hoisted_5$l = ["aria-label", "placeholder"];
|
|
19950
|
+
const _hoisted_6$7 = {
|
|
19940
19951
|
key: 0,
|
|
19941
19952
|
class: "lupa-close-label"
|
|
19942
19953
|
};
|
|
19943
19954
|
const _hoisted_7$5 = { key: 1 };
|
|
19944
19955
|
const _hoisted_8$3 = ["aria-label"];
|
|
19945
|
-
const _sfc_main$
|
|
19956
|
+
const _sfc_main$1E = /* @__PURE__ */ defineComponent({
|
|
19946
19957
|
__name: "SearchBoxInput",
|
|
19947
19958
|
props: {
|
|
19948
19959
|
options: {},
|
|
@@ -20074,20 +20085,20 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
|
|
|
20074
20085
|
};
|
|
20075
20086
|
__expose({ focus });
|
|
20076
20087
|
return (_ctx, _cache) => {
|
|
20077
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
20078
|
-
createBaseVNode("div", _hoisted_2$
|
|
20088
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1n, [
|
|
20089
|
+
createBaseVNode("div", _hoisted_2$X, [
|
|
20079
20090
|
createBaseVNode("div", {
|
|
20080
20091
|
class: normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
|
|
20081
20092
|
onClick: clear
|
|
20082
20093
|
}, null, 2)
|
|
20083
20094
|
]),
|
|
20084
|
-
createBaseVNode("div", _hoisted_3$
|
|
20095
|
+
createBaseVNode("div", _hoisted_3$F, [
|
|
20085
20096
|
createBaseVNode("input", {
|
|
20086
20097
|
class: "lupa-hint",
|
|
20087
20098
|
"aria-hidden": "true",
|
|
20088
20099
|
value: showHint.value ? suggestedValue.value.item.suggestion : "",
|
|
20089
20100
|
disabled: ""
|
|
20090
|
-
}, null, 8, _hoisted_4$
|
|
20101
|
+
}, null, 8, _hoisted_4$v),
|
|
20091
20102
|
withDirectives(createBaseVNode("input", mergeProps({
|
|
20092
20103
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
|
|
20093
20104
|
}, inputAttributes.value, {
|
|
@@ -20101,7 +20112,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
|
|
|
20101
20112
|
placeholder: labels.value.placeholder,
|
|
20102
20113
|
onInput: handleInput,
|
|
20103
20114
|
onFocus: handleFocus
|
|
20104
|
-
}), null, 16, _hoisted_5$
|
|
20115
|
+
}), null, 16, _hoisted_5$l), [
|
|
20105
20116
|
[vModelText, inputValue.value]
|
|
20106
20117
|
]),
|
|
20107
20118
|
_ctx.options.showSubmitButton ? (openBlock(), createElementBlock("button", {
|
|
@@ -20116,7 +20127,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
|
|
|
20116
20127
|
class: "lupa-close-search-container",
|
|
20117
20128
|
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("close"))
|
|
20118
20129
|
}, [
|
|
20119
|
-
labels.value.close ? (openBlock(), createElementBlock("span", _hoisted_6$
|
|
20130
|
+
labels.value.close ? (openBlock(), createElementBlock("span", _hoisted_6$7, toDisplayString(labels.value.close), 1)) : createCommentVNode("", true)
|
|
20120
20131
|
])) : createCommentVNode("", true),
|
|
20121
20132
|
isVoiceSearchEnabled.value ? (openBlock(), createElementBlock("div", _hoisted_7$5, [
|
|
20122
20133
|
createBaseVNode("button", {
|
|
@@ -20127,7 +20138,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
|
|
|
20127
20138
|
"aria-label": voiceSearchAriaLabel.value
|
|
20128
20139
|
}, null, 8, _hoisted_8$3)
|
|
20129
20140
|
])) : createCommentVNode("", true),
|
|
20130
|
-
isVoiceSearchEnabled.value ? (openBlock(), createBlock(_sfc_main$
|
|
20141
|
+
isVoiceSearchEnabled.value ? (openBlock(), createBlock(_sfc_main$1F, {
|
|
20131
20142
|
key: 2,
|
|
20132
20143
|
ref_key: "voiceDialogOverlay",
|
|
20133
20144
|
ref: voiceDialogOverlay,
|
|
@@ -20141,7 +20152,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
|
|
|
20141
20152
|
};
|
|
20142
20153
|
}
|
|
20143
20154
|
});
|
|
20144
|
-
const _sfc_main$
|
|
20155
|
+
const _sfc_main$1D = /* @__PURE__ */ defineComponent({
|
|
20145
20156
|
__name: "SearchBoxMoreResults",
|
|
20146
20157
|
props: {
|
|
20147
20158
|
labels: {},
|
|
@@ -20179,9 +20190,9 @@ const _sfc_main$1x = /* @__PURE__ */ defineComponent({
|
|
|
20179
20190
|
};
|
|
20180
20191
|
}
|
|
20181
20192
|
});
|
|
20182
|
-
const _hoisted_1$
|
|
20183
|
-
const _hoisted_2$
|
|
20184
|
-
const _sfc_main$
|
|
20193
|
+
const _hoisted_1$1m = { class: "lupa-search-box-history-item" };
|
|
20194
|
+
const _hoisted_2$W = { class: "lupa-search-box-history-item-content" };
|
|
20195
|
+
const _sfc_main$1C = /* @__PURE__ */ defineComponent({
|
|
20185
20196
|
__name: "SearchBoxHistoryItem",
|
|
20186
20197
|
props: {
|
|
20187
20198
|
item: {},
|
|
@@ -20198,8 +20209,8 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
|
|
|
20198
20209
|
emit2("click", { query: props.item });
|
|
20199
20210
|
};
|
|
20200
20211
|
return (_ctx, _cache) => {
|
|
20201
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
20202
|
-
createBaseVNode("div", _hoisted_2$
|
|
20212
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1m, [
|
|
20213
|
+
createBaseVNode("div", _hoisted_2$W, [
|
|
20203
20214
|
createBaseVNode("div", {
|
|
20204
20215
|
class: normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
|
|
20205
20216
|
onClick: click2
|
|
@@ -20213,11 +20224,11 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
|
|
|
20213
20224
|
};
|
|
20214
20225
|
}
|
|
20215
20226
|
});
|
|
20216
|
-
const _hoisted_1$
|
|
20227
|
+
const _hoisted_1$1l = {
|
|
20217
20228
|
key: 0,
|
|
20218
20229
|
class: "lupa-search-box-history-panel"
|
|
20219
20230
|
};
|
|
20220
|
-
const _sfc_main$
|
|
20231
|
+
const _sfc_main$1B = /* @__PURE__ */ defineComponent({
|
|
20221
20232
|
__name: "SearchBoxHistoryPanel",
|
|
20222
20233
|
props: {
|
|
20223
20234
|
options: {}
|
|
@@ -20268,9 +20279,9 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
|
|
|
20268
20279
|
}
|
|
20269
20280
|
};
|
|
20270
20281
|
return (_ctx, _cache) => {
|
|
20271
|
-
return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
20282
|
+
return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1l, [
|
|
20272
20283
|
(openBlock(true), createElementBlock(Fragment, null, renderList(limitedHistory.value, (item, index) => {
|
|
20273
|
-
return openBlock(), createBlock(_sfc_main$
|
|
20284
|
+
return openBlock(), createBlock(_sfc_main$1C, {
|
|
20274
20285
|
key: item,
|
|
20275
20286
|
item,
|
|
20276
20287
|
highlighted: index === highlightIndex.value,
|
|
@@ -20286,15 +20297,15 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
|
|
|
20286
20297
|
};
|
|
20287
20298
|
}
|
|
20288
20299
|
});
|
|
20289
|
-
const _hoisted_1$
|
|
20290
|
-
const _sfc_main$
|
|
20300
|
+
const _hoisted_1$1k = { class: "lupa-search-box-no-results" };
|
|
20301
|
+
const _sfc_main$1A = /* @__PURE__ */ defineComponent({
|
|
20291
20302
|
__name: "SearchBoxNoResults",
|
|
20292
20303
|
props: {
|
|
20293
20304
|
labels: {}
|
|
20294
20305
|
},
|
|
20295
20306
|
setup(__props) {
|
|
20296
20307
|
return (_ctx, _cache) => {
|
|
20297
|
-
return openBlock(), createElementBlock("p", _hoisted_1$
|
|
20308
|
+
return openBlock(), createElementBlock("p", _hoisted_1$1k, toDisplayString(_ctx.labels.noResults), 1);
|
|
20298
20309
|
};
|
|
20299
20310
|
}
|
|
20300
20311
|
});
|
|
@@ -20326,26 +20337,26 @@ const generateGridTemplate = (elements) => {
|
|
|
20326
20337
|
}
|
|
20327
20338
|
return gridTemplate.join(" ");
|
|
20328
20339
|
};
|
|
20329
|
-
const _hoisted_1$
|
|
20330
|
-
const _hoisted_2$
|
|
20340
|
+
const _hoisted_1$1j = ["innerHTML"];
|
|
20341
|
+
const _hoisted_2$V = {
|
|
20331
20342
|
key: 1,
|
|
20332
20343
|
"data-cy": "lupa-suggestion-value",
|
|
20333
20344
|
class: "lupa-suggestion-value"
|
|
20334
20345
|
};
|
|
20335
|
-
const _hoisted_3$
|
|
20346
|
+
const _hoisted_3$E = {
|
|
20336
20347
|
key: 2,
|
|
20337
20348
|
class: "lupa-suggestion-facet",
|
|
20338
20349
|
"data-cy": "lupa-suggestion-facet"
|
|
20339
20350
|
};
|
|
20340
|
-
const _hoisted_4$
|
|
20351
|
+
const _hoisted_4$u = {
|
|
20341
20352
|
class: "lupa-suggestion-facet-label",
|
|
20342
20353
|
"data-cy": "lupa-suggestion-facet-label"
|
|
20343
20354
|
};
|
|
20344
|
-
const _hoisted_5$
|
|
20355
|
+
const _hoisted_5$k = {
|
|
20345
20356
|
class: "lupa-suggestion-facet-value",
|
|
20346
20357
|
"data-cy": "lupa-suggestion-facet-value"
|
|
20347
20358
|
};
|
|
20348
|
-
const _sfc_main$
|
|
20359
|
+
const _sfc_main$1z = /* @__PURE__ */ defineComponent({
|
|
20349
20360
|
__name: "SearchBoxSuggestion",
|
|
20350
20361
|
props: {
|
|
20351
20362
|
suggestion: {},
|
|
@@ -20382,20 +20393,20 @@ const _sfc_main$1t = /* @__PURE__ */ defineComponent({
|
|
|
20382
20393
|
class: "lupa-suggestion-value",
|
|
20383
20394
|
"data-cy": "lupa-suggestion-value",
|
|
20384
20395
|
innerHTML: _ctx.suggestion.displayHighlight
|
|
20385
|
-
}, null, 8, _hoisted_1$
|
|
20386
|
-
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
20387
|
-
createBaseVNode("span", _hoisted_4$
|
|
20388
|
-
createBaseVNode("span", _hoisted_5$
|
|
20396
|
+
}, null, 8, _hoisted_1$1j)) : (openBlock(), createElementBlock("div", _hoisted_2$V, toDisplayString(_ctx.suggestion.display), 1)),
|
|
20397
|
+
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$E, [
|
|
20398
|
+
createBaseVNode("span", _hoisted_4$u, toDisplayString(facetLabel.value), 1),
|
|
20399
|
+
createBaseVNode("span", _hoisted_5$k, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
20389
20400
|
])) : createCommentVNode("", true)
|
|
20390
20401
|
]);
|
|
20391
20402
|
};
|
|
20392
20403
|
}
|
|
20393
20404
|
});
|
|
20394
|
-
const _hoisted_1$
|
|
20405
|
+
const _hoisted_1$1i = {
|
|
20395
20406
|
id: "lupa-search-box-suggestions",
|
|
20396
20407
|
"data-cy": "lupa-search-box-suggestions"
|
|
20397
20408
|
};
|
|
20398
|
-
const _sfc_main$
|
|
20409
|
+
const _sfc_main$1y = /* @__PURE__ */ defineComponent({
|
|
20399
20410
|
__name: "SearchBoxSuggestions",
|
|
20400
20411
|
props: {
|
|
20401
20412
|
items: {},
|
|
@@ -20462,9 +20473,9 @@ const _sfc_main$1s = /* @__PURE__ */ defineComponent({
|
|
|
20462
20473
|
});
|
|
20463
20474
|
});
|
|
20464
20475
|
return (_ctx, _cache) => {
|
|
20465
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
20476
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1i, [
|
|
20466
20477
|
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
|
|
20467
|
-
return openBlock(), createBlock(_sfc_main$
|
|
20478
|
+
return openBlock(), createBlock(_sfc_main$1z, {
|
|
20468
20479
|
key: getSuggestionKey(item),
|
|
20469
20480
|
class: normalizeClass([
|
|
20470
20481
|
"lupa-suggestion",
|
|
@@ -20496,7 +20507,7 @@ const debounce = (func, timeout) => {
|
|
|
20496
20507
|
}, timeout);
|
|
20497
20508
|
};
|
|
20498
20509
|
};
|
|
20499
|
-
const _sfc_main$
|
|
20510
|
+
const _sfc_main$1x = /* @__PURE__ */ defineComponent({
|
|
20500
20511
|
__name: "SearchBoxSuggestionsWrapper",
|
|
20501
20512
|
props: {
|
|
20502
20513
|
panel: {},
|
|
@@ -20539,7 +20550,7 @@ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
|
|
|
20539
20550
|
const getSuggestionsDebounced = debounce(getSuggestions, props.debounce);
|
|
20540
20551
|
watch(() => props.panel.limit, getSuggestionsDebounced);
|
|
20541
20552
|
return (_ctx, _cache) => {
|
|
20542
|
-
return openBlock(), createBlock(_sfc_main$
|
|
20553
|
+
return openBlock(), createBlock(_sfc_main$1y, {
|
|
20543
20554
|
items: searchResult.value,
|
|
20544
20555
|
highlight: _ctx.panel.highlight,
|
|
20545
20556
|
queryKey: _ctx.panel.queryKey,
|
|
@@ -29821,9 +29832,9 @@ const replaceImageWithPlaceholder = (e2, placeholder) => {
|
|
|
29821
29832
|
targetImage.src = placeholder;
|
|
29822
29833
|
}
|
|
29823
29834
|
};
|
|
29824
|
-
const _hoisted_1$
|
|
29825
|
-
const _hoisted_2$
|
|
29826
|
-
const _sfc_main$
|
|
29835
|
+
const _hoisted_1$1h = ["src"];
|
|
29836
|
+
const _hoisted_2$U = ["src"];
|
|
29837
|
+
const _sfc_main$1w = /* @__PURE__ */ defineComponent({
|
|
29827
29838
|
__name: "ProductImage",
|
|
29828
29839
|
props: {
|
|
29829
29840
|
item: {},
|
|
@@ -29965,7 +29976,7 @@ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
|
|
|
29965
29976
|
}, { alt: imageAlt.value ? imageAlt.value : void 0 }, {
|
|
29966
29977
|
onError: replaceWithPlaceholder,
|
|
29967
29978
|
key: finalUrl.value
|
|
29968
|
-
}), null, 16, _hoisted_1$
|
|
29979
|
+
}), null, 16, _hoisted_1$1h))
|
|
29969
29980
|
]),
|
|
29970
29981
|
_: 1
|
|
29971
29982
|
})) : (openBlock(), createElementBlock("img", mergeProps({
|
|
@@ -29973,12 +29984,12 @@ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
|
|
|
29973
29984
|
class: ["lupa-images-main-image", { [_ctx.imageClass]: true }],
|
|
29974
29985
|
style: styleOverride.value,
|
|
29975
29986
|
src: finalMainImageUrl.value
|
|
29976
|
-
}, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_2$
|
|
29987
|
+
}, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_2$U))
|
|
29977
29988
|
], 38);
|
|
29978
29989
|
};
|
|
29979
29990
|
}
|
|
29980
29991
|
});
|
|
29981
|
-
const _sfc_main$
|
|
29992
|
+
const _sfc_main$1v = /* @__PURE__ */ defineComponent({
|
|
29982
29993
|
__name: "SearchBoxProductImage",
|
|
29983
29994
|
props: {
|
|
29984
29995
|
item: {},
|
|
@@ -29986,7 +29997,7 @@ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
|
|
|
29986
29997
|
},
|
|
29987
29998
|
setup(__props) {
|
|
29988
29999
|
return (_ctx, _cache) => {
|
|
29989
|
-
return openBlock(), createBlock(_sfc_main$
|
|
30000
|
+
return openBlock(), createBlock(_sfc_main$1w, {
|
|
29990
30001
|
item: _ctx.item,
|
|
29991
30002
|
options: _ctx.options,
|
|
29992
30003
|
"wrapper-class": "lupa-search-box-image-wrapper",
|
|
@@ -29995,12 +30006,12 @@ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
|
|
|
29995
30006
|
};
|
|
29996
30007
|
}
|
|
29997
30008
|
});
|
|
29998
|
-
const _hoisted_1$
|
|
29999
|
-
const _hoisted_2$
|
|
30009
|
+
const _hoisted_1$1g = ["innerHTML"];
|
|
30010
|
+
const _hoisted_2$T = {
|
|
30000
30011
|
key: 1,
|
|
30001
30012
|
class: "lupa-search-box-product-title"
|
|
30002
30013
|
};
|
|
30003
|
-
const _sfc_main$
|
|
30014
|
+
const _sfc_main$1u = /* @__PURE__ */ defineComponent({
|
|
30004
30015
|
__name: "SearchBoxProductTitle",
|
|
30005
30016
|
props: {
|
|
30006
30017
|
item: {},
|
|
@@ -30023,18 +30034,18 @@ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
|
|
|
30023
30034
|
key: 0,
|
|
30024
30035
|
class: "lupa-search-box-product-title",
|
|
30025
30036
|
innerHTML: sanitizedTitle.value
|
|
30026
|
-
}, null, 8, _hoisted_1$
|
|
30037
|
+
}, null, 8, _hoisted_1$1g)) : (openBlock(), createElementBlock("div", _hoisted_2$T, [
|
|
30027
30038
|
createBaseVNode("strong", null, toDisplayString(title.value), 1)
|
|
30028
30039
|
]));
|
|
30029
30040
|
};
|
|
30030
30041
|
}
|
|
30031
30042
|
});
|
|
30032
|
-
const _hoisted_1$
|
|
30033
|
-
const _hoisted_2$
|
|
30043
|
+
const _hoisted_1$1f = ["innerHTML"];
|
|
30044
|
+
const _hoisted_2$S = {
|
|
30034
30045
|
key: 1,
|
|
30035
30046
|
class: "lupa-search-box-product-description"
|
|
30036
30047
|
};
|
|
30037
|
-
const _sfc_main$
|
|
30048
|
+
const _sfc_main$1t = /* @__PURE__ */ defineComponent({
|
|
30038
30049
|
__name: "SearchBoxProductDescription",
|
|
30039
30050
|
props: {
|
|
30040
30051
|
item: {},
|
|
@@ -30057,12 +30068,12 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
|
30057
30068
|
key: 0,
|
|
30058
30069
|
class: "lupa-search-box-product-description",
|
|
30059
30070
|
innerHTML: sanitizedDescription.value
|
|
30060
|
-
}, null, 8, _hoisted_1$
|
|
30071
|
+
}, null, 8, _hoisted_1$1f)) : (openBlock(), createElementBlock("div", _hoisted_2$S, toDisplayString(description.value), 1));
|
|
30061
30072
|
};
|
|
30062
30073
|
}
|
|
30063
30074
|
});
|
|
30064
|
-
const _hoisted_1$
|
|
30065
|
-
const _sfc_main$
|
|
30075
|
+
const _hoisted_1$1e = { class: "lupa-search-box-product-price" };
|
|
30076
|
+
const _sfc_main$1s = /* @__PURE__ */ defineComponent({
|
|
30066
30077
|
__name: "SearchBoxProductPrice",
|
|
30067
30078
|
props: {
|
|
30068
30079
|
item: {},
|
|
@@ -30084,13 +30095,13 @@ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
|
|
|
30084
30095
|
);
|
|
30085
30096
|
});
|
|
30086
30097
|
return (_ctx, _cache) => {
|
|
30087
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
30098
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1e, [
|
|
30088
30099
|
createBaseVNode("strong", null, toDisplayString(price.value), 1)
|
|
30089
30100
|
]);
|
|
30090
30101
|
};
|
|
30091
30102
|
}
|
|
30092
30103
|
});
|
|
30093
|
-
const _sfc_main$
|
|
30104
|
+
const _sfc_main$1r = /* @__PURE__ */ defineComponent({
|
|
30094
30105
|
__name: "SearchBoxProductRegularPrice",
|
|
30095
30106
|
props: {
|
|
30096
30107
|
item: {},
|
|
@@ -30121,12 +30132,12 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
30121
30132
|
};
|
|
30122
30133
|
}
|
|
30123
30134
|
});
|
|
30124
|
-
const _hoisted_1$
|
|
30125
|
-
const _hoisted_2$
|
|
30126
|
-
const _hoisted_3$
|
|
30127
|
-
const _hoisted_4$
|
|
30128
|
-
const _hoisted_5$
|
|
30129
|
-
const _sfc_main$
|
|
30135
|
+
const _hoisted_1$1d = ["innerHTML"];
|
|
30136
|
+
const _hoisted_2$R = { key: 0 };
|
|
30137
|
+
const _hoisted_3$D = { key: 1 };
|
|
30138
|
+
const _hoisted_4$t = { class: "lupa-search-box-custom-label" };
|
|
30139
|
+
const _hoisted_5$j = { class: "lupa-search-box-custom-text" };
|
|
30140
|
+
const _sfc_main$1q = /* @__PURE__ */ defineComponent({
|
|
30130
30141
|
__name: "SearchBoxProductCustom",
|
|
30131
30142
|
props: {
|
|
30132
30143
|
item: {},
|
|
@@ -30152,20 +30163,20 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
30152
30163
|
key: 0,
|
|
30153
30164
|
class: [className.value, "lupa-search-box-product-custom"],
|
|
30154
30165
|
innerHTML: text.value
|
|
30155
|
-
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$
|
|
30166
|
+
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$1d)) : (openBlock(), createElementBlock("div", mergeProps({
|
|
30156
30167
|
key: 1,
|
|
30157
30168
|
class: [className.value, "lupa-search-box-product-custom"]
|
|
30158
30169
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), [
|
|
30159
|
-
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
30160
|
-
createBaseVNode("div", _hoisted_4$
|
|
30161
|
-
createBaseVNode("div", _hoisted_5$
|
|
30170
|
+
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$R, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$D, [
|
|
30171
|
+
createBaseVNode("div", _hoisted_4$t, toDisplayString(label.value), 1),
|
|
30172
|
+
createBaseVNode("div", _hoisted_5$j, toDisplayString(text.value), 1)
|
|
30162
30173
|
]))
|
|
30163
30174
|
], 16));
|
|
30164
30175
|
};
|
|
30165
30176
|
}
|
|
30166
30177
|
});
|
|
30167
|
-
const _hoisted_1$
|
|
30168
|
-
const _sfc_main$
|
|
30178
|
+
const _hoisted_1$1c = ["innerHTML"];
|
|
30179
|
+
const _sfc_main$1p = /* @__PURE__ */ defineComponent({
|
|
30169
30180
|
__name: "SearchBoxProductCustomHtml",
|
|
30170
30181
|
props: {
|
|
30171
30182
|
item: {},
|
|
@@ -30190,7 +30201,7 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
30190
30201
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
30191
30202
|
class: className.value,
|
|
30192
30203
|
innerHTML: text.value
|
|
30193
|
-
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$
|
|
30204
|
+
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$1c);
|
|
30194
30205
|
};
|
|
30195
30206
|
}
|
|
30196
30207
|
});
|
|
@@ -30248,7 +30259,9 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
|
|
|
30248
30259
|
const loadingFacets = ref(false);
|
|
30249
30260
|
const loadingRefiners = ref(false);
|
|
30250
30261
|
const loadingRelatedQueries = ref(false);
|
|
30251
|
-
const
|
|
30262
|
+
const isFilterSidebarVisible = ref(false);
|
|
30263
|
+
const isSidebarClosing = ref(false);
|
|
30264
|
+
const isSortingSidebarVisible = ref(false);
|
|
30252
30265
|
const relatedCategoryChildren = ref([]);
|
|
30253
30266
|
const lastRequestId = ref("");
|
|
30254
30267
|
const searchRequestResults = ref({});
|
|
@@ -30330,16 +30343,36 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
|
|
|
30330
30343
|
return hasResults.value && ((_a25 = searchResult.value.offset) != null ? _a25 : 0) >= totalItems.value;
|
|
30331
30344
|
}
|
|
30332
30345
|
);
|
|
30346
|
+
const toggleSidebarState = ({
|
|
30347
|
+
visible,
|
|
30348
|
+
sidebar = "filter"
|
|
30349
|
+
}) => {
|
|
30350
|
+
if (sidebar === "sorting") {
|
|
30351
|
+
isSortingSidebarVisible.value = visible;
|
|
30352
|
+
return;
|
|
30353
|
+
}
|
|
30354
|
+
isFilterSidebarVisible.value = visible;
|
|
30355
|
+
};
|
|
30333
30356
|
const setSidebarState = ({
|
|
30334
30357
|
visible,
|
|
30335
|
-
disableBodyScrolling = true
|
|
30358
|
+
disableBodyScrolling = true,
|
|
30359
|
+
sidebar = "filter"
|
|
30336
30360
|
}) => {
|
|
30361
|
+
var _a25, _b25, _c, _d;
|
|
30337
30362
|
if (visible && disableBodyScrolling) {
|
|
30338
30363
|
disableBodyScroll();
|
|
30339
30364
|
} else {
|
|
30340
30365
|
enableBodyScroll();
|
|
30341
30366
|
}
|
|
30342
|
-
|
|
30367
|
+
if (visible || !((_d = (_c = (_b25 = (_a25 = searchResultOptions == null ? void 0 : searchResultOptions.value.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.style) == null ? void 0 : _c.drawer) == null ? void 0 : _d.sidebarCloseDelay)) {
|
|
30368
|
+
toggleSidebarState({ visible, sidebar });
|
|
30369
|
+
} else {
|
|
30370
|
+
isSidebarClosing.value = true;
|
|
30371
|
+
setTimeout(() => {
|
|
30372
|
+
toggleSidebarState({ visible, sidebar });
|
|
30373
|
+
isSidebarClosing.value = false;
|
|
30374
|
+
}, searchResultOptions.value.filters.facets.style.drawer.sidebarCloseDelay);
|
|
30375
|
+
}
|
|
30343
30376
|
};
|
|
30344
30377
|
const queryFacet = (_0) => __async2(null, [_0], function* ({ queryKey, facetKey }) {
|
|
30345
30378
|
var _a25, _b25, _c, _d;
|
|
@@ -30441,13 +30474,28 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
|
|
|
30441
30474
|
const setRelatedCategoryChildren = (children) => {
|
|
30442
30475
|
relatedCategoryChildren.value = [...children];
|
|
30443
30476
|
};
|
|
30477
|
+
const preconfiguredRelatedQueryKeys = computed(() => {
|
|
30478
|
+
var _a25, _b25, _c, _d, _e;
|
|
30479
|
+
return (_e = (_d = (_c = (_b25 = (_a25 = searchResultOptions.value) == null ? void 0 : _a25.relatedQueries) == null ? void 0 : _b25.source) == null ? void 0 : _c.queries) == null ? void 0 : _d.map((q) => q.facetKey)) != null ? _e : [];
|
|
30480
|
+
});
|
|
30481
|
+
const relatedQueryFacetKeys = computed(() => {
|
|
30482
|
+
var _a25, _b25, _c;
|
|
30483
|
+
const keysFromRelatedResults = (_c = (_b25 = (_a25 = relatedQueriesResult.value) == null ? void 0 : _a25.relatedQueries) == null ? void 0 : _b25.map((rq) => rq.facetKey)) != null ? _c : [];
|
|
30484
|
+
return Array.from(/* @__PURE__ */ new Set([...preconfiguredRelatedQueryKeys.value, ...keysFromRelatedResults]));
|
|
30485
|
+
});
|
|
30444
30486
|
const queryRelatedQueries = (queryKey, publicQuery, result2, options) => __async2(null, null, function* () {
|
|
30445
|
-
var _a25, _b25;
|
|
30487
|
+
var _a25, _b25, _c;
|
|
30446
30488
|
loadingRelatedQueries.value = true;
|
|
30447
30489
|
const context = getLupaTrackingContext();
|
|
30448
30490
|
const searchText = (_b25 = (_a25 = result2.suggestedSearchText) != null ? _a25 : result2.searchText) != null ? _b25 : "";
|
|
30491
|
+
const publicQueryFiltersWithoutRelatedKeys = __spreadValues2({}, (_c = publicQuery.filters) != null ? _c : {});
|
|
30492
|
+
relatedQueryFacetKeys.value.forEach((facetKey) => {
|
|
30493
|
+
delete publicQueryFiltersWithoutRelatedKeys[facetKey];
|
|
30494
|
+
});
|
|
30495
|
+
const hasRemainingFilters = Object.keys(publicQueryFiltersWithoutRelatedKeys != null ? publicQueryFiltersWithoutRelatedKeys : {}).length > 0;
|
|
30449
30496
|
const query = __spreadProps2(__spreadValues2(__spreadProps2(__spreadValues2({}, publicQuery), {
|
|
30450
|
-
searchText
|
|
30497
|
+
searchText,
|
|
30498
|
+
filters: hasRemainingFilters ? publicQueryFiltersWithoutRelatedKeys : void 0
|
|
30451
30499
|
}), context), {
|
|
30452
30500
|
modifiers: { facets: false, refiners: true }
|
|
30453
30501
|
});
|
|
@@ -30463,7 +30511,9 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
|
|
|
30463
30511
|
});
|
|
30464
30512
|
});
|
|
30465
30513
|
return {
|
|
30466
|
-
|
|
30514
|
+
isFilterSidebarVisible,
|
|
30515
|
+
isSortingSidebarVisible,
|
|
30516
|
+
isSidebarClosing,
|
|
30467
30517
|
searchResult,
|
|
30468
30518
|
columnCount,
|
|
30469
30519
|
addToCartAmount,
|
|
@@ -30489,6 +30539,7 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
|
|
|
30489
30539
|
relatedQueriesResult,
|
|
30490
30540
|
relatedQueriesApiEnabled,
|
|
30491
30541
|
lastResultsSource,
|
|
30542
|
+
relatedQueryFacetKeys,
|
|
30492
30543
|
setSidebarState,
|
|
30493
30544
|
queryFacet,
|
|
30494
30545
|
setLastRequestId,
|
|
@@ -30505,12 +30556,12 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
|
|
|
30505
30556
|
setRelatedQueriesApiEnabled
|
|
30506
30557
|
};
|
|
30507
30558
|
});
|
|
30508
|
-
const _hoisted_1$
|
|
30509
|
-
const _hoisted_2$
|
|
30510
|
-
const _hoisted_3$
|
|
30511
|
-
const _hoisted_4$
|
|
30512
|
-
const _hoisted_5$
|
|
30513
|
-
const _sfc_main$
|
|
30559
|
+
const _hoisted_1$1b = { class: "lupa-search-box-add-to-cart-wrapper" };
|
|
30560
|
+
const _hoisted_2$Q = { class: "lupa-search-box-product-addtocart" };
|
|
30561
|
+
const _hoisted_3$C = ["disabled"];
|
|
30562
|
+
const _hoisted_4$s = ["href"];
|
|
30563
|
+
const _hoisted_5$i = ["disabled"];
|
|
30564
|
+
const _sfc_main$1o = /* @__PURE__ */ defineComponent({
|
|
30514
30565
|
__name: "SearchBoxProductAddToCart",
|
|
30515
30566
|
props: {
|
|
30516
30567
|
item: {},
|
|
@@ -30556,45 +30607,45 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
30556
30607
|
return Boolean(props.link && props.options.link);
|
|
30557
30608
|
});
|
|
30558
30609
|
return (_ctx, _cache) => {
|
|
30559
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
30560
|
-
createBaseVNode("div", _hoisted_2$
|
|
30610
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1b, [
|
|
30611
|
+
createBaseVNode("div", _hoisted_2$Q, [
|
|
30561
30612
|
hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
|
|
30562
30613
|
key: 0,
|
|
30563
30614
|
class: addToCartButtonClass.value,
|
|
30564
30615
|
"data-cy": "lupa-add-to-cart",
|
|
30565
30616
|
disabled: !inStockValue.value || loading.value
|
|
30566
30617
|
}, _ctx.dynamicAttributes, { onClick: handleClick }), [
|
|
30567
|
-
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$
|
|
30568
|
-
], 16, _hoisted_3$
|
|
30618
|
+
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$s)
|
|
30619
|
+
], 16, _hoisted_3$C)) : (openBlock(), createElementBlock("button", mergeProps({
|
|
30569
30620
|
key: 1,
|
|
30570
30621
|
onClick: withModifiers(handleClick, ["stop", "prevent"]),
|
|
30571
30622
|
class: addToCartButtonClass.value,
|
|
30572
30623
|
"data-cy": "lupa-add-to-cart",
|
|
30573
30624
|
type: "button",
|
|
30574
30625
|
disabled: !inStockValue.value || loading.value
|
|
30575
|
-
}, _ctx.dynamicAttributes), toDisplayString(label.value), 17, _hoisted_5$
|
|
30626
|
+
}, _ctx.dynamicAttributes), toDisplayString(label.value), 17, _hoisted_5$i))
|
|
30576
30627
|
])
|
|
30577
30628
|
]);
|
|
30578
30629
|
};
|
|
30579
30630
|
}
|
|
30580
30631
|
});
|
|
30581
|
-
const _hoisted_1$
|
|
30632
|
+
const _hoisted_1$1a = {
|
|
30582
30633
|
key: 1,
|
|
30583
30634
|
class: "lupa-search-box-element-badge-wrapper"
|
|
30584
30635
|
};
|
|
30585
30636
|
const __default__$4 = {
|
|
30586
30637
|
components: {
|
|
30587
|
-
SearchBoxProductImage: _sfc_main$
|
|
30588
|
-
SearchBoxProductTitle: _sfc_main$
|
|
30589
|
-
SearchBoxProductDescription: _sfc_main$
|
|
30590
|
-
SearchBoxProductPrice: _sfc_main$
|
|
30591
|
-
SearchBoxProductRegularPrice: _sfc_main$
|
|
30592
|
-
SearchBoxProductCustom: _sfc_main$
|
|
30593
|
-
SearchBoxProductCustomHtml: _sfc_main$
|
|
30594
|
-
SearchBoxProductAddToCart: _sfc_main$
|
|
30638
|
+
SearchBoxProductImage: _sfc_main$1v,
|
|
30639
|
+
SearchBoxProductTitle: _sfc_main$1u,
|
|
30640
|
+
SearchBoxProductDescription: _sfc_main$1t,
|
|
30641
|
+
SearchBoxProductPrice: _sfc_main$1s,
|
|
30642
|
+
SearchBoxProductRegularPrice: _sfc_main$1r,
|
|
30643
|
+
SearchBoxProductCustom: _sfc_main$1q,
|
|
30644
|
+
SearchBoxProductCustomHtml: _sfc_main$1p,
|
|
30645
|
+
SearchBoxProductAddToCart: _sfc_main$1o
|
|
30595
30646
|
}
|
|
30596
30647
|
};
|
|
30597
|
-
const _sfc_main$
|
|
30648
|
+
const _sfc_main$1n = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
|
|
30598
30649
|
__name: "SearchBoxProductElement",
|
|
30599
30650
|
props: {
|
|
30600
30651
|
item: {},
|
|
@@ -30666,7 +30717,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
30666
30717
|
"dynamic-attributes": dynamicAttributes.value,
|
|
30667
30718
|
link: _ctx.link
|
|
30668
30719
|
}, renderDynamicAttributesOnParentElement.value && dynamicAttributes.value), null, 16, ["item", "options", "labels", "class", "inStock", "dynamic-attributes", "link"])) : createCommentVNode("", true)
|
|
30669
|
-
], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$
|
|
30720
|
+
], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$1a, [
|
|
30670
30721
|
displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
|
|
30671
30722
|
key: 0,
|
|
30672
30723
|
item: enhancedItem.value,
|
|
@@ -30681,14 +30732,14 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
30681
30732
|
};
|
|
30682
30733
|
}
|
|
30683
30734
|
}));
|
|
30684
|
-
const _hoisted_1$
|
|
30685
|
-
const _hoisted_2$
|
|
30686
|
-
const _hoisted_3$
|
|
30687
|
-
const _hoisted_4$
|
|
30735
|
+
const _hoisted_1$19 = { class: "lupa-badge-title" };
|
|
30736
|
+
const _hoisted_2$P = ["src"];
|
|
30737
|
+
const _hoisted_3$B = { key: 1 };
|
|
30738
|
+
const _hoisted_4$r = {
|
|
30688
30739
|
key: 0,
|
|
30689
30740
|
class: "lupa-badge-full-text"
|
|
30690
30741
|
};
|
|
30691
|
-
const _sfc_main$
|
|
30742
|
+
const _sfc_main$1m = /* @__PURE__ */ defineComponent({
|
|
30692
30743
|
__name: "SearchResultGeneratedBadge",
|
|
30693
30744
|
props: {
|
|
30694
30745
|
options: {},
|
|
@@ -30721,20 +30772,20 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
30721
30772
|
class: normalizeClass(["lupa-dynamic-badge", customClassName.value]),
|
|
30722
30773
|
style: normalizeStyle({ background: _ctx.badge.backgroundColor, color: _ctx.badge.color })
|
|
30723
30774
|
}, [
|
|
30724
|
-
createBaseVNode("span", _hoisted_1$
|
|
30775
|
+
createBaseVNode("span", _hoisted_1$19, [
|
|
30725
30776
|
image.value ? (openBlock(), createElementBlock("img", {
|
|
30726
30777
|
key: 0,
|
|
30727
30778
|
src: image.value
|
|
30728
|
-
}, null, 8, _hoisted_2$
|
|
30729
|
-
hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
30779
|
+
}, null, 8, _hoisted_2$P)) : createCommentVNode("", true),
|
|
30780
|
+
hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$B, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
|
|
30730
30781
|
]),
|
|
30731
|
-
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
30782
|
+
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$r, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
|
|
30732
30783
|
], 6);
|
|
30733
30784
|
};
|
|
30734
30785
|
}
|
|
30735
30786
|
});
|
|
30736
|
-
const _hoisted_1$
|
|
30737
|
-
const _sfc_main$
|
|
30787
|
+
const _hoisted_1$18 = { class: "lupa-generated-badges" };
|
|
30788
|
+
const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
30738
30789
|
__name: "SearchResultGeneratedBadges",
|
|
30739
30790
|
props: {
|
|
30740
30791
|
options: {}
|
|
@@ -30760,9 +30811,9 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
30760
30811
|
})).filter((b) => Boolean(b.id));
|
|
30761
30812
|
});
|
|
30762
30813
|
return (_ctx, _cache) => {
|
|
30763
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
30814
|
+
return openBlock(), createElementBlock("div", _hoisted_1$18, [
|
|
30764
30815
|
(openBlock(true), createElementBlock(Fragment, null, renderList(badges.value, (badge) => {
|
|
30765
|
-
return openBlock(), createBlock(_sfc_main$
|
|
30816
|
+
return openBlock(), createBlock(_sfc_main$1m, {
|
|
30766
30817
|
key: badge.id,
|
|
30767
30818
|
badge,
|
|
30768
30819
|
options: _ctx.options
|
|
@@ -30772,8 +30823,8 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
30772
30823
|
};
|
|
30773
30824
|
}
|
|
30774
30825
|
});
|
|
30775
|
-
const _hoisted_1$
|
|
30776
|
-
const _sfc_main$
|
|
30826
|
+
const _hoisted_1$17 = ["innerHTML"];
|
|
30827
|
+
const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
30777
30828
|
__name: "CustomBadge",
|
|
30778
30829
|
props: {
|
|
30779
30830
|
badge: {}
|
|
@@ -30794,12 +30845,12 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
|
30794
30845
|
return openBlock(), createElementBlock("div", {
|
|
30795
30846
|
class: normalizeClass(className.value),
|
|
30796
30847
|
innerHTML: text.value
|
|
30797
|
-
}, null, 10, _hoisted_1$
|
|
30848
|
+
}, null, 10, _hoisted_1$17);
|
|
30798
30849
|
};
|
|
30799
30850
|
}
|
|
30800
30851
|
});
|
|
30801
|
-
const _hoisted_1$
|
|
30802
|
-
const _sfc_main$
|
|
30852
|
+
const _hoisted_1$16 = { class: "lupa-text-badges" };
|
|
30853
|
+
const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
30803
30854
|
__name: "TextBadge",
|
|
30804
30855
|
props: {
|
|
30805
30856
|
badge: {}
|
|
@@ -30813,7 +30864,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
30813
30864
|
return badges.value.slice(0, props.badge.maxItems);
|
|
30814
30865
|
});
|
|
30815
30866
|
return (_ctx, _cache) => {
|
|
30816
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
30867
|
+
return openBlock(), createElementBlock("div", _hoisted_1$16, [
|
|
30817
30868
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
|
|
30818
30869
|
return openBlock(), createElementBlock("div", {
|
|
30819
30870
|
class: "lupa-badge lupa-text-badge",
|
|
@@ -30824,9 +30875,9 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
30824
30875
|
};
|
|
30825
30876
|
}
|
|
30826
30877
|
});
|
|
30827
|
-
const _hoisted_1$
|
|
30828
|
-
const _hoisted_2$
|
|
30829
|
-
const _sfc_main$
|
|
30878
|
+
const _hoisted_1$15 = { class: "lupa-image-badges" };
|
|
30879
|
+
const _hoisted_2$O = ["src"];
|
|
30880
|
+
const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
30830
30881
|
__name: "ImageBadge",
|
|
30831
30882
|
props: {
|
|
30832
30883
|
badge: {}
|
|
@@ -30846,7 +30897,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
30846
30897
|
return `${props.badge.rootImageUrl}${src}`;
|
|
30847
30898
|
};
|
|
30848
30899
|
return (_ctx, _cache) => {
|
|
30849
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
30900
|
+
return openBlock(), createElementBlock("div", _hoisted_1$15, [
|
|
30850
30901
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
|
|
30851
30902
|
return openBlock(), createElementBlock("div", {
|
|
30852
30903
|
class: "lupa-badge lupa-image-badge",
|
|
@@ -30854,14 +30905,14 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
30854
30905
|
}, [
|
|
30855
30906
|
createBaseVNode("img", {
|
|
30856
30907
|
src: getImageUrl(item)
|
|
30857
|
-
}, null, 8, _hoisted_2$
|
|
30908
|
+
}, null, 8, _hoisted_2$O)
|
|
30858
30909
|
]);
|
|
30859
30910
|
}), 128))
|
|
30860
30911
|
]);
|
|
30861
30912
|
};
|
|
30862
30913
|
}
|
|
30863
30914
|
});
|
|
30864
|
-
const _sfc_main$
|
|
30915
|
+
const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
30865
30916
|
__name: "DiscountBadge",
|
|
30866
30917
|
props: {
|
|
30867
30918
|
badge: {}
|
|
@@ -30923,16 +30974,16 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
30923
30974
|
};
|
|
30924
30975
|
}
|
|
30925
30976
|
});
|
|
30926
|
-
const _hoisted_1$
|
|
30977
|
+
const _hoisted_1$14 = { id: "lupa-search-results-badges" };
|
|
30927
30978
|
const __default__$3 = {
|
|
30928
30979
|
components: {
|
|
30929
|
-
CustomBadge: _sfc_main$
|
|
30930
|
-
TextBadge: _sfc_main$
|
|
30931
|
-
ImageBadge: _sfc_main$
|
|
30932
|
-
DiscountBadge: _sfc_main$
|
|
30980
|
+
CustomBadge: _sfc_main$1k,
|
|
30981
|
+
TextBadge: _sfc_main$1j,
|
|
30982
|
+
ImageBadge: _sfc_main$1i,
|
|
30983
|
+
DiscountBadge: _sfc_main$1h
|
|
30933
30984
|
}
|
|
30934
30985
|
};
|
|
30935
|
-
const _sfc_main$
|
|
30986
|
+
const _sfc_main$1g = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
|
|
30936
30987
|
__name: "SearchResultsBadgeWrapper",
|
|
30937
30988
|
props: {
|
|
30938
30989
|
position: {},
|
|
@@ -30995,7 +31046,7 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
30995
31046
|
}
|
|
30996
31047
|
};
|
|
30997
31048
|
return (_ctx, _cache) => {
|
|
30998
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
31049
|
+
return openBlock(), createElementBlock("div", _hoisted_1$14, [
|
|
30999
31050
|
createBaseVNode("div", {
|
|
31000
31051
|
id: "lupa-badges",
|
|
31001
31052
|
class: normalizeClass(anchorPosition.value)
|
|
@@ -31006,7 +31057,7 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
31006
31057
|
badge
|
|
31007
31058
|
}, null, 8, ["badge"]);
|
|
31008
31059
|
}), 128)),
|
|
31009
|
-
positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$
|
|
31060
|
+
positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$1l, {
|
|
31010
31061
|
key: 0,
|
|
31011
31062
|
options: _ctx.options
|
|
31012
31063
|
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
@@ -31015,13 +31066,13 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
31015
31066
|
};
|
|
31016
31067
|
}
|
|
31017
31068
|
}));
|
|
31018
|
-
const _hoisted_1$
|
|
31019
|
-
const _hoisted_2$
|
|
31020
|
-
const _hoisted_3$
|
|
31069
|
+
const _hoisted_1$13 = ["href"];
|
|
31070
|
+
const _hoisted_2$N = { class: "lupa-search-box-product-details-section" };
|
|
31071
|
+
const _hoisted_3$A = {
|
|
31021
31072
|
key: 0,
|
|
31022
31073
|
class: "lupa-search-box-product-add-to-cart-section"
|
|
31023
31074
|
};
|
|
31024
|
-
const _sfc_main$
|
|
31075
|
+
const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
31025
31076
|
__name: "SearchBoxProduct",
|
|
31026
31077
|
props: {
|
|
31027
31078
|
item: {},
|
|
@@ -31127,7 +31178,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
31127
31178
|
style: normalizeStyle(imageStyleOverride.value)
|
|
31128
31179
|
}, [
|
|
31129
31180
|
(openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
|
|
31130
|
-
return openBlock(), createBlock(_sfc_main$
|
|
31181
|
+
return openBlock(), createBlock(_sfc_main$1n, {
|
|
31131
31182
|
class: "lupa-search-box-product-element",
|
|
31132
31183
|
key: element.key,
|
|
31133
31184
|
item: _ctx.item,
|
|
@@ -31137,10 +31188,10 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
31137
31188
|
}, null, 8, ["item", "element", "labels", "link"]);
|
|
31138
31189
|
}), 128))
|
|
31139
31190
|
], 4),
|
|
31140
|
-
createBaseVNode("div", _hoisted_2$
|
|
31191
|
+
createBaseVNode("div", _hoisted_2$N, [
|
|
31141
31192
|
(openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
|
|
31142
31193
|
var _a25;
|
|
31143
|
-
return openBlock(), createBlock(_sfc_main$
|
|
31194
|
+
return openBlock(), createBlock(_sfc_main$1n, {
|
|
31144
31195
|
class: "lupa-search-box-product-element",
|
|
31145
31196
|
key: element.key,
|
|
31146
31197
|
item: _ctx.item,
|
|
@@ -31151,7 +31202,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
31151
31202
|
((_a25 = badgeOptions.value) == null ? void 0 : _a25.anchorElementKey) === element.key ? {
|
|
31152
31203
|
name: "badges",
|
|
31153
31204
|
fn: withCtx(() => [
|
|
31154
|
-
createVNode(_sfc_main$
|
|
31205
|
+
createVNode(_sfc_main$1g, {
|
|
31155
31206
|
options: badgeOptions.value,
|
|
31156
31207
|
position: "card"
|
|
31157
31208
|
}, null, 8, ["options"])
|
|
@@ -31167,7 +31218,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
31167
31218
|
class: normalizeClass(`lupa-search-box-group-${group}`)
|
|
31168
31219
|
}, [
|
|
31169
31220
|
(openBlock(true), createElementBlock(Fragment, null, renderList(getGroupElements(group), (element) => {
|
|
31170
|
-
return openBlock(), createBlock(_sfc_main$
|
|
31221
|
+
return openBlock(), createBlock(_sfc_main$1n, {
|
|
31171
31222
|
class: "lupa-search-box-product-element",
|
|
31172
31223
|
key: element.key,
|
|
31173
31224
|
item: _ctx.item,
|
|
@@ -31179,8 +31230,8 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
31179
31230
|
}), 128))
|
|
31180
31231
|
], 2);
|
|
31181
31232
|
}), 128)),
|
|
31182
|
-
addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
31183
|
-
createVNode(_sfc_main$
|
|
31233
|
+
addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_3$A, [
|
|
31234
|
+
createVNode(_sfc_main$1n, {
|
|
31184
31235
|
class: "lupa-search-box-product-element",
|
|
31185
31236
|
item: _ctx.item,
|
|
31186
31237
|
element: addToCartElement.value,
|
|
@@ -31189,7 +31240,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
31189
31240
|
isInStock: isInStock.value
|
|
31190
31241
|
}, null, 8, ["item", "element", "labels", "link", "isInStock"])
|
|
31191
31242
|
])) : createCommentVNode("", true)
|
|
31192
|
-
], 16, _hoisted_1$
|
|
31243
|
+
], 16, _hoisted_1$13);
|
|
31193
31244
|
};
|
|
31194
31245
|
}
|
|
31195
31246
|
});
|
|
@@ -31261,8 +31312,8 @@ const useTrackingStore = /* @__PURE__ */ defineStore("tracking", () => {
|
|
|
31261
31312
|
};
|
|
31262
31313
|
return { trackSearch, trackResults, trackEvent, trackDelayedEvent };
|
|
31263
31314
|
});
|
|
31264
|
-
const _hoisted_1
|
|
31265
|
-
const _sfc_main$
|
|
31315
|
+
const _hoisted_1$12 = { id: "lupa-search-box-products" };
|
|
31316
|
+
const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
31266
31317
|
__name: "SearchBoxProducts",
|
|
31267
31318
|
props: {
|
|
31268
31319
|
items: {},
|
|
@@ -31334,7 +31385,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
31334
31385
|
}
|
|
31335
31386
|
};
|
|
31336
31387
|
return (_ctx, _cache) => {
|
|
31337
|
-
return openBlock(), createElementBlock("div", _hoisted_1
|
|
31388
|
+
return openBlock(), createElementBlock("div", _hoisted_1$12, [
|
|
31338
31389
|
_ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.items, (item, index) => {
|
|
31339
31390
|
return renderSlot(_ctx.$slots, "productCard", {
|
|
31340
31391
|
key: index,
|
|
@@ -31346,7 +31397,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
31346
31397
|
itemClicked: handleProductClick
|
|
31347
31398
|
});
|
|
31348
31399
|
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.items, (item, index) => {
|
|
31349
|
-
return openBlock(), createBlock(_sfc_main$
|
|
31400
|
+
return openBlock(), createBlock(_sfc_main$1f, {
|
|
31350
31401
|
key: index,
|
|
31351
31402
|
item,
|
|
31352
31403
|
panelOptions: _ctx.panelOptions,
|
|
@@ -31361,9 +31412,9 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
31361
31412
|
};
|
|
31362
31413
|
}
|
|
31363
31414
|
});
|
|
31364
|
-
const _hoisted_1$
|
|
31365
|
-
const _hoisted_2$
|
|
31366
|
-
const _sfc_main$
|
|
31415
|
+
const _hoisted_1$11 = { class: "lupa-search-box-documents-go-to-results-wrapper" };
|
|
31416
|
+
const _hoisted_2$M = { key: 0 };
|
|
31417
|
+
const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
31367
31418
|
__name: "SearchBoxProductsGoToResultsButton",
|
|
31368
31419
|
props: {
|
|
31369
31420
|
options: {},
|
|
@@ -31394,13 +31445,13 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
31394
31445
|
emit2("goToResults");
|
|
31395
31446
|
};
|
|
31396
31447
|
return (_ctx, _cache) => {
|
|
31397
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
31448
|
+
return openBlock(), createElementBlock("div", _hoisted_1$11, [
|
|
31398
31449
|
createBaseVNode("button", {
|
|
31399
31450
|
class: "lupa-search-box-documents-go-to-results-button",
|
|
31400
31451
|
onClick: goToResults
|
|
31401
31452
|
}, [
|
|
31402
31453
|
createTextVNode(toDisplayString(goToResultsLabel.value) + " ", 1),
|
|
31403
|
-
totalCount.value ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
31454
|
+
totalCount.value ? (openBlock(), createElementBlock("span", _hoisted_2$M, " " + toDisplayString(totalCount.value), 1)) : createCommentVNode("", true)
|
|
31404
31455
|
])
|
|
31405
31456
|
]);
|
|
31406
31457
|
};
|
|
@@ -31496,7 +31547,7 @@ const processExtractionObject = (value = {}) => {
|
|
|
31496
31547
|
}
|
|
31497
31548
|
return parsedObject;
|
|
31498
31549
|
};
|
|
31499
|
-
const _sfc_main$
|
|
31550
|
+
const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
31500
31551
|
__name: "SearchBoxProductsWrapper",
|
|
31501
31552
|
props: {
|
|
31502
31553
|
panel: {},
|
|
@@ -31566,7 +31617,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
31566
31617
|
watch(() => props.panel.limit, getItemsDebounced);
|
|
31567
31618
|
return (_ctx, _cache) => {
|
|
31568
31619
|
var _a25, _b25;
|
|
31569
|
-
return openBlock(), createBlock(_sfc_main$
|
|
31620
|
+
return openBlock(), createBlock(_sfc_main$1e, {
|
|
31570
31621
|
items: (_b25 = (_a25 = searchResult.value) == null ? void 0 : _a25.items) != null ? _b25 : [],
|
|
31571
31622
|
panelOptions: _ctx.panel,
|
|
31572
31623
|
labels: _ctx.labels,
|
|
@@ -31576,7 +31627,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
31576
31627
|
default: withCtx(() => {
|
|
31577
31628
|
var _a26;
|
|
31578
31629
|
return [
|
|
31579
|
-
showGoToResultsButton.value && ((_a26 = searchResult.value) == null ? void 0 : _a26.items.length) ? (openBlock(), createBlock(_sfc_main$
|
|
31630
|
+
showGoToResultsButton.value && ((_a26 = searchResult.value) == null ? void 0 : _a26.items.length) ? (openBlock(), createBlock(_sfc_main$1d, {
|
|
31580
31631
|
key: 0,
|
|
31581
31632
|
options: _ctx.searchBoxOptions,
|
|
31582
31633
|
panel: _ctx.panel,
|
|
@@ -31597,7 +31648,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
31597
31648
|
};
|
|
31598
31649
|
}
|
|
31599
31650
|
});
|
|
31600
|
-
const _sfc_main$
|
|
31651
|
+
const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
31601
31652
|
__name: "SearchBoxRelatedSourceWrapper",
|
|
31602
31653
|
props: {
|
|
31603
31654
|
panel: {},
|
|
@@ -31669,7 +31720,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
31669
31720
|
});
|
|
31670
31721
|
return (_ctx, _cache) => {
|
|
31671
31722
|
var _a25, _b25;
|
|
31672
|
-
return openBlock(), createBlock(_sfc_main$
|
|
31723
|
+
return openBlock(), createBlock(_sfc_main$1e, {
|
|
31673
31724
|
items: (_b25 = (_a25 = searchResult.value) == null ? void 0 : _a25.items) != null ? _b25 : [],
|
|
31674
31725
|
panelOptions: documentPanelOptions.value,
|
|
31675
31726
|
labels: _ctx.labels,
|
|
@@ -31687,31 +31738,31 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
31687
31738
|
};
|
|
31688
31739
|
}
|
|
31689
31740
|
});
|
|
31690
|
-
const _hoisted_1$
|
|
31741
|
+
const _hoisted_1$10 = {
|
|
31691
31742
|
key: 0,
|
|
31692
31743
|
id: "lupa-search-box-panel"
|
|
31693
31744
|
};
|
|
31694
|
-
const _hoisted_2$
|
|
31695
|
-
const _hoisted_3$
|
|
31745
|
+
const _hoisted_2$L = ["data-cy"];
|
|
31746
|
+
const _hoisted_3$z = {
|
|
31696
31747
|
key: 0,
|
|
31697
31748
|
class: "lupa-panel-title lupa-panel-title-top-results"
|
|
31698
31749
|
};
|
|
31699
|
-
const _hoisted_4$
|
|
31750
|
+
const _hoisted_4$q = {
|
|
31700
31751
|
key: 1,
|
|
31701
31752
|
class: "lupa-panel-title"
|
|
31702
31753
|
};
|
|
31703
|
-
const _hoisted_5$
|
|
31754
|
+
const _hoisted_5$h = {
|
|
31704
31755
|
key: 1,
|
|
31705
31756
|
id: "lupa-search-box-panel"
|
|
31706
31757
|
};
|
|
31707
31758
|
const __default__$2 = {
|
|
31708
31759
|
components: {
|
|
31709
|
-
SearchBoxSuggestionsWrapper: _sfc_main$
|
|
31710
|
-
SearchBoxProductsWrapper: _sfc_main$
|
|
31711
|
-
SearchBoxRelatedSourceWrapper: _sfc_main$
|
|
31760
|
+
SearchBoxSuggestionsWrapper: _sfc_main$1x,
|
|
31761
|
+
SearchBoxProductsWrapper: _sfc_main$1c,
|
|
31762
|
+
SearchBoxRelatedSourceWrapper: _sfc_main$1b
|
|
31712
31763
|
}
|
|
31713
31764
|
};
|
|
31714
|
-
const _sfc_main$
|
|
31765
|
+
const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
|
|
31715
31766
|
__name: "SearchBoxMainPanel",
|
|
31716
31767
|
props: {
|
|
31717
31768
|
options: {},
|
|
@@ -31742,6 +31793,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
31742
31793
|
const searchBoxStore = useSearchBoxStore();
|
|
31743
31794
|
const { suggestionResults, hasAnyResults, panelItemCounts } = storeToRefs(searchBoxStore);
|
|
31744
31795
|
const emit2 = __emit;
|
|
31796
|
+
const isSearchEmpty = computed(() => !props.inputValue || props.inputValue.length < 1);
|
|
31745
31797
|
const displayResults = computed(() => {
|
|
31746
31798
|
var _a25;
|
|
31747
31799
|
return ((_a25 = props.inputValue) == null ? void 0 : _a25.length) >= props.options.minInputLength;
|
|
@@ -31752,6 +31804,12 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
31752
31804
|
return Boolean(props.options.history) && ((_a25 = props.inputValue) == null ? void 0 : _a25.length) < 1 && props.options.minInputLength > 0;
|
|
31753
31805
|
}
|
|
31754
31806
|
);
|
|
31807
|
+
const displayShowMoreResultsButton = computed(() => {
|
|
31808
|
+
if (isSearchEmpty.value && props.options.hideMoreResultsButtonOnEmptyQuery) {
|
|
31809
|
+
return false;
|
|
31810
|
+
}
|
|
31811
|
+
return hasAnyResults.value || !props.options.hideMoreResultsButtonOnNoResults;
|
|
31812
|
+
});
|
|
31755
31813
|
const displayPanels = computed(
|
|
31756
31814
|
() => props.isSearchContainer ? panels.value.filter((p2) => p2.type === SearchBoxPanelType.SUGGESTION) : panels.value
|
|
31757
31815
|
);
|
|
@@ -31869,7 +31927,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
31869
31927
|
ref_key: "panelContainer",
|
|
31870
31928
|
ref: panelContainer
|
|
31871
31929
|
}, [
|
|
31872
|
-
displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
31930
|
+
displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$10, [
|
|
31873
31931
|
labels.value.closePanel ? (openBlock(), createElementBlock("a", {
|
|
31874
31932
|
key: 0,
|
|
31875
31933
|
class: "lupa-search-box-close-panel",
|
|
@@ -31891,8 +31949,8 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
31891
31949
|
style: normalizeStyle(panel.gridArea ? { gridArea: `${panel.gridArea}${index}` } : {}),
|
|
31892
31950
|
"data-cy": "lupa-panel-" + panel.type + "-index"
|
|
31893
31951
|
}, [
|
|
31894
|
-
((_a25 = panel.labels) == null ? void 0 : _a25.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
31895
|
-
((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
31952
|
+
((_a25 = panel.labels) == null ? void 0 : _a25.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$z, toDisplayString((_b25 = panel.labels) == null ? void 0 : _b25.topResultsTitle), 1)) : createCommentVNode("", true),
|
|
31953
|
+
((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$q, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
|
|
31896
31954
|
panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
|
|
31897
31955
|
key: 2,
|
|
31898
31956
|
panel,
|
|
@@ -31914,21 +31972,21 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
31914
31972
|
key: "0"
|
|
31915
31973
|
} : void 0
|
|
31916
31974
|
]), 1064, ["panel", "search-box-options", "options", "debounce", "inputValue", "labels"])) : createCommentVNode("", true)
|
|
31917
|
-
], 14, _hoisted_2$
|
|
31975
|
+
], 14, _hoisted_2$L);
|
|
31918
31976
|
}), 128))
|
|
31919
31977
|
], 4),
|
|
31920
|
-
!unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$
|
|
31978
|
+
!unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1A, {
|
|
31921
31979
|
key: 1,
|
|
31922
31980
|
labels: labels.value
|
|
31923
31981
|
}, null, 8, ["labels"])) : createCommentVNode("", true),
|
|
31924
|
-
|
|
31982
|
+
displayShowMoreResultsButton.value ? (openBlock(), createBlock(_sfc_main$1D, {
|
|
31925
31983
|
key: 2,
|
|
31926
31984
|
labels: labels.value,
|
|
31927
31985
|
options: _ctx.options,
|
|
31928
31986
|
onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
|
|
31929
31987
|
}, null, 8, ["labels", "options"])) : createCommentVNode("", true)
|
|
31930
|
-
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
31931
|
-
createVNode(_sfc_main$
|
|
31988
|
+
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$h, [
|
|
31989
|
+
createVNode(_sfc_main$1B, {
|
|
31932
31990
|
options: _ctx.options.history,
|
|
31933
31991
|
history: history.value,
|
|
31934
31992
|
onGoToResults: handleGoToResults,
|
|
@@ -31953,8 +32011,8 @@ const unbindSearchTriggers = (triggers = [], event) => {
|
|
|
31953
32011
|
const elements = getElements(triggers);
|
|
31954
32012
|
elements.forEach((e2) => e2 == null ? void 0 : e2.removeEventListener(BIND_EVENT, event));
|
|
31955
32013
|
};
|
|
31956
|
-
const _hoisted_1
|
|
31957
|
-
const _sfc_main$
|
|
32014
|
+
const _hoisted_1$$ = { class: "lupa-search-box-wrapper" };
|
|
32015
|
+
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
31958
32016
|
__name: "SearchBox",
|
|
31959
32017
|
props: {
|
|
31960
32018
|
options: {},
|
|
@@ -32005,6 +32063,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
32005
32063
|
"debounce",
|
|
32006
32064
|
"showTotalCount",
|
|
32007
32065
|
"hideMoreResultsButtonOnNoResults",
|
|
32066
|
+
"hideMoreResultsButtonOnEmptyQuery",
|
|
32008
32067
|
"showNoResultsPanel",
|
|
32009
32068
|
"expandOnSinglePanel",
|
|
32010
32069
|
"showMoreResultsButton"
|
|
@@ -32276,8 +32335,8 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
32276
32335
|
id: "lupa-search-box",
|
|
32277
32336
|
class: normalizeClass({ "lupa-search-box-opened": opened.value })
|
|
32278
32337
|
}, [
|
|
32279
|
-
createBaseVNode("div", _hoisted_1
|
|
32280
|
-
createVNode(_sfc_main$
|
|
32338
|
+
createBaseVNode("div", _hoisted_1$$, [
|
|
32339
|
+
createVNode(_sfc_main$1E, {
|
|
32281
32340
|
options: inputOptions.value,
|
|
32282
32341
|
suggestedValue: suggestedValue.value,
|
|
32283
32342
|
"can-close": (_a26 = _ctx.isSearchContainer) != null ? _a26 : false,
|
|
@@ -32290,7 +32349,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
32290
32349
|
onSearch: handleSearch,
|
|
32291
32350
|
onClose: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
|
|
32292
32351
|
}, null, 8, ["options", "suggestedValue", "can-close", "emit-input-on-focus"]),
|
|
32293
|
-
opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$
|
|
32352
|
+
opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$1a, {
|
|
32294
32353
|
key: 0,
|
|
32295
32354
|
options: panelOptions.value,
|
|
32296
32355
|
inputValue: inputValue.value,
|
|
@@ -32378,20 +32437,20 @@ const getSearchParams = (url, params, baseUrl) => {
|
|
|
32378
32437
|
}
|
|
32379
32438
|
return searchParams;
|
|
32380
32439
|
};
|
|
32381
|
-
const _hoisted_1$
|
|
32440
|
+
const _hoisted_1$_ = {
|
|
32382
32441
|
key: 0,
|
|
32383
32442
|
id: "lupa-search-results-did-you-mean"
|
|
32384
32443
|
};
|
|
32385
|
-
const _hoisted_2$
|
|
32444
|
+
const _hoisted_2$K = {
|
|
32386
32445
|
key: 0,
|
|
32387
32446
|
"data-cy": "suggested-search-text-label"
|
|
32388
32447
|
};
|
|
32389
|
-
const _hoisted_3$
|
|
32448
|
+
const _hoisted_3$y = {
|
|
32390
32449
|
key: 1,
|
|
32391
32450
|
"data-cy": "did-you-mean-label"
|
|
32392
32451
|
};
|
|
32393
|
-
const _hoisted_4$
|
|
32394
|
-
const _sfc_main$
|
|
32452
|
+
const _hoisted_4$p = { key: 1 };
|
|
32453
|
+
const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
32395
32454
|
__name: "SearchResultsDidYouMean",
|
|
32396
32455
|
props: {
|
|
32397
32456
|
labels: {}
|
|
@@ -32423,8 +32482,8 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
32423
32482
|
paramStore.goToResults({ searchText, facet });
|
|
32424
32483
|
};
|
|
32425
32484
|
return (_ctx, _cache) => {
|
|
32426
|
-
return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
32427
|
-
unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
32485
|
+
return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$_, [
|
|
32486
|
+
unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$K, [
|
|
32428
32487
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.noResultsSuggestion.split(" "), (label, index) => {
|
|
32429
32488
|
return openBlock(), createElementBlock("span", { key: index }, [
|
|
32430
32489
|
createBaseVNode("span", {
|
|
@@ -32433,7 +32492,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
32433
32492
|
]);
|
|
32434
32493
|
}), 128))
|
|
32435
32494
|
])) : createCommentVNode("", true),
|
|
32436
|
-
didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
32495
|
+
didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$y, [
|
|
32437
32496
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.didYouMean.split(" "), (label, index) => {
|
|
32438
32497
|
return openBlock(), createElementBlock("span", { key: index }, [
|
|
32439
32498
|
label.includes("{1}") ? (openBlock(), createElementBlock("span", {
|
|
@@ -32441,7 +32500,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
32441
32500
|
class: "lupa-did-you-mean lupa-highlighted-search-text",
|
|
32442
32501
|
"data-cy": "did-you-mean-value",
|
|
32443
32502
|
onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
|
|
32444
|
-
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$
|
|
32503
|
+
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(label) + " ", 1))
|
|
32445
32504
|
]);
|
|
32446
32505
|
}), 128))
|
|
32447
32506
|
])) : createCommentVNode("", true)
|
|
@@ -32449,12 +32508,12 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
32449
32508
|
};
|
|
32450
32509
|
}
|
|
32451
32510
|
});
|
|
32452
|
-
const _hoisted_1$
|
|
32511
|
+
const _hoisted_1$Z = {
|
|
32453
32512
|
key: 0,
|
|
32454
32513
|
class: "lupa-search-results-summary"
|
|
32455
32514
|
};
|
|
32456
|
-
const _hoisted_2$
|
|
32457
|
-
const _sfc_main$
|
|
32515
|
+
const _hoisted_2$J = ["innerHTML"];
|
|
32516
|
+
const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
32458
32517
|
__name: "SearchResultsSummary",
|
|
32459
32518
|
props: {
|
|
32460
32519
|
label: {},
|
|
@@ -32469,8 +32528,8 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
32469
32528
|
return addParamsToLabel(props.label, range2, `<span>${totalItems.value}</span>`);
|
|
32470
32529
|
});
|
|
32471
32530
|
return (_ctx, _cache) => {
|
|
32472
|
-
return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
32473
|
-
createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$
|
|
32531
|
+
return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$Z, [
|
|
32532
|
+
createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$J),
|
|
32474
32533
|
_ctx.clearable ? (openBlock(), createElementBlock("span", {
|
|
32475
32534
|
key: 0,
|
|
32476
32535
|
class: "lupa-filter-clear",
|
|
@@ -32481,19 +32540,19 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
32481
32540
|
};
|
|
32482
32541
|
}
|
|
32483
32542
|
});
|
|
32484
|
-
const _hoisted_1$
|
|
32543
|
+
const _hoisted_1$Y = {
|
|
32485
32544
|
key: 0,
|
|
32486
32545
|
class: "lupa-result-page-title",
|
|
32487
32546
|
"data-cy": "lupa-result-page-title"
|
|
32488
32547
|
};
|
|
32489
|
-
const _hoisted_2$
|
|
32490
|
-
const _hoisted_3$
|
|
32548
|
+
const _hoisted_2$I = { key: 0 };
|
|
32549
|
+
const _hoisted_3$x = {
|
|
32491
32550
|
key: 1,
|
|
32492
32551
|
class: "lupa-results-total-count"
|
|
32493
32552
|
};
|
|
32494
|
-
const _hoisted_4$
|
|
32495
|
-
const _hoisted_5$
|
|
32496
|
-
const _sfc_main$
|
|
32553
|
+
const _hoisted_4$o = { class: "lupa-results-total-count-number" };
|
|
32554
|
+
const _hoisted_5$g = ["innerHTML"];
|
|
32555
|
+
const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
32497
32556
|
__name: "SearchResultsTitle",
|
|
32498
32557
|
props: {
|
|
32499
32558
|
options: {},
|
|
@@ -32536,16 +32595,16 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
32536
32595
|
});
|
|
32537
32596
|
return (_ctx, _cache) => {
|
|
32538
32597
|
return openBlock(), createElementBlock("div", null, [
|
|
32539
|
-
showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$
|
|
32598
|
+
showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$Y, [
|
|
32540
32599
|
createTextVNode(toDisplayString(searchResultsTitleTemplate.value || _ctx.options.labels.searchResults), 1),
|
|
32541
|
-
queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
32542
|
-
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
32600
|
+
queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$I, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
|
|
32601
|
+
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$x, [
|
|
32543
32602
|
createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
|
|
32544
|
-
createBaseVNode("span", _hoisted_4$
|
|
32603
|
+
createBaseVNode("span", _hoisted_4$o, toDisplayString(unref(totalItems)), 1),
|
|
32545
32604
|
_cache[0] || (_cache[0] = createTextVNode(")"))
|
|
32546
32605
|
])) : createCommentVNode("", true)
|
|
32547
32606
|
])) : createCommentVNode("", true),
|
|
32548
|
-
_ctx.showSummary ? (openBlock(), createBlock(_sfc_main$
|
|
32607
|
+
_ctx.showSummary ? (openBlock(), createBlock(_sfc_main$17, {
|
|
32549
32608
|
key: 1,
|
|
32550
32609
|
label: summaryLabel.value
|
|
32551
32610
|
}, null, 8, ["label"])) : createCommentVNode("", true),
|
|
@@ -32553,20 +32612,20 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
32553
32612
|
key: 2,
|
|
32554
32613
|
class: "lupa-result-page-description-top",
|
|
32555
32614
|
innerHTML: descriptionTop.value
|
|
32556
|
-
}, null, 8, _hoisted_5$
|
|
32615
|
+
}, null, 8, _hoisted_5$g)) : createCommentVNode("", true)
|
|
32557
32616
|
]);
|
|
32558
32617
|
};
|
|
32559
32618
|
}
|
|
32560
32619
|
});
|
|
32561
|
-
const _hoisted_1$
|
|
32620
|
+
const _hoisted_1$X = {
|
|
32562
32621
|
class: "lupa-current-filter-label",
|
|
32563
32622
|
"data-cy": "lupa-current-filter-label"
|
|
32564
32623
|
};
|
|
32565
|
-
const _hoisted_2$
|
|
32624
|
+
const _hoisted_2$H = {
|
|
32566
32625
|
class: "lupa-current-filter-value",
|
|
32567
32626
|
"data-cy": "lupa-current-filter-value"
|
|
32568
32627
|
};
|
|
32569
|
-
const _sfc_main
|
|
32628
|
+
const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
32570
32629
|
__name: "CurrentFilterDisplay",
|
|
32571
32630
|
props: {
|
|
32572
32631
|
filter: {}
|
|
@@ -32608,23 +32667,23 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
32608
32667
|
onClick: handleClick,
|
|
32609
32668
|
"aria-label": "Remove filter"
|
|
32610
32669
|
}, "⨉"),
|
|
32611
|
-
createBaseVNode("div", _hoisted_1$
|
|
32612
|
-
createBaseVNode("div", _hoisted_2$
|
|
32670
|
+
createBaseVNode("div", _hoisted_1$X, toDisplayString(_ctx.filter.label) + ": ", 1),
|
|
32671
|
+
createBaseVNode("div", _hoisted_2$H, toDisplayString(formatFilterValue(props.filter)), 1)
|
|
32613
32672
|
], 2);
|
|
32614
32673
|
};
|
|
32615
32674
|
}
|
|
32616
32675
|
});
|
|
32617
|
-
const _hoisted_1$
|
|
32618
|
-
const _hoisted_2$
|
|
32676
|
+
const _hoisted_1$W = { class: "lupa-filter-title-text" };
|
|
32677
|
+
const _hoisted_2$G = {
|
|
32619
32678
|
key: 0,
|
|
32620
32679
|
class: "lupa-filter-count"
|
|
32621
32680
|
};
|
|
32622
|
-
const _hoisted_3$
|
|
32681
|
+
const _hoisted_3$w = {
|
|
32623
32682
|
key: 0,
|
|
32624
32683
|
class: "filter-values"
|
|
32625
32684
|
};
|
|
32626
|
-
const _hoisted_4$
|
|
32627
|
-
const _sfc_main$
|
|
32685
|
+
const _hoisted_4$n = { class: "lupa-current-filter-list" };
|
|
32686
|
+
const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
32628
32687
|
__name: "CurrentFilters",
|
|
32629
32688
|
props: {
|
|
32630
32689
|
options: {},
|
|
@@ -32705,19 +32764,19 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
32705
32764
|
class: "lupa-current-filter-title",
|
|
32706
32765
|
onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
|
|
32707
32766
|
}, [
|
|
32708
|
-
createBaseVNode("div", _hoisted_1$
|
|
32767
|
+
createBaseVNode("div", _hoisted_1$W, [
|
|
32709
32768
|
createTextVNode(toDisplayString((_c = (_b25 = (_a25 = _ctx.options) == null ? void 0 : _a25.labels) == null ? void 0 : _b25.title) != null ? _c : "") + " ", 1),
|
|
32710
|
-
_ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
32769
|
+
_ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$G, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
|
|
32711
32770
|
]),
|
|
32712
32771
|
_ctx.expandable ? (openBlock(), createElementBlock("div", {
|
|
32713
32772
|
key: 0,
|
|
32714
32773
|
class: normalizeClass(["lupa-filter-title-caret", isOpen.value && "open"])
|
|
32715
32774
|
}, null, 2)) : createCommentVNode("", true)
|
|
32716
32775
|
]),
|
|
32717
|
-
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
32718
|
-
createBaseVNode("div", _hoisted_4$
|
|
32776
|
+
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$w, [
|
|
32777
|
+
createBaseVNode("div", _hoisted_4$n, [
|
|
32719
32778
|
(openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter) => {
|
|
32720
|
-
return openBlock(), createBlock(_sfc_main
|
|
32779
|
+
return openBlock(), createBlock(_sfc_main$15, {
|
|
32721
32780
|
key: filter.key + "_" + filter.value,
|
|
32722
32781
|
filter,
|
|
32723
32782
|
units: units.value,
|
|
@@ -32735,8 +32794,8 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
32735
32794
|
};
|
|
32736
32795
|
}
|
|
32737
32796
|
});
|
|
32738
|
-
const _hoisted_1$
|
|
32739
|
-
const _sfc_main$
|
|
32797
|
+
const _hoisted_1$V = ["href"];
|
|
32798
|
+
const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
32740
32799
|
__name: "CategoryFilterItem",
|
|
32741
32800
|
props: {
|
|
32742
32801
|
options: {},
|
|
@@ -32773,20 +32832,20 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
32773
32832
|
"data-cy": "lupa-child-category-item",
|
|
32774
32833
|
href: urlLink.value,
|
|
32775
32834
|
onClick: handleNavigation
|
|
32776
|
-
}, toDisplayString(title.value), 9, _hoisted_1$
|
|
32835
|
+
}, toDisplayString(title.value), 9, _hoisted_1$V)
|
|
32777
32836
|
], 2);
|
|
32778
32837
|
};
|
|
32779
32838
|
}
|
|
32780
32839
|
});
|
|
32781
|
-
const _hoisted_1$
|
|
32840
|
+
const _hoisted_1$U = {
|
|
32782
32841
|
class: "lupa-category-filter",
|
|
32783
32842
|
"data-cy": "lupa-category-filter"
|
|
32784
32843
|
};
|
|
32785
|
-
const _hoisted_2$
|
|
32786
|
-
const _hoisted_3$
|
|
32787
|
-
const _hoisted_4$
|
|
32788
|
-
const _hoisted_5$
|
|
32789
|
-
const _sfc_main$
|
|
32844
|
+
const _hoisted_2$F = { class: "lupa-category-back" };
|
|
32845
|
+
const _hoisted_3$v = ["href"];
|
|
32846
|
+
const _hoisted_4$m = ["href"];
|
|
32847
|
+
const _hoisted_5$f = { class: "lupa-child-category-list" };
|
|
32848
|
+
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
32790
32849
|
__name: "CategoryFilter",
|
|
32791
32850
|
props: {
|
|
32792
32851
|
options: {}
|
|
@@ -32874,14 +32933,14 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
32874
32933
|
};
|
|
32875
32934
|
__expose({ fetch: fetch2 });
|
|
32876
32935
|
return (_ctx, _cache) => {
|
|
32877
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
32878
|
-
createBaseVNode("div", _hoisted_2$
|
|
32936
|
+
return openBlock(), createElementBlock("div", _hoisted_1$U, [
|
|
32937
|
+
createBaseVNode("div", _hoisted_2$F, [
|
|
32879
32938
|
hasBackButton.value ? (openBlock(), createElementBlock("a", {
|
|
32880
32939
|
key: 0,
|
|
32881
32940
|
"data-cy": "lupa-category-back",
|
|
32882
32941
|
href: backUrlLink.value,
|
|
32883
32942
|
onClick: handleNavigationBack
|
|
32884
|
-
}, toDisplayString(backTitle.value), 9, _hoisted_3$
|
|
32943
|
+
}, toDisplayString(backTitle.value), 9, _hoisted_3$v)) : createCommentVNode("", true)
|
|
32885
32944
|
]),
|
|
32886
32945
|
createBaseVNode("div", {
|
|
32887
32946
|
class: normalizeClass(["lupa-current-category", { "lupa-current-category-active": isActive }])
|
|
@@ -32891,11 +32950,11 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
32891
32950
|
href: parentUrlLink.value,
|
|
32892
32951
|
class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
|
|
32893
32952
|
onClick: handleNavigationParent
|
|
32894
|
-
}, toDisplayString(parentTitle.value), 11, _hoisted_4$
|
|
32953
|
+
}, toDisplayString(parentTitle.value), 11, _hoisted_4$m)
|
|
32895
32954
|
], 2),
|
|
32896
|
-
createBaseVNode("div", _hoisted_5$
|
|
32955
|
+
createBaseVNode("div", _hoisted_5$f, [
|
|
32897
32956
|
(openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
|
|
32898
|
-
return openBlock(), createBlock(_sfc_main$
|
|
32957
|
+
return openBlock(), createBlock(_sfc_main$13, {
|
|
32899
32958
|
key: getCategoryKey(child),
|
|
32900
32959
|
item: child,
|
|
32901
32960
|
options: _ctx.options
|
|
@@ -32906,22 +32965,22 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
32906
32965
|
};
|
|
32907
32966
|
}
|
|
32908
32967
|
});
|
|
32909
|
-
const _hoisted_1$
|
|
32968
|
+
const _hoisted_1$T = {
|
|
32910
32969
|
class: "lupa-search-result-facet-term-values",
|
|
32911
32970
|
"data-cy": "lupa-search-result-facet-term-values"
|
|
32912
32971
|
};
|
|
32913
|
-
const _hoisted_2$
|
|
32914
|
-
const _hoisted_3$
|
|
32915
|
-
const _hoisted_4$
|
|
32916
|
-
const _hoisted_5$
|
|
32917
|
-
const _hoisted_6$
|
|
32972
|
+
const _hoisted_2$E = ["placeholder"];
|
|
32973
|
+
const _hoisted_3$u = { class: "lupa-terms-list" };
|
|
32974
|
+
const _hoisted_4$l = ["onClick"];
|
|
32975
|
+
const _hoisted_5$e = { class: "lupa-term-checkbox-wrapper" };
|
|
32976
|
+
const _hoisted_6$6 = { class: "lupa-term-label" };
|
|
32918
32977
|
const _hoisted_7$4 = {
|
|
32919
32978
|
key: 0,
|
|
32920
32979
|
class: "lupa-term-count"
|
|
32921
32980
|
};
|
|
32922
32981
|
const _hoisted_8$2 = { key: 0 };
|
|
32923
32982
|
const _hoisted_9$2 = { key: 1 };
|
|
32924
|
-
const _sfc_main$
|
|
32983
|
+
const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
32925
32984
|
__name: "TermFacet",
|
|
32926
32985
|
props: {
|
|
32927
32986
|
options: {},
|
|
@@ -33015,17 +33074,17 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
33015
33074
|
}
|
|
33016
33075
|
};
|
|
33017
33076
|
return (_ctx, _cache) => {
|
|
33018
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
33077
|
+
return openBlock(), createElementBlock("div", _hoisted_1$T, [
|
|
33019
33078
|
isFilterable.value ? withDirectives((openBlock(), createElementBlock("input", {
|
|
33020
33079
|
key: 0,
|
|
33021
33080
|
class: "lupa-term-filter",
|
|
33022
33081
|
"data-cy": "lupa-term-filter",
|
|
33023
33082
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
|
|
33024
33083
|
placeholder: _ctx.options.labels.facetFilter
|
|
33025
|
-
}, null, 8, _hoisted_2$
|
|
33084
|
+
}, null, 8, _hoisted_2$E)), [
|
|
33026
33085
|
[vModelText, termFilter.value]
|
|
33027
33086
|
]) : createCommentVNode("", true),
|
|
33028
|
-
createBaseVNode("div", _hoisted_3$
|
|
33087
|
+
createBaseVNode("div", _hoisted_3$u, [
|
|
33029
33088
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
|
|
33030
33089
|
return openBlock(), createElementBlock("div", {
|
|
33031
33090
|
class: normalizeClass(["lupa-facet-term", { checked: isChecked(item) }]),
|
|
@@ -33033,7 +33092,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
33033
33092
|
key: item.title,
|
|
33034
33093
|
onClick: ($event) => handleFacetClick(item)
|
|
33035
33094
|
}, [
|
|
33036
|
-
createBaseVNode("div", _hoisted_5$
|
|
33095
|
+
createBaseVNode("div", _hoisted_5$e, [
|
|
33037
33096
|
createBaseVNode("span", {
|
|
33038
33097
|
class: normalizeClass(["lupa-term-checkbox", { checked: isChecked(item) }])
|
|
33039
33098
|
}, null, 2)
|
|
@@ -33041,10 +33100,10 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
33041
33100
|
createBaseVNode("div", {
|
|
33042
33101
|
class: normalizeClass(["lupa-term-checkbox-label", { [getFacetValueClass(item)]: true }])
|
|
33043
33102
|
}, [
|
|
33044
|
-
createBaseVNode("span", _hoisted_6$
|
|
33103
|
+
createBaseVNode("span", _hoisted_6$6, toDisplayString(getItemLabel(item)), 1),
|
|
33045
33104
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_7$4, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
|
|
33046
33105
|
], 2)
|
|
33047
|
-
], 10, _hoisted_4$
|
|
33106
|
+
], 10, _hoisted_4$l);
|
|
33048
33107
|
}), 128))
|
|
33049
33108
|
]),
|
|
33050
33109
|
displayShowMore.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -33952,21 +34011,33 @@ var m = { name: "Slider", emits: ["input", "update:modelValue", "start", "slide"
|
|
|
33952
34011
|
m.render = function(e2, t, r, i, n, o) {
|
|
33953
34012
|
return openBlock(), createElementBlock("div", mergeProps(e2.sliderProps, { ref: "slider" }), null, 16);
|
|
33954
34013
|
}, m.__file = "src/Slider.vue";
|
|
33955
|
-
const
|
|
33956
|
-
|
|
34014
|
+
const roundToMaxDecimals = (value, maxPrecision = 0.1) => {
|
|
34015
|
+
if (value === void 0 || value === null || Number.isNaN(value)) return "";
|
|
34016
|
+
const log = Math.log10(maxPrecision);
|
|
34017
|
+
const decimals = log < 0 ? Math.round(-log) : 0;
|
|
34018
|
+
const factor = Math.pow(10, decimals);
|
|
34019
|
+
const rounded = Math.round((value + Number.EPSILON) * factor) / factor;
|
|
34020
|
+
let out = rounded.toFixed(decimals);
|
|
34021
|
+
if (Number.isInteger(value)) {
|
|
34022
|
+
out = Math.trunc(value).toString();
|
|
34023
|
+
}
|
|
34024
|
+
return out;
|
|
34025
|
+
};
|
|
34026
|
+
const _hoisted_1$S = { class: "lupa-search-result-facet-stats-values" };
|
|
34027
|
+
const _hoisted_2$D = {
|
|
33957
34028
|
key: 0,
|
|
33958
34029
|
class: "lupa-stats-facet-summary"
|
|
33959
34030
|
};
|
|
33960
|
-
const _hoisted_3$
|
|
34031
|
+
const _hoisted_3$t = {
|
|
33961
34032
|
key: 1,
|
|
33962
34033
|
class: "lupa-stats-facet-summary-input"
|
|
33963
34034
|
};
|
|
33964
|
-
const _hoisted_4$
|
|
33965
|
-
const _hoisted_5$
|
|
34035
|
+
const _hoisted_4$k = { class: "lupa-stats-from" };
|
|
34036
|
+
const _hoisted_5$d = {
|
|
33966
34037
|
key: 0,
|
|
33967
34038
|
class: "lupa-stats-range-label"
|
|
33968
34039
|
};
|
|
33969
|
-
const _hoisted_6$
|
|
34040
|
+
const _hoisted_6$5 = ["min", "max", "pattern", "aria-label"];
|
|
33970
34041
|
const _hoisted_7$3 = { key: 1 };
|
|
33971
34042
|
const _hoisted_8$1 = { key: 2 };
|
|
33972
34043
|
const _hoisted_9$1 = { class: "lupa-stats-to" };
|
|
@@ -33981,7 +34052,7 @@ const _hoisted_14 = {
|
|
|
33981
34052
|
key: 2,
|
|
33982
34053
|
class: "lupa-stats-slider-wrapper"
|
|
33983
34054
|
};
|
|
33984
|
-
const _sfc_main$
|
|
34055
|
+
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
33985
34056
|
__name: "StatsFacet",
|
|
33986
34057
|
props: {
|
|
33987
34058
|
options: {},
|
|
@@ -34100,7 +34171,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
34100
34171
|
const originalSliderRange = computed(() => {
|
|
34101
34172
|
return innerSliderRange.value.length === 2 && (currentFilters.value.gte || currentFilters.value.lte) ? [
|
|
34102
34173
|
Math.max(+currentFilters.value.gte, facetValue.value.min),
|
|
34103
|
-
Math.min(+currentFilters.value.lte, facetValue.value.max)
|
|
34174
|
+
Math.min(+(currentFilters.value.lt || currentFilters.value.lte), facetValue.value.max)
|
|
34104
34175
|
] : [facetValue.value.min, facetValue.value.max];
|
|
34105
34176
|
});
|
|
34106
34177
|
const fromValue = computed({
|
|
@@ -34156,6 +34227,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
34156
34227
|
}
|
|
34157
34228
|
);
|
|
34158
34229
|
const statsSummary = computed(() => {
|
|
34230
|
+
var _a25, _b25;
|
|
34159
34231
|
const [min, max] = originalSliderRange.value;
|
|
34160
34232
|
if (isPrice.value) {
|
|
34161
34233
|
return formatPriceSummary(
|
|
@@ -34166,10 +34238,12 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
34166
34238
|
multiCurrency.value
|
|
34167
34239
|
);
|
|
34168
34240
|
}
|
|
34241
|
+
const minValue = roundToMaxDecimals(min, (_a25 = customInterval.value) != null ? _a25 : 0.1);
|
|
34242
|
+
const maxValue = roundToMaxDecimals(max, (_b25 = customInterval.value) != null ? _b25 : 0.1);
|
|
34169
34243
|
if (unit.value) {
|
|
34170
|
-
return `${
|
|
34244
|
+
return `${minValue} ${unit.value} – ${maxValue} ${unit.value}`;
|
|
34171
34245
|
}
|
|
34172
|
-
return formatRange({ gte:
|
|
34246
|
+
return formatRange({ gte: minValue, lte: maxValue });
|
|
34173
34247
|
});
|
|
34174
34248
|
function handleInputChange() {
|
|
34175
34249
|
if (innerSliderRange.value.length < 2) return;
|
|
@@ -34197,10 +34271,10 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
34197
34271
|
}
|
|
34198
34272
|
);
|
|
34199
34273
|
return (_ctx, _cache) => {
|
|
34200
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
34201
|
-
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
34202
|
-
createBaseVNode("div", _hoisted_4$
|
|
34203
|
-
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
34274
|
+
return openBlock(), createElementBlock("div", _hoisted_1$S, [
|
|
34275
|
+
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$D, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$t, [
|
|
34276
|
+
createBaseVNode("div", _hoisted_4$k, [
|
|
34277
|
+
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_5$d, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
|
|
34204
34278
|
withDirectives(createBaseVNode("input", {
|
|
34205
34279
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
|
|
34206
34280
|
type: "text",
|
|
@@ -34209,7 +34283,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
34209
34283
|
max: facetMax.value,
|
|
34210
34284
|
pattern: sliderInputFormat.value,
|
|
34211
34285
|
"aria-label": ariaLabelFrom.value
|
|
34212
|
-
}, null, 8, _hoisted_6$
|
|
34286
|
+
}, null, 8, _hoisted_6$5), [
|
|
34213
34287
|
[
|
|
34214
34288
|
vModelText,
|
|
34215
34289
|
fromValue.value,
|
|
@@ -34262,17 +34336,17 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
34262
34336
|
};
|
|
34263
34337
|
}
|
|
34264
34338
|
});
|
|
34265
|
-
const _hoisted_1$
|
|
34266
|
-
const _hoisted_2$
|
|
34267
|
-
const _hoisted_3$
|
|
34339
|
+
const _hoisted_1$R = { class: "lupa-term-checkbox-wrapper" };
|
|
34340
|
+
const _hoisted_2$C = { class: "lupa-term-label" };
|
|
34341
|
+
const _hoisted_3$s = {
|
|
34268
34342
|
key: 0,
|
|
34269
34343
|
class: "lupa-term-count"
|
|
34270
34344
|
};
|
|
34271
|
-
const _hoisted_4$
|
|
34345
|
+
const _hoisted_4$j = {
|
|
34272
34346
|
key: 0,
|
|
34273
34347
|
class: "lupa-facet-level"
|
|
34274
34348
|
};
|
|
34275
|
-
const _sfc_main
|
|
34349
|
+
const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
34276
34350
|
__name: "HierarchyFacetLevel",
|
|
34277
34351
|
props: {
|
|
34278
34352
|
options: {},
|
|
@@ -34326,7 +34400,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
34326
34400
|
"data-cy": "lupa-facet-term",
|
|
34327
34401
|
onClick: _cache[0] || (_cache[0] = ($event) => handleFacetClick(_ctx.item))
|
|
34328
34402
|
}, [
|
|
34329
|
-
createBaseVNode("div", _hoisted_1$
|
|
34403
|
+
createBaseVNode("div", _hoisted_1$R, [
|
|
34330
34404
|
createBaseVNode("span", {
|
|
34331
34405
|
class: normalizeClass(["lupa-term-checkbox", { checked: isChecked.value }])
|
|
34332
34406
|
}, null, 2)
|
|
@@ -34334,11 +34408,11 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
34334
34408
|
createBaseVNode("div", {
|
|
34335
34409
|
class: normalizeClass(["lupa-term-checkbox-label", { [getFacetValueClass(_ctx.item)]: true }])
|
|
34336
34410
|
}, [
|
|
34337
|
-
createBaseVNode("span", _hoisted_2$
|
|
34338
|
-
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
34411
|
+
createBaseVNode("span", _hoisted_2$C, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
|
|
34412
|
+
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_3$s, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
|
|
34339
34413
|
], 2)
|
|
34340
34414
|
]),
|
|
34341
|
-
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
34415
|
+
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$j, [
|
|
34342
34416
|
(openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
|
|
34343
34417
|
return openBlock(), createBlock(_component_HierarchyFacetLevel, {
|
|
34344
34418
|
key: itemChild.title,
|
|
@@ -34354,13 +34428,13 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
34354
34428
|
};
|
|
34355
34429
|
}
|
|
34356
34430
|
});
|
|
34357
|
-
const _hoisted_1$
|
|
34431
|
+
const _hoisted_1$Q = {
|
|
34358
34432
|
class: "lupa-search-result-facet-term-values lupa-search-result-facet-hierarchy-values",
|
|
34359
34433
|
"data-cy": "lupa-search-result-facet-term-values"
|
|
34360
34434
|
};
|
|
34361
|
-
const _hoisted_2$
|
|
34362
|
-
const _hoisted_3$
|
|
34363
|
-
const _sfc_main$
|
|
34435
|
+
const _hoisted_2$B = { key: 0 };
|
|
34436
|
+
const _hoisted_3$r = ["placeholder"];
|
|
34437
|
+
const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
34364
34438
|
__name: "HierarchyFacet",
|
|
34365
34439
|
props: {
|
|
34366
34440
|
options: {},
|
|
@@ -34416,19 +34490,19 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
34416
34490
|
showAll.value = false;
|
|
34417
34491
|
};
|
|
34418
34492
|
return (_ctx, _cache) => {
|
|
34419
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
34420
|
-
isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
34493
|
+
return openBlock(), createElementBlock("div", _hoisted_1$Q, [
|
|
34494
|
+
isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$B, [
|
|
34421
34495
|
withDirectives(createBaseVNode("input", {
|
|
34422
34496
|
class: "lupa-term-filter",
|
|
34423
34497
|
"data-cy": "lupa-term-filter",
|
|
34424
34498
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
|
|
34425
34499
|
placeholder: _ctx.options.labels.facetFilter
|
|
34426
|
-
}, null, 8, _hoisted_3$
|
|
34500
|
+
}, null, 8, _hoisted_3$r), [
|
|
34427
34501
|
[vModelText, termFilter.value]
|
|
34428
34502
|
])
|
|
34429
34503
|
])) : createCommentVNode("", true),
|
|
34430
34504
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
|
|
34431
|
-
return openBlock(), createBlock(_sfc_main
|
|
34505
|
+
return openBlock(), createBlock(_sfc_main$$, {
|
|
34432
34506
|
key: item.title,
|
|
34433
34507
|
options: _ctx.options,
|
|
34434
34508
|
item,
|
|
@@ -34452,30 +34526,31 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
34452
34526
|
};
|
|
34453
34527
|
}
|
|
34454
34528
|
});
|
|
34455
|
-
const _hoisted_1$
|
|
34456
|
-
const _hoisted_2$
|
|
34529
|
+
const _hoisted_1$P = { class: "lupa-facet-label-text" };
|
|
34530
|
+
const _hoisted_2$A = {
|
|
34457
34531
|
key: 0,
|
|
34458
34532
|
class: "lupa-facet-content",
|
|
34459
34533
|
"data-cy": "lupa-facet-content"
|
|
34460
34534
|
};
|
|
34461
34535
|
const __default__$1 = {
|
|
34462
34536
|
components: {
|
|
34463
|
-
TermFacet: _sfc_main$
|
|
34464
|
-
StatsFacet: _sfc_main$
|
|
34465
|
-
HierarchyFacet: _sfc_main$
|
|
34537
|
+
TermFacet: _sfc_main$11,
|
|
34538
|
+
StatsFacet: _sfc_main$10,
|
|
34539
|
+
HierarchyFacet: _sfc_main$_
|
|
34466
34540
|
}
|
|
34467
34541
|
};
|
|
34468
|
-
const _sfc_main$
|
|
34542
|
+
const _sfc_main$Z = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
|
|
34469
34543
|
__name: "FacetDisplay",
|
|
34470
34544
|
props: {
|
|
34471
34545
|
options: {},
|
|
34472
34546
|
facet: {},
|
|
34473
34547
|
currentFilters: {},
|
|
34474
|
-
clearable: { type: Boolean }
|
|
34548
|
+
clearable: { type: Boolean },
|
|
34549
|
+
currentFacetStyle: {}
|
|
34475
34550
|
},
|
|
34476
|
-
emits: ["select", "clear"],
|
|
34551
|
+
emits: ["select", "clear", "expand"],
|
|
34477
34552
|
setup(__props, { emit: __emit }) {
|
|
34478
|
-
var _a25, _b25
|
|
34553
|
+
var _a25, _b25;
|
|
34479
34554
|
const props = __props;
|
|
34480
34555
|
const facet = computed(() => {
|
|
34481
34556
|
var _a26;
|
|
@@ -34489,17 +34564,17 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
34489
34564
|
const optionsStore = useOptionsStore();
|
|
34490
34565
|
const screenStore = useScreenStore();
|
|
34491
34566
|
const { currentFilterKeys } = storeToRefs(searchResultStore);
|
|
34492
|
-
const { searchResultOptions } = storeToRefs(optionsStore);
|
|
34567
|
+
const { searchResultOptions, expandedFacets } = storeToRefs(optionsStore);
|
|
34493
34568
|
const { isMobileWidth } = storeToRefs(screenStore);
|
|
34494
34569
|
const emit2 = __emit;
|
|
34495
34570
|
const allExpanded = computed(() => {
|
|
34496
|
-
var _a26, _b26,
|
|
34571
|
+
var _a26, _b26, _c, _d, _e, _f;
|
|
34497
34572
|
if (isMobileWidth.value) {
|
|
34498
|
-
return (
|
|
34573
|
+
return (_c = (_b26 = (_a26 = props.options) == null ? void 0 : _a26.expandAll) == null ? void 0 : _b26.mobile) != null ? _c : false;
|
|
34499
34574
|
}
|
|
34500
34575
|
return (_f = (_e = (_d = props.options) == null ? void 0 : _d.expandAll) == null ? void 0 : _e.desktop) != null ? _f : false;
|
|
34501
34576
|
});
|
|
34502
|
-
const isOpen = ref((
|
|
34577
|
+
const isOpen = ref((_b25 = ((_a25 = expandedFacets.value) == null ? void 0 : _a25.includes(props.facet.key)) || allExpanded.value) != null ? _b25 : false);
|
|
34503
34578
|
const facetPanel = ref(null);
|
|
34504
34579
|
const facetType = computed(() => {
|
|
34505
34580
|
switch (facet.value.type) {
|
|
@@ -34541,9 +34616,16 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
34541
34616
|
var _a26;
|
|
34542
34617
|
return getTranslatedFacetKey(props.facet, (_a26 = searchResultOptions.value.filters) == null ? void 0 : _a26.translations);
|
|
34543
34618
|
});
|
|
34619
|
+
const expandSidebarOnFacetClick = computed(() => {
|
|
34620
|
+
var _a26, _b26, _c;
|
|
34621
|
+
if (!props.currentFacetStyle || props.currentFacetStyle === "sidebar") {
|
|
34622
|
+
return false;
|
|
34623
|
+
}
|
|
34624
|
+
return (_c = (_b26 = (_a26 = props.options.style) == null ? void 0 : _a26.drawer) == null ? void 0 : _b26.expandSidebarOnFacetClick) != null ? _c : false;
|
|
34625
|
+
});
|
|
34544
34626
|
onMounted(() => {
|
|
34545
|
-
var _a26;
|
|
34546
|
-
if (((_a26 = props.options.style) == null ? void 0 : _a26.type) === "top-dropdown") {
|
|
34627
|
+
var _a26, _b26, _c;
|
|
34628
|
+
if (((_a26 = props.options.style) == null ? void 0 : _a26.type) === "top-dropdown" || ((_c = (_b26 = props.options) == null ? void 0 : _b26.style) == null ? void 0 : _c.type) === "drawer") {
|
|
34547
34629
|
window.addEventListener("click", handleMouseClick);
|
|
34548
34630
|
}
|
|
34549
34631
|
});
|
|
@@ -34552,7 +34634,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
34552
34634
|
});
|
|
34553
34635
|
const handleMouseClick = (e2) => {
|
|
34554
34636
|
const el = facetPanel.value;
|
|
34555
|
-
if (!el) {
|
|
34637
|
+
if (!el || !props.currentFacetStyle || props.currentFacetStyle === "sidebar") {
|
|
34556
34638
|
return;
|
|
34557
34639
|
}
|
|
34558
34640
|
const isOutsideElement = el && !el.contains(e2.target);
|
|
@@ -34564,6 +34646,11 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
34564
34646
|
handleFacetQueryFilter();
|
|
34565
34647
|
});
|
|
34566
34648
|
const toggleFacet = () => {
|
|
34649
|
+
if (expandSidebarOnFacetClick.value) {
|
|
34650
|
+
expandedFacets.value = [facet.value.key];
|
|
34651
|
+
emit2("expand");
|
|
34652
|
+
return;
|
|
34653
|
+
}
|
|
34567
34654
|
isOpen.value = !isOpen.value;
|
|
34568
34655
|
handleFacetQueryFilter();
|
|
34569
34656
|
};
|
|
@@ -34596,12 +34683,12 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
34596
34683
|
"data-cy": "lupa-search-result-facet-label",
|
|
34597
34684
|
onClick: toggleFacet
|
|
34598
34685
|
}, [
|
|
34599
|
-
createBaseVNode("div", _hoisted_1$
|
|
34686
|
+
createBaseVNode("div", _hoisted_1$P, toDisplayString(facetLabel.value), 1),
|
|
34600
34687
|
createBaseVNode("div", {
|
|
34601
34688
|
class: normalizeClass(["lupa-facet-label-caret", isOpen.value && "open"])
|
|
34602
34689
|
}, null, 2)
|
|
34603
34690
|
], 2),
|
|
34604
|
-
isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
34691
|
+
isOpen.value && !expandSidebarOnFacetClick.value ? (openBlock(), createElementBlock("div", _hoisted_2$A, [
|
|
34605
34692
|
(openBlock(), createBlock(resolveDynamicComponent(facetType.value), {
|
|
34606
34693
|
facet: facet.value,
|
|
34607
34694
|
currentFilters: currentFilters.value[facet.value.key],
|
|
@@ -34619,12 +34706,154 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
34619
34706
|
};
|
|
34620
34707
|
}
|
|
34621
34708
|
}));
|
|
34622
|
-
const
|
|
34623
|
-
const
|
|
34709
|
+
const useSidebarToggle = () => {
|
|
34710
|
+
const searchResultStore = useSearchResultStore();
|
|
34711
|
+
const optionsStore = useOptionsStore();
|
|
34712
|
+
const { currentFilterCount, isFilterSidebarVisible, isSortingSidebarVisible } = storeToRefs(searchResultStore);
|
|
34713
|
+
const { searchResultOptions } = storeToRefs(optionsStore);
|
|
34714
|
+
const labels = computed(() => {
|
|
34715
|
+
return searchResultOptions.value.labels;
|
|
34716
|
+
});
|
|
34717
|
+
const showMobileFilterCount = computed(
|
|
34718
|
+
() => {
|
|
34719
|
+
var _a25, _b25, _c, _d;
|
|
34720
|
+
return (_d = (_c = (_b25 = (_a25 = searchResultOptions.value.filters) == null ? void 0 : _a25.currentFilters) == null ? void 0 : _b25.mobileSidebar) == null ? void 0 : _c.showFilterCount) != null ? _d : false;
|
|
34721
|
+
}
|
|
34722
|
+
);
|
|
34723
|
+
const disableMobileBodyScrollLock = computed(
|
|
34724
|
+
() => {
|
|
34725
|
+
var _a25, _b25, _c;
|
|
34726
|
+
return (_c = (_b25 = (_a25 = searchResultOptions.value.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.disableMobileBodyScrollLock) != null ? _c : false;
|
|
34727
|
+
}
|
|
34728
|
+
);
|
|
34729
|
+
const isSidebarVisible = computed(
|
|
34730
|
+
() => isFilterSidebarVisible.value || isSortingSidebarVisible.value
|
|
34731
|
+
);
|
|
34732
|
+
const sortLabel = computed(() => {
|
|
34733
|
+
var _a25, _b25;
|
|
34734
|
+
return (_b25 = (_a25 = searchResultOptions.value) == null ? void 0 : _a25.labels) == null ? void 0 : _b25.sortBy;
|
|
34735
|
+
});
|
|
34736
|
+
const defaultLabel = computed(() => {
|
|
34737
|
+
var _a25;
|
|
34738
|
+
return (_a25 = labels.value) == null ? void 0 : _a25.mobileFilterButton;
|
|
34739
|
+
});
|
|
34740
|
+
const activeLabel = computed(() => {
|
|
34741
|
+
var _a25;
|
|
34742
|
+
return (_a25 = labels.value) == null ? void 0 : _a25.mobileFilterButtonActive;
|
|
34743
|
+
});
|
|
34744
|
+
const openLabel = computed(() => {
|
|
34745
|
+
var _a25;
|
|
34746
|
+
return (_a25 = labels.value) == null ? void 0 : _a25.mobileFilterButtonOpen;
|
|
34747
|
+
});
|
|
34748
|
+
const label = computed(() => {
|
|
34749
|
+
if (isSidebarVisible.value && openLabel.value) {
|
|
34750
|
+
return openLabel.value;
|
|
34751
|
+
}
|
|
34752
|
+
if (hasActiveFilters.value && activeLabel.value) {
|
|
34753
|
+
return activeLabel.value;
|
|
34754
|
+
}
|
|
34755
|
+
return defaultLabel.value;
|
|
34756
|
+
});
|
|
34757
|
+
const sortToggleVisible = computed(() => {
|
|
34758
|
+
var _a25, _b25;
|
|
34759
|
+
return ((_b25 = (_a25 = searchResultOptions.value) == null ? void 0 : _a25.sortStyle) == null ? void 0 : _b25.type) === "drawer";
|
|
34760
|
+
});
|
|
34761
|
+
const handleFilterSidebarToggle = () => {
|
|
34762
|
+
searchResultStore.setSidebarState({
|
|
34763
|
+
visible: !isSidebarVisible.value,
|
|
34764
|
+
disableBodyScrolling: !disableMobileBodyScrollLock.value,
|
|
34765
|
+
sidebar: "filter"
|
|
34766
|
+
});
|
|
34767
|
+
};
|
|
34768
|
+
const handleSortSidebarToggle = () => {
|
|
34769
|
+
searchResultStore.setSidebarState({
|
|
34770
|
+
visible: !isSortingSidebarVisible.value,
|
|
34771
|
+
disableBodyScrolling: !disableMobileBodyScrollLock.value,
|
|
34772
|
+
sidebar: "sorting"
|
|
34773
|
+
});
|
|
34774
|
+
};
|
|
34775
|
+
const hasActiveFilters = computed(() => currentFilterCount.value > 0);
|
|
34776
|
+
const checkCloseOnEscape = (e2) => {
|
|
34777
|
+
var _a25;
|
|
34778
|
+
if (!["Escape", "Esc"].includes((_a25 = e2.key) != null ? _a25 : "")) {
|
|
34779
|
+
return;
|
|
34780
|
+
}
|
|
34781
|
+
if (isSidebarVisible.value) {
|
|
34782
|
+
searchResultStore.setSidebarState({ visible: false, sidebar: "sorting" });
|
|
34783
|
+
searchResultStore.setSidebarState({ visible: false, sidebar: "filter" });
|
|
34784
|
+
}
|
|
34785
|
+
};
|
|
34786
|
+
onMounted(() => {
|
|
34787
|
+
window.addEventListener("keydown", checkCloseOnEscape);
|
|
34788
|
+
});
|
|
34789
|
+
onBeforeUnmount(() => {
|
|
34790
|
+
window.removeEventListener("keydown", checkCloseOnEscape);
|
|
34791
|
+
});
|
|
34792
|
+
return {
|
|
34793
|
+
isSidebarVisible,
|
|
34794
|
+
label,
|
|
34795
|
+
currentFilterCount,
|
|
34796
|
+
hasActiveFilters,
|
|
34797
|
+
showMobileFilterCount,
|
|
34798
|
+
sortLabel,
|
|
34799
|
+
sortToggleVisible,
|
|
34800
|
+
handleFilterSidebarToggle,
|
|
34801
|
+
handleSortSidebarToggle
|
|
34802
|
+
};
|
|
34803
|
+
};
|
|
34804
|
+
const _hoisted_1$O = {
|
|
34805
|
+
key: 0,
|
|
34806
|
+
class: "lupa-desktop-toggle-filter-count"
|
|
34807
|
+
};
|
|
34808
|
+
const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
34809
|
+
__name: "DesktopFacetToggle",
|
|
34810
|
+
setup(__props) {
|
|
34811
|
+
const {
|
|
34812
|
+
isSidebarVisible,
|
|
34813
|
+
label,
|
|
34814
|
+
currentFilterCount,
|
|
34815
|
+
hasActiveFilters,
|
|
34816
|
+
showMobileFilterCount,
|
|
34817
|
+
handleFilterSidebarToggle
|
|
34818
|
+
} = useSidebarToggle();
|
|
34819
|
+
return (_ctx, _cache) => {
|
|
34820
|
+
return openBlock(), createElementBlock("div", {
|
|
34821
|
+
class: normalizeClass(["lupa-desktop-toggle", {
|
|
34822
|
+
"lupa-desktop-toggle-filters-empty": unref(currentFilterCount) < 1,
|
|
34823
|
+
"lupa-desktop-toggle-has-filters": unref(hasActiveFilters),
|
|
34824
|
+
"lupa-sidebar-open": unref(isSidebarVisible)
|
|
34825
|
+
}]),
|
|
34826
|
+
onClick: _cache[0] || (_cache[0] = //@ts-ignore
|
|
34827
|
+
(...args) => unref(handleFilterSidebarToggle) && unref(handleFilterSidebarToggle)(...args))
|
|
34828
|
+
}, [
|
|
34829
|
+
createTextVNode(toDisplayString(unref(label)) + " ", 1),
|
|
34830
|
+
unref(showMobileFilterCount) && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$O, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
34831
|
+
], 2);
|
|
34832
|
+
};
|
|
34833
|
+
}
|
|
34834
|
+
});
|
|
34835
|
+
const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
34836
|
+
__name: "DesktopSortToggle",
|
|
34837
|
+
setup(__props) {
|
|
34838
|
+
const { isSidebarVisible, sortLabel, sortToggleVisible, handleSortSidebarToggle } = useSidebarToggle();
|
|
34839
|
+
return (_ctx, _cache) => {
|
|
34840
|
+
return unref(sortToggleVisible) ? (openBlock(), createElementBlock("div", {
|
|
34841
|
+
key: 0,
|
|
34842
|
+
class: normalizeClass(["lupa-desktop-toggle lupa-desktop-sort-toggle", {
|
|
34843
|
+
"lupa-sidebar-open": unref(isSidebarVisible)
|
|
34844
|
+
}]),
|
|
34845
|
+
onClick: _cache[0] || (_cache[0] = //@ts-ignore
|
|
34846
|
+
(...args) => unref(handleSortSidebarToggle) && unref(handleSortSidebarToggle)(...args))
|
|
34847
|
+
}, toDisplayString(unref(sortLabel)), 3)) : createCommentVNode("", true);
|
|
34848
|
+
};
|
|
34849
|
+
}
|
|
34850
|
+
});
|
|
34851
|
+
const _hoisted_1$N = { class: "lupa-search-result-facet-section" };
|
|
34852
|
+
const _hoisted_2$z = {
|
|
34624
34853
|
key: 0,
|
|
34625
34854
|
class: "lupa-facets-title"
|
|
34626
34855
|
};
|
|
34627
|
-
const _sfc_main$
|
|
34856
|
+
const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
34628
34857
|
__name: "FacetList",
|
|
34629
34858
|
props: {
|
|
34630
34859
|
options: {},
|
|
@@ -34636,6 +34865,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
34636
34865
|
emits: ["select", "clear"],
|
|
34637
34866
|
setup(__props, { emit: __emit }) {
|
|
34638
34867
|
const props = __props;
|
|
34868
|
+
const { handleFilterSidebarToggle } = useSidebarToggle();
|
|
34639
34869
|
const emit2 = __emit;
|
|
34640
34870
|
const currentFiltersValue = computed(() => {
|
|
34641
34871
|
var _a25;
|
|
@@ -34651,6 +34881,12 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
34651
34881
|
return !((_a25 = props.options.exclude) == null ? void 0 : _a25.includes(f2.key));
|
|
34652
34882
|
}) : facetsValue.value;
|
|
34653
34883
|
});
|
|
34884
|
+
const displayFacetStyle = computed(() => {
|
|
34885
|
+
if (!props.facetStyle || props.facetStyle === "sidebar") {
|
|
34886
|
+
return "sidebar";
|
|
34887
|
+
}
|
|
34888
|
+
return "top-dropdown";
|
|
34889
|
+
});
|
|
34654
34890
|
const handleFacetSelect = (facetAction) => {
|
|
34655
34891
|
emit2("select", facetAction);
|
|
34656
34892
|
};
|
|
@@ -34659,29 +34895,33 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
34659
34895
|
};
|
|
34660
34896
|
return (_ctx, _cache) => {
|
|
34661
34897
|
var _a25;
|
|
34662
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
34663
|
-
_ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
34898
|
+
return openBlock(), createElementBlock("div", _hoisted_1$N, [
|
|
34899
|
+
_ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$z, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
|
|
34664
34900
|
createBaseVNode("div", {
|
|
34665
|
-
class: normalizeClass(["lupa-search-result-facet-list", "lupa-" + ((_a25 =
|
|
34901
|
+
class: normalizeClass(["lupa-search-result-facet-list", "lupa-" + ((_a25 = displayFacetStyle.value) != null ? _a25 : "")])
|
|
34666
34902
|
}, [
|
|
34667
34903
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayFacets.value, (facet) => {
|
|
34668
34904
|
var _a26;
|
|
34669
|
-
return openBlock(), createBlock(_sfc_main$
|
|
34905
|
+
return openBlock(), createBlock(_sfc_main$Z, {
|
|
34670
34906
|
key: facet.key,
|
|
34671
34907
|
facet,
|
|
34672
34908
|
currentFilters: currentFiltersValue.value,
|
|
34673
34909
|
options: _ctx.options,
|
|
34674
34910
|
clearable: (_a26 = _ctx.clearable) != null ? _a26 : false,
|
|
34911
|
+
"current-facet-style": _ctx.facetStyle,
|
|
34675
34912
|
onSelect: handleFacetSelect,
|
|
34676
|
-
onClear: clear
|
|
34677
|
-
|
|
34678
|
-
|
|
34913
|
+
onClear: clear,
|
|
34914
|
+
onExpand: unref(handleFilterSidebarToggle)
|
|
34915
|
+
}, null, 8, ["facet", "currentFilters", "options", "clearable", "current-facet-style", "onExpand"]);
|
|
34916
|
+
}), 128)),
|
|
34917
|
+
_ctx.facetStyle === "drawer" ? (openBlock(), createBlock(_sfc_main$Y, { key: 0 })) : createCommentVNode("", true),
|
|
34918
|
+
_ctx.facetStyle === "drawer" || _ctx.facetStyle === "top-dropdown" ? (openBlock(), createBlock(_sfc_main$X, { key: 1 })) : createCommentVNode("", true)
|
|
34679
34919
|
], 2)
|
|
34680
34920
|
]);
|
|
34681
34921
|
};
|
|
34682
34922
|
}
|
|
34683
34923
|
});
|
|
34684
|
-
const _sfc_main$
|
|
34924
|
+
const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
34685
34925
|
__name: "FacetsButton",
|
|
34686
34926
|
props: {
|
|
34687
34927
|
options: {}
|
|
@@ -34706,8 +34946,33 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
34706
34946
|
};
|
|
34707
34947
|
}
|
|
34708
34948
|
});
|
|
34709
|
-
const
|
|
34710
|
-
|
|
34949
|
+
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
34950
|
+
__name: "FacetsClearButton",
|
|
34951
|
+
props: {
|
|
34952
|
+
options: {}
|
|
34953
|
+
},
|
|
34954
|
+
emits: ["clear"],
|
|
34955
|
+
setup(__props, { emit: __emit }) {
|
|
34956
|
+
const props = __props;
|
|
34957
|
+
const emit2 = __emit;
|
|
34958
|
+
const label = computed(() => {
|
|
34959
|
+
var _a25, _b25;
|
|
34960
|
+
return (_b25 = (_a25 = props.options.labels) == null ? void 0 : _a25.facetClearAllButton) != null ? _b25 : "";
|
|
34961
|
+
});
|
|
34962
|
+
const handleClick = () => {
|
|
34963
|
+
emit2("clear");
|
|
34964
|
+
};
|
|
34965
|
+
return (_ctx, _cache) => {
|
|
34966
|
+
return label.value ? (openBlock(), createElementBlock("button", {
|
|
34967
|
+
key: 0,
|
|
34968
|
+
class: "lupa-facets-button-clear",
|
|
34969
|
+
onClick: withModifiers(handleClick, ["stop"])
|
|
34970
|
+
}, toDisplayString(label.value), 1)) : createCommentVNode("", true);
|
|
34971
|
+
};
|
|
34972
|
+
}
|
|
34973
|
+
});
|
|
34974
|
+
const _hoisted_1$M = { class: "lupa-facets-filter-button-wrapper" };
|
|
34975
|
+
const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
34711
34976
|
__name: "Facets",
|
|
34712
34977
|
props: {
|
|
34713
34978
|
options: {},
|
|
@@ -34720,6 +34985,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
34720
34985
|
const paramStore = useParamsStore();
|
|
34721
34986
|
const searchResultStore = useSearchResultStore();
|
|
34722
34987
|
const optionsStore = useOptionsStore();
|
|
34988
|
+
const { handleFilterSidebarToggle } = useSidebarToggle();
|
|
34723
34989
|
const { filters } = storeToRefs(paramStore);
|
|
34724
34990
|
const { facets: facets2, loadingFacets } = storeToRefs(searchResultStore);
|
|
34725
34991
|
const { searchResultOptions } = storeToRefs(optionsStore);
|
|
@@ -34747,7 +35013,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
34747
35013
|
};
|
|
34748
35014
|
});
|
|
34749
35015
|
const showFilterButton = computed(() => {
|
|
34750
|
-
return props.options.filterBehavior === "withFilterButton";
|
|
35016
|
+
return props.options.filterBehavior === "withFilterButton" && props.facetStyle === "sidebar";
|
|
34751
35017
|
});
|
|
34752
35018
|
const handleFacetSelect = (facetAction) => {
|
|
34753
35019
|
switch (facetAction.type) {
|
|
@@ -34788,6 +35054,10 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
34788
35054
|
const param = getFacetKey(facet.key, facet.type);
|
|
34789
35055
|
paramStore.removeParameters({ paramsToRemove: [param] });
|
|
34790
35056
|
};
|
|
35057
|
+
const clearAll = () => {
|
|
35058
|
+
paramStore.removeAllFilters();
|
|
35059
|
+
handleFilterSidebarToggle();
|
|
35060
|
+
};
|
|
34791
35061
|
const filter = () => {
|
|
34792
35062
|
emit2("filter");
|
|
34793
35063
|
};
|
|
@@ -34795,7 +35065,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
34795
35065
|
return openBlock(), createElementBlock("div", {
|
|
34796
35066
|
class: normalizeClass(["lupa-search-result-facets", { "lupa-search-result-facets-loading": unref(loadingFacets) }])
|
|
34797
35067
|
}, [
|
|
34798
|
-
regularFacets.value ? (openBlock(), createBlock(_sfc_main$
|
|
35068
|
+
regularFacets.value ? (openBlock(), createBlock(_sfc_main$W, {
|
|
34799
35069
|
key: 0,
|
|
34800
35070
|
options: _ctx.options,
|
|
34801
35071
|
facets: regularFacets.value,
|
|
@@ -34805,10 +35075,15 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
34805
35075
|
onSelect: handleFacetSelect,
|
|
34806
35076
|
onClear: clear
|
|
34807
35077
|
}, null, 8, ["options", "facets", "currentFilters", "facetStyle", "clearable"])) : createCommentVNode("", true),
|
|
34808
|
-
createBaseVNode("div", _hoisted_1$
|
|
34809
|
-
showFilterButton.value ? (openBlock(), createBlock(_sfc_main$
|
|
35078
|
+
createBaseVNode("div", _hoisted_1$M, [
|
|
35079
|
+
showFilterButton.value ? (openBlock(), createBlock(_sfc_main$U, {
|
|
34810
35080
|
key: 0,
|
|
34811
35081
|
options: _ctx.options,
|
|
35082
|
+
onClear: clearAll
|
|
35083
|
+
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
35084
|
+
showFilterButton.value ? (openBlock(), createBlock(_sfc_main$V, {
|
|
35085
|
+
key: 1,
|
|
35086
|
+
options: _ctx.options,
|
|
34812
35087
|
onFilter: filter
|
|
34813
35088
|
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
34814
35089
|
])
|
|
@@ -34816,16 +35091,17 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
34816
35091
|
};
|
|
34817
35092
|
}
|
|
34818
35093
|
});
|
|
34819
|
-
const _hoisted_1$
|
|
35094
|
+
const _hoisted_1$L = {
|
|
34820
35095
|
key: 0,
|
|
34821
35096
|
id: "lupa-search-result-filters",
|
|
34822
35097
|
class: "lupa-search-result-filters"
|
|
34823
35098
|
};
|
|
34824
|
-
const _sfc_main$
|
|
35099
|
+
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
34825
35100
|
__name: "SearchResultsFilters",
|
|
34826
35101
|
props: {
|
|
34827
35102
|
options: {},
|
|
34828
|
-
expandable: { type: Boolean }
|
|
35103
|
+
expandable: { type: Boolean },
|
|
35104
|
+
style: {}
|
|
34829
35105
|
},
|
|
34830
35106
|
emits: ["filter"],
|
|
34831
35107
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -34859,40 +35135,37 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
34859
35135
|
__expose({ fetch: fetch2 });
|
|
34860
35136
|
return (_ctx, _cache) => {
|
|
34861
35137
|
var _a25;
|
|
34862
|
-
return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
34863
|
-
showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$
|
|
35138
|
+
return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$L, [
|
|
35139
|
+
showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$14, {
|
|
34864
35140
|
key: 0,
|
|
34865
35141
|
options: _ctx.options.currentFilters,
|
|
34866
35142
|
expandable: (_a25 = _ctx.expandable) != null ? _a25 : false
|
|
34867
35143
|
}, null, 8, ["options", "expandable"])) : createCommentVNode("", true),
|
|
34868
|
-
_ctx.options.categories ? (openBlock(), createBlock(_sfc_main$
|
|
35144
|
+
_ctx.options.categories ? (openBlock(), createBlock(_sfc_main$12, {
|
|
34869
35145
|
key: 1,
|
|
34870
35146
|
options: _ctx.options.categories,
|
|
34871
35147
|
ref_key: "categoryFilters",
|
|
34872
35148
|
ref: categoryFilters
|
|
34873
35149
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
34874
|
-
_ctx.options.facets ? (openBlock(), createBlock(_sfc_main$
|
|
35150
|
+
_ctx.options.facets ? (openBlock(), createBlock(_sfc_main$T, {
|
|
34875
35151
|
key: 2,
|
|
34876
35152
|
options: _ctx.options.facets,
|
|
35153
|
+
"facet-style": _ctx.style,
|
|
34877
35154
|
onFilter: filter
|
|
34878
|
-
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
35155
|
+
}, null, 8, ["options", "facet-style"])) : createCommentVNode("", true)
|
|
34879
35156
|
])) : createCommentVNode("", true);
|
|
34880
35157
|
};
|
|
34881
35158
|
}
|
|
34882
35159
|
});
|
|
34883
|
-
const _hoisted_1$
|
|
34884
|
-
|
|
34885
|
-
|
|
34886
|
-
|
|
34887
|
-
const _hoisted_2$w = { class: "lupa-mobile-sidebar-content" };
|
|
34888
|
-
const _hoisted_3$o = { class: "lupa-sidebar-top" };
|
|
34889
|
-
const _hoisted_4$g = { class: "lupa-sidebar-title" };
|
|
34890
|
-
const _hoisted_5$b = {
|
|
35160
|
+
const _hoisted_1$K = { class: "lupa-mobile-sidebar-content" };
|
|
35161
|
+
const _hoisted_2$y = { class: "lupa-sidebar-top" };
|
|
35162
|
+
const _hoisted_3$q = { class: "lupa-sidebar-title" };
|
|
35163
|
+
const _hoisted_4$i = {
|
|
34891
35164
|
key: 0,
|
|
34892
35165
|
class: "lupa-sidebar-filter-count"
|
|
34893
35166
|
};
|
|
34894
|
-
const
|
|
34895
|
-
const _sfc_main$
|
|
35167
|
+
const _hoisted_5$c = { class: "lupa-sidebar-filter-options" };
|
|
35168
|
+
const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
34896
35169
|
__name: "MobileFilterSidebar",
|
|
34897
35170
|
props: {
|
|
34898
35171
|
options: {}
|
|
@@ -34901,7 +35174,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
34901
35174
|
setup(__props, { emit: __emit }) {
|
|
34902
35175
|
const props = __props;
|
|
34903
35176
|
const searchResultStore = useSearchResultStore();
|
|
34904
|
-
const { currentFilterCount } = storeToRefs(searchResultStore);
|
|
35177
|
+
const { currentFilterCount, isFilterSidebarVisible, isSidebarClosing } = storeToRefs(searchResultStore);
|
|
34905
35178
|
const emit2 = __emit;
|
|
34906
35179
|
const sidebarTitle = computed(() => {
|
|
34907
35180
|
var _a25, _b25, _c;
|
|
@@ -34911,7 +35184,6 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
34911
35184
|
var _a25, _b25;
|
|
34912
35185
|
return Boolean((_b25 = (_a25 = props.options.currentFilters) == null ? void 0 : _a25.mobileSidebar) == null ? void 0 : _b25.showFilterCount) && currentFilterCount.value > 0;
|
|
34913
35186
|
});
|
|
34914
|
-
const isMobileSidebarVisible = computed(() => searchResultStore.isMobileSidebarVisible);
|
|
34915
35187
|
const isActiveFiltersExpanded = computed(() => {
|
|
34916
35188
|
var _a25, _b25;
|
|
34917
35189
|
return !((_b25 = (_a25 = props.options.currentFilters) == null ? void 0 : _a25.mobileSidebar) == null ? void 0 : _b25.activeFiltersExpanded);
|
|
@@ -34924,42 +35196,46 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
34924
35196
|
handleMobileToggle();
|
|
34925
35197
|
};
|
|
34926
35198
|
return (_ctx, _cache) => {
|
|
34927
|
-
return
|
|
35199
|
+
return unref(isFilterSidebarVisible) ? (openBlock(), createElementBlock("div", {
|
|
35200
|
+
key: 0,
|
|
35201
|
+
class: normalizeClass(["lupa-mobile-filter-sidebar", { "lupa-mobile-filter-sidebar-is-closing": unref(isSidebarClosing) }])
|
|
35202
|
+
}, [
|
|
34928
35203
|
createBaseVNode("div", {
|
|
34929
35204
|
class: "lupa-sidebar-close",
|
|
34930
35205
|
onClick: withModifiers(handleMobileToggle, ["stop"])
|
|
34931
35206
|
}),
|
|
34932
|
-
createBaseVNode("div",
|
|
34933
|
-
createBaseVNode("div",
|
|
34934
|
-
createBaseVNode("div",
|
|
35207
|
+
createBaseVNode("div", _hoisted_1$K, [
|
|
35208
|
+
createBaseVNode("div", _hoisted_2$y, [
|
|
35209
|
+
createBaseVNode("div", _hoisted_3$q, [
|
|
34935
35210
|
createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
|
|
34936
|
-
isFilterCountVisible.value ? (openBlock(), createElementBlock("span",
|
|
35211
|
+
isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_4$i, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
34937
35212
|
]),
|
|
34938
35213
|
createBaseVNode("div", {
|
|
34939
35214
|
class: "lupa-filter-toggle-mobile",
|
|
34940
35215
|
onClick: handleMobileToggle
|
|
34941
35216
|
})
|
|
34942
35217
|
]),
|
|
34943
|
-
createBaseVNode("div",
|
|
34944
|
-
createVNode(_sfc_main$
|
|
35218
|
+
createBaseVNode("div", _hoisted_5$c, [
|
|
35219
|
+
createVNode(_sfc_main$S, {
|
|
34945
35220
|
options: _ctx.options,
|
|
34946
35221
|
expandable: isActiveFiltersExpanded.value,
|
|
35222
|
+
style: "sidebar",
|
|
34947
35223
|
onFilter: filter
|
|
34948
35224
|
}, null, 8, ["options", "expandable"])
|
|
34949
35225
|
])
|
|
34950
35226
|
])
|
|
34951
|
-
])) : createCommentVNode("", true);
|
|
35227
|
+
], 2)) : createCommentVNode("", true);
|
|
34952
35228
|
};
|
|
34953
35229
|
}
|
|
34954
35230
|
});
|
|
34955
|
-
const _hoisted_1$
|
|
34956
|
-
const _hoisted_2$
|
|
34957
|
-
const _hoisted_3$
|
|
35231
|
+
const _hoisted_1$J = { id: "lupa-search-results-breadcrumbs" };
|
|
35232
|
+
const _hoisted_2$x = ["href", "onClick"];
|
|
35233
|
+
const _hoisted_3$p = {
|
|
34958
35234
|
key: 1,
|
|
34959
35235
|
class: "lupa-search-results-breadcrumb-text"
|
|
34960
35236
|
};
|
|
34961
|
-
const _hoisted_4$
|
|
34962
|
-
const _sfc_main$
|
|
35237
|
+
const _hoisted_4$h = { key: 2 };
|
|
35238
|
+
const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
34963
35239
|
__name: "SearchResultsBreadcrumbs",
|
|
34964
35240
|
props: {
|
|
34965
35241
|
breadcrumbs: {}
|
|
@@ -34984,7 +35260,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
34984
35260
|
handleRoutingEvent(link, event, hasEventRouting.value);
|
|
34985
35261
|
};
|
|
34986
35262
|
return (_ctx, _cache) => {
|
|
34987
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
35263
|
+
return openBlock(), createElementBlock("div", _hoisted_1$J, [
|
|
34988
35264
|
(openBlock(true), createElementBlock(Fragment, null, renderList(breadcrumbsValue.value, (breadcrumb, index) => {
|
|
34989
35265
|
var _a25;
|
|
34990
35266
|
return openBlock(), createElementBlock("span", {
|
|
@@ -34999,20 +35275,20 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
34999
35275
|
var _a26;
|
|
35000
35276
|
return handleNavigation(e2, (_a26 = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a26 : "");
|
|
35001
35277
|
}
|
|
35002
|
-
}, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$
|
|
35003
|
-
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
35278
|
+
}, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$x)) : (openBlock(), createElementBlock("span", _hoisted_3$p, toDisplayString(getLabel(breadcrumb.label)), 1)),
|
|
35279
|
+
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$h, toDisplayString((_a25 = breadcrumb.separator) != null ? _a25 : "/"), 1)) : createCommentVNode("", true)
|
|
35004
35280
|
]);
|
|
35005
35281
|
}), 128))
|
|
35006
35282
|
]);
|
|
35007
35283
|
};
|
|
35008
35284
|
}
|
|
35009
35285
|
});
|
|
35010
|
-
const _hoisted_1$
|
|
35286
|
+
const _hoisted_1$I = {
|
|
35011
35287
|
key: 0,
|
|
35012
35288
|
id: "lupa-search-result-filters",
|
|
35013
35289
|
class: "lupa-search-result-filters lupa-search-result-top-filters"
|
|
35014
35290
|
};
|
|
35015
|
-
const _sfc_main$
|
|
35291
|
+
const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
35016
35292
|
__name: "FiltersTopDropdown",
|
|
35017
35293
|
props: {
|
|
35018
35294
|
options: {}
|
|
@@ -35030,8 +35306,8 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
35030
35306
|
});
|
|
35031
35307
|
return (_ctx, _cache) => {
|
|
35032
35308
|
var _a25;
|
|
35033
|
-
return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
35034
|
-
_ctx.options.facets ? (openBlock(), createBlock(_sfc_main$
|
|
35309
|
+
return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$I, [
|
|
35310
|
+
_ctx.options.facets ? (openBlock(), createBlock(_sfc_main$T, {
|
|
35035
35311
|
key: 0,
|
|
35036
35312
|
options: _ctx.options.facets,
|
|
35037
35313
|
"facet-style": (_a25 = _ctx.options.facets.style) == null ? void 0 : _a25.type,
|
|
@@ -35042,8 +35318,8 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
35042
35318
|
};
|
|
35043
35319
|
}
|
|
35044
35320
|
});
|
|
35045
|
-
const _hoisted_1$
|
|
35046
|
-
const _sfc_main$
|
|
35321
|
+
const _hoisted_1$H = { id: "lupa-search-results-layout-selection" };
|
|
35322
|
+
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
35047
35323
|
__name: "SearchResultsLayoutSelection",
|
|
35048
35324
|
setup(__props) {
|
|
35049
35325
|
const searchResultStore = useSearchResultStore();
|
|
@@ -35054,7 +35330,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
35054
35330
|
searchResultStore.setLayout(layout2);
|
|
35055
35331
|
};
|
|
35056
35332
|
return (_ctx, _cache) => {
|
|
35057
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
35333
|
+
return openBlock(), createElementBlock("div", _hoisted_1$H, [
|
|
35058
35334
|
createBaseVNode("div", {
|
|
35059
35335
|
class: normalizeClass([
|
|
35060
35336
|
"lupa-layout-selection-grid",
|
|
@@ -35076,64 +35352,38 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
35076
35352
|
};
|
|
35077
35353
|
}
|
|
35078
35354
|
});
|
|
35079
|
-
const _hoisted_1$
|
|
35355
|
+
const _hoisted_1$G = {
|
|
35080
35356
|
key: 0,
|
|
35081
35357
|
class: "lupa-mobile-toggle-filter-count"
|
|
35082
35358
|
};
|
|
35083
|
-
const _sfc_main$
|
|
35359
|
+
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
35084
35360
|
__name: "SearchResultsMobileToggle",
|
|
35085
|
-
props: {
|
|
35086
|
-
labels: {},
|
|
35087
|
-
showFilterCount: { type: Boolean }
|
|
35088
|
-
},
|
|
35089
35361
|
setup(__props) {
|
|
35090
|
-
const
|
|
35091
|
-
|
|
35092
|
-
|
|
35093
|
-
|
|
35094
|
-
|
|
35095
|
-
|
|
35096
|
-
|
|
35097
|
-
|
|
35098
|
-
return (_c = (_b25 = (_a25 = searchResultOptions.value.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.disableMobileBodyScrollLock) != null ? _c : false;
|
|
35099
|
-
}
|
|
35100
|
-
);
|
|
35101
|
-
const isSidebarVisible = computed(() => isMobileSidebarVisible.value);
|
|
35102
|
-
const defaultLabel = computed(() => props.labels.mobileFilterButton);
|
|
35103
|
-
const activeLabel = computed(() => props.labels.mobileFilterButtonActive);
|
|
35104
|
-
const openLabel = computed(() => props.labels.mobileFilterButtonOpen);
|
|
35105
|
-
const label = computed(() => {
|
|
35106
|
-
if (isSidebarVisible.value && openLabel.value) {
|
|
35107
|
-
return openLabel.value;
|
|
35108
|
-
}
|
|
35109
|
-
if (hasActiveFilters.value && activeLabel.value) {
|
|
35110
|
-
return activeLabel.value;
|
|
35111
|
-
}
|
|
35112
|
-
return defaultLabel.value;
|
|
35113
|
-
});
|
|
35114
|
-
const handleMobileToggle = () => {
|
|
35115
|
-
searchResultStore.setSidebarState({
|
|
35116
|
-
visible: !isSidebarVisible.value,
|
|
35117
|
-
disableBodyScrolling: !disableMobileBodyScrollLock.value
|
|
35118
|
-
});
|
|
35119
|
-
};
|
|
35120
|
-
const hasActiveFilters = computed(() => currentFilterCount.value > 0);
|
|
35362
|
+
const {
|
|
35363
|
+
isSidebarVisible,
|
|
35364
|
+
label,
|
|
35365
|
+
currentFilterCount,
|
|
35366
|
+
hasActiveFilters,
|
|
35367
|
+
showMobileFilterCount,
|
|
35368
|
+
handleFilterSidebarToggle
|
|
35369
|
+
} = useSidebarToggle();
|
|
35121
35370
|
return (_ctx, _cache) => {
|
|
35122
35371
|
return openBlock(), createElementBlock("div", {
|
|
35123
35372
|
class: normalizeClass(["lupa-mobile-toggle", {
|
|
35124
35373
|
"lupa-mobile-toggle-filters-empty": unref(currentFilterCount) < 1,
|
|
35125
|
-
"lupa-mobile-toggle-has-filters": hasActiveFilters
|
|
35126
|
-
"lupa-sidebar-open": isSidebarVisible
|
|
35374
|
+
"lupa-mobile-toggle-has-filters": unref(hasActiveFilters),
|
|
35375
|
+
"lupa-sidebar-open": unref(isSidebarVisible)
|
|
35127
35376
|
}]),
|
|
35128
|
-
onClick:
|
|
35377
|
+
onClick: _cache[0] || (_cache[0] = //@ts-ignore
|
|
35378
|
+
(...args) => unref(handleFilterSidebarToggle) && unref(handleFilterSidebarToggle)(...args))
|
|
35129
35379
|
}, [
|
|
35130
|
-
createTextVNode(toDisplayString(label
|
|
35131
|
-
|
|
35380
|
+
createTextVNode(toDisplayString(unref(label)) + " ", 1),
|
|
35381
|
+
unref(showMobileFilterCount) && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$G, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
35132
35382
|
], 2);
|
|
35133
35383
|
};
|
|
35134
35384
|
}
|
|
35135
35385
|
});
|
|
35136
|
-
const _sfc_main$
|
|
35386
|
+
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
35137
35387
|
__name: "SearchResultsMobileFilterClose",
|
|
35138
35388
|
props: {
|
|
35139
35389
|
label: {}
|
|
@@ -35153,20 +35403,20 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
35153
35403
|
};
|
|
35154
35404
|
}
|
|
35155
35405
|
});
|
|
35156
|
-
const _hoisted_1$
|
|
35406
|
+
const _hoisted_1$F = {
|
|
35157
35407
|
key: 0,
|
|
35158
35408
|
id: "lupa-search-results-page-select",
|
|
35159
35409
|
"data-cy": "lupa-search-results-page-select"
|
|
35160
35410
|
};
|
|
35161
|
-
const _hoisted_2$
|
|
35411
|
+
const _hoisted_2$w = {
|
|
35162
35412
|
key: 0,
|
|
35163
35413
|
class: "lupa-page-number-separator"
|
|
35164
35414
|
};
|
|
35165
|
-
const _hoisted_3$
|
|
35415
|
+
const _hoisted_3$o = {
|
|
35166
35416
|
key: 0,
|
|
35167
35417
|
class: "lupa-page-number-separator"
|
|
35168
35418
|
};
|
|
35169
|
-
const _sfc_main$
|
|
35419
|
+
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
35170
35420
|
__name: "SearchResultsPageSelect",
|
|
35171
35421
|
props: {
|
|
35172
35422
|
lastPageLabel: {},
|
|
@@ -35261,7 +35511,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
35261
35511
|
};
|
|
35262
35512
|
return (_ctx, _cache) => {
|
|
35263
35513
|
var _a25;
|
|
35264
|
-
return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
35514
|
+
return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$F, [
|
|
35265
35515
|
showBack.value ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35266
35516
|
key: 0,
|
|
35267
35517
|
class: normalizeClass(firstPageLabel.value === "<" ? "lupa-page-arrow" : "lupa-show-less"),
|
|
@@ -35285,7 +35535,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
35285
35535
|
_: 1,
|
|
35286
35536
|
__: [4]
|
|
35287
35537
|
}, 8, ["href"])),
|
|
35288
|
-
showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
35538
|
+
showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$w, "...")) : createCommentVNode("", true)
|
|
35289
35539
|
], 64)) : createCommentVNode("", true),
|
|
35290
35540
|
(openBlock(true), createElementBlock(Fragment, null, renderList(pages.value, (page) => {
|
|
35291
35541
|
return openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
@@ -35305,7 +35555,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
35305
35555
|
}, 1032, ["href", "onClick", "class"]);
|
|
35306
35556
|
}), 128)),
|
|
35307
35557
|
showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
35308
|
-
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
35558
|
+
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_3$o, "...")) : createCommentVNode("", true),
|
|
35309
35559
|
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35310
35560
|
href: getHref((_a25 = lastPage.value) != null ? _a25 : 1),
|
|
35311
35561
|
class: "lupa-page-number lupa-page-number-last",
|
|
@@ -35336,18 +35586,18 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
35336
35586
|
};
|
|
35337
35587
|
}
|
|
35338
35588
|
});
|
|
35339
|
-
const _hoisted_1$
|
|
35589
|
+
const _hoisted_1$E = {
|
|
35340
35590
|
id: "lupa-search-results-page-size",
|
|
35341
35591
|
"data-cy": "lupa-search-results-page-size"
|
|
35342
35592
|
};
|
|
35343
|
-
const _hoisted_2$
|
|
35344
|
-
const _hoisted_3$
|
|
35593
|
+
const _hoisted_2$v = { id: "lupa-select" };
|
|
35594
|
+
const _hoisted_3$n = {
|
|
35345
35595
|
class: "lupa-select-label",
|
|
35346
35596
|
for: "lupa-page-size-select-dropdown"
|
|
35347
35597
|
};
|
|
35348
|
-
const _hoisted_4$
|
|
35349
|
-
const _hoisted_5$
|
|
35350
|
-
const _sfc_main$
|
|
35598
|
+
const _hoisted_4$g = ["aria-label"];
|
|
35599
|
+
const _hoisted_5$b = ["value"];
|
|
35600
|
+
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
35351
35601
|
__name: "SearchResultsPageSize",
|
|
35352
35602
|
props: {
|
|
35353
35603
|
labels: {},
|
|
@@ -35377,9 +35627,9 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
35377
35627
|
};
|
|
35378
35628
|
return (_ctx, _cache) => {
|
|
35379
35629
|
var _a25, _b25, _c;
|
|
35380
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
35381
|
-
createBaseVNode("div", _hoisted_2$
|
|
35382
|
-
createBaseVNode("label", _hoisted_3$
|
|
35630
|
+
return openBlock(), createElementBlock("div", _hoisted_1$E, [
|
|
35631
|
+
createBaseVNode("div", _hoisted_2$v, [
|
|
35632
|
+
createBaseVNode("label", _hoisted_3$n, toDisplayString(label.value), 1),
|
|
35383
35633
|
createBaseVNode("select", {
|
|
35384
35634
|
id: "lupa-page-size-select-dropdown",
|
|
35385
35635
|
class: "lupa-select-dropdown",
|
|
@@ -35393,110 +35643,161 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
35393
35643
|
return openBlock(), createElementBlock("option", {
|
|
35394
35644
|
key: option,
|
|
35395
35645
|
value: option
|
|
35396
|
-
}, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$
|
|
35646
|
+
}, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$b);
|
|
35397
35647
|
}), 128))
|
|
35398
|
-
], 40, _hoisted_4$
|
|
35648
|
+
], 40, _hoisted_4$g)
|
|
35399
35649
|
])
|
|
35400
35650
|
]);
|
|
35401
35651
|
};
|
|
35402
35652
|
}
|
|
35403
35653
|
});
|
|
35404
|
-
const
|
|
35654
|
+
const useSorting = () => {
|
|
35655
|
+
const paramStore = useParamsStore();
|
|
35656
|
+
const optionStore = useOptionsStore();
|
|
35657
|
+
const { sort } = storeToRefs(paramStore);
|
|
35658
|
+
const { ariaLabels, searchResultOptions } = storeToRefs(optionStore);
|
|
35659
|
+
const selectedKey = ref("");
|
|
35660
|
+
const previousKey = ref("");
|
|
35661
|
+
const sortStyle = computed(() => {
|
|
35662
|
+
return searchResultOptions.value.sortStyle;
|
|
35663
|
+
});
|
|
35664
|
+
const sortOptions = computed(() => {
|
|
35665
|
+
return searchResultOptions.value.sort;
|
|
35666
|
+
});
|
|
35667
|
+
const callbacks = computed(() => {
|
|
35668
|
+
return searchResultOptions.value.callbacks;
|
|
35669
|
+
});
|
|
35670
|
+
const sotyByTitleLabel = computed(() => {
|
|
35671
|
+
var _a25;
|
|
35672
|
+
return (_a25 = searchResultOptions.value.labels) == null ? void 0 : _a25.sortBy;
|
|
35673
|
+
});
|
|
35674
|
+
const sortItems = computed(() => {
|
|
35675
|
+
if (sortOptions.value && sortOptions.value.length) {
|
|
35676
|
+
return sortOptions.value;
|
|
35677
|
+
} else {
|
|
35678
|
+
return [];
|
|
35679
|
+
}
|
|
35680
|
+
});
|
|
35681
|
+
const defaultSortValue = computed(() => {
|
|
35682
|
+
var _a25, _b25, _c;
|
|
35683
|
+
return (_c = (_a25 = sortOptions.value) == null ? void 0 : _a25.find((x) => x.default)) != null ? _c : (_b25 = sortItems.value) == null ? void 0 : _b25[0];
|
|
35684
|
+
});
|
|
35685
|
+
const setSortValue = () => {
|
|
35686
|
+
var _a25, _b25;
|
|
35687
|
+
const optionToSelect = (_a25 = sortItems.value.find((x) => x.key === sort.value)) == null ? void 0 : _a25.key;
|
|
35688
|
+
selectedKey.value = optionToSelect != null ? optionToSelect : (_b25 = defaultSortValue.value) == null ? void 0 : _b25.key;
|
|
35689
|
+
previousKey.value = selectedKey.value;
|
|
35690
|
+
};
|
|
35691
|
+
watch(sort, () => setSortValue());
|
|
35692
|
+
const handleSelect = () => {
|
|
35693
|
+
var _a25, _b25, _c;
|
|
35694
|
+
const value = (_a25 = sortItems.value.find((x) => x.key === selectedKey.value)) == null ? void 0 : _a25.key;
|
|
35695
|
+
if (!value) {
|
|
35696
|
+
return;
|
|
35697
|
+
}
|
|
35698
|
+
paramStore.setSortSettings({ selectedSortKey: value, previousSortKey: previousKey.value });
|
|
35699
|
+
(_c = (_b25 = callbacks.value) == null ? void 0 : _b25.onSortChange) == null ? void 0 : _c.call(_b25, { selectedSortKey: value, previousSortKey: previousKey.value });
|
|
35700
|
+
paramStore.appendParams({
|
|
35701
|
+
params: [{ name: optionStore.getQueryParamName(QUERY_PARAMS$1.SORT), value }],
|
|
35702
|
+
paramsToRemove: [optionStore.getQueryParamName(QUERY_PARAMS$1.PAGE)]
|
|
35703
|
+
});
|
|
35704
|
+
previousKey.value = selectedKey.value;
|
|
35705
|
+
};
|
|
35706
|
+
return {
|
|
35707
|
+
sotyByTitleLabel,
|
|
35708
|
+
sortItems,
|
|
35709
|
+
selectedKey,
|
|
35710
|
+
ariaLabels,
|
|
35711
|
+
sortOptions,
|
|
35712
|
+
sortStyle,
|
|
35713
|
+
handleSelect,
|
|
35714
|
+
setSortValue
|
|
35715
|
+
};
|
|
35716
|
+
};
|
|
35717
|
+
const _hoisted_1$D = {
|
|
35718
|
+
key: 0,
|
|
35405
35719
|
id: "lupa-search-results-sort",
|
|
35406
35720
|
class: "lupa-search-results-sort"
|
|
35407
35721
|
};
|
|
35408
|
-
const _hoisted_2$
|
|
35409
|
-
const _hoisted_3$
|
|
35722
|
+
const _hoisted_2$u = { id: "lupa-select" };
|
|
35723
|
+
const _hoisted_3$m = {
|
|
35410
35724
|
class: "lupa-select-label",
|
|
35411
35725
|
for: "lupa-sort-select-dropdown"
|
|
35412
35726
|
};
|
|
35413
|
-
const _hoisted_4$
|
|
35414
|
-
const _hoisted_5$
|
|
35415
|
-
const _sfc_main$
|
|
35727
|
+
const _hoisted_4$f = ["aria-label"];
|
|
35728
|
+
const _hoisted_5$a = ["value"];
|
|
35729
|
+
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
35416
35730
|
__name: "SearchResultsSort",
|
|
35417
|
-
props: {
|
|
35418
|
-
options: {},
|
|
35419
|
-
callbacks: {}
|
|
35420
|
-
},
|
|
35421
35731
|
setup(__props) {
|
|
35422
|
-
const
|
|
35423
|
-
|
|
35424
|
-
|
|
35425
|
-
|
|
35426
|
-
|
|
35427
|
-
|
|
35428
|
-
|
|
35429
|
-
|
|
35430
|
-
|
|
35431
|
-
return props.options.options;
|
|
35432
|
-
} else {
|
|
35433
|
-
return [];
|
|
35434
|
-
}
|
|
35435
|
-
});
|
|
35436
|
-
const defaultSortValue = computed(() => {
|
|
35437
|
-
var _a25;
|
|
35438
|
-
return (_a25 = props.options.options.find((x) => x.default)) != null ? _a25 : props.options.options[0];
|
|
35439
|
-
});
|
|
35440
|
-
const setSortValue = () => {
|
|
35441
|
-
var _a25, _b25;
|
|
35442
|
-
const optionToSelect = (_a25 = sortItems.value.find((x) => x.key === sort.value)) == null ? void 0 : _a25.key;
|
|
35443
|
-
selectedKey.value = optionToSelect != null ? optionToSelect : (_b25 = defaultSortValue.value) == null ? void 0 : _b25.key;
|
|
35444
|
-
previousKey.value = selectedKey.value;
|
|
35445
|
-
};
|
|
35446
|
-
watch(sort, () => setSortValue());
|
|
35732
|
+
const {
|
|
35733
|
+
sortItems,
|
|
35734
|
+
selectedKey,
|
|
35735
|
+
ariaLabels,
|
|
35736
|
+
sotyByTitleLabel,
|
|
35737
|
+
sortStyle,
|
|
35738
|
+
handleSelect,
|
|
35739
|
+
setSortValue
|
|
35740
|
+
} = useSorting();
|
|
35447
35741
|
onMounted(() => {
|
|
35448
35742
|
setSortValue();
|
|
35449
35743
|
});
|
|
35450
|
-
const
|
|
35451
|
-
var _a25
|
|
35452
|
-
|
|
35453
|
-
|
|
35454
|
-
return;
|
|
35455
|
-
}
|
|
35456
|
-
paramStore.setSortSettings({ selectedSortKey: value, previousSortKey: previousKey.value });
|
|
35457
|
-
(_c = (_b25 = props.callbacks) == null ? void 0 : _b25.onSortChange) == null ? void 0 : _c.call(_b25, { selectedSortKey: value, previousSortKey: previousKey.value });
|
|
35458
|
-
paramStore.appendParams({
|
|
35459
|
-
params: [{ name: optionStore.getQueryParamName(QUERY_PARAMS$1.SORT), value }],
|
|
35460
|
-
paramsToRemove: [optionStore.getQueryParamName(QUERY_PARAMS$1.PAGE)]
|
|
35461
|
-
});
|
|
35462
|
-
previousKey.value = selectedKey.value;
|
|
35463
|
-
};
|
|
35744
|
+
const showDefaultSort = computed(() => {
|
|
35745
|
+
var _a25;
|
|
35746
|
+
return !sortStyle.value || ((_a25 = sortStyle.value) == null ? void 0 : _a25.type) !== "drawer";
|
|
35747
|
+
});
|
|
35464
35748
|
return (_ctx, _cache) => {
|
|
35465
35749
|
var _a25, _b25;
|
|
35466
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
35467
|
-
createBaseVNode("div", _hoisted_2$
|
|
35468
|
-
createBaseVNode("label", _hoisted_3$
|
|
35750
|
+
return showDefaultSort.value ? (openBlock(), createElementBlock("div", _hoisted_1$D, [
|
|
35751
|
+
createBaseVNode("div", _hoisted_2$u, [
|
|
35752
|
+
createBaseVNode("label", _hoisted_3$m, toDisplayString(unref(sotyByTitleLabel)), 1),
|
|
35469
35753
|
withDirectives(createBaseVNode("select", {
|
|
35470
35754
|
id: "lupa-sort-select-dropdown",
|
|
35471
35755
|
class: "lupa-select-dropdown",
|
|
35472
|
-
"aria-label": (_b25 = (_a25 = unref(ariaLabels)) == null ? void 0 : _a25.sortBySelect) != null ? _b25 :
|
|
35756
|
+
"aria-label": (_b25 = (_a25 = unref(ariaLabels)) == null ? void 0 : _a25.sortBySelect) != null ? _b25 : unref(sotyByTitleLabel),
|
|
35473
35757
|
"data-cy": "lupa-sort-select-dropdown",
|
|
35474
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedKey.value = $event),
|
|
35475
|
-
onChange:
|
|
35758
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(selectedKey) ? selectedKey.value = $event : null),
|
|
35759
|
+
onChange: _cache[1] || (_cache[1] = //@ts-ignore
|
|
35760
|
+
(...args) => unref(handleSelect) && unref(handleSelect)(...args)),
|
|
35476
35761
|
ref: "select"
|
|
35477
35762
|
}, [
|
|
35478
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(sortItems
|
|
35763
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(sortItems), (option) => {
|
|
35479
35764
|
return openBlock(), createElementBlock("option", {
|
|
35480
35765
|
key: option.key,
|
|
35481
35766
|
value: option.key
|
|
35482
|
-
}, toDisplayString(option.label), 9, _hoisted_5$
|
|
35767
|
+
}, toDisplayString(option.label), 9, _hoisted_5$a);
|
|
35483
35768
|
}), 128))
|
|
35484
|
-
], 40, _hoisted_4$
|
|
35485
|
-
[vModelSelect, selectedKey
|
|
35769
|
+
], 40, _hoisted_4$f), [
|
|
35770
|
+
[vModelSelect, unref(selectedKey)]
|
|
35486
35771
|
])
|
|
35487
35772
|
])
|
|
35488
|
-
]);
|
|
35773
|
+
])) : createCommentVNode("", true);
|
|
35774
|
+
};
|
|
35775
|
+
}
|
|
35776
|
+
});
|
|
35777
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
35778
|
+
__name: "SearchResultsSortDrawerToggle",
|
|
35779
|
+
setup(__props) {
|
|
35780
|
+
const { isSidebarVisible, sortLabel, sortToggleVisible, handleSortSidebarToggle } = useSidebarToggle();
|
|
35781
|
+
return (_ctx, _cache) => {
|
|
35782
|
+
return unref(sortToggleVisible) ? (openBlock(), createElementBlock("div", {
|
|
35783
|
+
key: 0,
|
|
35784
|
+
class: normalizeClass(["lupa-mobile-toggle lupa-mobile-sort-toggle", {
|
|
35785
|
+
"lupa-sidebar-open": unref(isSidebarVisible)
|
|
35786
|
+
}]),
|
|
35787
|
+
onClick: _cache[0] || (_cache[0] = //@ts-ignore
|
|
35788
|
+
(...args) => unref(handleSortSidebarToggle) && unref(handleSortSidebarToggle)(...args))
|
|
35789
|
+
}, toDisplayString(unref(sortLabel)), 3)) : createCommentVNode("", true);
|
|
35489
35790
|
};
|
|
35490
35791
|
}
|
|
35491
35792
|
});
|
|
35492
|
-
const _hoisted_1$
|
|
35493
|
-
const _hoisted_2$
|
|
35793
|
+
const _hoisted_1$C = { class: "lupa-toolbar-left" };
|
|
35794
|
+
const _hoisted_2$t = {
|
|
35494
35795
|
key: 0,
|
|
35495
35796
|
class: "lupa-toolbar-right-title"
|
|
35496
35797
|
};
|
|
35497
|
-
const _hoisted_3$
|
|
35498
|
-
const _hoisted_4$
|
|
35499
|
-
const _hoisted_5$
|
|
35798
|
+
const _hoisted_3$l = { key: 2 };
|
|
35799
|
+
const _hoisted_4$e = { key: 4 };
|
|
35800
|
+
const _hoisted_5$9 = { key: 6 };
|
|
35500
35801
|
const _hoisted_6$4 = { class: "lupa-toolbar-right" };
|
|
35501
35802
|
const _hoisted_7$2 = {
|
|
35502
35803
|
key: 0,
|
|
@@ -35504,7 +35805,7 @@ const _hoisted_7$2 = {
|
|
|
35504
35805
|
};
|
|
35505
35806
|
const _hoisted_8 = { key: 2 };
|
|
35506
35807
|
const _hoisted_9 = { key: 4 };
|
|
35507
|
-
const _sfc_main$
|
|
35808
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
35508
35809
|
__name: "SearchResultsToolbar",
|
|
35509
35810
|
props: {
|
|
35510
35811
|
options: {},
|
|
@@ -35520,7 +35821,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
35520
35821
|
const searchResultStore = useSearchResultStore();
|
|
35521
35822
|
const optionsStore = useOptionsStore();
|
|
35522
35823
|
const { page, limit } = storeToRefs(paramStore);
|
|
35523
|
-
const { hasAnyFilter, searchResult,
|
|
35824
|
+
const { hasAnyFilter, searchResult, isFilterSidebarVisible } = storeToRefs(searchResultStore);
|
|
35524
35825
|
const { currentResolutionPageSizes } = storeToRefs(optionsStore);
|
|
35525
35826
|
const isBottomLocation = computed(() => {
|
|
35526
35827
|
return props.paginationLocation === "bottom";
|
|
@@ -35598,7 +35899,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
35598
35899
|
var _a25;
|
|
35599
35900
|
return (_a25 = optionsValue.value.labels.toolbarRightLabel) != null ? _a25 : "";
|
|
35600
35901
|
});
|
|
35601
|
-
|
|
35902
|
+
computed(() => {
|
|
35602
35903
|
var _a25, _b25, _c;
|
|
35603
35904
|
return Boolean((_c = (_b25 = (_a25 = optionsValue.value.filters) == null ? void 0 : _a25.currentFilters) == null ? void 0 : _b25.mobileSidebar) == null ? void 0 : _c.showFilterCount);
|
|
35604
35905
|
});
|
|
@@ -35617,39 +35918,37 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
35617
35918
|
id: "lupa-search-results-toolbar",
|
|
35618
35919
|
class: normalizeClass({ "lupa-filter-no-results": !hasResults.value })
|
|
35619
35920
|
}, [
|
|
35620
|
-
createBaseVNode("div", _hoisted_1$
|
|
35621
|
-
toolbarLeftLabel.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
35622
|
-
showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$
|
|
35623
|
-
showItemSummary.value ? (openBlock(), createBlock(_sfc_main$
|
|
35921
|
+
createBaseVNode("div", _hoisted_1$C, [
|
|
35922
|
+
toolbarLeftLabel.value ? (openBlock(), createElementBlock("div", _hoisted_2$t, toDisplayString(toolbarLeftLabel.value), 1)) : createCommentVNode("", true),
|
|
35923
|
+
showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$O, { key: 1 })) : (openBlock(), createElementBlock("div", _hoisted_3$l)),
|
|
35924
|
+
showItemSummary.value ? (openBlock(), createBlock(_sfc_main$17, {
|
|
35624
35925
|
key: 3,
|
|
35625
35926
|
label: searchSummaryLabel.value,
|
|
35626
35927
|
clearable: unref(hasAnyFilter) && showFilterClear.value,
|
|
35627
35928
|
onClear: handleClearAll
|
|
35628
|
-
}, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$
|
|
35629
|
-
displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$
|
|
35929
|
+
}, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$e)),
|
|
35930
|
+
displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$L, {
|
|
35630
35931
|
key: 5,
|
|
35631
35932
|
options: paginationOptions.value.pageSelect,
|
|
35632
35933
|
"last-page-label": paginationOptions.value.labels.showMore,
|
|
35633
35934
|
"first-page-label": paginationOptions.value.labels.showLess
|
|
35634
|
-
}, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$
|
|
35935
|
+
}, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$9))
|
|
35635
35936
|
]),
|
|
35636
35937
|
createBaseVNode("div", _hoisted_6$4, [
|
|
35637
35938
|
toolbarRightLabel.value ? (openBlock(), createElementBlock("div", _hoisted_7$2, toDisplayString(toolbarRightLabel.value), 1)) : createCommentVNode("", true),
|
|
35638
|
-
createVNode(_sfc_main$
|
|
35639
|
-
|
|
35640
|
-
|
|
35641
|
-
}, null, 8, ["labels", "show-filter-count"]),
|
|
35642
|
-
paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$H, {
|
|
35939
|
+
createVNode(_sfc_main$N),
|
|
35940
|
+
createVNode(_sfc_main$I),
|
|
35941
|
+
paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$K, {
|
|
35643
35942
|
key: 1,
|
|
35644
35943
|
options: paginationOptions.value.pageSize,
|
|
35645
35944
|
labels: paginationOptions.value.labels
|
|
35646
35945
|
}, null, 8, ["options", "labels"])) : (openBlock(), createElementBlock("div", _hoisted_8)),
|
|
35647
|
-
sortOptions.value ? (openBlock(), createBlock(_sfc_main$
|
|
35946
|
+
sortOptions.value ? (openBlock(), createBlock(_sfc_main$J, {
|
|
35648
35947
|
key: 3,
|
|
35649
35948
|
options: sortOptions.value,
|
|
35650
35949
|
callbacks: callbacks.value
|
|
35651
35950
|
}, null, 8, ["options", "callbacks"])) : (openBlock(), createElementBlock("div", _hoisted_9)),
|
|
35652
|
-
showFiltersCloseButton.value && unref(
|
|
35951
|
+
showFiltersCloseButton.value && unref(isFilterSidebarVisible) ? (openBlock(), createBlock(_sfc_main$M, {
|
|
35653
35952
|
key: 5,
|
|
35654
35953
|
label: optionsValue.value.labels.mobileFilterCloseButton
|
|
35655
35954
|
}, null, 8, ["label"])) : createCommentVNode("", true)
|
|
@@ -35658,7 +35957,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
35658
35957
|
};
|
|
35659
35958
|
}
|
|
35660
35959
|
});
|
|
35661
|
-
const _sfc_main$
|
|
35960
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
35662
35961
|
__name: "SearchResultsProductImage",
|
|
35663
35962
|
props: {
|
|
35664
35963
|
item: {},
|
|
@@ -35666,7 +35965,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
35666
35965
|
},
|
|
35667
35966
|
setup(__props) {
|
|
35668
35967
|
return (_ctx, _cache) => {
|
|
35669
|
-
return openBlock(), createBlock(_sfc_main$
|
|
35968
|
+
return openBlock(), createBlock(_sfc_main$1w, {
|
|
35670
35969
|
item: _ctx.item,
|
|
35671
35970
|
options: _ctx.options,
|
|
35672
35971
|
"wrapper-class": "lupa-search-results-image-wrapper",
|
|
@@ -35675,16 +35974,16 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
35675
35974
|
};
|
|
35676
35975
|
}
|
|
35677
35976
|
});
|
|
35678
|
-
const _hoisted_1$
|
|
35679
|
-
const _hoisted_2$
|
|
35680
|
-
const _hoisted_3$
|
|
35681
|
-
const _hoisted_4$
|
|
35682
|
-
const _hoisted_5$
|
|
35977
|
+
const _hoisted_1$B = ["title", "innerHTML"];
|
|
35978
|
+
const _hoisted_2$s = ["title"];
|
|
35979
|
+
const _hoisted_3$k = ["href", "innerHTML"];
|
|
35980
|
+
const _hoisted_4$d = ["title"];
|
|
35981
|
+
const _hoisted_5$8 = {
|
|
35683
35982
|
key: 0,
|
|
35684
35983
|
class: "lupa-search-results-product-title-text"
|
|
35685
35984
|
};
|
|
35686
35985
|
const _hoisted_6$3 = ["href"];
|
|
35687
|
-
const _sfc_main$
|
|
35986
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
35688
35987
|
__name: "SearchResultsProductTitle",
|
|
35689
35988
|
props: {
|
|
35690
35989
|
item: {},
|
|
@@ -35721,7 +36020,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
35721
36020
|
style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
|
|
35722
36021
|
title: sanitizedTitle.value,
|
|
35723
36022
|
innerHTML: sanitizedTitle.value
|
|
35724
|
-
}, null, 12, _hoisted_1$
|
|
36023
|
+
}, null, 12, _hoisted_1$B)) : isHtml.value && _ctx.options.link ? (openBlock(), createElementBlock("div", {
|
|
35725
36024
|
key: 1,
|
|
35726
36025
|
class: "lupa-search-results-product-title",
|
|
35727
36026
|
style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
|
|
@@ -35732,26 +36031,26 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
35732
36031
|
class: "lupa-search-results-product-title-text lupa-title-link",
|
|
35733
36032
|
innerHTML: sanitizedTitle.value,
|
|
35734
36033
|
onClick: handleNavigation
|
|
35735
|
-
}, null, 8, _hoisted_3$
|
|
35736
|
-
], 12, _hoisted_2$
|
|
36034
|
+
}, null, 8, _hoisted_3$k)
|
|
36035
|
+
], 12, _hoisted_2$s)) : (openBlock(), createElementBlock("div", {
|
|
35737
36036
|
key: 2,
|
|
35738
36037
|
class: "lupa-search-results-product-title",
|
|
35739
36038
|
style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
|
|
35740
36039
|
title: title.value
|
|
35741
36040
|
}, [
|
|
35742
|
-
!_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
36041
|
+
!_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$8, toDisplayString(title.value), 1)) : createCommentVNode("", true),
|
|
35743
36042
|
_ctx.options.link ? (openBlock(), createElementBlock("a", {
|
|
35744
36043
|
key: 1,
|
|
35745
36044
|
href: _ctx.link,
|
|
35746
36045
|
class: "lupa-search-results-product-title-text lupa-title-link",
|
|
35747
36046
|
onClick: handleNavigation
|
|
35748
36047
|
}, toDisplayString(title.value), 9, _hoisted_6$3)) : createCommentVNode("", true)
|
|
35749
|
-
], 12, _hoisted_4$
|
|
36048
|
+
], 12, _hoisted_4$d));
|
|
35750
36049
|
};
|
|
35751
36050
|
}
|
|
35752
36051
|
});
|
|
35753
|
-
const _hoisted_1$
|
|
35754
|
-
const _sfc_main$
|
|
36052
|
+
const _hoisted_1$A = ["innerHTML"];
|
|
36053
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
35755
36054
|
__name: "SearchResultsProductDescription",
|
|
35756
36055
|
props: {
|
|
35757
36056
|
item: {},
|
|
@@ -35778,7 +36077,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
35778
36077
|
class: "lupa-search-results-product-description",
|
|
35779
36078
|
style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
|
|
35780
36079
|
innerHTML: sanitizedDescription.value
|
|
35781
|
-
}, null, 12, _hoisted_1$
|
|
36080
|
+
}, null, 12, _hoisted_1$A)) : (openBlock(), createElementBlock("div", {
|
|
35782
36081
|
key: 1,
|
|
35783
36082
|
class: "lupa-search-results-product-description",
|
|
35784
36083
|
style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`)
|
|
@@ -35786,15 +36085,15 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
35786
36085
|
};
|
|
35787
36086
|
}
|
|
35788
36087
|
});
|
|
35789
|
-
const _hoisted_1$
|
|
35790
|
-
const _hoisted_2$
|
|
35791
|
-
const _hoisted_3$
|
|
35792
|
-
const _hoisted_4$
|
|
35793
|
-
const _hoisted_5$
|
|
36088
|
+
const _hoisted_1$z = { id: "lupa-search-results-rating" };
|
|
36089
|
+
const _hoisted_2$r = { class: "lupa-ratings" };
|
|
36090
|
+
const _hoisted_3$j = { class: "lupa-ratings-base" };
|
|
36091
|
+
const _hoisted_4$c = ["innerHTML"];
|
|
36092
|
+
const _hoisted_5$7 = { class: "lupa-rating-wrapper" };
|
|
35794
36093
|
const _hoisted_6$2 = ["innerHTML"];
|
|
35795
36094
|
const _hoisted_7$1 = ["href"];
|
|
35796
36095
|
const STAR_COUNT = 5;
|
|
35797
|
-
const _sfc_main$
|
|
36096
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
35798
36097
|
__name: "SearchResultsProductRating",
|
|
35799
36098
|
props: {
|
|
35800
36099
|
item: {},
|
|
@@ -35831,18 +36130,18 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
35831
36130
|
return generateLink(props.options.links.ratingDetails, props.item);
|
|
35832
36131
|
});
|
|
35833
36132
|
return (_ctx, _cache) => {
|
|
35834
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
35835
|
-
createBaseVNode("div", _hoisted_2$
|
|
35836
|
-
createBaseVNode("div", _hoisted_3$
|
|
36133
|
+
return openBlock(), createElementBlock("div", _hoisted_1$z, [
|
|
36134
|
+
createBaseVNode("div", _hoisted_2$r, [
|
|
36135
|
+
createBaseVNode("div", _hoisted_3$j, [
|
|
35837
36136
|
(openBlock(true), createElementBlock(Fragment, null, renderList(baseStars.value, (star, index) => {
|
|
35838
36137
|
return openBlock(), createElementBlock("div", {
|
|
35839
36138
|
key: index,
|
|
35840
36139
|
innerHTML: star,
|
|
35841
36140
|
class: "lupa-rating lupa-rating-not-highlighted"
|
|
35842
|
-
}, null, 8, _hoisted_4$
|
|
36141
|
+
}, null, 8, _hoisted_4$c);
|
|
35843
36142
|
}), 128))
|
|
35844
36143
|
]),
|
|
35845
|
-
createBaseVNode("div", _hoisted_5$
|
|
36144
|
+
createBaseVNode("div", _hoisted_5$7, [
|
|
35846
36145
|
createBaseVNode("div", {
|
|
35847
36146
|
class: "lupa-ratings-highlighted",
|
|
35848
36147
|
style: normalizeStyle({ width: ratingPercentage.value + "%" })
|
|
@@ -35865,11 +36164,11 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
35865
36164
|
};
|
|
35866
36165
|
}
|
|
35867
36166
|
});
|
|
35868
|
-
const _hoisted_1$
|
|
36167
|
+
const _hoisted_1$y = {
|
|
35869
36168
|
class: "lupa-search-results-product-regular-price",
|
|
35870
36169
|
"data-cy": "lupa-search-results-product-regular-price"
|
|
35871
36170
|
};
|
|
35872
|
-
const _sfc_main$
|
|
36171
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
35873
36172
|
__name: "SearchResultsProductRegularPrice",
|
|
35874
36173
|
props: {
|
|
35875
36174
|
item: {},
|
|
@@ -35891,11 +36190,11 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
35891
36190
|
);
|
|
35892
36191
|
});
|
|
35893
36192
|
return (_ctx, _cache) => {
|
|
35894
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
36193
|
+
return openBlock(), createElementBlock("div", _hoisted_1$y, toDisplayString(price.value), 1);
|
|
35895
36194
|
};
|
|
35896
36195
|
}
|
|
35897
36196
|
});
|
|
35898
|
-
const _sfc_main$
|
|
36197
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
35899
36198
|
__name: "SearchResultsProductPrice",
|
|
35900
36199
|
props: {
|
|
35901
36200
|
item: {},
|
|
@@ -35929,12 +36228,12 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
35929
36228
|
};
|
|
35930
36229
|
}
|
|
35931
36230
|
});
|
|
35932
|
-
const _hoisted_1$
|
|
35933
|
-
const _hoisted_2$
|
|
35934
|
-
const _hoisted_3$
|
|
35935
|
-
const _hoisted_4$
|
|
35936
|
-
const _hoisted_5$
|
|
35937
|
-
const _sfc_main$
|
|
36231
|
+
const _hoisted_1$x = { class: "lupa-search-results-add-to-cart-wrapper" };
|
|
36232
|
+
const _hoisted_2$q = { class: "lupa-search-results-product-addtocart" };
|
|
36233
|
+
const _hoisted_3$i = ["disabled"];
|
|
36234
|
+
const _hoisted_4$b = ["href"];
|
|
36235
|
+
const _hoisted_5$6 = ["id", "disabled"];
|
|
36236
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
35938
36237
|
__name: "SearchResultsProductAddToCart",
|
|
35939
36238
|
props: {
|
|
35940
36239
|
item: {},
|
|
@@ -35993,16 +36292,16 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
35993
36292
|
loading.value = false;
|
|
35994
36293
|
});
|
|
35995
36294
|
return (_ctx, _cache) => {
|
|
35996
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
35997
|
-
createBaseVNode("div", _hoisted_2$
|
|
36295
|
+
return openBlock(), createElementBlock("div", _hoisted_1$x, [
|
|
36296
|
+
createBaseVNode("div", _hoisted_2$q, [
|
|
35998
36297
|
hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
|
|
35999
36298
|
key: 0,
|
|
36000
36299
|
class: addToCartButtonClass.value,
|
|
36001
36300
|
"data-cy": "lupa-add-to-cart",
|
|
36002
36301
|
disabled: !inStockValue.value || loading.value
|
|
36003
36302
|
}, _ctx.dynamicAttributes, { onClick: handleClick }), [
|
|
36004
|
-
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$
|
|
36005
|
-
], 16, _hoisted_3$
|
|
36303
|
+
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$b)
|
|
36304
|
+
], 16, _hoisted_3$i)) : (openBlock(), createElementBlock("button", mergeProps({
|
|
36006
36305
|
key: 1,
|
|
36007
36306
|
id: id.value,
|
|
36008
36307
|
class: addToCartButtonClass.value,
|
|
@@ -36010,18 +36309,18 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
36010
36309
|
disabled: !inStockValue.value || loading.value
|
|
36011
36310
|
}, _ctx.dynamicAttributes, {
|
|
36012
36311
|
onClick: withModifiers(handleClick, ["stop"])
|
|
36013
|
-
}), toDisplayString(label.value), 17, _hoisted_5$
|
|
36312
|
+
}), toDisplayString(label.value), 17, _hoisted_5$6))
|
|
36014
36313
|
])
|
|
36015
36314
|
]);
|
|
36016
36315
|
};
|
|
36017
36316
|
}
|
|
36018
36317
|
});
|
|
36019
|
-
const _hoisted_1$
|
|
36020
|
-
const _hoisted_2$
|
|
36021
|
-
const _hoisted_3$
|
|
36022
|
-
const _hoisted_4$
|
|
36023
|
-
const _hoisted_5$
|
|
36024
|
-
const _sfc_main$
|
|
36318
|
+
const _hoisted_1$w = ["innerHTML"];
|
|
36319
|
+
const _hoisted_2$p = { key: 0 };
|
|
36320
|
+
const _hoisted_3$h = { key: 1 };
|
|
36321
|
+
const _hoisted_4$a = { class: "lupa-search-box-custom-label" };
|
|
36322
|
+
const _hoisted_5$5 = { class: "lupa-search-box-custom-text" };
|
|
36323
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
36025
36324
|
__name: "SearchResultsProductCustom",
|
|
36026
36325
|
props: {
|
|
36027
36326
|
item: {},
|
|
@@ -36063,20 +36362,20 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
36063
36362
|
key: 0,
|
|
36064
36363
|
class: className.value,
|
|
36065
36364
|
innerHTML: text.value
|
|
36066
|
-
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$
|
|
36365
|
+
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$w)) : (openBlock(), createElementBlock("div", mergeProps({
|
|
36067
36366
|
key: 1,
|
|
36068
36367
|
class: className.value
|
|
36069
36368
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), [
|
|
36070
|
-
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
36071
|
-
createBaseVNode("div", _hoisted_4$
|
|
36072
|
-
createBaseVNode("div", _hoisted_5$
|
|
36369
|
+
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$p, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$h, [
|
|
36370
|
+
createBaseVNode("div", _hoisted_4$a, toDisplayString(label.value), 1),
|
|
36371
|
+
createBaseVNode("div", _hoisted_5$5, toDisplayString(text.value), 1)
|
|
36073
36372
|
]))
|
|
36074
36373
|
], 16));
|
|
36075
36374
|
};
|
|
36076
36375
|
}
|
|
36077
36376
|
});
|
|
36078
|
-
const _hoisted_1$
|
|
36079
|
-
const _sfc_main$
|
|
36377
|
+
const _hoisted_1$v = ["innerHTML"];
|
|
36378
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
36080
36379
|
__name: "SearchResultsProductCustomHtmlElement",
|
|
36081
36380
|
props: {
|
|
36082
36381
|
item: {},
|
|
@@ -36112,15 +36411,15 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
36112
36411
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
36113
36412
|
class: className.value,
|
|
36114
36413
|
innerHTML: text.value
|
|
36115
|
-
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$
|
|
36414
|
+
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$v);
|
|
36116
36415
|
};
|
|
36117
36416
|
}
|
|
36118
36417
|
});
|
|
36119
|
-
const _hoisted_1$
|
|
36120
|
-
const _hoisted_2$
|
|
36121
|
-
const _hoisted_3$
|
|
36122
|
-
const _hoisted_4$
|
|
36123
|
-
const _sfc_main$
|
|
36418
|
+
const _hoisted_1$u = { id: "lupa-search-results-rating" };
|
|
36419
|
+
const _hoisted_2$o = ["innerHTML"];
|
|
36420
|
+
const _hoisted_3$g = { class: "lupa-ratings" };
|
|
36421
|
+
const _hoisted_4$9 = ["href"];
|
|
36422
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
36124
36423
|
__name: "SearchResultsProductSingleStarRating",
|
|
36125
36424
|
props: {
|
|
36126
36425
|
item: {},
|
|
@@ -36148,35 +36447,35 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
36148
36447
|
return RATING_STAR_HTML;
|
|
36149
36448
|
});
|
|
36150
36449
|
return (_ctx, _cache) => {
|
|
36151
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
36450
|
+
return openBlock(), createElementBlock("div", _hoisted_1$u, [
|
|
36152
36451
|
createBaseVNode("div", {
|
|
36153
36452
|
innerHTML: star.value,
|
|
36154
36453
|
class: "lupa-rating lupa-rating-highlighted"
|
|
36155
|
-
}, null, 8, _hoisted_2$
|
|
36156
|
-
createBaseVNode("div", _hoisted_3$
|
|
36454
|
+
}, null, 8, _hoisted_2$o),
|
|
36455
|
+
createBaseVNode("div", _hoisted_3$g, toDisplayString(rating.value), 1),
|
|
36157
36456
|
createBaseVNode("a", {
|
|
36158
36457
|
href: ratingLink.value,
|
|
36159
36458
|
class: "lupa-total-ratings"
|
|
36160
|
-
}, toDisplayString(totalRatings.value), 9, _hoisted_4$
|
|
36459
|
+
}, toDisplayString(totalRatings.value), 9, _hoisted_4$9)
|
|
36161
36460
|
]);
|
|
36162
36461
|
};
|
|
36163
36462
|
}
|
|
36164
36463
|
});
|
|
36165
36464
|
const __default__ = {
|
|
36166
36465
|
components: {
|
|
36167
|
-
SearchResultsProductImage: _sfc_main$
|
|
36168
|
-
SearchResultsProductTitle: _sfc_main$
|
|
36169
|
-
SearchResultsProductDescription: _sfc_main$
|
|
36170
|
-
SearchResultsProductRating: _sfc_main$
|
|
36171
|
-
SearchResultsProductRegularPrice: _sfc_main$
|
|
36172
|
-
SearchResultsProductPrice: _sfc_main$
|
|
36173
|
-
SearchResultsProductAddToCart: _sfc_main$
|
|
36174
|
-
SearchResultsProductCustom: _sfc_main$
|
|
36175
|
-
SearchResultsProductCustomHtmlElement: _sfc_main$
|
|
36176
|
-
SearchResultsProductSingleStarRating: _sfc_main$
|
|
36177
|
-
}
|
|
36178
|
-
};
|
|
36179
|
-
const _sfc_main$
|
|
36466
|
+
SearchResultsProductImage: _sfc_main$G,
|
|
36467
|
+
SearchResultsProductTitle: _sfc_main$F,
|
|
36468
|
+
SearchResultsProductDescription: _sfc_main$E,
|
|
36469
|
+
SearchResultsProductRating: _sfc_main$D,
|
|
36470
|
+
SearchResultsProductRegularPrice: _sfc_main$C,
|
|
36471
|
+
SearchResultsProductPrice: _sfc_main$B,
|
|
36472
|
+
SearchResultsProductAddToCart: _sfc_main$A,
|
|
36473
|
+
SearchResultsProductCustom: _sfc_main$z,
|
|
36474
|
+
SearchResultsProductCustomHtmlElement: _sfc_main$y,
|
|
36475
|
+
SearchResultsProductSingleStarRating: _sfc_main$x
|
|
36476
|
+
}
|
|
36477
|
+
};
|
|
36478
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__), {
|
|
36180
36479
|
__name: "SearchResultsProductCardElement",
|
|
36181
36480
|
props: {
|
|
36182
36481
|
item: {},
|
|
@@ -36254,13 +36553,13 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
36254
36553
|
};
|
|
36255
36554
|
}
|
|
36256
36555
|
}));
|
|
36257
|
-
const _hoisted_1$
|
|
36258
|
-
const _hoisted_2$
|
|
36556
|
+
const _hoisted_1$t = ["href"];
|
|
36557
|
+
const _hoisted_2$n = {
|
|
36259
36558
|
key: 0,
|
|
36260
36559
|
class: "lupa-out-of-stock"
|
|
36261
36560
|
};
|
|
36262
|
-
const _hoisted_3$
|
|
36263
|
-
const _sfc_main$
|
|
36561
|
+
const _hoisted_3$f = { class: "lupa-search-result-product-details-section" };
|
|
36562
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
36264
36563
|
__name: "SearchResultsProductCard",
|
|
36265
36564
|
props: {
|
|
36266
36565
|
product: {},
|
|
@@ -36436,7 +36735,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
36436
36735
|
default: withCtx(() => {
|
|
36437
36736
|
var _a25;
|
|
36438
36737
|
return [
|
|
36439
|
-
createVNode(_sfc_main$
|
|
36738
|
+
createVNode(_sfc_main$1g, { options: badgesOptions.value }, null, 8, ["options"]),
|
|
36440
36739
|
createBaseVNode("div", {
|
|
36441
36740
|
class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
|
|
36442
36741
|
}, [
|
|
@@ -36446,7 +36745,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
36446
36745
|
onClick: handleNavigation
|
|
36447
36746
|
}, [
|
|
36448
36747
|
(openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
|
|
36449
|
-
return openBlock(), createBlock(_sfc_main$
|
|
36748
|
+
return openBlock(), createBlock(_sfc_main$w, {
|
|
36450
36749
|
class: "lupa-search-results-product-element",
|
|
36451
36750
|
item: _ctx.product,
|
|
36452
36751
|
element,
|
|
@@ -36457,16 +36756,16 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
36457
36756
|
onProductEvent: handleProductEvent
|
|
36458
36757
|
}, null, 8, ["item", "element", "labels", "inStock", "link"]);
|
|
36459
36758
|
}), 128)),
|
|
36460
|
-
createVNode(_sfc_main$
|
|
36759
|
+
createVNode(_sfc_main$1g, {
|
|
36461
36760
|
options: badgesOptions.value,
|
|
36462
36761
|
position: "image",
|
|
36463
36762
|
class: "lupa-image-badges"
|
|
36464
36763
|
}, null, 8, ["options"]),
|
|
36465
|
-
((_a25 = labels.value) == null ? void 0 : _a25.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
36466
|
-
], 8, _hoisted_1$
|
|
36467
|
-
createBaseVNode("div", _hoisted_3$
|
|
36764
|
+
((_a25 = labels.value) == null ? void 0 : _a25.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_2$n, toDisplayString(labels.value.outOfStock), 1)) : createCommentVNode("", true)
|
|
36765
|
+
], 8, _hoisted_1$t),
|
|
36766
|
+
createBaseVNode("div", _hoisted_3$f, [
|
|
36468
36767
|
(openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
|
|
36469
|
-
return openBlock(), createBlock(_sfc_main$
|
|
36768
|
+
return openBlock(), createBlock(_sfc_main$w, {
|
|
36470
36769
|
class: "lupa-search-results-product-element",
|
|
36471
36770
|
item: _ctx.product,
|
|
36472
36771
|
element,
|
|
@@ -36484,7 +36783,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
36484
36783
|
class: normalizeClass("lupa-element-group-" + group)
|
|
36485
36784
|
}, [
|
|
36486
36785
|
(openBlock(true), createElementBlock(Fragment, null, renderList(getGroupElements(group), (element) => {
|
|
36487
|
-
return openBlock(), createBlock(_sfc_main$
|
|
36786
|
+
return openBlock(), createBlock(_sfc_main$w, {
|
|
36488
36787
|
class: "lupa-search-results-product-element",
|
|
36489
36788
|
item: _ctx.product,
|
|
36490
36789
|
element,
|
|
@@ -36505,23 +36804,23 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
36505
36804
|
};
|
|
36506
36805
|
}
|
|
36507
36806
|
});
|
|
36508
|
-
const _hoisted_1$
|
|
36807
|
+
const _hoisted_1$s = {
|
|
36509
36808
|
id: "lupa-search-results-similar-queries",
|
|
36510
36809
|
"data-cy": "lupa-search-results-similar-queries"
|
|
36511
36810
|
};
|
|
36512
|
-
const _hoisted_2$
|
|
36513
|
-
const _hoisted_3$
|
|
36811
|
+
const _hoisted_2$m = { class: "lupa-similar-queries-label" };
|
|
36812
|
+
const _hoisted_3$e = {
|
|
36514
36813
|
class: "lupa-similar-query-label",
|
|
36515
36814
|
"data-cy": "lupa-similar-query-label"
|
|
36516
36815
|
};
|
|
36517
|
-
const _hoisted_4$
|
|
36518
|
-
const _hoisted_5$
|
|
36816
|
+
const _hoisted_4$8 = ["onClick"];
|
|
36817
|
+
const _hoisted_5$4 = ["innerHTML"];
|
|
36519
36818
|
const _hoisted_6$1 = { key: 0 };
|
|
36520
36819
|
const _hoisted_7 = {
|
|
36521
36820
|
class: "lupa-products",
|
|
36522
36821
|
"data-cy": "lupa-products"
|
|
36523
36822
|
};
|
|
36524
|
-
const _sfc_main$
|
|
36823
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
36525
36824
|
__name: "SearchResultsSimilarQueries",
|
|
36526
36825
|
props: {
|
|
36527
36826
|
labels: {},
|
|
@@ -36559,11 +36858,11 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
36559
36858
|
};
|
|
36560
36859
|
};
|
|
36561
36860
|
return (_ctx, _cache) => {
|
|
36562
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
36563
|
-
createBaseVNode("div", _hoisted_2$
|
|
36861
|
+
return openBlock(), createElementBlock("div", _hoisted_1$s, [
|
|
36862
|
+
createBaseVNode("div", _hoisted_2$m, toDisplayString(_ctx.labels.similarQueries), 1),
|
|
36564
36863
|
(openBlock(true), createElementBlock(Fragment, null, renderList(similarQueries.value, (similarQuery, index) => {
|
|
36565
36864
|
return openBlock(), createElementBlock("div", { key: index }, [
|
|
36566
|
-
createBaseVNode("div", _hoisted_3$
|
|
36865
|
+
createBaseVNode("div", _hoisted_3$e, [
|
|
36567
36866
|
createBaseVNode("span", null, toDisplayString(similarQueryLabel.value), 1),
|
|
36568
36867
|
createBaseVNode("span", {
|
|
36569
36868
|
id: "lupa-similar-query-text-component",
|
|
@@ -36573,13 +36872,13 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
36573
36872
|
}, [
|
|
36574
36873
|
createBaseVNode("span", {
|
|
36575
36874
|
innerHTML: getSimilarQueryContent(similarQuery.displayQuery)
|
|
36576
|
-
}, null, 8, _hoisted_5$
|
|
36875
|
+
}, null, 8, _hoisted_5$4),
|
|
36577
36876
|
similarQuery.count ? (openBlock(), createElementBlock("span", _hoisted_6$1, " (" + toDisplayString(similarQuery.count) + ")", 1)) : createCommentVNode("", true)
|
|
36578
|
-
], 8, _hoisted_4$
|
|
36877
|
+
], 8, _hoisted_4$8)
|
|
36579
36878
|
]),
|
|
36580
36879
|
createBaseVNode("div", _hoisted_7, [
|
|
36581
36880
|
(openBlock(true), createElementBlock(Fragment, null, renderList(similarQuery.items, (product, index2) => {
|
|
36582
|
-
return openBlock(), createBlock(_sfc_main$
|
|
36881
|
+
return openBlock(), createBlock(_sfc_main$v, {
|
|
36583
36882
|
style: normalizeStyle(_ctx.columnSize),
|
|
36584
36883
|
key: getDocumentKey(index2, product),
|
|
36585
36884
|
product,
|
|
@@ -36594,15 +36893,15 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
36594
36893
|
};
|
|
36595
36894
|
}
|
|
36596
36895
|
});
|
|
36597
|
-
const _hoisted_1$
|
|
36896
|
+
const _hoisted_1$r = {
|
|
36598
36897
|
key: 0,
|
|
36599
36898
|
class: "lupa-results-additional-panel"
|
|
36600
36899
|
};
|
|
36601
|
-
const _hoisted_2$
|
|
36900
|
+
const _hoisted_2$l = {
|
|
36602
36901
|
class: "lupa-results-additional-panel-items",
|
|
36603
36902
|
"data-cy": "lupa-results-additional-panel-items"
|
|
36604
36903
|
};
|
|
36605
|
-
const _sfc_main$
|
|
36904
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
36606
36905
|
__name: "AdditionalPanel",
|
|
36607
36906
|
props: {
|
|
36608
36907
|
panel: {},
|
|
@@ -36675,10 +36974,10 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
36675
36974
|
handleQueryChange();
|
|
36676
36975
|
});
|
|
36677
36976
|
return (_ctx, _cache) => {
|
|
36678
|
-
return hasResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
36679
|
-
createBaseVNode("div", _hoisted_2$
|
|
36977
|
+
return hasResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$r, [
|
|
36978
|
+
createBaseVNode("div", _hoisted_2$l, [
|
|
36680
36979
|
(openBlock(true), createElementBlock(Fragment, null, renderList(visibleItems.value, (item, index) => {
|
|
36681
|
-
return openBlock(), createBlock(_sfc_main$
|
|
36980
|
+
return openBlock(), createBlock(_sfc_main$v, {
|
|
36682
36981
|
key: index,
|
|
36683
36982
|
product: item,
|
|
36684
36983
|
options: _ctx.panel,
|
|
@@ -36696,11 +36995,11 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
36696
36995
|
};
|
|
36697
36996
|
}
|
|
36698
36997
|
});
|
|
36699
|
-
const _hoisted_1$
|
|
36998
|
+
const _hoisted_1$q = {
|
|
36700
36999
|
key: 0,
|
|
36701
37000
|
class: "lupa-results-additional-panels"
|
|
36702
37001
|
};
|
|
36703
|
-
const _sfc_main$
|
|
37002
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
36704
37003
|
__name: "AdditionalPanels",
|
|
36705
37004
|
props: {
|
|
36706
37005
|
options: {},
|
|
@@ -36717,9 +37016,9 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
36717
37016
|
return locationPanels.value.length > 0;
|
|
36718
37017
|
});
|
|
36719
37018
|
return (_ctx, _cache) => {
|
|
36720
|
-
return isVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
37019
|
+
return isVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$q, [
|
|
36721
37020
|
(openBlock(true), createElementBlock(Fragment, null, renderList(locationPanels.value, (panel) => {
|
|
36722
|
-
return openBlock(), createBlock(_sfc_main$
|
|
37021
|
+
return openBlock(), createBlock(_sfc_main$t, {
|
|
36723
37022
|
key: panel.queryKey,
|
|
36724
37023
|
panel,
|
|
36725
37024
|
options: _ctx.sdkOptions
|
|
@@ -36736,29 +37035,29 @@ const _export_sfc = (sfc, props) => {
|
|
|
36736
37035
|
}
|
|
36737
37036
|
return target2;
|
|
36738
37037
|
};
|
|
36739
|
-
const _sfc_main$
|
|
36740
|
-
const _hoisted_1$
|
|
36741
|
-
const _hoisted_2$
|
|
37038
|
+
const _sfc_main$r = {};
|
|
37039
|
+
const _hoisted_1$p = { class: "lupa-spinner-wrapper" };
|
|
37040
|
+
const _hoisted_2$k = { class: "lupa-spinner" };
|
|
36742
37041
|
function _sfc_render(_ctx, _cache) {
|
|
36743
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
36744
|
-
createBaseVNode("div", _hoisted_2$
|
|
37042
|
+
return openBlock(), createElementBlock("div", _hoisted_1$p, [
|
|
37043
|
+
createBaseVNode("div", _hoisted_2$k, [
|
|
36745
37044
|
(openBlock(), createElementBlock(Fragment, null, renderList(12, (x) => {
|
|
36746
37045
|
return createBaseVNode("div", { key: x });
|
|
36747
37046
|
}), 64))
|
|
36748
37047
|
])
|
|
36749
37048
|
]);
|
|
36750
37049
|
}
|
|
36751
|
-
const Spinner = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
36752
|
-
const _hoisted_1$
|
|
37050
|
+
const Spinner = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render]]);
|
|
37051
|
+
const _hoisted_1$o = {
|
|
36753
37052
|
id: "lupa-search-results-similar-results",
|
|
36754
37053
|
"data-cy": "lupa-search-results-similar-results"
|
|
36755
37054
|
};
|
|
36756
|
-
const _hoisted_2$
|
|
36757
|
-
const _hoisted_3$
|
|
37055
|
+
const _hoisted_2$j = { class: "lupa-similar-results-label" };
|
|
37056
|
+
const _hoisted_3$d = {
|
|
36758
37057
|
class: "lupa-products",
|
|
36759
37058
|
"data-cy": "lupa-products"
|
|
36760
37059
|
};
|
|
36761
|
-
const _sfc_main$
|
|
37060
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
36762
37061
|
__name: "SearchResultsSimilarResults",
|
|
36763
37062
|
props: {
|
|
36764
37063
|
columnSize: {},
|
|
@@ -36779,11 +37078,11 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
36779
37078
|
};
|
|
36780
37079
|
});
|
|
36781
37080
|
return (_ctx, _cache) => {
|
|
36782
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
36783
|
-
createBaseVNode("div", _hoisted_2$
|
|
36784
|
-
createBaseVNode("div", _hoisted_3$
|
|
37081
|
+
return openBlock(), createElementBlock("div", _hoisted_1$o, [
|
|
37082
|
+
createBaseVNode("div", _hoisted_2$j, toDisplayString(_ctx.labels.similarResultsLabel), 1),
|
|
37083
|
+
createBaseVNode("div", _hoisted_3$d, [
|
|
36785
37084
|
(openBlock(true), createElementBlock(Fragment, null, renderList(similarResults.value.items, (product, index) => {
|
|
36786
|
-
return openBlock(), createBlock(_sfc_main$
|
|
37085
|
+
return openBlock(), createBlock(_sfc_main$v, {
|
|
36787
37086
|
style: normalizeStyle(_ctx.columnSize),
|
|
36788
37087
|
key: getDocumentKey(index, product),
|
|
36789
37088
|
product,
|
|
@@ -36904,15 +37203,15 @@ const extractRelatedSource = (source, searchResults2, options, activeFilters) =>
|
|
|
36904
37203
|
return extractFacetsRelatedSource(source, searchResults2, options, activeFilters);
|
|
36905
37204
|
}
|
|
36906
37205
|
});
|
|
36907
|
-
const _hoisted_1$
|
|
36908
|
-
const _hoisted_2$
|
|
36909
|
-
const _hoisted_3$
|
|
36910
|
-
const _hoisted_4$
|
|
36911
|
-
const _hoisted_5$
|
|
37206
|
+
const _hoisted_1$n = { class: "lupa-related-query-item" };
|
|
37207
|
+
const _hoisted_2$i = { class: "lupa-related-query-image" };
|
|
37208
|
+
const _hoisted_3$c = { class: "lupa-related-query-label" };
|
|
37209
|
+
const _hoisted_4$7 = { class: "lupa-related-query-title" };
|
|
37210
|
+
const _hoisted_5$3 = {
|
|
36912
37211
|
key: 0,
|
|
36913
37212
|
class: "lupa-related-query-count"
|
|
36914
37213
|
};
|
|
36915
|
-
const _sfc_main$
|
|
37214
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
36916
37215
|
__name: "RelatedQueryPanel",
|
|
36917
37216
|
props: {
|
|
36918
37217
|
query: {},
|
|
@@ -37008,9 +37307,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
37008
37307
|
});
|
|
37009
37308
|
return (_ctx, _cache) => {
|
|
37010
37309
|
var _a25;
|
|
37011
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
37012
|
-
createBaseVNode("div", _hoisted_2$
|
|
37013
|
-
itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$
|
|
37310
|
+
return openBlock(), createElementBlock("div", _hoisted_1$n, [
|
|
37311
|
+
createBaseVNode("div", _hoisted_2$i, [
|
|
37312
|
+
itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$1w, {
|
|
37014
37313
|
key: 0,
|
|
37015
37314
|
"wrapper-class": "lupa-related-query-image-wrapper",
|
|
37016
37315
|
"image-class": "lupa-related-query-image",
|
|
@@ -37018,24 +37317,24 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
37018
37317
|
options: image.value
|
|
37019
37318
|
}, null, 8, ["item", "options"])) : createCommentVNode("", true)
|
|
37020
37319
|
]),
|
|
37021
|
-
createBaseVNode("div", _hoisted_3$
|
|
37022
|
-
createBaseVNode("span", _hoisted_4$
|
|
37023
|
-
((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
37320
|
+
createBaseVNode("div", _hoisted_3$c, [
|
|
37321
|
+
createBaseVNode("span", _hoisted_4$7, toDisplayString(_ctx.query), 1),
|
|
37322
|
+
((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$3, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
|
|
37024
37323
|
])
|
|
37025
37324
|
]);
|
|
37026
37325
|
};
|
|
37027
37326
|
}
|
|
37028
37327
|
});
|
|
37029
|
-
const _hoisted_1$
|
|
37328
|
+
const _hoisted_1$m = {
|
|
37030
37329
|
key: 0,
|
|
37031
37330
|
class: "lupa-related-queries"
|
|
37032
37331
|
};
|
|
37033
|
-
const _hoisted_2$
|
|
37332
|
+
const _hoisted_2$h = {
|
|
37034
37333
|
key: 0,
|
|
37035
37334
|
class: "lupa-related-queries-title"
|
|
37036
37335
|
};
|
|
37037
|
-
const _hoisted_3$
|
|
37038
|
-
const _sfc_main$
|
|
37336
|
+
const _hoisted_3$b = ["onClick"];
|
|
37337
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
37039
37338
|
__name: "RelatedQueries",
|
|
37040
37339
|
props: {
|
|
37041
37340
|
options: {}
|
|
@@ -37129,8 +37428,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
37129
37428
|
};
|
|
37130
37429
|
return (_ctx, _cache) => {
|
|
37131
37430
|
var _a25, _b25, _c, _d;
|
|
37132
|
-
return _ctx.options && hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
37133
|
-
((_b25 = (_a25 = _ctx.options) == null ? void 0 : _a25.labels) == null ? void 0 : _b25.title) ? (openBlock(), createElementBlock("h3", _hoisted_2$
|
|
37431
|
+
return _ctx.options && hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$m, [
|
|
37432
|
+
((_b25 = (_a25 = _ctx.options) == null ? void 0 : _a25.labels) == null ? void 0 : _b25.title) ? (openBlock(), createElementBlock("h3", _hoisted_2$h, toDisplayString((_d = (_c = _ctx.options) == null ? void 0 : _c.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
|
|
37134
37433
|
createBaseVNode("ul", null, [
|
|
37135
37434
|
(openBlock(true), createElementBlock(Fragment, null, renderList(relatedQueries2.value, (query) => {
|
|
37136
37435
|
return withDirectives((openBlock(), createElementBlock("li", {
|
|
@@ -37140,14 +37439,14 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
37140
37439
|
createBaseVNode("a", {
|
|
37141
37440
|
onClick: ($event) => handleRelatedQueryClick(query)
|
|
37142
37441
|
}, [
|
|
37143
|
-
createVNode(_sfc_main$
|
|
37442
|
+
createVNode(_sfc_main$p, {
|
|
37144
37443
|
"source-key": query.key,
|
|
37145
37444
|
options: _ctx.options,
|
|
37146
37445
|
query: query.value,
|
|
37147
37446
|
"existing-items-from-other-queries": allDisplayItems.value,
|
|
37148
37447
|
onLoaded: (item) => processLoadedItem(query, item)
|
|
37149
37448
|
}, null, 8, ["source-key", "options", "query", "existing-items-from-other-queries", "onLoaded"])
|
|
37150
|
-
], 8, _hoisted_3$
|
|
37449
|
+
], 8, _hoisted_3$b)
|
|
37151
37450
|
], 2)), [
|
|
37152
37451
|
[vShow, querySourceResultMap.value[query.value] !== false]
|
|
37153
37452
|
]);
|
|
@@ -37184,13 +37483,13 @@ const extractRedirectionSuggestion = (searchText = "", options) => {
|
|
|
37184
37483
|
}
|
|
37185
37484
|
return null;
|
|
37186
37485
|
};
|
|
37187
|
-
const _hoisted_1$
|
|
37486
|
+
const _hoisted_1$l = {
|
|
37188
37487
|
key: 0,
|
|
37189
37488
|
class: "lupa-redirection-suggestion"
|
|
37190
37489
|
};
|
|
37191
|
-
const _hoisted_2$
|
|
37192
|
-
const _hoisted_3$
|
|
37193
|
-
const _sfc_main$
|
|
37490
|
+
const _hoisted_2$g = { class: "lupa-redirections-suggestion-label" };
|
|
37491
|
+
const _hoisted_3$a = ["href"];
|
|
37492
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
37194
37493
|
__name: "RedirectionSuggestions",
|
|
37195
37494
|
props: {
|
|
37196
37495
|
options: {}
|
|
@@ -37213,19 +37512,19 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
37213
37512
|
)
|
|
37214
37513
|
);
|
|
37215
37514
|
return (_ctx, _cache) => {
|
|
37216
|
-
return redirectionSuggestion.value && label.value && link.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
37217
|
-
createBaseVNode("h4", _hoisted_2$
|
|
37218
|
-
createBaseVNode("a", { href: link.value }, toDisplayString(label.value), 9, _hoisted_3$
|
|
37515
|
+
return redirectionSuggestion.value && label.value && link.value ? (openBlock(), createElementBlock("div", _hoisted_1$l, [
|
|
37516
|
+
createBaseVNode("h4", _hoisted_2$g, [
|
|
37517
|
+
createBaseVNode("a", { href: link.value }, toDisplayString(label.value), 9, _hoisted_3$a)
|
|
37219
37518
|
])
|
|
37220
37519
|
])) : createCommentVNode("", true);
|
|
37221
37520
|
};
|
|
37222
37521
|
}
|
|
37223
37522
|
});
|
|
37224
|
-
const _hoisted_1$
|
|
37523
|
+
const _hoisted_1$k = {
|
|
37225
37524
|
key: 0,
|
|
37226
37525
|
class: "lupa-refiners-loading-notice"
|
|
37227
37526
|
};
|
|
37228
|
-
const _sfc_main$
|
|
37527
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
37229
37528
|
__name: "RefinersLoadingNotice",
|
|
37230
37529
|
props: {
|
|
37231
37530
|
labels: {}
|
|
@@ -37236,22 +37535,22 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
37236
37535
|
const props = __props;
|
|
37237
37536
|
const label = computed(() => props.labels.refinersLoadingNotice);
|
|
37238
37537
|
return (_ctx, _cache) => {
|
|
37239
|
-
return label.value && unref(loadingRefiners) ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
37538
|
+
return label.value && unref(loadingRefiners) ? (openBlock(), createElementBlock("div", _hoisted_1$k, [
|
|
37240
37539
|
createBaseVNode("p", null, toDisplayString(label.value), 1),
|
|
37241
37540
|
createVNode(Spinner)
|
|
37242
37541
|
])) : createCommentVNode("", true);
|
|
37243
37542
|
};
|
|
37244
37543
|
}
|
|
37245
37544
|
});
|
|
37246
|
-
const _hoisted_1$
|
|
37247
|
-
const _hoisted_2$
|
|
37248
|
-
const _hoisted_3$
|
|
37249
|
-
const _hoisted_4$
|
|
37250
|
-
const _hoisted_5$
|
|
37545
|
+
const _hoisted_1$j = { class: "lupa-related-query-item" };
|
|
37546
|
+
const _hoisted_2$f = { class: "lupa-related-query-image" };
|
|
37547
|
+
const _hoisted_3$9 = { class: "lupa-related-query-label" };
|
|
37548
|
+
const _hoisted_4$6 = { class: "lupa-related-query-title" };
|
|
37549
|
+
const _hoisted_5$2 = {
|
|
37251
37550
|
key: 0,
|
|
37252
37551
|
class: "lupa-related-query-count"
|
|
37253
37552
|
};
|
|
37254
|
-
const _sfc_main$
|
|
37553
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
37255
37554
|
__name: "RelatedQueryPanelApi",
|
|
37256
37555
|
props: {
|
|
37257
37556
|
relatedQuery: {},
|
|
@@ -37283,9 +37582,9 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
37283
37582
|
});
|
|
37284
37583
|
return (_ctx, _cache) => {
|
|
37285
37584
|
var _a25;
|
|
37286
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
37287
|
-
createBaseVNode("div", _hoisted_2$
|
|
37288
|
-
itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$
|
|
37585
|
+
return openBlock(), createElementBlock("div", _hoisted_1$j, [
|
|
37586
|
+
createBaseVNode("div", _hoisted_2$f, [
|
|
37587
|
+
itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$1w, {
|
|
37289
37588
|
key: 0,
|
|
37290
37589
|
"wrapper-class": "lupa-related-query-image-wrapper",
|
|
37291
37590
|
"image-class": "lupa-related-query-image",
|
|
@@ -37293,24 +37592,24 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
37293
37592
|
options: image.value
|
|
37294
37593
|
}, null, 8, ["item", "options"])) : createCommentVNode("", true)
|
|
37295
37594
|
]),
|
|
37296
|
-
createBaseVNode("div", _hoisted_3$
|
|
37297
|
-
createBaseVNode("span", _hoisted_4$
|
|
37298
|
-
((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
37595
|
+
createBaseVNode("div", _hoisted_3$9, [
|
|
37596
|
+
createBaseVNode("span", _hoisted_4$6, toDisplayString(query.value), 1),
|
|
37597
|
+
((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$2, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
|
|
37299
37598
|
])
|
|
37300
37599
|
]);
|
|
37301
37600
|
};
|
|
37302
37601
|
}
|
|
37303
37602
|
});
|
|
37304
|
-
const _hoisted_1$
|
|
37603
|
+
const _hoisted_1$i = {
|
|
37305
37604
|
key: 0,
|
|
37306
37605
|
class: "lupa-related-queries"
|
|
37307
37606
|
};
|
|
37308
|
-
const _hoisted_2$
|
|
37607
|
+
const _hoisted_2$e = {
|
|
37309
37608
|
key: 0,
|
|
37310
37609
|
class: "lupa-related-queries-title"
|
|
37311
37610
|
};
|
|
37312
|
-
const _hoisted_3$
|
|
37313
|
-
const _sfc_main$
|
|
37611
|
+
const _hoisted_3$8 = ["onClick"];
|
|
37612
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
37314
37613
|
__name: "RelatedQueriesApi",
|
|
37315
37614
|
props: {
|
|
37316
37615
|
options: {}
|
|
@@ -37320,7 +37619,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
37320
37619
|
const searchResultStore = useSearchResultStore();
|
|
37321
37620
|
const paramsStore = useParamsStore();
|
|
37322
37621
|
const optionsStore = useOptionsStore();
|
|
37323
|
-
const { searchResult, relatedQueriesResult } = storeToRefs(searchResultStore);
|
|
37622
|
+
const { searchResult, relatedQueriesResult, relatedQueryFacetKeys } = storeToRefs(searchResultStore);
|
|
37324
37623
|
const relatedQueries2 = computed(() => {
|
|
37325
37624
|
var _a25, _b25, _c, _d;
|
|
37326
37625
|
const allQueries = (_b25 = (_a25 = relatedQueriesResult.value) == null ? void 0 : _a25.relatedQueries) != null ? _b25 : [];
|
|
@@ -37348,7 +37647,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
37348
37647
|
{ key: query.key, value: query.value },
|
|
37349
37648
|
optionsStore.getQueryParamName,
|
|
37350
37649
|
{},
|
|
37351
|
-
(_a25 =
|
|
37650
|
+
(_a25 = relatedQueryFacetKeys.value) == null ? void 0 : _a25.map((key) => `f.${key}`)
|
|
37352
37651
|
);
|
|
37353
37652
|
};
|
|
37354
37653
|
const getSelectedFilterClass = (relatedQuery) => {
|
|
@@ -37362,8 +37661,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
37362
37661
|
};
|
|
37363
37662
|
return (_ctx, _cache) => {
|
|
37364
37663
|
var _a25, _b25, _c, _d;
|
|
37365
|
-
return hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
37366
|
-
((_b25 = (_a25 = _ctx.options) == null ? void 0 : _a25.labels) == null ? void 0 : _b25.title) ? (openBlock(), createElementBlock("h3", _hoisted_2$
|
|
37664
|
+
return hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$i, [
|
|
37665
|
+
((_b25 = (_a25 = _ctx.options) == null ? void 0 : _a25.labels) == null ? void 0 : _b25.title) ? (openBlock(), createElementBlock("h3", _hoisted_2$e, toDisplayString((_d = (_c = _ctx.options) == null ? void 0 : _c.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
|
|
37367
37666
|
createBaseVNode("ul", null, [
|
|
37368
37667
|
(openBlock(true), createElementBlock(Fragment, null, renderList(relatedQueries2.value, (query) => {
|
|
37369
37668
|
return openBlock(), createElementBlock("li", {
|
|
@@ -37373,11 +37672,11 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
37373
37672
|
createBaseVNode("a", {
|
|
37374
37673
|
onClick: ($event) => handleRelatedQueryClick(query)
|
|
37375
37674
|
}, [
|
|
37376
|
-
createVNode(_sfc_main$
|
|
37675
|
+
createVNode(_sfc_main$l, {
|
|
37377
37676
|
relatedQuery: query,
|
|
37378
37677
|
options: _ctx.options
|
|
37379
37678
|
}, null, 8, ["relatedQuery", "options"])
|
|
37380
|
-
], 8, _hoisted_3$
|
|
37679
|
+
], 8, _hoisted_3$8)
|
|
37381
37680
|
], 2);
|
|
37382
37681
|
}), 128))
|
|
37383
37682
|
])
|
|
@@ -37385,9 +37684,9 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
37385
37684
|
};
|
|
37386
37685
|
}
|
|
37387
37686
|
});
|
|
37388
|
-
const _hoisted_1$
|
|
37389
|
-
const _hoisted_2$
|
|
37390
|
-
const _sfc_main$
|
|
37687
|
+
const _hoisted_1$h = { key: 0 };
|
|
37688
|
+
const _hoisted_2$d = ["innerHTML"];
|
|
37689
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
37391
37690
|
__name: "ZeroResults",
|
|
37392
37691
|
props: {
|
|
37393
37692
|
emptyResultsLabel: {},
|
|
@@ -37416,36 +37715,36 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
37416
37715
|
});
|
|
37417
37716
|
return (_ctx, _cache) => {
|
|
37418
37717
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
37419
|
-
showDefaultZeroResultsTemplate.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
37718
|
+
showDefaultZeroResultsTemplate.value ? (openBlock(), createElementBlock("div", _hoisted_1$h, [
|
|
37420
37719
|
createTextVNode(toDisplayString(_ctx.emptyResultsLabel) + " ", 1),
|
|
37421
37720
|
createBaseVNode("span", null, toDisplayString(_ctx.currentQueryText), 1)
|
|
37422
37721
|
])) : createCommentVNode("", true),
|
|
37423
37722
|
showCustomZeroResultsTemplate.value ? (openBlock(), createElementBlock("div", {
|
|
37424
37723
|
key: 1,
|
|
37425
37724
|
innerHTML: htmlTemplate.value
|
|
37426
|
-
}, null, 8, _hoisted_2$
|
|
37725
|
+
}, null, 8, _hoisted_2$d)) : createCommentVNode("", true)
|
|
37427
37726
|
], 64);
|
|
37428
37727
|
};
|
|
37429
37728
|
}
|
|
37430
37729
|
});
|
|
37431
|
-
const _hoisted_1$
|
|
37432
|
-
const _hoisted_2$
|
|
37730
|
+
const _hoisted_1$g = { id: "lupa-search-results-products" };
|
|
37731
|
+
const _hoisted_2$c = {
|
|
37433
37732
|
class: "lupa-products",
|
|
37434
37733
|
"data-cy": "lupa-products"
|
|
37435
37734
|
};
|
|
37436
|
-
const _hoisted_3$
|
|
37735
|
+
const _hoisted_3$7 = {
|
|
37437
37736
|
key: 1,
|
|
37438
37737
|
class: "lupa-empty-results",
|
|
37439
37738
|
"data-cy": "lupa-no-results-in-page"
|
|
37440
37739
|
};
|
|
37441
|
-
const _hoisted_4$
|
|
37740
|
+
const _hoisted_4$5 = {
|
|
37442
37741
|
key: 5,
|
|
37443
37742
|
class: "lupa-empty-results",
|
|
37444
37743
|
"data-cy": "lupa-no-results"
|
|
37445
37744
|
};
|
|
37446
|
-
const _hoisted_5 = { key: 6 };
|
|
37745
|
+
const _hoisted_5$1 = { key: 6 };
|
|
37447
37746
|
const _hoisted_6 = { key: 7 };
|
|
37448
|
-
const _sfc_main$
|
|
37747
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
37449
37748
|
__name: "SearchResultsProducts",
|
|
37450
37749
|
props: {
|
|
37451
37750
|
options: {},
|
|
@@ -37461,7 +37760,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
37461
37760
|
hasResults,
|
|
37462
37761
|
currentQueryText,
|
|
37463
37762
|
isPageEmpty,
|
|
37464
|
-
|
|
37763
|
+
isFilterSidebarVisible,
|
|
37465
37764
|
columnCount,
|
|
37466
37765
|
searchResult,
|
|
37467
37766
|
layout,
|
|
@@ -37492,7 +37791,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
37492
37791
|
});
|
|
37493
37792
|
const showTopFilters = computed(() => {
|
|
37494
37793
|
var _a25, _b25, _c;
|
|
37495
|
-
return ((_c = (_b25 = (_a25 = props.options.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.style) == null ? void 0 : _c.type)
|
|
37794
|
+
return ((_c = (_b25 = (_a25 = props.options.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.style) == null ? void 0 : _c.type) !== "sidebar";
|
|
37496
37795
|
});
|
|
37497
37796
|
const showMobileFilters = computed(() => {
|
|
37498
37797
|
return props.options.searchTitlePosition !== "search-results-top";
|
|
@@ -37569,40 +37868,40 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
37569
37868
|
};
|
|
37570
37869
|
return (_ctx, _cache) => {
|
|
37571
37870
|
var _a25, _b25, _c;
|
|
37572
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
37573
|
-
unref(loading) && !unref(
|
|
37871
|
+
return openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
37872
|
+
unref(loading) && !unref(isFilterSidebarVisible) ? (openBlock(), createBlock(Spinner, {
|
|
37574
37873
|
key: 0,
|
|
37575
37874
|
class: "lupa-loader"
|
|
37576
37875
|
})) : createCommentVNode("", true),
|
|
37577
|
-
createVNode(_sfc_main$
|
|
37876
|
+
createVNode(_sfc_main$n, {
|
|
37578
37877
|
options: _ctx.options.redirectionSuggestions
|
|
37579
37878
|
}, null, 8, ["options"]),
|
|
37580
|
-
createVNode(_sfc_main$
|
|
37879
|
+
createVNode(_sfc_main$s, {
|
|
37581
37880
|
options: _ctx.options,
|
|
37582
37881
|
location: "top",
|
|
37583
37882
|
sdkOptions: _ctx.options.options
|
|
37584
37883
|
}, null, 8, ["options", "sdkOptions"]),
|
|
37585
|
-
showLocalRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$
|
|
37884
|
+
showLocalRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$o, {
|
|
37586
37885
|
key: 1,
|
|
37587
37886
|
options: _ctx.options.relatedQueries
|
|
37588
37887
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
37589
|
-
showApiRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$
|
|
37888
|
+
showApiRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$k, {
|
|
37590
37889
|
key: 2,
|
|
37591
37890
|
options: _ctx.options.relatedQueries
|
|
37592
37891
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
37593
37892
|
unref(hasResults) ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
37594
|
-
showTopFilters.value ? (openBlock(), createBlock(_sfc_main$
|
|
37893
|
+
showTopFilters.value ? (openBlock(), createBlock(_sfc_main$P, {
|
|
37595
37894
|
key: 0,
|
|
37596
37895
|
options: (_a25 = _ctx.options.filters) != null ? _a25 : {}
|
|
37597
37896
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
37598
|
-
showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$
|
|
37897
|
+
showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$H, {
|
|
37599
37898
|
key: 1,
|
|
37600
37899
|
class: "lupa-toolbar-mobile",
|
|
37601
37900
|
options: _ctx.options,
|
|
37602
37901
|
"pagination-location": "top",
|
|
37603
37902
|
onFilter: filter
|
|
37604
37903
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
37605
|
-
currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$
|
|
37904
|
+
currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$14, {
|
|
37606
37905
|
key: 2,
|
|
37607
37906
|
class: normalizeClass(currentFiltersClass.value),
|
|
37608
37907
|
"data-cy": "lupa-search-result-filters-mobile-toolbar",
|
|
@@ -37611,19 +37910,19 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
37611
37910
|
}, null, 8, ["class", "options", "expandable"])) : createCommentVNode("", true)
|
|
37612
37911
|
], 64)) : createCommentVNode("", true),
|
|
37613
37912
|
unref(hasResults) ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
37614
|
-
createVNode(_sfc_main$
|
|
37913
|
+
createVNode(_sfc_main$H, {
|
|
37615
37914
|
class: "lupa-toolbar-top",
|
|
37616
37915
|
options: _ctx.options,
|
|
37617
37916
|
"pagination-location": "top"
|
|
37618
37917
|
}, null, 8, ["options"]),
|
|
37619
|
-
currentFilterOptions.value && currentFilterPositionDesktop.value === "resultsTop" ? (openBlock(), createBlock(_sfc_main$
|
|
37918
|
+
currentFilterOptions.value && currentFilterPositionDesktop.value === "resultsTop" ? (openBlock(), createBlock(_sfc_main$14, {
|
|
37620
37919
|
key: 0,
|
|
37621
37920
|
class: normalizeClass(currentFiltersClass.value),
|
|
37622
37921
|
"data-cy": "lupa-search-result-filters-mobile-toolbar",
|
|
37623
37922
|
options: currentFilterOptions.value,
|
|
37624
37923
|
expandable: !desktopFiltersExpanded.value
|
|
37625
37924
|
}, null, 8, ["class", "options", "expandable"])) : createCommentVNode("", true),
|
|
37626
|
-
createBaseVNode("div", _hoisted_2$
|
|
37925
|
+
createBaseVNode("div", _hoisted_2$c, [
|
|
37627
37926
|
_ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(searchResult).items, (product, index) => {
|
|
37628
37927
|
return renderSlot(_ctx.$slots, "productCard", {
|
|
37629
37928
|
style: normalizeStyle(columnSize.value),
|
|
@@ -37632,7 +37931,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
37632
37931
|
options: productCardOptions.value
|
|
37633
37932
|
});
|
|
37634
37933
|
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(searchResult).items, (product, index) => {
|
|
37635
|
-
return openBlock(), createBlock(_sfc_main$
|
|
37934
|
+
return openBlock(), createBlock(_sfc_main$v, {
|
|
37636
37935
|
style: normalizeStyle(columnSize.value),
|
|
37637
37936
|
key: getProductKeyAction(index, product),
|
|
37638
37937
|
product,
|
|
@@ -37641,7 +37940,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
37641
37940
|
}, null, 8, ["style", "product", "options", "analytics-metadata"]);
|
|
37642
37941
|
}), 128))
|
|
37643
37942
|
]),
|
|
37644
|
-
unref(isPageEmpty) && _ctx.options.labels.noItemsInPage ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
37943
|
+
unref(isPageEmpty) && _ctx.options.labels.noItemsInPage ? (openBlock(), createElementBlock("div", _hoisted_3$7, [
|
|
37645
37944
|
createTextVNode(toDisplayString(_ctx.options.labels.noItemsInPage) + " ", 1),
|
|
37646
37945
|
_ctx.options.labels.backToFirstPage ? (openBlock(), createElementBlock("span", {
|
|
37647
37946
|
key: 0,
|
|
@@ -37649,36 +37948,36 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
37649
37948
|
onClick: goToFirstPage
|
|
37650
37949
|
}, toDisplayString(_ctx.options.labels.backToFirstPage), 1)) : createCommentVNode("", true)
|
|
37651
37950
|
])) : createCommentVNode("", true),
|
|
37652
|
-
createVNode(_sfc_main$
|
|
37951
|
+
createVNode(_sfc_main$H, {
|
|
37653
37952
|
class: "lupa-toolbar-bottom",
|
|
37654
37953
|
options: _ctx.options,
|
|
37655
37954
|
"pagination-location": "bottom"
|
|
37656
37955
|
}, null, 8, ["options"]),
|
|
37657
|
-
createVNode(_sfc_main$
|
|
37956
|
+
createVNode(_sfc_main$s, {
|
|
37658
37957
|
options: _ctx.options,
|
|
37659
37958
|
location: "bottom",
|
|
37660
37959
|
sdkOptions: _ctx.options.options
|
|
37661
37960
|
}, null, 8, ["options", "sdkOptions"])
|
|
37662
|
-
], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
37663
|
-
createVNode(_sfc_main$
|
|
37961
|
+
], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$5, [
|
|
37962
|
+
createVNode(_sfc_main$j, {
|
|
37664
37963
|
emptyResultsLabel: (_b25 = _ctx.options.labels) == null ? void 0 : _b25.emptyResults,
|
|
37665
37964
|
currentQueryText: unref(currentQueryText),
|
|
37666
37965
|
hasSimilarQueries: hasSimilarQueries.value || hasSimilarResults.value,
|
|
37667
37966
|
zeroResults: (_c = _ctx.options) == null ? void 0 : _c.zeroResults
|
|
37668
37967
|
}, null, 8, ["emptyResultsLabel", "currentQueryText", "hasSimilarQueries", "zeroResults"])
|
|
37669
37968
|
])) : createCommentVNode("", true),
|
|
37670
|
-
createVNode(_sfc_main$
|
|
37969
|
+
createVNode(_sfc_main$m, {
|
|
37671
37970
|
labels: _ctx.options.labels
|
|
37672
37971
|
}, null, 8, ["labels"]),
|
|
37673
|
-
hasSimilarQueries.value ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
37674
|
-
createVNode(_sfc_main$
|
|
37972
|
+
hasSimilarQueries.value ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
|
|
37973
|
+
createVNode(_sfc_main$u, {
|
|
37675
37974
|
labels: similarQueriesLabels.value,
|
|
37676
37975
|
columnSize: columnSize.value,
|
|
37677
37976
|
productCardOptions: productCardOptions.value
|
|
37678
37977
|
}, null, 8, ["labels", "columnSize", "productCardOptions"])
|
|
37679
37978
|
])) : createCommentVNode("", true),
|
|
37680
37979
|
hasSimilarResults.value ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
37681
|
-
createVNode(_sfc_main$
|
|
37980
|
+
createVNode(_sfc_main$q, {
|
|
37682
37981
|
labels: similarResultsLabels.value,
|
|
37683
37982
|
columnSize: columnSize.value,
|
|
37684
37983
|
productCardOptions: productCardOptions.value
|
|
@@ -37689,17 +37988,17 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
37689
37988
|
};
|
|
37690
37989
|
}
|
|
37691
37990
|
});
|
|
37692
|
-
const _hoisted_1$
|
|
37693
|
-
const _hoisted_2$
|
|
37991
|
+
const _hoisted_1$f = { class: "lupa-top-mobile-filter-wrapper" };
|
|
37992
|
+
const _hoisted_2$b = {
|
|
37694
37993
|
key: 0,
|
|
37695
37994
|
class: "lupa-category-back"
|
|
37696
37995
|
};
|
|
37697
|
-
const _hoisted_3$
|
|
37698
|
-
const _hoisted_4$
|
|
37996
|
+
const _hoisted_3$6 = ["href"];
|
|
37997
|
+
const _hoisted_4$4 = {
|
|
37699
37998
|
key: 1,
|
|
37700
37999
|
class: "lupa-child-category-list"
|
|
37701
38000
|
};
|
|
37702
|
-
const _sfc_main$
|
|
38001
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
37703
38002
|
__name: "CategoryTopFilters",
|
|
37704
38003
|
props: {
|
|
37705
38004
|
options: {}
|
|
@@ -37747,24 +38046,24 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
37747
38046
|
"has-related-category-children": hasRelatedCategoryChildren.value
|
|
37748
38047
|
}])
|
|
37749
38048
|
}, [
|
|
37750
|
-
createBaseVNode("div", _hoisted_1$
|
|
37751
|
-
hasBackButton.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
38049
|
+
createBaseVNode("div", _hoisted_1$f, [
|
|
38050
|
+
hasBackButton.value ? (openBlock(), createElementBlock("div", _hoisted_2$b, [
|
|
37752
38051
|
createBaseVNode("a", {
|
|
37753
38052
|
"data-cy": "lupa-category-back",
|
|
37754
38053
|
href: backUrlLink.value,
|
|
37755
38054
|
onClick: handleNavigationBack
|
|
37756
|
-
}, toDisplayString(backTitle.value), 9, _hoisted_3$
|
|
38055
|
+
}, toDisplayString(backTitle.value), 9, _hoisted_3$6)
|
|
37757
38056
|
])) : createCommentVNode("", true),
|
|
37758
|
-
hasRelatedCategoryChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
38057
|
+
hasRelatedCategoryChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$4, [
|
|
37759
38058
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(relatedCategoryChildren), (child) => {
|
|
37760
|
-
return openBlock(), createBlock(_sfc_main$
|
|
38059
|
+
return openBlock(), createBlock(_sfc_main$13, {
|
|
37761
38060
|
key: getCategoryKey(child),
|
|
37762
38061
|
item: child,
|
|
37763
38062
|
options: categoryOptions.value
|
|
37764
38063
|
}, null, 8, ["item", "options"]);
|
|
37765
38064
|
}), 128))
|
|
37766
38065
|
])) : createCommentVNode("", true),
|
|
37767
|
-
createVNode(_sfc_main$
|
|
38066
|
+
createVNode(_sfc_main$H, {
|
|
37768
38067
|
class: "lupa-toolbar-mobile",
|
|
37769
38068
|
"pagination-location": "top",
|
|
37770
38069
|
options: _ctx.options
|
|
@@ -37774,6 +38073,129 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
37774
38073
|
};
|
|
37775
38074
|
}
|
|
37776
38075
|
});
|
|
38076
|
+
const _hoisted_1$e = {
|
|
38077
|
+
id: "lupa-search-results-sort-list",
|
|
38078
|
+
class: "lupa-search-results-sort-list"
|
|
38079
|
+
};
|
|
38080
|
+
const _hoisted_2$a = ["onClick"];
|
|
38081
|
+
const _hoisted_3$5 = ["for"];
|
|
38082
|
+
const _hoisted_4$3 = ["id", "checked"];
|
|
38083
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
38084
|
+
__name: "SortList",
|
|
38085
|
+
setup(__props) {
|
|
38086
|
+
const { sortItems, selectedKey, handleSelect, setSortValue } = useSorting();
|
|
38087
|
+
onMounted(() => {
|
|
38088
|
+
setSortValue();
|
|
38089
|
+
});
|
|
38090
|
+
const selectValue = (key) => {
|
|
38091
|
+
selectedKey.value = key;
|
|
38092
|
+
handleSelect();
|
|
38093
|
+
};
|
|
38094
|
+
return (_ctx, _cache) => {
|
|
38095
|
+
return openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
38096
|
+
createBaseVNode("ul", null, [
|
|
38097
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(sortItems), (option) => {
|
|
38098
|
+
return openBlock(), createElementBlock("li", {
|
|
38099
|
+
key: option.key,
|
|
38100
|
+
class: normalizeClass({ "lupa-sort-item-selected": option.key === unref(selectedKey) }),
|
|
38101
|
+
onClick: ($event) => selectValue(option.key)
|
|
38102
|
+
}, [
|
|
38103
|
+
createBaseVNode("label", {
|
|
38104
|
+
for: "lupa-sort-list-" + option.key
|
|
38105
|
+
}, toDisplayString(option.label), 9, _hoisted_3$5),
|
|
38106
|
+
createBaseVNode("input", {
|
|
38107
|
+
id: "lupa-sort-list-" + option.key,
|
|
38108
|
+
type: "radio",
|
|
38109
|
+
checked: option.key === unref(selectedKey)
|
|
38110
|
+
}, null, 8, _hoisted_4$3)
|
|
38111
|
+
], 10, _hoisted_2$a);
|
|
38112
|
+
}), 128))
|
|
38113
|
+
])
|
|
38114
|
+
]);
|
|
38115
|
+
};
|
|
38116
|
+
}
|
|
38117
|
+
});
|
|
38118
|
+
const _hoisted_1$d = { class: "lupa-sort-sidebar-content" };
|
|
38119
|
+
const _hoisted_2$9 = { class: "lupa-sidebar-top" };
|
|
38120
|
+
const _hoisted_3$4 = { class: "lupa-sidebar-title" };
|
|
38121
|
+
const _hoisted_4$2 = { class: "lupa-sidebar-sort-options" };
|
|
38122
|
+
const _hoisted_5 = { class: "lupa-sidebar-sort-actions" };
|
|
38123
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
38124
|
+
__name: "SortDrawer",
|
|
38125
|
+
setup(__props) {
|
|
38126
|
+
const optionsStore = useOptionsStore();
|
|
38127
|
+
const searchResultStore = useSearchResultStore();
|
|
38128
|
+
const paramStore = useParamsStore();
|
|
38129
|
+
const { searchResultOptions } = storeToRefs(optionsStore);
|
|
38130
|
+
const { isSidebarClosing, isSortingSidebarVisible } = storeToRefs(searchResultStore);
|
|
38131
|
+
const { handleSortSidebarToggle } = useSidebarToggle();
|
|
38132
|
+
const sortStyleOptions = computed(() => {
|
|
38133
|
+
var _a25;
|
|
38134
|
+
return (_a25 = searchResultOptions.value) == null ? void 0 : _a25.sortStyle;
|
|
38135
|
+
});
|
|
38136
|
+
const sidebarTitle = computed(() => {
|
|
38137
|
+
var _a25, _b25, _c, _d;
|
|
38138
|
+
return (_d = (_c = (_b25 = (_a25 = sortStyleOptions == null ? void 0 : sortStyleOptions.value) == null ? void 0 : _a25.drawer) == null ? void 0 : _b25.labels) == null ? void 0 : _c.title) != null ? _d : "";
|
|
38139
|
+
});
|
|
38140
|
+
const clearSortLabel = computed(() => {
|
|
38141
|
+
var _a25, _b25, _c, _d;
|
|
38142
|
+
return (_d = (_c = (_b25 = (_a25 = sortStyleOptions == null ? void 0 : sortStyleOptions.value) == null ? void 0 : _a25.drawer) == null ? void 0 : _b25.labels) == null ? void 0 : _c.clearLabel) != null ? _d : "";
|
|
38143
|
+
});
|
|
38144
|
+
const applySortLabel = computed(() => {
|
|
38145
|
+
var _a25, _b25, _c, _d;
|
|
38146
|
+
return (_d = (_c = (_b25 = (_a25 = sortStyleOptions == null ? void 0 : sortStyleOptions.value) == null ? void 0 : _a25.drawer) == null ? void 0 : _b25.labels) == null ? void 0 : _c.applyLabel) != null ? _d : "";
|
|
38147
|
+
});
|
|
38148
|
+
const handleDrawerToggle = () => {
|
|
38149
|
+
searchResultStore.setSidebarState({ visible: false, sidebar: "sorting" });
|
|
38150
|
+
};
|
|
38151
|
+
const clearSort = () => {
|
|
38152
|
+
paramStore.removeParameters({
|
|
38153
|
+
paramsToRemove: [optionsStore.getQueryParamName(QUERY_PARAMS$1.SORT)]
|
|
38154
|
+
});
|
|
38155
|
+
handleSortSidebarToggle();
|
|
38156
|
+
};
|
|
38157
|
+
const applySort = () => {
|
|
38158
|
+
handleSortSidebarToggle();
|
|
38159
|
+
};
|
|
38160
|
+
return (_ctx, _cache) => {
|
|
38161
|
+
return unref(isSortingSidebarVisible) ? (openBlock(), createElementBlock("div", {
|
|
38162
|
+
key: 0,
|
|
38163
|
+
class: normalizeClass(["lupa-sort-sidebar", { "lupa-sort-is-closing": unref(isSidebarClosing) }])
|
|
38164
|
+
}, [
|
|
38165
|
+
createBaseVNode("div", {
|
|
38166
|
+
class: "lupa-sidebar-close",
|
|
38167
|
+
onClick: withModifiers(handleDrawerToggle, ["stop"])
|
|
38168
|
+
}),
|
|
38169
|
+
createBaseVNode("div", _hoisted_1$d, [
|
|
38170
|
+
createBaseVNode("div", _hoisted_2$9, [
|
|
38171
|
+
createBaseVNode("div", _hoisted_3$4, toDisplayString(sidebarTitle.value), 1),
|
|
38172
|
+
createBaseVNode("div", {
|
|
38173
|
+
class: "lupa-filter-toggle-mobile",
|
|
38174
|
+
onClick: handleDrawerToggle
|
|
38175
|
+
})
|
|
38176
|
+
]),
|
|
38177
|
+
createBaseVNode("div", _hoisted_4$2, [
|
|
38178
|
+
createVNode(_sfc_main$g)
|
|
38179
|
+
]),
|
|
38180
|
+
createBaseVNode("div", _hoisted_5, [
|
|
38181
|
+
clearSortLabel.value ? (openBlock(), createElementBlock("button", {
|
|
38182
|
+
key: 0,
|
|
38183
|
+
type: "button",
|
|
38184
|
+
class: "lupa-sidebar-sort-clear",
|
|
38185
|
+
onClick: withModifiers(clearSort, ["stop"])
|
|
38186
|
+
}, toDisplayString(clearSortLabel.value), 1)) : createCommentVNode("", true),
|
|
38187
|
+
applySortLabel.value ? (openBlock(), createElementBlock("button", {
|
|
38188
|
+
key: 1,
|
|
38189
|
+
type: "button",
|
|
38190
|
+
class: "lupa-sidebar-sort-apply",
|
|
38191
|
+
onClick: withModifiers(applySort, ["stop"])
|
|
38192
|
+
}, toDisplayString(applySortLabel.value), 1)) : createCommentVNode("", true)
|
|
38193
|
+
])
|
|
38194
|
+
])
|
|
38195
|
+
], 2)) : createCommentVNode("", true);
|
|
38196
|
+
};
|
|
38197
|
+
}
|
|
38198
|
+
});
|
|
37777
38199
|
const _hoisted_1$c = {
|
|
37778
38200
|
key: 0,
|
|
37779
38201
|
class: "lupa-container-title-summary-mobile"
|
|
@@ -37808,7 +38230,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
37808
38230
|
currentQueryText,
|
|
37809
38231
|
hasResults,
|
|
37810
38232
|
currentFilterCount,
|
|
37811
|
-
|
|
38233
|
+
isFilterSidebarVisible,
|
|
37812
38234
|
layout,
|
|
37813
38235
|
loadingFacets,
|
|
37814
38236
|
loadingRefiners
|
|
@@ -37830,7 +38252,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
37830
38252
|
});
|
|
37831
38253
|
const indicatorClasses = computed(() => {
|
|
37832
38254
|
return {
|
|
37833
|
-
"lupa-mobile-sidebar-visible":
|
|
38255
|
+
"lupa-mobile-sidebar-visible": isFilterSidebarVisible.value,
|
|
37834
38256
|
"lupa-layout-grid": !layout.value || layout.value === ResultsLayoutEnum.GRID,
|
|
37835
38257
|
"lupa-layout-list": layout.value === ResultsLayoutEnum.LIST
|
|
37836
38258
|
};
|
|
@@ -38072,32 +38494,33 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
38072
38494
|
class: normalizeClass(["lupa-search-result-wrapper", { "lupa-search-wrapper-no-results": !unref(hasResults) }])
|
|
38073
38495
|
}, [
|
|
38074
38496
|
_ctx.isContainer ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
38075
|
-
createVNode(_sfc_main$
|
|
38076
|
-
createVNode(_sfc_main$
|
|
38497
|
+
createVNode(_sfc_main$18, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
38498
|
+
createVNode(_sfc_main$16, {
|
|
38077
38499
|
"show-summary": true,
|
|
38078
38500
|
options: _ctx.options,
|
|
38079
38501
|
"is-product-list": (_a25 = _ctx.isProductList) != null ? _a25 : false
|
|
38080
38502
|
}, null, 8, ["options", "is-product-list"])
|
|
38081
38503
|
])) : createCommentVNode("", true),
|
|
38082
|
-
isTitleResultTopPosition.value ? (openBlock(), createBlock(_sfc_main$
|
|
38504
|
+
isTitleResultTopPosition.value ? (openBlock(), createBlock(_sfc_main$h, {
|
|
38083
38505
|
key: 1,
|
|
38084
38506
|
options: _ctx.options
|
|
38085
38507
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
38086
|
-
_ctx.options.filters ? (openBlock(), createBlock(_sfc_main$
|
|
38508
|
+
_ctx.options.filters ? (openBlock(), createBlock(_sfc_main$R, {
|
|
38087
38509
|
key: 2,
|
|
38088
38510
|
options: _ctx.options.filters,
|
|
38089
38511
|
onFilter: handleParamsChange
|
|
38090
38512
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
38091
|
-
|
|
38092
|
-
|
|
38513
|
+
_ctx.options.sort ? (openBlock(), createBlock(_sfc_main$f, { key: 3 })) : createCommentVNode("", true),
|
|
38514
|
+
unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$Q, {
|
|
38515
|
+
key: 4,
|
|
38093
38516
|
breadcrumbs: _ctx.options.breadcrumbs
|
|
38094
38517
|
}, null, 8, ["breadcrumbs"])) : createCommentVNode("", true),
|
|
38095
38518
|
isTitleResultTopPosition.value ? (openBlock(), createElementBlock("div", {
|
|
38096
|
-
key:
|
|
38519
|
+
key: 5,
|
|
38097
38520
|
id: "lupa-search-results",
|
|
38098
38521
|
class: normalizeClass(["top-layout-wrapper", indicatorClasses.value])
|
|
38099
38522
|
}, [
|
|
38100
|
-
showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$
|
|
38523
|
+
showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$S, {
|
|
38101
38524
|
key: 0,
|
|
38102
38525
|
options: (_b25 = _ctx.options.filters) != null ? _b25 : {},
|
|
38103
38526
|
ref_key: "searchResultsFilters",
|
|
@@ -38105,12 +38528,12 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
38105
38528
|
onFilter: handleParamsChange
|
|
38106
38529
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
38107
38530
|
createBaseVNode("div", _hoisted_2$8, [
|
|
38108
|
-
createVNode(_sfc_main$
|
|
38109
|
-
createVNode(_sfc_main$
|
|
38531
|
+
createVNode(_sfc_main$18, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
38532
|
+
createVNode(_sfc_main$16, {
|
|
38110
38533
|
options: _ctx.options,
|
|
38111
38534
|
"is-product-list": (_c = _ctx.isProductList) != null ? _c : false
|
|
38112
38535
|
}, null, 8, ["options", "is-product-list"]),
|
|
38113
|
-
createVNode(_sfc_main$
|
|
38536
|
+
createVNode(_sfc_main$i, {
|
|
38114
38537
|
options: _ctx.options,
|
|
38115
38538
|
ssr: ssrEnabled.value,
|
|
38116
38539
|
onFilter: handleParamsChange
|
|
@@ -38121,9 +38544,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
38121
38544
|
_: 3
|
|
38122
38545
|
}, 8, ["options", "ssr"])
|
|
38123
38546
|
])
|
|
38124
|
-
], 2)) : (openBlock(), createElementBlock(Fragment, { key:
|
|
38125
|
-
createVNode(_sfc_main$
|
|
38126
|
-
createVNode(_sfc_main$
|
|
38547
|
+
], 2)) : (openBlock(), createElementBlock(Fragment, { key: 6 }, [
|
|
38548
|
+
createVNode(_sfc_main$18, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
38549
|
+
createVNode(_sfc_main$16, {
|
|
38127
38550
|
options: _ctx.options,
|
|
38128
38551
|
"is-product-list": (_d = _ctx.isProductList) != null ? _d : false
|
|
38129
38552
|
}, null, 8, ["options", "is-product-list"]),
|
|
@@ -38131,14 +38554,14 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
38131
38554
|
id: "lupa-search-results",
|
|
38132
38555
|
class: normalizeClass(indicatorClasses.value)
|
|
38133
38556
|
}, [
|
|
38134
|
-
showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$
|
|
38557
|
+
showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$S, {
|
|
38135
38558
|
key: 0,
|
|
38136
38559
|
options: (_e = _ctx.options.filters) != null ? _e : {},
|
|
38137
38560
|
ref_key: "searchResultsFilters",
|
|
38138
38561
|
ref: searchResultsFilters,
|
|
38139
38562
|
onFilter: handleParamsChange
|
|
38140
38563
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
38141
|
-
createVNode(_sfc_main$
|
|
38564
|
+
createVNode(_sfc_main$i, {
|
|
38142
38565
|
options: _ctx.options,
|
|
38143
38566
|
ssr: ssrEnabled.value,
|
|
38144
38567
|
onFilter: handleParamsChange
|
|
@@ -38282,7 +38705,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
38282
38705
|
onClick: withModifiers(innerClick, ["stop"])
|
|
38283
38706
|
}, [
|
|
38284
38707
|
createBaseVNode("div", _hoisted_1$a, [
|
|
38285
|
-
createVNode(_sfc_main$
|
|
38708
|
+
createVNode(_sfc_main$19, {
|
|
38286
38709
|
options: fullSearchBoxOptions.value,
|
|
38287
38710
|
"is-search-container": true,
|
|
38288
38711
|
ref_key: "searchBox",
|
|
@@ -39870,7 +40293,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
39870
40293
|
key: getProductKeyAction(index, product)
|
|
39871
40294
|
}, {
|
|
39872
40295
|
default: withCtx(() => [
|
|
39873
|
-
createVNode(_sfc_main$
|
|
40296
|
+
createVNode(_sfc_main$v, {
|
|
39874
40297
|
product,
|
|
39875
40298
|
options: _ctx.options,
|
|
39876
40299
|
"click-tracking-settings": clickTrackingSettings.value,
|
|
@@ -39885,7 +40308,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
39885
40308
|
_: 1
|
|
39886
40309
|
}, 16, ["wrap-around"])) : (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
|
39887
40310
|
(openBlock(true), createElementBlock(Fragment, null, renderList(recommendations2.value, (product, index) => {
|
|
39888
|
-
return openBlock(), createBlock(_sfc_main$
|
|
40311
|
+
return openBlock(), createBlock(_sfc_main$v, {
|
|
39889
40312
|
style: normalizeStyle(columnSize.value),
|
|
39890
40313
|
key: getProductKeyAction(index, product),
|
|
39891
40314
|
product,
|
|
@@ -40131,7 +40554,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
40131
40554
|
createBaseVNode("a", {
|
|
40132
40555
|
href: getLink(product)
|
|
40133
40556
|
}, [
|
|
40134
|
-
createVNode(_sfc_main$
|
|
40557
|
+
createVNode(_sfc_main$G, {
|
|
40135
40558
|
item: product,
|
|
40136
40559
|
options: image.value
|
|
40137
40560
|
}, null, 8, ["item", "options"])
|
|
@@ -40296,7 +40719,7 @@ const _sfc_main$4$1 = /* @__PURE__ */ defineComponent({
|
|
|
40296
40719
|
return (_ctx, _cache) => {
|
|
40297
40720
|
return openBlock(), createElementBlock("section", _hoisted_1$3, [
|
|
40298
40721
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.searchResults, (product, index) => {
|
|
40299
|
-
return openBlock(), createBlock(_sfc_main$
|
|
40722
|
+
return openBlock(), createBlock(_sfc_main$v, {
|
|
40300
40723
|
class: "lupa-chat-product-card",
|
|
40301
40724
|
key: getProductKeyAction(index, product),
|
|
40302
40725
|
product,
|
|
@@ -40492,7 +40915,7 @@ const _hoisted_4 = {
|
|
|
40492
40915
|
key: 0,
|
|
40493
40916
|
class: "lupasearch-chat-content"
|
|
40494
40917
|
};
|
|
40495
|
-
const _sfc_main$
|
|
40918
|
+
const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
40496
40919
|
__name: "ChatContainer",
|
|
40497
40920
|
props: {
|
|
40498
40921
|
options: {}
|
|
@@ -46516,7 +46939,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
46516
46939
|
};
|
|
46517
46940
|
__expose({ fetch: fetch2 });
|
|
46518
46941
|
return (_ctx, _cache) => {
|
|
46519
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
46942
|
+
return openBlock(), createBlock(unref(_sfc_main$19), {
|
|
46520
46943
|
ref_key: "searchBox",
|
|
46521
46944
|
ref: searchBox2,
|
|
46522
46945
|
options: fullSearchBoxOptions.value
|
|
@@ -47176,7 +47599,7 @@ const chat = (options, mountOptions) => {
|
|
|
47176
47599
|
const instance = createVue(
|
|
47177
47600
|
options.displayOptions.containerSelector,
|
|
47178
47601
|
mountOptions == null ? void 0 : mountOptions.mountingBehavior,
|
|
47179
|
-
_sfc_main$
|
|
47602
|
+
_sfc_main$1H,
|
|
47180
47603
|
{
|
|
47181
47604
|
options
|
|
47182
47605
|
}
|
|
@@ -47450,13 +47873,14 @@ const applyStyles = (configuration) => __async(null, null, function* () {
|
|
|
47450
47873
|
document.head.appendChild(styleElement);
|
|
47451
47874
|
});
|
|
47452
47875
|
const mountSearchBox = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
|
|
47453
|
-
var _a25;
|
|
47876
|
+
var _a25, _b25;
|
|
47454
47877
|
if (!configuration.searchBox) {
|
|
47455
47878
|
return;
|
|
47456
47879
|
}
|
|
47457
47880
|
const resolvedConfiguration = JSON.parse(configuration.searchBox);
|
|
47458
47881
|
const allowedMountUrls = resolvedConfiguration.allowedMountUrls;
|
|
47459
47882
|
const domPing = resolvedConfiguration.domPing;
|
|
47883
|
+
const mountingBehavior = (_a25 = resolvedConfiguration.mountingBehavior) != null ? _a25 : void 0;
|
|
47460
47884
|
const visible = yield waitForElementToBeVisible(
|
|
47461
47885
|
resolvedConfiguration.inputSelector,
|
|
47462
47886
|
0,
|
|
@@ -47470,18 +47894,19 @@ const mountSearchBox = (configuration, options, optionOverrides, fetch2 = true,
|
|
|
47470
47894
|
}
|
|
47471
47895
|
const mergedOptions = PluginConfigurationMerger.mergeSearchBoxConfiguration(
|
|
47472
47896
|
resolvedConfiguration,
|
|
47473
|
-
(
|
|
47897
|
+
(_b25 = optionOverrides == null ? void 0 : optionOverrides.searchBox) != null ? _b25 : {}
|
|
47474
47898
|
);
|
|
47475
|
-
searchBox(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, domPing });
|
|
47899
|
+
searchBox(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, domPing, mountingBehavior });
|
|
47476
47900
|
});
|
|
47477
47901
|
const mountSearchResults = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
|
|
47478
|
-
var _a25;
|
|
47902
|
+
var _a25, _b25;
|
|
47479
47903
|
if (!configuration.searchResults) {
|
|
47480
47904
|
return;
|
|
47481
47905
|
}
|
|
47482
47906
|
const resolvedConfiguration = JSON.parse(configuration.searchResults);
|
|
47483
47907
|
const allowedMountUrls = resolvedConfiguration.allowedMountUrls;
|
|
47484
47908
|
const domPing = resolvedConfiguration.domPing;
|
|
47909
|
+
const mountingBehavior = (_a25 = resolvedConfiguration.mountingBehavior) != null ? _a25 : void 0;
|
|
47485
47910
|
const visible = yield waitForElementToBeVisible(
|
|
47486
47911
|
resolvedConfiguration.containerSelector,
|
|
47487
47912
|
0,
|
|
@@ -47495,12 +47920,15 @@ const mountSearchResults = (configuration, options, optionOverrides, fetch2 = tr
|
|
|
47495
47920
|
}
|
|
47496
47921
|
const mergedOptions = PluginConfigurationMerger.mergeSearchResultsConfiguration(
|
|
47497
47922
|
resolvedConfiguration,
|
|
47498
|
-
(
|
|
47923
|
+
(_b25 = optionOverrides == null ? void 0 : optionOverrides.searchResults) != null ? _b25 : {}
|
|
47924
|
+
);
|
|
47925
|
+
searchResults(
|
|
47926
|
+
__spreadProps(__spreadValues({}, mergedOptions), { options }),
|
|
47927
|
+
{ fetch: fetch2, allowedMountUrls, domPing, mountingBehavior }
|
|
47499
47928
|
);
|
|
47500
|
-
searchResults(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, domPing });
|
|
47501
47929
|
});
|
|
47502
47930
|
const mountProductList = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
|
|
47503
|
-
var _a25;
|
|
47931
|
+
var _a25, _b25;
|
|
47504
47932
|
if (!configuration.productList) {
|
|
47505
47933
|
return;
|
|
47506
47934
|
}
|
|
@@ -47509,6 +47937,7 @@ const mountProductList = (configuration, options, optionOverrides, fetch2 = true
|
|
|
47509
47937
|
);
|
|
47510
47938
|
const resolvedConfiguration = JSON.parse(configuration.productList);
|
|
47511
47939
|
const allowedMountUrls = resolvedConfiguration.allowedMountUrls;
|
|
47940
|
+
const mountingBehavior = (_a25 = resolvedConfiguration.mountingBehavior) != null ? _a25 : void 0;
|
|
47512
47941
|
const visible = yield waitForElementToBeVisible(
|
|
47513
47942
|
resolvedConfiguration.containerSelector,
|
|
47514
47943
|
0,
|
|
@@ -47522,13 +47951,14 @@ const mountProductList = (configuration, options, optionOverrides, fetch2 = true
|
|
|
47522
47951
|
}
|
|
47523
47952
|
const mergedOptions = merge(
|
|
47524
47953
|
__spreadValues(__spreadValues({}, resolvedSearchResultsConfiguration), resolvedConfiguration),
|
|
47525
|
-
(
|
|
47954
|
+
(_b25 = optionOverrides == null ? void 0 : optionOverrides.productList) != null ? _b25 : {}
|
|
47526
47955
|
);
|
|
47527
|
-
productList(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls });
|
|
47956
|
+
productList(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, mountingBehavior });
|
|
47528
47957
|
});
|
|
47529
47958
|
const mountRecommendations = (resolvedSearchResultsConfiguration, resolvedConfiguration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
|
|
47530
|
-
var _a25;
|
|
47959
|
+
var _a25, _b25;
|
|
47531
47960
|
const allowedMountUrls = resolvedConfiguration.allowedMountUrls;
|
|
47961
|
+
const mountingBehavior = (_a25 = resolvedConfiguration.mountingBehavior) != null ? _a25 : void 0;
|
|
47532
47962
|
const visible = yield waitForElementToBeVisible(
|
|
47533
47963
|
resolvedConfiguration.containerSelector,
|
|
47534
47964
|
0,
|
|
@@ -47542,9 +47972,9 @@ const mountRecommendations = (resolvedSearchResultsConfiguration, resolvedConfig
|
|
|
47542
47972
|
}
|
|
47543
47973
|
const mergedOptions = merge(
|
|
47544
47974
|
__spreadValues(__spreadValues({}, resolvedSearchResultsConfiguration), resolvedConfiguration),
|
|
47545
|
-
(
|
|
47975
|
+
(_b25 = optionOverrides == null ? void 0 : optionOverrides.recommendations) != null ? _b25 : {}
|
|
47546
47976
|
);
|
|
47547
|
-
recommendations(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls });
|
|
47977
|
+
recommendations(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, mountingBehavior });
|
|
47548
47978
|
});
|
|
47549
47979
|
const mountAllRecommendations = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
|
|
47550
47980
|
if (!configuration.recommendations) {
|