vviinn-widgets 2.20.31 → 2.21.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/highlight-box_22.cjs.entry.js +13 -4
- package/dist/cjs/{imageSearch.store-967326bd.js → imageSearch.store-cc9b4a68.js} +3 -1
- package/dist/cjs/{index-d33baba2.js → index-3e976225.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-e7ce52a3.js → package-3381595c.js} +1 -1
- package/dist/cjs/vviinn-carousel_3.cjs.entry.js +16 -8
- package/dist/cjs/vviinn-preloader.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +4 -2
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +4 -2
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +38 -11
- package/dist/cjs/vviinn-widgets.cjs.js +1 -1
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.js +1 -4
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +20 -1
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +18 -0
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +21 -2
- package/dist/collection/components/vviinn-modal/vviinn-modal.js +22 -1
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +58 -18
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +57 -11
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +59 -19
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +93 -22
- package/dist/collection/store/imageSearch.store.js +3 -1
- package/dist/esm/highlight-box_22.entry.js +13 -4
- package/dist/esm/{imageSearch.store-7c025e20.js → imageSearch.store-ecbf6beb.js} +3 -1
- package/dist/esm/{index-b6bd61ae.js → index-cfd86f10.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/package-014f290c.js +3 -0
- package/dist/esm/vviinn-carousel_3.entry.js +16 -8
- package/dist/esm/vviinn-preloader.entry.js +1 -1
- package/dist/esm/vviinn-vpr-button.entry.js +4 -2
- package/dist/esm/vviinn-vps-button.entry.js +4 -2
- package/dist/esm/vviinn-vps-widget.entry.js +38 -11
- package/dist/esm/vviinn-widgets.js +1 -1
- package/dist/types/components/vviinn-carousel/vviinn-carousel.d.ts +0 -1
- 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-image-selector/vviinn-image-selector.d.ts +2 -1
- package/dist/types/components/vviinn-modal/vviinn-modal.d.ts +2 -0
- package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +6 -2
- package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +9 -4
- package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +7 -3
- package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +15 -6
- package/dist/types/components.d.ts +39 -9
- package/dist/vviinn-widgets/p-758d5fcd.entry.js +1 -0
- package/dist/vviinn-widgets/p-89a09b97.entry.js +1 -0
- package/dist/vviinn-widgets/p-8dd7585c.js +1 -0
- package/dist/vviinn-widgets/{p-93f05c97.entry.js → p-a37be09b.entry.js} +1 -1
- package/dist/vviinn-widgets/p-a440b290.entry.js +1 -0
- package/{www/build/p-83c9b369.entry.js → dist/vviinn-widgets/p-ae273bc4.entry.js} +1 -1
- package/dist/vviinn-widgets/p-b9f79d46.entry.js +1 -0
- package/dist/vviinn-widgets/{p-90e24b10.js → p-d41891f6.js} +1 -1
- package/{www/build/p-c8b070c2.js → dist/vviinn-widgets/p-f5061a32.js} +1 -1
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/p-1c3ddbf3.js +1 -0
- package/www/build/p-758d5fcd.entry.js +1 -0
- package/www/build/p-89a09b97.entry.js +1 -0
- package/www/build/p-8dd7585c.js +1 -0
- package/www/build/{p-93f05c97.entry.js → p-a37be09b.entry.js} +1 -1
- package/www/build/p-a440b290.entry.js +1 -0
- package/www/build/p-a67898be.css +1 -0
- package/{dist/vviinn-widgets/p-83c9b369.entry.js → www/build/p-ae273bc4.entry.js} +1 -1
- package/www/build/p-b9f79d46.entry.js +1 -0
- package/www/build/{p-90e24b10.js → p-d41891f6.js} +1 -1
- package/{dist/vviinn-widgets/p-c8b070c2.js → www/build/p-f5061a32.js} +1 -1
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +1 -1
- package/dist/esm/package-254623e5.js +0 -3
- package/dist/vviinn-widgets/p-3ac237a4.entry.js +0 -1
- package/dist/vviinn-widgets/p-5aee1771.entry.js +0 -1
- package/dist/vviinn-widgets/p-eb1b3d5b.js +0 -1
- package/dist/vviinn-widgets/p-ec28c172.entry.js +0 -1
- package/dist/vviinn-widgets/p-fe922ba3.entry.js +0 -1
- package/www/build/p-3ac237a4.entry.js +0 -1
- package/www/build/p-5aee1771.entry.js +0 -1
- package/www/build/p-c540865a.js +0 -161
- package/www/build/p-e0153ae2.css +0 -6
- package/www/build/p-eb1b3d5b.js +0 -1
- package/www/build/p-ec28c172.entry.js +0 -1
- package/www/build/p-fe922ba3.entry.js +0 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-a4becaff.js');
|
|
6
|
-
const imageSearch_store = require('./imageSearch.store-
|
|
6
|
+
const imageSearch_store = require('./imageSearch.store-cc9b4a68.js');
|
|
7
7
|
const Handler = require('./Handler-de64afa5.js');
|
|
8
8
|
const i18next = require('./i18next-74ff3413.js');
|
|
9
9
|
const customizedSlots = require('./customized-slots-aee3f39d.js');
|
|
@@ -350,6 +350,7 @@ const VviinnExampleImage = class {
|
|
|
350
350
|
index.registerInstance(this, hostRef);
|
|
351
351
|
this.vviinnImageUpload = index.createEvent(this, "vviinnImageUpload", 7);
|
|
352
352
|
this.vviinnNoResult = index.createEvent(this, "vviinnNoResult", 7);
|
|
353
|
+
this.vviinnImageUploadFinished = index.createEvent(this, "vviinnImageUploadFinished", 7);
|
|
353
354
|
this.src = "";
|
|
354
355
|
this.width = 0;
|
|
355
356
|
this.height = 0;
|
|
@@ -358,9 +359,10 @@ const VviinnExampleImage = class {
|
|
|
358
359
|
}
|
|
359
360
|
async selectImage() {
|
|
360
361
|
this.selected = true;
|
|
362
|
+
this.vviinnImageUpload.emit(this.basicEventData);
|
|
361
363
|
const file = await imageSearch_store.toFile(this.src);
|
|
362
364
|
const processResult = await imageSearch_store.processSelectedFile(file);
|
|
363
|
-
imageSearch_store._function.pipe(processResult, imageSearch_store.Either.match(() => this.vviinnNoResult.emit(this.basicEventData), () => this.
|
|
365
|
+
imageSearch_store._function.pipe(processResult, imageSearch_store.Either.match(() => this.vviinnNoResult.emit(this.basicEventData), () => this.vviinnImageUploadFinished.emit()));
|
|
364
366
|
this.selected = false;
|
|
365
367
|
}
|
|
366
368
|
handleKeyPress({ key }) {
|
|
@@ -386,6 +388,7 @@ const VviinnExampleImages = class {
|
|
|
386
388
|
index.registerInstance(this, hostRef);
|
|
387
389
|
this.vviinnImageUpload = index.createEvent(this, "vviinnImageUpload", 7);
|
|
388
390
|
this.vviinnNoResult = index.createEvent(this, "vviinnNoResult", 7);
|
|
391
|
+
this.vviinnImageUploadFinished = index.createEvent(this, "vviinnImageUploadFinished", 7);
|
|
389
392
|
this.basicEventData = undefined;
|
|
390
393
|
this.exampleImagesTitle = undefined;
|
|
391
394
|
}
|
|
@@ -411,14 +414,16 @@ const VviinnImageSelector = class {
|
|
|
411
414
|
index.registerInstance(this, hostRef);
|
|
412
415
|
this.vviinnImageUpload = index.createEvent(this, "vviinnImageUpload", 7);
|
|
413
416
|
this.vviinnNoResult = index.createEvent(this, "vviinnNoResult", 7);
|
|
417
|
+
this.vviinnImageUploadFinished = index.createEvent(this, "vviinnImageUploadFinished", 7);
|
|
414
418
|
this.basicEventData = undefined;
|
|
415
419
|
this.startUpload = undefined;
|
|
416
420
|
this.resetVpsButton = undefined;
|
|
417
421
|
}
|
|
418
422
|
async handleInputChange(event) {
|
|
423
|
+
this.vviinnImageUpload.emit(this.basicEventData);
|
|
419
424
|
const input = event.target;
|
|
420
425
|
const processingResult = await imageSearch_store.processSelectedFile(input.files[0]);
|
|
421
|
-
imageSearch_store._function.pipe(processingResult, imageSearch_store.match$1(() => this.vviinnNoResult.emit(this.basicEventData), () => this.
|
|
426
|
+
imageSearch_store._function.pipe(processingResult, imageSearch_store.match$1(() => this.vviinnNoResult.emit(this.basicEventData), () => this.vviinnImageUploadFinished.emit()));
|
|
422
427
|
input.value = null;
|
|
423
428
|
}
|
|
424
429
|
isLoading() {
|
|
@@ -493,6 +498,7 @@ const VviinnModal = class {
|
|
|
493
498
|
constructor(hostRef) {
|
|
494
499
|
index.registerInstance(this, hostRef);
|
|
495
500
|
this.vviinnWidgetClose = index.createEvent(this, "vviinnWidgetClose", 7);
|
|
501
|
+
this.secondaryActionClicked = index.createEvent(this, "secondaryActionClicked", 7);
|
|
496
502
|
this.active = false;
|
|
497
503
|
this.resetState = undefined;
|
|
498
504
|
this.buttonElementId = undefined;
|
|
@@ -527,7 +533,10 @@ const VviinnModal = class {
|
|
|
527
533
|
}), imageSearch_store.Option.getOrElse(() => null));
|
|
528
534
|
}
|
|
529
535
|
render() {
|
|
530
|
-
return (index.h(index.Host, { exportparts: "secondary-action, title, close-button", class: { closed: !this.active }, onAnimationEnd: (ev) => this.handleAnimationEnd(ev) }, index.h("div", { class: "head" }, !this.hideBackButton && (index.h("button", { part: "secondary-action", onClick: () =>
|
|
536
|
+
return (index.h(index.Host, { exportparts: "secondary-action, title, close-button", class: { closed: !this.active }, onAnimationEnd: (ev) => this.handleAnimationEnd(ev) }, index.h("div", { class: "head" }, !this.hideBackButton && (index.h("button", { part: "secondary-action", onClick: () => {
|
|
537
|
+
this.resetState();
|
|
538
|
+
this.secondaryActionClicked.emit();
|
|
539
|
+
} }, index.h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M20.25 12H3.75", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { d: "M10.5 5.25L3.75 12L10.5 18.75", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), index.h("div", { class: "title", part: "title" }, this.renderImage(), index.h("slot", { name: "vviinn-image-search-modal-title" }, i18next.instance.t("imageSearchModalTitle"))), index.h("button", { onClick: () => this.close(), class: "close-button", part: "close-button" }, index.h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M16 1.4L14.6 0L8 6.6L1.4 0L0 1.4L6.6 8L0 14.6L1.4 16L8 9.4L14.6 16L16 14.6L9.4 8L16 1.4Z", fill: "currentColor" })))), index.h("div", { class: "body" }, index.h("slot", null))));
|
|
531
540
|
}
|
|
532
541
|
get el() { return index.getElement(this); }
|
|
533
542
|
};
|
|
@@ -17121,8 +17121,10 @@ const uploadFile = (file) => {
|
|
|
17121
17121
|
};
|
|
17122
17122
|
const imageSearchState = state;
|
|
17123
17123
|
onChange("activeIonLink", async (newLink) => {
|
|
17124
|
-
state.loading = true;
|
|
17125
17124
|
const link = newLink ? newLink : state.resetCategoryLink;
|
|
17125
|
+
if (!link)
|
|
17126
|
+
return;
|
|
17127
|
+
state.loading = true;
|
|
17126
17128
|
await Handler.pipe(makeAuthorizedRequest(state.token), fromEither, chainW(linkRequest(link)), map(updateState), mapLeft((error) => {
|
|
17127
17129
|
return {
|
|
17128
17130
|
kind: "network error",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const imageSearch_store = require('./imageSearch.store-
|
|
3
|
+
const imageSearch_store = require('./imageSearch.store-cc9b4a68.js');
|
|
4
4
|
|
|
5
5
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
6
6
|
// require the crypto API and do not support built-in fallback to lower quality random number
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["vviinn-button.cjs",[[1,"vviinn-button",{"addStyle":[4,"add-style"]}]]],["cropper-handler.cjs",[[1,"cropper-handler",{"handler":[16],"disabled":[4]}]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-carousel_3.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],"color":[1],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"recommendations":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32]},[[0,"vviinnProductLoad","handleProductLoading"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"recommendations":[16],"widgetVersion":[1,"widget-version"],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[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"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"index":[2],"imageLoaded":[32]}]]],["highlight-box_22.cjs",[[1,"vviinn-image-view",{"basicEventData":[16]}],[1,"vviinn-onboarding"],[1,"vviinn-example-images",{"basicEventData":[16],"exampleImagesTitle":[1,"example-images-title"]}],[1,"vviinn-overlayed-modal",{"active":[4],"resetState":[16],"buttonElementId":[1,"button-element-id"],"hideBackButton":[4,"hide-back-button"],"widgetVersion":[1,"widget-version"]}],[1,"vviinn-empty-results"],[1,"vviinn-image-selector",{"basicEventData":[16],"startUpload":[4,"start-upload"],"resetVpsButton":[16]}],[1,"vviinn-server-error",{"handler":[16]}],[1,"vviinn-wrong-format",{"handler":[16]}],[1,"search-filters",{"filter":[16],"basicEventData":[16],"selectedFilter":[32],"hideFilters":[32]}],[1,"vviinn-privacy-badge",{"privacyBadgeText":[1,"privacy-badge-text"]}],[1,"vviinn-teaser"],[1,"image-cropper",{"disabled":[4],"basicEventData":[16],"handleMove":[32]}],[1,"vviinn-example-image",{"src":[1],"width":[2],"height":[2],"basicEventData":[16],"selected":[32]}],[1,"highlight-box"],[1,"vviinn-detected-object",{"detectedObject":[16],"basicEventData":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"resetState":[16],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"hideBackButton":[4,"hide-back-button"],"slider":[32]}],[1,"vviinn-onboarding-card-1",{"cardTitle":[1,"card-title"],"cardText":[1,"card-text"]}],[1,"vviinn-onboarding-card-2",{"cardTitle":[1,"card-title"],"cardText":[1,"card-text"]}],[1,"vviinn-onboarding-card-3",{"cardTitle":[1,"card-title"],"cardText":[1,"card-text"]}],[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],"isRTL":[32]}]]],["vviinn-vps-widget.cjs",[[1,"vviinn-vps-widget",{"token":[1],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"buttonPressed":[4,"button-pressed"],"mode":[1],"resetVpsButton":[16],"slidePosition":[32],"width":[32],"wrongImageFormat":[32],"trackingDeactivated":[32]},[[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnImageCrop","trachSearchAreaChanges"],[0,"vviinnSelectObject","trackDetectedObject"],[0,"vviinnSelectFilter","trackFilter"]]]]],["vviinn-vps-button.cjs",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"addStyle":[4,"add-style"],"mode":[1],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"],"buttonPressed":[32]},[[0,"vviinnWidgetClose","handleModalClosed"]]]]],["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"],"mode":[1],"campaigns":[1],"campaignType":[1,"campaign-type"],"color":[1],"locale":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"showingInButton":[4,"showing-in-button"],"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],"campaignType":[1,"campaign-type"],"locale":[1],"color":[1],"addStyle":[4,"add-style"],"mode":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["vviinn-button.cjs",[[1,"vviinn-button",{"addStyle":[4,"add-style"]}]]],["cropper-handler.cjs",[[1,"cropper-handler",{"handler":[16],"disabled":[4]}]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-carousel_3.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],"color":[1],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"recommendations":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32]},[[0,"vviinnProductLoad","handleProductLoading"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"recommendations":[16],"widgetVersion":[1,"widget-version"],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[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"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"index":[2],"imageLoaded":[32]}]]],["highlight-box_22.cjs",[[1,"vviinn-image-view",{"basicEventData":[16]}],[1,"vviinn-onboarding"],[1,"vviinn-example-images",{"basicEventData":[16],"exampleImagesTitle":[1,"example-images-title"]}],[1,"vviinn-overlayed-modal",{"active":[4],"resetState":[16],"buttonElementId":[1,"button-element-id"],"hideBackButton":[4,"hide-back-button"],"widgetVersion":[1,"widget-version"]}],[1,"vviinn-empty-results"],[1,"vviinn-image-selector",{"basicEventData":[16],"startUpload":[4,"start-upload"],"resetVpsButton":[16]}],[1,"vviinn-server-error",{"handler":[16]}],[1,"vviinn-wrong-format",{"handler":[16]}],[1,"search-filters",{"filter":[16],"basicEventData":[16],"selectedFilter":[32],"hideFilters":[32]}],[1,"vviinn-privacy-badge",{"privacyBadgeText":[1,"privacy-badge-text"]}],[1,"vviinn-teaser"],[1,"image-cropper",{"disabled":[4],"basicEventData":[16],"handleMove":[32]}],[1,"vviinn-example-image",{"src":[1],"width":[2],"height":[2],"basicEventData":[16],"selected":[32]}],[1,"highlight-box"],[1,"vviinn-detected-object",{"detectedObject":[16],"basicEventData":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"resetState":[16],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"hideBackButton":[4,"hide-back-button"],"slider":[32]}],[1,"vviinn-onboarding-card-1",{"cardTitle":[1,"card-title"],"cardText":[1,"card-text"]}],[1,"vviinn-onboarding-card-2",{"cardTitle":[1,"card-title"],"cardText":[1,"card-text"]}],[1,"vviinn-onboarding-card-3",{"cardTitle":[1,"card-title"],"cardText":[1,"card-text"]}],[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],"isRTL":[32]}]]],["vviinn-vps-widget.cjs",[[1,"vviinn-vps-widget",{"token":[1],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"buttonPressed":[4,"button-pressed"],"mode":[1],"resetVpsButton":[16],"slidePosition":[32],"width":[32],"wrongImageFormat":[32],"trackingDeactivated":[32]},[[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnImageCrop","trachSearchAreaChanges"],[0,"vviinnSelectObject","trackDetectedObject"],[0,"vviinnSelectFilter","trackFilter"],[0,"secondaryActionClicked","trackSecondaryAction"]]]]],["vviinn-vps-button.cjs",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"addStyle":[4,"add-style"],"mode":[1],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"],"buttonPressed":[32]},[[0,"vviinnWidgetClose","handleModalClosed"]]]]],["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"],"mode":[1],"campaigns":[1],"campaignType":[1,"campaign-type"],"color":[1],"locale":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"showingInButton":[4,"showing-in-button"],"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],"campaignType":[1,"campaign-type"],"locale":[1],"color":[1],"addStyle":[4,"add-style"],"mode":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-a4becaff.js');
|
|
6
|
-
const imageSearch_store = require('./imageSearch.store-
|
|
6
|
+
const imageSearch_store = require('./imageSearch.store-cc9b4a68.js');
|
|
7
7
|
const index$1 = require('./index-6cfe5293.js');
|
|
8
8
|
const Campaign = require('./Campaign-778b5b2c.js');
|
|
9
9
|
const i18next = require('./i18next-74ff3413.js');
|
|
10
|
-
const _package = require('./package-
|
|
10
|
+
const _package = require('./package-3381595c.js');
|
|
11
11
|
const Handler = require('./Handler-de64afa5.js');
|
|
12
|
-
const index$2 = require('./index-
|
|
12
|
+
const index$2 = require('./index-3e976225.js');
|
|
13
13
|
|
|
14
14
|
const vviinnCarouselCss = ":host{--vviinn-progressbar-width:0;--vviinn-carousel-item-width:150px;--vviinn-carousel-columns-internal:var(--vviinn-carousel-columns, 4);--vviinn-carousel-image-width-system:140px}.body{display:flex;position:relative;width:var(--vviinn-carousel-content-width);flex-direction:column}.content-wrapper *{box-sizing:border-box}.content-wrapper{overflow-y:hidden;overflow-x:auto;flex-grow:1}.bullets{margin-top:16px;display:flex;flex-direction:row;grid-gap:24px;justify-content:center}.bullet{width:10px;height:10px;background:#e0e0e0;border-radius:50%;cursor:pointer}.bullet.active{background:#161616}.content:not(.show-scrollbar),.content.grid{scrollbar-color:#fff0 #fff0}.content:not(.show-scrollbar)::-webkit-scrollbar,.content.grid::-webkit-scrollbar{opacity:0}.content{display:flex;flex-direction:row;grid-gap:8px;overflow-y:hidden;overflow-x:auto;flex-grow:1;padding-bottom:16px}.content.left>*{scroll-snap-align:start}.content.right>*{scroll-snap-align:end}:host(.continuity) 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:disabled{display:none}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)}}";
|
|
15
15
|
|
|
@@ -1213,12 +1213,15 @@ const VviinnVprWidget = class {
|
|
|
1213
1213
|
index.registerInstance(this, hostRef);
|
|
1214
1214
|
this.vviinnWidgetLoad = index.createEvent(this, "vviinnWidgetLoad", 7);
|
|
1215
1215
|
this.vviinnProductLoad = index.createEvent(this, "vviinnProductLoad", 7);
|
|
1216
|
-
this.vviinnProductClick = index.createEvent(this, "vviinnProductClick", 7);
|
|
1217
1216
|
this.vviinnProductView = index.createEvent(this, "vviinnProductView", 7);
|
|
1217
|
+
this.vviinnProductClick = index.createEvent(this, "vviinnProductClick", 7);
|
|
1218
|
+
this.vviinnResultLoad = index.createEvent(this, "vviinnResultLoad", 7);
|
|
1219
|
+
this.vviinnResultView = index.createEvent(this, "vviinnResultView", 7);
|
|
1218
1220
|
this.vviinnNoResult = index.createEvent(this, "vviinnNoResult", 7);
|
|
1219
1221
|
this.vviinnRecommendationsLoaded = index.createEvent(this, "vviinnRecommendationsLoaded", 7);
|
|
1220
1222
|
this.vviinnWidgetOpen = index.createEvent(this, "vviinnWidgetOpen", 7);
|
|
1221
1223
|
this.productImageLoadedSubject = new Subject();
|
|
1224
|
+
this.resultViewed = false;
|
|
1222
1225
|
this.setTrackingDeactivated = (result) => {
|
|
1223
1226
|
if (result.status === "rejected") {
|
|
1224
1227
|
this.trackingDeactivated = true;
|
|
@@ -1251,7 +1254,7 @@ const VviinnVprWidget = class {
|
|
|
1251
1254
|
this.trackingDeactivated = false;
|
|
1252
1255
|
this.hasErrorOnLoad = false;
|
|
1253
1256
|
}
|
|
1254
|
-
|
|
1257
|
+
getBasicEventData() {
|
|
1255
1258
|
return {
|
|
1256
1259
|
widgetType: "VPR",
|
|
1257
1260
|
campaignTypeId: this.campaignType,
|
|
@@ -1285,6 +1288,10 @@ const VviinnVprWidget = class {
|
|
|
1285
1288
|
this.productImageLoadedSubject.next(detail.productId);
|
|
1286
1289
|
}
|
|
1287
1290
|
trackProductView({ detail }) {
|
|
1291
|
+
if (!this.resultViewed) {
|
|
1292
|
+
this.resultViewed = true;
|
|
1293
|
+
this.vviinnResultView.emit(this.getBasicEventData());
|
|
1294
|
+
}
|
|
1288
1295
|
if (this.trackingDeactivated)
|
|
1289
1296
|
return;
|
|
1290
1297
|
const { productRank, productId, productName, widgetType, widgetId, campaignTypeId, campaignTypeName } = detail, rest = __rest(detail, ["productRank", "productId", "productName", "widgetType", "widgetId", "campaignTypeId", "campaignTypeName"]);
|
|
@@ -1351,7 +1358,7 @@ const VviinnVprWidget = class {
|
|
|
1351
1358
|
if (this.excluded) {
|
|
1352
1359
|
this.excluded = imageSearch_store.parseExcluded(this.excluded);
|
|
1353
1360
|
}
|
|
1354
|
-
this.vviinnWidgetLoad.emit(this.
|
|
1361
|
+
this.vviinnWidgetLoad.emit(this.getBasicEventData());
|
|
1355
1362
|
this.getRecommendations();
|
|
1356
1363
|
}
|
|
1357
1364
|
async getRecommendations() {
|
|
@@ -1363,7 +1370,7 @@ const VviinnVprWidget = class {
|
|
|
1363
1370
|
const runRequest = await request();
|
|
1364
1371
|
imageSearch_store._function.pipe(runRequest, imageSearch_store.Either.fold((error) => {
|
|
1365
1372
|
this.handleError(error);
|
|
1366
|
-
this.vviinnNoResult.emit(this.
|
|
1373
|
+
this.vviinnNoResult.emit(this.getBasicEventData());
|
|
1367
1374
|
this.vviinnRecommendationsLoaded.emit();
|
|
1368
1375
|
}, (data) => this.handleRecommendationsSuccess(data)));
|
|
1369
1376
|
}
|
|
@@ -1372,6 +1379,7 @@ const VviinnVprWidget = class {
|
|
|
1372
1379
|
}
|
|
1373
1380
|
handleRecommendationsSuccess(data) {
|
|
1374
1381
|
var _a;
|
|
1382
|
+
this.vviinnResultLoad.emit(this.getBasicEventData());
|
|
1375
1383
|
this.recommendations = (_a = data === null || data === void 0 ? void 0 : data.extended) !== null && _a !== void 0 ? _a : data;
|
|
1376
1384
|
imageSearch_store.imageSearchState.results = this.recommendations;
|
|
1377
1385
|
this.productIds = this.recommendations.map((r) => r.productId);
|
|
@@ -1411,7 +1419,7 @@ const VviinnVprWidget = class {
|
|
|
1411
1419
|
}
|
|
1412
1420
|
renderCarousel() {
|
|
1413
1421
|
if (this.showingInButton) {
|
|
1414
|
-
this.vviinnWidgetOpen.emit(this.
|
|
1422
|
+
this.vviinnWidgetOpen.emit(this.getBasicEventData());
|
|
1415
1423
|
}
|
|
1416
1424
|
return (index.h("vviinn-carousel", { mode: this.mode, campaignTypeId: this.campaignType, imageWidth: this.imageWidth, showScroll: this.showScroll, recommendations: this.recommendations, widgetElementId: this.id, widgetVersion: _package.version, gridArrowsDynamic: this.gridArrowsDynamic }));
|
|
1417
1425
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-a4becaff.js');
|
|
6
|
-
const imageSearch_store = require('./imageSearch.store-
|
|
6
|
+
const imageSearch_store = require('./imageSearch.store-cc9b4a68.js');
|
|
7
7
|
require('./Handler-de64afa5.js');
|
|
8
8
|
|
|
9
9
|
const vviinnPreloaderCss = ":host{--preloader-size:24px;--preloader-width:calc(var(--preloader-size) / 6);transform-origin:center;animation:rotate 3s linear infinite;border:var(--preloader-width) solid 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}@keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-a4becaff.js');
|
|
6
|
-
const _package = require('./package-
|
|
6
|
+
const _package = require('./package-3381595c.js');
|
|
7
7
|
const index$1 = require('./index-6cfe5293.js');
|
|
8
8
|
|
|
9
9
|
const vviinnVprButtonCss = ":host{display:block}";
|
|
@@ -14,10 +14,12 @@ const VviinnVprButton = class {
|
|
|
14
14
|
this.vviinnWidgetLoad = index.createEvent(this, "vviinnWidgetLoad", 7);
|
|
15
15
|
this.vviinnWidgetOpen = index.createEvent(this, "vviinnWidgetOpen", 7);
|
|
16
16
|
this.vviinnWidgetClose = index.createEvent(this, "vviinnWidgetClose", 7);
|
|
17
|
-
this.vviinnNoResult = index.createEvent(this, "vviinnNoResult", 7);
|
|
18
17
|
this.vviinnProductLoad = index.createEvent(this, "vviinnProductLoad", 7);
|
|
19
18
|
this.vviinnProductClick = index.createEvent(this, "vviinnProductClick", 7);
|
|
20
19
|
this.vviinnProductView = index.createEvent(this, "vviinnProductView", 7);
|
|
20
|
+
this.vviinnResultLoad = index.createEvent(this, "vviinnResultLoad", 7);
|
|
21
|
+
this.vviinnResultView = index.createEvent(this, "vviinnResultView", 7);
|
|
22
|
+
this.vviinnNoResult = index.createEvent(this, "vviinnNoResult", 7);
|
|
21
23
|
this.sidebar = null;
|
|
22
24
|
this.sidebarCloseListener = () => {
|
|
23
25
|
document.body.removeChild(this.sidebar);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-a4becaff.js');
|
|
6
|
-
const _package = require('./package-
|
|
6
|
+
const _package = require('./package-3381595c.js');
|
|
7
7
|
const index$1 = require('./index-6cfe5293.js');
|
|
8
8
|
const customizedSlots = require('./customized-slots-aee3f39d.js');
|
|
9
9
|
const Campaign = require('./Campaign-778b5b2c.js');
|
|
@@ -17,10 +17,12 @@ const VviinnVpsButton = class {
|
|
|
17
17
|
this.vviinnWidgetOpen = index.createEvent(this, "vviinnWidgetOpen", 7);
|
|
18
18
|
this.vviinnWidgetClose = index.createEvent(this, "vviinnWidgetClose", 7);
|
|
19
19
|
this.vviinnImageUpload = index.createEvent(this, "vviinnImageUpload", 7);
|
|
20
|
-
this.vviinnNoResult = index.createEvent(this, "vviinnNoResult", 7);
|
|
21
20
|
this.vviinnProductLoad = index.createEvent(this, "vviinnProductLoad", 7);
|
|
22
21
|
this.vviinnProductClick = index.createEvent(this, "vviinnProductClick", 7);
|
|
23
22
|
this.vviinnProductView = index.createEvent(this, "vviinnProductView", 7);
|
|
23
|
+
this.vviinnResultLoad = index.createEvent(this, "vviinnResultLoad", 7);
|
|
24
|
+
this.vviinnResultView = index.createEvent(this, "vviinnResultView", 7);
|
|
25
|
+
this.vviinnNoResult = index.createEvent(this, "vviinnNoResult", 7);
|
|
24
26
|
this.vviinnImageCrop = index.createEvent(this, "vviinnImageCrop", 7);
|
|
25
27
|
this.vviinnSelectObject = index.createEvent(this, "vviinnSelectObject", 7);
|
|
26
28
|
this.vviinnSelectFilter = index.createEvent(this, "vviinnSelectFilter", 7);
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-a4becaff.js');
|
|
6
|
-
const imageSearch_store = require('./imageSearch.store-
|
|
6
|
+
const imageSearch_store = require('./imageSearch.store-cc9b4a68.js');
|
|
7
7
|
const i18next = require('./i18next-74ff3413.js');
|
|
8
|
-
const _package = require('./package-
|
|
8
|
+
const _package = require('./package-3381595c.js');
|
|
9
9
|
const customizedSlots = require('./customized-slots-aee3f39d.js');
|
|
10
|
-
const index$1 = require('./index-
|
|
10
|
+
const index$1 = require('./index-3e976225.js');
|
|
11
11
|
const Campaign = require('./Campaign-778b5b2c.js');
|
|
12
12
|
require('./Handler-de64afa5.js');
|
|
13
13
|
|
|
@@ -97,14 +97,18 @@ const VviinnVpsWidget = class {
|
|
|
97
97
|
this.vviinnWidgetOpen = index.createEvent(this, "vviinnWidgetOpen", 7);
|
|
98
98
|
this.vviinnWidgetClose = index.createEvent(this, "vviinnWidgetClose", 7);
|
|
99
99
|
this.vviinnImageUpload = index.createEvent(this, "vviinnImageUpload", 7);
|
|
100
|
-
this.vviinnNoResult = index.createEvent(this, "vviinnNoResult", 7);
|
|
101
100
|
this.vviinnProductLoad = index.createEvent(this, "vviinnProductLoad", 7);
|
|
102
|
-
this.vviinnProductClick = index.createEvent(this, "vviinnProductClick", 7);
|
|
103
101
|
this.vviinnProductView = index.createEvent(this, "vviinnProductView", 7);
|
|
102
|
+
this.vviinnProductClick = index.createEvent(this, "vviinnProductClick", 7);
|
|
103
|
+
this.vviinnResultLoad = index.createEvent(this, "vviinnResultLoad", 7);
|
|
104
|
+
this.vviinnResultView = index.createEvent(this, "vviinnResultView", 7);
|
|
105
|
+
this.vviinnNoResult = index.createEvent(this, "vviinnNoResult", 7);
|
|
104
106
|
this.vviinnImageCrop = index.createEvent(this, "vviinnImageCrop", 7);
|
|
105
107
|
this.vviinnSelectObject = index.createEvent(this, "vviinnSelectObject", 7);
|
|
106
108
|
this.vviinnSelectFilter = index.createEvent(this, "vviinnSelectFilter", 7);
|
|
107
109
|
this.imageSource = null;
|
|
110
|
+
this.resultLoaded = false;
|
|
111
|
+
this.resultViewed = false;
|
|
108
112
|
this.setTrackingDeactivated = (result) => {
|
|
109
113
|
if (result.status === "rejected") {
|
|
110
114
|
this.trackingDeactivated = true;
|
|
@@ -138,6 +142,10 @@ const VviinnVpsWidget = class {
|
|
|
138
142
|
this.wrongImageFormat = false;
|
|
139
143
|
this.trackingDeactivated = false;
|
|
140
144
|
}
|
|
145
|
+
initResultEvents() {
|
|
146
|
+
this.resultLoaded = false;
|
|
147
|
+
this.resultViewed = false;
|
|
148
|
+
}
|
|
141
149
|
handleOpenLink(deeplink) {
|
|
142
150
|
if (this.productDetailNewTab) {
|
|
143
151
|
window.open(deeplink);
|
|
@@ -169,6 +177,10 @@ const VviinnVpsWidget = class {
|
|
|
169
177
|
}
|
|
170
178
|
}
|
|
171
179
|
trackProductView({ detail }) {
|
|
180
|
+
if (!this.resultViewed) {
|
|
181
|
+
this.resultViewed = true;
|
|
182
|
+
this.vviinnResultView.emit(this.getBasicEventData());
|
|
183
|
+
}
|
|
172
184
|
if (this.trackingDeactivated)
|
|
173
185
|
return;
|
|
174
186
|
const { productRank, productId, productName, widgetType, widgetId, campaignTypeId, campaignTypeName } = detail, rest = __rest(detail, ["productRank", "productId", "productName", "widgetType", "widgetId", "campaignTypeId", "campaignTypeName"]);
|
|
@@ -196,6 +208,7 @@ const VviinnVpsWidget = class {
|
|
|
196
208
|
}
|
|
197
209
|
}
|
|
198
210
|
trachSearchAreaChanges() {
|
|
211
|
+
this.initResultEvents();
|
|
199
212
|
if (this.trackingDeactivated)
|
|
200
213
|
return;
|
|
201
214
|
const searchEvent = index$1.createSearchEvent({
|
|
@@ -206,6 +219,7 @@ const VviinnVpsWidget = class {
|
|
|
206
219
|
this.trackingApi.trackEvent(searchEvent).then(this.setTrackingDeactivated);
|
|
207
220
|
}
|
|
208
221
|
trackDetectedObject() {
|
|
222
|
+
this.initResultEvents();
|
|
209
223
|
if (this.trackingDeactivated)
|
|
210
224
|
return;
|
|
211
225
|
const searchEvent = index$1.createSearchEvent({
|
|
@@ -216,6 +230,7 @@ const VviinnVpsWidget = class {
|
|
|
216
230
|
this.trackingApi.trackEvent(searchEvent).then(this.setTrackingDeactivated);
|
|
217
231
|
}
|
|
218
232
|
trackFilter({ detail }) {
|
|
233
|
+
this.initResultEvents();
|
|
219
234
|
if (this.trackingDeactivated)
|
|
220
235
|
return;
|
|
221
236
|
const searchEvent = index$1.createFilterEvent({
|
|
@@ -226,6 +241,9 @@ const VviinnVpsWidget = class {
|
|
|
226
241
|
});
|
|
227
242
|
this.trackingApi.trackEvent(searchEvent).then(this.setTrackingDeactivated);
|
|
228
243
|
}
|
|
244
|
+
trackSecondaryAction() {
|
|
245
|
+
this.initResultEvents();
|
|
246
|
+
}
|
|
229
247
|
connectedCallback() {
|
|
230
248
|
imageSearch_store.state.apiPath = this.apiPath;
|
|
231
249
|
imageSearch_store.state.currencySign = this.currencySign;
|
|
@@ -280,6 +298,18 @@ const VviinnVpsWidget = class {
|
|
|
280
298
|
});
|
|
281
299
|
this.trackingApi.trackEvent(searchEvent).then(this.setTrackingDeactivated);
|
|
282
300
|
}
|
|
301
|
+
renderResults() {
|
|
302
|
+
if (imageSearch_store.imageSearchState.results.length === 0)
|
|
303
|
+
return null;
|
|
304
|
+
if (!this.resultLoaded && this.slidePosition === 1) {
|
|
305
|
+
this.vviinnResultLoad.emit(this.getBasicEventData());
|
|
306
|
+
this.resultLoaded = true;
|
|
307
|
+
}
|
|
308
|
+
return imageSearch_store.imageSearchState.results.map((p, i) => {
|
|
309
|
+
var _a;
|
|
310
|
+
return (index.h("vviinn-product-card", { key: p.productId, hidden: true, productTitle: p.title, productId: p.productId, productType: p.productType, 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", campaignTypeId: "VPS", index: i, widgetElementId: this.id, buttonElementId: this.buttonElementId, widgetVersion: _package.version }));
|
|
311
|
+
});
|
|
312
|
+
}
|
|
283
313
|
resetState() {
|
|
284
314
|
this.resetScroll("onboarding-block");
|
|
285
315
|
this.slidePosition = 0;
|
|
@@ -322,7 +352,7 @@ const VviinnVpsWidget = class {
|
|
|
322
352
|
return (index.h(index.Host, null, !this.showingInButton && index.h(customizedSlots.SlotSkeleton, null), index.h("vviinn-overlayed-modal", { class: { "first-screen": this.slidePosition === 0 }, active: this.active, resetState: this.resetState.bind(this), onVviinnWidgetClose: () => this.handleModalClose(), buttonElementId: (_a = this.buttonElementId) !== null && _a !== void 0 ? _a : this.id, widgetVersion: _package.version, hideBackButton: this.mode === "upload", 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: {
|
|
323
353
|
error: this.haveErrors(),
|
|
324
354
|
"start-page_block": true,
|
|
325
|
-
} }, index.h("vviinn-wrong-format", { class: { hidden: !this.wrongImageFormat }, handler: () => (this.wrongImageFormat = false) }), index.h("vviinn-server-error", { class: { hidden: !imageSearch_store.imageSearchState.serverError }, handler: () => (imageSearch_store.imageSearchState.serverError = false) }), index.h("vviinn-teaser", { class: { hidden: this.haveErrors() } }), index.h("vviinn-image-selector", { class: { hidden: this.haveErrors() },
|
|
355
|
+
} }, index.h("vviinn-wrong-format", { class: { hidden: !this.wrongImageFormat }, handler: () => (this.wrongImageFormat = false) }), index.h("vviinn-server-error", { class: { hidden: !imageSearch_store.imageSearchState.serverError }, handler: () => (imageSearch_store.imageSearchState.serverError = false) }), index.h("vviinn-teaser", { class: { hidden: this.haveErrors() } }), index.h("vviinn-image-selector", { class: { hidden: this.haveErrors() }, onVviinnImageUploadFinished: () => {
|
|
326
356
|
this.active = true;
|
|
327
357
|
this.handleImageSelection("upload");
|
|
328
358
|
if (this.mode === "upload") {
|
|
@@ -330,16 +360,13 @@ const VviinnVpsWidget = class {
|
|
|
330
360
|
}
|
|
331
361
|
}, onVviinnNoResult: () => (this.wrongImageFormat = true), resetVpsButton: this.resetVpsButton, basicEventData: this.getBasicEventData(), part: "select-image_button", startUpload: this.buttonPressed &&
|
|
332
362
|
this.showingInButton &&
|
|
333
|
-
this.mode === "upload" }, 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, i18next.instance.t("imageUploadButtonText"))))), index.h("vviinn-privacy-badge", { class: { hidden: this.haveErrors() }, privacyBadgeText: i18next.instance.t("privacyBadgeText") })), 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", exampleImagesTitle: i18next.instance.t("exampleImagesTitle"),
|
|
363
|
+
this.mode === "upload" }, 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, i18next.instance.t("imageUploadButtonText"))))), index.h("vviinn-privacy-badge", { class: { hidden: this.haveErrors() }, privacyBadgeText: i18next.instance.t("privacyBadgeText") })), 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", exampleImagesTitle: i18next.instance.t("exampleImagesTitle"), onVviinnImageUploadFinished: () => this.handleImageSelection("example"), onVviinnNoResult: () => this.resetScroll("onboarding-block", "smooth"), basicEventData: this.getBasicEventData() })))), index.h("vviinn-slide", { class: { "results-page": true, active: this.slidePosition == 1 } }, index.h("div", { class: "image-wrapper" }, index.h("vviinn-image-view", { basicEventData: this.getBasicEventData() }), index.h("div", { class: "filters-wrapper" }, index.h("div", { class: "filters" }, imageSearch_store.imageSearchState.filters.map((filter) => (index.h("search-filters", { filter: filter, basicEventData: this.getBasicEventData() })))))), index.h("div", { id: "results-block", class: "products-wrapper" }, index.h("div", { class: {
|
|
334
364
|
"nothing-found": true,
|
|
335
365
|
hidden: imageSearch_store.imageSearchState.results.length > 0,
|
|
336
366
|
} }, index.h("vviinn-empty-results", null), index.h("vviinn-onboarding", null)), index.h("div", { class: {
|
|
337
367
|
hidden: imageSearch_store.imageSearchState.results.length <= 0,
|
|
338
368
|
products: true,
|
|
339
|
-
} },
|
|
340
|
-
var _a;
|
|
341
|
-
return (index.h("vviinn-product-card", { key: p.productId, hidden: true, productTitle: p.title, productId: p.productId, productType: p.productType, 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", campaignTypeId: "VPS", index: i, widgetElementId: this.id, buttonElementId: this.buttonElementId, widgetVersion: _package.version }));
|
|
342
|
-
}))))))));
|
|
369
|
+
} }, this.renderResults())))))));
|
|
343
370
|
}
|
|
344
371
|
get el() { return index.getElement(this); }
|
|
345
372
|
static get watchers() { return {
|
|
@@ -20,7 +20,7 @@ const patchBrowser = () => {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
patchBrowser().then(options => {
|
|
23
|
-
return index.bootstrapLazy([["vviinn-button.cjs",[[1,"vviinn-button",{"addStyle":[4,"add-style"]}]]],["cropper-handler.cjs",[[1,"cropper-handler",{"handler":[16],"disabled":[4]}]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-carousel_3.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],"color":[1],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"recommendations":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32]},[[0,"vviinnProductLoad","handleProductLoading"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"recommendations":[16],"widgetVersion":[1,"widget-version"],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[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"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"index":[2],"imageLoaded":[32]}]]],["highlight-box_22.cjs",[[1,"vviinn-image-view",{"basicEventData":[16]}],[1,"vviinn-onboarding"],[1,"vviinn-example-images",{"basicEventData":[16],"exampleImagesTitle":[1,"example-images-title"]}],[1,"vviinn-overlayed-modal",{"active":[4],"resetState":[16],"buttonElementId":[1,"button-element-id"],"hideBackButton":[4,"hide-back-button"],"widgetVersion":[1,"widget-version"]}],[1,"vviinn-empty-results"],[1,"vviinn-image-selector",{"basicEventData":[16],"startUpload":[4,"start-upload"],"resetVpsButton":[16]}],[1,"vviinn-server-error",{"handler":[16]}],[1,"vviinn-wrong-format",{"handler":[16]}],[1,"search-filters",{"filter":[16],"basicEventData":[16],"selectedFilter":[32],"hideFilters":[32]}],[1,"vviinn-privacy-badge",{"privacyBadgeText":[1,"privacy-badge-text"]}],[1,"vviinn-teaser"],[1,"image-cropper",{"disabled":[4],"basicEventData":[16],"handleMove":[32]}],[1,"vviinn-example-image",{"src":[1],"width":[2],"height":[2],"basicEventData":[16],"selected":[32]}],[1,"highlight-box"],[1,"vviinn-detected-object",{"detectedObject":[16],"basicEventData":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"resetState":[16],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"hideBackButton":[4,"hide-back-button"],"slider":[32]}],[1,"vviinn-onboarding-card-1",{"cardTitle":[1,"card-title"],"cardText":[1,"card-text"]}],[1,"vviinn-onboarding-card-2",{"cardTitle":[1,"card-title"],"cardText":[1,"card-text"]}],[1,"vviinn-onboarding-card-3",{"cardTitle":[1,"card-title"],"cardText":[1,"card-text"]}],[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],"isRTL":[32]}]]],["vviinn-vps-widget.cjs",[[1,"vviinn-vps-widget",{"token":[1],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"buttonPressed":[4,"button-pressed"],"mode":[1],"resetVpsButton":[16],"slidePosition":[32],"width":[32],"wrongImageFormat":[32],"trackingDeactivated":[32]},[[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnImageCrop","trachSearchAreaChanges"],[0,"vviinnSelectObject","trackDetectedObject"],[0,"vviinnSelectFilter","trackFilter"]]]]],["vviinn-vps-button.cjs",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"addStyle":[4,"add-style"],"mode":[1],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"],"buttonPressed":[32]},[[0,"vviinnWidgetClose","handleModalClosed"]]]]],["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"],"mode":[1],"campaigns":[1],"campaignType":[1,"campaign-type"],"color":[1],"locale":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"showingInButton":[4,"showing-in-button"],"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],"campaignType":[1,"campaign-type"],"locale":[1],"color":[1],"addStyle":[4,"add-style"],"mode":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"]}]]]], options);
|
|
23
|
+
return index.bootstrapLazy([["vviinn-button.cjs",[[1,"vviinn-button",{"addStyle":[4,"add-style"]}]]],["cropper-handler.cjs",[[1,"cropper-handler",{"handler":[16],"disabled":[4]}]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-carousel_3.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],"color":[1],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"recommendations":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32]},[[0,"vviinnProductLoad","handleProductLoading"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"recommendations":[16],"widgetVersion":[1,"widget-version"],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[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"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"index":[2],"imageLoaded":[32]}]]],["highlight-box_22.cjs",[[1,"vviinn-image-view",{"basicEventData":[16]}],[1,"vviinn-onboarding"],[1,"vviinn-example-images",{"basicEventData":[16],"exampleImagesTitle":[1,"example-images-title"]}],[1,"vviinn-overlayed-modal",{"active":[4],"resetState":[16],"buttonElementId":[1,"button-element-id"],"hideBackButton":[4,"hide-back-button"],"widgetVersion":[1,"widget-version"]}],[1,"vviinn-empty-results"],[1,"vviinn-image-selector",{"basicEventData":[16],"startUpload":[4,"start-upload"],"resetVpsButton":[16]}],[1,"vviinn-server-error",{"handler":[16]}],[1,"vviinn-wrong-format",{"handler":[16]}],[1,"search-filters",{"filter":[16],"basicEventData":[16],"selectedFilter":[32],"hideFilters":[32]}],[1,"vviinn-privacy-badge",{"privacyBadgeText":[1,"privacy-badge-text"]}],[1,"vviinn-teaser"],[1,"image-cropper",{"disabled":[4],"basicEventData":[16],"handleMove":[32]}],[1,"vviinn-example-image",{"src":[1],"width":[2],"height":[2],"basicEventData":[16],"selected":[32]}],[1,"highlight-box"],[1,"vviinn-detected-object",{"detectedObject":[16],"basicEventData":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"resetState":[16],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"hideBackButton":[4,"hide-back-button"],"slider":[32]}],[1,"vviinn-onboarding-card-1",{"cardTitle":[1,"card-title"],"cardText":[1,"card-text"]}],[1,"vviinn-onboarding-card-2",{"cardTitle":[1,"card-title"],"cardText":[1,"card-text"]}],[1,"vviinn-onboarding-card-3",{"cardTitle":[1,"card-title"],"cardText":[1,"card-text"]}],[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],"isRTL":[32]}]]],["vviinn-vps-widget.cjs",[[1,"vviinn-vps-widget",{"token":[1],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"buttonPressed":[4,"button-pressed"],"mode":[1],"resetVpsButton":[16],"slidePosition":[32],"width":[32],"wrongImageFormat":[32],"trackingDeactivated":[32]},[[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnImageCrop","trachSearchAreaChanges"],[0,"vviinnSelectObject","trackDetectedObject"],[0,"vviinnSelectFilter","trackFilter"],[0,"secondaryActionClicked","trackSecondaryAction"]]]]],["vviinn-vps-button.cjs",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"addStyle":[4,"add-style"],"mode":[1],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"],"buttonPressed":[32]},[[0,"vviinnWidgetClose","handleModalClosed"]]]]],["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"],"mode":[1],"campaigns":[1],"campaignType":[1,"campaign-type"],"color":[1],"locale":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"showingInButton":[4,"showing-in-button"],"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],"campaignType":[1,"campaign-type"],"locale":[1],"color":[1],"addStyle":[4,"add-style"],"mode":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"apiPath":[1,"api-path"]}]]]], options);
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
exports.setNonce = index.setNonce;
|
|
@@ -13,9 +13,10 @@ export class VviinnExampleImage {
|
|
|
13
13
|
}
|
|
14
14
|
async selectImage() {
|
|
15
15
|
this.selected = true;
|
|
16
|
+
this.vviinnImageUpload.emit(this.basicEventData);
|
|
16
17
|
const file = await toFile(this.src);
|
|
17
18
|
const processResult = await processSelectedFile(file);
|
|
18
|
-
pipe(processResult, E.match(() => this.vviinnNoResult.emit(this.basicEventData), () => this.
|
|
19
|
+
pipe(processResult, E.match(() => this.vviinnNoResult.emit(this.basicEventData), () => this.vviinnImageUploadFinished.emit()));
|
|
19
20
|
this.selected = false;
|
|
20
21
|
}
|
|
21
22
|
handleKeyPress({ key }) {
|
|
@@ -167,6 +168,24 @@ export class VviinnExampleImage {
|
|
|
167
168
|
}
|
|
168
169
|
}
|
|
169
170
|
}
|
|
171
|
+
}, {
|
|
172
|
+
"method": "vviinnImageUploadFinished",
|
|
173
|
+
"name": "vviinnImageUploadFinished",
|
|
174
|
+
"bubbles": true,
|
|
175
|
+
"cancelable": true,
|
|
176
|
+
"composed": true,
|
|
177
|
+
"docs": {
|
|
178
|
+
"tags": [{
|
|
179
|
+
"name": "internal",
|
|
180
|
+
"text": undefined
|
|
181
|
+
}],
|
|
182
|
+
"text": ""
|
|
183
|
+
},
|
|
184
|
+
"complexType": {
|
|
185
|
+
"original": "any",
|
|
186
|
+
"resolved": "any",
|
|
187
|
+
"references": {}
|
|
188
|
+
}
|
|
170
189
|
}];
|
|
171
190
|
}
|
|
172
191
|
}
|
|
@@ -110,6 +110,24 @@ export class VviinnExampleImages {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
+
}, {
|
|
114
|
+
"method": "vviinnImageUploadFinished",
|
|
115
|
+
"name": "vviinnImageUploadFinished",
|
|
116
|
+
"bubbles": true,
|
|
117
|
+
"cancelable": true,
|
|
118
|
+
"composed": true,
|
|
119
|
+
"docs": {
|
|
120
|
+
"tags": [{
|
|
121
|
+
"name": "internal",
|
|
122
|
+
"text": undefined
|
|
123
|
+
}],
|
|
124
|
+
"text": ""
|
|
125
|
+
},
|
|
126
|
+
"complexType": {
|
|
127
|
+
"original": "any",
|
|
128
|
+
"resolved": "any",
|
|
129
|
+
"references": {}
|
|
130
|
+
}
|
|
113
131
|
}];
|
|
114
132
|
}
|
|
115
133
|
static get elementRef() { return "el"; }
|
|
@@ -12,9 +12,10 @@ export class VviinnImageSelector {
|
|
|
12
12
|
this.resetVpsButton = undefined;
|
|
13
13
|
}
|
|
14
14
|
async handleInputChange(event) {
|
|
15
|
+
this.vviinnImageUpload.emit(this.basicEventData);
|
|
15
16
|
const input = event.target;
|
|
16
17
|
const processingResult = await processSelectedFile(input.files[0]);
|
|
17
|
-
pipe(processingResult, E.match(() => this.vviinnNoResult.emit(this.basicEventData), () => this.
|
|
18
|
+
pipe(processingResult, E.match(() => this.vviinnNoResult.emit(this.basicEventData), () => this.vviinnImageUploadFinished.emit()));
|
|
18
19
|
input.value = null;
|
|
19
20
|
}
|
|
20
21
|
isLoading() {
|
|
@@ -106,7 +107,7 @@ export class VviinnImageSelector {
|
|
|
106
107
|
"composed": true,
|
|
107
108
|
"docs": {
|
|
108
109
|
"tags": [],
|
|
109
|
-
"text": "
|
|
110
|
+
"text": ""
|
|
110
111
|
},
|
|
111
112
|
"complexType": {
|
|
112
113
|
"original": "BasicEventData",
|
|
@@ -138,6 +139,24 @@ export class VviinnImageSelector {
|
|
|
138
139
|
}
|
|
139
140
|
}
|
|
140
141
|
}
|
|
142
|
+
}, {
|
|
143
|
+
"method": "vviinnImageUploadFinished",
|
|
144
|
+
"name": "vviinnImageUploadFinished",
|
|
145
|
+
"bubbles": true,
|
|
146
|
+
"cancelable": true,
|
|
147
|
+
"composed": true,
|
|
148
|
+
"docs": {
|
|
149
|
+
"tags": [{
|
|
150
|
+
"name": "internal",
|
|
151
|
+
"text": undefined
|
|
152
|
+
}],
|
|
153
|
+
"text": ""
|
|
154
|
+
},
|
|
155
|
+
"complexType": {
|
|
156
|
+
"original": "any",
|
|
157
|
+
"resolved": "any",
|
|
158
|
+
"references": {}
|
|
159
|
+
}
|
|
141
160
|
}];
|
|
142
161
|
}
|
|
143
162
|
static get watchers() {
|