@getlupa/client 1.22.3 → 1.23.1
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 +1222 -798
- package/dist/lupaSearch.js +1222 -798
- package/dist/lupaSearch.mjs +1222 -798
- package/dist/lupaSearch.umd.js +1222 -798
- package/dist/style.css +1 -1
- package/dist/types/ResolvedOptions.d.ts +6 -0
- package/package.json +2 -2
package/dist/lupaSearch.js
CHANGED
|
@@ -18059,8 +18059,18 @@ const useOptionsStore = /* @__PURE__ */ defineStore("options", () => {
|
|
|
18059
18059
|
);
|
|
18060
18060
|
const trackingOptions = ref({});
|
|
18061
18061
|
const searchResultInitialFilters = ref({});
|
|
18062
|
+
const expandedFacetsInner = ref([]);
|
|
18062
18063
|
const productRecommendationOptions = ref({});
|
|
18063
18064
|
const screenStore = useScreenStore();
|
|
18065
|
+
const expandedFacets = computed({
|
|
18066
|
+
get: () => {
|
|
18067
|
+
var _a25, _b25, _c, _d, _e;
|
|
18068
|
+
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 : [];
|
|
18069
|
+
},
|
|
18070
|
+
set: (value) => {
|
|
18071
|
+
expandedFacetsInner.value = value;
|
|
18072
|
+
}
|
|
18073
|
+
});
|
|
18064
18074
|
const envOptions = computed(
|
|
18065
18075
|
() => {
|
|
18066
18076
|
var _a25;
|
|
@@ -18160,6 +18170,7 @@ const useOptionsStore = /* @__PURE__ */ defineStore("options", () => {
|
|
|
18160
18170
|
currentResolutionPageSizes,
|
|
18161
18171
|
productRecommendationOptions,
|
|
18162
18172
|
ariaLabels,
|
|
18173
|
+
expandedFacets,
|
|
18163
18174
|
setSearchBoxOptions,
|
|
18164
18175
|
setTrackingOptions,
|
|
18165
18176
|
setSearchResultOptions,
|
|
@@ -18515,12 +18526,15 @@ const QUERY_PARAMS_PARSED = {
|
|
|
18515
18526
|
const FACET_PARAMS_TYPE = {
|
|
18516
18527
|
TERMS: "f.",
|
|
18517
18528
|
RANGE: "fr.",
|
|
18529
|
+
PARTIAL_RANGE: "fpr.",
|
|
18518
18530
|
HIERARCHY: "fh."
|
|
18519
18531
|
};
|
|
18520
18532
|
const FACET_FILTER_MAP = {
|
|
18521
18533
|
terms: FACET_PARAMS_TYPE.TERMS,
|
|
18522
18534
|
range: FACET_PARAMS_TYPE.RANGE,
|
|
18523
|
-
|
|
18535
|
+
stats: FACET_PARAMS_TYPE.RANGE,
|
|
18536
|
+
hierarchy: FACET_PARAMS_TYPE.HIERARCHY,
|
|
18537
|
+
partialRange: FACET_PARAMS_TYPE.PARTIAL_RANGE
|
|
18524
18538
|
};
|
|
18525
18539
|
const FACET_KEY_SEPARATOR = ".";
|
|
18526
18540
|
const FACET_RANGE_SEPARATOR = ":";
|
|
@@ -18674,7 +18688,7 @@ const getLabeledFilters = (filters, facets2, translations) => {
|
|
|
18674
18688
|
});
|
|
18675
18689
|
});
|
|
18676
18690
|
};
|
|
18677
|
-
const isFacetKey = (key) => key.startsWith(FACET_PARAMS_TYPE.RANGE) || key.startsWith(FACET_PARAMS_TYPE.TERMS) || key.startsWith(FACET_PARAMS_TYPE.HIERARCHY);
|
|
18691
|
+
const isFacetKey = (key) => key.startsWith(FACET_PARAMS_TYPE.RANGE) || key.startsWith(FACET_PARAMS_TYPE.TERMS) || key.startsWith(FACET_PARAMS_TYPE.HIERARCHY) || key.startsWith(FACET_PARAMS_TYPE.PARTIAL_RANGE);
|
|
18678
18692
|
const getMostSpecificHierarchyTerms = (terms) => {
|
|
18679
18693
|
const specificTerms = [];
|
|
18680
18694
|
for (const term of terms) {
|
|
@@ -18762,8 +18776,7 @@ const parseFacetKey = (key, searchParams) => {
|
|
|
18762
18776
|
if (key.startsWith(FACET_PARAMS_TYPE.TERMS)) {
|
|
18763
18777
|
return (_b25 = (_a25 = searchParams.getAll(key)) == null ? void 0 : _a25.map((v) => decodeURIComponent(v))) != null ? _b25 : [];
|
|
18764
18778
|
}
|
|
18765
|
-
if (key.startsWith(FACET_PARAMS_TYPE.RANGE)) {
|
|
18766
|
-
const isPrice = key == null ? void 0 : key.includes(CURRENCY_KEY_INDICATOR);
|
|
18779
|
+
if (key.startsWith(FACET_PARAMS_TYPE.RANGE) || key.startsWith(FACET_PARAMS_TYPE.PARTIAL_RANGE)) {
|
|
18767
18780
|
const range2 = searchParams.get(key);
|
|
18768
18781
|
if (!range2) {
|
|
18769
18782
|
return {};
|
|
@@ -18771,7 +18784,7 @@ const parseFacetKey = (key, searchParams) => {
|
|
|
18771
18784
|
const [min, max] = range2.split(FACET_RANGE_SEPARATOR);
|
|
18772
18785
|
return {
|
|
18773
18786
|
gte: min || void 0,
|
|
18774
|
-
[
|
|
18787
|
+
[key.startsWith(FACET_PARAMS_TYPE.PARTIAL_RANGE) ? "lt" : "lte"]: max || void 0
|
|
18775
18788
|
};
|
|
18776
18789
|
}
|
|
18777
18790
|
if (key.startsWith(FACET_PARAMS_TYPE.HIERARCHY)) {
|
|
@@ -18973,6 +18986,7 @@ const toggleHierarchyFilter = (appendParams, facetAction, getQueryParamName, cur
|
|
|
18973
18986
|
};
|
|
18974
18987
|
const toggleRangeFilter = (appendParams, removeParameters, facetAction, getQueryParamName, currentFilters) => {
|
|
18975
18988
|
var _a25, _b25;
|
|
18989
|
+
const baseFacetQueryParamName = facetAction.type === "partialRange" ? FACET_PARAMS_TYPE.PARTIAL_RANGE : FACET_PARAMS_TYPE.RANGE;
|
|
18976
18990
|
const currentFilter = rangeFilterToString(
|
|
18977
18991
|
currentFilters == null ? void 0 : currentFilters[facetAction.key],
|
|
18978
18992
|
FACET_RANGE_SEPARATOR
|
|
@@ -18983,14 +18997,14 @@ const toggleRangeFilter = (appendParams, removeParameters, facetAction, getQuery
|
|
|
18983
18997
|
if (!facetValue) {
|
|
18984
18998
|
removeParameters({
|
|
18985
18999
|
paramsToRemove: [
|
|
18986
|
-
getFacetParam(facetAction.key, "",
|
|
19000
|
+
getFacetParam(facetAction.key, "", baseFacetQueryParamName).name,
|
|
18987
19001
|
...paramsToRemove
|
|
18988
19002
|
]
|
|
18989
19003
|
});
|
|
18990
19004
|
return;
|
|
18991
19005
|
}
|
|
18992
19006
|
appendParams({
|
|
18993
|
-
params: [getFacetParam(facetAction.key, facetValue,
|
|
19007
|
+
params: [getFacetParam(facetAction.key, facetValue, baseFacetQueryParamName)],
|
|
18994
19008
|
paramsToRemove,
|
|
18995
19009
|
encode: false
|
|
18996
19010
|
});
|
|
@@ -19578,7 +19592,7 @@ const getApiUrl = (environment, customBaseUrl) => {
|
|
|
19578
19592
|
}
|
|
19579
19593
|
return Env[environment] || Env["production"];
|
|
19580
19594
|
};
|
|
19581
|
-
const _sfc_main$
|
|
19595
|
+
const _sfc_main$1G = /* @__PURE__ */ defineComponent({
|
|
19582
19596
|
__name: "VoiceSearchProgressCircle",
|
|
19583
19597
|
props: {
|
|
19584
19598
|
isRecording: { type: Boolean },
|
|
@@ -19791,15 +19805,15 @@ function useVoiceRecorder(options) {
|
|
|
19791
19805
|
closeSocket
|
|
19792
19806
|
};
|
|
19793
19807
|
}
|
|
19794
|
-
const _hoisted_1$
|
|
19808
|
+
const _hoisted_1$1o = {
|
|
19795
19809
|
key: 0,
|
|
19796
19810
|
class: "lupa-dialog-overlay"
|
|
19797
19811
|
};
|
|
19798
|
-
const _hoisted_2$
|
|
19799
|
-
const _hoisted_3$
|
|
19800
|
-
const _hoisted_4$
|
|
19801
|
-
const _hoisted_5$
|
|
19802
|
-
const _sfc_main$
|
|
19812
|
+
const _hoisted_2$Y = { class: "lupa-dialog-content" };
|
|
19813
|
+
const _hoisted_3$G = { class: "lupa-listening-text" };
|
|
19814
|
+
const _hoisted_4$w = { class: "lupa-mic-button-wrapper" };
|
|
19815
|
+
const _hoisted_5$m = ["aria-label"];
|
|
19816
|
+
const _sfc_main$1F = /* @__PURE__ */ defineComponent({
|
|
19803
19817
|
__name: "VoiceSearchDialog",
|
|
19804
19818
|
props: {
|
|
19805
19819
|
isOpen: { type: Boolean },
|
|
@@ -19904,21 +19918,21 @@ const _sfc_main$1z = /* @__PURE__ */ defineComponent({
|
|
|
19904
19918
|
return (_ctx, _cache) => {
|
|
19905
19919
|
var _a25, _b25;
|
|
19906
19920
|
return openBlock(), createElementBlock("div", null, [
|
|
19907
|
-
props.isOpen ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
19921
|
+
props.isOpen ? (openBlock(), createElementBlock("div", _hoisted_1$1o, [
|
|
19908
19922
|
createBaseVNode("button", {
|
|
19909
19923
|
class: "lupa-dialog-box-close-button",
|
|
19910
19924
|
onClick: _cache[0] || (_cache[0] = () => emit2("close"))
|
|
19911
19925
|
}),
|
|
19912
|
-
createBaseVNode("div", _hoisted_2$
|
|
19913
|
-
createBaseVNode("p", _hoisted_3$
|
|
19914
|
-
createBaseVNode("div", _hoisted_4$
|
|
19926
|
+
createBaseVNode("div", _hoisted_2$Y, [
|
|
19927
|
+
createBaseVNode("p", _hoisted_3$G, toDisplayString(description.value), 1),
|
|
19928
|
+
createBaseVNode("div", _hoisted_4$w, [
|
|
19915
19929
|
createBaseVNode("button", {
|
|
19916
19930
|
class: normalizeClass(["lupa-mic-button", { recording: unref(isRecording) }]),
|
|
19917
19931
|
onClick: handleRecordingButtonClick,
|
|
19918
19932
|
"aria-controls": "voice-search-microphone",
|
|
19919
19933
|
"aria-label": ((_b25 = (_a25 = labels.value) == null ? void 0 : _a25.aria) == null ? void 0 : _b25.microphone) || "Toggle microphone"
|
|
19920
|
-
}, null, 10, _hoisted_5$
|
|
19921
|
-
createVNode(_sfc_main$
|
|
19934
|
+
}, null, 10, _hoisted_5$m),
|
|
19935
|
+
createVNode(_sfc_main$1G, {
|
|
19922
19936
|
ref_key: "voiceSearchProgressBar",
|
|
19923
19937
|
ref: voiceSearchProgressBar,
|
|
19924
19938
|
class: "lupa-progress-circle",
|
|
@@ -19933,18 +19947,18 @@ const _sfc_main$1z = /* @__PURE__ */ defineComponent({
|
|
|
19933
19947
|
};
|
|
19934
19948
|
}
|
|
19935
19949
|
});
|
|
19936
|
-
const _hoisted_1$
|
|
19937
|
-
const _hoisted_2$
|
|
19938
|
-
const _hoisted_3$
|
|
19939
|
-
const _hoisted_4$
|
|
19940
|
-
const _hoisted_5$
|
|
19941
|
-
const _hoisted_6$
|
|
19950
|
+
const _hoisted_1$1n = { id: "lupa-search-box-input-container" };
|
|
19951
|
+
const _hoisted_2$X = { class: "lupa-input-clear" };
|
|
19952
|
+
const _hoisted_3$F = { id: "lupa-search-box-input" };
|
|
19953
|
+
const _hoisted_4$v = ["value"];
|
|
19954
|
+
const _hoisted_5$l = ["aria-label", "placeholder"];
|
|
19955
|
+
const _hoisted_6$7 = {
|
|
19942
19956
|
key: 0,
|
|
19943
19957
|
class: "lupa-close-label"
|
|
19944
19958
|
};
|
|
19945
19959
|
const _hoisted_7$5 = { key: 1 };
|
|
19946
19960
|
const _hoisted_8$3 = ["aria-label"];
|
|
19947
|
-
const _sfc_main$
|
|
19961
|
+
const _sfc_main$1E = /* @__PURE__ */ defineComponent({
|
|
19948
19962
|
__name: "SearchBoxInput",
|
|
19949
19963
|
props: {
|
|
19950
19964
|
options: {},
|
|
@@ -20076,20 +20090,20 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
|
|
|
20076
20090
|
};
|
|
20077
20091
|
__expose({ focus });
|
|
20078
20092
|
return (_ctx, _cache) => {
|
|
20079
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
20080
|
-
createBaseVNode("div", _hoisted_2$
|
|
20093
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1n, [
|
|
20094
|
+
createBaseVNode("div", _hoisted_2$X, [
|
|
20081
20095
|
createBaseVNode("div", {
|
|
20082
20096
|
class: normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
|
|
20083
20097
|
onClick: clear
|
|
20084
20098
|
}, null, 2)
|
|
20085
20099
|
]),
|
|
20086
|
-
createBaseVNode("div", _hoisted_3$
|
|
20100
|
+
createBaseVNode("div", _hoisted_3$F, [
|
|
20087
20101
|
createBaseVNode("input", {
|
|
20088
20102
|
class: "lupa-hint",
|
|
20089
20103
|
"aria-hidden": "true",
|
|
20090
20104
|
value: showHint.value ? suggestedValue.value.item.suggestion : "",
|
|
20091
20105
|
disabled: ""
|
|
20092
|
-
}, null, 8, _hoisted_4$
|
|
20106
|
+
}, null, 8, _hoisted_4$v),
|
|
20093
20107
|
withDirectives(createBaseVNode("input", mergeProps({
|
|
20094
20108
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
|
|
20095
20109
|
}, inputAttributes.value, {
|
|
@@ -20103,7 +20117,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
|
|
|
20103
20117
|
placeholder: labels.value.placeholder,
|
|
20104
20118
|
onInput: handleInput,
|
|
20105
20119
|
onFocus: handleFocus
|
|
20106
|
-
}), null, 16, _hoisted_5$
|
|
20120
|
+
}), null, 16, _hoisted_5$l), [
|
|
20107
20121
|
[vModelText, inputValue.value]
|
|
20108
20122
|
]),
|
|
20109
20123
|
_ctx.options.showSubmitButton ? (openBlock(), createElementBlock("button", {
|
|
@@ -20118,7 +20132,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
|
|
|
20118
20132
|
class: "lupa-close-search-container",
|
|
20119
20133
|
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("close"))
|
|
20120
20134
|
}, [
|
|
20121
|
-
labels.value.close ? (openBlock(), createElementBlock("span", _hoisted_6$
|
|
20135
|
+
labels.value.close ? (openBlock(), createElementBlock("span", _hoisted_6$7, toDisplayString(labels.value.close), 1)) : createCommentVNode("", true)
|
|
20122
20136
|
])) : createCommentVNode("", true),
|
|
20123
20137
|
isVoiceSearchEnabled.value ? (openBlock(), createElementBlock("div", _hoisted_7$5, [
|
|
20124
20138
|
createBaseVNode("button", {
|
|
@@ -20129,7 +20143,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
|
|
|
20129
20143
|
"aria-label": voiceSearchAriaLabel.value
|
|
20130
20144
|
}, null, 8, _hoisted_8$3)
|
|
20131
20145
|
])) : createCommentVNode("", true),
|
|
20132
|
-
isVoiceSearchEnabled.value ? (openBlock(), createBlock(_sfc_main$
|
|
20146
|
+
isVoiceSearchEnabled.value ? (openBlock(), createBlock(_sfc_main$1F, {
|
|
20133
20147
|
key: 2,
|
|
20134
20148
|
ref_key: "voiceDialogOverlay",
|
|
20135
20149
|
ref: voiceDialogOverlay,
|
|
@@ -20143,7 +20157,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
|
|
|
20143
20157
|
};
|
|
20144
20158
|
}
|
|
20145
20159
|
});
|
|
20146
|
-
const _sfc_main$
|
|
20160
|
+
const _sfc_main$1D = /* @__PURE__ */ defineComponent({
|
|
20147
20161
|
__name: "SearchBoxMoreResults",
|
|
20148
20162
|
props: {
|
|
20149
20163
|
labels: {},
|
|
@@ -20181,9 +20195,9 @@ const _sfc_main$1x = /* @__PURE__ */ defineComponent({
|
|
|
20181
20195
|
};
|
|
20182
20196
|
}
|
|
20183
20197
|
});
|
|
20184
|
-
const _hoisted_1$
|
|
20185
|
-
const _hoisted_2$
|
|
20186
|
-
const _sfc_main$
|
|
20198
|
+
const _hoisted_1$1m = { class: "lupa-search-box-history-item" };
|
|
20199
|
+
const _hoisted_2$W = { class: "lupa-search-box-history-item-content" };
|
|
20200
|
+
const _sfc_main$1C = /* @__PURE__ */ defineComponent({
|
|
20187
20201
|
__name: "SearchBoxHistoryItem",
|
|
20188
20202
|
props: {
|
|
20189
20203
|
item: {},
|
|
@@ -20200,8 +20214,8 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
|
|
|
20200
20214
|
emit2("click", { query: props.item });
|
|
20201
20215
|
};
|
|
20202
20216
|
return (_ctx, _cache) => {
|
|
20203
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
20204
|
-
createBaseVNode("div", _hoisted_2$
|
|
20217
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1m, [
|
|
20218
|
+
createBaseVNode("div", _hoisted_2$W, [
|
|
20205
20219
|
createBaseVNode("div", {
|
|
20206
20220
|
class: normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
|
|
20207
20221
|
onClick: click2
|
|
@@ -20215,11 +20229,11 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
|
|
|
20215
20229
|
};
|
|
20216
20230
|
}
|
|
20217
20231
|
});
|
|
20218
|
-
const _hoisted_1$
|
|
20232
|
+
const _hoisted_1$1l = {
|
|
20219
20233
|
key: 0,
|
|
20220
20234
|
class: "lupa-search-box-history-panel"
|
|
20221
20235
|
};
|
|
20222
|
-
const _sfc_main$
|
|
20236
|
+
const _sfc_main$1B = /* @__PURE__ */ defineComponent({
|
|
20223
20237
|
__name: "SearchBoxHistoryPanel",
|
|
20224
20238
|
props: {
|
|
20225
20239
|
options: {}
|
|
@@ -20270,9 +20284,9 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
|
|
|
20270
20284
|
}
|
|
20271
20285
|
};
|
|
20272
20286
|
return (_ctx, _cache) => {
|
|
20273
|
-
return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
20287
|
+
return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1l, [
|
|
20274
20288
|
(openBlock(true), createElementBlock(Fragment, null, renderList(limitedHistory.value, (item, index) => {
|
|
20275
|
-
return openBlock(), createBlock(_sfc_main$
|
|
20289
|
+
return openBlock(), createBlock(_sfc_main$1C, {
|
|
20276
20290
|
key: item,
|
|
20277
20291
|
item,
|
|
20278
20292
|
highlighted: index === highlightIndex.value,
|
|
@@ -20288,15 +20302,15 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
|
|
|
20288
20302
|
};
|
|
20289
20303
|
}
|
|
20290
20304
|
});
|
|
20291
|
-
const _hoisted_1$
|
|
20292
|
-
const _sfc_main$
|
|
20305
|
+
const _hoisted_1$1k = { class: "lupa-search-box-no-results" };
|
|
20306
|
+
const _sfc_main$1A = /* @__PURE__ */ defineComponent({
|
|
20293
20307
|
__name: "SearchBoxNoResults",
|
|
20294
20308
|
props: {
|
|
20295
20309
|
labels: {}
|
|
20296
20310
|
},
|
|
20297
20311
|
setup(__props) {
|
|
20298
20312
|
return (_ctx, _cache) => {
|
|
20299
|
-
return openBlock(), createElementBlock("p", _hoisted_1$
|
|
20313
|
+
return openBlock(), createElementBlock("p", _hoisted_1$1k, toDisplayString(_ctx.labels.noResults), 1);
|
|
20300
20314
|
};
|
|
20301
20315
|
}
|
|
20302
20316
|
});
|
|
@@ -20328,26 +20342,26 @@ const generateGridTemplate = (elements) => {
|
|
|
20328
20342
|
}
|
|
20329
20343
|
return gridTemplate.join(" ");
|
|
20330
20344
|
};
|
|
20331
|
-
const _hoisted_1$
|
|
20332
|
-
const _hoisted_2$
|
|
20345
|
+
const _hoisted_1$1j = ["innerHTML"];
|
|
20346
|
+
const _hoisted_2$V = {
|
|
20333
20347
|
key: 1,
|
|
20334
20348
|
"data-cy": "lupa-suggestion-value",
|
|
20335
20349
|
class: "lupa-suggestion-value"
|
|
20336
20350
|
};
|
|
20337
|
-
const _hoisted_3$
|
|
20351
|
+
const _hoisted_3$E = {
|
|
20338
20352
|
key: 2,
|
|
20339
20353
|
class: "lupa-suggestion-facet",
|
|
20340
20354
|
"data-cy": "lupa-suggestion-facet"
|
|
20341
20355
|
};
|
|
20342
|
-
const _hoisted_4$
|
|
20356
|
+
const _hoisted_4$u = {
|
|
20343
20357
|
class: "lupa-suggestion-facet-label",
|
|
20344
20358
|
"data-cy": "lupa-suggestion-facet-label"
|
|
20345
20359
|
};
|
|
20346
|
-
const _hoisted_5$
|
|
20360
|
+
const _hoisted_5$k = {
|
|
20347
20361
|
class: "lupa-suggestion-facet-value",
|
|
20348
20362
|
"data-cy": "lupa-suggestion-facet-value"
|
|
20349
20363
|
};
|
|
20350
|
-
const _sfc_main$
|
|
20364
|
+
const _sfc_main$1z = /* @__PURE__ */ defineComponent({
|
|
20351
20365
|
__name: "SearchBoxSuggestion",
|
|
20352
20366
|
props: {
|
|
20353
20367
|
suggestion: {},
|
|
@@ -20384,20 +20398,20 @@ const _sfc_main$1t = /* @__PURE__ */ defineComponent({
|
|
|
20384
20398
|
class: "lupa-suggestion-value",
|
|
20385
20399
|
"data-cy": "lupa-suggestion-value",
|
|
20386
20400
|
innerHTML: _ctx.suggestion.displayHighlight
|
|
20387
|
-
}, null, 8, _hoisted_1$
|
|
20388
|
-
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
20389
|
-
createBaseVNode("span", _hoisted_4$
|
|
20390
|
-
createBaseVNode("span", _hoisted_5$
|
|
20401
|
+
}, null, 8, _hoisted_1$1j)) : (openBlock(), createElementBlock("div", _hoisted_2$V, toDisplayString(_ctx.suggestion.display), 1)),
|
|
20402
|
+
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$E, [
|
|
20403
|
+
createBaseVNode("span", _hoisted_4$u, toDisplayString(facetLabel.value), 1),
|
|
20404
|
+
createBaseVNode("span", _hoisted_5$k, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
20391
20405
|
])) : createCommentVNode("", true)
|
|
20392
20406
|
]);
|
|
20393
20407
|
};
|
|
20394
20408
|
}
|
|
20395
20409
|
});
|
|
20396
|
-
const _hoisted_1$
|
|
20410
|
+
const _hoisted_1$1i = {
|
|
20397
20411
|
id: "lupa-search-box-suggestions",
|
|
20398
20412
|
"data-cy": "lupa-search-box-suggestions"
|
|
20399
20413
|
};
|
|
20400
|
-
const _sfc_main$
|
|
20414
|
+
const _sfc_main$1y = /* @__PURE__ */ defineComponent({
|
|
20401
20415
|
__name: "SearchBoxSuggestions",
|
|
20402
20416
|
props: {
|
|
20403
20417
|
items: {},
|
|
@@ -20464,9 +20478,9 @@ const _sfc_main$1s = /* @__PURE__ */ defineComponent({
|
|
|
20464
20478
|
});
|
|
20465
20479
|
});
|
|
20466
20480
|
return (_ctx, _cache) => {
|
|
20467
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
20481
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1i, [
|
|
20468
20482
|
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
|
|
20469
|
-
return openBlock(), createBlock(_sfc_main$
|
|
20483
|
+
return openBlock(), createBlock(_sfc_main$1z, {
|
|
20470
20484
|
key: getSuggestionKey(item),
|
|
20471
20485
|
class: normalizeClass([
|
|
20472
20486
|
"lupa-suggestion",
|
|
@@ -20498,7 +20512,7 @@ const debounce = (func, timeout) => {
|
|
|
20498
20512
|
}, timeout);
|
|
20499
20513
|
};
|
|
20500
20514
|
};
|
|
20501
|
-
const _sfc_main$
|
|
20515
|
+
const _sfc_main$1x = /* @__PURE__ */ defineComponent({
|
|
20502
20516
|
__name: "SearchBoxSuggestionsWrapper",
|
|
20503
20517
|
props: {
|
|
20504
20518
|
panel: {},
|
|
@@ -20541,7 +20555,7 @@ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
|
|
|
20541
20555
|
const getSuggestionsDebounced = debounce(getSuggestions, props.debounce);
|
|
20542
20556
|
watch(() => props.panel.limit, getSuggestionsDebounced);
|
|
20543
20557
|
return (_ctx, _cache) => {
|
|
20544
|
-
return openBlock(), createBlock(_sfc_main$
|
|
20558
|
+
return openBlock(), createBlock(_sfc_main$1y, {
|
|
20545
20559
|
items: searchResult.value,
|
|
20546
20560
|
highlight: _ctx.panel.highlight,
|
|
20547
20561
|
queryKey: _ctx.panel.queryKey,
|
|
@@ -29823,9 +29837,9 @@ const replaceImageWithPlaceholder = (e2, placeholder) => {
|
|
|
29823
29837
|
targetImage.src = placeholder;
|
|
29824
29838
|
}
|
|
29825
29839
|
};
|
|
29826
|
-
const _hoisted_1$
|
|
29827
|
-
const _hoisted_2$
|
|
29828
|
-
const _sfc_main$
|
|
29840
|
+
const _hoisted_1$1h = ["src"];
|
|
29841
|
+
const _hoisted_2$U = ["src"];
|
|
29842
|
+
const _sfc_main$1w = /* @__PURE__ */ defineComponent({
|
|
29829
29843
|
__name: "ProductImage",
|
|
29830
29844
|
props: {
|
|
29831
29845
|
item: {},
|
|
@@ -29967,7 +29981,7 @@ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
|
|
|
29967
29981
|
}, { alt: imageAlt.value ? imageAlt.value : void 0 }, {
|
|
29968
29982
|
onError: replaceWithPlaceholder,
|
|
29969
29983
|
key: finalUrl.value
|
|
29970
|
-
}), null, 16, _hoisted_1$
|
|
29984
|
+
}), null, 16, _hoisted_1$1h))
|
|
29971
29985
|
]),
|
|
29972
29986
|
_: 1
|
|
29973
29987
|
})) : (openBlock(), createElementBlock("img", mergeProps({
|
|
@@ -29975,12 +29989,12 @@ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
|
|
|
29975
29989
|
class: ["lupa-images-main-image", { [_ctx.imageClass]: true }],
|
|
29976
29990
|
style: styleOverride.value,
|
|
29977
29991
|
src: finalMainImageUrl.value
|
|
29978
|
-
}, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_2$
|
|
29992
|
+
}, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_2$U))
|
|
29979
29993
|
], 38);
|
|
29980
29994
|
};
|
|
29981
29995
|
}
|
|
29982
29996
|
});
|
|
29983
|
-
const _sfc_main$
|
|
29997
|
+
const _sfc_main$1v = /* @__PURE__ */ defineComponent({
|
|
29984
29998
|
__name: "SearchBoxProductImage",
|
|
29985
29999
|
props: {
|
|
29986
30000
|
item: {},
|
|
@@ -29988,7 +30002,7 @@ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
|
|
|
29988
30002
|
},
|
|
29989
30003
|
setup(__props) {
|
|
29990
30004
|
return (_ctx, _cache) => {
|
|
29991
|
-
return openBlock(), createBlock(_sfc_main$
|
|
30005
|
+
return openBlock(), createBlock(_sfc_main$1w, {
|
|
29992
30006
|
item: _ctx.item,
|
|
29993
30007
|
options: _ctx.options,
|
|
29994
30008
|
"wrapper-class": "lupa-search-box-image-wrapper",
|
|
@@ -29997,12 +30011,12 @@ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
|
|
|
29997
30011
|
};
|
|
29998
30012
|
}
|
|
29999
30013
|
});
|
|
30000
|
-
const _hoisted_1$
|
|
30001
|
-
const _hoisted_2$
|
|
30014
|
+
const _hoisted_1$1g = ["innerHTML"];
|
|
30015
|
+
const _hoisted_2$T = {
|
|
30002
30016
|
key: 1,
|
|
30003
30017
|
class: "lupa-search-box-product-title"
|
|
30004
30018
|
};
|
|
30005
|
-
const _sfc_main$
|
|
30019
|
+
const _sfc_main$1u = /* @__PURE__ */ defineComponent({
|
|
30006
30020
|
__name: "SearchBoxProductTitle",
|
|
30007
30021
|
props: {
|
|
30008
30022
|
item: {},
|
|
@@ -30025,18 +30039,18 @@ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
|
|
|
30025
30039
|
key: 0,
|
|
30026
30040
|
class: "lupa-search-box-product-title",
|
|
30027
30041
|
innerHTML: sanitizedTitle.value
|
|
30028
|
-
}, null, 8, _hoisted_1$
|
|
30042
|
+
}, null, 8, _hoisted_1$1g)) : (openBlock(), createElementBlock("div", _hoisted_2$T, [
|
|
30029
30043
|
createBaseVNode("strong", null, toDisplayString(title.value), 1)
|
|
30030
30044
|
]));
|
|
30031
30045
|
};
|
|
30032
30046
|
}
|
|
30033
30047
|
});
|
|
30034
|
-
const _hoisted_1$
|
|
30035
|
-
const _hoisted_2$
|
|
30048
|
+
const _hoisted_1$1f = ["innerHTML"];
|
|
30049
|
+
const _hoisted_2$S = {
|
|
30036
30050
|
key: 1,
|
|
30037
30051
|
class: "lupa-search-box-product-description"
|
|
30038
30052
|
};
|
|
30039
|
-
const _sfc_main$
|
|
30053
|
+
const _sfc_main$1t = /* @__PURE__ */ defineComponent({
|
|
30040
30054
|
__name: "SearchBoxProductDescription",
|
|
30041
30055
|
props: {
|
|
30042
30056
|
item: {},
|
|
@@ -30059,12 +30073,12 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
|
30059
30073
|
key: 0,
|
|
30060
30074
|
class: "lupa-search-box-product-description",
|
|
30061
30075
|
innerHTML: sanitizedDescription.value
|
|
30062
|
-
}, null, 8, _hoisted_1$
|
|
30076
|
+
}, null, 8, _hoisted_1$1f)) : (openBlock(), createElementBlock("div", _hoisted_2$S, toDisplayString(description.value), 1));
|
|
30063
30077
|
};
|
|
30064
30078
|
}
|
|
30065
30079
|
});
|
|
30066
|
-
const _hoisted_1$
|
|
30067
|
-
const _sfc_main$
|
|
30080
|
+
const _hoisted_1$1e = { class: "lupa-search-box-product-price" };
|
|
30081
|
+
const _sfc_main$1s = /* @__PURE__ */ defineComponent({
|
|
30068
30082
|
__name: "SearchBoxProductPrice",
|
|
30069
30083
|
props: {
|
|
30070
30084
|
item: {},
|
|
@@ -30086,13 +30100,13 @@ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
|
|
|
30086
30100
|
);
|
|
30087
30101
|
});
|
|
30088
30102
|
return (_ctx, _cache) => {
|
|
30089
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
30103
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1e, [
|
|
30090
30104
|
createBaseVNode("strong", null, toDisplayString(price.value), 1)
|
|
30091
30105
|
]);
|
|
30092
30106
|
};
|
|
30093
30107
|
}
|
|
30094
30108
|
});
|
|
30095
|
-
const _sfc_main$
|
|
30109
|
+
const _sfc_main$1r = /* @__PURE__ */ defineComponent({
|
|
30096
30110
|
__name: "SearchBoxProductRegularPrice",
|
|
30097
30111
|
props: {
|
|
30098
30112
|
item: {},
|
|
@@ -30123,12 +30137,12 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
30123
30137
|
};
|
|
30124
30138
|
}
|
|
30125
30139
|
});
|
|
30126
|
-
const _hoisted_1$
|
|
30127
|
-
const _hoisted_2$
|
|
30128
|
-
const _hoisted_3$
|
|
30129
|
-
const _hoisted_4$
|
|
30130
|
-
const _hoisted_5$
|
|
30131
|
-
const _sfc_main$
|
|
30140
|
+
const _hoisted_1$1d = ["innerHTML"];
|
|
30141
|
+
const _hoisted_2$R = { key: 0 };
|
|
30142
|
+
const _hoisted_3$D = { key: 1 };
|
|
30143
|
+
const _hoisted_4$t = { class: "lupa-search-box-custom-label" };
|
|
30144
|
+
const _hoisted_5$j = { class: "lupa-search-box-custom-text" };
|
|
30145
|
+
const _sfc_main$1q = /* @__PURE__ */ defineComponent({
|
|
30132
30146
|
__name: "SearchBoxProductCustom",
|
|
30133
30147
|
props: {
|
|
30134
30148
|
item: {},
|
|
@@ -30154,20 +30168,20 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
30154
30168
|
key: 0,
|
|
30155
30169
|
class: [className.value, "lupa-search-box-product-custom"],
|
|
30156
30170
|
innerHTML: text.value
|
|
30157
|
-
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$
|
|
30171
|
+
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$1d)) : (openBlock(), createElementBlock("div", mergeProps({
|
|
30158
30172
|
key: 1,
|
|
30159
30173
|
class: [className.value, "lupa-search-box-product-custom"]
|
|
30160
30174
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), [
|
|
30161
|
-
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
30162
|
-
createBaseVNode("div", _hoisted_4$
|
|
30163
|
-
createBaseVNode("div", _hoisted_5$
|
|
30175
|
+
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$R, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$D, [
|
|
30176
|
+
createBaseVNode("div", _hoisted_4$t, toDisplayString(label.value), 1),
|
|
30177
|
+
createBaseVNode("div", _hoisted_5$j, toDisplayString(text.value), 1)
|
|
30164
30178
|
]))
|
|
30165
30179
|
], 16));
|
|
30166
30180
|
};
|
|
30167
30181
|
}
|
|
30168
30182
|
});
|
|
30169
|
-
const _hoisted_1$
|
|
30170
|
-
const _sfc_main$
|
|
30183
|
+
const _hoisted_1$1c = ["innerHTML"];
|
|
30184
|
+
const _sfc_main$1p = /* @__PURE__ */ defineComponent({
|
|
30171
30185
|
__name: "SearchBoxProductCustomHtml",
|
|
30172
30186
|
props: {
|
|
30173
30187
|
item: {},
|
|
@@ -30192,7 +30206,7 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
30192
30206
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
30193
30207
|
class: className.value,
|
|
30194
30208
|
innerHTML: text.value
|
|
30195
|
-
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$
|
|
30209
|
+
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$1c);
|
|
30196
30210
|
};
|
|
30197
30211
|
}
|
|
30198
30212
|
});
|
|
@@ -30250,7 +30264,9 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
|
|
|
30250
30264
|
const loadingFacets = ref(false);
|
|
30251
30265
|
const loadingRefiners = ref(false);
|
|
30252
30266
|
const loadingRelatedQueries = ref(false);
|
|
30253
|
-
const
|
|
30267
|
+
const isFilterSidebarVisible = ref(false);
|
|
30268
|
+
const isSidebarClosing = ref(false);
|
|
30269
|
+
const isSortingSidebarVisible = ref(false);
|
|
30254
30270
|
const relatedCategoryChildren = ref([]);
|
|
30255
30271
|
const lastRequestId = ref("");
|
|
30256
30272
|
const searchRequestResults = ref({});
|
|
@@ -30332,16 +30348,36 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
|
|
|
30332
30348
|
return hasResults.value && ((_a25 = searchResult.value.offset) != null ? _a25 : 0) >= totalItems.value;
|
|
30333
30349
|
}
|
|
30334
30350
|
);
|
|
30351
|
+
const toggleSidebarState = ({
|
|
30352
|
+
visible,
|
|
30353
|
+
sidebar = "filter"
|
|
30354
|
+
}) => {
|
|
30355
|
+
if (sidebar === "sorting") {
|
|
30356
|
+
isSortingSidebarVisible.value = visible;
|
|
30357
|
+
return;
|
|
30358
|
+
}
|
|
30359
|
+
isFilterSidebarVisible.value = visible;
|
|
30360
|
+
};
|
|
30335
30361
|
const setSidebarState = ({
|
|
30336
30362
|
visible,
|
|
30337
|
-
disableBodyScrolling = true
|
|
30363
|
+
disableBodyScrolling = true,
|
|
30364
|
+
sidebar = "filter"
|
|
30338
30365
|
}) => {
|
|
30366
|
+
var _a25, _b25, _c, _d;
|
|
30339
30367
|
if (visible && disableBodyScrolling) {
|
|
30340
30368
|
disableBodyScroll();
|
|
30341
30369
|
} else {
|
|
30342
30370
|
enableBodyScroll();
|
|
30343
30371
|
}
|
|
30344
|
-
|
|
30372
|
+
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)) {
|
|
30373
|
+
toggleSidebarState({ visible, sidebar });
|
|
30374
|
+
} else {
|
|
30375
|
+
isSidebarClosing.value = true;
|
|
30376
|
+
setTimeout(() => {
|
|
30377
|
+
toggleSidebarState({ visible, sidebar });
|
|
30378
|
+
isSidebarClosing.value = false;
|
|
30379
|
+
}, searchResultOptions.value.filters.facets.style.drawer.sidebarCloseDelay);
|
|
30380
|
+
}
|
|
30345
30381
|
};
|
|
30346
30382
|
const queryFacet = (_0) => __async2(null, [_0], function* ({ queryKey, facetKey }) {
|
|
30347
30383
|
var _a25, _b25, _c, _d;
|
|
@@ -30443,13 +30479,28 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
|
|
|
30443
30479
|
const setRelatedCategoryChildren = (children) => {
|
|
30444
30480
|
relatedCategoryChildren.value = [...children];
|
|
30445
30481
|
};
|
|
30482
|
+
const preconfiguredRelatedQueryKeys = computed(() => {
|
|
30483
|
+
var _a25, _b25, _c, _d, _e;
|
|
30484
|
+
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 : [];
|
|
30485
|
+
});
|
|
30486
|
+
const relatedQueryFacetKeys = computed(() => {
|
|
30487
|
+
var _a25, _b25, _c;
|
|
30488
|
+
const keysFromRelatedResults = (_c = (_b25 = (_a25 = relatedQueriesResult.value) == null ? void 0 : _a25.relatedQueries) == null ? void 0 : _b25.map((rq) => rq.facetKey)) != null ? _c : [];
|
|
30489
|
+
return Array.from(/* @__PURE__ */ new Set([...preconfiguredRelatedQueryKeys.value, ...keysFromRelatedResults]));
|
|
30490
|
+
});
|
|
30446
30491
|
const queryRelatedQueries = (queryKey, publicQuery, result2, options) => __async2(null, null, function* () {
|
|
30447
|
-
var _a25, _b25;
|
|
30492
|
+
var _a25, _b25, _c;
|
|
30448
30493
|
loadingRelatedQueries.value = true;
|
|
30449
30494
|
const context = getLupaTrackingContext();
|
|
30450
30495
|
const searchText = (_b25 = (_a25 = result2.suggestedSearchText) != null ? _a25 : result2.searchText) != null ? _b25 : "";
|
|
30496
|
+
const publicQueryFiltersWithoutRelatedKeys = __spreadValues2({}, (_c = publicQuery.filters) != null ? _c : {});
|
|
30497
|
+
relatedQueryFacetKeys.value.forEach((facetKey) => {
|
|
30498
|
+
delete publicQueryFiltersWithoutRelatedKeys[facetKey];
|
|
30499
|
+
});
|
|
30500
|
+
const hasRemainingFilters = Object.keys(publicQueryFiltersWithoutRelatedKeys != null ? publicQueryFiltersWithoutRelatedKeys : {}).length > 0;
|
|
30451
30501
|
const query = __spreadProps2(__spreadValues2(__spreadProps2(__spreadValues2({}, publicQuery), {
|
|
30452
|
-
searchText
|
|
30502
|
+
searchText,
|
|
30503
|
+
filters: hasRemainingFilters ? publicQueryFiltersWithoutRelatedKeys : void 0
|
|
30453
30504
|
}), context), {
|
|
30454
30505
|
modifiers: { facets: false, refiners: true }
|
|
30455
30506
|
});
|
|
@@ -30465,7 +30516,9 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
|
|
|
30465
30516
|
});
|
|
30466
30517
|
});
|
|
30467
30518
|
return {
|
|
30468
|
-
|
|
30519
|
+
isFilterSidebarVisible,
|
|
30520
|
+
isSortingSidebarVisible,
|
|
30521
|
+
isSidebarClosing,
|
|
30469
30522
|
searchResult,
|
|
30470
30523
|
columnCount,
|
|
30471
30524
|
addToCartAmount,
|
|
@@ -30491,6 +30544,7 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
|
|
|
30491
30544
|
relatedQueriesResult,
|
|
30492
30545
|
relatedQueriesApiEnabled,
|
|
30493
30546
|
lastResultsSource,
|
|
30547
|
+
relatedQueryFacetKeys,
|
|
30494
30548
|
setSidebarState,
|
|
30495
30549
|
queryFacet,
|
|
30496
30550
|
setLastRequestId,
|
|
@@ -30507,12 +30561,12 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
|
|
|
30507
30561
|
setRelatedQueriesApiEnabled
|
|
30508
30562
|
};
|
|
30509
30563
|
});
|
|
30510
|
-
const _hoisted_1$
|
|
30511
|
-
const _hoisted_2$
|
|
30512
|
-
const _hoisted_3$
|
|
30513
|
-
const _hoisted_4$
|
|
30514
|
-
const _hoisted_5$
|
|
30515
|
-
const _sfc_main$
|
|
30564
|
+
const _hoisted_1$1b = { class: "lupa-search-box-add-to-cart-wrapper" };
|
|
30565
|
+
const _hoisted_2$Q = { class: "lupa-search-box-product-addtocart" };
|
|
30566
|
+
const _hoisted_3$C = ["disabled"];
|
|
30567
|
+
const _hoisted_4$s = ["href"];
|
|
30568
|
+
const _hoisted_5$i = ["disabled"];
|
|
30569
|
+
const _sfc_main$1o = /* @__PURE__ */ defineComponent({
|
|
30516
30570
|
__name: "SearchBoxProductAddToCart",
|
|
30517
30571
|
props: {
|
|
30518
30572
|
item: {},
|
|
@@ -30558,45 +30612,45 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
30558
30612
|
return Boolean(props.link && props.options.link);
|
|
30559
30613
|
});
|
|
30560
30614
|
return (_ctx, _cache) => {
|
|
30561
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
30562
|
-
createBaseVNode("div", _hoisted_2$
|
|
30615
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1b, [
|
|
30616
|
+
createBaseVNode("div", _hoisted_2$Q, [
|
|
30563
30617
|
hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
|
|
30564
30618
|
key: 0,
|
|
30565
30619
|
class: addToCartButtonClass.value,
|
|
30566
30620
|
"data-cy": "lupa-add-to-cart",
|
|
30567
30621
|
disabled: !inStockValue.value || loading.value
|
|
30568
30622
|
}, _ctx.dynamicAttributes, { onClick: handleClick }), [
|
|
30569
|
-
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$
|
|
30570
|
-
], 16, _hoisted_3$
|
|
30623
|
+
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$s)
|
|
30624
|
+
], 16, _hoisted_3$C)) : (openBlock(), createElementBlock("button", mergeProps({
|
|
30571
30625
|
key: 1,
|
|
30572
30626
|
onClick: withModifiers(handleClick, ["stop", "prevent"]),
|
|
30573
30627
|
class: addToCartButtonClass.value,
|
|
30574
30628
|
"data-cy": "lupa-add-to-cart",
|
|
30575
30629
|
type: "button",
|
|
30576
30630
|
disabled: !inStockValue.value || loading.value
|
|
30577
|
-
}, _ctx.dynamicAttributes), toDisplayString(label.value), 17, _hoisted_5$
|
|
30631
|
+
}, _ctx.dynamicAttributes), toDisplayString(label.value), 17, _hoisted_5$i))
|
|
30578
30632
|
])
|
|
30579
30633
|
]);
|
|
30580
30634
|
};
|
|
30581
30635
|
}
|
|
30582
30636
|
});
|
|
30583
|
-
const _hoisted_1$
|
|
30637
|
+
const _hoisted_1$1a = {
|
|
30584
30638
|
key: 1,
|
|
30585
30639
|
class: "lupa-search-box-element-badge-wrapper"
|
|
30586
30640
|
};
|
|
30587
30641
|
const __default__$4 = {
|
|
30588
30642
|
components: {
|
|
30589
|
-
SearchBoxProductImage: _sfc_main$
|
|
30590
|
-
SearchBoxProductTitle: _sfc_main$
|
|
30591
|
-
SearchBoxProductDescription: _sfc_main$
|
|
30592
|
-
SearchBoxProductPrice: _sfc_main$
|
|
30593
|
-
SearchBoxProductRegularPrice: _sfc_main$
|
|
30594
|
-
SearchBoxProductCustom: _sfc_main$
|
|
30595
|
-
SearchBoxProductCustomHtml: _sfc_main$
|
|
30596
|
-
SearchBoxProductAddToCart: _sfc_main$
|
|
30643
|
+
SearchBoxProductImage: _sfc_main$1v,
|
|
30644
|
+
SearchBoxProductTitle: _sfc_main$1u,
|
|
30645
|
+
SearchBoxProductDescription: _sfc_main$1t,
|
|
30646
|
+
SearchBoxProductPrice: _sfc_main$1s,
|
|
30647
|
+
SearchBoxProductRegularPrice: _sfc_main$1r,
|
|
30648
|
+
SearchBoxProductCustom: _sfc_main$1q,
|
|
30649
|
+
SearchBoxProductCustomHtml: _sfc_main$1p,
|
|
30650
|
+
SearchBoxProductAddToCart: _sfc_main$1o
|
|
30597
30651
|
}
|
|
30598
30652
|
};
|
|
30599
|
-
const _sfc_main$
|
|
30653
|
+
const _sfc_main$1n = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
|
|
30600
30654
|
__name: "SearchBoxProductElement",
|
|
30601
30655
|
props: {
|
|
30602
30656
|
item: {},
|
|
@@ -30668,7 +30722,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
30668
30722
|
"dynamic-attributes": dynamicAttributes.value,
|
|
30669
30723
|
link: _ctx.link
|
|
30670
30724
|
}, renderDynamicAttributesOnParentElement.value && dynamicAttributes.value), null, 16, ["item", "options", "labels", "class", "inStock", "dynamic-attributes", "link"])) : createCommentVNode("", true)
|
|
30671
|
-
], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$
|
|
30725
|
+
], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$1a, [
|
|
30672
30726
|
displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
|
|
30673
30727
|
key: 0,
|
|
30674
30728
|
item: enhancedItem.value,
|
|
@@ -30683,14 +30737,14 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
30683
30737
|
};
|
|
30684
30738
|
}
|
|
30685
30739
|
}));
|
|
30686
|
-
const _hoisted_1$
|
|
30687
|
-
const _hoisted_2$
|
|
30688
|
-
const _hoisted_3$
|
|
30689
|
-
const _hoisted_4$
|
|
30740
|
+
const _hoisted_1$19 = { class: "lupa-badge-title" };
|
|
30741
|
+
const _hoisted_2$P = ["src"];
|
|
30742
|
+
const _hoisted_3$B = { key: 1 };
|
|
30743
|
+
const _hoisted_4$r = {
|
|
30690
30744
|
key: 0,
|
|
30691
30745
|
class: "lupa-badge-full-text"
|
|
30692
30746
|
};
|
|
30693
|
-
const _sfc_main$
|
|
30747
|
+
const _sfc_main$1m = /* @__PURE__ */ defineComponent({
|
|
30694
30748
|
__name: "SearchResultGeneratedBadge",
|
|
30695
30749
|
props: {
|
|
30696
30750
|
options: {},
|
|
@@ -30723,20 +30777,20 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
30723
30777
|
class: normalizeClass(["lupa-dynamic-badge", customClassName.value]),
|
|
30724
30778
|
style: normalizeStyle({ background: _ctx.badge.backgroundColor, color: _ctx.badge.color })
|
|
30725
30779
|
}, [
|
|
30726
|
-
createBaseVNode("span", _hoisted_1$
|
|
30780
|
+
createBaseVNode("span", _hoisted_1$19, [
|
|
30727
30781
|
image.value ? (openBlock(), createElementBlock("img", {
|
|
30728
30782
|
key: 0,
|
|
30729
30783
|
src: image.value
|
|
30730
|
-
}, null, 8, _hoisted_2$
|
|
30731
|
-
hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
30784
|
+
}, null, 8, _hoisted_2$P)) : createCommentVNode("", true),
|
|
30785
|
+
hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$B, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
|
|
30732
30786
|
]),
|
|
30733
|
-
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
30787
|
+
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$r, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
|
|
30734
30788
|
], 6);
|
|
30735
30789
|
};
|
|
30736
30790
|
}
|
|
30737
30791
|
});
|
|
30738
|
-
const _hoisted_1$
|
|
30739
|
-
const _sfc_main$
|
|
30792
|
+
const _hoisted_1$18 = { class: "lupa-generated-badges" };
|
|
30793
|
+
const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
30740
30794
|
__name: "SearchResultGeneratedBadges",
|
|
30741
30795
|
props: {
|
|
30742
30796
|
options: {}
|
|
@@ -30762,9 +30816,9 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
30762
30816
|
})).filter((b) => Boolean(b.id));
|
|
30763
30817
|
});
|
|
30764
30818
|
return (_ctx, _cache) => {
|
|
30765
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
30819
|
+
return openBlock(), createElementBlock("div", _hoisted_1$18, [
|
|
30766
30820
|
(openBlock(true), createElementBlock(Fragment, null, renderList(badges.value, (badge) => {
|
|
30767
|
-
return openBlock(), createBlock(_sfc_main$
|
|
30821
|
+
return openBlock(), createBlock(_sfc_main$1m, {
|
|
30768
30822
|
key: badge.id,
|
|
30769
30823
|
badge,
|
|
30770
30824
|
options: _ctx.options
|
|
@@ -30774,8 +30828,8 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
30774
30828
|
};
|
|
30775
30829
|
}
|
|
30776
30830
|
});
|
|
30777
|
-
const _hoisted_1$
|
|
30778
|
-
const _sfc_main$
|
|
30831
|
+
const _hoisted_1$17 = ["innerHTML"];
|
|
30832
|
+
const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
30779
30833
|
__name: "CustomBadge",
|
|
30780
30834
|
props: {
|
|
30781
30835
|
badge: {}
|
|
@@ -30796,12 +30850,12 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
|
30796
30850
|
return openBlock(), createElementBlock("div", {
|
|
30797
30851
|
class: normalizeClass(className.value),
|
|
30798
30852
|
innerHTML: text.value
|
|
30799
|
-
}, null, 10, _hoisted_1$
|
|
30853
|
+
}, null, 10, _hoisted_1$17);
|
|
30800
30854
|
};
|
|
30801
30855
|
}
|
|
30802
30856
|
});
|
|
30803
|
-
const _hoisted_1$
|
|
30804
|
-
const _sfc_main$
|
|
30857
|
+
const _hoisted_1$16 = { class: "lupa-text-badges" };
|
|
30858
|
+
const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
30805
30859
|
__name: "TextBadge",
|
|
30806
30860
|
props: {
|
|
30807
30861
|
badge: {}
|
|
@@ -30815,7 +30869,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
30815
30869
|
return badges.value.slice(0, props.badge.maxItems);
|
|
30816
30870
|
});
|
|
30817
30871
|
return (_ctx, _cache) => {
|
|
30818
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
30872
|
+
return openBlock(), createElementBlock("div", _hoisted_1$16, [
|
|
30819
30873
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
|
|
30820
30874
|
return openBlock(), createElementBlock("div", {
|
|
30821
30875
|
class: "lupa-badge lupa-text-badge",
|
|
@@ -30826,9 +30880,9 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
30826
30880
|
};
|
|
30827
30881
|
}
|
|
30828
30882
|
});
|
|
30829
|
-
const _hoisted_1$
|
|
30830
|
-
const _hoisted_2$
|
|
30831
|
-
const _sfc_main$
|
|
30883
|
+
const _hoisted_1$15 = { class: "lupa-image-badges" };
|
|
30884
|
+
const _hoisted_2$O = ["src"];
|
|
30885
|
+
const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
30832
30886
|
__name: "ImageBadge",
|
|
30833
30887
|
props: {
|
|
30834
30888
|
badge: {}
|
|
@@ -30848,7 +30902,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
30848
30902
|
return `${props.badge.rootImageUrl}${src}`;
|
|
30849
30903
|
};
|
|
30850
30904
|
return (_ctx, _cache) => {
|
|
30851
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
30905
|
+
return openBlock(), createElementBlock("div", _hoisted_1$15, [
|
|
30852
30906
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
|
|
30853
30907
|
return openBlock(), createElementBlock("div", {
|
|
30854
30908
|
class: "lupa-badge lupa-image-badge",
|
|
@@ -30856,14 +30910,14 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
30856
30910
|
}, [
|
|
30857
30911
|
createBaseVNode("img", {
|
|
30858
30912
|
src: getImageUrl(item)
|
|
30859
|
-
}, null, 8, _hoisted_2$
|
|
30913
|
+
}, null, 8, _hoisted_2$O)
|
|
30860
30914
|
]);
|
|
30861
30915
|
}), 128))
|
|
30862
30916
|
]);
|
|
30863
30917
|
};
|
|
30864
30918
|
}
|
|
30865
30919
|
});
|
|
30866
|
-
const _sfc_main$
|
|
30920
|
+
const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
30867
30921
|
__name: "DiscountBadge",
|
|
30868
30922
|
props: {
|
|
30869
30923
|
badge: {}
|
|
@@ -30925,16 +30979,16 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
30925
30979
|
};
|
|
30926
30980
|
}
|
|
30927
30981
|
});
|
|
30928
|
-
const _hoisted_1$
|
|
30982
|
+
const _hoisted_1$14 = { id: "lupa-search-results-badges" };
|
|
30929
30983
|
const __default__$3 = {
|
|
30930
30984
|
components: {
|
|
30931
|
-
CustomBadge: _sfc_main$
|
|
30932
|
-
TextBadge: _sfc_main$
|
|
30933
|
-
ImageBadge: _sfc_main$
|
|
30934
|
-
DiscountBadge: _sfc_main$
|
|
30985
|
+
CustomBadge: _sfc_main$1k,
|
|
30986
|
+
TextBadge: _sfc_main$1j,
|
|
30987
|
+
ImageBadge: _sfc_main$1i,
|
|
30988
|
+
DiscountBadge: _sfc_main$1h
|
|
30935
30989
|
}
|
|
30936
30990
|
};
|
|
30937
|
-
const _sfc_main$
|
|
30991
|
+
const _sfc_main$1g = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
|
|
30938
30992
|
__name: "SearchResultsBadgeWrapper",
|
|
30939
30993
|
props: {
|
|
30940
30994
|
position: {},
|
|
@@ -30997,7 +31051,7 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
30997
31051
|
}
|
|
30998
31052
|
};
|
|
30999
31053
|
return (_ctx, _cache) => {
|
|
31000
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
31054
|
+
return openBlock(), createElementBlock("div", _hoisted_1$14, [
|
|
31001
31055
|
createBaseVNode("div", {
|
|
31002
31056
|
id: "lupa-badges",
|
|
31003
31057
|
class: normalizeClass(anchorPosition.value)
|
|
@@ -31008,7 +31062,7 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
31008
31062
|
badge
|
|
31009
31063
|
}, null, 8, ["badge"]);
|
|
31010
31064
|
}), 128)),
|
|
31011
|
-
positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$
|
|
31065
|
+
positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$1l, {
|
|
31012
31066
|
key: 0,
|
|
31013
31067
|
options: _ctx.options
|
|
31014
31068
|
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
@@ -31017,13 +31071,13 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
31017
31071
|
};
|
|
31018
31072
|
}
|
|
31019
31073
|
}));
|
|
31020
|
-
const _hoisted_1$
|
|
31021
|
-
const _hoisted_2$
|
|
31022
|
-
const _hoisted_3$
|
|
31074
|
+
const _hoisted_1$13 = ["href"];
|
|
31075
|
+
const _hoisted_2$N = { class: "lupa-search-box-product-details-section" };
|
|
31076
|
+
const _hoisted_3$A = {
|
|
31023
31077
|
key: 0,
|
|
31024
31078
|
class: "lupa-search-box-product-add-to-cart-section"
|
|
31025
31079
|
};
|
|
31026
|
-
const _sfc_main$
|
|
31080
|
+
const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
31027
31081
|
__name: "SearchBoxProduct",
|
|
31028
31082
|
props: {
|
|
31029
31083
|
item: {},
|
|
@@ -31129,7 +31183,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
31129
31183
|
style: normalizeStyle(imageStyleOverride.value)
|
|
31130
31184
|
}, [
|
|
31131
31185
|
(openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
|
|
31132
|
-
return openBlock(), createBlock(_sfc_main$
|
|
31186
|
+
return openBlock(), createBlock(_sfc_main$1n, {
|
|
31133
31187
|
class: "lupa-search-box-product-element",
|
|
31134
31188
|
key: element.key,
|
|
31135
31189
|
item: _ctx.item,
|
|
@@ -31139,10 +31193,10 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
31139
31193
|
}, null, 8, ["item", "element", "labels", "link"]);
|
|
31140
31194
|
}), 128))
|
|
31141
31195
|
], 4),
|
|
31142
|
-
createBaseVNode("div", _hoisted_2$
|
|
31196
|
+
createBaseVNode("div", _hoisted_2$N, [
|
|
31143
31197
|
(openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
|
|
31144
31198
|
var _a25;
|
|
31145
|
-
return openBlock(), createBlock(_sfc_main$
|
|
31199
|
+
return openBlock(), createBlock(_sfc_main$1n, {
|
|
31146
31200
|
class: "lupa-search-box-product-element",
|
|
31147
31201
|
key: element.key,
|
|
31148
31202
|
item: _ctx.item,
|
|
@@ -31153,7 +31207,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
31153
31207
|
((_a25 = badgeOptions.value) == null ? void 0 : _a25.anchorElementKey) === element.key ? {
|
|
31154
31208
|
name: "badges",
|
|
31155
31209
|
fn: withCtx(() => [
|
|
31156
|
-
createVNode(_sfc_main$
|
|
31210
|
+
createVNode(_sfc_main$1g, {
|
|
31157
31211
|
options: badgeOptions.value,
|
|
31158
31212
|
position: "card"
|
|
31159
31213
|
}, null, 8, ["options"])
|
|
@@ -31169,7 +31223,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
31169
31223
|
class: normalizeClass(`lupa-search-box-group-${group}`)
|
|
31170
31224
|
}, [
|
|
31171
31225
|
(openBlock(true), createElementBlock(Fragment, null, renderList(getGroupElements(group), (element) => {
|
|
31172
|
-
return openBlock(), createBlock(_sfc_main$
|
|
31226
|
+
return openBlock(), createBlock(_sfc_main$1n, {
|
|
31173
31227
|
class: "lupa-search-box-product-element",
|
|
31174
31228
|
key: element.key,
|
|
31175
31229
|
item: _ctx.item,
|
|
@@ -31181,8 +31235,8 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
31181
31235
|
}), 128))
|
|
31182
31236
|
], 2);
|
|
31183
31237
|
}), 128)),
|
|
31184
|
-
addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
31185
|
-
createVNode(_sfc_main$
|
|
31238
|
+
addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_3$A, [
|
|
31239
|
+
createVNode(_sfc_main$1n, {
|
|
31186
31240
|
class: "lupa-search-box-product-element",
|
|
31187
31241
|
item: _ctx.item,
|
|
31188
31242
|
element: addToCartElement.value,
|
|
@@ -31191,7 +31245,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
31191
31245
|
isInStock: isInStock.value
|
|
31192
31246
|
}, null, 8, ["item", "element", "labels", "link", "isInStock"])
|
|
31193
31247
|
])) : createCommentVNode("", true)
|
|
31194
|
-
], 16, _hoisted_1$
|
|
31248
|
+
], 16, _hoisted_1$13);
|
|
31195
31249
|
};
|
|
31196
31250
|
}
|
|
31197
31251
|
});
|
|
@@ -31263,8 +31317,8 @@ const useTrackingStore = /* @__PURE__ */ defineStore("tracking", () => {
|
|
|
31263
31317
|
};
|
|
31264
31318
|
return { trackSearch, trackResults, trackEvent, trackDelayedEvent };
|
|
31265
31319
|
});
|
|
31266
|
-
const _hoisted_1
|
|
31267
|
-
const _sfc_main$
|
|
31320
|
+
const _hoisted_1$12 = { id: "lupa-search-box-products" };
|
|
31321
|
+
const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
31268
31322
|
__name: "SearchBoxProducts",
|
|
31269
31323
|
props: {
|
|
31270
31324
|
items: {},
|
|
@@ -31336,7 +31390,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
31336
31390
|
}
|
|
31337
31391
|
};
|
|
31338
31392
|
return (_ctx, _cache) => {
|
|
31339
|
-
return openBlock(), createElementBlock("div", _hoisted_1
|
|
31393
|
+
return openBlock(), createElementBlock("div", _hoisted_1$12, [
|
|
31340
31394
|
_ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.items, (item, index) => {
|
|
31341
31395
|
return renderSlot(_ctx.$slots, "productCard", {
|
|
31342
31396
|
key: index,
|
|
@@ -31348,7 +31402,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
31348
31402
|
itemClicked: handleProductClick
|
|
31349
31403
|
});
|
|
31350
31404
|
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.items, (item, index) => {
|
|
31351
|
-
return openBlock(), createBlock(_sfc_main$
|
|
31405
|
+
return openBlock(), createBlock(_sfc_main$1f, {
|
|
31352
31406
|
key: index,
|
|
31353
31407
|
item,
|
|
31354
31408
|
panelOptions: _ctx.panelOptions,
|
|
@@ -31363,9 +31417,9 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
31363
31417
|
};
|
|
31364
31418
|
}
|
|
31365
31419
|
});
|
|
31366
|
-
const _hoisted_1$
|
|
31367
|
-
const _hoisted_2$
|
|
31368
|
-
const _sfc_main$
|
|
31420
|
+
const _hoisted_1$11 = { class: "lupa-search-box-documents-go-to-results-wrapper" };
|
|
31421
|
+
const _hoisted_2$M = { key: 0 };
|
|
31422
|
+
const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
31369
31423
|
__name: "SearchBoxProductsGoToResultsButton",
|
|
31370
31424
|
props: {
|
|
31371
31425
|
options: {},
|
|
@@ -31396,13 +31450,13 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
31396
31450
|
emit2("goToResults");
|
|
31397
31451
|
};
|
|
31398
31452
|
return (_ctx, _cache) => {
|
|
31399
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
31453
|
+
return openBlock(), createElementBlock("div", _hoisted_1$11, [
|
|
31400
31454
|
createBaseVNode("button", {
|
|
31401
31455
|
class: "lupa-search-box-documents-go-to-results-button",
|
|
31402
31456
|
onClick: goToResults
|
|
31403
31457
|
}, [
|
|
31404
31458
|
createTextVNode(toDisplayString(goToResultsLabel.value) + " ", 1),
|
|
31405
|
-
totalCount.value ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
31459
|
+
totalCount.value ? (openBlock(), createElementBlock("span", _hoisted_2$M, " " + toDisplayString(totalCount.value), 1)) : createCommentVNode("", true)
|
|
31406
31460
|
])
|
|
31407
31461
|
]);
|
|
31408
31462
|
};
|
|
@@ -31498,7 +31552,7 @@ const processExtractionObject = (value = {}) => {
|
|
|
31498
31552
|
}
|
|
31499
31553
|
return parsedObject;
|
|
31500
31554
|
};
|
|
31501
|
-
const _sfc_main$
|
|
31555
|
+
const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
31502
31556
|
__name: "SearchBoxProductsWrapper",
|
|
31503
31557
|
props: {
|
|
31504
31558
|
panel: {},
|
|
@@ -31568,7 +31622,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
31568
31622
|
watch(() => props.panel.limit, getItemsDebounced);
|
|
31569
31623
|
return (_ctx, _cache) => {
|
|
31570
31624
|
var _a25, _b25;
|
|
31571
|
-
return openBlock(), createBlock(_sfc_main$
|
|
31625
|
+
return openBlock(), createBlock(_sfc_main$1e, {
|
|
31572
31626
|
items: (_b25 = (_a25 = searchResult.value) == null ? void 0 : _a25.items) != null ? _b25 : [],
|
|
31573
31627
|
panelOptions: _ctx.panel,
|
|
31574
31628
|
labels: _ctx.labels,
|
|
@@ -31578,7 +31632,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
31578
31632
|
default: withCtx(() => {
|
|
31579
31633
|
var _a26;
|
|
31580
31634
|
return [
|
|
31581
|
-
showGoToResultsButton.value && ((_a26 = searchResult.value) == null ? void 0 : _a26.items.length) ? (openBlock(), createBlock(_sfc_main$
|
|
31635
|
+
showGoToResultsButton.value && ((_a26 = searchResult.value) == null ? void 0 : _a26.items.length) ? (openBlock(), createBlock(_sfc_main$1d, {
|
|
31582
31636
|
key: 0,
|
|
31583
31637
|
options: _ctx.searchBoxOptions,
|
|
31584
31638
|
panel: _ctx.panel,
|
|
@@ -31599,7 +31653,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
31599
31653
|
};
|
|
31600
31654
|
}
|
|
31601
31655
|
});
|
|
31602
|
-
const _sfc_main$
|
|
31656
|
+
const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
31603
31657
|
__name: "SearchBoxRelatedSourceWrapper",
|
|
31604
31658
|
props: {
|
|
31605
31659
|
panel: {},
|
|
@@ -31671,7 +31725,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
31671
31725
|
});
|
|
31672
31726
|
return (_ctx, _cache) => {
|
|
31673
31727
|
var _a25, _b25;
|
|
31674
|
-
return openBlock(), createBlock(_sfc_main$
|
|
31728
|
+
return openBlock(), createBlock(_sfc_main$1e, {
|
|
31675
31729
|
items: (_b25 = (_a25 = searchResult.value) == null ? void 0 : _a25.items) != null ? _b25 : [],
|
|
31676
31730
|
panelOptions: documentPanelOptions.value,
|
|
31677
31731
|
labels: _ctx.labels,
|
|
@@ -31689,31 +31743,31 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
31689
31743
|
};
|
|
31690
31744
|
}
|
|
31691
31745
|
});
|
|
31692
|
-
const _hoisted_1$
|
|
31746
|
+
const _hoisted_1$10 = {
|
|
31693
31747
|
key: 0,
|
|
31694
31748
|
id: "lupa-search-box-panel"
|
|
31695
31749
|
};
|
|
31696
|
-
const _hoisted_2$
|
|
31697
|
-
const _hoisted_3$
|
|
31750
|
+
const _hoisted_2$L = ["data-cy"];
|
|
31751
|
+
const _hoisted_3$z = {
|
|
31698
31752
|
key: 0,
|
|
31699
31753
|
class: "lupa-panel-title lupa-panel-title-top-results"
|
|
31700
31754
|
};
|
|
31701
|
-
const _hoisted_4$
|
|
31755
|
+
const _hoisted_4$q = {
|
|
31702
31756
|
key: 1,
|
|
31703
31757
|
class: "lupa-panel-title"
|
|
31704
31758
|
};
|
|
31705
|
-
const _hoisted_5$
|
|
31759
|
+
const _hoisted_5$h = {
|
|
31706
31760
|
key: 1,
|
|
31707
31761
|
id: "lupa-search-box-panel"
|
|
31708
31762
|
};
|
|
31709
31763
|
const __default__$2 = {
|
|
31710
31764
|
components: {
|
|
31711
|
-
SearchBoxSuggestionsWrapper: _sfc_main$
|
|
31712
|
-
SearchBoxProductsWrapper: _sfc_main$
|
|
31713
|
-
SearchBoxRelatedSourceWrapper: _sfc_main$
|
|
31765
|
+
SearchBoxSuggestionsWrapper: _sfc_main$1x,
|
|
31766
|
+
SearchBoxProductsWrapper: _sfc_main$1c,
|
|
31767
|
+
SearchBoxRelatedSourceWrapper: _sfc_main$1b
|
|
31714
31768
|
}
|
|
31715
31769
|
};
|
|
31716
|
-
const _sfc_main$
|
|
31770
|
+
const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
|
|
31717
31771
|
__name: "SearchBoxMainPanel",
|
|
31718
31772
|
props: {
|
|
31719
31773
|
options: {},
|
|
@@ -31878,7 +31932,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
31878
31932
|
ref_key: "panelContainer",
|
|
31879
31933
|
ref: panelContainer
|
|
31880
31934
|
}, [
|
|
31881
|
-
displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
31935
|
+
displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$10, [
|
|
31882
31936
|
labels.value.closePanel ? (openBlock(), createElementBlock("a", {
|
|
31883
31937
|
key: 0,
|
|
31884
31938
|
class: "lupa-search-box-close-panel",
|
|
@@ -31900,8 +31954,8 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
31900
31954
|
style: normalizeStyle(panel.gridArea ? { gridArea: `${panel.gridArea}${index}` } : {}),
|
|
31901
31955
|
"data-cy": "lupa-panel-" + panel.type + "-index"
|
|
31902
31956
|
}, [
|
|
31903
|
-
((_a25 = panel.labels) == null ? void 0 : _a25.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
31904
|
-
((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
31957
|
+
((_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),
|
|
31958
|
+
((_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),
|
|
31905
31959
|
panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
|
|
31906
31960
|
key: 2,
|
|
31907
31961
|
panel,
|
|
@@ -31923,21 +31977,21 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
31923
31977
|
key: "0"
|
|
31924
31978
|
} : void 0
|
|
31925
31979
|
]), 1064, ["panel", "search-box-options", "options", "debounce", "inputValue", "labels"])) : createCommentVNode("", true)
|
|
31926
|
-
], 14, _hoisted_2$
|
|
31980
|
+
], 14, _hoisted_2$L);
|
|
31927
31981
|
}), 128))
|
|
31928
31982
|
], 4),
|
|
31929
|
-
!unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$
|
|
31983
|
+
!unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1A, {
|
|
31930
31984
|
key: 1,
|
|
31931
31985
|
labels: labels.value
|
|
31932
31986
|
}, null, 8, ["labels"])) : createCommentVNode("", true),
|
|
31933
|
-
displayShowMoreResultsButton.value ? (openBlock(), createBlock(_sfc_main$
|
|
31987
|
+
displayShowMoreResultsButton.value ? (openBlock(), createBlock(_sfc_main$1D, {
|
|
31934
31988
|
key: 2,
|
|
31935
31989
|
labels: labels.value,
|
|
31936
31990
|
options: _ctx.options,
|
|
31937
31991
|
onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
|
|
31938
31992
|
}, null, 8, ["labels", "options"])) : createCommentVNode("", true)
|
|
31939
|
-
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
31940
|
-
createVNode(_sfc_main$
|
|
31993
|
+
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$h, [
|
|
31994
|
+
createVNode(_sfc_main$1B, {
|
|
31941
31995
|
options: _ctx.options.history,
|
|
31942
31996
|
history: history.value,
|
|
31943
31997
|
onGoToResults: handleGoToResults,
|
|
@@ -31962,8 +32016,8 @@ const unbindSearchTriggers = (triggers = [], event) => {
|
|
|
31962
32016
|
const elements = getElements(triggers);
|
|
31963
32017
|
elements.forEach((e2) => e2 == null ? void 0 : e2.removeEventListener(BIND_EVENT, event));
|
|
31964
32018
|
};
|
|
31965
|
-
const _hoisted_1
|
|
31966
|
-
const _sfc_main$
|
|
32019
|
+
const _hoisted_1$$ = { class: "lupa-search-box-wrapper" };
|
|
32020
|
+
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
31967
32021
|
__name: "SearchBox",
|
|
31968
32022
|
props: {
|
|
31969
32023
|
options: {},
|
|
@@ -32286,8 +32340,8 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
32286
32340
|
id: "lupa-search-box",
|
|
32287
32341
|
class: normalizeClass({ "lupa-search-box-opened": opened.value })
|
|
32288
32342
|
}, [
|
|
32289
|
-
createBaseVNode("div", _hoisted_1
|
|
32290
|
-
createVNode(_sfc_main$
|
|
32343
|
+
createBaseVNode("div", _hoisted_1$$, [
|
|
32344
|
+
createVNode(_sfc_main$1E, {
|
|
32291
32345
|
options: inputOptions.value,
|
|
32292
32346
|
suggestedValue: suggestedValue.value,
|
|
32293
32347
|
"can-close": (_a26 = _ctx.isSearchContainer) != null ? _a26 : false,
|
|
@@ -32300,7 +32354,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
32300
32354
|
onSearch: handleSearch,
|
|
32301
32355
|
onClose: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
|
|
32302
32356
|
}, null, 8, ["options", "suggestedValue", "can-close", "emit-input-on-focus"]),
|
|
32303
|
-
opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$
|
|
32357
|
+
opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$1a, {
|
|
32304
32358
|
key: 0,
|
|
32305
32359
|
options: panelOptions.value,
|
|
32306
32360
|
inputValue: inputValue.value,
|
|
@@ -32388,20 +32442,20 @@ const getSearchParams = (url, params, baseUrl) => {
|
|
|
32388
32442
|
}
|
|
32389
32443
|
return searchParams;
|
|
32390
32444
|
};
|
|
32391
|
-
const _hoisted_1$
|
|
32445
|
+
const _hoisted_1$_ = {
|
|
32392
32446
|
key: 0,
|
|
32393
32447
|
id: "lupa-search-results-did-you-mean"
|
|
32394
32448
|
};
|
|
32395
|
-
const _hoisted_2$
|
|
32449
|
+
const _hoisted_2$K = {
|
|
32396
32450
|
key: 0,
|
|
32397
32451
|
"data-cy": "suggested-search-text-label"
|
|
32398
32452
|
};
|
|
32399
|
-
const _hoisted_3$
|
|
32453
|
+
const _hoisted_3$y = {
|
|
32400
32454
|
key: 1,
|
|
32401
32455
|
"data-cy": "did-you-mean-label"
|
|
32402
32456
|
};
|
|
32403
|
-
const _hoisted_4$
|
|
32404
|
-
const _sfc_main$
|
|
32457
|
+
const _hoisted_4$p = { key: 1 };
|
|
32458
|
+
const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
32405
32459
|
__name: "SearchResultsDidYouMean",
|
|
32406
32460
|
props: {
|
|
32407
32461
|
labels: {}
|
|
@@ -32433,8 +32487,8 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
32433
32487
|
paramStore.goToResults({ searchText, facet });
|
|
32434
32488
|
};
|
|
32435
32489
|
return (_ctx, _cache) => {
|
|
32436
|
-
return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
32437
|
-
unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
32490
|
+
return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$_, [
|
|
32491
|
+
unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$K, [
|
|
32438
32492
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.noResultsSuggestion.split(" "), (label, index) => {
|
|
32439
32493
|
return openBlock(), createElementBlock("span", { key: index }, [
|
|
32440
32494
|
createBaseVNode("span", {
|
|
@@ -32443,7 +32497,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
32443
32497
|
]);
|
|
32444
32498
|
}), 128))
|
|
32445
32499
|
])) : createCommentVNode("", true),
|
|
32446
|
-
didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
32500
|
+
didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$y, [
|
|
32447
32501
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.didYouMean.split(" "), (label, index) => {
|
|
32448
32502
|
return openBlock(), createElementBlock("span", { key: index }, [
|
|
32449
32503
|
label.includes("{1}") ? (openBlock(), createElementBlock("span", {
|
|
@@ -32451,7 +32505,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
32451
32505
|
class: "lupa-did-you-mean lupa-highlighted-search-text",
|
|
32452
32506
|
"data-cy": "did-you-mean-value",
|
|
32453
32507
|
onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
|
|
32454
|
-
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$
|
|
32508
|
+
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(label) + " ", 1))
|
|
32455
32509
|
]);
|
|
32456
32510
|
}), 128))
|
|
32457
32511
|
])) : createCommentVNode("", true)
|
|
@@ -32459,12 +32513,12 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
32459
32513
|
};
|
|
32460
32514
|
}
|
|
32461
32515
|
});
|
|
32462
|
-
const _hoisted_1$
|
|
32516
|
+
const _hoisted_1$Z = {
|
|
32463
32517
|
key: 0,
|
|
32464
32518
|
class: "lupa-search-results-summary"
|
|
32465
32519
|
};
|
|
32466
|
-
const _hoisted_2$
|
|
32467
|
-
const _sfc_main$
|
|
32520
|
+
const _hoisted_2$J = ["innerHTML"];
|
|
32521
|
+
const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
32468
32522
|
__name: "SearchResultsSummary",
|
|
32469
32523
|
props: {
|
|
32470
32524
|
label: {},
|
|
@@ -32479,8 +32533,8 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
32479
32533
|
return addParamsToLabel(props.label, range2, `<span>${totalItems.value}</span>`);
|
|
32480
32534
|
});
|
|
32481
32535
|
return (_ctx, _cache) => {
|
|
32482
|
-
return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
32483
|
-
createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$
|
|
32536
|
+
return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$Z, [
|
|
32537
|
+
createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$J),
|
|
32484
32538
|
_ctx.clearable ? (openBlock(), createElementBlock("span", {
|
|
32485
32539
|
key: 0,
|
|
32486
32540
|
class: "lupa-filter-clear",
|
|
@@ -32491,19 +32545,19 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
32491
32545
|
};
|
|
32492
32546
|
}
|
|
32493
32547
|
});
|
|
32494
|
-
const _hoisted_1$
|
|
32548
|
+
const _hoisted_1$Y = {
|
|
32495
32549
|
key: 0,
|
|
32496
32550
|
class: "lupa-result-page-title",
|
|
32497
32551
|
"data-cy": "lupa-result-page-title"
|
|
32498
32552
|
};
|
|
32499
|
-
const _hoisted_2$
|
|
32500
|
-
const _hoisted_3$
|
|
32553
|
+
const _hoisted_2$I = { key: 0 };
|
|
32554
|
+
const _hoisted_3$x = {
|
|
32501
32555
|
key: 1,
|
|
32502
32556
|
class: "lupa-results-total-count"
|
|
32503
32557
|
};
|
|
32504
|
-
const _hoisted_4$
|
|
32505
|
-
const _hoisted_5$
|
|
32506
|
-
const _sfc_main$
|
|
32558
|
+
const _hoisted_4$o = { class: "lupa-results-total-count-number" };
|
|
32559
|
+
const _hoisted_5$g = ["innerHTML"];
|
|
32560
|
+
const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
32507
32561
|
__name: "SearchResultsTitle",
|
|
32508
32562
|
props: {
|
|
32509
32563
|
options: {},
|
|
@@ -32546,16 +32600,16 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
32546
32600
|
});
|
|
32547
32601
|
return (_ctx, _cache) => {
|
|
32548
32602
|
return openBlock(), createElementBlock("div", null, [
|
|
32549
|
-
showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$
|
|
32603
|
+
showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$Y, [
|
|
32550
32604
|
createTextVNode(toDisplayString(searchResultsTitleTemplate.value || _ctx.options.labels.searchResults), 1),
|
|
32551
|
-
queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
32552
|
-
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
32605
|
+
queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$I, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
|
|
32606
|
+
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$x, [
|
|
32553
32607
|
createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
|
|
32554
|
-
createBaseVNode("span", _hoisted_4$
|
|
32608
|
+
createBaseVNode("span", _hoisted_4$o, toDisplayString(unref(totalItems)), 1),
|
|
32555
32609
|
_cache[0] || (_cache[0] = createTextVNode(")"))
|
|
32556
32610
|
])) : createCommentVNode("", true)
|
|
32557
32611
|
])) : createCommentVNode("", true),
|
|
32558
|
-
_ctx.showSummary ? (openBlock(), createBlock(_sfc_main$
|
|
32612
|
+
_ctx.showSummary ? (openBlock(), createBlock(_sfc_main$17, {
|
|
32559
32613
|
key: 1,
|
|
32560
32614
|
label: summaryLabel.value
|
|
32561
32615
|
}, null, 8, ["label"])) : createCommentVNode("", true),
|
|
@@ -32563,20 +32617,20 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
32563
32617
|
key: 2,
|
|
32564
32618
|
class: "lupa-result-page-description-top",
|
|
32565
32619
|
innerHTML: descriptionTop.value
|
|
32566
|
-
}, null, 8, _hoisted_5$
|
|
32620
|
+
}, null, 8, _hoisted_5$g)) : createCommentVNode("", true)
|
|
32567
32621
|
]);
|
|
32568
32622
|
};
|
|
32569
32623
|
}
|
|
32570
32624
|
});
|
|
32571
|
-
const _hoisted_1$
|
|
32625
|
+
const _hoisted_1$X = {
|
|
32572
32626
|
class: "lupa-current-filter-label",
|
|
32573
32627
|
"data-cy": "lupa-current-filter-label"
|
|
32574
32628
|
};
|
|
32575
|
-
const _hoisted_2$
|
|
32629
|
+
const _hoisted_2$H = {
|
|
32576
32630
|
class: "lupa-current-filter-value",
|
|
32577
32631
|
"data-cy": "lupa-current-filter-value"
|
|
32578
32632
|
};
|
|
32579
|
-
const _sfc_main
|
|
32633
|
+
const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
32580
32634
|
__name: "CurrentFilterDisplay",
|
|
32581
32635
|
props: {
|
|
32582
32636
|
filter: {}
|
|
@@ -32618,23 +32672,23 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
32618
32672
|
onClick: handleClick,
|
|
32619
32673
|
"aria-label": "Remove filter"
|
|
32620
32674
|
}, "⨉"),
|
|
32621
|
-
createBaseVNode("div", _hoisted_1$
|
|
32622
|
-
createBaseVNode("div", _hoisted_2$
|
|
32675
|
+
createBaseVNode("div", _hoisted_1$X, toDisplayString(_ctx.filter.label) + ": ", 1),
|
|
32676
|
+
createBaseVNode("div", _hoisted_2$H, toDisplayString(formatFilterValue(props.filter)), 1)
|
|
32623
32677
|
], 2);
|
|
32624
32678
|
};
|
|
32625
32679
|
}
|
|
32626
32680
|
});
|
|
32627
|
-
const _hoisted_1$
|
|
32628
|
-
const _hoisted_2$
|
|
32681
|
+
const _hoisted_1$W = { class: "lupa-filter-title-text" };
|
|
32682
|
+
const _hoisted_2$G = {
|
|
32629
32683
|
key: 0,
|
|
32630
32684
|
class: "lupa-filter-count"
|
|
32631
32685
|
};
|
|
32632
|
-
const _hoisted_3$
|
|
32686
|
+
const _hoisted_3$w = {
|
|
32633
32687
|
key: 0,
|
|
32634
32688
|
class: "filter-values"
|
|
32635
32689
|
};
|
|
32636
|
-
const _hoisted_4$
|
|
32637
|
-
const _sfc_main$
|
|
32690
|
+
const _hoisted_4$n = { class: "lupa-current-filter-list" };
|
|
32691
|
+
const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
32638
32692
|
__name: "CurrentFilters",
|
|
32639
32693
|
props: {
|
|
32640
32694
|
options: {},
|
|
@@ -32643,12 +32697,10 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
32643
32697
|
setup(__props) {
|
|
32644
32698
|
const optionsStore = useOptionsStore();
|
|
32645
32699
|
const { searchResultOptions } = storeToRefs(optionsStore);
|
|
32646
|
-
const units = computed(
|
|
32647
|
-
|
|
32648
|
-
|
|
32649
|
-
|
|
32650
|
-
}
|
|
32651
|
-
);
|
|
32700
|
+
const units = computed(() => {
|
|
32701
|
+
var _a25, _b25, _c, _d, _e;
|
|
32702
|
+
return (_e = (_d = (_c = (_b25 = (_a25 = searchResultOptions == null ? void 0 : searchResultOptions.value) == null ? void 0 : _a25.filters) == null ? void 0 : _b25.facets) == null ? void 0 : _c.stats) == null ? void 0 : _d.units) != null ? _e : {};
|
|
32703
|
+
});
|
|
32652
32704
|
const isOpen = ref(false);
|
|
32653
32705
|
const paramsStore = useParamsStore();
|
|
32654
32706
|
const optionStore = useOptionsStore();
|
|
@@ -32698,7 +32750,8 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
32698
32750
|
paramsStore.removeParameters({
|
|
32699
32751
|
paramsToRemove: [
|
|
32700
32752
|
optionStore.getQueryParamName(QUERY_PARAMS$1.PAGE),
|
|
32701
|
-
`${FACET_PARAMS_TYPE.RANGE}${filter.key}
|
|
32753
|
+
`${FACET_PARAMS_TYPE.RANGE}${filter.key}`,
|
|
32754
|
+
`${FACET_PARAMS_TYPE.PARTIAL_RANGE}${filter.key}`
|
|
32702
32755
|
]
|
|
32703
32756
|
});
|
|
32704
32757
|
break;
|
|
@@ -32715,19 +32768,19 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
32715
32768
|
class: "lupa-current-filter-title",
|
|
32716
32769
|
onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
|
|
32717
32770
|
}, [
|
|
32718
|
-
createBaseVNode("div", _hoisted_1$
|
|
32771
|
+
createBaseVNode("div", _hoisted_1$W, [
|
|
32719
32772
|
createTextVNode(toDisplayString((_c = (_b25 = (_a25 = _ctx.options) == null ? void 0 : _a25.labels) == null ? void 0 : _b25.title) != null ? _c : "") + " ", 1),
|
|
32720
|
-
_ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
32773
|
+
_ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$G, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
|
|
32721
32774
|
]),
|
|
32722
32775
|
_ctx.expandable ? (openBlock(), createElementBlock("div", {
|
|
32723
32776
|
key: 0,
|
|
32724
32777
|
class: normalizeClass(["lupa-filter-title-caret", isOpen.value && "open"])
|
|
32725
32778
|
}, null, 2)) : createCommentVNode("", true)
|
|
32726
32779
|
]),
|
|
32727
|
-
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
32728
|
-
createBaseVNode("div", _hoisted_4$
|
|
32780
|
+
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$w, [
|
|
32781
|
+
createBaseVNode("div", _hoisted_4$n, [
|
|
32729
32782
|
(openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter) => {
|
|
32730
|
-
return openBlock(), createBlock(_sfc_main
|
|
32783
|
+
return openBlock(), createBlock(_sfc_main$15, {
|
|
32731
32784
|
key: filter.key + "_" + filter.value,
|
|
32732
32785
|
filter,
|
|
32733
32786
|
units: units.value,
|
|
@@ -32745,8 +32798,8 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
32745
32798
|
};
|
|
32746
32799
|
}
|
|
32747
32800
|
});
|
|
32748
|
-
const _hoisted_1$
|
|
32749
|
-
const _sfc_main$
|
|
32801
|
+
const _hoisted_1$V = ["href"];
|
|
32802
|
+
const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
32750
32803
|
__name: "CategoryFilterItem",
|
|
32751
32804
|
props: {
|
|
32752
32805
|
options: {},
|
|
@@ -32783,20 +32836,20 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
32783
32836
|
"data-cy": "lupa-child-category-item",
|
|
32784
32837
|
href: urlLink.value,
|
|
32785
32838
|
onClick: handleNavigation
|
|
32786
|
-
}, toDisplayString(title.value), 9, _hoisted_1$
|
|
32839
|
+
}, toDisplayString(title.value), 9, _hoisted_1$V)
|
|
32787
32840
|
], 2);
|
|
32788
32841
|
};
|
|
32789
32842
|
}
|
|
32790
32843
|
});
|
|
32791
|
-
const _hoisted_1$
|
|
32844
|
+
const _hoisted_1$U = {
|
|
32792
32845
|
class: "lupa-category-filter",
|
|
32793
32846
|
"data-cy": "lupa-category-filter"
|
|
32794
32847
|
};
|
|
32795
|
-
const _hoisted_2$
|
|
32796
|
-
const _hoisted_3$
|
|
32797
|
-
const _hoisted_4$
|
|
32798
|
-
const _hoisted_5$
|
|
32799
|
-
const _sfc_main$
|
|
32848
|
+
const _hoisted_2$F = { class: "lupa-category-back" };
|
|
32849
|
+
const _hoisted_3$v = ["href"];
|
|
32850
|
+
const _hoisted_4$m = ["href"];
|
|
32851
|
+
const _hoisted_5$f = { class: "lupa-child-category-list" };
|
|
32852
|
+
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
32800
32853
|
__name: "CategoryFilter",
|
|
32801
32854
|
props: {
|
|
32802
32855
|
options: {}
|
|
@@ -32884,14 +32937,14 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
32884
32937
|
};
|
|
32885
32938
|
__expose({ fetch: fetch2 });
|
|
32886
32939
|
return (_ctx, _cache) => {
|
|
32887
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
32888
|
-
createBaseVNode("div", _hoisted_2$
|
|
32940
|
+
return openBlock(), createElementBlock("div", _hoisted_1$U, [
|
|
32941
|
+
createBaseVNode("div", _hoisted_2$F, [
|
|
32889
32942
|
hasBackButton.value ? (openBlock(), createElementBlock("a", {
|
|
32890
32943
|
key: 0,
|
|
32891
32944
|
"data-cy": "lupa-category-back",
|
|
32892
32945
|
href: backUrlLink.value,
|
|
32893
32946
|
onClick: handleNavigationBack
|
|
32894
|
-
}, toDisplayString(backTitle.value), 9, _hoisted_3$
|
|
32947
|
+
}, toDisplayString(backTitle.value), 9, _hoisted_3$v)) : createCommentVNode("", true)
|
|
32895
32948
|
]),
|
|
32896
32949
|
createBaseVNode("div", {
|
|
32897
32950
|
class: normalizeClass(["lupa-current-category", { "lupa-current-category-active": isActive }])
|
|
@@ -32901,11 +32954,11 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
32901
32954
|
href: parentUrlLink.value,
|
|
32902
32955
|
class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
|
|
32903
32956
|
onClick: handleNavigationParent
|
|
32904
|
-
}, toDisplayString(parentTitle.value), 11, _hoisted_4$
|
|
32957
|
+
}, toDisplayString(parentTitle.value), 11, _hoisted_4$m)
|
|
32905
32958
|
], 2),
|
|
32906
|
-
createBaseVNode("div", _hoisted_5$
|
|
32959
|
+
createBaseVNode("div", _hoisted_5$f, [
|
|
32907
32960
|
(openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
|
|
32908
|
-
return openBlock(), createBlock(_sfc_main$
|
|
32961
|
+
return openBlock(), createBlock(_sfc_main$13, {
|
|
32909
32962
|
key: getCategoryKey(child),
|
|
32910
32963
|
item: child,
|
|
32911
32964
|
options: _ctx.options
|
|
@@ -32916,22 +32969,22 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
32916
32969
|
};
|
|
32917
32970
|
}
|
|
32918
32971
|
});
|
|
32919
|
-
const _hoisted_1$
|
|
32972
|
+
const _hoisted_1$T = {
|
|
32920
32973
|
class: "lupa-search-result-facet-term-values",
|
|
32921
32974
|
"data-cy": "lupa-search-result-facet-term-values"
|
|
32922
32975
|
};
|
|
32923
|
-
const _hoisted_2$
|
|
32924
|
-
const _hoisted_3$
|
|
32925
|
-
const _hoisted_4$
|
|
32926
|
-
const _hoisted_5$
|
|
32927
|
-
const _hoisted_6$
|
|
32976
|
+
const _hoisted_2$E = ["placeholder"];
|
|
32977
|
+
const _hoisted_3$u = { class: "lupa-terms-list" };
|
|
32978
|
+
const _hoisted_4$l = ["onClick"];
|
|
32979
|
+
const _hoisted_5$e = { class: "lupa-term-checkbox-wrapper" };
|
|
32980
|
+
const _hoisted_6$6 = { class: "lupa-term-label" };
|
|
32928
32981
|
const _hoisted_7$4 = {
|
|
32929
32982
|
key: 0,
|
|
32930
32983
|
class: "lupa-term-count"
|
|
32931
32984
|
};
|
|
32932
32985
|
const _hoisted_8$2 = { key: 0 };
|
|
32933
32986
|
const _hoisted_9$2 = { key: 1 };
|
|
32934
|
-
const _sfc_main$
|
|
32987
|
+
const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
32935
32988
|
__name: "TermFacet",
|
|
32936
32989
|
props: {
|
|
32937
32990
|
options: {},
|
|
@@ -32997,7 +33050,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
32997
33050
|
emit2("select", {
|
|
32998
33051
|
key: facet.value.key,
|
|
32999
33052
|
value,
|
|
33000
|
-
type: facet.value.type
|
|
33053
|
+
type: facet.value.type === "range" ? "partialRange" : facet.value.type
|
|
33001
33054
|
});
|
|
33002
33055
|
};
|
|
33003
33056
|
const toggleShowAll = () => {
|
|
@@ -33025,17 +33078,17 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
33025
33078
|
}
|
|
33026
33079
|
};
|
|
33027
33080
|
return (_ctx, _cache) => {
|
|
33028
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
33081
|
+
return openBlock(), createElementBlock("div", _hoisted_1$T, [
|
|
33029
33082
|
isFilterable.value ? withDirectives((openBlock(), createElementBlock("input", {
|
|
33030
33083
|
key: 0,
|
|
33031
33084
|
class: "lupa-term-filter",
|
|
33032
33085
|
"data-cy": "lupa-term-filter",
|
|
33033
33086
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
|
|
33034
33087
|
placeholder: _ctx.options.labels.facetFilter
|
|
33035
|
-
}, null, 8, _hoisted_2$
|
|
33088
|
+
}, null, 8, _hoisted_2$E)), [
|
|
33036
33089
|
[vModelText, termFilter.value]
|
|
33037
33090
|
]) : createCommentVNode("", true),
|
|
33038
|
-
createBaseVNode("div", _hoisted_3$
|
|
33091
|
+
createBaseVNode("div", _hoisted_3$u, [
|
|
33039
33092
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
|
|
33040
33093
|
return openBlock(), createElementBlock("div", {
|
|
33041
33094
|
class: normalizeClass(["lupa-facet-term", { checked: isChecked(item) }]),
|
|
@@ -33043,7 +33096,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
33043
33096
|
key: item.title,
|
|
33044
33097
|
onClick: ($event) => handleFacetClick(item)
|
|
33045
33098
|
}, [
|
|
33046
|
-
createBaseVNode("div", _hoisted_5$
|
|
33099
|
+
createBaseVNode("div", _hoisted_5$e, [
|
|
33047
33100
|
createBaseVNode("span", {
|
|
33048
33101
|
class: normalizeClass(["lupa-term-checkbox", { checked: isChecked(item) }])
|
|
33049
33102
|
}, null, 2)
|
|
@@ -33051,10 +33104,10 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
33051
33104
|
createBaseVNode("div", {
|
|
33052
33105
|
class: normalizeClass(["lupa-term-checkbox-label", { [getFacetValueClass(item)]: true }])
|
|
33053
33106
|
}, [
|
|
33054
|
-
createBaseVNode("span", _hoisted_6$
|
|
33107
|
+
createBaseVNode("span", _hoisted_6$6, toDisplayString(getItemLabel(item)), 1),
|
|
33055
33108
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_7$4, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
|
|
33056
33109
|
], 2)
|
|
33057
|
-
], 10, _hoisted_4$
|
|
33110
|
+
], 10, _hoisted_4$l);
|
|
33058
33111
|
}), 128))
|
|
33059
33112
|
]),
|
|
33060
33113
|
displayShowMore.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -33974,21 +34027,21 @@ const roundToMaxDecimals = (value, maxPrecision = 0.1) => {
|
|
|
33974
34027
|
}
|
|
33975
34028
|
return out;
|
|
33976
34029
|
};
|
|
33977
|
-
const _hoisted_1$
|
|
33978
|
-
const _hoisted_2$
|
|
34030
|
+
const _hoisted_1$S = { class: "lupa-search-result-facet-stats-values" };
|
|
34031
|
+
const _hoisted_2$D = {
|
|
33979
34032
|
key: 0,
|
|
33980
34033
|
class: "lupa-stats-facet-summary"
|
|
33981
34034
|
};
|
|
33982
|
-
const _hoisted_3$
|
|
34035
|
+
const _hoisted_3$t = {
|
|
33983
34036
|
key: 1,
|
|
33984
34037
|
class: "lupa-stats-facet-summary-input"
|
|
33985
34038
|
};
|
|
33986
|
-
const _hoisted_4$
|
|
33987
|
-
const _hoisted_5$
|
|
34039
|
+
const _hoisted_4$k = { class: "lupa-stats-from" };
|
|
34040
|
+
const _hoisted_5$d = {
|
|
33988
34041
|
key: 0,
|
|
33989
34042
|
class: "lupa-stats-range-label"
|
|
33990
34043
|
};
|
|
33991
|
-
const _hoisted_6$
|
|
34044
|
+
const _hoisted_6$5 = ["min", "max", "pattern", "aria-label"];
|
|
33992
34045
|
const _hoisted_7$3 = { key: 1 };
|
|
33993
34046
|
const _hoisted_8$1 = { key: 2 };
|
|
33994
34047
|
const _hoisted_9$1 = { class: "lupa-stats-to" };
|
|
@@ -34003,7 +34056,7 @@ const _hoisted_14 = {
|
|
|
34003
34056
|
key: 2,
|
|
34004
34057
|
class: "lupa-stats-slider-wrapper"
|
|
34005
34058
|
};
|
|
34006
|
-
const _sfc_main$
|
|
34059
|
+
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
34007
34060
|
__name: "StatsFacet",
|
|
34008
34061
|
props: {
|
|
34009
34062
|
options: {},
|
|
@@ -34222,10 +34275,10 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
34222
34275
|
}
|
|
34223
34276
|
);
|
|
34224
34277
|
return (_ctx, _cache) => {
|
|
34225
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
34226
|
-
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
34227
|
-
createBaseVNode("div", _hoisted_4$
|
|
34228
|
-
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
34278
|
+
return openBlock(), createElementBlock("div", _hoisted_1$S, [
|
|
34279
|
+
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$D, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$t, [
|
|
34280
|
+
createBaseVNode("div", _hoisted_4$k, [
|
|
34281
|
+
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_5$d, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
|
|
34229
34282
|
withDirectives(createBaseVNode("input", {
|
|
34230
34283
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
|
|
34231
34284
|
type: "text",
|
|
@@ -34234,7 +34287,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
34234
34287
|
max: facetMax.value,
|
|
34235
34288
|
pattern: sliderInputFormat.value,
|
|
34236
34289
|
"aria-label": ariaLabelFrom.value
|
|
34237
|
-
}, null, 8, _hoisted_6$
|
|
34290
|
+
}, null, 8, _hoisted_6$5), [
|
|
34238
34291
|
[
|
|
34239
34292
|
vModelText,
|
|
34240
34293
|
fromValue.value,
|
|
@@ -34287,17 +34340,17 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
34287
34340
|
};
|
|
34288
34341
|
}
|
|
34289
34342
|
});
|
|
34290
|
-
const _hoisted_1$
|
|
34291
|
-
const _hoisted_2$
|
|
34292
|
-
const _hoisted_3$
|
|
34343
|
+
const _hoisted_1$R = { class: "lupa-term-checkbox-wrapper" };
|
|
34344
|
+
const _hoisted_2$C = { class: "lupa-term-label" };
|
|
34345
|
+
const _hoisted_3$s = {
|
|
34293
34346
|
key: 0,
|
|
34294
34347
|
class: "lupa-term-count"
|
|
34295
34348
|
};
|
|
34296
|
-
const _hoisted_4$
|
|
34349
|
+
const _hoisted_4$j = {
|
|
34297
34350
|
key: 0,
|
|
34298
34351
|
class: "lupa-facet-level"
|
|
34299
34352
|
};
|
|
34300
|
-
const _sfc_main
|
|
34353
|
+
const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
34301
34354
|
__name: "HierarchyFacetLevel",
|
|
34302
34355
|
props: {
|
|
34303
34356
|
options: {},
|
|
@@ -34351,7 +34404,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
34351
34404
|
"data-cy": "lupa-facet-term",
|
|
34352
34405
|
onClick: _cache[0] || (_cache[0] = ($event) => handleFacetClick(_ctx.item))
|
|
34353
34406
|
}, [
|
|
34354
|
-
createBaseVNode("div", _hoisted_1$
|
|
34407
|
+
createBaseVNode("div", _hoisted_1$R, [
|
|
34355
34408
|
createBaseVNode("span", {
|
|
34356
34409
|
class: normalizeClass(["lupa-term-checkbox", { checked: isChecked.value }])
|
|
34357
34410
|
}, null, 2)
|
|
@@ -34359,11 +34412,11 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
34359
34412
|
createBaseVNode("div", {
|
|
34360
34413
|
class: normalizeClass(["lupa-term-checkbox-label", { [getFacetValueClass(_ctx.item)]: true }])
|
|
34361
34414
|
}, [
|
|
34362
|
-
createBaseVNode("span", _hoisted_2$
|
|
34363
|
-
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
34415
|
+
createBaseVNode("span", _hoisted_2$C, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
|
|
34416
|
+
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_3$s, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
|
|
34364
34417
|
], 2)
|
|
34365
34418
|
]),
|
|
34366
|
-
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
34419
|
+
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$j, [
|
|
34367
34420
|
(openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
|
|
34368
34421
|
return openBlock(), createBlock(_component_HierarchyFacetLevel, {
|
|
34369
34422
|
key: itemChild.title,
|
|
@@ -34379,13 +34432,13 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
34379
34432
|
};
|
|
34380
34433
|
}
|
|
34381
34434
|
});
|
|
34382
|
-
const _hoisted_1$
|
|
34435
|
+
const _hoisted_1$Q = {
|
|
34383
34436
|
class: "lupa-search-result-facet-term-values lupa-search-result-facet-hierarchy-values",
|
|
34384
34437
|
"data-cy": "lupa-search-result-facet-term-values"
|
|
34385
34438
|
};
|
|
34386
|
-
const _hoisted_2$
|
|
34387
|
-
const _hoisted_3$
|
|
34388
|
-
const _sfc_main$
|
|
34439
|
+
const _hoisted_2$B = { key: 0 };
|
|
34440
|
+
const _hoisted_3$r = ["placeholder"];
|
|
34441
|
+
const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
34389
34442
|
__name: "HierarchyFacet",
|
|
34390
34443
|
props: {
|
|
34391
34444
|
options: {},
|
|
@@ -34441,19 +34494,19 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
34441
34494
|
showAll.value = false;
|
|
34442
34495
|
};
|
|
34443
34496
|
return (_ctx, _cache) => {
|
|
34444
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
34445
|
-
isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
34497
|
+
return openBlock(), createElementBlock("div", _hoisted_1$Q, [
|
|
34498
|
+
isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$B, [
|
|
34446
34499
|
withDirectives(createBaseVNode("input", {
|
|
34447
34500
|
class: "lupa-term-filter",
|
|
34448
34501
|
"data-cy": "lupa-term-filter",
|
|
34449
34502
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
|
|
34450
34503
|
placeholder: _ctx.options.labels.facetFilter
|
|
34451
|
-
}, null, 8, _hoisted_3$
|
|
34504
|
+
}, null, 8, _hoisted_3$r), [
|
|
34452
34505
|
[vModelText, termFilter.value]
|
|
34453
34506
|
])
|
|
34454
34507
|
])) : createCommentVNode("", true),
|
|
34455
34508
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
|
|
34456
|
-
return openBlock(), createBlock(_sfc_main
|
|
34509
|
+
return openBlock(), createBlock(_sfc_main$$, {
|
|
34457
34510
|
key: item.title,
|
|
34458
34511
|
options: _ctx.options,
|
|
34459
34512
|
item,
|
|
@@ -34477,30 +34530,31 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
34477
34530
|
};
|
|
34478
34531
|
}
|
|
34479
34532
|
});
|
|
34480
|
-
const _hoisted_1$
|
|
34481
|
-
const _hoisted_2$
|
|
34533
|
+
const _hoisted_1$P = { class: "lupa-facet-label-text" };
|
|
34534
|
+
const _hoisted_2$A = {
|
|
34482
34535
|
key: 0,
|
|
34483
34536
|
class: "lupa-facet-content",
|
|
34484
34537
|
"data-cy": "lupa-facet-content"
|
|
34485
34538
|
};
|
|
34486
34539
|
const __default__$1 = {
|
|
34487
34540
|
components: {
|
|
34488
|
-
TermFacet: _sfc_main$
|
|
34489
|
-
StatsFacet: _sfc_main$
|
|
34490
|
-
HierarchyFacet: _sfc_main$
|
|
34541
|
+
TermFacet: _sfc_main$11,
|
|
34542
|
+
StatsFacet: _sfc_main$10,
|
|
34543
|
+
HierarchyFacet: _sfc_main$_
|
|
34491
34544
|
}
|
|
34492
34545
|
};
|
|
34493
|
-
const _sfc_main$
|
|
34546
|
+
const _sfc_main$Z = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
|
|
34494
34547
|
__name: "FacetDisplay",
|
|
34495
34548
|
props: {
|
|
34496
34549
|
options: {},
|
|
34497
34550
|
facet: {},
|
|
34498
34551
|
currentFilters: {},
|
|
34499
|
-
clearable: { type: Boolean }
|
|
34552
|
+
clearable: { type: Boolean },
|
|
34553
|
+
currentFacetStyle: {}
|
|
34500
34554
|
},
|
|
34501
|
-
emits: ["select", "clear"],
|
|
34555
|
+
emits: ["select", "clear", "expand"],
|
|
34502
34556
|
setup(__props, { emit: __emit }) {
|
|
34503
|
-
var _a25, _b25
|
|
34557
|
+
var _a25, _b25;
|
|
34504
34558
|
const props = __props;
|
|
34505
34559
|
const facet = computed(() => {
|
|
34506
34560
|
var _a26;
|
|
@@ -34514,17 +34568,17 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
34514
34568
|
const optionsStore = useOptionsStore();
|
|
34515
34569
|
const screenStore = useScreenStore();
|
|
34516
34570
|
const { currentFilterKeys } = storeToRefs(searchResultStore);
|
|
34517
|
-
const { searchResultOptions } = storeToRefs(optionsStore);
|
|
34571
|
+
const { searchResultOptions, expandedFacets } = storeToRefs(optionsStore);
|
|
34518
34572
|
const { isMobileWidth } = storeToRefs(screenStore);
|
|
34519
34573
|
const emit2 = __emit;
|
|
34520
34574
|
const allExpanded = computed(() => {
|
|
34521
|
-
var _a26, _b26,
|
|
34575
|
+
var _a26, _b26, _c, _d, _e, _f;
|
|
34522
34576
|
if (isMobileWidth.value) {
|
|
34523
|
-
return (
|
|
34577
|
+
return (_c = (_b26 = (_a26 = props.options) == null ? void 0 : _a26.expandAll) == null ? void 0 : _b26.mobile) != null ? _c : false;
|
|
34524
34578
|
}
|
|
34525
34579
|
return (_f = (_e = (_d = props.options) == null ? void 0 : _d.expandAll) == null ? void 0 : _e.desktop) != null ? _f : false;
|
|
34526
34580
|
});
|
|
34527
|
-
const isOpen = ref((
|
|
34581
|
+
const isOpen = ref((_b25 = ((_a25 = expandedFacets.value) == null ? void 0 : _a25.includes(props.facet.key)) || allExpanded.value) != null ? _b25 : false);
|
|
34528
34582
|
const facetPanel = ref(null);
|
|
34529
34583
|
const facetType = computed(() => {
|
|
34530
34584
|
switch (facet.value.type) {
|
|
@@ -34566,9 +34620,16 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
34566
34620
|
var _a26;
|
|
34567
34621
|
return getTranslatedFacetKey(props.facet, (_a26 = searchResultOptions.value.filters) == null ? void 0 : _a26.translations);
|
|
34568
34622
|
});
|
|
34623
|
+
const expandSidebarOnFacetClick = computed(() => {
|
|
34624
|
+
var _a26, _b26, _c;
|
|
34625
|
+
if (!props.currentFacetStyle || props.currentFacetStyle === "sidebar") {
|
|
34626
|
+
return false;
|
|
34627
|
+
}
|
|
34628
|
+
return (_c = (_b26 = (_a26 = props.options.style) == null ? void 0 : _a26.drawer) == null ? void 0 : _b26.expandSidebarOnFacetClick) != null ? _c : false;
|
|
34629
|
+
});
|
|
34569
34630
|
onMounted(() => {
|
|
34570
|
-
var _a26;
|
|
34571
|
-
if (((_a26 = props.options.style) == null ? void 0 : _a26.type) === "top-dropdown") {
|
|
34631
|
+
var _a26, _b26, _c;
|
|
34632
|
+
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") {
|
|
34572
34633
|
window.addEventListener("click", handleMouseClick);
|
|
34573
34634
|
}
|
|
34574
34635
|
});
|
|
@@ -34577,7 +34638,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
34577
34638
|
});
|
|
34578
34639
|
const handleMouseClick = (e2) => {
|
|
34579
34640
|
const el = facetPanel.value;
|
|
34580
|
-
if (!el) {
|
|
34641
|
+
if (!el || !props.currentFacetStyle || props.currentFacetStyle === "sidebar") {
|
|
34581
34642
|
return;
|
|
34582
34643
|
}
|
|
34583
34644
|
const isOutsideElement = el && !el.contains(e2.target);
|
|
@@ -34589,6 +34650,11 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
34589
34650
|
handleFacetQueryFilter();
|
|
34590
34651
|
});
|
|
34591
34652
|
const toggleFacet = () => {
|
|
34653
|
+
if (expandSidebarOnFacetClick.value) {
|
|
34654
|
+
expandedFacets.value = [facet.value.key];
|
|
34655
|
+
emit2("expand");
|
|
34656
|
+
return;
|
|
34657
|
+
}
|
|
34592
34658
|
isOpen.value = !isOpen.value;
|
|
34593
34659
|
handleFacetQueryFilter();
|
|
34594
34660
|
};
|
|
@@ -34621,12 +34687,12 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
34621
34687
|
"data-cy": "lupa-search-result-facet-label",
|
|
34622
34688
|
onClick: toggleFacet
|
|
34623
34689
|
}, [
|
|
34624
|
-
createBaseVNode("div", _hoisted_1$
|
|
34690
|
+
createBaseVNode("div", _hoisted_1$P, toDisplayString(facetLabel.value), 1),
|
|
34625
34691
|
createBaseVNode("div", {
|
|
34626
34692
|
class: normalizeClass(["lupa-facet-label-caret", isOpen.value && "open"])
|
|
34627
34693
|
}, null, 2)
|
|
34628
34694
|
], 2),
|
|
34629
|
-
isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
34695
|
+
isOpen.value && !expandSidebarOnFacetClick.value ? (openBlock(), createElementBlock("div", _hoisted_2$A, [
|
|
34630
34696
|
(openBlock(), createBlock(resolveDynamicComponent(facetType.value), {
|
|
34631
34697
|
facet: facet.value,
|
|
34632
34698
|
currentFilters: currentFilters.value[facet.value.key],
|
|
@@ -34644,12 +34710,154 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
34644
34710
|
};
|
|
34645
34711
|
}
|
|
34646
34712
|
}));
|
|
34647
|
-
const
|
|
34648
|
-
const
|
|
34713
|
+
const useSidebarToggle = () => {
|
|
34714
|
+
const searchResultStore = useSearchResultStore();
|
|
34715
|
+
const optionsStore = useOptionsStore();
|
|
34716
|
+
const { currentFilterCount, isFilterSidebarVisible, isSortingSidebarVisible } = storeToRefs(searchResultStore);
|
|
34717
|
+
const { searchResultOptions } = storeToRefs(optionsStore);
|
|
34718
|
+
const labels = computed(() => {
|
|
34719
|
+
return searchResultOptions.value.labels;
|
|
34720
|
+
});
|
|
34721
|
+
const showMobileFilterCount = computed(
|
|
34722
|
+
() => {
|
|
34723
|
+
var _a25, _b25, _c, _d;
|
|
34724
|
+
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;
|
|
34725
|
+
}
|
|
34726
|
+
);
|
|
34727
|
+
const disableMobileBodyScrollLock = computed(
|
|
34728
|
+
() => {
|
|
34729
|
+
var _a25, _b25, _c;
|
|
34730
|
+
return (_c = (_b25 = (_a25 = searchResultOptions.value.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.disableMobileBodyScrollLock) != null ? _c : false;
|
|
34731
|
+
}
|
|
34732
|
+
);
|
|
34733
|
+
const isSidebarVisible = computed(
|
|
34734
|
+
() => isFilterSidebarVisible.value || isSortingSidebarVisible.value
|
|
34735
|
+
);
|
|
34736
|
+
const sortLabel = computed(() => {
|
|
34737
|
+
var _a25, _b25;
|
|
34738
|
+
return (_b25 = (_a25 = searchResultOptions.value) == null ? void 0 : _a25.labels) == null ? void 0 : _b25.sortBy;
|
|
34739
|
+
});
|
|
34740
|
+
const defaultLabel = computed(() => {
|
|
34741
|
+
var _a25;
|
|
34742
|
+
return (_a25 = labels.value) == null ? void 0 : _a25.mobileFilterButton;
|
|
34743
|
+
});
|
|
34744
|
+
const activeLabel = computed(() => {
|
|
34745
|
+
var _a25;
|
|
34746
|
+
return (_a25 = labels.value) == null ? void 0 : _a25.mobileFilterButtonActive;
|
|
34747
|
+
});
|
|
34748
|
+
const openLabel = computed(() => {
|
|
34749
|
+
var _a25;
|
|
34750
|
+
return (_a25 = labels.value) == null ? void 0 : _a25.mobileFilterButtonOpen;
|
|
34751
|
+
});
|
|
34752
|
+
const label = computed(() => {
|
|
34753
|
+
if (isSidebarVisible.value && openLabel.value) {
|
|
34754
|
+
return openLabel.value;
|
|
34755
|
+
}
|
|
34756
|
+
if (hasActiveFilters.value && activeLabel.value) {
|
|
34757
|
+
return activeLabel.value;
|
|
34758
|
+
}
|
|
34759
|
+
return defaultLabel.value;
|
|
34760
|
+
});
|
|
34761
|
+
const sortToggleVisible = computed(() => {
|
|
34762
|
+
var _a25, _b25;
|
|
34763
|
+
return ((_b25 = (_a25 = searchResultOptions.value) == null ? void 0 : _a25.sortStyle) == null ? void 0 : _b25.type) === "drawer";
|
|
34764
|
+
});
|
|
34765
|
+
const handleFilterSidebarToggle = () => {
|
|
34766
|
+
searchResultStore.setSidebarState({
|
|
34767
|
+
visible: !isSidebarVisible.value,
|
|
34768
|
+
disableBodyScrolling: !disableMobileBodyScrollLock.value,
|
|
34769
|
+
sidebar: "filter"
|
|
34770
|
+
});
|
|
34771
|
+
};
|
|
34772
|
+
const handleSortSidebarToggle = () => {
|
|
34773
|
+
searchResultStore.setSidebarState({
|
|
34774
|
+
visible: !isSortingSidebarVisible.value,
|
|
34775
|
+
disableBodyScrolling: !disableMobileBodyScrollLock.value,
|
|
34776
|
+
sidebar: "sorting"
|
|
34777
|
+
});
|
|
34778
|
+
};
|
|
34779
|
+
const hasActiveFilters = computed(() => currentFilterCount.value > 0);
|
|
34780
|
+
const checkCloseOnEscape = (e2) => {
|
|
34781
|
+
var _a25;
|
|
34782
|
+
if (!["Escape", "Esc"].includes((_a25 = e2.key) != null ? _a25 : "")) {
|
|
34783
|
+
return;
|
|
34784
|
+
}
|
|
34785
|
+
if (isSidebarVisible.value) {
|
|
34786
|
+
searchResultStore.setSidebarState({ visible: false, sidebar: "sorting" });
|
|
34787
|
+
searchResultStore.setSidebarState({ visible: false, sidebar: "filter" });
|
|
34788
|
+
}
|
|
34789
|
+
};
|
|
34790
|
+
onMounted(() => {
|
|
34791
|
+
window.addEventListener("keydown", checkCloseOnEscape);
|
|
34792
|
+
});
|
|
34793
|
+
onBeforeUnmount(() => {
|
|
34794
|
+
window.removeEventListener("keydown", checkCloseOnEscape);
|
|
34795
|
+
});
|
|
34796
|
+
return {
|
|
34797
|
+
isSidebarVisible,
|
|
34798
|
+
label,
|
|
34799
|
+
currentFilterCount,
|
|
34800
|
+
hasActiveFilters,
|
|
34801
|
+
showMobileFilterCount,
|
|
34802
|
+
sortLabel,
|
|
34803
|
+
sortToggleVisible,
|
|
34804
|
+
handleFilterSidebarToggle,
|
|
34805
|
+
handleSortSidebarToggle
|
|
34806
|
+
};
|
|
34807
|
+
};
|
|
34808
|
+
const _hoisted_1$O = {
|
|
34809
|
+
key: 0,
|
|
34810
|
+
class: "lupa-desktop-toggle-filter-count"
|
|
34811
|
+
};
|
|
34812
|
+
const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
34813
|
+
__name: "DesktopFacetToggle",
|
|
34814
|
+
setup(__props) {
|
|
34815
|
+
const {
|
|
34816
|
+
isSidebarVisible,
|
|
34817
|
+
label,
|
|
34818
|
+
currentFilterCount,
|
|
34819
|
+
hasActiveFilters,
|
|
34820
|
+
showMobileFilterCount,
|
|
34821
|
+
handleFilterSidebarToggle
|
|
34822
|
+
} = useSidebarToggle();
|
|
34823
|
+
return (_ctx, _cache) => {
|
|
34824
|
+
return openBlock(), createElementBlock("div", {
|
|
34825
|
+
class: normalizeClass(["lupa-desktop-toggle", {
|
|
34826
|
+
"lupa-desktop-toggle-filters-empty": unref(currentFilterCount) < 1,
|
|
34827
|
+
"lupa-desktop-toggle-has-filters": unref(hasActiveFilters),
|
|
34828
|
+
"lupa-sidebar-open": unref(isSidebarVisible)
|
|
34829
|
+
}]),
|
|
34830
|
+
onClick: _cache[0] || (_cache[0] = //@ts-ignore
|
|
34831
|
+
(...args) => unref(handleFilterSidebarToggle) && unref(handleFilterSidebarToggle)(...args))
|
|
34832
|
+
}, [
|
|
34833
|
+
createTextVNode(toDisplayString(unref(label)) + " ", 1),
|
|
34834
|
+
unref(showMobileFilterCount) && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$O, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
34835
|
+
], 2);
|
|
34836
|
+
};
|
|
34837
|
+
}
|
|
34838
|
+
});
|
|
34839
|
+
const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
34840
|
+
__name: "DesktopSortToggle",
|
|
34841
|
+
setup(__props) {
|
|
34842
|
+
const { isSidebarVisible, sortLabel, sortToggleVisible, handleSortSidebarToggle } = useSidebarToggle();
|
|
34843
|
+
return (_ctx, _cache) => {
|
|
34844
|
+
return unref(sortToggleVisible) ? (openBlock(), createElementBlock("div", {
|
|
34845
|
+
key: 0,
|
|
34846
|
+
class: normalizeClass(["lupa-desktop-toggle lupa-desktop-sort-toggle", {
|
|
34847
|
+
"lupa-sidebar-open": unref(isSidebarVisible)
|
|
34848
|
+
}]),
|
|
34849
|
+
onClick: _cache[0] || (_cache[0] = //@ts-ignore
|
|
34850
|
+
(...args) => unref(handleSortSidebarToggle) && unref(handleSortSidebarToggle)(...args))
|
|
34851
|
+
}, toDisplayString(unref(sortLabel)), 3)) : createCommentVNode("", true);
|
|
34852
|
+
};
|
|
34853
|
+
}
|
|
34854
|
+
});
|
|
34855
|
+
const _hoisted_1$N = { class: "lupa-search-result-facet-section" };
|
|
34856
|
+
const _hoisted_2$z = {
|
|
34649
34857
|
key: 0,
|
|
34650
34858
|
class: "lupa-facets-title"
|
|
34651
34859
|
};
|
|
34652
|
-
const _sfc_main$
|
|
34860
|
+
const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
34653
34861
|
__name: "FacetList",
|
|
34654
34862
|
props: {
|
|
34655
34863
|
options: {},
|
|
@@ -34661,6 +34869,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
34661
34869
|
emits: ["select", "clear"],
|
|
34662
34870
|
setup(__props, { emit: __emit }) {
|
|
34663
34871
|
const props = __props;
|
|
34872
|
+
const { handleFilterSidebarToggle } = useSidebarToggle();
|
|
34664
34873
|
const emit2 = __emit;
|
|
34665
34874
|
const currentFiltersValue = computed(() => {
|
|
34666
34875
|
var _a25;
|
|
@@ -34676,6 +34885,12 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
34676
34885
|
return !((_a25 = props.options.exclude) == null ? void 0 : _a25.includes(f2.key));
|
|
34677
34886
|
}) : facetsValue.value;
|
|
34678
34887
|
});
|
|
34888
|
+
const displayFacetStyle = computed(() => {
|
|
34889
|
+
if (!props.facetStyle || props.facetStyle === "sidebar") {
|
|
34890
|
+
return "sidebar";
|
|
34891
|
+
}
|
|
34892
|
+
return "top-dropdown";
|
|
34893
|
+
});
|
|
34679
34894
|
const handleFacetSelect = (facetAction) => {
|
|
34680
34895
|
emit2("select", facetAction);
|
|
34681
34896
|
};
|
|
@@ -34684,29 +34899,33 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
34684
34899
|
};
|
|
34685
34900
|
return (_ctx, _cache) => {
|
|
34686
34901
|
var _a25;
|
|
34687
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
34688
|
-
_ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
34902
|
+
return openBlock(), createElementBlock("div", _hoisted_1$N, [
|
|
34903
|
+
_ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$z, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
|
|
34689
34904
|
createBaseVNode("div", {
|
|
34690
|
-
class: normalizeClass(["lupa-search-result-facet-list", "lupa-" + ((_a25 =
|
|
34905
|
+
class: normalizeClass(["lupa-search-result-facet-list", "lupa-" + ((_a25 = displayFacetStyle.value) != null ? _a25 : "")])
|
|
34691
34906
|
}, [
|
|
34692
34907
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayFacets.value, (facet) => {
|
|
34693
34908
|
var _a26;
|
|
34694
|
-
return openBlock(), createBlock(_sfc_main$
|
|
34909
|
+
return openBlock(), createBlock(_sfc_main$Z, {
|
|
34695
34910
|
key: facet.key,
|
|
34696
34911
|
facet,
|
|
34697
34912
|
currentFilters: currentFiltersValue.value,
|
|
34698
34913
|
options: _ctx.options,
|
|
34699
34914
|
clearable: (_a26 = _ctx.clearable) != null ? _a26 : false,
|
|
34915
|
+
"current-facet-style": _ctx.facetStyle,
|
|
34700
34916
|
onSelect: handleFacetSelect,
|
|
34701
|
-
onClear: clear
|
|
34702
|
-
|
|
34703
|
-
|
|
34917
|
+
onClear: clear,
|
|
34918
|
+
onExpand: unref(handleFilterSidebarToggle)
|
|
34919
|
+
}, null, 8, ["facet", "currentFilters", "options", "clearable", "current-facet-style", "onExpand"]);
|
|
34920
|
+
}), 128)),
|
|
34921
|
+
_ctx.facetStyle === "drawer" ? (openBlock(), createBlock(_sfc_main$Y, { key: 0 })) : createCommentVNode("", true),
|
|
34922
|
+
_ctx.facetStyle === "drawer" || _ctx.facetStyle === "top-dropdown" ? (openBlock(), createBlock(_sfc_main$X, { key: 1 })) : createCommentVNode("", true)
|
|
34704
34923
|
], 2)
|
|
34705
34924
|
]);
|
|
34706
34925
|
};
|
|
34707
34926
|
}
|
|
34708
34927
|
});
|
|
34709
|
-
const _sfc_main$
|
|
34928
|
+
const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
34710
34929
|
__name: "FacetsButton",
|
|
34711
34930
|
props: {
|
|
34712
34931
|
options: {}
|
|
@@ -34731,8 +34950,33 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
34731
34950
|
};
|
|
34732
34951
|
}
|
|
34733
34952
|
});
|
|
34734
|
-
const
|
|
34735
|
-
|
|
34953
|
+
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
34954
|
+
__name: "FacetsClearButton",
|
|
34955
|
+
props: {
|
|
34956
|
+
options: {}
|
|
34957
|
+
},
|
|
34958
|
+
emits: ["clear"],
|
|
34959
|
+
setup(__props, { emit: __emit }) {
|
|
34960
|
+
const props = __props;
|
|
34961
|
+
const emit2 = __emit;
|
|
34962
|
+
const label = computed(() => {
|
|
34963
|
+
var _a25, _b25;
|
|
34964
|
+
return (_b25 = (_a25 = props.options.labels) == null ? void 0 : _a25.facetClearAllButton) != null ? _b25 : "";
|
|
34965
|
+
});
|
|
34966
|
+
const handleClick = () => {
|
|
34967
|
+
emit2("clear");
|
|
34968
|
+
};
|
|
34969
|
+
return (_ctx, _cache) => {
|
|
34970
|
+
return label.value ? (openBlock(), createElementBlock("button", {
|
|
34971
|
+
key: 0,
|
|
34972
|
+
class: "lupa-facets-button-clear",
|
|
34973
|
+
onClick: withModifiers(handleClick, ["stop"])
|
|
34974
|
+
}, toDisplayString(label.value), 1)) : createCommentVNode("", true);
|
|
34975
|
+
};
|
|
34976
|
+
}
|
|
34977
|
+
});
|
|
34978
|
+
const _hoisted_1$M = { class: "lupa-facets-filter-button-wrapper" };
|
|
34979
|
+
const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
34736
34980
|
__name: "Facets",
|
|
34737
34981
|
props: {
|
|
34738
34982
|
options: {},
|
|
@@ -34745,6 +34989,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
34745
34989
|
const paramStore = useParamsStore();
|
|
34746
34990
|
const searchResultStore = useSearchResultStore();
|
|
34747
34991
|
const optionsStore = useOptionsStore();
|
|
34992
|
+
const { handleFilterSidebarToggle } = useSidebarToggle();
|
|
34748
34993
|
const { filters } = storeToRefs(paramStore);
|
|
34749
34994
|
const { facets: facets2, loadingFacets } = storeToRefs(searchResultStore);
|
|
34750
34995
|
const { searchResultOptions } = storeToRefs(optionsStore);
|
|
@@ -34772,7 +35017,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
34772
35017
|
};
|
|
34773
35018
|
});
|
|
34774
35019
|
const showFilterButton = computed(() => {
|
|
34775
|
-
return props.options.filterBehavior === "withFilterButton";
|
|
35020
|
+
return props.options.filterBehavior === "withFilterButton" && props.facetStyle === "sidebar";
|
|
34776
35021
|
});
|
|
34777
35022
|
const handleFacetSelect = (facetAction) => {
|
|
34778
35023
|
switch (facetAction.type) {
|
|
@@ -34793,16 +35038,25 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
34793
35038
|
filters.value
|
|
34794
35039
|
);
|
|
34795
35040
|
break;
|
|
34796
|
-
case "
|
|
34797
|
-
|
|
35041
|
+
case "partialRange":
|
|
35042
|
+
toggleRangeFilter(
|
|
34798
35043
|
paramStore.appendParams,
|
|
35044
|
+
paramStore.removeParameters,
|
|
34799
35045
|
facetAction,
|
|
34800
35046
|
optionsStore.getQueryParamName,
|
|
34801
35047
|
filters.value
|
|
34802
35048
|
);
|
|
34803
35049
|
break;
|
|
34804
|
-
|
|
34805
|
-
|
|
35050
|
+
case "hierarchy":
|
|
35051
|
+
toggleHierarchyFilter(
|
|
35052
|
+
paramStore.appendParams,
|
|
35053
|
+
facetAction,
|
|
35054
|
+
optionsStore.getQueryParamName,
|
|
35055
|
+
filters.value
|
|
35056
|
+
);
|
|
35057
|
+
break;
|
|
35058
|
+
}
|
|
35059
|
+
if (scrollToResultsOptions.value.enabled) {
|
|
34806
35060
|
scrollToSearchResults(
|
|
34807
35061
|
scrollToResultsOptions.value.timeout,
|
|
34808
35062
|
scrollToResultsOptions.value.container
|
|
@@ -34810,8 +35064,18 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
34810
35064
|
}
|
|
34811
35065
|
};
|
|
34812
35066
|
const clear = (facet) => {
|
|
34813
|
-
|
|
34814
|
-
|
|
35067
|
+
if (facet.type === "range") {
|
|
35068
|
+
paramStore.removeParameters({
|
|
35069
|
+
paramsToRemove: [getFacetKey(facet.key, "range"), getFacetKey(facet.key, "partialRange")]
|
|
35070
|
+
});
|
|
35071
|
+
} else {
|
|
35072
|
+
const param = getFacetKey(facet.key, facet.type);
|
|
35073
|
+
paramStore.removeParameters({ paramsToRemove: [param] });
|
|
35074
|
+
}
|
|
35075
|
+
};
|
|
35076
|
+
const clearAll = () => {
|
|
35077
|
+
paramStore.removeAllFilters();
|
|
35078
|
+
handleFilterSidebarToggle();
|
|
34815
35079
|
};
|
|
34816
35080
|
const filter = () => {
|
|
34817
35081
|
emit2("filter");
|
|
@@ -34820,7 +35084,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
34820
35084
|
return openBlock(), createElementBlock("div", {
|
|
34821
35085
|
class: normalizeClass(["lupa-search-result-facets", { "lupa-search-result-facets-loading": unref(loadingFacets) }])
|
|
34822
35086
|
}, [
|
|
34823
|
-
regularFacets.value ? (openBlock(), createBlock(_sfc_main$
|
|
35087
|
+
regularFacets.value ? (openBlock(), createBlock(_sfc_main$W, {
|
|
34824
35088
|
key: 0,
|
|
34825
35089
|
options: _ctx.options,
|
|
34826
35090
|
facets: regularFacets.value,
|
|
@@ -34830,10 +35094,15 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
34830
35094
|
onSelect: handleFacetSelect,
|
|
34831
35095
|
onClear: clear
|
|
34832
35096
|
}, null, 8, ["options", "facets", "currentFilters", "facetStyle", "clearable"])) : createCommentVNode("", true),
|
|
34833
|
-
createBaseVNode("div", _hoisted_1$
|
|
34834
|
-
showFilterButton.value ? (openBlock(), createBlock(_sfc_main$
|
|
35097
|
+
createBaseVNode("div", _hoisted_1$M, [
|
|
35098
|
+
showFilterButton.value ? (openBlock(), createBlock(_sfc_main$U, {
|
|
34835
35099
|
key: 0,
|
|
34836
35100
|
options: _ctx.options,
|
|
35101
|
+
onClear: clearAll
|
|
35102
|
+
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
35103
|
+
showFilterButton.value ? (openBlock(), createBlock(_sfc_main$V, {
|
|
35104
|
+
key: 1,
|
|
35105
|
+
options: _ctx.options,
|
|
34837
35106
|
onFilter: filter
|
|
34838
35107
|
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
34839
35108
|
])
|
|
@@ -34841,16 +35110,17 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
34841
35110
|
};
|
|
34842
35111
|
}
|
|
34843
35112
|
});
|
|
34844
|
-
const _hoisted_1$
|
|
35113
|
+
const _hoisted_1$L = {
|
|
34845
35114
|
key: 0,
|
|
34846
35115
|
id: "lupa-search-result-filters",
|
|
34847
35116
|
class: "lupa-search-result-filters"
|
|
34848
35117
|
};
|
|
34849
|
-
const _sfc_main$
|
|
35118
|
+
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
34850
35119
|
__name: "SearchResultsFilters",
|
|
34851
35120
|
props: {
|
|
34852
35121
|
options: {},
|
|
34853
|
-
expandable: { type: Boolean }
|
|
35122
|
+
expandable: { type: Boolean },
|
|
35123
|
+
style: {}
|
|
34854
35124
|
},
|
|
34855
35125
|
emits: ["filter"],
|
|
34856
35126
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -34884,40 +35154,37 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
34884
35154
|
__expose({ fetch: fetch2 });
|
|
34885
35155
|
return (_ctx, _cache) => {
|
|
34886
35156
|
var _a25;
|
|
34887
|
-
return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
34888
|
-
showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$
|
|
35157
|
+
return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$L, [
|
|
35158
|
+
showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$14, {
|
|
34889
35159
|
key: 0,
|
|
34890
35160
|
options: _ctx.options.currentFilters,
|
|
34891
35161
|
expandable: (_a25 = _ctx.expandable) != null ? _a25 : false
|
|
34892
35162
|
}, null, 8, ["options", "expandable"])) : createCommentVNode("", true),
|
|
34893
|
-
_ctx.options.categories ? (openBlock(), createBlock(_sfc_main$
|
|
35163
|
+
_ctx.options.categories ? (openBlock(), createBlock(_sfc_main$12, {
|
|
34894
35164
|
key: 1,
|
|
34895
35165
|
options: _ctx.options.categories,
|
|
34896
35166
|
ref_key: "categoryFilters",
|
|
34897
35167
|
ref: categoryFilters
|
|
34898
35168
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
34899
|
-
_ctx.options.facets ? (openBlock(), createBlock(_sfc_main$
|
|
35169
|
+
_ctx.options.facets ? (openBlock(), createBlock(_sfc_main$T, {
|
|
34900
35170
|
key: 2,
|
|
34901
35171
|
options: _ctx.options.facets,
|
|
35172
|
+
"facet-style": _ctx.style,
|
|
34902
35173
|
onFilter: filter
|
|
34903
|
-
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
35174
|
+
}, null, 8, ["options", "facet-style"])) : createCommentVNode("", true)
|
|
34904
35175
|
])) : createCommentVNode("", true);
|
|
34905
35176
|
};
|
|
34906
35177
|
}
|
|
34907
35178
|
});
|
|
34908
|
-
const _hoisted_1$
|
|
34909
|
-
|
|
34910
|
-
|
|
34911
|
-
|
|
34912
|
-
const _hoisted_2$w = { class: "lupa-mobile-sidebar-content" };
|
|
34913
|
-
const _hoisted_3$o = { class: "lupa-sidebar-top" };
|
|
34914
|
-
const _hoisted_4$g = { class: "lupa-sidebar-title" };
|
|
34915
|
-
const _hoisted_5$b = {
|
|
35179
|
+
const _hoisted_1$K = { class: "lupa-mobile-sidebar-content" };
|
|
35180
|
+
const _hoisted_2$y = { class: "lupa-sidebar-top" };
|
|
35181
|
+
const _hoisted_3$q = { class: "lupa-sidebar-title" };
|
|
35182
|
+
const _hoisted_4$i = {
|
|
34916
35183
|
key: 0,
|
|
34917
35184
|
class: "lupa-sidebar-filter-count"
|
|
34918
35185
|
};
|
|
34919
|
-
const
|
|
34920
|
-
const _sfc_main$
|
|
35186
|
+
const _hoisted_5$c = { class: "lupa-sidebar-filter-options" };
|
|
35187
|
+
const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
34921
35188
|
__name: "MobileFilterSidebar",
|
|
34922
35189
|
props: {
|
|
34923
35190
|
options: {}
|
|
@@ -34926,7 +35193,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
34926
35193
|
setup(__props, { emit: __emit }) {
|
|
34927
35194
|
const props = __props;
|
|
34928
35195
|
const searchResultStore = useSearchResultStore();
|
|
34929
|
-
const { currentFilterCount } = storeToRefs(searchResultStore);
|
|
35196
|
+
const { currentFilterCount, isFilterSidebarVisible, isSidebarClosing } = storeToRefs(searchResultStore);
|
|
34930
35197
|
const emit2 = __emit;
|
|
34931
35198
|
const sidebarTitle = computed(() => {
|
|
34932
35199
|
var _a25, _b25, _c;
|
|
@@ -34936,7 +35203,6 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
34936
35203
|
var _a25, _b25;
|
|
34937
35204
|
return Boolean((_b25 = (_a25 = props.options.currentFilters) == null ? void 0 : _a25.mobileSidebar) == null ? void 0 : _b25.showFilterCount) && currentFilterCount.value > 0;
|
|
34938
35205
|
});
|
|
34939
|
-
const isMobileSidebarVisible = computed(() => searchResultStore.isMobileSidebarVisible);
|
|
34940
35206
|
const isActiveFiltersExpanded = computed(() => {
|
|
34941
35207
|
var _a25, _b25;
|
|
34942
35208
|
return !((_b25 = (_a25 = props.options.currentFilters) == null ? void 0 : _a25.mobileSidebar) == null ? void 0 : _b25.activeFiltersExpanded);
|
|
@@ -34949,42 +35215,46 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
34949
35215
|
handleMobileToggle();
|
|
34950
35216
|
};
|
|
34951
35217
|
return (_ctx, _cache) => {
|
|
34952
|
-
return
|
|
35218
|
+
return unref(isFilterSidebarVisible) ? (openBlock(), createElementBlock("div", {
|
|
35219
|
+
key: 0,
|
|
35220
|
+
class: normalizeClass(["lupa-mobile-filter-sidebar", { "lupa-mobile-filter-sidebar-is-closing": unref(isSidebarClosing) }])
|
|
35221
|
+
}, [
|
|
34953
35222
|
createBaseVNode("div", {
|
|
34954
35223
|
class: "lupa-sidebar-close",
|
|
34955
35224
|
onClick: withModifiers(handleMobileToggle, ["stop"])
|
|
34956
35225
|
}),
|
|
34957
|
-
createBaseVNode("div",
|
|
34958
|
-
createBaseVNode("div",
|
|
34959
|
-
createBaseVNode("div",
|
|
35226
|
+
createBaseVNode("div", _hoisted_1$K, [
|
|
35227
|
+
createBaseVNode("div", _hoisted_2$y, [
|
|
35228
|
+
createBaseVNode("div", _hoisted_3$q, [
|
|
34960
35229
|
createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
|
|
34961
|
-
isFilterCountVisible.value ? (openBlock(), createElementBlock("span",
|
|
35230
|
+
isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_4$i, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
34962
35231
|
]),
|
|
34963
35232
|
createBaseVNode("div", {
|
|
34964
35233
|
class: "lupa-filter-toggle-mobile",
|
|
34965
35234
|
onClick: handleMobileToggle
|
|
34966
35235
|
})
|
|
34967
35236
|
]),
|
|
34968
|
-
createBaseVNode("div",
|
|
34969
|
-
createVNode(_sfc_main$
|
|
35237
|
+
createBaseVNode("div", _hoisted_5$c, [
|
|
35238
|
+
createVNode(_sfc_main$S, {
|
|
34970
35239
|
options: _ctx.options,
|
|
34971
35240
|
expandable: isActiveFiltersExpanded.value,
|
|
35241
|
+
style: "sidebar",
|
|
34972
35242
|
onFilter: filter
|
|
34973
35243
|
}, null, 8, ["options", "expandable"])
|
|
34974
35244
|
])
|
|
34975
35245
|
])
|
|
34976
|
-
])) : createCommentVNode("", true);
|
|
35246
|
+
], 2)) : createCommentVNode("", true);
|
|
34977
35247
|
};
|
|
34978
35248
|
}
|
|
34979
35249
|
});
|
|
34980
|
-
const _hoisted_1$
|
|
34981
|
-
const _hoisted_2$
|
|
34982
|
-
const _hoisted_3$
|
|
35250
|
+
const _hoisted_1$J = { id: "lupa-search-results-breadcrumbs" };
|
|
35251
|
+
const _hoisted_2$x = ["href", "onClick"];
|
|
35252
|
+
const _hoisted_3$p = {
|
|
34983
35253
|
key: 1,
|
|
34984
35254
|
class: "lupa-search-results-breadcrumb-text"
|
|
34985
35255
|
};
|
|
34986
|
-
const _hoisted_4$
|
|
34987
|
-
const _sfc_main$
|
|
35256
|
+
const _hoisted_4$h = { key: 2 };
|
|
35257
|
+
const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
34988
35258
|
__name: "SearchResultsBreadcrumbs",
|
|
34989
35259
|
props: {
|
|
34990
35260
|
breadcrumbs: {}
|
|
@@ -35009,7 +35279,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
35009
35279
|
handleRoutingEvent(link, event, hasEventRouting.value);
|
|
35010
35280
|
};
|
|
35011
35281
|
return (_ctx, _cache) => {
|
|
35012
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
35282
|
+
return openBlock(), createElementBlock("div", _hoisted_1$J, [
|
|
35013
35283
|
(openBlock(true), createElementBlock(Fragment, null, renderList(breadcrumbsValue.value, (breadcrumb, index) => {
|
|
35014
35284
|
var _a25;
|
|
35015
35285
|
return openBlock(), createElementBlock("span", {
|
|
@@ -35024,20 +35294,20 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
35024
35294
|
var _a26;
|
|
35025
35295
|
return handleNavigation(e2, (_a26 = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a26 : "");
|
|
35026
35296
|
}
|
|
35027
|
-
}, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$
|
|
35028
|
-
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
35297
|
+
}, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$x)) : (openBlock(), createElementBlock("span", _hoisted_3$p, toDisplayString(getLabel(breadcrumb.label)), 1)),
|
|
35298
|
+
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$h, toDisplayString((_a25 = breadcrumb.separator) != null ? _a25 : "/"), 1)) : createCommentVNode("", true)
|
|
35029
35299
|
]);
|
|
35030
35300
|
}), 128))
|
|
35031
35301
|
]);
|
|
35032
35302
|
};
|
|
35033
35303
|
}
|
|
35034
35304
|
});
|
|
35035
|
-
const _hoisted_1$
|
|
35305
|
+
const _hoisted_1$I = {
|
|
35036
35306
|
key: 0,
|
|
35037
35307
|
id: "lupa-search-result-filters",
|
|
35038
35308
|
class: "lupa-search-result-filters lupa-search-result-top-filters"
|
|
35039
35309
|
};
|
|
35040
|
-
const _sfc_main$
|
|
35310
|
+
const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
35041
35311
|
__name: "FiltersTopDropdown",
|
|
35042
35312
|
props: {
|
|
35043
35313
|
options: {}
|
|
@@ -35055,8 +35325,8 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
35055
35325
|
});
|
|
35056
35326
|
return (_ctx, _cache) => {
|
|
35057
35327
|
var _a25;
|
|
35058
|
-
return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
35059
|
-
_ctx.options.facets ? (openBlock(), createBlock(_sfc_main$
|
|
35328
|
+
return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$I, [
|
|
35329
|
+
_ctx.options.facets ? (openBlock(), createBlock(_sfc_main$T, {
|
|
35060
35330
|
key: 0,
|
|
35061
35331
|
options: _ctx.options.facets,
|
|
35062
35332
|
"facet-style": (_a25 = _ctx.options.facets.style) == null ? void 0 : _a25.type,
|
|
@@ -35067,8 +35337,8 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
35067
35337
|
};
|
|
35068
35338
|
}
|
|
35069
35339
|
});
|
|
35070
|
-
const _hoisted_1$
|
|
35071
|
-
const _sfc_main$
|
|
35340
|
+
const _hoisted_1$H = { id: "lupa-search-results-layout-selection" };
|
|
35341
|
+
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
35072
35342
|
__name: "SearchResultsLayoutSelection",
|
|
35073
35343
|
setup(__props) {
|
|
35074
35344
|
const searchResultStore = useSearchResultStore();
|
|
@@ -35079,7 +35349,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
35079
35349
|
searchResultStore.setLayout(layout2);
|
|
35080
35350
|
};
|
|
35081
35351
|
return (_ctx, _cache) => {
|
|
35082
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
35352
|
+
return openBlock(), createElementBlock("div", _hoisted_1$H, [
|
|
35083
35353
|
createBaseVNode("div", {
|
|
35084
35354
|
class: normalizeClass([
|
|
35085
35355
|
"lupa-layout-selection-grid",
|
|
@@ -35101,64 +35371,38 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
35101
35371
|
};
|
|
35102
35372
|
}
|
|
35103
35373
|
});
|
|
35104
|
-
const _hoisted_1$
|
|
35374
|
+
const _hoisted_1$G = {
|
|
35105
35375
|
key: 0,
|
|
35106
35376
|
class: "lupa-mobile-toggle-filter-count"
|
|
35107
35377
|
};
|
|
35108
|
-
const _sfc_main$
|
|
35378
|
+
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
35109
35379
|
__name: "SearchResultsMobileToggle",
|
|
35110
|
-
props: {
|
|
35111
|
-
labels: {},
|
|
35112
|
-
showFilterCount: { type: Boolean }
|
|
35113
|
-
},
|
|
35114
35380
|
setup(__props) {
|
|
35115
|
-
const
|
|
35116
|
-
|
|
35117
|
-
|
|
35118
|
-
|
|
35119
|
-
|
|
35120
|
-
|
|
35121
|
-
|
|
35122
|
-
|
|
35123
|
-
return (_c = (_b25 = (_a25 = searchResultOptions.value.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.disableMobileBodyScrollLock) != null ? _c : false;
|
|
35124
|
-
}
|
|
35125
|
-
);
|
|
35126
|
-
const isSidebarVisible = computed(() => isMobileSidebarVisible.value);
|
|
35127
|
-
const defaultLabel = computed(() => props.labels.mobileFilterButton);
|
|
35128
|
-
const activeLabel = computed(() => props.labels.mobileFilterButtonActive);
|
|
35129
|
-
const openLabel = computed(() => props.labels.mobileFilterButtonOpen);
|
|
35130
|
-
const label = computed(() => {
|
|
35131
|
-
if (isSidebarVisible.value && openLabel.value) {
|
|
35132
|
-
return openLabel.value;
|
|
35133
|
-
}
|
|
35134
|
-
if (hasActiveFilters.value && activeLabel.value) {
|
|
35135
|
-
return activeLabel.value;
|
|
35136
|
-
}
|
|
35137
|
-
return defaultLabel.value;
|
|
35138
|
-
});
|
|
35139
|
-
const handleMobileToggle = () => {
|
|
35140
|
-
searchResultStore.setSidebarState({
|
|
35141
|
-
visible: !isSidebarVisible.value,
|
|
35142
|
-
disableBodyScrolling: !disableMobileBodyScrollLock.value
|
|
35143
|
-
});
|
|
35144
|
-
};
|
|
35145
|
-
const hasActiveFilters = computed(() => currentFilterCount.value > 0);
|
|
35381
|
+
const {
|
|
35382
|
+
isSidebarVisible,
|
|
35383
|
+
label,
|
|
35384
|
+
currentFilterCount,
|
|
35385
|
+
hasActiveFilters,
|
|
35386
|
+
showMobileFilterCount,
|
|
35387
|
+
handleFilterSidebarToggle
|
|
35388
|
+
} = useSidebarToggle();
|
|
35146
35389
|
return (_ctx, _cache) => {
|
|
35147
35390
|
return openBlock(), createElementBlock("div", {
|
|
35148
35391
|
class: normalizeClass(["lupa-mobile-toggle", {
|
|
35149
35392
|
"lupa-mobile-toggle-filters-empty": unref(currentFilterCount) < 1,
|
|
35150
|
-
"lupa-mobile-toggle-has-filters": hasActiveFilters
|
|
35151
|
-
"lupa-sidebar-open": isSidebarVisible
|
|
35393
|
+
"lupa-mobile-toggle-has-filters": unref(hasActiveFilters),
|
|
35394
|
+
"lupa-sidebar-open": unref(isSidebarVisible)
|
|
35152
35395
|
}]),
|
|
35153
|
-
onClick:
|
|
35396
|
+
onClick: _cache[0] || (_cache[0] = //@ts-ignore
|
|
35397
|
+
(...args) => unref(handleFilterSidebarToggle) && unref(handleFilterSidebarToggle)(...args))
|
|
35154
35398
|
}, [
|
|
35155
|
-
createTextVNode(toDisplayString(label
|
|
35156
|
-
|
|
35399
|
+
createTextVNode(toDisplayString(unref(label)) + " ", 1),
|
|
35400
|
+
unref(showMobileFilterCount) && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$G, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
35157
35401
|
], 2);
|
|
35158
35402
|
};
|
|
35159
35403
|
}
|
|
35160
35404
|
});
|
|
35161
|
-
const _sfc_main$
|
|
35405
|
+
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
35162
35406
|
__name: "SearchResultsMobileFilterClose",
|
|
35163
35407
|
props: {
|
|
35164
35408
|
label: {}
|
|
@@ -35178,20 +35422,20 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
35178
35422
|
};
|
|
35179
35423
|
}
|
|
35180
35424
|
});
|
|
35181
|
-
const _hoisted_1$
|
|
35425
|
+
const _hoisted_1$F = {
|
|
35182
35426
|
key: 0,
|
|
35183
35427
|
id: "lupa-search-results-page-select",
|
|
35184
35428
|
"data-cy": "lupa-search-results-page-select"
|
|
35185
35429
|
};
|
|
35186
|
-
const _hoisted_2$
|
|
35430
|
+
const _hoisted_2$w = {
|
|
35187
35431
|
key: 0,
|
|
35188
35432
|
class: "lupa-page-number-separator"
|
|
35189
35433
|
};
|
|
35190
|
-
const _hoisted_3$
|
|
35434
|
+
const _hoisted_3$o = {
|
|
35191
35435
|
key: 0,
|
|
35192
35436
|
class: "lupa-page-number-separator"
|
|
35193
35437
|
};
|
|
35194
|
-
const _sfc_main$
|
|
35438
|
+
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
35195
35439
|
__name: "SearchResultsPageSelect",
|
|
35196
35440
|
props: {
|
|
35197
35441
|
lastPageLabel: {},
|
|
@@ -35286,7 +35530,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
35286
35530
|
};
|
|
35287
35531
|
return (_ctx, _cache) => {
|
|
35288
35532
|
var _a25;
|
|
35289
|
-
return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
35533
|
+
return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$F, [
|
|
35290
35534
|
showBack.value ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35291
35535
|
key: 0,
|
|
35292
35536
|
class: normalizeClass(firstPageLabel.value === "<" ? "lupa-page-arrow" : "lupa-show-less"),
|
|
@@ -35310,7 +35554,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
35310
35554
|
_: 1,
|
|
35311
35555
|
__: [4]
|
|
35312
35556
|
}, 8, ["href"])),
|
|
35313
|
-
showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
35557
|
+
showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$w, "...")) : createCommentVNode("", true)
|
|
35314
35558
|
], 64)) : createCommentVNode("", true),
|
|
35315
35559
|
(openBlock(true), createElementBlock(Fragment, null, renderList(pages.value, (page) => {
|
|
35316
35560
|
return openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
@@ -35330,7 +35574,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
35330
35574
|
}, 1032, ["href", "onClick", "class"]);
|
|
35331
35575
|
}), 128)),
|
|
35332
35576
|
showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
35333
|
-
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
35577
|
+
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_3$o, "...")) : createCommentVNode("", true),
|
|
35334
35578
|
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35335
35579
|
href: getHref((_a25 = lastPage.value) != null ? _a25 : 1),
|
|
35336
35580
|
class: "lupa-page-number lupa-page-number-last",
|
|
@@ -35361,18 +35605,18 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
35361
35605
|
};
|
|
35362
35606
|
}
|
|
35363
35607
|
});
|
|
35364
|
-
const _hoisted_1$
|
|
35608
|
+
const _hoisted_1$E = {
|
|
35365
35609
|
id: "lupa-search-results-page-size",
|
|
35366
35610
|
"data-cy": "lupa-search-results-page-size"
|
|
35367
35611
|
};
|
|
35368
|
-
const _hoisted_2$
|
|
35369
|
-
const _hoisted_3$
|
|
35612
|
+
const _hoisted_2$v = { id: "lupa-select" };
|
|
35613
|
+
const _hoisted_3$n = {
|
|
35370
35614
|
class: "lupa-select-label",
|
|
35371
35615
|
for: "lupa-page-size-select-dropdown"
|
|
35372
35616
|
};
|
|
35373
|
-
const _hoisted_4$
|
|
35374
|
-
const _hoisted_5$
|
|
35375
|
-
const _sfc_main$
|
|
35617
|
+
const _hoisted_4$g = ["aria-label"];
|
|
35618
|
+
const _hoisted_5$b = ["value"];
|
|
35619
|
+
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
35376
35620
|
__name: "SearchResultsPageSize",
|
|
35377
35621
|
props: {
|
|
35378
35622
|
labels: {},
|
|
@@ -35402,9 +35646,9 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
35402
35646
|
};
|
|
35403
35647
|
return (_ctx, _cache) => {
|
|
35404
35648
|
var _a25, _b25, _c;
|
|
35405
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
35406
|
-
createBaseVNode("div", _hoisted_2$
|
|
35407
|
-
createBaseVNode("label", _hoisted_3$
|
|
35649
|
+
return openBlock(), createElementBlock("div", _hoisted_1$E, [
|
|
35650
|
+
createBaseVNode("div", _hoisted_2$v, [
|
|
35651
|
+
createBaseVNode("label", _hoisted_3$n, toDisplayString(label.value), 1),
|
|
35408
35652
|
createBaseVNode("select", {
|
|
35409
35653
|
id: "lupa-page-size-select-dropdown",
|
|
35410
35654
|
class: "lupa-select-dropdown",
|
|
@@ -35418,110 +35662,161 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
35418
35662
|
return openBlock(), createElementBlock("option", {
|
|
35419
35663
|
key: option,
|
|
35420
35664
|
value: option
|
|
35421
|
-
}, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$
|
|
35665
|
+
}, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$b);
|
|
35422
35666
|
}), 128))
|
|
35423
|
-
], 40, _hoisted_4$
|
|
35667
|
+
], 40, _hoisted_4$g)
|
|
35424
35668
|
])
|
|
35425
35669
|
]);
|
|
35426
35670
|
};
|
|
35427
35671
|
}
|
|
35428
35672
|
});
|
|
35429
|
-
const
|
|
35673
|
+
const useSorting = () => {
|
|
35674
|
+
const paramStore = useParamsStore();
|
|
35675
|
+
const optionStore = useOptionsStore();
|
|
35676
|
+
const { sort } = storeToRefs(paramStore);
|
|
35677
|
+
const { ariaLabels, searchResultOptions } = storeToRefs(optionStore);
|
|
35678
|
+
const selectedKey = ref("");
|
|
35679
|
+
const previousKey = ref("");
|
|
35680
|
+
const sortStyle = computed(() => {
|
|
35681
|
+
return searchResultOptions.value.sortStyle;
|
|
35682
|
+
});
|
|
35683
|
+
const sortOptions = computed(() => {
|
|
35684
|
+
return searchResultOptions.value.sort;
|
|
35685
|
+
});
|
|
35686
|
+
const callbacks = computed(() => {
|
|
35687
|
+
return searchResultOptions.value.callbacks;
|
|
35688
|
+
});
|
|
35689
|
+
const sotyByTitleLabel = computed(() => {
|
|
35690
|
+
var _a25;
|
|
35691
|
+
return (_a25 = searchResultOptions.value.labels) == null ? void 0 : _a25.sortBy;
|
|
35692
|
+
});
|
|
35693
|
+
const sortItems = computed(() => {
|
|
35694
|
+
if (sortOptions.value && sortOptions.value.length) {
|
|
35695
|
+
return sortOptions.value;
|
|
35696
|
+
} else {
|
|
35697
|
+
return [];
|
|
35698
|
+
}
|
|
35699
|
+
});
|
|
35700
|
+
const defaultSortValue = computed(() => {
|
|
35701
|
+
var _a25, _b25, _c;
|
|
35702
|
+
return (_c = (_a25 = sortOptions.value) == null ? void 0 : _a25.find((x) => x.default)) != null ? _c : (_b25 = sortItems.value) == null ? void 0 : _b25[0];
|
|
35703
|
+
});
|
|
35704
|
+
const setSortValue = () => {
|
|
35705
|
+
var _a25, _b25;
|
|
35706
|
+
const optionToSelect = (_a25 = sortItems.value.find((x) => x.key === sort.value)) == null ? void 0 : _a25.key;
|
|
35707
|
+
selectedKey.value = optionToSelect != null ? optionToSelect : (_b25 = defaultSortValue.value) == null ? void 0 : _b25.key;
|
|
35708
|
+
previousKey.value = selectedKey.value;
|
|
35709
|
+
};
|
|
35710
|
+
watch(sort, () => setSortValue());
|
|
35711
|
+
const handleSelect = () => {
|
|
35712
|
+
var _a25, _b25, _c;
|
|
35713
|
+
const value = (_a25 = sortItems.value.find((x) => x.key === selectedKey.value)) == null ? void 0 : _a25.key;
|
|
35714
|
+
if (!value) {
|
|
35715
|
+
return;
|
|
35716
|
+
}
|
|
35717
|
+
paramStore.setSortSettings({ selectedSortKey: value, previousSortKey: previousKey.value });
|
|
35718
|
+
(_c = (_b25 = callbacks.value) == null ? void 0 : _b25.onSortChange) == null ? void 0 : _c.call(_b25, { selectedSortKey: value, previousSortKey: previousKey.value });
|
|
35719
|
+
paramStore.appendParams({
|
|
35720
|
+
params: [{ name: optionStore.getQueryParamName(QUERY_PARAMS$1.SORT), value }],
|
|
35721
|
+
paramsToRemove: [optionStore.getQueryParamName(QUERY_PARAMS$1.PAGE)]
|
|
35722
|
+
});
|
|
35723
|
+
previousKey.value = selectedKey.value;
|
|
35724
|
+
};
|
|
35725
|
+
return {
|
|
35726
|
+
sotyByTitleLabel,
|
|
35727
|
+
sortItems,
|
|
35728
|
+
selectedKey,
|
|
35729
|
+
ariaLabels,
|
|
35730
|
+
sortOptions,
|
|
35731
|
+
sortStyle,
|
|
35732
|
+
handleSelect,
|
|
35733
|
+
setSortValue
|
|
35734
|
+
};
|
|
35735
|
+
};
|
|
35736
|
+
const _hoisted_1$D = {
|
|
35737
|
+
key: 0,
|
|
35430
35738
|
id: "lupa-search-results-sort",
|
|
35431
35739
|
class: "lupa-search-results-sort"
|
|
35432
35740
|
};
|
|
35433
|
-
const _hoisted_2$
|
|
35434
|
-
const _hoisted_3$
|
|
35741
|
+
const _hoisted_2$u = { id: "lupa-select" };
|
|
35742
|
+
const _hoisted_3$m = {
|
|
35435
35743
|
class: "lupa-select-label",
|
|
35436
35744
|
for: "lupa-sort-select-dropdown"
|
|
35437
35745
|
};
|
|
35438
|
-
const _hoisted_4$
|
|
35439
|
-
const _hoisted_5$
|
|
35440
|
-
const _sfc_main$
|
|
35746
|
+
const _hoisted_4$f = ["aria-label"];
|
|
35747
|
+
const _hoisted_5$a = ["value"];
|
|
35748
|
+
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
35441
35749
|
__name: "SearchResultsSort",
|
|
35442
|
-
props: {
|
|
35443
|
-
options: {},
|
|
35444
|
-
callbacks: {}
|
|
35445
|
-
},
|
|
35446
35750
|
setup(__props) {
|
|
35447
|
-
const
|
|
35448
|
-
|
|
35449
|
-
|
|
35450
|
-
|
|
35451
|
-
|
|
35452
|
-
|
|
35453
|
-
|
|
35454
|
-
|
|
35455
|
-
|
|
35456
|
-
return props.options.options;
|
|
35457
|
-
} else {
|
|
35458
|
-
return [];
|
|
35459
|
-
}
|
|
35460
|
-
});
|
|
35461
|
-
const defaultSortValue = computed(() => {
|
|
35462
|
-
var _a25;
|
|
35463
|
-
return (_a25 = props.options.options.find((x) => x.default)) != null ? _a25 : props.options.options[0];
|
|
35464
|
-
});
|
|
35465
|
-
const setSortValue = () => {
|
|
35466
|
-
var _a25, _b25;
|
|
35467
|
-
const optionToSelect = (_a25 = sortItems.value.find((x) => x.key === sort.value)) == null ? void 0 : _a25.key;
|
|
35468
|
-
selectedKey.value = optionToSelect != null ? optionToSelect : (_b25 = defaultSortValue.value) == null ? void 0 : _b25.key;
|
|
35469
|
-
previousKey.value = selectedKey.value;
|
|
35470
|
-
};
|
|
35471
|
-
watch(sort, () => setSortValue());
|
|
35751
|
+
const {
|
|
35752
|
+
sortItems,
|
|
35753
|
+
selectedKey,
|
|
35754
|
+
ariaLabels,
|
|
35755
|
+
sotyByTitleLabel,
|
|
35756
|
+
sortStyle,
|
|
35757
|
+
handleSelect,
|
|
35758
|
+
setSortValue
|
|
35759
|
+
} = useSorting();
|
|
35472
35760
|
onMounted(() => {
|
|
35473
35761
|
setSortValue();
|
|
35474
35762
|
});
|
|
35475
|
-
const
|
|
35476
|
-
var _a25
|
|
35477
|
-
|
|
35478
|
-
|
|
35479
|
-
return;
|
|
35480
|
-
}
|
|
35481
|
-
paramStore.setSortSettings({ selectedSortKey: value, previousSortKey: previousKey.value });
|
|
35482
|
-
(_c = (_b25 = props.callbacks) == null ? void 0 : _b25.onSortChange) == null ? void 0 : _c.call(_b25, { selectedSortKey: value, previousSortKey: previousKey.value });
|
|
35483
|
-
paramStore.appendParams({
|
|
35484
|
-
params: [{ name: optionStore.getQueryParamName(QUERY_PARAMS$1.SORT), value }],
|
|
35485
|
-
paramsToRemove: [optionStore.getQueryParamName(QUERY_PARAMS$1.PAGE)]
|
|
35486
|
-
});
|
|
35487
|
-
previousKey.value = selectedKey.value;
|
|
35488
|
-
};
|
|
35763
|
+
const showDefaultSort = computed(() => {
|
|
35764
|
+
var _a25;
|
|
35765
|
+
return !sortStyle.value || ((_a25 = sortStyle.value) == null ? void 0 : _a25.type) !== "drawer";
|
|
35766
|
+
});
|
|
35489
35767
|
return (_ctx, _cache) => {
|
|
35490
35768
|
var _a25, _b25;
|
|
35491
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
35492
|
-
createBaseVNode("div", _hoisted_2$
|
|
35493
|
-
createBaseVNode("label", _hoisted_3$
|
|
35769
|
+
return showDefaultSort.value ? (openBlock(), createElementBlock("div", _hoisted_1$D, [
|
|
35770
|
+
createBaseVNode("div", _hoisted_2$u, [
|
|
35771
|
+
createBaseVNode("label", _hoisted_3$m, toDisplayString(unref(sotyByTitleLabel)), 1),
|
|
35494
35772
|
withDirectives(createBaseVNode("select", {
|
|
35495
35773
|
id: "lupa-sort-select-dropdown",
|
|
35496
35774
|
class: "lupa-select-dropdown",
|
|
35497
|
-
"aria-label": (_b25 = (_a25 = unref(ariaLabels)) == null ? void 0 : _a25.sortBySelect) != null ? _b25 :
|
|
35775
|
+
"aria-label": (_b25 = (_a25 = unref(ariaLabels)) == null ? void 0 : _a25.sortBySelect) != null ? _b25 : unref(sotyByTitleLabel),
|
|
35498
35776
|
"data-cy": "lupa-sort-select-dropdown",
|
|
35499
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedKey.value = $event),
|
|
35500
|
-
onChange:
|
|
35777
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(selectedKey) ? selectedKey.value = $event : null),
|
|
35778
|
+
onChange: _cache[1] || (_cache[1] = //@ts-ignore
|
|
35779
|
+
(...args) => unref(handleSelect) && unref(handleSelect)(...args)),
|
|
35501
35780
|
ref: "select"
|
|
35502
35781
|
}, [
|
|
35503
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(sortItems
|
|
35782
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(sortItems), (option) => {
|
|
35504
35783
|
return openBlock(), createElementBlock("option", {
|
|
35505
35784
|
key: option.key,
|
|
35506
35785
|
value: option.key
|
|
35507
|
-
}, toDisplayString(option.label), 9, _hoisted_5$
|
|
35786
|
+
}, toDisplayString(option.label), 9, _hoisted_5$a);
|
|
35508
35787
|
}), 128))
|
|
35509
|
-
], 40, _hoisted_4$
|
|
35510
|
-
[vModelSelect, selectedKey
|
|
35788
|
+
], 40, _hoisted_4$f), [
|
|
35789
|
+
[vModelSelect, unref(selectedKey)]
|
|
35511
35790
|
])
|
|
35512
35791
|
])
|
|
35513
|
-
]);
|
|
35792
|
+
])) : createCommentVNode("", true);
|
|
35793
|
+
};
|
|
35794
|
+
}
|
|
35795
|
+
});
|
|
35796
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
35797
|
+
__name: "SearchResultsSortDrawerToggle",
|
|
35798
|
+
setup(__props) {
|
|
35799
|
+
const { isSidebarVisible, sortLabel, sortToggleVisible, handleSortSidebarToggle } = useSidebarToggle();
|
|
35800
|
+
return (_ctx, _cache) => {
|
|
35801
|
+
return unref(sortToggleVisible) ? (openBlock(), createElementBlock("div", {
|
|
35802
|
+
key: 0,
|
|
35803
|
+
class: normalizeClass(["lupa-mobile-toggle lupa-mobile-sort-toggle", {
|
|
35804
|
+
"lupa-sidebar-open": unref(isSidebarVisible)
|
|
35805
|
+
}]),
|
|
35806
|
+
onClick: _cache[0] || (_cache[0] = //@ts-ignore
|
|
35807
|
+
(...args) => unref(handleSortSidebarToggle) && unref(handleSortSidebarToggle)(...args))
|
|
35808
|
+
}, toDisplayString(unref(sortLabel)), 3)) : createCommentVNode("", true);
|
|
35514
35809
|
};
|
|
35515
35810
|
}
|
|
35516
35811
|
});
|
|
35517
|
-
const _hoisted_1$
|
|
35518
|
-
const _hoisted_2$
|
|
35812
|
+
const _hoisted_1$C = { class: "lupa-toolbar-left" };
|
|
35813
|
+
const _hoisted_2$t = {
|
|
35519
35814
|
key: 0,
|
|
35520
35815
|
class: "lupa-toolbar-right-title"
|
|
35521
35816
|
};
|
|
35522
|
-
const _hoisted_3$
|
|
35523
|
-
const _hoisted_4$
|
|
35524
|
-
const _hoisted_5$
|
|
35817
|
+
const _hoisted_3$l = { key: 2 };
|
|
35818
|
+
const _hoisted_4$e = { key: 4 };
|
|
35819
|
+
const _hoisted_5$9 = { key: 6 };
|
|
35525
35820
|
const _hoisted_6$4 = { class: "lupa-toolbar-right" };
|
|
35526
35821
|
const _hoisted_7$2 = {
|
|
35527
35822
|
key: 0,
|
|
@@ -35529,7 +35824,7 @@ const _hoisted_7$2 = {
|
|
|
35529
35824
|
};
|
|
35530
35825
|
const _hoisted_8 = { key: 2 };
|
|
35531
35826
|
const _hoisted_9 = { key: 4 };
|
|
35532
|
-
const _sfc_main$
|
|
35827
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
35533
35828
|
__name: "SearchResultsToolbar",
|
|
35534
35829
|
props: {
|
|
35535
35830
|
options: {},
|
|
@@ -35545,7 +35840,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
35545
35840
|
const searchResultStore = useSearchResultStore();
|
|
35546
35841
|
const optionsStore = useOptionsStore();
|
|
35547
35842
|
const { page, limit } = storeToRefs(paramStore);
|
|
35548
|
-
const { hasAnyFilter, searchResult,
|
|
35843
|
+
const { hasAnyFilter, searchResult, isFilterSidebarVisible } = storeToRefs(searchResultStore);
|
|
35549
35844
|
const { currentResolutionPageSizes } = storeToRefs(optionsStore);
|
|
35550
35845
|
const isBottomLocation = computed(() => {
|
|
35551
35846
|
return props.paginationLocation === "bottom";
|
|
@@ -35623,7 +35918,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
35623
35918
|
var _a25;
|
|
35624
35919
|
return (_a25 = optionsValue.value.labels.toolbarRightLabel) != null ? _a25 : "";
|
|
35625
35920
|
});
|
|
35626
|
-
|
|
35921
|
+
computed(() => {
|
|
35627
35922
|
var _a25, _b25, _c;
|
|
35628
35923
|
return Boolean((_c = (_b25 = (_a25 = optionsValue.value.filters) == null ? void 0 : _a25.currentFilters) == null ? void 0 : _b25.mobileSidebar) == null ? void 0 : _c.showFilterCount);
|
|
35629
35924
|
});
|
|
@@ -35642,39 +35937,37 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
35642
35937
|
id: "lupa-search-results-toolbar",
|
|
35643
35938
|
class: normalizeClass({ "lupa-filter-no-results": !hasResults.value })
|
|
35644
35939
|
}, [
|
|
35645
|
-
createBaseVNode("div", _hoisted_1$
|
|
35646
|
-
toolbarLeftLabel.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
35647
|
-
showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$
|
|
35648
|
-
showItemSummary.value ? (openBlock(), createBlock(_sfc_main$
|
|
35940
|
+
createBaseVNode("div", _hoisted_1$C, [
|
|
35941
|
+
toolbarLeftLabel.value ? (openBlock(), createElementBlock("div", _hoisted_2$t, toDisplayString(toolbarLeftLabel.value), 1)) : createCommentVNode("", true),
|
|
35942
|
+
showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$O, { key: 1 })) : (openBlock(), createElementBlock("div", _hoisted_3$l)),
|
|
35943
|
+
showItemSummary.value ? (openBlock(), createBlock(_sfc_main$17, {
|
|
35649
35944
|
key: 3,
|
|
35650
35945
|
label: searchSummaryLabel.value,
|
|
35651
35946
|
clearable: unref(hasAnyFilter) && showFilterClear.value,
|
|
35652
35947
|
onClear: handleClearAll
|
|
35653
|
-
}, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$
|
|
35654
|
-
displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$
|
|
35948
|
+
}, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$e)),
|
|
35949
|
+
displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$L, {
|
|
35655
35950
|
key: 5,
|
|
35656
35951
|
options: paginationOptions.value.pageSelect,
|
|
35657
35952
|
"last-page-label": paginationOptions.value.labels.showMore,
|
|
35658
35953
|
"first-page-label": paginationOptions.value.labels.showLess
|
|
35659
|
-
}, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$
|
|
35954
|
+
}, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$9))
|
|
35660
35955
|
]),
|
|
35661
35956
|
createBaseVNode("div", _hoisted_6$4, [
|
|
35662
35957
|
toolbarRightLabel.value ? (openBlock(), createElementBlock("div", _hoisted_7$2, toDisplayString(toolbarRightLabel.value), 1)) : createCommentVNode("", true),
|
|
35663
|
-
createVNode(_sfc_main$
|
|
35664
|
-
|
|
35665
|
-
|
|
35666
|
-
}, null, 8, ["labels", "show-filter-count"]),
|
|
35667
|
-
paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$H, {
|
|
35958
|
+
createVNode(_sfc_main$N),
|
|
35959
|
+
createVNode(_sfc_main$I),
|
|
35960
|
+
paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$K, {
|
|
35668
35961
|
key: 1,
|
|
35669
35962
|
options: paginationOptions.value.pageSize,
|
|
35670
35963
|
labels: paginationOptions.value.labels
|
|
35671
35964
|
}, null, 8, ["options", "labels"])) : (openBlock(), createElementBlock("div", _hoisted_8)),
|
|
35672
|
-
sortOptions.value ? (openBlock(), createBlock(_sfc_main$
|
|
35965
|
+
sortOptions.value ? (openBlock(), createBlock(_sfc_main$J, {
|
|
35673
35966
|
key: 3,
|
|
35674
35967
|
options: sortOptions.value,
|
|
35675
35968
|
callbacks: callbacks.value
|
|
35676
35969
|
}, null, 8, ["options", "callbacks"])) : (openBlock(), createElementBlock("div", _hoisted_9)),
|
|
35677
|
-
showFiltersCloseButton.value && unref(
|
|
35970
|
+
showFiltersCloseButton.value && unref(isFilterSidebarVisible) ? (openBlock(), createBlock(_sfc_main$M, {
|
|
35678
35971
|
key: 5,
|
|
35679
35972
|
label: optionsValue.value.labels.mobileFilterCloseButton
|
|
35680
35973
|
}, null, 8, ["label"])) : createCommentVNode("", true)
|
|
@@ -35683,7 +35976,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
35683
35976
|
};
|
|
35684
35977
|
}
|
|
35685
35978
|
});
|
|
35686
|
-
const _sfc_main$
|
|
35979
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
35687
35980
|
__name: "SearchResultsProductImage",
|
|
35688
35981
|
props: {
|
|
35689
35982
|
item: {},
|
|
@@ -35691,7 +35984,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
35691
35984
|
},
|
|
35692
35985
|
setup(__props) {
|
|
35693
35986
|
return (_ctx, _cache) => {
|
|
35694
|
-
return openBlock(), createBlock(_sfc_main$
|
|
35987
|
+
return openBlock(), createBlock(_sfc_main$1w, {
|
|
35695
35988
|
item: _ctx.item,
|
|
35696
35989
|
options: _ctx.options,
|
|
35697
35990
|
"wrapper-class": "lupa-search-results-image-wrapper",
|
|
@@ -35700,16 +35993,16 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
35700
35993
|
};
|
|
35701
35994
|
}
|
|
35702
35995
|
});
|
|
35703
|
-
const _hoisted_1$
|
|
35704
|
-
const _hoisted_2$
|
|
35705
|
-
const _hoisted_3$
|
|
35706
|
-
const _hoisted_4$
|
|
35707
|
-
const _hoisted_5$
|
|
35996
|
+
const _hoisted_1$B = ["title", "innerHTML"];
|
|
35997
|
+
const _hoisted_2$s = ["title"];
|
|
35998
|
+
const _hoisted_3$k = ["href", "innerHTML"];
|
|
35999
|
+
const _hoisted_4$d = ["title"];
|
|
36000
|
+
const _hoisted_5$8 = {
|
|
35708
36001
|
key: 0,
|
|
35709
36002
|
class: "lupa-search-results-product-title-text"
|
|
35710
36003
|
};
|
|
35711
36004
|
const _hoisted_6$3 = ["href"];
|
|
35712
|
-
const _sfc_main$
|
|
36005
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
35713
36006
|
__name: "SearchResultsProductTitle",
|
|
35714
36007
|
props: {
|
|
35715
36008
|
item: {},
|
|
@@ -35746,7 +36039,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
35746
36039
|
style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
|
|
35747
36040
|
title: sanitizedTitle.value,
|
|
35748
36041
|
innerHTML: sanitizedTitle.value
|
|
35749
|
-
}, null, 12, _hoisted_1$
|
|
36042
|
+
}, null, 12, _hoisted_1$B)) : isHtml.value && _ctx.options.link ? (openBlock(), createElementBlock("div", {
|
|
35750
36043
|
key: 1,
|
|
35751
36044
|
class: "lupa-search-results-product-title",
|
|
35752
36045
|
style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
|
|
@@ -35757,26 +36050,26 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
35757
36050
|
class: "lupa-search-results-product-title-text lupa-title-link",
|
|
35758
36051
|
innerHTML: sanitizedTitle.value,
|
|
35759
36052
|
onClick: handleNavigation
|
|
35760
|
-
}, null, 8, _hoisted_3$
|
|
35761
|
-
], 12, _hoisted_2$
|
|
36053
|
+
}, null, 8, _hoisted_3$k)
|
|
36054
|
+
], 12, _hoisted_2$s)) : (openBlock(), createElementBlock("div", {
|
|
35762
36055
|
key: 2,
|
|
35763
36056
|
class: "lupa-search-results-product-title",
|
|
35764
36057
|
style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
|
|
35765
36058
|
title: title.value
|
|
35766
36059
|
}, [
|
|
35767
|
-
!_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
36060
|
+
!_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$8, toDisplayString(title.value), 1)) : createCommentVNode("", true),
|
|
35768
36061
|
_ctx.options.link ? (openBlock(), createElementBlock("a", {
|
|
35769
36062
|
key: 1,
|
|
35770
36063
|
href: _ctx.link,
|
|
35771
36064
|
class: "lupa-search-results-product-title-text lupa-title-link",
|
|
35772
36065
|
onClick: handleNavigation
|
|
35773
36066
|
}, toDisplayString(title.value), 9, _hoisted_6$3)) : createCommentVNode("", true)
|
|
35774
|
-
], 12, _hoisted_4$
|
|
36067
|
+
], 12, _hoisted_4$d));
|
|
35775
36068
|
};
|
|
35776
36069
|
}
|
|
35777
36070
|
});
|
|
35778
|
-
const _hoisted_1$
|
|
35779
|
-
const _sfc_main$
|
|
36071
|
+
const _hoisted_1$A = ["innerHTML"];
|
|
36072
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
35780
36073
|
__name: "SearchResultsProductDescription",
|
|
35781
36074
|
props: {
|
|
35782
36075
|
item: {},
|
|
@@ -35803,7 +36096,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
35803
36096
|
class: "lupa-search-results-product-description",
|
|
35804
36097
|
style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
|
|
35805
36098
|
innerHTML: sanitizedDescription.value
|
|
35806
|
-
}, null, 12, _hoisted_1$
|
|
36099
|
+
}, null, 12, _hoisted_1$A)) : (openBlock(), createElementBlock("div", {
|
|
35807
36100
|
key: 1,
|
|
35808
36101
|
class: "lupa-search-results-product-description",
|
|
35809
36102
|
style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`)
|
|
@@ -35811,15 +36104,15 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
35811
36104
|
};
|
|
35812
36105
|
}
|
|
35813
36106
|
});
|
|
35814
|
-
const _hoisted_1$
|
|
35815
|
-
const _hoisted_2$
|
|
35816
|
-
const _hoisted_3$
|
|
35817
|
-
const _hoisted_4$
|
|
35818
|
-
const _hoisted_5$
|
|
36107
|
+
const _hoisted_1$z = { id: "lupa-search-results-rating" };
|
|
36108
|
+
const _hoisted_2$r = { class: "lupa-ratings" };
|
|
36109
|
+
const _hoisted_3$j = { class: "lupa-ratings-base" };
|
|
36110
|
+
const _hoisted_4$c = ["innerHTML"];
|
|
36111
|
+
const _hoisted_5$7 = { class: "lupa-rating-wrapper" };
|
|
35819
36112
|
const _hoisted_6$2 = ["innerHTML"];
|
|
35820
36113
|
const _hoisted_7$1 = ["href"];
|
|
35821
36114
|
const STAR_COUNT = 5;
|
|
35822
|
-
const _sfc_main$
|
|
36115
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
35823
36116
|
__name: "SearchResultsProductRating",
|
|
35824
36117
|
props: {
|
|
35825
36118
|
item: {},
|
|
@@ -35856,18 +36149,18 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
35856
36149
|
return generateLink(props.options.links.ratingDetails, props.item);
|
|
35857
36150
|
});
|
|
35858
36151
|
return (_ctx, _cache) => {
|
|
35859
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
35860
|
-
createBaseVNode("div", _hoisted_2$
|
|
35861
|
-
createBaseVNode("div", _hoisted_3$
|
|
36152
|
+
return openBlock(), createElementBlock("div", _hoisted_1$z, [
|
|
36153
|
+
createBaseVNode("div", _hoisted_2$r, [
|
|
36154
|
+
createBaseVNode("div", _hoisted_3$j, [
|
|
35862
36155
|
(openBlock(true), createElementBlock(Fragment, null, renderList(baseStars.value, (star, index) => {
|
|
35863
36156
|
return openBlock(), createElementBlock("div", {
|
|
35864
36157
|
key: index,
|
|
35865
36158
|
innerHTML: star,
|
|
35866
36159
|
class: "lupa-rating lupa-rating-not-highlighted"
|
|
35867
|
-
}, null, 8, _hoisted_4$
|
|
36160
|
+
}, null, 8, _hoisted_4$c);
|
|
35868
36161
|
}), 128))
|
|
35869
36162
|
]),
|
|
35870
|
-
createBaseVNode("div", _hoisted_5$
|
|
36163
|
+
createBaseVNode("div", _hoisted_5$7, [
|
|
35871
36164
|
createBaseVNode("div", {
|
|
35872
36165
|
class: "lupa-ratings-highlighted",
|
|
35873
36166
|
style: normalizeStyle({ width: ratingPercentage.value + "%" })
|
|
@@ -35890,11 +36183,11 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
35890
36183
|
};
|
|
35891
36184
|
}
|
|
35892
36185
|
});
|
|
35893
|
-
const _hoisted_1$
|
|
36186
|
+
const _hoisted_1$y = {
|
|
35894
36187
|
class: "lupa-search-results-product-regular-price",
|
|
35895
36188
|
"data-cy": "lupa-search-results-product-regular-price"
|
|
35896
36189
|
};
|
|
35897
|
-
const _sfc_main$
|
|
36190
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
35898
36191
|
__name: "SearchResultsProductRegularPrice",
|
|
35899
36192
|
props: {
|
|
35900
36193
|
item: {},
|
|
@@ -35916,11 +36209,11 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
35916
36209
|
);
|
|
35917
36210
|
});
|
|
35918
36211
|
return (_ctx, _cache) => {
|
|
35919
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
36212
|
+
return openBlock(), createElementBlock("div", _hoisted_1$y, toDisplayString(price.value), 1);
|
|
35920
36213
|
};
|
|
35921
36214
|
}
|
|
35922
36215
|
});
|
|
35923
|
-
const _sfc_main$
|
|
36216
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
35924
36217
|
__name: "SearchResultsProductPrice",
|
|
35925
36218
|
props: {
|
|
35926
36219
|
item: {},
|
|
@@ -35954,12 +36247,12 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
35954
36247
|
};
|
|
35955
36248
|
}
|
|
35956
36249
|
});
|
|
35957
|
-
const _hoisted_1$
|
|
35958
|
-
const _hoisted_2$
|
|
35959
|
-
const _hoisted_3$
|
|
35960
|
-
const _hoisted_4$
|
|
35961
|
-
const _hoisted_5$
|
|
35962
|
-
const _sfc_main$
|
|
36250
|
+
const _hoisted_1$x = { class: "lupa-search-results-add-to-cart-wrapper" };
|
|
36251
|
+
const _hoisted_2$q = { class: "lupa-search-results-product-addtocart" };
|
|
36252
|
+
const _hoisted_3$i = ["disabled"];
|
|
36253
|
+
const _hoisted_4$b = ["href"];
|
|
36254
|
+
const _hoisted_5$6 = ["id", "disabled"];
|
|
36255
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
35963
36256
|
__name: "SearchResultsProductAddToCart",
|
|
35964
36257
|
props: {
|
|
35965
36258
|
item: {},
|
|
@@ -36018,16 +36311,16 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
36018
36311
|
loading.value = false;
|
|
36019
36312
|
});
|
|
36020
36313
|
return (_ctx, _cache) => {
|
|
36021
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
36022
|
-
createBaseVNode("div", _hoisted_2$
|
|
36314
|
+
return openBlock(), createElementBlock("div", _hoisted_1$x, [
|
|
36315
|
+
createBaseVNode("div", _hoisted_2$q, [
|
|
36023
36316
|
hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
|
|
36024
36317
|
key: 0,
|
|
36025
36318
|
class: addToCartButtonClass.value,
|
|
36026
36319
|
"data-cy": "lupa-add-to-cart",
|
|
36027
36320
|
disabled: !inStockValue.value || loading.value
|
|
36028
36321
|
}, _ctx.dynamicAttributes, { onClick: handleClick }), [
|
|
36029
|
-
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$
|
|
36030
|
-
], 16, _hoisted_3$
|
|
36322
|
+
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$b)
|
|
36323
|
+
], 16, _hoisted_3$i)) : (openBlock(), createElementBlock("button", mergeProps({
|
|
36031
36324
|
key: 1,
|
|
36032
36325
|
id: id.value,
|
|
36033
36326
|
class: addToCartButtonClass.value,
|
|
@@ -36035,18 +36328,18 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
36035
36328
|
disabled: !inStockValue.value || loading.value
|
|
36036
36329
|
}, _ctx.dynamicAttributes, {
|
|
36037
36330
|
onClick: withModifiers(handleClick, ["stop"])
|
|
36038
|
-
}), toDisplayString(label.value), 17, _hoisted_5$
|
|
36331
|
+
}), toDisplayString(label.value), 17, _hoisted_5$6))
|
|
36039
36332
|
])
|
|
36040
36333
|
]);
|
|
36041
36334
|
};
|
|
36042
36335
|
}
|
|
36043
36336
|
});
|
|
36044
|
-
const _hoisted_1$
|
|
36045
|
-
const _hoisted_2$
|
|
36046
|
-
const _hoisted_3$
|
|
36047
|
-
const _hoisted_4$
|
|
36048
|
-
const _hoisted_5$
|
|
36049
|
-
const _sfc_main$
|
|
36337
|
+
const _hoisted_1$w = ["innerHTML"];
|
|
36338
|
+
const _hoisted_2$p = { key: 0 };
|
|
36339
|
+
const _hoisted_3$h = { key: 1 };
|
|
36340
|
+
const _hoisted_4$a = { class: "lupa-search-box-custom-label" };
|
|
36341
|
+
const _hoisted_5$5 = { class: "lupa-search-box-custom-text" };
|
|
36342
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
36050
36343
|
__name: "SearchResultsProductCustom",
|
|
36051
36344
|
props: {
|
|
36052
36345
|
item: {},
|
|
@@ -36088,20 +36381,20 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
36088
36381
|
key: 0,
|
|
36089
36382
|
class: className.value,
|
|
36090
36383
|
innerHTML: text.value
|
|
36091
|
-
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$
|
|
36384
|
+
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$w)) : (openBlock(), createElementBlock("div", mergeProps({
|
|
36092
36385
|
key: 1,
|
|
36093
36386
|
class: className.value
|
|
36094
36387
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), [
|
|
36095
|
-
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
36096
|
-
createBaseVNode("div", _hoisted_4$
|
|
36097
|
-
createBaseVNode("div", _hoisted_5$
|
|
36388
|
+
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$p, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$h, [
|
|
36389
|
+
createBaseVNode("div", _hoisted_4$a, toDisplayString(label.value), 1),
|
|
36390
|
+
createBaseVNode("div", _hoisted_5$5, toDisplayString(text.value), 1)
|
|
36098
36391
|
]))
|
|
36099
36392
|
], 16));
|
|
36100
36393
|
};
|
|
36101
36394
|
}
|
|
36102
36395
|
});
|
|
36103
|
-
const _hoisted_1$
|
|
36104
|
-
const _sfc_main$
|
|
36396
|
+
const _hoisted_1$v = ["innerHTML"];
|
|
36397
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
36105
36398
|
__name: "SearchResultsProductCustomHtmlElement",
|
|
36106
36399
|
props: {
|
|
36107
36400
|
item: {},
|
|
@@ -36137,15 +36430,15 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
36137
36430
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
36138
36431
|
class: className.value,
|
|
36139
36432
|
innerHTML: text.value
|
|
36140
|
-
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$
|
|
36433
|
+
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), null, 16, _hoisted_1$v);
|
|
36141
36434
|
};
|
|
36142
36435
|
}
|
|
36143
36436
|
});
|
|
36144
|
-
const _hoisted_1$
|
|
36145
|
-
const _hoisted_2$
|
|
36146
|
-
const _hoisted_3$
|
|
36147
|
-
const _hoisted_4$
|
|
36148
|
-
const _sfc_main$
|
|
36437
|
+
const _hoisted_1$u = { id: "lupa-search-results-rating" };
|
|
36438
|
+
const _hoisted_2$o = ["innerHTML"];
|
|
36439
|
+
const _hoisted_3$g = { class: "lupa-ratings" };
|
|
36440
|
+
const _hoisted_4$9 = ["href"];
|
|
36441
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
36149
36442
|
__name: "SearchResultsProductSingleStarRating",
|
|
36150
36443
|
props: {
|
|
36151
36444
|
item: {},
|
|
@@ -36173,35 +36466,35 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
36173
36466
|
return RATING_STAR_HTML;
|
|
36174
36467
|
});
|
|
36175
36468
|
return (_ctx, _cache) => {
|
|
36176
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
36469
|
+
return openBlock(), createElementBlock("div", _hoisted_1$u, [
|
|
36177
36470
|
createBaseVNode("div", {
|
|
36178
36471
|
innerHTML: star.value,
|
|
36179
36472
|
class: "lupa-rating lupa-rating-highlighted"
|
|
36180
|
-
}, null, 8, _hoisted_2$
|
|
36181
|
-
createBaseVNode("div", _hoisted_3$
|
|
36473
|
+
}, null, 8, _hoisted_2$o),
|
|
36474
|
+
createBaseVNode("div", _hoisted_3$g, toDisplayString(rating.value), 1),
|
|
36182
36475
|
createBaseVNode("a", {
|
|
36183
36476
|
href: ratingLink.value,
|
|
36184
36477
|
class: "lupa-total-ratings"
|
|
36185
|
-
}, toDisplayString(totalRatings.value), 9, _hoisted_4$
|
|
36478
|
+
}, toDisplayString(totalRatings.value), 9, _hoisted_4$9)
|
|
36186
36479
|
]);
|
|
36187
36480
|
};
|
|
36188
36481
|
}
|
|
36189
36482
|
});
|
|
36190
36483
|
const __default__ = {
|
|
36191
36484
|
components: {
|
|
36192
|
-
SearchResultsProductImage: _sfc_main$
|
|
36193
|
-
SearchResultsProductTitle: _sfc_main$
|
|
36194
|
-
SearchResultsProductDescription: _sfc_main$
|
|
36195
|
-
SearchResultsProductRating: _sfc_main$
|
|
36196
|
-
SearchResultsProductRegularPrice: _sfc_main$
|
|
36197
|
-
SearchResultsProductPrice: _sfc_main$
|
|
36198
|
-
SearchResultsProductAddToCart: _sfc_main$
|
|
36199
|
-
SearchResultsProductCustom: _sfc_main$
|
|
36200
|
-
SearchResultsProductCustomHtmlElement: _sfc_main$
|
|
36201
|
-
SearchResultsProductSingleStarRating: _sfc_main$
|
|
36202
|
-
}
|
|
36203
|
-
};
|
|
36204
|
-
const _sfc_main$
|
|
36485
|
+
SearchResultsProductImage: _sfc_main$G,
|
|
36486
|
+
SearchResultsProductTitle: _sfc_main$F,
|
|
36487
|
+
SearchResultsProductDescription: _sfc_main$E,
|
|
36488
|
+
SearchResultsProductRating: _sfc_main$D,
|
|
36489
|
+
SearchResultsProductRegularPrice: _sfc_main$C,
|
|
36490
|
+
SearchResultsProductPrice: _sfc_main$B,
|
|
36491
|
+
SearchResultsProductAddToCart: _sfc_main$A,
|
|
36492
|
+
SearchResultsProductCustom: _sfc_main$z,
|
|
36493
|
+
SearchResultsProductCustomHtmlElement: _sfc_main$y,
|
|
36494
|
+
SearchResultsProductSingleStarRating: _sfc_main$x
|
|
36495
|
+
}
|
|
36496
|
+
};
|
|
36497
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__), {
|
|
36205
36498
|
__name: "SearchResultsProductCardElement",
|
|
36206
36499
|
props: {
|
|
36207
36500
|
item: {},
|
|
@@ -36279,13 +36572,13 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
36279
36572
|
};
|
|
36280
36573
|
}
|
|
36281
36574
|
}));
|
|
36282
|
-
const _hoisted_1$
|
|
36283
|
-
const _hoisted_2$
|
|
36575
|
+
const _hoisted_1$t = ["href"];
|
|
36576
|
+
const _hoisted_2$n = {
|
|
36284
36577
|
key: 0,
|
|
36285
36578
|
class: "lupa-out-of-stock"
|
|
36286
36579
|
};
|
|
36287
|
-
const _hoisted_3$
|
|
36288
|
-
const _sfc_main$
|
|
36580
|
+
const _hoisted_3$f = { class: "lupa-search-result-product-details-section" };
|
|
36581
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
36289
36582
|
__name: "SearchResultsProductCard",
|
|
36290
36583
|
props: {
|
|
36291
36584
|
product: {},
|
|
@@ -36461,7 +36754,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
36461
36754
|
default: withCtx(() => {
|
|
36462
36755
|
var _a25;
|
|
36463
36756
|
return [
|
|
36464
|
-
createVNode(_sfc_main$
|
|
36757
|
+
createVNode(_sfc_main$1g, { options: badgesOptions.value }, null, 8, ["options"]),
|
|
36465
36758
|
createBaseVNode("div", {
|
|
36466
36759
|
class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
|
|
36467
36760
|
}, [
|
|
@@ -36471,7 +36764,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
36471
36764
|
onClick: handleNavigation
|
|
36472
36765
|
}, [
|
|
36473
36766
|
(openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
|
|
36474
|
-
return openBlock(), createBlock(_sfc_main$
|
|
36767
|
+
return openBlock(), createBlock(_sfc_main$w, {
|
|
36475
36768
|
class: "lupa-search-results-product-element",
|
|
36476
36769
|
item: _ctx.product,
|
|
36477
36770
|
element,
|
|
@@ -36482,16 +36775,16 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
36482
36775
|
onProductEvent: handleProductEvent
|
|
36483
36776
|
}, null, 8, ["item", "element", "labels", "inStock", "link"]);
|
|
36484
36777
|
}), 128)),
|
|
36485
|
-
createVNode(_sfc_main$
|
|
36778
|
+
createVNode(_sfc_main$1g, {
|
|
36486
36779
|
options: badgesOptions.value,
|
|
36487
36780
|
position: "image",
|
|
36488
36781
|
class: "lupa-image-badges"
|
|
36489
36782
|
}, null, 8, ["options"]),
|
|
36490
|
-
((_a25 = labels.value) == null ? void 0 : _a25.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
36491
|
-
], 8, _hoisted_1$
|
|
36492
|
-
createBaseVNode("div", _hoisted_3$
|
|
36783
|
+
((_a25 = labels.value) == null ? void 0 : _a25.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_2$n, toDisplayString(labels.value.outOfStock), 1)) : createCommentVNode("", true)
|
|
36784
|
+
], 8, _hoisted_1$t),
|
|
36785
|
+
createBaseVNode("div", _hoisted_3$f, [
|
|
36493
36786
|
(openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
|
|
36494
|
-
return openBlock(), createBlock(_sfc_main$
|
|
36787
|
+
return openBlock(), createBlock(_sfc_main$w, {
|
|
36495
36788
|
class: "lupa-search-results-product-element",
|
|
36496
36789
|
item: _ctx.product,
|
|
36497
36790
|
element,
|
|
@@ -36509,7 +36802,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
36509
36802
|
class: normalizeClass("lupa-element-group-" + group)
|
|
36510
36803
|
}, [
|
|
36511
36804
|
(openBlock(true), createElementBlock(Fragment, null, renderList(getGroupElements(group), (element) => {
|
|
36512
|
-
return openBlock(), createBlock(_sfc_main$
|
|
36805
|
+
return openBlock(), createBlock(_sfc_main$w, {
|
|
36513
36806
|
class: "lupa-search-results-product-element",
|
|
36514
36807
|
item: _ctx.product,
|
|
36515
36808
|
element,
|
|
@@ -36530,23 +36823,23 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
36530
36823
|
};
|
|
36531
36824
|
}
|
|
36532
36825
|
});
|
|
36533
|
-
const _hoisted_1$
|
|
36826
|
+
const _hoisted_1$s = {
|
|
36534
36827
|
id: "lupa-search-results-similar-queries",
|
|
36535
36828
|
"data-cy": "lupa-search-results-similar-queries"
|
|
36536
36829
|
};
|
|
36537
|
-
const _hoisted_2$
|
|
36538
|
-
const _hoisted_3$
|
|
36830
|
+
const _hoisted_2$m = { class: "lupa-similar-queries-label" };
|
|
36831
|
+
const _hoisted_3$e = {
|
|
36539
36832
|
class: "lupa-similar-query-label",
|
|
36540
36833
|
"data-cy": "lupa-similar-query-label"
|
|
36541
36834
|
};
|
|
36542
|
-
const _hoisted_4$
|
|
36543
|
-
const _hoisted_5$
|
|
36835
|
+
const _hoisted_4$8 = ["onClick"];
|
|
36836
|
+
const _hoisted_5$4 = ["innerHTML"];
|
|
36544
36837
|
const _hoisted_6$1 = { key: 0 };
|
|
36545
36838
|
const _hoisted_7 = {
|
|
36546
36839
|
class: "lupa-products",
|
|
36547
36840
|
"data-cy": "lupa-products"
|
|
36548
36841
|
};
|
|
36549
|
-
const _sfc_main$
|
|
36842
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
36550
36843
|
__name: "SearchResultsSimilarQueries",
|
|
36551
36844
|
props: {
|
|
36552
36845
|
labels: {},
|
|
@@ -36584,11 +36877,11 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
36584
36877
|
};
|
|
36585
36878
|
};
|
|
36586
36879
|
return (_ctx, _cache) => {
|
|
36587
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
36588
|
-
createBaseVNode("div", _hoisted_2$
|
|
36880
|
+
return openBlock(), createElementBlock("div", _hoisted_1$s, [
|
|
36881
|
+
createBaseVNode("div", _hoisted_2$m, toDisplayString(_ctx.labels.similarQueries), 1),
|
|
36589
36882
|
(openBlock(true), createElementBlock(Fragment, null, renderList(similarQueries.value, (similarQuery, index) => {
|
|
36590
36883
|
return openBlock(), createElementBlock("div", { key: index }, [
|
|
36591
|
-
createBaseVNode("div", _hoisted_3$
|
|
36884
|
+
createBaseVNode("div", _hoisted_3$e, [
|
|
36592
36885
|
createBaseVNode("span", null, toDisplayString(similarQueryLabel.value), 1),
|
|
36593
36886
|
createBaseVNode("span", {
|
|
36594
36887
|
id: "lupa-similar-query-text-component",
|
|
@@ -36598,13 +36891,13 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
36598
36891
|
}, [
|
|
36599
36892
|
createBaseVNode("span", {
|
|
36600
36893
|
innerHTML: getSimilarQueryContent(similarQuery.displayQuery)
|
|
36601
|
-
}, null, 8, _hoisted_5$
|
|
36894
|
+
}, null, 8, _hoisted_5$4),
|
|
36602
36895
|
similarQuery.count ? (openBlock(), createElementBlock("span", _hoisted_6$1, " (" + toDisplayString(similarQuery.count) + ")", 1)) : createCommentVNode("", true)
|
|
36603
|
-
], 8, _hoisted_4$
|
|
36896
|
+
], 8, _hoisted_4$8)
|
|
36604
36897
|
]),
|
|
36605
36898
|
createBaseVNode("div", _hoisted_7, [
|
|
36606
36899
|
(openBlock(true), createElementBlock(Fragment, null, renderList(similarQuery.items, (product, index2) => {
|
|
36607
|
-
return openBlock(), createBlock(_sfc_main$
|
|
36900
|
+
return openBlock(), createBlock(_sfc_main$v, {
|
|
36608
36901
|
style: normalizeStyle(_ctx.columnSize),
|
|
36609
36902
|
key: getDocumentKey(index2, product),
|
|
36610
36903
|
product,
|
|
@@ -36619,15 +36912,15 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
36619
36912
|
};
|
|
36620
36913
|
}
|
|
36621
36914
|
});
|
|
36622
|
-
const _hoisted_1$
|
|
36915
|
+
const _hoisted_1$r = {
|
|
36623
36916
|
key: 0,
|
|
36624
36917
|
class: "lupa-results-additional-panel"
|
|
36625
36918
|
};
|
|
36626
|
-
const _hoisted_2$
|
|
36919
|
+
const _hoisted_2$l = {
|
|
36627
36920
|
class: "lupa-results-additional-panel-items",
|
|
36628
36921
|
"data-cy": "lupa-results-additional-panel-items"
|
|
36629
36922
|
};
|
|
36630
|
-
const _sfc_main$
|
|
36923
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
36631
36924
|
__name: "AdditionalPanel",
|
|
36632
36925
|
props: {
|
|
36633
36926
|
panel: {},
|
|
@@ -36700,10 +36993,10 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
36700
36993
|
handleQueryChange();
|
|
36701
36994
|
});
|
|
36702
36995
|
return (_ctx, _cache) => {
|
|
36703
|
-
return hasResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
36704
|
-
createBaseVNode("div", _hoisted_2$
|
|
36996
|
+
return hasResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$r, [
|
|
36997
|
+
createBaseVNode("div", _hoisted_2$l, [
|
|
36705
36998
|
(openBlock(true), createElementBlock(Fragment, null, renderList(visibleItems.value, (item, index) => {
|
|
36706
|
-
return openBlock(), createBlock(_sfc_main$
|
|
36999
|
+
return openBlock(), createBlock(_sfc_main$v, {
|
|
36707
37000
|
key: index,
|
|
36708
37001
|
product: item,
|
|
36709
37002
|
options: _ctx.panel,
|
|
@@ -36721,11 +37014,11 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
36721
37014
|
};
|
|
36722
37015
|
}
|
|
36723
37016
|
});
|
|
36724
|
-
const _hoisted_1$
|
|
37017
|
+
const _hoisted_1$q = {
|
|
36725
37018
|
key: 0,
|
|
36726
37019
|
class: "lupa-results-additional-panels"
|
|
36727
37020
|
};
|
|
36728
|
-
const _sfc_main$
|
|
37021
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
36729
37022
|
__name: "AdditionalPanels",
|
|
36730
37023
|
props: {
|
|
36731
37024
|
options: {},
|
|
@@ -36742,9 +37035,9 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
36742
37035
|
return locationPanels.value.length > 0;
|
|
36743
37036
|
});
|
|
36744
37037
|
return (_ctx, _cache) => {
|
|
36745
|
-
return isVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
37038
|
+
return isVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$q, [
|
|
36746
37039
|
(openBlock(true), createElementBlock(Fragment, null, renderList(locationPanels.value, (panel) => {
|
|
36747
|
-
return openBlock(), createBlock(_sfc_main$
|
|
37040
|
+
return openBlock(), createBlock(_sfc_main$t, {
|
|
36748
37041
|
key: panel.queryKey,
|
|
36749
37042
|
panel,
|
|
36750
37043
|
options: _ctx.sdkOptions
|
|
@@ -36761,29 +37054,29 @@ const _export_sfc = (sfc, props) => {
|
|
|
36761
37054
|
}
|
|
36762
37055
|
return target2;
|
|
36763
37056
|
};
|
|
36764
|
-
const _sfc_main$
|
|
36765
|
-
const _hoisted_1$
|
|
36766
|
-
const _hoisted_2$
|
|
37057
|
+
const _sfc_main$r = {};
|
|
37058
|
+
const _hoisted_1$p = { class: "lupa-spinner-wrapper" };
|
|
37059
|
+
const _hoisted_2$k = { class: "lupa-spinner" };
|
|
36767
37060
|
function _sfc_render(_ctx, _cache) {
|
|
36768
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
36769
|
-
createBaseVNode("div", _hoisted_2$
|
|
37061
|
+
return openBlock(), createElementBlock("div", _hoisted_1$p, [
|
|
37062
|
+
createBaseVNode("div", _hoisted_2$k, [
|
|
36770
37063
|
(openBlock(), createElementBlock(Fragment, null, renderList(12, (x) => {
|
|
36771
37064
|
return createBaseVNode("div", { key: x });
|
|
36772
37065
|
}), 64))
|
|
36773
37066
|
])
|
|
36774
37067
|
]);
|
|
36775
37068
|
}
|
|
36776
|
-
const Spinner = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
36777
|
-
const _hoisted_1$
|
|
37069
|
+
const Spinner = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render]]);
|
|
37070
|
+
const _hoisted_1$o = {
|
|
36778
37071
|
id: "lupa-search-results-similar-results",
|
|
36779
37072
|
"data-cy": "lupa-search-results-similar-results"
|
|
36780
37073
|
};
|
|
36781
|
-
const _hoisted_2$
|
|
36782
|
-
const _hoisted_3$
|
|
37074
|
+
const _hoisted_2$j = { class: "lupa-similar-results-label" };
|
|
37075
|
+
const _hoisted_3$d = {
|
|
36783
37076
|
class: "lupa-products",
|
|
36784
37077
|
"data-cy": "lupa-products"
|
|
36785
37078
|
};
|
|
36786
|
-
const _sfc_main$
|
|
37079
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
36787
37080
|
__name: "SearchResultsSimilarResults",
|
|
36788
37081
|
props: {
|
|
36789
37082
|
columnSize: {},
|
|
@@ -36804,11 +37097,11 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
36804
37097
|
};
|
|
36805
37098
|
});
|
|
36806
37099
|
return (_ctx, _cache) => {
|
|
36807
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
36808
|
-
createBaseVNode("div", _hoisted_2$
|
|
36809
|
-
createBaseVNode("div", _hoisted_3$
|
|
37100
|
+
return openBlock(), createElementBlock("div", _hoisted_1$o, [
|
|
37101
|
+
createBaseVNode("div", _hoisted_2$j, toDisplayString(_ctx.labels.similarResultsLabel), 1),
|
|
37102
|
+
createBaseVNode("div", _hoisted_3$d, [
|
|
36810
37103
|
(openBlock(true), createElementBlock(Fragment, null, renderList(similarResults.value.items, (product, index) => {
|
|
36811
|
-
return openBlock(), createBlock(_sfc_main$
|
|
37104
|
+
return openBlock(), createBlock(_sfc_main$v, {
|
|
36812
37105
|
style: normalizeStyle(_ctx.columnSize),
|
|
36813
37106
|
key: getDocumentKey(index, product),
|
|
36814
37107
|
product,
|
|
@@ -36929,15 +37222,15 @@ const extractRelatedSource = (source, searchResults2, options, activeFilters) =>
|
|
|
36929
37222
|
return extractFacetsRelatedSource(source, searchResults2, options, activeFilters);
|
|
36930
37223
|
}
|
|
36931
37224
|
});
|
|
36932
|
-
const _hoisted_1$
|
|
36933
|
-
const _hoisted_2$
|
|
36934
|
-
const _hoisted_3$
|
|
36935
|
-
const _hoisted_4$
|
|
36936
|
-
const _hoisted_5$
|
|
37225
|
+
const _hoisted_1$n = { class: "lupa-related-query-item" };
|
|
37226
|
+
const _hoisted_2$i = { class: "lupa-related-query-image" };
|
|
37227
|
+
const _hoisted_3$c = { class: "lupa-related-query-label" };
|
|
37228
|
+
const _hoisted_4$7 = { class: "lupa-related-query-title" };
|
|
37229
|
+
const _hoisted_5$3 = {
|
|
36937
37230
|
key: 0,
|
|
36938
37231
|
class: "lupa-related-query-count"
|
|
36939
37232
|
};
|
|
36940
|
-
const _sfc_main$
|
|
37233
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
36941
37234
|
__name: "RelatedQueryPanel",
|
|
36942
37235
|
props: {
|
|
36943
37236
|
query: {},
|
|
@@ -37033,9 +37326,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
37033
37326
|
});
|
|
37034
37327
|
return (_ctx, _cache) => {
|
|
37035
37328
|
var _a25;
|
|
37036
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
37037
|
-
createBaseVNode("div", _hoisted_2$
|
|
37038
|
-
itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$
|
|
37329
|
+
return openBlock(), createElementBlock("div", _hoisted_1$n, [
|
|
37330
|
+
createBaseVNode("div", _hoisted_2$i, [
|
|
37331
|
+
itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$1w, {
|
|
37039
37332
|
key: 0,
|
|
37040
37333
|
"wrapper-class": "lupa-related-query-image-wrapper",
|
|
37041
37334
|
"image-class": "lupa-related-query-image",
|
|
@@ -37043,24 +37336,24 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
37043
37336
|
options: image.value
|
|
37044
37337
|
}, null, 8, ["item", "options"])) : createCommentVNode("", true)
|
|
37045
37338
|
]),
|
|
37046
|
-
createBaseVNode("div", _hoisted_3$
|
|
37047
|
-
createBaseVNode("span", _hoisted_4$
|
|
37048
|
-
((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
37339
|
+
createBaseVNode("div", _hoisted_3$c, [
|
|
37340
|
+
createBaseVNode("span", _hoisted_4$7, toDisplayString(_ctx.query), 1),
|
|
37341
|
+
((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$3, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
|
|
37049
37342
|
])
|
|
37050
37343
|
]);
|
|
37051
37344
|
};
|
|
37052
37345
|
}
|
|
37053
37346
|
});
|
|
37054
|
-
const _hoisted_1$
|
|
37347
|
+
const _hoisted_1$m = {
|
|
37055
37348
|
key: 0,
|
|
37056
37349
|
class: "lupa-related-queries"
|
|
37057
37350
|
};
|
|
37058
|
-
const _hoisted_2$
|
|
37351
|
+
const _hoisted_2$h = {
|
|
37059
37352
|
key: 0,
|
|
37060
37353
|
class: "lupa-related-queries-title"
|
|
37061
37354
|
};
|
|
37062
|
-
const _hoisted_3$
|
|
37063
|
-
const _sfc_main$
|
|
37355
|
+
const _hoisted_3$b = ["onClick"];
|
|
37356
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
37064
37357
|
__name: "RelatedQueries",
|
|
37065
37358
|
props: {
|
|
37066
37359
|
options: {}
|
|
@@ -37154,8 +37447,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
37154
37447
|
};
|
|
37155
37448
|
return (_ctx, _cache) => {
|
|
37156
37449
|
var _a25, _b25, _c, _d;
|
|
37157
|
-
return _ctx.options && hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
37158
|
-
((_b25 = (_a25 = _ctx.options) == null ? void 0 : _a25.labels) == null ? void 0 : _b25.title) ? (openBlock(), createElementBlock("h3", _hoisted_2$
|
|
37450
|
+
return _ctx.options && hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$m, [
|
|
37451
|
+
((_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),
|
|
37159
37452
|
createBaseVNode("ul", null, [
|
|
37160
37453
|
(openBlock(true), createElementBlock(Fragment, null, renderList(relatedQueries2.value, (query) => {
|
|
37161
37454
|
return withDirectives((openBlock(), createElementBlock("li", {
|
|
@@ -37165,14 +37458,14 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
37165
37458
|
createBaseVNode("a", {
|
|
37166
37459
|
onClick: ($event) => handleRelatedQueryClick(query)
|
|
37167
37460
|
}, [
|
|
37168
|
-
createVNode(_sfc_main$
|
|
37461
|
+
createVNode(_sfc_main$p, {
|
|
37169
37462
|
"source-key": query.key,
|
|
37170
37463
|
options: _ctx.options,
|
|
37171
37464
|
query: query.value,
|
|
37172
37465
|
"existing-items-from-other-queries": allDisplayItems.value,
|
|
37173
37466
|
onLoaded: (item) => processLoadedItem(query, item)
|
|
37174
37467
|
}, null, 8, ["source-key", "options", "query", "existing-items-from-other-queries", "onLoaded"])
|
|
37175
|
-
], 8, _hoisted_3$
|
|
37468
|
+
], 8, _hoisted_3$b)
|
|
37176
37469
|
], 2)), [
|
|
37177
37470
|
[vShow, querySourceResultMap.value[query.value] !== false]
|
|
37178
37471
|
]);
|
|
@@ -37209,13 +37502,13 @@ const extractRedirectionSuggestion = (searchText = "", options) => {
|
|
|
37209
37502
|
}
|
|
37210
37503
|
return null;
|
|
37211
37504
|
};
|
|
37212
|
-
const _hoisted_1$
|
|
37505
|
+
const _hoisted_1$l = {
|
|
37213
37506
|
key: 0,
|
|
37214
37507
|
class: "lupa-redirection-suggestion"
|
|
37215
37508
|
};
|
|
37216
|
-
const _hoisted_2$
|
|
37217
|
-
const _hoisted_3$
|
|
37218
|
-
const _sfc_main$
|
|
37509
|
+
const _hoisted_2$g = { class: "lupa-redirections-suggestion-label" };
|
|
37510
|
+
const _hoisted_3$a = ["href"];
|
|
37511
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
37219
37512
|
__name: "RedirectionSuggestions",
|
|
37220
37513
|
props: {
|
|
37221
37514
|
options: {}
|
|
@@ -37238,19 +37531,19 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
37238
37531
|
)
|
|
37239
37532
|
);
|
|
37240
37533
|
return (_ctx, _cache) => {
|
|
37241
|
-
return redirectionSuggestion.value && label.value && link.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
37242
|
-
createBaseVNode("h4", _hoisted_2$
|
|
37243
|
-
createBaseVNode("a", { href: link.value }, toDisplayString(label.value), 9, _hoisted_3$
|
|
37534
|
+
return redirectionSuggestion.value && label.value && link.value ? (openBlock(), createElementBlock("div", _hoisted_1$l, [
|
|
37535
|
+
createBaseVNode("h4", _hoisted_2$g, [
|
|
37536
|
+
createBaseVNode("a", { href: link.value }, toDisplayString(label.value), 9, _hoisted_3$a)
|
|
37244
37537
|
])
|
|
37245
37538
|
])) : createCommentVNode("", true);
|
|
37246
37539
|
};
|
|
37247
37540
|
}
|
|
37248
37541
|
});
|
|
37249
|
-
const _hoisted_1$
|
|
37542
|
+
const _hoisted_1$k = {
|
|
37250
37543
|
key: 0,
|
|
37251
37544
|
class: "lupa-refiners-loading-notice"
|
|
37252
37545
|
};
|
|
37253
|
-
const _sfc_main$
|
|
37546
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
37254
37547
|
__name: "RefinersLoadingNotice",
|
|
37255
37548
|
props: {
|
|
37256
37549
|
labels: {}
|
|
@@ -37261,22 +37554,22 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
37261
37554
|
const props = __props;
|
|
37262
37555
|
const label = computed(() => props.labels.refinersLoadingNotice);
|
|
37263
37556
|
return (_ctx, _cache) => {
|
|
37264
|
-
return label.value && unref(loadingRefiners) ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
37557
|
+
return label.value && unref(loadingRefiners) ? (openBlock(), createElementBlock("div", _hoisted_1$k, [
|
|
37265
37558
|
createBaseVNode("p", null, toDisplayString(label.value), 1),
|
|
37266
37559
|
createVNode(Spinner)
|
|
37267
37560
|
])) : createCommentVNode("", true);
|
|
37268
37561
|
};
|
|
37269
37562
|
}
|
|
37270
37563
|
});
|
|
37271
|
-
const _hoisted_1$
|
|
37272
|
-
const _hoisted_2$
|
|
37273
|
-
const _hoisted_3$
|
|
37274
|
-
const _hoisted_4$
|
|
37275
|
-
const _hoisted_5$
|
|
37564
|
+
const _hoisted_1$j = { class: "lupa-related-query-item" };
|
|
37565
|
+
const _hoisted_2$f = { class: "lupa-related-query-image" };
|
|
37566
|
+
const _hoisted_3$9 = { class: "lupa-related-query-label" };
|
|
37567
|
+
const _hoisted_4$6 = { class: "lupa-related-query-title" };
|
|
37568
|
+
const _hoisted_5$2 = {
|
|
37276
37569
|
key: 0,
|
|
37277
37570
|
class: "lupa-related-query-count"
|
|
37278
37571
|
};
|
|
37279
|
-
const _sfc_main$
|
|
37572
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
37280
37573
|
__name: "RelatedQueryPanelApi",
|
|
37281
37574
|
props: {
|
|
37282
37575
|
relatedQuery: {},
|
|
@@ -37308,9 +37601,9 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
37308
37601
|
});
|
|
37309
37602
|
return (_ctx, _cache) => {
|
|
37310
37603
|
var _a25;
|
|
37311
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
37312
|
-
createBaseVNode("div", _hoisted_2$
|
|
37313
|
-
itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$
|
|
37604
|
+
return openBlock(), createElementBlock("div", _hoisted_1$j, [
|
|
37605
|
+
createBaseVNode("div", _hoisted_2$f, [
|
|
37606
|
+
itemToDisplay.value && image.value ? (openBlock(), createBlock(_sfc_main$1w, {
|
|
37314
37607
|
key: 0,
|
|
37315
37608
|
"wrapper-class": "lupa-related-query-image-wrapper",
|
|
37316
37609
|
"image-class": "lupa-related-query-image",
|
|
@@ -37318,24 +37611,24 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
37318
37611
|
options: image.value
|
|
37319
37612
|
}, null, 8, ["item", "options"])) : createCommentVNode("", true)
|
|
37320
37613
|
]),
|
|
37321
|
-
createBaseVNode("div", _hoisted_3$
|
|
37322
|
-
createBaseVNode("span", _hoisted_4$
|
|
37323
|
-
((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
37614
|
+
createBaseVNode("div", _hoisted_3$9, [
|
|
37615
|
+
createBaseVNode("span", _hoisted_4$6, toDisplayString(query.value), 1),
|
|
37616
|
+
((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$2, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
|
|
37324
37617
|
])
|
|
37325
37618
|
]);
|
|
37326
37619
|
};
|
|
37327
37620
|
}
|
|
37328
37621
|
});
|
|
37329
|
-
const _hoisted_1$
|
|
37622
|
+
const _hoisted_1$i = {
|
|
37330
37623
|
key: 0,
|
|
37331
37624
|
class: "lupa-related-queries"
|
|
37332
37625
|
};
|
|
37333
|
-
const _hoisted_2$
|
|
37626
|
+
const _hoisted_2$e = {
|
|
37334
37627
|
key: 0,
|
|
37335
37628
|
class: "lupa-related-queries-title"
|
|
37336
37629
|
};
|
|
37337
|
-
const _hoisted_3$
|
|
37338
|
-
const _sfc_main$
|
|
37630
|
+
const _hoisted_3$8 = ["onClick"];
|
|
37631
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
37339
37632
|
__name: "RelatedQueriesApi",
|
|
37340
37633
|
props: {
|
|
37341
37634
|
options: {}
|
|
@@ -37345,7 +37638,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
37345
37638
|
const searchResultStore = useSearchResultStore();
|
|
37346
37639
|
const paramsStore = useParamsStore();
|
|
37347
37640
|
const optionsStore = useOptionsStore();
|
|
37348
|
-
const { searchResult, relatedQueriesResult } = storeToRefs(searchResultStore);
|
|
37641
|
+
const { searchResult, relatedQueriesResult, relatedQueryFacetKeys } = storeToRefs(searchResultStore);
|
|
37349
37642
|
const relatedQueries2 = computed(() => {
|
|
37350
37643
|
var _a25, _b25, _c, _d;
|
|
37351
37644
|
const allQueries = (_b25 = (_a25 = relatedQueriesResult.value) == null ? void 0 : _a25.relatedQueries) != null ? _b25 : [];
|
|
@@ -37373,7 +37666,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
37373
37666
|
{ key: query.key, value: query.value },
|
|
37374
37667
|
optionsStore.getQueryParamName,
|
|
37375
37668
|
{},
|
|
37376
|
-
(_a25 =
|
|
37669
|
+
(_a25 = relatedQueryFacetKeys.value) == null ? void 0 : _a25.map((key) => `f.${key}`)
|
|
37377
37670
|
);
|
|
37378
37671
|
};
|
|
37379
37672
|
const getSelectedFilterClass = (relatedQuery) => {
|
|
@@ -37387,8 +37680,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
37387
37680
|
};
|
|
37388
37681
|
return (_ctx, _cache) => {
|
|
37389
37682
|
var _a25, _b25, _c, _d;
|
|
37390
|
-
return hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
37391
|
-
((_b25 = (_a25 = _ctx.options) == null ? void 0 : _a25.labels) == null ? void 0 : _b25.title) ? (openBlock(), createElementBlock("h3", _hoisted_2$
|
|
37683
|
+
return hasEnoughRelatedQueries.value ? (openBlock(), createElementBlock("div", _hoisted_1$i, [
|
|
37684
|
+
((_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),
|
|
37392
37685
|
createBaseVNode("ul", null, [
|
|
37393
37686
|
(openBlock(true), createElementBlock(Fragment, null, renderList(relatedQueries2.value, (query) => {
|
|
37394
37687
|
return openBlock(), createElementBlock("li", {
|
|
@@ -37398,11 +37691,11 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
37398
37691
|
createBaseVNode("a", {
|
|
37399
37692
|
onClick: ($event) => handleRelatedQueryClick(query)
|
|
37400
37693
|
}, [
|
|
37401
|
-
createVNode(_sfc_main$
|
|
37694
|
+
createVNode(_sfc_main$l, {
|
|
37402
37695
|
relatedQuery: query,
|
|
37403
37696
|
options: _ctx.options
|
|
37404
37697
|
}, null, 8, ["relatedQuery", "options"])
|
|
37405
|
-
], 8, _hoisted_3$
|
|
37698
|
+
], 8, _hoisted_3$8)
|
|
37406
37699
|
], 2);
|
|
37407
37700
|
}), 128))
|
|
37408
37701
|
])
|
|
@@ -37410,9 +37703,9 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
37410
37703
|
};
|
|
37411
37704
|
}
|
|
37412
37705
|
});
|
|
37413
|
-
const _hoisted_1$
|
|
37414
|
-
const _hoisted_2$
|
|
37415
|
-
const _sfc_main$
|
|
37706
|
+
const _hoisted_1$h = { key: 0 };
|
|
37707
|
+
const _hoisted_2$d = ["innerHTML"];
|
|
37708
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
37416
37709
|
__name: "ZeroResults",
|
|
37417
37710
|
props: {
|
|
37418
37711
|
emptyResultsLabel: {},
|
|
@@ -37441,36 +37734,36 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
37441
37734
|
});
|
|
37442
37735
|
return (_ctx, _cache) => {
|
|
37443
37736
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
37444
|
-
showDefaultZeroResultsTemplate.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
37737
|
+
showDefaultZeroResultsTemplate.value ? (openBlock(), createElementBlock("div", _hoisted_1$h, [
|
|
37445
37738
|
createTextVNode(toDisplayString(_ctx.emptyResultsLabel) + " ", 1),
|
|
37446
37739
|
createBaseVNode("span", null, toDisplayString(_ctx.currentQueryText), 1)
|
|
37447
37740
|
])) : createCommentVNode("", true),
|
|
37448
37741
|
showCustomZeroResultsTemplate.value ? (openBlock(), createElementBlock("div", {
|
|
37449
37742
|
key: 1,
|
|
37450
37743
|
innerHTML: htmlTemplate.value
|
|
37451
|
-
}, null, 8, _hoisted_2$
|
|
37744
|
+
}, null, 8, _hoisted_2$d)) : createCommentVNode("", true)
|
|
37452
37745
|
], 64);
|
|
37453
37746
|
};
|
|
37454
37747
|
}
|
|
37455
37748
|
});
|
|
37456
|
-
const _hoisted_1$
|
|
37457
|
-
const _hoisted_2$
|
|
37749
|
+
const _hoisted_1$g = { id: "lupa-search-results-products" };
|
|
37750
|
+
const _hoisted_2$c = {
|
|
37458
37751
|
class: "lupa-products",
|
|
37459
37752
|
"data-cy": "lupa-products"
|
|
37460
37753
|
};
|
|
37461
|
-
const _hoisted_3$
|
|
37754
|
+
const _hoisted_3$7 = {
|
|
37462
37755
|
key: 1,
|
|
37463
37756
|
class: "lupa-empty-results",
|
|
37464
37757
|
"data-cy": "lupa-no-results-in-page"
|
|
37465
37758
|
};
|
|
37466
|
-
const _hoisted_4$
|
|
37759
|
+
const _hoisted_4$5 = {
|
|
37467
37760
|
key: 5,
|
|
37468
37761
|
class: "lupa-empty-results",
|
|
37469
37762
|
"data-cy": "lupa-no-results"
|
|
37470
37763
|
};
|
|
37471
|
-
const _hoisted_5 = { key: 6 };
|
|
37764
|
+
const _hoisted_5$1 = { key: 6 };
|
|
37472
37765
|
const _hoisted_6 = { key: 7 };
|
|
37473
|
-
const _sfc_main$
|
|
37766
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
37474
37767
|
__name: "SearchResultsProducts",
|
|
37475
37768
|
props: {
|
|
37476
37769
|
options: {},
|
|
@@ -37486,7 +37779,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
37486
37779
|
hasResults,
|
|
37487
37780
|
currentQueryText,
|
|
37488
37781
|
isPageEmpty,
|
|
37489
|
-
|
|
37782
|
+
isFilterSidebarVisible,
|
|
37490
37783
|
columnCount,
|
|
37491
37784
|
searchResult,
|
|
37492
37785
|
layout,
|
|
@@ -37517,7 +37810,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
37517
37810
|
});
|
|
37518
37811
|
const showTopFilters = computed(() => {
|
|
37519
37812
|
var _a25, _b25, _c;
|
|
37520
|
-
return ((_c = (_b25 = (_a25 = props.options.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.style) == null ? void 0 : _c.type)
|
|
37813
|
+
return ((_c = (_b25 = (_a25 = props.options.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.style) == null ? void 0 : _c.type) !== "sidebar";
|
|
37521
37814
|
});
|
|
37522
37815
|
const showMobileFilters = computed(() => {
|
|
37523
37816
|
return props.options.searchTitlePosition !== "search-results-top";
|
|
@@ -37594,40 +37887,40 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
37594
37887
|
};
|
|
37595
37888
|
return (_ctx, _cache) => {
|
|
37596
37889
|
var _a25, _b25, _c;
|
|
37597
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
37598
|
-
unref(loading) && !unref(
|
|
37890
|
+
return openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
37891
|
+
unref(loading) && !unref(isFilterSidebarVisible) ? (openBlock(), createBlock(Spinner, {
|
|
37599
37892
|
key: 0,
|
|
37600
37893
|
class: "lupa-loader"
|
|
37601
37894
|
})) : createCommentVNode("", true),
|
|
37602
|
-
createVNode(_sfc_main$
|
|
37895
|
+
createVNode(_sfc_main$n, {
|
|
37603
37896
|
options: _ctx.options.redirectionSuggestions
|
|
37604
37897
|
}, null, 8, ["options"]),
|
|
37605
|
-
createVNode(_sfc_main$
|
|
37898
|
+
createVNode(_sfc_main$s, {
|
|
37606
37899
|
options: _ctx.options,
|
|
37607
37900
|
location: "top",
|
|
37608
37901
|
sdkOptions: _ctx.options.options
|
|
37609
37902
|
}, null, 8, ["options", "sdkOptions"]),
|
|
37610
|
-
showLocalRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$
|
|
37903
|
+
showLocalRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$o, {
|
|
37611
37904
|
key: 1,
|
|
37612
37905
|
options: _ctx.options.relatedQueries
|
|
37613
37906
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
37614
|
-
showApiRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$
|
|
37907
|
+
showApiRelatedQueries.value ? (openBlock(), createBlock(_sfc_main$k, {
|
|
37615
37908
|
key: 2,
|
|
37616
37909
|
options: _ctx.options.relatedQueries
|
|
37617
37910
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
37618
37911
|
unref(hasResults) ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
37619
|
-
showTopFilters.value ? (openBlock(), createBlock(_sfc_main$
|
|
37912
|
+
showTopFilters.value ? (openBlock(), createBlock(_sfc_main$P, {
|
|
37620
37913
|
key: 0,
|
|
37621
37914
|
options: (_a25 = _ctx.options.filters) != null ? _a25 : {}
|
|
37622
37915
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
37623
|
-
showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$
|
|
37916
|
+
showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$H, {
|
|
37624
37917
|
key: 1,
|
|
37625
37918
|
class: "lupa-toolbar-mobile",
|
|
37626
37919
|
options: _ctx.options,
|
|
37627
37920
|
"pagination-location": "top",
|
|
37628
37921
|
onFilter: filter
|
|
37629
37922
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
37630
|
-
currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$
|
|
37923
|
+
currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$14, {
|
|
37631
37924
|
key: 2,
|
|
37632
37925
|
class: normalizeClass(currentFiltersClass.value),
|
|
37633
37926
|
"data-cy": "lupa-search-result-filters-mobile-toolbar",
|
|
@@ -37636,19 +37929,19 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
37636
37929
|
}, null, 8, ["class", "options", "expandable"])) : createCommentVNode("", true)
|
|
37637
37930
|
], 64)) : createCommentVNode("", true),
|
|
37638
37931
|
unref(hasResults) ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
37639
|
-
createVNode(_sfc_main$
|
|
37932
|
+
createVNode(_sfc_main$H, {
|
|
37640
37933
|
class: "lupa-toolbar-top",
|
|
37641
37934
|
options: _ctx.options,
|
|
37642
37935
|
"pagination-location": "top"
|
|
37643
37936
|
}, null, 8, ["options"]),
|
|
37644
|
-
currentFilterOptions.value && currentFilterPositionDesktop.value === "resultsTop" ? (openBlock(), createBlock(_sfc_main$
|
|
37937
|
+
currentFilterOptions.value && currentFilterPositionDesktop.value === "resultsTop" ? (openBlock(), createBlock(_sfc_main$14, {
|
|
37645
37938
|
key: 0,
|
|
37646
37939
|
class: normalizeClass(currentFiltersClass.value),
|
|
37647
37940
|
"data-cy": "lupa-search-result-filters-mobile-toolbar",
|
|
37648
37941
|
options: currentFilterOptions.value,
|
|
37649
37942
|
expandable: !desktopFiltersExpanded.value
|
|
37650
37943
|
}, null, 8, ["class", "options", "expandable"])) : createCommentVNode("", true),
|
|
37651
|
-
createBaseVNode("div", _hoisted_2$
|
|
37944
|
+
createBaseVNode("div", _hoisted_2$c, [
|
|
37652
37945
|
_ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(searchResult).items, (product, index) => {
|
|
37653
37946
|
return renderSlot(_ctx.$slots, "productCard", {
|
|
37654
37947
|
style: normalizeStyle(columnSize.value),
|
|
@@ -37657,7 +37950,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
37657
37950
|
options: productCardOptions.value
|
|
37658
37951
|
});
|
|
37659
37952
|
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(searchResult).items, (product, index) => {
|
|
37660
|
-
return openBlock(), createBlock(_sfc_main$
|
|
37953
|
+
return openBlock(), createBlock(_sfc_main$v, {
|
|
37661
37954
|
style: normalizeStyle(columnSize.value),
|
|
37662
37955
|
key: getProductKeyAction(index, product),
|
|
37663
37956
|
product,
|
|
@@ -37666,7 +37959,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
37666
37959
|
}, null, 8, ["style", "product", "options", "analytics-metadata"]);
|
|
37667
37960
|
}), 128))
|
|
37668
37961
|
]),
|
|
37669
|
-
unref(isPageEmpty) && _ctx.options.labels.noItemsInPage ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
37962
|
+
unref(isPageEmpty) && _ctx.options.labels.noItemsInPage ? (openBlock(), createElementBlock("div", _hoisted_3$7, [
|
|
37670
37963
|
createTextVNode(toDisplayString(_ctx.options.labels.noItemsInPage) + " ", 1),
|
|
37671
37964
|
_ctx.options.labels.backToFirstPage ? (openBlock(), createElementBlock("span", {
|
|
37672
37965
|
key: 0,
|
|
@@ -37674,36 +37967,36 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
37674
37967
|
onClick: goToFirstPage
|
|
37675
37968
|
}, toDisplayString(_ctx.options.labels.backToFirstPage), 1)) : createCommentVNode("", true)
|
|
37676
37969
|
])) : createCommentVNode("", true),
|
|
37677
|
-
createVNode(_sfc_main$
|
|
37970
|
+
createVNode(_sfc_main$H, {
|
|
37678
37971
|
class: "lupa-toolbar-bottom",
|
|
37679
37972
|
options: _ctx.options,
|
|
37680
37973
|
"pagination-location": "bottom"
|
|
37681
37974
|
}, null, 8, ["options"]),
|
|
37682
|
-
createVNode(_sfc_main$
|
|
37975
|
+
createVNode(_sfc_main$s, {
|
|
37683
37976
|
options: _ctx.options,
|
|
37684
37977
|
location: "bottom",
|
|
37685
37978
|
sdkOptions: _ctx.options.options
|
|
37686
37979
|
}, null, 8, ["options", "sdkOptions"])
|
|
37687
|
-
], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
37688
|
-
createVNode(_sfc_main$
|
|
37980
|
+
], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$5, [
|
|
37981
|
+
createVNode(_sfc_main$j, {
|
|
37689
37982
|
emptyResultsLabel: (_b25 = _ctx.options.labels) == null ? void 0 : _b25.emptyResults,
|
|
37690
37983
|
currentQueryText: unref(currentQueryText),
|
|
37691
37984
|
hasSimilarQueries: hasSimilarQueries.value || hasSimilarResults.value,
|
|
37692
37985
|
zeroResults: (_c = _ctx.options) == null ? void 0 : _c.zeroResults
|
|
37693
37986
|
}, null, 8, ["emptyResultsLabel", "currentQueryText", "hasSimilarQueries", "zeroResults"])
|
|
37694
37987
|
])) : createCommentVNode("", true),
|
|
37695
|
-
createVNode(_sfc_main$
|
|
37988
|
+
createVNode(_sfc_main$m, {
|
|
37696
37989
|
labels: _ctx.options.labels
|
|
37697
37990
|
}, null, 8, ["labels"]),
|
|
37698
|
-
hasSimilarQueries.value ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
37699
|
-
createVNode(_sfc_main$
|
|
37991
|
+
hasSimilarQueries.value ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
|
|
37992
|
+
createVNode(_sfc_main$u, {
|
|
37700
37993
|
labels: similarQueriesLabels.value,
|
|
37701
37994
|
columnSize: columnSize.value,
|
|
37702
37995
|
productCardOptions: productCardOptions.value
|
|
37703
37996
|
}, null, 8, ["labels", "columnSize", "productCardOptions"])
|
|
37704
37997
|
])) : createCommentVNode("", true),
|
|
37705
37998
|
hasSimilarResults.value ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
37706
|
-
createVNode(_sfc_main$
|
|
37999
|
+
createVNode(_sfc_main$q, {
|
|
37707
38000
|
labels: similarResultsLabels.value,
|
|
37708
38001
|
columnSize: columnSize.value,
|
|
37709
38002
|
productCardOptions: productCardOptions.value
|
|
@@ -37714,17 +38007,17 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
37714
38007
|
};
|
|
37715
38008
|
}
|
|
37716
38009
|
});
|
|
37717
|
-
const _hoisted_1$
|
|
37718
|
-
const _hoisted_2$
|
|
38010
|
+
const _hoisted_1$f = { class: "lupa-top-mobile-filter-wrapper" };
|
|
38011
|
+
const _hoisted_2$b = {
|
|
37719
38012
|
key: 0,
|
|
37720
38013
|
class: "lupa-category-back"
|
|
37721
38014
|
};
|
|
37722
|
-
const _hoisted_3$
|
|
37723
|
-
const _hoisted_4$
|
|
38015
|
+
const _hoisted_3$6 = ["href"];
|
|
38016
|
+
const _hoisted_4$4 = {
|
|
37724
38017
|
key: 1,
|
|
37725
38018
|
class: "lupa-child-category-list"
|
|
37726
38019
|
};
|
|
37727
|
-
const _sfc_main$
|
|
38020
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
37728
38021
|
__name: "CategoryTopFilters",
|
|
37729
38022
|
props: {
|
|
37730
38023
|
options: {}
|
|
@@ -37772,24 +38065,24 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
37772
38065
|
"has-related-category-children": hasRelatedCategoryChildren.value
|
|
37773
38066
|
}])
|
|
37774
38067
|
}, [
|
|
37775
|
-
createBaseVNode("div", _hoisted_1$
|
|
37776
|
-
hasBackButton.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
38068
|
+
createBaseVNode("div", _hoisted_1$f, [
|
|
38069
|
+
hasBackButton.value ? (openBlock(), createElementBlock("div", _hoisted_2$b, [
|
|
37777
38070
|
createBaseVNode("a", {
|
|
37778
38071
|
"data-cy": "lupa-category-back",
|
|
37779
38072
|
href: backUrlLink.value,
|
|
37780
38073
|
onClick: handleNavigationBack
|
|
37781
|
-
}, toDisplayString(backTitle.value), 9, _hoisted_3$
|
|
38074
|
+
}, toDisplayString(backTitle.value), 9, _hoisted_3$6)
|
|
37782
38075
|
])) : createCommentVNode("", true),
|
|
37783
|
-
hasRelatedCategoryChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
38076
|
+
hasRelatedCategoryChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$4, [
|
|
37784
38077
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(relatedCategoryChildren), (child) => {
|
|
37785
|
-
return openBlock(), createBlock(_sfc_main$
|
|
38078
|
+
return openBlock(), createBlock(_sfc_main$13, {
|
|
37786
38079
|
key: getCategoryKey(child),
|
|
37787
38080
|
item: child,
|
|
37788
38081
|
options: categoryOptions.value
|
|
37789
38082
|
}, null, 8, ["item", "options"]);
|
|
37790
38083
|
}), 128))
|
|
37791
38084
|
])) : createCommentVNode("", true),
|
|
37792
|
-
createVNode(_sfc_main$
|
|
38085
|
+
createVNode(_sfc_main$H, {
|
|
37793
38086
|
class: "lupa-toolbar-mobile",
|
|
37794
38087
|
"pagination-location": "top",
|
|
37795
38088
|
options: _ctx.options
|
|
@@ -37799,6 +38092,129 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
37799
38092
|
};
|
|
37800
38093
|
}
|
|
37801
38094
|
});
|
|
38095
|
+
const _hoisted_1$e = {
|
|
38096
|
+
id: "lupa-search-results-sort-list",
|
|
38097
|
+
class: "lupa-search-results-sort-list"
|
|
38098
|
+
};
|
|
38099
|
+
const _hoisted_2$a = ["onClick"];
|
|
38100
|
+
const _hoisted_3$5 = ["for"];
|
|
38101
|
+
const _hoisted_4$3 = ["id", "checked"];
|
|
38102
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
38103
|
+
__name: "SortList",
|
|
38104
|
+
setup(__props) {
|
|
38105
|
+
const { sortItems, selectedKey, handleSelect, setSortValue } = useSorting();
|
|
38106
|
+
onMounted(() => {
|
|
38107
|
+
setSortValue();
|
|
38108
|
+
});
|
|
38109
|
+
const selectValue = (key) => {
|
|
38110
|
+
selectedKey.value = key;
|
|
38111
|
+
handleSelect();
|
|
38112
|
+
};
|
|
38113
|
+
return (_ctx, _cache) => {
|
|
38114
|
+
return openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
38115
|
+
createBaseVNode("ul", null, [
|
|
38116
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(sortItems), (option) => {
|
|
38117
|
+
return openBlock(), createElementBlock("li", {
|
|
38118
|
+
key: option.key,
|
|
38119
|
+
class: normalizeClass({ "lupa-sort-item-selected": option.key === unref(selectedKey) }),
|
|
38120
|
+
onClick: ($event) => selectValue(option.key)
|
|
38121
|
+
}, [
|
|
38122
|
+
createBaseVNode("label", {
|
|
38123
|
+
for: "lupa-sort-list-" + option.key
|
|
38124
|
+
}, toDisplayString(option.label), 9, _hoisted_3$5),
|
|
38125
|
+
createBaseVNode("input", {
|
|
38126
|
+
id: "lupa-sort-list-" + option.key,
|
|
38127
|
+
type: "radio",
|
|
38128
|
+
checked: option.key === unref(selectedKey)
|
|
38129
|
+
}, null, 8, _hoisted_4$3)
|
|
38130
|
+
], 10, _hoisted_2$a);
|
|
38131
|
+
}), 128))
|
|
38132
|
+
])
|
|
38133
|
+
]);
|
|
38134
|
+
};
|
|
38135
|
+
}
|
|
38136
|
+
});
|
|
38137
|
+
const _hoisted_1$d = { class: "lupa-sort-sidebar-content" };
|
|
38138
|
+
const _hoisted_2$9 = { class: "lupa-sidebar-top" };
|
|
38139
|
+
const _hoisted_3$4 = { class: "lupa-sidebar-title" };
|
|
38140
|
+
const _hoisted_4$2 = { class: "lupa-sidebar-sort-options" };
|
|
38141
|
+
const _hoisted_5 = { class: "lupa-sidebar-sort-actions" };
|
|
38142
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
38143
|
+
__name: "SortDrawer",
|
|
38144
|
+
setup(__props) {
|
|
38145
|
+
const optionsStore = useOptionsStore();
|
|
38146
|
+
const searchResultStore = useSearchResultStore();
|
|
38147
|
+
const paramStore = useParamsStore();
|
|
38148
|
+
const { searchResultOptions } = storeToRefs(optionsStore);
|
|
38149
|
+
const { isSidebarClosing, isSortingSidebarVisible } = storeToRefs(searchResultStore);
|
|
38150
|
+
const { handleSortSidebarToggle } = useSidebarToggle();
|
|
38151
|
+
const sortStyleOptions = computed(() => {
|
|
38152
|
+
var _a25;
|
|
38153
|
+
return (_a25 = searchResultOptions.value) == null ? void 0 : _a25.sortStyle;
|
|
38154
|
+
});
|
|
38155
|
+
const sidebarTitle = computed(() => {
|
|
38156
|
+
var _a25, _b25, _c, _d;
|
|
38157
|
+
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 : "";
|
|
38158
|
+
});
|
|
38159
|
+
const clearSortLabel = computed(() => {
|
|
38160
|
+
var _a25, _b25, _c, _d;
|
|
38161
|
+
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 : "";
|
|
38162
|
+
});
|
|
38163
|
+
const applySortLabel = computed(() => {
|
|
38164
|
+
var _a25, _b25, _c, _d;
|
|
38165
|
+
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 : "";
|
|
38166
|
+
});
|
|
38167
|
+
const handleDrawerToggle = () => {
|
|
38168
|
+
searchResultStore.setSidebarState({ visible: false, sidebar: "sorting" });
|
|
38169
|
+
};
|
|
38170
|
+
const clearSort = () => {
|
|
38171
|
+
paramStore.removeParameters({
|
|
38172
|
+
paramsToRemove: [optionsStore.getQueryParamName(QUERY_PARAMS$1.SORT)]
|
|
38173
|
+
});
|
|
38174
|
+
handleSortSidebarToggle();
|
|
38175
|
+
};
|
|
38176
|
+
const applySort = () => {
|
|
38177
|
+
handleSortSidebarToggle();
|
|
38178
|
+
};
|
|
38179
|
+
return (_ctx, _cache) => {
|
|
38180
|
+
return unref(isSortingSidebarVisible) ? (openBlock(), createElementBlock("div", {
|
|
38181
|
+
key: 0,
|
|
38182
|
+
class: normalizeClass(["lupa-sort-sidebar", { "lupa-sort-is-closing": unref(isSidebarClosing) }])
|
|
38183
|
+
}, [
|
|
38184
|
+
createBaseVNode("div", {
|
|
38185
|
+
class: "lupa-sidebar-close",
|
|
38186
|
+
onClick: withModifiers(handleDrawerToggle, ["stop"])
|
|
38187
|
+
}),
|
|
38188
|
+
createBaseVNode("div", _hoisted_1$d, [
|
|
38189
|
+
createBaseVNode("div", _hoisted_2$9, [
|
|
38190
|
+
createBaseVNode("div", _hoisted_3$4, toDisplayString(sidebarTitle.value), 1),
|
|
38191
|
+
createBaseVNode("div", {
|
|
38192
|
+
class: "lupa-filter-toggle-mobile",
|
|
38193
|
+
onClick: handleDrawerToggle
|
|
38194
|
+
})
|
|
38195
|
+
]),
|
|
38196
|
+
createBaseVNode("div", _hoisted_4$2, [
|
|
38197
|
+
createVNode(_sfc_main$g)
|
|
38198
|
+
]),
|
|
38199
|
+
createBaseVNode("div", _hoisted_5, [
|
|
38200
|
+
clearSortLabel.value ? (openBlock(), createElementBlock("button", {
|
|
38201
|
+
key: 0,
|
|
38202
|
+
type: "button",
|
|
38203
|
+
class: "lupa-sidebar-sort-clear",
|
|
38204
|
+
onClick: withModifiers(clearSort, ["stop"])
|
|
38205
|
+
}, toDisplayString(clearSortLabel.value), 1)) : createCommentVNode("", true),
|
|
38206
|
+
applySortLabel.value ? (openBlock(), createElementBlock("button", {
|
|
38207
|
+
key: 1,
|
|
38208
|
+
type: "button",
|
|
38209
|
+
class: "lupa-sidebar-sort-apply",
|
|
38210
|
+
onClick: withModifiers(applySort, ["stop"])
|
|
38211
|
+
}, toDisplayString(applySortLabel.value), 1)) : createCommentVNode("", true)
|
|
38212
|
+
])
|
|
38213
|
+
])
|
|
38214
|
+
], 2)) : createCommentVNode("", true);
|
|
38215
|
+
};
|
|
38216
|
+
}
|
|
38217
|
+
});
|
|
37802
38218
|
const _hoisted_1$c = {
|
|
37803
38219
|
key: 0,
|
|
37804
38220
|
class: "lupa-container-title-summary-mobile"
|
|
@@ -37833,7 +38249,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
37833
38249
|
currentQueryText,
|
|
37834
38250
|
hasResults,
|
|
37835
38251
|
currentFilterCount,
|
|
37836
|
-
|
|
38252
|
+
isFilterSidebarVisible,
|
|
37837
38253
|
layout,
|
|
37838
38254
|
loadingFacets,
|
|
37839
38255
|
loadingRefiners
|
|
@@ -37855,7 +38271,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
37855
38271
|
});
|
|
37856
38272
|
const indicatorClasses = computed(() => {
|
|
37857
38273
|
return {
|
|
37858
|
-
"lupa-mobile-sidebar-visible":
|
|
38274
|
+
"lupa-mobile-sidebar-visible": isFilterSidebarVisible.value,
|
|
37859
38275
|
"lupa-layout-grid": !layout.value || layout.value === ResultsLayoutEnum.GRID,
|
|
37860
38276
|
"lupa-layout-list": layout.value === ResultsLayoutEnum.LIST
|
|
37861
38277
|
};
|
|
@@ -38097,32 +38513,33 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
38097
38513
|
class: normalizeClass(["lupa-search-result-wrapper", { "lupa-search-wrapper-no-results": !unref(hasResults) }])
|
|
38098
38514
|
}, [
|
|
38099
38515
|
_ctx.isContainer ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
38100
|
-
createVNode(_sfc_main$
|
|
38101
|
-
createVNode(_sfc_main$
|
|
38516
|
+
createVNode(_sfc_main$18, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
38517
|
+
createVNode(_sfc_main$16, {
|
|
38102
38518
|
"show-summary": true,
|
|
38103
38519
|
options: _ctx.options,
|
|
38104
38520
|
"is-product-list": (_a25 = _ctx.isProductList) != null ? _a25 : false
|
|
38105
38521
|
}, null, 8, ["options", "is-product-list"])
|
|
38106
38522
|
])) : createCommentVNode("", true),
|
|
38107
|
-
isTitleResultTopPosition.value ? (openBlock(), createBlock(_sfc_main$
|
|
38523
|
+
isTitleResultTopPosition.value ? (openBlock(), createBlock(_sfc_main$h, {
|
|
38108
38524
|
key: 1,
|
|
38109
38525
|
options: _ctx.options
|
|
38110
38526
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
38111
|
-
_ctx.options.filters ? (openBlock(), createBlock(_sfc_main$
|
|
38527
|
+
_ctx.options.filters ? (openBlock(), createBlock(_sfc_main$R, {
|
|
38112
38528
|
key: 2,
|
|
38113
38529
|
options: _ctx.options.filters,
|
|
38114
38530
|
onFilter: handleParamsChange
|
|
38115
38531
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
38116
|
-
|
|
38117
|
-
|
|
38532
|
+
_ctx.options.sort ? (openBlock(), createBlock(_sfc_main$f, { key: 3 })) : createCommentVNode("", true),
|
|
38533
|
+
unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$Q, {
|
|
38534
|
+
key: 4,
|
|
38118
38535
|
breadcrumbs: _ctx.options.breadcrumbs
|
|
38119
38536
|
}, null, 8, ["breadcrumbs"])) : createCommentVNode("", true),
|
|
38120
38537
|
isTitleResultTopPosition.value ? (openBlock(), createElementBlock("div", {
|
|
38121
|
-
key:
|
|
38538
|
+
key: 5,
|
|
38122
38539
|
id: "lupa-search-results",
|
|
38123
38540
|
class: normalizeClass(["top-layout-wrapper", indicatorClasses.value])
|
|
38124
38541
|
}, [
|
|
38125
|
-
showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$
|
|
38542
|
+
showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$S, {
|
|
38126
38543
|
key: 0,
|
|
38127
38544
|
options: (_b25 = _ctx.options.filters) != null ? _b25 : {},
|
|
38128
38545
|
ref_key: "searchResultsFilters",
|
|
@@ -38130,12 +38547,12 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
38130
38547
|
onFilter: handleParamsChange
|
|
38131
38548
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
38132
38549
|
createBaseVNode("div", _hoisted_2$8, [
|
|
38133
|
-
createVNode(_sfc_main$
|
|
38134
|
-
createVNode(_sfc_main$
|
|
38550
|
+
createVNode(_sfc_main$18, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
38551
|
+
createVNode(_sfc_main$16, {
|
|
38135
38552
|
options: _ctx.options,
|
|
38136
38553
|
"is-product-list": (_c = _ctx.isProductList) != null ? _c : false
|
|
38137
38554
|
}, null, 8, ["options", "is-product-list"]),
|
|
38138
|
-
createVNode(_sfc_main$
|
|
38555
|
+
createVNode(_sfc_main$i, {
|
|
38139
38556
|
options: _ctx.options,
|
|
38140
38557
|
ssr: ssrEnabled.value,
|
|
38141
38558
|
onFilter: handleParamsChange
|
|
@@ -38146,9 +38563,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
38146
38563
|
_: 3
|
|
38147
38564
|
}, 8, ["options", "ssr"])
|
|
38148
38565
|
])
|
|
38149
|
-
], 2)) : (openBlock(), createElementBlock(Fragment, { key:
|
|
38150
|
-
createVNode(_sfc_main$
|
|
38151
|
-
createVNode(_sfc_main$
|
|
38566
|
+
], 2)) : (openBlock(), createElementBlock(Fragment, { key: 6 }, [
|
|
38567
|
+
createVNode(_sfc_main$18, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
38568
|
+
createVNode(_sfc_main$16, {
|
|
38152
38569
|
options: _ctx.options,
|
|
38153
38570
|
"is-product-list": (_d = _ctx.isProductList) != null ? _d : false
|
|
38154
38571
|
}, null, 8, ["options", "is-product-list"]),
|
|
@@ -38156,14 +38573,14 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
38156
38573
|
id: "lupa-search-results",
|
|
38157
38574
|
class: normalizeClass(indicatorClasses.value)
|
|
38158
38575
|
}, [
|
|
38159
|
-
showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$
|
|
38576
|
+
showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$S, {
|
|
38160
38577
|
key: 0,
|
|
38161
38578
|
options: (_e = _ctx.options.filters) != null ? _e : {},
|
|
38162
38579
|
ref_key: "searchResultsFilters",
|
|
38163
38580
|
ref: searchResultsFilters,
|
|
38164
38581
|
onFilter: handleParamsChange
|
|
38165
38582
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
38166
|
-
createVNode(_sfc_main$
|
|
38583
|
+
createVNode(_sfc_main$i, {
|
|
38167
38584
|
options: _ctx.options,
|
|
38168
38585
|
ssr: ssrEnabled.value,
|
|
38169
38586
|
onFilter: handleParamsChange
|
|
@@ -38307,7 +38724,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
38307
38724
|
onClick: withModifiers(innerClick, ["stop"])
|
|
38308
38725
|
}, [
|
|
38309
38726
|
createBaseVNode("div", _hoisted_1$a, [
|
|
38310
|
-
createVNode(_sfc_main$
|
|
38727
|
+
createVNode(_sfc_main$19, {
|
|
38311
38728
|
options: fullSearchBoxOptions.value,
|
|
38312
38729
|
"is-search-container": true,
|
|
38313
38730
|
ref_key: "searchBox",
|
|
@@ -39895,7 +40312,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
39895
40312
|
key: getProductKeyAction(index, product)
|
|
39896
40313
|
}, {
|
|
39897
40314
|
default: withCtx(() => [
|
|
39898
|
-
createVNode(_sfc_main$
|
|
40315
|
+
createVNode(_sfc_main$v, {
|
|
39899
40316
|
product,
|
|
39900
40317
|
options: _ctx.options,
|
|
39901
40318
|
"click-tracking-settings": clickTrackingSettings.value,
|
|
@@ -39910,7 +40327,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
39910
40327
|
_: 1
|
|
39911
40328
|
}, 16, ["wrap-around"])) : (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
|
39912
40329
|
(openBlock(true), createElementBlock(Fragment, null, renderList(recommendations2.value, (product, index) => {
|
|
39913
|
-
return openBlock(), createBlock(_sfc_main$
|
|
40330
|
+
return openBlock(), createBlock(_sfc_main$v, {
|
|
39914
40331
|
style: normalizeStyle(columnSize.value),
|
|
39915
40332
|
key: getProductKeyAction(index, product),
|
|
39916
40333
|
product,
|
|
@@ -40156,7 +40573,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
40156
40573
|
createBaseVNode("a", {
|
|
40157
40574
|
href: getLink(product)
|
|
40158
40575
|
}, [
|
|
40159
|
-
createVNode(_sfc_main$
|
|
40576
|
+
createVNode(_sfc_main$G, {
|
|
40160
40577
|
item: product,
|
|
40161
40578
|
options: image.value
|
|
40162
40579
|
}, null, 8, ["item", "options"])
|
|
@@ -40321,7 +40738,7 @@ const _sfc_main$4$1 = /* @__PURE__ */ defineComponent({
|
|
|
40321
40738
|
return (_ctx, _cache) => {
|
|
40322
40739
|
return openBlock(), createElementBlock("section", _hoisted_1$3, [
|
|
40323
40740
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.searchResults, (product, index) => {
|
|
40324
|
-
return openBlock(), createBlock(_sfc_main$
|
|
40741
|
+
return openBlock(), createBlock(_sfc_main$v, {
|
|
40325
40742
|
class: "lupa-chat-product-card",
|
|
40326
40743
|
key: getProductKeyAction(index, product),
|
|
40327
40744
|
product,
|
|
@@ -40517,7 +40934,7 @@ const _hoisted_4 = {
|
|
|
40517
40934
|
key: 0,
|
|
40518
40935
|
class: "lupasearch-chat-content"
|
|
40519
40936
|
};
|
|
40520
|
-
const _sfc_main$
|
|
40937
|
+
const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
40521
40938
|
__name: "ChatContainer",
|
|
40522
40939
|
props: {
|
|
40523
40940
|
options: {}
|
|
@@ -46541,7 +46958,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
46541
46958
|
};
|
|
46542
46959
|
__expose({ fetch: fetch2 });
|
|
46543
46960
|
return (_ctx, _cache) => {
|
|
46544
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
46961
|
+
return openBlock(), createBlock(unref(_sfc_main$19), {
|
|
46545
46962
|
ref_key: "searchBox",
|
|
46546
46963
|
ref: searchBox2,
|
|
46547
46964
|
options: fullSearchBoxOptions.value
|
|
@@ -47201,7 +47618,7 @@ const chat = (options, mountOptions) => {
|
|
|
47201
47618
|
const instance = createVue(
|
|
47202
47619
|
options.displayOptions.containerSelector,
|
|
47203
47620
|
mountOptions == null ? void 0 : mountOptions.mountingBehavior,
|
|
47204
|
-
_sfc_main$
|
|
47621
|
+
_sfc_main$1H,
|
|
47205
47622
|
{
|
|
47206
47623
|
options
|
|
47207
47624
|
}
|
|
@@ -47475,13 +47892,14 @@ const applyStyles = (configuration) => __async(null, null, function* () {
|
|
|
47475
47892
|
document.head.appendChild(styleElement);
|
|
47476
47893
|
});
|
|
47477
47894
|
const mountSearchBox = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
|
|
47478
|
-
var _a25;
|
|
47895
|
+
var _a25, _b25;
|
|
47479
47896
|
if (!configuration.searchBox) {
|
|
47480
47897
|
return;
|
|
47481
47898
|
}
|
|
47482
47899
|
const resolvedConfiguration = JSON.parse(configuration.searchBox);
|
|
47483
47900
|
const allowedMountUrls = resolvedConfiguration.allowedMountUrls;
|
|
47484
47901
|
const domPing = resolvedConfiguration.domPing;
|
|
47902
|
+
const mountingBehavior = (_a25 = resolvedConfiguration.mountingBehavior) != null ? _a25 : void 0;
|
|
47485
47903
|
const visible = yield waitForElementToBeVisible(
|
|
47486
47904
|
resolvedConfiguration.inputSelector,
|
|
47487
47905
|
0,
|
|
@@ -47495,18 +47913,19 @@ const mountSearchBox = (configuration, options, optionOverrides, fetch2 = true,
|
|
|
47495
47913
|
}
|
|
47496
47914
|
const mergedOptions = PluginConfigurationMerger.mergeSearchBoxConfiguration(
|
|
47497
47915
|
resolvedConfiguration,
|
|
47498
|
-
(
|
|
47916
|
+
(_b25 = optionOverrides == null ? void 0 : optionOverrides.searchBox) != null ? _b25 : {}
|
|
47499
47917
|
);
|
|
47500
|
-
searchBox(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, domPing });
|
|
47918
|
+
searchBox(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, domPing, mountingBehavior });
|
|
47501
47919
|
});
|
|
47502
47920
|
const mountSearchResults = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
|
|
47503
|
-
var _a25;
|
|
47921
|
+
var _a25, _b25;
|
|
47504
47922
|
if (!configuration.searchResults) {
|
|
47505
47923
|
return;
|
|
47506
47924
|
}
|
|
47507
47925
|
const resolvedConfiguration = JSON.parse(configuration.searchResults);
|
|
47508
47926
|
const allowedMountUrls = resolvedConfiguration.allowedMountUrls;
|
|
47509
47927
|
const domPing = resolvedConfiguration.domPing;
|
|
47928
|
+
const mountingBehavior = (_a25 = resolvedConfiguration.mountingBehavior) != null ? _a25 : void 0;
|
|
47510
47929
|
const visible = yield waitForElementToBeVisible(
|
|
47511
47930
|
resolvedConfiguration.containerSelector,
|
|
47512
47931
|
0,
|
|
@@ -47520,12 +47939,15 @@ const mountSearchResults = (configuration, options, optionOverrides, fetch2 = tr
|
|
|
47520
47939
|
}
|
|
47521
47940
|
const mergedOptions = PluginConfigurationMerger.mergeSearchResultsConfiguration(
|
|
47522
47941
|
resolvedConfiguration,
|
|
47523
|
-
(
|
|
47942
|
+
(_b25 = optionOverrides == null ? void 0 : optionOverrides.searchResults) != null ? _b25 : {}
|
|
47943
|
+
);
|
|
47944
|
+
searchResults(
|
|
47945
|
+
__spreadProps(__spreadValues({}, mergedOptions), { options }),
|
|
47946
|
+
{ fetch: fetch2, allowedMountUrls, domPing, mountingBehavior }
|
|
47524
47947
|
);
|
|
47525
|
-
searchResults(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, domPing });
|
|
47526
47948
|
});
|
|
47527
47949
|
const mountProductList = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
|
|
47528
|
-
var _a25;
|
|
47950
|
+
var _a25, _b25;
|
|
47529
47951
|
if (!configuration.productList) {
|
|
47530
47952
|
return;
|
|
47531
47953
|
}
|
|
@@ -47534,6 +47956,7 @@ const mountProductList = (configuration, options, optionOverrides, fetch2 = true
|
|
|
47534
47956
|
);
|
|
47535
47957
|
const resolvedConfiguration = JSON.parse(configuration.productList);
|
|
47536
47958
|
const allowedMountUrls = resolvedConfiguration.allowedMountUrls;
|
|
47959
|
+
const mountingBehavior = (_a25 = resolvedConfiguration.mountingBehavior) != null ? _a25 : void 0;
|
|
47537
47960
|
const visible = yield waitForElementToBeVisible(
|
|
47538
47961
|
resolvedConfiguration.containerSelector,
|
|
47539
47962
|
0,
|
|
@@ -47547,13 +47970,14 @@ const mountProductList = (configuration, options, optionOverrides, fetch2 = true
|
|
|
47547
47970
|
}
|
|
47548
47971
|
const mergedOptions = merge(
|
|
47549
47972
|
__spreadValues(__spreadValues({}, resolvedSearchResultsConfiguration), resolvedConfiguration),
|
|
47550
|
-
(
|
|
47973
|
+
(_b25 = optionOverrides == null ? void 0 : optionOverrides.productList) != null ? _b25 : {}
|
|
47551
47974
|
);
|
|
47552
|
-
productList(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls });
|
|
47975
|
+
productList(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, mountingBehavior });
|
|
47553
47976
|
});
|
|
47554
47977
|
const mountRecommendations = (resolvedSearchResultsConfiguration, resolvedConfiguration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
|
|
47555
|
-
var _a25;
|
|
47978
|
+
var _a25, _b25;
|
|
47556
47979
|
const allowedMountUrls = resolvedConfiguration.allowedMountUrls;
|
|
47980
|
+
const mountingBehavior = (_a25 = resolvedConfiguration.mountingBehavior) != null ? _a25 : void 0;
|
|
47557
47981
|
const visible = yield waitForElementToBeVisible(
|
|
47558
47982
|
resolvedConfiguration.containerSelector,
|
|
47559
47983
|
0,
|
|
@@ -47567,9 +47991,9 @@ const mountRecommendations = (resolvedSearchResultsConfiguration, resolvedConfig
|
|
|
47567
47991
|
}
|
|
47568
47992
|
const mergedOptions = merge(
|
|
47569
47993
|
__spreadValues(__spreadValues({}, resolvedSearchResultsConfiguration), resolvedConfiguration),
|
|
47570
|
-
(
|
|
47994
|
+
(_b25 = optionOverrides == null ? void 0 : optionOverrides.recommendations) != null ? _b25 : {}
|
|
47571
47995
|
);
|
|
47572
|
-
recommendations(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls });
|
|
47996
|
+
recommendations(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls, mountingBehavior });
|
|
47573
47997
|
});
|
|
47574
47998
|
const mountAllRecommendations = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(null, null, function* () {
|
|
47575
47999
|
if (!configuration.recommendations) {
|