@getlupa/client 0.7.0-alpha-19 → 0.7.0-alpha-22
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 -0
- package/dist/cjs/index.min.js +20 -4
- package/dist/cjs/types/search-results/BadgeOptions.d.ts +1 -0
- package/dist/es/components/search-results/products/product-card/badges/SearchResultsBadgeWrapper.vue.d.ts +2 -0
- package/dist/es/index.min.js +20 -4
- package/dist/es/types/search-results/BadgeOptions.d.ts +1 -0
- package/dist/iife/components/search-results/products/product-card/badges/SearchResultsBadgeWrapper.vue.d.ts +2 -0
- package/dist/iife/index.min.js +1 -1
- package/dist/iife/types/search-results/BadgeOptions.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -5,5 +5,7 @@ export default class SearchResultsBadgeWrapper extends Vue {
|
|
|
5
5
|
options: BadgeOptions;
|
|
6
6
|
get anchorPosition(): AnchorPosition;
|
|
7
7
|
get badges(): BadgeElement[];
|
|
8
|
+
get leftBadges(): BadgeElement[];
|
|
9
|
+
get bottomBadges(): BadgeElement[];
|
|
8
10
|
getBadgeComponent(type: string): string;
|
|
9
11
|
}
|
package/dist/cjs/index.min.js
CHANGED
|
@@ -16986,6 +16986,12 @@ 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 leftBadges() {
|
|
16990
|
+
return this.badges.filter((b) => !b.position || b.position === "left");
|
|
16991
|
+
}
|
|
16992
|
+
get bottomBadges() {
|
|
16993
|
+
return this.badges.filter((b) => b.position === "bottom");
|
|
16994
|
+
}
|
|
16989
16995
|
getBadgeComponent(type) {
|
|
16990
16996
|
switch (type) {
|
|
16991
16997
|
case exports.BadgeType.TEXT:
|
|
@@ -17028,7 +17034,7 @@ var __vue_render__$x = function () {
|
|
|
17028
17034
|
"div",
|
|
17029
17035
|
{ class: _vm.anchorPosition, attrs: { id: "lupa-badges" } },
|
|
17030
17036
|
[
|
|
17031
|
-
_vm._l(_vm.
|
|
17037
|
+
_vm._l(_vm.leftBadges, function (badge, index) {
|
|
17032
17038
|
return _c(_vm.getBadgeComponent(badge.type), {
|
|
17033
17039
|
key: index,
|
|
17034
17040
|
tag: "search-results-badge",
|
|
@@ -17040,6 +17046,19 @@ var __vue_render__$x = function () {
|
|
|
17040
17046
|
],
|
|
17041
17047
|
2
|
|
17042
17048
|
),
|
|
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
|
+
),
|
|
17043
17062
|
])
|
|
17044
17063
|
};
|
|
17045
17064
|
var __vue_staticRenderFns__$x = [];
|
|
@@ -22428,7 +22447,6 @@ const tracking = (options) => {
|
|
|
22428
22447
|
initTracking(options);
|
|
22429
22448
|
};
|
|
22430
22449
|
const searchBox = (options) => {
|
|
22431
|
-
clearSearchBox();
|
|
22432
22450
|
Vue$1.use(Vuex);
|
|
22433
22451
|
app.box = new Vue$1({
|
|
22434
22452
|
el: options.inputSelector,
|
|
@@ -22438,7 +22456,6 @@ const searchBox = (options) => {
|
|
|
22438
22456
|
});
|
|
22439
22457
|
};
|
|
22440
22458
|
const searchResults = (options) => {
|
|
22441
|
-
clearSearchResults();
|
|
22442
22459
|
Vue$1.use(Vuex);
|
|
22443
22460
|
app.results = new Vue$1({
|
|
22444
22461
|
el: options.containerSelector,
|
|
@@ -22448,7 +22465,6 @@ const searchResults = (options) => {
|
|
|
22448
22465
|
});
|
|
22449
22466
|
};
|
|
22450
22467
|
const productList = (options) => {
|
|
22451
|
-
clearProductList();
|
|
22452
22468
|
Vue$1.use(Vuex);
|
|
22453
22469
|
app.productList = new Vue$1({
|
|
22454
22470
|
el: options.containerSelector,
|
|
@@ -28,6 +28,7 @@ export declare type SearchResultBadgeElement<T = any> = {
|
|
|
28
28
|
rootImageUrl?: string;
|
|
29
29
|
maxItems?: number;
|
|
30
30
|
html?: (doc: T) => string;
|
|
31
|
+
position?: "left" | "bottom";
|
|
31
32
|
};
|
|
32
33
|
export declare type BaseBadgeElement<T = any> = SearchResultBadgeElement<T> & {
|
|
33
34
|
value?: string;
|
|
@@ -5,5 +5,7 @@ export default class SearchResultsBadgeWrapper extends Vue {
|
|
|
5
5
|
options: BadgeOptions;
|
|
6
6
|
get anchorPosition(): AnchorPosition;
|
|
7
7
|
get badges(): BadgeElement[];
|
|
8
|
+
get leftBadges(): BadgeElement[];
|
|
9
|
+
get bottomBadges(): BadgeElement[];
|
|
8
10
|
getBadgeComponent(type: string): string;
|
|
9
11
|
}
|
package/dist/es/index.min.js
CHANGED
|
@@ -16982,6 +16982,12 @@ 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 leftBadges() {
|
|
16986
|
+
return this.badges.filter((b) => !b.position || b.position === "left");
|
|
16987
|
+
}
|
|
16988
|
+
get bottomBadges() {
|
|
16989
|
+
return this.badges.filter((b) => b.position === "bottom");
|
|
16990
|
+
}
|
|
16985
16991
|
getBadgeComponent(type) {
|
|
16986
16992
|
switch (type) {
|
|
16987
16993
|
case BadgeType.TEXT:
|
|
@@ -17024,7 +17030,7 @@ var __vue_render__$x = function () {
|
|
|
17024
17030
|
"div",
|
|
17025
17031
|
{ class: _vm.anchorPosition, attrs: { id: "lupa-badges" } },
|
|
17026
17032
|
[
|
|
17027
|
-
_vm._l(_vm.
|
|
17033
|
+
_vm._l(_vm.leftBadges, function (badge, index) {
|
|
17028
17034
|
return _c(_vm.getBadgeComponent(badge.type), {
|
|
17029
17035
|
key: index,
|
|
17030
17036
|
tag: "search-results-badge",
|
|
@@ -17036,6 +17042,19 @@ var __vue_render__$x = function () {
|
|
|
17036
17042
|
],
|
|
17037
17043
|
2
|
|
17038
17044
|
),
|
|
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
|
+
),
|
|
17039
17058
|
])
|
|
17040
17059
|
};
|
|
17041
17060
|
var __vue_staticRenderFns__$x = [];
|
|
@@ -22424,7 +22443,6 @@ const tracking = (options) => {
|
|
|
22424
22443
|
initTracking(options);
|
|
22425
22444
|
};
|
|
22426
22445
|
const searchBox = (options) => {
|
|
22427
|
-
clearSearchBox();
|
|
22428
22446
|
Vue$1.use(Vuex);
|
|
22429
22447
|
app.box = new Vue$1({
|
|
22430
22448
|
el: options.inputSelector,
|
|
@@ -22434,7 +22452,6 @@ const searchBox = (options) => {
|
|
|
22434
22452
|
});
|
|
22435
22453
|
};
|
|
22436
22454
|
const searchResults = (options) => {
|
|
22437
|
-
clearSearchResults();
|
|
22438
22455
|
Vue$1.use(Vuex);
|
|
22439
22456
|
app.results = new Vue$1({
|
|
22440
22457
|
el: options.containerSelector,
|
|
@@ -22444,7 +22461,6 @@ const searchResults = (options) => {
|
|
|
22444
22461
|
});
|
|
22445
22462
|
};
|
|
22446
22463
|
const productList = (options) => {
|
|
22447
|
-
clearProductList();
|
|
22448
22464
|
Vue$1.use(Vuex);
|
|
22449
22465
|
app.productList = new Vue$1({
|
|
22450
22466
|
el: options.containerSelector,
|
|
@@ -28,6 +28,7 @@ export declare type SearchResultBadgeElement<T = any> = {
|
|
|
28
28
|
rootImageUrl?: string;
|
|
29
29
|
maxItems?: number;
|
|
30
30
|
html?: (doc: T) => string;
|
|
31
|
+
position?: "left" | "bottom";
|
|
31
32
|
};
|
|
32
33
|
export declare type BaseBadgeElement<T = any> = SearchResultBadgeElement<T> & {
|
|
33
34
|
value?: string;
|
|
@@ -5,5 +5,7 @@ export default class SearchResultsBadgeWrapper extends Vue {
|
|
|
5
5
|
options: BadgeOptions;
|
|
6
6
|
get anchorPosition(): AnchorPosition;
|
|
7
7
|
get badges(): BadgeElement[];
|
|
8
|
+
get leftBadges(): BadgeElement[];
|
|
9
|
+
get bottomBadges(): BadgeElement[];
|
|
8
10
|
getBadgeComponent(type: string): string;
|
|
9
11
|
}
|