vviinn-widgets 2.60.0 → 2.61.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-3f1f2d26.js → package-e4e48554.js} +1 -1
- package/dist/cjs/vviinn-carousel_6.cjs.entry.js +6 -3
- package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +3 -2
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +5 -3
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +4 -3
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +6 -3
- package/dist/cjs/vviinn-widgets.cjs.js +1 -1
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +22 -4
- package/dist/collection/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.js +4 -2
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +24 -4
- package/dist/collection/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.js +8 -4
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.js +25 -4
- package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +6 -3
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +23 -4
- 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 +25 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-8e0d9aa5.js → package-40c36f57.js} +1 -1
- package/dist/esm/vviinn-carousel_6.entry.js +6 -3
- package/dist/esm/vviinn-recommendations-sidebar.entry.js +3 -2
- package/dist/esm/vviinn-vpr-button.entry.js +5 -3
- package/dist/esm/vviinn-vps-button.entry.js +4 -3
- package/dist/esm/vviinn-vps-widget.entry.js +6 -3
- package/dist/esm/vviinn-widgets.js +1 -1
- package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +3 -1
- package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +3 -1
- package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-widget.d.ts +3 -1
- package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +3 -1
- package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +3 -1
- package/dist/types/components.d.ts +50 -10
- package/dist/vviinn-widgets/p-03c79875.entry.js +1 -0
- package/dist/vviinn-widgets/p-049d7e5f.entry.js +1 -0
- package/dist/vviinn-widgets/p-7f7952f6.js +1 -0
- package/{www/build/p-39085f69.entry.js → dist/vviinn-widgets/p-97dbb018.entry.js} +1 -1
- package/{www/build/p-0312affe.entry.js → dist/vviinn-widgets/p-be6f0402.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-8e892c5c.entry.js → p-c5c5cf6a.entry.js} +1 -1
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/p-03c79875.entry.js +1 -0
- package/www/build/p-049d7e5f.entry.js +1 -0
- package/www/build/p-7f7952f6.js +1 -0
- package/{dist/vviinn-widgets/p-39085f69.entry.js → www/build/p-97dbb018.entry.js} +1 -1
- package/{dist/vviinn-widgets/p-0312affe.entry.js → www/build/p-be6f0402.entry.js} +1 -1
- package/www/build/{p-8e892c5c.entry.js → p-c5c5cf6a.entry.js} +1 -1
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/dist/vviinn-widgets/p-928bdf4f.entry.js +0 -1
- package/dist/vviinn-widgets/p-b9905744.entry.js +0 -1
- package/dist/vviinn-widgets/p-d2e14366.js +0 -1
- package/www/build/p-928bdf4f.entry.js +0 -1
- package/www/build/p-b9905744.entry.js +0 -1
- package/www/build/p-d2e14366.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_6.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],"
|
|
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_6.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],"productDetailsNewTab":[4,"product-details-new-tab"],"productDetailsRedirect":[4,"product-details-redirect"],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"showFilters":[4,"show-filters"],"showExtendedFilters":[4,"show-extended-filters"],"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],"dynamicFilters":[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,"vviinnFiltersChanged","filtersChanged"]]],[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-extended-filters",{"filters":[16],"filtersString":[1,"filters-string"],"locale":[1],"requestFilters":[32],"showMore":[32],"selectedMoreOptions":[32]}],[1,"vviinn-filters",{"filters":[16],"filtersString":[1,"filters-string"],"selectedFilter":[32],"requestFilters":[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],"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],"productDetailsNewTab":[4,"product-details-new-tab"],"productDetailsRedirect":[4,"product-details-redirect"],"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],"productDetailsNewTab":[4,"product-details-new-tab"],"productDetailsRedirect":[4,"product-details-redirect"],"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],"productDetailsNewTab":[4,"product-details-new-tab"],"productDetailsRedirect":[4,"product-details-redirect"],"addToBasketShow":[4,"add-to-basket-show"],"showFilters":[4,"show-filters"],"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],"productDetailsNewTab":[4,"product-details-new-tab"],"productDetailsRedirect":[4,"product-details-redirect"],"addToBasketShow":[4,"add-to-basket-show"],"showFilters":[4,"show-filters"],"apiPath":[1,"api-path"]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -8,7 +8,7 @@ const customizedSlots = require('./customized-slots-dacb282b.js');
|
|
|
8
8
|
const i18next = require('./i18next-74ff3413.js');
|
|
9
9
|
const index$1 = require('./index-c33ee22e.js');
|
|
10
10
|
const PlusIcon = require('./PlusIcon-835a5dcc.js');
|
|
11
|
-
const _package = require('./package-
|
|
11
|
+
const _package = require('./package-e4e48554.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" },
|
|
14
14
|
index.h("path", { d: "M7.5 22C6.95 22 6.47917 21.8042 6.0875 21.4125C5.69583 21.0208 5.5 20.55 5.5 20C5.5 19.45 5.69583 18.9792 6.0875 18.5875C6.47917 18.1958 6.95 18 7.5 18C8.05 18 8.52083 18.1958 8.9125 18.5875C9.30417 18.9792 9.5 19.45 9.5 20C9.5 20.55 9.30417 21.0208 8.9125 21.4125C8.52083 21.8042 8.05 22 7.5 22ZM17.5 22C16.95 22 16.4792 21.8042 16.0875 21.4125C15.6958 21.0208 15.5 20.55 15.5 20C15.5 19.45 15.6958 18.9792 16.0875 18.5875C16.4792 18.1958 16.95 18 17.5 18C18.05 18 18.5208 18.1958 18.9125 18.5875C19.3042 18.9792 19.5 19.45 19.5 20C19.5 20.55 19.3042 21.0208 18.9125 21.4125C18.5208 21.8042 18.05 22 17.5 22ZM6.65 6L9.05 11H16.05L18.8 6H6.65ZM5.7 4H20.45C20.8333 4 21.125 4.17083 21.325 4.5125C21.525 4.85417 21.5333 5.2 21.35 5.55L17.8 11.95C17.6167 12.2833 17.3708 12.5417 17.0625 12.725C16.7542 12.9083 16.4167 13 16.05 13H8.6L7.5 15H18.5C18.7833 15 19.0208 15.0958 19.2125 15.2875C19.4042 15.4792 19.5 15.7167 19.5 16C19.5 16.2833 19.4042 16.5208 19.2125 16.7125C19.0208 16.9042 18.7833 17 18.5 17H7.5C6.75 17 6.18333 16.6708 5.8 16.0125C5.41667 15.3542 5.4 14.7 5.75 14.05L7.1 11.6L3.5 4H2.5C2.21667 4 1.97917 3.90417 1.7875 3.7125C1.59583 3.52083 1.5 3.28333 1.5 3C1.5 2.71667 1.59583 2.47917 1.7875 2.2875C1.97917 2.09583 2.21667 2 2.5 2H4.125C4.30833 2 4.48333 2.05 4.65 2.15C4.81667 2.25 4.94167 2.39167 5.025 2.575L5.7 4Z", fill: "#525252" })));
|
|
@@ -1694,7 +1694,8 @@ const VviinnVprWidget = class {
|
|
|
1694
1694
|
this.showScroll = true;
|
|
1695
1695
|
this.cssUrl = null;
|
|
1696
1696
|
this.excluded = "";
|
|
1697
|
-
this.
|
|
1697
|
+
this.productDetailsNewTab = false;
|
|
1698
|
+
this.productDetailsRedirect = true;
|
|
1698
1699
|
this.addToBasketShow = false;
|
|
1699
1700
|
this.updateButtonLocation = "topAndItem";
|
|
1700
1701
|
this.showFilters = false;
|
|
@@ -1725,7 +1726,9 @@ const VviinnVprWidget = class {
|
|
|
1725
1726
|
};
|
|
1726
1727
|
}
|
|
1727
1728
|
handleOpenLink(deeplink, event) {
|
|
1728
|
-
if (this.
|
|
1729
|
+
if (!this.productDetailsRedirect)
|
|
1730
|
+
return;
|
|
1731
|
+
if (this.productDetailsNewTab || event.ctrlKey || event.metaKey) {
|
|
1729
1732
|
let newTab = window.open();
|
|
1730
1733
|
if (newTab) {
|
|
1731
1734
|
newTab.location.href = deeplink;
|
|
@@ -30,7 +30,8 @@ const RecommendationsSidebar = class {
|
|
|
30
30
|
this.noResultShow = undefined;
|
|
31
31
|
this.gridArrowsDynamic = undefined;
|
|
32
32
|
this.excluded = undefined;
|
|
33
|
-
this.
|
|
33
|
+
this.productDetailsNewTab = undefined;
|
|
34
|
+
this.productDetailsRedirect = undefined;
|
|
34
35
|
this.addToBasketShow = false;
|
|
35
36
|
this.showFilters = false;
|
|
36
37
|
this.buttonChildren = undefined;
|
|
@@ -74,7 +75,7 @@ const RecommendationsSidebar = class {
|
|
|
74
75
|
});
|
|
75
76
|
}
|
|
76
77
|
render() {
|
|
77
|
-
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(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, "campaign-type": this.campaignType, useCarousel: this.position === "bottom", onVviinnRecommendationsLoaded: () => (this.state = "open"), showScroll: this.widgetScrollbar, campaigns: this.campaigns, color: this.color, currencySign: this.currencySign, apiPath: this.apiPath, locale: this.locale, buttonElementId: this.buttonElementId, noResultText: this.noResultText, noResultShow: this.noResultShow, gridArrowsDynamic: this.gridArrowsDynamic, showingInButton: this.showingInButton, excluded: this.excluded,
|
|
78
|
+
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(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, "campaign-type": this.campaignType, useCarousel: this.position === "bottom", onVviinnRecommendationsLoaded: () => (this.state = "open"), showScroll: this.widgetScrollbar, campaigns: this.campaigns, color: this.color, currencySign: this.currencySign, apiPath: this.apiPath, locale: this.locale, buttonElementId: this.buttonElementId, noResultText: this.noResultText, noResultShow: this.noResultShow, gridArrowsDynamic: this.gridArrowsDynamic, showingInButton: this.showingInButton, excluded: this.excluded, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, closed: this.state === "closed", opened: this.state === "open", addToBasketShow: this.addToBasketShow, showFilters: this.showFilters })))));
|
|
78
79
|
}
|
|
79
80
|
renderSourceImage() {
|
|
80
81
|
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-4474431a.js');
|
|
6
|
-
const _package = require('./package-
|
|
6
|
+
const _package = require('./package-e4e48554.js');
|
|
7
7
|
const VisualSearchIcon = require('./VisualSearchIcon-f435f5b0.js');
|
|
8
8
|
|
|
9
9
|
const vviinnVprButtonCss = ":host{display:block}";
|
|
@@ -43,7 +43,8 @@ const VviinnVprButton = class {
|
|
|
43
43
|
this.noResultShow = true;
|
|
44
44
|
this.gridArrowsDynamic = false;
|
|
45
45
|
this.excluded = "";
|
|
46
|
-
this.
|
|
46
|
+
this.productDetailsNewTab = false;
|
|
47
|
+
this.productDetailsRedirect = true;
|
|
47
48
|
this.addToBasketShow = false;
|
|
48
49
|
this.showFilters = false;
|
|
49
50
|
this.apiPath = "https://api.vviinn.com";
|
|
@@ -73,7 +74,8 @@ const VviinnVprButton = class {
|
|
|
73
74
|
sidebar.noResultText = this.noResultText;
|
|
74
75
|
sidebar.noResultShow = this.noResultShow;
|
|
75
76
|
sidebar.gridArrowsDynamic = this.gridArrowsDynamic;
|
|
76
|
-
sidebar.
|
|
77
|
+
sidebar.productDetailsNewTab = this.productDetailsNewTab;
|
|
78
|
+
sidebar.productDetailsRedirect = this.productDetailsRedirect;
|
|
77
79
|
sidebar.widgetVersion = _package.version;
|
|
78
80
|
sidebar.showingInButton = true;
|
|
79
81
|
sidebar.excluded = this.excluded;
|
|
@@ -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-e4e48554.js');
|
|
7
7
|
const customizedSlots = require('./customized-slots-dacb282b.js');
|
|
8
8
|
const constants = require('./constants-7684cbfc.js');
|
|
9
9
|
|
|
@@ -45,7 +45,8 @@ const VviinnVpsButton = class {
|
|
|
45
45
|
this.addStyle = false;
|
|
46
46
|
this.mode = "modal";
|
|
47
47
|
this.excluded = "";
|
|
48
|
-
this.
|
|
48
|
+
this.productDetailsNewTab = true;
|
|
49
|
+
this.productDetailsRedirect = true;
|
|
49
50
|
this.imageResolutionWidth = 250;
|
|
50
51
|
this.exampleImageSource = constants.DEFAULT_EXAMPLE_IMAGE;
|
|
51
52
|
this.textSearchShow = false;
|
|
@@ -72,7 +73,7 @@ const VviinnVpsButton = class {
|
|
|
72
73
|
return (index.h(index.Host, { tabindex: "0", role: "button" }, index.h("vviinn-button", { onClick: () => {
|
|
73
74
|
this.handleClick();
|
|
74
75
|
}, addStyle: this.addStyle, part: "vviinn-button" }, index.h("slot", null, index.h(CameraIcon, null))), customizedSlots.SlotSkeleton("vps"), 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, upload-photo_button, show-files_button, start-camera_button", campaignId: this.campaignId, showingInButton: true, buttonPressed: this.buttonPressed, resetVpsButton: this.resetButton.bind(this), buttonElementId: this.el.id, active: this.buttonPressed &&
|
|
75
|
-
(this.mode === "modal" || this.mode === "camera"), excluded: this.excluded,
|
|
76
|
+
(this.mode === "modal" || this.mode === "camera"), excluded: this.excluded, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, imageResolutionWidth: this.imageResolutionWidth, exampleImageSource: this.exampleImageSource, textSearchShow: this.textSearchShow })));
|
|
76
77
|
}
|
|
77
78
|
get el() { return index.getElement(this); }
|
|
78
79
|
};
|
|
@@ -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-e4e48554.js');
|
|
9
9
|
const customizedSlots = require('./customized-slots-dacb282b.js');
|
|
10
10
|
const index$1 = require('./index-c33ee22e.js');
|
|
11
11
|
const constants = require('./constants-7684cbfc.js');
|
|
@@ -180,7 +180,8 @@ const VviinnVpsWidget = class {
|
|
|
180
180
|
this.locale = "de-DE";
|
|
181
181
|
this.campaignId = "";
|
|
182
182
|
this.excluded = "";
|
|
183
|
-
this.
|
|
183
|
+
this.productDetailsNewTab = true;
|
|
184
|
+
this.productDetailsRedirect = true;
|
|
184
185
|
this.imageResolutionWidth = 250;
|
|
185
186
|
this.exampleImageSource = constants.DEFAULT_EXAMPLE_IMAGE;
|
|
186
187
|
this.textSearchShow = false;
|
|
@@ -223,7 +224,9 @@ const VviinnVpsWidget = class {
|
|
|
223
224
|
return search_store.searchState.results.find((r) => r.productId === id);
|
|
224
225
|
}
|
|
225
226
|
handleOpenLink(deeplink, event) {
|
|
226
|
-
if (this.
|
|
227
|
+
if (!this.productDetailsRedirect)
|
|
228
|
+
return;
|
|
229
|
+
if (this.productDetailsNewTab || event.ctrlKey || event.metaKey) {
|
|
227
230
|
let newTab = window.open();
|
|
228
231
|
if (newTab) {
|
|
229
232
|
newTab.location.href = deeplink;
|
|
@@ -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_6.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],"
|
|
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_6.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],"productDetailsNewTab":[4,"product-details-new-tab"],"productDetailsRedirect":[4,"product-details-redirect"],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"showFilters":[4,"show-filters"],"showExtendedFilters":[4,"show-extended-filters"],"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],"dynamicFilters":[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,"vviinnFiltersChanged","filtersChanged"]]],[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-extended-filters",{"filters":[16],"filtersString":[1,"filters-string"],"locale":[1],"requestFilters":[32],"showMore":[32],"selectedMoreOptions":[32]}],[1,"vviinn-filters",{"filters":[16],"filtersString":[1,"filters-string"],"selectedFilter":[32],"requestFilters":[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],"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],"productDetailsNewTab":[4,"product-details-new-tab"],"productDetailsRedirect":[4,"product-details-redirect"],"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],"productDetailsNewTab":[4,"product-details-new-tab"],"productDetailsRedirect":[4,"product-details-redirect"],"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],"productDetailsNewTab":[4,"product-details-new-tab"],"productDetailsRedirect":[4,"product-details-redirect"],"addToBasketShow":[4,"add-to-basket-show"],"showFilters":[4,"show-filters"],"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],"productDetailsNewTab":[4,"product-details-new-tab"],"productDetailsRedirect":[4,"product-details-redirect"],"addToBasketShow":[4,"add-to-basket-show"],"showFilters":[4,"show-filters"],"apiPath":[1,"api-path"]}]]]], options);
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
exports.setNonce = index.setNonce;
|
|
@@ -19,7 +19,8 @@ export class RecommendationsSidebar {
|
|
|
19
19
|
this.noResultShow = undefined;
|
|
20
20
|
this.gridArrowsDynamic = undefined;
|
|
21
21
|
this.excluded = undefined;
|
|
22
|
-
this.
|
|
22
|
+
this.productDetailsNewTab = undefined;
|
|
23
|
+
this.productDetailsRedirect = undefined;
|
|
23
24
|
this.addToBasketShow = false;
|
|
24
25
|
this.showFilters = false;
|
|
25
26
|
this.buttonChildren = undefined;
|
|
@@ -63,7 +64,7 @@ export class RecommendationsSidebar {
|
|
|
63
64
|
});
|
|
64
65
|
}
|
|
65
66
|
render() {
|
|
66
|
-
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, "campaign-type": this.campaignType, useCarousel: this.position === "bottom", onVviinnRecommendationsLoaded: () => (this.state = "open"), showScroll: this.widgetScrollbar, campaigns: this.campaigns, color: this.color, currencySign: this.currencySign, apiPath: this.apiPath, locale: this.locale, buttonElementId: this.buttonElementId, noResultText: this.noResultText, noResultShow: this.noResultShow, gridArrowsDynamic: this.gridArrowsDynamic, showingInButton: this.showingInButton, excluded: this.excluded,
|
|
67
|
+
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, "campaign-type": this.campaignType, useCarousel: this.position === "bottom", onVviinnRecommendationsLoaded: () => (this.state = "open"), showScroll: this.widgetScrollbar, campaigns: this.campaigns, color: this.color, currencySign: this.currencySign, apiPath: this.apiPath, locale: this.locale, buttonElementId: this.buttonElementId, noResultText: this.noResultText, noResultShow: this.noResultShow, gridArrowsDynamic: this.gridArrowsDynamic, showingInButton: this.showingInButton, excluded: this.excluded, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, closed: this.state === "closed", opened: this.state === "open", addToBasketShow: this.addToBasketShow, showFilters: this.showFilters })))));
|
|
67
68
|
}
|
|
68
69
|
renderSourceImage() {
|
|
69
70
|
return (h("img", { class: "source-image", part: "source-image", src: this.sourceImage }));
|
|
@@ -402,7 +403,7 @@ export class RecommendationsSidebar {
|
|
|
402
403
|
"attribute": "excluded",
|
|
403
404
|
"reflect": false
|
|
404
405
|
},
|
|
405
|
-
"
|
|
406
|
+
"productDetailsNewTab": {
|
|
406
407
|
"type": "boolean",
|
|
407
408
|
"mutable": false,
|
|
408
409
|
"complexType": {
|
|
@@ -416,7 +417,24 @@ export class RecommendationsSidebar {
|
|
|
416
417
|
"tags": [],
|
|
417
418
|
"text": "Toggle for opening product link in new tab or not"
|
|
418
419
|
},
|
|
419
|
-
"attribute": "product-
|
|
420
|
+
"attribute": "product-details-new-tab",
|
|
421
|
+
"reflect": false
|
|
422
|
+
},
|
|
423
|
+
"productDetailsRedirect": {
|
|
424
|
+
"type": "boolean",
|
|
425
|
+
"mutable": false,
|
|
426
|
+
"complexType": {
|
|
427
|
+
"original": "boolean",
|
|
428
|
+
"resolved": "boolean",
|
|
429
|
+
"references": {}
|
|
430
|
+
},
|
|
431
|
+
"required": false,
|
|
432
|
+
"optional": false,
|
|
433
|
+
"docs": {
|
|
434
|
+
"tags": [],
|
|
435
|
+
"text": "Toggle for redirection to PDP on product's click"
|
|
436
|
+
},
|
|
437
|
+
"attribute": "product-details-redirect",
|
|
420
438
|
"reflect": false
|
|
421
439
|
},
|
|
422
440
|
"addToBasketShow": {
|
|
@@ -28,7 +28,8 @@ const Template = (args) => `<vviinn-vpr-button token="${args.token}"
|
|
|
28
28
|
modal-scrollbar="${args.modalScrollbar}"
|
|
29
29
|
mode="${args.mode}"
|
|
30
30
|
campaigns="${args.campaigns}"
|
|
31
|
-
product-
|
|
31
|
+
product-details-new-tab="${args.productDetailsNewTab}"
|
|
32
|
+
product-details-redirect="${args.productDetailsRedirect}"
|
|
32
33
|
image-width="${args.imageWidth}"
|
|
33
34
|
color="${args.color ? args.color.toString().slice(1) : ""}"
|
|
34
35
|
no-result-text="${args.noResultText}"
|
|
@@ -51,7 +52,8 @@ Default.args = {
|
|
|
51
52
|
color: "",
|
|
52
53
|
excluded: "",
|
|
53
54
|
mode: "continuity",
|
|
54
|
-
|
|
55
|
+
productDetailsNewTab: false,
|
|
56
|
+
productDetailsRedirect: true,
|
|
55
57
|
sidebarTitle: "Visually similar products",
|
|
56
58
|
position: "bottom",
|
|
57
59
|
sourceImage: "https://www.moebel-shop.de/media/image/e3/e9/28/0749295-001_600x600.jpg",
|
|
@@ -55,7 +55,8 @@ export class VviinnVprButton {
|
|
|
55
55
|
this.noResultShow = true;
|
|
56
56
|
this.gridArrowsDynamic = false;
|
|
57
57
|
this.excluded = "";
|
|
58
|
-
this.
|
|
58
|
+
this.productDetailsNewTab = false;
|
|
59
|
+
this.productDetailsRedirect = true;
|
|
59
60
|
this.addToBasketShow = false;
|
|
60
61
|
this.showFilters = false;
|
|
61
62
|
this.apiPath = "https://api.vviinn.com";
|
|
@@ -85,7 +86,8 @@ export class VviinnVprButton {
|
|
|
85
86
|
sidebar.noResultText = this.noResultText;
|
|
86
87
|
sidebar.noResultShow = this.noResultShow;
|
|
87
88
|
sidebar.gridArrowsDynamic = this.gridArrowsDynamic;
|
|
88
|
-
sidebar.
|
|
89
|
+
sidebar.productDetailsNewTab = this.productDetailsNewTab;
|
|
90
|
+
sidebar.productDetailsRedirect = this.productDetailsRedirect;
|
|
89
91
|
sidebar.widgetVersion = version;
|
|
90
92
|
sidebar.showingInButton = true;
|
|
91
93
|
sidebar.excluded = this.excluded;
|
|
@@ -452,7 +454,7 @@ export class VviinnVprButton {
|
|
|
452
454
|
"reflect": false,
|
|
453
455
|
"defaultValue": "\"\""
|
|
454
456
|
},
|
|
455
|
-
"
|
|
457
|
+
"productDetailsNewTab": {
|
|
456
458
|
"type": "boolean",
|
|
457
459
|
"mutable": false,
|
|
458
460
|
"complexType": {
|
|
@@ -466,10 +468,28 @@ export class VviinnVprButton {
|
|
|
466
468
|
"tags": [],
|
|
467
469
|
"text": "Toggle for opening product link in new tab or not"
|
|
468
470
|
},
|
|
469
|
-
"attribute": "product-
|
|
471
|
+
"attribute": "product-details-new-tab",
|
|
470
472
|
"reflect": false,
|
|
471
473
|
"defaultValue": "false"
|
|
472
474
|
},
|
|
475
|
+
"productDetailsRedirect": {
|
|
476
|
+
"type": "boolean",
|
|
477
|
+
"mutable": false,
|
|
478
|
+
"complexType": {
|
|
479
|
+
"original": "boolean",
|
|
480
|
+
"resolved": "boolean",
|
|
481
|
+
"references": {}
|
|
482
|
+
},
|
|
483
|
+
"required": false,
|
|
484
|
+
"optional": false,
|
|
485
|
+
"docs": {
|
|
486
|
+
"tags": [],
|
|
487
|
+
"text": "Toggle for redirection to PDP on product's click"
|
|
488
|
+
},
|
|
489
|
+
"attribute": "product-details-redirect",
|
|
490
|
+
"reflect": false,
|
|
491
|
+
"defaultValue": "true"
|
|
492
|
+
},
|
|
473
493
|
"addToBasketShow": {
|
|
474
494
|
"type": "boolean",
|
|
475
495
|
"mutable": false,
|
|
@@ -24,7 +24,8 @@ const Template = (args) => `
|
|
|
24
24
|
image-width="${args.imageWidth}"
|
|
25
25
|
campaign-type="${args.campaignType}"
|
|
26
26
|
campaigns="${args.campaigns}"
|
|
27
|
-
product-
|
|
27
|
+
product-details-new-tab="${args.productDetailsNewTab}"
|
|
28
|
+
product-details-redirect="${args.productDetailsRedirect}"
|
|
28
29
|
color="${args.color ? args.color.slice(1) : ""}"
|
|
29
30
|
grid-arrows-dynamic="${args.gridArrowsDynamic}"
|
|
30
31
|
no-result-text="${args.noResultText}"
|
|
@@ -50,7 +51,8 @@ Grid.args = {
|
|
|
50
51
|
excluded: "",
|
|
51
52
|
mode: "grid",
|
|
52
53
|
blockTitle: "Recommended products",
|
|
53
|
-
|
|
54
|
+
productDetailsNewTab: false,
|
|
55
|
+
productDetailsRedirect: true,
|
|
54
56
|
imageWidth: 420,
|
|
55
57
|
imageRatio: 1,
|
|
56
58
|
locale: "en-US",
|
|
@@ -77,7 +79,8 @@ Continuity.args = {
|
|
|
77
79
|
excluded: "",
|
|
78
80
|
mode: "continuity",
|
|
79
81
|
blockTitle: "Recommended products",
|
|
80
|
-
|
|
82
|
+
productDetailsNewTab: false,
|
|
83
|
+
productDetailsRedirect: true,
|
|
81
84
|
imageWidth: 300,
|
|
82
85
|
imageRatio: 1,
|
|
83
86
|
locale: "en-US",
|
|
@@ -104,7 +107,8 @@ Set.args = {
|
|
|
104
107
|
excluded: "",
|
|
105
108
|
mode: "set",
|
|
106
109
|
blockTitle: "Recommended products",
|
|
107
|
-
|
|
110
|
+
productDetailsNewTab: false,
|
|
111
|
+
productDetailsRedirect: true,
|
|
108
112
|
imageWidth: 420,
|
|
109
113
|
imageRatio: 1,
|
|
110
114
|
locale: "en-US",
|
|
@@ -93,7 +93,8 @@ export class VviinnVprWidget {
|
|
|
93
93
|
this.showScroll = true;
|
|
94
94
|
this.cssUrl = null;
|
|
95
95
|
this.excluded = "";
|
|
96
|
-
this.
|
|
96
|
+
this.productDetailsNewTab = false;
|
|
97
|
+
this.productDetailsRedirect = true;
|
|
97
98
|
this.addToBasketShow = false;
|
|
98
99
|
this.updateButtonLocation = "topAndItem";
|
|
99
100
|
this.showFilters = false;
|
|
@@ -124,7 +125,9 @@ export class VviinnVprWidget {
|
|
|
124
125
|
};
|
|
125
126
|
}
|
|
126
127
|
handleOpenLink(deeplink, event) {
|
|
127
|
-
if (this.
|
|
128
|
+
if (!this.productDetailsRedirect)
|
|
129
|
+
return;
|
|
130
|
+
if (this.productDetailsNewTab || event.ctrlKey || event.metaKey) {
|
|
128
131
|
let newTab = window.open();
|
|
129
132
|
if (newTab) {
|
|
130
133
|
newTab.location.href = deeplink;
|
|
@@ -753,7 +756,7 @@ export class VviinnVprWidget {
|
|
|
753
756
|
"reflect": false,
|
|
754
757
|
"defaultValue": "\"\""
|
|
755
758
|
},
|
|
756
|
-
"
|
|
759
|
+
"productDetailsNewTab": {
|
|
757
760
|
"type": "boolean",
|
|
758
761
|
"mutable": false,
|
|
759
762
|
"complexType": {
|
|
@@ -767,10 +770,28 @@ export class VviinnVprWidget {
|
|
|
767
770
|
"tags": [],
|
|
768
771
|
"text": "Toggle for opening product link in new tab or not"
|
|
769
772
|
},
|
|
770
|
-
"attribute": "product-
|
|
773
|
+
"attribute": "product-details-new-tab",
|
|
771
774
|
"reflect": false,
|
|
772
775
|
"defaultValue": "false"
|
|
773
776
|
},
|
|
777
|
+
"productDetailsRedirect": {
|
|
778
|
+
"type": "boolean",
|
|
779
|
+
"mutable": false,
|
|
780
|
+
"complexType": {
|
|
781
|
+
"original": "boolean",
|
|
782
|
+
"resolved": "boolean",
|
|
783
|
+
"references": {}
|
|
784
|
+
},
|
|
785
|
+
"required": false,
|
|
786
|
+
"optional": false,
|
|
787
|
+
"docs": {
|
|
788
|
+
"tags": [],
|
|
789
|
+
"text": "Toggle for redirection to PDP on product's click"
|
|
790
|
+
},
|
|
791
|
+
"attribute": "product-details-redirect",
|
|
792
|
+
"reflect": false,
|
|
793
|
+
"defaultValue": "true"
|
|
794
|
+
},
|
|
774
795
|
"addToBasketShow": {
|
|
775
796
|
"type": "boolean",
|
|
776
797
|
"mutable": false,
|
|
@@ -30,7 +30,8 @@ const Template = (args) => `
|
|
|
30
30
|
currency-sign="${args.currencySign}"
|
|
31
31
|
locale="${args.locale}"
|
|
32
32
|
mode="${args.mode}"
|
|
33
|
-
product-
|
|
33
|
+
product-details-new-tab="${args.productDetailsNewTab}"
|
|
34
|
+
product-details-redirect="${args.productDetailsRedirect}"
|
|
34
35
|
api-path="${args.apiPath}"
|
|
35
36
|
image-resolution-width="${args.imageResolutionWidth}"
|
|
36
37
|
text-search-show="${args.textSearchShow}"
|
|
@@ -43,7 +44,8 @@ Modal.args = {
|
|
|
43
44
|
campaignId: "",
|
|
44
45
|
excluded: "",
|
|
45
46
|
mode: "modal",
|
|
46
|
-
|
|
47
|
+
productDetailsNewTab: true,
|
|
48
|
+
productDetailsRedirect: true,
|
|
47
49
|
locale: "en-US",
|
|
48
50
|
currencySign: "€",
|
|
49
51
|
addStyle: true,
|
|
@@ -57,7 +59,8 @@ Upload.args = {
|
|
|
57
59
|
campaignId: "",
|
|
58
60
|
excluded: "",
|
|
59
61
|
mode: "upload",
|
|
60
|
-
|
|
62
|
+
productDetailsNewTab: true,
|
|
63
|
+
productDetailsRedirect: true,
|
|
61
64
|
locale: "en-US",
|
|
62
65
|
currencySign: "€",
|
|
63
66
|
addStyle: true,
|
|
@@ -49,7 +49,8 @@ export class VviinnVpsButton {
|
|
|
49
49
|
this.addStyle = false;
|
|
50
50
|
this.mode = "modal";
|
|
51
51
|
this.excluded = "";
|
|
52
|
-
this.
|
|
52
|
+
this.productDetailsNewTab = true;
|
|
53
|
+
this.productDetailsRedirect = true;
|
|
53
54
|
this.imageResolutionWidth = 250;
|
|
54
55
|
this.exampleImageSource = DEFAULT_EXAMPLE_IMAGE;
|
|
55
56
|
this.textSearchShow = false;
|
|
@@ -76,7 +77,7 @@ export class VviinnVpsButton {
|
|
|
76
77
|
return (h(Host, { tabindex: "0", role: "button" }, h("vviinn-button", { onClick: () => {
|
|
77
78
|
this.handleClick();
|
|
78
79
|
}, addStyle: this.addStyle, part: "vviinn-button" }, h("slot", null, h(CameraIcon, null))), SlotSkeleton("vps"), 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, upload-photo_button, show-files_button, start-camera_button", campaignId: this.campaignId, showingInButton: true, buttonPressed: this.buttonPressed, resetVpsButton: this.resetButton.bind(this), buttonElementId: this.el.id, active: this.buttonPressed &&
|
|
79
|
-
(this.mode === "modal" || this.mode === "camera"), excluded: this.excluded,
|
|
80
|
+
(this.mode === "modal" || this.mode === "camera"), excluded: this.excluded, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, imageResolutionWidth: this.imageResolutionWidth, exampleImageSource: this.exampleImageSource, textSearchShow: this.textSearchShow })));
|
|
80
81
|
}
|
|
81
82
|
static get is() { return "vviinn-vps-button"; }
|
|
82
83
|
static get encapsulation() { return "shadow"; }
|
|
@@ -222,7 +223,7 @@ export class VviinnVpsButton {
|
|
|
222
223
|
"reflect": false,
|
|
223
224
|
"defaultValue": "\"\""
|
|
224
225
|
},
|
|
225
|
-
"
|
|
226
|
+
"productDetailsNewTab": {
|
|
226
227
|
"type": "boolean",
|
|
227
228
|
"mutable": false,
|
|
228
229
|
"complexType": {
|
|
@@ -236,7 +237,25 @@ export class VviinnVpsButton {
|
|
|
236
237
|
"tags": [],
|
|
237
238
|
"text": "Toggle for opening product link in new tab or not"
|
|
238
239
|
},
|
|
239
|
-
"attribute": "product-
|
|
240
|
+
"attribute": "product-details-new-tab",
|
|
241
|
+
"reflect": false,
|
|
242
|
+
"defaultValue": "true"
|
|
243
|
+
},
|
|
244
|
+
"productDetailsRedirect": {
|
|
245
|
+
"type": "boolean",
|
|
246
|
+
"mutable": false,
|
|
247
|
+
"complexType": {
|
|
248
|
+
"original": "boolean",
|
|
249
|
+
"resolved": "boolean",
|
|
250
|
+
"references": {}
|
|
251
|
+
},
|
|
252
|
+
"required": false,
|
|
253
|
+
"optional": false,
|
|
254
|
+
"docs": {
|
|
255
|
+
"tags": [],
|
|
256
|
+
"text": "Toggle for redirection to PDP on product's click"
|
|
257
|
+
},
|
|
258
|
+
"attribute": "product-details-redirect",
|
|
240
259
|
"reflect": false,
|
|
241
260
|
"defaultValue": "true"
|
|
242
261
|
},
|