@sentecacommerce-theme/lib 0.13.7-alpha.6 → 0.13.9

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.
Files changed (839) hide show
  1. package/LICENSE.md +11 -0
  2. package/dist/cjs/GDPR/api/index.js +3 -6
  3. package/dist/cjs/GDPR/api/queries/index.js +3 -6
  4. package/dist/cjs/GDPR/api/queries/useConfirmConsentQuery.js +1 -2
  5. package/dist/cjs/GDPR/api/ssr/index.js +2 -4
  6. package/dist/cjs/GDPR/components/CookiesTable.js +2 -4
  7. package/dist/cjs/GDPR/components/index.js +2 -4
  8. package/dist/cjs/GDPR/hooks/index.js +15 -6
  9. package/dist/cjs/GDPR/hooks/useCheckForCookies.js +10 -0
  10. package/dist/cjs/GDPR/hooks/useCookies.js +37 -37
  11. package/dist/cjs/GDPR/index.js +3 -6
  12. package/dist/cjs/analytics/Pixel/hooks/index.js +39 -6
  13. package/dist/cjs/analytics/Pixel/hooks/usePixelFinishOrder.js +27 -0
  14. package/dist/cjs/analytics/Pixel/hooks/usePixelProductClick.js +4 -9
  15. package/dist/cjs/analytics/Pixel/hooks/usePixelProductDetails.js +19 -4
  16. package/dist/cjs/analytics/Pixel/hooks/usePixelProductsImpression.js +61 -35
  17. package/dist/cjs/analytics/Pixel/hooks/usePixelViewBasket.js +24 -0
  18. package/dist/cjs/analytics/Pixel/hooks/usePixelViewCategory.js +29 -0
  19. package/dist/cjs/analytics/Pixel/index.js +3 -6
  20. package/dist/cjs/analytics/Pixel/mainScript.js +258 -99
  21. package/dist/cjs/analytics/Pixel/minifiedPixel.js +1 -1
  22. package/dist/cjs/analytics/Pixel/usePixel.js +6 -1
  23. package/dist/cjs/analytics/Pixel/utils.js +17 -0
  24. package/dist/cjs/analytics/Releva/api/index.js +2 -4
  25. package/dist/cjs/analytics/Releva/api/query/index.js +2 -4
  26. package/dist/cjs/analytics/Releva/api/query/useRelevaQuery.js +1 -0
  27. package/dist/cjs/analytics/Releva/hooks/index.js +3 -6
  28. package/dist/cjs/analytics/Releva/hooks/useRelevaData.js +20 -6
  29. package/dist/cjs/analytics/Releva/index.js +3 -6
  30. package/dist/cjs/analytics/Releva/types.js +23 -25
  31. package/dist/cjs/analytics/Releva/useReleva.js +20 -6
  32. package/dist/cjs/analytics/Releva/utils.js +2 -4
  33. package/dist/cjs/analytics/viewContent.js +2 -1
  34. package/dist/cjs/api/addressesApi/index.js +10 -11
  35. package/dist/cjs/api/brandsApi/index.js +38 -33
  36. package/dist/cjs/api/catalogApi/index.js +157 -160
  37. package/dist/cjs/api/categoriesApi/index.js +38 -33
  38. package/dist/cjs/api/citiesApi/index.js +24 -19
  39. package/dist/cjs/api/companiesApi/index.js +12 -15
  40. package/dist/cjs/api/consentsApi/index.js +3 -6
  41. package/dist/cjs/api/getSDKConfig.js +14 -23
  42. package/dist/cjs/api/myCartApi/index.js +224 -136
  43. package/dist/cjs/api/myOrdersApi/index.js +56 -15
  44. package/dist/cjs/api/myPaymentsBoricaApi/index.js +23 -18
  45. package/dist/cjs/api/myShippingsEcontApi/index.js +150 -125
  46. package/dist/cjs/api/myShippingsEvropatApi/index.js +60 -50
  47. package/dist/cjs/api/myShippingsPickupFromStoreAPI/index.js +7 -7
  48. package/dist/cjs/api/myShippingsSpeedyApi/index.js +150 -125
  49. package/dist/cjs/api/notificationsApi/index.js +5 -5
  50. package/dist/cjs/api/pagesApi/index.js +4 -4
  51. package/dist/cjs/api/productsApi/index.js +49 -46
  52. package/dist/cjs/api/searchHistoryApi/index.js +36 -26
  53. package/dist/cjs/api/usersApi/index.js +2 -3
  54. package/dist/cjs/api/viewsApi/index.js +37 -32
  55. package/dist/cjs/api/vouchersApi/index.js +4 -4
  56. package/dist/cjs/api/walletApi/index.js +3 -6
  57. package/dist/cjs/api/wishlistApi/index.js +72 -20
  58. package/dist/cjs/api/wishlistApi/utils/index.js +2 -4
  59. package/dist/cjs/api.v2/core/checkout/index.js +3 -6
  60. package/dist/cjs/api.v2/core/checkout/payments/index.js +3 -6
  61. package/dist/cjs/api.v2/core/checkout/payments/useSetPaymentMethod.js +19 -4
  62. package/dist/cjs/api.v2/core/checkout/shippings/index.js +3 -6
  63. package/dist/cjs/api.v2/core/checkout/shippings/mutations/index.js +2 -4
  64. package/dist/cjs/api.v2/core/checkout/shippings/mutations/useMutateNomenclature.js +19 -14
  65. package/dist/cjs/api.v2/core/checkout/shippings/queries/index.js +3 -6
  66. package/dist/cjs/api.v2/core/checkout/shippings/queries/useFindNomenclatureElement.js +67 -56
  67. package/dist/cjs/api.v2/core/checkout/types.js +6 -8
  68. package/dist/cjs/api.v2/core/index.js +3 -6
  69. package/dist/cjs/api.v2/core/misc/index.js +3 -6
  70. package/dist/cjs/api.v2/core/misc/promo-code/index.js +3 -6
  71. package/dist/cjs/api.v2/core/misc/promo-code/mutations/usePromoCodeMutation.js +22 -17
  72. package/dist/cjs/api.v2/core/product/index.js +2 -4
  73. package/dist/cjs/api.v2/core/product/useSubscribeForSkuMutation.js +19 -4
  74. package/dist/cjs/api.v2/index.js +2 -4
  75. package/dist/cjs/basket/api/index.js +2 -4
  76. package/dist/cjs/basket/api/mutations/index.js +16 -4
  77. package/dist/cjs/basket/api/mutations/useChangeGiftVariant.js +116 -0
  78. package/dist/cjs/basket/api/mutations/useReplaceBasketMutation.js +17 -13
  79. package/dist/cjs/basket/hooks/index.js +15 -6
  80. package/dist/cjs/basket/hooks/useBasketCrossSaleItems.js +2 -4
  81. package/dist/cjs/basket/hooks/useChangeGiftVariant.js +16 -0
  82. package/dist/cjs/basket/index.js +2 -4
  83. package/dist/cjs/brands/api/index.js +3 -6
  84. package/dist/cjs/brands/api/queries/index.js +3 -6
  85. package/dist/cjs/brands/api/queries/keys.js +3 -4
  86. package/dist/cjs/brands/api/queries/useAllBrandsQuery.js +91 -76
  87. package/dist/cjs/brands/api/ssr/index.js +3 -6
  88. package/dist/cjs/brands/hooks/index.js +2 -4
  89. package/dist/cjs/brands/index.js +3 -6
  90. package/dist/cjs/build/api/index.js +2 -4
  91. package/dist/cjs/build/api/query/fetchStore.js +25 -20
  92. package/dist/cjs/build/api/query/index.js +2 -4
  93. package/dist/cjs/build/index.js +2 -4
  94. package/dist/cjs/checkout/api/index.js +3 -6
  95. package/dist/cjs/checkout/api/keys.js +9 -4
  96. package/dist/cjs/checkout/api/queries/index.js +15 -6
  97. package/dist/cjs/checkout/api/queries/useUniCreditCalculateForCartQuery.js +60 -0
  98. package/dist/cjs/checkout/contexts/BoricaResponseContext.js +3 -6
  99. package/dist/cjs/checkout/contexts/PaypalResponseContext.js +3 -6
  100. package/dist/cjs/checkout/contexts/UniCreditResponseContext.js +40 -0
  101. package/dist/cjs/checkout/contexts/index.js +15 -6
  102. package/dist/cjs/checkout/hooks/index.js +15 -6
  103. package/dist/cjs/checkout/hooks/useBnpCalculateForCart.js +8 -14
  104. package/dist/cjs/checkout/hooks/useUniCreditCalculateForCart.js +93 -0
  105. package/dist/cjs/checkout/index.js +3 -6
  106. package/dist/cjs/checkout/ssr/capturePaypalOrder.js +16 -11
  107. package/dist/cjs/checkout/ssr/captureUniCreditOrder.js +57 -0
  108. package/dist/cjs/checkout/ssr/index.js +15 -6
  109. package/dist/cjs/checkout/ssr/verifyBoricaResponse.js +24 -19
  110. package/dist/cjs/cms/api/index.js +3 -6
  111. package/dist/cjs/cms/api/mutations/index.js +3 -6
  112. package/dist/cjs/cms/api/mutations/useCMSFoldersCreateMutation.js +31 -29
  113. package/dist/cjs/cms/api/mutations/useCMSMediaDeleteAssetsMutation.js +19 -14
  114. package/dist/cjs/cms/api/mutations/useCMSMediaUploadAssetsMutation.js +21 -35
  115. package/dist/cjs/cms/api/queries/index.js +3 -6
  116. package/dist/cjs/cms/api/queries/keys.js +21 -14
  117. package/dist/cjs/cms/api/queries/useCMSContentListQuery.js +4 -7
  118. package/dist/cjs/cms/api/queries/useCMSMediaQuery.js +1 -2
  119. package/dist/cjs/cms/api/queries/useInjectedContentQuery.js +5 -7
  120. package/dist/cjs/cms/api/utils/index.js +2 -4
  121. package/dist/cjs/cms/components/RenderInjectedContent.js +5 -11
  122. package/dist/cjs/cms/components/index.js +2 -4
  123. package/dist/cjs/cms/hooks/index.js +3 -6
  124. package/dist/cjs/cms/hooks/useCmsContent.js +4 -8
  125. package/dist/cjs/cms/hooks/useCmsContentList.js +7 -12
  126. package/dist/cjs/cms/hooks/useCmsFolders.js +0 -6
  127. package/dist/cjs/cms/hooks/useCmsMedia.js +0 -6
  128. package/dist/cjs/cms/hooks/useCmsMediaDeleteAssets.js +0 -6
  129. package/dist/cjs/cms/hooks/useCmsMediaUploadAssets.js +0 -6
  130. package/dist/cjs/cms/hooks/useContentCategoriesMap.js +6 -13
  131. package/dist/cjs/cms/hooks/useCreateCmsFolders.js +0 -6
  132. package/dist/cjs/cms/hooks/useInjectedContentContext.js +6 -12
  133. package/dist/cjs/cms/hooks/useListingInjectedContent.js +1 -2
  134. package/dist/cjs/cms/index.js +3 -6
  135. package/dist/cjs/cms/ssr/fetchPagePaths.js +3 -3
  136. package/dist/cjs/cms/ssr/index.js +3 -6
  137. package/dist/cjs/cms/ssr/prefetchCMSPage.js +34 -29
  138. package/dist/cjs/cms/ssr/prefetchCmsContent.js +48 -43
  139. package/dist/cjs/cms/ssr/prefetchCmsContentList.js +52 -50
  140. package/dist/cjs/cms/utils/index.js +3 -6
  141. package/dist/cjs/components/AnalyticsScripts/index.js +24 -10
  142. package/dist/cjs/components/ClickOutside/index.js +2 -4
  143. package/dist/cjs/components/Drawer/index.js +6 -9
  144. package/dist/cjs/components/FadeIn/index.js +26 -15
  145. package/dist/cjs/components/FocusTrap/index.js +2 -4
  146. package/dist/cjs/components/GoogleOneTap/index.js +40 -22
  147. package/dist/cjs/components/Html/index.js +2 -4
  148. package/dist/cjs/components/LazyResponsiveImage/index.js +25 -16
  149. package/dist/cjs/components/Link/index.js +5 -10
  150. package/dist/cjs/components/Modal/index.js +2 -4
  151. package/dist/cjs/components/OverflowEllipsis/index.js +2 -4
  152. package/dist/cjs/components/ProgressBar/index.js +21 -8
  153. package/dist/cjs/components/index.js +3 -6
  154. package/dist/cjs/config/SentecaProvider.js +7 -12
  155. package/dist/cjs/config/index.js +2 -4
  156. package/dist/cjs/contexts/CheckoutForm/Components/BoricaRedirect/index.js +21 -8
  157. package/dist/cjs/contexts/CheckoutForm/Components/CheckoutCustomState/index.js +24 -14
  158. package/dist/cjs/contexts/CheckoutForm/Components/UniCreditRedirect/index.js +87 -0
  159. package/dist/cjs/contexts/CheckoutForm/Components/index.js +15 -6
  160. package/dist/cjs/contexts/CheckoutForm/hooks/index.js +3 -6
  161. package/dist/cjs/contexts/CheckoutForm/hooks/useBilling/index.js +52 -31
  162. package/dist/cjs/contexts/CheckoutForm/hooks/usePayment/index.js +20 -6
  163. package/dist/cjs/contexts/CheckoutForm/hooks/useSavedBillingList/index.js +2 -4
  164. package/dist/cjs/contexts/CheckoutForm/hooks/useSavedShippingList/index.js +20 -15
  165. package/dist/cjs/contexts/CheckoutForm/hooks/useShipping/index.js +102 -90
  166. package/dist/cjs/contexts/CheckoutForm/hooks/useShippingInitialData/index.js +3 -7
  167. package/dist/cjs/contexts/CheckoutForm/index.js +105 -63
  168. package/dist/cjs/contexts/CheckoutForm/utils/index.js +3 -6
  169. package/dist/cjs/contexts/CheckoutForm/utils/updatedNestedObjectProps.js +16 -3
  170. package/dist/cjs/contexts/CheckoutForm/utils/validateBillingAddress.js +6 -14
  171. package/dist/cjs/contexts/CheckoutForm/utils/validateShipping.js +12 -23
  172. package/dist/cjs/contexts/CustomProductProvider/index.js +24 -14
  173. package/dist/cjs/contexts/Strings.js +34 -37
  174. package/dist/cjs/hooks/addresses-hooks/index.js +3 -6
  175. package/dist/cjs/hooks/addresses-hooks/useAddressForm/index.js +40 -52
  176. package/dist/cjs/hooks/basket-hooks/index.js +3 -6
  177. package/dist/cjs/hooks/basket-hooks/useBasket/index.js +24 -7
  178. package/dist/cjs/hooks/basket-hooks/useBasketCustom/index.js +19 -4
  179. package/dist/cjs/hooks/basket-hooks/useBasketItemList/index.js +5 -10
  180. package/dist/cjs/hooks/basket-hooks/useBasketItemWithErrorList/index.js +4 -8
  181. package/dist/cjs/hooks/basket-hooks/useBasketLineItem/index.js +19 -4
  182. package/dist/cjs/hooks/basket-hooks/useBasketLineItem/utils/index.js +4 -9
  183. package/dist/cjs/hooks/checkout-hooks/index.js +3 -6
  184. package/dist/cjs/hooks/checkout-hooks/useAllStockLocations.js +5 -10
  185. package/dist/cjs/hooks/checkout-hooks/useShippingCourierMethods.js +41 -36
  186. package/dist/cjs/hooks/cities-hooks/index.js +2 -4
  187. package/dist/cjs/hooks/cities-hooks/useCities/index.js +19 -4
  188. package/dist/cjs/hooks/companies-hooks/index.js +3 -6
  189. package/dist/cjs/hooks/error-handling/index.js +2 -4
  190. package/dist/cjs/hooks/error-handling/useErrors/index.js +4 -9
  191. package/dist/cjs/hooks/labels/index.js +3 -6
  192. package/dist/cjs/hooks/labels/useGlobalLabels/index.js +1 -2
  193. package/dist/cjs/hooks/order-hooks/api/hooks/index.js +2 -4
  194. package/dist/cjs/hooks/order-hooks/api/index.js +3 -6
  195. package/dist/cjs/hooks/order-hooks/api/mutations/index.js +2 -4
  196. package/dist/cjs/hooks/order-hooks/api/queries/index.js +2 -4
  197. package/dist/cjs/hooks/order-hooks/api/queries/useOrderGetPaymentMethodQuery.js +2 -4
  198. package/dist/cjs/hooks/order-hooks/index.js +3 -6
  199. package/dist/cjs/hooks/order-hooks/useGenericCourierAddress/index.js +103 -68
  200. package/dist/cjs/hooks/order-hooks/useOrder/index.js +3 -16
  201. package/dist/cjs/hooks/order-hooks/useOrderGetPaymentMethod/index.js +0 -6
  202. package/dist/cjs/hooks/order-hooks/useOrderPaymentMethods/index.js +2 -4
  203. package/dist/cjs/hooks/order-hooks/useOrdersList/index.js +2 -4
  204. package/dist/cjs/hooks/order-hooks/usePayOrder/index.js +66 -58
  205. package/dist/cjs/hooks/order-hooks/useUpdateOrderPaymentMethod/index.js +20 -7
  206. package/dist/cjs/hooks/profile-hooks/index.js +3 -6
  207. package/dist/cjs/hooks/subscriptions-hooks/index.js +3 -6
  208. package/dist/cjs/hooks/subscriptions-hooks/useAcceptOnRegister/index.js +21 -8
  209. package/dist/cjs/hooks/subscriptions-hooks/useAllSubscriptions/index.js +32 -33
  210. package/dist/cjs/hooks/subscriptions-hooks/useSubscribeForProduct/index.js +20 -6
  211. package/dist/cjs/hooks/ui-hooks/index.js +3 -6
  212. package/dist/cjs/hooks/ui-hooks/useAccordion/index.js +19 -5
  213. package/dist/cjs/hooks/ui-hooks/useBoolean/index.js +21 -6
  214. package/dist/cjs/hooks/ui-hooks/useCallbackRef/index.js +21 -15
  215. package/dist/cjs/hooks/ui-hooks/useClickOutside/index.js +2 -2
  216. package/dist/cjs/hooks/ui-hooks/useIsIos/index.js +19 -4
  217. package/dist/cjs/hooks/ui-hooks/useMenuAim/index.js +19 -4
  218. package/dist/cjs/hooks/ui-hooks/useMergeRefs/index.js +2 -4
  219. package/dist/cjs/hooks/ui-hooks/usePagination/index.js +19 -14
  220. package/dist/cjs/hooks/ui-hooks/useScrollDirection/index.js +21 -7
  221. package/dist/cjs/hooks/ui-hooks/useScrollTo/index.js +23 -9
  222. package/dist/cjs/hooks/ui-hooks/useSlideshow/index.js +21 -6
  223. package/dist/cjs/hooks/ui-hooks/useToggleNavbarOnScroll/index.js +3 -3
  224. package/dist/cjs/hooks/ui-hooks/useUI/index.js +34 -35
  225. package/dist/cjs/hooks/ui-hooks/useWindowDimensions/index.js +19 -4
  226. package/dist/cjs/hooks/useAddressList/index.js +2 -3
  227. package/dist/cjs/hooks/useAggregateResult/index.js +7 -5
  228. package/dist/cjs/hooks/useAvailability/index.js +28 -14
  229. package/dist/cjs/hooks/useCarousel/component/index.js +12 -17
  230. package/dist/cjs/hooks/useCarousel/helpers/eventStore.js +2 -2
  231. package/dist/cjs/hooks/useCarousel/index.js +20 -6
  232. package/dist/cjs/hooks/useCatalogResult/index.js +2 -2
  233. package/dist/cjs/hooks/useCategoryTree/index.js +1 -2
  234. package/dist/cjs/hooks/useCheckoutBillingAddress/index.js +96 -7
  235. package/dist/cjs/hooks/useCheckoutDelivery/index.js +71 -58
  236. package/dist/cjs/hooks/useCheckoutDiscountCode/index.js +19 -4
  237. package/dist/cjs/hooks/useCheckoutPickupFromStore/index.js +21 -8
  238. package/dist/cjs/hooks/useCheckoutShippingAddress/index.js +19 -4
  239. package/dist/cjs/hooks/useCheckoutShippingModule/index.js +4 -6
  240. package/dist/cjs/hooks/useCheckoutSubmit/index.js +97 -58
  241. package/dist/cjs/hooks/useClearAllFilters/index.js +4 -4
  242. package/dist/cjs/hooks/useContactForm/index.js +8 -4
  243. package/dist/cjs/hooks/useCopyToClipboard/index.js +20 -4
  244. package/dist/cjs/hooks/useForceUpdate/index.js +19 -4
  245. package/dist/cjs/hooks/useLineItem/LineItemContext.js +86 -0
  246. package/dist/cjs/hooks/useLineItem/index.js +35 -26
  247. package/dist/cjs/hooks/useLocalRating/index.js +23 -10
  248. package/dist/cjs/hooks/usePrefetchProduct/index.js +19 -4
  249. package/dist/cjs/hooks/useProduct/index.js +22 -271
  250. package/dist/cjs/hooks/useProduct/utils/index.js +75 -57
  251. package/dist/cjs/hooks/useProductVariants/index.js +334 -0
  252. package/dist/cjs/hooks/useProductVariants/types.js +3 -0
  253. package/dist/cjs/hooks/useProgressBar/helpers/index.js +3 -6
  254. package/dist/cjs/hooks/useProgressBar/hooks/index.js +3 -6
  255. package/dist/cjs/hooks/useProgressBar/hooks/useGetSetState.js +4 -7
  256. package/dist/cjs/hooks/useProgressBar/hooks/useUpdate.js +21 -8
  257. package/dist/cjs/hooks/useProgressBar/index.js +23 -11
  258. package/dist/cjs/hooks/usePromoCode/index.js +20 -6
  259. package/dist/cjs/hooks/useSearchbar/index.js +86 -74
  260. package/dist/cjs/hooks/useShippingAddress/index.js +2 -4
  261. package/dist/cjs/hooks/useSizesReducer/index.js +24 -12
  262. package/dist/cjs/hooks/useVouchers/index.js +1 -1
  263. package/dist/cjs/hooks/useWallet/index.js +2 -4
  264. package/dist/cjs/hooks/useZoom/index.js +23 -10
  265. package/dist/cjs/hooks/user-hooks/index.js +3 -6
  266. package/dist/cjs/hooks/user-hooks/useSubscribeToNewsletter/index.js +49 -7
  267. package/dist/cjs/hooks/wishlist-hooks/index.js +3 -6
  268. package/dist/cjs/hooks/wishlist-hooks/useWishlist/index.js +19 -4
  269. package/dist/cjs/hooks/wishlist-hooks/useWishlistItem/index.js +59 -21
  270. package/dist/cjs/index.js +19 -34
  271. package/dist/cjs/listing/api/index.js +3 -6
  272. package/dist/cjs/listing/api/keys.js +4 -5
  273. package/dist/cjs/listing/api/queries/useAggregateQuery.js +7 -10
  274. package/dist/cjs/listing/api/queries/useInfiniteListing.js +2 -4
  275. package/dist/cjs/listing/api/queries/useLabelsQuery.js +19 -10
  276. package/dist/cjs/listing/api/queries/useListingQuery.js +30 -31
  277. package/dist/cjs/listing/api/queries/usePredicate.js +34 -22
  278. package/dist/cjs/listing/components/BasicListingSEO.js +23 -7
  279. package/dist/cjs/listing/components/index.js +2 -4
  280. package/dist/cjs/listing/hooks/index.js +3 -6
  281. package/dist/cjs/listing/hooks/useListingBreadcrumbs.js +38 -19
  282. package/dist/cjs/listing/hooks/useListingCategories.js +20 -13
  283. package/dist/cjs/listing/hooks/useListingConfig.js +2 -4
  284. package/dist/cjs/listing/hooks/useListingFilters.js +55 -30
  285. package/dist/cjs/listing/hooks/useListingMeta.js +68 -49
  286. package/dist/cjs/listing/hooks/useListingPagination.js +4 -8
  287. package/dist/cjs/listing/hooks/useSlideFilter.js +46 -8
  288. package/dist/cjs/listing/hooks/useSort.js +47 -19
  289. package/dist/cjs/listing/index.js +3 -6
  290. package/dist/cjs/listing/ssr/index.js +3 -6
  291. package/dist/cjs/listing/ssr/prefetchCategories.js +6 -7
  292. package/dist/cjs/listing/ssr/prefetchListing.js +7 -7
  293. package/dist/cjs/listing/ssr/prefetchPredicate.js +4 -4
  294. package/dist/cjs/listing/types.js +15 -20
  295. package/dist/cjs/listing/utils/buildCategoryQuery.js +30 -11
  296. package/dist/cjs/listing/utils/buildFilterQuery.js +27 -22
  297. package/dist/cjs/listing/utils/calculateOffset.js +1 -1
  298. package/dist/cjs/listing/utils/extendFilter.js +19 -4
  299. package/dist/cjs/listing/utils/getListingAlias.js +21 -8
  300. package/dist/cjs/listing/utils/getListingPageType.js +2 -4
  301. package/dist/cjs/listing/utils/index.js +3 -6
  302. package/dist/cjs/navigation/components/SearchBox/Components/EmptyBox/index.js +7 -7
  303. package/dist/cjs/navigation/components/SearchBox/Components/IconArrowRight/index.js +2 -4
  304. package/dist/cjs/navigation/components/SearchBox/Components/Products/Components/ProductCard/index.js +1 -2
  305. package/dist/cjs/navigation/components/SearchBox/Components/Products/Components/index.js +2 -4
  306. package/dist/cjs/navigation/components/SearchBox/Components/Spinner/index.js +2 -4
  307. package/dist/cjs/navigation/components/SearchBox/Components/Suggestions/Components/index.js +2 -4
  308. package/dist/cjs/navigation/components/SearchBox/Components/Suggestions/Utils/ScrollView.js +4 -8
  309. package/dist/cjs/navigation/components/SearchBox/Components/Suggestions/Utils/index.js +3 -6
  310. package/dist/cjs/navigation/components/SearchBox/Components/index.js +3 -6
  311. package/dist/cjs/navigation/components/SearchBox/index.js +9 -12
  312. package/dist/cjs/navigation/components/index.js +2 -4
  313. package/dist/cjs/navigation/hooks/index.js +3 -6
  314. package/dist/cjs/navigation/hooks/search-history/index.js +3 -6
  315. package/dist/cjs/navigation/index.js +3 -6
  316. package/dist/cjs/navigation/keys.js +3 -4
  317. package/dist/cjs/navigation/mutations/index.js +2 -4
  318. package/dist/cjs/navigation/mutations/useSearchHistoryMutation.js +20 -16
  319. package/dist/cjs/navigation/queries/index.js +3 -6
  320. package/dist/cjs/navigation/ssr/index.js +2 -4
  321. package/dist/cjs/navigation/types.js +3 -4
  322. package/dist/cjs/order/api/index.js +15 -6
  323. package/dist/cjs/order/api/mutations/index.js +3 -6
  324. package/dist/cjs/order/api/queries/index.js +2 -4
  325. package/dist/cjs/order/api/queries/prefetchOrder.js +24 -19
  326. package/dist/cjs/{user/types/index.js → order/api/utils/getOrderById.js} +2 -2
  327. package/dist/cjs/order/api/utils/index.js +35 -0
  328. package/dist/cjs/order/hooks/index.js +3 -6
  329. package/dist/cjs/order/index.js +3 -6
  330. package/dist/cjs/postcss/index.js +3 -6
  331. package/dist/cjs/postcss/tailwind/buttons-plugin.js +20 -16
  332. package/dist/cjs/postcss/tailwind/default-plugin.js +2 -4
  333. package/dist/cjs/postcss/tailwind/fonts-plugin.js +21 -18
  334. package/dist/cjs/postcss/tailwind/forms-plugin.js +6 -9
  335. package/dist/cjs/postcss/tailwind/index.js +3 -6
  336. package/dist/cjs/postcss/tailwind/utils.js +4 -6
  337. package/dist/cjs/postcss/types.js +6 -8
  338. package/dist/cjs/product/api/index.js +2 -4
  339. package/dist/cjs/product/api/keys.js +8 -1
  340. package/dist/cjs/product/api/queries/index.js +16 -4
  341. package/dist/cjs/product/api/queries/useUniCreditOffersQuery.js +63 -0
  342. package/dist/cjs/product/api/ssr/index.js +44 -40
  343. package/dist/cjs/product/hooks/index.js +16 -4
  344. package/dist/cjs/product/hooks/useBnpOffers.js +3 -6
  345. package/dist/cjs/product/hooks/useUniCreditOffers.js +107 -0
  346. package/dist/cjs/product/index.js +3 -6
  347. package/dist/cjs/seo/api/index.js +2 -4
  348. package/dist/cjs/seo/api/ssr/fetchRedirectByFrom.js +19 -14
  349. package/dist/cjs/seo/api/ssr/fetchSitemaps.js +22 -17
  350. package/dist/cjs/seo/api/ssr/getCanonicalUrl.js +19 -4
  351. package/dist/cjs/seo/api/ssr/index.js +3 -6
  352. package/dist/cjs/seo/components/HiddenBreadcrumb/index.js +1 -2
  353. package/dist/cjs/seo/components/ProductSEO/index.js +3 -5
  354. package/dist/cjs/seo/components/TranslationsMeta/index.js +59 -0
  355. package/dist/cjs/seo/components/index.js +15 -6
  356. package/dist/cjs/seo/hooks/index.js +16 -4
  357. package/dist/cjs/seo/hooks/useSEOBreadcrumb.js +19 -13
  358. package/dist/cjs/seo/hooks/useSeoTranslations.js +90 -0
  359. package/dist/cjs/seo/index.js +3 -6
  360. package/dist/cjs/seo/utils/handleRobots.js +4 -4
  361. package/dist/cjs/seo/utils/index.js +3 -6
  362. package/dist/cjs/ssr/emptyBasketGuard.js +2 -2
  363. package/dist/cjs/ssr/index.js +3 -6
  364. package/dist/cjs/ui/components/GridStyles.js +36 -0
  365. package/dist/cjs/ui/components/LazyImage.js +6 -12
  366. package/dist/cjs/ui/components/RangeSliderInput.js +38 -15
  367. package/dist/cjs/ui/components/index.js +15 -6
  368. package/dist/cjs/ui/hooks/index.js +35 -0
  369. package/dist/cjs/ui/hooks/useToasts.js +165 -0
  370. package/dist/cjs/ui/index.js +16 -4
  371. package/dist/cjs/ui/toastUtils/ErrorIcon.js +25 -0
  372. package/dist/cjs/ui/toastUtils/InfoIcon.js +25 -0
  373. package/dist/cjs/ui/toastUtils/SuccessIcon.js +25 -0
  374. package/dist/cjs/ui/toastUtils/WarningIcon.js +25 -0
  375. package/dist/cjs/ui/toastUtils/index.js +85 -0
  376. package/dist/cjs/ui/toastUtils/utils.js +81 -0
  377. package/dist/cjs/user/api/index.js +3 -6
  378. package/dist/cjs/user/api/mutations/index.js +3 -6
  379. package/dist/cjs/user/api/mutations/useLoginMutation.js +2 -5
  380. package/dist/cjs/user/api/mutations/useLogoutMutation.js +3 -6
  381. package/dist/cjs/user/api/mutations/useRegisterMutation.js +24 -24
  382. package/dist/cjs/user/api/mutations/useRequestResetPasswordTokenMutation.js +1 -2
  383. package/dist/cjs/user/api/mutations/useResetPasswordMutation.js +1 -2
  384. package/dist/cjs/user/api/queries/index.js +3 -6
  385. package/dist/cjs/user/api/queries/useGetMyLoyaltyCardQuery.js +49 -3
  386. package/dist/cjs/user/api/queries/useIsAuthenticatedQuery.js +2 -4
  387. package/dist/cjs/user/api/utils/generateAnonymousToken.js +25 -21
  388. package/dist/cjs/user/api/utils/index.js +3 -6
  389. package/dist/cjs/user/api/utils/processLoginPayload.js +2 -2
  390. package/dist/cjs/user/hooks/index.js +3 -6
  391. package/dist/cjs/user/hooks/useConfirmEmail.js +20 -6
  392. package/dist/cjs/user/hooks/useLoginApple.js +2 -4
  393. package/dist/cjs/user/hooks/useLoginFacebook.js +2 -4
  394. package/dist/cjs/user/hooks/useLoginGoogle.js +2 -4
  395. package/dist/cjs/user/hooks/useRequestEmailConfirmation.js +20 -6
  396. package/dist/cjs/user/index.js +3 -18
  397. package/dist/cjs/utils/assetsToMap.js +3 -7
  398. package/dist/cjs/utils/createAggregateQuery.js +4 -6
  399. package/dist/cjs/utils/customFieldsToMap.js +3 -8
  400. package/dist/cjs/utils/generateQueryFromRouter.js +5 -12
  401. package/dist/cjs/utils/getLocaleFromPath.js +13 -0
  402. package/dist/cjs/utils/getPagination.js +5 -11
  403. package/dist/cjs/utils/getSelectedFilters.js +25 -11
  404. package/dist/cjs/utils/index.js +15 -6
  405. package/dist/cjs/utils/isColorBright.js +2 -2
  406. package/dist/cjs/utils/isTouchDevice.js +2 -1
  407. package/dist/cjs/utils/localStorage.js +7 -2
  408. package/dist/cjs/utils/queryObjToString.js +3 -7
  409. package/dist/cjs/utils/sortAncestors.js +18 -11
  410. package/dist/cjs/utils/tokens.js +19 -4
  411. package/dist/cjs/utils/validations.js +2 -2
  412. package/dist/cjs/webview/hooks/index.js +2 -4
  413. package/dist/cjs/webview/hooks/useIsInWebview.js +21 -6
  414. package/dist/cjs/webview/index.js +3 -6
  415. package/dist/cjs/webview/utils/index.js +3 -6
  416. package/dist/cjs/webview/utils/sendMessage.js +3 -4
  417. package/dist/cjs/wishlist/api/index.js +2 -4
  418. package/dist/cjs/wishlist/api/queries/index.js +3 -6
  419. package/dist/cjs/wishlist/api/queries/keys.js +3 -4
  420. package/dist/cjs/wishlist/api/queries/useWishlistItemsQuery.js +4 -7
  421. package/dist/cjs/wishlist/hooks/index.js +2 -4
  422. package/dist/cjs/wishlist/hooks/useWishlistItems.js +2 -3
  423. package/dist/cjs/wishlist/index.js +3 -6
  424. package/dist/esm/GDPR/api/queries/useConfirmConsentQuery.js +1 -2
  425. package/dist/esm/GDPR/components/CookiesTable.js +2 -4
  426. package/dist/esm/GDPR/hooks/index.js +1 -0
  427. package/dist/esm/GDPR/hooks/useCheckForCookies.js +5 -0
  428. package/dist/esm/GDPR/hooks/useCookies.js +34 -33
  429. package/dist/esm/analytics/Pixel/hooks/index.js +3 -0
  430. package/dist/esm/analytics/Pixel/hooks/usePixelFinishOrder.js +22 -0
  431. package/dist/esm/analytics/Pixel/hooks/usePixelProductClick.js +5 -10
  432. package/dist/esm/analytics/Pixel/hooks/usePixelProductDetails.js +19 -4
  433. package/dist/esm/analytics/Pixel/hooks/usePixelProductsImpression.js +61 -35
  434. package/dist/esm/analytics/Pixel/hooks/usePixelViewBasket.js +19 -0
  435. package/dist/esm/analytics/Pixel/hooks/usePixelViewCategory.js +24 -0
  436. package/dist/esm/analytics/Pixel/mainScript.js +260 -99
  437. package/dist/esm/analytics/Pixel/minifiedPixel.js +1 -1
  438. package/dist/esm/analytics/Pixel/usePixel.js +6 -1
  439. package/dist/esm/analytics/Pixel/utils.js +12 -0
  440. package/dist/esm/analytics/Releva/api/query/useRelevaQuery.js +1 -0
  441. package/dist/esm/analytics/Releva/hooks/useRelevaData.js +20 -6
  442. package/dist/esm/analytics/Releva/types.js +21 -25
  443. package/dist/esm/analytics/Releva/useReleva.js +20 -6
  444. package/dist/esm/analytics/Releva/utils.js +2 -4
  445. package/dist/esm/analytics/viewContent.js +2 -1
  446. package/dist/esm/api/addressesApi/index.js +10 -12
  447. package/dist/esm/api/brandsApi/index.js +37 -33
  448. package/dist/esm/api/catalogApi/index.js +156 -160
  449. package/dist/esm/api/categoriesApi/index.js +37 -33
  450. package/dist/esm/api/citiesApi/index.js +23 -19
  451. package/dist/esm/api/companiesApi/index.js +11 -15
  452. package/dist/esm/api/consentsApi/index.js +3 -6
  453. package/dist/esm/api/getSDKConfig.js +15 -24
  454. package/dist/esm/api/myCartApi/index.js +223 -136
  455. package/dist/esm/api/myOrdersApi/index.js +55 -15
  456. package/dist/esm/api/myPaymentsBoricaApi/index.js +22 -18
  457. package/dist/esm/api/myShippingsEcontApi/index.js +150 -125
  458. package/dist/esm/api/myShippingsEvropatApi/index.js +60 -50
  459. package/dist/esm/api/myShippingsPickupFromStoreAPI/index.js +6 -7
  460. package/dist/esm/api/myShippingsSpeedyApi/index.js +150 -125
  461. package/dist/esm/api/notificationsApi/index.js +4 -5
  462. package/dist/esm/api/pagesApi/index.js +3 -4
  463. package/dist/esm/api/productsApi/index.js +48 -46
  464. package/dist/esm/api/searchHistoryApi/index.js +35 -26
  465. package/dist/esm/api/usersApi/index.js +2 -3
  466. package/dist/esm/api/viewsApi/index.js +36 -32
  467. package/dist/esm/api/vouchersApi/index.js +3 -4
  468. package/dist/esm/api/walletApi/index.js +3 -6
  469. package/dist/esm/api/wishlistApi/index.js +72 -20
  470. package/dist/esm/api/wishlistApi/utils/index.js +2 -4
  471. package/dist/esm/api.v2/core/checkout/payments/useSetPaymentMethod.js +19 -4
  472. package/dist/esm/api.v2/core/checkout/shippings/mutations/useMutateNomenclature.js +19 -14
  473. package/dist/esm/api.v2/core/checkout/shippings/queries/useFindNomenclatureElement.js +67 -56
  474. package/dist/esm/api.v2/core/checkout/types.js +4 -8
  475. package/dist/esm/api.v2/core/misc/promo-code/mutations/usePromoCodeMutation.js +22 -17
  476. package/dist/esm/api.v2/core/product/useSubscribeForSkuMutation.js +19 -4
  477. package/dist/esm/basket/api/mutations/index.js +1 -0
  478. package/dist/esm/basket/api/mutations/useChangeGiftVariant.js +106 -0
  479. package/dist/esm/basket/api/mutations/useReplaceBasketMutation.js +17 -13
  480. package/dist/esm/basket/hooks/index.js +1 -0
  481. package/dist/esm/basket/hooks/useChangeGiftVariant.js +3 -0
  482. package/dist/esm/brands/api/queries/keys.js +2 -4
  483. package/dist/esm/brands/api/queries/useAllBrandsQuery.js +91 -76
  484. package/dist/esm/build/api/query/fetchStore.js +25 -20
  485. package/dist/esm/checkout/api/keys.js +7 -3
  486. package/dist/esm/checkout/api/queries/index.js +1 -0
  487. package/dist/esm/checkout/api/queries/useUniCreditCalculateForCartQuery.js +50 -0
  488. package/dist/esm/checkout/contexts/BoricaResponseContext.js +1 -2
  489. package/dist/esm/checkout/contexts/PaypalResponseContext.js +1 -2
  490. package/dist/esm/checkout/contexts/UniCreditResponseContext.js +13 -0
  491. package/dist/esm/checkout/contexts/index.js +1 -0
  492. package/dist/esm/checkout/hooks/index.js +1 -0
  493. package/dist/esm/checkout/hooks/useBnpCalculateForCart.js +6 -10
  494. package/dist/esm/checkout/hooks/useUniCreditCalculateForCart.js +88 -0
  495. package/dist/esm/checkout/ssr/capturePaypalOrder.js +16 -11
  496. package/dist/esm/checkout/ssr/captureUniCreditOrder.js +47 -0
  497. package/dist/esm/checkout/ssr/index.js +1 -0
  498. package/dist/esm/checkout/ssr/verifyBoricaResponse.js +24 -19
  499. package/dist/esm/cms/api/mutations/useCMSFoldersCreateMutation.js +31 -29
  500. package/dist/esm/cms/api/mutations/useCMSMediaDeleteAssetsMutation.js +19 -14
  501. package/dist/esm/cms/api/mutations/useCMSMediaUploadAssetsMutation.js +22 -19
  502. package/dist/esm/cms/api/queries/keys.js +20 -14
  503. package/dist/esm/cms/api/queries/useCMSContentListQuery.js +4 -7
  504. package/dist/esm/cms/api/queries/useCMSMediaQuery.js +1 -2
  505. package/dist/esm/cms/api/queries/useInjectedContentQuery.js +4 -7
  506. package/dist/esm/cms/components/RenderInjectedContent.js +3 -7
  507. package/dist/esm/cms/hooks/useCmsContent.js +4 -8
  508. package/dist/esm/cms/hooks/useCmsContentList.js +7 -12
  509. package/dist/esm/cms/hooks/useCmsFolders.js +0 -1
  510. package/dist/esm/cms/hooks/useCmsMedia.js +0 -1
  511. package/dist/esm/cms/hooks/useCmsMediaDeleteAssets.js +0 -1
  512. package/dist/esm/cms/hooks/useCmsMediaUploadAssets.js +0 -1
  513. package/dist/esm/cms/hooks/useContentCategoriesMap.js +6 -13
  514. package/dist/esm/cms/hooks/useCreateCmsFolders.js +0 -1
  515. package/dist/esm/cms/hooks/useInjectedContentContext.js +4 -8
  516. package/dist/esm/cms/hooks/useListingInjectedContent.js +1 -2
  517. package/dist/esm/cms/ssr/fetchPagePaths.js +3 -3
  518. package/dist/esm/cms/ssr/prefetchCMSPage.js +34 -29
  519. package/dist/esm/cms/ssr/prefetchCmsContent.js +48 -43
  520. package/dist/esm/cms/ssr/prefetchCmsContentList.js +52 -50
  521. package/dist/esm/components/AnalyticsScripts/index.js +22 -6
  522. package/dist/esm/components/Drawer/index.js +3 -5
  523. package/dist/esm/components/FadeIn/index.js +27 -15
  524. package/dist/esm/components/GoogleOneTap/index.js +38 -18
  525. package/dist/esm/components/LazyResponsiveImage/index.js +23 -12
  526. package/dist/esm/components/Link/index.js +3 -6
  527. package/dist/esm/components/Portal/index.js +1 -2
  528. package/dist/esm/components/ProgressBar/index.js +19 -4
  529. package/dist/esm/config/SentecaProvider.js +7 -12
  530. package/dist/esm/contexts/CheckoutForm/Components/BoricaRedirect/index.js +19 -4
  531. package/dist/esm/contexts/CheckoutForm/Components/CheckoutCustomState/index.js +22 -10
  532. package/dist/esm/contexts/CheckoutForm/Components/UniCreditRedirect/index.js +61 -0
  533. package/dist/esm/contexts/CheckoutForm/Components/index.js +1 -0
  534. package/dist/esm/contexts/CheckoutForm/hooks/useBilling/index.js +52 -31
  535. package/dist/esm/contexts/CheckoutForm/hooks/usePayment/index.js +20 -6
  536. package/dist/esm/contexts/CheckoutForm/hooks/useSavedBillingList/index.js +2 -4
  537. package/dist/esm/contexts/CheckoutForm/hooks/useSavedShippingList/index.js +20 -15
  538. package/dist/esm/contexts/CheckoutForm/hooks/useShipping/index.js +102 -90
  539. package/dist/esm/contexts/CheckoutForm/hooks/useShippingInitialData/index.js +3 -7
  540. package/dist/esm/contexts/CheckoutForm/index.js +103 -60
  541. package/dist/esm/contexts/CheckoutForm/utils/updatedNestedObjectProps.js +16 -3
  542. package/dist/esm/contexts/CheckoutForm/utils/validateBillingAddress.js +6 -14
  543. package/dist/esm/contexts/CheckoutForm/utils/validateShipping.js +12 -23
  544. package/dist/esm/contexts/CustomProductProvider/index.js +22 -10
  545. package/dist/esm/contexts/Strings.js +32 -33
  546. package/dist/esm/hooks/addresses-hooks/useAddressForm/index.js +37 -48
  547. package/dist/esm/hooks/basket-hooks/useBasket/index.js +24 -7
  548. package/dist/esm/hooks/basket-hooks/useBasketCustom/index.js +19 -4
  549. package/dist/esm/hooks/basket-hooks/useBasketItemList/index.js +5 -10
  550. package/dist/esm/hooks/basket-hooks/useBasketItemWithErrorList/index.js +4 -8
  551. package/dist/esm/hooks/basket-hooks/useBasketLineItem/index.js +19 -4
  552. package/dist/esm/hooks/basket-hooks/useBasketLineItem/utils/index.js +4 -9
  553. package/dist/esm/hooks/checkout-hooks/useAllStockLocations.js +5 -10
  554. package/dist/esm/hooks/checkout-hooks/useShippingCourierMethods.js +41 -36
  555. package/dist/esm/hooks/cities-hooks/useCities/index.js +19 -4
  556. package/dist/esm/hooks/error-handling/useErrors/index.js +4 -9
  557. package/dist/esm/hooks/labels/useGlobalLabels/index.js +1 -2
  558. package/dist/esm/hooks/order-hooks/api/queries/useOrderGetPaymentMethodQuery.js +2 -4
  559. package/dist/esm/hooks/order-hooks/useGenericCourierAddress/index.js +103 -68
  560. package/dist/esm/hooks/order-hooks/useOrder/index.js +3 -11
  561. package/dist/esm/hooks/order-hooks/useOrderGetPaymentMethod/index.js +0 -1
  562. package/dist/esm/hooks/order-hooks/useOrderPaymentMethods/index.js +2 -4
  563. package/dist/esm/hooks/order-hooks/useOrdersList/index.js +2 -4
  564. package/dist/esm/hooks/order-hooks/usePayOrder/index.js +66 -58
  565. package/dist/esm/hooks/order-hooks/useUpdateOrderPaymentMethod/index.js +20 -7
  566. package/dist/esm/hooks/subscriptions-hooks/useAcceptOnRegister/index.js +21 -8
  567. package/dist/esm/hooks/subscriptions-hooks/useAllSubscriptions/index.js +32 -33
  568. package/dist/esm/hooks/subscriptions-hooks/useSubscribeForProduct/index.js +20 -6
  569. package/dist/esm/hooks/ui-hooks/useAccordion/index.js +19 -5
  570. package/dist/esm/hooks/ui-hooks/useBoolean/index.js +21 -6
  571. package/dist/esm/hooks/ui-hooks/useCallbackRef/index.js +19 -11
  572. package/dist/esm/hooks/ui-hooks/useClickOutside/index.js +2 -2
  573. package/dist/esm/hooks/ui-hooks/useIsIos/index.js +19 -4
  574. package/dist/esm/hooks/ui-hooks/useMenuAim/index.js +19 -4
  575. package/dist/esm/hooks/ui-hooks/usePagination/index.js +19 -14
  576. package/dist/esm/hooks/ui-hooks/useScrollDirection/index.js +21 -7
  577. package/dist/esm/hooks/ui-hooks/useScrollTo/index.js +26 -12
  578. package/dist/esm/hooks/ui-hooks/useSlideshow/index.js +21 -6
  579. package/dist/esm/hooks/ui-hooks/useToggleNavbarOnScroll/index.js +3 -3
  580. package/dist/esm/hooks/ui-hooks/useUI/index.js +34 -35
  581. package/dist/esm/hooks/ui-hooks/useWindowDimensions/index.js +19 -4
  582. package/dist/esm/hooks/useAddressList/index.js +2 -3
  583. package/dist/esm/hooks/useAggregateResult/index.js +7 -5
  584. package/dist/esm/hooks/useAvailability/index.js +27 -14
  585. package/dist/esm/hooks/useCarousel/component/index.js +12 -17
  586. package/dist/esm/hooks/useCarousel/helpers/eventStore.js +2 -2
  587. package/dist/esm/hooks/useCarousel/index.js +20 -6
  588. package/dist/esm/hooks/useCatalogResult/index.js +2 -2
  589. package/dist/esm/hooks/useCategoryTree/index.js +1 -2
  590. package/dist/esm/hooks/useCheckoutBillingAddress/index.js +75 -7
  591. package/dist/esm/hooks/useCheckoutDelivery/index.js +71 -58
  592. package/dist/esm/hooks/useCheckoutDiscountCode/index.js +19 -4
  593. package/dist/esm/hooks/useCheckoutPickupFromStore/index.js +21 -8
  594. package/dist/esm/hooks/useCheckoutShippingAddress/index.js +19 -4
  595. package/dist/esm/hooks/useCheckoutShippingModule/index.js +4 -6
  596. package/dist/esm/hooks/useCheckoutSubmit/index.js +98 -59
  597. package/dist/esm/hooks/useClearAllFilters/index.js +4 -4
  598. package/dist/esm/hooks/useContactForm/index.js +8 -4
  599. package/dist/esm/hooks/useCopyToClipboard/index.js +20 -4
  600. package/dist/esm/hooks/useForceUpdate/index.js +19 -4
  601. package/dist/esm/hooks/useLineItem/LineItemContext.js +75 -0
  602. package/dist/esm/hooks/useLineItem/index.js +21 -25
  603. package/dist/esm/hooks/useLocalRating/index.js +23 -10
  604. package/dist/esm/hooks/usePrefetchProduct/index.js +19 -4
  605. package/dist/esm/hooks/useProduct/index.js +23 -267
  606. package/dist/esm/hooks/useProduct/utils/index.js +75 -57
  607. package/dist/esm/hooks/useProductVariants/index.js +293 -0
  608. package/dist/esm/hooks/useProductVariants/types.js +1 -0
  609. package/dist/esm/hooks/useProgressBar/hooks/useGetSetState.js +4 -7
  610. package/dist/esm/hooks/useProgressBar/hooks/useUpdate.js +19 -4
  611. package/dist/esm/hooks/useProgressBar/index.js +23 -11
  612. package/dist/esm/hooks/usePromoCode/index.js +20 -6
  613. package/dist/esm/hooks/useSearchbar/index.js +86 -74
  614. package/dist/esm/hooks/useShippingAddress/index.js +2 -4
  615. package/dist/esm/hooks/useSizesReducer/index.js +24 -12
  616. package/dist/esm/hooks/useVouchers/index.js +1 -2
  617. package/dist/esm/hooks/useWallet/index.js +2 -4
  618. package/dist/esm/hooks/useZoom/index.js +20 -6
  619. package/dist/esm/hooks/user-hooks/useSubscribeToNewsletter/index.js +28 -7
  620. package/dist/esm/hooks/wishlist-hooks/useWishlist/index.js +20 -6
  621. package/dist/esm/hooks/wishlist-hooks/useWishlistItem/index.js +41 -19
  622. package/dist/esm/index.js +1 -3
  623. package/dist/esm/listing/api/keys.js +3 -5
  624. package/dist/esm/listing/api/queries/useAggregateQuery.js +6 -10
  625. package/dist/esm/listing/api/queries/useInfiniteListing.js +2 -4
  626. package/dist/esm/listing/api/queries/useLabelsQuery.js +19 -10
  627. package/dist/esm/listing/api/queries/useListingQuery.js +30 -31
  628. package/dist/esm/listing/api/queries/usePredicate.js +34 -22
  629. package/dist/esm/listing/components/BasicListingSEO.js +24 -8
  630. package/dist/esm/listing/hooks/useListingBreadcrumbs.js +33 -14
  631. package/dist/esm/listing/hooks/useListingCategories.js +20 -13
  632. package/dist/esm/listing/hooks/useListingConfig.js +2 -4
  633. package/dist/esm/listing/hooks/useListingFilters.js +55 -30
  634. package/dist/esm/listing/hooks/useListingMeta.js +68 -51
  635. package/dist/esm/listing/hooks/useListingPagination.js +4 -8
  636. package/dist/esm/listing/hooks/useSlideFilter.js +46 -8
  637. package/dist/esm/listing/hooks/useSort.js +47 -19
  638. package/dist/esm/listing/ssr/prefetchCategories.js +7 -8
  639. package/dist/esm/listing/ssr/prefetchListing.js +7 -7
  640. package/dist/esm/listing/ssr/prefetchPredicate.js +4 -4
  641. package/dist/esm/listing/types.js +10 -20
  642. package/dist/esm/listing/utils/buildCategoryQuery.js +30 -11
  643. package/dist/esm/listing/utils/buildFilterQuery.js +27 -22
  644. package/dist/esm/listing/utils/calculateOffset.js +1 -1
  645. package/dist/esm/listing/utils/extendFilter.js +19 -4
  646. package/dist/esm/listing/utils/getListingAlias.js +21 -8
  647. package/dist/esm/listing/utils/getListingPageType.js +2 -4
  648. package/dist/esm/navigation/components/SearchBox/Components/EmptyBox/index.js +7 -7
  649. package/dist/esm/navigation/components/SearchBox/Components/Products/Components/ProductCard/index.js +1 -2
  650. package/dist/esm/navigation/components/SearchBox/Components/Suggestions/Utils/ScrollView.js +4 -8
  651. package/dist/esm/navigation/components/SearchBox/index.js +7 -8
  652. package/dist/esm/navigation/keys.js +2 -4
  653. package/dist/esm/navigation/mutations/useSearchHistoryMutation.js +20 -16
  654. package/dist/esm/navigation/types.js +2 -4
  655. package/dist/esm/order/api/index.js +1 -0
  656. package/dist/esm/order/api/queries/prefetchOrder.js +24 -19
  657. package/dist/esm/order/api/utils/getOrderById.js +2 -0
  658. package/dist/esm/order/api/utils/index.js +1 -0
  659. package/dist/esm/postcss/tailwind/buttons-plugin.js +20 -16
  660. package/dist/esm/postcss/tailwind/default-plugin.js +2 -4
  661. package/dist/esm/postcss/tailwind/fonts-plugin.js +21 -18
  662. package/dist/esm/postcss/tailwind/forms-plugin.js +6 -9
  663. package/dist/esm/postcss/tailwind/utils.js +4 -6
  664. package/dist/esm/postcss/types.js +4 -8
  665. package/dist/esm/product/api/keys.js +6 -0
  666. package/dist/esm/product/api/queries/index.js +1 -0
  667. package/dist/esm/product/api/queries/useUniCreditOffersQuery.js +53 -0
  668. package/dist/esm/product/api/ssr/index.js +44 -40
  669. package/dist/esm/product/hooks/index.js +1 -0
  670. package/dist/esm/product/hooks/useBnpOffers.js +3 -6
  671. package/dist/esm/product/hooks/useUniCreditOffers.js +81 -0
  672. package/dist/esm/seo/api/ssr/fetchRedirectByFrom.js +19 -14
  673. package/dist/esm/seo/api/ssr/fetchSitemaps.js +22 -17
  674. package/dist/esm/seo/api/ssr/getCanonicalUrl.js +19 -4
  675. package/dist/esm/seo/components/HiddenBreadcrumb/index.js +1 -2
  676. package/dist/esm/seo/components/ProductSEO/index.js +3 -5
  677. package/dist/esm/seo/components/TranslationsMeta/index.js +49 -0
  678. package/dist/esm/seo/components/index.js +1 -0
  679. package/dist/esm/seo/hooks/index.js +1 -0
  680. package/dist/esm/seo/hooks/useSEOBreadcrumb.js +17 -9
  681. package/dist/esm/seo/hooks/useSeoTranslations.js +79 -0
  682. package/dist/esm/seo/utils/handleRobots.js +4 -4
  683. package/dist/esm/ssr/emptyBasketGuard.js +2 -2
  684. package/dist/esm/ui/components/GridStyles.js +26 -0
  685. package/dist/esm/ui/components/LazyImage.js +6 -12
  686. package/dist/esm/ui/components/RangeSliderInput.js +36 -11
  687. package/dist/esm/ui/components/index.js +1 -0
  688. package/dist/esm/ui/hooks/index.js +1 -0
  689. package/dist/esm/ui/hooks/useToasts.js +154 -0
  690. package/dist/esm/ui/index.js +1 -0
  691. package/dist/esm/ui/toastUtils/ErrorIcon.js +15 -0
  692. package/dist/esm/ui/toastUtils/InfoIcon.js +15 -0
  693. package/dist/esm/ui/toastUtils/SuccessIcon.js +15 -0
  694. package/dist/esm/ui/toastUtils/WarningIcon.js +15 -0
  695. package/dist/esm/ui/toastUtils/index.js +5 -0
  696. package/dist/esm/ui/toastUtils/utils.js +67 -0
  697. package/dist/esm/user/api/mutations/useLoginMutation.js +2 -5
  698. package/dist/esm/user/api/mutations/useLogoutMutation.js +3 -6
  699. package/dist/esm/user/api/mutations/useRegisterMutation.js +24 -24
  700. package/dist/esm/user/api/mutations/useRequestResetPasswordTokenMutation.js +1 -2
  701. package/dist/esm/user/api/mutations/useResetPasswordMutation.js +1 -2
  702. package/dist/esm/user/api/queries/useGetMyLoyaltyCardQuery.js +44 -3
  703. package/dist/esm/user/api/queries/useIsAuthenticatedQuery.js +2 -4
  704. package/dist/esm/user/api/utils/generateAnonymousToken.js +25 -21
  705. package/dist/esm/user/api/utils/processLoginPayload.js +2 -2
  706. package/dist/esm/user/hooks/useConfirmEmail.js +20 -6
  707. package/dist/esm/user/hooks/useLoginApple.js +2 -4
  708. package/dist/esm/user/hooks/useLoginFacebook.js +2 -4
  709. package/dist/esm/user/hooks/useLoginGoogle.js +2 -4
  710. package/dist/esm/user/hooks/useRequestEmailConfirmation.js +20 -6
  711. package/dist/esm/user/index.js +0 -1
  712. package/dist/esm/utils/assetsToMap.js +3 -7
  713. package/dist/esm/utils/createAggregateQuery.js +4 -6
  714. package/dist/esm/utils/customFieldsToMap.js +3 -8
  715. package/dist/esm/utils/generateQueryFromRouter.js +5 -12
  716. package/dist/esm/utils/getLocaleFromPath.js +8 -0
  717. package/dist/esm/utils/getPagination.js +5 -11
  718. package/dist/esm/utils/getSelectedFilters.js +25 -11
  719. package/dist/esm/utils/index.js +1 -0
  720. package/dist/esm/utils/isColorBright.js +2 -2
  721. package/dist/esm/utils/isTouchDevice.js +2 -1
  722. package/dist/esm/utils/localStorage.js +7 -2
  723. package/dist/esm/utils/queryObjToString.js +3 -7
  724. package/dist/esm/utils/sortAncestors.js +18 -11
  725. package/dist/esm/utils/tokens.js +19 -4
  726. package/dist/esm/utils/validations.js +2 -2
  727. package/dist/esm/webview/hooks/useIsInWebview.js +21 -6
  728. package/dist/esm/webview/utils/sendMessage.js +2 -4
  729. package/dist/esm/wishlist/api/queries/keys.js +2 -4
  730. package/dist/esm/wishlist/api/queries/useWishlistItemsQuery.js +4 -7
  731. package/dist/esm/wishlist/hooks/useWishlistItems.js +2 -3
  732. package/dist/types/GDPR/hooks/index.d.ts +1 -0
  733. package/dist/types/GDPR/hooks/useCheckForCookies.d.ts +1 -0
  734. package/dist/types/analytics/Pixel/hooks/index.d.ts +3 -0
  735. package/dist/types/analytics/Pixel/hooks/usePixelFinishOrder.d.ts +4 -0
  736. package/dist/types/analytics/Pixel/hooks/usePixelViewBasket.d.ts +4 -0
  737. package/dist/types/analytics/Pixel/hooks/usePixelViewCategory.d.ts +7 -0
  738. package/dist/types/analytics/Pixel/types.d.ts +10 -1
  739. package/dist/types/analytics/Pixel/utils.d.ts +3 -0
  740. package/dist/types/analytics/Releva/hooks/useRelevaOnListingPage.d.ts +1 -1
  741. package/dist/types/analytics/Releva/types.d.ts +1 -1
  742. package/dist/types/analytics/Releva/utils.d.ts +1 -1
  743. package/dist/types/analytics/addToCart.d.ts +1 -1
  744. package/dist/types/analytics/initiateCheckout.d.ts +1 -1
  745. package/dist/types/analytics/purchase.d.ts +1 -1
  746. package/dist/types/api/addressesApi/index.d.ts +1 -1
  747. package/dist/types/api/brandsApi/index.d.ts +1 -1
  748. package/dist/types/api/catalogApi/index.d.ts +1 -1
  749. package/dist/types/api/categoriesApi/index.d.ts +1 -1
  750. package/dist/types/api/citiesApi/index.d.ts +1 -1
  751. package/dist/types/api/companiesApi/index.d.ts +1 -1
  752. package/dist/types/api/myCartApi/index.d.ts +2 -0
  753. package/dist/types/basket/api/mutations/index.d.ts +1 -0
  754. package/dist/types/basket/api/mutations/useChangeGiftVariant.d.ts +2 -0
  755. package/dist/types/basket/api/mutations/useReplaceBasketMutation.d.ts +1 -1
  756. package/dist/types/basket/hooks/index.d.ts +1 -0
  757. package/dist/types/basket/hooks/useChangeGiftVariant.d.ts +2 -0
  758. package/dist/types/checkout/api/keys.d.ts +1 -0
  759. package/dist/types/checkout/api/queries/index.d.ts +1 -0
  760. package/dist/types/checkout/api/queries/useBnpCalculateForCartQuery.d.ts +1 -1
  761. package/dist/types/checkout/api/queries/useUniCreditCalculateForCartQuery.d.ts +3 -0
  762. package/dist/types/checkout/contexts/UniCreditResponseContext.d.ts +6 -0
  763. package/dist/types/checkout/contexts/index.d.ts +1 -0
  764. package/dist/types/checkout/hooks/index.d.ts +1 -0
  765. package/dist/types/checkout/hooks/useBnpCalculateForCart.d.ts +4 -3
  766. package/dist/types/checkout/hooks/useUniCreditCalculateForCart.d.ts +41 -0
  767. package/dist/types/checkout/ssr/captureUniCreditOrder.d.ts +2 -0
  768. package/dist/types/checkout/ssr/index.d.ts +1 -0
  769. package/dist/types/cms/api/mutations/useCMSMediaUploadAssetsMutation.d.ts +1 -3
  770. package/dist/types/components/Portal/index.d.ts +2 -2
  771. package/dist/types/contexts/CheckoutForm/Components/UniCreditRedirect/index.d.ts +5 -0
  772. package/dist/types/contexts/CheckoutForm/Components/index.d.ts +1 -0
  773. package/dist/types/contexts/CheckoutForm/hooks/useBilling/index.d.ts +3 -1
  774. package/dist/types/contexts/CheckoutForm/hooks/usePayment/index.d.ts +2 -2
  775. package/dist/types/contexts/CheckoutForm/hooks/useShipping/index.d.ts +1 -1
  776. package/dist/types/contexts/CheckoutForm/index.d.ts +2 -1
  777. package/dist/types/hooks/basket-hooks/useBasket/index.d.ts +2 -1
  778. package/dist/types/hooks/basket-hooks/useBasketLineItem/index.d.ts +1 -2
  779. package/dist/types/hooks/order-hooks/useOrder/index.d.ts +3 -2
  780. package/dist/types/hooks/order-hooks/useOrderPaymentMethods/index.d.ts +4 -4
  781. package/dist/types/hooks/useCarousel/index.d.ts +2 -2
  782. package/dist/types/hooks/useCheckoutBillingAddress/index.d.ts +2 -0
  783. package/dist/types/hooks/useCheckoutSubmit/index.d.ts +3 -2
  784. package/dist/types/hooks/useContactForm/index.d.ts +2 -1
  785. package/dist/types/hooks/useLineItem/LineItemContext.d.ts +22 -0
  786. package/dist/types/hooks/useLineItem/index.d.ts +3 -3
  787. package/dist/types/hooks/useProduct/index.d.ts +5 -78
  788. package/dist/types/hooks/useProduct/utils/index.d.ts +6 -4
  789. package/dist/types/hooks/useProductVariants/index.d.ts +34 -0
  790. package/dist/types/hooks/useProductVariants/types.d.ts +79 -0
  791. package/dist/types/hooks/useSearchbar/index.d.ts +1 -0
  792. package/dist/types/hooks/useVouchers/index.d.ts +2 -2
  793. package/dist/types/hooks/useZoom/index.d.ts +2 -2
  794. package/dist/types/hooks/wishlist-hooks/useWishlist/index.d.ts +1 -2
  795. package/dist/types/index.d.ts +1 -3
  796. package/dist/types/listing/api/queries/useListingQuery.d.ts +2 -1
  797. package/dist/types/listing/components/BasicListingSEO.d.ts +3 -1
  798. package/dist/types/listing/hooks/useListingMeta.d.ts +4 -0
  799. package/dist/types/listing/hooks/useSlideFilter.d.ts +4 -0
  800. package/dist/types/listing/hooks/useSort.d.ts +6 -5
  801. package/dist/types/listing/ssr/prefetchListing.d.ts +1 -2
  802. package/dist/types/listing/types.d.ts +14 -2
  803. package/dist/types/navigation/components/SearchBox/Components/EmptyBox/index.d.ts +5 -4
  804. package/dist/types/navigation/components/SearchBox/index.d.ts +7 -6
  805. package/dist/types/order/api/index.d.ts +1 -0
  806. package/dist/types/order/api/utils/getOrderById.d.ts +2 -0
  807. package/dist/types/order/api/utils/index.d.ts +1 -0
  808. package/dist/types/product/api/keys.d.ts +1 -0
  809. package/dist/types/product/api/queries/index.d.ts +1 -0
  810. package/dist/types/product/api/queries/useBnpOffersQuery.d.ts +1 -1
  811. package/dist/types/product/api/queries/useUniCreditOffersQuery.d.ts +4 -0
  812. package/dist/types/product/hooks/index.d.ts +1 -0
  813. package/dist/types/product/hooks/useBnpOffers.d.ts +2 -2
  814. package/dist/types/product/hooks/useUniCreditOffers.d.ts +36 -0
  815. package/dist/types/seo/components/TranslationsMeta/index.d.ts +1 -0
  816. package/dist/types/seo/components/index.d.ts +1 -0
  817. package/dist/types/seo/hooks/index.d.ts +1 -0
  818. package/dist/types/seo/hooks/useSeoTranslations.d.ts +24 -0
  819. package/dist/types/ui/components/GridStyles.d.ts +11 -0
  820. package/dist/types/ui/components/RangeSliderInput.d.ts +2 -1
  821. package/dist/types/ui/components/index.d.ts +1 -0
  822. package/dist/types/ui/hooks/index.d.ts +1 -0
  823. package/dist/types/ui/hooks/useToasts.d.ts +20 -0
  824. package/dist/types/ui/index.d.ts +1 -0
  825. package/dist/types/ui/toastUtils/ErrorIcon.d.ts +1 -0
  826. package/dist/types/ui/toastUtils/InfoIcon.d.ts +1 -0
  827. package/dist/types/ui/toastUtils/SuccessIcon.d.ts +1 -0
  828. package/dist/types/ui/toastUtils/WarningIcon.d.ts +1 -0
  829. package/dist/types/ui/toastUtils/index.d.ts +5 -0
  830. package/dist/types/ui/toastUtils/utils.d.ts +11 -0
  831. package/dist/types/user/index.d.ts +0 -1
  832. package/dist/types/utils/getLocaleFromPath.d.ts +1 -0
  833. package/dist/types/utils/index.d.ts +1 -0
  834. package/package.json +20 -21
  835. package/dist/cjs/dto/index.js +0 -34
  836. package/dist/esm/dto/index.js +0 -1
  837. package/dist/esm/user/types/index.js +0 -1
  838. package/dist/types/dto/index.d.ts +0 -2
  839. package/dist/types/user/types/index.d.ts +0 -1
@@ -1,9 +1,14 @@
1
1
  Object.defineProperty(exports, "__esModule", {
2
2
  value: true
3
3
  });
4
- exports.useZoom = exports.ZoomImageWrapper = void 0;
4
+ exports.ZoomImageWrapper = exports.useZoom = void 0;
5
5
  var _react = _interopRequireWildcard(require("react"));
6
6
  var _styledComponents = _interopRequireDefault(require("styled-components"));
7
+ function _arrayLikeToArray(arr, len) {
8
+ if (len == null || len > arr.length) len = arr.length;
9
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
10
+ return arr2;
11
+ }
7
12
  function _arrayWithHoles(arr) {
8
13
  if (Array.isArray(arr)) return arr;
9
14
  }
@@ -16,13 +21,11 @@ function _interopRequireWildcard(obj) {
16
21
  if (obj && obj.__esModule) {
17
22
  return obj;
18
23
  } else {
19
- var newObj = {
20
- };
24
+ var newObj = {};
21
25
  if (obj != null) {
22
26
  for(var key in obj){
23
27
  if (Object.prototype.hasOwnProperty.call(obj, key)) {
24
- var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
25
- };
28
+ var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
26
29
  if (desc.get || desc.set) {
27
30
  Object.defineProperty(newObj, key, desc);
28
31
  } else {
@@ -36,12 +39,14 @@ function _interopRequireWildcard(obj) {
36
39
  }
37
40
  }
38
41
  function _iterableToArrayLimit(arr, i) {
42
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
43
+ if (_i == null) return;
39
44
  var _arr = [];
40
45
  var _n = true;
41
46
  var _d = false;
42
- var _e = undefined;
47
+ var _s, _e;
43
48
  try {
44
- for(var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true){
49
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
45
50
  _arr.push(_s.value);
46
51
  if (i && _arr.length === i) break;
47
52
  }
@@ -58,10 +63,10 @@ function _iterableToArrayLimit(arr, i) {
58
63
  return _arr;
59
64
  }
60
65
  function _nonIterableRest() {
61
- throw new TypeError("Invalid attempt to destructure non-iterable instance");
66
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
62
67
  }
63
68
  function _slicedToArray(arr, i) {
64
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
69
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
65
70
  }
66
71
  function _taggedTemplateLiteral(strings, raw) {
67
72
  if (!raw) {
@@ -73,6 +78,14 @@ function _taggedTemplateLiteral(strings, raw) {
73
78
  }
74
79
  }));
75
80
  }
81
+ function _unsupportedIterableToArray(o, minLen) {
82
+ if (!o) return;
83
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
84
+ var n = Object.prototype.toString.call(o).slice(8, -1);
85
+ if (n === "Object" && o.constructor) n = o.constructor.name;
86
+ if (n === "Map" || n === "Set") return Array.from(n);
87
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
88
+ }
76
89
  function _templateObject() {
77
90
  var data = _taggedTemplateLiteral([
78
91
  ""
@@ -172,6 +185,7 @@ var useZoom = function(param) {
172
185
  }
173
186
  };
174
187
  };
188
+ exports.useZoom = useZoom;
175
189
  var ZoomImageWrapper = function(props) {
176
190
  var children = props.children, isSelected = props.isSelected, isLast = props.isLast, activeDot = props.activeDot, setIsZoomed = props.setIsZoomed, onSlideClick = props.onSlideClick, isZoomed = props.isZoomed, setIsDesktopZoomed = props.setIsDesktopZoomed, isDesktopZoomed = props.isDesktopZoomed, imageRefs = props.imageRefs;
177
191
  return(/*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/ _react.default.createElement(Container, {
@@ -223,4 +237,3 @@ var DesktopWrapper = _styledComponents.default.div(_templateObject2(), function(
223
237
  }, function(props) {
224
238
  return props.isZoomed && !props.isSelected && "\n \n z-index: -1;\n ";
225
239
  });
226
- exports.useZoom = useZoom;
@@ -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 _useSubscribeToNewsletter = _interopRequireWildcard(require("./useSubscribeToNewsletter"));
7
6
  Object.keys(_useSubscribeToNewsletter).forEach(function(key) {
8
7
  if (key === "default" || key === "__esModule") return;
@@ -31,13 +30,11 @@ function _interopRequireWildcard(obj) {
31
30
  if (obj && obj.__esModule) {
32
31
  return obj;
33
32
  } else {
34
- var newObj = {
35
- };
33
+ var newObj = {};
36
34
  if (obj != null) {
37
35
  for(var key in obj){
38
36
  if (Object.prototype.hasOwnProperty.call(obj, key)) {
39
- var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
40
- };
37
+ var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
41
38
  if (desc.get || desc.set) {
42
39
  Object.defineProperty(newObj, key, desc);
43
40
  } else {
@@ -2,17 +2,46 @@ Object.defineProperty(exports, "__esModule", {
2
2
  value: true
3
3
  });
4
4
  exports.useSubscribeToNewsletter = void 0;
5
+ var _react = _interopRequireWildcard(require("react"));
5
6
  var _consentsApi = require("../../../api/consentsApi");
7
+ function _arrayLikeToArray(arr, len) {
8
+ if (len == null || len > arr.length) len = arr.length;
9
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
10
+ return arr2;
11
+ }
6
12
  function _arrayWithHoles(arr) {
7
13
  if (Array.isArray(arr)) return arr;
8
14
  }
15
+ function _interopRequireWildcard(obj) {
16
+ if (obj && obj.__esModule) {
17
+ return obj;
18
+ } else {
19
+ var newObj = {};
20
+ if (obj != null) {
21
+ for(var key in obj){
22
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
23
+ var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
24
+ if (desc.get || desc.set) {
25
+ Object.defineProperty(newObj, key, desc);
26
+ } else {
27
+ newObj[key] = obj[key];
28
+ }
29
+ }
30
+ }
31
+ }
32
+ newObj.default = obj;
33
+ return newObj;
34
+ }
35
+ }
9
36
  function _iterableToArrayLimit(arr, i) {
37
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
38
+ if (_i == null) return;
10
39
  var _arr = [];
11
40
  var _n = true;
12
41
  var _d = false;
13
- var _e = undefined;
42
+ var _s, _e;
14
43
  try {
15
- for(var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true){
44
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
16
45
  _arr.push(_s.value);
17
46
  if (i && _arr.length === i) break;
18
47
  }
@@ -29,10 +58,18 @@ function _iterableToArrayLimit(arr, i) {
29
58
  return _arr;
30
59
  }
31
60
  function _nonIterableRest() {
32
- throw new TypeError("Invalid attempt to destructure non-iterable instance");
61
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
33
62
  }
34
63
  function _slicedToArray(arr, i) {
35
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
64
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
65
+ }
66
+ function _unsupportedIterableToArray(o, minLen) {
67
+ if (!o) return;
68
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
69
+ var n = Object.prototype.toString.call(o).slice(8, -1);
70
+ if (n === "Object" && o.constructor) n = o.constructor.name;
71
+ if (n === "Map" || n === "Set") return Array.from(n);
72
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
36
73
  }
37
74
  var useSubscribeToNewsletter = function(param) {
38
75
  var callback = param.callback;
@@ -40,9 +77,14 @@ var useSubscribeToNewsletter = function(param) {
40
77
  'AGRPOLICY',
41
78
  'AGRNEWSLETTER'
42
79
  ];
43
- var ref = _slicedToArray(_consentsApi.consentsApi.useApprove({
44
- onSuccess: callback
45
- }), 2), sub = ref[0], ref1 = ref[1], onError = ref1.error;
80
+ var ref = _slicedToArray(_consentsApi.consentsApi.useApprove({}), 2), sub = ref[0], ref1 = ref[1], onError = ref1.error, isSuccess = ref1.isSuccess;
81
+ (0, _react).useEffect(function() {
82
+ if (isSuccess) {
83
+ callback === null || callback === void 0 ? void 0 : callback();
84
+ }
85
+ }, [
86
+ isSuccess
87
+ ]);
46
88
  var subscribe = function(email) {
47
89
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
48
90
  try {
@@ -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 _useWishlist = _interopRequireWildcard(require("./useWishlist"));
7
6
  Object.keys(_useWishlist).forEach(function(key) {
8
7
  if (key === "default" || key === "__esModule") return;
@@ -55,13 +54,11 @@ function _interopRequireWildcard(obj) {
55
54
  if (obj && obj.__esModule) {
56
55
  return obj;
57
56
  } else {
58
- var newObj = {
59
- };
57
+ var newObj = {};
60
58
  if (obj != null) {
61
59
  for(var key in obj){
62
60
  if (Object.prototype.hasOwnProperty.call(obj, key)) {
63
- var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
64
- };
61
+ var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
65
62
  if (desc.get || desc.set) {
66
63
  Object.defineProperty(newObj, key, desc);
67
64
  } else {
@@ -3,16 +3,23 @@ Object.defineProperty(exports, "__esModule", {
3
3
  });
4
4
  exports.useWishlist = void 0;
5
5
  var _wishlistApi = require("../../../api/wishlistApi");
6
+ function _arrayLikeToArray(arr, len) {
7
+ if (len == null || len > arr.length) len = arr.length;
8
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
9
+ return arr2;
10
+ }
6
11
  function _arrayWithHoles(arr) {
7
12
  if (Array.isArray(arr)) return arr;
8
13
  }
9
14
  function _iterableToArrayLimit(arr, i) {
15
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
16
+ if (_i == null) return;
10
17
  var _arr = [];
11
18
  var _n = true;
12
19
  var _d = false;
13
- var _e = undefined;
20
+ var _s, _e;
14
21
  try {
15
- for(var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true){
22
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
16
23
  _arr.push(_s.value);
17
24
  if (i && _arr.length === i) break;
18
25
  }
@@ -29,10 +36,18 @@ function _iterableToArrayLimit(arr, i) {
29
36
  return _arr;
30
37
  }
31
38
  function _nonIterableRest() {
32
- throw new TypeError("Invalid attempt to destructure non-iterable instance");
39
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
33
40
  }
34
41
  function _slicedToArray(arr, i) {
35
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
42
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
43
+ }
44
+ function _unsupportedIterableToArray(o, minLen) {
45
+ if (!o) return;
46
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
47
+ var n = Object.prototype.toString.call(o).slice(8, -1);
48
+ if (n === "Object" && o.constructor) n = o.constructor.name;
49
+ if (n === "Map" || n === "Set") return Array.from(n);
50
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
36
51
  }
37
52
  var useWishlist = function(param) {
38
53
  var productId = param.productId, variantId = param.variantId, collapseKey = param.collapseKey, onAddCallback = param.onAddCallback, onRemoveCallback = param.onRemoveCallback;
@@ -2,25 +2,48 @@ Object.defineProperty(exports, "__esModule", {
2
2
  value: true
3
3
  });
4
4
  exports.useWishlistItem = void 0;
5
- var _react = _interopRequireDefault(require("react"));
5
+ var _react = _interopRequireWildcard(require("react"));
6
6
  var _ = require("../../../");
7
7
  var _utils = require("../../basket-hooks/useBasketLineItem/utils");
8
8
  var _utils1 = require("../../../utils");
9
+ function _arrayLikeToArray(arr, len) {
10
+ if (len == null || len > arr.length) len = arr.length;
11
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
12
+ return arr2;
13
+ }
9
14
  function _arrayWithHoles(arr) {
10
15
  if (Array.isArray(arr)) return arr;
11
16
  }
12
- function _interopRequireDefault(obj) {
13
- return obj && obj.__esModule ? obj : {
14
- default: obj
15
- };
17
+ function _interopRequireWildcard(obj) {
18
+ if (obj && obj.__esModule) {
19
+ return obj;
20
+ } else {
21
+ var newObj = {};
22
+ if (obj != null) {
23
+ for(var key in obj){
24
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
25
+ var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
26
+ if (desc.get || desc.set) {
27
+ Object.defineProperty(newObj, key, desc);
28
+ } else {
29
+ newObj[key] = obj[key];
30
+ }
31
+ }
32
+ }
33
+ }
34
+ newObj.default = obj;
35
+ return newObj;
36
+ }
16
37
  }
17
38
  function _iterableToArrayLimit(arr, i) {
39
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
40
+ if (_i == null) return;
18
41
  var _arr = [];
19
42
  var _n = true;
20
43
  var _d = false;
21
- var _e = undefined;
44
+ var _s, _e;
22
45
  try {
23
- for(var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true){
46
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
24
47
  _arr.push(_s.value);
25
48
  if (i && _arr.length === i) break;
26
49
  }
@@ -37,25 +60,36 @@ function _iterableToArrayLimit(arr, i) {
37
60
  return _arr;
38
61
  }
39
62
  function _nonIterableRest() {
40
- throw new TypeError("Invalid attempt to destructure non-iterable instance");
63
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
41
64
  }
42
65
  function _slicedToArray(arr, i) {
43
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
66
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
67
+ }
68
+ function _unsupportedIterableToArray(o, minLen) {
69
+ if (!o) return;
70
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
71
+ var n = Object.prototype.toString.call(o).slice(8, -1);
72
+ if (n === "Object" && o.constructor) n = o.constructor.name;
73
+ if (n === "Map" || n === "Set") return Array.from(n);
74
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
44
75
  }
45
76
  var useWishlistItem = function(props) {
46
77
  var ref16;
47
- var ref1 = _slicedToArray(_react.default.useState(false), 2), isExpired = ref1[0], setIsExpired = ref1[1];
78
+ var item = props.item, expiry = props.expiry;
79
+ var ref1 = _slicedToArray((0, _).useBoolean(false), 2), isExpired = ref1[0], setIsExpired = ref1[1];
48
80
  var ref2 = _slicedToArray(_.wishlistApi.useSync(), 1), syncWishlist = ref2[0];
49
81
  var ref3 = (0, _).usePrefetchProduct((0, _).getTranslatableField(props === null || props === void 0 ? void 0 : (ref16 = props.item) === null || ref16 === void 0 ? void 0 : ref16.productSlug)), onMouseDown = ref3.onMouseDown, onMouseEnter = ref3.onMouseEnter, onMouseLeave = ref3.onMouseLeave;
82
+ (0, _react).useEffect(function() {
83
+ if (expiry) {
84
+ if (Date.now() > expiry + (item === null || item === void 0 ? void 0 : item.snapshotFrom)) {
85
+ setIsExpired.on();
86
+ }
87
+ }
88
+ }, []);
50
89
  var data = _react.default.useMemo(function() {
51
90
  var ref, ref4, ref5, ref6, ref7, ref8, ref9, ref10, ref11, ref12, ref13, ref14, ref15;
52
- var item = props.item;
53
- if (props.expiry && (0, _utils).getTimeStamp(props.expiry) < (item === null || item === void 0 ? void 0 : item.snapshotFrom)) {
54
- setIsExpired(true);
55
- }
56
91
  var offer = item === null || item === void 0 ? void 0 : (ref = item.productVariant) === null || ref === void 0 ? void 0 : ref.offer;
57
- var mappedAttributes = (0, _utils).createMappedAttributes(item === null || item === void 0 ? void 0 : (ref4 = item.productVariant) === null || ref4 === void 0 ? void 0 : ref4.attributes) || {
58
- };
92
+ var mappedAttributes = (0, _utils).createMappedAttributes(item === null || item === void 0 ? void 0 : (ref4 = item.productVariant) === null || ref4 === void 0 ? void 0 : ref4.attributes) || {};
59
93
  var mappedCustomField = (0, _utils1).customFieldsToMap(item.custom);
60
94
  return {
61
95
  productId: item === null || item === void 0 ? void 0 : item.productId,
@@ -93,12 +127,16 @@ var useWishlistItem = function(props) {
93
127
  }
94
128
  };
95
129
  }, [
96
- props.item
130
+ item
131
+ ]);
132
+ (0, _react).useEffect(function() {
133
+ if (isExpired) {
134
+ syncWishlist();
135
+ setIsExpired.off();
136
+ }
137
+ }, [
138
+ isExpired
97
139
  ]);
98
- if (isExpired) {
99
- syncWishlist();
100
- setIsExpired(false);
101
- }
102
140
  return data;
103
141
  };
104
142
  exports.useWishlistItem = useWishlistItem;
package/dist/cjs/index.js CHANGED
@@ -1,27 +1,7 @@
1
1
  Object.defineProperty(exports, "__esModule", {
2
2
  value: true
3
3
  });
4
- Object.defineProperty(exports, "Cookie", {
5
- enumerable: true,
6
- get: function() {
7
- return _jsCookie.default;
8
- }
9
- });
10
- var _exportNames = {
11
- };
12
- var _jsCookie = _interopRequireDefault(require("js-cookie"));
13
- var _dto = _interopRequireWildcard(require("./dto"));
14
- Object.keys(_dto).forEach(function(key) {
15
- if (key === "default" || key === "__esModule") return;
16
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
17
- if (key in exports && exports[key] === _dto[key]) return;
18
- Object.defineProperty(exports, key, {
19
- enumerable: true,
20
- get: function() {
21
- return _dto[key];
22
- }
23
- });
24
- });
4
+ var _exportNames = {};
25
5
  var _productsApi = _interopRequireWildcard(require("./api/productsApi"));
26
6
  Object.keys(_productsApi).forEach(function(key) {
27
7
  if (key === "default" || key === "__esModule") return;
@@ -1066,6 +1046,18 @@ Object.keys(_useLocalRating).forEach(function(key) {
1066
1046
  }
1067
1047
  });
1068
1048
  });
1049
+ var _types = _interopRequireWildcard(require("./hooks/useProductVariants/types"));
1050
+ Object.keys(_types).forEach(function(key) {
1051
+ if (key === "default" || key === "__esModule") return;
1052
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
1053
+ if (key in exports && exports[key] === _types[key]) return;
1054
+ Object.defineProperty(exports, key, {
1055
+ enumerable: true,
1056
+ get: function() {
1057
+ return _types[key];
1058
+ }
1059
+ });
1060
+ });
1069
1061
  var _utils1 = _interopRequireWildcard(require("./utils"));
1070
1062
  Object.keys(_utils1).forEach(function(key) {
1071
1063
  if (key === "default" || key === "__esModule") return;
@@ -1078,15 +1070,15 @@ Object.keys(_utils1).forEach(function(key) {
1078
1070
  }
1079
1071
  });
1080
1072
  });
1081
- var _types = _interopRequireWildcard(require("./types"));
1082
- Object.keys(_types).forEach(function(key) {
1073
+ var _types1 = _interopRequireWildcard(require("./types"));
1074
+ Object.keys(_types1).forEach(function(key) {
1083
1075
  if (key === "default" || key === "__esModule") return;
1084
1076
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
1085
- if (key in exports && exports[key] === _types[key]) return;
1077
+ if (key in exports && exports[key] === _types1[key]) return;
1086
1078
  Object.defineProperty(exports, key, {
1087
1079
  enumerable: true,
1088
1080
  get: function() {
1089
- return _types[key];
1081
+ return _types1[key];
1090
1082
  }
1091
1083
  });
1092
1084
  });
@@ -1390,22 +1382,15 @@ Object.keys(_postcss).forEach(function(key) {
1390
1382
  }
1391
1383
  });
1392
1384
  });
1393
- function _interopRequireDefault(obj) {
1394
- return obj && obj.__esModule ? obj : {
1395
- default: obj
1396
- };
1397
- }
1398
1385
  function _interopRequireWildcard(obj) {
1399
1386
  if (obj && obj.__esModule) {
1400
1387
  return obj;
1401
1388
  } else {
1402
- var newObj = {
1403
- };
1389
+ var newObj = {};
1404
1390
  if (obj != null) {
1405
1391
  for(var key in obj){
1406
1392
  if (Object.prototype.hasOwnProperty.call(obj, key)) {
1407
- var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
1408
- };
1393
+ var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
1409
1394
  if (desc.get || desc.set) {
1410
1395
  Object.defineProperty(newObj, key, desc);
1411
1396
  } else {
@@ -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 _useInfiniteListing = _interopRequireWildcard(require("./queries/useInfiniteListing"));
7
6
  Object.keys(_useInfiniteListing).forEach(function(key) {
8
7
  if (key === "default" || key === "__esModule") return;
@@ -91,13 +90,11 @@ function _interopRequireWildcard(obj) {
91
90
  if (obj && obj.__esModule) {
92
91
  return obj;
93
92
  } else {
94
- var newObj = {
95
- };
93
+ var newObj = {};
96
94
  if (obj != null) {
97
95
  for(var key in obj){
98
96
  if (Object.prototype.hasOwnProperty.call(obj, key)) {
99
- var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
100
- };
97
+ var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
101
98
  if (desc.get || desc.set) {
102
99
  Object.defineProperty(newObj, key, desc);
103
100
  } else {
@@ -3,19 +3,18 @@ Object.defineProperty(exports, "__esModule", {
3
3
  });
4
4
  exports.getListingQueryKeys = exports.ListingQueryKeysEnum = void 0;
5
5
  var _ = require("../..");
6
- var ListingQueryKeysEnum1;
7
- exports.ListingQueryKeysEnum = ListingQueryKeysEnum1;
6
+ var ListingQueryKeysEnum;
7
+ exports.ListingQueryKeysEnum = ListingQueryKeysEnum;
8
8
  (function(ListingQueryKeysEnum) {
9
9
  ListingQueryKeysEnum["usePredicate"] = 'predicate';
10
10
  ListingQueryKeysEnum["useListingQuery"] = 'listing';
11
11
  ListingQueryKeysEnum["useAggregateQuery"] = 'agg-query';
12
12
  ListingQueryKeysEnum["useLabelsQuery"] = 'get-labels';
13
- })(ListingQueryKeysEnum1 || (exports.ListingQueryKeysEnum = ListingQueryKeysEnum1 = {
14
- }));
13
+ })(ListingQueryKeysEnum || (exports.ListingQueryKeysEnum = ListingQueryKeysEnum = {}));
15
14
  var getListingQueryKeys = function(param) {
16
15
  var predicate = param.predicate, type = param.type, sort = param.sort, postFilter = param.postFilter, offset = param.offset, slug = param.slug;
17
16
  return [
18
- ListingQueryKeysEnum1.useListingQuery,
17
+ ListingQueryKeysEnum.useListingQuery,
19
18
  type,
20
19
  predicate ? "[".concat((0, _).getTranslatableField(predicate.name), "]: ").concat(predicate._id) : slug,
21
20
  sort,
@@ -63,8 +63,7 @@ function _interopRequireDefault(obj) {
63
63
  }
64
64
  function _objectSpread(target) {
65
65
  for(var i = 1; i < arguments.length; i++){
66
- var source = arguments[i] != null ? arguments[i] : {
67
- };
66
+ var source = arguments[i] != null ? arguments[i] : {};
68
67
  var ownKeys = Object.keys(source);
69
68
  if (typeof Object.getOwnPropertySymbols === "function") {
70
69
  ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
@@ -77,13 +76,12 @@ function _objectSpread(target) {
77
76
  }
78
77
  return target;
79
78
  }
80
- var AggregateRequestEnum1;
81
- exports.AggregateRequestEnum = AggregateRequestEnum1;
79
+ var AggregateRequestEnum;
80
+ exports.AggregateRequestEnum = AggregateRequestEnum;
82
81
  (function(AggregateRequestEnum) {
83
82
  AggregateRequestEnum["Filters"] = 'filters';
84
83
  AggregateRequestEnum["Categories"] = 'categories';
85
- })(AggregateRequestEnum1 || (exports.AggregateRequestEnum = AggregateRequestEnum1 = {
86
- }));
84
+ })(AggregateRequestEnum || (exports.AggregateRequestEnum = AggregateRequestEnum = {}));
87
85
  var useAggregateQuery = function(aggregates, request, sort) {
88
86
  var router = (0, _router).useRouter();
89
87
  var ref = (0, _usePredicate).usePredicate(), predicate = ref.data;
@@ -119,8 +117,7 @@ var useAggregateQuery = function(aggregates, request, sort) {
119
117
  config: meta
120
118
  });
121
119
  if (sort) {
122
- query = _objectSpread({
123
- }, query, {
120
+ query = _objectSpread({}, query, {
124
121
  attributeSortType: sort
125
122
  });
126
123
  }
@@ -147,7 +144,7 @@ function prepareAggregateQuery(param) {
147
144
  var request = param.request, predicate = param.predicate, aggregates = param.aggregates, router = param.router, postFilter = param.postFilter, slug = param.slug, config = param.config, attributeSortType = param.attributeSortType;
148
145
  var pageType = (0, _utils).getListingPageType(router, slug, config);
149
146
  switch(request){
150
- case AggregateRequestEnum1.Categories:
147
+ case AggregateRequestEnum.Categories:
151
148
  return (0, _utils).buildCategoryQuery({
152
149
  aggregates: aggregates,
153
150
  predicate: predicate,
@@ -157,7 +154,7 @@ function prepareAggregateQuery(param) {
157
154
  router: router,
158
155
  slug: slug
159
156
  });
160
- case AggregateRequestEnum1.Filters:
157
+ case AggregateRequestEnum.Filters:
161
158
  return (0, _utils).buildFilterQuery({
162
159
  predicate: predicate,
163
160
  slug: slug,
@@ -60,8 +60,7 @@ function _interopRequireDefault(obj) {
60
60
  }
61
61
  function _objectSpread(target) {
62
62
  for(var i = 1; i < arguments.length; i++){
63
- var source = arguments[i] != null ? arguments[i] : {
64
- };
63
+ var source = arguments[i] != null ? arguments[i] : {};
65
64
  var ownKeys = Object.keys(source);
66
65
  if (typeof Object.getOwnPropertySymbols === "function") {
67
66
  ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
@@ -135,8 +134,7 @@ var useInfiniteListing = function() {
135
134
  */ var flatResults = (ref = infiniteQuery.data) === null || ref === void 0 ? void 0 : ref.map(function(data) {
136
135
  return data.results;
137
136
  }).flat();
138
- return _objectSpread({
139
- }, infiniteQuery, {
137
+ return _objectSpread({}, infiniteQuery, {
140
138
  showPlaceholders: Boolean(!isEnabled || infiniteQuery.isFetching || !flatResults),
141
139
  results: flatResults
142
140
  });