@getlupa/client 1.22.0 → 1.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lupaSearch.iife.js +117 -54
- package/dist/lupaSearch.js +117 -54
- package/dist/lupaSearch.mjs +117 -54
- package/dist/lupaSearch.umd.js +117 -54
- package/package.json +2 -2
package/dist/lupaSearch.mjs
CHANGED
|
@@ -19171,6 +19171,18 @@ const useParamsStore = /* @__PURE__ */ defineStore("params", () => {
|
|
|
19171
19171
|
params.value = parseParams(optionsStore.getQueryParamName, url.searchParams);
|
|
19172
19172
|
searchString.value = url.search;
|
|
19173
19173
|
};
|
|
19174
|
+
const getPageUrlWithNewParams = ({
|
|
19175
|
+
params: newParams,
|
|
19176
|
+
paramsToRemove,
|
|
19177
|
+
encode: encode2 = true,
|
|
19178
|
+
searchResultsLink: searchResultsLink2
|
|
19179
|
+
}) => {
|
|
19180
|
+
const url = getPageUrl(searchResultsLink2);
|
|
19181
|
+
paramsToRemove = getRemovableParams(url, optionsStore.getQueryParamName, paramsToRemove);
|
|
19182
|
+
removeParams(url, paramsToRemove);
|
|
19183
|
+
newParams.forEach((p2) => appendParam(url, p2, encode2));
|
|
19184
|
+
return url.search;
|
|
19185
|
+
};
|
|
19174
19186
|
const removeParameters = ({
|
|
19175
19187
|
paramsToRemove,
|
|
19176
19188
|
save = true
|
|
@@ -19308,6 +19320,7 @@ const useParamsStore = /* @__PURE__ */ defineStore("params", () => {
|
|
|
19308
19320
|
sortParams,
|
|
19309
19321
|
lastChangedParams,
|
|
19310
19322
|
skipFacetReload,
|
|
19323
|
+
getPageUrlWithNewParams,
|
|
19311
19324
|
add,
|
|
19312
19325
|
removeAllFilters,
|
|
19313
19326
|
removeParameters,
|
|
@@ -19782,7 +19795,7 @@ const _hoisted_1$1l = {
|
|
|
19782
19795
|
};
|
|
19783
19796
|
const _hoisted_2$W = { class: "lupa-dialog-content" };
|
|
19784
19797
|
const _hoisted_3$E = { class: "lupa-listening-text" };
|
|
19785
|
-
const _hoisted_4$
|
|
19798
|
+
const _hoisted_4$u = { class: "lupa-mic-button-wrapper" };
|
|
19786
19799
|
const _hoisted_5$l = ["aria-label"];
|
|
19787
19800
|
const _sfc_main$1z = /* @__PURE__ */ defineComponent({
|
|
19788
19801
|
__name: "VoiceSearchDialog",
|
|
@@ -19896,7 +19909,7 @@ const _sfc_main$1z = /* @__PURE__ */ defineComponent({
|
|
|
19896
19909
|
}),
|
|
19897
19910
|
createBaseVNode("div", _hoisted_2$W, [
|
|
19898
19911
|
createBaseVNode("p", _hoisted_3$E, toDisplayString(description.value), 1),
|
|
19899
|
-
createBaseVNode("div", _hoisted_4$
|
|
19912
|
+
createBaseVNode("div", _hoisted_4$u, [
|
|
19900
19913
|
createBaseVNode("button", {
|
|
19901
19914
|
class: normalizeClass(["lupa-mic-button", { recording: unref(isRecording) }]),
|
|
19902
19915
|
onClick: handleRecordingButtonClick,
|
|
@@ -19921,7 +19934,7 @@ const _sfc_main$1z = /* @__PURE__ */ defineComponent({
|
|
|
19921
19934
|
const _hoisted_1$1k = { id: "lupa-search-box-input-container" };
|
|
19922
19935
|
const _hoisted_2$V = { class: "lupa-input-clear" };
|
|
19923
19936
|
const _hoisted_3$D = { id: "lupa-search-box-input" };
|
|
19924
|
-
const _hoisted_4$
|
|
19937
|
+
const _hoisted_4$t = ["value"];
|
|
19925
19938
|
const _hoisted_5$k = ["aria-label", "placeholder"];
|
|
19926
19939
|
const _hoisted_6$8 = {
|
|
19927
19940
|
key: 0,
|
|
@@ -20074,7 +20087,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
|
|
|
20074
20087
|
"aria-hidden": "true",
|
|
20075
20088
|
value: showHint.value ? suggestedValue.value.item.suggestion : "",
|
|
20076
20089
|
disabled: ""
|
|
20077
|
-
}, null, 8, _hoisted_4$
|
|
20090
|
+
}, null, 8, _hoisted_4$t),
|
|
20078
20091
|
withDirectives(createBaseVNode("input", mergeProps({
|
|
20079
20092
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
|
|
20080
20093
|
}, inputAttributes.value, {
|
|
@@ -20324,7 +20337,7 @@ const _hoisted_3$C = {
|
|
|
20324
20337
|
class: "lupa-suggestion-facet",
|
|
20325
20338
|
"data-cy": "lupa-suggestion-facet"
|
|
20326
20339
|
};
|
|
20327
|
-
const _hoisted_4$
|
|
20340
|
+
const _hoisted_4$s = {
|
|
20328
20341
|
class: "lupa-suggestion-facet-label",
|
|
20329
20342
|
"data-cy": "lupa-suggestion-facet-label"
|
|
20330
20343
|
};
|
|
@@ -20371,7 +20384,7 @@ const _sfc_main$1t = /* @__PURE__ */ defineComponent({
|
|
|
20371
20384
|
innerHTML: _ctx.suggestion.displayHighlight
|
|
20372
20385
|
}, null, 8, _hoisted_1$1g)) : (openBlock(), createElementBlock("div", _hoisted_2$T, toDisplayString(_ctx.suggestion.display), 1)),
|
|
20373
20386
|
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$C, [
|
|
20374
|
-
createBaseVNode("span", _hoisted_4$
|
|
20387
|
+
createBaseVNode("span", _hoisted_4$s, toDisplayString(facetLabel.value), 1),
|
|
20375
20388
|
createBaseVNode("span", _hoisted_5$j, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
20376
20389
|
])) : createCommentVNode("", true)
|
|
20377
20390
|
]);
|
|
@@ -30111,7 +30124,7 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
30111
30124
|
const _hoisted_1$1a = ["innerHTML"];
|
|
30112
30125
|
const _hoisted_2$P = { key: 0 };
|
|
30113
30126
|
const _hoisted_3$B = { key: 1 };
|
|
30114
|
-
const _hoisted_4$
|
|
30127
|
+
const _hoisted_4$r = { class: "lupa-search-box-custom-label" };
|
|
30115
30128
|
const _hoisted_5$i = { class: "lupa-search-box-custom-text" };
|
|
30116
30129
|
const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
30117
30130
|
__name: "SearchBoxProductCustom",
|
|
@@ -30144,7 +30157,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
30144
30157
|
class: [className.value, "lupa-search-box-product-custom"]
|
|
30145
30158
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), [
|
|
30146
30159
|
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$P, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$B, [
|
|
30147
|
-
createBaseVNode("div", _hoisted_4$
|
|
30160
|
+
createBaseVNode("div", _hoisted_4$r, toDisplayString(label.value), 1),
|
|
30148
30161
|
createBaseVNode("div", _hoisted_5$i, toDisplayString(text.value), 1)
|
|
30149
30162
|
]))
|
|
30150
30163
|
], 16));
|
|
@@ -30495,7 +30508,7 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
|
|
|
30495
30508
|
const _hoisted_1$18 = { class: "lupa-search-box-add-to-cart-wrapper" };
|
|
30496
30509
|
const _hoisted_2$O = { class: "lupa-search-box-product-addtocart" };
|
|
30497
30510
|
const _hoisted_3$A = ["disabled"];
|
|
30498
|
-
const _hoisted_4$
|
|
30511
|
+
const _hoisted_4$q = ["href"];
|
|
30499
30512
|
const _hoisted_5$h = ["disabled"];
|
|
30500
30513
|
const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
30501
30514
|
__name: "SearchBoxProductAddToCart",
|
|
@@ -30551,7 +30564,7 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
30551
30564
|
"data-cy": "lupa-add-to-cart",
|
|
30552
30565
|
disabled: !inStockValue.value || loading.value
|
|
30553
30566
|
}, _ctx.dynamicAttributes, { onClick: handleClick }), [
|
|
30554
|
-
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$
|
|
30567
|
+
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$q)
|
|
30555
30568
|
], 16, _hoisted_3$A)) : (openBlock(), createElementBlock("button", mergeProps({
|
|
30556
30569
|
key: 1,
|
|
30557
30570
|
onClick: withModifiers(handleClick, ["stop", "prevent"]),
|
|
@@ -30671,7 +30684,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
30671
30684
|
const _hoisted_1$16 = { class: "lupa-badge-title" };
|
|
30672
30685
|
const _hoisted_2$N = ["src"];
|
|
30673
30686
|
const _hoisted_3$z = { key: 1 };
|
|
30674
|
-
const _hoisted_4$
|
|
30687
|
+
const _hoisted_4$p = {
|
|
30675
30688
|
key: 0,
|
|
30676
30689
|
class: "lupa-badge-full-text"
|
|
30677
30690
|
};
|
|
@@ -30715,7 +30728,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
30715
30728
|
}, null, 8, _hoisted_2$N)) : createCommentVNode("", true),
|
|
30716
30729
|
hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$z, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
|
|
30717
30730
|
]),
|
|
30718
|
-
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
30731
|
+
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
|
|
30719
30732
|
], 6);
|
|
30720
30733
|
};
|
|
30721
30734
|
}
|
|
@@ -31683,7 +31696,7 @@ const _hoisted_3$x = {
|
|
|
31683
31696
|
key: 0,
|
|
31684
31697
|
class: "lupa-panel-title lupa-panel-title-top-results"
|
|
31685
31698
|
};
|
|
31686
|
-
const _hoisted_4$
|
|
31699
|
+
const _hoisted_4$o = {
|
|
31687
31700
|
key: 1,
|
|
31688
31701
|
class: "lupa-panel-title"
|
|
31689
31702
|
};
|
|
@@ -31879,7 +31892,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
31879
31892
|
"data-cy": "lupa-panel-" + panel.type + "-index"
|
|
31880
31893
|
}, [
|
|
31881
31894
|
((_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),
|
|
31882
|
-
((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
31895
|
+
((_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),
|
|
31883
31896
|
panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
|
|
31884
31897
|
key: 2,
|
|
31885
31898
|
panel,
|
|
@@ -32377,7 +32390,7 @@ const _hoisted_3$w = {
|
|
|
32377
32390
|
key: 1,
|
|
32378
32391
|
"data-cy": "did-you-mean-label"
|
|
32379
32392
|
};
|
|
32380
|
-
const _hoisted_4$
|
|
32393
|
+
const _hoisted_4$n = { key: 1 };
|
|
32381
32394
|
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
32382
32395
|
__name: "SearchResultsDidYouMean",
|
|
32383
32396
|
props: {
|
|
@@ -32428,7 +32441,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
32428
32441
|
class: "lupa-did-you-mean lupa-highlighted-search-text",
|
|
32429
32442
|
"data-cy": "did-you-mean-value",
|
|
32430
32443
|
onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
|
|
32431
|
-
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$
|
|
32444
|
+
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, toDisplayString(label) + " ", 1))
|
|
32432
32445
|
]);
|
|
32433
32446
|
}), 128))
|
|
32434
32447
|
])) : createCommentVNode("", true)
|
|
@@ -32478,7 +32491,7 @@ const _hoisted_3$v = {
|
|
|
32478
32491
|
key: 1,
|
|
32479
32492
|
class: "lupa-results-total-count"
|
|
32480
32493
|
};
|
|
32481
|
-
const _hoisted_4$
|
|
32494
|
+
const _hoisted_4$m = { class: "lupa-results-total-count-number" };
|
|
32482
32495
|
const _hoisted_5$f = ["innerHTML"];
|
|
32483
32496
|
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
32484
32497
|
__name: "SearchResultsTitle",
|
|
@@ -32528,7 +32541,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
32528
32541
|
queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$G, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
|
|
32529
32542
|
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$v, [
|
|
32530
32543
|
createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
|
|
32531
|
-
createBaseVNode("span", _hoisted_4$
|
|
32544
|
+
createBaseVNode("span", _hoisted_4$m, toDisplayString(unref(totalItems)), 1),
|
|
32532
32545
|
_cache[0] || (_cache[0] = createTextVNode(")"))
|
|
32533
32546
|
])) : createCommentVNode("", true)
|
|
32534
32547
|
])) : createCommentVNode("", true),
|
|
@@ -32610,7 +32623,7 @@ const _hoisted_3$u = {
|
|
|
32610
32623
|
key: 0,
|
|
32611
32624
|
class: "filter-values"
|
|
32612
32625
|
};
|
|
32613
|
-
const _hoisted_4$
|
|
32626
|
+
const _hoisted_4$l = { class: "lupa-current-filter-list" };
|
|
32614
32627
|
const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
32615
32628
|
__name: "CurrentFilters",
|
|
32616
32629
|
props: {
|
|
@@ -32702,7 +32715,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
32702
32715
|
}, null, 2)) : createCommentVNode("", true)
|
|
32703
32716
|
]),
|
|
32704
32717
|
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$u, [
|
|
32705
|
-
createBaseVNode("div", _hoisted_4$
|
|
32718
|
+
createBaseVNode("div", _hoisted_4$l, [
|
|
32706
32719
|
(openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter) => {
|
|
32707
32720
|
return openBlock(), createBlock(_sfc_main$$, {
|
|
32708
32721
|
key: filter.key + "_" + filter.value,
|
|
@@ -32771,7 +32784,7 @@ const _hoisted_1$R = {
|
|
|
32771
32784
|
};
|
|
32772
32785
|
const _hoisted_2$D = { class: "lupa-category-back" };
|
|
32773
32786
|
const _hoisted_3$t = ["href"];
|
|
32774
|
-
const _hoisted_4$
|
|
32787
|
+
const _hoisted_4$k = ["href"];
|
|
32775
32788
|
const _hoisted_5$e = { class: "lupa-child-category-list" };
|
|
32776
32789
|
const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
32777
32790
|
__name: "CategoryFilter",
|
|
@@ -32878,7 +32891,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
32878
32891
|
href: parentUrlLink.value,
|
|
32879
32892
|
class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
|
|
32880
32893
|
onClick: handleNavigationParent
|
|
32881
|
-
}, toDisplayString(parentTitle.value), 11, _hoisted_4$
|
|
32894
|
+
}, toDisplayString(parentTitle.value), 11, _hoisted_4$k)
|
|
32882
32895
|
], 2),
|
|
32883
32896
|
createBaseVNode("div", _hoisted_5$e, [
|
|
32884
32897
|
(openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
|
|
@@ -32899,7 +32912,7 @@ const _hoisted_1$Q = {
|
|
|
32899
32912
|
};
|
|
32900
32913
|
const _hoisted_2$C = ["placeholder"];
|
|
32901
32914
|
const _hoisted_3$s = { class: "lupa-terms-list" };
|
|
32902
|
-
const _hoisted_4$
|
|
32915
|
+
const _hoisted_4$j = ["onClick"];
|
|
32903
32916
|
const _hoisted_5$d = { class: "lupa-term-checkbox-wrapper" };
|
|
32904
32917
|
const _hoisted_6$7 = { class: "lupa-term-label" };
|
|
32905
32918
|
const _hoisted_7$4 = {
|
|
@@ -33031,7 +33044,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
33031
33044
|
createBaseVNode("span", _hoisted_6$7, toDisplayString(getItemLabel(item)), 1),
|
|
33032
33045
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_7$4, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
|
|
33033
33046
|
], 2)
|
|
33034
|
-
], 10, _hoisted_4$
|
|
33047
|
+
], 10, _hoisted_4$j);
|
|
33035
33048
|
}), 128))
|
|
33036
33049
|
]),
|
|
33037
33050
|
displayShowMore.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -33948,7 +33961,7 @@ const _hoisted_3$r = {
|
|
|
33948
33961
|
key: 1,
|
|
33949
33962
|
class: "lupa-stats-facet-summary-input"
|
|
33950
33963
|
};
|
|
33951
|
-
const _hoisted_4$
|
|
33964
|
+
const _hoisted_4$i = { class: "lupa-stats-from" };
|
|
33952
33965
|
const _hoisted_5$c = {
|
|
33953
33966
|
key: 0,
|
|
33954
33967
|
class: "lupa-stats-range-label"
|
|
@@ -34186,7 +34199,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
34186
34199
|
return (_ctx, _cache) => {
|
|
34187
34200
|
return openBlock(), createElementBlock("div", _hoisted_1$P, [
|
|
34188
34201
|
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$B, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$r, [
|
|
34189
|
-
createBaseVNode("div", _hoisted_4$
|
|
34202
|
+
createBaseVNode("div", _hoisted_4$i, [
|
|
34190
34203
|
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_5$c, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
|
|
34191
34204
|
withDirectives(createBaseVNode("input", {
|
|
34192
34205
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
|
|
@@ -34255,7 +34268,7 @@ const _hoisted_3$q = {
|
|
|
34255
34268
|
key: 0,
|
|
34256
34269
|
class: "lupa-term-count"
|
|
34257
34270
|
};
|
|
34258
|
-
const _hoisted_4$
|
|
34271
|
+
const _hoisted_4$h = {
|
|
34259
34272
|
key: 0,
|
|
34260
34273
|
class: "lupa-facet-level"
|
|
34261
34274
|
};
|
|
@@ -34325,7 +34338,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
34325
34338
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_3$q, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
|
|
34326
34339
|
], 2)
|
|
34327
34340
|
]),
|
|
34328
|
-
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
34341
|
+
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$h, [
|
|
34329
34342
|
(openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
|
|
34330
34343
|
return openBlock(), createBlock(_component_HierarchyFacetLevel, {
|
|
34331
34344
|
key: itemChild.title,
|
|
@@ -34873,7 +34886,7 @@ const _hoisted_1$I = {
|
|
|
34873
34886
|
};
|
|
34874
34887
|
const _hoisted_2$w = { class: "lupa-mobile-sidebar-content" };
|
|
34875
34888
|
const _hoisted_3$o = { class: "lupa-sidebar-top" };
|
|
34876
|
-
const _hoisted_4$
|
|
34889
|
+
const _hoisted_4$g = { class: "lupa-sidebar-title" };
|
|
34877
34890
|
const _hoisted_5$b = {
|
|
34878
34891
|
key: 0,
|
|
34879
34892
|
class: "lupa-sidebar-filter-count"
|
|
@@ -34918,7 +34931,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
34918
34931
|
}),
|
|
34919
34932
|
createBaseVNode("div", _hoisted_2$w, [
|
|
34920
34933
|
createBaseVNode("div", _hoisted_3$o, [
|
|
34921
|
-
createBaseVNode("div", _hoisted_4$
|
|
34934
|
+
createBaseVNode("div", _hoisted_4$g, [
|
|
34922
34935
|
createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
|
|
34923
34936
|
isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_5$b, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
34924
34937
|
]),
|
|
@@ -34945,7 +34958,7 @@ const _hoisted_3$n = {
|
|
|
34945
34958
|
key: 1,
|
|
34946
34959
|
class: "lupa-search-results-breadcrumb-text"
|
|
34947
34960
|
};
|
|
34948
|
-
const _hoisted_4$
|
|
34961
|
+
const _hoisted_4$f = { key: 2 };
|
|
34949
34962
|
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
34950
34963
|
__name: "SearchResultsBreadcrumbs",
|
|
34951
34964
|
props: {
|
|
@@ -34987,7 +35000,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
34987
35000
|
return handleNavigation(e2, (_a26 = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a26 : "");
|
|
34988
35001
|
}
|
|
34989
35002
|
}, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$v)) : (openBlock(), createElementBlock("span", _hoisted_3$n, toDisplayString(getLabel(breadcrumb.label)), 1)),
|
|
34990
|
-
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
35003
|
+
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, toDisplayString((_a25 = breadcrumb.separator) != null ? _a25 : "/"), 1)) : createCommentVNode("", true)
|
|
34991
35004
|
]);
|
|
34992
35005
|
}), 128))
|
|
34993
35006
|
]);
|
|
@@ -35149,8 +35162,7 @@ const _hoisted_2$u = {
|
|
|
35149
35162
|
key: 0,
|
|
35150
35163
|
class: "lupa-page-number-separator"
|
|
35151
35164
|
};
|
|
35152
|
-
const _hoisted_3$m =
|
|
35153
|
-
const _hoisted_4$f = {
|
|
35165
|
+
const _hoisted_3$m = {
|
|
35154
35166
|
key: 0,
|
|
35155
35167
|
class: "lupa-page-number-separator"
|
|
35156
35168
|
};
|
|
@@ -35217,7 +35229,24 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
35217
35229
|
timeout: (_f = (_e = searchResultOptions.value.scrollToResults) == null ? void 0 : _e.timeout) != null ? _f : 500
|
|
35218
35230
|
};
|
|
35219
35231
|
});
|
|
35220
|
-
const
|
|
35232
|
+
const tagName = computed(() => {
|
|
35233
|
+
return props.options.renderAsLinks ? "a" : "div";
|
|
35234
|
+
});
|
|
35235
|
+
const getPageUrlWithNewParams = (page) => {
|
|
35236
|
+
return paramStore.getPageUrlWithNewParams({
|
|
35237
|
+
params: [{ name: optionsStore.getQueryParamName(QUERY_PARAMS$1.PAGE), value: page.toString() }]
|
|
35238
|
+
});
|
|
35239
|
+
};
|
|
35240
|
+
const getHref = (page) => {
|
|
35241
|
+
if (props.options.renderAsLinks) {
|
|
35242
|
+
return getPageUrlWithNewParams(page);
|
|
35243
|
+
}
|
|
35244
|
+
return null;
|
|
35245
|
+
};
|
|
35246
|
+
const handlePageChange = (e2, page) => {
|
|
35247
|
+
if (e2 && props.options.renderAsLinks) {
|
|
35248
|
+
e2.preventDefault();
|
|
35249
|
+
}
|
|
35221
35250
|
if (page > 0) {
|
|
35222
35251
|
paramStore.appendParams({
|
|
35223
35252
|
params: [{ name: optionsStore.getQueryParamName(QUERY_PARAMS$1.PAGE), value: page.toString() }]
|
|
@@ -35231,46 +35260,78 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
35231
35260
|
}
|
|
35232
35261
|
};
|
|
35233
35262
|
return (_ctx, _cache) => {
|
|
35263
|
+
var _a25;
|
|
35234
35264
|
return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$D, [
|
|
35235
|
-
showBack.value ? (openBlock(),
|
|
35265
|
+
showBack.value ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35236
35266
|
key: 0,
|
|
35237
35267
|
class: normalizeClass(firstPageLabel.value === "<" ? "lupa-page-arrow" : "lupa-show-less"),
|
|
35238
|
-
|
|
35239
|
-
|
|
35268
|
+
href: getHref(_ctx.options.selectedPage - 1),
|
|
35269
|
+
onClick: _cache[0] || (_cache[0] = (e2) => handlePageChange(e2, _ctx.options.selectedPage - 1))
|
|
35270
|
+
}, {
|
|
35271
|
+
default: withCtx(() => [
|
|
35272
|
+
createTextVNode(toDisplayString(firstPageLabel.value), 1)
|
|
35273
|
+
]),
|
|
35274
|
+
_: 1
|
|
35275
|
+
}, 8, ["class", "href"])) : createCommentVNode("", true),
|
|
35240
35276
|
showFirstPage.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
35241
|
-
|
|
35277
|
+
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35278
|
+
href: getHref(1),
|
|
35242
35279
|
class: "lupa-page-number lupa-page-number-first",
|
|
35243
|
-
onClick: _cache[1] || (_cache[1] = () => handlePageChange(1))
|
|
35244
|
-
},
|
|
35280
|
+
onClick: _cache[1] || (_cache[1] = (e2) => handlePageChange(e2, 1))
|
|
35281
|
+
}, {
|
|
35282
|
+
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
35283
|
+
createTextVNode(" 1 ")
|
|
35284
|
+
])),
|
|
35285
|
+
_: 1,
|
|
35286
|
+
__: [4]
|
|
35287
|
+
}, 8, ["href"])),
|
|
35245
35288
|
showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$u, "...")) : createCommentVNode("", true)
|
|
35246
35289
|
], 64)) : createCommentVNode("", true),
|
|
35247
35290
|
(openBlock(true), createElementBlock(Fragment, null, renderList(pages.value, (page) => {
|
|
35248
|
-
return openBlock(),
|
|
35291
|
+
return openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35249
35292
|
key: page,
|
|
35250
|
-
|
|
35293
|
+
href: getHref(page),
|
|
35294
|
+
onClick: (e2) => handlePageChange(e2, page),
|
|
35251
35295
|
class: normalizeClass([
|
|
35252
35296
|
"lupa-page-number",
|
|
35253
35297
|
page === _ctx.options.selectedPage ? "lupa-page-number-selected" : ""
|
|
35254
35298
|
]),
|
|
35255
35299
|
"data-cy": "lupa-page-number"
|
|
35256
|
-
},
|
|
35300
|
+
}, {
|
|
35301
|
+
default: withCtx(() => [
|
|
35302
|
+
createTextVNode(toDisplayString(page), 1)
|
|
35303
|
+
]),
|
|
35304
|
+
_: 2
|
|
35305
|
+
}, 1032, ["href", "onClick", "class"]);
|
|
35257
35306
|
}), 128)),
|
|
35258
35307
|
showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
35259
|
-
showLastPageSeparator.value ? (openBlock(), createElementBlock("div",
|
|
35260
|
-
|
|
35308
|
+
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_3$m, "...")) : createCommentVNode("", true),
|
|
35309
|
+
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35310
|
+
href: getHref((_a25 = lastPage.value) != null ? _a25 : 1),
|
|
35261
35311
|
class: "lupa-page-number lupa-page-number-last",
|
|
35262
|
-
onClick: _cache[2] || (_cache[2] = () => {
|
|
35263
|
-
var
|
|
35264
|
-
return handlePageChange((
|
|
35312
|
+
onClick: _cache[2] || (_cache[2] = (e2) => {
|
|
35313
|
+
var _a26;
|
|
35314
|
+
return handlePageChange(e2, (_a26 = lastPage.value) != null ? _a26 : 1);
|
|
35265
35315
|
})
|
|
35266
|
-
},
|
|
35316
|
+
}, {
|
|
35317
|
+
default: withCtx(() => [
|
|
35318
|
+
createTextVNode(toDisplayString(lastPage.value), 1)
|
|
35319
|
+
]),
|
|
35320
|
+
_: 1
|
|
35321
|
+
}, 8, ["href"]))
|
|
35267
35322
|
], 64)) : createCommentVNode("", true),
|
|
35268
|
-
_ctx.options.selectedPage < _ctx.options.count ? (openBlock(),
|
|
35323
|
+
_ctx.options.selectedPage < _ctx.options.count ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35269
35324
|
key: 3,
|
|
35270
35325
|
class: normalizeClass(lastPageLabel.value === ">" ? "lupa-page-arrow" : "lupa-show-more"),
|
|
35326
|
+
href: getHref(_ctx.options.selectedPage + 1),
|
|
35271
35327
|
"data-cy": "lupa-show-more",
|
|
35272
|
-
onClick: _cache[3] || (_cache[3] = () => handlePageChange(_ctx.options.selectedPage + 1))
|
|
35273
|
-
},
|
|
35328
|
+
onClick: _cache[3] || (_cache[3] = (e2) => handlePageChange(e2, _ctx.options.selectedPage + 1))
|
|
35329
|
+
}, {
|
|
35330
|
+
default: withCtx(() => [
|
|
35331
|
+
createTextVNode(toDisplayString(lastPageLabel.value), 1)
|
|
35332
|
+
]),
|
|
35333
|
+
_: 1
|
|
35334
|
+
}, 8, ["class", "href"])) : createCommentVNode("", true)
|
|
35274
35335
|
])) : createCommentVNode("", true);
|
|
35275
35336
|
};
|
|
35276
35337
|
}
|
|
@@ -35504,6 +35565,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
35504
35565
|
}
|
|
35505
35566
|
});
|
|
35506
35567
|
const paginationOptions = computed(() => {
|
|
35568
|
+
var _a25;
|
|
35507
35569
|
const pageSelect = optionsValue.value.pagination.pageSelection;
|
|
35508
35570
|
return {
|
|
35509
35571
|
pageSize: {
|
|
@@ -35514,7 +35576,8 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
35514
35576
|
count: getPageCount(searchResult.value.total, limit.value),
|
|
35515
35577
|
selectedPage: page.value,
|
|
35516
35578
|
display: pageSelect.display,
|
|
35517
|
-
displayMobile: pageSelect.displayMobile
|
|
35579
|
+
displayMobile: pageSelect.displayMobile,
|
|
35580
|
+
renderAsLinks: (_a25 = pageSelect.renderAsLinks) != null ? _a25 : false
|
|
35518
35581
|
},
|
|
35519
35582
|
labels: optionsValue.value.labels
|
|
35520
35583
|
};
|