@getlupa/client 1.8.4 → 1.8.5

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.
@@ -27601,7 +27601,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
27601
27601
  callbacks,
27602
27602
  additionalFields
27603
27603
  }) => {
27604
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A;
27604
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
27605
27605
  const filters = searchResultOptions.showFacets ? {
27606
27606
  currentFilters: {
27607
27607
  visibility: {
@@ -27654,7 +27654,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
27654
27654
  badges: {
27655
27655
  anchor: "tr",
27656
27656
  elements: [
27657
- ...searchResultOptions.showRelevance && [
27657
+ ...searchResultOptions.showRelevance ? [
27658
27658
  {
27659
27659
  key: "",
27660
27660
  type: "customHtml",
@@ -27662,8 +27662,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
27662
27662
  html: (doc2) => `${toMaxDecimalPlaces(escapeHtml(doc2._relevance), 3)}`,
27663
27663
  display: (doc2) => Boolean(doc2._relevance !== void 0)
27664
27664
  }
27665
- ],
27666
- ...((_m = (_l = searchResultOptions.boostedMarker) == null ? void 0 : _l.enabled) != null ? _m : false) && [
27665
+ ] : [],
27666
+ ...((_l = searchResultOptions.boostedMarker) == null ? void 0 : _l.enabled) ? [
27667
27667
  {
27668
27668
  key: "",
27669
27669
  type: "customHtml",
@@ -27674,13 +27674,13 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
27674
27674
  },
27675
27675
  display: (doc2) => doc2._boosted === true
27676
27676
  }
27677
- ]
27677
+ ] : []
27678
27678
  ]
27679
27679
  }
27680
27680
  };
27681
27681
  return __spreadValues(__spreadProps(__spreadValues({
27682
27682
  options: {
27683
- environment: (_n = searchResultOptions.environment) != null ? _n : "production",
27683
+ environment: (_m = searchResultOptions.environment) != null ? _m : "production",
27684
27684
  customUrl: searchResultOptions.customUrl,
27685
27685
  customBaseUrl: searchResultOptions.customBaseUrl,
27686
27686
  customPayload: searchResultOptions.customPayload,
@@ -27690,7 +27690,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
27690
27690
  queryKey: searchResultOptions.queryKey,
27691
27691
  containerSelector: searchResultOptions.containerSelector,
27692
27692
  searchTitlePosition: "search-results-top",
27693
- titleKey: (_o = searchResultOptions.fields) == null ? void 0 : _o.titleKey,
27693
+ titleKey: (_n = searchResultOptions.fields) == null ? void 0 : _n.titleKey,
27694
27694
  labels: labels == null ? void 0 : labels.searchResults,
27695
27695
  grid: {
27696
27696
  columns
@@ -27723,7 +27723,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
27723
27723
  }
27724
27724
  }, badges), {
27725
27725
  links: {
27726
- details: ((_p = searchResultOptions.fields) == null ? void 0 : _p.productUrl) ? `{${(_q = searchResultOptions.fields) == null ? void 0 : _q.productUrl}}` : void 0
27726
+ details: ((_o = searchResultOptions.fields) == null ? void 0 : _o.productUrl) ? `{${(_p = searchResultOptions.fields) == null ? void 0 : _p.productUrl}}` : void 0
27727
27727
  },
27728
27728
  callbacks,
27729
27729
  routingBehavior: callbacks ? "event" : "direct-link",
@@ -27732,31 +27732,31 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
27732
27732
  {
27733
27733
  type: "image",
27734
27734
  placeholder: placeholderImage,
27735
- key: (_r = searchResultOptions.fields) == null ? void 0 : _r.imageKey,
27736
- baseUrl: (_s = searchResultOptions.fields) == null ? void 0 : _s.baseImageUrl,
27735
+ key: (_q = searchResultOptions.fields) == null ? void 0 : _q.imageKey,
27736
+ baseUrl: (_r = searchResultOptions.fields) == null ? void 0 : _r.baseImageUrl,
27737
27737
  display: () => {
27738
27738
  var _a2;
27739
27739
  return (_a2 = searchResultOptions.fields) == null ? void 0 : _a2.imageKey;
27740
27740
  }
27741
27741
  },
27742
- addFieldIfKeyExists("_emphasis", (_t = searchResultOptions.fields) == null ? void 0 : _t.emphasizedField, {
27742
+ addFieldIfKeyExists("_emphasis", (_s = searchResultOptions.fields) == null ? void 0 : _s.emphasizedField, {
27743
27743
  type: "custom",
27744
27744
  className: "lupa-custom-emphasis",
27745
- key: (_u = searchResultOptions.fields) == null ? void 0 : _u.emphasizedField,
27745
+ key: (_t = searchResultOptions.fields) == null ? void 0 : _t.emphasizedField,
27746
27746
  display: () => true
27747
27747
  }),
27748
27748
  {
27749
27749
  type: "title",
27750
- key: (_v = searchResultOptions.fields) == null ? void 0 : _v.titleKey,
27751
- maxLines: (_w = searchResultOptions.maxLines) != null ? _w : 2,
27750
+ key: (_u = searchResultOptions.fields) == null ? void 0 : _u.titleKey,
27751
+ maxLines: (_v = searchResultOptions.maxLines) != null ? _v : 2,
27752
27752
  display: (doc2) => {
27753
27753
  var _a2, _b2;
27754
27754
  return ((_a2 = searchResultOptions.fields) == null ? void 0 : _a2.titleKey) && Boolean(doc2[(_b2 = searchResultOptions.fields) == null ? void 0 : _b2.titleKey]);
27755
27755
  }
27756
27756
  },
27757
27757
  ...getAdditionalElements(additionalFields),
27758
- addFieldIfKeyExists("_discountPrice", (_x = searchResultOptions.fields) == null ? void 0 : _x.discountPriceKey, {
27759
- key: (_y = searchResultOptions.fields) == null ? void 0 : _y.discountPriceKey,
27758
+ addFieldIfKeyExists("_discountPrice", (_w = searchResultOptions.fields) == null ? void 0 : _w.discountPriceKey, {
27759
+ key: (_x = searchResultOptions.fields) == null ? void 0 : _x.discountPriceKey,
27760
27760
  type: "customHtml",
27761
27761
  className: "lupa-price lupa-price-discounted",
27762
27762
  display: (doc2) => displayDiscountedPriceSection(doc2, searchResultOptions),
@@ -27778,8 +27778,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
27778
27778
  return discount + regular;
27779
27779
  }
27780
27780
  }),
27781
- addFieldIfKeyExists("_regularPrice", (_z = searchResultOptions.fields) == null ? void 0 : _z.regularPriceKey, {
27782
- key: (_A = searchResultOptions.fields) == null ? void 0 : _A.regularPriceKey,
27781
+ addFieldIfKeyExists("_regularPrice", (_y = searchResultOptions.fields) == null ? void 0 : _y.regularPriceKey, {
27782
+ key: (_z = searchResultOptions.fields) == null ? void 0 : _z.regularPriceKey,
27783
27783
  type: "customHtml",
27784
27784
  className: "lupa-price lupa-price-single",
27785
27785
  display: (doc2) => displayRegularPriceSection(doc2, searchResultOptions),
@@ -27601,7 +27601,7 @@ const getSearchResultsComponent = ({
27601
27601
  callbacks,
27602
27602
  additionalFields
27603
27603
  }) => {
27604
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A;
27604
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
27605
27605
  const filters = searchResultOptions.showFacets ? {
27606
27606
  currentFilters: {
27607
27607
  visibility: {
@@ -27654,7 +27654,7 @@ const getSearchResultsComponent = ({
27654
27654
  badges: {
27655
27655
  anchor: "tr",
27656
27656
  elements: [
27657
- ...searchResultOptions.showRelevance && [
27657
+ ...searchResultOptions.showRelevance ? [
27658
27658
  {
27659
27659
  key: "",
27660
27660
  type: "customHtml",
@@ -27662,8 +27662,8 @@ const getSearchResultsComponent = ({
27662
27662
  html: (doc2) => `${toMaxDecimalPlaces(escapeHtml(doc2._relevance), 3)}`,
27663
27663
  display: (doc2) => Boolean(doc2._relevance !== void 0)
27664
27664
  }
27665
- ],
27666
- ...((_m = (_l = searchResultOptions.boostedMarker) == null ? void 0 : _l.enabled) != null ? _m : false) && [
27665
+ ] : [],
27666
+ ...((_l = searchResultOptions.boostedMarker) == null ? void 0 : _l.enabled) ? [
27667
27667
  {
27668
27668
  key: "",
27669
27669
  type: "customHtml",
@@ -27674,13 +27674,13 @@ const getSearchResultsComponent = ({
27674
27674
  },
27675
27675
  display: (doc2) => doc2._boosted === true
27676
27676
  }
27677
- ]
27677
+ ] : []
27678
27678
  ]
27679
27679
  }
27680
27680
  };
27681
27681
  return __spreadValues(__spreadProps(__spreadValues({
27682
27682
  options: {
27683
- environment: (_n = searchResultOptions.environment) != null ? _n : "production",
27683
+ environment: (_m = searchResultOptions.environment) != null ? _m : "production",
27684
27684
  customUrl: searchResultOptions.customUrl,
27685
27685
  customBaseUrl: searchResultOptions.customBaseUrl,
27686
27686
  customPayload: searchResultOptions.customPayload,
@@ -27690,7 +27690,7 @@ const getSearchResultsComponent = ({
27690
27690
  queryKey: searchResultOptions.queryKey,
27691
27691
  containerSelector: searchResultOptions.containerSelector,
27692
27692
  searchTitlePosition: "search-results-top",
27693
- titleKey: (_o = searchResultOptions.fields) == null ? void 0 : _o.titleKey,
27693
+ titleKey: (_n = searchResultOptions.fields) == null ? void 0 : _n.titleKey,
27694
27694
  labels: labels == null ? void 0 : labels.searchResults,
27695
27695
  grid: {
27696
27696
  columns
@@ -27723,7 +27723,7 @@ const getSearchResultsComponent = ({
27723
27723
  }
27724
27724
  }, badges), {
27725
27725
  links: {
27726
- details: ((_p = searchResultOptions.fields) == null ? void 0 : _p.productUrl) ? `{${(_q = searchResultOptions.fields) == null ? void 0 : _q.productUrl}}` : void 0
27726
+ details: ((_o = searchResultOptions.fields) == null ? void 0 : _o.productUrl) ? `{${(_p = searchResultOptions.fields) == null ? void 0 : _p.productUrl}}` : void 0
27727
27727
  },
27728
27728
  callbacks,
27729
27729
  routingBehavior: callbacks ? "event" : "direct-link",
@@ -27732,31 +27732,31 @@ const getSearchResultsComponent = ({
27732
27732
  {
27733
27733
  type: "image",
27734
27734
  placeholder: placeholderImage,
27735
- key: (_r = searchResultOptions.fields) == null ? void 0 : _r.imageKey,
27736
- baseUrl: (_s = searchResultOptions.fields) == null ? void 0 : _s.baseImageUrl,
27735
+ key: (_q = searchResultOptions.fields) == null ? void 0 : _q.imageKey,
27736
+ baseUrl: (_r = searchResultOptions.fields) == null ? void 0 : _r.baseImageUrl,
27737
27737
  display: () => {
27738
27738
  var _a2;
27739
27739
  return (_a2 = searchResultOptions.fields) == null ? void 0 : _a2.imageKey;
27740
27740
  }
27741
27741
  },
27742
- addFieldIfKeyExists("_emphasis", (_t = searchResultOptions.fields) == null ? void 0 : _t.emphasizedField, {
27742
+ addFieldIfKeyExists("_emphasis", (_s = searchResultOptions.fields) == null ? void 0 : _s.emphasizedField, {
27743
27743
  type: "custom",
27744
27744
  className: "lupa-custom-emphasis",
27745
- key: (_u = searchResultOptions.fields) == null ? void 0 : _u.emphasizedField,
27745
+ key: (_t = searchResultOptions.fields) == null ? void 0 : _t.emphasizedField,
27746
27746
  display: () => true
27747
27747
  }),
27748
27748
  {
27749
27749
  type: "title",
27750
- key: (_v = searchResultOptions.fields) == null ? void 0 : _v.titleKey,
27751
- maxLines: (_w = searchResultOptions.maxLines) != null ? _w : 2,
27750
+ key: (_u = searchResultOptions.fields) == null ? void 0 : _u.titleKey,
27751
+ maxLines: (_v = searchResultOptions.maxLines) != null ? _v : 2,
27752
27752
  display: (doc2) => {
27753
27753
  var _a2, _b2;
27754
27754
  return ((_a2 = searchResultOptions.fields) == null ? void 0 : _a2.titleKey) && Boolean(doc2[(_b2 = searchResultOptions.fields) == null ? void 0 : _b2.titleKey]);
27755
27755
  }
27756
27756
  },
27757
27757
  ...getAdditionalElements(additionalFields),
27758
- addFieldIfKeyExists("_discountPrice", (_x = searchResultOptions.fields) == null ? void 0 : _x.discountPriceKey, {
27759
- key: (_y = searchResultOptions.fields) == null ? void 0 : _y.discountPriceKey,
27758
+ addFieldIfKeyExists("_discountPrice", (_w = searchResultOptions.fields) == null ? void 0 : _w.discountPriceKey, {
27759
+ key: (_x = searchResultOptions.fields) == null ? void 0 : _x.discountPriceKey,
27760
27760
  type: "customHtml",
27761
27761
  className: "lupa-price lupa-price-discounted",
27762
27762
  display: (doc2) => displayDiscountedPriceSection(doc2, searchResultOptions),
@@ -27778,8 +27778,8 @@ const getSearchResultsComponent = ({
27778
27778
  return discount + regular;
27779
27779
  }
27780
27780
  }),
27781
- addFieldIfKeyExists("_regularPrice", (_z = searchResultOptions.fields) == null ? void 0 : _z.regularPriceKey, {
27782
- key: (_A = searchResultOptions.fields) == null ? void 0 : _A.regularPriceKey,
27781
+ addFieldIfKeyExists("_regularPrice", (_y = searchResultOptions.fields) == null ? void 0 : _y.regularPriceKey, {
27782
+ key: (_z = searchResultOptions.fields) == null ? void 0 : _z.regularPriceKey,
27783
27783
  type: "customHtml",
27784
27784
  className: "lupa-price lupa-price-single",
27785
27785
  display: (doc2) => displayRegularPriceSection(doc2, searchResultOptions),
@@ -27599,7 +27599,7 @@ const getSearchResultsComponent = ({
27599
27599
  callbacks,
27600
27600
  additionalFields
27601
27601
  }) => {
27602
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A;
27602
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
27603
27603
  const filters = searchResultOptions.showFacets ? {
27604
27604
  currentFilters: {
27605
27605
  visibility: {
@@ -27652,7 +27652,7 @@ const getSearchResultsComponent = ({
27652
27652
  badges: {
27653
27653
  anchor: "tr",
27654
27654
  elements: [
27655
- ...searchResultOptions.showRelevance && [
27655
+ ...searchResultOptions.showRelevance ? [
27656
27656
  {
27657
27657
  key: "",
27658
27658
  type: "customHtml",
@@ -27660,8 +27660,8 @@ const getSearchResultsComponent = ({
27660
27660
  html: (doc2) => `${toMaxDecimalPlaces(escapeHtml(doc2._relevance), 3)}`,
27661
27661
  display: (doc2) => Boolean(doc2._relevance !== void 0)
27662
27662
  }
27663
- ],
27664
- ...((_m = (_l = searchResultOptions.boostedMarker) == null ? void 0 : _l.enabled) != null ? _m : false) && [
27663
+ ] : [],
27664
+ ...((_l = searchResultOptions.boostedMarker) == null ? void 0 : _l.enabled) ? [
27665
27665
  {
27666
27666
  key: "",
27667
27667
  type: "customHtml",
@@ -27672,13 +27672,13 @@ const getSearchResultsComponent = ({
27672
27672
  },
27673
27673
  display: (doc2) => doc2._boosted === true
27674
27674
  }
27675
- ]
27675
+ ] : []
27676
27676
  ]
27677
27677
  }
27678
27678
  };
27679
27679
  return __spreadValues(__spreadProps(__spreadValues({
27680
27680
  options: {
27681
- environment: (_n = searchResultOptions.environment) != null ? _n : "production",
27681
+ environment: (_m = searchResultOptions.environment) != null ? _m : "production",
27682
27682
  customUrl: searchResultOptions.customUrl,
27683
27683
  customBaseUrl: searchResultOptions.customBaseUrl,
27684
27684
  customPayload: searchResultOptions.customPayload,
@@ -27688,7 +27688,7 @@ const getSearchResultsComponent = ({
27688
27688
  queryKey: searchResultOptions.queryKey,
27689
27689
  containerSelector: searchResultOptions.containerSelector,
27690
27690
  searchTitlePosition: "search-results-top",
27691
- titleKey: (_o = searchResultOptions.fields) == null ? void 0 : _o.titleKey,
27691
+ titleKey: (_n = searchResultOptions.fields) == null ? void 0 : _n.titleKey,
27692
27692
  labels: labels == null ? void 0 : labels.searchResults,
27693
27693
  grid: {
27694
27694
  columns
@@ -27721,7 +27721,7 @@ const getSearchResultsComponent = ({
27721
27721
  }
27722
27722
  }, badges), {
27723
27723
  links: {
27724
- details: ((_p = searchResultOptions.fields) == null ? void 0 : _p.productUrl) ? `{${(_q = searchResultOptions.fields) == null ? void 0 : _q.productUrl}}` : void 0
27724
+ details: ((_o = searchResultOptions.fields) == null ? void 0 : _o.productUrl) ? `{${(_p = searchResultOptions.fields) == null ? void 0 : _p.productUrl}}` : void 0
27725
27725
  },
27726
27726
  callbacks,
27727
27727
  routingBehavior: callbacks ? "event" : "direct-link",
@@ -27730,31 +27730,31 @@ const getSearchResultsComponent = ({
27730
27730
  {
27731
27731
  type: "image",
27732
27732
  placeholder: placeholderImage,
27733
- key: (_r = searchResultOptions.fields) == null ? void 0 : _r.imageKey,
27734
- baseUrl: (_s = searchResultOptions.fields) == null ? void 0 : _s.baseImageUrl,
27733
+ key: (_q = searchResultOptions.fields) == null ? void 0 : _q.imageKey,
27734
+ baseUrl: (_r = searchResultOptions.fields) == null ? void 0 : _r.baseImageUrl,
27735
27735
  display: () => {
27736
27736
  var _a2;
27737
27737
  return (_a2 = searchResultOptions.fields) == null ? void 0 : _a2.imageKey;
27738
27738
  }
27739
27739
  },
27740
- addFieldIfKeyExists("_emphasis", (_t = searchResultOptions.fields) == null ? void 0 : _t.emphasizedField, {
27740
+ addFieldIfKeyExists("_emphasis", (_s = searchResultOptions.fields) == null ? void 0 : _s.emphasizedField, {
27741
27741
  type: "custom",
27742
27742
  className: "lupa-custom-emphasis",
27743
- key: (_u = searchResultOptions.fields) == null ? void 0 : _u.emphasizedField,
27743
+ key: (_t = searchResultOptions.fields) == null ? void 0 : _t.emphasizedField,
27744
27744
  display: () => true
27745
27745
  }),
27746
27746
  {
27747
27747
  type: "title",
27748
- key: (_v = searchResultOptions.fields) == null ? void 0 : _v.titleKey,
27749
- maxLines: (_w = searchResultOptions.maxLines) != null ? _w : 2,
27748
+ key: (_u = searchResultOptions.fields) == null ? void 0 : _u.titleKey,
27749
+ maxLines: (_v = searchResultOptions.maxLines) != null ? _v : 2,
27750
27750
  display: (doc2) => {
27751
27751
  var _a2, _b2;
27752
27752
  return ((_a2 = searchResultOptions.fields) == null ? void 0 : _a2.titleKey) && Boolean(doc2[(_b2 = searchResultOptions.fields) == null ? void 0 : _b2.titleKey]);
27753
27753
  }
27754
27754
  },
27755
27755
  ...getAdditionalElements(additionalFields),
27756
- addFieldIfKeyExists("_discountPrice", (_x = searchResultOptions.fields) == null ? void 0 : _x.discountPriceKey, {
27757
- key: (_y = searchResultOptions.fields) == null ? void 0 : _y.discountPriceKey,
27756
+ addFieldIfKeyExists("_discountPrice", (_w = searchResultOptions.fields) == null ? void 0 : _w.discountPriceKey, {
27757
+ key: (_x = searchResultOptions.fields) == null ? void 0 : _x.discountPriceKey,
27758
27758
  type: "customHtml",
27759
27759
  className: "lupa-price lupa-price-discounted",
27760
27760
  display: (doc2) => displayDiscountedPriceSection(doc2, searchResultOptions),
@@ -27776,8 +27776,8 @@ const getSearchResultsComponent = ({
27776
27776
  return discount + regular;
27777
27777
  }
27778
27778
  }),
27779
- addFieldIfKeyExists("_regularPrice", (_z = searchResultOptions.fields) == null ? void 0 : _z.regularPriceKey, {
27780
- key: (_A = searchResultOptions.fields) == null ? void 0 : _A.regularPriceKey,
27779
+ addFieldIfKeyExists("_regularPrice", (_y = searchResultOptions.fields) == null ? void 0 : _y.regularPriceKey, {
27780
+ key: (_z = searchResultOptions.fields) == null ? void 0 : _z.regularPriceKey,
27781
27781
  type: "customHtml",
27782
27782
  className: "lupa-price lupa-price-single",
27783
27783
  display: (doc2) => displayRegularPriceSection(doc2, searchResultOptions),
@@ -27603,7 +27603,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
27603
27603
  callbacks,
27604
27604
  additionalFields
27605
27605
  }) => {
27606
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A;
27606
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
27607
27607
  const filters = searchResultOptions.showFacets ? {
27608
27608
  currentFilters: {
27609
27609
  visibility: {
@@ -27656,7 +27656,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
27656
27656
  badges: {
27657
27657
  anchor: "tr",
27658
27658
  elements: [
27659
- ...searchResultOptions.showRelevance && [
27659
+ ...searchResultOptions.showRelevance ? [
27660
27660
  {
27661
27661
  key: "",
27662
27662
  type: "customHtml",
@@ -27664,8 +27664,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
27664
27664
  html: (doc2) => `${toMaxDecimalPlaces(escapeHtml(doc2._relevance), 3)}`,
27665
27665
  display: (doc2) => Boolean(doc2._relevance !== void 0)
27666
27666
  }
27667
- ],
27668
- ...((_m = (_l = searchResultOptions.boostedMarker) == null ? void 0 : _l.enabled) != null ? _m : false) && [
27667
+ ] : [],
27668
+ ...((_l = searchResultOptions.boostedMarker) == null ? void 0 : _l.enabled) ? [
27669
27669
  {
27670
27670
  key: "",
27671
27671
  type: "customHtml",
@@ -27676,13 +27676,13 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
27676
27676
  },
27677
27677
  display: (doc2) => doc2._boosted === true
27678
27678
  }
27679
- ]
27679
+ ] : []
27680
27680
  ]
27681
27681
  }
27682
27682
  };
27683
27683
  return __spreadValues(__spreadProps(__spreadValues({
27684
27684
  options: {
27685
- environment: (_n = searchResultOptions.environment) != null ? _n : "production",
27685
+ environment: (_m = searchResultOptions.environment) != null ? _m : "production",
27686
27686
  customUrl: searchResultOptions.customUrl,
27687
27687
  customBaseUrl: searchResultOptions.customBaseUrl,
27688
27688
  customPayload: searchResultOptions.customPayload,
@@ -27692,7 +27692,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
27692
27692
  queryKey: searchResultOptions.queryKey,
27693
27693
  containerSelector: searchResultOptions.containerSelector,
27694
27694
  searchTitlePosition: "search-results-top",
27695
- titleKey: (_o = searchResultOptions.fields) == null ? void 0 : _o.titleKey,
27695
+ titleKey: (_n = searchResultOptions.fields) == null ? void 0 : _n.titleKey,
27696
27696
  labels: labels == null ? void 0 : labels.searchResults,
27697
27697
  grid: {
27698
27698
  columns
@@ -27725,7 +27725,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
27725
27725
  }
27726
27726
  }, badges), {
27727
27727
  links: {
27728
- details: ((_p = searchResultOptions.fields) == null ? void 0 : _p.productUrl) ? `{${(_q = searchResultOptions.fields) == null ? void 0 : _q.productUrl}}` : void 0
27728
+ details: ((_o = searchResultOptions.fields) == null ? void 0 : _o.productUrl) ? `{${(_p = searchResultOptions.fields) == null ? void 0 : _p.productUrl}}` : void 0
27729
27729
  },
27730
27730
  callbacks,
27731
27731
  routingBehavior: callbacks ? "event" : "direct-link",
@@ -27734,31 +27734,31 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
27734
27734
  {
27735
27735
  type: "image",
27736
27736
  placeholder: placeholderImage,
27737
- key: (_r = searchResultOptions.fields) == null ? void 0 : _r.imageKey,
27738
- baseUrl: (_s = searchResultOptions.fields) == null ? void 0 : _s.baseImageUrl,
27737
+ key: (_q = searchResultOptions.fields) == null ? void 0 : _q.imageKey,
27738
+ baseUrl: (_r = searchResultOptions.fields) == null ? void 0 : _r.baseImageUrl,
27739
27739
  display: () => {
27740
27740
  var _a2;
27741
27741
  return (_a2 = searchResultOptions.fields) == null ? void 0 : _a2.imageKey;
27742
27742
  }
27743
27743
  },
27744
- addFieldIfKeyExists("_emphasis", (_t = searchResultOptions.fields) == null ? void 0 : _t.emphasizedField, {
27744
+ addFieldIfKeyExists("_emphasis", (_s = searchResultOptions.fields) == null ? void 0 : _s.emphasizedField, {
27745
27745
  type: "custom",
27746
27746
  className: "lupa-custom-emphasis",
27747
- key: (_u = searchResultOptions.fields) == null ? void 0 : _u.emphasizedField,
27747
+ key: (_t = searchResultOptions.fields) == null ? void 0 : _t.emphasizedField,
27748
27748
  display: () => true
27749
27749
  }),
27750
27750
  {
27751
27751
  type: "title",
27752
- key: (_v = searchResultOptions.fields) == null ? void 0 : _v.titleKey,
27753
- maxLines: (_w = searchResultOptions.maxLines) != null ? _w : 2,
27752
+ key: (_u = searchResultOptions.fields) == null ? void 0 : _u.titleKey,
27753
+ maxLines: (_v = searchResultOptions.maxLines) != null ? _v : 2,
27754
27754
  display: (doc2) => {
27755
27755
  var _a2, _b2;
27756
27756
  return ((_a2 = searchResultOptions.fields) == null ? void 0 : _a2.titleKey) && Boolean(doc2[(_b2 = searchResultOptions.fields) == null ? void 0 : _b2.titleKey]);
27757
27757
  }
27758
27758
  },
27759
27759
  ...getAdditionalElements(additionalFields),
27760
- addFieldIfKeyExists("_discountPrice", (_x = searchResultOptions.fields) == null ? void 0 : _x.discountPriceKey, {
27761
- key: (_y = searchResultOptions.fields) == null ? void 0 : _y.discountPriceKey,
27760
+ addFieldIfKeyExists("_discountPrice", (_w = searchResultOptions.fields) == null ? void 0 : _w.discountPriceKey, {
27761
+ key: (_x = searchResultOptions.fields) == null ? void 0 : _x.discountPriceKey,
27762
27762
  type: "customHtml",
27763
27763
  className: "lupa-price lupa-price-discounted",
27764
27764
  display: (doc2) => displayDiscountedPriceSection(doc2, searchResultOptions),
@@ -27780,8 +27780,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
27780
27780
  return discount + regular;
27781
27781
  }
27782
27782
  }),
27783
- addFieldIfKeyExists("_regularPrice", (_z = searchResultOptions.fields) == null ? void 0 : _z.regularPriceKey, {
27784
- key: (_A = searchResultOptions.fields) == null ? void 0 : _A.regularPriceKey,
27783
+ addFieldIfKeyExists("_regularPrice", (_y = searchResultOptions.fields) == null ? void 0 : _y.regularPriceKey, {
27784
+ key: (_z = searchResultOptions.fields) == null ? void 0 : _z.regularPriceKey,
27785
27785
  type: "customHtml",
27786
27786
  className: "lupa-price lupa-price-single",
27787
27787
  display: (doc2) => displayRegularPriceSection(doc2, searchResultOptions),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlupa/client",
3
- "version": "1.8.4",
3
+ "version": "1.8.5",
4
4
  "main": "dist/lupaSearch.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/src/index.d.ts",