vviinn-widgets 2.5.2 → 2.7.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 (116) hide show
  1. package/dist/cjs/{app-globals-d15b4c2c.js → app-globals-047a582c.js} +1 -1
  2. package/dist/cjs/{highlight-box_22.cjs.entry.js → cropper-handler_27.cjs.entry.js} +473 -85
  3. package/dist/cjs/{customized-slots-0c0d0665.js → customized-slots-cb722e68.js} +1 -1
  4. package/dist/cjs/{index-0f5516a6.js → index-bd771524.js} +1 -1
  5. package/dist/cjs/{imageSearch.store-865c23f4.js → index-d07466b9.js} +14707 -11093
  6. package/dist/cjs/{index-31b9cb7a.js → index-fcafbfe5.js} +1 -1
  7. package/dist/cjs/loader.cjs.js +3 -3
  8. package/dist/cjs/{vviinn-carousel_3.cjs.entry.js → vviinn-carousel_2.cjs.entry.js} +35 -208
  9. package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +5 -3
  10. package/dist/cjs/vviinn-vpr-button.cjs.entry.js +7 -2
  11. package/dist/cjs/vviinn-vps-button.cjs.entry.js +4 -4
  12. package/dist/cjs/vviinn-widgets.cjs.js +3 -3
  13. package/dist/collection/campaign/VCSCampaignService.js +4 -2
  14. package/dist/collection/campaign/VPRCampaignService.js +4 -2
  15. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +21 -1
  16. package/dist/collection/components/vviinn-vpr-button/stories/args.js +6 -0
  17. package/dist/collection/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.js +2 -0
  18. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +23 -0
  19. package/dist/collection/components/vviinn-vpr-widget/stories/args.js +7 -0
  20. package/dist/collection/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.js +12 -13
  21. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +28 -1
  22. package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +9 -5
  23. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +18 -1
  24. package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +11 -7
  25. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +23 -0
  26. package/dist/collection/searchSession/searchSession.js +6 -1
  27. package/dist/collection/store/imageSearch.store.js +2 -7
  28. package/dist/esm/{app-globals-6f6aa89e.js → app-globals-68b1d848.js} +1 -1
  29. package/dist/esm/{highlight-box_22.entry.js → cropper-handler_27.entry.js} +404 -21
  30. package/dist/esm/{customized-slots-6b427dda.js → customized-slots-95a05ceb.js} +1 -1
  31. package/dist/esm/{imageSearch.store-0ae87235.js → index-33fe5a25.js} +14832 -11234
  32. package/dist/esm/{index-59f44eaa.js → index-75a1f589.js} +1 -1
  33. package/dist/esm/{index-ac05c460.js → index-f9df412f.js} +2 -2
  34. package/dist/esm/loader.js +3 -3
  35. package/dist/esm/{vviinn-carousel_3.entry.js → vviinn-carousel_2.entry.js} +15 -187
  36. package/dist/esm/vviinn-recommendations-sidebar.entry.js +5 -3
  37. package/dist/esm/vviinn-vpr-button.entry.js +7 -2
  38. package/dist/esm/vviinn-vps-button.entry.js +4 -4
  39. package/dist/esm/vviinn-widgets.js +3 -3
  40. package/dist/types/campaign/CampaignService.d.ts +1 -1
  41. package/dist/types/campaign/VCSCampaignService.d.ts +2 -1
  42. package/dist/types/campaign/VPRCampaignService.d.ts +2 -1
  43. package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +2 -0
  44. package/dist/types/components/vviinn-vpr-button/stories/args.d.ts +6 -0
  45. package/dist/types/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.d.ts +6 -0
  46. package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +2 -0
  47. package/dist/types/components/vviinn-vpr-widget/stories/args.d.ts +6 -0
  48. package/dist/types/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.d.ts +6 -0
  49. package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +3 -0
  50. package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +2 -0
  51. package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +2 -0
  52. package/dist/types/components.d.ts +40 -0
  53. package/dist/types/searchSession/searchSession.d.ts +2 -1
  54. package/dist/types/store/imageSearch.store.d.ts +7 -6
  55. package/dist/vviinn-widgets/{p-bad1809f.js → p-4e55513e.js} +1 -1
  56. package/dist/vviinn-widgets/p-5358970c.entry.js +1 -0
  57. package/{www/build/p-c36546fa.js → dist/vviinn-widgets/p-66015ad7.js} +1 -1
  58. package/dist/vviinn-widgets/p-669a156c.entry.js +1 -0
  59. package/dist/vviinn-widgets/p-8080679b.entry.js +1 -0
  60. package/dist/vviinn-widgets/p-9de1b0e7.js +1 -0
  61. package/dist/vviinn-widgets/{p-ee46fc83.js → p-b254eee7.js} +1 -1
  62. package/dist/vviinn-widgets/p-c1cd51ef.entry.js +1 -0
  63. package/dist/vviinn-widgets/p-e32c30d4.entry.js +1 -0
  64. package/dist/vviinn-widgets/{p-118ac907.js → p-f6e59cb2.js} +1 -1
  65. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  66. package/package.json +3 -3
  67. package/www/build/{p-bad1809f.js → p-4e55513e.js} +1 -1
  68. package/www/build/p-5358970c.entry.js +1 -0
  69. package/{dist/vviinn-widgets/p-c36546fa.js → www/build/p-66015ad7.js} +1 -1
  70. package/www/build/p-669a156c.entry.js +1 -0
  71. package/www/build/p-8080679b.entry.js +1 -0
  72. package/www/build/p-9de1b0e7.js +1 -0
  73. package/www/build/{p-ee46fc83.js → p-b254eee7.js} +1 -1
  74. package/www/build/p-c1cd51ef.entry.js +1 -0
  75. package/www/build/p-e32c30d4.entry.js +1 -0
  76. package/www/build/p-eb8f77e4.js +1 -0
  77. package/www/build/{p-118ac907.js → p-f6e59cb2.js} +1 -1
  78. package/www/build/vviinn-widgets.esm.js +1 -1
  79. package/www/index.html +1 -1
  80. package/dist/cjs/Handler-176539c8.js +0 -331
  81. package/dist/cjs/cropper-handler.cjs.entry.js +0 -27
  82. package/dist/cjs/index-0eb3036a.js +0 -3235
  83. package/dist/cjs/vviinn-error.cjs.entry.js +0 -19
  84. package/dist/cjs/vviinn-preloader.cjs.entry.js +0 -26
  85. package/dist/cjs/vviinn-vps-widget.cjs.entry.js +0 -167
  86. package/dist/esm/Handler-f9b8735c.js +0 -309
  87. package/dist/esm/cropper-handler.entry.js +0 -23
  88. package/dist/esm/index-2e296af4.js +0 -3224
  89. package/dist/esm/vviinn-error.entry.js +0 -15
  90. package/dist/esm/vviinn-preloader.entry.js +0 -22
  91. package/dist/esm/vviinn-vps-widget.entry.js +0 -163
  92. package/dist/vviinn-widgets/p-11f61564.js +0 -1
  93. package/dist/vviinn-widgets/p-39fdc5c9.entry.js +0 -1
  94. package/dist/vviinn-widgets/p-762dc067.entry.js +0 -1
  95. package/dist/vviinn-widgets/p-7e2f542c.js +0 -1
  96. package/dist/vviinn-widgets/p-8d56e795.entry.js +0 -1
  97. package/dist/vviinn-widgets/p-8f955b15.entry.js +0 -1
  98. package/dist/vviinn-widgets/p-9654fe35.entry.js +0 -1
  99. package/dist/vviinn-widgets/p-9e5adc42.js +0 -1
  100. package/dist/vviinn-widgets/p-b3731705.entry.js +0 -1
  101. package/dist/vviinn-widgets/p-d991330b.entry.js +0 -1
  102. package/dist/vviinn-widgets/p-da9c933b.entry.js +0 -1
  103. package/dist/vviinn-widgets/p-f41e25f0.entry.js +0 -1
  104. package/www/build/p-11f61564.js +0 -1
  105. package/www/build/p-39fdc5c9.entry.js +0 -1
  106. package/www/build/p-762dc067.entry.js +0 -1
  107. package/www/build/p-7e2f542c.js +0 -1
  108. package/www/build/p-8d56e795.entry.js +0 -1
  109. package/www/build/p-8f955b15.entry.js +0 -1
  110. package/www/build/p-9654fe35.entry.js +0 -1
  111. package/www/build/p-9e5adc42.js +0 -1
  112. package/www/build/p-b3731705.entry.js +0 -1
  113. package/www/build/p-cfd998c1.js +0 -1
  114. package/www/build/p-d991330b.entry.js +0 -1
  115. package/www/build/p-da9c933b.entry.js +0 -1
  116. package/www/build/p-f41e25f0.entry.js +0 -1
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'vviinn-widgets';
2
- const Env = /* vviinn-widgets */ {"packageVersion":"2.5.1","packageName":"vviinn-widgets","environment":"local"};
2
+ const Env = /* vviinn-widgets */ {"packageVersion":"2.7.0","packageName":"vviinn-widgets","environment":"local"};
3
3
 
4
4
  let scopeId;
5
5
  let hostTagName;
@@ -1,4 +1,4 @@
1
- import { h } from './index-59f44eaa.js';
1
+ import { h } from './index-75a1f589.js';
2
2
 
3
3
  const ArrowIcon = () => (h("svg", { width: "12", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
4
4
  h("path", { d: "M0 10 10 0l1.4 1.4L2.8 10l8.6 8.6L10 20 0 10Z" })));
@@ -26,4 +26,4 @@ const VisualSearchIcon = () => (h("svg", { width: "20", height: "20", fill: "non
26
26
  const CrossIcon = () => (h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
27
27
  h("path", { d: "M16 1.4L14.6 0L8 6.6L1.4 0L0 1.4L6.6 8L0 14.6L1.4 16L8 9.4L14.6 16L16 14.6L9.4 8L16 1.4Z", fill: "#161616" })));
28
28
 
29
- export { ArrowIcon as A, ChevronIcon as C, OnboardingCard1Icon as O, VisualSearchIcon as V, CameraIcon as a, CrossIcon as b, CheckIcon as c, OnboardingCard2Icon as d, OnboardingCard3Icon as e };
29
+ export { ArrowIcon as A, CheckIcon as C, OnboardingCard1Icon as O, VisualSearchIcon as V, OnboardingCard2Icon as a, OnboardingCard3Icon as b, CameraIcon as c, CrossIcon as d, ChevronIcon as e };
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-59f44eaa.js';
2
- import { g as globalScripts } from './app-globals-6f6aa89e.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-75a1f589.js';
2
+ import { g as globalScripts } from './app-globals-68b1d848.js';
3
3
 
4
4
  /*
5
5
  Stencil Client Patch Esm v2.9.0 | MIT Licensed | https://stenciljs.com
@@ -12,7 +12,7 @@ const defineCustomElements = (win, options) => {
12
12
  if (typeof window === 'undefined') return Promise.resolve();
13
13
  return patchEsm().then(() => {
14
14
  globalScripts();
15
- return bootstrapLazy([["cropper-handler",[[1,"cropper-handler",{"handler":[16],"disabled":[4]}]]],["vviinn-error",[[1,"vviinn-error"]]],["vviinn-preloader",[[1,"vviinn-preloader"]]],["vviinn-carousel_3",[[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],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"recommendations":[32],"loaded":[32]},[[0,"productImageLoaded","handleImageLoading"],[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"recommendations":[16],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32]}],[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"],"index":[2],"imageLoaded":[32]}]]],["highlight-box_22",[[1,"vviinn-image-view"],[1,"vviinn-onboarding"],[1,"vviinn-example-images",null,[[0,"exampleImageSelected","handleImageSelection"],[0,"exampleImageError","handleImageSelectionError"]]],[1,"vviinn-overlayed-modal",{"active":[4]}],[1,"vviinn-empty-results"],[1,"vviinn-image-selector"],[1,"vviinn-server-error"],[1,"vviinn-wrong-format"],[1,"search-filters",{"filter":[16],"selectedCategoryId":[32],"hideFilters":[32]}],[1,"vviinn-privacy-badge"],[1,"vviinn-teaser"],[1,"image-cropper",{"disabled":[4],"handleMove":[32]}],[1,"vviinn-example-image",{"src":[1],"width":[2],"height":[2],"selected":[32]}],[1,"highlight-box"],[1,"vviinn-detected-object",{"detectedObject":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"slider":[32]}],[1,"vviinn-onboarding-card-1"],[1,"vviinn-onboarding-card-2"],[1,"vviinn-onboarding-card-3"],[1,"vviinn-overlay"],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32]}]]],["vviinn-vps-widget",[[1,"vviinn-vps-widget",{"token":[1],"apiPath":[1,"api-path"],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"slidePosition":[32],"width":[32],"wrongImageFormat":[32]},[[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"],[0,"cropperChanged","trachSearchAreaChanges"],[0,"detectedObjectClicked","trackDetectedObject"],[0,"filterSelected","trackFilter"]]]]],["vviinn-vps-button",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"apiPath":[1,"api-path"],"pressed":[32]},[[0,"modalClosed","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"],"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"]}]]]], options);
15
+ return bootstrapLazy([["cropper-handler_27",[[1,"vviinn-vps-widget",{"token":[1],"apiPath":[1,"api-path"],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"slidePosition":[32],"width":[32],"wrongImageFormat":[32]},[[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"],[0,"cropperChanged","trachSearchAreaChanges"],[0,"detectedObjectClicked","trackDetectedObject"],[0,"filterSelected","trackFilter"]]],[1,"vviinn-image-view"],[1,"vviinn-onboarding"],[1,"vviinn-example-images",null,[[0,"exampleImageSelected","handleImageSelection"],[0,"exampleImageError","handleImageSelectionError"]]],[1,"vviinn-overlayed-modal",{"active":[4]}],[1,"vviinn-empty-results"],[1,"vviinn-image-selector"],[1,"vviinn-server-error"],[1,"vviinn-wrong-format"],[1,"search-filters",{"filter":[16],"selectedCategoryId":[32],"hideFilters":[32]}],[1,"vviinn-privacy-badge"],[1,"vviinn-teaser"],[1,"image-cropper",{"disabled":[4],"handleMove":[32]}],[1,"vviinn-example-image",{"src":[1],"width":[2],"height":[2],"selected":[32]}],[1,"highlight-box"],[1,"vviinn-detected-object",{"detectedObject":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"slider":[32]}],[1,"vviinn-onboarding-card-1"],[1,"vviinn-onboarding-card-2"],[1,"vviinn-onboarding-card-3"],[1,"vviinn-overlay"],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32]}],[1,"cropper-handler",{"handler":[16],"disabled":[4]}],[1,"vviinn-error"],[1,"vviinn-preloader"],[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"],"index":[2],"imageLoaded":[32]}]]],["vviinn-vps-button",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"apiPath":[1,"api-path"],"pressed":[32]},[[0,"modalClosed","handleModalClosed"]]]]],["vviinn-carousel_2",[[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],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"recommendations":[32],"loaded":[32]},[[0,"productImageLoaded","handleImageLoading"],[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"recommendations":[16],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32]}]]],["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"],"campaigns":[1],"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]}]]]], options);
16
16
  });
17
17
  };
18
18
 
@@ -1,8 +1,6 @@
1
- import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-59f44eaa.js';
2
- import { _ as _Array, O as Option, S as Semigroup, a as _function, E as Either, i as imageSearchState, s as state, c as chainW, m as makeRequest, f as fromEither, g as getApiPath, b as createInitGetRequest, d as sequenceT, A as Apply, T as TaskEither } from './imageSearch.store-0ae87235.js';
3
- import { C as ChevronIcon } from './index-ac05c460.js';
4
- import { p as pipe } from './Handler-f9b8735c.js';
5
- import { c as createProductViewVprEvent, a as createProductClickVprEvent, v as v4, b as createTrackingApi, d as createWidgetVprEvent } from './index-2e296af4.js';
1
+ import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-75a1f589.js';
2
+ import { D as _Array, _ as _function, p as pipe, F as chainW, G as makeRequest, H as fromEither, I as getApiPath, J as createInitGetRequest, K as sequenceT, L as Apply, M as map, P as match, u as state, Q as createProductViewVprEvent, R as createProductClickVprEvent, z as v4, A as createTrackingApi, T as createWidgetVprEvent, U as TaskEither, V as checkEmpryString, E as Either, i as imageSearchState } from './index-33fe5a25.js';
3
+ import { e as ChevronIcon } from './index-f9df412f.js';
6
4
 
7
5
  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;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;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.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)}}";
8
6
 
@@ -208,182 +206,6 @@ let VviinnCarousel = class {
208
206
  };
209
207
  VviinnCarousel.style = vviinnCarouselCss;
210
208
 
211
- class GtagAnalytics {
212
- sendImpression(product) {
213
- var _a, _b, _c;
214
- gtag('event', 'view_item_list', {
215
- items: [
216
- {
217
- id: product.productId,
218
- name: product.title,
219
- brand: (_a = product.brand) !== null && _a !== void 0 ? _a : '',
220
- category: (_b = product.productType) !== null && _b !== void 0 ? _b : '',
221
- list_name: 'VI VPR View',
222
- price: Math.min(...[product.price.actual, (_c = product.price.sale) !== null && _c !== void 0 ? _c : Infinity])
223
- }
224
- ]
225
- });
226
- return undefined;
227
- }
228
- sendClick(product) {
229
- var _a, _b, _c;
230
- gtag('event', 'select_content', {
231
- content_type: 'product',
232
- items: [
233
- {
234
- id: product.productId,
235
- name: product.title,
236
- brand: (_a = product.brand) !== null && _a !== void 0 ? _a : '',
237
- category: (_b = product.productType) !== null && _b !== void 0 ? _b : '',
238
- list_name: 'VI VPR View',
239
- price: Math.min(...[product.price.actual, (_c = product.price.sale) !== null && _c !== void 0 ? _c : Infinity])
240
- }
241
- ]
242
- });
243
- return undefined;
244
- }
245
- }
246
-
247
- class GAnalytics {
248
- constructor() {
249
- ga('require', 'ec');
250
- }
251
- convertProduct(product) {
252
- var _a, _b, _c;
253
- return {
254
- id: product.productId,
255
- name: product.title,
256
- brand: (_a = product.brand) !== null && _a !== void 0 ? _a : '',
257
- category: (_b = product.productType) !== null && _b !== void 0 ? _b : '',
258
- list: 'VI VPR View',
259
- price: Math.min(...[product.price.actual, (_c = product.price.sale) !== null && _c !== void 0 ? _c : Infinity])
260
- };
261
- }
262
- sendImpression(product) {
263
- ga('ec:addImpression', this.convertProduct(product));
264
- return undefined;
265
- }
266
- sendClick(product) {
267
- var _a, _b, _c;
268
- ga('ec:addProduct', {
269
- id: product.productId,
270
- name: product.title,
271
- brand: (_a = product.brand) !== null && _a !== void 0 ? _a : '',
272
- category: (_b = product.productType) !== null && _b !== void 0 ? _b : '',
273
- price: Math.min(...[product.price.actual, (_c = product.price.sale) !== null && _c !== void 0 ? _c : Infinity])
274
- });
275
- ga('ec:setAction', 'click', { list: 'VI VPR View' });
276
- return undefined;
277
- }
278
- }
279
-
280
- const getGtagAnalytics = () => _function.pipe(Option.fromNullable(window.gtag), Option.map(() => new GtagAnalytics()));
281
- const getCommonAnalytics = () => _function.pipe(Option.fromNullable(window.ga), Option.map(() => new GAnalytics()));
282
- const analyticsMonoid = Option.getMonoid(Semigroup.first());
283
- const getAnalyticsModule = analyticsMonoid.concat(getGtagAnalytics(), getCommonAnalytics());
284
-
285
- const FIT_EXPR = /fit\/\d+\//;
286
- const containsFit = (url) => {
287
- return _function.pipe(url.match(FIT_EXPR), Either.fromNullable(url), Either.map(() => url));
288
- };
289
- const processWidth = (url, size) => {
290
- return _function.pipe(containsFit(url), Either.map((url) => url.replace(FIT_EXPR, `fit/${size}/`)), Either.getOrElse(() => url));
291
- };
292
- const Linked = (props, child) => props.deeplink ? (h("a", { class: props.part, part: props.part, href: props.deeplink }, child)) : (child);
293
- const FormattedPrice = (props) => {
294
- var _a;
295
- const locale = props.locale;
296
- const formattedPrice = new Intl.NumberFormat(locale, {
297
- minimumFractionDigits: 2,
298
- }).format(props.price);
299
- const fullPrice = `${(_a = props.prefix) !== null && _a !== void 0 ? _a : ""} ${formattedPrice} ${props.currency}`;
300
- return (h("span", { class: "price-amount", part: "price-amount" }, fullPrice));
301
- };
302
- const Price = (props) => {
303
- const priceEl = (h(FormattedPrice, { prefix: props.prefix, currency: props.currency, price: props.price, locale: props.locale }));
304
- return (h("span", { class: "price-container", part: "price-container" }, props.salePrice ? ([
305
- h("span", { class: "price-sale", part: "price-sale" },
306
- h(FormattedPrice, { prefix: props.prefix, currency: props.currency, price: props.salePrice, locale: props.locale })),
307
- h("span", { class: "price-outdated", part: "price-outdated" }, priceEl),
308
- ]) : (h("span", { class: "price-regular", part: "price-regular" }, priceEl))));
309
- };
310
- const Image = (props, onLoadEnd = () => undefined) => (h("picture", null,
311
- h("img", { loading: props.lazy ? "lazy" : "eager", part: "image", class: "image", width: props.width, height: props.height, src: processWidth(props.src, props.width), alt: props.title, onLoad: onLoadEnd })));
312
- const ResponsiveImage = (props, onLoadEnd = () => undefined) => (h("picture", null,
313
- h("img", { loading: props.lazy ? "lazy" : "eager", part: "image", class: "image responsive", src: processWidth(props.src, props.width), alt: props.title, onLoad: onLoadEnd })));
314
-
315
- const vviinnProductCardCss = ":host{align-items:center;display:flex;flex-direction:column;gap:8px;height:100%}.price-container{display:flex;flex-direction:column}.price-sale,.price-regular{font-style:normal;font-weight:normal;font-size:16px;line-height:24px;color:#161616}.price-outdated{font-style:normal;font-weight:normal;font-size:16px;line-height:24px;color:#757575;text-decoration:line-through}.product-type{word-wrap:anywhere}.image{display:grid;align-content:center;-o-object-position:50% 50%;object-position:50% 50%;-o-object-fit:contain;object-fit:contain;text-align:center;box-sizing:border-box}img.responsive{width:100%;height:auto;aspect-ratio:1}.brand,.type{display:none}.title{-webkit-box-orient:vertical;-webkit-line-clamp:2;color:#161616;display:-webkit-box;font-size:16px;font-style:normal;font-weight:500;line-height:24px;margin-bottom:8px;overflow:hidden}.deeplink{text-decoration:none}.image-link{display:contents}picture{position:relative;width:100%}:host(.dimmed) picture::before{content:\"\";width:100%;height:100%;box-sizing:border-box;background:#f7f7f7;display:block;top:0;left:0;position:absolute;mix-blend-mode:multiply}";
316
-
317
- let VviinnProductCard = class {
318
- constructor(hostRef) {
319
- registerInstance(this, hostRef);
320
- this.recommendationLoad = createEvent(this, "recommendationLoad", 7);
321
- this.recommendationView = createEvent(this, "recommendationView", 7);
322
- this.recommendationClick = createEvent(this, "recommendationClick", 7);
323
- this.productImageLoaded = createEvent(this, "productImageLoaded", 7);
324
- this.currency = undefined;
325
- this.imageRatio = 1;
326
- this.imageWidth = 200;
327
- this.locale = undefined;
328
- this.pricePrefix = undefined;
329
- this.responsive = false;
330
- this.dimmedBackground = false;
331
- /** @internal */
332
- this.index = 0;
333
- this.imageLoaded = false;
334
- this.productData = null;
335
- this.intersectionObserver = new IntersectionObserver(this.intersectionCallback.bind(this), { threshold: 1.0 });
336
- }
337
- connectedCallback() {
338
- this.productData = {
339
- product: this.productId,
340
- rank: this.index,
341
- };
342
- }
343
- intersectionCallback(data) {
344
- if (data.some((entry) => entry.isIntersecting)) {
345
- _function.pipe(getAnalyticsModule, Option.map((analytics) => analytics.sendImpression(this.getProduct())));
346
- this.recommendationView.emit(this.productData);
347
- this.intersectionObserver.disconnect();
348
- }
349
- }
350
- componentDidLoad() {
351
- this.recommendationLoad.emit(this.productData);
352
- this.intersectionObserver.observe(this.el);
353
- const links = this.el.shadowRoot.querySelectorAll("a");
354
- links.forEach((link) => link.addEventListener("click", (event) => {
355
- event.preventDefault();
356
- event.stopImmediatePropagation();
357
- this.recommendationClick.emit(this.productData);
358
- _function.pipe(getAnalyticsModule, Option.match(() => null, (analytics) => analytics.sendClick(this.getProduct())));
359
- }));
360
- }
361
- getProduct() {
362
- return imageSearchState.results.find((r) => r.productId === this.productId);
363
- }
364
- renderImage() {
365
- const props = {
366
- width: this.imageWidth,
367
- height: this.imageWidth * this.imageRatio,
368
- src: this.image,
369
- title: this.productTitle,
370
- lazy: false,
371
- };
372
- return this.responsive
373
- ? ResponsiveImage(props, () => this.kek())
374
- : Image(props, () => this.kek());
375
- }
376
- kek() {
377
- this.productImageLoaded.emit(this.productId);
378
- }
379
- render() {
380
- var _a, _b, _c;
381
- return (h(Host, { part: "product-card", class: { dimmed: this.dimmedBackground }, exportparts: "brand, currency, deeplink, image, image-link, price-amount, price-container, price-outdated, price-prefix, price-regular, price-sale, title" }, h(Linked, { deeplink: this.deeplink, part: "image-link" }, this.renderImage()), 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: (_a = this.pricePrefix) !== null && _a !== void 0 ? _a : state.pricePrefix, currency: (_b = this.currency) !== null && _b !== void 0 ? _b : state.currencySign, price: this.price, salePrice: this.salePrice, locale: (_c = this.locale) !== null && _c !== void 0 ? _c : state.locale })));
382
- }
383
- get el() { return getElement(this); }
384
- };
385
- VviinnProductCard.style = vviinnProductCardCss;
386
-
387
209
  const createBearerString = (x) => `Bearer ${x}`;
388
210
  const createAuthedHeader = (x) => new Headers({
389
211
  Authorization: x,
@@ -406,13 +228,13 @@ function fromString(s) {
406
228
  const sequenceToEither = sequenceT(Apply);
407
229
  const apiGet = (path, data = {}) => pipe(sequenceToEither(getApiPath(), createInitGetRequest), fromEither, chainW(makeRequest(path, data)));
408
230
 
409
- const getVPRRecommendations = (productId) => (options) => {
410
- const url = `product/${productId}/similar-products`;
231
+ const getVPRRecommendations = (productId) => (campaigns) => (options) => {
232
+ const url = _function.pipe(campaigns, map(encodeURIComponent), match(() => `product/${productId}/similar-products`, (encodedCampaignsIds) => `product/${productId}/similar-products?campaigns=${encodedCampaignsIds}`));
411
233
  return apiGet(url, options);
412
234
  };
413
235
 
414
- const getVCSRecommendations = (productId) => (options) => {
415
- const url = `product/${productId}/cross-selling-products`;
236
+ const getVCSRecommendations = (productId) => (campaigns) => (options) => {
237
+ const url = _function.pipe(campaigns, map(encodeURIComponent), match(() => `product/${productId}/cross-selling-products`, (encodedCampaignsIds) => `product/${productId}/cross-selling-products?campaigns=${encodedCampaignsIds}`));
416
238
  return apiGet(url, options);
417
239
  };
418
240
 
@@ -1046,6 +868,8 @@ let VviinnVprWidget = class {
1046
868
  this.campaignType = "VPR";
1047
869
  /** Locale for currency formatting */
1048
870
  this.locale = "de-DE";
871
+ /** comma-separated list of campaign-ids */
872
+ this.campaigns = "";
1049
873
  /** @internal */
1050
874
  this.apiPath = "https://api.vviinn.com";
1051
875
  /** @internal */
@@ -1062,6 +886,9 @@ let VviinnVprWidget = class {
1062
886
  handleCampaignTypeChange() {
1063
887
  this.getRecommendations();
1064
888
  }
889
+ handleCampaignsChange() {
890
+ this.getRecommendations();
891
+ }
1065
892
  handleApiPathChange(newPath) {
1066
893
  state.apiPath = newPath;
1067
894
  this.getRecommendations();
@@ -1111,7 +938,7 @@ let VviinnVprWidget = class {
1111
938
  return;
1112
939
  const campaignType = this.campaignType.length > 0 ? this.campaignType : "VPR";
1113
940
  const headers = createBearAuthedHeader(this.token);
1114
- const request = _function.pipe(TaskEither.of(getRecommendationsService(campaignType)), TaskEither.ap(TaskEither.of(this.productId)), TaskEither.ap(TaskEither.of(headers)), TaskEither.flatten);
941
+ const request = _function.pipe(TaskEither.of(getRecommendationsService(campaignType)), TaskEither.ap(TaskEither.of(this.productId)), TaskEither.ap(TaskEither.of(checkEmpryString(this.campaigns))), TaskEither.ap(TaskEither.of(headers)), TaskEither.flatten);
1115
942
  const runRequest = await request();
1116
943
  _function.pipe(runRequest, Either.fold((error) => this.handleError(error), (data) => this.handleRecommendationsSucces(data)));
1117
944
  }
@@ -1160,9 +987,10 @@ let VviinnVprWidget = class {
1160
987
  static get watchers() { return {
1161
988
  "productId": ["handleProductIdChange"],
1162
989
  "campaignType": ["handleCampaignTypeChange"],
990
+ "campaigns": ["handleCampaignsChange"],
1163
991
  "apiPath": ["handleApiPathChange"]
1164
992
  }; }
1165
993
  };
1166
994
  VviinnVprWidget.style = vviinnVprWidgetCss;
1167
995
 
1168
- export { VviinnCarousel as vviinn_carousel, VviinnProductCard as vviinn_product_card, VviinnVprWidget as vviinn_vpr_widget };
996
+ export { VviinnCarousel as vviinn_carousel, VviinnVprWidget as vviinn_vpr_widget };
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-59f44eaa.js';
2
- import { b as CrossIcon } from './index-ac05c460.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-75a1f589.js';
2
+ import { d as CrossIcon } from './index-f9df412f.js';
3
3
 
4
4
  const recommendationsSidebarCss = ":host{--vviinn-carousel-columns:0;box-sizing:border-box;display:block;display:flex;height:100vh;left:0;position:fixed;top:0;transition:background 0.1s ease-in-out;width:100vw}:host(.open){background:rgba(0, 0, 0, 0.2)}:host(.bottom){flex-direction:column;justify-content:end}:host(.right){flex-direction:row;justify-content:flex-end}header{position:relative;text-align:center;padding:32px}header.contains-source-img{display:grid;justify-items:center;grid-gap:12px}img.source-image{width:64px;height:64px;border-radius:50%;box-shadow:0px 2px 4px rgba(0, 0, 0, 0.15);padding:8px}:host(.right) header{box-shadow:0px 2px 6px rgba(0, 0, 0, 0.1)}main{padding:0 24px}:host(.right) main{overflow:auto}.sidebar{background:white;box-sizing:border-box;display:flex;flex-direction:column}:host(.bottom.idle) .sidebar,:host(.bottom.closed) .sidebar{transform:translateY(100%)}:host(.bottom.closed) .sidebar{-webkit-animation-name:slideOutFromBottom;animation-name:slideOutFromBottom;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.bottom.open) .sidebar{-webkit-animation-name:slideInFromBottom;animation-name:slideInFromBottom;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.right.idle) .sidebar{transform:translateX(100%)}:host(.right.closed) .sidebar{-webkit-animation-name:slideOutFromRight;animation-name:slideOutFromRight;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.right.open) .sidebar{-webkit-animation-name:slideInFromRight;animation-name:slideInFromRight;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.right) .sidebar{max-width:480px}:host(.right) vviinn-vpr-widget::part(recommendations-grid){display:grid;grid-template-columns:repeat(2, 1fr);grid-gap:24px}:host(.right) vviinn-vpr-widget{overflow:auto}:host(.right) vviinn-vpr-widget::part(image){border:none}.title{font-style:normal;font-weight:500;font-size:28px;line-height:40px;text-align:center;color:#000000}vviinn-vpr-widget::part(title),vviinn-vpr-widget::part(brand),vviinn-vpr-widget::part(type){text-align:left}vviinn-vpr-widget::part(price-container){align-self:start}.close-sidebar{background:transparent;border:none;cursor:pointer;margin:0;padding:0;position:absolute;right:24px;top:24px}@-webkit-keyframes slideInFromBottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideInFromBottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@-webkit-keyframes slideOutFromBottom{from{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes slideOutFromBottom{from{transform:translateY(0)}to{transform:translateY(100%)}}@-webkit-keyframes slideInFromRight{from{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slideInFromRight{from{transform:translateX(100%)}to{transform:translateX(0)}}@-webkit-keyframes slideOutFromRight{from{transform:translateX(0)}to{transform:translateX(100%)}}@keyframes slideOutFromRight{from{transform:translateX(0)}to{transform:translateX(100%)}}";
5
5
 
@@ -10,6 +10,8 @@ let RecommendationsSidebar = class {
10
10
  this.position = "bottom";
11
11
  this.sourceImage = null;
12
12
  this.widgetScrollbar = false;
13
+ /** comma-separated list of campaign-ids */
14
+ this.campaigns = "";
13
15
  this.state = "idle";
14
16
  }
15
17
  bodyClickListener(event) {
@@ -37,7 +39,7 @@ let RecommendationsSidebar = class {
37
39
  return (_a = this.el.shadowRoot.querySelector("aside")) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
38
40
  }
39
41
  render() {
40
- return (h(Host, { class: this.getClassMap() }, h("aside", { class: "sidebar", part: "body", onAnimationEnd: (e) => this.handleAnimationEnd(e) }, h("header", { class: { "contains-source-img": this.isSourceImageValid() }, part: "sidebar-header" }, this.isSourceImageValid() ? this.renderSourceImage() : null, h("span", { class: "title", part: "title" }, this.sidebarTitle), h("button", { class: "close-sidebar", onClick: () => (this.state = "closed") }, h(CrossIcon, null))), h("main", { part: "sidebar-content" }, h("vviinn-vpr-widget", { exportparts: "brand, currency, deeplink, image, image-link, price-amount, price-container, price-outdated, price-prefix, price-regular, price-sale, title: product-title", token: this.token, productId: this.productId, imageWidth: 300, blockTitle: "", mode: this.position === "bottom" ? "continuity" : "grid", useCarousel: this.position === "bottom", onRecommendationsLoaded: () => (this.state = "open"), showScroll: this.widgetScrollbar })))));
42
+ return (h(Host, { class: this.getClassMap() }, h("aside", { class: "sidebar", part: "body", onAnimationEnd: (e) => this.handleAnimationEnd(e) }, h("header", { class: { "contains-source-img": this.isSourceImageValid() }, part: "sidebar-header" }, this.isSourceImageValid() ? this.renderSourceImage() : null, h("span", { class: "title", part: "title" }, this.sidebarTitle), h("button", { class: "close-sidebar", onClick: () => (this.state = "closed") }, h(CrossIcon, null))), h("main", { part: "sidebar-content" }, h("vviinn-vpr-widget", { exportparts: "brand, currency, deeplink, image, image-link, price-amount, price-container, price-outdated, price-prefix, price-regular, price-sale, title: product-title", token: this.token, productId: this.productId, imageWidth: 300, blockTitle: "", mode: this.position === "bottom" ? "continuity" : "grid", useCarousel: this.position === "bottom", onRecommendationsLoaded: () => (this.state = "open"), showScroll: this.widgetScrollbar, campaigns: this.campaigns })))));
41
43
  }
42
44
  renderSourceImage() {
43
45
  return (h("img", { class: "source-image", part: "source-image", src: this.sourceImage }));
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, h, H as Host } from './index-59f44eaa.js';
2
- import { V as VisualSearchIcon } from './index-ac05c460.js';
1
+ import { r as registerInstance, h, H as Host } from './index-75a1f589.js';
2
+ import { V as VisualSearchIcon } from './index-f9df412f.js';
3
3
 
4
4
  const vviinnVprButtonCss = ":host{display:block}.open-button{align-items:center;background:rgba(255, 255, 255, 0.8);border-radius:50%;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);box-sizing:border-box;cursor:pointer;display:grid;height:40px;justify-items:center;padding:0;width:40px;transition:all 0.25s ease-in-out}.open-button:hover{box-shadow:0px 2px 6px rgba(0, 0, 0, 0.25)}.open-button:focus{border:2px solid rgba(15, 98, 254, 0.5);outline:none}.open-button:active{background:#F4F4F4;outline:none}";
5
5
 
@@ -10,6 +10,8 @@ let VviinnVprButton = class {
10
10
  this.sourceImage = null;
11
11
  this.sidebarTitle = "Visually similar products";
12
12
  this.modalScrollbar = false;
13
+ /** comma-separated list of campaign-ids */
14
+ this.campaigns = "";
13
15
  this.sidebar = null;
14
16
  this.sidebarCloseListener = () => {
15
17
  document.body.removeChild(this.sidebar);
@@ -26,11 +28,14 @@ let VviinnVprButton = class {
26
28
  sidebar.position = this.position;
27
29
  sidebar.sourceImage = this.sourceImage;
28
30
  sidebar.widgetScrollbar = this.modalScrollbar;
31
+ sidebar.campaigns = this.campaigns;
29
32
  this.sidebar = sidebar;
30
33
  sidebar.addEventListener("modalClosed", this.sidebarCloseListener);
31
34
  document.body.append(this.sidebar);
32
35
  }
33
36
  disconnectedCallback() {
37
+ if (!this.sidebar)
38
+ return;
34
39
  this.sidebar.removeEventListener("modalCLosed", this.sidebarCloseListener);
35
40
  document.body.removeChild(this.sidebar);
36
41
  }
@@ -1,6 +1,6 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-59f44eaa.js';
2
- import { a as CameraIcon } from './index-ac05c460.js';
3
- import { S as SlotSkeleton } from './customized-slots-6b427dda.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-75a1f589.js';
2
+ import { c as CameraIcon } from './index-f9df412f.js';
3
+ import { S as SlotSkeleton } from './customized-slots-95a05ceb.js';
4
4
 
5
5
  const vviinnVpsButtonCss = ":host{cursor:pointer}";
6
6
 
@@ -30,7 +30,7 @@ let VviinnVpsButton = class {
30
30
  this.pressed = true;
31
31
  }
32
32
  render() {
33
- return (h(Host, { tabindex: "0", role: "button", pressed: this.pressed, onClick: () => this.handleClick(), onKeyDown: (ev) => this.handleKeyDown(ev) }, h("slot", null, h(CameraIcon, null)), h(SlotSkeleton, null), h("vviinn-vps-widget", { active: this.pressed, "currency-sign": "\u20AC", token: this.token, locale: this.locale, apiPath: this.apiPath, exportparts: "brand, currency, deeplink, image, image-link, price-amount, price-container, price-outdated, price-prefix, price-regular, price-sale, title, product-card, example-images" })));
33
+ return (h(Host, { tabindex: "0", role: "button", pressed: this.pressed, onClick: () => this.handleClick(), onKeyDown: (ev) => this.handleKeyDown(ev) }, h("slot", null, h(CameraIcon, null)), h(SlotSkeleton, null), h("vviinn-vps-widget", { active: this.pressed, "currency-sign": "\u20AC", token: this.token, locale: this.locale, apiPath: this.apiPath, exportparts: "brand, currency, deeplink, image, image-link, price-amount, price-container, price-outdated, price-prefix, price-regular, price-sale, title, product-card, example-images", campaignId: this.campaignId })));
34
34
  }
35
35
  get el() { return getElement(this); }
36
36
  };
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-59f44eaa.js';
2
- import { g as globalScripts } from './app-globals-6f6aa89e.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-75a1f589.js';
2
+ import { g as globalScripts } from './app-globals-68b1d848.js';
3
3
 
4
4
  /*
5
5
  Stencil Client Patch Browser v2.9.0 | MIT Licensed | https://stenciljs.com
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
 
16
16
  patchBrowser().then(options => {
17
17
  globalScripts();
18
- return bootstrapLazy([["cropper-handler",[[1,"cropper-handler",{"handler":[16],"disabled":[4]}]]],["vviinn-error",[[1,"vviinn-error"]]],["vviinn-preloader",[[1,"vviinn-preloader"]]],["vviinn-carousel_3",[[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],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"recommendations":[32],"loaded":[32]},[[0,"productImageLoaded","handleImageLoading"],[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"recommendations":[16],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32]}],[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"],"index":[2],"imageLoaded":[32]}]]],["highlight-box_22",[[1,"vviinn-image-view"],[1,"vviinn-onboarding"],[1,"vviinn-example-images",null,[[0,"exampleImageSelected","handleImageSelection"],[0,"exampleImageError","handleImageSelectionError"]]],[1,"vviinn-overlayed-modal",{"active":[4]}],[1,"vviinn-empty-results"],[1,"vviinn-image-selector"],[1,"vviinn-server-error"],[1,"vviinn-wrong-format"],[1,"search-filters",{"filter":[16],"selectedCategoryId":[32],"hideFilters":[32]}],[1,"vviinn-privacy-badge"],[1,"vviinn-teaser"],[1,"image-cropper",{"disabled":[4],"handleMove":[32]}],[1,"vviinn-example-image",{"src":[1],"width":[2],"height":[2],"selected":[32]}],[1,"highlight-box"],[1,"vviinn-detected-object",{"detectedObject":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"slider":[32]}],[1,"vviinn-onboarding-card-1"],[1,"vviinn-onboarding-card-2"],[1,"vviinn-onboarding-card-3"],[1,"vviinn-overlay"],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32]}]]],["vviinn-vps-widget",[[1,"vviinn-vps-widget",{"token":[1],"apiPath":[1,"api-path"],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"slidePosition":[32],"width":[32],"wrongImageFormat":[32]},[[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"],[0,"cropperChanged","trachSearchAreaChanges"],[0,"detectedObjectClicked","trackDetectedObject"],[0,"filterSelected","trackFilter"]]]]],["vviinn-vps-button",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"apiPath":[1,"api-path"],"pressed":[32]},[[0,"modalClosed","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"],"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"]}]]]], options);
18
+ return bootstrapLazy([["cropper-handler_27",[[1,"vviinn-vps-widget",{"token":[1],"apiPath":[1,"api-path"],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"slidePosition":[32],"width":[32],"wrongImageFormat":[32]},[[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"],[0,"cropperChanged","trachSearchAreaChanges"],[0,"detectedObjectClicked","trackDetectedObject"],[0,"filterSelected","trackFilter"]]],[1,"vviinn-image-view"],[1,"vviinn-onboarding"],[1,"vviinn-example-images",null,[[0,"exampleImageSelected","handleImageSelection"],[0,"exampleImageError","handleImageSelectionError"]]],[1,"vviinn-overlayed-modal",{"active":[4]}],[1,"vviinn-empty-results"],[1,"vviinn-image-selector"],[1,"vviinn-server-error"],[1,"vviinn-wrong-format"],[1,"search-filters",{"filter":[16],"selectedCategoryId":[32],"hideFilters":[32]}],[1,"vviinn-privacy-badge"],[1,"vviinn-teaser"],[1,"image-cropper",{"disabled":[4],"handleMove":[32]}],[1,"vviinn-example-image",{"src":[1],"width":[2],"height":[2],"selected":[32]}],[1,"highlight-box"],[1,"vviinn-detected-object",{"detectedObject":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"slider":[32]}],[1,"vviinn-onboarding-card-1"],[1,"vviinn-onboarding-card-2"],[1,"vviinn-onboarding-card-3"],[1,"vviinn-overlay"],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32]}],[1,"cropper-handler",{"handler":[16],"disabled":[4]}],[1,"vviinn-error"],[1,"vviinn-preloader"],[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"],"index":[2],"imageLoaded":[32]}]]],["vviinn-vps-button",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"apiPath":[1,"api-path"],"pressed":[32]},[[0,"modalClosed","handleModalClosed"]]]]],["vviinn-carousel_2",[[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],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"recommendations":[32],"loaded":[32]},[[0,"productImageLoaded","handleImageLoading"],[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"recommendations":[16],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32]}]]],["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"],"campaigns":[1],"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]}]]]], options);
19
19
  });
@@ -1,3 +1,3 @@
1
1
  import * as C from "./Campaign";
2
- export declare const getRecommendationsService: (campaignType: C.CampaignName) => ((productId: string) => (options: RequestInit) => import("fp-ts/lib/TaskEither").TaskEither<import("../error").BasicError<string | Response>, import("./VPRCampaignResponse").VPRCampaignResponse>) | ((productId: string) => (options: RequestInit) => import("fp-ts/lib/TaskEither").TaskEither<import("../error").BasicError<string | Response>, import("./VCSCampaignResponse").VCSCampaignResponse>);
2
+ export declare const getRecommendationsService: (campaignType: C.CampaignName) => ((productId: string) => (campaigns: import("fp-ts/lib/Option").Option<string>) => (options: RequestInit) => import("fp-ts/lib/TaskEither").TaskEither<import("../error").BasicError<string | Response>, import("./VPRCampaignResponse").VPRCampaignResponse>) | ((productId: string) => (campaigns: import("fp-ts/lib/Option").Option<string>) => (options: RequestInit) => import("fp-ts/lib/TaskEither").TaskEither<import("../error").BasicError<string | Response>, import("./VCSCampaignResponse").VCSCampaignResponse>);
3
3
  //# sourceMappingURL=CampaignService.d.ts.map
@@ -1,3 +1,4 @@
1
1
  import { VCSCampaignResponse } from "./VCSCampaignResponse";
2
- export declare const getVCSRecommendations: (productId: string) => (options: RequestInit) => import("fp-ts/lib/TaskEither").TaskEither<import("../error").BasicError<string | Response>, VCSCampaignResponse>;
2
+ import * as O from "fp-ts/Option";
3
+ export declare const getVCSRecommendations: (productId: string) => (campaigns: O.Option<string>) => (options: RequestInit) => import("fp-ts/lib/TaskEither").TaskEither<import("../error").BasicError<string | Response>, VCSCampaignResponse>;
3
4
  //# sourceMappingURL=VCSCampaignService.d.ts.map
@@ -1,3 +1,4 @@
1
1
  import { VPRCampaignResponse } from "./VPRCampaignResponse";
2
- export declare const getVPRRecommendations: (productId: string) => (options: RequestInit) => import("fp-ts/lib/TaskEither").TaskEither<import("../error").BasicError<string | Response>, VPRCampaignResponse>;
2
+ import * as O from "fp-ts/Option";
3
+ export declare const getVPRRecommendations: (productId: string) => (campaigns: O.Option<string>) => (options: RequestInit) => import("fp-ts/lib/TaskEither").TaskEither<import("../error").BasicError<string | Response>, VPRCampaignResponse>;
3
4
  //# sourceMappingURL=VPRCampaignService.d.ts.map
@@ -12,6 +12,8 @@ export declare class RecommendationsSidebar {
12
12
  position: "bottom" | "right";
13
13
  sourceImage: string | null;
14
14
  widgetScrollbar: boolean;
15
+ /** comma-separated list of campaign-ids */
16
+ campaigns: string;
15
17
  state: SidebarState;
16
18
  modalClosed: EventEmitter<void>;
17
19
  bodyClickListener(event: ClickEvent): void;
@@ -204,5 +204,11 @@ export declare const argTypes: {
204
204
  token: {
205
205
  name: string;
206
206
  };
207
+ campaigns: {
208
+ name: string;
209
+ control: {
210
+ type: string;
211
+ };
212
+ };
207
213
  };
208
214
  //# sourceMappingURL=args.d.ts.map
@@ -208,6 +208,12 @@ declare const _default: {
208
208
  token: {
209
209
  name: string;
210
210
  };
211
+ campaigns: {
212
+ name: string;
213
+ control: {
214
+ type: string;
215
+ };
216
+ };
211
217
  };
212
218
  };
213
219
  export default _default;
@@ -9,6 +9,8 @@ export declare class VviinnVprButton {
9
9
  sourceImage: string | null;
10
10
  sidebarTitle: string;
11
11
  modalScrollbar: boolean;
12
+ /** comma-separated list of campaign-ids */
13
+ campaigns: string;
12
14
  private sidebar;
13
15
  private sidebarCloseListener;
14
16
  render(): any;
@@ -51,6 +51,12 @@ export declare const argTypes: {
51
51
  };
52
52
  required: boolean;
53
53
  };
54
+ campaigns: {
55
+ name: string;
56
+ control: {
57
+ type: string;
58
+ };
59
+ };
54
60
  contentAlignment: {
55
61
  name: string;
56
62
  options: string[];
@@ -37,6 +37,12 @@ declare const _default: {
37
37
  };
38
38
  required: boolean;
39
39
  };
40
+ campaigns: {
41
+ name: string;
42
+ control: {
43
+ type: string;
44
+ };
45
+ };
40
46
  contentAlignment: {
41
47
  name: string;
42
48
  options: string[];
@@ -41,6 +41,8 @@ export declare class VviinnVprWidget implements ComponentInterface {
41
41
  campaignType: CampaignName;
42
42
  /** Locale for currency formatting */
43
43
  locale: string;
44
+ /** comma-separated list of campaign-ids */
45
+ campaigns: string;
44
46
  /** @internal */
45
47
  apiPath: string | undefined;
46
48
  /** @internal */
@@ -56,6 +58,7 @@ export declare class VviinnVprWidget implements ComponentInterface {
56
58
  uiSessionId: string;
57
59
  handleProductIdChange(): void;
58
60
  handleCampaignTypeChange(): void;
61
+ handleCampaignsChange(): void;
59
62
  handleApiPathChange(newPath: string): void;
60
63
  handleImageLoading({ detail }: CustomEvent<string>): void;
61
64
  trackRecommendationView({ detail }: ProductCardEvent): void;
@@ -38,6 +38,8 @@ export declare class VviinnVpsButton {
38
38
  currencySign: string;
39
39
  /** Locale for currency formatting */
40
40
  locale: string;
41
+ /** Campaign using for visual search */
42
+ campaignId?: string;
41
43
  /** @internal */
42
44
  apiPath: string | undefined;
43
45
  pressed: boolean;
@@ -36,6 +36,8 @@ export declare class VviinnVpsWidget {
36
36
  currencySign: string;
37
37
  /** Locale for currency formatting */
38
38
  locale: string;
39
+ /** Campaign using for visual search */
40
+ campaignId?: string;
39
41
  slidePosition: number;
40
42
  width: number;
41
43
  wrongImageFormat: boolean;