@sentecacommerce-theme/lib 0.13.7-alpha.7 → 0.13.10
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/LICENSE.md +11 -0
- package/dist/cjs/GDPR/api/index.js +3 -6
- package/dist/cjs/GDPR/api/queries/index.js +3 -6
- package/dist/cjs/GDPR/api/queries/useConfirmConsentQuery.js +1 -2
- package/dist/cjs/GDPR/api/ssr/index.js +2 -4
- package/dist/cjs/GDPR/components/CookiesTable.js +2 -4
- package/dist/cjs/GDPR/components/index.js +2 -4
- package/dist/cjs/GDPR/hooks/index.js +15 -6
- package/dist/cjs/GDPR/hooks/useCheckForCookies.js +10 -0
- package/dist/cjs/GDPR/hooks/useCookies.js +37 -37
- package/dist/cjs/GDPR/index.js +3 -6
- package/dist/cjs/analytics/Pixel/hooks/index.js +39 -6
- package/dist/cjs/analytics/Pixel/hooks/usePixelFinishOrder.js +27 -0
- package/dist/cjs/analytics/Pixel/hooks/usePixelProductClick.js +4 -9
- package/dist/cjs/analytics/Pixel/hooks/usePixelProductDetails.js +19 -4
- package/dist/cjs/analytics/Pixel/hooks/usePixelProductsImpression.js +61 -35
- package/dist/cjs/analytics/Pixel/hooks/usePixelViewBasket.js +24 -0
- package/dist/cjs/analytics/Pixel/hooks/usePixelViewCategory.js +29 -0
- package/dist/cjs/analytics/Pixel/index.js +3 -6
- package/dist/cjs/analytics/Pixel/mainScript.js +258 -99
- package/dist/cjs/analytics/Pixel/minifiedPixel.js +1 -1
- package/dist/cjs/analytics/Pixel/usePixel.js +6 -1
- package/dist/cjs/analytics/Pixel/utils.js +17 -0
- package/dist/cjs/analytics/Releva/api/index.js +2 -4
- package/dist/cjs/analytics/Releva/api/query/index.js +2 -4
- package/dist/cjs/analytics/Releva/api/query/useRelevaQuery.js +1 -0
- package/dist/cjs/analytics/Releva/hooks/index.js +3 -6
- package/dist/cjs/analytics/Releva/hooks/useRelevaData.js +20 -6
- package/dist/cjs/analytics/Releva/index.js +3 -6
- package/dist/cjs/analytics/Releva/types.js +23 -25
- package/dist/cjs/analytics/Releva/useReleva.js +20 -6
- package/dist/cjs/analytics/Releva/utils.js +2 -4
- package/dist/cjs/analytics/viewContent.js +2 -1
- package/dist/cjs/api/addressesApi/index.js +10 -11
- package/dist/cjs/api/brandsApi/index.js +38 -33
- package/dist/cjs/api/catalogApi/index.js +157 -160
- package/dist/cjs/api/categoriesApi/index.js +38 -33
- package/dist/cjs/api/citiesApi/index.js +24 -19
- package/dist/cjs/api/companiesApi/index.js +12 -15
- package/dist/cjs/api/consentsApi/index.js +3 -6
- package/dist/cjs/api/getSDKConfig.js +14 -23
- package/dist/cjs/api/myCartApi/index.js +224 -136
- package/dist/cjs/api/myOrdersApi/index.js +56 -15
- package/dist/cjs/api/myPaymentsBoricaApi/index.js +23 -18
- package/dist/cjs/api/myShippingsEcontApi/index.js +150 -125
- package/dist/cjs/api/myShippingsEvropatApi/index.js +60 -50
- package/dist/cjs/api/myShippingsPickupFromStoreAPI/index.js +7 -7
- package/dist/cjs/api/myShippingsSpeedyApi/index.js +150 -125
- package/dist/cjs/api/notificationsApi/index.js +5 -5
- package/dist/cjs/api/pagesApi/index.js +4 -4
- package/dist/cjs/api/productsApi/index.js +49 -46
- package/dist/cjs/api/searchHistoryApi/index.js +36 -26
- package/dist/cjs/api/usersApi/index.js +2 -3
- package/dist/cjs/api/viewsApi/index.js +37 -32
- package/dist/cjs/api/vouchersApi/index.js +4 -4
- package/dist/cjs/api/walletApi/index.js +3 -6
- package/dist/cjs/api/wishlistApi/index.js +72 -20
- package/dist/cjs/api/wishlistApi/utils/index.js +2 -4
- package/dist/cjs/api.v2/core/checkout/index.js +3 -6
- package/dist/cjs/api.v2/core/checkout/payments/index.js +3 -6
- package/dist/cjs/api.v2/core/checkout/payments/useSetPaymentMethod.js +19 -4
- package/dist/cjs/api.v2/core/checkout/shippings/index.js +3 -6
- package/dist/cjs/api.v2/core/checkout/shippings/mutations/index.js +2 -4
- package/dist/cjs/api.v2/core/checkout/shippings/mutations/useMutateNomenclature.js +19 -14
- package/dist/cjs/api.v2/core/checkout/shippings/queries/index.js +3 -6
- package/dist/cjs/api.v2/core/checkout/shippings/queries/useFindNomenclatureElement.js +67 -56
- package/dist/cjs/api.v2/core/checkout/types.js +6 -8
- package/dist/cjs/api.v2/core/index.js +3 -6
- package/dist/cjs/api.v2/core/misc/index.js +3 -6
- package/dist/cjs/api.v2/core/misc/promo-code/index.js +3 -6
- package/dist/cjs/api.v2/core/misc/promo-code/mutations/usePromoCodeMutation.js +22 -17
- package/dist/cjs/api.v2/core/product/index.js +2 -4
- package/dist/cjs/api.v2/core/product/useSubscribeForSkuMutation.js +19 -4
- package/dist/cjs/api.v2/index.js +2 -4
- package/dist/cjs/basket/api/index.js +2 -4
- package/dist/cjs/basket/api/mutations/index.js +16 -4
- package/dist/cjs/basket/api/mutations/useChangeGiftVariant.js +116 -0
- package/dist/cjs/basket/api/mutations/useReplaceBasketMutation.js +17 -13
- package/dist/cjs/basket/hooks/index.js +15 -6
- package/dist/cjs/basket/hooks/useBasketCrossSaleItems.js +2 -4
- package/dist/cjs/basket/hooks/useChangeGiftVariant.js +16 -0
- package/dist/cjs/basket/index.js +2 -4
- package/dist/cjs/brands/api/index.js +3 -6
- package/dist/cjs/brands/api/queries/index.js +3 -6
- package/dist/cjs/brands/api/queries/keys.js +3 -4
- package/dist/cjs/brands/api/queries/useAllBrandsQuery.js +91 -76
- package/dist/cjs/brands/api/ssr/index.js +3 -6
- package/dist/cjs/brands/hooks/index.js +2 -4
- package/dist/cjs/brands/index.js +3 -6
- package/dist/cjs/build/api/index.js +2 -4
- package/dist/cjs/build/api/query/fetchStore.js +25 -20
- package/dist/cjs/build/api/query/index.js +2 -4
- package/dist/cjs/build/index.js +2 -4
- package/dist/cjs/checkout/api/index.js +3 -6
- package/dist/cjs/checkout/api/keys.js +9 -4
- package/dist/cjs/checkout/api/queries/index.js +15 -6
- package/dist/cjs/checkout/api/queries/useUniCreditCalculateForCartQuery.js +60 -0
- package/dist/cjs/checkout/contexts/BoricaResponseContext.js +3 -6
- package/dist/cjs/checkout/contexts/PaypalResponseContext.js +3 -6
- package/dist/cjs/checkout/contexts/UniCreditResponseContext.js +40 -0
- package/dist/cjs/checkout/contexts/index.js +15 -6
- package/dist/cjs/checkout/hooks/index.js +15 -6
- package/dist/cjs/checkout/hooks/useBnpCalculateForCart.js +8 -14
- package/dist/cjs/checkout/hooks/useUniCreditCalculateForCart.js +93 -0
- package/dist/cjs/checkout/index.js +3 -6
- package/dist/cjs/checkout/ssr/capturePaypalOrder.js +16 -11
- package/dist/cjs/checkout/ssr/captureUniCreditOrder.js +57 -0
- package/dist/cjs/checkout/ssr/index.js +15 -6
- package/dist/cjs/checkout/ssr/verifyBoricaResponse.js +24 -19
- package/dist/cjs/cms/api/index.js +3 -6
- package/dist/cjs/cms/api/mutations/index.js +3 -6
- package/dist/cjs/cms/api/mutations/useCMSFoldersCreateMutation.js +31 -29
- package/dist/cjs/cms/api/mutations/useCMSMediaDeleteAssetsMutation.js +19 -14
- package/dist/cjs/cms/api/mutations/useCMSMediaUploadAssetsMutation.js +21 -35
- package/dist/cjs/cms/api/queries/index.js +3 -6
- package/dist/cjs/cms/api/queries/keys.js +21 -14
- package/dist/cjs/cms/api/queries/useCMSContentListQuery.js +4 -7
- package/dist/cjs/cms/api/queries/useCMSMediaQuery.js +1 -2
- package/dist/cjs/cms/api/queries/useInjectedContentQuery.js +5 -7
- package/dist/cjs/cms/api/utils/index.js +2 -4
- package/dist/cjs/cms/components/RenderInjectedContent.js +5 -11
- package/dist/cjs/cms/components/index.js +2 -4
- package/dist/cjs/cms/hooks/index.js +3 -6
- package/dist/cjs/cms/hooks/useCmsContent.js +4 -8
- package/dist/cjs/cms/hooks/useCmsContentList.js +7 -12
- package/dist/cjs/cms/hooks/useCmsFolders.js +0 -6
- package/dist/cjs/cms/hooks/useCmsMedia.js +0 -6
- package/dist/cjs/cms/hooks/useCmsMediaDeleteAssets.js +0 -6
- package/dist/cjs/cms/hooks/useCmsMediaUploadAssets.js +0 -6
- package/dist/cjs/cms/hooks/useContentCategoriesMap.js +6 -13
- package/dist/cjs/cms/hooks/useCreateCmsFolders.js +0 -6
- package/dist/cjs/cms/hooks/useInjectedContentContext.js +6 -12
- package/dist/cjs/cms/hooks/useListingInjectedContent.js +1 -2
- package/dist/cjs/cms/index.js +3 -6
- package/dist/cjs/cms/ssr/fetchPagePaths.js +3 -3
- package/dist/cjs/cms/ssr/index.js +3 -6
- package/dist/cjs/cms/ssr/prefetchCMSPage.js +34 -29
- package/dist/cjs/cms/ssr/prefetchCmsContent.js +48 -43
- package/dist/cjs/cms/ssr/prefetchCmsContentList.js +52 -50
- package/dist/cjs/cms/utils/index.js +3 -6
- package/dist/cjs/components/AnalyticsScripts/index.js +24 -10
- package/dist/cjs/components/ClickOutside/index.js +2 -4
- package/dist/cjs/components/Drawer/index.js +6 -9
- package/dist/cjs/components/FadeIn/index.js +26 -15
- package/dist/cjs/components/FocusTrap/index.js +2 -4
- package/dist/cjs/components/GoogleOneTap/index.js +40 -22
- package/dist/cjs/components/Html/index.js +2 -4
- package/dist/cjs/components/LazyResponsiveImage/index.js +25 -16
- package/dist/cjs/components/Link/index.js +5 -10
- package/dist/cjs/components/Modal/index.js +2 -4
- package/dist/cjs/components/OverflowEllipsis/index.js +2 -4
- package/dist/cjs/components/ProgressBar/index.js +21 -8
- package/dist/cjs/components/index.js +3 -6
- package/dist/cjs/config/SentecaProvider.js +7 -12
- package/dist/cjs/config/index.js +2 -4
- package/dist/cjs/contexts/CheckoutForm/Components/BoricaRedirect/index.js +21 -8
- package/dist/cjs/contexts/CheckoutForm/Components/CheckoutCustomState/index.js +24 -14
- package/dist/cjs/contexts/CheckoutForm/Components/UniCreditRedirect/index.js +87 -0
- package/dist/cjs/contexts/CheckoutForm/Components/index.js +15 -6
- package/dist/cjs/contexts/CheckoutForm/hooks/index.js +3 -6
- package/dist/cjs/contexts/CheckoutForm/hooks/useBilling/index.js +52 -31
- package/dist/cjs/contexts/CheckoutForm/hooks/usePayment/index.js +20 -6
- package/dist/cjs/contexts/CheckoutForm/hooks/useSavedBillingList/index.js +2 -4
- package/dist/cjs/contexts/CheckoutForm/hooks/useSavedShippingList/index.js +20 -15
- package/dist/cjs/contexts/CheckoutForm/hooks/useShipping/index.js +102 -90
- package/dist/cjs/contexts/CheckoutForm/hooks/useShippingInitialData/index.js +3 -7
- package/dist/cjs/contexts/CheckoutForm/index.js +105 -63
- package/dist/cjs/contexts/CheckoutForm/utils/index.js +3 -6
- package/dist/cjs/contexts/CheckoutForm/utils/updatedNestedObjectProps.js +16 -3
- package/dist/cjs/contexts/CheckoutForm/utils/validateBillingAddress.js +6 -14
- package/dist/cjs/contexts/CheckoutForm/utils/validateShipping.js +12 -23
- package/dist/cjs/contexts/CustomProductProvider/index.js +24 -14
- package/dist/cjs/contexts/Strings.js +34 -37
- package/dist/cjs/hooks/addresses-hooks/index.js +3 -6
- package/dist/cjs/hooks/addresses-hooks/useAddressForm/index.js +40 -52
- package/dist/cjs/hooks/basket-hooks/index.js +3 -6
- package/dist/cjs/hooks/basket-hooks/useBasket/index.js +24 -7
- package/dist/cjs/hooks/basket-hooks/useBasketCustom/index.js +19 -4
- package/dist/cjs/hooks/basket-hooks/useBasketItemList/index.js +5 -10
- package/dist/cjs/hooks/basket-hooks/useBasketItemWithErrorList/index.js +4 -8
- package/dist/cjs/hooks/basket-hooks/useBasketLineItem/index.js +19 -4
- package/dist/cjs/hooks/basket-hooks/useBasketLineItem/utils/index.js +4 -9
- package/dist/cjs/hooks/checkout-hooks/index.js +3 -6
- package/dist/cjs/hooks/checkout-hooks/useAllStockLocations.js +5 -10
- package/dist/cjs/hooks/checkout-hooks/useShippingCourierMethods.js +41 -36
- package/dist/cjs/hooks/cities-hooks/index.js +2 -4
- package/dist/cjs/hooks/cities-hooks/useCities/index.js +19 -4
- package/dist/cjs/hooks/companies-hooks/index.js +3 -6
- package/dist/cjs/hooks/error-handling/index.js +2 -4
- package/dist/cjs/hooks/error-handling/useErrors/index.js +4 -9
- package/dist/cjs/hooks/labels/index.js +3 -6
- package/dist/cjs/hooks/labels/useGlobalLabels/index.js +1 -2
- package/dist/cjs/hooks/order-hooks/api/hooks/index.js +2 -4
- package/dist/cjs/hooks/order-hooks/api/index.js +3 -6
- package/dist/cjs/hooks/order-hooks/api/mutations/index.js +2 -4
- package/dist/cjs/hooks/order-hooks/api/queries/index.js +2 -4
- package/dist/cjs/hooks/order-hooks/api/queries/useOrderGetPaymentMethodQuery.js +2 -4
- package/dist/cjs/hooks/order-hooks/index.js +3 -6
- package/dist/cjs/hooks/order-hooks/useGenericCourierAddress/index.js +103 -68
- package/dist/cjs/hooks/order-hooks/useOrder/index.js +3 -16
- package/dist/cjs/hooks/order-hooks/useOrderGetPaymentMethod/index.js +0 -6
- package/dist/cjs/hooks/order-hooks/useOrderPaymentMethods/index.js +2 -4
- package/dist/cjs/hooks/order-hooks/useOrdersList/index.js +2 -4
- package/dist/cjs/hooks/order-hooks/usePayOrder/index.js +66 -58
- package/dist/cjs/hooks/order-hooks/useUpdateOrderPaymentMethod/index.js +20 -7
- package/dist/cjs/hooks/profile-hooks/index.js +3 -6
- package/dist/cjs/hooks/subscriptions-hooks/index.js +3 -6
- package/dist/cjs/hooks/subscriptions-hooks/useAcceptOnRegister/index.js +21 -8
- package/dist/cjs/hooks/subscriptions-hooks/useAllSubscriptions/index.js +32 -33
- package/dist/cjs/hooks/subscriptions-hooks/useSubscribeForProduct/index.js +20 -6
- package/dist/cjs/hooks/ui-hooks/index.js +3 -6
- package/dist/cjs/hooks/ui-hooks/useAccordion/index.js +19 -5
- package/dist/cjs/hooks/ui-hooks/useBoolean/index.js +21 -6
- package/dist/cjs/hooks/ui-hooks/useCallbackRef/index.js +21 -15
- package/dist/cjs/hooks/ui-hooks/useClickOutside/index.js +2 -2
- package/dist/cjs/hooks/ui-hooks/useIsIos/index.js +19 -4
- package/dist/cjs/hooks/ui-hooks/useMenuAim/index.js +19 -4
- package/dist/cjs/hooks/ui-hooks/useMergeRefs/index.js +2 -4
- package/dist/cjs/hooks/ui-hooks/usePagination/index.js +19 -14
- package/dist/cjs/hooks/ui-hooks/useScrollDirection/index.js +21 -7
- package/dist/cjs/hooks/ui-hooks/useScrollTo/index.js +23 -9
- package/dist/cjs/hooks/ui-hooks/useSlideshow/index.js +21 -6
- package/dist/cjs/hooks/ui-hooks/useToggleNavbarOnScroll/index.js +3 -3
- package/dist/cjs/hooks/ui-hooks/useUI/index.js +34 -35
- package/dist/cjs/hooks/ui-hooks/useWindowDimensions/index.js +19 -4
- package/dist/cjs/hooks/useAddressList/index.js +2 -3
- package/dist/cjs/hooks/useAggregateResult/index.js +7 -5
- package/dist/cjs/hooks/useAvailability/index.js +28 -14
- package/dist/cjs/hooks/useCarousel/component/index.js +12 -17
- package/dist/cjs/hooks/useCarousel/helpers/eventStore.js +2 -2
- package/dist/cjs/hooks/useCarousel/index.js +20 -6
- package/dist/cjs/hooks/useCatalogResult/index.js +2 -2
- package/dist/cjs/hooks/useCategoryTree/index.js +1 -2
- package/dist/cjs/hooks/useCheckoutBillingAddress/index.js +96 -7
- package/dist/cjs/hooks/useCheckoutDelivery/index.js +71 -58
- package/dist/cjs/hooks/useCheckoutDiscountCode/index.js +19 -4
- package/dist/cjs/hooks/useCheckoutPickupFromStore/index.js +21 -8
- package/dist/cjs/hooks/useCheckoutShippingAddress/index.js +19 -4
- package/dist/cjs/hooks/useCheckoutShippingModule/index.js +4 -6
- package/dist/cjs/hooks/useCheckoutSubmit/index.js +97 -58
- package/dist/cjs/hooks/useClearAllFilters/index.js +4 -4
- package/dist/cjs/hooks/useContactForm/index.js +8 -4
- package/dist/cjs/hooks/useCopyToClipboard/index.js +20 -4
- package/dist/cjs/hooks/useForceUpdate/index.js +19 -4
- package/dist/cjs/hooks/useLineItem/LineItemContext.js +87 -0
- package/dist/cjs/hooks/useLineItem/index.js +35 -26
- package/dist/cjs/hooks/useLocalRating/index.js +23 -10
- package/dist/cjs/hooks/usePrefetchProduct/index.js +19 -4
- package/dist/cjs/hooks/useProduct/index.js +23 -271
- package/dist/cjs/hooks/useProduct/utils/index.js +75 -57
- package/dist/cjs/hooks/useProductVariants/index.js +350 -0
- package/dist/cjs/hooks/useProductVariants/types.js +3 -0
- package/dist/cjs/hooks/useProgressBar/helpers/index.js +3 -6
- package/dist/cjs/hooks/useProgressBar/hooks/index.js +3 -6
- package/dist/cjs/hooks/useProgressBar/hooks/useGetSetState.js +4 -7
- package/dist/cjs/hooks/useProgressBar/hooks/useUpdate.js +21 -8
- package/dist/cjs/hooks/useProgressBar/index.js +23 -11
- package/dist/cjs/hooks/usePromoCode/index.js +20 -6
- package/dist/cjs/hooks/useSearchbar/index.js +86 -74
- package/dist/cjs/hooks/useShippingAddress/index.js +2 -4
- package/dist/cjs/hooks/useSizesReducer/index.js +24 -12
- package/dist/cjs/hooks/useVouchers/index.js +1 -1
- package/dist/cjs/hooks/useWallet/index.js +2 -4
- package/dist/cjs/hooks/useZoom/index.js +23 -10
- package/dist/cjs/hooks/user-hooks/index.js +3 -6
- package/dist/cjs/hooks/user-hooks/useSubscribeToNewsletter/index.js +49 -7
- package/dist/cjs/hooks/wishlist-hooks/index.js +3 -6
- package/dist/cjs/hooks/wishlist-hooks/useWishlist/index.js +19 -4
- package/dist/cjs/hooks/wishlist-hooks/useWishlistItem/index.js +59 -21
- package/dist/cjs/index.js +19 -34
- package/dist/cjs/listing/api/index.js +3 -6
- package/dist/cjs/listing/api/keys.js +4 -5
- package/dist/cjs/listing/api/queries/useAggregateQuery.js +7 -10
- package/dist/cjs/listing/api/queries/useInfiniteListing.js +2 -4
- package/dist/cjs/listing/api/queries/useLabelsQuery.js +19 -10
- package/dist/cjs/listing/api/queries/useListingQuery.js +26 -9
- package/dist/cjs/listing/api/queries/usePredicate.js +34 -22
- package/dist/cjs/listing/components/BasicListingSEO.js +23 -7
- package/dist/cjs/listing/components/index.js +2 -4
- package/dist/cjs/listing/hooks/index.js +3 -6
- package/dist/cjs/listing/hooks/useListingBreadcrumbs.js +38 -19
- package/dist/cjs/listing/hooks/useListingCategories.js +20 -13
- package/dist/cjs/listing/hooks/useListingConfig.js +2 -4
- package/dist/cjs/listing/hooks/useListingFilters.js +55 -30
- package/dist/cjs/listing/hooks/useListingMeta.js +68 -49
- package/dist/cjs/listing/hooks/useListingPagination.js +3 -6
- package/dist/cjs/listing/hooks/useSlideFilter.js +46 -8
- package/dist/cjs/listing/hooks/useSort.js +3 -6
- package/dist/cjs/listing/index.js +3 -6
- package/dist/cjs/listing/ssr/index.js +3 -6
- package/dist/cjs/listing/ssr/prefetchCategories.js +5 -6
- package/dist/cjs/listing/ssr/prefetchListing.js +2 -1
- package/dist/cjs/listing/ssr/prefetchPredicate.js +4 -4
- package/dist/cjs/listing/types.js +15 -20
- package/dist/cjs/listing/utils/buildCategoryQuery.js +30 -11
- package/dist/cjs/listing/utils/buildFilterQuery.js +27 -22
- package/dist/cjs/listing/utils/extendFilter.js +19 -4
- package/dist/cjs/listing/utils/getListingAlias.js +21 -8
- package/dist/cjs/listing/utils/getListingPageType.js +2 -4
- package/dist/cjs/listing/utils/index.js +3 -6
- package/dist/cjs/navigation/components/SearchBox/Components/EmptyBox/index.js +7 -7
- package/dist/cjs/navigation/components/SearchBox/Components/IconArrowRight/index.js +2 -4
- package/dist/cjs/navigation/components/SearchBox/Components/Products/Components/ProductCard/index.js +1 -2
- package/dist/cjs/navigation/components/SearchBox/Components/Products/Components/index.js +2 -4
- package/dist/cjs/navigation/components/SearchBox/Components/Spinner/index.js +2 -4
- package/dist/cjs/navigation/components/SearchBox/Components/Suggestions/Components/index.js +2 -4
- package/dist/cjs/navigation/components/SearchBox/Components/Suggestions/Utils/ScrollView.js +4 -8
- package/dist/cjs/navigation/components/SearchBox/Components/Suggestions/Utils/index.js +3 -6
- package/dist/cjs/navigation/components/SearchBox/Components/index.js +3 -6
- package/dist/cjs/navigation/components/SearchBox/index.js +9 -12
- package/dist/cjs/navigation/components/index.js +2 -4
- package/dist/cjs/navigation/hooks/index.js +3 -6
- package/dist/cjs/navigation/hooks/search-history/index.js +3 -6
- package/dist/cjs/navigation/index.js +3 -6
- package/dist/cjs/navigation/keys.js +3 -4
- package/dist/cjs/navigation/mutations/index.js +2 -4
- package/dist/cjs/navigation/mutations/useSearchHistoryMutation.js +20 -16
- package/dist/cjs/navigation/queries/index.js +3 -6
- package/dist/cjs/navigation/ssr/index.js +2 -4
- package/dist/cjs/navigation/types.js +3 -4
- package/dist/cjs/order/api/index.js +15 -6
- package/dist/cjs/order/api/mutations/index.js +3 -6
- package/dist/cjs/order/api/queries/index.js +2 -4
- package/dist/cjs/order/api/queries/prefetchOrder.js +24 -19
- package/dist/cjs/{user/types/index.js → order/api/utils/getOrderById.js} +2 -2
- package/dist/cjs/order/api/utils/index.js +35 -0
- package/dist/cjs/order/hooks/index.js +3 -6
- package/dist/cjs/order/index.js +3 -6
- package/dist/cjs/postcss/index.js +3 -6
- package/dist/cjs/postcss/tailwind/buttons-plugin.js +20 -16
- package/dist/cjs/postcss/tailwind/default-plugin.js +2 -4
- package/dist/cjs/postcss/tailwind/fonts-plugin.js +21 -18
- package/dist/cjs/postcss/tailwind/forms-plugin.js +6 -9
- package/dist/cjs/postcss/tailwind/index.js +3 -6
- package/dist/cjs/postcss/tailwind/utils.js +4 -6
- package/dist/cjs/postcss/types.js +6 -8
- package/dist/cjs/product/api/index.js +2 -4
- package/dist/cjs/product/api/keys.js +8 -1
- package/dist/cjs/product/api/queries/index.js +16 -4
- package/dist/cjs/product/api/queries/useUniCreditOffersQuery.js +63 -0
- package/dist/cjs/product/api/ssr/index.js +44 -40
- package/dist/cjs/product/hooks/index.js +16 -4
- package/dist/cjs/product/hooks/useBnpOffers.js +3 -6
- package/dist/cjs/product/hooks/useUniCreditOffers.js +107 -0
- package/dist/cjs/product/index.js +3 -6
- package/dist/cjs/seo/api/index.js +2 -4
- package/dist/cjs/seo/api/ssr/fetchRedirectByFrom.js +19 -14
- package/dist/cjs/seo/api/ssr/fetchSitemaps.js +22 -17
- package/dist/cjs/seo/api/ssr/getCanonicalUrl.js +19 -4
- package/dist/cjs/seo/api/ssr/index.js +3 -6
- package/dist/cjs/seo/components/HiddenBreadcrumb/index.js +1 -2
- package/dist/cjs/seo/components/ProductSEO/index.js +3 -5
- package/dist/cjs/seo/components/TranslationsMeta/index.js +59 -0
- package/dist/cjs/seo/components/index.js +15 -6
- package/dist/cjs/seo/hooks/index.js +16 -4
- package/dist/cjs/seo/hooks/useSEOBreadcrumb.js +19 -13
- package/dist/cjs/seo/hooks/useSeoTranslations.js +90 -0
- package/dist/cjs/seo/index.js +3 -6
- package/dist/cjs/seo/utils/handleRobots.js +4 -4
- package/dist/cjs/seo/utils/index.js +3 -6
- package/dist/cjs/ssr/emptyBasketGuard.js +2 -2
- package/dist/cjs/ssr/index.js +3 -6
- package/dist/cjs/ui/components/GridStyles.js +36 -0
- package/dist/cjs/ui/components/LazyImage.js +6 -12
- package/dist/cjs/ui/components/RangeSliderInput.js +38 -15
- package/dist/cjs/ui/components/index.js +15 -6
- package/dist/cjs/ui/hooks/index.js +35 -0
- package/dist/cjs/ui/hooks/useToasts.js +165 -0
- package/dist/cjs/ui/index.js +16 -4
- package/dist/cjs/ui/toastUtils/ErrorIcon.js +25 -0
- package/dist/cjs/ui/toastUtils/InfoIcon.js +25 -0
- package/dist/cjs/ui/toastUtils/SuccessIcon.js +25 -0
- package/dist/cjs/ui/toastUtils/WarningIcon.js +25 -0
- package/dist/cjs/ui/toastUtils/index.js +85 -0
- package/dist/cjs/ui/toastUtils/utils.js +81 -0
- package/dist/cjs/user/api/index.js +3 -6
- package/dist/cjs/user/api/mutations/index.js +3 -6
- package/dist/cjs/user/api/mutations/useLoginMutation.js +2 -5
- package/dist/cjs/user/api/mutations/useLogoutMutation.js +3 -6
- package/dist/cjs/user/api/mutations/useRegisterMutation.js +24 -24
- package/dist/cjs/user/api/mutations/useRequestResetPasswordTokenMutation.js +1 -2
- package/dist/cjs/user/api/mutations/useResetPasswordMutation.js +1 -2
- package/dist/cjs/user/api/queries/index.js +3 -6
- package/dist/cjs/user/api/queries/useGetMyLoyaltyCardQuery.js +49 -3
- package/dist/cjs/user/api/queries/useIsAuthenticatedQuery.js +2 -4
- package/dist/cjs/user/api/utils/generateAnonymousToken.js +25 -21
- package/dist/cjs/user/api/utils/index.js +3 -6
- package/dist/cjs/user/api/utils/processLoginPayload.js +2 -2
- package/dist/cjs/user/hooks/index.js +3 -6
- package/dist/cjs/user/hooks/useConfirmEmail.js +20 -6
- package/dist/cjs/user/hooks/useLoginApple.js +2 -4
- package/dist/cjs/user/hooks/useLoginFacebook.js +2 -4
- package/dist/cjs/user/hooks/useLoginGoogle.js +2 -4
- package/dist/cjs/user/hooks/useRequestEmailConfirmation.js +20 -6
- package/dist/cjs/user/index.js +3 -18
- package/dist/cjs/utils/assetsToMap.js +3 -7
- package/dist/cjs/utils/createAggregateQuery.js +4 -6
- package/dist/cjs/utils/customFieldsToMap.js +3 -8
- package/dist/cjs/utils/generateQueryFromRouter.js +5 -12
- package/dist/cjs/utils/getLocaleFromPath.js +13 -0
- package/dist/cjs/utils/getPagination.js +5 -11
- package/dist/cjs/utils/getSelectedFilters.js +25 -11
- package/dist/cjs/utils/index.js +15 -6
- package/dist/cjs/utils/isColorBright.js +2 -2
- package/dist/cjs/utils/isTouchDevice.js +2 -1
- package/dist/cjs/utils/localStorage.js +7 -2
- package/dist/cjs/utils/queryObjToString.js +3 -7
- package/dist/cjs/utils/sortAncestors.js +18 -11
- package/dist/cjs/utils/tokens.js +19 -4
- package/dist/cjs/utils/validations.js +2 -2
- package/dist/cjs/webview/hooks/index.js +2 -4
- package/dist/cjs/webview/hooks/useIsInWebview.js +21 -6
- package/dist/cjs/webview/index.js +3 -6
- package/dist/cjs/webview/utils/index.js +3 -6
- package/dist/cjs/webview/utils/sendMessage.js +3 -4
- package/dist/cjs/wishlist/api/index.js +2 -4
- package/dist/cjs/wishlist/api/queries/index.js +3 -6
- package/dist/cjs/wishlist/api/queries/keys.js +3 -4
- package/dist/cjs/wishlist/api/queries/useWishlistItemsQuery.js +4 -7
- package/dist/cjs/wishlist/hooks/index.js +2 -4
- package/dist/cjs/wishlist/hooks/useWishlistItems.js +2 -3
- package/dist/cjs/wishlist/index.js +3 -6
- package/dist/esm/GDPR/api/queries/useConfirmConsentQuery.js +1 -2
- package/dist/esm/GDPR/components/CookiesTable.js +2 -4
- package/dist/esm/GDPR/hooks/index.js +1 -0
- package/dist/esm/GDPR/hooks/useCheckForCookies.js +5 -0
- package/dist/esm/GDPR/hooks/useCookies.js +34 -33
- package/dist/esm/analytics/Pixel/hooks/index.js +3 -0
- package/dist/esm/analytics/Pixel/hooks/usePixelFinishOrder.js +22 -0
- package/dist/esm/analytics/Pixel/hooks/usePixelProductClick.js +5 -10
- package/dist/esm/analytics/Pixel/hooks/usePixelProductDetails.js +19 -4
- package/dist/esm/analytics/Pixel/hooks/usePixelProductsImpression.js +61 -35
- package/dist/esm/analytics/Pixel/hooks/usePixelViewBasket.js +19 -0
- package/dist/esm/analytics/Pixel/hooks/usePixelViewCategory.js +24 -0
- package/dist/esm/analytics/Pixel/mainScript.js +260 -99
- package/dist/esm/analytics/Pixel/minifiedPixel.js +1 -1
- package/dist/esm/analytics/Pixel/usePixel.js +6 -1
- package/dist/esm/analytics/Pixel/utils.js +12 -0
- package/dist/esm/analytics/Releva/api/query/useRelevaQuery.js +1 -0
- package/dist/esm/analytics/Releva/hooks/useRelevaData.js +20 -6
- package/dist/esm/analytics/Releva/types.js +21 -25
- package/dist/esm/analytics/Releva/useReleva.js +20 -6
- package/dist/esm/analytics/Releva/utils.js +2 -4
- package/dist/esm/analytics/viewContent.js +2 -1
- package/dist/esm/api/addressesApi/index.js +10 -12
- package/dist/esm/api/brandsApi/index.js +37 -33
- package/dist/esm/api/catalogApi/index.js +156 -160
- package/dist/esm/api/categoriesApi/index.js +37 -33
- package/dist/esm/api/citiesApi/index.js +23 -19
- package/dist/esm/api/companiesApi/index.js +11 -15
- package/dist/esm/api/consentsApi/index.js +3 -6
- package/dist/esm/api/getSDKConfig.js +15 -24
- package/dist/esm/api/myCartApi/index.js +223 -136
- package/dist/esm/api/myOrdersApi/index.js +55 -15
- package/dist/esm/api/myPaymentsBoricaApi/index.js +22 -18
- package/dist/esm/api/myShippingsEcontApi/index.js +150 -125
- package/dist/esm/api/myShippingsEvropatApi/index.js +60 -50
- package/dist/esm/api/myShippingsPickupFromStoreAPI/index.js +6 -7
- package/dist/esm/api/myShippingsSpeedyApi/index.js +150 -125
- package/dist/esm/api/notificationsApi/index.js +4 -5
- package/dist/esm/api/pagesApi/index.js +3 -4
- package/dist/esm/api/productsApi/index.js +48 -46
- package/dist/esm/api/searchHistoryApi/index.js +35 -26
- package/dist/esm/api/usersApi/index.js +2 -3
- package/dist/esm/api/viewsApi/index.js +36 -32
- package/dist/esm/api/vouchersApi/index.js +3 -4
- package/dist/esm/api/walletApi/index.js +3 -6
- package/dist/esm/api/wishlistApi/index.js +72 -20
- package/dist/esm/api/wishlistApi/utils/index.js +2 -4
- package/dist/esm/api.v2/core/checkout/payments/useSetPaymentMethod.js +19 -4
- package/dist/esm/api.v2/core/checkout/shippings/mutations/useMutateNomenclature.js +19 -14
- package/dist/esm/api.v2/core/checkout/shippings/queries/useFindNomenclatureElement.js +67 -56
- package/dist/esm/api.v2/core/checkout/types.js +4 -8
- package/dist/esm/api.v2/core/misc/promo-code/mutations/usePromoCodeMutation.js +22 -17
- package/dist/esm/api.v2/core/product/useSubscribeForSkuMutation.js +19 -4
- package/dist/esm/basket/api/mutations/index.js +1 -0
- package/dist/esm/basket/api/mutations/useChangeGiftVariant.js +106 -0
- package/dist/esm/basket/api/mutations/useReplaceBasketMutation.js +17 -13
- package/dist/esm/basket/hooks/index.js +1 -0
- package/dist/esm/basket/hooks/useChangeGiftVariant.js +3 -0
- package/dist/esm/brands/api/queries/keys.js +2 -4
- package/dist/esm/brands/api/queries/useAllBrandsQuery.js +91 -76
- package/dist/esm/build/api/query/fetchStore.js +25 -20
- package/dist/esm/checkout/api/keys.js +7 -3
- package/dist/esm/checkout/api/queries/index.js +1 -0
- package/dist/esm/checkout/api/queries/useUniCreditCalculateForCartQuery.js +50 -0
- package/dist/esm/checkout/contexts/BoricaResponseContext.js +1 -2
- package/dist/esm/checkout/contexts/PaypalResponseContext.js +1 -2
- package/dist/esm/checkout/contexts/UniCreditResponseContext.js +13 -0
- package/dist/esm/checkout/contexts/index.js +1 -0
- package/dist/esm/checkout/hooks/index.js +1 -0
- package/dist/esm/checkout/hooks/useBnpCalculateForCart.js +6 -10
- package/dist/esm/checkout/hooks/useUniCreditCalculateForCart.js +88 -0
- package/dist/esm/checkout/ssr/capturePaypalOrder.js +16 -11
- package/dist/esm/checkout/ssr/captureUniCreditOrder.js +47 -0
- package/dist/esm/checkout/ssr/index.js +1 -0
- package/dist/esm/checkout/ssr/verifyBoricaResponse.js +24 -19
- package/dist/esm/cms/api/mutations/useCMSFoldersCreateMutation.js +31 -29
- package/dist/esm/cms/api/mutations/useCMSMediaDeleteAssetsMutation.js +19 -14
- package/dist/esm/cms/api/mutations/useCMSMediaUploadAssetsMutation.js +22 -19
- package/dist/esm/cms/api/queries/keys.js +20 -14
- package/dist/esm/cms/api/queries/useCMSContentListQuery.js +4 -7
- package/dist/esm/cms/api/queries/useCMSMediaQuery.js +1 -2
- package/dist/esm/cms/api/queries/useInjectedContentQuery.js +4 -7
- package/dist/esm/cms/components/RenderInjectedContent.js +3 -7
- package/dist/esm/cms/hooks/useCmsContent.js +4 -8
- package/dist/esm/cms/hooks/useCmsContentList.js +7 -12
- package/dist/esm/cms/hooks/useCmsFolders.js +0 -1
- package/dist/esm/cms/hooks/useCmsMedia.js +0 -1
- package/dist/esm/cms/hooks/useCmsMediaDeleteAssets.js +0 -1
- package/dist/esm/cms/hooks/useCmsMediaUploadAssets.js +0 -1
- package/dist/esm/cms/hooks/useContentCategoriesMap.js +6 -13
- package/dist/esm/cms/hooks/useCreateCmsFolders.js +0 -1
- package/dist/esm/cms/hooks/useInjectedContentContext.js +4 -8
- package/dist/esm/cms/hooks/useListingInjectedContent.js +1 -2
- package/dist/esm/cms/ssr/fetchPagePaths.js +3 -3
- package/dist/esm/cms/ssr/prefetchCMSPage.js +34 -29
- package/dist/esm/cms/ssr/prefetchCmsContent.js +48 -43
- package/dist/esm/cms/ssr/prefetchCmsContentList.js +52 -50
- package/dist/esm/components/AnalyticsScripts/index.js +22 -6
- package/dist/esm/components/Drawer/index.js +3 -5
- package/dist/esm/components/FadeIn/index.js +27 -15
- package/dist/esm/components/GoogleOneTap/index.js +38 -18
- package/dist/esm/components/LazyResponsiveImage/index.js +23 -12
- package/dist/esm/components/Link/index.js +3 -6
- package/dist/esm/components/Portal/index.js +1 -2
- package/dist/esm/components/ProgressBar/index.js +19 -4
- package/dist/esm/config/SentecaProvider.js +7 -12
- package/dist/esm/contexts/CheckoutForm/Components/BoricaRedirect/index.js +19 -4
- package/dist/esm/contexts/CheckoutForm/Components/CheckoutCustomState/index.js +22 -10
- package/dist/esm/contexts/CheckoutForm/Components/UniCreditRedirect/index.js +61 -0
- package/dist/esm/contexts/CheckoutForm/Components/index.js +1 -0
- package/dist/esm/contexts/CheckoutForm/hooks/useBilling/index.js +52 -31
- package/dist/esm/contexts/CheckoutForm/hooks/usePayment/index.js +20 -6
- package/dist/esm/contexts/CheckoutForm/hooks/useSavedBillingList/index.js +2 -4
- package/dist/esm/contexts/CheckoutForm/hooks/useSavedShippingList/index.js +20 -15
- package/dist/esm/contexts/CheckoutForm/hooks/useShipping/index.js +102 -90
- package/dist/esm/contexts/CheckoutForm/hooks/useShippingInitialData/index.js +3 -7
- package/dist/esm/contexts/CheckoutForm/index.js +103 -60
- package/dist/esm/contexts/CheckoutForm/utils/updatedNestedObjectProps.js +16 -3
- package/dist/esm/contexts/CheckoutForm/utils/validateBillingAddress.js +6 -14
- package/dist/esm/contexts/CheckoutForm/utils/validateShipping.js +12 -23
- package/dist/esm/contexts/CustomProductProvider/index.js +22 -10
- package/dist/esm/contexts/Strings.js +32 -33
- package/dist/esm/hooks/addresses-hooks/useAddressForm/index.js +37 -48
- package/dist/esm/hooks/basket-hooks/useBasket/index.js +24 -7
- package/dist/esm/hooks/basket-hooks/useBasketCustom/index.js +19 -4
- package/dist/esm/hooks/basket-hooks/useBasketItemList/index.js +5 -10
- package/dist/esm/hooks/basket-hooks/useBasketItemWithErrorList/index.js +4 -8
- package/dist/esm/hooks/basket-hooks/useBasketLineItem/index.js +19 -4
- package/dist/esm/hooks/basket-hooks/useBasketLineItem/utils/index.js +4 -9
- package/dist/esm/hooks/checkout-hooks/useAllStockLocations.js +5 -10
- package/dist/esm/hooks/checkout-hooks/useShippingCourierMethods.js +41 -36
- package/dist/esm/hooks/cities-hooks/useCities/index.js +19 -4
- package/dist/esm/hooks/error-handling/useErrors/index.js +4 -9
- package/dist/esm/hooks/labels/useGlobalLabels/index.js +1 -2
- package/dist/esm/hooks/order-hooks/api/queries/useOrderGetPaymentMethodQuery.js +2 -4
- package/dist/esm/hooks/order-hooks/useGenericCourierAddress/index.js +103 -68
- package/dist/esm/hooks/order-hooks/useOrder/index.js +3 -11
- package/dist/esm/hooks/order-hooks/useOrderGetPaymentMethod/index.js +0 -1
- package/dist/esm/hooks/order-hooks/useOrderPaymentMethods/index.js +2 -4
- package/dist/esm/hooks/order-hooks/useOrdersList/index.js +2 -4
- package/dist/esm/hooks/order-hooks/usePayOrder/index.js +66 -58
- package/dist/esm/hooks/order-hooks/useUpdateOrderPaymentMethod/index.js +20 -7
- package/dist/esm/hooks/subscriptions-hooks/useAcceptOnRegister/index.js +21 -8
- package/dist/esm/hooks/subscriptions-hooks/useAllSubscriptions/index.js +32 -33
- package/dist/esm/hooks/subscriptions-hooks/useSubscribeForProduct/index.js +20 -6
- package/dist/esm/hooks/ui-hooks/useAccordion/index.js +19 -5
- package/dist/esm/hooks/ui-hooks/useBoolean/index.js +21 -6
- package/dist/esm/hooks/ui-hooks/useCallbackRef/index.js +19 -11
- package/dist/esm/hooks/ui-hooks/useClickOutside/index.js +2 -2
- package/dist/esm/hooks/ui-hooks/useIsIos/index.js +19 -4
- package/dist/esm/hooks/ui-hooks/useMenuAim/index.js +19 -4
- package/dist/esm/hooks/ui-hooks/usePagination/index.js +19 -14
- package/dist/esm/hooks/ui-hooks/useScrollDirection/index.js +21 -7
- package/dist/esm/hooks/ui-hooks/useScrollTo/index.js +26 -12
- package/dist/esm/hooks/ui-hooks/useSlideshow/index.js +21 -6
- package/dist/esm/hooks/ui-hooks/useToggleNavbarOnScroll/index.js +3 -3
- package/dist/esm/hooks/ui-hooks/useUI/index.js +34 -35
- package/dist/esm/hooks/ui-hooks/useWindowDimensions/index.js +19 -4
- package/dist/esm/hooks/useAddressList/index.js +2 -3
- package/dist/esm/hooks/useAggregateResult/index.js +7 -5
- package/dist/esm/hooks/useAvailability/index.js +27 -14
- package/dist/esm/hooks/useCarousel/component/index.js +12 -17
- package/dist/esm/hooks/useCarousel/helpers/eventStore.js +2 -2
- package/dist/esm/hooks/useCarousel/index.js +20 -6
- package/dist/esm/hooks/useCatalogResult/index.js +2 -2
- package/dist/esm/hooks/useCategoryTree/index.js +1 -2
- package/dist/esm/hooks/useCheckoutBillingAddress/index.js +75 -7
- package/dist/esm/hooks/useCheckoutDelivery/index.js +71 -58
- package/dist/esm/hooks/useCheckoutDiscountCode/index.js +19 -4
- package/dist/esm/hooks/useCheckoutPickupFromStore/index.js +21 -8
- package/dist/esm/hooks/useCheckoutShippingAddress/index.js +19 -4
- package/dist/esm/hooks/useCheckoutShippingModule/index.js +4 -6
- package/dist/esm/hooks/useCheckoutSubmit/index.js +98 -59
- package/dist/esm/hooks/useClearAllFilters/index.js +4 -4
- package/dist/esm/hooks/useContactForm/index.js +8 -4
- package/dist/esm/hooks/useCopyToClipboard/index.js +20 -4
- package/dist/esm/hooks/useForceUpdate/index.js +19 -4
- package/dist/esm/hooks/useLineItem/LineItemContext.js +76 -0
- package/dist/esm/hooks/useLineItem/index.js +21 -25
- package/dist/esm/hooks/useLocalRating/index.js +23 -10
- package/dist/esm/hooks/usePrefetchProduct/index.js +19 -4
- package/dist/esm/hooks/useProduct/index.js +24 -267
- package/dist/esm/hooks/useProduct/utils/index.js +75 -57
- package/dist/esm/hooks/useProductVariants/index.js +309 -0
- package/dist/esm/hooks/useProductVariants/types.js +1 -0
- package/dist/esm/hooks/useProgressBar/hooks/useGetSetState.js +4 -7
- package/dist/esm/hooks/useProgressBar/hooks/useUpdate.js +19 -4
- package/dist/esm/hooks/useProgressBar/index.js +23 -11
- package/dist/esm/hooks/usePromoCode/index.js +20 -6
- package/dist/esm/hooks/useSearchbar/index.js +86 -74
- package/dist/esm/hooks/useShippingAddress/index.js +2 -4
- package/dist/esm/hooks/useSizesReducer/index.js +24 -12
- package/dist/esm/hooks/useVouchers/index.js +1 -2
- package/dist/esm/hooks/useWallet/index.js +2 -4
- package/dist/esm/hooks/useZoom/index.js +20 -6
- package/dist/esm/hooks/user-hooks/useSubscribeToNewsletter/index.js +28 -7
- package/dist/esm/hooks/wishlist-hooks/useWishlist/index.js +20 -6
- package/dist/esm/hooks/wishlist-hooks/useWishlistItem/index.js +41 -19
- package/dist/esm/index.js +1 -3
- package/dist/esm/listing/api/keys.js +3 -5
- package/dist/esm/listing/api/queries/useAggregateQuery.js +6 -10
- package/dist/esm/listing/api/queries/useInfiniteListing.js +2 -4
- package/dist/esm/listing/api/queries/useLabelsQuery.js +19 -10
- package/dist/esm/listing/api/queries/useListingQuery.js +26 -9
- package/dist/esm/listing/api/queries/usePredicate.js +34 -22
- package/dist/esm/listing/components/BasicListingSEO.js +24 -8
- package/dist/esm/listing/hooks/useListingBreadcrumbs.js +33 -14
- package/dist/esm/listing/hooks/useListingCategories.js +20 -13
- package/dist/esm/listing/hooks/useListingConfig.js +2 -4
- package/dist/esm/listing/hooks/useListingFilters.js +55 -30
- package/dist/esm/listing/hooks/useListingMeta.js +68 -51
- package/dist/esm/listing/hooks/useListingPagination.js +3 -6
- package/dist/esm/listing/hooks/useSlideFilter.js +46 -8
- package/dist/esm/listing/hooks/useSort.js +3 -6
- package/dist/esm/listing/ssr/prefetchCategories.js +6 -7
- package/dist/esm/listing/ssr/prefetchListing.js +2 -1
- package/dist/esm/listing/ssr/prefetchPredicate.js +4 -4
- package/dist/esm/listing/types.js +10 -20
- package/dist/esm/listing/utils/buildCategoryQuery.js +30 -11
- package/dist/esm/listing/utils/buildFilterQuery.js +27 -22
- package/dist/esm/listing/utils/extendFilter.js +19 -4
- package/dist/esm/listing/utils/getListingAlias.js +21 -8
- package/dist/esm/listing/utils/getListingPageType.js +2 -4
- package/dist/esm/navigation/components/SearchBox/Components/EmptyBox/index.js +7 -7
- package/dist/esm/navigation/components/SearchBox/Components/Products/Components/ProductCard/index.js +1 -2
- package/dist/esm/navigation/components/SearchBox/Components/Suggestions/Utils/ScrollView.js +4 -8
- package/dist/esm/navigation/components/SearchBox/index.js +7 -8
- package/dist/esm/navigation/keys.js +2 -4
- package/dist/esm/navigation/mutations/useSearchHistoryMutation.js +20 -16
- package/dist/esm/navigation/types.js +2 -4
- package/dist/esm/order/api/index.js +1 -0
- package/dist/esm/order/api/queries/prefetchOrder.js +24 -19
- package/dist/esm/order/api/utils/getOrderById.js +2 -0
- package/dist/esm/order/api/utils/index.js +1 -0
- package/dist/esm/postcss/tailwind/buttons-plugin.js +20 -16
- package/dist/esm/postcss/tailwind/default-plugin.js +2 -4
- package/dist/esm/postcss/tailwind/fonts-plugin.js +21 -18
- package/dist/esm/postcss/tailwind/forms-plugin.js +6 -9
- package/dist/esm/postcss/tailwind/utils.js +4 -6
- package/dist/esm/postcss/types.js +4 -8
- package/dist/esm/product/api/keys.js +6 -0
- package/dist/esm/product/api/queries/index.js +1 -0
- package/dist/esm/product/api/queries/useUniCreditOffersQuery.js +53 -0
- package/dist/esm/product/api/ssr/index.js +44 -40
- package/dist/esm/product/hooks/index.js +1 -0
- package/dist/esm/product/hooks/useBnpOffers.js +3 -6
- package/dist/esm/product/hooks/useUniCreditOffers.js +81 -0
- package/dist/esm/seo/api/ssr/fetchRedirectByFrom.js +19 -14
- package/dist/esm/seo/api/ssr/fetchSitemaps.js +22 -17
- package/dist/esm/seo/api/ssr/getCanonicalUrl.js +19 -4
- package/dist/esm/seo/components/HiddenBreadcrumb/index.js +1 -2
- package/dist/esm/seo/components/ProductSEO/index.js +3 -5
- package/dist/esm/seo/components/TranslationsMeta/index.js +49 -0
- package/dist/esm/seo/components/index.js +1 -0
- package/dist/esm/seo/hooks/index.js +1 -0
- package/dist/esm/seo/hooks/useSEOBreadcrumb.js +17 -9
- package/dist/esm/seo/hooks/useSeoTranslations.js +79 -0
- package/dist/esm/seo/utils/handleRobots.js +4 -4
- package/dist/esm/ssr/emptyBasketGuard.js +2 -2
- package/dist/esm/ui/components/GridStyles.js +26 -0
- package/dist/esm/ui/components/LazyImage.js +6 -12
- package/dist/esm/ui/components/RangeSliderInput.js +36 -11
- package/dist/esm/ui/components/index.js +1 -0
- package/dist/esm/ui/hooks/index.js +1 -0
- package/dist/esm/ui/hooks/useToasts.js +154 -0
- package/dist/esm/ui/index.js +1 -0
- package/dist/esm/ui/toastUtils/ErrorIcon.js +15 -0
- package/dist/esm/ui/toastUtils/InfoIcon.js +15 -0
- package/dist/esm/ui/toastUtils/SuccessIcon.js +15 -0
- package/dist/esm/ui/toastUtils/WarningIcon.js +15 -0
- package/dist/esm/ui/toastUtils/index.js +5 -0
- package/dist/esm/ui/toastUtils/utils.js +67 -0
- package/dist/esm/user/api/mutations/useLoginMutation.js +2 -5
- package/dist/esm/user/api/mutations/useLogoutMutation.js +3 -6
- package/dist/esm/user/api/mutations/useRegisterMutation.js +24 -24
- package/dist/esm/user/api/mutations/useRequestResetPasswordTokenMutation.js +1 -2
- package/dist/esm/user/api/mutations/useResetPasswordMutation.js +1 -2
- package/dist/esm/user/api/queries/useGetMyLoyaltyCardQuery.js +44 -3
- package/dist/esm/user/api/queries/useIsAuthenticatedQuery.js +2 -4
- package/dist/esm/user/api/utils/generateAnonymousToken.js +25 -21
- package/dist/esm/user/api/utils/processLoginPayload.js +2 -2
- package/dist/esm/user/hooks/useConfirmEmail.js +20 -6
- package/dist/esm/user/hooks/useLoginApple.js +2 -4
- package/dist/esm/user/hooks/useLoginFacebook.js +2 -4
- package/dist/esm/user/hooks/useLoginGoogle.js +2 -4
- package/dist/esm/user/hooks/useRequestEmailConfirmation.js +20 -6
- package/dist/esm/user/index.js +0 -1
- package/dist/esm/utils/assetsToMap.js +3 -7
- package/dist/esm/utils/createAggregateQuery.js +4 -6
- package/dist/esm/utils/customFieldsToMap.js +3 -8
- package/dist/esm/utils/generateQueryFromRouter.js +5 -12
- package/dist/esm/utils/getLocaleFromPath.js +8 -0
- package/dist/esm/utils/getPagination.js +5 -11
- package/dist/esm/utils/getSelectedFilters.js +25 -11
- package/dist/esm/utils/index.js +1 -0
- package/dist/esm/utils/isColorBright.js +2 -2
- package/dist/esm/utils/isTouchDevice.js +2 -1
- package/dist/esm/utils/localStorage.js +7 -2
- package/dist/esm/utils/queryObjToString.js +3 -7
- package/dist/esm/utils/sortAncestors.js +18 -11
- package/dist/esm/utils/tokens.js +19 -4
- package/dist/esm/utils/validations.js +2 -2
- package/dist/esm/webview/hooks/useIsInWebview.js +21 -6
- package/dist/esm/webview/utils/sendMessage.js +2 -4
- package/dist/esm/wishlist/api/queries/keys.js +2 -4
- package/dist/esm/wishlist/api/queries/useWishlistItemsQuery.js +4 -7
- package/dist/esm/wishlist/hooks/useWishlistItems.js +2 -3
- package/dist/types/GDPR/hooks/index.d.ts +1 -0
- package/dist/types/GDPR/hooks/useCheckForCookies.d.ts +1 -0
- package/dist/types/analytics/Pixel/hooks/index.d.ts +3 -0
- package/dist/types/analytics/Pixel/hooks/usePixelFinishOrder.d.ts +4 -0
- package/dist/types/analytics/Pixel/hooks/usePixelViewBasket.d.ts +4 -0
- package/dist/types/analytics/Pixel/hooks/usePixelViewCategory.d.ts +7 -0
- package/dist/types/analytics/Pixel/types.d.ts +10 -1
- package/dist/types/analytics/Pixel/utils.d.ts +3 -0
- package/dist/types/analytics/Releva/hooks/useRelevaOnListingPage.d.ts +1 -1
- package/dist/types/analytics/Releva/types.d.ts +1 -1
- package/dist/types/analytics/Releva/utils.d.ts +1 -1
- package/dist/types/analytics/addToCart.d.ts +1 -1
- package/dist/types/analytics/initiateCheckout.d.ts +1 -1
- package/dist/types/analytics/purchase.d.ts +1 -1
- package/dist/types/api/addressesApi/index.d.ts +1 -1
- package/dist/types/api/brandsApi/index.d.ts +1 -1
- package/dist/types/api/catalogApi/index.d.ts +1 -1
- package/dist/types/api/categoriesApi/index.d.ts +1 -1
- package/dist/types/api/citiesApi/index.d.ts +1 -1
- package/dist/types/api/companiesApi/index.d.ts +1 -1
- package/dist/types/api/myCartApi/index.d.ts +2 -0
- package/dist/types/basket/api/mutations/index.d.ts +1 -0
- package/dist/types/basket/api/mutations/useChangeGiftVariant.d.ts +2 -0
- package/dist/types/basket/api/mutations/useReplaceBasketMutation.d.ts +1 -1
- package/dist/types/basket/hooks/index.d.ts +1 -0
- package/dist/types/basket/hooks/useChangeGiftVariant.d.ts +2 -0
- package/dist/types/checkout/api/keys.d.ts +1 -0
- package/dist/types/checkout/api/queries/index.d.ts +1 -0
- package/dist/types/checkout/api/queries/useBnpCalculateForCartQuery.d.ts +1 -1
- package/dist/types/checkout/api/queries/useUniCreditCalculateForCartQuery.d.ts +3 -0
- package/dist/types/checkout/contexts/UniCreditResponseContext.d.ts +6 -0
- package/dist/types/checkout/contexts/index.d.ts +1 -0
- package/dist/types/checkout/hooks/index.d.ts +1 -0
- package/dist/types/checkout/hooks/useBnpCalculateForCart.d.ts +4 -3
- package/dist/types/checkout/hooks/useUniCreditCalculateForCart.d.ts +41 -0
- package/dist/types/checkout/ssr/captureUniCreditOrder.d.ts +2 -0
- package/dist/types/checkout/ssr/index.d.ts +1 -0
- package/dist/types/cms/api/mutations/useCMSMediaUploadAssetsMutation.d.ts +1 -3
- package/dist/types/components/Portal/index.d.ts +2 -2
- package/dist/types/contexts/CheckoutForm/Components/UniCreditRedirect/index.d.ts +5 -0
- package/dist/types/contexts/CheckoutForm/Components/index.d.ts +1 -0
- package/dist/types/contexts/CheckoutForm/hooks/useBilling/index.d.ts +3 -1
- package/dist/types/contexts/CheckoutForm/hooks/usePayment/index.d.ts +2 -2
- package/dist/types/contexts/CheckoutForm/hooks/useShipping/index.d.ts +1 -1
- package/dist/types/contexts/CheckoutForm/index.d.ts +2 -1
- package/dist/types/hooks/basket-hooks/useBasket/index.d.ts +2 -1
- package/dist/types/hooks/basket-hooks/useBasketLineItem/index.d.ts +1 -2
- package/dist/types/hooks/order-hooks/useOrder/index.d.ts +3 -2
- package/dist/types/hooks/order-hooks/useOrderPaymentMethods/index.d.ts +4 -4
- package/dist/types/hooks/useCarousel/index.d.ts +2 -2
- package/dist/types/hooks/useCheckoutBillingAddress/index.d.ts +2 -0
- package/dist/types/hooks/useCheckoutSubmit/index.d.ts +3 -2
- package/dist/types/hooks/useContactForm/index.d.ts +2 -1
- package/dist/types/hooks/useLineItem/LineItemContext.d.ts +23 -0
- package/dist/types/hooks/useLineItem/index.d.ts +3 -3
- package/dist/types/hooks/useProduct/index.d.ts +6 -78
- package/dist/types/hooks/useProduct/utils/index.d.ts +6 -4
- package/dist/types/hooks/useProductVariants/index.d.ts +36 -0
- package/dist/types/hooks/useProductVariants/types.d.ts +79 -0
- package/dist/types/hooks/useSearchbar/index.d.ts +1 -0
- package/dist/types/hooks/useVouchers/index.d.ts +2 -2
- package/dist/types/hooks/useZoom/index.d.ts +2 -2
- package/dist/types/hooks/wishlist-hooks/useWishlist/index.d.ts +1 -2
- package/dist/types/index.d.ts +1 -3
- package/dist/types/listing/api/queries/useListingQuery.d.ts +2 -1
- package/dist/types/listing/components/BasicListingSEO.d.ts +3 -1
- package/dist/types/listing/hooks/useListingMeta.d.ts +4 -0
- package/dist/types/listing/hooks/useSlideFilter.d.ts +4 -0
- package/dist/types/listing/types.d.ts +14 -2
- package/dist/types/navigation/components/SearchBox/Components/EmptyBox/index.d.ts +5 -4
- package/dist/types/navigation/components/SearchBox/index.d.ts +7 -6
- package/dist/types/order/api/index.d.ts +1 -0
- package/dist/types/order/api/utils/getOrderById.d.ts +2 -0
- package/dist/types/order/api/utils/index.d.ts +1 -0
- package/dist/types/product/api/keys.d.ts +1 -0
- package/dist/types/product/api/queries/index.d.ts +1 -0
- package/dist/types/product/api/queries/useBnpOffersQuery.d.ts +1 -1
- package/dist/types/product/api/queries/useUniCreditOffersQuery.d.ts +4 -0
- package/dist/types/product/hooks/index.d.ts +1 -0
- package/dist/types/product/hooks/useBnpOffers.d.ts +2 -2
- package/dist/types/product/hooks/useUniCreditOffers.d.ts +36 -0
- package/dist/types/seo/components/TranslationsMeta/index.d.ts +1 -0
- package/dist/types/seo/components/index.d.ts +1 -0
- package/dist/types/seo/hooks/index.d.ts +1 -0
- package/dist/types/seo/hooks/useSeoTranslations.d.ts +24 -0
- package/dist/types/ui/components/GridStyles.d.ts +11 -0
- package/dist/types/ui/components/RangeSliderInput.d.ts +2 -1
- package/dist/types/ui/components/index.d.ts +1 -0
- package/dist/types/ui/hooks/index.d.ts +1 -0
- package/dist/types/ui/hooks/useToasts.d.ts +20 -0
- package/dist/types/ui/index.d.ts +1 -0
- package/dist/types/ui/toastUtils/ErrorIcon.d.ts +1 -0
- package/dist/types/ui/toastUtils/InfoIcon.d.ts +1 -0
- package/dist/types/ui/toastUtils/SuccessIcon.d.ts +1 -0
- package/dist/types/ui/toastUtils/WarningIcon.d.ts +1 -0
- package/dist/types/ui/toastUtils/index.d.ts +5 -0
- package/dist/types/ui/toastUtils/utils.d.ts +11 -0
- package/dist/types/user/index.d.ts +0 -1
- package/dist/types/utils/getLocaleFromPath.d.ts +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/package.json +13 -14
- package/dist/cjs/dto/index.js +0 -34
- package/dist/esm/dto/index.js +0 -1
- package/dist/esm/user/types/index.js +0 -1
- package/dist/types/dto/index.d.ts +0 -2
- package/dist/types/user/types/index.d.ts +0 -1
@@ -5,16 +5,23 @@ import { getListingPageType } from '../utils';
|
|
5
5
|
import { filtersOperatorsMap } from './useListingFilters';
|
6
6
|
import { useListingAlias } from '../../index';
|
7
7
|
import { useListingConfig } from '.';
|
8
|
+
function _arrayLikeToArray(arr, len) {
|
9
|
+
if (len == null || len > arr.length) len = arr.length;
|
10
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
11
|
+
return arr2;
|
12
|
+
}
|
8
13
|
function _arrayWithHoles(arr) {
|
9
14
|
if (Array.isArray(arr)) return arr;
|
10
15
|
}
|
11
16
|
function _iterableToArrayLimit(arr, i) {
|
17
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
18
|
+
if (_i == null) return;
|
12
19
|
var _arr = [];
|
13
20
|
var _n = true;
|
14
21
|
var _d = false;
|
15
|
-
var _e
|
22
|
+
var _s, _e;
|
16
23
|
try {
|
17
|
-
for(
|
24
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
18
25
|
_arr.push(_s.value);
|
19
26
|
if (i && _arr.length === i) break;
|
20
27
|
}
|
@@ -31,13 +38,21 @@ function _iterableToArrayLimit(arr, i) {
|
|
31
38
|
return _arr;
|
32
39
|
}
|
33
40
|
function _nonIterableRest() {
|
34
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
41
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
35
42
|
}
|
36
43
|
function _slicedToArray(arr, i) {
|
37
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
44
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
45
|
+
}
|
46
|
+
function _unsupportedIterableToArray(o, minLen) {
|
47
|
+
if (!o) return;
|
48
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
49
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
50
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
51
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
52
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
38
53
|
}
|
39
54
|
export var useSlideFilter = function(filterName, min, max) {
|
40
|
-
var
|
55
|
+
var ref3;
|
41
56
|
var router = useRouter();
|
42
57
|
var meta = useListingConfig().meta;
|
43
58
|
var slug = useListingAlias(meta).slug;
|
@@ -52,7 +67,7 @@ export var useSlideFilter = function(filterName, min, max) {
|
|
52
67
|
}
|
53
68
|
if (allFilters.includes(filterQuery)) return allFilters;
|
54
69
|
};
|
55
|
-
var filter = (
|
70
|
+
var filter = (ref3 = getFilter()) === null || ref3 === void 0 ? void 0 : ref3.replace(filterQuery, '');
|
56
71
|
var ref1 = _slicedToArray(filter ? filter.split(',') : [
|
57
72
|
min,
|
58
73
|
max
|
@@ -62,16 +77,38 @@ export var useSlideFilter = function(filterName, min, max) {
|
|
62
77
|
to: +to || max
|
63
78
|
}), 2), state = ref2[0], setState = ref2[1];
|
64
79
|
var timeoutRef = useRef();
|
65
|
-
var
|
80
|
+
var getFormattedPriceRange = function(data) {
|
66
81
|
var formattedFrom = Math.min(Math.max(data.from, min), data.to);
|
67
82
|
var formattedTo = Math.max(data.from, Math.min(data.to, max));
|
83
|
+
return {
|
84
|
+
formattedFrom: formattedFrom,
|
85
|
+
formattedTo: formattedTo
|
86
|
+
};
|
87
|
+
};
|
88
|
+
var updateValue = useCallback(function(data) {
|
89
|
+
var ref = getFormattedPriceRange(data), formattedFrom = ref.formattedFrom, formattedTo = ref.formattedTo;
|
90
|
+
setState({
|
91
|
+
from: formattedFrom,
|
92
|
+
to: formattedTo
|
93
|
+
});
|
94
|
+
}, [
|
95
|
+
filterName,
|
96
|
+
max,
|
97
|
+
min,
|
98
|
+
router,
|
99
|
+
slug
|
100
|
+
]);
|
101
|
+
var applyFilter = useCallback(function(data) {
|
102
|
+
var ref = getFormattedPriceRange(data), formattedFrom = ref.formattedFrom, formattedTo = ref.formattedTo;
|
68
103
|
clearTimeout(timeoutRef.current);
|
69
104
|
timeoutRef.current = setTimeout(function() {
|
70
105
|
router.push(createAggregateQuery(getListingPageType(router, slug, meta), router.query.slug, {
|
71
106
|
aggType: filterName,
|
72
107
|
aggKey: "".concat(formattedFrom, ",").concat(formattedTo),
|
73
108
|
aggOperator: filtersOperatorsMap.stats
|
74
|
-
}, false, router, true)
|
109
|
+
}, false, router, true), undefined, {
|
110
|
+
shallow: true
|
111
|
+
});
|
75
112
|
}, 500);
|
76
113
|
setState({
|
77
114
|
from: formattedFrom,
|
@@ -86,6 +123,7 @@ export var useSlideFilter = function(filterName, min, max) {
|
|
86
123
|
]);
|
87
124
|
return {
|
88
125
|
value: state,
|
126
|
+
applyFilter: applyFilter,
|
89
127
|
updateValue: updateValue
|
90
128
|
};
|
91
129
|
};
|
@@ -16,8 +16,7 @@ function _defineProperty(obj, key, value) {
|
|
16
16
|
}
|
17
17
|
function _objectSpread(target) {
|
18
18
|
for(var i = 1; i < arguments.length; i++){
|
19
|
-
var source = arguments[i] != null ? arguments[i] : {
|
20
|
-
};
|
19
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
21
20
|
var ownKeys = Object.keys(source);
|
22
21
|
if (typeof Object.getOwnPropertySymbols === "function") {
|
23
22
|
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
@@ -39,8 +38,7 @@ export var useSort = function(props) {
|
|
39
38
|
var changeSort = useCallback(function(value) {
|
40
39
|
return function() {
|
41
40
|
if (!value) return;
|
42
|
-
var query = _objectSpread({
|
43
|
-
}, router.query, {
|
41
|
+
var query = _objectSpread({}, router.query, {
|
44
42
|
sort: value
|
45
43
|
});
|
46
44
|
if (defaultSortKey === value) {
|
@@ -68,8 +66,7 @@ export var useSort = function(props) {
|
|
68
66
|
key: defaultSortKey,
|
69
67
|
label: '',
|
70
68
|
isDefault: true,
|
71
|
-
select: function() {
|
72
|
-
}
|
69
|
+
select: function() {}
|
73
70
|
};
|
74
71
|
var sortOptions = (ref = sorts || []) === null || ref === void 0 ? void 0 : ref.map(function(sort) {
|
75
72
|
var data = {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import regeneratorRuntime from "regenerator-runtime";
|
2
2
|
import { CatalogAggregate } from '@sentecacommerce/sdk';
|
3
|
-
import {
|
3
|
+
import { getListingAlias, getPostFilters } from '../utils';
|
4
4
|
import { prepareAggregateQuery, AggregateRequestEnum, generateAggregateKey } from '../api';
|
5
5
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
6
6
|
try {
|
@@ -36,7 +36,7 @@ export function prefetchCategories(queryCache, router, predicate, aggregates, co
|
|
36
36
|
}
|
37
37
|
function _prefetchCategories() {
|
38
38
|
_prefetchCategories = _asyncToGenerator(regeneratorRuntime.mark(function _callee(queryCache, router, predicate, aggregates, config) {
|
39
|
-
var aggregateKeys, aliasedSlug,
|
39
|
+
var aggregateKeys, aliasedSlug, query, response;
|
40
40
|
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
41
41
|
while(1)switch(_ctx.prev = _ctx.next){
|
42
42
|
case 0:
|
@@ -45,19 +45,18 @@ function _prefetchCategories() {
|
|
45
45
|
router: router,
|
46
46
|
config: config
|
47
47
|
});
|
48
|
-
slug = getSlug(router, aliasedSlug);
|
49
48
|
query = prepareAggregateQuery({
|
50
49
|
request: AggregateRequestEnum.Categories,
|
51
50
|
router: router,
|
52
51
|
predicate: predicate,
|
53
52
|
slug: aliasedSlug,
|
54
53
|
aggregates: aggregates,
|
55
|
-
postFilter:
|
54
|
+
postFilter: getPostFilters(router),
|
56
55
|
config: config
|
57
56
|
});
|
58
|
-
_ctx.next =
|
57
|
+
_ctx.next = 5;
|
59
58
|
return CatalogAggregate(query);
|
60
|
-
case
|
59
|
+
case 5:
|
61
60
|
response = _ctx.sent;
|
62
61
|
queryCache.setQueryData([
|
63
62
|
AggregateRequestEnum.Categories,
|
@@ -68,7 +67,7 @@ function _prefetchCategories() {
|
|
68
67
|
staleTime: 30000
|
69
68
|
});
|
70
69
|
return _ctx.abrupt("return", response);
|
71
|
-
case
|
70
|
+
case 8:
|
72
71
|
case "end":
|
73
72
|
return _ctx.stop();
|
74
73
|
}
|
@@ -35,20 +35,20 @@ export function prefetchPredicate(queryCache, router, config) {
|
|
35
35
|
}
|
36
36
|
function _prefetchPredicate() {
|
37
37
|
_prefetchPredicate = _asyncToGenerator(regeneratorRuntime.mark(function _callee(queryCache, router, config) {
|
38
|
-
var
|
38
|
+
var aliasedSlug, slug, data, attribute;
|
39
39
|
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
40
40
|
while(1)switch(_ctx.prev = _ctx.next){
|
41
41
|
case 0:
|
42
|
-
attribute = router.query.cat && router.query.slug;
|
43
42
|
aliasedSlug = getListingAlias({
|
44
43
|
router: router,
|
45
44
|
config: config
|
46
45
|
});
|
47
46
|
slug = getSlug(router, aliasedSlug);
|
48
|
-
_ctx.next =
|
47
|
+
_ctx.next = 4;
|
49
48
|
return processPredicateRequest(slug, router, aliasedSlug);
|
50
|
-
case
|
49
|
+
case 4:
|
51
50
|
data = _ctx.sent;
|
51
|
+
attribute = router.query.cat && aliasedSlug;
|
52
52
|
queryCache.setQueryData([
|
53
53
|
ListingQueryKeysEnum.usePredicate,
|
54
54
|
slug,
|
@@ -1,12 +1,9 @@
|
|
1
|
-
var
|
2
|
-
export { AggregateSortEnum1 as AggregateSortEnum, };
|
1
|
+
export var AggregateSortEnum;
|
3
2
|
(function(AggregateSortEnum) {
|
4
3
|
AggregateSortEnum["Index"] = 'index';
|
5
4
|
AggregateSortEnum["Alphabetically"] = 'alphabetically';
|
6
|
-
})(
|
7
|
-
|
8
|
-
var ListingTypesEnum1;
|
9
|
-
export { ListingTypesEnum1 as ListingTypesEnum, };
|
5
|
+
})(AggregateSortEnum || (AggregateSortEnum = {}));
|
6
|
+
export var ListingTypesEnum;
|
10
7
|
(function(ListingTypesEnum) {
|
11
8
|
ListingTypesEnum["Category"] = 'category';
|
12
9
|
ListingTypesEnum["Brand"] = 'brand';
|
@@ -14,26 +11,20 @@ export { ListingTypesEnum1 as ListingTypesEnum, };
|
|
14
11
|
ListingTypesEnum["Search"] = 'text';
|
15
12
|
ListingTypesEnum["Collection"] = 'collection';
|
16
13
|
ListingTypesEnum["AttrPage"] = 'attribute page';
|
17
|
-
})(
|
18
|
-
|
19
|
-
var GenderNamesEnum1;
|
20
|
-
export { GenderNamesEnum1 as GenderNamesEnum, };
|
14
|
+
})(ListingTypesEnum || (ListingTypesEnum = {}));
|
15
|
+
export var GenderNamesEnum;
|
21
16
|
(function(GenderNamesEnum) {
|
22
17
|
GenderNamesEnum["Men"] = 'Мъже';
|
23
18
|
GenderNamesEnum["Women"] = 'Жени';
|
24
19
|
GenderNamesEnum["Kids"] = 'Деца';
|
25
|
-
})(
|
26
|
-
|
27
|
-
var AggregationTypeEnum1;
|
28
|
-
export { AggregationTypeEnum1 as AggregationTypeEnum, };
|
20
|
+
})(GenderNamesEnum || (GenderNamesEnum = {}));
|
21
|
+
export var AggregationTypeEnum;
|
29
22
|
(function(AggregationTypeEnum) {
|
30
23
|
AggregationTypeEnum["Terms"] = 'terms';
|
31
24
|
AggregationTypeEnum["Ranges"] = 'ranges';
|
32
25
|
AggregationTypeEnum["Stats"] = 'stats';
|
33
|
-
})(
|
34
|
-
|
35
|
-
var ComponentTypeEnum1;
|
36
|
-
export { ComponentTypeEnum1 as ComponentTypeEnum, };
|
26
|
+
})(AggregationTypeEnum || (AggregationTypeEnum = {}));
|
27
|
+
export var ComponentTypeEnum;
|
37
28
|
(function(ComponentTypeEnum) {
|
38
29
|
ComponentTypeEnum["Text"] = 'text';
|
39
30
|
ComponentTypeEnum["TextWithLink"] = 'text-with-link';
|
@@ -44,5 +35,4 @@ export { ComponentTypeEnum1 as ComponentTypeEnum, };
|
|
44
35
|
ComponentTypeEnum["Dropdown"] = 'dropdown';
|
45
36
|
ComponentTypeEnum["RangeCheckbox"] = 'range-checkbox';
|
46
37
|
ComponentTypeEnum["RangeSlider"] = 'range-slider';
|
47
|
-
})(
|
48
|
-
}));
|
38
|
+
})(ComponentTypeEnum || (ComponentTypeEnum = {}));
|
@@ -15,8 +15,7 @@ function _defineProperty(obj, key, value) {
|
|
15
15
|
}
|
16
16
|
function _objectSpread(target) {
|
17
17
|
for(var i = 1; i < arguments.length; i++){
|
18
|
-
var source = arguments[i] != null ? arguments[i] : {
|
19
|
-
};
|
18
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
20
19
|
var ownKeys = Object.keys(source);
|
21
20
|
if (typeof Object.getOwnPropertySymbols === "function") {
|
22
21
|
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
@@ -29,7 +28,6 @@ function _objectSpread(target) {
|
|
29
28
|
}
|
30
29
|
return target;
|
31
30
|
}
|
32
|
-
var _obj;
|
33
31
|
export var buildCategoryQuery = function(param) {
|
34
32
|
var aggregates = param.aggregates, predicate = param.predicate, postFilter = param.postFilter, pageType = param.pageType, config = param.config, router = param.router, slug = param.slug;
|
35
33
|
var ref2, ref1;
|
@@ -46,7 +44,7 @@ export var buildCategoryQuery = function(param) {
|
|
46
44
|
filter += "brand;eq;\"".concat(predicate === null || predicate === void 0 ? void 0 : predicate._id, "\"").concat(applyBrandsPostFilter({
|
47
45
|
postFilter: postFilter
|
48
46
|
}));
|
49
|
-
if (router.query.cat) filter += extendFilter({
|
47
|
+
if (router.query.cat) filter += '&' + extendFilter({
|
50
48
|
slug: slug,
|
51
49
|
filterExtension: config === null || config === void 0 ? void 0 : config.filterExtension
|
52
50
|
});
|
@@ -62,7 +60,7 @@ export var buildCategoryQuery = function(param) {
|
|
62
60
|
filter += (ref = config === null || config === void 0 ? void 0 : config.filterExtension) !== null && ref !== void 0 ? ref : '';
|
63
61
|
}
|
64
62
|
if (postFilter) {
|
65
|
-
if (
|
63
|
+
if (filter) filter += '&';
|
66
64
|
filter += postFilter;
|
67
65
|
}
|
68
66
|
break;
|
@@ -79,17 +77,24 @@ export var buildCategoryQuery = function(param) {
|
|
79
77
|
filter += "text;eq;\"".concat(searchQuery, "\"");
|
80
78
|
if (postFilter) filter += "&".concat(postFilter);
|
81
79
|
break;
|
80
|
+
case ListingTypesEnum.View:
|
81
|
+
filter += applyViewsPostFilter({
|
82
|
+
postFilter: postFilter
|
83
|
+
});
|
84
|
+
if (config === null || config === void 0 ? void 0 : config.filterExtension) {
|
85
|
+
filter += filter ? "&".concat(config === null || config === void 0 ? void 0 : config.filterExtension) : config === null || config === void 0 ? void 0 : config.filterExtension;
|
86
|
+
}
|
87
|
+
break;
|
82
88
|
default:
|
83
89
|
return "".concat((config === null || config === void 0 ? void 0 : config.filterExtension) + "".concat(postFilter !== null && postFilter !== void 0 ? postFilter : ''));
|
84
90
|
}
|
85
91
|
return filter;
|
86
92
|
};
|
87
|
-
var
|
88
|
-
}, _defineProperty(_obj, type, aggValue), _defineProperty(_obj, "filter", getFilters()), _obj);
|
93
|
+
var _obj;
|
94
|
+
var query = (_obj = {}, _defineProperty(_obj, type, aggValue), _defineProperty(_obj, "filter", getFilters()), _obj);
|
89
95
|
if (pageType === ListingTypesEnum.Collection) {
|
90
96
|
var collapseMode = config === null || config === void 0 ? void 0 : config.collapseMode;
|
91
|
-
query = _objectSpread({
|
92
|
-
}, query, {
|
97
|
+
query = _objectSpread({}, query, {
|
93
98
|
collapseMode: collapseMode
|
94
99
|
});
|
95
100
|
}
|
@@ -103,11 +108,25 @@ var applyBrandsPostFilter = function(param) {
|
|
103
108
|
var postFilter = param.postFilter;
|
104
109
|
if (postFilter) {
|
105
110
|
var filtersArr = postFilter.split('&');
|
106
|
-
var filters = filtersArr.reduce(function(res, val
|
111
|
+
var filters = filtersArr.reduce(function(res, val) {
|
112
|
+
if (val.includes('category')) return res;
|
113
|
+
return res += "&".concat(val);
|
114
|
+
}, '');
|
115
|
+
if (!filters) return '';
|
116
|
+
return filters[0] === '&' ? filters : "&".concat(filters);
|
117
|
+
}
|
118
|
+
return '';
|
119
|
+
};
|
120
|
+
var applyViewsPostFilter = function(param) {
|
121
|
+
var postFilter = param.postFilter;
|
122
|
+
if (postFilter) {
|
123
|
+
var filtersArr = postFilter.split('&');
|
124
|
+
var filters = filtersArr.reduce(function(res, val) {
|
107
125
|
if (val.includes('category')) return res;
|
126
|
+
if (!res) return res + "".concat(val);
|
108
127
|
return res += "&".concat(val);
|
109
128
|
}, '');
|
110
|
-
return
|
129
|
+
return filters || '';
|
111
130
|
}
|
112
131
|
return '';
|
113
132
|
};
|
@@ -1,6 +1,11 @@
|
|
1
1
|
import { ListingTypesEnum } from '../index';
|
2
2
|
import { getAttributePageType } from '../hooks/utils';
|
3
3
|
import { extendFilter } from './extendFilter';
|
4
|
+
function _arrayLikeToArray(arr, len) {
|
5
|
+
if (len == null || len > arr.length) len = arr.length;
|
6
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
7
|
+
return arr2;
|
8
|
+
}
|
4
9
|
function _arrayWithHoles(arr) {
|
5
10
|
if (Array.isArray(arr)) return arr;
|
6
11
|
}
|
@@ -18,12 +23,14 @@ function _defineProperty(obj, key, value) {
|
|
18
23
|
return obj;
|
19
24
|
}
|
20
25
|
function _iterableToArrayLimit(arr, i) {
|
26
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
27
|
+
if (_i == null) return;
|
21
28
|
var _arr = [];
|
22
29
|
var _n = true;
|
23
30
|
var _d = false;
|
24
|
-
var _e
|
31
|
+
var _s, _e;
|
25
32
|
try {
|
26
|
-
for(
|
33
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
27
34
|
_arr.push(_s.value);
|
28
35
|
if (i && _arr.length === i) break;
|
29
36
|
}
|
@@ -40,12 +47,11 @@ function _iterableToArrayLimit(arr, i) {
|
|
40
47
|
return _arr;
|
41
48
|
}
|
42
49
|
function _nonIterableRest() {
|
43
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
50
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
44
51
|
}
|
45
52
|
function _objectSpread(target) {
|
46
53
|
for(var i = 1; i < arguments.length; i++){
|
47
|
-
var source = arguments[i] != null ? arguments[i] : {
|
48
|
-
};
|
54
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
49
55
|
var ownKeys = Object.keys(source);
|
50
56
|
if (typeof Object.getOwnPropertySymbols === "function") {
|
51
57
|
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
@@ -59,15 +65,22 @@ function _objectSpread(target) {
|
|
59
65
|
return target;
|
60
66
|
}
|
61
67
|
function _slicedToArray(arr, i) {
|
62
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
68
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
69
|
+
}
|
70
|
+
function _unsupportedIterableToArray(o, minLen) {
|
71
|
+
if (!o) return;
|
72
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
73
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
74
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
75
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
76
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
63
77
|
}
|
64
78
|
export var buildFilterQuery = function(param) {
|
65
79
|
var predicate = param.predicate, slug = param.slug, pageType = param.pageType, router = param.router, aggregates = param.aggregates, config = param.config, postFilter = param.postFilter;
|
66
80
|
var ref;
|
67
81
|
var query = (predicate === null || predicate === void 0 ? void 0 : predicate.filters) || (predicate === null || predicate === void 0 ? void 0 : predicate._id) || slug;
|
68
82
|
var queryType = pageType === ListingTypesEnum.Search ? 'text' : pageType;
|
69
|
-
var ref1 = config || {
|
70
|
-
}, filterExtension = ref1.filterExtension, collapseMode = ref1.collapseMode;
|
83
|
+
var ref1 = config || {}, filterExtension = ref1.filterExtension, collapseMode = ref1.collapseMode;
|
71
84
|
var filter = '';
|
72
85
|
if (pageType === ListingTypesEnum.AttrPage) {
|
73
86
|
var ref2 = _slicedToArray(getAttributePageType(router, slug), 2), type = ref2[0], val = ref2[1];
|
@@ -92,29 +105,21 @@ export var buildFilterQuery = function(param) {
|
|
92
105
|
var aggregationTerm = agg.aggregationDefinition;
|
93
106
|
if (!aggregateType) return map;
|
94
107
|
if (map[aggregateType]) {
|
95
|
-
return _objectSpread({
|
96
|
-
}, map, _defineProperty({
|
97
|
-
}, aggregateType, "".concat(map[aggregateType], "&").concat(aggregationTerm)));
|
108
|
+
return _objectSpread({}, map, _defineProperty({}, aggregateType, "".concat(map[aggregateType], "&").concat(aggregationTerm)));
|
98
109
|
}
|
99
|
-
return _objectSpread({
|
100
|
-
|
101
|
-
|
102
|
-
}, {
|
103
|
-
});
|
104
|
-
var builtQuery = _objectSpread({
|
105
|
-
}, aggregatesMap, {
|
110
|
+
return _objectSpread({}, map, _defineProperty({}, aggregateType, "".concat(aggregationTerm)));
|
111
|
+
}, {});
|
112
|
+
var builtQuery = _objectSpread({}, aggregatesMap, {
|
106
113
|
filter: extendFilter({
|
107
114
|
slug: filter,
|
108
115
|
filterExtension: filterExtension,
|
109
116
|
noSplit: true
|
110
117
|
})
|
111
118
|
});
|
112
|
-
if ((ref = router.query) === null || ref === void 0 ? void 0 : ref.filter) builtQuery = _objectSpread({
|
113
|
-
}, builtQuery, {
|
119
|
+
if ((ref = router.query) === null || ref === void 0 ? void 0 : ref.filter) builtQuery = _objectSpread({}, builtQuery, {
|
114
120
|
postFilter: postFilter
|
115
121
|
});
|
116
|
-
if (pageType !== ListingTypesEnum.Collection && collapseMode) builtQuery = _objectSpread({
|
117
|
-
}, builtQuery, {
|
122
|
+
if (pageType !== ListingTypesEnum.Collection && collapseMode) builtQuery = _objectSpread({}, builtQuery, {
|
118
123
|
collapseMode: collapseMode
|
119
124
|
});
|
120
125
|
return builtQuery;
|
@@ -1,13 +1,20 @@
|
|
1
|
+
function _arrayLikeToArray(arr, len) {
|
2
|
+
if (len == null || len > arr.length) len = arr.length;
|
3
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
4
|
+
return arr2;
|
5
|
+
}
|
1
6
|
function _arrayWithHoles(arr) {
|
2
7
|
if (Array.isArray(arr)) return arr;
|
3
8
|
}
|
4
9
|
function _iterableToArrayLimit(arr, i) {
|
10
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
11
|
+
if (_i == null) return;
|
5
12
|
var _arr = [];
|
6
13
|
var _n = true;
|
7
14
|
var _d = false;
|
8
|
-
var _e
|
15
|
+
var _s, _e;
|
9
16
|
try {
|
10
|
-
for(
|
17
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
11
18
|
_arr.push(_s.value);
|
12
19
|
if (i && _arr.length === i) break;
|
13
20
|
}
|
@@ -24,10 +31,18 @@ function _iterableToArrayLimit(arr, i) {
|
|
24
31
|
return _arr;
|
25
32
|
}
|
26
33
|
function _nonIterableRest() {
|
27
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
34
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
28
35
|
}
|
29
36
|
function _slicedToArray(arr, i) {
|
30
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
37
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
38
|
+
}
|
39
|
+
function _unsupportedIterableToArray(o, minLen) {
|
40
|
+
if (!o) return;
|
41
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
42
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
43
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
44
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
45
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
31
46
|
}
|
32
47
|
export var extendFilter = function(param) {
|
33
48
|
var slug = param.slug, filterExtension = param.filterExtension, noSplit = param.noSplit;
|
@@ -1,13 +1,20 @@
|
|
1
|
+
function _arrayLikeToArray(arr, len) {
|
2
|
+
if (len == null || len > arr.length) len = arr.length;
|
3
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
4
|
+
return arr2;
|
5
|
+
}
|
1
6
|
function _arrayWithHoles(arr) {
|
2
7
|
if (Array.isArray(arr)) return arr;
|
3
8
|
}
|
4
9
|
function _iterableToArrayLimit(arr, i) {
|
10
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
11
|
+
if (_i == null) return;
|
5
12
|
var _arr = [];
|
6
13
|
var _n = true;
|
7
14
|
var _d = false;
|
8
|
-
var _e
|
15
|
+
var _s, _e;
|
9
16
|
try {
|
10
|
-
for(
|
17
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
11
18
|
_arr.push(_s.value);
|
12
19
|
if (i && _arr.length === i) break;
|
13
20
|
}
|
@@ -24,22 +31,28 @@ function _iterableToArrayLimit(arr, i) {
|
|
24
31
|
return _arr;
|
25
32
|
}
|
26
33
|
function _nonIterableRest() {
|
27
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
34
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
28
35
|
}
|
29
36
|
function _slicedToArray(arr, i) {
|
30
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
37
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
38
|
+
}
|
39
|
+
function _unsupportedIterableToArray(o, minLen) {
|
40
|
+
if (!o) return;
|
41
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
42
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
43
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
44
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
45
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
31
46
|
}
|
32
47
|
export var getListingAlias = function(param) {
|
33
48
|
var router = param.router, config = param.config;
|
34
49
|
var query = router.query;
|
35
50
|
if (!(config === null || config === void 0 ? void 0 : config.slugAliases)) return query.slug;
|
36
51
|
var aliases = config.slugAliases;
|
37
|
-
var slugMap = {
|
38
|
-
};
|
52
|
+
var slugMap = {};
|
39
53
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
40
54
|
try {
|
41
|
-
for(var _iterator = Object.entries(aliases || {
|
42
|
-
})[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
55
|
+
for(var _iterator = Object.entries(aliases || {})[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
43
56
|
var _value = _slicedToArray(_step.value, 2), path = _value[0], alias = _value[1];
|
44
57
|
slugMap[alias] = path;
|
45
58
|
}
|
@@ -9,11 +9,9 @@ export var getListingPageType = function(router, slug, meta) {
|
|
9
9
|
'/[slug]/[cat]/c': ListingTypesEnum.Category,
|
10
10
|
'/[slug]/[cat]/b': ListingTypesEnum.Brand
|
11
11
|
};
|
12
|
-
var slugAliases = {
|
13
|
-
};
|
12
|
+
var slugAliases = {};
|
14
13
|
if (meta) slugAliases = meta.slugAliases;
|
15
|
-
if ((((ref = Object.keys(slugAliases || {
|
16
|
-
})) === null || ref === void 0 ? void 0 : ref.includes(slug)) || (slug === null || slug === void 0 ? void 0 : slug.includes('sex'))) && !router.query.cat) {
|
14
|
+
if ((((ref = Object.keys(slugAliases || {})) === null || ref === void 0 ? void 0 : ref.includes(slug)) || (slug === null || slug === void 0 ? void 0 : slug.includes('sex'))) && !router.query.cat) {
|
17
15
|
return ListingTypesEnum.AttrPage;
|
18
16
|
}
|
19
17
|
if (router.query.q || router.query.search) {
|
@@ -80,38 +80,38 @@ export var EmptyBox = function(param) {
|
|
80
80
|
textColor: textColor || '',
|
81
81
|
onClose: onClose
|
82
82
|
})), /*#__PURE__*/ React.createElement(SuggestedSearches, null, canDisplayPopular && /*#__PURE__*/ React.createElement(PopularSearches, {
|
83
|
-
title: (labels === null || labels === void 0 ? void 0 : labels.
|
83
|
+
title: (labels === null || labels === void 0 ? void 0 : labels.popularSearches) || '',
|
84
84
|
onClose: onClose,
|
85
85
|
textColor: textColor || '',
|
86
86
|
labelsColor: labelsColor || ''
|
87
87
|
}), withRecent && canDisplayRecent && /*#__PURE__*/ React.createElement(RecentSearches, {
|
88
|
-
title: (labels === null || labels === void 0 ? void 0 : labels.
|
88
|
+
title: (labels === null || labels === void 0 ? void 0 : labels.recentSearches) || '',
|
89
89
|
data: searchHistory,
|
90
90
|
onClose: onClose,
|
91
91
|
textColor: textColor || '',
|
92
92
|
labelsColor: labelsColor || ''
|
93
93
|
}))) : /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(Container, {
|
94
94
|
labelsColor: labelsColor,
|
95
|
-
title: (labels === null || labels === void 0 ? void 0 : labels.
|
95
|
+
title: (labels === null || labels === void 0 ? void 0 : labels.products) || '',
|
96
96
|
onlyMobile: true
|
97
97
|
}, /*#__PURE__*/ React.createElement(NoResultsDesc, {
|
98
98
|
className: "SEARCH_BOX_NO_RESULT"
|
99
|
-
},
|
99
|
+
}, labels === null || labels === void 0 ? void 0 : labels.noResults)), /*#__PURE__*/ React.createElement(PromoCol, {
|
100
100
|
backgroundColor: backgroundColor
|
101
101
|
}, /*#__PURE__*/ React.createElement(Products, {
|
102
102
|
data: promoOffers,
|
103
103
|
textColor: textColor || '',
|
104
104
|
labelsColor: labelsColor || '',
|
105
105
|
onClose: onClose,
|
106
|
-
title: (labels === null || labels === void 0 ? void 0 : labels.
|
106
|
+
title: (labels === null || labels === void 0 ? void 0 : labels.promoOffers) || '',
|
107
107
|
offers: true
|
108
108
|
})), /*#__PURE__*/ React.createElement(Container, {
|
109
109
|
labelsColor: labelsColor,
|
110
|
-
title: (labels === null || labels === void 0 ? void 0 : labels.
|
110
|
+
title: (labels === null || labels === void 0 ? void 0 : labels.products) || '',
|
111
111
|
onlyDesktop: true
|
112
112
|
}, /*#__PURE__*/ React.createElement(NoResultsDesc, {
|
113
113
|
className: "SEARCH_BOX_NO_RESULT"
|
114
|
-
},
|
114
|
+
}, labels === null || labels === void 0 ? void 0 : labels.noResults))))));
|
115
115
|
};
|
116
116
|
var Wrapper = styled.div.attrs({
|
117
117
|
className: 'd-flex flex-column flex-lg-row mx-lg-auto '
|
package/dist/esm/navigation/components/SearchBox/Components/Products/Components/ProductCard/index.js
CHANGED
@@ -129,8 +129,7 @@ export var ProductCard = function(param) {
|
|
129
129
|
background: (ref = config.theme.palette) === null || ref === void 0 ? void 0 : ref.disabled,
|
130
130
|
defaultImageWidth: "7rem",
|
131
131
|
defaultSize: "medium",
|
132
|
-
breakpointSizes: {
|
133
|
-
},
|
132
|
+
breakpointSizes: {},
|
134
133
|
imagesMap: images === null || images === void 0 ? void 0 : images[0],
|
135
134
|
backgroundOverImage: true
|
136
135
|
})), /*#__PURE__*/ React.createElement(ProductCardContent, {
|