@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.umd.js
CHANGED
|
@@ -19175,6 +19175,18 @@ var __async = (__this, __arguments, generator) => {
|
|
|
19175
19175
|
params.value = parseParams(optionsStore.getQueryParamName, url.searchParams);
|
|
19176
19176
|
searchString.value = url.search;
|
|
19177
19177
|
};
|
|
19178
|
+
const getPageUrlWithNewParams = ({
|
|
19179
|
+
params: newParams,
|
|
19180
|
+
paramsToRemove,
|
|
19181
|
+
encode: encode2 = true,
|
|
19182
|
+
searchResultsLink: searchResultsLink2
|
|
19183
|
+
}) => {
|
|
19184
|
+
const url = getPageUrl(searchResultsLink2);
|
|
19185
|
+
paramsToRemove = getRemovableParams(url, optionsStore.getQueryParamName, paramsToRemove);
|
|
19186
|
+
removeParams(url, paramsToRemove);
|
|
19187
|
+
newParams.forEach((p2) => appendParam(url, p2, encode2));
|
|
19188
|
+
return url.search;
|
|
19189
|
+
};
|
|
19178
19190
|
const removeParameters = ({
|
|
19179
19191
|
paramsToRemove,
|
|
19180
19192
|
save = true
|
|
@@ -19312,6 +19324,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
19312
19324
|
sortParams,
|
|
19313
19325
|
lastChangedParams,
|
|
19314
19326
|
skipFacetReload,
|
|
19327
|
+
getPageUrlWithNewParams,
|
|
19315
19328
|
add,
|
|
19316
19329
|
removeAllFilters,
|
|
19317
19330
|
removeParameters,
|
|
@@ -19786,7 +19799,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
19786
19799
|
};
|
|
19787
19800
|
const _hoisted_2$W = { class: "lupa-dialog-content" };
|
|
19788
19801
|
const _hoisted_3$E = { class: "lupa-listening-text" };
|
|
19789
|
-
const _hoisted_4$
|
|
19802
|
+
const _hoisted_4$u = { class: "lupa-mic-button-wrapper" };
|
|
19790
19803
|
const _hoisted_5$l = ["aria-label"];
|
|
19791
19804
|
const _sfc_main$1z = /* @__PURE__ */ defineComponent({
|
|
19792
19805
|
__name: "VoiceSearchDialog",
|
|
@@ -19900,7 +19913,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
19900
19913
|
}),
|
|
19901
19914
|
createBaseVNode("div", _hoisted_2$W, [
|
|
19902
19915
|
createBaseVNode("p", _hoisted_3$E, toDisplayString(description.value), 1),
|
|
19903
|
-
createBaseVNode("div", _hoisted_4$
|
|
19916
|
+
createBaseVNode("div", _hoisted_4$u, [
|
|
19904
19917
|
createBaseVNode("button", {
|
|
19905
19918
|
class: normalizeClass(["lupa-mic-button", { recording: unref(isRecording) }]),
|
|
19906
19919
|
onClick: handleRecordingButtonClick,
|
|
@@ -19925,7 +19938,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
19925
19938
|
const _hoisted_1$1k = { id: "lupa-search-box-input-container" };
|
|
19926
19939
|
const _hoisted_2$V = { class: "lupa-input-clear" };
|
|
19927
19940
|
const _hoisted_3$D = { id: "lupa-search-box-input" };
|
|
19928
|
-
const _hoisted_4$
|
|
19941
|
+
const _hoisted_4$t = ["value"];
|
|
19929
19942
|
const _hoisted_5$k = ["aria-label", "placeholder"];
|
|
19930
19943
|
const _hoisted_6$8 = {
|
|
19931
19944
|
key: 0,
|
|
@@ -20078,7 +20091,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20078
20091
|
"aria-hidden": "true",
|
|
20079
20092
|
value: showHint.value ? suggestedValue.value.item.suggestion : "",
|
|
20080
20093
|
disabled: ""
|
|
20081
|
-
}, null, 8, _hoisted_4$
|
|
20094
|
+
}, null, 8, _hoisted_4$t),
|
|
20082
20095
|
withDirectives(createBaseVNode("input", mergeProps({
|
|
20083
20096
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
|
|
20084
20097
|
}, inputAttributes.value, {
|
|
@@ -20328,7 +20341,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20328
20341
|
class: "lupa-suggestion-facet",
|
|
20329
20342
|
"data-cy": "lupa-suggestion-facet"
|
|
20330
20343
|
};
|
|
20331
|
-
const _hoisted_4$
|
|
20344
|
+
const _hoisted_4$s = {
|
|
20332
20345
|
class: "lupa-suggestion-facet-label",
|
|
20333
20346
|
"data-cy": "lupa-suggestion-facet-label"
|
|
20334
20347
|
};
|
|
@@ -20375,7 +20388,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20375
20388
|
innerHTML: _ctx.suggestion.displayHighlight
|
|
20376
20389
|
}, null, 8, _hoisted_1$1g)) : (openBlock(), createElementBlock("div", _hoisted_2$T, toDisplayString(_ctx.suggestion.display), 1)),
|
|
20377
20390
|
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$C, [
|
|
20378
|
-
createBaseVNode("span", _hoisted_4$
|
|
20391
|
+
createBaseVNode("span", _hoisted_4$s, toDisplayString(facetLabel.value), 1),
|
|
20379
20392
|
createBaseVNode("span", _hoisted_5$j, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
20380
20393
|
])) : createCommentVNode("", true)
|
|
20381
20394
|
]);
|
|
@@ -30115,7 +30128,7 @@ and ensure you are accounting for this risk.
|
|
|
30115
30128
|
const _hoisted_1$1a = ["innerHTML"];
|
|
30116
30129
|
const _hoisted_2$P = { key: 0 };
|
|
30117
30130
|
const _hoisted_3$B = { key: 1 };
|
|
30118
|
-
const _hoisted_4$
|
|
30131
|
+
const _hoisted_4$r = { class: "lupa-search-box-custom-label" };
|
|
30119
30132
|
const _hoisted_5$i = { class: "lupa-search-box-custom-text" };
|
|
30120
30133
|
const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
30121
30134
|
__name: "SearchBoxProductCustom",
|
|
@@ -30148,7 +30161,7 @@ and ensure you are accounting for this risk.
|
|
|
30148
30161
|
class: [className.value, "lupa-search-box-product-custom"]
|
|
30149
30162
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {})), [
|
|
30150
30163
|
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$P, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$B, [
|
|
30151
|
-
createBaseVNode("div", _hoisted_4$
|
|
30164
|
+
createBaseVNode("div", _hoisted_4$r, toDisplayString(label.value), 1),
|
|
30152
30165
|
createBaseVNode("div", _hoisted_5$i, toDisplayString(text.value), 1)
|
|
30153
30166
|
]))
|
|
30154
30167
|
], 16));
|
|
@@ -30499,7 +30512,7 @@ and ensure you are accounting for this risk.
|
|
|
30499
30512
|
const _hoisted_1$18 = { class: "lupa-search-box-add-to-cart-wrapper" };
|
|
30500
30513
|
const _hoisted_2$O = { class: "lupa-search-box-product-addtocart" };
|
|
30501
30514
|
const _hoisted_3$A = ["disabled"];
|
|
30502
|
-
const _hoisted_4$
|
|
30515
|
+
const _hoisted_4$q = ["href"];
|
|
30503
30516
|
const _hoisted_5$h = ["disabled"];
|
|
30504
30517
|
const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
30505
30518
|
__name: "SearchBoxProductAddToCart",
|
|
@@ -30555,7 +30568,7 @@ and ensure you are accounting for this risk.
|
|
|
30555
30568
|
"data-cy": "lupa-add-to-cart",
|
|
30556
30569
|
disabled: !inStockValue.value || loading.value
|
|
30557
30570
|
}, _ctx.dynamicAttributes, { onClick: handleClick }), [
|
|
30558
|
-
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$
|
|
30571
|
+
createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$q)
|
|
30559
30572
|
], 16, _hoisted_3$A)) : (openBlock(), createElementBlock("button", mergeProps({
|
|
30560
30573
|
key: 1,
|
|
30561
30574
|
onClick: withModifiers(handleClick, ["stop", "prevent"]),
|
|
@@ -30675,7 +30688,7 @@ and ensure you are accounting for this risk.
|
|
|
30675
30688
|
const _hoisted_1$16 = { class: "lupa-badge-title" };
|
|
30676
30689
|
const _hoisted_2$N = ["src"];
|
|
30677
30690
|
const _hoisted_3$z = { key: 1 };
|
|
30678
|
-
const _hoisted_4$
|
|
30691
|
+
const _hoisted_4$p = {
|
|
30679
30692
|
key: 0,
|
|
30680
30693
|
class: "lupa-badge-full-text"
|
|
30681
30694
|
};
|
|
@@ -30719,7 +30732,7 @@ and ensure you are accounting for this risk.
|
|
|
30719
30732
|
}, null, 8, _hoisted_2$N)) : createCommentVNode("", true),
|
|
30720
30733
|
hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$z, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
|
|
30721
30734
|
]),
|
|
30722
|
-
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
30735
|
+
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
|
|
30723
30736
|
], 6);
|
|
30724
30737
|
};
|
|
30725
30738
|
}
|
|
@@ -31687,7 +31700,7 @@ and ensure you are accounting for this risk.
|
|
|
31687
31700
|
key: 0,
|
|
31688
31701
|
class: "lupa-panel-title lupa-panel-title-top-results"
|
|
31689
31702
|
};
|
|
31690
|
-
const _hoisted_4$
|
|
31703
|
+
const _hoisted_4$o = {
|
|
31691
31704
|
key: 1,
|
|
31692
31705
|
class: "lupa-panel-title"
|
|
31693
31706
|
};
|
|
@@ -31883,7 +31896,7 @@ and ensure you are accounting for this risk.
|
|
|
31883
31896
|
"data-cy": "lupa-panel-" + panel.type + "-index"
|
|
31884
31897
|
}, [
|
|
31885
31898
|
((_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),
|
|
31886
|
-
((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
31899
|
+
((_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),
|
|
31887
31900
|
panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
|
|
31888
31901
|
key: 2,
|
|
31889
31902
|
panel,
|
|
@@ -32381,7 +32394,7 @@ and ensure you are accounting for this risk.
|
|
|
32381
32394
|
key: 1,
|
|
32382
32395
|
"data-cy": "did-you-mean-label"
|
|
32383
32396
|
};
|
|
32384
|
-
const _hoisted_4$
|
|
32397
|
+
const _hoisted_4$n = { key: 1 };
|
|
32385
32398
|
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
32386
32399
|
__name: "SearchResultsDidYouMean",
|
|
32387
32400
|
props: {
|
|
@@ -32432,7 +32445,7 @@ and ensure you are accounting for this risk.
|
|
|
32432
32445
|
class: "lupa-did-you-mean lupa-highlighted-search-text",
|
|
32433
32446
|
"data-cy": "did-you-mean-value",
|
|
32434
32447
|
onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
|
|
32435
|
-
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$
|
|
32448
|
+
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, toDisplayString(label) + " ", 1))
|
|
32436
32449
|
]);
|
|
32437
32450
|
}), 128))
|
|
32438
32451
|
])) : createCommentVNode("", true)
|
|
@@ -32482,7 +32495,7 @@ and ensure you are accounting for this risk.
|
|
|
32482
32495
|
key: 1,
|
|
32483
32496
|
class: "lupa-results-total-count"
|
|
32484
32497
|
};
|
|
32485
|
-
const _hoisted_4$
|
|
32498
|
+
const _hoisted_4$m = { class: "lupa-results-total-count-number" };
|
|
32486
32499
|
const _hoisted_5$f = ["innerHTML"];
|
|
32487
32500
|
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
32488
32501
|
__name: "SearchResultsTitle",
|
|
@@ -32532,7 +32545,7 @@ and ensure you are accounting for this risk.
|
|
|
32532
32545
|
queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$G, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
|
|
32533
32546
|
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$v, [
|
|
32534
32547
|
createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
|
|
32535
|
-
createBaseVNode("span", _hoisted_4$
|
|
32548
|
+
createBaseVNode("span", _hoisted_4$m, toDisplayString(unref(totalItems)), 1),
|
|
32536
32549
|
_cache[0] || (_cache[0] = createTextVNode(")"))
|
|
32537
32550
|
])) : createCommentVNode("", true)
|
|
32538
32551
|
])) : createCommentVNode("", true),
|
|
@@ -32614,7 +32627,7 @@ and ensure you are accounting for this risk.
|
|
|
32614
32627
|
key: 0,
|
|
32615
32628
|
class: "filter-values"
|
|
32616
32629
|
};
|
|
32617
|
-
const _hoisted_4$
|
|
32630
|
+
const _hoisted_4$l = { class: "lupa-current-filter-list" };
|
|
32618
32631
|
const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
32619
32632
|
__name: "CurrentFilters",
|
|
32620
32633
|
props: {
|
|
@@ -32706,7 +32719,7 @@ and ensure you are accounting for this risk.
|
|
|
32706
32719
|
}, null, 2)) : createCommentVNode("", true)
|
|
32707
32720
|
]),
|
|
32708
32721
|
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$u, [
|
|
32709
|
-
createBaseVNode("div", _hoisted_4$
|
|
32722
|
+
createBaseVNode("div", _hoisted_4$l, [
|
|
32710
32723
|
(openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter) => {
|
|
32711
32724
|
return openBlock(), createBlock(_sfc_main$$, {
|
|
32712
32725
|
key: filter.key + "_" + filter.value,
|
|
@@ -32775,7 +32788,7 @@ and ensure you are accounting for this risk.
|
|
|
32775
32788
|
};
|
|
32776
32789
|
const _hoisted_2$D = { class: "lupa-category-back" };
|
|
32777
32790
|
const _hoisted_3$t = ["href"];
|
|
32778
|
-
const _hoisted_4$
|
|
32791
|
+
const _hoisted_4$k = ["href"];
|
|
32779
32792
|
const _hoisted_5$e = { class: "lupa-child-category-list" };
|
|
32780
32793
|
const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
32781
32794
|
__name: "CategoryFilter",
|
|
@@ -32882,7 +32895,7 @@ and ensure you are accounting for this risk.
|
|
|
32882
32895
|
href: parentUrlLink.value,
|
|
32883
32896
|
class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
|
|
32884
32897
|
onClick: handleNavigationParent
|
|
32885
|
-
}, toDisplayString(parentTitle.value), 11, _hoisted_4$
|
|
32898
|
+
}, toDisplayString(parentTitle.value), 11, _hoisted_4$k)
|
|
32886
32899
|
], 2),
|
|
32887
32900
|
createBaseVNode("div", _hoisted_5$e, [
|
|
32888
32901
|
(openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
|
|
@@ -32903,7 +32916,7 @@ and ensure you are accounting for this risk.
|
|
|
32903
32916
|
};
|
|
32904
32917
|
const _hoisted_2$C = ["placeholder"];
|
|
32905
32918
|
const _hoisted_3$s = { class: "lupa-terms-list" };
|
|
32906
|
-
const _hoisted_4$
|
|
32919
|
+
const _hoisted_4$j = ["onClick"];
|
|
32907
32920
|
const _hoisted_5$d = { class: "lupa-term-checkbox-wrapper" };
|
|
32908
32921
|
const _hoisted_6$7 = { class: "lupa-term-label" };
|
|
32909
32922
|
const _hoisted_7$4 = {
|
|
@@ -33035,7 +33048,7 @@ and ensure you are accounting for this risk.
|
|
|
33035
33048
|
createBaseVNode("span", _hoisted_6$7, toDisplayString(getItemLabel(item)), 1),
|
|
33036
33049
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_7$4, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
|
|
33037
33050
|
], 2)
|
|
33038
|
-
], 10, _hoisted_4$
|
|
33051
|
+
], 10, _hoisted_4$j);
|
|
33039
33052
|
}), 128))
|
|
33040
33053
|
]),
|
|
33041
33054
|
displayShowMore.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -33952,7 +33965,7 @@ and ensure you are accounting for this risk.
|
|
|
33952
33965
|
key: 1,
|
|
33953
33966
|
class: "lupa-stats-facet-summary-input"
|
|
33954
33967
|
};
|
|
33955
|
-
const _hoisted_4$
|
|
33968
|
+
const _hoisted_4$i = { class: "lupa-stats-from" };
|
|
33956
33969
|
const _hoisted_5$c = {
|
|
33957
33970
|
key: 0,
|
|
33958
33971
|
class: "lupa-stats-range-label"
|
|
@@ -34190,7 +34203,7 @@ and ensure you are accounting for this risk.
|
|
|
34190
34203
|
return (_ctx, _cache) => {
|
|
34191
34204
|
return openBlock(), createElementBlock("div", _hoisted_1$P, [
|
|
34192
34205
|
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$B, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$r, [
|
|
34193
|
-
createBaseVNode("div", _hoisted_4$
|
|
34206
|
+
createBaseVNode("div", _hoisted_4$i, [
|
|
34194
34207
|
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_5$c, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
|
|
34195
34208
|
withDirectives(createBaseVNode("input", {
|
|
34196
34209
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
|
|
@@ -34259,7 +34272,7 @@ and ensure you are accounting for this risk.
|
|
|
34259
34272
|
key: 0,
|
|
34260
34273
|
class: "lupa-term-count"
|
|
34261
34274
|
};
|
|
34262
|
-
const _hoisted_4$
|
|
34275
|
+
const _hoisted_4$h = {
|
|
34263
34276
|
key: 0,
|
|
34264
34277
|
class: "lupa-facet-level"
|
|
34265
34278
|
};
|
|
@@ -34329,7 +34342,7 @@ and ensure you are accounting for this risk.
|
|
|
34329
34342
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_3$q, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
|
|
34330
34343
|
], 2)
|
|
34331
34344
|
]),
|
|
34332
|
-
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
34345
|
+
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$h, [
|
|
34333
34346
|
(openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
|
|
34334
34347
|
return openBlock(), createBlock(_component_HierarchyFacetLevel, {
|
|
34335
34348
|
key: itemChild.title,
|
|
@@ -34877,7 +34890,7 @@ and ensure you are accounting for this risk.
|
|
|
34877
34890
|
};
|
|
34878
34891
|
const _hoisted_2$w = { class: "lupa-mobile-sidebar-content" };
|
|
34879
34892
|
const _hoisted_3$o = { class: "lupa-sidebar-top" };
|
|
34880
|
-
const _hoisted_4$
|
|
34893
|
+
const _hoisted_4$g = { class: "lupa-sidebar-title" };
|
|
34881
34894
|
const _hoisted_5$b = {
|
|
34882
34895
|
key: 0,
|
|
34883
34896
|
class: "lupa-sidebar-filter-count"
|
|
@@ -34922,7 +34935,7 @@ and ensure you are accounting for this risk.
|
|
|
34922
34935
|
}),
|
|
34923
34936
|
createBaseVNode("div", _hoisted_2$w, [
|
|
34924
34937
|
createBaseVNode("div", _hoisted_3$o, [
|
|
34925
|
-
createBaseVNode("div", _hoisted_4$
|
|
34938
|
+
createBaseVNode("div", _hoisted_4$g, [
|
|
34926
34939
|
createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
|
|
34927
34940
|
isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_5$b, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
34928
34941
|
]),
|
|
@@ -34949,7 +34962,7 @@ and ensure you are accounting for this risk.
|
|
|
34949
34962
|
key: 1,
|
|
34950
34963
|
class: "lupa-search-results-breadcrumb-text"
|
|
34951
34964
|
};
|
|
34952
|
-
const _hoisted_4$
|
|
34965
|
+
const _hoisted_4$f = { key: 2 };
|
|
34953
34966
|
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
34954
34967
|
__name: "SearchResultsBreadcrumbs",
|
|
34955
34968
|
props: {
|
|
@@ -34991,7 +35004,7 @@ and ensure you are accounting for this risk.
|
|
|
34991
35004
|
return handleNavigation(e2, (_a26 = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a26 : "");
|
|
34992
35005
|
}
|
|
34993
35006
|
}, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$v)) : (openBlock(), createElementBlock("span", _hoisted_3$n, toDisplayString(getLabel(breadcrumb.label)), 1)),
|
|
34994
|
-
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
35007
|
+
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, toDisplayString((_a25 = breadcrumb.separator) != null ? _a25 : "/"), 1)) : createCommentVNode("", true)
|
|
34995
35008
|
]);
|
|
34996
35009
|
}), 128))
|
|
34997
35010
|
]);
|
|
@@ -35153,8 +35166,7 @@ and ensure you are accounting for this risk.
|
|
|
35153
35166
|
key: 0,
|
|
35154
35167
|
class: "lupa-page-number-separator"
|
|
35155
35168
|
};
|
|
35156
|
-
const _hoisted_3$m =
|
|
35157
|
-
const _hoisted_4$f = {
|
|
35169
|
+
const _hoisted_3$m = {
|
|
35158
35170
|
key: 0,
|
|
35159
35171
|
class: "lupa-page-number-separator"
|
|
35160
35172
|
};
|
|
@@ -35221,7 +35233,24 @@ and ensure you are accounting for this risk.
|
|
|
35221
35233
|
timeout: (_f = (_e = searchResultOptions.value.scrollToResults) == null ? void 0 : _e.timeout) != null ? _f : 500
|
|
35222
35234
|
};
|
|
35223
35235
|
});
|
|
35224
|
-
const
|
|
35236
|
+
const tagName = computed(() => {
|
|
35237
|
+
return props.options.renderAsLinks ? "a" : "div";
|
|
35238
|
+
});
|
|
35239
|
+
const getPageUrlWithNewParams = (page) => {
|
|
35240
|
+
return paramStore.getPageUrlWithNewParams({
|
|
35241
|
+
params: [{ name: optionsStore.getQueryParamName(QUERY_PARAMS$1.PAGE), value: page.toString() }]
|
|
35242
|
+
});
|
|
35243
|
+
};
|
|
35244
|
+
const getHref = (page) => {
|
|
35245
|
+
if (props.options.renderAsLinks) {
|
|
35246
|
+
return getPageUrlWithNewParams(page);
|
|
35247
|
+
}
|
|
35248
|
+
return null;
|
|
35249
|
+
};
|
|
35250
|
+
const handlePageChange = (e2, page) => {
|
|
35251
|
+
if (e2 && props.options.renderAsLinks) {
|
|
35252
|
+
e2.preventDefault();
|
|
35253
|
+
}
|
|
35225
35254
|
if (page > 0) {
|
|
35226
35255
|
paramStore.appendParams({
|
|
35227
35256
|
params: [{ name: optionsStore.getQueryParamName(QUERY_PARAMS$1.PAGE), value: page.toString() }]
|
|
@@ -35235,46 +35264,78 @@ and ensure you are accounting for this risk.
|
|
|
35235
35264
|
}
|
|
35236
35265
|
};
|
|
35237
35266
|
return (_ctx, _cache) => {
|
|
35267
|
+
var _a25;
|
|
35238
35268
|
return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$D, [
|
|
35239
|
-
showBack.value ? (openBlock(),
|
|
35269
|
+
showBack.value ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35240
35270
|
key: 0,
|
|
35241
35271
|
class: normalizeClass(firstPageLabel.value === "<" ? "lupa-page-arrow" : "lupa-show-less"),
|
|
35242
|
-
|
|
35243
|
-
|
|
35272
|
+
href: getHref(_ctx.options.selectedPage - 1),
|
|
35273
|
+
onClick: _cache[0] || (_cache[0] = (e2) => handlePageChange(e2, _ctx.options.selectedPage - 1))
|
|
35274
|
+
}, {
|
|
35275
|
+
default: withCtx(() => [
|
|
35276
|
+
createTextVNode(toDisplayString(firstPageLabel.value), 1)
|
|
35277
|
+
]),
|
|
35278
|
+
_: 1
|
|
35279
|
+
}, 8, ["class", "href"])) : createCommentVNode("", true),
|
|
35244
35280
|
showFirstPage.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
35245
|
-
|
|
35281
|
+
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35282
|
+
href: getHref(1),
|
|
35246
35283
|
class: "lupa-page-number lupa-page-number-first",
|
|
35247
|
-
onClick: _cache[1] || (_cache[1] = () => handlePageChange(1))
|
|
35248
|
-
},
|
|
35284
|
+
onClick: _cache[1] || (_cache[1] = (e2) => handlePageChange(e2, 1))
|
|
35285
|
+
}, {
|
|
35286
|
+
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
35287
|
+
createTextVNode(" 1 ")
|
|
35288
|
+
])),
|
|
35289
|
+
_: 1,
|
|
35290
|
+
__: [4]
|
|
35291
|
+
}, 8, ["href"])),
|
|
35249
35292
|
showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$u, "...")) : createCommentVNode("", true)
|
|
35250
35293
|
], 64)) : createCommentVNode("", true),
|
|
35251
35294
|
(openBlock(true), createElementBlock(Fragment, null, renderList(pages.value, (page) => {
|
|
35252
|
-
return openBlock(),
|
|
35295
|
+
return openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35253
35296
|
key: page,
|
|
35254
|
-
|
|
35297
|
+
href: getHref(page),
|
|
35298
|
+
onClick: (e2) => handlePageChange(e2, page),
|
|
35255
35299
|
class: normalizeClass([
|
|
35256
35300
|
"lupa-page-number",
|
|
35257
35301
|
page === _ctx.options.selectedPage ? "lupa-page-number-selected" : ""
|
|
35258
35302
|
]),
|
|
35259
35303
|
"data-cy": "lupa-page-number"
|
|
35260
|
-
},
|
|
35304
|
+
}, {
|
|
35305
|
+
default: withCtx(() => [
|
|
35306
|
+
createTextVNode(toDisplayString(page), 1)
|
|
35307
|
+
]),
|
|
35308
|
+
_: 2
|
|
35309
|
+
}, 1032, ["href", "onClick", "class"]);
|
|
35261
35310
|
}), 128)),
|
|
35262
35311
|
showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
35263
|
-
showLastPageSeparator.value ? (openBlock(), createElementBlock("div",
|
|
35264
|
-
|
|
35312
|
+
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_3$m, "...")) : createCommentVNode("", true),
|
|
35313
|
+
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35314
|
+
href: getHref((_a25 = lastPage.value) != null ? _a25 : 1),
|
|
35265
35315
|
class: "lupa-page-number lupa-page-number-last",
|
|
35266
|
-
onClick: _cache[2] || (_cache[2] = () => {
|
|
35267
|
-
var
|
|
35268
|
-
return handlePageChange((
|
|
35316
|
+
onClick: _cache[2] || (_cache[2] = (e2) => {
|
|
35317
|
+
var _a26;
|
|
35318
|
+
return handlePageChange(e2, (_a26 = lastPage.value) != null ? _a26 : 1);
|
|
35269
35319
|
})
|
|
35270
|
-
},
|
|
35320
|
+
}, {
|
|
35321
|
+
default: withCtx(() => [
|
|
35322
|
+
createTextVNode(toDisplayString(lastPage.value), 1)
|
|
35323
|
+
]),
|
|
35324
|
+
_: 1
|
|
35325
|
+
}, 8, ["href"]))
|
|
35271
35326
|
], 64)) : createCommentVNode("", true),
|
|
35272
|
-
_ctx.options.selectedPage < _ctx.options.count ? (openBlock(),
|
|
35327
|
+
_ctx.options.selectedPage < _ctx.options.count ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
35273
35328
|
key: 3,
|
|
35274
35329
|
class: normalizeClass(lastPageLabel.value === ">" ? "lupa-page-arrow" : "lupa-show-more"),
|
|
35330
|
+
href: getHref(_ctx.options.selectedPage + 1),
|
|
35275
35331
|
"data-cy": "lupa-show-more",
|
|
35276
|
-
onClick: _cache[3] || (_cache[3] = () => handlePageChange(_ctx.options.selectedPage + 1))
|
|
35277
|
-
},
|
|
35332
|
+
onClick: _cache[3] || (_cache[3] = (e2) => handlePageChange(e2, _ctx.options.selectedPage + 1))
|
|
35333
|
+
}, {
|
|
35334
|
+
default: withCtx(() => [
|
|
35335
|
+
createTextVNode(toDisplayString(lastPageLabel.value), 1)
|
|
35336
|
+
]),
|
|
35337
|
+
_: 1
|
|
35338
|
+
}, 8, ["class", "href"])) : createCommentVNode("", true)
|
|
35278
35339
|
])) : createCommentVNode("", true);
|
|
35279
35340
|
};
|
|
35280
35341
|
}
|
|
@@ -35508,6 +35569,7 @@ and ensure you are accounting for this risk.
|
|
|
35508
35569
|
}
|
|
35509
35570
|
});
|
|
35510
35571
|
const paginationOptions = computed(() => {
|
|
35572
|
+
var _a25;
|
|
35511
35573
|
const pageSelect = optionsValue.value.pagination.pageSelection;
|
|
35512
35574
|
return {
|
|
35513
35575
|
pageSize: {
|
|
@@ -35518,7 +35580,8 @@ and ensure you are accounting for this risk.
|
|
|
35518
35580
|
count: getPageCount(searchResult.value.total, limit.value),
|
|
35519
35581
|
selectedPage: page.value,
|
|
35520
35582
|
display: pageSelect.display,
|
|
35521
|
-
displayMobile: pageSelect.displayMobile
|
|
35583
|
+
displayMobile: pageSelect.displayMobile,
|
|
35584
|
+
renderAsLinks: (_a25 = pageSelect.renderAsLinks) != null ? _a25 : false
|
|
35522
35585
|
},
|
|
35523
35586
|
labels: optionsValue.value.labels
|
|
35524
35587
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getlupa/client",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.1",
|
|
4
4
|
"main": "dist/lupaSearch.js",
|
|
5
5
|
"module": "dist/lupaSearch.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@getlupa/client-sdk": "^1.8.1",
|
|
23
|
-
"@getlupa/vue": "0.22.
|
|
23
|
+
"@getlupa/vue": "0.22.1",
|
|
24
24
|
"@rushstack/eslint-patch": "^1.12.0",
|
|
25
25
|
"@tsconfig/node18": "^18.2.4",
|
|
26
26
|
"@types/jsdom": "^21.1.7",
|