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
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { Component, Host, h, Prop, State, Listen, Element, Event, } from "@stencil/core";
|
|
2
|
-
import { CrossIcon } from "../../vviinn-icons";
|
|
3
|
-
export class RecommendationsSidebar {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.position = "bottom";
|
|
6
|
-
this.sourceImage = null;
|
|
7
|
-
this.widgetScrollbar = false;
|
|
8
|
-
this.state = "idle";
|
|
9
|
-
}
|
|
10
|
-
bodyClickListener(event) {
|
|
11
|
-
const { clientX, clientY } = event;
|
|
12
|
-
const sidebarRect = this.getSidebarRectangle();
|
|
13
|
-
if (!sidebarRect)
|
|
14
|
-
return;
|
|
15
|
-
const inLeftBound = clientX >= sidebarRect.left;
|
|
16
|
-
const inRightBound = clientX <= sidebarRect.right;
|
|
17
|
-
const inTopBound = clientY >= sidebarRect.top;
|
|
18
|
-
const inBottomBound = clientY <= sidebarRect.bottom;
|
|
19
|
-
const inBound = inLeftBound && inRightBound && inTopBound && inBottomBound;
|
|
20
|
-
if (!inBound) {
|
|
21
|
-
this.state = "closed";
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
getClassMap() {
|
|
25
|
-
return {
|
|
26
|
-
[this.position]: true,
|
|
27
|
-
[this.state]: true,
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
getSidebarRectangle() {
|
|
31
|
-
var _a;
|
|
32
|
-
return (_a = this.el.shadowRoot.querySelector("aside")) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
33
|
-
}
|
|
34
|
-
render() {
|
|
35
|
-
return (h(Host, { class: this.getClassMap() },
|
|
36
|
-
h("aside", { class: "sidebar", part: "body", onAnimationEnd: (e) => this.handleAnimationEnd(e) },
|
|
37
|
-
h("header", { class: { "contains-source-img": this.isSourceImageValid() }, part: "sidebar-header" },
|
|
38
|
-
this.isSourceImageValid() ? this.renderSourceImage() : null,
|
|
39
|
-
h("span", { class: "title", part: "title" }, this.sidebarTitle),
|
|
40
|
-
h("button", { class: "close-sidebar", onClick: () => (this.state = "closed") },
|
|
41
|
-
h(CrossIcon, null))),
|
|
42
|
-
h("main", { part: "sidebar-content" },
|
|
43
|
-
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 })))));
|
|
44
|
-
}
|
|
45
|
-
renderSourceImage() {
|
|
46
|
-
return (h("img", { class: "source-image", part: "source-image", src: this.sourceImage }));
|
|
47
|
-
}
|
|
48
|
-
isSourceImageValid() {
|
|
49
|
-
var _a;
|
|
50
|
-
return ((_a = this.sourceImage) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
51
|
-
}
|
|
52
|
-
handleAnimationEnd({ animationName }) {
|
|
53
|
-
const isClosingAnimation = animationName.includes("slideOut");
|
|
54
|
-
if (!isClosingAnimation)
|
|
55
|
-
return;
|
|
56
|
-
this.modalClosed.emit();
|
|
57
|
-
}
|
|
58
|
-
static get is() { return "vviinn-recommendations-sidebar"; }
|
|
59
|
-
static get encapsulation() { return "shadow"; }
|
|
60
|
-
static get originalStyleUrls() { return {
|
|
61
|
-
"$": ["recommendations-sidebar.css"]
|
|
62
|
-
}; }
|
|
63
|
-
static get styleUrls() { return {
|
|
64
|
-
"$": ["recommendations-sidebar.css"]
|
|
65
|
-
}; }
|
|
66
|
-
static get properties() { return {
|
|
67
|
-
"sidebarTitle": {
|
|
68
|
-
"type": "string",
|
|
69
|
-
"mutable": false,
|
|
70
|
-
"complexType": {
|
|
71
|
-
"original": "string",
|
|
72
|
-
"resolved": "string",
|
|
73
|
-
"references": {}
|
|
74
|
-
},
|
|
75
|
-
"required": false,
|
|
76
|
-
"optional": false,
|
|
77
|
-
"docs": {
|
|
78
|
-
"tags": [],
|
|
79
|
-
"text": ""
|
|
80
|
-
},
|
|
81
|
-
"attribute": "sidebar-title",
|
|
82
|
-
"reflect": false
|
|
83
|
-
},
|
|
84
|
-
"token": {
|
|
85
|
-
"type": "string",
|
|
86
|
-
"mutable": false,
|
|
87
|
-
"complexType": {
|
|
88
|
-
"original": "string",
|
|
89
|
-
"resolved": "string",
|
|
90
|
-
"references": {}
|
|
91
|
-
},
|
|
92
|
-
"required": false,
|
|
93
|
-
"optional": false,
|
|
94
|
-
"docs": {
|
|
95
|
-
"tags": [],
|
|
96
|
-
"text": ""
|
|
97
|
-
},
|
|
98
|
-
"attribute": "token",
|
|
99
|
-
"reflect": false
|
|
100
|
-
},
|
|
101
|
-
"productId": {
|
|
102
|
-
"type": "string",
|
|
103
|
-
"mutable": false,
|
|
104
|
-
"complexType": {
|
|
105
|
-
"original": "string",
|
|
106
|
-
"resolved": "string",
|
|
107
|
-
"references": {}
|
|
108
|
-
},
|
|
109
|
-
"required": false,
|
|
110
|
-
"optional": false,
|
|
111
|
-
"docs": {
|
|
112
|
-
"tags": [],
|
|
113
|
-
"text": ""
|
|
114
|
-
},
|
|
115
|
-
"attribute": "product-id",
|
|
116
|
-
"reflect": false
|
|
117
|
-
},
|
|
118
|
-
"position": {
|
|
119
|
-
"type": "string",
|
|
120
|
-
"mutable": false,
|
|
121
|
-
"complexType": {
|
|
122
|
-
"original": "\"bottom\" | \"right\"",
|
|
123
|
-
"resolved": "\"bottom\" | \"right\"",
|
|
124
|
-
"references": {}
|
|
125
|
-
},
|
|
126
|
-
"required": false,
|
|
127
|
-
"optional": false,
|
|
128
|
-
"docs": {
|
|
129
|
-
"tags": [],
|
|
130
|
-
"text": ""
|
|
131
|
-
},
|
|
132
|
-
"attribute": "position",
|
|
133
|
-
"reflect": false,
|
|
134
|
-
"defaultValue": "\"bottom\""
|
|
135
|
-
},
|
|
136
|
-
"sourceImage": {
|
|
137
|
-
"type": "string",
|
|
138
|
-
"mutable": false,
|
|
139
|
-
"complexType": {
|
|
140
|
-
"original": "string | null",
|
|
141
|
-
"resolved": "string",
|
|
142
|
-
"references": {}
|
|
143
|
-
},
|
|
144
|
-
"required": false,
|
|
145
|
-
"optional": false,
|
|
146
|
-
"docs": {
|
|
147
|
-
"tags": [],
|
|
148
|
-
"text": ""
|
|
149
|
-
},
|
|
150
|
-
"attribute": "source-image",
|
|
151
|
-
"reflect": false,
|
|
152
|
-
"defaultValue": "null"
|
|
153
|
-
},
|
|
154
|
-
"widgetScrollbar": {
|
|
155
|
-
"type": "boolean",
|
|
156
|
-
"mutable": false,
|
|
157
|
-
"complexType": {
|
|
158
|
-
"original": "boolean",
|
|
159
|
-
"resolved": "boolean",
|
|
160
|
-
"references": {}
|
|
161
|
-
},
|
|
162
|
-
"required": false,
|
|
163
|
-
"optional": false,
|
|
164
|
-
"docs": {
|
|
165
|
-
"tags": [],
|
|
166
|
-
"text": ""
|
|
167
|
-
},
|
|
168
|
-
"attribute": "widget-scrollbar",
|
|
169
|
-
"reflect": false,
|
|
170
|
-
"defaultValue": "false"
|
|
171
|
-
}
|
|
172
|
-
}; }
|
|
173
|
-
static get states() { return {
|
|
174
|
-
"state": {}
|
|
175
|
-
}; }
|
|
176
|
-
static get events() { return [{
|
|
177
|
-
"method": "modalClosed",
|
|
178
|
-
"name": "modalClosed",
|
|
179
|
-
"bubbles": true,
|
|
180
|
-
"cancelable": true,
|
|
181
|
-
"composed": true,
|
|
182
|
-
"docs": {
|
|
183
|
-
"tags": [],
|
|
184
|
-
"text": ""
|
|
185
|
-
},
|
|
186
|
-
"complexType": {
|
|
187
|
-
"original": "void",
|
|
188
|
-
"resolved": "void",
|
|
189
|
-
"references": {}
|
|
190
|
-
}
|
|
191
|
-
}]; }
|
|
192
|
-
static get elementRef() { return "el"; }
|
|
193
|
-
static get listeners() { return [{
|
|
194
|
-
"name": "click",
|
|
195
|
-
"method": "bodyClickListener",
|
|
196
|
-
"target": "body",
|
|
197
|
-
"capture": false,
|
|
198
|
-
"passive": false
|
|
199
|
-
}]; }
|
|
200
|
-
}
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
export const argTypes = {
|
|
2
|
-
buttonSize: {
|
|
3
|
-
name: "Button size",
|
|
4
|
-
options: ["Default", "Small", "Large"],
|
|
5
|
-
mapping: {
|
|
6
|
-
Default: 40,
|
|
7
|
-
Small: 32,
|
|
8
|
-
Large: 48,
|
|
9
|
-
},
|
|
10
|
-
control: {
|
|
11
|
-
type: "select",
|
|
12
|
-
labels: {
|
|
13
|
-
Default: "Default (40px)",
|
|
14
|
-
Small: "Small (32px)",
|
|
15
|
-
Large: "Large (48px)",
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
defaultValue: "Default",
|
|
19
|
-
},
|
|
20
|
-
iconColor: {
|
|
21
|
-
name: "Icon color",
|
|
22
|
-
control: {
|
|
23
|
-
type: "color",
|
|
24
|
-
},
|
|
25
|
-
defaultValue: "#000000",
|
|
26
|
-
},
|
|
27
|
-
backgroundColor: {
|
|
28
|
-
name: "Background color",
|
|
29
|
-
control: {
|
|
30
|
-
type: "color",
|
|
31
|
-
},
|
|
32
|
-
defaultValue: "#ffffff",
|
|
33
|
-
},
|
|
34
|
-
backgroundOpacity: {
|
|
35
|
-
name: "Background opacity (%)",
|
|
36
|
-
control: {
|
|
37
|
-
type: "number",
|
|
38
|
-
},
|
|
39
|
-
defaultValue: 100,
|
|
40
|
-
},
|
|
41
|
-
radius: {
|
|
42
|
-
name: "Radius (px)",
|
|
43
|
-
control: {
|
|
44
|
-
type: "number",
|
|
45
|
-
},
|
|
46
|
-
defaultValue: 20,
|
|
47
|
-
},
|
|
48
|
-
border: {
|
|
49
|
-
name: "Border",
|
|
50
|
-
control: {
|
|
51
|
-
type: "boolean",
|
|
52
|
-
},
|
|
53
|
-
defaultValue: false,
|
|
54
|
-
},
|
|
55
|
-
borderColor: {
|
|
56
|
-
name: "Border color",
|
|
57
|
-
control: {
|
|
58
|
-
type: "color",
|
|
59
|
-
},
|
|
60
|
-
defaultValue: "#cccccc",
|
|
61
|
-
},
|
|
62
|
-
shadow: {
|
|
63
|
-
name: "Shadow",
|
|
64
|
-
control: {
|
|
65
|
-
type: "boolean",
|
|
66
|
-
},
|
|
67
|
-
defaultValue: true,
|
|
68
|
-
},
|
|
69
|
-
position: {
|
|
70
|
-
name: "Modal container appearance",
|
|
71
|
-
options: ["bottom", "right"],
|
|
72
|
-
control: {
|
|
73
|
-
type: "select",
|
|
74
|
-
labels: {
|
|
75
|
-
bottom: "From bottom",
|
|
76
|
-
right: "From right",
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
defaultValue: "bottom",
|
|
80
|
-
},
|
|
81
|
-
backdropOpacity: {
|
|
82
|
-
name: "Backdrop opacity (%)",
|
|
83
|
-
control: {
|
|
84
|
-
type: "number",
|
|
85
|
-
},
|
|
86
|
-
defaultValue: 50,
|
|
87
|
-
},
|
|
88
|
-
sidebarBorderRadius: {
|
|
89
|
-
name: "Modal container round corners (px)",
|
|
90
|
-
control: {
|
|
91
|
-
type: "number",
|
|
92
|
-
},
|
|
93
|
-
defaultValue: 16,
|
|
94
|
-
},
|
|
95
|
-
showSourceImage: {
|
|
96
|
-
name: "Modal container show source image",
|
|
97
|
-
control: {
|
|
98
|
-
type: "boolean",
|
|
99
|
-
},
|
|
100
|
-
defaultValue: true,
|
|
101
|
-
},
|
|
102
|
-
sourceImageSize: {
|
|
103
|
-
name: "Source image size",
|
|
104
|
-
options: ["Default", "Small", "Large"],
|
|
105
|
-
mapping: {
|
|
106
|
-
Default: 64,
|
|
107
|
-
Small: 48,
|
|
108
|
-
Large: 80,
|
|
109
|
-
},
|
|
110
|
-
control: {
|
|
111
|
-
type: "select",
|
|
112
|
-
labels: {
|
|
113
|
-
Default: "Default (64px)",
|
|
114
|
-
Small: "Small (48px)",
|
|
115
|
-
Large: "Large (80px)",
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
defaultValue: "Default",
|
|
119
|
-
},
|
|
120
|
-
sourceImageBorder: {
|
|
121
|
-
name: "Source image border",
|
|
122
|
-
control: {
|
|
123
|
-
type: "boolean",
|
|
124
|
-
},
|
|
125
|
-
defaultValue: false,
|
|
126
|
-
},
|
|
127
|
-
sourceImageBorderColor: {
|
|
128
|
-
name: "Source image border color",
|
|
129
|
-
control: {
|
|
130
|
-
type: "color",
|
|
131
|
-
},
|
|
132
|
-
defaultValue: "#cccccc",
|
|
133
|
-
},
|
|
134
|
-
sourceImageShadow: {
|
|
135
|
-
name: "Source image shadow",
|
|
136
|
-
control: {
|
|
137
|
-
type: "boolean",
|
|
138
|
-
},
|
|
139
|
-
defaultValue: true,
|
|
140
|
-
},
|
|
141
|
-
font: {
|
|
142
|
-
name: "Font family",
|
|
143
|
-
options: ["Inter", "System", "Arial"],
|
|
144
|
-
mapping: {
|
|
145
|
-
Inter: "'Inter', sans-serif",
|
|
146
|
-
System: `-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"`,
|
|
147
|
-
Arial: "Arial, sans-serif",
|
|
148
|
-
},
|
|
149
|
-
control: {
|
|
150
|
-
type: "select",
|
|
151
|
-
labels: {
|
|
152
|
-
Inter: "Inter",
|
|
153
|
-
System: "System stack",
|
|
154
|
-
Arial: "Arial (web safe)",
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
defaultValue: "Inter",
|
|
158
|
-
},
|
|
159
|
-
primaryTextColor: {
|
|
160
|
-
name: "Primary text color",
|
|
161
|
-
control: {
|
|
162
|
-
type: "color",
|
|
163
|
-
},
|
|
164
|
-
defaultValue: "#161616",
|
|
165
|
-
},
|
|
166
|
-
secondaryTextColor: {
|
|
167
|
-
name: "Secondary text color",
|
|
168
|
-
control: {
|
|
169
|
-
type: "color",
|
|
170
|
-
},
|
|
171
|
-
defaultValue: "#757575",
|
|
172
|
-
},
|
|
173
|
-
modalTitle: {
|
|
174
|
-
name: "Modal container title",
|
|
175
|
-
control: {
|
|
176
|
-
type: "boolean",
|
|
177
|
-
},
|
|
178
|
-
defaultValue: true,
|
|
179
|
-
},
|
|
180
|
-
sidebarTitle: {
|
|
181
|
-
name: "Modal container title name",
|
|
182
|
-
control: {
|
|
183
|
-
type: "text",
|
|
184
|
-
},
|
|
185
|
-
defaultValue: "Visually similar products",
|
|
186
|
-
},
|
|
187
|
-
modalTitleFontSize: {
|
|
188
|
-
name: "Modal container title font size (px)",
|
|
189
|
-
control: {
|
|
190
|
-
type: "number",
|
|
191
|
-
},
|
|
192
|
-
defaultValue: 28,
|
|
193
|
-
},
|
|
194
|
-
modalScrollbar: {
|
|
195
|
-
name: "Use default horizontal scrollbar in modal container",
|
|
196
|
-
control: {
|
|
197
|
-
type: "boolean",
|
|
198
|
-
},
|
|
199
|
-
defaultValue: false,
|
|
200
|
-
},
|
|
201
|
-
productId: {
|
|
202
|
-
name: "Product id",
|
|
203
|
-
},
|
|
204
|
-
token: {
|
|
205
|
-
name: "Token",
|
|
206
|
-
},
|
|
207
|
-
};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { withDesign } from "storybook-addon-designs";
|
|
2
|
-
import { argTypes } from "./args";
|
|
3
|
-
const centerDecorator = (story) => `
|
|
4
|
-
<div style="display: grid;
|
|
5
|
-
position: absolute;
|
|
6
|
-
top: 0;
|
|
7
|
-
bottom: 0;
|
|
8
|
-
left: 0;
|
|
9
|
-
right: 0;
|
|
10
|
-
align-items: center;
|
|
11
|
-
justify-items: center;">
|
|
12
|
-
${story()}
|
|
13
|
-
</div>
|
|
14
|
-
`;
|
|
15
|
-
export default {
|
|
16
|
-
title: "Widgets/Visual Recommendations/Button",
|
|
17
|
-
component: "vviinn-vpr-button",
|
|
18
|
-
decorators: [withDesign, centerDecorator],
|
|
19
|
-
argTypes,
|
|
20
|
-
};
|
|
21
|
-
const Template = (args) => `<style>
|
|
22
|
-
body {
|
|
23
|
-
font-family: ${args.font};
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
vviinn-vpr-button::part(button) {
|
|
27
|
-
width: ${args.buttonSize}px;
|
|
28
|
-
height: ${args.buttonSize}px;
|
|
29
|
-
fill: ${args.iconColor};
|
|
30
|
-
background: ${args.backgroundColor};
|
|
31
|
-
opacity: ${args.backgroundOpacity}%;
|
|
32
|
-
border-radius: ${args.radius}px;
|
|
33
|
-
border: ${args.border ? "1px solid" : "none"};
|
|
34
|
-
border-color: ${args.borderColor};
|
|
35
|
-
${args.shadow ? "" : "box-shadow: none;"}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
vviinn-recommendations-sidebar::part(title) {
|
|
39
|
-
display: ${args.modalTitle ? "inline" : "none"};
|
|
40
|
-
font-size: ${args.modalTitleFontSize}px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
vviinn-recommendations-sidebar::part(product-title),
|
|
44
|
-
vviinn-recommendations-sidebar::part(brand),
|
|
45
|
-
vviinn-recommendations-sidebar::part(type),
|
|
46
|
-
vviinn-recommendations-sidebar::part(price-regular),
|
|
47
|
-
vviinn-recommendations-sidebar::part(price-sale) {
|
|
48
|
-
color: ${args.primaryTextColor};
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
vviinn-recommendations-sidebar::part(price-outdated) {
|
|
52
|
-
color: ${args.secondaryTextColor};
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
vviinn-recommendations-sidebar.open {
|
|
56
|
-
background: rgba(0, 0, 0, 0.1);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
vviinn-recommendations-sidebar::part(body) {
|
|
60
|
-
border-radius: ${args.sidebarBorderRadius}px ${args.sidebarBorderRadius}px 0 0;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
vviinn-recommendations-sidebar::part(source-image) {
|
|
64
|
-
width: ${args.sourceImageSize}px;
|
|
65
|
-
height: ${args.sourceImageSize}px;
|
|
66
|
-
border: ${args.sourceImageBorder ? "1px solid" : "none"};
|
|
67
|
-
border-color: ${args.sourceImageBorderColor};
|
|
68
|
-
${args.sourceImageShadow ? "" : "box-shadow: none;"}
|
|
69
|
-
}
|
|
70
|
-
</style>
|
|
71
|
-
<vviinn-vpr-button token="${args.token}"
|
|
72
|
-
product-id="${args.productId}"
|
|
73
|
-
position="${args.position}"
|
|
74
|
-
sidebar-title="${args.sidebarTitle}"
|
|
75
|
-
modal-scrollbar="${args.modalScrollbar}"
|
|
76
|
-
source-image="${args.showSourceImage
|
|
77
|
-
? "https://www.moebel-shop.de/media/image/e3/e9/28/0749295-001_600x600.jpg"
|
|
78
|
-
: ""}"></vviinn-vpr-button>`;
|
|
79
|
-
export const Default = Template.bind({});
|
|
80
|
-
Default.args = {
|
|
81
|
-
token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOjgzLCJqdGkiOiI3ZTg2Y2I1YS00ZTFjLTRhYjctYjU2My1lN2FjMTYzZTYyZDIiLCJzY29wZXMiOlsidnByIiwidnBzIiwidnBjIl19.SbaQnBkvoXer3GPCWUthFQStFKLHZNMBfj4Qu44WHM8nzaIt48I74yVy4gVbX29vtd6jIkDPdakqEXRXmAxOCtv7_nsd4iBs1yMegfOWW5g8f10PKfZqmWJcfhwKIEElnUMFmP6rXpogntZ7iFfeTBbiRNzQPhkaa7jUjgQkCC4",
|
|
82
|
-
productId: "4114460310",
|
|
83
|
-
};
|
|
84
|
-
Default.parameters = {
|
|
85
|
-
design: {
|
|
86
|
-
type: "figma",
|
|
87
|
-
url: "https://www.figma.com/file/YR5ZK1s4z9ZRUXytB8uVuj/Widgets?node-id=591%3A3859",
|
|
88
|
-
},
|
|
89
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.open-button {
|
|
6
|
-
align-items: center;
|
|
7
|
-
background: rgba(255, 255, 255, 0.8);
|
|
8
|
-
border-radius: 50%;
|
|
9
|
-
border: none;
|
|
10
|
-
box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.15);
|
|
11
|
-
box-sizing: border-box;
|
|
12
|
-
cursor: pointer;
|
|
13
|
-
display: grid;
|
|
14
|
-
height: 40px;
|
|
15
|
-
justify-items: center;
|
|
16
|
-
padding: 0;
|
|
17
|
-
width: 40px;
|
|
18
|
-
transition: all 0.25s ease-in-out;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.open-button:hover {
|
|
22
|
-
box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.25);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.open-button:focus {
|
|
26
|
-
border: 2px solid rgba(15, 98, 254, 0.5);
|
|
27
|
-
outline: none;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.open-button:active {
|
|
31
|
-
background: #F4F4F4;
|
|
32
|
-
outline: none;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { Component, Host, h, Prop } from "@stencil/core";
|
|
2
|
-
import { VisualSearchIcon } from "../vviinn-icons";
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* @part button - clickable button element
|
|
6
|
-
*/
|
|
7
|
-
export class VviinnVprButton {
|
|
8
|
-
constructor() {
|
|
9
|
-
this.position = "bottom";
|
|
10
|
-
this.sourceImage = null;
|
|
11
|
-
this.sidebarTitle = "Visually similar products";
|
|
12
|
-
this.modalScrollbar = false;
|
|
13
|
-
this.sidebar = null;
|
|
14
|
-
this.sidebarCloseListener = () => {
|
|
15
|
-
document.body.removeChild(this.sidebar);
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
render() {
|
|
19
|
-
return (h(Host, null,
|
|
20
|
-
h("button", { class: "open-button", part: "button", onClick: () => this.handleClick() },
|
|
21
|
-
h("slot", null,
|
|
22
|
-
h(VisualSearchIcon, null)))));
|
|
23
|
-
}
|
|
24
|
-
handleClick() {
|
|
25
|
-
const sidebar = document.createElement("vviinn-recommendations-sidebar");
|
|
26
|
-
sidebar.sidebarTitle = this.sidebarTitle;
|
|
27
|
-
sidebar.productId = this.productId;
|
|
28
|
-
sidebar.token = this.token;
|
|
29
|
-
sidebar.position = this.position;
|
|
30
|
-
sidebar.sourceImage = this.sourceImage;
|
|
31
|
-
sidebar.widgetScrollbar = this.modalScrollbar;
|
|
32
|
-
this.sidebar = sidebar;
|
|
33
|
-
sidebar.addEventListener("modalClosed", this.sidebarCloseListener);
|
|
34
|
-
document.body.append(this.sidebar);
|
|
35
|
-
}
|
|
36
|
-
disconnectedCallback() {
|
|
37
|
-
this.sidebar.removeEventListener("modalCLosed", this.sidebarCloseListener);
|
|
38
|
-
document.body.removeChild(this.sidebar);
|
|
39
|
-
}
|
|
40
|
-
static get is() { return "vviinn-vpr-button"; }
|
|
41
|
-
static get encapsulation() { return "shadow"; }
|
|
42
|
-
static get originalStyleUrls() { return {
|
|
43
|
-
"$": ["vviinn-vpr-button.css"]
|
|
44
|
-
}; }
|
|
45
|
-
static get styleUrls() { return {
|
|
46
|
-
"$": ["vviinn-vpr-button.css"]
|
|
47
|
-
}; }
|
|
48
|
-
static get properties() { return {
|
|
49
|
-
"token": {
|
|
50
|
-
"type": "string",
|
|
51
|
-
"mutable": false,
|
|
52
|
-
"complexType": {
|
|
53
|
-
"original": "string",
|
|
54
|
-
"resolved": "string",
|
|
55
|
-
"references": {}
|
|
56
|
-
},
|
|
57
|
-
"required": false,
|
|
58
|
-
"optional": false,
|
|
59
|
-
"docs": {
|
|
60
|
-
"tags": [],
|
|
61
|
-
"text": ""
|
|
62
|
-
},
|
|
63
|
-
"attribute": "token",
|
|
64
|
-
"reflect": false
|
|
65
|
-
},
|
|
66
|
-
"productId": {
|
|
67
|
-
"type": "string",
|
|
68
|
-
"mutable": false,
|
|
69
|
-
"complexType": {
|
|
70
|
-
"original": "string",
|
|
71
|
-
"resolved": "string",
|
|
72
|
-
"references": {}
|
|
73
|
-
},
|
|
74
|
-
"required": false,
|
|
75
|
-
"optional": false,
|
|
76
|
-
"docs": {
|
|
77
|
-
"tags": [],
|
|
78
|
-
"text": ""
|
|
79
|
-
},
|
|
80
|
-
"attribute": "product-id",
|
|
81
|
-
"reflect": false
|
|
82
|
-
},
|
|
83
|
-
"position": {
|
|
84
|
-
"type": "string",
|
|
85
|
-
"mutable": false,
|
|
86
|
-
"complexType": {
|
|
87
|
-
"original": "\"bottom\" | \"right\"",
|
|
88
|
-
"resolved": "\"bottom\" | \"right\"",
|
|
89
|
-
"references": {}
|
|
90
|
-
},
|
|
91
|
-
"required": false,
|
|
92
|
-
"optional": false,
|
|
93
|
-
"docs": {
|
|
94
|
-
"tags": [],
|
|
95
|
-
"text": ""
|
|
96
|
-
},
|
|
97
|
-
"attribute": "position",
|
|
98
|
-
"reflect": false,
|
|
99
|
-
"defaultValue": "\"bottom\""
|
|
100
|
-
},
|
|
101
|
-
"sourceImage": {
|
|
102
|
-
"type": "string",
|
|
103
|
-
"mutable": false,
|
|
104
|
-
"complexType": {
|
|
105
|
-
"original": "string | null",
|
|
106
|
-
"resolved": "string",
|
|
107
|
-
"references": {}
|
|
108
|
-
},
|
|
109
|
-
"required": false,
|
|
110
|
-
"optional": false,
|
|
111
|
-
"docs": {
|
|
112
|
-
"tags": [],
|
|
113
|
-
"text": ""
|
|
114
|
-
},
|
|
115
|
-
"attribute": "source-image",
|
|
116
|
-
"reflect": false,
|
|
117
|
-
"defaultValue": "null"
|
|
118
|
-
},
|
|
119
|
-
"sidebarTitle": {
|
|
120
|
-
"type": "string",
|
|
121
|
-
"mutable": false,
|
|
122
|
-
"complexType": {
|
|
123
|
-
"original": "string",
|
|
124
|
-
"resolved": "string",
|
|
125
|
-
"references": {}
|
|
126
|
-
},
|
|
127
|
-
"required": false,
|
|
128
|
-
"optional": false,
|
|
129
|
-
"docs": {
|
|
130
|
-
"tags": [],
|
|
131
|
-
"text": ""
|
|
132
|
-
},
|
|
133
|
-
"attribute": "sidebar-title",
|
|
134
|
-
"reflect": false,
|
|
135
|
-
"defaultValue": "\"Visually similar products\""
|
|
136
|
-
},
|
|
137
|
-
"modalScrollbar": {
|
|
138
|
-
"type": "boolean",
|
|
139
|
-
"mutable": false,
|
|
140
|
-
"complexType": {
|
|
141
|
-
"original": "boolean",
|
|
142
|
-
"resolved": "boolean",
|
|
143
|
-
"references": {}
|
|
144
|
-
},
|
|
145
|
-
"required": false,
|
|
146
|
-
"optional": false,
|
|
147
|
-
"docs": {
|
|
148
|
-
"tags": [],
|
|
149
|
-
"text": ""
|
|
150
|
-
},
|
|
151
|
-
"attribute": "modal-scrollbar",
|
|
152
|
-
"reflect": false,
|
|
153
|
-
"defaultValue": "false"
|
|
154
|
-
}
|
|
155
|
-
}; }
|
|
156
|
-
}
|