@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
@@ -2,17 +2,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
2
2
|
value: true
|
3
3
|
});
|
4
4
|
exports.updateObjProp = void 0;
|
5
|
+
function _arrayLikeToArray(arr, len) {
|
6
|
+
if (len == null || len > arr.length) len = arr.length;
|
7
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
8
|
+
return arr2;
|
9
|
+
}
|
5
10
|
function _arrayWithHoles(arr) {
|
6
11
|
if (Array.isArray(arr)) return arr;
|
7
12
|
}
|
8
13
|
function _iterableToArray(iter) {
|
9
|
-
if (Symbol.iterator
|
14
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
10
15
|
}
|
11
16
|
function _nonIterableRest() {
|
12
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
17
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
13
18
|
}
|
14
19
|
function _toArray(arr) {
|
15
|
-
return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest();
|
20
|
+
return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
21
|
+
}
|
22
|
+
function _unsupportedIterableToArray(o, minLen) {
|
23
|
+
if (!o) return;
|
24
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
25
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
26
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
27
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
28
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
16
29
|
}
|
17
30
|
var updateObjProp = function(obj, value, propPath) {
|
18
31
|
var _propPath = _toArray(propPath), head = _propPath[0], rest = _propPath.slice(1);
|
@@ -17,8 +17,7 @@ function _defineProperty(obj, key, value) {
|
|
17
17
|
}
|
18
18
|
function _objectSpread(target) {
|
19
19
|
for(var i = 1; i < arguments.length; i++){
|
20
|
-
var source = arguments[i] != null ? arguments[i] : {
|
21
|
-
};
|
20
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
22
21
|
var ownKeys = Object.keys(source);
|
23
22
|
if (typeof Object.getOwnPropertySymbols === "function") {
|
24
23
|
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
@@ -42,24 +41,17 @@ function genericBillingAddressValidation(data, errorLabels, requiredCompanyField
|
|
42
41
|
var companyErrors = requiredCompanyFields.reduce(function(errors, field) {
|
43
42
|
var ref, ref1;
|
44
43
|
if (!(data === null || data === void 0 ? void 0 : (ref = data.company) === null || ref === void 0 ? void 0 : (ref1 = ref[field]) === null || ref1 === void 0 ? void 0 : ref1.trim())) {
|
45
|
-
return _objectSpread({
|
46
|
-
}, errors, _defineProperty({
|
47
|
-
}, field, errorLabels.fieldIsRequired));
|
44
|
+
return _objectSpread({}, errors, _defineProperty({}, field, errorLabels.fieldIsRequired));
|
48
45
|
}
|
49
46
|
return errors;
|
50
|
-
}, {
|
51
|
-
});
|
47
|
+
}, {});
|
52
48
|
var fieldErrors = requiredFields.reduce(function(errors, field) {
|
53
49
|
var ref;
|
54
50
|
if (!((ref = data[field]) === null || ref === void 0 ? void 0 : ref.trim())) {
|
55
|
-
return _objectSpread({
|
56
|
-
}, errors, _defineProperty({
|
57
|
-
}, field, errorLabels.fieldIsRequired));
|
51
|
+
return _objectSpread({}, errors, _defineProperty({}, field, errorLabels.fieldIsRequired));
|
58
52
|
}
|
59
53
|
return errors;
|
60
|
-
}, {
|
61
|
-
});
|
62
|
-
var errors1 = _objectSpread({
|
63
|
-
}, companyErrors, fieldErrors);
|
54
|
+
}, {});
|
55
|
+
var errors1 = _objectSpread({}, companyErrors, fieldErrors);
|
64
56
|
return Object.keys(errors1).length ? errors1 : null;
|
65
57
|
}
|
@@ -24,8 +24,7 @@ function _defineProperty(obj, key, value) {
|
|
24
24
|
}
|
25
25
|
function _objectSpread(target) {
|
26
26
|
for(var i = 1; i < arguments.length; i++){
|
27
|
-
var source = arguments[i] != null ? arguments[i] : {
|
28
|
-
};
|
27
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
29
28
|
var ownKeys = Object.keys(source);
|
30
29
|
if (typeof Object.getOwnPropertySymbols === "function") {
|
31
30
|
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
@@ -76,8 +75,7 @@ function fanAddressValidation(param) {
|
|
76
75
|
var data = param.data, mod = param.mod, errorLabels = param.errorLabels;
|
77
76
|
var ref;
|
78
77
|
var address = mod === null || mod === void 0 ? void 0 : (ref = mod.moduleData) === null || ref === void 0 ? void 0 : ref.address;
|
79
|
-
var errors = {
|
80
|
-
};
|
78
|
+
var errors = {};
|
81
79
|
if (!data) return;
|
82
80
|
// City, Street and StreetNumber are always required
|
83
81
|
if (!(address === null || address === void 0 ? void 0 : address.city)) {
|
@@ -94,8 +92,7 @@ function fanAddressValidation(param) {
|
|
94
92
|
function genericOfficeValidation(param) {
|
95
93
|
var mod = param.mod, errorLabels = param.errorLabels;
|
96
94
|
var ref;
|
97
|
-
var errors = {
|
98
|
-
};
|
95
|
+
var errors = {};
|
99
96
|
var address = mod === null || mod === void 0 ? void 0 : (ref = mod.moduleData) === null || ref === void 0 ? void 0 : ref.address;
|
100
97
|
if (!(address === null || address === void 0 ? void 0 : address.city)) {
|
101
98
|
errors.city = errorLabels.cityIsRequired;
|
@@ -113,8 +110,7 @@ function pickupFromStoreValidation(param) {
|
|
113
110
|
} : undefined;
|
114
111
|
}
|
115
112
|
var _obj;
|
116
|
-
var defaultShippingValidations = (_obj = {
|
117
|
-
}, _defineProperty(_obj, _apiV2.ShippingModulesTypeEnum.Speedy, {
|
113
|
+
var defaultShippingValidations = (_obj = {}, _defineProperty(_obj, _apiV2.ShippingModulesTypeEnum.Speedy, {
|
118
114
|
Address: genericAddressValidation,
|
119
115
|
Office: genericOfficeValidation
|
120
116
|
}), _defineProperty(_obj, _apiV2.ShippingModulesTypeEnum.Econt, {
|
@@ -135,20 +131,16 @@ var defaultRequiredFields = [
|
|
135
131
|
'email',
|
136
132
|
'phoneNumber'
|
137
133
|
];
|
138
|
-
function validateShipping(data, mod, errorLabels, validations
|
139
|
-
var requiredFields =
|
140
|
-
var validateErrors = {
|
141
|
-
};
|
134
|
+
function validateShipping(data, mod, errorLabels, validations) {
|
135
|
+
var requiredFields = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : defaultRequiredFields, enableNoShippingMethodMode = arguments.length > 5 ? arguments[5] : void 0;
|
136
|
+
var validateErrors = {};
|
142
137
|
var globalErrors = requiredFields.reduce(function(errors, field) {
|
143
138
|
var ref, ref13;
|
144
139
|
if (!(data === null || data === void 0 ? void 0 : (ref = data[field]) === null || ref === void 0 ? void 0 : (ref13 = ref.trim) === null || ref13 === void 0 ? void 0 : ref13.call(ref))) {
|
145
|
-
return _objectSpread({
|
146
|
-
}, errors, _defineProperty({
|
147
|
-
}, field, errorLabels.fieldIsRequired));
|
140
|
+
return _objectSpread({}, errors, _defineProperty({}, field, errorLabels.fieldIsRequired));
|
148
141
|
}
|
149
142
|
return errors;
|
150
|
-
}, {
|
151
|
-
});
|
143
|
+
}, {});
|
152
144
|
if ((data === null || data === void 0 ? void 0 : data.email) && !_validations.emailRegex.test(data.email)) {
|
153
145
|
globalErrors.email = errorLabels.emailIsRequired;
|
154
146
|
}
|
@@ -158,8 +150,7 @@ function validateShipping(data, mod, errorLabels, validations, param, enableNoSh
|
|
158
150
|
if (!enableNoShippingMethodMode) {
|
159
151
|
var ref14, ref12;
|
160
152
|
if (!(mod === null || mod === void 0 ? void 0 : mod.moduleKey) || !(mod === null || mod === void 0 ? void 0 : (ref14 = mod.moduleData) === null || ref14 === void 0 ? void 0 : ref14.methodKey)) {
|
161
|
-
return _objectSpread({
|
162
|
-
}, globalErrors, {
|
153
|
+
return _objectSpread({}, globalErrors, {
|
163
154
|
courier: errorLabels.selectCourier
|
164
155
|
});
|
165
156
|
}
|
@@ -171,10 +162,8 @@ function validateShipping(data, mod, errorLabels, validations, param, enableNoSh
|
|
171
162
|
data: data,
|
172
163
|
mod: mod,
|
173
164
|
errorLabels: errorLabels
|
174
|
-
}) || {
|
175
|
-
};
|
165
|
+
}) || {};
|
176
166
|
}
|
177
|
-
var errors1 = _objectSpread({
|
178
|
-
}, globalErrors, validateErrors);
|
167
|
+
var errors1 = _objectSpread({}, globalErrors, validateErrors);
|
179
168
|
return Object.keys(errors1).length ? errors1 : null;
|
180
169
|
}
|
@@ -5,6 +5,11 @@ exports.CustomProductProvider = CustomProductProvider;
|
|
5
5
|
exports.useCustomProductState = useCustomProductState;
|
6
6
|
exports.useUpdateCustomProductState = useUpdateCustomProductState;
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
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
|
}
|
@@ -25,13 +30,11 @@ function _interopRequireWildcard(obj) {
|
|
25
30
|
if (obj && obj.__esModule) {
|
26
31
|
return obj;
|
27
32
|
} else {
|
28
|
-
var newObj = {
|
29
|
-
};
|
33
|
+
var newObj = {};
|
30
34
|
if (obj != null) {
|
31
35
|
for(var key in obj){
|
32
36
|
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
33
|
-
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
34
|
-
};
|
37
|
+
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
35
38
|
if (desc.get || desc.set) {
|
36
39
|
Object.defineProperty(newObj, key, desc);
|
37
40
|
} else {
|
@@ -45,12 +48,14 @@ function _interopRequireWildcard(obj) {
|
|
45
48
|
}
|
46
49
|
}
|
47
50
|
function _iterableToArrayLimit(arr, i) {
|
51
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
52
|
+
if (_i == null) return;
|
48
53
|
var _arr = [];
|
49
54
|
var _n = true;
|
50
55
|
var _d = false;
|
51
|
-
var _e
|
56
|
+
var _s, _e;
|
52
57
|
try {
|
53
|
-
for(
|
58
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
54
59
|
_arr.push(_s.value);
|
55
60
|
if (i && _arr.length === i) break;
|
56
61
|
}
|
@@ -67,12 +72,11 @@ function _iterableToArrayLimit(arr, i) {
|
|
67
72
|
return _arr;
|
68
73
|
}
|
69
74
|
function _nonIterableRest() {
|
70
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
75
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
71
76
|
}
|
72
77
|
function _objectSpread(target) {
|
73
78
|
for(var i = 1; i < arguments.length; i++){
|
74
|
-
var source = arguments[i] != null ? arguments[i] : {
|
75
|
-
};
|
79
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
76
80
|
var ownKeys = Object.keys(source);
|
77
81
|
if (typeof Object.getOwnPropertySymbols === "function") {
|
78
82
|
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
@@ -86,10 +90,17 @@ function _objectSpread(target) {
|
|
86
90
|
return target;
|
87
91
|
}
|
88
92
|
function _slicedToArray(arr, i) {
|
89
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
93
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
90
94
|
}
|
91
|
-
|
92
|
-
|
95
|
+
function _unsupportedIterableToArray(o, minLen) {
|
96
|
+
if (!o) return;
|
97
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
98
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
99
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
100
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
101
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
102
|
+
}
|
103
|
+
var CustomProductContext = /*#__PURE__*/ (0, _react).createContext({});
|
93
104
|
function CustomProductProvider(param) {
|
94
105
|
var children = param.children, initialValue = param.initialValue;
|
95
106
|
var ref = _slicedToArray((0, _react).useState(initialValue), 2), state = ref[0], setState = ref[1];
|
@@ -98,8 +109,7 @@ function CustomProductProvider(param) {
|
|
98
109
|
throw new Error('newState must be an object');
|
99
110
|
}
|
100
111
|
setState(function(oldState) {
|
101
|
-
return _objectSpread({
|
102
|
-
}, oldState, newState);
|
112
|
+
return _objectSpread({}, oldState, newState);
|
103
113
|
});
|
104
114
|
}, [
|
105
115
|
setState
|
@@ -5,6 +5,11 @@ exports.useUpdateLabels = useUpdateLabels;
|
|
5
5
|
exports.useLabels = useLabels;
|
6
6
|
exports.useStrings = exports.useUpdateStrings = exports.LabelsContextProvider = exports.StringsContextProvider = exports.LabelsContext = void 0;
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
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
|
}
|
@@ -39,13 +44,11 @@ function _interopRequireWildcard(obj) {
|
|
39
44
|
if (obj && obj.__esModule) {
|
40
45
|
return obj;
|
41
46
|
} else {
|
42
|
-
var newObj = {
|
43
|
-
};
|
47
|
+
var newObj = {};
|
44
48
|
if (obj != null) {
|
45
49
|
for(var key in obj){
|
46
50
|
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
47
|
-
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
48
|
-
};
|
51
|
+
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
49
52
|
if (desc.get || desc.set) {
|
50
53
|
Object.defineProperty(newObj, key, desc);
|
51
54
|
} else {
|
@@ -59,12 +62,14 @@ function _interopRequireWildcard(obj) {
|
|
59
62
|
}
|
60
63
|
}
|
61
64
|
function _iterableToArrayLimit(arr, i) {
|
65
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
66
|
+
if (_i == null) return;
|
62
67
|
var _arr = [];
|
63
68
|
var _n = true;
|
64
69
|
var _d = false;
|
65
|
-
var _e
|
70
|
+
var _s, _e;
|
66
71
|
try {
|
67
|
-
for(
|
72
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
68
73
|
_arr.push(_s.value);
|
69
74
|
if (i && _arr.length === i) break;
|
70
75
|
}
|
@@ -81,12 +86,11 @@ function _iterableToArrayLimit(arr, i) {
|
|
81
86
|
return _arr;
|
82
87
|
}
|
83
88
|
function _nonIterableRest() {
|
84
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
89
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
85
90
|
}
|
86
91
|
function _objectSpread(target) {
|
87
92
|
for(var i = 1; i < arguments.length; i++){
|
88
|
-
var source = arguments[i] != null ? arguments[i] : {
|
89
|
-
};
|
93
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
90
94
|
var ownKeys = Object.keys(source);
|
91
95
|
if (typeof Object.getOwnPropertySymbols === "function") {
|
92
96
|
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
@@ -100,28 +104,29 @@ function _objectSpread(target) {
|
|
100
104
|
return target;
|
101
105
|
}
|
102
106
|
function _slicedToArray(arr, i) {
|
103
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
107
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
104
108
|
}
|
105
|
-
|
106
|
-
|
109
|
+
function _unsupportedIterableToArray(o, minLen) {
|
110
|
+
if (!o) return;
|
111
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
112
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
113
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
114
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
115
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
116
|
+
}
|
117
|
+
var LabelsContext = /*#__PURE__*/ (0, _react).createContext({});
|
107
118
|
exports.LabelsContext = LabelsContext;
|
108
|
-
var UpdateLabelsContext = /*#__PURE__*/ (0, _react).createContext(function() {
|
109
|
-
}
|
110
|
-
var serverLabels = {
|
111
|
-
};
|
119
|
+
var UpdateLabelsContext = /*#__PURE__*/ (0, _react).createContext(function() {});
|
120
|
+
var serverLabels = {};
|
112
121
|
var StringsContextProvider = function(props) {
|
113
|
-
return(/*#__PURE__*/ _react.default.createElement(LabelsContextProvider, _extends({
|
114
|
-
}, props), props.children));
|
122
|
+
return(/*#__PURE__*/ _react.default.createElement(LabelsContextProvider, _extends({}, props), props.children));
|
115
123
|
};
|
116
124
|
exports.StringsContextProvider = StringsContextProvider;
|
117
125
|
var LabelsContextProvider = function(param) {
|
118
|
-
var children = param.children, _initialValue = param.initialValue, initialValue = _initialValue === void 0 ? {
|
119
|
-
} : _initialValue;
|
126
|
+
var children = param.children, _initialValue = param.initialValue, initialValue = _initialValue === void 0 ? {} : _initialValue;
|
120
127
|
var ref = _slicedToArray((0, _react).useState(typeof window === 'undefined' ? serverLabels : initialValue), 2), value = ref[0], setValue = ref[1];
|
121
128
|
var updateString = (0, _react).useCallback(function(domain, labels) {
|
122
|
-
setValue(_objectSpread({
|
123
|
-
}, value, _defineProperty({
|
124
|
-
}, domain, labels)));
|
129
|
+
setValue(_objectSpread({}, value, _defineProperty({}, domain, labels)));
|
125
130
|
}, [
|
126
131
|
value
|
127
132
|
]);
|
@@ -136,15 +141,12 @@ var useUpdateStrings = function(domain, strings) {
|
|
136
141
|
var updateStrings = (0, _react).useContext(UpdateLabelsContext);
|
137
142
|
// hack
|
138
143
|
if (typeof window === 'undefined') {
|
139
|
-
serverLabels = _objectSpread({
|
140
|
-
}, serverLabels, _defineProperty({
|
141
|
-
}, domain, strings));
|
144
|
+
serverLabels = _objectSpread({}, serverLabels, _defineProperty({}, domain, strings));
|
142
145
|
}
|
143
146
|
(0, _react).useEffect(function() {
|
144
147
|
updateStrings(domain, strings);
|
145
148
|
return function() {
|
146
|
-
updateStrings(domain, {
|
147
|
-
});
|
149
|
+
updateStrings(domain, {});
|
148
150
|
};
|
149
151
|
}, [
|
150
152
|
domain,
|
@@ -153,23 +155,19 @@ var useUpdateStrings = function(domain, strings) {
|
|
153
155
|
};
|
154
156
|
exports.useUpdateStrings = useUpdateStrings;
|
155
157
|
var useStrings = function(domain) {
|
156
|
-
return (0, _react).useContext(LabelsContext)[domain] || {
|
157
|
-
};
|
158
|
+
return (0, _react).useContext(LabelsContext)[domain] || {};
|
158
159
|
};
|
159
160
|
exports.useStrings = useStrings;
|
160
161
|
function useUpdateLabels(domain, labels) {
|
161
162
|
var updateStrings = (0, _react).useContext(UpdateLabelsContext);
|
162
163
|
// hack
|
163
164
|
if (typeof window === 'undefined') {
|
164
|
-
serverLabels = _objectSpread({
|
165
|
-
}, serverLabels, _defineProperty({
|
166
|
-
}, domain, labels));
|
165
|
+
serverLabels = _objectSpread({}, serverLabels, _defineProperty({}, domain, labels));
|
167
166
|
}
|
168
167
|
(0, _react).useEffect(function() {
|
169
168
|
updateStrings(domain, labels);
|
170
169
|
return function() {
|
171
|
-
updateStrings(domain, {
|
172
|
-
});
|
170
|
+
updateStrings(domain, {});
|
173
171
|
};
|
174
172
|
}, [
|
175
173
|
domain,
|
@@ -177,6 +175,5 @@ function useUpdateLabels(domain, labels) {
|
|
177
175
|
]);
|
178
176
|
}
|
179
177
|
function useLabels(domain) {
|
180
|
-
return (0, _react).useContext(LabelsContext)[domain] || {
|
181
|
-
};
|
178
|
+
return (0, _react).useContext(LabelsContext)[domain] || {};
|
182
179
|
}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
Object.defineProperty(exports, "__esModule", {
|
2
2
|
value: true
|
3
3
|
});
|
4
|
-
var _exportNames = {
|
5
|
-
};
|
4
|
+
var _exportNames = {};
|
6
5
|
var _useAddAddress = _interopRequireWildcard(require("./useAddAddress"));
|
7
6
|
Object.keys(_useAddAddress).forEach(function(key) {
|
8
7
|
if (key === "default" || key === "__esModule") return;
|
@@ -79,13 +78,11 @@ function _interopRequireWildcard(obj) {
|
|
79
78
|
if (obj && obj.__esModule) {
|
80
79
|
return obj;
|
81
80
|
} else {
|
82
|
-
var newObj = {
|
83
|
-
};
|
81
|
+
var newObj = {};
|
84
82
|
if (obj != null) {
|
85
83
|
for(var key in obj){
|
86
84
|
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
87
|
-
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
88
|
-
};
|
85
|
+
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
89
86
|
if (desc.get || desc.set) {
|
90
87
|
Object.defineProperty(newObj, key, desc);
|
91
88
|
} else {
|
@@ -7,16 +7,16 @@ var _addressesApi = require("../../../api/addressesApi");
|
|
7
7
|
var _myCartApi = require("../../../api/myCartApi");
|
8
8
|
var _utils = require("../../../contexts/CheckoutForm/utils");
|
9
9
|
var _errorHandling = require("../../error-handling");
|
10
|
+
function _arrayLikeToArray(arr, len) {
|
11
|
+
if (len == null || len > arr.length) len = arr.length;
|
12
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
13
|
+
return arr2;
|
14
|
+
}
|
10
15
|
function _arrayWithHoles(arr) {
|
11
16
|
if (Array.isArray(arr)) return arr;
|
12
17
|
}
|
13
18
|
function _arrayWithoutHoles(arr) {
|
14
|
-
if (Array.isArray(arr))
|
15
|
-
for(var i = 0, arr2 = new Array(arr.length); i < arr.length; i++){
|
16
|
-
arr2[i] = arr[i];
|
17
|
-
}
|
18
|
-
return arr2;
|
19
|
-
}
|
19
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
20
20
|
}
|
21
21
|
function _defineProperty(obj, key, value) {
|
22
22
|
if (key in obj) {
|
@@ -35,13 +35,11 @@ function _interopRequireWildcard(obj) {
|
|
35
35
|
if (obj && obj.__esModule) {
|
36
36
|
return obj;
|
37
37
|
} else {
|
38
|
-
var newObj = {
|
39
|
-
};
|
38
|
+
var newObj = {};
|
40
39
|
if (obj != null) {
|
41
40
|
for(var key in obj){
|
42
41
|
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
43
|
-
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
44
|
-
};
|
42
|
+
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
45
43
|
if (desc.get || desc.set) {
|
46
44
|
Object.defineProperty(newObj, key, desc);
|
47
45
|
} else {
|
@@ -55,15 +53,17 @@ function _interopRequireWildcard(obj) {
|
|
55
53
|
}
|
56
54
|
}
|
57
55
|
function _iterableToArray(iter) {
|
58
|
-
if (Symbol.iterator
|
56
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
59
57
|
}
|
60
58
|
function _iterableToArrayLimit(arr, i) {
|
59
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
60
|
+
if (_i == null) return;
|
61
61
|
var _arr = [];
|
62
62
|
var _n = true;
|
63
63
|
var _d = false;
|
64
|
-
var _e
|
64
|
+
var _s, _e;
|
65
65
|
try {
|
66
|
-
for(
|
66
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
67
67
|
_arr.push(_s.value);
|
68
68
|
if (i && _arr.length === i) break;
|
69
69
|
}
|
@@ -80,15 +80,14 @@ function _iterableToArrayLimit(arr, i) {
|
|
80
80
|
return _arr;
|
81
81
|
}
|
82
82
|
function _nonIterableRest() {
|
83
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
83
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
84
84
|
}
|
85
85
|
function _nonIterableSpread() {
|
86
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
86
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
87
87
|
}
|
88
88
|
function _objectSpread(target) {
|
89
89
|
for(var i = 1; i < arguments.length; i++){
|
90
|
-
var source = arguments[i] != null ? arguments[i] : {
|
91
|
-
};
|
90
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
92
91
|
var ownKeys = Object.keys(source);
|
93
92
|
if (typeof Object.getOwnPropertySymbols === "function") {
|
94
93
|
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
@@ -102,21 +101,27 @@ function _objectSpread(target) {
|
|
102
101
|
return target;
|
103
102
|
}
|
104
103
|
function _slicedToArray(arr, i) {
|
105
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
104
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
106
105
|
}
|
107
106
|
function _toConsumableArray(arr) {
|
108
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
|
107
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
108
|
+
}
|
109
|
+
function _unsupportedIterableToArray(o, minLen) {
|
110
|
+
if (!o) return;
|
111
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
112
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
113
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
114
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
115
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
109
116
|
}
|
110
|
-
var
|
111
|
-
exports.Couriers =
|
117
|
+
var Couriers;
|
118
|
+
exports.Couriers = Couriers;
|
112
119
|
(function(Couriers) {
|
113
120
|
Couriers['Speedy'] = 'Speedy';
|
114
121
|
Couriers['Econt'] = 'Econt';
|
115
122
|
Couriers['Evropat'] = 'Evropat';
|
116
|
-
})(
|
117
|
-
})
|
118
|
-
var AddressFormContext = /*#__PURE__*/ _react.default.createContext({
|
119
|
-
});
|
123
|
+
})(Couriers || (exports.Couriers = Couriers = {}));
|
124
|
+
var AddressFormContext = /*#__PURE__*/ _react.default.createContext({});
|
120
125
|
var AddressFormContextProvider = function(param) {
|
121
126
|
var children = param.children, currentAddress = param.address, onSuccess = param.onSuccess, _validations = param.validations, validations = _validations === void 0 ? _utils.defaultShippingValidations : _validations, errorLabels = param.errorLabels, _requiredFields = param.requiredFields, requiredFields = _requiredFields === void 0 ? [
|
122
127
|
'firstName',
|
@@ -160,14 +165,9 @@ var AddressFormContextProvider = function(param) {
|
|
160
165
|
};
|
161
166
|
var setModuleAddressData = (0, _react).useCallback(function(key, value) {
|
162
167
|
if (!moduleData) return;
|
163
|
-
var data = _objectSpread({
|
164
|
-
|
165
|
-
|
166
|
-
};
|
167
|
-
data.moduleData.address = _objectSpread({
|
168
|
-
}, data.moduleData.address || {
|
169
|
-
}, _defineProperty({
|
170
|
-
}, key, value));
|
168
|
+
var data = _objectSpread({}, moduleData);
|
169
|
+
if (!data.moduleData) data.moduleData = {};
|
170
|
+
data.moduleData.address = _objectSpread({}, data.moduleData.address || {}, _defineProperty({}, key, value));
|
171
171
|
setModuleData(data);
|
172
172
|
}, [
|
173
173
|
moduleData
|
@@ -201,9 +201,7 @@ var AddressFormContextProvider = function(param) {
|
|
201
201
|
var data1 = _toConsumableArray(platformMethods).concat(_toConsumableArray(merchantMethods.flat()));
|
202
202
|
var result = data1.reduce(function(current, method) {
|
203
203
|
var ref;
|
204
|
-
return _objectSpread({
|
205
|
-
}, current, _defineProperty({
|
206
|
-
}, method.moduleKey, {
|
204
|
+
return _objectSpread({}, current, _defineProperty({}, method.moduleKey, {
|
207
205
|
methods: _toConsumableArray(((ref = current[method.moduleKey]) === null || ref === void 0 ? void 0 : ref.methods) || []).concat([
|
208
206
|
{
|
209
207
|
key: method.methodKey,
|
@@ -211,8 +209,7 @@ var AddressFormContextProvider = function(param) {
|
|
211
209
|
},
|
212
210
|
])
|
213
211
|
}));
|
214
|
-
}, {
|
215
|
-
});
|
212
|
+
}, {});
|
216
213
|
return result;
|
217
214
|
}, [
|
218
215
|
moduleTypesRaw,
|
@@ -222,20 +219,14 @@ var AddressFormContextProvider = function(param) {
|
|
222
219
|
* On input change
|
223
220
|
*/ var onChange = (0, _react).useCallback(function(name, value) {
|
224
221
|
if (!address) return;
|
225
|
-
setAddress(_objectSpread({
|
226
|
-
}, address, _defineProperty({
|
227
|
-
}, name, value)));
|
222
|
+
setAddress(_objectSpread({}, address, _defineProperty({}, name, value)));
|
228
223
|
}, [
|
229
224
|
address
|
230
225
|
]);
|
231
226
|
var addNewErrors = (0, _errorHandling).useErrors(addNewError, errorLabels);
|
232
227
|
var updateErrors = (0, _errorHandling).useErrors(updateError, errorLabels);
|
233
228
|
var errors = (0, _react).useMemo(function() {
|
234
|
-
return _objectSpread({
|
235
|
-
}, addressErrors || {
|
236
|
-
}, updateErrors || {
|
237
|
-
}, addNewErrors || {
|
238
|
-
});
|
229
|
+
return _objectSpread({}, addressErrors || {}, updateErrors || {}, addNewErrors || {});
|
239
230
|
}, [
|
240
231
|
addressErrors,
|
241
232
|
updateErrors,
|
@@ -249,8 +240,7 @@ var AddressFormContextProvider = function(param) {
|
|
249
240
|
if (currentAddress === null || currentAddress === void 0 ? void 0 : currentAddress._id) {
|
250
241
|
updateAddress({
|
251
242
|
id: currentAddress._id,
|
252
|
-
dto: _objectSpread({
|
253
|
-
}, address, {
|
243
|
+
dto: _objectSpread({}, address, {
|
254
244
|
moduleData: moduleData && [
|
255
245
|
moduleData
|
256
246
|
]
|
@@ -258,8 +248,7 @@ var AddressFormContextProvider = function(param) {
|
|
258
248
|
});
|
259
249
|
return;
|
260
250
|
}
|
261
|
-
addNewAddress(_objectSpread({
|
262
|
-
}, address, {
|
251
|
+
addNewAddress(_objectSpread({}, address, {
|
263
252
|
_id: undefined,
|
264
253
|
moduleData: moduleData && [
|
265
254
|
moduleData
|
@@ -277,8 +266,7 @@ var AddressFormContextProvider = function(param) {
|
|
277
266
|
onInputChange: onChange,
|
278
267
|
moduleData: moduleData,
|
279
268
|
setModuleAddressData: setModuleAddressData,
|
280
|
-
errors: isSubmitting ? errors : {
|
281
|
-
},
|
269
|
+
errors: isSubmitting ? errors : {},
|
282
270
|
isSubmitting: isSubmitting,
|
283
271
|
isValid: !hasErrors
|
284
272
|
};
|
@@ -1,8 +1,7 @@
|
|
1
1
|
Object.defineProperty(exports, "__esModule", {
|
2
2
|
value: true
|
3
3
|
});
|
4
|
-
var _exportNames = {
|
5
|
-
};
|
4
|
+
var _exportNames = {};
|
6
5
|
var _useBasketSync = _interopRequireWildcard(require("./useBasketSync"));
|
7
6
|
Object.keys(_useBasketSync).forEach(function(key) {
|
8
7
|
if (key === "default" || key === "__esModule") return;
|
@@ -139,13 +138,11 @@ function _interopRequireWildcard(obj) {
|
|
139
138
|
if (obj && obj.__esModule) {
|
140
139
|
return obj;
|
141
140
|
} else {
|
142
|
-
var newObj = {
|
143
|
-
};
|
141
|
+
var newObj = {};
|
144
142
|
if (obj != null) {
|
145
143
|
for(var key in obj){
|
146
144
|
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
147
|
-
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
148
|
-
};
|
145
|
+
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
149
146
|
if (desc.get || desc.set) {
|
150
147
|
Object.defineProperty(newObj, key, desc);
|
151
148
|
} else {
|