vviinn-widgets 2.44.2 → 2.46.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/VisualSearchIcon-1180d079.js +8 -0
- package/dist/cjs/{customized-slots-49c03dc1.js → customized-slots-1b59bd38.js} +1 -0
- package/dist/cjs/{index-7ff2ab5f.js → index-279a6a0f.js} +75 -75
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-5912f89d.js → package-3b910c03.js} +1 -1
- package/dist/cjs/{search-filters_16.cjs.entry.js → search-filters_17.cjs.entry.js} +116 -55
- package/dist/cjs/{imageSearch.store-dc4e98b3.js → search.store-0b319593.js} +55 -21
- package/dist/cjs/vviinn-button.cjs.entry.js +2 -2
- package/dist/cjs/vviinn-carousel_4.cjs.entry.js +60 -51
- package/dist/cjs/vviinn-preloader.cjs.entry.js +2 -2
- package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +4 -2
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +3 -3
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +7 -4
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +65 -40
- package/dist/cjs/vviinn-widgets.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/customized-slots.js +1 -0
- package/dist/collection/components/image-search/search-filters/search-filters.js +5 -5
- package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +2 -1
- package/dist/collection/components/vviinn-example-image/vviinn-example-image.js +1 -1
- package/dist/collection/components/vviinn-icons/icons/ArrowIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/BasketIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/CameraActionIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/CameraIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/CheckCircleIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/CheckIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/ChevronIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/CloseIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/CrossIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/GalleryActionIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/LoaderIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/MinusIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/PlusIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/RoundCameraIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/SecondaryActionIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/TextSearchIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/UpdateIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/UploadActionIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/VisualSearchIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/WarningIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/index.js +20 -18
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +1 -1
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +7 -7
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +7 -8
- package/dist/collection/components/vviinn-modal/vviinn-modal.js +2 -2
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +2 -2
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +1 -0
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +2 -2
- package/dist/collection/components/vviinn-text-search/vviinn-text-search.css +63 -0
- package/dist/collection/components/vviinn-text-search/vviinn-text-search.js +118 -0
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +7 -4
- package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +2 -0
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +20 -1
- package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +2 -0
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +15 -1
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +77 -31
- package/dist/collection/locale/resources-vps.js +2 -0
- package/dist/collection/network/request.js +1 -1
- package/dist/collection/searchSession/searchSession.js +5 -10
- package/dist/collection/store/{imageSearch.store.js → search.store.js} +34 -5
- package/dist/esm/VisualSearchIcon-13f7da6a.js +6 -0
- package/dist/esm/{customized-slots-9a9f8c20.js → customized-slots-3bea41d2.js} +1 -0
- package/dist/esm/{index-53105ad4.js → index-9c15b8f1.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-b2424850.js → package-cae9f186.js} +1 -1
- package/dist/esm/{search-filters_16.entry.js → search-filters_17.entry.js} +85 -25
- package/dist/esm/{imageSearch.store-c0f2a178.js → search.store-5eebcfbe.js} +54 -21
- package/dist/esm/vviinn-button.entry.js +1 -1
- package/dist/esm/vviinn-carousel_4.entry.js +19 -10
- package/dist/esm/vviinn-preloader.entry.js +2 -2
- package/dist/esm/vviinn-recommendations-sidebar.entry.js +4 -2
- package/dist/esm/vviinn-vpr-button.entry.js +2 -2
- package/dist/esm/vviinn-vps-button.entry.js +8 -5
- package/dist/esm/vviinn-vps-widget.entry.js +61 -36
- package/dist/esm/vviinn-widgets.js +1 -1
- package/dist/types/components/vviinn-icons/icons/ArrowIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/BasketIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/CameraActionIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/CameraIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/CheckCircleIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/CheckIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/ChevronIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/CloseIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/CrossIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/GalleryActionIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/LoaderIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/MinusIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/PlusIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/RoundCameraIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/SecondaryActionIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/TextSearchIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/UpdateIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/UploadActionIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/VisualSearchIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/WarningIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/index.d.ts +20 -17
- package/dist/types/components/vviinn-text-search/vviinn-text-search.d.ts +18 -0
- package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +1 -0
- package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +2 -0
- package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +9 -0
- package/dist/types/components.d.ts +37 -0
- package/dist/types/network/request.d.ts +1 -1
- package/dist/types/searchSession/searchSession.d.ts +17 -3
- package/dist/types/store/{imageSearch.store.d.ts → search.store.d.ts} +6 -4
- package/{www/build/p-987a8e9f.js → dist/vviinn-widgets/p-04cdf7c5.js} +1 -1
- package/dist/vviinn-widgets/{p-7f2c9319.entry.js → p-185e2420.entry.js} +1 -1
- package/dist/vviinn-widgets/p-1a1d85b7.js +1 -0
- package/dist/vviinn-widgets/p-3d2759e3.entry.js +1 -0
- package/dist/vviinn-widgets/{p-da7273ce.js → p-41ab810c.js} +1 -1
- package/dist/vviinn-widgets/{p-ed082ecf.entry.js → p-4c726a51.entry.js} +1 -1
- package/dist/vviinn-widgets/p-ae471f24.entry.js +11 -0
- package/dist/vviinn-widgets/p-b21ebac9.js +1 -0
- package/dist/vviinn-widgets/p-c96f5909.entry.js +1 -0
- package/dist/vviinn-widgets/p-d1592ac5.entry.js +1 -0
- package/dist/vviinn-widgets/p-d162fe72.entry.js +1 -0
- package/dist/vviinn-widgets/{p-010b4979.entry.js → p-ec7b07a0.entry.js} +1 -1
- package/dist/vviinn-widgets/p-ed482314.js +1 -0
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/{dist/vviinn-widgets/p-987a8e9f.js → www/build/p-04cdf7c5.js} +1 -1
- package/www/build/{p-7f2c9319.entry.js → p-185e2420.entry.js} +1 -1
- package/www/build/p-1a1d85b7.js +1 -0
- package/www/build/p-3d2759e3.entry.js +1 -0
- package/www/build/{p-da7273ce.js → p-41ab810c.js} +1 -1
- package/www/build/{p-ed082ecf.entry.js → p-4c726a51.entry.js} +1 -1
- package/www/build/p-ae471f24.entry.js +11 -0
- package/www/build/p-b21ebac9.js +1 -0
- package/www/build/p-c96f5909.entry.js +1 -0
- package/www/build/p-d1592ac5.entry.js +1 -0
- package/www/build/p-d162fe72.entry.js +1 -0
- package/www/build/{p-010b4979.entry.js → p-ec7b07a0.entry.js} +1 -1
- package/www/build/p-ed482314.js +1 -0
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/dist/cjs/index-28052f80.js +0 -48
- package/dist/esm/index-ac58a953.js +0 -34
- package/dist/vviinn-widgets/p-044c5f45.entry.js +0 -1
- package/dist/vviinn-widgets/p-726774f9.js +0 -1
- package/dist/vviinn-widgets/p-7f19baa1.js +0 -1
- package/dist/vviinn-widgets/p-a7cc44b3.entry.js +0 -1
- package/dist/vviinn-widgets/p-ab938400.entry.js +0 -1
- package/dist/vviinn-widgets/p-b1e9dd46.entry.js +0 -1
- package/dist/vviinn-widgets/p-c8ef8d6c.js +0 -1
- package/dist/vviinn-widgets/p-ecd1c141.entry.js +0 -11
- package/www/build/p-044c5f45.entry.js +0 -1
- package/www/build/p-726774f9.js +0 -1
- package/www/build/p-7f19baa1.js +0 -1
- package/www/build/p-a7cc44b3.entry.js +0 -1
- package/www/build/p-ab938400.entry.js +0 -1
- package/www/build/p-b1e9dd46.entry.js +0 -1
- package/www/build/p-c8ef8d6c.js +0 -1
- package/www/build/p-ecd1c141.entry.js +0 -11
|
@@ -3,12 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-5619b5ec.js');
|
|
6
|
-
const
|
|
7
|
-
const index$1 = require('./index-28052f80.js');
|
|
6
|
+
const search_store = require('./search.store-0b319593.js');
|
|
8
7
|
const i18next = require('./i18next-74ff3413.js');
|
|
9
|
-
const customizedSlots = require('./customized-slots-
|
|
10
|
-
const _package = require('./package-
|
|
11
|
-
const index$
|
|
8
|
+
const customizedSlots = require('./customized-slots-1b59bd38.js');
|
|
9
|
+
const _package = require('./package-3b910c03.js');
|
|
10
|
+
const index$1 = require('./index-279a6a0f.js');
|
|
11
|
+
|
|
12
|
+
const ChevronIcon = () => (index.h("svg", { width: "9", height: "16", xmlns: "http://www.w3.org/2000/svg" },
|
|
13
|
+
index.h("path", { d: "m9 8-7.895 8L0 14.88 6.79 8 0 1.12 1.105 0 9 8Z" })));
|
|
14
|
+
|
|
15
|
+
const UpdateIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
|
|
16
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M23.5998 4.57C20.3898 4.19 19.8798 3.68 19.4198 0.37C19.3798 0.15 19.2198 0 19.0098 0C18.7998 0 18.6298 0.15 18.5898 0.37C18.1198 3.66 17.6298 4.13 14.4098 4.57C14.1698 4.61 14.0098 4.77 14.0098 5C14.0098 5.23 14.1698 5.39 14.4098 5.42C17.6298 5.81 18.1398 6.31 18.5898 9.62C18.6298 9.84 18.7998 10 19.0098 10C19.2198 10 19.3898 9.84 19.4198 9.62C19.8898 6.31 20.3898 5.81 23.5998 5.42C23.8398 5.38 23.9998 5.22 23.9998 5C23.9998 4.78 23.8298 4.6 23.5998 4.57Z", fill: "currentColor" }),
|
|
17
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M19.93 13C19.43 13 19.01 13.37 18.95 13.86C18.52 17.36 15.51 20.06 11.89 20C8.24 19.94 5.15 16.92 5.01 13.27C4.92 10.79 6.13 8.58 8.01 7.27V11C8.01 11.55 8.46 12 9.01 12C9.56 12 10.01 11.55 10.01 11V5C10.01 4.45 9.56 4 9.01 4H3C2.45 4 2 4.45 2 5C2 5.55 2.45 6 3 6H6.35C4.24 7.71 2.91 10.35 3 13.3C3.15 17.98 7.06 21.87 11.74 22C16.45 22.13 20.37 18.65 20.93 14.13C21 13.53 20.53 13.01 19.93 13.01V13Z", fill: "currentColor" })));
|
|
12
18
|
|
|
13
19
|
const vviinnCarouselCss = ":host{--vviinn-progressbar-width:0;--vviinn-carousel-item-width:150px;--vviinn-carousel-columns-internal:var(--vviinn-carousel-columns, 4);--vviinn-carousel-image-width-system:140px}.body{display:flex;position:relative;width:var(--vviinn-carousel-content-width);flex-direction:column}.content-wrapper *{box-sizing:border-box}.content-wrapper{overflow-y:hidden;overflow-x:auto;flex-grow:1}.bullets{margin-top:16px;display:flex;flex-direction:row;grid-gap:24px;justify-content:center}.bullet{width:10px;height:10px;background:#e0e0e0;border-radius:50%;cursor:pointer}.bullet.active{background:#161616}.content:not(.show-scrollbar),.content.grid{scrollbar-color:#fff0 #fff0}.content:not(.show-scrollbar)::-webkit-scrollbar,.content.grid::-webkit-scrollbar{opacity:0}.content{display:flex;flex-direction:row;grid-gap:8px;overflow-y:hidden;overflow-x:auto;flex-grow:1;padding-bottom:16px}.content.left>*{scroll-snap-align:start}.content.right>*{scroll-snap-align:end}:host(.continuity) .prev,:host(.continuity) .next{border-radius:2px}:host(.grid) .prev,:host(.grid) .next{border-radius:50%}.prev,.next{align-items:center;background-color:white;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);fill:#525252;cursor:pointer;display:grid;height:40px;justify-items:center;position:absolute;top:calc(50% - 20px);width:40px;z-index:1;padding:0;margin:0}.next:disabled,.prev:disabled{display:none}.prev svg{transform:rotate(180deg);margin-left:-5px}.prev{left:0}.next{right:0}.items-group{display:grid;grid-gap:16px;grid-template-columns:repeat(var(--vviinn-carousel-columns-internal), 1fr);min-width:100%}vviinn-product-card::part(price-container){text-align:center}:host(.classic) vviinn-product-card::part(title),:host(.classic) vviinn-product-card::part(brand),:host(.classic) vviinn-product-card::part(type){text-align:center}@media (max-width: 480px){:host(.modern) button{display:none}.items-group{grid-template-columns:repeat(2, 1fr)}}";
|
|
14
20
|
|
|
@@ -263,7 +269,7 @@ const VviinnCarousel = class {
|
|
|
263
269
|
}
|
|
264
270
|
renderGrid() {
|
|
265
271
|
const recommendations = this.renderRecommendationsElements();
|
|
266
|
-
const grouppedContent =
|
|
272
|
+
const grouppedContent = search_store._Array.chunksOf(this.getColumnsNumber())(recommendations);
|
|
267
273
|
return this.renderRecommendationGroups(grouppedContent);
|
|
268
274
|
}
|
|
269
275
|
renderBullets() {
|
|
@@ -275,7 +281,7 @@ const VviinnCarousel = class {
|
|
|
275
281
|
}, onClick: () => this.scroll(index$1) })));
|
|
276
282
|
}
|
|
277
283
|
render() {
|
|
278
|
-
return (index.h(index.Host, { class: this.getClassMap() }, index.h("div", { class: Object.assign({ body: true }, this.getClassMap()) }, !this.isSetMode && (index.h("button", { class: "prev", onClick: () => this.showPrev(), part: "carousel-button", disabled: this.gridArrowsDynamic && this.isFirstGroup() }, index.h(
|
|
284
|
+
return (index.h(index.Host, { class: this.getClassMap() }, index.h("div", { class: Object.assign({ body: true }, this.getClassMap()) }, !this.isSetMode && (index.h("button", { class: "prev", onClick: () => this.showPrev(), part: "carousel-button", disabled: this.gridArrowsDynamic && this.isFirstGroup() }, index.h(ChevronIcon, null))), index.h("div", { class: this.getContentClassMap(), onScroll: () => this.processScrollbarWidth() }, this.renderRecommendations()), !this.isSetMode && (index.h("button", { class: "next", onClick: () => this.showNext(), part: "carousel-button", disabled: this.gridArrowsDynamic && this.isLastGroup() }, index.h(ChevronIcon, null)))), this.showBullets() && (index.h("div", { class: "bullets" }, this.renderBullets()))));
|
|
279
285
|
}
|
|
280
286
|
get el() { return index.getElement(this); }
|
|
281
287
|
static get watchers() { return {
|
|
@@ -353,9 +359,9 @@ class GAnalytics {
|
|
|
353
359
|
}
|
|
354
360
|
}
|
|
355
361
|
|
|
356
|
-
const getGtagAnalytics = () =>
|
|
357
|
-
const getCommonAnalytics = () =>
|
|
358
|
-
const analyticsMonoid =
|
|
362
|
+
const getGtagAnalytics = () => search_store._function.pipe(search_store.Option.fromNullable(window.gtag), search_store.Option.map(() => new GtagAnalytics()));
|
|
363
|
+
const getCommonAnalytics = () => search_store._function.pipe(search_store.Option.fromNullable(window.ga), search_store.Option.map(() => new GAnalytics()));
|
|
364
|
+
const analyticsMonoid = search_store.Option.getMonoid(search_store.Semigroup.first());
|
|
359
365
|
const getAnalyticsModule = analyticsMonoid.concat(getGtagAnalytics(), getCommonAnalytics());
|
|
360
366
|
|
|
361
367
|
/**
|
|
@@ -413,8 +419,8 @@ var tupleConstructors = {
|
|
|
413
419
|
5: function (a) { return function (b) { return function (c) { return function (d) { return function (e) { return [a, b, c, d, e]; }; }; }; }; }
|
|
414
420
|
};
|
|
415
421
|
function getTupleConstructor(len) {
|
|
416
|
-
if (!
|
|
417
|
-
tupleConstructors[len] = curried(
|
|
422
|
+
if (!search_store.has.call(tupleConstructors, len)) {
|
|
423
|
+
tupleConstructors[len] = curried(search_store.tuple, len - 1, []);
|
|
418
424
|
}
|
|
419
425
|
return tupleConstructors[len];
|
|
420
426
|
}
|
|
@@ -436,10 +442,10 @@ function sequenceT(F) {
|
|
|
436
442
|
|
|
437
443
|
const FIT_EXPR = /fit\/\d+\//;
|
|
438
444
|
const containsFit = (url) => {
|
|
439
|
-
return
|
|
445
|
+
return search_store._function.pipe(url.match(FIT_EXPR), search_store.Either.fromNullable(url), search_store.Either.map(() => url));
|
|
440
446
|
};
|
|
441
447
|
const processWidth = (url, size) => {
|
|
442
|
-
return
|
|
448
|
+
return search_store._function.pipe(containsFit(url), search_store.Either.map((url) => url.replace(FIT_EXPR, `fit/${size}/`)), search_store.Either.getOrElse(() => url));
|
|
443
449
|
};
|
|
444
450
|
const Linked = (props, child) => props.deeplink ? (index.h("a", { class: props.part, part: props.part, href: props.deeplink }, child)) : (child);
|
|
445
451
|
const FormattedPrice = (props) => {
|
|
@@ -484,7 +490,7 @@ const VviinnProductCard = class {
|
|
|
484
490
|
this.productData = null;
|
|
485
491
|
this.intersectionCallback = (data) => {
|
|
486
492
|
if (data.some((entry) => entry.isIntersecting)) {
|
|
487
|
-
|
|
493
|
+
search_store._function.pipe(getAnalyticsModule, search_store.Option.map((analytics) => analytics.sendImpression(this.getProduct())));
|
|
488
494
|
this.vviinnProductView.emit(this.productData);
|
|
489
495
|
this.intersectionObserver.disconnect();
|
|
490
496
|
}
|
|
@@ -573,7 +579,7 @@ const VviinnProductCard = class {
|
|
|
573
579
|
event.preventDefault();
|
|
574
580
|
event.stopImmediatePropagation();
|
|
575
581
|
this.vviinnProductClick.emit(Object.assign(Object.assign({}, this.productData), { clickEvent: event }));
|
|
576
|
-
|
|
582
|
+
search_store._function.pipe(getAnalyticsModule, search_store.Option.match(() => null, (analytics) => analytics.sendClick(this.getProduct())));
|
|
577
583
|
});
|
|
578
584
|
link.addEventListener("auxclick", () => {
|
|
579
585
|
this.vviinnAuxClick.emit(Object.assign({}, this.productData));
|
|
@@ -581,7 +587,7 @@ const VviinnProductCard = class {
|
|
|
581
587
|
});
|
|
582
588
|
}
|
|
583
589
|
getProduct() {
|
|
584
|
-
return
|
|
590
|
+
return search_store.searchState.results.find((r) => r.productId === this.productId);
|
|
585
591
|
}
|
|
586
592
|
renderImage() {
|
|
587
593
|
const props = {
|
|
@@ -604,7 +610,7 @@ const VviinnProductCard = class {
|
|
|
604
610
|
return (index.h(index.Host, { part: "product-card", class: {
|
|
605
611
|
dimmed: this.dimmedBackground,
|
|
606
612
|
animated: this.isTransitioning,
|
|
607
|
-
}, exportparts: "brand, currency, deeplink, image, image-link, price-amount-sale, price-amount-outdated, price-amount-regular, price-container, price-outdated, price-regular, price-sale, price-prefix, title, basket-button, update-button-item" }, index.h(Linked, { deeplink: this.deeplink, part: "image-link" }, this.renderImage()), this.isTransitioning ? (index.h(index.Fragment, null, index.h("vviinn-skeleton", { height: 20 }), index.h("vviinn-skeleton", { height: 20, halfWidth: true }))) : (index.h(index.Fragment, null, index.h(Linked, { deeplink: this.deeplink, part: "deeplink" }, index.h("span", { class: "title", part: "title" }, this.productTitle)), index.h("span", { class: "brand", part: "brand" }, this.brand), index.h("span", { class: "type", part: "type" }, this.productType), index.h(Price, { prefix: (_a = this.pricePrefix) !== null && _a !== void 0 ? _a :
|
|
613
|
+
}, exportparts: "brand, currency, deeplink, image, image-link, price-amount-sale, price-amount-outdated, price-amount-regular, price-container, price-outdated, price-regular, price-sale, price-prefix, title, basket-button, update-button-item" }, index.h(Linked, { deeplink: this.deeplink, part: "image-link" }, this.renderImage()), this.isTransitioning ? (index.h(index.Fragment, null, index.h("vviinn-skeleton", { height: 20 }), index.h("vviinn-skeleton", { height: 20, halfWidth: true }))) : (index.h(index.Fragment, null, index.h(Linked, { deeplink: this.deeplink, part: "deeplink" }, index.h("span", { class: "title", part: "title" }, this.productTitle)), index.h("span", { class: "brand", part: "brand" }, this.brand), index.h("span", { class: "type", part: "type" }, this.productType), index.h(Price, { prefix: (_a = this.pricePrefix) !== null && _a !== void 0 ? _a : search_store.state.pricePrefix, currency: (_b = this.currency) !== null && _b !== void 0 ? _b : search_store.state.currencySign, price: this.price, salePrice: this.salePrice, locale: (_c = this.locale) !== null && _c !== void 0 ? _c : search_store.state.locale }))), this.addToBasketShow && (index.h("div", { class: "basket-button-container" }, this.isTransitioning ? (index.h("vviinn-skeleton", { height: 40 })) : (index.h("button", { class: {
|
|
608
614
|
"basket-button": true,
|
|
609
615
|
"basket-button-grid": this.mode === "grid" || this.mode === "set",
|
|
610
616
|
"basket-button-continuity ": this.mode === "continuity",
|
|
@@ -618,7 +624,7 @@ const VviinnProductCard = class {
|
|
|
618
624
|
animationInterval: this.generateRandomNumber(800, 1400),
|
|
619
625
|
productData: this.productData,
|
|
620
626
|
});
|
|
621
|
-
} }, index.h("slot", { name: "vviinn-update-icon-item" }, index.h(
|
|
627
|
+
} }, index.h("slot", { name: "vviinn-update-icon-item" }, index.h(UpdateIcon, null)))) : null));
|
|
622
628
|
}
|
|
623
629
|
get el() { return index.getElement(this); }
|
|
624
630
|
static get watchers() { return {
|
|
@@ -1265,19 +1271,19 @@ const createFetchAuthOptions = (x) => {
|
|
|
1265
1271
|
headers: x,
|
|
1266
1272
|
};
|
|
1267
1273
|
};
|
|
1268
|
-
const createBearAuthedHeader =
|
|
1274
|
+
const createBearAuthedHeader = search_store._function.flow(createBearerString, createAuthedHeader, createFetchAuthOptions);
|
|
1269
1275
|
|
|
1270
|
-
const sequenceToEither = sequenceT(
|
|
1271
|
-
const apiGet = (path, data = {}) =>
|
|
1276
|
+
const sequenceToEither = sequenceT(search_store.Apply);
|
|
1277
|
+
const apiGet = (path, data = {}) => search_store.pipe(sequenceToEither(search_store.getApiPath(), search_store.createInitGetRequest), search_store.fromEither, search_store.chainW(search_store.makeRequest(path, data)));
|
|
1272
1278
|
|
|
1273
1279
|
const getVPRRecommendations = (productId) => (color) => (excludedFilters) => (campaigns) => (options) => {
|
|
1274
|
-
const url =
|
|
1280
|
+
const url = search_store._function.pipe(campaigns, search_store.map(encodeURIComponent), search_store.match(() => {
|
|
1275
1281
|
const params = [];
|
|
1276
1282
|
if (color)
|
|
1277
1283
|
params.push(`color=${color}`);
|
|
1278
1284
|
if (excludedFilters)
|
|
1279
1285
|
params.push(excludedFilters);
|
|
1280
|
-
const queryString =
|
|
1286
|
+
const queryString = search_store.arrayToQueryString(params);
|
|
1281
1287
|
return `product/${productId}/similar-products${queryString}`;
|
|
1282
1288
|
}, (encodedCampaignsIds) => {
|
|
1283
1289
|
const params = [];
|
|
@@ -1287,20 +1293,20 @@ const getVPRRecommendations = (productId) => (color) => (excludedFilters) => (ca
|
|
|
1287
1293
|
params.push(`color=${color}`);
|
|
1288
1294
|
if (excludedFilters)
|
|
1289
1295
|
params.push(excludedFilters);
|
|
1290
|
-
const queryString =
|
|
1296
|
+
const queryString = search_store.arrayToQueryString(params);
|
|
1291
1297
|
return `product/${productId}/similar-products${queryString}`;
|
|
1292
1298
|
}));
|
|
1293
1299
|
return apiGet(url, options);
|
|
1294
1300
|
};
|
|
1295
1301
|
|
|
1296
1302
|
const getVCSRecommendations = (productId) => (color) => (excludedFilters) => (campaigns) => (options) => {
|
|
1297
|
-
const url =
|
|
1303
|
+
const url = search_store._function.pipe(campaigns, search_store.map(encodeURIComponent), search_store.match(() => {
|
|
1298
1304
|
const params = [];
|
|
1299
1305
|
if (color)
|
|
1300
1306
|
params.push(`color=${color}`);
|
|
1301
1307
|
if (excludedFilters)
|
|
1302
1308
|
params.push(excludedFilters);
|
|
1303
|
-
const queryString =
|
|
1309
|
+
const queryString = search_store.arrayToQueryString(params);
|
|
1304
1310
|
return `product/${productId}/cross-selling-products${queryString}`;
|
|
1305
1311
|
}, (encodedCampaignsIds) => {
|
|
1306
1312
|
const params = [];
|
|
@@ -1310,13 +1316,13 @@ const getVCSRecommendations = (productId) => (color) => (excludedFilters) => (ca
|
|
|
1310
1316
|
params.push(`color=${color}`);
|
|
1311
1317
|
if (excludedFilters)
|
|
1312
1318
|
params.push(excludedFilters);
|
|
1313
|
-
const queryString =
|
|
1319
|
+
const queryString = search_store.arrayToQueryString(params);
|
|
1314
1320
|
return `product/${productId}/cross-selling-products${queryString}`;
|
|
1315
1321
|
}));
|
|
1316
1322
|
return apiGet(url, options);
|
|
1317
1323
|
};
|
|
1318
1324
|
|
|
1319
|
-
const getRecommendationsService = (campaignType) =>
|
|
1325
|
+
const getRecommendationsService = (campaignType) => search_store._function.pipe(customizedSlots.fromString(campaignType), customizedSlots.fold(() => getVPRRecommendations, () => getVCSRecommendations));
|
|
1320
1326
|
|
|
1321
1327
|
const resources = {
|
|
1322
1328
|
de: {
|
|
@@ -1424,6 +1430,9 @@ const VviinnVprWidget = class {
|
|
|
1424
1430
|
window.location.href = deeplink;
|
|
1425
1431
|
}
|
|
1426
1432
|
}
|
|
1433
|
+
findProductById(id) {
|
|
1434
|
+
return this.recommendations.find((r) => r.productId === id);
|
|
1435
|
+
}
|
|
1427
1436
|
handleProductIdChange() {
|
|
1428
1437
|
this.getRecommendations();
|
|
1429
1438
|
}
|
|
@@ -1434,7 +1443,7 @@ const VviinnVprWidget = class {
|
|
|
1434
1443
|
this.getRecommendations();
|
|
1435
1444
|
}
|
|
1436
1445
|
handleApiPathChange(newPath) {
|
|
1437
|
-
|
|
1446
|
+
search_store.state.apiPath = newPath;
|
|
1438
1447
|
this.getRecommendations();
|
|
1439
1448
|
}
|
|
1440
1449
|
trackWidgetOpen() {
|
|
@@ -1457,13 +1466,13 @@ const VviinnVprWidget = class {
|
|
|
1457
1466
|
}
|
|
1458
1467
|
connectedCallback() {
|
|
1459
1468
|
var _a;
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1469
|
+
search_store.state.apiPath = this.apiPath;
|
|
1470
|
+
search_store.state.pricePrefix = this.pricePrefix;
|
|
1471
|
+
search_store.state.currencySign = this.currencySign;
|
|
1472
|
+
search_store.state.locale = this.locale;
|
|
1464
1473
|
this.id = (_a = this.buttonElementId) !== null && _a !== void 0 ? _a : this.el.id;
|
|
1465
|
-
this.uiSessionId = index$
|
|
1466
|
-
this.trackingApi = index$
|
|
1474
|
+
this.uiSessionId = index$1.v4();
|
|
1475
|
+
this.trackingApi = index$1.createTrackingApi(this.apiPath, this.token);
|
|
1467
1476
|
this.getRecommendations();
|
|
1468
1477
|
this.vviinnWidgetLoad.emit(this.getBasicEventData());
|
|
1469
1478
|
this.trackWidgetEvent("load");
|
|
@@ -1475,7 +1484,7 @@ const VviinnVprWidget = class {
|
|
|
1475
1484
|
resources,
|
|
1476
1485
|
});
|
|
1477
1486
|
if (this.excluded) {
|
|
1478
|
-
this.excluded =
|
|
1487
|
+
this.excluded = search_store.parseExcluded(this.excluded);
|
|
1479
1488
|
}
|
|
1480
1489
|
}
|
|
1481
1490
|
trackProductLoad({ detail }) {
|
|
@@ -1502,7 +1511,7 @@ const VviinnVprWidget = class {
|
|
|
1502
1511
|
}
|
|
1503
1512
|
async trackProductClick({ detail }) {
|
|
1504
1513
|
const { productId, clickEvent } = detail;
|
|
1505
|
-
const product = this.
|
|
1514
|
+
const product = this.findProductById(productId);
|
|
1506
1515
|
if (!product || !product.deeplink)
|
|
1507
1516
|
return;
|
|
1508
1517
|
const productClickEvent = this.getProductTrackEvent(detail, "click");
|
|
@@ -1520,7 +1529,7 @@ const VviinnVprWidget = class {
|
|
|
1520
1529
|
}
|
|
1521
1530
|
async trackAuxClick({ detail }) {
|
|
1522
1531
|
const { productId } = detail;
|
|
1523
|
-
const product = this.
|
|
1532
|
+
const product = this.findProductById(productId);
|
|
1524
1533
|
if (!product || !product.deeplink)
|
|
1525
1534
|
return;
|
|
1526
1535
|
const productClickEvent = this.getProductTrackEvent(detail, "click");
|
|
@@ -1535,10 +1544,10 @@ const VviinnVprWidget = class {
|
|
|
1535
1544
|
let addToBasketEvent;
|
|
1536
1545
|
const eventBody = Object.assign({ session_id: this.uiSessionId, rank: productRank, product: productId }, rest);
|
|
1537
1546
|
if (this.campaignType === "VCS") {
|
|
1538
|
-
addToBasketEvent = index$
|
|
1547
|
+
addToBasketEvent = index$1.createAddToBasketVpcEvent(eventBody);
|
|
1539
1548
|
}
|
|
1540
1549
|
else if (this.campaignType === "VPR") {
|
|
1541
|
-
addToBasketEvent = index$
|
|
1550
|
+
addToBasketEvent = index$1.createAddToBasketVprEvent(eventBody);
|
|
1542
1551
|
}
|
|
1543
1552
|
this.trackingApi
|
|
1544
1553
|
.trackEvent(addToBasketEvent)
|
|
@@ -1556,10 +1565,10 @@ const VviinnVprWidget = class {
|
|
|
1556
1565
|
let widgetEvent;
|
|
1557
1566
|
const eventBody = Object.assign({ action, session_id: this.uiSessionId }, rest);
|
|
1558
1567
|
if (this.campaignType === "VCS") {
|
|
1559
|
-
widgetEvent = index$
|
|
1568
|
+
widgetEvent = index$1.createWidgetVpcEvent(eventBody);
|
|
1560
1569
|
}
|
|
1561
1570
|
else if (this.campaignType === "VPR") {
|
|
1562
|
-
widgetEvent = index$
|
|
1571
|
+
widgetEvent = index$1.createWidgetVprEvent(eventBody);
|
|
1563
1572
|
}
|
|
1564
1573
|
this.trackingApi.trackEvent(widgetEvent).then(this.setTrackingDeactivated);
|
|
1565
1574
|
}
|
|
@@ -1570,10 +1579,10 @@ const VviinnVprWidget = class {
|
|
|
1570
1579
|
let resultEvent;
|
|
1571
1580
|
const eventBody = Object.assign({ session_id: this.uiSessionId }, rest);
|
|
1572
1581
|
if (this.campaignType === "VCS") {
|
|
1573
|
-
resultEvent = index$
|
|
1582
|
+
resultEvent = index$1.createResultVpcEventByType(type)(eventBody);
|
|
1574
1583
|
}
|
|
1575
1584
|
else if (this.campaignType === "VPR") {
|
|
1576
|
-
resultEvent = index$
|
|
1585
|
+
resultEvent = index$1.createResultVprEventByType(type)(eventBody);
|
|
1577
1586
|
}
|
|
1578
1587
|
this.trackingApi.trackEvent(resultEvent).then(this.setTrackingDeactivated);
|
|
1579
1588
|
}
|
|
@@ -1584,10 +1593,10 @@ const VviinnVprWidget = class {
|
|
|
1584
1593
|
let productEvent;
|
|
1585
1594
|
const eventBody = Object.assign({ session_id: this.uiSessionId, rank: productRank, product: productId }, rest);
|
|
1586
1595
|
if (campaignTypeId === "VCS") {
|
|
1587
|
-
productEvent = index$
|
|
1596
|
+
productEvent = index$1.createProductVpcEventByType(eventType)(eventBody);
|
|
1588
1597
|
}
|
|
1589
1598
|
else if (campaignTypeId === "VPR") {
|
|
1590
|
-
productEvent = index$
|
|
1599
|
+
productEvent = index$1.createProductVprEventByType(eventType)(eventBody);
|
|
1591
1600
|
}
|
|
1592
1601
|
return productEvent;
|
|
1593
1602
|
}
|
|
@@ -1596,9 +1605,9 @@ const VviinnVprWidget = class {
|
|
|
1596
1605
|
return;
|
|
1597
1606
|
const campaignType = this.campaignType.length > 0 ? this.campaignType : "VPR";
|
|
1598
1607
|
const headers = createBearAuthedHeader(this.token);
|
|
1599
|
-
const request =
|
|
1608
|
+
const request = search_store._function.pipe(search_store.TaskEither.of(getRecommendationsService(campaignType)), search_store.TaskEither.ap(search_store.TaskEither.of(this.productId)), search_store.TaskEither.ap(search_store.TaskEither.of(this.color)), search_store.TaskEither.ap(search_store.TaskEither.of(this.excluded)), search_store.TaskEither.ap(search_store.TaskEither.of(search_store.checkEmpryString(this.campaigns))), search_store.TaskEither.ap(search_store.TaskEither.of(headers)), search_store.TaskEither.flatten);
|
|
1600
1609
|
const runRequest = await request();
|
|
1601
|
-
|
|
1610
|
+
search_store._function.pipe(runRequest, search_store.Either.fold((error) => {
|
|
1602
1611
|
this.handleError(error);
|
|
1603
1612
|
this.vviinnNoResult.emit(this.getBasicEventData());
|
|
1604
1613
|
this.vviinnRecommendationsLoaded.emit();
|
|
@@ -1612,7 +1621,7 @@ const VviinnVprWidget = class {
|
|
|
1612
1621
|
this.vviinnResultLoad.emit(this.getBasicEventData());
|
|
1613
1622
|
this.trackResultEvent("load");
|
|
1614
1623
|
this.recommendations = (_a = data === null || data === void 0 ? void 0 : data.extended) !== null && _a !== void 0 ? _a : data;
|
|
1615
|
-
|
|
1624
|
+
search_store.searchState.results = this.recommendations;
|
|
1616
1625
|
this.productIds = this.recommendations.map((r) => r.productId);
|
|
1617
1626
|
this.productImageLoadedSubject.subscribe((id) => {
|
|
1618
1627
|
this.productIds = this.productIds.filter((x) => x !== id);
|
|
@@ -1634,7 +1643,7 @@ const VviinnVprWidget = class {
|
|
|
1634
1643
|
loaded: true,
|
|
1635
1644
|
empty: this.recommendations.length == 0,
|
|
1636
1645
|
[this.mode === "set" ? "grid" : this.mode]: true,
|
|
1637
|
-
}, "aria-hidden": "false" }, this.addToBasketShow && index.h(customizedSlots.SlotSkeleton, null), index.h(index.Fragment, null, this.renderExternalCSS(), index.h("style", null,
|
|
1646
|
+
}, "aria-hidden": "false" }, this.addToBasketShow && index.h(customizedSlots.SlotSkeleton, null), index.h(index.Fragment, null, this.renderExternalCSS(), index.h("style", null, search_store.state.fallbackStyles), index.h("div", { class: "title-container" }, index.h("h2", { part: "recommendations-title" }, this.blockTitle), this.mode === "set" && this.updateButtonLocation !== "onItem" ? (index.h("button", { class: "update-button", part: "update-button-top", onClick: () => (this.updatingAllCards = true) }, index.h("slot", { name: "vviinn-update-icon-top" }, index.h(UpdateIcon, null)))) : null), this.recommendations.length > 0 &&
|
|
1638
1647
|
(this.useCarousel ? this.renderCarousel() : this.renderResults()), this.recommendations.length === 0 && this.hasErrorOnLoad && (index.h("p", { class: "no-result-text" }, this.noResultText.length
|
|
1639
1648
|
? this.noResultText
|
|
1640
1649
|
: i18next.instance.t("noResultText"))))));
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-5619b5ec.js');
|
|
6
|
-
const
|
|
6
|
+
const search_store = require('./search.store-0b319593.js');
|
|
7
7
|
|
|
8
8
|
const vviinnPreloaderCss = ":host{--preloader-size:24px;--preloader-width:calc(var(--preloader-size) / 6);transform-origin:center;animation:rotate 3s linear infinite;border:var(--preloader-width) solid currentColor;border-radius:50%;border-top-color:transparent;display:none;outline:0;width:var(--preloader-size);height:var(--preloader-size);box-sizing:border-box}:host(.active){display:flex}@keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}";
|
|
9
9
|
|
|
@@ -12,7 +12,7 @@ const VviinnPreloader = class {
|
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
13
|
}
|
|
14
14
|
isActive() {
|
|
15
|
-
return
|
|
15
|
+
return search_store.searchState.loading || search_store.searchState.objectDetectionInProgress;
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
18
|
return (index.h(index.Host, { class: {
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-5619b5ec.js');
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
const CrossIcon = () => (index.h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
8
|
+
index.h("path", { d: "M16 1.4L14.6 0L8 6.6L1.4 0L0 1.4L6.6 8L0 14.6L1.4 16L8 9.4L14.6 16L16 14.6L9.4 8L16 1.4Z", fill: "#161616" })));
|
|
7
9
|
|
|
8
10
|
const recommendationsSidebarCss = ":host{--vviinn-carousel-columns:4;box-sizing:border-box;display:block;display:flex;height:100vh;left:0;position:fixed;top:0;transition:background 0.1s ease-in-out;width:100vw}:host(.open){background:rgba(0, 0, 0, 0.2)}:host(.bottom){flex-direction:column;justify-content:end}:host(.right){flex-direction:row;justify-content:flex-end}:host [slot]{visibility:hidden;position:absolute}header{position:relative;text-align:center;padding:32px}header.contains-source-img{display:grid;justify-items:center;grid-gap:12px}img.source-image{width:64px;height:64px;border-radius:50%;box-shadow:0px 2px 4px rgba(0, 0, 0, 0.15);padding:8px}:host(.right) header{box-shadow:0px 2px 6px rgba(0, 0, 0, 0.1)}main{padding:0 24px;min-height:100px}:host(.right) main{overflow:auto}.sidebar{background:white;box-sizing:border-box;display:flex;flex-direction:column;max-height:100vh;overflow-y:auto}:host(.bottom.idle) .sidebar,:host(.bottom.closed) .sidebar{transform:translateY(100%)}:host(.bottom.closed) .sidebar{animation-name:slideOutFromBottom;animation-duration:0.5s;animation-fill-mode:forwards}:host(.bottom.open) .sidebar{animation-name:slideInFromBottom;animation-duration:0.5s;animation-fill-mode:forwards}:host(.right.idle) .sidebar{transform:translateX(100%)}:host(.right.closed) .sidebar{animation-name:slideOutFromRight;animation-duration:0.5s;animation-fill-mode:forwards}:host(.right.open) .sidebar{animation-name:slideInFromRight;animation-duration:0.5s;animation-fill-mode:forwards}:host(.right) .sidebar{max-width:480px}:host(.right) vviinn-vpr-widget::part(recommendations-grid){display:grid;grid-template-columns:repeat(2, 1fr);grid-gap:24px}:host(.right) vviinn-vpr-widget{overflow:auto}:host(.right) vviinn-vpr-widget::part(image){border:none}.title{font-style:normal;font-weight:500;font-size:28px;line-height:40px;text-align:center;color:#000000}vviinn-vpr-widget::part(title),vviinn-vpr-widget::part(brand),vviinn-vpr-widget::part(type){text-align:left}vviinn-vpr-widget::part(price-container){align-self:start}.close-sidebar{background:transparent;border:none;cursor:pointer;margin:0;padding:0;position:absolute;right:24px;top:24px}@keyframes slideInFromBottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideOutFromBottom{from{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes slideInFromRight{from{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slideOutFromRight{from{transform:translateX(0)}to{transform:translateX(100%)}}@media (max-width: 768px){:host{--vviinn-carousel-columns:2}}";
|
|
9
11
|
|
|
@@ -71,7 +73,7 @@ const RecommendationsSidebar = class {
|
|
|
71
73
|
});
|
|
72
74
|
}
|
|
73
75
|
render() {
|
|
74
|
-
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(
|
|
76
|
+
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, productDetailNewTab: this.productDetailNewTab, closed: this.state === "closed", opened: this.state === "open", addToBasketShow: this.addToBasketShow })))));
|
|
75
77
|
}
|
|
76
78
|
renderSourceImage() {
|
|
77
79
|
return (index.h("img", { class: "source-image", part: "source-image", src: this.sourceImage }));
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-5619b5ec.js');
|
|
6
|
-
const _package = require('./package-
|
|
7
|
-
const
|
|
6
|
+
const _package = require('./package-3b910c03.js');
|
|
7
|
+
const VisualSearchIcon = require('./VisualSearchIcon-1180d079.js');
|
|
8
8
|
|
|
9
9
|
const vviinnVprButtonCss = ":host{display:block}";
|
|
10
10
|
|
|
@@ -50,7 +50,7 @@ const VviinnVprButton = class {
|
|
|
50
50
|
render() {
|
|
51
51
|
return (index.h(index.Host, { onClick: () => {
|
|
52
52
|
this.handleClick();
|
|
53
|
-
}, role: "button", tabindex: "0" }, index.h("vviinn-button", { addStyle: this.addStyle, part: "vviinn-button" }, index.h("slot", null, index.h(
|
|
53
|
+
}, role: "button", tabindex: "0" }, index.h("vviinn-button", { addStyle: this.addStyle, part: "vviinn-button" }, index.h("slot", null, index.h(VisualSearchIcon.VisualSearchIcon, null)))));
|
|
54
54
|
}
|
|
55
55
|
handleClick() {
|
|
56
56
|
const sidebar = document.createElement("vviinn-recommendations-sidebar");
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-5619b5ec.js');
|
|
6
|
-
const _package = require('./package-
|
|
7
|
-
const
|
|
8
|
-
const customizedSlots = require('./customized-slots-49c03dc1.js');
|
|
6
|
+
const _package = require('./package-3b910c03.js');
|
|
7
|
+
const customizedSlots = require('./customized-slots-1b59bd38.js');
|
|
9
8
|
const constants = require('./constants-7684cbfc.js');
|
|
10
9
|
|
|
10
|
+
const CameraIcon = () => (index.h("svg", { width: "22", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
11
|
+
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M16.567 3H19A3.01 3.01 0 0 1 22 6v7.69h-2V6c0-.55-.451-1-1.001-1h-3.502l-2.03-3H8.543L6.603 5H3.001c-.55 0-1 .45-1 1v11c0 .55.45 1 1 1h5.933v2H3.001A3.01 3.01 0 0 1 0 17V6c0-1.65 1.35-3 3.001-3h2.522l1.94-3h7.074l2.03 3Zm-5.562 3c1.28 0 2.561.48 3.542 1.46h-.01a4.992 4.992 0 0 1 .64 6.29l3.051 3.05-1.41 1.41-3.052-3.05c-.84.55-1.8.83-2.76.83-1.282 0-2.562-.48-3.543-1.46a5.002 5.002 0 0 1 0-7.07A5.026 5.026 0 0 1 11.005 6Zm-2.771 5a2.763 2.763 0 0 0 2.771 2.77A2.763 2.763 0 0 0 13.776 11a2.763 2.763 0 0 0-2.771-2.77A2.763 2.763 0 0 0 8.234 11Z", fill: "#161616" })));
|
|
12
|
+
|
|
11
13
|
const vviinnVpsButtonCss = ":host{display:block}";
|
|
12
14
|
|
|
13
15
|
const VviinnVpsButton = class {
|
|
@@ -46,6 +48,7 @@ const VviinnVpsButton = class {
|
|
|
46
48
|
this.productDetailNewTab = true;
|
|
47
49
|
this.imageResolutionWidth = 250;
|
|
48
50
|
this.exampleImageSource = constants.DEFAULT_EXAMPLE_IMAGE;
|
|
51
|
+
this.textSearchShow = false;
|
|
49
52
|
this.apiPath = undefined;
|
|
50
53
|
this.buttonPressed = false;
|
|
51
54
|
}
|
|
@@ -65,7 +68,7 @@ const VviinnVpsButton = class {
|
|
|
65
68
|
render() {
|
|
66
69
|
return (index.h(index.Host, { tabindex: "0", role: "button" }, index.h("vviinn-button", { onClick: () => {
|
|
67
70
|
this.handleClick();
|
|
68
|
-
}, addStyle: this.addStyle, part: "vviinn-button" }, index.h("slot", null, index.h(
|
|
71
|
+
}, addStyle: this.addStyle, part: "vviinn-button" }, index.h("slot", null, index.h(CameraIcon, null))), index.h(customizedSlots.SlotSkeleton, null), index.h("vviinn-vps-widget", { mode: this.mode, "currency-sign": this.currencySign, token: this.token, locale: this.locale, apiPath: this.apiPath, exportparts: "brand, deeplink, currency, image, image-link, price-amount-sale, price-amount-outdated, price-amount-regular, price-container, price-outdated, price-regular, price-sale, price-prefix, title, product-card, 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 && this.mode === "modal", excluded: this.excluded, productDetailNewTab: this.productDetailNewTab, imageResolutionWidth: this.imageResolutionWidth, exampleImageSource: this.exampleImageSource, textSearchShow: this.textSearchShow })));
|
|
69
72
|
}
|
|
70
73
|
get el() { return index.getElement(this); }
|
|
71
74
|
};
|