@sentecacommerce-theme/lib 0.13.7-alpha.7 → 0.13.7

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 (828) 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 +3 -6
  9. package/dist/cjs/GDPR/hooks/useCookies.js +37 -37
  10. package/dist/cjs/GDPR/index.js +3 -6
  11. package/dist/cjs/analytics/Pixel/hooks/index.js +39 -6
  12. package/dist/cjs/analytics/Pixel/hooks/usePixelFinishOrder.js +27 -0
  13. package/dist/cjs/analytics/Pixel/hooks/usePixelProductClick.js +4 -9
  14. package/dist/cjs/analytics/Pixel/hooks/usePixelProductDetails.js +19 -4
  15. package/dist/cjs/analytics/Pixel/hooks/usePixelProductsImpression.js +61 -35
  16. package/dist/cjs/analytics/Pixel/hooks/usePixelViewBasket.js +24 -0
  17. package/dist/cjs/analytics/Pixel/hooks/usePixelViewCategory.js +29 -0
  18. package/dist/cjs/analytics/Pixel/index.js +3 -6
  19. package/dist/cjs/analytics/Pixel/mainScript.js +258 -99
  20. package/dist/cjs/analytics/Pixel/minifiedPixel.js +1 -1
  21. package/dist/cjs/analytics/Pixel/usePixel.js +6 -1
  22. package/dist/cjs/analytics/Pixel/utils.js +17 -0
  23. package/dist/cjs/analytics/Releva/api/index.js +2 -4
  24. package/dist/cjs/analytics/Releva/api/query/index.js +2 -4
  25. package/dist/cjs/analytics/Releva/api/query/useRelevaQuery.js +1 -0
  26. package/dist/cjs/analytics/Releva/hooks/index.js +3 -6
  27. package/dist/cjs/analytics/Releva/hooks/useRelevaData.js +20 -6
  28. package/dist/cjs/analytics/Releva/index.js +3 -6
  29. package/dist/cjs/analytics/Releva/types.js +23 -25
  30. package/dist/cjs/analytics/Releva/useReleva.js +20 -6
  31. package/dist/cjs/analytics/Releva/utils.js +2 -4
  32. package/dist/cjs/analytics/viewContent.js +2 -1
  33. package/dist/cjs/api/addressesApi/index.js +10 -11
  34. package/dist/cjs/api/brandsApi/index.js +38 -33
  35. package/dist/cjs/api/catalogApi/index.js +157 -160
  36. package/dist/cjs/api/categoriesApi/index.js +38 -33
  37. package/dist/cjs/api/citiesApi/index.js +24 -19
  38. package/dist/cjs/api/companiesApi/index.js +12 -15
  39. package/dist/cjs/api/consentsApi/index.js +3 -6
  40. package/dist/cjs/api/getSDKConfig.js +14 -23
  41. package/dist/cjs/api/myCartApi/index.js +222 -136
  42. package/dist/cjs/api/myOrdersApi/index.js +56 -15
  43. package/dist/cjs/api/myPaymentsBoricaApi/index.js +23 -18
  44. package/dist/cjs/api/myShippingsEcontApi/index.js +150 -125
  45. package/dist/cjs/api/myShippingsEvropatApi/index.js +60 -50
  46. package/dist/cjs/api/myShippingsPickupFromStoreAPI/index.js +7 -7
  47. package/dist/cjs/api/myShippingsSpeedyApi/index.js +150 -125
  48. package/dist/cjs/api/notificationsApi/index.js +5 -5
  49. package/dist/cjs/api/pagesApi/index.js +4 -4
  50. package/dist/cjs/api/productsApi/index.js +49 -46
  51. package/dist/cjs/api/searchHistoryApi/index.js +36 -26
  52. package/dist/cjs/api/usersApi/index.js +2 -3
  53. package/dist/cjs/api/viewsApi/index.js +37 -32
  54. package/dist/cjs/api/vouchersApi/index.js +4 -4
  55. package/dist/cjs/api/walletApi/index.js +3 -6
  56. package/dist/cjs/api/wishlistApi/index.js +72 -20
  57. package/dist/cjs/api/wishlistApi/utils/index.js +2 -4
  58. package/dist/cjs/api.v2/core/checkout/index.js +3 -6
  59. package/dist/cjs/api.v2/core/checkout/payments/index.js +3 -6
  60. package/dist/cjs/api.v2/core/checkout/payments/useSetPaymentMethod.js +19 -4
  61. package/dist/cjs/api.v2/core/checkout/shippings/index.js +3 -6
  62. package/dist/cjs/api.v2/core/checkout/shippings/mutations/index.js +2 -4
  63. package/dist/cjs/api.v2/core/checkout/shippings/mutations/useMutateNomenclature.js +19 -14
  64. package/dist/cjs/api.v2/core/checkout/shippings/queries/index.js +3 -6
  65. package/dist/cjs/api.v2/core/checkout/shippings/queries/useFindNomenclatureElement.js +67 -56
  66. package/dist/cjs/api.v2/core/checkout/types.js +6 -8
  67. package/dist/cjs/api.v2/core/index.js +3 -6
  68. package/dist/cjs/api.v2/core/misc/index.js +3 -6
  69. package/dist/cjs/api.v2/core/misc/promo-code/index.js +3 -6
  70. package/dist/cjs/api.v2/core/misc/promo-code/mutations/usePromoCodeMutation.js +22 -17
  71. package/dist/cjs/api.v2/core/product/index.js +2 -4
  72. package/dist/cjs/api.v2/core/product/useSubscribeForSkuMutation.js +19 -4
  73. package/dist/cjs/api.v2/index.js +2 -4
  74. package/dist/cjs/basket/api/index.js +2 -4
  75. package/dist/cjs/basket/api/mutations/index.js +16 -4
  76. package/dist/cjs/basket/api/mutations/useChangeGiftVariant.js +116 -0
  77. package/dist/cjs/basket/api/mutations/useReplaceBasketMutation.js +17 -13
  78. package/dist/cjs/basket/hooks/index.js +15 -6
  79. package/dist/cjs/basket/hooks/useBasketCrossSaleItems.js +2 -4
  80. package/dist/cjs/basket/hooks/useChangeGiftVariant.js +16 -0
  81. package/dist/cjs/basket/index.js +2 -4
  82. package/dist/cjs/brands/api/index.js +3 -6
  83. package/dist/cjs/brands/api/queries/index.js +3 -6
  84. package/dist/cjs/brands/api/queries/keys.js +3 -4
  85. package/dist/cjs/brands/api/queries/useAllBrandsQuery.js +91 -76
  86. package/dist/cjs/brands/api/ssr/index.js +3 -6
  87. package/dist/cjs/brands/hooks/index.js +2 -4
  88. package/dist/cjs/brands/index.js +3 -6
  89. package/dist/cjs/build/api/index.js +2 -4
  90. package/dist/cjs/build/api/query/fetchStore.js +25 -20
  91. package/dist/cjs/build/api/query/index.js +2 -4
  92. package/dist/cjs/build/index.js +2 -4
  93. package/dist/cjs/checkout/api/index.js +3 -6
  94. package/dist/cjs/checkout/api/keys.js +9 -4
  95. package/dist/cjs/checkout/api/queries/index.js +15 -6
  96. package/dist/cjs/checkout/api/queries/useUniCreditCalculateForCartQuery.js +60 -0
  97. package/dist/cjs/checkout/contexts/BoricaResponseContext.js +3 -6
  98. package/dist/cjs/checkout/contexts/PaypalResponseContext.js +3 -6
  99. package/dist/cjs/checkout/contexts/UniCreditResponseContext.js +40 -0
  100. package/dist/cjs/checkout/contexts/index.js +15 -6
  101. package/dist/cjs/checkout/hooks/index.js +15 -6
  102. package/dist/cjs/checkout/hooks/useBnpCalculateForCart.js +8 -14
  103. package/dist/cjs/checkout/hooks/useUniCreditCalculateForCart.js +93 -0
  104. package/dist/cjs/checkout/index.js +3 -6
  105. package/dist/cjs/checkout/ssr/capturePaypalOrder.js +16 -11
  106. package/dist/cjs/checkout/ssr/captureUniCreditOrder.js +57 -0
  107. package/dist/cjs/checkout/ssr/index.js +15 -6
  108. package/dist/cjs/checkout/ssr/verifyBoricaResponse.js +24 -19
  109. package/dist/cjs/cms/api/index.js +3 -6
  110. package/dist/cjs/cms/api/mutations/index.js +3 -6
  111. package/dist/cjs/cms/api/mutations/useCMSFoldersCreateMutation.js +31 -29
  112. package/dist/cjs/cms/api/mutations/useCMSMediaDeleteAssetsMutation.js +19 -14
  113. package/dist/cjs/cms/api/mutations/useCMSMediaUploadAssetsMutation.js +21 -35
  114. package/dist/cjs/cms/api/queries/index.js +3 -6
  115. package/dist/cjs/cms/api/queries/keys.js +21 -14
  116. package/dist/cjs/cms/api/queries/useCMSContentListQuery.js +4 -7
  117. package/dist/cjs/cms/api/queries/useCMSMediaQuery.js +1 -2
  118. package/dist/cjs/cms/api/queries/useInjectedContentQuery.js +5 -7
  119. package/dist/cjs/cms/api/utils/index.js +2 -4
  120. package/dist/cjs/cms/components/RenderInjectedContent.js +5 -11
  121. package/dist/cjs/cms/components/index.js +2 -4
  122. package/dist/cjs/cms/hooks/index.js +3 -6
  123. package/dist/cjs/cms/hooks/useCmsContent.js +4 -8
  124. package/dist/cjs/cms/hooks/useCmsContentList.js +7 -12
  125. package/dist/cjs/cms/hooks/useCmsFolders.js +0 -6
  126. package/dist/cjs/cms/hooks/useCmsMedia.js +0 -6
  127. package/dist/cjs/cms/hooks/useCmsMediaDeleteAssets.js +0 -6
  128. package/dist/cjs/cms/hooks/useCmsMediaUploadAssets.js +0 -6
  129. package/dist/cjs/cms/hooks/useContentCategoriesMap.js +6 -13
  130. package/dist/cjs/cms/hooks/useCreateCmsFolders.js +0 -6
  131. package/dist/cjs/cms/hooks/useInjectedContentContext.js +6 -12
  132. package/dist/cjs/cms/hooks/useListingInjectedContent.js +1 -2
  133. package/dist/cjs/cms/index.js +3 -6
  134. package/dist/cjs/cms/ssr/fetchPagePaths.js +3 -3
  135. package/dist/cjs/cms/ssr/index.js +3 -6
  136. package/dist/cjs/cms/ssr/prefetchCMSPage.js +34 -29
  137. package/dist/cjs/cms/ssr/prefetchCmsContent.js +48 -43
  138. package/dist/cjs/cms/ssr/prefetchCmsContentList.js +52 -50
  139. package/dist/cjs/cms/utils/index.js +3 -6
  140. package/dist/cjs/components/AnalyticsScripts/index.js +24 -10
  141. package/dist/cjs/components/ClickOutside/index.js +2 -4
  142. package/dist/cjs/components/Drawer/index.js +6 -9
  143. package/dist/cjs/components/FadeIn/index.js +26 -15
  144. package/dist/cjs/components/FocusTrap/index.js +2 -4
  145. package/dist/cjs/components/GoogleOneTap/index.js +40 -22
  146. package/dist/cjs/components/Html/index.js +2 -4
  147. package/dist/cjs/components/LazyResponsiveImage/index.js +25 -16
  148. package/dist/cjs/components/Link/index.js +5 -10
  149. package/dist/cjs/components/Modal/index.js +2 -4
  150. package/dist/cjs/components/OverflowEllipsis/index.js +2 -4
  151. package/dist/cjs/components/ProgressBar/index.js +21 -8
  152. package/dist/cjs/components/index.js +3 -6
  153. package/dist/cjs/config/SentecaProvider.js +7 -12
  154. package/dist/cjs/config/index.js +2 -4
  155. package/dist/cjs/contexts/CheckoutForm/Components/BoricaRedirect/index.js +21 -8
  156. package/dist/cjs/contexts/CheckoutForm/Components/CheckoutCustomState/index.js +24 -14
  157. package/dist/cjs/contexts/CheckoutForm/Components/UniCreditRedirect/index.js +87 -0
  158. package/dist/cjs/contexts/CheckoutForm/Components/index.js +15 -6
  159. package/dist/cjs/contexts/CheckoutForm/hooks/index.js +3 -6
  160. package/dist/cjs/contexts/CheckoutForm/hooks/useBilling/index.js +52 -31
  161. package/dist/cjs/contexts/CheckoutForm/hooks/usePayment/index.js +20 -6
  162. package/dist/cjs/contexts/CheckoutForm/hooks/useSavedBillingList/index.js +2 -4
  163. package/dist/cjs/contexts/CheckoutForm/hooks/useSavedShippingList/index.js +20 -15
  164. package/dist/cjs/contexts/CheckoutForm/hooks/useShipping/index.js +102 -90
  165. package/dist/cjs/contexts/CheckoutForm/hooks/useShippingInitialData/index.js +3 -7
  166. package/dist/cjs/contexts/CheckoutForm/index.js +105 -63
  167. package/dist/cjs/contexts/CheckoutForm/utils/index.js +3 -6
  168. package/dist/cjs/contexts/CheckoutForm/utils/updatedNestedObjectProps.js +16 -3
  169. package/dist/cjs/contexts/CheckoutForm/utils/validateBillingAddress.js +6 -14
  170. package/dist/cjs/contexts/CheckoutForm/utils/validateShipping.js +12 -23
  171. package/dist/cjs/contexts/CustomProductProvider/index.js +24 -14
  172. package/dist/cjs/contexts/Strings.js +34 -37
  173. package/dist/cjs/hooks/addresses-hooks/index.js +3 -6
  174. package/dist/cjs/hooks/addresses-hooks/useAddressForm/index.js +40 -52
  175. package/dist/cjs/hooks/basket-hooks/index.js +3 -6
  176. package/dist/cjs/hooks/basket-hooks/useBasket/index.js +19 -4
  177. package/dist/cjs/hooks/basket-hooks/useBasketCustom/index.js +19 -4
  178. package/dist/cjs/hooks/basket-hooks/useBasketItemList/index.js +5 -10
  179. package/dist/cjs/hooks/basket-hooks/useBasketItemWithErrorList/index.js +4 -8
  180. package/dist/cjs/hooks/basket-hooks/useBasketLineItem/index.js +19 -4
  181. package/dist/cjs/hooks/basket-hooks/useBasketLineItem/utils/index.js +4 -9
  182. package/dist/cjs/hooks/checkout-hooks/index.js +3 -6
  183. package/dist/cjs/hooks/checkout-hooks/useAllStockLocations.js +5 -10
  184. package/dist/cjs/hooks/checkout-hooks/useShippingCourierMethods.js +41 -36
  185. package/dist/cjs/hooks/cities-hooks/index.js +2 -4
  186. package/dist/cjs/hooks/cities-hooks/useCities/index.js +19 -4
  187. package/dist/cjs/hooks/companies-hooks/index.js +3 -6
  188. package/dist/cjs/hooks/error-handling/index.js +2 -4
  189. package/dist/cjs/hooks/error-handling/useErrors/index.js +4 -9
  190. package/dist/cjs/hooks/labels/index.js +3 -6
  191. package/dist/cjs/hooks/labels/useGlobalLabels/index.js +1 -2
  192. package/dist/cjs/hooks/order-hooks/api/hooks/index.js +2 -4
  193. package/dist/cjs/hooks/order-hooks/api/index.js +3 -6
  194. package/dist/cjs/hooks/order-hooks/api/mutations/index.js +2 -4
  195. package/dist/cjs/hooks/order-hooks/api/queries/index.js +2 -4
  196. package/dist/cjs/hooks/order-hooks/api/queries/useOrderGetPaymentMethodQuery.js +2 -4
  197. package/dist/cjs/hooks/order-hooks/index.js +3 -6
  198. package/dist/cjs/hooks/order-hooks/useGenericCourierAddress/index.js +103 -68
  199. package/dist/cjs/hooks/order-hooks/useOrder/index.js +3 -16
  200. package/dist/cjs/hooks/order-hooks/useOrderGetPaymentMethod/index.js +0 -6
  201. package/dist/cjs/hooks/order-hooks/useOrderPaymentMethods/index.js +2 -4
  202. package/dist/cjs/hooks/order-hooks/useOrdersList/index.js +2 -4
  203. package/dist/cjs/hooks/order-hooks/usePayOrder/index.js +66 -58
  204. package/dist/cjs/hooks/order-hooks/useUpdateOrderPaymentMethod/index.js +20 -7
  205. package/dist/cjs/hooks/profile-hooks/index.js +3 -6
  206. package/dist/cjs/hooks/subscriptions-hooks/index.js +3 -6
  207. package/dist/cjs/hooks/subscriptions-hooks/useAcceptOnRegister/index.js +21 -8
  208. package/dist/cjs/hooks/subscriptions-hooks/useAllSubscriptions/index.js +32 -33
  209. package/dist/cjs/hooks/subscriptions-hooks/useSubscribeForProduct/index.js +20 -6
  210. package/dist/cjs/hooks/ui-hooks/index.js +3 -6
  211. package/dist/cjs/hooks/ui-hooks/useAccordion/index.js +19 -5
  212. package/dist/cjs/hooks/ui-hooks/useBoolean/index.js +21 -6
  213. package/dist/cjs/hooks/ui-hooks/useCallbackRef/index.js +21 -15
  214. package/dist/cjs/hooks/ui-hooks/useClickOutside/index.js +2 -2
  215. package/dist/cjs/hooks/ui-hooks/useIsIos/index.js +19 -4
  216. package/dist/cjs/hooks/ui-hooks/useMenuAim/index.js +19 -4
  217. package/dist/cjs/hooks/ui-hooks/useMergeRefs/index.js +2 -4
  218. package/dist/cjs/hooks/ui-hooks/usePagination/index.js +19 -14
  219. package/dist/cjs/hooks/ui-hooks/useScrollDirection/index.js +21 -7
  220. package/dist/cjs/hooks/ui-hooks/useScrollTo/index.js +23 -9
  221. package/dist/cjs/hooks/ui-hooks/useSlideshow/index.js +21 -6
  222. package/dist/cjs/hooks/ui-hooks/useToggleNavbarOnScroll/index.js +3 -3
  223. package/dist/cjs/hooks/ui-hooks/useUI/index.js +34 -35
  224. package/dist/cjs/hooks/ui-hooks/useWindowDimensions/index.js +19 -4
  225. package/dist/cjs/hooks/useAddressList/index.js +2 -3
  226. package/dist/cjs/hooks/useAggregateResult/index.js +7 -5
  227. package/dist/cjs/hooks/useAvailability/index.js +28 -14
  228. package/dist/cjs/hooks/useCarousel/component/index.js +12 -17
  229. package/dist/cjs/hooks/useCarousel/helpers/eventStore.js +2 -2
  230. package/dist/cjs/hooks/useCarousel/index.js +20 -6
  231. package/dist/cjs/hooks/useCatalogResult/index.js +2 -2
  232. package/dist/cjs/hooks/useCategoryTree/index.js +1 -2
  233. package/dist/cjs/hooks/useCheckoutBillingAddress/index.js +96 -7
  234. package/dist/cjs/hooks/useCheckoutDelivery/index.js +71 -58
  235. package/dist/cjs/hooks/useCheckoutDiscountCode/index.js +19 -4
  236. package/dist/cjs/hooks/useCheckoutPickupFromStore/index.js +21 -8
  237. package/dist/cjs/hooks/useCheckoutShippingAddress/index.js +19 -4
  238. package/dist/cjs/hooks/useCheckoutShippingModule/index.js +4 -6
  239. package/dist/cjs/hooks/useCheckoutSubmit/index.js +97 -58
  240. package/dist/cjs/hooks/useClearAllFilters/index.js +4 -4
  241. package/dist/cjs/hooks/useContactForm/index.js +8 -4
  242. package/dist/cjs/hooks/useCopyToClipboard/index.js +20 -4
  243. package/dist/cjs/hooks/useForceUpdate/index.js +19 -4
  244. package/dist/cjs/hooks/useLineItem/LineItemContext.js +86 -0
  245. package/dist/cjs/hooks/useLineItem/index.js +35 -26
  246. package/dist/cjs/hooks/useLocalRating/index.js +23 -10
  247. package/dist/cjs/hooks/usePrefetchProduct/index.js +19 -4
  248. package/dist/cjs/hooks/useProduct/index.js +22 -271
  249. package/dist/cjs/hooks/useProduct/utils/index.js +75 -57
  250. package/dist/cjs/hooks/useProductVariants/index.js +334 -0
  251. package/dist/cjs/hooks/useProductVariants/types.js +3 -0
  252. package/dist/cjs/hooks/useProgressBar/helpers/index.js +3 -6
  253. package/dist/cjs/hooks/useProgressBar/hooks/index.js +3 -6
  254. package/dist/cjs/hooks/useProgressBar/hooks/useGetSetState.js +4 -7
  255. package/dist/cjs/hooks/useProgressBar/hooks/useUpdate.js +21 -8
  256. package/dist/cjs/hooks/useProgressBar/index.js +23 -11
  257. package/dist/cjs/hooks/usePromoCode/index.js +20 -6
  258. package/dist/cjs/hooks/useSearchbar/index.js +86 -74
  259. package/dist/cjs/hooks/useShippingAddress/index.js +2 -4
  260. package/dist/cjs/hooks/useSizesReducer/index.js +24 -12
  261. package/dist/cjs/hooks/useVouchers/index.js +1 -1
  262. package/dist/cjs/hooks/useWallet/index.js +2 -4
  263. package/dist/cjs/hooks/useZoom/index.js +23 -10
  264. package/dist/cjs/hooks/user-hooks/index.js +3 -6
  265. package/dist/cjs/hooks/user-hooks/useSubscribeToNewsletter/index.js +49 -7
  266. package/dist/cjs/hooks/wishlist-hooks/index.js +3 -6
  267. package/dist/cjs/hooks/wishlist-hooks/useWishlist/index.js +19 -4
  268. package/dist/cjs/hooks/wishlist-hooks/useWishlistItem/index.js +59 -21
  269. package/dist/cjs/index.js +19 -34
  270. package/dist/cjs/listing/api/index.js +3 -6
  271. package/dist/cjs/listing/api/keys.js +4 -5
  272. package/dist/cjs/listing/api/queries/useAggregateQuery.js +7 -10
  273. package/dist/cjs/listing/api/queries/useInfiniteListing.js +2 -4
  274. package/dist/cjs/listing/api/queries/useLabelsQuery.js +19 -10
  275. package/dist/cjs/listing/api/queries/useListingQuery.js +26 -9
  276. package/dist/cjs/listing/api/queries/usePredicate.js +34 -22
  277. package/dist/cjs/listing/components/BasicListingSEO.js +23 -7
  278. package/dist/cjs/listing/components/index.js +2 -4
  279. package/dist/cjs/listing/hooks/index.js +3 -6
  280. package/dist/cjs/listing/hooks/useListingBreadcrumbs.js +38 -19
  281. package/dist/cjs/listing/hooks/useListingCategories.js +20 -13
  282. package/dist/cjs/listing/hooks/useListingConfig.js +2 -4
  283. package/dist/cjs/listing/hooks/useListingFilters.js +45 -27
  284. package/dist/cjs/listing/hooks/useListingMeta.js +68 -49
  285. package/dist/cjs/listing/hooks/useListingPagination.js +3 -6
  286. package/dist/cjs/listing/hooks/useSlideFilter.js +46 -8
  287. package/dist/cjs/listing/hooks/useSort.js +3 -6
  288. package/dist/cjs/listing/index.js +3 -6
  289. package/dist/cjs/listing/ssr/index.js +3 -6
  290. package/dist/cjs/listing/ssr/prefetchCategories.js +5 -6
  291. package/dist/cjs/listing/ssr/prefetchListing.js +2 -1
  292. package/dist/cjs/listing/ssr/prefetchPredicate.js +4 -4
  293. package/dist/cjs/listing/types.js +15 -20
  294. package/dist/cjs/listing/utils/buildCategoryQuery.js +30 -11
  295. package/dist/cjs/listing/utils/buildFilterQuery.js +27 -22
  296. package/dist/cjs/listing/utils/extendFilter.js +19 -4
  297. package/dist/cjs/listing/utils/getListingAlias.js +21 -8
  298. package/dist/cjs/listing/utils/getListingPageType.js +2 -4
  299. package/dist/cjs/listing/utils/index.js +3 -6
  300. package/dist/cjs/navigation/components/SearchBox/Components/EmptyBox/index.js +7 -7
  301. package/dist/cjs/navigation/components/SearchBox/Components/IconArrowRight/index.js +2 -4
  302. package/dist/cjs/navigation/components/SearchBox/Components/Products/Components/ProductCard/index.js +1 -2
  303. package/dist/cjs/navigation/components/SearchBox/Components/Products/Components/index.js +2 -4
  304. package/dist/cjs/navigation/components/SearchBox/Components/Spinner/index.js +2 -4
  305. package/dist/cjs/navigation/components/SearchBox/Components/Suggestions/Components/index.js +2 -4
  306. package/dist/cjs/navigation/components/SearchBox/Components/Suggestions/Utils/ScrollView.js +4 -8
  307. package/dist/cjs/navigation/components/SearchBox/Components/Suggestions/Utils/index.js +3 -6
  308. package/dist/cjs/navigation/components/SearchBox/Components/index.js +3 -6
  309. package/dist/cjs/navigation/components/SearchBox/index.js +9 -12
  310. package/dist/cjs/navigation/components/index.js +2 -4
  311. package/dist/cjs/navigation/hooks/index.js +3 -6
  312. package/dist/cjs/navigation/hooks/search-history/index.js +3 -6
  313. package/dist/cjs/navigation/index.js +3 -6
  314. package/dist/cjs/navigation/keys.js +3 -4
  315. package/dist/cjs/navigation/mutations/index.js +2 -4
  316. package/dist/cjs/navigation/mutations/useSearchHistoryMutation.js +20 -16
  317. package/dist/cjs/navigation/queries/index.js +3 -6
  318. package/dist/cjs/navigation/ssr/index.js +2 -4
  319. package/dist/cjs/navigation/types.js +3 -4
  320. package/dist/cjs/order/api/index.js +15 -6
  321. package/dist/cjs/order/api/mutations/index.js +3 -6
  322. package/dist/cjs/order/api/queries/index.js +2 -4
  323. package/dist/cjs/order/api/queries/prefetchOrder.js +24 -19
  324. package/dist/cjs/{user/types/index.js → order/api/utils/getOrderById.js} +2 -2
  325. package/dist/cjs/order/api/utils/index.js +35 -0
  326. package/dist/cjs/order/hooks/index.js +3 -6
  327. package/dist/cjs/order/index.js +3 -6
  328. package/dist/cjs/postcss/index.js +3 -6
  329. package/dist/cjs/postcss/tailwind/buttons-plugin.js +20 -16
  330. package/dist/cjs/postcss/tailwind/default-plugin.js +2 -4
  331. package/dist/cjs/postcss/tailwind/fonts-plugin.js +21 -18
  332. package/dist/cjs/postcss/tailwind/forms-plugin.js +6 -9
  333. package/dist/cjs/postcss/tailwind/index.js +3 -6
  334. package/dist/cjs/postcss/tailwind/utils.js +4 -6
  335. package/dist/cjs/postcss/types.js +6 -8
  336. package/dist/cjs/product/api/index.js +2 -4
  337. package/dist/cjs/product/api/keys.js +8 -1
  338. package/dist/cjs/product/api/queries/index.js +16 -4
  339. package/dist/cjs/product/api/queries/useUniCreditOffersQuery.js +63 -0
  340. package/dist/cjs/product/api/ssr/index.js +44 -40
  341. package/dist/cjs/product/hooks/index.js +16 -4
  342. package/dist/cjs/product/hooks/useBnpOffers.js +3 -6
  343. package/dist/cjs/product/hooks/useUniCreditOffers.js +107 -0
  344. package/dist/cjs/product/index.js +3 -6
  345. package/dist/cjs/seo/api/index.js +2 -4
  346. package/dist/cjs/seo/api/ssr/fetchRedirectByFrom.js +19 -14
  347. package/dist/cjs/seo/api/ssr/fetchSitemaps.js +22 -17
  348. package/dist/cjs/seo/api/ssr/getCanonicalUrl.js +19 -4
  349. package/dist/cjs/seo/api/ssr/index.js +3 -6
  350. package/dist/cjs/seo/components/HiddenBreadcrumb/index.js +1 -2
  351. package/dist/cjs/seo/components/ProductSEO/index.js +3 -5
  352. package/dist/cjs/seo/components/TranslationsMeta/index.js +59 -0
  353. package/dist/cjs/seo/components/index.js +15 -6
  354. package/dist/cjs/seo/hooks/index.js +16 -4
  355. package/dist/cjs/seo/hooks/useSEOBreadcrumb.js +19 -13
  356. package/dist/cjs/seo/hooks/useSeoTranslations.js +90 -0
  357. package/dist/cjs/seo/index.js +3 -6
  358. package/dist/cjs/seo/utils/handleRobots.js +4 -4
  359. package/dist/cjs/seo/utils/index.js +3 -6
  360. package/dist/cjs/ssr/emptyBasketGuard.js +2 -2
  361. package/dist/cjs/ssr/index.js +3 -6
  362. package/dist/cjs/ui/components/GridStyles.js +36 -0
  363. package/dist/cjs/ui/components/LazyImage.js +6 -12
  364. package/dist/cjs/ui/components/RangeSliderInput.js +38 -15
  365. package/dist/cjs/ui/components/index.js +15 -6
  366. package/dist/cjs/ui/hooks/index.js +35 -0
  367. package/dist/cjs/ui/hooks/useToasts.js +165 -0
  368. package/dist/cjs/ui/index.js +16 -4
  369. package/dist/cjs/ui/toastUtils/ErrorIcon.js +25 -0
  370. package/dist/cjs/ui/toastUtils/InfoIcon.js +25 -0
  371. package/dist/cjs/ui/toastUtils/SuccessIcon.js +25 -0
  372. package/dist/cjs/ui/toastUtils/WarningIcon.js +25 -0
  373. package/dist/cjs/ui/toastUtils/index.js +85 -0
  374. package/dist/cjs/ui/toastUtils/utils.js +81 -0
  375. package/dist/cjs/user/api/index.js +3 -6
  376. package/dist/cjs/user/api/mutations/index.js +3 -6
  377. package/dist/cjs/user/api/mutations/useLoginMutation.js +2 -5
  378. package/dist/cjs/user/api/mutations/useLogoutMutation.js +3 -6
  379. package/dist/cjs/user/api/mutations/useRegisterMutation.js +24 -24
  380. package/dist/cjs/user/api/mutations/useRequestResetPasswordTokenMutation.js +1 -2
  381. package/dist/cjs/user/api/mutations/useResetPasswordMutation.js +1 -2
  382. package/dist/cjs/user/api/queries/index.js +3 -6
  383. package/dist/cjs/user/api/queries/useGetMyLoyaltyCardQuery.js +49 -3
  384. package/dist/cjs/user/api/queries/useIsAuthenticatedQuery.js +2 -4
  385. package/dist/cjs/user/api/utils/generateAnonymousToken.js +25 -21
  386. package/dist/cjs/user/api/utils/index.js +3 -6
  387. package/dist/cjs/user/api/utils/processLoginPayload.js +2 -2
  388. package/dist/cjs/user/hooks/index.js +3 -6
  389. package/dist/cjs/user/hooks/useConfirmEmail.js +20 -6
  390. package/dist/cjs/user/hooks/useLoginApple.js +2 -4
  391. package/dist/cjs/user/hooks/useLoginFacebook.js +2 -4
  392. package/dist/cjs/user/hooks/useLoginGoogle.js +2 -4
  393. package/dist/cjs/user/hooks/useRequestEmailConfirmation.js +20 -6
  394. package/dist/cjs/user/index.js +3 -18
  395. package/dist/cjs/utils/assetsToMap.js +3 -7
  396. package/dist/cjs/utils/createAggregateQuery.js +4 -6
  397. package/dist/cjs/utils/customFieldsToMap.js +3 -8
  398. package/dist/cjs/utils/generateQueryFromRouter.js +5 -12
  399. package/dist/cjs/utils/getLocaleFromPath.js +13 -0
  400. package/dist/cjs/utils/getPagination.js +5 -11
  401. package/dist/cjs/utils/getSelectedFilters.js +25 -11
  402. package/dist/cjs/utils/index.js +15 -6
  403. package/dist/cjs/utils/isColorBright.js +2 -2
  404. package/dist/cjs/utils/isTouchDevice.js +2 -1
  405. package/dist/cjs/utils/localStorage.js +7 -2
  406. package/dist/cjs/utils/queryObjToString.js +3 -7
  407. package/dist/cjs/utils/sortAncestors.js +18 -11
  408. package/dist/cjs/utils/tokens.js +19 -4
  409. package/dist/cjs/utils/validations.js +2 -2
  410. package/dist/cjs/webview/hooks/index.js +2 -4
  411. package/dist/cjs/webview/hooks/useIsInWebview.js +21 -6
  412. package/dist/cjs/webview/index.js +3 -6
  413. package/dist/cjs/webview/utils/index.js +3 -6
  414. package/dist/cjs/webview/utils/sendMessage.js +3 -4
  415. package/dist/cjs/wishlist/api/index.js +2 -4
  416. package/dist/cjs/wishlist/api/queries/index.js +3 -6
  417. package/dist/cjs/wishlist/api/queries/keys.js +3 -4
  418. package/dist/cjs/wishlist/api/queries/useWishlistItemsQuery.js +4 -7
  419. package/dist/cjs/wishlist/hooks/index.js +2 -4
  420. package/dist/cjs/wishlist/hooks/useWishlistItems.js +2 -3
  421. package/dist/cjs/wishlist/index.js +3 -6
  422. package/dist/esm/GDPR/api/queries/useConfirmConsentQuery.js +1 -2
  423. package/dist/esm/GDPR/components/CookiesTable.js +2 -4
  424. package/dist/esm/GDPR/hooks/useCookies.js +34 -33
  425. package/dist/esm/analytics/Pixel/hooks/index.js +3 -0
  426. package/dist/esm/analytics/Pixel/hooks/usePixelFinishOrder.js +22 -0
  427. package/dist/esm/analytics/Pixel/hooks/usePixelProductClick.js +5 -10
  428. package/dist/esm/analytics/Pixel/hooks/usePixelProductDetails.js +19 -4
  429. package/dist/esm/analytics/Pixel/hooks/usePixelProductsImpression.js +61 -35
  430. package/dist/esm/analytics/Pixel/hooks/usePixelViewBasket.js +19 -0
  431. package/dist/esm/analytics/Pixel/hooks/usePixelViewCategory.js +24 -0
  432. package/dist/esm/analytics/Pixel/mainScript.js +260 -99
  433. package/dist/esm/analytics/Pixel/minifiedPixel.js +1 -1
  434. package/dist/esm/analytics/Pixel/usePixel.js +6 -1
  435. package/dist/esm/analytics/Pixel/utils.js +12 -0
  436. package/dist/esm/analytics/Releva/api/query/useRelevaQuery.js +1 -0
  437. package/dist/esm/analytics/Releva/hooks/useRelevaData.js +20 -6
  438. package/dist/esm/analytics/Releva/types.js +21 -25
  439. package/dist/esm/analytics/Releva/useReleva.js +20 -6
  440. package/dist/esm/analytics/Releva/utils.js +2 -4
  441. package/dist/esm/analytics/viewContent.js +2 -1
  442. package/dist/esm/api/addressesApi/index.js +10 -12
  443. package/dist/esm/api/brandsApi/index.js +37 -33
  444. package/dist/esm/api/catalogApi/index.js +156 -160
  445. package/dist/esm/api/categoriesApi/index.js +37 -33
  446. package/dist/esm/api/citiesApi/index.js +23 -19
  447. package/dist/esm/api/companiesApi/index.js +11 -15
  448. package/dist/esm/api/consentsApi/index.js +3 -6
  449. package/dist/esm/api/getSDKConfig.js +15 -24
  450. package/dist/esm/api/myCartApi/index.js +221 -136
  451. package/dist/esm/api/myOrdersApi/index.js +55 -15
  452. package/dist/esm/api/myPaymentsBoricaApi/index.js +22 -18
  453. package/dist/esm/api/myShippingsEcontApi/index.js +150 -125
  454. package/dist/esm/api/myShippingsEvropatApi/index.js +60 -50
  455. package/dist/esm/api/myShippingsPickupFromStoreAPI/index.js +6 -7
  456. package/dist/esm/api/myShippingsSpeedyApi/index.js +150 -125
  457. package/dist/esm/api/notificationsApi/index.js +4 -5
  458. package/dist/esm/api/pagesApi/index.js +3 -4
  459. package/dist/esm/api/productsApi/index.js +48 -46
  460. package/dist/esm/api/searchHistoryApi/index.js +35 -26
  461. package/dist/esm/api/usersApi/index.js +2 -3
  462. package/dist/esm/api/viewsApi/index.js +36 -32
  463. package/dist/esm/api/vouchersApi/index.js +3 -4
  464. package/dist/esm/api/walletApi/index.js +3 -6
  465. package/dist/esm/api/wishlistApi/index.js +72 -20
  466. package/dist/esm/api/wishlistApi/utils/index.js +2 -4
  467. package/dist/esm/api.v2/core/checkout/payments/useSetPaymentMethod.js +19 -4
  468. package/dist/esm/api.v2/core/checkout/shippings/mutations/useMutateNomenclature.js +19 -14
  469. package/dist/esm/api.v2/core/checkout/shippings/queries/useFindNomenclatureElement.js +67 -56
  470. package/dist/esm/api.v2/core/checkout/types.js +4 -8
  471. package/dist/esm/api.v2/core/misc/promo-code/mutations/usePromoCodeMutation.js +22 -17
  472. package/dist/esm/api.v2/core/product/useSubscribeForSkuMutation.js +19 -4
  473. package/dist/esm/basket/api/mutations/index.js +1 -0
  474. package/dist/esm/basket/api/mutations/useChangeGiftVariant.js +106 -0
  475. package/dist/esm/basket/api/mutations/useReplaceBasketMutation.js +17 -13
  476. package/dist/esm/basket/hooks/index.js +1 -0
  477. package/dist/esm/basket/hooks/useChangeGiftVariant.js +3 -0
  478. package/dist/esm/brands/api/queries/keys.js +2 -4
  479. package/dist/esm/brands/api/queries/useAllBrandsQuery.js +91 -76
  480. package/dist/esm/build/api/query/fetchStore.js +25 -20
  481. package/dist/esm/checkout/api/keys.js +7 -3
  482. package/dist/esm/checkout/api/queries/index.js +1 -0
  483. package/dist/esm/checkout/api/queries/useUniCreditCalculateForCartQuery.js +50 -0
  484. package/dist/esm/checkout/contexts/BoricaResponseContext.js +1 -2
  485. package/dist/esm/checkout/contexts/PaypalResponseContext.js +1 -2
  486. package/dist/esm/checkout/contexts/UniCreditResponseContext.js +13 -0
  487. package/dist/esm/checkout/contexts/index.js +1 -0
  488. package/dist/esm/checkout/hooks/index.js +1 -0
  489. package/dist/esm/checkout/hooks/useBnpCalculateForCart.js +6 -10
  490. package/dist/esm/checkout/hooks/useUniCreditCalculateForCart.js +88 -0
  491. package/dist/esm/checkout/ssr/capturePaypalOrder.js +16 -11
  492. package/dist/esm/checkout/ssr/captureUniCreditOrder.js +47 -0
  493. package/dist/esm/checkout/ssr/index.js +1 -0
  494. package/dist/esm/checkout/ssr/verifyBoricaResponse.js +24 -19
  495. package/dist/esm/cms/api/mutations/useCMSFoldersCreateMutation.js +31 -29
  496. package/dist/esm/cms/api/mutations/useCMSMediaDeleteAssetsMutation.js +19 -14
  497. package/dist/esm/cms/api/mutations/useCMSMediaUploadAssetsMutation.js +22 -19
  498. package/dist/esm/cms/api/queries/keys.js +20 -14
  499. package/dist/esm/cms/api/queries/useCMSContentListQuery.js +4 -7
  500. package/dist/esm/cms/api/queries/useCMSMediaQuery.js +1 -2
  501. package/dist/esm/cms/api/queries/useInjectedContentQuery.js +4 -7
  502. package/dist/esm/cms/components/RenderInjectedContent.js +3 -7
  503. package/dist/esm/cms/hooks/useCmsContent.js +4 -8
  504. package/dist/esm/cms/hooks/useCmsContentList.js +7 -12
  505. package/dist/esm/cms/hooks/useCmsFolders.js +0 -1
  506. package/dist/esm/cms/hooks/useCmsMedia.js +0 -1
  507. package/dist/esm/cms/hooks/useCmsMediaDeleteAssets.js +0 -1
  508. package/dist/esm/cms/hooks/useCmsMediaUploadAssets.js +0 -1
  509. package/dist/esm/cms/hooks/useContentCategoriesMap.js +6 -13
  510. package/dist/esm/cms/hooks/useCreateCmsFolders.js +0 -1
  511. package/dist/esm/cms/hooks/useInjectedContentContext.js +4 -8
  512. package/dist/esm/cms/hooks/useListingInjectedContent.js +1 -2
  513. package/dist/esm/cms/ssr/fetchPagePaths.js +3 -3
  514. package/dist/esm/cms/ssr/prefetchCMSPage.js +34 -29
  515. package/dist/esm/cms/ssr/prefetchCmsContent.js +48 -43
  516. package/dist/esm/cms/ssr/prefetchCmsContentList.js +52 -50
  517. package/dist/esm/components/AnalyticsScripts/index.js +22 -6
  518. package/dist/esm/components/Drawer/index.js +3 -5
  519. package/dist/esm/components/FadeIn/index.js +27 -15
  520. package/dist/esm/components/GoogleOneTap/index.js +38 -18
  521. package/dist/esm/components/LazyResponsiveImage/index.js +23 -12
  522. package/dist/esm/components/Link/index.js +3 -6
  523. package/dist/esm/components/Portal/index.js +1 -2
  524. package/dist/esm/components/ProgressBar/index.js +19 -4
  525. package/dist/esm/config/SentecaProvider.js +7 -12
  526. package/dist/esm/contexts/CheckoutForm/Components/BoricaRedirect/index.js +19 -4
  527. package/dist/esm/contexts/CheckoutForm/Components/CheckoutCustomState/index.js +22 -10
  528. package/dist/esm/contexts/CheckoutForm/Components/UniCreditRedirect/index.js +61 -0
  529. package/dist/esm/contexts/CheckoutForm/Components/index.js +1 -0
  530. package/dist/esm/contexts/CheckoutForm/hooks/useBilling/index.js +52 -31
  531. package/dist/esm/contexts/CheckoutForm/hooks/usePayment/index.js +20 -6
  532. package/dist/esm/contexts/CheckoutForm/hooks/useSavedBillingList/index.js +2 -4
  533. package/dist/esm/contexts/CheckoutForm/hooks/useSavedShippingList/index.js +20 -15
  534. package/dist/esm/contexts/CheckoutForm/hooks/useShipping/index.js +102 -90
  535. package/dist/esm/contexts/CheckoutForm/hooks/useShippingInitialData/index.js +3 -7
  536. package/dist/esm/contexts/CheckoutForm/index.js +103 -60
  537. package/dist/esm/contexts/CheckoutForm/utils/updatedNestedObjectProps.js +16 -3
  538. package/dist/esm/contexts/CheckoutForm/utils/validateBillingAddress.js +6 -14
  539. package/dist/esm/contexts/CheckoutForm/utils/validateShipping.js +12 -23
  540. package/dist/esm/contexts/CustomProductProvider/index.js +22 -10
  541. package/dist/esm/contexts/Strings.js +32 -33
  542. package/dist/esm/hooks/addresses-hooks/useAddressForm/index.js +37 -48
  543. package/dist/esm/hooks/basket-hooks/useBasket/index.js +19 -4
  544. package/dist/esm/hooks/basket-hooks/useBasketCustom/index.js +19 -4
  545. package/dist/esm/hooks/basket-hooks/useBasketItemList/index.js +5 -10
  546. package/dist/esm/hooks/basket-hooks/useBasketItemWithErrorList/index.js +4 -8
  547. package/dist/esm/hooks/basket-hooks/useBasketLineItem/index.js +19 -4
  548. package/dist/esm/hooks/basket-hooks/useBasketLineItem/utils/index.js +4 -9
  549. package/dist/esm/hooks/checkout-hooks/useAllStockLocations.js +5 -10
  550. package/dist/esm/hooks/checkout-hooks/useShippingCourierMethods.js +41 -36
  551. package/dist/esm/hooks/cities-hooks/useCities/index.js +19 -4
  552. package/dist/esm/hooks/error-handling/useErrors/index.js +4 -9
  553. package/dist/esm/hooks/labels/useGlobalLabels/index.js +1 -2
  554. package/dist/esm/hooks/order-hooks/api/queries/useOrderGetPaymentMethodQuery.js +2 -4
  555. package/dist/esm/hooks/order-hooks/useGenericCourierAddress/index.js +103 -68
  556. package/dist/esm/hooks/order-hooks/useOrder/index.js +3 -11
  557. package/dist/esm/hooks/order-hooks/useOrderGetPaymentMethod/index.js +0 -1
  558. package/dist/esm/hooks/order-hooks/useOrderPaymentMethods/index.js +2 -4
  559. package/dist/esm/hooks/order-hooks/useOrdersList/index.js +2 -4
  560. package/dist/esm/hooks/order-hooks/usePayOrder/index.js +66 -58
  561. package/dist/esm/hooks/order-hooks/useUpdateOrderPaymentMethod/index.js +20 -7
  562. package/dist/esm/hooks/subscriptions-hooks/useAcceptOnRegister/index.js +21 -8
  563. package/dist/esm/hooks/subscriptions-hooks/useAllSubscriptions/index.js +32 -33
  564. package/dist/esm/hooks/subscriptions-hooks/useSubscribeForProduct/index.js +20 -6
  565. package/dist/esm/hooks/ui-hooks/useAccordion/index.js +19 -5
  566. package/dist/esm/hooks/ui-hooks/useBoolean/index.js +21 -6
  567. package/dist/esm/hooks/ui-hooks/useCallbackRef/index.js +19 -11
  568. package/dist/esm/hooks/ui-hooks/useClickOutside/index.js +2 -2
  569. package/dist/esm/hooks/ui-hooks/useIsIos/index.js +19 -4
  570. package/dist/esm/hooks/ui-hooks/useMenuAim/index.js +19 -4
  571. package/dist/esm/hooks/ui-hooks/usePagination/index.js +19 -14
  572. package/dist/esm/hooks/ui-hooks/useScrollDirection/index.js +21 -7
  573. package/dist/esm/hooks/ui-hooks/useScrollTo/index.js +26 -12
  574. package/dist/esm/hooks/ui-hooks/useSlideshow/index.js +21 -6
  575. package/dist/esm/hooks/ui-hooks/useToggleNavbarOnScroll/index.js +3 -3
  576. package/dist/esm/hooks/ui-hooks/useUI/index.js +34 -35
  577. package/dist/esm/hooks/ui-hooks/useWindowDimensions/index.js +19 -4
  578. package/dist/esm/hooks/useAddressList/index.js +2 -3
  579. package/dist/esm/hooks/useAggregateResult/index.js +7 -5
  580. package/dist/esm/hooks/useAvailability/index.js +27 -14
  581. package/dist/esm/hooks/useCarousel/component/index.js +12 -17
  582. package/dist/esm/hooks/useCarousel/helpers/eventStore.js +2 -2
  583. package/dist/esm/hooks/useCarousel/index.js +20 -6
  584. package/dist/esm/hooks/useCatalogResult/index.js +2 -2
  585. package/dist/esm/hooks/useCategoryTree/index.js +1 -2
  586. package/dist/esm/hooks/useCheckoutBillingAddress/index.js +75 -7
  587. package/dist/esm/hooks/useCheckoutDelivery/index.js +71 -58
  588. package/dist/esm/hooks/useCheckoutDiscountCode/index.js +19 -4
  589. package/dist/esm/hooks/useCheckoutPickupFromStore/index.js +21 -8
  590. package/dist/esm/hooks/useCheckoutShippingAddress/index.js +19 -4
  591. package/dist/esm/hooks/useCheckoutShippingModule/index.js +4 -6
  592. package/dist/esm/hooks/useCheckoutSubmit/index.js +98 -59
  593. package/dist/esm/hooks/useClearAllFilters/index.js +4 -4
  594. package/dist/esm/hooks/useContactForm/index.js +8 -4
  595. package/dist/esm/hooks/useCopyToClipboard/index.js +20 -4
  596. package/dist/esm/hooks/useForceUpdate/index.js +19 -4
  597. package/dist/esm/hooks/useLineItem/LineItemContext.js +75 -0
  598. package/dist/esm/hooks/useLineItem/index.js +21 -25
  599. package/dist/esm/hooks/useLocalRating/index.js +23 -10
  600. package/dist/esm/hooks/usePrefetchProduct/index.js +19 -4
  601. package/dist/esm/hooks/useProduct/index.js +23 -267
  602. package/dist/esm/hooks/useProduct/utils/index.js +75 -57
  603. package/dist/esm/hooks/useProductVariants/index.js +293 -0
  604. package/dist/esm/hooks/useProductVariants/types.js +1 -0
  605. package/dist/esm/hooks/useProgressBar/hooks/useGetSetState.js +4 -7
  606. package/dist/esm/hooks/useProgressBar/hooks/useUpdate.js +19 -4
  607. package/dist/esm/hooks/useProgressBar/index.js +23 -11
  608. package/dist/esm/hooks/usePromoCode/index.js +20 -6
  609. package/dist/esm/hooks/useSearchbar/index.js +86 -74
  610. package/dist/esm/hooks/useShippingAddress/index.js +2 -4
  611. package/dist/esm/hooks/useSizesReducer/index.js +24 -12
  612. package/dist/esm/hooks/useVouchers/index.js +1 -2
  613. package/dist/esm/hooks/useWallet/index.js +2 -4
  614. package/dist/esm/hooks/useZoom/index.js +20 -6
  615. package/dist/esm/hooks/user-hooks/useSubscribeToNewsletter/index.js +28 -7
  616. package/dist/esm/hooks/wishlist-hooks/useWishlist/index.js +20 -6
  617. package/dist/esm/hooks/wishlist-hooks/useWishlistItem/index.js +41 -19
  618. package/dist/esm/index.js +1 -3
  619. package/dist/esm/listing/api/keys.js +3 -5
  620. package/dist/esm/listing/api/queries/useAggregateQuery.js +6 -10
  621. package/dist/esm/listing/api/queries/useInfiniteListing.js +2 -4
  622. package/dist/esm/listing/api/queries/useLabelsQuery.js +19 -10
  623. package/dist/esm/listing/api/queries/useListingQuery.js +26 -9
  624. package/dist/esm/listing/api/queries/usePredicate.js +34 -22
  625. package/dist/esm/listing/components/BasicListingSEO.js +24 -8
  626. package/dist/esm/listing/hooks/useListingBreadcrumbs.js +33 -14
  627. package/dist/esm/listing/hooks/useListingCategories.js +20 -13
  628. package/dist/esm/listing/hooks/useListingConfig.js +2 -4
  629. package/dist/esm/listing/hooks/useListingFilters.js +45 -27
  630. package/dist/esm/listing/hooks/useListingMeta.js +68 -51
  631. package/dist/esm/listing/hooks/useListingPagination.js +3 -6
  632. package/dist/esm/listing/hooks/useSlideFilter.js +46 -8
  633. package/dist/esm/listing/hooks/useSort.js +3 -6
  634. package/dist/esm/listing/ssr/prefetchCategories.js +6 -7
  635. package/dist/esm/listing/ssr/prefetchListing.js +2 -1
  636. package/dist/esm/listing/ssr/prefetchPredicate.js +4 -4
  637. package/dist/esm/listing/types.js +10 -20
  638. package/dist/esm/listing/utils/buildCategoryQuery.js +30 -11
  639. package/dist/esm/listing/utils/buildFilterQuery.js +27 -22
  640. package/dist/esm/listing/utils/extendFilter.js +19 -4
  641. package/dist/esm/listing/utils/getListingAlias.js +21 -8
  642. package/dist/esm/listing/utils/getListingPageType.js +2 -4
  643. package/dist/esm/navigation/components/SearchBox/Components/EmptyBox/index.js +7 -7
  644. package/dist/esm/navigation/components/SearchBox/Components/Products/Components/ProductCard/index.js +1 -2
  645. package/dist/esm/navigation/components/SearchBox/Components/Suggestions/Utils/ScrollView.js +4 -8
  646. package/dist/esm/navigation/components/SearchBox/index.js +7 -8
  647. package/dist/esm/navigation/keys.js +2 -4
  648. package/dist/esm/navigation/mutations/useSearchHistoryMutation.js +20 -16
  649. package/dist/esm/navigation/types.js +2 -4
  650. package/dist/esm/order/api/index.js +1 -0
  651. package/dist/esm/order/api/queries/prefetchOrder.js +24 -19
  652. package/dist/esm/order/api/utils/getOrderById.js +2 -0
  653. package/dist/esm/order/api/utils/index.js +1 -0
  654. package/dist/esm/postcss/tailwind/buttons-plugin.js +20 -16
  655. package/dist/esm/postcss/tailwind/default-plugin.js +2 -4
  656. package/dist/esm/postcss/tailwind/fonts-plugin.js +21 -18
  657. package/dist/esm/postcss/tailwind/forms-plugin.js +6 -9
  658. package/dist/esm/postcss/tailwind/utils.js +4 -6
  659. package/dist/esm/postcss/types.js +4 -8
  660. package/dist/esm/product/api/keys.js +6 -0
  661. package/dist/esm/product/api/queries/index.js +1 -0
  662. package/dist/esm/product/api/queries/useUniCreditOffersQuery.js +53 -0
  663. package/dist/esm/product/api/ssr/index.js +44 -40
  664. package/dist/esm/product/hooks/index.js +1 -0
  665. package/dist/esm/product/hooks/useBnpOffers.js +3 -6
  666. package/dist/esm/product/hooks/useUniCreditOffers.js +81 -0
  667. package/dist/esm/seo/api/ssr/fetchRedirectByFrom.js +19 -14
  668. package/dist/esm/seo/api/ssr/fetchSitemaps.js +22 -17
  669. package/dist/esm/seo/api/ssr/getCanonicalUrl.js +19 -4
  670. package/dist/esm/seo/components/HiddenBreadcrumb/index.js +1 -2
  671. package/dist/esm/seo/components/ProductSEO/index.js +3 -5
  672. package/dist/esm/seo/components/TranslationsMeta/index.js +49 -0
  673. package/dist/esm/seo/components/index.js +1 -0
  674. package/dist/esm/seo/hooks/index.js +1 -0
  675. package/dist/esm/seo/hooks/useSEOBreadcrumb.js +17 -9
  676. package/dist/esm/seo/hooks/useSeoTranslations.js +79 -0
  677. package/dist/esm/seo/utils/handleRobots.js +4 -4
  678. package/dist/esm/ssr/emptyBasketGuard.js +2 -2
  679. package/dist/esm/ui/components/GridStyles.js +26 -0
  680. package/dist/esm/ui/components/LazyImage.js +6 -12
  681. package/dist/esm/ui/components/RangeSliderInput.js +36 -11
  682. package/dist/esm/ui/components/index.js +1 -0
  683. package/dist/esm/ui/hooks/index.js +1 -0
  684. package/dist/esm/ui/hooks/useToasts.js +154 -0
  685. package/dist/esm/ui/index.js +1 -0
  686. package/dist/esm/ui/toastUtils/ErrorIcon.js +15 -0
  687. package/dist/esm/ui/toastUtils/InfoIcon.js +15 -0
  688. package/dist/esm/ui/toastUtils/SuccessIcon.js +15 -0
  689. package/dist/esm/ui/toastUtils/WarningIcon.js +15 -0
  690. package/dist/esm/ui/toastUtils/index.js +5 -0
  691. package/dist/esm/ui/toastUtils/utils.js +67 -0
  692. package/dist/esm/user/api/mutations/useLoginMutation.js +2 -5
  693. package/dist/esm/user/api/mutations/useLogoutMutation.js +3 -6
  694. package/dist/esm/user/api/mutations/useRegisterMutation.js +24 -24
  695. package/dist/esm/user/api/mutations/useRequestResetPasswordTokenMutation.js +1 -2
  696. package/dist/esm/user/api/mutations/useResetPasswordMutation.js +1 -2
  697. package/dist/esm/user/api/queries/useGetMyLoyaltyCardQuery.js +44 -3
  698. package/dist/esm/user/api/queries/useIsAuthenticatedQuery.js +2 -4
  699. package/dist/esm/user/api/utils/generateAnonymousToken.js +25 -21
  700. package/dist/esm/user/api/utils/processLoginPayload.js +2 -2
  701. package/dist/esm/user/hooks/useConfirmEmail.js +20 -6
  702. package/dist/esm/user/hooks/useLoginApple.js +2 -4
  703. package/dist/esm/user/hooks/useLoginFacebook.js +2 -4
  704. package/dist/esm/user/hooks/useLoginGoogle.js +2 -4
  705. package/dist/esm/user/hooks/useRequestEmailConfirmation.js +20 -6
  706. package/dist/esm/user/index.js +0 -1
  707. package/dist/esm/utils/assetsToMap.js +3 -7
  708. package/dist/esm/utils/createAggregateQuery.js +4 -6
  709. package/dist/esm/utils/customFieldsToMap.js +3 -8
  710. package/dist/esm/utils/generateQueryFromRouter.js +5 -12
  711. package/dist/esm/utils/getLocaleFromPath.js +8 -0
  712. package/dist/esm/utils/getPagination.js +5 -11
  713. package/dist/esm/utils/getSelectedFilters.js +25 -11
  714. package/dist/esm/utils/index.js +1 -0
  715. package/dist/esm/utils/isColorBright.js +2 -2
  716. package/dist/esm/utils/isTouchDevice.js +2 -1
  717. package/dist/esm/utils/localStorage.js +7 -2
  718. package/dist/esm/utils/queryObjToString.js +3 -7
  719. package/dist/esm/utils/sortAncestors.js +18 -11
  720. package/dist/esm/utils/tokens.js +19 -4
  721. package/dist/esm/utils/validations.js +2 -2
  722. package/dist/esm/webview/hooks/useIsInWebview.js +21 -6
  723. package/dist/esm/webview/utils/sendMessage.js +2 -4
  724. package/dist/esm/wishlist/api/queries/keys.js +2 -4
  725. package/dist/esm/wishlist/api/queries/useWishlistItemsQuery.js +4 -7
  726. package/dist/esm/wishlist/hooks/useWishlistItems.js +2 -3
  727. package/dist/types/analytics/Pixel/hooks/index.d.ts +3 -0
  728. package/dist/types/analytics/Pixel/hooks/usePixelFinishOrder.d.ts +4 -0
  729. package/dist/types/analytics/Pixel/hooks/usePixelViewBasket.d.ts +4 -0
  730. package/dist/types/analytics/Pixel/hooks/usePixelViewCategory.d.ts +7 -0
  731. package/dist/types/analytics/Pixel/types.d.ts +10 -1
  732. package/dist/types/analytics/Pixel/utils.d.ts +3 -0
  733. package/dist/types/analytics/Releva/hooks/useRelevaOnListingPage.d.ts +1 -1
  734. package/dist/types/analytics/Releva/types.d.ts +1 -1
  735. package/dist/types/analytics/Releva/utils.d.ts +1 -1
  736. package/dist/types/analytics/addToCart.d.ts +1 -1
  737. package/dist/types/analytics/initiateCheckout.d.ts +1 -1
  738. package/dist/types/analytics/purchase.d.ts +1 -1
  739. package/dist/types/api/addressesApi/index.d.ts +1 -1
  740. package/dist/types/api/brandsApi/index.d.ts +1 -1
  741. package/dist/types/api/catalogApi/index.d.ts +1 -1
  742. package/dist/types/api/categoriesApi/index.d.ts +1 -1
  743. package/dist/types/api/citiesApi/index.d.ts +1 -1
  744. package/dist/types/api/companiesApi/index.d.ts +1 -1
  745. package/dist/types/basket/api/mutations/index.d.ts +1 -0
  746. package/dist/types/basket/api/mutations/useChangeGiftVariant.d.ts +2 -0
  747. package/dist/types/basket/api/mutations/useReplaceBasketMutation.d.ts +1 -1
  748. package/dist/types/basket/hooks/index.d.ts +1 -0
  749. package/dist/types/basket/hooks/useChangeGiftVariant.d.ts +2 -0
  750. package/dist/types/checkout/api/keys.d.ts +1 -0
  751. package/dist/types/checkout/api/queries/index.d.ts +1 -0
  752. package/dist/types/checkout/api/queries/useBnpCalculateForCartQuery.d.ts +1 -1
  753. package/dist/types/checkout/api/queries/useUniCreditCalculateForCartQuery.d.ts +3 -0
  754. package/dist/types/checkout/contexts/UniCreditResponseContext.d.ts +6 -0
  755. package/dist/types/checkout/contexts/index.d.ts +1 -0
  756. package/dist/types/checkout/hooks/index.d.ts +1 -0
  757. package/dist/types/checkout/hooks/useBnpCalculateForCart.d.ts +4 -3
  758. package/dist/types/checkout/hooks/useUniCreditCalculateForCart.d.ts +41 -0
  759. package/dist/types/checkout/ssr/captureUniCreditOrder.d.ts +2 -0
  760. package/dist/types/checkout/ssr/index.d.ts +1 -0
  761. package/dist/types/cms/api/mutations/useCMSMediaUploadAssetsMutation.d.ts +1 -3
  762. package/dist/types/components/Portal/index.d.ts +2 -2
  763. package/dist/types/contexts/CheckoutForm/Components/UniCreditRedirect/index.d.ts +5 -0
  764. package/dist/types/contexts/CheckoutForm/Components/index.d.ts +1 -0
  765. package/dist/types/contexts/CheckoutForm/hooks/useBilling/index.d.ts +3 -1
  766. package/dist/types/contexts/CheckoutForm/hooks/usePayment/index.d.ts +2 -2
  767. package/dist/types/contexts/CheckoutForm/hooks/useShipping/index.d.ts +1 -1
  768. package/dist/types/contexts/CheckoutForm/index.d.ts +2 -1
  769. package/dist/types/hooks/basket-hooks/useBasketLineItem/index.d.ts +1 -2
  770. package/dist/types/hooks/order-hooks/useOrder/index.d.ts +3 -2
  771. package/dist/types/hooks/order-hooks/useOrderPaymentMethods/index.d.ts +4 -4
  772. package/dist/types/hooks/useCarousel/index.d.ts +2 -2
  773. package/dist/types/hooks/useCheckoutBillingAddress/index.d.ts +2 -0
  774. package/dist/types/hooks/useCheckoutSubmit/index.d.ts +3 -2
  775. package/dist/types/hooks/useContactForm/index.d.ts +2 -1
  776. package/dist/types/hooks/useLineItem/LineItemContext.d.ts +22 -0
  777. package/dist/types/hooks/useLineItem/index.d.ts +3 -3
  778. package/dist/types/hooks/useProduct/index.d.ts +5 -78
  779. package/dist/types/hooks/useProduct/utils/index.d.ts +6 -4
  780. package/dist/types/hooks/useProductVariants/index.d.ts +34 -0
  781. package/dist/types/hooks/useProductVariants/types.d.ts +79 -0
  782. package/dist/types/hooks/useSearchbar/index.d.ts +1 -0
  783. package/dist/types/hooks/useVouchers/index.d.ts +2 -2
  784. package/dist/types/hooks/useZoom/index.d.ts +2 -2
  785. package/dist/types/hooks/wishlist-hooks/useWishlist/index.d.ts +1 -2
  786. package/dist/types/index.d.ts +1 -3
  787. package/dist/types/listing/api/queries/useListingQuery.d.ts +2 -1
  788. package/dist/types/listing/components/BasicListingSEO.d.ts +3 -1
  789. package/dist/types/listing/hooks/useListingMeta.d.ts +4 -0
  790. package/dist/types/listing/hooks/useSlideFilter.d.ts +4 -0
  791. package/dist/types/listing/types.d.ts +14 -2
  792. package/dist/types/navigation/components/SearchBox/Components/EmptyBox/index.d.ts +5 -4
  793. package/dist/types/navigation/components/SearchBox/index.d.ts +7 -6
  794. package/dist/types/order/api/index.d.ts +1 -0
  795. package/dist/types/order/api/utils/getOrderById.d.ts +2 -0
  796. package/dist/types/order/api/utils/index.d.ts +1 -0
  797. package/dist/types/product/api/keys.d.ts +1 -0
  798. package/dist/types/product/api/queries/index.d.ts +1 -0
  799. package/dist/types/product/api/queries/useBnpOffersQuery.d.ts +1 -1
  800. package/dist/types/product/api/queries/useUniCreditOffersQuery.d.ts +4 -0
  801. package/dist/types/product/hooks/index.d.ts +1 -0
  802. package/dist/types/product/hooks/useBnpOffers.d.ts +2 -2
  803. package/dist/types/product/hooks/useUniCreditOffers.d.ts +36 -0
  804. package/dist/types/seo/components/TranslationsMeta/index.d.ts +1 -0
  805. package/dist/types/seo/components/index.d.ts +1 -0
  806. package/dist/types/seo/hooks/index.d.ts +1 -0
  807. package/dist/types/seo/hooks/useSeoTranslations.d.ts +24 -0
  808. package/dist/types/ui/components/GridStyles.d.ts +11 -0
  809. package/dist/types/ui/components/RangeSliderInput.d.ts +2 -1
  810. package/dist/types/ui/components/index.d.ts +1 -0
  811. package/dist/types/ui/hooks/index.d.ts +1 -0
  812. package/dist/types/ui/hooks/useToasts.d.ts +20 -0
  813. package/dist/types/ui/index.d.ts +1 -0
  814. package/dist/types/ui/toastUtils/ErrorIcon.d.ts +1 -0
  815. package/dist/types/ui/toastUtils/InfoIcon.d.ts +1 -0
  816. package/dist/types/ui/toastUtils/SuccessIcon.d.ts +1 -0
  817. package/dist/types/ui/toastUtils/WarningIcon.d.ts +1 -0
  818. package/dist/types/ui/toastUtils/index.d.ts +5 -0
  819. package/dist/types/ui/toastUtils/utils.d.ts +11 -0
  820. package/dist/types/user/index.d.ts +0 -1
  821. package/dist/types/utils/getLocaleFromPath.d.ts +1 -0
  822. package/dist/types/utils/index.d.ts +1 -0
  823. package/package.json +13 -14
  824. package/dist/cjs/dto/index.js +0 -34
  825. package/dist/esm/dto/index.js +0 -1
  826. package/dist/esm/user/types/index.js +0 -1
  827. package/dist/types/dto/index.d.ts +0 -2
  828. package/dist/types/user/types/index.d.ts +0 -1
@@ -7,6 +7,11 @@ import { useListingSlug } from './useListingSlug';
7
7
  import { stripQueryProps } from '../../utils/generateQueryFromRouter';
8
8
  import { typeToSuffix } from '../../utils/typeToSuffix';
9
9
  import { getSelectedFilters } from '../../utils';
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
  }
@@ -24,12 +29,14 @@ function _defineProperty(obj, key, value) {
24
29
  return obj;
25
30
  }
26
31
  function _iterableToArrayLimit(arr, i) {
32
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
33
+ if (_i == null) return;
27
34
  var _arr = [];
28
35
  var _n = true;
29
36
  var _d = false;
30
- var _e = undefined;
37
+ var _s, _e;
31
38
  try {
32
- for(var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true){
39
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
33
40
  _arr.push(_s.value);
34
41
  if (i && _arr.length === i) break;
35
42
  }
@@ -46,12 +53,11 @@ function _iterableToArrayLimit(arr, i) {
46
53
  return _arr;
47
54
  }
48
55
  function _nonIterableRest() {
49
- throw new TypeError("Invalid attempt to destructure non-iterable instance");
56
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
50
57
  }
51
58
  function _objectSpread(target) {
52
59
  for(var i = 1; i < arguments.length; i++){
53
- var source = arguments[i] != null ? arguments[i] : {
54
- };
60
+ var source = arguments[i] != null ? arguments[i] : {};
55
61
  var ownKeys = Object.keys(source);
56
62
  if (typeof Object.getOwnPropertySymbols === "function") {
57
63
  ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
@@ -65,12 +71,20 @@ function _objectSpread(target) {
65
71
  return target;
66
72
  }
67
73
  function _slicedToArray(arr, i) {
68
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
74
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
75
+ }
76
+ function _unsupportedIterableToArray(o, minLen) {
77
+ if (!o) return;
78
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
79
+ var n = Object.prototype.toString.call(o).slice(8, -1);
80
+ if (n === "Object" && o.constructor) n = o.constructor.name;
81
+ if (n === "Map" || n === "Set") return Array.from(n);
82
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
69
83
  }
70
84
  var ListingFiltersStateContext = /*#__PURE__*/ React.createContext(undefined);
71
85
  export function ListingFiltersProvider(param) {
72
86
  var children = param.children;
73
- var ref3 = useListingConfig(), aggregates = ref3.aggregates, pageType = ref3.type, attributeSortType = ref3.attributeSortType, meta = ref3.meta;
87
+ var ref5 = useListingConfig(), aggregates = ref5.aggregates, pageType = ref5.type, attributeSortType = ref5.attributeSortType, meta = ref5.meta;
74
88
  var ref1 = useAggregateQuery(aggregates, AggregateRequestEnum.Filters, attributeSortType), aggData = ref1.data, isLoading = ref1.isLoading, isFetching = ref1.isFetching;
75
89
  var router = useRouter();
76
90
  var slug = useListingSlug();
@@ -79,19 +93,20 @@ export function ListingFiltersProvider(param) {
79
93
  var result = aggregates === null || aggregates === void 0 ? void 0 : aggregates.sort(function(a, b) {
80
94
  return Number(a.order) - Number(b.order);
81
95
  }).map(function(currentAggregate) {
82
- var ref, ref2;
96
+ var ref, ref2, ref3;
83
97
  var type = (currentAggregate === null || currentAggregate === void 0 ? void 0 : (ref = currentAggregate.aggregationType) === null || ref === void 0 ? void 0 : ref.toString()) || '';
84
98
  var term = (currentAggregate === null || currentAggregate === void 0 ? void 0 : (ref2 = currentAggregate.aggregationDefinition) === null || ref2 === void 0 ? void 0 : ref2.split(':')[0]) || '';
85
99
  var filter = (currentAggregate === null || currentAggregate === void 0 ? void 0 : currentAggregate.filterDefinition) || '';
86
100
  var current = aggData[type].find(function(agg) {
87
101
  return agg.name === term;
88
102
  });
103
+ var ref4;
89
104
  var generatedFilters = generateFilters({
90
105
  rawFilters: current,
91
106
  filter: filter,
92
107
  router: router,
93
108
  type: type,
94
- slug: slug,
109
+ slug: (ref4 = (ref3 = meta.slugAliases) === null || ref3 === void 0 ? void 0 : ref3[slug]) !== null && ref4 !== void 0 ? ref4 : slug,
95
110
  pageType: pageType
96
111
  });
97
112
  var selectedCount = generatedFilters === null || generatedFilters === void 0 ? void 0 : generatedFilters.reduce(function(count, res) {
@@ -107,10 +122,11 @@ export function ListingFiltersProvider(param) {
107
122
  clearAll: function() {
108
123
  return router.push({
109
124
  pathname: router.pathname,
110
- query: _objectSpread({
111
- }, router.query, {
125
+ query: _objectSpread({}, router.query, {
112
126
  filter: filterByType(router.query.filter, filter)
113
127
  })
128
+ }, undefined, {
129
+ shallow: true
114
130
  });
115
131
  },
116
132
  type: type
@@ -125,12 +141,13 @@ export function ListingFiltersProvider(param) {
125
141
  router
126
142
  ]);
127
143
  var clearAllFilters = function() {
128
- var query = _objectSpread({
129
- }, router.query);
144
+ var query = _objectSpread({}, router.query);
130
145
  delete query.filter;
131
146
  router.push({
132
147
  pathname: router.pathname,
133
148
  query: query
149
+ }, undefined, {
150
+ shallow: true
134
151
  });
135
152
  };
136
153
  var selectedFilters = React.useMemo(function() {
@@ -158,10 +175,10 @@ export function useListingFilters() {
158
175
  }
159
176
  function generateFilters(param) {
160
177
  var rawFilters = param.rawFilters, type = param.type, filter = param.filter, slug = param.slug, router = param.router, pageType = param.pageType;
161
- var ref, ref4;
162
- return (ref4 = (ref = rawFilters.results) === null || ref === void 0 ? void 0 : ref.filter(function(res) {
178
+ var ref, ref6;
179
+ return (ref6 = (ref = rawFilters.results) === null || ref === void 0 ? void 0 : ref.filter(function(res) {
163
180
  return res.count > 0;
164
- })) === null || ref4 === void 0 ? void 0 : ref4.map(function(currentTerm) {
181
+ })) === null || ref6 === void 0 ? void 0 : ref6.map(function(currentTerm) {
165
182
  var filterKey = mapKey(currentTerm, type);
166
183
  var selected = isFilterSelected(router, filter, filterKey, filtersOperatorsMap[type]);
167
184
  return {
@@ -173,17 +190,19 @@ function generateFilters(param) {
173
190
  aggType: filter,
174
191
  aggKey: filterKey,
175
192
  aggOperator: filtersOperatorsMap[type]
176
- }, Boolean(selected), router));
193
+ }, Boolean(selected), router), undefined, {
194
+ shallow: true
195
+ });
177
196
  }
178
197
  };
179
198
  });
180
199
  }
181
200
  var isFilterSelected = function(router, filter, filterKey, type) {
182
- var ref, ref5, ref6, ref7, ref8;
201
+ var ref, ref7, ref8, ref9, ref10;
183
202
  var areFiltersArray = Array.isArray((ref = router.query) === null || ref === void 0 ? void 0 : ref.filter);
184
- return areFiltersArray ? !!((ref6 = (ref5 = router.query.filter) === null || ref5 === void 0 ? void 0 : ref5.find(function(sel) {
203
+ return areFiltersArray ? !!((ref8 = (ref7 = router.query.filter) === null || ref7 === void 0 ? void 0 : ref7.find(function(sel) {
185
204
  return sel.includes("".concat(filter, ";").concat(type));
186
- })) === null || ref6 === void 0 ? void 0 : ref6.includes(filterKey)) : ((ref7 = router.query.filter) === null || ref7 === void 0 ? void 0 : ref7.includes("".concat(filter, ";").concat(type))) && ((ref8 = router.query.filter) === null || ref8 === void 0 ? void 0 : ref8.includes(filterKey));
205
+ })) === null || ref8 === void 0 ? void 0 : ref8.includes(filterKey)) : ((ref9 = router.query.filter) === null || ref9 === void 0 ? void 0 : ref9.includes("".concat(filter, ";").concat(type))) && ((ref10 = router.query.filter) === null || ref10 === void 0 ? void 0 : ref10.includes(filterKey));
187
206
  };
188
207
  export var filtersOperatorsMap = {
189
208
  ranges: 'range',
@@ -207,17 +226,16 @@ function manageFilter(pair, query, remove) {
207
226
  return result;
208
227
  }
209
228
  var generateQueryString = function(query, pair, remove) {
210
- var activeFilters = {
211
- };
229
+ var activeFilters = {};
212
230
  var extractFilter = function(param) {
213
231
  var _str = param.str, str = _str === void 0 ? '' : _str, aggPair = param.aggPair;
214
232
  var ref = _slicedToArray(str.split(';'), 3), type = ref[0], operator = ref[1], val = ref[2];
215
- var ref9;
216
- var filterType = (ref9 = aggPair === null || aggPair === void 0 ? void 0 : aggPair.aggType) !== null && ref9 !== void 0 ? ref9 : type;
217
- var ref10;
218
- var filterVal = (ref10 = aggPair === null || aggPair === void 0 ? void 0 : aggPair.aggKey) !== null && ref10 !== void 0 ? ref10 : val;
219
233
  var ref11;
220
- var filterOperator = (ref11 = aggPair === null || aggPair === void 0 ? void 0 : aggPair.aggOperator) !== null && ref11 !== void 0 ? ref11 : operator;
234
+ var filterType = (ref11 = aggPair === null || aggPair === void 0 ? void 0 : aggPair.aggType) !== null && ref11 !== void 0 ? ref11 : type;
235
+ var ref12;
236
+ var filterVal = (ref12 = aggPair === null || aggPair === void 0 ? void 0 : aggPair.aggKey) !== null && ref12 !== void 0 ? ref12 : val;
237
+ var ref13;
238
+ var filterOperator = (ref13 = aggPair === null || aggPair === void 0 ? void 0 : aggPair.aggOperator) !== null && ref13 !== void 0 ? ref13 : operator;
221
239
  if (activeFilters[filterType]) {
222
240
  activeFilters[filterType] += ",".concat(filterVal);
223
241
  } else {
@@ -4,27 +4,61 @@ import { customFieldsToMap, escape, getTranslatableField } from '../../utils';
4
4
  import { assetsFieldsToMap } from '../../utils/assetsToMap';
5
5
  import { useRouter } from 'next/router';
6
6
  import { getListingPageType } from '../utils';
7
- import { ListingTypesEnum } from '../types';
8
7
  import { useListingAlias } from '../../index';
9
8
  import { useListingFilters } from './useListingFilters';
10
9
  import { useListingCategories } from './useListingCategories';
11
10
  import { useListingConfig } from '.';
11
+ function _arrayLikeToArray(arr, len) {
12
+ if (len == null || len > arr.length) len = arr.length;
13
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
14
+ return arr2;
15
+ }
12
16
  function _arrayWithoutHoles(arr) {
13
- if (Array.isArray(arr)) {
14
- for(var i = 0, arr2 = new Array(arr.length); i < arr.length; i++){
15
- arr2[i] = arr[i];
16
- }
17
- return arr2;
18
- }
17
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
19
18
  }
20
19
  function _iterableToArray(iter) {
21
- if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
20
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
22
21
  }
23
22
  function _nonIterableSpread() {
24
- throw new TypeError("Invalid attempt to spread non-iterable instance");
23
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
24
+ }
25
+ function _objectWithoutProperties(source, excluded) {
26
+ if (source == null) return {};
27
+ var target = _objectWithoutPropertiesLoose(source, excluded);
28
+ var key, i;
29
+ if (Object.getOwnPropertySymbols) {
30
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
31
+ for(i = 0; i < sourceSymbolKeys.length; i++){
32
+ key = sourceSymbolKeys[i];
33
+ if (excluded.indexOf(key) >= 0) continue;
34
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
35
+ target[key] = source[key];
36
+ }
37
+ }
38
+ return target;
39
+ }
40
+ function _objectWithoutPropertiesLoose(source, excluded) {
41
+ if (source == null) return {};
42
+ var target = {};
43
+ var sourceKeys = Object.keys(source);
44
+ var key, i;
45
+ for(i = 0; i < sourceKeys.length; i++){
46
+ key = sourceKeys[i];
47
+ if (excluded.indexOf(key) >= 0) continue;
48
+ target[key] = source[key];
49
+ }
50
+ return target;
25
51
  }
26
52
  function _toConsumableArray(arr) {
27
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
53
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
54
+ }
55
+ function _unsupportedIterableToArray(o, minLen) {
56
+ if (!o) return;
57
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
58
+ var n = Object.prototype.toString.call(o).slice(8, -1);
59
+ if (n === "Object" && o.constructor) n = o.constructor.name;
60
+ if (n === "Map" || n === "Set") return Array.from(n);
61
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
28
62
  }
29
63
  export var useListingMeta = function() {
30
64
  var router = useRouter();
@@ -72,76 +106,59 @@ export var useListingMeta = function() {
72
106
  return result;
73
107
  };
74
108
  function processDisplayName(slug, config, name, breadcrumb, router, aggData, categoriesData) {
109
+ var ref, ref5, ref6;
75
110
  var listingName = getTranslatableField(name);
76
111
  var brandName = getBrandName(router, aggData);
77
112
  var categoryName = getCategoryName(router, categoriesData);
78
113
  var type = getListingPageType(router, slug, config);
79
- if (type === ListingTypesEnum.AttrPage) {
80
- return "Всичко за ".concat(config.titleAliases[slug]);
81
- }
82
- if (router === null || router === void 0 ? void 0 : router.query.cat) {
83
- var attribute = getTranslatableField(breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.label);
84
- if (type === ListingTypesEnum.Category) {
85
- if (!brandName) {
86
- return "".concat(listingName, " за ").concat(attribute);
87
- }
88
- return "".concat(listingName, " за ").concat(attribute, " от ").concat(brandName);
89
- }
90
- if (type === ListingTypesEnum.Brand) {
91
- if (!categoryName) {
92
- return "Всички продукти от ".concat(listingName, " за ").concat(attribute);
93
- }
94
- return "".concat(categoryName, " от ").concat(listingName, " за ").concat(attribute);
95
- }
96
- }
97
- if (type === ListingTypesEnum.Category && brandName) {
98
- return "".concat(listingName, " от ").concat(brandName);
99
- }
100
- if (type === ListingTypesEnum.Brand) {
101
- if (!categoryName) {
102
- return "Всички продукти от ".concat(listingName);
103
- }
104
- return "".concat(categoryName, " от ").concat(listingName);
105
- }
106
- if (type === ListingTypesEnum.Search && (router === null || router === void 0 ? void 0 : router.query.search)) {
107
- return "".concat(listingName, " от \"").concat(router.query.search, "\"");
108
- }
109
- return listingName;
114
+ var getTitle = config.getTitle, rest = _objectWithoutProperties(config, [
115
+ "getTitle"
116
+ ]);
117
+ var title = getTitle === null || getTitle === void 0 ? void 0 : getTitle(type, rest, {
118
+ category: categoryName,
119
+ brand: brandName,
120
+ defaultName: listingName,
121
+ attribute: (ref = config.titleAliases) === null || ref === void 0 ? void 0 : ref[slug],
122
+ childAttribute: getTranslatableField(breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.label),
123
+ search: (router === null || router === void 0 ? void 0 : (ref5 = router.query) === null || ref5 === void 0 ? void 0 : ref5.q) || (router === null || router === void 0 ? void 0 : (ref6 = router.query) === null || ref6 === void 0 ? void 0 : ref6.search),
124
+ isWithAttribute: Boolean(router === null || router === void 0 ? void 0 : router.query.cat)
125
+ });
126
+ return title || listingName;
110
127
  }
111
- function getFilterByType(filterType, router) {
128
+ export function getFilterByType(filterType, router) {
112
129
  var filterId = '';
113
130
  if (Array.isArray(router === null || router === void 0 ? void 0 : router.query.filter)) {
114
- var ref, ref5;
131
+ var ref, ref7;
115
132
  var filters = (ref = router === null || router === void 0 ? void 0 : router.query.filter) === null || ref === void 0 ? void 0 : ref.filter(function(x) {
116
133
  return x === null || x === void 0 ? void 0 : x.includes(filterType);
117
134
  });
118
135
  if ((filters === null || filters === void 0 ? void 0 : filters.length) && filters.length > 1) {
119
136
  return '';
120
137
  }
121
- var filterTerm = (ref5 = /\d+/.exec((filters === null || filters === void 0 ? void 0 : filters[0]) || '')) === null || ref5 === void 0 ? void 0 : ref5[0];
138
+ var filterTerm = (ref7 = /\d+/.exec((filters === null || filters === void 0 ? void 0 : filters[0]) || '')) === null || ref7 === void 0 ? void 0 : ref7[0];
122
139
  if (!filterTerm) return '';
123
140
  filterId = filterTerm;
124
141
  } else {
125
- var ref6, ref7, ref8;
126
- var isFiltered = router === null || router === void 0 ? void 0 : (ref6 = router.query) === null || ref6 === void 0 ? void 0 : (ref7 = ref6.filter) === null || ref7 === void 0 ? void 0 : ref7.includes(filterType);
142
+ var ref8, ref9, ref10;
143
+ var isFiltered = router === null || router === void 0 ? void 0 : (ref8 = router.query) === null || ref8 === void 0 ? void 0 : (ref9 = ref8.filter) === null || ref9 === void 0 ? void 0 : ref9.includes(filterType);
127
144
  if (!isFiltered) {
128
145
  return '';
129
146
  }
130
- filterId = (ref8 = /(\w+)-(\d+)/.exec(router === null || router === void 0 ? void 0 : router.query.filter)) === null || ref8 === void 0 ? void 0 : ref8[0];
147
+ filterId = (ref10 = /(\w+)-(\d+)/.exec(router === null || router === void 0 ? void 0 : router.query.filter)) === null || ref10 === void 0 ? void 0 : ref10[0];
131
148
  }
132
149
  return filterId;
133
150
  }
134
151
  function getBrandName(router, filtersData) {
135
- var ref, ref9, ref10;
152
+ var ref, ref11, ref12;
136
153
  var brandId = getFilterByType('brand', router);
137
154
  var brand = (ref = filtersData === null || filtersData === void 0 ? void 0 : filtersData.find(function(x) {
138
155
  return x.name === 'Brands';
139
- })) === null || ref === void 0 ? void 0 : (ref9 = ref.items) === null || ref9 === void 0 ? void 0 : ref9.find(function(x) {
156
+ })) === null || ref === void 0 ? void 0 : (ref11 = ref.items) === null || ref11 === void 0 ? void 0 : ref11.find(function(x) {
140
157
  return x.data.key === brandId;
141
158
  });
142
- return getTranslatableField(brand === null || brand === void 0 ? void 0 : (ref10 = brand.meta) === null || ref10 === void 0 ? void 0 : ref10.name);
159
+ return getTranslatableField(brand === null || brand === void 0 ? void 0 : (ref12 = brand.meta) === null || ref12 === void 0 ? void 0 : ref12.name);
143
160
  }
144
- function getCategoryName(router, categories) {
161
+ export function getCategoryName(router, categories) {
145
162
  var categoryId = getFilterByType('category', router);
146
163
  if (!categoryId || !categories) return;
147
164
  var stack = _toConsumableArray(categories);
@@ -19,8 +19,7 @@ function _defineProperty(obj, key, value) {
19
19
  }
20
20
  function _objectSpread(target) {
21
21
  for(var i = 1; i < arguments.length; i++){
22
- var source = arguments[i] != null ? arguments[i] : {
23
- };
22
+ var source = arguments[i] != null ? arguments[i] : {};
24
23
  var ownKeys = Object.keys(source);
25
24
  if (typeof Object.getOwnPropertySymbols === "function") {
26
25
  ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
@@ -53,14 +52,12 @@ export var useListingPagination = function() {
53
52
  router,
54
53
  slug
55
54
  ]);
56
- return _objectSpread({
57
- }, result, {
55
+ return _objectSpread({}, result, {
58
56
  isLoading: isLoading
59
57
  });
60
58
  };
61
59
  function generateQuery(router, slug) {
62
- var query = {
63
- };
60
+ var query = {};
64
61
  if (router.query.q) {
65
62
  query.q = router.query.q;
66
63
  } else {
@@ -5,16 +5,23 @@ import { getListingPageType } from '../utils';
5
5
  import { filtersOperatorsMap } from './useListingFilters';
6
6
  import { useListingAlias } from '../../index';
7
7
  import { useListingConfig } from '.';
8
+ function _arrayLikeToArray(arr, len) {
9
+ if (len == null || len > arr.length) len = arr.length;
10
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
11
+ return arr2;
12
+ }
8
13
  function _arrayWithHoles(arr) {
9
14
  if (Array.isArray(arr)) return arr;
10
15
  }
11
16
  function _iterableToArrayLimit(arr, i) {
17
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
18
+ if (_i == null) return;
12
19
  var _arr = [];
13
20
  var _n = true;
14
21
  var _d = false;
15
- var _e = undefined;
22
+ var _s, _e;
16
23
  try {
17
- for(var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true){
24
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
18
25
  _arr.push(_s.value);
19
26
  if (i && _arr.length === i) break;
20
27
  }
@@ -31,13 +38,21 @@ function _iterableToArrayLimit(arr, i) {
31
38
  return _arr;
32
39
  }
33
40
  function _nonIterableRest() {
34
- throw new TypeError("Invalid attempt to destructure non-iterable instance");
41
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
35
42
  }
36
43
  function _slicedToArray(arr, i) {
37
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
44
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
45
+ }
46
+ function _unsupportedIterableToArray(o, minLen) {
47
+ if (!o) return;
48
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
49
+ var n = Object.prototype.toString.call(o).slice(8, -1);
50
+ if (n === "Object" && o.constructor) n = o.constructor.name;
51
+ if (n === "Map" || n === "Set") return Array.from(n);
52
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
38
53
  }
39
54
  export var useSlideFilter = function(filterName, min, max) {
40
- var ref;
55
+ var ref3;
41
56
  var router = useRouter();
42
57
  var meta = useListingConfig().meta;
43
58
  var slug = useListingAlias(meta).slug;
@@ -52,7 +67,7 @@ export var useSlideFilter = function(filterName, min, max) {
52
67
  }
53
68
  if (allFilters.includes(filterQuery)) return allFilters;
54
69
  };
55
- var filter = (ref = getFilter()) === null || ref === void 0 ? void 0 : ref.replace(filterQuery, '');
70
+ var filter = (ref3 = getFilter()) === null || ref3 === void 0 ? void 0 : ref3.replace(filterQuery, '');
56
71
  var ref1 = _slicedToArray(filter ? filter.split(',') : [
57
72
  min,
58
73
  max
@@ -62,16 +77,38 @@ export var useSlideFilter = function(filterName, min, max) {
62
77
  to: +to || max
63
78
  }), 2), state = ref2[0], setState = ref2[1];
64
79
  var timeoutRef = useRef();
65
- var updateValue = useCallback(function(data) {
80
+ var getFormattedPriceRange = function(data) {
66
81
  var formattedFrom = Math.min(Math.max(data.from, min), data.to);
67
82
  var formattedTo = Math.max(data.from, Math.min(data.to, max));
83
+ return {
84
+ formattedFrom: formattedFrom,
85
+ formattedTo: formattedTo
86
+ };
87
+ };
88
+ var updateValue = useCallback(function(data) {
89
+ var ref = getFormattedPriceRange(data), formattedFrom = ref.formattedFrom, formattedTo = ref.formattedTo;
90
+ setState({
91
+ from: formattedFrom,
92
+ to: formattedTo
93
+ });
94
+ }, [
95
+ filterName,
96
+ max,
97
+ min,
98
+ router,
99
+ slug
100
+ ]);
101
+ var applyFilter = useCallback(function(data) {
102
+ var ref = getFormattedPriceRange(data), formattedFrom = ref.formattedFrom, formattedTo = ref.formattedTo;
68
103
  clearTimeout(timeoutRef.current);
69
104
  timeoutRef.current = setTimeout(function() {
70
105
  router.push(createAggregateQuery(getListingPageType(router, slug, meta), router.query.slug, {
71
106
  aggType: filterName,
72
107
  aggKey: "".concat(formattedFrom, ",").concat(formattedTo),
73
108
  aggOperator: filtersOperatorsMap.stats
74
- }, false, router, true));
109
+ }, false, router, true), undefined, {
110
+ shallow: true
111
+ });
75
112
  }, 500);
76
113
  setState({
77
114
  from: formattedFrom,
@@ -86,6 +123,7 @@ export var useSlideFilter = function(filterName, min, max) {
86
123
  ]);
87
124
  return {
88
125
  value: state,
126
+ applyFilter: applyFilter,
89
127
  updateValue: updateValue
90
128
  };
91
129
  };
@@ -16,8 +16,7 @@ function _defineProperty(obj, key, value) {
16
16
  }
17
17
  function _objectSpread(target) {
18
18
  for(var i = 1; i < arguments.length; i++){
19
- var source = arguments[i] != null ? arguments[i] : {
20
- };
19
+ var source = arguments[i] != null ? arguments[i] : {};
21
20
  var ownKeys = Object.keys(source);
22
21
  if (typeof Object.getOwnPropertySymbols === "function") {
23
22
  ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
@@ -39,8 +38,7 @@ export var useSort = function(props) {
39
38
  var changeSort = useCallback(function(value) {
40
39
  return function() {
41
40
  if (!value) return;
42
- var query = _objectSpread({
43
- }, router.query, {
41
+ var query = _objectSpread({}, router.query, {
44
42
  sort: value
45
43
  });
46
44
  if (defaultSortKey === value) {
@@ -68,8 +66,7 @@ export var useSort = function(props) {
68
66
  key: defaultSortKey,
69
67
  label: '',
70
68
  isDefault: true,
71
- select: function() {
72
- }
69
+ select: function() {}
73
70
  };
74
71
  var sortOptions = (ref = sorts || []) === null || ref === void 0 ? void 0 : ref.map(function(sort) {
75
72
  var data = {
@@ -1,6 +1,6 @@
1
1
  import regeneratorRuntime from "regenerator-runtime";
2
2
  import { CatalogAggregate } from '@sentecacommerce/sdk';
3
- import { getSlug, getListingAlias, getPostFilters } from '../utils';
3
+ import { getListingAlias, getPostFilters } from '../utils';
4
4
  import { prepareAggregateQuery, AggregateRequestEnum, generateAggregateKey } from '../api';
5
5
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
6
6
  try {
@@ -36,7 +36,7 @@ export function prefetchCategories(queryCache, router, predicate, aggregates, co
36
36
  }
37
37
  function _prefetchCategories() {
38
38
  _prefetchCategories = _asyncToGenerator(regeneratorRuntime.mark(function _callee(queryCache, router, predicate, aggregates, config) {
39
- var aggregateKeys, aliasedSlug, slug, query, response;
39
+ var aggregateKeys, aliasedSlug, query, response;
40
40
  return regeneratorRuntime.wrap(function _callee$(_ctx) {
41
41
  while(1)switch(_ctx.prev = _ctx.next){
42
42
  case 0:
@@ -45,19 +45,18 @@ function _prefetchCategories() {
45
45
  router: router,
46
46
  config: config
47
47
  });
48
- slug = getSlug(router, aliasedSlug);
49
48
  query = prepareAggregateQuery({
50
49
  request: AggregateRequestEnum.Categories,
51
50
  router: router,
52
51
  predicate: predicate,
53
52
  slug: aliasedSlug,
54
53
  aggregates: aggregates,
55
- postFilter: undefined,
54
+ postFilter: getPostFilters(router),
56
55
  config: config
57
56
  });
58
- _ctx.next = 6;
57
+ _ctx.next = 5;
59
58
  return CatalogAggregate(query);
60
- case 6:
59
+ case 5:
61
60
  response = _ctx.sent;
62
61
  queryCache.setQueryData([
63
62
  AggregateRequestEnum.Categories,
@@ -68,7 +67,7 @@ function _prefetchCategories() {
68
67
  staleTime: 30000
69
68
  });
70
69
  return _ctx.abrupt("return", response);
71
- case 9:
70
+ case 8:
72
71
  case "end":
73
72
  return _ctx.stop();
74
73
  }
@@ -69,7 +69,8 @@ function _prefetchListing() {
69
69
  postFilter: postFilter,
70
70
  offset: offset,
71
71
  config: config,
72
- slug: aliasedSlug
72
+ slug: aliasedSlug,
73
+ includeVariants: Boolean(config.includeVariants)
73
74
  });
74
75
  case 12:
75
76
  data = _ctx.sent;
@@ -35,20 +35,20 @@ export function prefetchPredicate(queryCache, router, config) {
35
35
  }
36
36
  function _prefetchPredicate() {
37
37
  _prefetchPredicate = _asyncToGenerator(regeneratorRuntime.mark(function _callee(queryCache, router, config) {
38
- var attribute, aliasedSlug, slug, data;
38
+ var aliasedSlug, slug, data, attribute;
39
39
  return regeneratorRuntime.wrap(function _callee$(_ctx) {
40
40
  while(1)switch(_ctx.prev = _ctx.next){
41
41
  case 0:
42
- attribute = router.query.cat && router.query.slug;
43
42
  aliasedSlug = getListingAlias({
44
43
  router: router,
45
44
  config: config
46
45
  });
47
46
  slug = getSlug(router, aliasedSlug);
48
- _ctx.next = 5;
47
+ _ctx.next = 4;
49
48
  return processPredicateRequest(slug, router, aliasedSlug);
50
- case 5:
49
+ case 4:
51
50
  data = _ctx.sent;
51
+ attribute = router.query.cat && aliasedSlug;
52
52
  queryCache.setQueryData([
53
53
  ListingQueryKeysEnum.usePredicate,
54
54
  slug,