@getlupa/vue 0.14.3 → 0.14.5
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/lupaContainerStyle.css +1 -1
- package/dist/lupaSearch.js +176 -55
- package/dist/lupaSearch.mjs +177 -56
- package/dist/src/stores/searchResult.d.ts +8 -2
- package/dist/src/types/DocumentElement.d.ts +5 -0
- package/dist/src/types/search-box/SearchBoxPanel.d.ts +1 -0
- package/dist/src/utils/grid.utils.d.ts +3 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/lupaSearch.mjs
CHANGED
|
@@ -49,7 +49,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
49
49
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
|
-
import { toRaw, isRef, isReactive, toRef, effectScope, ref, markRaw, hasInjectionContext, inject, getCurrentInstance, watch, reactive, nextTick, computed, unref, getCurrentScope, onScopeDispose, toRefs, defineComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, withDirectives, mergeProps, vModelText, createCommentVNode, toDisplayString, onMounted, onBeforeMount, Fragment, renderList, createBlock, onBeforeUnmount, Transition, withCtx, toHandlers, withModifiers, resolveDynamicComponent, renderSlot,
|
|
52
|
+
import { toRaw, isRef, isReactive, toRef, effectScope, ref, markRaw, hasInjectionContext, inject, getCurrentInstance, watch, reactive, nextTick, computed, unref, getCurrentScope, onScopeDispose, toRefs, defineComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, withDirectives, mergeProps, vModelText, createCommentVNode, toDisplayString, onMounted, onBeforeMount, Fragment, renderList, createBlock, onBeforeUnmount, normalizeStyle, Transition, withCtx, toHandlers, withModifiers, resolveDynamicComponent, renderSlot, createSlots, createVNode, createTextVNode, normalizeProps, guardReactiveProps, onUnmounted, resolveComponent, vModelSelect, h as h$1, provide, cloneVNode } from "vue";
|
|
53
53
|
var isVue2 = false;
|
|
54
54
|
function set(target, key, val) {
|
|
55
55
|
if (Array.isArray(target)) {
|
|
@@ -3595,6 +3595,34 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
3595
3595
|
};
|
|
3596
3596
|
}
|
|
3597
3597
|
});
|
|
3598
|
+
const generateGridTemplate = (elements) => {
|
|
3599
|
+
const indexedElements = elements.map((el, index) => __spreadProps(__spreadValues({}, el), { index }));
|
|
3600
|
+
if (!indexedElements.length || !indexedElements.every((el) => el.gridArea === "left" || el.gridArea === "right")) {
|
|
3601
|
+
return void 0;
|
|
3602
|
+
}
|
|
3603
|
+
let leftElements = indexedElements.filter((el) => el.gridArea === "left");
|
|
3604
|
+
let rightElements = indexedElements.filter((el) => el.gridArea === "right");
|
|
3605
|
+
if (!leftElements.length && !rightElements.length) {
|
|
3606
|
+
return "";
|
|
3607
|
+
} else if (!leftElements.length) {
|
|
3608
|
+
leftElements = rightElements;
|
|
3609
|
+
} else if (!rightElements.length) {
|
|
3610
|
+
rightElements = leftElements;
|
|
3611
|
+
}
|
|
3612
|
+
const totalRows = Math.max(leftElements.length, rightElements.length);
|
|
3613
|
+
const gridTemplate = [];
|
|
3614
|
+
for (let row = 0; row < totalRows; row++) {
|
|
3615
|
+
const leftIndex = row < leftElements.length ? row : leftElements.length - 1;
|
|
3616
|
+
const rightIndex = row < rightElements.length ? row : rightElements.length - 1;
|
|
3617
|
+
const leftElement = leftElements[leftIndex];
|
|
3618
|
+
const rightElement = rightElements[rightIndex];
|
|
3619
|
+
const leftColumn = `${leftElement.gridArea}${leftElement.index}`;
|
|
3620
|
+
const rightColumn = `${rightElement.gridArea}${rightElement.index}`;
|
|
3621
|
+
const gridRow = `${leftColumn} ${rightColumn}`;
|
|
3622
|
+
gridTemplate.push(`"${gridRow}"`);
|
|
3623
|
+
}
|
|
3624
|
+
return gridTemplate.join(" ");
|
|
3625
|
+
};
|
|
3598
3626
|
const _hoisted_1$19 = ["innerHTML"];
|
|
3599
3627
|
const _hoisted_2$Q = {
|
|
3600
3628
|
key: 1,
|
|
@@ -3793,6 +3821,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
3793
3821
|
});
|
|
3794
3822
|
};
|
|
3795
3823
|
const getSuggestionsDebounced = debounce$1(getSuggestions, props.debounce);
|
|
3824
|
+
watch(() => props.panel.limit, getSuggestionsDebounced);
|
|
3796
3825
|
return (_ctx, _cache) => {
|
|
3797
3826
|
return openBlock(), createBlock(_sfc_main$1h, {
|
|
3798
3827
|
items: searchResult.value,
|
|
@@ -12963,6 +12992,25 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
12963
12992
|
var _a;
|
|
12964
12993
|
return Boolean((_a = hoverImages.value) == null ? void 0 : _a.length);
|
|
12965
12994
|
});
|
|
12995
|
+
const widthOverride = computed(() => {
|
|
12996
|
+
var _a, _b;
|
|
12997
|
+
return (_b = (_a = props.options.dimensions) == null ? void 0 : _a.width) != null ? _b : void 0;
|
|
12998
|
+
});
|
|
12999
|
+
const heightOverride = computed(() => {
|
|
13000
|
+
var _a, _b;
|
|
13001
|
+
return (_b = (_a = props.options.dimensions) == null ? void 0 : _a.height) != null ? _b : void 0;
|
|
13002
|
+
});
|
|
13003
|
+
const objectFitOverride = computed(() => {
|
|
13004
|
+
var _a, _b;
|
|
13005
|
+
return (_b = (_a = props.options.dimensions) == null ? void 0 : _a.objectFit) != null ? _b : void 0;
|
|
13006
|
+
});
|
|
13007
|
+
const styleOverride = computed(() => {
|
|
13008
|
+
return {
|
|
13009
|
+
width: widthOverride.value ? `${widthOverride.value}px` : void 0,
|
|
13010
|
+
height: heightOverride.value ? `${heightOverride.value}px` : void 0,
|
|
13011
|
+
objectFit: objectFitOverride.value ? objectFitOverride.value : void 0
|
|
13012
|
+
};
|
|
13013
|
+
});
|
|
12966
13014
|
const replaceWithPlaceholder = (e2) => {
|
|
12967
13015
|
replaceImageWithPlaceholder(e2, placeholder.value);
|
|
12968
13016
|
};
|
|
@@ -13027,6 +13075,7 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
13027
13075
|
return (_ctx, _cache) => {
|
|
13028
13076
|
return openBlock(), createElementBlock("div", {
|
|
13029
13077
|
class: normalizeClass({ [_ctx.wrapperClass]: Boolean(_ctx.wrapperClass), "lupa-images-hover": isHover.value }),
|
|
13078
|
+
style: normalizeStyle(styleOverride.value),
|
|
13030
13079
|
onMouseenter: handleMouseEnter,
|
|
13031
13080
|
onMouseleave: handleMouseLeave
|
|
13032
13081
|
}, [
|
|
@@ -13037,6 +13086,7 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
13037
13086
|
default: withCtx(() => [
|
|
13038
13087
|
(openBlock(), createElementBlock("img", mergeProps({
|
|
13039
13088
|
class: ["lupa-images-hover-image", { [_ctx.imageClass]: true, "lupa-images-hover-image": isHover.value }],
|
|
13089
|
+
style: styleOverride.value,
|
|
13040
13090
|
src: finalUrl.value
|
|
13041
13091
|
}, { alt: imageAlt.value ? imageAlt.value : void 0 }, {
|
|
13042
13092
|
onError: replaceWithPlaceholder,
|
|
@@ -13047,9 +13097,10 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
13047
13097
|
})) : (openBlock(), createElementBlock("img", mergeProps({
|
|
13048
13098
|
key: 1,
|
|
13049
13099
|
class: ["lupa-images-main-image", { [_ctx.imageClass]: true }],
|
|
13100
|
+
style: styleOverride.value,
|
|
13050
13101
|
src: finalMainImageUrl.value
|
|
13051
13102
|
}, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_2$P))
|
|
13052
|
-
],
|
|
13103
|
+
], 38);
|
|
13053
13104
|
};
|
|
13054
13105
|
}
|
|
13055
13106
|
});
|
|
@@ -13313,6 +13364,7 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
13313
13364
|
const layout = ref(ResultsLayoutEnum.GRID);
|
|
13314
13365
|
const loading = ref(false);
|
|
13315
13366
|
const isMobileSidebarVisible = ref(false);
|
|
13367
|
+
const relatedCategoryChildren = ref([]);
|
|
13316
13368
|
const optionsStore = useOptionsStore();
|
|
13317
13369
|
const paramsStore = useParamsStore();
|
|
13318
13370
|
const screenStore = useScreenStore();
|
|
@@ -13454,6 +13506,9 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
13454
13506
|
const hasExactMatch = items.some((item) => getNormalizedString(item.title) === searchInput);
|
|
13455
13507
|
return hasExactMatch ? items.filter((item) => getNormalizedString(item.title) === searchInput) : items;
|
|
13456
13508
|
};
|
|
13509
|
+
const setRelatedCategoryChildren = (children) => {
|
|
13510
|
+
relatedCategoryChildren.value = [...children];
|
|
13511
|
+
};
|
|
13457
13512
|
return {
|
|
13458
13513
|
isMobileSidebarVisible,
|
|
13459
13514
|
searchResult,
|
|
@@ -13474,6 +13529,7 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
13474
13529
|
itemRange,
|
|
13475
13530
|
isPageEmpty,
|
|
13476
13531
|
hideFiltersOnExactMatchForKeys,
|
|
13532
|
+
relatedCategoryChildren,
|
|
13477
13533
|
setSidebarState,
|
|
13478
13534
|
queryFacet,
|
|
13479
13535
|
add,
|
|
@@ -13482,7 +13538,8 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
13482
13538
|
setLayout,
|
|
13483
13539
|
setLoading,
|
|
13484
13540
|
clearSearchResult,
|
|
13485
|
-
filterVisibleFilterValues
|
|
13541
|
+
filterVisibleFilterValues,
|
|
13542
|
+
setRelatedCategoryChildren
|
|
13486
13543
|
};
|
|
13487
13544
|
});
|
|
13488
13545
|
const _hoisted_1$11 = { class: "lupa-search-box-add-to-cart-wrapper" };
|
|
@@ -13899,9 +13956,8 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValue
|
|
|
13899
13956
|
}
|
|
13900
13957
|
}));
|
|
13901
13958
|
const _hoisted_1$V = ["href"];
|
|
13902
|
-
const _hoisted_2$I = { class: "lupa-search-box-product-
|
|
13903
|
-
const _hoisted_3$w = {
|
|
13904
|
-
const _hoisted_4$p = {
|
|
13959
|
+
const _hoisted_2$I = { class: "lupa-search-box-product-details-section" };
|
|
13960
|
+
const _hoisted_3$w = {
|
|
13905
13961
|
key: 0,
|
|
13906
13962
|
class: "lupa-search-box-product-add-to-cart-section"
|
|
13907
13963
|
};
|
|
@@ -13929,6 +13985,25 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
13929
13985
|
var _a, _b;
|
|
13930
13986
|
return (_b = (_a = props.panelOptions.elements) == null ? void 0 : _a.filter((e2) => e2.type === DocumentElementType.IMAGE)) != null ? _b : [];
|
|
13931
13987
|
});
|
|
13988
|
+
const mainImageElement = computed(() => {
|
|
13989
|
+
return imageElements.value[0];
|
|
13990
|
+
});
|
|
13991
|
+
const widthOverride = computed(() => {
|
|
13992
|
+
var _a, _b, _c;
|
|
13993
|
+
return (_c = (_b = (_a = mainImageElement.value) == null ? void 0 : _a.dimensions) == null ? void 0 : _b.width) != null ? _c : void 0;
|
|
13994
|
+
});
|
|
13995
|
+
const heightOverride = computed(() => {
|
|
13996
|
+
var _a, _b, _c;
|
|
13997
|
+
return (_c = (_b = (_a = mainImageElement.value) == null ? void 0 : _a.dimensions) == null ? void 0 : _b.height) != null ? _c : void 0;
|
|
13998
|
+
});
|
|
13999
|
+
const imageStyleOverride = computed(() => {
|
|
14000
|
+
var _a;
|
|
14001
|
+
return ((_a = mainImageElement.value) == null ? void 0 : _a.dimensions) ? {
|
|
14002
|
+
width: widthOverride.value ? `${widthOverride.value}px` : void 0,
|
|
14003
|
+
height: heightOverride.value ? `${heightOverride.value}px` : void 0,
|
|
14004
|
+
minWidth: widthOverride.value ? `${widthOverride.value + 10}px` : void 0
|
|
14005
|
+
} : {};
|
|
14006
|
+
});
|
|
13932
14007
|
const detailElements = computed(() => {
|
|
13933
14008
|
var _a, _b;
|
|
13934
14009
|
return (_b = (_a = props.panelOptions.elements) == null ? void 0 : _a.filter(
|
|
@@ -13967,7 +14042,10 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
13967
14042
|
"data-cy": "lupa-search-box-product",
|
|
13968
14043
|
onClick: handleClick
|
|
13969
14044
|
}), [
|
|
13970
|
-
createElementVNode("div",
|
|
14045
|
+
createElementVNode("div", {
|
|
14046
|
+
class: "lupa-search-box-product-image-section",
|
|
14047
|
+
style: normalizeStyle(imageStyleOverride.value)
|
|
14048
|
+
}, [
|
|
13971
14049
|
(openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
|
|
13972
14050
|
return openBlock(), createBlock(_sfc_main$16, {
|
|
13973
14051
|
class: "lupa-search-box-product-element",
|
|
@@ -13978,8 +14056,8 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
13978
14056
|
link: link.value
|
|
13979
14057
|
}, null, 8, ["item", "element", "labels", "link"]);
|
|
13980
14058
|
}), 128))
|
|
13981
|
-
]),
|
|
13982
|
-
createElementVNode("div",
|
|
14059
|
+
], 4),
|
|
14060
|
+
createElementVNode("div", _hoisted_2$I, [
|
|
13983
14061
|
(openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
|
|
13984
14062
|
var _a;
|
|
13985
14063
|
return openBlock(), createBlock(_sfc_main$16, {
|
|
@@ -14003,7 +14081,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
14003
14081
|
]), 1032, ["item", "element", "labels", "link"]);
|
|
14004
14082
|
}), 128))
|
|
14005
14083
|
]),
|
|
14006
|
-
addToCartElement.value ? (openBlock(), createElementBlock("div",
|
|
14084
|
+
addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_3$w, [
|
|
14007
14085
|
createVNode(_sfc_main$16, {
|
|
14008
14086
|
class: "lupa-search-box-product-element",
|
|
14009
14087
|
item: _ctx.item,
|
|
@@ -14261,6 +14339,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
14261
14339
|
});
|
|
14262
14340
|
};
|
|
14263
14341
|
const getItemsDebounced = debounce$1(getItems, props.debounce);
|
|
14342
|
+
watch(() => props.panel.limit, getItemsDebounced);
|
|
14264
14343
|
return (_ctx, _cache) => {
|
|
14265
14344
|
var _a, _b;
|
|
14266
14345
|
return openBlock(), createBlock(_sfc_main$_, {
|
|
@@ -14393,7 +14472,7 @@ const _hoisted_3$v = {
|
|
|
14393
14472
|
key: 0,
|
|
14394
14473
|
class: "lupa-panel-title lupa-panel-title-top-results"
|
|
14395
14474
|
};
|
|
14396
|
-
const _hoisted_4$
|
|
14475
|
+
const _hoisted_4$p = {
|
|
14397
14476
|
key: 1,
|
|
14398
14477
|
class: "lupa-panel-title"
|
|
14399
14478
|
};
|
|
@@ -14449,6 +14528,13 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
14449
14528
|
const displayPanels = computed(
|
|
14450
14529
|
() => props.isSearchContainer ? panels.value.filter((p2) => p2.type === SearchBoxPanelType.SUGGESTION) : panels.value
|
|
14451
14530
|
);
|
|
14531
|
+
const gridTemplate = computed(() => generateGridTemplate(panels.value));
|
|
14532
|
+
const styleOverrides = computed(() => {
|
|
14533
|
+
return {
|
|
14534
|
+
display: expandOnSinglePanel.value ? "block" : "grid",
|
|
14535
|
+
gridTemplateAreas: gridTemplate.value ? gridTemplate.value : "left right"
|
|
14536
|
+
};
|
|
14537
|
+
});
|
|
14452
14538
|
const getInput = (panel) => {
|
|
14453
14539
|
var _a, _b;
|
|
14454
14540
|
if (panel.type === SearchBoxPanelType.SUGGESTION || !panel.searchBySuggestion) {
|
|
@@ -14475,6 +14561,9 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
14475
14561
|
searchBoxStore.resetHighlightIndex();
|
|
14476
14562
|
});
|
|
14477
14563
|
const handleNavigation = (e2) => {
|
|
14564
|
+
if (!props.focused) {
|
|
14565
|
+
return;
|
|
14566
|
+
}
|
|
14478
14567
|
switch (e2.key) {
|
|
14479
14568
|
case "ArrowDown":
|
|
14480
14569
|
e2.preventDefault();
|
|
@@ -14562,7 +14651,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
14562
14651
|
}, toDisplayString(labels.value.closePanel), 1)) : createCommentVNode("", true),
|
|
14563
14652
|
createElementVNode("div", {
|
|
14564
14653
|
class: "lupa-main-panel",
|
|
14565
|
-
style: normalizeStyle(
|
|
14654
|
+
style: normalizeStyle(styleOverrides.value),
|
|
14566
14655
|
"data-cy": "lupa-main-panel"
|
|
14567
14656
|
}, [
|
|
14568
14657
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayPanels.value, (panel, index) => {
|
|
@@ -14573,10 +14662,11 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
14573
14662
|
"lupa-panel-" + panel.type + "-index",
|
|
14574
14663
|
panel.customClassName ? panel.customClassName : ""
|
|
14575
14664
|
]),
|
|
14665
|
+
style: normalizeStyle(panel.gridArea ? { gridArea: `${panel.gridArea}${index}` } : {}),
|
|
14576
14666
|
"data-cy": "lupa-panel-" + panel.type + "-index"
|
|
14577
14667
|
}, [
|
|
14578
14668
|
((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$v, toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : createCommentVNode("", true),
|
|
14579
|
-
((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
14669
|
+
((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$p, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
|
|
14580
14670
|
panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
|
|
14581
14671
|
key: 2,
|
|
14582
14672
|
panel,
|
|
@@ -14598,7 +14688,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
14598
14688
|
key: "0"
|
|
14599
14689
|
} : void 0
|
|
14600
14690
|
]), 1064, ["panel", "search-box-options", "options", "debounce", "inputValue", "labels"])) : createCommentVNode("", true)
|
|
14601
|
-
],
|
|
14691
|
+
], 14, _hoisted_2$G);
|
|
14602
14692
|
}), 128))
|
|
14603
14693
|
], 4),
|
|
14604
14694
|
!unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1j, {
|
|
@@ -14662,6 +14752,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
14662
14752
|
const inputValue = ref("");
|
|
14663
14753
|
const suggestedValue = ref(defaultSuggestedValue);
|
|
14664
14754
|
const opened = ref(props.isSearchContainer);
|
|
14755
|
+
const focused = ref(false);
|
|
14665
14756
|
const searchBoxInput = ref(null);
|
|
14666
14757
|
const { highlightedDocument } = storeToRefs(searchBoxStore);
|
|
14667
14758
|
const searchValue = computed(() => {
|
|
@@ -14720,6 +14811,9 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
14720
14811
|
const elementClass = (_b = (_a2 = e2.target) == null ? void 0 : _a2.className) != null ? _b : "";
|
|
14721
14812
|
const hasLupaClass = typeof elementClass.includes == "function" && elementClass.includes("lupa-search-box");
|
|
14722
14813
|
const isOutsideElement = el && !el.contains(e2.target) && !hasLupaClass;
|
|
14814
|
+
if (isOutsideElement && props.options.keepOpen) {
|
|
14815
|
+
focused.value = false;
|
|
14816
|
+
}
|
|
14723
14817
|
if (!isOutsideElement || props.options.keepOpen) {
|
|
14724
14818
|
return;
|
|
14725
14819
|
}
|
|
@@ -14728,11 +14822,12 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
14728
14822
|
};
|
|
14729
14823
|
const close = () => {
|
|
14730
14824
|
opened.value = false;
|
|
14825
|
+
focused.value = false;
|
|
14731
14826
|
suggestedValue.value = defaultSuggestedValue;
|
|
14732
14827
|
};
|
|
14733
14828
|
const handleKeyDown = (e2) => {
|
|
14734
14829
|
var _a2, _b;
|
|
14735
|
-
if (!
|
|
14830
|
+
if (!focused.value) {
|
|
14736
14831
|
return;
|
|
14737
14832
|
}
|
|
14738
14833
|
switch (e2.key) {
|
|
@@ -14752,6 +14847,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
14752
14847
|
const handleInput = (value) => {
|
|
14753
14848
|
var _a2;
|
|
14754
14849
|
opened.value = true;
|
|
14850
|
+
focused.value = true;
|
|
14755
14851
|
inputValue.value = (_a2 = value == null ? void 0 : value.replace(/\s+$/, "")) != null ? _a2 : "";
|
|
14756
14852
|
suggestedValue.value = defaultSuggestedValue;
|
|
14757
14853
|
searchBoxStore.resetHighlightIndex();
|
|
@@ -14879,12 +14975,14 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
14879
14975
|
}
|
|
14880
14976
|
});
|
|
14881
14977
|
};
|
|
14978
|
+
watch(() => props.options.debounce, handleCurrentValueSearch);
|
|
14882
14979
|
const resetValues = () => {
|
|
14883
14980
|
inputValue.value = "";
|
|
14884
14981
|
suggestedValue.value = defaultSuggestedValue;
|
|
14885
14982
|
};
|
|
14886
14983
|
const handleProductClick = () => {
|
|
14887
14984
|
opened.value = false;
|
|
14985
|
+
focused.value = false;
|
|
14888
14986
|
};
|
|
14889
14987
|
const slotProps = (props2) => {
|
|
14890
14988
|
return __spreadValues({}, props2);
|
|
@@ -14901,15 +14999,17 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
14901
14999
|
ref_key: "searchBoxInput",
|
|
14902
15000
|
ref: searchBoxInput,
|
|
14903
15001
|
onInput: handleInput,
|
|
14904
|
-
|
|
15002
|
+
onBlur: _cache[0] || (_cache[0] = ($event) => focused.value = false),
|
|
15003
|
+
onFocus: _cache[1] || (_cache[1] = ($event) => opened.value = true),
|
|
14905
15004
|
onSearch: handleSearch,
|
|
14906
|
-
onClose: _cache[
|
|
15005
|
+
onClose: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("close"))
|
|
14907
15006
|
}, null, 8, ["options", "suggestedValue", "can-close", "emit-input-on-focus"]),
|
|
14908
15007
|
opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$W, {
|
|
14909
15008
|
key: 0,
|
|
14910
15009
|
options: panelOptions.value,
|
|
14911
15010
|
inputValue: inputValue.value,
|
|
14912
15011
|
isSearchContainer: _ctx.isSearchContainer,
|
|
15012
|
+
focused: focused.value,
|
|
14913
15013
|
onFetched: handleItemsFetch,
|
|
14914
15014
|
onItemSelect: handleItemSelect,
|
|
14915
15015
|
onGoToResults: handleSearch,
|
|
@@ -14923,7 +15023,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
14923
15023
|
]),
|
|
14924
15024
|
key: "0"
|
|
14925
15025
|
} : void 0
|
|
14926
|
-
]), 1032, ["options", "inputValue", "isSearchContainer"])) : createCommentVNode("", true)
|
|
15026
|
+
]), 1032, ["options", "inputValue", "isSearchContainer", "focused"])) : createCommentVNode("", true)
|
|
14927
15027
|
])
|
|
14928
15028
|
]);
|
|
14929
15029
|
};
|
|
@@ -15021,7 +15121,7 @@ const _hoisted_3$u = {
|
|
|
15021
15121
|
key: 1,
|
|
15022
15122
|
"data-cy": "did-you-mean-label"
|
|
15023
15123
|
};
|
|
15024
|
-
const _hoisted_4$
|
|
15124
|
+
const _hoisted_4$o = { key: 1 };
|
|
15025
15125
|
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
15026
15126
|
__name: "SearchResultsDidYouMean",
|
|
15027
15127
|
props: {
|
|
@@ -15072,7 +15172,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
15072
15172
|
class: "lupa-did-you-mean lupa-highlighted-search-text",
|
|
15073
15173
|
"data-cy": "did-you-mean-value",
|
|
15074
15174
|
onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
|
|
15075
|
-
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$
|
|
15175
|
+
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$o, toDisplayString(label) + " ", 1))
|
|
15076
15176
|
]);
|
|
15077
15177
|
}), 128))
|
|
15078
15178
|
])) : createCommentVNode("", true)
|
|
@@ -15122,7 +15222,7 @@ const _hoisted_3$t = {
|
|
|
15122
15222
|
key: 1,
|
|
15123
15223
|
class: "lupa-results-total-count"
|
|
15124
15224
|
};
|
|
15125
|
-
const _hoisted_4$
|
|
15225
|
+
const _hoisted_4$n = { class: "lupa-results-total-count-number" };
|
|
15126
15226
|
const _hoisted_5$g = ["innerHTML"];
|
|
15127
15227
|
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
15128
15228
|
__name: "SearchResultsTitle",
|
|
@@ -15168,7 +15268,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
15168
15268
|
queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$C, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
|
|
15169
15269
|
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$t, [
|
|
15170
15270
|
createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
|
|
15171
|
-
createElementVNode("span", _hoisted_4$
|
|
15271
|
+
createElementVNode("span", _hoisted_4$n, toDisplayString(unref(totalItems)), 1),
|
|
15172
15272
|
createTextVNode(")")
|
|
15173
15273
|
])) : createCommentVNode("", true)
|
|
15174
15274
|
])) : createCommentVNode("", true),
|
|
@@ -15226,7 +15326,7 @@ const _hoisted_3$r = {
|
|
|
15226
15326
|
key: 0,
|
|
15227
15327
|
class: "filter-values"
|
|
15228
15328
|
};
|
|
15229
|
-
const _hoisted_4$
|
|
15329
|
+
const _hoisted_4$m = { class: "lupa-current-filter-list" };
|
|
15230
15330
|
const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
15231
15331
|
__name: "CurrentFilters",
|
|
15232
15332
|
props: {
|
|
@@ -15310,7 +15410,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
15310
15410
|
}, null, 2)) : createCommentVNode("", true)
|
|
15311
15411
|
]),
|
|
15312
15412
|
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$r, [
|
|
15313
|
-
createElementVNode("div", _hoisted_4$
|
|
15413
|
+
createElementVNode("div", _hoisted_4$m, [
|
|
15314
15414
|
(openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter2) => {
|
|
15315
15415
|
return openBlock(), createBlock(_sfc_main$R, {
|
|
15316
15416
|
key: filter2.key + "_" + filter2.value,
|
|
@@ -15378,7 +15478,7 @@ const _hoisted_1$K = {
|
|
|
15378
15478
|
};
|
|
15379
15479
|
const _hoisted_2$z = { class: "lupa-category-back" };
|
|
15380
15480
|
const _hoisted_3$q = ["href"];
|
|
15381
|
-
const _hoisted_4$
|
|
15481
|
+
const _hoisted_4$l = ["href"];
|
|
15382
15482
|
const _hoisted_5$f = { class: "lupa-child-category-list" };
|
|
15383
15483
|
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
15384
15484
|
__name: "CategoryFilter",
|
|
@@ -15389,6 +15489,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
15389
15489
|
const props = __props;
|
|
15390
15490
|
const categoryChildren = ref([]);
|
|
15391
15491
|
const optionStore = useOptionsStore();
|
|
15492
|
+
const searchResultsStore = useSearchResultStore();
|
|
15392
15493
|
const { envOptions, searchResultOptions } = storeToRefs(optionStore);
|
|
15393
15494
|
const hasBackButton = computed(() => {
|
|
15394
15495
|
var _a;
|
|
@@ -15425,6 +15526,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
15425
15526
|
return;
|
|
15426
15527
|
}
|
|
15427
15528
|
categoryChildren.value = result2.items;
|
|
15529
|
+
searchResultsStore.setRelatedCategoryChildren(categoryChildren.value);
|
|
15428
15530
|
(_c = (_b = searchResultOptions.value.callbacks) == null ? void 0 : _b.onCategoryFilterResults) == null ? void 0 : _c.call(_b, {
|
|
15429
15531
|
queryKey: props.options.queryKey,
|
|
15430
15532
|
hasResults: result2.total > 0
|
|
@@ -15483,7 +15585,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
15483
15585
|
href: parentUrlLink.value,
|
|
15484
15586
|
class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
|
|
15485
15587
|
onClick: handleNavigationParent
|
|
15486
|
-
}, toDisplayString(parentTitle.value), 11, _hoisted_4$
|
|
15588
|
+
}, toDisplayString(parentTitle.value), 11, _hoisted_4$l)
|
|
15487
15589
|
], 2),
|
|
15488
15590
|
createElementVNode("div", _hoisted_5$f, [
|
|
15489
15591
|
(openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
|
|
@@ -15504,7 +15606,7 @@ const _hoisted_1$J = {
|
|
|
15504
15606
|
};
|
|
15505
15607
|
const _hoisted_2$y = ["placeholder"];
|
|
15506
15608
|
const _hoisted_3$p = { class: "lupa-terms-list" };
|
|
15507
|
-
const _hoisted_4$
|
|
15609
|
+
const _hoisted_4$k = ["onClick"];
|
|
15508
15610
|
const _hoisted_5$e = { class: "lupa-term-checkbox-wrapper" };
|
|
15509
15611
|
const _hoisted_6$9 = { class: "lupa-term-checkbox-label" };
|
|
15510
15612
|
const _hoisted_7$6 = { class: "lupa-term-label" };
|
|
@@ -15612,7 +15714,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
15612
15714
|
createElementVNode("span", _hoisted_7$6, toDisplayString(item.title), 1),
|
|
15613
15715
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_8$2, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
|
|
15614
15716
|
])
|
|
15615
|
-
], 10, _hoisted_4$
|
|
15717
|
+
], 10, _hoisted_4$k);
|
|
15616
15718
|
}), 128))
|
|
15617
15719
|
]),
|
|
15618
15720
|
displayShowMore.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -16612,7 +16714,7 @@ const _hoisted_3$o = {
|
|
|
16612
16714
|
key: 1,
|
|
16613
16715
|
class: "lupa-stats-facet-summary-input"
|
|
16614
16716
|
};
|
|
16615
|
-
const _hoisted_4$
|
|
16717
|
+
const _hoisted_4$j = {
|
|
16616
16718
|
key: 0,
|
|
16617
16719
|
class: "lupa-stats-range-label"
|
|
16618
16720
|
};
|
|
@@ -16807,7 +16909,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
16807
16909
|
return openBlock(), createElementBlock("div", _hoisted_1$I, [
|
|
16808
16910
|
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$x, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$o, [
|
|
16809
16911
|
createElementVNode("div", null, [
|
|
16810
|
-
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
16912
|
+
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$j, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
|
|
16811
16913
|
createElementVNode("div", _hoisted_5$d, [
|
|
16812
16914
|
withDirectives(createElementVNode("input", {
|
|
16813
16915
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
|
|
@@ -16874,7 +16976,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
16874
16976
|
const _hoisted_1$H = { class: "lupa-term-checkbox-wrapper" };
|
|
16875
16977
|
const _hoisted_2$w = { class: "lupa-term-checkbox-label" };
|
|
16876
16978
|
const _hoisted_3$n = { class: "lupa-term-label" };
|
|
16877
|
-
const _hoisted_4$
|
|
16979
|
+
const _hoisted_4$i = {
|
|
16878
16980
|
key: 0,
|
|
16879
16981
|
class: "lupa-term-count"
|
|
16880
16982
|
};
|
|
@@ -16935,7 +17037,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
16935
17037
|
]),
|
|
16936
17038
|
createElementVNode("div", _hoisted_2$w, [
|
|
16937
17039
|
createElementVNode("span", _hoisted_3$n, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
|
|
16938
|
-
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
17040
|
+
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$i, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
|
|
16939
17041
|
])
|
|
16940
17042
|
]),
|
|
16941
17043
|
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_5$c, [
|
|
@@ -17447,7 +17549,7 @@ const _hoisted_1$A = {
|
|
|
17447
17549
|
};
|
|
17448
17550
|
const _hoisted_2$r = ["onClick"];
|
|
17449
17551
|
const _hoisted_3$l = { class: "lupa-mobile-sidebar-content" };
|
|
17450
|
-
const _hoisted_4$
|
|
17552
|
+
const _hoisted_4$h = { class: "lupa-sidebar-top" };
|
|
17451
17553
|
const _hoisted_5$b = { class: "lupa-sidebar-title" };
|
|
17452
17554
|
const _hoisted_6$7 = {
|
|
17453
17555
|
key: 0,
|
|
@@ -17491,7 +17593,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
17491
17593
|
onClick: withModifiers(handleMobileToggle, ["stop"])
|
|
17492
17594
|
}, null, 8, _hoisted_2$r),
|
|
17493
17595
|
createElementVNode("div", _hoisted_3$l, [
|
|
17494
|
-
createElementVNode("div", _hoisted_4$
|
|
17596
|
+
createElementVNode("div", _hoisted_4$h, [
|
|
17495
17597
|
createElementVNode("div", _hoisted_5$b, [
|
|
17496
17598
|
createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
|
|
17497
17599
|
isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_6$7, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
@@ -17519,7 +17621,7 @@ const _hoisted_3$k = {
|
|
|
17519
17621
|
key: 1,
|
|
17520
17622
|
class: "lupa-search-results-breadcrumb-text"
|
|
17521
17623
|
};
|
|
17522
|
-
const _hoisted_4$
|
|
17624
|
+
const _hoisted_4$g = { key: 2 };
|
|
17523
17625
|
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
17524
17626
|
__name: "SearchResultsBreadcrumbs",
|
|
17525
17627
|
props: {
|
|
@@ -17560,7 +17662,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
17560
17662
|
return handleNavigation(e2, (_a = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a : "");
|
|
17561
17663
|
}
|
|
17562
17664
|
}, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$q)) : (openBlock(), createElementBlock("span", _hoisted_3$k, toDisplayString(getLabel(breadcrumb.label)), 1)),
|
|
17563
|
-
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
17665
|
+
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$g, " / ")) : createCommentVNode("", true)
|
|
17564
17666
|
]);
|
|
17565
17667
|
}), 128))
|
|
17566
17668
|
]);
|
|
@@ -17666,7 +17768,7 @@ const _hoisted_2$p = {
|
|
|
17666
17768
|
class: "lupa-page-number-separator"
|
|
17667
17769
|
};
|
|
17668
17770
|
const _hoisted_3$j = ["onClick"];
|
|
17669
|
-
const _hoisted_4$
|
|
17771
|
+
const _hoisted_4$f = {
|
|
17670
17772
|
key: 0,
|
|
17671
17773
|
class: "lupa-page-number-separator"
|
|
17672
17774
|
};
|
|
@@ -17772,7 +17874,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
17772
17874
|
}, toDisplayString(page), 11, _hoisted_3$j);
|
|
17773
17875
|
}), 128)),
|
|
17774
17876
|
showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
17775
|
-
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
17877
|
+
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$f, "...")) : createCommentVNode("", true),
|
|
17776
17878
|
createElementVNode("div", {
|
|
17777
17879
|
class: "lupa-page-number lupa-page-number-last",
|
|
17778
17880
|
onClick: _cache[2] || (_cache[2] = () => {
|
|
@@ -17797,7 +17899,7 @@ const _hoisted_1$u = {
|
|
|
17797
17899
|
};
|
|
17798
17900
|
const _hoisted_2$o = { id: "lupa-select" };
|
|
17799
17901
|
const _hoisted_3$i = { class: "lupa-select-label" };
|
|
17800
|
-
const _hoisted_4$
|
|
17902
|
+
const _hoisted_4$e = ["aria-label"];
|
|
17801
17903
|
const _hoisted_5$a = ["value"];
|
|
17802
17904
|
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
17803
17905
|
__name: "SearchResultsPageSize",
|
|
@@ -17844,7 +17946,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
17844
17946
|
value: option
|
|
17845
17947
|
}, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$a);
|
|
17846
17948
|
}), 128))
|
|
17847
|
-
], 40, _hoisted_4$
|
|
17949
|
+
], 40, _hoisted_4$e)
|
|
17848
17950
|
])
|
|
17849
17951
|
]);
|
|
17850
17952
|
};
|
|
@@ -17856,7 +17958,7 @@ const _hoisted_1$t = {
|
|
|
17856
17958
|
};
|
|
17857
17959
|
const _hoisted_2$n = { id: "lupa-select" };
|
|
17858
17960
|
const _hoisted_3$h = { class: "lupa-select-label" };
|
|
17859
|
-
const _hoisted_4$
|
|
17961
|
+
const _hoisted_4$d = ["aria-label"];
|
|
17860
17962
|
const _hoisted_5$9 = ["value"];
|
|
17861
17963
|
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
17862
17964
|
__name: "SearchResultsSort",
|
|
@@ -17924,7 +18026,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
17924
18026
|
value: option.key
|
|
17925
18027
|
}, toDisplayString(option.label), 9, _hoisted_5$9);
|
|
17926
18028
|
}), 128))
|
|
17927
|
-
], 40, _hoisted_4$
|
|
18029
|
+
], 40, _hoisted_4$d), [
|
|
17928
18030
|
[vModelSelect, selectedKey.value]
|
|
17929
18031
|
])
|
|
17930
18032
|
])
|
|
@@ -17938,7 +18040,7 @@ const _hoisted_2$m = {
|
|
|
17938
18040
|
class: "lupa-toolbar-right-title"
|
|
17939
18041
|
};
|
|
17940
18042
|
const _hoisted_3$g = { key: 2 };
|
|
17941
|
-
const _hoisted_4$
|
|
18043
|
+
const _hoisted_4$c = { key: 4 };
|
|
17942
18044
|
const _hoisted_5$8 = { key: 6 };
|
|
17943
18045
|
const _hoisted_6$6 = { class: "lupa-toolbar-right" };
|
|
17944
18046
|
const _hoisted_7$3 = {
|
|
@@ -18062,7 +18164,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
18062
18164
|
label: searchSummaryLabel.value,
|
|
18063
18165
|
clearable: unref(hasAnyFilter) && showFilterClear.value,
|
|
18064
18166
|
onClear: handleClearAll
|
|
18065
|
-
}, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$
|
|
18167
|
+
}, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$c)),
|
|
18066
18168
|
displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$z, {
|
|
18067
18169
|
key: 5,
|
|
18068
18170
|
options: paginationOptions.value.pageSelect,
|
|
@@ -18111,7 +18213,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
18111
18213
|
const _hoisted_1$r = ["title", "innerHTML"];
|
|
18112
18214
|
const _hoisted_2$l = ["title"];
|
|
18113
18215
|
const _hoisted_3$f = ["href", "innerHTML"];
|
|
18114
|
-
const _hoisted_4$
|
|
18216
|
+
const _hoisted_4$b = ["title"];
|
|
18115
18217
|
const _hoisted_5$7 = {
|
|
18116
18218
|
key: 0,
|
|
18117
18219
|
class: "lupa-search-results-product-title-text"
|
|
@@ -18179,7 +18281,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
18179
18281
|
class: "lupa-search-results-product-title-text lupa-title-link",
|
|
18180
18282
|
onClick: handleNavigation
|
|
18181
18283
|
}, toDisplayString(title.value), 9, _hoisted_6$5)) : createCommentVNode("", true)
|
|
18182
|
-
], 12, _hoisted_4$
|
|
18284
|
+
], 12, _hoisted_4$b));
|
|
18183
18285
|
};
|
|
18184
18286
|
}
|
|
18185
18287
|
});
|
|
@@ -18222,7 +18324,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
18222
18324
|
const _hoisted_1$p = { id: "lupa-search-results-rating" };
|
|
18223
18325
|
const _hoisted_2$k = { class: "lupa-ratings" };
|
|
18224
18326
|
const _hoisted_3$e = { class: "lupa-ratings-base" };
|
|
18225
|
-
const _hoisted_4$
|
|
18327
|
+
const _hoisted_4$a = ["innerHTML"];
|
|
18226
18328
|
const _hoisted_5$6 = { class: "lupa-rating-wrapper" };
|
|
18227
18329
|
const _hoisted_6$4 = ["innerHTML"];
|
|
18228
18330
|
const _hoisted_7$2 = ["href"];
|
|
@@ -18266,7 +18368,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
18266
18368
|
key: index,
|
|
18267
18369
|
innerHTML: star,
|
|
18268
18370
|
class: "lupa-rating lupa-rating-not-highlighted"
|
|
18269
|
-
}, null, 8, _hoisted_4$
|
|
18371
|
+
}, null, 8, _hoisted_4$a);
|
|
18270
18372
|
}), 128))
|
|
18271
18373
|
]),
|
|
18272
18374
|
createElementVNode("div", _hoisted_5$6, [
|
|
@@ -18400,7 +18502,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
18400
18502
|
const _hoisted_1$m = ["innerHTML"];
|
|
18401
18503
|
const _hoisted_2$i = { key: 0 };
|
|
18402
18504
|
const _hoisted_3$c = { key: 1 };
|
|
18403
|
-
const _hoisted_4$
|
|
18505
|
+
const _hoisted_4$9 = { class: "lupa-search-box-custom-label" };
|
|
18404
18506
|
const _hoisted_5$5 = { class: "lupa-search-box-custom-text" };
|
|
18405
18507
|
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
18406
18508
|
__name: "SearchResultsProductCustom",
|
|
@@ -18445,7 +18547,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
18445
18547
|
class: className.value
|
|
18446
18548
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
18447
18549
|
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$i, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$c, [
|
|
18448
|
-
createElementVNode("div", _hoisted_4$
|
|
18550
|
+
createElementVNode("div", _hoisted_4$9, toDisplayString(label.value), 1),
|
|
18449
18551
|
createElementVNode("div", _hoisted_5$5, toDisplayString(text.value), 1)
|
|
18450
18552
|
]))
|
|
18451
18553
|
], 16));
|
|
@@ -18491,7 +18593,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
18491
18593
|
const _hoisted_1$k = { id: "lupa-search-results-rating" };
|
|
18492
18594
|
const _hoisted_2$h = ["innerHTML"];
|
|
18493
18595
|
const _hoisted_3$b = { class: "lupa-ratings" };
|
|
18494
|
-
const _hoisted_4$
|
|
18596
|
+
const _hoisted_4$8 = ["href"];
|
|
18495
18597
|
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
18496
18598
|
__name: "SearchResultsProductSingleStarRating",
|
|
18497
18599
|
props: {
|
|
@@ -18529,7 +18631,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
18529
18631
|
createElementVNode("a", {
|
|
18530
18632
|
href: ratingLink.value,
|
|
18531
18633
|
class: "lupa-total-ratings"
|
|
18532
|
-
}, toDisplayString(totalRatings.value), 9, _hoisted_4$
|
|
18634
|
+
}, toDisplayString(totalRatings.value), 9, _hoisted_4$8)
|
|
18533
18635
|
]);
|
|
18534
18636
|
};
|
|
18535
18637
|
}
|
|
@@ -18857,7 +18959,7 @@ const _hoisted_3$9 = {
|
|
|
18857
18959
|
class: "lupa-similar-query-label",
|
|
18858
18960
|
"data-cy": "lupa-similar-query-label"
|
|
18859
18961
|
};
|
|
18860
|
-
const _hoisted_4$
|
|
18962
|
+
const _hoisted_4$7 = ["onClick"];
|
|
18861
18963
|
const _hoisted_5$4 = ["innerHTML"];
|
|
18862
18964
|
const _hoisted_6$3 = { key: 0 };
|
|
18863
18965
|
const _hoisted_7$1 = {
|
|
@@ -18910,7 +19012,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
18910
19012
|
innerHTML: getSimilarQueryContent(similarQuery.displayQuery)
|
|
18911
19013
|
}, null, 8, _hoisted_5$4),
|
|
18912
19014
|
similarQuery.count ? (openBlock(), createElementBlock("span", _hoisted_6$3, " (" + toDisplayString(similarQuery.count) + ")", 1)) : createCommentVNode("", true)
|
|
18913
|
-
], 8, _hoisted_4$
|
|
19015
|
+
], 8, _hoisted_4$7)
|
|
18914
19016
|
]),
|
|
18915
19017
|
createElementVNode("div", _hoisted_7$1, [
|
|
18916
19018
|
(openBlock(true), createElementBlock(Fragment, null, renderList(similarQuery.items, (product, index2) => {
|
|
@@ -19133,7 +19235,7 @@ const _hoisted_3$7 = {
|
|
|
19133
19235
|
class: "lupa-empty-results",
|
|
19134
19236
|
"data-cy": "lupa-no-results-in-page"
|
|
19135
19237
|
};
|
|
19136
|
-
const _hoisted_4$
|
|
19238
|
+
const _hoisted_4$6 = {
|
|
19137
19239
|
key: 3,
|
|
19138
19240
|
class: "lupa-empty-results",
|
|
19139
19241
|
"data-cy": "lupa-no-results"
|
|
@@ -19325,7 +19427,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
19325
19427
|
location: "bottom",
|
|
19326
19428
|
sdkOptions: _ctx.options.options
|
|
19327
19429
|
}, null, 8, ["options", "sdkOptions"])
|
|
19328
|
-
], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
19430
|
+
], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$6, [
|
|
19329
19431
|
createTextVNode(toDisplayString(_ctx.options.labels.emptyResults) + " ", 1),
|
|
19330
19432
|
createElementVNode("span", null, toDisplayString(unref(currentQueryText)), 1)
|
|
19331
19433
|
])) : createCommentVNode("", true),
|
|
@@ -19354,6 +19456,7 @@ const _hoisted_2$a = {
|
|
|
19354
19456
|
class: "lupa-category-back"
|
|
19355
19457
|
};
|
|
19356
19458
|
const _hoisted_3$6 = ["href"];
|
|
19459
|
+
const _hoisted_4$5 = { class: "lupa-child-category-list" };
|
|
19357
19460
|
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
19358
19461
|
__name: "CategoryTopFilters",
|
|
19359
19462
|
props: {
|
|
@@ -19361,6 +19464,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
19361
19464
|
},
|
|
19362
19465
|
setup(__props) {
|
|
19363
19466
|
const props = __props;
|
|
19467
|
+
const searchResultsStore = useSearchResultStore();
|
|
19468
|
+
const { relatedCategoryChildren } = storeToRefs(searchResultsStore);
|
|
19364
19469
|
const hasBackButton = computed(() => {
|
|
19365
19470
|
var _a, _b;
|
|
19366
19471
|
return Boolean((_b = (_a = props.options.categories) == null ? void 0 : _a.back) == null ? void 0 : _b.title);
|
|
@@ -19376,12 +19481,19 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
19376
19481
|
const hasEventRouting = computed(() => {
|
|
19377
19482
|
return props.options.routingBehavior === "event";
|
|
19378
19483
|
});
|
|
19484
|
+
const categoryOptions = computed(() => {
|
|
19485
|
+
return props.options.categories;
|
|
19486
|
+
});
|
|
19379
19487
|
const handleNavigationBack = (event) => {
|
|
19380
19488
|
if (!backUrlLink.value) {
|
|
19381
19489
|
return;
|
|
19382
19490
|
}
|
|
19383
19491
|
handleRoutingEvent(backUrlLink.value, event, hasEventRouting.value);
|
|
19384
19492
|
};
|
|
19493
|
+
const getCategoryKey = (item) => {
|
|
19494
|
+
var _a, _b, _c, _d, _e, _f;
|
|
19495
|
+
return (item == null ? void 0 : item[(_c = (_b = (_a = categoryOptions.value) == null ? void 0 : _a.keys) == null ? void 0 : _b.titleKey) != null ? _c : ""]) + (item == null ? void 0 : item[(_f = (_e = (_d = categoryOptions.value) == null ? void 0 : _d.keys) == null ? void 0 : _e.urlKey) != null ? _f : ""]);
|
|
19496
|
+
};
|
|
19385
19497
|
return (_ctx, _cache) => {
|
|
19386
19498
|
return openBlock(), createElementBlock("div", {
|
|
19387
19499
|
class: normalizeClass(["lupa-category-top-mobile-filters", { "lupa-has-back-button": hasBackButton.value }])
|
|
@@ -19394,6 +19506,15 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
19394
19506
|
onClick: handleNavigationBack
|
|
19395
19507
|
}, toDisplayString(backTitle.value), 9, _hoisted_3$6)
|
|
19396
19508
|
])) : createCommentVNode("", true),
|
|
19509
|
+
createElementVNode("div", _hoisted_4$5, [
|
|
19510
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(relatedCategoryChildren), (child) => {
|
|
19511
|
+
return openBlock(), createBlock(_sfc_main$P, {
|
|
19512
|
+
key: getCategoryKey(child),
|
|
19513
|
+
item: child,
|
|
19514
|
+
options: categoryOptions.value
|
|
19515
|
+
}, null, 8, ["item", "options"]);
|
|
19516
|
+
}), 128))
|
|
19517
|
+
]),
|
|
19397
19518
|
createVNode(_sfc_main$w, {
|
|
19398
19519
|
class: "lupa-toolbar-mobile",
|
|
19399
19520
|
"pagination-location": "top",
|