vviinn-widgets 2.28.0 → 2.29.0

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.
Files changed (40) hide show
  1. package/dist/cjs/{package-2c1dfbe0.js → package-2bbc82df.js} +1 -1
  2. package/dist/cjs/vviinn-carousel_3.cjs.entry.js +16 -9
  3. package/dist/cjs/vviinn-vpr-button.cjs.entry.js +1 -1
  4. package/dist/cjs/vviinn-vps-button.cjs.entry.js +1 -1
  5. package/dist/cjs/vviinn-vps-widget.cjs.entry.js +15 -8
  6. package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +5 -5
  7. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +3 -3
  8. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +17 -10
  9. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +3 -3
  10. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +17 -10
  11. package/dist/esm/{package-ed187917.js → package-fbba5beb.js} +1 -1
  12. package/dist/esm/vviinn-carousel_3.entry.js +16 -9
  13. package/dist/esm/vviinn-vpr-button.entry.js +1 -1
  14. package/dist/esm/vviinn-vps-button.entry.js +1 -1
  15. package/dist/esm/vviinn-vps-widget.entry.js +15 -8
  16. package/dist/types/recommendation/events.d.ts +1 -0
  17. package/{www/build/p-02a84a90.entry.js → dist/vviinn-widgets/p-0fd3fc41.entry.js} +1 -1
  18. package/dist/vviinn-widgets/{p-bf490f6f.entry.js → p-7069450a.entry.js} +1 -1
  19. package/dist/vviinn-widgets/p-835af647.js +1 -0
  20. package/dist/vviinn-widgets/p-b1a1366c.entry.js +1 -0
  21. package/dist/vviinn-widgets/p-f7e7e96b.entry.js +1 -0
  22. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  23. package/package.json +1 -1
  24. package/{dist/vviinn-widgets/p-02a84a90.entry.js → www/build/p-0fd3fc41.entry.js} +1 -1
  25. package/www/build/{p-bf490f6f.entry.js → p-7069450a.entry.js} +1 -1
  26. package/www/build/p-835af647.js +1 -0
  27. package/www/build/p-a67898be.css +1 -0
  28. package/www/build/p-b1a1366c.entry.js +1 -0
  29. package/www/build/p-da7e00d1.js +1 -0
  30. package/www/build/p-f7e7e96b.entry.js +1 -0
  31. package/www/build/vviinn-widgets.esm.js +1 -1
  32. package/www/index.html +1 -1
  33. package/dist/vviinn-widgets/p-6b12aed8.entry.js +0 -1
  34. package/dist/vviinn-widgets/p-f9858364.entry.js +0 -1
  35. package/dist/vviinn-widgets/p-fc5a0363.js +0 -1
  36. package/www/build/p-6b12aed8.entry.js +0 -1
  37. package/www/build/p-8b25b766.js +0 -161
  38. package/www/build/p-e0153ae2.css +0 -6
  39. package/www/build/p-f9858364.entry.js +0 -1
  40. package/www/build/p-fc5a0363.js +0 -1
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
 
3
- const version = "2.28.0";
3
+ const version = "2.29.0";
4
4
 
5
5
  exports.version = version;
@@ -7,7 +7,7 @@ const imageSearch_store = require('./imageSearch.store-dc4e98b3.js');
7
7
  const index$1 = require('./index-fcf59d51.js');
8
8
  const i18next = require('./i18next-74ff3413.js');
9
9
  const customizedSlots = require('./customized-slots-0a8d663c.js');
10
- const _package = require('./package-2c1dfbe0.js');
10
+ const _package = require('./package-2bbc82df.js');
11
11
  const index$2 = require('./index-ea4811ba.js');
12
12
 
13
13
  const vviinnCarouselCss = ":host{--vviinn-progressbar-width:0;--vviinn-carousel-item-width:150px;--vviinn-carousel-columns-internal:var(--vviinn-carousel-columns, 4);--vviinn-carousel-image-width-system:140px}.body{display:flex;position:relative;width:var(--vviinn-carousel-content-width);flex-direction:column}.content-wrapper *{box-sizing:border-box}.content-wrapper{overflow-y:hidden;overflow-x:auto;flex-grow:1}.bullets{margin-top:16px;display:flex;flex-direction:row;grid-gap:24px;justify-content:center}.bullet{width:10px;height:10px;background:#e0e0e0;border-radius:50%;cursor:pointer}.bullet.active{background:#161616}.content:not(.show-scrollbar),.content.grid{scrollbar-color:#fff0 #fff0}.content:not(.show-scrollbar)::-webkit-scrollbar,.content.grid::-webkit-scrollbar{opacity:0}.content{display:flex;flex-direction:row;grid-gap:8px;overflow-y:hidden;overflow-x:auto;flex-grow:1;padding-bottom:16px}.content.left>*{scroll-snap-align:start}.content.right>*{scroll-snap-align:end}:host(.continuity) button{border-radius:2px}:host(.grid) button{border-radius:50%}button{align-items:center;background-color:white;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);cursor:pointer;display:grid;height:40px;justify-items:center;position:absolute;top:calc(50% - 20px);width:40px;z-index:1;padding:0;margin:0}button{fill:#525252}button:disabled{display:none}button.prev svg{transform:rotate(180deg);margin-left:-5px}.prev{left:0}.next{right:0}.items-group{display:grid;grid-gap:16px;grid-template-columns:repeat(var(--vviinn-carousel-columns-internal), 1fr);min-width:100%}vviinn-product-card::part(price-container){text-align:center}:host(.classic) vviinn-product-card::part(title),:host(.classic) vviinn-product-card::part(brand),:host(.classic) vviinn-product-card::part(type){text-align:center}@media (max-width: 480px){:host(.modern) button{display:none}.items-group{grid-template-columns:repeat(2, 1fr)}}";
@@ -492,7 +492,7 @@ const VviinnProductCard = class {
492
492
  links.forEach((link) => link.addEventListener("click", (event) => {
493
493
  event.preventDefault();
494
494
  event.stopImmediatePropagation();
495
- this.vviinnProductClick.emit(this.productData);
495
+ this.vviinnProductClick.emit(Object.assign(Object.assign({}, this.productData), { clickEvent: event }));
496
496
  imageSearch_store._function.pipe(getAnalyticsModule, imageSearch_store.Option.match(() => null, (analytics) => analytics.sendClick(this.getProduct())));
497
497
  }));
498
498
  }
@@ -1283,9 +1283,15 @@ const VviinnVprWidget = class {
1283
1283
  widgetVersion: _package.version,
1284
1284
  };
1285
1285
  }
1286
- handleOpenLink(deeplink) {
1287
- if (this.productDetailNewTab) {
1288
- window.open(deeplink);
1286
+ handleOpenLink(deeplink, event) {
1287
+ if (this.productDetailNewTab || event.ctrlKey || event.metaKey) {
1288
+ let newTab = window.open();
1289
+ if (newTab) {
1290
+ newTab.location.href = deeplink;
1291
+ }
1292
+ else {
1293
+ window.location.href = deeplink;
1294
+ }
1289
1295
  }
1290
1296
  else {
1291
1297
  window.location.href = deeplink;
@@ -1368,7 +1374,8 @@ const VviinnVprWidget = class {
1368
1374
  .then(this.setTrackingDeactivated);
1369
1375
  }
1370
1376
  async trackProductClick({ detail }) {
1371
- const product = this.recommendations.find((r) => r.productId === detail.productId);
1377
+ const { productId, clickEvent } = detail;
1378
+ const product = this.recommendations.find((r) => r.productId === productId);
1372
1379
  if (!product || !product.deeplink)
1373
1380
  return;
1374
1381
  const productClickEvent = this.getProductTrackEvent(detail, "click");
@@ -1377,11 +1384,11 @@ const VviinnVprWidget = class {
1377
1384
  .trackEvent(productClickEvent)
1378
1385
  .then(this.setTrackingDeactivated)
1379
1386
  .finally(() => {
1380
- this.handleOpenLink(product.deeplink);
1387
+ this.handleOpenLink(product.deeplink, clickEvent);
1381
1388
  });
1382
1389
  }
1383
1390
  else {
1384
- this.handleOpenLink(product.deeplink);
1391
+ this.handleOpenLink(product.deeplink, clickEvent);
1385
1392
  }
1386
1393
  }
1387
1394
  async trackAddToBasket({ detail }) {
@@ -1415,7 +1422,7 @@ const VviinnVprWidget = class {
1415
1422
  getProductTrackEvent(detail, eventType) {
1416
1423
  if (this.trackingDeactivated)
1417
1424
  return null;
1418
- const { productRank, productId, campaignTypeId, widgetType } = detail, rest = __rest(detail, ["productRank", "productId", "campaignTypeId", "widgetType"]);
1425
+ const { productRank, productId, campaignTypeId, widgetType, clickEvent } = detail, rest = __rest(detail, ["productRank", "productId", "campaignTypeId", "widgetType", "clickEvent"]);
1419
1426
  let productEvent;
1420
1427
  const eventBody = Object.assign({ session_id: this.uiSessionId, rank: productRank, product: productId }, rest);
1421
1428
  if (campaignTypeId === "VCS") {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-5619b5ec.js');
6
- const _package = require('./package-2c1dfbe0.js');
6
+ const _package = require('./package-2bbc82df.js');
7
7
  const index$1 = require('./index-fcf59d51.js');
8
8
 
9
9
  const vviinnVprButtonCss = ":host{display:block}";
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-5619b5ec.js');
6
- const _package = require('./package-2c1dfbe0.js');
6
+ const _package = require('./package-2bbc82df.js');
7
7
  const index$1 = require('./index-fcf59d51.js');
8
8
  const customizedSlots = require('./customized-slots-0a8d663c.js');
9
9
 
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-5619b5ec.js');
6
6
  const imageSearch_store = require('./imageSearch.store-dc4e98b3.js');
7
7
  const i18next = require('./i18next-74ff3413.js');
8
- const _package = require('./package-2c1dfbe0.js');
8
+ const _package = require('./package-2bbc82df.js');
9
9
  const customizedSlots = require('./customized-slots-0a8d663c.js');
10
10
  const index$1 = require('./index-ea4811ba.js');
11
11
 
@@ -151,9 +151,15 @@ const VviinnVpsWidget = class {
151
151
  isResultSlide() {
152
152
  return this.slidePosition === 1;
153
153
  }
154
- handleOpenLink(deeplink) {
155
- if (this.productDetailNewTab) {
156
- window.open(deeplink);
154
+ handleOpenLink(deeplink, event) {
155
+ if (this.productDetailNewTab || event.ctrlKey || event.metaKey) {
156
+ let newTab = window.open();
157
+ if (newTab) {
158
+ newTab.location.href = deeplink;
159
+ }
160
+ else {
161
+ window.location.href = deeplink;
162
+ }
157
163
  }
158
164
  else {
159
165
  window.location.href = deeplink;
@@ -198,8 +204,9 @@ const VviinnVpsWidget = class {
198
204
  .then(this.setTrackingDeactivated);
199
205
  }
200
206
  async trackProductClick({ detail }) {
207
+ const { productId, clickEvent } = detail;
201
208
  const productClickEvent = this.getProductTrackEvent(detail, "click");
202
- const product = imageSearch_store.imageSearchState.results.find((r) => r.productId === detail.productId);
209
+ const product = imageSearch_store.imageSearchState.results.find((r) => r.productId === productId);
203
210
  if (!product || !product.deeplink)
204
211
  return;
205
212
  if (!this.trackingDeactivated) {
@@ -207,11 +214,11 @@ const VviinnVpsWidget = class {
207
214
  .trackEvent(this.trackingDeactivated ? null : productClickEvent)
208
215
  .then(this.setTrackingDeactivated)
209
216
  .finally(() => {
210
- this.handleOpenLink(product.deeplink);
217
+ this.handleOpenLink(product.deeplink, clickEvent);
211
218
  });
212
219
  }
213
220
  else {
214
- this.handleOpenLink(product.deeplink);
221
+ this.handleOpenLink(product.deeplink, clickEvent);
215
222
  }
216
223
  }
217
224
  trachSearchAreaChanges() {
@@ -276,7 +283,7 @@ const VviinnVpsWidget = class {
276
283
  getProductTrackEvent(detail, eventType) {
277
284
  if (this.trackingDeactivated)
278
285
  return null;
279
- const { productRank, productId, campaignTypeId, widgetType } = detail, rest = __rest(detail, ["productRank", "productId", "campaignTypeId", "widgetType"]);
286
+ const { productRank, productId, campaignTypeId, widgetType, clickEvent } = detail, rest = __rest(detail, ["productRank", "productId", "campaignTypeId", "widgetType", "clickEvent"]);
280
287
  const eventBody = Object.assign({ session_id: this.uiSessionId, rank: productRank, product: productId }, rest);
281
288
  const productEvent = index$1.createProductVpsEventByType(eventType)(eventBody);
282
289
  return productEvent;
@@ -94,7 +94,7 @@ export class VviinnProductCard {
94
94
  links.forEach((link) => link.addEventListener("click", (event) => {
95
95
  event.preventDefault();
96
96
  event.stopImmediatePropagation();
97
- this.vviinnProductClick.emit(this.productData);
97
+ this.vviinnProductClick.emit(Object.assign(Object.assign({}, this.productData), { clickEvent: event }));
98
98
  pipe(getAnalyticsModule, O.match(() => null, (analytics) => analytics.sendClick(this.getProduct())));
99
99
  }));
100
100
  }
@@ -553,7 +553,7 @@ export class VviinnProductCard {
553
553
  },
554
554
  "complexType": {
555
555
  "original": "ProductCardEventData",
556
- "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; }",
556
+ "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; clickEvent?: MouseEvent; }",
557
557
  "references": {
558
558
  "ProductCardEventData": {
559
559
  "location": "import",
@@ -573,7 +573,7 @@ export class VviinnProductCard {
573
573
  },
574
574
  "complexType": {
575
575
  "original": "ProductCardEventData",
576
- "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; }",
576
+ "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; clickEvent?: MouseEvent; }",
577
577
  "references": {
578
578
  "ProductCardEventData": {
579
579
  "location": "import",
@@ -593,7 +593,7 @@ export class VviinnProductCard {
593
593
  },
594
594
  "complexType": {
595
595
  "original": "ProductCardEventData",
596
- "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; }",
596
+ "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; clickEvent?: MouseEvent; }",
597
597
  "references": {
598
598
  "ProductCardEventData": {
599
599
  "location": "import",
@@ -613,7 +613,7 @@ export class VviinnProductCard {
613
613
  },
614
614
  "complexType": {
615
615
  "original": "ProductCardEventData",
616
- "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; }",
616
+ "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; clickEvent?: MouseEvent; }",
617
617
  "references": {
618
618
  "ProductCardEventData": {
619
619
  "location": "import",
@@ -560,7 +560,7 @@ export class VviinnVprButton {
560
560
  },
561
561
  "complexType": {
562
562
  "original": "ProductCardEventData",
563
- "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; }",
563
+ "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; clickEvent?: MouseEvent; }",
564
564
  "references": {
565
565
  "ProductCardEventData": {
566
566
  "location": "import",
@@ -580,7 +580,7 @@ export class VviinnVprButton {
580
580
  },
581
581
  "complexType": {
582
582
  "original": "ProductCardEventData",
583
- "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; }",
583
+ "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; clickEvent?: MouseEvent; }",
584
584
  "references": {
585
585
  "ProductCardEventData": {
586
586
  "location": "import",
@@ -600,7 +600,7 @@ export class VviinnVprButton {
600
600
  },
601
601
  "complexType": {
602
602
  "original": "ProductCardEventData",
603
- "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; }",
603
+ "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; clickEvent?: MouseEvent; }",
604
604
  "references": {
605
605
  "ProductCardEventData": {
606
606
  "location": "import",
@@ -101,9 +101,15 @@ export class VviinnVprWidget {
101
101
  widgetVersion: version,
102
102
  };
103
103
  }
104
- handleOpenLink(deeplink) {
105
- if (this.productDetailNewTab) {
106
- window.open(deeplink);
104
+ handleOpenLink(deeplink, event) {
105
+ if (this.productDetailNewTab || event.ctrlKey || event.metaKey) {
106
+ let newTab = window.open();
107
+ if (newTab) {
108
+ newTab.location.href = deeplink;
109
+ }
110
+ else {
111
+ window.location.href = deeplink;
112
+ }
107
113
  }
108
114
  else {
109
115
  window.location.href = deeplink;
@@ -186,7 +192,8 @@ export class VviinnVprWidget {
186
192
  .then(this.setTrackingDeactivated);
187
193
  }
188
194
  async trackProductClick({ detail }) {
189
- const product = this.recommendations.find((r) => r.productId === detail.productId);
195
+ const { productId, clickEvent } = detail;
196
+ const product = this.recommendations.find((r) => r.productId === productId);
190
197
  if (!product || !product.deeplink)
191
198
  return;
192
199
  const productClickEvent = this.getProductTrackEvent(detail, "click");
@@ -195,11 +202,11 @@ export class VviinnVprWidget {
195
202
  .trackEvent(productClickEvent)
196
203
  .then(this.setTrackingDeactivated)
197
204
  .finally(() => {
198
- this.handleOpenLink(product.deeplink);
205
+ this.handleOpenLink(product.deeplink, clickEvent);
199
206
  });
200
207
  }
201
208
  else {
202
- this.handleOpenLink(product.deeplink);
209
+ this.handleOpenLink(product.deeplink, clickEvent);
203
210
  }
204
211
  }
205
212
  async trackAddToBasket({ detail }) {
@@ -233,7 +240,7 @@ export class VviinnVprWidget {
233
240
  getProductTrackEvent(detail, eventType) {
234
241
  if (this.trackingDeactivated)
235
242
  return null;
236
- const { productRank, productId, campaignTypeId, widgetType } = detail, rest = __rest(detail, ["productRank", "productId", "campaignTypeId", "widgetType"]);
243
+ const { productRank, productId, campaignTypeId, widgetType, clickEvent } = detail, rest = __rest(detail, ["productRank", "productId", "campaignTypeId", "widgetType", "clickEvent"]);
237
244
  let productEvent;
238
245
  const eventBody = Object.assign({ session_id: this.uiSessionId, rank: productRank, product: productId }, rest);
239
246
  if (campaignTypeId === "VCS") {
@@ -855,7 +862,7 @@ export class VviinnVprWidget {
855
862
  },
856
863
  "complexType": {
857
864
  "original": "ProductCardEventData",
858
- "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; }",
865
+ "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; clickEvent?: MouseEvent; }",
859
866
  "references": {
860
867
  "ProductCardEventData": {
861
868
  "location": "import",
@@ -875,7 +882,7 @@ export class VviinnVprWidget {
875
882
  },
876
883
  "complexType": {
877
884
  "original": "ProductCardEventData",
878
- "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; }",
885
+ "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; clickEvent?: MouseEvent; }",
879
886
  "references": {
880
887
  "ProductCardEventData": {
881
888
  "location": "import",
@@ -895,7 +902,7 @@ export class VviinnVprWidget {
895
902
  },
896
903
  "complexType": {
897
904
  "original": "ProductCardEventData",
898
- "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; }",
905
+ "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; clickEvent?: MouseEvent; }",
899
906
  "references": {
900
907
  "ProductCardEventData": {
901
908
  "location": "import",
@@ -379,7 +379,7 @@ export class VviinnVpsButton {
379
379
  },
380
380
  "complexType": {
381
381
  "original": "ProductCardEventData",
382
- "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; }",
382
+ "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; clickEvent?: MouseEvent; }",
383
383
  "references": {
384
384
  "ProductCardEventData": {
385
385
  "location": "import",
@@ -399,7 +399,7 @@ export class VviinnVpsButton {
399
399
  },
400
400
  "complexType": {
401
401
  "original": "ProductCardEventData",
402
- "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; }",
402
+ "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; clickEvent?: MouseEvent; }",
403
403
  "references": {
404
404
  "ProductCardEventData": {
405
405
  "location": "import",
@@ -419,7 +419,7 @@ export class VviinnVpsButton {
419
419
  },
420
420
  "complexType": {
421
421
  "original": "ProductCardEventData",
422
- "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; }",
422
+ "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; clickEvent?: MouseEvent; }",
423
423
  "references": {
424
424
  "ProductCardEventData": {
425
425
  "location": "import",
@@ -118,9 +118,15 @@ export class VviinnVpsWidget {
118
118
  isResultSlide() {
119
119
  return this.slidePosition === 1;
120
120
  }
121
- handleOpenLink(deeplink) {
122
- if (this.productDetailNewTab) {
123
- window.open(deeplink);
121
+ handleOpenLink(deeplink, event) {
122
+ if (this.productDetailNewTab || event.ctrlKey || event.metaKey) {
123
+ let newTab = window.open();
124
+ if (newTab) {
125
+ newTab.location.href = deeplink;
126
+ }
127
+ else {
128
+ window.location.href = deeplink;
129
+ }
124
130
  }
125
131
  else {
126
132
  window.location.href = deeplink;
@@ -165,8 +171,9 @@ export class VviinnVpsWidget {
165
171
  .then(this.setTrackingDeactivated);
166
172
  }
167
173
  async trackProductClick({ detail }) {
174
+ const { productId, clickEvent } = detail;
168
175
  const productClickEvent = this.getProductTrackEvent(detail, "click");
169
- const product = imageSearchState.results.find((r) => r.productId === detail.productId);
176
+ const product = imageSearchState.results.find((r) => r.productId === productId);
170
177
  if (!product || !product.deeplink)
171
178
  return;
172
179
  if (!this.trackingDeactivated) {
@@ -174,11 +181,11 @@ export class VviinnVpsWidget {
174
181
  .trackEvent(this.trackingDeactivated ? null : productClickEvent)
175
182
  .then(this.setTrackingDeactivated)
176
183
  .finally(() => {
177
- this.handleOpenLink(product.deeplink);
184
+ this.handleOpenLink(product.deeplink, clickEvent);
178
185
  });
179
186
  }
180
187
  else {
181
- this.handleOpenLink(product.deeplink);
188
+ this.handleOpenLink(product.deeplink, clickEvent);
182
189
  }
183
190
  }
184
191
  trachSearchAreaChanges() {
@@ -243,7 +250,7 @@ export class VviinnVpsWidget {
243
250
  getProductTrackEvent(detail, eventType) {
244
251
  if (this.trackingDeactivated)
245
252
  return null;
246
- const { productRank, productId, campaignTypeId, widgetType } = detail, rest = __rest(detail, ["productRank", "productId", "campaignTypeId", "widgetType"]);
253
+ const { productRank, productId, campaignTypeId, widgetType, clickEvent } = detail, rest = __rest(detail, ["productRank", "productId", "campaignTypeId", "widgetType", "clickEvent"]);
247
254
  const eventBody = Object.assign({ session_id: this.uiSessionId, rank: productRank, product: productId }, rest);
248
255
  const productEvent = createProductVpsEventByType(eventType)(eventBody);
249
256
  return productEvent;
@@ -737,7 +744,7 @@ export class VviinnVpsWidget {
737
744
  },
738
745
  "complexType": {
739
746
  "original": "ProductCardEventData",
740
- "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; }",
747
+ "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; clickEvent?: MouseEvent; }",
741
748
  "references": {
742
749
  "ProductCardEventData": {
743
750
  "location": "import",
@@ -757,7 +764,7 @@ export class VviinnVpsWidget {
757
764
  },
758
765
  "complexType": {
759
766
  "original": "ProductCardEventData",
760
- "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; }",
767
+ "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; clickEvent?: MouseEvent; }",
761
768
  "references": {
762
769
  "ProductCardEventData": {
763
770
  "location": "import",
@@ -777,7 +784,7 @@ export class VviinnVpsWidget {
777
784
  },
778
785
  "complexType": {
779
786
  "original": "ProductCardEventData",
780
- "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; }",
787
+ "resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VPS\" | \"VCS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; clickEvent?: MouseEvent; }",
781
788
  "references": {
782
789
  "ProductCardEventData": {
783
790
  "location": "import",
@@ -1,3 +1,3 @@
1
- const version = "2.28.0";
1
+ const version = "2.29.0";
2
2
 
3
3
  export { version as v };
@@ -3,7 +3,7 @@ import { _ as _Array, O as Option, S as Semigroup, a as _function, h as has, t a
3
3
  import { C as ChevronIcon } from './index-d1215e03.js';
4
4
  import { i as instance } from './i18next-387f2b0a.js';
5
5
  import { s as slotChangeListener, c as campaignTypeNames, f as fromString, a as fold, S as SlotSkeleton } from './customized-slots-136b5f71.js';
6
- import { v as version } from './package-ed187917.js';
6
+ import { v as version } from './package-fbba5beb.js';
7
7
  import { v as v4, c as createTrackingApi, a as createAddToBasketVpcEvent, b as createAddToBasketVprEvent, d as createWidgetVpcEvent, e as createWidgetVprEvent, f as createProductVpcEventByType, g as createProductVprEventByType } from './index-95fa66d2.js';
8
8
 
9
9
  const vviinnCarouselCss = ":host{--vviinn-progressbar-width:0;--vviinn-carousel-item-width:150px;--vviinn-carousel-columns-internal:var(--vviinn-carousel-columns, 4);--vviinn-carousel-image-width-system:140px}.body{display:flex;position:relative;width:var(--vviinn-carousel-content-width);flex-direction:column}.content-wrapper *{box-sizing:border-box}.content-wrapper{overflow-y:hidden;overflow-x:auto;flex-grow:1}.bullets{margin-top:16px;display:flex;flex-direction:row;grid-gap:24px;justify-content:center}.bullet{width:10px;height:10px;background:#e0e0e0;border-radius:50%;cursor:pointer}.bullet.active{background:#161616}.content:not(.show-scrollbar),.content.grid{scrollbar-color:#fff0 #fff0}.content:not(.show-scrollbar)::-webkit-scrollbar,.content.grid::-webkit-scrollbar{opacity:0}.content{display:flex;flex-direction:row;grid-gap:8px;overflow-y:hidden;overflow-x:auto;flex-grow:1;padding-bottom:16px}.content.left>*{scroll-snap-align:start}.content.right>*{scroll-snap-align:end}:host(.continuity) button{border-radius:2px}:host(.grid) button{border-radius:50%}button{align-items:center;background-color:white;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);cursor:pointer;display:grid;height:40px;justify-items:center;position:absolute;top:calc(50% - 20px);width:40px;z-index:1;padding:0;margin:0}button{fill:#525252}button:disabled{display:none}button.prev svg{transform:rotate(180deg);margin-left:-5px}.prev{left:0}.next{right:0}.items-group{display:grid;grid-gap:16px;grid-template-columns:repeat(var(--vviinn-carousel-columns-internal), 1fr);min-width:100%}vviinn-product-card::part(price-container){text-align:center}:host(.classic) vviinn-product-card::part(title),:host(.classic) vviinn-product-card::part(brand),:host(.classic) vviinn-product-card::part(type){text-align:center}@media (max-width: 480px){:host(.modern) button{display:none}.items-group{grid-template-columns:repeat(2, 1fr)}}";
@@ -488,7 +488,7 @@ const VviinnProductCard = class {
488
488
  links.forEach((link) => link.addEventListener("click", (event) => {
489
489
  event.preventDefault();
490
490
  event.stopImmediatePropagation();
491
- this.vviinnProductClick.emit(this.productData);
491
+ this.vviinnProductClick.emit(Object.assign(Object.assign({}, this.productData), { clickEvent: event }));
492
492
  _function.pipe(getAnalyticsModule, Option.match(() => null, (analytics) => analytics.sendClick(this.getProduct())));
493
493
  }));
494
494
  }
@@ -1279,9 +1279,15 @@ const VviinnVprWidget = class {
1279
1279
  widgetVersion: version,
1280
1280
  };
1281
1281
  }
1282
- handleOpenLink(deeplink) {
1283
- if (this.productDetailNewTab) {
1284
- window.open(deeplink);
1282
+ handleOpenLink(deeplink, event) {
1283
+ if (this.productDetailNewTab || event.ctrlKey || event.metaKey) {
1284
+ let newTab = window.open();
1285
+ if (newTab) {
1286
+ newTab.location.href = deeplink;
1287
+ }
1288
+ else {
1289
+ window.location.href = deeplink;
1290
+ }
1285
1291
  }
1286
1292
  else {
1287
1293
  window.location.href = deeplink;
@@ -1364,7 +1370,8 @@ const VviinnVprWidget = class {
1364
1370
  .then(this.setTrackingDeactivated);
1365
1371
  }
1366
1372
  async trackProductClick({ detail }) {
1367
- const product = this.recommendations.find((r) => r.productId === detail.productId);
1373
+ const { productId, clickEvent } = detail;
1374
+ const product = this.recommendations.find((r) => r.productId === productId);
1368
1375
  if (!product || !product.deeplink)
1369
1376
  return;
1370
1377
  const productClickEvent = this.getProductTrackEvent(detail, "click");
@@ -1373,11 +1380,11 @@ const VviinnVprWidget = class {
1373
1380
  .trackEvent(productClickEvent)
1374
1381
  .then(this.setTrackingDeactivated)
1375
1382
  .finally(() => {
1376
- this.handleOpenLink(product.deeplink);
1383
+ this.handleOpenLink(product.deeplink, clickEvent);
1377
1384
  });
1378
1385
  }
1379
1386
  else {
1380
- this.handleOpenLink(product.deeplink);
1387
+ this.handleOpenLink(product.deeplink, clickEvent);
1381
1388
  }
1382
1389
  }
1383
1390
  async trackAddToBasket({ detail }) {
@@ -1411,7 +1418,7 @@ const VviinnVprWidget = class {
1411
1418
  getProductTrackEvent(detail, eventType) {
1412
1419
  if (this.trackingDeactivated)
1413
1420
  return null;
1414
- const { productRank, productId, campaignTypeId, widgetType } = detail, rest = __rest(detail, ["productRank", "productId", "campaignTypeId", "widgetType"]);
1421
+ const { productRank, productId, campaignTypeId, widgetType, clickEvent } = detail, rest = __rest(detail, ["productRank", "productId", "campaignTypeId", "widgetType", "clickEvent"]);
1415
1422
  let productEvent;
1416
1423
  const eventBody = Object.assign({ session_id: this.uiSessionId, rank: productRank, product: productId }, rest);
1417
1424
  if (campaignTypeId === "VCS") {
@@ -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-ed187917.js';
2
+ import { v as version } from './package-fbba5beb.js';
3
3
  import { V as VisualSearchIcon } from './index-d1215e03.js';
4
4
 
5
5
  const vviinnVprButtonCss = ":host{display:block}";
@@ -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-ed187917.js';
2
+ import { v as version } from './package-fbba5beb.js';
3
3
  import { a as CameraIcon } from './index-d1215e03.js';
4
4
  import { c as campaignTypeNames, S as SlotSkeleton } from './customized-slots-136b5f71.js';
5
5
 
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-1f3eaf12.js';
2
2
  import { i as imageSearchState, s as state, a as _function, O as Option, k as parseExcluded, q as isEmpty } from './imageSearch.store-c0f2a178.js';
3
3
  import { i as instance } from './i18next-387f2b0a.js';
4
- import { v as version } from './package-ed187917.js';
4
+ import { v as version } from './package-fbba5beb.js';
5
5
  import { c as campaignTypeNames, s as slotChangeListener, S as SlotSkeleton } from './customized-slots-136b5f71.js';
6
6
  import { h as createSearchEvent, i as createFilterEvent, v as v4, c as createTrackingApi, j as createWidgetVpsEvent, k as createProductVpsEventByType } from './index-95fa66d2.js';
7
7
 
@@ -147,9 +147,15 @@ const VviinnVpsWidget = class {
147
147
  isResultSlide() {
148
148
  return this.slidePosition === 1;
149
149
  }
150
- handleOpenLink(deeplink) {
151
- if (this.productDetailNewTab) {
152
- window.open(deeplink);
150
+ handleOpenLink(deeplink, event) {
151
+ if (this.productDetailNewTab || event.ctrlKey || event.metaKey) {
152
+ let newTab = window.open();
153
+ if (newTab) {
154
+ newTab.location.href = deeplink;
155
+ }
156
+ else {
157
+ window.location.href = deeplink;
158
+ }
153
159
  }
154
160
  else {
155
161
  window.location.href = deeplink;
@@ -194,8 +200,9 @@ const VviinnVpsWidget = class {
194
200
  .then(this.setTrackingDeactivated);
195
201
  }
196
202
  async trackProductClick({ detail }) {
203
+ const { productId, clickEvent } = detail;
197
204
  const productClickEvent = this.getProductTrackEvent(detail, "click");
198
- const product = imageSearchState.results.find((r) => r.productId === detail.productId);
205
+ const product = imageSearchState.results.find((r) => r.productId === productId);
199
206
  if (!product || !product.deeplink)
200
207
  return;
201
208
  if (!this.trackingDeactivated) {
@@ -203,11 +210,11 @@ const VviinnVpsWidget = class {
203
210
  .trackEvent(this.trackingDeactivated ? null : productClickEvent)
204
211
  .then(this.setTrackingDeactivated)
205
212
  .finally(() => {
206
- this.handleOpenLink(product.deeplink);
213
+ this.handleOpenLink(product.deeplink, clickEvent);
207
214
  });
208
215
  }
209
216
  else {
210
- this.handleOpenLink(product.deeplink);
217
+ this.handleOpenLink(product.deeplink, clickEvent);
211
218
  }
212
219
  }
213
220
  trachSearchAreaChanges() {
@@ -272,7 +279,7 @@ const VviinnVpsWidget = class {
272
279
  getProductTrackEvent(detail, eventType) {
273
280
  if (this.trackingDeactivated)
274
281
  return null;
275
- const { productRank, productId, campaignTypeId, widgetType } = detail, rest = __rest(detail, ["productRank", "productId", "campaignTypeId", "widgetType"]);
282
+ const { productRank, productId, campaignTypeId, widgetType, clickEvent } = detail, rest = __rest(detail, ["productRank", "productId", "campaignTypeId", "widgetType", "clickEvent"]);
276
283
  const eventBody = Object.assign({ session_id: this.uiSessionId, rank: productRank, product: productId }, rest);
277
284
  const productEvent = createProductVpsEventByType(eventType)(eventBody);
278
285
  return productEvent;
@@ -36,6 +36,7 @@ export type ProductCardEventData = {
36
36
  productRank: number;
37
37
  productName: string;
38
38
  productType: string;
39
+ clickEvent?: MouseEvent;
39
40
  };
40
41
  export type ProductEventType = "load" | "view" | "click";
41
42
  export type ProductEvent = ProductLoadEvent | ProductClickEvent | ProductViewEvent;
@@ -1 +1 @@
1
- import{r as i,c as t,h as s,H as h,g as n}from"./p-1e83e6ba.js";import{v as o}from"./p-fc5a0363.js";import{V as e}from"./p-a69d3568.js";const v=class{constructor(s){i(this,s),this.vviinnWidgetLoad=t(this,"vviinnWidgetLoad",7),this.vviinnWidgetOpen=t(this,"vviinnWidgetOpen",7),this.vviinnWidgetClose=t(this,"vviinnWidgetClose",7),this.vviinnProductLoad=t(this,"vviinnProductLoad",7),this.vviinnProductClick=t(this,"vviinnProductClick",7),this.vviinnProductView=t(this,"vviinnProductView",7),this.vviinnResultLoad=t(this,"vviinnResultLoad",7),this.vviinnResultView=t(this,"vviinnResultView",7),this.vviinnNoResult=t(this,"vviinnNoResult",7),this.vviinnAddToBasket=t(this,"vviinnAddToBasket",7),this.sidebar=null,this.sidebarCloseListener=()=>{document.body.removeChild(this.sidebar)},this.token=void 0,this.productId=void 0,this.position="bottom",this.sourceImage=null,this.sidebarTitle="Visually similar products",this.modalScrollbar=!1,this.campaigns="",this.campaignType="VPR",this.locale="de-DE",this.color="",this.addStyle=!0,this.mode="continuity",this.imageWidth=300,this.currencySign="€",this.noResultText="",this.noResultShow=!0,this.gridArrowsDynamic=!1,this.excluded="",this.productDetailNewTab=!1,this.addToBasketShow=!1,this.apiPath="https://api.vviinn.com"}render(){return s(h,{onClick:()=>{this.handleClick()},role:"button",tabindex:"0"},s("vviinn-button",{addStyle:this.addStyle,part:"vviinn-button"},s("slot",null,s(e,null))))}handleClick(){const i=document.createElement("vviinn-recommendations-sidebar");i.sidebarTitle=this.sidebarTitle,i.productId=this.productId,i.token=this.token,i.position=this.position,i.sourceImage=this.sourceImage,i.widgetScrollbar=this.modalScrollbar,i.campaigns=this.campaigns,i.campaignType=this.campaignType,i.color=this.color,i.locale=this.locale,i.mode="right"===this.position?"grid":this.mode,i.imageWidth=this.imageWidth,i.currencySign=this.currencySign,i.apiPath=this.apiPath,i.buttonElementId=this.el.id,i.noResultText=this.noResultText,i.noResultShow=this.noResultShow,i.gridArrowsDynamic=this.gridArrowsDynamic,i.productDetailNewTab=this.productDetailNewTab,i.widgetVersion=o,i.showingInButton=!0,i.excluded=this.excluded,i.addToBasketShow=this.addToBasketShow,i.buttonChildren=this.el.children,this.sidebar=i,i.addEventListener("vviinnWidgetClose",this.sidebarCloseListener),document.body.append(this.sidebar)}disconnectedCallback(){this.sidebar&&(this.sidebar.removeEventListener("vviinnWidgetClose",this.sidebarCloseListener),document.body.removeChild(this.sidebar))}get el(){return n(this)}};v.style=":host{display:block}";export{v as vviinn_vpr_button}
1
+ import{r as i,c as t,h as s,H as h,g as n}from"./p-1e83e6ba.js";import{v as o}from"./p-835af647.js";import{V as e}from"./p-a69d3568.js";const v=class{constructor(s){i(this,s),this.vviinnWidgetLoad=t(this,"vviinnWidgetLoad",7),this.vviinnWidgetOpen=t(this,"vviinnWidgetOpen",7),this.vviinnWidgetClose=t(this,"vviinnWidgetClose",7),this.vviinnProductLoad=t(this,"vviinnProductLoad",7),this.vviinnProductClick=t(this,"vviinnProductClick",7),this.vviinnProductView=t(this,"vviinnProductView",7),this.vviinnResultLoad=t(this,"vviinnResultLoad",7),this.vviinnResultView=t(this,"vviinnResultView",7),this.vviinnNoResult=t(this,"vviinnNoResult",7),this.vviinnAddToBasket=t(this,"vviinnAddToBasket",7),this.sidebar=null,this.sidebarCloseListener=()=>{document.body.removeChild(this.sidebar)},this.token=void 0,this.productId=void 0,this.position="bottom",this.sourceImage=null,this.sidebarTitle="Visually similar products",this.modalScrollbar=!1,this.campaigns="",this.campaignType="VPR",this.locale="de-DE",this.color="",this.addStyle=!0,this.mode="continuity",this.imageWidth=300,this.currencySign="€",this.noResultText="",this.noResultShow=!0,this.gridArrowsDynamic=!1,this.excluded="",this.productDetailNewTab=!1,this.addToBasketShow=!1,this.apiPath="https://api.vviinn.com"}render(){return s(h,{onClick:()=>{this.handleClick()},role:"button",tabindex:"0"},s("vviinn-button",{addStyle:this.addStyle,part:"vviinn-button"},s("slot",null,s(e,null))))}handleClick(){const i=document.createElement("vviinn-recommendations-sidebar");i.sidebarTitle=this.sidebarTitle,i.productId=this.productId,i.token=this.token,i.position=this.position,i.sourceImage=this.sourceImage,i.widgetScrollbar=this.modalScrollbar,i.campaigns=this.campaigns,i.campaignType=this.campaignType,i.color=this.color,i.locale=this.locale,i.mode="right"===this.position?"grid":this.mode,i.imageWidth=this.imageWidth,i.currencySign=this.currencySign,i.apiPath=this.apiPath,i.buttonElementId=this.el.id,i.noResultText=this.noResultText,i.noResultShow=this.noResultShow,i.gridArrowsDynamic=this.gridArrowsDynamic,i.productDetailNewTab=this.productDetailNewTab,i.widgetVersion=o,i.showingInButton=!0,i.excluded=this.excluded,i.addToBasketShow=this.addToBasketShow,i.buttonChildren=this.el.children,this.sidebar=i,i.addEventListener("vviinnWidgetClose",this.sidebarCloseListener),document.body.append(this.sidebar)}disconnectedCallback(){this.sidebar&&(this.sidebar.removeEventListener("vviinnWidgetClose",this.sidebarCloseListener),document.body.removeChild(this.sidebar))}get el(){return n(this)}};v.style=":host{display:block}";export{v as vviinn_vpr_button}
@@ -1 +1 @@
1
- import{r as i,c as t,h as s,H as e,g as n}from"./p-1e83e6ba.js";import{v as h}from"./p-fc5a0363.js";import{a}from"./p-a69d3568.js";import{c as o,S as r}from"./p-5303d4a8.js";const d=class{constructor(s){i(this,s),this.vviinnWidgetLoad=t(this,"vviinnWidgetLoad",7),this.vviinnWidgetOpen=t(this,"vviinnWidgetOpen",7),this.vviinnWidgetClose=t(this,"vviinnWidgetClose",7),this.vviinnImageUpload=t(this,"vviinnImageUpload",7),this.vviinnProductLoad=t(this,"vviinnProductLoad",7),this.vviinnProductClick=t(this,"vviinnProductClick",7),this.vviinnProductView=t(this,"vviinnProductView",7),this.vviinnResultLoad=t(this,"vviinnResultLoad",7),this.vviinnResultView=t(this,"vviinnResultView",7),this.vviinnNoResult=t(this,"vviinnNoResult",7),this.vviinnImageCrop=t(this,"vviinnImageCrop",7),this.vviinnSelectObject=t(this,"vviinnSelectObject",7),this.vviinnSelectFilter=t(this,"vviinnSelectFilter",7),this.globalSlotsChanged=t(this,"globalSlotsChanged",7),this.getBasicEventData=()=>({widgetType:"VPS",campaignTypeId:"VPS",campaignTypeName:o.VPS,widgetId:this.el.id,widgetVersion:h}),this.token=void 0,this.currencySign="€",this.locale="de-DE",this.campaignId="",this.addStyle=!1,this.mode="modal",this.excluded="",this.productDetailNewTab=!0,this.imageResolutionWidth=250,this.apiPath=void 0,this.buttonPressed=!1}handleModalClosed(){this.buttonPressed=!1}componentDidLoad(){const i=this.el.querySelectorAll("[slot]");this.globalSlotsChanged.emit(Array.from(i))}handleClick(){this.buttonPressed=!0}resetButton(){this.buttonPressed=!1}render(){return s(e,{tabindex:"0",role:"button"},s("vviinn-button",{onClick:()=>{this.handleClick()},addStyle:this.addStyle,part:"vviinn-button"},s("slot",null,s(a,null))),s(r,null),s("vviinn-vps-widget",{mode:this.mode,"currency-sign":this.currencySign,token:this.token,locale:this.locale,apiPath:this.apiPath,exportparts:"brand, deeplink, currency, image, image-link, price-amount-sale, price-amount-outdated, price-amount-regular, price-container, price-outdated, price-regular, price-sale, price-prefix, title, product-card, example-images",campaignId:this.campaignId,showingInButton:!0,buttonPressed:this.buttonPressed,resetVpsButton:this.resetButton.bind(this),buttonElementId:this.el.id,active:this.buttonPressed&&"modal"===this.mode,excluded:this.excluded,productDetailNewTab:this.productDetailNewTab,imageResolutionWidth:this.imageResolutionWidth}))}get el(){return n(this)}};d.style=":host{display:block}";export{d as vviinn_vps_button}
1
+ import{r as i,c as t,h as s,H as e,g as n}from"./p-1e83e6ba.js";import{v as h}from"./p-835af647.js";import{a}from"./p-a69d3568.js";import{c as o,S as r}from"./p-5303d4a8.js";const d=class{constructor(s){i(this,s),this.vviinnWidgetLoad=t(this,"vviinnWidgetLoad",7),this.vviinnWidgetOpen=t(this,"vviinnWidgetOpen",7),this.vviinnWidgetClose=t(this,"vviinnWidgetClose",7),this.vviinnImageUpload=t(this,"vviinnImageUpload",7),this.vviinnProductLoad=t(this,"vviinnProductLoad",7),this.vviinnProductClick=t(this,"vviinnProductClick",7),this.vviinnProductView=t(this,"vviinnProductView",7),this.vviinnResultLoad=t(this,"vviinnResultLoad",7),this.vviinnResultView=t(this,"vviinnResultView",7),this.vviinnNoResult=t(this,"vviinnNoResult",7),this.vviinnImageCrop=t(this,"vviinnImageCrop",7),this.vviinnSelectObject=t(this,"vviinnSelectObject",7),this.vviinnSelectFilter=t(this,"vviinnSelectFilter",7),this.globalSlotsChanged=t(this,"globalSlotsChanged",7),this.getBasicEventData=()=>({widgetType:"VPS",campaignTypeId:"VPS",campaignTypeName:o.VPS,widgetId:this.el.id,widgetVersion:h}),this.token=void 0,this.currencySign="€",this.locale="de-DE",this.campaignId="",this.addStyle=!1,this.mode="modal",this.excluded="",this.productDetailNewTab=!0,this.imageResolutionWidth=250,this.apiPath=void 0,this.buttonPressed=!1}handleModalClosed(){this.buttonPressed=!1}componentDidLoad(){const i=this.el.querySelectorAll("[slot]");this.globalSlotsChanged.emit(Array.from(i))}handleClick(){this.buttonPressed=!0}resetButton(){this.buttonPressed=!1}render(){return s(e,{tabindex:"0",role:"button"},s("vviinn-button",{onClick:()=>{this.handleClick()},addStyle:this.addStyle,part:"vviinn-button"},s("slot",null,s(a,null))),s(r,null),s("vviinn-vps-widget",{mode:this.mode,"currency-sign":this.currencySign,token:this.token,locale:this.locale,apiPath:this.apiPath,exportparts:"brand, deeplink, currency, image, image-link, price-amount-sale, price-amount-outdated, price-amount-regular, price-container, price-outdated, price-regular, price-sale, price-prefix, title, product-card, example-images",campaignId:this.campaignId,showingInButton:!0,buttonPressed:this.buttonPressed,resetVpsButton:this.resetButton.bind(this),buttonElementId:this.el.id,active:this.buttonPressed&&"modal"===this.mode,excluded:this.excluded,productDetailNewTab:this.productDetailNewTab,imageResolutionWidth:this.imageResolutionWidth}))}get el(){return n(this)}};d.style=":host{display:block}";export{d as vviinn_vps_button}
@@ -0,0 +1 @@
1
+ const o="2.29.0";export{o as v}