@getlupa/vue 0.11.1 → 0.11.3
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.js +117 -69
- package/dist/lupaSearch.mjs +117 -69
- package/dist/src/components/search-results/products/product-card/elements/custom/SearchResultsProductCustomHtmlElement.vue.d.ts +4 -2
- package/dist/src/types/DocumentElement.d.ts +1 -0
- package/dist/src/types/search-results/SearchResultsOptions.d.ts +2 -0
- package/dist/src/types/search-results/SearchResultsProductCardOptions.d.ts +1 -0
- package/dist/src/utils/filter.utils.d.ts +5 -1
- package/package.json +1 -1
package/dist/lupaSearch.js
CHANGED
|
@@ -2092,7 +2092,7 @@ const DEFAULT_OPTIONS_RESULTS = {
|
|
|
2092
2092
|
top: false,
|
|
2093
2093
|
bottom: true
|
|
2094
2094
|
},
|
|
2095
|
-
sizes: [10, 20, 25
|
|
2095
|
+
sizes: [10, 20, 25]
|
|
2096
2096
|
},
|
|
2097
2097
|
pageSelection: {
|
|
2098
2098
|
position: {
|
|
@@ -2418,38 +2418,39 @@ const unfoldHierarchyFilter = (key, filter) => {
|
|
|
2418
2418
|
const seed = [];
|
|
2419
2419
|
return filter.terms.reduce((a, c2) => [...a, { key, value: c2, type: "hierarchy" }], seed);
|
|
2420
2420
|
};
|
|
2421
|
-
const unfoldRangeFilter = (key, filter) => {
|
|
2421
|
+
const unfoldRangeFilter = (key, filter, price = {}) => {
|
|
2422
|
+
var _a;
|
|
2422
2423
|
const gt = filter.gte || filter.gt;
|
|
2423
2424
|
const lt = filter.lte || filter.lt;
|
|
2424
|
-
if (key.includes(CURRENCY_KEY_INDICATOR)) {
|
|
2425
|
+
if (key.includes(CURRENCY_KEY_INDICATOR) || ((_a = price == null ? void 0 : price.keys) == null ? void 0 : _a.includes(key))) {
|
|
2425
2426
|
return [
|
|
2426
2427
|
{
|
|
2427
2428
|
key,
|
|
2428
|
-
value: formatPriceSummary([gt, lt]),
|
|
2429
|
+
value: formatPriceSummary([gt, lt], price.currency, price.separator),
|
|
2429
2430
|
type: "range"
|
|
2430
2431
|
}
|
|
2431
2432
|
];
|
|
2432
2433
|
}
|
|
2433
2434
|
return [{ key, value: `${gt} - ${lt}`, type: "range" }];
|
|
2434
2435
|
};
|
|
2435
|
-
const unfoldFilter = (key, filter) => {
|
|
2436
|
+
const unfoldFilter = (key, filter, price = {}) => {
|
|
2436
2437
|
if (Array.isArray(filter)) {
|
|
2437
2438
|
return unfoldTermFilter(key, filter);
|
|
2438
2439
|
}
|
|
2439
2440
|
if (filter.gte) {
|
|
2440
|
-
return unfoldRangeFilter(key, filter);
|
|
2441
|
+
return unfoldRangeFilter(key, filter, price);
|
|
2441
2442
|
}
|
|
2442
2443
|
if (filter.terms) {
|
|
2443
2444
|
return unfoldHierarchyFilter(key, filter);
|
|
2444
2445
|
}
|
|
2445
2446
|
return [];
|
|
2446
2447
|
};
|
|
2447
|
-
const unfoldFilters = (filters) => {
|
|
2448
|
+
const unfoldFilters = (filters, price = {}) => {
|
|
2448
2449
|
if (!filters) {
|
|
2449
2450
|
return [];
|
|
2450
2451
|
}
|
|
2451
2452
|
const seed = [];
|
|
2452
|
-
return Object.entries(filters).reduce((a, c2) => [...a, ...unfoldFilter(...c2)], seed);
|
|
2453
|
+
return Object.entries(filters).reduce((a, c2) => [...a, ...unfoldFilter(...c2, price)], seed);
|
|
2453
2454
|
};
|
|
2454
2455
|
const getLabeledFilters = (filters, facets) => {
|
|
2455
2456
|
return filters.map((f2) => {
|
|
@@ -3222,7 +3223,7 @@ const useSearchBoxStore = defineStore("searchBox", () => {
|
|
|
3222
3223
|
};
|
|
3223
3224
|
});
|
|
3224
3225
|
const _hoisted_1$1e = { id: "lupa-search-box-input-container" };
|
|
3225
|
-
const _hoisted_2$
|
|
3226
|
+
const _hoisted_2$Q = { class: "lupa-input-clear" };
|
|
3226
3227
|
const _hoisted_3$A = { id: "lupa-search-box-input" };
|
|
3227
3228
|
const _hoisted_4$s = ["value"];
|
|
3228
3229
|
const _hoisted_5$h = ["aria-label", "placeholder"];
|
|
@@ -3312,7 +3313,7 @@ const _sfc_main$1m = /* @__PURE__ */ vue.defineComponent({
|
|
|
3312
3313
|
__expose({ focus });
|
|
3313
3314
|
return (_ctx, _cache) => {
|
|
3314
3315
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1e, [
|
|
3315
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
3316
|
+
vue.createElementVNode("div", _hoisted_2$Q, [
|
|
3316
3317
|
vue.createElementVNode("div", {
|
|
3317
3318
|
class: vue.normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
|
|
3318
3319
|
onClick: clear
|
|
@@ -3386,7 +3387,7 @@ const _sfc_main$1l = /* @__PURE__ */ vue.defineComponent({
|
|
|
3386
3387
|
}
|
|
3387
3388
|
});
|
|
3388
3389
|
const _hoisted_1$1d = { class: "lupa-search-box-history-item" };
|
|
3389
|
-
const _hoisted_2$
|
|
3390
|
+
const _hoisted_2$P = { class: "lupa-search-box-history-item-content" };
|
|
3390
3391
|
const _sfc_main$1k = /* @__PURE__ */ vue.defineComponent({
|
|
3391
3392
|
__name: "SearchBoxHistoryItem",
|
|
3392
3393
|
props: {
|
|
@@ -3404,7 +3405,7 @@ const _sfc_main$1k = /* @__PURE__ */ vue.defineComponent({
|
|
|
3404
3405
|
};
|
|
3405
3406
|
return (_ctx, _cache) => {
|
|
3406
3407
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1d, [
|
|
3407
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
3408
|
+
vue.createElementVNode("div", _hoisted_2$P, [
|
|
3408
3409
|
vue.createElementVNode("div", {
|
|
3409
3410
|
class: vue.normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
|
|
3410
3411
|
onClick: click2
|
|
@@ -3494,7 +3495,7 @@ const _sfc_main$1i = /* @__PURE__ */ vue.defineComponent({
|
|
|
3494
3495
|
}
|
|
3495
3496
|
});
|
|
3496
3497
|
const _hoisted_1$1a = ["innerHTML"];
|
|
3497
|
-
const _hoisted_2$
|
|
3498
|
+
const _hoisted_2$O = {
|
|
3498
3499
|
key: 1,
|
|
3499
3500
|
"data-cy": "lupa-suggestion-value",
|
|
3500
3501
|
class: "lupa-suggestion-value"
|
|
@@ -3548,7 +3549,7 @@ const _sfc_main$1h = /* @__PURE__ */ vue.defineComponent({
|
|
|
3548
3549
|
class: "lupa-suggestion-value",
|
|
3549
3550
|
"data-cy": "lupa-suggestion-value",
|
|
3550
3551
|
innerHTML: _ctx.suggestion.displayHighlight
|
|
3551
|
-
}, null, 8, _hoisted_1$1a)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
3552
|
+
}, null, 8, _hoisted_1$1a)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$O, vue.toDisplayString(_ctx.suggestion.display), 1)),
|
|
3552
3553
|
_ctx.suggestion.facet ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$z, [
|
|
3553
3554
|
vue.createElementVNode("span", _hoisted_4$r, vue.toDisplayString(facetLabel.value), 1),
|
|
3554
3555
|
vue.createElementVNode("span", _hoisted_5$g, vue.toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
@@ -3940,7 +3941,7 @@ const _sfc_main$1d = /* @__PURE__ */ vue.defineComponent({
|
|
|
3940
3941
|
}
|
|
3941
3942
|
});
|
|
3942
3943
|
const _hoisted_1$17 = ["innerHTML"];
|
|
3943
|
-
const _hoisted_2$
|
|
3944
|
+
const _hoisted_2$N = {
|
|
3944
3945
|
key: 1,
|
|
3945
3946
|
class: "lupa-search-box-product-title"
|
|
3946
3947
|
};
|
|
@@ -3964,14 +3965,14 @@ const _sfc_main$1c = /* @__PURE__ */ vue.defineComponent({
|
|
|
3964
3965
|
key: 0,
|
|
3965
3966
|
class: "lupa-search-box-product-title",
|
|
3966
3967
|
innerHTML: title.value
|
|
3967
|
-
}, null, 8, _hoisted_1$17)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
3968
|
+
}, null, 8, _hoisted_1$17)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$N, [
|
|
3968
3969
|
vue.createElementVNode("strong", null, vue.toDisplayString(title.value), 1)
|
|
3969
3970
|
]));
|
|
3970
3971
|
};
|
|
3971
3972
|
}
|
|
3972
3973
|
});
|
|
3973
3974
|
const _hoisted_1$16 = ["innerHTML"];
|
|
3974
|
-
const _hoisted_2$
|
|
3975
|
+
const _hoisted_2$M = {
|
|
3975
3976
|
key: 1,
|
|
3976
3977
|
class: "lupa-search-box-product-description"
|
|
3977
3978
|
};
|
|
@@ -3995,7 +3996,7 @@ const _sfc_main$1b = /* @__PURE__ */ vue.defineComponent({
|
|
|
3995
3996
|
key: 0,
|
|
3996
3997
|
class: "lupa-search-box-product-description",
|
|
3997
3998
|
innerHTML: description.value
|
|
3998
|
-
}, null, 8, _hoisted_1$16)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
3999
|
+
}, null, 8, _hoisted_1$16)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$M, vue.toDisplayString(description.value), 1));
|
|
3999
4000
|
};
|
|
4000
4001
|
}
|
|
4001
4002
|
});
|
|
@@ -4048,7 +4049,7 @@ const _sfc_main$19 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4048
4049
|
}
|
|
4049
4050
|
});
|
|
4050
4051
|
const _hoisted_1$13 = ["innerHTML"];
|
|
4051
|
-
const _hoisted_2$
|
|
4052
|
+
const _hoisted_2$L = { key: 0 };
|
|
4052
4053
|
const _hoisted_3$y = { key: 1 };
|
|
4053
4054
|
const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
|
|
4054
4055
|
const _hoisted_5$f = { class: "lupa-search-box-custom-text" };
|
|
@@ -4082,7 +4083,7 @@ const _sfc_main$18 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4082
4083
|
key: 1,
|
|
4083
4084
|
class: [className.value, "lupa-search-box-product-custom"]
|
|
4084
4085
|
}, vue.toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
4085
|
-
!label.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
4086
|
+
!label.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$L, vue.toDisplayString(text.value), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$y, [
|
|
4086
4087
|
vue.createElementVNode("div", _hoisted_4$q, vue.toDisplayString(label.value), 1),
|
|
4087
4088
|
vue.createElementVNode("div", _hoisted_5$f, vue.toDisplayString(text.value), 1)
|
|
4088
4089
|
]))
|
|
@@ -4169,13 +4170,33 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
4169
4170
|
const isMobileSidebarVisible = vue.ref(false);
|
|
4170
4171
|
const optionsStore = useOptionsStore();
|
|
4171
4172
|
const paramsStore = useParamsStore();
|
|
4173
|
+
const { searchResultOptions } = storeToRefs(optionsStore);
|
|
4172
4174
|
const facets = vue.computed(() => searchResult.value.facets);
|
|
4173
4175
|
const filters = vue.computed(() => searchResult.value.filters);
|
|
4174
4176
|
const currentQueryText = vue.computed(() => searchResult.value.searchText);
|
|
4175
4177
|
const totalItems = vue.computed(() => searchResult.value.total);
|
|
4176
4178
|
const hasResults = vue.computed(() => totalItems.value > 0);
|
|
4179
|
+
const priceKeys = vue.computed(() => {
|
|
4180
|
+
var _a, _b;
|
|
4181
|
+
return (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.priceKeys) != null ? _b : [];
|
|
4182
|
+
});
|
|
4183
|
+
const currency = vue.computed(() => {
|
|
4184
|
+
var _a, _b, _c;
|
|
4185
|
+
return (_c = (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.labels) == null ? void 0 : _b.currency) != null ? _c : "";
|
|
4186
|
+
});
|
|
4187
|
+
const priceSeparator = vue.computed(() => {
|
|
4188
|
+
var _a, _b, _c;
|
|
4189
|
+
return (_c = (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.labels) == null ? void 0 : _b.priceSeparator) != null ? _c : "";
|
|
4190
|
+
});
|
|
4177
4191
|
const labeledFilters = vue.computed(
|
|
4178
|
-
() => getLabeledFilters(
|
|
4192
|
+
() => getLabeledFilters(
|
|
4193
|
+
unfoldFilters(filters.value, {
|
|
4194
|
+
keys: priceKeys.value,
|
|
4195
|
+
currency: currency.value,
|
|
4196
|
+
separator: priceSeparator.value
|
|
4197
|
+
}),
|
|
4198
|
+
facets.value
|
|
4199
|
+
)
|
|
4179
4200
|
);
|
|
4180
4201
|
const displayFilters = vue.computed(() => {
|
|
4181
4202
|
var _a, _b;
|
|
@@ -4310,7 +4331,7 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
4310
4331
|
};
|
|
4311
4332
|
});
|
|
4312
4333
|
const _hoisted_1$11 = { class: "lupa-search-box-add-to-cart-wrapper" };
|
|
4313
|
-
const _hoisted_2$
|
|
4334
|
+
const _hoisted_2$K = { class: "lupa-search-box-product-addtocart" };
|
|
4314
4335
|
const _hoisted_3$x = ["onClick", "disabled"];
|
|
4315
4336
|
const _sfc_main$16 = /* @__PURE__ */ vue.defineComponent({
|
|
4316
4337
|
__name: "SearchBoxProductAddToCart",
|
|
@@ -4340,7 +4361,7 @@ const _sfc_main$16 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4340
4361
|
});
|
|
4341
4362
|
return (_ctx, _cache) => {
|
|
4342
4363
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$11, [
|
|
4343
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
4364
|
+
vue.createElementVNode("div", _hoisted_2$K, [
|
|
4344
4365
|
vue.createElementVNode("button", {
|
|
4345
4366
|
onClick: vue.withModifiers(handleClick, ["stop", "prevent"]),
|
|
4346
4367
|
class: vue.normalizeClass(loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart"),
|
|
@@ -4442,7 +4463,7 @@ const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadV
|
|
|
4442
4463
|
}
|
|
4443
4464
|
}));
|
|
4444
4465
|
const _hoisted_1$$ = { class: "lupa-badge-title" };
|
|
4445
|
-
const _hoisted_2$
|
|
4466
|
+
const _hoisted_2$J = ["src"];
|
|
4446
4467
|
const _hoisted_3$w = { key: 1 };
|
|
4447
4468
|
const _hoisted_4$p = {
|
|
4448
4469
|
key: 0,
|
|
@@ -4485,7 +4506,7 @@ const _sfc_main$14 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4485
4506
|
image.value ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
4486
4507
|
key: 0,
|
|
4487
4508
|
src: image.value
|
|
4488
|
-
}, null, 8, _hoisted_2$
|
|
4509
|
+
}, null, 8, _hoisted_2$J)) : vue.createCommentVNode("", true),
|
|
4489
4510
|
hasTitleText.value && showTitle.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$w, vue.toDisplayString(_ctx.badge.titleText), 1)) : vue.createCommentVNode("", true)
|
|
4490
4511
|
]),
|
|
4491
4512
|
hasAdditionalText.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$p, vue.toDisplayString(_ctx.badge.additionalText), 1)) : vue.createCommentVNode("", true)
|
|
@@ -4584,7 +4605,7 @@ const _sfc_main$11 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4584
4605
|
}
|
|
4585
4606
|
});
|
|
4586
4607
|
const _hoisted_1$X = { class: "lupa-image-badges" };
|
|
4587
|
-
const _hoisted_2$
|
|
4608
|
+
const _hoisted_2$I = ["src"];
|
|
4588
4609
|
const _sfc_main$10 = /* @__PURE__ */ vue.defineComponent({
|
|
4589
4610
|
__name: "ImageBadge",
|
|
4590
4611
|
props: {
|
|
@@ -4613,7 +4634,7 @@ const _sfc_main$10 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4613
4634
|
}, [
|
|
4614
4635
|
vue.createElementVNode("img", {
|
|
4615
4636
|
src: getImageUrl(item)
|
|
4616
|
-
}, null, 8, _hoisted_2$
|
|
4637
|
+
}, null, 8, _hoisted_2$I)
|
|
4617
4638
|
]);
|
|
4618
4639
|
}), 128))
|
|
4619
4640
|
]);
|
|
@@ -4705,7 +4726,7 @@ const _sfc_main$$ = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadVa
|
|
|
4705
4726
|
}
|
|
4706
4727
|
}));
|
|
4707
4728
|
const _hoisted_1$V = ["href"];
|
|
4708
|
-
const _hoisted_2$
|
|
4729
|
+
const _hoisted_2$H = { class: "lupa-search-box-product-image-section" };
|
|
4709
4730
|
const _hoisted_3$v = { class: "lupa-search-box-product-details-section" };
|
|
4710
4731
|
const _hoisted_4$o = {
|
|
4711
4732
|
key: 0,
|
|
@@ -4770,7 +4791,7 @@ const _sfc_main$_ = /* @__PURE__ */ vue.defineComponent({
|
|
|
4770
4791
|
"data-cy": "lupa-search-box-product",
|
|
4771
4792
|
onClick: handleClick
|
|
4772
4793
|
}), [
|
|
4773
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
4794
|
+
vue.createElementVNode("div", _hoisted_2$H, [
|
|
4774
4795
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(imageElements.value, (element) => {
|
|
4775
4796
|
return vue.openBlock(), vue.createBlock(_sfc_main$15, {
|
|
4776
4797
|
class: "lupa-search-box-product-element",
|
|
@@ -5129,7 +5150,7 @@ const _hoisted_1$T = {
|
|
|
5129
5150
|
key: 0,
|
|
5130
5151
|
id: "lupa-search-box-panel"
|
|
5131
5152
|
};
|
|
5132
|
-
const _hoisted_2$
|
|
5153
|
+
const _hoisted_2$G = ["data-cy"];
|
|
5133
5154
|
const _hoisted_3$u = {
|
|
5134
5155
|
key: 0,
|
|
5135
5156
|
class: "lupa-panel-title lupa-panel-title-top-results"
|
|
@@ -5337,7 +5358,7 @@ const _sfc_main$W = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadVa
|
|
|
5337
5358
|
key: "0"
|
|
5338
5359
|
} : void 0
|
|
5339
5360
|
]), 1064, ["panel", "options", "debounce", "inputValue", "labels"])) : vue.createCommentVNode("", true)
|
|
5340
|
-
], 10, _hoisted_2$
|
|
5361
|
+
], 10, _hoisted_2$G);
|
|
5341
5362
|
}), 128))
|
|
5342
5363
|
], 4),
|
|
5343
5364
|
!vue.unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (vue.openBlock(), vue.createBlock(_sfc_main$1i, {
|
|
@@ -5377,7 +5398,7 @@ const unbindSearchTriggers = (triggers = [], event) => {
|
|
|
5377
5398
|
elements.forEach((e) => e == null ? void 0 : e.removeEventListener(BIND_EVENT, event));
|
|
5378
5399
|
};
|
|
5379
5400
|
const _hoisted_1$S = { id: "lupa-search-box" };
|
|
5380
|
-
const _hoisted_2$
|
|
5401
|
+
const _hoisted_2$F = { class: "lupa-search-box-wrapper" };
|
|
5381
5402
|
const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
|
|
5382
5403
|
__name: "SearchBox",
|
|
5383
5404
|
props: {
|
|
@@ -5624,7 +5645,7 @@ const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
|
|
|
5624
5645
|
return (_ctx, _cache) => {
|
|
5625
5646
|
var _a2;
|
|
5626
5647
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$S, [
|
|
5627
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5648
|
+
vue.createElementVNode("div", _hoisted_2$F, [
|
|
5628
5649
|
vue.createVNode(_sfc_main$1m, {
|
|
5629
5650
|
options: inputOptions.value,
|
|
5630
5651
|
suggestedValue: suggestedValue.value,
|
|
@@ -5744,7 +5765,7 @@ const _hoisted_1$R = {
|
|
|
5744
5765
|
key: 0,
|
|
5745
5766
|
id: "lupa-search-results-did-you-mean"
|
|
5746
5767
|
};
|
|
5747
|
-
const _hoisted_2$
|
|
5768
|
+
const _hoisted_2$E = {
|
|
5748
5769
|
key: 0,
|
|
5749
5770
|
"data-cy": "suggested-search-text-label"
|
|
5750
5771
|
};
|
|
@@ -5786,7 +5807,7 @@ const _sfc_main$U = /* @__PURE__ */ vue.defineComponent({
|
|
|
5786
5807
|
};
|
|
5787
5808
|
return (_ctx, _cache) => {
|
|
5788
5809
|
return vue.unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$R, [
|
|
5789
|
-
vue.unref(searchResult).suggestedSearchText ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
5810
|
+
vue.unref(searchResult).suggestedSearchText ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$E, [
|
|
5790
5811
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.labels.noResultsSuggestion.split(" "), (label, index) => {
|
|
5791
5812
|
return vue.openBlock(), vue.createElementBlock("span", { key: index }, [
|
|
5792
5813
|
vue.createElementVNode("span", {
|
|
@@ -5815,7 +5836,7 @@ const _hoisted_1$Q = {
|
|
|
5815
5836
|
key: 0,
|
|
5816
5837
|
class: "lupa-search-results-summary"
|
|
5817
5838
|
};
|
|
5818
|
-
const _hoisted_2$
|
|
5839
|
+
const _hoisted_2$D = ["innerHTML"];
|
|
5819
5840
|
const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
|
|
5820
5841
|
__name: "SearchResultsSummary",
|
|
5821
5842
|
props: {
|
|
@@ -5832,7 +5853,7 @@ const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
|
|
|
5832
5853
|
});
|
|
5833
5854
|
return (_ctx, _cache) => {
|
|
5834
5855
|
return vue.unref(totalItems) > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$Q, [
|
|
5835
|
-
vue.createElementVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$
|
|
5856
|
+
vue.createElementVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$D),
|
|
5836
5857
|
_ctx.clearable ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5837
5858
|
key: 0,
|
|
5838
5859
|
class: "lupa-filter-clear",
|
|
@@ -5848,7 +5869,7 @@ const _hoisted_1$P = {
|
|
|
5848
5869
|
class: "lupa-result-page-title",
|
|
5849
5870
|
"data-cy": "lupa-result-page-title"
|
|
5850
5871
|
};
|
|
5851
|
-
const _hoisted_2$
|
|
5872
|
+
const _hoisted_2$C = { key: 0 };
|
|
5852
5873
|
const _hoisted_3$s = {
|
|
5853
5874
|
key: 1,
|
|
5854
5875
|
class: "lupa-results-total-count"
|
|
@@ -5887,12 +5908,16 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
|
|
|
5887
5908
|
var _a, _b;
|
|
5888
5909
|
return (_b = (_a = props.options.labels) == null ? void 0 : _a.itemCount) != null ? _b : "";
|
|
5889
5910
|
});
|
|
5911
|
+
const searchResultsCountLabel = vue.computed(() => {
|
|
5912
|
+
var _a, _b;
|
|
5913
|
+
return (_b = (_a = props.options.labels) == null ? void 0 : _a.searchResultsCount) != null ? _b : "";
|
|
5914
|
+
});
|
|
5890
5915
|
return (_ctx, _cache) => {
|
|
5891
5916
|
return vue.openBlock(), vue.createElementBlock("div", null, [
|
|
5892
5917
|
showSearchTitle.value ? (vue.openBlock(), vue.createElementBlock("h1", _hoisted_1$P, [
|
|
5893
5918
|
vue.createTextVNode(vue.toDisplayString(_ctx.options.labels.searchResults), 1),
|
|
5894
|
-
queryText.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$
|
|
5895
|
-
showProductCount.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$s, "(" + vue.toDisplayString(vue.unref(totalItems)) + ")", 1)) : vue.createCommentVNode("", true)
|
|
5919
|
+
queryText.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$C, "'" + vue.toDisplayString(queryText.value) + "'", 1)) : vue.createCommentVNode("", true),
|
|
5920
|
+
showProductCount.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$s, "(" + vue.toDisplayString(searchResultsCountLabel.value) + vue.toDisplayString(vue.unref(totalItems)) + ")", 1)) : vue.createCommentVNode("", true)
|
|
5896
5921
|
])) : vue.createCommentVNode("", true),
|
|
5897
5922
|
_ctx.showSummary ? (vue.openBlock(), vue.createBlock(_sfc_main$T, {
|
|
5898
5923
|
key: 1,
|
|
@@ -5908,7 +5933,7 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
|
|
|
5908
5933
|
}
|
|
5909
5934
|
});
|
|
5910
5935
|
const _hoisted_1$O = { class: "lupa-search-result-filter-value" };
|
|
5911
|
-
const _hoisted_2$
|
|
5936
|
+
const _hoisted_2$B = {
|
|
5912
5937
|
class: "lupa-current-filter-label",
|
|
5913
5938
|
"data-cy": "lupa-current-filter-label"
|
|
5914
5939
|
};
|
|
@@ -5933,14 +5958,14 @@ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
|
|
|
5933
5958
|
class: "lupa-current-filter-action",
|
|
5934
5959
|
onClick: handleClick
|
|
5935
5960
|
}, "⨉"),
|
|
5936
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5961
|
+
vue.createElementVNode("div", _hoisted_2$B, vue.toDisplayString(_ctx.filter.label) + ": ", 1),
|
|
5937
5962
|
vue.createElementVNode("div", _hoisted_3$r, vue.toDisplayString(_ctx.filter.value), 1)
|
|
5938
5963
|
]);
|
|
5939
5964
|
};
|
|
5940
5965
|
}
|
|
5941
5966
|
});
|
|
5942
5967
|
const _hoisted_1$N = { class: "lupa-filter-title-text" };
|
|
5943
|
-
const _hoisted_2$
|
|
5968
|
+
const _hoisted_2$A = {
|
|
5944
5969
|
key: 0,
|
|
5945
5970
|
class: "lupa-filter-count"
|
|
5946
5971
|
};
|
|
@@ -6012,7 +6037,7 @@ const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
|
|
|
6012
6037
|
}, [
|
|
6013
6038
|
vue.createElementVNode("div", _hoisted_1$N, [
|
|
6014
6039
|
vue.createTextVNode(vue.toDisplayString((_c = (_b = (_a = _ctx.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.title) != null ? _c : "") + " ", 1),
|
|
6015
|
-
_ctx.expandable ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$
|
|
6040
|
+
_ctx.expandable ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$A, " (" + vue.toDisplayString(vue.unref(currentFilterCount)) + ") ", 1)) : vue.createCommentVNode("", true)
|
|
6016
6041
|
]),
|
|
6017
6042
|
_ctx.expandable ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
6018
6043
|
key: 0,
|
|
@@ -6086,7 +6111,7 @@ const _hoisted_1$L = {
|
|
|
6086
6111
|
class: "lupa-category-filter",
|
|
6087
6112
|
"data-cy": "lupa-category-filter"
|
|
6088
6113
|
};
|
|
6089
|
-
const _hoisted_2$
|
|
6114
|
+
const _hoisted_2$z = { class: "lupa-category-back" };
|
|
6090
6115
|
const _hoisted_3$p = ["href"];
|
|
6091
6116
|
const _hoisted_4$j = ["href"];
|
|
6092
6117
|
const _hoisted_5$d = { class: "lupa-child-category-list" };
|
|
@@ -6177,7 +6202,7 @@ const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
|
|
|
6177
6202
|
__expose({ fetch: fetch2 });
|
|
6178
6203
|
return (_ctx, _cache) => {
|
|
6179
6204
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$L, [
|
|
6180
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
6205
|
+
vue.createElementVNode("div", _hoisted_2$z, [
|
|
6181
6206
|
hasBackButton.value ? (vue.openBlock(), vue.createElementBlock("a", {
|
|
6182
6207
|
key: 0,
|
|
6183
6208
|
"data-cy": "lupa-category-back",
|
|
@@ -6212,7 +6237,7 @@ const _hoisted_1$K = {
|
|
|
6212
6237
|
class: "lupa-search-result-facet-term-values",
|
|
6213
6238
|
"data-cy": "lupa-search-result-facet-term-values"
|
|
6214
6239
|
};
|
|
6215
|
-
const _hoisted_2$
|
|
6240
|
+
const _hoisted_2$y = ["placeholder"];
|
|
6216
6241
|
const _hoisted_3$o = { class: "lupa-terms-list" };
|
|
6217
6242
|
const _hoisted_4$i = ["onClick"];
|
|
6218
6243
|
const _hoisted_5$c = { class: "lupa-term-checkbox-wrapper" };
|
|
@@ -6300,7 +6325,7 @@ const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
|
|
|
6300
6325
|
"data-cy": "lupa-term-filter",
|
|
6301
6326
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
|
|
6302
6327
|
placeholder: _ctx.options.labels.facetFilter
|
|
6303
|
-
}, null, 8, _hoisted_2$
|
|
6328
|
+
}, null, 8, _hoisted_2$y)), [
|
|
6304
6329
|
[vue.vModelText, termFilter.value]
|
|
6305
6330
|
]) : vue.createCommentVNode("", true),
|
|
6306
6331
|
vue.createElementVNode("div", _hoisted_3$o, [
|
|
@@ -7312,7 +7337,7 @@ m.render = function(e, t, r, i, n, o) {
|
|
|
7312
7337
|
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps(e.sliderProps, { ref: "slider" }), null, 16);
|
|
7313
7338
|
}, m.__file = "src/Slider.vue";
|
|
7314
7339
|
const _hoisted_1$J = { class: "lupa-search-result-facet-stats-values" };
|
|
7315
|
-
const _hoisted_2$
|
|
7340
|
+
const _hoisted_2$x = {
|
|
7316
7341
|
key: 0,
|
|
7317
7342
|
class: "lupa-stats-facet-summary"
|
|
7318
7343
|
};
|
|
@@ -7372,6 +7397,10 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
|
7372
7397
|
var _a;
|
|
7373
7398
|
return (_a = searchResultOptions.value) == null ? void 0 : _a.labels.currency;
|
|
7374
7399
|
});
|
|
7400
|
+
const priceKeys = vue.computed(() => {
|
|
7401
|
+
var _a, _b;
|
|
7402
|
+
return (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.priceKeys) != null ? _b : [];
|
|
7403
|
+
});
|
|
7375
7404
|
const isSliderVisible = vue.computed(() => {
|
|
7376
7405
|
var _a, _b;
|
|
7377
7406
|
return Boolean((_b = (_a = props.options.stats) == null ? void 0 : _a.slider) != null ? _b : true);
|
|
@@ -7435,8 +7464,8 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
|
7435
7464
|
}
|
|
7436
7465
|
});
|
|
7437
7466
|
const isPrice = vue.computed(() => {
|
|
7438
|
-
var _a;
|
|
7439
|
-
return (_a = facetValue.value.key) == null ? void 0 :
|
|
7467
|
+
var _a, _b, _c;
|
|
7468
|
+
return ((_b = (_a = facetValue.value) == null ? void 0 : _a.key) == null ? void 0 : _b.includes(CURRENCY_KEY_INDICATOR)) || ((_c = priceKeys.value) == null ? void 0 : _c.includes(facetValue.value.key));
|
|
7440
7469
|
});
|
|
7441
7470
|
const facetMin = vue.computed(() => {
|
|
7442
7471
|
return Math.floor(facetValue.value.min);
|
|
@@ -7509,7 +7538,7 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
|
7509
7538
|
};
|
|
7510
7539
|
return (_ctx, _cache) => {
|
|
7511
7540
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$J, [
|
|
7512
|
-
!isInputVisible.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
7541
|
+
!isInputVisible.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$x, vue.toDisplayString(statsSummary.value), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$n, [
|
|
7513
7542
|
vue.createElementVNode("div", null, [
|
|
7514
7543
|
rangeLabelFrom.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$h, vue.toDisplayString(rangeLabelFrom.value), 1)) : vue.createCommentVNode("", true),
|
|
7515
7544
|
vue.createElementVNode("div", _hoisted_5$b, [
|
|
@@ -7576,7 +7605,7 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
|
7576
7605
|
}
|
|
7577
7606
|
});
|
|
7578
7607
|
const _hoisted_1$I = { class: "lupa-term-checkbox-wrapper" };
|
|
7579
|
-
const _hoisted_2$
|
|
7608
|
+
const _hoisted_2$w = { class: "lupa-term-checkbox-label" };
|
|
7580
7609
|
const _hoisted_3$m = { class: "lupa-term-label" };
|
|
7581
7610
|
const _hoisted_4$g = {
|
|
7582
7611
|
key: 0,
|
|
@@ -7637,7 +7666,7 @@ const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
|
|
|
7637
7666
|
class: vue.normalizeClass(["lupa-term-checkbox", { checked: isChecked.value }])
|
|
7638
7667
|
}, null, 2)
|
|
7639
7668
|
]),
|
|
7640
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
7669
|
+
vue.createElementVNode("div", _hoisted_2$w, [
|
|
7641
7670
|
vue.createElementVNode("span", _hoisted_3$m, vue.toDisplayString(_ctx.item.title) + vue.toDisplayString(" "), 1),
|
|
7642
7671
|
_ctx.options.showDocumentCount ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$g, "(" + vue.toDisplayString(_ctx.item.count) + ")", 1)) : vue.createCommentVNode("", true)
|
|
7643
7672
|
])
|
|
@@ -7662,7 +7691,7 @@ const _hoisted_1$H = {
|
|
|
7662
7691
|
class: "lupa-search-result-facet-term-values lupa-search-result-facet-hierarchy-values",
|
|
7663
7692
|
"data-cy": "lupa-search-result-facet-term-values"
|
|
7664
7693
|
};
|
|
7665
|
-
const _hoisted_2$
|
|
7694
|
+
const _hoisted_2$v = { key: 0 };
|
|
7666
7695
|
const _hoisted_3$l = ["placeholder"];
|
|
7667
7696
|
const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
|
|
7668
7697
|
__name: "HierarchyFacet",
|
|
@@ -7715,7 +7744,7 @@ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
|
|
|
7715
7744
|
};
|
|
7716
7745
|
return (_ctx, _cache) => {
|
|
7717
7746
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$H, [
|
|
7718
|
-
isFilterable.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
7747
|
+
isFilterable.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$v, [
|
|
7719
7748
|
vue.withDirectives(vue.createElementVNode("input", {
|
|
7720
7749
|
class: "lupa-term-filter",
|
|
7721
7750
|
"data-cy": "lupa-term-filter",
|
|
@@ -7747,7 +7776,7 @@ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
|
|
|
7747
7776
|
}
|
|
7748
7777
|
});
|
|
7749
7778
|
const _hoisted_1$G = { class: "lupa-facet-label-text" };
|
|
7750
|
-
const _hoisted_2$
|
|
7779
|
+
const _hoisted_2$u = {
|
|
7751
7780
|
key: 0,
|
|
7752
7781
|
class: "lupa-facet-content",
|
|
7753
7782
|
"data-cy": "lupa-facet-content"
|
|
@@ -7876,7 +7905,7 @@ const _sfc_main$J = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadVa
|
|
|
7876
7905
|
class: vue.normalizeClass(["lupa-facet-label-caret", isOpen.value && "open"])
|
|
7877
7906
|
}, null, 2)
|
|
7878
7907
|
], 2),
|
|
7879
|
-
isOpen.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
7908
|
+
isOpen.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$u, [
|
|
7880
7909
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(facetType.value), {
|
|
7881
7910
|
facet: facet.value,
|
|
7882
7911
|
currentFilters: currentFilters.value[facet.value.key],
|
|
@@ -7895,7 +7924,7 @@ const _sfc_main$J = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadVa
|
|
|
7895
7924
|
}
|
|
7896
7925
|
}));
|
|
7897
7926
|
const _hoisted_1$F = { class: "lupa-search-result-facet-section" };
|
|
7898
|
-
const _hoisted_2$
|
|
7927
|
+
const _hoisted_2$t = {
|
|
7899
7928
|
key: 0,
|
|
7900
7929
|
class: "lupa-facets-title"
|
|
7901
7930
|
};
|
|
@@ -7934,7 +7963,7 @@ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
|
|
|
7934
7963
|
return (_ctx, _cache) => {
|
|
7935
7964
|
var _a;
|
|
7936
7965
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$F, [
|
|
7937
|
-
_ctx.options.labels.title ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
7966
|
+
_ctx.options.labels.title ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$t, vue.toDisplayString(_ctx.options.labels.title), 1)) : vue.createCommentVNode("", true),
|
|
7938
7967
|
vue.createElementVNode("div", {
|
|
7939
7968
|
class: vue.normalizeClass(["lupa-search-result-facet-list", "lupa-" + ((_a = _ctx.facetStyle) != null ? _a : "")])
|
|
7940
7969
|
}, [
|
|
@@ -7981,6 +8010,7 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
|
|
|
7981
8010
|
}
|
|
7982
8011
|
});
|
|
7983
8012
|
const _hoisted_1$D = { class: "lupa-search-result-facets" };
|
|
8013
|
+
const _hoisted_2$s = { class: "lupa-facets-filter-button-wrapper" };
|
|
7984
8014
|
const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
|
|
7985
8015
|
__name: "Facets",
|
|
7986
8016
|
props: {
|
|
@@ -8075,11 +8105,13 @@ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
|
|
|
8075
8105
|
onSelect: handleFacetSelect,
|
|
8076
8106
|
onClear: clear
|
|
8077
8107
|
}, null, 8, ["options", "facets", "currentFilters", "facetStyle", "clearable"])) : vue.createCommentVNode("", true),
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8108
|
+
vue.createElementVNode("div", _hoisted_2$s, [
|
|
8109
|
+
showFilterButton.value ? (vue.openBlock(), vue.createBlock(_sfc_main$H, {
|
|
8110
|
+
key: 0,
|
|
8111
|
+
options: _ctx.options,
|
|
8112
|
+
onFilter: filter
|
|
8113
|
+
}, null, 8, ["options"])) : vue.createCommentVNode("", true)
|
|
8114
|
+
])
|
|
8083
8115
|
]);
|
|
8084
8116
|
};
|
|
8085
8117
|
}
|
|
@@ -9099,7 +9131,8 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
|
9099
9131
|
item: {},
|
|
9100
9132
|
options: {}
|
|
9101
9133
|
},
|
|
9102
|
-
|
|
9134
|
+
emits: ["productEvent"],
|
|
9135
|
+
setup(__props, { emit }) {
|
|
9103
9136
|
const props = __props;
|
|
9104
9137
|
const text = vue.computed(() => {
|
|
9105
9138
|
return props.options.html(props.item);
|
|
@@ -9111,6 +9144,9 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
|
9111
9144
|
if (!props.options.action) {
|
|
9112
9145
|
return;
|
|
9113
9146
|
}
|
|
9147
|
+
if (props.options.reportEventOnClick) {
|
|
9148
|
+
emit("productEvent", { type: props.options.reportEventOnClick });
|
|
9149
|
+
}
|
|
9114
9150
|
yield props.options.action(props.item);
|
|
9115
9151
|
});
|
|
9116
9152
|
return (_ctx, _cache) => {
|
|
@@ -9423,7 +9459,8 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
|
9423
9459
|
key: element.key,
|
|
9424
9460
|
labels: labels.value,
|
|
9425
9461
|
inStock: isInStock.value,
|
|
9426
|
-
link: link.value
|
|
9462
|
+
link: link.value,
|
|
9463
|
+
onProductEvent: handleProductEvent
|
|
9427
9464
|
}, null, 8, ["item", "element", "labels", "inStock", "link"]);
|
|
9428
9465
|
}), 128)),
|
|
9429
9466
|
vue.createVNode(_sfc_main$$, {
|
|
@@ -9752,7 +9789,7 @@ const _hoisted_2$b = {
|
|
|
9752
9789
|
"data-cy": "lupa-products"
|
|
9753
9790
|
};
|
|
9754
9791
|
const _hoisted_3$6 = {
|
|
9755
|
-
key:
|
|
9792
|
+
key: 1,
|
|
9756
9793
|
class: "lupa-empty-results",
|
|
9757
9794
|
"data-cy": "lupa-no-results-in-page"
|
|
9758
9795
|
};
|
|
@@ -9822,6 +9859,10 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
9822
9859
|
var _a;
|
|
9823
9860
|
return currentFilterToolbarVisible.value ? (_a = props.options.filters) == null ? void 0 : _a.currentFilters : void 0;
|
|
9824
9861
|
});
|
|
9862
|
+
const currentFilterPositionDesktop = vue.computed(() => {
|
|
9863
|
+
var _a, _b, _c;
|
|
9864
|
+
return ((_c = (_b = (_a = props.options.filters) == null ? void 0 : _a.currentFilters) == null ? void 0 : _b.desktopToolbar) == null ? void 0 : _c.position) || "pageTop";
|
|
9865
|
+
});
|
|
9825
9866
|
const currentFiltersClass = vue.computed(() => {
|
|
9826
9867
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
9827
9868
|
if (!currentFilterToolbarVisible.value) {
|
|
@@ -9883,7 +9924,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
9883
9924
|
"pagination-location": "top",
|
|
9884
9925
|
onFilter: filter
|
|
9885
9926
|
}, null, 8, ["options"])) : vue.createCommentVNode("", true),
|
|
9886
|
-
currentFilterOptions.value ? (vue.openBlock(), vue.createBlock(_sfc_main$Q, {
|
|
9927
|
+
currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (vue.openBlock(), vue.createBlock(_sfc_main$Q, {
|
|
9887
9928
|
key: 2,
|
|
9888
9929
|
class: vue.normalizeClass(currentFiltersClass.value),
|
|
9889
9930
|
"data-cy": "lupa-search-result-filters-mobile-toolbar",
|
|
@@ -9902,6 +9943,13 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
9902
9943
|
options: _ctx.options,
|
|
9903
9944
|
"pagination-location": "top"
|
|
9904
9945
|
}, null, 8, ["options"]),
|
|
9946
|
+
currentFilterOptions.value && currentFilterPositionDesktop.value === "resultsTop" ? (vue.openBlock(), vue.createBlock(_sfc_main$Q, {
|
|
9947
|
+
key: 0,
|
|
9948
|
+
class: vue.normalizeClass(currentFiltersClass.value),
|
|
9949
|
+
"data-cy": "lupa-search-result-filters-mobile-toolbar",
|
|
9950
|
+
options: currentFilterOptions.value,
|
|
9951
|
+
expandable: !desktopFiltersExpanded.value
|
|
9952
|
+
}, null, 8, ["class", "options", "expandable"])) : vue.createCommentVNode("", true),
|
|
9905
9953
|
vue.createElementVNode("div", _hoisted_2$b, [
|
|
9906
9954
|
_ctx.$slots.productCard ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(vue.unref(searchResult).items, (product, index) => {
|
|
9907
9955
|
return vue.renderSlot(_ctx.$slots, "productCard", {
|