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 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.1" viewBox="0 0 48 48"><title>illustration/flow</title><g id="illustration/flow" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Combined-Shape" fill="#79C9FC" fill-rule="nonzero" d="M30,29 C32.7614237,29 35,26.7614237 35,24 C35,14.6111593 27.3888407,7 18,7 C8.61115925,7 1,14.6111593 1,24 C1,33.3888407 8.61115925,41 18,41 C19.3333404,41 20.6447683,40.8466238 21.9154603,40.5471706 C19.5096374,39.3319645 17.5510566,37.8612875 16.0456579,36.1314815 C14.1063138,33.9030427 12.769443,31.0725999 12.0293806,27.6556449 C11.360469,26.565281 11,25.3082308 11,24 C11,20.1340068 14.1340068,17 18,17 C21.8659932,17 25,20.1340068 25,24 C25,26.125 27.7040312,29 30,29 Z"/><path id="Combined-Shape-Copy" fill="#FFC445" fill-rule="nonzero" d="M42,29 C44.7614237,29 47,26.7614237 47,24 C47,14.6111593 39.3888407,7 30,7 C20.6111593,7 13,14.6111593 13,24 C13,33.3888407 20.6111593,41 30,41 C31.3333404,41 32.6447683,40.8466238 33.9154603,40.5471706 C31.5096374,39.3319645 29.4051056,37.9781963 28.0456579,36.1314815 C26.0625,33.4375 23,27.1875 23,24 C23,20.1340068 26.1340068,17 30,17 C33.8659932,17 37,20.1340068 37,24 C37.02301,26.3435241 39.7040312,29 42,29 Z" transform="translate(30.000000, 24.000000) scale(-1, -1) translate(-30.000000, -24.000000)"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.1" viewBox="0 0 48 48"><title>illustration/plugin</title><g id="illustration/plugin" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Combined-Shape" fill="#79C9FC" d="M26,15.3994248 C26,15.4091303 26,15.4188459 26,15.4285714 L26,21.4694881 C25.8463595,21.4969567 25.6941676,21.51275 25.5873784,21.51275 C25.4974117,21.51275 25.4230979,21.4768034 25.377756,21.4206259 L25.2660784,21.2822603 L25.1317423,21.1657666 C24.2436317,20.3956144 23.100098,19.9633214 21.895551,19.9633214 C19.2039137,19.9633214 17,22.1075558 17,24.7804643 C17,27.4533728 19.2039137,29.5976071 21.895551,29.5976071 C23.1972122,29.5976071 24.3149423,29.2878193 25.1231445,28.3613697 C25.4542273,27.9818463 25.568273,27.9073214 25.5873784,27.9073214 C25.681532,27.9073214 25.8352452,27.9239643 26,27.9524591 L26,32.5714286 C26,32.5811541 26,32.5908697 26,32.6005752 L26,33 C26,35.209139 24.209139,37 22,37 L4,37 C1.790861,37 0,35.209139 0,33 L0,15 C0,12.790861 1.790861,11 4,11 L22,11 C24.209139,11 26,12.790861 26,15 L26,15.3994248 Z"/><path id="Path" fill="#87E6E5" d="M27.9998779,32.5714286 C27.9998779,33.3604068 28.6572726,34 29.4682101,34 L46.5315458,34 C47.3424832,34 47.9998779,33.3604068 47.9998779,32.5714286 L47.9998779,15.4285714 C47.9998779,14.6395932 47.3424832,14 46.5315458,14 L29.4682101,14 C28.6572726,14 27.9998779,14.6395932 27.9998779,15.4285714 L27.9998779,21.8355216 C27.9334367,22.2650514 27.8567585,22.6454496 27.746391,22.8084643 C27.4245309,23.2838571 26.2402709,23.51275 25.5873784,23.51275 C24.8705773,23.51275 24.2322714,23.1857725 23.8214379,22.6767605 C23.3096996,22.2329909 22.6349941,21.9633214 21.895551,21.9633214 C20.2963823,21.9633214 19,23.2245992 19,24.7804643 C19,26.3363293 20.2963823,27.5976071 21.895551,27.5976071 C22.5398535,27.5976071 23.2399343,27.477727 23.6160247,27.0466112 C24.1396029,26.4464286 24.7367044,25.9073214 25.5873784,25.9073214 C26.2402709,25.9073214 27.5912951,26.1766031 27.8226692,26.6116071 C27.8819199,26.7230038 27.9403239,26.921677 27.9998779,27.1556219 L27.9998779,32.5714286 Z"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.1" viewBox="0 0 48 48"><title>illustration/repo</title><g id="illustration/repo" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Rectangle-62-Copy" fill="#B7F0EF" d="M27.2217723,9.04506931 L41.2217723,6.2682098 C43.3886973,5.83840648 45.4937616,7.2466219 45.9235649,9.41354696 C45.9743993,9.66983721 46,9.93049166 46,10.1917747 L46,32.581381 C46,34.4904961 44.650862,36.1335143 42.7782277,36.5049459 L28.7782277,39.2818054 C26.6113027,39.7116087 24.5062384,38.3033933 24.0764351,36.1364682 C24.0256007,35.880178 24,35.6195235 24,35.3582405 L24,12.9686342 C24,11.0595191 25.349138,9.4165009 27.2217723,9.04506931 Z" opacity=".7"/><path id="Combined-Shape" fill="#87E6E5" d="M6.77822775,6.2682098 L20.7782277,9.04506931 C22.650862,9.4165009 24,11.0595191 24,12.9686342 L24,35.3582405 C24,37.5673795 22.209139,39.3582405 20,39.3582405 C19.738717,39.3582405 19.4780625,39.3326398 19.2217723,39.2818054 L5.22177225,36.5049459 C3.34913798,36.1335143 2,34.4904961 2,32.581381 L2,10.1917747 C2,7.98263571 3.790861,6.19177471 6,6.19177471 C6.26128305,6.19177471 6.5219375,6.21737537 6.77822775,6.2682098 Z"/><path id="Rectangle-63-Copy-2" fill="#61C1FD" d="M22,10 C23.1666667,10.2291667 24.0179036,10.625 24.5537109,11.1875 C25.0895182,11.75 25.5716146,12.875 26,14.5625 C26,29.3020833 26,37.5208333 26,39.21875 C26,40.9166667 26.4241536,42.9583333 27.2724609,45.34375 L24.5537109,41.875 L22.9824219,45.34375 C22.327474,43.1979167 22,41.2291667 22,39.4375 C22,37.6458333 22,27.8333333 22,10 Z"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.1" viewBox="0 0 48 48"><title>illustration/stackalt</title><g id="illustration/stackalt" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Combined-Shape" fill="#FFAE00" d="M23.8628277,0 L23.8628277,48 L3.32291648,36.2491883 L3.32155653,11.9499781 L23.8628277,0 Z M23.8670509,0 L44.408322,11.9499781 L44.4069621,36.2491883 L23.8670509,48 L23.8670509,0 Z" opacity=".196"/><path id="Rectangle-46-Copy-3" fill="#66BF3C" d="M15.8232279,19.1155258 L24.7368455,21.4714881 C29.6053842,22.7582937 33.4077423,26.5606518 34.694548,31.4291905 L37.0505103,40.3428082 C37.6150232,42.4786032 36.3412474,44.6676353 34.2054524,45.2321482 C33.5569474,45.4035549 32.87575,45.4091235 32.2245294,45.2483418 L23.3459013,43.0562718 C18.2976962,41.809906 14.3561301,37.8683399 13.1097642,32.8201348 L10.9176943,23.9415066 C10.3881737,21.7967682 11.6975664,19.6288529 13.8423049,19.0993322 C14.4935255,18.9385505 15.1747229,18.9441191 15.8232279,19.1155258 Z" opacity=".5" transform="translate(23.999997, 32.166058) rotate(-45.000000) translate(-23.999997, -32.166058)"/><path id="Rectangle-46-Copy-2" fill="#FFAE00" d="M15.8232279,11.2216893 L24.7368455,13.5776516 C29.6053842,14.8644572 33.4077423,18.6668153 34.694548,23.5353541 L37.0505103,32.4489717 C37.6150232,34.5847667 36.3412474,36.7737988 34.2054524,37.3383117 C33.5569474,37.5097184 32.87575,37.515287 32.2245294,37.3545053 L23.3459013,35.1624353 C18.2976962,33.9160695 14.3561301,29.9745034 13.1097642,24.9262983 L10.9176943,16.0476701 C10.3881737,13.9029317 11.6975664,11.7350164 13.8423049,11.2054957 C14.4935255,11.044714 15.1747229,11.0502826 15.8232279,11.2216893 Z" opacity=".5" transform="translate(23.999997, 24.272222) rotate(-45.000000) translate(-23.999997, -24.272222)"/><path id="Rectangle-46-Copy" fill="#FC521F" d="M15.8232279,3.32785281 L24.7368455,5.68381509 C29.6053842,6.97062075 33.4077423,10.7729788 34.694548,15.6415176 L37.0505103,24.5551352 C37.6150232,26.6909302 36.3412474,28.8799623 34.2054524,29.4444752 C33.5569474,29.6158819 32.87575,29.6214505 32.2245294,29.4606688 L23.3459013,27.2685988 C18.2976962,26.022233 14.3561301,22.0806669 13.1097642,17.0324618 L10.9176943,8.15383364 C10.3881737,6.00909519 11.6975664,3.84117987 13.8423049,3.31165925 C14.4935255,3.15087753 15.1747229,3.15644615 15.8232279,3.32785281 Z" opacity=".5" transform="translate(23.999997, 16.378385) rotate(-45.000000) translate(-23.999997, -16.378385)"/></g></svg>
@@ -0,0 +1,6 @@
1
+ export default {
2
+ title: "Components/Image Selector",
3
+ component: "vviinn-image-selector",
4
+ };
5
+ const Template = () => "<vviinn-image-selector>lol</vviinn-image-selector>";
6
+ export const Default = Template.bind({});
@@ -0,0 +1,6 @@
1
+ export default {
2
+ title: "Components/Image View",
3
+ component: "vviinn-image-view",
4
+ };
5
+ const Template = () => "<vviinn-image-view />";
6
+ export const Default = Template.bind({});
@@ -0,0 +1,12 @@
1
+ export default {
2
+ title: "Components/Modal",
3
+ component: "vviinn-modal",
4
+ decorators: [
5
+ (story) => `<style>html { background: rgba(0,0,0,0.5) }</style>${story()}`,
6
+ ],
7
+ };
8
+ const Template = ({ active }) => `<vviinn-modal active=${active}>CONTENT</vviinn-modal>`;
9
+ export const Default = Template.bind({});
10
+ Default.args = {
11
+ active: true
12
+ };
@@ -0,0 +1,11 @@
1
+ export default {
2
+ title: "Components/Onboarding",
3
+ };
4
+ const Template = () => "<vviinn-onboarding />";
5
+ export const Default = Template.bind({});
6
+ Default.parameters = {
7
+ design: {
8
+ type: "figma",
9
+ url: "https://www.figma.com/file/ge0MfeOnlMqEboujuKvFyR/Visual-Intelligence?node-id=162%3A17",
10
+ },
11
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ title: 'Components/Overlay',
3
+ };
4
+ const Template = () => "<vviinn-overlay />";
5
+ export const Default = Template.bind({});
@@ -0,0 +1,8 @@
1
+ export default {
2
+ title: "Components/Overlayed Modal",
3
+ };
4
+ const Template = (args) => `<vviinn-overlayed-modal active="${args.active}">CONTENT</vviinn-overlayed-modal>`;
5
+ export const Default = Template.bind({});
6
+ Default.args = {
7
+ active: false,
8
+ };
@@ -0,0 +1,11 @@
1
+ export default {
2
+ title: "Components/Privacy badge",
3
+ };
4
+ const Template = () => "<vviinn-privacy-badge />";
5
+ export const Default = Template.bind({});
6
+ Default.parameters = {
7
+ design: {
8
+ type: "figma",
9
+ url: "https://www.figma.com/file/ge0MfeOnlMqEboujuKvFyR/Visual-Intelligence?node-id=162%3A17",
10
+ },
11
+ };
@@ -0,0 +1,17 @@
1
+ export default {
2
+ title: "Components/Slider",
3
+ };
4
+ const Template = () => `
5
+ <vviinn-slider>
6
+ <vviinn-slide>
7
+ Slide one
8
+ </vviinn-slide>
9
+ <vviinn-slide>
10
+ Slide two
11
+ </vviinn-slide>
12
+ <vviinn-slide>
13
+ Slide three
14
+ </vviinn-slide>
15
+ </vviinn-slider>
16
+ `;
17
+ export const Default = Template.bind({});
@@ -0,0 +1,5 @@
1
+ export default {
2
+ title: 'Components/Teaser',
3
+ };
4
+ const Template = () => "<vviinn-teaser />";
5
+ export const Default = Template.bind({});
@@ -0,0 +1,47 @@
1
+ export default {
2
+ title: "Widgets/VPS",
3
+ component: "vviinn-vps-widget"
4
+ };
5
+ const Template = () => "<vviinn-vps-widget></vviinn-vps-widget>";
6
+ export const Default = Template.bind({});
7
+ Default.storyName = "Modal window";
8
+ Default.decorators = [(Story) => `
9
+ <style>
10
+ .sb-show-main.sb-main-padded {
11
+ padding: unset;
12
+ }
13
+
14
+ #root {
15
+ align-content: center;
16
+ display: grid;
17
+ height: 100vh;
18
+ justify-items: center;
19
+ }
20
+
21
+ button {
22
+ align-items: center;
23
+ background: #F4F4F4;
24
+ border: none;
25
+ border-radius: 6px;
26
+ cursor: pointer;
27
+ display: grid;
28
+ height: 48px;
29
+ justify-items: center;
30
+ width: 48px;
31
+ }
32
+ </style>
33
+ <button onclick="showModal()">
34
+ <svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none">
35
+ <defs/>
36
+ <path fill="#525252" fill-rule="evenodd" d="M9.771 3.89a.875.875 0 01.728-.39h7c.293 0 .566.146.728.39l1.49 2.235h3.033a2.625 2.625 0 012.625 2.625V21a2.625 2.625 0 01-2.625 2.625H5.25A2.625 2.625 0 012.625 21V8.75A2.625 2.625 0 015.25 6.125h3.031l1.49-2.235zm1.197 1.36l-1.49 2.235a.875.875 0 01-.729.39H5.25a.875.875 0 00-.875.875V21a.875.875 0 00.875.875h17.5a.875.875 0 00.875-.875V8.75a.875.875 0 00-.875-.875h-3.5a.875.875 0 01-.729-.39l-1.49-2.235h-6.063z" clip-rule="evenodd"/>
37
+ <path fill="#525252" fill-rule="evenodd" d="M14 11.375a3.062 3.062 0 100 6.125 3.062 3.062 0 000-6.125zm-4.813 3.063a4.812 4.812 0 119.625 0 4.812 4.812 0 01-9.625 0z" clip-rule="evenodd"/>
38
+ </svg>
39
+ </button>
40
+ ${Story()}
41
+ <script>
42
+ function showModal () {
43
+ const modal = document.querySelector("vviinn-vps-widget");
44
+ modal.active = true;
45
+ }
46
+ </script>
47
+ `];
@@ -0,0 +1,19 @@
1
+ export default {
2
+ title: "Components/Product",
3
+ component: "vviinn-product-card",
4
+ };
5
+ const Template = ({ productTitle, brand, productType, price, image }) => `<vviinn-product-card
6
+ product-title="${productTitle}"
7
+ brand="${brand}"
8
+ product-type="${productType}"
9
+ price="${price}"
10
+ image="${image}"
11
+ ></vviinn-product-card>`;
12
+ export const Default = Template.bind({});
13
+ Default.args = {
14
+ productTitle: "1968 Fender Precision Bass Vintage Electric Bass Guitar Sunburst 100% Original Case",
15
+ productType: "Bass guitar",
16
+ brand: "Fender",
17
+ price: 624244,
18
+ image: "https://images.reverb.com/image/upload/s--pj8uk5Tr--/t_card-square/v1627963897/tcm9cwywsxfzrsnip3tm.jpg"
19
+ };
@@ -0,0 +1,3 @@
1
+ export const createTrackingEvent = (widget) => (eventData) => {
2
+ return Object.assign(Object.assign({}, eventData), widget);
3
+ };
@@ -0,0 +1,5 @@
1
+ import { FILTER_EVENT_EVENT_TYPE } from "./models";
2
+ export const filterEvent = {
3
+ widget: "VPS",
4
+ typ: FILTER_EVENT_EVENT_TYPE,
5
+ };
@@ -0,0 +1,13 @@
1
+ import { createTrackingEvent } from "./event";
2
+ import { filterEvent } from "./filter";
3
+ import { vprProductClick, vprProductView, vpsProductClick, vpsProductView, } from "./product";
4
+ import { searchEvent } from "./search";
5
+ import { vprWidget, vpsWidget } from "./widget";
6
+ export const createProductViewVprEvent = createTrackingEvent(vprProductView);
7
+ export const createProductViewVpsEvent = createTrackingEvent(vpsProductView);
8
+ export const createProductClickVprEvent = createTrackingEvent(vprProductClick);
9
+ export const createProductClickVpsEvent = createTrackingEvent(vpsProductClick);
10
+ export const createWidgetVprEvent = createTrackingEvent(vprWidget);
11
+ export const createWidgetVpsEvent = createTrackingEvent(vpsWidget);
12
+ export const createSearchEvent = createTrackingEvent(searchEvent);
13
+ export const createFilterEvent = createTrackingEvent(filterEvent);
@@ -0,0 +1,6 @@
1
+ const PRODUCT_CLICK_EVENT_TYPE = "product_click_event";
2
+ const PRODUCT_VIEW_EVENT_TYPE = "product_view_event";
3
+ const FILTER_EVENT_EVENT_TYPE = "filter_event";
4
+ const SEARCH_EVENT_EVENT_TYPE = "search_event";
5
+ const WIDGET_EVENT_EVENT_TYPE = "widget_event";
6
+ export { PRODUCT_CLICK_EVENT_TYPE, PRODUCT_VIEW_EVENT_TYPE, FILTER_EVENT_EVENT_TYPE, SEARCH_EVENT_EVENT_TYPE, WIDGET_EVENT_EVENT_TYPE, };
@@ -0,0 +1,18 @@
1
+ import { PRODUCT_VIEW_EVENT_TYPE, PRODUCT_CLICK_EVENT_TYPE, } from "./models";
2
+ const vprProductView = {
3
+ widget: "VPR",
4
+ typ: PRODUCT_VIEW_EVENT_TYPE,
5
+ };
6
+ const vpsProductView = {
7
+ widget: "VPS",
8
+ typ: PRODUCT_VIEW_EVENT_TYPE,
9
+ };
10
+ const vprProductClick = {
11
+ widget: "VPR",
12
+ typ: PRODUCT_CLICK_EVENT_TYPE,
13
+ };
14
+ const vpsProductClick = {
15
+ widget: "VPS",
16
+ typ: PRODUCT_CLICK_EVENT_TYPE,
17
+ };
18
+ export { vprProductClick, vprProductView, vpsProductClick, vpsProductView };
@@ -0,0 +1,5 @@
1
+ import { SEARCH_EVENT_EVENT_TYPE } from "./models";
2
+ export const searchEvent = {
3
+ widget: "VPS",
4
+ typ: SEARCH_EVENT_EVENT_TYPE,
5
+ };
@@ -0,0 +1,10 @@
1
+ import { WIDGET_EVENT_EVENT_TYPE } from "./models";
2
+ const vprWidget = {
3
+ widget: "VPR",
4
+ typ: WIDGET_EVENT_EVENT_TYPE,
5
+ };
6
+ const vpsWidget = {
7
+ widget: "VPS",
8
+ typ: WIDGET_EVENT_EVENT_TYPE,
9
+ };
10
+ export { vprWidget, vpsWidget };
@@ -0,0 +1,5 @@
1
+ import * as E from "fp-ts/Either";
2
+ import { pipe } from "fp-ts/function";
3
+ export const isEmpty = (x) => x.length === 0;
4
+ const checkEmpty = (x) => isEmpty(x) ? E.left("entity is empty") : E.right(x);
5
+ export const existAndNotEmpty = (x) => pipe(x, E.fromNullable("entity not exist"), E.chain(checkEmpty));
@@ -0,0 +1,3 @@
1
+ import { sequenceT } from "fp-ts/lib/Apply";
2
+ import { Apply } from "fp-ts/lib/Either";
3
+ export const sequenceToEither = sequenceT(Apply);
@@ -0,0 +1,3 @@
1
+ export const listValues = (e) => Object.values(e)
2
+ .filter((val) => typeof val === "string")
3
+ .map((c) => c);
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export const numberUnderDivisionSemigroup = {
2
+ concat: (x, y) => x / y,
3
+ };
4
+ export const numberUnderDivisionMonoid = Object.assign(Object.assign({}, numberUnderDivisionSemigroup), { empty: 1 });
@@ -0,0 +1,4 @@
1
+ import { sequenceT } from "fp-ts/lib/Apply";
2
+ import { Apply, some, none } from "fp-ts/lib/Option";
3
+ export const sequenceToOption = sequenceT(Apply);
4
+ export const checkEmpryString = (x) => x.length > 0 ? some(x) : none;
@@ -0,0 +1,6 @@
1
+ export const semigroupDiff = {
2
+ concat: (x, y) => x - y,
3
+ };
4
+ export const semigroupDiv = {
5
+ concat: (x, y) => x / y,
6
+ };
@@ -0,0 +1,9 @@
1
+ import { pipe } from "fp-ts/function";
2
+ import * as E from "fp-ts/lib/Either";
3
+ import { invalidTokenError } from "../../error";
4
+ import { existAndNotEmpty } from "../collections/collectionsUtils";
5
+ export const createBearerHeaders = (token) => new Headers({
6
+ Authorization: `Bearer ${token}`,
7
+ });
8
+ export const checkToken = (token) => pipe(token, existAndNotEmpty, E.mapLeft(() => invalidTokenError));
9
+ export const processBearerToken = (token) => pipe(token, checkToken, E.map(createBearerHeaders));
@@ -0,0 +1,309 @@
1
+ // -------------------------------------------------------------------------------------
2
+ /**
3
+ * @since 2.0.0
4
+ */
5
+ function identity(a) {
6
+ return a;
7
+ }
8
+ function flow(ab, bc, cd, de, ef, fg, gh, hi, ij) {
9
+ switch (arguments.length) {
10
+ case 1:
11
+ return ab;
12
+ case 2:
13
+ return function () {
14
+ return bc(ab.apply(this, arguments));
15
+ };
16
+ case 3:
17
+ return function () {
18
+ return cd(bc(ab.apply(this, arguments)));
19
+ };
20
+ case 4:
21
+ return function () {
22
+ return de(cd(bc(ab.apply(this, arguments))));
23
+ };
24
+ case 5:
25
+ return function () {
26
+ return ef(de(cd(bc(ab.apply(this, arguments)))));
27
+ };
28
+ case 6:
29
+ return function () {
30
+ return fg(ef(de(cd(bc(ab.apply(this, arguments))))));
31
+ };
32
+ case 7:
33
+ return function () {
34
+ return gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))));
35
+ };
36
+ case 8:
37
+ return function () {
38
+ return hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments))))))));
39
+ };
40
+ case 9:
41
+ return function () {
42
+ return ij(hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))))));
43
+ };
44
+ }
45
+ return;
46
+ }
47
+ /**
48
+ * @since 2.0.0
49
+ */
50
+ function tuple() {
51
+ var t = [];
52
+ for (var _i = 0; _i < arguments.length; _i++) {
53
+ t[_i] = arguments[_i];
54
+ }
55
+ return t;
56
+ }
57
+ function pipe(a, ab, bc, cd, de, ef, fg, gh, hi) {
58
+ switch (arguments.length) {
59
+ case 1:
60
+ return a;
61
+ case 2:
62
+ return ab(a);
63
+ case 3:
64
+ return bc(ab(a));
65
+ case 4:
66
+ return cd(bc(ab(a)));
67
+ case 5:
68
+ return de(cd(bc(ab(a))));
69
+ case 6:
70
+ return ef(de(cd(bc(ab(a)))));
71
+ case 7:
72
+ return fg(ef(de(cd(bc(ab(a))))));
73
+ case 8:
74
+ return gh(fg(ef(de(cd(bc(ab(a)))))));
75
+ case 9:
76
+ return hi(gh(fg(ef(de(cd(bc(ab(a))))))));
77
+ default: {
78
+ var ret = arguments[0];
79
+ for (var i = 1; i < arguments.length; i++) {
80
+ ret = arguments[i](ret);
81
+ }
82
+ return ret;
83
+ }
84
+ }
85
+ }
86
+
87
+ // -------------------------------------------------------------------------------------
88
+ // Option
89
+ // -------------------------------------------------------------------------------------
90
+ /** @internal */
91
+ var isNone = function (fa) { return fa._tag === 'None'; };
92
+ /** @internal */
93
+ var isSome = function (fa) { return fa._tag === 'Some'; };
94
+ /** @internal */
95
+ var none = { _tag: 'None' };
96
+ /** @internal */
97
+ var some = function (a) { return ({ _tag: 'Some', value: a }); };
98
+ // -------------------------------------------------------------------------------------
99
+ // Either
100
+ // -------------------------------------------------------------------------------------
101
+ /** @internal */
102
+ var isLeft = function (ma) { return ma._tag === 'Left'; };
103
+ /** @internal */
104
+ var left = function (e) { return ({ _tag: 'Left', left: e }); };
105
+ /** @internal */
106
+ var right = function (a) { return ({ _tag: 'Right', right: a }); };
107
+ // -------------------------------------------------------------------------------------
108
+ // Record
109
+ // -------------------------------------------------------------------------------------
110
+ /** @internal */
111
+ var has = Object.prototype.hasOwnProperty;
112
+
113
+ /**
114
+ * If a type `A` can form a `Semigroup` it has an **associative** binary operation.
115
+ *
116
+ * ```ts
117
+ * interface Semigroup<A> {
118
+ * readonly concat: (x: A, y: A) => A
119
+ * }
120
+ * ```
121
+ *
122
+ * Associativity means the following equality must hold for any choice of `x`, `y`, and `z`.
123
+ *
124
+ * ```ts
125
+ * concat(x, concat(y, z)) = concat(concat(x, y), z)
126
+ * ```
127
+ *
128
+ * A common example of a semigroup is the type `string` with the operation `+`.
129
+ *
130
+ * ```ts
131
+ * import { Semigroup } from 'fp-ts/Semigroup'
132
+ *
133
+ * const semigroupString: Semigroup<string> = {
134
+ * concat: (x, y) => x + y
135
+ * }
136
+ *
137
+ * const x = 'x'
138
+ * const y = 'y'
139
+ * const z = 'z'
140
+ *
141
+ * semigroupString.concat(x, y) // 'xy'
142
+ *
143
+ * semigroupString.concat(x, semigroupString.concat(y, z)) // 'xyz'
144
+ *
145
+ * semigroupString.concat(semigroupString.concat(x, y), z) // 'xyz'
146
+ * ```
147
+ *
148
+ * *Adapted from https://typelevel.org/cats*
149
+ *
150
+ * @since 2.0.0
151
+ */
152
+ /**
153
+ * Given a struct of semigroups returns a semigroup for the struct.
154
+ *
155
+ * @example
156
+ * import { struct } from 'fp-ts/Semigroup'
157
+ * import * as N from 'fp-ts/number'
158
+ *
159
+ * interface Point {
160
+ * readonly x: number
161
+ * readonly y: number
162
+ * }
163
+ *
164
+ * const S = struct<Point>({
165
+ * x: N.SemigroupSum,
166
+ * y: N.SemigroupSum
167
+ * })
168
+ *
169
+ * assert.deepStrictEqual(S.concat({ x: 1, y: 2 }, { x: 3, y: 4 }), { x: 4, y: 6 })
170
+ *
171
+ * @category combinators
172
+ * @since 2.10.0
173
+ */
174
+ var struct = function (semigroups) { return ({
175
+ concat: function (first, second) {
176
+ var r = {};
177
+ for (var k in semigroups) {
178
+ if (has.call(semigroups, k)) {
179
+ r[k] = semigroups[k].concat(first[k], second[k]);
180
+ }
181
+ }
182
+ return r;
183
+ }
184
+ }); };
185
+ // -------------------------------------------------------------------------------------
186
+ // instances
187
+ // -------------------------------------------------------------------------------------
188
+ /**
189
+ * Always return the first argument.
190
+ *
191
+ * @example
192
+ * import * as S from 'fp-ts/Semigroup'
193
+ *
194
+ * assert.deepStrictEqual(S.first<number>().concat(1, 2), 1)
195
+ *
196
+ * @category instances
197
+ * @since 2.10.0
198
+ */
199
+ var first = function () { return ({ concat: identity }); };
200
+ /**
201
+ * Always return the last argument.
202
+ *
203
+ * @example
204
+ * import * as S from 'fp-ts/Semigroup'
205
+ *
206
+ * assert.deepStrictEqual(S.last<number>().concat(1, 2), 2)
207
+ *
208
+ * @category instances
209
+ * @since 2.10.0
210
+ */
211
+ var last = function () { return ({ concat: function (_, y) { return y; } }); };
212
+ /**
213
+ * Use [`SemigroupSum`](./number.ts.html#SemigroupSum) instead.
214
+ *
215
+ * @category instances
216
+ * @since 2.0.0
217
+ * @deprecated
218
+ */
219
+ var semigroupSum = {
220
+ concat: function (x, y) { return x + y; }
221
+ };
222
+
223
+ const semigroupDiff = {
224
+ concat: (x, y) => x - y,
225
+ };
226
+
227
+ const fromRectangle$1 = ({ x, y }) => {
228
+ return {
229
+ x,
230
+ y,
231
+ };
232
+ };
233
+ const fromMouseEvent = ({ clientX, clientY }) => {
234
+ return {
235
+ x: clientX,
236
+ y: clientY,
237
+ };
238
+ };
239
+ const pointDiffSemigroup = struct({
240
+ x: semigroupDiff,
241
+ y: semigroupDiff,
242
+ });
243
+ const pointSumSemigroup = struct({
244
+ x: semigroupSum,
245
+ y: semigroupSum,
246
+ });
247
+
248
+ var HandlerDirection;
249
+ (function (HandlerDirection) {
250
+ HandlerDirection[HandlerDirection["East"] = 0] = "East";
251
+ HandlerDirection[HandlerDirection["North"] = 1] = "North";
252
+ HandlerDirection[HandlerDirection["NorthEast"] = 2] = "NorthEast";
253
+ HandlerDirection[HandlerDirection["NorthWest"] = 3] = "NorthWest";
254
+ HandlerDirection[HandlerDirection["South"] = 4] = "South";
255
+ HandlerDirection[HandlerDirection["SouthEast"] = 5] = "SouthEast";
256
+ HandlerDirection[HandlerDirection["SouthWest"] = 6] = "SouthWest";
257
+ HandlerDirection[HandlerDirection["West"] = 7] = "West";
258
+ })(HandlerDirection || (HandlerDirection = {}));
259
+ const getCursorValue = (direction) => {
260
+ switch (direction) {
261
+ case HandlerDirection.East:
262
+ return "e-resize";
263
+ case HandlerDirection.North:
264
+ return "n-resize";
265
+ case HandlerDirection.NorthEast:
266
+ return "ne-resize";
267
+ case HandlerDirection.NorthWest:
268
+ return "nw-resize";
269
+ case HandlerDirection.South:
270
+ return "s-resize";
271
+ case HandlerDirection.SouthEast:
272
+ return "se-resize";
273
+ case HandlerDirection.SouthWest:
274
+ return "sw-resize";
275
+ case HandlerDirection.West:
276
+ return "w-resize";
277
+ default:
278
+ return "pointer";
279
+ }
280
+ };
281
+ const fromRectangle = (r) => [
282
+ {
283
+ position: fromRectangle$1(r),
284
+ direction: HandlerDirection.NorthWest,
285
+ },
286
+ {
287
+ position: pointSumSemigroup.concat(fromRectangle$1(r), {
288
+ x: r.width,
289
+ y: 0,
290
+ }),
291
+ direction: HandlerDirection.NorthEast,
292
+ },
293
+ {
294
+ position: pointSumSemigroup.concat(fromRectangle$1(r), {
295
+ x: 0,
296
+ y: r.height,
297
+ }),
298
+ direction: HandlerDirection.SouthWest,
299
+ },
300
+ {
301
+ position: pointSumSemigroup.concat(fromRectangle$1(r), {
302
+ x: r.width,
303
+ y: r.height,
304
+ }),
305
+ direction: HandlerDirection.SouthEast,
306
+ },
307
+ ];
308
+
309
+ export { HandlerDirection as H, isLeft as a, identity as b, flow as c, struct as d, last as e, first as f, pointSumSemigroup as g, has as h, isNone as i, fromRectangle$1 as j, isSome as k, left as l, fromRectangle as m, none as n, pointDiffSemigroup as o, pipe as p, fromMouseEvent as q, right as r, some as s, tuple as t, getCursorValue as u };