vviinn-widgets 2.1.0 → 2.2.2

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 (307) hide show
  1. package/dist/cjs/Handler-d1a8a86a.js +329 -0
  2. package/dist/{vviinn-widgets/app-globals-e0943e34.js → cjs/app-globals-30781f30.js} +15 -925
  3. package/{www/build/cropper-handler.entry.js → dist/cjs/cropper-handler.cjs.entry.js} +11 -7
  4. package/dist/{vviinn-widgets/customized-slots-f3449695.js → cjs/customized-slots-5d904d8e.js} +6 -3
  5. package/dist/cjs/highlight-box_22.cjs.entry.js +737 -0
  6. package/{www/build/imageSearch.store-407f49f0.js → dist/cjs/imageSearch.store-128957a4.js} +11573 -11902
  7. package/dist/cjs/index-741a970d.js +1354 -0
  8. package/dist/cjs/index-c493804d.js +41 -0
  9. package/dist/cjs/index.cjs.js +2 -0
  10. package/dist/cjs/loader.cjs.js +23 -0
  11. package/dist/cjs/vviinn-carousel_5.cjs.entry.js +1232 -0
  12. package/dist/{vviinn-widgets/vviinn-error.entry.js → cjs/vviinn-error.cjs.entry.js} +8 -4
  13. package/{www/build/vviinn-preloader.entry.js → dist/cjs/vviinn-preloader.cjs.entry.js} +11 -10
  14. package/dist/cjs/vviinn-vps-button.cjs.entry.js +43 -0
  15. package/{www/build/vviinn-vps-widget.entry.js → dist/cjs/vviinn-vps-widget.cjs.entry.js} +31 -30
  16. package/dist/cjs/vviinn-widgets.cjs.js +21 -0
  17. package/dist/collection/Image/error.js +14 -0
  18. package/dist/collection/Image/form.js +5 -0
  19. package/dist/collection/Image/fromFile.js +18 -0
  20. package/dist/collection/Image/imageToB64.js +9 -0
  21. package/dist/collection/Image/index.js +0 -0
  22. package/dist/collection/Image/renderPromise.js +6 -0
  23. package/dist/collection/Image/resizeImage.js +28 -0
  24. package/dist/collection/Image/sizing.js +39 -0
  25. package/dist/collection/Image/toFile.js +17 -0
  26. package/dist/collection/analytics/GAnalytics.js +32 -0
  27. package/dist/collection/analytics/GeneralAnalytics.js +9 -0
  28. package/dist/collection/analytics/GtagAnalytics.js +35 -0
  29. package/dist/collection/analytics/ProductAnalytics.js +1 -0
  30. package/dist/collection/campaign/Campaign.js +8 -0
  31. package/dist/collection/campaign/CampaignService.js +5 -0
  32. package/dist/collection/campaign/VCSCampaign.js +1 -0
  33. package/dist/collection/campaign/VCSCampaignResponse.js +1 -0
  34. package/dist/collection/campaign/VCSCampaignService.js +5 -0
  35. package/dist/collection/campaign/VPRCampaignResponse.js +1 -0
  36. package/dist/collection/campaign/VPRCampaignService.js +5 -0
  37. package/dist/collection/collection-manifest.json +43 -0
  38. package/dist/collection/components/customized-slots.js +47 -0
  39. package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.css +71 -0
  40. package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.js +25 -0
  41. package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.css +49 -0
  42. package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.js +64 -0
  43. package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.css +33 -0
  44. package/dist/{vviinn-widgets/image-cropper.entry.js → collection/components/image-search/image-view/image-cropper/image-cropper.js} +54 -32
  45. package/dist/collection/components/image-search/search-filters/search-filters.css +120 -0
  46. package/dist/collection/components/image-search/search-filters/search-filters.js +102 -0
  47. package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +138 -0
  48. package/{www/build/vviinn-carousel.entry.js → dist/collection/components/vviinn-carousel/vviinn-carousel.js} +115 -18
  49. package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.css +7 -0
  50. package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +36 -0
  51. package/dist/collection/components/vviinn-error/vviinn-error.css +38 -0
  52. package/dist/collection/components/vviinn-error/vviinn-error.js +18 -0
  53. package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.css +3 -0
  54. package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.js +34 -0
  55. package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.css +3 -0
  56. package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.js +34 -0
  57. package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.css +34 -0
  58. package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +129 -0
  59. package/dist/collection/components/vviinn-example-images/vviinn-example-images.css +19 -0
  60. package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +80 -0
  61. package/dist/{vviinn-widgets/index-c9483145.js → collection/components/vviinn-icons/index.js} +13 -12
  62. package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.css +25 -0
  63. package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +64 -0
  64. package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.css +47 -0
  65. package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +83 -0
  66. package/dist/collection/components/vviinn-image-view/vviinn-image-view.css +31 -0
  67. package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +61 -0
  68. package/dist/collection/components/vviinn-modal/vviinn-modal.css +105 -0
  69. package/dist/collection/components/vviinn-modal/vviinn-modal.js +98 -0
  70. package/dist/collection/components/vviinn-onboarding/onboarding-cards/onboarding-card.css +41 -0
  71. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.js +26 -0
  72. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.js +26 -0
  73. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.js +26 -0
  74. package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.css +58 -0
  75. package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.js +28 -0
  76. package/dist/collection/components/vviinn-overlay/vviinn-overlay.css +33 -0
  77. package/dist/collection/components/vviinn-overlay/vviinn-overlay.js +15 -0
  78. package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.css +29 -0
  79. package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.js +71 -0
  80. package/dist/collection/components/vviinn-preloader/vviinn-preloader.css +37 -0
  81. package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +20 -0
  82. package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +19 -0
  83. package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +27 -0
  84. package/dist/collection/components/vviinn-product-card/render-helpers.js +32 -0
  85. package/dist/collection/components/vviinn-product-card/vviinn-product-card.css +95 -0
  86. package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +425 -0
  87. package/dist/collection/components/vviinn-slider/arrow.js +11 -0
  88. package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.css +4 -0
  89. package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.js +15 -0
  90. package/dist/collection/components/vviinn-slider/vviinn-slider.css +109 -0
  91. package/dist/collection/components/vviinn-slider/vviinn-slider.js +181 -0
  92. package/dist/collection/components/vviinn-teaser/vviinn-teaser.css +14 -0
  93. package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +29 -0
  94. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.css +238 -0
  95. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +200 -0
  96. package/dist/collection/components/vviinn-vpr-button/stories/kek.stories.js +18 -0
  97. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.css +35 -0
  98. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +149 -0
  99. package/dist/collection/components/vviinn-vpr-widget/GridMode.js +1 -0
  100. package/dist/collection/components/vviinn-vpr-widget/token-helpers.js +11 -0
  101. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +441 -0
  102. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +74 -0
  103. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.css +0 -0
  104. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +177 -0
  105. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +350 -0
  106. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +247 -0
  107. package/dist/collection/cropper/Cropper.js +1 -0
  108. package/dist/collection/cropper/Handler.js +61 -0
  109. package/dist/collection/dom/index.js +3 -0
  110. package/dist/collection/error.js +14 -0
  111. package/dist/collection/file/index.js +4 -0
  112. package/dist/collection/geometry/Clip.js +14 -0
  113. package/dist/collection/geometry/Point.js +32 -0
  114. package/dist/collection/geometry/Rectangle.js +95 -0
  115. package/dist/collection/geometry/RectangleAlt.js +1 -0
  116. package/dist/collection/geometry/Sized.js +8 -0
  117. package/dist/collection/global.js +19 -0
  118. package/dist/collection/index.js +1 -0
  119. package/dist/collection/interfaces/generated.js +5 -0
  120. package/dist/collection/interfaces/recommendation.js +1 -0
  121. package/dist/collection/network/apiClient.js +9 -0
  122. package/dist/collection/network/ion/File.js +14 -0
  123. package/dist/collection/network/ion/Form.js +64 -0
  124. package/dist/collection/network/ion/Link.js +8 -0
  125. package/dist/collection/network/ion/ValueObject.js +23 -0
  126. package/dist/collection/network/request.js +19 -0
  127. package/dist/collection/network/utils.js +37 -0
  128. package/dist/collection/recommendation/recommendation.js +1 -0
  129. package/dist/collection/searchSession/searchSession.js +26 -0
  130. package/dist/collection/sentry.js +14 -0
  131. package/dist/collection/slider/GridMode.js +1 -0
  132. package/dist/collection/store/file-processing.js +13 -0
  133. package/dist/collection/store/imageSearch.store.js +138 -0
  134. package/dist/collection/store/store.js +11 -0
  135. package/dist/collection/stories/Button.js +21 -0
  136. package/dist/collection/stories/Button.stories.js +42 -0
  137. package/dist/collection/stories/Header.js +45 -0
  138. package/dist/collection/stories/Header.stories.js +15 -0
  139. package/dist/collection/stories/Page.js +61 -0
  140. package/dist/collection/stories/Page.stories.js +19 -0
  141. package/dist/collection/stories/assets/code-brackets.svg +1 -0
  142. package/dist/collection/stories/assets/colors.svg +1 -0
  143. package/dist/collection/stories/assets/comments.svg +1 -0
  144. package/dist/collection/stories/assets/direction.svg +1 -0
  145. package/dist/collection/stories/assets/flow.svg +1 -0
  146. package/dist/collection/stories/assets/plugin.svg +1 -0
  147. package/dist/collection/stories/assets/repo.svg +1 -0
  148. package/dist/collection/stories/assets/stackalt.svg +1 -0
  149. package/dist/collection/stories/image-selector.stories.js +6 -0
  150. package/dist/collection/stories/image-view.stories.js +6 -0
  151. package/dist/collection/stories/modal.stories.js +12 -0
  152. package/dist/collection/stories/onboarding.stories.js +11 -0
  153. package/dist/collection/stories/overlay.stories.js +5 -0
  154. package/dist/collection/stories/overlayedModal.stories.js +8 -0
  155. package/dist/collection/stories/privacy-badge.stories.js +11 -0
  156. package/dist/collection/stories/slider.stories.js +17 -0
  157. package/dist/collection/stories/teaser.stories.js +5 -0
  158. package/dist/collection/stories/vps-widget.stories.js +47 -0
  159. package/dist/collection/stories/vviinn-product.stories.js +19 -0
  160. package/dist/collection/utils/collections/collectionsUtils.js +5 -0
  161. package/dist/collection/utils/either.js +3 -0
  162. package/dist/collection/utils/enum/enumUtils.js +3 -0
  163. package/dist/collection/utils/event/Events.js +1 -0
  164. package/dist/collection/utils/number/index.js +4 -0
  165. package/dist/collection/utils/option/option.js +4 -0
  166. package/dist/collection/utils/semigroup/semigroupDiff.js +6 -0
  167. package/dist/collection/utils/token/tokenUtils.js +9 -0
  168. package/dist/esm/Handler-639a4cb3.js +308 -0
  169. package/{www/build/app-globals-e0943e34.js → dist/esm/app-globals-345e497d.js} +10 -922
  170. package/dist/{vviinn-widgets → esm}/cropper-handler.entry.js +2 -2
  171. package/{www/build/customized-slots-f3449695.js → dist/esm/customized-slots-a76a8d41.js} +1 -1
  172. package/dist/esm/highlight-box_22.entry.js +712 -0
  173. package/dist/{vviinn-widgets/imageSearch.store-407f49f0.js → esm/imageSearch.store-8eab0da1.js} +11510 -11872
  174. package/dist/esm/index-6fa21e24.js +1323 -0
  175. package/{www/build/index-c9483145.js → dist/esm/index-8cb063df.js} +6 -4
  176. package/dist/esm/index.js +1 -0
  177. package/dist/esm/loader.js +19 -0
  178. package/dist/esm/polyfills/core-js.js +11 -0
  179. package/dist/esm/polyfills/css-shim.js +1 -0
  180. package/dist/esm/polyfills/dom.js +79 -0
  181. package/dist/esm/polyfills/es5-html-element.js +1 -0
  182. package/dist/esm/polyfills/index.js +34 -0
  183. package/dist/esm/polyfills/system.js +6 -0
  184. package/dist/esm/vviinn-carousel_5.entry.js +1224 -0
  185. package/{www/build → dist/esm}/vviinn-error.entry.js +1 -1
  186. package/dist/{vviinn-widgets → esm}/vviinn-preloader.entry.js +3 -6
  187. package/dist/{vviinn-widgets → esm}/vviinn-vps-button.entry.js +3 -3
  188. package/dist/{vviinn-widgets → esm}/vviinn-vps-widget.entry.js +4 -7
  189. package/dist/esm/vviinn-widgets.js +19 -0
  190. package/dist/index.cjs.js +1 -0
  191. package/dist/index.js +1 -0
  192. package/dist/loader/cdn.js +3 -0
  193. package/dist/loader/index.cjs.js +3 -0
  194. package/dist/loader/index.d.ts +12 -0
  195. package/dist/loader/index.es2017.js +3 -0
  196. package/dist/loader/index.js +4 -0
  197. package/dist/loader/package.json +10 -0
  198. package/dist/types/components/vviinn-carousel/vviinn-carousel.d.ts +1 -0
  199. package/dist/types/components/vviinn-icons/index.d.ts +2 -0
  200. package/dist/types/components/vviinn-product-card/render-helpers.d.ts +3 -2
  201. package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +2 -0
  202. package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +25 -0
  203. package/dist/types/components/vviinn-vpr-button/stories/kek.stories.d.ts +7 -0
  204. package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +14 -0
  205. package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +13 -3
  206. package/dist/types/components.d.ts +54 -0
  207. package/dist/vviinn-widgets/index.esm.js +0 -1
  208. package/dist/vviinn-widgets/p-04b06ea9.entry.js +1 -0
  209. package/dist/vviinn-widgets/p-400eb62f.entry.js +1 -0
  210. package/dist/vviinn-widgets/p-56fc949a.js +1 -0
  211. package/dist/vviinn-widgets/p-59edfbe2.js +1 -0
  212. package/dist/vviinn-widgets/p-78ccc9eb.js +15 -0
  213. package/dist/vviinn-widgets/p-9d24f51e.entry.js +1 -0
  214. package/dist/vviinn-widgets/p-d085199d.entry.js +1 -0
  215. package/dist/vviinn-widgets/p-e1ba8626.js +1 -0
  216. package/dist/vviinn-widgets/p-e38f4aa2.entry.js +1 -0
  217. package/dist/vviinn-widgets/p-e67cae57.js +1 -0
  218. package/dist/vviinn-widgets/p-f47e82b2.entry.js +1 -0
  219. package/dist/vviinn-widgets/p-f582db5c.js +1 -0
  220. package/dist/vviinn-widgets/p-fb14e3cc.entry.js +1 -0
  221. package/dist/vviinn-widgets/vviinn-widgets.css +1 -6
  222. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -125
  223. package/package.json +3 -1
  224. package/www/build/index.esm.js +0 -1
  225. package/www/build/p-04b06ea9.entry.js +1 -0
  226. package/www/build/p-400eb62f.entry.js +1 -0
  227. package/www/build/p-56fc949a.js +1 -0
  228. package/www/build/p-59edfbe2.js +1 -0
  229. package/www/build/p-78ccc9eb.js +15 -0
  230. package/www/build/p-7e4978d5.js +1 -0
  231. package/www/build/p-9d24f51e.entry.js +1 -0
  232. package/www/build/p-a67898be.css +1 -0
  233. package/www/build/p-d085199d.entry.js +1 -0
  234. package/www/build/p-e1ba8626.js +1 -0
  235. package/www/build/p-e38f4aa2.entry.js +1 -0
  236. package/www/build/p-e67cae57.js +1 -0
  237. package/www/build/p-f47e82b2.entry.js +1 -0
  238. package/www/build/p-f582db5c.js +1 -0
  239. package/www/build/p-fb14e3cc.entry.js +1 -0
  240. package/www/build/vviinn-widgets.css +1 -6
  241. package/www/build/vviinn-widgets.esm.js +1 -125
  242. package/www/index.html +6 -13
  243. package/dist/vviinn-widgets/Array-4b9f84cf.js +0 -4295
  244. package/dist/vviinn-widgets/Handler-47db9890.js +0 -1428
  245. package/dist/vviinn-widgets/NonEmptyArray-6ef0d207.js +0 -4370
  246. package/dist/vviinn-widgets/css-shim-f0027935.js +0 -4
  247. package/dist/vviinn-widgets/dom-db0073f0.js +0 -73
  248. package/dist/vviinn-widgets/highlight-box.entry.js +0 -41
  249. package/dist/vviinn-widgets/index-b6d739a9.js +0 -3010
  250. package/dist/vviinn-widgets/number-98d54dd6.js +0 -1533
  251. package/dist/vviinn-widgets/search-filters.entry.js +0 -73
  252. package/dist/vviinn-widgets/shadow-css-c1fdfa9f.js +0 -389
  253. package/dist/vviinn-widgets/vviinn-carousel.entry.js +0 -205
  254. package/dist/vviinn-widgets/vviinn-detected-object.entry.js +0 -52
  255. package/dist/vviinn-widgets/vviinn-empty-results.entry.js +0 -16
  256. package/dist/vviinn-widgets/vviinn-example-image.entry.js +0 -38
  257. package/dist/vviinn-widgets/vviinn-example-images.entry.js +0 -28
  258. package/dist/vviinn-widgets/vviinn-image-selector.entry.js +0 -31
  259. package/dist/vviinn-widgets/vviinn-image-view.entry.js +0 -55
  260. package/dist/vviinn-widgets/vviinn-modal.entry.js +0 -30
  261. package/dist/vviinn-widgets/vviinn-onboarding-card-1.entry.js +0 -21
  262. package/dist/vviinn-widgets/vviinn-onboarding-card-2.entry.js +0 -21
  263. package/dist/vviinn-widgets/vviinn-onboarding-card-3.entry.js +0 -21
  264. package/dist/vviinn-widgets/vviinn-onboarding.entry.js +0 -20
  265. package/dist/vviinn-widgets/vviinn-overlay.entry.js +0 -15
  266. package/dist/vviinn-widgets/vviinn-overlayed-modal.entry.js +0 -18
  267. package/dist/vviinn-widgets/vviinn-privacy-badge.entry.js +0 -20
  268. package/dist/vviinn-widgets/vviinn-product-card.entry.js +0 -176
  269. package/dist/vviinn-widgets/vviinn-server-error.entry.js +0 -16
  270. package/dist/vviinn-widgets/vviinn-slide.entry.js +0 -15
  271. package/dist/vviinn-widgets/vviinn-slider.entry.js +0 -120
  272. package/dist/vviinn-widgets/vviinn-teaser.entry.js +0 -20
  273. package/dist/vviinn-widgets/vviinn-vpr-widget.entry.js +0 -128
  274. package/dist/vviinn-widgets/vviinn-wrong-format.entry.js +0 -16
  275. package/www/build/Array-4b9f84cf.js +0 -4295
  276. package/www/build/Handler-47db9890.js +0 -1428
  277. package/www/build/NonEmptyArray-6ef0d207.js +0 -4370
  278. package/www/build/css-shim-f0027935.js +0 -4
  279. package/www/build/dom-db0073f0.js +0 -73
  280. package/www/build/highlight-box.entry.js +0 -41
  281. package/www/build/image-cropper.entry.js +0 -113
  282. package/www/build/index-b6d739a9.js +0 -3010
  283. package/www/build/number-98d54dd6.js +0 -1533
  284. package/www/build/search-filters.entry.js +0 -73
  285. package/www/build/shadow-css-c1fdfa9f.js +0 -389
  286. package/www/build/vviinn-detected-object.entry.js +0 -52
  287. package/www/build/vviinn-empty-results.entry.js +0 -16
  288. package/www/build/vviinn-example-image.entry.js +0 -38
  289. package/www/build/vviinn-example-images.entry.js +0 -28
  290. package/www/build/vviinn-image-selector.entry.js +0 -31
  291. package/www/build/vviinn-image-view.entry.js +0 -55
  292. package/www/build/vviinn-modal.entry.js +0 -30
  293. package/www/build/vviinn-onboarding-card-1.entry.js +0 -21
  294. package/www/build/vviinn-onboarding-card-2.entry.js +0 -21
  295. package/www/build/vviinn-onboarding-card-3.entry.js +0 -21
  296. package/www/build/vviinn-onboarding.entry.js +0 -20
  297. package/www/build/vviinn-overlay.entry.js +0 -15
  298. package/www/build/vviinn-overlayed-modal.entry.js +0 -18
  299. package/www/build/vviinn-privacy-badge.entry.js +0 -20
  300. package/www/build/vviinn-product-card.entry.js +0 -176
  301. package/www/build/vviinn-server-error.entry.js +0 -16
  302. package/www/build/vviinn-slide.entry.js +0 -15
  303. package/www/build/vviinn-slider.entry.js +0 -120
  304. package/www/build/vviinn-teaser.entry.js +0 -20
  305. package/www/build/vviinn-vpr-widget.entry.js +0 -128
  306. package/www/build/vviinn-vps-button.entry.js +0 -39
  307. package/www/build/vviinn-wrong-format.entry.js +0 -16
@@ -0,0 +1,425 @@
1
+ import { Component, Host, h, Prop, Event, Element, State, } from "@stencil/core";
2
+ import { pipe } from "fp-ts/lib/function";
3
+ import { getAnalyticsModule } from "../../analytics/GeneralAnalytics";
4
+ import { state } from "../../store/store";
5
+ import * as O from "fp-ts/lib/Option";
6
+ import { imageSearchState } from "../../store/imageSearch.store";
7
+ import { Linked, Price, ResponsiveImage, Image, } from "./render-helpers";
8
+ /**
9
+ * @part brand - product brand.
10
+ * @part currency - currency sign. Renders after price-amount.
11
+ * @part deeplink - anchor element for title. Rendered only if "deeplink" property filled.
12
+ * @part image - product image.
13
+ * @part image-link - anchor element for image. Rendered only if "deeplink" property filled.
14
+ * @part price-amount - numeric part of price.
15
+ * @part price-container - block contains all prices.
16
+ * @part price-outdated - renders inside price-container when "sale-price" property filled. Contains regular price.
17
+ * @part price-prefix - renders before price-amount. Can be set with "price-prefix" property or inherited from parent component.
18
+ * @part price-regular - renders inside price-container when "sale-price" property is empty.
19
+ * @part price-sale - renders inside price-container when "sale-price" property filled. Contains sale price.
20
+ * @part title - product title
21
+ */
22
+ export class VviinnProductCard {
23
+ constructor() {
24
+ this.currency = undefined;
25
+ this.imageRatio = 1;
26
+ this.imageWidth = 200;
27
+ this.locale = undefined;
28
+ this.pricePrefix = undefined;
29
+ this.responsive = false;
30
+ this.dimmedBackground = false;
31
+ this.imageLoaded = false;
32
+ this.intersectionObserver = new IntersectionObserver(this.intersectionCallback.bind(this), { threshold: 1.0 });
33
+ }
34
+ intersectionCallback(data) {
35
+ if (data.some((entry) => entry.isIntersecting)) {
36
+ pipe(getAnalyticsModule, O.map((analytics) => analytics.sendImpression(this.getProduct())));
37
+ this.recommendationView.emit(this.productId);
38
+ this.intersectionObserver.disconnect();
39
+ }
40
+ }
41
+ componentDidLoad() {
42
+ this.recommendationLoad.emit(this.productId);
43
+ this.intersectionObserver.observe(this.el);
44
+ const links = this.el.shadowRoot.querySelectorAll("a");
45
+ links.forEach((link) => link.addEventListener("mousedown", (event) => {
46
+ this.recommendationClick.emit(this.productId);
47
+ if (window.ga) {
48
+ event.preventDefault();
49
+ }
50
+ pipe(getAnalyticsModule, O.match(() => null, (analytics) => analytics.sendClick(this.getProduct())));
51
+ if (window.ga) {
52
+ ga("send", "event", "UX", "click", "Results", {
53
+ hitCallback: function () {
54
+ document.location.href = this.deeplink;
55
+ },
56
+ });
57
+ }
58
+ }));
59
+ }
60
+ getProduct() {
61
+ return imageSearchState.results.find((r) => r.productId === this.productId);
62
+ }
63
+ renderImage() {
64
+ const props = {
65
+ width: this.imageWidth,
66
+ height: this.imageWidth * this.imageRatio,
67
+ src: this.image,
68
+ title: this.productTitle,
69
+ lazy: false,
70
+ };
71
+ return this.responsive
72
+ ? ResponsiveImage(props, () => this.kek())
73
+ : Image(props, () => this.kek());
74
+ }
75
+ kek() {
76
+ this.productImageLoaded.emit(this.productId);
77
+ }
78
+ render() {
79
+ var _a, _b, _c;
80
+ 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" },
81
+ h(Linked, { deeplink: this.deeplink, part: "image-link" }, this.renderImage()),
82
+ h(Linked, { deeplink: this.deeplink, part: "deeplink" },
83
+ h("span", { class: "title", part: "title" }, this.productTitle)),
84
+ h("span", { class: "brand", part: "brand" }, this.brand),
85
+ h("span", { class: "type", part: "type" }, this.productType),
86
+ 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 })));
87
+ }
88
+ static get is() { return "vviinn-product-card"; }
89
+ static get encapsulation() { return "shadow"; }
90
+ static get originalStyleUrls() { return {
91
+ "$": ["vviinn-product-card.css"]
92
+ }; }
93
+ static get styleUrls() { return {
94
+ "$": ["vviinn-product-card.css"]
95
+ }; }
96
+ static get properties() { return {
97
+ "brand": {
98
+ "type": "string",
99
+ "mutable": false,
100
+ "complexType": {
101
+ "original": "string | undefined",
102
+ "resolved": "string",
103
+ "references": {}
104
+ },
105
+ "required": false,
106
+ "optional": false,
107
+ "docs": {
108
+ "tags": [],
109
+ "text": ""
110
+ },
111
+ "attribute": "brand",
112
+ "reflect": false
113
+ },
114
+ "currency": {
115
+ "type": "string",
116
+ "mutable": false,
117
+ "complexType": {
118
+ "original": "string | undefined",
119
+ "resolved": "string",
120
+ "references": {}
121
+ },
122
+ "required": false,
123
+ "optional": false,
124
+ "docs": {
125
+ "tags": [],
126
+ "text": ""
127
+ },
128
+ "attribute": "currency",
129
+ "reflect": false,
130
+ "defaultValue": "undefined"
131
+ },
132
+ "deeplink": {
133
+ "type": "string",
134
+ "mutable": false,
135
+ "complexType": {
136
+ "original": "string | undefined",
137
+ "resolved": "string",
138
+ "references": {}
139
+ },
140
+ "required": false,
141
+ "optional": false,
142
+ "docs": {
143
+ "tags": [],
144
+ "text": ""
145
+ },
146
+ "attribute": "deeplink",
147
+ "reflect": false
148
+ },
149
+ "image": {
150
+ "type": "string",
151
+ "mutable": false,
152
+ "complexType": {
153
+ "original": "string | undefined",
154
+ "resolved": "string",
155
+ "references": {}
156
+ },
157
+ "required": false,
158
+ "optional": false,
159
+ "docs": {
160
+ "tags": [],
161
+ "text": ""
162
+ },
163
+ "attribute": "image",
164
+ "reflect": false
165
+ },
166
+ "imageRatio": {
167
+ "type": "number",
168
+ "mutable": false,
169
+ "complexType": {
170
+ "original": "number",
171
+ "resolved": "number",
172
+ "references": {}
173
+ },
174
+ "required": false,
175
+ "optional": false,
176
+ "docs": {
177
+ "tags": [],
178
+ "text": ""
179
+ },
180
+ "attribute": "image-ratio",
181
+ "reflect": false,
182
+ "defaultValue": "1"
183
+ },
184
+ "imageWidth": {
185
+ "type": "number",
186
+ "mutable": false,
187
+ "complexType": {
188
+ "original": "number",
189
+ "resolved": "number",
190
+ "references": {}
191
+ },
192
+ "required": false,
193
+ "optional": false,
194
+ "docs": {
195
+ "tags": [],
196
+ "text": ""
197
+ },
198
+ "attribute": "image-width",
199
+ "reflect": false,
200
+ "defaultValue": "200"
201
+ },
202
+ "locale": {
203
+ "type": "string",
204
+ "mutable": false,
205
+ "complexType": {
206
+ "original": "string | undefined",
207
+ "resolved": "string",
208
+ "references": {}
209
+ },
210
+ "required": false,
211
+ "optional": false,
212
+ "docs": {
213
+ "tags": [],
214
+ "text": ""
215
+ },
216
+ "attribute": "locale",
217
+ "reflect": false,
218
+ "defaultValue": "undefined"
219
+ },
220
+ "price": {
221
+ "type": "number",
222
+ "mutable": false,
223
+ "complexType": {
224
+ "original": "number | undefined",
225
+ "resolved": "number",
226
+ "references": {}
227
+ },
228
+ "required": false,
229
+ "optional": false,
230
+ "docs": {
231
+ "tags": [],
232
+ "text": ""
233
+ },
234
+ "attribute": "price",
235
+ "reflect": false
236
+ },
237
+ "pricePrefix": {
238
+ "type": "string",
239
+ "mutable": false,
240
+ "complexType": {
241
+ "original": "string | undefined",
242
+ "resolved": "string",
243
+ "references": {}
244
+ },
245
+ "required": false,
246
+ "optional": false,
247
+ "docs": {
248
+ "tags": [],
249
+ "text": ""
250
+ },
251
+ "attribute": "price-prefix",
252
+ "reflect": false,
253
+ "defaultValue": "undefined"
254
+ },
255
+ "productId": {
256
+ "type": "string",
257
+ "mutable": false,
258
+ "complexType": {
259
+ "original": "string",
260
+ "resolved": "string",
261
+ "references": {}
262
+ },
263
+ "required": false,
264
+ "optional": false,
265
+ "docs": {
266
+ "tags": [],
267
+ "text": ""
268
+ },
269
+ "attribute": "product-id",
270
+ "reflect": false
271
+ },
272
+ "productTitle": {
273
+ "type": "string",
274
+ "mutable": false,
275
+ "complexType": {
276
+ "original": "string",
277
+ "resolved": "string",
278
+ "references": {}
279
+ },
280
+ "required": false,
281
+ "optional": false,
282
+ "docs": {
283
+ "tags": [],
284
+ "text": ""
285
+ },
286
+ "attribute": "product-title",
287
+ "reflect": false
288
+ },
289
+ "productType": {
290
+ "type": "string",
291
+ "mutable": false,
292
+ "complexType": {
293
+ "original": "string | undefined",
294
+ "resolved": "string",
295
+ "references": {}
296
+ },
297
+ "required": false,
298
+ "optional": false,
299
+ "docs": {
300
+ "tags": [],
301
+ "text": ""
302
+ },
303
+ "attribute": "product-type",
304
+ "reflect": false
305
+ },
306
+ "salePrice": {
307
+ "type": "number",
308
+ "mutable": false,
309
+ "complexType": {
310
+ "original": "number | undefined",
311
+ "resolved": "number",
312
+ "references": {}
313
+ },
314
+ "required": false,
315
+ "optional": false,
316
+ "docs": {
317
+ "tags": [],
318
+ "text": ""
319
+ },
320
+ "attribute": "sale-price",
321
+ "reflect": false
322
+ },
323
+ "responsive": {
324
+ "type": "boolean",
325
+ "mutable": false,
326
+ "complexType": {
327
+ "original": "boolean",
328
+ "resolved": "boolean",
329
+ "references": {}
330
+ },
331
+ "required": false,
332
+ "optional": false,
333
+ "docs": {
334
+ "tags": [],
335
+ "text": ""
336
+ },
337
+ "attribute": "responsive",
338
+ "reflect": false,
339
+ "defaultValue": "false"
340
+ },
341
+ "dimmedBackground": {
342
+ "type": "boolean",
343
+ "mutable": false,
344
+ "complexType": {
345
+ "original": "boolean",
346
+ "resolved": "boolean",
347
+ "references": {}
348
+ },
349
+ "required": false,
350
+ "optional": false,
351
+ "docs": {
352
+ "tags": [],
353
+ "text": ""
354
+ },
355
+ "attribute": "dimmed-background",
356
+ "reflect": false,
357
+ "defaultValue": "false"
358
+ }
359
+ }; }
360
+ static get states() { return {
361
+ "imageLoaded": {}
362
+ }; }
363
+ static get events() { return [{
364
+ "method": "recommendationLoad",
365
+ "name": "recommendationLoad",
366
+ "bubbles": true,
367
+ "cancelable": true,
368
+ "composed": true,
369
+ "docs": {
370
+ "tags": [],
371
+ "text": "Event fires ones when recommendation rendered on page"
372
+ },
373
+ "complexType": {
374
+ "original": "string",
375
+ "resolved": "string",
376
+ "references": {}
377
+ }
378
+ }, {
379
+ "method": "recommendationView",
380
+ "name": "recommendationView",
381
+ "bubbles": true,
382
+ "cancelable": true,
383
+ "composed": true,
384
+ "docs": {
385
+ "tags": [],
386
+ "text": "Event fires ones when recommendation appears on the viewport"
387
+ },
388
+ "complexType": {
389
+ "original": "string",
390
+ "resolved": "string",
391
+ "references": {}
392
+ }
393
+ }, {
394
+ "method": "recommendationClick",
395
+ "name": "recommendationClick",
396
+ "bubbles": true,
397
+ "cancelable": true,
398
+ "composed": true,
399
+ "docs": {
400
+ "tags": [],
401
+ "text": "Event fires ones when user click on deeplink"
402
+ },
403
+ "complexType": {
404
+ "original": "string",
405
+ "resolved": "string",
406
+ "references": {}
407
+ }
408
+ }, {
409
+ "method": "productImageLoaded",
410
+ "name": "productImageLoaded",
411
+ "bubbles": true,
412
+ "cancelable": true,
413
+ "composed": true,
414
+ "docs": {
415
+ "tags": [],
416
+ "text": ""
417
+ },
418
+ "complexType": {
419
+ "original": "string",
420
+ "resolved": "string",
421
+ "references": {}
422
+ }
423
+ }]; }
424
+ static get elementRef() { return "el"; }
425
+ }
@@ -0,0 +1,11 @@
1
+ import { h } from "@stencil/core";
2
+ import { ArrowIcon } from "../vviinn-icons";
3
+ const getStyleMap = (data) => {
4
+ return {
5
+ "arrow-wrapper": true,
6
+ [data.kind]: true,
7
+ disabled: data.disabled,
8
+ };
9
+ };
10
+ export const Arrow = ({ kind, tabindex, disabled, onClick, onKeyDown, }) => (h("div", { class: getStyleMap({ kind, disabled }), onClick: onClick, tabindex: tabindex, onKeyDown: onKeyDown },
11
+ h(ArrowIcon, null)));
@@ -0,0 +1,4 @@
1
+ :host {
2
+ display: grid;
3
+ justify-items: center;
4
+ }
@@ -0,0 +1,15 @@
1
+ import { Component, Host, h } from "@stencil/core";
2
+ export class VviinnSlide {
3
+ render() {
4
+ return (h(Host, null,
5
+ h("slot", null)));
6
+ }
7
+ static get is() { return "vviinn-slide"; }
8
+ static get encapsulation() { return "shadow"; }
9
+ static get originalStyleUrls() { return {
10
+ "$": ["vviinn-slide.css"]
11
+ }; }
12
+ static get styleUrls() { return {
13
+ "$": ["vviinn-slide.css"]
14
+ }; }
15
+ }
@@ -0,0 +1,109 @@
1
+ :host {
2
+ --color-primary-system: #0F62FE;
3
+ --color-primary-hover-system: #014CDA;
4
+ --color-icons-system: #2F8EDF;
5
+ --spacer: 8px;
6
+ }
7
+
8
+
9
+ :host {
10
+ --num-items: 0;
11
+ --position: 0;
12
+ display: grid;
13
+ grid-gap: 20px;
14
+ justify-items: center;
15
+ position: relative;
16
+ }
17
+
18
+ .items-wrapper {
19
+ overflow: hidden;
20
+ width: 100%;
21
+ }
22
+
23
+ .items {
24
+ box-sizing: border-box;
25
+ display: grid;
26
+ grid-auto-flow: column;
27
+ grid-template-columns: repeat(var(--num-items), 100%);
28
+ transform: translateX(calc(-100% * var(--position)));
29
+ transition: transform 0.33s ease-in-out;
30
+ }
31
+
32
+ .controls {
33
+ display: grid;
34
+ grid-gap: 16px;
35
+ grid-template-columns: repeat(var(--num-items), -webkit-min-content);
36
+ grid-template-columns: repeat(var(--num-items), min-content);
37
+ }
38
+
39
+ .bullet {
40
+ background: #E0E0E0;
41
+ border-radius: 50%;
42
+ box-sizing: border-box;
43
+ cursor: pointer;
44
+ height: 8px;
45
+ width: 8px;
46
+ transition: background 0.1s ease-in-out;
47
+ }
48
+
49
+ .bullet:hover {
50
+ background: #C6C6C6;
51
+ }
52
+
53
+ .bullet.active {
54
+ background: var(--color-primary, var(--color-primary-system));
55
+ }
56
+
57
+ .bullet:active {
58
+ background: transparent;
59
+ border: 2px solid var(--color-primary, var(--color-primary-system));
60
+ }
61
+
62
+ .arrow-wrapper {
63
+ align-items: center;
64
+ background: white;
65
+ border: 2px solid white;
66
+ bottom: 0;
67
+ box-sizing: border-box;
68
+ display: grid;
69
+ height: calc(var(--spacer) * 6);
70
+ justify-items: center;
71
+ margin: auto;
72
+ position: absolute;
73
+ top: 0;
74
+ transform: translate3d(0, -50%, 0);
75
+ transition: border 0.25ms ease-in-out;
76
+ width: calc(var(--spacer) * 4);
77
+ }
78
+
79
+ .arrow-wrapper:active {
80
+ border-color: var(--color-primary, var(--color-primary-system));
81
+ opacity: 0.75;
82
+ }
83
+
84
+ .arrow-wrapper:focus {
85
+ border-color: var(--color-primary, var(--color-primary-system));
86
+ opacity: 0.5;
87
+ outline: none;
88
+ }
89
+
90
+ .prev {
91
+ left: 0;
92
+ }
93
+
94
+ .next {
95
+ right: 0;
96
+ }
97
+
98
+ .next > svg {
99
+ transform: rotate3d(0, 1, 0, 180deg);
100
+ }
101
+
102
+ .arrow-wrapper > svg {
103
+ transition: fill 0.25ms ease-in-out;
104
+ fill: #A8A8A8;
105
+ }
106
+
107
+ .arrow-wrapper:hover > svg {
108
+ fill: #8D8D8D;
109
+ }