@commercelayer/react-components 4.17.0 → 4.19.0

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 (349) hide show
  1. package/lib/cjs/components/ExternalFunction.d.ts +1 -1
  2. package/lib/cjs/components/MetadataInput.d.ts +1 -1
  3. package/lib/cjs/components/SubmitButton.d.ts +2 -2
  4. package/lib/cjs/components/addresses/Address.d.ts +1 -1
  5. package/lib/cjs/components/addresses/AddressCountrySelector.d.ts +1 -1
  6. package/lib/cjs/components/addresses/AddressField.d.ts +2 -2
  7. package/lib/cjs/components/addresses/AddressInput.d.ts +1 -1
  8. package/lib/cjs/components/addresses/AddressInputSelect.d.ts +1 -1
  9. package/lib/cjs/components/addresses/AddressStateSelector.d.ts +1 -1
  10. package/lib/cjs/components/addresses/AddressesEmpty.d.ts +1 -1
  11. package/lib/cjs/components/addresses/BillingAddressForm.d.ts +1 -1
  12. package/lib/cjs/components/addresses/SaveAddressesButton.d.ts +1 -1
  13. package/lib/cjs/components/addresses/ShippingAddressForm.d.ts +1 -1
  14. package/lib/cjs/components/customers/CustomerContainer.d.ts +1 -1
  15. package/lib/cjs/components/customers/CustomerField.d.ts +1 -1
  16. package/lib/cjs/components/customers/CustomerInput.d.ts +1 -1
  17. package/lib/cjs/components/customers/CustomerPaymentSource.d.ts +1 -1
  18. package/lib/cjs/components/customers/CustomerPaymentSourceEmpty.d.ts +1 -1
  19. package/lib/cjs/components/customers/MyAccountLink.d.ts +1 -1
  20. package/lib/cjs/components/customers/MyIdentityLink.d.ts +1 -1
  21. package/lib/cjs/components/customers/SaveCustomerButton.d.ts +1 -1
  22. package/lib/cjs/components/errors/Errors.d.ts +1 -1
  23. package/lib/cjs/components/gift_cards/GiftCard.d.ts +1 -1
  24. package/lib/cjs/components/gift_cards/GiftCardCurrencySelector.d.ts +1 -1
  25. package/lib/cjs/components/gift_cards/GiftCardInput.d.ts +1 -1
  26. package/lib/cjs/components/gift_cards/GiftCardOrCouponCode.d.ts +1 -1
  27. package/lib/cjs/components/gift_cards/GiftCardOrCouponInput.d.ts +2 -2
  28. package/lib/cjs/components/gift_cards/GiftCardOrCouponRemoveButton.d.ts +2 -2
  29. package/lib/cjs/components/gift_cards/GiftCardOrCouponSubmit.d.ts +2 -2
  30. package/lib/cjs/components/in_stock_subscriptions/InStockSubscriptionButton.d.ts +1 -1
  31. package/lib/cjs/components/in_stock_subscriptions/InStockSubscriptionsContainer.d.ts +1 -1
  32. package/lib/cjs/components/line_items/LineItemAmount.d.ts +1 -1
  33. package/lib/cjs/components/line_items/LineItemCode.d.ts +2 -2
  34. package/lib/cjs/components/line_items/LineItemField.d.ts +1 -1
  35. package/lib/cjs/components/line_items/LineItemImage.d.ts +2 -2
  36. package/lib/cjs/components/line_items/LineItemName.d.ts +1 -1
  37. package/lib/cjs/components/line_items/LineItemOption.d.ts +2 -2
  38. package/lib/cjs/components/line_items/LineItemQuantity.d.ts +2 -2
  39. package/lib/cjs/components/line_items/LineItemRemoveLink.d.ts +2 -2
  40. package/lib/cjs/components/line_items/LineItemsCount.d.ts +1 -1
  41. package/lib/cjs/components/line_items/LineItemsEmpty.d.ts +1 -1
  42. package/lib/cjs/components/orders/AddToCartButton.d.ts +2 -2
  43. package/lib/cjs/components/orders/AdjustmentAmount.d.ts +1 -1
  44. package/lib/cjs/components/orders/CartLink.d.ts +1 -1
  45. package/lib/cjs/components/orders/CheckoutLink.d.ts +1 -1
  46. package/lib/cjs/components/orders/DiscountAmount.d.ts +1 -1
  47. package/lib/cjs/components/orders/GiftCardAmount.d.ts +1 -1
  48. package/lib/cjs/components/orders/OrderContainer.d.ts +1 -1
  49. package/lib/cjs/components/orders/OrderList.d.ts +1 -1
  50. package/lib/cjs/components/orders/OrderListEmpty.d.ts +1 -1
  51. package/lib/cjs/components/orders/OrderListPaginationButtons.d.ts +1 -1
  52. package/lib/cjs/components/orders/OrderListPaginationInfo.d.ts +1 -1
  53. package/lib/cjs/components/orders/OrderStorage.d.ts +1 -1
  54. package/lib/cjs/components/orders/PaymentMethodAmount.d.ts +1 -1
  55. package/lib/cjs/components/orders/PlaceOrderButton.d.ts +1 -1
  56. package/lib/cjs/components/orders/PlaceOrderButton.js +1 -1
  57. package/lib/cjs/components/orders/ShippingAmount.d.ts +1 -1
  58. package/lib/cjs/components/orders/SubTotalAmount.d.ts +1 -1
  59. package/lib/cjs/components/orders/TaxesAmount.d.ts +1 -1
  60. package/lib/cjs/components/orders/TotalAmount.d.ts +1 -1
  61. package/lib/cjs/components/parcels/ParcelField.d.ts +1 -1
  62. package/lib/cjs/components/parcels/ParcelLineItemField.d.ts +1 -1
  63. package/lib/cjs/components/parcels/ParcelLineItemsCount.d.ts +1 -1
  64. package/lib/cjs/components/parcels/ParcelsCount.d.ts +1 -1
  65. package/lib/cjs/components/payment_gateways/AdyenGateway.d.ts +1 -1
  66. package/lib/cjs/components/payment_gateways/AdyenGateway.js +1 -1
  67. package/lib/cjs/components/payment_gateways/BraintreeGateway.d.ts +1 -1
  68. package/lib/cjs/components/payment_gateways/CheckoutComGateway.d.ts +1 -1
  69. package/lib/cjs/components/payment_gateways/ExternalGateway.d.ts +1 -1
  70. package/lib/cjs/components/payment_gateways/KlarnaGateway.d.ts +1 -1
  71. package/lib/cjs/components/payment_gateways/PaymentGateway.d.ts +2 -2
  72. package/lib/cjs/components/payment_gateways/PaypalGateway.d.ts +1 -1
  73. package/lib/cjs/components/payment_gateways/StripeGateway.d.ts +1 -1
  74. package/lib/cjs/components/payment_gateways/WireTransferGateway.d.ts +1 -1
  75. package/lib/cjs/components/payment_methods/PaymentMethod.d.ts +5 -1
  76. package/lib/cjs/components/payment_methods/PaymentMethod.js +1 -1
  77. package/lib/cjs/components/payment_methods/PaymentMethodName.d.ts +1 -1
  78. package/lib/cjs/components/payment_methods/PaymentMethodPrice.d.ts +1 -1
  79. package/lib/cjs/components/payment_methods/PaymentMethodRadioButton.d.ts +1 -1
  80. package/lib/cjs/components/payment_source/AdyenPayment.d.ts +11 -42
  81. package/lib/cjs/components/payment_source/AdyenPayment.js +1 -1
  82. package/lib/cjs/components/payment_source/BraintreePayment.d.ts +2 -2
  83. package/lib/cjs/components/payment_source/CheckoutComPayment.d.ts +2 -2
  84. package/lib/cjs/components/payment_source/ExternalPayment.d.ts +2 -2
  85. package/lib/cjs/components/payment_source/KlarnaPayment.d.ts +2 -2
  86. package/lib/cjs/components/payment_source/PaymentSource.d.ts +2 -2
  87. package/lib/cjs/components/payment_source/PaymentSourceBrandIcon.d.ts +1 -1
  88. package/lib/cjs/components/payment_source/PaymentSourceBrandName.d.ts +1 -1
  89. package/lib/cjs/components/payment_source/PaymentSourceEditButton.d.ts +1 -1
  90. package/lib/cjs/components/payment_source/StripePayment.d.ts +3 -3
  91. package/lib/cjs/components/prices/Price.d.ts +2 -2
  92. package/lib/cjs/components/prices/PricesContainer.d.ts +2 -2
  93. package/lib/cjs/components/shipments/ShipmentField.d.ts +1 -1
  94. package/lib/cjs/components/shipments/ShipmentsCount.d.ts +1 -1
  95. package/lib/cjs/components/shipping_methods/ShippingMethodName.d.ts +1 -1
  96. package/lib/cjs/components/shipping_methods/ShippingMethodPrice.d.ts +1 -1
  97. package/lib/cjs/components/skus/AvailabilityTemplate.d.ts +2 -2
  98. package/lib/cjs/components/skus/SkuField.d.ts +1 -1
  99. package/lib/cjs/components/stock_transfers/StockTransferField.d.ts +1 -1
  100. package/lib/cjs/components/utils/AddressCardsTemplate.d.ts +1 -1
  101. package/lib/cjs/components/utils/BaseInput.d.ts +1 -1
  102. package/lib/cjs/components/utils/BaseOrderPrice.d.ts +2 -2
  103. package/lib/cjs/components/utils/BaseSelect.d.ts +1 -1
  104. package/lib/cjs/components/utils/GenericFieldComponent.d.ts +6 -6
  105. package/lib/cjs/components/utils/Parent.d.ts +1 -1
  106. package/lib/cjs/components/utils/PaymentCardsTemplate.d.ts +3 -3
  107. package/lib/cjs/components/utils/PriceTemplate.d.ts +1 -1
  108. package/lib/cjs/components/utils/getAllErrors.d.ts +3 -3
  109. package/lib/cjs/context/AddressChildrenContext.d.ts +1 -1
  110. package/lib/cjs/context/AddressContext.d.ts +1 -1
  111. package/lib/cjs/context/BillingAddressContext.d.ts +1 -1
  112. package/lib/cjs/context/CouponAndGiftCardFormContext.d.ts +1 -1
  113. package/lib/cjs/context/CustomerAddressFormContext.d.ts +2 -2
  114. package/lib/cjs/context/CustomerContext.d.ts +1 -1
  115. package/lib/cjs/context/CustomerPaymentSourceContext.d.ts +1 -1
  116. package/lib/cjs/context/GiftCardContext.d.ts +1 -1
  117. package/lib/cjs/context/InStockSubscriptionContext.d.ts +1 -1
  118. package/lib/cjs/context/LineItemChildrenContext.d.ts +1 -1
  119. package/lib/cjs/context/LineItemContext.d.ts +2 -2
  120. package/lib/cjs/context/OrderContext.d.ts +2 -2
  121. package/lib/cjs/context/OrderListChildrenContext.d.ts +3 -3
  122. package/lib/cjs/context/PaymentMethodChildrenContext.d.ts +1 -1
  123. package/lib/cjs/context/ShippingAddressContext.d.ts +1 -1
  124. package/lib/cjs/context/ShippingAddressFormContext.d.ts +1 -1
  125. package/lib/cjs/context/ShippingMethodChildrenContext.d.ts +1 -1
  126. package/lib/cjs/context/SkuChildrenContext.d.ts +1 -1
  127. package/lib/cjs/context/SkuContext.d.ts +1 -1
  128. package/lib/cjs/context/StockTransferChildrenContext.d.ts +1 -1
  129. package/lib/cjs/hooks/useCommerceLayer.d.ts +1 -1
  130. package/lib/cjs/hooks/useCustomerContainer.d.ts +1 -1
  131. package/lib/cjs/hooks/useOrderContainer.d.ts +1 -1
  132. package/lib/cjs/reducers/AddressReducer.d.ts +9 -9
  133. package/lib/cjs/reducers/AvailabilityReducer.d.ts +5 -5
  134. package/lib/cjs/reducers/BillingAddressReducer.d.ts +4 -4
  135. package/lib/cjs/reducers/CustomerReducer.d.ts +4 -4
  136. package/lib/cjs/reducers/GiftCardReducer.d.ts +6 -6
  137. package/lib/cjs/reducers/InStockSubscriptionReducer.d.ts +3 -3
  138. package/lib/cjs/reducers/LineItemReducer.d.ts +6 -6
  139. package/lib/cjs/reducers/OrderReducer.d.ts +6 -6
  140. package/lib/cjs/reducers/PaymentMethodReducer.d.ts +12 -12
  141. package/lib/cjs/reducers/PlaceOrderReducer.d.ts +1 -1
  142. package/lib/cjs/reducers/PlaceOrderReducer.js +1 -1
  143. package/lib/cjs/reducers/PriceReducer.d.ts +5 -5
  144. package/lib/cjs/reducers/ShipmentReducer.d.ts +5 -5
  145. package/lib/cjs/reducers/ShippingAddressReducer.d.ts +4 -4
  146. package/lib/cjs/reducers/SkuListsReducer.d.ts +2 -2
  147. package/lib/cjs/reducers/SkuReducer.d.ts +4 -4
  148. package/lib/cjs/typings/errors.d.ts +1 -1
  149. package/lib/cjs/typings/index.d.ts +2 -2
  150. package/lib/cjs/utils/addressesManager.d.ts +3 -3
  151. package/lib/cjs/utils/baseReducer.d.ts +1 -1
  152. package/lib/cjs/utils/canPlaceOrder.d.ts +1 -1
  153. package/lib/cjs/utils/checkIncludeResource.d.ts +1 -1
  154. package/lib/cjs/utils/customMessages.d.ts +1 -1
  155. package/lib/cjs/utils/expressPaymentHelper.d.ts +4 -4
  156. package/lib/cjs/utils/filterChildren.d.ts +1 -1
  157. package/lib/cjs/utils/formCleaner.d.ts +1 -1
  158. package/lib/cjs/utils/getCardDetails.d.ts +3 -3
  159. package/lib/cjs/utils/getErrors.d.ts +2 -2
  160. package/lib/cjs/utils/getLoaderComponent.d.ts +1 -1
  161. package/lib/cjs/utils/getPaymentAttributes.d.ts +2 -2
  162. package/lib/cjs/utils/getPrices.d.ts +1 -1
  163. package/lib/cjs/utils/getSdk.d.ts +1 -1
  164. package/lib/cjs/utils/getSkus.d.ts +1 -1
  165. package/lib/cjs/utils/hasSubscriptions.d.ts +1 -1
  166. package/lib/cjs/utils/organization.d.ts +4 -4
  167. package/lib/cjs/utils/organization.js +1 -1
  168. package/lib/cjs/utils/payment-methods/sortPaymentMethods.d.ts +2 -0
  169. package/lib/cjs/utils/payment-methods/sortPaymentMethods.js +2 -0
  170. package/lib/cjs/utils/shipments.d.ts +1 -1
  171. package/lib/cjs/utils/triggerAttributeHelper.d.ts +2 -2
  172. package/lib/cjs/utils/updateOrderSubscriptionCustomerPaymentSource.d.ts +2 -2
  173. package/lib/cjs/utils/validateFormFields.d.ts +5 -5
  174. package/lib/esm/components/ExternalFunction.d.ts +1 -1
  175. package/lib/esm/components/MetadataInput.d.ts +1 -1
  176. package/lib/esm/components/SubmitButton.d.ts +2 -2
  177. package/lib/esm/components/addresses/Address.d.ts +1 -1
  178. package/lib/esm/components/addresses/AddressCountrySelector.d.ts +1 -1
  179. package/lib/esm/components/addresses/AddressField.d.ts +2 -2
  180. package/lib/esm/components/addresses/AddressInput.d.ts +1 -1
  181. package/lib/esm/components/addresses/AddressInputSelect.d.ts +1 -1
  182. package/lib/esm/components/addresses/AddressStateSelector.d.ts +1 -1
  183. package/lib/esm/components/addresses/AddressesEmpty.d.ts +1 -1
  184. package/lib/esm/components/addresses/BillingAddressForm.d.ts +1 -1
  185. package/lib/esm/components/addresses/SaveAddressesButton.d.ts +1 -1
  186. package/lib/esm/components/addresses/ShippingAddressForm.d.ts +1 -1
  187. package/lib/esm/components/customers/CustomerContainer.d.ts +1 -1
  188. package/lib/esm/components/customers/CustomerField.d.ts +1 -1
  189. package/lib/esm/components/customers/CustomerInput.d.ts +1 -1
  190. package/lib/esm/components/customers/CustomerPaymentSource.d.ts +1 -1
  191. package/lib/esm/components/customers/CustomerPaymentSourceEmpty.d.ts +1 -1
  192. package/lib/esm/components/customers/MyAccountLink.d.ts +1 -1
  193. package/lib/esm/components/customers/MyIdentityLink.d.ts +1 -1
  194. package/lib/esm/components/customers/SaveCustomerButton.d.ts +1 -1
  195. package/lib/esm/components/errors/Errors.d.ts +1 -1
  196. package/lib/esm/components/gift_cards/GiftCard.d.ts +1 -1
  197. package/lib/esm/components/gift_cards/GiftCardCurrencySelector.d.ts +1 -1
  198. package/lib/esm/components/gift_cards/GiftCardInput.d.ts +1 -1
  199. package/lib/esm/components/gift_cards/GiftCardOrCouponCode.d.ts +1 -1
  200. package/lib/esm/components/gift_cards/GiftCardOrCouponInput.d.ts +2 -2
  201. package/lib/esm/components/gift_cards/GiftCardOrCouponRemoveButton.d.ts +2 -2
  202. package/lib/esm/components/gift_cards/GiftCardOrCouponSubmit.d.ts +2 -2
  203. package/lib/esm/components/in_stock_subscriptions/InStockSubscriptionButton.d.ts +1 -1
  204. package/lib/esm/components/in_stock_subscriptions/InStockSubscriptionsContainer.d.ts +1 -1
  205. package/lib/esm/components/line_items/LineItemAmount.d.ts +1 -1
  206. package/lib/esm/components/line_items/LineItemCode.d.ts +2 -2
  207. package/lib/esm/components/line_items/LineItemField.d.ts +1 -1
  208. package/lib/esm/components/line_items/LineItemImage.d.ts +2 -2
  209. package/lib/esm/components/line_items/LineItemName.d.ts +1 -1
  210. package/lib/esm/components/line_items/LineItemOption.d.ts +2 -2
  211. package/lib/esm/components/line_items/LineItemQuantity.d.ts +2 -2
  212. package/lib/esm/components/line_items/LineItemRemoveLink.d.ts +2 -2
  213. package/lib/esm/components/line_items/LineItemsCount.d.ts +1 -1
  214. package/lib/esm/components/line_items/LineItemsEmpty.d.ts +1 -1
  215. package/lib/esm/components/orders/AddToCartButton.d.ts +2 -2
  216. package/lib/esm/components/orders/AdjustmentAmount.d.ts +1 -1
  217. package/lib/esm/components/orders/CartLink.d.ts +1 -1
  218. package/lib/esm/components/orders/CheckoutLink.d.ts +1 -1
  219. package/lib/esm/components/orders/DiscountAmount.d.ts +1 -1
  220. package/lib/esm/components/orders/GiftCardAmount.d.ts +1 -1
  221. package/lib/esm/components/orders/OrderContainer.d.ts +1 -1
  222. package/lib/esm/components/orders/OrderList.d.ts +1 -1
  223. package/lib/esm/components/orders/OrderListEmpty.d.ts +1 -1
  224. package/lib/esm/components/orders/OrderListPaginationButtons.d.ts +1 -1
  225. package/lib/esm/components/orders/OrderListPaginationInfo.d.ts +1 -1
  226. package/lib/esm/components/orders/OrderStorage.d.ts +1 -1
  227. package/lib/esm/components/orders/PaymentMethodAmount.d.ts +1 -1
  228. package/lib/esm/components/orders/PlaceOrderButton.d.ts +1 -1
  229. package/lib/esm/components/orders/PlaceOrderButton.js +1 -1
  230. package/lib/esm/components/orders/ShippingAmount.d.ts +1 -1
  231. package/lib/esm/components/orders/SubTotalAmount.d.ts +1 -1
  232. package/lib/esm/components/orders/TaxesAmount.d.ts +1 -1
  233. package/lib/esm/components/orders/TotalAmount.d.ts +1 -1
  234. package/lib/esm/components/parcels/ParcelField.d.ts +1 -1
  235. package/lib/esm/components/parcels/ParcelLineItemField.d.ts +1 -1
  236. package/lib/esm/components/parcels/ParcelLineItemsCount.d.ts +1 -1
  237. package/lib/esm/components/parcels/ParcelsCount.d.ts +1 -1
  238. package/lib/esm/components/payment_gateways/AdyenGateway.d.ts +1 -1
  239. package/lib/esm/components/payment_gateways/AdyenGateway.js +1 -1
  240. package/lib/esm/components/payment_gateways/BraintreeGateway.d.ts +1 -1
  241. package/lib/esm/components/payment_gateways/CheckoutComGateway.d.ts +1 -1
  242. package/lib/esm/components/payment_gateways/ExternalGateway.d.ts +1 -1
  243. package/lib/esm/components/payment_gateways/KlarnaGateway.d.ts +1 -1
  244. package/lib/esm/components/payment_gateways/PaymentGateway.d.ts +2 -2
  245. package/lib/esm/components/payment_gateways/PaypalGateway.d.ts +1 -1
  246. package/lib/esm/components/payment_gateways/StripeGateway.d.ts +1 -1
  247. package/lib/esm/components/payment_gateways/WireTransferGateway.d.ts +1 -1
  248. package/lib/esm/components/payment_methods/PaymentMethod.d.ts +5 -1
  249. package/lib/esm/components/payment_methods/PaymentMethod.js +1 -1
  250. package/lib/esm/components/payment_methods/PaymentMethodName.d.ts +1 -1
  251. package/lib/esm/components/payment_methods/PaymentMethodPrice.d.ts +1 -1
  252. package/lib/esm/components/payment_methods/PaymentMethodRadioButton.d.ts +1 -1
  253. package/lib/esm/components/payment_source/AdyenPayment.d.ts +11 -42
  254. package/lib/esm/components/payment_source/AdyenPayment.js +1 -1
  255. package/lib/esm/components/payment_source/BraintreePayment.d.ts +2 -2
  256. package/lib/esm/components/payment_source/CheckoutComPayment.d.ts +2 -2
  257. package/lib/esm/components/payment_source/ExternalPayment.d.ts +2 -2
  258. package/lib/esm/components/payment_source/KlarnaPayment.d.ts +2 -2
  259. package/lib/esm/components/payment_source/PaymentSource.d.ts +2 -2
  260. package/lib/esm/components/payment_source/PaymentSourceBrandIcon.d.ts +1 -1
  261. package/lib/esm/components/payment_source/PaymentSourceBrandName.d.ts +1 -1
  262. package/lib/esm/components/payment_source/PaymentSourceEditButton.d.ts +1 -1
  263. package/lib/esm/components/payment_source/StripePayment.d.ts +3 -3
  264. package/lib/esm/components/prices/Price.d.ts +2 -2
  265. package/lib/esm/components/prices/PricesContainer.d.ts +2 -2
  266. package/lib/esm/components/shipments/ShipmentField.d.ts +1 -1
  267. package/lib/esm/components/shipments/ShipmentsCount.d.ts +1 -1
  268. package/lib/esm/components/shipping_methods/ShippingMethodName.d.ts +1 -1
  269. package/lib/esm/components/shipping_methods/ShippingMethodPrice.d.ts +1 -1
  270. package/lib/esm/components/skus/AvailabilityTemplate.d.ts +2 -2
  271. package/lib/esm/components/skus/SkuField.d.ts +1 -1
  272. package/lib/esm/components/stock_transfers/StockTransferField.d.ts +1 -1
  273. package/lib/esm/components/utils/AddressCardsTemplate.d.ts +1 -1
  274. package/lib/esm/components/utils/BaseInput.d.ts +1 -1
  275. package/lib/esm/components/utils/BaseOrderPrice.d.ts +2 -2
  276. package/lib/esm/components/utils/BaseSelect.d.ts +1 -1
  277. package/lib/esm/components/utils/GenericFieldComponent.d.ts +6 -6
  278. package/lib/esm/components/utils/Parent.d.ts +1 -1
  279. package/lib/esm/components/utils/PaymentCardsTemplate.d.ts +3 -3
  280. package/lib/esm/components/utils/PriceTemplate.d.ts +1 -1
  281. package/lib/esm/components/utils/getAllErrors.d.ts +3 -3
  282. package/lib/esm/context/AddressChildrenContext.d.ts +1 -1
  283. package/lib/esm/context/AddressContext.d.ts +1 -1
  284. package/lib/esm/context/BillingAddressContext.d.ts +1 -1
  285. package/lib/esm/context/CouponAndGiftCardFormContext.d.ts +1 -1
  286. package/lib/esm/context/CustomerAddressFormContext.d.ts +2 -2
  287. package/lib/esm/context/CustomerContext.d.ts +1 -1
  288. package/lib/esm/context/CustomerPaymentSourceContext.d.ts +1 -1
  289. package/lib/esm/context/GiftCardContext.d.ts +1 -1
  290. package/lib/esm/context/InStockSubscriptionContext.d.ts +1 -1
  291. package/lib/esm/context/LineItemChildrenContext.d.ts +1 -1
  292. package/lib/esm/context/LineItemContext.d.ts +2 -2
  293. package/lib/esm/context/OrderContext.d.ts +2 -2
  294. package/lib/esm/context/OrderListChildrenContext.d.ts +3 -3
  295. package/lib/esm/context/PaymentMethodChildrenContext.d.ts +1 -1
  296. package/lib/esm/context/ShippingAddressContext.d.ts +1 -1
  297. package/lib/esm/context/ShippingAddressFormContext.d.ts +1 -1
  298. package/lib/esm/context/ShippingMethodChildrenContext.d.ts +1 -1
  299. package/lib/esm/context/SkuChildrenContext.d.ts +1 -1
  300. package/lib/esm/context/SkuContext.d.ts +1 -1
  301. package/lib/esm/context/StockTransferChildrenContext.d.ts +1 -1
  302. package/lib/esm/hooks/useCommerceLayer.d.ts +1 -1
  303. package/lib/esm/hooks/useCustomerContainer.d.ts +1 -1
  304. package/lib/esm/hooks/useOrderContainer.d.ts +1 -1
  305. package/lib/esm/reducers/AddressReducer.d.ts +9 -9
  306. package/lib/esm/reducers/AvailabilityReducer.d.ts +5 -5
  307. package/lib/esm/reducers/BillingAddressReducer.d.ts +4 -4
  308. package/lib/esm/reducers/CustomerReducer.d.ts +4 -4
  309. package/lib/esm/reducers/GiftCardReducer.d.ts +6 -6
  310. package/lib/esm/reducers/InStockSubscriptionReducer.d.ts +3 -3
  311. package/lib/esm/reducers/LineItemReducer.d.ts +6 -6
  312. package/lib/esm/reducers/OrderReducer.d.ts +6 -6
  313. package/lib/esm/reducers/PaymentMethodReducer.d.ts +12 -12
  314. package/lib/esm/reducers/PlaceOrderReducer.d.ts +1 -1
  315. package/lib/esm/reducers/PlaceOrderReducer.js +1 -1
  316. package/lib/esm/reducers/PriceReducer.d.ts +5 -5
  317. package/lib/esm/reducers/ShipmentReducer.d.ts +5 -5
  318. package/lib/esm/reducers/ShippingAddressReducer.d.ts +4 -4
  319. package/lib/esm/reducers/SkuListsReducer.d.ts +2 -2
  320. package/lib/esm/reducers/SkuReducer.d.ts +4 -4
  321. package/lib/esm/typings/errors.d.ts +1 -1
  322. package/lib/esm/typings/index.d.ts +2 -2
  323. package/lib/esm/utils/addressesManager.d.ts +3 -3
  324. package/lib/esm/utils/baseReducer.d.ts +1 -1
  325. package/lib/esm/utils/canPlaceOrder.d.ts +1 -1
  326. package/lib/esm/utils/checkIncludeResource.d.ts +1 -1
  327. package/lib/esm/utils/customMessages.d.ts +1 -1
  328. package/lib/esm/utils/expressPaymentHelper.d.ts +4 -4
  329. package/lib/esm/utils/filterChildren.d.ts +1 -1
  330. package/lib/esm/utils/formCleaner.d.ts +1 -1
  331. package/lib/esm/utils/getCardDetails.d.ts +3 -3
  332. package/lib/esm/utils/getErrors.d.ts +2 -2
  333. package/lib/esm/utils/getLoaderComponent.d.ts +1 -1
  334. package/lib/esm/utils/getPaymentAttributes.d.ts +2 -2
  335. package/lib/esm/utils/getPrices.d.ts +1 -1
  336. package/lib/esm/utils/getSdk.d.ts +1 -1
  337. package/lib/esm/utils/getSkus.d.ts +1 -1
  338. package/lib/esm/utils/hasSubscriptions.d.ts +1 -1
  339. package/lib/esm/utils/organization.d.ts +4 -4
  340. package/lib/esm/utils/organization.js +1 -1
  341. package/lib/esm/utils/payment-methods/sortPaymentMethods.d.ts +2 -0
  342. package/lib/esm/utils/payment-methods/sortPaymentMethods.js +2 -0
  343. package/lib/esm/utils/shipments.d.ts +1 -1
  344. package/lib/esm/utils/triggerAttributeHelper.d.ts +2 -2
  345. package/lib/esm/utils/updateOrderSubscriptionCustomerPaymentSource.d.ts +2 -2
  346. package/lib/esm/utils/validateFormFields.d.ts +5 -5
  347. package/lib/tsconfig.prod.esm.tsbuildinfo +1 -1
  348. package/lib/tsconfig.prod.tsbuildinfo +1 -1
  349. package/package.json +45 -25
@@ -1,5 +1,5 @@
1
- import { type AddressCountrySelectName, type AddressInputName } from '../typings/index';
2
- import { type AddressField } from '../reducers/AddressReducer';
1
+ import type { AddressCountrySelectName, AddressInputName } from '../typings/index';
2
+ import type { AddressField } from '../reducers/AddressReducer';
3
3
  export interface DefaultContextAddress {
4
4
  validation?: void;
5
5
  setValue?: (name: AddressField | AddressInputName | AddressCountrySelectName, value: any) => void;
@@ -1,4 +1,4 @@
1
- import { type SetCustomerErrors, type deleteCustomerAddress, type CustomerState, type getCustomerPaymentSources, type setCustomerEmail, type TCustomerAddress, type getCustomerAddresses, type getCustomerOrders, type getCustomerSubscriptions, type setResourceTrigger } from '../reducers/CustomerReducer';
1
+ import type { SetCustomerErrors, deleteCustomerAddress, CustomerState, getCustomerPaymentSources, setCustomerEmail, TCustomerAddress, getCustomerAddresses, getCustomerOrders, getCustomerSubscriptions, setResourceTrigger } from '../reducers/CustomerReducer';
2
2
  export type InitialCustomerContext = Partial<{
3
3
  saveCustomerUser: (customerEmail: string) => Promise<void>;
4
4
  setCustomerErrors: SetCustomerErrors;
@@ -1,4 +1,4 @@
1
- import { type IconBrand } from './PaymentSourceContext';
1
+ import type { IconBrand } from './PaymentSourceContext';
2
2
  interface DefaultContext {
3
3
  brand?: IconBrand | string;
4
4
  exp_month?: number | string;
@@ -1,5 +1,5 @@
1
1
  import { type GiftCardState, type GiftCardRecipientI, type GiftCardI } from '../reducers/GiftCardReducer';
2
- import { type BaseError } from '../typings/errors';
2
+ import type { BaseError } from '../typings/errors';
3
3
  export interface GCContext extends GiftCardState {
4
4
  addGiftCardRecipient: (values: GiftCardRecipientI & object) => void;
5
5
  addGiftCard: (values: GiftCardI & object) => void;
@@ -1,4 +1,4 @@
1
- import { type setInStockSubscription, type InStockSubscriptionState } from '../reducers/InStockSubscriptionReducer';
1
+ import type { setInStockSubscription, InStockSubscriptionState } from '../reducers/InStockSubscriptionReducer';
2
2
  export interface InitialInStockSubscriptionContext extends InStockSubscriptionState {
3
3
  setInStockSubscription?: typeof setInStockSubscription;
4
4
  }
@@ -1,4 +1,4 @@
1
- import { type LineItem } from '@commercelayer/sdk';
1
+ import type { LineItem } from '@commercelayer/sdk';
2
2
  export type InitialLineItemChildrenContext = Partial<{
3
3
  lineItem: LineItem | null | undefined;
4
4
  }>;
@@ -1,5 +1,5 @@
1
- import { type LineItemState } from '../reducers/LineItemReducer';
2
- import { type LineItem } from '@commercelayer/sdk';
1
+ import type { LineItemState } from '../reducers/LineItemReducer';
2
+ import type { LineItem } from '@commercelayer/sdk';
3
3
  export interface LineItemContextValue extends LineItemState {
4
4
  lineItems?: LineItem[] | null;
5
5
  }
@@ -1,6 +1,6 @@
1
- import { type Order } from '@commercelayer/sdk';
1
+ import type { Order } from '@commercelayer/sdk';
2
2
  import { type OrderState, type SaveAddressToCustomerAddressBook, createOrder, setGiftCardOrCouponCode, removeGiftCardOrCouponCode, addResourceToInclude, updateOrder, type getOrderContext, type addToCart } from '../reducers/OrderReducer';
3
- import { type BaseError } from '../typings/errors';
3
+ import type { BaseError } from '../typings/errors';
4
4
  interface DefaultContext extends OrderState {
5
5
  createOrder: typeof createOrder;
6
6
  addToCart?: typeof addToCart;
@@ -1,5 +1,5 @@
1
1
  import type { Order, OrderSubscription } from '@commercelayer/sdk';
2
- import { type Row } from '@tanstack/react-table';
2
+ import type { Row } from '@tanstack/react-table';
3
3
  import { type JSX } from 'react';
4
4
  export type TOrderList = 'orders' | 'subscriptions';
5
5
  export type TableAccessor<T extends TOrderList> = T extends 'orders' ? keyof Order : keyof OrderSubscription;
@@ -13,7 +13,7 @@ export type InitialOrderListContext = Partial<{
13
13
  /**
14
14
  * The list of orders
15
15
  */
16
- orders: Array<OrderListContent<TOrderList>> | null | undefined;
16
+ orders: OrderListContent<TOrderList>[] | null | undefined;
17
17
  /**
18
18
  * The current row
19
19
  */
@@ -46,7 +46,7 @@ declare const OrderListChildrenContext: import("react").Context<Partial<{
46
46
  /**
47
47
  * The list of orders
48
48
  */
49
- orders: Array<OrderListContent<TOrderList>> | null | undefined;
49
+ orders: OrderListContent<TOrderList>[] | null | undefined;
50
50
  /**
51
51
  * The current row
52
52
  */
@@ -1,4 +1,4 @@
1
- import { type PaymentMethod } from '@commercelayer/sdk';
1
+ import type { PaymentMethod } from '@commercelayer/sdk';
2
2
  export interface InitialPaymentMethodChildrenContext {
3
3
  payment?: PaymentMethod;
4
4
  clickableContainer?: boolean;
@@ -1,4 +1,4 @@
1
- import { type ShippingAddressState } from '../reducers/ShippingAddressReducer';
1
+ import type { ShippingAddressState } from '../reducers/ShippingAddressReducer';
2
2
  type DefaultContext = {
3
3
  setShippingAddress?: (id: string, options?: {
4
4
  customerAddressId: string;
@@ -1,3 +1,3 @@
1
- import { type DefaultContextAddress } from './BillingAddressFormContext';
1
+ import type { DefaultContextAddress } from './BillingAddressFormContext';
2
2
  declare const ShippingAddressFormContext: import("react").Context<DefaultContextAddress>;
3
3
  export default ShippingAddressFormContext;
@@ -1,4 +1,4 @@
1
- import { type DeliveryLeadTime, type ShippingMethod } from '@commercelayer/sdk';
1
+ import type { DeliveryLeadTime, ShippingMethod } from '@commercelayer/sdk';
2
2
  export interface InitialShippingMethodContext {
3
3
  shippingMethod?: ShippingMethod;
4
4
  deliveryLeadTimeForShipment?: DeliveryLeadTime;
@@ -1,4 +1,4 @@
1
- import { type Sku } from '@commercelayer/sdk';
1
+ import type { Sku } from '@commercelayer/sdk';
2
2
  export type InitialSkuContext = Partial<{
3
3
  sku: Sku;
4
4
  }>;
@@ -1,4 +1,4 @@
1
- import { type SkuState } from '../reducers/SkuReducer';
1
+ import type { SkuState } from '../reducers/SkuReducer';
2
2
  export type SkuContextValue = SkuState;
3
3
  declare const SkuContext: import("react").Context<Partial<{
4
4
  skus: import("@commercelayer/sdk").Sku[];
@@ -1,4 +1,4 @@
1
- import { type LineItem, type StockTransfer } from '@commercelayer/sdk';
1
+ import type { LineItem, StockTransfer } from '@commercelayer/sdk';
2
2
  export interface InitialStockTransferContext {
3
3
  stockTransfer?: StockTransfer | null | LineItem;
4
4
  }
@@ -1,4 +1,4 @@
1
- import { type CommerceLayerClient } from '@commercelayer/sdk';
1
+ import type { CommerceLayerClient } from '@commercelayer/sdk';
2
2
  interface ReturnProps {
3
3
  /** This is the access token used to initialize the sdk client. It need to be set as prop in the main `<CommerceLayer>` component */
4
4
  accessToken?: string;
@@ -1,5 +1,5 @@
1
1
  import { type InitialCustomerContext } from '../context/CustomerContext';
2
- import { type setResourceTrigger, type CustomerState } from '../reducers/CustomerReducer';
2
+ import type { setResourceTrigger, CustomerState } from '../reducers/CustomerReducer';
3
3
  type TCustomer = Omit<CustomerState, 'errors' | 'isGuest'> & {
4
4
  setResourceTrigger?: typeof setResourceTrigger;
5
5
  } & Pick<InitialCustomerContext, 'reloadCustomerAddresses'>;
@@ -1,4 +1,4 @@
1
- import { type createOrder, type OrderState, type addToCart } from '../reducers/OrderReducer';
1
+ import type { createOrder, OrderState, addToCart } from '../reducers/OrderReducer';
2
2
  type TAddToCartParams = Omit<Parameters<typeof addToCart>[number], 'buyNowMode' | 'state' | 'dispatch' | 'setLocalOrder' | 'errors' | 'checkoutUrl' | 'persistKey' | 'config'>;
3
3
  type TCreateCartParams = Pick<Parameters<typeof createOrder>[number], 'orderAttributes' | 'orderMetadata'>;
4
4
  interface TReturnOrder extends Omit<OrderState, 'loading' | 'include' | 'includeLoaded' | 'withoutIncludes' | 'orderId'> {
@@ -1,12 +1,12 @@
1
- import { type Dispatch } from 'react';
2
- import { type CodeErrorType, type BaseError } from '../typings/errors';
3
- import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
4
- import { type Address, type Order } from '@commercelayer/sdk';
5
- import { type updateOrder } from './OrderReducer';
6
- import { type TCustomerAddress } from './CustomerReducer';
7
- import { type TResourceError } from '../components/errors/Errors';
8
- import { type AddressValuesKeys } from '../context/BillingAddressFormContext';
9
- import { type AddressInputName } from '../typings/index';
1
+ import type { Dispatch } from 'react';
2
+ import type { CodeErrorType, BaseError } from '../typings/errors';
3
+ import type { CommerceLayerConfig } from '../context/CommerceLayerContext';
4
+ import type { Address, Order } from '@commercelayer/sdk';
5
+ import type { updateOrder } from './OrderReducer';
6
+ import type { TCustomerAddress } from './CustomerReducer';
7
+ import type { TResourceError } from '../components/errors/Errors';
8
+ import type { AddressValuesKeys } from '../context/BillingAddressFormContext';
9
+ import type { AddressInputName } from '../typings/index';
10
10
  export type CustomFieldMessageError = (props: {
11
11
  field: Extract<AddressValuesKeys, AddressInputName> | string;
12
12
  code?: Extract<CodeErrorType, 'EMPTY_ERROR' | 'VALIDATION_ERROR'> | undefined;
@@ -1,7 +1,7 @@
1
- import { type BaseError } from '../typings/errors';
2
- import { type Sku } from '@commercelayer/sdk';
3
- import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
4
- import { type Dispatch } from 'react';
1
+ import type { BaseError } from '../typings/errors';
2
+ import type { Sku } from '@commercelayer/sdk';
3
+ import type { CommerceLayerConfig } from '../context/CommerceLayerContext';
4
+ import type { Dispatch } from 'react';
5
5
  export interface DeliveryLeadTime {
6
6
  shipping_method: {
7
7
  name: string;
@@ -15,7 +15,7 @@ export interface DeliveryLeadTime {
15
15
  max: LeadTimes;
16
16
  }
17
17
  interface Level {
18
- delivery_lead_times: Array<Partial<DeliveryLeadTime>>;
18
+ delivery_lead_times: Partial<DeliveryLeadTime>[];
19
19
  quantity: number;
20
20
  }
21
21
  interface Inventory {
@@ -1,7 +1,7 @@
1
- import { type Dispatch } from 'react';
2
- import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
3
- import { type Order } from '@commercelayer/sdk';
4
- import { type AddressResource } from './AddressReducer';
1
+ import type { Dispatch } from 'react';
2
+ import type { CommerceLayerConfig } from '../context/CommerceLayerContext';
3
+ import type { Order } from '@commercelayer/sdk';
4
+ import type { AddressResource } from './AddressReducer';
5
5
  export type BillingAddressActionType = 'setBillingAddress' | 'setBillingCustomerAddressId' | 'cleanup';
6
6
  export interface BillingAddressActionPayload {
7
7
  _billing_address_clone_id: string;
@@ -1,8 +1,8 @@
1
- import { type Dispatch } from 'react';
2
- import { type BaseError } from '../typings/errors';
1
+ import type { Dispatch } from 'react';
2
+ import type { BaseError } from '../typings/errors';
3
3
  import type { Address, AddressCreate, AddressUpdate, Customer, CustomerPaymentSource, ListResponse, Order, OrderSubscription, QueryPageSize } from '@commercelayer/sdk';
4
- import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
5
- import { type updateOrder } from './OrderReducer';
4
+ import type { CommerceLayerConfig } from '../context/CommerceLayerContext';
5
+ import type { updateOrder } from './OrderReducer';
6
6
  import { type TriggerAttributeHelper } from '../utils/triggerAttributeHelper';
7
7
  export type CustomerActionType = 'setErrors' | 'setCustomerEmail' | 'setAddresses' | 'setPayments' | 'setOrders' | 'setSubscriptions' | 'setCustomers';
8
8
  export interface CustomerActionPayload {
@@ -1,9 +1,9 @@
1
- import { type Customer, type Market, type GiftCardRecipient, type GiftCardRecipientCreate, type Order } from '@commercelayer/sdk';
2
- import { type BaseMetadata } from '../typings/index';
3
- import { type Dispatch } from 'react';
4
- import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
5
- import { type BaseError } from '../typings/errors';
6
- import { type createOrder as makeOrder, type getOrderContext } from './OrderReducer';
1
+ import type { Customer, Market, GiftCardRecipient, GiftCardRecipientCreate, Order } from '@commercelayer/sdk';
2
+ import type { BaseMetadata } from '../typings/index';
3
+ import type { Dispatch } from 'react';
4
+ import type { CommerceLayerConfig } from '../context/CommerceLayerContext';
5
+ import type { BaseError } from '../typings/errors';
6
+ import type { createOrder as makeOrder, getOrderContext } from './OrderReducer';
7
7
  export type GiftCardActionType = 'setAvailability' | 'setGiftCardRecipient' | 'setGiftCardErrors' | 'setGiftCardLoading';
8
8
  export interface GiftCardRecipientI {
9
9
  email: string;
@@ -1,6 +1,6 @@
1
- import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
2
- import { type BaseAction } from '../typings/index';
3
- import { type Dispatch } from 'react';
1
+ import type { CommerceLayerConfig } from '../context/CommerceLayerContext';
2
+ import type { BaseAction } from '../typings/index';
3
+ import type { Dispatch } from 'react';
4
4
  import type { BaseError } from '../typings/errors';
5
5
  type InStockSubscriptionActionType = 'setErrors';
6
6
  type InStockSubscriptionAction = BaseAction<InStockSubscriptionActionType, InStockSubscriptionState>;
@@ -1,9 +1,9 @@
1
- import { type Dispatch } from 'react';
2
- import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
3
- import { type getOrderContext } from './OrderReducer';
4
- import { type LoaderType } from '../typings/index';
5
- import { type BaseError } from '../typings/errors';
6
- import { type Order, type LineItem } from '@commercelayer/sdk';
1
+ import type { Dispatch } from 'react';
2
+ import type { CommerceLayerConfig } from '../context/CommerceLayerContext';
3
+ import type { getOrderContext } from './OrderReducer';
4
+ import type { LoaderType } from '../typings/index';
5
+ import type { BaseError } from '../typings/errors';
6
+ import type { Order, LineItem } from '@commercelayer/sdk';
7
7
  export interface UpdateLineItemParams {
8
8
  lineItemId: string;
9
9
  quantity?: number;
@@ -1,11 +1,11 @@
1
- import { type Dispatch } from 'react';
1
+ import type { Dispatch } from 'react';
2
2
  import { type SetLocalOrder, type DeleteLocalOrder } from '../utils/localStorage';
3
- import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
4
- import { type BaseMetadataObject } from '../typings/index';
5
- import { type BaseError } from '../typings/errors';
6
- import { type AddressResource } from './AddressReducer';
3
+ import type { CommerceLayerConfig } from '../context/CommerceLayerContext';
4
+ import type { BaseMetadataObject } from '../typings/index';
5
+ import type { BaseError } from '../typings/errors';
6
+ import type { AddressResource } from './AddressReducer';
7
7
  import type { Order, OrderUpdate } from '@commercelayer/sdk';
8
- import { type LooseAutocomplete } from '../typings/globals';
8
+ import type { LooseAutocomplete } from '../typings/globals';
9
9
  export type GetOrderParams = Partial<{
10
10
  clearWhenPlaced: boolean;
11
11
  config: CommerceLayerConfig;
@@ -1,16 +1,16 @@
1
- import { type AdyenPaymentConfig } from '../components/payment_source/AdyenPayment';
2
- import { type BraintreeConfig } from '../components/payment_source/BraintreePayment';
3
- import { type PaypalConfig } from '../components/payment_source/PaypalPayment';
4
- import { type StripeConfig } from '../components/payment_source/StripePayment';
5
- import { type WireTransferConfig } from '../components/payment_source/WireTransferPayment';
6
- import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
7
- import { type getOrderContext, type updateOrder } from './OrderReducer';
1
+ import type { AdyenPaymentConfig } from '../components/payment_source/AdyenPayment';
2
+ import type { BraintreeConfig } from '../components/payment_source/BraintreePayment';
3
+ import type { PaypalConfig } from '../components/payment_source/PaypalPayment';
4
+ import type { StripeConfig } from '../components/payment_source/StripePayment';
5
+ import type { WireTransferConfig } from '../components/payment_source/WireTransferPayment';
6
+ import type { CommerceLayerConfig } from '../context/CommerceLayerContext';
7
+ import type { getOrderContext, updateOrder } from './OrderReducer';
8
8
  import type { BaseError } from '../typings/errors';
9
- import { type Order, type PaymentMethod, type StripePayment, type WireTransfer, type AdyenPayment, type BraintreePayment, type CheckoutComPayment, type ExternalPayment, type PaypalPayment, type KlarnaPayment } from '@commercelayer/sdk';
10
- import { type Dispatch, type MutableRefObject } from 'react';
11
- import { type CheckoutComConfig } from '../components/payment_source/CheckoutComPayment';
12
- import { type ExternalPaymentConfig } from '../components/payment_source/ExternalPayment';
13
- import { type ResourceKeys } from '../utils/getPaymentAttributes';
9
+ import type { Order, PaymentMethod, StripePayment, WireTransfer, AdyenPayment, BraintreePayment, CheckoutComPayment, ExternalPayment, PaypalPayment, KlarnaPayment } from '@commercelayer/sdk';
10
+ import type { Dispatch, MutableRefObject } from 'react';
11
+ import type { CheckoutComConfig } from '../components/payment_source/CheckoutComPayment';
12
+ import type { ExternalPaymentConfig } from '../components/payment_source/ExternalPayment';
13
+ import type { ResourceKeys } from '../utils/getPaymentAttributes';
14
14
  export type PaymentSourceType = Order['payment_source'];
15
15
  interface Card {
16
16
  type: string;
@@ -2,7 +2,7 @@ import type { Dispatch, RefObject } from 'react';
2
2
  import type { CommerceLayerConfig } from '../context/CommerceLayerContext';
3
3
  import type { BaseError } from '../typings/errors';
4
4
  import type { Order } from '@commercelayer/sdk';
5
- import { type PaymentResource, type PaymentSourceType } from './PaymentMethodReducer';
5
+ import type { PaymentResource, PaymentSourceType } from './PaymentMethodReducer';
6
6
  export type PlaceOrderActionType = 'setErrors' | 'setPlaceOrderPermitted' | 'setButtonRef' | 'setStatus';
7
7
  export interface PlaceOrderOptions {
8
8
  paypalPayerId?: string;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.placeOrderInitialState=void 0,exports.setButtonRef=setButtonRef,exports.setPlaceOrderErrors=setPlaceOrderErrors,exports.placeOrderPermitted=placeOrderPermitted,exports.setPlaceOrder=setPlaceOrder,exports.setPlaceOrderStatus=setPlaceOrderStatus;const tslib_1=require("tslib"),baseReducer_1=tslib_1.__importDefault(require("../utils/baseReducer")),isEmpty_1=tslib_1.__importDefault(require("lodash/isEmpty")),shipments_1=require("../utils/shipments"),customerOrderOptions_1=require("../utils/customerOrderOptions"),getSdk_1=tslib_1.__importDefault(require("../utils/getSdk")),getErrors_1=tslib_1.__importDefault(require("../utils/getErrors")),isGuestToken_1=require("../utils/isGuestToken"),localStorage_1=require("../utils/localStorage"),hasSubscriptions_1=require("../utils/hasSubscriptions"),updateOrderSubscriptionCustomerPaymentSource_1=require("../utils/updateOrderSubscriptionCustomerPaymentSource");function setButtonRef(ref,dispatch){ref?.current!=null&&dispatch({type:"setButtonRef",payload:{placeOrderButtonRef:ref}})}exports.placeOrderInitialState={errors:[],isPermitted:!1,status:"standby"};function setPlaceOrderErrors(errors,dispatch){dispatch&&dispatch({type:"setErrors",payload:{errors}})}function placeOrderPermitted({config,order,dispatch,options}){var _a;if(order&&config){let isPermitted=!0;order.privacy_url&&order.terms_url&&(isPermitted=localStorage.getItem("privacy-terms")==="true");const billingAddress=order.billing_address,shippingAddress=order.shipping_address,doNotShip=(0,shipments_1.isDoNotShip)(order.line_items),shipments=order.shipments,shipment=shipments&&(0,shipments_1.shipmentsFilled)(shipments),paymentMethod=order.payment_method,paymentSource=order.payment_source;order.total_amount_with_taxes_cents!==0&&(0,isEmpty_1.default)(paymentMethod?.id)&&(isPermitted=!1),(0,isEmpty_1.default)(billingAddress)&&(isPermitted=!1),(0,isEmpty_1.default)(shippingAddress)&&!doNotShip&&(isPermitted=!1),!(0,isEmpty_1.default)(shipments)&&!shipment&&(isPermitted=!1),paymentSource?.mismatched_amounts&&(isPermitted=!1),dispatch({type:"setPlaceOrderPermitted",payload:{isPermitted,paymentType:paymentMethod?.payment_source_type,paymentSecret:paymentSource?.client_secret,paymentId:(_a=paymentSource?.options)===null||_a===void 0?void 0:_a.id,paymentSource,options}})}}function setPlaceOrder(_a){return tslib_1.__awaiter(this,arguments,void 0,function*({state,order,config,setOrderErrors,paymentSource,setOrder,include,currentCustomerPaymentSourceId}){var _b,_c,_d,_e,_f,_g,_h;const response={placed:!1};if(state&&config&&order){if(order?.status==="placed")return{placed:!0,order};const sdk=(0,getSdk_1.default)(config),{options,paymentType}=state;try{if((yield sdk.orders.retrieve(order.id,{fields:{orders:["status"]}})).status==="placed")return{placed:!0,order};if(paymentType==="paypal_payments"&&paymentSource?.type==="paypal_payments"){if(!options?.paypalPayerId&&paymentSource?.approval_url)return window.location.href=paymentSource?.approval_url,response;yield sdk[paymentType].update({id:paymentSource.id,paypal_payer_id:options?.paypalPayerId})}if(paymentType==="checkout_com_payments"&&paymentSource&&(!((_b=options?.checkoutCom)===null||_b===void 0)&&_b.session_id)){const payment=yield sdk[paymentType].update({id:paymentSource.id,_details:!0,session_id:(_c=options?.checkoutCom)===null||_c===void 0?void 0:_c.session_id});if(((_d=payment?.payment_response)===null||_d===void 0?void 0:_d.status)!=="Authorized"){const[action]=((_e=payment?.payment_response)===null||_e===void 0?void 0:_e.actions)||[""];throw{errors:[{code:"PAYMENT_NOT_APPROVED_FOR_EXECUTION",message:action?.response_summary,resource:"orders",field:"checkout_com_payments"}]}}}const updateAttributes={id:order.id,_place:!0};if((0,customerOrderOptions_1.saveBillingAddress)()&&(yield sdk.orders.update({id:order.id,_save_billing_address_to_customer_address_book:!0})),(0,customerOrderOptions_1.saveShippingAddress)()&&(yield sdk.orders.update({id:order.id,_save_shipping_address_to_customer_address_book:!0})),paymentType==="stripe_payments"&&paymentSource!=null){const ps=paymentSource,currentUrl=window.location.href,returnUrl=(_f=ps?.options)===null||_f===void 0?void 0:_f.return_url;currentUrl!==returnUrl&&(yield sdk[paymentType].update({id:paymentSource.id,options:{return_url:currentUrl}}))}switch((0,hasSubscriptions_1.hasSubscriptions)(order)&&config?.accessToken!=null&&!(0,isGuestToken_1.isGuestToken)(config.accessToken)&&currentCustomerPaymentSourceId==null&&(0,localStorage_1.setCustomerOrderParam)("_save_payment_source_to_customer_wallet","true"),paymentType){case"braintree_payments":{const total=(_g=order?.total_amount_cents)!==null&&_g!==void 0?_g:0;yield Promise.all([(0,customerOrderOptions_1.saveToWallet)()&&total>0&&sdk.orders.update({id:order.id,_save_payment_source_to_customer_wallet:!0})]);const orderUpdated=yield sdk.orders.update(updateAttributes,{include});return setOrder&&setOrder(orderUpdated),setOrderErrors&&setOrderErrors([]),(0,updateOrderSubscriptionCustomerPaymentSource_1.updateOrderSubscriptionCustomerPaymentSource)(orderUpdated,paymentType,sdk),{placed:!0,order:orderUpdated}}default:{const orderUpdated=yield sdk.orders.update(updateAttributes,{include}),total=(_h=orderUpdated?.total_amount_cents)!==null&&_h!==void 0?_h:0;return setOrder&&setOrder(orderUpdated),yield Promise.all([(0,customerOrderOptions_1.saveToWallet)()&&total>0&&sdk.orders.update({id:order.id,_save_payment_source_to_customer_wallet:!0}).catch(error=>{const errors=(0,getErrors_1.default)({error,resource:"orders",field:paymentType});setOrderErrors&&setOrderErrors(errors)})]).then(()=>{(0,updateOrderSubscriptionCustomerPaymentSource_1.updateOrderSubscriptionCustomerPaymentSource)(orderUpdated,paymentType,sdk)}),{placed:!0,order:orderUpdated}}}}catch(error){const errors=(0,getErrors_1.default)({error,resource:"orders",field:paymentType});return setOrderErrors&&setOrderErrors(errors),Object.assign(Object.assign({},response),{errors})}}return response})}function setPlaceOrderStatus({status,dispatch}){dispatch?.({type:"setStatus",payload:{status}})}const type=["setErrors","setPlaceOrderPermitted","setButtonRef","setStatus"],placeOrderReducer=(state,reducer)=>(0,baseReducer_1.default)(state,reducer,type);exports.default=placeOrderReducer;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.placeOrderInitialState=void 0,exports.setButtonRef=setButtonRef,exports.setPlaceOrderErrors=setPlaceOrderErrors,exports.placeOrderPermitted=placeOrderPermitted,exports.setPlaceOrder=setPlaceOrder,exports.setPlaceOrderStatus=setPlaceOrderStatus;const tslib_1=require("tslib"),baseReducer_1=tslib_1.__importDefault(require("../utils/baseReducer")),isEmpty_1=tslib_1.__importDefault(require("lodash/isEmpty")),shipments_1=require("../utils/shipments"),customerOrderOptions_1=require("../utils/customerOrderOptions"),getSdk_1=tslib_1.__importDefault(require("../utils/getSdk")),getErrors_1=tslib_1.__importDefault(require("../utils/getErrors")),isGuestToken_1=require("../utils/isGuestToken"),localStorage_1=require("../utils/localStorage"),hasSubscriptions_1=require("../utils/hasSubscriptions"),updateOrderSubscriptionCustomerPaymentSource_1=require("../utils/updateOrderSubscriptionCustomerPaymentSource");function setButtonRef(ref,dispatch){ref?.current!=null&&dispatch({type:"setButtonRef",payload:{placeOrderButtonRef:ref}})}exports.placeOrderInitialState={errors:[],isPermitted:!1,status:"standby"};function setPlaceOrderErrors(errors,dispatch){dispatch&&dispatch({type:"setErrors",payload:{errors}})}function placeOrderPermitted({config,order,dispatch,options}){var _a;if(order&&config){let isPermitted=!0;order.privacy_url&&order.terms_url&&(isPermitted=localStorage.getItem("privacy-terms")==="true");const billingAddress=order.billing_address,shippingAddress=order.shipping_address,doNotShip=(0,shipments_1.isDoNotShip)(order.line_items),shipments=order.shipments,shipment=shipments&&(0,shipments_1.shipmentsFilled)(shipments),paymentMethod=order.payment_method,paymentSource=order.payment_source;order.total_amount_with_taxes_cents!==0&&(0,isEmpty_1.default)(paymentMethod?.id)&&(isPermitted=!1),(0,isEmpty_1.default)(billingAddress)&&(isPermitted=!1),(0,isEmpty_1.default)(shippingAddress)&&!doNotShip&&(isPermitted=!1),!(0,isEmpty_1.default)(shipments)&&!shipment&&(isPermitted=!1),paymentSource?.mismatched_amounts&&(isPermitted=!1),dispatch({type:"setPlaceOrderPermitted",payload:{isPermitted,paymentType:paymentMethod?.payment_source_type,paymentSecret:paymentSource?.client_secret,paymentId:(_a=paymentSource?.options)===null||_a===void 0?void 0:_a.id,paymentSource,options}})}}function setPlaceOrder(_a){return tslib_1.__awaiter(this,arguments,void 0,function*({state,order,config,setOrderErrors,paymentSource,setOrder,include,currentCustomerPaymentSourceId}){var _b,_c,_d,_e,_f,_g,_h;const response={placed:!1};if(state&&config&&order){if(order?.status==="placed")return{placed:!0,order};const sdk=(0,getSdk_1.default)(config),{options,paymentType}=state;try{const lastOrderStatus=yield sdk.orders.retrieve(order.id);if(lastOrderStatus.status==="placed")return{placed:!0,order:lastOrderStatus};if(paymentType==="paypal_payments"&&paymentSource?.type==="paypal_payments"){if(!options?.paypalPayerId&&paymentSource?.approval_url)return window.location.href=paymentSource?.approval_url,response;yield sdk[paymentType].update({id:paymentSource.id,paypal_payer_id:options?.paypalPayerId})}if(paymentType==="checkout_com_payments"&&paymentSource&&(!((_b=options?.checkoutCom)===null||_b===void 0)&&_b.session_id)){const payment=yield sdk[paymentType].update({id:paymentSource.id,_details:!0,session_id:(_c=options?.checkoutCom)===null||_c===void 0?void 0:_c.session_id});if(((_d=payment?.payment_response)===null||_d===void 0?void 0:_d.status)!=="Authorized"){const[action]=((_e=payment?.payment_response)===null||_e===void 0?void 0:_e.actions)||[""];throw{errors:[{code:"PAYMENT_NOT_APPROVED_FOR_EXECUTION",message:action?.response_summary,resource:"orders",field:"checkout_com_payments"}]}}}const updateAttributes={id:order.id,_place:!0};if((0,customerOrderOptions_1.saveBillingAddress)()&&(yield sdk.orders.update({id:order.id,_save_billing_address_to_customer_address_book:!0})),(0,customerOrderOptions_1.saveShippingAddress)()&&(yield sdk.orders.update({id:order.id,_save_shipping_address_to_customer_address_book:!0})),paymentType==="stripe_payments"&&paymentSource!=null){const ps=paymentSource,currentUrl=window.location.href,returnUrl=(_f=ps?.options)===null||_f===void 0?void 0:_f.return_url;currentUrl!==returnUrl&&(yield sdk[paymentType].update({id:paymentSource.id,options:{return_url:currentUrl}}))}switch((0,hasSubscriptions_1.hasSubscriptions)(order)&&config?.accessToken!=null&&!(0,isGuestToken_1.isGuestToken)(config.accessToken)&&currentCustomerPaymentSourceId==null&&(0,localStorage_1.setCustomerOrderParam)("_save_payment_source_to_customer_wallet","true"),paymentType){case"braintree_payments":{const total=(_g=order?.total_amount_cents)!==null&&_g!==void 0?_g:0;yield Promise.all([(0,customerOrderOptions_1.saveToWallet)()&&total>0&&sdk.orders.update({id:order.id,_save_payment_source_to_customer_wallet:!0})]);const orderUpdated=yield sdk.orders.update(updateAttributes,{include});return setOrder&&setOrder(orderUpdated),setOrderErrors&&setOrderErrors([]),(0,updateOrderSubscriptionCustomerPaymentSource_1.updateOrderSubscriptionCustomerPaymentSource)(orderUpdated,paymentType,sdk),{placed:!0,order:orderUpdated}}default:{const orderUpdated=yield sdk.orders.update(updateAttributes,{include}),total=(_h=orderUpdated?.total_amount_cents)!==null&&_h!==void 0?_h:0;return setOrder&&setOrder(orderUpdated),yield Promise.all([(0,customerOrderOptions_1.saveToWallet)()&&total>0&&sdk.orders.update({id:order.id,_save_payment_source_to_customer_wallet:!0}).catch(error=>{const errors=(0,getErrors_1.default)({error,resource:"orders",field:paymentType});setOrderErrors&&setOrderErrors(errors)})]).then(()=>{(0,updateOrderSubscriptionCustomerPaymentSource_1.updateOrderSubscriptionCustomerPaymentSource)(orderUpdated,paymentType,sdk)}),{placed:!0,order:orderUpdated}}}}catch(error){const errors=(0,getErrors_1.default)({error,resource:"orders",field:paymentType});return setOrderErrors&&setOrderErrors(errors),Object.assign(Object.assign({},response),{errors})}}return response})}function setPlaceOrderStatus({status,dispatch}){dispatch?.({type:"setStatus",payload:{status}})}const type=["setErrors","setPlaceOrderPermitted","setButtonRef","setStatus"],placeOrderReducer=(state,reducer)=>(0,baseReducer_1.default)(state,reducer,type);exports.default=placeOrderReducer;
@@ -1,8 +1,8 @@
1
- import { type BaseAction, type LoaderType } from '../typings/index';
2
- import { type QueryPageSize, type Price } from '@commercelayer/sdk';
3
- import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
4
- import { type Dispatch } from 'react';
5
- import { type BaseError } from '../typings/errors';
1
+ import type { BaseAction, LoaderType } from '../typings/index';
2
+ import type { QueryPageSize, Price } from '@commercelayer/sdk';
3
+ import type { CommerceLayerConfig } from '../context/CommerceLayerContext';
4
+ import type { Dispatch } from 'react';
5
+ import type { BaseError } from '../typings/errors';
6
6
  export type Prices = Record<string, Price | Price[]>;
7
7
  type SkuCodesPrice = string[];
8
8
  export interface PriceState {
@@ -1,8 +1,8 @@
1
- import { type Dispatch } from 'react';
2
- import { type BaseError } from '../typings/errors';
3
- import { type DeliveryLeadTime, type LineItem, type Order, type Shipment } from '@commercelayer/sdk';
4
- import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
5
- import { type getOrderContext } from './OrderReducer';
1
+ import type { Dispatch } from 'react';
2
+ import type { BaseError } from '../typings/errors';
3
+ import type { DeliveryLeadTime, LineItem, Order, Shipment } from '@commercelayer/sdk';
4
+ import type { CommerceLayerConfig } from '../context/CommerceLayerContext';
5
+ import type { getOrderContext } from './OrderReducer';
6
6
  export type ShipmentActionType = 'setErrors' | 'setShipments' | 'setShippingMethod';
7
7
  export type ShipmentLineItem = LineItem & {
8
8
  line_item: LineItem;
@@ -1,8 +1,8 @@
1
- import { type Dispatch } from 'react';
2
- import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
1
+ import type { Dispatch } from 'react';
2
+ import type { CommerceLayerConfig } from '../context/CommerceLayerContext';
3
3
  import type { Order } from '@commercelayer/sdk';
4
- import { type getOrderContext } from './OrderReducer';
5
- import { type AddressResource } from './AddressReducer';
4
+ import type { getOrderContext } from './OrderReducer';
5
+ import type { AddressResource } from './AddressReducer';
6
6
  export type ShippingAddressActionType = 'setShippingAddress' | 'setShippingCustomerAddressId' | 'cleanup';
7
7
  export interface ShippingAddressActionPayload {
8
8
  _shipping_address_clone_id: string;
@@ -1,5 +1,5 @@
1
- import { type Dispatch } from 'react';
2
- import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
1
+ import type { Dispatch } from 'react';
2
+ import type { CommerceLayerConfig } from '../context/CommerceLayerContext';
3
3
  type SkuListsActionType = 'getSkuList' | 'setSkuList';
4
4
  export type SkuListsState = Partial<{
5
5
  listIds: string[];
@@ -1,7 +1,7 @@
1
- import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
2
- import { type BaseAction } from '../typings/index';
3
- import { type QueryParamsList, type Sku } from '@commercelayer/sdk';
4
- import { type Dispatch } from 'react';
1
+ import type { QueryParamsList, Sku } from '@commercelayer/sdk';
2
+ import type { Dispatch } from 'react';
3
+ import type { CommerceLayerConfig } from '../context/CommerceLayerContext';
4
+ import type { BaseAction } from '../typings/index';
5
5
  type SkuActionType = 'getSkus' | 'setLoading';
6
6
  type SkuAction = BaseAction<SkuActionType, SkuState>;
7
7
  export type SkuState = Partial<{
@@ -1,4 +1,4 @@
1
- import { type TResourceError } from '../components/errors/Errors';
1
+ import type { TResourceError } from '../components/errors/Errors';
2
2
  export type CodeErrorType = 'EMPTY_ERROR' | 'FILTER_NOT_ALLOWED' | 'FORBIDDEN' | 'INTERNAL_SERVER_ERROR' | 'INVALID_DATA_FORMAT' | 'INVALID_FIELD' | 'INVALID_FIELD_FORMAT' | 'INVALID_FIELD_VALUE' | 'INVALID_FILTERS_SYNTAX' | 'INVALID_FILTER_VALUE' | 'INVALID_INCLUDE' | 'INVALID_LINKS_OBJECT' | 'INVALID_PAGE_OBJECT' | 'INVALID_PAGE_VALUE' | 'INVALID_RESOURCE' | 'INVALID_RESOURCE_ID' | 'INVALID_SORT_CRITERIA' | 'INVALID_TOKEN' | 'KEY_NOT_INCLUDED_IN_URL' | 'KEY_ORDER_MISMATCH' | 'LOCKED' | 'NOT_ACCEPTABLE' | 'OUT_OF_STOCK' | 'PARAM_MISSING' | 'PARAM_NOT_ALLOWED' | 'PAYMENT_NOT_APPROVED_FOR_EXECUTION' | 'PAYMENT_INTENT_AUTHENTICATION_FAILURE' | 'RECORD_NOT_FOUND' | 'RECORD_NOT_FOUND' | 'RELATION_EXISTS' | 'NO_SHIPPING_METHODS' | 'SAVE_FAILED' | 'TYPE_MISMATCH' | 'UNAUTHORIZED' | 'UNSUPPORTED_MEDIA_TYPE' | 'VALIDATION_ERROR';
3
3
  export interface BaseError {
4
4
  code: CodeErrorType;
@@ -1,6 +1,6 @@
1
- import { type Dispatch, type ForwardedRef, type Ref, type JSX } from 'react';
1
+ import type { Dispatch, ForwardedRef, Ref, JSX } from 'react';
2
2
  import PropTypes, { type InferProps } from 'prop-types';
3
- import { type BaseError } from './errors';
3
+ import type { BaseError } from './errors';
4
4
  export declare const BC: {
5
5
  id: PropTypes.Requireable<string>;
6
6
  className: PropTypes.Requireable<string>;
@@ -1,6 +1,6 @@
1
- import { type BaseError } from '../typings/errors';
2
- import { type OrderUpdate, type Order, type CommerceLayerClient, type LineItem, type Address, type AddressCreate } from '@commercelayer/sdk';
3
- import { type TCustomerAddress } from '../reducers/CustomerReducer';
1
+ import type { BaseError } from '../typings/errors';
2
+ import type { OrderUpdate, Order, CommerceLayerClient, LineItem, Address, AddressCreate } from '@commercelayer/sdk';
3
+ import type { TCustomerAddress } from '../reducers/CustomerReducer';
4
4
  interface BillingAddressControllerProps {
5
5
  billing_address?: AddressCreate;
6
6
  billingAddressId?: string;
@@ -1,3 +1,3 @@
1
- import { type BaseReducer } from '../typings/index';
1
+ import type { BaseReducer } from '../typings/index';
2
2
  declare const baseReducer: BaseReducer;
3
3
  export default baseReducer;
@@ -1,4 +1,4 @@
1
- import { type Order } from '@commercelayer/sdk';
1
+ import type { Order } from '@commercelayer/sdk';
2
2
  /**
3
3
  * Check if the order can be placed
4
4
  */
@@ -1,4 +1,4 @@
1
- import { type ResourceIncluded } from '../reducers/OrderReducer';
1
+ import type { ResourceIncluded } from '../reducers/OrderReducer';
2
2
  import type { Order } from '@commercelayer/sdk';
3
3
  interface Params {
4
4
  order: Order;
@@ -1,2 +1,2 @@
1
- import { type BaseError } from '../typings/errors';
1
+ import type { BaseError } from '../typings/errors';
2
2
  export default function customMessages(messages: BaseError[] | undefined, v: BaseError): null | BaseError | undefined;
@@ -1,7 +1,7 @@
1
- import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
2
- import { type Order, type PaymentMethod, type QueryParamsRetrieve, type AddressCreate } from '@commercelayer/sdk';
3
- import { type PaymentRequestShippingOption } from '@stripe/stripe-js';
4
- import { type PaymentResource } from '../reducers/PaymentMethodReducer';
1
+ import type { CommerceLayerConfig } from '../context/CommerceLayerContext';
2
+ import type { Order, PaymentMethod, QueryParamsRetrieve, AddressCreate } from '@commercelayer/sdk';
3
+ import type { PaymentRequestShippingOption } from '@stripe/stripe-js';
4
+ import type { PaymentResource } from '../reducers/PaymentMethodReducer';
5
5
  export declare function getAvailableExpressPayments(paymentMethods: PaymentMethod[]): PaymentMethod[];
6
6
  interface TFakeAddressParams {
7
7
  /**
@@ -1,4 +1,4 @@
1
- import { type DefaultChildrenType } from '../typings/globals';
1
+ import type { DefaultChildrenType } from '../typings/globals';
2
2
  import type { JSX } from "react";
3
3
  interface Props<T> {
4
4
  children: DefaultChildrenType;
@@ -1,4 +1,4 @@
1
- import { type TCustomerAddress } from '../reducers/CustomerReducer';
1
+ import type { TCustomerAddress } from '../reducers/CustomerReducer';
2
2
  type CombinedAddressType = TCustomerAddress | undefined;
3
3
  export declare function formCleaner(address: CombinedAddressType): CombinedAddressType;
4
4
  export {};
@@ -1,6 +1,6 @@
1
- import { type IconBrand } from '../context/PaymentSourceContext';
2
- import { type PaymentResource } from '../reducers/PaymentMethodReducer';
3
- import { type CustomerPaymentSource } from '@commercelayer/sdk';
1
+ import type { IconBrand } from '../context/PaymentSourceContext';
2
+ import type { PaymentResource } from '../reducers/PaymentMethodReducer';
3
+ import type { CustomerPaymentSource } from '@commercelayer/sdk';
4
4
  interface CardDetails {
5
5
  brand: IconBrand | string;
6
6
  last4: string;
@@ -1,7 +1,7 @@
1
- import { type TResourceError } from '../components/errors/Errors';
1
+ import type { TResourceError } from '../components/errors/Errors';
2
2
  import type { BaseError, TAPIError } from '../typings/errors';
3
3
  import type { ValueIteratee } from 'lodash';
4
- import { type Dispatch } from 'react';
4
+ import type { Dispatch } from 'react';
5
5
  interface GetErrorsParams {
6
6
  error: TAPIError;
7
7
  resource: TResourceError;
@@ -1,3 +1,3 @@
1
- import { type LoaderType } from '../typings/index';
1
+ import type { LoaderType } from '../typings/index';
2
2
  import type { JSX } from "react";
3
3
  export default function getLoaderComponent(loader: LoaderType): JSX.Element;
@@ -1,9 +1,9 @@
1
1
  import type { PaypalConfig } from '../components/payment_source/PaypalPayment';
2
2
  import { type PaymentMethodConfig, type PaymentResource } from '../reducers/PaymentMethodReducer';
3
- import { type ExternalPayment } from '@commercelayer/sdk';
3
+ import type { ExternalPayment } from '@commercelayer/sdk';
4
4
  import { type StringReplace } from './replace';
5
5
  import { type SnakeToCamelCase } from './snakeToCamelCase';
6
- import { type StripeConfig } from '../components/payment_source/StripePayment';
6
+ import type { StripeConfig } from '../components/payment_source/StripePayment';
7
7
  interface Params<R extends PaymentResource, C extends PaymentMethodConfig> {
8
8
  resource: R;
9
9
  config: C;
@@ -1,4 +1,4 @@
1
- import { type Price } from '@commercelayer/sdk';
1
+ import type { Price } from '@commercelayer/sdk';
2
2
  import { type PTemplateProps } from '../components/utils/PriceTemplate';
3
3
  import type { JSX } from "react";
4
4
  export declare function getPriceByCode(skuPrices: Price[], code?: string): Price | undefined;
@@ -1,3 +1,3 @@
1
1
  import Sdk from '@commercelayer/sdk';
2
- import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
2
+ import type { CommerceLayerConfig } from '../context/CommerceLayerContext';
3
3
  export default function getSdk({ endpoint, accessToken }: CommerceLayerConfig): ReturnType<typeof Sdk>;