vviinn-widgets 2.5.2 → 2.6.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/types/campaign/CampaignService.d.ts +1 -1
- package/dist/types/campaign/VCSCampaignService.d.ts +2 -1
- package/dist/types/campaign/VPRCampaignService.d.ts +2 -1
- package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +2 -0
- package/dist/types/components/vviinn-vpr-button/stories/args.d.ts +6 -0
- package/dist/types/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.d.ts +6 -0
- package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +2 -0
- package/dist/types/components/vviinn-vpr-widget/stories/args.d.ts +6 -0
- package/dist/types/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.d.ts +6 -0
- package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +3 -0
- package/dist/types/components.d.ts +24 -0
- 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-6f6aa89e.js → vviinn-widgets/app-globals-26a61baa.js} +922 -10
- package/dist/{esm → vviinn-widgets}/cropper-handler.entry.js +2 -2
- package/dist/vviinn-widgets/css-shim-f0027935.js +4 -0
- package/dist/{esm/customized-slots-6b427dda.js → vviinn-widgets/customized-slots-fb9b3e5f.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/{esm/imageSearch.store-0ae87235.js → vviinn-widgets/imageSearch.store-15bda6de.js} +12106 -11817
- package/dist/{esm/index-ac05c460.js → vviinn-widgets/index-533f9255.js} +4 -2
- package/dist/{esm/index-2e296af4.js → vviinn-widgets/index-6c6de682.js} +639 -6
- package/dist/vviinn-widgets/index-89051fa8.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/{esm → vviinn-widgets}/vviinn-error.entry.js +1 -1
- 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/{esm → vviinn-widgets}/vviinn-preloader.entry.js +6 -3
- package/dist/vviinn-widgets/vviinn-privacy-badge.entry.js +20 -0
- package/dist/vviinn-widgets/vviinn-product-card.entry.js +184 -0
- package/dist/{esm → vviinn-widgets}/vviinn-recommendations-sidebar.entry.js +5 -3
- 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 +7 -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/{esm → vviinn-widgets}/vviinn-vps-widget.entry.js +8 -5
- 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 +3 -3
- package/www/build/Array-bdfc75db.js +4870 -0
- package/www/build/Handler-edcb46f4.js +1422 -0
- package/www/build/NonEmptyArray-947ab7b3.js +4411 -0
- package/{dist/cjs/app-globals-d15b4c2c.js → www/build/app-globals-26a61baa.js} +925 -15
- package/{dist/cjs/cropper-handler.cjs.entry.js → www/build/cropper-handler.entry.js} +7 -11
- package/www/build/css-shim-f0027935.js +4 -0
- package/{dist/cjs/customized-slots-0c0d0665.js → www/build/customized-slots-fb9b3e5f.js} +3 -6
- package/www/build/dom-db0073f0.js +73 -0
- package/www/build/highlight-box.entry.js +41 -0
- package/www/build/image-cropper.entry.js +118 -0
- package/{dist/cjs/imageSearch.store-865c23f4.js → www/build/imageSearch.store-15bda6de.js} +11902 -11647
- package/{dist/collection/components/vviinn-icons/index.js → www/build/index-533f9255.js} +14 -11
- package/{dist/cjs/index-0eb3036a.js → www/build/index-6c6de682.js} +698 -76
- package/www/build/index-89051fa8.js +3010 -0
- package/www/build/index.esm.js +1 -0
- package/www/build/number-171db649.js +1499 -0
- package/www/build/search-filters.entry.js +76 -0
- package/www/build/shadow-css-c1fdfa9f.js +389 -0
- package/www/build/vviinn-carousel.entry.js +210 -0
- package/www/build/vviinn-detected-object.entry.js +54 -0
- package/www/build/vviinn-empty-results.entry.js +16 -0
- package/{dist/cjs/vviinn-error.cjs.entry.js → www/build/vviinn-error.entry.js} +4 -8
- package/www/build/vviinn-example-image.entry.js +38 -0
- package/www/build/vviinn-example-images.entry.js +28 -0
- package/www/build/vviinn-image-selector.entry.js +31 -0
- package/www/build/vviinn-image-view.entry.js +55 -0
- package/www/build/vviinn-modal.entry.js +30 -0
- package/www/build/vviinn-onboarding-card-1.entry.js +21 -0
- package/www/build/vviinn-onboarding-card-2.entry.js +21 -0
- package/www/build/vviinn-onboarding-card-3.entry.js +21 -0
- package/www/build/vviinn-onboarding.entry.js +20 -0
- package/www/build/vviinn-overlay.entry.js +15 -0
- package/www/build/vviinn-overlayed-modal.entry.js +18 -0
- package/{dist/cjs/vviinn-preloader.cjs.entry.js → www/build/vviinn-preloader.entry.js} +10 -11
- package/www/build/vviinn-privacy-badge.entry.js +20 -0
- package/www/build/vviinn-product-card.entry.js +184 -0
- package/{dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js → www/build/vviinn-recommendations-sidebar.entry.js} +10 -12
- package/www/build/vviinn-server-error.entry.js +16 -0
- package/www/build/vviinn-slide.entry.js +15 -0
- package/www/build/vviinn-slider.entry.js +120 -0
- package/www/build/vviinn-teaser.entry.js +20 -0
- package/{dist/cjs/vviinn-vpr-button.cjs.entry.js → www/build/vviinn-vpr-button.entry.js} +10 -9
- package/www/build/vviinn-vpr-widget.entry.js +4588 -0
- package/www/build/vviinn-vps-button.entry.js +39 -0
- package/{dist/cjs/vviinn-vps-widget.cjs.entry.js → www/build/vviinn-vps-widget.entry.js} +44 -45
- package/www/build/vviinn-widgets.css +6 -1
- package/www/build/vviinn-widgets.esm.js +125 -1
- package/www/build/vviinn-wrong-format.entry.js +16 -0
- package/www/index.html +10 -1
- package/dist/cjs/Handler-176539c8.js +0 -331
- package/dist/cjs/highlight-box_22.cjs.entry.js +0 -747
- package/dist/cjs/index-0f5516a6.js +0 -1354
- package/dist/cjs/index-31b9cb7a.js +0 -39
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +0 -23
- package/dist/cjs/vviinn-carousel_3.cjs.entry.js +0 -1174
- 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 -5
- package/dist/collection/campaign/VPRCampaignResponse.js +0 -1
- package/dist/collection/campaign/VPRCampaignService.js +0 -5
- 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 -200
- package/dist/collection/components/vviinn-vpr-button/stories/args.js +0 -207
- package/dist/collection/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.js +0 -89
- 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 -156
- package/dist/collection/components/vviinn-vpr-widget/stories/args.js +0 -190
- 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 -212
- package/dist/collection/components/vviinn-vpr-widget/token-helpers.js +0 -11
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +0 -483
- 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 -31
- 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 -178
- package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +0 -33
- 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 -352
- 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 -26
- 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 -138
- 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/Handler-f9b8735c.js +0 -309
- package/dist/esm/highlight-box_22.entry.js +0 -722
- package/dist/esm/index-59f44eaa.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_3.entry.js +0 -1168
- 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-118ac907.js +0 -1
- package/dist/vviinn-widgets/p-11f61564.js +0 -1
- package/dist/vviinn-widgets/p-39fdc5c9.entry.js +0 -1
- package/dist/vviinn-widgets/p-762dc067.entry.js +0 -1
- package/dist/vviinn-widgets/p-7e2f542c.js +0 -1
- package/dist/vviinn-widgets/p-8d56e795.entry.js +0 -1
- package/dist/vviinn-widgets/p-8f955b15.entry.js +0 -1
- package/dist/vviinn-widgets/p-9654fe35.entry.js +0 -1
- package/dist/vviinn-widgets/p-9e5adc42.js +0 -1
- package/dist/vviinn-widgets/p-b3731705.entry.js +0 -1
- package/dist/vviinn-widgets/p-bad1809f.js +0 -1
- package/dist/vviinn-widgets/p-c36546fa.js +0 -15
- package/dist/vviinn-widgets/p-d991330b.entry.js +0 -1
- package/dist/vviinn-widgets/p-da9c933b.entry.js +0 -1
- package/dist/vviinn-widgets/p-ee46fc83.js +0 -1
- package/dist/vviinn-widgets/p-f41e25f0.entry.js +0 -1
- package/www/build/p-118ac907.js +0 -1
- package/www/build/p-11f61564.js +0 -1
- package/www/build/p-39fdc5c9.entry.js +0 -1
- package/www/build/p-762dc067.entry.js +0 -1
- package/www/build/p-7e2f542c.js +0 -1
- package/www/build/p-8d56e795.entry.js +0 -1
- package/www/build/p-8f955b15.entry.js +0 -1
- package/www/build/p-9654fe35.entry.js +0 -1
- package/www/build/p-9e5adc42.js +0 -1
- package/www/build/p-a67898be.css +0 -1
- package/www/build/p-b3731705.entry.js +0 -1
- package/www/build/p-bad1809f.js +0 -1
- package/www/build/p-c36546fa.js +0 -15
- package/www/build/p-cfd998c1.js +0 -1
- package/www/build/p-d991330b.entry.js +0 -1
- package/www/build/p-da9c933b.entry.js +0 -1
- package/www/build/p-ee46fc83.js +0 -1
- package/www/build/p-f41e25f0.entry.js +0 -1
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { h, r as registerInstance, f as createEvent, e as Host, g as getElement } from './index-89051fa8.js';
|
|
2
|
+
import { _ as _function, d as Semigroup } from './NonEmptyArray-947ab7b3.js';
|
|
3
|
+
import { O as Option } from './number-171db649.js';
|
|
4
|
+
import { E as Either, i as imageSearchState, s as state } from './imageSearch.store-15bda6de.js';
|
|
5
|
+
import './Handler-edcb46f4.js';
|
|
6
|
+
import './Array-bdfc75db.js';
|
|
7
|
+
|
|
8
|
+
class GtagAnalytics {
|
|
9
|
+
sendImpression(product) {
|
|
10
|
+
var _a, _b, _c;
|
|
11
|
+
gtag('event', 'view_item_list', {
|
|
12
|
+
items: [
|
|
13
|
+
{
|
|
14
|
+
id: product.productId,
|
|
15
|
+
name: product.title,
|
|
16
|
+
brand: (_a = product.brand) !== null && _a !== void 0 ? _a : '',
|
|
17
|
+
category: (_b = product.productType) !== null && _b !== void 0 ? _b : '',
|
|
18
|
+
list_name: 'VI VPR View',
|
|
19
|
+
price: Math.min(...[product.price.actual, (_c = product.price.sale) !== null && _c !== void 0 ? _c : Infinity])
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
});
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
sendClick(product) {
|
|
26
|
+
var _a, _b, _c;
|
|
27
|
+
gtag('event', 'select_content', {
|
|
28
|
+
content_type: 'product',
|
|
29
|
+
items: [
|
|
30
|
+
{
|
|
31
|
+
id: product.productId,
|
|
32
|
+
name: product.title,
|
|
33
|
+
brand: (_a = product.brand) !== null && _a !== void 0 ? _a : '',
|
|
34
|
+
category: (_b = product.productType) !== null && _b !== void 0 ? _b : '',
|
|
35
|
+
list_name: 'VI VPR View',
|
|
36
|
+
price: Math.min(...[product.price.actual, (_c = product.price.sale) !== null && _c !== void 0 ? _c : Infinity])
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
});
|
|
40
|
+
return undefined;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
class GAnalytics {
|
|
45
|
+
constructor() {
|
|
46
|
+
ga('require', 'ec');
|
|
47
|
+
}
|
|
48
|
+
convertProduct(product) {
|
|
49
|
+
var _a, _b, _c;
|
|
50
|
+
return {
|
|
51
|
+
id: product.productId,
|
|
52
|
+
name: product.title,
|
|
53
|
+
brand: (_a = product.brand) !== null && _a !== void 0 ? _a : '',
|
|
54
|
+
category: (_b = product.productType) !== null && _b !== void 0 ? _b : '',
|
|
55
|
+
list: 'VI VPR View',
|
|
56
|
+
price: Math.min(...[product.price.actual, (_c = product.price.sale) !== null && _c !== void 0 ? _c : Infinity])
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
sendImpression(product) {
|
|
60
|
+
ga('ec:addImpression', this.convertProduct(product));
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
sendClick(product) {
|
|
64
|
+
var _a, _b, _c;
|
|
65
|
+
ga('ec:addProduct', {
|
|
66
|
+
id: product.productId,
|
|
67
|
+
name: product.title,
|
|
68
|
+
brand: (_a = product.brand) !== null && _a !== void 0 ? _a : '',
|
|
69
|
+
category: (_b = product.productType) !== null && _b !== void 0 ? _b : '',
|
|
70
|
+
price: Math.min(...[product.price.actual, (_c = product.price.sale) !== null && _c !== void 0 ? _c : Infinity])
|
|
71
|
+
});
|
|
72
|
+
ga('ec:setAction', 'click', { list: 'VI VPR View' });
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const getGtagAnalytics = () => _function.pipe(Option.fromNullable(window.gtag), Option.map(() => new GtagAnalytics()));
|
|
78
|
+
const getCommonAnalytics = () => _function.pipe(Option.fromNullable(window.ga), Option.map(() => new GAnalytics()));
|
|
79
|
+
const analyticsMonoid = Option.getMonoid(Semigroup.first());
|
|
80
|
+
const getAnalyticsModule = analyticsMonoid.concat(getGtagAnalytics(), getCommonAnalytics());
|
|
81
|
+
|
|
82
|
+
const FIT_EXPR = /fit\/\d+\//;
|
|
83
|
+
const containsFit = (url) => {
|
|
84
|
+
return _function.pipe(url.match(FIT_EXPR), Either.fromNullable(url), Either.map(() => url));
|
|
85
|
+
};
|
|
86
|
+
const processWidth = (url, size) => {
|
|
87
|
+
return _function.pipe(containsFit(url), Either.map((url) => url.replace(FIT_EXPR, `fit/${size}/`)), Either.getOrElse(() => url));
|
|
88
|
+
};
|
|
89
|
+
const Linked = (props, child) => props.deeplink ? (h("a", { class: props.part, part: props.part, href: props.deeplink }, child)) : (child);
|
|
90
|
+
const FormattedPrice = (props) => {
|
|
91
|
+
var _a;
|
|
92
|
+
const locale = props.locale;
|
|
93
|
+
const formattedPrice = new Intl.NumberFormat(locale, {
|
|
94
|
+
minimumFractionDigits: 2,
|
|
95
|
+
}).format(props.price);
|
|
96
|
+
const fullPrice = `${(_a = props.prefix) !== null && _a !== void 0 ? _a : ""} ${formattedPrice} ${props.currency}`;
|
|
97
|
+
return (h("span", { class: "price-amount", part: "price-amount" }, fullPrice));
|
|
98
|
+
};
|
|
99
|
+
const Price = (props) => {
|
|
100
|
+
const priceEl = (h(FormattedPrice, { prefix: props.prefix, currency: props.currency, price: props.price, locale: props.locale }));
|
|
101
|
+
return (h("span", { class: "price-container", part: "price-container" }, props.salePrice ? ([
|
|
102
|
+
h("span", { class: "price-sale", part: "price-sale" },
|
|
103
|
+
h(FormattedPrice, { prefix: props.prefix, currency: props.currency, price: props.salePrice, locale: props.locale })),
|
|
104
|
+
h("span", { class: "price-outdated", part: "price-outdated" }, priceEl),
|
|
105
|
+
]) : (h("span", { class: "price-regular", part: "price-regular" }, priceEl))));
|
|
106
|
+
};
|
|
107
|
+
const Image = (props, onLoadEnd = () => undefined) => (h("picture", null,
|
|
108
|
+
h("img", { loading: props.lazy ? "lazy" : "eager", part: "image", class: "image", width: props.width, height: props.height, src: processWidth(props.src, props.width), alt: props.title, onLoad: onLoadEnd })));
|
|
109
|
+
const ResponsiveImage = (props, onLoadEnd = () => undefined) => (h("picture", null,
|
|
110
|
+
h("img", { loading: props.lazy ? "lazy" : "eager", part: "image", class: "image responsive", src: processWidth(props.src, props.width), alt: props.title, onLoad: onLoadEnd })));
|
|
111
|
+
|
|
112
|
+
const vviinnProductCardCss = ":host{align-items:center;display:flex;flex-direction:column;gap:8px;height:100%}.price-container{display:flex;flex-direction:column}.price-sale,.price-regular{font-style:normal;font-weight:normal;font-size:16px;line-height:24px;color:#161616}.price-outdated{font-style:normal;font-weight:normal;font-size:16px;line-height:24px;color:#757575;text-decoration:line-through}.product-type{word-wrap:anywhere}.image{display:grid;align-content:center;-o-object-position:50% 50%;object-position:50% 50%;-o-object-fit:contain;object-fit:contain;text-align:center;box-sizing:border-box}img.responsive{width:100%;height:auto;aspect-ratio:1}.brand,.type{display:none}.title{-webkit-box-orient:vertical;-webkit-line-clamp:2;color:#161616;display:-webkit-box;font-size:16px;font-style:normal;font-weight:500;line-height:24px;margin-bottom:8px;overflow:hidden}.deeplink{text-decoration:none}.image-link{display:contents}picture{position:relative;width:100%}:host(.dimmed) picture::before{content:\"\";width:100%;height:100%;box-sizing:border-box;background:#f7f7f7;display:block;top:0;left:0;position:absolute;mix-blend-mode:multiply}";
|
|
113
|
+
|
|
114
|
+
let VviinnProductCard = class {
|
|
115
|
+
constructor(hostRef) {
|
|
116
|
+
registerInstance(this, hostRef);
|
|
117
|
+
this.recommendationLoad = createEvent(this, "recommendationLoad", 7);
|
|
118
|
+
this.recommendationView = createEvent(this, "recommendationView", 7);
|
|
119
|
+
this.recommendationClick = createEvent(this, "recommendationClick", 7);
|
|
120
|
+
this.productImageLoaded = createEvent(this, "productImageLoaded", 7);
|
|
121
|
+
this.currency = undefined;
|
|
122
|
+
this.imageRatio = 1;
|
|
123
|
+
this.imageWidth = 200;
|
|
124
|
+
this.locale = undefined;
|
|
125
|
+
this.pricePrefix = undefined;
|
|
126
|
+
this.responsive = false;
|
|
127
|
+
this.dimmedBackground = false;
|
|
128
|
+
/** @internal */
|
|
129
|
+
this.index = 0;
|
|
130
|
+
this.imageLoaded = false;
|
|
131
|
+
this.productData = null;
|
|
132
|
+
this.intersectionObserver = new IntersectionObserver(this.intersectionCallback.bind(this), { threshold: 1.0 });
|
|
133
|
+
}
|
|
134
|
+
connectedCallback() {
|
|
135
|
+
this.productData = {
|
|
136
|
+
product: this.productId,
|
|
137
|
+
rank: this.index,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
intersectionCallback(data) {
|
|
141
|
+
if (data.some((entry) => entry.isIntersecting)) {
|
|
142
|
+
_function.pipe(getAnalyticsModule, Option.map((analytics) => analytics.sendImpression(this.getProduct())));
|
|
143
|
+
this.recommendationView.emit(this.productData);
|
|
144
|
+
this.intersectionObserver.disconnect();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
componentDidLoad() {
|
|
148
|
+
this.recommendationLoad.emit(this.productData);
|
|
149
|
+
this.intersectionObserver.observe(this.el);
|
|
150
|
+
const links = this.el.shadowRoot.querySelectorAll("a");
|
|
151
|
+
links.forEach((link) => link.addEventListener("click", (event) => {
|
|
152
|
+
event.preventDefault();
|
|
153
|
+
event.stopImmediatePropagation();
|
|
154
|
+
this.recommendationClick.emit(this.productData);
|
|
155
|
+
_function.pipe(getAnalyticsModule, Option.match(() => null, (analytics) => analytics.sendClick(this.getProduct())));
|
|
156
|
+
}));
|
|
157
|
+
}
|
|
158
|
+
getProduct() {
|
|
159
|
+
return imageSearchState.results.find((r) => r.productId === this.productId);
|
|
160
|
+
}
|
|
161
|
+
renderImage() {
|
|
162
|
+
const props = {
|
|
163
|
+
width: this.imageWidth,
|
|
164
|
+
height: this.imageWidth * this.imageRatio,
|
|
165
|
+
src: this.image,
|
|
166
|
+
title: this.productTitle,
|
|
167
|
+
lazy: false,
|
|
168
|
+
};
|
|
169
|
+
return this.responsive
|
|
170
|
+
? ResponsiveImage(props, () => this.kek())
|
|
171
|
+
: Image(props, () => this.kek());
|
|
172
|
+
}
|
|
173
|
+
kek() {
|
|
174
|
+
this.productImageLoaded.emit(this.productId);
|
|
175
|
+
}
|
|
176
|
+
render() {
|
|
177
|
+
var _a, _b, _c;
|
|
178
|
+
return (h(Host, { part: "product-card", class: { dimmed: this.dimmedBackground }, exportparts: "brand, currency, deeplink, image, image-link, price-amount, price-container, price-outdated, price-prefix, price-regular, price-sale, title" }, h(Linked, { deeplink: this.deeplink, part: "image-link" }, this.renderImage()), h(Linked, { deeplink: this.deeplink, part: "deeplink" }, h("span", { class: "title", part: "title" }, this.productTitle)), h("span", { class: "brand", part: "brand" }, this.brand), h("span", { class: "type", part: "type" }, this.productType), h(Price, { prefix: (_a = this.pricePrefix) !== null && _a !== void 0 ? _a : state.pricePrefix, currency: (_b = this.currency) !== null && _b !== void 0 ? _b : state.currencySign, price: this.price, salePrice: this.salePrice, locale: (_c = this.locale) !== null && _c !== void 0 ? _c : state.locale })));
|
|
179
|
+
}
|
|
180
|
+
get el() { return getElement(this); }
|
|
181
|
+
};
|
|
182
|
+
VviinnProductCard.style = vviinnProductCardCss;
|
|
183
|
+
|
|
184
|
+
export { VviinnProductCard as vviinn_product_card };
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-0f5516a6.js');
|
|
6
|
-
const index$1 = require('./index-31b9cb7a.js');
|
|
1
|
+
import { r as registerInstance, f as createEvent, h, e as Host, g as getElement } from './index-89051fa8.js';
|
|
2
|
+
import { a as CrossIcon } from './index-533f9255.js';
|
|
7
3
|
|
|
8
4
|
const recommendationsSidebarCss = ":host{--vviinn-carousel-columns:0;box-sizing:border-box;display:block;display:flex;height:100vh;left:0;position:fixed;top:0;transition:background 0.1s ease-in-out;width:100vw}:host(.open){background:rgba(0, 0, 0, 0.2)}:host(.bottom){flex-direction:column;justify-content:end}:host(.right){flex-direction:row;justify-content:flex-end}header{position:relative;text-align:center;padding:32px}header.contains-source-img{display:grid;justify-items:center;grid-gap:12px}img.source-image{width:64px;height:64px;border-radius:50%;box-shadow:0px 2px 4px rgba(0, 0, 0, 0.15);padding:8px}:host(.right) header{box-shadow:0px 2px 6px rgba(0, 0, 0, 0.1)}main{padding:0 24px}:host(.right) main{overflow:auto}.sidebar{background:white;box-sizing:border-box;display:flex;flex-direction:column}:host(.bottom.idle) .sidebar,:host(.bottom.closed) .sidebar{transform:translateY(100%)}:host(.bottom.closed) .sidebar{-webkit-animation-name:slideOutFromBottom;animation-name:slideOutFromBottom;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.bottom.open) .sidebar{-webkit-animation-name:slideInFromBottom;animation-name:slideInFromBottom;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.right.idle) .sidebar{transform:translateX(100%)}:host(.right.closed) .sidebar{-webkit-animation-name:slideOutFromRight;animation-name:slideOutFromRight;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.right.open) .sidebar{-webkit-animation-name:slideInFromRight;animation-name:slideInFromRight;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.right) .sidebar{max-width:480px}:host(.right) vviinn-vpr-widget::part(recommendations-grid){display:grid;grid-template-columns:repeat(2, 1fr);grid-gap:24px}:host(.right) vviinn-vpr-widget{overflow:auto}:host(.right) vviinn-vpr-widget::part(image){border:none}.title{font-style:normal;font-weight:500;font-size:28px;line-height:40px;text-align:center;color:#000000}vviinn-vpr-widget::part(title),vviinn-vpr-widget::part(brand),vviinn-vpr-widget::part(type){text-align:left}vviinn-vpr-widget::part(price-container){align-self:start}.close-sidebar{background:transparent;border:none;cursor:pointer;margin:0;padding:0;position:absolute;right:24px;top:24px}@-webkit-keyframes slideInFromBottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideInFromBottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@-webkit-keyframes slideOutFromBottom{from{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes slideOutFromBottom{from{transform:translateY(0)}to{transform:translateY(100%)}}@-webkit-keyframes slideInFromRight{from{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slideInFromRight{from{transform:translateX(100%)}to{transform:translateX(0)}}@-webkit-keyframes slideOutFromRight{from{transform:translateX(0)}to{transform:translateX(100%)}}@keyframes slideOutFromRight{from{transform:translateX(0)}to{transform:translateX(100%)}}";
|
|
9
5
|
|
|
10
6
|
let RecommendationsSidebar = class {
|
|
11
7
|
constructor(hostRef) {
|
|
12
|
-
|
|
13
|
-
this.modalClosed =
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.modalClosed = createEvent(this, "modalClosed", 7);
|
|
14
10
|
this.position = "bottom";
|
|
15
11
|
this.sourceImage = null;
|
|
16
12
|
this.widgetScrollbar = false;
|
|
13
|
+
/** comma-separated list of campaign-ids */
|
|
14
|
+
this.campaigns = "";
|
|
17
15
|
this.state = "idle";
|
|
18
16
|
}
|
|
19
17
|
bodyClickListener(event) {
|
|
@@ -41,10 +39,10 @@ let RecommendationsSidebar = class {
|
|
|
41
39
|
return (_a = this.el.shadowRoot.querySelector("aside")) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
42
40
|
}
|
|
43
41
|
render() {
|
|
44
|
-
return (
|
|
42
|
+
return (h(Host, { class: this.getClassMap() }, h("aside", { class: "sidebar", part: "body", onAnimationEnd: (e) => this.handleAnimationEnd(e) }, h("header", { class: { "contains-source-img": this.isSourceImageValid() }, part: "sidebar-header" }, this.isSourceImageValid() ? this.renderSourceImage() : null, h("span", { class: "title", part: "title" }, this.sidebarTitle), h("button", { class: "close-sidebar", onClick: () => (this.state = "closed") }, h(CrossIcon, null))), h("main", { part: "sidebar-content" }, h("vviinn-vpr-widget", { exportparts: "brand, currency, deeplink, image, image-link, price-amount, price-container, price-outdated, price-prefix, price-regular, price-sale, title: product-title", token: this.token, productId: this.productId, imageWidth: 300, blockTitle: "", mode: this.position === "bottom" ? "continuity" : "grid", useCarousel: this.position === "bottom", onRecommendationsLoaded: () => (this.state = "open"), showScroll: this.widgetScrollbar, campaigns: this.campaigns })))));
|
|
45
43
|
}
|
|
46
44
|
renderSourceImage() {
|
|
47
|
-
return (
|
|
45
|
+
return (h("img", { class: "source-image", part: "source-image", src: this.sourceImage }));
|
|
48
46
|
}
|
|
49
47
|
isSourceImageValid() {
|
|
50
48
|
var _a;
|
|
@@ -56,8 +54,8 @@ let RecommendationsSidebar = class {
|
|
|
56
54
|
return;
|
|
57
55
|
this.modalClosed.emit();
|
|
58
56
|
}
|
|
59
|
-
get el() { return
|
|
57
|
+
get el() { return getElement(this); }
|
|
60
58
|
};
|
|
61
59
|
RecommendationsSidebar.style = recommendationsSidebarCss;
|
|
62
60
|
|
|
63
|
-
|
|
61
|
+
export { RecommendationsSidebar as vviinn_recommendations_sidebar };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { r as registerInstance, f as createEvent, h, e as Host } from './index-89051fa8.js';
|
|
2
|
+
|
|
3
|
+
const vviinnServerErrorCss = ":host{display:block}";
|
|
4
|
+
|
|
5
|
+
let VviinnServerError = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.actionClick = createEvent(this, "actionClick", 7);
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
return (h(Host, null, h("vviinn-error", null, h("h4", { slot: "title" }, "Keine Verbindung"), h("span", { slot: "text" }, "Etwas hat leider nicht funktioniert. Bitte pr\u00FCfen Sie Ihre Internetverbindung und laden Sie das Bild noch einmal hoch."), h("button", { slot: "action", onClick: () => this.actionClick.emit() }, "Erneut versuchen"))));
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
VviinnServerError.style = vviinnServerErrorCss;
|
|
15
|
+
|
|
16
|
+
export { VviinnServerError as vviinn_server_error };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { r as registerInstance, h, e as Host } from './index-89051fa8.js';
|
|
2
|
+
|
|
3
|
+
const vviinnSlideCss = ":host{display:grid;justify-items:center}";
|
|
4
|
+
|
|
5
|
+
let VviinnSlide = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
return (h(Host, null, h("slot", null)));
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
VviinnSlide.style = vviinnSlideCss;
|
|
14
|
+
|
|
15
|
+
export { VviinnSlide as vviinn_slide };
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { h, r as registerInstance, e as Host, g as getElement } from './index-89051fa8.js';
|
|
2
|
+
import { N as NonEmptyArray, _ as _function } from './NonEmptyArray-947ab7b3.js';
|
|
3
|
+
import { O as Option, s as sequenceToOption, a as Ord } from './number-171db649.js';
|
|
4
|
+
import { A as ArrowIcon } from './index-533f9255.js';
|
|
5
|
+
|
|
6
|
+
const getStyleMap = (data) => {
|
|
7
|
+
return {
|
|
8
|
+
"arrow-wrapper": true,
|
|
9
|
+
[data.kind]: true,
|
|
10
|
+
disabled: data.disabled,
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
const Arrow = ({ kind, tabindex, disabled, onClick, onKeyDown, }) => (h("div", { class: getStyleMap({ kind, disabled }), onClick: onClick, tabindex: tabindex, onKeyDown: onKeyDown },
|
|
14
|
+
h(ArrowIcon, null)));
|
|
15
|
+
|
|
16
|
+
const vviinnSliderCss = ":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{--num-items:0;--position:0;display:grid;grid-gap:20px;justify-items:center;position:relative}.items-wrapper{overflow:hidden;width:100%}.items{box-sizing:border-box;display:grid;grid-auto-flow:column;grid-template-columns:repeat(var(--num-items), 100%);transform:translateX(calc(-100% * var(--position)));transition:transform 0.33s ease-in-out}.controls{display:grid;grid-gap:16px;grid-template-columns:repeat(var(--num-items), -webkit-min-content);grid-template-columns:repeat(var(--num-items), min-content)}.bullet{background:#E0E0E0;border-radius:50%;box-sizing:border-box;cursor:pointer;height:8px;width:8px;transition:background 0.1s ease-in-out}.bullet:hover{background:#C6C6C6}.bullet.active{background:var(--color-primary, var(--color-primary-system))}.bullet:active{background:transparent;border:2px solid var(--color-primary, var(--color-primary-system))}.arrow-wrapper{align-items:center;background:white;border:2px solid white;bottom:0;box-sizing:border-box;display:grid;height:calc(var(--spacer) * 6);justify-items:center;margin:auto;position:absolute;top:0;transform:translate3d(0, -50%, 0);transition:border 0.25ms ease-in-out;width:calc(var(--spacer) * 4)}.arrow-wrapper:active{border-color:var(--color-primary, var(--color-primary-system));opacity:0.75}.arrow-wrapper:focus{border-color:var(--color-primary, var(--color-primary-system));opacity:0.5;outline:none}.prev{left:0}.next{right:0}.next>svg{transform:rotate3d(0, 1, 0, 180deg)}.arrow-wrapper>svg{transition:fill 0.25ms ease-in-out;fill:#A8A8A8}.arrow-wrapper:hover>svg{fill:#8D8D8D}";
|
|
17
|
+
|
|
18
|
+
let VviinnSlider = class {
|
|
19
|
+
constructor(hostRef) {
|
|
20
|
+
registerInstance(this, hostRef);
|
|
21
|
+
this.elementsCount = 0;
|
|
22
|
+
this.internalPosition = 0;
|
|
23
|
+
this.swipeStartPosition = Option.none;
|
|
24
|
+
this.showBullets = true;
|
|
25
|
+
this.position = 0;
|
|
26
|
+
this.showArrows = false;
|
|
27
|
+
}
|
|
28
|
+
positionWatchHandler(newValue) {
|
|
29
|
+
this.internalPosition = newValue;
|
|
30
|
+
this.el.style.setProperty("--position", `${newValue}`);
|
|
31
|
+
this.setActiveCssClassToSlide(newValue);
|
|
32
|
+
}
|
|
33
|
+
connectedCallback() {
|
|
34
|
+
this.handleDomContentChanges();
|
|
35
|
+
}
|
|
36
|
+
handleDomContentChanges() {
|
|
37
|
+
const items = this.el.querySelectorAll("vviinn-slide");
|
|
38
|
+
this.elementsCount = items.length;
|
|
39
|
+
this.el.style.setProperty("--num-items", `${this.elementsCount}`);
|
|
40
|
+
this.setActiveCssClassToSlide(0);
|
|
41
|
+
}
|
|
42
|
+
setActiveCssClassToSlide(index) {
|
|
43
|
+
const items = this.el.querySelectorAll("vviinn-slide");
|
|
44
|
+
items.forEach((i) => i.classList.remove("active"));
|
|
45
|
+
items[index].classList.add("active");
|
|
46
|
+
}
|
|
47
|
+
goToSlide(index) {
|
|
48
|
+
this.internalPosition = index;
|
|
49
|
+
this.el.style.setProperty("--position", `${index}`);
|
|
50
|
+
this.setActiveCssClassToSlide(index);
|
|
51
|
+
}
|
|
52
|
+
renderBullets() {
|
|
53
|
+
return this.showBullets ? (h("div", { class: "controls" }, NonEmptyArray.range(0, this.elementsCount - 1).map((i) => (h("div", { class: {
|
|
54
|
+
bullet: true,
|
|
55
|
+
active: i == this.internalPosition % this.elementsCount,
|
|
56
|
+
}, onClick: () => this.goToSlide(i) }))))) : null;
|
|
57
|
+
}
|
|
58
|
+
nextSlide() {
|
|
59
|
+
this.internalPosition++;
|
|
60
|
+
this.renderSlidePosition();
|
|
61
|
+
}
|
|
62
|
+
prevSlide() {
|
|
63
|
+
const nextPostion = this.internalPosition - 1;
|
|
64
|
+
this.internalPosition =
|
|
65
|
+
nextPostion > -1 ? nextPostion : this.elementsCount - 1;
|
|
66
|
+
this.renderSlidePosition();
|
|
67
|
+
}
|
|
68
|
+
renderSlidePosition() {
|
|
69
|
+
requestAnimationFrame(() => {
|
|
70
|
+
this.el.style.setProperty("--position", `${this.internalPosition % this.elementsCount}`);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
handleKeyDown(event) {
|
|
74
|
+
if (event.key !== "Space" && event.key !== "Enter")
|
|
75
|
+
return;
|
|
76
|
+
const target = event.target;
|
|
77
|
+
const direction = target.className.includes("prev") ? "prev" : "next";
|
|
78
|
+
switch (direction) {
|
|
79
|
+
case "prev":
|
|
80
|
+
this.prevSlide();
|
|
81
|
+
break;
|
|
82
|
+
case "next":
|
|
83
|
+
this.nextSlide();
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
handleTouchStart(event) {
|
|
88
|
+
if (!this.showBullets)
|
|
89
|
+
return;
|
|
90
|
+
this.swipeStartPosition = _function.pipe(event.touches[0], Option.fromNullable, Option.map((t) => t.clientX));
|
|
91
|
+
}
|
|
92
|
+
handleTouchEnd(event) {
|
|
93
|
+
if (!this.showBullets)
|
|
94
|
+
return;
|
|
95
|
+
const swipeEndPosition = _function.pipe(event.changedTouches[0], Option.fromNullable, Option.map((t) => t.clientX));
|
|
96
|
+
_function.pipe(sequenceToOption(this.swipeStartPosition, swipeEndPosition), Option.map(([start, end]) => Ord.compare(start, end)), Option.map((swipeDirection) => {
|
|
97
|
+
switch (swipeDirection) {
|
|
98
|
+
case 1:
|
|
99
|
+
return this.nextSlide();
|
|
100
|
+
case -1:
|
|
101
|
+
return this.prevSlide();
|
|
102
|
+
}
|
|
103
|
+
}));
|
|
104
|
+
}
|
|
105
|
+
render() {
|
|
106
|
+
return (h(Host, null, h("div", { class: "items-wrapper" }, h("div", { class: "items", onTouchStart: (e) => this.handleTouchStart(e), onTouchEnd: (e) => this.handleTouchEnd(e) }, h("slot", null))), this.showArrows
|
|
107
|
+
? [
|
|
108
|
+
h(Arrow, { kind: "prev", onClick: () => this.prevSlide(), onKeyDown: (ev) => this.handleKeyDown(ev), tabindex: 1, disabled: false }),
|
|
109
|
+
h(Arrow, { kind: "next", onClick: () => this.nextSlide(), onKeyDown: (ev) => this.handleKeyDown(ev), tabindex: 0, disabled: false }),
|
|
110
|
+
]
|
|
111
|
+
: null, this.renderBullets()));
|
|
112
|
+
}
|
|
113
|
+
get el() { return getElement(this); }
|
|
114
|
+
static get watchers() { return {
|
|
115
|
+
"position": ["positionWatchHandler"]
|
|
116
|
+
}; }
|
|
117
|
+
};
|
|
118
|
+
VviinnSlider.style = vviinnSliderCss;
|
|
119
|
+
|
|
120
|
+
export { VviinnSlider as vviinn_slider };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { r as registerInstance, h, e as Host, g as getElement } from './index-89051fa8.js';
|
|
2
|
+
import { s as slotChangeListener } from './customized-slots-fb9b3e5f.js';
|
|
3
|
+
|
|
4
|
+
const vviinnTeaserCss = ":host{align-items:center;display:grid;justify-items:center;grid-gap:16px}.vviinn-teaser-text{font-size:28px;font-weight:600;line-height:40px;size:28px;text-align:center}";
|
|
5
|
+
|
|
6
|
+
let VviinnTeaser = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
}
|
|
10
|
+
componentWillLoad() {
|
|
11
|
+
slotChangeListener(this, this.el);
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return (h(Host, null, h("slot", null, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "64", height: "64", fill: "none" }, h("defs", null), h("path", { fill: "#C6C6C6", d: "M48 28a11.98 11.98 0 00-9.77 18.942L28 57.172 30.828 60l10.23-10.23A11.994 11.994 0 1048 28zm0 20a8 8 0 118-8 8.009 8.009 0 01-8 8zM34 24a6 6 0 10-6-6 6.006 6.006 0 006 6zm0-8a2 2 0 110 4 2 2 0 010-4z" }), h("path", { fill: "#C6C6C6", d: "M24 48H8V35.993L18 26l11.172 11.172L32 34.336 20.828 23.165a4 4 0 00-5.656 0L8 30.336V8h40v12h4V8a4.004 4.004 0 00-4-4H8a4.004 4.004 0 00-4 4v40a4.005 4.005 0 004 4h16v-4z" })), h("span", { class: "vviinn-teaser-text" }, h("slot", { name: "vviinn-teaser-text" }, "Finde Produkte auf ", h("br", null), " einem Foto")))));
|
|
15
|
+
}
|
|
16
|
+
get el() { return getElement(this); }
|
|
17
|
+
};
|
|
18
|
+
VviinnTeaser.style = vviinnTeaserCss;
|
|
19
|
+
|
|
20
|
+
export { VviinnTeaser as vviinn_teaser };
|
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-0f5516a6.js');
|
|
6
|
-
const index$1 = require('./index-31b9cb7a.js');
|
|
1
|
+
import { r as registerInstance, h, e as Host } from './index-89051fa8.js';
|
|
2
|
+
import { V as VisualSearchIcon } from './index-533f9255.js';
|
|
7
3
|
|
|
8
4
|
const vviinnVprButtonCss = ":host{display:block}.open-button{align-items:center;background:rgba(255, 255, 255, 0.8);border-radius:50%;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);box-sizing:border-box;cursor:pointer;display:grid;height:40px;justify-items:center;padding:0;width:40px;transition:all 0.25s ease-in-out}.open-button:hover{box-shadow:0px 2px 6px rgba(0, 0, 0, 0.25)}.open-button:focus{border:2px solid rgba(15, 98, 254, 0.5);outline:none}.open-button:active{background:#F4F4F4;outline:none}";
|
|
9
5
|
|
|
10
6
|
let VviinnVprButton = class {
|
|
11
7
|
constructor(hostRef) {
|
|
12
|
-
|
|
8
|
+
registerInstance(this, hostRef);
|
|
13
9
|
this.position = "bottom";
|
|
14
10
|
this.sourceImage = null;
|
|
15
11
|
this.sidebarTitle = "Visually similar products";
|
|
16
12
|
this.modalScrollbar = false;
|
|
13
|
+
/** comma-separated list of campaign-ids */
|
|
14
|
+
this.campaigns = "";
|
|
17
15
|
this.sidebar = null;
|
|
18
16
|
this.sidebarCloseListener = () => {
|
|
19
17
|
document.body.removeChild(this.sidebar);
|
|
20
18
|
};
|
|
21
19
|
}
|
|
22
20
|
render() {
|
|
23
|
-
return (
|
|
21
|
+
return (h(Host, null, h("button", { class: "open-button", part: "button", onClick: () => this.handleClick() }, h("slot", null, h(VisualSearchIcon, null)))));
|
|
24
22
|
}
|
|
25
23
|
handleClick() {
|
|
26
24
|
const sidebar = document.createElement("vviinn-recommendations-sidebar");
|
|
@@ -30,15 +28,18 @@ let VviinnVprButton = class {
|
|
|
30
28
|
sidebar.position = this.position;
|
|
31
29
|
sidebar.sourceImage = this.sourceImage;
|
|
32
30
|
sidebar.widgetScrollbar = this.modalScrollbar;
|
|
31
|
+
sidebar.campaigns = this.campaigns;
|
|
33
32
|
this.sidebar = sidebar;
|
|
34
33
|
sidebar.addEventListener("modalClosed", this.sidebarCloseListener);
|
|
35
34
|
document.body.append(this.sidebar);
|
|
36
35
|
}
|
|
37
36
|
disconnectedCallback() {
|
|
37
|
+
if (!this.sidebar)
|
|
38
|
+
return;
|
|
38
39
|
this.sidebar.removeEventListener("modalCLosed", this.sidebarCloseListener);
|
|
39
40
|
document.body.removeChild(this.sidebar);
|
|
40
41
|
}
|
|
41
42
|
};
|
|
42
43
|
VviinnVprButton.style = vviinnVprButtonCss;
|
|
43
44
|
|
|
44
|
-
|
|
45
|
+
export { VviinnVprButton as vviinn_vpr_button };
|