@getlupa/client 0.7.0-alpha-11 → 0.7.0-alpha-14

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.
@@ -4,4 +4,6 @@ export default class SearchResultGeneratedBadge extends Vue {
4
4
  options: BadgeOptions;
5
5
  badge: BadgeGenerateSeed;
6
6
  get image(): string | undefined;
7
+ get hasAdditionalText(): boolean;
8
+ get hasTitleText(): boolean;
7
9
  }
@@ -16774,9 +16774,18 @@ __vue_render__$A._withStripped = true;
16774
16774
  let SearchResultGeneratedBadge = class SearchResultGeneratedBadge extends Vue$1 {
16775
16775
  get image() {
16776
16776
  var _a, _b, _c;
16777
- console.log(this.badge.titleText);
16778
16777
  return (_c = (_b = (_a = this.options.generate) === null || _a === void 0 ? void 0 : _a.image) === null || _b === void 0 ? void 0 : _b.call(_a, this.badge)) !== null && _c !== void 0 ? _c : "";
16779
16778
  }
16779
+ get hasAdditionalText() {
16780
+ var _a, _b;
16781
+ return (Boolean((_a = this.badge) === null || _a === void 0 ? void 0 : _a.additionalText) &&
16782
+ typeof ((_b = this.badge) === null || _b === void 0 ? void 0 : _b.additionalText) === "string");
16783
+ }
16784
+ get hasTitleText() {
16785
+ var _a, _b;
16786
+ return (Boolean((_a = this.badge) === null || _a === void 0 ? void 0 : _a.titleText) &&
16787
+ typeof ((_b = this.badge) === null || _b === void 0 ? void 0 : _b.titleText) === "string");
16788
+ }
16780
16789
  };
16781
16790
  __decorate([
16782
16791
  Prop({ default: () => ({}) })
@@ -16808,11 +16817,11 @@ var __vue_render__$z = function () {
16808
16817
  [
16809
16818
  _c("span", { staticClass: "lupa-badge-title" }, [
16810
16819
  _vm.image ? _c("img", { attrs: { src: _vm.image } }) : _vm._e(),
16811
- _vm.badge.titleText
16820
+ _vm.hasTitleText
16812
16821
  ? _c("span", [_vm._v("\n " + _vm._s(_vm.badge.titleText))])
16813
16822
  : _vm._e(),
16814
16823
  ]),
16815
- _vm.badge.additionalText
16824
+ _vm.hasAdditionalText
16816
16825
  ? _c("span", { staticClass: "lupa-badge-full-text" }, [
16817
16826
  _vm._v(_vm._s(_vm.badge.additionalText)),
16818
16827
  ])
@@ -16874,7 +16883,9 @@ let SearchResultGeneratedBadges = class SearchResultGeneratedBadges extends Vue$
16874
16883
  this.badgeField.length > 0);
16875
16884
  }
16876
16885
  get badges() {
16877
- return this.badgeField.map((f) => ({
16886
+ return this.badgeField
16887
+ .filter((f) => Boolean(f))
16888
+ .map((f) => ({
16878
16889
  backgroundColor: this.keyMap.backgroundColor
16879
16890
  ? f[this.keyMap.backgroundColor]
16880
16891
  : undefined,
@@ -16884,7 +16895,8 @@ let SearchResultGeneratedBadges = class SearchResultGeneratedBadges extends Vue$
16884
16895
  ? f[this.keyMap.additionalText]
16885
16896
  : undefined,
16886
16897
  id: this.keyMap.id ? f[this.keyMap.id] : undefined,
16887
- }));
16898
+ }))
16899
+ .filter((b) => Boolean(b.id));
16888
16900
  }
16889
16901
  };
16890
16902
  __decorate([
@@ -18072,7 +18084,7 @@ __decorate([
18072
18084
  options$6.Getter("searchResultsRoutingBehavior")
18073
18085
  ], SearchResultsProductCard.prototype, "searchResultsRoutingBehavior", void 0);
18074
18086
  __decorate([
18075
- options$6.Getter("searchResultOptions")
18087
+ options$6.State((o) => o.searchResultOptions)
18076
18088
  ], SearchResultsProductCard.prototype, "searchResultOptions", void 0);
18077
18089
  __decorate([
18078
18090
  params$9.Getter("query")
@@ -4,4 +4,6 @@ export default class SearchResultGeneratedBadge extends Vue {
4
4
  options: BadgeOptions;
5
5
  badge: BadgeGenerateSeed;
6
6
  get image(): string | undefined;
7
+ get hasAdditionalText(): boolean;
8
+ get hasTitleText(): boolean;
7
9
  }
@@ -16770,9 +16770,18 @@ __vue_render__$A._withStripped = true;
16770
16770
  let SearchResultGeneratedBadge = class SearchResultGeneratedBadge extends Vue$1 {
16771
16771
  get image() {
16772
16772
  var _a, _b, _c;
16773
- console.log(this.badge.titleText);
16774
16773
  return (_c = (_b = (_a = this.options.generate) === null || _a === void 0 ? void 0 : _a.image) === null || _b === void 0 ? void 0 : _b.call(_a, this.badge)) !== null && _c !== void 0 ? _c : "";
16775
16774
  }
16775
+ get hasAdditionalText() {
16776
+ var _a, _b;
16777
+ return (Boolean((_a = this.badge) === null || _a === void 0 ? void 0 : _a.additionalText) &&
16778
+ typeof ((_b = this.badge) === null || _b === void 0 ? void 0 : _b.additionalText) === "string");
16779
+ }
16780
+ get hasTitleText() {
16781
+ var _a, _b;
16782
+ return (Boolean((_a = this.badge) === null || _a === void 0 ? void 0 : _a.titleText) &&
16783
+ typeof ((_b = this.badge) === null || _b === void 0 ? void 0 : _b.titleText) === "string");
16784
+ }
16776
16785
  };
16777
16786
  __decorate([
16778
16787
  Prop({ default: () => ({}) })
@@ -16804,11 +16813,11 @@ var __vue_render__$z = function () {
16804
16813
  [
16805
16814
  _c("span", { staticClass: "lupa-badge-title" }, [
16806
16815
  _vm.image ? _c("img", { attrs: { src: _vm.image } }) : _vm._e(),
16807
- _vm.badge.titleText
16816
+ _vm.hasTitleText
16808
16817
  ? _c("span", [_vm._v("\n " + _vm._s(_vm.badge.titleText))])
16809
16818
  : _vm._e(),
16810
16819
  ]),
16811
- _vm.badge.additionalText
16820
+ _vm.hasAdditionalText
16812
16821
  ? _c("span", { staticClass: "lupa-badge-full-text" }, [
16813
16822
  _vm._v(_vm._s(_vm.badge.additionalText)),
16814
16823
  ])
@@ -16870,7 +16879,9 @@ let SearchResultGeneratedBadges = class SearchResultGeneratedBadges extends Vue$
16870
16879
  this.badgeField.length > 0);
16871
16880
  }
16872
16881
  get badges() {
16873
- return this.badgeField.map((f) => ({
16882
+ return this.badgeField
16883
+ .filter((f) => Boolean(f))
16884
+ .map((f) => ({
16874
16885
  backgroundColor: this.keyMap.backgroundColor
16875
16886
  ? f[this.keyMap.backgroundColor]
16876
16887
  : undefined,
@@ -16880,7 +16891,8 @@ let SearchResultGeneratedBadges = class SearchResultGeneratedBadges extends Vue$
16880
16891
  ? f[this.keyMap.additionalText]
16881
16892
  : undefined,
16882
16893
  id: this.keyMap.id ? f[this.keyMap.id] : undefined,
16883
- }));
16894
+ }))
16895
+ .filter((b) => Boolean(b.id));
16884
16896
  }
16885
16897
  };
16886
16898
  __decorate([
@@ -18068,7 +18080,7 @@ __decorate([
18068
18080
  options$6.Getter("searchResultsRoutingBehavior")
18069
18081
  ], SearchResultsProductCard.prototype, "searchResultsRoutingBehavior", void 0);
18070
18082
  __decorate([
18071
- options$6.Getter("searchResultOptions")
18083
+ options$6.State((o) => o.searchResultOptions)
18072
18084
  ], SearchResultsProductCard.prototype, "searchResultOptions", void 0);
18073
18085
  __decorate([
18074
18086
  params$9.Getter("query")
@@ -4,4 +4,6 @@ export default class SearchResultGeneratedBadge extends Vue {
4
4
  options: BadgeOptions;
5
5
  badge: BadgeGenerateSeed;
6
6
  get image(): string | undefined;
7
+ get hasAdditionalText(): boolean;
8
+ get hasTitleText(): boolean;
7
9
  }