vviinn-widgets 2.3.1 → 2.4.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/{app-globals-6b5da080.js → app-globals-d999d944.js} +1 -1
- package/dist/cjs/{highlight-box_22.cjs.entry.js → cropper-handler_27.cjs.entry.js} +486 -92
- package/dist/cjs/{customized-slots-8bc78ad4.js → customized-slots-90e8e849.js} +1 -1
- package/dist/cjs/{index-5b9a60ac.js → index-53400160.js} +1 -1
- package/dist/cjs/{imageSearch.store-042e9f45.js → index-c0d08aca.js} +15288 -11038
- package/dist/cjs/{index-553c2b4f.js → index-e8cf5dc5.js} +1 -1
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{vviinn-carousel_3.cjs.entry.js → vviinn-carousel_2.cjs.entry.js} +50 -206
- package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +2 -2
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +2 -2
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +3 -3
- package/dist/cjs/vviinn-widgets.cjs.js +3 -3
- package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.js +27 -7
- package/dist/collection/components/image-search/search-filters/search-filters.js +24 -1
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.js +3 -3
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +4 -4
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +18 -1
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +57 -12
- package/dist/collection/components/vviinn-vpr-widget/stories/args.js +8 -8
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +46 -10
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +5 -0
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +106 -10
- package/dist/collection/network/utils.js +1 -1
- package/dist/collection/openApi/index.js +27 -0
- package/dist/collection/{components/vviinn-vpr-widget/GridMode.js → recommendation/events.js} +0 -0
- package/dist/collection/store/store.js +7 -9
- package/dist/collection/store/tracking.store.js +3 -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/esm/{app-globals-90d99f95.js → app-globals-f91c6f94.js} +1 -1
- package/dist/esm/{highlight-box_22.entry.js → cropper-handler_27.entry.js} +417 -28
- package/dist/esm/{customized-slots-65b2467d.js → customized-slots-7be7f3b8.js} +1 -1
- package/dist/esm/{index-ac2e3b9d.js → index-00c7b7c2.js} +2 -2
- package/dist/esm/{imageSearch.store-f35e14f8.js → index-840ec915.js} +15232 -10993
- package/dist/esm/{index-d7c7df1c.js → index-d7147986.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{vviinn-carousel_3.entry.js → vviinn-carousel_2.entry.js} +42 -197
- package/dist/esm/vviinn-recommendations-sidebar.entry.js +2 -2
- package/dist/esm/vviinn-vpr-button.entry.js +2 -2
- package/dist/esm/vviinn-vps-button.entry.js +3 -3
- package/dist/esm/vviinn-widgets.js +3 -3
- package/dist/types/Image/error.d.ts +1 -0
- package/dist/types/Image/form.d.ts +1 -0
- package/dist/types/Image/fromFile.d.ts +1 -0
- package/dist/types/Image/imageToB64.d.ts +1 -0
- package/dist/types/Image/index.d.ts +1 -0
- package/dist/types/Image/renderPromise.d.ts +1 -0
- package/dist/types/Image/resizeImage.d.ts +1 -0
- package/dist/types/Image/sizing.d.ts +1 -0
- package/dist/types/Image/toFile.d.ts +1 -0
- package/dist/types/analytics/GAnalytics.d.ts +1 -0
- package/dist/types/analytics/GeneralAnalytics.d.ts +1 -0
- package/dist/types/analytics/GtagAnalytics.d.ts +1 -0
- package/dist/types/analytics/ProductAnalytics.d.ts +1 -0
- package/dist/types/campaign/Campaign.d.ts +1 -0
- package/dist/types/campaign/CampaignService.d.ts +1 -0
- package/dist/types/campaign/VCSCampaign.d.ts +1 -0
- package/dist/types/campaign/VCSCampaignResponse.d.ts +1 -0
- package/dist/types/campaign/VCSCampaignService.d.ts +1 -0
- package/dist/types/campaign/VPRCampaignResponse.d.ts +1 -0
- package/dist/types/campaign/VPRCampaignService.d.ts +1 -0
- package/dist/types/components/customized-slots.d.ts +1 -0
- package/dist/types/components/image-search/image-view/highlight-box/highlight-box.d.ts +1 -0
- package/dist/types/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.d.ts +1 -0
- package/dist/types/components/image-search/image-view/image-cropper/image-cropper.d.ts +4 -0
- package/dist/types/components/image-search/search-filters/search-filters.d.ts +4 -0
- package/dist/types/components/vviinn-carousel/vviinn-carousel.d.ts +1 -0
- package/dist/types/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.d.ts +1 -0
- package/dist/types/components/vviinn-error/vviinn-error.d.ts +1 -0
- package/dist/types/components/vviinn-error/vviinn-server-error/vviinn-server-error.d.ts +1 -0
- package/dist/types/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.d.ts +1 -0
- package/dist/types/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.d.ts +1 -0
- package/dist/types/components/vviinn-example-images/vviinn-example-images.d.ts +1 -0
- package/dist/types/components/vviinn-icons/index.d.ts +1 -0
- package/dist/types/components/vviinn-image-selector/vviinn-image-selector.d.ts +1 -0
- package/dist/types/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.d.ts +3 -0
- package/dist/types/components/vviinn-image-view/vviinn-image-view.d.ts +1 -0
- package/dist/types/components/vviinn-modal/vviinn-modal.d.ts +1 -0
- package/dist/types/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.d.ts +1 -0
- package/dist/types/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.d.ts +1 -0
- package/dist/types/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.d.ts +1 -0
- package/dist/types/components/vviinn-onboarding/vviinn-onboarding.d.ts +1 -0
- package/dist/types/components/vviinn-overlay/vviinn-overlay.d.ts +1 -0
- package/dist/types/components/vviinn-overlayed-modal/vviinn-overlayed-modal.d.ts +1 -0
- package/dist/types/components/vviinn-preloader/vviinn-preloader.d.ts +1 -0
- package/dist/types/components/vviinn-privacy-badge/vviinn-privacy-badge.d.ts +1 -0
- package/dist/types/components/vviinn-product-card/render-helpers.d.ts +1 -0
- package/dist/types/components/vviinn-product-card/stories/args.d.ts +1 -0
- package/dist/types/components/vviinn-product-card/stories/decorators.d.ts +1 -0
- package/dist/types/components/vviinn-product-card/stories/vviinn-product-card.stories.d.ts +1 -0
- package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +9 -3
- package/dist/types/components/vviinn-slider/arrow.d.ts +1 -0
- package/dist/types/components/vviinn-slider/vviinn-slide/vviinn-slide.d.ts +1 -0
- package/dist/types/components/vviinn-slider/vviinn-slider.d.ts +1 -0
- package/dist/types/components/vviinn-teaser/vviinn-teaser.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-button/stories/args.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-widget/stories/args.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-widget/stories/decorators.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-widget/token-helpers.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +9 -1
- package/dist/types/components/vviinn-vps-button/stories/vviinn-vps-button.stories.d.ts +1 -0
- package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +1 -0
- package/dist/types/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.d.ts +1 -0
- package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +13 -1
- package/dist/types/components.d.ts +10 -4
- package/dist/types/cropper/Cropper.d.ts +1 -0
- package/dist/types/cropper/Handler.d.ts +1 -0
- package/dist/types/dom/index.d.ts +1 -0
- package/dist/types/error.d.ts +1 -0
- package/dist/types/file/index.d.ts +1 -0
- package/dist/types/geometry/Clip.d.ts +1 -0
- package/dist/types/geometry/Point.d.ts +1 -0
- package/dist/types/geometry/Rectangle.d.ts +1 -0
- package/dist/types/geometry/RectangleAlt.d.ts +1 -0
- package/dist/types/geometry/Sized.d.ts +1 -0
- package/dist/types/global.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/interfaces/generated.d.ts +1 -0
- package/dist/types/interfaces/recommendation.d.ts +1 -0
- package/dist/types/network/apiClient.d.ts +1 -0
- package/dist/types/network/ion/File.d.ts +1 -0
- package/dist/types/network/ion/Form.d.ts +1 -0
- package/dist/types/network/ion/Link.d.ts +1 -0
- package/dist/types/network/ion/ValueObject.d.ts +1 -0
- package/dist/types/network/request.d.ts +1 -0
- package/dist/types/network/utils.d.ts +1 -0
- package/dist/types/openApi/index.d.ts +6 -0
- package/dist/types/recommendation/events.d.ts +6 -0
- package/dist/types/recommendation/recommendation.d.ts +1 -0
- package/dist/types/searchSession/searchSession.d.ts +1 -0
- package/dist/types/sentry.d.ts +1 -0
- package/dist/types/slider/GridMode.d.ts +1 -0
- package/dist/types/store/file-processing.d.ts +1 -0
- package/dist/types/store/imageSearch.store.d.ts +1 -0
- package/dist/types/store/store.d.ts +8 -6
- package/dist/types/store/tracking.store.d.ts +4 -0
- package/dist/types/stories/image-selector.stories.d.ts +1 -0
- package/dist/types/stories/image-view.stories.d.ts +1 -0
- package/dist/types/stories/modal.stories.d.ts +1 -0
- package/dist/types/stories/onboarding.stories.d.ts +1 -0
- package/dist/types/stories/overlay.stories.d.ts +1 -0
- package/dist/types/stories/overlayedModal.stories.d.ts +1 -0
- package/dist/types/stories/privacy-badge.stories.d.ts +1 -0
- package/dist/types/stories/slider.stories.d.ts +1 -0
- package/dist/types/stories/teaser.stories.d.ts +1 -0
- package/dist/types/stories/vps-widget.stories.d.ts +1 -0
- package/dist/types/stories/vviinn-product.stories.d.ts +1 -0
- package/dist/types/tracking/event.d.ts +4 -0
- package/dist/types/tracking/filter.d.ts +3 -0
- package/dist/types/tracking/index.d.ts +9 -0
- package/dist/types/tracking/models.d.ts +13 -0
- package/dist/types/tracking/product.d.ts +7 -0
- package/dist/types/tracking/search.d.ts +3 -0
- package/dist/types/tracking/widget.d.ts +5 -0
- package/dist/types/utils/collections/collectionsUtils.d.ts +1 -0
- package/dist/types/utils/either.d.ts +1 -0
- package/dist/types/utils/enum/enumUtils.d.ts +1 -0
- package/dist/types/utils/event/Events.d.ts +1 -0
- package/dist/types/utils/number/index.d.ts +1 -0
- package/dist/types/utils/option/option.d.ts +1 -0
- package/dist/types/utils/semigroup/semigroupDiff.d.ts +1 -0
- package/dist/types/utils/token/tokenUtils.d.ts +1 -0
- package/dist/vviinn-widgets/{p-e362fa80.entry.js → p-07d8ba79.entry.js} +1 -1
- package/dist/vviinn-widgets/p-196479f9.js +1 -0
- package/dist/vviinn-widgets/{p-a5b69a48.entry.js → p-2d4cb17f.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-679ea2ce.js → p-7d5af04d.js} +1 -1
- package/dist/vviinn-widgets/{p-4530ca32.entry.js → p-9c7297c8.entry.js} +1 -1
- package/{www/build/p-55491d9b.js → dist/vviinn-widgets/p-a66512b2.js} +1 -1
- package/dist/vviinn-widgets/p-ae524f97.entry.js +1 -0
- package/{www/build/p-e882fbeb.js → dist/vviinn-widgets/p-ce96f232.js} +1 -1
- package/dist/vviinn-widgets/{p-b4b46a70.js → p-dc2da207.js} +1 -1
- package/dist/vviinn-widgets/p-fce4183d.entry.js +1 -0
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +11 -3
- package/www/build/{p-e362fa80.entry.js → p-07d8ba79.entry.js} +1 -1
- package/www/build/p-196479f9.js +1 -0
- package/www/build/{p-a5b69a48.entry.js → p-2d4cb17f.entry.js} +1 -1
- package/www/build/p-32bb0615.js +1 -0
- package/www/build/{p-679ea2ce.js → p-7d5af04d.js} +1 -1
- package/www/build/{p-4530ca32.entry.js → p-9c7297c8.entry.js} +1 -1
- package/{dist/vviinn-widgets/p-55491d9b.js → www/build/p-a66512b2.js} +1 -1
- package/www/build/p-ae524f97.entry.js +1 -0
- package/{dist/vviinn-widgets/p-e882fbeb.js → www/build/p-ce96f232.js} +1 -1
- package/www/build/{p-b4b46a70.js → p-dc2da207.js} +1 -1
- package/www/build/p-fce4183d.entry.js +1 -0
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +1 -107
- package/dist/cjs/Handler-d1a8a86a.js +0 -329
- package/dist/cjs/cropper-handler.cjs.entry.js +0 -27
- package/dist/cjs/vviinn-error.cjs.entry.js +0 -19
- package/dist/cjs/vviinn-preloader.cjs.entry.js +0 -26
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +0 -97
- package/dist/esm/Handler-639a4cb3.js +0 -308
- package/dist/esm/cropper-handler.entry.js +0 -23
- package/dist/esm/vviinn-error.entry.js +0 -15
- package/dist/esm/vviinn-preloader.entry.js +0 -22
- package/dist/esm/vviinn-vps-widget.entry.js +0 -93
- package/dist/types/components/vviinn-vpr-widget/GridMode.d.ts +0 -1
- package/dist/vviinn-widgets/p-1c141479.entry.js +0 -1
- package/dist/vviinn-widgets/p-320844ea.entry.js +0 -1
- package/dist/vviinn-widgets/p-6239a782.entry.js +0 -1
- package/dist/vviinn-widgets/p-757849fd.entry.js +0 -1
- package/dist/vviinn-widgets/p-80f0d4e0.js +0 -1
- package/dist/vviinn-widgets/p-935b4f49.entry.js +0 -1
- package/dist/vviinn-widgets/p-b0243e84.entry.js +0 -1
- package/dist/vviinn-widgets/p-f582db5c.js +0 -1
- package/www/build/p-1c141479.entry.js +0 -1
- package/www/build/p-320844ea.entry.js +0 -1
- package/www/build/p-4379b1c2.js +0 -1
- package/www/build/p-6239a782.entry.js +0 -1
- package/www/build/p-757849fd.entry.js +0 -1
- package/www/build/p-80f0d4e0.js +0 -1
- package/www/build/p-935b4f49.entry.js +0 -1
- package/www/build/p-b0243e84.entry.js +0 -1
- package/www/build/p-f582db5c.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const NAMESPACE = 'vviinn-widgets';
|
|
2
|
-
const Env = /* vviinn-widgets */ {"packageVersion":"2.
|
|
2
|
+
const Env = /* vviinn-widgets */ {"packageVersion":"2.4.1","packageName":"vviinn-widgets","environment":"local"};
|
|
3
3
|
|
|
4
4
|
let scopeId;
|
|
5
5
|
let hostTagName;
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
import { g as globalScripts } from './app-globals-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-d7147986.js';
|
|
2
|
+
import { g as globalScripts } from './app-globals-f91c6f94.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
Stencil Client Patch Esm v2.9.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -12,7 +12,7 @@ const defineCustomElements = (win, options) => {
|
|
|
12
12
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
13
13
|
return patchEsm().then(() => {
|
|
14
14
|
globalScripts();
|
|
15
|
-
return bootstrapLazy([["cropper-
|
|
15
|
+
return bootstrapLazy([["cropper-handler_27",[[1,"vviinn-vps-widget",{"token":[1],"apiPath":[1,"api-path"],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"slidePosition":[32],"width":[32],"wrongImageFormat":[32]},[[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"],[0,"cropperChanged","trachSearchAreaChanges"],[0,"detectedObjectClicked","trackDetectedObject"],[0,"filterSelected","trackFilter"]]],[1,"vviinn-image-view"],[1,"vviinn-onboarding"],[1,"vviinn-example-images",null,[[0,"exampleImageSelected","handleImageSelection"],[0,"exampleImageError","handleImageSelectionError"]]],[1,"vviinn-overlayed-modal",{"active":[4]}],[1,"vviinn-empty-results"],[1,"vviinn-image-selector"],[1,"vviinn-server-error"],[1,"vviinn-wrong-format"],[1,"search-filters",{"filter":[16],"selectedCategoryId":[32],"hideFilters":[32]}],[1,"vviinn-privacy-badge"],[1,"vviinn-teaser"],[1,"image-cropper",{"disabled":[4],"handleMove":[32]}],[1,"vviinn-example-image",{"src":[1],"width":[2],"height":[2],"selected":[32]}],[1,"highlight-box"],[1,"vviinn-detected-object",{"detectedObject":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"slider":[32]}],[1,"vviinn-onboarding-card-1"],[1,"vviinn-onboarding-card-2"],[1,"vviinn-onboarding-card-3"],[1,"vviinn-overlay"],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32]}],[1,"cropper-handler",{"handler":[16],"disabled":[4]}],[1,"vviinn-error"],[1,"vviinn-preloader"],[1,"vviinn-product-card",{"brand":[1],"currency":[1],"deeplink":[1],"image":[1],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"locale":[1],"price":[2],"pricePrefix":[1,"price-prefix"],"productId":[1,"product-id"],"productTitle":[1,"product-title"],"productType":[1,"product-type"],"salePrice":[2,"sale-price"],"responsive":[4],"dimmedBackground":[4,"dimmed-background"],"index":[2],"imageLoaded":[32]}]]],["vviinn-vps-button",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"apiPath":[1,"api-path"],"pressed":[32]},[[0,"modalClosed","handleModalClosed"]]]]],["vviinn-carousel_2",[[1,"vviinn-vpr-widget",{"blockTitle":[1,"block-title"],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"productId":[1,"product-id"],"token":[1],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"mode":[1],"campaignType":[1,"campaign-type"],"locale":[1],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"recommendations":[32],"loaded":[32]},[[0,"productImageLoaded","handleImageLoading"],[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"recommendations":[16],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32]}]]],["vviinn-recommendations-sidebar",[[1,"vviinn-recommendations-sidebar",{"sidebarTitle":[1,"sidebar-title"],"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"widgetScrollbar":[4,"widget-scrollbar"],"state":[32]},[[16,"click","bodyClickListener"]]]]],["vviinn-vpr-button",[[1,"vviinn-vpr-button",{"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"sidebarTitle":[1,"sidebar-title"],"modalScrollbar":[4,"modal-scrollbar"]}]]]], options);
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
18
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { p as pipe } from './Handler-639a4cb3.js';
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-d7147986.js';
|
|
2
|
+
import { B as _Array, _ as _function, p as pipe, C as chainW, D as makeRequest, F as fromEither, G as getApiPath, H as createInitGetRequest, I as sequenceT, J as Apply, u as state, K as createProductViewVprEvent, y as v4, z as createTrackingApi, L as createWidgetVprEvent, T as TaskEither, E as Either, i as imageSearchState } from './index-840ec915.js';
|
|
3
|
+
import { e as ChevronIcon } from './index-00c7b7c2.js';
|
|
5
4
|
|
|
6
5
|
const vviinnCarouselCss = ":host{--vviinn-progressbar-width:0;--vviinn-carousel-item-width:150px;--vviinn-carousel-columns-internal:var(--vviinn-carousel-columns, 4);--vviinn-carousel-image-width-system:140px}.body{display:flex;position:relative;width:var(--vviinn-carousel-content-width);flex-direction:column}.content-wrapper *{box-sizing:border-box}.content-wrapper{overflow-y:hidden;overflow-x:auto;flex-grow:1}.bullets{margin-top:16px;display:flex;flex-direction:row;grid-gap:24px;justify-content:center}.bullet{width:10px;height:10px;background:#E0E0E0;border-radius:50%;cursor:pointer}.bullet.active{background:#161616}.content:not(.show-scrollbar),.content.grid{scrollbar-color:#fff0 #fff0}.content:not(.show-scrollbar)::-webkit-scrollbar,.content.grid::-webkit-scrollbar{opacity:0}.content{display:flex;flex-direction:row;grid-gap:8px;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-y:hidden;overflow-x:auto;flex-grow:1;padding-bottom:16px}.content.left>*{scroll-snap-align:start}.content.right>*{scroll-snap-align:end}:host(.continuity) button{border-radius:2px}:host(.grid) button{border-radius:50%}button{align-items:center;background-color:white;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);cursor:pointer;display:grid;height:40px;justify-items:center;position:absolute;top:calc(50% - 20px);width:40px;z-index:1;padding:0;margin:0}button{fill:#525252}button.prev svg{transform:rotate(180deg);margin-left:-5px}.prev{left:0}.next{right:0}.items-group{display:grid;grid-gap:16px;grid-template-columns:repeat(var(--vviinn-carousel-columns-internal), 1fr);min-width:100%}vviinn-product-card::part(price-container){text-align:center}:host(.classic) vviinn-product-card::part(title),:host(.classic) vviinn-product-card::part(brand),:host(.classic) vviinn-product-card::part(type){text-align:center}@media (max-width: 480px){:host(.modern) button{display:none}.items-group{grid-template-columns:repeat(2, 1fr)}}";
|
|
7
6
|
|
|
@@ -170,8 +169,8 @@ let VviinnCarousel = class {
|
|
|
170
169
|
"show-scrollbar": this.showScrollbar(),
|
|
171
170
|
};
|
|
172
171
|
}
|
|
173
|
-
renderRecommendation(recommendation) {
|
|
174
|
-
return (h("vviinn-product-card", { part: "product-part", productId: recommendation.productId, productTitle: recommendation.title, deeplink: recommendation.deeplink, image: recommendation.image.thumbnail, brand: recommendation.brand, imageWidth: this.imageWidth, imageRatio: 1, price: recommendation.price.actual, salePrice: recommendation.price.sale, responsive: this.mode === "grid", dimmedBackground: this.mode === "continuity" }));
|
|
172
|
+
renderRecommendation(recommendation, rank) {
|
|
173
|
+
return (h("vviinn-product-card", { part: "product-part", productId: recommendation.productId, productTitle: recommendation.title, deeplink: recommendation.deeplink, image: recommendation.image.thumbnail, brand: recommendation.brand, imageWidth: this.imageWidth, imageRatio: 1, price: recommendation.price.actual, salePrice: recommendation.price.sale, responsive: this.mode === "grid", dimmedBackground: this.mode === "continuity", index: rank }));
|
|
175
174
|
}
|
|
176
175
|
renderRecommendationGroup(elements) {
|
|
177
176
|
return h("div", { class: CONTENT_GROUP_CSS_CLASS }, elements);
|
|
@@ -185,7 +184,7 @@ let VviinnCarousel = class {
|
|
|
185
184
|
: this.renderRecommendationsElements();
|
|
186
185
|
}
|
|
187
186
|
renderRecommendationsElements() {
|
|
188
|
-
return this.recommendations.map((r) => this.renderRecommendation(r));
|
|
187
|
+
return this.recommendations.map((r, i) => this.renderRecommendation(r, i));
|
|
189
188
|
}
|
|
190
189
|
renderGrid() {
|
|
191
190
|
const recommendations = this.renderRecommendationsElements();
|
|
@@ -207,181 +206,6 @@ let VviinnCarousel = class {
|
|
|
207
206
|
};
|
|
208
207
|
VviinnCarousel.style = vviinnCarouselCss;
|
|
209
208
|
|
|
210
|
-
class GtagAnalytics {
|
|
211
|
-
sendImpression(product) {
|
|
212
|
-
var _a, _b, _c;
|
|
213
|
-
gtag('event', 'view_item_list', {
|
|
214
|
-
items: [
|
|
215
|
-
{
|
|
216
|
-
id: product.productId,
|
|
217
|
-
name: product.title,
|
|
218
|
-
brand: (_a = product.brand) !== null && _a !== void 0 ? _a : '',
|
|
219
|
-
category: (_b = product.productType) !== null && _b !== void 0 ? _b : '',
|
|
220
|
-
list_name: 'VI VPR View',
|
|
221
|
-
price: Math.min(...[product.price.actual, (_c = product.price.sale) !== null && _c !== void 0 ? _c : Infinity])
|
|
222
|
-
}
|
|
223
|
-
]
|
|
224
|
-
});
|
|
225
|
-
return undefined;
|
|
226
|
-
}
|
|
227
|
-
sendClick(product) {
|
|
228
|
-
var _a, _b, _c;
|
|
229
|
-
gtag('event', 'select_content', {
|
|
230
|
-
content_type: 'product',
|
|
231
|
-
items: [
|
|
232
|
-
{
|
|
233
|
-
id: product.productId,
|
|
234
|
-
name: product.title,
|
|
235
|
-
brand: (_a = product.brand) !== null && _a !== void 0 ? _a : '',
|
|
236
|
-
category: (_b = product.productType) !== null && _b !== void 0 ? _b : '',
|
|
237
|
-
list_name: 'VI VPR View',
|
|
238
|
-
price: Math.min(...[product.price.actual, (_c = product.price.sale) !== null && _c !== void 0 ? _c : Infinity])
|
|
239
|
-
}
|
|
240
|
-
]
|
|
241
|
-
});
|
|
242
|
-
return undefined;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
class GAnalytics {
|
|
247
|
-
constructor() {
|
|
248
|
-
ga('require', 'ec');
|
|
249
|
-
}
|
|
250
|
-
convertProduct(product) {
|
|
251
|
-
var _a, _b, _c;
|
|
252
|
-
return {
|
|
253
|
-
id: product.productId,
|
|
254
|
-
name: product.title,
|
|
255
|
-
brand: (_a = product.brand) !== null && _a !== void 0 ? _a : '',
|
|
256
|
-
category: (_b = product.productType) !== null && _b !== void 0 ? _b : '',
|
|
257
|
-
list: 'VI VPR View',
|
|
258
|
-
price: Math.min(...[product.price.actual, (_c = product.price.sale) !== null && _c !== void 0 ? _c : Infinity])
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
|
-
sendImpression(product) {
|
|
262
|
-
ga('ec:addImpression', this.convertProduct(product));
|
|
263
|
-
return undefined;
|
|
264
|
-
}
|
|
265
|
-
sendClick(product) {
|
|
266
|
-
var _a, _b, _c;
|
|
267
|
-
ga('ec:addProduct', {
|
|
268
|
-
id: product.productId,
|
|
269
|
-
name: product.title,
|
|
270
|
-
brand: (_a = product.brand) !== null && _a !== void 0 ? _a : '',
|
|
271
|
-
category: (_b = product.productType) !== null && _b !== void 0 ? _b : '',
|
|
272
|
-
price: Math.min(...[product.price.actual, (_c = product.price.sale) !== null && _c !== void 0 ? _c : Infinity])
|
|
273
|
-
});
|
|
274
|
-
ga('ec:setAction', 'click', { list: 'VI VPR View' });
|
|
275
|
-
return undefined;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
const getGtagAnalytics = () => _function.pipe(Option.fromNullable(window.gtag), Option.map(() => new GtagAnalytics()));
|
|
280
|
-
const getCommonAnalytics = () => _function.pipe(Option.fromNullable(window.ga), Option.map(() => new GAnalytics()));
|
|
281
|
-
const analyticsMonoid = Option.getMonoid(Semigroup.first());
|
|
282
|
-
const getAnalyticsModule = analyticsMonoid.concat(getGtagAnalytics(), getCommonAnalytics());
|
|
283
|
-
|
|
284
|
-
const FIT_EXPR = /fit\/\d+\//;
|
|
285
|
-
const containsFit = (url) => {
|
|
286
|
-
return _function.pipe(url.match(FIT_EXPR), Either.fromNullable(url), Either.map(() => url));
|
|
287
|
-
};
|
|
288
|
-
const processWidth = (url, size) => {
|
|
289
|
-
return _function.pipe(containsFit(url), Either.map((url) => url.replace(FIT_EXPR, `fit/${size}/`)), Either.getOrElse(() => url));
|
|
290
|
-
};
|
|
291
|
-
const Linked = (props, child) => props.deeplink ? (h("a", { class: props.part, part: props.part, href: props.deeplink }, child)) : (child);
|
|
292
|
-
const FormattedPrice = (props) => {
|
|
293
|
-
var _a;
|
|
294
|
-
const locale = props.locale;
|
|
295
|
-
const formattedPrice = new Intl.NumberFormat(locale, {
|
|
296
|
-
minimumFractionDigits: 2,
|
|
297
|
-
}).format(props.price);
|
|
298
|
-
const fullPrice = `${(_a = props.prefix) !== null && _a !== void 0 ? _a : ""} ${formattedPrice} ${props.currency}`;
|
|
299
|
-
return (h("span", { class: "price-amount", part: "price-amount" }, fullPrice));
|
|
300
|
-
};
|
|
301
|
-
const Price = (props) => {
|
|
302
|
-
const priceEl = (h(FormattedPrice, { prefix: props.prefix, currency: props.currency, price: props.price, locale: props.locale }));
|
|
303
|
-
return (h("span", { class: "price-container", part: "price-container" }, props.salePrice ? ([
|
|
304
|
-
h("span", { class: "price-sale", part: "price-sale" },
|
|
305
|
-
h(FormattedPrice, { prefix: props.prefix, currency: props.currency, price: props.salePrice, locale: props.locale })),
|
|
306
|
-
h("span", { class: "price-outdated", part: "price-outdated" }, priceEl),
|
|
307
|
-
]) : (h("span", { class: "price-regular", part: "price-regular" }, priceEl))));
|
|
308
|
-
};
|
|
309
|
-
const Image = (props, onLoadEnd = () => undefined) => (h("picture", null,
|
|
310
|
-
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 })));
|
|
311
|
-
const ResponsiveImage = (props, onLoadEnd = () => undefined) => (h("picture", null,
|
|
312
|
-
h("img", { loading: props.lazy ? "lazy" : "eager", part: "image", class: "image responsive", src: processWidth(props.src, props.width), alt: props.title, onLoad: onLoadEnd })));
|
|
313
|
-
|
|
314
|
-
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}";
|
|
315
|
-
|
|
316
|
-
let VviinnProductCard = class {
|
|
317
|
-
constructor(hostRef) {
|
|
318
|
-
registerInstance(this, hostRef);
|
|
319
|
-
this.recommendationLoad = createEvent(this, "recommendationLoad", 7);
|
|
320
|
-
this.recommendationView = createEvent(this, "recommendationView", 7);
|
|
321
|
-
this.recommendationClick = createEvent(this, "recommendationClick", 7);
|
|
322
|
-
this.productImageLoaded = createEvent(this, "productImageLoaded", 7);
|
|
323
|
-
this.currency = undefined;
|
|
324
|
-
this.imageRatio = 1;
|
|
325
|
-
this.imageWidth = 200;
|
|
326
|
-
this.locale = undefined;
|
|
327
|
-
this.pricePrefix = undefined;
|
|
328
|
-
this.responsive = false;
|
|
329
|
-
this.dimmedBackground = false;
|
|
330
|
-
this.imageLoaded = false;
|
|
331
|
-
this.intersectionObserver = new IntersectionObserver(this.intersectionCallback.bind(this), { threshold: 1.0 });
|
|
332
|
-
}
|
|
333
|
-
intersectionCallback(data) {
|
|
334
|
-
if (data.some((entry) => entry.isIntersecting)) {
|
|
335
|
-
_function.pipe(getAnalyticsModule, Option.map((analytics) => analytics.sendImpression(this.getProduct())));
|
|
336
|
-
this.recommendationView.emit(this.productId);
|
|
337
|
-
this.intersectionObserver.disconnect();
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
componentDidLoad() {
|
|
341
|
-
this.recommendationLoad.emit(this.productId);
|
|
342
|
-
this.intersectionObserver.observe(this.el);
|
|
343
|
-
const links = this.el.shadowRoot.querySelectorAll("a");
|
|
344
|
-
links.forEach((link) => link.addEventListener("mousedown", (event) => {
|
|
345
|
-
this.recommendationClick.emit(this.productId);
|
|
346
|
-
if (window.ga) {
|
|
347
|
-
event.preventDefault();
|
|
348
|
-
}
|
|
349
|
-
_function.pipe(getAnalyticsModule, Option.match(() => null, (analytics) => analytics.sendClick(this.getProduct())));
|
|
350
|
-
if (window.ga) {
|
|
351
|
-
ga("send", "event", "UX", "click", "Results", {
|
|
352
|
-
hitCallback: function () {
|
|
353
|
-
document.location.href = this.deeplink;
|
|
354
|
-
},
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
}));
|
|
358
|
-
}
|
|
359
|
-
getProduct() {
|
|
360
|
-
return imageSearchState.results.find((r) => r.productId === this.productId);
|
|
361
|
-
}
|
|
362
|
-
renderImage() {
|
|
363
|
-
const props = {
|
|
364
|
-
width: this.imageWidth,
|
|
365
|
-
height: this.imageWidth * this.imageRatio,
|
|
366
|
-
src: this.image,
|
|
367
|
-
title: this.productTitle,
|
|
368
|
-
lazy: false,
|
|
369
|
-
};
|
|
370
|
-
return this.responsive
|
|
371
|
-
? ResponsiveImage(props, () => this.kek())
|
|
372
|
-
: Image(props, () => this.kek());
|
|
373
|
-
}
|
|
374
|
-
kek() {
|
|
375
|
-
this.productImageLoaded.emit(this.productId);
|
|
376
|
-
}
|
|
377
|
-
render() {
|
|
378
|
-
var _a, _b, _c;
|
|
379
|
-
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 })));
|
|
380
|
-
}
|
|
381
|
-
get el() { return getElement(this); }
|
|
382
|
-
};
|
|
383
|
-
VviinnProductCard.style = vviinnProductCardCss;
|
|
384
|
-
|
|
385
209
|
const createBearerString = (x) => `Bearer ${x}`;
|
|
386
210
|
const createAuthedHeader = (x) => new Headers({
|
|
387
211
|
Authorization: x,
|
|
@@ -1061,20 +885,42 @@ let VviinnVprWidget = class {
|
|
|
1061
885
|
this.getRecommendations();
|
|
1062
886
|
}
|
|
1063
887
|
handleApiPathChange(newPath) {
|
|
1064
|
-
state
|
|
888
|
+
state.apiPath = newPath;
|
|
1065
889
|
this.getRecommendations();
|
|
1066
890
|
}
|
|
1067
|
-
|
|
891
|
+
handleImageLoading({ detail }) {
|
|
1068
892
|
this.productImageLoadedSubject.next(detail);
|
|
1069
893
|
}
|
|
894
|
+
trackRecommendationView({ detail }) {
|
|
895
|
+
const recommendationViewEvent = createProductViewVprEvent(Object.assign({ session_id: this.uiSessionId }, detail));
|
|
896
|
+
this.trackingApi.trackEvent(recommendationViewEvent);
|
|
897
|
+
}
|
|
898
|
+
trackRecommendationClick({ detail }) {
|
|
899
|
+
const recommendationClickEvent = createProductViewVprEvent(Object.assign({ session_id: this.uiSessionId }, detail));
|
|
900
|
+
this.trackingApi.trackEvent(recommendationClickEvent);
|
|
901
|
+
}
|
|
1070
902
|
connectedCallback() {
|
|
1071
|
-
state
|
|
1072
|
-
state
|
|
1073
|
-
state
|
|
903
|
+
state.apiPath = this.apiPath;
|
|
904
|
+
state.currencySign = this.currencySign;
|
|
905
|
+
state.locale = this.locale;
|
|
906
|
+
this.uiSessionId = v4();
|
|
907
|
+
this.trackingApi = createTrackingApi(this.apiPath, this.token);
|
|
908
|
+
const widgetOpenEvent = createWidgetVprEvent({
|
|
909
|
+
action: "open",
|
|
910
|
+
session_id: this.uiSessionId,
|
|
911
|
+
});
|
|
912
|
+
this.trackingApi.trackEvent(widgetOpenEvent);
|
|
913
|
+
}
|
|
914
|
+
disconnectedCallback() {
|
|
915
|
+
const widgetCloseEvent = createWidgetVprEvent({
|
|
916
|
+
action: "close",
|
|
917
|
+
session_id: this.uiSessionId,
|
|
918
|
+
});
|
|
919
|
+
this.trackingApi.trackEvent(widgetCloseEvent);
|
|
1074
920
|
}
|
|
1075
921
|
async componentWillLoad() {
|
|
1076
|
-
state
|
|
1077
|
-
state
|
|
922
|
+
state.pricePrefix = this.pricePrefix;
|
|
923
|
+
state.currencySign = this.currencySign;
|
|
1078
924
|
this.getRecommendations();
|
|
1079
925
|
}
|
|
1080
926
|
async getRecommendations() {
|
|
@@ -1094,10 +940,9 @@ let VviinnVprWidget = class {
|
|
|
1094
940
|
this.recommendations = (_a = data === null || data === void 0 ? void 0 : data.extended) !== null && _a !== void 0 ? _a : data;
|
|
1095
941
|
imageSearchState.results = this.recommendations;
|
|
1096
942
|
this.loaded = true;
|
|
1097
|
-
|
|
1098
|
-
this.productIds = this.recommendations.map(r => r.productId);
|
|
943
|
+
this.productIds = this.recommendations.map((r) => r.productId);
|
|
1099
944
|
this.productImageLoadedSubject.subscribe((id) => {
|
|
1100
|
-
this.productIds = this.productIds.filter(x => x !== id);
|
|
945
|
+
this.productIds = this.productIds.filter((x) => x !== id);
|
|
1101
946
|
if (this.productIds.length === 0) {
|
|
1102
947
|
this.recommendationsLoaded.emit();
|
|
1103
948
|
}
|
|
@@ -1114,16 +959,16 @@ let VviinnVprWidget = class {
|
|
|
1114
959
|
loaded: this.loaded,
|
|
1115
960
|
empty: this.recommendations.length == 0,
|
|
1116
961
|
[this.mode]: true,
|
|
1117
|
-
}, "aria-hidden": this.loaded ? "false" : "true" }, this.renderExternalCSS(), h("style", null, state
|
|
962
|
+
}, "aria-hidden": this.loaded ? "false" : "true" }, this.renderExternalCSS(), h("style", null, state.fallbackStyles), h("h2", { part: "recommendations-title" }, this.blockTitle), this.useCarousel ? this.renderCarousel() : this.renderResults()));
|
|
1118
963
|
}
|
|
1119
|
-
renderRecommendation(recommendation) {
|
|
1120
|
-
return (h("vviinn-product-card", { part: "product-part", productId: recommendation.productId, productTitle: recommendation.title, deeplink: recommendation.deeplink, image: recommendation.image.thumbnail, brand: recommendation.brand, imageWidth: this.imageWidth, imageRatio: 1, price: recommendation.price.actual, salePrice: recommendation.price.sale, responsive: this.mode === "grid", dimmedBackground: this.useDimmedBackgroundInCard() }));
|
|
964
|
+
renderRecommendation(recommendation, index) {
|
|
965
|
+
return (h("vviinn-product-card", { part: "product-part", productId: recommendation.productId, productTitle: recommendation.title, deeplink: recommendation.deeplink, image: recommendation.image.thumbnail, brand: recommendation.brand, imageWidth: this.imageWidth, imageRatio: 1, price: recommendation.price.actual, salePrice: recommendation.price.sale, responsive: this.mode === "grid", dimmedBackground: this.useDimmedBackgroundInCard(), index: index }));
|
|
1121
966
|
}
|
|
1122
967
|
useDimmedBackgroundInCard() {
|
|
1123
968
|
return this.mode === "continuity" || !this.useCarousel;
|
|
1124
969
|
}
|
|
1125
970
|
renderResults() {
|
|
1126
|
-
return (h("div", { class: "recommendations-grid", part: "recommendations-grid" }, this.recommendations.map((r) => this.renderRecommendation(r))));
|
|
971
|
+
return (h("div", { class: "recommendations-grid", part: "recommendations-grid" }, this.recommendations.map((r, i) => this.renderRecommendation(r, i))));
|
|
1127
972
|
}
|
|
1128
973
|
renderCarousel() {
|
|
1129
974
|
return (h("vviinn-carousel", { mode: this.mode, imageWidth: this.imageWidth, showScroll: this.showScroll, recommendations: this.recommendations }));
|
|
@@ -1137,4 +982,4 @@ let VviinnVprWidget = class {
|
|
|
1137
982
|
};
|
|
1138
983
|
VviinnVprWidget.style = vviinnVprWidgetCss;
|
|
1139
984
|
|
|
1140
|
-
export { VviinnCarousel as vviinn_carousel,
|
|
985
|
+
export { VviinnCarousel as vviinn_carousel, VviinnVprWidget as vviinn_vpr_widget };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
2
|
-
import {
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-d7147986.js';
|
|
2
|
+
import { d as CrossIcon } from './index-00c7b7c2.js';
|
|
3
3
|
|
|
4
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%)}}";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
2
|
-
import { V as VisualSearchIcon } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-d7147986.js';
|
|
2
|
+
import { V as VisualSearchIcon } from './index-00c7b7c2.js';
|
|
3
3
|
|
|
4
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}";
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
2
|
-
import {
|
|
3
|
-
import { S as SlotSkeleton } from './customized-slots-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-d7147986.js';
|
|
2
|
+
import { c as CameraIcon } from './index-00c7b7c2.js';
|
|
3
|
+
import { S as SlotSkeleton } from './customized-slots-7be7f3b8.js';
|
|
4
4
|
|
|
5
5
|
const vviinnVpsButtonCss = ":host{cursor:pointer}";
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
import { g as globalScripts } from './app-globals-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-d7147986.js';
|
|
2
|
+
import { g as globalScripts } from './app-globals-f91c6f94.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
Stencil Client Patch Browser v2.9.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
|
|
16
16
|
patchBrowser().then(options => {
|
|
17
17
|
globalScripts();
|
|
18
|
-
return bootstrapLazy([["cropper-
|
|
18
|
+
return bootstrapLazy([["cropper-handler_27",[[1,"vviinn-vps-widget",{"token":[1],"apiPath":[1,"api-path"],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"slidePosition":[32],"width":[32],"wrongImageFormat":[32]},[[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"],[0,"cropperChanged","trachSearchAreaChanges"],[0,"detectedObjectClicked","trackDetectedObject"],[0,"filterSelected","trackFilter"]]],[1,"vviinn-image-view"],[1,"vviinn-onboarding"],[1,"vviinn-example-images",null,[[0,"exampleImageSelected","handleImageSelection"],[0,"exampleImageError","handleImageSelectionError"]]],[1,"vviinn-overlayed-modal",{"active":[4]}],[1,"vviinn-empty-results"],[1,"vviinn-image-selector"],[1,"vviinn-server-error"],[1,"vviinn-wrong-format"],[1,"search-filters",{"filter":[16],"selectedCategoryId":[32],"hideFilters":[32]}],[1,"vviinn-privacy-badge"],[1,"vviinn-teaser"],[1,"image-cropper",{"disabled":[4],"handleMove":[32]}],[1,"vviinn-example-image",{"src":[1],"width":[2],"height":[2],"selected":[32]}],[1,"highlight-box"],[1,"vviinn-detected-object",{"detectedObject":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"slider":[32]}],[1,"vviinn-onboarding-card-1"],[1,"vviinn-onboarding-card-2"],[1,"vviinn-onboarding-card-3"],[1,"vviinn-overlay"],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32]}],[1,"cropper-handler",{"handler":[16],"disabled":[4]}],[1,"vviinn-error"],[1,"vviinn-preloader"],[1,"vviinn-product-card",{"brand":[1],"currency":[1],"deeplink":[1],"image":[1],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"locale":[1],"price":[2],"pricePrefix":[1,"price-prefix"],"productId":[1,"product-id"],"productTitle":[1,"product-title"],"productType":[1,"product-type"],"salePrice":[2,"sale-price"],"responsive":[4],"dimmedBackground":[4,"dimmed-background"],"index":[2],"imageLoaded":[32]}]]],["vviinn-vps-button",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"apiPath":[1,"api-path"],"pressed":[32]},[[0,"modalClosed","handleModalClosed"]]]]],["vviinn-carousel_2",[[1,"vviinn-vpr-widget",{"blockTitle":[1,"block-title"],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"productId":[1,"product-id"],"token":[1],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"mode":[1],"campaignType":[1,"campaign-type"],"locale":[1],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"recommendations":[32],"loaded":[32]},[[0,"productImageLoaded","handleImageLoading"],[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"recommendations":[16],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32]}]]],["vviinn-recommendations-sidebar",[[1,"vviinn-recommendations-sidebar",{"sidebarTitle":[1,"sidebar-title"],"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"widgetScrollbar":[4,"widget-scrollbar"],"state":[32]},[[16,"click","bodyClickListener"]]]]],["vviinn-vpr-button",[[1,"vviinn-vpr-button",{"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"sidebarTitle":[1,"sidebar-title"],"modalScrollbar":[4,"modal-scrollbar"]}]]]], options);
|
|
19
19
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -8,3 +8,4 @@ declare type ImageDimensions = ImageDimension[];
|
|
|
8
8
|
export declare const scaleByLargestSide: (toSize: number) => (dimensions: ImageDimensions) => ImageDimensions;
|
|
9
9
|
export declare const dimensionsFromImage: (image: HTMLImageElement) => ImageDimensions;
|
|
10
10
|
export {};
|
|
11
|
+
//# sourceMappingURL=sizing.d.ts.map
|
|
@@ -10,3 +10,4 @@ export declare const isVCS: (c: Campaign) => c is VCS;
|
|
|
10
10
|
export declare type Campaign = VPR | VCS;
|
|
11
11
|
export declare function fold<A, B>(onVPR: () => A, onVCS: () => B): (c: Campaign) => A | B;
|
|
12
12
|
export declare function fromString(s: CampaignName): Campaign;
|
|
13
|
+
//# sourceMappingURL=Campaign.d.ts.map
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import * as C from "./Campaign";
|
|
2
2
|
export declare const getRecommendationsService: (campaignType: C.CampaignName) => ((productId: string) => (options: RequestInit) => import("fp-ts/lib/TaskEither").TaskEither<import("../error").BasicError<string | Response>, import("./VPRCampaignResponse").VPRCampaignResponse>) | ((productId: string) => (options: RequestInit) => import("fp-ts/lib/TaskEither").TaskEither<import("../error").BasicError<string | Response>, import("./VCSCampaignResponse").VCSCampaignResponse>);
|
|
3
|
+
//# sourceMappingURL=CampaignService.d.ts.map
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { VCSCampaignResponse } from "./VCSCampaignResponse";
|
|
2
2
|
export declare const getVCSRecommendations: (productId: string) => (options: RequestInit) => import("fp-ts/lib/TaskEither").TaskEither<import("../error").BasicError<string | Response>, VCSCampaignResponse>;
|
|
3
|
+
//# sourceMappingURL=VCSCampaignService.d.ts.map
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { VPRCampaignResponse } from "./VPRCampaignResponse";
|
|
2
2
|
export declare const getVPRRecommendations: (productId: string) => (options: RequestInit) => import("fp-ts/lib/TaskEither").TaskEither<import("../error").BasicError<string | Response>, VPRCampaignResponse>;
|
|
3
|
+
//# sourceMappingURL=VPRCampaignService.d.ts.map
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { EventEmitter } from "../../../../stencil-public-runtime";
|
|
1
2
|
export declare class ImageCropper {
|
|
2
3
|
el: HTMLElement;
|
|
3
4
|
disabled: boolean;
|
|
4
5
|
handleMove: boolean;
|
|
6
|
+
cropperChanged: EventEmitter;
|
|
5
7
|
private handlerMoveDirection;
|
|
6
8
|
private mouseStartPoint;
|
|
7
9
|
private pointerMoveListener;
|
|
@@ -9,9 +11,11 @@ export declare class ImageCropper {
|
|
|
9
11
|
private bounds;
|
|
10
12
|
componentDidLoad(): void;
|
|
11
13
|
private handleHandlerMove;
|
|
14
|
+
private outOfBounds;
|
|
12
15
|
private handleCropperMove;
|
|
13
16
|
private handlePointerDown;
|
|
14
17
|
private handleSearchAreaRelease;
|
|
15
18
|
private getStyleMap;
|
|
16
19
|
render(): any;
|
|
17
20
|
}
|
|
21
|
+
//# sourceMappingURL=image-cropper.d.ts.map
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { EventEmitter } from "../../../stencil-public-runtime";
|
|
2
|
+
import { FilterAction } from "@vviinn/tracking-client-ts";
|
|
1
3
|
import { SearchSessionFilter } from "../../../searchSession/searchSession";
|
|
2
4
|
export declare class SearchFilters {
|
|
3
5
|
el: HTMLElement;
|
|
4
6
|
filter: SearchSessionFilter | null;
|
|
5
7
|
selectedCategoryId: string | null;
|
|
6
8
|
hideFilters: boolean;
|
|
9
|
+
filterSelected: EventEmitter<FilterAction>;
|
|
7
10
|
private handleFilterSelection;
|
|
8
11
|
private selectFilter;
|
|
9
12
|
private clearSelectedFilter;
|
|
@@ -13,3 +16,4 @@ export declare class SearchFilters {
|
|
|
13
16
|
private isFilterSelected;
|
|
14
17
|
render(): any;
|
|
15
18
|
}
|
|
19
|
+
//# sourceMappingURL=search-filters.d.ts.map
|