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.
- package/dist/cjs/Handler-176539c8.js +331 -0
- package/dist/{vviinn-widgets/app-globals-4fe0376b.js → cjs/app-globals-d15b4c2c.js} +15 -925
- package/{www/build/cropper-handler.entry.js → dist/cjs/cropper-handler.cjs.entry.js} +11 -7
- package/dist/{vviinn-widgets/customized-slots-5dbf778c.js → cjs/customized-slots-0c0d0665.js} +6 -3
- package/dist/cjs/highlight-box_22.cjs.entry.js +747 -0
- package/{www/build/imageSearch.store-3204bc99.js → dist/cjs/imageSearch.store-865c23f4.js} +11902 -11653
- package/{www/build/index-89e62050.js → dist/cjs/index-0eb3036a.js} +76 -698
- package/dist/cjs/index-0f5516a6.js +1354 -0
- package/dist/cjs/index-31b9cb7a.js +39 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +23 -0
- package/dist/cjs/vviinn-carousel_3.cjs.entry.js +1174 -0
- package/dist/{vviinn-widgets/vviinn-error.entry.js → cjs/vviinn-error.cjs.entry.js} +8 -4
- package/{www/build/vviinn-preloader.entry.js → dist/cjs/vviinn-preloader.cjs.entry.js} +11 -10
- package/{www/build/vviinn-recommendations-sidebar.entry.js → dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js} +12 -8
- package/dist/{vviinn-widgets/vviinn-vpr-button.entry.js → cjs/vviinn-vpr-button.cjs.entry.js} +9 -5
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +43 -0
- package/{www/build/vviinn-vps-widget.entry.js → dist/cjs/vviinn-vps-widget.cjs.entry.js} +51 -49
- package/dist/cjs/vviinn-widgets.cjs.js +21 -0
- package/dist/collection/Image/error.js +14 -0
- package/dist/collection/Image/form.js +5 -0
- package/dist/collection/Image/fromFile.js +18 -0
- package/dist/collection/Image/imageToB64.js +9 -0
- package/dist/collection/Image/index.js +0 -0
- package/dist/collection/Image/renderPromise.js +6 -0
- package/dist/collection/Image/resizeImage.js +28 -0
- package/dist/collection/Image/sizing.js +39 -0
- package/dist/collection/Image/toFile.js +17 -0
- package/dist/collection/analytics/GAnalytics.js +32 -0
- package/dist/collection/analytics/GeneralAnalytics.js +9 -0
- package/dist/collection/analytics/GtagAnalytics.js +35 -0
- package/dist/collection/analytics/ProductAnalytics.js +1 -0
- package/dist/collection/campaign/Campaign.js +8 -0
- package/dist/collection/campaign/CampaignService.js +5 -0
- package/dist/collection/campaign/VCSCampaign.js +1 -0
- package/dist/collection/campaign/VCSCampaignResponse.js +1 -0
- package/dist/collection/campaign/VCSCampaignService.js +5 -0
- package/dist/collection/campaign/VPRCampaignResponse.js +1 -0
- package/dist/collection/campaign/VPRCampaignService.js +5 -0
- package/dist/collection/collection-manifest.json +43 -0
- package/dist/collection/components/customized-slots.js +47 -0
- package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.css +71 -0
- package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.js +25 -0
- package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.css +49 -0
- package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.js +64 -0
- package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.css +33 -0
- package/{www/build/image-cropper.entry.js → dist/collection/components/image-search/image-view/image-cropper/image-cropper.js} +70 -33
- package/dist/collection/components/image-search/search-filters/search-filters.css +120 -0
- package/dist/collection/components/image-search/search-filters/search-filters.js +125 -0
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +142 -0
- package/{www/build/vviinn-carousel.entry.js → dist/collection/components/vviinn-carousel/vviinn-carousel.js} +113 -18
- package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.css +7 -0
- package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +36 -0
- package/dist/collection/components/vviinn-error/vviinn-error.css +38 -0
- package/dist/collection/components/vviinn-error/vviinn-error.js +18 -0
- package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.css +3 -0
- package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.js +34 -0
- package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.css +3 -0
- package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.js +34 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.css +34 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +129 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.css +19 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +80 -0
- package/dist/{vviinn-widgets/index-bbcd6be9.js → collection/components/vviinn-icons/index.js} +11 -14
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.css +25 -0
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +64 -0
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.css +47 -0
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +100 -0
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.css +31 -0
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +61 -0
- package/dist/collection/components/vviinn-modal/vviinn-modal.css +105 -0
- package/dist/collection/components/vviinn-modal/vviinn-modal.js +98 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/onboarding-card.css +41 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.js +26 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.js +26 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.js +26 -0
- package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.css +58 -0
- package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.js +28 -0
- package/dist/collection/components/vviinn-overlay/vviinn-overlay.css +33 -0
- package/dist/collection/components/vviinn-overlay/vviinn-overlay.js +15 -0
- package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.css +29 -0
- package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.js +71 -0
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.css +37 -0
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +20 -0
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +19 -0
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +27 -0
- package/dist/collection/components/vviinn-product-card/render-helpers.js +32 -0
- package/dist/collection/components/vviinn-product-card/stories/args.js +73 -0
- package/dist/collection/components/vviinn-product-card/stories/decorators.js +51 -0
- package/dist/collection/components/vviinn-product-card/stories/vviinn-product-card.stories.js +105 -0
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.css +95 -0
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +462 -0
- package/dist/collection/components/vviinn-slider/arrow.js +11 -0
- package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.css +4 -0
- package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.js +15 -0
- package/dist/collection/components/vviinn-slider/vviinn-slider.css +109 -0
- package/dist/collection/components/vviinn-slider/vviinn-slider.js +181 -0
- package/dist/collection/components/vviinn-teaser/vviinn-teaser.css +14 -0
- package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +29 -0
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.css +238 -0
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +200 -0
- package/dist/collection/components/vviinn-vpr-button/stories/args.js +207 -0
- package/dist/collection/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.js +89 -0
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.css +35 -0
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +156 -0
- package/dist/collection/components/vviinn-vpr-widget/stories/args.js +190 -0
- package/dist/collection/components/vviinn-vpr-widget/stories/decorators.js +29 -0
- package/dist/collection/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.js +212 -0
- package/dist/collection/components/vviinn-vpr-widget/token-helpers.js +11 -0
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +483 -0
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +79 -0
- package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +31 -0
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.css +3 -0
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +178 -0
- package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +33 -0
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +350 -0
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +352 -0
- package/dist/collection/cropper/Cropper.js +1 -0
- package/dist/collection/cropper/Handler.js +61 -0
- package/dist/collection/dom/index.js +3 -0
- package/dist/collection/error.js +14 -0
- package/dist/collection/file/index.js +4 -0
- package/dist/collection/geometry/Clip.js +14 -0
- package/dist/collection/geometry/Point.js +32 -0
- package/dist/collection/geometry/Rectangle.js +95 -0
- package/dist/collection/geometry/RectangleAlt.js +1 -0
- package/dist/collection/geometry/Sized.js +8 -0
- package/dist/collection/global.js +19 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/interfaces/generated.js +5 -0
- package/dist/collection/interfaces/recommendation.js +1 -0
- package/dist/collection/network/apiClient.js +9 -0
- package/dist/collection/network/ion/File.js +14 -0
- package/dist/collection/network/ion/Form.js +64 -0
- package/dist/collection/network/ion/Link.js +8 -0
- package/dist/collection/network/ion/ValueObject.js +23 -0
- package/dist/collection/network/request.js +19 -0
- package/dist/collection/network/utils.js +37 -0
- package/dist/collection/openApi/index.js +27 -0
- package/dist/collection/recommendation/events.js +1 -0
- package/dist/collection/recommendation/recommendation.js +1 -0
- package/dist/collection/searchSession/searchSession.js +26 -0
- package/dist/collection/sentry.js +14 -0
- package/dist/collection/slider/GridMode.js +1 -0
- package/dist/collection/store/file-processing.js +13 -0
- package/dist/collection/store/imageSearch.store.js +138 -0
- package/dist/collection/store/store.js +3 -0
- package/dist/collection/store/tracking.store.js +3 -0
- package/dist/collection/stories/Button.js +21 -0
- package/dist/collection/stories/Button.stories.js +42 -0
- package/dist/collection/stories/Header.js +45 -0
- package/dist/collection/stories/Header.stories.js +15 -0
- package/dist/collection/stories/Page.js +61 -0
- package/dist/collection/stories/Page.stories.js +19 -0
- package/dist/collection/stories/assets/code-brackets.svg +1 -0
- package/dist/collection/stories/assets/colors.svg +1 -0
- package/dist/collection/stories/assets/comments.svg +1 -0
- package/dist/collection/stories/assets/direction.svg +1 -0
- package/dist/collection/stories/assets/flow.svg +1 -0
- package/dist/collection/stories/assets/plugin.svg +1 -0
- package/dist/collection/stories/assets/repo.svg +1 -0
- package/dist/collection/stories/assets/stackalt.svg +1 -0
- package/dist/collection/stories/image-selector.stories.js +6 -0
- package/dist/collection/stories/image-view.stories.js +6 -0
- package/dist/collection/stories/modal.stories.js +12 -0
- package/dist/collection/stories/onboarding.stories.js +11 -0
- package/dist/collection/stories/overlay.stories.js +5 -0
- package/dist/collection/stories/overlayedModal.stories.js +8 -0
- package/dist/collection/stories/privacy-badge.stories.js +11 -0
- package/dist/collection/stories/slider.stories.js +17 -0
- package/dist/collection/stories/teaser.stories.js +5 -0
- package/dist/collection/stories/vps-widget.stories.js +47 -0
- package/dist/collection/stories/vviinn-product.stories.js +19 -0
- package/dist/collection/tracking/event.js +3 -0
- package/dist/collection/tracking/filter.js +5 -0
- package/dist/collection/tracking/index.js +13 -0
- package/dist/collection/tracking/models.js +6 -0
- package/dist/collection/tracking/product.js +18 -0
- package/dist/collection/tracking/search.js +5 -0
- package/dist/collection/tracking/widget.js +10 -0
- package/dist/collection/utils/collections/collectionsUtils.js +5 -0
- package/dist/collection/utils/either.js +3 -0
- package/dist/collection/utils/enum/enumUtils.js +3 -0
- package/dist/collection/utils/event/Events.js +1 -0
- package/dist/collection/utils/number/index.js +4 -0
- package/dist/collection/utils/option/option.js +4 -0
- package/dist/collection/utils/semigroup/semigroupDiff.js +6 -0
- package/dist/collection/utils/token/tokenUtils.js +9 -0
- package/dist/esm/Handler-f9b8735c.js +309 -0
- package/{www/build/app-globals-4fe0376b.js → dist/esm/app-globals-6f6aa89e.js} +10 -922
- package/dist/{vviinn-widgets → esm}/cropper-handler.entry.js +2 -2
- package/{www/build/customized-slots-5dbf778c.js → dist/esm/customized-slots-6b427dda.js} +1 -1
- package/dist/esm/highlight-box_22.entry.js +722 -0
- package/dist/{vviinn-widgets/imageSearch.store-3204bc99.js → esm/imageSearch.store-0ae87235.js} +12070 -11855
- package/dist/{vviinn-widgets/index-89e62050.js → esm/index-2e296af4.js} +6 -639
- package/dist/esm/index-59f44eaa.js +1323 -0
- package/{www/build/index-bbcd6be9.js → dist/esm/index-ac05c460.js} +2 -4
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +19 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/vviinn-carousel_3.entry.js +1168 -0
- package/{www/build → dist/esm}/vviinn-error.entry.js +1 -1
- package/dist/{vviinn-widgets → esm}/vviinn-preloader.entry.js +3 -6
- package/dist/{vviinn-widgets → esm}/vviinn-recommendations-sidebar.entry.js +2 -2
- package/{www/build → dist/esm}/vviinn-vpr-button.entry.js +2 -2
- package/dist/{vviinn-widgets → esm}/vviinn-vps-button.entry.js +3 -3
- package/dist/{vviinn-widgets → esm}/vviinn-vps-widget.entry.js +12 -14
- package/dist/esm/vviinn-widgets.js +19 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/loader/cdn.js +3 -0
- package/dist/loader/index.cjs.js +3 -0
- package/dist/loader/index.d.ts +12 -0
- package/dist/loader/index.es2017.js +3 -0
- package/dist/loader/index.js +4 -0
- package/dist/loader/package.json +10 -0
- package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +1 -1
- package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +1 -1
- package/dist/vviinn-widgets/index.esm.js +0 -1
- package/dist/vviinn-widgets/p-118ac907.js +1 -0
- package/dist/vviinn-widgets/p-11f61564.js +1 -0
- package/dist/vviinn-widgets/p-39fdc5c9.entry.js +1 -0
- package/dist/vviinn-widgets/p-762dc067.entry.js +1 -0
- package/dist/vviinn-widgets/p-7e2f542c.js +1 -0
- package/dist/vviinn-widgets/p-8d56e795.entry.js +1 -0
- package/dist/vviinn-widgets/p-8f955b15.entry.js +1 -0
- package/dist/vviinn-widgets/p-9654fe35.entry.js +1 -0
- package/dist/vviinn-widgets/p-9e5adc42.js +1 -0
- package/dist/vviinn-widgets/p-b3731705.entry.js +1 -0
- package/dist/vviinn-widgets/p-bad1809f.js +1 -0
- package/dist/vviinn-widgets/p-c36546fa.js +15 -0
- package/dist/vviinn-widgets/p-d991330b.entry.js +1 -0
- package/dist/vviinn-widgets/p-da9c933b.entry.js +1 -0
- package/dist/vviinn-widgets/p-ee46fc83.js +1 -0
- package/dist/vviinn-widgets/p-f41e25f0.entry.js +1 -0
- package/dist/vviinn-widgets/vviinn-widgets.css +1 -6
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -125
- package/package.json +1 -1
- package/www/build/index.esm.js +0 -1
- package/www/build/p-118ac907.js +1 -0
- package/www/build/p-11f61564.js +1 -0
- package/www/build/p-39fdc5c9.entry.js +1 -0
- package/www/build/p-762dc067.entry.js +1 -0
- package/www/build/p-7e2f542c.js +1 -0
- package/www/build/p-8d56e795.entry.js +1 -0
- package/www/build/p-8f955b15.entry.js +1 -0
- package/www/build/p-9654fe35.entry.js +1 -0
- package/www/build/p-9e5adc42.js +1 -0
- package/www/build/p-a67898be.css +1 -0
- package/www/build/p-b3731705.entry.js +1 -0
- package/www/build/p-bad1809f.js +1 -0
- package/www/build/p-c36546fa.js +15 -0
- package/www/build/p-cfd998c1.js +1 -0
- package/www/build/p-d991330b.entry.js +1 -0
- package/www/build/p-da9c933b.entry.js +1 -0
- package/www/build/p-ee46fc83.js +1 -0
- package/www/build/p-f41e25f0.entry.js +1 -0
- package/www/build/vviinn-widgets.css +1 -6
- package/www/build/vviinn-widgets.esm.js +1 -125
- package/www/index.html +1 -12
- package/dist/vviinn-widgets/Array-c4dc02db.js +0 -4295
- package/dist/vviinn-widgets/Handler-47db9890.js +0 -1428
- package/dist/vviinn-widgets/NonEmptyArray-65395d97.js +0 -4370
- package/dist/vviinn-widgets/css-shim-f0027935.js +0 -4
- package/dist/vviinn-widgets/dom-db0073f0.js +0 -73
- package/dist/vviinn-widgets/highlight-box.entry.js +0 -41
- package/dist/vviinn-widgets/image-cropper.entry.js +0 -118
- package/dist/vviinn-widgets/index-c8128606.js +0 -3010
- package/dist/vviinn-widgets/number-a80a4b3c.js +0 -1533
- package/dist/vviinn-widgets/search-filters.entry.js +0 -76
- package/dist/vviinn-widgets/shadow-css-c1fdfa9f.js +0 -389
- package/dist/vviinn-widgets/vviinn-carousel.entry.js +0 -210
- package/dist/vviinn-widgets/vviinn-detected-object.entry.js +0 -54
- package/dist/vviinn-widgets/vviinn-empty-results.entry.js +0 -16
- package/dist/vviinn-widgets/vviinn-example-image.entry.js +0 -38
- package/dist/vviinn-widgets/vviinn-example-images.entry.js +0 -28
- package/dist/vviinn-widgets/vviinn-image-selector.entry.js +0 -31
- package/dist/vviinn-widgets/vviinn-image-view.entry.js +0 -55
- package/dist/vviinn-widgets/vviinn-modal.entry.js +0 -30
- package/dist/vviinn-widgets/vviinn-onboarding-card-1.entry.js +0 -21
- package/dist/vviinn-widgets/vviinn-onboarding-card-2.entry.js +0 -21
- package/dist/vviinn-widgets/vviinn-onboarding-card-3.entry.js +0 -21
- package/dist/vviinn-widgets/vviinn-onboarding.entry.js +0 -20
- package/dist/vviinn-widgets/vviinn-overlay.entry.js +0 -15
- package/dist/vviinn-widgets/vviinn-overlayed-modal.entry.js +0 -18
- package/dist/vviinn-widgets/vviinn-privacy-badge.entry.js +0 -20
- package/dist/vviinn-widgets/vviinn-product-card.entry.js +0 -184
- package/dist/vviinn-widgets/vviinn-server-error.entry.js +0 -16
- package/dist/vviinn-widgets/vviinn-slide.entry.js +0 -15
- package/dist/vviinn-widgets/vviinn-slider.entry.js +0 -120
- package/dist/vviinn-widgets/vviinn-teaser.entry.js +0 -20
- package/dist/vviinn-widgets/vviinn-vpr-widget.entry.js +0 -4581
- package/dist/vviinn-widgets/vviinn-wrong-format.entry.js +0 -16
- package/www/build/Array-c4dc02db.js +0 -4295
- package/www/build/Handler-47db9890.js +0 -1428
- package/www/build/NonEmptyArray-65395d97.js +0 -4370
- package/www/build/css-shim-f0027935.js +0 -4
- package/www/build/dom-db0073f0.js +0 -73
- package/www/build/highlight-box.entry.js +0 -41
- package/www/build/index-c8128606.js +0 -3010
- package/www/build/number-a80a4b3c.js +0 -1533
- package/www/build/search-filters.entry.js +0 -76
- package/www/build/shadow-css-c1fdfa9f.js +0 -389
- package/www/build/vviinn-detected-object.entry.js +0 -54
- package/www/build/vviinn-empty-results.entry.js +0 -16
- package/www/build/vviinn-example-image.entry.js +0 -38
- package/www/build/vviinn-example-images.entry.js +0 -28
- package/www/build/vviinn-image-selector.entry.js +0 -31
- package/www/build/vviinn-image-view.entry.js +0 -55
- package/www/build/vviinn-modal.entry.js +0 -30
- package/www/build/vviinn-onboarding-card-1.entry.js +0 -21
- package/www/build/vviinn-onboarding-card-2.entry.js +0 -21
- package/www/build/vviinn-onboarding-card-3.entry.js +0 -21
- package/www/build/vviinn-onboarding.entry.js +0 -20
- package/www/build/vviinn-overlay.entry.js +0 -15
- package/www/build/vviinn-overlayed-modal.entry.js +0 -18
- package/www/build/vviinn-privacy-badge.entry.js +0 -20
- package/www/build/vviinn-product-card.entry.js +0 -184
- package/www/build/vviinn-server-error.entry.js +0 -16
- package/www/build/vviinn-slide.entry.js +0 -15
- package/www/build/vviinn-slider.entry.js +0 -120
- package/www/build/vviinn-teaser.entry.js +0 -20
- package/www/build/vviinn-vpr-widget.entry.js +0 -4581
- package/www/build/vviinn-vps-button.entry.js +0 -39
- package/www/build/vviinn-wrong-format.entry.js +0 -16
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export class GtagAnalytics {
|
|
2
|
+
sendImpression(product) {
|
|
3
|
+
var _a, _b, _c;
|
|
4
|
+
gtag('event', 'view_item_list', {
|
|
5
|
+
items: [
|
|
6
|
+
{
|
|
7
|
+
id: product.productId,
|
|
8
|
+
name: product.title,
|
|
9
|
+
brand: (_a = product.brand) !== null && _a !== void 0 ? _a : '',
|
|
10
|
+
category: (_b = product.productType) !== null && _b !== void 0 ? _b : '',
|
|
11
|
+
list_name: 'VI VPR View',
|
|
12
|
+
price: Math.min(...[product.price.actual, (_c = product.price.sale) !== null && _c !== void 0 ? _c : Infinity])
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
});
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
sendClick(product) {
|
|
19
|
+
var _a, _b, _c;
|
|
20
|
+
gtag('event', 'select_content', {
|
|
21
|
+
content_type: 'product',
|
|
22
|
+
items: [
|
|
23
|
+
{
|
|
24
|
+
id: product.productId,
|
|
25
|
+
name: product.title,
|
|
26
|
+
brand: (_a = product.brand) !== null && _a !== void 0 ? _a : '',
|
|
27
|
+
category: (_b = product.productType) !== null && _b !== void 0 ? _b : '',
|
|
28
|
+
list_name: 'VI VPR View',
|
|
29
|
+
price: Math.min(...[product.price.actual, (_c = product.price.sale) !== null && _c !== void 0 ? _c : Infinity])
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
});
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const isVPR = (c) => c._tag === "VPR";
|
|
2
|
+
export const isVCS = (c) => c._tag === "VCS";
|
|
3
|
+
export function fold(onVPR, onVCS) {
|
|
4
|
+
return (c) => (isVPR(c) ? onVPR() : onVCS());
|
|
5
|
+
}
|
|
6
|
+
export function fromString(s) {
|
|
7
|
+
return s === "VPR" ? { _tag: "VPR" } : { _tag: "VCS" };
|
|
8
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as C from "./Campaign";
|
|
2
|
+
import { pipe } from "fp-ts/lib/function";
|
|
3
|
+
import { getVPRRecommendations } from "./VPRCampaignService";
|
|
4
|
+
import { getVCSRecommendations } from "./VCSCampaignService";
|
|
5
|
+
export const getRecommendationsService = (campaignType) => pipe(C.fromString(campaignType), C.fold(() => getVPRRecommendations, () => getVCSRecommendations));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entries": [
|
|
3
|
+
"./components/vviinn-carousel/vviinn-carousel.js",
|
|
4
|
+
"./components/image-search/image-view/highlight-box/highlight-box.js",
|
|
5
|
+
"./components/image-search/image-view/image-cropper/image-cropper.js",
|
|
6
|
+
"./components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.js",
|
|
7
|
+
"./components/image-search/search-filters/search-filters.js",
|
|
8
|
+
"./components/vviinn-error/vviinn-error.js",
|
|
9
|
+
"./components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js",
|
|
10
|
+
"./components/vviinn-error/vviinn-server-error/vviinn-server-error.js",
|
|
11
|
+
"./components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.js",
|
|
12
|
+
"./components/vviinn-example-images/vviinn-example-images.js",
|
|
13
|
+
"./components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js",
|
|
14
|
+
"./components/vviinn-image-selector/vviinn-image-selector.js",
|
|
15
|
+
"./components/vviinn-image-view/vviinn-image-view.js",
|
|
16
|
+
"./components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js",
|
|
17
|
+
"./components/vviinn-modal/vviinn-modal.js",
|
|
18
|
+
"./components/vviinn-onboarding/vviinn-onboarding.js",
|
|
19
|
+
"./components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.js",
|
|
20
|
+
"./components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.js",
|
|
21
|
+
"./components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.js",
|
|
22
|
+
"./components/vviinn-overlay/vviinn-overlay.js",
|
|
23
|
+
"./components/vviinn-overlayed-modal/vviinn-overlayed-modal.js",
|
|
24
|
+
"./components/vviinn-preloader/vviinn-preloader.js",
|
|
25
|
+
"./components/vviinn-privacy-badge/vviinn-privacy-badge.js",
|
|
26
|
+
"./components/vviinn-product-card/vviinn-product-card.js",
|
|
27
|
+
"./components/vviinn-slider/vviinn-slider.js",
|
|
28
|
+
"./components/vviinn-slider/vviinn-slide/vviinn-slide.js",
|
|
29
|
+
"./components/vviinn-teaser/vviinn-teaser.js",
|
|
30
|
+
"./components/vviinn-vpr-button/vviinn-vpr-button.js",
|
|
31
|
+
"./components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js",
|
|
32
|
+
"./components/vviinn-vpr-widget/vviinn-vpr-vidget.js",
|
|
33
|
+
"./components/vviinn-vps-button/vviinn-vps-button.js",
|
|
34
|
+
"./components/vviinn-vps-widget/vviinn-vps-widget.js"
|
|
35
|
+
],
|
|
36
|
+
"compiler": {
|
|
37
|
+
"name": "@stencil/core",
|
|
38
|
+
"version": "2.9.0",
|
|
39
|
+
"typescriptVersion": "4.2.3"
|
|
40
|
+
},
|
|
41
|
+
"collections": [],
|
|
42
|
+
"bundles": []
|
|
43
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
const defaultSlotsNames = [
|
|
3
|
+
"vviinn-onboarding-title",
|
|
4
|
+
"vviinn-onboarding-card-1-icon",
|
|
5
|
+
"vviinn-onboarding-card-1-text",
|
|
6
|
+
"vviinn-onboarding-card-2-icon",
|
|
7
|
+
"vviinn-onboarding-card-2-text",
|
|
8
|
+
"vviinn-onboarding-card-3-icon",
|
|
9
|
+
"vviinn-onboarding-card-3-text",
|
|
10
|
+
"vviinn-example-images-title",
|
|
11
|
+
"vviinn-example-images-1",
|
|
12
|
+
"vviinn-example-images-2",
|
|
13
|
+
"vviinn-example-images-3",
|
|
14
|
+
"vviinn-example-images-4",
|
|
15
|
+
"vviinn-teaser-text",
|
|
16
|
+
"vviinn-image-upload-button-text",
|
|
17
|
+
"vviinn-privacy-badge-text"
|
|
18
|
+
];
|
|
19
|
+
const renderNamedSlot = (name) => h("slot", { name: name });
|
|
20
|
+
export const SlotSkeleton = () => defaultSlotsNames.map(renderNamedSlot);
|
|
21
|
+
const getSlots = (element) => Array.from(element.shadowRoot.querySelectorAll("slot"));
|
|
22
|
+
const getNameAttribute = (element) => element.getAttribute("name");
|
|
23
|
+
const getSlotAttribute = (element) => element.getAttribute("slot");
|
|
24
|
+
const elementContainSlot = (slot) => (container) => {
|
|
25
|
+
const name1 = getNameAttribute(slot);
|
|
26
|
+
const name2 = getSlotAttribute(container);
|
|
27
|
+
return name1 === name2;
|
|
28
|
+
};
|
|
29
|
+
const getContentToReplace = (targets) => (acc, content) => {
|
|
30
|
+
const replaceCandidate = targets.find(elementContainSlot(content));
|
|
31
|
+
if (replaceCandidate) {
|
|
32
|
+
acc.set(content, replaceCandidate);
|
|
33
|
+
}
|
|
34
|
+
return acc;
|
|
35
|
+
};
|
|
36
|
+
const replaceSlotContent = (content, target) => {
|
|
37
|
+
target.innerHTML = content.outerHTML;
|
|
38
|
+
};
|
|
39
|
+
export const slotChangeListener = (component, element) => {
|
|
40
|
+
component.connectedCallback = function () {
|
|
41
|
+
document.addEventListener("globalSlotsChanged", ({ detail }) => {
|
|
42
|
+
const slotsToReplace = getSlots(element).reduce(getContentToReplace(detail), new Map());
|
|
43
|
+
slotsToReplace.forEach(replaceSlotContent);
|
|
44
|
+
}, true);
|
|
45
|
+
};
|
|
46
|
+
component.connectedCallback.call(component);
|
|
47
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: grid;
|
|
3
|
+
position: absolute;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
border: none;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
-webkit-user-select: none;
|
|
9
|
+
-moz-user-select: none;
|
|
10
|
+
-ms-user-select: none;
|
|
11
|
+
user-select: none;
|
|
12
|
+
|
|
13
|
+
--size: 10px;
|
|
14
|
+
--x-position: 0;
|
|
15
|
+
--y-position: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
img {
|
|
19
|
+
-webkit-user-select: none;
|
|
20
|
+
-moz-user-select: none;
|
|
21
|
+
-ms-user-select: none;
|
|
22
|
+
user-select: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.pointer {
|
|
26
|
+
position: absolute;
|
|
27
|
+
width: var(--size);
|
|
28
|
+
height: var(--size);
|
|
29
|
+
background: black;
|
|
30
|
+
border-radius: 50%;
|
|
31
|
+
z-index: 2;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
transform: translate(var(--x-position), var(--y-position)) scale(0);
|
|
34
|
+
-webkit-animation: 0.25s linear fadein;
|
|
35
|
+
animation: 0.25s linear fadein;
|
|
36
|
+
-webkit-animation-fill-mode: forwards;
|
|
37
|
+
animation-fill-mode: forwards;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.pointer::after {
|
|
41
|
+
content: "";
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
border: 5px solid black;
|
|
44
|
+
border-radius: 50%;
|
|
45
|
+
width: var(--size);
|
|
46
|
+
height: var(--size);
|
|
47
|
+
display: block;
|
|
48
|
+
transform: translate(calc(-50% + var(--size) * 0.5), calc(-50% + var(--size) * 0.5));
|
|
49
|
+
padding: calc(var(--size) * 0.5);
|
|
50
|
+
opacity: .75;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@-webkit-keyframes fadein {
|
|
54
|
+
from {
|
|
55
|
+
transform: translate(var(--x-position), var(--y-position)) scale(0);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
to {
|
|
59
|
+
transform: translate(var(--x-position), var(--y-position)) scale(1);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@keyframes fadein {
|
|
64
|
+
from {
|
|
65
|
+
transform: translate(var(--x-position), var(--y-position)) scale(0);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
to {
|
|
69
|
+
transform: translate(var(--x-position), var(--y-position)) scale(1);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Component, Host, h } from "@stencil/core";
|
|
2
|
+
import { getClipValue } from "../../../../geometry/Clip";
|
|
3
|
+
import * as O from "fp-ts/lib/Option";
|
|
4
|
+
import { pipe } from "fp-ts/function";
|
|
5
|
+
import { imageSearchState } from "../../../../store/imageSearch.store";
|
|
6
|
+
import { sequenceToOption } from "../../../../utils/option/option";
|
|
7
|
+
export class HighlightBox {
|
|
8
|
+
getInsetValue() {
|
|
9
|
+
return pipe(sequenceToOption(imageSearchState.searchArea, imageSearchState.imageBounds), O.map(([selection, image]) => getClipValue(selection, image)), O.getOrElse(() => ""));
|
|
10
|
+
}
|
|
11
|
+
renderImage() {
|
|
12
|
+
return pipe(sequenceToOption(imageSearchState.imageUrl, imageSearchState.imageBounds), O.map(([url, bounds]) => (h("img", { src: url, width: bounds.width, height: bounds.height, style: { "clip-path": `${this.getInsetValue()}` } }))), O.getOrElse(() => ""));
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
return h(Host, null, this.renderImage());
|
|
16
|
+
}
|
|
17
|
+
static get is() { return "highlight-box"; }
|
|
18
|
+
static get encapsulation() { return "shadow"; }
|
|
19
|
+
static get originalStyleUrls() { return {
|
|
20
|
+
"$": ["highlight-box.css"]
|
|
21
|
+
}; }
|
|
22
|
+
static get styleUrls() { return {
|
|
23
|
+
"$": ["highlight-box.css"]
|
|
24
|
+
}; }
|
|
25
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
--size: 20px;
|
|
3
|
+
|
|
4
|
+
background: transparent;
|
|
5
|
+
border: 4px solid white;
|
|
6
|
+
box-sizing: content-box;
|
|
7
|
+
display: block;
|
|
8
|
+
height: var(--size);
|
|
9
|
+
touch-action: none;
|
|
10
|
+
position: absolute;
|
|
11
|
+
width: var(--size);
|
|
12
|
+
z-index: 4;
|
|
13
|
+
-webkit-user-select: none;
|
|
14
|
+
-moz-user-select: none;
|
|
15
|
+
-ms-user-select: none;
|
|
16
|
+
user-select: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:host(.disabled) {
|
|
20
|
+
opacity: 0.25;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:host(.nw-resize) {
|
|
24
|
+
border-bottom: none;
|
|
25
|
+
border-right: none;
|
|
26
|
+
top: 0;
|
|
27
|
+
left: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host(.ne-resize) {
|
|
31
|
+
border-left: none;
|
|
32
|
+
border-bottom: none;
|
|
33
|
+
right: 0;
|
|
34
|
+
top: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:host(.sw-resize) {
|
|
38
|
+
border-right: none;
|
|
39
|
+
border-top: none;
|
|
40
|
+
left: 0;
|
|
41
|
+
bottom: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:host(.se-resize) {
|
|
45
|
+
border-left: none;
|
|
46
|
+
border-top: none;
|
|
47
|
+
bottom: 0;
|
|
48
|
+
right: 0;
|
|
49
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Component, Host, h, Prop } from "@stencil/core";
|
|
2
|
+
import { getCursorValue } from "../../../../../cropper/Handler";
|
|
3
|
+
export class CropperHandler {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.disabled = false;
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, { part: `handle ${getCursorValue(this.handler.direction)}`, class: {
|
|
9
|
+
disabled: this.disabled,
|
|
10
|
+
[getCursorValue(this.handler.direction)]: true,
|
|
11
|
+
}, style: {
|
|
12
|
+
"--size": "20px",
|
|
13
|
+
cursor: getCursorValue(this.handler.direction),
|
|
14
|
+
}, draggable: false }));
|
|
15
|
+
}
|
|
16
|
+
static get is() { return "cropper-handler"; }
|
|
17
|
+
static get encapsulation() { return "shadow"; }
|
|
18
|
+
static get originalStyleUrls() { return {
|
|
19
|
+
"$": ["cropper-handler.css"]
|
|
20
|
+
}; }
|
|
21
|
+
static get styleUrls() { return {
|
|
22
|
+
"$": ["cropper-handler.css"]
|
|
23
|
+
}; }
|
|
24
|
+
static get properties() { return {
|
|
25
|
+
"handler": {
|
|
26
|
+
"type": "unknown",
|
|
27
|
+
"mutable": false,
|
|
28
|
+
"complexType": {
|
|
29
|
+
"original": "Handler",
|
|
30
|
+
"resolved": "Handler",
|
|
31
|
+
"references": {
|
|
32
|
+
"Handler": {
|
|
33
|
+
"location": "import",
|
|
34
|
+
"path": "../../../../../cropper/Handler"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"required": false,
|
|
39
|
+
"optional": false,
|
|
40
|
+
"docs": {
|
|
41
|
+
"tags": [],
|
|
42
|
+
"text": ""
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"disabled": {
|
|
46
|
+
"type": "boolean",
|
|
47
|
+
"mutable": false,
|
|
48
|
+
"complexType": {
|
|
49
|
+
"original": "boolean",
|
|
50
|
+
"resolved": "boolean",
|
|
51
|
+
"references": {}
|
|
52
|
+
},
|
|
53
|
+
"required": false,
|
|
54
|
+
"optional": false,
|
|
55
|
+
"docs": {
|
|
56
|
+
"tags": [],
|
|
57
|
+
"text": ""
|
|
58
|
+
},
|
|
59
|
+
"attribute": "disabled",
|
|
60
|
+
"reflect": false,
|
|
61
|
+
"defaultValue": "false"
|
|
62
|
+
}
|
|
63
|
+
}; }
|
|
64
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
height: 100%;
|
|
4
|
+
left: 0;
|
|
5
|
+
position: absolute;
|
|
6
|
+
top: 0;
|
|
7
|
+
width: 100%;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:host(.hidden) {
|
|
11
|
+
visibility: hidden;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.crop-area {
|
|
15
|
+
border: 1px solid white;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
position: absolute;
|
|
18
|
+
touch-action: none;
|
|
19
|
+
transition-property: border-color, opacity;
|
|
20
|
+
transition-duration: .25s;
|
|
21
|
+
transition-timing-function: ease-in-out;
|
|
22
|
+
z-index: 2;
|
|
23
|
+
position: relative;
|
|
24
|
+
will-change: transform;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.crop-area.active {
|
|
28
|
+
border-color: whitesmoke;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.crop-area.disabled {
|
|
32
|
+
opacity: 0.25;
|
|
33
|
+
}
|
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
const findTarget = (ev) => {
|
|
9
|
-
return ev.target;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const imageCropperCss = ":host{display:block;height:100%;left:0;position:absolute;top:0;width:100%}:host(.hidden){visibility:hidden}.crop-area{border:1px solid white;box-sizing:border-box;position:absolute;touch-action:none;transition-property:border-color, opacity;transition-duration:.25s;transition-timing-function:ease-in-out;z-index:2;position:relative;will-change:transform}.crop-area.active{border-color:whitesmoke}.crop-area.disabled{opacity:0.25}";
|
|
13
|
-
|
|
1
|
+
import { Component, Host, h, State, Element, Prop, Event, } from "@stencil/core";
|
|
2
|
+
import { move, transform } from "../../../../geometry/Rectangle";
|
|
3
|
+
import { fromMouseEvent, pointDiffSemigroup, } from "../../../../geometry/Point";
|
|
4
|
+
import { imageSearchState, makeRectangularSearchRequest, } from "../../../../store/imageSearch.store";
|
|
5
|
+
import { pipe } from "fp-ts/lib/function";
|
|
6
|
+
import * as O from "fp-ts/lib/Option";
|
|
7
|
+
import { findTarget } from "../../../../dom";
|
|
14
8
|
const MIN_SEARCHAREA_SIZE = 40;
|
|
15
|
-
|
|
16
|
-
constructor(
|
|
17
|
-
registerInstance(this, hostRef);
|
|
18
|
-
this.cropperChanged = createEvent(this, "cropperChanged", 7);
|
|
9
|
+
export class ImageCropper {
|
|
10
|
+
constructor() {
|
|
19
11
|
this.disabled = false;
|
|
20
12
|
this.handleMove = false;
|
|
21
13
|
this.mouseStartPoint = undefined;
|
|
@@ -33,11 +25,11 @@ let ImageCropper = class {
|
|
|
33
25
|
position: distance,
|
|
34
26
|
direction: this.handlerMoveDirection,
|
|
35
27
|
};
|
|
36
|
-
|
|
28
|
+
pipe(imageSearchState.searchArea, O.map((area) => {
|
|
37
29
|
const newSearchArea = transform(area, transformedHandler);
|
|
38
30
|
if (this.outOfBounds(newSearchArea))
|
|
39
31
|
return;
|
|
40
|
-
imageSearchState.searchArea =
|
|
32
|
+
imageSearchState.searchArea = O.some(newSearchArea);
|
|
41
33
|
this.mouseStartPoint = destination;
|
|
42
34
|
imageSearchState.detectedObject = undefined;
|
|
43
35
|
}));
|
|
@@ -55,7 +47,7 @@ let ImageCropper = class {
|
|
|
55
47
|
ev.stopPropagation();
|
|
56
48
|
const destination = fromMouseEvent(ev);
|
|
57
49
|
const distance = pointDiffSemigroup.concat(destination, this.mouseStartPoint);
|
|
58
|
-
|
|
50
|
+
pipe(imageSearchState.searchArea, O.map((searchArea) => {
|
|
59
51
|
const newSearchArea = move(searchArea, distance);
|
|
60
52
|
if (newSearchArea.x < 0 ||
|
|
61
53
|
newSearchArea.y < 0 ||
|
|
@@ -63,7 +55,7 @@ let ImageCropper = class {
|
|
|
63
55
|
this.bounds.width - (newSearchArea.x + newSearchArea.width) < 0)
|
|
64
56
|
return;
|
|
65
57
|
imageSearchState.detectedObject = undefined;
|
|
66
|
-
imageSearchState.searchArea =
|
|
58
|
+
imageSearchState.searchArea = O.some(newSearchArea);
|
|
67
59
|
this.mouseStartPoint = destination;
|
|
68
60
|
}));
|
|
69
61
|
}
|
|
@@ -93,26 +85,71 @@ let ImageCropper = class {
|
|
|
93
85
|
this.cropperChanged.emit();
|
|
94
86
|
}
|
|
95
87
|
getStyleMap() {
|
|
96
|
-
return
|
|
88
|
+
return pipe(imageSearchState.searchArea, O.map((rectangle) => {
|
|
97
89
|
return {
|
|
98
90
|
width: `${rectangle.width}px`,
|
|
99
91
|
height: `${rectangle.height}px`,
|
|
100
92
|
transform: `translate3d(${rectangle.x}px, ${rectangle.y}px, 0)`,
|
|
101
93
|
cursor: this.handleMove ? "move" : "default",
|
|
102
94
|
};
|
|
103
|
-
}),
|
|
95
|
+
}), O.getOrElse(() => {
|
|
104
96
|
return {};
|
|
105
97
|
}));
|
|
106
98
|
}
|
|
107
99
|
render() {
|
|
108
|
-
return (h(Host, { exportparts: "handle, e-resize, n-resize, ne-resize, nw-resize, s-resize, se-resize, sw-resize, w-resize" },
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
100
|
+
return (h(Host, { exportparts: "handle, e-resize, n-resize, ne-resize, nw-resize, s-resize, se-resize, sw-resize, w-resize" },
|
|
101
|
+
h("div", { class: {
|
|
102
|
+
"crop-area": true,
|
|
103
|
+
active: this.handleMove,
|
|
104
|
+
disabled: this.disabled,
|
|
105
|
+
}, draggable: false, style: this.getStyleMap(), onContextMenu: () => false, onPointerDown: (ev) => this.handlePointerDown(ev) }, imageSearchState.cropperHandlers.map((handler) => (h("cropper-handler", { disabled: this.disabled, handler: handler, onPointerDown: (ev) => this.handlePointerDown(ev) }))))));
|
|
113
106
|
}
|
|
114
|
-
get
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
107
|
+
static get is() { return "image-cropper"; }
|
|
108
|
+
static get encapsulation() { return "shadow"; }
|
|
109
|
+
static get originalStyleUrls() { return {
|
|
110
|
+
"$": ["image-cropper.css"]
|
|
111
|
+
}; }
|
|
112
|
+
static get styleUrls() { return {
|
|
113
|
+
"$": ["image-cropper.css"]
|
|
114
|
+
}; }
|
|
115
|
+
static get properties() { return {
|
|
116
|
+
"disabled": {
|
|
117
|
+
"type": "boolean",
|
|
118
|
+
"mutable": false,
|
|
119
|
+
"complexType": {
|
|
120
|
+
"original": "boolean",
|
|
121
|
+
"resolved": "boolean",
|
|
122
|
+
"references": {}
|
|
123
|
+
},
|
|
124
|
+
"required": false,
|
|
125
|
+
"optional": false,
|
|
126
|
+
"docs": {
|
|
127
|
+
"tags": [],
|
|
128
|
+
"text": ""
|
|
129
|
+
},
|
|
130
|
+
"attribute": "disabled",
|
|
131
|
+
"reflect": false,
|
|
132
|
+
"defaultValue": "false"
|
|
133
|
+
}
|
|
134
|
+
}; }
|
|
135
|
+
static get states() { return {
|
|
136
|
+
"handleMove": {}
|
|
137
|
+
}; }
|
|
138
|
+
static get events() { return [{
|
|
139
|
+
"method": "cropperChanged",
|
|
140
|
+
"name": "cropperChanged",
|
|
141
|
+
"bubbles": true,
|
|
142
|
+
"cancelable": true,
|
|
143
|
+
"composed": true,
|
|
144
|
+
"docs": {
|
|
145
|
+
"tags": [],
|
|
146
|
+
"text": ""
|
|
147
|
+
},
|
|
148
|
+
"complexType": {
|
|
149
|
+
"original": "any",
|
|
150
|
+
"resolved": "any",
|
|
151
|
+
"references": {}
|
|
152
|
+
}
|
|
153
|
+
}]; }
|
|
154
|
+
static get elementRef() { return "el"; }
|
|
155
|
+
}
|