@getlupa/client 1.22.0 → 1.22.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.iife.js +144 -58
- package/dist/lupaSearch.js +144 -58
- package/dist/lupaSearch.mjs +144 -58
- package/dist/lupaSearch.umd.js +144 -58
- package/package.json +2 -2
package/dist/lupaSearch.iife.js
CHANGED
|
@@ -19173,6 +19173,18 @@ var __async = (__this, __arguments, generator) => {
|
|
|
19173
19173
|
params.value = parseParams(optionsStore.getQueryParamName, url.searchParams);
|
|
19174
19174
|
searchString.value = url.search;
|
|
19175
19175
|
};
|
|
19176
|
+
const getPageUrlWithNewParams = ({
|
|
19177
|
+
params: newParams,
|
|
19178
|
+
paramsToRemove,
|
|
19179
|
+
encode: encode2 = true,
|
|
19180
|
+
searchResultsLink: searchResultsLink2
|
|
19181
|
+
}) => {
|
|
19182
|
+
const url = getPageUrl(searchResultsLink2);
|
|
19183
|
+
paramsToRemove = getRemovableParams(url, optionsStore.getQueryParamName, paramsToRemove);
|
|
19184
|
+
removeParams(url, paramsToRemove);
|
|
19185
|
+
newParams.forEach((p2) => appendParam(url, p2, encode2));
|
|
19186
|
+
return url.search;
|
|
19187
|
+
};
|
|
19176
19188
|
const removeParameters = ({
|
|
19177
19189
|
paramsToRemove,
|
|
19178
19190
|
save = true
|
|
@@ -19310,6 +19322,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
19310
19322
|
sortParams,
|
|
19311
19323
|
lastChangedParams,
|
|
19312
19324
|
skipFacetReload,
|
|
19325
|
+
getPageUrlWithNewParams,
|
|
19313
19326
|
add,
|
|
19314
19327
|
removeAllFilters,
|
|
19315
19328
|
removeParameters,
|
|
@@ -19784,7 +19797,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
19784
19797
|
};
|
|
19785
19798
|
const _hoisted_2$W = { class: "lupa-dialog-content" };
|
|
19786
19799
|
const _hoisted_3$E = { class: "lupa-listening-text" };
|
|
19787
|
-
const _hoisted_4$
|
|
19800
|
+
const _hoisted_4$u = { class: "lupa-mic-button-wrapper" };
|
|
19788
19801
|
const _hoisted_5$l = ["aria-label"];
|
|
19789
19802
|
const _sfc_main$1z = /* @__PURE__ */ defineComponent({
|
|
19790
19803
|
__name: "VoiceSearchDialog",
|
|
@@ -19898,7 +19911,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
19898
19911
|
}),
|
|
19899
19912
|
createBaseVNode("div", _hoisted_2$W, [
|
|
19900
19913
|
createBaseVNode("p", _hoisted_3$E, toDisplayString(description.value), 1),
|
|
19901
|
-
createBaseVNode("div", _hoisted_4$
|
|
19914
|
+
createBaseVNode("div", _hoisted_4$u, [
|
|
19902
19915
|
createBaseVNode("button", {
|
|
19903
19916
|
class: normalizeClass(["lupa-mic-button", { recording: unref(isRecording) }]),
|
|
19904
19917
|
onClick: handleRecordingButtonClick,
|
|
@@ -19923,7 +19936,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
19923
19936
|
const _hoisted_1$1k = { id: "lupa-search-box-input-container" };
|
|
19924
19937
|
const _hoisted_2$V = { class: "lupa-input-clear" };
|
|
19925
19938
|
const _hoisted_3$D = { id: "lupa-search-box-input" };
|
|
19926
|
-
const _hoisted_4$
|
|
19939
|
+
const _hoisted_4$t = ["value"];
|
|
19927
19940
|
const _hoisted_5$k = ["aria-label", "placeholder"];
|
|
19928
19941
|
const _hoisted_6$8 = {
|
|
19929
19942
|
key: 0,
|
|
@@ -20076,7 +20089,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20076
20089
|
"aria-hidden": "true",
|
|
20077
20090
|
value: showHint.value ? suggestedValue.value.item.suggestion : "",
|
|
20078
20091
|
disabled: ""
|
|
20079
|
-
}, null, 8, _hoisted_4$
|
|
20092
|
+
}, null, 8, _hoisted_4$t),
|
|
20080
20093
|
withDirectives(createBaseVNode("input", mergeProps({
|
|
20081
20094
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
|
|
20082
20095
|
}, inputAttributes.value, {
|
|
@@ -20326,7 +20339,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20326
20339
|
class: "lupa-suggestion-facet",
|
|
20327
20340
|
"data-cy": "lupa-suggestion-facet"
|
|
20328
20341
|
};
|
|
20329
|
-
const _hoisted_4$
|
|
20342
|
+
const _hoisted_4$s = {
|
|
20330
20343
|
class: "lupa-suggestion-facet-label",
|
|
20331
20344
|
"data-cy": "lupa-suggestion-facet-label"
|
|
20332
20345
|
};
|
|
@@ -20373,7 +20386,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20373
20386
|
innerHTML: _ctx.suggestion.displayHighlight
|
|
20374
20387
|
}, null, 8, _hoisted_1$1g)) : (openBlock(), createElementBlock("div", _hoisted_2$T, toDisplayString(_ctx.suggestion.display), 1)),
|
|
20375
20388
|
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$C, [
|
|
20376
|
-
createBaseVNode("span", _hoisted_4$
|
|
20389
|
+
createBaseVNode("span", _hoisted_4$s, toDisplayString(facetLabel.value), 1),
|
|
20377
20390
|
createBaseVNode("span", _hoisted_5$j, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
20378
20391
|
])) : createCommentVNode("", true)
|
|
20379
20392
|
]);
|
|
@@ -30113,7 +30126,7 @@ and ensure you are accounting for this risk.
|
|
|
30113
30126
|
const _hoisted_1$1a = ["innerHTML"];
|
|
30114
30127
|
const _hoisted_2$P = { key: 0 };
|
|
30115
30128
|
const _hoisted_3$B = { key: 1 };
|
|
30116
|
-
const _hoisted_4$
|
|
30129
|
+
const _hoisted_4$r = { class: "lupa-search-box-custom-label" };
|
|
30117
30130
|
const _hoisted_5$i = { class: "lupa-search-box-custom-text" };
|
|
30118
30131
|
const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
30119
30132
|
__name: "SearchBoxProductCustom",
|
|
@@ -30146,7 +30159,7 @@ and ensure you are accounting for this risk.
|
|
|
30146
30159
|
class: [className.value, "lupa-search-box-product-custom"]
|
|
30147
30160
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), [
|
|
30148
30161
|
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$P, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$B, [
|
|
30149
|
-
createBaseVNode("div", _hoisted_4$
|
|
30162
|
+
createBaseVNode("div", _hoisted_4$r, toDisplayString(label.value), 1),
|
|
30150
30163
|
createBaseVNode("div", _hoisted_5$i, toDisplayString(text.value), 1)
|
|
30151
30164
|
]))
|
|
30152
30165
|
], 16));
|
|
@@ -30497,7 +30510,7 @@ and ensure you are accounting for this risk.
|
|
|
30497
30510
|
const _hoisted_1$18 = { class: "lupa-search-box-add-to-cart-wrapper" };
|
|
30498
30511
|
const _hoisted_2$O = { class: "lupa-search-box-product-addtocart" };
|
|
30499
30512
|
const _hoisted_3$A = ["disabled"];
|
|
30500
|
-
const _hoisted_4$
|
|
30513
|
+
const _hoisted_4$q = ["href"];
|
|
30501
30514
|
const _hoisted_5$h = ["disabled"];
|
|
30502
30515
|
const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
30503
30516
|
__name: "SearchBoxProductAddToCart",
|
|
@@ -30553,7 +30566,7 @@ and ensure you are accounting for this risk.
|
|
|
30553
30566
|
"data-cy": "lupa-add-to-cart",
|
|
30554
30567
|
disabled: !inStockValue.value || loading.value
|
|
30555
30568
|
}, _ctx.dynamicAttributes, { onClick: handleClick }), [
|
|
30556
|
-
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$
|
|
30569
|
+
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$q)
|
|
30557
30570
|
], 16, _hoisted_3$A)) : (openBlock(), createElementBlock("button", mergeProps({
|
|
30558
30571
|
key: 1,
|
|
30559
30572
|
onClick: withModifiers(handleClick, ["stop", "prevent"]),
|
|
@@ -30673,7 +30686,7 @@ and ensure you are accounting for this risk.
|
|
|
30673
30686
|
const _hoisted_1$16 = { class: "lupa-badge-title" };
|
|
30674
30687
|
const _hoisted_2$N = ["src"];
|
|
30675
30688
|
const _hoisted_3$z = { key: 1 };
|
|
30676
|
-
const _hoisted_4$
|
|
30689
|
+
const _hoisted_4$p = {
|
|
30677
30690
|
key: 0,
|
|
30678
30691
|
class: "lupa-badge-full-text"
|
|
30679
30692
|
};
|
|
@@ -30717,7 +30730,7 @@ and ensure you are accounting for this risk.
|
|
|
30717
30730
|
}, null, 8, _hoisted_2$N)) : createCommentVNode("", true),
|
|
30718
30731
|
hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$z, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
|
|
30719
30732
|
]),
|
|
30720
|
-
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
30733
|
+
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
|
|
30721
30734
|
], 6);
|
|
30722
30735
|
};
|
|
30723
30736
|
}
|
|
@@ -31685,7 +31698,7 @@ and ensure you are accounting for this risk.
|
|
|
31685
31698
|
key: 0,
|
|
31686
31699
|
class: "lupa-panel-title lupa-panel-title-top-results"
|
|
31687
31700
|
};
|
|
31688
|
-
const _hoisted_4$
|
|
31701
|
+
const _hoisted_4$o = {
|
|
31689
31702
|
key: 1,
|
|
31690
31703
|
class: "lupa-panel-title"
|
|
31691
31704
|
};
|
|
@@ -31731,6 +31744,7 @@ and ensure you are accounting for this risk.
|
|
|
31731
31744
|
const searchBoxStore = useSearchBoxStore();
|
|
31732
31745
|
const { suggestionResults, hasAnyResults, panelItemCounts } = storeToRefs(searchBoxStore);
|
|
31733
31746
|
const emit2 = __emit;
|
|
31747
|
+
const isSearchEmpty = computed(() => !props.inputValue || props.inputValue.length < 1);
|
|
31734
31748
|
const displayResults = computed(() => {
|
|
31735
31749
|
var _a25;
|
|
31736
31750
|
return ((_a25 = props.inputValue) == null ? void 0 : _a25.length) >= props.options.minInputLength;
|
|
@@ -31741,6 +31755,12 @@ and ensure you are accounting for this risk.
|
|
|
31741
31755
|
return Boolean(props.options.history) && ((_a25 = props.inputValue) == null ? void 0 : _a25.length) < 1 && props.options.minInputLength > 0;
|
|
31742
31756
|
}
|
|
31743
31757
|
);
|
|
31758
|
+
const displayShowMoreResultsButton = computed(() => {
|
|
31759
|
+
if (isSearchEmpty.value && props.options.hideMoreResultsButtonOnEmptyQuery) {
|
|
31760
|
+
return false;
|
|
31761
|
+
}
|
|
31762
|
+
return hasAnyResults.value || !props.options.hideMoreResultsButtonOnNoResults;
|
|
31763
|
+
});
|
|
31744
31764
|
const displayPanels = computed(
|
|
31745
31765
|
() => props.isSearchContainer ? panels.value.filter((p2) => p2.type === SearchBoxPanelType.SUGGESTION) : panels.value
|
|
31746
31766
|
);
|
|
@@ -31881,7 +31901,7 @@ and ensure you are accounting for this risk.
|
|
|
31881
31901
|
"data-cy": "lupa-panel-" + panel.type + "-index"
|
|
31882
31902
|
}, [
|
|
31883
31903
|
((_a25 = panel.labels) == null ? void 0 : _a25.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$x, toDisplayString((_b25 = panel.labels) == null ? void 0 : _b25.topResultsTitle), 1)) : createCommentVNode("", true),
|
|
31884
|
-
((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
31904
|
+
((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$o, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
|
|
31885
31905
|
panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
|
|
31886
31906
|
key: 2,
|
|
31887
31907
|
panel,
|
|
@@ -31910,7 +31930,7 @@ and ensure you are accounting for this risk.
|
|
|
31910
31930
|
key: 1,
|
|
31911
31931
|
labels: labels.value
|
|
31912
31932
|
}, null, 8, ["labels"])) : createCommentVNode("", true),
|
|
31913
|
-
|
|
31933
|
+
displayShowMoreResultsButton.value ? (openBlock(), createBlock(_sfc_main$1x, {
|
|
31914
31934
|
key: 2,
|
|
31915
31935
|
labels: labels.value,
|
|
31916
31936
|
options: _ctx.options,
|
|
@@ -31994,6 +32014,7 @@ and ensure you are accounting for this risk.
|
|
|
31994
32014
|
"debounce",
|
|
31995
32015
|
"showTotalCount",
|
|
31996
32016
|
"hideMoreResultsButtonOnNoResults",
|
|
32017
|
+
"hideMoreResultsButtonOnEmptyQuery",
|
|
31997
32018
|
"showNoResultsPanel",
|
|
31998
32019
|
"expandOnSinglePanel",
|
|
31999
32020
|
"showMoreResultsButton"
|
|
@@ -32379,7 +32400,7 @@ and ensure you are accounting for this risk.
|
|
|
32379
32400
|
key: 1,
|
|
32380
32401
|
"data-cy": "did-you-mean-label"
|
|
32381
32402
|
};
|
|
32382
|
-
const _hoisted_4$
|
|
32403
|
+
const _hoisted_4$n = { key: 1 };
|
|
32383
32404
|
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
32384
32405
|
__name: "SearchResultsDidYouMean",
|
|
32385
32406
|
props: {
|
|
@@ -32430,7 +32451,7 @@ and ensure you are accounting for this risk.
|
|
|
32430
32451
|
class: "lupa-did-you-mean lupa-highlighted-search-text",
|
|
32431
32452
|
"data-cy": "did-you-mean-value",
|
|
32432
32453
|
onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
|
|
32433
|
-
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$
|
|
32454
|
+
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, toDisplayString(label) + " ", 1))
|
|
32434
32455
|
]);
|
|
32435
32456
|
}), 128))
|
|
32436
32457
|
])) : createCommentVNode("", true)
|
|
@@ -32480,7 +32501,7 @@ and ensure you are accounting for this risk.
|
|
|
32480
32501
|
key: 1,
|
|
32481
32502
|
class: "lupa-results-total-count"
|
|
32482
32503
|
};
|
|
32483
|
-
const _hoisted_4$
|
|
32504
|
+
const _hoisted_4$m = { class: "lupa-results-total-count-number" };
|
|
32484
32505
|
const _hoisted_5$f = ["innerHTML"];
|
|
32485
32506
|
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
32486
32507
|
__name: "SearchResultsTitle",
|
|
@@ -32530,7 +32551,7 @@ and ensure you are accounting for this risk.
|
|
|
32530
32551
|
queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$G, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
|
|
32531
32552
|
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$v, [
|
|
32532
32553
|
createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
|
|
32533
|
-
createBaseVNode("span", _hoisted_4$
|
|
32554
|
+
createBaseVNode("span", _hoisted_4$m, toDisplayString(unref(totalItems)), 1),
|
|
32534
32555
|
_cache[0] || (_cache[0] = createTextVNode(")"))
|
|
32535
32556
|
])) : createCommentVNode("", true)
|
|
32536
32557
|
])) : createCommentVNode("", true),
|
|
@@ -32612,7 +32633,7 @@ and ensure you are accounting for this risk.
|
|
|
32612
32633
|
key: 0,
|
|
32613
32634
|
class: "filter-values"
|
|
32614
32635
|
};
|
|
32615
|
-
const _hoisted_4$
|
|
32636
|
+
const _hoisted_4$l = { class: "lupa-current-filter-list" };
|
|
32616
32637
|
const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
32617
32638
|
__name: "CurrentFilters",
|
|
32618
32639
|
props: {
|
|
@@ -32704,7 +32725,7 @@ and ensure you are accounting for this risk.
|
|
|
32704
32725
|
}, null, 2)) : createCommentVNode("", true)
|
|
32705
32726
|
]),
|
|
32706
32727
|
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$u, [
|
|
32707
|
-
createBaseVNode("div", _hoisted_4$
|
|
32728
|
+
createBaseVNode("div", _hoisted_4$l, [
|
|
32708
32729
|
(openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter) => {
|
|
32709
32730
|
return openBlock(), createBlock(_sfc_main$$, {
|
|
32710
32731
|
key: filter.key + "_" + filter.value,
|
|
@@ -32773,7 +32794,7 @@ and ensure you are accounting for this risk.
|
|
|
32773
32794
|
};
|
|
32774
32795
|
const _hoisted_2$D = { class: "lupa-category-back" };
|
|
32775
32796
|
const _hoisted_3$t = ["href"];
|
|
32776
|
-
const _hoisted_4$
|
|
32797
|
+
const _hoisted_4$k = ["href"];
|
|
32777
32798
|
const _hoisted_5$e = { class: "lupa-child-category-list" };
|
|
32778
32799
|
const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
32779
32800
|
__name: "CategoryFilter",
|
|
@@ -32880,7 +32901,7 @@ and ensure you are accounting for this risk.
|
|
|
32880
32901
|
href: parentUrlLink.value,
|
|
32881
32902
|
class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
|
|
32882
32903
|
onClick: handleNavigationParent
|
|
32883
|
-
}, toDisplayString(parentTitle.value), 11, _hoisted_4$
|
|
32904
|
+
}, toDisplayString(parentTitle.value), 11, _hoisted_4$k)
|
|
32884
32905
|
], 2),
|
|
32885
32906
|
createBaseVNode("div", _hoisted_5$e, [
|
|
32886
32907
|
(openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
|
|
@@ -32901,7 +32922,7 @@ and ensure you are accounting for this risk.
|
|
|
32901
32922
|
};
|
|
32902
32923
|
const _hoisted_2$C = ["placeholder"];
|
|
32903
32924
|
const _hoisted_3$s = { class: "lupa-terms-list" };
|
|
32904
|
-
const _hoisted_4$
|
|
32925
|
+
const _hoisted_4$j = ["onClick"];
|
|
32905
32926
|
const _hoisted_5$d = { class: "lupa-term-checkbox-wrapper" };
|
|
32906
32927
|
const _hoisted_6$7 = { class: "lupa-term-label" };
|
|
32907
32928
|
const _hoisted_7$4 = {
|
|
@@ -33033,7 +33054,7 @@ and ensure you are accounting for this risk.
|
|
|
33033
33054
|
createBaseVNode("span", _hoisted_6$7, toDisplayString(getItemLabel(item)), 1),
|
|
33034
33055
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_7$4, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
|
|
33035
33056
|
], 2)
|
|
33036
|
-
], 10, _hoisted_4$
|
|
33057
|
+
], 10, _hoisted_4$j);
|
|
33037
33058
|
}), 128))
|
|
33038
33059
|
]),
|
|
33039
33060
|
displayShowMore.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -33941,6 +33962,18 @@ and ensure you are accounting for this risk.
|
|
|
33941
33962
|
m.render = function(e2, t, r, i, n, o) {
|
|
33942
33963
|
return openBlock(), createElementBlock("div", mergeProps(e2.sliderProps, { ref: "slider" }), null, 16);
|
|
33943
33964
|
}, m.__file = "src/Slider.vue";
|
|
33965
|
+
const roundToMaxDecimals = (value, maxPrecision = 0.1) => {
|
|
33966
|
+
if (value === void 0 || value === null || Number.isNaN(value)) return "";
|
|
33967
|
+
const log = Math.log10(maxPrecision);
|
|
33968
|
+
const decimals = log < 0 ? Math.round(-log) : 0;
|
|
33969
|
+
const factor = Math.pow(10, decimals);
|
|
33970
|
+
const rounded = Math.round((value + Number.EPSILON) * factor) / factor;
|
|
33971
|
+
let out = rounded.toFixed(decimals);
|
|
33972
|
+
if (Number.isInteger(value)) {
|
|
33973
|
+
out = Math.trunc(value).toString();
|
|
33974
|
+
}
|
|
33975
|
+
return out;
|
|
33976
|
+
};
|
|
33944
33977
|
const _hoisted_1$P = { class: "lupa-search-result-facet-stats-values" };
|
|
33945
33978
|
const _hoisted_2$B = {
|
|
33946
33979
|
key: 0,
|
|
@@ -33950,7 +33983,7 @@ and ensure you are accounting for this risk.
|
|
|
33950
33983
|
key: 1,
|
|
33951
33984
|
class: "lupa-stats-facet-summary-input"
|
|
33952
33985
|
};
|
|
33953
|
-
const _hoisted_4$
|
|
33986
|
+
const _hoisted_4$i = { class: "lupa-stats-from" };
|
|
33954
33987
|
const _hoisted_5$c = {
|
|
33955
33988
|
key: 0,
|
|
33956
33989
|
class: "lupa-stats-range-label"
|
|
@@ -34089,7 +34122,7 @@ and ensure you are accounting for this risk.
|
|
|
34089
34122
|
const originalSliderRange = computed(() => {
|
|
34090
34123
|
return innerSliderRange.value.length === 2 && (currentFilters.value.gte || currentFilters.value.lte) ? [
|
|
34091
34124
|
Math.max(+currentFilters.value.gte, facetValue.value.min),
|
|
34092
|
-
Math.min(+currentFilters.value.lte, facetValue.value.max)
|
|
34125
|
+
Math.min(+(currentFilters.value.lt || currentFilters.value.lte), facetValue.value.max)
|
|
34093
34126
|
] : [facetValue.value.min, facetValue.value.max];
|
|
34094
34127
|
});
|
|
34095
34128
|
const fromValue = computed({
|
|
@@ -34145,6 +34178,7 @@ and ensure you are accounting for this risk.
|
|
|
34145
34178
|
}
|
|
34146
34179
|
);
|
|
34147
34180
|
const statsSummary = computed(() => {
|
|
34181
|
+
var _a25, _b25;
|
|
34148
34182
|
const [min, max] = originalSliderRange.value;
|
|
34149
34183
|
if (isPrice.value) {
|
|
34150
34184
|
return formatPriceSummary(
|
|
@@ -34155,10 +34189,12 @@ and ensure you are accounting for this risk.
|
|
|
34155
34189
|
multiCurrency.value
|
|
34156
34190
|
);
|
|
34157
34191
|
}
|
|
34192
|
+
const minValue = roundToMaxDecimals(min, (_a25 = customInterval.value) != null ? _a25 : 0.1);
|
|
34193
|
+
const maxValue = roundToMaxDecimals(max, (_b25 = customInterval.value) != null ? _b25 : 0.1);
|
|
34158
34194
|
if (unit.value) {
|
|
34159
|
-
return `${
|
|
34195
|
+
return `${minValue} ${unit.value} – ${maxValue} ${unit.value}`;
|
|
34160
34196
|
}
|
|
34161
|
-
return formatRange({ gte:
|
|
34197
|
+
return formatRange({ gte: minValue, lte: maxValue });
|
|
34162
34198
|
});
|
|
34163
34199
|
function handleInputChange() {
|
|
34164
34200
|
if (innerSliderRange.value.length < 2) return;
|
|
@@ -34188,7 +34224,7 @@ and ensure you are accounting for this risk.
|
|
|
34188
34224
|
return (_ctx, _cache) => {
|
|
34189
34225
|
return openBlock(), createElementBlock("div", _hoisted_1$P, [
|
|
34190
34226
|
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$B, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$r, [
|
|
34191
|
-
createBaseVNode("div", _hoisted_4$
|
|
34227
|
+
createBaseVNode("div", _hoisted_4$i, [
|
|
34192
34228
|
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_5$c, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
|
|
34193
34229
|
withDirectives(createBaseVNode("input", {
|
|
34194
34230
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
|
|
@@ -34257,7 +34293,7 @@ and ensure you are accounting for this risk.
|
|
|
34257
34293
|
key: 0,
|
|
34258
34294
|
class: "lupa-term-count"
|
|
34259
34295
|
};
|
|
34260
|
-
const _hoisted_4$
|
|
34296
|
+
const _hoisted_4$h = {
|
|
34261
34297
|
key: 0,
|
|
34262
34298
|
class: "lupa-facet-level"
|
|
34263
34299
|
};
|
|
@@ -34327,7 +34363,7 @@ and ensure you are accounting for this risk.
|
|
|
34327
34363
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_3$q, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
|
|
34328
34364
|
], 2)
|
|
34329
34365
|
]),
|
|
34330
|
-
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
34366
|
+
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$h, [
|
|
34331
34367
|
(openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
|
|
34332
34368
|
return openBlock(), createBlock(_component_HierarchyFacetLevel, {
|
|
34333
34369
|
key: itemChild.title,
|
|
@@ -34875,7 +34911,7 @@ and ensure you are accounting for this risk.
|
|
|
34875
34911
|
};
|
|
34876
34912
|
const _hoisted_2$w = { class: "lupa-mobile-sidebar-content" };
|
|
34877
34913
|
const _hoisted_3$o = { class: "lupa-sidebar-top" };
|
|
34878
|
-
const _hoisted_4$
|
|
34914
|
+
const _hoisted_4$g = { class: "lupa-sidebar-title" };
|
|
34879
34915
|
const _hoisted_5$b = {
|
|
34880
34916
|
key: 0,
|
|
34881
34917
|
class: "lupa-sidebar-filter-count"
|
|
@@ -34920,7 +34956,7 @@ and ensure you are accounting for this risk.
|
|
|
34920
34956
|
}),
|
|
34921
34957
|
createBaseVNode("div", _hoisted_2$w, [
|
|
34922
34958
|
createBaseVNode("div", _hoisted_3$o, [
|
|
34923
|
-
createBaseVNode("div", _hoisted_4$
|
|
34959
|
+
createBaseVNode("div", _hoisted_4$g, [
|
|
34924
34960
|
createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
|
|
34925
34961
|
isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_5$b, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
34926
34962
|
]),
|
|
@@ -34947,7 +34983,7 @@ and ensure you are accounting for this risk.
|
|
|
34947
34983
|
key: 1,
|
|
34948
34984
|
class: "lupa-search-results-breadcrumb-text"
|
|
34949
34985
|
};
|
|
34950
|
-
const _hoisted_4$
|
|
34986
|
+
const _hoisted_4$f = { key: 2 };
|
|
34951
34987
|
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
34952
34988
|
__name: "SearchResultsBreadcrumbs",
|
|
34953
34989
|
props: {
|
|
@@ -34989,7 +35025,7 @@ and ensure you are accounting for this risk.
|
|
|
34989
35025
|
return handleNavigation(e2, (_a26 = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a26 : "");
|
|
34990
35026
|
}
|
|
34991
35027
|
}, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$v)) : (openBlock(), createElementBlock("span", _hoisted_3$n, toDisplayString(getLabel(breadcrumb.label)), 1)),
|
|
34992
|
-
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
35028
|
+
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, toDisplayString((_a25 = breadcrumb.separator) != null ? _a25 : "/"), 1)) : createCommentVNode("", true)
|
|
34993
35029
|
]);
|
|
34994
35030
|
}), 128))
|
|
34995
35031
|
]);
|
|
@@ -35151,8 +35187,7 @@ and ensure you are accounting for this risk.
|
|
|
35151
35187
|
key: 0,
|
|
35152
35188
|
class: "lupa-page-number-separator"
|
|
35153
35189
|
};
|
|
35154
|
-
const _hoisted_3$m =
|
|
35155
|
-
const _hoisted_4$f = {
|
|
35190
|
+
const _hoisted_3$m = {
|
|
35156
35191
|
key: 0,
|
|
35157
35192
|
class: "lupa-page-number-separator"
|
|
35158
35193
|
};
|
|
@@ -35219,7 +35254,24 @@ and ensure you are accounting for this risk.
|
|
|
35219
35254
|
timeout: (_f = (_e = searchResultOptions.value.scrollToResults) == null ? void 0 : _e.timeout) != null ? _f : 500
|
|
35220
35255
|
};
|
|
35221
35256
|
});
|
|
35222
|
-
const
|
|
35257
|
+
const tagName = computed(() => {
|
|
35258
|
+
return props.options.renderAsLinks ? "a" : "div";
|
|
35259
|
+
});
|
|
35260
|
+
const getPageUrlWithNewParams = (page) => {
|
|
35261
|
+
return paramStore.getPageUrlWithNewParams({
|
|
35262
|
+
params: [{ name: optionsStore.getQueryParamName(QUERY_PARAMS$1.PAGE), value: page.toString() }]
|
|
35263
|
+
});
|
|
35264
|
+
};
|
|
35265
|
+
const getHref = (page) => {
|
|
35266
|
+
if (props.options.renderAsLinks) {
|
|
35267
|
+
return getPageUrlWithNewParams(page);
|
|
35268
|
+
}
|
|
35269
|
+
return null;
|
|
35270
|
+
};
|
|
35271
|
+
const handlePageChange = (e2, page) => {
|
|
35272
|
+
if (e2 && props.options.renderAsLinks) {
|
|
35273
|
+
e2.preventDefault();
|
|
35274
|
+
}
|
|
35223
35275
|
if (page > 0) {
|
|
35224
35276
|
paramStore.appendParams({
|
|
35225
35277
|
params: [{ name: optionsStore.getQueryParamName(QUERY_PARAMS$1.PAGE), value: page.toString() }]
|
|
@@ -35233,46 +35285,78 @@ and ensure you are accounting for this risk.
|
|
|
35233
35285
|
}
|
|
35234
35286
|
};
|
|
35235
35287
|
return (_ctx, _cache) => {
|
|
35288
|
+
var _a25;
|
|
35236
35289
|
return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$D, [
|
|
35237
|
-
showBack.value ? (openBlock(),
|
|
35290
|
+
showBack.value ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35238
35291
|
key: 0,
|
|
35239
35292
|
class: normalizeClass(firstPageLabel.value === "<" ? "lupa-page-arrow" : "lupa-show-less"),
|
|
35240
|
-
|
|
35241
|
-
|
|
35293
|
+
href: getHref(_ctx.options.selectedPage - 1),
|
|
35294
|
+
onClick: _cache[0] || (_cache[0] = (e2) => handlePageChange(e2, _ctx.options.selectedPage - 1))
|
|
35295
|
+
}, {
|
|
35296
|
+
default: withCtx(() => [
|
|
35297
|
+
createTextVNode(toDisplayString(firstPageLabel.value), 1)
|
|
35298
|
+
]),
|
|
35299
|
+
_: 1
|
|
35300
|
+
}, 8, ["class", "href"])) : createCommentVNode("", true),
|
|
35242
35301
|
showFirstPage.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
35243
|
-
|
|
35302
|
+
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35303
|
+
href: getHref(1),
|
|
35244
35304
|
class: "lupa-page-number lupa-page-number-first",
|
|
35245
|
-
onClick: _cache[1] || (_cache[1] = () => handlePageChange(1))
|
|
35246
|
-
},
|
|
35305
|
+
onClick: _cache[1] || (_cache[1] = (e2) => handlePageChange(e2, 1))
|
|
35306
|
+
}, {
|
|
35307
|
+
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
35308
|
+
createTextVNode(" 1 ")
|
|
35309
|
+
])),
|
|
35310
|
+
_: 1,
|
|
35311
|
+
__: [4]
|
|
35312
|
+
}, 8, ["href"])),
|
|
35247
35313
|
showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$u, "...")) : createCommentVNode("", true)
|
|
35248
35314
|
], 64)) : createCommentVNode("", true),
|
|
35249
35315
|
(openBlock(true), createElementBlock(Fragment, null, renderList(pages.value, (page) => {
|
|
35250
|
-
return openBlock(),
|
|
35316
|
+
return openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35251
35317
|
key: page,
|
|
35252
|
-
|
|
35318
|
+
href: getHref(page),
|
|
35319
|
+
onClick: (e2) => handlePageChange(e2, page),
|
|
35253
35320
|
class: normalizeClass([
|
|
35254
35321
|
"lupa-page-number",
|
|
35255
35322
|
page === _ctx.options.selectedPage ? "lupa-page-number-selected" : ""
|
|
35256
35323
|
]),
|
|
35257
35324
|
"data-cy": "lupa-page-number"
|
|
35258
|
-
},
|
|
35325
|
+
}, {
|
|
35326
|
+
default: withCtx(() => [
|
|
35327
|
+
createTextVNode(toDisplayString(page), 1)
|
|
35328
|
+
]),
|
|
35329
|
+
_: 2
|
|
35330
|
+
}, 1032, ["href", "onClick", "class"]);
|
|
35259
35331
|
}), 128)),
|
|
35260
35332
|
showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
35261
|
-
showLastPageSeparator.value ? (openBlock(), createElementBlock("div",
|
|
35262
|
-
|
|
35333
|
+
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_3$m, "...")) : createCommentVNode("", true),
|
|
35334
|
+
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35335
|
+
href: getHref((_a25 = lastPage.value) != null ? _a25 : 1),
|
|
35263
35336
|
class: "lupa-page-number lupa-page-number-last",
|
|
35264
|
-
onClick: _cache[2] || (_cache[2] = () => {
|
|
35265
|
-
var
|
|
35266
|
-
return handlePageChange((
|
|
35337
|
+
onClick: _cache[2] || (_cache[2] = (e2) => {
|
|
35338
|
+
var _a26;
|
|
35339
|
+
return handlePageChange(e2, (_a26 = lastPage.value) != null ? _a26 : 1);
|
|
35267
35340
|
})
|
|
35268
|
-
},
|
|
35341
|
+
}, {
|
|
35342
|
+
default: withCtx(() => [
|
|
35343
|
+
createTextVNode(toDisplayString(lastPage.value), 1)
|
|
35344
|
+
]),
|
|
35345
|
+
_: 1
|
|
35346
|
+
}, 8, ["href"]))
|
|
35269
35347
|
], 64)) : createCommentVNode("", true),
|
|
35270
|
-
_ctx.options.selectedPage < _ctx.options.count ? (openBlock(),
|
|
35348
|
+
_ctx.options.selectedPage < _ctx.options.count ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35271
35349
|
key: 3,
|
|
35272
35350
|
class: normalizeClass(lastPageLabel.value === ">" ? "lupa-page-arrow" : "lupa-show-more"),
|
|
35351
|
+
href: getHref(_ctx.options.selectedPage + 1),
|
|
35273
35352
|
"data-cy": "lupa-show-more",
|
|
35274
|
-
onClick: _cache[3] || (_cache[3] = () => handlePageChange(_ctx.options.selectedPage + 1))
|
|
35275
|
-
},
|
|
35353
|
+
onClick: _cache[3] || (_cache[3] = (e2) => handlePageChange(e2, _ctx.options.selectedPage + 1))
|
|
35354
|
+
}, {
|
|
35355
|
+
default: withCtx(() => [
|
|
35356
|
+
createTextVNode(toDisplayString(lastPageLabel.value), 1)
|
|
35357
|
+
]),
|
|
35358
|
+
_: 1
|
|
35359
|
+
}, 8, ["class", "href"])) : createCommentVNode("", true)
|
|
35276
35360
|
])) : createCommentVNode("", true);
|
|
35277
35361
|
};
|
|
35278
35362
|
}
|
|
@@ -35506,6 +35590,7 @@ and ensure you are accounting for this risk.
|
|
|
35506
35590
|
}
|
|
35507
35591
|
});
|
|
35508
35592
|
const paginationOptions = computed(() => {
|
|
35593
|
+
var _a25;
|
|
35509
35594
|
const pageSelect = optionsValue.value.pagination.pageSelection;
|
|
35510
35595
|
return {
|
|
35511
35596
|
pageSize: {
|
|
@@ -35516,7 +35601,8 @@ and ensure you are accounting for this risk.
|
|
|
35516
35601
|
count: getPageCount(searchResult.value.total, limit.value),
|
|
35517
35602
|
selectedPage: page.value,
|
|
35518
35603
|
display: pageSelect.display,
|
|
35519
|
-
displayMobile: pageSelect.displayMobile
|
|
35604
|
+
displayMobile: pageSelect.displayMobile,
|
|
35605
|
+
renderAsLinks: (_a25 = pageSelect.renderAsLinks) != null ? _a25 : false
|
|
35520
35606
|
},
|
|
35521
35607
|
labels: optionsValue.value.labels
|
|
35522
35608
|
};
|