vviinn-widgets 2.0.0 → 2.2.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/Handler-d1a8a86a.js +329 -0
- package/dist/cjs/{app-globals-de6924b5.js → app-globals-d0251be8.js} +1 -1
- package/dist/cjs/cropper-handler.cjs.entry.js +27 -0
- package/dist/cjs/customized-slots-14b77e4a.js +53 -0
- package/dist/cjs/{cropper-handler_28.cjs.entry.js → highlight-box_22.cjs.entry.js} +48 -437
- package/dist/{esm/Array-e81cf4a3.js → cjs/imageSearch.store-d9ed1a5b.js} +10009 -3391
- package/dist/cjs/{index-7adce49f.js → index-141137b2.js} +14 -362
- package/dist/cjs/{index-8a276115.js → index-a5e15a0c.js} +7 -1
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/vviinn-carousel_5.cjs.entry.js +1232 -0
- package/dist/cjs/vviinn-error.cjs.entry.js +19 -0
- package/dist/cjs/vviinn-preloader.cjs.entry.js +26 -0
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +43 -0
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +97 -0
- package/dist/cjs/vviinn-widgets.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +22 -18
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.js +78 -68
- package/dist/collection/components/vviinn-icons/index.js +4 -0
- package/dist/collection/components/vviinn-product-card/render-helpers.js +4 -4
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.css +5 -6
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +26 -5
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.css +238 -0
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +200 -0
- package/dist/collection/components/vviinn-vpr-button/stories/kek.stories.js +18 -0
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.css +35 -0
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +149 -0
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +148 -28
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +31 -8
- package/dist/esm/Handler-639a4cb3.js +308 -0
- package/dist/esm/{app-globals-0a626970.js → app-globals-b6113170.js} +1 -1
- package/dist/esm/cropper-handler.entry.js +23 -0
- package/dist/esm/customized-slots-a952fb80.js +50 -0
- package/dist/esm/{cropper-handler_28.entry.js → highlight-box_22.entry.js} +21 -404
- package/dist/{cjs/Array-cce2fde8.js → esm/imageSearch.store-4ca31230.js} +8705 -2137
- package/dist/esm/{index-e77e65ae.js → index-017f18de.js} +6 -2
- package/dist/esm/{index-0ccfcee5.js → index-3e85e294.js} +14 -362
- package/dist/esm/loader.js +3 -3
- package/dist/esm/vviinn-carousel_5.entry.js +1224 -0
- package/dist/esm/vviinn-error.entry.js +15 -0
- package/dist/esm/vviinn-preloader.entry.js +22 -0
- package/dist/esm/vviinn-vps-button.entry.js +39 -0
- package/dist/esm/vviinn-vps-widget.entry.js +93 -0
- package/dist/esm/vviinn-widgets.js +3 -3
- package/dist/types/campaign/Campaign.d.ts +1 -1
- package/dist/types/components/vviinn-carousel/vviinn-carousel.d.ts +13 -7
- package/dist/types/components/vviinn-icons/index.d.ts +2 -0
- package/dist/types/components/vviinn-product-card/render-helpers.d.ts +3 -2
- package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +2 -0
- package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +25 -0
- package/dist/types/components/vviinn-vpr-button/stories/kek.stories.d.ts +7 -0
- package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +14 -0
- package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +36 -8
- package/dist/types/components.d.ts +62 -10
- package/dist/vviinn-widgets/p-0ed1ef7e.entry.js +1 -0
- package/dist/vviinn-widgets/{p-6c4fd1db.js → p-16e49514.js} +1 -1
- package/dist/vviinn-widgets/p-3da18d7f.js +1 -0
- package/dist/vviinn-widgets/p-62a1b042.entry.js +1 -0
- package/dist/vviinn-widgets/p-68900093.entry.js +1 -0
- package/dist/vviinn-widgets/p-6c4c240d.entry.js +1 -0
- package/dist/vviinn-widgets/p-95e53d99.entry.js +1 -0
- package/dist/vviinn-widgets/p-9fee20e7.entry.js +1 -0
- package/dist/vviinn-widgets/p-d7894eaf.js +1 -0
- package/dist/vviinn-widgets/p-db0be4cd.js +1 -0
- package/dist/vviinn-widgets/p-eb15116d.entry.js +1 -0
- package/dist/vviinn-widgets/{p-489aee23.js → p-f00fddbb.js} +1 -1
- package/dist/vviinn-widgets/p-f582db5c.js +1 -0
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +3 -1
- package/www/build/p-0ed1ef7e.entry.js +1 -0
- package/www/build/{p-6c4fd1db.js → p-16e49514.js} +1 -1
- package/www/build/p-1cc0cdfd.js +1 -0
- package/www/build/p-3da18d7f.js +1 -0
- package/www/build/p-62a1b042.entry.js +1 -0
- package/www/build/p-68900093.entry.js +1 -0
- package/www/build/p-6c4c240d.entry.js +1 -0
- package/www/build/p-95e53d99.entry.js +1 -0
- package/www/build/p-9fee20e7.entry.js +1 -0
- package/www/build/p-a67898be.css +1 -0
- package/www/build/p-d7894eaf.js +1 -0
- package/www/build/p-db0be4cd.js +1 -0
- package/www/build/p-eb15116d.entry.js +1 -0
- package/www/build/{p-489aee23.js → p-f00fddbb.js} +1 -1
- package/www/build/p-f582db5c.js +1 -0
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +177 -8
- package/dist/cjs/imageSearch.store-39fce56c.js +0 -6926
- package/dist/cjs/vviinn-carousel.cjs.entry.js +0 -222
- package/dist/cjs/vviinn-vpr-widget.cjs.entry.js +0 -106
- package/dist/esm/imageSearch.store-b887ff78.js +0 -6893
- package/dist/esm/vviinn-carousel.entry.js +0 -218
- package/dist/esm/vviinn-vpr-widget.entry.js +0 -102
- package/dist/vviinn-widgets/p-2bf74c28.js +0 -1
- package/dist/vviinn-widgets/p-3063e23a.js +0 -1
- package/dist/vviinn-widgets/p-9145c82e.entry.js +0 -1
- package/dist/vviinn-widgets/p-ddcac3f8.js +0 -1
- package/dist/vviinn-widgets/p-f05da9f1.entry.js +0 -1
- package/dist/vviinn-widgets/p-f12f823d.entry.js +0 -1
- package/www/build/p-2bf74c28.js +0 -1
- package/www/build/p-3063e23a.js +0 -1
- package/www/build/p-9145c82e.entry.js +0 -1
- package/www/build/p-cbae3071.js +0 -125
- package/www/build/p-ddcac3f8.js +0 -1
- package/www/build/p-e0153ae2.css +0 -6
- package/www/build/p-f05da9f1.entry.js +0 -1
- package/www/build/p-f12f823d.entry.js +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-3e85e294.js';
|
|
2
|
+
|
|
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
|
+
|
|
5
|
+
let VviinnError = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
return (h(Host, null, h("slot", { name: "icon" }), h("slot", { name: "title" }), h("slot", { name: "text" }), h("slot", { name: "action" })));
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
VviinnError.style = vviinnErrorCss;
|
|
14
|
+
|
|
15
|
+
export { VviinnError as vviinn_error };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-3e85e294.js';
|
|
2
|
+
import { i as imageSearchState } from './imageSearch.store-4ca31230.js';
|
|
3
|
+
import './Handler-639a4cb3.js';
|
|
4
|
+
|
|
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)}}";
|
|
6
|
+
|
|
7
|
+
let VviinnPreloader = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
}
|
|
11
|
+
isActive() {
|
|
12
|
+
return (imageSearchState.loading || imageSearchState.objectDetectionInProgress);
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
return (h(Host, { class: {
|
|
16
|
+
active: this.isActive(),
|
|
17
|
+
} }));
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
VviinnPreloader.style = vviinnPreloaderCss;
|
|
21
|
+
|
|
22
|
+
export { VviinnPreloader as vviinn_preloader };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-3e85e294.js';
|
|
2
|
+
import { b as CameraIcon } from './index-017f18de.js';
|
|
3
|
+
import { S as SlotSkeleton } from './customized-slots-a952fb80.js';
|
|
4
|
+
|
|
5
|
+
const vviinnVpsButtonCss = "";
|
|
6
|
+
|
|
7
|
+
let VviinnVpsButton = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.globalSlotsChanged = createEvent(this, "globalSlotsChanged", 7);
|
|
11
|
+
/** Currency sign will shown after price */
|
|
12
|
+
this.currencySign = "€";
|
|
13
|
+
/** Locale for currency formatting */
|
|
14
|
+
this.locale = "de-DE";
|
|
15
|
+
this.pressed = false;
|
|
16
|
+
}
|
|
17
|
+
handleModalClosed() {
|
|
18
|
+
this.pressed = false;
|
|
19
|
+
}
|
|
20
|
+
componentDidLoad() {
|
|
21
|
+
const slots = this.el.querySelectorAll("[slot]");
|
|
22
|
+
this.globalSlotsChanged.emit(Array.from(slots));
|
|
23
|
+
}
|
|
24
|
+
handleKeyDown(ev) {
|
|
25
|
+
if (ev.code !== "Enter" && ev.code !== "Space")
|
|
26
|
+
return;
|
|
27
|
+
this.pressed = true;
|
|
28
|
+
}
|
|
29
|
+
handleClick() {
|
|
30
|
+
this.pressed = true;
|
|
31
|
+
}
|
|
32
|
+
render() {
|
|
33
|
+
return (h(Host, { tabindex: "0", role: "button", pressed: this.pressed, onClick: () => this.handleClick(), onKeyDown: (ev) => this.handleKeyDown(ev) }, h("slot", null, h(CameraIcon, null)), h(SlotSkeleton, null), h("vviinn-vps-widget", { active: this.pressed, "currency-sign": "\u20AC", token: this.token, locale: this.locale, apiPath: this.apiPath, exportparts: "brand, currency, deeplink, image, image-link, price-amount, price-container, price-outdated, price-prefix, price-regular, price-sale, title, product-card" })));
|
|
34
|
+
}
|
|
35
|
+
get el() { return getElement(this); }
|
|
36
|
+
};
|
|
37
|
+
VviinnVpsButton.style = vviinnVpsButtonCss;
|
|
38
|
+
|
|
39
|
+
export { VviinnVpsButton as vviinn_vps_button };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-3e85e294.js';
|
|
2
|
+
import { e as state, i as imageSearchState, O as Option } from './imageSearch.store-4ca31230.js';
|
|
3
|
+
import { s as slotChangeListener } from './customized-slots-a952fb80.js';
|
|
4
|
+
import './Handler-639a4cb3.js';
|
|
5
|
+
|
|
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}";
|
|
7
|
+
|
|
8
|
+
let VviinnVpsWidget = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
/** When true modal window with widget will be shown */
|
|
12
|
+
this.active = false;
|
|
13
|
+
/** Currency sign will shown after price */
|
|
14
|
+
this.currencySign = "€";
|
|
15
|
+
/** Locale for currency formatting */
|
|
16
|
+
this.locale = "de-DE";
|
|
17
|
+
this.slidePosition = 0;
|
|
18
|
+
this.width = 0;
|
|
19
|
+
this.wrongImageFormat = false;
|
|
20
|
+
}
|
|
21
|
+
activeWatcher(value) {
|
|
22
|
+
if (value) {
|
|
23
|
+
this.overflow = document.body.style.overflow;
|
|
24
|
+
document.body.style.overflow = "hidden";
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
document.body.style.overflow = this.overflow;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
componentWillLoad() {
|
|
31
|
+
slotChangeListener(this, this.el);
|
|
32
|
+
}
|
|
33
|
+
connectedCallback() {
|
|
34
|
+
state.apiPath = this.apiPath;
|
|
35
|
+
state.currencySign = this.currencySign;
|
|
36
|
+
state.locale = this.locale;
|
|
37
|
+
imageSearchState.token = this.token;
|
|
38
|
+
}
|
|
39
|
+
handleImageSelection() {
|
|
40
|
+
this.slidePosition = 1;
|
|
41
|
+
const root = this.el.shadowRoot.querySelector("vviinn-overlayed-modal");
|
|
42
|
+
const overlay = root.shadowRoot.querySelector("vviinn-overlay");
|
|
43
|
+
const modal = overlay.querySelector("vviinn-modal");
|
|
44
|
+
const modalBody = modal.shadowRoot.querySelector(".body");
|
|
45
|
+
modalBody.scrollTop = 0;
|
|
46
|
+
}
|
|
47
|
+
resetState() {
|
|
48
|
+
this.resetScroll("onboarding-block");
|
|
49
|
+
this.slidePosition = 0;
|
|
50
|
+
imageSearchState.image = Option.none;
|
|
51
|
+
imageSearchState.imageUrl = Option.none;
|
|
52
|
+
imageSearchState.imageBounds = Option.none;
|
|
53
|
+
imageSearchState.searchArea = Option.none;
|
|
54
|
+
imageSearchState.results = [];
|
|
55
|
+
imageSearchState.filters = [];
|
|
56
|
+
imageSearchState.detectedObjects = [];
|
|
57
|
+
imageSearchState.activeIonLink = undefined;
|
|
58
|
+
imageSearchState.rectangleSearchForm = undefined;
|
|
59
|
+
this.resetScroll("results-block");
|
|
60
|
+
}
|
|
61
|
+
haveErrors() {
|
|
62
|
+
return this.wrongImageFormat || imageSearchState.serverError;
|
|
63
|
+
}
|
|
64
|
+
resetScroll(elementId, behavior = "auto") {
|
|
65
|
+
const element = this.el.shadowRoot.getElementById(elementId);
|
|
66
|
+
element.scroll({ top: 0, left: 0, behavior });
|
|
67
|
+
}
|
|
68
|
+
handleModalClose() {
|
|
69
|
+
this.active = false;
|
|
70
|
+
this.resetState();
|
|
71
|
+
const elementsToReset = ["onboarding-block", "results-block"];
|
|
72
|
+
elementsToReset.forEach((name) => this.resetScroll(name));
|
|
73
|
+
}
|
|
74
|
+
render() {
|
|
75
|
+
return (h(Host, null, h("vviinn-overlayed-modal", { class: { "first-screen": this.slidePosition === 0 }, active: this.active, onSecondaryActionClicked: () => this.resetState(), onModalClosed: () => this.handleModalClose(), exportparts: "secondary-action, title, close-button" }, h("vviinn-slider", { showBullets: false, position: this.slidePosition }, h("vviinn-slide", { class: { "start-page": true } }, h("div", { class: {
|
|
76
|
+
error: this.haveErrors(),
|
|
77
|
+
"start-page_block": true,
|
|
78
|
+
} }, h("vviinn-wrong-format", { class: { hidden: !this.wrongImageFormat }, onActionClick: () => (this.wrongImageFormat = false) }), h("vviinn-server-error", { class: { hidden: !imageSearchState.serverError }, onActionClick: () => (imageSearchState.serverError = false) }), h("vviinn-teaser", { class: { hidden: this.haveErrors() } }), h("vviinn-image-selector", { class: { hidden: this.haveErrors() }, onImageSelected: () => this.handleImageSelection(), onImageSelectedError: () => (this.wrongImageFormat = true), part: "select-image_button" }, h("span", { slot: "upload-button-text", class: "upload-button-content" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "29", height: "28", fill: "none" }, h("defs", null), h("path", { fill: "#fff", "fill-rule": "evenodd", d: "M10.271 3.89A.875.875 0 0111 3.5h7c.293 0 .566.146.728.39l1.49 2.235h3.033a2.625 2.625 0 012.625 2.625V21a2.625 2.625 0 01-2.625 2.625H5.75A2.625 2.625 0 013.125 21V8.75A2.625 2.625 0 015.75 6.125h3.031l1.49-2.235zm1.197 1.36l-1.49 2.235a.875.875 0 01-.729.39H5.75a.875.875 0 00-.875.875V21a.875.875 0 00.875.875h17.5a.875.875 0 00.875-.875V8.75a.875.875 0 00-.875-.875h-3.5a.875.875 0 01-.729-.39l-1.49-2.235h-6.063z", "clip-rule": "evenodd" }), h("path", { fill: "#fff", "fill-rule": "evenodd", d: "M14.5 11.375a3.062 3.062 0 100 6.125 3.062 3.062 0 000-6.125zm-4.813 3.063a4.812 4.812 0 119.625 0 4.812 4.812 0 01-9.625 0z", "clip-rule": "evenodd" })), h("slot", { name: "vviinn-image-upload-button-text" }, h("span", null, "Kamera oder Bild ausw\u00E4hlen")))), h("vviinn-privacy-badge", { class: { hidden: this.haveErrors() } })), h("div", { id: "onboarding-block", class: "start-page_block" }, h("div", { class: "onboarding-wrapper" }, h("vviinn-onboarding", null), h("vviinn-example-images", { onImageSelected: () => this.handleImageSelection(), onImageSelectedError: () => this.resetScroll("onboarding-block", "smooth") })))), h("vviinn-slide", { class: { "results-page": true, active: this.slidePosition == 1 } }, h("div", { class: "image-wrapper" }, h("vviinn-image-view", null), h("div", { class: "filters-wrapper" }, h("div", { class: "filters" }, imageSearchState.filters.map((filter) => (h("search-filters", { filter: filter })))))), h("div", { id: "results-block", class: "products-wrapper" }, h("div", { class: { "nothing-found": true, hidden: imageSearchState.results.length > 0 } }, h("vviinn-empty-results", null), h("vviinn-onboarding", null)), h("div", { class: {
|
|
79
|
+
hidden: imageSearchState.results.length <= 0,
|
|
80
|
+
products: true,
|
|
81
|
+
} }, imageSearchState.results.map((p) => {
|
|
82
|
+
var _a;
|
|
83
|
+
return (h("vviinn-product-card", { hidden: true, productTitle: p.title, productId: p.productId, brand: p.brand, deeplink: p.deeplink, price: p.price.actual, salePrice: p.price.sale, imageWidth: 160, image: (_a = p.image.thumbnail) !== null && _a !== void 0 ? _a : p.image.original, part: "product-card" }));
|
|
84
|
+
}))))))));
|
|
85
|
+
}
|
|
86
|
+
get el() { return getElement(this); }
|
|
87
|
+
static get watchers() { return {
|
|
88
|
+
"active": ["activeWatcher"]
|
|
89
|
+
}; }
|
|
90
|
+
};
|
|
91
|
+
VviinnVpsWidget.style = vviinnVpsWidgetCss;
|
|
92
|
+
|
|
93
|
+
export { VviinnVpsWidget as vviinn_vps_widget };
|
|
@@ -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-3e85e294.js';
|
|
2
|
+
import { g as globalScripts } from './app-globals-b6113170.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([["
|
|
18
|
+
return bootstrapLazy([["cropper-handler",[[1,"cropper-handler",{"handler":[16],"disabled":[4]}]]],["vviinn-error",[[1,"vviinn-error"]]],["vviinn-preloader",[[1,"vviinn-preloader"]]],["vviinn-carousel_5",[[1,"vviinn-vpr-button",{"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"sidebarTitle":[1,"sidebar-title"],"modalScrollbar":[4,"modal-scrollbar"]}],[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"]]],[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"]]]]]], options);
|
|
19
19
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { Recommendation } from "../../recommendation/recommendation";
|
|
1
2
|
declare type MoveDirection = "left" | "right";
|
|
2
|
-
export declare type CarouselMode = "
|
|
3
|
+
export declare type CarouselMode = "grid" | "continuity";
|
|
3
4
|
export declare class VviinnCarousel {
|
|
4
5
|
el: HTMLElement;
|
|
5
6
|
moveDirection: MoveDirection;
|
|
@@ -8,29 +9,27 @@ export declare class VviinnCarousel {
|
|
|
8
9
|
mode: CarouselMode;
|
|
9
10
|
imageWidth: number;
|
|
10
11
|
showScroll: boolean;
|
|
11
|
-
|
|
12
|
+
recommendations: Recommendation[];
|
|
12
13
|
private columns;
|
|
13
14
|
private resizeObserver;
|
|
14
15
|
private mutationObserver;
|
|
15
16
|
connectedCallback(): void;
|
|
16
17
|
disconnectedCallback(): void;
|
|
17
|
-
|
|
18
|
+
componentDidLoad(): void;
|
|
18
19
|
private getItemWidthFromDocument;
|
|
19
20
|
private setItemWidth;
|
|
20
21
|
private getContentClassMap;
|
|
21
22
|
private handleResize;
|
|
22
23
|
private calculateMoveStep;
|
|
24
|
+
private getHostParent;
|
|
23
25
|
private setWidth;
|
|
26
|
+
getParent(): HTMLElement;
|
|
24
27
|
private cloneSlottedContent;
|
|
25
|
-
private renderContent;
|
|
26
|
-
private renderGroup;
|
|
27
|
-
private renderLine;
|
|
28
28
|
private getActiveGroupIndex;
|
|
29
29
|
private getContentNode;
|
|
30
30
|
private getContent;
|
|
31
31
|
private getColumnsNumber;
|
|
32
32
|
private getContentGroups;
|
|
33
|
-
private appendToContent;
|
|
34
33
|
private showNext;
|
|
35
34
|
private showPrev;
|
|
36
35
|
private scroll;
|
|
@@ -38,6 +37,13 @@ export declare class VviinnCarousel {
|
|
|
38
37
|
private showBullets;
|
|
39
38
|
private showScrollbar;
|
|
40
39
|
private getClassMap;
|
|
40
|
+
private renderRecommendation;
|
|
41
|
+
private renderRecommendationGroup;
|
|
42
|
+
private renderRecommendationGroups;
|
|
43
|
+
private renderRecommendations;
|
|
44
|
+
private renderRecommendationsElements;
|
|
45
|
+
private renderGrid;
|
|
46
|
+
private renderBullets;
|
|
41
47
|
render(): any;
|
|
42
48
|
}
|
|
43
49
|
export {};
|
|
@@ -6,3 +6,5 @@ export declare const OnboardingCard3Icon: () => any;
|
|
|
6
6
|
export declare const CheckIcon: () => any;
|
|
7
7
|
export declare const LoaderIcon: () => any;
|
|
8
8
|
export declare const ChevronIcon: () => any;
|
|
9
|
+
export declare const VisualSearchIcon: () => any;
|
|
10
|
+
export declare const CrossIcon: () => any;
|
|
@@ -18,7 +18,8 @@ export declare type ImageProps = {
|
|
|
18
18
|
height: number;
|
|
19
19
|
title: string;
|
|
20
20
|
src: string;
|
|
21
|
+
lazy: boolean;
|
|
21
22
|
};
|
|
22
|
-
export declare const Image: (props: ImageProps) => any;
|
|
23
|
-
export declare const ResponsiveImage: (props: ImageProps) => any;
|
|
23
|
+
export declare const Image: (props: ImageProps, onLoadEnd?: () => any) => any;
|
|
24
|
+
export declare const ResponsiveImage: (props: ImageProps, onLoadEnd?: () => any) => any;
|
|
24
25
|
export {};
|
|
@@ -37,10 +37,12 @@ export declare class VviinnProductCard {
|
|
|
37
37
|
recommendationView: EventEmitter<string>;
|
|
38
38
|
/** Event fires ones when user click on deeplink */
|
|
39
39
|
recommendationClick: EventEmitter<string>;
|
|
40
|
+
productImageLoaded: EventEmitter<string>;
|
|
40
41
|
private intersectionObserver;
|
|
41
42
|
private intersectionCallback;
|
|
42
43
|
componentDidLoad(): void;
|
|
43
44
|
private getProduct;
|
|
44
45
|
private renderImage;
|
|
46
|
+
private kek;
|
|
45
47
|
render(): any;
|
|
46
48
|
}
|
package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { EventEmitter } from "../../../stencil-public-runtime";
|
|
2
|
+
declare type SidebarState = "idle" | "open" | "closed";
|
|
3
|
+
declare type ClickEvent = Event & {
|
|
4
|
+
clientX: number;
|
|
5
|
+
clientY: number;
|
|
6
|
+
};
|
|
7
|
+
export declare class RecommendationsSidebar {
|
|
8
|
+
el: HTMLElement;
|
|
9
|
+
sidebarTitle: string;
|
|
10
|
+
token: string;
|
|
11
|
+
productId: string;
|
|
12
|
+
position: "bottom" | "right";
|
|
13
|
+
sourceImage: string | null;
|
|
14
|
+
widgetScrollbar: boolean;
|
|
15
|
+
state: SidebarState;
|
|
16
|
+
modalClosed: EventEmitter<void>;
|
|
17
|
+
bodyClickListener(event: ClickEvent): void;
|
|
18
|
+
private getClassMap;
|
|
19
|
+
private getSidebarRectangle;
|
|
20
|
+
render(): any;
|
|
21
|
+
private renderSourceImage;
|
|
22
|
+
private isSourceImageValid;
|
|
23
|
+
private handleAnimationEnd;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @part button - clickable button element
|
|
4
|
+
*/
|
|
5
|
+
export declare class VviinnVprButton {
|
|
6
|
+
token: string;
|
|
7
|
+
productId: string;
|
|
8
|
+
position: "bottom" | "right";
|
|
9
|
+
sourceImage: string | null;
|
|
10
|
+
sidebarTitle: string;
|
|
11
|
+
modalScrollbar: boolean;
|
|
12
|
+
render(): any;
|
|
13
|
+
handleClick(): void;
|
|
14
|
+
}
|
|
@@ -1,12 +1,25 @@
|
|
|
1
|
-
import { ComponentInterface } from "../../stencil-public-runtime";
|
|
2
|
-
import { Interfaces } from "../../interfaces/recommendation";
|
|
1
|
+
import { ComponentInterface, EventEmitter } from "../../stencil-public-runtime";
|
|
3
2
|
import { CampaignName } from "../../campaign/Campaign";
|
|
3
|
+
import { CarouselMode } from "../vviinn-carousel/vviinn-carousel";
|
|
4
|
+
import { Recommendation } from "../../recommendation/recommendation";
|
|
5
|
+
/**
|
|
6
|
+
* @part product-card - product card itself
|
|
7
|
+
* @part title - title inside product card
|
|
8
|
+
* @part brand - brand inside product card
|
|
9
|
+
* @part currency - brand inside product card
|
|
10
|
+
* @part image - product card image
|
|
11
|
+
* @part image-link - anchor element around product image
|
|
12
|
+
* @part price-amount - span element around every prices
|
|
13
|
+
* @part price-container - block of prices
|
|
14
|
+
* @part price-outdated - block for outdated price. rendered when product contains sale price
|
|
15
|
+
* @part price-prefix - block rendered before each price element (for ex. "from")
|
|
16
|
+
* @part price-regular - block for price if no sale price presented
|
|
17
|
+
* @part price-sale - block for sale price. rendered only if sale price presented
|
|
18
|
+
*/
|
|
4
19
|
export declare class VviinnVprWidget implements ComponentInterface {
|
|
5
20
|
el: HTMLElement;
|
|
6
21
|
/** Title for recommendations widget */
|
|
7
22
|
blockTitle: string;
|
|
8
|
-
/** Number of columns for recommendations */
|
|
9
|
-
columns: number;
|
|
10
23
|
/** Ratio of each recommended product image */
|
|
11
24
|
imageRatio: number;
|
|
12
25
|
/** Width of each recommended product image */
|
|
@@ -20,21 +33,36 @@ export declare class VviinnVprWidget implements ComponentInterface {
|
|
|
20
33
|
/** prefix will shown before price */
|
|
21
34
|
pricePrefix: string;
|
|
22
35
|
/** Use slider or grid view */
|
|
23
|
-
mode:
|
|
36
|
+
mode: CarouselMode;
|
|
24
37
|
/** Campaign type */
|
|
25
38
|
campaignType: CampaignName;
|
|
26
39
|
/** Locale for currency formatting */
|
|
27
40
|
locale: string;
|
|
28
41
|
/** @internal */
|
|
29
42
|
apiPath: string | undefined;
|
|
43
|
+
/** @internal */
|
|
44
|
+
useCarousel: boolean;
|
|
30
45
|
showScroll: boolean;
|
|
31
|
-
|
|
46
|
+
cssUrl: string | null;
|
|
47
|
+
recommendations: Recommendation[];
|
|
32
48
|
loaded: boolean;
|
|
49
|
+
recommendationsLoaded: EventEmitter;
|
|
50
|
+
private productIds;
|
|
51
|
+
private productImageLoadedSubject;
|
|
33
52
|
handleProductIdChange(): void;
|
|
53
|
+
handleCampaignTypeChange(): void;
|
|
54
|
+
handleApiPathChange(newPath: string): void;
|
|
55
|
+
lol({ detail }: CustomEvent<string>): void;
|
|
34
56
|
connectedCallback(): void;
|
|
35
57
|
componentWillLoad(): Promise<void>;
|
|
36
58
|
private getRecommendations;
|
|
37
|
-
handleError
|
|
38
|
-
handleRecommendationsSucces
|
|
59
|
+
private handleError;
|
|
60
|
+
private handleRecommendationsSucces;
|
|
61
|
+
private isExternalCSS;
|
|
62
|
+
private renderExternalCSS;
|
|
39
63
|
render(): any;
|
|
64
|
+
private renderRecommendation;
|
|
65
|
+
private useDimmedBackgroundInCard;
|
|
66
|
+
private renderResults;
|
|
67
|
+
private renderCarousel;
|
|
40
68
|
}
|
|
@@ -8,7 +8,9 @@ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
|
8
8
|
import { Handler } from "./cropper/Handler";
|
|
9
9
|
import { DetectedObject, SearchSessionFilter } from "./searchSession/searchSession";
|
|
10
10
|
import { CarouselMode } from "./components/vviinn-carousel/vviinn-carousel";
|
|
11
|
+
import { Recommendation } from "./recommendation/recommendation";
|
|
11
12
|
import { ValueObject } from "./network/ion/ValueObject";
|
|
13
|
+
import { CarouselMode as CarouselMode1 } from "./components/vviinn-carousel/vviinn-carousel";
|
|
12
14
|
import { CampaignName } from "./campaign/Campaign";
|
|
13
15
|
export namespace Components {
|
|
14
16
|
interface CropperHandler {
|
|
@@ -26,6 +28,7 @@ export namespace Components {
|
|
|
26
28
|
interface VviinnCarousel {
|
|
27
29
|
"imageWidth": number;
|
|
28
30
|
"mode": CarouselMode;
|
|
31
|
+
"recommendations": Recommendation[];
|
|
29
32
|
"showScroll": boolean;
|
|
30
33
|
}
|
|
31
34
|
interface VviinnDetectedObject {
|
|
@@ -83,6 +86,14 @@ export namespace Components {
|
|
|
83
86
|
"responsive": boolean;
|
|
84
87
|
"salePrice": number | undefined;
|
|
85
88
|
}
|
|
89
|
+
interface VviinnRecommendationsSidebar {
|
|
90
|
+
"position": "bottom" | "right";
|
|
91
|
+
"productId": string;
|
|
92
|
+
"sidebarTitle": string;
|
|
93
|
+
"sourceImage": string | null;
|
|
94
|
+
"token": string;
|
|
95
|
+
"widgetScrollbar": boolean;
|
|
96
|
+
}
|
|
86
97
|
interface VviinnServerError {
|
|
87
98
|
}
|
|
88
99
|
interface VviinnSlide {
|
|
@@ -94,6 +105,14 @@ export namespace Components {
|
|
|
94
105
|
}
|
|
95
106
|
interface VviinnTeaser {
|
|
96
107
|
}
|
|
108
|
+
interface VviinnVprButton {
|
|
109
|
+
"modalScrollbar": boolean;
|
|
110
|
+
"position": "bottom" | "right";
|
|
111
|
+
"productId": string;
|
|
112
|
+
"sidebarTitle": string;
|
|
113
|
+
"sourceImage": string | null;
|
|
114
|
+
"token": string;
|
|
115
|
+
}
|
|
97
116
|
interface VviinnVprWidget {
|
|
98
117
|
"apiPath": string | undefined;
|
|
99
118
|
/**
|
|
@@ -104,10 +123,7 @@ export namespace Components {
|
|
|
104
123
|
* Campaign type
|
|
105
124
|
*/
|
|
106
125
|
"campaignType": CampaignName;
|
|
107
|
-
|
|
108
|
-
* Number of columns for recommendations
|
|
109
|
-
*/
|
|
110
|
-
"columns": number;
|
|
126
|
+
"cssUrl": string | null;
|
|
111
127
|
/**
|
|
112
128
|
* Currency sign will shown after price
|
|
113
129
|
*/
|
|
@@ -127,7 +143,7 @@ export namespace Components {
|
|
|
127
143
|
/**
|
|
128
144
|
* Use slider or grid view
|
|
129
145
|
*/
|
|
130
|
-
"mode":
|
|
146
|
+
"mode": CarouselMode;
|
|
131
147
|
/**
|
|
132
148
|
* prefix will shown before price
|
|
133
149
|
*/
|
|
@@ -141,6 +157,7 @@ export namespace Components {
|
|
|
141
157
|
* vviinn customer token
|
|
142
158
|
*/
|
|
143
159
|
"token": string;
|
|
160
|
+
"useCarousel": boolean;
|
|
144
161
|
}
|
|
145
162
|
interface VviinnVpsButton {
|
|
146
163
|
"apiPath": string | undefined;
|
|
@@ -312,6 +329,12 @@ declare global {
|
|
|
312
329
|
prototype: HTMLVviinnProductCardElement;
|
|
313
330
|
new (): HTMLVviinnProductCardElement;
|
|
314
331
|
};
|
|
332
|
+
interface HTMLVviinnRecommendationsSidebarElement extends Components.VviinnRecommendationsSidebar, HTMLStencilElement {
|
|
333
|
+
}
|
|
334
|
+
var HTMLVviinnRecommendationsSidebarElement: {
|
|
335
|
+
prototype: HTMLVviinnRecommendationsSidebarElement;
|
|
336
|
+
new (): HTMLVviinnRecommendationsSidebarElement;
|
|
337
|
+
};
|
|
315
338
|
interface HTMLVviinnServerErrorElement extends Components.VviinnServerError, HTMLStencilElement {
|
|
316
339
|
}
|
|
317
340
|
var HTMLVviinnServerErrorElement: {
|
|
@@ -336,6 +359,12 @@ declare global {
|
|
|
336
359
|
prototype: HTMLVviinnTeaserElement;
|
|
337
360
|
new (): HTMLVviinnTeaserElement;
|
|
338
361
|
};
|
|
362
|
+
interface HTMLVviinnVprButtonElement extends Components.VviinnVprButton, HTMLStencilElement {
|
|
363
|
+
}
|
|
364
|
+
var HTMLVviinnVprButtonElement: {
|
|
365
|
+
prototype: HTMLVviinnVprButtonElement;
|
|
366
|
+
new (): HTMLVviinnVprButtonElement;
|
|
367
|
+
};
|
|
339
368
|
interface HTMLVviinnVprWidgetElement extends Components.VviinnVprWidget, HTMLStencilElement {
|
|
340
369
|
}
|
|
341
370
|
var HTMLVviinnVprWidgetElement: {
|
|
@@ -383,10 +412,12 @@ declare global {
|
|
|
383
412
|
"vviinn-preloader": HTMLVviinnPreloaderElement;
|
|
384
413
|
"vviinn-privacy-badge": HTMLVviinnPrivacyBadgeElement;
|
|
385
414
|
"vviinn-product-card": HTMLVviinnProductCardElement;
|
|
415
|
+
"vviinn-recommendations-sidebar": HTMLVviinnRecommendationsSidebarElement;
|
|
386
416
|
"vviinn-server-error": HTMLVviinnServerErrorElement;
|
|
387
417
|
"vviinn-slide": HTMLVviinnSlideElement;
|
|
388
418
|
"vviinn-slider": HTMLVviinnSliderElement;
|
|
389
419
|
"vviinn-teaser": HTMLVviinnTeaserElement;
|
|
420
|
+
"vviinn-vpr-button": HTMLVviinnVprButtonElement;
|
|
390
421
|
"vviinn-vpr-widget": HTMLVviinnVprWidgetElement;
|
|
391
422
|
"vviinn-vps-button": HTMLVviinnVpsButtonElement;
|
|
392
423
|
"vviinn-vps-widget": HTMLVviinnVpsWidgetElement;
|
|
@@ -409,6 +440,7 @@ declare namespace LocalJSX {
|
|
|
409
440
|
interface VviinnCarousel {
|
|
410
441
|
"imageWidth"?: number;
|
|
411
442
|
"mode"?: CarouselMode;
|
|
443
|
+
"recommendations"?: Recommendation[];
|
|
412
444
|
"showScroll"?: boolean;
|
|
413
445
|
}
|
|
414
446
|
interface VviinnDetectedObject {
|
|
@@ -481,6 +513,7 @@ declare namespace LocalJSX {
|
|
|
481
513
|
"imageRatio"?: number;
|
|
482
514
|
"imageWidth"?: number;
|
|
483
515
|
"locale"?: string | undefined;
|
|
516
|
+
"onProductImageLoaded"?: (event: CustomEvent<string>) => void;
|
|
484
517
|
/**
|
|
485
518
|
* Event fires ones when user click on deeplink
|
|
486
519
|
*/
|
|
@@ -501,6 +534,15 @@ declare namespace LocalJSX {
|
|
|
501
534
|
"responsive"?: boolean;
|
|
502
535
|
"salePrice"?: number | undefined;
|
|
503
536
|
}
|
|
537
|
+
interface VviinnRecommendationsSidebar {
|
|
538
|
+
"onModalClosed"?: (event: CustomEvent<void>) => void;
|
|
539
|
+
"position"?: "bottom" | "right";
|
|
540
|
+
"productId"?: string;
|
|
541
|
+
"sidebarTitle"?: string;
|
|
542
|
+
"sourceImage"?: string | null;
|
|
543
|
+
"token"?: string;
|
|
544
|
+
"widgetScrollbar"?: boolean;
|
|
545
|
+
}
|
|
504
546
|
interface VviinnServerError {
|
|
505
547
|
"onActionClick"?: (event: CustomEvent<void>) => void;
|
|
506
548
|
}
|
|
@@ -513,6 +555,14 @@ declare namespace LocalJSX {
|
|
|
513
555
|
}
|
|
514
556
|
interface VviinnTeaser {
|
|
515
557
|
}
|
|
558
|
+
interface VviinnVprButton {
|
|
559
|
+
"modalScrollbar"?: boolean;
|
|
560
|
+
"position"?: "bottom" | "right";
|
|
561
|
+
"productId"?: string;
|
|
562
|
+
"sidebarTitle"?: string;
|
|
563
|
+
"sourceImage"?: string | null;
|
|
564
|
+
"token"?: string;
|
|
565
|
+
}
|
|
516
566
|
interface VviinnVprWidget {
|
|
517
567
|
/**
|
|
518
568
|
* Title for recommendations widget
|
|
@@ -522,10 +572,7 @@ declare namespace LocalJSX {
|
|
|
522
572
|
* Campaign type
|
|
523
573
|
*/
|
|
524
574
|
"campaignType"?: CampaignName;
|
|
525
|
-
|
|
526
|
-
* Number of columns for recommendations
|
|
527
|
-
*/
|
|
528
|
-
"columns"?: number;
|
|
575
|
+
"cssUrl"?: string | null;
|
|
529
576
|
/**
|
|
530
577
|
* Currency sign will shown after price
|
|
531
578
|
*/
|
|
@@ -545,7 +592,8 @@ declare namespace LocalJSX {
|
|
|
545
592
|
/**
|
|
546
593
|
* Use slider or grid view
|
|
547
594
|
*/
|
|
548
|
-
"mode"?:
|
|
595
|
+
"mode"?: CarouselMode;
|
|
596
|
+
"onRecommendationsLoaded"?: (event: CustomEvent<any>) => void;
|
|
549
597
|
/**
|
|
550
598
|
* prefix will shown before price
|
|
551
599
|
*/
|
|
@@ -618,10 +666,12 @@ declare namespace LocalJSX {
|
|
|
618
666
|
"vviinn-preloader": VviinnPreloader;
|
|
619
667
|
"vviinn-privacy-badge": VviinnPrivacyBadge;
|
|
620
668
|
"vviinn-product-card": VviinnProductCard;
|
|
669
|
+
"vviinn-recommendations-sidebar": VviinnRecommendationsSidebar;
|
|
621
670
|
"vviinn-server-error": VviinnServerError;
|
|
622
671
|
"vviinn-slide": VviinnSlide;
|
|
623
672
|
"vviinn-slider": VviinnSlider;
|
|
624
673
|
"vviinn-teaser": VviinnTeaser;
|
|
674
|
+
"vviinn-vpr-button": VviinnVprButton;
|
|
625
675
|
"vviinn-vpr-widget": VviinnVprWidget;
|
|
626
676
|
"vviinn-vps-button": VviinnVpsButton;
|
|
627
677
|
"vviinn-vps-widget": VviinnVpsWidget;
|
|
@@ -654,10 +704,12 @@ declare module "@stencil/core" {
|
|
|
654
704
|
"vviinn-preloader": LocalJSX.VviinnPreloader & JSXBase.HTMLAttributes<HTMLVviinnPreloaderElement>;
|
|
655
705
|
"vviinn-privacy-badge": LocalJSX.VviinnPrivacyBadge & JSXBase.HTMLAttributes<HTMLVviinnPrivacyBadgeElement>;
|
|
656
706
|
"vviinn-product-card": LocalJSX.VviinnProductCard & JSXBase.HTMLAttributes<HTMLVviinnProductCardElement>;
|
|
707
|
+
"vviinn-recommendations-sidebar": LocalJSX.VviinnRecommendationsSidebar & JSXBase.HTMLAttributes<HTMLVviinnRecommendationsSidebarElement>;
|
|
657
708
|
"vviinn-server-error": LocalJSX.VviinnServerError & JSXBase.HTMLAttributes<HTMLVviinnServerErrorElement>;
|
|
658
709
|
"vviinn-slide": LocalJSX.VviinnSlide & JSXBase.HTMLAttributes<HTMLVviinnSlideElement>;
|
|
659
710
|
"vviinn-slider": LocalJSX.VviinnSlider & JSXBase.HTMLAttributes<HTMLVviinnSliderElement>;
|
|
660
711
|
"vviinn-teaser": LocalJSX.VviinnTeaser & JSXBase.HTMLAttributes<HTMLVviinnTeaserElement>;
|
|
712
|
+
"vviinn-vpr-button": LocalJSX.VviinnVprButton & JSXBase.HTMLAttributes<HTMLVviinnVprButtonElement>;
|
|
661
713
|
"vviinn-vpr-widget": LocalJSX.VviinnVprWidget & JSXBase.HTMLAttributes<HTMLVviinnVprWidgetElement>;
|
|
662
714
|
"vviinn-vps-button": LocalJSX.VviinnVpsButton & JSXBase.HTMLAttributes<HTMLVviinnVpsButtonElement>;
|
|
663
715
|
"vviinn-vps-widget": LocalJSX.VviinnVpsWidget & JSXBase.HTMLAttributes<HTMLVviinnVpsWidgetElement>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as t,H as n}from"./p-db0be4cd.js";let r=class{constructor(t){e(this,t)}render(){return t(n,null,t("slot",{name:"icon"}),t("slot",{name:"title"}),t("slot",{name:"text"}),t("slot",{name:"action"}))}};r.style=":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}";export{r as vviinn_error}
|