@getlupa/client 0.7.0-alpha-22 → 0.7.0-alpha-23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/search-results/products/product-card/badges/SearchResultsBadgeWrapper.vue.d.ts +2 -2
- package/dist/cjs/index.min.js +13 -19
- package/dist/cjs/types/search-results/BadgeOptions.d.ts +1 -1
- package/dist/es/components/search-results/products/product-card/badges/SearchResultsBadgeWrapper.vue.d.ts +2 -2
- package/dist/es/index.min.js +13 -19
- package/dist/es/types/search-results/BadgeOptions.d.ts +1 -1
- package/dist/iife/components/search-results/products/product-card/badges/SearchResultsBadgeWrapper.vue.d.ts +2 -2
- package/dist/iife/index.min.js +1 -1
- package/dist/iife/types/search-results/BadgeOptions.d.ts +1 -1
- package/package.json +1 -1
|
@@ -2,10 +2,10 @@ import { BadgeElement, BadgeOptions } from "@/types/search-results/BadgeOptions"
|
|
|
2
2
|
import { AnchorPosition } from "@/types/search-results/SearchResultsProductCardOptions";
|
|
3
3
|
import Vue from "vue";
|
|
4
4
|
export default class SearchResultsBadgeWrapper extends Vue {
|
|
5
|
+
position: "card" | "image";
|
|
5
6
|
options: BadgeOptions;
|
|
6
7
|
get anchorPosition(): AnchorPosition;
|
|
7
8
|
get badges(): BadgeElement[];
|
|
8
|
-
get
|
|
9
|
-
get bottomBadges(): BadgeElement[];
|
|
9
|
+
get displayBadges(): BadgeElement[];
|
|
10
10
|
getBadgeComponent(type: string): string;
|
|
11
11
|
}
|
package/dist/cjs/index.min.js
CHANGED
|
@@ -16986,11 +16986,10 @@ let SearchResultsBadgeWrapper = class SearchResultsBadgeWrapper extends Vue$1 {
|
|
|
16986
16986
|
return Object.assign(Object.assign({}, x), { value: ((_a = this.options.product) === null || _a === void 0 ? void 0 : _a[x.key]) || "badge", product: this.options.product });
|
|
16987
16987
|
});
|
|
16988
16988
|
}
|
|
16989
|
-
get
|
|
16990
|
-
return this.
|
|
16991
|
-
|
|
16992
|
-
|
|
16993
|
-
return this.badges.filter((b) => b.position === "bottom");
|
|
16989
|
+
get displayBadges() {
|
|
16990
|
+
return this.position === "card"
|
|
16991
|
+
? this.badges.filter((b) => !b.position || b.position === "card")
|
|
16992
|
+
: this.badges.filter((b) => b.position === "image");
|
|
16994
16993
|
}
|
|
16995
16994
|
getBadgeComponent(type) {
|
|
16996
16995
|
switch (type) {
|
|
@@ -17005,6 +17004,9 @@ let SearchResultsBadgeWrapper = class SearchResultsBadgeWrapper extends Vue$1 {
|
|
|
17005
17004
|
}
|
|
17006
17005
|
}
|
|
17007
17006
|
};
|
|
17007
|
+
__decorate([
|
|
17008
|
+
Prop({ default: "card" })
|
|
17009
|
+
], SearchResultsBadgeWrapper.prototype, "position", void 0);
|
|
17008
17010
|
__decorate([
|
|
17009
17011
|
Prop({ default: {} })
|
|
17010
17012
|
], SearchResultsBadgeWrapper.prototype, "options", void 0);
|
|
@@ -17034,7 +17036,7 @@ var __vue_render__$x = function () {
|
|
|
17034
17036
|
"div",
|
|
17035
17037
|
{ class: _vm.anchorPosition, attrs: { id: "lupa-badges" } },
|
|
17036
17038
|
[
|
|
17037
|
-
_vm._l(_vm.
|
|
17039
|
+
_vm._l(_vm.displayBadges, function (badge, index) {
|
|
17038
17040
|
return _c(_vm.getBadgeComponent(badge.type), {
|
|
17039
17041
|
key: index,
|
|
17040
17042
|
tag: "search-results-badge",
|
|
@@ -17046,19 +17048,6 @@ var __vue_render__$x = function () {
|
|
|
17046
17048
|
],
|
|
17047
17049
|
2
|
|
17048
17050
|
),
|
|
17049
|
-
_vm._v(" "),
|
|
17050
|
-
_c(
|
|
17051
|
-
"div",
|
|
17052
|
-
{ staticClass: "lupa-bottom-badges" },
|
|
17053
|
-
_vm._l(_vm.bottomBadges, function (badge, index) {
|
|
17054
|
-
return _c(_vm.getBadgeComponent(badge.type), {
|
|
17055
|
-
key: index,
|
|
17056
|
-
tag: "search-results-badge",
|
|
17057
|
-
attrs: { badge: badge },
|
|
17058
|
-
})
|
|
17059
|
-
}),
|
|
17060
|
-
1
|
|
17061
|
-
),
|
|
17062
17051
|
])
|
|
17063
17052
|
};
|
|
17064
17053
|
var __vue_staticRenderFns__$x = [];
|
|
@@ -18179,6 +18168,11 @@ var __vue_render__$m = function () {
|
|
|
18179
18168
|
})
|
|
18180
18169
|
}),
|
|
18181
18170
|
_vm._v(" "),
|
|
18171
|
+
_c("SearchResultsBadgeWrapper", {
|
|
18172
|
+
staticClass: "lupa-image-badges",
|
|
18173
|
+
attrs: { options: _vm.badgesOptions, position: "image" },
|
|
18174
|
+
}),
|
|
18175
|
+
_vm._v(" "),
|
|
18182
18176
|
_vm.labels.outOfStock && !_vm.isInStock
|
|
18183
18177
|
? _c("div", { staticClass: "lupa-out-of-stock" }, [
|
|
18184
18178
|
_vm._v(
|
|
@@ -28,7 +28,7 @@ export declare type SearchResultBadgeElement<T = any> = {
|
|
|
28
28
|
rootImageUrl?: string;
|
|
29
29
|
maxItems?: number;
|
|
30
30
|
html?: (doc: T) => string;
|
|
31
|
-
position?: "
|
|
31
|
+
position?: "card" | "image";
|
|
32
32
|
};
|
|
33
33
|
export declare type BaseBadgeElement<T = any> = SearchResultBadgeElement<T> & {
|
|
34
34
|
value?: string;
|
|
@@ -2,10 +2,10 @@ import { BadgeElement, BadgeOptions } from "@/types/search-results/BadgeOptions"
|
|
|
2
2
|
import { AnchorPosition } from "@/types/search-results/SearchResultsProductCardOptions";
|
|
3
3
|
import Vue from "vue";
|
|
4
4
|
export default class SearchResultsBadgeWrapper extends Vue {
|
|
5
|
+
position: "card" | "image";
|
|
5
6
|
options: BadgeOptions;
|
|
6
7
|
get anchorPosition(): AnchorPosition;
|
|
7
8
|
get badges(): BadgeElement[];
|
|
8
|
-
get
|
|
9
|
-
get bottomBadges(): BadgeElement[];
|
|
9
|
+
get displayBadges(): BadgeElement[];
|
|
10
10
|
getBadgeComponent(type: string): string;
|
|
11
11
|
}
|
package/dist/es/index.min.js
CHANGED
|
@@ -16982,11 +16982,10 @@ let SearchResultsBadgeWrapper = class SearchResultsBadgeWrapper extends Vue$1 {
|
|
|
16982
16982
|
return Object.assign(Object.assign({}, x), { value: ((_a = this.options.product) === null || _a === void 0 ? void 0 : _a[x.key]) || "badge", product: this.options.product });
|
|
16983
16983
|
});
|
|
16984
16984
|
}
|
|
16985
|
-
get
|
|
16986
|
-
return this.
|
|
16987
|
-
|
|
16988
|
-
|
|
16989
|
-
return this.badges.filter((b) => b.position === "bottom");
|
|
16985
|
+
get displayBadges() {
|
|
16986
|
+
return this.position === "card"
|
|
16987
|
+
? this.badges.filter((b) => !b.position || b.position === "card")
|
|
16988
|
+
: this.badges.filter((b) => b.position === "image");
|
|
16990
16989
|
}
|
|
16991
16990
|
getBadgeComponent(type) {
|
|
16992
16991
|
switch (type) {
|
|
@@ -17001,6 +17000,9 @@ let SearchResultsBadgeWrapper = class SearchResultsBadgeWrapper extends Vue$1 {
|
|
|
17001
17000
|
}
|
|
17002
17001
|
}
|
|
17003
17002
|
};
|
|
17003
|
+
__decorate([
|
|
17004
|
+
Prop({ default: "card" })
|
|
17005
|
+
], SearchResultsBadgeWrapper.prototype, "position", void 0);
|
|
17004
17006
|
__decorate([
|
|
17005
17007
|
Prop({ default: {} })
|
|
17006
17008
|
], SearchResultsBadgeWrapper.prototype, "options", void 0);
|
|
@@ -17030,7 +17032,7 @@ var __vue_render__$x = function () {
|
|
|
17030
17032
|
"div",
|
|
17031
17033
|
{ class: _vm.anchorPosition, attrs: { id: "lupa-badges" } },
|
|
17032
17034
|
[
|
|
17033
|
-
_vm._l(_vm.
|
|
17035
|
+
_vm._l(_vm.displayBadges, function (badge, index) {
|
|
17034
17036
|
return _c(_vm.getBadgeComponent(badge.type), {
|
|
17035
17037
|
key: index,
|
|
17036
17038
|
tag: "search-results-badge",
|
|
@@ -17042,19 +17044,6 @@ var __vue_render__$x = function () {
|
|
|
17042
17044
|
],
|
|
17043
17045
|
2
|
|
17044
17046
|
),
|
|
17045
|
-
_vm._v(" "),
|
|
17046
|
-
_c(
|
|
17047
|
-
"div",
|
|
17048
|
-
{ staticClass: "lupa-bottom-badges" },
|
|
17049
|
-
_vm._l(_vm.bottomBadges, function (badge, index) {
|
|
17050
|
-
return _c(_vm.getBadgeComponent(badge.type), {
|
|
17051
|
-
key: index,
|
|
17052
|
-
tag: "search-results-badge",
|
|
17053
|
-
attrs: { badge: badge },
|
|
17054
|
-
})
|
|
17055
|
-
}),
|
|
17056
|
-
1
|
|
17057
|
-
),
|
|
17058
17047
|
])
|
|
17059
17048
|
};
|
|
17060
17049
|
var __vue_staticRenderFns__$x = [];
|
|
@@ -18175,6 +18164,11 @@ var __vue_render__$m = function () {
|
|
|
18175
18164
|
})
|
|
18176
18165
|
}),
|
|
18177
18166
|
_vm._v(" "),
|
|
18167
|
+
_c("SearchResultsBadgeWrapper", {
|
|
18168
|
+
staticClass: "lupa-image-badges",
|
|
18169
|
+
attrs: { options: _vm.badgesOptions, position: "image" },
|
|
18170
|
+
}),
|
|
18171
|
+
_vm._v(" "),
|
|
18178
18172
|
_vm.labels.outOfStock && !_vm.isInStock
|
|
18179
18173
|
? _c("div", { staticClass: "lupa-out-of-stock" }, [
|
|
18180
18174
|
_vm._v(
|
|
@@ -28,7 +28,7 @@ export declare type SearchResultBadgeElement<T = any> = {
|
|
|
28
28
|
rootImageUrl?: string;
|
|
29
29
|
maxItems?: number;
|
|
30
30
|
html?: (doc: T) => string;
|
|
31
|
-
position?: "
|
|
31
|
+
position?: "card" | "image";
|
|
32
32
|
};
|
|
33
33
|
export declare type BaseBadgeElement<T = any> = SearchResultBadgeElement<T> & {
|
|
34
34
|
value?: string;
|
|
@@ -2,10 +2,10 @@ import { BadgeElement, BadgeOptions } from "@/types/search-results/BadgeOptions"
|
|
|
2
2
|
import { AnchorPosition } from "@/types/search-results/SearchResultsProductCardOptions";
|
|
3
3
|
import Vue from "vue";
|
|
4
4
|
export default class SearchResultsBadgeWrapper extends Vue {
|
|
5
|
+
position: "card" | "image";
|
|
5
6
|
options: BadgeOptions;
|
|
6
7
|
get anchorPosition(): AnchorPosition;
|
|
7
8
|
get badges(): BadgeElement[];
|
|
8
|
-
get
|
|
9
|
-
get bottomBadges(): BadgeElement[];
|
|
9
|
+
get displayBadges(): BadgeElement[];
|
|
10
10
|
getBadgeComponent(type: string): string;
|
|
11
11
|
}
|