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

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