@getlupa/client 1.11.1 → 1.11.2

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.
@@ -7316,7 +7316,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7316
7316
  top: false,
7317
7317
  bottom: true
7318
7318
  },
7319
- sizes: [10, 20, 25, 50]
7319
+ sizes: [10, 20, 25]
7320
7320
  },
7321
7321
  pageSelection: {
7322
7322
  position: {
@@ -7642,38 +7642,39 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7642
7642
  const seed = [];
7643
7643
  return filter.terms.reduce((a, c2) => [...a, { key, value: c2, type: "hierarchy" }], seed);
7644
7644
  };
7645
- const unfoldRangeFilter = (key, filter) => {
7645
+ const unfoldRangeFilter = (key, filter, price = {}) => {
7646
+ var _a;
7646
7647
  const gt = filter.gte || filter.gt;
7647
7648
  const lt = filter.lte || filter.lt;
7648
- if (key.includes(CURRENCY_KEY_INDICATOR)) {
7649
+ if (key.includes(CURRENCY_KEY_INDICATOR) || ((_a = price == null ? void 0 : price.keys) == null ? void 0 : _a.includes(key))) {
7649
7650
  return [
7650
7651
  {
7651
7652
  key,
7652
- value: formatPriceSummary([gt, lt]),
7653
+ value: formatPriceSummary([gt, lt], price.currency, price.separator),
7653
7654
  type: "range"
7654
7655
  }
7655
7656
  ];
7656
7657
  }
7657
7658
  return [{ key, value: `${gt} - ${lt}`, type: "range" }];
7658
7659
  };
7659
- const unfoldFilter = (key, filter) => {
7660
+ const unfoldFilter = (key, filter, price = {}) => {
7660
7661
  if (Array.isArray(filter)) {
7661
7662
  return unfoldTermFilter(key, filter);
7662
7663
  }
7663
7664
  if (filter.gte) {
7664
- return unfoldRangeFilter(key, filter);
7665
+ return unfoldRangeFilter(key, filter, price);
7665
7666
  }
7666
7667
  if (filter.terms) {
7667
7668
  return unfoldHierarchyFilter(key, filter);
7668
7669
  }
7669
7670
  return [];
7670
7671
  };
7671
- const unfoldFilters = (filters) => {
7672
+ const unfoldFilters = (filters, price = {}) => {
7672
7673
  if (!filters) {
7673
7674
  return [];
7674
7675
  }
7675
7676
  const seed = [];
7676
- return Object.entries(filters).reduce((a, c2) => [...a, ...unfoldFilter(...c2)], seed);
7677
+ return Object.entries(filters).reduce((a, c2) => [...a, ...unfoldFilter(...c2, price)], seed);
7677
7678
  };
7678
7679
  const getLabeledFilters = (filters, facets) => {
7679
7680
  return filters.map((f2) => {
@@ -8446,7 +8447,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8446
8447
  };
8447
8448
  });
8448
8449
  const _hoisted_1$1e = { id: "lupa-search-box-input-container" };
8449
- const _hoisted_2$P = { class: "lupa-input-clear" };
8450
+ const _hoisted_2$Q = { class: "lupa-input-clear" };
8450
8451
  const _hoisted_3$A = { id: "lupa-search-box-input" };
8451
8452
  const _hoisted_4$s = ["value"];
8452
8453
  const _hoisted_5$h = ["aria-label", "placeholder"];
@@ -8536,7 +8537,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8536
8537
  __expose({ focus });
8537
8538
  return (_ctx, _cache) => {
8538
8539
  return openBlock(), createElementBlock("div", _hoisted_1$1e, [
8539
- createBaseVNode("div", _hoisted_2$P, [
8540
+ createBaseVNode("div", _hoisted_2$Q, [
8540
8541
  createBaseVNode("div", {
8541
8542
  class: normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
8542
8543
  onClick: clear2
@@ -8610,7 +8611,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8610
8611
  }
8611
8612
  });
8612
8613
  const _hoisted_1$1d = { class: "lupa-search-box-history-item" };
8613
- const _hoisted_2$O = { class: "lupa-search-box-history-item-content" };
8614
+ const _hoisted_2$P = { class: "lupa-search-box-history-item-content" };
8614
8615
  const _sfc_main$1k = /* @__PURE__ */ defineComponent({
8615
8616
  __name: "SearchBoxHistoryItem",
8616
8617
  props: {
@@ -8628,7 +8629,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8628
8629
  };
8629
8630
  return (_ctx, _cache) => {
8630
8631
  return openBlock(), createElementBlock("div", _hoisted_1$1d, [
8631
- createBaseVNode("div", _hoisted_2$O, [
8632
+ createBaseVNode("div", _hoisted_2$P, [
8632
8633
  createBaseVNode("div", {
8633
8634
  class: normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
8634
8635
  onClick: click2
@@ -8718,7 +8719,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8718
8719
  }
8719
8720
  });
8720
8721
  const _hoisted_1$1a = ["innerHTML"];
8721
- const _hoisted_2$N = {
8722
+ const _hoisted_2$O = {
8722
8723
  key: 1,
8723
8724
  "data-cy": "lupa-suggestion-value",
8724
8725
  class: "lupa-suggestion-value"
@@ -8772,7 +8773,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8772
8773
  class: "lupa-suggestion-value",
8773
8774
  "data-cy": "lupa-suggestion-value",
8774
8775
  innerHTML: _ctx.suggestion.displayHighlight
8775
- }, null, 8, _hoisted_1$1a)) : (openBlock(), createElementBlock("div", _hoisted_2$N, toDisplayString(_ctx.suggestion.display), 1)),
8776
+ }, null, 8, _hoisted_1$1a)) : (openBlock(), createElementBlock("div", _hoisted_2$O, toDisplayString(_ctx.suggestion.display), 1)),
8776
8777
  _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$z, [
8777
8778
  createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
8778
8779
  createBaseVNode("span", _hoisted_5$g, toDisplayString(_ctx.suggestion.facet.title), 1)
@@ -9164,7 +9165,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9164
9165
  }
9165
9166
  });
9166
9167
  const _hoisted_1$17 = ["innerHTML"];
9167
- const _hoisted_2$M = {
9168
+ const _hoisted_2$N = {
9168
9169
  key: 1,
9169
9170
  class: "lupa-search-box-product-title"
9170
9171
  };
@@ -9188,14 +9189,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9188
9189
  key: 0,
9189
9190
  class: "lupa-search-box-product-title",
9190
9191
  innerHTML: title.value
9191
- }, null, 8, _hoisted_1$17)) : (openBlock(), createElementBlock("div", _hoisted_2$M, [
9192
+ }, null, 8, _hoisted_1$17)) : (openBlock(), createElementBlock("div", _hoisted_2$N, [
9192
9193
  createBaseVNode("strong", null, toDisplayString(title.value), 1)
9193
9194
  ]));
9194
9195
  };
9195
9196
  }
9196
9197
  });
9197
9198
  const _hoisted_1$16 = ["innerHTML"];
9198
- const _hoisted_2$L = {
9199
+ const _hoisted_2$M = {
9199
9200
  key: 1,
9200
9201
  class: "lupa-search-box-product-description"
9201
9202
  };
@@ -9219,7 +9220,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9219
9220
  key: 0,
9220
9221
  class: "lupa-search-box-product-description",
9221
9222
  innerHTML: description.value
9222
- }, null, 8, _hoisted_1$16)) : (openBlock(), createElementBlock("div", _hoisted_2$L, toDisplayString(description.value), 1));
9223
+ }, null, 8, _hoisted_1$16)) : (openBlock(), createElementBlock("div", _hoisted_2$M, toDisplayString(description.value), 1));
9223
9224
  };
9224
9225
  }
9225
9226
  });
@@ -9272,7 +9273,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9272
9273
  }
9273
9274
  });
9274
9275
  const _hoisted_1$13 = ["innerHTML"];
9275
- const _hoisted_2$K = { key: 0 };
9276
+ const _hoisted_2$L = { key: 0 };
9276
9277
  const _hoisted_3$y = { key: 1 };
9277
9278
  const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
9278
9279
  const _hoisted_5$f = { class: "lupa-search-box-custom-text" };
@@ -9306,7 +9307,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9306
9307
  key: 1,
9307
9308
  class: [className.value, "lupa-search-box-product-custom"]
9308
9309
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
9309
- !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$K, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$y, [
9310
+ !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$L, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$y, [
9310
9311
  createBaseVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
9311
9312
  createBaseVNode("div", _hoisted_5$f, toDisplayString(text.value), 1)
9312
9313
  ]))
@@ -9393,13 +9394,33 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9393
9394
  const isMobileSidebarVisible = ref(false);
9394
9395
  const optionsStore = useOptionsStore();
9395
9396
  const paramsStore = useParamsStore();
9397
+ const { searchResultOptions } = storeToRefs(optionsStore);
9396
9398
  const facets = computed(() => searchResult.value.facets);
9397
9399
  const filters = computed(() => searchResult.value.filters);
9398
9400
  const currentQueryText = computed(() => searchResult.value.searchText);
9399
9401
  const totalItems = computed(() => searchResult.value.total);
9400
9402
  const hasResults = computed(() => totalItems.value > 0);
9403
+ const priceKeys = computed(() => {
9404
+ var _a, _b;
9405
+ return (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.priceKeys) != null ? _b : [];
9406
+ });
9407
+ const currency = computed(() => {
9408
+ var _a, _b, _c;
9409
+ return (_c = (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.labels) == null ? void 0 : _b.currency) != null ? _c : "";
9410
+ });
9411
+ const priceSeparator = computed(() => {
9412
+ var _a, _b, _c;
9413
+ return (_c = (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.labels) == null ? void 0 : _b.priceSeparator) != null ? _c : "";
9414
+ });
9401
9415
  const labeledFilters = computed(
9402
- () => getLabeledFilters(unfoldFilters(filters.value), facets.value)
9416
+ () => getLabeledFilters(
9417
+ unfoldFilters(filters.value, {
9418
+ keys: priceKeys.value,
9419
+ currency: currency.value,
9420
+ separator: priceSeparator.value
9421
+ }),
9422
+ facets.value
9423
+ )
9403
9424
  );
9404
9425
  const displayFilters = computed(() => {
9405
9426
  var _a, _b;
@@ -9534,7 +9555,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9534
9555
  };
9535
9556
  });
9536
9557
  const _hoisted_1$11 = { class: "lupa-search-box-add-to-cart-wrapper" };
9537
- const _hoisted_2$J = { class: "lupa-search-box-product-addtocart" };
9558
+ const _hoisted_2$K = { class: "lupa-search-box-product-addtocart" };
9538
9559
  const _hoisted_3$x = ["onClick", "disabled"];
9539
9560
  const _sfc_main$16 = /* @__PURE__ */ defineComponent({
9540
9561
  __name: "SearchBoxProductAddToCart",
@@ -9564,7 +9585,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9564
9585
  });
9565
9586
  return (_ctx, _cache) => {
9566
9587
  return openBlock(), createElementBlock("div", _hoisted_1$11, [
9567
- createBaseVNode("div", _hoisted_2$J, [
9588
+ createBaseVNode("div", _hoisted_2$K, [
9568
9589
  createBaseVNode("button", {
9569
9590
  onClick: withModifiers(handleClick, ["stop", "prevent"]),
9570
9591
  class: normalizeClass(loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart"),
@@ -9666,7 +9687,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9666
9687
  }
9667
9688
  }));
9668
9689
  const _hoisted_1$$ = { class: "lupa-badge-title" };
9669
- const _hoisted_2$I = ["src"];
9690
+ const _hoisted_2$J = ["src"];
9670
9691
  const _hoisted_3$w = { key: 1 };
9671
9692
  const _hoisted_4$p = {
9672
9693
  key: 0,
@@ -9709,7 +9730,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9709
9730
  image.value ? (openBlock(), createElementBlock("img", {
9710
9731
  key: 0,
9711
9732
  src: image.value
9712
- }, null, 8, _hoisted_2$I)) : createCommentVNode("", true),
9733
+ }, null, 8, _hoisted_2$J)) : createCommentVNode("", true),
9713
9734
  hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$w, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
9714
9735
  ]),
9715
9736
  hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
@@ -9808,7 +9829,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9808
9829
  }
9809
9830
  });
9810
9831
  const _hoisted_1$X = { class: "lupa-image-badges" };
9811
- const _hoisted_2$H = ["src"];
9832
+ const _hoisted_2$I = ["src"];
9812
9833
  const _sfc_main$10 = /* @__PURE__ */ defineComponent({
9813
9834
  __name: "ImageBadge",
9814
9835
  props: {
@@ -9837,7 +9858,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9837
9858
  }, [
9838
9859
  createBaseVNode("img", {
9839
9860
  src: getImageUrl(item)
9840
- }, null, 8, _hoisted_2$H)
9861
+ }, null, 8, _hoisted_2$I)
9841
9862
  ]);
9842
9863
  }), 128))
9843
9864
  ]);
@@ -9929,7 +9950,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9929
9950
  }
9930
9951
  }));
9931
9952
  const _hoisted_1$V = ["href"];
9932
- const _hoisted_2$G = { class: "lupa-search-box-product-image-section" };
9953
+ const _hoisted_2$H = { class: "lupa-search-box-product-image-section" };
9933
9954
  const _hoisted_3$v = { class: "lupa-search-box-product-details-section" };
9934
9955
  const _hoisted_4$o = {
9935
9956
  key: 0,
@@ -9994,7 +10015,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9994
10015
  "data-cy": "lupa-search-box-product",
9995
10016
  onClick: handleClick
9996
10017
  }), [
9997
- createBaseVNode("div", _hoisted_2$G, [
10018
+ createBaseVNode("div", _hoisted_2$H, [
9998
10019
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
9999
10020
  return openBlock(), createBlock(_sfc_main$15, {
10000
10021
  class: "lupa-search-box-product-element",
@@ -10353,7 +10374,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
10353
10374
  key: 0,
10354
10375
  id: "lupa-search-box-panel"
10355
10376
  };
10356
- const _hoisted_2$F = ["data-cy"];
10377
+ const _hoisted_2$G = ["data-cy"];
10357
10378
  const _hoisted_3$u = {
10358
10379
  key: 0,
10359
10380
  class: "lupa-panel-title lupa-panel-title-top-results"
@@ -10561,7 +10582,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
10561
10582
  key: "0"
10562
10583
  } : void 0
10563
10584
  ]), 1064, ["panel", "options", "debounce", "inputValue", "labels"])) : createCommentVNode("", true)
10564
- ], 10, _hoisted_2$F);
10585
+ ], 10, _hoisted_2$G);
10565
10586
  }), 128))
10566
10587
  ], 4),
10567
10588
  !unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1i, {
@@ -10601,7 +10622,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
10601
10622
  elements.forEach((e) => e == null ? void 0 : e.removeEventListener(BIND_EVENT, event));
10602
10623
  };
10603
10624
  const _hoisted_1$S = { id: "lupa-search-box" };
10604
- const _hoisted_2$E = { class: "lupa-search-box-wrapper" };
10625
+ const _hoisted_2$F = { class: "lupa-search-box-wrapper" };
10605
10626
  const _sfc_main$V = /* @__PURE__ */ defineComponent({
10606
10627
  __name: "SearchBox",
10607
10628
  props: {
@@ -10848,7 +10869,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
10848
10869
  return (_ctx, _cache) => {
10849
10870
  var _a2;
10850
10871
  return openBlock(), createElementBlock("div", _hoisted_1$S, [
10851
- createBaseVNode("div", _hoisted_2$E, [
10872
+ createBaseVNode("div", _hoisted_2$F, [
10852
10873
  createVNode(_sfc_main$1m, {
10853
10874
  options: inputOptions.value,
10854
10875
  suggestedValue: suggestedValue.value,
@@ -10952,7 +10973,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
10952
10973
  key: 0,
10953
10974
  id: "lupa-search-results-did-you-mean"
10954
10975
  };
10955
- const _hoisted_2$D = {
10976
+ const _hoisted_2$E = {
10956
10977
  key: 0,
10957
10978
  "data-cy": "suggested-search-text-label"
10958
10979
  };
@@ -10994,7 +11015,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
10994
11015
  };
10995
11016
  return (_ctx, _cache) => {
10996
11017
  return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$R, [
10997
- unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$D, [
11018
+ unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$E, [
10998
11019
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.noResultsSuggestion.split(" "), (label, index) => {
10999
11020
  return openBlock(), createElementBlock("span", { key: index }, [
11000
11021
  createBaseVNode("span", {
@@ -11023,7 +11044,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11023
11044
  key: 0,
11024
11045
  class: "lupa-search-results-summary"
11025
11046
  };
11026
- const _hoisted_2$C = ["innerHTML"];
11047
+ const _hoisted_2$D = ["innerHTML"];
11027
11048
  const _sfc_main$T = /* @__PURE__ */ defineComponent({
11028
11049
  __name: "SearchResultsSummary",
11029
11050
  props: {
@@ -11040,7 +11061,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11040
11061
  });
11041
11062
  return (_ctx, _cache) => {
11042
11063
  return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$Q, [
11043
- createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$C),
11064
+ createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$D),
11044
11065
  _ctx.clearable ? (openBlock(), createElementBlock("span", {
11045
11066
  key: 0,
11046
11067
  class: "lupa-filter-clear",
@@ -11056,7 +11077,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11056
11077
  class: "lupa-result-page-title",
11057
11078
  "data-cy": "lupa-result-page-title"
11058
11079
  };
11059
- const _hoisted_2$B = { key: 0 };
11080
+ const _hoisted_2$C = { key: 0 };
11060
11081
  const _hoisted_3$s = {
11061
11082
  key: 1,
11062
11083
  class: "lupa-results-total-count"
@@ -11099,7 +11120,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11099
11120
  return openBlock(), createElementBlock("div", null, [
11100
11121
  showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$P, [
11101
11122
  createTextVNode(toDisplayString(_ctx.options.labels.searchResults), 1),
11102
- queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$B, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
11123
+ queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$C, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
11103
11124
  showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$s, "(" + toDisplayString(unref(totalItems)) + ")", 1)) : createCommentVNode("", true)
11104
11125
  ])) : createCommentVNode("", true),
11105
11126
  _ctx.showSummary ? (openBlock(), createBlock(_sfc_main$T, {
@@ -11116,7 +11137,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11116
11137
  }
11117
11138
  });
11118
11139
  const _hoisted_1$O = { class: "lupa-search-result-filter-value" };
11119
- const _hoisted_2$A = {
11140
+ const _hoisted_2$B = {
11120
11141
  class: "lupa-current-filter-label",
11121
11142
  "data-cy": "lupa-current-filter-label"
11122
11143
  };
@@ -11141,14 +11162,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11141
11162
  class: "lupa-current-filter-action",
11142
11163
  onClick: handleClick
11143
11164
  }, "⨉"),
11144
- createBaseVNode("div", _hoisted_2$A, toDisplayString(_ctx.filter.label) + ": ", 1),
11165
+ createBaseVNode("div", _hoisted_2$B, toDisplayString(_ctx.filter.label) + ": ", 1),
11145
11166
  createBaseVNode("div", _hoisted_3$r, toDisplayString(_ctx.filter.value), 1)
11146
11167
  ]);
11147
11168
  };
11148
11169
  }
11149
11170
  });
11150
11171
  const _hoisted_1$N = { class: "lupa-filter-title-text" };
11151
- const _hoisted_2$z = {
11172
+ const _hoisted_2$A = {
11152
11173
  key: 0,
11153
11174
  class: "lupa-filter-count"
11154
11175
  };
@@ -11220,7 +11241,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11220
11241
  }, [
11221
11242
  createBaseVNode("div", _hoisted_1$N, [
11222
11243
  createTextVNode(toDisplayString((_c = (_b = (_a = _ctx.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.title) != null ? _c : "") + " ", 1),
11223
- _ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$z, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
11244
+ _ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$A, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
11224
11245
  ]),
11225
11246
  _ctx.expandable ? (openBlock(), createElementBlock("div", {
11226
11247
  key: 0,
@@ -11294,7 +11315,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11294
11315
  class: "lupa-category-filter",
11295
11316
  "data-cy": "lupa-category-filter"
11296
11317
  };
11297
- const _hoisted_2$y = { class: "lupa-category-back" };
11318
+ const _hoisted_2$z = { class: "lupa-category-back" };
11298
11319
  const _hoisted_3$p = ["href"];
11299
11320
  const _hoisted_4$j = ["href"];
11300
11321
  const _hoisted_5$d = { class: "lupa-child-category-list" };
@@ -11385,7 +11406,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11385
11406
  __expose({ fetch: fetch2 });
11386
11407
  return (_ctx, _cache) => {
11387
11408
  return openBlock(), createElementBlock("div", _hoisted_1$L, [
11388
- createBaseVNode("div", _hoisted_2$y, [
11409
+ createBaseVNode("div", _hoisted_2$z, [
11389
11410
  hasBackButton.value ? (openBlock(), createElementBlock("a", {
11390
11411
  key: 0,
11391
11412
  "data-cy": "lupa-category-back",
@@ -11420,7 +11441,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11420
11441
  class: "lupa-search-result-facet-term-values",
11421
11442
  "data-cy": "lupa-search-result-facet-term-values"
11422
11443
  };
11423
- const _hoisted_2$x = ["placeholder"];
11444
+ const _hoisted_2$y = ["placeholder"];
11424
11445
  const _hoisted_3$o = { class: "lupa-terms-list" };
11425
11446
  const _hoisted_4$i = ["onClick"];
11426
11447
  const _hoisted_5$c = { class: "lupa-term-checkbox-wrapper" };
@@ -11508,7 +11529,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11508
11529
  "data-cy": "lupa-term-filter",
11509
11530
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
11510
11531
  placeholder: _ctx.options.labels.facetFilter
11511
- }, null, 8, _hoisted_2$x)), [
11532
+ }, null, 8, _hoisted_2$y)), [
11512
11533
  [vModelText, termFilter.value]
11513
11534
  ]) : createCommentVNode("", true),
11514
11535
  createBaseVNode("div", _hoisted_3$o, [
@@ -12520,7 +12541,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12520
12541
  return openBlock(), createElementBlock("div", mergeProps(e.sliderProps, { ref: "slider" }), null, 16);
12521
12542
  }, m.__file = "src/Slider.vue";
12522
12543
  const _hoisted_1$J = { class: "lupa-search-result-facet-stats-values" };
12523
- const _hoisted_2$w = {
12544
+ const _hoisted_2$x = {
12524
12545
  key: 0,
12525
12546
  class: "lupa-stats-facet-summary"
12526
12547
  };
@@ -12580,6 +12601,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12580
12601
  var _a;
12581
12602
  return (_a = searchResultOptions.value) == null ? void 0 : _a.labels.currency;
12582
12603
  });
12604
+ const priceKeys = computed(() => {
12605
+ var _a, _b;
12606
+ return (_b = (_a = searchResultOptions.value) == null ? void 0 : _a.priceKeys) != null ? _b : [];
12607
+ });
12583
12608
  const isSliderVisible = computed(() => {
12584
12609
  var _a, _b;
12585
12610
  return Boolean((_b = (_a = props.options.stats) == null ? void 0 : _a.slider) != null ? _b : true);
@@ -12643,8 +12668,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12643
12668
  }
12644
12669
  });
12645
12670
  const isPrice = computed(() => {
12646
- var _a;
12647
- return (_a = facetValue.value.key) == null ? void 0 : _a.includes(CURRENCY_KEY_INDICATOR);
12671
+ var _a, _b, _c;
12672
+ return ((_b = (_a = facetValue.value) == null ? void 0 : _a.key) == null ? void 0 : _b.includes(CURRENCY_KEY_INDICATOR)) || ((_c = priceKeys.value) == null ? void 0 : _c.includes(facetValue.value.key));
12648
12673
  });
12649
12674
  const facetMin = computed(() => {
12650
12675
  return Math.floor(facetValue.value.min);
@@ -12717,7 +12742,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12717
12742
  };
12718
12743
  return (_ctx, _cache) => {
12719
12744
  return openBlock(), createElementBlock("div", _hoisted_1$J, [
12720
- !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$w, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$n, [
12745
+ !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$x, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$n, [
12721
12746
  createBaseVNode("div", null, [
12722
12747
  rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$h, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
12723
12748
  createBaseVNode("div", _hoisted_5$b, [
@@ -12784,7 +12809,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12784
12809
  }
12785
12810
  });
12786
12811
  const _hoisted_1$I = { class: "lupa-term-checkbox-wrapper" };
12787
- const _hoisted_2$v = { class: "lupa-term-checkbox-label" };
12812
+ const _hoisted_2$w = { class: "lupa-term-checkbox-label" };
12788
12813
  const _hoisted_3$m = { class: "lupa-term-label" };
12789
12814
  const _hoisted_4$g = {
12790
12815
  key: 0,
@@ -12845,7 +12870,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12845
12870
  class: normalizeClass(["lupa-term-checkbox", { checked: isChecked.value }])
12846
12871
  }, null, 2)
12847
12872
  ]),
12848
- createBaseVNode("div", _hoisted_2$v, [
12873
+ createBaseVNode("div", _hoisted_2$w, [
12849
12874
  createBaseVNode("span", _hoisted_3$m, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
12850
12875
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$g, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
12851
12876
  ])
@@ -12870,7 +12895,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12870
12895
  class: "lupa-search-result-facet-term-values lupa-search-result-facet-hierarchy-values",
12871
12896
  "data-cy": "lupa-search-result-facet-term-values"
12872
12897
  };
12873
- const _hoisted_2$u = { key: 0 };
12898
+ const _hoisted_2$v = { key: 0 };
12874
12899
  const _hoisted_3$l = ["placeholder"];
12875
12900
  const _sfc_main$K = /* @__PURE__ */ defineComponent({
12876
12901
  __name: "HierarchyFacet",
@@ -12923,7 +12948,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12923
12948
  };
12924
12949
  return (_ctx, _cache) => {
12925
12950
  return openBlock(), createElementBlock("div", _hoisted_1$H, [
12926
- isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$u, [
12951
+ isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$v, [
12927
12952
  withDirectives(createBaseVNode("input", {
12928
12953
  class: "lupa-term-filter",
12929
12954
  "data-cy": "lupa-term-filter",
@@ -12955,7 +12980,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12955
12980
  }
12956
12981
  });
12957
12982
  const _hoisted_1$G = { class: "lupa-facet-label-text" };
12958
- const _hoisted_2$t = {
12983
+ const _hoisted_2$u = {
12959
12984
  key: 0,
12960
12985
  class: "lupa-facet-content",
12961
12986
  "data-cy": "lupa-facet-content"
@@ -13084,7 +13109,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13084
13109
  class: normalizeClass(["lupa-facet-label-caret", isOpen.value && "open"])
13085
13110
  }, null, 2)
13086
13111
  ], 2),
13087
- isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$t, [
13112
+ isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$u, [
13088
13113
  (openBlock(), createBlock(resolveDynamicComponent(facetType.value), {
13089
13114
  facet: facet.value,
13090
13115
  currentFilters: currentFilters.value[facet.value.key],
@@ -13103,7 +13128,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13103
13128
  }
13104
13129
  }));
13105
13130
  const _hoisted_1$F = { class: "lupa-search-result-facet-section" };
13106
- const _hoisted_2$s = {
13131
+ const _hoisted_2$t = {
13107
13132
  key: 0,
13108
13133
  class: "lupa-facets-title"
13109
13134
  };
@@ -13142,7 +13167,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13142
13167
  return (_ctx, _cache) => {
13143
13168
  var _a;
13144
13169
  return openBlock(), createElementBlock("div", _hoisted_1$F, [
13145
- _ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$s, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
13170
+ _ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$t, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
13146
13171
  createBaseVNode("div", {
13147
13172
  class: normalizeClass(["lupa-search-result-facet-list", "lupa-" + ((_a = _ctx.facetStyle) != null ? _a : "")])
13148
13173
  }, [
@@ -13189,6 +13214,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13189
13214
  }
13190
13215
  });
13191
13216
  const _hoisted_1$D = { class: "lupa-search-result-facets" };
13217
+ const _hoisted_2$s = { class: "lupa-facets-filter-button-wrapper" };
13192
13218
  const _sfc_main$G = /* @__PURE__ */ defineComponent({
13193
13219
  __name: "Facets",
13194
13220
  props: {
@@ -13283,11 +13309,13 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13283
13309
  onSelect: handleFacetSelect,
13284
13310
  onClear: clear2
13285
13311
  }, null, 8, ["options", "facets", "currentFilters", "facetStyle", "clearable"])) : createCommentVNode("", true),
13286
- showFilterButton.value ? (openBlock(), createBlock(_sfc_main$H, {
13287
- key: 1,
13288
- options: _ctx.options,
13289
- onFilter: filter
13290
- }, null, 8, ["options"])) : createCommentVNode("", true)
13312
+ createBaseVNode("div", _hoisted_2$s, [
13313
+ showFilterButton.value ? (openBlock(), createBlock(_sfc_main$H, {
13314
+ key: 0,
13315
+ options: _ctx.options,
13316
+ onFilter: filter
13317
+ }, null, 8, ["options"])) : createCommentVNode("", true)
13318
+ ])
13291
13319
  ]);
13292
13320
  };
13293
13321
  }
@@ -14307,7 +14335,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
14307
14335
  item: {},
14308
14336
  options: {}
14309
14337
  },
14310
- setup(__props) {
14338
+ emits: ["productEvent"],
14339
+ setup(__props, { emit: emit2 }) {
14311
14340
  const props = __props;
14312
14341
  const text = computed(() => {
14313
14342
  return props.options.html(props.item);
@@ -14319,6 +14348,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
14319
14348
  if (!props.options.action) {
14320
14349
  return;
14321
14350
  }
14351
+ if (props.options.reportEventOnClick) {
14352
+ emit2("productEvent", { type: props.options.reportEventOnClick });
14353
+ }
14322
14354
  yield props.options.action(props.item);
14323
14355
  });
14324
14356
  return (_ctx, _cache) => {
@@ -14631,7 +14663,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
14631
14663
  key: element.key,
14632
14664
  labels: labels.value,
14633
14665
  inStock: isInStock.value,
14634
- link: link.value
14666
+ link: link.value,
14667
+ onProductEvent: handleProductEvent
14635
14668
  }, null, 8, ["item", "element", "labels", "inStock", "link"]);
14636
14669
  }), 128)),
14637
14670
  createVNode(_sfc_main$$, {