vviinn-widgets 2.20.10 → 2.20.12
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-f55c0e81.js → package-f96c1721.js} +1 -1
- package/dist/cjs/vviinn-carousel_3.cjs.entry.js +12 -3
- package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +2 -1
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +3 -1
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +3 -2
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +12 -3
- package/dist/cjs/vviinn-widgets.cjs.js +1 -1
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +19 -1
- package/dist/collection/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.js +2 -0
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +20 -0
- package/dist/collection/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.js +3 -0
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +29 -2
- package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +2 -0
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +20 -1
- package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +4 -2
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +29 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/package-f163c5a6.js +3 -0
- package/dist/esm/vviinn-carousel_3.entry.js +12 -3
- package/dist/esm/vviinn-recommendations-sidebar.entry.js +2 -1
- package/dist/esm/vviinn-vpr-button.entry.js +3 -1
- package/dist/esm/vviinn-vps-button.entry.js +3 -2
- package/dist/esm/vviinn-vps-widget.entry.js +12 -3
- package/dist/esm/vviinn-widgets.js +1 -1
- package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +2 -0
- package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +2 -0
- package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +3 -0
- package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +2 -0
- package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +3 -0
- package/dist/types/components.d.ts +40 -0
- package/dist/vviinn-widgets/p-1886df50.entry.js +1 -0
- package/dist/vviinn-widgets/p-358474f1.js +1 -0
- package/dist/vviinn-widgets/p-98417812.entry.js +1 -0
- package/dist/vviinn-widgets/p-a4fb33ec.entry.js +1 -0
- package/dist/vviinn-widgets/{p-457338d7.entry.js → p-a6b82b81.entry.js} +1 -1
- package/dist/vviinn-widgets/p-ed9a581d.entry.js +1 -0
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/p-1886df50.entry.js +1 -0
- package/www/build/p-358474f1.js +1 -0
- package/www/build/p-40dcfca8.js +1 -0
- package/www/build/p-98417812.entry.js +1 -0
- package/www/build/p-a4fb33ec.entry.js +1 -0
- package/www/build/p-a67898be.css +1 -0
- package/www/build/{p-457338d7.entry.js → p-a6b82b81.entry.js} +1 -1
- package/www/build/p-ed9a581d.entry.js +1 -0
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +2 -2
- package/dist/esm/package-12ef80a5.js +0 -3
- package/dist/vviinn-widgets/p-2e936f87.entry.js +0 -1
- package/dist/vviinn-widgets/p-34d9d4ee.js +0 -1
- package/dist/vviinn-widgets/p-471639bd.entry.js +0 -1
- package/dist/vviinn-widgets/p-e251ded6.entry.js +0 -1
- package/dist/vviinn-widgets/p-e599b49e.entry.js +0 -1
- package/www/build/p-2e936f87.entry.js +0 -1
- package/www/build/p-34d9d4ee.js +0 -1
- package/www/build/p-471639bd.entry.js +0 -1
- package/www/build/p-8744c9af.js +0 -161
- package/www/build/p-e0153ae2.css +0 -6
- package/www/build/p-e251ded6.entry.js +0 -1
- package/www/build/p-e599b49e.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"]}]]],["cropper-handler.cjs",[[1,"cropper-handler",{"handler":[16],"disabled":[4]}]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-carousel_3.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"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"buttonElementId":[1,"button-element-id"],"recommendations":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32]},[[0,"vviinnProductLoad","handleProductLoading"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"]]],[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":[16],"widgetVersion":[1,"widget-version"],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[32]}],[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],"campaignTypeId":[1,"campaign-type-id"],"dimmedBackground":[4,"dimmed-background"],"widgetElementId":[1,"widget-element-id"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"index":[2],"imageLoaded":[32]}]]],["highlight-box_22.cjs",[[1,"vviinn-image-view",{"basicEventData":[16]}],[1,"vviinn-onboarding"],[1,"vviinn-example-images",{"basicEventData":[16]}],[1,"vviinn-overlayed-modal",{"active":[4],"resetState":[16],"buttonElementId":[1,"button-element-id"],"hideBackButton":[4,"hide-back-button"],"widgetVersion":[1,"widget-version"]}],[1,"vviinn-empty-results"],[1,"vviinn-image-selector",{"basicEventData":[16],"startUpload":[4,"start-upload"],"resetVpsButton":[16]}],[1,"vviinn-server-error",{"handler":[16]}],[1,"vviinn-wrong-format",{"handler":[16]}],[1,"search-filters",{"filter":[16],"basicEventData":[16],"selectedFilter":[32],"hideFilters":[32]}],[1,"vviinn-privacy-badge"],[1,"vviinn-teaser"],[1,"image-cropper",{"disabled":[4],"basicEventData":[16],"handleMove":[32]}],[1,"vviinn-example-image",{"src":[1],"width":[2],"height":[2],"basicEventData":[16],"selected":[32]}],[1,"highlight-box"],[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"],"slider":[32]}],[1,"vviinn-onboarding-card-1"],[1,"vviinn-onboarding-card-2"],[1,"vviinn-onboarding-card-3"],[1,"vviinn-overlay"],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32],"isRTL":[32]}]]],["vviinn-vps-widget.cjs",[[1,"vviinn-vps-widget",{"token":[1],"apiPath":[1,"api-path"],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"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]},[[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnImageCrop","trachSearchAreaChanges"],[0,"vviinnSelectObject","trackDetectedObject"],[0,"vviinnSelectFilter","trackFilter"]]]]],["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],"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],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"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"],"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"],"apiPath":[1,"api-path"]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["vviinn-button.cjs",[[1,"vviinn-button",{"addStyle":[4,"add-style"]}]]],["cropper-handler.cjs",[[1,"cropper-handler",{"handler":[16],"disabled":[4]}]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-carousel_3.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"],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"buttonElementId":[1,"button-element-id"],"recommendations":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32]},[[0,"vviinnProductLoad","handleProductLoading"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"]]],[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":[16],"widgetVersion":[1,"widget-version"],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[32]}],[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],"campaignTypeId":[1,"campaign-type-id"],"dimmedBackground":[4,"dimmed-background"],"widgetElementId":[1,"widget-element-id"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"index":[2],"imageLoaded":[32]}]]],["highlight-box_22.cjs",[[1,"vviinn-image-view",{"basicEventData":[16]}],[1,"vviinn-onboarding"],[1,"vviinn-example-images",{"basicEventData":[16]}],[1,"vviinn-overlayed-modal",{"active":[4],"resetState":[16],"buttonElementId":[1,"button-element-id"],"hideBackButton":[4,"hide-back-button"],"widgetVersion":[1,"widget-version"]}],[1,"vviinn-empty-results"],[1,"vviinn-image-selector",{"basicEventData":[16],"startUpload":[4,"start-upload"],"resetVpsButton":[16]}],[1,"vviinn-server-error",{"handler":[16]}],[1,"vviinn-wrong-format",{"handler":[16]}],[1,"search-filters",{"filter":[16],"basicEventData":[16],"selectedFilter":[32],"hideFilters":[32]}],[1,"vviinn-privacy-badge"],[1,"vviinn-teaser"],[1,"image-cropper",{"disabled":[4],"basicEventData":[16],"handleMove":[32]}],[1,"vviinn-example-image",{"src":[1],"width":[2],"height":[2],"basicEventData":[16],"selected":[32]}],[1,"highlight-box"],[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"],"slider":[32]}],[1,"vviinn-onboarding-card-1"],[1,"vviinn-onboarding-card-2"],[1,"vviinn-onboarding-card-3"],[1,"vviinn-overlay"],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32],"isRTL":[32]}]]],["vviinn-vps-widget.cjs",[[1,"vviinn-vps-widget",{"token":[1],"apiPath":[1,"api-path"],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"productDetailNewTab":[4,"product-detail-new-tab"],"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]},[[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnImageCrop","trachSearchAreaChanges"],[0,"vviinnSelectObject","trackDetectedObject"],[0,"vviinnSelectFilter","trackFilter"]]]]],["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],"productDetailNewTab":[4,"product-detail-new-tab"],"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],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"productDetailNewTab":[4,"product-detail-new-tab"],"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"],"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"],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -6,7 +6,7 @@ const index = require('./index-a4becaff.js');
|
|
|
6
6
|
const imageSearch_store = require('./imageSearch.store-fbe0600a.js');
|
|
7
7
|
const index$1 = require('./index-6cfe5293.js');
|
|
8
8
|
const Campaign = require('./Campaign-13258569.js');
|
|
9
|
-
const _package = require('./package-
|
|
9
|
+
const _package = require('./package-f96c1721.js');
|
|
10
10
|
const Handler = require('./Handler-de64afa5.js');
|
|
11
11
|
const index$2 = require('./index-c4851793.js');
|
|
12
12
|
|
|
@@ -1189,6 +1189,7 @@ const VviinnVprWidget = class {
|
|
|
1189
1189
|
this.gridArrowsDynamic = false;
|
|
1190
1190
|
this.noResultText = undefined;
|
|
1191
1191
|
this.noResultShow = true;
|
|
1192
|
+
this.productDetailNewTab = false;
|
|
1192
1193
|
this.apiPath = "https://api.vviinn.com";
|
|
1193
1194
|
this.useCarousel = true;
|
|
1194
1195
|
this.showingInButton = false;
|
|
@@ -1208,6 +1209,14 @@ const VviinnVprWidget = class {
|
|
|
1208
1209
|
widgetVersion: _package.version,
|
|
1209
1210
|
};
|
|
1210
1211
|
}
|
|
1212
|
+
handleOpenLink(deeplink) {
|
|
1213
|
+
if (this.productDetailNewTab) {
|
|
1214
|
+
window.open(deeplink);
|
|
1215
|
+
}
|
|
1216
|
+
else {
|
|
1217
|
+
window.location.href = deeplink;
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1211
1220
|
handleProductIdChange() {
|
|
1212
1221
|
this.getRecommendations();
|
|
1213
1222
|
}
|
|
@@ -1244,11 +1253,11 @@ const VviinnVprWidget = class {
|
|
|
1244
1253
|
.trackEvent(productClickEvent)
|
|
1245
1254
|
.then(this.setTrackingDeactivated)
|
|
1246
1255
|
.finally(() => {
|
|
1247
|
-
|
|
1256
|
+
this.handleOpenLink(product.deeplink);
|
|
1248
1257
|
});
|
|
1249
1258
|
}
|
|
1250
1259
|
else {
|
|
1251
|
-
|
|
1260
|
+
this.handleOpenLink(product.deeplink);
|
|
1252
1261
|
}
|
|
1253
1262
|
}
|
|
1254
1263
|
connectedCallback() {
|
|
@@ -27,6 +27,7 @@ const RecommendationsSidebar = class {
|
|
|
27
27
|
this.noResultText = undefined;
|
|
28
28
|
this.noResultShow = undefined;
|
|
29
29
|
this.gridArrowsDynamic = undefined;
|
|
30
|
+
this.productDetailNewTab = undefined;
|
|
30
31
|
this.apiPath = "https://api.vviinn.com";
|
|
31
32
|
this.buttonElementId = undefined;
|
|
32
33
|
this.widgetVersion = undefined;
|
|
@@ -58,7 +59,7 @@ const RecommendationsSidebar = class {
|
|
|
58
59
|
return (_a = this.el.shadowRoot.querySelector("aside")) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
59
60
|
}
|
|
60
61
|
render() {
|
|
61
|
-
return (index.h(index.Host, { class: this.getClassMap() }, index.h("aside", { class: "sidebar", part: "body", onAnimationEnd: (e) => this.handleAnimationEnd(e) }, index.h("header", { class: { "contains-source-img": this.isSourceImageValid() }, part: "sidebar-header" }, this.isSourceImageValid() ? this.renderSourceImage() : null, index.h("span", { class: "title", part: "title" }, this.sidebarTitle), index.h("button", { class: "close-sidebar", onClick: () => (this.state = "closed") }, index.h(index$1.CrossIcon, null))), index.h("main", { part: "sidebar-content" }, index.h("vviinn-vpr-widget", { exportparts: "brand, currency, deeplink, image, image-link, price-amount, price-container, price-prefix, price-outdated, price-regular, price-sale, title: product-title, carousel-button, product-card, items-group", token: this.token, productId: this.productId, imageWidth: this.imageWidth, blockTitle: "", mode: this.mode, useCarousel: this.position === "bottom", onVviinnRecommendationsLoaded: () => (this.state = "open"), showScroll: this.widgetScrollbar, campaigns: this.campaigns, color: this.color, currencySign: this.currencySign, apiPath: this.apiPath, buttonElementId: this.buttonElementId, noResultText: this.noResultText, noResultShow: this.noResultShow, gridArrowsDynamic: this.gridArrowsDynamic, showingInButton: this.showingInButton })))));
|
|
62
|
+
return (index.h(index.Host, { class: this.getClassMap() }, index.h("aside", { class: "sidebar", part: "body", onAnimationEnd: (e) => this.handleAnimationEnd(e) }, index.h("header", { class: { "contains-source-img": this.isSourceImageValid() }, part: "sidebar-header" }, this.isSourceImageValid() ? this.renderSourceImage() : null, index.h("span", { class: "title", part: "title" }, this.sidebarTitle), index.h("button", { class: "close-sidebar", onClick: () => (this.state = "closed") }, index.h(index$1.CrossIcon, null))), index.h("main", { part: "sidebar-content" }, index.h("vviinn-vpr-widget", { exportparts: "brand, currency, deeplink, image, image-link, price-amount, price-container, price-prefix, price-outdated, price-regular, price-sale, title: product-title, carousel-button, product-card, items-group", token: this.token, productId: this.productId, imageWidth: this.imageWidth, blockTitle: "", mode: this.mode, useCarousel: this.position === "bottom", onVviinnRecommendationsLoaded: () => (this.state = "open"), showScroll: this.widgetScrollbar, campaigns: this.campaigns, color: this.color, currencySign: this.currencySign, apiPath: this.apiPath, buttonElementId: this.buttonElementId, noResultText: this.noResultText, noResultShow: this.noResultShow, gridArrowsDynamic: this.gridArrowsDynamic, showingInButton: this.showingInButton, productDetailNewTab: this.productDetailNewTab })))));
|
|
62
63
|
}
|
|
63
64
|
renderSourceImage() {
|
|
64
65
|
return (index.h("img", { class: "source-image", part: "source-image", src: this.sourceImage }));
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-a4becaff.js');
|
|
6
|
-
const _package = require('./package-
|
|
6
|
+
const _package = require('./package-f96c1721.js');
|
|
7
7
|
const index$1 = require('./index-6cfe5293.js');
|
|
8
8
|
|
|
9
9
|
const vviinnVprButtonCss = ":host{display:block}";
|
|
@@ -38,6 +38,7 @@ const VviinnVprButton = class {
|
|
|
38
38
|
this.noResultText = undefined;
|
|
39
39
|
this.noResultShow = true;
|
|
40
40
|
this.gridArrowsDynamic = false;
|
|
41
|
+
this.productDetailNewTab = false;
|
|
41
42
|
this.apiPath = "https://api.vviinn.com";
|
|
42
43
|
}
|
|
43
44
|
render() {
|
|
@@ -64,6 +65,7 @@ const VviinnVprButton = class {
|
|
|
64
65
|
sidebar.noResultText = this.noResultText;
|
|
65
66
|
sidebar.noResultShow = this.noResultShow;
|
|
66
67
|
sidebar.gridArrowsDynamic = this.gridArrowsDynamic;
|
|
68
|
+
sidebar.productDetailNewTab = this.productDetailNewTab;
|
|
67
69
|
sidebar.widgetVersion = _package.version;
|
|
68
70
|
sidebar.showingInButton = true;
|
|
69
71
|
this.sidebar = sidebar;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-a4becaff.js');
|
|
6
|
-
const _package = require('./package-
|
|
6
|
+
const _package = require('./package-f96c1721.js');
|
|
7
7
|
const index$1 = require('./index-6cfe5293.js');
|
|
8
8
|
const customizedSlots = require('./customized-slots-aee3f39d.js');
|
|
9
9
|
const Campaign = require('./Campaign-13258569.js');
|
|
@@ -40,6 +40,7 @@ const VviinnVpsButton = class {
|
|
|
40
40
|
this.campaignId = undefined;
|
|
41
41
|
this.addStyle = false;
|
|
42
42
|
this.mode = "modal";
|
|
43
|
+
this.productDetailNewTab = true;
|
|
43
44
|
this.apiPath = undefined;
|
|
44
45
|
this.buttonPressed = false;
|
|
45
46
|
}
|
|
@@ -59,7 +60,7 @@ const VviinnVpsButton = class {
|
|
|
59
60
|
render() {
|
|
60
61
|
return (index.h(index.Host, { tabindex: "0", role: "button" }, index.h("vviinn-button", { onClick: () => {
|
|
61
62
|
this.handleClick();
|
|
62
|
-
}, addStyle: this.addStyle, part: "vviinn-button" }, index.h("slot", null, index.h(index$1.CameraIcon, null))), index.h(customizedSlots.SlotSkeleton, null), index.h("vviinn-vps-widget", { mode: this.mode, "currency-sign": this.currencySign, token: this.token, locale: this.locale, apiPath: this.apiPath, exportparts: "brand, deeplink, currency, image, image-link, price-amount-sale, price-amount-outdated, price-amount-regular, price-container, price-outdated, price-regular, price-sale, price-prefix, title, product-card, example-images", campaignId: this.campaignId, showingInButton: true, buttonPressed: this.buttonPressed, resetVpsButton: this.resetButton.bind(this), buttonElementId: this.el.id })));
|
|
63
|
+
}, addStyle: this.addStyle, part: "vviinn-button" }, index.h("slot", null, index.h(index$1.CameraIcon, null))), index.h(customizedSlots.SlotSkeleton, null), index.h("vviinn-vps-widget", { mode: this.mode, "currency-sign": this.currencySign, token: this.token, locale: this.locale, apiPath: this.apiPath, exportparts: "brand, deeplink, currency, image, image-link, price-amount-sale, price-amount-outdated, price-amount-regular, price-container, price-outdated, price-regular, price-sale, price-prefix, title, product-card, example-images", campaignId: this.campaignId, showingInButton: true, buttonPressed: this.buttonPressed, resetVpsButton: this.resetButton.bind(this), buttonElementId: this.el.id, productDetailNewTab: this.productDetailNewTab })));
|
|
63
64
|
}
|
|
64
65
|
get el() { return index.getElement(this); }
|
|
65
66
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-a4becaff.js');
|
|
6
|
-
const _package = require('./package-
|
|
6
|
+
const _package = require('./package-f96c1721.js');
|
|
7
7
|
const imageSearch_store = require('./imageSearch.store-fbe0600a.js');
|
|
8
8
|
const customizedSlots = require('./customized-slots-aee3f39d.js');
|
|
9
9
|
const index$1 = require('./index-c4851793.js');
|
|
@@ -64,6 +64,7 @@ const VviinnVpsWidget = class {
|
|
|
64
64
|
this.currencySign = "€";
|
|
65
65
|
this.locale = "de-DE";
|
|
66
66
|
this.campaignId = undefined;
|
|
67
|
+
this.productDetailNewTab = true;
|
|
67
68
|
this.showingInButton = false;
|
|
68
69
|
this.buttonElementId = undefined;
|
|
69
70
|
this.buttonPressed = undefined;
|
|
@@ -74,6 +75,14 @@ const VviinnVpsWidget = class {
|
|
|
74
75
|
this.wrongImageFormat = false;
|
|
75
76
|
this.trackingDeactivated = false;
|
|
76
77
|
}
|
|
78
|
+
handleOpenLink(deeplink) {
|
|
79
|
+
if (this.productDetailNewTab) {
|
|
80
|
+
window.open(deeplink);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
window.location.href = deeplink;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
77
86
|
componentDidLoad() {
|
|
78
87
|
const slots = this.el.querySelectorAll("[slot]");
|
|
79
88
|
this.globalSlotsChanged.emit(Array.from(slots));
|
|
@@ -116,11 +125,11 @@ const VviinnVpsWidget = class {
|
|
|
116
125
|
.trackEvent(this.trackingDeactivated ? null : productClickEvent)
|
|
117
126
|
.then(this.setTrackingDeactivated)
|
|
118
127
|
.finally(() => {
|
|
119
|
-
|
|
128
|
+
this.handleOpenLink(product.deeplink);
|
|
120
129
|
});
|
|
121
130
|
}
|
|
122
131
|
else {
|
|
123
|
-
|
|
132
|
+
this.handleOpenLink(product.deeplink);
|
|
124
133
|
}
|
|
125
134
|
}
|
|
126
135
|
trachSearchAreaChanges() {
|
|
@@ -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"]}]]],["cropper-handler.cjs",[[1,"cropper-handler",{"handler":[16],"disabled":[4]}]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-carousel_3.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"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"buttonElementId":[1,"button-element-id"],"recommendations":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32]},[[0,"vviinnProductLoad","handleProductLoading"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"]]],[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":[16],"widgetVersion":[1,"widget-version"],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[32]}],[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],"campaignTypeId":[1,"campaign-type-id"],"dimmedBackground":[4,"dimmed-background"],"widgetElementId":[1,"widget-element-id"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"index":[2],"imageLoaded":[32]}]]],["highlight-box_22.cjs",[[1,"vviinn-image-view",{"basicEventData":[16]}],[1,"vviinn-onboarding"],[1,"vviinn-example-images",{"basicEventData":[16]}],[1,"vviinn-overlayed-modal",{"active":[4],"resetState":[16],"buttonElementId":[1,"button-element-id"],"hideBackButton":[4,"hide-back-button"],"widgetVersion":[1,"widget-version"]}],[1,"vviinn-empty-results"],[1,"vviinn-image-selector",{"basicEventData":[16],"startUpload":[4,"start-upload"],"resetVpsButton":[16]}],[1,"vviinn-server-error",{"handler":[16]}],[1,"vviinn-wrong-format",{"handler":[16]}],[1,"search-filters",{"filter":[16],"basicEventData":[16],"selectedFilter":[32],"hideFilters":[32]}],[1,"vviinn-privacy-badge"],[1,"vviinn-teaser"],[1,"image-cropper",{"disabled":[4],"basicEventData":[16],"handleMove":[32]}],[1,"vviinn-example-image",{"src":[1],"width":[2],"height":[2],"basicEventData":[16],"selected":[32]}],[1,"highlight-box"],[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"],"slider":[32]}],[1,"vviinn-onboarding-card-1"],[1,"vviinn-onboarding-card-2"],[1,"vviinn-onboarding-card-3"],[1,"vviinn-overlay"],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32],"isRTL":[32]}]]],["vviinn-vps-widget.cjs",[[1,"vviinn-vps-widget",{"token":[1],"apiPath":[1,"api-path"],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"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]},[[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnImageCrop","trachSearchAreaChanges"],[0,"vviinnSelectObject","trackDetectedObject"],[0,"vviinnSelectFilter","trackFilter"]]]]],["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],"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],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"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"],"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"],"apiPath":[1,"api-path"]}]]]], options);
|
|
23
|
+
return index.bootstrapLazy([["vviinn-button.cjs",[[1,"vviinn-button",{"addStyle":[4,"add-style"]}]]],["cropper-handler.cjs",[[1,"cropper-handler",{"handler":[16],"disabled":[4]}]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-carousel_3.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"],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"buttonElementId":[1,"button-element-id"],"recommendations":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32]},[[0,"vviinnProductLoad","handleProductLoading"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"]]],[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":[16],"widgetVersion":[1,"widget-version"],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[32]}],[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],"campaignTypeId":[1,"campaign-type-id"],"dimmedBackground":[4,"dimmed-background"],"widgetElementId":[1,"widget-element-id"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"index":[2],"imageLoaded":[32]}]]],["highlight-box_22.cjs",[[1,"vviinn-image-view",{"basicEventData":[16]}],[1,"vviinn-onboarding"],[1,"vviinn-example-images",{"basicEventData":[16]}],[1,"vviinn-overlayed-modal",{"active":[4],"resetState":[16],"buttonElementId":[1,"button-element-id"],"hideBackButton":[4,"hide-back-button"],"widgetVersion":[1,"widget-version"]}],[1,"vviinn-empty-results"],[1,"vviinn-image-selector",{"basicEventData":[16],"startUpload":[4,"start-upload"],"resetVpsButton":[16]}],[1,"vviinn-server-error",{"handler":[16]}],[1,"vviinn-wrong-format",{"handler":[16]}],[1,"search-filters",{"filter":[16],"basicEventData":[16],"selectedFilter":[32],"hideFilters":[32]}],[1,"vviinn-privacy-badge"],[1,"vviinn-teaser"],[1,"image-cropper",{"disabled":[4],"basicEventData":[16],"handleMove":[32]}],[1,"vviinn-example-image",{"src":[1],"width":[2],"height":[2],"basicEventData":[16],"selected":[32]}],[1,"highlight-box"],[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"],"slider":[32]}],[1,"vviinn-onboarding-card-1"],[1,"vviinn-onboarding-card-2"],[1,"vviinn-onboarding-card-3"],[1,"vviinn-overlay"],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32],"isRTL":[32]}]]],["vviinn-vps-widget.cjs",[[1,"vviinn-vps-widget",{"token":[1],"apiPath":[1,"api-path"],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"productDetailNewTab":[4,"product-detail-new-tab"],"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]},[[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnImageCrop","trachSearchAreaChanges"],[0,"vviinnSelectObject","trackDetectedObject"],[0,"vviinnSelectFilter","trackFilter"]]]]],["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],"productDetailNewTab":[4,"product-detail-new-tab"],"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],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"productDetailNewTab":[4,"product-detail-new-tab"],"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"],"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"],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"]}]]]], options);
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
exports.setNonce = index.setNonce;
|
|
@@ -18,6 +18,7 @@ export class RecommendationsSidebar {
|
|
|
18
18
|
this.noResultText = undefined;
|
|
19
19
|
this.noResultShow = undefined;
|
|
20
20
|
this.gridArrowsDynamic = undefined;
|
|
21
|
+
this.productDetailNewTab = undefined;
|
|
21
22
|
this.apiPath = "https://api.vviinn.com";
|
|
22
23
|
this.buttonElementId = undefined;
|
|
23
24
|
this.widgetVersion = undefined;
|
|
@@ -49,7 +50,7 @@ export class RecommendationsSidebar {
|
|
|
49
50
|
return (_a = this.el.shadowRoot.querySelector("aside")) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
50
51
|
}
|
|
51
52
|
render() {
|
|
52
|
-
return (h(Host, { class: this.getClassMap() }, h("aside", { class: "sidebar", part: "body", onAnimationEnd: (e) => this.handleAnimationEnd(e) }, h("header", { class: { "contains-source-img": this.isSourceImageValid() }, part: "sidebar-header" }, this.isSourceImageValid() ? this.renderSourceImage() : null, h("span", { class: "title", part: "title" }, this.sidebarTitle), h("button", { class: "close-sidebar", onClick: () => (this.state = "closed") }, h(CrossIcon, null))), h("main", { part: "sidebar-content" }, h("vviinn-vpr-widget", { exportparts: "brand, currency, deeplink, image, image-link, price-amount, price-container, price-prefix, price-outdated, price-regular, price-sale, title: product-title, carousel-button, product-card, items-group", token: this.token, productId: this.productId, imageWidth: this.imageWidth, blockTitle: "", mode: this.mode, useCarousel: this.position === "bottom", onVviinnRecommendationsLoaded: () => (this.state = "open"), showScroll: this.widgetScrollbar, campaigns: this.campaigns, color: this.color, currencySign: this.currencySign, apiPath: this.apiPath, buttonElementId: this.buttonElementId, noResultText: this.noResultText, noResultShow: this.noResultShow, gridArrowsDynamic: this.gridArrowsDynamic, showingInButton: this.showingInButton })))));
|
|
53
|
+
return (h(Host, { class: this.getClassMap() }, h("aside", { class: "sidebar", part: "body", onAnimationEnd: (e) => this.handleAnimationEnd(e) }, h("header", { class: { "contains-source-img": this.isSourceImageValid() }, part: "sidebar-header" }, this.isSourceImageValid() ? this.renderSourceImage() : null, h("span", { class: "title", part: "title" }, this.sidebarTitle), h("button", { class: "close-sidebar", onClick: () => (this.state = "closed") }, h(CrossIcon, null))), h("main", { part: "sidebar-content" }, h("vviinn-vpr-widget", { exportparts: "brand, currency, deeplink, image, image-link, price-amount, price-container, price-prefix, price-outdated, price-regular, price-sale, title: product-title, carousel-button, product-card, items-group", token: this.token, productId: this.productId, imageWidth: this.imageWidth, blockTitle: "", mode: this.mode, useCarousel: this.position === "bottom", onVviinnRecommendationsLoaded: () => (this.state = "open"), showScroll: this.widgetScrollbar, campaigns: this.campaigns, color: this.color, currencySign: this.currencySign, apiPath: this.apiPath, buttonElementId: this.buttonElementId, noResultText: this.noResultText, noResultShow: this.noResultShow, gridArrowsDynamic: this.gridArrowsDynamic, showingInButton: this.showingInButton, productDetailNewTab: this.productDetailNewTab })))));
|
|
53
54
|
}
|
|
54
55
|
renderSourceImage() {
|
|
55
56
|
return (h("img", { class: "source-image", part: "source-image", src: this.sourceImage }));
|
|
@@ -356,6 +357,23 @@ export class RecommendationsSidebar {
|
|
|
356
357
|
"attribute": "grid-arrows-dynamic",
|
|
357
358
|
"reflect": false
|
|
358
359
|
},
|
|
360
|
+
"productDetailNewTab": {
|
|
361
|
+
"type": "boolean",
|
|
362
|
+
"mutable": false,
|
|
363
|
+
"complexType": {
|
|
364
|
+
"original": "boolean",
|
|
365
|
+
"resolved": "boolean",
|
|
366
|
+
"references": {}
|
|
367
|
+
},
|
|
368
|
+
"required": false,
|
|
369
|
+
"optional": false,
|
|
370
|
+
"docs": {
|
|
371
|
+
"tags": [],
|
|
372
|
+
"text": "Condition to open product link in new tab or not"
|
|
373
|
+
},
|
|
374
|
+
"attribute": "product-detail-new-tab",
|
|
375
|
+
"reflect": false
|
|
376
|
+
},
|
|
359
377
|
"apiPath": {
|
|
360
378
|
"type": "string",
|
|
361
379
|
"mutable": false,
|
|
@@ -76,6 +76,7 @@ const Template = (args) => `<style>
|
|
|
76
76
|
modal-scrollbar="${args.modalScrollbar}"
|
|
77
77
|
mode="${args.mode}"
|
|
78
78
|
campaigns="${args.campaigns}"
|
|
79
|
+
product-detail-new-tab="${args.productDetailNewTab}"
|
|
79
80
|
image-width="${args.imageWidth}"
|
|
80
81
|
source-image="${args.sourceImage}"
|
|
81
82
|
color="${args.color ? args.color.toString().slice(1) : ""}"
|
|
@@ -107,6 +108,7 @@ Default.args = {
|
|
|
107
108
|
noResultText: "No results! Please, try again later.",
|
|
108
109
|
noResultShow: true,
|
|
109
110
|
gridArrowsDynamic: false,
|
|
111
|
+
productDetailNewTab: false,
|
|
110
112
|
};
|
|
111
113
|
Default.parameters = {
|
|
112
114
|
design: {
|
|
@@ -27,6 +27,7 @@ export class VviinnVprButton {
|
|
|
27
27
|
this.noResultText = undefined;
|
|
28
28
|
this.noResultShow = true;
|
|
29
29
|
this.gridArrowsDynamic = false;
|
|
30
|
+
this.productDetailNewTab = false;
|
|
30
31
|
this.apiPath = "https://api.vviinn.com";
|
|
31
32
|
}
|
|
32
33
|
render() {
|
|
@@ -53,6 +54,7 @@ export class VviinnVprButton {
|
|
|
53
54
|
sidebar.noResultText = this.noResultText;
|
|
54
55
|
sidebar.noResultShow = this.noResultShow;
|
|
55
56
|
sidebar.gridArrowsDynamic = this.gridArrowsDynamic;
|
|
57
|
+
sidebar.productDetailNewTab = this.productDetailNewTab;
|
|
56
58
|
sidebar.widgetVersion = version;
|
|
57
59
|
sidebar.showingInButton = true;
|
|
58
60
|
this.sidebar = sidebar;
|
|
@@ -373,6 +375,24 @@ export class VviinnVprButton {
|
|
|
373
375
|
"reflect": false,
|
|
374
376
|
"defaultValue": "false"
|
|
375
377
|
},
|
|
378
|
+
"productDetailNewTab": {
|
|
379
|
+
"type": "boolean",
|
|
380
|
+
"mutable": false,
|
|
381
|
+
"complexType": {
|
|
382
|
+
"original": "boolean",
|
|
383
|
+
"resolved": "boolean",
|
|
384
|
+
"references": {}
|
|
385
|
+
},
|
|
386
|
+
"required": false,
|
|
387
|
+
"optional": false,
|
|
388
|
+
"docs": {
|
|
389
|
+
"tags": [],
|
|
390
|
+
"text": "Condition to open product link in new tab or not"
|
|
391
|
+
},
|
|
392
|
+
"attribute": "product-detail-new-tab",
|
|
393
|
+
"reflect": false,
|
|
394
|
+
"defaultValue": "false"
|
|
395
|
+
},
|
|
376
396
|
"apiPath": {
|
|
377
397
|
"type": "string",
|
|
378
398
|
"mutable": false,
|
|
@@ -152,6 +152,7 @@ const Template = (args) => `
|
|
|
152
152
|
image-width="${args.imageWidth}"
|
|
153
153
|
campaign-type="${args.campaignType}"
|
|
154
154
|
campaigns="${args.campaigns}"
|
|
155
|
+
product-detail-new-tab="${args.productDetailNewTab}"
|
|
155
156
|
color="${args.color ? args.color.slice(1) : ""}"
|
|
156
157
|
grid-arrows-dynamic="${args.gridArrowsDynamic}"
|
|
157
158
|
no-result-text="${args.noResultText}"
|
|
@@ -184,6 +185,7 @@ Continuity.args = {
|
|
|
184
185
|
currencySign: "€",
|
|
185
186
|
pricePrefix: "",
|
|
186
187
|
imageRatio: 1,
|
|
188
|
+
productDetailNewTab: false,
|
|
187
189
|
noResultText: "No results! Please, try again later.",
|
|
188
190
|
noResultShow: true,
|
|
189
191
|
gridArrowsDynamic: false,
|
|
@@ -216,6 +218,7 @@ Grid.args = {
|
|
|
216
218
|
currencySign: "€",
|
|
217
219
|
pricePrefix: "",
|
|
218
220
|
imageRatio: 1,
|
|
221
|
+
productDetailNewTab: false,
|
|
219
222
|
noResultText: "No results! Please, try again later.",
|
|
220
223
|
noResultShow: true,
|
|
221
224
|
gridArrowsDynamic: false,
|
|
@@ -66,6 +66,7 @@ export class VviinnVprWidget {
|
|
|
66
66
|
this.gridArrowsDynamic = false;
|
|
67
67
|
this.noResultText = undefined;
|
|
68
68
|
this.noResultShow = true;
|
|
69
|
+
this.productDetailNewTab = false;
|
|
69
70
|
this.apiPath = "https://api.vviinn.com";
|
|
70
71
|
this.useCarousel = true;
|
|
71
72
|
this.showingInButton = false;
|
|
@@ -85,6 +86,14 @@ export class VviinnVprWidget {
|
|
|
85
86
|
widgetVersion: version,
|
|
86
87
|
};
|
|
87
88
|
}
|
|
89
|
+
handleOpenLink(deeplink) {
|
|
90
|
+
if (this.productDetailNewTab) {
|
|
91
|
+
window.open(deeplink);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
window.location.href = deeplink;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
88
97
|
handleProductIdChange() {
|
|
89
98
|
this.getRecommendations();
|
|
90
99
|
}
|
|
@@ -121,11 +130,11 @@ export class VviinnVprWidget {
|
|
|
121
130
|
.trackEvent(productClickEvent)
|
|
122
131
|
.then(this.setTrackingDeactivated)
|
|
123
132
|
.finally(() => {
|
|
124
|
-
|
|
133
|
+
this.handleOpenLink(product.deeplink);
|
|
125
134
|
});
|
|
126
135
|
}
|
|
127
136
|
else {
|
|
128
|
-
|
|
137
|
+
this.handleOpenLink(product.deeplink);
|
|
129
138
|
}
|
|
130
139
|
}
|
|
131
140
|
connectedCallback() {
|
|
@@ -512,6 +521,24 @@ export class VviinnVprWidget {
|
|
|
512
521
|
"reflect": false,
|
|
513
522
|
"defaultValue": "true"
|
|
514
523
|
},
|
|
524
|
+
"productDetailNewTab": {
|
|
525
|
+
"type": "boolean",
|
|
526
|
+
"mutable": false,
|
|
527
|
+
"complexType": {
|
|
528
|
+
"original": "boolean",
|
|
529
|
+
"resolved": "boolean",
|
|
530
|
+
"references": {}
|
|
531
|
+
},
|
|
532
|
+
"required": false,
|
|
533
|
+
"optional": false,
|
|
534
|
+
"docs": {
|
|
535
|
+
"tags": [],
|
|
536
|
+
"text": "Condition to open product link in new tab or not"
|
|
537
|
+
},
|
|
538
|
+
"attribute": "product-detail-new-tab",
|
|
539
|
+
"reflect": false,
|
|
540
|
+
"defaultValue": "false"
|
|
541
|
+
},
|
|
515
542
|
"apiPath": {
|
|
516
543
|
"type": "string",
|
|
517
544
|
"mutable": false,
|
|
@@ -30,12 +30,14 @@ const Template = (args) => `
|
|
|
30
30
|
currency-sign="${args.currencySign}"
|
|
31
31
|
locale="${args.locale}"
|
|
32
32
|
mode="${args.mode}"
|
|
33
|
+
product-detail-new-tab="${args.productDetailNewTab}"
|
|
33
34
|
></vviinn-vps-button>`;
|
|
34
35
|
export const Default = Template.bind({});
|
|
35
36
|
Default.args = {
|
|
36
37
|
token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOjgzLCJqdGkiOiI3ZTg2Y2I1YS00ZTFjLTRhYjctYjU2My1lN2FjMTYzZTYyZDIiLCJzY29wZXMiOlsidnByIiwidnBzIiwidnBjIl19.SbaQnBkvoXer3GPCWUthFQStFKLHZNMBfj4Qu44WHM8nzaIt48I74yVy4gVbX29vtd6jIkDPdakqEXRXmAxOCtv7_nsd4iBs1yMegfOWW5g8f10PKfZqmWJcfhwKIEElnUMFmP6rXpogntZ7iFfeTBbiRNzQPhkaa7jUjgQkCC4",
|
|
37
38
|
apiPath: "https://api.vviinn.com",
|
|
38
39
|
campaignId: "",
|
|
40
|
+
productDetailNewTab: true,
|
|
39
41
|
addStyle: true,
|
|
40
42
|
currencySign: "€",
|
|
41
43
|
locale: "en-US",
|
|
@@ -53,6 +53,7 @@ export class VviinnVpsButton {
|
|
|
53
53
|
this.campaignId = undefined;
|
|
54
54
|
this.addStyle = false;
|
|
55
55
|
this.mode = "modal";
|
|
56
|
+
this.productDetailNewTab = true;
|
|
56
57
|
this.apiPath = undefined;
|
|
57
58
|
this.buttonPressed = false;
|
|
58
59
|
}
|
|
@@ -72,7 +73,7 @@ export class VviinnVpsButton {
|
|
|
72
73
|
render() {
|
|
73
74
|
return (h(Host, { tabindex: "0", role: "button" }, h("vviinn-button", { onClick: () => {
|
|
74
75
|
this.handleClick();
|
|
75
|
-
}, addStyle: this.addStyle, part: "vviinn-button" }, h("slot", null, h(CameraIcon, null))), h(SlotSkeleton, null), h("vviinn-vps-widget", { mode: this.mode, "currency-sign": this.currencySign, token: this.token, locale: this.locale, apiPath: this.apiPath, exportparts: "brand, deeplink, currency, image, image-link, price-amount-sale, price-amount-outdated, price-amount-regular, price-container, price-outdated, price-regular, price-sale, price-prefix, title, product-card, example-images", campaignId: this.campaignId, showingInButton: true, buttonPressed: this.buttonPressed, resetVpsButton: this.resetButton.bind(this), buttonElementId: this.el.id })));
|
|
76
|
+
}, addStyle: this.addStyle, part: "vviinn-button" }, h("slot", null, h(CameraIcon, null))), h(SlotSkeleton, null), h("vviinn-vps-widget", { mode: this.mode, "currency-sign": this.currencySign, token: this.token, locale: this.locale, apiPath: this.apiPath, exportparts: "brand, deeplink, currency, image, image-link, price-amount-sale, price-amount-outdated, price-amount-regular, price-container, price-outdated, price-regular, price-sale, price-prefix, title, product-card, example-images", campaignId: this.campaignId, showingInButton: true, buttonPressed: this.buttonPressed, resetVpsButton: this.resetButton.bind(this), buttonElementId: this.el.id, productDetailNewTab: this.productDetailNewTab })));
|
|
76
77
|
}
|
|
77
78
|
static get is() { return "vviinn-vps-button"; }
|
|
78
79
|
static get encapsulation() { return "shadow"; }
|
|
@@ -194,6 +195,24 @@ export class VviinnVpsButton {
|
|
|
194
195
|
"reflect": false,
|
|
195
196
|
"defaultValue": "\"modal\""
|
|
196
197
|
},
|
|
198
|
+
"productDetailNewTab": {
|
|
199
|
+
"type": "boolean",
|
|
200
|
+
"mutable": false,
|
|
201
|
+
"complexType": {
|
|
202
|
+
"original": "boolean",
|
|
203
|
+
"resolved": "boolean",
|
|
204
|
+
"references": {}
|
|
205
|
+
},
|
|
206
|
+
"required": false,
|
|
207
|
+
"optional": false,
|
|
208
|
+
"docs": {
|
|
209
|
+
"tags": [],
|
|
210
|
+
"text": "Condition to open product link in new tab or not"
|
|
211
|
+
},
|
|
212
|
+
"attribute": "product-detail-new-tab",
|
|
213
|
+
"reflect": false,
|
|
214
|
+
"defaultValue": "true"
|
|
215
|
+
},
|
|
197
216
|
"apiPath": {
|
|
198
217
|
"type": "string",
|
|
199
218
|
"mutable": false,
|
|
@@ -7,19 +7,21 @@ export default {
|
|
|
7
7
|
},
|
|
8
8
|
},
|
|
9
9
|
};
|
|
10
|
-
const Template = ({ token, apiPath, campaignId, currencySign, locale, active, }) => `
|
|
10
|
+
const Template = ({ token, apiPath, campaignId, currencySign, locale, active, productDetailNewTab, }) => `
|
|
11
11
|
<vviinn-vps-widget token="${token}"
|
|
12
12
|
api-path="${apiPath}"
|
|
13
13
|
campaign-id="${campaignId}"
|
|
14
14
|
currency-sign="${currencySign}"
|
|
15
15
|
locale="${locale}"
|
|
16
|
-
active="${active}"
|
|
16
|
+
active="${active}"
|
|
17
|
+
product-detail-new-tab="${productDetailNewTab}">
|
|
17
18
|
</vviinn-vps-widget>`;
|
|
18
19
|
export const Default = Template.bind({});
|
|
19
20
|
Default.args = {
|
|
20
21
|
token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOjgzLCJqdGkiOiI3ZTg2Y2I1YS00ZTFjLTRhYjctYjU2My1lN2FjMTYzZTYyZDIiLCJzY29wZXMiOlsidnByIiwidnBzIiwidnBjIl19.SbaQnBkvoXer3GPCWUthFQStFKLHZNMBfj4Qu44WHM8nzaIt48I74yVy4gVbX29vtd6jIkDPdakqEXRXmAxOCtv7_nsd4iBs1yMegfOWW5g8f10PKfZqmWJcfhwKIEElnUMFmP6rXpogntZ7iFfeTBbiRNzQPhkaa7jUjgQkCC4",
|
|
21
22
|
apiPath: "https://api.vviinn.com",
|
|
22
23
|
campaignId: "",
|
|
24
|
+
productDetailNewTab: true,
|
|
23
25
|
currencySign: "€",
|
|
24
26
|
locale: "en-US",
|
|
25
27
|
active: true,
|
|
@@ -94,6 +94,7 @@ export class VviinnVpsWidget {
|
|
|
94
94
|
this.currencySign = "€";
|
|
95
95
|
this.locale = "de-DE";
|
|
96
96
|
this.campaignId = undefined;
|
|
97
|
+
this.productDetailNewTab = true;
|
|
97
98
|
this.showingInButton = false;
|
|
98
99
|
this.buttonElementId = undefined;
|
|
99
100
|
this.buttonPressed = undefined;
|
|
@@ -104,6 +105,14 @@ export class VviinnVpsWidget {
|
|
|
104
105
|
this.wrongImageFormat = false;
|
|
105
106
|
this.trackingDeactivated = false;
|
|
106
107
|
}
|
|
108
|
+
handleOpenLink(deeplink) {
|
|
109
|
+
if (this.productDetailNewTab) {
|
|
110
|
+
window.open(deeplink);
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
window.location.href = deeplink;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
107
116
|
componentDidLoad() {
|
|
108
117
|
const slots = this.el.querySelectorAll("[slot]");
|
|
109
118
|
this.globalSlotsChanged.emit(Array.from(slots));
|
|
@@ -146,11 +155,11 @@ export class VviinnVpsWidget {
|
|
|
146
155
|
.trackEvent(this.trackingDeactivated ? null : productClickEvent)
|
|
147
156
|
.then(this.setTrackingDeactivated)
|
|
148
157
|
.finally(() => {
|
|
149
|
-
|
|
158
|
+
this.handleOpenLink(product.deeplink);
|
|
150
159
|
});
|
|
151
160
|
}
|
|
152
161
|
else {
|
|
153
|
-
|
|
162
|
+
this.handleOpenLink(product.deeplink);
|
|
154
163
|
}
|
|
155
164
|
}
|
|
156
165
|
trachSearchAreaChanges() {
|
|
@@ -413,6 +422,24 @@ export class VviinnVpsWidget {
|
|
|
413
422
|
"attribute": "campaign-id",
|
|
414
423
|
"reflect": false
|
|
415
424
|
},
|
|
425
|
+
"productDetailNewTab": {
|
|
426
|
+
"type": "boolean",
|
|
427
|
+
"mutable": false,
|
|
428
|
+
"complexType": {
|
|
429
|
+
"original": "boolean",
|
|
430
|
+
"resolved": "boolean",
|
|
431
|
+
"references": {}
|
|
432
|
+
},
|
|
433
|
+
"required": false,
|
|
434
|
+
"optional": false,
|
|
435
|
+
"docs": {
|
|
436
|
+
"tags": [],
|
|
437
|
+
"text": "Condition to open product link in new tab or not"
|
|
438
|
+
},
|
|
439
|
+
"attribute": "product-detail-new-tab",
|
|
440
|
+
"reflect": false,
|
|
441
|
+
"defaultValue": "true"
|
|
442
|
+
},
|
|
416
443
|
"showingInButton": {
|
|
417
444
|
"type": "boolean",
|
|
418
445
|
"mutable": false,
|