vviinn-widgets 2.217.0 → 2.218.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/{index-CNwv5Nws.js → index-C2IFqNzB.js} +1 -1
- package/dist/cjs/{search.store-zVXuUXvP.js → search.store-CEC5R32_.js} +3 -1
- package/dist/cjs/vviinn-button_6.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-camera_12.cjs.entry.js +22 -15
- package/dist/cjs/vviinn-carousel_10.cjs.entry.js +2 -2
- package/dist/cjs/vviinn-shop-the-look.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-text-search.cjs.entry.js +6 -6
- package/dist/collection/components/vviinn-results/stories/ResultsTemplate.js +3 -1
- package/dist/collection/components/vviinn-text-search/vviinn-text-search.js +5 -5
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +20 -13
- package/dist/collection/store/search.store.js +2 -0
- package/dist/esm/{index-Ctoi6gUj.js → index-DT_CMr4r.js} +1 -1
- package/dist/esm/{search.store-o7ifwFhz.js → search.store-ClFXu6V6.js} +3 -1
- package/dist/esm/vviinn-button_6.entry.js +1 -1
- package/dist/esm/vviinn-camera_12.entry.js +22 -15
- package/dist/esm/vviinn-carousel_10.entry.js +2 -2
- package/dist/esm/vviinn-shop-the-look.entry.js +1 -1
- package/dist/esm/vviinn-text-search.entry.js +6 -6
- package/dist/types/store/search.store.d.ts +1 -0
- package/dist/vviinn-widgets/{p-d53edbe1.entry.js → p-18d5ac42.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-4775f390.entry.js → p-8d9c02d5.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-B11ua2P6.js → p-BSSEWLP1.js} +1 -1
- package/{www/build/p-DOxUTnTY.js → dist/vviinn-widgets/p-BdbY-xGp.js} +1 -1
- package/dist/vviinn-widgets/{p-7f336f63.entry.js → p-bb2f8c8f.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-f160aec9.entry.js → p-c4c7913e.entry.js} +1 -1
- package/{www/build/p-82a9ac99.entry.js → dist/vviinn-widgets/p-eff82269.entry.js} +1 -1
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/{p-d53edbe1.entry.js → p-18d5ac42.entry.js} +1 -1
- package/www/build/{p-4bdca249.js → p-5fc04ad1.js} +1 -1
- package/www/build/{p-4775f390.entry.js → p-8d9c02d5.entry.js} +1 -1
- package/www/build/{p-B11ua2P6.js → p-BSSEWLP1.js} +1 -1
- package/{dist/vviinn-widgets/p-DOxUTnTY.js → www/build/p-BdbY-xGp.js} +1 -1
- package/www/build/{p-7f336f63.entry.js → p-bb2f8c8f.entry.js} +1 -1
- package/www/build/{p-f160aec9.entry.js → p-c4c7913e.entry.js} +1 -1
- package/{dist/vviinn-widgets/p-82a9ac99.entry.js → www/build/p-eff82269.entry.js} +1 -1
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D38ORu31.js');
|
|
4
|
-
var search_store = require('./search.store-
|
|
4
|
+
var search_store = require('./search.store-CEC5R32_.js');
|
|
5
5
|
var store = require('./store-jPZ4ROqV.js');
|
|
6
6
|
|
|
7
7
|
const PlusIcon = () => (index.h("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "plus-icon", "aria-hidden": "true" },
|
|
@@ -8593,7 +8593,7 @@ const encodeToBase64UTF8 = (str) => {
|
|
|
8593
8593
|
return btoa(String.fromCharCode.apply(null, utf8Array));
|
|
8594
8594
|
};
|
|
8595
8595
|
|
|
8596
|
-
const version = "2.
|
|
8596
|
+
const version = "2.218.0";
|
|
8597
8597
|
|
|
8598
8598
|
const appStateGlobalDefaults = {
|
|
8599
8599
|
excluded: null,
|
|
@@ -8700,6 +8700,8 @@ const updateVisualSearchState = (store, isHiResUpdate = false) => async (respons
|
|
|
8700
8700
|
state.visualSearchId = response.requestId;
|
|
8701
8701
|
state.results = response.data.products;
|
|
8702
8702
|
state.dynamicFilters = dynamicFilters;
|
|
8703
|
+
state.redirect = response.interactions.redirect
|
|
8704
|
+
? Object.assign(Object.assign({}, response.interactions.redirect), { searchId: response.requestId }) : null;
|
|
8703
8705
|
const extractedFilters = extractSelectedFilters(dynamicFilters);
|
|
8704
8706
|
if (state.requestFilters.length === 0 && extractedFilters.length > 0) {
|
|
8705
8707
|
state.requestFilters = extractedFilters;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D38ORu31.js');
|
|
4
4
|
var store = require('./store-jPZ4ROqV.js');
|
|
5
|
-
var search_store = require('./search.store-
|
|
5
|
+
var search_store = require('./search.store-CEC5R32_.js');
|
|
6
6
|
var index$1 = require('./index-CBteD3gC.js');
|
|
7
7
|
var SecondaryActionIcon = require('./SecondaryActionIcon-Ng84u7-b.js');
|
|
8
8
|
var index$2 = require('./index-CvMi8_tX.js');
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D38ORu31.js');
|
|
4
4
|
var Rectangle = require('./Rectangle-7dF6_xf3.js');
|
|
5
|
-
var search_store = require('./search.store-
|
|
5
|
+
var search_store = require('./search.store-CEC5R32_.js');
|
|
6
6
|
var index$2 = require('./index-CBteD3gC.js');
|
|
7
|
-
var index$1 = require('./index-
|
|
7
|
+
var index$1 = require('./index-C2IFqNzB.js');
|
|
8
8
|
var store = require('./store-jPZ4ROqV.js');
|
|
9
9
|
var cropperUtils = require('./cropperUtils-DCDOLeBS.js');
|
|
10
10
|
var openProductLink = require('./openProductLink-BwHUGXtr.js');
|
|
@@ -1802,11 +1802,19 @@ const VviinnVpsWidget = class {
|
|
|
1802
1802
|
this.uploadSource = uploadSource;
|
|
1803
1803
|
};
|
|
1804
1804
|
this.handleVviinnImageUploadFinished = (detail) => {
|
|
1805
|
+
const visualSearchRedirect = this.state.redirect;
|
|
1806
|
+
const hasVisualSearchRedirect = !!(visualSearchRedirect === null || visualSearchRedirect === void 0 ? void 0 : visualSearchRedirect.url) &&
|
|
1807
|
+
visualSearchRedirect.searchId === detail.searchId;
|
|
1808
|
+
if (hasVisualSearchRedirect) {
|
|
1809
|
+
this.handleImageSearchRedirect(visualSearchRedirect.url, detail.searchId);
|
|
1810
|
+
return;
|
|
1811
|
+
}
|
|
1805
1812
|
const shouldRedirectToResultsPage = this.resultsPageUrl &&
|
|
1806
1813
|
!this.showInWidget &&
|
|
1807
1814
|
!resultsPageUrl.isOnResultsPage(this.resultsPageUrl);
|
|
1808
1815
|
if (shouldRedirectToResultsPage) {
|
|
1809
|
-
this.
|
|
1816
|
+
const url = resultsPageUrl.buildImageSearchRedirectUrl(this.resultsPageUrl, detail.searchId, resultsPageUrl.parseResultsPageParamNames(this.resultsPageParams).searchId);
|
|
1817
|
+
this.handleImageSearchRedirect(url, detail.searchId);
|
|
1810
1818
|
return;
|
|
1811
1819
|
}
|
|
1812
1820
|
this.handleImageSelection();
|
|
@@ -1957,8 +1965,7 @@ const VviinnVpsWidget = class {
|
|
|
1957
1965
|
isResultSlide() {
|
|
1958
1966
|
return this.slidePosition === 1;
|
|
1959
1967
|
}
|
|
1960
|
-
handleImageSearchRedirect(searchId) {
|
|
1961
|
-
const url = resultsPageUrl.buildImageSearchRedirectUrl(this.resultsPageUrl, searchId, resultsPageUrl.parseResultsPageParamNames(this.resultsPageParams).searchId);
|
|
1968
|
+
handleImageSearchRedirect(url, searchId) {
|
|
1962
1969
|
const redirectData = Object.assign(Object.assign({}, this.getBasicEventData()), { url, source: "visual-search", searchId });
|
|
1963
1970
|
const event = this.vviinnRedirect.emit(redirectData);
|
|
1964
1971
|
if (!event.defaultPrevented) {
|
|
@@ -2140,31 +2147,31 @@ const VviinnVpsWidget = class {
|
|
|
2140
2147
|
}
|
|
2141
2148
|
render() {
|
|
2142
2149
|
var _a, _b, _c;
|
|
2143
|
-
return (index.h(index.Host, { key: '
|
|
2150
|
+
return (index.h(index.Host, { key: '0985a289b00fca5286466be2d4f33ef7d32c49cb', exportparts: `${index$3.modalParts}, ${index$3.productCardParts}, ${index$3.searchBarParts}, ${index$3.searchWidgetFilterParts}, ${index$3.searchWidgetButtonParts}, ${index$3.productCardsGridPart}, ${index$3.suggestionsParts}` }, openProductLink.renderExternalCSS(this.cssUrl), !this.showingInButton && index$2.SlotSkeleton("search"), index.h("vviinn-overlayed-modal", { key: '42c48cf9f6414ccd23705ad4a1ca2dcccf6aa65f', class: { "first-screen": this.isOnboardingSlide() }, isFirstScreen: this.isOnboardingSlide(), active: this.active, resetState: this.resetState, onVviinnWidgetClose: ({ detail }) => {
|
|
2144
2151
|
if (detail.campaignTypeId !== "VPR")
|
|
2145
2152
|
this.handleModalClose();
|
|
2146
2153
|
}, buttonElementId: (_a = this.buttonElementId) !== null && _a !== void 0 ? _a : this.widgetElementId, widgetVersion: search_store.version, hideBackButton: this.mode === "upload" ||
|
|
2147
|
-
(!this.isCameraEnabled && this.isOnboardingSlide()) }, index.h("vviinn-slider", { key: '
|
|
2154
|
+
(!this.isCameraEnabled && this.isOnboardingSlide()) }, index.h("vviinn-slider", { key: '399dac9c2c005efad3c3506dd84f7bcf9c550eaf', position: this.slidePosition }, index.h("vviinn-slide", { key: '832f2287e46f4edaeade004325106fecbdb3e618', class: {
|
|
2148
2155
|
"start-page": true,
|
|
2149
2156
|
"camera-enabled": this.isCameraEnabled,
|
|
2150
|
-
} }, index.h("vviinn-camera", { key: '
|
|
2157
|
+
} }, index.h("vviinn-camera", { key: 'fee0491b5660c7f4c61796bfc647edf6c1121ed6', token: this.token, onVviinnImageUploadFinished: ({ detail }) => this.handleVviinnImageUploadFinished(detail), onVviinnImageUploadStarted: () => {
|
|
2151
2158
|
this.handleVviinnImageUpload("startCamera");
|
|
2152
|
-
}, apiPath: this.apiPath, basicEventData: this.getBasicEventData(), srcObject: this.stream, cameraButtonClicked: this.isCameraButtonClicked, exampleImageSource: this.exampleImageSource, showInWidget: this.showInWidget, storeName: this.storeName, state: this.state }), index.h("div", { key: '
|
|
2159
|
+
}, apiPath: this.apiPath, basicEventData: this.getBasicEventData(), srcObject: this.stream, cameraButtonClicked: this.isCameraButtonClicked, exampleImageSource: this.exampleImageSource, showInWidget: this.showInWidget, storeName: this.storeName, state: this.state }), index.h("div", { key: 'f5e463f64ac999e3b7bded376a0f12406ad3869d', class: {
|
|
2153
2160
|
error: this.haveErrors(),
|
|
2154
|
-
}, id: "start-page_block" }, index.h("div", { key: '
|
|
2155
|
-
this.state.searchStatus === "error") && (index.h("div", { key: '
|
|
2161
|
+
}, id: "start-page_block" }, index.h("div", { key: '155a80658288afe387d77f1140819fa72134a42e', class: "start-page_main-content" }, (this.wrongImageFormat ||
|
|
2162
|
+
this.state.searchStatus === "error") && (index.h("div", { key: '3c948759b2b3b264008d814d8c711cba759f0042', class: "start-page_errors-block" }, this.getCurrentErrorType() && (index.h("vviinn-error", { key: '6ded7b63230680c53893a571100ad63787db36e8', errorType: this.getCurrentErrorType(), handler: this.resetState, hasBackground: true, searchType: this.state.searchType })))), !this.haveErrors() && (index.h(index.Fragment, { key: '14c56d10d2df3af3f32b37aa10bc687bc4a52617' }, index.h("vviinn-teaser", { key: '99092cc741e26cb2f1101fa4bb5ff219017c7be9' }), index.h("div", { key: '77cf9e9e82a38e9fc9de074c3d02dda473d604ac', class: "buttons-group" }, this.renderButtons()), this.textSearchShow && !this.isResultSlide() && (index.h("vviinn-text-search", { key: '9393d8afb3ae1bbc3ed1d6f4f6461356dd3be912', token: this.token, apiPath: this.apiPath, locale: this.locale, showInWidget: this.showInWidget, showOnFirstScreen: true, uiSessionId: this.uiSessionId, basicEventData: this.getBasicEventData(true), resultsPageUrl: this.resultsPageUrl, autoSuggestShow: this.autoSuggestShow, "save-image-mode": "never" }))))), index.h("vviinn-privacy-badge", { key: '4c381e57c33d18a5736af7ad54a3512ba1ace512', privacyBadgeText: store.instance.t("privacyBadgeText", {
|
|
2156
2163
|
interpolation: { escapeValue: false },
|
|
2157
|
-
}), class: { invisible: this.haveErrors() } }))), index.h("vviinn-slide", { key: '
|
|
2164
|
+
}), class: { invisible: this.haveErrors() } }))), index.h("vviinn-slide", { key: 'c3f7ea7984ce33f702153878f378be802adb8258', class: {
|
|
2158
2165
|
"results-page": true,
|
|
2159
2166
|
active: this.isResultSlide(),
|
|
2160
|
-
} }, this.isResultSlide() && (index.h("div", { key: '
|
|
2167
|
+
} }, this.isResultSlide() && (index.h("div", { key: 'cd8ec6519b09395d2b4926301bfeec3dc91d2ac6', class: "source-wrapper" }, this.isTextSearch() && (index.h("vviinn-text-search", { key: '96e71f8fb6f1c682f872e76f2b9dd5616d767934', token: this.token, showInWidget: this.showInWidget, apiPath: this.apiPath, locale: this.locale, uiSessionId: this.uiSessionId, basicEventData: this.getBasicEventData(true), resultsPageUrl: this.resultsPageUrl, autoSuggestShow: this.autoSuggestShow, "save-image-mode": "never" })), !this.isTextSearch() && (index.h("vviinn-cropper", { key: '4aabf6d68425e50b277c15c881c40bea2e4d38b1', token: this.token, basicEventData: this.getBasicEventData(), showAspectRatioError: this.showAspectRatioError, apiPath: this.apiPath, showInWidget: this.showInWidget, "save-image-mode": "never" })), index.h("vviinn-suggestions", { key: 'ca8f970dbd2f3b1824f80feb7477b3d34b8b5ed1', showInWidget: this.showInWidget, token: this.token, apiPath: this.apiPath, locale: this.locale }), index.h("vviinn-selected-filters", { key: '44ff0a2c8dea93a3b5c2cd593b34dc20a4b115b4', locale: this.locale, currencySign: this.currencySign, showInWidget: this.showInWidget, exportparts: index$3.filtersParts }), ((_b = this.state.dynamicFilters) === null || _b === void 0 ? void 0 : _b.length) > 0 && (index.h("div", { key: 'dbf0b1c1a240f60931b1b75d8b76806e071f359f', class: {
|
|
2161
2168
|
"filters-wrapper": true,
|
|
2162
2169
|
hidden: this.showAspectRatioError,
|
|
2163
|
-
} }, index.h("vviinn-filters", { key: '
|
|
2170
|
+
} }, index.h("vviinn-filters", { key: '801f6aab643da44e564f062fddeb14811eca70bd', showInWidget: this.showInWidget, showIntervalInputs: this.showIntervalInputs }), index.h("vviinn-extended-filters", { key: '36a32875a0532cbf7148720df7a743bb0159e51e', mode: "preview", showHeader: false, showInWidget: this.showInWidget, locale: this.locale, currencySign: this.currencySign, showIntervalInputs: this.showIntervalInputs }), index.h("vviinn-extended-filters-button", { key: '148bf202a89af93e8cd88a612d585d0849a3d7de', class: {
|
|
2164
2171
|
"extended-filters-button": true,
|
|
2165
2172
|
"has-primary-filters": this.state.dynamicFilters.filter((f) => f.isPrimary)
|
|
2166
2173
|
.length > 0,
|
|
2167
|
-
}, showInWidget: this.showInWidget }))))), this.isResultSlide() && (index.h(index.Fragment, { key: '
|
|
2174
|
+
}, showInWidget: this.showInWidget }))))), this.isResultSlide() && (index.h(index.Fragment, { key: '263743fba6b324f47a1fae12648995bdef73aa25' }, index.h("vviinn-results", { key: '977140130b3b8dafaac6ae428c2b9f013de37d00', token: this.token, locale: this.locale, numberLocale: this.numberLocale, pricePrefix: this.pricePrefix, "currency-sign": this.currencySign, apiPath: this.apiPath, campaignIdTextSearch: this.campaignIdTextSearch, campaignIdVisualSearch: this.campaignIdVisualSearch, uiSessionId: this.uiSessionId, widgetElementId: (_c = this.buttonElementId) !== null && _c !== void 0 ? _c : this.widgetElementId, showInWidget: this.showInWidget, buttonElementId: this.buttonElementId, imageResolutionWidth: this.imageResolutionWidth, showMultipleImages: this.showMultipleImages, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, addToBasketShow: this.addToBasketShow, favoriteShow: this.favoriteShow, showAspectRatioError: this.showAspectRatioError, resetWidgetState: this.resetState, replaceSlotsContentInWidget: this.replaceSlotsContent.bind(this), replaceSlotsContentInButton: this.replaceSlotsContentInButton, addPriceContainer: this.addPriceContainer, oneClickDiscoveryMode: this.oneClickDiscoveryMode, oneClickDiscoveryCampaigns: this.oneClickDiscoveryCampaigns, parentSlots: [...this.parentSlots, ...this.slots], scrollableModalBody: this.modalBody }))))), index.h("vviinn-extended-filters", { key: '24d12faff2641fd61a4d13d7303734f1770120b2', class: "modal-extended-filters", mode: "modal", exportparts: index$3.extendedFiltersParts, showInWidget: this.showInWidget, locale: this.locale, currencySign: this.currencySign, showIntervalInputs: this.showIntervalInputs }))));
|
|
2168
2175
|
}
|
|
2169
2176
|
get el() { return index.getElement(this); }
|
|
2170
2177
|
static get watchers() { return {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D38ORu31.js');
|
|
4
|
-
var search_store = require('./search.store-
|
|
4
|
+
var search_store = require('./search.store-CEC5R32_.js');
|
|
5
5
|
var Rectangle = require('./Rectangle-7dF6_xf3.js');
|
|
6
6
|
var store = require('./store-jPZ4ROqV.js');
|
|
7
|
-
var index$1 = require('./index-
|
|
7
|
+
var index$1 = require('./index-C2IFqNzB.js');
|
|
8
8
|
var constants = require('./constants-BlwqMvns.js');
|
|
9
9
|
var index$2 = require('./index-CBteD3gC.js');
|
|
10
10
|
var index$3 = require('./index-CvMi8_tX.js');
|
|
@@ -4,7 +4,7 @@ var index = require('./index-D38ORu31.js');
|
|
|
4
4
|
var Rectangle = require('./Rectangle-7dF6_xf3.js');
|
|
5
5
|
var cropperUtils = require('./cropperUtils-DCDOLeBS.js');
|
|
6
6
|
var swiperElement = require('./swiper-element-DjtzojCR.js');
|
|
7
|
-
var search_store = require('./search.store-
|
|
7
|
+
var search_store = require('./search.store-CEC5R32_.js');
|
|
8
8
|
var SecondaryActionIcon = require('./SecondaryActionIcon-Ng84u7-b.js');
|
|
9
9
|
var index$1 = require('./index-CvMi8_tX.js');
|
|
10
10
|
var store = require('./store-jPZ4ROqV.js');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D38ORu31.js');
|
|
4
4
|
var Rectangle = require('./Rectangle-7dF6_xf3.js');
|
|
5
|
-
var search_store = require('./search.store-
|
|
5
|
+
var search_store = require('./search.store-CEC5R32_.js');
|
|
6
6
|
var index$2 = require('./index-CBteD3gC.js');
|
|
7
7
|
var store = require('./store-jPZ4ROqV.js');
|
|
8
8
|
var index$1 = require('./index-CvMi8_tX.js');
|
|
@@ -405,7 +405,7 @@ const VviinnTextSearch = class {
|
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
render() {
|
|
408
|
-
return (index.h(index.Host, { key: '
|
|
408
|
+
return (index.h(index.Host, { key: 'a97f9685f46a30ca9ab12396ee1aa01482731370', exportparts: `${index$1.searchBarParts}, ${index$1.searchModalFirstScreenParts}` }, index.h("div", { key: '384e2cc006c0c66b2e50d56631beb538cbaa4f07', class: "text-search-container", part: "text-search-container" }, index.h("input", Object.assign({ key: '5e571ee58eab698531946a19c5e92fb970340d33', class: "text-search-input", part: "text-search-input", type: "text", placeholder: this.getPlaceholderText(), value: this.state.textSearchQuery || "", onInput: (event) => this.handleInputChange(event), onKeyDown: this.handleKeyDown, onBlur: this.autoSuggestShow ? this.hideSuggestions : undefined }, (this.autoSuggestShow && {
|
|
409
409
|
role: "combobox",
|
|
410
410
|
"aria-autocomplete": "list",
|
|
411
411
|
"aria-expanded": this.autoSuggestCompletions.length > 0 &&
|
|
@@ -416,11 +416,11 @@ const VviinnTextSearch = class {
|
|
|
416
416
|
"aria-activedescendant": this.activeSuggestionIndex >= 0
|
|
417
417
|
? `suggestion-${this.activeSuggestionIndex}`
|
|
418
418
|
: undefined,
|
|
419
|
-
}))), this.mode === "extended" && (index.h("vviinn-vps-button", Object.assign({ key: '
|
|
419
|
+
}))), this.mode === "extended" && (index.h("vviinn-vps-button", Object.assign({ key: 'a92908b647b3f07546bfa3e3a15f7306374cd59d', token: this.token, locale: this.locale, apiPath: this.apiPath, addStyle: false, showResultsInModal: false, resultsPageUrl: this.resultsPageUrl, resultsPageParams: this.resultsPageParams }, (this.exampleImageSource && {
|
|
420
420
|
exampleImageSource: this.exampleImageSource,
|
|
421
|
-
}), (this.cssUrl != null && { cssUrl: this.cssUrl }), (this.visualSearchMode && { mode: this.visualSearchMode }), { parentSlots: this.slots }))), this.mode === "basic" && (index.h("slot", { key: '
|
|
422
|
-
this.recognition && (index.h("button", { key: '
|
|
423
|
-
renderSuggestions(this.autoSuggestCompletions, this.state.textSearchQuery, this.activeSuggestionIndex, this.selectSuggestion), this.showTooltip && (index.h("p", { key: '
|
|
421
|
+
}), (this.cssUrl != null && { cssUrl: this.cssUrl }), (this.visualSearchMode && { mode: this.visualSearchMode }), { parentSlots: this.slots }))), this.mode === "basic" && (index.h("slot", { key: '06e20a8744dea22ee8bd51d5a1e37b5e29b0b7f4', name: "vviinn-text-search-actions" })), (this.mode === "extended" || this.showInWidget) &&
|
|
422
|
+
this.recognition && (index.h("button", { key: '1ab2f0acb7137c36231a542234a717e34430474f', class: "speech-button", part: "speech-button", "aria-label": store.instance.t("a11y.speechButton"), onClick: this.handleSpeech, onKeyDown: (event) => this.handleButtonKeyDown(event, this.handleSpeech) }, index.h(MicIcon, { key: 'eb97b29086e9e5ad18b1ff6ac9637b760ae2c83a' }), this.isShowRecording() && (index.h("span", { key: 'dc8cecbb91eaa4a5195727b50919022898630a23', class: "recording-indicator" })))), index.h("button", { key: 'ebd39b8d86ab47cd4fadda6a5ad30c8001bd8c5a', class: "text-search-button", part: "text-search-button", onClick: () => this.handleTextSearch(), onKeyDown: (event) => this.handleButtonKeyDown(event, this.handleTextSearch), disabled: this.state.searchStatus === "loading", "aria-label": store.instance.t("a11y.textSearchButton") }, this.isShowPreloader() ? (index.h("vviinn-preloader", null)) : (index.h("slot", { name: "vviinn-text-search-icon" }, index.h(TextSearchIcon, null))))), this.autoSuggestShow &&
|
|
423
|
+
renderSuggestions(this.autoSuggestCompletions, this.state.textSearchQuery, this.activeSuggestionIndex, this.selectSuggestion), this.showTooltip && (index.h("p", { key: 'd59b3a49c6bda6b2992e3b0aa7bffb4ef674d3b6', class: "text-search-tooltip", part: "text-search-tooltip" }, store.instance.t(this.tooltipText)))));
|
|
424
424
|
}
|
|
425
425
|
get el() { return index.getElement(this); }
|
|
426
426
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const ResultsTemplate = (args) => {
|
|
2
|
-
const { token, apiPath, searchId, imageResolutionWidth, showMultipleImages, currencySign, locale, numberLocale, productDetailsRedirect, productDetailsNewTab, uiSessionId, resultsCount, filterColumn, filterValue, textSearchQuery, addToBasketShow, oneClickDiscoveryMode, addPriceContainer, pricePrefix, campaignIdTextSearch, campaignIdVisualSearch, oneClickDiscoveryCampaigns, cssUrl, } = args;
|
|
2
|
+
const { token, apiPath, searchId, imageResolutionWidth, showMultipleImages, currencySign, locale, numberLocale, productDetailsRedirect, productDetailsNewTab, uiSessionId, resultsCount, filterColumn, filterValue, textSearchQuery, addToBasketShow, oneClickDiscoveryMode, addPriceContainer, pricePrefix, campaignIdTextSearch, campaignIdVisualSearch, oneClickDiscoveryCampaigns, cssUrl, resultsPageUrl, resultsPageParams, } = args;
|
|
3
3
|
const filterAttributes = filterColumn && filterValue
|
|
4
4
|
? `filter-column="${filterColumn}" filter-value="${filterValue}"`
|
|
5
5
|
: "";
|
|
@@ -41,6 +41,8 @@ export const ResultsTemplate = (args) => {
|
|
|
41
41
|
campaign-id-text-search="${campaignIdTextSearch}"
|
|
42
42
|
campaign-id-visual-search="${campaignIdVisualSearch}"
|
|
43
43
|
css-url="${cssUrl}"
|
|
44
|
+
results-page-url="${resultsPageUrl}"
|
|
45
|
+
results-page-params="${resultsPageParams}"
|
|
44
46
|
></vviinn-results>
|
|
45
47
|
</div>
|
|
46
48
|
</div>`;
|
|
@@ -267,7 +267,7 @@ export class VviinnTextSearch {
|
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
render() {
|
|
270
|
-
return (h(Host, { key: '
|
|
270
|
+
return (h(Host, { key: 'a97f9685f46a30ca9ab12396ee1aa01482731370', exportparts: `${searchBarParts}, ${searchModalFirstScreenParts}` }, h("div", { key: '384e2cc006c0c66b2e50d56631beb538cbaa4f07', class: "text-search-container", part: "text-search-container" }, h("input", Object.assign({ key: '5e571ee58eab698531946a19c5e92fb970340d33', class: "text-search-input", part: "text-search-input", type: "text", placeholder: this.getPlaceholderText(), value: this.state.textSearchQuery || "", onInput: (event) => this.handleInputChange(event), onKeyDown: this.handleKeyDown, onBlur: this.autoSuggestShow ? this.hideSuggestions : undefined }, (this.autoSuggestShow && {
|
|
271
271
|
role: "combobox",
|
|
272
272
|
"aria-autocomplete": "list",
|
|
273
273
|
"aria-expanded": this.autoSuggestCompletions.length > 0 &&
|
|
@@ -278,11 +278,11 @@ export class VviinnTextSearch {
|
|
|
278
278
|
"aria-activedescendant": this.activeSuggestionIndex >= 0
|
|
279
279
|
? `suggestion-${this.activeSuggestionIndex}`
|
|
280
280
|
: undefined,
|
|
281
|
-
}))), this.mode === "extended" && (h("vviinn-vps-button", Object.assign({ key: '
|
|
281
|
+
}))), this.mode === "extended" && (h("vviinn-vps-button", Object.assign({ key: 'a92908b647b3f07546bfa3e3a15f7306374cd59d', token: this.token, locale: this.locale, apiPath: this.apiPath, addStyle: false, showResultsInModal: false, resultsPageUrl: this.resultsPageUrl, resultsPageParams: this.resultsPageParams }, (this.exampleImageSource && {
|
|
282
282
|
exampleImageSource: this.exampleImageSource,
|
|
283
|
-
}), (this.cssUrl != null && { cssUrl: this.cssUrl }), (this.visualSearchMode && { mode: this.visualSearchMode }), { parentSlots: this.slots }))), this.mode === "basic" && (h("slot", { key: '
|
|
284
|
-
this.recognition && (h("button", { key: '
|
|
285
|
-
renderSuggestions(this.autoSuggestCompletions, this.state.textSearchQuery, this.activeSuggestionIndex, this.selectSuggestion), this.showTooltip && (h("p", { key: '
|
|
283
|
+
}), (this.cssUrl != null && { cssUrl: this.cssUrl }), (this.visualSearchMode && { mode: this.visualSearchMode }), { parentSlots: this.slots }))), this.mode === "basic" && (h("slot", { key: '06e20a8744dea22ee8bd51d5a1e37b5e29b0b7f4', name: "vviinn-text-search-actions" })), (this.mode === "extended" || this.showInWidget) &&
|
|
284
|
+
this.recognition && (h("button", { key: '1ab2f0acb7137c36231a542234a717e34430474f', class: "speech-button", part: "speech-button", "aria-label": i18next.t("a11y.speechButton"), onClick: this.handleSpeech, onKeyDown: (event) => this.handleButtonKeyDown(event, this.handleSpeech) }, h(MicIcon, { key: 'eb97b29086e9e5ad18b1ff6ac9637b760ae2c83a' }), this.isShowRecording() && (h("span", { key: 'dc8cecbb91eaa4a5195727b50919022898630a23', class: "recording-indicator" })))), h("button", { key: 'ebd39b8d86ab47cd4fadda6a5ad30c8001bd8c5a', class: "text-search-button", part: "text-search-button", onClick: () => this.handleTextSearch(), onKeyDown: (event) => this.handleButtonKeyDown(event, this.handleTextSearch), disabled: this.state.searchStatus === "loading", "aria-label": i18next.t("a11y.textSearchButton") }, this.isShowPreloader() ? (h("vviinn-preloader", null)) : (h("slot", { name: "vviinn-text-search-icon" }, h(TextSearchIcon, null))))), this.autoSuggestShow &&
|
|
285
|
+
renderSuggestions(this.autoSuggestCompletions, this.state.textSearchQuery, this.activeSuggestionIndex, this.selectSuggestion), this.showTooltip && (h("p", { key: 'd59b3a49c6bda6b2992e3b0aa7bffb4ef674d3b6', class: "text-search-tooltip", part: "text-search-tooltip" }, i18next.t(this.tooltipText)))));
|
|
286
286
|
}
|
|
287
287
|
static get is() { return "vviinn-text-search"; }
|
|
288
288
|
static get encapsulation() { return "shadow"; }
|
|
@@ -173,11 +173,19 @@ export class VviinnVpsWidget {
|
|
|
173
173
|
this.uploadSource = uploadSource;
|
|
174
174
|
};
|
|
175
175
|
this.handleVviinnImageUploadFinished = (detail) => {
|
|
176
|
+
const visualSearchRedirect = this.state.redirect;
|
|
177
|
+
const hasVisualSearchRedirect = !!(visualSearchRedirect === null || visualSearchRedirect === void 0 ? void 0 : visualSearchRedirect.url) &&
|
|
178
|
+
visualSearchRedirect.searchId === detail.searchId;
|
|
179
|
+
if (hasVisualSearchRedirect) {
|
|
180
|
+
this.handleImageSearchRedirect(visualSearchRedirect.url, detail.searchId);
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
176
183
|
const shouldRedirectToResultsPage = this.resultsPageUrl &&
|
|
177
184
|
!this.showInWidget &&
|
|
178
185
|
!isOnResultsPage(this.resultsPageUrl);
|
|
179
186
|
if (shouldRedirectToResultsPage) {
|
|
180
|
-
this.
|
|
187
|
+
const url = buildImageSearchRedirectUrl(this.resultsPageUrl, detail.searchId, parseResultsPageParamNames(this.resultsPageParams).searchId);
|
|
188
|
+
this.handleImageSearchRedirect(url, detail.searchId);
|
|
181
189
|
return;
|
|
182
190
|
}
|
|
183
191
|
this.handleImageSelection();
|
|
@@ -328,8 +336,7 @@ export class VviinnVpsWidget {
|
|
|
328
336
|
isResultSlide() {
|
|
329
337
|
return this.slidePosition === 1;
|
|
330
338
|
}
|
|
331
|
-
handleImageSearchRedirect(searchId) {
|
|
332
|
-
const url = buildImageSearchRedirectUrl(this.resultsPageUrl, searchId, parseResultsPageParamNames(this.resultsPageParams).searchId);
|
|
339
|
+
handleImageSearchRedirect(url, searchId) {
|
|
333
340
|
const redirectData = Object.assign(Object.assign({}, this.getBasicEventData()), { url, source: "visual-search", searchId });
|
|
334
341
|
const event = this.vviinnRedirect.emit(redirectData);
|
|
335
342
|
if (!event.defaultPrevented) {
|
|
@@ -511,31 +518,31 @@ export class VviinnVpsWidget {
|
|
|
511
518
|
}
|
|
512
519
|
render() {
|
|
513
520
|
var _a, _b, _c;
|
|
514
|
-
return (h(Host, { key: '
|
|
521
|
+
return (h(Host, { key: '0985a289b00fca5286466be2d4f33ef7d32c49cb', exportparts: `${modalParts}, ${productCardParts}, ${searchBarParts}, ${searchWidgetFilterParts}, ${searchWidgetButtonParts}, ${productCardsGridPart}, ${suggestionsParts}` }, renderExternalCSS(this.cssUrl), !this.showingInButton && SlotSkeleton("search"), h("vviinn-overlayed-modal", { key: '42c48cf9f6414ccd23705ad4a1ca2dcccf6aa65f', class: { "first-screen": this.isOnboardingSlide() }, isFirstScreen: this.isOnboardingSlide(), active: this.active, resetState: this.resetState, onVviinnWidgetClose: ({ detail }) => {
|
|
515
522
|
if (detail.campaignTypeId !== "VPR")
|
|
516
523
|
this.handleModalClose();
|
|
517
524
|
}, buttonElementId: (_a = this.buttonElementId) !== null && _a !== void 0 ? _a : this.widgetElementId, widgetVersion: version, hideBackButton: this.mode === "upload" ||
|
|
518
|
-
(!this.isCameraEnabled && this.isOnboardingSlide()) }, h("vviinn-slider", { key: '
|
|
525
|
+
(!this.isCameraEnabled && this.isOnboardingSlide()) }, h("vviinn-slider", { key: '399dac9c2c005efad3c3506dd84f7bcf9c550eaf', position: this.slidePosition }, h("vviinn-slide", { key: '832f2287e46f4edaeade004325106fecbdb3e618', class: {
|
|
519
526
|
"start-page": true,
|
|
520
527
|
"camera-enabled": this.isCameraEnabled,
|
|
521
|
-
} }, h("vviinn-camera", { key: '
|
|
528
|
+
} }, h("vviinn-camera", { key: 'fee0491b5660c7f4c61796bfc647edf6c1121ed6', token: this.token, onVviinnImageUploadFinished: ({ detail }) => this.handleVviinnImageUploadFinished(detail), onVviinnImageUploadStarted: () => {
|
|
522
529
|
this.handleVviinnImageUpload("startCamera");
|
|
523
|
-
}, apiPath: this.apiPath, basicEventData: this.getBasicEventData(), srcObject: this.stream, cameraButtonClicked: this.isCameraButtonClicked, exampleImageSource: this.exampleImageSource, showInWidget: this.showInWidget, storeName: this.storeName, state: this.state }), h("div", { key: '
|
|
530
|
+
}, apiPath: this.apiPath, basicEventData: this.getBasicEventData(), srcObject: this.stream, cameraButtonClicked: this.isCameraButtonClicked, exampleImageSource: this.exampleImageSource, showInWidget: this.showInWidget, storeName: this.storeName, state: this.state }), h("div", { key: 'f5e463f64ac999e3b7bded376a0f12406ad3869d', class: {
|
|
524
531
|
error: this.haveErrors(),
|
|
525
|
-
}, id: "start-page_block" }, h("div", { key: '
|
|
526
|
-
this.state.searchStatus === "error") && (h("div", { key: '
|
|
532
|
+
}, id: "start-page_block" }, h("div", { key: '155a80658288afe387d77f1140819fa72134a42e', class: "start-page_main-content" }, (this.wrongImageFormat ||
|
|
533
|
+
this.state.searchStatus === "error") && (h("div", { key: '3c948759b2b3b264008d814d8c711cba759f0042', class: "start-page_errors-block" }, this.getCurrentErrorType() && (h("vviinn-error", { key: '6ded7b63230680c53893a571100ad63787db36e8', errorType: this.getCurrentErrorType(), handler: this.resetState, hasBackground: true, searchType: this.state.searchType })))), !this.haveErrors() && (h(Fragment, { key: '14c56d10d2df3af3f32b37aa10bc687bc4a52617' }, h("vviinn-teaser", { key: '99092cc741e26cb2f1101fa4bb5ff219017c7be9' }), h("div", { key: '77cf9e9e82a38e9fc9de074c3d02dda473d604ac', class: "buttons-group" }, this.renderButtons()), this.textSearchShow && !this.isResultSlide() && (h("vviinn-text-search", { key: '9393d8afb3ae1bbc3ed1d6f4f6461356dd3be912', token: this.token, apiPath: this.apiPath, locale: this.locale, showInWidget: this.showInWidget, showOnFirstScreen: true, uiSessionId: this.uiSessionId, basicEventData: this.getBasicEventData(true), resultsPageUrl: this.resultsPageUrl, autoSuggestShow: this.autoSuggestShow, "save-image-mode": "never" }))))), h("vviinn-privacy-badge", { key: '4c381e57c33d18a5736af7ad54a3512ba1ace512', privacyBadgeText: i18next.t("privacyBadgeText", {
|
|
527
534
|
interpolation: { escapeValue: false },
|
|
528
|
-
}), class: { invisible: this.haveErrors() } }))), h("vviinn-slide", { key: '
|
|
535
|
+
}), class: { invisible: this.haveErrors() } }))), h("vviinn-slide", { key: 'c3f7ea7984ce33f702153878f378be802adb8258', class: {
|
|
529
536
|
"results-page": true,
|
|
530
537
|
active: this.isResultSlide(),
|
|
531
|
-
} }, this.isResultSlide() && (h("div", { key: '
|
|
538
|
+
} }, this.isResultSlide() && (h("div", { key: 'cd8ec6519b09395d2b4926301bfeec3dc91d2ac6', class: "source-wrapper" }, this.isTextSearch() && (h("vviinn-text-search", { key: '96e71f8fb6f1c682f872e76f2b9dd5616d767934', token: this.token, showInWidget: this.showInWidget, apiPath: this.apiPath, locale: this.locale, uiSessionId: this.uiSessionId, basicEventData: this.getBasicEventData(true), resultsPageUrl: this.resultsPageUrl, autoSuggestShow: this.autoSuggestShow, "save-image-mode": "never" })), !this.isTextSearch() && (h("vviinn-cropper", { key: '4aabf6d68425e50b277c15c881c40bea2e4d38b1', token: this.token, basicEventData: this.getBasicEventData(), showAspectRatioError: this.showAspectRatioError, apiPath: this.apiPath, showInWidget: this.showInWidget, "save-image-mode": "never" })), h("vviinn-suggestions", { key: 'ca8f970dbd2f3b1824f80feb7477b3d34b8b5ed1', showInWidget: this.showInWidget, token: this.token, apiPath: this.apiPath, locale: this.locale }), h("vviinn-selected-filters", { key: '44ff0a2c8dea93a3b5c2cd593b34dc20a4b115b4', locale: this.locale, currencySign: this.currencySign, showInWidget: this.showInWidget, exportparts: filtersParts }), ((_b = this.state.dynamicFilters) === null || _b === void 0 ? void 0 : _b.length) > 0 && (h("div", { key: 'dbf0b1c1a240f60931b1b75d8b76806e071f359f', class: {
|
|
532
539
|
"filters-wrapper": true,
|
|
533
540
|
hidden: this.showAspectRatioError,
|
|
534
|
-
} }, h("vviinn-filters", { key: '
|
|
541
|
+
} }, h("vviinn-filters", { key: '801f6aab643da44e564f062fddeb14811eca70bd', showInWidget: this.showInWidget, showIntervalInputs: this.showIntervalInputs }), h("vviinn-extended-filters", { key: '36a32875a0532cbf7148720df7a743bb0159e51e', mode: "preview", showHeader: false, showInWidget: this.showInWidget, locale: this.locale, currencySign: this.currencySign, showIntervalInputs: this.showIntervalInputs }), h("vviinn-extended-filters-button", { key: '148bf202a89af93e8cd88a612d585d0849a3d7de', class: {
|
|
535
542
|
"extended-filters-button": true,
|
|
536
543
|
"has-primary-filters": this.state.dynamicFilters.filter((f) => f.isPrimary)
|
|
537
544
|
.length > 0,
|
|
538
|
-
}, showInWidget: this.showInWidget }))))), this.isResultSlide() && (h(Fragment, { key: '
|
|
545
|
+
}, showInWidget: this.showInWidget }))))), this.isResultSlide() && (h(Fragment, { key: '263743fba6b324f47a1fae12648995bdef73aa25' }, h("vviinn-results", { key: '977140130b3b8dafaac6ae428c2b9f013de37d00', token: this.token, locale: this.locale, numberLocale: this.numberLocale, pricePrefix: this.pricePrefix, "currency-sign": this.currencySign, apiPath: this.apiPath, campaignIdTextSearch: this.campaignIdTextSearch, campaignIdVisualSearch: this.campaignIdVisualSearch, uiSessionId: this.uiSessionId, widgetElementId: (_c = this.buttonElementId) !== null && _c !== void 0 ? _c : this.widgetElementId, showInWidget: this.showInWidget, buttonElementId: this.buttonElementId, imageResolutionWidth: this.imageResolutionWidth, showMultipleImages: this.showMultipleImages, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, addToBasketShow: this.addToBasketShow, favoriteShow: this.favoriteShow, showAspectRatioError: this.showAspectRatioError, resetWidgetState: this.resetState, replaceSlotsContentInWidget: this.replaceSlotsContent.bind(this), replaceSlotsContentInButton: this.replaceSlotsContentInButton, addPriceContainer: this.addPriceContainer, oneClickDiscoveryMode: this.oneClickDiscoveryMode, oneClickDiscoveryCampaigns: this.oneClickDiscoveryCampaigns, parentSlots: [...this.parentSlots, ...this.slots], scrollableModalBody: this.modalBody }))))), h("vviinn-extended-filters", { key: '24d12faff2641fd61a4d13d7303734f1770120b2', class: "modal-extended-filters", mode: "modal", exportparts: extendedFiltersParts, showInWidget: this.showInWidget, locale: this.locale, currencySign: this.currencySign, showIntervalInputs: this.showIntervalInputs }))));
|
|
539
546
|
}
|
|
540
547
|
static get is() { return "vviinn-vps-widget"; }
|
|
541
548
|
static get encapsulation() { return "shadow"; }
|
|
@@ -121,6 +121,8 @@ const updateVisualSearchState = (store, isHiResUpdate = false) => async (respons
|
|
|
121
121
|
state.visualSearchId = response.requestId;
|
|
122
122
|
state.results = response.data.products;
|
|
123
123
|
state.dynamicFilters = dynamicFilters;
|
|
124
|
+
state.redirect = response.interactions.redirect
|
|
125
|
+
? Object.assign(Object.assign({}, response.interactions.redirect), { searchId: response.requestId }) : null;
|
|
124
126
|
const extractedFilters = extractSelectedFilters(dynamicFilters);
|
|
125
127
|
if (state.requestFilters.length === 0 && extractedFilters.length > 0) {
|
|
126
128
|
state.requestFilters = extractedFilters;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from './index-RkvPN2Rk.js';
|
|
2
|
-
import { j as addIfNotEmpty, p as parseStringToExcluded, o as isValueMatch, q as isIntervalMatch, r as valueToString, t as extractFilterValue } from './search.store-
|
|
2
|
+
import { j as addIfNotEmpty, p as parseStringToExcluded, o as isValueMatch, q as isIntervalMatch, r as valueToString, t as extractFilterValue } from './search.store-ClFXu6V6.js';
|
|
3
3
|
import { i as instance } from './store-BJxQCbNV.js';
|
|
4
4
|
|
|
5
5
|
const PlusIcon = () => (h("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "plus-icon", "aria-hidden": "true" },
|
|
@@ -8591,7 +8591,7 @@ const encodeToBase64UTF8 = (str) => {
|
|
|
8591
8591
|
return btoa(String.fromCharCode.apply(null, utf8Array));
|
|
8592
8592
|
};
|
|
8593
8593
|
|
|
8594
|
-
const version = "2.
|
|
8594
|
+
const version = "2.218.0";
|
|
8595
8595
|
|
|
8596
8596
|
const appStateGlobalDefaults = {
|
|
8597
8597
|
excluded: null,
|
|
@@ -8698,6 +8698,8 @@ const updateVisualSearchState = (store, isHiResUpdate = false) => async (respons
|
|
|
8698
8698
|
state.visualSearchId = response.requestId;
|
|
8699
8699
|
state.results = response.data.products;
|
|
8700
8700
|
state.dynamicFilters = dynamicFilters;
|
|
8701
|
+
state.redirect = response.interactions.redirect
|
|
8702
|
+
? Object.assign(Object.assign({}, response.interactions.redirect), { searchId: response.requestId }) : null;
|
|
8701
8703
|
const extractedFilters = extractSelectedFilters(dynamicFilters);
|
|
8702
8704
|
if (state.requestFilters.length === 0 && extractedFilters.length > 0) {
|
|
8703
8705
|
state.requestFilters = extractedFilters;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, r as registerInstance, H as Host, c as createEvent, g as getElement, F as Fragment } from './index-RkvPN2Rk.js';
|
|
2
2
|
import { i as instance } from './store-BJxQCbNV.js';
|
|
3
|
-
import { l as getAcceptableFileFormatsForDisplay, h as campaignTypeNames, j as addIfNotEmpty, n as searchState, u as useSearchStore, v as version } from './search.store-
|
|
3
|
+
import { l as getAcceptableFileFormatsForDisplay, h as campaignTypeNames, j as addIfNotEmpty, n as searchState, u as useSearchStore, v as version } from './search.store-ClFXu6V6.js';
|
|
4
4
|
import { s as slotChangeListener, a as addEventListenersWithSignal } from './index-OsoUj2Au.js';
|
|
5
5
|
import { S as SecondaryActionIcon } from './SecondaryActionIcon-FWFzrhba.js';
|
|
6
6
|
import { m as modalParts, c as carouselParts, p as productCardParts, r as recommendationsParts, i as initializeLocale } from './index-BtnjaTty.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement, F as Fragment } from './index-RkvPN2Rk.js';
|
|
2
2
|
import { _ as _functionExports, E as EitherExports, f as fold, b as fromImage, a as divideOnSized, e as isLeft, m as match, O as OptionExports } from './Rectangle-dmgo4KMB.js';
|
|
3
|
-
import { w as toFile, c as makeUploadFileRequest, x as getImageSizes, v as version, h as campaignTypeNames, j as addIfNotEmpty, m as makeVisualSearchRequest, u as useSearchStore, y as checkImageType, g as getAcceptableFileFormats, d as setTextSearchQuery, z as resetStore, k as makeTextSearchRequest, A as makeProductListingPageRequest, B as checkDeviceType, p as parseStringToExcluded } from './search.store-
|
|
3
|
+
import { w as toFile, c as makeUploadFileRequest, x as getImageSizes, v as version, h as campaignTypeNames, j as addIfNotEmpty, m as makeVisualSearchRequest, u as useSearchStore, y as checkImageType, g as getAcceptableFileFormats, d as setTextSearchQuery, z as resetStore, k as makeTextSearchRequest, A as makeProductListingPageRequest, B as checkDeviceType, p as parseStringToExcluded } from './search.store-ClFXu6V6.js';
|
|
4
4
|
import { s as slotChangeListener, a as addEventListenersWithSignal, p as productCardSlotNames, v as vprIconSlotName, f as findSlotElements, g as getSlotNames, b as setElementInteractivity, S as SlotSkeleton } from './index-OsoUj2Au.js';
|
|
5
|
-
import { g as getRemoveFilterAriaLabel, F as FilterIconClose, P as PlusIcon, R as RESULTS_CALCULATED_COLUMNS_CSS_VAR, c as createWidgetEvent, a as createFilterEvent, v as v4, b as createAddToBasketEvent, d as createAddToWishlistEvent, e as createResultEventByType, f as createProductEventByType, h as getCustomLabels, t as triggerFilter, i as triggerRemoveIntervalFilter, j as announceToScreenReader, s as syncRequestFilters, k as isSubFilterActive, l as RenderFilterButton, m as getIntervalLabel, n as createImageSearchEvent } from './index-
|
|
5
|
+
import { g as getRemoveFilterAriaLabel, F as FilterIconClose, P as PlusIcon, R as RESULTS_CALCULATED_COLUMNS_CSS_VAR, c as createWidgetEvent, a as createFilterEvent, v as v4, b as createAddToBasketEvent, d as createAddToWishlistEvent, e as createResultEventByType, f as createProductEventByType, h as getCustomLabels, t as triggerFilter, i as triggerRemoveIntervalFilter, j as announceToScreenReader, s as syncRequestFilters, k as isSubFilterActive, l as RenderFilterButton, m as getIntervalLabel, n as createImageSearchEvent } from './index-DT_CMr4r.js';
|
|
6
6
|
import { i as instance, t as trackEvent, a as isTrackingEnabled, d as defaultConfig } from './store-BJxQCbNV.js';
|
|
7
7
|
import { M as MIN_SEARCH_AREA_SIZE, S as SUPPORTED_ASPECT_RATIO, a as MIN_IMAGE_SIDE_FOR_CROPPER, C as Cropper, c as cropperOptions, g as getCropBoxData, i as isCropBoxChangeMinimal, D as DEFAULT_IMAGE_SIZE } from './cropperUtils-CkB6bG3L.js';
|
|
8
8
|
import { r as renderExternalCSS, o as openProductLink } from './openProductLink-CJ9Wo3Ye.js';
|
|
@@ -1800,11 +1800,19 @@ const VviinnVpsWidget = class {
|
|
|
1800
1800
|
this.uploadSource = uploadSource;
|
|
1801
1801
|
};
|
|
1802
1802
|
this.handleVviinnImageUploadFinished = (detail) => {
|
|
1803
|
+
const visualSearchRedirect = this.state.redirect;
|
|
1804
|
+
const hasVisualSearchRedirect = !!(visualSearchRedirect === null || visualSearchRedirect === void 0 ? void 0 : visualSearchRedirect.url) &&
|
|
1805
|
+
visualSearchRedirect.searchId === detail.searchId;
|
|
1806
|
+
if (hasVisualSearchRedirect) {
|
|
1807
|
+
this.handleImageSearchRedirect(visualSearchRedirect.url, detail.searchId);
|
|
1808
|
+
return;
|
|
1809
|
+
}
|
|
1803
1810
|
const shouldRedirectToResultsPage = this.resultsPageUrl &&
|
|
1804
1811
|
!this.showInWidget &&
|
|
1805
1812
|
!isOnResultsPage(this.resultsPageUrl);
|
|
1806
1813
|
if (shouldRedirectToResultsPage) {
|
|
1807
|
-
this.
|
|
1814
|
+
const url = buildImageSearchRedirectUrl(this.resultsPageUrl, detail.searchId, parseResultsPageParamNames(this.resultsPageParams).searchId);
|
|
1815
|
+
this.handleImageSearchRedirect(url, detail.searchId);
|
|
1808
1816
|
return;
|
|
1809
1817
|
}
|
|
1810
1818
|
this.handleImageSelection();
|
|
@@ -1955,8 +1963,7 @@ const VviinnVpsWidget = class {
|
|
|
1955
1963
|
isResultSlide() {
|
|
1956
1964
|
return this.slidePosition === 1;
|
|
1957
1965
|
}
|
|
1958
|
-
handleImageSearchRedirect(searchId) {
|
|
1959
|
-
const url = buildImageSearchRedirectUrl(this.resultsPageUrl, searchId, parseResultsPageParamNames(this.resultsPageParams).searchId);
|
|
1966
|
+
handleImageSearchRedirect(url, searchId) {
|
|
1960
1967
|
const redirectData = Object.assign(Object.assign({}, this.getBasicEventData()), { url, source: "visual-search", searchId });
|
|
1961
1968
|
const event = this.vviinnRedirect.emit(redirectData);
|
|
1962
1969
|
if (!event.defaultPrevented) {
|
|
@@ -2138,31 +2145,31 @@ const VviinnVpsWidget = class {
|
|
|
2138
2145
|
}
|
|
2139
2146
|
render() {
|
|
2140
2147
|
var _a, _b, _c;
|
|
2141
|
-
return (h(Host, { key: '
|
|
2148
|
+
return (h(Host, { key: '0985a289b00fca5286466be2d4f33ef7d32c49cb', exportparts: `${modalParts}, ${productCardParts}, ${searchBarParts}, ${searchWidgetFilterParts}, ${searchWidgetButtonParts}, ${productCardsGridPart}, ${suggestionsParts}` }, renderExternalCSS(this.cssUrl), !this.showingInButton && SlotSkeleton("search"), h("vviinn-overlayed-modal", { key: '42c48cf9f6414ccd23705ad4a1ca2dcccf6aa65f', class: { "first-screen": this.isOnboardingSlide() }, isFirstScreen: this.isOnboardingSlide(), active: this.active, resetState: this.resetState, onVviinnWidgetClose: ({ detail }) => {
|
|
2142
2149
|
if (detail.campaignTypeId !== "VPR")
|
|
2143
2150
|
this.handleModalClose();
|
|
2144
2151
|
}, buttonElementId: (_a = this.buttonElementId) !== null && _a !== void 0 ? _a : this.widgetElementId, widgetVersion: version, hideBackButton: this.mode === "upload" ||
|
|
2145
|
-
(!this.isCameraEnabled && this.isOnboardingSlide()) }, h("vviinn-slider", { key: '
|
|
2152
|
+
(!this.isCameraEnabled && this.isOnboardingSlide()) }, h("vviinn-slider", { key: '399dac9c2c005efad3c3506dd84f7bcf9c550eaf', position: this.slidePosition }, h("vviinn-slide", { key: '832f2287e46f4edaeade004325106fecbdb3e618', class: {
|
|
2146
2153
|
"start-page": true,
|
|
2147
2154
|
"camera-enabled": this.isCameraEnabled,
|
|
2148
|
-
} }, h("vviinn-camera", { key: '
|
|
2155
|
+
} }, h("vviinn-camera", { key: 'fee0491b5660c7f4c61796bfc647edf6c1121ed6', token: this.token, onVviinnImageUploadFinished: ({ detail }) => this.handleVviinnImageUploadFinished(detail), onVviinnImageUploadStarted: () => {
|
|
2149
2156
|
this.handleVviinnImageUpload("startCamera");
|
|
2150
|
-
}, apiPath: this.apiPath, basicEventData: this.getBasicEventData(), srcObject: this.stream, cameraButtonClicked: this.isCameraButtonClicked, exampleImageSource: this.exampleImageSource, showInWidget: this.showInWidget, storeName: this.storeName, state: this.state }), h("div", { key: '
|
|
2157
|
+
}, apiPath: this.apiPath, basicEventData: this.getBasicEventData(), srcObject: this.stream, cameraButtonClicked: this.isCameraButtonClicked, exampleImageSource: this.exampleImageSource, showInWidget: this.showInWidget, storeName: this.storeName, state: this.state }), h("div", { key: 'f5e463f64ac999e3b7bded376a0f12406ad3869d', class: {
|
|
2151
2158
|
error: this.haveErrors(),
|
|
2152
|
-
}, id: "start-page_block" }, h("div", { key: '
|
|
2153
|
-
this.state.searchStatus === "error") && (h("div", { key: '
|
|
2159
|
+
}, id: "start-page_block" }, h("div", { key: '155a80658288afe387d77f1140819fa72134a42e', class: "start-page_main-content" }, (this.wrongImageFormat ||
|
|
2160
|
+
this.state.searchStatus === "error") && (h("div", { key: '3c948759b2b3b264008d814d8c711cba759f0042', class: "start-page_errors-block" }, this.getCurrentErrorType() && (h("vviinn-error", { key: '6ded7b63230680c53893a571100ad63787db36e8', errorType: this.getCurrentErrorType(), handler: this.resetState, hasBackground: true, searchType: this.state.searchType })))), !this.haveErrors() && (h(Fragment, { key: '14c56d10d2df3af3f32b37aa10bc687bc4a52617' }, h("vviinn-teaser", { key: '99092cc741e26cb2f1101fa4bb5ff219017c7be9' }), h("div", { key: '77cf9e9e82a38e9fc9de074c3d02dda473d604ac', class: "buttons-group" }, this.renderButtons()), this.textSearchShow && !this.isResultSlide() && (h("vviinn-text-search", { key: '9393d8afb3ae1bbc3ed1d6f4f6461356dd3be912', token: this.token, apiPath: this.apiPath, locale: this.locale, showInWidget: this.showInWidget, showOnFirstScreen: true, uiSessionId: this.uiSessionId, basicEventData: this.getBasicEventData(true), resultsPageUrl: this.resultsPageUrl, autoSuggestShow: this.autoSuggestShow, "save-image-mode": "never" }))))), h("vviinn-privacy-badge", { key: '4c381e57c33d18a5736af7ad54a3512ba1ace512', privacyBadgeText: instance.t("privacyBadgeText", {
|
|
2154
2161
|
interpolation: { escapeValue: false },
|
|
2155
|
-
}), class: { invisible: this.haveErrors() } }))), h("vviinn-slide", { key: '
|
|
2162
|
+
}), class: { invisible: this.haveErrors() } }))), h("vviinn-slide", { key: 'c3f7ea7984ce33f702153878f378be802adb8258', class: {
|
|
2156
2163
|
"results-page": true,
|
|
2157
2164
|
active: this.isResultSlide(),
|
|
2158
|
-
} }, this.isResultSlide() && (h("div", { key: '
|
|
2165
|
+
} }, this.isResultSlide() && (h("div", { key: 'cd8ec6519b09395d2b4926301bfeec3dc91d2ac6', class: "source-wrapper" }, this.isTextSearch() && (h("vviinn-text-search", { key: '96e71f8fb6f1c682f872e76f2b9dd5616d767934', token: this.token, showInWidget: this.showInWidget, apiPath: this.apiPath, locale: this.locale, uiSessionId: this.uiSessionId, basicEventData: this.getBasicEventData(true), resultsPageUrl: this.resultsPageUrl, autoSuggestShow: this.autoSuggestShow, "save-image-mode": "never" })), !this.isTextSearch() && (h("vviinn-cropper", { key: '4aabf6d68425e50b277c15c881c40bea2e4d38b1', token: this.token, basicEventData: this.getBasicEventData(), showAspectRatioError: this.showAspectRatioError, apiPath: this.apiPath, showInWidget: this.showInWidget, "save-image-mode": "never" })), h("vviinn-suggestions", { key: 'ca8f970dbd2f3b1824f80feb7477b3d34b8b5ed1', showInWidget: this.showInWidget, token: this.token, apiPath: this.apiPath, locale: this.locale }), h("vviinn-selected-filters", { key: '44ff0a2c8dea93a3b5c2cd593b34dc20a4b115b4', locale: this.locale, currencySign: this.currencySign, showInWidget: this.showInWidget, exportparts: filtersParts }), ((_b = this.state.dynamicFilters) === null || _b === void 0 ? void 0 : _b.length) > 0 && (h("div", { key: 'dbf0b1c1a240f60931b1b75d8b76806e071f359f', class: {
|
|
2159
2166
|
"filters-wrapper": true,
|
|
2160
2167
|
hidden: this.showAspectRatioError,
|
|
2161
|
-
} }, h("vviinn-filters", { key: '
|
|
2168
|
+
} }, h("vviinn-filters", { key: '801f6aab643da44e564f062fddeb14811eca70bd', showInWidget: this.showInWidget, showIntervalInputs: this.showIntervalInputs }), h("vviinn-extended-filters", { key: '36a32875a0532cbf7148720df7a743bb0159e51e', mode: "preview", showHeader: false, showInWidget: this.showInWidget, locale: this.locale, currencySign: this.currencySign, showIntervalInputs: this.showIntervalInputs }), h("vviinn-extended-filters-button", { key: '148bf202a89af93e8cd88a612d585d0849a3d7de', class: {
|
|
2162
2169
|
"extended-filters-button": true,
|
|
2163
2170
|
"has-primary-filters": this.state.dynamicFilters.filter((f) => f.isPrimary)
|
|
2164
2171
|
.length > 0,
|
|
2165
|
-
}, showInWidget: this.showInWidget }))))), this.isResultSlide() && (h(Fragment, { key: '
|
|
2172
|
+
}, showInWidget: this.showInWidget }))))), this.isResultSlide() && (h(Fragment, { key: '263743fba6b324f47a1fae12648995bdef73aa25' }, h("vviinn-results", { key: '977140130b3b8dafaac6ae428c2b9f013de37d00', token: this.token, locale: this.locale, numberLocale: this.numberLocale, pricePrefix: this.pricePrefix, "currency-sign": this.currencySign, apiPath: this.apiPath, campaignIdTextSearch: this.campaignIdTextSearch, campaignIdVisualSearch: this.campaignIdVisualSearch, uiSessionId: this.uiSessionId, widgetElementId: (_c = this.buttonElementId) !== null && _c !== void 0 ? _c : this.widgetElementId, showInWidget: this.showInWidget, buttonElementId: this.buttonElementId, imageResolutionWidth: this.imageResolutionWidth, showMultipleImages: this.showMultipleImages, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, addToBasketShow: this.addToBasketShow, favoriteShow: this.favoriteShow, showAspectRatioError: this.showAspectRatioError, resetWidgetState: this.resetState, replaceSlotsContentInWidget: this.replaceSlotsContent.bind(this), replaceSlotsContentInButton: this.replaceSlotsContentInButton, addPriceContainer: this.addPriceContainer, oneClickDiscoveryMode: this.oneClickDiscoveryMode, oneClickDiscoveryCampaigns: this.oneClickDiscoveryCampaigns, parentSlots: [...this.parentSlots, ...this.slots], scrollableModalBody: this.modalBody }))))), h("vviinn-extended-filters", { key: '24d12faff2641fd61a4d13d7303734f1770120b2', class: "modal-extended-filters", mode: "modal", exportparts: extendedFiltersParts, showInWidget: this.showInWidget, locale: this.locale, currencySign: this.currencySign, showIntervalInputs: this.showIntervalInputs }))));
|
|
2166
2173
|
}
|
|
2167
2174
|
get el() { return getElement(this); }
|
|
2168
2175
|
static get watchers() { return {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, f as forceUpdate, F as Fragment, H as Host, g as getElement } from './index-RkvPN2Rk.js';
|
|
2
|
-
import { h as campaignTypeNames, j as addIfNotEmpty, _ as _ArrayExports, u as useSearchStore, C as isMobile, D as fromString, E as fold, v as version } from './search.store-
|
|
2
|
+
import { h as campaignTypeNames, j as addIfNotEmpty, _ as _ArrayExports, u as useSearchStore, C as isMobile, D as fromString, E as fold, v as version } from './search.store-ClFXu6V6.js';
|
|
3
3
|
import { X as has, Y as tuple, _ as _functionExports, g as requireSemigroup, O as OptionExports, v as pipe$1, N as chainW, Z as makeRequest, L as fromEither, $ as resolveApiPath, a0 as createInitPostRequest, a1 as Apply, a2 as TaskEitherExports, E as EitherExports } from './Rectangle-dmgo4KMB.js';
|
|
4
4
|
import { i as instance, d as defaultConfig, t as trackEvent, a as isTrackingEnabled } from './store-BJxQCbNV.js';
|
|
5
|
-
import { S as SET_MODE_IMAGE_WIDTH_CSS_VAR, C as CONTENT_GROUP_CSS_CLASS, o as CAROUSEL_IMAGE_WIDTH_CSS_VAR, p as CAROUSEL_CONTENT_WIDTH_CSS_VAR, R as RESULTS_CALCULATED_COLUMNS_CSS_VAR, q as CAROUSEL_COLUMNS_CSS_VAR, D as DEFAULT_COLUMNS_NUMBER, h as getCustomLabels, r as SCROLL_POSITION_TOLERANCE, u as triggerResetFilters, t as triggerFilter, j as announceToScreenReader, m as getIntervalLabel, w as isPriceFilter, k as isSubFilterActive, l as RenderFilterButton, s as syncRequestFilters, P as PlusIcon, x as CUSTOM_LABELS_DELIMITER, v as v4, c as createWidgetEvent, e as createResultEventByType, b as createAddToBasketEvent, d as createAddToWishlistEvent, f as createProductEventByType, y as getRecommendationsBody } from './index-
|
|
5
|
+
import { S as SET_MODE_IMAGE_WIDTH_CSS_VAR, C as CONTENT_GROUP_CSS_CLASS, o as CAROUSEL_IMAGE_WIDTH_CSS_VAR, p as CAROUSEL_CONTENT_WIDTH_CSS_VAR, R as RESULTS_CALCULATED_COLUMNS_CSS_VAR, q as CAROUSEL_COLUMNS_CSS_VAR, D as DEFAULT_COLUMNS_NUMBER, h as getCustomLabels, r as SCROLL_POSITION_TOLERANCE, u as triggerResetFilters, t as triggerFilter, j as announceToScreenReader, m as getIntervalLabel, w as isPriceFilter, k as isSubFilterActive, l as RenderFilterButton, s as syncRequestFilters, P as PlusIcon, x as CUSTOM_LABELS_DELIMITER, v as v4, c as createWidgetEvent, e as createResultEventByType, b as createAddToBasketEvent, d as createAddToWishlistEvent, f as createProductEventByType, y as getRecommendationsBody } from './index-DT_CMr4r.js';
|
|
6
6
|
import { P as PRODUCT_CARD_IMAGE_WIDTH, D as DISCOVERY_WIDGET_IMAGE_RESOLUTION_WIDTH, c as PRODUCT_CARD_IMAGE_RESOLUTION_WIDTH } from './constants-rqiiCPBX.js';
|
|
7
7
|
import { s as slotChangeListener, a as addEventListenersWithSignal, i as isElementInSelector, S as SlotSkeleton } from './index-OsoUj2Au.js';
|
|
8
8
|
import { o as energyLabelParts, i as initializeLocale, j as extendedFiltersParts, h as filtersParts, q as imageParts, e as contentCardParts, l as listCardParts, p as productCardParts, t as priceRangeParts } from './index-BtnjaTty.js';
|
|
@@ -2,7 +2,7 @@ import { h, r as registerInstance, c as createEvent, H as Host, g as getElement
|
|
|
2
2
|
import { a as divideOnSized, E as EitherExports } from './Rectangle-dmgo4KMB.js';
|
|
3
3
|
import { C as Cropper, c as cropperOptions, g as getCropBoxData, i as isCropBoxChangeMinimal } from './cropperUtils-CkB6bG3L.js';
|
|
4
4
|
import { g as getSwiperStyles, c as configureSwiperElement, r as register, e as extractSlideIndex, s as setupIntersectionObserver } from './swiper-element-Er2KrWw1.js';
|
|
5
|
-
import { i as isDesktop$1, s as shopTheLookState, m as makeVisualSearchRequest, a as makeVisualSearchByUrlRequest, b as imageFromFileTask, c as makeUploadFileRequest, g as getAcceptableFileFormats } from './search.store-
|
|
5
|
+
import { i as isDesktop$1, s as shopTheLookState, m as makeVisualSearchRequest, a as makeVisualSearchByUrlRequest, b as imageFromFileTask, c as makeUploadFileRequest, g as getAcceptableFileFormats } from './search.store-ClFXu6V6.js';
|
|
6
6
|
import { S as SecondaryActionIcon } from './SecondaryActionIcon-FWFzrhba.js';
|
|
7
7
|
import { i as initializeLocale, a as shopTheLookParts } from './index-BtnjaTty.js';
|
|
8
8
|
import { d as defaultConfig } from './store-BJxQCbNV.js';
|