@commercelayer/react-components 4.17.0-beta.0 → 4.17.0-beta.3

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 (322) hide show
  1. package/README.md +2 -2
  2. package/lib/cjs/components/ExternalFunction.d.ts +1 -1
  3. package/lib/cjs/components/MetadataInput.d.ts +1 -0
  4. package/lib/cjs/components/SubmitButton.d.ts +2 -2
  5. package/lib/cjs/components/addresses/Address.d.ts +1 -0
  6. package/lib/cjs/components/addresses/AddressCountrySelector.d.ts +1 -0
  7. package/lib/cjs/components/addresses/AddressField.d.ts +1 -1
  8. package/lib/cjs/components/addresses/AddressInput.d.ts +1 -0
  9. package/lib/cjs/components/addresses/AddressInputSelect.d.ts +1 -0
  10. package/lib/cjs/components/addresses/AddressStateSelector.d.ts +1 -0
  11. package/lib/cjs/components/addresses/AddressesContainer.d.ts +1 -1
  12. package/lib/cjs/components/addresses/AddressesEmpty.d.ts +1 -0
  13. package/lib/cjs/components/addresses/BillingAddressContainer.d.ts +1 -1
  14. package/lib/cjs/components/addresses/BillingAddressForm.d.ts +1 -1
  15. package/lib/cjs/components/addresses/SaveAddressesButton.d.ts +1 -1
  16. package/lib/cjs/components/addresses/ShippingAddressContainer.d.ts +1 -0
  17. package/lib/cjs/components/addresses/ShippingAddressForm.d.ts +1 -1
  18. package/lib/cjs/components/auth/CommerceLayer.d.ts +1 -0
  19. package/lib/cjs/components/customers/CustomerAddressForm.d.ts +1 -1
  20. package/lib/cjs/components/customers/CustomerContainer.d.ts +1 -0
  21. package/lib/cjs/components/customers/CustomerField.d.ts +1 -0
  22. package/lib/cjs/components/customers/CustomerInput.d.ts +1 -0
  23. package/lib/cjs/components/customers/CustomerPaymentSource.d.ts +1 -0
  24. package/lib/cjs/components/customers/CustomerPaymentSourceEmpty.d.ts +1 -0
  25. package/lib/cjs/components/customers/MyAccountLink.d.ts +1 -0
  26. package/lib/cjs/components/customers/MyAccountLink.js +1 -1
  27. package/lib/cjs/components/customers/MyIdentityLink.d.ts +1 -0
  28. package/lib/cjs/components/customers/MyIdentityLink.js +1 -1
  29. package/lib/cjs/components/customers/SaveCustomerButton.d.ts +1 -1
  30. package/lib/cjs/components/errors/Errors.d.ts +1 -0
  31. package/lib/cjs/components/gift_cards/GiftCard.d.ts +3 -1
  32. package/lib/cjs/components/gift_cards/GiftCard.js +1 -1
  33. package/lib/cjs/components/gift_cards/GiftCardContainer.d.ts +1 -1
  34. package/lib/cjs/components/gift_cards/GiftCardCurrencySelector.d.ts +1 -0
  35. package/lib/cjs/components/gift_cards/GiftCardInput.d.ts +1 -0
  36. package/lib/cjs/components/gift_cards/GiftCardOrCouponCode.d.ts +1 -0
  37. package/lib/cjs/components/gift_cards/GiftCardOrCouponForm.d.ts +1 -0
  38. package/lib/cjs/components/gift_cards/GiftCardOrCouponInput.d.ts +1 -0
  39. package/lib/cjs/components/gift_cards/GiftCardOrCouponRemoveButton.d.ts +1 -1
  40. package/lib/cjs/components/gift_cards/GiftCardOrCouponSubmit.d.ts +1 -1
  41. package/lib/cjs/components/in_stock_subscriptions/InStockSubscriptionButton.d.ts +1 -0
  42. package/lib/cjs/components/in_stock_subscriptions/InStockSubscriptionsContainer.d.ts +1 -0
  43. package/lib/cjs/components/line_items/LineItem.d.ts +1 -0
  44. package/lib/cjs/components/line_items/LineItemAmount.d.ts +1 -0
  45. package/lib/cjs/components/line_items/LineItemCode.d.ts +1 -0
  46. package/lib/cjs/components/line_items/LineItemField.d.ts +1 -0
  47. package/lib/cjs/components/line_items/LineItemImage.d.ts +1 -0
  48. package/lib/cjs/components/line_items/LineItemName.d.ts +1 -0
  49. package/lib/cjs/components/line_items/LineItemOption.d.ts +1 -1
  50. package/lib/cjs/components/line_items/LineItemOptions.d.ts +1 -1
  51. package/lib/cjs/components/line_items/LineItemQuantity.d.ts +1 -0
  52. package/lib/cjs/components/line_items/LineItemRemoveLink.d.ts +1 -1
  53. package/lib/cjs/components/line_items/LineItemsContainer.d.ts +1 -0
  54. package/lib/cjs/components/line_items/LineItemsCount.d.ts +1 -0
  55. package/lib/cjs/components/line_items/LineItemsEmpty.d.ts +1 -0
  56. package/lib/cjs/components/orders/AddToCartButton.d.ts +1 -1
  57. package/lib/cjs/components/orders/AddToCartButton.js +1 -1
  58. package/lib/cjs/components/orders/AdjustmentAmount.d.ts +1 -0
  59. package/lib/cjs/components/orders/CartLink.d.ts +1 -1
  60. package/lib/cjs/components/orders/CartLink.js +1 -1
  61. package/lib/cjs/components/orders/CheckoutLink.d.ts +1 -0
  62. package/lib/cjs/components/orders/CheckoutLink.js +1 -1
  63. package/lib/cjs/components/orders/DiscountAmount.d.ts +1 -0
  64. package/lib/cjs/components/orders/GiftCardAmount.d.ts +1 -0
  65. package/lib/cjs/components/orders/HostedCart.d.ts +1 -1
  66. package/lib/cjs/components/orders/HostedCart.js +1 -1
  67. package/lib/cjs/components/orders/OrderContainer.d.ts +1 -0
  68. package/lib/cjs/components/orders/OrderList.d.ts +1 -0
  69. package/lib/cjs/components/orders/OrderListEmpty.d.ts +1 -0
  70. package/lib/cjs/components/orders/OrderListPaginationButtons.d.ts +1 -0
  71. package/lib/cjs/components/orders/OrderListPaginationInfo.d.ts +1 -0
  72. package/lib/cjs/components/orders/OrderListRow.d.ts +1 -0
  73. package/lib/cjs/components/orders/OrderNumber.d.ts +1 -0
  74. package/lib/cjs/components/orders/OrderStorage.d.ts +1 -1
  75. package/lib/cjs/components/orders/PaymentMethodAmount.d.ts +1 -0
  76. package/lib/cjs/components/orders/PlaceOrderButton.d.ts +1 -1
  77. package/lib/cjs/components/orders/PlaceOrderContainer.d.ts +1 -1
  78. package/lib/cjs/components/orders/PrivacyAndTermsCheckbox.d.ts +1 -0
  79. package/lib/cjs/components/orders/ShippingAmount.d.ts +1 -0
  80. package/lib/cjs/components/orders/SubTotalAmount.d.ts +1 -0
  81. package/lib/cjs/components/orders/TaxesAmount.d.ts +1 -0
  82. package/lib/cjs/components/orders/TotalAmount.d.ts +1 -0
  83. package/lib/cjs/components/parcels/ParcelField.d.ts +1 -0
  84. package/lib/cjs/components/parcels/ParcelLineItem.d.ts +1 -0
  85. package/lib/cjs/components/parcels/ParcelLineItemField.d.ts +1 -0
  86. package/lib/cjs/components/parcels/ParcelLineItemsCount.d.ts +1 -0
  87. package/lib/cjs/components/parcels/Parcels.d.ts +1 -0
  88. package/lib/cjs/components/parcels/ParcelsCount.d.ts +1 -0
  89. package/lib/cjs/components/payment_gateways/AdyenGateway.d.ts +1 -0
  90. package/lib/cjs/components/payment_gateways/AdyenGateway.js +1 -1
  91. package/lib/cjs/components/payment_gateways/BraintreeGateway.d.ts +1 -0
  92. package/lib/cjs/components/payment_gateways/CheckoutComGateway.d.ts +1 -0
  93. package/lib/cjs/components/payment_gateways/ExternalGateway.d.ts +1 -0
  94. package/lib/cjs/components/payment_gateways/KlarnaGateway.d.ts +1 -0
  95. package/lib/cjs/components/payment_gateways/PaymentGateway.d.ts +1 -0
  96. package/lib/cjs/components/payment_gateways/PaypalGateway.d.ts +1 -0
  97. package/lib/cjs/components/payment_gateways/StripeGateway.d.ts +1 -0
  98. package/lib/cjs/components/payment_gateways/WireTransferGateway.d.ts +1 -0
  99. package/lib/cjs/components/payment_methods/PaymentMethod.d.ts +1 -0
  100. package/lib/cjs/components/payment_methods/PaymentMethodName.d.ts +1 -0
  101. package/lib/cjs/components/payment_methods/PaymentMethodPrice.d.ts +1 -0
  102. package/lib/cjs/components/payment_methods/PaymentMethodRadioButton.d.ts +1 -1
  103. package/lib/cjs/components/payment_methods/PaymentMethodsContainer.d.ts +1 -1
  104. package/lib/cjs/components/payment_source/AdyenPayment.d.ts +29 -1
  105. package/lib/cjs/components/payment_source/AdyenPayment.js +1 -1
  106. package/lib/cjs/components/payment_source/BraintreePayment.d.ts +1 -0
  107. package/lib/cjs/components/payment_source/CheckoutComPayment.d.ts +1 -0
  108. package/lib/cjs/components/payment_source/ExternalPayment.d.ts +1 -0
  109. package/lib/cjs/components/payment_source/KlarnaPayment.d.ts +1 -0
  110. package/lib/cjs/components/payment_source/PaymentSource.d.ts +1 -0
  111. package/lib/cjs/components/payment_source/PaymentSourceBrandIcon.d.ts +1 -0
  112. package/lib/cjs/components/payment_source/PaymentSourceBrandName.d.ts +1 -0
  113. package/lib/cjs/components/payment_source/PaymentSourceDetail.d.ts +1 -0
  114. package/lib/cjs/components/payment_source/PaymentSourceEditButton.d.ts +1 -1
  115. package/lib/cjs/components/payment_source/PaypalPayment.d.ts +1 -1
  116. package/lib/cjs/components/payment_source/StripeExpressPayment.d.ts +1 -0
  117. package/lib/cjs/components/payment_source/StripePayment.d.ts +2 -1
  118. package/lib/cjs/components/payment_source/WireTransferPayment.d.ts +1 -0
  119. package/lib/cjs/components/prices/Price.d.ts +2 -1
  120. package/lib/cjs/components/prices/PricesContainer.d.ts +1 -0
  121. package/lib/cjs/components/shipments/Shipment.d.ts +1 -1
  122. package/lib/cjs/components/shipments/ShipmentField.d.ts +2 -1
  123. package/lib/cjs/components/shipments/ShipmentsContainer.d.ts +1 -1
  124. package/lib/cjs/components/shipments/ShipmentsCount.d.ts +2 -1
  125. package/lib/cjs/components/shipping_methods/ShippingMethod.d.ts +1 -1
  126. package/lib/cjs/components/shipping_methods/ShippingMethodName.d.ts +2 -1
  127. package/lib/cjs/components/shipping_methods/ShippingMethodPrice.d.ts +1 -0
  128. package/lib/cjs/components/shipping_methods/ShippingMethodRadioButton.d.ts +2 -1
  129. package/lib/cjs/components/shipping_methods/ShippingMethodRadioButton.js +1 -1
  130. package/lib/cjs/components/skus/AvailabilityContainer.d.ts +1 -1
  131. package/lib/cjs/components/skus/AvailabilityTemplate.d.ts +2 -1
  132. package/lib/cjs/components/skus/DeliveryLeadTime.d.ts +3 -2
  133. package/lib/cjs/components/skus/SkuField.d.ts +1 -0
  134. package/lib/cjs/components/skus/SkuList.d.ts +1 -1
  135. package/lib/cjs/components/skus/SkuListsContainer.d.ts +1 -1
  136. package/lib/cjs/components/skus/Skus.d.ts +1 -1
  137. package/lib/cjs/components/skus/SkusContainer.d.ts +1 -1
  138. package/lib/cjs/components/stock_transfers/StockTransfer.d.ts +1 -0
  139. package/lib/cjs/components/stock_transfers/StockTransferField.d.ts +1 -0
  140. package/lib/cjs/components/utils/AddressCardsTemplate.d.ts +1 -0
  141. package/lib/cjs/components/utils/BaseField.d.ts +2 -2
  142. package/lib/cjs/components/utils/BaseInput.d.ts +1 -1
  143. package/lib/cjs/components/utils/BaseOrderPrice.d.ts +2 -1
  144. package/lib/cjs/components/utils/ErrorBoundary.d.ts +1 -1
  145. package/lib/cjs/components/utils/GenericFieldComponent.d.ts +1 -1
  146. package/lib/cjs/components/utils/Parent.d.ts +1 -1
  147. package/lib/cjs/components/utils/PaymentCardsTemplate.d.ts +1 -0
  148. package/lib/cjs/components/utils/PriceTemplate.d.ts +1 -0
  149. package/lib/cjs/components/utils/getAllErrors.d.ts +2 -1
  150. package/lib/cjs/context/OrderListChildrenContext.d.ts +1 -0
  151. package/lib/cjs/context/PlaceOrderContext.d.ts +1 -1
  152. package/lib/cjs/reducers/OrderReducer.js +1 -1
  153. package/lib/cjs/reducers/PlaceOrderReducer.d.ts +2 -2
  154. package/lib/cjs/reducers/ShipmentReducer.js +1 -1
  155. package/lib/cjs/typings/globals.d.ts +1 -0
  156. package/lib/cjs/typings/index.d.ts +2 -2
  157. package/lib/cjs/utils/filterChildren.d.ts +1 -0
  158. package/lib/cjs/utils/getLoaderComponent.d.ts +1 -0
  159. package/lib/cjs/utils/getPrices.d.ts +1 -0
  160. package/lib/cjs/utils/organization.js +1 -1
  161. package/lib/esm/components/ExternalFunction.d.ts +1 -1
  162. package/lib/esm/components/MetadataInput.d.ts +1 -0
  163. package/lib/esm/components/SubmitButton.d.ts +2 -2
  164. package/lib/esm/components/addresses/Address.d.ts +1 -0
  165. package/lib/esm/components/addresses/AddressCountrySelector.d.ts +1 -0
  166. package/lib/esm/components/addresses/AddressField.d.ts +1 -1
  167. package/lib/esm/components/addresses/AddressInput.d.ts +1 -0
  168. package/lib/esm/components/addresses/AddressInputSelect.d.ts +1 -0
  169. package/lib/esm/components/addresses/AddressStateSelector.d.ts +1 -0
  170. package/lib/esm/components/addresses/AddressesContainer.d.ts +1 -1
  171. package/lib/esm/components/addresses/AddressesEmpty.d.ts +1 -0
  172. package/lib/esm/components/addresses/BillingAddressContainer.d.ts +1 -1
  173. package/lib/esm/components/addresses/BillingAddressForm.d.ts +1 -1
  174. package/lib/esm/components/addresses/SaveAddressesButton.d.ts +1 -1
  175. package/lib/esm/components/addresses/ShippingAddressContainer.d.ts +1 -0
  176. package/lib/esm/components/addresses/ShippingAddressForm.d.ts +1 -1
  177. package/lib/esm/components/auth/CommerceLayer.d.ts +1 -0
  178. package/lib/esm/components/customers/CustomerAddressForm.d.ts +1 -1
  179. package/lib/esm/components/customers/CustomerContainer.d.ts +1 -0
  180. package/lib/esm/components/customers/CustomerField.d.ts +1 -0
  181. package/lib/esm/components/customers/CustomerInput.d.ts +1 -0
  182. package/lib/esm/components/customers/CustomerPaymentSource.d.ts +1 -0
  183. package/lib/esm/components/customers/CustomerPaymentSourceEmpty.d.ts +1 -0
  184. package/lib/esm/components/customers/MyAccountLink.d.ts +1 -0
  185. package/lib/esm/components/customers/MyAccountLink.js +1 -1
  186. package/lib/esm/components/customers/MyIdentityLink.d.ts +1 -0
  187. package/lib/esm/components/customers/MyIdentityLink.js +1 -1
  188. package/lib/esm/components/customers/SaveCustomerButton.d.ts +1 -1
  189. package/lib/esm/components/errors/Errors.d.ts +1 -0
  190. package/lib/esm/components/gift_cards/GiftCard.d.ts +3 -1
  191. package/lib/esm/components/gift_cards/GiftCard.js +1 -1
  192. package/lib/esm/components/gift_cards/GiftCardContainer.d.ts +1 -1
  193. package/lib/esm/components/gift_cards/GiftCardCurrencySelector.d.ts +1 -0
  194. package/lib/esm/components/gift_cards/GiftCardInput.d.ts +1 -0
  195. package/lib/esm/components/gift_cards/GiftCardOrCouponCode.d.ts +1 -0
  196. package/lib/esm/components/gift_cards/GiftCardOrCouponForm.d.ts +1 -0
  197. package/lib/esm/components/gift_cards/GiftCardOrCouponInput.d.ts +1 -0
  198. package/lib/esm/components/gift_cards/GiftCardOrCouponRemoveButton.d.ts +1 -1
  199. package/lib/esm/components/gift_cards/GiftCardOrCouponSubmit.d.ts +1 -1
  200. package/lib/esm/components/in_stock_subscriptions/InStockSubscriptionButton.d.ts +1 -0
  201. package/lib/esm/components/in_stock_subscriptions/InStockSubscriptionsContainer.d.ts +1 -0
  202. package/lib/esm/components/line_items/LineItem.d.ts +1 -0
  203. package/lib/esm/components/line_items/LineItemAmount.d.ts +1 -0
  204. package/lib/esm/components/line_items/LineItemCode.d.ts +1 -0
  205. package/lib/esm/components/line_items/LineItemField.d.ts +1 -0
  206. package/lib/esm/components/line_items/LineItemImage.d.ts +1 -0
  207. package/lib/esm/components/line_items/LineItemName.d.ts +1 -0
  208. package/lib/esm/components/line_items/LineItemOption.d.ts +1 -1
  209. package/lib/esm/components/line_items/LineItemOptions.d.ts +1 -1
  210. package/lib/esm/components/line_items/LineItemQuantity.d.ts +1 -0
  211. package/lib/esm/components/line_items/LineItemRemoveLink.d.ts +1 -1
  212. package/lib/esm/components/line_items/LineItemsContainer.d.ts +1 -0
  213. package/lib/esm/components/line_items/LineItemsCount.d.ts +1 -0
  214. package/lib/esm/components/line_items/LineItemsEmpty.d.ts +1 -0
  215. package/lib/esm/components/orders/AddToCartButton.d.ts +1 -1
  216. package/lib/esm/components/orders/AddToCartButton.js +1 -1
  217. package/lib/esm/components/orders/AdjustmentAmount.d.ts +1 -0
  218. package/lib/esm/components/orders/CartLink.d.ts +1 -1
  219. package/lib/esm/components/orders/CartLink.js +1 -1
  220. package/lib/esm/components/orders/CheckoutLink.d.ts +1 -0
  221. package/lib/esm/components/orders/CheckoutLink.js +1 -1
  222. package/lib/esm/components/orders/DiscountAmount.d.ts +1 -0
  223. package/lib/esm/components/orders/GiftCardAmount.d.ts +1 -0
  224. package/lib/esm/components/orders/HostedCart.d.ts +1 -1
  225. package/lib/esm/components/orders/HostedCart.js +1 -1
  226. package/lib/esm/components/orders/OrderContainer.d.ts +1 -0
  227. package/lib/esm/components/orders/OrderList.d.ts +1 -0
  228. package/lib/esm/components/orders/OrderListEmpty.d.ts +1 -0
  229. package/lib/esm/components/orders/OrderListPaginationButtons.d.ts +1 -0
  230. package/lib/esm/components/orders/OrderListPaginationInfo.d.ts +1 -0
  231. package/lib/esm/components/orders/OrderListRow.d.ts +1 -0
  232. package/lib/esm/components/orders/OrderNumber.d.ts +1 -0
  233. package/lib/esm/components/orders/OrderStorage.d.ts +1 -1
  234. package/lib/esm/components/orders/PaymentMethodAmount.d.ts +1 -0
  235. package/lib/esm/components/orders/PlaceOrderButton.d.ts +1 -1
  236. package/lib/esm/components/orders/PlaceOrderContainer.d.ts +1 -1
  237. package/lib/esm/components/orders/PrivacyAndTermsCheckbox.d.ts +1 -0
  238. package/lib/esm/components/orders/ShippingAmount.d.ts +1 -0
  239. package/lib/esm/components/orders/SubTotalAmount.d.ts +1 -0
  240. package/lib/esm/components/orders/TaxesAmount.d.ts +1 -0
  241. package/lib/esm/components/orders/TotalAmount.d.ts +1 -0
  242. package/lib/esm/components/parcels/ParcelField.d.ts +1 -0
  243. package/lib/esm/components/parcels/ParcelLineItem.d.ts +1 -0
  244. package/lib/esm/components/parcels/ParcelLineItemField.d.ts +1 -0
  245. package/lib/esm/components/parcels/ParcelLineItemsCount.d.ts +1 -0
  246. package/lib/esm/components/parcels/Parcels.d.ts +1 -0
  247. package/lib/esm/components/parcels/ParcelsCount.d.ts +1 -0
  248. package/lib/esm/components/payment_gateways/AdyenGateway.d.ts +1 -0
  249. package/lib/esm/components/payment_gateways/AdyenGateway.js +1 -1
  250. package/lib/esm/components/payment_gateways/BraintreeGateway.d.ts +1 -0
  251. package/lib/esm/components/payment_gateways/CheckoutComGateway.d.ts +1 -0
  252. package/lib/esm/components/payment_gateways/ExternalGateway.d.ts +1 -0
  253. package/lib/esm/components/payment_gateways/KlarnaGateway.d.ts +1 -0
  254. package/lib/esm/components/payment_gateways/PaymentGateway.d.ts +1 -0
  255. package/lib/esm/components/payment_gateways/PaypalGateway.d.ts +1 -0
  256. package/lib/esm/components/payment_gateways/StripeGateway.d.ts +1 -0
  257. package/lib/esm/components/payment_gateways/WireTransferGateway.d.ts +1 -0
  258. package/lib/esm/components/payment_methods/PaymentMethod.d.ts +1 -0
  259. package/lib/esm/components/payment_methods/PaymentMethodName.d.ts +1 -0
  260. package/lib/esm/components/payment_methods/PaymentMethodPrice.d.ts +1 -0
  261. package/lib/esm/components/payment_methods/PaymentMethodRadioButton.d.ts +1 -1
  262. package/lib/esm/components/payment_methods/PaymentMethodsContainer.d.ts +1 -1
  263. package/lib/esm/components/payment_source/AdyenPayment.d.ts +29 -1
  264. package/lib/esm/components/payment_source/AdyenPayment.js +1 -1
  265. package/lib/esm/components/payment_source/BraintreePayment.d.ts +1 -0
  266. package/lib/esm/components/payment_source/CheckoutComPayment.d.ts +1 -0
  267. package/lib/esm/components/payment_source/ExternalPayment.d.ts +1 -0
  268. package/lib/esm/components/payment_source/KlarnaPayment.d.ts +1 -0
  269. package/lib/esm/components/payment_source/PaymentSource.d.ts +1 -0
  270. package/lib/esm/components/payment_source/PaymentSourceBrandIcon.d.ts +1 -0
  271. package/lib/esm/components/payment_source/PaymentSourceBrandName.d.ts +1 -0
  272. package/lib/esm/components/payment_source/PaymentSourceDetail.d.ts +1 -0
  273. package/lib/esm/components/payment_source/PaymentSourceEditButton.d.ts +1 -1
  274. package/lib/esm/components/payment_source/PaypalPayment.d.ts +1 -1
  275. package/lib/esm/components/payment_source/StripeExpressPayment.d.ts +1 -0
  276. package/lib/esm/components/payment_source/StripePayment.d.ts +2 -1
  277. package/lib/esm/components/payment_source/WireTransferPayment.d.ts +1 -0
  278. package/lib/esm/components/prices/Price.d.ts +2 -1
  279. package/lib/esm/components/prices/PricesContainer.d.ts +1 -0
  280. package/lib/esm/components/shipments/Shipment.d.ts +1 -1
  281. package/lib/esm/components/shipments/ShipmentField.d.ts +2 -1
  282. package/lib/esm/components/shipments/ShipmentsContainer.d.ts +1 -1
  283. package/lib/esm/components/shipments/ShipmentsCount.d.ts +2 -1
  284. package/lib/esm/components/shipping_methods/ShippingMethod.d.ts +1 -1
  285. package/lib/esm/components/shipping_methods/ShippingMethodName.d.ts +2 -1
  286. package/lib/esm/components/shipping_methods/ShippingMethodPrice.d.ts +1 -0
  287. package/lib/esm/components/shipping_methods/ShippingMethodRadioButton.d.ts +2 -1
  288. package/lib/esm/components/shipping_methods/ShippingMethodRadioButton.js +1 -1
  289. package/lib/esm/components/skus/AvailabilityContainer.d.ts +1 -1
  290. package/lib/esm/components/skus/AvailabilityTemplate.d.ts +2 -1
  291. package/lib/esm/components/skus/DeliveryLeadTime.d.ts +3 -2
  292. package/lib/esm/components/skus/SkuField.d.ts +1 -0
  293. package/lib/esm/components/skus/SkuList.d.ts +1 -1
  294. package/lib/esm/components/skus/SkuListsContainer.d.ts +1 -1
  295. package/lib/esm/components/skus/Skus.d.ts +1 -1
  296. package/lib/esm/components/skus/SkusContainer.d.ts +1 -1
  297. package/lib/esm/components/stock_transfers/StockTransfer.d.ts +1 -0
  298. package/lib/esm/components/stock_transfers/StockTransferField.d.ts +1 -0
  299. package/lib/esm/components/utils/AddressCardsTemplate.d.ts +1 -0
  300. package/lib/esm/components/utils/BaseField.d.ts +2 -2
  301. package/lib/esm/components/utils/BaseInput.d.ts +1 -1
  302. package/lib/esm/components/utils/BaseOrderPrice.d.ts +2 -1
  303. package/lib/esm/components/utils/ErrorBoundary.d.ts +1 -1
  304. package/lib/esm/components/utils/GenericFieldComponent.d.ts +1 -1
  305. package/lib/esm/components/utils/Parent.d.ts +1 -1
  306. package/lib/esm/components/utils/PaymentCardsTemplate.d.ts +1 -0
  307. package/lib/esm/components/utils/PriceTemplate.d.ts +1 -0
  308. package/lib/esm/components/utils/getAllErrors.d.ts +2 -1
  309. package/lib/esm/context/OrderListChildrenContext.d.ts +1 -0
  310. package/lib/esm/context/PlaceOrderContext.d.ts +1 -1
  311. package/lib/esm/reducers/OrderReducer.js +1 -1
  312. package/lib/esm/reducers/PlaceOrderReducer.d.ts +2 -2
  313. package/lib/esm/reducers/ShipmentReducer.js +1 -1
  314. package/lib/esm/typings/globals.d.ts +1 -0
  315. package/lib/esm/typings/index.d.ts +2 -2
  316. package/lib/esm/utils/filterChildren.d.ts +1 -0
  317. package/lib/esm/utils/getLoaderComponent.d.ts +1 -0
  318. package/lib/esm/utils/getPrices.d.ts +1 -0
  319. package/lib/esm/utils/organization.js +1 -1
  320. package/lib/tsconfig.prod.esm.tsbuildinfo +1 -1
  321. package/lib/tsconfig.prod.tsbuildinfo +1 -1
  322. package/package.json +27 -27
@@ -1,4 +1,5 @@
1
1
  import { type IconBrand } from '../../context/PaymentSourceContext';
2
+ import { type JSX } from 'react';
2
3
  import { type ChildrenFunction } from '../../typings/index';
3
4
  interface ChildrenProps extends Omit<Props, 'children'> {
4
5
  brand: IconBrand;
@@ -1,4 +1,5 @@
1
1
  import { type IconBrand } from '../../context/PaymentSourceContext';
2
+ import { type JSX } from 'react';
2
3
  import { type ChildrenFunction } from '../../typings/index';
3
4
  interface CustomComponent extends Omit<Props, 'children'> {
4
5
  brand: IconBrand;
@@ -1,3 +1,4 @@
1
+ import { type JSX } from 'react';
1
2
  import type { ChildrenFunction } from '../../typings/index';
2
3
  export type PaymentSourceDetailType = 'last4' | 'exp_year' | 'exp_month';
3
4
  interface ChildrenProps extends Omit<Props, 'children'> {
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from 'react';
1
+ import { type ReactNode, type JSX } from 'react';
2
2
  import { type ChildrenFunction } from '../../typings/index';
3
3
  interface CustomComponent extends Omit<Props, 'children'> {
4
4
  }
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from 'react';
1
+ import { type ReactNode, type JSX } from 'react';
2
2
  export interface PaypalConfig {
3
3
  return_url: string;
4
4
  cancel_url: string;
@@ -1,3 +1,4 @@
1
+ import { type JSX } from 'react';
1
2
  interface Props {
2
3
  clientSecret: string;
3
4
  }
@@ -1,3 +1,4 @@
1
+ import { type JSX } from 'react';
1
2
  import { type StripeElementLocale, type StripeElementsOptions, type StripePaymentElementOptions } from '@stripe/stripe-js';
2
3
  import { type PaymentMethodConfig } from '../../reducers/PaymentMethodReducer';
3
4
  import { type PaymentSourceProps } from './PaymentSource';
@@ -9,7 +10,7 @@ export interface StripeConfig {
9
10
  appearance?: StripeElementsOptions['appearance'];
10
11
  [key: string]: any;
11
12
  }
12
- type Props = PaymentMethodConfig['stripePayment'] & JSX.IntrinsicElements['div'] & Partial<PaymentSourceProps['templateCustomerSaveToWallet']> & {
13
+ type Props = PaymentMethodConfig['stripePayment'] & Omit<JSX.IntrinsicElements['div'], 'ref'> & Partial<PaymentSourceProps['templateCustomerSaveToWallet']> & {
13
14
  show?: boolean;
14
15
  publishableKey: string;
15
16
  locale?: StripeElementLocale;
@@ -1,3 +1,4 @@
1
+ import { type JSX } from 'react';
1
2
  export interface WireTransferConfig {
2
3
  infoMessage?: {
3
4
  text?: string | JSX.Element[];
@@ -1,3 +1,4 @@
1
+ import { type JSX } from 'react';
1
2
  import { type Price as PriceType } from '@commercelayer/sdk';
2
3
  import { type ChildrenFunction, type LoaderType } from '../../typings/index';
3
4
  interface PriceChildrenProps extends Omit<PriceProps, 'children'> {
@@ -5,7 +6,7 @@ interface PriceChildrenProps extends Omit<PriceProps, 'children'> {
5
6
  loader: LoaderType;
6
7
  prices: PriceType[];
7
8
  }
8
- export interface PriceProps extends Omit<JSX.IntrinsicElements['span'], 'children'> {
9
+ export interface PriceProps extends Omit<JSX.IntrinsicElements['span'], 'children' | 'ref'> {
9
10
  children?: ChildrenFunction<PriceChildrenProps>;
10
11
  /**
11
12
  * CSS class name to be added for the compare price
@@ -1,3 +1,4 @@
1
+ import { type JSX } from 'react';
1
2
  import { type LoaderType } from '../../typings/index';
2
3
  import { type QueryPageSize } from '@commercelayer/sdk';
3
4
  interface Props {
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from 'react';
1
+ import { type ReactNode, type JSX } from 'react';
2
2
  import type { LoaderType } from '../../typings/index';
3
3
  import type { Order } from '@commercelayer/sdk';
4
4
  interface ShipmentProps {
@@ -1,9 +1,10 @@
1
+ import { type JSX } from 'react';
1
2
  import { type Shipment } from '@commercelayer/sdk';
2
3
  type ShipmentFieldChildrenProps = Omit<Props, 'children'> & {
3
4
  shipment: Shipment;
4
5
  };
5
6
  export type ShipmentAttribute = 'number' | 'currency_code' | 'status' | 'cost_amount_cents' | 'cost_amount_float' | 'formatted_cost_amount' | 'key_number';
6
- interface Props extends Omit<JSX.IntrinsicElements['span'], 'children'> {
7
+ interface Props extends Omit<JSX.IntrinsicElements['span'], 'children' | 'ref'> {
7
8
  children?: (props: ShipmentFieldChildrenProps) => JSX.Element;
8
9
  name: ShipmentAttribute;
9
10
  }
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from 'react';
1
+ import { type ReactNode, type JSX } from 'react';
2
2
  interface Props {
3
3
  children: ReactNode;
4
4
  }
@@ -1,5 +1,6 @@
1
1
  import { type ChildrenFunction } from '../../typings/index';
2
2
  import type { Shipment } from '@commercelayer/sdk';
3
+ import type { JSX } from "react";
3
4
  interface ChildrenProps extends Omit<Props, 'children'> {
4
5
  /**
5
6
  * Shipments of the current order
@@ -10,7 +11,7 @@ interface ChildrenProps extends Omit<Props, 'children'> {
10
11
  */
11
12
  quantity: number;
12
13
  }
13
- interface Props extends Omit<JSX.IntrinsicElements['span'], 'children'> {
14
+ interface Props extends Omit<JSX.IntrinsicElements['span'], 'children' | 'ref'> {
14
15
  children?: ChildrenFunction<ChildrenProps>;
15
16
  }
16
17
  export declare function ShipmentsCount({ children, ...p }: Props): JSX.Element;
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from 'react';
1
+ import { type ReactNode, type JSX } from 'react';
2
2
  interface Props {
3
3
  children: ReactNode;
4
4
  readonly?: boolean;
@@ -1,9 +1,10 @@
1
+ import { type JSX } from 'react';
1
2
  import { type ShippingMethod } from '@commercelayer/sdk';
2
3
  type ChildrenProps = Omit<Props, 'children'> & {
3
4
  label: string;
4
5
  shippingMethod: ShippingMethod;
5
6
  };
6
- interface Props extends Omit<JSX.IntrinsicElements['label'], 'children'> {
7
+ interface Props extends Omit<JSX.IntrinsicElements['label'], 'children' | 'ref'> {
7
8
  children?: (props: ChildrenProps) => JSX.Element;
8
9
  }
9
10
  export declare function ShippingMethodName(props: Props): JSX.Element;
@@ -1,3 +1,4 @@
1
+ import { type JSX } from 'react';
1
2
  import { type BaseAmountComponent } from '../../typings/index';
2
3
  type Props = BaseAmountComponent & {
3
4
  /**
@@ -1,3 +1,4 @@
1
+ import { type JSX } from 'react';
1
2
  import type { Order, ShippingMethod } from '@commercelayer/sdk';
2
3
  interface ShippingMethodRadioButtonType extends Omit<Props, 'children'> {
3
4
  shippingMethod: ShippingMethod;
@@ -11,6 +12,6 @@ interface TOnChange {
11
12
  type Props = {
12
13
  children?: (props: ShippingMethodRadioButtonType) => JSX.Element;
13
14
  onChange?: (params: TOnChange) => void;
14
- } & Omit<JSX.IntrinsicElements['input'], 'onChange'>;
15
+ } & Omit<JSX.IntrinsicElements['input'], 'onChange' | 'ref' | 'children'>;
15
16
  export declare function ShippingMethodRadioButton(props: Props): JSX.Element;
16
17
  export default ShippingMethodRadioButton;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as _jsx}from"react/jsx-runtime";import{useContext,useEffect,useState}from"react";import ShippingMethodChildrenContext from"../../context/ShippingMethodChildrenContext";import Parent from"../utils/Parent";import ShipmentContext from"../../context/ShipmentContext";export function ShippingMethodRadioButton(props){const{onChange,...p}=props,[checked,setChecked]=useState(!1),[disabled,setDisabled]=useState(!1),{shippingMethod,currentShippingMethodId,shipmentId}=useContext(ShippingMethodChildrenContext),{setShippingMethod}=useContext(ShipmentContext),shippingMethodId=shippingMethod?.id,name=`shipment-${shipmentId??""}`,id=`${name}-${shippingMethodId??""}`;useEffect(()=>(setChecked(shippingMethodId===currentShippingMethodId),()=>{setChecked(!1)}),[currentShippingMethodId,shippingMethodId]);const handleOnChange=async()=>{if(setDisabled(!0),shipmentId&&shippingMethodId&&setShippingMethod!=null){const{order}=await setShippingMethod(shipmentId,shippingMethodId);shippingMethod&&onChange!=null&&onChange({shippingMethod,shipmentId,order})}setDisabled(!1)},parentProps={shippingMethod,shipmentId,handleOnChange,name,id,disabled,...props};return props.children?_jsx(Parent,{...parentProps,children:props.children}):_jsx("input",{disabled,type:"radio",name,id,onChange:e=>{e.preventDefault(),e.stopPropagation(),handleOnChange()},checked,...p})}export default ShippingMethodRadioButton;
2
+ import{jsx as _jsx}from"react/jsx-runtime";import{useContext,useEffect,useState}from"react";import ShippingMethodChildrenContext from"../../context/ShippingMethodChildrenContext";import Parent from"../utils/Parent";import ShipmentContext from"../../context/ShipmentContext";export function ShippingMethodRadioButton(props){const{onChange,children,...p}=props,[checked,setChecked]=useState(!1),[disabled,setDisabled]=useState(!1),{shippingMethod,currentShippingMethodId,shipmentId}=useContext(ShippingMethodChildrenContext),{setShippingMethod}=useContext(ShipmentContext),shippingMethodId=shippingMethod?.id,name=`shipment-${shipmentId??""}`,id=`${name}-${shippingMethodId??""}`;useEffect(()=>(setChecked(shippingMethodId===currentShippingMethodId),()=>{setChecked(!1)}),[currentShippingMethodId,shippingMethodId]);const handleOnChange=async()=>{if(setDisabled(!0),shipmentId&&shippingMethodId&&setShippingMethod!=null){const{order}=await setShippingMethod(shipmentId,shippingMethodId);shippingMethod&&onChange!=null&&onChange({shippingMethod,shipmentId,order})}setDisabled(!1)},parentProps={shippingMethod,shipmentId,handleOnChange,name,id,disabled,...props};return children?_jsx(Parent,{...parentProps,children}):_jsx("input",{disabled,type:"radio",name,id,onChange:e=>{e.preventDefault(),e.stopPropagation(),handleOnChange()},checked,...p})}export default ShippingMethodRadioButton;
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from 'react';
1
+ import { type ReactNode, type JSX } from 'react';
2
2
  interface Props {
3
3
  /**
4
4
  * The children component
@@ -1,5 +1,6 @@
1
1
  import { type TimeFormat, type ChildrenFunction } from '../../typings/index';
2
2
  import { type DeliveryLeadTime } from '../../reducers/AvailabilityReducer';
3
+ import type { JSX } from "react";
3
4
  interface AvailabilityTemplateChildrenProps extends Omit<Props, 'children'>, DeliveryLeadTime {
4
5
  text: string;
5
6
  quantity: number;
@@ -34,7 +35,7 @@ type Props = {
34
35
  outOfStock?: string;
35
36
  negativeStock?: string;
36
37
  };
37
- } & Omit<JSX.IntrinsicElements['span'], 'children'> & FormatRules;
38
+ } & Omit<JSX.IntrinsicElements['span'], 'children' | 'ref'> & FormatRules;
38
39
  /**
39
40
  * The AvailabilityTemplate component displays the availability of the SKU specified
40
41
  * in the parent `<AvailabilityContainer>` component.
@@ -1,6 +1,7 @@
1
+ import { type JSX } from 'react';
1
2
  export type DeliveryLeadTimeField = 'min_hours' | 'max_hours' | 'min_days' | 'max_days';
2
- export type DeliveryLeadTimeComponentChildren = Omit<Props, 'children'>;
3
- type Props = Partial<JSX.IntrinsicElements['span']> & {
3
+ export type DeliveryLeadTimeComponentChildren = Omit<Props, 'children' | 'ref'>;
4
+ type Props = Partial<Omit<JSX.IntrinsicElements['span'], 'ref'>> & {
4
5
  children?: (props: DeliveryLeadTimeComponentChildren) => JSX.Element;
5
6
  type: DeliveryLeadTimeField;
6
7
  text?: string;
@@ -1,5 +1,6 @@
1
1
  import { type ConditionalElement } from '../../typings/index';
2
2
  import { type TGenericChildrenProps, type TResources } from '../utils/GenericFieldComponent';
3
+ import type { JSX } from "react";
3
4
  type SkuFieldChildrenProps = TGenericChildrenProps<TResources['Sku']>;
4
5
  type TCondition = ConditionalElement<Exclude<TResources['Sku'], 'resource'>>;
5
6
  type Props = {
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from 'react';
1
+ import { type ReactNode, type JSX } from 'react';
2
2
  interface Props {
3
3
  children: ReactNode;
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from 'react';
1
+ import { type ReactNode, type JSX } from 'react';
2
2
  interface Props {
3
3
  children: ReactNode;
4
4
  }
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from 'react';
1
+ import { type ReactNode, type JSX } from 'react';
2
2
  interface Props {
3
3
  children: ReactNode;
4
4
  }
@@ -1,5 +1,5 @@
1
1
  import type { QueryParamsList } from '@commercelayer/sdk';
2
- import { type ReactNode } from 'react';
2
+ import { type ReactNode, type JSX } from 'react';
3
3
  interface Props {
4
4
  /**
5
5
  * An array of skus to display.
@@ -1,3 +1,4 @@
1
+ import { type JSX } from 'react';
1
2
  import type { DefaultChildrenType } from '../../typings/globals';
2
3
  interface Props {
3
4
  children: DefaultChildrenType;
@@ -1,5 +1,6 @@
1
1
  import { type ConditionalElement } from '../../typings/index';
2
2
  import { type TGenericChildrenProps, type TResources } from '../utils/GenericFieldComponent';
3
+ import type { JSX } from "react";
3
4
  type StockTransferFieldChildrenProps = TGenericChildrenProps<TResources['StockTransfer']>;
4
5
  type TCondition = ConditionalElement<Exclude<TResources['StockTransfer'], 'resource'>>;
5
6
  type Props = {
@@ -1,3 +1,4 @@
1
+ import { type JSX } from 'react';
1
2
  import type { Address } from '@commercelayer/sdk';
2
3
  import AddressChildrenContext from '../../context/AddressChildrenContext';
3
4
  import { type ChildrenFunction } from '../../typings/index';
@@ -1,6 +1,6 @@
1
- import { type FunctionComponent } from 'react';
1
+ import { type FunctionComponent, type JSX } from 'react';
2
2
  type BaseFieldChildren = Omit<BaseFieldProps, 'children'>;
3
- export interface BaseFieldProps extends Omit<JSX.IntrinsicElements['span'], 'children'> {
3
+ export interface BaseFieldProps extends Omit<JSX.IntrinsicElements['span'], 'children' | 'ref'> {
4
4
  attribute: 'number' | 'id';
5
5
  children?: (props: BaseFieldChildren) => JSX.Element;
6
6
  }
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { type JSX } from 'react';
2
2
  import { type BaseInputComponentProps } from '../../typings/index';
3
3
  export type BaseInputProps = BaseInputComponentProps & Omit<JSX.IntrinsicElements['input'], 'children' | 'pattern'> & Omit<JSX.IntrinsicElements['textarea'], 'children' | 'pattern'>;
4
4
  declare const _default: React.ForwardRefExoticComponent<Omit<BaseInputProps, "ref"> & React.RefAttributes<any>>;
@@ -1,5 +1,6 @@
1
+ import { type JSX } from 'react';
1
2
  import { type PropsType } from '../../utils/PropsType';
2
3
  import { type baseOrderPricePropTypes } from '../../typings/index';
3
- export type BaseOrderPriceProps = PropsType<typeof baseOrderPricePropTypes, unknown> & Omit<JSX.IntrinsicElements['span'], 'children'>;
4
+ export type BaseOrderPriceProps = PropsType<typeof baseOrderPricePropTypes, unknown> & Omit<JSX.IntrinsicElements['span'], 'children' | 'ref'>;
4
5
  export declare function BaseOrderPrice(props: BaseOrderPriceProps): JSX.Element;
5
6
  export default BaseOrderPrice;
@@ -1,4 +1,4 @@
1
- import { Component, type ErrorInfo } from 'react';
1
+ import { Component, type ErrorInfo, type JSX } from 'react';
2
2
  interface Props {
3
3
  children: JSX.Element;
4
4
  }
@@ -2,7 +2,7 @@ import { type InitialSkuContext } from '../../context/SkuChildrenContext';
2
2
  import { type InitialStockTransferContext } from '../../context/StockTransferChildrenContext';
3
3
  import type { Customer, LineItem, Sku, Parcel, ParcelLineItem } from '@commercelayer/sdk';
4
4
  import { type InitialLineItemChildrenContext } from '../../context/LineItemChildrenContext';
5
- import { type Context } from 'react';
5
+ import { type Context, type JSX } from 'react';
6
6
  import { type InitialCustomerContext } from '../../context/CustomerContext';
7
7
  import { type InitialParcelContext } from '../../context/ParcelChildrenContext';
8
8
  import { type InitialParcelLineItemContext } from '../../context/ParcelLineItemChildrenContext';
@@ -1,4 +1,4 @@
1
- import { type Component, type ForwardedRef } from 'react';
1
+ import { type Component, type ForwardedRef, type JSX } from 'react';
2
2
  export interface ParentProps {
3
3
  parentRef?: ForwardedRef<any>;
4
4
  children?: typeof Component | ((P: any) => JSX.Element | null);
@@ -1,3 +1,4 @@
1
+ import { type JSX } from 'react';
1
2
  import { type PaymentResource } from '../../reducers/PaymentMethodReducer';
2
3
  import PaymentSourceContext, { type IconBrand } from '../../context/PaymentSourceContext';
3
4
  import { type ChildrenFunction } from '../../typings/index';
@@ -1,4 +1,5 @@
1
1
  import { type PriceProps } from '../prices/Price';
2
+ import type { JSX } from "react";
2
3
  export type PTemplateProps = {
3
4
  formattedAmount?: string | null;
4
5
  formattedCompare?: string | null;
@@ -1,11 +1,12 @@
1
1
  import { type LineItem } from '@commercelayer/sdk';
2
2
  import { type BaseError } from '../../typings/errors';
3
3
  import { type TResourceError } from '../errors/Errors';
4
+ import type { JSX } from "react";
4
5
  export interface AllErrorsParams {
5
6
  allErrors: BaseError[];
6
7
  messages: BaseError[];
7
8
  field?: string;
8
- props: JSX.IntrinsicElements['span'];
9
+ props: Omit<JSX.IntrinsicElements['span'], 'ref'>;
9
10
  lineItem?: LineItem | null;
10
11
  resource?: TResourceError;
11
12
  returnHtml?: boolean;
@@ -1,5 +1,6 @@
1
1
  import type { Order, OrderSubscription } from '@commercelayer/sdk';
2
2
  import { type Row } from '@tanstack/react-table';
3
+ import { type JSX } from 'react';
3
4
  export type TOrderList = 'orders' | 'subscriptions';
4
5
  export type TableAccessor<T extends TOrderList> = T extends 'orders' ? keyof Order : keyof OrderSubscription;
5
6
  export type OrderListContent<T extends TOrderList> = T extends 'orders' ? Order : OrderSubscription;
@@ -4,7 +4,7 @@ type DefaultContext = {
4
4
  setPlaceOrderErrors?: typeof setPlaceOrderErrors;
5
5
  setPlaceOrder?: typeof setPlaceOrder;
6
6
  placeOrderPermitted?: () => void;
7
- setButtonRef?: (ref: RefObject<HTMLButtonElement>) => void;
7
+ setButtonRef?: (ref: RefObject<HTMLButtonElement | null>) => void;
8
8
  setPlaceOrderStatus?: typeof setPlaceOrderStatus;
9
9
  } & PlaceOrderState;
10
10
  export declare const defaultPlaceOrderContext: DefaultContext;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{setCustomerOrderParam}from"../utils/localStorage";import baseReducer from"../utils/baseReducer";import isEmpty from"lodash/isEmpty";import getSdk from"../utils/getSdk";import getErrors,{setErrors}from"../utils/getErrors";import{getOrganizationConfig}from"../utils/organization";import{publish}from"../utils/events";import{getDomain}from"../utils/getDomain";import{getApplicationLink}from"../utils/getApplicationLink";const actionType=["setLoading","setOrderId","setOrder","setSingleQuantity","setCurrentSkuCodes","setCurrentSkuPrices","setErrors","setCurrentItem","setSaveAddressToCustomerAddressBook","setIncludesResource"];export async function createOrder(params){if(params){const{persistKey,state,dispatch,config,orderMetadata:metadata,orderAttributes={},setLocalOrder}=params;if(state?.orderId)return state.orderId;const sdk=config!=null?getSdk(config):void 0;try{if(sdk==null)return"";const o=await sdk?.orders.create({metadata,...orderAttributes});return dispatch&&dispatch({type:"setOrderId",payload:{orderId:o?.id}}),persistKey&&setLocalOrder&&setLocalOrder(persistKey,o.id),o.id}catch(error){const errors=getErrors({error,resource:"orders"});console.error("Create order",errors),dispatch&&setErrors({currentErrors:state?.errors,newErrors:errors,dispatch})}}return""}export const getApiOrder=async params=>{const{id,dispatch,config,clearWhenPlaced,persistKey,deleteLocalOrder,state}=params,sdk=config!=null?getSdk(config):void 0;try{if(sdk==null)return;const options={};state?.include&&state.include.length>0&&(options.include=state.include);const order=await sdk.orders.retrieve(id??"",options);return clearWhenPlaced&&order.editable===!1?(persistKey&&deleteLocalOrder&&deleteLocalOrder(persistKey),dispatch&&dispatch({type:"setOrder",payload:{order:void 0,orderId:""}})):dispatch&&dispatch({type:"setOrder",payload:{order,orderId:order.id}}),order}catch(error){const errors=getErrors({error,resource:"orders"});console.error("Retrieve order",errors),dispatch&&setErrors({currentErrors:state?.errors,newErrors:errors,dispatch});return}};export async function updateOrder({id,attributes,dispatch,config,include,state}){const sdk=config!=null?getSdk(config):void 0;try{if(sdk==null)return{success:!1};const resource={...attributes,id};await sdk.orders.update(resource,{include});const order=await getApiOrder({id,config,dispatch,state});return dispatch&&order&&dispatch({type:"setOrder",payload:{order}}),{success:!0,order}}catch(error){const errors=getErrors({error,resource:"orders"});return dispatch&&(setOrderErrors({errors,dispatch}),dispatch({type:"setErrors",payload:{errors}})),{success:!1,error}}}export const setOrder=(order,dispatch)=>{dispatch&&dispatch({type:"setOrder",payload:{order}})};export function addResourceToInclude({resourcesIncluded=[],dispatch,newResource,newResourceLoaded,resourceIncludedLoaded}){const payload={include:void 0,includeLoaded:void 0};if(newResource){const resources=typeof newResource=="string"?[newResource]:newResource;payload.include=[...new Set([...resourcesIncluded,...resources])],resources.forEach(resource=>{const includeLoaded={...payload.includeLoaded,[resource]:!0};payload.includeLoaded=includeLoaded})}else delete payload.include;const payloadIncludeLoaded={...resourceIncludedLoaded,...newResourceLoaded,...payload.includeLoaded&&payload.includeLoaded};payload.includeLoaded=payloadIncludeLoaded,dispatch&&dispatch({type:"setIncludesResource",payload:{...payload,withoutIncludes:!1}})}export async function addToCart(params){const{skuCode,bundleCode,quantity,config,dispatch,lineItem,state,errors=[],buyNowMode,checkoutUrl,lineItemOption,openMiniCart=!0}=params;try{if(config){const sdk=getSdk(config),id=await createOrder(params);if(id){const order=sdk.orders.relationship(id),name=lineItem?.name,imageUrl=lineItem?.imageUrl,metadata=lineItem?.metadata,frequency=lineItem?.frequency,externalPrice=lineItem?.externalPrice;if(buyNowMode)if(state?.order?.line_items)await Promise.all(state?.order?.line_items.map(async lineItem2=>{await sdk.line_items.delete(lineItem2.id)}));else{const{line_items:lineItems}=await sdk.orders.retrieve(id,{fields:["line_items"],include:["line_items"]});lineItems&&lineItems?.length>0&&await Promise.all(lineItems.map(async lineItem2=>{await sdk.line_items.delete(lineItem2.id)}))}const attrs={order,sku_code:skuCode,name,image_url:imageUrl,quantity:quantity??1,_update_quantity:lineItem?._update_quantity??!0,bundle_code:bundleCode,metadata,frequency};externalPrice===!0&&(attrs._external_price=externalPrice);const newLineItem=await sdk.line_items.create(attrs);if(lineItemOption!=null){const{skuOptionId,options,quantity:quantity2}=lineItemOption,skuOption=sdk.sku_options.relationship(skuOptionId),lineItemRel=sdk.line_items.relationship(newLineItem.id),lineItemOptionsAttributes={quantity:quantity2??1,options,sku_option:skuOption,line_item:lineItemRel};await sdk.line_item_options.create(lineItemOptionsAttributes),await getApiOrder({id,...params})}else await getApiOrder({id,...params,state});if(!isEmpty(errors)&&dispatch&&dispatch({type:"setErrors",payload:{errors:[]}}),buyNowMode&&id&&config?.accessToken!=null&&config?.endpoint!=null){const params2=`${id}?accessToken=${config.accessToken??""}`,{domain,slug}=getDomain(config.endpoint),href=getApplicationLink({slug,orderId:id,accessToken:config.accessToken,applicationType:"checkout",domain}),organizationConfig=await getOrganizationConfig({accessToken:config.accessToken,endpoint:config.endpoint,params:{accessToken:config.accessToken,orderId:order?.id}}),redirectUrl=checkoutUrl?`${checkoutUrl}/${params2}`:organizationConfig?.links?.checkout??href;location.href=redirectUrl}else openMiniCart&&publish("open-cart");return{success:!0,orderId:id}}}return{success:!1}}catch(error){const errors2=getErrors({error,resource:"orders"});return console.error("Add to cart",errors2),dispatch&&setErrors({currentErrors:state?.errors,newErrors:errors2,dispatch}),{success:!1}}}export const unsetOrderState=dispatch=>{dispatch({type:"setOrderId",payload:{orderId:""}}),dispatch({type:"setOrder",payload:{order:void 0}})};export function setOrderErrors({dispatch,errors=[]}){return dispatch&&dispatch({type:"setErrors",payload:{errors}}),{success:!1}}export const saveAddressToCustomerAddressBook=({type,value,dispatch})=>{const k=`_save_${type}_to_customer_address_book`,v=`${value.toString()}`;setCustomerOrderParam(k,v),dispatch&&dispatch({type:"setSaveAddressToCustomerAddressBook",payload:{[k]:v}})};export async function setGiftCardOrCouponCode({code,codeType,dispatch,config,order,include,state}){try{if(config&&order&&code&&dispatch){const attributes={[codeType]:code},{success,order:currentOrder,error}=await updateOrder({id:order.id,attributes,config,include,dispatch,state});if(!success)throw error;return dispatch({type:"setErrors",payload:{errors:[]}}),{success,order:currentOrder}}return{success:!1}}catch(error){const errors=getErrors({error,resource:"orders",field:codeType});return dispatch&&setOrderErrors({errors,dispatch}),{success:!1}}}export async function removeGiftCardOrCouponCode({codeType,dispatch,config,order,include,state}){try{if(config&&order&&dispatch){const attributes={[codeType]:""},orderUpdated=await updateOrder({id:order.id,attributes,config,include,dispatch,state});return dispatch({type:"setErrors",payload:{errors:[]}}),{success:!0,order:orderUpdated?.order}}return{success:!1}}catch(error){const errors=getErrors({error,resource:"orders",field:codeType});return console.error("Remove gift card o coupon code",errors),dispatch&&setOrderErrors({errors,dispatch}),{success:!1}}}export const orderInitialState={loading:!0,orderId:"",order:void 0,errors:[],include:void 0,withoutIncludes:!0};const orderReducer=(state,reducer)=>baseReducer(state,reducer,actionType);export default orderReducer;
2
+ import{setCustomerOrderParam}from"../utils/localStorage";import baseReducer from"../utils/baseReducer";import isEmpty from"lodash/isEmpty";import getSdk from"../utils/getSdk";import getErrors,{setErrors}from"../utils/getErrors";import{getOrganizationConfig}from"../utils/organization";import{publish}from"../utils/events";import{getDomain}from"../utils/getDomain";import{getApplicationLink}from"../utils/getApplicationLink";const actionType=["setLoading","setOrderId","setOrder","setSingleQuantity","setCurrentSkuCodes","setCurrentSkuPrices","setErrors","setCurrentItem","setSaveAddressToCustomerAddressBook","setIncludesResource"];export async function createOrder(params){if(params){const{persistKey,state,dispatch,config,orderMetadata:metadata,orderAttributes={},setLocalOrder}=params;if(state?.orderId)return state.orderId;const sdk=config!=null?getSdk(config):void 0;try{if(sdk==null)return"";const o=await sdk?.orders.create({metadata,...orderAttributes});return dispatch&&dispatch({type:"setOrderId",payload:{orderId:o?.id}}),persistKey&&setLocalOrder&&setLocalOrder(persistKey,o.id),o.id}catch(error){const errors=getErrors({error,resource:"orders"});console.error("Create order",errors),dispatch&&setErrors({currentErrors:state?.errors,newErrors:errors,dispatch})}}return""}export const getApiOrder=async params=>{const{id,dispatch,config,clearWhenPlaced,persistKey,deleteLocalOrder,state}=params,sdk=config!=null?getSdk(config):void 0;try{if(sdk==null)return;const options={};state?.include&&state.include.length>0&&(options.include=state.include);const order=await sdk.orders.retrieve(id??"",options);return clearWhenPlaced&&order.editable===!1?(persistKey&&deleteLocalOrder&&deleteLocalOrder(persistKey),dispatch&&dispatch({type:"setOrder",payload:{order:void 0,orderId:""}})):dispatch&&dispatch({type:"setOrder",payload:{order,orderId:order.id}}),order}catch(error){const errors=getErrors({error,resource:"orders"});console.error("Retrieve order",errors),dispatch&&setErrors({currentErrors:state?.errors,newErrors:errors,dispatch});return}};export async function updateOrder({id,attributes,dispatch,config,include,state}){const sdk=config!=null?getSdk(config):void 0;try{if(sdk==null)return{success:!1};const resource={...attributes,id};await sdk.orders.update(resource,{include});const order=await getApiOrder({id,config,dispatch,state});return dispatch&&order&&dispatch({type:"setOrder",payload:{order}}),{success:!0,order}}catch(error){const errors=getErrors({error,resource:"orders"});return dispatch&&(setOrderErrors({errors,dispatch}),dispatch({type:"setErrors",payload:{errors}})),{success:!1,error}}}export const setOrder=(order,dispatch)=>{dispatch&&dispatch({type:"setOrder",payload:{order}})};export function addResourceToInclude({resourcesIncluded=[],dispatch,newResource,newResourceLoaded,resourceIncludedLoaded}){const payload={include:void 0,includeLoaded:void 0};if(newResource){const resources=typeof newResource=="string"?[newResource]:newResource;payload.include=[...new Set([...resourcesIncluded,...resources])],resources.forEach(resource=>{const includeLoaded={...payload.includeLoaded,[resource]:!0};payload.includeLoaded=includeLoaded})}else delete payload.include;const payloadIncludeLoaded={...resourceIncludedLoaded,...newResourceLoaded,...payload.includeLoaded&&payload.includeLoaded};payload.includeLoaded=payloadIncludeLoaded,dispatch&&dispatch({type:"setIncludesResource",payload:{...payload,withoutIncludes:!1}})}export async function addToCart(params){const{skuCode,bundleCode,quantity,config,dispatch,lineItem,state,errors=[],buyNowMode,checkoutUrl,lineItemOption,openMiniCart=!0}=params;try{if(config){const sdk=getSdk(config),id=await createOrder(params);if(id){const order=sdk.orders.relationship(id),name=lineItem?.name,imageUrl=lineItem?.imageUrl,metadata=lineItem?.metadata,frequency=lineItem?.frequency,externalPrice=lineItem?.externalPrice;if(buyNowMode)if(state?.order?.line_items)await Promise.all(state?.order?.line_items.map(async lineItem2=>{await sdk.line_items.delete(lineItem2.id)}));else{const{line_items:lineItems}=await sdk.orders.retrieve(id,{fields:["line_items"],include:["line_items"]});lineItems&&lineItems?.length>0&&await Promise.all(lineItems.map(async lineItem2=>{await sdk.line_items.delete(lineItem2.id)}))}const attrs={order,sku_code:skuCode,name,image_url:imageUrl,quantity:quantity??1,_update_quantity:lineItem?._update_quantity??!0,bundle_code:bundleCode,metadata,frequency};externalPrice===!0&&(attrs._external_price=externalPrice);const newLineItem=await sdk.line_items.create(attrs);if(lineItemOption!=null){const{skuOptionId,options,quantity:quantity2}=lineItemOption,skuOption=sdk.sku_options.relationship(skuOptionId),lineItemRel=sdk.line_items.relationship(newLineItem.id),lineItemOptionsAttributes={quantity:quantity2??1,options,sku_option:skuOption,line_item:lineItemRel};await sdk.line_item_options.create(lineItemOptionsAttributes),await getApiOrder({id,...params})}else await getApiOrder({id,...params,state});if(!isEmpty(errors)&&dispatch&&dispatch({type:"setErrors",payload:{errors:[]}}),buyNowMode&&id&&config?.accessToken!=null&&config?.endpoint!=null){const params2=`${id}?accessToken=${config.accessToken??""}`,{domain,slug}=getDomain(config.endpoint),href=getApplicationLink({slug,orderId:id,accessToken:config.accessToken,applicationType:"checkout",domain}),organizationConfig=await getOrganizationConfig({accessToken:config.accessToken,endpoint:config.endpoint,params:{accessToken:config.accessToken,orderId:order?.id,slug}}),redirectUrl=checkoutUrl?`${checkoutUrl}/${params2}`:organizationConfig?.links?.checkout??href;location.href=redirectUrl}else openMiniCart&&publish("open-cart");return{success:!0,orderId:id}}}return{success:!1}}catch(error){const errors2=getErrors({error,resource:"orders"});return console.error("Add to cart",errors2),dispatch&&setErrors({currentErrors:state?.errors,newErrors:errors2,dispatch}),{success:!1}}}export const unsetOrderState=dispatch=>{dispatch({type:"setOrderId",payload:{orderId:""}}),dispatch({type:"setOrder",payload:{order:void 0}})};export function setOrderErrors({dispatch,errors=[]}){return dispatch&&dispatch({type:"setErrors",payload:{errors}}),{success:!1}}export const saveAddressToCustomerAddressBook=({type,value,dispatch})=>{const k=`_save_${type}_to_customer_address_book`,v=`${value.toString()}`;setCustomerOrderParam(k,v),dispatch&&dispatch({type:"setSaveAddressToCustomerAddressBook",payload:{[k]:v}})};export async function setGiftCardOrCouponCode({code,codeType,dispatch,config,order,include,state}){try{if(config&&order&&code&&dispatch){const attributes={[codeType]:code},{success,order:currentOrder,error}=await updateOrder({id:order.id,attributes,config,include,dispatch,state});if(!success)throw error;return dispatch({type:"setErrors",payload:{errors:[]}}),{success,order:currentOrder}}return{success:!1}}catch(error){const errors=getErrors({error,resource:"orders",field:codeType});return dispatch&&setOrderErrors({errors,dispatch}),{success:!1}}}export async function removeGiftCardOrCouponCode({codeType,dispatch,config,order,include,state}){try{if(config&&order&&dispatch){const attributes={[codeType]:""},orderUpdated=await updateOrder({id:order.id,attributes,config,include,dispatch,state});return dispatch({type:"setErrors",payload:{errors:[]}}),{success:!0,order:orderUpdated?.order}}return{success:!1}}catch(error){const errors=getErrors({error,resource:"orders",field:codeType});return console.error("Remove gift card o coupon code",errors),dispatch&&setOrderErrors({errors,dispatch}),{success:!1}}}export const orderInitialState={loading:!0,orderId:"",order:void 0,errors:[],include:void 0,withoutIncludes:!0};const orderReducer=(state,reducer)=>baseReducer(state,reducer,actionType);export default orderReducer;
@@ -31,10 +31,10 @@ export interface PlaceOrderActionPayload {
31
31
  paymentId: string;
32
32
  paymentSource: PaymentSourceType;
33
33
  options?: PlaceOrderOptions;
34
- placeOrderButtonRef?: RefObject<HTMLButtonElement>;
34
+ placeOrderButtonRef?: RefObject<HTMLButtonElement | null>;
35
35
  status: 'placing' | 'standby';
36
36
  }
37
- export declare function setButtonRef(ref: RefObject<HTMLButtonElement>, dispatch: Dispatch<PlaceOrderAction>): void;
37
+ export declare function setButtonRef(ref: RefObject<HTMLButtonElement | null>, dispatch: Dispatch<PlaceOrderAction>): void;
38
38
  export type PlaceOrderState = Partial<PlaceOrderActionPayload>;
39
39
  export interface PlaceOrderAction {
40
40
  type: PlaceOrderActionType;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import baseReducer from"../utils/baseReducer";import getSdk from"../utils/getSdk";export const shipmentInitialState={errors:[]},setShipmentErrors=(errors,dispatch)=>{dispatch&&dispatch({type:"setErrors",payload:{errors}})},getShipments=async({order,dispatch,config})=>{try{const sdk=getSdk(config),shipments=order.shipments;let allDeliveryLeadTimes=[],currentPage=1,totalPages=1;do{const response=await sdk.delivery_lead_times.list({include:["shipping_method","stock_location"],pageNumber:currentPage});allDeliveryLeadTimes=allDeliveryLeadTimes.concat(response),totalPages=response.meta.pageCount,currentPage++}while(currentPage<=totalPages);dispatch({type:"setShipments",payload:{shipments,deliveryLeadTimes:allDeliveryLeadTimes}})}catch(error){console.error(error)}};export async function setShippingMethod({config,shipmentId,shippingMethodId,getOrder,order}){try{if(shippingMethodId){const sdk=getSdk(config);if(await sdk.shipments.update({id:shipmentId,shipping_method:sdk.shipping_methods.relationship(shippingMethodId)}),getOrder!=null&&order!=null)return{success:!0,order:await getOrder(order.id)}}return{success:!1}}catch(error){return console.error(error),{success:!1}}}const type=["setErrors","setShipments","setShippingMethod"],shipmentReducer=(state,reducer)=>baseReducer(state,reducer,type);export default shipmentReducer;
2
+ import baseReducer from"../utils/baseReducer";import getSdk from"../utils/getSdk";import{canPlaceOrder}from"../utils/canPlaceOrder";export const shipmentInitialState={errors:[]},setShipmentErrors=(errors,dispatch)=>{dispatch&&dispatch({type:"setErrors",payload:{errors}})},getShipments=async({order,dispatch,config})=>{try{const sdk=getSdk(config),shipments=order.shipments;let allDeliveryLeadTimes=[],currentPage=1,totalPages=1;do{const response=await sdk.delivery_lead_times.list({include:["shipping_method","stock_location"],pageNumber:currentPage});allDeliveryLeadTimes=allDeliveryLeadTimes.concat(response),totalPages=response.meta.pageCount,currentPage++}while(currentPage<=totalPages);dispatch({type:"setShipments",payload:{shipments,deliveryLeadTimes:allDeliveryLeadTimes}})}catch(error){console.error(error)}};export async function setShippingMethod({config,shipmentId,shippingMethodId,getOrder,order}){try{if(order!=null&&!canPlaceOrder(order))return{success:!1,order};if(shippingMethodId){const sdk=getSdk(config);if(await sdk.shipments.update({id:shipmentId,shipping_method:sdk.shipping_methods.relationship(shippingMethodId)}),getOrder!=null&&order!=null)return{success:!0,order:await getOrder(order.id)}}return{success:!1}}catch(error){return console.error(error),{success:!1}}}const type=["setErrors","setShipments","setShippingMethod"],shipmentReducer=(state,reducer)=>baseReducer(state,reducer,type);export default shipmentReducer;
@@ -1,3 +1,4 @@
1
+ import type { JSX } from "react";
1
2
  export type DefaultChildrenType = JSX.Element[] | JSX.Element | null;
2
3
  type Enumerate<N extends number, Acc extends number[] = []> = Acc['length'] extends N ? Acc[number] : Enumerate<N, [...Acc, Acc['length']]>;
3
4
  export type TRange<F extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F>>;
@@ -1,4 +1,4 @@
1
- import { type Dispatch, type ForwardedRef, type Ref } from 'react';
1
+ import { type Dispatch, type ForwardedRef, type Ref, type JSX } from 'react';
2
2
  import PropTypes, { type InferProps } from 'prop-types';
3
3
  import { type BaseError } from './errors';
4
4
  export declare const BC: {
@@ -96,7 +96,7 @@ export declare const baseOrderComponentPricePropTypes: {
96
96
  export type BasePriceType = 'total' | 'option' | 'unit';
97
97
  export type BaseSelectorType = 'select' | 'radio';
98
98
  export type BaseAmountComponentChildren = Omit<BaseAmountComponent, 'children'>;
99
- export interface BaseAmountComponent extends Omit<JSX.IntrinsicElements['span'], 'children'> {
99
+ export interface BaseAmountComponent extends Omit<JSX.IntrinsicElements['span'], 'children' | 'ref'> {
100
100
  children?: ChildrenFunction<BaseAmountComponentChildren>;
101
101
  format?: BaseFormatPrice;
102
102
  price?: string;
@@ -1,4 +1,5 @@
1
1
  import { type DefaultChildrenType } from '../typings/globals';
2
+ import type { JSX } from "react";
2
3
  interface Props<T> {
3
4
  children: DefaultChildrenType;
4
5
  filterBy: T[];
@@ -1,2 +1,3 @@
1
1
  import { type LoaderType } from '../typings/index';
2
+ import type { JSX } from "react";
2
3
  export default function getLoaderComponent(loader: LoaderType): JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import { type Price } from '@commercelayer/sdk';
2
2
  import { type PTemplateProps } from '../components/utils/PriceTemplate';
3
+ import type { JSX } from "react";
3
4
  export declare function getPriceByCode(skuPrices: Price[], code?: string): Price | undefined;
4
5
  export declare function getPricesComponent(skuPrices: Price[], props: PTemplateProps): JSX.Element[] | JSX.Element;
5
6
  export default function getPrices<P extends Price>(prices: P[]): Record<string, P[]>;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{useState,useEffect}from"react";import{getDomain}from"./getDomain";import getSdk from"./getSdk";import{getConfig}from"@commercelayer/organization-config";import{jwt}from"./jwt";export function getOrganizationSlug(endpoint){const org={organization:"",domain:"commercelayer.io"},{domain,slug}=getDomain(endpoint);return{organization:slug,domain:domain||org.domain}}export async function getOrganizationConfig(config){const{market}=jwt(config.accessToken),organization=await getSdk(config).organization.retrieve({fields:{organization:["id","config"]}});return getConfig({jsonConfig:organization.config??{},market:`market:id:${market.id.join(",")}`,params:config.params})}export function useOrganizationConfig({accessToken,endpoint,params}){const[organizationConfig,setOrganizationConfig]=useState(null);return useEffect(()=>{accessToken==null||endpoint==null||getOrganizationConfig({accessToken,endpoint,params}).then(config=>{setOrganizationConfig(config)})},[accessToken,endpoint]),organizationConfig}
2
+ import{useState,useEffect}from"react";import{getDomain}from"./getDomain";import getSdk from"./getSdk";import{getConfig}from"@commercelayer/organization-config";import{jwt}from"./jwt";export function getOrganizationSlug(endpoint){const org={organization:"",domain:"commercelayer.io"},{domain,slug}=getDomain(endpoint);return{organization:slug,domain:domain||org.domain}}export async function getOrganizationConfig(config){const{market}=jwt(config.accessToken),organization=await getSdk(config).organization.retrieve({fields:{organizations:["id","config"]}});return getConfig({jsonConfig:organization.config??{},market:`market:id:${market.id.join(",")}`,params:config.params})}export function useOrganizationConfig({accessToken,endpoint,params}){const[organizationConfig,setOrganizationConfig]=useState(null);return useEffect(()=>{accessToken==null||endpoint==null||getOrganizationConfig({accessToken,endpoint,params}).then(config=>{setOrganizationConfig(config)})},[accessToken,endpoint]),organizationConfig}
@@ -1 +1 @@
1
- {"root":["../src/index.ts","../src/components/ExternalFunction.tsx","../src/components/MetadataInput.tsx","../src/components/SubmitButton.tsx","../src/components/addresses/Address.tsx","../src/components/addresses/AddressCountrySelector.tsx","../src/components/addresses/AddressField.tsx","../src/components/addresses/AddressInput.tsx","../src/components/addresses/AddressInputSelect.tsx","../src/components/addresses/AddressStateSelector.tsx","../src/components/addresses/AddressesContainer.tsx","../src/components/addresses/AddressesEmpty.tsx","../src/components/addresses/BillingAddressContainer.tsx","../src/components/addresses/BillingAddressForm.tsx","../src/components/addresses/SaveAddressesButton.tsx","../src/components/addresses/ShippingAddressContainer.tsx","../src/components/addresses/ShippingAddressForm.tsx","../src/components/auth/CommerceLayer.tsx","../src/components/customers/CustomerAddressForm.tsx","../src/components/customers/CustomerContainer.tsx","../src/components/customers/CustomerField.tsx","../src/components/customers/CustomerInput.tsx","../src/components/customers/CustomerPaymentSource.tsx","../src/components/customers/CustomerPaymentSourceEmpty.tsx","../src/components/customers/MyAccountLink.tsx","../src/components/customers/MyIdentityLink.tsx","../src/components/customers/SaveCustomerButton.tsx","../src/components/errors/Errors.tsx","../src/components/gift_cards/GiftCard.tsx","../src/components/gift_cards/GiftCardContainer.tsx","../src/components/gift_cards/GiftCardCurrencySelector.tsx","../src/components/gift_cards/GiftCardInput.tsx","../src/components/gift_cards/GiftCardOrCouponCode.tsx","../src/components/gift_cards/GiftCardOrCouponForm.tsx","../src/components/gift_cards/GiftCardOrCouponInput.tsx","../src/components/gift_cards/GiftCardOrCouponRemoveButton.tsx","../src/components/gift_cards/GiftCardOrCouponSubmit.tsx","../src/components/gift_cards/GiftCardRecipientInput.tsx","../src/components/in_stock_subscriptions/InStockSubscriptionButton.tsx","../src/components/in_stock_subscriptions/InStockSubscriptionsContainer.tsx","../src/components/line_items/LineItem.tsx","../src/components/line_items/LineItemAmount.tsx","../src/components/line_items/LineItemCode.tsx","../src/components/line_items/LineItemField.tsx","../src/components/line_items/LineItemImage.tsx","../src/components/line_items/LineItemName.tsx","../src/components/line_items/LineItemOption.tsx","../src/components/line_items/LineItemOptions.tsx","../src/components/line_items/LineItemQuantity.tsx","../src/components/line_items/LineItemRemoveLink.tsx","../src/components/line_items/LineItemsContainer.tsx","../src/components/line_items/LineItemsCount.tsx","../src/components/line_items/LineItemsEmpty.tsx","../src/components/orders/AddToCartButton.tsx","../src/components/orders/AdjustmentAmount.tsx","../src/components/orders/CartLink.tsx","../src/components/orders/CheckoutLink.tsx","../src/components/orders/DiscountAmount.tsx","../src/components/orders/GiftCardAmount.tsx","../src/components/orders/HostedCart.tsx","../src/components/orders/OrderContainer.tsx","../src/components/orders/OrderList.tsx","../src/components/orders/OrderListEmpty.tsx","../src/components/orders/OrderListPaginationButtons.tsx","../src/components/orders/OrderListPaginationInfo.tsx","../src/components/orders/OrderListRow.tsx","../src/components/orders/OrderNumber.tsx","../src/components/orders/OrderStorage.tsx","../src/components/orders/PaymentMethodAmount.tsx","../src/components/orders/PlaceOrderButton.tsx","../src/components/orders/PlaceOrderContainer.tsx","../src/components/orders/PrivacyAndTermsCheckbox.tsx","../src/components/orders/ShippingAmount.tsx","../src/components/orders/SubTotalAmount.tsx","../src/components/orders/TaxesAmount.tsx","../src/components/orders/TotalAmount.tsx","../src/components/parcels/ParcelField.tsx","../src/components/parcels/ParcelLineItem.tsx","../src/components/parcels/ParcelLineItemField.tsx","../src/components/parcels/ParcelLineItemsCount.tsx","../src/components/parcels/Parcels.tsx","../src/components/parcels/ParcelsCount.tsx","../src/components/payment_gateways/AdyenGateway.tsx","../src/components/payment_gateways/BraintreeGateway.tsx","../src/components/payment_gateways/CheckoutComGateway.tsx","../src/components/payment_gateways/ExternalGateway.tsx","../src/components/payment_gateways/KlarnaGateway.tsx","../src/components/payment_gateways/PaymentGateway.tsx","../src/components/payment_gateways/PaypalGateway.tsx","../src/components/payment_gateways/StripeGateway.tsx","../src/components/payment_gateways/WireTransferGateway.tsx","../src/components/payment_methods/PaymentMethod.tsx","../src/components/payment_methods/PaymentMethodName.tsx","../src/components/payment_methods/PaymentMethodPrice.tsx","../src/components/payment_methods/PaymentMethodRadioButton.tsx","../src/components/payment_methods/PaymentMethodsContainer.tsx","../src/components/payment_source/AdyenPayment.tsx","../src/components/payment_source/BraintreePayment.tsx","../src/components/payment_source/CheckoutComPayment.tsx","../src/components/payment_source/ExternalPayment.tsx","../src/components/payment_source/KlarnaPayment.tsx","../src/components/payment_source/PaymentSource.tsx","../src/components/payment_source/PaymentSourceBrandIcon.tsx","../src/components/payment_source/PaymentSourceBrandName.tsx","../src/components/payment_source/PaymentSourceDetail.tsx","../src/components/payment_source/PaymentSourceEditButton.tsx","../src/components/payment_source/PaypalPayment.tsx","../src/components/payment_source/StripeExpressPayment.tsx","../src/components/payment_source/StripePayment.tsx","../src/components/payment_source/WireTransferPayment.tsx","../src/components/prices/Price.tsx","../src/components/prices/PricesContainer.tsx","../src/components/shipments/Shipment.tsx","../src/components/shipments/ShipmentField.tsx","../src/components/shipments/ShipmentsContainer.tsx","../src/components/shipments/ShipmentsCount.tsx","../src/components/shipping_methods/ShippingMethod.tsx","../src/components/shipping_methods/ShippingMethodName.tsx","../src/components/shipping_methods/ShippingMethodPrice.tsx","../src/components/shipping_methods/ShippingMethodRadioButton.tsx","../src/components/skus/AvailabilityContainer.tsx","../src/components/skus/AvailabilityTemplate.tsx","../src/components/skus/DeliveryLeadTime.tsx","../src/components/skus/SkuField.tsx","../src/components/skus/SkuList.tsx","../src/components/skus/SkuListsContainer.tsx","../src/components/skus/Skus.tsx","../src/components/skus/SkusContainer.tsx","../src/components/stock_transfers/StockTransfer.tsx","../src/components/stock_transfers/StockTransferField.tsx","../src/components/utils/AddressCardsTemplate.tsx","../src/components/utils/BaseField.tsx","../src/components/utils/BaseInput.tsx","../src/components/utils/BaseOrderPrice.tsx","../src/components/utils/BaseSelect.tsx","../src/components/utils/ErrorBoundary.tsx","../src/components/utils/GenericFieldComponent.tsx","../src/components/utils/Parent.tsx","../src/components/utils/PaymentCardsTemplate.tsx","../src/components/utils/PriceTemplate.tsx","../src/components/utils/getAllErrors.tsx","../src/config/currency.ts","../src/context/AddressChildrenContext.ts","../src/context/AddressContext.ts","../src/context/AvailabilityContext.ts","../src/context/BillingAddressContext.ts","../src/context/BillingAddressFormContext.ts","../src/context/CommerceLayerContext.ts","../src/context/CouponAndGiftCardFormContext.ts","../src/context/CustomerAddressFormContext.ts","../src/context/CustomerContext.ts","../src/context/CustomerPaymentSourceContext.ts","../src/context/ExternalFunctionContext.ts","../src/context/GiftCardContext.ts","../src/context/InStockSubscriptionContext.ts","../src/context/LineItemChildrenContext.ts","../src/context/LineItemContext.ts","../src/context/LineItemOptionChildrenContext.ts","../src/context/OrderContext.ts","../src/context/OrderListChildrenContext.ts","../src/context/OrderListPaginationContext.ts","../src/context/OrderStorageContext.ts","../src/context/ParcelChildrenContext.ts","../src/context/ParcelLineItemChildrenContext.ts","../src/context/PaymentMethodChildrenContext.ts","../src/context/PaymentMethodContext.ts","../src/context/PaymentSourceContext.ts","../src/context/PlaceOrderContext.ts","../src/context/PricesContext.ts","../src/context/ShipmentChildrenContext.ts","../src/context/ShipmentContext.ts","../src/context/ShippingAddressContext.ts","../src/context/ShippingAddressFormContext.ts","../src/context/ShippingMethodChildrenContext.ts","../src/context/SkuChildrenContext.ts","../src/context/SkuContext.ts","../src/context/SkuListsContext.ts","../src/context/StockTransferChildrenContext.ts","../src/hooks/useCommerceLayer.ts","../src/hooks/useCustomerContainer.ts","../src/hooks/useOrderContainer.ts","../src/reducers/AddressReducer.ts","../src/reducers/AvailabilityReducer.ts","../src/reducers/BillingAddressReducer.ts","../src/reducers/CustomerReducer.ts","../src/reducers/GiftCardReducer.ts","../src/reducers/InStockSubscriptionReducer.ts","../src/reducers/LineItemReducer.ts","../src/reducers/OrderReducer.ts","../src/reducers/PaymentMethodReducer.ts","../src/reducers/PlaceOrderReducer.ts","../src/reducers/PriceReducer.ts","../src/reducers/ShipmentReducer.ts","../src/reducers/ShippingAddressReducer.ts","../src/reducers/SkuListsReducer.ts","../src/reducers/SkuReducer.ts","../src/typings/environment.d.ts","../src/typings/errors.ts","../src/typings/globals.ts","../src/typings/index.ts","../src/utils/PropsType.ts","../src/utils/addressesManager.ts","../src/utils/baseReducer.ts","../src/utils/browserInfo.ts","../src/utils/canPlaceOrder.ts","../src/utils/checkIncludeResource.ts","../src/utils/compareObjAttribute.ts","../src/utils/countryStateCity.ts","../src/utils/customMessages.ts","../src/utils/customerOrderOptions.ts","../src/utils/events.ts","../src/utils/expressPaymentHelper.ts","../src/utils/filterChildren.ts","../src/utils/formCleaner.ts","../src/utils/getAmount.ts","../src/utils/getApplicationLink.ts","../src/utils/getCardDetails.ts","../src/utils/getCustomerIdByToken.ts","../src/utils/getDomain.ts","../src/utils/getErrors.ts","../src/utils/getLineItemsCount.ts","../src/utils/getLoaderComponent.tsx","../src/utils/getPaymentAttributes.ts","../src/utils/getPrices.tsx","../src/utils/getPublicIp.ts","../src/utils/getSdk.ts","../src/utils/getSkus.ts","../src/utils/hasSubscriptions.ts","../src/utils/icons.tsx","../src/utils/isDate.ts","../src/utils/isEmpty.ts","../src/utils/isGuestToken.ts","../src/utils/isJSON.ts","../src/utils/jwt.ts","../src/utils/localStorage.ts","../src/utils/omit.ts","../src/utils/organization.ts","../src/utils/pick.ts","../src/utils/placeholderImages.ts","../src/utils/promisify.ts","../src/utils/replace.ts","../src/utils/scrollbarWidth.ts","../src/utils/shipments.ts","../src/utils/snakeToCamelCase.ts","../src/utils/triggerAttributeHelper.ts","../src/utils/updateOrderSubscriptionCustomerPaymentSource.ts","../src/utils/validateFormFields.ts","../src/utils/hooks/useCustomContext.ts","../src/utils/hooks/useExternalScript.ts","../src/utils/stripe/retrievePaymentIntent.ts"],"version":"5.6.3"}
1
+ {"root":["../src/index.ts","../src/components/ExternalFunction.tsx","../src/components/MetadataInput.tsx","../src/components/SubmitButton.tsx","../src/components/addresses/Address.tsx","../src/components/addresses/AddressCountrySelector.tsx","../src/components/addresses/AddressField.tsx","../src/components/addresses/AddressInput.tsx","../src/components/addresses/AddressInputSelect.tsx","../src/components/addresses/AddressStateSelector.tsx","../src/components/addresses/AddressesContainer.tsx","../src/components/addresses/AddressesEmpty.tsx","../src/components/addresses/BillingAddressContainer.tsx","../src/components/addresses/BillingAddressForm.tsx","../src/components/addresses/SaveAddressesButton.tsx","../src/components/addresses/ShippingAddressContainer.tsx","../src/components/addresses/ShippingAddressForm.tsx","../src/components/auth/CommerceLayer.tsx","../src/components/customers/CustomerAddressForm.tsx","../src/components/customers/CustomerContainer.tsx","../src/components/customers/CustomerField.tsx","../src/components/customers/CustomerInput.tsx","../src/components/customers/CustomerPaymentSource.tsx","../src/components/customers/CustomerPaymentSourceEmpty.tsx","../src/components/customers/MyAccountLink.tsx","../src/components/customers/MyIdentityLink.tsx","../src/components/customers/SaveCustomerButton.tsx","../src/components/errors/Errors.tsx","../src/components/gift_cards/GiftCard.tsx","../src/components/gift_cards/GiftCardContainer.tsx","../src/components/gift_cards/GiftCardCurrencySelector.tsx","../src/components/gift_cards/GiftCardInput.tsx","../src/components/gift_cards/GiftCardOrCouponCode.tsx","../src/components/gift_cards/GiftCardOrCouponForm.tsx","../src/components/gift_cards/GiftCardOrCouponInput.tsx","../src/components/gift_cards/GiftCardOrCouponRemoveButton.tsx","../src/components/gift_cards/GiftCardOrCouponSubmit.tsx","../src/components/gift_cards/GiftCardRecipientInput.tsx","../src/components/in_stock_subscriptions/InStockSubscriptionButton.tsx","../src/components/in_stock_subscriptions/InStockSubscriptionsContainer.tsx","../src/components/line_items/LineItem.tsx","../src/components/line_items/LineItemAmount.tsx","../src/components/line_items/LineItemCode.tsx","../src/components/line_items/LineItemField.tsx","../src/components/line_items/LineItemImage.tsx","../src/components/line_items/LineItemName.tsx","../src/components/line_items/LineItemOption.tsx","../src/components/line_items/LineItemOptions.tsx","../src/components/line_items/LineItemQuantity.tsx","../src/components/line_items/LineItemRemoveLink.tsx","../src/components/line_items/LineItemsContainer.tsx","../src/components/line_items/LineItemsCount.tsx","../src/components/line_items/LineItemsEmpty.tsx","../src/components/orders/AddToCartButton.tsx","../src/components/orders/AdjustmentAmount.tsx","../src/components/orders/CartLink.tsx","../src/components/orders/CheckoutLink.tsx","../src/components/orders/DiscountAmount.tsx","../src/components/orders/GiftCardAmount.tsx","../src/components/orders/HostedCart.tsx","../src/components/orders/OrderContainer.tsx","../src/components/orders/OrderList.tsx","../src/components/orders/OrderListEmpty.tsx","../src/components/orders/OrderListPaginationButtons.tsx","../src/components/orders/OrderListPaginationInfo.tsx","../src/components/orders/OrderListRow.tsx","../src/components/orders/OrderNumber.tsx","../src/components/orders/OrderStorage.tsx","../src/components/orders/PaymentMethodAmount.tsx","../src/components/orders/PlaceOrderButton.tsx","../src/components/orders/PlaceOrderContainer.tsx","../src/components/orders/PrivacyAndTermsCheckbox.tsx","../src/components/orders/ShippingAmount.tsx","../src/components/orders/SubTotalAmount.tsx","../src/components/orders/TaxesAmount.tsx","../src/components/orders/TotalAmount.tsx","../src/components/parcels/ParcelField.tsx","../src/components/parcels/ParcelLineItem.tsx","../src/components/parcels/ParcelLineItemField.tsx","../src/components/parcels/ParcelLineItemsCount.tsx","../src/components/parcels/Parcels.tsx","../src/components/parcels/ParcelsCount.tsx","../src/components/payment_gateways/AdyenGateway.tsx","../src/components/payment_gateways/BraintreeGateway.tsx","../src/components/payment_gateways/CheckoutComGateway.tsx","../src/components/payment_gateways/ExternalGateway.tsx","../src/components/payment_gateways/KlarnaGateway.tsx","../src/components/payment_gateways/PaymentGateway.tsx","../src/components/payment_gateways/PaypalGateway.tsx","../src/components/payment_gateways/StripeGateway.tsx","../src/components/payment_gateways/WireTransferGateway.tsx","../src/components/payment_methods/PaymentMethod.tsx","../src/components/payment_methods/PaymentMethodName.tsx","../src/components/payment_methods/PaymentMethodPrice.tsx","../src/components/payment_methods/PaymentMethodRadioButton.tsx","../src/components/payment_methods/PaymentMethodsContainer.tsx","../src/components/payment_source/AdyenPayment.tsx","../src/components/payment_source/BraintreePayment.tsx","../src/components/payment_source/CheckoutComPayment.tsx","../src/components/payment_source/ExternalPayment.tsx","../src/components/payment_source/KlarnaPayment.tsx","../src/components/payment_source/PaymentSource.tsx","../src/components/payment_source/PaymentSourceBrandIcon.tsx","../src/components/payment_source/PaymentSourceBrandName.tsx","../src/components/payment_source/PaymentSourceDetail.tsx","../src/components/payment_source/PaymentSourceEditButton.tsx","../src/components/payment_source/PaypalPayment.tsx","../src/components/payment_source/StripeExpressPayment.tsx","../src/components/payment_source/StripePayment.tsx","../src/components/payment_source/WireTransferPayment.tsx","../src/components/prices/Price.tsx","../src/components/prices/PricesContainer.tsx","../src/components/shipments/Shipment.tsx","../src/components/shipments/ShipmentField.tsx","../src/components/shipments/ShipmentsContainer.tsx","../src/components/shipments/ShipmentsCount.tsx","../src/components/shipping_methods/ShippingMethod.tsx","../src/components/shipping_methods/ShippingMethodName.tsx","../src/components/shipping_methods/ShippingMethodPrice.tsx","../src/components/shipping_methods/ShippingMethodRadioButton.tsx","../src/components/skus/AvailabilityContainer.tsx","../src/components/skus/AvailabilityTemplate.tsx","../src/components/skus/DeliveryLeadTime.tsx","../src/components/skus/SkuField.tsx","../src/components/skus/SkuList.tsx","../src/components/skus/SkuListsContainer.tsx","../src/components/skus/Skus.tsx","../src/components/skus/SkusContainer.tsx","../src/components/stock_transfers/StockTransfer.tsx","../src/components/stock_transfers/StockTransferField.tsx","../src/components/utils/AddressCardsTemplate.tsx","../src/components/utils/BaseField.tsx","../src/components/utils/BaseInput.tsx","../src/components/utils/BaseOrderPrice.tsx","../src/components/utils/BaseSelect.tsx","../src/components/utils/ErrorBoundary.tsx","../src/components/utils/GenericFieldComponent.tsx","../src/components/utils/Parent.tsx","../src/components/utils/PaymentCardsTemplate.tsx","../src/components/utils/PriceTemplate.tsx","../src/components/utils/getAllErrors.tsx","../src/config/currency.ts","../src/context/AddressChildrenContext.ts","../src/context/AddressContext.ts","../src/context/AvailabilityContext.ts","../src/context/BillingAddressContext.ts","../src/context/BillingAddressFormContext.ts","../src/context/CommerceLayerContext.ts","../src/context/CouponAndGiftCardFormContext.ts","../src/context/CustomerAddressFormContext.ts","../src/context/CustomerContext.ts","../src/context/CustomerPaymentSourceContext.ts","../src/context/ExternalFunctionContext.ts","../src/context/GiftCardContext.ts","../src/context/InStockSubscriptionContext.ts","../src/context/LineItemChildrenContext.ts","../src/context/LineItemContext.ts","../src/context/LineItemOptionChildrenContext.ts","../src/context/OrderContext.ts","../src/context/OrderListChildrenContext.ts","../src/context/OrderListPaginationContext.ts","../src/context/OrderStorageContext.ts","../src/context/ParcelChildrenContext.ts","../src/context/ParcelLineItemChildrenContext.ts","../src/context/PaymentMethodChildrenContext.ts","../src/context/PaymentMethodContext.ts","../src/context/PaymentSourceContext.ts","../src/context/PlaceOrderContext.ts","../src/context/PricesContext.ts","../src/context/ShipmentChildrenContext.ts","../src/context/ShipmentContext.ts","../src/context/ShippingAddressContext.ts","../src/context/ShippingAddressFormContext.ts","../src/context/ShippingMethodChildrenContext.ts","../src/context/SkuChildrenContext.ts","../src/context/SkuContext.ts","../src/context/SkuListsContext.ts","../src/context/StockTransferChildrenContext.ts","../src/hooks/useCommerceLayer.ts","../src/hooks/useCustomerContainer.ts","../src/hooks/useOrderContainer.ts","../src/reducers/AddressReducer.ts","../src/reducers/AvailabilityReducer.ts","../src/reducers/BillingAddressReducer.ts","../src/reducers/CustomerReducer.ts","../src/reducers/GiftCardReducer.ts","../src/reducers/InStockSubscriptionReducer.ts","../src/reducers/LineItemReducer.ts","../src/reducers/OrderReducer.ts","../src/reducers/PaymentMethodReducer.ts","../src/reducers/PlaceOrderReducer.ts","../src/reducers/PriceReducer.ts","../src/reducers/ShipmentReducer.ts","../src/reducers/ShippingAddressReducer.ts","../src/reducers/SkuListsReducer.ts","../src/reducers/SkuReducer.ts","../src/typings/environment.d.ts","../src/typings/errors.ts","../src/typings/globals.ts","../src/typings/index.ts","../src/utils/PropsType.ts","../src/utils/addressesManager.ts","../src/utils/baseReducer.ts","../src/utils/browserInfo.ts","../src/utils/canPlaceOrder.ts","../src/utils/checkIncludeResource.ts","../src/utils/compareObjAttribute.ts","../src/utils/countryStateCity.ts","../src/utils/customMessages.ts","../src/utils/customerOrderOptions.ts","../src/utils/events.ts","../src/utils/expressPaymentHelper.ts","../src/utils/filterChildren.ts","../src/utils/formCleaner.ts","../src/utils/getAmount.ts","../src/utils/getApplicationLink.ts","../src/utils/getCardDetails.ts","../src/utils/getCustomerIdByToken.ts","../src/utils/getDomain.ts","../src/utils/getErrors.ts","../src/utils/getLineItemsCount.ts","../src/utils/getLoaderComponent.tsx","../src/utils/getPaymentAttributes.ts","../src/utils/getPrices.tsx","../src/utils/getPublicIp.ts","../src/utils/getSdk.ts","../src/utils/getSkus.ts","../src/utils/hasSubscriptions.ts","../src/utils/icons.tsx","../src/utils/isDate.ts","../src/utils/isEmpty.ts","../src/utils/isGuestToken.ts","../src/utils/isJSON.ts","../src/utils/jwt.ts","../src/utils/localStorage.ts","../src/utils/omit.ts","../src/utils/organization.ts","../src/utils/pick.ts","../src/utils/placeholderImages.ts","../src/utils/promisify.ts","../src/utils/replace.ts","../src/utils/scrollbarWidth.ts","../src/utils/shipments.ts","../src/utils/snakeToCamelCase.ts","../src/utils/triggerAttributeHelper.ts","../src/utils/updateOrderSubscriptionCustomerPaymentSource.ts","../src/utils/validateFormFields.ts","../src/utils/hooks/useCustomContext.ts","../src/utils/hooks/useExternalScript.ts","../src/utils/stripe/retrievePaymentIntent.ts"],"version":"5.7.2"}