vviinn-widgets 2.55.0 → 2.55.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{package-400fb761.js → package-74efd5f0.js} +1 -1
- package/dist/cjs/search-filters_17.cjs.entry.js +2 -2
- package/dist/cjs/vviinn-carousel_4.cjs.entry.js +23 -5
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +2 -2
- package/dist/collection/components/image-search/search-filters/search-filters.js +1 -1
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.js +62 -2
- package/dist/collection/components/vviinn-modal/vviinn-modal.css +1 -1
- package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.css +0 -1
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.js +2 -2
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +2 -2
- package/dist/esm/{package-6df9129f.js → package-d3e52cfc.js} +1 -1
- package/dist/esm/search-filters_17.entry.js +2 -2
- package/dist/esm/vviinn-carousel_4.entry.js +24 -6
- package/dist/esm/vviinn-vpr-button.entry.js +1 -1
- package/dist/esm/vviinn-vps-button.entry.js +1 -1
- package/dist/esm/vviinn-vps-widget.entry.js +2 -2
- package/dist/types/campaign/CampaignService.d.ts +4 -0
- package/dist/types/campaign/VCSCampaignService.d.ts +2 -0
- package/dist/types/campaign/VPRCampaignService.d.ts +2 -0
- package/dist/types/components/vviinn-carousel/vviinn-carousel.d.ts +7 -1
- package/dist/types/components.d.ts +12 -0
- package/dist/types/interfaces/generated.d.ts +4 -0
- package/dist/types/store/search.store.d.ts +2 -0
- package/dist/vviinn-widgets/p-04f3a389.entry.js +1 -0
- package/{www/build/p-72dd575c.entry.js → dist/vviinn-widgets/p-21eda42d.entry.js} +1 -1
- package/{www/build/p-31e48f7a.entry.js → dist/vviinn-widgets/p-7aef8065.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-da9d1796.entry.js → p-8a278e32.entry.js} +1 -1
- package/dist/vviinn-widgets/p-8e34f5bd.js +1 -0
- package/dist/vviinn-widgets/{p-d8ae6261.entry.js → p-e134b73f.entry.js} +1 -1
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/p-04f3a389.entry.js +1 -0
- package/{dist/vviinn-widgets/p-72dd575c.entry.js → www/build/p-21eda42d.entry.js} +1 -1
- package/{dist/vviinn-widgets/p-31e48f7a.entry.js → www/build/p-7aef8065.entry.js} +1 -1
- package/www/build/{p-da9d1796.entry.js → p-8a278e32.entry.js} +1 -1
- package/www/build/p-8e34f5bd.js +1 -0
- package/www/build/{p-d8ae6261.entry.js → p-e134b73f.entry.js} +1 -1
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/dist/vviinn-widgets/p-c79284df.js +0 -1
- package/dist/vviinn-widgets/p-ec387502.entry.js +0 -1
- package/www/build/p-c79284df.js +0 -1
- package/www/build/p-ec387502.entry.js +0 -1
|
@@ -3864,7 +3864,7 @@ const VviinnImageView = class {
|
|
|
3864
3864
|
};
|
|
3865
3865
|
VviinnImageView.style = vviinnImageViewCss;
|
|
3866
3866
|
|
|
3867
|
-
const vviinnModalCss = ":host{background:white;border-radius:24px;box-sizing:border-box;display:grid;grid-template-rows:min-content auto;max-width:960px;overflow:auto;position:relative}.head{position:absolute;width:100%;box-sizing:border-box;display:flex;align-items:center;z-index:1;padding:16px}.title{display:flex;align-items:center;transform:translateX(-6px);font-weight:600;font-size:18px;line-height:24px;margin:0 auto}.title-image{border-radius:50%;border:1px solid rgb(244, 244, 244);-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;margin-right:8px}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:grid;padding:6px;color:#8d8d8d}button:hover{color:#000}@media (max-width: 768px){:host{animation-name:fade-in;animation-duration:0.5s;animation-fill-mode:forwards;border-radius:24px 24px 0 0}:host(.closed){animation-name:fade-out;animation-fill-mode:none}.head{z-index:1}:host(:not(.first-screen)) .head{position:sticky;background:#ffffff}.body{overflow-y:auto}:host(:not(.first-screen)) .body{padding-bottom:
|
|
3867
|
+
const vviinnModalCss = ":host{background:white;border-radius:24px;box-sizing:border-box;display:grid;grid-template-rows:min-content auto;max-width:960px;overflow:auto;position:relative}.head{position:absolute;width:100%;box-sizing:border-box;display:flex;align-items:center;z-index:1;padding:16px}.title{display:flex;align-items:center;transform:translateX(-6px);font-weight:600;font-size:18px;line-height:24px;margin:0 auto}.title-image{border-radius:50%;border:1px solid rgb(244, 244, 244);-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;margin-right:8px}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:grid;padding:6px;color:#8d8d8d}button:hover{color:#000}@media (max-width: 768px){:host{animation-name:fade-in;animation-duration:0.5s;animation-fill-mode:forwards;border-radius:24px 24px 0 0}:host(.closed){animation-name:fade-out;animation-fill-mode:none}.head{z-index:1}:host(:not(.first-screen)) .head{position:sticky;background:#ffffff}.body{overflow-y:auto}:host(:not(.first-screen)) .body{padding-bottom:160px}.title{color:#161616;display:flex;align-items:center;font-weight:500;font-size:16px;line-height:24px;margin:0 auto}.title-image{border-radius:50%;border:1px solid rgb(244, 244, 244);-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;margin-right:8px}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:grid;color:#6f6f6f;padding:0}button:hover{color:#000}:host(.first-screen) button,:host(.first-screen) button:hover{color:white}}@keyframes fade-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes fade-out{from{transform:translateY(0)}to{transform:translateY(100%)}}";
|
|
3868
3868
|
|
|
3869
3869
|
const VviinnModal = class {
|
|
3870
3870
|
constructor(hostRef) {
|
|
@@ -3931,7 +3931,7 @@ const VviinnOverlay = class {
|
|
|
3931
3931
|
};
|
|
3932
3932
|
VviinnOverlay.style = vviinnOverlayCss;
|
|
3933
3933
|
|
|
3934
|
-
const vviinnOverlayedModalCss = ":host{display:none}:host(.active){display:block}vviinn-overlay{align-items:center;display:grid;justify-items:center;cursor:default}vviinn-modal{margin-left:24px;margin-right:24px}@media (max-width: 768px){vviinn-modal{height:100vh;
|
|
3934
|
+
const vviinnOverlayedModalCss = ":host{display:none}:host(.active){display:block}vviinn-overlay{align-items:center;display:grid;justify-items:center;cursor:default}vviinn-modal{margin-left:24px;margin-right:24px}@media (max-width: 768px){vviinn-modal{height:100vh;margin-top:64px;transform:translateY(100%);width:100vw;margin-left:0;margin-right:0}vviinn-overlay{align-items:end;display:grid;justify-items:center}}";
|
|
3935
3935
|
|
|
3936
3936
|
const VviinnOverlayedModal = class {
|
|
3937
3937
|
constructor(hostRef) {
|
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
6
|
const search_store = require('./search.store-3ea66a77.js');
|
|
7
|
+
const customizedSlots = require('./customized-slots-8e27cac8.js');
|
|
7
8
|
const i18next = require('./i18next-74ff3413.js');
|
|
8
9
|
const PlusIcon = require('./PlusIcon-835a5dcc.js');
|
|
9
|
-
const
|
|
10
|
-
const _package = require('./package-400fb761.js');
|
|
10
|
+
const _package = require('./package-74efd5f0.js');
|
|
11
11
|
const resources = require('./resources-ad941ad8.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" },
|
|
@@ -124,6 +124,8 @@ const vviinnCarouselCss = ":host{--vviinn-carousel-columns-internal:var(--vviinn
|
|
|
124
124
|
const VviinnCarousel = class {
|
|
125
125
|
constructor(hostRef) {
|
|
126
126
|
index.registerInstance(this, hostRef);
|
|
127
|
+
this.vviinnProductLoad = index.createEvent(this, "vviinnProductLoad", 7);
|
|
128
|
+
this.vviinnProductView = index.createEvent(this, "vviinnProductView", 7);
|
|
127
129
|
this.columns = 0;
|
|
128
130
|
this.resizeObserver = new ResizeObserver(() => this.handleResize());
|
|
129
131
|
this.defaultAnimationInterval = 2000;
|
|
@@ -138,8 +140,10 @@ const VviinnCarousel = class {
|
|
|
138
140
|
const recommendationIndex = this.recommendations.indexOf(clickedProduct);
|
|
139
141
|
const newCrossSellingRecommendations = this.crossSellingRecommendations;
|
|
140
142
|
if (recommendationIndex + step < this.recommendations.length) {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
+
const newRecommendation = this.recommendations[recommendationIndex + step];
|
|
144
|
+
newCrossSellingRecommendations[crossSellingIndex] = newRecommendation;
|
|
145
|
+
const productData = this.getProductData(newRecommendation, recommendationIndex + step);
|
|
146
|
+
this.vviinnProductLoad.emit(productData);
|
|
143
147
|
this.crossSellingRecommendations = [...newCrossSellingRecommendations];
|
|
144
148
|
let element = this.el.querySelector(`[data-id="${productId}"]`);
|
|
145
149
|
const button = element.shadowRoot.querySelector(".update-button");
|
|
@@ -150,6 +154,7 @@ const VviinnCarousel = class {
|
|
|
150
154
|
if (recommendationIndex + step * 2 <= this.recommendations.length - 1) {
|
|
151
155
|
button === null || button === void 0 ? void 0 : button.classList.remove("hidden");
|
|
152
156
|
}
|
|
157
|
+
this.vviinnProductView.emit(productData);
|
|
153
158
|
clearTimeout(animationTimer);
|
|
154
159
|
}, animationInterval);
|
|
155
160
|
}
|
|
@@ -177,6 +182,19 @@ const VviinnCarousel = class {
|
|
|
177
182
|
this.pricePrefix = "";
|
|
178
183
|
this.locale = undefined;
|
|
179
184
|
}
|
|
185
|
+
getProductData(recommendation, productRank) {
|
|
186
|
+
return {
|
|
187
|
+
productId: recommendation.productId,
|
|
188
|
+
productRank,
|
|
189
|
+
productName: recommendation.productTitle,
|
|
190
|
+
productType: recommendation.productType,
|
|
191
|
+
widgetType: "VPR",
|
|
192
|
+
campaignTypeId: this.campaignTypeId,
|
|
193
|
+
campaignTypeName: customizedSlots.campaignTypeNames[this.campaignTypeId],
|
|
194
|
+
widgetId: this.widgetElementId,
|
|
195
|
+
widgetVersion: this.widgetVersion,
|
|
196
|
+
};
|
|
197
|
+
}
|
|
180
198
|
componentWillLoad() {
|
|
181
199
|
this.isRTL = document.dir === "rtl";
|
|
182
200
|
}
|
|
@@ -1406,7 +1424,7 @@ const VviinnVprWidget = class {
|
|
|
1406
1424
|
this.currencySign = "€";
|
|
1407
1425
|
this.pricePrefix = "";
|
|
1408
1426
|
this.mode = "continuity";
|
|
1409
|
-
this.campaignType = "VPR";
|
|
1427
|
+
this.campaignType = this.mode === "set" ? "VCS" : "VPR";
|
|
1410
1428
|
this.locale = "de-DE";
|
|
1411
1429
|
this.campaigns = "";
|
|
1412
1430
|
this.color = "";
|
|
@@ -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-74efd5f0.js');
|
|
7
7
|
const VisualSearchIcon = require('./VisualSearchIcon-f435f5b0.js');
|
|
8
8
|
|
|
9
9
|
const vviinnVprButtonCss = ":host{display:block}";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
|
-
const _package = require('./package-
|
|
6
|
+
const _package = require('./package-74efd5f0.js');
|
|
7
7
|
const customizedSlots = require('./customized-slots-8e27cac8.js');
|
|
8
8
|
const constants = require('./constants-7684cbfc.js');
|
|
9
9
|
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
6
|
const search_store = require('./search.store-3ea66a77.js');
|
|
7
7
|
const i18next = require('./i18next-74ff3413.js');
|
|
8
|
-
const _package = require('./package-
|
|
8
|
+
const _package = require('./package-74efd5f0.js');
|
|
9
9
|
const customizedSlots = require('./customized-slots-8e27cac8.js');
|
|
10
10
|
const resources = require('./resources-ad941ad8.js');
|
|
11
11
|
const constants = require('./constants-7684cbfc.js');
|
|
@@ -34,7 +34,7 @@ const checkDeviceType = () => {
|
|
|
34
34
|
return "desktop";
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
const vviinnVpsWidgetCss = ":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{display:block}.hidden{visibility:hidden;height:1px}vviinn-overlayed-modal.first-screen::part(title),vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:hidden}.start-page{display:grid;grid-template-columns:repeat(2, 1fr);height:640px}#start-page_block{box-sizing:border-box;display:flex;overflow-y:auto;flex-direction:column;justify-content:center;padding:
|
|
37
|
+
const vviinnVpsWidgetCss = ":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{display:block}.hidden{visibility:hidden;height:1px}vviinn-overlayed-modal.first-screen::part(title),vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:hidden}.start-page{display:grid;grid-template-columns:repeat(2, 1fr);height:640px}#start-page_block{box-sizing:border-box;display:flex;overflow-y:auto;flex-direction:column;justify-content:center;padding:40px 62px}#start-page_block.error{align-content:center}.start-page_main-content{flex-grow:1;display:flex;flex-direction:column;justify-content:center}.start-page_errors-block{display:flex;flex-direction:column;justify-content:center;gap:12px}#start-page_block vviinn-text-search{margin-top:12px}.buttons-group{display:flex;flex-direction:column;gap:12px;margin-top:24px}.action-button{font-family:inherit;display:grid;border:none;cursor:pointer;align-items:center;border-radius:8px;font-size:16px;height:48px;justify-items:center;transition:background 0.1s ease-in-out;color:#525252;background-color:#f4f4f4}.action-button:hover{background-color:#eaeaea}.action-button:first-child{background:var(--color-primary, var(--color-primary-system));border-color:var(--color-primary, var(--color-primary-system));color:white}.action-button:first-child:hover{background:var(--color-primary-hover, var(--color-primary-hover-system));border-color:var(--color-primary-hover, var(--color-primary-hover-system))}.action-button:active{border-color:black}.action-button-content{display:grid;align-items:center;justify-items:start;justify-content:center;grid-template-columns:max-content auto;grid-gap:8px}.action-button .hidden{display:none}.results-page{margin-top:64px;display:grid;grid-template-columns:336px auto;box-sizing:border-box}.results-page>*{padding:24px;box-sizing:border-box}vviinn-empty-results{width:280px;align-self:center;justify-self:center}.source-wrapper{display:grid;grid-template-rows:min-content 1fr;min-width:100%}.results-page .source-wrapper.text-search-wrapper{padding:24px 24px 0 24px}.filters-wrapper{margin-top:24px;overflow-x:auto;transform:translateX(-24px);min-width:calc(100% + 48px)}.products-wrapper{display:grid;overflow-y:auto;overflow-x:hidden;padding:unset;position:relative;width:100%}.products{width:100%;align-content:center;align-items:start;box-sizing:border-box;display:grid;grid-gap:32px 16px;grid-template-columns:repeat(auto-fill, minmax(130px, 1fr));justify-items:center;padding:24px;position:absolute}.products.hidden{display:none}vviinn-product-card{gap:0;width:100%}vviinn-product-card::part(image){border:1px solid #eaeaea;margin-bottom:8px}vviinn-product-card::part(price-container),vviinn-product-card::part(deeplink),vviinn-product-card::part(title){align-self:start}search-filters span{display:none}search-filters::part(filter){background:#f4f4f4;border-radius:8px;box-sizing:border-box;color:#161616;font-size:14px;font-weight:400;line-height:20px}search-filters::part(show-more-filters){display:flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid #f4f4f4;min-width:40px;height:40px;border-radius:100px;box-sizing:border-box;color:#161616}search-filters::part(show-more-filters):hover{background:#eaeaea}search-filters::part(filter active){background:var(--color-primary, var(--color-primary-system));color:white}.results-page:not(.active){display:none}.nothing-found{display:grid;grid-gap:64px;justify-self:center;padding-top:64px;padding-bottom:16px;position:absolute;width:60%}vviinn-preloader{--preloader-size:24px;display:flex}@media (max-width: 1080px){#start-page_block{padding:24px 36px}}@media (max-width: 768px){.start-page{display:flex;flex-direction:column;height:100%}vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:visible}.start-page.active{height:calc(100vh - 64px);height:calc(100svh - 64px)}.start-page:not(.active){overflow:hidden}.results-page{margin-top:0}.results-page>*{box-sizing:border-box;padding:12px 24px 24px}.source-wrapper{grid-template-rows:min-content auto;width:100%;padding:0}.source-wrapper.image-wrapper .filters-wrapper{padding-left:24px;min-width:100%}.image{margin-bottom:8px}.results-page{grid-template-rows:min-content;grid-template-columns:unset}#start-page_block{overflow-y:unset;min-height:-moz-fit-content;min-height:fit-content;padding:24px 20px 20px}.products-wrapper{align-content:start;position:static;overflow-y:unset;width:100%;padding-top:0;margin-top:24px}.products{position:static;padding:0;width:unset;grid-gap:32px 16px;justify-content:center}.nothing-found{position:static;grid-gap:64px;padding:unset;align-content:start;width:unset}}@media (max-width: 480px){.start-page{padding-top:0}.action-button-content{grid-gap:10px}}@media (max-width: 380px){.products{grid-gap:24px 10px}}vviinn-wrong-format,vviinn-server-error{width:280px;align-self:center;justify-self:center}.visually-hidden{clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}";
|
|
38
38
|
|
|
39
39
|
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
40
40
|
var t = {};
|
|
@@ -189,7 +189,7 @@ export class SearchFilters {
|
|
|
189
189
|
"mutable": false,
|
|
190
190
|
"complexType": {
|
|
191
191
|
"original": "ResponseFilterItem | null",
|
|
192
|
-
"resolved": "{ column: string; values: ({ value: string | number; label: string; } & { selected: boolean; } & { value: unknown; label: unknown; })[]; }",
|
|
192
|
+
"resolved": "{ column: string; label: string; values: ({ value: string | number; label: string; } & { selected: boolean; } & { value: unknown; label: unknown; })[]; }",
|
|
193
193
|
"references": {
|
|
194
194
|
"ResponseFilterItem": {
|
|
195
195
|
"location": "import",
|
|
@@ -2,6 +2,7 @@ import { Host, h, } from "@stencil/core";
|
|
|
2
2
|
import { chunksOf } from "fp-ts/lib/Array";
|
|
3
3
|
import { pipe } from "fp-ts/lib/function";
|
|
4
4
|
import { ChevronIcon } from "../vviinn-icons";
|
|
5
|
+
import { campaignTypeNames } from "../../campaign/Campaign";
|
|
5
6
|
import { CAROUSEL_IMAGE_WIDTH_CSS_VAR, CAROUSEL_WIDTH_CSS_VAR, COLUMNS_NUMBER_CSS_VAR, CONTENT_GROUP_CSS_CLASS, SET_MODE_DISCOUNT_STEP, SET_MODE_IMAGE_WIDTH, SET_MODE_INITIAL_DISCOUNT, SET_MODE_MAX_DISCOUNT, } from "./constants";
|
|
6
7
|
import { calculateDiscount } from "../../utils/number";
|
|
7
8
|
import { searchState } from "../../store/search.store";
|
|
@@ -24,8 +25,10 @@ export class VviinnCarousel {
|
|
|
24
25
|
const recommendationIndex = this.recommendations.indexOf(clickedProduct);
|
|
25
26
|
const newCrossSellingRecommendations = this.crossSellingRecommendations;
|
|
26
27
|
if (recommendationIndex + step < this.recommendations.length) {
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
const newRecommendation = this.recommendations[recommendationIndex + step];
|
|
29
|
+
newCrossSellingRecommendations[crossSellingIndex] = newRecommendation;
|
|
30
|
+
const productData = this.getProductData(newRecommendation, recommendationIndex + step);
|
|
31
|
+
this.vviinnProductLoad.emit(productData);
|
|
29
32
|
this.crossSellingRecommendations = [...newCrossSellingRecommendations];
|
|
30
33
|
let element = this.el.querySelector(`[data-id="${productId}"]`);
|
|
31
34
|
const button = element.shadowRoot.querySelector(".update-button");
|
|
@@ -36,6 +39,7 @@ export class VviinnCarousel {
|
|
|
36
39
|
if (recommendationIndex + step * 2 <= this.recommendations.length - 1) {
|
|
37
40
|
button === null || button === void 0 ? void 0 : button.classList.remove("hidden");
|
|
38
41
|
}
|
|
42
|
+
this.vviinnProductView.emit(productData);
|
|
39
43
|
clearTimeout(animationTimer);
|
|
40
44
|
}, animationInterval);
|
|
41
45
|
}
|
|
@@ -63,6 +67,19 @@ export class VviinnCarousel {
|
|
|
63
67
|
this.pricePrefix = "";
|
|
64
68
|
this.locale = undefined;
|
|
65
69
|
}
|
|
70
|
+
getProductData(recommendation, productRank) {
|
|
71
|
+
return {
|
|
72
|
+
productId: recommendation.productId,
|
|
73
|
+
productRank,
|
|
74
|
+
productName: recommendation.productTitle,
|
|
75
|
+
productType: recommendation.productType,
|
|
76
|
+
widgetType: "VPR",
|
|
77
|
+
campaignTypeId: this.campaignTypeId,
|
|
78
|
+
campaignTypeName: campaignTypeNames[this.campaignTypeId],
|
|
79
|
+
widgetId: this.widgetElementId,
|
|
80
|
+
widgetVersion: this.widgetVersion,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
66
83
|
componentWillLoad() {
|
|
67
84
|
this.isRTL = document.dir === "rtl";
|
|
68
85
|
}
|
|
@@ -595,6 +612,49 @@ export class VviinnCarousel {
|
|
|
595
612
|
"setModeAppliedDiscounts": {}
|
|
596
613
|
};
|
|
597
614
|
}
|
|
615
|
+
static get events() {
|
|
616
|
+
return [{
|
|
617
|
+
"method": "vviinnProductLoad",
|
|
618
|
+
"name": "vviinnProductLoad",
|
|
619
|
+
"bubbles": true,
|
|
620
|
+
"cancelable": true,
|
|
621
|
+
"composed": true,
|
|
622
|
+
"docs": {
|
|
623
|
+
"tags": [],
|
|
624
|
+
"text": "Event fires ones when recommendation rendered on page"
|
|
625
|
+
},
|
|
626
|
+
"complexType": {
|
|
627
|
+
"original": "ProductCardEventData",
|
|
628
|
+
"resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VCS\" | \"VPS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; clickEvent?: MouseEvent; discount?: number; }",
|
|
629
|
+
"references": {
|
|
630
|
+
"ProductCardEventData": {
|
|
631
|
+
"location": "import",
|
|
632
|
+
"path": "../../recommendation/events"
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}, {
|
|
637
|
+
"method": "vviinnProductView",
|
|
638
|
+
"name": "vviinnProductView",
|
|
639
|
+
"bubbles": true,
|
|
640
|
+
"cancelable": true,
|
|
641
|
+
"composed": true,
|
|
642
|
+
"docs": {
|
|
643
|
+
"tags": [],
|
|
644
|
+
"text": "Event fires ones when recommendation appears on the viewport"
|
|
645
|
+
},
|
|
646
|
+
"complexType": {
|
|
647
|
+
"original": "ProductCardEventData",
|
|
648
|
+
"resolved": "{ widgetType: \"VPR\" | \"VPS\"; campaignTypeId: \"VPR\" | \"VCS\" | \"VPS\"; campaignTypeName: \"Similar Products\" | \"Visual Search\" | \"Cross-Selling\"; widgetId: string; widgetVersion: string; productId: string; productRank: number; productName: string; productType: string; clickEvent?: MouseEvent; discount?: number; }",
|
|
649
|
+
"references": {
|
|
650
|
+
"ProductCardEventData": {
|
|
651
|
+
"location": "import",
|
|
652
|
+
"path": "../../recommendation/events"
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}];
|
|
657
|
+
}
|
|
598
658
|
static get elementRef() { return "el"; }
|
|
599
659
|
static get watchers() {
|
|
600
660
|
return [{
|
|
@@ -81,7 +81,7 @@ export class VviinnVprWidget {
|
|
|
81
81
|
this.currencySign = "€";
|
|
82
82
|
this.pricePrefix = "";
|
|
83
83
|
this.mode = "continuity";
|
|
84
|
-
this.campaignType = "VPR";
|
|
84
|
+
this.campaignType = this.mode === "set" ? "VCS" : "VPR";
|
|
85
85
|
this.locale = "de-DE";
|
|
86
86
|
this.campaigns = "";
|
|
87
87
|
this.color = "";
|
|
@@ -559,7 +559,7 @@ export class VviinnVprWidget {
|
|
|
559
559
|
},
|
|
560
560
|
"attribute": "campaign-type",
|
|
561
561
|
"reflect": false,
|
|
562
|
-
"defaultValue": "\"VPR\""
|
|
562
|
+
"defaultValue": "this.mode === \"set\" ? \"VCS\" : \"VPR\""
|
|
563
563
|
},
|
|
564
564
|
"locale": {
|
|
565
565
|
"type": "string",
|
|
@@ -38,7 +38,7 @@ vviinn-overlayed-modal.first-screen::part(secondary-action) {
|
|
|
38
38
|
overflow-y: auto;
|
|
39
39
|
flex-direction: column;
|
|
40
40
|
justify-content: center;
|
|
41
|
-
padding:
|
|
41
|
+
padding: 40px 62px;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
#start-page_block.error {
|
|
@@ -308,7 +308,7 @@ vviinn-preloader {
|
|
|
308
308
|
overflow-y: unset;
|
|
309
309
|
min-height: -moz-fit-content;
|
|
310
310
|
min-height: fit-content;
|
|
311
|
-
padding: 24px 20px;
|
|
311
|
+
padding: 24px 20px 20px;
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
.products-wrapper {
|
|
@@ -3860,7 +3860,7 @@ const VviinnImageView = class {
|
|
|
3860
3860
|
};
|
|
3861
3861
|
VviinnImageView.style = vviinnImageViewCss;
|
|
3862
3862
|
|
|
3863
|
-
const vviinnModalCss = ":host{background:white;border-radius:24px;box-sizing:border-box;display:grid;grid-template-rows:min-content auto;max-width:960px;overflow:auto;position:relative}.head{position:absolute;width:100%;box-sizing:border-box;display:flex;align-items:center;z-index:1;padding:16px}.title{display:flex;align-items:center;transform:translateX(-6px);font-weight:600;font-size:18px;line-height:24px;margin:0 auto}.title-image{border-radius:50%;border:1px solid rgb(244, 244, 244);-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;margin-right:8px}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:grid;padding:6px;color:#8d8d8d}button:hover{color:#000}@media (max-width: 768px){:host{animation-name:fade-in;animation-duration:0.5s;animation-fill-mode:forwards;border-radius:24px 24px 0 0}:host(.closed){animation-name:fade-out;animation-fill-mode:none}.head{z-index:1}:host(:not(.first-screen)) .head{position:sticky;background:#ffffff}.body{overflow-y:auto}:host(:not(.first-screen)) .body{padding-bottom:
|
|
3863
|
+
const vviinnModalCss = ":host{background:white;border-radius:24px;box-sizing:border-box;display:grid;grid-template-rows:min-content auto;max-width:960px;overflow:auto;position:relative}.head{position:absolute;width:100%;box-sizing:border-box;display:flex;align-items:center;z-index:1;padding:16px}.title{display:flex;align-items:center;transform:translateX(-6px);font-weight:600;font-size:18px;line-height:24px;margin:0 auto}.title-image{border-radius:50%;border:1px solid rgb(244, 244, 244);-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;margin-right:8px}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:grid;padding:6px;color:#8d8d8d}button:hover{color:#000}@media (max-width: 768px){:host{animation-name:fade-in;animation-duration:0.5s;animation-fill-mode:forwards;border-radius:24px 24px 0 0}:host(.closed){animation-name:fade-out;animation-fill-mode:none}.head{z-index:1}:host(:not(.first-screen)) .head{position:sticky;background:#ffffff}.body{overflow-y:auto}:host(:not(.first-screen)) .body{padding-bottom:160px}.title{color:#161616;display:flex;align-items:center;font-weight:500;font-size:16px;line-height:24px;margin:0 auto}.title-image{border-radius:50%;border:1px solid rgb(244, 244, 244);-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;margin-right:8px}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:grid;color:#6f6f6f;padding:0}button:hover{color:#000}:host(.first-screen) button,:host(.first-screen) button:hover{color:white}}@keyframes fade-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes fade-out{from{transform:translateY(0)}to{transform:translateY(100%)}}";
|
|
3864
3864
|
|
|
3865
3865
|
const VviinnModal = class {
|
|
3866
3866
|
constructor(hostRef) {
|
|
@@ -3927,7 +3927,7 @@ const VviinnOverlay = class {
|
|
|
3927
3927
|
};
|
|
3928
3928
|
VviinnOverlay.style = vviinnOverlayCss;
|
|
3929
3929
|
|
|
3930
|
-
const vviinnOverlayedModalCss = ":host{display:none}:host(.active){display:block}vviinn-overlay{align-items:center;display:grid;justify-items:center;cursor:default}vviinn-modal{margin-left:24px;margin-right:24px}@media (max-width: 768px){vviinn-modal{height:100vh;
|
|
3930
|
+
const vviinnOverlayedModalCss = ":host{display:none}:host(.active){display:block}vviinn-overlay{align-items:center;display:grid;justify-items:center;cursor:default}vviinn-modal{margin-left:24px;margin-right:24px}@media (max-width: 768px){vviinn-modal{height:100vh;margin-top:64px;transform:translateY(100%);width:100vw;margin-left:0;margin-right:0}vviinn-overlay{align-items:end;display:grid;justify-items:center}}";
|
|
3931
3931
|
|
|
3932
3932
|
const VviinnOverlayedModal = class {
|
|
3933
3933
|
constructor(hostRef) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { h, r as registerInstance,
|
|
1
|
+
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement, F as Fragment } from './index-abf408d8.js';
|
|
2
2
|
import { h as has, t as tuple, s as searchState, _ as _function, a as _Array, O as Option, S as Semigroup, E as Either, p as pipe, c as chainW, m as makeRequest, f as fromEither, g as getApiPath, b as createInitPostRequest, A as Apply, d as state, T as TaskEither } from './search.store-5c685b20.js';
|
|
3
|
+
import { c as campaignTypeNames, s as slotChangeListener, f as fromString, a as fold, S as SlotSkeleton } from './customized-slots-f69bec7d.js';
|
|
3
4
|
import { i as instance } from './i18next-387f2b0a.js';
|
|
4
5
|
import { P as PlusIcon } from './PlusIcon-8f8206c3.js';
|
|
5
|
-
import {
|
|
6
|
-
import { v as version } from './package-6df9129f.js';
|
|
6
|
+
import { v as version } from './package-d3e52cfc.js';
|
|
7
7
|
import { v as v4, c as createTrackingApi, r as resources, a as createAddToBasketVpcEvent, b as createAddToBasketVprEvent, d as createWidgetVpcEvent, e as createWidgetVprEvent, f as createResultVpcEventByType, g as createResultVprEventByType, h as createProductVpcEventByType, i as createProductVprEventByType } from './resources-da0af18a.js';
|
|
8
8
|
|
|
9
9
|
const BasketIcon = () => (h("svg", { width: "25", height: "24", viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -120,6 +120,8 @@ const vviinnCarouselCss = ":host{--vviinn-carousel-columns-internal:var(--vviinn
|
|
|
120
120
|
const VviinnCarousel = class {
|
|
121
121
|
constructor(hostRef) {
|
|
122
122
|
registerInstance(this, hostRef);
|
|
123
|
+
this.vviinnProductLoad = createEvent(this, "vviinnProductLoad", 7);
|
|
124
|
+
this.vviinnProductView = createEvent(this, "vviinnProductView", 7);
|
|
123
125
|
this.columns = 0;
|
|
124
126
|
this.resizeObserver = new ResizeObserver(() => this.handleResize());
|
|
125
127
|
this.defaultAnimationInterval = 2000;
|
|
@@ -134,8 +136,10 @@ const VviinnCarousel = class {
|
|
|
134
136
|
const recommendationIndex = this.recommendations.indexOf(clickedProduct);
|
|
135
137
|
const newCrossSellingRecommendations = this.crossSellingRecommendations;
|
|
136
138
|
if (recommendationIndex + step < this.recommendations.length) {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
+
const newRecommendation = this.recommendations[recommendationIndex + step];
|
|
140
|
+
newCrossSellingRecommendations[crossSellingIndex] = newRecommendation;
|
|
141
|
+
const productData = this.getProductData(newRecommendation, recommendationIndex + step);
|
|
142
|
+
this.vviinnProductLoad.emit(productData);
|
|
139
143
|
this.crossSellingRecommendations = [...newCrossSellingRecommendations];
|
|
140
144
|
let element = this.el.querySelector(`[data-id="${productId}"]`);
|
|
141
145
|
const button = element.shadowRoot.querySelector(".update-button");
|
|
@@ -146,6 +150,7 @@ const VviinnCarousel = class {
|
|
|
146
150
|
if (recommendationIndex + step * 2 <= this.recommendations.length - 1) {
|
|
147
151
|
button === null || button === void 0 ? void 0 : button.classList.remove("hidden");
|
|
148
152
|
}
|
|
153
|
+
this.vviinnProductView.emit(productData);
|
|
149
154
|
clearTimeout(animationTimer);
|
|
150
155
|
}, animationInterval);
|
|
151
156
|
}
|
|
@@ -173,6 +178,19 @@ const VviinnCarousel = class {
|
|
|
173
178
|
this.pricePrefix = "";
|
|
174
179
|
this.locale = undefined;
|
|
175
180
|
}
|
|
181
|
+
getProductData(recommendation, productRank) {
|
|
182
|
+
return {
|
|
183
|
+
productId: recommendation.productId,
|
|
184
|
+
productRank,
|
|
185
|
+
productName: recommendation.productTitle,
|
|
186
|
+
productType: recommendation.productType,
|
|
187
|
+
widgetType: "VPR",
|
|
188
|
+
campaignTypeId: this.campaignTypeId,
|
|
189
|
+
campaignTypeName: campaignTypeNames[this.campaignTypeId],
|
|
190
|
+
widgetId: this.widgetElementId,
|
|
191
|
+
widgetVersion: this.widgetVersion,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
176
194
|
componentWillLoad() {
|
|
177
195
|
this.isRTL = document.dir === "rtl";
|
|
178
196
|
}
|
|
@@ -1402,7 +1420,7 @@ const VviinnVprWidget = class {
|
|
|
1402
1420
|
this.currencySign = "€";
|
|
1403
1421
|
this.pricePrefix = "";
|
|
1404
1422
|
this.mode = "continuity";
|
|
1405
|
-
this.campaignType = "VPR";
|
|
1423
|
+
this.campaignType = this.mode === "set" ? "VCS" : "VPR";
|
|
1406
1424
|
this.locale = "de-DE";
|
|
1407
1425
|
this.campaigns = "";
|
|
1408
1426
|
this.color = "";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-abf408d8.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-d3e52cfc.js';
|
|
3
3
|
import { V as VisualSearchIcon } from './VisualSearchIcon-b301a1d4.js';
|
|
4
4
|
|
|
5
5
|
const vviinnVprButtonCss = ":host{display:block}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-abf408d8.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-d3e52cfc.js';
|
|
3
3
|
import { c as campaignTypeNames, S as SlotSkeleton } from './customized-slots-f69bec7d.js';
|
|
4
4
|
import { D as DEFAULT_EXAMPLE_IMAGE } from './constants-8bf233a9.js';
|
|
5
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, F as Fragment, H as Host, g as getElement } from './index-abf408d8.js';
|
|
2
2
|
import { s as searchState, j as processSelectedText, d as state, k as parseExcludedToParams, O as Option } from './search.store-5c685b20.js';
|
|
3
3
|
import { i as instance } from './i18next-387f2b0a.js';
|
|
4
|
-
import { v as version } from './package-
|
|
4
|
+
import { v as version } from './package-d3e52cfc.js';
|
|
5
5
|
import { c as campaignTypeNames, s as slotChangeListener, S as SlotSkeleton } from './customized-slots-f69bec7d.js';
|
|
6
6
|
import { r as resources, j as createSearchEvent, k as createFilterEvent, v as v4, c as createTrackingApi, l as createWidgetVpsEvent, m as createProductVpsEventByType, n as createResultVpsEventByType } from './resources-da0af18a.js';
|
|
7
7
|
import { D as DEFAULT_EXAMPLE_IMAGE } from './constants-8bf233a9.js';
|
|
@@ -30,7 +30,7 @@ const checkDeviceType = () => {
|
|
|
30
30
|
return "desktop";
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
const vviinnVpsWidgetCss = ":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{display:block}.hidden{visibility:hidden;height:1px}vviinn-overlayed-modal.first-screen::part(title),vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:hidden}.start-page{display:grid;grid-template-columns:repeat(2, 1fr);height:640px}#start-page_block{box-sizing:border-box;display:flex;overflow-y:auto;flex-direction:column;justify-content:center;padding:
|
|
33
|
+
const vviinnVpsWidgetCss = ":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{display:block}.hidden{visibility:hidden;height:1px}vviinn-overlayed-modal.first-screen::part(title),vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:hidden}.start-page{display:grid;grid-template-columns:repeat(2, 1fr);height:640px}#start-page_block{box-sizing:border-box;display:flex;overflow-y:auto;flex-direction:column;justify-content:center;padding:40px 62px}#start-page_block.error{align-content:center}.start-page_main-content{flex-grow:1;display:flex;flex-direction:column;justify-content:center}.start-page_errors-block{display:flex;flex-direction:column;justify-content:center;gap:12px}#start-page_block vviinn-text-search{margin-top:12px}.buttons-group{display:flex;flex-direction:column;gap:12px;margin-top:24px}.action-button{font-family:inherit;display:grid;border:none;cursor:pointer;align-items:center;border-radius:8px;font-size:16px;height:48px;justify-items:center;transition:background 0.1s ease-in-out;color:#525252;background-color:#f4f4f4}.action-button:hover{background-color:#eaeaea}.action-button:first-child{background:var(--color-primary, var(--color-primary-system));border-color:var(--color-primary, var(--color-primary-system));color:white}.action-button:first-child:hover{background:var(--color-primary-hover, var(--color-primary-hover-system));border-color:var(--color-primary-hover, var(--color-primary-hover-system))}.action-button:active{border-color:black}.action-button-content{display:grid;align-items:center;justify-items:start;justify-content:center;grid-template-columns:max-content auto;grid-gap:8px}.action-button .hidden{display:none}.results-page{margin-top:64px;display:grid;grid-template-columns:336px auto;box-sizing:border-box}.results-page>*{padding:24px;box-sizing:border-box}vviinn-empty-results{width:280px;align-self:center;justify-self:center}.source-wrapper{display:grid;grid-template-rows:min-content 1fr;min-width:100%}.results-page .source-wrapper.text-search-wrapper{padding:24px 24px 0 24px}.filters-wrapper{margin-top:24px;overflow-x:auto;transform:translateX(-24px);min-width:calc(100% + 48px)}.products-wrapper{display:grid;overflow-y:auto;overflow-x:hidden;padding:unset;position:relative;width:100%}.products{width:100%;align-content:center;align-items:start;box-sizing:border-box;display:grid;grid-gap:32px 16px;grid-template-columns:repeat(auto-fill, minmax(130px, 1fr));justify-items:center;padding:24px;position:absolute}.products.hidden{display:none}vviinn-product-card{gap:0;width:100%}vviinn-product-card::part(image){border:1px solid #eaeaea;margin-bottom:8px}vviinn-product-card::part(price-container),vviinn-product-card::part(deeplink),vviinn-product-card::part(title){align-self:start}search-filters span{display:none}search-filters::part(filter){background:#f4f4f4;border-radius:8px;box-sizing:border-box;color:#161616;font-size:14px;font-weight:400;line-height:20px}search-filters::part(show-more-filters){display:flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid #f4f4f4;min-width:40px;height:40px;border-radius:100px;box-sizing:border-box;color:#161616}search-filters::part(show-more-filters):hover{background:#eaeaea}search-filters::part(filter active){background:var(--color-primary, var(--color-primary-system));color:white}.results-page:not(.active){display:none}.nothing-found{display:grid;grid-gap:64px;justify-self:center;padding-top:64px;padding-bottom:16px;position:absolute;width:60%}vviinn-preloader{--preloader-size:24px;display:flex}@media (max-width: 1080px){#start-page_block{padding:24px 36px}}@media (max-width: 768px){.start-page{display:flex;flex-direction:column;height:100%}vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:visible}.start-page.active{height:calc(100vh - 64px);height:calc(100svh - 64px)}.start-page:not(.active){overflow:hidden}.results-page{margin-top:0}.results-page>*{box-sizing:border-box;padding:12px 24px 24px}.source-wrapper{grid-template-rows:min-content auto;width:100%;padding:0}.source-wrapper.image-wrapper .filters-wrapper{padding-left:24px;min-width:100%}.image{margin-bottom:8px}.results-page{grid-template-rows:min-content;grid-template-columns:unset}#start-page_block{overflow-y:unset;min-height:-moz-fit-content;min-height:fit-content;padding:24px 20px 20px}.products-wrapper{align-content:start;position:static;overflow-y:unset;width:100%;padding-top:0;margin-top:24px}.products{position:static;padding:0;width:unset;grid-gap:32px 16px;justify-content:center}.nothing-found{position:static;grid-gap:64px;padding:unset;align-content:start;width:unset}}@media (max-width: 480px){.start-page{padding-top:0}.action-button-content{grid-gap:10px}}@media (max-width: 380px){.products{grid-gap:24px 10px}}vviinn-wrong-format,vviinn-server-error{width:280px;align-self:center;justify-self:center}.visually-hidden{clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}";
|
|
34
34
|
|
|
35
35
|
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
36
36
|
var t = {};
|
|
@@ -57,6 +57,7 @@ export declare const getRecommendationsService: (campaignType: C.CampaignName) =
|
|
|
57
57
|
interactions?: {
|
|
58
58
|
filters: ({
|
|
59
59
|
column: string;
|
|
60
|
+
label: string;
|
|
60
61
|
values: ({
|
|
61
62
|
value: string | number;
|
|
62
63
|
label: string;
|
|
@@ -68,6 +69,7 @@ export declare const getRecommendationsService: (campaignType: C.CampaignName) =
|
|
|
68
69
|
})[];
|
|
69
70
|
} | {
|
|
70
71
|
column: string;
|
|
72
|
+
label: string;
|
|
71
73
|
full: {
|
|
72
74
|
start?: number;
|
|
73
75
|
end?: number;
|
|
@@ -149,6 +151,7 @@ export declare const getRecommendationsService: (campaignType: C.CampaignName) =
|
|
|
149
151
|
interactions?: {
|
|
150
152
|
filters: ({
|
|
151
153
|
column: string;
|
|
154
|
+
label: string;
|
|
152
155
|
values: ({
|
|
153
156
|
value: string | number;
|
|
154
157
|
label: string;
|
|
@@ -160,6 +163,7 @@ export declare const getRecommendationsService: (campaignType: C.CampaignName) =
|
|
|
160
163
|
})[];
|
|
161
164
|
} | {
|
|
162
165
|
column: string;
|
|
166
|
+
label: string;
|
|
163
167
|
full: {
|
|
164
168
|
start?: number;
|
|
165
169
|
end?: number;
|
|
@@ -39,6 +39,7 @@ export declare const getVCSRecommendations: (body: CrossSellingRequest) => (opti
|
|
|
39
39
|
interactions?: {
|
|
40
40
|
filters: ({
|
|
41
41
|
column: string;
|
|
42
|
+
label: string;
|
|
42
43
|
values: ({
|
|
43
44
|
value: string | number;
|
|
44
45
|
label: string;
|
|
@@ -50,6 +51,7 @@ export declare const getVCSRecommendations: (body: CrossSellingRequest) => (opti
|
|
|
50
51
|
})[];
|
|
51
52
|
} | {
|
|
52
53
|
column: string;
|
|
54
|
+
label: string;
|
|
53
55
|
full: {
|
|
54
56
|
start?: number;
|
|
55
57
|
end?: number;
|
|
@@ -39,6 +39,7 @@ export declare const getVPRRecommendations: (body: SimilarProductsRequest) => (o
|
|
|
39
39
|
interactions?: {
|
|
40
40
|
filters: ({
|
|
41
41
|
column: string;
|
|
42
|
+
label: string;
|
|
42
43
|
values: ({
|
|
43
44
|
value: string | number;
|
|
44
45
|
label: string;
|
|
@@ -50,6 +51,7 @@ export declare const getVPRRecommendations: (body: SimilarProductsRequest) => (o
|
|
|
50
51
|
})[];
|
|
51
52
|
} | {
|
|
52
53
|
column: string;
|
|
54
|
+
label: string;
|
|
53
55
|
full: {
|
|
54
56
|
start?: number;
|
|
55
57
|
end?: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { EventEmitter } from "../../stencil-public-runtime";
|
|
1
2
|
import { Recommendation } from "../../recommendation/recommendation";
|
|
2
3
|
import { CampaignTypeId } from "../../campaign/Campaign";
|
|
3
|
-
import { CrossSellingClickEvent, ProductCardEvent } from "../../recommendation/events";
|
|
4
|
+
import { CrossSellingClickEvent, ProductCardEvent, ProductCardEventData } from "../../recommendation/events";
|
|
4
5
|
import { UpdateButtonLocation } from "../vviinn-vpr-widget/vviinn-vpr-widget";
|
|
5
6
|
import { Locale } from "../../locale";
|
|
6
7
|
type MoveDirection = "left" | "right";
|
|
@@ -34,6 +35,10 @@ export declare class VviinnCarousel {
|
|
|
34
35
|
currencySign: string;
|
|
35
36
|
pricePrefix: string;
|
|
36
37
|
locale: Locale;
|
|
38
|
+
/** Event fires ones when recommendation rendered on page */
|
|
39
|
+
vviinnProductLoad: EventEmitter<ProductCardEventData>;
|
|
40
|
+
/** Event fires ones when recommendation appears on the viewport */
|
|
41
|
+
vviinnProductView: EventEmitter<ProductCardEventData>;
|
|
37
42
|
private columns;
|
|
38
43
|
private resizeObserver;
|
|
39
44
|
private isSetMode;
|
|
@@ -41,6 +46,7 @@ export declare class VviinnCarousel {
|
|
|
41
46
|
private isContinuityMode;
|
|
42
47
|
private defaultAnimationInterval;
|
|
43
48
|
private sourceProduct?;
|
|
49
|
+
private getProductData;
|
|
44
50
|
private mutationObserver;
|
|
45
51
|
private handleWindowResize;
|
|
46
52
|
private isLastGroup;
|
|
@@ -476,6 +476,10 @@ export interface SearchFiltersCustomEvent<T> extends CustomEvent<T> {
|
|
|
476
476
|
detail: T;
|
|
477
477
|
target: HTMLSearchFiltersElement;
|
|
478
478
|
}
|
|
479
|
+
export interface VviinnCarouselCustomEvent<T> extends CustomEvent<T> {
|
|
480
|
+
detail: T;
|
|
481
|
+
target: HTMLVviinnCarouselElement;
|
|
482
|
+
}
|
|
479
483
|
export interface VviinnDetectedObjectCustomEvent<T> extends CustomEvent<T> {
|
|
480
484
|
detail: T;
|
|
481
485
|
target: HTMLVviinnDetectedObjectElement;
|
|
@@ -743,6 +747,14 @@ declare namespace LocalJSX {
|
|
|
743
747
|
"imageWidth"?: number;
|
|
744
748
|
"locale"?: Locale;
|
|
745
749
|
"mode"?: CarouselMode;
|
|
750
|
+
/**
|
|
751
|
+
* Event fires ones when recommendation rendered on page
|
|
752
|
+
*/
|
|
753
|
+
"onVviinnProductLoad"?: (event: VviinnCarouselCustomEvent<ProductCardEventData>) => void;
|
|
754
|
+
/**
|
|
755
|
+
* Event fires ones when recommendation appears on the viewport
|
|
756
|
+
*/
|
|
757
|
+
"onVviinnProductView"?: (event: VviinnCarouselCustomEvent<ProductCardEventData>) => void;
|
|
746
758
|
"pricePrefix"?: string;
|
|
747
759
|
"recommendations"?: Recommendation[];
|
|
748
760
|
"replaceSlotsContent"?: () => void;
|
|
@@ -427,11 +427,15 @@ export interface components {
|
|
|
427
427
|
"response-categorical-filter-item": {
|
|
428
428
|
/** @example product_type */
|
|
429
429
|
column: string;
|
|
430
|
+
/** @example Product Type */
|
|
431
|
+
label: string;
|
|
430
432
|
values: components["schemas"]["categorical-filter-value-item"][];
|
|
431
433
|
};
|
|
432
434
|
"response-interval-filter-item": {
|
|
433
435
|
/** @example price */
|
|
434
436
|
column: string;
|
|
437
|
+
/** @example Price */
|
|
438
|
+
label: string;
|
|
435
439
|
full: components["schemas"]["interval"];
|
|
436
440
|
suggestions: components["schemas"]["interval-filter-value-item"][];
|
|
437
441
|
};
|