@getlupa/client 0.7.0-alpha-21 → 0.7.0-alpha-24
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 +18 -22
- 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 +18 -22
- 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",
|
|
@@ -17042,23 +17044,14 @@ var __vue_render__$x = function () {
|
|
|
17042
17044
|
})
|
|
17043
17045
|
}),
|
|
17044
17046
|
_vm._v(" "),
|
|
17045
|
-
|
|
17047
|
+
_vm.position === "card"
|
|
17048
|
+
? _c("SearchResultGeneratedBadges", {
|
|
17049
|
+
attrs: { options: _vm.options },
|
|
17050
|
+
})
|
|
17051
|
+
: _vm._e(),
|
|
17046
17052
|
],
|
|
17047
17053
|
2
|
|
17048
17054
|
),
|
|
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
17055
|
])
|
|
17063
17056
|
};
|
|
17064
17057
|
var __vue_staticRenderFns__$x = [];
|
|
@@ -18179,6 +18172,11 @@ var __vue_render__$m = function () {
|
|
|
18179
18172
|
})
|
|
18180
18173
|
}),
|
|
18181
18174
|
_vm._v(" "),
|
|
18175
|
+
_c("SearchResultsBadgeWrapper", {
|
|
18176
|
+
staticClass: "lupa-image-badges",
|
|
18177
|
+
attrs: { options: _vm.badgesOptions, position: "image" },
|
|
18178
|
+
}),
|
|
18179
|
+
_vm._v(" "),
|
|
18182
18180
|
_vm.labels.outOfStock && !_vm.isInStock
|
|
18183
18181
|
? _c("div", { staticClass: "lupa-out-of-stock" }, [
|
|
18184
18182
|
_vm._v(
|
|
@@ -22456,7 +22454,6 @@ const searchBox = (options) => {
|
|
|
22456
22454
|
});
|
|
22457
22455
|
};
|
|
22458
22456
|
const searchResults = (options) => {
|
|
22459
|
-
clearSearchResults();
|
|
22460
22457
|
Vue$1.use(Vuex);
|
|
22461
22458
|
app.results = new Vue$1({
|
|
22462
22459
|
el: options.containerSelector,
|
|
@@ -22466,7 +22463,6 @@ const searchResults = (options) => {
|
|
|
22466
22463
|
});
|
|
22467
22464
|
};
|
|
22468
22465
|
const productList = (options) => {
|
|
22469
|
-
clearProductList();
|
|
22470
22466
|
Vue$1.use(Vuex);
|
|
22471
22467
|
app.productList = new Vue$1({
|
|
22472
22468
|
el: options.containerSelector,
|
|
@@ -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",
|
|
@@ -17038,23 +17040,14 @@ var __vue_render__$x = function () {
|
|
|
17038
17040
|
})
|
|
17039
17041
|
}),
|
|
17040
17042
|
_vm._v(" "),
|
|
17041
|
-
|
|
17043
|
+
_vm.position === "card"
|
|
17044
|
+
? _c("SearchResultGeneratedBadges", {
|
|
17045
|
+
attrs: { options: _vm.options },
|
|
17046
|
+
})
|
|
17047
|
+
: _vm._e(),
|
|
17042
17048
|
],
|
|
17043
17049
|
2
|
|
17044
17050
|
),
|
|
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
17051
|
])
|
|
17059
17052
|
};
|
|
17060
17053
|
var __vue_staticRenderFns__$x = [];
|
|
@@ -18175,6 +18168,11 @@ var __vue_render__$m = function () {
|
|
|
18175
18168
|
})
|
|
18176
18169
|
}),
|
|
18177
18170
|
_vm._v(" "),
|
|
18171
|
+
_c("SearchResultsBadgeWrapper", {
|
|
18172
|
+
staticClass: "lupa-image-badges",
|
|
18173
|
+
attrs: { options: _vm.badgesOptions, position: "image" },
|
|
18174
|
+
}),
|
|
18175
|
+
_vm._v(" "),
|
|
18178
18176
|
_vm.labels.outOfStock && !_vm.isInStock
|
|
18179
18177
|
? _c("div", { staticClass: "lupa-out-of-stock" }, [
|
|
18180
18178
|
_vm._v(
|
|
@@ -22452,7 +22450,6 @@ const searchBox = (options) => {
|
|
|
22452
22450
|
});
|
|
22453
22451
|
};
|
|
22454
22452
|
const searchResults = (options) => {
|
|
22455
|
-
clearSearchResults();
|
|
22456
22453
|
Vue$1.use(Vuex);
|
|
22457
22454
|
app.results = new Vue$1({
|
|
22458
22455
|
el: options.containerSelector,
|
|
@@ -22462,7 +22459,6 @@ const searchResults = (options) => {
|
|
|
22462
22459
|
});
|
|
22463
22460
|
};
|
|
22464
22461
|
const productList = (options) => {
|
|
22465
|
-
clearProductList();
|
|
22466
22462
|
Vue$1.use(Vuex);
|
|
22467
22463
|
app.productList = new Vue$1({
|
|
22468
22464
|
el: options.containerSelector,
|
|
@@ -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
|
}
|