vviinn-widgets 2.49.2 → 2.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{customized-slots-67b24737.js → customized-slots-71029d3f.js} +6 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-cc6cc310.js → package-ada5261a.js} +1 -1
- package/dist/cjs/search-filters_17.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-carousel_4.cjs.entry.js +25 -43
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +2 -2
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +2 -2
- package/dist/cjs/vviinn-widgets.cjs.js +1 -1
- package/dist/collection/components/customized-slots.js +6 -1
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +0 -1
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.js +15 -33
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +6 -7
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +0 -3
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +2 -0
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.js +15 -9
- package/dist/esm/{customized-slots-e56251a2.js → customized-slots-706fbadd.js} +6 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-aac1b6b8.js → package-ac5a2493.js} +1 -1
- package/dist/esm/search-filters_17.entry.js +1 -1
- package/dist/esm/vviinn-carousel_4.entry.js +25 -43
- package/dist/esm/vviinn-vpr-button.entry.js +1 -1
- package/dist/esm/vviinn-vps-button.entry.js +2 -2
- package/dist/esm/vviinn-vps-widget.entry.js +2 -2
- package/dist/esm/vviinn-widgets.js +1 -1
- package/dist/types/components/vviinn-carousel/vviinn-carousel.d.ts +1 -3
- package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +4 -3
- package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +0 -3
- package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-widget.d.ts +11 -7
- package/dist/vviinn-widgets/{p-3aef433a.entry.js → p-2a339615.entry.js} +1 -1
- package/dist/vviinn-widgets/p-464f2996.js +1 -0
- package/dist/vviinn-widgets/p-489d66ca.entry.js +1 -0
- package/dist/vviinn-widgets/{p-ed2ec1e7.entry.js → p-5cdcbe3e.entry.js} +1 -1
- package/dist/vviinn-widgets/p-d45efea7.js +1 -0
- package/dist/vviinn-widgets/{p-61977fe5.entry.js → p-e4e75667.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-fba08738.entry.js → p-f57d1228.entry.js} +1 -1
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/{p-3aef433a.entry.js → p-2a339615.entry.js} +1 -1
- package/www/build/p-464f2996.js +1 -0
- package/www/build/p-489d66ca.entry.js +1 -0
- package/www/build/{p-ed2ec1e7.entry.js → p-5cdcbe3e.entry.js} +1 -1
- package/www/build/p-d45efea7.js +1 -0
- package/www/build/{p-61977fe5.entry.js → p-e4e75667.entry.js} +1 -1
- package/www/build/{p-fba08738.entry.js → p-f57d1228.entry.js} +1 -1
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/dist/vviinn-widgets/p-49417192.js +0 -1
- package/dist/vviinn-widgets/p-4b571be0.js +0 -1
- package/dist/vviinn-widgets/p-a2de4bb7.entry.js +0 -1
- package/www/build/p-49417192.js +0 -1
- package/www/build/p-4b571be0.js +0 -1
- package/www/build/p-a2de4bb7.entry.js +0 -1
|
@@ -16,6 +16,8 @@ function fromString(s) {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
const defaultSlotsNames = [
|
|
19
|
+
"vviinn-recommendations-title",
|
|
20
|
+
"vviinn-recommendations-subtitle",
|
|
19
21
|
"vviinn-teaser-text",
|
|
20
22
|
"vviinn-image-upload-button-text",
|
|
21
23
|
"vviinn-image-upload-icon",
|
|
@@ -23,10 +25,13 @@ const defaultSlotsNames = [
|
|
|
23
25
|
"vviinn-camera-button-text-start",
|
|
24
26
|
"vviinn-camera-button-text-stop",
|
|
25
27
|
"vviinn-camera-icon",
|
|
28
|
+
"vviinn-text-search-icon",
|
|
26
29
|
"vviinn-privacy-badge-text",
|
|
27
30
|
"vviinn-image-search-modal-title",
|
|
28
31
|
"vviinn-basket-button-text",
|
|
29
|
-
"vviinn-
|
|
32
|
+
"vviinn-basket-button-icon",
|
|
33
|
+
"vviinn-update-button-icon",
|
|
34
|
+
"vviinn-update-button-text",
|
|
30
35
|
];
|
|
31
36
|
const renderNamedSlot = (name) => index.h("slot", { name: name });
|
|
32
37
|
const SlotSkeleton = () => defaultSlotsNames.map(renderNamedSlot);
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["vviinn-button.cjs",[[1,"vviinn-button",{"addStyle":[4,"add-style"]}]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-carousel_4.cjs",[[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],"campaigns":[1],"color":[1],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"closed":[4],"opened":[4],"recommendations":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32],"updatingAllCards":[32]},[[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnAddToBasket","trackAddToBasket"],[0,"vviinnUpdatingAllCardsFinished","updatingAllCardsFinishedListener"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"recommendations":[1040],"widgetVersion":[1,"widget-version"],"addToBasketShow":[4,"add-to-basket-show"],"updatingAllCards":[4,"updating-all-cards"],"updateButtonLocation":[1,"update-button-location"],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[32],"crossSellingRecommendations":[32],"setModeDiscount":[32],"setModeAppliedDiscounts":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"],[0,"vviinnAddToBasket","trackAddToBasket"]]],[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"],"mode":[1],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"appliedDiscountPercentage":[2,"applied-discount-percentage"],"currentDiscountPercentage":[2,"current-discount-percentage"],"isSourceProduct":[4,"is-source-product"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"index":[2],"updatingAllCards":[4,"updating-all-cards"],"defaultAnimationInterval":[2,"default-animation-interval"],"isTransitioning":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"]]],[1,"vviinn-skeleton",{"height":[2],"halfWidth":[4,"half-width"]}]]],["search-filters_17.cjs",[[1,"vviinn-image-view",{"basicEventData":[16],"setShowAspectRatioError":[16],"showAspectRatioError":[4,"show-aspect-ratio-error"],"cropper":[32],"hidePreloader":[32]},[[0,"vviinnSelectObject","selectDetectedObject"]]],[1,"vviinn-overlayed-modal",{"active":[4],"resetState":[16],"buttonElementId":[1,"button-element-id"],"hideBackButton":[4,"hide-back-button"],"widgetVersion":[1,"widget-version"],"isFirstScreen":[4,"is-first-screen"]}],[1,"vviinn-empty-results",{"handler":[16]}],[1,"vviinn-image-selector",{"basicEventData":[16],"startUpload":[4,"start-upload"],"loading":[4],"accept":[1],"resetVpsButton":[16],"capture":[1]}],[1,"vviinn-server-error",{"handler":[16]}],[1,"vviinn-text-search",{"clearSearchQuery":[4,"clear-search-query"],"initialSearchQuery":[1,"initial-search-query"],"searchQuery":[32]}],[1,"vviinn-wrong-aspect-ratio",{"handler":[16]}],[1,"vviinn-wrong-format",{"handler":[16]}],[1,"search-filters",{"filter":[16],"basicEventData":[16],"selectedFilter":[32],"hideFilters":[32]}],[1,"vviinn-example-image",{"exampleImageSource":[1,"example-image-source"],"width":[2],"height":[2],"basicEventData":[16],"srcObject":[16],"cameraButtonClicked":[4,"camera-button-clicked"],"selected":[32],"videoInitialized":[32],"zoomCapabilities":[32]}],[1,"vviinn-privacy-badge",{"privacyBadgeText":[1,"privacy-badge-text"]}],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32],"isRTL":[32]}],[1,"vviinn-teaser"],[1,"vviinn-detected-object",{"detectedObject":[16],"basicEventData":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"resetState":[16],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"hideBackButton":[4,"hide-back-button"],"isFirstScreen":[4,"is-first-screen"],"slider":[32]}],[1,"vviinn-overlay"]]],["vviinn-vps-widget.cjs",[[1,"vviinn-vps-widget",{"token":[1],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"imageResolutionWidth":[2,"image-resolution-width"],"exampleImageSource":[1,"example-image-source"],"textSearchShow":[4,"text-search-show"],"apiPath":[1,"api-path"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"buttonPressed":[4,"button-pressed"],"mode":[1],"resetVpsButton":[16],"slidePosition":[32],"width":[32],"wrongImageFormat":[32],"trackingDeactivated":[32],"stream":[32],"cameraInitializing":[32],"cameraEnabled":[32],"cameraButtonClicked":[32],"uploadSource":[32],"showAspectRatioError":[32],"products":[32],"initialSearchQuery":[32]},[[0,"vviinnCameraEnabled","trackCameraEnabled"],[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnImageCrop","trachSearchAreaChanges"],[0,"vviinnSelectObject","trackDetectedObject"],[0,"vviinnSelectFilter","trackFilter"],[0,"vviinnTextSearchFinished","trackTextSearchFinished"]]]]],["vviinn-vps-button.cjs",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"addStyle":[4,"add-style"],"mode":[1],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"imageResolutionWidth":[2,"image-resolution-width"],"exampleImageSource":[1,"example-image-source"],"textSearchShow":[4,"text-search-show"],"apiPath":[1,"api-path"],"buttonPressed":[32]},[[0,"vviinnWidgetClose","handleModalClosed"]]]]],["vviinn-recommendations-sidebar.cjs",[[1,"vviinn-recommendations-sidebar",{"sidebarTitle":[1,"sidebar-title"],"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"widgetScrollbar":[4,"widget-scrollbar"],"mode":[1],"campaigns":[1],"campaignType":[1,"campaign-type"],"color":[1],"locale":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"buttonChildren":[16],"apiPath":[1,"api-path"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"showingInButton":[4,"showing-in-button"],"state":[32]},[[16,"click","bodyClickListener"]]]]],["vviinn-vpr-button.cjs",[[1,"vviinn-vpr-button",{"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"sidebarTitle":[1,"sidebar-title"],"modalScrollbar":[4,"modal-scrollbar"],"campaigns":[1],"campaignType":[1,"campaign-type"],"locale":[1],"color":[1],"addStyle":[4,"add-style"],"mode":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"apiPath":[1,"api-path"]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["vviinn-button.cjs",[[1,"vviinn-button",{"addStyle":[4,"add-style"]}]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-carousel_4.cjs",[[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],"campaigns":[1],"color":[1],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"closed":[4],"opened":[4],"recommendations":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32],"updatingAllCards":[32],"updatedCardsAmount":[32]},[[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnAddToBasket","trackAddToBasket"],[0,"vviinnUpdatingAllCardsFinished","updatingAllCardsFinishedListener"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"recommendations":[1040],"widgetVersion":[1,"widget-version"],"addToBasketShow":[4,"add-to-basket-show"],"updatingAllCards":[4,"updating-all-cards"],"updateButtonLocation":[1,"update-button-location"],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[32],"crossSellingRecommendations":[32],"setModeDiscount":[32],"setModeAppliedDiscounts":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"],[0,"vviinnAddToBasket","trackAddToBasket"]]],[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"],"mode":[1],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"appliedDiscountPercentage":[2,"applied-discount-percentage"],"currentDiscountPercentage":[2,"current-discount-percentage"],"isSourceProduct":[4,"is-source-product"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"index":[2],"updatingAllCards":[4,"updating-all-cards"],"defaultAnimationInterval":[2,"default-animation-interval"],"isTransitioning":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"]]],[1,"vviinn-skeleton",{"height":[2],"halfWidth":[4,"half-width"]}]]],["search-filters_17.cjs",[[1,"vviinn-image-view",{"basicEventData":[16],"setShowAspectRatioError":[16],"showAspectRatioError":[4,"show-aspect-ratio-error"],"cropper":[32],"hidePreloader":[32]},[[0,"vviinnSelectObject","selectDetectedObject"]]],[1,"vviinn-overlayed-modal",{"active":[4],"resetState":[16],"buttonElementId":[1,"button-element-id"],"hideBackButton":[4,"hide-back-button"],"widgetVersion":[1,"widget-version"],"isFirstScreen":[4,"is-first-screen"]}],[1,"vviinn-empty-results",{"handler":[16]}],[1,"vviinn-image-selector",{"basicEventData":[16],"startUpload":[4,"start-upload"],"loading":[4],"accept":[1],"resetVpsButton":[16],"capture":[1]}],[1,"vviinn-server-error",{"handler":[16]}],[1,"vviinn-text-search",{"clearSearchQuery":[4,"clear-search-query"],"initialSearchQuery":[1,"initial-search-query"],"searchQuery":[32]}],[1,"vviinn-wrong-aspect-ratio",{"handler":[16]}],[1,"vviinn-wrong-format",{"handler":[16]}],[1,"search-filters",{"filter":[16],"basicEventData":[16],"selectedFilter":[32],"hideFilters":[32]}],[1,"vviinn-example-image",{"exampleImageSource":[1,"example-image-source"],"width":[2],"height":[2],"basicEventData":[16],"srcObject":[16],"cameraButtonClicked":[4,"camera-button-clicked"],"selected":[32],"videoInitialized":[32],"zoomCapabilities":[32]}],[1,"vviinn-privacy-badge",{"privacyBadgeText":[1,"privacy-badge-text"]}],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32],"isRTL":[32]}],[1,"vviinn-teaser"],[1,"vviinn-detected-object",{"detectedObject":[16],"basicEventData":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"resetState":[16],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"hideBackButton":[4,"hide-back-button"],"isFirstScreen":[4,"is-first-screen"],"slider":[32]}],[1,"vviinn-overlay"]]],["vviinn-vps-widget.cjs",[[1,"vviinn-vps-widget",{"token":[1],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"imageResolutionWidth":[2,"image-resolution-width"],"exampleImageSource":[1,"example-image-source"],"textSearchShow":[4,"text-search-show"],"apiPath":[1,"api-path"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"buttonPressed":[4,"button-pressed"],"mode":[1],"resetVpsButton":[16],"slidePosition":[32],"width":[32],"wrongImageFormat":[32],"trackingDeactivated":[32],"stream":[32],"cameraInitializing":[32],"cameraEnabled":[32],"cameraButtonClicked":[32],"uploadSource":[32],"showAspectRatioError":[32],"products":[32],"initialSearchQuery":[32]},[[0,"vviinnCameraEnabled","trackCameraEnabled"],[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnImageCrop","trachSearchAreaChanges"],[0,"vviinnSelectObject","trackDetectedObject"],[0,"vviinnSelectFilter","trackFilter"],[0,"vviinnTextSearchFinished","trackTextSearchFinished"]]]]],["vviinn-vps-button.cjs",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"addStyle":[4,"add-style"],"mode":[1],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"imageResolutionWidth":[2,"image-resolution-width"],"exampleImageSource":[1,"example-image-source"],"textSearchShow":[4,"text-search-show"],"apiPath":[1,"api-path"],"buttonPressed":[32]},[[0,"vviinnWidgetClose","handleModalClosed"]]]]],["vviinn-recommendations-sidebar.cjs",[[1,"vviinn-recommendations-sidebar",{"sidebarTitle":[1,"sidebar-title"],"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"widgetScrollbar":[4,"widget-scrollbar"],"mode":[1],"campaigns":[1],"campaignType":[1,"campaign-type"],"color":[1],"locale":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"buttonChildren":[16],"apiPath":[1,"api-path"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"showingInButton":[4,"showing-in-button"],"state":[32]},[[16,"click","bodyClickListener"]]]]],["vviinn-vpr-button.cjs",[[1,"vviinn-vpr-button",{"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"sidebarTitle":[1,"sidebar-title"],"modalScrollbar":[4,"modal-scrollbar"],"campaigns":[1],"campaignType":[1,"campaign-type"],"locale":[1],"color":[1],"addStyle":[4,"add-style"],"mode":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"apiPath":[1,"api-path"]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -6,7 +6,7 @@ const index = require('./index-5619b5ec.js');
|
|
|
6
6
|
const search_store = require('./search.store-7605f369.js');
|
|
7
7
|
const i18next = require('./i18next-74ff3413.js');
|
|
8
8
|
const PlusIcon = require('./PlusIcon-5e585127.js');
|
|
9
|
-
const customizedSlots = require('./customized-slots-
|
|
9
|
+
const customizedSlots = require('./customized-slots-71029d3f.js');
|
|
10
10
|
|
|
11
11
|
const ArrowIcon = () => (index.h("svg", { width: "12", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
12
12
|
index.h("path", { d: "M0 10 10 0l1.4 1.4L2.8 10l8.6 8.6L10 20 0 10Z" })));
|
|
@@ -6,8 +6,8 @@ const index = require('./index-5619b5ec.js');
|
|
|
6
6
|
const search_store = require('./search.store-7605f369.js');
|
|
7
7
|
const i18next = require('./i18next-74ff3413.js');
|
|
8
8
|
const PlusIcon = require('./PlusIcon-5e585127.js');
|
|
9
|
-
const customizedSlots = require('./customized-slots-
|
|
10
|
-
const _package = require('./package-
|
|
9
|
+
const customizedSlots = require('./customized-slots-71029d3f.js');
|
|
10
|
+
const _package = require('./package-ada5261a.js');
|
|
11
11
|
const index$1 = require('./index-4445cb70.js');
|
|
12
12
|
|
|
13
13
|
const BasketIcon = () => (index.h("svg", { width: "25", height: "24", viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -43,7 +43,7 @@ const generateRandomNumber = (min, max) => {
|
|
|
43
43
|
return Math.floor(Math.random() * (max - min + 1)) + min;
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
const vviinnCarouselCss = ":host{--vviinn-
|
|
46
|
+
const vviinnCarouselCss = ":host{--vviinn-carousel-columns-internal:var(--vviinn-carousel-columns, 4)}.body{display:flex;position:relative;width:var(--vviinn-carousel-content-width);flex-direction:column}.bullets{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;gap:8px;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) .prev,:host(.continuity) .next{border-radius:2px}:host(.grid) .prev,:host(.grid) .next{border-radius:50%}.prev,.next{align-items:center;background-color:white;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);fill:#525252;cursor:pointer;display:grid;height:40px;justify-items:center;position:absolute;top:calc(50% - 20px);width:40px;z-index:1;padding:0;margin:0}.next:disabled,.prev:disabled{display:none}.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}@media (max-width: 480px){.items-group{grid-template-columns:repeat(2, 1fr)}}.body.set{max-width:100%;justify-content:space-between;margin-left:auto;display:flex;flex-direction:row;gap:112px}.body.set::-webkit-scrollbar{display:none}@media (max-width: 768px){.body.set{gap:40px}}.content.set{grid-gap:20px;height:-moz-fit-content;height:fit-content;max-width:-moz-fit-content;max-width:fit-content;overflow:unset}";
|
|
47
47
|
|
|
48
48
|
const VviinnCarousel = class {
|
|
49
49
|
constructor(hostRef) {
|
|
@@ -53,9 +53,9 @@ const VviinnCarousel = class {
|
|
|
53
53
|
this.defaultAnimationInterval = 2000;
|
|
54
54
|
this.mutationObserver = new MutationObserver(() => this.cloneSlottedContent());
|
|
55
55
|
this.handleWindowResize = () => this.setImageWidthSetMode("100%");
|
|
56
|
-
this.isLastGroup = () => this.
|
|
57
|
-
this.
|
|
58
|
-
this.isFirstGroup = () => this.activeContentGroup === 0
|
|
56
|
+
this.isLastGroup = () => this.isGridMode &&
|
|
57
|
+
this.activeContentGroup === this.getContentGroups().length - 1;
|
|
58
|
+
this.isFirstGroup = () => this.isGridMode && this.activeContentGroup === 0;
|
|
59
59
|
this.updateCard = (productId, step, animationInterval) => {
|
|
60
60
|
let clickedProduct = this.crossSellingRecommendations.find((item) => item.productId === productId);
|
|
61
61
|
const crossSellingIndex = this.crossSellingRecommendations.indexOf(clickedProduct);
|
|
@@ -121,11 +121,16 @@ const VviinnCarousel = class {
|
|
|
121
121
|
}
|
|
122
122
|
componentDidLoad() {
|
|
123
123
|
this.setWidth();
|
|
124
|
-
this.processScrollbarWidth();
|
|
125
124
|
this.columns = this.getColumnsNumber();
|
|
126
125
|
const slot = this.el.querySelector(".content");
|
|
127
126
|
this.mutationObserver.observe(slot, { subtree: true, childList: true });
|
|
128
127
|
this.resizeObserver.observe(this.getHostParent());
|
|
128
|
+
if (this.isGridMode) {
|
|
129
|
+
const contentNode = this.getContentNode();
|
|
130
|
+
contentNode.addEventListener("scrollend", () => {
|
|
131
|
+
this.activeContentGroup = this.getActiveGroupIndex();
|
|
132
|
+
});
|
|
133
|
+
}
|
|
129
134
|
}
|
|
130
135
|
updatingAllCardsWatcher() {
|
|
131
136
|
if (!this.updatingAllCards)
|
|
@@ -175,7 +180,6 @@ const VviinnCarousel = class {
|
|
|
175
180
|
}
|
|
176
181
|
handleResize() {
|
|
177
182
|
this.setWidth();
|
|
178
|
-
this.processScrollbarWidth();
|
|
179
183
|
this.setItemWidth();
|
|
180
184
|
const newColumns = this.getColumnsNumber();
|
|
181
185
|
if (newColumns !== this.columns) {
|
|
@@ -212,10 +216,6 @@ const VviinnCarousel = class {
|
|
|
212
216
|
this.setWidth();
|
|
213
217
|
}
|
|
214
218
|
getActiveGroupIndex() {
|
|
215
|
-
var _a, _b;
|
|
216
|
-
const contentNodeLeft = (_b = (_a = this.getContentNode()) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.left;
|
|
217
|
-
if (!contentNodeLeft)
|
|
218
|
-
return 0;
|
|
219
219
|
const groups = this.getContentGroups();
|
|
220
220
|
const groupsPositions = groups.map((g) => g.getBoundingClientRect().left);
|
|
221
221
|
const indexedPositions = groupsPositions
|
|
@@ -243,24 +243,15 @@ const VviinnCarousel = class {
|
|
|
243
243
|
getContentGroups() {
|
|
244
244
|
return Array.from(this.el.querySelectorAll(`.${CONTENT_GROUP_CSS_CLASS}`));
|
|
245
245
|
}
|
|
246
|
-
|
|
247
|
-
this.moveDirection =
|
|
248
|
-
const contentContainer = this.getContentNode();
|
|
249
|
-
requestAnimationFrame(() => {
|
|
250
|
-
contentContainer.scrollTo({
|
|
251
|
-
top: 0,
|
|
252
|
-
left: contentContainer.scrollLeft + this.calculateMoveStep(),
|
|
253
|
-
behavior: "smooth",
|
|
254
|
-
});
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
showPrev() {
|
|
258
|
-
this.moveDirection = "left";
|
|
246
|
+
handleCarouselButtonClick(action) {
|
|
247
|
+
this.moveDirection = action;
|
|
259
248
|
const contentContainer = this.getContentNode();
|
|
249
|
+
const { scrollLeft } = contentContainer;
|
|
250
|
+
const step = this.calculateMoveStep();
|
|
260
251
|
requestAnimationFrame(() => {
|
|
261
252
|
contentContainer.scrollTo({
|
|
262
253
|
top: 0,
|
|
263
|
-
left:
|
|
254
|
+
left: action === "right" ? scrollLeft + step : scrollLeft - step,
|
|
264
255
|
behavior: "smooth",
|
|
265
256
|
});
|
|
266
257
|
});
|
|
@@ -275,15 +266,6 @@ const VviinnCarousel = class {
|
|
|
275
266
|
});
|
|
276
267
|
});
|
|
277
268
|
}
|
|
278
|
-
processScrollbarWidth() {
|
|
279
|
-
const target = this.getContentNode();
|
|
280
|
-
if (!target)
|
|
281
|
-
return;
|
|
282
|
-
const scrollRatio = (target.scrollLeft + target.clientWidth) / target.scrollWidth;
|
|
283
|
-
const scrolledWidth = target.clientWidth * scrollRatio;
|
|
284
|
-
this.el.style.setProperty("--vviinn-progressbar-width", `${scrolledWidth}px`);
|
|
285
|
-
this.activeContentGroup = this.getActiveGroupIndex();
|
|
286
|
-
}
|
|
287
269
|
showBullets() {
|
|
288
270
|
return this.isGridMode && this.showScroll;
|
|
289
271
|
}
|
|
@@ -336,7 +318,7 @@ const VviinnCarousel = class {
|
|
|
336
318
|
}, onClick: () => this.scroll(index$1) })));
|
|
337
319
|
}
|
|
338
320
|
render() {
|
|
339
|
-
return (index.h(index.Host, { class: this.getClassMap() }, index.h("div", { class: Object.assign({ body: true }, this.getClassMap()) }, !this.isSetMode && (index.h("button", { class: "prev", onClick: () => this.
|
|
321
|
+
return (index.h(index.Host, { class: this.getClassMap() }, index.h("div", { class: Object.assign({ body: true }, this.getClassMap()) }, !this.isSetMode && (index.h("button", { class: "prev", onClick: () => this.handleCarouselButtonClick("left"), part: "carousel-button", disabled: this.gridArrowsDynamic && this.isFirstGroup() }, index.h(ChevronIcon, null))), this.isSetMode && (index.h("vviinn-product-card", { part: "product-part", class: "set-mode product-card--source", productTitle: this.sourceProduct.title, image: this.sourceProduct.image.thumbnail, price: this.sourceProduct.price.actual, imageRatio: 1, imageWidth: 300, dimmedBackground: true, isSourceProduct: true })), index.h("div", { class: this.getContentClassMap() }, this.renderRecommendations()), !this.isSetMode && (index.h("button", { class: "next", onClick: () => this.handleCarouselButtonClick("right"), part: "carousel-button", disabled: this.gridArrowsDynamic && this.isLastGroup() }, index.h(ChevronIcon, null)))), this.showBullets() && (index.h("div", { class: "bullets" }, this.renderBullets()))));
|
|
340
322
|
}
|
|
341
323
|
get el() { return index.getElement(this); }
|
|
342
324
|
static get watchers() { return {
|
|
@@ -682,9 +664,7 @@ const VviinnProductCard = class {
|
|
|
682
664
|
"applied-discount": !!this.appliedDiscountPercentage,
|
|
683
665
|
}, part: "basket-button", onClick: () => {
|
|
684
666
|
this.vviinnAddToBasket.emit(Object.assign(Object.assign({}, this.productData), { discount: this.currentDiscountPercentage }));
|
|
685
|
-
} }, this.isSetMode ? (index.h(index.Fragment, null, this.appliedDiscountPercentage ? (index.h(CheckCircleIcon, null)) : (index.h(BasketIcon, null)), index.h("slot", { name: "vviinn-basket-button-text" }, index.h("span", null, this.appliedDiscountPercentage
|
|
686
|
-
? `${this.appliedDiscountPercentage}% ${i18next.instance.t("setMode.appliedDiscountText")}`
|
|
687
|
-
: i18next.instance.t("setMode.basketButtonText"))))) : (index.h("slot", { name: "vviinn-basket-button-text" }, index.h("span", null, i18next.instance.t("basketButtonText")))))))), this.isSetMode && !this.appliedDiscountPercentage && (index.h("button", { class: {
|
|
667
|
+
} }, this.isSetMode ? (index.h(index.Fragment, null, this.appliedDiscountPercentage ? (index.h(CheckCircleIcon, null)) : (index.h("slot", { name: "vviinn-basket-button-icon" }, index.h(BasketIcon, null))), index.h("span", null, this.appliedDiscountPercentage ? (`${this.appliedDiscountPercentage}% ${i18next.instance.t("setMode.appliedDiscountText")}`) : (index.h("slot", { name: "vviinn-basket-button-text" }, i18next.instance.t("setMode.basketButtonText")))))) : (index.h("slot", { name: "vviinn-basket-button-text" }, index.h("span", null, i18next.instance.t("basketButtonText")))))))), this.isSetMode && !this.appliedDiscountPercentage && (index.h("button", { class: {
|
|
688
668
|
"update-button": true,
|
|
689
669
|
hidden: this.updateButtonLocation === "onTop",
|
|
690
670
|
}, part: "update-button-item", onClick: () => {
|
|
@@ -692,7 +672,7 @@ const VviinnProductCard = class {
|
|
|
692
672
|
animationInterval: generateRandomNumber(800, 1400),
|
|
693
673
|
productData: this.productData,
|
|
694
674
|
});
|
|
695
|
-
} }, index.h("slot", { name: "vviinn-update-icon
|
|
675
|
+
} }, index.h("slot", { name: "vviinn-update-button-icon" }, index.h(UpdateIcon, null))))));
|
|
696
676
|
}
|
|
697
677
|
get el() { return index.getElement(this); }
|
|
698
678
|
static get watchers() { return {
|
|
@@ -1421,7 +1401,7 @@ const resources = {
|
|
|
1421
1401
|
},
|
|
1422
1402
|
};
|
|
1423
1403
|
|
|
1424
|
-
const vviinnVprWidgetCss = ":host{display:grid;grid-gap:1rem;width:100%}:host(:not(.loaded)){position:absolute;visibility:hidden}:host(.grid) vviinn-product-card::part(image){border:1px solid #dddddd;width:100%}:host(.set) vviinn-carousel{overflow-x:auto}:host(.set) vviinn-carousel{scrollbar-width:thin}.widget-header{display:flex;flex-wrap:wrap;gap:20px;justify-content:space-between;align-items:center}.widget-header h3{margin-top:8px;margin-bottom:0;font-size:14px;font-weight:400;line-height:20px}.update-button{display:flex;align-items:center;justify-content:center;color:#525252;gap:8px;padding:8px 10px;background:rgb(244, 244, 244);border:none;cursor:pointer}.update-button:hover{background:rgb(234, 234, 234)}.update-button svg{color:#6f6f6f}h2{margin:0}vviinn-product-card::part(price-container){align-self:flex-start;text-align:left;display:flex}.results{display:grid;grid-gap:1rem}.no-result-text{font-size:20px}.visually-hidden{position:absolute;top:0;left:0;z-index:-1;height:0;width:0}h2{margin:0}:host(.grid) h2{justify-content:center}:host(.grid) vviinn-product-card::part(image){min-width:100%}:host(.grid) vviinn-product-card::part(image-link){width:100%}:host(.grid) vviinn-product-card::part(title),:host(.grid) vviinn-product-card::part(brand),:host(.grid) vviinn-product-card::part(type){text-align:center}:host(.grid) vviinn-product-card::part(price-container){align-self:center}:host(.continuity) vviinn-product-card::part(title),:host(.continuity) vviinn-product-card::part(brand),:host(.continuity) vviinn-product-card::part(type),:host(.continuity) vviinn-product-card::part(deeplink){text-align:left;max-width:unset;align-self:start}";
|
|
1404
|
+
const vviinnVprWidgetCss = ":host{display:grid;grid-gap:1rem;width:100%}:host(:not(.loaded)){position:absolute;visibility:hidden}:host(.grid) vviinn-product-card::part(image){border:1px solid #dddddd;width:100%}:host(.set) vviinn-carousel{overflow-x:auto}:host(.set) vviinn-carousel{scrollbar-width:thin}.widget-header{display:flex;flex-wrap:wrap;gap:20px;justify-content:space-between;align-items:center}.widget-header h3{margin-top:8px;margin-bottom:0;font-size:14px;font-weight:400;line-height:20px}.update-button{display:flex;align-items:center;justify-content:center;color:#525252;gap:8px;padding:8px 10px;background:rgb(244, 244, 244);border:none;cursor:pointer}.update-button:hover{background:rgb(234, 234, 234)}.update-button svg{color:#6f6f6f;width:24px;height:24px}h2{margin:0}vviinn-product-card::part(price-container){align-self:flex-start;text-align:left;display:flex}.results{display:grid;grid-gap:1rem}.no-result-text{font-size:20px}.visually-hidden{position:absolute;top:0;left:0;z-index:-1;height:0;width:0}h2{margin:0}:host(.grid) h2{justify-content:center}:host(.grid) vviinn-product-card::part(image){min-width:100%}:host(.grid) vviinn-product-card::part(image-link){width:100%}:host(.grid) vviinn-product-card::part(title),:host(.grid) vviinn-product-card::part(brand),:host(.grid) vviinn-product-card::part(type){text-align:center}:host(.grid) vviinn-product-card::part(price-container){align-self:center}:host(.continuity) vviinn-product-card::part(title),:host(.continuity) vviinn-product-card::part(brand),:host(.continuity) vviinn-product-card::part(type),:host(.continuity) vviinn-product-card::part(deeplink){text-align:left;max-width:unset;align-self:start}";
|
|
1425
1405
|
|
|
1426
1406
|
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
1427
1407
|
var t = {};
|
|
@@ -1488,6 +1468,7 @@ const VviinnVprWidget = class {
|
|
|
1488
1468
|
this.trackingDeactivated = false;
|
|
1489
1469
|
this.hasErrorOnLoad = false;
|
|
1490
1470
|
this.updatingAllCards = false;
|
|
1471
|
+
this.updatedCardsAmount = 0;
|
|
1491
1472
|
}
|
|
1492
1473
|
getBasicEventData() {
|
|
1493
1474
|
return {
|
|
@@ -1571,6 +1552,7 @@ const VviinnVprWidget = class {
|
|
|
1571
1552
|
if (this.excluded) {
|
|
1572
1553
|
this.excluded = search_store.parseExcluded(this.excluded);
|
|
1573
1554
|
}
|
|
1555
|
+
customizedSlots.slotChangeListener(this, this.el);
|
|
1574
1556
|
}
|
|
1575
1557
|
trackProductLoad({ detail }) {
|
|
1576
1558
|
this.productImageLoadedSubject.next(detail.productId);
|
|
@@ -1728,9 +1710,9 @@ const VviinnVprWidget = class {
|
|
|
1728
1710
|
loaded: true,
|
|
1729
1711
|
empty: this.recommendations.length == 0,
|
|
1730
1712
|
[this.mode]: true,
|
|
1731
|
-
}, "aria-hidden": "false" },
|
|
1713
|
+
}, "aria-hidden": "false" }, index.h(index.Fragment, null, this.renderExternalCSS(), index.h(customizedSlots.SlotSkeleton, null), index.h("style", null, search_store.state.fallbackStyles), index.h("div", { class: "widget-header" }, index.h("div", null, index.h("h2", { part: "recommendations-title" }, index.h("slot", { name: "vviinn-recommendations-title" }, this.isSetMode
|
|
1732
1714
|
? i18next.instance.t("setMode.widgetTitle")
|
|
1733
|
-
: this.blockTitle), this.isSetMode && index.h("h3",
|
|
1715
|
+
: this.blockTitle)), this.isSetMode && (index.h("h3", { part: "recommendations-subtitle" }, index.h("slot", { name: "vviinn-recommendations-subtitle" }, i18next.instance.t("setMode.widgetSubtitle"))))), this.isSetMode && this.updateButtonLocation !== "onItem" ? (index.h("button", { class: "update-button", part: "update-button-top", onClick: () => (this.updatingAllCards = true) }, index.h("slot", { name: "vviinn-update-button-icon" }, index.h(UpdateIcon, null)), index.h("slot", { name: "vviinn-update-button-text" }, index.h("span", null, i18next.instance.t("setMode.updateButtonText"))))) : null), this.recommendations.length > 0 &&
|
|
1734
1716
|
(this.useCarousel ? this.renderCarousel() : this.renderResults()), this.recommendations.length === 0 && this.hasErrorOnLoad && (index.h("p", { class: "no-result-text" }, this.noResultText.length
|
|
1735
1717
|
? this.noResultText
|
|
1736
1718
|
: i18next.instance.t("noResultText"))))));
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-5619b5ec.js');
|
|
6
|
-
const _package = require('./package-
|
|
6
|
+
const _package = require('./package-ada5261a.js');
|
|
7
7
|
const VisualSearchIcon = require('./VisualSearchIcon-1180d079.js');
|
|
8
8
|
|
|
9
9
|
const vviinnVprButtonCss = ":host{display:block}";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-5619b5ec.js');
|
|
6
|
-
const _package = require('./package-
|
|
7
|
-
const customizedSlots = require('./customized-slots-
|
|
6
|
+
const _package = require('./package-ada5261a.js');
|
|
7
|
+
const customizedSlots = require('./customized-slots-71029d3f.js');
|
|
8
8
|
const constants = require('./constants-7684cbfc.js');
|
|
9
9
|
|
|
10
10
|
const CameraIcon = () => (index.h("svg", { width: "22", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-5619b5ec.js');
|
|
6
6
|
const search_store = require('./search.store-7605f369.js');
|
|
7
7
|
const i18next = require('./i18next-74ff3413.js');
|
|
8
|
-
const _package = require('./package-
|
|
9
|
-
const customizedSlots = require('./customized-slots-
|
|
8
|
+
const _package = require('./package-ada5261a.js');
|
|
9
|
+
const customizedSlots = require('./customized-slots-71029d3f.js');
|
|
10
10
|
const index$1 = require('./index-4445cb70.js');
|
|
11
11
|
const constants = require('./constants-7684cbfc.js');
|
|
12
12
|
|
|
@@ -20,7 +20,7 @@ const patchBrowser = () => {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
patchBrowser().then(options => {
|
|
23
|
-
return index.bootstrapLazy([["vviinn-button.cjs",[[1,"vviinn-button",{"addStyle":[4,"add-style"]}]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-carousel_4.cjs",[[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],"campaigns":[1],"color":[1],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"closed":[4],"opened":[4],"recommendations":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32],"updatingAllCards":[32]},[[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnAddToBasket","trackAddToBasket"],[0,"vviinnUpdatingAllCardsFinished","updatingAllCardsFinishedListener"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"recommendations":[1040],"widgetVersion":[1,"widget-version"],"addToBasketShow":[4,"add-to-basket-show"],"updatingAllCards":[4,"updating-all-cards"],"updateButtonLocation":[1,"update-button-location"],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[32],"crossSellingRecommendations":[32],"setModeDiscount":[32],"setModeAppliedDiscounts":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"],[0,"vviinnAddToBasket","trackAddToBasket"]]],[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"],"mode":[1],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"appliedDiscountPercentage":[2,"applied-discount-percentage"],"currentDiscountPercentage":[2,"current-discount-percentage"],"isSourceProduct":[4,"is-source-product"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"index":[2],"updatingAllCards":[4,"updating-all-cards"],"defaultAnimationInterval":[2,"default-animation-interval"],"isTransitioning":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"]]],[1,"vviinn-skeleton",{"height":[2],"halfWidth":[4,"half-width"]}]]],["search-filters_17.cjs",[[1,"vviinn-image-view",{"basicEventData":[16],"setShowAspectRatioError":[16],"showAspectRatioError":[4,"show-aspect-ratio-error"],"cropper":[32],"hidePreloader":[32]},[[0,"vviinnSelectObject","selectDetectedObject"]]],[1,"vviinn-overlayed-modal",{"active":[4],"resetState":[16],"buttonElementId":[1,"button-element-id"],"hideBackButton":[4,"hide-back-button"],"widgetVersion":[1,"widget-version"],"isFirstScreen":[4,"is-first-screen"]}],[1,"vviinn-empty-results",{"handler":[16]}],[1,"vviinn-image-selector",{"basicEventData":[16],"startUpload":[4,"start-upload"],"loading":[4],"accept":[1],"resetVpsButton":[16],"capture":[1]}],[1,"vviinn-server-error",{"handler":[16]}],[1,"vviinn-text-search",{"clearSearchQuery":[4,"clear-search-query"],"initialSearchQuery":[1,"initial-search-query"],"searchQuery":[32]}],[1,"vviinn-wrong-aspect-ratio",{"handler":[16]}],[1,"vviinn-wrong-format",{"handler":[16]}],[1,"search-filters",{"filter":[16],"basicEventData":[16],"selectedFilter":[32],"hideFilters":[32]}],[1,"vviinn-example-image",{"exampleImageSource":[1,"example-image-source"],"width":[2],"height":[2],"basicEventData":[16],"srcObject":[16],"cameraButtonClicked":[4,"camera-button-clicked"],"selected":[32],"videoInitialized":[32],"zoomCapabilities":[32]}],[1,"vviinn-privacy-badge",{"privacyBadgeText":[1,"privacy-badge-text"]}],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32],"isRTL":[32]}],[1,"vviinn-teaser"],[1,"vviinn-detected-object",{"detectedObject":[16],"basicEventData":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"resetState":[16],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"hideBackButton":[4,"hide-back-button"],"isFirstScreen":[4,"is-first-screen"],"slider":[32]}],[1,"vviinn-overlay"]]],["vviinn-vps-widget.cjs",[[1,"vviinn-vps-widget",{"token":[1],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"imageResolutionWidth":[2,"image-resolution-width"],"exampleImageSource":[1,"example-image-source"],"textSearchShow":[4,"text-search-show"],"apiPath":[1,"api-path"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"buttonPressed":[4,"button-pressed"],"mode":[1],"resetVpsButton":[16],"slidePosition":[32],"width":[32],"wrongImageFormat":[32],"trackingDeactivated":[32],"stream":[32],"cameraInitializing":[32],"cameraEnabled":[32],"cameraButtonClicked":[32],"uploadSource":[32],"showAspectRatioError":[32],"products":[32],"initialSearchQuery":[32]},[[0,"vviinnCameraEnabled","trackCameraEnabled"],[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnImageCrop","trachSearchAreaChanges"],[0,"vviinnSelectObject","trackDetectedObject"],[0,"vviinnSelectFilter","trackFilter"],[0,"vviinnTextSearchFinished","trackTextSearchFinished"]]]]],["vviinn-vps-button.cjs",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"addStyle":[4,"add-style"],"mode":[1],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"imageResolutionWidth":[2,"image-resolution-width"],"exampleImageSource":[1,"example-image-source"],"textSearchShow":[4,"text-search-show"],"apiPath":[1,"api-path"],"buttonPressed":[32]},[[0,"vviinnWidgetClose","handleModalClosed"]]]]],["vviinn-recommendations-sidebar.cjs",[[1,"vviinn-recommendations-sidebar",{"sidebarTitle":[1,"sidebar-title"],"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"widgetScrollbar":[4,"widget-scrollbar"],"mode":[1],"campaigns":[1],"campaignType":[1,"campaign-type"],"color":[1],"locale":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"buttonChildren":[16],"apiPath":[1,"api-path"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"showingInButton":[4,"showing-in-button"],"state":[32]},[[16,"click","bodyClickListener"]]]]],["vviinn-vpr-button.cjs",[[1,"vviinn-vpr-button",{"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"sidebarTitle":[1,"sidebar-title"],"modalScrollbar":[4,"modal-scrollbar"],"campaigns":[1],"campaignType":[1,"campaign-type"],"locale":[1],"color":[1],"addStyle":[4,"add-style"],"mode":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"apiPath":[1,"api-path"]}]]]], options);
|
|
23
|
+
return index.bootstrapLazy([["vviinn-button.cjs",[[1,"vviinn-button",{"addStyle":[4,"add-style"]}]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-carousel_4.cjs",[[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],"campaigns":[1],"color":[1],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"closed":[4],"opened":[4],"recommendations":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32],"updatingAllCards":[32],"updatedCardsAmount":[32]},[[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnAddToBasket","trackAddToBasket"],[0,"vviinnUpdatingAllCardsFinished","updatingAllCardsFinishedListener"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"recommendations":[1040],"widgetVersion":[1,"widget-version"],"addToBasketShow":[4,"add-to-basket-show"],"updatingAllCards":[4,"updating-all-cards"],"updateButtonLocation":[1,"update-button-location"],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[32],"crossSellingRecommendations":[32],"setModeDiscount":[32],"setModeAppliedDiscounts":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"],[0,"vviinnAddToBasket","trackAddToBasket"]]],[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"],"mode":[1],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"appliedDiscountPercentage":[2,"applied-discount-percentage"],"currentDiscountPercentage":[2,"current-discount-percentage"],"isSourceProduct":[4,"is-source-product"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"index":[2],"updatingAllCards":[4,"updating-all-cards"],"defaultAnimationInterval":[2,"default-animation-interval"],"isTransitioning":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"]]],[1,"vviinn-skeleton",{"height":[2],"halfWidth":[4,"half-width"]}]]],["search-filters_17.cjs",[[1,"vviinn-image-view",{"basicEventData":[16],"setShowAspectRatioError":[16],"showAspectRatioError":[4,"show-aspect-ratio-error"],"cropper":[32],"hidePreloader":[32]},[[0,"vviinnSelectObject","selectDetectedObject"]]],[1,"vviinn-overlayed-modal",{"active":[4],"resetState":[16],"buttonElementId":[1,"button-element-id"],"hideBackButton":[4,"hide-back-button"],"widgetVersion":[1,"widget-version"],"isFirstScreen":[4,"is-first-screen"]}],[1,"vviinn-empty-results",{"handler":[16]}],[1,"vviinn-image-selector",{"basicEventData":[16],"startUpload":[4,"start-upload"],"loading":[4],"accept":[1],"resetVpsButton":[16],"capture":[1]}],[1,"vviinn-server-error",{"handler":[16]}],[1,"vviinn-text-search",{"clearSearchQuery":[4,"clear-search-query"],"initialSearchQuery":[1,"initial-search-query"],"searchQuery":[32]}],[1,"vviinn-wrong-aspect-ratio",{"handler":[16]}],[1,"vviinn-wrong-format",{"handler":[16]}],[1,"search-filters",{"filter":[16],"basicEventData":[16],"selectedFilter":[32],"hideFilters":[32]}],[1,"vviinn-example-image",{"exampleImageSource":[1,"example-image-source"],"width":[2],"height":[2],"basicEventData":[16],"srcObject":[16],"cameraButtonClicked":[4,"camera-button-clicked"],"selected":[32],"videoInitialized":[32],"zoomCapabilities":[32]}],[1,"vviinn-privacy-badge",{"privacyBadgeText":[1,"privacy-badge-text"]}],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32],"isRTL":[32]}],[1,"vviinn-teaser"],[1,"vviinn-detected-object",{"detectedObject":[16],"basicEventData":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"resetState":[16],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"hideBackButton":[4,"hide-back-button"],"isFirstScreen":[4,"is-first-screen"],"slider":[32]}],[1,"vviinn-overlay"]]],["vviinn-vps-widget.cjs",[[1,"vviinn-vps-widget",{"token":[1],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"imageResolutionWidth":[2,"image-resolution-width"],"exampleImageSource":[1,"example-image-source"],"textSearchShow":[4,"text-search-show"],"apiPath":[1,"api-path"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"buttonPressed":[4,"button-pressed"],"mode":[1],"resetVpsButton":[16],"slidePosition":[32],"width":[32],"wrongImageFormat":[32],"trackingDeactivated":[32],"stream":[32],"cameraInitializing":[32],"cameraEnabled":[32],"cameraButtonClicked":[32],"uploadSource":[32],"showAspectRatioError":[32],"products":[32],"initialSearchQuery":[32]},[[0,"vviinnCameraEnabled","trackCameraEnabled"],[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnImageCrop","trachSearchAreaChanges"],[0,"vviinnSelectObject","trackDetectedObject"],[0,"vviinnSelectFilter","trackFilter"],[0,"vviinnTextSearchFinished","trackTextSearchFinished"]]]]],["vviinn-vps-button.cjs",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"addStyle":[4,"add-style"],"mode":[1],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"imageResolutionWidth":[2,"image-resolution-width"],"exampleImageSource":[1,"example-image-source"],"textSearchShow":[4,"text-search-show"],"apiPath":[1,"api-path"],"buttonPressed":[32]},[[0,"vviinnWidgetClose","handleModalClosed"]]]]],["vviinn-recommendations-sidebar.cjs",[[1,"vviinn-recommendations-sidebar",{"sidebarTitle":[1,"sidebar-title"],"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"widgetScrollbar":[4,"widget-scrollbar"],"mode":[1],"campaigns":[1],"campaignType":[1,"campaign-type"],"color":[1],"locale":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"buttonChildren":[16],"apiPath":[1,"api-path"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"showingInButton":[4,"showing-in-button"],"state":[32]},[[16,"click","bodyClickListener"]]]]],["vviinn-vpr-button.cjs",[[1,"vviinn-vpr-button",{"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"sidebarTitle":[1,"sidebar-title"],"modalScrollbar":[4,"modal-scrollbar"],"campaigns":[1],"campaignType":[1,"campaign-type"],"locale":[1],"color":[1],"addStyle":[4,"add-style"],"mode":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"apiPath":[1,"api-path"]}]]]], options);
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
exports.setNonce = index.setNonce;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
const defaultSlotsNames = [
|
|
3
|
+
"vviinn-recommendations-title",
|
|
4
|
+
"vviinn-recommendations-subtitle",
|
|
3
5
|
"vviinn-teaser-text",
|
|
4
6
|
"vviinn-image-upload-button-text",
|
|
5
7
|
"vviinn-image-upload-icon",
|
|
@@ -7,10 +9,13 @@ const defaultSlotsNames = [
|
|
|
7
9
|
"vviinn-camera-button-text-start",
|
|
8
10
|
"vviinn-camera-button-text-stop",
|
|
9
11
|
"vviinn-camera-icon",
|
|
12
|
+
"vviinn-text-search-icon",
|
|
10
13
|
"vviinn-privacy-badge-text",
|
|
11
14
|
"vviinn-image-search-modal-title",
|
|
12
15
|
"vviinn-basket-button-text",
|
|
13
|
-
"vviinn-
|
|
16
|
+
"vviinn-basket-button-icon",
|
|
17
|
+
"vviinn-update-button-icon",
|
|
18
|
+
"vviinn-update-button-text",
|
|
14
19
|
];
|
|
15
20
|
const renderNamedSlot = (name) => h("slot", { name: name });
|
|
16
21
|
export const SlotSkeleton = () => defaultSlotsNames.map(renderNamedSlot);
|
|
@@ -14,9 +14,9 @@ export class VviinnCarousel {
|
|
|
14
14
|
this.defaultAnimationInterval = 2000;
|
|
15
15
|
this.mutationObserver = new MutationObserver(() => this.cloneSlottedContent());
|
|
16
16
|
this.handleWindowResize = () => this.setImageWidthSetMode("100%");
|
|
17
|
-
this.isLastGroup = () => this.
|
|
18
|
-
this.
|
|
19
|
-
this.isFirstGroup = () => this.activeContentGroup === 0
|
|
17
|
+
this.isLastGroup = () => this.isGridMode &&
|
|
18
|
+
this.activeContentGroup === this.getContentGroups().length - 1;
|
|
19
|
+
this.isFirstGroup = () => this.isGridMode && this.activeContentGroup === 0;
|
|
20
20
|
this.updateCard = (productId, step, animationInterval) => {
|
|
21
21
|
let clickedProduct = this.crossSellingRecommendations.find((item) => item.productId === productId);
|
|
22
22
|
const crossSellingIndex = this.crossSellingRecommendations.indexOf(clickedProduct);
|
|
@@ -82,11 +82,16 @@ export class VviinnCarousel {
|
|
|
82
82
|
}
|
|
83
83
|
componentDidLoad() {
|
|
84
84
|
this.setWidth();
|
|
85
|
-
this.processScrollbarWidth();
|
|
86
85
|
this.columns = this.getColumnsNumber();
|
|
87
86
|
const slot = this.el.querySelector(".content");
|
|
88
87
|
this.mutationObserver.observe(slot, { subtree: true, childList: true });
|
|
89
88
|
this.resizeObserver.observe(this.getHostParent());
|
|
89
|
+
if (this.isGridMode) {
|
|
90
|
+
const contentNode = this.getContentNode();
|
|
91
|
+
contentNode.addEventListener("scrollend", () => {
|
|
92
|
+
this.activeContentGroup = this.getActiveGroupIndex();
|
|
93
|
+
});
|
|
94
|
+
}
|
|
90
95
|
}
|
|
91
96
|
updatingAllCardsWatcher() {
|
|
92
97
|
if (!this.updatingAllCards)
|
|
@@ -136,7 +141,6 @@ export class VviinnCarousel {
|
|
|
136
141
|
}
|
|
137
142
|
handleResize() {
|
|
138
143
|
this.setWidth();
|
|
139
|
-
this.processScrollbarWidth();
|
|
140
144
|
this.setItemWidth();
|
|
141
145
|
const newColumns = this.getColumnsNumber();
|
|
142
146
|
if (newColumns !== this.columns) {
|
|
@@ -173,10 +177,6 @@ export class VviinnCarousel {
|
|
|
173
177
|
this.setWidth();
|
|
174
178
|
}
|
|
175
179
|
getActiveGroupIndex() {
|
|
176
|
-
var _a, _b;
|
|
177
|
-
const contentNodeLeft = (_b = (_a = this.getContentNode()) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.left;
|
|
178
|
-
if (!contentNodeLeft)
|
|
179
|
-
return 0;
|
|
180
180
|
const groups = this.getContentGroups();
|
|
181
181
|
const groupsPositions = groups.map((g) => g.getBoundingClientRect().left);
|
|
182
182
|
const indexedPositions = groupsPositions
|
|
@@ -204,24 +204,15 @@ export class VviinnCarousel {
|
|
|
204
204
|
getContentGroups() {
|
|
205
205
|
return Array.from(this.el.querySelectorAll(`.${CONTENT_GROUP_CSS_CLASS}`));
|
|
206
206
|
}
|
|
207
|
-
|
|
208
|
-
this.moveDirection =
|
|
207
|
+
handleCarouselButtonClick(action) {
|
|
208
|
+
this.moveDirection = action;
|
|
209
209
|
const contentContainer = this.getContentNode();
|
|
210
|
+
const { scrollLeft } = contentContainer;
|
|
211
|
+
const step = this.calculateMoveStep();
|
|
210
212
|
requestAnimationFrame(() => {
|
|
211
213
|
contentContainer.scrollTo({
|
|
212
214
|
top: 0,
|
|
213
|
-
left:
|
|
214
|
-
behavior: "smooth",
|
|
215
|
-
});
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
showPrev() {
|
|
219
|
-
this.moveDirection = "left";
|
|
220
|
-
const contentContainer = this.getContentNode();
|
|
221
|
-
requestAnimationFrame(() => {
|
|
222
|
-
contentContainer.scrollTo({
|
|
223
|
-
top: 0,
|
|
224
|
-
left: contentContainer.scrollLeft - this.calculateMoveStep(),
|
|
215
|
+
left: action === "right" ? scrollLeft + step : scrollLeft - step,
|
|
225
216
|
behavior: "smooth",
|
|
226
217
|
});
|
|
227
218
|
});
|
|
@@ -236,15 +227,6 @@ export class VviinnCarousel {
|
|
|
236
227
|
});
|
|
237
228
|
});
|
|
238
229
|
}
|
|
239
|
-
processScrollbarWidth() {
|
|
240
|
-
const target = this.getContentNode();
|
|
241
|
-
if (!target)
|
|
242
|
-
return;
|
|
243
|
-
const scrollRatio = (target.scrollLeft + target.clientWidth) / target.scrollWidth;
|
|
244
|
-
const scrolledWidth = target.clientWidth * scrollRatio;
|
|
245
|
-
this.el.style.setProperty("--vviinn-progressbar-width", `${scrolledWidth}px`);
|
|
246
|
-
this.activeContentGroup = this.getActiveGroupIndex();
|
|
247
|
-
}
|
|
248
230
|
showBullets() {
|
|
249
231
|
return this.isGridMode && this.showScroll;
|
|
250
232
|
}
|
|
@@ -297,7 +279,7 @@ export class VviinnCarousel {
|
|
|
297
279
|
}, onClick: () => this.scroll(index) })));
|
|
298
280
|
}
|
|
299
281
|
render() {
|
|
300
|
-
return (h(Host, { class: this.getClassMap() }, h("div", { class: Object.assign({ body: true }, this.getClassMap()) }, !this.isSetMode && (h("button", { class: "prev", onClick: () => this.
|
|
282
|
+
return (h(Host, { class: this.getClassMap() }, h("div", { class: Object.assign({ body: true }, this.getClassMap()) }, !this.isSetMode && (h("button", { class: "prev", onClick: () => this.handleCarouselButtonClick("left"), part: "carousel-button", disabled: this.gridArrowsDynamic && this.isFirstGroup() }, h(ChevronIcon, null))), this.isSetMode && (h("vviinn-product-card", { part: "product-part", class: "set-mode product-card--source", productTitle: this.sourceProduct.title, image: this.sourceProduct.image.thumbnail, price: this.sourceProduct.price.actual, imageRatio: 1, imageWidth: 300, dimmedBackground: true, isSourceProduct: true })), h("div", { class: this.getContentClassMap() }, this.renderRecommendations()), !this.isSetMode && (h("button", { class: "next", onClick: () => this.handleCarouselButtonClick("right"), part: "carousel-button", disabled: this.gridArrowsDynamic && this.isLastGroup() }, h(ChevronIcon, null)))), this.showBullets() && (h("div", { class: "bullets" }, this.renderBullets()))));
|
|
301
283
|
}
|
|
302
284
|
static get is() { return "vviinn-carousel"; }
|
|
303
285
|
static get originalStyleUrls() {
|
|
@@ -27,10 +27,11 @@ import { generateRandomNumber } from "../../utils/number";
|
|
|
27
27
|
* @part price-prefix - renders before price-amount. Can be set with "price-prefix" property or inherited from parent component.
|
|
28
28
|
* @part title - Product title
|
|
29
29
|
* @part basket-button - Add to Basket button.
|
|
30
|
-
* @part update-button-item - Update button
|
|
30
|
+
* @part update-button-item - Update button in product card (Set mode).
|
|
31
31
|
*
|
|
32
|
-
* @slot vviinn-basket-button-text -
|
|
33
|
-
* @slot vviinn-
|
|
32
|
+
* @slot vviinn-basket-button-text - Text of Add to Basket button.
|
|
33
|
+
* @slot vviinn-basket-button-icon - Icon of Add to Basket button.
|
|
34
|
+
* @slot vviinn-update-button-icon - Icon of update button (Set mode).
|
|
34
35
|
*/
|
|
35
36
|
export class VviinnProductCard {
|
|
36
37
|
constructor() {
|
|
@@ -171,9 +172,7 @@ export class VviinnProductCard {
|
|
|
171
172
|
"applied-discount": !!this.appliedDiscountPercentage,
|
|
172
173
|
}, part: "basket-button", onClick: () => {
|
|
173
174
|
this.vviinnAddToBasket.emit(Object.assign(Object.assign({}, this.productData), { discount: this.currentDiscountPercentage }));
|
|
174
|
-
} }, this.isSetMode ? (h(Fragment, null, this.appliedDiscountPercentage ? (h(CheckCircleIcon, null)) : (h(BasketIcon, null)), h("slot", { name: "vviinn-basket-button-text" }, h("span", null, this.appliedDiscountPercentage
|
|
175
|
-
? `${this.appliedDiscountPercentage}% ${i18next.t("setMode.appliedDiscountText")}`
|
|
176
|
-
: i18next.t("setMode.basketButtonText"))))) : (h("slot", { name: "vviinn-basket-button-text" }, h("span", null, i18next.t("basketButtonText")))))))), this.isSetMode && !this.appliedDiscountPercentage && (h("button", { class: {
|
|
175
|
+
} }, this.isSetMode ? (h(Fragment, null, this.appliedDiscountPercentage ? (h(CheckCircleIcon, null)) : (h("slot", { name: "vviinn-basket-button-icon" }, h(BasketIcon, null))), h("span", null, this.appliedDiscountPercentage ? (`${this.appliedDiscountPercentage}% ${i18next.t("setMode.appliedDiscountText")}`) : (h("slot", { name: "vviinn-basket-button-text" }, i18next.t("setMode.basketButtonText")))))) : (h("slot", { name: "vviinn-basket-button-text" }, h("span", null, i18next.t("basketButtonText")))))))), this.isSetMode && !this.appliedDiscountPercentage && (h("button", { class: {
|
|
177
176
|
"update-button": true,
|
|
178
177
|
hidden: this.updateButtonLocation === "onTop",
|
|
179
178
|
}, part: "update-button-item", onClick: () => {
|
|
@@ -181,7 +180,7 @@ export class VviinnProductCard {
|
|
|
181
180
|
animationInterval: generateRandomNumber(800, 1400),
|
|
182
181
|
productData: this.productData,
|
|
183
182
|
});
|
|
184
|
-
} }, h("slot", { name: "vviinn-update-icon
|
|
183
|
+
} }, h("slot", { name: "vviinn-update-button-icon" }, h(UpdateIcon, null))))));
|
|
185
184
|
}
|
|
186
185
|
static get is() { return "vviinn-product-card"; }
|
|
187
186
|
static get encapsulation() { return "shadow"; }
|
|
@@ -5,9 +5,6 @@ import { VisualSearchIcon } from "../vviinn-icons";
|
|
|
5
5
|
*
|
|
6
6
|
* @part button - Clickable button element.
|
|
7
7
|
* @part vviinn-button - Button element container.
|
|
8
|
-
*
|
|
9
|
-
* @slot vviinn-basket-button-text - Title of Add to Basket button.
|
|
10
|
-
* @slot vviinn-update-icon - Icon of update button for Set mode.
|
|
11
8
|
*/
|
|
12
9
|
export class VviinnVprButton {
|
|
13
10
|
constructor() {
|