vviinn-widgets 2.50.3 → 2.51.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 (52) hide show
  1. package/dist/cjs/{package-191048d8.js → package-35dc536c.js} +1 -1
  2. package/dist/cjs/{index-4445cb70.js → resources-e4b2491d.js} +81 -0
  3. package/dist/cjs/search-filters_17.cjs.entry.js +2 -2
  4. package/dist/cjs/vviinn-carousel_4.cjs.entry.js +13 -42
  5. package/dist/cjs/vviinn-vpr-button.cjs.entry.js +1 -1
  6. package/dist/cjs/vviinn-vps-button.cjs.entry.js +1 -1
  7. package/dist/cjs/vviinn-vps-widget.cjs.entry.js +18 -74
  8. package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +5 -0
  9. package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +1 -1
  10. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.js +1 -1
  11. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +7 -2
  12. package/dist/collection/locale/index.js +2 -1
  13. package/dist/collection/locale/{resources-vps.js → resources.js} +21 -2
  14. package/dist/collection/locale/types.js +1 -0
  15. package/dist/esm/{package-27d93c19.js → package-589ba719.js} +1 -1
  16. package/dist/esm/{index-76fe67d1.js → resources-b9f91a08.js} +81 -1
  17. package/dist/esm/search-filters_17.entry.js +2 -2
  18. package/dist/esm/vviinn-carousel_4.entry.js +2 -31
  19. package/dist/esm/vviinn-vpr-button.entry.js +1 -1
  20. package/dist/esm/vviinn-vps-button.entry.js +1 -1
  21. package/dist/esm/vviinn-vps-widget.entry.js +8 -64
  22. package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +4 -0
  23. package/dist/types/locale/index.d.ts +2 -1
  24. package/dist/types/locale/types.d.ts +1 -0
  25. package/dist/vviinn-widgets/p-030633b4.js +1 -0
  26. package/dist/vviinn-widgets/p-0d537217.entry.js +1 -0
  27. package/dist/vviinn-widgets/{p-79dd9ce0.entry.js → p-14c36659.entry.js} +1 -1
  28. package/dist/vviinn-widgets/{p-68804f17.entry.js → p-54d1af75.entry.js} +1 -1
  29. package/dist/vviinn-widgets/p-5e98556b.js +1 -0
  30. package/{www/build/p-9a4a5446.entry.js → dist/vviinn-widgets/p-b8a82e9d.entry.js} +2 -2
  31. package/dist/vviinn-widgets/p-d8bc3256.entry.js +1 -0
  32. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  33. package/package.json +1 -1
  34. package/www/build/p-030633b4.js +1 -0
  35. package/www/build/p-0d537217.entry.js +1 -0
  36. package/www/build/{p-79dd9ce0.entry.js → p-14c36659.entry.js} +1 -1
  37. package/www/build/{p-68804f17.entry.js → p-54d1af75.entry.js} +1 -1
  38. package/www/build/p-5e98556b.js +1 -0
  39. package/{dist/vviinn-widgets/p-9a4a5446.entry.js → www/build/p-b8a82e9d.entry.js} +2 -2
  40. package/www/build/p-d8bc3256.entry.js +1 -0
  41. package/www/build/vviinn-widgets.esm.js +1 -1
  42. package/dist/collection/locale/resources-vpr.js +0 -28
  43. package/dist/types/locale/resources-vps.d.ts +0 -2
  44. package/dist/vviinn-widgets/p-179bbd93.entry.js +0 -1
  45. package/dist/vviinn-widgets/p-506156b8.js +0 -1
  46. package/dist/vviinn-widgets/p-8386cb0e.entry.js +0 -1
  47. package/dist/vviinn-widgets/p-dbcc6488.js +0 -1
  48. package/www/build/p-179bbd93.entry.js +0 -1
  49. package/www/build/p-506156b8.js +0 -1
  50. package/www/build/p-8386cb0e.entry.js +0 -1
  51. package/www/build/p-dbcc6488.js +0 -1
  52. /package/dist/types/locale/{resources-vpr.d.ts → resources.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
 
3
- const version = "2.50.3";
3
+ const version = "2.51.0";
4
4
 
5
5
  exports.version = version;
@@ -3973,6 +3973,86 @@ const createFilterEvent = createTrackingEvent(filterEvent);
3973
3973
  const createAddToBasketVprEvent = createTrackingEvent(vprAddToBasket);
3974
3974
  const createAddToBasketVpcEvent = createTrackingEvent(vpcAddToBasket);
3975
3975
 
3976
+ const VVIINN_LINK = "<a href='https://www.vviinn.com/' target='_blank'>Vviinn</a>";
3977
+ const resources = {
3978
+ de: {
3979
+ translation: {
3980
+ noResultText: "Keine Ergebnisse! Versuche es bitte später erneut.",
3981
+ basketButtonText: "In den Warenkorb",
3982
+ setMode: {
3983
+ widgetTitle: "Kaufen Sie ein Set und erhalten Sie Rabatt",
3984
+ widgetSubtitle: "Sparen Sie bis zu 15% beim Kauf von Produkten aus der Liste",
3985
+ basketButtonText: "Als Set kaufen",
3986
+ appliedDiscountText: "gespart",
3987
+ updateButtonText: "Neues Set vorschlagen",
3988
+ },
3989
+ exampleImagesTitle: "Mit den Beispielbildern die Suche direkt ausprobieren",
3990
+ imageUploadButtonText: "Bild hochladen",
3991
+ cameraButtonTextStart: "Kamera starten",
3992
+ cameraButtonTextStop: "Kamera stoppen",
3993
+ 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.`,
3994
+ teaserText: "Finde Produkte auf \n einem Foto",
3995
+ imageSearchModalTitle: "Bildsuche",
3996
+ textSearchPlaceholder: "mit Text suchen",
3997
+ emptyResultsBlock: {
3998
+ title: "Leider nichts gefunden",
3999
+ button: "Neues Bild hochladen",
4000
+ },
4001
+ serverErrorBlock: {
4002
+ title: "Keine Verbindung",
4003
+ button: "Erneut versuchen",
4004
+ },
4005
+ wrongFormatBlock: {
4006
+ title: "Dateityp wird nicht unterstützt",
4007
+ text: "Bitte laden Sie eine .jpg, .png oder .webp Bilddatei hoch.",
4008
+ button: "Neues Bild hochladen",
4009
+ },
4010
+ wrongAspectRatioBlock: {
4011
+ title: "Das Bild ist zu schmal",
4012
+ button: "Neues Bild hochladen",
4013
+ },
4014
+ },
4015
+ },
4016
+ en: {
4017
+ translation: {
4018
+ noResultText: "No results! Please, try again later.",
4019
+ basketButtonText: "Add to Basket",
4020
+ setMode: {
4021
+ widgetTitle: "Buy a set to get discount",
4022
+ widgetSubtitle: "Save up to 15% for buying products from the list",
4023
+ basketButtonText: "Buy as set",
4024
+ appliedDiscountText: "saved",
4025
+ updateButtonText: "Suggest New Set",
4026
+ },
4027
+ exampleImagesTitle: "Try out the search with the example images",
4028
+ imageUploadButtonText: "Upload Photo",
4029
+ cameraButtonTextStart: "Start Camera",
4030
+ cameraButtonTextStop: "Stop Camera",
4031
+ 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
+ teaserText: "Find Product by Photo",
4033
+ imageSearchModalTitle: "Visual Search",
4034
+ textSearchPlaceholder: "Search by text",
4035
+ emptyResultsBlock: {
4036
+ title: "Sorry, nothing found",
4037
+ button: "Upload another image",
4038
+ },
4039
+ serverErrorBlock: {
4040
+ title: "Something went wrong",
4041
+ button: "Try again",
4042
+ },
4043
+ wrongFormatBlock: {
4044
+ title: "Wrong file format",
4045
+ text: "Please upload a .jpg, .png or .webp image file.",
4046
+ button: "Upload another file",
4047
+ },
4048
+ wrongAspectRatioBlock: {
4049
+ title: "The image is too narrow",
4050
+ button: "Upload another image",
4051
+ },
4052
+ },
4053
+ },
4054
+ };
4055
+
3976
4056
  exports.createAddToBasketVpcEvent = createAddToBasketVpcEvent;
3977
4057
  exports.createAddToBasketVprEvent = createAddToBasketVprEvent;
3978
4058
  exports.createFilterEvent = createFilterEvent;
@@ -3987,4 +4067,5 @@ exports.createTrackingApi = createTrackingApi;
3987
4067
  exports.createWidgetVpcEvent = createWidgetVpcEvent;
3988
4068
  exports.createWidgetVprEvent = createWidgetVprEvent;
3989
4069
  exports.createWidgetVpsEvent = createWidgetVpsEvent;
4070
+ exports.resources = resources;
3990
4071
  exports.v4 = v4;
@@ -3878,7 +3878,7 @@ const VviinnOverlayedModal = class {
3878
3878
  };
3879
3879
  VviinnOverlayedModal.style = vviinnOverlayedModalCss;
3880
3880
 
3881
- const vviinnPrivacyBadgeCss = ":host{color:#525252;font-size:12px;line-height:16px;text-align:center;margin-top:24px}:host(.invisible){color:transparent}@media (max-width: 768px){:host(.invisible){display:none}}";
3881
+ const vviinnPrivacyBadgeCss = ":host{color:#525252;font-size:12px;line-height:16px;text-align:center;margin-top:24px}:host a{color:inherit;text-decoration:underline}:host(.invisible){color:transparent}@media (max-width: 768px){:host(.invisible){display:none}}";
3882
3882
 
3883
3883
  const VviinnPrivacyBadge = class {
3884
3884
  constructor(hostRef) {
@@ -3889,7 +3889,7 @@ const VviinnPrivacyBadge = class {
3889
3889
  customizedSlots.slotChangeListener(this, this.el);
3890
3890
  }
3891
3891
  render() {
3892
- return (index.h(index.Host, null, index.h("slot", { name: "vviinn-privacy-badge-text" }, index.h("div", null, this.privacyBadgeText))));
3892
+ return (index.h(index.Host, null, index.h("slot", { name: "vviinn-privacy-badge-text" }, index.h("div", { innerHTML: this.privacyBadgeText }))));
3893
3893
  }
3894
3894
  get el() { return index.getElement(this); }
3895
3895
  };
@@ -7,8 +7,8 @@ const search_store = require('./search.store-7605f369.js');
7
7
  const i18next = require('./i18next-74ff3413.js');
8
8
  const PlusIcon = require('./PlusIcon-5e585127.js');
9
9
  const customizedSlots = require('./customized-slots-39ba4e52.js');
10
- const _package = require('./package-191048d8.js');
11
- const index$1 = require('./index-4445cb70.js');
10
+ const _package = require('./package-35dc536c.js');
11
+ const resources = require('./resources-e4b2491d.js');
12
12
 
13
13
  const BasketIcon = () => (index.h("svg", { width: "25", height: "24", viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
14
14
  index.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" })));
@@ -1372,35 +1372,6 @@ const getVCSRecommendations = (productId) => (color) => (excludedFilters) => (ca
1372
1372
 
1373
1373
  const getRecommendationsService = (campaignType) => search_store._function.pipe(customizedSlots.fromString(campaignType), customizedSlots.fold(() => getVPRRecommendations, () => getVCSRecommendations));
1374
1374
 
1375
- const resources = {
1376
- de: {
1377
- translation: {
1378
- noResultText: "Keine Ergebnisse! Versuche es bitte später erneut.",
1379
- basketButtonText: "In den Warenkorb",
1380
- setMode: {
1381
- widgetTitle: "Kaufen Sie ein Set und erhalten Sie Rabatt",
1382
- widgetSubtitle: "Sparen Sie bis zu 15% beim Kauf von Produkten aus der Liste",
1383
- basketButtonText: "Als Set kaufen",
1384
- appliedDiscountText: "gespart",
1385
- updateButtonText: "Neues Set vorschlagen",
1386
- },
1387
- },
1388
- },
1389
- en: {
1390
- translation: {
1391
- noResultText: "No results! Please, try again later.",
1392
- basketButtonText: "Add to Basket",
1393
- setMode: {
1394
- widgetTitle: "Buy a set to get discount",
1395
- widgetSubtitle: "Save up to 15% for buying products from the list",
1396
- basketButtonText: "Buy as set",
1397
- appliedDiscountText: "saved",
1398
- updateButtonText: "Suggest New Set",
1399
- },
1400
- },
1401
- },
1402
- };
1403
-
1404
1375
  const vviinnVprWidgetCss = ":host{display:grid;grid-gap:1rem;width:100%}:host(:not(.loaded)){position:absolute;visibility:hidden}:host(.grid) vviinn-product-card::part(image){border:1px solid #dddddd;width:100%}:host(.set) vviinn-carousel{overflow-x:auto}:host(.set) vviinn-carousel{scrollbar-width:thin}.widget-header{display:flex;flex-wrap:wrap;gap:20px;justify-content:space-between;align-items:center}.widget-header h3{margin-top:8px;margin-bottom:0;font-size:14px;font-weight:400;line-height:20px}.update-button{display:flex;align-items:center;justify-content:center;color:#525252;gap:8px;padding:8px 10px;background:rgb(244, 244, 244);border:none;cursor:pointer}.update-button:hover{background:rgb(234, 234, 234)}.update-button svg{color:#6f6f6f;width:24px;height:24px}h2{margin:0}vviinn-product-card::part(price-container){align-self:flex-start;text-align:left;display:flex}.results{display:grid;grid-gap:1rem}.no-result-text{font-size:20px}.visually-hidden{position:absolute;top:0;left:0;z-index:-1;height:0;width:0}h2{margin:0}:host(.grid) h2{justify-content:center}:host(.grid) vviinn-product-card::part(image){min-width:100%}:host(.grid) vviinn-product-card::part(image-link){width:100%}:host(.grid) vviinn-product-card::part(title),:host(.grid) vviinn-product-card::part(brand),:host(.grid) vviinn-product-card::part(type){text-align:center}:host(.grid) vviinn-product-card::part(price-container){align-self:center}:host(.continuity) vviinn-product-card::part(title),:host(.continuity) vviinn-product-card::part(brand),:host(.continuity) vviinn-product-card::part(type),:host(.continuity) vviinn-product-card::part(deeplink){text-align:left;max-width:unset;align-self:start}";
1405
1376
 
1406
1377
  var __rest = (undefined && undefined.__rest) || function (s, e) {
@@ -1534,8 +1505,8 @@ const VviinnVprWidget = class {
1534
1505
  search_store.state.currencySign = this.currencySign;
1535
1506
  search_store.state.locale = this.locale;
1536
1507
  this.id = (_a = this.buttonElementId) !== null && _a !== void 0 ? _a : this.el.id;
1537
- this.uiSessionId = index$1.v4();
1538
- this.trackingApi = index$1.createTrackingApi(this.apiPath, this.token);
1508
+ this.uiSessionId = resources.v4();
1509
+ this.trackingApi = resources.createTrackingApi(this.apiPath, this.token);
1539
1510
  this.getRecommendations();
1540
1511
  this.vviinnWidgetLoad.emit(this.getBasicEventData());
1541
1512
  this.trackWidgetEvent("load");
@@ -1547,7 +1518,7 @@ const VviinnVprWidget = class {
1547
1518
  await i18next.instance.init({
1548
1519
  lng: this.locale,
1549
1520
  fallbackLng: "en",
1550
- resources,
1521
+ resources: resources.resources,
1551
1522
  });
1552
1523
  if (this.excluded) {
1553
1524
  this.excluded = search_store.parseExcluded(this.excluded);
@@ -1611,10 +1582,10 @@ const VviinnVprWidget = class {
1611
1582
  let addToBasketEvent;
1612
1583
  const eventBody = Object.assign({ session_id: this.uiSessionId, rank: productRank, product: productId }, rest);
1613
1584
  if (this.campaignType === "VCS") {
1614
- addToBasketEvent = index$1.createAddToBasketVpcEvent(eventBody);
1585
+ addToBasketEvent = resources.createAddToBasketVpcEvent(eventBody);
1615
1586
  }
1616
1587
  else if (this.campaignType === "VPR") {
1617
- addToBasketEvent = index$1.createAddToBasketVprEvent(eventBody);
1588
+ addToBasketEvent = resources.createAddToBasketVprEvent(eventBody);
1618
1589
  }
1619
1590
  this.trackingApi
1620
1591
  .trackEvent(addToBasketEvent)
@@ -1632,10 +1603,10 @@ const VviinnVprWidget = class {
1632
1603
  let widgetEvent;
1633
1604
  const eventBody = Object.assign({ action, session_id: this.uiSessionId }, rest);
1634
1605
  if (this.campaignType === "VCS") {
1635
- widgetEvent = index$1.createWidgetVpcEvent(eventBody);
1606
+ widgetEvent = resources.createWidgetVpcEvent(eventBody);
1636
1607
  }
1637
1608
  else if (this.campaignType === "VPR") {
1638
- widgetEvent = index$1.createWidgetVprEvent(eventBody);
1609
+ widgetEvent = resources.createWidgetVprEvent(eventBody);
1639
1610
  }
1640
1611
  this.trackingApi.trackEvent(widgetEvent).then(this.setTrackingDeactivated);
1641
1612
  }
@@ -1646,10 +1617,10 @@ const VviinnVprWidget = class {
1646
1617
  let resultEvent;
1647
1618
  const eventBody = Object.assign({ session_id: this.uiSessionId }, rest);
1648
1619
  if (this.campaignType === "VCS") {
1649
- resultEvent = index$1.createResultVpcEventByType(type)(eventBody);
1620
+ resultEvent = resources.createResultVpcEventByType(type)(eventBody);
1650
1621
  }
1651
1622
  else if (this.campaignType === "VPR") {
1652
- resultEvent = index$1.createResultVprEventByType(type)(eventBody);
1623
+ resultEvent = resources.createResultVprEventByType(type)(eventBody);
1653
1624
  }
1654
1625
  this.trackingApi.trackEvent(resultEvent).then(this.setTrackingDeactivated);
1655
1626
  }
@@ -1660,10 +1631,10 @@ const VviinnVprWidget = class {
1660
1631
  let productEvent;
1661
1632
  const eventBody = Object.assign({ session_id: this.uiSessionId, rank: productRank, product: productId }, rest);
1662
1633
  if (campaignTypeId === "VCS") {
1663
- productEvent = index$1.createProductVpcEventByType(eventType)(eventBody);
1634
+ productEvent = resources.createProductVpcEventByType(eventType)(eventBody);
1664
1635
  }
1665
1636
  else if (campaignTypeId === "VPR") {
1666
- productEvent = index$1.createProductVprEventByType(eventType)(eventBody);
1637
+ productEvent = resources.createProductVprEventByType(eventType)(eventBody);
1667
1638
  }
1668
1639
  return productEvent;
1669
1640
  }
@@ -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-191048d8.js');
6
+ const _package = require('./package-35dc536c.js');
7
7
  const VisualSearchIcon = require('./VisualSearchIcon-1180d079.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-191048d8.js');
6
+ const _package = require('./package-35dc536c.js');
7
7
  const customizedSlots = require('./customized-slots-39ba4e52.js');
8
8
  const constants = require('./constants-7684cbfc.js');
9
9
 
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-5619b5ec.js');
6
6
  const search_store = require('./search.store-7605f369.js');
7
7
  const i18next = require('./i18next-74ff3413.js');
8
- const _package = require('./package-191048d8.js');
8
+ const _package = require('./package-35dc536c.js');
9
9
  const customizedSlots = require('./customized-slots-39ba4e52.js');
10
- const index$1 = require('./index-4445cb70.js');
10
+ const resources = require('./resources-e4b2491d.js');
11
11
  const constants = require('./constants-7684cbfc.js');
12
12
 
13
13
  const CameraActionIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
@@ -16,67 +16,6 @@ const CameraActionIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/
16
16
  const UploadActionIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
17
17
  index.h("path", { d: "M4.5 21C4.1 21 3.75 20.85 3.45 20.55C3.15 20.25 3 19.9 3 19.5V4.5C3 4.1 3.15 3.75 3.45 3.45C3.75 3.15 4.1 3 4.5 3H19.5C19.9 3 20.25 3.15 20.55 3.45C20.85 3.75 21 4.1 21 4.5V19.5C21 19.9 20.85 20.25 20.55 20.55C20.25 20.85 19.9 21 19.5 21H4.5ZM6.65 17.075H17.375C17.525 17.075 17.6333 17.0083 17.7 16.875C17.7667 16.7417 17.7583 16.6083 17.675 16.475L14.75 12.575C14.6667 12.475 14.5667 12.425 14.45 12.425C14.3333 12.425 14.2333 12.475 14.15 12.575L11.15 16.45L9.125 13.675C9.04167 13.575 8.94167 13.525 8.825 13.525C8.70833 13.525 8.60833 13.575 8.525 13.675L6.375 16.475C6.275 16.6083 6.25833 16.7417 6.325 16.875C6.39167 17.0083 6.5 17.075 6.65 17.075Z", fill: "currentColor" })));
18
18
 
19
- const resources = {
20
- de: {
21
- translation: {
22
- exampleImagesTitle: "Mit den Beispielbildern die Suche direkt ausprobieren",
23
- imageUploadButtonText: "Bild hochladen",
24
- cameraButtonTextStart: "Kamera starten",
25
- cameraButtonTextStop: "Kamera stoppen",
26
- privacyBadgeText: "Durch das Hochladen eines Bildes willigst Du in die Verarbeitung durch unseren Partner Vviinn ein. Das Bild wird nach einer Stunde Inaktivität gelöscht.",
27
- teaserText: "Finde Produkte auf \n einem Foto",
28
- imageSearchModalTitle: "Bildsuche",
29
- textSearchPlaceholder: "mit Text suchen",
30
- emptyResultsBlock: {
31
- title: "Leider nichts gefunden",
32
- button: "Neues Bild hochladen",
33
- },
34
- serverErrorBlock: {
35
- title: "Keine Verbindung",
36
- button: "Erneut versuchen",
37
- },
38
- wrongFormatBlock: {
39
- title: "Dateityp wird nicht unterstützt",
40
- text: "Bitte laden Sie eine .jpg, .png oder .webp Bilddatei hoch.",
41
- button: "Neues Bild hochladen",
42
- },
43
- wrongAspectRatioBlock: {
44
- title: "Das Bild ist zu schmal",
45
- button: "Neues Bild hochladen",
46
- },
47
- },
48
- },
49
- en: {
50
- translation: {
51
- exampleImagesTitle: "Try out the search with the example images",
52
- imageUploadButtonText: "Upload Photo",
53
- cameraButtonTextStart: "Start Camera",
54
- cameraButtonTextStop: "Stop Camera",
55
- privacyBadgeText: "By uploading a picture you agree to the processing by our partner Vviinn. The image will be deleted after one hour of inactivity.",
56
- teaserText: "Find Product by Photo",
57
- imageSearchModalTitle: "Visual Search",
58
- textSearchPlaceholder: "Search by text",
59
- emptyResultsBlock: {
60
- title: "Sorry, nothing found",
61
- button: "Upload another image",
62
- },
63
- serverErrorBlock: {
64
- title: "Something went wrong",
65
- button: "Try again",
66
- },
67
- wrongFormatBlock: {
68
- title: "Wrong file format",
69
- text: "Please upload a .jpg, .png or .webp image file.",
70
- button: "Upload another file",
71
- },
72
- wrongAspectRatioBlock: {
73
- title: "The image is too narrow",
74
- button: "Upload another image",
75
- },
76
- },
77
- },
78
- };
79
-
80
19
  const videoStreamSettings = {
81
20
  facingMode: "environment",
82
21
  width: { ideal: 1920 },
@@ -226,6 +165,9 @@ const VviinnVpsWidget = class {
226
165
  widgetVersion: _package.version,
227
166
  };
228
167
  };
168
+ this.LinkText = ({ href, children }) => {
169
+ return index.h("a", { href: href || "" }, children);
170
+ };
229
171
  this.token = undefined;
230
172
  this.active = true;
231
173
  this.currencySign = "€";
@@ -366,7 +308,7 @@ const VviinnVpsWidget = class {
366
308
  if (this.trackingDeactivated)
367
309
  return;
368
310
  const _a = this.getBasicEventData(), rest = __rest(_a, ["campaignTypeId"]);
369
- const searchEvent = index$1.createSearchEvent(Object.assign({ session_id: this.uiSessionId, source: this.imageSource, search_area: "manual-selection" }, rest));
311
+ const searchEvent = resources.createSearchEvent(Object.assign({ session_id: this.uiSessionId, source: this.imageSource, search_area: "manual-selection" }, rest));
370
312
  this.trackingApi.trackEvent(searchEvent).then(this.setTrackingDeactivated);
371
313
  }
372
314
  trackDetectedObject() {
@@ -374,7 +316,7 @@ const VviinnVpsWidget = class {
374
316
  if (this.trackingDeactivated)
375
317
  return;
376
318
  const _a = this.getBasicEventData(), rest = __rest(_a, ["campaignTypeId"]);
377
- const searchEvent = index$1.createSearchEvent(Object.assign({ session_id: this.uiSessionId, source: this.imageSource, search_area: "attention-point" }, rest));
319
+ const searchEvent = resources.createSearchEvent(Object.assign({ session_id: this.uiSessionId, source: this.imageSource, search_area: "attention-point" }, rest));
378
320
  this.trackingApi.trackEvent(searchEvent).then(this.setTrackingDeactivated);
379
321
  }
380
322
  trackFilter({ detail }) {
@@ -382,7 +324,7 @@ const VviinnVpsWidget = class {
382
324
  if (this.trackingDeactivated)
383
325
  return;
384
326
  const _a = this.getBasicEventData(), rest = __rest(_a, ["campaignTypeId"]);
385
- const searchEvent = index$1.createFilterEvent(Object.assign({ session_id: this.uiSessionId, source: this.imageSource, kind: detail.kind, action: detail.action }, rest));
327
+ const searchEvent = resources.createFilterEvent(Object.assign({ session_id: this.uiSessionId, source: this.imageSource, kind: detail.kind, action: detail.action }, rest));
386
328
  this.trackingApi.trackEvent(searchEvent).then(this.setTrackingDeactivated);
387
329
  }
388
330
  async trackTextSearchFinished({ detail }) {
@@ -402,15 +344,15 @@ const VviinnVpsWidget = class {
402
344
  search_store.searchState.token = this.token;
403
345
  search_store.searchState.campaignId = this.campaignId;
404
346
  search_store.searchState.excluded = this.excluded;
405
- this.uiSessionId = index$1.v4();
406
- this.trackingApi = index$1.createTrackingApi(this.apiPath, this.token);
347
+ this.uiSessionId = resources.v4();
348
+ this.trackingApi = resources.createTrackingApi(this.apiPath, this.token);
407
349
  this.id = this.el.id;
408
350
  }
409
351
  async componentWillLoad() {
410
352
  await i18next.instance.init({
411
353
  lng: this.locale,
412
354
  fallbackLng: "en",
413
- resources,
355
+ resources: resources.resources,
414
356
  });
415
357
  customizedSlots.slotChangeListener(this, this.el);
416
358
  this.vviinnWidgetLoad.emit(this.getBasicEventData());
@@ -421,7 +363,7 @@ const VviinnVpsWidget = class {
421
363
  return;
422
364
  const _a = this.getBasicEventData(), rest = __rest(_a, ["campaignTypeId", "widgetType"]);
423
365
  const eventBody = Object.assign({ action, session_id: this.uiSessionId }, rest);
424
- const widgetEvent = index$1.createWidgetVpsEvent(eventBody);
366
+ const widgetEvent = resources.createWidgetVpsEvent(eventBody);
425
367
  this.trackingApi.trackEvent(widgetEvent).then(this.setTrackingDeactivated);
426
368
  }
427
369
  getProductTrackEvent(detail, eventType) {
@@ -429,21 +371,21 @@ const VviinnVpsWidget = class {
429
371
  return null;
430
372
  const { productRank, productId, campaignTypeId, widgetType, clickEvent } = detail, rest = __rest(detail, ["productRank", "productId", "campaignTypeId", "widgetType", "clickEvent"]);
431
373
  const eventBody = Object.assign({ session_id: this.uiSessionId, rank: productRank, product: productId }, rest);
432
- const productEvent = index$1.createProductVpsEventByType(eventType)(eventBody);
374
+ const productEvent = resources.createProductVpsEventByType(eventType)(eventBody);
433
375
  return productEvent;
434
376
  }
435
377
  trackResultEvent(type) {
436
378
  if (this.trackingDeactivated)
437
379
  return;
438
380
  const _a = this.getBasicEventData(), rest = __rest(_a, ["campaignTypeId", "widgetType"]);
439
- let resultEvent = index$1.createResultVpsEventByType(type)(Object.assign({ session_id: this.uiSessionId }, rest));
381
+ let resultEvent = resources.createResultVpsEventByType(type)(Object.assign({ session_id: this.uiSessionId }, rest));
440
382
  this.trackingApi.trackEvent(resultEvent).then(this.setTrackingDeactivated);
441
383
  }
442
384
  trackInitialSearch() {
443
385
  if (this.trackingDeactivated)
444
386
  return;
445
387
  const _a = this.getBasicEventData(), rest = __rest(_a, ["campaignTypeId", "widgetType"]);
446
- const searchEvent = index$1.createSearchEvent(Object.assign({ session_id: this.uiSessionId, search_area: "full", source: "upload" }, rest));
388
+ const searchEvent = resources.createSearchEvent(Object.assign({ session_id: this.uiSessionId, search_area: "full", source: "upload" }, rest));
447
389
  this.trackingApi.trackEvent(searchEvent).then(this.setTrackingDeactivated);
448
390
  }
449
391
  handleImageSelection() {
@@ -538,7 +480,9 @@ const VviinnVpsWidget = class {
538
480
  }, id: "start-page_block" }, index.h("div", { class: "start-page_main-content" }, index.h("div", { class: {
539
481
  "start-page_errors-block": true,
540
482
  hidden: !this.wrongImageFormat && !search_store.searchState.serverError,
541
- } }, index.h("vviinn-wrong-format", { class: { hidden: !this.wrongImageFormat }, handler: () => this.resetState() }), index.h("vviinn-server-error", { class: { hidden: !search_store.searchState.serverError }, handler: () => this.resetState() })), !this.haveErrors() && index.h("vviinn-teaser", null), !this.haveErrors() && (index.h("div", { class: "buttons-group" }, this.renderButtons())), this.textSearchShow && !this.haveErrors() && (index.h("vviinn-text-search", { clearSearchQuery: true }))), index.h("vviinn-privacy-badge", { privacyBadgeText: i18next.instance.t("privacyBadgeText"), class: { invisible: this.haveErrors() } }))), index.h("vviinn-slide", { class: {
483
+ } }, index.h("vviinn-wrong-format", { class: { hidden: !this.wrongImageFormat }, handler: () => this.resetState() }), index.h("vviinn-server-error", { class: { hidden: !search_store.searchState.serverError }, handler: () => this.resetState() })), !this.haveErrors() && index.h("vviinn-teaser", null), !this.haveErrors() && (index.h("div", { class: "buttons-group" }, this.renderButtons())), this.textSearchShow && !this.haveErrors() && (index.h("vviinn-text-search", { clearSearchQuery: true }))), index.h("vviinn-privacy-badge", { privacyBadgeText: i18next.instance.t("privacyBadgeText", {
484
+ interpolation: { escapeValue: false },
485
+ }), class: { invisible: this.haveErrors() } }))), index.h("vviinn-slide", { class: {
542
486
  "results-page": true,
543
487
  active: this.isResultSlide(),
544
488
  } }, this.isResultSlide() && search_store.searchState.searchType === "image" && (index.h("div", { class: "image-wrapper" }, index.h("vviinn-image-view", { basicEventData: this.getBasicEventData(), setShowAspectRatioError: this.setShowAspectRatioError, showAspectRatioError: this.showAspectRatioError }), index.h("div", { class: {
@@ -6,6 +6,11 @@
6
6
  margin-top: 24px;
7
7
  }
8
8
 
9
+ :host a {
10
+ color: inherit;
11
+ text-decoration: underline;
12
+ }
13
+
9
14
  :host(.invisible) {
10
15
  color: transparent;
11
16
  }
@@ -8,7 +8,7 @@ export class VviinnPrivacyBadge {
8
8
  slotChangeListener(this, this.el);
9
9
  }
10
10
  render() {
11
- return (h(Host, null, h("slot", { name: "vviinn-privacy-badge-text" }, h("div", null, this.privacyBadgeText))));
11
+ return (h(Host, null, h("slot", { name: "vviinn-privacy-badge-text" }, h("div", { innerHTML: this.privacyBadgeText }))));
12
12
  }
13
13
  static get is() { return "vviinn-privacy-badge"; }
14
14
  static get encapsulation() { return "shadow"; }
@@ -28,7 +28,7 @@ import { createTrackingApi } from "../../openApi";
28
28
  import { createWidgetVprEvent, createWidgetVpcEvent, createProductVpcEventByType, createProductVprEventByType, createAddToBasketVpcEvent, createAddToBasketVprEvent, createResultVpcEventByType, createResultVprEventByType, } from "../../tracking";
29
29
  import { checkEmpryString } from "../../utils/option/option";
30
30
  import { parseExcluded } from "../../utils/collections/collectionsUtils";
31
- import { resources } from "../../locale/resources-vpr";
31
+ import { resources } from "../../locale";
32
32
  import { UpdateIcon } from "../vviinn-icons";
33
33
  /**
34
34
  * @part product-card - Product Card itself.
@@ -23,7 +23,7 @@ import { createWidgetVpsEvent, createFilterEvent, createSearchEvent, createProdu
23
23
  import { SlotSkeleton } from "../customized-slots";
24
24
  import { campaignTypeNames } from "../../campaign/Campaign";
25
25
  import { parseExcluded } from "../../utils/collections/collectionsUtils";
26
- import { resources } from "../../locale/resources-vps";
26
+ import { resources } from "../../locale";
27
27
  import { CameraActionIcon, UploadActionIcon } from "../vviinn-icons";
28
28
  import { DEFAULT_EXAMPLE_IMAGE } from "../../assets/constants";
29
29
  import { videoStreamSettings } from "../../video/settings";
@@ -166,6 +166,9 @@ export class VviinnVpsWidget {
166
166
  widgetVersion: version,
167
167
  };
168
168
  };
169
+ this.LinkText = ({ href, children }) => {
170
+ return h("a", { href: href || "" }, children);
171
+ };
169
172
  this.token = undefined;
170
173
  this.active = true;
171
174
  this.currencySign = "€";
@@ -478,7 +481,9 @@ export class VviinnVpsWidget {
478
481
  }, id: "start-page_block" }, h("div", { class: "start-page_main-content" }, h("div", { class: {
479
482
  "start-page_errors-block": true,
480
483
  hidden: !this.wrongImageFormat && !searchState.serverError,
481
- } }, h("vviinn-wrong-format", { class: { hidden: !this.wrongImageFormat }, handler: () => this.resetState() }), h("vviinn-server-error", { class: { hidden: !searchState.serverError }, handler: () => this.resetState() })), !this.haveErrors() && h("vviinn-teaser", null), !this.haveErrors() && (h("div", { class: "buttons-group" }, this.renderButtons())), this.textSearchShow && !this.haveErrors() && (h("vviinn-text-search", { clearSearchQuery: true }))), h("vviinn-privacy-badge", { privacyBadgeText: i18next.t("privacyBadgeText"), class: { invisible: this.haveErrors() } }))), h("vviinn-slide", { class: {
484
+ } }, h("vviinn-wrong-format", { class: { hidden: !this.wrongImageFormat }, handler: () => this.resetState() }), h("vviinn-server-error", { class: { hidden: !searchState.serverError }, handler: () => this.resetState() })), !this.haveErrors() && h("vviinn-teaser", null), !this.haveErrors() && (h("div", { class: "buttons-group" }, this.renderButtons())), this.textSearchShow && !this.haveErrors() && (h("vviinn-text-search", { clearSearchQuery: true }))), h("vviinn-privacy-badge", { privacyBadgeText: i18next.t("privacyBadgeText", {
485
+ interpolation: { escapeValue: false },
486
+ }), class: { invisible: this.haveErrors() } }))), h("vviinn-slide", { class: {
482
487
  "results-page": true,
483
488
  active: this.isResultSlide(),
484
489
  } }, this.isResultSlide() && searchState.searchType === "image" && (h("div", { class: "image-wrapper" }, h("vviinn-image-view", { basicEventData: this.getBasicEventData(), setShowAspectRatioError: this.setShowAspectRatioError, showAspectRatioError: this.showAspectRatioError }), h("div", { class: {
@@ -1 +1,2 @@
1
- export {};
1
+ export * from "./resources";
2
+ export * from "./types";
@@ -1,11 +1,21 @@
1
+ const VVIINN_LINK = "<a href='https://www.vviinn.com/' target='_blank'>Vviinn</a>";
1
2
  export const resources = {
2
3
  de: {
3
4
  translation: {
5
+ noResultText: "Keine Ergebnisse! Versuche es bitte später erneut.",
6
+ basketButtonText: "In den Warenkorb",
7
+ setMode: {
8
+ widgetTitle: "Kaufen Sie ein Set und erhalten Sie Rabatt",
9
+ widgetSubtitle: "Sparen Sie bis zu 15% beim Kauf von Produkten aus der Liste",
10
+ basketButtonText: "Als Set kaufen",
11
+ appliedDiscountText: "gespart",
12
+ updateButtonText: "Neues Set vorschlagen",
13
+ },
4
14
  exampleImagesTitle: "Mit den Beispielbildern die Suche direkt ausprobieren",
5
15
  imageUploadButtonText: "Bild hochladen",
6
16
  cameraButtonTextStart: "Kamera starten",
7
17
  cameraButtonTextStop: "Kamera stoppen",
8
- privacyBadgeText: "Durch das Hochladen eines Bildes willigst Du in die Verarbeitung durch unseren Partner Vviinn ein. Das Bild wird nach einer Stunde Inaktivität gelöscht.",
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.`,
9
19
  teaserText: "Finde Produkte auf \n einem Foto",
10
20
  imageSearchModalTitle: "Bildsuche",
11
21
  textSearchPlaceholder: "mit Text suchen",
@@ -30,11 +40,20 @@ export const resources = {
30
40
  },
31
41
  en: {
32
42
  translation: {
43
+ noResultText: "No results! Please, try again later.",
44
+ basketButtonText: "Add to Basket",
45
+ setMode: {
46
+ widgetTitle: "Buy a set to get discount",
47
+ widgetSubtitle: "Save up to 15% for buying products from the list",
48
+ basketButtonText: "Buy as set",
49
+ appliedDiscountText: "saved",
50
+ updateButtonText: "Suggest New Set",
51
+ },
33
52
  exampleImagesTitle: "Try out the search with the example images",
34
53
  imageUploadButtonText: "Upload Photo",
35
54
  cameraButtonTextStart: "Start Camera",
36
55
  cameraButtonTextStop: "Stop Camera",
37
- privacyBadgeText: "By uploading a picture you agree to the processing by our partner Vviinn. The image will be deleted after one hour of inactivity.",
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.`,
38
57
  teaserText: "Find Product by Photo",
39
58
  imageSearchModalTitle: "Visual Search",
40
59
  textSearchPlaceholder: "Search by text",
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,3 @@
1
- const version = "2.50.3";
1
+ const version = "2.51.0";
2
2
 
3
3
  export { version as v };