@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.
@@ -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$v = { class: "lupa-mic-button-wrapper" };
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$v, [
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$u = ["value"];
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$u),
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$t = {
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$t, toDisplayString(facetLabel.value), 1),
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$s = { class: "lupa-search-box-custom-label" };
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$s, toDisplayString(label.value), 1),
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$r = ["href"];
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$r)
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$q = {
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$q, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
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$p = {
31699
+ const _hoisted_4$o = {
31687
31700
  key: 1,
31688
31701
  class: "lupa-panel-title"
31689
31702
  };
@@ -31729,6 +31742,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
31729
31742
  const searchBoxStore = useSearchBoxStore();
31730
31743
  const { suggestionResults, hasAnyResults, panelItemCounts } = storeToRefs(searchBoxStore);
31731
31744
  const emit2 = __emit;
31745
+ const isSearchEmpty = computed(() => !props.inputValue || props.inputValue.length < 1);
31732
31746
  const displayResults = computed(() => {
31733
31747
  var _a25;
31734
31748
  return ((_a25 = props.inputValue) == null ? void 0 : _a25.length) >= props.options.minInputLength;
@@ -31739,6 +31753,12 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
31739
31753
  return Boolean(props.options.history) && ((_a25 = props.inputValue) == null ? void 0 : _a25.length) < 1 && props.options.minInputLength > 0;
31740
31754
  }
31741
31755
  );
31756
+ const displayShowMoreResultsButton = computed(() => {
31757
+ if (isSearchEmpty.value && props.options.hideMoreResultsButtonOnEmptyQuery) {
31758
+ return false;
31759
+ }
31760
+ return hasAnyResults.value || !props.options.hideMoreResultsButtonOnNoResults;
31761
+ });
31742
31762
  const displayPanels = computed(
31743
31763
  () => props.isSearchContainer ? panels.value.filter((p2) => p2.type === SearchBoxPanelType.SUGGESTION) : panels.value
31744
31764
  );
@@ -31879,7 +31899,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
31879
31899
  "data-cy": "lupa-panel-" + panel.type + "-index"
31880
31900
  }, [
31881
31901
  ((_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$p, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
31902
+ ((_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
31903
  panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
31884
31904
  key: 2,
31885
31905
  panel,
@@ -31908,7 +31928,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
31908
31928
  key: 1,
31909
31929
  labels: labels.value
31910
31930
  }, null, 8, ["labels"])) : createCommentVNode("", true),
31911
- unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$1x, {
31931
+ displayShowMoreResultsButton.value ? (openBlock(), createBlock(_sfc_main$1x, {
31912
31932
  key: 2,
31913
31933
  labels: labels.value,
31914
31934
  options: _ctx.options,
@@ -31992,6 +32012,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
31992
32012
  "debounce",
31993
32013
  "showTotalCount",
31994
32014
  "hideMoreResultsButtonOnNoResults",
32015
+ "hideMoreResultsButtonOnEmptyQuery",
31995
32016
  "showNoResultsPanel",
31996
32017
  "expandOnSinglePanel",
31997
32018
  "showMoreResultsButton"
@@ -32377,7 +32398,7 @@ const _hoisted_3$w = {
32377
32398
  key: 1,
32378
32399
  "data-cy": "did-you-mean-label"
32379
32400
  };
32380
- const _hoisted_4$o = { key: 1 };
32401
+ const _hoisted_4$n = { key: 1 };
32381
32402
  const _sfc_main$12 = /* @__PURE__ */ defineComponent({
32382
32403
  __name: "SearchResultsDidYouMean",
32383
32404
  props: {
@@ -32428,7 +32449,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
32428
32449
  class: "lupa-did-you-mean lupa-highlighted-search-text",
32429
32450
  "data-cy": "did-you-mean-value",
32430
32451
  onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
32431
- }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$o, toDisplayString(label) + " ", 1))
32452
+ }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, toDisplayString(label) + " ", 1))
32432
32453
  ]);
32433
32454
  }), 128))
32434
32455
  ])) : createCommentVNode("", true)
@@ -32478,7 +32499,7 @@ const _hoisted_3$v = {
32478
32499
  key: 1,
32479
32500
  class: "lupa-results-total-count"
32480
32501
  };
32481
- const _hoisted_4$n = { class: "lupa-results-total-count-number" };
32502
+ const _hoisted_4$m = { class: "lupa-results-total-count-number" };
32482
32503
  const _hoisted_5$f = ["innerHTML"];
32483
32504
  const _sfc_main$10 = /* @__PURE__ */ defineComponent({
32484
32505
  __name: "SearchResultsTitle",
@@ -32528,7 +32549,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
32528
32549
  queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$G, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
32529
32550
  showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$v, [
32530
32551
  createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
32531
- createBaseVNode("span", _hoisted_4$n, toDisplayString(unref(totalItems)), 1),
32552
+ createBaseVNode("span", _hoisted_4$m, toDisplayString(unref(totalItems)), 1),
32532
32553
  _cache[0] || (_cache[0] = createTextVNode(")"))
32533
32554
  ])) : createCommentVNode("", true)
32534
32555
  ])) : createCommentVNode("", true),
@@ -32610,7 +32631,7 @@ const _hoisted_3$u = {
32610
32631
  key: 0,
32611
32632
  class: "filter-values"
32612
32633
  };
32613
- const _hoisted_4$m = { class: "lupa-current-filter-list" };
32634
+ const _hoisted_4$l = { class: "lupa-current-filter-list" };
32614
32635
  const _sfc_main$_ = /* @__PURE__ */ defineComponent({
32615
32636
  __name: "CurrentFilters",
32616
32637
  props: {
@@ -32702,7 +32723,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
32702
32723
  }, null, 2)) : createCommentVNode("", true)
32703
32724
  ]),
32704
32725
  !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$u, [
32705
- createBaseVNode("div", _hoisted_4$m, [
32726
+ createBaseVNode("div", _hoisted_4$l, [
32706
32727
  (openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter) => {
32707
32728
  return openBlock(), createBlock(_sfc_main$$, {
32708
32729
  key: filter.key + "_" + filter.value,
@@ -32771,7 +32792,7 @@ const _hoisted_1$R = {
32771
32792
  };
32772
32793
  const _hoisted_2$D = { class: "lupa-category-back" };
32773
32794
  const _hoisted_3$t = ["href"];
32774
- const _hoisted_4$l = ["href"];
32795
+ const _hoisted_4$k = ["href"];
32775
32796
  const _hoisted_5$e = { class: "lupa-child-category-list" };
32776
32797
  const _sfc_main$Y = /* @__PURE__ */ defineComponent({
32777
32798
  __name: "CategoryFilter",
@@ -32878,7 +32899,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
32878
32899
  href: parentUrlLink.value,
32879
32900
  class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
32880
32901
  onClick: handleNavigationParent
32881
- }, toDisplayString(parentTitle.value), 11, _hoisted_4$l)
32902
+ }, toDisplayString(parentTitle.value), 11, _hoisted_4$k)
32882
32903
  ], 2),
32883
32904
  createBaseVNode("div", _hoisted_5$e, [
32884
32905
  (openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
@@ -32899,7 +32920,7 @@ const _hoisted_1$Q = {
32899
32920
  };
32900
32921
  const _hoisted_2$C = ["placeholder"];
32901
32922
  const _hoisted_3$s = { class: "lupa-terms-list" };
32902
- const _hoisted_4$k = ["onClick"];
32923
+ const _hoisted_4$j = ["onClick"];
32903
32924
  const _hoisted_5$d = { class: "lupa-term-checkbox-wrapper" };
32904
32925
  const _hoisted_6$7 = { class: "lupa-term-label" };
32905
32926
  const _hoisted_7$4 = {
@@ -33031,7 +33052,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
33031
33052
  createBaseVNode("span", _hoisted_6$7, toDisplayString(getItemLabel(item)), 1),
33032
33053
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_7$4, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
33033
33054
  ], 2)
33034
- ], 10, _hoisted_4$k);
33055
+ ], 10, _hoisted_4$j);
33035
33056
  }), 128))
33036
33057
  ]),
33037
33058
  displayShowMore.value ? (openBlock(), createElementBlock("div", {
@@ -33939,6 +33960,18 @@ var m = { name: "Slider", emits: ["input", "update:modelValue", "start", "slide"
33939
33960
  m.render = function(e2, t, r, i, n, o) {
33940
33961
  return openBlock(), createElementBlock("div", mergeProps(e2.sliderProps, { ref: "slider" }), null, 16);
33941
33962
  }, m.__file = "src/Slider.vue";
33963
+ const roundToMaxDecimals = (value, maxPrecision = 0.1) => {
33964
+ if (value === void 0 || value === null || Number.isNaN(value)) return "";
33965
+ const log = Math.log10(maxPrecision);
33966
+ const decimals = log < 0 ? Math.round(-log) : 0;
33967
+ const factor = Math.pow(10, decimals);
33968
+ const rounded = Math.round((value + Number.EPSILON) * factor) / factor;
33969
+ let out = rounded.toFixed(decimals);
33970
+ if (Number.isInteger(value)) {
33971
+ out = Math.trunc(value).toString();
33972
+ }
33973
+ return out;
33974
+ };
33942
33975
  const _hoisted_1$P = { class: "lupa-search-result-facet-stats-values" };
33943
33976
  const _hoisted_2$B = {
33944
33977
  key: 0,
@@ -33948,7 +33981,7 @@ const _hoisted_3$r = {
33948
33981
  key: 1,
33949
33982
  class: "lupa-stats-facet-summary-input"
33950
33983
  };
33951
- const _hoisted_4$j = { class: "lupa-stats-from" };
33984
+ const _hoisted_4$i = { class: "lupa-stats-from" };
33952
33985
  const _hoisted_5$c = {
33953
33986
  key: 0,
33954
33987
  class: "lupa-stats-range-label"
@@ -34087,7 +34120,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
34087
34120
  const originalSliderRange = computed(() => {
34088
34121
  return innerSliderRange.value.length === 2 && (currentFilters.value.gte || currentFilters.value.lte) ? [
34089
34122
  Math.max(+currentFilters.value.gte, facetValue.value.min),
34090
- Math.min(+currentFilters.value.lte, facetValue.value.max)
34123
+ Math.min(+(currentFilters.value.lt || currentFilters.value.lte), facetValue.value.max)
34091
34124
  ] : [facetValue.value.min, facetValue.value.max];
34092
34125
  });
34093
34126
  const fromValue = computed({
@@ -34143,6 +34176,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
34143
34176
  }
34144
34177
  );
34145
34178
  const statsSummary = computed(() => {
34179
+ var _a25, _b25;
34146
34180
  const [min, max] = originalSliderRange.value;
34147
34181
  if (isPrice.value) {
34148
34182
  return formatPriceSummary(
@@ -34153,10 +34187,12 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
34153
34187
  multiCurrency.value
34154
34188
  );
34155
34189
  }
34190
+ const minValue = roundToMaxDecimals(min, (_a25 = customInterval.value) != null ? _a25 : 0.1);
34191
+ const maxValue = roundToMaxDecimals(max, (_b25 = customInterval.value) != null ? _b25 : 0.1);
34156
34192
  if (unit.value) {
34157
- return `${min} ${unit.value} – ${max} ${unit.value}`;
34193
+ return `${minValue} ${unit.value} – ${maxValue} ${unit.value}`;
34158
34194
  }
34159
- return formatRange({ gte: min, lte: max });
34195
+ return formatRange({ gte: minValue, lte: maxValue });
34160
34196
  });
34161
34197
  function handleInputChange() {
34162
34198
  if (innerSliderRange.value.length < 2) return;
@@ -34186,7 +34222,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
34186
34222
  return (_ctx, _cache) => {
34187
34223
  return openBlock(), createElementBlock("div", _hoisted_1$P, [
34188
34224
  !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$B, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$r, [
34189
- createBaseVNode("div", _hoisted_4$j, [
34225
+ createBaseVNode("div", _hoisted_4$i, [
34190
34226
  rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_5$c, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
34191
34227
  withDirectives(createBaseVNode("input", {
34192
34228
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
@@ -34255,7 +34291,7 @@ const _hoisted_3$q = {
34255
34291
  key: 0,
34256
34292
  class: "lupa-term-count"
34257
34293
  };
34258
- const _hoisted_4$i = {
34294
+ const _hoisted_4$h = {
34259
34295
  key: 0,
34260
34296
  class: "lupa-facet-level"
34261
34297
  };
@@ -34325,7 +34361,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
34325
34361
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_3$q, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
34326
34362
  ], 2)
34327
34363
  ]),
34328
- showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$i, [
34364
+ showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$h, [
34329
34365
  (openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
34330
34366
  return openBlock(), createBlock(_component_HierarchyFacetLevel, {
34331
34367
  key: itemChild.title,
@@ -34873,7 +34909,7 @@ const _hoisted_1$I = {
34873
34909
  };
34874
34910
  const _hoisted_2$w = { class: "lupa-mobile-sidebar-content" };
34875
34911
  const _hoisted_3$o = { class: "lupa-sidebar-top" };
34876
- const _hoisted_4$h = { class: "lupa-sidebar-title" };
34912
+ const _hoisted_4$g = { class: "lupa-sidebar-title" };
34877
34913
  const _hoisted_5$b = {
34878
34914
  key: 0,
34879
34915
  class: "lupa-sidebar-filter-count"
@@ -34918,7 +34954,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
34918
34954
  }),
34919
34955
  createBaseVNode("div", _hoisted_2$w, [
34920
34956
  createBaseVNode("div", _hoisted_3$o, [
34921
- createBaseVNode("div", _hoisted_4$h, [
34957
+ createBaseVNode("div", _hoisted_4$g, [
34922
34958
  createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
34923
34959
  isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_5$b, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
34924
34960
  ]),
@@ -34945,7 +34981,7 @@ const _hoisted_3$n = {
34945
34981
  key: 1,
34946
34982
  class: "lupa-search-results-breadcrumb-text"
34947
34983
  };
34948
- const _hoisted_4$g = { key: 2 };
34984
+ const _hoisted_4$f = { key: 2 };
34949
34985
  const _sfc_main$N = /* @__PURE__ */ defineComponent({
34950
34986
  __name: "SearchResultsBreadcrumbs",
34951
34987
  props: {
@@ -34987,7 +35023,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
34987
35023
  return handleNavigation(e2, (_a26 = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a26 : "");
34988
35024
  }
34989
35025
  }, 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$g, toDisplayString((_a25 = breadcrumb.separator) != null ? _a25 : "/"), 1)) : createCommentVNode("", true)
35026
+ index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, toDisplayString((_a25 = breadcrumb.separator) != null ? _a25 : "/"), 1)) : createCommentVNode("", true)
34991
35027
  ]);
34992
35028
  }), 128))
34993
35029
  ]);
@@ -35149,8 +35185,7 @@ const _hoisted_2$u = {
35149
35185
  key: 0,
35150
35186
  class: "lupa-page-number-separator"
35151
35187
  };
35152
- const _hoisted_3$m = ["onClick"];
35153
- const _hoisted_4$f = {
35188
+ const _hoisted_3$m = {
35154
35189
  key: 0,
35155
35190
  class: "lupa-page-number-separator"
35156
35191
  };
@@ -35217,7 +35252,24 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
35217
35252
  timeout: (_f = (_e = searchResultOptions.value.scrollToResults) == null ? void 0 : _e.timeout) != null ? _f : 500
35218
35253
  };
35219
35254
  });
35220
- const handlePageChange = (page) => {
35255
+ const tagName = computed(() => {
35256
+ return props.options.renderAsLinks ? "a" : "div";
35257
+ });
35258
+ const getPageUrlWithNewParams = (page) => {
35259
+ return paramStore.getPageUrlWithNewParams({
35260
+ params: [{ name: optionsStore.getQueryParamName(QUERY_PARAMS$1.PAGE), value: page.toString() }]
35261
+ });
35262
+ };
35263
+ const getHref = (page) => {
35264
+ if (props.options.renderAsLinks) {
35265
+ return getPageUrlWithNewParams(page);
35266
+ }
35267
+ return null;
35268
+ };
35269
+ const handlePageChange = (e2, page) => {
35270
+ if (e2 && props.options.renderAsLinks) {
35271
+ e2.preventDefault();
35272
+ }
35221
35273
  if (page > 0) {
35222
35274
  paramStore.appendParams({
35223
35275
  params: [{ name: optionsStore.getQueryParamName(QUERY_PARAMS$1.PAGE), value: page.toString() }]
@@ -35231,46 +35283,78 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
35231
35283
  }
35232
35284
  };
35233
35285
  return (_ctx, _cache) => {
35286
+ var _a25;
35234
35287
  return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$D, [
35235
- showBack.value ? (openBlock(), createElementBlock("div", {
35288
+ showBack.value ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
35236
35289
  key: 0,
35237
35290
  class: normalizeClass(firstPageLabel.value === "<" ? "lupa-page-arrow" : "lupa-show-less"),
35238
- onClick: _cache[0] || (_cache[0] = () => handlePageChange(_ctx.options.selectedPage - 1))
35239
- }, toDisplayString(firstPageLabel.value), 3)) : createCommentVNode("", true),
35291
+ href: getHref(_ctx.options.selectedPage - 1),
35292
+ onClick: _cache[0] || (_cache[0] = (e2) => handlePageChange(e2, _ctx.options.selectedPage - 1))
35293
+ }, {
35294
+ default: withCtx(() => [
35295
+ createTextVNode(toDisplayString(firstPageLabel.value), 1)
35296
+ ]),
35297
+ _: 1
35298
+ }, 8, ["class", "href"])) : createCommentVNode("", true),
35240
35299
  showFirstPage.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
35241
- createBaseVNode("div", {
35300
+ (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
35301
+ href: getHref(1),
35242
35302
  class: "lupa-page-number lupa-page-number-first",
35243
- onClick: _cache[1] || (_cache[1] = () => handlePageChange(1))
35244
- }, " 1 "),
35303
+ onClick: _cache[1] || (_cache[1] = (e2) => handlePageChange(e2, 1))
35304
+ }, {
35305
+ default: withCtx(() => _cache[4] || (_cache[4] = [
35306
+ createTextVNode(" 1 ")
35307
+ ])),
35308
+ _: 1,
35309
+ __: [4]
35310
+ }, 8, ["href"])),
35245
35311
  showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$u, "...")) : createCommentVNode("", true)
35246
35312
  ], 64)) : createCommentVNode("", true),
35247
35313
  (openBlock(true), createElementBlock(Fragment, null, renderList(pages.value, (page) => {
35248
- return openBlock(), createElementBlock("div", {
35314
+ return openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
35249
35315
  key: page,
35250
- onClick: () => handlePageChange(page),
35316
+ href: getHref(page),
35317
+ onClick: (e2) => handlePageChange(e2, page),
35251
35318
  class: normalizeClass([
35252
35319
  "lupa-page-number",
35253
35320
  page === _ctx.options.selectedPage ? "lupa-page-number-selected" : ""
35254
35321
  ]),
35255
35322
  "data-cy": "lupa-page-number"
35256
- }, toDisplayString(page), 11, _hoisted_3$m);
35323
+ }, {
35324
+ default: withCtx(() => [
35325
+ createTextVNode(toDisplayString(page), 1)
35326
+ ]),
35327
+ _: 2
35328
+ }, 1032, ["href", "onClick", "class"]);
35257
35329
  }), 128)),
35258
35330
  showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
35259
- showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$f, "...")) : createCommentVNode("", true),
35260
- createBaseVNode("div", {
35331
+ showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_3$m, "...")) : createCommentVNode("", true),
35332
+ (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
35333
+ href: getHref((_a25 = lastPage.value) != null ? _a25 : 1),
35261
35334
  class: "lupa-page-number lupa-page-number-last",
35262
- onClick: _cache[2] || (_cache[2] = () => {
35263
- var _a25;
35264
- return handlePageChange((_a25 = lastPage.value) != null ? _a25 : 1);
35335
+ onClick: _cache[2] || (_cache[2] = (e2) => {
35336
+ var _a26;
35337
+ return handlePageChange(e2, (_a26 = lastPage.value) != null ? _a26 : 1);
35265
35338
  })
35266
- }, toDisplayString(lastPage.value), 1)
35339
+ }, {
35340
+ default: withCtx(() => [
35341
+ createTextVNode(toDisplayString(lastPage.value), 1)
35342
+ ]),
35343
+ _: 1
35344
+ }, 8, ["href"]))
35267
35345
  ], 64)) : createCommentVNode("", true),
35268
- _ctx.options.selectedPage < _ctx.options.count ? (openBlock(), createElementBlock("div", {
35346
+ _ctx.options.selectedPage < _ctx.options.count ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
35269
35347
  key: 3,
35270
35348
  class: normalizeClass(lastPageLabel.value === ">" ? "lupa-page-arrow" : "lupa-show-more"),
35349
+ href: getHref(_ctx.options.selectedPage + 1),
35271
35350
  "data-cy": "lupa-show-more",
35272
- onClick: _cache[3] || (_cache[3] = () => handlePageChange(_ctx.options.selectedPage + 1))
35273
- }, toDisplayString(lastPageLabel.value), 3)) : createCommentVNode("", true)
35351
+ onClick: _cache[3] || (_cache[3] = (e2) => handlePageChange(e2, _ctx.options.selectedPage + 1))
35352
+ }, {
35353
+ default: withCtx(() => [
35354
+ createTextVNode(toDisplayString(lastPageLabel.value), 1)
35355
+ ]),
35356
+ _: 1
35357
+ }, 8, ["class", "href"])) : createCommentVNode("", true)
35274
35358
  ])) : createCommentVNode("", true);
35275
35359
  };
35276
35360
  }
@@ -35504,6 +35588,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
35504
35588
  }
35505
35589
  });
35506
35590
  const paginationOptions = computed(() => {
35591
+ var _a25;
35507
35592
  const pageSelect = optionsValue.value.pagination.pageSelection;
35508
35593
  return {
35509
35594
  pageSize: {
@@ -35514,7 +35599,8 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
35514
35599
  count: getPageCount(searchResult.value.total, limit.value),
35515
35600
  selectedPage: page.value,
35516
35601
  display: pageSelect.display,
35517
- displayMobile: pageSelect.displayMobile
35602
+ displayMobile: pageSelect.displayMobile,
35603
+ renderAsLinks: (_a25 = pageSelect.renderAsLinks) != null ? _a25 : false
35518
35604
  },
35519
35605
  labels: optionsValue.value.labels
35520
35606
  };