vviinn-widgets 2.7.2 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Handler.js +270 -0
- package/dist/components/NonEmptyArray.js +5699 -0
- package/dist/components/cropper-handler.js +6 -0
- package/dist/components/cropper-handler2.js +39 -0
- package/dist/{cjs/customized-slots-06ca4007.js → components/customized-slots.js} +3 -6
- package/dist/components/highlight-box.js +6 -0
- package/dist/components/highlight-box2.js +52 -0
- package/dist/components/image-cropper.js +6 -0
- package/dist/components/image-cropper2.js +138 -0
- package/dist/components/imageSearch.store.js +10686 -0
- package/dist/components/index.js +1 -0
- package/dist/{esm/index-443468c7.js → components/index2.js} +2 -2
- package/dist/components/index3.js +130 -0
- package/dist/components/recommendations-sidebar.js +101 -0
- package/dist/components/resizer.worker.js +11 -0
- package/dist/components/search-filters.js +6 -0
- package/dist/components/search-filters2.js +89 -0
- package/dist/components/tracking.worker.js +11 -0
- package/dist/components/vviinn-carousel.js +6 -0
- package/dist/components/vviinn-carousel2.js +235 -0
- package/dist/components/vviinn-detected-object.js +6 -0
- package/dist/components/vviinn-detected-object2.js +67 -0
- package/dist/components/vviinn-empty-results.js +6 -0
- package/dist/components/vviinn-empty-results2.js +35 -0
- package/dist/components/vviinn-error.js +6 -0
- package/dist/components/vviinn-error2.js +28 -0
- package/dist/components/vviinn-example-image.js +6 -0
- package/dist/components/vviinn-example-image2.js +57 -0
- package/dist/components/vviinn-example-images.js +6 -0
- package/dist/components/vviinn-example-images2.js +53 -0
- package/dist/components/vviinn-image-selector.js +6 -0
- package/dist/components/vviinn-image-selector2.js +135 -0
- package/dist/components/vviinn-image-view.js +6 -0
- package/dist/components/vviinn-image-view2.js +95 -0
- package/dist/components/vviinn-modal.js +6 -0
- package/dist/components/vviinn-modal2.js +46 -0
- package/dist/components/vviinn-onboarding-card-1.js +6 -0
- package/dist/components/vviinn-onboarding-card-12.js +34 -0
- package/dist/components/vviinn-onboarding-card-2.js +6 -0
- package/dist/components/vviinn-onboarding-card-22.js +34 -0
- package/dist/components/vviinn-onboarding-card-3.js +6 -0
- package/dist/components/vviinn-onboarding-card-32.js +34 -0
- package/dist/components/vviinn-onboarding.js +6 -0
- package/dist/components/vviinn-onboarding2.js +63 -0
- package/dist/components/vviinn-overlay.js +6 -0
- package/dist/components/vviinn-overlay2.js +28 -0
- package/dist/components/vviinn-overlayed-modal.js +6 -0
- package/dist/components/vviinn-overlayed-modal2.js +45 -0
- package/dist/components/vviinn-preloader.js +6 -0
- package/dist/components/vviinn-preloader2.js +34 -0
- package/dist/components/vviinn-privacy-badge.js +6 -0
- package/dist/components/vviinn-privacy-badge2.js +33 -0
- package/dist/components/vviinn-product-card.js +6 -0
- package/dist/components/vviinn-product-card2.js +216 -0
- package/dist/components/vviinn-recommendations-sidebar.js +6 -0
- package/dist/components/vviinn-server-error.js +6 -0
- package/dist/components/vviinn-server-error2.js +35 -0
- package/dist/components/vviinn-slide.js +6 -0
- package/dist/components/vviinn-slide2.js +28 -0
- package/dist/components/vviinn-slider.js +6 -0
- package/dist/components/vviinn-slider2.js +159 -0
- package/dist/components/vviinn-teaser.js +6 -0
- package/dist/components/vviinn-teaser2.js +33 -0
- package/dist/components/vviinn-vpr-button.js +93 -0
- package/dist/components/vviinn-vpr-vidget.js +3360 -0
- package/dist/components/vviinn-vpr-widget.js +6 -0
- package/dist/components/vviinn-vps-button.js +224 -0
- package/dist/components/vviinn-vps-widget.js +6 -0
- package/dist/components/vviinn-vps-widget2.js +350 -0
- package/dist/components/vviinn-wrong-format.js +6 -0
- package/dist/components/vviinn-wrong-format2.js +35 -0
- package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-button/stories/lol.d.ts +2 -0
- package/dist/types/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.d.ts +1 -1
- package/dist/vviinn-widgets/Array-bdfc75db.js +4870 -0
- package/dist/vviinn-widgets/Handler-edcb46f4.js +1422 -0
- package/dist/vviinn-widgets/NonEmptyArray-947ab7b3.js +4411 -0
- package/dist/{esm/app-globals-865bc7a7.js → vviinn-widgets/app-globals-c0aa8ec3.js} +922 -10
- package/dist/vviinn-widgets/cropper-handler.entry.js +23 -0
- package/dist/vviinn-widgets/css-shim-f0027935.js +4 -0
- package/dist/{esm/customized-slots-96902edf.js → vviinn-widgets/customized-slots-5c1c623a.js} +1 -1
- package/dist/vviinn-widgets/dom-db0073f0.js +73 -0
- package/dist/vviinn-widgets/highlight-box.entry.js +41 -0
- package/dist/{collection/components/image-search/image-view/image-cropper/image-cropper.js → vviinn-widgets/image-cropper.entry.js} +33 -70
- package/dist/{cjs/index-df6896e2.js → vviinn-widgets/imageSearch.store-0eed9a5c.js} +11598 -15320
- package/dist/{esm/index-2fdd499d.js → vviinn-widgets/imageSearch.store-b28bddb0.js} +11971 -15281
- package/dist/{collection/components/vviinn-icons/index.js → vviinn-widgets/index-44058ea2.js} +14 -11
- package/dist/vviinn-widgets/index-6c6de682.js +3857 -0
- package/dist/vviinn-widgets/index-de3e14da.js +3010 -0
- package/dist/vviinn-widgets/index.esm.js +1 -0
- package/dist/vviinn-widgets/number-171db649.js +1499 -0
- package/dist/vviinn-widgets/search-filters.entry.js +76 -0
- package/dist/vviinn-widgets/shadow-css-c1fdfa9f.js +389 -0
- package/dist/{collection/components/vviinn-carousel/vviinn-carousel.js → vviinn-widgets/vviinn-carousel.entry.js} +18 -113
- package/dist/vviinn-widgets/vviinn-detected-object.entry.js +54 -0
- package/dist/vviinn-widgets/vviinn-empty-results.entry.js +16 -0
- package/dist/vviinn-widgets/vviinn-error.entry.js +15 -0
- package/dist/vviinn-widgets/vviinn-example-image.entry.js +38 -0
- package/dist/vviinn-widgets/vviinn-example-images.entry.js +28 -0
- package/dist/vviinn-widgets/vviinn-image-selector.entry.js +31 -0
- package/dist/vviinn-widgets/vviinn-image-view.entry.js +55 -0
- package/dist/vviinn-widgets/vviinn-modal.entry.js +30 -0
- package/dist/vviinn-widgets/vviinn-onboarding-card-1.entry.js +21 -0
- package/dist/vviinn-widgets/vviinn-onboarding-card-2.entry.js +21 -0
- package/dist/vviinn-widgets/vviinn-onboarding-card-3.entry.js +21 -0
- package/dist/vviinn-widgets/vviinn-onboarding.entry.js +20 -0
- package/dist/vviinn-widgets/vviinn-overlay.entry.js +15 -0
- package/dist/vviinn-widgets/vviinn-overlayed-modal.entry.js +18 -0
- package/dist/vviinn-widgets/vviinn-preloader.entry.js +25 -0
- package/dist/vviinn-widgets/vviinn-privacy-badge.entry.js +20 -0
- package/dist/vviinn-widgets/vviinn-product-card.entry.js +188 -0
- package/dist/{esm → vviinn-widgets}/vviinn-recommendations-sidebar.entry.js +2 -2
- package/dist/vviinn-widgets/vviinn-server-error.entry.js +16 -0
- package/dist/vviinn-widgets/vviinn-slide.entry.js +15 -0
- package/dist/vviinn-widgets/vviinn-slider.entry.js +120 -0
- package/dist/vviinn-widgets/vviinn-teaser.entry.js +20 -0
- package/dist/{esm → vviinn-widgets}/vviinn-vpr-button.entry.js +2 -2
- package/dist/vviinn-widgets/vviinn-vpr-widget.entry.js +4588 -0
- package/dist/{esm → vviinn-widgets}/vviinn-vps-button.entry.js +3 -3
- package/dist/vviinn-widgets/vviinn-vps-widget.entry.js +170 -0
- package/dist/vviinn-widgets/vviinn-widgets.css +6 -1
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +125 -1
- package/dist/vviinn-widgets/vviinn-wrong-format.entry.js +16 -0
- package/package.json +8 -2
- package/www/build/p-06c76b5e.js +1 -0
- package/www/build/p-07e16d04.js +15 -0
- package/{dist/vviinn-widgets/p-a6e0710f.entry.js → www/build/p-44bc50de.entry.js} +1 -1
- package/www/build/p-510922c6.js +1 -0
- package/www/build/p-57ce8de3.css +1 -0
- package/www/build/p-591cb193.entry.js +1 -0
- package/www/build/p-6b9d242e.js +1 -0
- package/www/build/p-880bccf1.js +1 -0
- package/www/build/p-b0ada114.entry.js +1 -0
- package/www/build/p-b7be7c70.entry.js +1 -0
- package/{dist/vviinn-widgets/p-166970f3.js → www/build/p-ea8dea5c.js} +1 -1
- package/www/build/vviinn-widgets.css +1 -1
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +32261 -1
- package/www/sw.js +66 -0
- package/dist/cjs/app-globals-8db3bcbe.js +0 -6912
- package/dist/cjs/cropper-handler_27.cjs.entry.js +0 -1135
- package/dist/cjs/index-3c3ab815.js +0 -1354
- package/dist/cjs/index-f66cd8d1.js +0 -39
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +0 -23
- package/dist/cjs/vviinn-carousel_2.cjs.entry.js +0 -1001
- package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +0 -65
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +0 -49
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +0 -43
- package/dist/cjs/vviinn-widgets.cjs.js +0 -21
- package/dist/collection/Image/error.js +0 -14
- package/dist/collection/Image/form.js +0 -5
- package/dist/collection/Image/fromFile.js +0 -18
- package/dist/collection/Image/imageToB64.js +0 -9
- package/dist/collection/Image/index.js +0 -0
- package/dist/collection/Image/renderPromise.js +0 -6
- package/dist/collection/Image/resizeImage.js +0 -28
- package/dist/collection/Image/sizing.js +0 -39
- package/dist/collection/Image/toFile.js +0 -17
- package/dist/collection/analytics/GAnalytics.js +0 -32
- package/dist/collection/analytics/GeneralAnalytics.js +0 -9
- package/dist/collection/analytics/GtagAnalytics.js +0 -35
- package/dist/collection/analytics/ProductAnalytics.js +0 -1
- package/dist/collection/campaign/Campaign.js +0 -8
- package/dist/collection/campaign/CampaignService.js +0 -5
- package/dist/collection/campaign/VCSCampaign.js +0 -1
- package/dist/collection/campaign/VCSCampaignResponse.js +0 -1
- package/dist/collection/campaign/VCSCampaignService.js +0 -7
- package/dist/collection/campaign/VPRCampaignResponse.js +0 -1
- package/dist/collection/campaign/VPRCampaignService.js +0 -7
- package/dist/collection/collection-manifest.json +0 -43
- package/dist/collection/components/customized-slots.js +0 -47
- package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.css +0 -71
- package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.js +0 -25
- package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.css +0 -49
- package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.js +0 -64
- package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.css +0 -33
- package/dist/collection/components/image-search/search-filters/search-filters.css +0 -120
- package/dist/collection/components/image-search/search-filters/search-filters.js +0 -125
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +0 -142
- package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.css +0 -7
- package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +0 -36
- package/dist/collection/components/vviinn-error/vviinn-error.css +0 -38
- package/dist/collection/components/vviinn-error/vviinn-error.js +0 -18
- package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.css +0 -3
- package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.js +0 -34
- package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.css +0 -3
- package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.js +0 -34
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.css +0 -34
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +0 -129
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.css +0 -19
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +0 -80
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.css +0 -25
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +0 -64
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.css +0 -47
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +0 -100
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.css +0 -31
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +0 -61
- package/dist/collection/components/vviinn-modal/vviinn-modal.css +0 -105
- package/dist/collection/components/vviinn-modal/vviinn-modal.js +0 -98
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/onboarding-card.css +0 -41
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.js +0 -26
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.js +0 -26
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.js +0 -26
- package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.css +0 -58
- package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.js +0 -28
- package/dist/collection/components/vviinn-overlay/vviinn-overlay.css +0 -33
- package/dist/collection/components/vviinn-overlay/vviinn-overlay.js +0 -15
- package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.css +0 -29
- package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.js +0 -71
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.css +0 -37
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +0 -20
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +0 -19
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +0 -27
- package/dist/collection/components/vviinn-product-card/render-helpers.js +0 -32
- package/dist/collection/components/vviinn-product-card/stories/args.js +0 -73
- package/dist/collection/components/vviinn-product-card/stories/decorators.js +0 -51
- package/dist/collection/components/vviinn-product-card/stories/vviinn-product-card.stories.js +0 -105
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.css +0 -95
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +0 -462
- package/dist/collection/components/vviinn-slider/arrow.js +0 -11
- package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.css +0 -4
- package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.js +0 -15
- package/dist/collection/components/vviinn-slider/vviinn-slider.css +0 -109
- package/dist/collection/components/vviinn-slider/vviinn-slider.js +0 -181
- package/dist/collection/components/vviinn-teaser/vviinn-teaser.css +0 -14
- package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +0 -29
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.css +0 -238
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +0 -220
- package/dist/collection/components/vviinn-vpr-button/stories/args.js +0 -213
- package/dist/collection/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.js +0 -91
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.css +0 -35
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +0 -179
- package/dist/collection/components/vviinn-vpr-widget/stories/args.js +0 -197
- package/dist/collection/components/vviinn-vpr-widget/stories/decorators.js +0 -29
- package/dist/collection/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.js +0 -211
- package/dist/collection/components/vviinn-vpr-widget/token-helpers.js +0 -11
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +0 -510
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +0 -79
- package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +0 -35
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.css +0 -3
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +0 -195
- package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +0 -37
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +0 -350
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +0 -375
- package/dist/collection/cropper/Cropper.js +0 -1
- package/dist/collection/cropper/Handler.js +0 -61
- package/dist/collection/dom/index.js +0 -3
- package/dist/collection/error.js +0 -14
- package/dist/collection/file/index.js +0 -4
- package/dist/collection/geometry/Clip.js +0 -14
- package/dist/collection/geometry/Point.js +0 -32
- package/dist/collection/geometry/Rectangle.js +0 -95
- package/dist/collection/geometry/RectangleAlt.js +0 -1
- package/dist/collection/geometry/Sized.js +0 -8
- package/dist/collection/global.js +0 -19
- package/dist/collection/index.js +0 -1
- package/dist/collection/interfaces/generated.js +0 -5
- package/dist/collection/interfaces/recommendation.js +0 -1
- package/dist/collection/network/apiClient.js +0 -9
- package/dist/collection/network/ion/File.js +0 -14
- package/dist/collection/network/ion/Form.js +0 -64
- package/dist/collection/network/ion/Link.js +0 -8
- package/dist/collection/network/ion/ValueObject.js +0 -23
- package/dist/collection/network/request.js +0 -19
- package/dist/collection/network/utils.js +0 -37
- package/dist/collection/openApi/index.js +0 -27
- package/dist/collection/recommendation/events.js +0 -1
- package/dist/collection/recommendation/recommendation.js +0 -1
- package/dist/collection/searchSession/searchSession.js +0 -31
- package/dist/collection/sentry.js +0 -14
- package/dist/collection/slider/GridMode.js +0 -1
- package/dist/collection/store/file-processing.js +0 -13
- package/dist/collection/store/imageSearch.store.js +0 -133
- package/dist/collection/store/store.js +0 -3
- package/dist/collection/store/tracking.store.js +0 -3
- package/dist/collection/stories/Button.js +0 -21
- package/dist/collection/stories/Button.stories.js +0 -42
- package/dist/collection/stories/Header.js +0 -45
- package/dist/collection/stories/Header.stories.js +0 -15
- package/dist/collection/stories/Page.js +0 -61
- package/dist/collection/stories/Page.stories.js +0 -19
- package/dist/collection/stories/assets/code-brackets.svg +0 -1
- package/dist/collection/stories/assets/colors.svg +0 -1
- package/dist/collection/stories/assets/comments.svg +0 -1
- package/dist/collection/stories/assets/direction.svg +0 -1
- package/dist/collection/stories/assets/flow.svg +0 -1
- package/dist/collection/stories/assets/plugin.svg +0 -1
- package/dist/collection/stories/assets/repo.svg +0 -1
- package/dist/collection/stories/assets/stackalt.svg +0 -1
- package/dist/collection/stories/image-selector.stories.js +0 -6
- package/dist/collection/stories/image-view.stories.js +0 -6
- package/dist/collection/stories/modal.stories.js +0 -12
- package/dist/collection/stories/onboarding.stories.js +0 -11
- package/dist/collection/stories/overlay.stories.js +0 -5
- package/dist/collection/stories/overlayedModal.stories.js +0 -8
- package/dist/collection/stories/privacy-badge.stories.js +0 -11
- package/dist/collection/stories/slider.stories.js +0 -17
- package/dist/collection/stories/teaser.stories.js +0 -5
- package/dist/collection/stories/vps-widget.stories.js +0 -47
- package/dist/collection/stories/vviinn-product.stories.js +0 -19
- package/dist/collection/tracking/event.js +0 -3
- package/dist/collection/tracking/filter.js +0 -5
- package/dist/collection/tracking/index.js +0 -13
- package/dist/collection/tracking/models.js +0 -6
- package/dist/collection/tracking/product.js +0 -18
- package/dist/collection/tracking/search.js +0 -5
- package/dist/collection/tracking/widget.js +0 -10
- package/dist/collection/utils/collections/collectionsUtils.js +0 -5
- package/dist/collection/utils/either.js +0 -3
- package/dist/collection/utils/enum/enumUtils.js +0 -3
- package/dist/collection/utils/event/Events.js +0 -1
- package/dist/collection/utils/number/index.js +0 -4
- package/dist/collection/utils/option/option.js +0 -4
- package/dist/collection/utils/semigroup/semigroupDiff.js +0 -6
- package/dist/collection/utils/token/tokenUtils.js +0 -9
- package/dist/esm/cropper-handler_27.entry.js +0 -1105
- package/dist/esm/index-51f71d18.js +0 -1323
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -19
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/vviinn-carousel_2.entry.js +0 -996
- package/dist/esm/vviinn-widgets.js +0 -19
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/loader/cdn.js +0 -3
- package/dist/loader/index.cjs.js +0 -3
- package/dist/loader/index.d.ts +0 -12
- package/dist/loader/index.es2017.js +0 -3
- package/dist/loader/index.js +0 -4
- package/dist/loader/package.json +0 -10
- package/dist/vviinn-widgets/p-2dd35f19.entry.js +0 -1
- package/dist/vviinn-widgets/p-3469b71a.js +0 -1
- package/dist/vviinn-widgets/p-40bea5b5.entry.js +0 -1
- package/dist/vviinn-widgets/p-465d043d.js +0 -15
- package/dist/vviinn-widgets/p-59bd2a99.js +0 -1
- package/dist/vviinn-widgets/p-74ed36af.entry.js +0 -1
- package/dist/vviinn-widgets/p-9def6b8b.entry.js +0 -1
- package/dist/vviinn-widgets/p-cd995515.js +0 -1
- package/www/build/p-166970f3.js +0 -1
- package/www/build/p-2dd35f19.entry.js +0 -1
- package/www/build/p-3469b71a.js +0 -1
- package/www/build/p-40bea5b5.entry.js +0 -1
- package/www/build/p-465d043d.js +0 -15
- package/www/build/p-59bd2a99.js +0 -1
- package/www/build/p-61933b75.js +0 -1
- package/www/build/p-74ed36af.entry.js +0 -1
- package/www/build/p-9def6b8b.entry.js +0 -1
- package/www/build/p-a67898be.css +0 -1
- package/www/build/p-a6e0710f.entry.js +0 -1
- package/www/build/p-cd995515.js +0 -1
- package/www/favicon.ico +0 -0
|
@@ -1,34 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,129 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
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,25 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,100 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { Component, Host, h } from "@stencil/core";
|
|
2
|
-
import { imageSearchState } from "../../store/imageSearch.store";
|
|
3
|
-
import { pipe } from "fp-ts/lib/function";
|
|
4
|
-
import * as O from "fp-ts/lib/Option";
|
|
5
|
-
import { sequenceToOption } from "../../utils/option/option";
|
|
6
|
-
import { fromImage, move } from "../../geometry/Rectangle";
|
|
7
|
-
import { dimensionsFromImage, scaleByLargestSide } from "../../Image/sizing";
|
|
8
|
-
const getImageSizes = (i) => {
|
|
9
|
-
const dimensions = dimensionsFromImage(i);
|
|
10
|
-
const resize = scaleByLargestSide(288);
|
|
11
|
-
const newDimensions = resize(dimensions);
|
|
12
|
-
const sizes = newDimensions.map(d => d.size);
|
|
13
|
-
return [sizes[0], sizes[1]];
|
|
14
|
-
};
|
|
15
|
-
export class VviinnImageView {
|
|
16
|
-
handleInitialImageLoad(ev) {
|
|
17
|
-
const target = ev.target;
|
|
18
|
-
const imageBounds = fromImage(target);
|
|
19
|
-
const padding = 12;
|
|
20
|
-
const { x, y } = move(imageBounds, { x: padding, y: padding });
|
|
21
|
-
const searchArea = {
|
|
22
|
-
x,
|
|
23
|
-
y,
|
|
24
|
-
width: imageBounds.width - padding * 2,
|
|
25
|
-
height: imageBounds.height - padding * 2,
|
|
26
|
-
};
|
|
27
|
-
imageSearchState.imageBounds = O.some(imageBounds);
|
|
28
|
-
imageSearchState.searchArea = O.some(searchArea);
|
|
29
|
-
}
|
|
30
|
-
renderDetectedObject(object) {
|
|
31
|
-
return h("vviinn-detected-object", { detectedObject: object });
|
|
32
|
-
}
|
|
33
|
-
renderImage() {
|
|
34
|
-
return pipe(sequenceToOption(imageSearchState.imageUrl, imageSearchState.image), O.map(([url, refImage]) => {
|
|
35
|
-
const [width, height] = getImageSizes(refImage);
|
|
36
|
-
const image = (h("img", { decoding: "async", width: width, height: height, src: url, onLoad: (el) => this.handleInitialImageLoad(el), draggable: false }));
|
|
37
|
-
return image;
|
|
38
|
-
}), O.getOrElse(() => null));
|
|
39
|
-
}
|
|
40
|
-
renderCropper() {
|
|
41
|
-
return pipe(imageSearchState.imageUrl, O.map(() => h("image-cropper", null)), O.getOrElse(() => null));
|
|
42
|
-
}
|
|
43
|
-
render() {
|
|
44
|
-
return (h(Host, null,
|
|
45
|
-
imageSearchState.loading ||
|
|
46
|
-
imageSearchState.objectDetectionInProgress ? (h("div", { class: "image-preloader" },
|
|
47
|
-
h("vviinn-preloader", null))) : null,
|
|
48
|
-
h("highlight-box", null),
|
|
49
|
-
this.renderImage(),
|
|
50
|
-
this.renderCropper(),
|
|
51
|
-
imageSearchState.detectedObjects.map((o) => this.renderDetectedObject(o))));
|
|
52
|
-
}
|
|
53
|
-
static get is() { return "vviinn-image-view"; }
|
|
54
|
-
static get encapsulation() { return "shadow"; }
|
|
55
|
-
static get originalStyleUrls() { return {
|
|
56
|
-
"$": ["vviinn-image-view.css"]
|
|
57
|
-
}; }
|
|
58
|
-
static get styleUrls() { return {
|
|
59
|
-
"$": ["vviinn-image-view.css"]
|
|
60
|
-
}; }
|
|
61
|
-
}
|