vviinn-widgets 2.5.0 → 2.5.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 (330) hide show
  1. package/dist/cjs/Handler-176539c8.js +331 -0
  2. package/dist/{vviinn-widgets/app-globals-4fe0376b.js → cjs/app-globals-d15b4c2c.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-5dbf778c.js → cjs/customized-slots-0c0d0665.js} +6 -3
  5. package/dist/cjs/highlight-box_22.cjs.entry.js +747 -0
  6. package/{www/build/imageSearch.store-3204bc99.js → dist/cjs/imageSearch.store-865c23f4.js} +11902 -11653
  7. package/{www/build/index-89e62050.js → dist/cjs/index-0eb3036a.js} +76 -698
  8. package/dist/cjs/index-0f5516a6.js +1354 -0
  9. package/dist/cjs/index-31b9cb7a.js +39 -0
  10. package/dist/cjs/index.cjs.js +2 -0
  11. package/dist/cjs/loader.cjs.js +23 -0
  12. package/dist/cjs/vviinn-carousel_3.cjs.entry.js +1174 -0
  13. package/dist/{vviinn-widgets/vviinn-error.entry.js → cjs/vviinn-error.cjs.entry.js} +8 -4
  14. package/{www/build/vviinn-preloader.entry.js → dist/cjs/vviinn-preloader.cjs.entry.js} +11 -10
  15. package/{www/build/vviinn-recommendations-sidebar.entry.js → dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js} +12 -8
  16. package/dist/{vviinn-widgets/vviinn-vpr-button.entry.js → cjs/vviinn-vpr-button.cjs.entry.js} +9 -5
  17. package/dist/cjs/vviinn-vps-button.cjs.entry.js +43 -0
  18. package/{www/build/vviinn-vps-widget.entry.js → dist/cjs/vviinn-vps-widget.cjs.entry.js} +51 -49
  19. package/dist/cjs/vviinn-widgets.cjs.js +21 -0
  20. package/dist/collection/Image/error.js +14 -0
  21. package/dist/collection/Image/form.js +5 -0
  22. package/dist/collection/Image/fromFile.js +18 -0
  23. package/dist/collection/Image/imageToB64.js +9 -0
  24. package/dist/collection/Image/index.js +0 -0
  25. package/dist/collection/Image/renderPromise.js +6 -0
  26. package/dist/collection/Image/resizeImage.js +28 -0
  27. package/dist/collection/Image/sizing.js +39 -0
  28. package/dist/collection/Image/toFile.js +17 -0
  29. package/dist/collection/analytics/GAnalytics.js +32 -0
  30. package/dist/collection/analytics/GeneralAnalytics.js +9 -0
  31. package/dist/collection/analytics/GtagAnalytics.js +35 -0
  32. package/dist/collection/analytics/ProductAnalytics.js +1 -0
  33. package/dist/collection/campaign/Campaign.js +8 -0
  34. package/dist/collection/campaign/CampaignService.js +5 -0
  35. package/dist/collection/campaign/VCSCampaign.js +1 -0
  36. package/dist/collection/campaign/VCSCampaignResponse.js +1 -0
  37. package/dist/collection/campaign/VCSCampaignService.js +5 -0
  38. package/dist/collection/campaign/VPRCampaignResponse.js +1 -0
  39. package/dist/collection/campaign/VPRCampaignService.js +5 -0
  40. package/dist/collection/collection-manifest.json +43 -0
  41. package/dist/collection/components/customized-slots.js +47 -0
  42. package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.css +71 -0
  43. package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.js +25 -0
  44. package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.css +49 -0
  45. package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.js +64 -0
  46. package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.css +33 -0
  47. package/{www/build/image-cropper.entry.js → dist/collection/components/image-search/image-view/image-cropper/image-cropper.js} +70 -33
  48. package/dist/collection/components/image-search/search-filters/search-filters.css +120 -0
  49. package/dist/collection/components/image-search/search-filters/search-filters.js +125 -0
  50. package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +142 -0
  51. package/{www/build/vviinn-carousel.entry.js → dist/collection/components/vviinn-carousel/vviinn-carousel.js} +113 -18
  52. package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.css +7 -0
  53. package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +36 -0
  54. package/dist/collection/components/vviinn-error/vviinn-error.css +38 -0
  55. package/dist/collection/components/vviinn-error/vviinn-error.js +18 -0
  56. package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.css +3 -0
  57. package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.js +34 -0
  58. package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.css +3 -0
  59. package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.js +34 -0
  60. package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.css +34 -0
  61. package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +129 -0
  62. package/dist/collection/components/vviinn-example-images/vviinn-example-images.css +19 -0
  63. package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +80 -0
  64. package/dist/{vviinn-widgets/index-bbcd6be9.js → collection/components/vviinn-icons/index.js} +11 -14
  65. package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.css +25 -0
  66. package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +64 -0
  67. package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.css +47 -0
  68. package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +100 -0
  69. package/dist/collection/components/vviinn-image-view/vviinn-image-view.css +31 -0
  70. package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +61 -0
  71. package/dist/collection/components/vviinn-modal/vviinn-modal.css +105 -0
  72. package/dist/collection/components/vviinn-modal/vviinn-modal.js +98 -0
  73. package/dist/collection/components/vviinn-onboarding/onboarding-cards/onboarding-card.css +41 -0
  74. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.js +26 -0
  75. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.js +26 -0
  76. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.js +26 -0
  77. package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.css +58 -0
  78. package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.js +28 -0
  79. package/dist/collection/components/vviinn-overlay/vviinn-overlay.css +33 -0
  80. package/dist/collection/components/vviinn-overlay/vviinn-overlay.js +15 -0
  81. package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.css +29 -0
  82. package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.js +71 -0
  83. package/dist/collection/components/vviinn-preloader/vviinn-preloader.css +37 -0
  84. package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +20 -0
  85. package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +19 -0
  86. package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +27 -0
  87. package/dist/collection/components/vviinn-product-card/render-helpers.js +32 -0
  88. package/dist/collection/components/vviinn-product-card/stories/args.js +73 -0
  89. package/dist/collection/components/vviinn-product-card/stories/decorators.js +51 -0
  90. package/dist/collection/components/vviinn-product-card/stories/vviinn-product-card.stories.js +105 -0
  91. package/dist/collection/components/vviinn-product-card/vviinn-product-card.css +95 -0
  92. package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +462 -0
  93. package/dist/collection/components/vviinn-slider/arrow.js +11 -0
  94. package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.css +4 -0
  95. package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.js +15 -0
  96. package/dist/collection/components/vviinn-slider/vviinn-slider.css +109 -0
  97. package/dist/collection/components/vviinn-slider/vviinn-slider.js +181 -0
  98. package/dist/collection/components/vviinn-teaser/vviinn-teaser.css +14 -0
  99. package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +29 -0
  100. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.css +238 -0
  101. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +200 -0
  102. package/dist/collection/components/vviinn-vpr-button/stories/args.js +207 -0
  103. package/dist/collection/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.js +89 -0
  104. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.css +35 -0
  105. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +156 -0
  106. package/dist/collection/components/vviinn-vpr-widget/stories/args.js +190 -0
  107. package/dist/collection/components/vviinn-vpr-widget/stories/decorators.js +29 -0
  108. package/dist/collection/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.js +212 -0
  109. package/dist/collection/components/vviinn-vpr-widget/token-helpers.js +11 -0
  110. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +483 -0
  111. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +79 -0
  112. package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +31 -0
  113. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.css +3 -0
  114. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +178 -0
  115. package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +33 -0
  116. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +350 -0
  117. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +352 -0
  118. package/dist/collection/cropper/Cropper.js +1 -0
  119. package/dist/collection/cropper/Handler.js +61 -0
  120. package/dist/collection/dom/index.js +3 -0
  121. package/dist/collection/error.js +14 -0
  122. package/dist/collection/file/index.js +4 -0
  123. package/dist/collection/geometry/Clip.js +14 -0
  124. package/dist/collection/geometry/Point.js +32 -0
  125. package/dist/collection/geometry/Rectangle.js +95 -0
  126. package/dist/collection/geometry/RectangleAlt.js +1 -0
  127. package/dist/collection/geometry/Sized.js +8 -0
  128. package/dist/collection/global.js +19 -0
  129. package/dist/collection/index.js +1 -0
  130. package/dist/collection/interfaces/generated.js +5 -0
  131. package/dist/collection/interfaces/recommendation.js +1 -0
  132. package/dist/collection/network/apiClient.js +9 -0
  133. package/dist/collection/network/ion/File.js +14 -0
  134. package/dist/collection/network/ion/Form.js +64 -0
  135. package/dist/collection/network/ion/Link.js +8 -0
  136. package/dist/collection/network/ion/ValueObject.js +23 -0
  137. package/dist/collection/network/request.js +19 -0
  138. package/dist/collection/network/utils.js +37 -0
  139. package/dist/collection/openApi/index.js +27 -0
  140. package/dist/collection/recommendation/events.js +1 -0
  141. package/dist/collection/recommendation/recommendation.js +1 -0
  142. package/dist/collection/searchSession/searchSession.js +26 -0
  143. package/dist/collection/sentry.js +14 -0
  144. package/dist/collection/slider/GridMode.js +1 -0
  145. package/dist/collection/store/file-processing.js +13 -0
  146. package/dist/collection/store/imageSearch.store.js +138 -0
  147. package/dist/collection/store/store.js +3 -0
  148. package/dist/collection/store/tracking.store.js +3 -0
  149. package/dist/collection/stories/Button.js +21 -0
  150. package/dist/collection/stories/Button.stories.js +42 -0
  151. package/dist/collection/stories/Header.js +45 -0
  152. package/dist/collection/stories/Header.stories.js +15 -0
  153. package/dist/collection/stories/Page.js +61 -0
  154. package/dist/collection/stories/Page.stories.js +19 -0
  155. package/dist/collection/stories/assets/code-brackets.svg +1 -0
  156. package/dist/collection/stories/assets/colors.svg +1 -0
  157. package/dist/collection/stories/assets/comments.svg +1 -0
  158. package/dist/collection/stories/assets/direction.svg +1 -0
  159. package/dist/collection/stories/assets/flow.svg +1 -0
  160. package/dist/collection/stories/assets/plugin.svg +1 -0
  161. package/dist/collection/stories/assets/repo.svg +1 -0
  162. package/dist/collection/stories/assets/stackalt.svg +1 -0
  163. package/dist/collection/stories/image-selector.stories.js +6 -0
  164. package/dist/collection/stories/image-view.stories.js +6 -0
  165. package/dist/collection/stories/modal.stories.js +12 -0
  166. package/dist/collection/stories/onboarding.stories.js +11 -0
  167. package/dist/collection/stories/overlay.stories.js +5 -0
  168. package/dist/collection/stories/overlayedModal.stories.js +8 -0
  169. package/dist/collection/stories/privacy-badge.stories.js +11 -0
  170. package/dist/collection/stories/slider.stories.js +17 -0
  171. package/dist/collection/stories/teaser.stories.js +5 -0
  172. package/dist/collection/stories/vps-widget.stories.js +47 -0
  173. package/dist/collection/stories/vviinn-product.stories.js +19 -0
  174. package/dist/collection/tracking/event.js +3 -0
  175. package/dist/collection/tracking/filter.js +5 -0
  176. package/dist/collection/tracking/index.js +13 -0
  177. package/dist/collection/tracking/models.js +6 -0
  178. package/dist/collection/tracking/product.js +18 -0
  179. package/dist/collection/tracking/search.js +5 -0
  180. package/dist/collection/tracking/widget.js +10 -0
  181. package/dist/collection/utils/collections/collectionsUtils.js +5 -0
  182. package/dist/collection/utils/either.js +3 -0
  183. package/dist/collection/utils/enum/enumUtils.js +3 -0
  184. package/dist/collection/utils/event/Events.js +1 -0
  185. package/dist/collection/utils/number/index.js +4 -0
  186. package/dist/collection/utils/option/option.js +4 -0
  187. package/dist/collection/utils/semigroup/semigroupDiff.js +6 -0
  188. package/dist/collection/utils/token/tokenUtils.js +9 -0
  189. package/dist/esm/Handler-f9b8735c.js +309 -0
  190. package/{www/build/app-globals-4fe0376b.js → dist/esm/app-globals-6f6aa89e.js} +10 -922
  191. package/dist/{vviinn-widgets → esm}/cropper-handler.entry.js +2 -2
  192. package/{www/build/customized-slots-5dbf778c.js → dist/esm/customized-slots-6b427dda.js} +1 -1
  193. package/dist/esm/highlight-box_22.entry.js +722 -0
  194. package/dist/{vviinn-widgets/imageSearch.store-3204bc99.js → esm/imageSearch.store-0ae87235.js} +12070 -11855
  195. package/dist/{vviinn-widgets/index-89e62050.js → esm/index-2e296af4.js} +6 -639
  196. package/dist/esm/index-59f44eaa.js +1323 -0
  197. package/{www/build/index-bbcd6be9.js → dist/esm/index-ac05c460.js} +2 -4
  198. package/dist/esm/index.js +1 -0
  199. package/dist/esm/loader.js +19 -0
  200. package/dist/esm/polyfills/core-js.js +11 -0
  201. package/dist/esm/polyfills/css-shim.js +1 -0
  202. package/dist/esm/polyfills/dom.js +79 -0
  203. package/dist/esm/polyfills/es5-html-element.js +1 -0
  204. package/dist/esm/polyfills/index.js +34 -0
  205. package/dist/esm/polyfills/system.js +6 -0
  206. package/dist/esm/vviinn-carousel_3.entry.js +1168 -0
  207. package/{www/build → dist/esm}/vviinn-error.entry.js +1 -1
  208. package/dist/{vviinn-widgets → esm}/vviinn-preloader.entry.js +3 -6
  209. package/dist/{vviinn-widgets → esm}/vviinn-recommendations-sidebar.entry.js +2 -2
  210. package/{www/build → dist/esm}/vviinn-vpr-button.entry.js +2 -2
  211. package/dist/{vviinn-widgets → esm}/vviinn-vps-button.entry.js +3 -3
  212. package/dist/{vviinn-widgets → esm}/vviinn-vps-widget.entry.js +12 -14
  213. package/dist/esm/vviinn-widgets.js +19 -0
  214. package/dist/index.cjs.js +1 -0
  215. package/dist/index.js +1 -0
  216. package/dist/loader/cdn.js +3 -0
  217. package/dist/loader/index.cjs.js +3 -0
  218. package/dist/loader/index.d.ts +12 -0
  219. package/dist/loader/index.es2017.js +3 -0
  220. package/dist/loader/index.js +4 -0
  221. package/dist/loader/package.json +10 -0
  222. package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +1 -1
  223. package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +1 -1
  224. package/dist/vviinn-widgets/index.esm.js +0 -1
  225. package/dist/vviinn-widgets/p-118ac907.js +1 -0
  226. package/dist/vviinn-widgets/p-11f61564.js +1 -0
  227. package/dist/vviinn-widgets/p-39fdc5c9.entry.js +1 -0
  228. package/dist/vviinn-widgets/p-762dc067.entry.js +1 -0
  229. package/dist/vviinn-widgets/p-7e2f542c.js +1 -0
  230. package/dist/vviinn-widgets/p-8d56e795.entry.js +1 -0
  231. package/dist/vviinn-widgets/p-8f955b15.entry.js +1 -0
  232. package/dist/vviinn-widgets/p-9654fe35.entry.js +1 -0
  233. package/dist/vviinn-widgets/p-9e5adc42.js +1 -0
  234. package/dist/vviinn-widgets/p-b3731705.entry.js +1 -0
  235. package/dist/vviinn-widgets/p-bad1809f.js +1 -0
  236. package/dist/vviinn-widgets/p-c36546fa.js +15 -0
  237. package/dist/vviinn-widgets/p-d991330b.entry.js +1 -0
  238. package/dist/vviinn-widgets/p-da9c933b.entry.js +1 -0
  239. package/dist/vviinn-widgets/p-ee46fc83.js +1 -0
  240. package/dist/vviinn-widgets/p-f41e25f0.entry.js +1 -0
  241. package/dist/vviinn-widgets/vviinn-widgets.css +1 -6
  242. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -125
  243. package/package.json +1 -1
  244. package/www/build/index.esm.js +0 -1
  245. package/www/build/p-118ac907.js +1 -0
  246. package/www/build/p-11f61564.js +1 -0
  247. package/www/build/p-39fdc5c9.entry.js +1 -0
  248. package/www/build/p-762dc067.entry.js +1 -0
  249. package/www/build/p-7e2f542c.js +1 -0
  250. package/www/build/p-8d56e795.entry.js +1 -0
  251. package/www/build/p-8f955b15.entry.js +1 -0
  252. package/www/build/p-9654fe35.entry.js +1 -0
  253. package/www/build/p-9e5adc42.js +1 -0
  254. package/www/build/p-a67898be.css +1 -0
  255. package/www/build/p-b3731705.entry.js +1 -0
  256. package/www/build/p-bad1809f.js +1 -0
  257. package/www/build/p-c36546fa.js +15 -0
  258. package/www/build/p-cfd998c1.js +1 -0
  259. package/www/build/p-d991330b.entry.js +1 -0
  260. package/www/build/p-da9c933b.entry.js +1 -0
  261. package/www/build/p-ee46fc83.js +1 -0
  262. package/www/build/p-f41e25f0.entry.js +1 -0
  263. package/www/build/vviinn-widgets.css +1 -6
  264. package/www/build/vviinn-widgets.esm.js +1 -125
  265. package/www/index.html +1 -12
  266. package/dist/vviinn-widgets/Array-c4dc02db.js +0 -4295
  267. package/dist/vviinn-widgets/Handler-47db9890.js +0 -1428
  268. package/dist/vviinn-widgets/NonEmptyArray-65395d97.js +0 -4370
  269. package/dist/vviinn-widgets/css-shim-f0027935.js +0 -4
  270. package/dist/vviinn-widgets/dom-db0073f0.js +0 -73
  271. package/dist/vviinn-widgets/highlight-box.entry.js +0 -41
  272. package/dist/vviinn-widgets/image-cropper.entry.js +0 -118
  273. package/dist/vviinn-widgets/index-c8128606.js +0 -3010
  274. package/dist/vviinn-widgets/number-a80a4b3c.js +0 -1533
  275. package/dist/vviinn-widgets/search-filters.entry.js +0 -76
  276. package/dist/vviinn-widgets/shadow-css-c1fdfa9f.js +0 -389
  277. package/dist/vviinn-widgets/vviinn-carousel.entry.js +0 -210
  278. package/dist/vviinn-widgets/vviinn-detected-object.entry.js +0 -54
  279. package/dist/vviinn-widgets/vviinn-empty-results.entry.js +0 -16
  280. package/dist/vviinn-widgets/vviinn-example-image.entry.js +0 -38
  281. package/dist/vviinn-widgets/vviinn-example-images.entry.js +0 -28
  282. package/dist/vviinn-widgets/vviinn-image-selector.entry.js +0 -31
  283. package/dist/vviinn-widgets/vviinn-image-view.entry.js +0 -55
  284. package/dist/vviinn-widgets/vviinn-modal.entry.js +0 -30
  285. package/dist/vviinn-widgets/vviinn-onboarding-card-1.entry.js +0 -21
  286. package/dist/vviinn-widgets/vviinn-onboarding-card-2.entry.js +0 -21
  287. package/dist/vviinn-widgets/vviinn-onboarding-card-3.entry.js +0 -21
  288. package/dist/vviinn-widgets/vviinn-onboarding.entry.js +0 -20
  289. package/dist/vviinn-widgets/vviinn-overlay.entry.js +0 -15
  290. package/dist/vviinn-widgets/vviinn-overlayed-modal.entry.js +0 -18
  291. package/dist/vviinn-widgets/vviinn-privacy-badge.entry.js +0 -20
  292. package/dist/vviinn-widgets/vviinn-product-card.entry.js +0 -184
  293. package/dist/vviinn-widgets/vviinn-server-error.entry.js +0 -16
  294. package/dist/vviinn-widgets/vviinn-slide.entry.js +0 -15
  295. package/dist/vviinn-widgets/vviinn-slider.entry.js +0 -120
  296. package/dist/vviinn-widgets/vviinn-teaser.entry.js +0 -20
  297. package/dist/vviinn-widgets/vviinn-vpr-widget.entry.js +0 -4581
  298. package/dist/vviinn-widgets/vviinn-wrong-format.entry.js +0 -16
  299. package/www/build/Array-c4dc02db.js +0 -4295
  300. package/www/build/Handler-47db9890.js +0 -1428
  301. package/www/build/NonEmptyArray-65395d97.js +0 -4370
  302. package/www/build/css-shim-f0027935.js +0 -4
  303. package/www/build/dom-db0073f0.js +0 -73
  304. package/www/build/highlight-box.entry.js +0 -41
  305. package/www/build/index-c8128606.js +0 -3010
  306. package/www/build/number-a80a4b3c.js +0 -1533
  307. package/www/build/search-filters.entry.js +0 -76
  308. package/www/build/shadow-css-c1fdfa9f.js +0 -389
  309. package/www/build/vviinn-detected-object.entry.js +0 -54
  310. package/www/build/vviinn-empty-results.entry.js +0 -16
  311. package/www/build/vviinn-example-image.entry.js +0 -38
  312. package/www/build/vviinn-example-images.entry.js +0 -28
  313. package/www/build/vviinn-image-selector.entry.js +0 -31
  314. package/www/build/vviinn-image-view.entry.js +0 -55
  315. package/www/build/vviinn-modal.entry.js +0 -30
  316. package/www/build/vviinn-onboarding-card-1.entry.js +0 -21
  317. package/www/build/vviinn-onboarding-card-2.entry.js +0 -21
  318. package/www/build/vviinn-onboarding-card-3.entry.js +0 -21
  319. package/www/build/vviinn-onboarding.entry.js +0 -20
  320. package/www/build/vviinn-overlay.entry.js +0 -15
  321. package/www/build/vviinn-overlayed-modal.entry.js +0 -18
  322. package/www/build/vviinn-privacy-badge.entry.js +0 -20
  323. package/www/build/vviinn-product-card.entry.js +0 -184
  324. package/www/build/vviinn-server-error.entry.js +0 -16
  325. package/www/build/vviinn-slide.entry.js +0 -15
  326. package/www/build/vviinn-slider.entry.js +0 -120
  327. package/www/build/vviinn-teaser.entry.js +0 -20
  328. package/www/build/vviinn-vpr-widget.entry.js +0 -4581
  329. package/www/build/vviinn-vps-button.entry.js +0 -39
  330. package/www/build/vviinn-wrong-format.entry.js +0 -16
@@ -0,0 +1,34 @@
1
+ import { Component, Host, h, Event } from "@stencil/core";
2
+ export class VviinnWrongFormat {
3
+ render() {
4
+ return (h(Host, null,
5
+ h("vviinn-error", null,
6
+ h("h4", { slot: "title" }, "Dateityp wird nicht unterst\u00FCtzt"),
7
+ h("span", { slot: "text" }, "Leider unterst\u00FCtzen wir dieses Format nicht. Bitte laden Sie eine .jpg, .png oder .webp Bilddatei hoch."),
8
+ h("button", { slot: "action", onClick: () => this.actionClick.emit() }, "Neues Bild hochladen"))));
9
+ }
10
+ static get is() { return "vviinn-wrong-format"; }
11
+ static get encapsulation() { return "shadow"; }
12
+ static get originalStyleUrls() { return {
13
+ "$": ["vviinn-wrong-format.css"]
14
+ }; }
15
+ static get styleUrls() { return {
16
+ "$": ["vviinn-wrong-format.css"]
17
+ }; }
18
+ static get events() { return [{
19
+ "method": "actionClick",
20
+ "name": "actionClick",
21
+ "bubbles": true,
22
+ "cancelable": true,
23
+ "composed": true,
24
+ "docs": {
25
+ "tags": [],
26
+ "text": ""
27
+ },
28
+ "complexType": {
29
+ "original": "void",
30
+ "resolved": "void",
31
+ "references": {}
32
+ }
33
+ }]; }
34
+ }
@@ -0,0 +1,34 @@
1
+ :host {
2
+ display: block;
3
+ margin-bottom: 8px;
4
+ position: relative;
5
+ }
6
+
7
+ img {
8
+ width: 100%;
9
+ height: auto;
10
+ cursor: pointer;
11
+ }
12
+
13
+ .image-preloader {
14
+ background: rgba(0, 0, 0, 0.25);
15
+ border-radius: 4px;
16
+ bottom: 12px;
17
+ display: none;
18
+ padding: 4px 6px;
19
+ pointer-events: none;
20
+ position: absolute;
21
+ right: 12px;
22
+ z-index: 4;
23
+ }
24
+
25
+ vviinn-preloader {
26
+ --preloader-size: 12px;
27
+ }
28
+
29
+ @media (max-width: 640px) {
30
+ .image-preloader {
31
+ display: block;
32
+ }
33
+ }
34
+
@@ -0,0 +1,129 @@
1
+ import { Component, Host, h, Prop, Event, State, } from "@stencil/core";
2
+ import { pipe } from "fp-ts/lib/function";
3
+ import { toFile } from "../../../Image/toFile";
4
+ import { imageSearchState, processSelectedFile, } from "../../../store/imageSearch.store";
5
+ import * as E from "fp-ts/lib/Either";
6
+ export class VviinnExampleImage {
7
+ constructor() {
8
+ this.src = "";
9
+ this.width = 0;
10
+ this.height = 0;
11
+ this.selected = false;
12
+ }
13
+ async selectImage(_event) {
14
+ this.selected = true;
15
+ const file = await toFile(this.src);
16
+ const processResult = await processSelectedFile(file);
17
+ pipe(processResult, E.match(() => this.exampleImageError.emit(), () => this.exampleImageSelected.emit()));
18
+ this.selected = false;
19
+ }
20
+ showPreloader() {
21
+ return ((imageSearchState.objectDetectionInProgress ||
22
+ imageSearchState.loading) &&
23
+ this.selected);
24
+ }
25
+ render() {
26
+ return (h(Host, null,
27
+ this.showPreloader() ? (h("div", { class: "image-preloader" },
28
+ h("vviinn-preloader", null))) : null,
29
+ h("img", { onClick: (ev) => this.selectImage(ev), src: this.src, width: this.width, height: this.height })));
30
+ }
31
+ static get is() { return "vviinn-example-image"; }
32
+ static get encapsulation() { return "shadow"; }
33
+ static get originalStyleUrls() { return {
34
+ "$": ["vviinn-example-image.css"]
35
+ }; }
36
+ static get styleUrls() { return {
37
+ "$": ["vviinn-example-image.css"]
38
+ }; }
39
+ static get properties() { return {
40
+ "src": {
41
+ "type": "string",
42
+ "mutable": false,
43
+ "complexType": {
44
+ "original": "string",
45
+ "resolved": "string",
46
+ "references": {}
47
+ },
48
+ "required": false,
49
+ "optional": false,
50
+ "docs": {
51
+ "tags": [],
52
+ "text": ""
53
+ },
54
+ "attribute": "src",
55
+ "reflect": false,
56
+ "defaultValue": "\"\""
57
+ },
58
+ "width": {
59
+ "type": "number",
60
+ "mutable": false,
61
+ "complexType": {
62
+ "original": "number",
63
+ "resolved": "number",
64
+ "references": {}
65
+ },
66
+ "required": false,
67
+ "optional": false,
68
+ "docs": {
69
+ "tags": [],
70
+ "text": ""
71
+ },
72
+ "attribute": "width",
73
+ "reflect": false,
74
+ "defaultValue": "0"
75
+ },
76
+ "height": {
77
+ "type": "number",
78
+ "mutable": false,
79
+ "complexType": {
80
+ "original": "number",
81
+ "resolved": "number",
82
+ "references": {}
83
+ },
84
+ "required": false,
85
+ "optional": false,
86
+ "docs": {
87
+ "tags": [],
88
+ "text": ""
89
+ },
90
+ "attribute": "height",
91
+ "reflect": false,
92
+ "defaultValue": "0"
93
+ }
94
+ }; }
95
+ static get states() { return {
96
+ "selected": {}
97
+ }; }
98
+ static get events() { return [{
99
+ "method": "exampleImageSelected",
100
+ "name": "exampleImageSelected",
101
+ "bubbles": true,
102
+ "cancelable": true,
103
+ "composed": true,
104
+ "docs": {
105
+ "tags": [],
106
+ "text": ""
107
+ },
108
+ "complexType": {
109
+ "original": "void",
110
+ "resolved": "void",
111
+ "references": {}
112
+ }
113
+ }, {
114
+ "method": "exampleImageError",
115
+ "name": "exampleImageError",
116
+ "bubbles": true,
117
+ "cancelable": true,
118
+ "composed": true,
119
+ "docs": {
120
+ "tags": [],
121
+ "text": ""
122
+ },
123
+ "complexType": {
124
+ "original": "void",
125
+ "resolved": "void",
126
+ "references": {}
127
+ }
128
+ }]; }
129
+ }
@@ -0,0 +1,19 @@
1
+ :host {
2
+ }
3
+
4
+ h3 {
5
+ font-size: 22px;
6
+ font-weight: 600;
7
+ line-height: 32px;
8
+ margin: 0;
9
+ margin-bottom: 16px;
10
+ text-align: center;
11
+ }
12
+
13
+ .images {
14
+ display: block;
15
+ -moz-column-count: 2;
16
+ column-count: 2;
17
+ -moz-column-gap: 16px;
18
+ column-gap: 16px;
19
+ }
@@ -0,0 +1,80 @@
1
+ import { Component, Host, h, Event, Listen, Element } from "@stencil/core";
2
+ import { slotChangeListener } from "../customized-slots";
3
+ export class VviinnExampleImages {
4
+ handleImageSelection() {
5
+ this.imageSelected.emit();
6
+ }
7
+ handleImageSelectionError() {
8
+ this.imageSelectedError.emit();
9
+ }
10
+ componentWillLoad() {
11
+ slotChangeListener(this, this.el);
12
+ }
13
+ render() {
14
+ return (h(Host, null,
15
+ h("slot", { name: "vviinn-example-images-title" },
16
+ h("h3", null, "Mit den Beispielbildern die Suche direkt ausprobieren")),
17
+ h("div", { class: "images" },
18
+ h("slot", { name: "vviinn-example-images-1" },
19
+ h("vviinn-example-image", { width: 480, height: 640, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDEtTC5qcGc=" })),
20
+ h("slot", { name: "vviinn-example-images-2" },
21
+ h("vviinn-example-image", { width: 280, height: 480, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDItTS5qcGc=" })),
22
+ h("slot", { name: "vviinn-example-images-3" },
23
+ h("vviinn-example-image", { width: 280, height: 480, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDMtTS5qcGc=" })),
24
+ h("slot", { name: "vviinn-example-images-4" },
25
+ h("vviinn-example-image", { width: 480, height: 640, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDQtTC5qcGc=" })))));
26
+ }
27
+ static get is() { return "vviinn-example-images"; }
28
+ static get encapsulation() { return "shadow"; }
29
+ static get originalStyleUrls() { return {
30
+ "$": ["vviinn-example-images.css"]
31
+ }; }
32
+ static get styleUrls() { return {
33
+ "$": ["vviinn-example-images.css"]
34
+ }; }
35
+ static get events() { return [{
36
+ "method": "imageSelected",
37
+ "name": "imageSelected",
38
+ "bubbles": true,
39
+ "cancelable": true,
40
+ "composed": true,
41
+ "docs": {
42
+ "tags": [],
43
+ "text": ""
44
+ },
45
+ "complexType": {
46
+ "original": "void",
47
+ "resolved": "void",
48
+ "references": {}
49
+ }
50
+ }, {
51
+ "method": "imageSelectedError",
52
+ "name": "imageSelectedError",
53
+ "bubbles": true,
54
+ "cancelable": true,
55
+ "composed": true,
56
+ "docs": {
57
+ "tags": [],
58
+ "text": ""
59
+ },
60
+ "complexType": {
61
+ "original": "void",
62
+ "resolved": "void",
63
+ "references": {}
64
+ }
65
+ }]; }
66
+ static get elementRef() { return "el"; }
67
+ static get listeners() { return [{
68
+ "name": "exampleImageSelected",
69
+ "method": "handleImageSelection",
70
+ "target": undefined,
71
+ "capture": false,
72
+ "passive": false
73
+ }, {
74
+ "name": "exampleImageError",
75
+ "method": "handleImageSelectionError",
76
+ "target": undefined,
77
+ "capture": false,
78
+ "passive": false
79
+ }]; }
80
+ }
@@ -1,31 +1,28 @@
1
- import { h } from './index-c8128606.js';
2
-
3
- const ArrowIcon = () => (h("svg", { width: "12", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1
+ import { h } from "@stencil/core";
2
+ export const ArrowIcon = () => (h("svg", { width: "12", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
4
3
  h("path", { d: "M0 10 10 0l1.4 1.4L2.8 10l8.6 8.6L10 20 0 10Z" })));
5
- const CameraIcon = () => (h("svg", { width: "22", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
4
+ export const CameraIcon = () => (h("svg", { width: "22", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
6
5
  h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M16.567 3H19A3.01 3.01 0 0 1 22 6v7.69h-2V6c0-.55-.451-1-1.001-1h-3.502l-2.03-3H8.543L6.603 5H3.001c-.55 0-1 .45-1 1v11c0 .55.45 1 1 1h5.933v2H3.001A3.01 3.01 0 0 1 0 17V6c0-1.65 1.35-3 3.001-3h2.522l1.94-3h7.074l2.03 3Zm-5.562 3c1.28 0 2.561.48 3.542 1.46h-.01a4.992 4.992 0 0 1 .64 6.29l3.051 3.05-1.41 1.41-3.052-3.05c-.84.55-1.8.83-2.76.83-1.282 0-2.562-.48-3.543-1.46a5.002 5.002 0 0 1 0-7.07A5.026 5.026 0 0 1 11.005 6Zm-2.771 5a2.763 2.763 0 0 0 2.771 2.77A2.763 2.763 0 0 0 13.776 11a2.763 2.763 0 0 0-2.771-2.77A2.763 2.763 0 0 0 8.234 11Z", fill: "#161616" })));
7
- const OnboardingCard1Icon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "120", height: "120", fill: "none" },
6
+ export const OnboardingCard1Icon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "120", height: "120", fill: "none" },
8
7
  h("defs", null),
9
8
  h("path", { fill: "#393939", d: "M74.55 20a5.06 5.06 0 014.14 2l4.72 9.32.1.18.11.17A5.07 5.07 0 0087.93 34h13.87c5.07 0 9.2 3.59 9.2 8v50c0 4.41-4.13 8-9.2 8H18.2c-5.07 0-9.2-3.59-9.2-8V42c0-4.41 4.13-8 9.2-8h13.87a5.072 5.072 0 004.31-2.34l.11-.17.1-.18L41.31 22a5.06 5.06 0 014.14-2h29.1zm0-4h-29.1a9 9 0 00-7.6 4L33 29.5a1.13 1.13 0 01-1 .5H18.2C10.91 30 5 35.37 5 42v50c0 6.63 5.91 12 13.2 12h83.6c7.29 0 13.2-5.37 13.2-12V42c0-6.63-5.91-12-13.2-12H87.93a1.13 1.13 0 01-1-.5L82.15 20a9 9 0 00-7.6-4z" }),
10
9
  h("path", { fill: "#393939", d: "M96 46a4 4 0 110 8 4 4 0 010-8zm0-4a8 8 0 100 16.001A8 8 0 0096 42z" }),
11
10
  h("path", { class: "colored", d: "M60 42a24 24 0 100 48.001A24 24 0 0060 42zm12 26H62v10a2 2 0 01-4 0V68H48a2 2 0 010-4h10V54a2 2 0 014 0v10h10a2 2 0 110 4z" })));
12
- const OnboardingCard2Icon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "120", height: "120", fill: "none" },
11
+ export const OnboardingCard2Icon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "120", height: "120", fill: "none" },
13
12
  h("defs", null),
14
13
  h("path", { fill: "#393939", d: "M110.35 96.52l-24.8-22.66a6.22 6.22 0 00-8.14-.27l-.09.07-10.57 8.93-18.33-17.88a6.001 6.001 0 00-8.51-.35L8.69 91.49a2 2 0 002.62 3l31.3-27.2a2 2 0 012.233-.359 2 2 0 01.637.479l.1.1 45 43.9a2.005 2.005 0 002.83-.03 2.003 2.003 0 00-.03-2.83L69.63 85.39l10.22-8.63a2.3 2.3 0 013 .07l24.77 22.65c.377.343.871.529 1.38.52a2 2 0 001.35-3.48zM75 31a10 10 0 110 20 10 10 0 010-20zm0-4a14 14 0 100 28 14 14 0 000-28z" }),
15
14
  h("path", { class: "colored", d: "M12 36H8V20A12 12 0 0120 8h16v4H20a8 8 0 00-8 8v16zM112 36h-4V20a8.001 8.001 0 00-8-8H84V8h16a11.998 11.998 0 0112 12v16zM36 112H20a11.998 11.998 0 01-12-12V84h4v16a8 8 0 008 8h16v4zM100 112H84v-4h16a8 8 0 008-8V84h4v16c0 3.183-1.264 6.235-3.515 8.485A11.996 11.996 0 01100 112z" })));
16
- const OnboardingCard3Icon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "120", height: "120", fill: "none" },
15
+ export const OnboardingCard3Icon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "120", height: "120", fill: "none" },
17
16
  h("defs", null),
18
17
  h("path", { class: "colored", d: "M84.09 43.24a.53.53 0 00-.29-.48L60.28 29.4a.522.522 0 00-.27-.07.531.531 0 00-.28.07L36.2 42.76a.54.54 0 000 1l23.53 13.3a.54.54 0 00.55 0L83.8 43.72a.53.53 0 00.29-.48zM57.28 61.23L33.73 47.88a.569.569 0 00-.85.48V75a.54.54 0 00.29.48L56.72 88.8a.56.56 0 00.56 0 .53.53 0 00.28-.48V61.71a.56.56 0 00-.28-.48zM86.84 47.88a.63.63 0 00-.29-.08.55.55 0 00-.28.08L62.73 61.23a.56.56 0 00-.28.48v26.61a.53.53 0 00.28.48.56.56 0 00.56 0l23.54-13.29a.54.54 0 00.29-.48V48.36a.55.55 0 00-.28-.48z" }),
19
18
  h("path", { class: "colored", d: "M100 7.94H20a12 12 0 00-12 12v80a11.998 11.998 0 0012 12h80c3.183 0 6.235-1.264 8.485-3.515A11.996 11.996 0 00112 99.94v-80a11.998 11.998 0 00-12-12zm-8 69.24a1.69 1.69 0 01-.85 1.45l-30.31 17.1a1.77 1.77 0 01-1.67 0l-30.32-17.1a1.689 1.689 0 01-.85-1.45V42.82a1.66 1.66 0 01.85-1.45l30.32-17.21a1.71 1.71 0 011.67 0l30.31 17.21a1.67 1.67 0 01.85 1.45v34.36z" })));
20
- const CheckIcon = () => (h("svg", { width: "14", height: "11", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
19
+ export const CheckIcon = () => (h("svg", { width: "14", height: "11", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
21
20
  h("path", { d: "M5 10.414 0 5.413 1.413 4 5 7.586 12.585 0 14 1.415l-9 8.999Z", fill: "var(--color-primary, var(--color-primary-system))" })));
22
- const LoaderIcon = () => (h("svg", { width: "100%", height: "100%", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 28 28" },
21
+ export const LoaderIcon = () => (h("svg", { width: "100%", height: "100%", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 28 28" },
23
22
  h("path", { fill: "#fff", d: "M23,14a9,9,0,1,1-9-9V2A12,12,0,1,0,26,14Z" })));
24
- const ChevronIcon = () => (h("svg", { width: "9", height: "16", xmlns: "http://www.w3.org/2000/svg" },
23
+ export const ChevronIcon = () => (h("svg", { width: "9", height: "16", xmlns: "http://www.w3.org/2000/svg" },
25
24
  h("path", { d: "m9 8-7.895 8L0 14.88 6.79 8 0 1.12 1.105 0 9 8Z" })));
26
- const VisualSearchIcon = () => (h("svg", { width: "20", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
25
+ export const VisualSearchIcon = () => (h("svg", { width: "20", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
27
26
  h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M5 2C3.35 2 2 3.35 2 5v2H0V5c0-2.76 2.24-5 5-5h2v2H5Zm5 3c1.28 0 2.56.48 3.54 1.46h-.01a4.994 4.994 0 0 1 .64 6.29l3.05 3.05-1.41 1.41-3.05-3.05c-.84.55-1.8.83-2.76.83a4.98 4.98 0 0 1-3.54-1.46 5.003 5.003 0 0 1 0-7.07C7.44 5.49 8.72 5 10 5Zm-2.77 5c0 .74.29 1.44.81 1.96s1.22.81 1.96.81 1.44-.29 1.96-.81.81-1.22.81-1.96-.29-1.44-.81-1.96-1.22-.81-1.96-.81-1.44.29-1.96.81-.81 1.22-.81 1.96ZM2 15v-2H0v2c0 2.76 2.24 5 5 5h2v-2H5c-1.65 0-3-1.35-3-3ZM13 0h2c2.76 0 5 2.24 5 5v2h-2V5c0-1.65-1.35-3-3-3h-2V0Z", fill: "#161616" })));
28
- const CrossIcon = () => (h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
27
+ export const CrossIcon = () => (h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
29
28
  h("path", { d: "M16 1.4L14.6 0L8 6.6L1.4 0L0 1.4L6.6 8L0 14.6L1.4 16L8 9.4L14.6 16L16 14.6L9.4 8L16 1.4Z", fill: "#161616" })));
30
-
31
- export { ArrowIcon as A, CameraIcon as C, OnboardingCard1Icon as O, VisualSearchIcon as V, CrossIcon as a, CheckIcon as b, ChevronIcon as c, OnboardingCard2Icon as d, OnboardingCard3Icon as e };
@@ -0,0 +1,25 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+
5
+ :host(::hover) {
6
+ background: whitesmoke;
7
+ }
8
+
9
+ .visually-hidden {
10
+ clip: rect(0 0 0 0);
11
+ -webkit-clip-path: inset(50%);
12
+ clip-path: inset(50%);
13
+ height: 1px;
14
+ overflow: hidden;
15
+ position: absolute;
16
+ white-space: nowrap;
17
+ width: 1px;
18
+ }
19
+
20
+ label {
21
+ cursor: pointer;
22
+ display: grid;
23
+ padding: 0.5rem;
24
+ transition: background 0.1s ease-in-out;
25
+ }
@@ -0,0 +1,64 @@
1
+ import { Component, Host, h, Event } from "@stencil/core";
2
+ import * as E from "fp-ts/Either";
3
+ import { pipe } from "fp-ts/lib/function";
4
+ import { imageSearchState, processSelectedFile, } from "../../store/imageSearch.store";
5
+ /**
6
+ * @part button - button look and feel
7
+ */
8
+ export class VviinnImageSelector {
9
+ async handleInputChange(event) {
10
+ const input = event.target;
11
+ const processingResult = await processSelectedFile(input.files[0]);
12
+ pipe(processingResult, E.match(() => this.imageSelectedError.emit(), () => this.imageSelected.emit()));
13
+ input.value = null;
14
+ }
15
+ isLoading() {
16
+ return (imageSearchState.loading || imageSearchState.objectDetectionInProgress);
17
+ }
18
+ render() {
19
+ return (h(Host, { exportparts: "button" },
20
+ this.isLoading() ? h("vviinn-preloader", null) : null,
21
+ this.isLoading() ? null : (h("label", { htmlFor: "fileInput", part: "button" },
22
+ h("slot", { name: "upload-button-text" }, "Upload image"))),
23
+ h("input", { id: "fileInput", class: "visually-hidden", type: "file", accept: "image/*", onChange: (event) => this.handleInputChange(event) })));
24
+ }
25
+ static get is() { return "vviinn-image-selector"; }
26
+ static get encapsulation() { return "shadow"; }
27
+ static get originalStyleUrls() { return {
28
+ "$": ["vviinn-image-selector.css"]
29
+ }; }
30
+ static get styleUrls() { return {
31
+ "$": ["vviinn-image-selector.css"]
32
+ }; }
33
+ static get events() { return [{
34
+ "method": "imageSelected",
35
+ "name": "imageSelected",
36
+ "bubbles": true,
37
+ "cancelable": true,
38
+ "composed": true,
39
+ "docs": {
40
+ "tags": [],
41
+ "text": "Event fires when user select file"
42
+ },
43
+ "complexType": {
44
+ "original": "void",
45
+ "resolved": "void",
46
+ "references": {}
47
+ }
48
+ }, {
49
+ "method": "imageSelectedError",
50
+ "name": "imageSelectedError",
51
+ "bubbles": true,
52
+ "cancelable": true,
53
+ "composed": true,
54
+ "docs": {
55
+ "tags": [],
56
+ "text": "Event fires when user select file that no .jpg, .jpeg or png"
57
+ },
58
+ "complexType": {
59
+ "original": "void",
60
+ "resolved": "void",
61
+ "references": {}
62
+ }
63
+ }]; }
64
+ }
@@ -0,0 +1,47 @@
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
+ --size: 32px;
11
+ --x-position: 0;
12
+ --y-position: 0;
13
+
14
+ background: rgba(22, 22, 22, 0.5);
15
+ border-radius: 50%;
16
+ border: none;
17
+ cursor: pointer;
18
+ display: block;
19
+ height: var(--size);
20
+ position: absolute;
21
+ transition: opacity 0.25s;
22
+ width: var(--size);
23
+ z-index: 2;
24
+ transform: translate(calc(var(--x-position) - (var(--size) * 0.5)), calc(var(--y-position) - (var(--size) * 0.5)));
25
+ transition: background 0.1 ease-in-out;
26
+ }
27
+
28
+ :host(:hover) {
29
+ background: rgba(22, 22, 22, 0.75);
30
+ }
31
+
32
+ :host(.active) {
33
+ background: var(--color-primary, var(--color-primary-system))!important;
34
+ border: 2px solid white;
35
+ }
36
+
37
+ :host::after {
38
+ --size: 32px;
39
+ border-radius: 50%;
40
+ content: "";
41
+ cursor: pointer;
42
+ display: block;
43
+ height: calc(var(--size) * 0.25);
44
+ transform: translate(calc(-50% + var(--size) * 0.5), calc(-50% + var(--size) * 0.5));
45
+ width: calc(var(--size) * 0.25);
46
+ background: white;
47
+ }
@@ -0,0 +1,100 @@
1
+ import { Component, Host, h, State, Prop, Event } from "@stencil/core";
2
+ import { pipe } from "fp-ts/lib/function";
3
+ import * as O from "fp-ts/lib/Option";
4
+ import { foldValueObject } from "../../../network/ion/ValueObject";
5
+ import { detectedObjectEq, } from "../../../searchSession/searchSession";
6
+ import { fromAlt, scaleWithSized, center } from "../../../geometry/Rectangle";
7
+ import { imageSearchState, makeRectangularSearchRequest, } from "../../../store/imageSearch.store";
8
+ export class VviinnDetectedObject {
9
+ constructor() {
10
+ this.position = ["0", "0"];
11
+ }
12
+ getObjectPosition() {
13
+ return pipe(imageSearchState.imageBounds, O.map((bounds) => {
14
+ const objectRectangle = fromAlt(foldValueObject(this.detectedObject).rectangle);
15
+ const { x, y } = pipe(objectRectangle, scaleWithSized(bounds), center);
16
+ return [`${x}px`, `${y}px`];
17
+ }), O.getOrElse(() => ["0", "0"]));
18
+ }
19
+ selectDetectedObject() {
20
+ pipe(imageSearchState.imageBounds, O.map((bounds) => {
21
+ const rectangle = foldValueObject(this.detectedObject).rectangle;
22
+ const transformedRect = fromAlt(rectangle);
23
+ const scaledRect = scaleWithSized(bounds)(transformedRect);
24
+ imageSearchState.detectedObject = this.detectedObject;
25
+ imageSearchState.searchArea = O.some(scaledRect);
26
+ }));
27
+ makeRectangularSearchRequest();
28
+ this.detectedObjectClicked.emit();
29
+ }
30
+ isActive() {
31
+ if (!this.detectedObject)
32
+ return false;
33
+ if (!imageSearchState.detectedObject)
34
+ return false;
35
+ const thisObject = foldValueObject(this.detectedObject);
36
+ const savedObject = foldValueObject(imageSearchState.detectedObject);
37
+ return detectedObjectEq.equals(thisObject, savedObject);
38
+ }
39
+ render() {
40
+ return (h(Host, { class: {
41
+ active: this.isActive(),
42
+ }, onClick: () => this.selectDetectedObject(), style: {
43
+ "--x-position": this.getObjectPosition()[0],
44
+ "--y-position": this.getObjectPosition()[1],
45
+ } }));
46
+ }
47
+ static get is() { return "vviinn-detected-object"; }
48
+ static get encapsulation() { return "shadow"; }
49
+ static get originalStyleUrls() { return {
50
+ "$": ["vviinn-detected-object.css"]
51
+ }; }
52
+ static get styleUrls() { return {
53
+ "$": ["vviinn-detected-object.css"]
54
+ }; }
55
+ static get properties() { return {
56
+ "detectedObject": {
57
+ "type": "unknown",
58
+ "mutable": false,
59
+ "complexType": {
60
+ "original": "ValueObject<DetectedObject>",
61
+ "resolved": "Valueable<DetectedObject> & Partial<MemberObject> & Partial<Linked>",
62
+ "references": {
63
+ "ValueObject": {
64
+ "location": "import",
65
+ "path": "../../../network/ion/ValueObject"
66
+ },
67
+ "DetectedObject": {
68
+ "location": "import",
69
+ "path": "../../../searchSession/searchSession"
70
+ }
71
+ }
72
+ },
73
+ "required": false,
74
+ "optional": false,
75
+ "docs": {
76
+ "tags": [],
77
+ "text": ""
78
+ }
79
+ }
80
+ }; }
81
+ static get states() { return {
82
+ "position": {}
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
+ }]; }
100
+ }
@@ -0,0 +1,31 @@
1
+ :host {
2
+ display: grid;
3
+ position: relative;
4
+ justify-self: center;
5
+ }
6
+
7
+ img {
8
+ box-sizing: border-box;
9
+ filter: brightness(60%);
10
+ position: relative;
11
+ -webkit-user-select: none;
12
+ -moz-user-select: none;
13
+ -ms-user-select: none;
14
+ user-select: none;
15
+ z-index: -1;
16
+ }
17
+
18
+ .image-preloader {
19
+ background: rgba(0, 0, 0, 0.25);
20
+ border-radius: 4px;
21
+ bottom: 18px;
22
+ padding: 4px 6px;
23
+ pointer-events: none;
24
+ position: absolute;
25
+ right: 18px;
26
+ z-index: 4;
27
+ }
28
+
29
+ vviinn-preloader {
30
+ --preloader-size: 12px;
31
+ }