vviinn-widgets 2.55.4 → 2.56.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/loader.cjs.js +1 -1
- package/dist/cjs/{package-4df6496c.js → package-55c4e113.js} +1 -1
- package/dist/cjs/vviinn-carousel_4.cjs.entry.js +34 -15
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-widgets.cjs.js +1 -1
- package/dist/collection/components/vviinn-carousel/constants.js +0 -3
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.js +29 -5
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.css +18 -5
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +15 -7
- package/dist/collection/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.js +2 -0
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.js +31 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-50c07634.js → package-ce087bfe.js} +1 -1
- package/dist/esm/vviinn-carousel_4.entry.js +34 -15
- package/dist/esm/vviinn-vpr-button.entry.js +1 -1
- package/dist/esm/vviinn-vps-button.entry.js +1 -1
- package/dist/esm/vviinn-vps-widget.entry.js +1 -1
- package/dist/esm/vviinn-widgets.js +1 -1
- package/dist/types/components/vviinn-carousel/constants.d.ts +0 -3
- package/dist/types/components/vviinn-carousel/vviinn-carousel.d.ts +4 -1
- package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +3 -1
- package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-widget.d.ts +4 -0
- package/dist/types/components.d.ts +12 -2
- package/dist/vviinn-widgets/p-658b677a.js +1 -0
- package/{www/build/p-29311fe3.entry.js → dist/vviinn-widgets/p-67576e9b.entry.js} +1 -1
- package/{www/build/p-0b7ebc42.entry.js → dist/vviinn-widgets/p-cdd79f7a.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-c1c9fb85.entry.js → p-f702c79d.entry.js} +1 -1
- package/dist/vviinn-widgets/p-f706f35a.entry.js +1 -0
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/p-658b677a.js +1 -0
- package/{dist/vviinn-widgets/p-29311fe3.entry.js → www/build/p-67576e9b.entry.js} +1 -1
- package/{dist/vviinn-widgets/p-0b7ebc42.entry.js → www/build/p-cdd79f7a.entry.js} +1 -1
- package/www/build/{p-c1c9fb85.entry.js → p-f702c79d.entry.js} +1 -1
- package/www/build/p-f706f35a.entry.js +1 -0
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/favicon.ico +0 -0
- package/dist/vviinn-widgets/p-348a139a.js +0 -1
- package/dist/vviinn-widgets/p-9913cd6e.entry.js +0 -1
- package/www/build/p-348a139a.js +0 -1
- package/www/build/p-9913cd6e.entry.js +0 -1
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],"sourceProduct":[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"],"replaceSlotsContent":[16],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"locale":[1],"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],"
|
|
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"],"setModeDiscounts":[1,"set-mode-discounts"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"closed":[4],"opened":[4],"recommendations":[32],"sourceProduct":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32],"updatingAllCards":[32],"updatedCardsAmount":[32],"setModeDiscountsArray":[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"],"replaceSlotsContent":[16],"setModeDiscountsArray":[16],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"locale":[1],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[32],"crossSellingRecommendations":[32],"setModeDiscount":[32],"currentDiscountIndex":[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],"basketButtonShow":[4,"basket-button-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],"basketButonPressed":[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",{"searchQuery":[1,"search-query"],"setSearchQuery":[16],"handleTextSearch":[16]}],[1,"vviinn-wrong-aspect-ratio",{"handler":[16]}],[1,"vviinn-wrong-format",{"handler":[16]}],[1,"search-filters",{"filter":[16],"textSearchFiltersGroup":[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],"searchQuery":[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,"vviinnTextSearchFilterSelected","trackTextSearchFilterSelected"]]]]],["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
|
|
|
@@ -7,7 +7,7 @@ const search_store = require('./search.store-d6fff13b.js');
|
|
|
7
7
|
const customizedSlots = require('./customized-slots-8e27cac8.js');
|
|
8
8
|
const i18next = require('./i18next-74ff3413.js');
|
|
9
9
|
const PlusIcon = require('./PlusIcon-835a5dcc.js');
|
|
10
|
-
const _package = require('./package-
|
|
10
|
+
const _package = require('./package-55c4e113.js');
|
|
11
11
|
const resources = require('./resources-1a173128.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" },
|
|
@@ -28,9 +28,6 @@ const CAROUSEL_WIDTH_CSS_VAR = "--vviinn-carousel-content-width";
|
|
|
28
28
|
const CAROUSEL_IMAGE_WIDTH_CSS_VAR = "--vviinn-carousel-image-width";
|
|
29
29
|
const SET_MODE_IMAGE_WIDTH = "--vviinn-set-mode-image-width";
|
|
30
30
|
const CONTENT_GROUP_CSS_CLASS = "items-group";
|
|
31
|
-
const SET_MODE_INITIAL_DISCOUNT = 5;
|
|
32
|
-
const SET_MODE_MAX_DISCOUNT = 15;
|
|
33
|
-
const SET_MODE_DISCOUNT_STEP = 5;
|
|
34
31
|
|
|
35
32
|
const numberUnderDivisionSemigroup = {
|
|
36
33
|
concat: (x, y) => x / y,
|
|
@@ -129,6 +126,7 @@ const VviinnCarousel = class {
|
|
|
129
126
|
this.columns = 0;
|
|
130
127
|
this.resizeObserver = new ResizeObserver(() => this.handleResize());
|
|
131
128
|
this.defaultAnimationInterval = 2000;
|
|
129
|
+
this.setModeMaxDiscount = null;
|
|
132
130
|
this.mutationObserver = new MutationObserver(() => this.cloneSlottedContent());
|
|
133
131
|
this.handleWindowResize = () => this.setImageWidthSetMode("100%");
|
|
134
132
|
this.isLastGroup = () => this.isGridMode &&
|
|
@@ -164,7 +162,8 @@ const VviinnCarousel = class {
|
|
|
164
162
|
this.activeContentGroup = 0;
|
|
165
163
|
this.isRTL = false;
|
|
166
164
|
this.crossSellingRecommendations = [];
|
|
167
|
-
this.setModeDiscount =
|
|
165
|
+
this.setModeDiscount = null;
|
|
166
|
+
this.currentDiscountIndex = 0;
|
|
168
167
|
this.setModeAppliedDiscounts = {};
|
|
169
168
|
this.mode = "continuity";
|
|
170
169
|
this.imageWidth = 140;
|
|
@@ -178,6 +177,7 @@ const VviinnCarousel = class {
|
|
|
178
177
|
this.updatingAllCards = undefined;
|
|
179
178
|
this.updateButtonLocation = undefined;
|
|
180
179
|
this.replaceSlotsContent = undefined;
|
|
180
|
+
this.setModeDiscountsArray = undefined;
|
|
181
181
|
this.currencySign = undefined;
|
|
182
182
|
this.pricePrefix = "";
|
|
183
183
|
this.locale = undefined;
|
|
@@ -207,6 +207,9 @@ const VviinnCarousel = class {
|
|
|
207
207
|
if (this.isSetMode) {
|
|
208
208
|
window.addEventListener("resize", this.handleWindowResize);
|
|
209
209
|
this.sourceProduct = search_store.searchState.sourceProduct;
|
|
210
|
+
this.setModeDiscount = this.setModeDiscountsArray[0];
|
|
211
|
+
this.setModeMaxDiscount =
|
|
212
|
+
this.setModeDiscountsArray[this.setModeDiscountsArray.length - 1];
|
|
210
213
|
}
|
|
211
214
|
if (this.isSetMode && this.recommendations.length >= columnsNumber) {
|
|
212
215
|
this.crossSellingRecommendations = this.recommendations.slice(0, columnsNumber);
|
|
@@ -255,9 +258,11 @@ const VviinnCarousel = class {
|
|
|
255
258
|
if (this.setModeAppliedDiscounts.hasOwnProperty(productId))
|
|
256
259
|
return;
|
|
257
260
|
this.setModeAppliedDiscounts = Object.assign(Object.assign({}, this.setModeAppliedDiscounts), { [productId]: this.setModeDiscount });
|
|
258
|
-
const isMaxDiscount = this.setModeDiscount ===
|
|
261
|
+
const isMaxDiscount = this.setModeDiscount === this.setModeMaxDiscount;
|
|
259
262
|
if (!isMaxDiscount) {
|
|
260
|
-
this.
|
|
263
|
+
this.currentDiscountIndex += 1;
|
|
264
|
+
this.setModeDiscount =
|
|
265
|
+
this.setModeDiscountsArray[this.currentDiscountIndex];
|
|
261
266
|
}
|
|
262
267
|
}
|
|
263
268
|
setItemWidth() {
|
|
@@ -385,7 +390,7 @@ const VviinnCarousel = class {
|
|
|
385
390
|
const salePrice = this.isSetMode
|
|
386
391
|
? setModeDiscount
|
|
387
392
|
: recommendation.price.sale;
|
|
388
|
-
return (index.h("vviinn-product-card", { part: "product-part", productId: recommendation.productId, productTitle: recommendation.title, productType: recommendation.productType, deeplink: recommendation.deeplink, image: recommendation.image.thumbnail, brand: recommendation.brand, imageWidth: this.imageWidth, imageRatio: 1, price: recommendation.price.actual, salePrice: salePrice, responsive: this.isGridMode, dimmedBackground: this.isContinuityMode || this.isSetMode, campaignTypeId: this.campaignTypeId, index: rank, widgetElementId: this.widgetElementId, widgetVersion: this.widgetVersion,
|
|
393
|
+
return (index.h("vviinn-product-card", { part: "product-part", productId: recommendation.productId, productTitle: recommendation.title, productType: recommendation.productType, deeplink: recommendation.deeplink, image: recommendation.image.thumbnail, brand: recommendation.brand, imageWidth: this.imageWidth, imageRatio: 1, price: recommendation.price.actual, salePrice: salePrice, responsive: this.isGridMode, dimmedBackground: this.isContinuityMode || this.isSetMode, campaignTypeId: this.campaignTypeId, index: rank, widgetElementId: this.widgetElementId, widgetVersion: this.widgetVersion, basketButtonShow: this.addToBasketShow, mode: this.mode, "data-id": recommendation.productId, updatingAllCards: this.updatingAllCards, defaultAnimationInterval: this.defaultAnimationInterval, updateButtonLocation: this.updateButtonLocation, appliedDiscountPercentage: appliedDiscount, currentDiscountPercentage: this.setModeDiscount, currency: this.currencySign, pricePrefix: this.pricePrefix, locale: this.locale }));
|
|
389
394
|
}
|
|
390
395
|
renderRecommendationGroup(elements) {
|
|
391
396
|
return (index.h("div", { class: CONTENT_GROUP_CSS_CLASS, part: "items-group" }, ...elements));
|
|
@@ -541,7 +546,7 @@ const Image = (props, onLoadEnd = () => undefined) => (index.h("picture", null,
|
|
|
541
546
|
const ResponsiveImage = (props, onLoadEnd = () => undefined) => (index.h("picture", null,
|
|
542
547
|
index.h("img", { loading: props.lazy ? "lazy" : "eager", part: "image", class: "image responsive", src: processWidth(props.src, props.width), alt: props.title, ref: props.ref, onLoad: onLoadEnd })));
|
|
543
548
|
|
|
544
|
-
const vviinnProductCardCss = ":host{align-items:center;display:flex;flex-direction:column;position:relative;gap:8px;height:100%;--min-image-size-set-mode:155px}.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}.image.responsive{width:100%;height:auto;aspect-ratio:1}.brand,.type{display:none}.title{-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow-wrap:anywhere;text-overflow:ellipsis;color:#161616;display:-webkit-box;font-size:16px;font-style:normal;font-weight:500;line-height:24px;overflow:hidden}.deeplink{text-decoration:none;max-width:100%}.image-link{display:contents}picture{position:relative;width:100%}picture::before{content:\"\";opacity:0;width:100%;height:100%;box-sizing:border-box;display:block;top:0;left:0;position:absolute}.update-button{position:absolute;top:8px;right:8px;padding:6px;width:32px;height:32px;z-index:1;background-color:rgba(127, 127, 127, 0.4);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);border:none;color:white;cursor:pointer}.update-button svg{width:20px;height:20px}.update-button::after{content:\"\";position:absolute;top:-4px;right:-4px;width:calc(100% + 8px);height:calc(100% + 8px)}.update-button:hover{background-color:rgba(127, 127, 127, 0.5)}.update-button.hidden{display:none}.basket-button{font-size:16px;padding:10px 12px;box-sizing:border-box;border:none;cursor:pointer}.basket-button.basket-button-grid{width:100%;background-color:unset;border:1px solid #dddddd}.basket-button.basket-button-continuity{align-self:start;background-color:#f7f7f7}.basket-button-continuity:hover{background-color:#eaeaea}.basket-button-grid:hover{background-color:#f7f7f7}:host(.dimmed) picture::after{content:\"\";width:100%;height:100%;box-sizing:border-box;background-color:#f7f7f7;display:block;top:0;left:0;position:absolute;mix-blend-mode:multiply}:host(.animated) picture::after{mix-blend-mode:normal}:host(.animated) picture::before{opacity:1;animation:pulse 1.8s infinite}:host(.animated) picture::after{content:url(\"data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_810_154)'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M64.7332 1.23333C66.2665 12.2667 67.9665 13.9667 78.6665 15.2333C79.4332 15.3333 79.9999 15.9333 79.9999 16.6667C79.9999 17.4 79.4665 17.9333 78.6665 18.0667C67.9665 19.3667 66.2999 21.0333 64.7332 32.0667C64.6332 32.8 64.0665 33.3333 63.3665 33.3333C62.6665 33.3333 62.0999 32.8 61.9665 32.0667C60.4665 21.0333 58.7665 19.3667 48.0332 18.0667C47.2332 17.9667 46.6999 17.4333 46.6999 16.6667C46.6999 15.9 47.2332 15.3667 48.0332 15.2333C58.7665 13.7667 60.3999 12.2 61.9665 1.23333C62.0999 0.5 62.6665 0 63.3665 0C64.0665 0 64.5999 0.5 64.7332 1.23333ZM38.5665 71.5667C38.3665 72.6 37.6665 73.3333 36.6665 73.3333C35.6665 73.3333 34.9665 72.6 34.7998 71.5667C31.9332 50.7 29.0998 47.9 8.49984 45.2C7.39984 45.1 6.6665 44.3 6.6665 43.3C6.6665 42.3 7.39984 41.5333 8.49984 41.4333C29.1332 39.1333 32.0998 35.9333 34.7998 15.0333C34.9665 14.0333 35.6665 13.3333 36.6665 13.3333C37.6665 13.3333 38.3665 14 38.5665 15.0333C41.2665 35.9333 44.1998 39.1333 64.8665 41.4333C65.9332 41.5333 66.6665 42.2667 66.6665 43.3C66.6665 44.3333 65.9332 45.1 64.8665 45.2C44.1998 47.5 41.2665 50.7 38.5665 71.5667Z' fill='white'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_810_154'%3E%3Crect width='80' height='80' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E\");background-color:transparent;position:absolute;width:80px;height:80px;left:calc(50% - 40px);top:calc(50% - 40px)}:host(.animated) .update-button{display:none}:host(.set-mode){line-height:20px;align-items:flex-start;height:auto}:host(.set-mode) .basket-button{display:flex;gap:8px;align-items:center;box-sizing:border-box;justify-content:center
|
|
549
|
+
const vviinnProductCardCss = ":host{align-items:center;display:flex;flex-direction:column;position:relative;gap:8px;height:100%;--min-image-size-set-mode:155px}.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}.image.responsive{width:100%;height:auto;aspect-ratio:1}.brand,.type{display:none}.title{-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow-wrap:anywhere;text-overflow:ellipsis;color:#161616;display:-webkit-box;font-size:16px;font-style:normal;font-weight:500;line-height:24px;overflow:hidden}.deeplink{text-decoration:none;max-width:100%}.image-link{display:contents}picture{position:relative;width:100%}picture::before{content:\"\";opacity:0;width:100%;height:100%;box-sizing:border-box;display:block;top:0;left:0;position:absolute}.update-button{position:absolute;top:8px;right:8px;padding:6px;width:32px;height:32px;z-index:1;background-color:rgba(127, 127, 127, 0.4);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);border:none;color:white;cursor:pointer}.update-button svg{width:20px;height:20px}.update-button::after{content:\"\";position:absolute;top:-4px;right:-4px;width:calc(100% + 8px);height:calc(100% + 8px)}.update-button:hover{background-color:rgba(127, 127, 127, 0.5)}.update-button.hidden{display:none}.basket-button{font-size:16px;padding:10px 12px;box-sizing:border-box;border:none;cursor:pointer}.basket-button-icon-container{display:inline-flex;align-items:center;justify-content:center}.basket-button.basket-button-grid{width:100%;background-color:unset;border:1px solid #dddddd}.basket-button.basket-button-continuity{align-self:start;background-color:#f7f7f7}.basket-button-continuity:hover{background-color:#eaeaea}.basket-button-grid:hover{background-color:#f7f7f7}:host(.dimmed) picture::after{content:\"\";width:100%;height:100%;box-sizing:border-box;background-color:#f7f7f7;display:block;top:0;left:0;position:absolute;mix-blend-mode:multiply}:host(.animated) picture::after{mix-blend-mode:normal}:host(.animated) picture::before{opacity:1;animation:pulse 1.8s infinite}:host(.animated) picture::after{content:url(\"data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_810_154)'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M64.7332 1.23333C66.2665 12.2667 67.9665 13.9667 78.6665 15.2333C79.4332 15.3333 79.9999 15.9333 79.9999 16.6667C79.9999 17.4 79.4665 17.9333 78.6665 18.0667C67.9665 19.3667 66.2999 21.0333 64.7332 32.0667C64.6332 32.8 64.0665 33.3333 63.3665 33.3333C62.6665 33.3333 62.0999 32.8 61.9665 32.0667C60.4665 21.0333 58.7665 19.3667 48.0332 18.0667C47.2332 17.9667 46.6999 17.4333 46.6999 16.6667C46.6999 15.9 47.2332 15.3667 48.0332 15.2333C58.7665 13.7667 60.3999 12.2 61.9665 1.23333C62.0999 0.5 62.6665 0 63.3665 0C64.0665 0 64.5999 0.5 64.7332 1.23333ZM38.5665 71.5667C38.3665 72.6 37.6665 73.3333 36.6665 73.3333C35.6665 73.3333 34.9665 72.6 34.7998 71.5667C31.9332 50.7 29.0998 47.9 8.49984 45.2C7.39984 45.1 6.6665 44.3 6.6665 43.3C6.6665 42.3 7.39984 41.5333 8.49984 41.4333C29.1332 39.1333 32.0998 35.9333 34.7998 15.0333C34.9665 14.0333 35.6665 13.3333 36.6665 13.3333C37.6665 13.3333 38.3665 14 38.5665 15.0333C41.2665 35.9333 44.1998 39.1333 64.8665 41.4333C65.9332 41.5333 66.6665 42.2667 66.6665 43.3C66.6665 44.3333 65.9332 45.1 64.8665 45.2C44.1998 47.5 41.2665 50.7 38.5665 71.5667Z' fill='white'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_810_154'%3E%3Crect width='80' height='80' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E\");background-color:transparent;position:absolute;width:80px;height:80px;left:calc(50% - 40px);top:calc(50% - 40px)}:host(.animated) .update-button{display:none}:host(.set-mode){line-height:20px;align-items:flex-start;height:auto}:host(.set-mode) .basket-button{border:none;background-color:#f4f4f4;font-weight:500;color:#525252}:host(.set-mode) .basket-button-container{display:flex;gap:8px;align-items:center;box-sizing:border-box;justify-content:center}:host(.set-mode:not(.animated)) .basket-button{margin-top:auto}:host(.set-mode) .basket-button:hover{background-color:rgb(234, 234, 234)}:host(.set-mode) .title{font-weight:400}:host(.set-mode) .image{width:var(--vviinn-set-mode-image-width, 100%);height:auto;border:none;aspect-ratio:1;min-width:var(--min-image-size-set-mode);min-height:var(--min-image-size-set-mode)}:host(.set-mode.product-card--source){height:-moz-fit-content;height:fit-content;flex-grow:1}:host(.set-mode.product-card--source) .image{aspect-ratio:1;width:100%;height:100%}:host(.set-mode) picture .plus-icon{background-color:white;position:absolute;z-index:1;padding:16px;top:calc(50% - 32px);color:#a8a8a8;right:-88px;outline:1px solid #f4f4f4;border-radius:50%;width:32px;height:32px}@media (max-width: 768px){:host(.set-mode) picture .plus-icon{padding:8px;top:calc(50% - 24px);right:-24px}}:host(.set-mode) .basket-button.pressed{background:transparent;border:1px solid #e0e0e0}:host(.set-mode) .basket-button.pressed .discount-percentage{padding-right:5px}:host(.set-mode) .basket-button--hidden{display:none}:host(.set-mode) .price-container{flex-direction:row;flex-wrap:wrap}:host(.set-mode) .price-amount{margin-right:12px}@media (max-width: 1080px){:host(.set-mode) .price-amount{margin-right:8px}}@keyframes pulse{0%{background-color:rgb(244, 244, 244)}50%{background-color:rgb(232, 232, 232)}100%{background-color:rgba(244, 244, 244)}}.discount-label{position:absolute;left:0;top:13px;line-height:20px;padding:2px 4px;border-radius:0px 4px 4px 0px;color:white;background-color:#ff3944;letter-spacing:0.5px}";
|
|
545
550
|
|
|
546
551
|
const VviinnProductCard = class {
|
|
547
552
|
constructor(hostRef) {
|
|
@@ -577,7 +582,7 @@ const VviinnProductCard = class {
|
|
|
577
582
|
this.responsive = false;
|
|
578
583
|
this.dimmedBackground = false;
|
|
579
584
|
this.mode = undefined;
|
|
580
|
-
this.
|
|
585
|
+
this.basketButtonShow = undefined;
|
|
581
586
|
this.updateButtonLocation = undefined;
|
|
582
587
|
this.appliedDiscountPercentage = undefined;
|
|
583
588
|
this.currentDiscountPercentage = undefined;
|
|
@@ -590,6 +595,7 @@ const VviinnProductCard = class {
|
|
|
590
595
|
this.updatingAllCards = undefined;
|
|
591
596
|
this.defaultAnimationInterval = undefined;
|
|
592
597
|
this.isTransitioning = false;
|
|
598
|
+
this.basketButonPressed = false;
|
|
593
599
|
}
|
|
594
600
|
connectedCallback() {
|
|
595
601
|
this.productData = this.getProductData();
|
|
@@ -609,6 +615,7 @@ const VviinnProductCard = class {
|
|
|
609
615
|
crossSellingClickListener({ detail }) {
|
|
610
616
|
const { animationInterval } = detail;
|
|
611
617
|
this.isTransitioning = true;
|
|
618
|
+
this.basketButonPressed = false;
|
|
612
619
|
const animationTimer = setTimeout(() => {
|
|
613
620
|
this.isTransitioning = false;
|
|
614
621
|
clearTimeout(animationTimer);
|
|
@@ -618,6 +625,7 @@ const VviinnProductCard = class {
|
|
|
618
625
|
if (!this.updatingAllCards)
|
|
619
626
|
return;
|
|
620
627
|
this.isTransitioning = true;
|
|
628
|
+
this.basketButonPressed = false;
|
|
621
629
|
const animationTimer = setTimeout(() => {
|
|
622
630
|
this.vviinnUpdatingAllCardsFinished.emit();
|
|
623
631
|
this.isTransitioning = false;
|
|
@@ -682,15 +690,18 @@ const VviinnProductCard = class {
|
|
|
682
690
|
dimmed: this.dimmedBackground,
|
|
683
691
|
animated: this.isTransitioning,
|
|
684
692
|
"set-mode": this.isSetMode,
|
|
685
|
-
}, exportparts: "brand, currency, deeplink, image, image-link, price-amount-sale, price-amount-outdated, price-amount-regular, price-container, price-outdated, price-regular, price-sale, price-prefix, discount-label, title, basket-button, update-button-item" }, index.h(Linked, { deeplink: this.deeplink, part: "image-link" }, this.renderImage()), this.isTransitioning ? (index.h(index.Fragment, null, index.h("vviinn-skeleton", { height: 20 }), index.h("vviinn-skeleton", { height: 20, halfWidth: true }))) : (index.h(index.Fragment, null, index.h(Linked, { deeplink: this.deeplink, part: "deeplink" }, index.h("span", { class: "title", part: "title" }, this.productTitle)), index.h("span", { class: "brand", part: "brand" }, this.brand), index.h("span", { class: "type", part: "type" }, this.productType), index.h(Price, { prefix: this.pricePrefix, currency: this.currency, price: this.price, salePrice: this.salePrice, locale: this.locale }), this.isSetMode &&
|
|
693
|
+
}, exportparts: "brand, currency, deeplink, image, image-link, price-amount-sale, price-amount-outdated, price-amount-regular, price-container, price-outdated, price-regular, price-sale, price-prefix, discount-label, discount-percentage, title, basket-button, update-button-item" }, index.h(Linked, { deeplink: this.deeplink, part: "image-link" }, this.renderImage()), this.isTransitioning ? (index.h(index.Fragment, null, index.h("vviinn-skeleton", { height: 20 }), index.h("vviinn-skeleton", { height: 20, halfWidth: true }))) : (index.h(index.Fragment, null, index.h(Linked, { deeplink: this.deeplink, part: "deeplink" }, index.h("span", { class: "title", part: "title" }, this.productTitle)), index.h("span", { class: "brand", part: "brand" }, this.brand), index.h("span", { class: "type", part: "type" }, this.productType), index.h(Price, { prefix: this.pricePrefix, currency: this.currency, price: this.price, salePrice: this.salePrice, locale: this.locale }), this.isSetMode &&
|
|
694
|
+
!this.appliedDiscountPercentage &&
|
|
695
|
+
this.currentDiscountPercentage && (index.h("div", { class: "discount-label", part: "discount-label" }, `-${this.currentDiscountPercentage}%`)))), (this.basketButtonShow || this.isSetMode) && (index.h(index.Fragment, null, this.isTransitioning && index.h("vviinn-skeleton", { height: 44 }), index.h("button", { class: {
|
|
686
696
|
"basket-button": true,
|
|
687
697
|
"basket-button--hidden": this.isTransitioning,
|
|
688
698
|
"basket-button-grid": this.isGridMode || this.isSetMode,
|
|
689
699
|
"basket-button-continuity ": this.isContinuityMode,
|
|
690
|
-
|
|
700
|
+
pressed: this.basketButonPressed,
|
|
691
701
|
}, part: "basket-button", onClick: () => {
|
|
692
702
|
this.vviinnAddToBasket.emit(Object.assign(Object.assign({}, this.productData), { discount: this.currentDiscountPercentage }));
|
|
693
|
-
|
|
703
|
+
this.basketButonPressed = true;
|
|
704
|
+
} }, this.isSetMode ? (index.h(index.Fragment, null, !this.basketButonPressed && (index.h("div", { key: "set-not-pressed", class: "basket-button-container" }, index.h("span", { class: "basket-button-icon-container" }, index.h("slot", { name: "vviinn-basket-button-icon" }, index.h(BasketIcon, null))), index.h("span", null, index.h("slot", { name: "vviinn-basket-button-text" }, i18next.instance.t("setMode.basketButtonText"))))), this.basketButonPressed && (index.h("div", { key: "set-pressed", class: "basket-button-container" }, index.h("span", { class: "basket-button-icon-container" }, index.h("slot", { name: "vviinn-basket-button-icon-pressed" }, index.h(CheckCircleIcon, null))), index.h("span", null, this.appliedDiscountPercentage && (index.h("span", { class: "discount-percentage", part: "discount-percentage" }, this.appliedDiscountPercentage, "%")), index.h("slot", { name: "vviinn-basket-button-text-pressed" }, i18next.instance.t("setMode.appliedDiscountText"))))))) : (index.h("slot", { name: "vviinn-basket-button-text" }, i18next.instance.t("basketButtonText")))))), this.isSetMode && !this.basketButonPressed && (index.h("button", { class: {
|
|
694
705
|
"update-button": true,
|
|
695
706
|
hidden: this.updateButtonLocation === "onTop",
|
|
696
707
|
}, part: "update-button-item", onClick: () => {
|
|
@@ -1438,6 +1449,7 @@ const VviinnVprWidget = class {
|
|
|
1438
1449
|
this.productDetailNewTab = false;
|
|
1439
1450
|
this.addToBasketShow = false;
|
|
1440
1451
|
this.updateButtonLocation = "topAndItem";
|
|
1452
|
+
this.setModeDiscounts = this.mode === "set" ? "5, 10, 15" : "";
|
|
1441
1453
|
this.apiPath = "https://api.vviinn.com";
|
|
1442
1454
|
this.useCarousel = true;
|
|
1443
1455
|
this.showingInButton = false;
|
|
@@ -1450,6 +1462,7 @@ const VviinnVprWidget = class {
|
|
|
1450
1462
|
this.hasErrorOnLoad = false;
|
|
1451
1463
|
this.updatingAllCards = false;
|
|
1452
1464
|
this.updatedCardsAmount = 0;
|
|
1465
|
+
this.setModeDiscountsArray = [];
|
|
1453
1466
|
}
|
|
1454
1467
|
getBasicEventData() {
|
|
1455
1468
|
return {
|
|
@@ -1529,6 +1542,12 @@ const VviinnVprWidget = class {
|
|
|
1529
1542
|
this.isSetMode = this.mode === "set";
|
|
1530
1543
|
this.isGridMode = this.mode === "grid";
|
|
1531
1544
|
this.isContinuityMode = this.mode === "continuity";
|
|
1545
|
+
if (this.isSetMode && this.setModeDiscounts.length) {
|
|
1546
|
+
this.setModeDiscountsArray = this.setModeDiscounts
|
|
1547
|
+
.split(",")
|
|
1548
|
+
.map((d) => parseInt(d.trim()))
|
|
1549
|
+
.filter((d) => !isNaN(d));
|
|
1550
|
+
}
|
|
1532
1551
|
}
|
|
1533
1552
|
async componentWillLoad() {
|
|
1534
1553
|
await i18next.instance.init({
|
|
@@ -1716,7 +1735,7 @@ const VviinnVprWidget = class {
|
|
|
1716
1735
|
: i18next.instance.t("noResultText"))))));
|
|
1717
1736
|
}
|
|
1718
1737
|
renderRecommendation(recommendation, index$1) {
|
|
1719
|
-
return (index.h("vviinn-product-card", { part: "product-part", productId: recommendation.productId, productTitle: recommendation.title, productType: recommendation.productType, 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.isGridMode,
|
|
1738
|
+
return (index.h("vviinn-product-card", { part: "product-part", productId: recommendation.productId, productTitle: recommendation.title, productType: recommendation.productType, 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.isGridMode, basketButtonShow: this.addToBasketShow, mode: this.mode, dimmedBackground: this.useDimmedBackgroundInCard(), campaignTypeId: this.campaignType, index: index$1, widgetElementId: this.id, widgetVersion: _package.version, currency: this.currencySign, pricePrefix: this.pricePrefix, locale: this.locale }));
|
|
1720
1739
|
}
|
|
1721
1740
|
useDimmedBackgroundInCard() {
|
|
1722
1741
|
return this.isContinuityMode || this.isSetMode || !this.useCarousel;
|
|
@@ -1725,7 +1744,7 @@ const VviinnVprWidget = class {
|
|
|
1725
1744
|
return (index.h("div", { class: "recommendations-grid", part: "recommendations-grid" }, this.recommendations.map((r, i) => this.renderRecommendation(r, i))));
|
|
1726
1745
|
}
|
|
1727
1746
|
renderCarousel() {
|
|
1728
|
-
return (index.h("vviinn-carousel", { mode: this.mode, campaignTypeId: this.campaignType, imageWidth: this.imageWidth, showScroll: this.showScroll, recommendations: this.recommendations, widgetElementId: this.id, widgetVersion: _package.version, gridArrowsDynamic: this.gridArrowsDynamic, addToBasketShow: this.addToBasketShow, updatingAllCards: this.updatingAllCards, updateButtonLocation: this.updateButtonLocation, replaceSlotsContent: this.replaceSlotsContent.bind(this), currencySign: this.currencySign, pricePrefix: this.pricePrefix, locale: this.locale }));
|
|
1747
|
+
return (index.h("vviinn-carousel", { mode: this.mode, campaignTypeId: this.campaignType, imageWidth: this.imageWidth, showScroll: this.showScroll, recommendations: this.recommendations, widgetElementId: this.id, widgetVersion: _package.version, gridArrowsDynamic: this.gridArrowsDynamic, addToBasketShow: this.addToBasketShow, updatingAllCards: this.updatingAllCards, updateButtonLocation: this.updateButtonLocation, replaceSlotsContent: this.replaceSlotsContent.bind(this), setModeDiscountsArray: this.setModeDiscountsArray, currencySign: this.currencySign, pricePrefix: this.pricePrefix, locale: this.locale }));
|
|
1729
1748
|
}
|
|
1730
1749
|
get el() { return index.getElement(this); }
|
|
1731
1750
|
static get watchers() { return {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
|
-
const _package = require('./package-
|
|
6
|
+
const _package = require('./package-55c4e113.js');
|
|
7
7
|
const VisualSearchIcon = require('./VisualSearchIcon-f435f5b0.js');
|
|
8
8
|
|
|
9
9
|
const vviinnVprButtonCss = ":host{display:block}";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
|
-
const _package = require('./package-
|
|
6
|
+
const _package = require('./package-55c4e113.js');
|
|
7
7
|
const customizedSlots = require('./customized-slots-8e27cac8.js');
|
|
8
8
|
const constants = require('./constants-7684cbfc.js');
|
|
9
9
|
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
6
|
const search_store = require('./search.store-d6fff13b.js');
|
|
7
7
|
const i18next = require('./i18next-74ff3413.js');
|
|
8
|
-
const _package = require('./package-
|
|
8
|
+
const _package = require('./package-55c4e113.js');
|
|
9
9
|
const customizedSlots = require('./customized-slots-8e27cac8.js');
|
|
10
10
|
const resources = require('./resources-1a173128.js');
|
|
11
11
|
const constants = require('./constants-7684cbfc.js');
|
|
@@ -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],"sourceProduct":[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"],"replaceSlotsContent":[16],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"locale":[1],"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],"
|
|
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"],"setModeDiscounts":[1,"set-mode-discounts"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"closed":[4],"opened":[4],"recommendations":[32],"sourceProduct":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32],"updatingAllCards":[32],"updatedCardsAmount":[32],"setModeDiscountsArray":[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"],"replaceSlotsContent":[16],"setModeDiscountsArray":[16],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"locale":[1],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[32],"crossSellingRecommendations":[32],"setModeDiscount":[32],"currentDiscountIndex":[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],"basketButtonShow":[4,"basket-button-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],"basketButonPressed":[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",{"searchQuery":[1,"search-query"],"setSearchQuery":[16],"handleTextSearch":[16]}],[1,"vviinn-wrong-aspect-ratio",{"handler":[16]}],[1,"vviinn-wrong-format",{"handler":[16]}],[1,"search-filters",{"filter":[16],"textSearchFiltersGroup":[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],"searchQuery":[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,"vviinnTextSearchFilterSelected","trackTextSearchFilterSelected"]]]]],["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;
|
|
@@ -3,6 +3,3 @@ export const CAROUSEL_WIDTH_CSS_VAR = "--vviinn-carousel-content-width";
|
|
|
3
3
|
export const CAROUSEL_IMAGE_WIDTH_CSS_VAR = "--vviinn-carousel-image-width";
|
|
4
4
|
export const SET_MODE_IMAGE_WIDTH = "--vviinn-set-mode-image-width";
|
|
5
5
|
export const CONTENT_GROUP_CSS_CLASS = "items-group";
|
|
6
|
-
export const SET_MODE_INITIAL_DISCOUNT = 5;
|
|
7
|
-
export const SET_MODE_MAX_DISCOUNT = 15;
|
|
8
|
-
export const SET_MODE_DISCOUNT_STEP = 5;
|
|
@@ -3,7 +3,7 @@ import { chunksOf } from "fp-ts/lib/Array";
|
|
|
3
3
|
import { pipe } from "fp-ts/lib/function";
|
|
4
4
|
import { ChevronIcon } from "../vviinn-icons";
|
|
5
5
|
import { campaignTypeNames } from "../../campaign/Campaign";
|
|
6
|
-
import { CAROUSEL_IMAGE_WIDTH_CSS_VAR, CAROUSEL_WIDTH_CSS_VAR, COLUMNS_NUMBER_CSS_VAR, CONTENT_GROUP_CSS_CLASS,
|
|
6
|
+
import { CAROUSEL_IMAGE_WIDTH_CSS_VAR, CAROUSEL_WIDTH_CSS_VAR, COLUMNS_NUMBER_CSS_VAR, CONTENT_GROUP_CSS_CLASS, SET_MODE_IMAGE_WIDTH, } from "./constants";
|
|
7
7
|
import { calculateDiscount } from "../../utils/number";
|
|
8
8
|
import { searchState } from "../../store/search.store";
|
|
9
9
|
/**
|
|
@@ -14,6 +14,7 @@ export class VviinnCarousel {
|
|
|
14
14
|
this.columns = 0;
|
|
15
15
|
this.resizeObserver = new ResizeObserver(() => this.handleResize());
|
|
16
16
|
this.defaultAnimationInterval = 2000;
|
|
17
|
+
this.setModeMaxDiscount = null;
|
|
17
18
|
this.mutationObserver = new MutationObserver(() => this.cloneSlottedContent());
|
|
18
19
|
this.handleWindowResize = () => this.setImageWidthSetMode("100%");
|
|
19
20
|
this.isLastGroup = () => this.isGridMode &&
|
|
@@ -49,7 +50,8 @@ export class VviinnCarousel {
|
|
|
49
50
|
this.activeContentGroup = 0;
|
|
50
51
|
this.isRTL = false;
|
|
51
52
|
this.crossSellingRecommendations = [];
|
|
52
|
-
this.setModeDiscount =
|
|
53
|
+
this.setModeDiscount = null;
|
|
54
|
+
this.currentDiscountIndex = 0;
|
|
53
55
|
this.setModeAppliedDiscounts = {};
|
|
54
56
|
this.mode = "continuity";
|
|
55
57
|
this.imageWidth = 140;
|
|
@@ -63,6 +65,7 @@ export class VviinnCarousel {
|
|
|
63
65
|
this.updatingAllCards = undefined;
|
|
64
66
|
this.updateButtonLocation = undefined;
|
|
65
67
|
this.replaceSlotsContent = undefined;
|
|
68
|
+
this.setModeDiscountsArray = undefined;
|
|
66
69
|
this.currencySign = undefined;
|
|
67
70
|
this.pricePrefix = "";
|
|
68
71
|
this.locale = undefined;
|
|
@@ -92,6 +95,9 @@ export class VviinnCarousel {
|
|
|
92
95
|
if (this.isSetMode) {
|
|
93
96
|
window.addEventListener("resize", this.handleWindowResize);
|
|
94
97
|
this.sourceProduct = searchState.sourceProduct;
|
|
98
|
+
this.setModeDiscount = this.setModeDiscountsArray[0];
|
|
99
|
+
this.setModeMaxDiscount =
|
|
100
|
+
this.setModeDiscountsArray[this.setModeDiscountsArray.length - 1];
|
|
95
101
|
}
|
|
96
102
|
if (this.isSetMode && this.recommendations.length >= columnsNumber) {
|
|
97
103
|
this.crossSellingRecommendations = this.recommendations.slice(0, columnsNumber);
|
|
@@ -140,9 +146,11 @@ export class VviinnCarousel {
|
|
|
140
146
|
if (this.setModeAppliedDiscounts.hasOwnProperty(productId))
|
|
141
147
|
return;
|
|
142
148
|
this.setModeAppliedDiscounts = Object.assign(Object.assign({}, this.setModeAppliedDiscounts), { [productId]: this.setModeDiscount });
|
|
143
|
-
const isMaxDiscount = this.setModeDiscount ===
|
|
149
|
+
const isMaxDiscount = this.setModeDiscount === this.setModeMaxDiscount;
|
|
144
150
|
if (!isMaxDiscount) {
|
|
145
|
-
this.
|
|
151
|
+
this.currentDiscountIndex += 1;
|
|
152
|
+
this.setModeDiscount =
|
|
153
|
+
this.setModeDiscountsArray[this.currentDiscountIndex];
|
|
146
154
|
}
|
|
147
155
|
}
|
|
148
156
|
setItemWidth() {
|
|
@@ -270,7 +278,7 @@ export class VviinnCarousel {
|
|
|
270
278
|
const salePrice = this.isSetMode
|
|
271
279
|
? setModeDiscount
|
|
272
280
|
: recommendation.price.sale;
|
|
273
|
-
return (h("vviinn-product-card", { part: "product-part", productId: recommendation.productId, productTitle: recommendation.title, productType: recommendation.productType, deeplink: recommendation.deeplink, image: recommendation.image.thumbnail, brand: recommendation.brand, imageWidth: this.imageWidth, imageRatio: 1, price: recommendation.price.actual, salePrice: salePrice, responsive: this.isGridMode, dimmedBackground: this.isContinuityMode || this.isSetMode, campaignTypeId: this.campaignTypeId, index: rank, widgetElementId: this.widgetElementId, widgetVersion: this.widgetVersion,
|
|
281
|
+
return (h("vviinn-product-card", { part: "product-part", productId: recommendation.productId, productTitle: recommendation.title, productType: recommendation.productType, deeplink: recommendation.deeplink, image: recommendation.image.thumbnail, brand: recommendation.brand, imageWidth: this.imageWidth, imageRatio: 1, price: recommendation.price.actual, salePrice: salePrice, responsive: this.isGridMode, dimmedBackground: this.isContinuityMode || this.isSetMode, campaignTypeId: this.campaignTypeId, index: rank, widgetElementId: this.widgetElementId, widgetVersion: this.widgetVersion, basketButtonShow: this.addToBasketShow, mode: this.mode, "data-id": recommendation.productId, updatingAllCards: this.updatingAllCards, defaultAnimationInterval: this.defaultAnimationInterval, updateButtonLocation: this.updateButtonLocation, appliedDiscountPercentage: appliedDiscount, currentDiscountPercentage: this.setModeDiscount, currency: this.currencySign, pricePrefix: this.pricePrefix, locale: this.locale }));
|
|
274
282
|
}
|
|
275
283
|
renderRecommendationGroup(elements) {
|
|
276
284
|
return (h("div", { class: CONTENT_GROUP_CSS_CLASS, part: "items-group" }, ...elements));
|
|
@@ -542,6 +550,21 @@ export class VviinnCarousel {
|
|
|
542
550
|
"text": ""
|
|
543
551
|
}
|
|
544
552
|
},
|
|
553
|
+
"setModeDiscountsArray": {
|
|
554
|
+
"type": "unknown",
|
|
555
|
+
"mutable": false,
|
|
556
|
+
"complexType": {
|
|
557
|
+
"original": "number[]",
|
|
558
|
+
"resolved": "number[]",
|
|
559
|
+
"references": {}
|
|
560
|
+
},
|
|
561
|
+
"required": false,
|
|
562
|
+
"optional": false,
|
|
563
|
+
"docs": {
|
|
564
|
+
"tags": [],
|
|
565
|
+
"text": ""
|
|
566
|
+
}
|
|
567
|
+
},
|
|
545
568
|
"currencySign": {
|
|
546
569
|
"type": "string",
|
|
547
570
|
"mutable": false,
|
|
@@ -609,6 +632,7 @@ export class VviinnCarousel {
|
|
|
609
632
|
"isRTL": {},
|
|
610
633
|
"crossSellingRecommendations": {},
|
|
611
634
|
"setModeDiscount": {},
|
|
635
|
+
"currentDiscountIndex": {},
|
|
612
636
|
"setModeAppliedDiscounts": {}
|
|
613
637
|
};
|
|
614
638
|
}
|
|
@@ -144,6 +144,12 @@ picture::before {
|
|
|
144
144
|
cursor: pointer;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
+
.basket-button-icon-container {
|
|
148
|
+
display: inline-flex;
|
|
149
|
+
align-items: center;
|
|
150
|
+
justify-content: center;
|
|
151
|
+
}
|
|
152
|
+
|
|
147
153
|
.basket-button.basket-button-grid {
|
|
148
154
|
width: 100%;
|
|
149
155
|
background-color: unset;
|
|
@@ -206,15 +212,18 @@ picture::before {
|
|
|
206
212
|
}
|
|
207
213
|
|
|
208
214
|
:host(.set-mode) .basket-button {
|
|
215
|
+
border: none;
|
|
216
|
+
background-color: #f4f4f4;
|
|
217
|
+
font-weight: 500;
|
|
218
|
+
color: #525252;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
:host(.set-mode) .basket-button-container {
|
|
209
222
|
display: flex;
|
|
210
223
|
gap: 8px;
|
|
211
224
|
align-items: center;
|
|
212
225
|
box-sizing: border-box;
|
|
213
226
|
justify-content: center;
|
|
214
|
-
border: none;
|
|
215
|
-
background-color: #f4f4f4;
|
|
216
|
-
font-weight: 500;
|
|
217
|
-
color: #525252;
|
|
218
227
|
}
|
|
219
228
|
|
|
220
229
|
:host(.set-mode:not(.animated)) .basket-button {
|
|
@@ -272,11 +281,15 @@ picture::before {
|
|
|
272
281
|
}
|
|
273
282
|
}
|
|
274
283
|
|
|
275
|
-
:host(.set-mode) .basket-button.
|
|
284
|
+
:host(.set-mode) .basket-button.pressed {
|
|
276
285
|
background: transparent;
|
|
277
286
|
border: 1px solid #e0e0e0;
|
|
278
287
|
}
|
|
279
288
|
|
|
289
|
+
:host(.set-mode) .basket-button.pressed .discount-percentage {
|
|
290
|
+
padding-right: 5px;
|
|
291
|
+
}
|
|
292
|
+
|
|
280
293
|
:host(.set-mode) .basket-button--hidden {
|
|
281
294
|
display: none;
|
|
282
295
|
}
|