vviinn-widgets 2.7.2 → 2.8.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 (357) hide show
  1. package/dist/components/Handler.js +270 -0
  2. package/dist/components/NonEmptyArray.js +5699 -0
  3. package/dist/components/cropper-handler.js +6 -0
  4. package/dist/components/cropper-handler2.js +39 -0
  5. package/dist/{cjs/customized-slots-06ca4007.js → components/customized-slots.js} +3 -6
  6. package/dist/components/highlight-box.js +6 -0
  7. package/dist/components/highlight-box2.js +52 -0
  8. package/dist/components/image-cropper.js +6 -0
  9. package/dist/components/image-cropper2.js +138 -0
  10. package/dist/components/imageSearch.store.js +10686 -0
  11. package/dist/components/index.js +1 -0
  12. package/dist/{esm/index-443468c7.js → components/index2.js} +2 -2
  13. package/dist/components/index3.js +130 -0
  14. package/dist/components/recommendations-sidebar.js +101 -0
  15. package/dist/components/resizer.worker.js +11 -0
  16. package/dist/components/search-filters.js +6 -0
  17. package/dist/components/search-filters2.js +89 -0
  18. package/dist/components/tracking.worker.js +11 -0
  19. package/dist/components/vviinn-carousel.js +6 -0
  20. package/dist/components/vviinn-carousel2.js +235 -0
  21. package/dist/components/vviinn-detected-object.js +6 -0
  22. package/dist/components/vviinn-detected-object2.js +67 -0
  23. package/dist/components/vviinn-empty-results.js +6 -0
  24. package/dist/components/vviinn-empty-results2.js +35 -0
  25. package/dist/components/vviinn-error.js +6 -0
  26. package/dist/components/vviinn-error2.js +28 -0
  27. package/dist/components/vviinn-example-image.js +6 -0
  28. package/dist/components/vviinn-example-image2.js +57 -0
  29. package/dist/components/vviinn-example-images.js +6 -0
  30. package/dist/components/vviinn-example-images2.js +53 -0
  31. package/dist/components/vviinn-image-selector.js +6 -0
  32. package/dist/components/vviinn-image-selector2.js +135 -0
  33. package/dist/components/vviinn-image-view.js +6 -0
  34. package/dist/components/vviinn-image-view2.js +95 -0
  35. package/dist/components/vviinn-modal.js +6 -0
  36. package/dist/components/vviinn-modal2.js +46 -0
  37. package/dist/components/vviinn-onboarding-card-1.js +6 -0
  38. package/dist/components/vviinn-onboarding-card-12.js +34 -0
  39. package/dist/components/vviinn-onboarding-card-2.js +6 -0
  40. package/dist/components/vviinn-onboarding-card-22.js +34 -0
  41. package/dist/components/vviinn-onboarding-card-3.js +6 -0
  42. package/dist/components/vviinn-onboarding-card-32.js +34 -0
  43. package/dist/components/vviinn-onboarding.js +6 -0
  44. package/dist/components/vviinn-onboarding2.js +63 -0
  45. package/dist/components/vviinn-overlay.js +6 -0
  46. package/dist/components/vviinn-overlay2.js +28 -0
  47. package/dist/components/vviinn-overlayed-modal.js +6 -0
  48. package/dist/components/vviinn-overlayed-modal2.js +45 -0
  49. package/dist/components/vviinn-preloader.js +6 -0
  50. package/dist/components/vviinn-preloader2.js +34 -0
  51. package/dist/components/vviinn-privacy-badge.js +6 -0
  52. package/dist/components/vviinn-privacy-badge2.js +33 -0
  53. package/dist/components/vviinn-product-card.js +6 -0
  54. package/dist/components/vviinn-product-card2.js +216 -0
  55. package/dist/components/vviinn-recommendations-sidebar.js +6 -0
  56. package/dist/components/vviinn-server-error.js +6 -0
  57. package/dist/components/vviinn-server-error2.js +35 -0
  58. package/dist/components/vviinn-slide.js +6 -0
  59. package/dist/components/vviinn-slide2.js +28 -0
  60. package/dist/components/vviinn-slider.js +6 -0
  61. package/dist/components/vviinn-slider2.js +159 -0
  62. package/dist/components/vviinn-teaser.js +6 -0
  63. package/dist/components/vviinn-teaser2.js +33 -0
  64. package/dist/components/vviinn-vpr-button.js +93 -0
  65. package/dist/components/vviinn-vpr-vidget.js +3360 -0
  66. package/dist/components/vviinn-vpr-widget.js +6 -0
  67. package/dist/components/vviinn-vps-button.js +224 -0
  68. package/dist/components/vviinn-vps-widget.js +6 -0
  69. package/dist/components/vviinn-vps-widget2.js +350 -0
  70. package/dist/components/vviinn-wrong-format.js +6 -0
  71. package/dist/components/vviinn-wrong-format2.js +35 -0
  72. package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +1 -0
  73. package/dist/types/components/vviinn-vpr-button/stories/lol.d.ts +2 -0
  74. package/dist/types/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.d.ts +1 -1
  75. package/dist/vviinn-widgets/Array-bdfc75db.js +4870 -0
  76. package/dist/vviinn-widgets/Handler-edcb46f4.js +1422 -0
  77. package/dist/vviinn-widgets/NonEmptyArray-947ab7b3.js +4411 -0
  78. package/dist/{esm/app-globals-865bc7a7.js → vviinn-widgets/app-globals-c0aa8ec3.js} +922 -10
  79. package/dist/vviinn-widgets/cropper-handler.entry.js +23 -0
  80. package/dist/vviinn-widgets/css-shim-f0027935.js +4 -0
  81. package/dist/{esm/customized-slots-96902edf.js → vviinn-widgets/customized-slots-5c1c623a.js} +1 -1
  82. package/dist/vviinn-widgets/dom-db0073f0.js +73 -0
  83. package/dist/vviinn-widgets/highlight-box.entry.js +41 -0
  84. package/dist/{collection/components/image-search/image-view/image-cropper/image-cropper.js → vviinn-widgets/image-cropper.entry.js} +33 -70
  85. package/dist/{cjs/index-df6896e2.js → vviinn-widgets/imageSearch.store-0eed9a5c.js} +11598 -15320
  86. package/dist/{esm/index-2fdd499d.js → vviinn-widgets/imageSearch.store-b28bddb0.js} +11971 -15281
  87. package/dist/{collection/components/vviinn-icons/index.js → vviinn-widgets/index-44058ea2.js} +14 -11
  88. package/dist/vviinn-widgets/index-6c6de682.js +3857 -0
  89. package/dist/vviinn-widgets/index-de3e14da.js +3010 -0
  90. package/dist/vviinn-widgets/index.esm.js +1 -0
  91. package/dist/vviinn-widgets/number-171db649.js +1499 -0
  92. package/dist/vviinn-widgets/search-filters.entry.js +76 -0
  93. package/dist/vviinn-widgets/shadow-css-c1fdfa9f.js +389 -0
  94. package/dist/{collection/components/vviinn-carousel/vviinn-carousel.js → vviinn-widgets/vviinn-carousel.entry.js} +18 -113
  95. package/dist/vviinn-widgets/vviinn-detected-object.entry.js +54 -0
  96. package/dist/vviinn-widgets/vviinn-empty-results.entry.js +16 -0
  97. package/dist/vviinn-widgets/vviinn-error.entry.js +15 -0
  98. package/dist/vviinn-widgets/vviinn-example-image.entry.js +38 -0
  99. package/dist/vviinn-widgets/vviinn-example-images.entry.js +28 -0
  100. package/dist/vviinn-widgets/vviinn-image-selector.entry.js +31 -0
  101. package/dist/vviinn-widgets/vviinn-image-view.entry.js +55 -0
  102. package/dist/vviinn-widgets/vviinn-modal.entry.js +30 -0
  103. package/dist/vviinn-widgets/vviinn-onboarding-card-1.entry.js +21 -0
  104. package/dist/vviinn-widgets/vviinn-onboarding-card-2.entry.js +21 -0
  105. package/dist/vviinn-widgets/vviinn-onboarding-card-3.entry.js +21 -0
  106. package/dist/vviinn-widgets/vviinn-onboarding.entry.js +20 -0
  107. package/dist/vviinn-widgets/vviinn-overlay.entry.js +15 -0
  108. package/dist/vviinn-widgets/vviinn-overlayed-modal.entry.js +18 -0
  109. package/dist/vviinn-widgets/vviinn-preloader.entry.js +25 -0
  110. package/dist/vviinn-widgets/vviinn-privacy-badge.entry.js +20 -0
  111. package/dist/vviinn-widgets/vviinn-product-card.entry.js +188 -0
  112. package/dist/{esm → vviinn-widgets}/vviinn-recommendations-sidebar.entry.js +2 -2
  113. package/dist/vviinn-widgets/vviinn-server-error.entry.js +16 -0
  114. package/dist/vviinn-widgets/vviinn-slide.entry.js +15 -0
  115. package/dist/vviinn-widgets/vviinn-slider.entry.js +120 -0
  116. package/dist/vviinn-widgets/vviinn-teaser.entry.js +20 -0
  117. package/dist/{esm → vviinn-widgets}/vviinn-vpr-button.entry.js +2 -2
  118. package/dist/vviinn-widgets/vviinn-vpr-widget.entry.js +4588 -0
  119. package/dist/{esm → vviinn-widgets}/vviinn-vps-button.entry.js +3 -3
  120. package/dist/vviinn-widgets/vviinn-vps-widget.entry.js +170 -0
  121. package/dist/vviinn-widgets/vviinn-widgets.css +6 -1
  122. package/dist/vviinn-widgets/vviinn-widgets.esm.js +125 -1
  123. package/dist/vviinn-widgets/vviinn-wrong-format.entry.js +16 -0
  124. package/package.json +8 -2
  125. package/www/build/p-06c76b5e.js +1 -0
  126. package/www/build/p-07e16d04.js +15 -0
  127. package/{dist/vviinn-widgets/p-a6e0710f.entry.js → www/build/p-44bc50de.entry.js} +1 -1
  128. package/www/build/p-510922c6.js +1 -0
  129. package/www/build/p-57ce8de3.css +1 -0
  130. package/www/build/p-591cb193.entry.js +1 -0
  131. package/www/build/p-6b9d242e.js +1 -0
  132. package/www/build/p-880bccf1.js +1 -0
  133. package/www/build/p-b0ada114.entry.js +1 -0
  134. package/www/build/p-b7be7c70.entry.js +1 -0
  135. package/{dist/vviinn-widgets/p-166970f3.js → www/build/p-ea8dea5c.js} +1 -1
  136. package/www/build/vviinn-widgets.css +1 -1
  137. package/www/build/vviinn-widgets.esm.js +1 -1
  138. package/www/index.html +32261 -1
  139. package/www/sw.js +66 -0
  140. package/dist/cjs/app-globals-8db3bcbe.js +0 -6912
  141. package/dist/cjs/cropper-handler_27.cjs.entry.js +0 -1135
  142. package/dist/cjs/index-3c3ab815.js +0 -1354
  143. package/dist/cjs/index-f66cd8d1.js +0 -39
  144. package/dist/cjs/index.cjs.js +0 -2
  145. package/dist/cjs/loader.cjs.js +0 -23
  146. package/dist/cjs/vviinn-carousel_2.cjs.entry.js +0 -1001
  147. package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +0 -65
  148. package/dist/cjs/vviinn-vpr-button.cjs.entry.js +0 -49
  149. package/dist/cjs/vviinn-vps-button.cjs.entry.js +0 -43
  150. package/dist/cjs/vviinn-widgets.cjs.js +0 -21
  151. package/dist/collection/Image/error.js +0 -14
  152. package/dist/collection/Image/form.js +0 -5
  153. package/dist/collection/Image/fromFile.js +0 -18
  154. package/dist/collection/Image/imageToB64.js +0 -9
  155. package/dist/collection/Image/index.js +0 -0
  156. package/dist/collection/Image/renderPromise.js +0 -6
  157. package/dist/collection/Image/resizeImage.js +0 -28
  158. package/dist/collection/Image/sizing.js +0 -39
  159. package/dist/collection/Image/toFile.js +0 -17
  160. package/dist/collection/analytics/GAnalytics.js +0 -32
  161. package/dist/collection/analytics/GeneralAnalytics.js +0 -9
  162. package/dist/collection/analytics/GtagAnalytics.js +0 -35
  163. package/dist/collection/analytics/ProductAnalytics.js +0 -1
  164. package/dist/collection/campaign/Campaign.js +0 -8
  165. package/dist/collection/campaign/CampaignService.js +0 -5
  166. package/dist/collection/campaign/VCSCampaign.js +0 -1
  167. package/dist/collection/campaign/VCSCampaignResponse.js +0 -1
  168. package/dist/collection/campaign/VCSCampaignService.js +0 -7
  169. package/dist/collection/campaign/VPRCampaignResponse.js +0 -1
  170. package/dist/collection/campaign/VPRCampaignService.js +0 -7
  171. package/dist/collection/collection-manifest.json +0 -43
  172. package/dist/collection/components/customized-slots.js +0 -47
  173. package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.css +0 -71
  174. package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.js +0 -25
  175. package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.css +0 -49
  176. package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.js +0 -64
  177. package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.css +0 -33
  178. package/dist/collection/components/image-search/search-filters/search-filters.css +0 -120
  179. package/dist/collection/components/image-search/search-filters/search-filters.js +0 -125
  180. package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +0 -142
  181. package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.css +0 -7
  182. package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +0 -36
  183. package/dist/collection/components/vviinn-error/vviinn-error.css +0 -38
  184. package/dist/collection/components/vviinn-error/vviinn-error.js +0 -18
  185. package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.css +0 -3
  186. package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.js +0 -34
  187. package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.css +0 -3
  188. package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.js +0 -34
  189. package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.css +0 -34
  190. package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +0 -129
  191. package/dist/collection/components/vviinn-example-images/vviinn-example-images.css +0 -19
  192. package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +0 -80
  193. package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.css +0 -25
  194. package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +0 -64
  195. package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.css +0 -47
  196. package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +0 -100
  197. package/dist/collection/components/vviinn-image-view/vviinn-image-view.css +0 -31
  198. package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +0 -61
  199. package/dist/collection/components/vviinn-modal/vviinn-modal.css +0 -105
  200. package/dist/collection/components/vviinn-modal/vviinn-modal.js +0 -98
  201. package/dist/collection/components/vviinn-onboarding/onboarding-cards/onboarding-card.css +0 -41
  202. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.js +0 -26
  203. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.js +0 -26
  204. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.js +0 -26
  205. package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.css +0 -58
  206. package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.js +0 -28
  207. package/dist/collection/components/vviinn-overlay/vviinn-overlay.css +0 -33
  208. package/dist/collection/components/vviinn-overlay/vviinn-overlay.js +0 -15
  209. package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.css +0 -29
  210. package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.js +0 -71
  211. package/dist/collection/components/vviinn-preloader/vviinn-preloader.css +0 -37
  212. package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +0 -20
  213. package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +0 -19
  214. package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +0 -27
  215. package/dist/collection/components/vviinn-product-card/render-helpers.js +0 -32
  216. package/dist/collection/components/vviinn-product-card/stories/args.js +0 -73
  217. package/dist/collection/components/vviinn-product-card/stories/decorators.js +0 -51
  218. package/dist/collection/components/vviinn-product-card/stories/vviinn-product-card.stories.js +0 -105
  219. package/dist/collection/components/vviinn-product-card/vviinn-product-card.css +0 -95
  220. package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +0 -462
  221. package/dist/collection/components/vviinn-slider/arrow.js +0 -11
  222. package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.css +0 -4
  223. package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.js +0 -15
  224. package/dist/collection/components/vviinn-slider/vviinn-slider.css +0 -109
  225. package/dist/collection/components/vviinn-slider/vviinn-slider.js +0 -181
  226. package/dist/collection/components/vviinn-teaser/vviinn-teaser.css +0 -14
  227. package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +0 -29
  228. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.css +0 -238
  229. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +0 -220
  230. package/dist/collection/components/vviinn-vpr-button/stories/args.js +0 -213
  231. package/dist/collection/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.js +0 -91
  232. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.css +0 -35
  233. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +0 -179
  234. package/dist/collection/components/vviinn-vpr-widget/stories/args.js +0 -197
  235. package/dist/collection/components/vviinn-vpr-widget/stories/decorators.js +0 -29
  236. package/dist/collection/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.js +0 -211
  237. package/dist/collection/components/vviinn-vpr-widget/token-helpers.js +0 -11
  238. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +0 -510
  239. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +0 -79
  240. package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +0 -35
  241. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.css +0 -3
  242. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +0 -195
  243. package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +0 -37
  244. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +0 -350
  245. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +0 -375
  246. package/dist/collection/cropper/Cropper.js +0 -1
  247. package/dist/collection/cropper/Handler.js +0 -61
  248. package/dist/collection/dom/index.js +0 -3
  249. package/dist/collection/error.js +0 -14
  250. package/dist/collection/file/index.js +0 -4
  251. package/dist/collection/geometry/Clip.js +0 -14
  252. package/dist/collection/geometry/Point.js +0 -32
  253. package/dist/collection/geometry/Rectangle.js +0 -95
  254. package/dist/collection/geometry/RectangleAlt.js +0 -1
  255. package/dist/collection/geometry/Sized.js +0 -8
  256. package/dist/collection/global.js +0 -19
  257. package/dist/collection/index.js +0 -1
  258. package/dist/collection/interfaces/generated.js +0 -5
  259. package/dist/collection/interfaces/recommendation.js +0 -1
  260. package/dist/collection/network/apiClient.js +0 -9
  261. package/dist/collection/network/ion/File.js +0 -14
  262. package/dist/collection/network/ion/Form.js +0 -64
  263. package/dist/collection/network/ion/Link.js +0 -8
  264. package/dist/collection/network/ion/ValueObject.js +0 -23
  265. package/dist/collection/network/request.js +0 -19
  266. package/dist/collection/network/utils.js +0 -37
  267. package/dist/collection/openApi/index.js +0 -27
  268. package/dist/collection/recommendation/events.js +0 -1
  269. package/dist/collection/recommendation/recommendation.js +0 -1
  270. package/dist/collection/searchSession/searchSession.js +0 -31
  271. package/dist/collection/sentry.js +0 -14
  272. package/dist/collection/slider/GridMode.js +0 -1
  273. package/dist/collection/store/file-processing.js +0 -13
  274. package/dist/collection/store/imageSearch.store.js +0 -133
  275. package/dist/collection/store/store.js +0 -3
  276. package/dist/collection/store/tracking.store.js +0 -3
  277. package/dist/collection/stories/Button.js +0 -21
  278. package/dist/collection/stories/Button.stories.js +0 -42
  279. package/dist/collection/stories/Header.js +0 -45
  280. package/dist/collection/stories/Header.stories.js +0 -15
  281. package/dist/collection/stories/Page.js +0 -61
  282. package/dist/collection/stories/Page.stories.js +0 -19
  283. package/dist/collection/stories/assets/code-brackets.svg +0 -1
  284. package/dist/collection/stories/assets/colors.svg +0 -1
  285. package/dist/collection/stories/assets/comments.svg +0 -1
  286. package/dist/collection/stories/assets/direction.svg +0 -1
  287. package/dist/collection/stories/assets/flow.svg +0 -1
  288. package/dist/collection/stories/assets/plugin.svg +0 -1
  289. package/dist/collection/stories/assets/repo.svg +0 -1
  290. package/dist/collection/stories/assets/stackalt.svg +0 -1
  291. package/dist/collection/stories/image-selector.stories.js +0 -6
  292. package/dist/collection/stories/image-view.stories.js +0 -6
  293. package/dist/collection/stories/modal.stories.js +0 -12
  294. package/dist/collection/stories/onboarding.stories.js +0 -11
  295. package/dist/collection/stories/overlay.stories.js +0 -5
  296. package/dist/collection/stories/overlayedModal.stories.js +0 -8
  297. package/dist/collection/stories/privacy-badge.stories.js +0 -11
  298. package/dist/collection/stories/slider.stories.js +0 -17
  299. package/dist/collection/stories/teaser.stories.js +0 -5
  300. package/dist/collection/stories/vps-widget.stories.js +0 -47
  301. package/dist/collection/stories/vviinn-product.stories.js +0 -19
  302. package/dist/collection/tracking/event.js +0 -3
  303. package/dist/collection/tracking/filter.js +0 -5
  304. package/dist/collection/tracking/index.js +0 -13
  305. package/dist/collection/tracking/models.js +0 -6
  306. package/dist/collection/tracking/product.js +0 -18
  307. package/dist/collection/tracking/search.js +0 -5
  308. package/dist/collection/tracking/widget.js +0 -10
  309. package/dist/collection/utils/collections/collectionsUtils.js +0 -5
  310. package/dist/collection/utils/either.js +0 -3
  311. package/dist/collection/utils/enum/enumUtils.js +0 -3
  312. package/dist/collection/utils/event/Events.js +0 -1
  313. package/dist/collection/utils/number/index.js +0 -4
  314. package/dist/collection/utils/option/option.js +0 -4
  315. package/dist/collection/utils/semigroup/semigroupDiff.js +0 -6
  316. package/dist/collection/utils/token/tokenUtils.js +0 -9
  317. package/dist/esm/cropper-handler_27.entry.js +0 -1105
  318. package/dist/esm/index-51f71d18.js +0 -1323
  319. package/dist/esm/index.js +0 -1
  320. package/dist/esm/loader.js +0 -19
  321. package/dist/esm/polyfills/core-js.js +0 -11
  322. package/dist/esm/polyfills/css-shim.js +0 -1
  323. package/dist/esm/polyfills/dom.js +0 -79
  324. package/dist/esm/polyfills/es5-html-element.js +0 -1
  325. package/dist/esm/polyfills/index.js +0 -34
  326. package/dist/esm/polyfills/system.js +0 -6
  327. package/dist/esm/vviinn-carousel_2.entry.js +0 -996
  328. package/dist/esm/vviinn-widgets.js +0 -19
  329. package/dist/index.cjs.js +0 -1
  330. package/dist/index.js +0 -1
  331. package/dist/loader/cdn.js +0 -3
  332. package/dist/loader/index.cjs.js +0 -3
  333. package/dist/loader/index.d.ts +0 -12
  334. package/dist/loader/index.es2017.js +0 -3
  335. package/dist/loader/index.js +0 -4
  336. package/dist/loader/package.json +0 -10
  337. package/dist/vviinn-widgets/p-2dd35f19.entry.js +0 -1
  338. package/dist/vviinn-widgets/p-3469b71a.js +0 -1
  339. package/dist/vviinn-widgets/p-40bea5b5.entry.js +0 -1
  340. package/dist/vviinn-widgets/p-465d043d.js +0 -15
  341. package/dist/vviinn-widgets/p-59bd2a99.js +0 -1
  342. package/dist/vviinn-widgets/p-74ed36af.entry.js +0 -1
  343. package/dist/vviinn-widgets/p-9def6b8b.entry.js +0 -1
  344. package/dist/vviinn-widgets/p-cd995515.js +0 -1
  345. package/www/build/p-166970f3.js +0 -1
  346. package/www/build/p-2dd35f19.entry.js +0 -1
  347. package/www/build/p-3469b71a.js +0 -1
  348. package/www/build/p-40bea5b5.entry.js +0 -1
  349. package/www/build/p-465d043d.js +0 -15
  350. package/www/build/p-59bd2a99.js +0 -1
  351. package/www/build/p-61933b75.js +0 -1
  352. package/www/build/p-74ed36af.entry.js +0 -1
  353. package/www/build/p-9def6b8b.entry.js +0 -1
  354. package/www/build/p-a67898be.css +0 -1
  355. package/www/build/p-a6e0710f.entry.js +0 -1
  356. package/www/build/p-cd995515.js +0 -1
  357. package/www/favicon.ico +0 -0
@@ -1,510 +0,0 @@
1
- import { Component, Host, h, Prop, State, Element, Watch, Event, Listen, } from "@stencil/core";
2
- import { pipe } from "fp-ts/lib/function";
3
- import * as TE from "fp-ts/lib/TaskEither";
4
- import * as E from "fp-ts/lib/Either";
5
- import { createBearAuthedHeader } from "./token-helpers";
6
- import { state } from "../../store/store";
7
- import { getRecommendationsService } from "../../campaign/CampaignService";
8
- import { imageSearchState } from "../../store/imageSearch.store";
9
- import { Subject } from "rxjs";
10
- import { v4 as uuidv4 } from "uuid";
11
- import { createTrackingApi } from "../../openApi";
12
- import { createProductClickVprEvent, createProductViewVprEvent, createWidgetVprEvent, } from "../../tracking";
13
- import { checkEmpryString } from "../../utils/option/option";
14
- /**
15
- * @part product-card - product card itself
16
- * @part title - title inside product card
17
- * @part brand - brand inside product card
18
- * @part currency - brand inside product card
19
- * @part image - product card image
20
- * @part image-link - anchor element around product image
21
- * @part price-amount - span element around every prices
22
- * @part price-container - block of prices
23
- * @part price-outdated - block for outdated price. rendered when product contains sale price
24
- * @part price-prefix - block rendered before each price element (for ex. "from")
25
- * @part price-regular - block for price if no sale price presented
26
- * @part price-sale - block for sale price. rendered only if sale price presented
27
- * @part carousel-button
28
- */
29
- export class VviinnVprWidget {
30
- constructor() {
31
- /** Title for recommendations widget */
32
- this.blockTitle = "Recommended products";
33
- /** Ratio of each recommended product image */
34
- this.imageRatio = 1;
35
- /** Width of each recommended product image */
36
- this.imageWidth = 300;
37
- /** Currency sign will shown after price */
38
- this.currencySign = "€";
39
- /** Use slider or grid view */
40
- this.mode = "continuity";
41
- /** Campaign type */
42
- this.campaignType = "VPR";
43
- /** Locale for currency formatting */
44
- this.locale = "de-DE";
45
- /** comma-separated list of campaign-ids */
46
- this.campaigns = "";
47
- /** @internal */
48
- this.apiPath = "https://api.vviinn.com";
49
- /** @internal */
50
- this.useCarousel = true;
51
- this.showScroll = true;
52
- this.cssUrl = null;
53
- this.recommendations = [];
54
- this.loaded = false;
55
- this.productImageLoadedSubject = new Subject();
56
- }
57
- handleProductIdChange() {
58
- this.getRecommendations();
59
- }
60
- handleCampaignTypeChange() {
61
- this.getRecommendations();
62
- }
63
- handleCampaignsChange() {
64
- this.getRecommendations();
65
- }
66
- handleApiPathChange(newPath) {
67
- state.apiPath = newPath;
68
- this.getRecommendations();
69
- }
70
- handleImageLoading({ detail }) {
71
- this.productImageLoadedSubject.next(detail);
72
- }
73
- trackRecommendationView({ detail }) {
74
- const recommendationViewEvent = createProductViewVprEvent(Object.assign({ session_id: this.uiSessionId }, detail));
75
- this.trackingApi.trackEvent(recommendationViewEvent);
76
- }
77
- trackRecommendationClick({ detail }) {
78
- const recommendationClickEvent = createProductClickVprEvent(Object.assign({ session_id: this.uiSessionId }, detail));
79
- this.trackingApi.trackEvent(recommendationClickEvent).finally(() => {
80
- const product = this.recommendations.find((r) => r.productId === detail.product);
81
- if (!product || !product.deeplink)
82
- return;
83
- window.location.href = product.deeplink;
84
- });
85
- }
86
- connectedCallback() {
87
- state.apiPath = this.apiPath;
88
- state.currencySign = this.currencySign;
89
- state.locale = this.locale;
90
- this.uiSessionId = uuidv4();
91
- this.trackingApi = createTrackingApi(this.apiPath, this.token);
92
- const widgetOpenEvent = createWidgetVprEvent({
93
- action: "open",
94
- session_id: this.uiSessionId,
95
- });
96
- this.trackingApi.trackEvent(widgetOpenEvent);
97
- }
98
- disconnectedCallback() {
99
- const widgetCloseEvent = createWidgetVprEvent({
100
- action: "close",
101
- session_id: this.uiSessionId,
102
- });
103
- this.trackingApi.trackEvent(widgetCloseEvent);
104
- }
105
- async componentWillLoad() {
106
- state.pricePrefix = this.pricePrefix;
107
- state.currencySign = this.currencySign;
108
- this.getRecommendations();
109
- }
110
- async getRecommendations() {
111
- if (this.productId === undefined || this.token === undefined)
112
- return;
113
- const campaignType = this.campaignType.length > 0 ? this.campaignType : "VPR";
114
- const headers = createBearAuthedHeader(this.token);
115
- const request = pipe(TE.of(getRecommendationsService(campaignType)), TE.ap(TE.of(this.productId)), TE.ap(TE.of(checkEmpryString(this.campaigns))), TE.ap(TE.of(headers)), TE.flatten);
116
- const runRequest = await request();
117
- pipe(runRequest, E.fold((error) => this.handleError(error), (data) => this.handleRecommendationsSucces(data)));
118
- }
119
- handleError(error) {
120
- console.log("ERROR:", error);
121
- }
122
- handleRecommendationsSucces(data) {
123
- var _a;
124
- this.recommendations = (_a = data === null || data === void 0 ? void 0 : data.extended) !== null && _a !== void 0 ? _a : data;
125
- imageSearchState.results = this.recommendations;
126
- this.loaded = true;
127
- this.productIds = this.recommendations.map((r) => r.productId);
128
- this.productImageLoadedSubject.subscribe((id) => {
129
- this.productIds = this.productIds.filter((x) => x !== id);
130
- if (this.productIds.length === 0) {
131
- this.recommendationsLoaded.emit();
132
- }
133
- });
134
- }
135
- isExternalCSS() {
136
- return this.cssUrl && this.cssUrl.length > 0;
137
- }
138
- renderExternalCSS() {
139
- return this.isExternalCSS() ? (h("link", { href: this.cssUrl, rel: "stylesheet" })) : ("");
140
- }
141
- render() {
142
- return (h(Host, { class: {
143
- loaded: this.loaded,
144
- empty: this.recommendations.length == 0,
145
- [this.mode]: true,
146
- }, "aria-hidden": this.loaded ? "false" : "true" },
147
- this.renderExternalCSS(),
148
- h("style", null, state.fallbackStyles),
149
- h("h2", { part: "recommendations-title" }, this.blockTitle),
150
- this.useCarousel ? this.renderCarousel() : this.renderResults()));
151
- }
152
- renderRecommendation(recommendation, index) {
153
- return (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 }));
154
- }
155
- useDimmedBackgroundInCard() {
156
- return this.mode === "continuity" || !this.useCarousel;
157
- }
158
- renderResults() {
159
- return (h("div", { class: "recommendations-grid", part: "recommendations-grid" }, this.recommendations.map((r, i) => this.renderRecommendation(r, i))));
160
- }
161
- renderCarousel() {
162
- return (h("vviinn-carousel", { mode: this.mode, imageWidth: this.imageWidth, showScroll: this.showScroll, recommendations: this.recommendations }));
163
- }
164
- static get is() { return "vviinn-vpr-widget"; }
165
- static get encapsulation() { return "shadow"; }
166
- static get originalStyleUrls() { return {
167
- "$": ["vviinn-vpr-widget.css"]
168
- }; }
169
- static get styleUrls() { return {
170
- "$": ["vviinn-vpr-widget.css"]
171
- }; }
172
- static get properties() { return {
173
- "blockTitle": {
174
- "type": "string",
175
- "mutable": false,
176
- "complexType": {
177
- "original": "string",
178
- "resolved": "string",
179
- "references": {}
180
- },
181
- "required": false,
182
- "optional": false,
183
- "docs": {
184
- "tags": [],
185
- "text": "Title for recommendations widget"
186
- },
187
- "attribute": "block-title",
188
- "reflect": false,
189
- "defaultValue": "\"Recommended products\""
190
- },
191
- "imageRatio": {
192
- "type": "number",
193
- "mutable": false,
194
- "complexType": {
195
- "original": "number",
196
- "resolved": "number",
197
- "references": {}
198
- },
199
- "required": false,
200
- "optional": false,
201
- "docs": {
202
- "tags": [],
203
- "text": "Ratio of each recommended product image"
204
- },
205
- "attribute": "image-ratio",
206
- "reflect": false,
207
- "defaultValue": "1"
208
- },
209
- "imageWidth": {
210
- "type": "number",
211
- "mutable": false,
212
- "complexType": {
213
- "original": "number",
214
- "resolved": "number",
215
- "references": {}
216
- },
217
- "required": false,
218
- "optional": false,
219
- "docs": {
220
- "tags": [],
221
- "text": "Width of each recommended product image"
222
- },
223
- "attribute": "image-width",
224
- "reflect": false,
225
- "defaultValue": "300"
226
- },
227
- "productId": {
228
- "type": "string",
229
- "mutable": false,
230
- "complexType": {
231
- "original": "string",
232
- "resolved": "string",
233
- "references": {}
234
- },
235
- "required": false,
236
- "optional": false,
237
- "docs": {
238
- "tags": [],
239
- "text": "Id of product you need recommendations for"
240
- },
241
- "attribute": "product-id",
242
- "reflect": false
243
- },
244
- "token": {
245
- "type": "string",
246
- "mutable": false,
247
- "complexType": {
248
- "original": "string",
249
- "resolved": "string",
250
- "references": {}
251
- },
252
- "required": false,
253
- "optional": false,
254
- "docs": {
255
- "tags": [],
256
- "text": "vviinn customer token"
257
- },
258
- "attribute": "token",
259
- "reflect": false
260
- },
261
- "currencySign": {
262
- "type": "string",
263
- "mutable": false,
264
- "complexType": {
265
- "original": "string",
266
- "resolved": "string",
267
- "references": {}
268
- },
269
- "required": false,
270
- "optional": false,
271
- "docs": {
272
- "tags": [],
273
- "text": "Currency sign will shown after price"
274
- },
275
- "attribute": "currency-sign",
276
- "reflect": false,
277
- "defaultValue": "\"\u20AC\""
278
- },
279
- "pricePrefix": {
280
- "type": "string",
281
- "mutable": false,
282
- "complexType": {
283
- "original": "string",
284
- "resolved": "string",
285
- "references": {}
286
- },
287
- "required": false,
288
- "optional": false,
289
- "docs": {
290
- "tags": [],
291
- "text": "prefix will shown before price"
292
- },
293
- "attribute": "price-prefix",
294
- "reflect": false
295
- },
296
- "mode": {
297
- "type": "string",
298
- "mutable": false,
299
- "complexType": {
300
- "original": "CarouselMode",
301
- "resolved": "\"continuity\" | \"grid\"",
302
- "references": {
303
- "CarouselMode": {
304
- "location": "import",
305
- "path": "../vviinn-carousel/vviinn-carousel"
306
- }
307
- }
308
- },
309
- "required": false,
310
- "optional": false,
311
- "docs": {
312
- "tags": [],
313
- "text": "Use slider or grid view"
314
- },
315
- "attribute": "mode",
316
- "reflect": false,
317
- "defaultValue": "\"continuity\""
318
- },
319
- "campaignType": {
320
- "type": "string",
321
- "mutable": false,
322
- "complexType": {
323
- "original": "CampaignName",
324
- "resolved": "\"VCS\" | \"VPR\"",
325
- "references": {
326
- "CampaignName": {
327
- "location": "import",
328
- "path": "../../campaign/Campaign"
329
- }
330
- }
331
- },
332
- "required": false,
333
- "optional": false,
334
- "docs": {
335
- "tags": [],
336
- "text": "Campaign type"
337
- },
338
- "attribute": "campaign-type",
339
- "reflect": false,
340
- "defaultValue": "\"VPR\""
341
- },
342
- "locale": {
343
- "type": "string",
344
- "mutable": false,
345
- "complexType": {
346
- "original": "string",
347
- "resolved": "string",
348
- "references": {}
349
- },
350
- "required": false,
351
- "optional": false,
352
- "docs": {
353
- "tags": [],
354
- "text": "Locale for currency formatting"
355
- },
356
- "attribute": "locale",
357
- "reflect": false,
358
- "defaultValue": "\"de-DE\""
359
- },
360
- "campaigns": {
361
- "type": "string",
362
- "mutable": false,
363
- "complexType": {
364
- "original": "string",
365
- "resolved": "string",
366
- "references": {}
367
- },
368
- "required": false,
369
- "optional": false,
370
- "docs": {
371
- "tags": [],
372
- "text": "comma-separated list of campaign-ids"
373
- },
374
- "attribute": "campaigns",
375
- "reflect": false,
376
- "defaultValue": "\"\""
377
- },
378
- "apiPath": {
379
- "type": "string",
380
- "mutable": false,
381
- "complexType": {
382
- "original": "string | undefined",
383
- "resolved": "string",
384
- "references": {}
385
- },
386
- "required": false,
387
- "optional": false,
388
- "docs": {
389
- "tags": [{
390
- "text": undefined,
391
- "name": "internal"
392
- }],
393
- "text": ""
394
- },
395
- "attribute": "api-path",
396
- "reflect": false,
397
- "defaultValue": "\"https://api.vviinn.com\""
398
- },
399
- "useCarousel": {
400
- "type": "boolean",
401
- "mutable": false,
402
- "complexType": {
403
- "original": "boolean",
404
- "resolved": "boolean",
405
- "references": {}
406
- },
407
- "required": false,
408
- "optional": false,
409
- "docs": {
410
- "tags": [{
411
- "text": undefined,
412
- "name": "internal"
413
- }],
414
- "text": ""
415
- },
416
- "attribute": "use-carousel",
417
- "reflect": false,
418
- "defaultValue": "true"
419
- },
420
- "showScroll": {
421
- "type": "boolean",
422
- "mutable": false,
423
- "complexType": {
424
- "original": "boolean",
425
- "resolved": "boolean",
426
- "references": {}
427
- },
428
- "required": false,
429
- "optional": false,
430
- "docs": {
431
- "tags": [],
432
- "text": ""
433
- },
434
- "attribute": "show-scroll",
435
- "reflect": false,
436
- "defaultValue": "true"
437
- },
438
- "cssUrl": {
439
- "type": "string",
440
- "mutable": false,
441
- "complexType": {
442
- "original": "string | null",
443
- "resolved": "string",
444
- "references": {}
445
- },
446
- "required": false,
447
- "optional": false,
448
- "docs": {
449
- "tags": [],
450
- "text": ""
451
- },
452
- "attribute": "css-url",
453
- "reflect": false,
454
- "defaultValue": "null"
455
- }
456
- }; }
457
- static get states() { return {
458
- "recommendations": {},
459
- "loaded": {}
460
- }; }
461
- static get events() { return [{
462
- "method": "recommendationsLoaded",
463
- "name": "recommendationsLoaded",
464
- "bubbles": true,
465
- "cancelable": true,
466
- "composed": true,
467
- "docs": {
468
- "tags": [],
469
- "text": ""
470
- },
471
- "complexType": {
472
- "original": "any",
473
- "resolved": "any",
474
- "references": {}
475
- }
476
- }]; }
477
- static get elementRef() { return "el"; }
478
- static get watchers() { return [{
479
- "propName": "productId",
480
- "methodName": "handleProductIdChange"
481
- }, {
482
- "propName": "campaignType",
483
- "methodName": "handleCampaignTypeChange"
484
- }, {
485
- "propName": "campaigns",
486
- "methodName": "handleCampaignsChange"
487
- }, {
488
- "propName": "apiPath",
489
- "methodName": "handleApiPathChange"
490
- }]; }
491
- static get listeners() { return [{
492
- "name": "productImageLoaded",
493
- "method": "handleImageLoading",
494
- "target": undefined,
495
- "capture": false,
496
- "passive": false
497
- }, {
498
- "name": "recommendationView",
499
- "method": "trackRecommendationView",
500
- "target": undefined,
501
- "capture": false,
502
- "passive": false
503
- }, {
504
- "name": "recommendationClick",
505
- "method": "trackRecommendationClick",
506
- "target": undefined,
507
- "capture": false,
508
- "passive": false
509
- }]; }
510
- }
@@ -1,79 +0,0 @@
1
- :host {
2
- /**
3
- * @prop --vviinn-carousel-columns: control number of items in grid mode
4
- * @prop --vviinn-carousel-image-width: control image width in continuity mode
5
- */
6
-
7
- display: grid;
8
- grid-gap: 1rem;
9
- width: 100%;
10
- }
11
-
12
- :host(:not(.loaded)) {
13
- position: absolute;
14
- visibility: hidden;
15
- }
16
-
17
- :host(.grid) vviinn-product-card::part(image) {
18
- border: 1px solid #DDDDDD;
19
- width: 100%;
20
- }
21
-
22
- h2 {
23
- margin: 0;
24
- }
25
-
26
- vviinn-product-card::part(price-container) {
27
- align-self: flex-start;
28
- text-align: left;
29
- display: flex;
30
- }
31
-
32
- .results {
33
- display: grid;
34
- grid-gap: 1rem;
35
- }
36
-
37
- .visually-hidden {
38
- position: absolute;
39
- top: 0;
40
- left: 0;
41
- z-index: -1;
42
- height: 0;
43
- width: 0;
44
- }
45
-
46
- h2 {
47
- margin: 0;
48
- }
49
-
50
- :host(.grid) h2 {
51
- justify-content: center;
52
- }
53
-
54
- :host(.grid) vviinn-product-card::part(image) {
55
- min-width: 100%;
56
- }
57
-
58
- :host(.grid) vviinn-product-card::part(image-link) {
59
- width: 100%;
60
- }
61
-
62
- :host(.grid) vviinn-product-card::part(title),
63
- :host(.grid) vviinn-product-card::part(brand),
64
- :host(.grid) vviinn-product-card::part(type) {
65
- text-align: center;
66
- }
67
-
68
- :host(.grid) vviinn-product-card::part(price-container) {
69
- align-self: center;
70
- }
71
-
72
- :host(.continuity) vviinn-product-card::part(title),
73
- :host(.continuity) vviinn-product-card::part(brand),
74
- :host(.continuity) vviinn-product-card::part(type),
75
- :host(.continuity) vviinn-product-card::part(deeplink) {
76
- text-align: left;
77
- max-width: unset;
78
- align-self: start;
79
- }
@@ -1,35 +0,0 @@
1
- export default {
2
- title: "Widgets/Visual Search/Button",
3
- component: "vviinn-vps-button",
4
- parameters: {
5
- viewport: {
6
- defaultViewport: "mobile2",
7
- },
8
- },
9
- decorators: [
10
- (story) => `
11
- <div style="display: grid;
12
- position: absolute;
13
- top: 0;
14
- bottom: 0;
15
- left: 0;
16
- right: 0;
17
- align-items: center;
18
- justify-items: center;">
19
- ${story()}
20
- </div>
21
- `,
22
- ],
23
- };
24
- const Template = (args) => `
25
- <vviinn-vps-button
26
- api-path="${args.apiPath}"
27
- token="${args.token}"
28
- campaign-id="${args.campaignId}"
29
- ></vviinn-vps-button>`;
30
- export const Default = Template.bind({});
31
- Default.args = {
32
- token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOjgzLCJqdGkiOiI3ZTg2Y2I1YS00ZTFjLTRhYjctYjU2My1lN2FjMTYzZTYyZDIiLCJzY29wZXMiOlsidnByIiwidnBzIiwidnBjIl19.SbaQnBkvoXer3GPCWUthFQStFKLHZNMBfj4Qu44WHM8nzaIt48I74yVy4gVbX29vtd6jIkDPdakqEXRXmAxOCtv7_nsd4iBs1yMegfOWW5g8f10PKfZqmWJcfhwKIEElnUMFmP6rXpogntZ7iFfeTBbiRNzQPhkaa7jUjgQkCC4",
33
- apiPath: "https://api.vviinn.com",
34
- campaignId: "",
35
- };
@@ -1,3 +0,0 @@
1
- :host {
2
- cursor: pointer;
3
- }