vviinn-widgets 2.2.1 → 2.3.1
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/{app-globals-d0251be8.js → app-globals-6b5da080.js} +1 -1
- package/dist/cjs/cropper-handler.cjs.entry.js +1 -1
- package/dist/cjs/{customized-slots-14b77e4a.js → customized-slots-8bc78ad4.js} +1 -1
- package/dist/cjs/highlight-box_22.cjs.entry.js +4 -4
- package/dist/cjs/{imageSearch.store-d9ed1a5b.js → imageSearch.store-042e9f45.js} +1 -1
- package/dist/cjs/{index-141137b2.js → index-553c2b4f.js} +1 -1
- package/dist/cjs/{index-a5e15a0c.js → index-5b9a60ac.js} +7 -9
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{vviinn-carousel_5.cjs.entry.js → vviinn-carousel_3.cjs.entry.js} +6 -92
- package/dist/cjs/vviinn-error.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-preloader.cjs.entry.js +2 -2
- package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +63 -0
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +44 -0
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +4 -4
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +3 -3
- package/dist/cjs/vviinn-widgets.cjs.js +3 -3
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +4 -0
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.js +6 -3
- package/dist/collection/components/vviinn-icons/index.js +6 -8
- package/dist/collection/components/vviinn-product-card/stories/args.js +73 -0
- package/dist/collection/components/vviinn-product-card/stories/decorators.js +51 -0
- package/dist/collection/components/vviinn-product-card/stories/vviinn-product-card.stories.js +105 -0
- package/dist/collection/components/vviinn-vpr-button/stories/args.js +207 -0
- package/dist/collection/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.js +89 -0
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +11 -4
- package/dist/collection/components/vviinn-vpr-widget/stories/args.js +190 -0
- package/dist/collection/components/vviinn-vpr-widget/stories/decorators.js +29 -0
- package/dist/collection/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.js +212 -0
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +1 -0
- package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +31 -0
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.css +3 -0
- package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +33 -0
- package/dist/esm/{app-globals-b6113170.js → app-globals-90d99f95.js} +1 -1
- package/dist/esm/cropper-handler.entry.js +1 -1
- package/dist/esm/{customized-slots-a952fb80.js → customized-slots-65b2467d.js} +1 -1
- package/dist/esm/highlight-box_22.entry.js +4 -4
- package/dist/esm/{imageSearch.store-4ca31230.js → imageSearch.store-f35e14f8.js} +1 -1
- package/dist/esm/{index-017f18de.js → index-ac2e3b9d.js} +8 -10
- package/dist/esm/{index-3e85e294.js → index-d7c7df1c.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{vviinn-carousel_5.entry.js → vviinn-carousel_3.entry.js} +7 -91
- package/dist/esm/vviinn-error.entry.js +1 -1
- package/dist/esm/vviinn-preloader.entry.js +2 -2
- package/dist/esm/vviinn-recommendations-sidebar.entry.js +59 -0
- package/dist/esm/vviinn-vpr-button.entry.js +40 -0
- package/dist/esm/vviinn-vps-button.entry.js +4 -4
- package/dist/esm/vviinn-vps-widget.entry.js +3 -3
- package/dist/esm/vviinn-widgets.js +3 -3
- package/dist/types/components/vviinn-carousel/vviinn-carousel.d.ts +3 -0
- package/dist/types/components/vviinn-product-card/stories/args.d.ts +73 -0
- package/dist/types/components/vviinn-product-card/stories/decorators.d.ts +1 -0
- package/dist/types/components/vviinn-product-card/stories/vviinn-product-card.stories.d.ts +80 -0
- package/dist/types/components/vviinn-vpr-button/stories/args.d.ts +207 -0
- package/dist/types/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.d.ts +214 -0
- package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +3 -0
- package/dist/types/components/vviinn-vpr-widget/stories/args.d.ts +198 -0
- package/dist/types/components/vviinn-vpr-widget/stories/decorators.d.ts +2 -0
- package/dist/types/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.d.ts +141 -0
- package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +1 -0
- package/dist/types/components/vviinn-vps-button/stories/vviinn-vps-button.stories.d.ts +12 -0
- package/dist/types/components/{vviinn-vpr-button/stories/kek.stories.d.ts → vviinn-vps-widget/stories/vviinn-vps-widget.stories.d.ts} +5 -2
- package/{www/build/p-68900093.entry.js → dist/vviinn-widgets/p-1c141479.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-62a1b042.entry.js → p-320844ea.entry.js} +1 -1
- package/dist/vviinn-widgets/p-4530ca32.entry.js +1 -0
- package/dist/vviinn-widgets/p-55491d9b.js +1 -0
- package/dist/vviinn-widgets/p-6239a782.entry.js +1 -0
- package/dist/vviinn-widgets/{p-d7894eaf.js → p-679ea2ce.js} +1 -1
- package/dist/vviinn-widgets/{p-95e53d99.entry.js → p-757849fd.entry.js} +1 -1
- package/{www/build/p-3da18d7f.js → dist/vviinn-widgets/p-80f0d4e0.js} +1 -1
- package/dist/vviinn-widgets/{p-6c4c240d.entry.js → p-935b4f49.entry.js} +1 -1
- package/dist/vviinn-widgets/p-a5b69a48.entry.js +1 -0
- package/dist/vviinn-widgets/{p-0ed1ef7e.entry.js → p-b0243e84.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-db0be4cd.js → p-b4b46a70.js} +1 -1
- package/dist/vviinn-widgets/{p-9fee20e7.entry.js → p-e362fa80.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-16e49514.js → p-e882fbeb.js} +1 -1
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/{dist/vviinn-widgets/p-68900093.entry.js → www/build/p-1c141479.entry.js} +1 -1
- package/www/build/{p-62a1b042.entry.js → p-320844ea.entry.js} +1 -1
- package/www/build/p-4379b1c2.js +1 -0
- package/www/build/p-4530ca32.entry.js +1 -0
- package/www/build/p-55491d9b.js +1 -0
- package/www/build/p-6239a782.entry.js +1 -0
- package/www/build/{p-d7894eaf.js → p-679ea2ce.js} +1 -1
- package/www/build/{p-95e53d99.entry.js → p-757849fd.entry.js} +1 -1
- package/{dist/vviinn-widgets/p-3da18d7f.js → www/build/p-80f0d4e0.js} +1 -1
- package/www/build/{p-6c4c240d.entry.js → p-935b4f49.entry.js} +1 -1
- package/www/build/p-a5b69a48.entry.js +1 -0
- package/www/build/{p-0ed1ef7e.entry.js → p-b0243e84.entry.js} +1 -1
- package/www/build/{p-db0be4cd.js → p-b4b46a70.js} +1 -1
- package/www/build/{p-9fee20e7.entry.js → p-e362fa80.entry.js} +1 -1
- package/www/build/{p-16e49514.js → p-e882fbeb.js} +1 -1
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +4 -74
- package/dist/collection/components/vviinn-vpr-button/stories/kek.stories.js +0 -18
- package/dist/vviinn-widgets/p-eb15116d.entry.js +0 -1
- package/dist/vviinn-widgets/p-f00fddbb.js +0 -1
- package/www/build/p-1cc0cdfd.js +0 -1
- package/www/build/p-eb15116d.entry.js +0 -1
- package/www/build/p-f00fddbb.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-
|
|
2
|
-
import { _ as _Array, O as Option, S as Semigroup, a as _function, E as Either, i as imageSearchState, s as state, c as chainW, m as makeRequest, f as fromEither, g as getApiPath, b as createInitGetRequest, d as sequenceT, A as Apply, e as state$1, T as TaskEither } from './imageSearch.store-
|
|
3
|
-
import { C as ChevronIcon
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-d7c7df1c.js';
|
|
2
|
+
import { _ as _Array, O as Option, S as Semigroup, a as _function, E as Either, i as imageSearchState, s as state, c as chainW, m as makeRequest, f as fromEither, g as getApiPath, b as createInitGetRequest, d as sequenceT, A as Apply, e as state$1, T as TaskEither } from './imageSearch.store-f35e14f8.js';
|
|
3
|
+
import { C as ChevronIcon } from './index-ac2e3b9d.js';
|
|
4
4
|
import { p as pipe } from './Handler-639a4cb3.js';
|
|
5
5
|
|
|
6
|
-
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;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;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) button{border-radius:2px}:host(.grid) button{border-radius:50%}button{align-items:center;background-color:white;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);cursor:pointer;display:grid;height:40px;justify-items:center;position:absolute;top:calc(50% - 20px);width:40px;z-index:1;padding:0;margin:0}button.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)}}";
|
|
6
|
+
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;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;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) button{border-radius:2px}:host(.grid) button{border-radius:50%}button{align-items:center;background-color:white;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);cursor:pointer;display:grid;height:40px;justify-items:center;position:absolute;top:calc(50% - 20px);width:40px;z-index:1;padding:0;margin:0}button{fill:#525252}button.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)}}";
|
|
7
7
|
|
|
8
8
|
const COLUMNS_NUMBER_CSS_VAR = "--vviinn-carousel-columns-internal";
|
|
9
9
|
const CAROUSEL_WIDTH_CSS_VAR = "--vviinn-carousel-content-width";
|
|
@@ -52,7 +52,7 @@ let VviinnCarousel = class {
|
|
|
52
52
|
content: true,
|
|
53
53
|
[this.moveDirection]: true,
|
|
54
54
|
[this.mode]: true,
|
|
55
|
-
"show-scrollbar": this.showScroll
|
|
55
|
+
"show-scrollbar": this.showScroll,
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
handleResize() {
|
|
@@ -201,7 +201,7 @@ let VviinnCarousel = class {
|
|
|
201
201
|
}, onClick: () => this.scroll(index) })));
|
|
202
202
|
}
|
|
203
203
|
render() {
|
|
204
|
-
return (h(Host, { class: this.getClassMap() }, h("div", { class: Object.assign({ body: true }, this.getClassMap()) }, h("button", { class: "prev", onClick: () => this.showPrev() }, h(ChevronIcon, null)), h("div", { class: this.getContentClassMap(), onScroll: () => this.processScrollbarWidth() }, this.renderRecommendations()), h("button", { class: "next", onClick: () => this.showNext() }, h(ChevronIcon, null))), this.showBullets() ? (h("div", { class: "bullets" }, this.renderBullets())) : ("")));
|
|
204
|
+
return (h(Host, { class: this.getClassMap() }, h("div", { class: Object.assign({ body: true }, this.getClassMap()) }, h("button", { class: "prev", onClick: () => this.showPrev(), part: "carousel-button" }, h(ChevronIcon, null)), h("div", { class: this.getContentClassMap(), onScroll: () => this.processScrollbarWidth() }, this.renderRecommendations()), h("button", { class: "next", onClick: () => this.showNext(), part: "carousel-button" }, h(ChevronIcon, null))), this.showBullets() ? (h("div", { class: "bullets" }, this.renderBullets())) : ("")));
|
|
205
205
|
}
|
|
206
206
|
get el() { return getElement(this); }
|
|
207
207
|
};
|
|
@@ -382,90 +382,6 @@ let VviinnProductCard = class {
|
|
|
382
382
|
};
|
|
383
383
|
VviinnProductCard.style = vviinnProductCardCss;
|
|
384
384
|
|
|
385
|
-
const recommendationsSidebarCss = ":host{--vviinn-carousel-columns:0;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}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}:host(.right) main{overflow:auto}.sidebar{background:white;box-sizing:border-box;display:flex;flex-direction:column}:host(.bottom.idle) .sidebar,:host(.bottom.closed) .sidebar{transform:translateY(100%)}:host(.bottom.closed) .sidebar{-webkit-animation-name:slideOutFromBottom;animation-name:slideOutFromBottom;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.bottom.open) .sidebar{-webkit-animation-name:slideInFromBottom;animation-name:slideInFromBottom;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.right.idle) .sidebar{transform:translateX(100%)}:host(.right.closed) .sidebar{-webkit-animation-name:slideOutFromRight;animation-name:slideOutFromRight;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.right.open) .sidebar{-webkit-animation-name:slideInFromRight;animation-name:slideInFromRight;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;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}@-webkit-keyframes slideInFromBottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideInFromBottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@-webkit-keyframes slideOutFromBottom{from{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes slideOutFromBottom{from{transform:translateY(0)}to{transform:translateY(100%)}}@-webkit-keyframes slideInFromRight{from{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slideInFromRight{from{transform:translateX(100%)}to{transform:translateX(0)}}@-webkit-keyframes slideOutFromRight{from{transform:translateX(0)}to{transform:translateX(100%)}}@keyframes slideOutFromRight{from{transform:translateX(0)}to{transform:translateX(100%)}}";
|
|
386
|
-
|
|
387
|
-
let RecommendationsSidebar = class {
|
|
388
|
-
constructor(hostRef) {
|
|
389
|
-
registerInstance(this, hostRef);
|
|
390
|
-
this.modalClosed = createEvent(this, "modalClosed", 7);
|
|
391
|
-
this.position = "bottom";
|
|
392
|
-
this.sourceImage = null;
|
|
393
|
-
this.widgetScrollbar = false;
|
|
394
|
-
this.state = "idle";
|
|
395
|
-
}
|
|
396
|
-
bodyClickListener(event) {
|
|
397
|
-
const { clientX, clientY } = event;
|
|
398
|
-
const sidebarRect = this.getSidebarRectangle();
|
|
399
|
-
if (!sidebarRect)
|
|
400
|
-
return;
|
|
401
|
-
const inLeftBound = clientX >= sidebarRect.left;
|
|
402
|
-
const inRightBound = clientX <= sidebarRect.right;
|
|
403
|
-
const inTopBound = clientY >= sidebarRect.top;
|
|
404
|
-
const inBottomBound = clientY <= sidebarRect.bottom;
|
|
405
|
-
const inBound = inLeftBound && inRightBound && inTopBound && inBottomBound;
|
|
406
|
-
if (!inBound) {
|
|
407
|
-
this.state = "closed";
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
getClassMap() {
|
|
411
|
-
return {
|
|
412
|
-
[this.position]: true,
|
|
413
|
-
[this.state]: true,
|
|
414
|
-
};
|
|
415
|
-
}
|
|
416
|
-
getSidebarRectangle() {
|
|
417
|
-
var _a;
|
|
418
|
-
return (_a = this.el.shadowRoot.querySelector("aside")) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
419
|
-
}
|
|
420
|
-
render() {
|
|
421
|
-
return (h(Host, { class: this.getClassMap() }, h("aside", { class: "sidebar", part: "body", onAnimationEnd: (e) => this.handleAnimationEnd(e) }, h("header", { class: { "contains-source-img": this.isSourceImageValid() }, part: "sidebar-header" }, this.isSourceImageValid() ? this.renderSourceImage() : null, h("span", { class: "title", part: "title" }, this.sidebarTitle), h("button", { class: "close-sidebar", onClick: () => (this.state = "closed") }, h(CrossIcon, null))), h("main", { part: "sidebar-content" }, h("vviinn-vpr-widget", { exportparts: "brand, currency, deeplink, image, image-link, price-amount, price-container, price-outdated, price-prefix, price-regular, price-sale, title: product-title", token: this.token, productId: this.productId, imageWidth: 300, blockTitle: "", mode: this.position === "bottom" ? "continuity" : "grid", useCarousel: this.position === "bottom", onRecommendationsLoaded: () => (this.state = "open"), showScroll: this.widgetScrollbar })))));
|
|
422
|
-
}
|
|
423
|
-
renderSourceImage() {
|
|
424
|
-
return (h("img", { class: "source-image", part: "source-image", src: this.sourceImage }));
|
|
425
|
-
}
|
|
426
|
-
isSourceImageValid() {
|
|
427
|
-
var _a;
|
|
428
|
-
return ((_a = this.sourceImage) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
429
|
-
}
|
|
430
|
-
handleAnimationEnd({ animationName }) {
|
|
431
|
-
const isClosingAnimation = animationName.includes("slideOut");
|
|
432
|
-
if (!isClosingAnimation)
|
|
433
|
-
return;
|
|
434
|
-
this.modalClosed.emit();
|
|
435
|
-
}
|
|
436
|
-
get el() { return getElement(this); }
|
|
437
|
-
};
|
|
438
|
-
RecommendationsSidebar.style = recommendationsSidebarCss;
|
|
439
|
-
|
|
440
|
-
const vviinnVprButtonCss = ":host{display:block}.open-button{align-items:center;background:rgba(255, 255, 255, 0.8);border-radius:50%;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);box-sizing:border-box;cursor:pointer;display:grid;height:40px;justify-items:center;padding:0;width:40px;transition:all 0.25s ease-in-out}.open-button:hover{box-shadow:0px 2px 6px rgba(0, 0, 0, 0.25)}.open-button:focus{border:2px solid rgba(15, 98, 254, 0.5);outline:none}.open-button:active{background:#F4F4F4;outline:none}";
|
|
441
|
-
|
|
442
|
-
let VviinnVprButton = class {
|
|
443
|
-
constructor(hostRef) {
|
|
444
|
-
registerInstance(this, hostRef);
|
|
445
|
-
this.position = "bottom";
|
|
446
|
-
this.sourceImage = null;
|
|
447
|
-
this.sidebarTitle = "Visually similar products";
|
|
448
|
-
this.modalScrollbar = false;
|
|
449
|
-
}
|
|
450
|
-
render() {
|
|
451
|
-
return (h(Host, null, h("button", { class: "open-button", part: "button", onClick: () => this.handleClick() }, h("slot", null, h(VisualSearchIcon, null)))));
|
|
452
|
-
}
|
|
453
|
-
handleClick() {
|
|
454
|
-
const sidebar = document.createElement("vviinn-recommendations-sidebar");
|
|
455
|
-
sidebar.sidebarTitle = this.sidebarTitle;
|
|
456
|
-
sidebar.productId = this.productId;
|
|
457
|
-
sidebar.token = this.token;
|
|
458
|
-
sidebar.position = this.position;
|
|
459
|
-
sidebar.sourceImage = this.sourceImage;
|
|
460
|
-
sidebar.widgetScrollbar = this.modalScrollbar;
|
|
461
|
-
sidebar.addEventListener("modalClosed", () => {
|
|
462
|
-
document.body.removeChild(sidebar);
|
|
463
|
-
});
|
|
464
|
-
document.body.append(sidebar);
|
|
465
|
-
}
|
|
466
|
-
};
|
|
467
|
-
VviinnVprButton.style = vviinnVprButtonCss;
|
|
468
|
-
|
|
469
385
|
const createBearerString = (x) => `Bearer ${x}`;
|
|
470
386
|
const createAuthedHeader = (x) => new Headers({
|
|
471
387
|
Authorization: x,
|
|
@@ -1221,4 +1137,4 @@ let VviinnVprWidget = class {
|
|
|
1221
1137
|
};
|
|
1222
1138
|
VviinnVprWidget.style = vviinnVprWidgetCss;
|
|
1223
1139
|
|
|
1224
|
-
export { VviinnCarousel as vviinn_carousel, VviinnProductCard as vviinn_product_card,
|
|
1140
|
+
export { VviinnCarousel as vviinn_carousel, VviinnProductCard as vviinn_product_card, VviinnVprWidget as vviinn_vpr_widget };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-d7c7df1c.js';
|
|
2
2
|
|
|
3
3
|
const vviinnErrorCss = ":host{background:#F4F4F4;border-radius:8px;display:grid;grid-gap:20px;padding:24px;text-align:center}::slotted(svg){display:grid;align-self:center}::slotted(h4){margin:unset;font-weight:600;font-size:18px;line-height:24px}::slotted(span){font-size:14px;line-height:20px}::slotted(button){-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:transparent;color:var(--color-primary, var(--color-primary-system));font-weight:600;font-size:16px;line-height:20px;cursor:pointer}";
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
2
|
-
import { i as imageSearchState } from './imageSearch.store-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-d7c7df1c.js';
|
|
2
|
+
import { i as imageSearchState } from './imageSearch.store-f35e14f8.js';
|
|
3
3
|
import './Handler-639a4cb3.js';
|
|
4
4
|
|
|
5
5
|
const vviinnPreloaderCss = ":host{--preloader-size:24px;--preloader-width:calc(var(--preloader-size) / 6);transform-origin:center;-webkit-animation:rotate 3s linear infinite;animation:rotate 3s linear infinite;border:var(--preloader-width) solid white;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}@-webkit-keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}@keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}";
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-d7c7df1c.js';
|
|
2
|
+
import { b as CrossIcon } from './index-ac2e3b9d.js';
|
|
3
|
+
|
|
4
|
+
const recommendationsSidebarCss = ":host{--vviinn-carousel-columns:0;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}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}:host(.right) main{overflow:auto}.sidebar{background:white;box-sizing:border-box;display:flex;flex-direction:column}:host(.bottom.idle) .sidebar,:host(.bottom.closed) .sidebar{transform:translateY(100%)}:host(.bottom.closed) .sidebar{-webkit-animation-name:slideOutFromBottom;animation-name:slideOutFromBottom;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.bottom.open) .sidebar{-webkit-animation-name:slideInFromBottom;animation-name:slideInFromBottom;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.right.idle) .sidebar{transform:translateX(100%)}:host(.right.closed) .sidebar{-webkit-animation-name:slideOutFromRight;animation-name:slideOutFromRight;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.right.open) .sidebar{-webkit-animation-name:slideInFromRight;animation-name:slideInFromRight;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;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}@-webkit-keyframes slideInFromBottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideInFromBottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@-webkit-keyframes slideOutFromBottom{from{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes slideOutFromBottom{from{transform:translateY(0)}to{transform:translateY(100%)}}@-webkit-keyframes slideInFromRight{from{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slideInFromRight{from{transform:translateX(100%)}to{transform:translateX(0)}}@-webkit-keyframes slideOutFromRight{from{transform:translateX(0)}to{transform:translateX(100%)}}@keyframes slideOutFromRight{from{transform:translateX(0)}to{transform:translateX(100%)}}";
|
|
5
|
+
|
|
6
|
+
let RecommendationsSidebar = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.modalClosed = createEvent(this, "modalClosed", 7);
|
|
10
|
+
this.position = "bottom";
|
|
11
|
+
this.sourceImage = null;
|
|
12
|
+
this.widgetScrollbar = false;
|
|
13
|
+
this.state = "idle";
|
|
14
|
+
}
|
|
15
|
+
bodyClickListener(event) {
|
|
16
|
+
const { clientX, clientY } = event;
|
|
17
|
+
const sidebarRect = this.getSidebarRectangle();
|
|
18
|
+
if (!sidebarRect)
|
|
19
|
+
return;
|
|
20
|
+
const inLeftBound = clientX >= sidebarRect.left;
|
|
21
|
+
const inRightBound = clientX <= sidebarRect.right;
|
|
22
|
+
const inTopBound = clientY >= sidebarRect.top;
|
|
23
|
+
const inBottomBound = clientY <= sidebarRect.bottom;
|
|
24
|
+
const inBound = inLeftBound && inRightBound && inTopBound && inBottomBound;
|
|
25
|
+
if (!inBound) {
|
|
26
|
+
this.state = "closed";
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
getClassMap() {
|
|
30
|
+
return {
|
|
31
|
+
[this.position]: true,
|
|
32
|
+
[this.state]: true,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
getSidebarRectangle() {
|
|
36
|
+
var _a;
|
|
37
|
+
return (_a = this.el.shadowRoot.querySelector("aside")) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
38
|
+
}
|
|
39
|
+
render() {
|
|
40
|
+
return (h(Host, { class: this.getClassMap() }, h("aside", { class: "sidebar", part: "body", onAnimationEnd: (e) => this.handleAnimationEnd(e) }, h("header", { class: { "contains-source-img": this.isSourceImageValid() }, part: "sidebar-header" }, this.isSourceImageValid() ? this.renderSourceImage() : null, h("span", { class: "title", part: "title" }, this.sidebarTitle), h("button", { class: "close-sidebar", onClick: () => (this.state = "closed") }, h(CrossIcon, null))), h("main", { part: "sidebar-content" }, h("vviinn-vpr-widget", { exportparts: "brand, currency, deeplink, image, image-link, price-amount, price-container, price-outdated, price-prefix, price-regular, price-sale, title: product-title", token: this.token, productId: this.productId, imageWidth: 300, blockTitle: "", mode: this.position === "bottom" ? "continuity" : "grid", useCarousel: this.position === "bottom", onRecommendationsLoaded: () => (this.state = "open"), showScroll: this.widgetScrollbar })))));
|
|
41
|
+
}
|
|
42
|
+
renderSourceImage() {
|
|
43
|
+
return (h("img", { class: "source-image", part: "source-image", src: this.sourceImage }));
|
|
44
|
+
}
|
|
45
|
+
isSourceImageValid() {
|
|
46
|
+
var _a;
|
|
47
|
+
return ((_a = this.sourceImage) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
48
|
+
}
|
|
49
|
+
handleAnimationEnd({ animationName }) {
|
|
50
|
+
const isClosingAnimation = animationName.includes("slideOut");
|
|
51
|
+
if (!isClosingAnimation)
|
|
52
|
+
return;
|
|
53
|
+
this.modalClosed.emit();
|
|
54
|
+
}
|
|
55
|
+
get el() { return getElement(this); }
|
|
56
|
+
};
|
|
57
|
+
RecommendationsSidebar.style = recommendationsSidebarCss;
|
|
58
|
+
|
|
59
|
+
export { RecommendationsSidebar as vviinn_recommendations_sidebar };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-d7c7df1c.js';
|
|
2
|
+
import { V as VisualSearchIcon } from './index-ac2e3b9d.js';
|
|
3
|
+
|
|
4
|
+
const vviinnVprButtonCss = ":host{display:block}.open-button{align-items:center;background:rgba(255, 255, 255, 0.8);border-radius:50%;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);box-sizing:border-box;cursor:pointer;display:grid;height:40px;justify-items:center;padding:0;width:40px;transition:all 0.25s ease-in-out}.open-button:hover{box-shadow:0px 2px 6px rgba(0, 0, 0, 0.25)}.open-button:focus{border:2px solid rgba(15, 98, 254, 0.5);outline:none}.open-button:active{background:#F4F4F4;outline:none}";
|
|
5
|
+
|
|
6
|
+
let VviinnVprButton = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.position = "bottom";
|
|
10
|
+
this.sourceImage = null;
|
|
11
|
+
this.sidebarTitle = "Visually similar products";
|
|
12
|
+
this.modalScrollbar = false;
|
|
13
|
+
this.sidebar = null;
|
|
14
|
+
this.sidebarCloseListener = () => {
|
|
15
|
+
document.body.removeChild(this.sidebar);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
return (h(Host, null, h("button", { class: "open-button", part: "button", onClick: () => this.handleClick() }, h("slot", null, h(VisualSearchIcon, null)))));
|
|
20
|
+
}
|
|
21
|
+
handleClick() {
|
|
22
|
+
const sidebar = document.createElement("vviinn-recommendations-sidebar");
|
|
23
|
+
sidebar.sidebarTitle = this.sidebarTitle;
|
|
24
|
+
sidebar.productId = this.productId;
|
|
25
|
+
sidebar.token = this.token;
|
|
26
|
+
sidebar.position = this.position;
|
|
27
|
+
sidebar.sourceImage = this.sourceImage;
|
|
28
|
+
sidebar.widgetScrollbar = this.modalScrollbar;
|
|
29
|
+
this.sidebar = sidebar;
|
|
30
|
+
sidebar.addEventListener("modalClosed", this.sidebarCloseListener);
|
|
31
|
+
document.body.append(this.sidebar);
|
|
32
|
+
}
|
|
33
|
+
disconnectedCallback() {
|
|
34
|
+
this.sidebar.removeEventListener("modalCLosed", this.sidebarCloseListener);
|
|
35
|
+
document.body.removeChild(this.sidebar);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
VviinnVprButton.style = vviinnVprButtonCss;
|
|
39
|
+
|
|
40
|
+
export { VviinnVprButton as vviinn_vpr_button };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
2
|
-
import {
|
|
3
|
-
import { S as SlotSkeleton } from './customized-slots-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-d7c7df1c.js';
|
|
2
|
+
import { a as CameraIcon } from './index-ac2e3b9d.js';
|
|
3
|
+
import { S as SlotSkeleton } from './customized-slots-65b2467d.js';
|
|
4
4
|
|
|
5
|
-
const vviinnVpsButtonCss = "";
|
|
5
|
+
const vviinnVpsButtonCss = ":host{cursor:pointer}";
|
|
6
6
|
|
|
7
7
|
let VviinnVpsButton = class {
|
|
8
8
|
constructor(hostRef) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
2
|
-
import { e as state, i as imageSearchState, O as Option } from './imageSearch.store-
|
|
3
|
-
import { s as slotChangeListener } from './customized-slots-
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-d7c7df1c.js';
|
|
2
|
+
import { e as state, i as imageSearchState, O as Option } from './imageSearch.store-f35e14f8.js';
|
|
3
|
+
import { s as slotChangeListener } from './customized-slots-65b2467d.js';
|
|
4
4
|
import './Handler-639a4cb3.js';
|
|
5
5
|
|
|
6
6
|
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);min-height:580px}.start-page_block{align-content:start;border-right:1px solid #F4F4F4;display:grid;padding:48px}.start-page_block.error{align-content:center}#onboarding-block{border-right:unset;box-sizing:border-box;grid-gap:24px;overflow-y:auto;position:relative;width:100%}vviinn-teaser{margin-bottom:32px;margin-top:-24px}vviinn-image-selector{align-items:center;background:var(--color-primary, var(--color-primary-system));border-color:var(--color-primary, var(--color-primary-system));border-radius:2px;color:white;display:grid;font-size:16px;font-weight:600;height:56px;justify-items:center;margin-bottom:16px;transition:background 0.1s ease-in-out}vviinn-image-selector:hover{background:var(--color-primary-hover, var(--color-primary-hover-system));border-color:var(--color-primary-hover, var(--color-primary-hover-system))}vviinn-image-selector:active{border-color:black}.upload-button-content{display:grid;align-items:center;justify-items:start;justify-content:center;grid-template-columns:-webkit-max-content auto;grid-template-columns:max-content auto;grid-gap:16px}.results-page{display:grid;grid-template-columns:336px auto;box-sizing:border-box}.results-page>*{padding:24px;box-sizing:border-box}.products{align-content:center;align-items:start;box-sizing:border-box;display:grid;grid-gap:32px 16px;grid-template-columns:repeat(auto-fill, minmax(152px, 1fr));justify-items:center;padding:24px;padding-right:0;position:absolute;width:calc(100% - 16px)}.products.hidden{display:none}vviinn-empty-results{width:280px;align-self:center;justify-self:center}.products-wrapper{display:grid;overflow-y:auto;overflow-x:hidden;padding:unset;position:relative;width:100%}.image-wrapper{border-right:1px solid #F4F4F4;display:grid;grid-template-rows:-webkit-min-content 170px;grid-template-rows:min-content 170px;grid-gap:24px;min-width:100%}.onboarding-wrapper{position:absolute;width:100%;padding:48px;box-sizing:border-box;display:grid;grid-gap:64px;padding-bottom:24px}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:4px;border:1px solid #F4F4F4;box-sizing:border-box;color:#161616;font-size:14px;font-weight:600;line-height:20px}search-filters::part(show-more-filters){border:1px solid #f4f4f4;border-radius:4px;box-sizing:border-box;color:#161616;font-size:14px;font-weight:600;line-height:20px;padding:6px 16px}search-filters::part(show-more-filters):hover{background:#EAEAEA}search-filters::part(filter):hover{background:#EAEAEA}search-filters::part(filter):focus{outline:none;border:1px solid var(--color-primary, var(--color-primary-system))}search-filters::part(filter active){background:rgba(15, 98, 254, 0.15);color:var(--color-primary, var(--color-primary-system))}.filters-wrapper{overflow:auto}.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%}@media (max-width: 768px){.start-page_block{padding:24px}.onboarding-wrapper{padding:24px}}@media (max-width: 640px){.start-page{grid-template-rows:-webkit-min-content;grid-template-rows:min-content;grid-template-columns:unset;grid-gap:48px;padding:24px 0 48px 0}}@media (max-width: 640px) and (min-width: 415px){.onboarding-wrapper{position:unset}#onboarding-block{overflow:unset}.start-page.active{height:1px;overflow:auto}}@media (max-width: 415px){.results-page>*{box-sizing:border-box;padding:24px}vviinn-slide{padding-bottom:48px}.start-page_block:last-of-type{border-right:unset;overflow-y:unset;position:static;box-sizing:border-box;width:unset}.start-page_block{padding:0 24px}vviinn-teaser{margin-top:24px}.onboarding-wrapper{position:static;width:unset;padding:unset;box-sizing:border-box}.results-page{grid-template-columns:unset;grid-template-rows:-webkit-min-content auto;grid-template-rows:min-content auto}.image{margin-bottom:8px}.image-wrapper{grid-template-rows:-webkit-min-content auto;grid-template-rows:min-content auto;width:100%}.products-wrapper{align-content:start;position:static;overflow-y:unset;width:100%;padding-top:0}.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: 320px){.products{grid-template-columns:unset}}vviinn-wrong-format,vviinn-server-error{width:280px;align-self:center;justify-self:center}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
import { g as globalScripts } from './app-globals-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-d7c7df1c.js';
|
|
2
|
+
import { g as globalScripts } from './app-globals-90d99f95.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
Stencil Client Patch Browser v2.9.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
|
|
16
16
|
patchBrowser().then(options => {
|
|
17
17
|
globalScripts();
|
|
18
|
-
return bootstrapLazy([["cropper-handler",[[1,"cropper-handler",{"handler":[16],"disabled":[4]}]]],["vviinn-error",[[1,"vviinn-error"]]],["vviinn-preloader",[[1,"vviinn-preloader"]]],["vviinn-
|
|
18
|
+
return bootstrapLazy([["cropper-handler",[[1,"cropper-handler",{"handler":[16],"disabled":[4]}]]],["vviinn-error",[[1,"vviinn-error"]]],["vviinn-preloader",[[1,"vviinn-preloader"]]],["vviinn-carousel_3",[[1,"vviinn-vpr-widget",{"blockTitle":[1,"block-title"],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"productId":[1,"product-id"],"token":[1],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"mode":[1],"campaignType":[1,"campaign-type"],"locale":[1],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"recommendations":[32],"loaded":[32]},[[0,"productImageLoaded","lol"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"recommendations":[16],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32]}],[1,"vviinn-product-card",{"brand":[1],"currency":[1],"deeplink":[1],"image":[1],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"locale":[1],"price":[2],"pricePrefix":[1,"price-prefix"],"productId":[1,"product-id"],"productTitle":[1,"product-title"],"productType":[1,"product-type"],"salePrice":[2,"sale-price"],"responsive":[4],"dimmedBackground":[4,"dimmed-background"],"imageLoaded":[32]}]]],["highlight-box_22",[[1,"vviinn-image-view"],[1,"vviinn-onboarding"],[1,"vviinn-example-images",null,[[0,"exampleImageSelected","handleImageSelection"],[0,"exampleImageError","handleImageSelectionError"]]],[1,"vviinn-overlayed-modal",{"active":[4]}],[1,"vviinn-empty-results"],[1,"vviinn-image-selector"],[1,"vviinn-server-error"],[1,"vviinn-wrong-format"],[1,"search-filters",{"filter":[16],"selectedCategoryId":[32],"hideFilters":[32]}],[1,"vviinn-privacy-badge"],[1,"vviinn-teaser"],[1,"image-cropper",{"disabled":[4],"handleMove":[32]}],[1,"vviinn-example-image",{"src":[1],"width":[2],"height":[2],"selected":[32]}],[1,"highlight-box"],[1,"vviinn-detected-object",{"detectedObject":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"slider":[32]}],[1,"vviinn-onboarding-card-1"],[1,"vviinn-onboarding-card-2"],[1,"vviinn-onboarding-card-3"],[1,"vviinn-overlay"],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32]}]]],["vviinn-vps-widget",[[1,"vviinn-vps-widget",{"token":[1],"apiPath":[1,"api-path"],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"slidePosition":[32],"width":[32],"wrongImageFormat":[32]}]]],["vviinn-vps-button",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"apiPath":[1,"api-path"],"pressed":[32]},[[0,"modalClosed","handleModalClosed"]]]]],["vviinn-recommendations-sidebar",[[1,"vviinn-recommendations-sidebar",{"sidebarTitle":[1,"sidebar-title"],"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"widgetScrollbar":[4,"widget-scrollbar"],"state":[32]},[[16,"click","bodyClickListener"]]]]],["vviinn-vpr-button",[[1,"vviinn-vpr-button",{"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"sidebarTitle":[1,"sidebar-title"],"modalScrollbar":[4,"modal-scrollbar"]}]]]], options);
|
|
19
19
|
});
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Recommendation } from "../../recommendation/recommendation";
|
|
2
2
|
declare type MoveDirection = "left" | "right";
|
|
3
3
|
export declare type CarouselMode = "grid" | "continuity";
|
|
4
|
+
/**
|
|
5
|
+
* @part carousel-button
|
|
6
|
+
**/
|
|
4
7
|
export declare class VviinnCarousel {
|
|
5
8
|
el: HTMLElement;
|
|
6
9
|
moveDirection: MoveDirection;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export declare const argTypes: {
|
|
2
|
+
imageWidth: {
|
|
3
|
+
name: string;
|
|
4
|
+
};
|
|
5
|
+
imageBorder: {
|
|
6
|
+
name: string;
|
|
7
|
+
};
|
|
8
|
+
imageBorderColor: {
|
|
9
|
+
name: string;
|
|
10
|
+
control: {
|
|
11
|
+
type: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
imageBackground: {
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
showBrand: {
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
titleLineCount: {
|
|
23
|
+
name: string;
|
|
24
|
+
options: number[];
|
|
25
|
+
control: {
|
|
26
|
+
type: string;
|
|
27
|
+
default: number;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
locale: {
|
|
31
|
+
name: string;
|
|
32
|
+
options: string[];
|
|
33
|
+
control: {
|
|
34
|
+
type: string;
|
|
35
|
+
default: number;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
currencyValue: {
|
|
39
|
+
name: string;
|
|
40
|
+
options: string[];
|
|
41
|
+
control: {
|
|
42
|
+
type: string;
|
|
43
|
+
default: number;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
contentAlignment: {
|
|
47
|
+
name: string;
|
|
48
|
+
options: string[];
|
|
49
|
+
mapping: {
|
|
50
|
+
Left: number;
|
|
51
|
+
Centered: number;
|
|
52
|
+
Right: number;
|
|
53
|
+
};
|
|
54
|
+
control: {
|
|
55
|
+
type: string;
|
|
56
|
+
default: number;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
primaryTextColor: {
|
|
60
|
+
name: string;
|
|
61
|
+
control: {
|
|
62
|
+
type: string;
|
|
63
|
+
};
|
|
64
|
+
description: string;
|
|
65
|
+
};
|
|
66
|
+
secondaryTextColor: {
|
|
67
|
+
name: string;
|
|
68
|
+
description: string;
|
|
69
|
+
control: {
|
|
70
|
+
type: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const productDecorator: (story: () => any) => string;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: string;
|
|
4
|
+
decorators: ((story: () => any) => string)[];
|
|
5
|
+
argTypes: {
|
|
6
|
+
imageWidth: {
|
|
7
|
+
name: string;
|
|
8
|
+
};
|
|
9
|
+
imageBorder: {
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
imageBorderColor: {
|
|
13
|
+
name: string;
|
|
14
|
+
control: {
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
imageBackground: {
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
showBrand: {
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
titleLineCount: {
|
|
27
|
+
name: string;
|
|
28
|
+
options: number[];
|
|
29
|
+
control: {
|
|
30
|
+
type: string;
|
|
31
|
+
default: number;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
locale: {
|
|
35
|
+
name: string;
|
|
36
|
+
options: string[];
|
|
37
|
+
control: {
|
|
38
|
+
type: string;
|
|
39
|
+
default: number;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
currencyValue: {
|
|
43
|
+
name: string;
|
|
44
|
+
options: string[];
|
|
45
|
+
control: {
|
|
46
|
+
type: string;
|
|
47
|
+
default: number;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
contentAlignment: {
|
|
51
|
+
name: string;
|
|
52
|
+
options: string[];
|
|
53
|
+
mapping: {
|
|
54
|
+
Left: number;
|
|
55
|
+
Centered: number;
|
|
56
|
+
Right: number;
|
|
57
|
+
};
|
|
58
|
+
control: {
|
|
59
|
+
type: string;
|
|
60
|
+
default: number;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
primaryTextColor: {
|
|
64
|
+
name: string;
|
|
65
|
+
control: {
|
|
66
|
+
type: string;
|
|
67
|
+
};
|
|
68
|
+
description: string;
|
|
69
|
+
};
|
|
70
|
+
secondaryTextColor: {
|
|
71
|
+
name: string;
|
|
72
|
+
description: string;
|
|
73
|
+
control: {
|
|
74
|
+
type: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
export default _default;
|
|
80
|
+
export declare const Default: any;
|