@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.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
|
};
|
|
@@ -31881,7 +31894,7 @@ and ensure you are accounting for this risk.
|
|
|
31881
31894
|
"data-cy": "lupa-panel-" + panel.type + "-index"
|
|
31882
31895
|
}, [
|
|
31883
31896
|
((_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$
|
|
31897
|
+
((_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
31898
|
panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
|
|
31886
31899
|
key: 2,
|
|
31887
31900
|
panel,
|
|
@@ -32379,7 +32392,7 @@ and ensure you are accounting for this risk.
|
|
|
32379
32392
|
key: 1,
|
|
32380
32393
|
"data-cy": "did-you-mean-label"
|
|
32381
32394
|
};
|
|
32382
|
-
const _hoisted_4$
|
|
32395
|
+
const _hoisted_4$n = { key: 1 };
|
|
32383
32396
|
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
32384
32397
|
__name: "SearchResultsDidYouMean",
|
|
32385
32398
|
props: {
|
|
@@ -32430,7 +32443,7 @@ and ensure you are accounting for this risk.
|
|
|
32430
32443
|
class: "lupa-did-you-mean lupa-highlighted-search-text",
|
|
32431
32444
|
"data-cy": "did-you-mean-value",
|
|
32432
32445
|
onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
|
|
32433
|
-
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$
|
|
32446
|
+
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, toDisplayString(label) + " ", 1))
|
|
32434
32447
|
]);
|
|
32435
32448
|
}), 128))
|
|
32436
32449
|
])) : createCommentVNode("", true)
|
|
@@ -32480,7 +32493,7 @@ and ensure you are accounting for this risk.
|
|
|
32480
32493
|
key: 1,
|
|
32481
32494
|
class: "lupa-results-total-count"
|
|
32482
32495
|
};
|
|
32483
|
-
const _hoisted_4$
|
|
32496
|
+
const _hoisted_4$m = { class: "lupa-results-total-count-number" };
|
|
32484
32497
|
const _hoisted_5$f = ["innerHTML"];
|
|
32485
32498
|
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
32486
32499
|
__name: "SearchResultsTitle",
|
|
@@ -32530,7 +32543,7 @@ and ensure you are accounting for this risk.
|
|
|
32530
32543
|
queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$G, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
|
|
32531
32544
|
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$v, [
|
|
32532
32545
|
createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
|
|
32533
|
-
createBaseVNode("span", _hoisted_4$
|
|
32546
|
+
createBaseVNode("span", _hoisted_4$m, toDisplayString(unref(totalItems)), 1),
|
|
32534
32547
|
_cache[0] || (_cache[0] = createTextVNode(")"))
|
|
32535
32548
|
])) : createCommentVNode("", true)
|
|
32536
32549
|
])) : createCommentVNode("", true),
|
|
@@ -32612,7 +32625,7 @@ and ensure you are accounting for this risk.
|
|
|
32612
32625
|
key: 0,
|
|
32613
32626
|
class: "filter-values"
|
|
32614
32627
|
};
|
|
32615
|
-
const _hoisted_4$
|
|
32628
|
+
const _hoisted_4$l = { class: "lupa-current-filter-list" };
|
|
32616
32629
|
const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
32617
32630
|
__name: "CurrentFilters",
|
|
32618
32631
|
props: {
|
|
@@ -32704,7 +32717,7 @@ and ensure you are accounting for this risk.
|
|
|
32704
32717
|
}, null, 2)) : createCommentVNode("", true)
|
|
32705
32718
|
]),
|
|
32706
32719
|
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$u, [
|
|
32707
|
-
createBaseVNode("div", _hoisted_4$
|
|
32720
|
+
createBaseVNode("div", _hoisted_4$l, [
|
|
32708
32721
|
(openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter) => {
|
|
32709
32722
|
return openBlock(), createBlock(_sfc_main$$, {
|
|
32710
32723
|
key: filter.key + "_" + filter.value,
|
|
@@ -32773,7 +32786,7 @@ and ensure you are accounting for this risk.
|
|
|
32773
32786
|
};
|
|
32774
32787
|
const _hoisted_2$D = { class: "lupa-category-back" };
|
|
32775
32788
|
const _hoisted_3$t = ["href"];
|
|
32776
|
-
const _hoisted_4$
|
|
32789
|
+
const _hoisted_4$k = ["href"];
|
|
32777
32790
|
const _hoisted_5$e = { class: "lupa-child-category-list" };
|
|
32778
32791
|
const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
32779
32792
|
__name: "CategoryFilter",
|
|
@@ -32880,7 +32893,7 @@ and ensure you are accounting for this risk.
|
|
|
32880
32893
|
href: parentUrlLink.value,
|
|
32881
32894
|
class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
|
|
32882
32895
|
onClick: handleNavigationParent
|
|
32883
|
-
}, toDisplayString(parentTitle.value), 11, _hoisted_4$
|
|
32896
|
+
}, toDisplayString(parentTitle.value), 11, _hoisted_4$k)
|
|
32884
32897
|
], 2),
|
|
32885
32898
|
createBaseVNode("div", _hoisted_5$e, [
|
|
32886
32899
|
(openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
|
|
@@ -32901,7 +32914,7 @@ and ensure you are accounting for this risk.
|
|
|
32901
32914
|
};
|
|
32902
32915
|
const _hoisted_2$C = ["placeholder"];
|
|
32903
32916
|
const _hoisted_3$s = { class: "lupa-terms-list" };
|
|
32904
|
-
const _hoisted_4$
|
|
32917
|
+
const _hoisted_4$j = ["onClick"];
|
|
32905
32918
|
const _hoisted_5$d = { class: "lupa-term-checkbox-wrapper" };
|
|
32906
32919
|
const _hoisted_6$7 = { class: "lupa-term-label" };
|
|
32907
32920
|
const _hoisted_7$4 = {
|
|
@@ -33033,7 +33046,7 @@ and ensure you are accounting for this risk.
|
|
|
33033
33046
|
createBaseVNode("span", _hoisted_6$7, toDisplayString(getItemLabel(item)), 1),
|
|
33034
33047
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_7$4, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
|
|
33035
33048
|
], 2)
|
|
33036
|
-
], 10, _hoisted_4$
|
|
33049
|
+
], 10, _hoisted_4$j);
|
|
33037
33050
|
}), 128))
|
|
33038
33051
|
]),
|
|
33039
33052
|
displayShowMore.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -33950,7 +33963,7 @@ and ensure you are accounting for this risk.
|
|
|
33950
33963
|
key: 1,
|
|
33951
33964
|
class: "lupa-stats-facet-summary-input"
|
|
33952
33965
|
};
|
|
33953
|
-
const _hoisted_4$
|
|
33966
|
+
const _hoisted_4$i = { class: "lupa-stats-from" };
|
|
33954
33967
|
const _hoisted_5$c = {
|
|
33955
33968
|
key: 0,
|
|
33956
33969
|
class: "lupa-stats-range-label"
|
|
@@ -34188,7 +34201,7 @@ and ensure you are accounting for this risk.
|
|
|
34188
34201
|
return (_ctx, _cache) => {
|
|
34189
34202
|
return openBlock(), createElementBlock("div", _hoisted_1$P, [
|
|
34190
34203
|
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$B, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$r, [
|
|
34191
|
-
createBaseVNode("div", _hoisted_4$
|
|
34204
|
+
createBaseVNode("div", _hoisted_4$i, [
|
|
34192
34205
|
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_5$c, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
|
|
34193
34206
|
withDirectives(createBaseVNode("input", {
|
|
34194
34207
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
|
|
@@ -34257,7 +34270,7 @@ and ensure you are accounting for this risk.
|
|
|
34257
34270
|
key: 0,
|
|
34258
34271
|
class: "lupa-term-count"
|
|
34259
34272
|
};
|
|
34260
|
-
const _hoisted_4$
|
|
34273
|
+
const _hoisted_4$h = {
|
|
34261
34274
|
key: 0,
|
|
34262
34275
|
class: "lupa-facet-level"
|
|
34263
34276
|
};
|
|
@@ -34327,7 +34340,7 @@ and ensure you are accounting for this risk.
|
|
|
34327
34340
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_3$q, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
|
|
34328
34341
|
], 2)
|
|
34329
34342
|
]),
|
|
34330
|
-
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
34343
|
+
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$h, [
|
|
34331
34344
|
(openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
|
|
34332
34345
|
return openBlock(), createBlock(_component_HierarchyFacetLevel, {
|
|
34333
34346
|
key: itemChild.title,
|
|
@@ -34875,7 +34888,7 @@ and ensure you are accounting for this risk.
|
|
|
34875
34888
|
};
|
|
34876
34889
|
const _hoisted_2$w = { class: "lupa-mobile-sidebar-content" };
|
|
34877
34890
|
const _hoisted_3$o = { class: "lupa-sidebar-top" };
|
|
34878
|
-
const _hoisted_4$
|
|
34891
|
+
const _hoisted_4$g = { class: "lupa-sidebar-title" };
|
|
34879
34892
|
const _hoisted_5$b = {
|
|
34880
34893
|
key: 0,
|
|
34881
34894
|
class: "lupa-sidebar-filter-count"
|
|
@@ -34920,7 +34933,7 @@ and ensure you are accounting for this risk.
|
|
|
34920
34933
|
}),
|
|
34921
34934
|
createBaseVNode("div", _hoisted_2$w, [
|
|
34922
34935
|
createBaseVNode("div", _hoisted_3$o, [
|
|
34923
|
-
createBaseVNode("div", _hoisted_4$
|
|
34936
|
+
createBaseVNode("div", _hoisted_4$g, [
|
|
34924
34937
|
createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
|
|
34925
34938
|
isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_5$b, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
34926
34939
|
]),
|
|
@@ -34947,7 +34960,7 @@ and ensure you are accounting for this risk.
|
|
|
34947
34960
|
key: 1,
|
|
34948
34961
|
class: "lupa-search-results-breadcrumb-text"
|
|
34949
34962
|
};
|
|
34950
|
-
const _hoisted_4$
|
|
34963
|
+
const _hoisted_4$f = { key: 2 };
|
|
34951
34964
|
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
34952
34965
|
__name: "SearchResultsBreadcrumbs",
|
|
34953
34966
|
props: {
|
|
@@ -34989,7 +35002,7 @@ and ensure you are accounting for this risk.
|
|
|
34989
35002
|
return handleNavigation(e2, (_a26 = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a26 : "");
|
|
34990
35003
|
}
|
|
34991
35004
|
}, 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$
|
|
35005
|
+
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, toDisplayString((_a25 = breadcrumb.separator) != null ? _a25 : "/"), 1)) : createCommentVNode("", true)
|
|
34993
35006
|
]);
|
|
34994
35007
|
}), 128))
|
|
34995
35008
|
]);
|
|
@@ -35151,8 +35164,7 @@ and ensure you are accounting for this risk.
|
|
|
35151
35164
|
key: 0,
|
|
35152
35165
|
class: "lupa-page-number-separator"
|
|
35153
35166
|
};
|
|
35154
|
-
const _hoisted_3$m =
|
|
35155
|
-
const _hoisted_4$f = {
|
|
35167
|
+
const _hoisted_3$m = {
|
|
35156
35168
|
key: 0,
|
|
35157
35169
|
class: "lupa-page-number-separator"
|
|
35158
35170
|
};
|
|
@@ -35219,7 +35231,24 @@ and ensure you are accounting for this risk.
|
|
|
35219
35231
|
timeout: (_f = (_e = searchResultOptions.value.scrollToResults) == null ? void 0 : _e.timeout) != null ? _f : 500
|
|
35220
35232
|
};
|
|
35221
35233
|
});
|
|
35222
|
-
const
|
|
35234
|
+
const tagName = computed(() => {
|
|
35235
|
+
return props.options.renderAsLinks ? "a" : "div";
|
|
35236
|
+
});
|
|
35237
|
+
const getPageUrlWithNewParams = (page) => {
|
|
35238
|
+
return paramStore.getPageUrlWithNewParams({
|
|
35239
|
+
params: [{ name: optionsStore.getQueryParamName(QUERY_PARAMS$1.PAGE), value: page.toString() }]
|
|
35240
|
+
});
|
|
35241
|
+
};
|
|
35242
|
+
const getHref = (page) => {
|
|
35243
|
+
if (props.options.renderAsLinks) {
|
|
35244
|
+
return getPageUrlWithNewParams(page);
|
|
35245
|
+
}
|
|
35246
|
+
return null;
|
|
35247
|
+
};
|
|
35248
|
+
const handlePageChange = (e2, page) => {
|
|
35249
|
+
if (e2 && props.options.renderAsLinks) {
|
|
35250
|
+
e2.preventDefault();
|
|
35251
|
+
}
|
|
35223
35252
|
if (page > 0) {
|
|
35224
35253
|
paramStore.appendParams({
|
|
35225
35254
|
params: [{ name: optionsStore.getQueryParamName(QUERY_PARAMS$1.PAGE), value: page.toString() }]
|
|
@@ -35233,46 +35262,78 @@ and ensure you are accounting for this risk.
|
|
|
35233
35262
|
}
|
|
35234
35263
|
};
|
|
35235
35264
|
return (_ctx, _cache) => {
|
|
35265
|
+
var _a25;
|
|
35236
35266
|
return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$D, [
|
|
35237
|
-
showBack.value ? (openBlock(),
|
|
35267
|
+
showBack.value ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35238
35268
|
key: 0,
|
|
35239
35269
|
class: normalizeClass(firstPageLabel.value === "<" ? "lupa-page-arrow" : "lupa-show-less"),
|
|
35240
|
-
|
|
35241
|
-
|
|
35270
|
+
href: getHref(_ctx.options.selectedPage - 1),
|
|
35271
|
+
onClick: _cache[0] || (_cache[0] = (e2) => handlePageChange(e2, _ctx.options.selectedPage - 1))
|
|
35272
|
+
}, {
|
|
35273
|
+
default: withCtx(() => [
|
|
35274
|
+
createTextVNode(toDisplayString(firstPageLabel.value), 1)
|
|
35275
|
+
]),
|
|
35276
|
+
_: 1
|
|
35277
|
+
}, 8, ["class", "href"])) : createCommentVNode("", true),
|
|
35242
35278
|
showFirstPage.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
35243
|
-
|
|
35279
|
+
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35280
|
+
href: getHref(1),
|
|
35244
35281
|
class: "lupa-page-number lupa-page-number-first",
|
|
35245
|
-
onClick: _cache[1] || (_cache[1] = () => handlePageChange(1))
|
|
35246
|
-
},
|
|
35282
|
+
onClick: _cache[1] || (_cache[1] = (e2) => handlePageChange(e2, 1))
|
|
35283
|
+
}, {
|
|
35284
|
+
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
35285
|
+
createTextVNode(" 1 ")
|
|
35286
|
+
])),
|
|
35287
|
+
_: 1,
|
|
35288
|
+
__: [4]
|
|
35289
|
+
}, 8, ["href"])),
|
|
35247
35290
|
showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$u, "...")) : createCommentVNode("", true)
|
|
35248
35291
|
], 64)) : createCommentVNode("", true),
|
|
35249
35292
|
(openBlock(true), createElementBlock(Fragment, null, renderList(pages.value, (page) => {
|
|
35250
|
-
return openBlock(),
|
|
35293
|
+
return openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35251
35294
|
key: page,
|
|
35252
|
-
|
|
35295
|
+
href: getHref(page),
|
|
35296
|
+
onClick: (e2) => handlePageChange(e2, page),
|
|
35253
35297
|
class: normalizeClass([
|
|
35254
35298
|
"lupa-page-number",
|
|
35255
35299
|
page === _ctx.options.selectedPage ? "lupa-page-number-selected" : ""
|
|
35256
35300
|
]),
|
|
35257
35301
|
"data-cy": "lupa-page-number"
|
|
35258
|
-
},
|
|
35302
|
+
}, {
|
|
35303
|
+
default: withCtx(() => [
|
|
35304
|
+
createTextVNode(toDisplayString(page), 1)
|
|
35305
|
+
]),
|
|
35306
|
+
_: 2
|
|
35307
|
+
}, 1032, ["href", "onClick", "class"]);
|
|
35259
35308
|
}), 128)),
|
|
35260
35309
|
showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
35261
|
-
showLastPageSeparator.value ? (openBlock(), createElementBlock("div",
|
|
35262
|
-
|
|
35310
|
+
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_3$m, "...")) : createCommentVNode("", true),
|
|
35311
|
+
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35312
|
+
href: getHref((_a25 = lastPage.value) != null ? _a25 : 1),
|
|
35263
35313
|
class: "lupa-page-number lupa-page-number-last",
|
|
35264
|
-
onClick: _cache[2] || (_cache[2] = () => {
|
|
35265
|
-
var
|
|
35266
|
-
return handlePageChange((
|
|
35314
|
+
onClick: _cache[2] || (_cache[2] = (e2) => {
|
|
35315
|
+
var _a26;
|
|
35316
|
+
return handlePageChange(e2, (_a26 = lastPage.value) != null ? _a26 : 1);
|
|
35267
35317
|
})
|
|
35268
|
-
},
|
|
35318
|
+
}, {
|
|
35319
|
+
default: withCtx(() => [
|
|
35320
|
+
createTextVNode(toDisplayString(lastPage.value), 1)
|
|
35321
|
+
]),
|
|
35322
|
+
_: 1
|
|
35323
|
+
}, 8, ["href"]))
|
|
35269
35324
|
], 64)) : createCommentVNode("", true),
|
|
35270
|
-
_ctx.options.selectedPage < _ctx.options.count ? (openBlock(),
|
|
35325
|
+
_ctx.options.selectedPage < _ctx.options.count ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35271
35326
|
key: 3,
|
|
35272
35327
|
class: normalizeClass(lastPageLabel.value === ">" ? "lupa-page-arrow" : "lupa-show-more"),
|
|
35328
|
+
href: getHref(_ctx.options.selectedPage + 1),
|
|
35273
35329
|
"data-cy": "lupa-show-more",
|
|
35274
|
-
onClick: _cache[3] || (_cache[3] = () => handlePageChange(_ctx.options.selectedPage + 1))
|
|
35275
|
-
},
|
|
35330
|
+
onClick: _cache[3] || (_cache[3] = (e2) => handlePageChange(e2, _ctx.options.selectedPage + 1))
|
|
35331
|
+
}, {
|
|
35332
|
+
default: withCtx(() => [
|
|
35333
|
+
createTextVNode(toDisplayString(lastPageLabel.value), 1)
|
|
35334
|
+
]),
|
|
35335
|
+
_: 1
|
|
35336
|
+
}, 8, ["class", "href"])) : createCommentVNode("", true)
|
|
35276
35337
|
])) : createCommentVNode("", true);
|
|
35277
35338
|
};
|
|
35278
35339
|
}
|
|
@@ -35506,6 +35567,7 @@ and ensure you are accounting for this risk.
|
|
|
35506
35567
|
}
|
|
35507
35568
|
});
|
|
35508
35569
|
const paginationOptions = computed(() => {
|
|
35570
|
+
var _a25;
|
|
35509
35571
|
const pageSelect = optionsValue.value.pagination.pageSelection;
|
|
35510
35572
|
return {
|
|
35511
35573
|
pageSize: {
|
|
@@ -35516,7 +35578,8 @@ and ensure you are accounting for this risk.
|
|
|
35516
35578
|
count: getPageCount(searchResult.value.total, limit.value),
|
|
35517
35579
|
selectedPage: page.value,
|
|
35518
35580
|
display: pageSelect.display,
|
|
35519
|
-
displayMobile: pageSelect.displayMobile
|
|
35581
|
+
displayMobile: pageSelect.displayMobile,
|
|
35582
|
+
renderAsLinks: (_a25 = pageSelect.renderAsLinks) != null ? _a25 : false
|
|
35520
35583
|
},
|
|
35521
35584
|
labels: optionsValue.value.labels
|
|
35522
35585
|
};
|