vviinn-widgets 2.3.1 → 2.4.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 (222) hide show
  1. package/dist/cjs/{app-globals-6b5da080.js → app-globals-2bcc74df.js} +1 -1
  2. package/dist/cjs/cropper-handler.cjs.entry.js +1 -1
  3. package/dist/cjs/{customized-slots-8bc78ad4.js → customized-slots-4202eaf5.js} +1 -1
  4. package/dist/cjs/highlight-box_22.cjs.entry.js +20 -10
  5. package/dist/cjs/{imageSearch.store-042e9f45.js → imageSearch.store-cb2b2cc8.js} +14 -11
  6. package/dist/cjs/{index-5b9a60ac.js → index-44fc16ad.js} +1 -1
  7. package/dist/cjs/{index-553c2b4f.js → index-6771ae25.js} +1 -1
  8. package/dist/cjs/index-e9439500.js +3943 -0
  9. package/dist/cjs/loader.cjs.js +3 -3
  10. package/dist/cjs/vviinn-carousel_3.cjs.entry.js +51 -19
  11. package/dist/cjs/vviinn-error.cjs.entry.js +1 -1
  12. package/dist/cjs/vviinn-preloader.cjs.entry.js +2 -2
  13. package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +2 -2
  14. package/dist/cjs/vviinn-vpr-button.cjs.entry.js +2 -2
  15. package/dist/cjs/vviinn-vps-button.cjs.entry.js +3 -3
  16. package/dist/cjs/vviinn-vps-widget.cjs.entry.js +74 -10
  17. package/dist/cjs/vviinn-widgets.cjs.js +3 -3
  18. package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.js +27 -7
  19. package/dist/collection/components/image-search/search-filters/search-filters.js +24 -1
  20. package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +18 -1
  21. package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +57 -12
  22. package/dist/collection/components/vviinn-vpr-widget/stories/args.js +8 -8
  23. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +46 -9
  24. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +5 -0
  25. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +108 -10
  26. package/dist/collection/network/utils.js +1 -1
  27. package/dist/collection/openApi/index.js +27 -0
  28. package/dist/collection/{components/vviinn-vpr-widget/GridMode.js → recommendation/events.js} +0 -0
  29. package/dist/collection/store/store.js +7 -9
  30. package/dist/collection/store/tracking.store.js +3 -0
  31. package/dist/collection/tracking/event.js +3 -0
  32. package/dist/collection/tracking/filter.js +5 -0
  33. package/dist/collection/tracking/index.js +13 -0
  34. package/dist/collection/tracking/models.js +6 -0
  35. package/dist/collection/tracking/product.js +18 -0
  36. package/dist/collection/tracking/search.js +5 -0
  37. package/dist/collection/tracking/widget.js +10 -0
  38. package/dist/esm/{app-globals-90d99f95.js → app-globals-550daa9b.js} +1 -1
  39. package/dist/esm/cropper-handler.entry.js +1 -1
  40. package/dist/esm/{customized-slots-65b2467d.js → customized-slots-80625933.js} +1 -1
  41. package/dist/esm/highlight-box_22.entry.js +20 -10
  42. package/dist/esm/{imageSearch.store-f35e14f8.js → imageSearch.store-1268786d.js} +12 -10
  43. package/dist/esm/{index-ac2e3b9d.js → index-1cf740a8.js} +1 -1
  44. package/dist/esm/{index-d7c7df1c.js → index-c09e56b6.js} +1 -1
  45. package/dist/esm/index-fa27f1df.js +3934 -0
  46. package/dist/esm/loader.js +3 -3
  47. package/dist/esm/vviinn-carousel_3.entry.js +51 -19
  48. package/dist/esm/vviinn-error.entry.js +1 -1
  49. package/dist/esm/vviinn-preloader.entry.js +2 -2
  50. package/dist/esm/vviinn-recommendations-sidebar.entry.js +2 -2
  51. package/dist/esm/vviinn-vpr-button.entry.js +2 -2
  52. package/dist/esm/vviinn-vps-button.entry.js +3 -3
  53. package/dist/esm/vviinn-vps-widget.entry.js +71 -7
  54. package/dist/esm/vviinn-widgets.js +3 -3
  55. package/dist/types/Image/error.d.ts +1 -0
  56. package/dist/types/Image/form.d.ts +1 -0
  57. package/dist/types/Image/fromFile.d.ts +1 -0
  58. package/dist/types/Image/imageToB64.d.ts +1 -0
  59. package/dist/types/Image/index.d.ts +1 -0
  60. package/dist/types/Image/renderPromise.d.ts +1 -0
  61. package/dist/types/Image/resizeImage.d.ts +1 -0
  62. package/dist/types/Image/sizing.d.ts +1 -0
  63. package/dist/types/Image/toFile.d.ts +1 -0
  64. package/dist/types/analytics/GAnalytics.d.ts +1 -0
  65. package/dist/types/analytics/GeneralAnalytics.d.ts +1 -0
  66. package/dist/types/analytics/GtagAnalytics.d.ts +1 -0
  67. package/dist/types/analytics/ProductAnalytics.d.ts +1 -0
  68. package/dist/types/campaign/Campaign.d.ts +1 -0
  69. package/dist/types/campaign/CampaignService.d.ts +1 -0
  70. package/dist/types/campaign/VCSCampaign.d.ts +1 -0
  71. package/dist/types/campaign/VCSCampaignResponse.d.ts +1 -0
  72. package/dist/types/campaign/VCSCampaignService.d.ts +1 -0
  73. package/dist/types/campaign/VPRCampaignResponse.d.ts +1 -0
  74. package/dist/types/campaign/VPRCampaignService.d.ts +1 -0
  75. package/dist/types/components/customized-slots.d.ts +1 -0
  76. package/dist/types/components/image-search/image-view/highlight-box/highlight-box.d.ts +1 -0
  77. package/dist/types/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.d.ts +1 -0
  78. package/dist/types/components/image-search/image-view/image-cropper/image-cropper.d.ts +4 -0
  79. package/dist/types/components/image-search/search-filters/search-filters.d.ts +4 -0
  80. package/dist/types/components/vviinn-carousel/vviinn-carousel.d.ts +1 -0
  81. package/dist/types/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.d.ts +1 -0
  82. package/dist/types/components/vviinn-error/vviinn-error.d.ts +1 -0
  83. package/dist/types/components/vviinn-error/vviinn-server-error/vviinn-server-error.d.ts +1 -0
  84. package/dist/types/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.d.ts +1 -0
  85. package/dist/types/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.d.ts +1 -0
  86. package/dist/types/components/vviinn-example-images/vviinn-example-images.d.ts +1 -0
  87. package/dist/types/components/vviinn-icons/index.d.ts +1 -0
  88. package/dist/types/components/vviinn-image-selector/vviinn-image-selector.d.ts +1 -0
  89. package/dist/types/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.d.ts +3 -0
  90. package/dist/types/components/vviinn-image-view/vviinn-image-view.d.ts +1 -0
  91. package/dist/types/components/vviinn-modal/vviinn-modal.d.ts +1 -0
  92. package/dist/types/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.d.ts +1 -0
  93. package/dist/types/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.d.ts +1 -0
  94. package/dist/types/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.d.ts +1 -0
  95. package/dist/types/components/vviinn-onboarding/vviinn-onboarding.d.ts +1 -0
  96. package/dist/types/components/vviinn-overlay/vviinn-overlay.d.ts +1 -0
  97. package/dist/types/components/vviinn-overlayed-modal/vviinn-overlayed-modal.d.ts +1 -0
  98. package/dist/types/components/vviinn-preloader/vviinn-preloader.d.ts +1 -0
  99. package/dist/types/components/vviinn-privacy-badge/vviinn-privacy-badge.d.ts +1 -0
  100. package/dist/types/components/vviinn-product-card/render-helpers.d.ts +1 -0
  101. package/dist/types/components/vviinn-product-card/stories/args.d.ts +1 -0
  102. package/dist/types/components/vviinn-product-card/stories/decorators.d.ts +1 -0
  103. package/dist/types/components/vviinn-product-card/stories/vviinn-product-card.stories.d.ts +1 -0
  104. package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +9 -3
  105. package/dist/types/components/vviinn-slider/arrow.d.ts +1 -0
  106. package/dist/types/components/vviinn-slider/vviinn-slide/vviinn-slide.d.ts +1 -0
  107. package/dist/types/components/vviinn-slider/vviinn-slider.d.ts +1 -0
  108. package/dist/types/components/vviinn-teaser/vviinn-teaser.d.ts +1 -0
  109. package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +1 -0
  110. package/dist/types/components/vviinn-vpr-button/stories/args.d.ts +1 -0
  111. package/dist/types/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.d.ts +1 -0
  112. package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +1 -0
  113. package/dist/types/components/vviinn-vpr-widget/stories/args.d.ts +1 -0
  114. package/dist/types/components/vviinn-vpr-widget/stories/decorators.d.ts +1 -0
  115. package/dist/types/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.d.ts +1 -0
  116. package/dist/types/components/vviinn-vpr-widget/token-helpers.d.ts +1 -0
  117. package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +9 -1
  118. package/dist/types/components/vviinn-vps-button/stories/vviinn-vps-button.stories.d.ts +1 -0
  119. package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +1 -0
  120. package/dist/types/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.d.ts +1 -0
  121. package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +14 -1
  122. package/dist/types/components.d.ts +10 -4
  123. package/dist/types/cropper/Cropper.d.ts +1 -0
  124. package/dist/types/cropper/Handler.d.ts +1 -0
  125. package/dist/types/dom/index.d.ts +1 -0
  126. package/dist/types/error.d.ts +1 -0
  127. package/dist/types/file/index.d.ts +1 -0
  128. package/dist/types/geometry/Clip.d.ts +1 -0
  129. package/dist/types/geometry/Point.d.ts +1 -0
  130. package/dist/types/geometry/Rectangle.d.ts +1 -0
  131. package/dist/types/geometry/RectangleAlt.d.ts +1 -0
  132. package/dist/types/geometry/Sized.d.ts +1 -0
  133. package/dist/types/global.d.ts +1 -0
  134. package/dist/types/index.d.ts +1 -0
  135. package/dist/types/interfaces/generated.d.ts +1 -0
  136. package/dist/types/interfaces/recommendation.d.ts +1 -0
  137. package/dist/types/network/apiClient.d.ts +1 -0
  138. package/dist/types/network/ion/File.d.ts +1 -0
  139. package/dist/types/network/ion/Form.d.ts +1 -0
  140. package/dist/types/network/ion/Link.d.ts +1 -0
  141. package/dist/types/network/ion/ValueObject.d.ts +1 -0
  142. package/dist/types/network/request.d.ts +1 -0
  143. package/dist/types/network/utils.d.ts +1 -0
  144. package/dist/types/openApi/index.d.ts +6 -0
  145. package/dist/types/recommendation/events.d.ts +6 -0
  146. package/dist/types/recommendation/recommendation.d.ts +1 -0
  147. package/dist/types/searchSession/searchSession.d.ts +1 -0
  148. package/dist/types/sentry.d.ts +1 -0
  149. package/dist/types/slider/GridMode.d.ts +1 -0
  150. package/dist/types/store/file-processing.d.ts +1 -0
  151. package/dist/types/store/imageSearch.store.d.ts +1 -0
  152. package/dist/types/store/store.d.ts +8 -6
  153. package/dist/types/store/tracking.store.d.ts +4 -0
  154. package/dist/types/stories/image-selector.stories.d.ts +1 -0
  155. package/dist/types/stories/image-view.stories.d.ts +1 -0
  156. package/dist/types/stories/modal.stories.d.ts +1 -0
  157. package/dist/types/stories/onboarding.stories.d.ts +1 -0
  158. package/dist/types/stories/overlay.stories.d.ts +1 -0
  159. package/dist/types/stories/overlayedModal.stories.d.ts +1 -0
  160. package/dist/types/stories/privacy-badge.stories.d.ts +1 -0
  161. package/dist/types/stories/slider.stories.d.ts +1 -0
  162. package/dist/types/stories/teaser.stories.d.ts +1 -0
  163. package/dist/types/stories/vps-widget.stories.d.ts +1 -0
  164. package/dist/types/stories/vviinn-product.stories.d.ts +1 -0
  165. package/dist/types/tracking/event.d.ts +4 -0
  166. package/dist/types/tracking/filter.d.ts +3 -0
  167. package/dist/types/tracking/index.d.ts +9 -0
  168. package/dist/types/tracking/models.d.ts +13 -0
  169. package/dist/types/tracking/product.d.ts +7 -0
  170. package/dist/types/tracking/search.d.ts +3 -0
  171. package/dist/types/tracking/widget.d.ts +5 -0
  172. package/dist/types/utils/collections/collectionsUtils.d.ts +1 -0
  173. package/dist/types/utils/either.d.ts +1 -0
  174. package/dist/types/utils/enum/enumUtils.d.ts +1 -0
  175. package/dist/types/utils/event/Events.d.ts +1 -0
  176. package/dist/types/utils/number/index.d.ts +1 -0
  177. package/dist/types/utils/option/option.d.ts +1 -0
  178. package/dist/types/utils/semigroup/semigroupDiff.d.ts +1 -0
  179. package/dist/types/utils/token/tokenUtils.d.ts +1 -0
  180. package/dist/vviinn-widgets/{p-e882fbeb.js → p-07125f64.js} +1 -1
  181. package/dist/vviinn-widgets/{p-935b4f49.entry.js → p-27ede517.entry.js} +1 -1
  182. package/dist/vviinn-widgets/{p-320844ea.entry.js → p-314e40b3.entry.js} +1 -1
  183. package/dist/vviinn-widgets/p-316abc01.js +1 -0
  184. package/dist/vviinn-widgets/{p-b0243e84.entry.js → p-4bdb3027.entry.js} +1 -1
  185. package/dist/vviinn-widgets/{p-4530ca32.entry.js → p-5535163a.entry.js} +1 -1
  186. package/dist/vviinn-widgets/{p-80f0d4e0.js → p-78b65f70.js} +1 -1
  187. package/dist/vviinn-widgets/{p-e362fa80.entry.js → p-86ae782f.entry.js} +1 -1
  188. package/dist/vviinn-widgets/p-89f2c19a.entry.js +1 -0
  189. package/dist/vviinn-widgets/{p-b4b46a70.js → p-8e25b838.js} +1 -1
  190. package/dist/vviinn-widgets/p-94aa8705.entry.js +1 -0
  191. package/dist/vviinn-widgets/{p-679ea2ce.js → p-97af45f0.js} +1 -1
  192. package/{www/build/p-55491d9b.js → dist/vviinn-widgets/p-c5e6ec4f.js} +1 -1
  193. package/dist/vviinn-widgets/{p-a5b69a48.entry.js → p-c63fb46b.entry.js} +1 -1
  194. package/{www/build/p-1c141479.entry.js → dist/vviinn-widgets/p-dd7cac6e.entry.js} +1 -1
  195. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  196. package/package.json +11 -3
  197. package/www/build/{p-e882fbeb.js → p-07125f64.js} +1 -1
  198. package/www/build/{p-935b4f49.entry.js → p-27ede517.entry.js} +1 -1
  199. package/www/build/{p-320844ea.entry.js → p-314e40b3.entry.js} +1 -1
  200. package/www/build/p-316abc01.js +1 -0
  201. package/www/build/{p-b0243e84.entry.js → p-4bdb3027.entry.js} +1 -1
  202. package/www/build/{p-4530ca32.entry.js → p-5535163a.entry.js} +1 -1
  203. package/www/build/{p-80f0d4e0.js → p-78b65f70.js} +1 -1
  204. package/www/build/{p-e362fa80.entry.js → p-86ae782f.entry.js} +1 -1
  205. package/www/build/p-89f2c19a.entry.js +1 -0
  206. package/www/build/{p-b4b46a70.js → p-8e25b838.js} +1 -1
  207. package/www/build/p-94aa8705.entry.js +1 -0
  208. package/www/build/p-961822d3.js +125 -0
  209. package/www/build/{p-679ea2ce.js → p-97af45f0.js} +1 -1
  210. package/{dist/vviinn-widgets/p-55491d9b.js → www/build/p-c5e6ec4f.js} +1 -1
  211. package/www/build/{p-a5b69a48.entry.js → p-c63fb46b.entry.js} +1 -1
  212. package/{dist/vviinn-widgets/p-1c141479.entry.js → www/build/p-dd7cac6e.entry.js} +1 -1
  213. package/www/build/p-e0153ae2.css +6 -0
  214. package/www/build/vviinn-widgets.esm.js +1 -1
  215. package/www/index.html +1 -107
  216. package/dist/types/components/vviinn-vpr-widget/GridMode.d.ts +0 -1
  217. package/dist/vviinn-widgets/p-6239a782.entry.js +0 -1
  218. package/dist/vviinn-widgets/p-757849fd.entry.js +0 -1
  219. package/www/build/p-4379b1c2.js +0 -1
  220. package/www/build/p-6239a782.entry.js +0 -1
  221. package/www/build/p-757849fd.entry.js +0 -1
  222. package/www/build/p-a67898be.css +0 -1
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-553c2b4f.js');
6
- const appGlobals = require('./app-globals-6b5da080.js');
5
+ const index = require('./index-6771ae25.js');
6
+ const appGlobals = require('./app-globals-2bcc74df.js');
7
7
 
8
8
  /*
9
9
  Stencil Client Patch Esm v2.9.0 | MIT Licensed | https://stenciljs.com
@@ -16,7 +16,7 @@ const defineCustomElements = (win, options) => {
16
16
  if (typeof window === 'undefined') return Promise.resolve();
17
17
  return patchEsm().then(() => {
18
18
  appGlobals.globalScripts();
19
- return index.bootstrapLazy([["cropper-handler.cjs",[[1,"cropper-handler",{"handler":[16],"disabled":[4]}]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-carousel_3.cjs",[[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","lol"]]],[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"],"imageLoaded":[32]}]]],["highlight-box_22.cjs",[[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.cjs",[[1,"vviinn-vps-widget",{"token":[1],"apiPath":[1,"api-path"],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"slidePosition":[32],"width":[32],"wrongImageFormat":[32]}]]],["vviinn-vps-button.cjs",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"apiPath":[1,"api-path"],"pressed":[32]},[[0,"modalClosed","handleModalClosed"]]]]],["vviinn-recommendations-sidebar.cjs",[[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.cjs",[[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);
19
+ return index.bootstrapLazy([["cropper-handler.cjs",[[1,"cropper-handler",{"handler":[16],"disabled":[4]}]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-carousel_3.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"apiPath":[1,"api-path"],"pressed":[32]},[[0,"modalClosed","handleModalClosed"]]]]],["vviinn-recommendations-sidebar.cjs",[[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.cjs",[[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);
20
20
  });
21
21
  };
22
22
 
@@ -2,10 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-553c2b4f.js');
6
- const imageSearch_store = require('./imageSearch.store-042e9f45.js');
7
- const index$1 = require('./index-5b9a60ac.js');
5
+ const index = require('./index-6771ae25.js');
6
+ const imageSearch_store = require('./imageSearch.store-cb2b2cc8.js');
7
+ const index$1 = require('./index-44fc16ad.js');
8
8
  const Handler = require('./Handler-d1a8a86a.js');
9
+ const index$2 = require('./index-e9439500.js');
9
10
 
10
11
  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)}}";
11
12
 
@@ -331,22 +332,31 @@ let VviinnProductCard = class {
331
332
  this.pricePrefix = undefined;
332
333
  this.responsive = false;
333
334
  this.dimmedBackground = false;
335
+ /** @internal */
336
+ this.index = 0;
334
337
  this.imageLoaded = false;
338
+ this.productData = null;
335
339
  this.intersectionObserver = new IntersectionObserver(this.intersectionCallback.bind(this), { threshold: 1.0 });
336
340
  }
341
+ connectedCallback() {
342
+ this.productData = {
343
+ product: this.productId,
344
+ rank: this.index
345
+ };
346
+ }
337
347
  intersectionCallback(data) {
338
348
  if (data.some((entry) => entry.isIntersecting)) {
339
349
  imageSearch_store._function.pipe(getAnalyticsModule, imageSearch_store.Option.map((analytics) => analytics.sendImpression(this.getProduct())));
340
- this.recommendationView.emit(this.productId);
350
+ this.recommendationView.emit(this.productData);
341
351
  this.intersectionObserver.disconnect();
342
352
  }
343
353
  }
344
354
  componentDidLoad() {
345
- this.recommendationLoad.emit(this.productId);
355
+ this.recommendationLoad.emit(this.productData);
346
356
  this.intersectionObserver.observe(this.el);
347
357
  const links = this.el.shadowRoot.querySelectorAll("a");
348
358
  links.forEach((link) => link.addEventListener("mousedown", (event) => {
349
- this.recommendationClick.emit(this.productId);
359
+ this.recommendationClick.emit(this.productData);
350
360
  if (window.ga) {
351
361
  event.preventDefault();
352
362
  }
@@ -1065,20 +1075,42 @@ let VviinnVprWidget = class {
1065
1075
  this.getRecommendations();
1066
1076
  }
1067
1077
  handleApiPathChange(newPath) {
1068
- imageSearch_store.state$1.apiPath = newPath;
1078
+ imageSearch_store.state.apiPath = newPath;
1069
1079
  this.getRecommendations();
1070
1080
  }
1071
- lol({ detail }) {
1081
+ handleImageLoading({ detail }) {
1072
1082
  this.productImageLoadedSubject.next(detail);
1073
1083
  }
1084
+ trackRecommendationView({ detail }) {
1085
+ const recommendationViewEvent = index$2.createProductViewVprEvent(Object.assign({ session_id: this.uiSessionId }, detail));
1086
+ this.trackingApi.trackEvent(recommendationViewEvent);
1087
+ }
1088
+ trackRecommendationClick({ detail }) {
1089
+ const recommendationClickEvent = index$2.createProductViewVprEvent(Object.assign({ session_id: this.uiSessionId }, detail));
1090
+ this.trackingApi.trackEvent(recommendationClickEvent);
1091
+ }
1074
1092
  connectedCallback() {
1075
- imageSearch_store.state$1.apiPath = this.apiPath;
1076
- imageSearch_store.state$1.currencySign = this.currencySign;
1077
- imageSearch_store.state$1.locale = this.locale;
1093
+ imageSearch_store.state.apiPath = this.apiPath;
1094
+ imageSearch_store.state.currencySign = this.currencySign;
1095
+ imageSearch_store.state.locale = this.locale;
1096
+ this.uiSessionId = index$2.v4();
1097
+ this.trackingApi = index$2.createTrackingApi(this.apiPath, this.token);
1098
+ const widgetOpenEvent = index$2.createWidgetVprEvent({
1099
+ action: "open",
1100
+ sessionId: this.uiSessionId,
1101
+ });
1102
+ this.trackingApi.trackEvent(widgetOpenEvent);
1103
+ }
1104
+ disconnectedCallback() {
1105
+ const widgetCloseEvent = index$2.createWidgetVprEvent({
1106
+ action: "close",
1107
+ sessionId: this.uiSessionId,
1108
+ });
1109
+ this.trackingApi.trackEvent(widgetCloseEvent);
1078
1110
  }
1079
1111
  async componentWillLoad() {
1080
- imageSearch_store.state$1.pricePrefix = this.pricePrefix;
1081
- imageSearch_store.state$1.currencySign = this.currencySign;
1112
+ imageSearch_store.state.pricePrefix = this.pricePrefix;
1113
+ imageSearch_store.state.currencySign = this.currencySign;
1082
1114
  this.getRecommendations();
1083
1115
  }
1084
1116
  async getRecommendations() {
@@ -1099,9 +1131,9 @@ let VviinnVprWidget = class {
1099
1131
  imageSearch_store.imageSearchState.results = this.recommendations;
1100
1132
  this.loaded = true;
1101
1133
  //this.recommendationsLoaded.emit();
1102
- this.productIds = this.recommendations.map(r => r.productId);
1134
+ this.productIds = this.recommendations.map((r) => r.productId);
1103
1135
  this.productImageLoadedSubject.subscribe((id) => {
1104
- this.productIds = this.productIds.filter(x => x !== id);
1136
+ this.productIds = this.productIds.filter((x) => x !== id);
1105
1137
  if (this.productIds.length === 0) {
1106
1138
  this.recommendationsLoaded.emit();
1107
1139
  }
@@ -1118,16 +1150,16 @@ let VviinnVprWidget = class {
1118
1150
  loaded: this.loaded,
1119
1151
  empty: this.recommendations.length == 0,
1120
1152
  [this.mode]: true,
1121
- }, "aria-hidden": this.loaded ? "false" : "true" }, this.renderExternalCSS(), index.h("style", null, imageSearch_store.state$1.fallbackStyles), index.h("h2", { part: "recommendations-title" }, this.blockTitle), this.useCarousel ? this.renderCarousel() : this.renderResults()));
1153
+ }, "aria-hidden": this.loaded ? "false" : "true" }, this.renderExternalCSS(), index.h("style", null, imageSearch_store.state.fallbackStyles), index.h("h2", { part: "recommendations-title" }, this.blockTitle), this.useCarousel ? this.renderCarousel() : this.renderResults()));
1122
1154
  }
1123
- renderRecommendation(recommendation) {
1124
- return (index.h("vviinn-product-card", { part: "product-part", productId: recommendation.productId, productTitle: recommendation.title, deeplink: recommendation.deeplink, image: recommendation.image.thumbnail, brand: recommendation.brand, imageWidth: this.imageWidth, imageRatio: 1, price: recommendation.price.actual, salePrice: recommendation.price.sale, responsive: this.mode === "grid", dimmedBackground: this.useDimmedBackgroundInCard() }));
1155
+ renderRecommendation(recommendation, index$1) {
1156
+ return (index.h("vviinn-product-card", { part: "product-part", productId: recommendation.productId, productTitle: recommendation.title, deeplink: recommendation.deeplink, image: recommendation.image.thumbnail, brand: recommendation.brand, imageWidth: this.imageWidth, imageRatio: 1, price: recommendation.price.actual, salePrice: recommendation.price.sale, responsive: this.mode === "grid", dimmedBackground: this.useDimmedBackgroundInCard(), index: index$1 }));
1125
1157
  }
1126
1158
  useDimmedBackgroundInCard() {
1127
1159
  return this.mode === "continuity" || !this.useCarousel;
1128
1160
  }
1129
1161
  renderResults() {
1130
- return (index.h("div", { class: "recommendations-grid", part: "recommendations-grid" }, this.recommendations.map((r) => this.renderRecommendation(r))));
1162
+ return (index.h("div", { class: "recommendations-grid", part: "recommendations-grid" }, this.recommendations.map((r, i) => this.renderRecommendation(r, i))));
1131
1163
  }
1132
1164
  renderCarousel() {
1133
1165
  return (index.h("vviinn-carousel", { mode: this.mode, imageWidth: this.imageWidth, showScroll: this.showScroll, recommendations: this.recommendations }));
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-553c2b4f.js');
5
+ const index = require('./index-6771ae25.js');
6
6
 
7
7
  const vviinnErrorCss = ":host{background:#F4F4F4;border-radius:8px;display:grid;grid-gap:20px;padding:24px;text-align:center}::slotted(svg){display:grid;align-self:center}::slotted(h4){margin:unset;font-weight:600;font-size:18px;line-height:24px}::slotted(span){font-size:14px;line-height:20px}::slotted(button){-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:transparent;color:var(--color-primary, var(--color-primary-system));font-weight:600;font-size:16px;line-height:20px;cursor:pointer}";
8
8
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-553c2b4f.js');
6
- const imageSearch_store = require('./imageSearch.store-042e9f45.js');
5
+ const index = require('./index-6771ae25.js');
6
+ const imageSearch_store = require('./imageSearch.store-cb2b2cc8.js');
7
7
  require('./Handler-d1a8a86a.js');
8
8
 
9
9
  const vviinnPreloaderCss = ":host{--preloader-size:24px;--preloader-width:calc(var(--preloader-size) / 6);transform-origin:center;-webkit-animation:rotate 3s linear infinite;animation:rotate 3s linear infinite;border:var(--preloader-width) solid white;border-radius:50%;border-top-color:transparent;display:none;outline:0;width:var(--preloader-size);height:var(--preloader-size);box-sizing:border-box}:host(.active){display:flex}@-webkit-keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}@keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}";
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-553c2b4f.js');
6
- const index$1 = require('./index-5b9a60ac.js');
5
+ const index = require('./index-6771ae25.js');
6
+ const index$1 = require('./index-44fc16ad.js');
7
7
 
8
8
  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%)}}";
9
9
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-553c2b4f.js');
6
- const index$1 = require('./index-5b9a60ac.js');
5
+ const index = require('./index-6771ae25.js');
6
+ const index$1 = require('./index-44fc16ad.js');
7
7
 
8
8
  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}";
9
9
 
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-553c2b4f.js');
6
- const index$1 = require('./index-5b9a60ac.js');
7
- const customizedSlots = require('./customized-slots-8bc78ad4.js');
5
+ const index = require('./index-6771ae25.js');
6
+ const index$1 = require('./index-44fc16ad.js');
7
+ const customizedSlots = require('./customized-slots-4202eaf5.js');
8
8
 
9
9
  const vviinnVpsButtonCss = ":host{cursor:pointer}";
10
10
 
@@ -2,9 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-553c2b4f.js');
6
- const imageSearch_store = require('./imageSearch.store-042e9f45.js');
7
- const customizedSlots = require('./customized-slots-8bc78ad4.js');
5
+ const index = require('./index-6771ae25.js');
6
+ const imageSearch_store = require('./imageSearch.store-cb2b2cc8.js');
7
+ const customizedSlots = require('./customized-slots-4202eaf5.js');
8
+ const index$1 = require('./index-e9439500.js');
8
9
  require('./Handler-d1a8a86a.js');
9
10
 
10
11
  const vviinnVpsWidgetCss = ":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{display:block}.hidden{visibility:hidden;height:1px}vviinn-overlayed-modal.first-screen::part(title),vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:hidden}.start-page{display:grid;grid-template-columns:repeat(2, 1fr);min-height:580px}.start-page_block{align-content:start;border-right:1px solid #F4F4F4;display:grid;padding:48px}.start-page_block.error{align-content:center}#onboarding-block{border-right:unset;box-sizing:border-box;grid-gap:24px;overflow-y:auto;position:relative;width:100%}vviinn-teaser{margin-bottom:32px;margin-top:-24px}vviinn-image-selector{align-items:center;background:var(--color-primary, var(--color-primary-system));border-color:var(--color-primary, var(--color-primary-system));border-radius:2px;color:white;display:grid;font-size:16px;font-weight:600;height:56px;justify-items:center;margin-bottom:16px;transition:background 0.1s ease-in-out}vviinn-image-selector:hover{background:var(--color-primary-hover, var(--color-primary-hover-system));border-color:var(--color-primary-hover, var(--color-primary-hover-system))}vviinn-image-selector:active{border-color:black}.upload-button-content{display:grid;align-items:center;justify-items:start;justify-content:center;grid-template-columns:-webkit-max-content auto;grid-template-columns:max-content auto;grid-gap:16px}.results-page{display:grid;grid-template-columns:336px auto;box-sizing:border-box}.results-page>*{padding:24px;box-sizing:border-box}.products{align-content:center;align-items:start;box-sizing:border-box;display:grid;grid-gap:32px 16px;grid-template-columns:repeat(auto-fill, minmax(152px, 1fr));justify-items:center;padding:24px;padding-right:0;position:absolute;width:calc(100% - 16px)}.products.hidden{display:none}vviinn-empty-results{width:280px;align-self:center;justify-self:center}.products-wrapper{display:grid;overflow-y:auto;overflow-x:hidden;padding:unset;position:relative;width:100%}.image-wrapper{border-right:1px solid #F4F4F4;display:grid;grid-template-rows:-webkit-min-content 170px;grid-template-rows:min-content 170px;grid-gap:24px;min-width:100%}.onboarding-wrapper{position:absolute;width:100%;padding:48px;box-sizing:border-box;display:grid;grid-gap:64px;padding-bottom:24px}vviinn-product-card{gap:0;width:100%}vviinn-product-card::part(image){border:1px solid #eaeaea;margin-bottom:8px}vviinn-product-card::part(price-container),vviinn-product-card::part(deeplink),vviinn-product-card::part(title){align-self:start}search-filters span{display:none}search-filters::part(filter){background:#F4F4F4;border-radius:4px;border:1px solid #F4F4F4;box-sizing:border-box;color:#161616;font-size:14px;font-weight:600;line-height:20px}search-filters::part(show-more-filters){border:1px solid #f4f4f4;border-radius:4px;box-sizing:border-box;color:#161616;font-size:14px;font-weight:600;line-height:20px;padding:6px 16px}search-filters::part(show-more-filters):hover{background:#EAEAEA}search-filters::part(filter):hover{background:#EAEAEA}search-filters::part(filter):focus{outline:none;border:1px solid var(--color-primary, var(--color-primary-system))}search-filters::part(filter active){background:rgba(15, 98, 254, 0.15);color:var(--color-primary, var(--color-primary-system))}.filters-wrapper{overflow:auto}.results-page:not(.active){display:none}.nothing-found{display:grid;grid-gap:64px;justify-self:center;padding-top:64px;padding-bottom:16px;position:absolute;width:60%}@media (max-width: 768px){.start-page_block{padding:24px}.onboarding-wrapper{padding:24px}}@media (max-width: 640px){.start-page{grid-template-rows:-webkit-min-content;grid-template-rows:min-content;grid-template-columns:unset;grid-gap:48px;padding:24px 0 48px 0}}@media (max-width: 640px) and (min-width: 415px){.onboarding-wrapper{position:unset}#onboarding-block{overflow:unset}.start-page.active{height:1px;overflow:auto}}@media (max-width: 415px){.results-page>*{box-sizing:border-box;padding:24px}vviinn-slide{padding-bottom:48px}.start-page_block:last-of-type{border-right:unset;overflow-y:unset;position:static;box-sizing:border-box;width:unset}.start-page_block{padding:0 24px}vviinn-teaser{margin-top:24px}.onboarding-wrapper{position:static;width:unset;padding:unset;box-sizing:border-box}.results-page{grid-template-columns:unset;grid-template-rows:-webkit-min-content auto;grid-template-rows:min-content auto}.image{margin-bottom:8px}.image-wrapper{grid-template-rows:-webkit-min-content auto;grid-template-rows:min-content auto;width:100%}.products-wrapper{align-content:start;position:static;overflow-y:unset;width:100%;padding-top:0}.products{position:static;padding:0;width:unset;grid-gap:32px 16px;justify-content:center}.nothing-found{position:static;grid-gap:64px;padding:unset;align-content:start;width:unset}}@media (max-width: 320px){.products{grid-template-columns:unset}}vviinn-wrong-format,vviinn-server-error{width:280px;align-self:center;justify-self:center}";
@@ -12,6 +13,8 @@ const vviinnVpsWidgetCss = ":host{--color-primary-system:#0F62FE;--color-primary
12
13
  let VviinnVpsWidget = class {
13
14
  constructor(hostRef) {
14
15
  index.registerInstance(this, hostRef);
16
+ /** @internal */
17
+ this.apiPath = "https://api.vviinn.com";
15
18
  /** When true modal window with widget will be shown */
16
19
  this.active = false;
17
20
  /** Currency sign will shown after price */
@@ -21,6 +24,7 @@ let VviinnVpsWidget = class {
21
24
  this.slidePosition = 0;
22
25
  this.width = 0;
23
26
  this.wrongImageFormat = false;
27
+ this.imageSource = null;
24
28
  }
25
29
  activeWatcher(value) {
26
30
  if (value) {
@@ -31,22 +35,79 @@ let VviinnVpsWidget = class {
31
35
  document.body.style.overflow = this.overflow;
32
36
  }
33
37
  }
38
+ trackRecommendationView({ detail }) {
39
+ const recommendationViewEvent = index$1.createProductViewVpsEvent(Object.assign({ sessionId: this.uiSessionId }, detail));
40
+ this.trackingApi.trackEvent(recommendationViewEvent);
41
+ }
42
+ trackRecommendationClick({ detail }) {
43
+ const recommendationClickEvent = index$1.createProductViewVpsEvent(Object.assign({ sessionId: this.uiSessionId }, detail));
44
+ this.trackingApi.trackEvent(recommendationClickEvent);
45
+ }
46
+ trachSearchAreaChanges() {
47
+ const searchEvent = index$1.createSearchEvent({
48
+ sessionId: this.uiSessionId,
49
+ source: this.imageSource,
50
+ searchArea: "manual-selection",
51
+ });
52
+ this.trackingApi.trackEvent(searchEvent);
53
+ }
54
+ trackDetectedObject() {
55
+ const searchEvent = index$1.createSearchEvent({
56
+ sessionId: this.uiSessionId,
57
+ source: this.imageSource,
58
+ searchArea: "attention-point",
59
+ });
60
+ this.trackingApi.trackEvent(searchEvent);
61
+ }
62
+ trackFilter({ detail }) {
63
+ const searchEvent = index$1.createFilterEvent({
64
+ sessionId: this.uiSessionId,
65
+ source: this.imageSource,
66
+ kind: "category",
67
+ action: detail,
68
+ });
69
+ this.trackingApi.trackEvent(searchEvent);
70
+ }
34
71
  componentWillLoad() {
35
72
  customizedSlots.slotChangeListener(this, this.el);
36
73
  }
37
74
  connectedCallback() {
38
- imageSearch_store.state$1.apiPath = this.apiPath;
39
- imageSearch_store.state$1.currencySign = this.currencySign;
40
- imageSearch_store.state$1.locale = this.locale;
75
+ imageSearch_store.state.apiPath = this.apiPath;
76
+ imageSearch_store.state.currencySign = this.currencySign;
77
+ imageSearch_store.state.locale = this.locale;
41
78
  imageSearch_store.imageSearchState.token = this.token;
79
+ this.uiSessionId = index$1.v4();
80
+ this.trackingApi = index$1.createTrackingApi(this.apiPath, this.token);
81
+ const widgetOpenEvent = index$1.createWidgetVpsEvent({
82
+ action: "open",
83
+ sessionId: this.uiSessionId,
84
+ });
85
+ this.trackingApi.trackEvent(widgetOpenEvent);
86
+ }
87
+ disconnectedCallback() {
88
+ const widgetOpenEvent = index$1.createWidgetVpsEvent({
89
+ action: "close",
90
+ sessionId: this.uiSessionId,
91
+ });
92
+ this.trackingApi.trackEvent(widgetOpenEvent);
42
93
  }
43
- handleImageSelection() {
94
+ handleImageSelection(source) {
95
+ this.imageSource = source;
44
96
  this.slidePosition = 1;
45
97
  const root = this.el.shadowRoot.querySelector("vviinn-overlayed-modal");
46
98
  const overlay = root.shadowRoot.querySelector("vviinn-overlay");
47
99
  const modal = overlay.querySelector("vviinn-modal");
48
100
  const modalBody = modal.shadowRoot.querySelector(".body");
49
101
  modalBody.scrollTop = 0;
102
+ this.trackInitialSearch();
103
+ }
104
+ trackInitialSearch() {
105
+ const searchEvent = index$1.createSearchEvent({
106
+ sessionId: this.uiSessionId,
107
+ source: this.imageSource,
108
+ searchArea: "full",
109
+ });
110
+ this.trackingApi.trackEvent(searchEvent);
50
111
  }
51
112
  resetState() {
52
113
  this.resetScroll("onboarding-block");
@@ -79,12 +140,15 @@ let VviinnVpsWidget = class {
79
140
  return (index.h(index.Host, null, index.h("vviinn-overlayed-modal", { class: { "first-screen": this.slidePosition === 0 }, active: this.active, onSecondaryActionClicked: () => this.resetState(), onModalClosed: () => this.handleModalClose(), exportparts: "secondary-action, title, close-button" }, index.h("vviinn-slider", { showBullets: false, position: this.slidePosition }, index.h("vviinn-slide", { class: { "start-page": true } }, index.h("div", { class: {
80
141
  error: this.haveErrors(),
81
142
  "start-page_block": true,
82
- } }, index.h("vviinn-wrong-format", { class: { hidden: !this.wrongImageFormat }, onActionClick: () => (this.wrongImageFormat = false) }), index.h("vviinn-server-error", { class: { hidden: !imageSearch_store.imageSearchState.serverError }, onActionClick: () => (imageSearch_store.imageSearchState.serverError = false) }), index.h("vviinn-teaser", { class: { hidden: this.haveErrors() } }), index.h("vviinn-image-selector", { class: { hidden: this.haveErrors() }, onImageSelected: () => this.handleImageSelection(), onImageSelectedError: () => (this.wrongImageFormat = true), part: "select-image_button" }, index.h("span", { slot: "upload-button-text", class: "upload-button-content" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "29", height: "28", fill: "none" }, index.h("defs", null), index.h("path", { fill: "#fff", "fill-rule": "evenodd", d: "M10.271 3.89A.875.875 0 0111 3.5h7c.293 0 .566.146.728.39l1.49 2.235h3.033a2.625 2.625 0 012.625 2.625V21a2.625 2.625 0 01-2.625 2.625H5.75A2.625 2.625 0 013.125 21V8.75A2.625 2.625 0 015.75 6.125h3.031l1.49-2.235zm1.197 1.36l-1.49 2.235a.875.875 0 01-.729.39H5.75a.875.875 0 00-.875.875V21a.875.875 0 00.875.875h17.5a.875.875 0 00.875-.875V8.75a.875.875 0 00-.875-.875h-3.5a.875.875 0 01-.729-.39l-1.49-2.235h-6.063z", "clip-rule": "evenodd" }), index.h("path", { fill: "#fff", "fill-rule": "evenodd", d: "M14.5 11.375a3.062 3.062 0 100 6.125 3.062 3.062 0 000-6.125zm-4.813 3.063a4.812 4.812 0 119.625 0 4.812 4.812 0 01-9.625 0z", "clip-rule": "evenodd" })), index.h("slot", { name: "vviinn-image-upload-button-text" }, index.h("span", null, "Kamera oder Bild ausw\u00E4hlen")))), index.h("vviinn-privacy-badge", { class: { hidden: this.haveErrors() } })), index.h("div", { id: "onboarding-block", class: "start-page_block" }, index.h("div", { class: "onboarding-wrapper" }, index.h("vviinn-onboarding", null), index.h("vviinn-example-images", { onImageSelected: () => this.handleImageSelection(), onImageSelectedError: () => this.resetScroll("onboarding-block", "smooth") })))), index.h("vviinn-slide", { class: { "results-page": true, active: this.slidePosition == 1 } }, index.h("div", { class: "image-wrapper" }, index.h("vviinn-image-view", null), index.h("div", { class: "filters-wrapper" }, index.h("div", { class: "filters" }, imageSearch_store.imageSearchState.filters.map((filter) => (index.h("search-filters", { filter: filter })))))), index.h("div", { id: "results-block", class: "products-wrapper" }, index.h("div", { class: { "nothing-found": true, hidden: imageSearch_store.imageSearchState.results.length > 0 } }, index.h("vviinn-empty-results", null), index.h("vviinn-onboarding", null)), index.h("div", { class: {
143
+ } }, index.h("vviinn-wrong-format", { class: { hidden: !this.wrongImageFormat }, onActionClick: () => (this.wrongImageFormat = false) }), index.h("vviinn-server-error", { class: { hidden: !imageSearch_store.imageSearchState.serverError }, onActionClick: () => (imageSearch_store.imageSearchState.serverError = false) }), index.h("vviinn-teaser", { class: { hidden: this.haveErrors() } }), index.h("vviinn-image-selector", { class: { hidden: this.haveErrors() }, onImageSelected: () => this.handleImageSelection("upload"), onImageSelectedError: () => (this.wrongImageFormat = true), part: "select-image_button" }, index.h("span", { slot: "upload-button-text", class: "upload-button-content" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "29", height: "28", fill: "none" }, index.h("defs", null), index.h("path", { fill: "#fff", "fill-rule": "evenodd", d: "M10.271 3.89A.875.875 0 0111 3.5h7c.293 0 .566.146.728.39l1.49 2.235h3.033a2.625 2.625 0 012.625 2.625V21a2.625 2.625 0 01-2.625 2.625H5.75A2.625 2.625 0 013.125 21V8.75A2.625 2.625 0 015.75 6.125h3.031l1.49-2.235zm1.197 1.36l-1.49 2.235a.875.875 0 01-.729.39H5.75a.875.875 0 00-.875.875V21a.875.875 0 00.875.875h17.5a.875.875 0 00.875-.875V8.75a.875.875 0 00-.875-.875h-3.5a.875.875 0 01-.729-.39l-1.49-2.235h-6.063z", "clip-rule": "evenodd" }), index.h("path", { fill: "#fff", "fill-rule": "evenodd", d: "M14.5 11.375a3.062 3.062 0 100 6.125 3.062 3.062 0 000-6.125zm-4.813 3.063a4.812 4.812 0 119.625 0 4.812 4.812 0 01-9.625 0z", "clip-rule": "evenodd" })), index.h("slot", { name: "vviinn-image-upload-button-text" }, index.h("span", null, "Kamera oder Bild ausw\u00E4hlen")))), index.h("vviinn-privacy-badge", { class: { hidden: this.haveErrors() } })), index.h("div", { id: "onboarding-block", class: "start-page_block" }, index.h("div", { class: "onboarding-wrapper" }, index.h("vviinn-onboarding", null), index.h("vviinn-example-images", { onImageSelected: () => this.handleImageSelection("example"), onImageSelectedError: () => this.resetScroll("onboarding-block", "smooth") })))), index.h("vviinn-slide", { class: { "results-page": true, active: this.slidePosition == 1 } }, index.h("div", { class: "image-wrapper" }, index.h("vviinn-image-view", null), index.h("div", { class: "filters-wrapper" }, index.h("div", { class: "filters" }, imageSearch_store.imageSearchState.filters.map((filter) => (index.h("search-filters", { filter: filter })))))), index.h("div", { id: "results-block", class: "products-wrapper" }, index.h("div", { class: {
144
+ "nothing-found": true,
145
+ hidden: imageSearch_store.imageSearchState.results.length > 0,
146
+ } }, index.h("vviinn-empty-results", null), index.h("vviinn-onboarding", null)), index.h("div", { class: {
83
147
  hidden: imageSearch_store.imageSearchState.results.length <= 0,
84
148
  products: true,
85
- } }, imageSearch_store.imageSearchState.results.map((p) => {
149
+ } }, imageSearch_store.imageSearchState.results.map((p, i) => {
86
150
  var _a;
87
- return (index.h("vviinn-product-card", { hidden: true, productTitle: p.title, productId: p.productId, brand: p.brand, deeplink: p.deeplink, price: p.price.actual, salePrice: p.price.sale, imageWidth: 160, image: (_a = p.image.thumbnail) !== null && _a !== void 0 ? _a : p.image.original, part: "product-card" }));
151
+ return (index.h("vviinn-product-card", { hidden: true, productTitle: p.title, productId: p.productId, brand: p.brand, deeplink: p.deeplink, price: p.price.actual, salePrice: p.price.sale, imageWidth: 160, image: (_a = p.image.thumbnail) !== null && _a !== void 0 ? _a : p.image.original, part: "product-card", index: i }));
88
152
  }))))))));
89
153
  }
90
154
  get el() { return index.getElement(this); }
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-553c2b4f.js');
4
- const appGlobals = require('./app-globals-6b5da080.js');
3
+ const index = require('./index-6771ae25.js');
4
+ const appGlobals = require('./app-globals-2bcc74df.js');
5
5
 
6
6
  /*
7
7
  Stencil Client Patch Browser v2.9.0 | MIT Licensed | https://stenciljs.com
@@ -17,5 +17,5 @@ const patchBrowser = () => {
17
17
 
18
18
  patchBrowser().then(options => {
19
19
  appGlobals.globalScripts();
20
- return index.bootstrapLazy([["cropper-handler.cjs",[[1,"cropper-handler",{"handler":[16],"disabled":[4]}]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-carousel_3.cjs",[[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","lol"]]],[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"],"imageLoaded":[32]}]]],["highlight-box_22.cjs",[[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.cjs",[[1,"vviinn-vps-widget",{"token":[1],"apiPath":[1,"api-path"],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"slidePosition":[32],"width":[32],"wrongImageFormat":[32]}]]],["vviinn-vps-button.cjs",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"apiPath":[1,"api-path"],"pressed":[32]},[[0,"modalClosed","handleModalClosed"]]]]],["vviinn-recommendations-sidebar.cjs",[[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.cjs",[[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);
20
+ return index.bootstrapLazy([["cropper-handler.cjs",[[1,"cropper-handler",{"handler":[16],"disabled":[4]}]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-carousel_3.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"apiPath":[1,"api-path"],"pressed":[32]},[[0,"modalClosed","handleModalClosed"]]]]],["vviinn-recommendations-sidebar.cjs",[[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.cjs",[[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);
21
21
  });
@@ -1,4 +1,4 @@
1
- import { Component, Host, h, State, Element, Prop } from "@stencil/core";
1
+ import { Component, Host, h, State, Element, Prop, Event, } from "@stencil/core";
2
2
  import { move, transform } from "../../../../geometry/Rectangle";
3
3
  import { fromMouseEvent, pointDiffSemigroup, } from "../../../../geometry/Point";
4
4
  import { imageSearchState, makeRectangularSearchRequest, } from "../../../../store/imageSearch.store";
@@ -27,18 +27,21 @@ export class ImageCropper {
27
27
  };
28
28
  pipe(imageSearchState.searchArea, O.map((area) => {
29
29
  const newSearchArea = transform(area, transformedHandler);
30
- if (newSearchArea.width < MIN_SEARCHAREA_SIZE ||
31
- newSearchArea.height < MIN_SEARCHAREA_SIZE ||
32
- newSearchArea.x < 0 ||
33
- newSearchArea.y < 0 ||
34
- this.bounds.height - (newSearchArea.y + newSearchArea.height) < 0 ||
35
- this.bounds.width - (newSearchArea.x + newSearchArea.width) < 0)
30
+ if (this.outOfBounds(newSearchArea))
36
31
  return;
37
32
  imageSearchState.searchArea = O.some(newSearchArea);
38
33
  this.mouseStartPoint = destination;
39
34
  imageSearchState.detectedObject = undefined;
40
35
  }));
41
36
  }
37
+ outOfBounds(area) {
38
+ return (area.width < MIN_SEARCHAREA_SIZE ||
39
+ area.height < MIN_SEARCHAREA_SIZE ||
40
+ area.x < 0 ||
41
+ area.y < 0 ||
42
+ this.bounds.height - (area.y + area.height) < 0 ||
43
+ this.bounds.width - (area.x + area.width) < 0);
44
+ }
42
45
  handleCropperMove(ev) {
43
46
  ev.preventDefault();
44
47
  ev.stopPropagation();
@@ -79,6 +82,7 @@ export class ImageCropper {
79
82
  document.removeEventListener("pointerup", this.pointerReleaseListener);
80
83
  this.mouseStartPoint = undefined;
81
84
  makeRectangularSearchRequest();
85
+ this.cropperChanged.emit();
82
86
  }
83
87
  getStyleMap() {
84
88
  return pipe(imageSearchState.searchArea, O.map((rectangle) => {
@@ -131,5 +135,21 @@ export class ImageCropper {
131
135
  static get states() { return {
132
136
  "handleMove": {}
133
137
  }; }
138
+ static get events() { return [{
139
+ "method": "cropperChanged",
140
+ "name": "cropperChanged",
141
+ "bubbles": true,
142
+ "cancelable": true,
143
+ "composed": true,
144
+ "docs": {
145
+ "tags": [],
146
+ "text": ""
147
+ },
148
+ "complexType": {
149
+ "original": "any",
150
+ "resolved": "any",
151
+ "references": {}
152
+ }
153
+ }]; }
134
154
  static get elementRef() { return "el"; }
135
155
  }
@@ -1,4 +1,4 @@
1
- import { Component, Host, h, Prop, State, Element } from "@stencil/core";
1
+ import { Component, Host, h, Prop, State, Element, Event } from "@stencil/core";
2
2
  import { imageSearchState } from "../../../store/imageSearch.store";
3
3
  import { CheckIcon } from "../../vviinn-icons";
4
4
  const FILTERS_COUNT = 5;
@@ -18,11 +18,13 @@ export class SearchFilters {
18
18
  selectFilter(filter) {
19
19
  this.selectedCategoryId = getFilterId(filter);
20
20
  imageSearchState.activeIonLink = filter;
21
+ this.filterSelected.emit("select");
21
22
  }
22
23
  clearSelectedFilter() {
23
24
  this.selectedCategoryId = null;
24
25
  imageSearchState.activeIonLink = undefined;
25
26
  this.findSelectedFilter().blur();
27
+ this.filterSelected.emit("deselect");
26
28
  }
27
29
  findSelectedFilter() {
28
30
  return this.el.shadowRoot.querySelector(ACTIVE_FILTER_CLASSNAME);
@@ -98,5 +100,26 @@ export class SearchFilters {
98
100
  "selectedCategoryId": {},
99
101
  "hideFilters": {}
100
102
  }; }
103
+ static get events() { return [{
104
+ "method": "filterSelected",
105
+ "name": "filterSelected",
106
+ "bubbles": true,
107
+ "cancelable": true,
108
+ "composed": true,
109
+ "docs": {
110
+ "tags": [],
111
+ "text": ""
112
+ },
113
+ "complexType": {
114
+ "original": "FilterAction",
115
+ "resolved": "\"deselect\" | \"select\"",
116
+ "references": {
117
+ "FilterAction": {
118
+ "location": "import",
119
+ "path": "@vviinn/tracking-client-ts"
120
+ }
121
+ }
122
+ }
123
+ }]; }
101
124
  static get elementRef() { return "el"; }
102
125
  }
@@ -1,4 +1,4 @@
1
- import { Component, Host, h, State, Prop } from "@stencil/core";
1
+ import { Component, Host, h, State, Prop, Event } from "@stencil/core";
2
2
  import { pipe } from "fp-ts/lib/function";
3
3
  import * as O from "fp-ts/lib/Option";
4
4
  import { foldValueObject } from "../../../network/ion/ValueObject";
@@ -25,6 +25,7 @@ export class VviinnDetectedObject {
25
25
  imageSearchState.searchArea = O.some(scaledRect);
26
26
  }));
27
27
  makeRectangularSearchRequest();
28
+ this.detectedObjectClicked.emit();
28
29
  }
29
30
  isActive() {
30
31
  if (!this.detectedObject)
@@ -80,4 +81,20 @@ export class VviinnDetectedObject {
80
81
  static get states() { return {
81
82
  "position": {}
82
83
  }; }
84
+ static get events() { return [{
85
+ "method": "detectedObjectClicked",
86
+ "name": "detectedObjectClicked",
87
+ "bubbles": true,
88
+ "cancelable": true,
89
+ "composed": true,
90
+ "docs": {
91
+ "tags": [],
92
+ "text": ""
93
+ },
94
+ "complexType": {
95
+ "original": "any",
96
+ "resolved": "any",
97
+ "references": {}
98
+ }
99
+ }]; }
83
100
  }