vviinn-widgets 2.52.4 → 2.53.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/loader.cjs.js +1 -1
- package/dist/cjs/{package-b26ae1d9.js → package-d35af1fc.js} +1 -1
- package/dist/cjs/{resources-ade00c5f.js → resources-2da68245.js} +1 -1
- package/dist/cjs/search-filters_17.cjs.entry.js +101 -46
- package/dist/cjs/{search.store-0e899c7f.js → search.store-09c35811.js} +14 -9
- package/dist/cjs/vviinn-carousel_4.cjs.entry.js +14 -14
- package/dist/cjs/vviinn-preloader.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +34 -23
- package/dist/cjs/vviinn-widgets.cjs.js +1 -1
- package/dist/collection/analytics/GAnalytics.js +11 -11
- package/dist/collection/components/image-search/search-filters/search-filters.css +8 -8
- package/dist/collection/components/image-search/search-filters/search-filters.js +133 -28
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.js +1 -1
- package/dist/collection/components/vviinn-text-search/vviinn-text-search.js +32 -56
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +35 -43
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +35 -24
- package/dist/collection/interfaces/generated.js +1 -0
- package/dist/collection/interfaces/search.js +1 -0
- package/dist/collection/searchSession/searchSession.js +1 -1
- package/dist/collection/store/search.store.js +13 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-3ce7cddb.js → package-8b025882.js} +1 -1
- package/dist/esm/{resources-75e3c60e.js → resources-5780b6da.js} +1 -1
- package/dist/esm/search-filters_17.entry.js +101 -46
- package/dist/esm/{search.store-d789660d.js → search.store-18569060.js} +15 -10
- package/dist/esm/vviinn-carousel_4.entry.js +14 -14
- package/dist/esm/vviinn-preloader.entry.js +1 -1
- package/dist/esm/vviinn-vpr-button.entry.js +1 -1
- package/dist/esm/vviinn-vps-button.entry.js +1 -1
- package/dist/esm/vviinn-vps-widget.entry.js +35 -24
- package/dist/esm/vviinn-widgets.js +1 -1
- package/dist/types/analytics/GAnalytics.d.ts +8 -8
- package/dist/types/analytics/GtagAnalytics.d.ts +3 -3
- package/dist/types/components/image-search/search-filters/search-filters.d.ts +7 -1
- package/dist/types/components/vviinn-text-search/vviinn-text-search.d.ts +2 -6
- package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +7 -3
- package/dist/types/components.d.ts +11 -10
- package/dist/types/interfaces/generated.d.ts +890 -0
- package/dist/types/interfaces/search.d.ts +8 -0
- package/dist/types/recommendation/recommendation.d.ts +2 -2
- package/dist/types/searchSession/searchSession.d.ts +6 -15
- package/dist/types/store/search.store.d.ts +38 -2
- package/dist/vviinn-widgets/{p-3d26c6da.js → p-61369032.js} +1 -1
- package/dist/vviinn-widgets/{p-ff05b6ab.entry.js → p-92db9749.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-9782020a.entry.js → p-9ad0bef9.entry.js} +1 -1
- package/dist/vviinn-widgets/p-dade07bc.entry.js +1 -0
- package/dist/vviinn-widgets/p-db9cac0c.js +1 -0
- package/dist/vviinn-widgets/{p-44c0cb31.entry.js → p-ec6fcf93.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-505cebc8.entry.js → p-fa419441.entry.js} +1 -1
- package/{www/build/p-e593395f.entry.js → dist/vviinn-widgets/p-fa882b98.entry.js} +2 -2
- package/dist/vviinn-widgets/{p-75a253fb.js → p-fa9ae162.js} +1 -1
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +3 -3
- package/www/build/{p-3d26c6da.js → p-61369032.js} +1 -1
- package/www/build/{p-ff05b6ab.entry.js → p-92db9749.entry.js} +1 -1
- package/www/build/{p-9782020a.entry.js → p-9ad0bef9.entry.js} +1 -1
- package/www/build/p-dade07bc.entry.js +1 -0
- package/www/build/p-db9cac0c.js +1 -0
- package/www/build/{p-44c0cb31.entry.js → p-ec6fcf93.entry.js} +1 -1
- package/www/build/{p-505cebc8.entry.js → p-fa419441.entry.js} +1 -1
- package/{dist/vviinn-widgets/p-e593395f.entry.js → www/build/p-fa882b98.entry.js} +2 -2
- package/www/build/{p-75a253fb.js → p-fa9ae162.js} +1 -1
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/dist/vviinn-widgets/p-0bbb6584.js +0 -1
- package/dist/vviinn-widgets/p-1cce910f.entry.js +0 -1
- package/www/build/p-0bbb6584.js +0 -1
- package/www/build/p-1cce910f.entry.js +0 -1
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"]}]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-carousel_4.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"],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"closed":[4],"opened":[4],"recommendations":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32],"updatingAllCards":[32],"updatedCardsAmount":[32]},[[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnAddToBasket","trackAddToBasket"],[0,"vviinnUpdatingAllCardsFinished","updatingAllCardsFinishedListener"]]],[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":[1040],"widgetVersion":[1,"widget-version"],"addToBasketShow":[4,"add-to-basket-show"],"updatingAllCards":[4,"updating-all-cards"],"updateButtonLocation":[1,"update-button-location"],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"locale":[1],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[32],"crossSellingRecommendations":[32],"setModeDiscount":[32],"setModeAppliedDiscounts":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"],[0,"vviinnAddToBasket","trackAddToBasket"]]],[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"],"mode":[1],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"appliedDiscountPercentage":[2,"applied-discount-percentage"],"currentDiscountPercentage":[2,"current-discount-percentage"],"isSourceProduct":[4,"is-source-product"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"index":[2],"updatingAllCards":[4,"updating-all-cards"],"defaultAnimationInterval":[2,"default-animation-interval"],"isTransitioning":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"]]],[1,"vviinn-skeleton",{"height":[2],"halfWidth":[4,"half-width"]}]]],["search-filters_17.cjs",[[1,"vviinn-image-view",{"basicEventData":[16],"setShowAspectRatioError":[16],"showAspectRatioError":[4,"show-aspect-ratio-error"],"cropper":[32],"hidePreloader":[32]},[[0,"vviinnSelectObject","selectDetectedObject"]]],[1,"vviinn-overlayed-modal",{"active":[4],"resetState":[16],"buttonElementId":[1,"button-element-id"],"hideBackButton":[4,"hide-back-button"],"widgetVersion":[1,"widget-version"],"isFirstScreen":[4,"is-first-screen"]}],[1,"vviinn-empty-results",{"handler":[16]}],[1,"vviinn-image-selector",{"basicEventData":[16],"startUpload":[4,"start-upload"],"loading":[4],"accept":[1],"resetVpsButton":[16],"capture":[1]}],[1,"vviinn-server-error",{"handler":[16]}],[1,"vviinn-text-search",{"
|
|
17
|
+
return index.bootstrapLazy([["vviinn-button.cjs",[[1,"vviinn-button",{"addStyle":[4,"add-style"]}]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-carousel_4.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"],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"closed":[4],"opened":[4],"recommendations":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32],"updatingAllCards":[32],"updatedCardsAmount":[32]},[[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnAddToBasket","trackAddToBasket"],[0,"vviinnUpdatingAllCardsFinished","updatingAllCardsFinishedListener"]]],[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":[1040],"widgetVersion":[1,"widget-version"],"addToBasketShow":[4,"add-to-basket-show"],"updatingAllCards":[4,"updating-all-cards"],"updateButtonLocation":[1,"update-button-location"],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"locale":[1],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[32],"crossSellingRecommendations":[32],"setModeDiscount":[32],"setModeAppliedDiscounts":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"],[0,"vviinnAddToBasket","trackAddToBasket"]]],[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"],"mode":[1],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"appliedDiscountPercentage":[2,"applied-discount-percentage"],"currentDiscountPercentage":[2,"current-discount-percentage"],"isSourceProduct":[4,"is-source-product"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"index":[2],"updatingAllCards":[4,"updating-all-cards"],"defaultAnimationInterval":[2,"default-animation-interval"],"isTransitioning":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"]]],[1,"vviinn-skeleton",{"height":[2],"halfWidth":[4,"half-width"]}]]],["search-filters_17.cjs",[[1,"vviinn-image-view",{"basicEventData":[16],"setShowAspectRatioError":[16],"showAspectRatioError":[4,"show-aspect-ratio-error"],"cropper":[32],"hidePreloader":[32]},[[0,"vviinnSelectObject","selectDetectedObject"]]],[1,"vviinn-overlayed-modal",{"active":[4],"resetState":[16],"buttonElementId":[1,"button-element-id"],"hideBackButton":[4,"hide-back-button"],"widgetVersion":[1,"widget-version"],"isFirstScreen":[4,"is-first-screen"]}],[1,"vviinn-empty-results",{"handler":[16]}],[1,"vviinn-image-selector",{"basicEventData":[16],"startUpload":[4,"start-upload"],"loading":[4],"accept":[1],"resetVpsButton":[16],"capture":[1]}],[1,"vviinn-server-error",{"handler":[16]}],[1,"vviinn-text-search",{"searchQuery":[1,"search-query"],"setSearchQuery":[16],"handleTextSearch":[16]}],[1,"vviinn-wrong-aspect-ratio",{"handler":[16]}],[1,"vviinn-wrong-format",{"handler":[16]}],[1,"search-filters",{"filter":[16],"textSearchFiltersGroup":[16],"basicEventData":[16],"selectedFilter":[32],"hideFilters":[32]}],[1,"vviinn-example-image",{"exampleImageSource":[1,"example-image-source"],"width":[2],"height":[2],"basicEventData":[16],"srcObject":[16],"cameraButtonClicked":[4,"camera-button-clicked"],"selected":[32],"videoInitialized":[32],"zoomCapabilities":[32]}],[1,"vviinn-privacy-badge",{"privacyBadgeText":[1,"privacy-badge-text"]}],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32],"isRTL":[32]}],[1,"vviinn-teaser"],[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"],"isFirstScreen":[4,"is-first-screen"],"slider":[32]}],[1,"vviinn-overlay"]]],["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"],"imageResolutionWidth":[2,"image-resolution-width"],"exampleImageSource":[1,"example-image-source"],"textSearchShow":[4,"text-search-show"],"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],"stream":[32],"cameraInitializing":[32],"cameraEnabled":[32],"cameraButtonClicked":[32],"uploadSource":[32],"showAspectRatioError":[32],"products":[32],"searchQuery":[32]},[[0,"vviinnCameraEnabled","trackCameraEnabled"],[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnImageCrop","trachSearchAreaChanges"],[0,"vviinnSelectObject","trackDetectedObject"],[0,"vviinnSelectFilter","trackFilter"],[0,"vviinnTextSearchFilterSelected","trackTextSearchFilterSelected"]]]]],["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"],"imageResolutionWidth":[2,"image-resolution-width"],"exampleImageSource":[1,"example-image-source"],"textSearchShow":[4,"text-search-show"],"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"],"addToBasketShow":[4,"add-to-basket-show"],"buttonChildren":[16],"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"],"addToBasketShow":[4,"add-to-basket-show"],"apiPath":[1,"api-path"]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const search_store = require('./search.store-
|
|
3
|
+
const search_store = require('./search.store-09c35811.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
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-5619b5ec.js');
|
|
6
|
-
const search_store = require('./search.store-
|
|
6
|
+
const search_store = require('./search.store-09c35811.js');
|
|
7
7
|
const i18next = require('./i18next-74ff3413.js');
|
|
8
8
|
const customizedSlots = require('./customized-slots-d8565ce0.js');
|
|
9
9
|
const PlusIcon = require('./PlusIcon-5e585127.js');
|
|
@@ -73,15 +73,32 @@ const parseFilters = (filter, filterType) => {
|
|
|
73
73
|
return result[filterType];
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
-
const searchFiltersCss = ".filters{display:flex;flex-direction:row;overflow-x:auto;padding:0 12px
|
|
76
|
+
const searchFiltersCss = ".filters{display:flex;flex-direction:row;overflow-x:auto;padding:0 12px 6px 24px;padding-left:24px;padding-bottom:6px;scrollbar-width:thin}:host(:not(:first-child)) .filters{margin-top:6px}.filter{align-items:center;color:#525252;cursor:pointer;display:flex;margin-right:12px;height:-moz-max-content;height:max-content;min-width:-moz-max-content;min-width:max-content;transition-property:background;transition-duration:0.5s;transition-timing-function:ease-in-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:10px 12px}.show-more{display:flex}.show-more.hidden{display:none !important}.show-more::after{position:relative;content:url(\"data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 12.2l-6-6L3.2 5 8 9.8 12.8 5 14 6.2l-6 6z' fill='%23525252'/%3E%3C/svg%3E\");display:block;transform:rotate(-90deg);left:2px}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}@media (max-width: 640px){.no-scrollbar-mobile{-ms-overflow-style:none;scrollbar-width:none}.no-scrollbar-mobile::-webkit-scrollbar{display:none}}";
|
|
77
77
|
|
|
78
|
-
const FILTERS_COUNT =
|
|
78
|
+
const FILTERS_COUNT = 4;
|
|
79
79
|
const SearchFilters = class {
|
|
80
80
|
constructor(hostRef) {
|
|
81
81
|
index.registerInstance(this, hostRef);
|
|
82
82
|
this.vviinnSelectFilter = index.createEvent(this, "vviinnSelectFilter", 7);
|
|
83
|
-
this.
|
|
83
|
+
this.vviinnTextSearchFilterSelected = index.createEvent(this, "vviinnTextSearchFilterSelected", 7);
|
|
84
|
+
var _a, _b, _c;
|
|
85
|
+
this.filterType = (_b = (_a = this.filter) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : (_c = this.textSearchFiltersGroup) === null || _c === void 0 ? void 0 : _c.column;
|
|
86
|
+
this.getSelectedTextSearchFilters = () => search_store.searchState.textSearchFilters
|
|
87
|
+
.filter(({ values }) => values === null || values === void 0 ? void 0 : values.find(({ selected }) => selected))
|
|
88
|
+
.map(({ column, values }) => {
|
|
89
|
+
return {
|
|
90
|
+
column: column,
|
|
91
|
+
values: values.filter((v) => v.selected).map((v) => v.value),
|
|
92
|
+
};
|
|
93
|
+
});
|
|
94
|
+
this.getTextSearchFilterRequestValue = (filter) => {
|
|
95
|
+
return {
|
|
96
|
+
column: this.textSearchFiltersGroup.column,
|
|
97
|
+
values: [filter.value],
|
|
98
|
+
};
|
|
99
|
+
};
|
|
84
100
|
this.filter = null;
|
|
101
|
+
this.textSearchFiltersGroup = null;
|
|
85
102
|
this.basicEventData = undefined;
|
|
86
103
|
this.selectedFilter = "";
|
|
87
104
|
this.hideFilters = true;
|
|
@@ -122,36 +139,84 @@ const SearchFilters = class {
|
|
|
122
139
|
? this.selectedFilter === parseFilters(filterLink, "categories")
|
|
123
140
|
: this.selectedFilter === filterLink.name;
|
|
124
141
|
}
|
|
142
|
+
handleTextSearchEnter(ev, filter) {
|
|
143
|
+
if (ev.key !== "Enter")
|
|
144
|
+
return;
|
|
145
|
+
this.handleTextSearchFilterSelection(filter);
|
|
146
|
+
}
|
|
147
|
+
handleTextSearchFilterSelection(filter) {
|
|
148
|
+
let parsedFilters = [];
|
|
149
|
+
const selectedFilters = this.getSelectedTextSearchFilters();
|
|
150
|
+
const newFilter = this.getTextSearchFilterRequestValue(filter);
|
|
151
|
+
const isNewFilterSelected = filter.selected;
|
|
152
|
+
const isSameColumnSelected = selectedFilters.some(({ column }) => column === newFilter.column);
|
|
153
|
+
if (isNewFilterSelected) {
|
|
154
|
+
parsedFilters = selectedFilters.filter(({ column }) => {
|
|
155
|
+
return column !== newFilter.column;
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
else if (isSameColumnSelected) {
|
|
159
|
+
parsedFilters = selectedFilters.map((f) => {
|
|
160
|
+
return f.column === newFilter.column ? newFilter : f;
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
parsedFilters = [...selectedFilters, newFilter];
|
|
165
|
+
}
|
|
166
|
+
this.vviinnTextSearchFilterSelected.emit(parsedFilters);
|
|
167
|
+
}
|
|
125
168
|
render() {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
const
|
|
169
|
+
var _a, _b;
|
|
170
|
+
const textSearchFilters = ((_a = this.textSearchFiltersGroup) === null || _a === void 0 ? void 0 : _a.values) || [];
|
|
171
|
+
const filters = ((_b = this.filter) === null || _b === void 0 ? void 0 : _b.filters) || [];
|
|
129
172
|
return (index.h(index.Host, { exportparts: "filter, show-more-filters" }, index.h("div", { class: {
|
|
130
173
|
filters: true,
|
|
131
|
-
"no-scrollbar-mobile": this.isCategoriesFilterType()
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
filter
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
ev
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
174
|
+
"no-scrollbar-mobile": this.isCategoriesFilterType() ||
|
|
175
|
+
this.textSearchFiltersGroup !== null,
|
|
176
|
+
"no-scrollbar": !this.isCategoriesFilterType() &&
|
|
177
|
+
this.textSearchFiltersGroup === null,
|
|
178
|
+
} }, !!filters.length &&
|
|
179
|
+
filters
|
|
180
|
+
.filter((_, i) => (this.hideFilters ? i < FILTERS_COUNT : true))
|
|
181
|
+
.map((filter, index$1) => {
|
|
182
|
+
const filterActive = this.filter.name === "categories"
|
|
183
|
+
? this.selectedFilter === parseFilters(filter, "categories")
|
|
184
|
+
: this.selectedFilter === filter.name;
|
|
185
|
+
return (index.h("div", { role: "button", tabindex: "0", key: index$1, part: filterActive ? "filter active" : "filter", class: {
|
|
186
|
+
filter: true,
|
|
187
|
+
active: filterActive,
|
|
188
|
+
}, style: { "animation-delay": `${index$1 * 10}ms` }, onPointerUp: (ev) => {
|
|
189
|
+
if (search_store.searchState.loading)
|
|
190
|
+
return;
|
|
191
|
+
ev.stopPropagation();
|
|
192
|
+
this.handleFilterSelection(filter);
|
|
193
|
+
}, onKeyPress: (ev) => {
|
|
194
|
+
if (search_store.searchState.loading)
|
|
195
|
+
return;
|
|
196
|
+
this.handleEnter(ev, filter);
|
|
197
|
+
} }, filter.name));
|
|
198
|
+
}), !!textSearchFilters.length &&
|
|
199
|
+
textSearchFilters
|
|
200
|
+
.filter((_, i) => (this.hideFilters ? i < FILTERS_COUNT : true))
|
|
201
|
+
.map((filter, index$1) => {
|
|
202
|
+
const { label, selected } = filter;
|
|
203
|
+
return (index.h("div", { role: "button", tabindex: "0", key: index$1, part: selected ? "filter active" : "filter", class: {
|
|
204
|
+
filter: true,
|
|
205
|
+
active: selected,
|
|
206
|
+
}, style: { "animation-delay": `${index$1 * 10}ms` }, onPointerUp: (ev) => {
|
|
207
|
+
if (search_store.searchState.loading)
|
|
208
|
+
return;
|
|
209
|
+
ev.stopPropagation();
|
|
210
|
+
this.handleTextSearchFilterSelection(filter);
|
|
211
|
+
}, onKeyPress: (ev) => {
|
|
212
|
+
if (search_store.searchState.loading)
|
|
213
|
+
return;
|
|
214
|
+
this.handleTextSearchEnter(ev, filter);
|
|
215
|
+
} }, label));
|
|
216
|
+
}), this.hideFilters && (index.h("div", { class: {
|
|
153
217
|
"show-more": true,
|
|
154
|
-
hidden: filters.length <= FILTERS_COUNT
|
|
218
|
+
hidden: filters.length <= FILTERS_COUNT &&
|
|
219
|
+
textSearchFilters.length <= FILTERS_COUNT,
|
|
155
220
|
active: !this.hideFilters,
|
|
156
221
|
}, role: "button", tabindex: "0", "aria-role": "button", onClick: () => {
|
|
157
222
|
setTimeout(() => this.toggleFilters(), 300);
|
|
@@ -4067,33 +4132,23 @@ const vviinnTextSearchCss = ":host{display:block;position:relative;width:100%}.t
|
|
|
4067
4132
|
const VviinnTextSearch = class {
|
|
4068
4133
|
constructor(hostRef) {
|
|
4069
4134
|
index.registerInstance(this, hostRef);
|
|
4070
|
-
this.
|
|
4071
|
-
this.
|
|
4072
|
-
this.
|
|
4073
|
-
this.searchQuery = this.initialSearchQuery;
|
|
4135
|
+
this.searchQuery = undefined;
|
|
4136
|
+
this.setSearchQuery = undefined;
|
|
4137
|
+
this.handleTextSearch = undefined;
|
|
4074
4138
|
}
|
|
4075
4139
|
componentWillLoad() {
|
|
4076
4140
|
customizedSlots.slotChangeListener(this, this.el);
|
|
4077
4141
|
}
|
|
4078
4142
|
handleInputChange(event) {
|
|
4079
|
-
this.
|
|
4143
|
+
this.setSearchQuery(event.target.value);
|
|
4080
4144
|
}
|
|
4081
4145
|
handleKeyPress(event) {
|
|
4082
4146
|
if (event.key === "Enter") {
|
|
4083
|
-
this.
|
|
4084
|
-
}
|
|
4085
|
-
}
|
|
4086
|
-
async handleSearch() {
|
|
4087
|
-
if (!this.searchQuery)
|
|
4088
|
-
return;
|
|
4089
|
-
await search_store.processSelectedText(this.searchQuery);
|
|
4090
|
-
this.vviinnTextSearchFinished.emit(this.searchQuery);
|
|
4091
|
-
if (this.clearSearchQuery) {
|
|
4092
|
-
this.searchQuery = "";
|
|
4147
|
+
this.handleTextSearch();
|
|
4093
4148
|
}
|
|
4094
4149
|
}
|
|
4095
4150
|
render() {
|
|
4096
|
-
return (index.h(index.Host, { exportparts: "text-search-input" }, index.h("input", { class: "text-search-input", part: "text-search-input", type: "text", placeholder: i18next.instance.t("textSearchPlaceholder"), value: this.searchQuery, onInput: (event) => this.handleInputChange(event), onKeyUp: (event) => this.handleKeyPress(event) }), index.h("button", { class: "text-search-button", onClick: () => this.
|
|
4151
|
+
return (index.h(index.Host, { exportparts: "text-search-input" }, index.h("input", { class: "text-search-input", part: "text-search-input", type: "text", placeholder: i18next.instance.t("textSearchPlaceholder"), value: this.searchQuery, onInput: (event) => this.handleInputChange(event), onKeyUp: (event) => this.handleKeyPress(event) }), index.h("button", { class: "text-search-button", onClick: () => this.handleTextSearch(), disabled: search_store.searchState.loading }, search_store.searchState.loading && search_store.searchState.searchType === "text" ? (index.h("vviinn-preloader", null)) : (index.h("slot", { name: "vviinn-text-search-icon" }, index.h(TextSearchIcon, null))))));
|
|
4097
4152
|
}
|
|
4098
4153
|
get el() { return index.getElement(this); }
|
|
4099
4154
|
};
|
|
@@ -16508,7 +16508,7 @@ const imageSearchSessionClient = (initialData, campaignId, excludedFilters) => {
|
|
|
16508
16508
|
return _function.pipe(sequenceToEither(getApiPath(), createInitPostRequest), fromEither, chainW(makeRequest(requestUrl, initialData)));
|
|
16509
16509
|
};
|
|
16510
16510
|
const textSearchSessionClient = (initialData) => {
|
|
16511
|
-
const requestUrl = "
|
|
16511
|
+
const requestUrl = "text-search";
|
|
16512
16512
|
return _function.pipe(sequenceToEither(getApiPath(), createInitPostRequest), fromEither, chainW(makeRequest(requestUrl, initialData)));
|
|
16513
16513
|
};
|
|
16514
16514
|
|
|
@@ -17253,6 +17253,7 @@ const { state, onChange } = createStore({
|
|
|
17253
17253
|
excluded: "",
|
|
17254
17254
|
results: [],
|
|
17255
17255
|
filters: [],
|
|
17256
|
+
textSearchFilters: [],
|
|
17256
17257
|
cropperHandlers: [],
|
|
17257
17258
|
detectedObjects: [],
|
|
17258
17259
|
objectDetectionInProgress: false,
|
|
@@ -17328,20 +17329,26 @@ const uploadFile = (file) => {
|
|
|
17328
17329
|
return error;
|
|
17329
17330
|
}));
|
|
17330
17331
|
};
|
|
17331
|
-
const uploadText = (query) => {
|
|
17332
|
+
const uploadText = (query, filters) => {
|
|
17332
17333
|
state.searchType = "text";
|
|
17333
17334
|
state.loading = true;
|
|
17334
|
-
const body =
|
|
17335
|
+
const body = Object.assign(Object.assign({ query }, (filters
|
|
17336
|
+
? {
|
|
17337
|
+
filters,
|
|
17338
|
+
}
|
|
17339
|
+
: {})), (state.campaignId.length ? { campaign: state.campaignId } : {}));
|
|
17335
17340
|
const tokenWithBody = sequenceToEither(processBearerToken(state.token), right(body));
|
|
17336
17341
|
return pipe(tokenWithBody, map$4(([headers, body]) => {
|
|
17337
17342
|
headers.set("Content-Type", "application/json");
|
|
17338
17343
|
return {
|
|
17339
17344
|
headers,
|
|
17340
|
-
body,
|
|
17345
|
+
body: JSON.stringify(body),
|
|
17341
17346
|
};
|
|
17342
17347
|
}), fromEither, chain((request) => textSearchSessionClient(request)), map((sessionResponse) => {
|
|
17343
|
-
var _a, _b;
|
|
17344
|
-
state.results = (
|
|
17348
|
+
var _a, _b, _c;
|
|
17349
|
+
state.results = (_a = sessionResponse === null || sessionResponse === void 0 ? void 0 : sessionResponse.data.products) !== null && _a !== void 0 ? _a : [];
|
|
17350
|
+
state.textSearchFilters =
|
|
17351
|
+
(_c = (_b = sessionResponse === null || sessionResponse === void 0 ? void 0 : sessionResponse.data) === null || _b === void 0 ? void 0 : _b.interactions.filters) !== null && _c !== void 0 ? _c : [];
|
|
17345
17352
|
state.loading = false;
|
|
17346
17353
|
return sessionResponse;
|
|
17347
17354
|
}), mapLeft((error) => {
|
|
@@ -17350,9 +17357,7 @@ const uploadText = (query) => {
|
|
|
17350
17357
|
return error;
|
|
17351
17358
|
}));
|
|
17352
17359
|
};
|
|
17353
|
-
const processSelectedText = async (query) =>
|
|
17354
|
-
return await uploadText(query)();
|
|
17355
|
-
};
|
|
17360
|
+
const processSelectedText = async (query, filters) => await uploadText(query, filters)();
|
|
17356
17361
|
onChange("activeIonLink", async (newLink) => {
|
|
17357
17362
|
const link = newLink ? newLink : state.resetCategoryLink;
|
|
17358
17363
|
if (!link)
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-5619b5ec.js');
|
|
6
|
-
const search_store = require('./search.store-
|
|
6
|
+
const search_store = require('./search.store-09c35811.js');
|
|
7
7
|
const i18next = require('./i18next-74ff3413.js');
|
|
8
8
|
const PlusIcon = require('./PlusIcon-5e585127.js');
|
|
9
9
|
const customizedSlots = require('./customized-slots-d8565ce0.js');
|
|
10
|
-
const _package = require('./package-
|
|
11
|
-
const resources = require('./resources-
|
|
10
|
+
const _package = require('./package-d35af1fc.js');
|
|
11
|
+
const resources = require('./resources-2da68245.js');
|
|
12
12
|
|
|
13
13
|
const BasketIcon = () => (index.h("svg", { width: "25", height: "24", viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
14
14
|
index.h("path", { d: "M7.5 22C6.95 22 6.47917 21.8042 6.0875 21.4125C5.69583 21.0208 5.5 20.55 5.5 20C5.5 19.45 5.69583 18.9792 6.0875 18.5875C6.47917 18.1958 6.95 18 7.5 18C8.05 18 8.52083 18.1958 8.9125 18.5875C9.30417 18.9792 9.5 19.45 9.5 20C9.5 20.55 9.30417 21.0208 8.9125 21.4125C8.52083 21.8042 8.05 22 7.5 22ZM17.5 22C16.95 22 16.4792 21.8042 16.0875 21.4125C15.6958 21.0208 15.5 20.55 15.5 20C15.5 19.45 15.6958 18.9792 16.0875 18.5875C16.4792 18.1958 16.95 18 17.5 18C18.05 18 18.5208 18.1958 18.9125 18.5875C19.3042 18.9792 19.5 19.45 19.5 20C19.5 20.55 19.3042 21.0208 18.9125 21.4125C18.5208 21.8042 18.05 22 17.5 22ZM6.65 6L9.05 11H16.05L18.8 6H6.65ZM5.7 4H20.45C20.8333 4 21.125 4.17083 21.325 4.5125C21.525 4.85417 21.5333 5.2 21.35 5.55L17.8 11.95C17.6167 12.2833 17.3708 12.5417 17.0625 12.725C16.7542 12.9083 16.4167 13 16.05 13H8.6L7.5 15H18.5C18.7833 15 19.0208 15.0958 19.2125 15.2875C19.4042 15.4792 19.5 15.7167 19.5 16C19.5 16.2833 19.4042 16.5208 19.2125 16.7125C19.0208 16.9042 18.7833 17 18.5 17H7.5C6.75 17 6.18333 16.6708 5.8 16.0125C5.41667 15.3542 5.4 14.7 5.75 14.05L7.1 11.6L3.5 4H2.5C2.21667 4 1.97917 3.90417 1.7875 3.7125C1.59583 3.52083 1.5 3.28333 1.5 3C1.5 2.71667 1.59583 2.47917 1.7875 2.2875C1.97917 2.09583 2.21667 2 2.5 2H4.125C4.30833 2 4.48333 2.05 4.65 2.15C4.81667 2.25 4.94167 2.39167 5.025 2.575L5.7 4Z", fill: "#525252" })));
|
|
@@ -370,33 +370,33 @@ class GtagAnalytics {
|
|
|
370
370
|
|
|
371
371
|
class GAnalytics {
|
|
372
372
|
constructor() {
|
|
373
|
-
ga(
|
|
373
|
+
ga("require", "ec");
|
|
374
374
|
}
|
|
375
375
|
convertProduct(product) {
|
|
376
376
|
var _a, _b, _c;
|
|
377
377
|
return {
|
|
378
378
|
id: product.productId,
|
|
379
379
|
name: product.title,
|
|
380
|
-
brand: (_a = product.brand) !== null && _a !== void 0 ? _a :
|
|
381
|
-
category: (_b = product.productType) !== null && _b !== void 0 ? _b :
|
|
382
|
-
list:
|
|
383
|
-
price: Math.min(...[product.price.actual, (_c = product.price.sale) !== null && _c !== void 0 ? _c : Infinity])
|
|
380
|
+
brand: (_a = product.brand) !== null && _a !== void 0 ? _a : "",
|
|
381
|
+
category: (_b = product.productType) !== null && _b !== void 0 ? _b : "",
|
|
382
|
+
list: "VI VPR View",
|
|
383
|
+
price: Math.min(...[product.price.actual, (_c = product.price.sale) !== null && _c !== void 0 ? _c : Infinity]),
|
|
384
384
|
};
|
|
385
385
|
}
|
|
386
386
|
sendImpression(product) {
|
|
387
|
-
ga(
|
|
387
|
+
ga("ec:addImpression", this.convertProduct(product));
|
|
388
388
|
return undefined;
|
|
389
389
|
}
|
|
390
390
|
sendClick(product) {
|
|
391
391
|
var _a, _b, _c;
|
|
392
|
-
ga(
|
|
392
|
+
ga("ec:addProduct", {
|
|
393
393
|
id: product.productId,
|
|
394
394
|
name: product.title,
|
|
395
|
-
brand: (_a = product.brand) !== null && _a !== void 0 ? _a :
|
|
396
|
-
category: (_b = product.productType) !== null && _b !== void 0 ? _b :
|
|
397
|
-
price: Math.min(...[product.price.actual, (_c = product.price.sale) !== null && _c !== void 0 ? _c : Infinity])
|
|
395
|
+
brand: (_a = product.brand) !== null && _a !== void 0 ? _a : "",
|
|
396
|
+
category: (_b = product.productType) !== null && _b !== void 0 ? _b : "",
|
|
397
|
+
price: Math.min(...[product.price.actual, (_c = product.price.sale) !== null && _c !== void 0 ? _c : Infinity]),
|
|
398
398
|
});
|
|
399
|
-
ga(
|
|
399
|
+
ga("ec:setAction", "click", { list: "VI VPR View" });
|
|
400
400
|
return undefined;
|
|
401
401
|
}
|
|
402
402
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-5619b5ec.js');
|
|
6
|
-
const search_store = require('./search.store-
|
|
6
|
+
const search_store = require('./search.store-09c35811.js');
|
|
7
7
|
|
|
8
8
|
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 currentColor;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)}}";
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-5619b5ec.js');
|
|
6
|
-
const _package = require('./package-
|
|
6
|
+
const _package = require('./package-d35af1fc.js');
|
|
7
7
|
const VisualSearchIcon = require('./VisualSearchIcon-1180d079.js');
|
|
8
8
|
|
|
9
9
|
const vviinnVprButtonCss = ":host{display:block}";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-5619b5ec.js');
|
|
6
|
-
const _package = require('./package-
|
|
6
|
+
const _package = require('./package-d35af1fc.js');
|
|
7
7
|
const customizedSlots = require('./customized-slots-d8565ce0.js');
|
|
8
8
|
const constants = require('./constants-7684cbfc.js');
|
|
9
9
|
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-5619b5ec.js');
|
|
6
|
-
const search_store = require('./search.store-
|
|
6
|
+
const search_store = require('./search.store-09c35811.js');
|
|
7
7
|
const i18next = require('./i18next-74ff3413.js');
|
|
8
|
-
const _package = require('./package-
|
|
8
|
+
const _package = require('./package-d35af1fc.js');
|
|
9
9
|
const customizedSlots = require('./customized-slots-d8565ce0.js');
|
|
10
|
-
const resources = require('./resources-
|
|
10
|
+
const resources = require('./resources-2da68245.js');
|
|
11
11
|
const constants = require('./constants-7684cbfc.js');
|
|
12
12
|
|
|
13
13
|
const CameraActionIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
|
|
@@ -34,7 +34,7 @@ const checkDeviceType = () => {
|
|
|
34
34
|
return "desktop";
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
const vviinnVpsWidgetCss = ":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{display:block}.hidden{visibility:hidden;height:1px}vviinn-overlayed-modal.first-screen::part(title),vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:hidden}.start-page{display:grid;grid-template-columns:repeat(2, 1fr);height:640px}#start-page_block{box-sizing:border-box;display:flex;overflow-y:auto;flex-direction:column;justify-content:center;padding:42px 62px}#start-page_block.error{align-content:center}.start-page_main-content{flex-grow:1;display:flex;flex-direction:column;justify-content:center}.start-page_errors-block{display:flex;flex-direction:column;justify-content:center;gap:12px}#start-page_block vviinn-text-search{margin-top:12px}.buttons-group{display:flex;flex-direction:column;gap:12px;margin-top:24px}.action-button{font-family:inherit;display:grid;border:none;cursor:pointer;align-items:center;border-radius:8px;font-size:16px;height:48px;justify-items:center;transition:background 0.1s ease-in-out;color:#525252;background-color:#f4f4f4}.action-button:hover{background-color:#eaeaea}.action-button:first-child{background:var(--color-primary, var(--color-primary-system));border-color:var(--color-primary, var(--color-primary-system));color:white}.action-button:first-child:hover{background:var(--color-primary-hover, var(--color-primary-hover-system));border-color:var(--color-primary-hover, var(--color-primary-hover-system))}.action-button:active{border-color:black}.action-button-content{display:grid;align-items:center;justify-items:start;justify-content:center;grid-template-columns:max-content auto;grid-gap:8px}.action-button .hidden{display:none}.results-page{margin-top:64px;display:grid;grid-template-columns:336px auto;box-sizing:border-box}.results-page>*{padding:24px;box-sizing:border-box}.results-page .text-search-wrapper{width:100
|
|
37
|
+
const vviinnVpsWidgetCss = ":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{display:block}.hidden{visibility:hidden;height:1px}vviinn-overlayed-modal.first-screen::part(title),vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:hidden}.start-page{display:grid;grid-template-columns:repeat(2, 1fr);height:640px}#start-page_block{box-sizing:border-box;display:flex;overflow-y:auto;flex-direction:column;justify-content:center;padding:42px 62px}#start-page_block.error{align-content:center}.start-page_main-content{flex-grow:1;display:flex;flex-direction:column;justify-content:center}.start-page_errors-block{display:flex;flex-direction:column;justify-content:center;gap:12px}#start-page_block vviinn-text-search{margin-top:12px}.buttons-group{display:flex;flex-direction:column;gap:12px;margin-top:24px}.action-button{font-family:inherit;display:grid;border:none;cursor:pointer;align-items:center;border-radius:8px;font-size:16px;height:48px;justify-items:center;transition:background 0.1s ease-in-out;color:#525252;background-color:#f4f4f4}.action-button:hover{background-color:#eaeaea}.action-button:first-child{background:var(--color-primary, var(--color-primary-system));border-color:var(--color-primary, var(--color-primary-system));color:white}.action-button:first-child:hover{background:var(--color-primary-hover, var(--color-primary-hover-system));border-color:var(--color-primary-hover, var(--color-primary-hover-system))}.action-button:active{border-color:black}.action-button-content{display:grid;align-items:center;justify-items:start;justify-content:center;grid-template-columns:max-content auto;grid-gap:8px}.action-button .hidden{display:none}.results-page{margin-top:64px;display:grid;grid-template-columns:336px auto;box-sizing:border-box}.results-page>*{padding:24px;box-sizing:border-box}vviinn-empty-results{width:280px;align-self:center;justify-self:center}.source-wrapper{display:grid;grid-template-rows:min-content 1fr;min-width:100%}.results-page .source-wrapper.text-search-wrapper{padding:24px 24px 0 24px}.filters-wrapper{margin-top:24px;overflow-x:auto;transform:translateX(-24px);min-width:calc(100% + 48px)}.products-wrapper{display:grid;overflow-y:auto;overflow-x:hidden;padding:unset;position:relative;width:100%}.products{width:100%;align-content:center;align-items:start;box-sizing:border-box;display:grid;grid-gap:32px 16px;grid-template-columns:repeat(auto-fill, minmax(130px, 1fr));justify-items:center;padding:24px;position:absolute}.products.hidden{display:none}vviinn-product-card{gap:0;width:100%}vviinn-product-card::part(image){border:1px solid #eaeaea;margin-bottom:8px}vviinn-product-card::part(price-container),vviinn-product-card::part(deeplink),vviinn-product-card::part(title){align-self:start}search-filters span{display:none}search-filters::part(filter){background:#f4f4f4;border-radius:8px;box-sizing:border-box;color:#161616;font-size:14px;font-weight:400;line-height:20px}search-filters::part(show-more-filters){display:flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid #f4f4f4;min-width:40px;height:40px;border-radius:100px;box-sizing:border-box;color:#161616}search-filters::part(show-more-filters):hover{background:#eaeaea}search-filters::part(filter active){background:var(--color-primary, var(--color-primary-system));color:white}.results-page:not(.active){display:none}.nothing-found{display:grid;grid-gap:64px;justify-self:center;padding-top:64px;padding-bottom:16px;position:absolute;width:60%}vviinn-preloader{--preloader-size:24px;display:flex}@media (max-width: 1080px){#start-page_block{padding:24px 36px}}@media (max-width: 768px){.start-page{display:flex;flex-direction:column;height:100%}vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:visible}.start-page.active{height:calc(100vh - 64px);height:calc(100svh - 64px)}.start-page:not(.active){overflow:hidden}.results-page{margin-top:0}.results-page>*{box-sizing:border-box;padding:12px 24px 24px}.source-wrapper{grid-template-rows:min-content auto;width:100%;padding:0}.source-wrapper.image-wrapper .filters-wrapper{padding-left:24px;min-width:100%}.image{margin-bottom:8px}.results-page{grid-template-rows:min-content;grid-template-columns:unset}#start-page_block{overflow-y:unset;min-height:-moz-fit-content;min-height:fit-content;padding:24px 20px}.products-wrapper{align-content:start;position:static;overflow-y:unset;width:100%;padding-top:0;margin-top:24px}.products{position:static;padding:0;width:unset;grid-gap:32px 16px;justify-content:center}.nothing-found{position:static;grid-gap:64px;padding:unset;align-content:start;width:unset}}@media (max-width: 480px){.start-page{padding-top:0}.action-button-content{grid-gap:10px}}@media (max-width: 380px){.products{grid-gap:24px 10px}}vviinn-wrong-format,vviinn-server-error{width:280px;align-self:center;justify-self:center}.visually-hidden{clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}";
|
|
38
38
|
|
|
39
39
|
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
40
40
|
var t = {};
|
|
@@ -168,6 +168,9 @@ const VviinnVpsWidget = class {
|
|
|
168
168
|
widgetVersion: _package.version,
|
|
169
169
|
};
|
|
170
170
|
};
|
|
171
|
+
this.setSearchQuery = (query) => {
|
|
172
|
+
this.searchQuery = query;
|
|
173
|
+
};
|
|
171
174
|
this.LinkText = ({ href, children }) => {
|
|
172
175
|
return index.h("a", { href: href || "" }, children);
|
|
173
176
|
};
|
|
@@ -198,7 +201,7 @@ const VviinnVpsWidget = class {
|
|
|
198
201
|
this.uploadSource = undefined;
|
|
199
202
|
this.showAspectRatioError = false;
|
|
200
203
|
this.products = [];
|
|
201
|
-
this.
|
|
204
|
+
this.searchQuery = "";
|
|
202
205
|
}
|
|
203
206
|
initResultEvents() {
|
|
204
207
|
this.resultLoaded = false;
|
|
@@ -233,6 +236,16 @@ const VviinnVpsWidget = class {
|
|
|
233
236
|
window.location.href = deeplink;
|
|
234
237
|
}
|
|
235
238
|
}
|
|
239
|
+
async componentWillLoad() {
|
|
240
|
+
await i18next.instance.init({
|
|
241
|
+
lng: this.locale,
|
|
242
|
+
fallbackLng: "en",
|
|
243
|
+
resources: resources.resources,
|
|
244
|
+
});
|
|
245
|
+
customizedSlots.slotChangeListener(this, this.el);
|
|
246
|
+
this.vviinnWidgetLoad.emit(this.getBasicEventData());
|
|
247
|
+
this.trackWidgetEvent("load");
|
|
248
|
+
}
|
|
236
249
|
componentDidLoad() {
|
|
237
250
|
const slots = this.el.querySelectorAll("[slot]");
|
|
238
251
|
this.globalSlotsChanged.emit({
|
|
@@ -240,6 +253,12 @@ const VviinnVpsWidget = class {
|
|
|
240
253
|
element: this.el,
|
|
241
254
|
});
|
|
242
255
|
}
|
|
256
|
+
async handleTextSearch() {
|
|
257
|
+
if (!this.searchQuery)
|
|
258
|
+
return;
|
|
259
|
+
await search_store.processSelectedText(this.searchQuery);
|
|
260
|
+
this.slidePosition = 1;
|
|
261
|
+
}
|
|
243
262
|
activeWatcher(active) {
|
|
244
263
|
if (active) {
|
|
245
264
|
this.overflow = document.body.style.overflow;
|
|
@@ -333,9 +352,8 @@ const VviinnVpsWidget = class {
|
|
|
333
352
|
const searchEvent = resources.createFilterEvent(Object.assign({ session_id: this.uiSessionId, source: this.imageSource, kind: detail.kind, action: detail.action }, rest));
|
|
334
353
|
this.trackingApi.trackEvent(searchEvent).then(this.setTrackingDeactivated);
|
|
335
354
|
}
|
|
336
|
-
|
|
337
|
-
this.
|
|
338
|
-
this.slidePosition = 1;
|
|
355
|
+
trackTextSearchFilterSelected({ detail }) {
|
|
356
|
+
search_store.processSelectedText(this.searchQuery, detail);
|
|
339
357
|
}
|
|
340
358
|
connectedCallback() {
|
|
341
359
|
this.isDesktop = checkDeviceType() === "desktop";
|
|
@@ -354,16 +372,6 @@ const VviinnVpsWidget = class {
|
|
|
354
372
|
this.trackingApi = resources.createTrackingApi(this.apiPath, this.token);
|
|
355
373
|
this.id = this.el.id;
|
|
356
374
|
}
|
|
357
|
-
async componentWillLoad() {
|
|
358
|
-
await i18next.instance.init({
|
|
359
|
-
lng: this.locale,
|
|
360
|
-
fallbackLng: "en",
|
|
361
|
-
resources: resources.resources,
|
|
362
|
-
});
|
|
363
|
-
customizedSlots.slotChangeListener(this, this.el);
|
|
364
|
-
this.vviinnWidgetLoad.emit(this.getBasicEventData());
|
|
365
|
-
this.trackWidgetEvent("load");
|
|
366
|
-
}
|
|
367
375
|
trackWidgetEvent(action) {
|
|
368
376
|
if (this.trackingDeactivated)
|
|
369
377
|
return;
|
|
@@ -445,11 +453,13 @@ const VviinnVpsWidget = class {
|
|
|
445
453
|
search_store.searchState.searchArea = search_store.Option.none;
|
|
446
454
|
search_store.searchState.results = [];
|
|
447
455
|
search_store.searchState.filters = [];
|
|
456
|
+
search_store.searchState.textSearchFilters = [];
|
|
448
457
|
search_store.searchState.detectedObjects = [];
|
|
449
458
|
search_store.searchState.rectangleSearchForm = undefined;
|
|
450
459
|
search_store.searchState.loading = false;
|
|
451
460
|
search_store.searchState.serverError = false;
|
|
452
461
|
search_store.searchState.searchType = undefined;
|
|
462
|
+
this.searchQuery = "";
|
|
453
463
|
this.wrongImageFormat = false;
|
|
454
464
|
this.resetScroll("results-block");
|
|
455
465
|
this.stopStreamTracks();
|
|
@@ -487,17 +497,18 @@ const VviinnVpsWidget = class {
|
|
|
487
497
|
}, id: "start-page_block" }, index.h("div", { class: "start-page_main-content" }, index.h("div", { class: {
|
|
488
498
|
"start-page_errors-block": true,
|
|
489
499
|
hidden: !this.wrongImageFormat && !search_store.searchState.serverError,
|
|
490
|
-
} }, index.h("vviinn-wrong-format", { class: { hidden: !this.wrongImageFormat }, handler: () => this.resetState() }), index.h("vviinn-server-error", { class: { hidden: !search_store.searchState.serverError }, handler: () => this.resetState() })), !this.haveErrors() && index.h("vviinn-teaser", null),
|
|
500
|
+
} }, index.h("vviinn-wrong-format", { class: { hidden: !this.wrongImageFormat }, handler: () => this.resetState() }), index.h("vviinn-server-error", { class: { hidden: !search_store.searchState.serverError }, handler: () => this.resetState() })), !this.haveErrors() && (index.h(index.Fragment, null, index.h("vviinn-teaser", null), index.h("div", { class: "buttons-group" }, this.renderButtons()), this.textSearchShow && (index.h("vviinn-text-search", { searchQuery: this.searchQuery, setSearchQuery: this.setSearchQuery, handleTextSearch: this.handleTextSearch.bind(this) }))))), index.h("vviinn-privacy-badge", { privacyBadgeText: i18next.instance.t("privacyBadgeText", {
|
|
491
501
|
interpolation: { escapeValue: false },
|
|
492
502
|
}), class: { invisible: this.haveErrors() } }))), index.h("vviinn-slide", { class: {
|
|
493
503
|
"results-page": true,
|
|
494
504
|
active: this.isResultSlide(),
|
|
495
|
-
} }, this.isResultSlide() && search_store.searchState.searchType === "image" && (index.h("div", { class: "image-wrapper" }, index.h("vviinn-image-view", { basicEventData: this.getBasicEventData(), setShowAspectRatioError: this.setShowAspectRatioError, showAspectRatioError: this.showAspectRatioError }), index.h("div", { class: {
|
|
505
|
+
} }, this.isResultSlide() && search_store.searchState.searchType === "image" && (index.h("div", { class: "source-wrapper image-wrapper" }, index.h("vviinn-image-view", { basicEventData: this.getBasicEventData(), setShowAspectRatioError: this.setShowAspectRatioError, showAspectRatioError: this.showAspectRatioError }), index.h("div", { class: {
|
|
506
|
+
"filters-wrapper": true,
|
|
507
|
+
hidden: this.showAspectRatioError,
|
|
508
|
+
} }, index.h("div", { class: "filters" }, search_store.searchState.filters.map((filter) => (index.h("search-filters", { filter: filter, basicEventData: this.getBasicEventData() }))))))), this.isResultSlide() && search_store.searchState.searchType === "text" && (index.h("div", { class: "source-wrapper text-search-wrapper" }, index.h("vviinn-text-search", { searchQuery: this.searchQuery, setSearchQuery: this.setSearchQuery, handleTextSearch: this.handleTextSearch.bind(this) }), index.h("div", { class: {
|
|
496
509
|
"filters-wrapper": true,
|
|
497
510
|
hidden: this.showAspectRatioError,
|
|
498
|
-
} }, index.h("div", { class: "filters" }, search_store.searchState.
|
|
499
|
-
this.isResultSlide() &&
|
|
500
|
-
search_store.searchState.searchType === "text" && (index.h("div", { class: "text-search-wrapper" }, index.h("vviinn-text-search", { initialSearchQuery: this.initialSearchQuery }))), index.h("div", { id: "results-block", class: "products-wrapper" }, index.h("div", { class: {
|
|
511
|
+
} }, index.h("div", { class: "filters" }, search_store.searchState.textSearchFilters.map((filter) => (index.h("search-filters", { textSearchFiltersGroup: filter, basicEventData: this.getBasicEventData() }))))))), index.h("div", { id: "results-block", class: "products-wrapper" }, index.h("div", { class: {
|
|
501
512
|
"nothing-found": true,
|
|
502
513
|
hidden: search_store.searchState.results.length > 0,
|
|
503
514
|
} }, index.h("vviinn-empty-results", { handler: () => this.resetState() })), index.h("div", { class: {
|