@commercelayer/react-components 3.14.1 → 4.0.0-alpha.1

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 (1158) hide show
  1. package/lib/{components → cjs/components}/AdjustmentAmount.d.ts +0 -0
  2. package/lib/cjs/components/AdjustmentAmount.js +1 -0
  3. package/lib/cjs/components/AdyenPayment.d.ts +25 -0
  4. package/lib/cjs/components/AdyenPayment.js +1 -0
  5. package/lib/cjs/components/AvailabilityContainer.d.ts +14 -0
  6. package/lib/cjs/components/AvailabilityContainer.js +1 -0
  7. package/lib/cjs/components/AvailabilityTemplate.d.ts +24 -0
  8. package/lib/cjs/components/AvailabilityTemplate.js +1 -0
  9. package/lib/cjs/components/BillingAddressContainer.d.ts +11 -0
  10. package/lib/cjs/components/BillingAddressContainer.js +1 -0
  11. package/lib/cjs/components/BillingAddressForm.d.ts +13 -0
  12. package/lib/cjs/components/BillingAddressForm.js +1 -0
  13. package/lib/cjs/components/BraintreePayment.d.ts +30 -0
  14. package/lib/cjs/components/BraintreePayment.js +1 -0
  15. package/lib/{components → cjs/components}/CartLink.d.ts +0 -0
  16. package/lib/cjs/components/CartLink.js +1 -0
  17. package/lib/cjs/components/CheckoutComPayment.d.ts +23 -0
  18. package/lib/cjs/components/CheckoutComPayment.js +1 -0
  19. package/lib/cjs/components/CheckoutLink.d.ts +23 -0
  20. package/lib/cjs/components/CheckoutLink.js +1 -0
  21. package/lib/cjs/components/DeliveryLeadTime.d.ts +17 -0
  22. package/lib/cjs/components/DeliveryLeadTime.js +1 -0
  23. package/lib/cjs/components/DiscountAmount.d.ts +18 -0
  24. package/lib/cjs/components/DiscountAmount.js +1 -0
  25. package/lib/cjs/components/Errors.d.ts +5 -0
  26. package/lib/cjs/components/Errors.js +1 -0
  27. package/lib/cjs/components/ExternalFunction.d.ts +14 -0
  28. package/lib/cjs/components/ExternalFunction.js +1 -0
  29. package/lib/cjs/components/GiftCard.d.ts +18 -0
  30. package/lib/cjs/components/GiftCard.js +1 -0
  31. package/lib/cjs/components/GiftCardContainer.d.ts +12 -0
  32. package/lib/cjs/components/GiftCardContainer.js +1 -0
  33. package/lib/cjs/components/GiftCardCurrencySelector.d.ts +22 -0
  34. package/lib/cjs/components/GiftCardCurrencySelector.js +1 -0
  35. package/lib/cjs/components/GiftCardInput.d.ts +16 -0
  36. package/lib/cjs/components/GiftCardInput.js +1 -0
  37. package/lib/cjs/components/GiftCardOrCouponCode.d.ts +24 -0
  38. package/lib/cjs/components/GiftCardOrCouponCode.js +1 -0
  39. package/lib/cjs/components/GiftCardOrCouponForm.d.ts +15 -0
  40. package/lib/cjs/components/GiftCardOrCouponForm.js +1 -0
  41. package/lib/cjs/components/GiftCardOrCouponInput.d.ts +19 -0
  42. package/lib/cjs/components/GiftCardOrCouponInput.js +1 -0
  43. package/lib/cjs/components/GiftCardOrCouponRemoveButton.d.ts +26 -0
  44. package/lib/cjs/components/GiftCardOrCouponRemoveButton.js +1 -0
  45. package/lib/cjs/components/GiftCardOrCouponSubmit.d.ts +16 -0
  46. package/lib/cjs/components/GiftCardOrCouponSubmit.js +1 -0
  47. package/lib/{components → cjs/components}/GiftCardRecipient.d.ts +0 -0
  48. package/lib/{components → cjs/components}/GiftCardRecipient.js +0 -0
  49. package/lib/{components → cjs/components}/GiftCardRecipientInput.d.ts +0 -0
  50. package/lib/{components → cjs/components}/GiftCardRecipientInput.js +0 -0
  51. package/lib/cjs/components/ItemContainer.d.ts +22 -0
  52. package/lib/cjs/components/ItemContainer.js +1 -0
  53. package/lib/{components → cjs/components}/KlarnaPayment.d.ts +0 -0
  54. package/lib/cjs/components/KlarnaPayment.js +1 -0
  55. package/lib/cjs/components/LineItem.d.ts +15 -0
  56. package/lib/cjs/components/LineItem.js +1 -0
  57. package/lib/cjs/components/LineItemAmount.d.ts +20 -0
  58. package/lib/cjs/components/LineItemAmount.js +1 -0
  59. package/lib/cjs/components/LineItemCode.d.ts +18 -0
  60. package/lib/cjs/components/LineItemCode.js +1 -0
  61. package/lib/cjs/components/LineItemImage.d.ts +23 -0
  62. package/lib/cjs/components/LineItemImage.js +1 -0
  63. package/lib/cjs/components/LineItemName.d.ts +17 -0
  64. package/lib/cjs/components/LineItemName.js +1 -0
  65. package/lib/cjs/components/LineItemOption.d.ts +30 -0
  66. package/lib/cjs/components/LineItemOption.js +1 -0
  67. package/lib/cjs/components/LineItemOptions.d.ts +19 -0
  68. package/lib/cjs/components/LineItemOptions.js +1 -0
  69. package/lib/cjs/components/LineItemQuantity.d.ts +26 -0
  70. package/lib/cjs/components/LineItemQuantity.js +1 -0
  71. package/lib/cjs/components/LineItemRemoveLink.d.ts +22 -0
  72. package/lib/cjs/components/LineItemRemoveLink.js +1 -0
  73. package/lib/cjs/components/LineItemsContainer.d.ts +20 -0
  74. package/lib/cjs/components/LineItemsContainer.js +1 -0
  75. package/lib/cjs/components/LineItemsCount.d.ts +22 -0
  76. package/lib/cjs/components/LineItemsCount.js +1 -0
  77. package/lib/cjs/components/LineItemsEmpty.d.ts +23 -0
  78. package/lib/cjs/components/LineItemsEmpty.js +1 -0
  79. package/lib/cjs/components/MetadataInput.d.ts +15 -0
  80. package/lib/cjs/components/MetadataInput.js +1 -0
  81. package/lib/cjs/components/PaymentGateway.d.ts +16 -0
  82. package/lib/cjs/components/PaymentGateway.js +1 -0
  83. package/lib/cjs/components/PaymentMethod.d.ts +22 -0
  84. package/lib/cjs/components/PaymentMethod.js +1 -0
  85. package/lib/cjs/components/PaymentMethodAmount.d.ts +18 -0
  86. package/lib/cjs/components/PaymentMethodAmount.js +1 -0
  87. package/lib/cjs/components/PaymentMethodName.d.ts +15 -0
  88. package/lib/cjs/components/PaymentMethodName.js +1 -0
  89. package/lib/cjs/components/PaymentMethodPrice.d.ts +20 -0
  90. package/lib/cjs/components/PaymentMethodPrice.js +1 -0
  91. package/lib/cjs/components/PaymentMethodRadioButton.d.ts +18 -0
  92. package/lib/cjs/components/PaymentMethodRadioButton.js +1 -0
  93. package/lib/cjs/components/PaymentMethodsContainer.d.ts +14 -0
  94. package/lib/cjs/components/PaymentMethodsContainer.js +1 -0
  95. package/lib/cjs/components/PaymentSource.d.ts +26 -0
  96. package/lib/cjs/components/PaymentSource.js +1 -0
  97. package/lib/cjs/components/PaymentSourceBrandIcon.d.ts +25 -0
  98. package/lib/cjs/components/PaymentSourceBrandIcon.js +1 -0
  99. package/lib/cjs/components/PaymentSourceBrandName.d.ts +19 -0
  100. package/lib/cjs/components/PaymentSourceBrandName.js +1 -0
  101. package/lib/cjs/components/PaymentSourceDetail.d.ts +18 -0
  102. package/lib/cjs/components/PaymentSourceDetail.js +1 -0
  103. package/lib/cjs/components/PaymentSourceEditButton.d.ts +16 -0
  104. package/lib/cjs/components/PaymentSourceEditButton.js +1 -0
  105. package/lib/cjs/components/PaypalPayment.d.ts +12 -0
  106. package/lib/cjs/components/PaypalPayment.js +1 -0
  107. package/lib/cjs/components/Price.d.ts +28 -0
  108. package/lib/cjs/components/Price.js +1 -0
  109. package/lib/cjs/components/PricesContainer.d.ts +27 -0
  110. package/lib/cjs/components/PricesContainer.js +1 -0
  111. package/lib/cjs/components/QuantitySelector.d.ts +31 -0
  112. package/lib/cjs/components/QuantitySelector.js +1 -0
  113. package/lib/cjs/components/SaveAddressesButton.d.ts +23 -0
  114. package/lib/cjs/components/SaveAddressesButton.js +1 -0
  115. package/lib/cjs/components/SaveCustomerButton.d.ts +24 -0
  116. package/lib/cjs/components/SaveCustomerButton.js +1 -0
  117. package/lib/cjs/components/ShippingAddressContainer.d.ts +11 -0
  118. package/lib/cjs/components/ShippingAddressContainer.js +1 -0
  119. package/lib/cjs/components/ShippingAddressForm.d.ts +13 -0
  120. package/lib/cjs/components/ShippingAddressForm.js +1 -0
  121. package/lib/cjs/components/ShippingAmount.d.ts +15 -0
  122. package/lib/cjs/components/ShippingAmount.js +1 -0
  123. package/lib/{components → cjs/components}/SkuField.d.ts +0 -0
  124. package/lib/cjs/components/SkuField.js +1 -0
  125. package/lib/{components → cjs/components}/Skus.d.ts +0 -0
  126. package/lib/cjs/components/Skus.js +1 -0
  127. package/lib/{components → cjs/components}/SkusContainer.d.ts +0 -0
  128. package/lib/cjs/components/SkusContainer.js +1 -0
  129. package/lib/cjs/components/StockTransfer.d.ts +12 -0
  130. package/lib/cjs/components/StockTransfer.js +1 -0
  131. package/lib/cjs/components/StockTransferField.d.ts +10 -0
  132. package/lib/cjs/components/StockTransferField.js +1 -0
  133. package/lib/cjs/components/StripePayment.d.ts +18 -0
  134. package/lib/cjs/components/StripePayment.js +1 -0
  135. package/lib/cjs/components/SubmitButton.d.ts +19 -0
  136. package/lib/cjs/components/SubmitButton.js +1 -0
  137. package/lib/cjs/components/VariantSelector.d.ts +52 -0
  138. package/lib/cjs/components/VariantSelector.js +1 -0
  139. package/lib/cjs/components/VariantsContainer.d.ts +20 -0
  140. package/lib/cjs/components/VariantsContainer.js +1 -0
  141. package/lib/cjs/components/WireTransferPayment.d.ts +10 -0
  142. package/lib/cjs/components/WireTransferPayment.js +1 -0
  143. package/lib/cjs/components/addresses/Address.d.ts +18 -0
  144. package/lib/cjs/components/addresses/Address.js +1 -0
  145. package/lib/cjs/components/addresses/AddressCountrySelector.d.ts +26 -0
  146. package/lib/cjs/components/addresses/AddressCountrySelector.js +1 -0
  147. package/lib/cjs/components/addresses/AddressField.d.ts +43 -0
  148. package/lib/cjs/components/addresses/AddressField.js +1 -0
  149. package/lib/cjs/components/addresses/AddressInput.d.ts +19 -0
  150. package/lib/cjs/components/addresses/AddressInput.js +1 -0
  151. package/lib/cjs/components/addresses/AddressStateSelector.d.ts +27 -0
  152. package/lib/cjs/components/addresses/AddressStateSelector.js +1 -0
  153. package/lib/cjs/components/addresses/AddressesContainer.d.ts +15 -0
  154. package/lib/cjs/components/addresses/AddressesContainer.js +1 -0
  155. package/lib/cjs/components/auth/CommerceLayer.d.ts +15 -0
  156. package/lib/cjs/components/auth/CommerceLayer.js +1 -0
  157. package/lib/cjs/components/customers/CustomerAddressForm.d.ts +13 -0
  158. package/lib/cjs/components/customers/CustomerAddressForm.js +1 -0
  159. package/lib/cjs/components/customers/CustomerContainer.d.ts +10 -0
  160. package/lib/cjs/components/customers/CustomerContainer.js +1 -0
  161. package/lib/cjs/components/customers/CustomerField.d.ts +10 -0
  162. package/lib/cjs/components/customers/CustomerField.js +1 -0
  163. package/lib/cjs/components/customers/CustomerInput.d.ts +23 -0
  164. package/lib/cjs/components/customers/CustomerInput.js +1 -0
  165. package/lib/cjs/components/gateways/AdyenGateway.d.ts +5 -0
  166. package/lib/cjs/components/gateways/AdyenGateway.js +1 -0
  167. package/lib/cjs/components/gateways/BraintreeGateway.d.ts +5 -0
  168. package/lib/cjs/components/gateways/BraintreeGateway.js +1 -0
  169. package/lib/cjs/components/gateways/CheckoutComGateway.d.ts +5 -0
  170. package/lib/cjs/components/gateways/CheckoutComGateway.js +1 -0
  171. package/lib/cjs/components/gateways/KlarnaGateway.d.ts +5 -0
  172. package/lib/cjs/components/gateways/KlarnaGateway.js +1 -0
  173. package/lib/cjs/components/gateways/PaypalGateway.d.ts +5 -0
  174. package/lib/cjs/components/gateways/PaypalGateway.js +1 -0
  175. package/lib/cjs/components/gateways/StripeGateway.d.ts +5 -0
  176. package/lib/cjs/components/gateways/StripeGateway.js +1 -0
  177. package/lib/cjs/components/gateways/WireTransferGateway.d.ts +5 -0
  178. package/lib/cjs/components/gateways/WireTransferGateway.js +1 -0
  179. package/lib/cjs/components/orders/AddToCartButton.d.ts +34 -0
  180. package/lib/cjs/components/orders/AddToCartButton.js +1 -0
  181. package/lib/cjs/components/orders/AdjustmentAmount.d.ts +18 -0
  182. package/lib/cjs/components/orders/AdjustmentAmount.js +1 -0
  183. package/lib/cjs/components/orders/CartLink.d.ts +12 -0
  184. package/lib/cjs/components/orders/CartLink.js +1 -0
  185. package/lib/cjs/components/orders/GiftCardAmount.d.ts +15 -0
  186. package/lib/cjs/components/orders/GiftCardAmount.js +1 -0
  187. package/lib/cjs/components/orders/OrderContainer.d.ts +26 -0
  188. package/lib/cjs/components/orders/OrderContainer.js +1 -0
  189. package/lib/cjs/components/orders/OrderList.d.ts +61 -0
  190. package/lib/cjs/components/orders/OrderList.js +1 -0
  191. package/lib/cjs/components/orders/OrderListRow.d.ts +30 -0
  192. package/lib/cjs/components/orders/OrderListRow.js +1 -0
  193. package/lib/cjs/components/orders/OrderNumber.d.ts +11 -0
  194. package/lib/cjs/components/orders/OrderNumber.js +1 -0
  195. package/lib/cjs/components/orders/OrderStorage.d.ts +16 -0
  196. package/lib/cjs/components/orders/OrderStorage.js +1 -0
  197. package/lib/cjs/components/orders/PlaceOrderButton.d.ts +24 -0
  198. package/lib/cjs/components/orders/PlaceOrderButton.js +1 -0
  199. package/lib/cjs/components/orders/PlaceOrderContainer.d.ts +14 -0
  200. package/lib/cjs/components/orders/PlaceOrderContainer.js +1 -0
  201. package/lib/cjs/components/orders/PrivacyAndTermsCheckbox.d.ts +10 -0
  202. package/lib/cjs/components/orders/PrivacyAndTermsCheckbox.js +1 -0
  203. package/lib/cjs/components/orders/SubTotalAmount.d.ts +18 -0
  204. package/lib/cjs/components/orders/SubTotalAmount.js +1 -0
  205. package/lib/cjs/components/orders/TaxesAmount.d.ts +18 -0
  206. package/lib/cjs/components/orders/TaxesAmount.js +1 -0
  207. package/lib/cjs/components/orders/TotalAmount.d.ts +18 -0
  208. package/lib/cjs/components/orders/TotalAmount.js +1 -0
  209. package/lib/cjs/components/shipments/Shipment.d.ts +15 -0
  210. package/lib/cjs/components/shipments/Shipment.js +1 -0
  211. package/lib/cjs/components/shipments/ShipmentField.d.ts +19 -0
  212. package/lib/cjs/components/shipments/ShipmentField.js +1 -0
  213. package/lib/cjs/components/shipments/ShipmentsContainer.d.ts +12 -0
  214. package/lib/cjs/components/shipments/ShipmentsContainer.js +1 -0
  215. package/lib/cjs/components/shipping_methods/ShippingMethod.d.ts +15 -0
  216. package/lib/cjs/components/shipping_methods/ShippingMethod.js +1 -0
  217. package/lib/cjs/components/shipping_methods/ShippingMethodName.d.ts +17 -0
  218. package/lib/cjs/components/shipping_methods/ShippingMethodName.js +1 -0
  219. package/lib/cjs/components/shipping_methods/ShippingMethodPrice.d.ts +25 -0
  220. package/lib/cjs/components/shipping_methods/ShippingMethodPrice.js +1 -0
  221. package/lib/cjs/components/shipping_methods/ShippingMethodRadioButton.d.ts +19 -0
  222. package/lib/cjs/components/shipping_methods/ShippingMethodRadioButton.js +1 -0
  223. package/lib/cjs/components/skus/SkuField.d.ts +14 -0
  224. package/lib/cjs/components/skus/SkuField.js +1 -0
  225. package/lib/cjs/components/skus/SkuList.d.ts +14 -0
  226. package/lib/cjs/components/skus/SkuList.js +1 -0
  227. package/lib/cjs/components/skus/SkuListsContainer.d.ts +12 -0
  228. package/lib/cjs/components/skus/SkuListsContainer.js +1 -0
  229. package/lib/cjs/components/skus/SkuOption.d.ts +14 -0
  230. package/lib/cjs/components/skus/SkuOption.js +1 -0
  231. package/lib/cjs/components/skus/SkuOptionInput.d.ts +15 -0
  232. package/lib/cjs/components/skus/SkuOptionInput.js +1 -0
  233. package/lib/cjs/components/skus/SkuOptionsContainer.d.ts +14 -0
  234. package/lib/cjs/components/skus/SkuOptionsContainer.js +1 -0
  235. package/lib/cjs/components/skus/Skus.d.ts +11 -0
  236. package/lib/cjs/components/skus/Skus.js +1 -0
  237. package/lib/cjs/components/skus/SkusContainer.d.ts +23 -0
  238. package/lib/cjs/components/skus/SkusContainer.js +1 -0
  239. package/lib/cjs/components/utils/AddressCardsTemplate.d.ts +27 -0
  240. package/lib/cjs/components/utils/AddressCardsTemplate.js +1 -0
  241. package/lib/{components → cjs/components}/utils/BaseField.d.ts +0 -0
  242. package/lib/cjs/components/utils/BaseField.js +1 -0
  243. package/lib/{components → cjs/components}/utils/BaseInput.d.ts +0 -0
  244. package/lib/cjs/components/utils/BaseInput.js +1 -0
  245. package/lib/{components → cjs/components}/utils/BaseOrderPrice.d.ts +0 -0
  246. package/lib/cjs/components/utils/BaseOrderPrice.js +1 -0
  247. package/lib/{components → cjs/components}/utils/BaseSelect.d.ts +0 -0
  248. package/lib/cjs/components/utils/BaseSelect.js +1 -0
  249. package/lib/cjs/components/utils/GenericFieldComponent.d.ts +42 -0
  250. package/lib/cjs/components/utils/GenericFieldComponent.js +1 -0
  251. package/lib/{components → cjs/components}/utils/Parent.d.ts +0 -0
  252. package/lib/cjs/components/utils/Parent.js +1 -0
  253. package/lib/{components → cjs/components}/utils/PaymentCardsTemplate.d.ts +0 -0
  254. package/lib/cjs/components/utils/PaymentCardsTemplate.js +1 -0
  255. package/lib/{components → cjs/components}/utils/PriceTemplate.d.ts +0 -0
  256. package/lib/cjs/components/utils/PriceTemplate.js +1 -0
  257. package/lib/{components → cjs/components}/utils/VariantTemplate.d.ts +0 -0
  258. package/lib/cjs/components/utils/VariantTemplate.js +1 -0
  259. package/lib/{components → cjs/components}/utils/getAllErrors.d.ts +0 -0
  260. package/lib/cjs/components/utils/getAllErrors.js +1 -0
  261. package/lib/cjs/config/components.d.ts +934 -0
  262. package/lib/cjs/config/components.js +1 -0
  263. package/lib/{config → cjs/config}/currency.d.ts +0 -0
  264. package/lib/cjs/config/currency.js +1 -0
  265. package/lib/cjs/context/AddressChildrenContext.d.ts +7 -0
  266. package/lib/cjs/context/AddressChildrenContext.js +1 -0
  267. package/lib/{context → cjs/context}/AddressContext.d.ts +0 -0
  268. package/lib/cjs/context/AddressContext.js +1 -0
  269. package/lib/{context → cjs/context}/AvailabilityContext.d.ts +0 -0
  270. package/lib/cjs/context/AvailabilityContext.js +1 -0
  271. package/lib/cjs/context/BillingAddressContext.d.ts +10 -0
  272. package/lib/cjs/context/BillingAddressContext.js +1 -0
  273. package/lib/cjs/context/BillingAddressFormContext.d.ts +25 -0
  274. package/lib/cjs/context/BillingAddressFormContext.js +1 -0
  275. package/lib/{context → cjs/context}/CommerceLayerContext.d.ts +0 -0
  276. package/lib/cjs/context/CommerceLayerContext.js +1 -0
  277. package/lib/cjs/context/CouponAndGiftCardFormContext.d.ts +9 -0
  278. package/lib/cjs/context/CouponAndGiftCardFormContext.js +1 -0
  279. package/lib/cjs/context/CustomerAddressFormContext.d.ts +20 -0
  280. package/lib/cjs/context/CustomerAddressFormContext.js +1 -0
  281. package/lib/cjs/context/CustomerContext.d.ts +22 -0
  282. package/lib/cjs/context/CustomerContext.js +1 -0
  283. package/lib/{context → cjs/context}/ExternalFunctionContext.d.ts +0 -0
  284. package/lib/cjs/context/ExternalFunctionContext.js +1 -0
  285. package/lib/{context → cjs/context}/GiftCardContext.d.ts +0 -0
  286. package/lib/cjs/context/GiftCardContext.js +1 -0
  287. package/lib/{context → cjs/context}/ItemContext.d.ts +0 -0
  288. package/lib/cjs/context/ItemContext.js +1 -0
  289. package/lib/{context → cjs/context}/LineItemChildrenContext.d.ts +0 -0
  290. package/lib/cjs/context/LineItemChildrenContext.js +1 -0
  291. package/lib/{context → cjs/context}/LineItemContext.d.ts +0 -0
  292. package/lib/cjs/context/LineItemContext.js +1 -0
  293. package/lib/{context → cjs/context}/LineItemOptionChildrenContext.d.ts +0 -0
  294. package/lib/cjs/context/LineItemOptionChildrenContext.js +1 -0
  295. package/lib/{context → cjs/context}/OrderContext.d.ts +0 -0
  296. package/lib/cjs/context/OrderContext.js +1 -0
  297. package/lib/cjs/context/OrderListChildrenContext.d.ts +60 -0
  298. package/lib/cjs/context/OrderListChildrenContext.js +1 -0
  299. package/lib/{context → cjs/context}/OrderStorageContext.d.ts +0 -0
  300. package/lib/cjs/context/OrderStorageContext.js +1 -0
  301. package/lib/{context → cjs/context}/PaymentMethodChildrenContext.d.ts +0 -0
  302. package/lib/cjs/context/PaymentMethodChildrenContext.js +1 -0
  303. package/lib/{context → cjs/context}/PaymentMethodContext.d.ts +0 -0
  304. package/lib/cjs/context/PaymentMethodContext.js +1 -0
  305. package/lib/{context → cjs/context}/PaymentSourceContext.d.ts +0 -0
  306. package/lib/cjs/context/PaymentSourceContext.js +1 -0
  307. package/lib/{context → cjs/context}/PlaceOrderContext.d.ts +0 -0
  308. package/lib/cjs/context/PlaceOrderContext.js +1 -0
  309. package/lib/{context → cjs/context}/PricesContext.d.ts +0 -0
  310. package/lib/cjs/context/PricesContext.js +1 -0
  311. package/lib/{context → cjs/context}/ShipmentChildrenContext.d.ts +0 -0
  312. package/lib/cjs/context/ShipmentChildrenContext.js +1 -0
  313. package/lib/{context → cjs/context}/ShipmentContext.d.ts +0 -0
  314. package/lib/cjs/context/ShipmentContext.js +1 -0
  315. package/lib/cjs/context/ShippingAddressContext.d.ts +10 -0
  316. package/lib/cjs/context/ShippingAddressContext.js +1 -0
  317. package/lib/{context → cjs/context}/ShippingAddressFormContext.d.ts +0 -0
  318. package/lib/cjs/context/ShippingAddressFormContext.js +1 -0
  319. package/lib/{context → cjs/context}/ShippingMethodChildrenContext.d.ts +0 -0
  320. package/lib/cjs/context/ShippingMethodChildrenContext.js +1 -0
  321. package/lib/{context → cjs/context}/SkuChildrenContext.d.ts +0 -0
  322. package/lib/cjs/context/SkuChildrenContext.js +1 -0
  323. package/lib/{context → cjs/context}/SkuContext.d.ts +0 -0
  324. package/lib/cjs/context/SkuContext.js +1 -0
  325. package/lib/{context → cjs/context}/SkuListsContext.d.ts +0 -0
  326. package/lib/cjs/context/SkuListsContext.js +1 -0
  327. package/lib/{context → cjs/context}/SkuOptionChildrenContext.d.ts +0 -0
  328. package/lib/cjs/context/SkuOptionChildrenContext.js +1 -0
  329. package/lib/{context → cjs/context}/SkuOptionsContext.d.ts +0 -0
  330. package/lib/cjs/context/SkuOptionsContext.js +1 -0
  331. package/lib/{context → cjs/context}/StockTransferChildrenContext.d.ts +0 -0
  332. package/lib/cjs/context/StockTransferChildrenContext.js +1 -0
  333. package/lib/{context → cjs/context}/VariantsContext.d.ts +0 -0
  334. package/lib/cjs/context/VariantsContext.js +1 -0
  335. package/lib/cjs/index.d.ts +107 -0
  336. package/lib/cjs/index.js +1 -0
  337. package/lib/cjs/reducers/AddressReducer.d.ts +60 -0
  338. package/lib/cjs/reducers/AddressReducer.js +1 -0
  339. package/lib/{reducers → cjs/reducers}/AvailabilityReducer.d.ts +0 -0
  340. package/lib/cjs/reducers/AvailabilityReducer.js +1 -0
  341. package/lib/{reducers → cjs/reducers}/BillingAddressReducer.d.ts +0 -0
  342. package/lib/cjs/reducers/BillingAddressReducer.js +1 -0
  343. package/lib/cjs/reducers/CustomerReducer.d.ts +131 -0
  344. package/lib/cjs/reducers/CustomerReducer.js +1 -0
  345. package/lib/{reducers → cjs/reducers}/GiftCardReducer.d.ts +0 -0
  346. package/lib/cjs/reducers/GiftCardReducer.js +1 -0
  347. package/lib/{reducers → cjs/reducers}/ItemReducer.d.ts +0 -0
  348. package/lib/cjs/reducers/ItemReducer.js +1 -0
  349. package/lib/{reducers → cjs/reducers}/LineItemReducer.d.ts +0 -0
  350. package/lib/cjs/reducers/LineItemReducer.js +1 -0
  351. package/lib/cjs/reducers/OrderReducer.d.ts +147 -0
  352. package/lib/cjs/reducers/OrderReducer.js +1 -0
  353. package/lib/{reducers → cjs/reducers}/PaymentMethodReducer.d.ts +0 -0
  354. package/lib/cjs/reducers/PaymentMethodReducer.js +1 -0
  355. package/lib/{reducers → cjs/reducers}/PlaceOrderReducer.d.ts +0 -0
  356. package/lib/cjs/reducers/PlaceOrderReducer.js +1 -0
  357. package/lib/{reducers → cjs/reducers}/PriceReducer.d.ts +0 -0
  358. package/lib/cjs/reducers/PriceReducer.js +1 -0
  359. package/lib/{reducers → cjs/reducers}/ShipmentReducer.d.ts +0 -0
  360. package/lib/cjs/reducers/ShipmentReducer.js +1 -0
  361. package/lib/{reducers → cjs/reducers}/ShippingAddressReducer.d.ts +0 -0
  362. package/lib/cjs/reducers/ShippingAddressReducer.js +1 -0
  363. package/lib/{reducers → cjs/reducers}/SkuListsReducer.d.ts +0 -0
  364. package/lib/cjs/reducers/SkuListsReducer.js +1 -0
  365. package/lib/{reducers → cjs/reducers}/SkuOptionsReducer.d.ts +0 -0
  366. package/lib/cjs/reducers/SkuOptionsReducer.js +1 -0
  367. package/lib/{reducers → cjs/reducers}/SkuReducer.d.ts +0 -0
  368. package/lib/cjs/reducers/SkuReducer.js +1 -0
  369. package/lib/{reducers → cjs/reducers}/VariantReducer.d.ts +0 -0
  370. package/lib/cjs/reducers/VariantReducer.js +1 -0
  371. package/lib/cjs/typings/errors.d.ts +51 -0
  372. package/lib/cjs/typings/errors.js +1 -0
  373. package/lib/cjs/typings/index.d.ts +137 -0
  374. package/lib/cjs/typings/index.js +1 -0
  375. package/lib/{utils → cjs/utils}/PropsType.d.ts +0 -0
  376. package/lib/cjs/utils/PropsType.js +1 -0
  377. package/lib/cjs/utils/addressesManager.d.ts +28 -0
  378. package/lib/cjs/utils/addressesManager.js +1 -0
  379. package/lib/{utils → cjs/utils}/baseReducer.d.ts +0 -0
  380. package/lib/cjs/utils/baseReducer.js +1 -0
  381. package/lib/{utils → cjs/utils}/browserInfo.d.ts +0 -0
  382. package/lib/cjs/utils/browserInfo.js +1 -0
  383. package/lib/{utils → cjs/utils}/checkIncludeResource.d.ts +0 -0
  384. package/lib/cjs/utils/checkIncludeResource.js +1 -0
  385. package/lib/{utils → cjs/utils}/childrenTypes.d.ts +0 -0
  386. package/lib/cjs/utils/childrenTypes.js +1 -0
  387. package/lib/{utils → cjs/utils}/compareObjAttribute.d.ts +0 -0
  388. package/lib/cjs/utils/compareObjAttribute.js +1 -0
  389. package/lib/{utils → cjs/utils}/countryStateCity.d.ts +0 -0
  390. package/lib/cjs/utils/countryStateCity.js +1 -0
  391. package/lib/{utils → cjs/utils}/customMessages.d.ts +0 -0
  392. package/lib/cjs/utils/customMessages.js +1 -0
  393. package/lib/{utils → cjs/utils}/customerOrderOptions.d.ts +0 -0
  394. package/lib/cjs/utils/customerOrderOptions.js +1 -0
  395. package/lib/{utils → cjs/utils}/getAmount.d.ts +0 -0
  396. package/lib/cjs/utils/getAmount.js +1 -0
  397. package/lib/{utils → cjs/utils}/getCardDetails.d.ts +0 -0
  398. package/lib/cjs/utils/getCardDetails.js +1 -0
  399. package/lib/{utils → cjs/utils}/getCartLink.d.ts +0 -0
  400. package/lib/cjs/utils/getCartLink.js +1 -0
  401. package/lib/{utils → cjs/utils}/getCurrentItemKey.d.ts +0 -0
  402. package/lib/cjs/utils/getCurrentItemKey.js +1 -0
  403. package/lib/{utils → cjs/utils}/getErrors.d.ts +0 -0
  404. package/lib/cjs/utils/getErrors.js +1 -0
  405. package/lib/{utils → cjs/utils}/getLineItemsCount.d.ts +0 -0
  406. package/lib/cjs/utils/getLineItemsCount.js +1 -0
  407. package/lib/{utils → cjs/utils}/getLoaderComponent.d.ts +0 -0
  408. package/lib/cjs/utils/getLoaderComponent.js +1 -0
  409. package/lib/{utils → cjs/utils}/getPrices.d.ts +0 -0
  410. package/lib/cjs/utils/getPrices.js +1 -0
  411. package/lib/{utils → cjs/utils}/getSdk.d.ts +0 -0
  412. package/lib/cjs/utils/getSdk.js +1 -0
  413. package/lib/{utils → cjs/utils}/getSkus.d.ts +0 -0
  414. package/lib/cjs/utils/getSkus.js +1 -0
  415. package/lib/{utils → cjs/utils}/hooks/useExternalScript.d.ts +0 -0
  416. package/lib/cjs/utils/hooks/useExternalScript.js +1 -0
  417. package/lib/cjs/utils/icons.d.ts +3 -0
  418. package/lib/cjs/utils/icons.js +1 -0
  419. package/lib/cjs/utils/isDate.d.ts +1 -0
  420. package/lib/cjs/utils/isDate.js +1 -0
  421. package/lib/{utils → cjs/utils}/isEmptyStates.d.ts +0 -0
  422. package/lib/cjs/utils/isEmptyStates.js +1 -0
  423. package/lib/{utils → cjs/utils}/isJSON.d.ts +0 -0
  424. package/lib/cjs/utils/isJSON.js +1 -0
  425. package/lib/cjs/utils/jwt.d.ts +27 -0
  426. package/lib/cjs/utils/jwt.js +1 -0
  427. package/lib/{utils → cjs/utils}/localStorage.d.ts +0 -0
  428. package/lib/cjs/utils/localStorage.js +1 -0
  429. package/lib/{utils → cjs/utils}/organization.d.ts +0 -0
  430. package/lib/cjs/utils/organization.js +1 -0
  431. package/lib/{utils → cjs/utils}/paypalPayment.d.ts +0 -0
  432. package/lib/cjs/utils/paypalPayment.js +1 -0
  433. package/lib/{utils → cjs/utils}/placeholderImages.d.ts +0 -0
  434. package/lib/cjs/utils/placeholderImages.js +1 -0
  435. package/lib/{utils → cjs/utils}/promisify.d.ts +0 -0
  436. package/lib/cjs/utils/promisify.js +1 -0
  437. package/lib/cjs/utils/scrollbarWidth.d.ts +1 -0
  438. package/lib/cjs/utils/scrollbarWidth.js +1 -0
  439. package/lib/{utils → cjs/utils}/shipments.d.ts +0 -0
  440. package/lib/cjs/utils/shipments.js +1 -0
  441. package/lib/{utils → cjs/utils}/validateFormFields.d.ts +0 -0
  442. package/lib/cjs/utils/validateFormFields.js +1 -0
  443. package/lib/esm/components/AdjustmentAmount.d.ts +4 -0
  444. package/lib/esm/components/AdjustmentAmount.js +1 -0
  445. package/lib/esm/components/AdyenPayment.d.ts +25 -0
  446. package/lib/esm/components/AdyenPayment.js +1 -0
  447. package/lib/esm/components/AvailabilityContainer.d.ts +14 -0
  448. package/lib/esm/components/AvailabilityContainer.js +1 -0
  449. package/lib/esm/components/AvailabilityTemplate.d.ts +24 -0
  450. package/lib/esm/components/AvailabilityTemplate.js +1 -0
  451. package/lib/esm/components/BillingAddressContainer.d.ts +11 -0
  452. package/lib/esm/components/BillingAddressContainer.js +1 -0
  453. package/lib/esm/components/BillingAddressForm.d.ts +13 -0
  454. package/lib/esm/components/BillingAddressForm.js +1 -0
  455. package/lib/esm/components/BraintreePayment.d.ts +30 -0
  456. package/lib/esm/components/BraintreePayment.js +1 -0
  457. package/lib/esm/components/CartLink.d.ts +12 -0
  458. package/lib/esm/components/CartLink.js +1 -0
  459. package/lib/esm/components/CheckoutComPayment.d.ts +23 -0
  460. package/lib/esm/components/CheckoutComPayment.js +1 -0
  461. package/lib/esm/components/CheckoutLink.d.ts +23 -0
  462. package/lib/esm/components/CheckoutLink.js +1 -0
  463. package/lib/esm/components/DeliveryLeadTime.d.ts +17 -0
  464. package/lib/esm/components/DeliveryLeadTime.js +1 -0
  465. package/lib/esm/components/DiscountAmount.d.ts +18 -0
  466. package/lib/esm/components/DiscountAmount.js +1 -0
  467. package/lib/esm/components/Errors.d.ts +5 -0
  468. package/lib/esm/components/Errors.js +1 -0
  469. package/lib/esm/components/ExternalFunction.d.ts +14 -0
  470. package/lib/esm/components/ExternalFunction.js +1 -0
  471. package/lib/esm/components/GiftCard.d.ts +18 -0
  472. package/lib/esm/components/GiftCard.js +1 -0
  473. package/lib/esm/components/GiftCardContainer.d.ts +12 -0
  474. package/lib/esm/components/GiftCardContainer.js +1 -0
  475. package/lib/esm/components/GiftCardCurrencySelector.d.ts +22 -0
  476. package/lib/esm/components/GiftCardCurrencySelector.js +1 -0
  477. package/lib/esm/components/GiftCardInput.d.ts +16 -0
  478. package/lib/esm/components/GiftCardInput.js +1 -0
  479. package/lib/esm/components/GiftCardOrCouponCode.d.ts +24 -0
  480. package/lib/esm/components/GiftCardOrCouponCode.js +1 -0
  481. package/lib/esm/components/GiftCardOrCouponForm.d.ts +15 -0
  482. package/lib/esm/components/GiftCardOrCouponForm.js +1 -0
  483. package/lib/esm/components/GiftCardOrCouponInput.d.ts +19 -0
  484. package/lib/esm/components/GiftCardOrCouponInput.js +1 -0
  485. package/lib/esm/components/GiftCardOrCouponRemoveButton.d.ts +26 -0
  486. package/lib/esm/components/GiftCardOrCouponRemoveButton.js +1 -0
  487. package/lib/esm/components/GiftCardOrCouponSubmit.d.ts +16 -0
  488. package/lib/esm/components/GiftCardOrCouponSubmit.js +1 -0
  489. package/lib/esm/components/GiftCardRecipient.d.ts +0 -0
  490. package/lib/esm/components/GiftCardRecipient.js +1 -0
  491. package/lib/esm/components/GiftCardRecipientInput.d.ts +0 -0
  492. package/lib/esm/components/GiftCardRecipientInput.js +1 -0
  493. package/lib/esm/components/ItemContainer.d.ts +22 -0
  494. package/lib/esm/components/ItemContainer.js +1 -0
  495. package/lib/esm/components/KlarnaPayment.d.ts +10 -0
  496. package/lib/esm/components/KlarnaPayment.js +1 -0
  497. package/lib/esm/components/LineItem.d.ts +15 -0
  498. package/lib/esm/components/LineItem.js +1 -0
  499. package/lib/esm/components/LineItemAmount.d.ts +20 -0
  500. package/lib/esm/components/LineItemAmount.js +1 -0
  501. package/lib/esm/components/LineItemCode.d.ts +18 -0
  502. package/lib/esm/components/LineItemCode.js +1 -0
  503. package/lib/esm/components/LineItemImage.d.ts +23 -0
  504. package/lib/esm/components/LineItemImage.js +1 -0
  505. package/lib/esm/components/LineItemName.d.ts +17 -0
  506. package/lib/esm/components/LineItemName.js +1 -0
  507. package/lib/esm/components/LineItemOption.d.ts +30 -0
  508. package/lib/esm/components/LineItemOption.js +1 -0
  509. package/lib/esm/components/LineItemOptions.d.ts +19 -0
  510. package/lib/esm/components/LineItemOptions.js +1 -0
  511. package/lib/esm/components/LineItemQuantity.d.ts +26 -0
  512. package/lib/esm/components/LineItemQuantity.js +1 -0
  513. package/lib/esm/components/LineItemRemoveLink.d.ts +22 -0
  514. package/lib/esm/components/LineItemRemoveLink.js +1 -0
  515. package/lib/esm/components/LineItemsContainer.d.ts +20 -0
  516. package/lib/esm/components/LineItemsContainer.js +1 -0
  517. package/lib/esm/components/LineItemsCount.d.ts +22 -0
  518. package/lib/esm/components/LineItemsCount.js +1 -0
  519. package/lib/esm/components/LineItemsEmpty.d.ts +23 -0
  520. package/lib/esm/components/LineItemsEmpty.js +1 -0
  521. package/lib/esm/components/MetadataInput.d.ts +15 -0
  522. package/lib/esm/components/MetadataInput.js +1 -0
  523. package/lib/esm/components/PaymentGateway.d.ts +16 -0
  524. package/lib/esm/components/PaymentGateway.js +1 -0
  525. package/lib/esm/components/PaymentMethod.d.ts +22 -0
  526. package/lib/esm/components/PaymentMethod.js +1 -0
  527. package/lib/esm/components/PaymentMethodAmount.d.ts +18 -0
  528. package/lib/esm/components/PaymentMethodAmount.js +1 -0
  529. package/lib/esm/components/PaymentMethodName.d.ts +15 -0
  530. package/lib/esm/components/PaymentMethodName.js +1 -0
  531. package/lib/esm/components/PaymentMethodPrice.d.ts +20 -0
  532. package/lib/esm/components/PaymentMethodPrice.js +1 -0
  533. package/lib/esm/components/PaymentMethodRadioButton.d.ts +18 -0
  534. package/lib/esm/components/PaymentMethodRadioButton.js +1 -0
  535. package/lib/esm/components/PaymentMethodsContainer.d.ts +14 -0
  536. package/lib/esm/components/PaymentMethodsContainer.js +1 -0
  537. package/lib/esm/components/PaymentSource.d.ts +26 -0
  538. package/lib/esm/components/PaymentSource.js +1 -0
  539. package/lib/esm/components/PaymentSourceBrandIcon.d.ts +25 -0
  540. package/lib/esm/components/PaymentSourceBrandIcon.js +1 -0
  541. package/lib/esm/components/PaymentSourceBrandName.d.ts +19 -0
  542. package/lib/esm/components/PaymentSourceBrandName.js +1 -0
  543. package/lib/esm/components/PaymentSourceDetail.d.ts +18 -0
  544. package/lib/esm/components/PaymentSourceDetail.js +1 -0
  545. package/lib/esm/components/PaymentSourceEditButton.d.ts +16 -0
  546. package/lib/esm/components/PaymentSourceEditButton.js +1 -0
  547. package/lib/esm/components/PaypalPayment.d.ts +12 -0
  548. package/lib/esm/components/PaypalPayment.js +1 -0
  549. package/lib/esm/components/Price.d.ts +28 -0
  550. package/lib/esm/components/Price.js +1 -0
  551. package/lib/esm/components/PricesContainer.d.ts +27 -0
  552. package/lib/esm/components/PricesContainer.js +1 -0
  553. package/lib/esm/components/QuantitySelector.d.ts +31 -0
  554. package/lib/esm/components/QuantitySelector.js +1 -0
  555. package/lib/esm/components/SaveAddressesButton.d.ts +23 -0
  556. package/lib/esm/components/SaveAddressesButton.js +1 -0
  557. package/lib/esm/components/SaveCustomerButton.d.ts +24 -0
  558. package/lib/esm/components/SaveCustomerButton.js +1 -0
  559. package/lib/esm/components/ShippingAddressContainer.d.ts +11 -0
  560. package/lib/esm/components/ShippingAddressContainer.js +1 -0
  561. package/lib/esm/components/ShippingAddressForm.d.ts +13 -0
  562. package/lib/esm/components/ShippingAddressForm.js +1 -0
  563. package/lib/esm/components/ShippingAmount.d.ts +15 -0
  564. package/lib/esm/components/ShippingAmount.js +1 -0
  565. package/lib/esm/components/SkuField.d.ts +10 -0
  566. package/lib/esm/components/SkuField.js +1 -0
  567. package/lib/esm/components/Skus.d.ts +11 -0
  568. package/lib/esm/components/Skus.js +1 -0
  569. package/lib/esm/components/SkusContainer.d.ts +14 -0
  570. package/lib/esm/components/SkusContainer.js +1 -0
  571. package/lib/esm/components/StockTransfer.d.ts +12 -0
  572. package/lib/esm/components/StockTransfer.js +1 -0
  573. package/lib/esm/components/StockTransferField.d.ts +10 -0
  574. package/lib/esm/components/StockTransferField.js +1 -0
  575. package/lib/esm/components/StripePayment.d.ts +18 -0
  576. package/lib/esm/components/StripePayment.js +1 -0
  577. package/lib/esm/components/SubmitButton.d.ts +19 -0
  578. package/lib/esm/components/SubmitButton.js +1 -0
  579. package/lib/esm/components/VariantSelector.d.ts +52 -0
  580. package/lib/esm/components/VariantSelector.js +1 -0
  581. package/lib/esm/components/VariantsContainer.d.ts +20 -0
  582. package/lib/esm/components/VariantsContainer.js +1 -0
  583. package/lib/esm/components/WireTransferPayment.d.ts +10 -0
  584. package/lib/esm/components/WireTransferPayment.js +1 -0
  585. package/lib/esm/components/addresses/Address.d.ts +18 -0
  586. package/lib/esm/components/addresses/Address.js +1 -0
  587. package/lib/esm/components/addresses/AddressCountrySelector.d.ts +26 -0
  588. package/lib/esm/components/addresses/AddressCountrySelector.js +1 -0
  589. package/lib/esm/components/addresses/AddressField.d.ts +43 -0
  590. package/lib/esm/components/addresses/AddressField.js +1 -0
  591. package/lib/esm/components/addresses/AddressInput.d.ts +19 -0
  592. package/lib/esm/components/addresses/AddressInput.js +1 -0
  593. package/lib/esm/components/addresses/AddressStateSelector.d.ts +27 -0
  594. package/lib/esm/components/addresses/AddressStateSelector.js +1 -0
  595. package/lib/esm/components/addresses/AddressesContainer.d.ts +15 -0
  596. package/lib/esm/components/addresses/AddressesContainer.js +1 -0
  597. package/lib/esm/components/auth/CommerceLayer.d.ts +15 -0
  598. package/lib/esm/components/auth/CommerceLayer.js +1 -0
  599. package/lib/esm/components/customers/CustomerAddressForm.d.ts +13 -0
  600. package/lib/esm/components/customers/CustomerAddressForm.js +1 -0
  601. package/lib/esm/components/customers/CustomerContainer.d.ts +10 -0
  602. package/lib/esm/components/customers/CustomerContainer.js +1 -0
  603. package/lib/esm/components/customers/CustomerField.d.ts +10 -0
  604. package/lib/esm/components/customers/CustomerField.js +1 -0
  605. package/lib/esm/components/customers/CustomerInput.d.ts +23 -0
  606. package/lib/esm/components/customers/CustomerInput.js +1 -0
  607. package/lib/esm/components/gateways/AdyenGateway.d.ts +5 -0
  608. package/lib/esm/components/gateways/AdyenGateway.js +1 -0
  609. package/lib/esm/components/gateways/BraintreeGateway.d.ts +5 -0
  610. package/lib/esm/components/gateways/BraintreeGateway.js +1 -0
  611. package/lib/esm/components/gateways/CheckoutComGateway.d.ts +5 -0
  612. package/lib/esm/components/gateways/CheckoutComGateway.js +1 -0
  613. package/lib/esm/components/gateways/KlarnaGateway.d.ts +5 -0
  614. package/lib/esm/components/gateways/KlarnaGateway.js +1 -0
  615. package/lib/esm/components/gateways/PaypalGateway.d.ts +5 -0
  616. package/lib/esm/components/gateways/PaypalGateway.js +1 -0
  617. package/lib/esm/components/gateways/StripeGateway.d.ts +5 -0
  618. package/lib/esm/components/gateways/StripeGateway.js +1 -0
  619. package/lib/esm/components/gateways/WireTransferGateway.d.ts +5 -0
  620. package/lib/esm/components/gateways/WireTransferGateway.js +1 -0
  621. package/lib/esm/components/orders/AddToCartButton.d.ts +34 -0
  622. package/lib/esm/components/orders/AddToCartButton.js +1 -0
  623. package/lib/esm/components/orders/AdjustmentAmount.d.ts +18 -0
  624. package/lib/esm/components/orders/AdjustmentAmount.js +1 -0
  625. package/lib/esm/components/orders/CartLink.d.ts +12 -0
  626. package/lib/esm/components/orders/CartLink.js +1 -0
  627. package/lib/esm/components/orders/GiftCardAmount.d.ts +15 -0
  628. package/lib/esm/components/orders/GiftCardAmount.js +1 -0
  629. package/lib/esm/components/orders/OrderContainer.d.ts +26 -0
  630. package/lib/esm/components/orders/OrderContainer.js +1 -0
  631. package/lib/esm/components/orders/OrderList.d.ts +61 -0
  632. package/lib/esm/components/orders/OrderList.js +1 -0
  633. package/lib/esm/components/orders/OrderListRow.d.ts +30 -0
  634. package/lib/esm/components/orders/OrderListRow.js +1 -0
  635. package/lib/esm/components/orders/OrderNumber.d.ts +11 -0
  636. package/lib/esm/components/orders/OrderNumber.js +1 -0
  637. package/lib/esm/components/orders/OrderStorage.d.ts +16 -0
  638. package/lib/esm/components/orders/OrderStorage.js +1 -0
  639. package/lib/esm/components/orders/PlaceOrderButton.d.ts +24 -0
  640. package/lib/esm/components/orders/PlaceOrderButton.js +1 -0
  641. package/lib/esm/components/orders/PlaceOrderContainer.d.ts +14 -0
  642. package/lib/esm/components/orders/PlaceOrderContainer.js +1 -0
  643. package/lib/esm/components/orders/PrivacyAndTermsCheckbox.d.ts +10 -0
  644. package/lib/esm/components/orders/PrivacyAndTermsCheckbox.js +1 -0
  645. package/lib/esm/components/orders/SubTotalAmount.d.ts +18 -0
  646. package/lib/esm/components/orders/SubTotalAmount.js +1 -0
  647. package/lib/esm/components/orders/TaxesAmount.d.ts +18 -0
  648. package/lib/esm/components/orders/TaxesAmount.js +1 -0
  649. package/lib/esm/components/orders/TotalAmount.d.ts +18 -0
  650. package/lib/esm/components/orders/TotalAmount.js +1 -0
  651. package/lib/esm/components/shipments/Shipment.d.ts +15 -0
  652. package/lib/esm/components/shipments/Shipment.js +1 -0
  653. package/lib/esm/components/shipments/ShipmentField.d.ts +19 -0
  654. package/lib/esm/components/shipments/ShipmentField.js +1 -0
  655. package/lib/esm/components/shipments/ShipmentsContainer.d.ts +12 -0
  656. package/lib/esm/components/shipments/ShipmentsContainer.js +1 -0
  657. package/lib/esm/components/shipping_methods/ShippingMethod.d.ts +15 -0
  658. package/lib/esm/components/shipping_methods/ShippingMethod.js +1 -0
  659. package/lib/esm/components/shipping_methods/ShippingMethodName.d.ts +17 -0
  660. package/lib/esm/components/shipping_methods/ShippingMethodName.js +1 -0
  661. package/lib/esm/components/shipping_methods/ShippingMethodPrice.d.ts +25 -0
  662. package/lib/esm/components/shipping_methods/ShippingMethodPrice.js +1 -0
  663. package/lib/esm/components/shipping_methods/ShippingMethodRadioButton.d.ts +19 -0
  664. package/lib/esm/components/shipping_methods/ShippingMethodRadioButton.js +1 -0
  665. package/lib/esm/components/skus/SkuField.d.ts +14 -0
  666. package/lib/esm/components/skus/SkuField.js +1 -0
  667. package/lib/esm/components/skus/SkuList.d.ts +14 -0
  668. package/lib/esm/components/skus/SkuList.js +1 -0
  669. package/lib/esm/components/skus/SkuListsContainer.d.ts +12 -0
  670. package/lib/esm/components/skus/SkuListsContainer.js +1 -0
  671. package/lib/esm/components/skus/SkuOption.d.ts +14 -0
  672. package/lib/esm/components/skus/SkuOption.js +1 -0
  673. package/lib/esm/components/skus/SkuOptionInput.d.ts +15 -0
  674. package/lib/esm/components/skus/SkuOptionInput.js +1 -0
  675. package/lib/esm/components/skus/SkuOptionsContainer.d.ts +14 -0
  676. package/lib/esm/components/skus/SkuOptionsContainer.js +1 -0
  677. package/lib/esm/components/skus/Skus.d.ts +11 -0
  678. package/lib/esm/components/skus/Skus.js +1 -0
  679. package/lib/esm/components/skus/SkusContainer.d.ts +23 -0
  680. package/lib/esm/components/skus/SkusContainer.js +1 -0
  681. package/lib/esm/components/utils/AddressCardsTemplate.d.ts +27 -0
  682. package/lib/esm/components/utils/AddressCardsTemplate.js +1 -0
  683. package/lib/esm/components/utils/BaseField.d.ts +8 -0
  684. package/lib/esm/components/utils/BaseField.js +1 -0
  685. package/lib/esm/components/utils/BaseInput.d.ts +5 -0
  686. package/lib/esm/components/utils/BaseInput.js +1 -0
  687. package/lib/esm/components/utils/BaseOrderPrice.d.ts +6 -0
  688. package/lib/esm/components/utils/BaseOrderPrice.js +1 -0
  689. package/lib/esm/components/utils/BaseSelect.d.ts +5 -0
  690. package/lib/esm/components/utils/BaseSelect.js +1 -0
  691. package/lib/esm/components/utils/GenericFieldComponent.d.ts +42 -0
  692. package/lib/esm/components/utils/GenericFieldComponent.js +1 -0
  693. package/lib/esm/components/utils/Parent.d.ts +6 -0
  694. package/lib/esm/components/utils/Parent.js +1 -0
  695. package/lib/esm/components/utils/PaymentCardsTemplate.d.ts +23 -0
  696. package/lib/esm/components/utils/PaymentCardsTemplate.js +1 -0
  697. package/lib/esm/components/utils/PriceTemplate.d.ts +8 -0
  698. package/lib/esm/components/utils/PriceTemplate.js +1 -0
  699. package/lib/esm/components/utils/VariantTemplate.d.ts +36 -0
  700. package/lib/esm/components/utils/VariantTemplate.js +1 -0
  701. package/lib/esm/components/utils/getAllErrors.d.ts +17 -0
  702. package/lib/esm/components/utils/getAllErrors.js +1 -0
  703. package/lib/esm/config/components.d.ts +934 -0
  704. package/lib/esm/config/components.js +1 -0
  705. package/lib/esm/config/currency.d.ts +5 -0
  706. package/lib/{config → esm/config}/currency.js +0 -0
  707. package/lib/esm/context/AddressChildrenContext.d.ts +7 -0
  708. package/lib/esm/context/AddressChildrenContext.js +1 -0
  709. package/lib/esm/context/AddressContext.d.ts +17 -0
  710. package/lib/{context → esm/context}/AddressContext.js +0 -0
  711. package/lib/esm/context/AvailabilityContext.d.ts +3 -0
  712. package/lib/{context → esm/context}/AvailabilityContext.js +0 -0
  713. package/lib/esm/context/BillingAddressContext.d.ts +10 -0
  714. package/lib/esm/context/BillingAddressContext.js +1 -0
  715. package/lib/esm/context/BillingAddressFormContext.d.ts +25 -0
  716. package/lib/{context → esm/context}/BillingAddressFormContext.js +0 -0
  717. package/lib/esm/context/CommerceLayerContext.d.ts +7 -0
  718. package/lib/{context → esm/context}/CommerceLayerContext.js +0 -0
  719. package/lib/esm/context/CouponAndGiftCardFormContext.d.ts +9 -0
  720. package/lib/{context → esm/context}/CouponAndGiftCardFormContext.js +0 -0
  721. package/lib/esm/context/CustomerAddressFormContext.d.ts +20 -0
  722. package/lib/esm/context/CustomerAddressFormContext.js +1 -0
  723. package/lib/esm/context/CustomerContext.d.ts +22 -0
  724. package/lib/esm/context/CustomerContext.js +1 -0
  725. package/lib/esm/context/ExternalFunctionContext.d.ts +12 -0
  726. package/lib/{context → esm/context}/ExternalFunctionContext.js +0 -0
  727. package/lib/esm/context/GiftCardContext.d.ts +11 -0
  728. package/lib/{context → esm/context}/GiftCardContext.js +0 -0
  729. package/lib/esm/context/ItemContext.d.ts +13 -0
  730. package/lib/{context → esm/context}/ItemContext.js +0 -0
  731. package/lib/esm/context/LineItemChildrenContext.d.ts +9 -0
  732. package/lib/{context → esm/context}/LineItemChildrenContext.js +0 -0
  733. package/lib/esm/context/LineItemContext.d.ts +8 -0
  734. package/lib/{context → esm/context}/LineItemContext.js +0 -0
  735. package/lib/esm/context/LineItemOptionChildrenContext.d.ts +8 -0
  736. package/lib/{context → esm/context}/LineItemOptionChildrenContext.js +0 -0
  737. package/lib/esm/context/OrderContext.d.ts +30 -0
  738. package/lib/{context → esm/context}/OrderContext.js +0 -0
  739. package/lib/esm/context/OrderListChildrenContext.d.ts +60 -0
  740. package/lib/esm/context/OrderListChildrenContext.js +1 -0
  741. package/lib/esm/context/OrderStorageContext.d.ts +11 -0
  742. package/lib/{context → esm/context}/OrderStorageContext.js +0 -0
  743. package/lib/esm/context/PaymentMethodChildrenContext.d.ts +10 -0
  744. package/lib/{context → esm/context}/PaymentMethodChildrenContext.js +0 -0
  745. package/lib/esm/context/PaymentMethodContext.d.ts +23 -0
  746. package/lib/{context → esm/context}/PaymentMethodContext.js +0 -0
  747. package/lib/esm/context/PaymentSourceContext.d.ts +14 -0
  748. package/lib/{context → esm/context}/PaymentSourceContext.js +0 -0
  749. package/lib/esm/context/PlaceOrderContext.d.ts +18 -0
  750. package/lib/{context → esm/context}/PlaceOrderContext.js +0 -0
  751. package/lib/esm/context/PricesContext.d.ts +7 -0
  752. package/lib/{context → esm/context}/PricesContext.js +0 -0
  753. package/lib/esm/context/ShipmentChildrenContext.d.ts +13 -0
  754. package/lib/{context → esm/context}/ShipmentChildrenContext.js +0 -0
  755. package/lib/esm/context/ShipmentContext.d.ts +12 -0
  756. package/lib/{context → esm/context}/ShipmentContext.js +0 -0
  757. package/lib/esm/context/ShippingAddressContext.d.ts +10 -0
  758. package/lib/{context → esm/context}/ShippingAddressContext.js +0 -0
  759. package/lib/esm/context/ShippingAddressFormContext.d.ts +4 -0
  760. package/lib/{context → esm/context}/ShippingAddressFormContext.js +0 -0
  761. package/lib/esm/context/ShippingMethodChildrenContext.d.ts +10 -0
  762. package/lib/{context → esm/context}/ShippingMethodChildrenContext.js +0 -0
  763. package/lib/esm/context/SkuChildrenContext.d.ts +9 -0
  764. package/lib/{context → esm/context}/SkuChildrenContext.js +0 -0
  765. package/lib/esm/context/SkuContext.d.ts +9 -0
  766. package/lib/{context → esm/context}/SkuContext.js +0 -0
  767. package/lib/esm/context/SkuListsContext.d.ts +6 -0
  768. package/lib/{context → esm/context}/SkuListsContext.js +0 -0
  769. package/lib/esm/context/SkuOptionChildrenContext.d.ts +8 -0
  770. package/lib/{context → esm/context}/SkuOptionChildrenContext.js +0 -0
  771. package/lib/esm/context/SkuOptionsContext.d.ts +3 -0
  772. package/lib/{context → esm/context}/SkuOptionsContext.js +0 -0
  773. package/lib/esm/context/StockTransferChildrenContext.d.ts +7 -0
  774. package/lib/{context → esm/context}/StockTransferChildrenContext.js +0 -0
  775. package/lib/esm/context/VariantsContext.d.ts +3 -0
  776. package/lib/{context → esm/context}/VariantsContext.js +0 -0
  777. package/lib/esm/index.d.ts +107 -0
  778. package/lib/esm/index.js +1 -0
  779. package/lib/esm/reducers/AddressReducer.d.ts +60 -0
  780. package/lib/esm/reducers/AddressReducer.js +1 -0
  781. package/lib/esm/reducers/AvailabilityReducer.d.ts +61 -0
  782. package/lib/esm/reducers/AvailabilityReducer.js +1 -0
  783. package/lib/esm/reducers/BillingAddressReducer.d.ts +31 -0
  784. package/lib/esm/reducers/BillingAddressReducer.js +1 -0
  785. package/lib/esm/reducers/CustomerReducer.d.ts +131 -0
  786. package/lib/esm/reducers/CustomerReducer.js +1 -0
  787. package/lib/esm/reducers/GiftCardReducer.d.ts +76 -0
  788. package/lib/esm/reducers/GiftCardReducer.js +1 -0
  789. package/lib/esm/reducers/ItemReducer.d.ts +69 -0
  790. package/lib/{reducers → esm/reducers}/ItemReducer.js +0 -0
  791. package/lib/esm/reducers/LineItemReducer.d.ts +52 -0
  792. package/lib/esm/reducers/LineItemReducer.js +1 -0
  793. package/lib/esm/reducers/OrderReducer.d.ts +147 -0
  794. package/lib/esm/reducers/OrderReducer.js +1 -0
  795. package/lib/esm/reducers/PaymentMethodReducer.d.ts +151 -0
  796. package/lib/esm/reducers/PaymentMethodReducer.js +1 -0
  797. package/lib/esm/reducers/PlaceOrderReducer.d.ts +59 -0
  798. package/lib/esm/reducers/PlaceOrderReducer.js +1 -0
  799. package/lib/esm/reducers/PriceReducer.d.ts +44 -0
  800. package/lib/esm/reducers/PriceReducer.js +1 -0
  801. package/lib/esm/reducers/ShipmentReducer.d.ts +40 -0
  802. package/lib/{reducers → esm/reducers}/ShipmentReducer.js +0 -0
  803. package/lib/esm/reducers/ShippingAddressReducer.d.ts +32 -0
  804. package/lib/esm/reducers/ShippingAddressReducer.js +1 -0
  805. package/lib/esm/reducers/SkuListsReducer.d.ts +21 -0
  806. package/lib/{reducers → esm/reducers}/SkuListsReducer.js +0 -0
  807. package/lib/esm/reducers/SkuOptionsReducer.d.ts +26 -0
  808. package/lib/{reducers → esm/reducers}/SkuOptionsReducer.js +0 -0
  809. package/lib/esm/reducers/SkuReducer.d.ts +21 -0
  810. package/lib/esm/reducers/SkuReducer.js +1 -0
  811. package/lib/esm/reducers/VariantReducer.d.ts +72 -0
  812. package/lib/esm/reducers/VariantReducer.js +1 -0
  813. package/lib/esm/typings/errors.d.ts +51 -0
  814. package/lib/esm/typings/errors.js +1 -0
  815. package/lib/esm/typings/index.d.ts +137 -0
  816. package/lib/esm/typings/index.js +1 -0
  817. package/lib/esm/utils/PropsType.d.ts +33 -0
  818. package/lib/{utils → esm/utils}/PropsType.js +0 -0
  819. package/lib/esm/utils/addressesManager.d.ts +28 -0
  820. package/lib/esm/utils/addressesManager.js +1 -0
  821. package/lib/esm/utils/baseReducer.d.ts +3 -0
  822. package/lib/esm/utils/baseReducer.js +1 -0
  823. package/lib/esm/utils/browserInfo.d.ts +9 -0
  824. package/lib/{utils → esm/utils}/browserInfo.js +0 -0
  825. package/lib/esm/utils/checkIncludeResource.d.ts +8 -0
  826. package/lib/esm/utils/checkIncludeResource.js +1 -0
  827. package/lib/esm/utils/childrenTypes.d.ts +9 -0
  828. package/lib/esm/utils/childrenTypes.js +1 -0
  829. package/lib/esm/utils/compareObjAttribute.d.ts +7 -0
  830. package/lib/{utils → esm/utils}/compareObjAttribute.js +0 -0
  831. package/lib/esm/utils/countryStateCity.d.ts +9 -0
  832. package/lib/{utils → esm/utils}/countryStateCity.js +0 -0
  833. package/lib/esm/utils/customMessages.d.ts +2 -0
  834. package/lib/{utils → esm/utils}/customMessages.js +0 -0
  835. package/lib/esm/utils/customerOrderOptions.d.ts +3 -0
  836. package/lib/{utils → esm/utils}/customerOrderOptions.js +0 -0
  837. package/lib/esm/utils/getAmount.d.ts +9 -0
  838. package/lib/{utils → esm/utils}/getAmount.js +0 -0
  839. package/lib/esm/utils/getCardDetails.d.ts +15 -0
  840. package/lib/esm/utils/getCardDetails.js +1 -0
  841. package/lib/esm/utils/getCartLink.d.ts +7 -0
  842. package/lib/{utils → esm/utils}/getCartLink.js +0 -0
  843. package/lib/esm/utils/getCurrentItemKey.d.ts +6 -0
  844. package/lib/{utils → esm/utils}/getCurrentItemKey.js +0 -0
  845. package/lib/esm/utils/getErrors.d.ts +11 -0
  846. package/lib/esm/utils/getErrors.js +1 -0
  847. package/lib/esm/utils/getLineItemsCount.d.ts +10 -0
  848. package/lib/esm/utils/getLineItemsCount.js +1 -0
  849. package/lib/esm/utils/getLoaderComponent.d.ts +3 -0
  850. package/lib/{utils → esm/utils}/getLoaderComponent.js +0 -0
  851. package/lib/esm/utils/getPrices.d.ts +17 -0
  852. package/lib/esm/utils/getPrices.js +1 -0
  853. package/lib/esm/utils/getSdk.d.ts +3 -0
  854. package/lib/esm/utils/getSdk.js +1 -0
  855. package/lib/esm/utils/getSkus.d.ts +3 -0
  856. package/lib/esm/utils/getSkus.js +1 -0
  857. package/lib/esm/utils/hooks/useExternalScript.d.ts +1 -0
  858. package/lib/{utils → esm/utils}/hooks/useExternalScript.js +0 -0
  859. package/lib/esm/utils/icons.d.ts +3 -0
  860. package/lib/esm/utils/icons.js +1 -0
  861. package/lib/esm/utils/isDate.d.ts +1 -0
  862. package/lib/esm/utils/isDate.js +1 -0
  863. package/lib/esm/utils/isEmptyStates.d.ts +1 -0
  864. package/lib/{utils → esm/utils}/isEmptyStates.js +0 -0
  865. package/lib/esm/utils/isJSON.d.ts +1 -0
  866. package/lib/{utils → esm/utils}/isJSON.js +0 -0
  867. package/lib/esm/utils/jwt.d.ts +27 -0
  868. package/lib/{utils → esm/utils}/jwt.js +0 -0
  869. package/lib/esm/utils/localStorage.d.ts +17 -0
  870. package/lib/{utils → esm/utils}/localStorage.js +0 -0
  871. package/lib/esm/utils/organization.d.ts +6 -0
  872. package/lib/{utils → esm/utils}/organization.js +0 -0
  873. package/lib/esm/utils/paypalPayment.d.ts +3 -0
  874. package/lib/{utils → esm/utils}/paypalPayment.js +0 -0
  875. package/lib/esm/utils/placeholderImages.d.ts +2 -0
  876. package/lib/{utils → esm/utils}/placeholderImages.js +0 -0
  877. package/lib/esm/utils/promisify.d.ts +1 -0
  878. package/lib/esm/utils/promisify.js +1 -0
  879. package/lib/esm/utils/scrollbarWidth.d.ts +1 -0
  880. package/lib/esm/utils/scrollbarWidth.js +1 -0
  881. package/lib/esm/utils/shipments.d.ts +3 -0
  882. package/lib/esm/utils/shipments.js +1 -0
  883. package/lib/esm/utils/validateFormFields.d.ts +22 -0
  884. package/lib/esm/utils/validateFormFields.js +1 -0
  885. package/lib/tsconfig.prod.esm.tsbuildinfo +1 -0
  886. package/lib/tsconfig.prod.tsbuildinfo +1 -0
  887. package/package.json +103 -46
  888. package/lib/components/AddToCartButton.d.ts +0 -34
  889. package/lib/components/AddToCartButton.js +0 -1
  890. package/lib/components/Address.d.ts +0 -13
  891. package/lib/components/Address.js +0 -1
  892. package/lib/components/AddressCountrySelector.d.ts +0 -9
  893. package/lib/components/AddressCountrySelector.js +0 -1
  894. package/lib/components/AddressField.d.ts +0 -15
  895. package/lib/components/AddressField.js +0 -1
  896. package/lib/components/AddressInput.d.ts +0 -7
  897. package/lib/components/AddressInput.js +0 -1
  898. package/lib/components/AddressStateSelector.d.ts +0 -11
  899. package/lib/components/AddressStateSelector.js +0 -1
  900. package/lib/components/AddressesContainer.d.ts +0 -8
  901. package/lib/components/AddressesContainer.js +0 -1
  902. package/lib/components/AdjustmentAmount.js +0 -1
  903. package/lib/components/AdyenPayment.d.ts +0 -25
  904. package/lib/components/AdyenPayment.js +0 -1
  905. package/lib/components/AvailabilityContainer.d.ts +0 -7
  906. package/lib/components/AvailabilityContainer.js +0 -1
  907. package/lib/components/AvailabilityTemplate.d.ts +0 -15
  908. package/lib/components/AvailabilityTemplate.js +0 -1
  909. package/lib/components/BillingAddressContainer.d.ts +0 -6
  910. package/lib/components/BillingAddressContainer.js +0 -1
  911. package/lib/components/BillingAddressForm.d.ts +0 -8
  912. package/lib/components/BillingAddressForm.js +0 -1
  913. package/lib/components/BraintreePayment.d.ts +0 -30
  914. package/lib/components/BraintreePayment.js +0 -1
  915. package/lib/components/CartLink.js +0 -1
  916. package/lib/components/CheckoutComPayment.d.ts +0 -23
  917. package/lib/components/CheckoutComPayment.js +0 -1
  918. package/lib/components/CheckoutLink.d.ts +0 -13
  919. package/lib/components/CheckoutLink.js +0 -1
  920. package/lib/components/CommerceLayer.d.ts +0 -8
  921. package/lib/components/CommerceLayer.js +0 -1
  922. package/lib/components/CustomerContainer.d.ts +0 -7
  923. package/lib/components/CustomerContainer.js +0 -1
  924. package/lib/components/CustomerInput.d.ts +0 -11
  925. package/lib/components/CustomerInput.js +0 -1
  926. package/lib/components/DeliveryLeadTime.d.ts +0 -10
  927. package/lib/components/DeliveryLeadTime.js +0 -1
  928. package/lib/components/DiscountAmount.d.ts +0 -4
  929. package/lib/components/DiscountAmount.js +0 -1
  930. package/lib/components/Errors.d.ts +0 -5
  931. package/lib/components/Errors.js +0 -1
  932. package/lib/components/ExternalFunction.d.ts +0 -7
  933. package/lib/components/ExternalFunction.js +0 -1
  934. package/lib/components/GiftCard.d.ts +0 -8
  935. package/lib/components/GiftCard.js +0 -1
  936. package/lib/components/GiftCardAmount.d.ts +0 -4
  937. package/lib/components/GiftCardAmount.js +0 -1
  938. package/lib/components/GiftCardContainer.d.ts +0 -6
  939. package/lib/components/GiftCardContainer.js +0 -1
  940. package/lib/components/GiftCardCurrencySelector.d.ts +0 -7
  941. package/lib/components/GiftCardCurrencySelector.js +0 -1
  942. package/lib/components/GiftCardInput.d.ts +0 -7
  943. package/lib/components/GiftCardInput.js +0 -1
  944. package/lib/components/GiftCardOrCouponCode.d.ts +0 -17
  945. package/lib/components/GiftCardOrCouponCode.js +0 -1
  946. package/lib/components/GiftCardOrCouponForm.d.ts +0 -10
  947. package/lib/components/GiftCardOrCouponForm.js +0 -1
  948. package/lib/components/GiftCardOrCouponInput.d.ts +0 -10
  949. package/lib/components/GiftCardOrCouponInput.js +0 -1
  950. package/lib/components/GiftCardOrCouponRemoveButton.d.ts +0 -18
  951. package/lib/components/GiftCardOrCouponRemoveButton.js +0 -1
  952. package/lib/components/GiftCardOrCouponSubmit.d.ts +0 -9
  953. package/lib/components/GiftCardOrCouponSubmit.js +0 -1
  954. package/lib/components/ItemContainer.d.ts +0 -11
  955. package/lib/components/ItemContainer.js +0 -1
  956. package/lib/components/KlarnaPayment.js +0 -1
  957. package/lib/components/LineItem.d.ts +0 -8
  958. package/lib/components/LineItem.js +0 -1
  959. package/lib/components/LineItemAmount.d.ts +0 -7
  960. package/lib/components/LineItemAmount.js +0 -1
  961. package/lib/components/LineItemCode.d.ts +0 -12
  962. package/lib/components/LineItemCode.js +0 -1
  963. package/lib/components/LineItemImage.d.ts +0 -16
  964. package/lib/components/LineItemImage.js +0 -1
  965. package/lib/components/LineItemName.d.ts +0 -11
  966. package/lib/components/LineItemName.js +0 -1
  967. package/lib/components/LineItemOption.d.ts +0 -19
  968. package/lib/components/LineItemOption.js +0 -1
  969. package/lib/components/LineItemOptions.d.ts +0 -16
  970. package/lib/components/LineItemOptions.js +0 -1
  971. package/lib/components/LineItemQuantity.d.ts +0 -14
  972. package/lib/components/LineItemQuantity.js +0 -1
  973. package/lib/components/LineItemRemoveLink.d.ts +0 -12
  974. package/lib/components/LineItemRemoveLink.js +0 -1
  975. package/lib/components/LineItemsContainer.d.ts +0 -8
  976. package/lib/components/LineItemsContainer.js +0 -1
  977. package/lib/components/LineItemsCount.d.ts +0 -12
  978. package/lib/components/LineItemsCount.js +0 -1
  979. package/lib/components/LineItemsEmpty.d.ts +0 -23
  980. package/lib/components/LineItemsEmpty.js +0 -1
  981. package/lib/components/MetadataInput.d.ts +0 -5
  982. package/lib/components/MetadataInput.js +0 -1
  983. package/lib/components/OrderContainer.d.ts +0 -12
  984. package/lib/components/OrderContainer.js +0 -1
  985. package/lib/components/OrderNumber.d.ts +0 -5
  986. package/lib/components/OrderNumber.js +0 -1
  987. package/lib/components/OrderStorage.d.ts +0 -8
  988. package/lib/components/OrderStorage.js +0 -1
  989. package/lib/components/PaymentGateway.d.ts +0 -16
  990. package/lib/components/PaymentGateway.js +0 -1
  991. package/lib/components/PaymentMethod.d.ts +0 -16
  992. package/lib/components/PaymentMethod.js +0 -1
  993. package/lib/components/PaymentMethodAmount.d.ts +0 -4
  994. package/lib/components/PaymentMethodAmount.js +0 -1
  995. package/lib/components/PaymentMethodName.d.ts +0 -9
  996. package/lib/components/PaymentMethodName.js +0 -1
  997. package/lib/components/PaymentMethodPrice.d.ts +0 -9
  998. package/lib/components/PaymentMethodPrice.js +0 -1
  999. package/lib/components/PaymentMethodRadioButton.d.ts +0 -12
  1000. package/lib/components/PaymentMethodRadioButton.js +0 -1
  1001. package/lib/components/PaymentMethodsContainer.d.ts +0 -8
  1002. package/lib/components/PaymentMethodsContainer.js +0 -1
  1003. package/lib/components/PaymentSource.d.ts +0 -19
  1004. package/lib/components/PaymentSource.js +0 -1
  1005. package/lib/components/PaymentSourceBrandIcon.d.ts +0 -15
  1006. package/lib/components/PaymentSourceBrandIcon.js +0 -1
  1007. package/lib/components/PaymentSourceBrandName.d.ts +0 -12
  1008. package/lib/components/PaymentSourceBrandName.js +0 -1
  1009. package/lib/components/PaymentSourceDetail.d.ts +0 -12
  1010. package/lib/components/PaymentSourceDetail.js +0 -1
  1011. package/lib/components/PaymentSourceEditButton.d.ts +0 -9
  1012. package/lib/components/PaymentSourceEditButton.js +0 -1
  1013. package/lib/components/PaypalPayment.d.ts +0 -12
  1014. package/lib/components/PaypalPayment.js +0 -1
  1015. package/lib/components/PlaceOrderButton.d.ts +0 -14
  1016. package/lib/components/PlaceOrderButton.js +0 -1
  1017. package/lib/components/PlaceOrderContainer.d.ts +0 -8
  1018. package/lib/components/PlaceOrderContainer.js +0 -1
  1019. package/lib/components/Price.d.ts +0 -16
  1020. package/lib/components/Price.js +0 -1
  1021. package/lib/components/PricesContainer.d.ts +0 -11
  1022. package/lib/components/PricesContainer.js +0 -1
  1023. package/lib/components/PrivacyAndTermsCheckbox.d.ts +0 -4
  1024. package/lib/components/PrivacyAndTermsCheckbox.js +0 -1
  1025. package/lib/components/QuantitySelector.d.ts +0 -17
  1026. package/lib/components/QuantitySelector.js +0 -1
  1027. package/lib/components/SaveAddressesButton.d.ts +0 -10
  1028. package/lib/components/SaveAddressesButton.js +0 -1
  1029. package/lib/components/SaveCustomerButton.d.ts +0 -13
  1030. package/lib/components/SaveCustomerButton.js +0 -1
  1031. package/lib/components/Shipment.d.ts +0 -15
  1032. package/lib/components/Shipment.js +0 -1
  1033. package/lib/components/ShipmentField.d.ts +0 -12
  1034. package/lib/components/ShipmentField.js +0 -1
  1035. package/lib/components/ShipmentsContainer.d.ts +0 -6
  1036. package/lib/components/ShipmentsContainer.js +0 -1
  1037. package/lib/components/ShippingAddressContainer.d.ts +0 -6
  1038. package/lib/components/ShippingAddressContainer.js +0 -1
  1039. package/lib/components/ShippingAddressForm.d.ts +0 -8
  1040. package/lib/components/ShippingAddressForm.js +0 -1
  1041. package/lib/components/ShippingAmount.d.ts +0 -4
  1042. package/lib/components/ShippingAmount.js +0 -1
  1043. package/lib/components/ShippingMethod.d.ts +0 -8
  1044. package/lib/components/ShippingMethod.js +0 -1
  1045. package/lib/components/ShippingMethodName.d.ts +0 -11
  1046. package/lib/components/ShippingMethodName.js +0 -1
  1047. package/lib/components/ShippingMethodPrice.d.ts +0 -13
  1048. package/lib/components/ShippingMethodPrice.js +0 -1
  1049. package/lib/components/ShippingMethodRadioButton.d.ts +0 -13
  1050. package/lib/components/ShippingMethodRadioButton.js +0 -1
  1051. package/lib/components/SkuField.js +0 -1
  1052. package/lib/components/SkuList.d.ts +0 -7
  1053. package/lib/components/SkuList.js +0 -1
  1054. package/lib/components/SkuListsContainer.d.ts +0 -6
  1055. package/lib/components/SkuListsContainer.js +0 -1
  1056. package/lib/components/SkuOption.d.ts +0 -7
  1057. package/lib/components/SkuOption.js +0 -1
  1058. package/lib/components/SkuOptionInput.d.ts +0 -5
  1059. package/lib/components/SkuOptionInput.js +0 -1
  1060. package/lib/components/SkuOptionsContainer.d.ts +0 -7
  1061. package/lib/components/SkuOptionsContainer.js +0 -1
  1062. package/lib/components/Skus.js +0 -1
  1063. package/lib/components/SkusContainer.js +0 -1
  1064. package/lib/components/StockTransfer.d.ts +0 -6
  1065. package/lib/components/StockTransfer.js +0 -1
  1066. package/lib/components/StockTransferField.d.ts +0 -10
  1067. package/lib/components/StockTransferField.js +0 -1
  1068. package/lib/components/StripePayment.d.ts +0 -18
  1069. package/lib/components/StripePayment.js +0 -1
  1070. package/lib/components/SubTotalAmount.d.ts +0 -4
  1071. package/lib/components/SubTotalAmount.js +0 -1
  1072. package/lib/components/SubmitButton.d.ts +0 -9
  1073. package/lib/components/SubmitButton.js +0 -1
  1074. package/lib/components/TaxesAmount.d.ts +0 -4
  1075. package/lib/components/TaxesAmount.js +0 -1
  1076. package/lib/components/TotalAmount.d.ts +0 -4
  1077. package/lib/components/TotalAmount.js +0 -1
  1078. package/lib/components/VariantSelector.d.ts +0 -29
  1079. package/lib/components/VariantSelector.js +0 -1
  1080. package/lib/components/VariantsContainer.d.ts +0 -8
  1081. package/lib/components/VariantsContainer.js +0 -1
  1082. package/lib/components/WireTransferPayment.d.ts +0 -10
  1083. package/lib/components/WireTransferPayment.js +0 -1
  1084. package/lib/components/gateways/AdyenGateway.d.ts +0 -5
  1085. package/lib/components/gateways/AdyenGateway.js +0 -1
  1086. package/lib/components/gateways/BraintreeGateway.d.ts +0 -5
  1087. package/lib/components/gateways/BraintreeGateway.js +0 -1
  1088. package/lib/components/gateways/CheckoutComGateway.d.ts +0 -5
  1089. package/lib/components/gateways/CheckoutComGateway.js +0 -1
  1090. package/lib/components/gateways/KlarnaGateway.d.ts +0 -5
  1091. package/lib/components/gateways/KlarnaGateway.js +0 -1
  1092. package/lib/components/gateways/PaypalGateway.d.ts +0 -5
  1093. package/lib/components/gateways/PaypalGateway.js +0 -1
  1094. package/lib/components/gateways/StripeGateway.d.ts +0 -5
  1095. package/lib/components/gateways/StripeGateway.js +0 -1
  1096. package/lib/components/gateways/WireTransferGateway.d.ts +0 -5
  1097. package/lib/components/gateways/WireTransferGateway.js +0 -1
  1098. package/lib/components/utils/AddressCardsTemplate.d.ts +0 -27
  1099. package/lib/components/utils/AddressCardsTemplate.js +0 -1
  1100. package/lib/components/utils/BaseField.js +0 -1
  1101. package/lib/components/utils/BaseInput.js +0 -1
  1102. package/lib/components/utils/BaseOrderPrice.js +0 -1
  1103. package/lib/components/utils/BaseSelect.js +0 -1
  1104. package/lib/components/utils/GenericFieldComponent.d.ts +0 -37
  1105. package/lib/components/utils/GenericFieldComponent.js +0 -1
  1106. package/lib/components/utils/Parent.js +0 -1
  1107. package/lib/components/utils/PaymentCardsTemplate.js +0 -1
  1108. package/lib/components/utils/PriceTemplate.js +0 -1
  1109. package/lib/components/utils/VariantTemplate.js +0 -1
  1110. package/lib/components/utils/getAllErrors.js +0 -1
  1111. package/lib/config/components.d.ts +0 -914
  1112. package/lib/config/components.js +0 -1
  1113. package/lib/context/AddressChildrenContext.d.ts +0 -7
  1114. package/lib/context/AddressChildrenContext.js +0 -1
  1115. package/lib/context/BillingAddressContext.d.ts +0 -12
  1116. package/lib/context/BillingAddressContext.js +0 -1
  1117. package/lib/context/BillingAddressFormContext.d.ts +0 -19
  1118. package/lib/context/CouponAndGiftCardFormContext.d.ts +0 -9
  1119. package/lib/context/CustomerContext.d.ts +0 -16
  1120. package/lib/context/CustomerContext.js +0 -1
  1121. package/lib/context/ShippingAddressContext.d.ts +0 -10
  1122. package/lib/index.d.ts +0 -103
  1123. package/lib/index.js +0 -1
  1124. package/lib/reducers/AddressReducer.d.ts +0 -59
  1125. package/lib/reducers/AddressReducer.js +0 -1
  1126. package/lib/reducers/AvailabilityReducer.js +0 -1
  1127. package/lib/reducers/BillingAddressReducer.js +0 -1
  1128. package/lib/reducers/CustomerReducer.d.ts +0 -50
  1129. package/lib/reducers/CustomerReducer.js +0 -1
  1130. package/lib/reducers/GiftCardReducer.js +0 -1
  1131. package/lib/reducers/LineItemReducer.js +0 -1
  1132. package/lib/reducers/OrderReducer.d.ts +0 -146
  1133. package/lib/reducers/OrderReducer.js +0 -1
  1134. package/lib/reducers/PaymentMethodReducer.js +0 -1
  1135. package/lib/reducers/PlaceOrderReducer.js +0 -1
  1136. package/lib/reducers/PriceReducer.js +0 -1
  1137. package/lib/reducers/ShippingAddressReducer.js +0 -1
  1138. package/lib/reducers/SkuReducer.js +0 -1
  1139. package/lib/reducers/VariantReducer.js +0 -1
  1140. package/lib/typings/errors.d.ts +0 -42
  1141. package/lib/typings/errors.js +0 -1
  1142. package/lib/typings/index.d.ts +0 -137
  1143. package/lib/typings/index.js +0 -1
  1144. package/lib/utils/addressesManager.d.ts +0 -28
  1145. package/lib/utils/addressesManager.js +0 -1
  1146. package/lib/utils/baseReducer.js +0 -1
  1147. package/lib/utils/checkIncludeResource.js +0 -1
  1148. package/lib/utils/childrenTypes.js +0 -1
  1149. package/lib/utils/getCardDetails.js +0 -1
  1150. package/lib/utils/getErrors.js +0 -1
  1151. package/lib/utils/getLineItemsCount.js +0 -1
  1152. package/lib/utils/getPrices.js +0 -1
  1153. package/lib/utils/getSdk.js +0 -1
  1154. package/lib/utils/getSkus.js +0 -1
  1155. package/lib/utils/jwt.d.ts +0 -27
  1156. package/lib/utils/promisify.js +0 -1
  1157. package/lib/utils/shipments.js +0 -1
  1158. package/lib/utils/validateFormFields.js +0 -1
@@ -1 +0,0 @@
1
- import PropTypes from"prop-types";import childrenTypes from"../utils/childrenTypes";import{baseOrderComponentPricePropTypes,PTLoader,BMObject}from"../typings/index";import{ErrorPropTypes}from"../typings/errors";import{BaseInputComponentPropTypes}from"../typings/index";const components={Address:{permittedChildren:["AddressField","ReactNode"],displayName:"Address",propTypes:{children:childrenTypes.isRequired}},AddressCountrySelector:{displayName:"AddressCountrySelector",propTypes:{children:PropTypes.func,placeholder:PropTypes.shape({label:PropTypes.string.isRequired,value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]).isRequired}),value:PropTypes.string,name:PropTypes.oneOf(["billing_address_country_code","shipping_address_country_code"]).isRequired,required:PropTypes.bool},defaultProps:{required:!0}},AddressStateSelector:{displayName:"AddressStateSelector",propTypes:{children:PropTypes.func,placeholder:PropTypes.shape({label:PropTypes.string.isRequired,value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]).isRequired}),value:PropTypes.string,name:PropTypes.oneOf(["billing_address_state_code","shipping_address_state_code"]).isRequired,required:PropTypes.bool},defaultProps:{required:!0}},AddressField:{displayName:"AddressField",propTypes:{children:PropTypes.func}},AddressInput:{displayName:"AddressInput",propTypes:{children:PropTypes.func,name:PropTypes.oneOf(["billing_address_city","billing_address_company","billing_address_email","billing_address_first_name","billing_address_last_name","billing_address_line_1","billing_address_line_2","billing_address_phone","billing_address_state_code","billing_address_zip_code","billing_address_billing_info","billing_address_save_to_customer_book","shipping_address_city","shipping_address_company","shipping_address_email","shipping_address_first_name","shipping_address_last_name","shipping_address_line_1","shipping_address_line_2","shipping_address_phone","shipping_address_state_code","shipping_address_zip_code","shipping_address_save_to_customer_book"]).isRequired,type:PropTypes.oneOf(["checkbox","date","email","number","tel","text","textarea"]).isRequired,placeholder:PropTypes.string,disabled:PropTypes.bool,required:PropTypes.bool},defaultProps:{required:!0}},AdjustmentAmount:{displayName:"AdjustmentAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},AddToCartButton:{displayName:"AddToCartButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element]),skuCode:PropTypes.string,disabled:PropTypes.bool,buyNowMode:PropTypes.bool,checkoutUrl:PropTypes.string,lineItem:PropTypes.shape({name:PropTypes.string.isRequired,imageUrl:PropTypes.string})},defaultProps:{label:"Add to cart"}},AddressesContainer:{displayName:"AddressesContainer",permittedChildren:["BillingAddressForm","BillingAddressContainer","ShippingAddressForm","ShippingAddressContainer","SaveAddressesButton","ReactNode"],propTypes:{children:childrenTypes.isRequired,shipToDifferentAddress:PropTypes.bool}},AvailabilityContainer:{displayName:"AvailabilityContainer",permittedChildren:["AvailabilityTemplate","ReactNode"],propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string}},AvailabilityTemplate:{displayName:"AvailabilityTemplate",propTypes:{timeFormat:PropTypes.oneOf(["days","hours"]),showShippingMethodName:PropTypes.bool,children:PropTypes.func},defaultProps:{timeFormat:"days",showShippingMethodName:!1}},BillingAddressContainer:{permittedChildren:["Address","ReactNode"],propTypes:{children:childrenTypes.isRequired}},BillingAddressForm:{permittedChildren:["AddressInput","ReactNode","Errors"],propTypes:{children:childrenTypes.isRequired}},CheckoutLink:{displayName:"CheckoutLink",propTypes:{children:PropTypes.func,label:PropTypes.string},defaultProps:{label:"Checkout"}},CommerceLayer:{permittedChildren:["OrderContainer","OrderStorage","PricesContainer","GiftCardContainer","ReactNode"],propTypes:{children:childrenTypes.isRequired,accessToken:PropTypes.string.isRequired,endpoint:PropTypes.string.isRequired}},CustomerContainer:{displayName:"CustomerContainer",permittedChildren:["CustomerInput","SaveCustomerButton","AddressesContainer","PaymentMethodsContainer","ShipmentsContainer","ReactNode"],propTypes:{children:childrenTypes.isRequired,isGuest:PropTypes.bool}},CustomerInput:{displayName:"CustomerInput",propTypes:{children:PropTypes.func,name:PropTypes.oneOf(["customerEmail"]),type:PropTypes.oneOf(["email"]),placeholder:PropTypes.string,disabled:PropTypes.bool,required:PropTypes.bool,saveOnBlur:PropTypes.bool},defaultProps:{required:!0}},DeliveryLeadTime:{displayName:"DeliveryLeadTime",propTypes:{type:PropTypes.oneOf(["max_days","max_hours","min_days","min_hours"]).isRequired,children:PropTypes.func}},DiscountAmount:{displayName:"DiscountAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},Errors:{displayName:"Errors",propTypes:ErrorPropTypes,defaultProps:{messages:[],field:"base"}},ExternalFunction:{displayName:"ExternalFunction",permittedChildren:["AddToCartButton","ReactNode"],propTypes:{children:childrenTypes.isRequired,url:PropTypes.string.isRequired}},GiftCard:{permittedChildren:["GiftCardCurrencySelector","GiftCardInput","Errors","MetadataInput","SubmitButton","ReactNode"],displayName:"GiftCard",propTypes:{children:childrenTypes.isRequired,onSubmit:PropTypes.func},defaultProps:{onSubmit:void 0}},GiftCardAmount:{displayName:"GiftCardAmount",propTypes:baseOrderComponentPricePropTypes},GiftCardContainer:{permittedChildren:["GiftCard","Errors","ReactNode"],displayName:"GiftCardContainer",propTypes:{children:childrenTypes.isRequired}},GiftCardCurrencySelector:{displayName:"GiftCardCurrencySelector",propTypes:{children:PropTypes.func,placeholder:PropTypes.shape({value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]).isRequired,label:PropTypes.string.isRequired}),value:PropTypes.string,required:PropTypes.bool},defaultProps:{required:!0}},GiftCardInput:{displayName:"GiftCardInput",propTypes:{type:PropTypes.oneOf(["text","email","number","date","checkbox"]).isRequired,name:PropTypes.oneOf(["balanceCents","balanceMaxCents","singleUse","rechargeable","imageUrl","expiresAt","referenceOrigin","email","firstName","lastName","reference"]).isRequired,children:PropTypes.func,placeholder:PropTypes.string}},GiftCardOrCouponForm:{permittedChildren:["GiftCardOrCouponInput","GiftCardOrCouponSubmit","ReactNode"],propTypes:{children:childrenTypes.isRequired}},GiftCardOrCouponInput:{displayName:"GiftCardOrCouponInput",propTypes:{children:PropTypes.func,placeholder:PropTypes.string,disabled:PropTypes.bool,required:PropTypes.bool}},GiftCardOrCouponSubmit:{displayName:"GiftCardOrCouponSubmit",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.object])}},GiftCardOrCouponCode:{displayName:"GiftCardOrCouponCode",propTypes:{children:PropTypes.func,type:PropTypes.oneOf(["coupon","gift_card"])}},GiftCardOrCouponRemoveButton:{displayName:"GiftCardOrCouponRemoveButton",propTypes:{children:PropTypes.func,type:PropTypes.oneOf(["coupon","gift_card"]),label:PropTypes.oneOfType([PropTypes.string,PropTypes.object])}},ItemContainer:{permittedChildren:["PricesContainer","VariantsContainer","SkuOptionContainer","QuantitySelector","AddToCartButton","AvailabilityContainer","SkuListsContainer","ReactNode"],displayName:"ItemContainer",propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string,lineItem:PropTypes.shape({name:PropTypes.string.isRequired,imageUrl:PropTypes.string})}},LineItem:{permittedChildren:["AvailabilityContainer","LineItemImage","LineItemName","LineItemOptions","LineItemQuantity","LineItemAmount","LineItemRemoveLink","StockTransfer","Errors","ReactNode"],displayName:"LineItem",propTypes:{children:childrenTypes.isRequired,type:PropTypes.oneOf(["skus","gift_cards","shipments","payment_methods","promotions","adjustments","bundles"])},defaultProps:{type:"skus"}},LineItemAmount:{displayName:"LineItemAmount",propTypes:Object.assign(Object.assign({},baseOrderComponentPricePropTypes),{type:PropTypes.oneOf(["total","unit","option"])}),defaultProps:{format:"formatted",type:"total"}},LineItemImage:{displayName:"LineItemImage",propTypes:{width:PropTypes.number,children:PropTypes.func}},LineItemName:{displayName:"LineItemName",propTypes:{children:PropTypes.func}},LineItemCode:{displayName:"LineItemCode",propTypes:{children:PropTypes.func}},LineItemOption:{displayName:"LineItemOption",propTypes:{name:PropTypes.string,children:PropTypes.func,valueClassName:PropTypes.string,className:PropTypes.string,id:PropTypes.string,style:PropTypes.object}},LineItemOptions:{permittedChildren:["LineItemOption","ReactNode"],displayName:"LineItemOptions",propTypes:{children:childrenTypes.isRequired,title:PropTypes.string,showName:PropTypes.bool,skuOptionId:PropTypes.string}},LineItemQuantity:{displayName:"LineItemQuantity",propTypes:{children:PropTypes.func,max:PropTypes.number,disabled:PropTypes.bool,readonly:PropTypes.bool},defaultProps:{max:50}},LineItemRemoveLink:{displayName:"LineItemRemoveLink",propTypes:{children:PropTypes.func,label:PropTypes.string},defaultProps:{label:"Remove"}},LineItemsContainer:{permittedChildren:["LineItemsCount","LineItemsEmpty","LineItem","ReactNode"],displayName:"LineItemsContainer",propTypes:{children:childrenTypes.isRequired,filters:PropTypes.object,loader:PTLoader},defaultProps:{filters:{},loader:"Loading..."}},LineItemsCount:{displayName:"LineItemsCount",propTypes:{children:PropTypes.func,id:PropTypes.string,className:PropTypes.string,name:PropTypes.string,style:PropTypes.object}},LineItemsEmpty:{displayName:"LineItemsEmpty",propTypes:{children:PropTypes.func,id:PropTypes.string,className:PropTypes.string,name:PropTypes.string,style:PropTypes.object,text:PropTypes.string}},MetadataInput:{displayName:"MetadataInput",propTypes:BaseInputComponentPropTypes},OrderContainer:{permittedChildren:["AddressesContainer","CustomerContainer","ItemContainer","LineItemsContainer","SubTotalAmount","DiscountAmount","AdjustmentAmount","ShippingAmount","TaxesAmount","GiftCardAmount","TotalAmount","CheckoutLink","GiftCardContainer","ShipmentsContainer","PaymentMethodsContainer","PaymentMethodAmount","GiftCardOrCouponForm","GiftCardOrCouponCode","GiftCardOrCouponRemoveButton","Errors","OrderNumber","ReactNode"],displayName:"OrderContainer",propTypes:{children:childrenTypes.isRequired,orderId:PropTypes.string,metadata:BMObject,attributes:PropTypes.object},defaultProps:{metadata:{}}},OrderNumber:{displayName:"OrderNumber",propTypes:{className:PropTypes.string},defaultProps:{format:"formatted"}},OrderStorage:{permittedChildren:["OrderContainer","ReactNode"],displayName:"OrderStorage",propTypes:{children:childrenTypes.isRequired,clearWhenPlaced:PropTypes.bool,persistKey:PropTypes.string.isRequired}},PaymentMethod:{permittedChildren:["PaymentMethodName","PaymentMethodRadioButton","PaymentMethodPrice","PaymentSource","ReactNode","Errors"],displayName:"PaymentMethod",propTypes:{children:childrenTypes.isRequired}},PaymentMethodAmount:{displayName:"PaymentMethodAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},PaymentMethodName:{displayName:"PaymentMethodName",propTypes:{children:PropTypes.func}},PaymentMethodPrice:{displayName:"PaymentMethodPrice",propTypes:Object.assign(Object.assign({},baseOrderComponentPricePropTypes),{type:PropTypes.oneOf(["amount"])})},PaymentMethodRadioButton:{displayName:"PaymentMethodRadioButton",propTypes:{children:PropTypes.func}},PaymentMethodsContainer:{displayName:"PaymentMethodsContainer",permittedChildren:["PaymentSource","ReactNode","PlaceOrderContainer"],propTypes:{children:childrenTypes.isRequired}},PaymentSource:{displayName:"PaymentSource",permittedChildren:["PaymentSourceBrandIcon","PaymentSourceBrandName","PaymentSourceEditButton","PaymentSourceDetail","ReactNode"],propTypes:{children:childrenTypes,readonly:PropTypes.bool}},PaymentSourceBrandIcon:{displayName:"PaymentSourceBrandIcon",propTypes:{children:PropTypes.func,width:PropTypes.number,height:PropTypes.number,src:PropTypes.string,className:PropTypes.string}},PaymentSourceBrandName:{displayName:"PaymentSourceBrandName",propTypes:{children:PropTypes.func,label:PropTypes.string}},PaymentSourceEditButton:{displayName:"PaymentSourceEditButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element])}},PaymentSourceDetail:{displayName:"PaymentSourceDetail",propTypes:{type:PropTypes.oneOf(["last4","exp_year","exp_month"]).isRequired}},PlaceOrderButton:{displayName:"PlaceOrderButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element])},defaultProps:{label:"Place order"}},PlaceOrderContainer:{displayName:"PlaceOrderContainer",permittedChildren:["PaymentMethod","PlaceOrderButton","PrivacyAndTermsCheckbox","ReactNode"],propTypes:{children:childrenTypes.isRequired}},Price:{displayName:"Price",propTypes:{children:PropTypes.func,compareClassName:PropTypes.string,skuCode:PropTypes.string,showCompare:PropTypes.bool},defaultProps:{skuCode:""}},PricesContainer:{permittedChildren:["Price","AvailabilityContainer","ReactNode"],displayName:"PricesContainer",propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string,loader:PTLoader,perPage:PropTypes.number,filters:PropTypes.object},defaultProps:{perPage:10,filters:{},loader:"Loading...",skuCode:""}},PrivacyAndTermsCheckbox:{displayName:"PrivacyAndTermsCheckbox",propTypes:{children:PropTypes.func}},QuantitySelector:{displayName:"QuantitySelector",propTypes:{children:PropTypes.func,min:PropTypes.number,max:PropTypes.number,value:PropTypes.string,skuCode:PropTypes.string,disabled:PropTypes.bool},defaultProps:{min:1}},SaveAddressesButton:{displayName:"SaveAddressesButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element]),onClick:PropTypes.func,disabled:PropTypes.bool},defaultProps:{label:"Continue to delivery"}},Shipment:{permittedChildren:["LineItemsContainer","LineItem","ShippingMethod","ReactNode"],displayName:"Shipment",propTypes:{children:childrenTypes.isRequired}},ShipmentField:{displayName:"ShipmentField",propTypes:{children:PropTypes.func,name:PropTypes.oneOf(["cost_amount_cents","cost_amount_float","currency_code","formatted_cost_amount","number","status","key_number"]).isRequired}},ShipmentsContainer:{displayName:"ShipmentsContainer",permittedChildren:["Shipment","ReactNode","Errors"],propTypes:{children:childrenTypes.isRequired}},ShippingAddressContainer:{permittedChildren:["Address","ReactNode"],propTypes:{children:childrenTypes.isRequired}},SaveCustomerButton:{displayName:"SaveCustomerButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element]),onClick:PropTypes.func},defaultProps:{label:"Save"}},ShippingAddressForm:{permittedChildren:["AddressInput","ReactNode"],propTypes:{children:childrenTypes.isRequired}},ShippingAmount:{displayName:"ShippingAmount",propTypes:baseOrderComponentPricePropTypes},ShippingMethod:{permittedChildren:["ShippingMethodName","ShippingMethodPrice","ShippingMethodRadioButton","DeliveryLeadTime","ReactNode"],displayName:"ShippingMethod",propTypes:{children:childrenTypes.isRequired,readonly:PropTypes.bool}},ShippingMethodName:{displayName:"ShippingMethodName",propTypes:{children:PropTypes.func}},ShippingMethodRadioButton:{displayName:"ShippingMethodRadioButton",propTypes:{children:PropTypes.func}},ShippingMethodPrice:{displayName:"ShippingMethodPrice",propTypes:Object.assign(Object.assign({},baseOrderComponentPricePropTypes),{type:PropTypes.oneOf(["amount"])}),defaultProps:{format:"formatted",type:"amount"}},SkusContainer:{displayName:"SkuContainer",permittedChildren:["Skus","ItemContainer","ReactNode"],propTypes:{children:childrenTypes.isRequired}},Skus:{displayName:"Skus",permittedChildren:["AvailabilityTemplate","SkuField","AddToCartButton","QuantitySelector","Price","ReactNode"],propTypes:{children:childrenTypes.isRequired}},SkuField:{displayName:"SkuField",propTypes:{children:PropTypes.func,attribute:PropTypes.string,tagElement:PropTypes.string}},SkuList:{permittedChildren:["AddToCartButton","QuantitySelector","ReactNode"],displayName:"SkuList",propTypes:{children:childrenTypes.isRequired,id:PropTypes.string.isRequired}},SkuListsContainer:{permittedChildren:["SkuList","ReactNode"],displayName:"SkuListsContainer",propTypes:{children:childrenTypes.isRequired}},SkuOption:{permittedChildren:["SkuOptionInput","ReactNode"],displayName:"SkuOption",propTypes:{children:childrenTypes.isRequired,id:PropTypes.string.isRequired}},SkuOptionInput:{displayName:"SkuOptionInput",propTypes:BaseInputComponentPropTypes},SkuOptionsContainer:{permittedChildren:["SkuOption","ReactNode"],displayName:"SkuOptionsContainer",propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string}},StockTransfer:{permittedChildren:["StockTransferField","ReactNode"],displayName:"StockTransfer",propTypes:{children:childrenTypes.isRequired}},StockTransferField:{displayName:"StockTransferField",propTypes:{children:PropTypes.func}},SubmitButton:{displayName:"SubmitButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element])},defaultProps:{label:"Submit"}},SubTotalAmount:{displayName:"SubTotalAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},TaxesAmount:{displayName:"TaxesAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},TotalAmount:{displayName:"TotalAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},VariantsContainer:{permittedChildren:["VariantSelector","ReactNode"],displayName:"VariantsContainer",propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string,filters:PropTypes.object},defaultProps:{skuCode:"",filters:{}}},VariantSelector:{displayName:"VariantSelector",propTypes:{options:PropTypes.arrayOf(PropTypes.shape({label:PropTypes.string.isRequired,code:PropTypes.string.isRequired,lineItem:PropTypes.shape({name:PropTypes.string.isRequired,imageUrl:PropTypes.string})}).isRequired).isRequired,name:PropTypes.string,children:PropTypes.func,type:PropTypes.oneOf(["select","radio"]),loader:PropTypes.element,placeholder:PropTypes.string,skuCode:PropTypes.string},defaultProps:{placeholder:"Select a variant",type:"select"}}};export default components;
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import { Address } from '@commercelayer/sdk';
3
- export interface InitialAddressContext {
4
- address: Address | Record<string, any>;
5
- }
6
- declare const AddressChildrenContext: import("react").Context<InitialAddressContext>;
7
- export default AddressChildrenContext;
@@ -1 +0,0 @@
1
- import{createContext}from"react";const initial={address:{}},AddressChildrenContext=createContext(initial);export default AddressChildrenContext;
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import { BillingAddressState } from '../reducers/BillingAddressReducer';
3
- declare type DefaultContext = {
4
- setBillingAddress?: (id: string, options?: {
5
- customerAddressId: string;
6
- }) => void;
7
- } & BillingAddressState;
8
- export declare const defaultBillingAddressContext: {
9
- setBillingAddress: () => void;
10
- };
11
- declare const BillingAddressContext: import("react").Context<DefaultContext>;
12
- export default BillingAddressContext;
@@ -1 +0,0 @@
1
- import{createContext}from"react";export const defaultBillingAddressContext={setBillingAddress:()=>{}};const BillingAddressContext=createContext(defaultBillingAddressContext);export default BillingAddressContext;
@@ -1,19 +0,0 @@
1
- import { RefObject } from 'react';
2
- import { AddressCountrySelectName, AddressInputName } from '../typings/index';
3
- import { AddressField } from '../reducers/AddressReducer';
4
- export declare type DefaultContextAddress = {
5
- validation?: () => RefObject<any>;
6
- setValue?: (name: AddressField | AddressInputName | AddressCountrySelectName, value: any) => void;
7
- errors?: Record<string, {
8
- code: string;
9
- message: string;
10
- error: boolean;
11
- }>[];
12
- errorClassName?: string;
13
- requiresBillingInfo?: boolean;
14
- resetField?: (name: string) => void;
15
- values?: Record<string, any>;
16
- isBusiness?: boolean;
17
- };
18
- declare const BillingAddressFormContext: import("react").Context<DefaultContextAddress>;
19
- export default BillingAddressFormContext;
@@ -1,9 +0,0 @@
1
- import { OrderCodeType } from '../reducers/OrderReducer';
2
- import { RefObject } from 'react';
3
- declare type DefaultContext = {
4
- validation?: () => RefObject<any>;
5
- setValue?: (name: string, value: string) => void;
6
- codeType?: OrderCodeType;
7
- };
8
- declare const CouponAndGiftCardFormContext: import("react").Context<DefaultContext>;
9
- export default CouponAndGiftCardFormContext;
@@ -1,16 +0,0 @@
1
- /// <reference types="react" />
2
- import { SetCustomerEmail, SetCustomerErrors, CustomerState } from '../reducers/CustomerReducer';
3
- declare type DefaultContext = {
4
- saveCustomerUser: (customerEmail: string) => Promise<void>;
5
- setCustomerErrors: SetCustomerErrors;
6
- setCustomerEmail: SetCustomerEmail;
7
- getCustomerPaymentSources: () => Promise<void>;
8
- } & Partial<CustomerState>;
9
- export declare const defaultCustomerContext: {
10
- saveCustomerUser: () => Promise<void>;
11
- getCustomerPaymentSources: () => Promise<void>;
12
- setCustomerErrors: SetCustomerErrors;
13
- setCustomerEmail: SetCustomerEmail;
14
- };
15
- declare const CustomerContext: import("react").Context<DefaultContext>;
16
- export default CustomerContext;
@@ -1 +0,0 @@
1
- import{setCustomerErrors,setCustomerEmail}from"../reducers/CustomerReducer";import{createContext}from"react";export const defaultCustomerContext={saveCustomerUser:async()=>{},getCustomerPaymentSources:async()=>{},setCustomerErrors,setCustomerEmail};const CustomerContext=createContext(defaultCustomerContext);export default CustomerContext;
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { ShippingAddressState } from '../reducers/ShippingAddressReducer';
3
- declare type DefaultContext = {
4
- setShippingAddress?: (id: string, options?: {
5
- customerAddressId: string;
6
- }) => void;
7
- } & ShippingAddressState;
8
- export declare const defaultShippingAddressContext: {};
9
- declare const ShippingAddressContext: import("react").Context<DefaultContext>;
10
- export default ShippingAddressContext;
package/lib/index.d.ts DELETED
@@ -1,103 +0,0 @@
1
- export { default as AddToCartButton } from './components/AddToCartButton';
2
- export { default as Address } from './components/Address';
3
- export { default as AddressCountrySelector } from './components/AddressCountrySelector';
4
- export { default as AddressField } from './components/AddressField';
5
- export { default as AddressInput } from './components/AddressInput';
6
- export { default as AddressStateSelector } from './components/AddressStateSelector';
7
- export { default as AddressesContainer } from './components/AddressesContainer';
8
- export { default as AdjustmentAmount } from './components/AdjustmentAmount';
9
- export { default as AvailabilityContainer } from './components/AvailabilityContainer';
10
- export { default as AvailabilityTemplate } from './components/AvailabilityTemplate';
11
- export { default as BillingAddressContainer } from './components/BillingAddressContainer';
12
- export { default as BillingAddressForm } from './components/BillingAddressForm';
13
- export { default as CartLink } from './components/CartLink';
14
- export { default as CheckoutLink } from './components/CheckoutLink';
15
- export { default as CommerceLayer } from './components/CommerceLayer';
16
- export { default as CustomerContainer } from './components/CustomerContainer';
17
- export { default as CustomerInput } from './components/CustomerInput';
18
- export { default as DeliveryLeadTime } from './components/DeliveryLeadTime';
19
- export { default as DiscountAmount } from './components/DiscountAmount';
20
- export { default as Errors } from './components/Errors';
21
- export { default as ExternalFunction } from './components/ExternalFunction';
22
- export { default as GiftCard } from './components/GiftCard';
23
- export { default as GiftCardAmount } from './components/GiftCardAmount';
24
- export { default as GiftCardContainer } from './components/GiftCardContainer';
25
- export { default as GiftCardCurrencySelector } from './components/GiftCardCurrencySelector';
26
- export { default as GiftCardInput } from './components/GiftCardInput';
27
- export { default as GiftCardOrCouponCode } from './components/GiftCardOrCouponCode';
28
- export { default as GiftCardOrCouponForm } from './components/GiftCardOrCouponForm';
29
- export { default as GiftCardOrCouponInput } from './components/GiftCardOrCouponInput';
30
- export { default as GiftCardOrCouponRemoveButton } from './components/GiftCardOrCouponRemoveButton';
31
- export { default as GiftCardOrCouponSubmit } from './components/GiftCardOrCouponSubmit';
32
- export { default as ItemContainer } from './components/ItemContainer';
33
- export { default as LineItem } from './components/LineItem';
34
- export { default as LineItemAmount } from './components/LineItemAmount';
35
- export { default as LineItemCode } from './components/LineItemCode';
36
- export { default as LineItemImage } from './components/LineItemImage';
37
- export { default as LineItemName } from './components/LineItemName';
38
- export { default as LineItemOption } from './components/LineItemOption';
39
- export { default as LineItemOptions } from './components/LineItemOptions';
40
- export { default as LineItemQuantity } from './components/LineItemQuantity';
41
- export { default as LineItemRemoveLink } from './components/LineItemRemoveLink';
42
- export { default as LineItemsContainer } from './components/LineItemsContainer';
43
- export { default as LineItemsCount } from './components/LineItemsCount';
44
- export { default as LineItemsEmpty } from './components/LineItemsEmpty';
45
- export { default as MetadataInput } from './components/MetadataInput';
46
- export { default as OrderContainer } from './components/OrderContainer';
47
- export { default as OrderNumber } from './components/OrderNumber';
48
- export { default as OrderStorage } from './components/OrderStorage';
49
- export { default as PaymentMethod } from './components/PaymentMethod';
50
- export { default as PaymentMethodAmount } from './components/PaymentMethodAmount';
51
- export { default as PaymentMethodName } from './components/PaymentMethodName';
52
- export { default as PaymentMethodPrice } from './components/PaymentMethodPrice';
53
- export { default as PaymentMethodRadioButton } from './components/PaymentMethodRadioButton';
54
- export { default as PaymentMethodsContainer } from './components/PaymentMethodsContainer';
55
- export { default as PaymentSource } from './components/PaymentSource';
56
- export { default as PaymentSourceBrandIcon } from './components/PaymentSourceBrandIcon';
57
- export { default as PaymentSourceBrandName } from './components/PaymentSourceBrandName';
58
- export { default as PaymentSourceDetail } from './components/PaymentSourceDetail';
59
- export { default as PaymentSourceEditButton } from './components/PaymentSourceEditButton';
60
- export { default as PlaceOrderButton } from './components/PlaceOrderButton';
61
- export { default as PlaceOrderContainer } from './components/PlaceOrderContainer';
62
- export { default as Price } from './components/Price';
63
- export { default as PricesContainer } from './components/PricesContainer';
64
- export { default as PrivacyAndTermsCheckbox } from './components/PrivacyAndTermsCheckbox';
65
- export { default as QuantitySelector } from './components/QuantitySelector';
66
- export { default as SaveAddressesButton } from './components/SaveAddressesButton';
67
- export { default as SaveCustomerButton } from './components/SaveCustomerButton';
68
- export { default as Shipment } from './components/Shipment';
69
- export { default as ShipmentField } from './components/ShipmentField';
70
- export { default as ShipmentsContainer } from './components/ShipmentsContainer';
71
- export { default as ShippingAddressContainer } from './components/ShippingAddressContainer';
72
- export { default as ShippingAddressForm } from './components/ShippingAddressForm';
73
- export { default as ShippingAmount } from './components/ShippingAmount';
74
- export { default as ShippingMethod } from './components/ShippingMethod';
75
- export { default as ShippingMethodName } from './components/ShippingMethodName';
76
- export { default as ShippingMethodPrice } from './components/ShippingMethodPrice';
77
- export { default as ShippingMethodRadioButton } from './components/ShippingMethodRadioButton';
78
- export { default as SkuField } from './components/SkuField';
79
- export { default as SkuList } from './components/SkuList';
80
- export { default as SkuListsContainer } from './components/SkuListsContainer';
81
- export { default as SkuOption } from './components/SkuOption';
82
- export { default as SkuOptionInput } from './components/SkuOptionInput';
83
- export { default as SkuOptionsContainer } from './components/SkuOptionsContainer';
84
- export { default as Skus } from './components/Skus';
85
- export { default as SkusContainer } from './components/SkusContainer';
86
- export { default as StockTransfer } from './components/StockTransfer';
87
- export { default as StockTransferField } from './components/StockTransferField';
88
- export { default as SubTotalAmount } from './components/SubTotalAmount';
89
- export { default as SubmitButton } from './components/SubmitButton';
90
- export { default as TaxesAmount } from './components/TaxesAmount';
91
- export { default as TotalAmount } from './components/TotalAmount';
92
- export { default as VariantSelector } from './components/VariantSelector';
93
- export { default as VariantsContainer } from './components/VariantsContainer';
94
- export type { CustomerCardsType } from './components/utils/PaymentCardsTemplate';
95
- export type { AddressCardsType } from './components/utils/AddressCardsTemplate';
96
- export type { AddToCartButtonType } from './components/AddToCartButton';
97
- export type { ShippingMethodRadioButtonType, ShippingMethodRadioButtonOnChangeType, } from './components/ShippingMethodRadioButton';
98
- export type { LineItemCodeType } from './components/LineItemCode';
99
- export type { LineItemNameType } from './components/LineItemName';
100
- export type { LineItemImageType } from './components/LineItemImage';
101
- export type { LineItemType } from './typings/index';
102
- export type { ErrorComponentProps, ResourceErrorType } from './typings/errors';
103
- export type { AddressCountrySelectName, AddressInputName, AddressStateSelectName, BaseInputType, } from './typings/index';
package/lib/index.js DELETED
@@ -1 +0,0 @@
1
- export{default as AddToCartButton}from"./components/AddToCartButton";export{default as Address}from"./components/Address";export{default as AddressCountrySelector}from"./components/AddressCountrySelector";export{default as AddressField}from"./components/AddressField";export{default as AddressInput}from"./components/AddressInput";export{default as AddressStateSelector}from"./components/AddressStateSelector";export{default as AddressesContainer}from"./components/AddressesContainer";export{default as AdjustmentAmount}from"./components/AdjustmentAmount";export{default as AvailabilityContainer}from"./components/AvailabilityContainer";export{default as AvailabilityTemplate}from"./components/AvailabilityTemplate";export{default as BillingAddressContainer}from"./components/BillingAddressContainer";export{default as BillingAddressForm}from"./components/BillingAddressForm";export{default as CartLink}from"./components/CartLink";export{default as CheckoutLink}from"./components/CheckoutLink";export{default as CommerceLayer}from"./components/CommerceLayer";export{default as CustomerContainer}from"./components/CustomerContainer";export{default as CustomerInput}from"./components/CustomerInput";export{default as DeliveryLeadTime}from"./components/DeliveryLeadTime";export{default as DiscountAmount}from"./components/DiscountAmount";export{default as Errors}from"./components/Errors";export{default as ExternalFunction}from"./components/ExternalFunction";export{default as GiftCard}from"./components/GiftCard";export{default as GiftCardAmount}from"./components/GiftCardAmount";export{default as GiftCardContainer}from"./components/GiftCardContainer";export{default as GiftCardCurrencySelector}from"./components/GiftCardCurrencySelector";export{default as GiftCardInput}from"./components/GiftCardInput";export{default as GiftCardOrCouponCode}from"./components/GiftCardOrCouponCode";export{default as GiftCardOrCouponForm}from"./components/GiftCardOrCouponForm";export{default as GiftCardOrCouponInput}from"./components/GiftCardOrCouponInput";export{default as GiftCardOrCouponRemoveButton}from"./components/GiftCardOrCouponRemoveButton";export{default as GiftCardOrCouponSubmit}from"./components/GiftCardOrCouponSubmit";export{default as ItemContainer}from"./components/ItemContainer";export{default as LineItem}from"./components/LineItem";export{default as LineItemAmount}from"./components/LineItemAmount";export{default as LineItemCode}from"./components/LineItemCode";export{default as LineItemImage}from"./components/LineItemImage";export{default as LineItemName}from"./components/LineItemName";export{default as LineItemOption}from"./components/LineItemOption";export{default as LineItemOptions}from"./components/LineItemOptions";export{default as LineItemQuantity}from"./components/LineItemQuantity";export{default as LineItemRemoveLink}from"./components/LineItemRemoveLink";export{default as LineItemsContainer}from"./components/LineItemsContainer";export{default as LineItemsCount}from"./components/LineItemsCount";export{default as LineItemsEmpty}from"./components/LineItemsEmpty";export{default as MetadataInput}from"./components/MetadataInput";export{default as OrderContainer}from"./components/OrderContainer";export{default as OrderNumber}from"./components/OrderNumber";export{default as OrderStorage}from"./components/OrderStorage";export{default as PaymentMethod}from"./components/PaymentMethod";export{default as PaymentMethodAmount}from"./components/PaymentMethodAmount";export{default as PaymentMethodName}from"./components/PaymentMethodName";export{default as PaymentMethodPrice}from"./components/PaymentMethodPrice";export{default as PaymentMethodRadioButton}from"./components/PaymentMethodRadioButton";export{default as PaymentMethodsContainer}from"./components/PaymentMethodsContainer";export{default as PaymentSource}from"./components/PaymentSource";export{default as PaymentSourceBrandIcon}from"./components/PaymentSourceBrandIcon";export{default as PaymentSourceBrandName}from"./components/PaymentSourceBrandName";export{default as PaymentSourceDetail}from"./components/PaymentSourceDetail";export{default as PaymentSourceEditButton}from"./components/PaymentSourceEditButton";export{default as PlaceOrderButton}from"./components/PlaceOrderButton";export{default as PlaceOrderContainer}from"./components/PlaceOrderContainer";export{default as Price}from"./components/Price";export{default as PricesContainer}from"./components/PricesContainer";export{default as PrivacyAndTermsCheckbox}from"./components/PrivacyAndTermsCheckbox";export{default as QuantitySelector}from"./components/QuantitySelector";export{default as SaveAddressesButton}from"./components/SaveAddressesButton";export{default as SaveCustomerButton}from"./components/SaveCustomerButton";export{default as Shipment}from"./components/Shipment";export{default as ShipmentField}from"./components/ShipmentField";export{default as ShipmentsContainer}from"./components/ShipmentsContainer";export{default as ShippingAddressContainer}from"./components/ShippingAddressContainer";export{default as ShippingAddressForm}from"./components/ShippingAddressForm";export{default as ShippingAmount}from"./components/ShippingAmount";export{default as ShippingMethod}from"./components/ShippingMethod";export{default as ShippingMethodName}from"./components/ShippingMethodName";export{default as ShippingMethodPrice}from"./components/ShippingMethodPrice";export{default as ShippingMethodRadioButton}from"./components/ShippingMethodRadioButton";export{default as SkuField}from"./components/SkuField";export{default as SkuList}from"./components/SkuList";export{default as SkuListsContainer}from"./components/SkuListsContainer";export{default as SkuOption}from"./components/SkuOption";export{default as SkuOptionInput}from"./components/SkuOptionInput";export{default as SkuOptionsContainer}from"./components/SkuOptionsContainer";export{default as Skus}from"./components/Skus";export{default as SkusContainer}from"./components/SkusContainer";export{default as StockTransfer}from"./components/StockTransfer";export{default as StockTransferField}from"./components/StockTransferField";export{default as SubTotalAmount}from"./components/SubTotalAmount";export{default as SubmitButton}from"./components/SubmitButton";export{default as TaxesAmount}from"./components/TaxesAmount";export{default as TotalAmount}from"./components/TotalAmount";export{default as VariantSelector}from"./components/VariantSelector";export{default as VariantsContainer}from"./components/VariantsContainer";
@@ -1,59 +0,0 @@
1
- import { Dispatch } from 'react';
2
- import { BaseError, ResourceErrorType } from '../typings/errors';
3
- import { CommerceLayerConfig } from '../context/CommerceLayerContext';
4
- import { Address, AddressCreate, Order } from '@commercelayer/sdk';
5
- import { updateOrder } from './OrderReducer';
6
- export declare type AddressActionType = 'setErrors' | 'setAddress' | 'setShipToDifferentAddress' | 'setCloneAddress' | 'cleanup';
7
- export declare type AddressField = 'city' | 'company' | 'country_code' | 'first_name' | 'last_name' | 'line_1' | 'line_2' | 'phone' | 'state_code' | 'zip_code' | 'billing_info';
8
- export declare type AddressFieldView = AddressField | 'full_address' | 'full_name';
9
- export declare const addressFields: AddressField[];
10
- export declare type AddressResource = Extract<ResourceErrorType, 'billing_address' | 'shipping_address'>;
11
- export declare type AddressSchema = Address;
12
- export interface AddressActionPayload {
13
- errors: BaseError[];
14
- billing_address: AddressCreate;
15
- shipping_address: AddressCreate;
16
- shipToDifferentAddress: boolean;
17
- billingAddressId: string;
18
- shippingAddressId: string;
19
- isBusiness: boolean;
20
- }
21
- export declare type AddressState = Partial<AddressActionPayload>;
22
- export interface AddressAction {
23
- type: AddressActionType;
24
- payload: Partial<AddressActionPayload>;
25
- }
26
- export declare const addressInitialState: AddressState;
27
- export interface SetAddressErrors {
28
- <V extends BaseError[]>(args: {
29
- errors: V;
30
- resource: Extract<ResourceErrorType, 'billing_address' | 'shipping_address'>;
31
- dispatch?: Dispatch<AddressAction>;
32
- currentErrors?: V;
33
- }): void;
34
- }
35
- export declare type SetAddressParams<V extends AddressSchema> = {
36
- values: V;
37
- resource: AddressResource;
38
- dispatch?: Dispatch<AddressAction>;
39
- };
40
- export interface SetAddress {
41
- <V extends AddressSchema>(params: SetAddressParams<V>): void;
42
- }
43
- export interface SaveAddresses {
44
- (params: {
45
- orderId?: string;
46
- order?: Order | null;
47
- updateOrder?: typeof updateOrder;
48
- config: CommerceLayerConfig;
49
- state: AddressState;
50
- dispatch: Dispatch<AddressAction>;
51
- }): Promise<void>;
52
- }
53
- export declare const setAddressErrors: SetAddressErrors;
54
- export declare const setAddress: SetAddress;
55
- declare type SetCloneAddress = (id: string, resource: AddressResource, dispatch: Dispatch<AddressAction>) => void;
56
- export declare const setCloneAddress: SetCloneAddress;
57
- export declare const saveAddresses: SaveAddresses;
58
- declare const addressReducer: (state: AddressState, reducer: AddressAction) => AddressState;
59
- export default addressReducer;
@@ -1 +0,0 @@
1
- import baseReducer from"../utils/baseReducer";import isEmpty from"lodash/isEmpty";import getSdk from"../utils/getSdk";import camelCase from"lodash/camelCase";export const addressFields=["city","company","country_code","first_name","last_name","line_1","line_2","phone","state_code","zip_code"],addressInitialState={errors:[]},setAddressErrors=({errors,dispatch,currentErrors=[],resource})=>{const billingErrors=resource==="billing_address"?errors.filter(e=>e.resource===resource):currentErrors.filter(e=>e.resource==="billing_address"),shippingErrors=resource==="shipping_address"?errors.filter(e=>e.resource===resource):currentErrors.filter(e=>e.resource==="shipping_address"),finalErrors=[...billingErrors,...shippingErrors];dispatch&&dispatch({type:"setErrors",payload:{errors:finalErrors}})},setAddress=({values,resource,dispatch})=>{dispatch&&dispatch({type:"setAddress",payload:{[`${resource}`]:values}})},setCloneAddress=(id,resource,dispatch)=>{dispatch({type:"setCloneAddress",payload:{[`${camelCase(resource)}Id`]:id}})},saveAddresses=async({config,updateOrder,order,state})=>{var _a,_b,_c;const{shipToDifferentAddress,billing_address,shipping_address,billingAddressId,shippingAddressId}=state;try{const sdk=getSdk(config);if(order){const currentBillingAddressRef=(_a=order==null?void 0:order.billing_address)===null||_a===void 0?void 0:_a.reference,orderAttributes={id:order==null?void 0:order.id,_billing_address_clone_id:billingAddressId,_shipping_address_clone_id:billingAddressId};if(currentBillingAddressRef===billingAddressId&&(orderAttributes._billing_address_clone_id=(_b=order==null?void 0:order.billing_address)===null||_b===void 0?void 0:_b.id,orderAttributes._shipping_address_clone_id=(_c=order==null?void 0:order.shipping_address)===null||_c===void 0?void 0:_c.id),!isEmpty(billing_address)&&billing_address){delete orderAttributes._billing_address_clone_id,delete orderAttributes._shipping_address_clone_id,orderAttributes._shipping_address_same_as_billing=!0;const address=await sdk.addresses.create(billing_address);orderAttributes.billing_address=sdk.addresses.relationship(address.id)}if(shipToDifferentAddress&&(delete orderAttributes._shipping_address_same_as_billing,shippingAddressId&&(orderAttributes._shipping_address_clone_id=shippingAddressId),!isEmpty(shipping_address)&&shipping_address)){delete orderAttributes._shipping_address_clone_id;const address=await sdk.addresses.create(shipping_address);orderAttributes.shipping_address=sdk.addresses.relationship(address.id)}!isEmpty(orderAttributes)&&updateOrder&&await updateOrder({id:order.id,attributes:orderAttributes})}}catch(error){console.error(error)}};const type=["setErrors","setAddress","setShipToDifferentAddress","setCloneAddress","cleanup"],addressReducer=(state,reducer)=>baseReducer(state,reducer,type);export default addressReducer;
@@ -1 +0,0 @@
1
- import baseReducer from"../utils/baseReducer";import getSdk from"../utils/getSdk";export const availabilityInitialState={quantity:null,min:{days:0,hours:0},max:{days:0,hours:0},errors:[]},getAvailability=async({skuCode,dispatch,config,setItem,item})=>{var _a;const sdk=getSdk(config);try{const[sku]=await sdk.skus.list({fields:{skus:["id"]},filters:{code_in:skuCode}});if(sku){const skuInventory=await sdk.skus.retrieve(sku.id,{fields:{skus:["inventory"]}}),[level]=((_a=skuInventory.inventory)===null||_a===void 0?void 0:_a.levels)||[],[delivery]=(level==null?void 0:level.delivery_lead_times)||[];dispatch({type:"setAvailability",payload:Object.assign(Object.assign({},delivery),{quantity:skuInventory.inventory.quantity})}),setItem&&setItem(Object.assign(Object.assign({},item),{[skuCode]:skuInventory}))}}catch(error){console.error("Get SKU availability",error)}};export async function getAvailabilityByIds({skusIds,config,setItem}){const sdk=getSdk(config);try{const inventories=await Promise.all(skusIds.map(async id=>await sdk.skus.retrieve(id,{fields:{skus:["inventory","code"]}}))),item={};inventories.forEach(v=>{(v==null?void 0:v.code)&&(item[v.code]=v)}),setItem&&setItem(item)}catch(error){console.error("Get SKU availability",error)}}const typeAction=["setAvailability","setErrors"],availabilityReducer=(state,reducer)=>baseReducer(state,reducer,typeAction);export default availabilityReducer;
@@ -1 +0,0 @@
1
- import baseReducer from"../utils/baseReducer";import getSdk from"../utils/getSdk";export const billingAddressInitialState={_billing_address_clone_id:""},setBillingAddress=async(id,options)=>{try{if(options==null?void 0:options.order){if(options.customerAddressId){const sdk=getSdk(options.config),attributes={id,reference:options.customerAddressId};await sdk.addresses.update(attributes)}options.dispatch({type:"setBillingAddress",payload:{_billing_address_clone_id:id}})}}catch(error){console.error("Set billing address",error)}},setBillingCustomerAddressId=async({dispatch,order,setCloneAddress})=>{var _a;const customerAddressId=(_a=order==null?void 0:order.billing_address)===null||_a===void 0?void 0:_a.reference;try{customerAddressId&&(dispatch({type:"setBillingCustomerAddressId",payload:{billingCustomerAddressId:customerAddressId}}),setCloneAddress(customerAddressId,"billing_address"))}catch(error){console.error("error",error)}};const type=["setBillingAddress","setBillingCustomerAddressId","cleanup"],billingAddressReducer=(state,reducer)=>baseReducer(state,reducer,type);export default billingAddressReducer;
@@ -1,50 +0,0 @@
1
- import { Dispatch } from 'react';
2
- import { BaseError } from '../typings/errors';
3
- import { Address, CustomerPaymentSource, Order } from '@commercelayer/sdk';
4
- import { CommerceLayerConfig } from '../context/CommerceLayerContext';
5
- import { updateOrder } from './OrderReducer';
6
- export declare type CustomerActionType = 'setErrors' | 'setCustomerEmail' | 'setAddresses' | 'setPayments';
7
- export interface CustomerActionPayload {
8
- addresses: Address[];
9
- payments: CustomerPaymentSource[];
10
- customerEmail: string;
11
- errors: BaseError[];
12
- isGuest: boolean;
13
- getCustomerPaymentSources: () => Promise<void>;
14
- }
15
- export declare type CustomerState = Partial<CustomerActionPayload>;
16
- export interface CustomerAction {
17
- type: CustomerActionType;
18
- payload: Partial<CustomerActionPayload>;
19
- }
20
- export declare type SetSaveOnBlur = (args: {
21
- saveOnBlur: boolean;
22
- dispatch: Dispatch<CustomerAction>;
23
- }) => void;
24
- export declare type SaveCustomerUser = (args: {
25
- config: CommerceLayerConfig;
26
- customerEmail: string;
27
- dispatch: Dispatch<CustomerAction>;
28
- order?: Order;
29
- updateOrder: typeof updateOrder;
30
- }) => void;
31
- export declare const saveCustomerUser: SaveCustomerUser;
32
- export interface SetCustomerErrors {
33
- <V extends BaseError[]>(errors: V, dispatch?: Dispatch<CustomerAction>): void;
34
- }
35
- export declare const setCustomerErrors: SetCustomerErrors;
36
- export declare type SetCustomerEmail = (customerEmail: string, dispatch?: Dispatch<CustomerAction>) => void;
37
- export declare const setCustomerEmail: SetCustomerEmail;
38
- export declare type GetCustomerAddresses = (params: {
39
- config: CommerceLayerConfig;
40
- dispatch: Dispatch<CustomerAction>;
41
- }) => Promise<void>;
42
- export declare const getCustomerAddresses: GetCustomerAddresses;
43
- export declare type GetCustomerPaymentSources = (params: {
44
- dispatch: Dispatch<CustomerAction>;
45
- order?: Order;
46
- }) => Promise<void>;
47
- export declare const getCustomerPaymentSources: GetCustomerPaymentSources;
48
- export declare const customerInitialState: CustomerState;
49
- declare const customerReducer: (state: CustomerState, reducer: CustomerAction) => CustomerState;
50
- export default customerReducer;
@@ -1 +0,0 @@
1
- import baseReducer from"../utils/baseReducer";import getSdk from"../utils/getSdk";import getErrors from"../utils/getErrors";export const saveCustomerUser=async({customerEmail,order,updateOrder})=>{if(order){const attributes={customer_email:customerEmail,id:order.id};await updateOrder({id:order.id,attributes})}},setCustomerErrors=(errors,dispatch)=>{dispatch&&dispatch({type:"setErrors",payload:{errors}})},setCustomerEmail=(customerEmail,dispatch)=>{dispatch&&dispatch({type:"setCustomerEmail",payload:{customerEmail}})},getCustomerAddresses=async({config,dispatch})=>{try{const addresses=[];(await getSdk(config).customer_addresses.list({include:["address"]})).forEach(customerAddress=>{customerAddress.address&&addresses.push(customerAddress.address)}),addresses.sort((a,b)=>a.full_name&&b.full_name?a.full_name.localeCompare(b.full_name):0),dispatch({type:"setAddresses",payload:{addresses}})}catch(error){const errors=getErrors(error,"addresses");dispatch({type:"setErrors",payload:{errors}})}},getCustomerPaymentSources=async({dispatch,order})=>{(order==null?void 0:order.available_customer_payment_sources)&&dispatch({type:"setPayments",payload:{payments:order.available_customer_payment_sources}})},customerInitialState={errors:[],addresses:[],payments:[]};const type=["setErrors","setCustomerEmail","setAddresses","setPayments"],customerReducer=(state,reducer)=>baseReducer(state,reducer,type);export default customerReducer;
@@ -1 +0,0 @@
1
- import{__rest}from"tslib";import baseReducer from"../utils/baseReducer";import{isEmpty}from"lodash";import getErrors from"../utils/getErrors";import getSdk from"../utils/getSdk";export const giftCardInitialState={currencyCode:"",balanceCent:0,singleUse:!1,rechargeable:!0,loading:!1,expiresAt:null,errors:[]},addGiftCardRecipient=async(values,config,dispatch)=>{try{const recipient=await getSdk(config).gift_card_recipients.create(values);dispatch({type:"setGiftCardRecipient",payload:{giftCardRecipient:recipient}})}catch(error){console.error(error)}},addGiftCardLoading=(loading,dispatch)=>{dispatch({type:"setGiftCardLoading",payload:{loading}})},addGiftCard=async(values,{config,dispatch,getOrder,createOrder,order})=>{var _a;try{const sdk=getSdk(config);addGiftCardLoading(!0,dispatch);const{firstName,lastName,email}=values,val=__rest(values,["firstName","lastName","email"]),giftCardValue=Object.assign({recipient_email:email},val),giftCard=await sdk.gift_cards.create(giftCardValue,{include:["gift_card_recipient"]}),recipientValues={id:(_a=giftCard.gift_card_recipient)===null||_a===void 0?void 0:_a.id};if(firstName&&(recipientValues.first_name=firstName),lastName&&(recipientValues.last_name=lastName),isEmpty(recipientValues)||await sdk.gift_card_recipients.update(recipientValues),createOrder&&getOrder){const id=order?order.id:await createOrder();if(id){const order2=sdk.orders.relationship(id),item=sdk.gift_cards.relationship(giftCard.id);await sdk.line_items.create({quantity:1,order:order2,item}),getOrder&&await getOrder(id)}}dispatch({type:"setGiftCardRecipient",payload:Object.assign({},giftCardValue)}),addGiftCardLoading(!1,dispatch)}catch(error){const errors=getErrors(error,"gift_cards");dispatch({type:"setGiftCardErrors",payload:{errors}}),addGiftCardLoading(!1,dispatch)}},addGiftCardError=(errors,dispatch)=>{dispatch({type:"setGiftCardErrors",payload:{errors}})};const type=["setAvailability","setGiftCardRecipient","setGiftCardErrors","setGiftCardLoading"],giftCardReducer=(state,reducer)=>baseReducer(state,reducer,type);export default giftCardReducer;
@@ -1 +0,0 @@
1
- import baseReducer from"../utils/baseReducer";import getSdk from"../utils/getSdk";import getErrors from"../utils/getErrors";export const getLineItems=params=>{const{order,dispatch,config}=params,sdk=getSdk(config);let allLineItems=[];order&&sdk.orders.retrieve(order==null?void 0:order.id,{include:["line_items","line_items.line_item_options.sku_option"],fields:{orders:["line_items"]}}).then(response=>{dispatch({type:"setLoading",payload:{loading:!1}});const items=response.line_items||[];allLineItems=[...allLineItems,...items],dispatch({type:"setLineItems",payload:{lineItems:allLineItems}})}).catch(error=>{const errors=getErrors(error,"line_items");dispatch({type:"setErrors",payload:{errors}})})},updateLineItem=async params=>{const{config,lineItemId,quantity,getOrder,orderId,dispatch}=params,sdk=getSdk(config);try{await sdk.line_items.update({id:lineItemId,quantity}),getOrder&&await getOrder(orderId),dispatch({type:"setErrors",payload:{errors:[]}})}catch(error){const errors=getErrors(error,"line_items");dispatch({type:"setErrors",payload:{errors}})}},deleteLineItem=async params=>{const{config,lineItemId,getOrder,orderId,dispatch}=params,sdk=getSdk(config);try{await sdk.line_items.delete(lineItemId),getOrder&&await getOrder(orderId),dispatch({type:"setErrors",payload:{errors:[]}})}catch(error){const errors=getErrors(error,"line_items");dispatch({type:"setErrors",payload:{errors}})}},lineItemInitialState={loading:!1,lineItems:[],errors:[]};const actionType=["setLineItems","setErrors","setLoading"],lineItemReducer=(state,reducer)=>baseReducer(state,reducer,actionType);export default lineItemReducer;
@@ -1,146 +0,0 @@
1
- import { Dispatch } from 'react';
2
- import { SetLocalOrder, DeleteLocalOrder } from '../utils/localStorage';
3
- import { CommerceLayerConfig } from '../context/CommerceLayerContext';
4
- import { ItemOption, CustomLineItem } from './ItemReducer';
5
- import { BaseMetadataObject } from '../typings/index';
6
- import { BaseError } from '../typings/errors';
7
- import { AddressResource } from './AddressReducer';
8
- import type { Order, OrderUpdate } from '@commercelayer/sdk';
9
- export declare type GetOrderParams = Partial<{
10
- clearWhenPlaced: boolean;
11
- config: CommerceLayerConfig;
12
- deleteLocalOrder: DeleteLocalOrder;
13
- dispatch: Dispatch<OrderActions>;
14
- id: string;
15
- persistKey: string;
16
- state: OrderState;
17
- }>;
18
- export interface GetOrder {
19
- (params: GetOrderParams): Promise<void | Order>;
20
- }
21
- declare type CreateOrderParams = Pick<AddToCartParams, 'config' | 'dispatch' | 'persistKey' | 'state' | 'orderMetadata' | 'orderAttributes' | 'setLocalOrder'>;
22
- export interface CreateOrder {
23
- (params?: CreateOrderParams): Promise<string>;
24
- }
25
- export declare type AddToCartParams = Partial<{
26
- bundleCode: string;
27
- skuCode: string;
28
- persistKey: string;
29
- config: CommerceLayerConfig;
30
- dispatch: Dispatch<OrderActions>;
31
- state: Partial<OrderState>;
32
- skuId: string;
33
- quantity: number;
34
- option: ItemOption;
35
- lineItem: CustomLineItem;
36
- orderMetadata: BaseMetadataObject;
37
- orderAttributes: Record<string, any>;
38
- errors: BaseError[];
39
- setLocalOrder: SetLocalOrder;
40
- buyNowMode: boolean;
41
- checkoutUrl: string;
42
- }>;
43
- export interface AddToCartImportParams extends Omit<AddToCartParams, 'skuCode' | 'skuId' | 'quantity' | 'option' | 'lineItem'> {
44
- lineItems: CustomLineItem[];
45
- }
46
- export declare type AddToCartReturn = Promise<{
47
- success: boolean;
48
- orderId: string | undefined;
49
- }>;
50
- export interface AddToCart {
51
- (params: AddToCartParams): AddToCartReturn;
52
- }
53
- export interface AddToCartImport {
54
- (params: AddToCartImportParams): AddToCartReturn;
55
- }
56
- export interface UnsetOrderState {
57
- (dispatch: Dispatch<OrderActions>): void;
58
- }
59
- export declare type ResourceIncluded = 'billing_address' | 'shipping_address' | 'line_items.line_item_options.sku_option' | 'line_items.item' | 'available_customer_payment_sources.payment_source' | 'shipments.available_shipping_methods' | 'shipments.stock_transfers' | 'shipments.stock_transfers.line_item' | 'shipments.shipment_line_items.line_item' | 'shipments.shipping_method' | 'shipments.stock_location' | 'payment_source' | 'available_payment_methods' | 'payment_method';
60
- declare type ResourceIncludedLoaded = Partial<Record<ResourceIncluded, boolean>>;
61
- export interface OrderPayload {
62
- loading?: boolean;
63
- orderId?: string;
64
- order?: Order;
65
- errors?: BaseError[];
66
- include?: ResourceIncluded[];
67
- includeLoaded?: ResourceIncludedLoaded;
68
- }
69
- export declare type AddToCartValues = Pick<AddToCartParams, 'bundleCode' | 'lineItem' | 'quantity' | 'skuCode' | 'skuId' | 'option' | 'buyNowMode' | 'checkoutUrl'>;
70
- export declare type AddToCartImportValues = Pick<AddToCartImportParams, 'lineItems'>;
71
- export declare type getOrderContext = (id: string) => Promise<void | Order>;
72
- export declare type OrderState = Partial<OrderPayload>;
73
- export interface OrderActions {
74
- type: OrderActionType;
75
- payload: OrderPayload;
76
- }
77
- export declare type OrderActionType = 'setLoading' | 'setOrderId' | 'setOrder' | 'setSingleQuantity' | 'setCurrentSkuCodes' | 'setCurrentSkuPrices' | 'setCurrentItem' | 'setErrors' | 'setSaveAddressToCustomerAddressBook' | 'setGiftCardOrCouponCode' | 'setIncludesResource';
78
- export declare const createOrder: CreateOrder;
79
- export declare const getApiOrder: GetOrder;
80
- export declare type UpdateOrderArgs = {
81
- id: string;
82
- attributes: Omit<OrderUpdate, 'id'>;
83
- dispatch?: Dispatch<OrderActions>;
84
- include?: string[];
85
- config?: CommerceLayerConfig;
86
- state?: OrderState;
87
- };
88
- export declare function updateOrder({ id, attributes, dispatch, config, include, state, }: UpdateOrderArgs): Promise<{
89
- success: boolean;
90
- error?: undefined;
91
- } | {
92
- success: boolean;
93
- error: unknown;
94
- }>;
95
- export declare const setOrder: (order: Order, dispatch?: Dispatch<OrderActions> | undefined) => void;
96
- export declare type AddResourceToInclude = {
97
- resourcesIncluded?: ResourceIncluded[];
98
- dispatch?: Dispatch<OrderActions>;
99
- newResource?: ResourceIncluded | ResourceIncluded[];
100
- resourceIncludedLoaded?: ResourceIncludedLoaded;
101
- newResourceLoaded?: ResourceIncludedLoaded;
102
- };
103
- export declare function addResourceToInclude({ resourcesIncluded, dispatch, newResource, newResourceLoaded, resourceIncludedLoaded, }: AddResourceToInclude): void;
104
- export declare const addToCart: AddToCart;
105
- export declare const unsetOrderState: UnsetOrderState;
106
- declare type OrderErrors = {
107
- dispatch?: Dispatch<OrderActions>;
108
- errors: BaseError[];
109
- };
110
- export declare function setOrderErrors({ dispatch, errors }: OrderErrors): {
111
- success: boolean;
112
- };
113
- export declare type SaveAddressToCustomerAddressBook = (params: {
114
- dispatch?: Dispatch<OrderActions>;
115
- type: AddressResource;
116
- value: boolean;
117
- }) => void;
118
- export declare const saveAddressToCustomerAddressBook: SaveAddressToCustomerAddressBook;
119
- export declare type SetGiftCardOrCouponCode = (args: {
120
- code: string;
121
- codeType: OrderCodeType;
122
- dispatch?: Dispatch<OrderActions>;
123
- config?: CommerceLayerConfig;
124
- order?: Order;
125
- include?: string[];
126
- state?: OrderState;
127
- }) => Promise<{
128
- success: boolean;
129
- }>;
130
- export declare const setGiftCardOrCouponCode: SetGiftCardOrCouponCode;
131
- export declare type CodeType = 'coupon' | 'gift_card' | 'gift_card_or_coupon';
132
- export declare type OrderCodeType = `${CodeType}_code`;
133
- export declare type RemoveGiftCardOrCouponCode = (args: {
134
- codeType: OrderCodeType;
135
- dispatch?: Dispatch<OrderActions>;
136
- config?: CommerceLayerConfig;
137
- order?: Order;
138
- include?: string[];
139
- state?: OrderState;
140
- }) => Promise<{
141
- success: boolean;
142
- }>;
143
- export declare const removeGiftCardOrCouponCode: RemoveGiftCardOrCouponCode;
144
- export declare const orderInitialState: Partial<OrderState>;
145
- declare const orderReducer: (state: OrderState, reducer: OrderActions) => OrderState;
146
- export default orderReducer;
@@ -1 +0,0 @@
1
- import{setCustomerOrderParam}from"../utils/localStorage";import baseReducer from"../utils/baseReducer";import isEmpty from"lodash/isEmpty";import size from"lodash/size";import map from"lodash/map";import getSdk from"../utils/getSdk";import getErrors,{setErrors}from"../utils/getErrors";import getOrganizationSlug from"../utils/organization";const actionType=["setLoading","setOrderId","setOrder","setSingleQuantity","setCurrentSkuCodes","setCurrentSkuPrices","setErrors","setCurrentItem","setSaveAddressToCustomerAddressBook","setIncludesResource"];export const createOrder=async params=>{if(params){const{persistKey,state,dispatch,config,orderMetadata:metadata,orderAttributes={},setLocalOrder}=params;if(state==null?void 0:state.orderId)return state.orderId;const sdk=getSdk(config);try{const o=await(sdk==null?void 0:sdk.orders.create(Object.assign({metadata},orderAttributes)));return dispatch&&dispatch({type:"setOrderId",payload:{orderId:o==null?void 0:o.id}}),persistKey&&setLocalOrder&&setLocalOrder(persistKey,o.id),o.id}catch(error){const errors=getErrors(error,"orders");console.error("Create order",errors),dispatch&&setErrors({currentErrors:state==null?void 0:state.errors,newErrors:errors,dispatch})}}return""},getApiOrder=async params=>{const{id,dispatch,config,clearWhenPlaced,persistKey,deleteLocalOrder,state}=params,sdk=getSdk(config);try{const options={};(state==null?void 0:state.include)&&state.include.length>0&&(options.include=state.include);const order=await sdk.orders.retrieve(id,options);return clearWhenPlaced&&order.status==="placed"||order.status==="approved"||order.status==="cancelled"?(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,"orders");console.error("Retrieve order",errors),dispatch&&setErrors({currentErrors:state==null?void 0:state.errors,newErrors:errors,dispatch});return}};export async function updateOrder({id,attributes,dispatch,config,include,state}){const sdk=getSdk(config);try{const resource=Object.assign(Object.assign({},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}}catch(error){const errors=getErrors(error,"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=[...resourcesIncluded,...resources],resources.forEach(resource=>{payload.includeLoaded=Object.assign(Object.assign({},payload.includeLoaded),{[resource]:!0})})}else delete payload.include;payload.includeLoaded=Object.assign(Object.assign(Object.assign({},resourceIncludedLoaded),newResourceLoaded),payload.includeLoaded&&payload.includeLoaded),dispatch&&dispatch({type:"setIncludesResource",payload})}export const addToCart=async params=>{var _a,_b,_c;const{skuCode,bundleCode,skuId,quantity,option,config,dispatch,lineItem,state,errors=[],buyNowMode,checkoutUrl}=params;try{if(!config)throw{errors:[{code:"INVALID_RESOURCE",resource:"orders",title:"Markup error",message:"You are trying to place an order outside the OrderContainer component"}]};const sdk=getSdk(config),id=await createOrder(params);if(id){const order=sdk.orders.relationship(id),name=lineItem==null?void 0:lineItem.name,imageUrl=lineItem==null?void 0:lineItem.imageUrl;buyNowMode&&((_a=state==null?void 0:state.order)===null||_a===void 0?void 0:_a.line_items)&&((_b=state==null?void 0:state.order)===null||_b===void 0?void 0:_b.line_items.length)>0&&await Promise.all((_c=state==null?void 0:state.order)===null||_c===void 0?void 0:_c.line_items.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:!0,bundle_code:bundleCode};skuId&&(attrs.item=sdk.skus.relationship(skuId));const newLineItem=await sdk.line_items.create(attrs);if(isEmpty(option))await getApiOrder(Object.assign(Object.assign({id},params),{state}));else{let c=0;map(option,async opt=>{const{options,skuOptionId}=opt,skuOption=sdk.sku_options.relationship(skuOptionId),lineItemRel=sdk.line_items.relationship(newLineItem.id),lineItemOptionsAttributes={quantity:1,options,sku_option:skuOption,line_item:lineItemRel};await sdk.line_item_options.create(lineItemOptionsAttributes),c+=1,c===size(option)&&await getApiOrder(Object.assign({id},params))})}if(!isEmpty(errors)&&dispatch&&dispatch({type:"setErrors",payload:{errors:[]}}),buyNowMode){const{organization}=getOrganizationSlug(config.endpoint),params2=`${id}?accessToken=${config.accessToken}`,redirectUrl=checkoutUrl?`${checkoutUrl}/${params2}`:`https://${organization}.checkout.commercelayer.app/${params2}`;location.href=redirectUrl}return{success:!0,orderId:id}}return{success:!1,orderId:void 0}}catch(error){const errors2=getErrors(error,"orders");return console.error("Add to cart",errors2),dispatch&&setErrors({currentErrors:state==null?void 0:state.errors,newErrors:errors2,dispatch}),{success:!1,orderId:void 0}}},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}`;setCustomerOrderParam(k,v),dispatch&&dispatch({type:"setSaveAddressToCustomerAddressBook",payload:{[k]:v}})},setGiftCardOrCouponCode=async({code,codeType,dispatch,config,order,include,state})=>{try{if(config&&order&&code&&dispatch){const attributes={[codeType]:code},{success,error}=await updateOrder({id:order.id,attributes,config,include,dispatch,state});if(!success)throw error;return dispatch({type:"setErrors",payload:{errors:[]}}),{success}}return{success:!1}}catch(error){const errors=getErrors(error,"orders",codeType);return dispatch&&setOrderErrors({errors,dispatch}),{success:!1}}},removeGiftCardOrCouponCode=async({codeType,dispatch,config,order,include,state})=>{try{if(config&&order&&dispatch){const attributes={[codeType]:""};return await updateOrder({id:order.id,attributes,config,include,dispatch,state}),dispatch({type:"setErrors",payload:{errors:[]}}),{success:!0}}return{success:!1}}catch(error){const errors=getErrors(error,"orders",codeType);return console.error("Remove gift card o coupon code",errors),dispatch&&setOrderErrors({errors,dispatch}),{success:!1}}},orderInitialState={loading:!0,orderId:"",order:void 0,errors:[],include:[]};const orderReducer=(state,reducer)=>baseReducer(state,reducer,actionType);export default orderReducer;
@@ -1 +0,0 @@
1
- import baseReducer from"../utils/baseReducer";import getErrors,{setErrors}from"../utils/getErrors";import getSdk from"../utils/getSdk";import camelCase from"lodash/camelCase";import has from"lodash/has";import isEmpty from"lodash/isEmpty";export function setLoading({loading,dispatch}){dispatch&&dispatch({type:"setLoading",payload:{loading}})}export const setPaymentRef=({ref,dispatch})=>{ref&&dispatch&&dispatch({type:"setPaymentRef",payload:{currentPaymentMethodRef:ref}})},paymentMethodInitialState={errors:[]},setPaymentMethodErrors=(errors,dispatch)=>{dispatch&&dispatch({type:"setErrors",payload:{errors}})},getPaymentMethods=async({order,dispatch})=>{const paymentMethods=order.available_payment_methods,paymentMethod=order.payment_method,paymentSource=order.payment_source;dispatch({type:"setPaymentMethods",payload:{paymentMethods,currentPaymentMethodId:paymentMethod==null?void 0:paymentMethod.id,currentPaymentMethodType:paymentMethod==null?void 0:paymentMethod.payment_source_type,paymentSource}})},setPaymentMethod=async({config,dispatch,order,paymentMethodId,updateOrder,setOrderErrors,paymentResource})=>{try{if(config&&order&&dispatch&&paymentResource){localStorage.removeItem("_save_payment_source_to_customer_wallet");const attributes={payment_method:getSdk(config).payment_methods.relationship(paymentMethodId)};updateOrder&&await updateOrder({id:order.id,attributes}),dispatch({type:"setPaymentMethods",payload:{currentPaymentMethodId:paymentMethodId,currentPaymentMethodType:paymentResource,errors:[]}}),setOrderErrors&&setOrderErrors([])}}catch(error){const errors=getErrors(error,"orders",paymentResource);console.error("Set payment method",errors)}},setPaymentSource=async({config,dispatch,getOrder,attributes={},order,paymentResource,customerPaymentSourceId,paymentSourceId,updateOrder,errors:currentErrors})=>{try{if(config&&order){let paymentSource;const sdk=getSdk(config);if(customerPaymentSourceId)updateOrder&&await updateOrder({id:order.id,attributes:{_customer_payment_source_id:customerPaymentSourceId}});else{if(paymentSourceId){const attrs=Object.assign({id:paymentSourceId},attributes);paymentSource=await sdk[paymentResource].update(attrs)}else{const attrs=Object.assign(Object.assign({},attributes),{order:sdk.orders.relationship(order.id)});paymentSource=await sdk[paymentResource].create(attrs)}return getOrder&&await getOrder(order.id),dispatch&&dispatch({type:"setPaymentSource",payload:{paymentSource,errors:[]}}),paymentSource}}}catch(error){const errors=getErrors(error,"payment_methods",paymentResource);console.error("Set payment source:",errors),dispatch&&setErrors({currentErrors,newErrors:errors,dispatch})}},updatePaymentSource=async({id,attributes,config,dispatch,paymentResource})=>{if(config)try{const paymentSource=await getSdk(config)[paymentResource].update(Object.assign({id},attributes));dispatch&&dispatch({type:"setPaymentSource",payload:{paymentSource}})}catch(err){console.error("Update payment source:",err)}},destroyPaymentSource=async({paymentSourceId,paymentResource,dispatch})=>{paymentSourceId&&paymentResource&&dispatch&&dispatch({type:"setPaymentSource",payload:{paymentSource:void 0}})},setPaymentMethodConfig=(config,dispatch)=>{dispatch({type:"setPaymentMethodConfig",payload:{config}})};export function getPaymentConfig(paymentResource,config){const resource=camelCase(paymentResource).replace("Payments","Payment").replace("Transfers","Transfer");return!isEmpty(config)&&has(config,resource)?config[resource]:void 0}const type=["setErrors","setPaymentMethodConfig","setPaymentMethods","setPaymentSource","setPaymentRef","setLoading"],paymentMethodReducer=(state,reducer)=>baseReducer(state,reducer,type);export default paymentMethodReducer;
@@ -1 +0,0 @@
1
- import baseReducer from"../utils/baseReducer";import isEmpty from"lodash/isEmpty";import{isDoNotShip,shipmentsFilled}from"../utils/shipments";import{saveBillingAddress,saveShippingAddress,saveToWallet}from"../utils/customerOrderOptions";import getSdk from"../utils/getSdk";import getErrors from"../utils/getErrors";export const placeOrderInitialState={errors:[],isPermitted:!1},setPlaceOrderErrors=(errors,dispatch)=>{dispatch&&dispatch({type:"setErrors",payload:{errors}})},placeOrderPermitted=async({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=isDoNotShip(order.line_items),shipments=order.shipments,shipment=shipments&&shipmentsFilled(shipments),paymentMethod=order.payment_method,paymentSource=order.payment_source;order.total_amount_with_taxes_cents!==0&&isEmpty(paymentMethod==null?void 0:paymentMethod.id)&&(isPermitted=!1),isEmpty(billingAddress)&&(isPermitted=!1),isEmpty(shippingAddress)&&!doNotShip&&(isPermitted=!1),!isEmpty(shipments)&&!shipment&&(isPermitted=!1),(paymentSource==null?void 0:paymentSource.mismatched_amounts)&&(isPermitted=!1),dispatch({type:"setPlaceOrderPermitted",payload:{isPermitted,paymentType:paymentMethod==null?void 0:paymentMethod.payment_source_type,paymentSecret:paymentSource==null?void 0:paymentSource.client_secret,paymentId:(_a=paymentSource==null?void 0:paymentSource.options)===null||_a===void 0?void 0:_a.id,paymentSource,options}})}},setPlaceOrder=async({state,order,config,setOrderErrors,paymentSource,setOrder,include})=>{var _a,_b,_c,_d;const response={placed:!1};if(state&&config&&order){const sdk=getSdk(config),{options,paymentType}=state;try{if(paymentType==="paypal_payments"&&paymentSource){if(!(options==null?void 0:options.paypalPayerId)&&(paymentSource==null?void 0:paymentSource.approval_url))return window.location.href=paymentSource==null?void 0:paymentSource.approval_url,response;await sdk[paymentType].update({id:paymentSource.id,paypal_payer_id:options==null?void 0:options.paypalPayerId})}if(paymentType==="checkout_com_payments"&&paymentSource&&((_a=options==null?void 0:options.checkoutCom)===null||_a===void 0?void 0:_a.session_id)){const payment=await sdk[paymentType].update({id:paymentSource.id,_details:!0,session_id:(_b=options==null?void 0:options.checkoutCom)===null||_b===void 0?void 0:_b.session_id});if(((_c=payment==null?void 0:payment.payment_response)===null||_c===void 0?void 0:_c.status)!=="Authorized"){const[action]=((_d=payment==null?void 0:payment.payment_response)===null||_d===void 0?void 0:_d.actions)||[""];throw{errors:[{code:"PAYMENT_NOT_APPROVED_FOR_EXECUTION",message:action==null?void 0:action.response_summary,resource:"orders",field:"checkout_com_payments"}]}}}const updateAttributes={id:order.id,_place:!0};switch(saveBillingAddress()&&await sdk.orders.update({id:order.id,_save_billing_address_to_customer_address_book:!0}),saveShippingAddress()&&await sdk.orders.update({id:order.id,_save_shipping_address_to_customer_address_book:!0}),paymentType){case"braintree_payments":{saveToWallet()&&await sdk.orders.update({id:order.id,_save_payment_source_to_customer_wallet:!0});const orderUpdated=await sdk.orders.update(updateAttributes,{include});return setOrder&&setOrder(orderUpdated),setOrderErrors&&setOrderErrors([]),{placed:!0}}default:{const orderUpdated=await sdk.orders.update(updateAttributes,{include});return setOrder&&setOrder(orderUpdated),saveToWallet()&&await sdk.orders.update({id:order.id,_save_payment_source_to_customer_wallet:!0}),setOrderErrors&&setOrderErrors([]),{placed:!0}}}}catch(error){const errors=getErrors(error,"orders",paymentType);return setOrderErrors&&setOrderErrors(errors),Object.assign(Object.assign({},response),{errors})}}return response};const type=["setErrors","setPlaceOrderPermitted"],placeOrderReducer=(state,reducer)=>baseReducer(state,reducer,type);export default placeOrderReducer;