vviinn-widgets 2.52.2 → 2.52.4
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/{customized-slots-e1ef7a7f.js → customized-slots-d8565ce0.js} +38 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-38b79bf5.js → package-b26ae1d9.js} +1 -1
- package/dist/cjs/{resources-98e3c0b2.js → resources-ade00c5f.js} +1 -3
- package/dist/cjs/search-filters_17.cjs.entry.js +6 -6
- package/dist/cjs/vviinn-carousel_4.cjs.entry.js +16 -11
- package/dist/cjs/vviinn-preloader.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +6 -3
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +9 -6
- package/dist/cjs/vviinn-widgets.cjs.js +1 -1
- package/dist/collection/components/customized-slots.js +38 -2
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.js +62 -2
- package/dist/collection/components/vviinn-example-image/vviinn-example-image.css +6 -24
- package/dist/collection/components/vviinn-example-image/vviinn-example-image.js +1 -5
- package/dist/collection/components/vviinn-icons/icons/PhotoFrameCorner.js +1 -1
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +1 -3
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.js +6 -3
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +4 -2
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +5 -2
- package/dist/collection/locale/resources.js +0 -2
- package/dist/esm/{customized-slots-43165d07.js → customized-slots-e9494032.js} +38 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-5de24438.js → package-3ce7cddb.js} +1 -1
- package/dist/esm/{resources-c0029912.js → resources-75e3c60e.js} +1 -3
- package/dist/esm/search-filters_17.entry.js +6 -6
- package/dist/esm/{search.store-44630818.js → search.store-d789660d.js} +7 -7
- package/dist/esm/vviinn-carousel_4.entry.js +16 -11
- package/dist/esm/vviinn-preloader.entry.js +1 -1
- package/dist/esm/vviinn-vpr-button.entry.js +1 -1
- package/dist/esm/vviinn-vps-button.entry.js +6 -3
- package/dist/esm/vviinn-vps-widget.entry.js +9 -6
- package/dist/esm/vviinn-widgets.js +1 -1
- package/dist/types/components/vviinn-carousel/vviinn-carousel.d.ts +4 -0
- package/dist/types/components/vviinn-example-image/vviinn-example-image.d.ts +0 -3
- package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +0 -1
- package/dist/types/components.d.ts +8 -2
- package/dist/vviinn-widgets/p-0bbb6584.js +1 -0
- package/dist/vviinn-widgets/p-1cce910f.entry.js +1 -0
- package/dist/vviinn-widgets/{p-d7f0728d.js → p-3d26c6da.js} +1 -1
- package/dist/vviinn-widgets/{p-709108d4.entry.js → p-44c0cb31.entry.js} +1 -1
- package/dist/vviinn-widgets/p-48b88ecc.js +1 -0
- package/dist/vviinn-widgets/{p-831589c9.entry.js → p-505cebc8.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-1c1be428.js → p-75a253fb.js} +1 -1
- package/dist/vviinn-widgets/{p-5ecd801a.entry.js → p-9782020a.entry.js} +1 -1
- package/{www/build/p-37f5587c.entry.js → dist/vviinn-widgets/p-e593395f.entry.js} +1 -1
- package/dist/vviinn-widgets/p-ff05b6ab.entry.js +1 -0
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/p-0bbb6584.js +1 -0
- package/www/build/p-1cce910f.entry.js +1 -0
- package/www/build/{p-d7f0728d.js → p-3d26c6da.js} +1 -1
- package/www/build/{p-709108d4.entry.js → p-44c0cb31.entry.js} +1 -1
- package/www/build/p-48b88ecc.js +1 -0
- package/www/build/{p-831589c9.entry.js → p-505cebc8.entry.js} +1 -1
- package/www/build/{p-1c1be428.js → p-75a253fb.js} +1 -1
- package/www/build/{p-5ecd801a.entry.js → p-9782020a.entry.js} +1 -1
- package/{dist/vviinn-widgets/p-37f5587c.entry.js → www/build/p-e593395f.entry.js} +1 -1
- package/www/build/p-ff05b6ab.entry.js +1 -0
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/dist/vviinn-widgets/p-55127f61.js +0 -1
- package/dist/vviinn-widgets/p-5a0d8b77.entry.js +0 -1
- package/dist/vviinn-widgets/p-b45cbf79.js +0 -1
- package/dist/vviinn-widgets/p-d932c41e.entry.js +0 -1
- package/www/build/p-55127f61.js +0 -1
- package/www/build/p-5a0d8b77.entry.js +0 -1
- package/www/build/p-b45cbf79.js +0 -1
- package/www/build/p-d932c41e.entry.js +0 -1
- package/dist/cjs/{search.store-7605f369.js → search.store-0e899c7f.js} +6 -6
|
@@ -47,8 +47,8 @@ img {
|
|
|
47
47
|
display: flex;
|
|
48
48
|
flex-direction: column;
|
|
49
49
|
gap: 12px;
|
|
50
|
-
padding:
|
|
51
|
-
justify-content:
|
|
50
|
+
padding: 68px 0 48px;
|
|
51
|
+
justify-content: space-around;
|
|
52
52
|
align-content: center;
|
|
53
53
|
box-sizing: border-box;
|
|
54
54
|
}
|
|
@@ -68,7 +68,7 @@ img {
|
|
|
68
68
|
box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.32);
|
|
69
69
|
width: 100%;
|
|
70
70
|
height: auto;
|
|
71
|
-
max-width:
|
|
71
|
+
max-width: 80%;
|
|
72
72
|
margin: 0 auto;
|
|
73
73
|
}
|
|
74
74
|
|
|
@@ -77,11 +77,6 @@ img {
|
|
|
77
77
|
width: auto;
|
|
78
78
|
height: auto;
|
|
79
79
|
}
|
|
80
|
-
|
|
81
|
-
#photo-frame {
|
|
82
|
-
max-width: 80%;
|
|
83
|
-
height: auto;
|
|
84
|
-
}
|
|
85
80
|
}
|
|
86
81
|
|
|
87
82
|
@media (max-width: 380px) {
|
|
@@ -92,7 +87,7 @@ img {
|
|
|
92
87
|
|
|
93
88
|
.photo-frame-corner {
|
|
94
89
|
position: absolute;
|
|
95
|
-
--delta: -
|
|
90
|
+
--delta: -3px;
|
|
96
91
|
}
|
|
97
92
|
|
|
98
93
|
.photo-frame-corner.top-left {
|
|
@@ -116,24 +111,11 @@ img {
|
|
|
116
111
|
transform: rotate(180deg);
|
|
117
112
|
}
|
|
118
113
|
|
|
119
|
-
.
|
|
114
|
+
.photo-button-container {
|
|
120
115
|
display: flex;
|
|
121
116
|
width: 100%;
|
|
122
|
-
left: 0;
|
|
123
|
-
gap: 12px;
|
|
124
|
-
flex-direction: column;
|
|
125
117
|
align-items: center;
|
|
126
|
-
|
|
127
|
-
bottom: 32px;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.buttons-group-info {
|
|
131
|
-
padding: 4px 12px;
|
|
132
|
-
border-radius: 8px;
|
|
133
|
-
background-color: rgba(0, 0, 0, 0.48);
|
|
134
|
-
color: white;
|
|
135
|
-
font-size: 14px;
|
|
136
|
-
line-height: 20px;
|
|
118
|
+
justify-self: flex-end;
|
|
137
119
|
}
|
|
138
120
|
|
|
139
121
|
.photo-button {
|
|
@@ -5,10 +5,6 @@ import { processSelectedFile } from "../../store/search.store";
|
|
|
5
5
|
import * as E from "fp-ts/lib/Either";
|
|
6
6
|
import { slotChangeListener } from "../customized-slots";
|
|
7
7
|
import { MinusIcon, PhotoFrameCorner, PlusIcon, RoundCameraIcon, } from "../vviinn-icons";
|
|
8
|
-
import i18next from "i18next";
|
|
9
|
-
/**
|
|
10
|
-
* @slot vviinn-camera-capture-text - Text above the Camera Capture button.
|
|
11
|
-
*/
|
|
12
8
|
export class VviinnExampleImage {
|
|
13
9
|
constructor() {
|
|
14
10
|
this.videoTrack = null;
|
|
@@ -131,7 +127,7 @@ export class VviinnExampleImage {
|
|
|
131
127
|
render() {
|
|
132
128
|
return (h(Host, { onKeyUp: (ev) => this.handleKeyPress(ev), class: { "video-expanded": this.cameraButtonClicked } }, h("video", { id: "camera-preview", class: {
|
|
133
129
|
hidden: !this.videoInitialized || this.selected,
|
|
134
|
-
}, autoplay: true, playsinline: true, muted: true }), h("img", { src: this.exampleImageSource, width: this.width, height: this.height, tabindex: 1, class: { hidden: this.videoInitialized || this.selected } }), h("img", { id: "captured-image-placeholder", class: { hidden: !this.selected } }), h("div", { class: { container: true, hidden: !this.videoInitialized } }, h("div", { class: "photo-frame-container" }, h("div", { id: "photo-frame" }, h(PhotoFrameCorner, { className: "photo-frame-corner top-left" }), h(PhotoFrameCorner, { className: "photo-frame-corner top-right" }), h(PhotoFrameCorner, { className: "photo-frame-corner bottom-left" }), h(PhotoFrameCorner, { className: "photo-frame-corner bottom-right" })), h("div", { class: { "zoom-buttons": true, hidden: !this.zoomCapabilities } }, h("button", { onClick: () => this.onZoom("out") }, h(MinusIcon, null)), h("button", { onClick: () => this.onZoom("in") }, h(PlusIcon, null)))), h("div", { class: "
|
|
130
|
+
}, autoplay: true, playsinline: true, muted: true }), h("img", { src: this.exampleImageSource, width: this.width, height: this.height, tabindex: 1, class: { hidden: this.videoInitialized || this.selected } }), h("img", { id: "captured-image-placeholder", class: { hidden: !this.selected } }), h("div", { class: { container: true, hidden: !this.videoInitialized } }, h("div", { class: "photo-frame-container" }, h("div", { id: "photo-frame" }, h(PhotoFrameCorner, { className: "photo-frame-corner top-left" }), h(PhotoFrameCorner, { className: "photo-frame-corner top-right" }), h(PhotoFrameCorner, { className: "photo-frame-corner bottom-left" }), h(PhotoFrameCorner, { className: "photo-frame-corner bottom-right" })), h("div", { class: { "zoom-buttons": true, hidden: !this.zoomCapabilities } }, h("button", { onClick: () => this.onZoom("out") }, h(MinusIcon, null)), h("button", { onClick: () => this.onZoom("in") }, h(PlusIcon, null)))), h("div", { class: "photo-button-container" }, h("button", { class: "photo-button", onClick: () => this.selectImage() }, h(RoundCameraIcon, null))))));
|
|
135
131
|
}
|
|
136
132
|
static get is() { return "vviinn-example-image"; }
|
|
137
133
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
export const PhotoFrameCorner = ({ className }) => (h("svg", { width: "
|
|
2
|
+
export const PhotoFrameCorner = ({ className }) => (h("svg", { width: "34", height: "34", viewBox: "0 0 34 34", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: className }, h("path", { d: "M31 3H15C8.37258 3 3 8.37258 3 15V31", stroke: "white", "stroke-width": "6", "stroke-linecap": "square" })));
|
|
@@ -3,7 +3,6 @@ import { pipe } from "fp-ts/lib/function";
|
|
|
3
3
|
import { getAnalyticsModule } from "../../analytics/GeneralAnalytics";
|
|
4
4
|
import * as O from "fp-ts/lib/Option";
|
|
5
5
|
import i18next from "i18next";
|
|
6
|
-
import { state } from "../../store/store";
|
|
7
6
|
import { searchState } from "../../store/search.store";
|
|
8
7
|
import { Linked, Price, ResponsiveImage, Image, } from "./render-helpers";
|
|
9
8
|
import styles from "./vviinn-product-card.css";
|
|
@@ -160,12 +159,11 @@ export class VviinnProductCard {
|
|
|
160
159
|
return this.responsive ? ResponsiveImage(props) : Image(props);
|
|
161
160
|
}
|
|
162
161
|
render() {
|
|
163
|
-
var _a, _b, _c;
|
|
164
162
|
return (h(Host, { part: "product-card", class: {
|
|
165
163
|
dimmed: this.dimmedBackground,
|
|
166
164
|
animated: this.isTransitioning,
|
|
167
165
|
"set-mode": this.isSetMode,
|
|
168
|
-
}, exportparts: "brand, currency, deeplink, image, image-link, price-amount-sale, price-amount-outdated, price-amount-regular, price-container, price-outdated, price-regular, price-sale, price-prefix, title, basket-button, update-button-item" }, h(Linked, { deeplink: this.deeplink, part: "image-link" }, this.renderImage()), this.isTransitioning ? (h(Fragment, null, h("vviinn-skeleton", { height: 20 }), h("vviinn-skeleton", { height: 20, halfWidth: true }))) : (h(Fragment, null, h(Linked, { deeplink: this.deeplink, part: "deeplink" }, h("span", { class: "title", part: "title" }, this.productTitle)), h("span", { class: "brand", part: "brand" }, this.brand), h("span", { class: "type", part: "type" }, this.productType), h(Price, { prefix:
|
|
166
|
+
}, exportparts: "brand, currency, deeplink, image, image-link, price-amount-sale, price-amount-outdated, price-amount-regular, price-container, price-outdated, price-regular, price-sale, price-prefix, title, basket-button, update-button-item" }, h(Linked, { deeplink: this.deeplink, part: "image-link" }, this.renderImage()), this.isTransitioning ? (h(Fragment, null, h("vviinn-skeleton", { height: 20 }), h("vviinn-skeleton", { height: 20, halfWidth: true }))) : (h(Fragment, null, h(Linked, { deeplink: this.deeplink, part: "deeplink" }, h("span", { class: "title", part: "title" }, this.productTitle)), h("span", { class: "brand", part: "brand" }, this.brand), h("span", { class: "type", part: "type" }, this.productType), h(Price, { prefix: this.pricePrefix, currency: this.currency, price: this.price, salePrice: this.salePrice, locale: this.locale }), this.isSetMode && !this.appliedDiscountPercentage && (h("div", { class: "discount-label" }, `-${this.currentDiscountPercentage}%`)))), (this.addToBasketShow || this.isSetMode) && (h(Fragment, null, this.isTransitioning && h("vviinn-skeleton", { height: 44 }), h("button", { class: {
|
|
169
167
|
"basket-button": true,
|
|
170
168
|
"basket-button-grid": this.isGridMode || this.isSetMode,
|
|
171
169
|
"basket-button-continuity ": this.isContinuityMode,
|
|
@@ -159,7 +159,10 @@ export class VviinnVprWidget {
|
|
|
159
159
|
if (this.showingInButton && this.closed)
|
|
160
160
|
return;
|
|
161
161
|
const slots = this.el.querySelectorAll("[slot]");
|
|
162
|
-
this.globalSlotsChanged.emit(
|
|
162
|
+
this.globalSlotsChanged.emit({
|
|
163
|
+
slots: Array.from(slots),
|
|
164
|
+
element: this.el,
|
|
165
|
+
});
|
|
163
166
|
}
|
|
164
167
|
connectedCallback() {
|
|
165
168
|
var _a;
|
|
@@ -352,7 +355,7 @@ export class VviinnVprWidget {
|
|
|
352
355
|
: i18next.t("noResultText"))))));
|
|
353
356
|
}
|
|
354
357
|
renderRecommendation(recommendation, index) {
|
|
355
|
-
return (h("vviinn-product-card", { part: "product-part", productId: recommendation.productId, productTitle: recommendation.title, productType: recommendation.productType, deeplink: recommendation.deeplink, image: recommendation.image.thumbnail, brand: recommendation.brand, imageWidth: this.imageWidth, imageRatio: 1, price: recommendation.price.actual, salePrice: recommendation.price.sale, responsive: this.isGridMode, addToBasketShow: this.addToBasketShow, mode: this.mode, dimmedBackground: this.useDimmedBackgroundInCard(), campaignTypeId: this.campaignType, index: index, widgetElementId: this.id, widgetVersion: version }));
|
|
358
|
+
return (h("vviinn-product-card", { part: "product-part", productId: recommendation.productId, productTitle: recommendation.title, productType: recommendation.productType, deeplink: recommendation.deeplink, image: recommendation.image.thumbnail, brand: recommendation.brand, imageWidth: this.imageWidth, imageRatio: 1, price: recommendation.price.actual, salePrice: recommendation.price.sale, responsive: this.isGridMode, addToBasketShow: this.addToBasketShow, mode: this.mode, dimmedBackground: this.useDimmedBackgroundInCard(), campaignTypeId: this.campaignType, index: index, widgetElementId: this.id, widgetVersion: version, currency: this.currencySign, pricePrefix: this.pricePrefix, locale: this.locale }));
|
|
356
359
|
}
|
|
357
360
|
useDimmedBackgroundInCard() {
|
|
358
361
|
return this.isContinuityMode || this.isSetMode || !this.useCarousel;
|
|
@@ -361,7 +364,7 @@ export class VviinnVprWidget {
|
|
|
361
364
|
return (h("div", { class: "recommendations-grid", part: "recommendations-grid" }, this.recommendations.map((r, i) => this.renderRecommendation(r, i))));
|
|
362
365
|
}
|
|
363
366
|
renderCarousel() {
|
|
364
|
-
return (h("vviinn-carousel", { mode: this.mode, campaignTypeId: this.campaignType, imageWidth: this.imageWidth, showScroll: this.showScroll, recommendations: this.recommendations, widgetElementId: this.id, widgetVersion: version, gridArrowsDynamic: this.gridArrowsDynamic, addToBasketShow: this.addToBasketShow, updatingAllCards: this.updatingAllCards, updateButtonLocation: this.updateButtonLocation }));
|
|
367
|
+
return (h("vviinn-carousel", { mode: this.mode, campaignTypeId: this.campaignType, imageWidth: this.imageWidth, showScroll: this.showScroll, recommendations: this.recommendations, widgetElementId: this.id, widgetVersion: version, gridArrowsDynamic: this.gridArrowsDynamic, addToBasketShow: this.addToBasketShow, updatingAllCards: this.updatingAllCards, updateButtonLocation: this.updateButtonLocation, currencySign: this.currencySign, pricePrefix: this.pricePrefix, locale: this.locale }));
|
|
365
368
|
}
|
|
366
369
|
static get is() { return "vviinn-vpr-widget"; }
|
|
367
370
|
static get encapsulation() { return "shadow"; }
|
|
@@ -11,7 +11,6 @@ import { DEFAULT_EXAMPLE_IMAGE } from "../../assets/constants";
|
|
|
11
11
|
* @slot vviinn-camera-button-text-start - Title of Start Camera button.
|
|
12
12
|
* @slot vviinn-camera-button-text-stop - Title of Stop Camera button (for Desktop).
|
|
13
13
|
* @slot vviinn-camera-icon - Icon of Camera Button.
|
|
14
|
-
* @slot vviinn-camera-capture-text - Text above the Camera Capture button.
|
|
15
14
|
* @slot vviinn-privacy-badge-text - Text content of privacy notification block.
|
|
16
15
|
* @slot vviinn-image-search-modal-title - Image search modal title.
|
|
17
16
|
* @slot vviinn-text-search-icon - Icon of text search block.
|
|
@@ -62,7 +61,10 @@ export class VviinnVpsButton {
|
|
|
62
61
|
}
|
|
63
62
|
componentDidLoad() {
|
|
64
63
|
const slots = this.el.querySelectorAll("[slot]");
|
|
65
|
-
this.globalSlotsChanged.emit(
|
|
64
|
+
this.globalSlotsChanged.emit({
|
|
65
|
+
slots: Array.from(slots),
|
|
66
|
+
element: this.el,
|
|
67
|
+
});
|
|
66
68
|
}
|
|
67
69
|
handleClick() {
|
|
68
70
|
this.buttonPressed = true;
|
|
@@ -235,7 +235,10 @@ export class VviinnVpsWidget {
|
|
|
235
235
|
}
|
|
236
236
|
componentDidLoad() {
|
|
237
237
|
const slots = this.el.querySelectorAll("[slot]");
|
|
238
|
-
this.globalSlotsChanged.emit(
|
|
238
|
+
this.globalSlotsChanged.emit({
|
|
239
|
+
slots: Array.from(slots),
|
|
240
|
+
element: this.el,
|
|
241
|
+
});
|
|
239
242
|
}
|
|
240
243
|
activeWatcher(active) {
|
|
241
244
|
if (active) {
|
|
@@ -428,7 +431,7 @@ export class VviinnVpsWidget {
|
|
|
428
431
|
}
|
|
429
432
|
return searchState.results.map((p, i) => {
|
|
430
433
|
var _a;
|
|
431
|
-
return (h("vviinn-product-card", { key: p.productId, hidden: true, productTitle: p.title, productId: p.productId, productType: p.productType, brand: p.brand, deeplink: p.deeplink, price: p.price.actual, salePrice: p.price.sale, responsive: true, imageWidth: this.imageResolutionWidth, image: (_a = p.image.thumbnail) !== null && _a !== void 0 ? _a : p.image.original, part: "product-card", campaignTypeId: "VPS", index: i, widgetElementId: this.id, buttonElementId: this.buttonElementId, widgetVersion: version }));
|
|
434
|
+
return (h("vviinn-product-card", { key: p.productId, hidden: true, productTitle: p.title, productId: p.productId, productType: p.productType, brand: p.brand, deeplink: p.deeplink, price: p.price.actual, salePrice: p.price.sale, responsive: true, imageWidth: this.imageResolutionWidth, image: (_a = p.image.thumbnail) !== null && _a !== void 0 ? _a : p.image.original, part: "product-card", campaignTypeId: "VPS", index: i, widgetElementId: this.id, buttonElementId: this.buttonElementId, widgetVersion: version, currency: this.currencySign, pricePrefix: "", locale: this.locale }));
|
|
432
435
|
});
|
|
433
436
|
}
|
|
434
437
|
resetState() {
|
|
@@ -15,7 +15,6 @@ export const resources = {
|
|
|
15
15
|
imageUploadButtonText: "Bild hochladen",
|
|
16
16
|
cameraButtonTextStart: "Kamera starten",
|
|
17
17
|
cameraButtonTextStop: "Kamera stoppen",
|
|
18
|
-
cameraCaptureText: "Platzieren Sie das Objekt im Quadrat",
|
|
19
18
|
privacyBadgeText: `Durch das Hochladen eines Bildes willigst Du in die Verarbeitung durch unseren Partner ${VVIINN_LINK} ein. Das Bild wird nach einer Stunde Inaktivität gelöscht.`,
|
|
20
19
|
teaserText: "Finde Produkte auf \n einem Foto",
|
|
21
20
|
imageSearchModalTitle: "AI Search",
|
|
@@ -54,7 +53,6 @@ export const resources = {
|
|
|
54
53
|
imageUploadButtonText: "Upload Photo",
|
|
55
54
|
cameraButtonTextStart: "Start Camera",
|
|
56
55
|
cameraButtonTextStop: "Stop Camera",
|
|
57
|
-
cameraCaptureText: "Place the object into the square area",
|
|
58
56
|
privacyBadgeText: `By uploading a picture you agree to the processing by our partner ${VVIINN_LINK}. The image will be deleted after one hour of inactivity.`,
|
|
59
57
|
teaserText: "Find Product by Photo",
|
|
60
58
|
imageSearchModalTitle: "AI Search",
|
|
@@ -28,7 +28,6 @@ const vpsSlotsNames = [
|
|
|
28
28
|
"vviinn-camera-button-text-start",
|
|
29
29
|
"vviinn-camera-button-text-stop",
|
|
30
30
|
"vviinn-camera-icon",
|
|
31
|
-
"vviinn-camera-capture-text",
|
|
32
31
|
"vviinn-text-search-icon",
|
|
33
32
|
"vviinn-privacy-badge-text",
|
|
34
33
|
"vviinn-image-search-modal-title",
|
|
@@ -55,10 +54,47 @@ const getContentToReplace = (targets) => (acc, content) => {
|
|
|
55
54
|
const replaceSlotContent = (content, target) => {
|
|
56
55
|
target.innerHTML = content.outerHTML;
|
|
57
56
|
};
|
|
57
|
+
const castAsHtmlElement = (element) => element;
|
|
58
|
+
const getShadowRoots = (shadowRoot) => {
|
|
59
|
+
const levelOne = shadowRoot;
|
|
60
|
+
const levelTwo = levelOne && castAsHtmlElement(levelOne.lastChild).shadowRoot;
|
|
61
|
+
const levelThree = levelTwo && castAsHtmlElement(levelTwo.lastChild).shadowRoot;
|
|
62
|
+
return { levelOne, levelTwo, levelThree };
|
|
63
|
+
};
|
|
58
64
|
const slotChangeListener = (component, element) => {
|
|
59
65
|
component.connectedCallback = function () {
|
|
60
66
|
document.addEventListener("globalSlotsChanged", ({ detail }) => {
|
|
61
|
-
const
|
|
67
|
+
const elementTagName = element.tagName;
|
|
68
|
+
const isElementChildTag = [
|
|
69
|
+
"VVIINN-PRODUCT-CARD",
|
|
70
|
+
"VVIINN-TEASER",
|
|
71
|
+
"VVIINN-EXAMPLE-IMAGE",
|
|
72
|
+
"VVIINN-PRIVACY-BADGE",
|
|
73
|
+
"VVIINN-MODAL",
|
|
74
|
+
"VVIINN-TEXT-SEARCH",
|
|
75
|
+
].includes(elementTagName);
|
|
76
|
+
const elementsAreDifferent = element !== detail.element;
|
|
77
|
+
const elementsAreDifferentAndNotChildTag = elementsAreDifferent && !isElementChildTag;
|
|
78
|
+
const isSearchButtonTag = detail.element.tagName === "VVIINN-VPS-BUTTON" &&
|
|
79
|
+
elementTagName === "VVIINN-VPS-WIDGET";
|
|
80
|
+
const detailElementShadowRoot = detail.element.shadowRoot;
|
|
81
|
+
const { levelOne: detailLevelOneShadowRoot, levelTwo: detailLevelTwoShadowRoot, levelThree: detailLevelThreeShadowRoot, } = getShadowRoots(detailElementShadowRoot);
|
|
82
|
+
const elementIsNotChildOfDetailElement = !(detailLevelOneShadowRoot &&
|
|
83
|
+
detailLevelOneShadowRoot.contains(element)) &&
|
|
84
|
+
!(detailLevelTwoShadowRoot &&
|
|
85
|
+
detailLevelTwoShadowRoot.contains(element)) &&
|
|
86
|
+
!(detailLevelThreeShadowRoot &&
|
|
87
|
+
detailLevelThreeShadowRoot.contains(element));
|
|
88
|
+
const elementIsChildTagButNotChildOfDetailElement = isElementChildTag && elementIsNotChildOfDetailElement;
|
|
89
|
+
const isNotChildOfCurrentDetailElement = (elementsAreDifferentAndNotChildTag ||
|
|
90
|
+
elementIsChildTagButNotChildOfDetailElement) &&
|
|
91
|
+
!isSearchButtonTag;
|
|
92
|
+
const isNotChildOfCurrentSearchButton = isSearchButtonTag && !detailElementShadowRoot.contains(element);
|
|
93
|
+
const elementIsNotRelatedToCurrentDetailElement = isNotChildOfCurrentDetailElement || isNotChildOfCurrentSearchButton;
|
|
94
|
+
if (elementIsNotRelatedToCurrentDetailElement) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
const slotsToReplace = getSlots(element).reduce(getContentToReplace(detail.slots), new Map());
|
|
62
98
|
slotsToReplace.forEach(replaceSlotContent);
|
|
63
99
|
}, true);
|
|
64
100
|
};
|
package/dist/esm/loader.js
CHANGED
|
@@ -11,7 +11,7 @@ const patchEsm = () => {
|
|
|
11
11
|
const defineCustomElements = (win, options) => {
|
|
12
12
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
13
13
|
return patchEsm().then(() => {
|
|
14
|
-
return bootstrapLazy([["vviinn-button",[[1,"vviinn-button",{"addStyle":[4,"add-style"]}]]],["vviinn-preloader",[[1,"vviinn-preloader"]]],["vviinn-error",[[1,"vviinn-error"]]],["vviinn-carousel_4",[[1,"vviinn-vpr-widget",{"blockTitle":[1,"block-title"],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"productId":[1,"product-id"],"token":[1],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"mode":[1],"campaignType":[1,"campaign-type"],"locale":[1],"campaigns":[1],"color":[1],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"closed":[4],"opened":[4],"recommendations":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32],"updatingAllCards":[32],"updatedCardsAmount":[32]},[[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnAddToBasket","trackAddToBasket"],[0,"vviinnUpdatingAllCardsFinished","updatingAllCardsFinishedListener"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"recommendations":[1040],"widgetVersion":[1,"widget-version"],"addToBasketShow":[4,"add-to-basket-show"],"updatingAllCards":[4,"updating-all-cards"],"updateButtonLocation":[1,"update-button-location"],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[32],"crossSellingRecommendations":[32],"setModeDiscount":[32],"setModeAppliedDiscounts":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"],[0,"vviinnAddToBasket","trackAddToBasket"]]],[1,"vviinn-product-card",{"brand":[1],"currency":[1],"deeplink":[1],"image":[1],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"locale":[1],"price":[2],"pricePrefix":[1,"price-prefix"],"productId":[1,"product-id"],"productTitle":[1,"product-title"],"productType":[1,"product-type"],"salePrice":[2,"sale-price"],"responsive":[4],"dimmedBackground":[4,"dimmed-background"],"mode":[1],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"appliedDiscountPercentage":[2,"applied-discount-percentage"],"currentDiscountPercentage":[2,"current-discount-percentage"],"isSourceProduct":[4,"is-source-product"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"index":[2],"updatingAllCards":[4,"updating-all-cards"],"defaultAnimationInterval":[2,"default-animation-interval"],"isTransitioning":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"]]],[1,"vviinn-skeleton",{"height":[2],"halfWidth":[4,"half-width"]}]]],["search-filters_17",[[1,"vviinn-image-view",{"basicEventData":[16],"setShowAspectRatioError":[16],"showAspectRatioError":[4,"show-aspect-ratio-error"],"cropper":[32],"hidePreloader":[32]},[[0,"vviinnSelectObject","selectDetectedObject"]]],[1,"vviinn-overlayed-modal",{"active":[4],"resetState":[16],"buttonElementId":[1,"button-element-id"],"hideBackButton":[4,"hide-back-button"],"widgetVersion":[1,"widget-version"],"isFirstScreen":[4,"is-first-screen"]}],[1,"vviinn-empty-results",{"handler":[16]}],[1,"vviinn-image-selector",{"basicEventData":[16],"startUpload":[4,"start-upload"],"loading":[4],"accept":[1],"resetVpsButton":[16],"capture":[1]}],[1,"vviinn-server-error",{"handler":[16]}],[1,"vviinn-text-search",{"clearSearchQuery":[4,"clear-search-query"],"initialSearchQuery":[1,"initial-search-query"],"searchQuery":[32]}],[1,"vviinn-wrong-aspect-ratio",{"handler":[16]}],[1,"vviinn-wrong-format",{"handler":[16]}],[1,"search-filters",{"filter":[16],"basicEventData":[16],"selectedFilter":[32],"hideFilters":[32]}],[1,"vviinn-example-image",{"exampleImageSource":[1,"example-image-source"],"width":[2],"height":[2],"basicEventData":[16],"srcObject":[16],"cameraButtonClicked":[4,"camera-button-clicked"],"selected":[32],"videoInitialized":[32],"zoomCapabilities":[32]}],[1,"vviinn-privacy-badge",{"privacyBadgeText":[1,"privacy-badge-text"]}],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32],"isRTL":[32]}],[1,"vviinn-teaser"],[1,"vviinn-detected-object",{"detectedObject":[16],"basicEventData":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"resetState":[16],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"hideBackButton":[4,"hide-back-button"],"isFirstScreen":[4,"is-first-screen"],"slider":[32]}],[1,"vviinn-overlay"]]],["vviinn-vps-widget",[[1,"vviinn-vps-widget",{"token":[1],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"imageResolutionWidth":[2,"image-resolution-width"],"exampleImageSource":[1,"example-image-source"],"textSearchShow":[4,"text-search-show"],"apiPath":[1,"api-path"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"buttonPressed":[4,"button-pressed"],"mode":[1],"resetVpsButton":[16],"slidePosition":[32],"width":[32],"wrongImageFormat":[32],"trackingDeactivated":[32],"stream":[32],"cameraInitializing":[32],"cameraEnabled":[32],"cameraButtonClicked":[32],"uploadSource":[32],"showAspectRatioError":[32],"products":[32],"initialSearchQuery":[32]},[[0,"vviinnCameraEnabled","trackCameraEnabled"],[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnImageCrop","trachSearchAreaChanges"],[0,"vviinnSelectObject","trackDetectedObject"],[0,"vviinnSelectFilter","trackFilter"],[0,"vviinnTextSearchFinished","trackTextSearchFinished"]]]]],["vviinn-vps-button",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"addStyle":[4,"add-style"],"mode":[1],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"imageResolutionWidth":[2,"image-resolution-width"],"exampleImageSource":[1,"example-image-source"],"textSearchShow":[4,"text-search-show"],"apiPath":[1,"api-path"],"buttonPressed":[32]},[[0,"vviinnWidgetClose","handleModalClosed"]]]]],["vviinn-recommendations-sidebar",[[1,"vviinn-recommendations-sidebar",{"sidebarTitle":[1,"sidebar-title"],"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"widgetScrollbar":[4,"widget-scrollbar"],"mode":[1],"campaigns":[1],"campaignType":[1,"campaign-type"],"color":[1],"locale":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"buttonChildren":[16],"apiPath":[1,"api-path"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"showingInButton":[4,"showing-in-button"],"state":[32]},[[16,"click","bodyClickListener"]]]]],["vviinn-vpr-button",[[1,"vviinn-vpr-button",{"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"sidebarTitle":[1,"sidebar-title"],"modalScrollbar":[4,"modal-scrollbar"],"campaigns":[1],"campaignType":[1,"campaign-type"],"locale":[1],"color":[1],"addStyle":[4,"add-style"],"mode":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"apiPath":[1,"api-path"]}]]]], options);
|
|
14
|
+
return bootstrapLazy([["vviinn-button",[[1,"vviinn-button",{"addStyle":[4,"add-style"]}]]],["vviinn-preloader",[[1,"vviinn-preloader"]]],["vviinn-error",[[1,"vviinn-error"]]],["vviinn-carousel_4",[[1,"vviinn-vpr-widget",{"blockTitle":[1,"block-title"],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"productId":[1,"product-id"],"token":[1],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"mode":[1],"campaignType":[1,"campaign-type"],"locale":[1],"campaigns":[1],"color":[1],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"closed":[4],"opened":[4],"recommendations":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32],"updatingAllCards":[32],"updatedCardsAmount":[32]},[[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnAddToBasket","trackAddToBasket"],[0,"vviinnUpdatingAllCardsFinished","updatingAllCardsFinishedListener"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"recommendations":[1040],"widgetVersion":[1,"widget-version"],"addToBasketShow":[4,"add-to-basket-show"],"updatingAllCards":[4,"updating-all-cards"],"updateButtonLocation":[1,"update-button-location"],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"locale":[1],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[32],"crossSellingRecommendations":[32],"setModeDiscount":[32],"setModeAppliedDiscounts":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"],[0,"vviinnAddToBasket","trackAddToBasket"]]],[1,"vviinn-product-card",{"brand":[1],"currency":[1],"deeplink":[1],"image":[1],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"locale":[1],"price":[2],"pricePrefix":[1,"price-prefix"],"productId":[1,"product-id"],"productTitle":[1,"product-title"],"productType":[1,"product-type"],"salePrice":[2,"sale-price"],"responsive":[4],"dimmedBackground":[4,"dimmed-background"],"mode":[1],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"appliedDiscountPercentage":[2,"applied-discount-percentage"],"currentDiscountPercentage":[2,"current-discount-percentage"],"isSourceProduct":[4,"is-source-product"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"index":[2],"updatingAllCards":[4,"updating-all-cards"],"defaultAnimationInterval":[2,"default-animation-interval"],"isTransitioning":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"]]],[1,"vviinn-skeleton",{"height":[2],"halfWidth":[4,"half-width"]}]]],["search-filters_17",[[1,"vviinn-image-view",{"basicEventData":[16],"setShowAspectRatioError":[16],"showAspectRatioError":[4,"show-aspect-ratio-error"],"cropper":[32],"hidePreloader":[32]},[[0,"vviinnSelectObject","selectDetectedObject"]]],[1,"vviinn-overlayed-modal",{"active":[4],"resetState":[16],"buttonElementId":[1,"button-element-id"],"hideBackButton":[4,"hide-back-button"],"widgetVersion":[1,"widget-version"],"isFirstScreen":[4,"is-first-screen"]}],[1,"vviinn-empty-results",{"handler":[16]}],[1,"vviinn-image-selector",{"basicEventData":[16],"startUpload":[4,"start-upload"],"loading":[4],"accept":[1],"resetVpsButton":[16],"capture":[1]}],[1,"vviinn-server-error",{"handler":[16]}],[1,"vviinn-text-search",{"clearSearchQuery":[4,"clear-search-query"],"initialSearchQuery":[1,"initial-search-query"],"searchQuery":[32]}],[1,"vviinn-wrong-aspect-ratio",{"handler":[16]}],[1,"vviinn-wrong-format",{"handler":[16]}],[1,"search-filters",{"filter":[16],"basicEventData":[16],"selectedFilter":[32],"hideFilters":[32]}],[1,"vviinn-example-image",{"exampleImageSource":[1,"example-image-source"],"width":[2],"height":[2],"basicEventData":[16],"srcObject":[16],"cameraButtonClicked":[4,"camera-button-clicked"],"selected":[32],"videoInitialized":[32],"zoomCapabilities":[32]}],[1,"vviinn-privacy-badge",{"privacyBadgeText":[1,"privacy-badge-text"]}],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32],"isRTL":[32]}],[1,"vviinn-teaser"],[1,"vviinn-detected-object",{"detectedObject":[16],"basicEventData":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"resetState":[16],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"hideBackButton":[4,"hide-back-button"],"isFirstScreen":[4,"is-first-screen"],"slider":[32]}],[1,"vviinn-overlay"]]],["vviinn-vps-widget",[[1,"vviinn-vps-widget",{"token":[1],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"imageResolutionWidth":[2,"image-resolution-width"],"exampleImageSource":[1,"example-image-source"],"textSearchShow":[4,"text-search-show"],"apiPath":[1,"api-path"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"buttonPressed":[4,"button-pressed"],"mode":[1],"resetVpsButton":[16],"slidePosition":[32],"width":[32],"wrongImageFormat":[32],"trackingDeactivated":[32],"stream":[32],"cameraInitializing":[32],"cameraEnabled":[32],"cameraButtonClicked":[32],"uploadSource":[32],"showAspectRatioError":[32],"products":[32],"initialSearchQuery":[32]},[[0,"vviinnCameraEnabled","trackCameraEnabled"],[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnImageCrop","trachSearchAreaChanges"],[0,"vviinnSelectObject","trackDetectedObject"],[0,"vviinnSelectFilter","trackFilter"],[0,"vviinnTextSearchFinished","trackTextSearchFinished"]]]]],["vviinn-vps-button",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"addStyle":[4,"add-style"],"mode":[1],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"imageResolutionWidth":[2,"image-resolution-width"],"exampleImageSource":[1,"example-image-source"],"textSearchShow":[4,"text-search-show"],"apiPath":[1,"api-path"],"buttonPressed":[32]},[[0,"vviinnWidgetClose","handleModalClosed"]]]]],["vviinn-recommendations-sidebar",[[1,"vviinn-recommendations-sidebar",{"sidebarTitle":[1,"sidebar-title"],"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"widgetScrollbar":[4,"widget-scrollbar"],"mode":[1],"campaigns":[1],"campaignType":[1,"campaign-type"],"color":[1],"locale":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"buttonChildren":[16],"apiPath":[1,"api-path"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"showingInButton":[4,"showing-in-button"],"state":[32]},[[16,"click","bodyClickListener"]]]]],["vviinn-vpr-button",[[1,"vviinn-vpr-button",{"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"sidebarTitle":[1,"sidebar-title"],"modalScrollbar":[4,"modal-scrollbar"],"campaigns":[1],"campaignType":[1,"campaign-type"],"locale":[1],"color":[1],"addStyle":[4,"add-style"],"mode":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"apiPath":[1,"api-path"]}]]]], options);
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as commonjsGlobal, o as createCommonjsModule } from './search.store-
|
|
1
|
+
import { n as commonjsGlobal, o as createCommonjsModule } from './search.store-d789660d.js';
|
|
2
2
|
|
|
3
3
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
4
4
|
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
@@ -3988,7 +3988,6 @@ const resources = {
|
|
|
3988
3988
|
imageUploadButtonText: "Bild hochladen",
|
|
3989
3989
|
cameraButtonTextStart: "Kamera starten",
|
|
3990
3990
|
cameraButtonTextStop: "Kamera stoppen",
|
|
3991
|
-
cameraCaptureText: "Platzieren Sie das Objekt im Quadrat",
|
|
3992
3991
|
privacyBadgeText: `Durch das Hochladen eines Bildes willigst Du in die Verarbeitung durch unseren Partner ${VVIINN_LINK} ein. Das Bild wird nach einer Stunde Inaktivität gelöscht.`,
|
|
3993
3992
|
teaserText: "Finde Produkte auf \n einem Foto",
|
|
3994
3993
|
imageSearchModalTitle: "AI Search",
|
|
@@ -4027,7 +4026,6 @@ const resources = {
|
|
|
4027
4026
|
imageUploadButtonText: "Upload Photo",
|
|
4028
4027
|
cameraButtonTextStart: "Start Camera",
|
|
4029
4028
|
cameraButtonTextStop: "Stop Camera",
|
|
4030
|
-
cameraCaptureText: "Place the object into the square area",
|
|
4031
4029
|
privacyBadgeText: `By uploading a picture you agree to the processing by our partner ${VVIINN_LINK}. The image will be deleted after one hour of inactivity.`,
|
|
4032
4030
|
teaserText: "Find Product by Photo",
|
|
4033
4031
|
imageSearchModalTitle: "AI Search",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-1f3eaf12.js';
|
|
2
|
-
import { s as searchState, _ as _function, O as Option, q as fromAlt, r as foldValueObject, u as scaleWithSized, v as center, w as makeRectangularSearchRequest, x as detectedObjectEq, y as toFile, z as processSelectedFile, E as Either, B as match, o as createCommonjsModule, n as commonjsGlobal, C as sequenceToOption, D as fromImage, F as dimensionsFromImage, G as scaleByLargestSide, N as NonEmptyArray, H as processSelectedText } from './search.store-
|
|
2
|
+
import { s as searchState, _ as _function, O as Option, q as fromAlt, r as foldValueObject, u as scaleWithSized, v as center, w as makeRectangularSearchRequest, x as detectedObjectEq, y as toFile, z as processSelectedFile, E as Either, B as match, o as createCommonjsModule, n as commonjsGlobal, C as sequenceToOption, D as fromImage, F as dimensionsFromImage, G as scaleByLargestSide, N as NonEmptyArray, H as processSelectedText } from './search.store-d789660d.js';
|
|
3
3
|
import { i as instance } from './i18next-387f2b0a.js';
|
|
4
|
-
import { s as slotChangeListener, c as campaignTypeNames } from './customized-slots-
|
|
4
|
+
import { s as slotChangeListener, c as campaignTypeNames } from './customized-slots-e9494032.js';
|
|
5
5
|
import { P as PlusIcon } from './PlusIcon-af795e23.js';
|
|
6
6
|
|
|
7
7
|
const ArrowIcon = () => (h("svg", { width: "12", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -26,8 +26,8 @@ const WarningIcon = () => (h("svg", { slot: "icon", class: "icon", width: "32",
|
|
|
26
26
|
h("path", { d: "M16 2a14 14 0 1 0 0 28 14 14 0 0 0 0-28Zm0 26a12 12 0 1 1 0-24 12 12 0 0 1 0 24Z", fill: "#525252" }),
|
|
27
27
|
h("path", { d: "M17 8h-2v11h2V8Zm-1 14a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z", fill: "#525252" })));
|
|
28
28
|
|
|
29
|
-
const PhotoFrameCorner = ({ className }) => (h("svg", { width: "
|
|
30
|
-
h("path", { d: "
|
|
29
|
+
const PhotoFrameCorner = ({ className }) => (h("svg", { width: "34", height: "34", viewBox: "0 0 34 34", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: className },
|
|
30
|
+
h("path", { d: "M31 3H15C8.37258 3 3 8.37258 3 15V31", stroke: "white", "stroke-width": "6", "stroke-linecap": "square" })));
|
|
31
31
|
|
|
32
32
|
// -------------------------------------------------------------------------------------
|
|
33
33
|
// -------------------------------------------------------------------------------------
|
|
@@ -219,7 +219,7 @@ const VviinnEmptyResults = class {
|
|
|
219
219
|
}
|
|
220
220
|
};
|
|
221
221
|
|
|
222
|
-
const vviinnExampleImageCss = ":host{display:block;width:100%;height:100%;min-height:0;position:relative;overflow:hidden;flex-grow:1;transition:min-height 1s}:host(.video-expanded){min-height:100%;transition:min-height 0.8s}img{width:100%;height:100%;min-height:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center}#camera-preview{width:100%;min-height:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;position:relative}#captured-image-placeholder{height:auto}.container{position:absolute;width:100%;height:100%;left:0;top:0;display:flex;flex-direction:column;gap:12px;padding:
|
|
222
|
+
const vviinnExampleImageCss = ":host{display:block;width:100%;height:100%;min-height:0;position:relative;overflow:hidden;flex-grow:1;transition:min-height 1s}:host(.video-expanded){min-height:100%;transition:min-height 0.8s}img{width:100%;height:100%;min-height:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center}#camera-preview{width:100%;min-height:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;position:relative}#captured-image-placeholder{height:auto}.container{position:absolute;width:100%;height:100%;left:0;top:0;display:flex;flex-direction:column;gap:12px;padding:68px 0 48px;justify-content:space-around;align-content:center;box-sizing:border-box}.photo-frame-container{width:100%;height:100%;display:flex;flex-direction:column;gap:12px}#photo-frame{position:relative;aspect-ratio:1/1;border-radius:16px;box-shadow:0 0 0 100vmax rgba(0, 0, 0, 0.32);width:100%;height:auto;max-width:80%;margin:0 auto}@media (max-width: 960px){.photo-frame-container{width:auto;height:auto}}@media (max-width: 380px){#photo-frame{max-width:70%}}.photo-frame-corner{position:absolute;--delta:-3px}.photo-frame-corner.top-left{top:var(--delta);left:var(--delta)}.photo-frame-corner.top-right{top:var(--delta);right:var(--delta);transform:rotate(90deg)}.photo-frame-corner.bottom-left{bottom:var(--delta);left:var(--delta);transform:rotate(-90deg)}.photo-frame-corner.bottom-right{bottom:var(--delta);right:var(--delta);transform:rotate(180deg)}.photo-button-container{display:flex;width:100%;align-items:center;justify-self:flex-end}.photo-button{cursor:pointer;border:none;position:relative;z-index:1;padding:0;color:#6f6f6f;background-color:transparent;-webkit-tap-highlight-color:transparent;line-height:0;margin:0 auto}.zoom-buttons{display:flex;position:relative;justify-content:center;gap:12px}.zoom-buttons button{color:white;display:flex;width:48px;height:48px;justify-content:center;align-items:center;border-radius:var(--radius-radius-md, 8px);background-color:rgba(0, 0, 0, 0.48);border:none;cursor:pointer}.hidden{display:none}";
|
|
223
223
|
|
|
224
224
|
const VviinnExampleImage = class {
|
|
225
225
|
constructor(hostRef) {
|
|
@@ -348,7 +348,7 @@ const VviinnExampleImage = class {
|
|
|
348
348
|
render() {
|
|
349
349
|
return (h(Host, { onKeyUp: (ev) => this.handleKeyPress(ev), class: { "video-expanded": this.cameraButtonClicked } }, h("video", { id: "camera-preview", class: {
|
|
350
350
|
hidden: !this.videoInitialized || this.selected,
|
|
351
|
-
}, autoplay: true, playsinline: true, muted: true }), h("img", { src: this.exampleImageSource, width: this.width, height: this.height, tabindex: 1, class: { hidden: this.videoInitialized || this.selected } }), h("img", { id: "captured-image-placeholder", class: { hidden: !this.selected } }), h("div", { class: { container: true, hidden: !this.videoInitialized } }, h("div", { class: "photo-frame-container" }, h("div", { id: "photo-frame" }, h(PhotoFrameCorner, { className: "photo-frame-corner top-left" }), h(PhotoFrameCorner, { className: "photo-frame-corner top-right" }), h(PhotoFrameCorner, { className: "photo-frame-corner bottom-left" }), h(PhotoFrameCorner, { className: "photo-frame-corner bottom-right" })), h("div", { class: { "zoom-buttons": true, hidden: !this.zoomCapabilities } }, h("button", { onClick: () => this.onZoom("out") }, h(MinusIcon, null)), h("button", { onClick: () => this.onZoom("in") }, h(PlusIcon, null)))), h("div", { class: "
|
|
351
|
+
}, autoplay: true, playsinline: true, muted: true }), h("img", { src: this.exampleImageSource, width: this.width, height: this.height, tabindex: 1, class: { hidden: this.videoInitialized || this.selected } }), h("img", { id: "captured-image-placeholder", class: { hidden: !this.selected } }), h("div", { class: { container: true, hidden: !this.videoInitialized } }, h("div", { class: "photo-frame-container" }, h("div", { id: "photo-frame" }, h(PhotoFrameCorner, { className: "photo-frame-corner top-left" }), h(PhotoFrameCorner, { className: "photo-frame-corner top-right" }), h(PhotoFrameCorner, { className: "photo-frame-corner bottom-left" }), h(PhotoFrameCorner, { className: "photo-frame-corner bottom-right" })), h("div", { class: { "zoom-buttons": true, hidden: !this.zoomCapabilities } }, h("button", { onClick: () => this.onZoom("out") }, h(MinusIcon, null)), h("button", { onClick: () => this.onZoom("in") }, h(PlusIcon, null)))), h("div", { class: "photo-button-container" }, h("button", { class: "photo-button", onClick: () => this.selectImage() }, h(RoundCameraIcon, null))))));
|
|
352
352
|
}
|
|
353
353
|
get el() { return getElement(this); }
|
|
354
354
|
static get watchers() { return {
|
|
@@ -11433,12 +11433,6 @@ const createStore = (defaultState, shouldUpdate) => {
|
|
|
11433
11433
|
return map;
|
|
11434
11434
|
};
|
|
11435
11435
|
|
|
11436
|
-
const trackingStore = {
|
|
11437
|
-
trackingEnabled: true,
|
|
11438
|
-
};
|
|
11439
|
-
|
|
11440
|
-
const { state: state$1, onChange: onChange$1 } = createStore(Object.assign({ fallbackStyles: "", pricePrefix: null, currencySign: null, apiPath: null, token: null, locale: "de-DE" }, trackingStore));
|
|
11441
|
-
|
|
11442
11436
|
var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {
|
|
11443
11437
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
11444
11438
|
if (ar || !(i in from)) {
|
|
@@ -16402,6 +16396,12 @@ var Monoid = {
|
|
|
16402
16396
|
empty: empty
|
|
16403
16397
|
};
|
|
16404
16398
|
|
|
16399
|
+
const trackingStore = {
|
|
16400
|
+
trackingEnabled: true,
|
|
16401
|
+
};
|
|
16402
|
+
|
|
16403
|
+
const { state: state$1, onChange: onChange$1 } = createStore(Object.assign({ fallbackStyles: "", pricePrefix: null, currencySign: null, apiPath: null, token: null, locale: "de-DE" }, trackingStore));
|
|
16404
|
+
|
|
16405
16405
|
const basicErrorFromResponse = (error) => {
|
|
16406
16406
|
return {
|
|
16407
16407
|
kind: "server",
|
|
@@ -17388,4 +17388,4 @@ const processSelectedFile = async (file) => {
|
|
|
17388
17388
|
return session;
|
|
17389
17389
|
};
|
|
17390
17390
|
|
|
17391
|
-
export { Apply as A, match$1 as B, sequenceToOption as C, fromImage as D, Either as E, dimensionsFromImage as F, scaleByLargestSide as G, processSelectedText as H, NonEmptyArray as N, Option as O, Semigroup$1 as S, TaskEither as T, _function as _, _Array as a,
|
|
17391
|
+
export { Apply as A, match$1 as B, sequenceToOption as C, fromImage as D, Either as E, dimensionsFromImage as F, scaleByLargestSide as G, processSelectedText as H, NonEmptyArray as N, Option as O, Semigroup$1 as S, TaskEither as T, _function as _, _Array as a, createInitGetRequest as b, chainW as c, map$3 as d, match as e, fromEither as f, getApiPath as g, has as h, arrayToQueryString as i, state$1 as j, parseExcluded as k, checkEmpryString as l, makeRequest as m, commonjsGlobal as n, createCommonjsModule as o, pipe as p, fromAlt as q, foldValueObject as r, searchState as s, tuple as t, scaleWithSized as u, center as v, makeRectangularSearchRequest as w, detectedObjectEq as x, toFile as y, processSelectedFile as z };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { h, r as registerInstance, H as Host, g as getElement, c as createEvent, F as Fragment } from './index-1f3eaf12.js';
|
|
2
|
-
import { _ as _function, a as _Array, O as Option, S as Semigroup, h as has, t as tuple, E as Either, s as searchState,
|
|
2
|
+
import { _ as _function, a as _Array, O as Option, S as Semigroup, h as has, t as tuple, E as Either, s as searchState, p as pipe, c as chainW, m as makeRequest, f as fromEither, g as getApiPath, b as createInitGetRequest, A as Apply, d as map, e as match, i as arrayToQueryString, j as state, k as parseExcluded, T as TaskEither, l as checkEmpryString } from './search.store-d789660d.js';
|
|
3
3
|
import { i as instance } from './i18next-387f2b0a.js';
|
|
4
4
|
import { P as PlusIcon } from './PlusIcon-af795e23.js';
|
|
5
|
-
import { s as slotChangeListener, c as campaignTypeNames, f as fromString, a as fold, S as SlotSkeleton } from './customized-slots-
|
|
6
|
-
import { v as version } from './package-
|
|
7
|
-
import { v as v4, c as createTrackingApi, r as resources, a as createAddToBasketVpcEvent, b as createAddToBasketVprEvent, d as createWidgetVpcEvent, e as createWidgetVprEvent, f as createResultVpcEventByType, g as createResultVprEventByType, h as createProductVpcEventByType, i as createProductVprEventByType } from './resources-
|
|
5
|
+
import { s as slotChangeListener, c as campaignTypeNames, f as fromString, a as fold, S as SlotSkeleton } from './customized-slots-e9494032.js';
|
|
6
|
+
import { v as version } from './package-3ce7cddb.js';
|
|
7
|
+
import { v as v4, c as createTrackingApi, r as resources, a as createAddToBasketVpcEvent, b as createAddToBasketVprEvent, d as createWidgetVpcEvent, e as createWidgetVprEvent, f as createResultVpcEventByType, g as createResultVprEventByType, h as createProductVpcEventByType, i as createProductVprEventByType } from './resources-75e3c60e.js';
|
|
8
8
|
|
|
9
9
|
const BasketIcon = () => (h("svg", { width: "25", height: "24", viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
10
10
|
h("path", { d: "M7.5 22C6.95 22 6.47917 21.8042 6.0875 21.4125C5.69583 21.0208 5.5 20.55 5.5 20C5.5 19.45 5.69583 18.9792 6.0875 18.5875C6.47917 18.1958 6.95 18 7.5 18C8.05 18 8.52083 18.1958 8.9125 18.5875C9.30417 18.9792 9.5 19.45 9.5 20C9.5 20.55 9.30417 21.0208 8.9125 21.4125C8.52083 21.8042 8.05 22 7.5 22ZM17.5 22C16.95 22 16.4792 21.8042 16.0875 21.4125C15.6958 21.0208 15.5 20.55 15.5 20C15.5 19.45 15.6958 18.9792 16.0875 18.5875C16.4792 18.1958 16.95 18 17.5 18C18.05 18 18.5208 18.1958 18.9125 18.5875C19.3042 18.9792 19.5 19.45 19.5 20C19.5 20.55 19.3042 21.0208 18.9125 21.4125C18.5208 21.8042 18.05 22 17.5 22ZM6.65 6L9.05 11H16.05L18.8 6H6.65ZM5.7 4H20.45C20.8333 4 21.125 4.17083 21.325 4.5125C21.525 4.85417 21.5333 5.2 21.35 5.55L17.8 11.95C17.6167 12.2833 17.3708 12.5417 17.0625 12.725C16.7542 12.9083 16.4167 13 16.05 13H8.6L7.5 15H18.5C18.7833 15 19.0208 15.0958 19.2125 15.2875C19.4042 15.4792 19.5 15.7167 19.5 16C19.5 16.2833 19.4042 16.5208 19.2125 16.7125C19.0208 16.9042 18.7833 17 18.5 17H7.5C6.75 17 6.18333 16.6708 5.8 16.0125C5.41667 15.3542 5.4 14.7 5.75 14.05L7.1 11.6L3.5 4H2.5C2.21667 4 1.97917 3.90417 1.7875 3.7125C1.59583 3.52083 1.5 3.28333 1.5 3C1.5 2.71667 1.59583 2.47917 1.7875 2.2875C1.97917 2.09583 2.21667 2 2.5 2H4.125C4.30833 2 4.48333 2.05 4.65 2.15C4.81667 2.25 4.94167 2.39167 5.025 2.575L5.7 4Z", fill: "#525252" })));
|
|
@@ -92,6 +92,9 @@ const VviinnCarousel = class {
|
|
|
92
92
|
this.addToBasketShow = undefined;
|
|
93
93
|
this.updatingAllCards = undefined;
|
|
94
94
|
this.updateButtonLocation = undefined;
|
|
95
|
+
this.currencySign = undefined;
|
|
96
|
+
this.pricePrefix = "";
|
|
97
|
+
this.locale = undefined;
|
|
95
98
|
}
|
|
96
99
|
componentWillLoad() {
|
|
97
100
|
this.isRTL = document.dir === "rtl";
|
|
@@ -281,7 +284,7 @@ const VviinnCarousel = class {
|
|
|
281
284
|
const salePrice = this.isSetMode
|
|
282
285
|
? setModeDiscount
|
|
283
286
|
: recommendation.price.sale;
|
|
284
|
-
return (h("vviinn-product-card", { part: "product-part", productId: recommendation.productId, productTitle: recommendation.title, productType: recommendation.productType, deeplink: recommendation.deeplink, image: recommendation.image.thumbnail, brand: recommendation.brand, imageWidth: this.imageWidth, imageRatio: 1, price: recommendation.price.actual, salePrice: salePrice, responsive: this.isGridMode, dimmedBackground: this.isContinuityMode || this.isSetMode, campaignTypeId: this.campaignTypeId, index: rank, widgetElementId: this.widgetElementId, widgetVersion: this.widgetVersion, addToBasketShow: this.addToBasketShow, mode: this.mode, "data-id": recommendation.productId, updatingAllCards: this.updatingAllCards, defaultAnimationInterval: this.defaultAnimationInterval, updateButtonLocation: this.updateButtonLocation, appliedDiscountPercentage: appliedDiscount, currentDiscountPercentage: this.setModeDiscount }));
|
|
287
|
+
return (h("vviinn-product-card", { part: "product-part", productId: recommendation.productId, productTitle: recommendation.title, productType: recommendation.productType, deeplink: recommendation.deeplink, image: recommendation.image.thumbnail, brand: recommendation.brand, imageWidth: this.imageWidth, imageRatio: 1, price: recommendation.price.actual, salePrice: salePrice, responsive: this.isGridMode, dimmedBackground: this.isContinuityMode || this.isSetMode, campaignTypeId: this.campaignTypeId, index: rank, widgetElementId: this.widgetElementId, widgetVersion: this.widgetVersion, addToBasketShow: this.addToBasketShow, mode: this.mode, "data-id": recommendation.productId, updatingAllCards: this.updatingAllCards, defaultAnimationInterval: this.defaultAnimationInterval, updateButtonLocation: this.updateButtonLocation, appliedDiscountPercentage: appliedDiscount, currentDiscountPercentage: this.setModeDiscount, currency: this.currencySign, pricePrefix: this.pricePrefix, locale: this.locale }));
|
|
285
288
|
}
|
|
286
289
|
renderRecommendationGroup(elements) {
|
|
287
290
|
return (h("div", { class: CONTENT_GROUP_CSS_CLASS, part: "items-group" }, ...elements));
|
|
@@ -314,7 +317,7 @@ const VviinnCarousel = class {
|
|
|
314
317
|
}, onClick: () => this.scroll(index) })));
|
|
315
318
|
}
|
|
316
319
|
render() {
|
|
317
|
-
return (h(Host, { class: this.getClassMap() }, h("div", { class: Object.assign({ body: true }, this.getClassMap()) }, !this.isSetMode && (h("button", { class: "prev", onClick: () => this.handleCarouselButtonClick("left"), part: "carousel-button", disabled: this.gridArrowsDynamic && this.isFirstGroup() }, h(ChevronIcon, null))), this.isSetMode && (h("vviinn-product-card", { part: "product-part", class: "set-mode product-card--source", productTitle: this.sourceProduct.title, image: this.sourceProduct.image.thumbnail, price: this.sourceProduct.price.actual, imageRatio: 1, imageWidth: 300, dimmedBackground: true, isSourceProduct: true })), h("div", { class: this.getContentClassMap() }, this.renderRecommendations()), !this.isSetMode && (h("button", { class: "next", onClick: () => this.handleCarouselButtonClick("right"), part: "carousel-button", disabled: this.gridArrowsDynamic && this.isLastGroup() }, h(ChevronIcon, null)))), this.showBullets() && (h("div", { class: "bullets" }, this.renderBullets()))));
|
|
320
|
+
return (h(Host, { class: this.getClassMap() }, h("div", { class: Object.assign({ body: true }, this.getClassMap()) }, !this.isSetMode && (h("button", { class: "prev", onClick: () => this.handleCarouselButtonClick("left"), part: "carousel-button", disabled: this.gridArrowsDynamic && this.isFirstGroup() }, h(ChevronIcon, null))), this.isSetMode && (h("vviinn-product-card", { part: "product-part", class: "set-mode product-card--source", productTitle: this.sourceProduct.title, image: this.sourceProduct.image.thumbnail, price: this.sourceProduct.price.actual, imageRatio: 1, imageWidth: 300, dimmedBackground: true, isSourceProduct: true, currency: this.currencySign, pricePrefix: this.pricePrefix, locale: this.locale })), h("div", { class: this.getContentClassMap() }, this.renderRecommendations()), !this.isSetMode && (h("button", { class: "next", onClick: () => this.handleCarouselButtonClick("right"), part: "carousel-button", disabled: this.gridArrowsDynamic && this.isLastGroup() }, h(ChevronIcon, null)))), this.showBullets() && (h("div", { class: "bullets" }, this.renderBullets()))));
|
|
318
321
|
}
|
|
319
322
|
get el() { return getElement(this); }
|
|
320
323
|
static get watchers() { return {
|
|
@@ -650,12 +653,11 @@ const VviinnProductCard = class {
|
|
|
650
653
|
return this.responsive ? ResponsiveImage(props) : Image(props);
|
|
651
654
|
}
|
|
652
655
|
render() {
|
|
653
|
-
var _a, _b, _c;
|
|
654
656
|
return (h(Host, { part: "product-card", class: {
|
|
655
657
|
dimmed: this.dimmedBackground,
|
|
656
658
|
animated: this.isTransitioning,
|
|
657
659
|
"set-mode": this.isSetMode,
|
|
658
|
-
}, exportparts: "brand, currency, deeplink, image, image-link, price-amount-sale, price-amount-outdated, price-amount-regular, price-container, price-outdated, price-regular, price-sale, price-prefix, title, basket-button, update-button-item" }, h(Linked, { deeplink: this.deeplink, part: "image-link" }, this.renderImage()), this.isTransitioning ? (h(Fragment, null, h("vviinn-skeleton", { height: 20 }), h("vviinn-skeleton", { height: 20, halfWidth: true }))) : (h(Fragment, null, h(Linked, { deeplink: this.deeplink, part: "deeplink" }, h("span", { class: "title", part: "title" }, this.productTitle)), h("span", { class: "brand", part: "brand" }, this.brand), h("span", { class: "type", part: "type" }, this.productType), h(Price, { prefix:
|
|
660
|
+
}, exportparts: "brand, currency, deeplink, image, image-link, price-amount-sale, price-amount-outdated, price-amount-regular, price-container, price-outdated, price-regular, price-sale, price-prefix, title, basket-button, update-button-item" }, h(Linked, { deeplink: this.deeplink, part: "image-link" }, this.renderImage()), this.isTransitioning ? (h(Fragment, null, h("vviinn-skeleton", { height: 20 }), h("vviinn-skeleton", { height: 20, halfWidth: true }))) : (h(Fragment, null, h(Linked, { deeplink: this.deeplink, part: "deeplink" }, h("span", { class: "title", part: "title" }, this.productTitle)), h("span", { class: "brand", part: "brand" }, this.brand), h("span", { class: "type", part: "type" }, this.productType), h(Price, { prefix: this.pricePrefix, currency: this.currency, price: this.price, salePrice: this.salePrice, locale: this.locale }), this.isSetMode && !this.appliedDiscountPercentage && (h("div", { class: "discount-label" }, `-${this.currentDiscountPercentage}%`)))), (this.addToBasketShow || this.isSetMode) && (h(Fragment, null, this.isTransitioning && h("vviinn-skeleton", { height: 44 }), h("button", { class: {
|
|
659
661
|
"basket-button": true,
|
|
660
662
|
"basket-button-grid": this.isGridMode || this.isSetMode,
|
|
661
663
|
"basket-button-continuity ": this.isContinuityMode,
|
|
@@ -1495,7 +1497,10 @@ const VviinnVprWidget = class {
|
|
|
1495
1497
|
if (this.showingInButton && this.closed)
|
|
1496
1498
|
return;
|
|
1497
1499
|
const slots = this.el.querySelectorAll("[slot]");
|
|
1498
|
-
this.globalSlotsChanged.emit(
|
|
1500
|
+
this.globalSlotsChanged.emit({
|
|
1501
|
+
slots: Array.from(slots),
|
|
1502
|
+
element: this.el,
|
|
1503
|
+
});
|
|
1499
1504
|
}
|
|
1500
1505
|
connectedCallback() {
|
|
1501
1506
|
var _a;
|
|
@@ -1688,7 +1693,7 @@ const VviinnVprWidget = class {
|
|
|
1688
1693
|
: instance.t("noResultText"))))));
|
|
1689
1694
|
}
|
|
1690
1695
|
renderRecommendation(recommendation, index) {
|
|
1691
|
-
return (h("vviinn-product-card", { part: "product-part", productId: recommendation.productId, productTitle: recommendation.title, productType: recommendation.productType, deeplink: recommendation.deeplink, image: recommendation.image.thumbnail, brand: recommendation.brand, imageWidth: this.imageWidth, imageRatio: 1, price: recommendation.price.actual, salePrice: recommendation.price.sale, responsive: this.isGridMode, addToBasketShow: this.addToBasketShow, mode: this.mode, dimmedBackground: this.useDimmedBackgroundInCard(), campaignTypeId: this.campaignType, index: index, widgetElementId: this.id, widgetVersion: version }));
|
|
1696
|
+
return (h("vviinn-product-card", { part: "product-part", productId: recommendation.productId, productTitle: recommendation.title, productType: recommendation.productType, deeplink: recommendation.deeplink, image: recommendation.image.thumbnail, brand: recommendation.brand, imageWidth: this.imageWidth, imageRatio: 1, price: recommendation.price.actual, salePrice: recommendation.price.sale, responsive: this.isGridMode, addToBasketShow: this.addToBasketShow, mode: this.mode, dimmedBackground: this.useDimmedBackgroundInCard(), campaignTypeId: this.campaignType, index: index, widgetElementId: this.id, widgetVersion: version, currency: this.currencySign, pricePrefix: this.pricePrefix, locale: this.locale }));
|
|
1692
1697
|
}
|
|
1693
1698
|
useDimmedBackgroundInCard() {
|
|
1694
1699
|
return this.isContinuityMode || this.isSetMode || !this.useCarousel;
|
|
@@ -1697,7 +1702,7 @@ const VviinnVprWidget = class {
|
|
|
1697
1702
|
return (h("div", { class: "recommendations-grid", part: "recommendations-grid" }, this.recommendations.map((r, i) => this.renderRecommendation(r, i))));
|
|
1698
1703
|
}
|
|
1699
1704
|
renderCarousel() {
|
|
1700
|
-
return (h("vviinn-carousel", { mode: this.mode, campaignTypeId: this.campaignType, imageWidth: this.imageWidth, showScroll: this.showScroll, recommendations: this.recommendations, widgetElementId: this.id, widgetVersion: version, gridArrowsDynamic: this.gridArrowsDynamic, addToBasketShow: this.addToBasketShow, updatingAllCards: this.updatingAllCards, updateButtonLocation: this.updateButtonLocation }));
|
|
1705
|
+
return (h("vviinn-carousel", { mode: this.mode, campaignTypeId: this.campaignType, imageWidth: this.imageWidth, showScroll: this.showScroll, recommendations: this.recommendations, widgetElementId: this.id, widgetVersion: version, gridArrowsDynamic: this.gridArrowsDynamic, addToBasketShow: this.addToBasketShow, updatingAllCards: this.updatingAllCards, updateButtonLocation: this.updateButtonLocation, currencySign: this.currencySign, pricePrefix: this.pricePrefix, locale: this.locale }));
|
|
1701
1706
|
}
|
|
1702
1707
|
get el() { return getElement(this); }
|
|
1703
1708
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-1f3eaf12.js';
|
|
2
|
-
import { s as searchState } from './search.store-
|
|
2
|
+
import { s as searchState } from './search.store-d789660d.js';
|
|
3
3
|
|
|
4
4
|
const vviinnPreloaderCss = ":host{--preloader-size:24px;--preloader-width:calc(var(--preloader-size) / 6);transform-origin:center;animation:rotate 3s linear infinite;border:var(--preloader-width) solid currentColor;border-radius:50%;border-top-color:transparent;display:none;outline:0;width:var(--preloader-size);height:var(--preloader-size);box-sizing:border-box}:host(.active){display:flex}@keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-1f3eaf12.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-3ce7cddb.js';
|
|
3
3
|
import { V as VisualSearchIcon } from './VisualSearchIcon-13f7da6a.js';
|
|
4
4
|
|
|
5
5
|
const vviinnVprButtonCss = ":host{display:block}";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-1f3eaf12.js';
|
|
2
|
-
import { v as version } from './package-
|
|
3
|
-
import { c as campaignTypeNames, S as SlotSkeleton } from './customized-slots-
|
|
2
|
+
import { v as version } from './package-3ce7cddb.js';
|
|
3
|
+
import { c as campaignTypeNames, S as SlotSkeleton } from './customized-slots-e9494032.js';
|
|
4
4
|
import { D as DEFAULT_EXAMPLE_IMAGE } from './constants-8bf233a9.js';
|
|
5
5
|
|
|
6
6
|
const CameraIcon = () => (h("svg", { width: "22", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -53,7 +53,10 @@ const VviinnVpsButton = class {
|
|
|
53
53
|
}
|
|
54
54
|
componentDidLoad() {
|
|
55
55
|
const slots = this.el.querySelectorAll("[slot]");
|
|
56
|
-
this.globalSlotsChanged.emit(
|
|
56
|
+
this.globalSlotsChanged.emit({
|
|
57
|
+
slots: Array.from(slots),
|
|
58
|
+
element: this.el,
|
|
59
|
+
});
|
|
57
60
|
}
|
|
58
61
|
handleClick() {
|
|
59
62
|
this.buttonPressed = true;
|