@commercelayer/react-components 3.0.0-beta.6 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (417) hide show
  1. package/README.md +1 -1
  2. package/{dist → lib}/components/AddToCartButton.d.ts +20 -17
  3. package/lib/components/AddToCartButton.js +1 -0
  4. package/{dist → lib}/components/Address.d.ts +13 -12
  5. package/lib/components/Address.js +1 -0
  6. package/{dist → lib}/components/AddressCountrySelector.d.ts +9 -9
  7. package/lib/components/AddressCountrySelector.js +1 -0
  8. package/{dist → lib}/components/AddressField.d.ts +15 -15
  9. package/lib/components/AddressField.js +1 -0
  10. package/{dist → lib}/components/AddressInput.d.ts +7 -7
  11. package/lib/components/AddressInput.js +1 -0
  12. package/lib/components/AddressStateSelector.d.ts +11 -0
  13. package/lib/components/AddressStateSelector.js +1 -0
  14. package/{dist → lib}/components/AddressesContainer.d.ts +7 -7
  15. package/lib/components/AddressesContainer.js +1 -0
  16. package/lib/components/AdjustmentAmount.d.ts +4 -0
  17. package/lib/components/AdjustmentAmount.js +1 -0
  18. package/lib/components/AdyenPayment.d.ts +25 -0
  19. package/lib/components/AdyenPayment.js +1 -0
  20. package/{dist → lib}/components/AvailabilityContainer.d.ts +7 -7
  21. package/lib/components/AvailabilityContainer.js +1 -0
  22. package/{dist → lib}/components/AvailabilityTemplate.d.ts +15 -16
  23. package/lib/components/AvailabilityTemplate.js +1 -0
  24. package/{dist → lib}/components/BillingAddressContainer.d.ts +6 -6
  25. package/lib/components/BillingAddressContainer.js +1 -0
  26. package/{dist → lib}/components/BillingAddressForm.d.ts +8 -8
  27. package/lib/components/BillingAddressForm.js +1 -0
  28. package/{dist → lib}/components/BraintreePayment.d.ts +30 -19
  29. package/lib/components/BraintreePayment.js +1 -0
  30. package/{dist → lib}/components/CheckoutLink.d.ts +11 -11
  31. package/lib/components/CheckoutLink.js +1 -0
  32. package/{dist → lib}/components/CommerceLayer.d.ts +8 -9
  33. package/lib/components/CommerceLayer.js +1 -0
  34. package/{dist → lib}/components/CustomerContainer.d.ts +7 -7
  35. package/lib/components/CustomerContainer.js +1 -0
  36. package/{dist → lib}/components/CustomerInput.d.ts +11 -11
  37. package/lib/components/CustomerInput.js +1 -0
  38. package/{dist → lib}/components/DeliveryLeadTime.d.ts +10 -10
  39. package/lib/components/DeliveryLeadTime.js +1 -0
  40. package/{dist → lib}/components/DiscountAmount.d.ts +4 -4
  41. package/lib/components/DiscountAmount.js +1 -0
  42. package/{dist → lib}/components/Errors.d.ts +5 -5
  43. package/lib/components/Errors.js +1 -0
  44. package/{dist → lib}/components/ExternalFunction.d.ts +7 -7
  45. package/lib/components/ExternalFunction.js +1 -0
  46. package/{dist → lib}/components/GiftCard.d.ts +8 -8
  47. package/lib/components/GiftCard.js +1 -0
  48. package/{dist → lib}/components/GiftCardAmount.d.ts +4 -4
  49. package/lib/components/GiftCardAmount.js +1 -0
  50. package/{dist → lib}/components/GiftCardContainer.d.ts +6 -6
  51. package/lib/components/GiftCardContainer.js +1 -0
  52. package/{dist → lib}/components/GiftCardCurrencySelector.d.ts +7 -7
  53. package/lib/components/GiftCardCurrencySelector.js +1 -0
  54. package/{dist → lib}/components/GiftCardInput.d.ts +7 -7
  55. package/lib/components/GiftCardInput.js +1 -0
  56. package/{dist → lib}/components/GiftCardOrCouponCode.d.ts +13 -13
  57. package/lib/components/GiftCardOrCouponCode.js +1 -0
  58. package/{dist → lib}/components/GiftCardOrCouponForm.d.ts +10 -10
  59. package/lib/components/GiftCardOrCouponForm.js +1 -0
  60. package/{dist → lib}/components/GiftCardOrCouponInput.d.ts +8 -8
  61. package/lib/components/GiftCardOrCouponInput.js +1 -0
  62. package/{dist → lib}/components/GiftCardOrCouponRemoveButton.d.ts +16 -16
  63. package/lib/components/GiftCardOrCouponRemoveButton.js +1 -0
  64. package/{dist → lib}/components/GiftCardOrCouponSubmit.d.ts +9 -9
  65. package/lib/components/GiftCardOrCouponSubmit.js +1 -0
  66. package/{dist → lib}/components/GiftCardRecipient.d.ts +0 -0
  67. package/lib/components/GiftCardRecipient.js +1 -0
  68. package/{dist → lib}/components/GiftCardRecipientInput.d.ts +0 -0
  69. package/lib/components/GiftCardRecipientInput.js +1 -0
  70. package/{dist → lib}/components/ItemContainer.d.ts +11 -11
  71. package/lib/components/ItemContainer.js +1 -0
  72. package/{dist → lib}/components/LineItem.d.ts +8 -8
  73. package/lib/components/LineItem.js +1 -0
  74. package/{dist → lib}/components/LineItemAmount.d.ts +7 -7
  75. package/lib/components/LineItemAmount.js +1 -0
  76. package/lib/components/LineItemCode.d.ts +12 -0
  77. package/lib/components/LineItemCode.js +1 -0
  78. package/lib/components/LineItemImage.d.ts +16 -0
  79. package/lib/components/LineItemImage.js +1 -0
  80. package/lib/components/LineItemName.d.ts +11 -0
  81. package/lib/components/LineItemName.js +1 -0
  82. package/{dist → lib}/components/LineItemOption.d.ts +19 -19
  83. package/lib/components/LineItemOption.js +1 -0
  84. package/{dist → lib}/components/LineItemOptions.d.ts +14 -14
  85. package/lib/components/LineItemOptions.js +1 -0
  86. package/{dist → lib}/components/LineItemQuantity.d.ts +14 -14
  87. package/lib/components/LineItemQuantity.js +1 -0
  88. package/{dist → lib}/components/LineItemRemoveLink.d.ts +12 -12
  89. package/lib/components/LineItemRemoveLink.js +1 -0
  90. package/{dist → lib}/components/LineItemsContainer.d.ts +8 -8
  91. package/lib/components/LineItemsContainer.js +1 -0
  92. package/{dist → lib}/components/LineItemsCount.d.ts +12 -10
  93. package/lib/components/LineItemsCount.js +1 -0
  94. package/lib/components/LineItemsEmpty.d.ts +12 -0
  95. package/lib/components/LineItemsEmpty.js +1 -0
  96. package/{dist → lib}/components/MetadataInput.d.ts +5 -5
  97. package/lib/components/MetadataInput.js +1 -0
  98. package/{dist → lib}/components/OrderContainer.d.ts +11 -10
  99. package/lib/components/OrderContainer.js +1 -0
  100. package/{dist → lib}/components/OrderNumber.d.ts +5 -5
  101. package/lib/components/OrderNumber.js +1 -0
  102. package/{dist → lib}/components/OrderStorage.d.ts +8 -8
  103. package/lib/components/OrderStorage.js +1 -0
  104. package/lib/components/PaymentGateway.d.ts +16 -0
  105. package/lib/components/PaymentGateway.js +1 -0
  106. package/{dist → lib}/components/PaymentMethod.d.ts +16 -16
  107. package/lib/components/PaymentMethod.js +1 -0
  108. package/{dist → lib}/components/PaymentMethodAmount.d.ts +4 -4
  109. package/lib/components/PaymentMethodAmount.js +1 -0
  110. package/{dist → lib}/components/PaymentMethodName.d.ts +9 -9
  111. package/lib/components/PaymentMethodName.js +1 -0
  112. package/{dist → lib}/components/PaymentMethodPrice.d.ts +9 -9
  113. package/lib/components/PaymentMethodPrice.js +1 -0
  114. package/{dist → lib}/components/PaymentMethodRadioButton.d.ts +11 -11
  115. package/lib/components/PaymentMethodRadioButton.js +1 -0
  116. package/{dist → lib}/components/PaymentMethodsContainer.d.ts +8 -8
  117. package/lib/components/PaymentMethodsContainer.js +1 -0
  118. package/{dist → lib}/components/PaymentSource.d.ts +19 -18
  119. package/lib/components/PaymentSource.js +1 -0
  120. package/{dist → lib}/components/PaymentSourceBrandIcon.d.ts +15 -15
  121. package/lib/components/PaymentSourceBrandIcon.js +1 -0
  122. package/{dist → lib}/components/PaymentSourceBrandName.d.ts +12 -12
  123. package/lib/components/PaymentSourceBrandName.js +1 -0
  124. package/{dist → lib}/components/PaymentSourceDetail.d.ts +12 -12
  125. package/lib/components/PaymentSourceDetail.js +1 -0
  126. package/{dist → lib}/components/PaymentSourceEditButton.d.ts +9 -9
  127. package/lib/components/PaymentSourceEditButton.js +1 -0
  128. package/{dist → lib}/components/PaypalPayment.d.ts +12 -12
  129. package/lib/components/PaypalPayment.js +1 -0
  130. package/{dist → lib}/components/PlaceOrderButton.d.ts +12 -12
  131. package/lib/components/PlaceOrderButton.js +1 -0
  132. package/{dist → lib}/components/PlaceOrderContainer.d.ts +8 -8
  133. package/lib/components/PlaceOrderContainer.js +1 -0
  134. package/{dist → lib}/components/Price.d.ts +16 -14
  135. package/lib/components/Price.js +1 -0
  136. package/{dist → lib}/components/PricesContainer.d.ts +11 -11
  137. package/lib/components/PricesContainer.js +1 -0
  138. package/{dist → lib}/components/PrivacyAndTermsCheckbox.d.ts +4 -4
  139. package/lib/components/PrivacyAndTermsCheckbox.js +1 -0
  140. package/{dist → lib}/components/QuantitySelector.d.ts +17 -17
  141. package/lib/components/QuantitySelector.js +1 -0
  142. package/{dist → lib}/components/SaveAddressesButton.d.ts +10 -10
  143. package/lib/components/SaveAddressesButton.js +1 -0
  144. package/{dist → lib}/components/SaveCustomerButton.d.ts +13 -13
  145. package/lib/components/SaveCustomerButton.js +1 -0
  146. package/{dist → lib}/components/Shipment.d.ts +8 -8
  147. package/lib/components/Shipment.js +1 -0
  148. package/{dist → lib}/components/ShipmentField.d.ts +12 -12
  149. package/lib/components/ShipmentField.js +1 -0
  150. package/{dist → lib}/components/ShipmentsContainer.d.ts +6 -6
  151. package/lib/components/ShipmentsContainer.js +1 -0
  152. package/{dist → lib}/components/ShippingAddressContainer.d.ts +6 -6
  153. package/lib/components/ShippingAddressContainer.js +1 -0
  154. package/{dist → lib}/components/ShippingAddressForm.d.ts +8 -8
  155. package/lib/components/ShippingAddressForm.js +1 -0
  156. package/{dist → lib}/components/ShippingAmount.d.ts +4 -4
  157. package/lib/components/ShippingAmount.js +1 -0
  158. package/{dist → lib}/components/ShippingMethod.d.ts +8 -8
  159. package/lib/components/ShippingMethod.js +1 -0
  160. package/{dist → lib}/components/ShippingMethodName.d.ts +11 -7
  161. package/lib/components/ShippingMethodName.js +1 -0
  162. package/{dist → lib}/components/ShippingMethodPrice.d.ts +13 -13
  163. package/lib/components/ShippingMethodPrice.js +1 -0
  164. package/lib/components/ShippingMethodRadioButton.d.ts +13 -0
  165. package/lib/components/ShippingMethodRadioButton.js +1 -0
  166. package/{dist → lib}/components/SkuList.d.ts +7 -7
  167. package/lib/components/SkuList.js +1 -0
  168. package/{dist → lib}/components/SkuListsContainer.d.ts +6 -6
  169. package/lib/components/SkuListsContainer.js +1 -0
  170. package/{dist → lib}/components/SkuOption.d.ts +7 -7
  171. package/lib/components/SkuOption.js +1 -0
  172. package/{dist → lib}/components/SkuOptionInput.d.ts +5 -5
  173. package/lib/components/SkuOptionInput.js +1 -0
  174. package/{dist → lib}/components/SkuOptionsContainer.d.ts +7 -7
  175. package/lib/components/SkuOptionsContainer.js +1 -0
  176. package/{dist → lib}/components/StockTransfer.d.ts +6 -6
  177. package/lib/components/StockTransfer.js +1 -0
  178. package/{dist → lib}/components/StockTransferField.d.ts +9 -9
  179. package/lib/components/StockTransferField.js +1 -0
  180. package/{dist → lib}/components/StripePayment.d.ts +18 -18
  181. package/lib/components/StripePayment.js +1 -0
  182. package/{dist → lib}/components/SubTotalAmount.d.ts +4 -4
  183. package/lib/components/SubTotalAmount.js +1 -0
  184. package/{dist → lib}/components/SubmitButton.d.ts +9 -9
  185. package/lib/components/SubmitButton.js +1 -0
  186. package/{dist → lib}/components/TaxesAmount.d.ts +4 -4
  187. package/lib/components/TaxesAmount.js +1 -0
  188. package/{dist → lib}/components/TotalAmount.d.ts +4 -4
  189. package/lib/components/TotalAmount.js +1 -0
  190. package/{dist → lib}/components/VariantSelector.d.ts +29 -27
  191. package/lib/components/VariantSelector.js +1 -0
  192. package/{dist → lib}/components/VariantsContainer.d.ts +8 -8
  193. package/lib/components/VariantsContainer.js +1 -0
  194. package/{dist → lib}/components/WireTransferPayment.d.ts +10 -10
  195. package/lib/components/WireTransferPayment.js +1 -0
  196. package/lib/components/gateways/AdyenGateway.d.ts +5 -0
  197. package/lib/components/gateways/AdyenGateway.js +1 -0
  198. package/lib/components/gateways/BraintreeGateway.d.ts +5 -0
  199. package/lib/components/gateways/BraintreeGateway.js +1 -0
  200. package/lib/components/gateways/PaypalGateway.d.ts +5 -0
  201. package/lib/components/gateways/PaypalGateway.js +1 -0
  202. package/lib/components/gateways/StripeGateway.d.ts +5 -0
  203. package/lib/components/gateways/StripeGateway.js +1 -0
  204. package/lib/components/gateways/WireTransferGateway.d.ts +5 -0
  205. package/lib/components/gateways/WireTransferGateway.js +1 -0
  206. package/lib/components/utils/AddressCardsTemplate.d.ts +27 -0
  207. package/lib/components/utils/AddressCardsTemplate.js +1 -0
  208. package/{dist → lib}/components/utils/BaseField.d.ts +8 -8
  209. package/lib/components/utils/BaseField.js +1 -0
  210. package/lib/components/utils/BaseInput.d.ts +5 -0
  211. package/lib/components/utils/BaseInput.js +1 -0
  212. package/{dist → lib}/components/utils/BaseOrderPrice.d.ts +6 -6
  213. package/lib/components/utils/BaseOrderPrice.js +1 -0
  214. package/{dist → lib}/components/utils/BaseSelect.d.ts +5 -5
  215. package/lib/components/utils/BaseSelect.js +1 -0
  216. package/{dist → lib}/components/utils/Parent.d.ts +8 -8
  217. package/lib/components/utils/Parent.js +1 -0
  218. package/lib/components/utils/PaymentCardsTemplate.d.ts +23 -0
  219. package/lib/components/utils/PaymentCardsTemplate.js +1 -0
  220. package/{dist → lib}/components/utils/PriceTemplate.d.ts +8 -8
  221. package/lib/components/utils/PriceTemplate.js +1 -0
  222. package/{dist → lib}/components/utils/VariantTemplate.d.ts +36 -34
  223. package/lib/components/utils/VariantTemplate.js +1 -0
  224. package/{dist → lib}/components/utils/getAllErrors.d.ts +17 -17
  225. package/lib/components/utils/getAllErrors.js +1 -0
  226. package/{dist → lib}/config/components.d.ts +892 -865
  227. package/lib/config/components.js +1 -0
  228. package/lib/config/currency.d.ts +5 -0
  229. package/lib/config/currency.js +1 -0
  230. package/{dist → lib}/context/AddressChildrenContext.d.ts +7 -7
  231. package/lib/context/AddressChildrenContext.js +1 -0
  232. package/{dist → lib}/context/AddressContext.d.ts +17 -16
  233. package/lib/context/AddressContext.js +1 -0
  234. package/{dist → lib}/context/AvailabilityContext.d.ts +3 -3
  235. package/lib/context/AvailabilityContext.js +1 -0
  236. package/{dist → lib}/context/BillingAddressContext.d.ts +12 -12
  237. package/lib/context/BillingAddressContext.js +1 -0
  238. package/{dist → lib}/context/BillingAddressFormContext.d.ts +18 -16
  239. package/lib/context/BillingAddressFormContext.js +1 -0
  240. package/{dist → lib}/context/CommerceLayerContext.d.ts +7 -8
  241. package/lib/context/CommerceLayerContext.js +1 -0
  242. package/{dist → lib}/context/CouponAndGiftCardFormContext.d.ts +7 -7
  243. package/lib/context/CouponAndGiftCardFormContext.js +1 -0
  244. package/{dist → lib}/context/CustomerContext.d.ts +16 -14
  245. package/lib/context/CustomerContext.js +1 -0
  246. package/{dist → lib}/context/ExternalFunctionContext.d.ts +12 -12
  247. package/lib/context/ExternalFunctionContext.js +1 -0
  248. package/{dist → lib}/context/GiftCardContext.d.ts +11 -11
  249. package/lib/context/GiftCardContext.js +1 -0
  250. package/{dist → lib}/context/ItemContext.d.ts +13 -13
  251. package/lib/context/ItemContext.js +1 -0
  252. package/lib/context/LineItemChildrenContext.d.ts +9 -0
  253. package/lib/context/LineItemChildrenContext.js +1 -0
  254. package/{dist → lib}/context/LineItemContext.d.ts +8 -8
  255. package/lib/context/LineItemContext.js +1 -0
  256. package/{dist → lib}/context/LineItemOptionChildrenContext.d.ts +8 -8
  257. package/lib/context/LineItemOptionChildrenContext.js +1 -0
  258. package/lib/context/OrderContext.d.ts +26 -0
  259. package/lib/context/OrderContext.js +1 -0
  260. package/{dist → lib}/context/OrderStorageContext.d.ts +11 -11
  261. package/lib/context/OrderStorageContext.js +1 -0
  262. package/{dist → lib}/context/PaymentMethodChildrenContext.d.ts +10 -10
  263. package/lib/context/PaymentMethodChildrenContext.js +1 -0
  264. package/{dist → lib}/context/PaymentMethodContext.d.ts +23 -20
  265. package/lib/context/PaymentMethodContext.js +1 -0
  266. package/{dist → lib}/context/PaymentSourceContext.d.ts +14 -14
  267. package/lib/context/PaymentSourceContext.js +1 -0
  268. package/{dist → lib}/context/PlaceOrderContext.d.ts +16 -16
  269. package/lib/context/PlaceOrderContext.js +1 -0
  270. package/{dist → lib}/context/PricesContext.d.ts +7 -7
  271. package/lib/context/PricesContext.js +1 -0
  272. package/lib/context/ShipmentChildrenContext.d.ts +13 -0
  273. package/lib/context/ShipmentChildrenContext.js +1 -0
  274. package/{dist → lib}/context/ShipmentContext.d.ts +12 -12
  275. package/lib/context/ShipmentContext.js +1 -0
  276. package/{dist → lib}/context/ShippingAddressContext.d.ts +10 -10
  277. package/lib/context/ShippingAddressContext.js +1 -0
  278. package/{dist → lib}/context/ShippingAddressFormContext.d.ts +4 -4
  279. package/lib/context/ShippingAddressFormContext.js +1 -0
  280. package/lib/context/ShippingMethodChildrenContext.d.ts +10 -0
  281. package/lib/context/ShippingMethodChildrenContext.js +1 -0
  282. package/lib/context/SkuListsContext.d.ts +6 -0
  283. package/lib/context/SkuListsContext.js +1 -0
  284. package/{dist → lib}/context/SkuOptionChildrenContext.d.ts +8 -8
  285. package/lib/context/SkuOptionChildrenContext.js +1 -0
  286. package/{dist → lib}/context/SkuOptionsContext.d.ts +3 -3
  287. package/lib/context/SkuOptionsContext.js +1 -0
  288. package/{dist → lib}/context/StockTransferChildrenContext.d.ts +7 -7
  289. package/lib/context/StockTransferChildrenContext.js +1 -0
  290. package/{dist → lib}/context/VariantsContext.d.ts +3 -3
  291. package/lib/context/VariantsContext.js +1 -0
  292. package/lib/index.d.ts +96 -0
  293. package/lib/index.js +1 -0
  294. package/{dist → lib}/reducers/AddressReducer.d.ts +58 -52
  295. package/lib/reducers/AddressReducer.js +1 -0
  296. package/lib/reducers/AvailabilityReducer.d.ts +53 -0
  297. package/lib/reducers/AvailabilityReducer.js +1 -0
  298. package/{dist → lib}/reducers/BillingAddressReducer.d.ts +31 -32
  299. package/lib/reducers/BillingAddressReducer.js +1 -0
  300. package/{dist → lib}/reducers/CustomerReducer.d.ts +50 -60
  301. package/lib/reducers/CustomerReducer.js +1 -0
  302. package/{dist → lib}/reducers/GiftCardReducer.d.ts +76 -75
  303. package/lib/reducers/GiftCardReducer.js +1 -0
  304. package/{dist → lib}/reducers/ItemReducer.d.ts +69 -68
  305. package/lib/reducers/ItemReducer.js +1 -0
  306. package/{dist → lib}/reducers/LineItemReducer.d.ts +52 -52
  307. package/lib/reducers/LineItemReducer.js +1 -0
  308. package/lib/reducers/OrderReducer.d.ts +131 -0
  309. package/lib/reducers/OrderReducer.js +1 -0
  310. package/{dist → lib}/reducers/PaymentMethodReducer.d.ts +105 -95
  311. package/lib/reducers/PaymentMethodReducer.js +1 -0
  312. package/{dist → lib}/reducers/PlaceOrderReducer.d.ts +52 -50
  313. package/lib/reducers/PlaceOrderReducer.js +1 -0
  314. package/{dist → lib}/reducers/PriceReducer.d.ts +44 -45
  315. package/lib/reducers/PriceReducer.js +1 -0
  316. package/{dist → lib}/reducers/ShipmentReducer.d.ts +40 -37
  317. package/lib/reducers/ShipmentReducer.js +1 -0
  318. package/{dist → lib}/reducers/ShippingAddressReducer.d.ts +32 -31
  319. package/lib/reducers/ShippingAddressReducer.js +1 -0
  320. package/{dist → lib}/reducers/SkuListsReducer.d.ts +21 -22
  321. package/lib/reducers/SkuListsReducer.js +1 -0
  322. package/{dist → lib}/reducers/SkuOptionsReducer.d.ts +26 -26
  323. package/lib/reducers/SkuOptionsReducer.js +1 -0
  324. package/{dist → lib}/reducers/VariantReducer.d.ts +71 -71
  325. package/lib/reducers/VariantReducer.js +1 -0
  326. package/{dist → lib}/typings/errors.d.ts +42 -40
  327. package/lib/typings/errors.js +1 -0
  328. package/{dist → lib}/typings/index.d.ts +126 -150
  329. package/lib/typings/index.js +1 -0
  330. package/{dist → lib}/utils/PropsType.d.ts +33 -33
  331. package/lib/utils/PropsType.js +1 -0
  332. package/{dist → lib}/utils/addressesManager.d.ts +28 -27
  333. package/lib/utils/addressesManager.js +1 -0
  334. package/{dist → lib}/utils/baseReducer.d.ts +3 -3
  335. package/lib/utils/baseReducer.js +1 -0
  336. package/lib/utils/browserInfo.d.ts +9 -0
  337. package/lib/utils/browserInfo.js +1 -0
  338. package/{dist → lib}/utils/childrenTypes.d.ts +9 -9
  339. package/lib/utils/childrenTypes.js +1 -0
  340. package/lib/utils/countryStateCity.d.ts +9 -0
  341. package/lib/utils/countryStateCity.js +1 -0
  342. package/{dist → lib}/utils/customMessages.d.ts +8 -8
  343. package/lib/utils/customMessages.js +1 -0
  344. package/lib/utils/customerOrderOptions.d.ts +3 -0
  345. package/lib/utils/customerOrderOptions.js +1 -0
  346. package/{dist → lib}/utils/getAmount.d.ts +9 -9
  347. package/lib/utils/getAmount.js +1 -0
  348. package/{dist → lib}/utils/getCurrentItemKey.d.ts +6 -6
  349. package/lib/utils/getCurrentItemKey.js +1 -0
  350. package/lib/utils/getErrors.d.ts +11 -0
  351. package/lib/utils/getErrors.js +1 -0
  352. package/lib/utils/getLineItemsCount.d.ts +12 -0
  353. package/lib/utils/getLineItemsCount.js +1 -0
  354. package/{dist → lib}/utils/getLoaderComponent.d.ts +3 -3
  355. package/lib/utils/getLoaderComponent.js +1 -0
  356. package/lib/utils/getPrices.d.ts +17 -0
  357. package/lib/utils/getPrices.js +1 -0
  358. package/lib/utils/getSdk.d.ts +3 -0
  359. package/lib/utils/getSdk.js +1 -0
  360. package/lib/utils/getSkus.d.ts +3 -0
  361. package/lib/utils/getSkus.js +1 -0
  362. package/lib/utils/isEmptyStates.d.ts +1 -0
  363. package/lib/utils/isEmptyStates.js +1 -0
  364. package/{dist → lib}/utils/isJSON.d.ts +1 -1
  365. package/lib/utils/isJSON.js +1 -0
  366. package/lib/utils/jwt.d.ts +27 -0
  367. package/lib/utils/jwt.js +1 -0
  368. package/lib/utils/localStorage.d.ts +17 -0
  369. package/lib/utils/localStorage.js +1 -0
  370. package/lib/utils/organization.d.ts +6 -0
  371. package/lib/utils/organization.js +1 -0
  372. package/lib/utils/paypalPayment.d.ts +3 -0
  373. package/lib/utils/paypalPayment.js +1 -0
  374. package/lib/utils/promisify.d.ts +1 -0
  375. package/lib/utils/promisify.js +1 -0
  376. package/lib/utils/shipments.d.ts +2 -0
  377. package/lib/utils/shipments.js +1 -0
  378. package/{dist → lib}/utils/validateFormFields.d.ts +20 -19
  379. package/lib/utils/validateFormFields.js +1 -0
  380. package/package.json +95 -81
  381. package/dist/components/CustomerField.d.ts +0 -10
  382. package/dist/components/LineItemImage.d.ts +0 -10
  383. package/dist/components/LineItemName.d.ts +0 -7
  384. package/dist/components/LineItemSkuCode.d.ts +0 -7
  385. package/dist/components/OrderList.d.ts +0 -26
  386. package/dist/components/OrderListRow.d.ts +0 -14
  387. package/dist/components/PaymentGateway.d.ts +0 -11
  388. package/dist/components/ShippingMethodRadioButton.d.ts +0 -9
  389. package/dist/components/utils/BaseInput.d.ts +0 -5
  390. package/dist/context/LineItemChildrenContext.d.ts +0 -7
  391. package/dist/context/OrderContext.d.ts +0 -4
  392. package/dist/context/OrderListChildrenContext.d.ts +0 -14
  393. package/dist/context/ShipmentChildrenContext.d.ts +0 -13
  394. package/dist/context/ShippingMethodChildrenContext.d.ts +0 -9
  395. package/dist/context/SkuListsContext.d.ts +0 -3
  396. package/dist/index.d.ts +0 -89
  397. package/dist/index.js +0 -8
  398. package/dist/react-components.cjs.development.js +0 -12691
  399. package/dist/react-components.cjs.development.js.map +0 -1
  400. package/dist/react-components.cjs.production.min.js +0 -2
  401. package/dist/react-components.cjs.production.min.js.map +0 -1
  402. package/dist/react-components.esm.js +0 -12595
  403. package/dist/react-components.esm.js.map +0 -1
  404. package/dist/reducers/AvailabilityReducer.d.ts +0 -40
  405. package/dist/reducers/OrderReducer.d.ts +0 -131
  406. package/dist/typings/order.d.ts +0 -120
  407. package/dist/utils/dynamicNaming.d.ts +0 -5
  408. package/dist/utils/getErrorsByCollection.d.ts +0 -11
  409. package/dist/utils/getLineItemsCount.d.ts +0 -6
  410. package/dist/utils/getPrices.d.ts +0 -18
  411. package/dist/utils/getSkus.d.ts +0 -3
  412. package/dist/utils/icons.d.ts +0 -3
  413. package/dist/utils/isDate.d.ts +0 -1
  414. package/dist/utils/localStorage.d.ts +0 -12
  415. package/dist/utils/paypalPayment.d.ts +0 -3
  416. package/dist/utils/scrollbarWidth.d.ts +0 -1
  417. package/dist/utils/shipments.d.ts +0 -5
@@ -1,40 +0,0 @@
1
- import { BaseError } from "../typings/errors";
2
- import { CommerceLayerConfig } from "../context/CommerceLayerContext";
3
- import { Dispatch } from 'react';
4
- export interface LeadTimes {
5
- hours: number;
6
- days: number;
7
- }
8
- export interface ShippingMethod {
9
- name: string;
10
- reference: null | string;
11
- priceAmountCents: number;
12
- freeOverAmountCents: null | number;
13
- formattedPriceAmount: string;
14
- formattedFreeOverAmount: null | string;
15
- }
16
- export interface AvailabilityPayload {
17
- quantity?: number | null;
18
- shippingMethod?: ShippingMethod;
19
- errors?: BaseError[];
20
- }
21
- export interface AvailabilityState extends AvailabilityPayload {
22
- min: LeadTimes;
23
- max: LeadTimes;
24
- }
25
- export interface AvailabilityAction {
26
- type: AvailabilityActionType;
27
- payload: AvailabilityPayload;
28
- }
29
- export declare const availabilityInitialState: AvailabilityState;
30
- interface GetAvailability {
31
- (args: {
32
- skuCode: string;
33
- dispatch: Dispatch<AvailabilityAction>;
34
- config: CommerceLayerConfig;
35
- }): void;
36
- }
37
- export declare const getAvailability: GetAvailability;
38
- export declare type AvailabilityActionType = 'setAvailability' | 'setErrors';
39
- declare const availabilityReducer: (state: AvailabilityState, reducer: AvailabilityAction) => AvailabilityState;
40
- export default availabilityReducer;
@@ -1,131 +0,0 @@
1
- import { OrderCollection } from '@commercelayer/js-sdk';
2
- import { Dispatch } from 'react';
3
- import { SetLocalOrder, DeleteLocalOrder } from "../utils/localStorage";
4
- import { CommerceLayerConfig } from "../context/CommerceLayerContext";
5
- import { ItemOption, CustomLineItem } from './ItemReducer';
6
- import { BaseMetadataObject } from "../typings/index";
7
- import { BaseError } from "../typings/errors";
8
- export interface GetOrderParams {
9
- clearWhenPlaced?: boolean;
10
- config: CommerceLayerConfig;
11
- deleteLocalOrder?: DeleteLocalOrder;
12
- dispatch: Dispatch<OrderActions>;
13
- id: string;
14
- persistKey?: string;
15
- }
16
- export interface GetOrder {
17
- (params: GetOrderParams): Promise<void | OrderCollection>;
18
- }
19
- export interface SetOrderErrors {
20
- (params: {
21
- dispatch: Dispatch<OrderActions>;
22
- collection: any;
23
- }): {
24
- success: boolean;
25
- };
26
- }
27
- declare type CreateOrderParams = Pick<AddToCartParams, 'config' | 'dispatch' | 'persistKey' | 'state' | 'orderMetadata' | 'orderAttributes' | 'setLocalOrder'>;
28
- export interface CreateOrder {
29
- (params: CreateOrderParams): Promise<string>;
30
- }
31
- export interface AddToCartParams {
32
- skuCode: string;
33
- persistKey: string;
34
- config: CommerceLayerConfig;
35
- dispatch: Dispatch<OrderActions>;
36
- state: Partial<OrderState>;
37
- skuId?: string;
38
- quantity?: number;
39
- option?: ItemOption;
40
- lineItem?: CustomLineItem;
41
- orderMetadata?: BaseMetadataObject;
42
- orderAttributes?: Record<string, any>;
43
- errors?: BaseError[];
44
- setLocalOrder?: SetLocalOrder;
45
- }
46
- export interface AddToCartImportParams extends Omit<AddToCartParams, 'skuCode' | 'skuId' | 'quantity' | 'option' | 'lineItem'> {
47
- lineItems: CustomLineItem[];
48
- }
49
- export declare type AddToCartReturn = Promise<{
50
- success: boolean;
51
- }>;
52
- export interface AddToCart {
53
- (params: AddToCartParams): AddToCartReturn;
54
- }
55
- export interface AddToCartImport {
56
- (params: AddToCartImportParams): AddToCartReturn;
57
- }
58
- export interface UnsetOrderState {
59
- (dispatch: Dispatch<OrderActions>): void;
60
- }
61
- export interface OrderPayload {
62
- loading?: boolean;
63
- orderId?: string;
64
- order?: OrderCollection;
65
- errors?: BaseError[];
66
- }
67
- export declare type AddToCartValues = {
68
- skuCode: string;
69
- skuId?: string;
70
- quantity?: number;
71
- option?: ItemOption;
72
- lineItem?: CustomLineItem;
73
- };
74
- export declare type AddToCartImportValues = Pick<AddToCartImportParams, 'lineItems'>;
75
- export declare type getOrderContext = (id: string) => Promise<undefined | OrderCollection>;
76
- export interface OrderState extends OrderPayload {
77
- loading: boolean;
78
- orderId: string;
79
- order?: OrderCollection;
80
- saveBillingAddressToCustomerAddressBook: boolean;
81
- saveShippingAddressToCustomerAddressBook: boolean;
82
- getOrder?: getOrderContext;
83
- createOrder?: () => Promise<string>;
84
- addToCart: (values: AddToCartValues) => AddToCartReturn;
85
- setOrderErrors: (collection: any) => {
86
- success: boolean;
87
- };
88
- setGiftCardOrCouponCode: SetGiftCardOrCouponCode;
89
- removeGiftCardOrCouponCode: RemoveGiftCardOrCouponCode;
90
- saveAddressToCustomerAddressBook: (type: 'BillingAddress' | 'ShippingAddress', value: boolean) => void;
91
- }
92
- export interface OrderActions {
93
- type: OrderActionType;
94
- payload: OrderPayload;
95
- }
96
- export declare type OrderActionType = 'setLoading' | 'setOrderId' | 'setOrder' | 'setSingleQuantity' | 'setCurrentSkuCodes' | 'setCurrentSkuPrices' | 'setCurrentItem' | 'setErrors' | 'setSaveAddressToCustomerAddressBook' | 'setGiftCardOrCouponCode';
97
- export declare const createOrder: CreateOrder;
98
- export declare const getApiOrder: GetOrder;
99
- export declare const setOrder: (order: OrderCollection, dispatch: Dispatch<OrderActions>) => void;
100
- export declare const addToCart: AddToCart;
101
- export declare const unsetOrderState: UnsetOrderState;
102
- export declare const setOrderErrors: SetOrderErrors;
103
- declare type SaveAddressToCustomerAddressBook = (params: {
104
- dispatch: Dispatch<OrderActions>;
105
- type: 'BillingAddress' | 'ShippingAddress';
106
- value: boolean;
107
- }) => void;
108
- export declare const saveAddressToCustomerAddressBook: SaveAddressToCustomerAddressBook;
109
- declare type SetGiftCardOrCouponCode = (args: {
110
- code: string;
111
- dispatch?: Dispatch<OrderActions>;
112
- config?: CommerceLayerConfig;
113
- order?: OrderCollection;
114
- }) => Promise<{
115
- success: boolean;
116
- }>;
117
- export declare const setGiftCardOrCouponCode: SetGiftCardOrCouponCode;
118
- export declare type CodeType = 'coupon' | 'giftCard';
119
- export declare type OrderCodeType = `${CodeType}Code`;
120
- declare type RemoveGiftCardOrCouponCode = (args: {
121
- codeType: OrderCodeType;
122
- dispatch?: Dispatch<OrderActions>;
123
- config?: CommerceLayerConfig;
124
- order?: OrderCollection;
125
- }) => Promise<{
126
- success: boolean;
127
- }>;
128
- export declare const removeGiftCardOrCouponCode: RemoveGiftCardOrCouponCode;
129
- export declare const orderInitialState: Partial<OrderState>;
130
- declare const orderReducer: (state: Partial<OrderState>, reducer: OrderActions) => Partial<OrderState>;
131
- export default orderReducer;
@@ -1,120 +0,0 @@
1
- export default interface OrderAttributes {
2
- _approve: boolean;
3
- _billing_address_clone_id: string;
4
- _billing_address_same_as_shipping: boolean;
5
- _cancel: boolean;
6
- _capture: boolean;
7
- _customer_payment_source_id: string;
8
- _place: boolean;
9
- _refresh: boolean;
10
- _refund: boolean;
11
- _saveBilling_address_to_customer_address_book: boolean;
12
- _save_payment_source_to_customer_wallet: boolean;
13
- _save_shipping_address_to_customer_address_book: boolean;
14
- _shipping_address_clone_id: string;
15
- _shipping_address_same_as_billing: boolean;
16
- _update_taxes: boolean;
17
- adjustment_amount_cents: number;
18
- adjustment_amount_float: number;
19
- adjustment_tax_amount_cents: number;
20
- adjustment_tax_amount_float: number;
21
- approved_at: string;
22
- archived_at: string;
23
- cancelled_at: string;
24
- cart_url: string;
25
- checkout_url: string;
26
- country_code: string;
27
- coupon_code: string;
28
- created_at: string;
29
- currency_code: string;
30
- customer_email: string;
31
- customer_password: string;
32
- discount_amount_cents: number;
33
- discount_amount_float: number;
34
- discount_tax_amount_cents: number;
35
- discount_tax_amount_float: number;
36
- discount_taxable_amount_cents: number;
37
- discount_taxable_amount_float: number;
38
- editable: boolean;
39
- fees_amount_cents: number;
40
- fees_amount_float: number;
41
- formatted_adjustment_amount: string;
42
- formatted_adjustment_tax_amount: number;
43
- formatted_discount_amount: string;
44
- formatted_discount_tax_amount: string;
45
- formatted_discount_taxable_amount: string;
46
- formatted_fees_amount: string;
47
- formatted_gift_card_amount: string;
48
- formatted_payment_method_amount: string;
49
- formatted_payment_method_tax_amount: string;
50
- formatted_payment_method_taxable_amount: string;
51
- formatted_shipping_amount: string;
52
- formatted_shipping_tax_amount: string;
53
- formatted_shipping_taxable_amount: string;
54
- formatted_subtotal_amount: string;
55
- formatted_subtotal_tax_amount: string;
56
- formatted_subtotal_taxable_amount: string;
57
- formatted_total_amount: string;
58
- formatted_total_amount_with_taxes: string;
59
- formatted_total_tax_amount: string;
60
- formatted_total_taxable_amount: string;
61
- freight_taxable: boolean;
62
- fulfillment_status: string;
63
- fulfillment_updated_at: string;
64
- gift_card_amount_cents: number;
65
- gift_card_amount_float: number;
66
- gift_card_code: string;
67
- gift_card_or_coupon_code: string;
68
- guest: boolean;
69
- id: string;
70
- language_code: string;
71
- line_item_options_count: number;
72
- metadata: object;
73
- number: number;
74
- payment_method_amount_cents: number;
75
- payment_method_amount_float: number;
76
- payment_method_tax_amount_cents: number;
77
- payment_method_tax_amount_float: number;
78
- payment_method_taxable_amount_cents: number;
79
- payment_method_taxable_amount_float: number;
80
- payment_source_details: object;
81
- payment_source_id: string;
82
- payment_source_type: string;
83
- payment_status: string;
84
- payment_updated_at: string;
85
- placeable: boolean;
86
- placed_at: string;
87
- privacy_url: string;
88
- reference: string;
89
- reference_origin: string;
90
- return_url: string;
91
- shipments_count: number;
92
- shipping_amount_cents: number;
93
- shipping_amount_float: number;
94
- shipping_country_code_lock: string;
95
- shipping_tax_amount_cents: number;
96
- shipping_tax_amount_float: number;
97
- shipping_taxable_amount_cents: number;
98
- shipping_taxable_amount_float: number;
99
- skus_count: string;
100
- status: string;
101
- subtotal_amount_cents: number;
102
- subtotal_amount_float: number;
103
- subtotal_tax_amount_cents: number;
104
- subtotal_tax_amount_float: number;
105
- subtotal_taxable_amount_cents: number;
106
- subtotal_taxable_amount_float: number;
107
- tax_included: boolean;
108
- tax_rate: number;
109
- terms_url: string;
110
- token: string;
111
- total_amount_cents: number;
112
- total_amount_float: number;
113
- total_amount_with_taxes_cents: number;
114
- total_amount_with_taxes_float: number;
115
- total_tax_amount_cents: number;
116
- total_tax_amount_float: number;
117
- total_taxable_amount_cents: number;
118
- total_taxable_amount_float: number;
119
- updated_at: string;
120
- }
@@ -1,5 +0,0 @@
1
- import { PaymentResource, SDKPaymentResource } from "../reducers/PaymentMethodReducer";
2
- import CLayer from '@commercelayer/js-sdk';
3
- declare type DynamicNaming = (resource: PaymentResource, _type?: 'payments') => typeof CLayer[SDKPaymentResource];
4
- declare const dynamicNaming: DynamicNaming;
5
- export default dynamicNaming;
@@ -1,11 +0,0 @@
1
- import { CodeErrorType, ResourceErrorType, BaseError } from "../typings/errors";
2
- import BaseClass from '@commercelayer/js-sdk/dist/utils/BaseClass';
3
- export declare type GetErrorsByCollection = <C extends BaseClass>(collection: C, resourceType: ResourceErrorType, options?: {
4
- field?: string;
5
- id?: string;
6
- }) => BaseError[];
7
- export interface TransformCode {
8
- (code: string): CodeErrorType;
9
- }
10
- declare const getErrorsByCollection: GetErrorsByCollection;
11
- export default getErrorsByCollection;
@@ -1,6 +0,0 @@
1
- import { LineItemCollection } from '@commercelayer/js-sdk';
2
- export interface GetLineItemsCountInterface {
3
- (lineItems: LineItemCollection[], quantity?: number): number;
4
- }
5
- declare const getLineItemsCount: GetLineItemsCountInterface;
6
- export default getLineItemsCount;
@@ -1,18 +0,0 @@
1
- import { PriceCollection } from '@commercelayer/js-sdk';
2
- import { Prices, SkuPrices } from "../reducers/PriceReducer";
3
- import { Items } from "../reducers/ItemReducer";
4
- import { ReactNode } from 'react';
5
- import { PTemplateProps } from "../components/utils/PriceTemplate";
6
- export interface GetPriceByCode {
7
- (skuPrices: SkuPrices, code: string): PriceCollection | undefined;
8
- }
9
- export declare const getPriceByCode: GetPriceByCode;
10
- export interface GetPricesComponent {
11
- (skuPrices: PriceCollection[], props: PTemplateProps): ReactNode;
12
- }
13
- export declare const getPricesComponent: GetPricesComponent;
14
- export interface GetPrices {
15
- (prices: PriceCollection[] | Items): Prices;
16
- }
17
- declare const getPrices: GetPrices;
18
- export default getPrices;
@@ -1,3 +0,0 @@
1
- import { SkuCollection } from '@commercelayer/js-sdk';
2
- declare const getSkus: (prices: SkuCollection[]) => Record<string, any>;
3
- export default getSkus;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const sortDescIcon: JSX.Element;
3
- export declare const sortAscIcon: JSX.Element;
@@ -1 +0,0 @@
1
- export default function isDate(value: string): boolean;
@@ -1,12 +0,0 @@
1
- export interface GetLocalOrder {
2
- (key: string): string | null;
3
- }
4
- export declare const getLocalOrder: GetLocalOrder;
5
- export interface SetLocalOrder {
6
- (key: string, value: string): void;
7
- }
8
- export declare const setLocalOrder: SetLocalOrder;
9
- export interface DeleteLocalOrder {
10
- (key: string): void;
11
- }
12
- export declare const deleteLocalOrder: DeleteLocalOrder;
@@ -1,3 +0,0 @@
1
- import { PaypalConfig } from "../components/PaypalPayment";
2
- import { PaymentResource, PaymentMethodConfig } from "../reducers/PaymentMethodReducer";
3
- export default function getPaypalConfig(paymentResource: PaymentResource, config: PaymentMethodConfig): Pick<PaypalConfig, 'returnUrl' | 'cancelUrl'> | undefined;
@@ -1 +0,0 @@
1
- export default function scrollbarWidth(): number;
@@ -1,5 +0,0 @@
1
- import { CommerceLayerConfig } from "../context/CommerceLayerContext";
2
- import { ShipmentCollection } from '@commercelayer/js-sdk';
3
- declare type ShipmentsFilled = (shipments: ShipmentCollection[], credentials: CommerceLayerConfig) => Promise<boolean>;
4
- export declare const shipmentsFilled: ShipmentsFilled;
5
- export {};