vviinn-widgets 2.5.0 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Handler-176539c8.js +331 -0
- package/dist/{vviinn-widgets/app-globals-4fe0376b.js → cjs/app-globals-d15b4c2c.js} +15 -925
- package/{www/build/cropper-handler.entry.js → dist/cjs/cropper-handler.cjs.entry.js} +11 -7
- package/dist/{vviinn-widgets/customized-slots-5dbf778c.js → cjs/customized-slots-0c0d0665.js} +6 -3
- package/dist/cjs/highlight-box_22.cjs.entry.js +747 -0
- package/{www/build/imageSearch.store-3204bc99.js → dist/cjs/imageSearch.store-865c23f4.js} +11902 -11653
- package/{www/build/index-89e62050.js → dist/cjs/index-0eb3036a.js} +76 -698
- package/dist/cjs/index-0f5516a6.js +1354 -0
- package/dist/cjs/index-31b9cb7a.js +39 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +23 -0
- package/dist/cjs/vviinn-carousel_3.cjs.entry.js +1174 -0
- package/dist/{vviinn-widgets/vviinn-error.entry.js → cjs/vviinn-error.cjs.entry.js} +8 -4
- package/{www/build/vviinn-preloader.entry.js → dist/cjs/vviinn-preloader.cjs.entry.js} +11 -10
- package/{www/build/vviinn-recommendations-sidebar.entry.js → dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js} +12 -8
- package/dist/{vviinn-widgets/vviinn-vpr-button.entry.js → cjs/vviinn-vpr-button.cjs.entry.js} +9 -5
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +43 -0
- package/{www/build/vviinn-vps-widget.entry.js → dist/cjs/vviinn-vps-widget.cjs.entry.js} +51 -49
- package/dist/cjs/vviinn-widgets.cjs.js +21 -0
- package/dist/collection/Image/error.js +14 -0
- package/dist/collection/Image/form.js +5 -0
- package/dist/collection/Image/fromFile.js +18 -0
- package/dist/collection/Image/imageToB64.js +9 -0
- package/dist/collection/Image/index.js +0 -0
- package/dist/collection/Image/renderPromise.js +6 -0
- package/dist/collection/Image/resizeImage.js +28 -0
- package/dist/collection/Image/sizing.js +39 -0
- package/dist/collection/Image/toFile.js +17 -0
- package/dist/collection/analytics/GAnalytics.js +32 -0
- package/dist/collection/analytics/GeneralAnalytics.js +9 -0
- package/dist/collection/analytics/GtagAnalytics.js +35 -0
- package/dist/collection/analytics/ProductAnalytics.js +1 -0
- package/dist/collection/campaign/Campaign.js +8 -0
- package/dist/collection/campaign/CampaignService.js +5 -0
- package/dist/collection/campaign/VCSCampaign.js +1 -0
- package/dist/collection/campaign/VCSCampaignResponse.js +1 -0
- package/dist/collection/campaign/VCSCampaignService.js +5 -0
- package/dist/collection/campaign/VPRCampaignResponse.js +1 -0
- package/dist/collection/campaign/VPRCampaignService.js +5 -0
- package/dist/collection/collection-manifest.json +43 -0
- package/dist/collection/components/customized-slots.js +47 -0
- package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.css +71 -0
- package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.js +25 -0
- package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.css +49 -0
- package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.js +64 -0
- package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.css +33 -0
- package/{www/build/image-cropper.entry.js → dist/collection/components/image-search/image-view/image-cropper/image-cropper.js} +70 -33
- package/dist/collection/components/image-search/search-filters/search-filters.css +120 -0
- package/dist/collection/components/image-search/search-filters/search-filters.js +125 -0
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +142 -0
- package/{www/build/vviinn-carousel.entry.js → dist/collection/components/vviinn-carousel/vviinn-carousel.js} +113 -18
- package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.css +7 -0
- package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +36 -0
- package/dist/collection/components/vviinn-error/vviinn-error.css +38 -0
- package/dist/collection/components/vviinn-error/vviinn-error.js +18 -0
- package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.css +3 -0
- package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.js +34 -0
- package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.css +3 -0
- package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.js +34 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.css +34 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +129 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.css +19 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +80 -0
- package/dist/{vviinn-widgets/index-bbcd6be9.js → collection/components/vviinn-icons/index.js} +11 -14
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.css +25 -0
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +64 -0
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.css +47 -0
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +100 -0
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.css +31 -0
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +61 -0
- package/dist/collection/components/vviinn-modal/vviinn-modal.css +105 -0
- package/dist/collection/components/vviinn-modal/vviinn-modal.js +98 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/onboarding-card.css +41 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.js +26 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.js +26 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.js +26 -0
- package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.css +58 -0
- package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.js +28 -0
- package/dist/collection/components/vviinn-overlay/vviinn-overlay.css +33 -0
- package/dist/collection/components/vviinn-overlay/vviinn-overlay.js +15 -0
- package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.css +29 -0
- package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.js +71 -0
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.css +37 -0
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +20 -0
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +19 -0
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +27 -0
- package/dist/collection/components/vviinn-product-card/render-helpers.js +32 -0
- package/dist/collection/components/vviinn-product-card/stories/args.js +73 -0
- package/dist/collection/components/vviinn-product-card/stories/decorators.js +51 -0
- package/dist/collection/components/vviinn-product-card/stories/vviinn-product-card.stories.js +105 -0
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.css +95 -0
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +462 -0
- package/dist/collection/components/vviinn-slider/arrow.js +11 -0
- package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.css +4 -0
- package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.js +15 -0
- package/dist/collection/components/vviinn-slider/vviinn-slider.css +109 -0
- package/dist/collection/components/vviinn-slider/vviinn-slider.js +181 -0
- package/dist/collection/components/vviinn-teaser/vviinn-teaser.css +14 -0
- package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +29 -0
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.css +238 -0
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +200 -0
- package/dist/collection/components/vviinn-vpr-button/stories/args.js +207 -0
- package/dist/collection/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.js +89 -0
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.css +35 -0
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +156 -0
- package/dist/collection/components/vviinn-vpr-widget/stories/args.js +190 -0
- package/dist/collection/components/vviinn-vpr-widget/stories/decorators.js +29 -0
- package/dist/collection/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.js +212 -0
- package/dist/collection/components/vviinn-vpr-widget/token-helpers.js +11 -0
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +483 -0
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +79 -0
- package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +31 -0
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.css +3 -0
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +178 -0
- package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +33 -0
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +350 -0
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +352 -0
- package/dist/collection/cropper/Cropper.js +1 -0
- package/dist/collection/cropper/Handler.js +61 -0
- package/dist/collection/dom/index.js +3 -0
- package/dist/collection/error.js +14 -0
- package/dist/collection/file/index.js +4 -0
- package/dist/collection/geometry/Clip.js +14 -0
- package/dist/collection/geometry/Point.js +32 -0
- package/dist/collection/geometry/Rectangle.js +95 -0
- package/dist/collection/geometry/RectangleAlt.js +1 -0
- package/dist/collection/geometry/Sized.js +8 -0
- package/dist/collection/global.js +19 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/interfaces/generated.js +5 -0
- package/dist/collection/interfaces/recommendation.js +1 -0
- package/dist/collection/network/apiClient.js +9 -0
- package/dist/collection/network/ion/File.js +14 -0
- package/dist/collection/network/ion/Form.js +64 -0
- package/dist/collection/network/ion/Link.js +8 -0
- package/dist/collection/network/ion/ValueObject.js +23 -0
- package/dist/collection/network/request.js +19 -0
- package/dist/collection/network/utils.js +37 -0
- package/dist/collection/openApi/index.js +27 -0
- package/dist/collection/recommendation/events.js +1 -0
- package/dist/collection/recommendation/recommendation.js +1 -0
- package/dist/collection/searchSession/searchSession.js +26 -0
- package/dist/collection/sentry.js +14 -0
- package/dist/collection/slider/GridMode.js +1 -0
- package/dist/collection/store/file-processing.js +13 -0
- package/dist/collection/store/imageSearch.store.js +138 -0
- package/dist/collection/store/store.js +3 -0
- package/dist/collection/store/tracking.store.js +3 -0
- package/dist/collection/stories/Button.js +21 -0
- package/dist/collection/stories/Button.stories.js +42 -0
- package/dist/collection/stories/Header.js +45 -0
- package/dist/collection/stories/Header.stories.js +15 -0
- package/dist/collection/stories/Page.js +61 -0
- package/dist/collection/stories/Page.stories.js +19 -0
- package/dist/collection/stories/assets/code-brackets.svg +1 -0
- package/dist/collection/stories/assets/colors.svg +1 -0
- package/dist/collection/stories/assets/comments.svg +1 -0
- package/dist/collection/stories/assets/direction.svg +1 -0
- package/dist/collection/stories/assets/flow.svg +1 -0
- package/dist/collection/stories/assets/plugin.svg +1 -0
- package/dist/collection/stories/assets/repo.svg +1 -0
- package/dist/collection/stories/assets/stackalt.svg +1 -0
- package/dist/collection/stories/image-selector.stories.js +6 -0
- package/dist/collection/stories/image-view.stories.js +6 -0
- package/dist/collection/stories/modal.stories.js +12 -0
- package/dist/collection/stories/onboarding.stories.js +11 -0
- package/dist/collection/stories/overlay.stories.js +5 -0
- package/dist/collection/stories/overlayedModal.stories.js +8 -0
- package/dist/collection/stories/privacy-badge.stories.js +11 -0
- package/dist/collection/stories/slider.stories.js +17 -0
- package/dist/collection/stories/teaser.stories.js +5 -0
- package/dist/collection/stories/vps-widget.stories.js +47 -0
- package/dist/collection/stories/vviinn-product.stories.js +19 -0
- package/dist/collection/tracking/event.js +3 -0
- package/dist/collection/tracking/filter.js +5 -0
- package/dist/collection/tracking/index.js +13 -0
- package/dist/collection/tracking/models.js +6 -0
- package/dist/collection/tracking/product.js +18 -0
- package/dist/collection/tracking/search.js +5 -0
- package/dist/collection/tracking/widget.js +10 -0
- package/dist/collection/utils/collections/collectionsUtils.js +5 -0
- package/dist/collection/utils/either.js +3 -0
- package/dist/collection/utils/enum/enumUtils.js +3 -0
- package/dist/collection/utils/event/Events.js +1 -0
- package/dist/collection/utils/number/index.js +4 -0
- package/dist/collection/utils/option/option.js +4 -0
- package/dist/collection/utils/semigroup/semigroupDiff.js +6 -0
- package/dist/collection/utils/token/tokenUtils.js +9 -0
- package/dist/esm/Handler-f9b8735c.js +309 -0
- package/{www/build/app-globals-4fe0376b.js → dist/esm/app-globals-6f6aa89e.js} +10 -922
- package/dist/{vviinn-widgets → esm}/cropper-handler.entry.js +2 -2
- package/{www/build/customized-slots-5dbf778c.js → dist/esm/customized-slots-6b427dda.js} +1 -1
- package/dist/esm/highlight-box_22.entry.js +722 -0
- package/dist/{vviinn-widgets/imageSearch.store-3204bc99.js → esm/imageSearch.store-0ae87235.js} +12070 -11855
- package/dist/{vviinn-widgets/index-89e62050.js → esm/index-2e296af4.js} +6 -639
- package/dist/esm/index-59f44eaa.js +1323 -0
- package/{www/build/index-bbcd6be9.js → dist/esm/index-ac05c460.js} +2 -4
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +19 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/vviinn-carousel_3.entry.js +1168 -0
- package/{www/build → dist/esm}/vviinn-error.entry.js +1 -1
- package/dist/{vviinn-widgets → esm}/vviinn-preloader.entry.js +3 -6
- package/dist/{vviinn-widgets → esm}/vviinn-recommendations-sidebar.entry.js +2 -2
- package/{www/build → dist/esm}/vviinn-vpr-button.entry.js +2 -2
- package/dist/{vviinn-widgets → esm}/vviinn-vps-button.entry.js +3 -3
- package/dist/{vviinn-widgets → esm}/vviinn-vps-widget.entry.js +12 -14
- package/dist/esm/vviinn-widgets.js +19 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/loader/cdn.js +3 -0
- package/dist/loader/index.cjs.js +3 -0
- package/dist/loader/index.d.ts +12 -0
- package/dist/loader/index.es2017.js +3 -0
- package/dist/loader/index.js +4 -0
- package/dist/loader/package.json +10 -0
- package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +1 -1
- package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +1 -1
- package/dist/vviinn-widgets/index.esm.js +0 -1
- package/dist/vviinn-widgets/p-118ac907.js +1 -0
- package/dist/vviinn-widgets/p-11f61564.js +1 -0
- package/dist/vviinn-widgets/p-39fdc5c9.entry.js +1 -0
- package/dist/vviinn-widgets/p-762dc067.entry.js +1 -0
- package/dist/vviinn-widgets/p-7e2f542c.js +1 -0
- package/dist/vviinn-widgets/p-8d56e795.entry.js +1 -0
- package/dist/vviinn-widgets/p-8f955b15.entry.js +1 -0
- package/dist/vviinn-widgets/p-9654fe35.entry.js +1 -0
- package/dist/vviinn-widgets/p-9e5adc42.js +1 -0
- package/dist/vviinn-widgets/p-b3731705.entry.js +1 -0
- package/dist/vviinn-widgets/p-bad1809f.js +1 -0
- package/dist/vviinn-widgets/p-c36546fa.js +15 -0
- package/dist/vviinn-widgets/p-d991330b.entry.js +1 -0
- package/dist/vviinn-widgets/p-da9c933b.entry.js +1 -0
- package/dist/vviinn-widgets/p-ee46fc83.js +1 -0
- package/dist/vviinn-widgets/p-f41e25f0.entry.js +1 -0
- package/dist/vviinn-widgets/vviinn-widgets.css +1 -6
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -125
- package/package.json +1 -1
- package/www/build/index.esm.js +0 -1
- package/www/build/p-118ac907.js +1 -0
- package/www/build/p-11f61564.js +1 -0
- package/www/build/p-39fdc5c9.entry.js +1 -0
- package/www/build/p-762dc067.entry.js +1 -0
- package/www/build/p-7e2f542c.js +1 -0
- package/www/build/p-8d56e795.entry.js +1 -0
- package/www/build/p-8f955b15.entry.js +1 -0
- package/www/build/p-9654fe35.entry.js +1 -0
- package/www/build/p-9e5adc42.js +1 -0
- package/www/build/p-a67898be.css +1 -0
- package/www/build/p-b3731705.entry.js +1 -0
- package/www/build/p-bad1809f.js +1 -0
- package/www/build/p-c36546fa.js +15 -0
- package/www/build/p-cfd998c1.js +1 -0
- package/www/build/p-d991330b.entry.js +1 -0
- package/www/build/p-da9c933b.entry.js +1 -0
- package/www/build/p-ee46fc83.js +1 -0
- package/www/build/p-f41e25f0.entry.js +1 -0
- package/www/build/vviinn-widgets.css +1 -6
- package/www/build/vviinn-widgets.esm.js +1 -125
- package/www/index.html +1 -12
- package/dist/vviinn-widgets/Array-c4dc02db.js +0 -4295
- package/dist/vviinn-widgets/Handler-47db9890.js +0 -1428
- package/dist/vviinn-widgets/NonEmptyArray-65395d97.js +0 -4370
- package/dist/vviinn-widgets/css-shim-f0027935.js +0 -4
- package/dist/vviinn-widgets/dom-db0073f0.js +0 -73
- package/dist/vviinn-widgets/highlight-box.entry.js +0 -41
- package/dist/vviinn-widgets/image-cropper.entry.js +0 -118
- package/dist/vviinn-widgets/index-c8128606.js +0 -3010
- package/dist/vviinn-widgets/number-a80a4b3c.js +0 -1533
- package/dist/vviinn-widgets/search-filters.entry.js +0 -76
- package/dist/vviinn-widgets/shadow-css-c1fdfa9f.js +0 -389
- package/dist/vviinn-widgets/vviinn-carousel.entry.js +0 -210
- package/dist/vviinn-widgets/vviinn-detected-object.entry.js +0 -54
- package/dist/vviinn-widgets/vviinn-empty-results.entry.js +0 -16
- package/dist/vviinn-widgets/vviinn-example-image.entry.js +0 -38
- package/dist/vviinn-widgets/vviinn-example-images.entry.js +0 -28
- package/dist/vviinn-widgets/vviinn-image-selector.entry.js +0 -31
- package/dist/vviinn-widgets/vviinn-image-view.entry.js +0 -55
- package/dist/vviinn-widgets/vviinn-modal.entry.js +0 -30
- package/dist/vviinn-widgets/vviinn-onboarding-card-1.entry.js +0 -21
- package/dist/vviinn-widgets/vviinn-onboarding-card-2.entry.js +0 -21
- package/dist/vviinn-widgets/vviinn-onboarding-card-3.entry.js +0 -21
- package/dist/vviinn-widgets/vviinn-onboarding.entry.js +0 -20
- package/dist/vviinn-widgets/vviinn-overlay.entry.js +0 -15
- package/dist/vviinn-widgets/vviinn-overlayed-modal.entry.js +0 -18
- package/dist/vviinn-widgets/vviinn-privacy-badge.entry.js +0 -20
- package/dist/vviinn-widgets/vviinn-product-card.entry.js +0 -184
- package/dist/vviinn-widgets/vviinn-server-error.entry.js +0 -16
- package/dist/vviinn-widgets/vviinn-slide.entry.js +0 -15
- package/dist/vviinn-widgets/vviinn-slider.entry.js +0 -120
- package/dist/vviinn-widgets/vviinn-teaser.entry.js +0 -20
- package/dist/vviinn-widgets/vviinn-vpr-widget.entry.js +0 -4581
- package/dist/vviinn-widgets/vviinn-wrong-format.entry.js +0 -16
- package/www/build/Array-c4dc02db.js +0 -4295
- package/www/build/Handler-47db9890.js +0 -1428
- package/www/build/NonEmptyArray-65395d97.js +0 -4370
- package/www/build/css-shim-f0027935.js +0 -4
- package/www/build/dom-db0073f0.js +0 -73
- package/www/build/highlight-box.entry.js +0 -41
- package/www/build/index-c8128606.js +0 -3010
- package/www/build/number-a80a4b3c.js +0 -1533
- package/www/build/search-filters.entry.js +0 -76
- package/www/build/shadow-css-c1fdfa9f.js +0 -389
- package/www/build/vviinn-detected-object.entry.js +0 -54
- package/www/build/vviinn-empty-results.entry.js +0 -16
- package/www/build/vviinn-example-image.entry.js +0 -38
- package/www/build/vviinn-example-images.entry.js +0 -28
- package/www/build/vviinn-image-selector.entry.js +0 -31
- package/www/build/vviinn-image-view.entry.js +0 -55
- package/www/build/vviinn-modal.entry.js +0 -30
- package/www/build/vviinn-onboarding-card-1.entry.js +0 -21
- package/www/build/vviinn-onboarding-card-2.entry.js +0 -21
- package/www/build/vviinn-onboarding-card-3.entry.js +0 -21
- package/www/build/vviinn-onboarding.entry.js +0 -20
- package/www/build/vviinn-overlay.entry.js +0 -15
- package/www/build/vviinn-overlayed-modal.entry.js +0 -18
- package/www/build/vviinn-privacy-badge.entry.js +0 -20
- package/www/build/vviinn-product-card.entry.js +0 -184
- package/www/build/vviinn-server-error.entry.js +0 -16
- package/www/build/vviinn-slide.entry.js +0 -15
- package/www/build/vviinn-slider.entry.js +0 -120
- package/www/build/vviinn-teaser.entry.js +0 -20
- package/www/build/vviinn-vpr-widget.entry.js +0 -4581
- package/www/build/vviinn-vps-button.entry.js +0 -39
- package/www/build/vviinn-wrong-format.entry.js +0 -16
|
@@ -0,0 +1,207 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
|
|
@@ -0,0 +1,156 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
export const apiPath = {
|
|
2
|
+
name: "api-path",
|
|
3
|
+
control: {
|
|
4
|
+
type: "text",
|
|
5
|
+
},
|
|
6
|
+
table: {
|
|
7
|
+
defaultValue: { summary: "https://api.vviinn.com" },
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
const token = {
|
|
11
|
+
name: "token",
|
|
12
|
+
control: {
|
|
13
|
+
type: "text",
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
const productId = {
|
|
17
|
+
name: "product-id",
|
|
18
|
+
control: {
|
|
19
|
+
type: "text",
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
const cssUrl = {
|
|
23
|
+
name: "css-url",
|
|
24
|
+
description: "Optional for custom CSS. It will overwrite all other settings.",
|
|
25
|
+
control: {
|
|
26
|
+
type: "text",
|
|
27
|
+
},
|
|
28
|
+
required: false,
|
|
29
|
+
};
|
|
30
|
+
const analyticsId = {
|
|
31
|
+
name: "Google tracking account ID",
|
|
32
|
+
description: "Optional. Goolge Analytics account id or tag manager id and click events will be send for analytics product lists",
|
|
33
|
+
control: {
|
|
34
|
+
type: "text",
|
|
35
|
+
},
|
|
36
|
+
required: false,
|
|
37
|
+
};
|
|
38
|
+
export const campaignType = {
|
|
39
|
+
name: "campaign-type",
|
|
40
|
+
control: {
|
|
41
|
+
type: "select",
|
|
42
|
+
labels: {
|
|
43
|
+
VPR: "Visually similar products (VPR)",
|
|
44
|
+
VCS: "Visually cross-selling (VCS)",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
required: false,
|
|
48
|
+
};
|
|
49
|
+
const showTitle = {
|
|
50
|
+
name: "Section title",
|
|
51
|
+
control: {
|
|
52
|
+
type: "boolean",
|
|
53
|
+
},
|
|
54
|
+
table: {
|
|
55
|
+
defaultValue: { summary: true },
|
|
56
|
+
},
|
|
57
|
+
required: false,
|
|
58
|
+
};
|
|
59
|
+
const titleName = {
|
|
60
|
+
name: "block-title",
|
|
61
|
+
control: {
|
|
62
|
+
type: "text",
|
|
63
|
+
},
|
|
64
|
+
table: {
|
|
65
|
+
defaultValue: { summary: "Recommended products" },
|
|
66
|
+
},
|
|
67
|
+
required: false,
|
|
68
|
+
};
|
|
69
|
+
const titleFontSize = {
|
|
70
|
+
name: "Section title name font size (px)",
|
|
71
|
+
control: {
|
|
72
|
+
type: "number",
|
|
73
|
+
},
|
|
74
|
+
required: false,
|
|
75
|
+
};
|
|
76
|
+
const showScrollbars = {
|
|
77
|
+
name: "show-scroll",
|
|
78
|
+
description: "Add browser default horizontal scroll bar (in continuity mode) or pagination bullets (in grid mode) to add extra cue for users ",
|
|
79
|
+
control: {
|
|
80
|
+
type: "boolean",
|
|
81
|
+
},
|
|
82
|
+
required: false,
|
|
83
|
+
};
|
|
84
|
+
const imageWidth = {
|
|
85
|
+
name: "image-width",
|
|
86
|
+
control: {
|
|
87
|
+
type: "number",
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
const contentAlignment = {
|
|
91
|
+
name: "Content alignment",
|
|
92
|
+
options: ["Left", "Centered", "Right"],
|
|
93
|
+
mapping: {
|
|
94
|
+
Left: 0,
|
|
95
|
+
Centered: 1,
|
|
96
|
+
Right: 2,
|
|
97
|
+
},
|
|
98
|
+
control: {
|
|
99
|
+
type: "select",
|
|
100
|
+
default: 0,
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
const primaryTextColor = {
|
|
104
|
+
name: "Primary text color",
|
|
105
|
+
control: {
|
|
106
|
+
type: "color",
|
|
107
|
+
},
|
|
108
|
+
description: "Used where the most user attention is needed: product brand, product title, and price.",
|
|
109
|
+
};
|
|
110
|
+
const secondaryTextColor = {
|
|
111
|
+
name: "Secondary text color",
|
|
112
|
+
description: "Used in Old Price",
|
|
113
|
+
control: {
|
|
114
|
+
type: "color",
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
export const argTypes = {
|
|
118
|
+
analyticsId,
|
|
119
|
+
apiPath,
|
|
120
|
+
campaignType,
|
|
121
|
+
contentAlignment,
|
|
122
|
+
cssUrl,
|
|
123
|
+
imageWidth,
|
|
124
|
+
primaryTextColor,
|
|
125
|
+
productId,
|
|
126
|
+
secondaryTextColor,
|
|
127
|
+
showScrollbars,
|
|
128
|
+
showTitle,
|
|
129
|
+
titleFontSize,
|
|
130
|
+
titleName,
|
|
131
|
+
token,
|
|
132
|
+
};
|
|
133
|
+
const recommendationsGridProductsDesktop = {
|
|
134
|
+
name: "Product cards shown on desktop",
|
|
135
|
+
description: "Desktop mode is bigger than 1024px. (Use arrow buttons to apply changes)",
|
|
136
|
+
control: {
|
|
137
|
+
type: "number",
|
|
138
|
+
},
|
|
139
|
+
required: false,
|
|
140
|
+
};
|
|
141
|
+
const recommendationsGridProductsTablet = {
|
|
142
|
+
name: "Product cards shown on tablet",
|
|
143
|
+
description: "How many product cards users will see inside one grid in a screen 768px-1024px. (Use arrow buttons to apply changes)",
|
|
144
|
+
control: {
|
|
145
|
+
type: "number",
|
|
146
|
+
},
|
|
147
|
+
required: false,
|
|
148
|
+
};
|
|
149
|
+
const recommendationsGridProductsMobile = {
|
|
150
|
+
name: "Product cards shown on mobile",
|
|
151
|
+
description: "How many product cards users will see inside one grid in a screen <768. (Use arrow buttons to apply changes)",
|
|
152
|
+
control: {
|
|
153
|
+
type: "number",
|
|
154
|
+
},
|
|
155
|
+
required: false,
|
|
156
|
+
};
|
|
157
|
+
export const gridLayoutArgs = {
|
|
158
|
+
recommendationsGridProductsDesktop,
|
|
159
|
+
recommendationsGridProductsTablet,
|
|
160
|
+
recommendationsGridProductsMobile,
|
|
161
|
+
};
|
|
162
|
+
const recommendationsContinuityProductsDesktop = {
|
|
163
|
+
name: "Product cards width in a L screen [px]",
|
|
164
|
+
description: "How wide product cards will be on a screen bigger than 1024px width",
|
|
165
|
+
control: {
|
|
166
|
+
type: "number",
|
|
167
|
+
},
|
|
168
|
+
required: false,
|
|
169
|
+
};
|
|
170
|
+
const recommendationsContinuityProductsTablet = {
|
|
171
|
+
name: "Product cards width in a M screen [px]",
|
|
172
|
+
description: "How wide product cards will be on a screen from 768px-1024px width",
|
|
173
|
+
control: {
|
|
174
|
+
type: "number",
|
|
175
|
+
},
|
|
176
|
+
required: false,
|
|
177
|
+
};
|
|
178
|
+
const recommendationsContinuityProductsMobile = {
|
|
179
|
+
name: "Product cards width in a S screen [px]",
|
|
180
|
+
description: "How wide product cards will be on a screen smaller than 768px width",
|
|
181
|
+
control: {
|
|
182
|
+
type: "number",
|
|
183
|
+
},
|
|
184
|
+
required: false,
|
|
185
|
+
};
|
|
186
|
+
export const continuityLayoutArgs = {
|
|
187
|
+
recommendationsContinuityProductsDesktop,
|
|
188
|
+
recommendationsContinuityProductsTablet,
|
|
189
|
+
recommendationsContinuityProductsMobile,
|
|
190
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export const gridDecorator = (story) => `
|
|
2
|
+
<style>
|
|
3
|
+
@media (min-width: 836px) {
|
|
4
|
+
#root-inner {
|
|
5
|
+
padding: 0 10%;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@media (max-width: 860px) {
|
|
10
|
+
vviinn-product-card::part(title),
|
|
11
|
+
vviinn-product-card::part(brand),
|
|
12
|
+
vviinn-product-card::part(type),
|
|
13
|
+
vviinn-product-card::part(price-container) {
|
|
14
|
+
font-size: 14px;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
</style>
|
|
18
|
+
${story()}
|
|
19
|
+
`;
|
|
20
|
+
export const continuityDecorator = (story) => `
|
|
21
|
+
<style>
|
|
22
|
+
@media (min-width: 836px) {
|
|
23
|
+
#root-inner {
|
|
24
|
+
padding-left: 10%;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
</style>
|
|
28
|
+
${story()}
|
|
29
|
+
`;
|