@getlupa/vue 0.14.4 → 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 +76 -49
- package/dist/lupaSearch.mjs +76 -49
- package/dist/src/stores/searchResult.d.ts +8 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/lupaSearch.mjs
CHANGED
|
@@ -3315,7 +3315,7 @@ const useSearchBoxStore = defineStore("searchBox", () => {
|
|
|
3315
3315
|
const _hoisted_1$1d = { id: "lupa-search-box-input-container" };
|
|
3316
3316
|
const _hoisted_2$S = { class: "lupa-input-clear" };
|
|
3317
3317
|
const _hoisted_3$B = { id: "lupa-search-box-input" };
|
|
3318
|
-
const _hoisted_4$
|
|
3318
|
+
const _hoisted_4$t = ["value"];
|
|
3319
3319
|
const _hoisted_5$k = ["aria-label", "placeholder"];
|
|
3320
3320
|
const _hoisted_6$a = /* @__PURE__ */ createElementVNode("span", { class: "lupa-search-submit-icon" }, null, -1);
|
|
3321
3321
|
const _hoisted_7$7 = [
|
|
@@ -3422,7 +3422,7 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
|
3422
3422
|
"aria-hidden": "true",
|
|
3423
3423
|
value: showHint.value ? suggestedValue.value.item.suggestion : "",
|
|
3424
3424
|
disabled: ""
|
|
3425
|
-
}, null, 8, _hoisted_4$
|
|
3425
|
+
}, null, 8, _hoisted_4$t),
|
|
3426
3426
|
withDirectives(createElementVNode("input", mergeProps({
|
|
3427
3427
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
|
|
3428
3428
|
}, inputAttributes.value, {
|
|
@@ -3634,7 +3634,7 @@ const _hoisted_3$A = {
|
|
|
3634
3634
|
class: "lupa-suggestion-facet",
|
|
3635
3635
|
"data-cy": "lupa-suggestion-facet"
|
|
3636
3636
|
};
|
|
3637
|
-
const _hoisted_4$
|
|
3637
|
+
const _hoisted_4$s = {
|
|
3638
3638
|
class: "lupa-suggestion-facet-label",
|
|
3639
3639
|
"data-cy": "lupa-suggestion-facet-label"
|
|
3640
3640
|
};
|
|
@@ -3680,7 +3680,7 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
3680
3680
|
innerHTML: _ctx.suggestion.displayHighlight
|
|
3681
3681
|
}, null, 8, _hoisted_1$19)) : (openBlock(), createElementBlock("div", _hoisted_2$Q, toDisplayString(_ctx.suggestion.display), 1)),
|
|
3682
3682
|
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$A, [
|
|
3683
|
-
createElementVNode("span", _hoisted_4$
|
|
3683
|
+
createElementVNode("span", _hoisted_4$s, toDisplayString(facetLabel.value), 1),
|
|
3684
3684
|
createElementVNode("span", _hoisted_5$j, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
3685
3685
|
])) : createCommentVNode("", true)
|
|
3686
3686
|
]);
|
|
@@ -13242,7 +13242,7 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
|
13242
13242
|
const _hoisted_1$13 = ["innerHTML"];
|
|
13243
13243
|
const _hoisted_2$M = { key: 0 };
|
|
13244
13244
|
const _hoisted_3$z = { key: 1 };
|
|
13245
|
-
const _hoisted_4$
|
|
13245
|
+
const _hoisted_4$r = { class: "lupa-search-box-custom-label" };
|
|
13246
13246
|
const _hoisted_5$i = { class: "lupa-search-box-custom-text" };
|
|
13247
13247
|
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
13248
13248
|
__name: "SearchBoxProductCustom",
|
|
@@ -13275,7 +13275,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
13275
13275
|
class: [className.value, "lupa-search-box-product-custom"]
|
|
13276
13276
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
13277
13277
|
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$M, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$z, [
|
|
13278
|
-
createElementVNode("div", _hoisted_4$
|
|
13278
|
+
createElementVNode("div", _hoisted_4$r, toDisplayString(label.value), 1),
|
|
13279
13279
|
createElementVNode("div", _hoisted_5$i, toDisplayString(text.value), 1)
|
|
13280
13280
|
]))
|
|
13281
13281
|
], 16));
|
|
@@ -13364,6 +13364,7 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
13364
13364
|
const layout = ref(ResultsLayoutEnum.GRID);
|
|
13365
13365
|
const loading = ref(false);
|
|
13366
13366
|
const isMobileSidebarVisible = ref(false);
|
|
13367
|
+
const relatedCategoryChildren = ref([]);
|
|
13367
13368
|
const optionsStore = useOptionsStore();
|
|
13368
13369
|
const paramsStore = useParamsStore();
|
|
13369
13370
|
const screenStore = useScreenStore();
|
|
@@ -13505,6 +13506,9 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
13505
13506
|
const hasExactMatch = items.some((item) => getNormalizedString(item.title) === searchInput);
|
|
13506
13507
|
return hasExactMatch ? items.filter((item) => getNormalizedString(item.title) === searchInput) : items;
|
|
13507
13508
|
};
|
|
13509
|
+
const setRelatedCategoryChildren = (children) => {
|
|
13510
|
+
relatedCategoryChildren.value = [...children];
|
|
13511
|
+
};
|
|
13508
13512
|
return {
|
|
13509
13513
|
isMobileSidebarVisible,
|
|
13510
13514
|
searchResult,
|
|
@@ -13525,6 +13529,7 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
13525
13529
|
itemRange,
|
|
13526
13530
|
isPageEmpty,
|
|
13527
13531
|
hideFiltersOnExactMatchForKeys,
|
|
13532
|
+
relatedCategoryChildren,
|
|
13528
13533
|
setSidebarState,
|
|
13529
13534
|
queryFacet,
|
|
13530
13535
|
add,
|
|
@@ -13533,7 +13538,8 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
13533
13538
|
setLayout,
|
|
13534
13539
|
setLoading,
|
|
13535
13540
|
clearSearchResult,
|
|
13536
|
-
filterVisibleFilterValues
|
|
13541
|
+
filterVisibleFilterValues,
|
|
13542
|
+
setRelatedCategoryChildren
|
|
13537
13543
|
};
|
|
13538
13544
|
});
|
|
13539
13545
|
const _hoisted_1$11 = { class: "lupa-search-box-add-to-cart-wrapper" };
|
|
@@ -13682,7 +13688,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValue
|
|
|
13682
13688
|
const _hoisted_1$$ = { class: "lupa-badge-title" };
|
|
13683
13689
|
const _hoisted_2$K = ["src"];
|
|
13684
13690
|
const _hoisted_3$x = { key: 1 };
|
|
13685
|
-
const _hoisted_4$
|
|
13691
|
+
const _hoisted_4$q = {
|
|
13686
13692
|
key: 0,
|
|
13687
13693
|
class: "lupa-badge-full-text"
|
|
13688
13694
|
};
|
|
@@ -13726,7 +13732,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
13726
13732
|
}, null, 8, _hoisted_2$K)) : createCommentVNode("", true),
|
|
13727
13733
|
hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$x, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
|
|
13728
13734
|
]),
|
|
13729
|
-
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
13735
|
+
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$q, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
|
|
13730
13736
|
], 6);
|
|
13731
13737
|
};
|
|
13732
13738
|
}
|
|
@@ -14466,7 +14472,7 @@ const _hoisted_3$v = {
|
|
|
14466
14472
|
key: 0,
|
|
14467
14473
|
class: "lupa-panel-title lupa-panel-title-top-results"
|
|
14468
14474
|
};
|
|
14469
|
-
const _hoisted_4$
|
|
14475
|
+
const _hoisted_4$p = {
|
|
14470
14476
|
key: 1,
|
|
14471
14477
|
class: "lupa-panel-title"
|
|
14472
14478
|
};
|
|
@@ -14660,7 +14666,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
14660
14666
|
"data-cy": "lupa-panel-" + panel.type + "-index"
|
|
14661
14667
|
}, [
|
|
14662
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),
|
|
14663
|
-
((_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),
|
|
14664
14670
|
panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
|
|
14665
14671
|
key: 2,
|
|
14666
14672
|
panel,
|
|
@@ -15115,7 +15121,7 @@ const _hoisted_3$u = {
|
|
|
15115
15121
|
key: 1,
|
|
15116
15122
|
"data-cy": "did-you-mean-label"
|
|
15117
15123
|
};
|
|
15118
|
-
const _hoisted_4$
|
|
15124
|
+
const _hoisted_4$o = { key: 1 };
|
|
15119
15125
|
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
15120
15126
|
__name: "SearchResultsDidYouMean",
|
|
15121
15127
|
props: {
|
|
@@ -15166,7 +15172,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
15166
15172
|
class: "lupa-did-you-mean lupa-highlighted-search-text",
|
|
15167
15173
|
"data-cy": "did-you-mean-value",
|
|
15168
15174
|
onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
|
|
15169
|
-
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$
|
|
15175
|
+
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$o, toDisplayString(label) + " ", 1))
|
|
15170
15176
|
]);
|
|
15171
15177
|
}), 128))
|
|
15172
15178
|
])) : createCommentVNode("", true)
|
|
@@ -15216,7 +15222,7 @@ const _hoisted_3$t = {
|
|
|
15216
15222
|
key: 1,
|
|
15217
15223
|
class: "lupa-results-total-count"
|
|
15218
15224
|
};
|
|
15219
|
-
const _hoisted_4$
|
|
15225
|
+
const _hoisted_4$n = { class: "lupa-results-total-count-number" };
|
|
15220
15226
|
const _hoisted_5$g = ["innerHTML"];
|
|
15221
15227
|
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
15222
15228
|
__name: "SearchResultsTitle",
|
|
@@ -15262,7 +15268,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
15262
15268
|
queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$C, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
|
|
15263
15269
|
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$t, [
|
|
15264
15270
|
createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
|
|
15265
|
-
createElementVNode("span", _hoisted_4$
|
|
15271
|
+
createElementVNode("span", _hoisted_4$n, toDisplayString(unref(totalItems)), 1),
|
|
15266
15272
|
createTextVNode(")")
|
|
15267
15273
|
])) : createCommentVNode("", true)
|
|
15268
15274
|
])) : createCommentVNode("", true),
|
|
@@ -15320,7 +15326,7 @@ const _hoisted_3$r = {
|
|
|
15320
15326
|
key: 0,
|
|
15321
15327
|
class: "filter-values"
|
|
15322
15328
|
};
|
|
15323
|
-
const _hoisted_4$
|
|
15329
|
+
const _hoisted_4$m = { class: "lupa-current-filter-list" };
|
|
15324
15330
|
const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
15325
15331
|
__name: "CurrentFilters",
|
|
15326
15332
|
props: {
|
|
@@ -15404,7 +15410,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
15404
15410
|
}, null, 2)) : createCommentVNode("", true)
|
|
15405
15411
|
]),
|
|
15406
15412
|
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$r, [
|
|
15407
|
-
createElementVNode("div", _hoisted_4$
|
|
15413
|
+
createElementVNode("div", _hoisted_4$m, [
|
|
15408
15414
|
(openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter2) => {
|
|
15409
15415
|
return openBlock(), createBlock(_sfc_main$R, {
|
|
15410
15416
|
key: filter2.key + "_" + filter2.value,
|
|
@@ -15472,7 +15478,7 @@ const _hoisted_1$K = {
|
|
|
15472
15478
|
};
|
|
15473
15479
|
const _hoisted_2$z = { class: "lupa-category-back" };
|
|
15474
15480
|
const _hoisted_3$q = ["href"];
|
|
15475
|
-
const _hoisted_4$
|
|
15481
|
+
const _hoisted_4$l = ["href"];
|
|
15476
15482
|
const _hoisted_5$f = { class: "lupa-child-category-list" };
|
|
15477
15483
|
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
15478
15484
|
__name: "CategoryFilter",
|
|
@@ -15483,6 +15489,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
15483
15489
|
const props = __props;
|
|
15484
15490
|
const categoryChildren = ref([]);
|
|
15485
15491
|
const optionStore = useOptionsStore();
|
|
15492
|
+
const searchResultsStore = useSearchResultStore();
|
|
15486
15493
|
const { envOptions, searchResultOptions } = storeToRefs(optionStore);
|
|
15487
15494
|
const hasBackButton = computed(() => {
|
|
15488
15495
|
var _a;
|
|
@@ -15519,6 +15526,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
15519
15526
|
return;
|
|
15520
15527
|
}
|
|
15521
15528
|
categoryChildren.value = result2.items;
|
|
15529
|
+
searchResultsStore.setRelatedCategoryChildren(categoryChildren.value);
|
|
15522
15530
|
(_c = (_b = searchResultOptions.value.callbacks) == null ? void 0 : _b.onCategoryFilterResults) == null ? void 0 : _c.call(_b, {
|
|
15523
15531
|
queryKey: props.options.queryKey,
|
|
15524
15532
|
hasResults: result2.total > 0
|
|
@@ -15577,7 +15585,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
15577
15585
|
href: parentUrlLink.value,
|
|
15578
15586
|
class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
|
|
15579
15587
|
onClick: handleNavigationParent
|
|
15580
|
-
}, toDisplayString(parentTitle.value), 11, _hoisted_4$
|
|
15588
|
+
}, toDisplayString(parentTitle.value), 11, _hoisted_4$l)
|
|
15581
15589
|
], 2),
|
|
15582
15590
|
createElementVNode("div", _hoisted_5$f, [
|
|
15583
15591
|
(openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
|
|
@@ -15598,7 +15606,7 @@ const _hoisted_1$J = {
|
|
|
15598
15606
|
};
|
|
15599
15607
|
const _hoisted_2$y = ["placeholder"];
|
|
15600
15608
|
const _hoisted_3$p = { class: "lupa-terms-list" };
|
|
15601
|
-
const _hoisted_4$
|
|
15609
|
+
const _hoisted_4$k = ["onClick"];
|
|
15602
15610
|
const _hoisted_5$e = { class: "lupa-term-checkbox-wrapper" };
|
|
15603
15611
|
const _hoisted_6$9 = { class: "lupa-term-checkbox-label" };
|
|
15604
15612
|
const _hoisted_7$6 = { class: "lupa-term-label" };
|
|
@@ -15706,7 +15714,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
15706
15714
|
createElementVNode("span", _hoisted_7$6, toDisplayString(item.title), 1),
|
|
15707
15715
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_8$2, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
|
|
15708
15716
|
])
|
|
15709
|
-
], 10, _hoisted_4$
|
|
15717
|
+
], 10, _hoisted_4$k);
|
|
15710
15718
|
}), 128))
|
|
15711
15719
|
]),
|
|
15712
15720
|
displayShowMore.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -16706,7 +16714,7 @@ const _hoisted_3$o = {
|
|
|
16706
16714
|
key: 1,
|
|
16707
16715
|
class: "lupa-stats-facet-summary-input"
|
|
16708
16716
|
};
|
|
16709
|
-
const _hoisted_4$
|
|
16717
|
+
const _hoisted_4$j = {
|
|
16710
16718
|
key: 0,
|
|
16711
16719
|
class: "lupa-stats-range-label"
|
|
16712
16720
|
};
|
|
@@ -16901,7 +16909,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
16901
16909
|
return openBlock(), createElementBlock("div", _hoisted_1$I, [
|
|
16902
16910
|
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$x, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$o, [
|
|
16903
16911
|
createElementVNode("div", null, [
|
|
16904
|
-
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
16912
|
+
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$j, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
|
|
16905
16913
|
createElementVNode("div", _hoisted_5$d, [
|
|
16906
16914
|
withDirectives(createElementVNode("input", {
|
|
16907
16915
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
|
|
@@ -16968,7 +16976,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
16968
16976
|
const _hoisted_1$H = { class: "lupa-term-checkbox-wrapper" };
|
|
16969
16977
|
const _hoisted_2$w = { class: "lupa-term-checkbox-label" };
|
|
16970
16978
|
const _hoisted_3$n = { class: "lupa-term-label" };
|
|
16971
|
-
const _hoisted_4$
|
|
16979
|
+
const _hoisted_4$i = {
|
|
16972
16980
|
key: 0,
|
|
16973
16981
|
class: "lupa-term-count"
|
|
16974
16982
|
};
|
|
@@ -17029,7 +17037,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
17029
17037
|
]),
|
|
17030
17038
|
createElementVNode("div", _hoisted_2$w, [
|
|
17031
17039
|
createElementVNode("span", _hoisted_3$n, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
|
|
17032
|
-
_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)
|
|
17033
17041
|
])
|
|
17034
17042
|
]),
|
|
17035
17043
|
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_5$c, [
|
|
@@ -17541,7 +17549,7 @@ const _hoisted_1$A = {
|
|
|
17541
17549
|
};
|
|
17542
17550
|
const _hoisted_2$r = ["onClick"];
|
|
17543
17551
|
const _hoisted_3$l = { class: "lupa-mobile-sidebar-content" };
|
|
17544
|
-
const _hoisted_4$
|
|
17552
|
+
const _hoisted_4$h = { class: "lupa-sidebar-top" };
|
|
17545
17553
|
const _hoisted_5$b = { class: "lupa-sidebar-title" };
|
|
17546
17554
|
const _hoisted_6$7 = {
|
|
17547
17555
|
key: 0,
|
|
@@ -17585,7 +17593,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
17585
17593
|
onClick: withModifiers(handleMobileToggle, ["stop"])
|
|
17586
17594
|
}, null, 8, _hoisted_2$r),
|
|
17587
17595
|
createElementVNode("div", _hoisted_3$l, [
|
|
17588
|
-
createElementVNode("div", _hoisted_4$
|
|
17596
|
+
createElementVNode("div", _hoisted_4$h, [
|
|
17589
17597
|
createElementVNode("div", _hoisted_5$b, [
|
|
17590
17598
|
createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
|
|
17591
17599
|
isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_6$7, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
@@ -17613,7 +17621,7 @@ const _hoisted_3$k = {
|
|
|
17613
17621
|
key: 1,
|
|
17614
17622
|
class: "lupa-search-results-breadcrumb-text"
|
|
17615
17623
|
};
|
|
17616
|
-
const _hoisted_4$
|
|
17624
|
+
const _hoisted_4$g = { key: 2 };
|
|
17617
17625
|
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
17618
17626
|
__name: "SearchResultsBreadcrumbs",
|
|
17619
17627
|
props: {
|
|
@@ -17654,7 +17662,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
17654
17662
|
return handleNavigation(e2, (_a = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a : "");
|
|
17655
17663
|
}
|
|
17656
17664
|
}, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$q)) : (openBlock(), createElementBlock("span", _hoisted_3$k, toDisplayString(getLabel(breadcrumb.label)), 1)),
|
|
17657
|
-
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
17665
|
+
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$g, " / ")) : createCommentVNode("", true)
|
|
17658
17666
|
]);
|
|
17659
17667
|
}), 128))
|
|
17660
17668
|
]);
|
|
@@ -17760,7 +17768,7 @@ const _hoisted_2$p = {
|
|
|
17760
17768
|
class: "lupa-page-number-separator"
|
|
17761
17769
|
};
|
|
17762
17770
|
const _hoisted_3$j = ["onClick"];
|
|
17763
|
-
const _hoisted_4$
|
|
17771
|
+
const _hoisted_4$f = {
|
|
17764
17772
|
key: 0,
|
|
17765
17773
|
class: "lupa-page-number-separator"
|
|
17766
17774
|
};
|
|
@@ -17866,7 +17874,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
17866
17874
|
}, toDisplayString(page), 11, _hoisted_3$j);
|
|
17867
17875
|
}), 128)),
|
|
17868
17876
|
showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
17869
|
-
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
17877
|
+
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$f, "...")) : createCommentVNode("", true),
|
|
17870
17878
|
createElementVNode("div", {
|
|
17871
17879
|
class: "lupa-page-number lupa-page-number-last",
|
|
17872
17880
|
onClick: _cache[2] || (_cache[2] = () => {
|
|
@@ -17891,7 +17899,7 @@ const _hoisted_1$u = {
|
|
|
17891
17899
|
};
|
|
17892
17900
|
const _hoisted_2$o = { id: "lupa-select" };
|
|
17893
17901
|
const _hoisted_3$i = { class: "lupa-select-label" };
|
|
17894
|
-
const _hoisted_4$
|
|
17902
|
+
const _hoisted_4$e = ["aria-label"];
|
|
17895
17903
|
const _hoisted_5$a = ["value"];
|
|
17896
17904
|
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
17897
17905
|
__name: "SearchResultsPageSize",
|
|
@@ -17938,7 +17946,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
17938
17946
|
value: option
|
|
17939
17947
|
}, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$a);
|
|
17940
17948
|
}), 128))
|
|
17941
|
-
], 40, _hoisted_4$
|
|
17949
|
+
], 40, _hoisted_4$e)
|
|
17942
17950
|
])
|
|
17943
17951
|
]);
|
|
17944
17952
|
};
|
|
@@ -17950,7 +17958,7 @@ const _hoisted_1$t = {
|
|
|
17950
17958
|
};
|
|
17951
17959
|
const _hoisted_2$n = { id: "lupa-select" };
|
|
17952
17960
|
const _hoisted_3$h = { class: "lupa-select-label" };
|
|
17953
|
-
const _hoisted_4$
|
|
17961
|
+
const _hoisted_4$d = ["aria-label"];
|
|
17954
17962
|
const _hoisted_5$9 = ["value"];
|
|
17955
17963
|
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
17956
17964
|
__name: "SearchResultsSort",
|
|
@@ -18018,7 +18026,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
18018
18026
|
value: option.key
|
|
18019
18027
|
}, toDisplayString(option.label), 9, _hoisted_5$9);
|
|
18020
18028
|
}), 128))
|
|
18021
|
-
], 40, _hoisted_4$
|
|
18029
|
+
], 40, _hoisted_4$d), [
|
|
18022
18030
|
[vModelSelect, selectedKey.value]
|
|
18023
18031
|
])
|
|
18024
18032
|
])
|
|
@@ -18032,7 +18040,7 @@ const _hoisted_2$m = {
|
|
|
18032
18040
|
class: "lupa-toolbar-right-title"
|
|
18033
18041
|
};
|
|
18034
18042
|
const _hoisted_3$g = { key: 2 };
|
|
18035
|
-
const _hoisted_4$
|
|
18043
|
+
const _hoisted_4$c = { key: 4 };
|
|
18036
18044
|
const _hoisted_5$8 = { key: 6 };
|
|
18037
18045
|
const _hoisted_6$6 = { class: "lupa-toolbar-right" };
|
|
18038
18046
|
const _hoisted_7$3 = {
|
|
@@ -18156,7 +18164,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
18156
18164
|
label: searchSummaryLabel.value,
|
|
18157
18165
|
clearable: unref(hasAnyFilter) && showFilterClear.value,
|
|
18158
18166
|
onClear: handleClearAll
|
|
18159
|
-
}, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$
|
|
18167
|
+
}, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$c)),
|
|
18160
18168
|
displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$z, {
|
|
18161
18169
|
key: 5,
|
|
18162
18170
|
options: paginationOptions.value.pageSelect,
|
|
@@ -18205,7 +18213,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
18205
18213
|
const _hoisted_1$r = ["title", "innerHTML"];
|
|
18206
18214
|
const _hoisted_2$l = ["title"];
|
|
18207
18215
|
const _hoisted_3$f = ["href", "innerHTML"];
|
|
18208
|
-
const _hoisted_4$
|
|
18216
|
+
const _hoisted_4$b = ["title"];
|
|
18209
18217
|
const _hoisted_5$7 = {
|
|
18210
18218
|
key: 0,
|
|
18211
18219
|
class: "lupa-search-results-product-title-text"
|
|
@@ -18273,7 +18281,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
18273
18281
|
class: "lupa-search-results-product-title-text lupa-title-link",
|
|
18274
18282
|
onClick: handleNavigation
|
|
18275
18283
|
}, toDisplayString(title.value), 9, _hoisted_6$5)) : createCommentVNode("", true)
|
|
18276
|
-
], 12, _hoisted_4$
|
|
18284
|
+
], 12, _hoisted_4$b));
|
|
18277
18285
|
};
|
|
18278
18286
|
}
|
|
18279
18287
|
});
|
|
@@ -18316,7 +18324,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
18316
18324
|
const _hoisted_1$p = { id: "lupa-search-results-rating" };
|
|
18317
18325
|
const _hoisted_2$k = { class: "lupa-ratings" };
|
|
18318
18326
|
const _hoisted_3$e = { class: "lupa-ratings-base" };
|
|
18319
|
-
const _hoisted_4$
|
|
18327
|
+
const _hoisted_4$a = ["innerHTML"];
|
|
18320
18328
|
const _hoisted_5$6 = { class: "lupa-rating-wrapper" };
|
|
18321
18329
|
const _hoisted_6$4 = ["innerHTML"];
|
|
18322
18330
|
const _hoisted_7$2 = ["href"];
|
|
@@ -18360,7 +18368,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
18360
18368
|
key: index,
|
|
18361
18369
|
innerHTML: star,
|
|
18362
18370
|
class: "lupa-rating lupa-rating-not-highlighted"
|
|
18363
|
-
}, null, 8, _hoisted_4$
|
|
18371
|
+
}, null, 8, _hoisted_4$a);
|
|
18364
18372
|
}), 128))
|
|
18365
18373
|
]),
|
|
18366
18374
|
createElementVNode("div", _hoisted_5$6, [
|
|
@@ -18494,7 +18502,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
18494
18502
|
const _hoisted_1$m = ["innerHTML"];
|
|
18495
18503
|
const _hoisted_2$i = { key: 0 };
|
|
18496
18504
|
const _hoisted_3$c = { key: 1 };
|
|
18497
|
-
const _hoisted_4$
|
|
18505
|
+
const _hoisted_4$9 = { class: "lupa-search-box-custom-label" };
|
|
18498
18506
|
const _hoisted_5$5 = { class: "lupa-search-box-custom-text" };
|
|
18499
18507
|
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
18500
18508
|
__name: "SearchResultsProductCustom",
|
|
@@ -18539,7 +18547,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
18539
18547
|
class: className.value
|
|
18540
18548
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
18541
18549
|
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$i, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$c, [
|
|
18542
|
-
createElementVNode("div", _hoisted_4$
|
|
18550
|
+
createElementVNode("div", _hoisted_4$9, toDisplayString(label.value), 1),
|
|
18543
18551
|
createElementVNode("div", _hoisted_5$5, toDisplayString(text.value), 1)
|
|
18544
18552
|
]))
|
|
18545
18553
|
], 16));
|
|
@@ -18585,7 +18593,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
18585
18593
|
const _hoisted_1$k = { id: "lupa-search-results-rating" };
|
|
18586
18594
|
const _hoisted_2$h = ["innerHTML"];
|
|
18587
18595
|
const _hoisted_3$b = { class: "lupa-ratings" };
|
|
18588
|
-
const _hoisted_4$
|
|
18596
|
+
const _hoisted_4$8 = ["href"];
|
|
18589
18597
|
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
18590
18598
|
__name: "SearchResultsProductSingleStarRating",
|
|
18591
18599
|
props: {
|
|
@@ -18623,7 +18631,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
18623
18631
|
createElementVNode("a", {
|
|
18624
18632
|
href: ratingLink.value,
|
|
18625
18633
|
class: "lupa-total-ratings"
|
|
18626
|
-
}, toDisplayString(totalRatings.value), 9, _hoisted_4$
|
|
18634
|
+
}, toDisplayString(totalRatings.value), 9, _hoisted_4$8)
|
|
18627
18635
|
]);
|
|
18628
18636
|
};
|
|
18629
18637
|
}
|
|
@@ -18951,7 +18959,7 @@ const _hoisted_3$9 = {
|
|
|
18951
18959
|
class: "lupa-similar-query-label",
|
|
18952
18960
|
"data-cy": "lupa-similar-query-label"
|
|
18953
18961
|
};
|
|
18954
|
-
const _hoisted_4$
|
|
18962
|
+
const _hoisted_4$7 = ["onClick"];
|
|
18955
18963
|
const _hoisted_5$4 = ["innerHTML"];
|
|
18956
18964
|
const _hoisted_6$3 = { key: 0 };
|
|
18957
18965
|
const _hoisted_7$1 = {
|
|
@@ -19004,7 +19012,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
19004
19012
|
innerHTML: getSimilarQueryContent(similarQuery.displayQuery)
|
|
19005
19013
|
}, null, 8, _hoisted_5$4),
|
|
19006
19014
|
similarQuery.count ? (openBlock(), createElementBlock("span", _hoisted_6$3, " (" + toDisplayString(similarQuery.count) + ")", 1)) : createCommentVNode("", true)
|
|
19007
|
-
], 8, _hoisted_4$
|
|
19015
|
+
], 8, _hoisted_4$7)
|
|
19008
19016
|
]),
|
|
19009
19017
|
createElementVNode("div", _hoisted_7$1, [
|
|
19010
19018
|
(openBlock(true), createElementBlock(Fragment, null, renderList(similarQuery.items, (product, index2) => {
|
|
@@ -19227,7 +19235,7 @@ const _hoisted_3$7 = {
|
|
|
19227
19235
|
class: "lupa-empty-results",
|
|
19228
19236
|
"data-cy": "lupa-no-results-in-page"
|
|
19229
19237
|
};
|
|
19230
|
-
const _hoisted_4$
|
|
19238
|
+
const _hoisted_4$6 = {
|
|
19231
19239
|
key: 3,
|
|
19232
19240
|
class: "lupa-empty-results",
|
|
19233
19241
|
"data-cy": "lupa-no-results"
|
|
@@ -19419,7 +19427,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
19419
19427
|
location: "bottom",
|
|
19420
19428
|
sdkOptions: _ctx.options.options
|
|
19421
19429
|
}, null, 8, ["options", "sdkOptions"])
|
|
19422
|
-
], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
19430
|
+
], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$6, [
|
|
19423
19431
|
createTextVNode(toDisplayString(_ctx.options.labels.emptyResults) + " ", 1),
|
|
19424
19432
|
createElementVNode("span", null, toDisplayString(unref(currentQueryText)), 1)
|
|
19425
19433
|
])) : createCommentVNode("", true),
|
|
@@ -19448,6 +19456,7 @@ const _hoisted_2$a = {
|
|
|
19448
19456
|
class: "lupa-category-back"
|
|
19449
19457
|
};
|
|
19450
19458
|
const _hoisted_3$6 = ["href"];
|
|
19459
|
+
const _hoisted_4$5 = { class: "lupa-child-category-list" };
|
|
19451
19460
|
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
19452
19461
|
__name: "CategoryTopFilters",
|
|
19453
19462
|
props: {
|
|
@@ -19455,6 +19464,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
19455
19464
|
},
|
|
19456
19465
|
setup(__props) {
|
|
19457
19466
|
const props = __props;
|
|
19467
|
+
const searchResultsStore = useSearchResultStore();
|
|
19468
|
+
const { relatedCategoryChildren } = storeToRefs(searchResultsStore);
|
|
19458
19469
|
const hasBackButton = computed(() => {
|
|
19459
19470
|
var _a, _b;
|
|
19460
19471
|
return Boolean((_b = (_a = props.options.categories) == null ? void 0 : _a.back) == null ? void 0 : _b.title);
|
|
@@ -19470,12 +19481,19 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
19470
19481
|
const hasEventRouting = computed(() => {
|
|
19471
19482
|
return props.options.routingBehavior === "event";
|
|
19472
19483
|
});
|
|
19484
|
+
const categoryOptions = computed(() => {
|
|
19485
|
+
return props.options.categories;
|
|
19486
|
+
});
|
|
19473
19487
|
const handleNavigationBack = (event) => {
|
|
19474
19488
|
if (!backUrlLink.value) {
|
|
19475
19489
|
return;
|
|
19476
19490
|
}
|
|
19477
19491
|
handleRoutingEvent(backUrlLink.value, event, hasEventRouting.value);
|
|
19478
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
|
+
};
|
|
19479
19497
|
return (_ctx, _cache) => {
|
|
19480
19498
|
return openBlock(), createElementBlock("div", {
|
|
19481
19499
|
class: normalizeClass(["lupa-category-top-mobile-filters", { "lupa-has-back-button": hasBackButton.value }])
|
|
@@ -19488,6 +19506,15 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
19488
19506
|
onClick: handleNavigationBack
|
|
19489
19507
|
}, toDisplayString(backTitle.value), 9, _hoisted_3$6)
|
|
19490
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
|
+
]),
|
|
19491
19518
|
createVNode(_sfc_main$w, {
|
|
19492
19519
|
class: "lupa-toolbar-mobile",
|
|
19493
19520
|
"pagination-location": "top",
|
|
@@ -22,6 +22,7 @@ export declare const useSearchResultStore: import("pinia").StoreDefinition<"sear
|
|
|
22
22
|
itemRange: import("vue").ComputedRef<number[]>;
|
|
23
23
|
isPageEmpty: import("vue").ComputedRef<boolean>;
|
|
24
24
|
hideFiltersOnExactMatchForKeys: import("vue").ComputedRef<any>;
|
|
25
|
+
relatedCategoryChildren: Ref<any[]>;
|
|
25
26
|
setSidebarState: ({ visible }: {
|
|
26
27
|
visible: boolean;
|
|
27
28
|
}) => void;
|
|
@@ -45,7 +46,8 @@ export declare const useSearchResultStore: import("pinia").StoreDefinition<"sear
|
|
|
45
46
|
setLoading: (state: boolean) => void;
|
|
46
47
|
clearSearchResult: () => void;
|
|
47
48
|
filterVisibleFilterValues: (key: string, items?: FacetGroupItem[]) => FacetGroupItem[];
|
|
48
|
-
|
|
49
|
+
setRelatedCategoryChildren: (children: Record<string, string>[]) => void;
|
|
50
|
+
}, "loading" | "searchResult" | "isMobileSidebarVisible" | "columnCount" | "addToCartAmount" | "layout" | "relatedCategoryChildren">>, Pick<{
|
|
49
51
|
isMobileSidebarVisible: Ref<boolean>;
|
|
50
52
|
searchResult: Ref<SearchQueryResult>;
|
|
51
53
|
columnCount: Ref<number>;
|
|
@@ -65,6 +67,7 @@ export declare const useSearchResultStore: import("pinia").StoreDefinition<"sear
|
|
|
65
67
|
itemRange: import("vue").ComputedRef<number[]>;
|
|
66
68
|
isPageEmpty: import("vue").ComputedRef<boolean>;
|
|
67
69
|
hideFiltersOnExactMatchForKeys: import("vue").ComputedRef<any>;
|
|
70
|
+
relatedCategoryChildren: Ref<any[]>;
|
|
68
71
|
setSidebarState: ({ visible }: {
|
|
69
72
|
visible: boolean;
|
|
70
73
|
}) => void;
|
|
@@ -88,6 +91,7 @@ export declare const useSearchResultStore: import("pinia").StoreDefinition<"sear
|
|
|
88
91
|
setLoading: (state: boolean) => void;
|
|
89
92
|
clearSearchResult: () => void;
|
|
90
93
|
filterVisibleFilterValues: (key: string, items?: FacetGroupItem[]) => FacetGroupItem[];
|
|
94
|
+
setRelatedCategoryChildren: (children: Record<string, string>[]) => void;
|
|
91
95
|
}, "filters" | "facets" | "hideFiltersOnExactMatchForKeys" | "currentQueryText" | "totalItems" | "hasResults" | "labeledFilters" | "displayFilters" | "currentFilterCount" | "currentFilterKeys" | "hasAnyFilter" | "itemRange" | "isPageEmpty">, Pick<{
|
|
92
96
|
isMobileSidebarVisible: Ref<boolean>;
|
|
93
97
|
searchResult: Ref<SearchQueryResult>;
|
|
@@ -108,6 +112,7 @@ export declare const useSearchResultStore: import("pinia").StoreDefinition<"sear
|
|
|
108
112
|
itemRange: import("vue").ComputedRef<number[]>;
|
|
109
113
|
isPageEmpty: import("vue").ComputedRef<boolean>;
|
|
110
114
|
hideFiltersOnExactMatchForKeys: import("vue").ComputedRef<any>;
|
|
115
|
+
relatedCategoryChildren: Ref<any[]>;
|
|
111
116
|
setSidebarState: ({ visible }: {
|
|
112
117
|
visible: boolean;
|
|
113
118
|
}) => void;
|
|
@@ -131,4 +136,5 @@ export declare const useSearchResultStore: import("pinia").StoreDefinition<"sear
|
|
|
131
136
|
setLoading: (state: boolean) => void;
|
|
132
137
|
clearSearchResult: () => void;
|
|
133
138
|
filterVisibleFilterValues: (key: string, items?: FacetGroupItem[]) => FacetGroupItem[];
|
|
134
|
-
|
|
139
|
+
setRelatedCategoryChildren: (children: Record<string, string>[]) => void;
|
|
140
|
+
}, "add" | "setSidebarState" | "queryFacet" | "setColumnCount" | "setAddToCartAmount" | "setLayout" | "setLoading" | "clearSearchResult" | "filterVisibleFilterValues" | "setRelatedCategoryChildren">>;
|