vviinn-widgets 2.8.1 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/cropper-handler_27.cjs.entry.js +29 -17
- package/dist/cjs/{customized-slots-68eeae0f.js → customized-slots-84e1c444.js} +1 -1
- package/dist/cjs/{index-42b99955.js → index-1077e27c.js} +13 -2
- package/dist/cjs/{index-3e5bfdde.js → index-4ea3a37f.js} +1 -1
- package/dist/cjs/{index-eed9118c.js → index-b2b8f092.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -4
- package/dist/cjs/vviinn-carousel_2.cjs.entry.js +3 -3
- package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +2 -2
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +2 -2
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +3 -3
- package/dist/cjs/vviinn-widgets.cjs.js +2 -4
- package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.js +2 -6
- package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.js +2 -7
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.css +4 -1
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +27 -3
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +12 -7
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +3 -7
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +10 -12
- package/dist/collection/components/vviinn-vpr-button/stories/args.js +12 -8
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.css +5 -0
- package/dist/collection/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.js +0 -1
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.css +6 -0
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +15 -15
- package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +1 -0
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +6 -0
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +18 -1
- package/dist/collection/global.js +1 -16
- package/dist/esm/cropper-handler_27.entry.js +29 -17
- package/dist/esm/{customized-slots-4d62f3b7.js → customized-slots-01387ced.js} +1 -1
- package/dist/esm/{index-6e7331d0.js → index-492f97b7.js} +1 -1
- package/dist/esm/{index-b7c3e969.js → index-65670ecf.js} +14 -2
- package/dist/esm/{index-ed092ade.js → index-84a46578.js} +1 -1
- package/dist/esm/loader.js +2 -4
- package/dist/esm/vviinn-carousel_2.entry.js +3 -3
- package/dist/esm/vviinn-recommendations-sidebar.entry.js +2 -2
- package/dist/esm/vviinn-vpr-button.entry.js +2 -2
- package/dist/esm/vviinn-vps-button.entry.js +3 -3
- package/dist/esm/vviinn-widgets.js +2 -4
- package/dist/types/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.d.ts +2 -0
- package/dist/types/components/vviinn-example-images/vviinn-example-images.d.ts +2 -0
- package/dist/types/components/vviinn-vpr-button/stories/args.d.ts +8 -4
- package/dist/types/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.d.ts +8 -4
- package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +15 -15
- package/dist/types/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.d.ts +1 -0
- package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +17 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/types/interfaces/generated.d.ts +98 -154
- package/dist/vviinn-widgets/{p-4d5b33fb.entry.js → p-1a046662.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-930c46ec.entry.js → p-1a7a4ee0.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-e606146e.js → p-2573d0c3.js} +1 -1
- package/dist/vviinn-widgets/p-41288d8d.entry.js +1 -0
- package/dist/vviinn-widgets/{p-972de82b.js → p-90742d1c.js} +1 -1
- package/dist/vviinn-widgets/{p-44b45b18.js → p-9194527e.js} +1 -1
- package/dist/vviinn-widgets/p-af321db4.js +1 -0
- package/dist/vviinn-widgets/{p-5b75b530.entry.js → p-bd8d223e.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-37183e6e.entry.js → p-c29c3636.entry.js} +1 -1
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +5 -4
- package/www/build/{p-4d5b33fb.entry.js → p-1a046662.entry.js} +1 -1
- package/www/build/{p-930c46ec.entry.js → p-1a7a4ee0.entry.js} +1 -1
- package/www/build/{p-f2781050.js → p-23b7af3d.js} +3 -3
- package/www/build/{p-e606146e.js → p-2573d0c3.js} +1 -1
- package/www/build/p-41288d8d.entry.js +1 -0
- package/www/build/{p-972de82b.js → p-90742d1c.js} +1 -1
- package/www/build/{p-44b45b18.js → p-9194527e.js} +1 -1
- package/www/build/p-af321db4.js +1 -0
- package/www/build/{p-5b75b530.entry.js → p-bd8d223e.entry.js} +1 -1
- package/www/build/{p-37183e6e.entry.js → p-c29c3636.entry.js} +1 -1
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +1 -1
- package/dist/cjs/app-globals-c444baf0.js +0 -6912
- package/dist/collection/stories/Button.js +0 -21
- package/dist/collection/stories/Button.stories.js +0 -42
- package/dist/collection/stories/Header.js +0 -45
- package/dist/collection/stories/Header.stories.js +0 -15
- package/dist/collection/stories/Page.js +0 -61
- package/dist/collection/stories/Page.stories.js +0 -19
- package/dist/collection/stories/assets/code-brackets.svg +0 -1
- package/dist/collection/stories/assets/colors.svg +0 -1
- package/dist/collection/stories/assets/comments.svg +0 -1
- package/dist/collection/stories/assets/direction.svg +0 -1
- package/dist/collection/stories/assets/flow.svg +0 -1
- package/dist/collection/stories/assets/plugin.svg +0 -1
- package/dist/collection/stories/assets/repo.svg +0 -1
- package/dist/collection/stories/assets/stackalt.svg +0 -1
- package/dist/esm/app-globals-54d3ff6c.js +0 -6910
- package/dist/vviinn-widgets/p-4243fcad.entry.js +0 -1
- package/dist/vviinn-widgets/p-7a5cb22d.js +0 -1
- package/dist/vviinn-widgets/p-a5997b62.js +0 -15
- package/www/build/p-4243fcad.entry.js +0 -1
- package/www/build/p-7a5cb22d.js +0 -1
- package/www/build/p-a5997b62.js +0 -15
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const index$1 = require('./index-
|
|
7
|
-
const index$2 = require('./index-
|
|
8
|
-
const customizedSlots = require('./customized-slots-
|
|
5
|
+
const index = require('./index-1077e27c.js');
|
|
6
|
+
const index$1 = require('./index-4ea3a37f.js');
|
|
7
|
+
const index$2 = require('./index-b2b8f092.js');
|
|
8
|
+
const customizedSlots = require('./customized-slots-84e1c444.js');
|
|
9
9
|
|
|
10
10
|
const cropperHandlerCss = ":host{--size:20px;background:transparent;border:4px solid white;box-sizing:content-box;display:block;height:var(--size);touch-action:none;position:absolute;width:var(--size);z-index:4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(.disabled){opacity:0.25}:host(.nw-resize){border-bottom:none;border-right:none;top:0;left:0}:host(.ne-resize){border-left:none;border-bottom:none;right:0;top:0}:host(.sw-resize){border-right:none;border-top:none;left:0;bottom:0}:host(.se-resize){border-left:none;border-top:none;bottom:0;right:0}";
|
|
11
11
|
|
|
@@ -95,7 +95,6 @@ let ImageCropper = class {
|
|
|
95
95
|
this.mouseStartPoint = undefined;
|
|
96
96
|
this.bounds = undefined;
|
|
97
97
|
this.resizeObserver = new ResizeObserver(() => {
|
|
98
|
-
console.log("resized");
|
|
99
98
|
this.bounds = this.el.getBoundingClientRect();
|
|
100
99
|
});
|
|
101
100
|
}
|
|
@@ -334,7 +333,7 @@ let VviinnError = class {
|
|
|
334
333
|
};
|
|
335
334
|
VviinnError.style = vviinnErrorCss;
|
|
336
335
|
|
|
337
|
-
const vviinnExampleImageCss = ":host{display:block;margin-bottom:8px;position:relative}img{width:100%;height:auto;cursor:pointer}.image-preloader{background:rgba(0, 0, 0, 0.25);border-radius:4px;bottom:12px;display:none;padding:4px 6px;
|
|
336
|
+
const vviinnExampleImageCss = ":host{display:block;margin-bottom:8px;position:relative}:host(:focus){border:2px solid var(--color-primary)}img{width:100%;height:auto;cursor:pointer}.image-preloader{background:rgba(0, 0, 0, 0.25);border-radius:4px;bottom:12px;display:none;padding:4px 6px;position:absolute;right:12px;z-index:4}vviinn-preloader{--preloader-size:12px}@media (max-width: 640px){.image-preloader{display:block}}";
|
|
338
337
|
|
|
339
338
|
let VviinnExampleImage = class {
|
|
340
339
|
constructor(hostRef) {
|
|
@@ -344,22 +343,28 @@ let VviinnExampleImage = class {
|
|
|
344
343
|
this.src = "";
|
|
345
344
|
this.width = 0;
|
|
346
345
|
this.height = 0;
|
|
346
|
+
this.tabIndex = -1;
|
|
347
347
|
this.selected = false;
|
|
348
348
|
}
|
|
349
|
-
async selectImage(
|
|
349
|
+
async selectImage() {
|
|
350
350
|
this.selected = true;
|
|
351
351
|
const file = await index$1.toFile(this.src);
|
|
352
352
|
const processResult = await index$1.processSelectedFile(file);
|
|
353
353
|
index$1._function.pipe(processResult, index$1.Either.match(() => this.exampleImageError.emit(), () => this.exampleImageSelected.emit()));
|
|
354
354
|
this.selected = false;
|
|
355
355
|
}
|
|
356
|
+
handleKeyPress({ key }) {
|
|
357
|
+
if (key !== "Enter" && key !== " ")
|
|
358
|
+
return;
|
|
359
|
+
this.selectImage();
|
|
360
|
+
}
|
|
356
361
|
showPreloader() {
|
|
357
362
|
return ((index$1.imageSearchState.objectDetectionInProgress ||
|
|
358
363
|
index$1.imageSearchState.loading) &&
|
|
359
364
|
this.selected);
|
|
360
365
|
}
|
|
361
366
|
render() {
|
|
362
|
-
return (index.h(index.Host,
|
|
367
|
+
return (index.h(index.Host, { tabindex: `${this.tabIndex}`, onClick: () => this.selectImage(), onKeyUp: (ev) => this.handleKeyPress(ev) }, this.showPreloader() ? (index.h("div", { class: "image-preloader" }, index.h("vviinn-preloader", null))) : null, index.h("img", { src: this.src, width: this.width, height: this.height })));
|
|
363
368
|
}
|
|
364
369
|
};
|
|
365
370
|
VviinnExampleImage.style = vviinnExampleImageCss;
|
|
@@ -381,8 +386,13 @@ let VviinnExampleImages = class {
|
|
|
381
386
|
componentWillLoad() {
|
|
382
387
|
customizedSlots.slotChangeListener(this, this.el);
|
|
383
388
|
}
|
|
389
|
+
delegateFocus() {
|
|
390
|
+
const firstSlot = this.imagesBlock.childNodes[0];
|
|
391
|
+
const firstExampleImage = firstSlot.childNodes[0];
|
|
392
|
+
firstExampleImage.focus();
|
|
393
|
+
}
|
|
384
394
|
render() {
|
|
385
|
-
return (index.h(index.Host,
|
|
395
|
+
return (index.h(index.Host, { onFocus: () => this.delegateFocus() }, index.h("slot", { name: "vviinn-example-images-title" }, index.h("h3", null, "Mit den Beispielbildern die Suche direkt ausprobieren")), index.h("div", { class: "images", ref: (el) => (this.imagesBlock = el) }, index.h("slot", { name: "vviinn-example-images-1" }, index.h("vviinn-example-image", { width: 480, height: 640, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDEtTC5qcGc=", tabIndex: 0 })), index.h("slot", { name: "vviinn-example-images-2" }, index.h("vviinn-example-image", { width: 280, height: 480, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDItTS5qcGc=", tabIndex: 1 })), index.h("slot", { name: "vviinn-example-images-3" }, index.h("vviinn-example-image", { width: 280, height: 480, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDMtTS5qcGc=", tabIndex: 2 })), index.h("slot", { name: "vviinn-example-images-4" }, index.h("vviinn-example-image", { width: 480, height: 640, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDQtTC5qcGc=", tabIndex: 3 })))));
|
|
386
396
|
}
|
|
387
397
|
get el() { return index.getElement(this); }
|
|
388
398
|
};
|
|
@@ -417,7 +427,7 @@ const getImageSizes = (i) => {
|
|
|
417
427
|
const dimensions = index$1.dimensionsFromImage(i);
|
|
418
428
|
const resize = index$1.scaleByLargestSide(288);
|
|
419
429
|
const newDimensions = resize(dimensions);
|
|
420
|
-
const sizes = newDimensions.map(d => d.size);
|
|
430
|
+
const sizes = newDimensions.map((d) => d.size);
|
|
421
431
|
return [sizes[0], sizes[1]];
|
|
422
432
|
};
|
|
423
433
|
let VviinnImageView = class {
|
|
@@ -755,12 +765,14 @@ let VviinnProductCard = class {
|
|
|
755
765
|
this.recommendationLoad.emit(this.productData);
|
|
756
766
|
this.intersectionObserver.observe(this.el);
|
|
757
767
|
const links = this.el.shadowRoot.querySelectorAll("a");
|
|
758
|
-
links.forEach((link) =>
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
768
|
+
links.forEach((link) => {
|
|
769
|
+
['click', 'auxclick'].forEach((eventType) => link.addEventListener(eventType, (event) => {
|
|
770
|
+
event.preventDefault();
|
|
771
|
+
event.stopImmediatePropagation();
|
|
772
|
+
this.recommendationClick.emit(this.getProductData());
|
|
773
|
+
index$1._function.pipe(getAnalyticsModule, index$1.Option.match(() => null, (analytics) => analytics.sendClick(this.getProduct())));
|
|
774
|
+
}));
|
|
775
|
+
});
|
|
764
776
|
}
|
|
765
777
|
getProduct() {
|
|
766
778
|
return index$1.imageSearchState.results.find((r) => r.productId === this.productId);
|
|
@@ -1085,7 +1097,7 @@ let VviinnVpsWidget = class {
|
|
|
1085
1097
|
return (index.h(index.Host, null, index.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, example-images" }, index.h("vviinn-slider", { showBullets: false, position: this.slidePosition }, index.h("vviinn-slide", { class: { "start-page": true } }, index.h("div", { class: {
|
|
1086
1098
|
error: this.haveErrors(),
|
|
1087
1099
|
"start-page_block": true,
|
|
1088
|
-
} }, index.h("vviinn-wrong-format", { class: { hidden: !this.wrongImageFormat }, onActionClick: () => (this.wrongImageFormat = false) }), index.h("vviinn-server-error", { class: { hidden: !index$1.imageSearchState.serverError }, onActionClick: () => (index$1.imageSearchState.serverError = false) }), index.h("vviinn-teaser", { class: { hidden: this.haveErrors() } }), index.h("vviinn-image-selector", { class: { hidden: this.haveErrors() }, onImageSelected: () => this.handleImageSelection("upload"), onImageSelectedError: () => (this.wrongImageFormat = true), part: "select-image_button" }, index.h("span", { slot: "upload-button-text", class: "upload-button-content" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "29", height: "28", fill: "none" }, index.h("defs", null), index.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" }), index.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" })), index.h("slot", { name: "vviinn-image-upload-button-text" }, index.h("span", null, "Kamera oder Bild ausw\u00E4hlen")))), index.h("vviinn-privacy-badge", { class: { hidden: this.haveErrors() } })), index.h("div", { id: "onboarding-block", class: "start-page_block" }, index.h("div", { class: "onboarding-wrapper" }, index.h("vviinn-onboarding", null), index.h("vviinn-example-images", { part: "example-images", onImageSelected: () => this.handleImageSelection("example"), onImageSelectedError: () => this.resetScroll("onboarding-block", "smooth") })))), index.h("vviinn-slide", { class: { "results-page": true, active: this.slidePosition == 1 } }, index.h("div", { class: "image-wrapper" }, index.h("vviinn-image-view", null), index.h("div", { class: "filters-wrapper" }, index.h("div", { class: "filters" }, index$1.imageSearchState.filters.map((filter) => (index.h("search-filters", { filter: filter })))))), index.h("div", { id: "results-block", class: "products-wrapper" }, index.h("div", { class: {
|
|
1100
|
+
} }, index.h("vviinn-wrong-format", { class: { hidden: !this.wrongImageFormat }, onActionClick: () => (this.wrongImageFormat = false) }), index.h("vviinn-server-error", { class: { hidden: !index$1.imageSearchState.serverError }, onActionClick: () => (index$1.imageSearchState.serverError = false) }), index.h("vviinn-teaser", { class: { hidden: this.haveErrors() } }), index.h("vviinn-image-selector", { class: { hidden: this.haveErrors() }, onImageSelected: () => this.handleImageSelection("upload"), onImageSelectedError: () => (this.wrongImageFormat = true), part: "select-image_button" }, index.h("span", { slot: "upload-button-text", class: "upload-button-content" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "29", height: "28", fill: "none" }, index.h("defs", null), index.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" }), index.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" })), index.h("slot", { name: "vviinn-image-upload-button-text" }, index.h("span", null, "Kamera oder Bild ausw\u00E4hlen")))), index.h("vviinn-privacy-badge", { class: { hidden: this.haveErrors() } })), index.h("div", { id: "onboarding-block", class: "start-page_block" }, index.h("div", { class: "onboarding-wrapper" }, index.h("vviinn-onboarding", null), index.h("vviinn-example-images", { tabindex: 0, part: "example-images", onImageSelected: () => this.handleImageSelection("example"), onImageSelectedError: () => this.resetScroll("onboarding-block", "smooth") })))), index.h("vviinn-slide", { class: { "results-page": true, active: this.slidePosition == 1 } }, index.h("div", { class: "image-wrapper" }, index.h("vviinn-image-view", null), index.h("div", { class: "filters-wrapper" }, index.h("div", { class: "filters" }, index$1.imageSearchState.filters.map((filter) => (index.h("search-filters", { filter: filter })))))), index.h("div", { id: "results-block", class: "products-wrapper" }, index.h("div", { class: {
|
|
1089
1101
|
"nothing-found": true,
|
|
1090
1102
|
hidden: index$1.imageSearchState.results.length > 0,
|
|
1091
1103
|
} }, index.h("vviinn-empty-results", null), index.h("vviinn-onboarding", null)), index.h("div", { class: {
|
|
@@ -21,7 +21,6 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'vviinn-widgets';
|
|
24
|
-
const Env = /* vviinn-widgets */ {"packageVersion":"2.8.0","packageName":"vviinn-widgets","environment":"local"};
|
|
25
24
|
|
|
26
25
|
let scopeId;
|
|
27
26
|
let hostTagName;
|
|
@@ -334,6 +333,12 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
334
333
|
}
|
|
335
334
|
}
|
|
336
335
|
}
|
|
336
|
+
else if (memberName === 'ref') {
|
|
337
|
+
// minifier will clean this up
|
|
338
|
+
if (newValue) {
|
|
339
|
+
newValue(elm);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
337
342
|
else if ((!isProp ) &&
|
|
338
343
|
memberName[0] === 'o' &&
|
|
339
344
|
memberName[1] === 'n') {
|
|
@@ -508,6 +513,7 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
508
513
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
509
514
|
if ((vnode = vnodes[startIdx])) {
|
|
510
515
|
elm = vnode.$elm$;
|
|
516
|
+
callNodeRefs(vnode);
|
|
511
517
|
// remove the vnode's element from the dom
|
|
512
518
|
elm.remove();
|
|
513
519
|
}
|
|
@@ -637,6 +643,12 @@ const patch = (oldVNode, newVNode) => {
|
|
|
637
643
|
elm.data = text;
|
|
638
644
|
}
|
|
639
645
|
};
|
|
646
|
+
const callNodeRefs = (vNode) => {
|
|
647
|
+
{
|
|
648
|
+
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
649
|
+
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
650
|
+
}
|
|
651
|
+
};
|
|
640
652
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
641
653
|
const hostElm = hostRef.$hostElement$;
|
|
642
654
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
@@ -1342,7 +1354,6 @@ const flush = () => {
|
|
|
1342
1354
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
1343
1355
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1344
1356
|
|
|
1345
|
-
exports.Env = Env;
|
|
1346
1357
|
exports.Host = Host;
|
|
1347
1358
|
exports.bootstrapLazy = bootstrapLazy;
|
|
1348
1359
|
exports.createEvent = createEvent;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-1077e27c.js');
|
|
4
4
|
|
|
5
5
|
const ArrowIcon = () => (index.h("svg", { width: "12", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
6
6
|
index.h("path", { d: "M0 10 10 0l1.4 1.4L2.8 10l8.6 8.6L10 20 0 10Z" })));
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const appGlobals = require('./app-globals-c444baf0.js');
|
|
5
|
+
const index = require('./index-1077e27c.js');
|
|
7
6
|
|
|
8
7
|
/*
|
|
9
8
|
Stencil Client Patch Esm v2.9.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -15,8 +14,7 @@ const patchEsm = () => {
|
|
|
15
14
|
const defineCustomElements = (win, options) => {
|
|
16
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
17
16
|
return patchEsm().then(() => {
|
|
18
|
-
|
|
19
|
-
return index.bootstrapLazy([["cropper-handler_27.cjs",[[1,"vviinn-vps-widget",{"token":[1],"apiPath":[1,"api-path"],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"slidePosition":[32],"width":[32],"wrongImageFormat":[32]},[[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"],[0,"cropperChanged","trachSearchAreaChanges"],[0,"detectedObjectClicked","trackDetectedObject"],[0,"filterSelected","trackFilter"]]],[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]}],[1,"cropper-handler",{"handler":[16],"disabled":[4]}],[1,"vviinn-error"],[1,"vviinn-preloader"],[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"],"index":[2],"imageLoaded":[32]}]]],["vviinn-vps-button.cjs",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"apiPath":[1,"api-path"],"pressed":[32]},[[0,"modalClosed","handleModalClosed"]]]]],["vviinn-carousel_2.cjs",[[1,"vviinn-vpr-widget",{"blockTitle":[1,"block-title"],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"productId":[1,"product-id"],"token":[1],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"mode":[1],"campaignType":[1,"campaign-type"],"locale":[1],"campaigns":[1],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"recommendations":[32],"loaded":[32]},[[0,"productImageLoaded","handleImageLoading"],[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"recommendations":[16],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32]}]]],["vviinn-recommendations-sidebar.cjs",[[1,"vviinn-recommendations-sidebar",{"sidebarTitle":[1,"sidebar-title"],"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"widgetScrollbar":[4,"widget-scrollbar"],"campaigns":[1],"state":[32]},[[16,"click","bodyClickListener"]]]]],["vviinn-vpr-button.cjs",[[1,"vviinn-vpr-button",{"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"sidebarTitle":[1,"sidebar-title"],"modalScrollbar":[4,"modal-scrollbar"],"campaigns":[1]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["cropper-handler_27.cjs",[[1,"vviinn-vps-widget",{"token":[1],"apiPath":[1,"api-path"],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"slidePosition":[32],"width":[32],"wrongImageFormat":[32]},[[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"],[0,"cropperChanged","trachSearchAreaChanges"],[0,"detectedObjectClicked","trackDetectedObject"],[0,"filterSelected","trackFilter"]]],[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],"tabIndex":[2,"tab-index"],"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]}],[1,"cropper-handler",{"handler":[16],"disabled":[4]}],[1,"vviinn-error"],[1,"vviinn-preloader"],[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"],"index":[2],"imageLoaded":[32]}]]],["vviinn-vps-button.cjs",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"apiPath":[1,"api-path"],"pressed":[32]},[[0,"modalClosed","handleModalClosed"]]]]],["vviinn-carousel_2.cjs",[[1,"vviinn-vpr-widget",{"blockTitle":[1,"block-title"],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"productId":[1,"product-id"],"token":[1],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"mode":[1],"campaignType":[1,"campaign-type"],"locale":[1],"campaigns":[1],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"recommendations":[32],"loaded":[32]},[[0,"productImageLoaded","handleImageLoading"],[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"recommendations":[16],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32]}]]],["vviinn-recommendations-sidebar.cjs",[[1,"vviinn-recommendations-sidebar",{"sidebarTitle":[1,"sidebar-title"],"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"widgetScrollbar":[4,"widget-scrollbar"],"campaigns":[1],"state":[32]},[[16,"click","bodyClickListener"]]]]],["vviinn-vpr-button.cjs",[[1,"vviinn-vpr-button",{"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"sidebarTitle":[1,"sidebar-title"],"modalScrollbar":[4,"modal-scrollbar"],"campaigns":[1]}]]]], options);
|
|
20
18
|
});
|
|
21
19
|
};
|
|
22
20
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const index$1 = require('./index-
|
|
7
|
-
const index$2 = require('./index-
|
|
5
|
+
const index = require('./index-1077e27c.js');
|
|
6
|
+
const index$1 = require('./index-4ea3a37f.js');
|
|
7
|
+
const index$2 = require('./index-b2b8f092.js');
|
|
8
8
|
|
|
9
9
|
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)}}";
|
|
10
10
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const index$1 = require('./index-
|
|
5
|
+
const index = require('./index-1077e27c.js');
|
|
6
|
+
const index$1 = require('./index-b2b8f092.js');
|
|
7
7
|
|
|
8
8
|
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%)}}";
|
|
9
9
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const index$1 = require('./index-
|
|
5
|
+
const index = require('./index-1077e27c.js');
|
|
6
|
+
const index$1 = require('./index-b2b8f092.js');
|
|
7
7
|
|
|
8
8
|
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}";
|
|
9
9
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const index$1 = require('./index-
|
|
7
|
-
const customizedSlots = require('./customized-slots-
|
|
5
|
+
const index = require('./index-1077e27c.js');
|
|
6
|
+
const index$1 = require('./index-b2b8f092.js');
|
|
7
|
+
const customizedSlots = require('./customized-slots-84e1c444.js');
|
|
8
8
|
|
|
9
9
|
const vviinnVpsButtonCss = ":host{cursor:pointer}";
|
|
10
10
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
4
|
-
const appGlobals = require('./app-globals-c444baf0.js');
|
|
3
|
+
const index = require('./index-1077e27c.js');
|
|
5
4
|
|
|
6
5
|
/*
|
|
7
6
|
Stencil Client Patch Browser v2.9.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -16,6 +15,5 @@ const patchBrowser = () => {
|
|
|
16
15
|
};
|
|
17
16
|
|
|
18
17
|
patchBrowser().then(options => {
|
|
19
|
-
|
|
20
|
-
return index.bootstrapLazy([["cropper-handler_27.cjs",[[1,"vviinn-vps-widget",{"token":[1],"apiPath":[1,"api-path"],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"slidePosition":[32],"width":[32],"wrongImageFormat":[32]},[[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"],[0,"cropperChanged","trachSearchAreaChanges"],[0,"detectedObjectClicked","trackDetectedObject"],[0,"filterSelected","trackFilter"]]],[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]}],[1,"cropper-handler",{"handler":[16],"disabled":[4]}],[1,"vviinn-error"],[1,"vviinn-preloader"],[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"],"index":[2],"imageLoaded":[32]}]]],["vviinn-vps-button.cjs",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"apiPath":[1,"api-path"],"pressed":[32]},[[0,"modalClosed","handleModalClosed"]]]]],["vviinn-carousel_2.cjs",[[1,"vviinn-vpr-widget",{"blockTitle":[1,"block-title"],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"productId":[1,"product-id"],"token":[1],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"mode":[1],"campaignType":[1,"campaign-type"],"locale":[1],"campaigns":[1],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"recommendations":[32],"loaded":[32]},[[0,"productImageLoaded","handleImageLoading"],[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"recommendations":[16],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32]}]]],["vviinn-recommendations-sidebar.cjs",[[1,"vviinn-recommendations-sidebar",{"sidebarTitle":[1,"sidebar-title"],"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"widgetScrollbar":[4,"widget-scrollbar"],"campaigns":[1],"state":[32]},[[16,"click","bodyClickListener"]]]]],["vviinn-vpr-button.cjs",[[1,"vviinn-vpr-button",{"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"sidebarTitle":[1,"sidebar-title"],"modalScrollbar":[4,"modal-scrollbar"],"campaigns":[1]}]]]], options);
|
|
18
|
+
return index.bootstrapLazy([["cropper-handler_27.cjs",[[1,"vviinn-vps-widget",{"token":[1],"apiPath":[1,"api-path"],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"slidePosition":[32],"width":[32],"wrongImageFormat":[32]},[[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"],[0,"cropperChanged","trachSearchAreaChanges"],[0,"detectedObjectClicked","trackDetectedObject"],[0,"filterSelected","trackFilter"]]],[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],"tabIndex":[2,"tab-index"],"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]}],[1,"cropper-handler",{"handler":[16],"disabled":[4]}],[1,"vviinn-error"],[1,"vviinn-preloader"],[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"],"index":[2],"imageLoaded":[32]}]]],["vviinn-vps-button.cjs",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"apiPath":[1,"api-path"],"pressed":[32]},[[0,"modalClosed","handleModalClosed"]]]]],["vviinn-carousel_2.cjs",[[1,"vviinn-vpr-widget",{"blockTitle":[1,"block-title"],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"productId":[1,"product-id"],"token":[1],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"mode":[1],"campaignType":[1,"campaign-type"],"locale":[1],"campaigns":[1],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"recommendations":[32],"loaded":[32]},[[0,"productImageLoaded","handleImageLoading"],[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"recommendations":[16],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32]}]]],["vviinn-recommendations-sidebar.cjs",[[1,"vviinn-recommendations-sidebar",{"sidebarTitle":[1,"sidebar-title"],"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"widgetScrollbar":[4,"widget-scrollbar"],"campaigns":[1],"state":[32]},[[16,"click","bodyClickListener"]]]]],["vviinn-vpr-button.cjs",[[1,"vviinn-vpr-button",{"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"sidebarTitle":[1,"sidebar-title"],"modalScrollbar":[4,"modal-scrollbar"],"campaigns":[1]}]]]], options);
|
|
21
19
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Component, Host, h, Prop } from "@stencil/core";
|
|
2
2
|
import { getCursorValue } from "../../../../../cropper/Handler";
|
|
3
|
+
import styles from "./cropper-handler.css";
|
|
3
4
|
export class CropperHandler {
|
|
4
5
|
constructor() {
|
|
5
6
|
this.disabled = false;
|
|
@@ -15,12 +16,7 @@ export class CropperHandler {
|
|
|
15
16
|
}
|
|
16
17
|
static get is() { return "cropper-handler"; }
|
|
17
18
|
static get encapsulation() { return "shadow"; }
|
|
18
|
-
static get
|
|
19
|
-
"$": ["cropper-handler.css"]
|
|
20
|
-
}; }
|
|
21
|
-
static get styleUrls() { return {
|
|
22
|
-
"$": ["cropper-handler.css"]
|
|
23
|
-
}; }
|
|
19
|
+
static get styles() { return styles; }
|
|
24
20
|
static get properties() { return {
|
|
25
21
|
"handler": {
|
|
26
22
|
"type": "unknown",
|
|
@@ -5,6 +5,7 @@ import { imageSearchState, makeRectangularSearchRequest, } from "../../../../sto
|
|
|
5
5
|
import { pipe } from "fp-ts/lib/function";
|
|
6
6
|
import * as O from "fp-ts/lib/Option";
|
|
7
7
|
import { findTarget } from "../../../../dom";
|
|
8
|
+
import styles from "./image-cropper.css";
|
|
8
9
|
const MIN_SEARCHAREA_SIZE = 40;
|
|
9
10
|
export class ImageCropper {
|
|
10
11
|
constructor() {
|
|
@@ -13,7 +14,6 @@ export class ImageCropper {
|
|
|
13
14
|
this.mouseStartPoint = undefined;
|
|
14
15
|
this.bounds = undefined;
|
|
15
16
|
this.resizeObserver = new ResizeObserver(() => {
|
|
16
|
-
console.log("resized");
|
|
17
17
|
this.bounds = this.el.getBoundingClientRect();
|
|
18
18
|
});
|
|
19
19
|
}
|
|
@@ -113,12 +113,7 @@ export class ImageCropper {
|
|
|
113
113
|
}
|
|
114
114
|
static get is() { return "image-cropper"; }
|
|
115
115
|
static get encapsulation() { return "shadow"; }
|
|
116
|
-
static get
|
|
117
|
-
"$": ["image-cropper.css"]
|
|
118
|
-
}; }
|
|
119
|
-
static get styleUrls() { return {
|
|
120
|
-
"$": ["image-cropper.css"]
|
|
121
|
-
}; }
|
|
116
|
+
static get styles() { return styles; }
|
|
122
117
|
static get properties() { return {
|
|
123
118
|
"disabled": {
|
|
124
119
|
"type": "boolean",
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
position: relative;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
:host(:focus) {
|
|
8
|
+
border: 2px solid var(--color-primary);
|
|
9
|
+
}
|
|
10
|
+
|
|
7
11
|
img {
|
|
8
12
|
width: 100%;
|
|
9
13
|
height: auto;
|
|
@@ -16,7 +20,6 @@ img {
|
|
|
16
20
|
bottom: 12px;
|
|
17
21
|
display: none;
|
|
18
22
|
padding: 4px 6px;
|
|
19
|
-
pointer-events: none;
|
|
20
23
|
position: absolute;
|
|
21
24
|
right: 12px;
|
|
22
25
|
z-index: 4;
|
|
@@ -8,25 +8,31 @@ export class VviinnExampleImage {
|
|
|
8
8
|
this.src = "";
|
|
9
9
|
this.width = 0;
|
|
10
10
|
this.height = 0;
|
|
11
|
+
this.tabIndex = -1;
|
|
11
12
|
this.selected = false;
|
|
12
13
|
}
|
|
13
|
-
async selectImage(
|
|
14
|
+
async selectImage() {
|
|
14
15
|
this.selected = true;
|
|
15
16
|
const file = await toFile(this.src);
|
|
16
17
|
const processResult = await processSelectedFile(file);
|
|
17
18
|
pipe(processResult, E.match(() => this.exampleImageError.emit(), () => this.exampleImageSelected.emit()));
|
|
18
19
|
this.selected = false;
|
|
19
20
|
}
|
|
21
|
+
handleKeyPress({ key }) {
|
|
22
|
+
if (key !== "Enter" && key !== " ")
|
|
23
|
+
return;
|
|
24
|
+
this.selectImage();
|
|
25
|
+
}
|
|
20
26
|
showPreloader() {
|
|
21
27
|
return ((imageSearchState.objectDetectionInProgress ||
|
|
22
28
|
imageSearchState.loading) &&
|
|
23
29
|
this.selected);
|
|
24
30
|
}
|
|
25
31
|
render() {
|
|
26
|
-
return (h(Host,
|
|
32
|
+
return (h(Host, { tabindex: `${this.tabIndex}`, onClick: () => this.selectImage(), onKeyUp: (ev) => this.handleKeyPress(ev) },
|
|
27
33
|
this.showPreloader() ? (h("div", { class: "image-preloader" },
|
|
28
34
|
h("vviinn-preloader", null))) : null,
|
|
29
|
-
h("img", {
|
|
35
|
+
h("img", { src: this.src, width: this.width, height: this.height })));
|
|
30
36
|
}
|
|
31
37
|
static get is() { return "vviinn-example-image"; }
|
|
32
38
|
static get encapsulation() { return "shadow"; }
|
|
@@ -90,6 +96,24 @@ export class VviinnExampleImage {
|
|
|
90
96
|
"attribute": "height",
|
|
91
97
|
"reflect": false,
|
|
92
98
|
"defaultValue": "0"
|
|
99
|
+
},
|
|
100
|
+
"tabIndex": {
|
|
101
|
+
"type": "number",
|
|
102
|
+
"mutable": false,
|
|
103
|
+
"complexType": {
|
|
104
|
+
"original": "number",
|
|
105
|
+
"resolved": "number",
|
|
106
|
+
"references": {}
|
|
107
|
+
},
|
|
108
|
+
"required": false,
|
|
109
|
+
"optional": false,
|
|
110
|
+
"docs": {
|
|
111
|
+
"tags": [],
|
|
112
|
+
"text": ""
|
|
113
|
+
},
|
|
114
|
+
"attribute": "tab-index",
|
|
115
|
+
"reflect": false,
|
|
116
|
+
"defaultValue": "-1"
|
|
93
117
|
}
|
|
94
118
|
}; }
|
|
95
119
|
static get states() { return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Host, h, Event, Listen, Element } from "@stencil/core";
|
|
1
|
+
import { Component, Host, h, Event, Listen, Element, } from "@stencil/core";
|
|
2
2
|
import { slotChangeListener } from "../customized-slots";
|
|
3
3
|
export class VviinnExampleImages {
|
|
4
4
|
handleImageSelection() {
|
|
@@ -10,19 +10,24 @@ export class VviinnExampleImages {
|
|
|
10
10
|
componentWillLoad() {
|
|
11
11
|
slotChangeListener(this, this.el);
|
|
12
12
|
}
|
|
13
|
+
delegateFocus() {
|
|
14
|
+
const firstSlot = this.imagesBlock.childNodes[0];
|
|
15
|
+
const firstExampleImage = firstSlot.childNodes[0];
|
|
16
|
+
firstExampleImage.focus();
|
|
17
|
+
}
|
|
13
18
|
render() {
|
|
14
|
-
return (h(Host,
|
|
19
|
+
return (h(Host, { onFocus: () => this.delegateFocus() },
|
|
15
20
|
h("slot", { name: "vviinn-example-images-title" },
|
|
16
21
|
h("h3", null, "Mit den Beispielbildern die Suche direkt ausprobieren")),
|
|
17
|
-
h("div", { class: "images" },
|
|
22
|
+
h("div", { class: "images", ref: (el) => (this.imagesBlock = el) },
|
|
18
23
|
h("slot", { name: "vviinn-example-images-1" },
|
|
19
|
-
h("vviinn-example-image", { width: 480, height: 640, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDEtTC5qcGc=" })),
|
|
24
|
+
h("vviinn-example-image", { width: 480, height: 640, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDEtTC5qcGc=", tabIndex: 0 })),
|
|
20
25
|
h("slot", { name: "vviinn-example-images-2" },
|
|
21
|
-
h("vviinn-example-image", { width: 280, height: 480, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDItTS5qcGc=" })),
|
|
26
|
+
h("vviinn-example-image", { width: 280, height: 480, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDItTS5qcGc=", tabIndex: 1 })),
|
|
22
27
|
h("slot", { name: "vviinn-example-images-3" },
|
|
23
|
-
h("vviinn-example-image", { width: 280, height: 480, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDMtTS5qcGc=" })),
|
|
28
|
+
h("vviinn-example-image", { width: 280, height: 480, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDMtTS5qcGc=", tabIndex: 2 })),
|
|
24
29
|
h("slot", { name: "vviinn-example-images-4" },
|
|
25
|
-
h("vviinn-example-image", { width: 480, height: 640, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDQtTC5qcGc=" })))));
|
|
30
|
+
h("vviinn-example-image", { width: 480, height: 640, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDQtTC5qcGc=", tabIndex: 3 })))));
|
|
26
31
|
}
|
|
27
32
|
static get is() { return "vviinn-example-images"; }
|
|
28
33
|
static get encapsulation() { return "shadow"; }
|
|
@@ -5,11 +5,12 @@ import * as O from "fp-ts/lib/Option";
|
|
|
5
5
|
import { sequenceToOption } from "../../utils/option/option";
|
|
6
6
|
import { fromImage, move } from "../../geometry/Rectangle";
|
|
7
7
|
import { dimensionsFromImage, scaleByLargestSide } from "../../Image/sizing";
|
|
8
|
+
import styles from "./vviinn-image-view.css";
|
|
8
9
|
const getImageSizes = (i) => {
|
|
9
10
|
const dimensions = dimensionsFromImage(i);
|
|
10
11
|
const resize = scaleByLargestSide(288);
|
|
11
12
|
const newDimensions = resize(dimensions);
|
|
12
|
-
const sizes = newDimensions.map(d => d.size);
|
|
13
|
+
const sizes = newDimensions.map((d) => d.size);
|
|
13
14
|
return [sizes[0], sizes[1]];
|
|
14
15
|
};
|
|
15
16
|
export class VviinnImageView {
|
|
@@ -52,10 +53,5 @@ export class VviinnImageView {
|
|
|
52
53
|
}
|
|
53
54
|
static get is() { return "vviinn-image-view"; }
|
|
54
55
|
static get encapsulation() { return "shadow"; }
|
|
55
|
-
static get
|
|
56
|
-
"$": ["vviinn-image-view.css"]
|
|
57
|
-
}; }
|
|
58
|
-
static get styleUrls() { return {
|
|
59
|
-
"$": ["vviinn-image-view.css"]
|
|
60
|
-
}; }
|
|
56
|
+
static get styles() { return styles; }
|
|
61
57
|
}
|
|
@@ -5,6 +5,7 @@ import { state } from "../../store/store";
|
|
|
5
5
|
import * as O from "fp-ts/lib/Option";
|
|
6
6
|
import { imageSearchState } from "../../store/imageSearch.store";
|
|
7
7
|
import { Linked, Price, ResponsiveImage, Image, } from "./render-helpers";
|
|
8
|
+
import styles from "./vviinn-product-card.css";
|
|
8
9
|
/**
|
|
9
10
|
* @part brand - product brand.
|
|
10
11
|
* @part currency - currency sign. Renders after price-amount.
|
|
@@ -54,12 +55,14 @@ export class VviinnProductCard {
|
|
|
54
55
|
this.recommendationLoad.emit(this.productData);
|
|
55
56
|
this.intersectionObserver.observe(this.el);
|
|
56
57
|
const links = this.el.shadowRoot.querySelectorAll("a");
|
|
57
|
-
links.forEach((link) =>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
links.forEach((link) => {
|
|
59
|
+
['click', 'auxclick'].forEach((eventType) => link.addEventListener(eventType, (event) => {
|
|
60
|
+
event.preventDefault();
|
|
61
|
+
event.stopImmediatePropagation();
|
|
62
|
+
this.recommendationClick.emit(this.getProductData());
|
|
63
|
+
pipe(getAnalyticsModule, O.match(() => null, (analytics) => analytics.sendClick(this.getProduct())));
|
|
64
|
+
}));
|
|
65
|
+
});
|
|
63
66
|
}
|
|
64
67
|
getProduct() {
|
|
65
68
|
return imageSearchState.results.find((r) => r.productId === this.productId);
|
|
@@ -91,12 +94,7 @@ export class VviinnProductCard {
|
|
|
91
94
|
}
|
|
92
95
|
static get is() { return "vviinn-product-card"; }
|
|
93
96
|
static get encapsulation() { return "shadow"; }
|
|
94
|
-
static get
|
|
95
|
-
"$": ["vviinn-product-card.css"]
|
|
96
|
-
}; }
|
|
97
|
-
static get styleUrls() { return {
|
|
98
|
-
"$": ["vviinn-product-card.css"]
|
|
99
|
-
}; }
|
|
97
|
+
static get styles() { return styles; }
|
|
100
98
|
static get properties() { return {
|
|
101
99
|
"brand": {
|
|
102
100
|
"type": "string",
|