vviinn-widgets 2.65.0 → 2.66.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-95fbaca6.js → index-d3a4dc7e.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-a5d36a4c.js → package-fb9ddd08.js} +1 -1
- package/dist/cjs/search-filters_18.cjs.entry.js +19 -13
- package/dist/cjs/{search.store-f3a52bff.js → search.store-53e13410.js} +19 -6
- package/dist/cjs/vviinn-carousel_6.cjs.entry.js +3 -3
- 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 +6 -6
- package/dist/cjs/vviinn-widgets.cjs.js +1 -1
- package/dist/collection/components/vviinn-results/vviinn-results.js +35 -14
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +4 -4
- package/dist/collection/store/search.store.js +16 -4
- package/dist/esm/{index-d6a3778d.js → index-7b10362b.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-1fd61576.js → package-3edb6e3f.js} +1 -1
- package/dist/esm/search-filters_18.entry.js +19 -13
- package/dist/esm/{search.store-1687b6ed.js → search.store-9a15b860.js} +17 -5
- package/dist/esm/vviinn-carousel_6.entry.js +3 -3
- 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 +6 -6
- package/dist/esm/vviinn-widgets.js +1 -1
- package/dist/types/components/vviinn-results/vviinn-results.d.ts +4 -2
- package/dist/types/components.d.ts +8 -0
- package/dist/types/store/search.store.d.ts +92 -2
- package/dist/vviinn-widgets/{p-0ece240a.entry.js → p-037132f7.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-23f65471.entry.js → p-0a02e3de.entry.js} +1 -1
- package/dist/vviinn-widgets/p-1fa6349d.js +1 -0
- package/{www/build/p-acb7fad6.js → dist/vviinn-widgets/p-2961ec26.js} +1 -1
- package/dist/vviinn-widgets/{p-f8f179ea.entry.js → p-47343f3c.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-22887cd2.entry.js → p-5913b7eb.entry.js} +1 -1
- package/{www/build/p-1928f236.js → dist/vviinn-widgets/p-9b1c8e6e.js} +1 -1
- package/dist/vviinn-widgets/{p-3016e7c0.entry.js → p-d39b0518.entry.js} +1 -1
- package/dist/vviinn-widgets/p-d99e511d.entry.js +11 -0
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/{p-0ece240a.entry.js → p-037132f7.entry.js} +1 -1
- package/www/build/{p-23f65471.entry.js → p-0a02e3de.entry.js} +1 -1
- package/www/build/p-1fa6349d.js +1 -0
- package/{dist/vviinn-widgets/p-acb7fad6.js → www/build/p-2961ec26.js} +1 -1
- package/www/build/{p-f8f179ea.entry.js → p-47343f3c.entry.js} +1 -1
- package/www/build/{p-22887cd2.entry.js → p-5913b7eb.entry.js} +1 -1
- package/{dist/vviinn-widgets/p-1928f236.js → www/build/p-9b1c8e6e.js} +1 -1
- package/www/build/{p-3016e7c0.entry.js → p-d39b0518.entry.js} +1 -1
- package/www/build/p-d99e511d.entry.js +11 -0
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/dist/vviinn-widgets/p-0d7dbe3f.entry.js +0 -11
- package/dist/vviinn-widgets/p-baf20397.js +0 -1
- package/www/build/p-0d7dbe3f.entry.js +0 -11
- package/www/build/p-baf20397.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(JSON.parse("[[\"vviinn-button.cjs\",[[1,\"vviinn-button\",{\"addStyle\":[4,\"add-style\"]}]]],[\"vviinn-preloader.cjs\",[[1,\"vviinn-preloader\"]]],[\"vviinn-error.cjs\",[[1,\"vviinn-error\"]]],[\"vviinn-carousel_6.cjs\",[[1,\"vviinn-vpr-widget\",{\"token\":[1],\"productId\":[1,\"product-id\"],\"mode\":[1],\"campaigns\":[1],\"excluded\":[1],\"campaignType\":[1,\"campaign-type\"],\"locale\":[1],\"color\":[1],\"imageWidth\":[2,\"image-width\"],\"imageRatio\":[2,\"image-ratio\"],\"cssUrl\":[1,\"css-url\"],\"currencySign\":[1,\"currency-sign\"],\"pricePrefix\":[1,\"price-prefix\"],\"noResultText\":[1,\"no-result-text\"],\"noResultShow\":[4,\"no-result-show\"],\"gridArrowsDynamic\":[4,\"grid-arrows-dynamic\"],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"addToBasketShow\":[4,\"add-to-basket-show\"],\"showFilters\":[4,\"show-filters\"],\"showExtendedFilters\":[4,\"show-extended-filters\"],\"setModeDiscounts\":[1,\"set-mode-discounts\"],\"updateButtonLocation\":[1,\"update-button-location\"],\"blockTitle\":[1,\"block-title\"],\"showScroll\":[4,\"show-scroll\"],\"apiPath\":[1,\"api-path\"],\"useCarousel\":[4,\"use-carousel\"],\"showingInButton\":[4,\"showing-in-button\"],\"buttonElementId\":[1,\"button-element-id\"],\"closed\":[4],\"opened\":[4],\"recommendations\":[32],\"dynamicFilters\":[32],\"sourceProduct\":[32],\"trackingDeactivated\":[32],\"hasErrorOnLoad\":[32],\"updatingAllCards\":[32],\"updatedCardsAmount\":[32],\"setModeDiscountsArray\":[32]},[[0,\"vviinnProductLoad\",\"trackProductLoad\"],[0,\"vviinnProductView\",\"trackProductView\"],[0,\"vviinnProductClick\",\"trackProductClick\"],[0,\"vviinnAuxClick\",\"trackAuxClick\"],[0,\"vviinnAddToBasket\",\"trackAddToBasket\"],[0,\"vviinnUpdatingAllCardsFinished\",\"updatingAllCardsFinishedListener\"],[0,\"vviinnFiltersChanged\",\"filtersChanged\"]]],[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\"],\"replaceSlotsContent\":[16],\"setModeDiscountsArray\":[16],\"imageRatio\":[2,\"image-ratio\"],\"currencySign\":[1,\"currency-sign\"],\"pricePrefix\":[1,\"price-prefix\"],\"locale\":[1],\"moveDirection\":[32],\"contentGroups\":[32],\"activeContentGroup\":[32],\"isRTL\":[32],\"crossSellingRecommendations\":[32],\"setModeDiscount\":[32],\"currentDiscountIndex\":[32],\"setModeAppliedDiscounts\":[32]},[[0,\"vviinnCrossSellingClick\",\"crossSellingClickListener\"],[0,\"vviinnAddToBasket\",\"trackAddToBasket\"]]],[1,\"vviinn-extended-filters\",{\"filters\":[16],\"filtersString\":[1,\"filters-string\"],\"locale\":[1],\"requestFilters\":[32],\"showMore\":[32],\"selectedMoreOptions\":[32]}],[1,\"vviinn-filters\",{\"filters\":[16],\"filtersString\":[1,\"filters-string\"],\"selectedFilter\":[32],\"requestFilters\":[32]}],[1,\"vviinn-product-card\",{\"brand\":[1],\"currency\":[1],\"deeplink\":[1],\"image\":[1],\"imageRatio\":[2,\"image-ratio\"],\"imageWidth\":[2,\"image-width\"],\"locale\":[1],\"price\":[2],\"pricePrefix\":[1,\"price-prefix\"],\"productId\":[1,\"product-id\"],\"productTitle\":[1,\"product-title\"],\"productType\":[1,\"product-type\"],\"salePrice\":[2,\"sale-price\"],\"responsive\":[4],\"dimmedBackground\":[4,\"dimmed-background\"],\"mode\":[1],\"basketButtonShow\":[4,\"basket-button-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],\"basketButonPressed\":[32]},[[0,\"vviinnCrossSellingClick\",\"crossSellingClickListener\"]]],[1,\"vviinn-skeleton\",{\"height\":[2],\"halfWidth\":[4,\"half-width\"]}]]],[\"search-filters_18.cjs\",[[1,\"vviinn-results\",{\"token\":[1],\"searchId\":[1,\"search-id\"],\"imageResolutionWidth\":[2,\"image-resolution-width\"],\"currencySign\":[1,\"currency-sign\"],\"locale\":[8],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"showingInWidget\":[4,\"showing-in-widget\"],\"uiSessionId\":[1025,\"ui-session-id\"],\"buttonElementId\":[1,\"button-element-id\"],\"widgetElementId\":[1,\"widget-element-id\"],\"apiPath\":[1,\"api-path\"],\"showAspectRatioError\":[4,\"show-aspect-ratio-error\"],\"trackingDeactivated\":[1028,\"tracking-deactivated\"],\"resetState\":[16],\"recommendations\":[32]},[[0,\"vviinnProductLoad\",\"trackProductLoad\"],[0,\"vviinnProductView\",\"trackProductView\"],[0,\"vviinnProductClick\",\"trackProductClick\"],[0,\"vviinnAuxClick\",\"trackAuxClick\"]]],[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-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-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-empty-results\",{\"handler\":[16]}],[1,\"vviinn-wrong-aspect-ratio\",{\"handler\":[16]}],[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],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"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,\"vviinnResultLoad\",\"resultLoadHandler\"],[0,\"vviinnResultView\",\"resultViewHandler\"],[0,\"vviinnCameraEnabled\",\"trackCameraEnabled\"],[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],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"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\"],\"imageRatio\":[2,\"image-ratio\"],\"cssUrl\":[1,\"css-url\"],\"currencySign\":[1,\"currency-sign\"],\"pricePrefix\":[1,\"price-prefix\"],\"noResultText\":[1,\"no-result-text\"],\"noResultShow\":[4,\"no-result-show\"],\"gridArrowsDynamic\":[4,\"grid-arrows-dynamic\"],\"excluded\":[1],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"addToBasketShow\":[4,\"add-to-basket-show\"],\"showFilters\":[4,\"show-filters\"],\"setModeDiscounts\":[1,\"set-mode-discounts\"],\"updateButtonLocation\":[1,\"update-button-location\"],\"buttonChildren\":[16],\"apiPath\":[1,\"api-path\"],\"buttonElementId\":[1,\"button-element-id\"],\"widgetVersion\":[1,\"widget-version\"],\"showingInButton\":[4,\"showing-in-button\"],\"state\":[32]},[[0,\"vviinnUpdatingAllCardsStarted\",\"updatingAllCardsStarted\"],[0,\"vviinnUpdatingAllCardsFinished\",\"updatingAllCardsFinished\"],[16,\"click\",\"bodyClickListener\"]]]]],[\"vviinn-vpr-button.cjs\",[[1,\"vviinn-vpr-button\",{\"token\":[1],\"productId\":[1,\"product-id\"],\"mode\":[1],\"campaigns\":[1],\"excluded\":[1],\"campaignType\":[1,\"campaign-type\"],\"locale\":[1],\"color\":[1],\"imageWidth\":[2,\"image-width\"],\"imageRatio\":[2,\"image-ratio\"],\"cssUrl\":[1,\"css-url\"],\"currencySign\":[1,\"currency-sign\"],\"pricePrefix\":[1,\"price-prefix\"],\"noResultText\":[1,\"no-result-text\"],\"noResultShow\":[4,\"no-result-show\"],\"gridArrowsDynamic\":[4,\"grid-arrows-dynamic\"],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"addToBasketShow\":[4,\"add-to-basket-show\"],\"showFilters\":[4,\"show-filters\"],\"setModeDiscounts\":[1,\"set-mode-discounts\"],\"updateButtonLocation\":[1,\"update-button-location\"],\"sidebarTitle\":[1,\"sidebar-title\"],\"modalScrollbar\":[4,\"modal-scrollbar\"],\"position\":[1],\"sourceImage\":[1,\"source-image\"],\"addStyle\":[4,\"add-style\"],\"apiPath\":[1,\"api-path\"]}]]]]"), options);
|
|
17
|
+
return index.bootstrapLazy(JSON.parse("[[\"vviinn-button.cjs\",[[1,\"vviinn-button\",{\"addStyle\":[4,\"add-style\"]}]]],[\"vviinn-preloader.cjs\",[[1,\"vviinn-preloader\"]]],[\"vviinn-error.cjs\",[[1,\"vviinn-error\"]]],[\"vviinn-carousel_6.cjs\",[[1,\"vviinn-vpr-widget\",{\"token\":[1],\"productId\":[1,\"product-id\"],\"mode\":[1],\"campaigns\":[1],\"excluded\":[1],\"campaignType\":[1,\"campaign-type\"],\"locale\":[1],\"color\":[1],\"imageWidth\":[2,\"image-width\"],\"imageRatio\":[2,\"image-ratio\"],\"cssUrl\":[1,\"css-url\"],\"currencySign\":[1,\"currency-sign\"],\"pricePrefix\":[1,\"price-prefix\"],\"noResultText\":[1,\"no-result-text\"],\"noResultShow\":[4,\"no-result-show\"],\"gridArrowsDynamic\":[4,\"grid-arrows-dynamic\"],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"addToBasketShow\":[4,\"add-to-basket-show\"],\"showFilters\":[4,\"show-filters\"],\"showExtendedFilters\":[4,\"show-extended-filters\"],\"setModeDiscounts\":[1,\"set-mode-discounts\"],\"updateButtonLocation\":[1,\"update-button-location\"],\"blockTitle\":[1,\"block-title\"],\"showScroll\":[4,\"show-scroll\"],\"apiPath\":[1,\"api-path\"],\"useCarousel\":[4,\"use-carousel\"],\"showingInButton\":[4,\"showing-in-button\"],\"buttonElementId\":[1,\"button-element-id\"],\"closed\":[4],\"opened\":[4],\"recommendations\":[32],\"dynamicFilters\":[32],\"sourceProduct\":[32],\"trackingDeactivated\":[32],\"hasErrorOnLoad\":[32],\"updatingAllCards\":[32],\"updatedCardsAmount\":[32],\"setModeDiscountsArray\":[32]},[[0,\"vviinnProductLoad\",\"trackProductLoad\"],[0,\"vviinnProductView\",\"trackProductView\"],[0,\"vviinnProductClick\",\"trackProductClick\"],[0,\"vviinnAuxClick\",\"trackAuxClick\"],[0,\"vviinnAddToBasket\",\"trackAddToBasket\"],[0,\"vviinnUpdatingAllCardsFinished\",\"updatingAllCardsFinishedListener\"],[0,\"vviinnFiltersChanged\",\"filtersChanged\"]]],[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\"],\"replaceSlotsContent\":[16],\"setModeDiscountsArray\":[16],\"imageRatio\":[2,\"image-ratio\"],\"currencySign\":[1,\"currency-sign\"],\"pricePrefix\":[1,\"price-prefix\"],\"locale\":[1],\"moveDirection\":[32],\"contentGroups\":[32],\"activeContentGroup\":[32],\"isRTL\":[32],\"crossSellingRecommendations\":[32],\"setModeDiscount\":[32],\"currentDiscountIndex\":[32],\"setModeAppliedDiscounts\":[32]},[[0,\"vviinnCrossSellingClick\",\"crossSellingClickListener\"],[0,\"vviinnAddToBasket\",\"trackAddToBasket\"]]],[1,\"vviinn-extended-filters\",{\"filters\":[16],\"filtersString\":[1,\"filters-string\"],\"locale\":[1],\"requestFilters\":[32],\"showMore\":[32],\"selectedMoreOptions\":[32]}],[1,\"vviinn-filters\",{\"filters\":[16],\"filtersString\":[1,\"filters-string\"],\"selectedFilter\":[32],\"requestFilters\":[32]}],[1,\"vviinn-product-card\",{\"brand\":[1],\"currency\":[1],\"deeplink\":[1],\"image\":[1],\"imageRatio\":[2,\"image-ratio\"],\"imageWidth\":[2,\"image-width\"],\"locale\":[1],\"price\":[2],\"pricePrefix\":[1,\"price-prefix\"],\"productId\":[1,\"product-id\"],\"productTitle\":[1,\"product-title\"],\"productType\":[1,\"product-type\"],\"salePrice\":[2,\"sale-price\"],\"responsive\":[4],\"dimmedBackground\":[4,\"dimmed-background\"],\"mode\":[1],\"basketButtonShow\":[4,\"basket-button-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],\"basketButonPressed\":[32]},[[0,\"vviinnCrossSellingClick\",\"crossSellingClickListener\"]]],[1,\"vviinn-skeleton\",{\"height\":[2],\"halfWidth\":[4,\"half-width\"]}]]],[\"search-filters_18.cjs\",[[1,\"vviinn-results\",{\"token\":[1],\"searchId\":[1,\"search-id\"],\"imageResolutionWidth\":[2,\"image-resolution-width\"],\"currencySign\":[1,\"currency-sign\"],\"locale\":[8],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"textSearchQuery\":[1,\"text-search-query\"],\"showingInWidget\":[4,\"showing-in-widget\"],\"uiSessionId\":[1025,\"ui-session-id\"],\"buttonElementId\":[1,\"button-element-id\"],\"widgetElementId\":[1,\"widget-element-id\"],\"apiPath\":[1,\"api-path\"],\"showAspectRatioError\":[4,\"show-aspect-ratio-error\"],\"trackingDeactivated\":[1028,\"tracking-deactivated\"],\"resetState\":[16],\"recommendations\":[32]},[[0,\"vviinnProductLoad\",\"trackProductLoad\"],[0,\"vviinnProductView\",\"trackProductView\"],[0,\"vviinnProductClick\",\"trackProductClick\"],[0,\"vviinnAuxClick\",\"trackAuxClick\"]]],[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-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-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-empty-results\",{\"handler\":[16]}],[1,\"vviinn-wrong-aspect-ratio\",{\"handler\":[16]}],[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],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"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,\"vviinnResultLoad\",\"resultLoadHandler\"],[0,\"vviinnResultView\",\"resultViewHandler\"],[0,\"vviinnCameraEnabled\",\"trackCameraEnabled\"],[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],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"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\"],\"imageRatio\":[2,\"image-ratio\"],\"cssUrl\":[1,\"css-url\"],\"currencySign\":[1,\"currency-sign\"],\"pricePrefix\":[1,\"price-prefix\"],\"noResultText\":[1,\"no-result-text\"],\"noResultShow\":[4,\"no-result-show\"],\"gridArrowsDynamic\":[4,\"grid-arrows-dynamic\"],\"excluded\":[1],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"addToBasketShow\":[4,\"add-to-basket-show\"],\"showFilters\":[4,\"show-filters\"],\"setModeDiscounts\":[1,\"set-mode-discounts\"],\"updateButtonLocation\":[1,\"update-button-location\"],\"buttonChildren\":[16],\"apiPath\":[1,\"api-path\"],\"buttonElementId\":[1,\"button-element-id\"],\"widgetVersion\":[1,\"widget-version\"],\"showingInButton\":[4,\"showing-in-button\"],\"state\":[32]},[[0,\"vviinnUpdatingAllCardsStarted\",\"updatingAllCardsStarted\"],[0,\"vviinnUpdatingAllCardsFinished\",\"updatingAllCardsFinished\"],[16,\"click\",\"bodyClickListener\"]]]]],[\"vviinn-vpr-button.cjs\",[[1,\"vviinn-vpr-button\",{\"token\":[1],\"productId\":[1,\"product-id\"],\"mode\":[1],\"campaigns\":[1],\"excluded\":[1],\"campaignType\":[1,\"campaign-type\"],\"locale\":[1],\"color\":[1],\"imageWidth\":[2,\"image-width\"],\"imageRatio\":[2,\"image-ratio\"],\"cssUrl\":[1,\"css-url\"],\"currencySign\":[1,\"currency-sign\"],\"pricePrefix\":[1,\"price-prefix\"],\"noResultText\":[1,\"no-result-text\"],\"noResultShow\":[4,\"no-result-show\"],\"gridArrowsDynamic\":[4,\"grid-arrows-dynamic\"],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"addToBasketShow\":[4,\"add-to-basket-show\"],\"showFilters\":[4,\"show-filters\"],\"setModeDiscounts\":[1,\"set-mode-discounts\"],\"updateButtonLocation\":[1,\"update-button-location\"],\"sidebarTitle\":[1,\"sidebar-title\"],\"modalScrollbar\":[4,\"modal-scrollbar\"],\"position\":[1],\"sourceImage\":[1,\"source-image\"],\"addStyle\":[4,\"add-style\"],\"apiPath\":[1,\"api-path\"]}]]]]"), options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
|
-
const search_store = require('./search.store-
|
|
7
|
-
const index$1 = require('./index-
|
|
6
|
+
const search_store = require('./search.store-53e13410.js');
|
|
7
|
+
const index$1 = require('./index-d3a4dc7e.js');
|
|
8
8
|
const customizedSlots = require('./customized-slots-dacb282b.js');
|
|
9
9
|
const PlusIcon = require('./PlusIcon-835a5dcc.js');
|
|
10
|
-
const _package = require('./package-
|
|
10
|
+
const _package = require('./package-fb9ddd08.js');
|
|
11
11
|
|
|
12
12
|
const ArrowIcon = () => (index.h("svg", { width: "12", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
13
13
|
index.h("path", { d: "M0 10 10 0l1.4 1.4L2.8 10l8.6 8.6L10 20 0 10Z" })));
|
|
@@ -3994,12 +3994,13 @@ const VviinnResults = class {
|
|
|
3994
3994
|
const { searchId } = detail;
|
|
3995
3995
|
this.getResultsBySearchId(searchId);
|
|
3996
3996
|
};
|
|
3997
|
-
this.getResultsBySearchId = async (
|
|
3998
|
-
if (!
|
|
3997
|
+
this.getResultsBySearchId = async (searchId) => {
|
|
3998
|
+
if (!searchId)
|
|
3999
3999
|
return;
|
|
4000
4000
|
search_store.state.apiPath = this.apiPath; //FIXME: #36877
|
|
4001
|
-
|
|
4002
|
-
|
|
4001
|
+
search_store._function.pipe(await search_store.makeSearchIdRequest(searchId, this.token), search_store.getOrElse(() => []), (results) => {
|
|
4002
|
+
this.recommendations = results;
|
|
4003
|
+
});
|
|
4003
4004
|
};
|
|
4004
4005
|
this.setTrackingDeactivated = (result) => {
|
|
4005
4006
|
if (result.status === "rejected") {
|
|
@@ -4022,6 +4023,7 @@ const VviinnResults = class {
|
|
|
4022
4023
|
this.locale = "de-DE";
|
|
4023
4024
|
this.productDetailsNewTab = true;
|
|
4024
4025
|
this.productDetailsRedirect = true;
|
|
4026
|
+
this.textSearchQuery = undefined;
|
|
4025
4027
|
this.showingInWidget = false;
|
|
4026
4028
|
this.uiSessionId = undefined;
|
|
4027
4029
|
this.buttonElementId = undefined;
|
|
@@ -4039,13 +4041,11 @@ const VviinnResults = class {
|
|
|
4039
4041
|
}
|
|
4040
4042
|
document.addEventListener("vviinnSearchIdReceived", this.searchIdReceivedHandler);
|
|
4041
4043
|
this.getResultsBySearchId(this.searchId);
|
|
4044
|
+
this.getResultsByTextQuery(this.textSearchQuery);
|
|
4042
4045
|
}
|
|
4043
4046
|
disconnectedCallback() {
|
|
4044
4047
|
document.removeEventListener("vviinnSearchIdReceived", this.searchIdReceivedHandler);
|
|
4045
4048
|
}
|
|
4046
|
-
processSearchId(newSearchIdProp) {
|
|
4047
|
-
this.getResultsBySearchId(newSearchIdProp);
|
|
4048
|
-
}
|
|
4049
4049
|
trackProductLoad({ detail }) {
|
|
4050
4050
|
const productLoadEvent = this.getProductTrackEvent(detail, "load");
|
|
4051
4051
|
if (!productLoadEvent)
|
|
@@ -4097,6 +4097,15 @@ const VviinnResults = class {
|
|
|
4097
4097
|
.then(this.setTrackingDeactivated);
|
|
4098
4098
|
}
|
|
4099
4099
|
}
|
|
4100
|
+
async getResultsByTextQuery(query) {
|
|
4101
|
+
if (this.showingInWidget || query === undefined)
|
|
4102
|
+
return;
|
|
4103
|
+
search_store.state.apiPath = this.apiPath; //FIXME: #36877
|
|
4104
|
+
search_store._function.pipe(await search_store.makeSearchQueryRequest(query, this.token), search_store.getOrElse(() => null), (results) => {
|
|
4105
|
+
var _a, _b;
|
|
4106
|
+
this.recommendations = (_b = (_a = results === null || results === void 0 ? void 0 : results.data) === null || _a === void 0 ? void 0 : _a.products) !== null && _b !== void 0 ? _b : [];
|
|
4107
|
+
});
|
|
4108
|
+
}
|
|
4100
4109
|
trackResultEvent(type) {
|
|
4101
4110
|
if (this.trackingDeactivated)
|
|
4102
4111
|
return;
|
|
@@ -4163,9 +4172,6 @@ const VviinnResults = class {
|
|
|
4163
4172
|
} }, this.renderResults(this.showingInWidget ? search_store.searchState.results : this.recommendations))));
|
|
4164
4173
|
}
|
|
4165
4174
|
get el() { return index.getElement(this); }
|
|
4166
|
-
static get watchers() { return {
|
|
4167
|
-
"searchId": ["processSearchId"]
|
|
4168
|
-
}; }
|
|
4169
4175
|
};
|
|
4170
4176
|
VviinnResults.style = vviinnResultsCss;
|
|
4171
4177
|
|
|
@@ -17313,7 +17313,7 @@ const uploadFile = (file) => {
|
|
|
17313
17313
|
return error;
|
|
17314
17314
|
}));
|
|
17315
17315
|
};
|
|
17316
|
-
const
|
|
17316
|
+
const makeTextSearchRequest = async (query, dynamicFilters) => {
|
|
17317
17317
|
state.searchType = "text";
|
|
17318
17318
|
state.loading = true;
|
|
17319
17319
|
const body = Object.assign(Object.assign({ query }, (dynamicFilters
|
|
@@ -17339,10 +17339,22 @@ const uploadText = (query, dynamicFilters) => {
|
|
|
17339
17339
|
state.serverError = true;
|
|
17340
17340
|
state.loading = false;
|
|
17341
17341
|
return error;
|
|
17342
|
-
}));
|
|
17342
|
+
}))();
|
|
17343
|
+
};
|
|
17344
|
+
const makeSearchQueryRequest = async (query, token) => {
|
|
17345
|
+
const body = {
|
|
17346
|
+
query,
|
|
17347
|
+
};
|
|
17348
|
+
const tokenWithBody = sequenceToEither(processBearerToken(token), right(JSON.stringify(body)));
|
|
17349
|
+
return pipe(tokenWithBody, map$4(([headers, body]) => {
|
|
17350
|
+
headers.set("Content-Type", "application/json");
|
|
17351
|
+
return {
|
|
17352
|
+
headers,
|
|
17353
|
+
body,
|
|
17354
|
+
};
|
|
17355
|
+
}), fromEither, chain((request) => textSearchSessionClient(request)))();
|
|
17343
17356
|
};
|
|
17344
|
-
const
|
|
17345
|
-
const processSearchIdQuery = async (searchId, token) => await pipe(makeAuthorizedRequest(token), fromEither, chainW(linkRequest(createLinkfromSearchId(searchId))), map((response) => response.value))();
|
|
17357
|
+
const makeSearchIdRequest = async (searchId, token) => await pipe(makeAuthorizedRequest(token), fromEither, chainW(linkRequest(createLinkfromSearchId(searchId))), map((response) => response.value))();
|
|
17346
17358
|
onChange("activeIonLink", async (newLink) => {
|
|
17347
17359
|
const link = newLink ? newLink : state.resetCategoryLink;
|
|
17348
17360
|
if (!link)
|
|
@@ -17399,12 +17411,13 @@ exports.getOrElse = getOrElse$1;
|
|
|
17399
17411
|
exports.has = has;
|
|
17400
17412
|
exports.makeRectangularSearchRequest = makeRectangularSearchRequest;
|
|
17401
17413
|
exports.makeRequest = makeRequest;
|
|
17414
|
+
exports.makeSearchIdRequest = makeSearchIdRequest;
|
|
17415
|
+
exports.makeSearchQueryRequest = makeSearchQueryRequest;
|
|
17416
|
+
exports.makeTextSearchRequest = makeTextSearchRequest;
|
|
17402
17417
|
exports.match = match$1;
|
|
17403
17418
|
exports.parseExcludedToParams = parseExcludedToParams;
|
|
17404
17419
|
exports.pipe = pipe;
|
|
17405
|
-
exports.processSearchIdQuery = processSearchIdQuery;
|
|
17406
17420
|
exports.processSelectedFile = processSelectedFile;
|
|
17407
|
-
exports.processSelectedText = processSelectedText;
|
|
17408
17421
|
exports.scaleByLargestSide = scaleByLargestSide;
|
|
17409
17422
|
exports.scaleWithSized = scaleWithSized;
|
|
17410
17423
|
exports.searchState = searchState;
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
|
-
const search_store = require('./search.store-
|
|
6
|
+
const search_store = require('./search.store-53e13410.js');
|
|
7
7
|
const customizedSlots = require('./customized-slots-dacb282b.js');
|
|
8
|
-
const index$1 = require('./index-
|
|
8
|
+
const index$1 = require('./index-d3a4dc7e.js');
|
|
9
9
|
const resources = require('./resources-c5fbe419.js');
|
|
10
10
|
const PlusIcon = require('./PlusIcon-835a5dcc.js');
|
|
11
|
-
const _package = require('./package-
|
|
11
|
+
const _package = require('./package-fb9ddd08.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" })));
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
|
-
const search_store = require('./search.store-
|
|
6
|
+
const search_store = require('./search.store-53e13410.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-4474431a.js');
|
|
6
|
-
const _package = require('./package-
|
|
6
|
+
const _package = require('./package-fb9ddd08.js');
|
|
7
7
|
const VisualSearchIcon = require('./VisualSearchIcon-f435f5b0.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-4474431a.js');
|
|
6
|
-
const _package = require('./package-
|
|
6
|
+
const _package = require('./package-fb9ddd08.js');
|
|
7
7
|
const customizedSlots = require('./customized-slots-dacb282b.js');
|
|
8
8
|
const constants = require('./constants-7684cbfc.js');
|
|
9
9
|
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
|
-
const search_store = require('./search.store-
|
|
7
|
-
const index$1 = require('./index-
|
|
8
|
-
const _package = require('./package-
|
|
6
|
+
const search_store = require('./search.store-53e13410.js');
|
|
7
|
+
const index$1 = require('./index-d3a4dc7e.js');
|
|
8
|
+
const _package = require('./package-fb9ddd08.js');
|
|
9
9
|
const customizedSlots = require('./customized-slots-dacb282b.js');
|
|
10
10
|
const resources = require('./resources-c5fbe419.js');
|
|
11
11
|
const constants = require('./constants-7684cbfc.js');
|
|
@@ -233,7 +233,7 @@ const VviinnVpsWidget = class {
|
|
|
233
233
|
async handleTextSearch() {
|
|
234
234
|
if (!this.searchQuery)
|
|
235
235
|
return;
|
|
236
|
-
await search_store.
|
|
236
|
+
await search_store.makeTextSearchRequest(this.searchQuery);
|
|
237
237
|
this.slidePosition = 1;
|
|
238
238
|
}
|
|
239
239
|
activeWatcher(active) {
|
|
@@ -285,7 +285,7 @@ const VviinnVpsWidget = class {
|
|
|
285
285
|
this.trackingApi.trackEvent(searchEvent).then(this.setTrackingDeactivated);
|
|
286
286
|
}
|
|
287
287
|
trackTextSearchFilterSelected({ detail }) {
|
|
288
|
-
search_store.
|
|
288
|
+
search_store.makeTextSearchRequest(this.searchQuery, detail);
|
|
289
289
|
}
|
|
290
290
|
connectedCallback() {
|
|
291
291
|
this.isDesktop = checkDeviceType() === "desktop";
|
|
@@ -412,7 +412,7 @@ const VviinnVpsWidget = class {
|
|
|
412
412
|
} }, 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: {
|
|
413
413
|
"filters-wrapper": true,
|
|
414
414
|
hidden: this.showAspectRatioError,
|
|
415
|
-
} }, index.h("div", { class: "filters" }, search_store.searchState.textSearchFilters.map((filter) => (index.h("search-filters", { textSearchFiltersGroup: filter, basicEventData: this.getBasicEventData() }))))))), this.isResultSlide() && (index.h("vviinn-results", { token: this.token, uiSessionId: this.uiSessionId, apiPath: this.apiPath, widgetElementId: (_b = this.buttonElementId) !== null && _b !== void 0 ? _b : this.widgetElementId, showingInWidget: true, buttonElementId: this.buttonElementId, imageResolutionWidth: this.imageResolutionWidth, "currency-sign": this.currencySign, locale: this.locale, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, showAspectRatioError: this.showAspectRatioError, trackingDeactivated: this.trackingDeactivated, resetState: this.resetState.bind(this) })))))));
|
|
415
|
+
} }, index.h("div", { class: "filters" }, search_store.searchState.textSearchFilters.map((filter) => (index.h("search-filters", { textSearchFiltersGroup: filter, basicEventData: this.getBasicEventData() }))))))), this.isResultSlide() && (index.h("vviinn-results", { token: this.token, uiSessionId: this.uiSessionId, apiPath: this.apiPath, widgetElementId: (_b = this.buttonElementId) !== null && _b !== void 0 ? _b : this.widgetElementId, showingInWidget: true, buttonElementId: this.buttonElementId, imageResolutionWidth: this.imageResolutionWidth, "currency-sign": this.currencySign, locale: this.locale, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, showAspectRatioError: this.showAspectRatioError, trackingDeactivated: this.trackingDeactivated, resetState: this.resetState.bind(this), textSearchQuery: this.searchQuery })))))));
|
|
416
416
|
}
|
|
417
417
|
get el() { return index.getElement(this); }
|
|
418
418
|
static get watchers() { return {
|
|
@@ -20,7 +20,7 @@ const patchBrowser = () => {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
patchBrowser().then(options => {
|
|
23
|
-
return index.bootstrapLazy(JSON.parse("[[\"vviinn-button.cjs\",[[1,\"vviinn-button\",{\"addStyle\":[4,\"add-style\"]}]]],[\"vviinn-preloader.cjs\",[[1,\"vviinn-preloader\"]]],[\"vviinn-error.cjs\",[[1,\"vviinn-error\"]]],[\"vviinn-carousel_6.cjs\",[[1,\"vviinn-vpr-widget\",{\"token\":[1],\"productId\":[1,\"product-id\"],\"mode\":[1],\"campaigns\":[1],\"excluded\":[1],\"campaignType\":[1,\"campaign-type\"],\"locale\":[1],\"color\":[1],\"imageWidth\":[2,\"image-width\"],\"imageRatio\":[2,\"image-ratio\"],\"cssUrl\":[1,\"css-url\"],\"currencySign\":[1,\"currency-sign\"],\"pricePrefix\":[1,\"price-prefix\"],\"noResultText\":[1,\"no-result-text\"],\"noResultShow\":[4,\"no-result-show\"],\"gridArrowsDynamic\":[4,\"grid-arrows-dynamic\"],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"addToBasketShow\":[4,\"add-to-basket-show\"],\"showFilters\":[4,\"show-filters\"],\"showExtendedFilters\":[4,\"show-extended-filters\"],\"setModeDiscounts\":[1,\"set-mode-discounts\"],\"updateButtonLocation\":[1,\"update-button-location\"],\"blockTitle\":[1,\"block-title\"],\"showScroll\":[4,\"show-scroll\"],\"apiPath\":[1,\"api-path\"],\"useCarousel\":[4,\"use-carousel\"],\"showingInButton\":[4,\"showing-in-button\"],\"buttonElementId\":[1,\"button-element-id\"],\"closed\":[4],\"opened\":[4],\"recommendations\":[32],\"dynamicFilters\":[32],\"sourceProduct\":[32],\"trackingDeactivated\":[32],\"hasErrorOnLoad\":[32],\"updatingAllCards\":[32],\"updatedCardsAmount\":[32],\"setModeDiscountsArray\":[32]},[[0,\"vviinnProductLoad\",\"trackProductLoad\"],[0,\"vviinnProductView\",\"trackProductView\"],[0,\"vviinnProductClick\",\"trackProductClick\"],[0,\"vviinnAuxClick\",\"trackAuxClick\"],[0,\"vviinnAddToBasket\",\"trackAddToBasket\"],[0,\"vviinnUpdatingAllCardsFinished\",\"updatingAllCardsFinishedListener\"],[0,\"vviinnFiltersChanged\",\"filtersChanged\"]]],[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\"],\"replaceSlotsContent\":[16],\"setModeDiscountsArray\":[16],\"imageRatio\":[2,\"image-ratio\"],\"currencySign\":[1,\"currency-sign\"],\"pricePrefix\":[1,\"price-prefix\"],\"locale\":[1],\"moveDirection\":[32],\"contentGroups\":[32],\"activeContentGroup\":[32],\"isRTL\":[32],\"crossSellingRecommendations\":[32],\"setModeDiscount\":[32],\"currentDiscountIndex\":[32],\"setModeAppliedDiscounts\":[32]},[[0,\"vviinnCrossSellingClick\",\"crossSellingClickListener\"],[0,\"vviinnAddToBasket\",\"trackAddToBasket\"]]],[1,\"vviinn-extended-filters\",{\"filters\":[16],\"filtersString\":[1,\"filters-string\"],\"locale\":[1],\"requestFilters\":[32],\"showMore\":[32],\"selectedMoreOptions\":[32]}],[1,\"vviinn-filters\",{\"filters\":[16],\"filtersString\":[1,\"filters-string\"],\"selectedFilter\":[32],\"requestFilters\":[32]}],[1,\"vviinn-product-card\",{\"brand\":[1],\"currency\":[1],\"deeplink\":[1],\"image\":[1],\"imageRatio\":[2,\"image-ratio\"],\"imageWidth\":[2,\"image-width\"],\"locale\":[1],\"price\":[2],\"pricePrefix\":[1,\"price-prefix\"],\"productId\":[1,\"product-id\"],\"productTitle\":[1,\"product-title\"],\"productType\":[1,\"product-type\"],\"salePrice\":[2,\"sale-price\"],\"responsive\":[4],\"dimmedBackground\":[4,\"dimmed-background\"],\"mode\":[1],\"basketButtonShow\":[4,\"basket-button-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],\"basketButonPressed\":[32]},[[0,\"vviinnCrossSellingClick\",\"crossSellingClickListener\"]]],[1,\"vviinn-skeleton\",{\"height\":[2],\"halfWidth\":[4,\"half-width\"]}]]],[\"search-filters_18.cjs\",[[1,\"vviinn-results\",{\"token\":[1],\"searchId\":[1,\"search-id\"],\"imageResolutionWidth\":[2,\"image-resolution-width\"],\"currencySign\":[1,\"currency-sign\"],\"locale\":[8],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"showingInWidget\":[4,\"showing-in-widget\"],\"uiSessionId\":[1025,\"ui-session-id\"],\"buttonElementId\":[1,\"button-element-id\"],\"widgetElementId\":[1,\"widget-element-id\"],\"apiPath\":[1,\"api-path\"],\"showAspectRatioError\":[4,\"show-aspect-ratio-error\"],\"trackingDeactivated\":[1028,\"tracking-deactivated\"],\"resetState\":[16],\"recommendations\":[32]},[[0,\"vviinnProductLoad\",\"trackProductLoad\"],[0,\"vviinnProductView\",\"trackProductView\"],[0,\"vviinnProductClick\",\"trackProductClick\"],[0,\"vviinnAuxClick\",\"trackAuxClick\"]]],[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-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-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-empty-results\",{\"handler\":[16]}],[1,\"vviinn-wrong-aspect-ratio\",{\"handler\":[16]}],[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],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"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,\"vviinnResultLoad\",\"resultLoadHandler\"],[0,\"vviinnResultView\",\"resultViewHandler\"],[0,\"vviinnCameraEnabled\",\"trackCameraEnabled\"],[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],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"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\"],\"imageRatio\":[2,\"image-ratio\"],\"cssUrl\":[1,\"css-url\"],\"currencySign\":[1,\"currency-sign\"],\"pricePrefix\":[1,\"price-prefix\"],\"noResultText\":[1,\"no-result-text\"],\"noResultShow\":[4,\"no-result-show\"],\"gridArrowsDynamic\":[4,\"grid-arrows-dynamic\"],\"excluded\":[1],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"addToBasketShow\":[4,\"add-to-basket-show\"],\"showFilters\":[4,\"show-filters\"],\"setModeDiscounts\":[1,\"set-mode-discounts\"],\"updateButtonLocation\":[1,\"update-button-location\"],\"buttonChildren\":[16],\"apiPath\":[1,\"api-path\"],\"buttonElementId\":[1,\"button-element-id\"],\"widgetVersion\":[1,\"widget-version\"],\"showingInButton\":[4,\"showing-in-button\"],\"state\":[32]},[[0,\"vviinnUpdatingAllCardsStarted\",\"updatingAllCardsStarted\"],[0,\"vviinnUpdatingAllCardsFinished\",\"updatingAllCardsFinished\"],[16,\"click\",\"bodyClickListener\"]]]]],[\"vviinn-vpr-button.cjs\",[[1,\"vviinn-vpr-button\",{\"token\":[1],\"productId\":[1,\"product-id\"],\"mode\":[1],\"campaigns\":[1],\"excluded\":[1],\"campaignType\":[1,\"campaign-type\"],\"locale\":[1],\"color\":[1],\"imageWidth\":[2,\"image-width\"],\"imageRatio\":[2,\"image-ratio\"],\"cssUrl\":[1,\"css-url\"],\"currencySign\":[1,\"currency-sign\"],\"pricePrefix\":[1,\"price-prefix\"],\"noResultText\":[1,\"no-result-text\"],\"noResultShow\":[4,\"no-result-show\"],\"gridArrowsDynamic\":[4,\"grid-arrows-dynamic\"],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"addToBasketShow\":[4,\"add-to-basket-show\"],\"showFilters\":[4,\"show-filters\"],\"setModeDiscounts\":[1,\"set-mode-discounts\"],\"updateButtonLocation\":[1,\"update-button-location\"],\"sidebarTitle\":[1,\"sidebar-title\"],\"modalScrollbar\":[4,\"modal-scrollbar\"],\"position\":[1],\"sourceImage\":[1,\"source-image\"],\"addStyle\":[4,\"add-style\"],\"apiPath\":[1,\"api-path\"]}]]]]"), options);
|
|
23
|
+
return index.bootstrapLazy(JSON.parse("[[\"vviinn-button.cjs\",[[1,\"vviinn-button\",{\"addStyle\":[4,\"add-style\"]}]]],[\"vviinn-preloader.cjs\",[[1,\"vviinn-preloader\"]]],[\"vviinn-error.cjs\",[[1,\"vviinn-error\"]]],[\"vviinn-carousel_6.cjs\",[[1,\"vviinn-vpr-widget\",{\"token\":[1],\"productId\":[1,\"product-id\"],\"mode\":[1],\"campaigns\":[1],\"excluded\":[1],\"campaignType\":[1,\"campaign-type\"],\"locale\":[1],\"color\":[1],\"imageWidth\":[2,\"image-width\"],\"imageRatio\":[2,\"image-ratio\"],\"cssUrl\":[1,\"css-url\"],\"currencySign\":[1,\"currency-sign\"],\"pricePrefix\":[1,\"price-prefix\"],\"noResultText\":[1,\"no-result-text\"],\"noResultShow\":[4,\"no-result-show\"],\"gridArrowsDynamic\":[4,\"grid-arrows-dynamic\"],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"addToBasketShow\":[4,\"add-to-basket-show\"],\"showFilters\":[4,\"show-filters\"],\"showExtendedFilters\":[4,\"show-extended-filters\"],\"setModeDiscounts\":[1,\"set-mode-discounts\"],\"updateButtonLocation\":[1,\"update-button-location\"],\"blockTitle\":[1,\"block-title\"],\"showScroll\":[4,\"show-scroll\"],\"apiPath\":[1,\"api-path\"],\"useCarousel\":[4,\"use-carousel\"],\"showingInButton\":[4,\"showing-in-button\"],\"buttonElementId\":[1,\"button-element-id\"],\"closed\":[4],\"opened\":[4],\"recommendations\":[32],\"dynamicFilters\":[32],\"sourceProduct\":[32],\"trackingDeactivated\":[32],\"hasErrorOnLoad\":[32],\"updatingAllCards\":[32],\"updatedCardsAmount\":[32],\"setModeDiscountsArray\":[32]},[[0,\"vviinnProductLoad\",\"trackProductLoad\"],[0,\"vviinnProductView\",\"trackProductView\"],[0,\"vviinnProductClick\",\"trackProductClick\"],[0,\"vviinnAuxClick\",\"trackAuxClick\"],[0,\"vviinnAddToBasket\",\"trackAddToBasket\"],[0,\"vviinnUpdatingAllCardsFinished\",\"updatingAllCardsFinishedListener\"],[0,\"vviinnFiltersChanged\",\"filtersChanged\"]]],[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\"],\"replaceSlotsContent\":[16],\"setModeDiscountsArray\":[16],\"imageRatio\":[2,\"image-ratio\"],\"currencySign\":[1,\"currency-sign\"],\"pricePrefix\":[1,\"price-prefix\"],\"locale\":[1],\"moveDirection\":[32],\"contentGroups\":[32],\"activeContentGroup\":[32],\"isRTL\":[32],\"crossSellingRecommendations\":[32],\"setModeDiscount\":[32],\"currentDiscountIndex\":[32],\"setModeAppliedDiscounts\":[32]},[[0,\"vviinnCrossSellingClick\",\"crossSellingClickListener\"],[0,\"vviinnAddToBasket\",\"trackAddToBasket\"]]],[1,\"vviinn-extended-filters\",{\"filters\":[16],\"filtersString\":[1,\"filters-string\"],\"locale\":[1],\"requestFilters\":[32],\"showMore\":[32],\"selectedMoreOptions\":[32]}],[1,\"vviinn-filters\",{\"filters\":[16],\"filtersString\":[1,\"filters-string\"],\"selectedFilter\":[32],\"requestFilters\":[32]}],[1,\"vviinn-product-card\",{\"brand\":[1],\"currency\":[1],\"deeplink\":[1],\"image\":[1],\"imageRatio\":[2,\"image-ratio\"],\"imageWidth\":[2,\"image-width\"],\"locale\":[1],\"price\":[2],\"pricePrefix\":[1,\"price-prefix\"],\"productId\":[1,\"product-id\"],\"productTitle\":[1,\"product-title\"],\"productType\":[1,\"product-type\"],\"salePrice\":[2,\"sale-price\"],\"responsive\":[4],\"dimmedBackground\":[4,\"dimmed-background\"],\"mode\":[1],\"basketButtonShow\":[4,\"basket-button-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],\"basketButonPressed\":[32]},[[0,\"vviinnCrossSellingClick\",\"crossSellingClickListener\"]]],[1,\"vviinn-skeleton\",{\"height\":[2],\"halfWidth\":[4,\"half-width\"]}]]],[\"search-filters_18.cjs\",[[1,\"vviinn-results\",{\"token\":[1],\"searchId\":[1,\"search-id\"],\"imageResolutionWidth\":[2,\"image-resolution-width\"],\"currencySign\":[1,\"currency-sign\"],\"locale\":[8],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"textSearchQuery\":[1,\"text-search-query\"],\"showingInWidget\":[4,\"showing-in-widget\"],\"uiSessionId\":[1025,\"ui-session-id\"],\"buttonElementId\":[1,\"button-element-id\"],\"widgetElementId\":[1,\"widget-element-id\"],\"apiPath\":[1,\"api-path\"],\"showAspectRatioError\":[4,\"show-aspect-ratio-error\"],\"trackingDeactivated\":[1028,\"tracking-deactivated\"],\"resetState\":[16],\"recommendations\":[32]},[[0,\"vviinnProductLoad\",\"trackProductLoad\"],[0,\"vviinnProductView\",\"trackProductView\"],[0,\"vviinnProductClick\",\"trackProductClick\"],[0,\"vviinnAuxClick\",\"trackAuxClick\"]]],[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-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-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-empty-results\",{\"handler\":[16]}],[1,\"vviinn-wrong-aspect-ratio\",{\"handler\":[16]}],[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],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"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,\"vviinnResultLoad\",\"resultLoadHandler\"],[0,\"vviinnResultView\",\"resultViewHandler\"],[0,\"vviinnCameraEnabled\",\"trackCameraEnabled\"],[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],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"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\"],\"imageRatio\":[2,\"image-ratio\"],\"cssUrl\":[1,\"css-url\"],\"currencySign\":[1,\"currency-sign\"],\"pricePrefix\":[1,\"price-prefix\"],\"noResultText\":[1,\"no-result-text\"],\"noResultShow\":[4,\"no-result-show\"],\"gridArrowsDynamic\":[4,\"grid-arrows-dynamic\"],\"excluded\":[1],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"addToBasketShow\":[4,\"add-to-basket-show\"],\"showFilters\":[4,\"show-filters\"],\"setModeDiscounts\":[1,\"set-mode-discounts\"],\"updateButtonLocation\":[1,\"update-button-location\"],\"buttonChildren\":[16],\"apiPath\":[1,\"api-path\"],\"buttonElementId\":[1,\"button-element-id\"],\"widgetVersion\":[1,\"widget-version\"],\"showingInButton\":[4,\"showing-in-button\"],\"state\":[32]},[[0,\"vviinnUpdatingAllCardsStarted\",\"updatingAllCardsStarted\"],[0,\"vviinnUpdatingAllCardsFinished\",\"updatingAllCardsFinished\"],[16,\"click\",\"bodyClickListener\"]]]]],[\"vviinn-vpr-button.cjs\",[[1,\"vviinn-vpr-button\",{\"token\":[1],\"productId\":[1,\"product-id\"],\"mode\":[1],\"campaigns\":[1],\"excluded\":[1],\"campaignType\":[1,\"campaign-type\"],\"locale\":[1],\"color\":[1],\"imageWidth\":[2,\"image-width\"],\"imageRatio\":[2,\"image-ratio\"],\"cssUrl\":[1,\"css-url\"],\"currencySign\":[1,\"currency-sign\"],\"pricePrefix\":[1,\"price-prefix\"],\"noResultText\":[1,\"no-result-text\"],\"noResultShow\":[4,\"no-result-show\"],\"gridArrowsDynamic\":[4,\"grid-arrows-dynamic\"],\"productDetailsNewTab\":[4,\"product-details-new-tab\"],\"productDetailsRedirect\":[4,\"product-details-redirect\"],\"addToBasketShow\":[4,\"add-to-basket-show\"],\"showFilters\":[4,\"show-filters\"],\"setModeDiscounts\":[1,\"set-mode-discounts\"],\"updateButtonLocation\":[1,\"update-button-location\"],\"sidebarTitle\":[1,\"sidebar-title\"],\"modalScrollbar\":[4,\"modal-scrollbar\"],\"position\":[1],\"sourceImage\":[1,\"source-image\"],\"addStyle\":[4,\"add-style\"],\"apiPath\":[1,\"api-path\"]}]]]]"), options);
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
exports.setNonce = index.setNonce;
|
|
@@ -14,11 +14,12 @@ import { Host, h, } from "@stencil/core";
|
|
|
14
14
|
import * as E from "fp-ts/Either";
|
|
15
15
|
import { v4 as uuidv4 } from "uuid";
|
|
16
16
|
import { version } from "../../../package.json";
|
|
17
|
-
import {
|
|
17
|
+
import { makeSearchIdRequest, makeSearchQueryRequest, searchState, } from "../../store/search.store";
|
|
18
18
|
import { state } from "../../store/store";
|
|
19
19
|
import { createTrackingApi } from "../../openApi";
|
|
20
20
|
import { campaignTypeNames } from "../../campaign/Campaign";
|
|
21
21
|
import { createProductVpsEventByType, createResultVpsEventByType, } from "../../tracking";
|
|
22
|
+
import { pipe } from "fp-ts/lib/function";
|
|
22
23
|
/**
|
|
23
24
|
* @part product-card - Product Card itself.
|
|
24
25
|
* @part brand - Brand inside Product Card.
|
|
@@ -42,12 +43,13 @@ export class VviinnResults {
|
|
|
42
43
|
const { searchId } = detail;
|
|
43
44
|
this.getResultsBySearchId(searchId);
|
|
44
45
|
};
|
|
45
|
-
this.getResultsBySearchId = async (
|
|
46
|
-
if (!
|
|
46
|
+
this.getResultsBySearchId = async (searchId) => {
|
|
47
|
+
if (!searchId)
|
|
47
48
|
return;
|
|
48
49
|
state.apiPath = this.apiPath; //FIXME: #36877
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
pipe(await makeSearchIdRequest(searchId, this.token), E.getOrElse(() => []), (results) => {
|
|
51
|
+
this.recommendations = results;
|
|
52
|
+
});
|
|
51
53
|
};
|
|
52
54
|
this.setTrackingDeactivated = (result) => {
|
|
53
55
|
if (result.status === "rejected") {
|
|
@@ -70,6 +72,7 @@ export class VviinnResults {
|
|
|
70
72
|
this.locale = "de-DE";
|
|
71
73
|
this.productDetailsNewTab = true;
|
|
72
74
|
this.productDetailsRedirect = true;
|
|
75
|
+
this.textSearchQuery = undefined;
|
|
73
76
|
this.showingInWidget = false;
|
|
74
77
|
this.uiSessionId = undefined;
|
|
75
78
|
this.buttonElementId = undefined;
|
|
@@ -87,13 +90,11 @@ export class VviinnResults {
|
|
|
87
90
|
}
|
|
88
91
|
document.addEventListener("vviinnSearchIdReceived", this.searchIdReceivedHandler);
|
|
89
92
|
this.getResultsBySearchId(this.searchId);
|
|
93
|
+
this.getResultsByTextQuery(this.textSearchQuery);
|
|
90
94
|
}
|
|
91
95
|
disconnectedCallback() {
|
|
92
96
|
document.removeEventListener("vviinnSearchIdReceived", this.searchIdReceivedHandler);
|
|
93
97
|
}
|
|
94
|
-
processSearchId(newSearchIdProp) {
|
|
95
|
-
this.getResultsBySearchId(newSearchIdProp);
|
|
96
|
-
}
|
|
97
98
|
trackProductLoad({ detail }) {
|
|
98
99
|
const productLoadEvent = this.getProductTrackEvent(detail, "load");
|
|
99
100
|
if (!productLoadEvent)
|
|
@@ -145,6 +146,15 @@ export class VviinnResults {
|
|
|
145
146
|
.then(this.setTrackingDeactivated);
|
|
146
147
|
}
|
|
147
148
|
}
|
|
149
|
+
async getResultsByTextQuery(query) {
|
|
150
|
+
if (this.showingInWidget || query === undefined)
|
|
151
|
+
return;
|
|
152
|
+
state.apiPath = this.apiPath; //FIXME: #36877
|
|
153
|
+
pipe(await makeSearchQueryRequest(query, this.token), E.getOrElse(() => null), (results) => {
|
|
154
|
+
var _a, _b;
|
|
155
|
+
this.recommendations = (_b = (_a = results === null || results === void 0 ? void 0 : results.data) === null || _a === void 0 ? void 0 : _a.products) !== null && _b !== void 0 ? _b : [];
|
|
156
|
+
});
|
|
157
|
+
}
|
|
148
158
|
trackResultEvent(type) {
|
|
149
159
|
if (this.trackingDeactivated)
|
|
150
160
|
return;
|
|
@@ -353,6 +363,23 @@ export class VviinnResults {
|
|
|
353
363
|
"reflect": false,
|
|
354
364
|
"defaultValue": "true"
|
|
355
365
|
},
|
|
366
|
+
"textSearchQuery": {
|
|
367
|
+
"type": "string",
|
|
368
|
+
"mutable": false,
|
|
369
|
+
"complexType": {
|
|
370
|
+
"original": "string",
|
|
371
|
+
"resolved": "string",
|
|
372
|
+
"references": {}
|
|
373
|
+
},
|
|
374
|
+
"required": false,
|
|
375
|
+
"optional": true,
|
|
376
|
+
"docs": {
|
|
377
|
+
"tags": [],
|
|
378
|
+
"text": "Query for performing text search"
|
|
379
|
+
},
|
|
380
|
+
"attribute": "text-search-query",
|
|
381
|
+
"reflect": false
|
|
382
|
+
},
|
|
356
383
|
"showingInWidget": {
|
|
357
384
|
"type": "boolean",
|
|
358
385
|
"mutable": false,
|
|
@@ -625,12 +652,6 @@ export class VviinnResults {
|
|
|
625
652
|
}];
|
|
626
653
|
}
|
|
627
654
|
static get elementRef() { return "el"; }
|
|
628
|
-
static get watchers() {
|
|
629
|
-
return [{
|
|
630
|
-
"propName": "searchId",
|
|
631
|
-
"methodName": "processSearchId"
|
|
632
|
-
}];
|
|
633
|
-
}
|
|
634
655
|
static get listeners() {
|
|
635
656
|
return [{
|
|
636
657
|
"name": "vviinnProductLoad",
|
|
@@ -15,7 +15,7 @@ import * as O from "fp-ts/lib/Option";
|
|
|
15
15
|
import { v4 as uuidv4 } from "uuid";
|
|
16
16
|
import i18next from "i18next";
|
|
17
17
|
import { version } from "../../../package.json";
|
|
18
|
-
import {
|
|
18
|
+
import { makeTextSearchRequest, searchState } from "../../store/search.store";
|
|
19
19
|
import { state } from "../../store/store";
|
|
20
20
|
import { slotChangeListener } from "../customized-slots";
|
|
21
21
|
import { createTrackingApi } from "../../openApi";
|
|
@@ -238,7 +238,7 @@ export class VviinnVpsWidget {
|
|
|
238
238
|
async handleTextSearch() {
|
|
239
239
|
if (!this.searchQuery)
|
|
240
240
|
return;
|
|
241
|
-
await
|
|
241
|
+
await makeTextSearchRequest(this.searchQuery);
|
|
242
242
|
this.slidePosition = 1;
|
|
243
243
|
}
|
|
244
244
|
activeWatcher(active) {
|
|
@@ -290,7 +290,7 @@ export class VviinnVpsWidget {
|
|
|
290
290
|
this.trackingApi.trackEvent(searchEvent).then(this.setTrackingDeactivated);
|
|
291
291
|
}
|
|
292
292
|
trackTextSearchFilterSelected({ detail }) {
|
|
293
|
-
|
|
293
|
+
makeTextSearchRequest(this.searchQuery, detail);
|
|
294
294
|
}
|
|
295
295
|
connectedCallback() {
|
|
296
296
|
this.isDesktop = checkDeviceType() === "desktop";
|
|
@@ -417,7 +417,7 @@ export class VviinnVpsWidget {
|
|
|
417
417
|
} }, h("div", { class: "filters" }, searchState.filters.map((filter) => (h("search-filters", { filter: filter, basicEventData: this.getBasicEventData() }))))))), this.isResultSlide() && searchState.searchType === "text" && (h("div", { class: "source-wrapper text-search-wrapper" }, h("vviinn-text-search", { searchQuery: this.searchQuery, setSearchQuery: this.setSearchQuery, handleTextSearch: this.handleTextSearch.bind(this) }), h("div", { class: {
|
|
418
418
|
"filters-wrapper": true,
|
|
419
419
|
hidden: this.showAspectRatioError,
|
|
420
|
-
} }, h("div", { class: "filters" }, searchState.textSearchFilters.map((filter) => (h("search-filters", { textSearchFiltersGroup: filter, basicEventData: this.getBasicEventData() }))))))), this.isResultSlide() && (h("vviinn-results", { token: this.token, uiSessionId: this.uiSessionId, apiPath: this.apiPath, widgetElementId: (_b = this.buttonElementId) !== null && _b !== void 0 ? _b : this.widgetElementId, showingInWidget: true, buttonElementId: this.buttonElementId, imageResolutionWidth: this.imageResolutionWidth, "currency-sign": this.currencySign, locale: this.locale, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, showAspectRatioError: this.showAspectRatioError, trackingDeactivated: this.trackingDeactivated, resetState: this.resetState.bind(this) })))))));
|
|
420
|
+
} }, h("div", { class: "filters" }, searchState.textSearchFilters.map((filter) => (h("search-filters", { textSearchFiltersGroup: filter, basicEventData: this.getBasicEventData() }))))))), this.isResultSlide() && (h("vviinn-results", { token: this.token, uiSessionId: this.uiSessionId, apiPath: this.apiPath, widgetElementId: (_b = this.buttonElementId) !== null && _b !== void 0 ? _b : this.widgetElementId, showingInWidget: true, buttonElementId: this.buttonElementId, imageResolutionWidth: this.imageResolutionWidth, "currency-sign": this.currencySign, locale: this.locale, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, showAspectRatioError: this.showAspectRatioError, trackingDeactivated: this.trackingDeactivated, resetState: this.resetState.bind(this), textSearchQuery: this.searchQuery })))))));
|
|
421
421
|
}
|
|
422
422
|
static get is() { return "vviinn-vps-widget"; }
|
|
423
423
|
static get encapsulation() { return "shadow"; }
|
|
@@ -106,7 +106,7 @@ export const uploadFile = (file) => {
|
|
|
106
106
|
return error;
|
|
107
107
|
}));
|
|
108
108
|
};
|
|
109
|
-
const
|
|
109
|
+
export const makeTextSearchRequest = async (query, dynamicFilters) => {
|
|
110
110
|
state.searchType = "text";
|
|
111
111
|
state.loading = true;
|
|
112
112
|
const body = Object.assign(Object.assign({ query }, (dynamicFilters
|
|
@@ -132,10 +132,22 @@ const uploadText = (query, dynamicFilters) => {
|
|
|
132
132
|
state.serverError = true;
|
|
133
133
|
state.loading = false;
|
|
134
134
|
return error;
|
|
135
|
-
}));
|
|
135
|
+
}))();
|
|
136
|
+
};
|
|
137
|
+
export const makeSearchQueryRequest = async (query, token) => {
|
|
138
|
+
const body = {
|
|
139
|
+
query,
|
|
140
|
+
};
|
|
141
|
+
const tokenWithBody = sequenceToEither(processBearerToken(token), E.right(JSON.stringify(body)));
|
|
142
|
+
return pipe(tokenWithBody, E.map(([headers, body]) => {
|
|
143
|
+
headers.set("Content-Type", "application/json");
|
|
144
|
+
return {
|
|
145
|
+
headers,
|
|
146
|
+
body,
|
|
147
|
+
};
|
|
148
|
+
}), TE.fromEither, TE.chain((request) => textSearchSessionClient(request)))();
|
|
136
149
|
};
|
|
137
|
-
export const
|
|
138
|
-
export const processSearchIdQuery = async (searchId, token) => await pipe(makeAuthorizedRequest(token), TE.fromEither, TE.chainW(linkRequest(createLinkfromSearchId(searchId))), TE.map((response) => response.value))();
|
|
150
|
+
export const makeSearchIdRequest = async (searchId, token) => await pipe(makeAuthorizedRequest(token), TE.fromEither, TE.chainW(linkRequest(createLinkfromSearchId(searchId))), TE.map((response) => response.value))();
|
|
139
151
|
onChange("activeIonLink", async (newLink) => {
|
|
140
152
|
const link = newLink ? newLink : state.resetCategoryLink;
|
|
141
153
|
if (!link)
|