@commercelayer/react-components 2.46.7 → 2.47.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 (773) hide show
  1. package/{dist → lib/cjs}/components/AddToCartButton.d.ts +20 -17
  2. package/lib/cjs/components/AddToCartButton.js +1 -0
  3. package/{dist → lib/cjs}/components/Address.d.ts +13 -13
  4. package/lib/cjs/components/Address.js +1 -0
  5. package/{dist → lib/cjs}/components/AddressCountrySelector.d.ts +9 -9
  6. package/lib/cjs/components/AddressCountrySelector.js +1 -0
  7. package/{dist → lib/cjs}/components/AddressField.d.ts +15 -15
  8. package/lib/cjs/components/AddressField.js +1 -0
  9. package/{dist → lib/cjs}/components/AddressInput.d.ts +7 -7
  10. package/lib/cjs/components/AddressInput.js +1 -0
  11. package/{dist → lib/cjs}/components/AddressStateSelector.d.ts +11 -11
  12. package/lib/cjs/components/AddressStateSelector.js +1 -0
  13. package/{dist → lib/cjs}/components/AddressesContainer.d.ts +7 -7
  14. package/lib/cjs/components/AddressesContainer.js +1 -0
  15. package/{dist → lib/cjs}/components/AdyenPayment.d.ts +25 -25
  16. package/lib/cjs/components/AdyenPayment.js +1 -0
  17. package/{dist → lib/cjs}/components/AvailabilityContainer.d.ts +7 -7
  18. package/lib/cjs/components/AvailabilityContainer.js +1 -0
  19. package/{dist → lib/cjs}/components/AvailabilityTemplate.d.ts +11 -16
  20. package/lib/cjs/components/AvailabilityTemplate.js +1 -0
  21. package/{dist → lib/cjs}/components/BillingAddressContainer.d.ts +6 -6
  22. package/lib/cjs/components/BillingAddressContainer.js +1 -0
  23. package/{dist → lib/cjs}/components/BillingAddressForm.d.ts +8 -8
  24. package/lib/cjs/components/BillingAddressForm.js +1 -0
  25. package/{dist → lib/cjs}/components/BraintreePayment.d.ts +30 -30
  26. package/lib/cjs/components/BraintreePayment.js +1 -0
  27. package/{dist → lib/cjs}/components/CheckoutLink.d.ts +11 -11
  28. package/lib/cjs/components/CheckoutLink.js +1 -0
  29. package/{dist → lib/cjs}/components/CommerceLayer.d.ts +8 -9
  30. package/lib/cjs/components/CommerceLayer.js +1 -0
  31. package/{dist → lib/cjs}/components/CustomerContainer.d.ts +7 -7
  32. package/lib/cjs/components/CustomerContainer.js +1 -0
  33. package/{dist → lib/cjs}/components/CustomerInput.d.ts +11 -11
  34. package/lib/cjs/components/CustomerInput.js +1 -0
  35. package/{dist → lib/cjs}/components/DeliveryLeadTime.d.ts +10 -10
  36. package/lib/cjs/components/DeliveryLeadTime.js +1 -0
  37. package/{dist → lib/cjs}/components/DiscountAmount.d.ts +4 -4
  38. package/lib/cjs/components/DiscountAmount.js +1 -0
  39. package/{dist → lib/cjs}/components/Errors.d.ts +5 -5
  40. package/lib/cjs/components/Errors.js +1 -0
  41. package/{dist → lib/cjs}/components/ExternalFunction.d.ts +7 -7
  42. package/lib/cjs/components/ExternalFunction.js +1 -0
  43. package/{dist → lib/cjs}/components/GiftCard.d.ts +8 -8
  44. package/lib/cjs/components/GiftCard.js +1 -0
  45. package/{dist → lib/cjs}/components/GiftCardAmount.d.ts +4 -4
  46. package/lib/cjs/components/GiftCardAmount.js +1 -0
  47. package/{dist → lib/cjs}/components/GiftCardContainer.d.ts +6 -6
  48. package/lib/cjs/components/GiftCardContainer.js +1 -0
  49. package/{dist → lib/cjs}/components/GiftCardCurrencySelector.d.ts +7 -7
  50. package/lib/cjs/components/GiftCardCurrencySelector.js +1 -0
  51. package/{dist → lib/cjs}/components/GiftCardInput.d.ts +7 -7
  52. package/lib/cjs/components/GiftCardInput.js +1 -0
  53. package/{dist → lib/cjs}/components/GiftCardOrCouponCode.d.ts +13 -13
  54. package/lib/cjs/components/GiftCardOrCouponCode.js +1 -0
  55. package/{dist → lib/cjs}/components/GiftCardOrCouponForm.d.ts +10 -10
  56. package/lib/cjs/components/GiftCardOrCouponForm.js +1 -0
  57. package/{dist → lib/cjs}/components/GiftCardOrCouponInput.d.ts +8 -8
  58. package/lib/cjs/components/GiftCardOrCouponInput.js +1 -0
  59. package/{dist → lib/cjs}/components/GiftCardOrCouponRemoveButton.d.ts +16 -16
  60. package/lib/cjs/components/GiftCardOrCouponRemoveButton.js +1 -0
  61. package/{dist → lib/cjs}/components/GiftCardOrCouponSubmit.d.ts +9 -9
  62. package/lib/cjs/components/GiftCardOrCouponSubmit.js +1 -0
  63. package/{dist → lib/cjs}/components/GiftCardRecipient.d.ts +0 -0
  64. package/lib/cjs/components/GiftCardRecipient.js +1 -0
  65. package/{dist → lib/cjs}/components/GiftCardRecipientInput.d.ts +0 -0
  66. package/lib/cjs/components/GiftCardRecipientInput.js +1 -0
  67. package/{dist → lib/cjs}/components/ItemContainer.d.ts +11 -11
  68. package/lib/cjs/components/ItemContainer.js +1 -0
  69. package/{dist → lib/cjs}/components/LineItem.d.ts +8 -8
  70. package/lib/cjs/components/LineItem.js +1 -0
  71. package/{dist → lib/cjs}/components/LineItemAmount.d.ts +7 -7
  72. package/lib/cjs/components/LineItemAmount.js +1 -0
  73. package/{dist/components/LineItemSkuCode.d.ts → lib/cjs/components/LineItemCode.d.ts} +8 -7
  74. package/lib/cjs/components/LineItemCode.js +1 -0
  75. package/{dist → lib/cjs}/components/LineItemImage.d.ts +10 -10
  76. package/lib/cjs/components/LineItemImage.js +1 -0
  77. package/{dist → lib/cjs}/components/LineItemName.d.ts +9 -7
  78. package/lib/cjs/components/LineItemName.js +1 -0
  79. package/{dist → lib/cjs}/components/LineItemOption.d.ts +19 -19
  80. package/lib/cjs/components/LineItemOption.js +1 -0
  81. package/{dist → lib/cjs}/components/LineItemOptions.d.ts +14 -14
  82. package/lib/cjs/components/LineItemOptions.js +1 -0
  83. package/{dist → lib/cjs}/components/LineItemQuantity.d.ts +14 -14
  84. package/lib/cjs/components/LineItemQuantity.js +1 -0
  85. package/{dist → lib/cjs}/components/LineItemRemoveLink.d.ts +12 -12
  86. package/lib/cjs/components/LineItemRemoveLink.js +1 -0
  87. package/{dist → lib/cjs}/components/LineItemsContainer.d.ts +8 -8
  88. package/lib/cjs/components/LineItemsContainer.js +1 -0
  89. package/{dist → lib/cjs}/components/LineItemsCount.d.ts +10 -10
  90. package/lib/cjs/components/LineItemsCount.js +1 -0
  91. package/{dist → lib/cjs}/components/MetadataInput.d.ts +5 -5
  92. package/lib/cjs/components/MetadataInput.js +1 -0
  93. package/{dist → lib/cjs}/components/OrderContainer.d.ts +11 -10
  94. package/lib/cjs/components/OrderContainer.js +1 -0
  95. package/{dist → lib/cjs}/components/OrderNumber.d.ts +5 -5
  96. package/lib/cjs/components/OrderNumber.js +1 -0
  97. package/{dist → lib/cjs}/components/OrderStorage.d.ts +8 -8
  98. package/lib/cjs/components/OrderStorage.js +1 -0
  99. package/{dist → lib/cjs}/components/PaymentGateway.d.ts +16 -16
  100. package/lib/cjs/components/PaymentGateway.js +1 -0
  101. package/{dist → lib/cjs}/components/PaymentMethod.d.ts +16 -16
  102. package/lib/cjs/components/PaymentMethod.js +1 -0
  103. package/{dist → lib/cjs}/components/PaymentMethodAmount.d.ts +4 -4
  104. package/lib/cjs/components/PaymentMethodAmount.js +1 -0
  105. package/{dist → lib/cjs}/components/PaymentMethodName.d.ts +9 -9
  106. package/lib/cjs/components/PaymentMethodName.js +1 -0
  107. package/{dist → lib/cjs}/components/PaymentMethodPrice.d.ts +9 -9
  108. package/lib/cjs/components/PaymentMethodPrice.js +1 -0
  109. package/{dist → lib/cjs}/components/PaymentMethodRadioButton.d.ts +11 -11
  110. package/lib/cjs/components/PaymentMethodRadioButton.js +1 -0
  111. package/{dist → lib/cjs}/components/PaymentMethodsContainer.d.ts +8 -8
  112. package/lib/cjs/components/PaymentMethodsContainer.js +1 -0
  113. package/{dist → lib/cjs}/components/PaymentSource.d.ts +19 -19
  114. package/lib/cjs/components/PaymentSource.js +1 -0
  115. package/{dist → lib/cjs}/components/PaymentSourceBrandIcon.d.ts +15 -15
  116. package/lib/cjs/components/PaymentSourceBrandIcon.js +1 -0
  117. package/{dist → lib/cjs}/components/PaymentSourceBrandName.d.ts +12 -12
  118. package/lib/cjs/components/PaymentSourceBrandName.js +1 -0
  119. package/{dist → lib/cjs}/components/PaymentSourceDetail.d.ts +12 -12
  120. package/lib/cjs/components/PaymentSourceDetail.js +1 -0
  121. package/{dist → lib/cjs}/components/PaymentSourceEditButton.d.ts +9 -9
  122. package/lib/cjs/components/PaymentSourceEditButton.js +1 -0
  123. package/{dist → lib/cjs}/components/PaypalPayment.d.ts +12 -12
  124. package/lib/cjs/components/PaypalPayment.js +1 -0
  125. package/{dist → lib/cjs}/components/PlaceOrderButton.d.ts +12 -12
  126. package/lib/cjs/components/PlaceOrderButton.js +1 -0
  127. package/{dist → lib/cjs}/components/PlaceOrderContainer.d.ts +8 -8
  128. package/lib/cjs/components/PlaceOrderContainer.js +1 -0
  129. package/{dist → lib/cjs}/components/Price.d.ts +14 -14
  130. package/lib/cjs/components/Price.js +1 -0
  131. package/{dist → lib/cjs}/components/PricesContainer.d.ts +11 -11
  132. package/lib/cjs/components/PricesContainer.js +1 -0
  133. package/{dist → lib/cjs}/components/PrivacyAndTermsCheckbox.d.ts +4 -4
  134. package/lib/cjs/components/PrivacyAndTermsCheckbox.js +1 -0
  135. package/{dist → lib/cjs}/components/QuantitySelector.d.ts +17 -17
  136. package/lib/cjs/components/QuantitySelector.js +1 -0
  137. package/{dist → lib/cjs}/components/SaveAddressesButton.d.ts +10 -10
  138. package/lib/cjs/components/SaveAddressesButton.js +1 -0
  139. package/{dist → lib/cjs}/components/SaveCustomerButton.d.ts +13 -13
  140. package/lib/cjs/components/SaveCustomerButton.js +1 -0
  141. package/{dist → lib/cjs}/components/Shipment.d.ts +8 -8
  142. package/lib/cjs/components/Shipment.js +1 -0
  143. package/{dist → lib/cjs}/components/ShipmentField.d.ts +12 -12
  144. package/lib/cjs/components/ShipmentField.js +1 -0
  145. package/{dist → lib/cjs}/components/ShipmentsContainer.d.ts +6 -6
  146. package/lib/cjs/components/ShipmentsContainer.js +1 -0
  147. package/{dist → lib/cjs}/components/ShippingAddressContainer.d.ts +6 -6
  148. package/lib/cjs/components/ShippingAddressContainer.js +1 -0
  149. package/{dist → lib/cjs}/components/ShippingAddressForm.d.ts +8 -8
  150. package/lib/cjs/components/ShippingAddressForm.js +1 -0
  151. package/{dist → lib/cjs}/components/ShippingAmount.d.ts +4 -4
  152. package/lib/cjs/components/ShippingAmount.js +1 -0
  153. package/{dist → lib/cjs}/components/ShippingMethod.d.ts +8 -8
  154. package/lib/cjs/components/ShippingMethod.js +1 -0
  155. package/{dist → lib/cjs}/components/ShippingMethodName.d.ts +11 -11
  156. package/lib/cjs/components/ShippingMethodName.js +1 -0
  157. package/{dist → lib/cjs}/components/ShippingMethodPrice.d.ts +13 -13
  158. package/lib/cjs/components/ShippingMethodPrice.js +1 -0
  159. package/{dist → lib/cjs}/components/ShippingMethodRadioButton.d.ts +9 -9
  160. package/lib/cjs/components/ShippingMethodRadioButton.js +1 -0
  161. package/{dist → lib/cjs}/components/SkuList.d.ts +7 -7
  162. package/lib/cjs/components/SkuList.js +1 -0
  163. package/{dist → lib/cjs}/components/SkuListsContainer.d.ts +6 -6
  164. package/lib/cjs/components/SkuListsContainer.js +1 -0
  165. package/{dist → lib/cjs}/components/SkuOption.d.ts +7 -7
  166. package/lib/cjs/components/SkuOption.js +1 -0
  167. package/{dist → lib/cjs}/components/SkuOptionInput.d.ts +5 -5
  168. package/lib/cjs/components/SkuOptionInput.js +1 -0
  169. package/{dist → lib/cjs}/components/SkuOptionsContainer.d.ts +7 -7
  170. package/lib/cjs/components/SkuOptionsContainer.js +1 -0
  171. package/{dist → lib/cjs}/components/StockTransfer.d.ts +6 -6
  172. package/lib/cjs/components/StockTransfer.js +1 -0
  173. package/{dist → lib/cjs}/components/StockTransferField.d.ts +9 -9
  174. package/lib/cjs/components/StockTransferField.js +1 -0
  175. package/{dist → lib/cjs}/components/StripePayment.d.ts +18 -18
  176. package/lib/cjs/components/StripePayment.js +1 -0
  177. package/{dist → lib/cjs}/components/SubTotalAmount.d.ts +4 -4
  178. package/lib/cjs/components/SubTotalAmount.js +1 -0
  179. package/{dist → lib/cjs}/components/SubmitButton.d.ts +9 -9
  180. package/lib/cjs/components/SubmitButton.js +1 -0
  181. package/{dist → lib/cjs}/components/TaxesAmount.d.ts +4 -4
  182. package/lib/cjs/components/TaxesAmount.js +1 -0
  183. package/{dist → lib/cjs}/components/TotalAmount.d.ts +4 -4
  184. package/lib/cjs/components/TotalAmount.js +1 -0
  185. package/{dist → lib/cjs}/components/VariantSelector.d.ts +27 -27
  186. package/lib/cjs/components/VariantSelector.js +1 -0
  187. package/{dist → lib/cjs}/components/VariantsContainer.d.ts +8 -8
  188. package/lib/cjs/components/VariantsContainer.js +1 -0
  189. package/{dist → lib/cjs}/components/WireTransferPayment.d.ts +10 -10
  190. package/lib/cjs/components/WireTransferPayment.js +1 -0
  191. package/{dist → lib/cjs}/components/gateways/AdyenGateway.d.ts +5 -5
  192. package/lib/cjs/components/gateways/AdyenGateway.js +1 -0
  193. package/{dist → lib/cjs}/components/gateways/BraintreeGateway.d.ts +5 -5
  194. package/lib/cjs/components/gateways/BraintreeGateway.js +1 -0
  195. package/{dist → lib/cjs}/components/gateways/PaypalGateway.d.ts +5 -5
  196. package/lib/cjs/components/gateways/PaypalGateway.js +1 -0
  197. package/{dist → lib/cjs}/components/gateways/StripeGateway.d.ts +5 -5
  198. package/lib/cjs/components/gateways/StripeGateway.js +1 -0
  199. package/{dist → lib/cjs}/components/gateways/WireTransferGateway.d.ts +5 -5
  200. package/lib/cjs/components/gateways/WireTransferGateway.js +1 -0
  201. package/{dist → lib/cjs}/components/utils/AddressCardsTemplate.d.ts +27 -27
  202. package/lib/cjs/components/utils/AddressCardsTemplate.js +1 -0
  203. package/{dist → lib/cjs}/components/utils/BaseField.d.ts +8 -8
  204. package/lib/cjs/components/utils/BaseField.js +1 -0
  205. package/lib/cjs/components/utils/BaseInput.d.ts +5 -0
  206. package/lib/cjs/components/utils/BaseInput.js +1 -0
  207. package/{dist → lib/cjs}/components/utils/BaseOrderPrice.d.ts +6 -6
  208. package/lib/cjs/components/utils/BaseOrderPrice.js +1 -0
  209. package/{dist → lib/cjs}/components/utils/BaseSelect.d.ts +5 -5
  210. package/lib/cjs/components/utils/BaseSelect.js +1 -0
  211. package/{dist → lib/cjs}/components/utils/Parent.d.ts +8 -8
  212. package/lib/cjs/components/utils/Parent.js +1 -0
  213. package/{dist → lib/cjs}/components/utils/PaymentCardsTemplate.d.ts +23 -24
  214. package/lib/cjs/components/utils/PaymentCardsTemplate.js +1 -0
  215. package/{dist → lib/cjs}/components/utils/PriceTemplate.d.ts +8 -8
  216. package/lib/cjs/components/utils/PriceTemplate.js +1 -0
  217. package/{dist → lib/cjs}/components/utils/VariantTemplate.d.ts +34 -34
  218. package/lib/cjs/components/utils/VariantTemplate.js +1 -0
  219. package/{dist → lib/cjs}/components/utils/getAllErrors.d.ts +17 -17
  220. package/lib/cjs/components/utils/getAllErrors.js +1 -0
  221. package/{dist → lib/cjs}/config/components.d.ts +867 -867
  222. package/lib/cjs/config/components.js +1 -0
  223. package/lib/cjs/config/currency.json +1 -0
  224. package/{dist → lib/cjs}/context/AddressChildrenContext.d.ts +7 -7
  225. package/lib/cjs/context/AddressChildrenContext.js +1 -0
  226. package/{dist → lib/cjs}/context/AddressContext.d.ts +17 -17
  227. package/lib/cjs/context/AddressContext.js +1 -0
  228. package/{dist → lib/cjs}/context/AvailabilityContext.d.ts +3 -3
  229. package/lib/cjs/context/AvailabilityContext.js +1 -0
  230. package/{dist → lib/cjs}/context/BillingAddressContext.d.ts +12 -12
  231. package/lib/cjs/context/BillingAddressContext.js +1 -0
  232. package/{dist → lib/cjs}/context/BillingAddressFormContext.d.ts +18 -18
  233. package/lib/cjs/context/BillingAddressFormContext.js +1 -0
  234. package/{dist → lib/cjs}/context/CommerceLayerContext.d.ts +7 -8
  235. package/lib/cjs/context/CommerceLayerContext.js +1 -0
  236. package/{dist → lib/cjs}/context/CouponAndGiftCardFormContext.d.ts +7 -7
  237. package/lib/cjs/context/CouponAndGiftCardFormContext.js +1 -0
  238. package/{dist → lib/cjs}/context/CustomerContext.d.ts +16 -16
  239. package/lib/cjs/context/CustomerContext.js +1 -0
  240. package/{dist → lib/cjs}/context/ExternalFunctionContext.d.ts +12 -12
  241. package/lib/cjs/context/ExternalFunctionContext.js +1 -0
  242. package/{dist → lib/cjs}/context/GiftCardContext.d.ts +11 -11
  243. package/lib/cjs/context/GiftCardContext.js +1 -0
  244. package/{dist → lib/cjs}/context/ItemContext.d.ts +13 -13
  245. package/lib/cjs/context/ItemContext.js +1 -0
  246. package/lib/cjs/context/LineItemChildrenContext.d.ts +9 -0
  247. package/lib/cjs/context/LineItemChildrenContext.js +1 -0
  248. package/{dist → lib/cjs}/context/LineItemContext.d.ts +8 -8
  249. package/lib/cjs/context/LineItemContext.js +1 -0
  250. package/{dist → lib/cjs}/context/LineItemOptionChildrenContext.d.ts +8 -8
  251. package/lib/cjs/context/LineItemOptionChildrenContext.js +1 -0
  252. package/lib/cjs/context/OrderContext.d.ts +26 -0
  253. package/lib/cjs/context/OrderContext.js +1 -0
  254. package/{dist → lib/cjs}/context/OrderStorageContext.d.ts +11 -11
  255. package/lib/cjs/context/OrderStorageContext.js +1 -0
  256. package/{dist → lib/cjs}/context/PaymentMethodChildrenContext.d.ts +10 -10
  257. package/lib/cjs/context/PaymentMethodChildrenContext.js +1 -0
  258. package/{dist → lib/cjs}/context/PaymentMethodContext.d.ts +23 -23
  259. package/lib/cjs/context/PaymentMethodContext.js +1 -0
  260. package/{dist → lib/cjs}/context/PaymentSourceContext.d.ts +14 -14
  261. package/lib/cjs/context/PaymentSourceContext.js +1 -0
  262. package/{dist → lib/cjs}/context/PlaceOrderContext.d.ts +16 -16
  263. package/lib/cjs/context/PlaceOrderContext.js +1 -0
  264. package/{dist → lib/cjs}/context/PricesContext.d.ts +7 -7
  265. package/lib/cjs/context/PricesContext.js +1 -0
  266. package/lib/cjs/context/ShipmentChildrenContext.d.ts +13 -0
  267. package/lib/cjs/context/ShipmentChildrenContext.js +1 -0
  268. package/{dist → lib/cjs}/context/ShipmentContext.d.ts +12 -12
  269. package/lib/cjs/context/ShipmentContext.js +1 -0
  270. package/{dist → lib/cjs}/context/ShippingAddressContext.d.ts +10 -10
  271. package/lib/cjs/context/ShippingAddressContext.js +1 -0
  272. package/{dist → lib/cjs}/context/ShippingAddressFormContext.d.ts +4 -4
  273. package/lib/cjs/context/ShippingAddressFormContext.js +1 -0
  274. package/lib/cjs/context/ShippingMethodChildrenContext.d.ts +10 -0
  275. package/lib/cjs/context/ShippingMethodChildrenContext.js +1 -0
  276. package/lib/cjs/context/SkuListsContext.d.ts +6 -0
  277. package/lib/cjs/context/SkuListsContext.js +1 -0
  278. package/{dist → lib/cjs}/context/SkuOptionChildrenContext.d.ts +8 -8
  279. package/lib/cjs/context/SkuOptionChildrenContext.js +1 -0
  280. package/{dist → lib/cjs}/context/SkuOptionsContext.d.ts +3 -3
  281. package/lib/cjs/context/SkuOptionsContext.js +1 -0
  282. package/{dist → lib/cjs}/context/StockTransferChildrenContext.d.ts +7 -7
  283. package/lib/cjs/context/StockTransferChildrenContext.js +1 -0
  284. package/{dist → lib/cjs}/context/VariantsContext.d.ts +3 -3
  285. package/lib/cjs/context/VariantsContext.js +1 -0
  286. package/lib/cjs/index.d.ts +90 -0
  287. package/lib/cjs/index.js +1 -0
  288. package/{dist → lib/cjs}/reducers/AddressReducer.d.ts +58 -57
  289. package/lib/cjs/reducers/AddressReducer.js +1 -0
  290. package/lib/cjs/reducers/AvailabilityReducer.d.ts +53 -0
  291. package/lib/cjs/reducers/AvailabilityReducer.js +1 -0
  292. package/{dist → lib/cjs}/reducers/BillingAddressReducer.d.ts +31 -32
  293. package/lib/cjs/reducers/BillingAddressReducer.js +1 -0
  294. package/{dist → lib/cjs}/reducers/CustomerReducer.d.ts +50 -51
  295. package/lib/cjs/reducers/CustomerReducer.js +1 -0
  296. package/{dist → lib/cjs}/reducers/GiftCardReducer.d.ts +76 -75
  297. package/lib/cjs/reducers/GiftCardReducer.js +1 -0
  298. package/{dist → lib/cjs}/reducers/ItemReducer.d.ts +69 -68
  299. package/lib/cjs/reducers/ItemReducer.js +1 -0
  300. package/{dist → lib/cjs}/reducers/LineItemReducer.d.ts +52 -52
  301. package/lib/cjs/reducers/LineItemReducer.js +1 -0
  302. package/lib/cjs/reducers/OrderReducer.d.ts +127 -0
  303. package/lib/cjs/reducers/OrderReducer.js +1 -0
  304. package/{dist → lib/cjs}/reducers/PaymentMethodReducer.d.ts +105 -106
  305. package/lib/cjs/reducers/PaymentMethodReducer.js +1 -0
  306. package/{dist → lib/cjs}/reducers/PlaceOrderReducer.d.ts +48 -50
  307. package/lib/cjs/reducers/PlaceOrderReducer.js +1 -0
  308. package/{dist → lib/cjs}/reducers/PriceReducer.d.ts +44 -45
  309. package/lib/cjs/reducers/PriceReducer.js +1 -0
  310. package/{dist → lib/cjs}/reducers/ShipmentReducer.d.ts +40 -37
  311. package/lib/cjs/reducers/ShipmentReducer.js +1 -0
  312. package/{dist → lib/cjs}/reducers/ShippingAddressReducer.d.ts +32 -31
  313. package/lib/cjs/reducers/ShippingAddressReducer.js +1 -0
  314. package/{dist → lib/cjs}/reducers/SkuListsReducer.d.ts +21 -22
  315. package/lib/cjs/reducers/SkuListsReducer.js +1 -0
  316. package/{dist → lib/cjs}/reducers/SkuOptionsReducer.d.ts +26 -26
  317. package/lib/cjs/reducers/SkuOptionsReducer.js +1 -0
  318. package/{dist → lib/cjs}/reducers/VariantReducer.d.ts +71 -71
  319. package/lib/cjs/reducers/VariantReducer.js +1 -0
  320. package/{dist → lib/cjs}/typings/errors.d.ts +42 -40
  321. package/lib/cjs/typings/errors.js +1 -0
  322. package/{dist → lib/cjs}/typings/index.d.ts +126 -126
  323. package/lib/cjs/typings/index.js +1 -0
  324. package/lib/cjs/utils/PropsType.d.ts +33 -0
  325. package/lib/cjs/utils/PropsType.js +1 -0
  326. package/{dist → lib/cjs}/utils/addressesManager.d.ts +28 -27
  327. package/lib/cjs/utils/addressesManager.js +1 -0
  328. package/{dist → lib/cjs}/utils/baseReducer.d.ts +3 -3
  329. package/lib/cjs/utils/baseReducer.js +1 -0
  330. package/{dist → lib/cjs}/utils/browserInfo.d.ts +9 -9
  331. package/lib/cjs/utils/browserInfo.js +1 -0
  332. package/{dist → lib/cjs}/utils/childrenTypes.d.ts +9 -9
  333. package/lib/cjs/utils/childrenTypes.js +1 -0
  334. package/{dist → lib/cjs}/utils/countryStateCity.d.ts +9 -9
  335. package/lib/cjs/utils/countryStateCity.js +1 -0
  336. package/{dist → lib/cjs}/utils/customMessages.d.ts +8 -8
  337. package/lib/cjs/utils/customMessages.js +1 -0
  338. package/lib/cjs/utils/customerOrderOptions.d.ts +3 -0
  339. package/lib/cjs/utils/customerOrderOptions.js +1 -0
  340. package/{dist → lib/cjs}/utils/getAmount.d.ts +9 -9
  341. package/lib/cjs/utils/getAmount.js +1 -0
  342. package/{dist → lib/cjs}/utils/getCurrentItemKey.d.ts +6 -6
  343. package/lib/cjs/utils/getCurrentItemKey.js +1 -0
  344. package/lib/cjs/utils/getErrors.d.ts +11 -0
  345. package/lib/cjs/utils/getErrors.js +1 -0
  346. package/{dist → lib/cjs}/utils/getLineItemsCount.d.ts +6 -6
  347. package/lib/cjs/utils/getLineItemsCount.js +1 -0
  348. package/{dist → lib/cjs}/utils/getLoaderComponent.d.ts +3 -3
  349. package/lib/cjs/utils/getLoaderComponent.js +1 -0
  350. package/lib/cjs/utils/getPrices.d.ts +17 -0
  351. package/lib/cjs/utils/getPrices.js +1 -0
  352. package/lib/cjs/utils/getSdk.d.ts +3 -0
  353. package/lib/cjs/utils/getSdk.js +1 -0
  354. package/lib/cjs/utils/getSkus.d.ts +3 -0
  355. package/lib/cjs/utils/getSkus.js +1 -0
  356. package/{dist → lib/cjs}/utils/isEmptyStates.d.ts +1 -1
  357. package/lib/cjs/utils/isEmptyStates.js +1 -0
  358. package/{dist → lib/cjs}/utils/isJSON.d.ts +1 -1
  359. package/lib/cjs/utils/isJSON.js +1 -0
  360. package/lib/cjs/utils/jwt.d.ts +27 -0
  361. package/lib/cjs/utils/jwt.js +1 -0
  362. package/{dist → lib/cjs}/utils/localStorage.d.ts +18 -18
  363. package/lib/cjs/utils/localStorage.js +1 -0
  364. package/lib/cjs/utils/organization.d.ts +6 -0
  365. package/lib/cjs/utils/organization.js +1 -0
  366. package/lib/cjs/utils/paypalPayment.d.ts +3 -0
  367. package/lib/cjs/utils/paypalPayment.js +1 -0
  368. package/{dist → lib/cjs}/utils/promisify.d.ts +1 -1
  369. package/lib/cjs/utils/promisify.js +1 -0
  370. package/lib/cjs/utils/shipments.d.ts +2 -0
  371. package/lib/cjs/utils/shipments.js +1 -0
  372. package/{dist → lib/cjs}/utils/validateFormFields.d.ts +20 -19
  373. package/lib/cjs/utils/validateFormFields.js +1 -0
  374. package/lib/esm/components/AddToCartButton.d.ts +20 -0
  375. package/lib/esm/components/AddToCartButton.js +1 -0
  376. package/lib/esm/components/Address.d.ts +13 -0
  377. package/lib/esm/components/Address.js +1 -0
  378. package/lib/esm/components/AddressCountrySelector.d.ts +9 -0
  379. package/lib/esm/components/AddressCountrySelector.js +1 -0
  380. package/lib/esm/components/AddressField.d.ts +15 -0
  381. package/lib/esm/components/AddressField.js +1 -0
  382. package/lib/esm/components/AddressInput.d.ts +7 -0
  383. package/lib/esm/components/AddressInput.js +1 -0
  384. package/lib/esm/components/AddressStateSelector.d.ts +11 -0
  385. package/lib/esm/components/AddressStateSelector.js +1 -0
  386. package/lib/esm/components/AddressesContainer.d.ts +7 -0
  387. package/lib/esm/components/AddressesContainer.js +1 -0
  388. package/lib/esm/components/AdyenPayment.d.ts +25 -0
  389. package/lib/esm/components/AdyenPayment.js +1 -0
  390. package/lib/esm/components/AvailabilityContainer.d.ts +7 -0
  391. package/lib/esm/components/AvailabilityContainer.js +1 -0
  392. package/lib/esm/components/AvailabilityTemplate.d.ts +11 -0
  393. package/lib/esm/components/AvailabilityTemplate.js +1 -0
  394. package/lib/esm/components/BillingAddressContainer.d.ts +6 -0
  395. package/lib/esm/components/BillingAddressContainer.js +1 -0
  396. package/lib/esm/components/BillingAddressForm.d.ts +8 -0
  397. package/lib/esm/components/BillingAddressForm.js +1 -0
  398. package/lib/esm/components/BraintreePayment.d.ts +30 -0
  399. package/lib/esm/components/BraintreePayment.js +1 -0
  400. package/lib/esm/components/CheckoutLink.d.ts +11 -0
  401. package/lib/esm/components/CheckoutLink.js +1 -0
  402. package/lib/esm/components/CommerceLayer.d.ts +8 -0
  403. package/lib/esm/components/CommerceLayer.js +1 -0
  404. package/lib/esm/components/CustomerContainer.d.ts +7 -0
  405. package/lib/esm/components/CustomerContainer.js +1 -0
  406. package/lib/esm/components/CustomerInput.d.ts +11 -0
  407. package/lib/esm/components/CustomerInput.js +1 -0
  408. package/lib/esm/components/DeliveryLeadTime.d.ts +10 -0
  409. package/lib/esm/components/DeliveryLeadTime.js +1 -0
  410. package/lib/esm/components/DiscountAmount.d.ts +4 -0
  411. package/lib/esm/components/DiscountAmount.js +1 -0
  412. package/lib/esm/components/Errors.d.ts +5 -0
  413. package/lib/esm/components/Errors.js +1 -0
  414. package/lib/esm/components/ExternalFunction.d.ts +7 -0
  415. package/lib/esm/components/ExternalFunction.js +1 -0
  416. package/lib/esm/components/GiftCard.d.ts +8 -0
  417. package/lib/esm/components/GiftCard.js +1 -0
  418. package/lib/esm/components/GiftCardAmount.d.ts +4 -0
  419. package/lib/esm/components/GiftCardAmount.js +1 -0
  420. package/lib/esm/components/GiftCardContainer.d.ts +6 -0
  421. package/lib/esm/components/GiftCardContainer.js +1 -0
  422. package/lib/esm/components/GiftCardCurrencySelector.d.ts +7 -0
  423. package/lib/esm/components/GiftCardCurrencySelector.js +1 -0
  424. package/lib/esm/components/GiftCardInput.d.ts +7 -0
  425. package/lib/esm/components/GiftCardInput.js +1 -0
  426. package/lib/esm/components/GiftCardOrCouponCode.d.ts +13 -0
  427. package/lib/esm/components/GiftCardOrCouponCode.js +1 -0
  428. package/lib/esm/components/GiftCardOrCouponForm.d.ts +10 -0
  429. package/lib/esm/components/GiftCardOrCouponForm.js +1 -0
  430. package/lib/esm/components/GiftCardOrCouponInput.d.ts +8 -0
  431. package/lib/esm/components/GiftCardOrCouponInput.js +1 -0
  432. package/lib/esm/components/GiftCardOrCouponRemoveButton.d.ts +16 -0
  433. package/lib/esm/components/GiftCardOrCouponRemoveButton.js +1 -0
  434. package/lib/esm/components/GiftCardOrCouponSubmit.d.ts +9 -0
  435. package/lib/esm/components/GiftCardOrCouponSubmit.js +1 -0
  436. package/lib/esm/components/GiftCardRecipient.d.ts +0 -0
  437. package/lib/esm/components/GiftCardRecipient.js +1 -0
  438. package/lib/esm/components/GiftCardRecipientInput.d.ts +0 -0
  439. package/lib/esm/components/GiftCardRecipientInput.js +1 -0
  440. package/lib/esm/components/ItemContainer.d.ts +11 -0
  441. package/lib/esm/components/ItemContainer.js +1 -0
  442. package/lib/esm/components/LineItem.d.ts +8 -0
  443. package/lib/esm/components/LineItem.js +1 -0
  444. package/lib/esm/components/LineItemAmount.d.ts +7 -0
  445. package/lib/esm/components/LineItemAmount.js +1 -0
  446. package/lib/esm/components/LineItemCode.d.ts +8 -0
  447. package/lib/esm/components/LineItemCode.js +1 -0
  448. package/lib/esm/components/LineItemImage.d.ts +10 -0
  449. package/lib/esm/components/LineItemImage.js +1 -0
  450. package/lib/esm/components/LineItemName.d.ts +9 -0
  451. package/lib/esm/components/LineItemName.js +1 -0
  452. package/lib/esm/components/LineItemOption.d.ts +19 -0
  453. package/lib/esm/components/LineItemOption.js +1 -0
  454. package/lib/esm/components/LineItemOptions.d.ts +14 -0
  455. package/lib/esm/components/LineItemOptions.js +1 -0
  456. package/lib/esm/components/LineItemQuantity.d.ts +14 -0
  457. package/lib/esm/components/LineItemQuantity.js +1 -0
  458. package/lib/esm/components/LineItemRemoveLink.d.ts +12 -0
  459. package/lib/esm/components/LineItemRemoveLink.js +1 -0
  460. package/lib/esm/components/LineItemsContainer.d.ts +8 -0
  461. package/lib/esm/components/LineItemsContainer.js +1 -0
  462. package/lib/esm/components/LineItemsCount.d.ts +10 -0
  463. package/lib/esm/components/LineItemsCount.js +1 -0
  464. package/lib/esm/components/MetadataInput.d.ts +5 -0
  465. package/lib/esm/components/MetadataInput.js +1 -0
  466. package/lib/esm/components/OrderContainer.d.ts +11 -0
  467. package/lib/esm/components/OrderContainer.js +1 -0
  468. package/lib/esm/components/OrderNumber.d.ts +5 -0
  469. package/lib/esm/components/OrderNumber.js +1 -0
  470. package/lib/esm/components/OrderStorage.d.ts +8 -0
  471. package/lib/esm/components/OrderStorage.js +1 -0
  472. package/lib/esm/components/PaymentGateway.d.ts +16 -0
  473. package/lib/esm/components/PaymentGateway.js +1 -0
  474. package/lib/esm/components/PaymentMethod.d.ts +16 -0
  475. package/lib/esm/components/PaymentMethod.js +1 -0
  476. package/lib/esm/components/PaymentMethodAmount.d.ts +4 -0
  477. package/lib/esm/components/PaymentMethodAmount.js +1 -0
  478. package/lib/esm/components/PaymentMethodName.d.ts +9 -0
  479. package/lib/esm/components/PaymentMethodName.js +1 -0
  480. package/lib/esm/components/PaymentMethodPrice.d.ts +9 -0
  481. package/lib/esm/components/PaymentMethodPrice.js +1 -0
  482. package/lib/esm/components/PaymentMethodRadioButton.d.ts +11 -0
  483. package/lib/esm/components/PaymentMethodRadioButton.js +1 -0
  484. package/lib/esm/components/PaymentMethodsContainer.d.ts +8 -0
  485. package/lib/esm/components/PaymentMethodsContainer.js +1 -0
  486. package/lib/esm/components/PaymentSource.d.ts +19 -0
  487. package/lib/esm/components/PaymentSource.js +1 -0
  488. package/lib/esm/components/PaymentSourceBrandIcon.d.ts +15 -0
  489. package/lib/esm/components/PaymentSourceBrandIcon.js +1 -0
  490. package/lib/esm/components/PaymentSourceBrandName.d.ts +12 -0
  491. package/lib/esm/components/PaymentSourceBrandName.js +1 -0
  492. package/lib/esm/components/PaymentSourceDetail.d.ts +12 -0
  493. package/lib/esm/components/PaymentSourceDetail.js +1 -0
  494. package/lib/esm/components/PaymentSourceEditButton.d.ts +9 -0
  495. package/lib/esm/components/PaymentSourceEditButton.js +1 -0
  496. package/lib/esm/components/PaypalPayment.d.ts +12 -0
  497. package/lib/esm/components/PaypalPayment.js +1 -0
  498. package/lib/esm/components/PlaceOrderButton.d.ts +12 -0
  499. package/lib/esm/components/PlaceOrderButton.js +1 -0
  500. package/lib/esm/components/PlaceOrderContainer.d.ts +8 -0
  501. package/lib/esm/components/PlaceOrderContainer.js +1 -0
  502. package/lib/esm/components/Price.d.ts +14 -0
  503. package/lib/esm/components/Price.js +1 -0
  504. package/lib/esm/components/PricesContainer.d.ts +11 -0
  505. package/lib/esm/components/PricesContainer.js +1 -0
  506. package/lib/esm/components/PrivacyAndTermsCheckbox.d.ts +4 -0
  507. package/lib/esm/components/PrivacyAndTermsCheckbox.js +1 -0
  508. package/lib/esm/components/QuantitySelector.d.ts +17 -0
  509. package/lib/esm/components/QuantitySelector.js +1 -0
  510. package/lib/esm/components/SaveAddressesButton.d.ts +10 -0
  511. package/lib/esm/components/SaveAddressesButton.js +1 -0
  512. package/lib/esm/components/SaveCustomerButton.d.ts +13 -0
  513. package/lib/esm/components/SaveCustomerButton.js +1 -0
  514. package/lib/esm/components/Shipment.d.ts +8 -0
  515. package/lib/esm/components/Shipment.js +1 -0
  516. package/lib/esm/components/ShipmentField.d.ts +12 -0
  517. package/lib/esm/components/ShipmentField.js +1 -0
  518. package/lib/esm/components/ShipmentsContainer.d.ts +6 -0
  519. package/lib/esm/components/ShipmentsContainer.js +1 -0
  520. package/lib/esm/components/ShippingAddressContainer.d.ts +6 -0
  521. package/lib/esm/components/ShippingAddressContainer.js +1 -0
  522. package/lib/esm/components/ShippingAddressForm.d.ts +8 -0
  523. package/lib/esm/components/ShippingAddressForm.js +1 -0
  524. package/lib/esm/components/ShippingAmount.d.ts +4 -0
  525. package/lib/esm/components/ShippingAmount.js +1 -0
  526. package/lib/esm/components/ShippingMethod.d.ts +8 -0
  527. package/lib/esm/components/ShippingMethod.js +1 -0
  528. package/lib/esm/components/ShippingMethodName.d.ts +11 -0
  529. package/lib/esm/components/ShippingMethodName.js +1 -0
  530. package/lib/esm/components/ShippingMethodPrice.d.ts +13 -0
  531. package/lib/esm/components/ShippingMethodPrice.js +1 -0
  532. package/lib/esm/components/ShippingMethodRadioButton.d.ts +9 -0
  533. package/lib/esm/components/ShippingMethodRadioButton.js +1 -0
  534. package/lib/esm/components/SkuList.d.ts +7 -0
  535. package/lib/esm/components/SkuList.js +1 -0
  536. package/lib/esm/components/SkuListsContainer.d.ts +6 -0
  537. package/lib/esm/components/SkuListsContainer.js +1 -0
  538. package/lib/esm/components/SkuOption.d.ts +7 -0
  539. package/lib/esm/components/SkuOption.js +1 -0
  540. package/lib/esm/components/SkuOptionInput.d.ts +5 -0
  541. package/lib/esm/components/SkuOptionInput.js +1 -0
  542. package/lib/esm/components/SkuOptionsContainer.d.ts +7 -0
  543. package/lib/esm/components/SkuOptionsContainer.js +1 -0
  544. package/lib/esm/components/StockTransfer.d.ts +6 -0
  545. package/lib/esm/components/StockTransfer.js +1 -0
  546. package/lib/esm/components/StockTransferField.d.ts +9 -0
  547. package/lib/esm/components/StockTransferField.js +1 -0
  548. package/lib/esm/components/StripePayment.d.ts +18 -0
  549. package/lib/esm/components/StripePayment.js +1 -0
  550. package/lib/esm/components/SubTotalAmount.d.ts +4 -0
  551. package/lib/esm/components/SubTotalAmount.js +1 -0
  552. package/lib/esm/components/SubmitButton.d.ts +9 -0
  553. package/lib/esm/components/SubmitButton.js +1 -0
  554. package/lib/esm/components/TaxesAmount.d.ts +4 -0
  555. package/lib/esm/components/TaxesAmount.js +1 -0
  556. package/lib/esm/components/TotalAmount.d.ts +4 -0
  557. package/lib/esm/components/TotalAmount.js +1 -0
  558. package/lib/esm/components/VariantSelector.d.ts +27 -0
  559. package/lib/esm/components/VariantSelector.js +1 -0
  560. package/lib/esm/components/VariantsContainer.d.ts +8 -0
  561. package/lib/esm/components/VariantsContainer.js +1 -0
  562. package/lib/esm/components/WireTransferPayment.d.ts +10 -0
  563. package/lib/esm/components/WireTransferPayment.js +1 -0
  564. package/lib/esm/components/gateways/AdyenGateway.d.ts +5 -0
  565. package/lib/esm/components/gateways/AdyenGateway.js +1 -0
  566. package/lib/esm/components/gateways/BraintreeGateway.d.ts +5 -0
  567. package/lib/esm/components/gateways/BraintreeGateway.js +1 -0
  568. package/lib/esm/components/gateways/PaypalGateway.d.ts +5 -0
  569. package/lib/esm/components/gateways/PaypalGateway.js +1 -0
  570. package/lib/esm/components/gateways/StripeGateway.d.ts +5 -0
  571. package/lib/esm/components/gateways/StripeGateway.js +1 -0
  572. package/lib/esm/components/gateways/WireTransferGateway.d.ts +5 -0
  573. package/lib/esm/components/gateways/WireTransferGateway.js +1 -0
  574. package/lib/esm/components/utils/AddressCardsTemplate.d.ts +27 -0
  575. package/lib/esm/components/utils/AddressCardsTemplate.js +1 -0
  576. package/lib/esm/components/utils/BaseField.d.ts +8 -0
  577. package/lib/esm/components/utils/BaseField.js +1 -0
  578. package/lib/esm/components/utils/BaseInput.d.ts +5 -0
  579. package/lib/esm/components/utils/BaseInput.js +1 -0
  580. package/lib/esm/components/utils/BaseOrderPrice.d.ts +6 -0
  581. package/lib/esm/components/utils/BaseOrderPrice.js +1 -0
  582. package/lib/esm/components/utils/BaseSelect.d.ts +5 -0
  583. package/lib/esm/components/utils/BaseSelect.js +1 -0
  584. package/lib/esm/components/utils/Parent.d.ts +8 -0
  585. package/lib/esm/components/utils/Parent.js +1 -0
  586. package/lib/esm/components/utils/PaymentCardsTemplate.d.ts +23 -0
  587. package/lib/esm/components/utils/PaymentCardsTemplate.js +1 -0
  588. package/lib/esm/components/utils/PriceTemplate.d.ts +8 -0
  589. package/lib/esm/components/utils/PriceTemplate.js +1 -0
  590. package/lib/esm/components/utils/VariantTemplate.d.ts +34 -0
  591. package/lib/esm/components/utils/VariantTemplate.js +1 -0
  592. package/lib/esm/components/utils/getAllErrors.d.ts +17 -0
  593. package/lib/esm/components/utils/getAllErrors.js +1 -0
  594. package/lib/esm/config/components.d.ts +867 -0
  595. package/lib/esm/config/components.js +1 -0
  596. package/lib/esm/config/currency.json +1 -0
  597. package/lib/esm/context/AddressChildrenContext.d.ts +7 -0
  598. package/lib/esm/context/AddressChildrenContext.js +1 -0
  599. package/lib/esm/context/AddressContext.d.ts +17 -0
  600. package/lib/esm/context/AddressContext.js +1 -0
  601. package/lib/esm/context/AvailabilityContext.d.ts +3 -0
  602. package/lib/esm/context/AvailabilityContext.js +1 -0
  603. package/lib/esm/context/BillingAddressContext.d.ts +12 -0
  604. package/lib/esm/context/BillingAddressContext.js +1 -0
  605. package/lib/esm/context/BillingAddressFormContext.d.ts +18 -0
  606. package/lib/esm/context/BillingAddressFormContext.js +1 -0
  607. package/lib/esm/context/CommerceLayerContext.d.ts +7 -0
  608. package/lib/esm/context/CommerceLayerContext.js +1 -0
  609. package/lib/esm/context/CouponAndGiftCardFormContext.d.ts +7 -0
  610. package/lib/esm/context/CouponAndGiftCardFormContext.js +1 -0
  611. package/lib/esm/context/CustomerContext.d.ts +16 -0
  612. package/lib/esm/context/CustomerContext.js +1 -0
  613. package/lib/esm/context/ExternalFunctionContext.d.ts +12 -0
  614. package/lib/esm/context/ExternalFunctionContext.js +1 -0
  615. package/lib/esm/context/GiftCardContext.d.ts +11 -0
  616. package/lib/esm/context/GiftCardContext.js +1 -0
  617. package/lib/esm/context/ItemContext.d.ts +13 -0
  618. package/lib/esm/context/ItemContext.js +1 -0
  619. package/lib/esm/context/LineItemChildrenContext.d.ts +9 -0
  620. package/lib/esm/context/LineItemChildrenContext.js +1 -0
  621. package/lib/esm/context/LineItemContext.d.ts +8 -0
  622. package/lib/esm/context/LineItemContext.js +1 -0
  623. package/lib/esm/context/LineItemOptionChildrenContext.d.ts +8 -0
  624. package/lib/esm/context/LineItemOptionChildrenContext.js +1 -0
  625. package/lib/esm/context/OrderContext.d.ts +26 -0
  626. package/lib/esm/context/OrderContext.js +1 -0
  627. package/lib/esm/context/OrderStorageContext.d.ts +11 -0
  628. package/lib/esm/context/OrderStorageContext.js +1 -0
  629. package/lib/esm/context/PaymentMethodChildrenContext.d.ts +10 -0
  630. package/lib/esm/context/PaymentMethodChildrenContext.js +1 -0
  631. package/lib/esm/context/PaymentMethodContext.d.ts +23 -0
  632. package/lib/esm/context/PaymentMethodContext.js +1 -0
  633. package/lib/esm/context/PaymentSourceContext.d.ts +14 -0
  634. package/lib/esm/context/PaymentSourceContext.js +1 -0
  635. package/lib/esm/context/PlaceOrderContext.d.ts +16 -0
  636. package/lib/esm/context/PlaceOrderContext.js +1 -0
  637. package/lib/esm/context/PricesContext.d.ts +7 -0
  638. package/lib/esm/context/PricesContext.js +1 -0
  639. package/lib/esm/context/ShipmentChildrenContext.d.ts +13 -0
  640. package/lib/esm/context/ShipmentChildrenContext.js +1 -0
  641. package/lib/esm/context/ShipmentContext.d.ts +12 -0
  642. package/lib/esm/context/ShipmentContext.js +1 -0
  643. package/lib/esm/context/ShippingAddressContext.d.ts +10 -0
  644. package/lib/esm/context/ShippingAddressContext.js +1 -0
  645. package/lib/esm/context/ShippingAddressFormContext.d.ts +4 -0
  646. package/lib/esm/context/ShippingAddressFormContext.js +1 -0
  647. package/lib/esm/context/ShippingMethodChildrenContext.d.ts +10 -0
  648. package/lib/esm/context/ShippingMethodChildrenContext.js +1 -0
  649. package/lib/esm/context/SkuListsContext.d.ts +6 -0
  650. package/lib/esm/context/SkuListsContext.js +1 -0
  651. package/lib/esm/context/SkuOptionChildrenContext.d.ts +8 -0
  652. package/lib/esm/context/SkuOptionChildrenContext.js +1 -0
  653. package/lib/esm/context/SkuOptionsContext.d.ts +3 -0
  654. package/lib/esm/context/SkuOptionsContext.js +1 -0
  655. package/lib/esm/context/StockTransferChildrenContext.d.ts +7 -0
  656. package/lib/esm/context/StockTransferChildrenContext.js +1 -0
  657. package/lib/esm/context/VariantsContext.d.ts +3 -0
  658. package/lib/esm/context/VariantsContext.js +1 -0
  659. package/lib/esm/index.d.ts +90 -0
  660. package/lib/esm/index.js +1 -0
  661. package/lib/esm/reducers/AddressReducer.d.ts +58 -0
  662. package/lib/esm/reducers/AddressReducer.js +1 -0
  663. package/lib/esm/reducers/AvailabilityReducer.d.ts +53 -0
  664. package/lib/esm/reducers/AvailabilityReducer.js +1 -0
  665. package/lib/esm/reducers/BillingAddressReducer.d.ts +31 -0
  666. package/lib/esm/reducers/BillingAddressReducer.js +1 -0
  667. package/lib/esm/reducers/CustomerReducer.d.ts +50 -0
  668. package/lib/esm/reducers/CustomerReducer.js +1 -0
  669. package/lib/esm/reducers/GiftCardReducer.d.ts +76 -0
  670. package/lib/esm/reducers/GiftCardReducer.js +1 -0
  671. package/lib/esm/reducers/ItemReducer.d.ts +69 -0
  672. package/lib/esm/reducers/ItemReducer.js +1 -0
  673. package/lib/esm/reducers/LineItemReducer.d.ts +52 -0
  674. package/lib/esm/reducers/LineItemReducer.js +1 -0
  675. package/lib/esm/reducers/OrderReducer.d.ts +127 -0
  676. package/lib/esm/reducers/OrderReducer.js +1 -0
  677. package/lib/esm/reducers/PaymentMethodReducer.d.ts +105 -0
  678. package/lib/esm/reducers/PaymentMethodReducer.js +1 -0
  679. package/lib/esm/reducers/PlaceOrderReducer.d.ts +48 -0
  680. package/lib/esm/reducers/PlaceOrderReducer.js +1 -0
  681. package/lib/esm/reducers/PriceReducer.d.ts +44 -0
  682. package/lib/esm/reducers/PriceReducer.js +1 -0
  683. package/lib/esm/reducers/ShipmentReducer.d.ts +40 -0
  684. package/lib/esm/reducers/ShipmentReducer.js +1 -0
  685. package/lib/esm/reducers/ShippingAddressReducer.d.ts +32 -0
  686. package/lib/esm/reducers/ShippingAddressReducer.js +1 -0
  687. package/lib/esm/reducers/SkuListsReducer.d.ts +21 -0
  688. package/lib/esm/reducers/SkuListsReducer.js +1 -0
  689. package/lib/esm/reducers/SkuOptionsReducer.d.ts +26 -0
  690. package/lib/esm/reducers/SkuOptionsReducer.js +1 -0
  691. package/lib/esm/reducers/VariantReducer.d.ts +71 -0
  692. package/lib/esm/reducers/VariantReducer.js +1 -0
  693. package/lib/esm/typings/errors.d.ts +42 -0
  694. package/lib/esm/typings/errors.js +1 -0
  695. package/lib/esm/typings/index.d.ts +126 -0
  696. package/lib/esm/typings/index.js +1 -0
  697. package/lib/esm/utils/PropsType.d.ts +33 -0
  698. package/lib/esm/utils/PropsType.js +1 -0
  699. package/lib/esm/utils/addressesManager.d.ts +28 -0
  700. package/lib/esm/utils/addressesManager.js +1 -0
  701. package/lib/esm/utils/baseReducer.d.ts +3 -0
  702. package/lib/esm/utils/baseReducer.js +1 -0
  703. package/lib/esm/utils/browserInfo.d.ts +9 -0
  704. package/lib/esm/utils/browserInfo.js +1 -0
  705. package/lib/esm/utils/childrenTypes.d.ts +9 -0
  706. package/lib/esm/utils/childrenTypes.js +1 -0
  707. package/lib/esm/utils/countryStateCity.d.ts +9 -0
  708. package/lib/esm/utils/countryStateCity.js +1 -0
  709. package/lib/esm/utils/customMessages.d.ts +8 -0
  710. package/lib/esm/utils/customMessages.js +1 -0
  711. package/lib/esm/utils/customerOrderOptions.d.ts +3 -0
  712. package/lib/esm/utils/customerOrderOptions.js +1 -0
  713. package/lib/esm/utils/getAmount.d.ts +9 -0
  714. package/lib/esm/utils/getAmount.js +1 -0
  715. package/lib/esm/utils/getCurrentItemKey.d.ts +6 -0
  716. package/lib/esm/utils/getCurrentItemKey.js +1 -0
  717. package/lib/esm/utils/getErrors.d.ts +11 -0
  718. package/lib/esm/utils/getErrors.js +1 -0
  719. package/lib/esm/utils/getLineItemsCount.d.ts +6 -0
  720. package/lib/esm/utils/getLineItemsCount.js +1 -0
  721. package/lib/esm/utils/getLoaderComponent.d.ts +3 -0
  722. package/lib/esm/utils/getLoaderComponent.js +1 -0
  723. package/lib/esm/utils/getPrices.d.ts +17 -0
  724. package/lib/esm/utils/getPrices.js +1 -0
  725. package/lib/esm/utils/getSdk.d.ts +3 -0
  726. package/lib/esm/utils/getSdk.js +1 -0
  727. package/lib/esm/utils/getSkus.d.ts +3 -0
  728. package/lib/esm/utils/getSkus.js +1 -0
  729. package/lib/esm/utils/isEmptyStates.d.ts +1 -0
  730. package/lib/esm/utils/isEmptyStates.js +1 -0
  731. package/lib/esm/utils/isJSON.d.ts +1 -0
  732. package/lib/esm/utils/isJSON.js +1 -0
  733. package/lib/esm/utils/jwt.d.ts +27 -0
  734. package/lib/esm/utils/jwt.js +1 -0
  735. package/lib/esm/utils/localStorage.d.ts +18 -0
  736. package/lib/esm/utils/localStorage.js +1 -0
  737. package/lib/esm/utils/organization.d.ts +6 -0
  738. package/lib/esm/utils/organization.js +1 -0
  739. package/lib/esm/utils/paypalPayment.d.ts +3 -0
  740. package/lib/esm/utils/paypalPayment.js +1 -0
  741. package/lib/esm/utils/promisify.d.ts +1 -0
  742. package/lib/esm/utils/promisify.js +1 -0
  743. package/lib/esm/utils/shipments.d.ts +2 -0
  744. package/lib/esm/utils/shipments.js +1 -0
  745. package/lib/esm/utils/validateFormFields.d.ts +20 -0
  746. package/lib/esm/utils/validateFormFields.js +1 -0
  747. package/lib/tsconfig.prod.esm.tsbuildinfo +1 -0
  748. package/lib/tsconfig.prod.tsbuildinfo +1 -0
  749. package/package.json +71 -52
  750. package/dist/components/utils/BaseInput.d.ts +0 -5
  751. package/dist/context/LineItemChildrenContext.d.ts +0 -7
  752. package/dist/context/OrderContext.d.ts +0 -4
  753. package/dist/context/ShipmentChildrenContext.d.ts +0 -13
  754. package/dist/context/ShippingMethodChildrenContext.d.ts +0 -9
  755. package/dist/context/SkuListsContext.d.ts +0 -3
  756. package/dist/index.d.ts +0 -89
  757. package/dist/index.js +0 -8
  758. package/dist/react-components.cjs.development.js +0 -12876
  759. package/dist/react-components.cjs.development.js.map +0 -1
  760. package/dist/react-components.cjs.production.min.js +0 -2
  761. package/dist/react-components.cjs.production.min.js.map +0 -1
  762. package/dist/react-components.esm.js +0 -12782
  763. package/dist/react-components.esm.js.map +0 -1
  764. package/dist/reducers/AvailabilityReducer.d.ts +0 -40
  765. package/dist/reducers/OrderReducer.d.ts +0 -131
  766. package/dist/utils/PropsType.d.ts +0 -8
  767. package/dist/utils/customerOrderOptions.d.ts +0 -4
  768. package/dist/utils/dynamicNaming.d.ts +0 -5
  769. package/dist/utils/getErrorsByCollection.d.ts +0 -11
  770. package/dist/utils/getPrices.d.ts +0 -18
  771. package/dist/utils/getSkus.d.ts +0 -3
  772. package/dist/utils/paypalPayment.d.ts +0 -3
  773. package/dist/utils/shipments.d.ts +0 -5
@@ -0,0 +1 @@
1
+ import{jsx as _jsx}from"react/jsx-runtime";import ExternalFunctionContext,{callExternalFunction}from"../context/ExternalFunctionContext";import components from"../config/components";const propTypes=components.ExternalFunction.propTypes;const displayName=components.ExternalFunction.displayName;const ExternalFunction=({children:n,url:t})=>_jsx(ExternalFunctionContext.Provider,Object.assign({value:{url:t,callExternalFunction:callExternalFunction}},{children:n}),void 0);ExternalFunction.propTypes=propTypes;ExternalFunction.displayName=displayName;export default ExternalFunction;
@@ -0,0 +1,8 @@
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import { BaseState } from '../typings/index';
3
+ declare type GiftCardProps = {
4
+ children: ReactNode;
5
+ onSubmit?: (values: BaseState) => void;
6
+ } & JSX.IntrinsicElements['form'];
7
+ declare const GiftCard: FunctionComponent<GiftCardProps>;
8
+ export default GiftCard;
@@ -0,0 +1 @@
1
+ import{jsx as _jsx}from"react/jsx-runtime";import{Fragment,useRef,useContext}from"react";import validateFormFields from"../utils/validateFormFields";import{isEmpty}from"lodash";import GiftCardContext from"../context/GiftCardContext";import components from"../config/components";const propTypes=components.GiftCard.propTypes;const defaultProps=components.GiftCard.defaultProps;const displayName=components.GiftCard.displayName;const GiftCard=t=>{const{children:e,onSubmit:o}=t;const r="giftCardForm";const s=useRef(null);const{addGiftCard:i,addGiftCardError:n}=useContext(GiftCardContext);const a=t=>{t.preventDefault();const e=s.current;const r=e===null||e===void 0?void 0:e.elements;const{errors:a,values:d}=validateFormFields(r,["currencyCode","balanceCents"],"gift_cards");if(isEmpty(a)){i(d);e===null||e===void 0?void 0:e.reset();if(o){o(d)}}else{n(a)}};return _jsx(Fragment,{children:_jsx("form",Object.assign({name:r,ref:s,onSubmit:a},{children:e}),r)},void 0)};GiftCard.propTypes=propTypes;GiftCard.defaultProps=defaultProps;GiftCard.displayName=displayName;export default GiftCard;
@@ -0,0 +1,4 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseAmountComponent } from '../typings/index';
3
+ declare const GiftCardAmount: FunctionComponent<BaseAmountComponent>;
4
+ export default GiftCardAmount;
@@ -0,0 +1 @@
1
+ import{jsx as _jsx}from"react/jsx-runtime";import BaseOrderPrice from"./utils/BaseOrderPrice";import components from"../config/components";const propTypes=components.GiftCardAmount.propTypes;const displayName=components.GiftCardAmount.displayName;const GiftCardAmount=o=>_jsx(BaseOrderPrice,Object.assign({base:"amount",type:"gift_card"},o),void 0);GiftCardAmount.propTypes=propTypes;GiftCardAmount.displayName=displayName;export default GiftCardAmount;
@@ -0,0 +1,6 @@
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ export declare type GiftCardContainer = {
3
+ children: ReactNode;
4
+ };
5
+ declare const GiftCardContainer: FunctionComponent<GiftCardContainer>;
6
+ export default GiftCardContainer;
@@ -0,0 +1 @@
1
+ import{jsx as _jsx}from"react/jsx-runtime";import{useReducer,useContext}from"react";import GiftCardContext from"../context/GiftCardContext";import CommerceLayerContext from"../context/CommerceLayerContext";import giftCardReducer,{giftCardInitialState,addGiftCardRecipient,addGiftCard,addGiftCardError,addGiftCardLoading}from"../reducers/GiftCardReducer";import OrderContext from"../context/OrderContext";import components from"../config/components";const propTypes=components.GiftCardContainer.propTypes;const displayName=components.GiftCardContainer.displayName;const GiftCardContainer=t=>{const{children:r}=t;const[e,d]=useReducer(giftCardReducer,giftCardInitialState);const a=useContext(CommerceLayerContext);const{getOrder:o,createOrder:i,order:n}=useContext(OrderContext);const C=Object.assign(Object.assign({},e),{addGiftCardRecipient:t=>addGiftCardRecipient(t,a,d),addGiftCard:t=>addGiftCard(Object.assign({},t),{config:a,dispatch:d,getOrder:o,createOrder:i,order:n}),addGiftCardError:t=>addGiftCardError(t,d),addGiftCardLoading:t=>addGiftCardLoading(t,d)});return _jsx(GiftCardContext.Provider,Object.assign({value:C},{children:r}),void 0)};GiftCardContainer.propTypes=propTypes;GiftCardContainer.displayName=displayName;export default GiftCardContainer;
@@ -0,0 +1,7 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseSelectComponentProps } from '../typings/index';
3
+ declare type GiftCardCurrencySelectorProps = Omit<BaseSelectComponentProps, 'options' | 'name'> & {
4
+ required?: boolean;
5
+ } & Pick<JSX.IntrinsicElements['select'], 'className' | 'id' | 'style'>;
6
+ declare const GiftCardCurrencySelector: FunctionComponent<GiftCardCurrencySelectorProps>;
7
+ export default GiftCardCurrencySelector;
@@ -0,0 +1 @@
1
+ import{jsx as _jsx}from"react/jsx-runtime";import BaseSelect from"./utils/BaseSelect";import currencyOptions from"../config/currency.json";import components from"../config/components";const propTypes=components.GiftCardCurrencySelector.propTypes;const defaultProps=components.GiftCardCurrencySelector.defaultProps;const displayName=components.GiftCardCurrencySelector.displayName;const GiftCardCurrencySelector=e=>_jsx(BaseSelect,Object.assign({options:currencyOptions,name:"currencyCode"},e),void 0);GiftCardCurrencySelector.propTypes=propTypes;GiftCardCurrencySelector.defaultProps=defaultProps;GiftCardCurrencySelector.displayName=displayName;export default GiftCardCurrencySelector;
@@ -0,0 +1,7 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseInputComponentProps, GiftCardInputName } from '../typings/index';
3
+ export declare type GiftCardInputProps = {
4
+ name: GiftCardInputName;
5
+ } & Omit<BaseInputComponentProps, 'name'> & JSX.IntrinsicElements['input'] & JSX.IntrinsicElements['textarea'];
6
+ declare const GiftCardInput: FunctionComponent<GiftCardInputProps>;
7
+ export default GiftCardInput;
@@ -0,0 +1 @@
1
+ import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import BaseInput from"./utils/BaseInput";import components from"../config/components";const propTypes=components.GiftCardInput.propTypes;const displayName=components.GiftCardInput.displayName;const GiftCardInput=p=>{const{placeholder:t=""}=p,o=__rest(p,["placeholder"]);return _jsx(BaseInput,Object.assign({placeholder:t},o),void 0)};GiftCardInput.propTypes=propTypes;GiftCardInput.displayName=displayName;export default GiftCardInput;
@@ -0,0 +1,13 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { FunctionChildren } from '../typings/index';
3
+ import { CodeType } from '../reducers/OrderReducer';
4
+ declare type GiftCardOrCouponCodeChildrenProps = FunctionChildren<Omit<GiftCardOrCouponCodeProps, 'children'> & {
5
+ code?: string;
6
+ hide?: boolean;
7
+ }>;
8
+ declare type GiftCardOrCouponCodeProps = {
9
+ type?: CodeType;
10
+ children?: GiftCardOrCouponCodeChildrenProps;
11
+ } & JSX.IntrinsicElements['span'];
12
+ declare const GiftCardOrCouponCode: FunctionComponent<GiftCardOrCouponCodeProps>;
13
+ export default GiftCardOrCouponCode;
@@ -0,0 +1 @@
1
+ import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import components from"../config/components";import Parent from"./utils/Parent";import OrderContext from"../context/OrderContext";import{has,isEmpty}from"lodash";const propTypes=components.GiftCardOrCouponCode.propTypes;const displayName=components.GiftCardOrCouponCode.displayName;const GiftCardOrCouponCode=o=>{var{children:e,type:t}=o,r=__rest(o,["children","type"]);const{order:s}=useContext(OrderContext);let n=t&&`${t}Code`;if(!t&&s&&has(s,"couponCode")&&!isEmpty(s.coupon_code))n="coupon_code";else if(!t)n="gift_card_code";const p=s&&n?s[n]:"";const i=s&&p?false:true;const d=Object.assign(Object.assign({},r),{code:p,hide:i});return e?_jsx(Parent,Object.assign({},d,{children:e}),void 0):i?null:_jsx("span",Object.assign({},r,{children:p}),void 0)};GiftCardOrCouponCode.propTypes=propTypes;GiftCardOrCouponCode.displayName=displayName;export default GiftCardOrCouponCode;
@@ -0,0 +1,10 @@
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ declare type GiftCardOrCouponFormProps = {
3
+ children: ReactNode;
4
+ reset?: boolean;
5
+ onSubmit?: (response: {
6
+ success: boolean;
7
+ }) => void;
8
+ } & Omit<JSX.IntrinsicElements['form'], 'onSubmit'>;
9
+ declare const GiftCardOrCouponForm: FunctionComponent<GiftCardOrCouponFormProps>;
10
+ export default GiftCardOrCouponForm;
@@ -0,0 +1 @@
1
+ import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import useRapidForm from"rapid-form";import{useContext,useEffect,useRef}from"react";import CouponAndGiftCardFormContext from"../context/CouponAndGiftCardFormContext";import OrderContext from"../context/OrderContext";import isEmpty from"lodash/isEmpty";import components from"../config/components";import camelCase from"lodash/camelCase";import dropWhile from"lodash/dropWhile";import has from"lodash/has";import{findIndex}from"lodash";const propTypes=components.GiftCardOrCouponForm.propTypes;const GiftCardOrCouponForm=o=>{const{children:r,autoComplete:e="on",reset:t=false,onSubmit:s}=o,n=__rest(o,["children","autoComplete","reset","onSubmit"]);const{validation:i,values:d}=useRapidForm();const{setGiftCardOrCouponCode:a,order:m,errors:p,setOrderErrors:c}=useContext(OrderContext);const f=useRef(null);const u="gift_card_or_coupon_code";useEffect((()=>{var o;if(((o=d[u])===null||o===void 0?void 0:o.value)===""&&findIndex(p,{field:camelCase(u)})!==-1){const o=dropWhile(p,(o=>o.field===camelCase(u)));c({errors:o});s&&s({success:true})}}),[d]);const l=async o=>{o.preventDefault();const r=has(d,u)?d[u].value:undefined;if(r){const{success:e}=await a({code:r});s&&s({success:e});e&&o.target.reset()}};return(m===null||m===void 0?void 0:m.gift_card_or_coupon_code)||isEmpty(m)?null:_jsx(CouponAndGiftCardFormContext.Provider,Object.assign({value:{validation:i}},{children:_jsx("form",Object.assign({ref:f,autoComplete:e,onSubmit:l},n,{children:r}),void 0)}),void 0)};GiftCardOrCouponForm.propTypes=propTypes;export default GiftCardOrCouponForm;
@@ -0,0 +1,8 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseInputComponentProps } from '../typings/index';
3
+ export declare type GiftCardOrCouponInputProps = {
4
+ name?: 'gift_card_or_coupon_code';
5
+ type?: 'text';
6
+ } & Omit<BaseInputComponentProps, 'name' | 'type'> & JSX.IntrinsicElements['input'] & JSX.IntrinsicElements['textarea'];
7
+ declare const GiftCardOrCouponInput: FunctionComponent<GiftCardOrCouponInputProps>;
8
+ export default GiftCardOrCouponInput;
@@ -0,0 +1 @@
1
+ import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import components from"../config/components";import BaseInput from"./utils/BaseInput";import CouponAndGiftCardFormContext from"../context/CouponAndGiftCardFormContext";const propTypes=components.GiftCardOrCouponInput.propTypes;const displayName=components.GiftCardOrCouponInput.displayName;const GiftCardOrCouponInput=o=>{const{placeholder:t="",required:e,value:r}=o,p=__rest(o,["placeholder","required","value"]);const{validation:n}=useContext(CouponAndGiftCardFormContext);return _jsx(BaseInput,Object.assign({type:"text",name:"gift_card_or_coupon_code",ref:n,required:e!==undefined?e:true,placeholder:t,defaultValue:r},p),void 0)};GiftCardOrCouponInput.propTypes=propTypes;GiftCardOrCouponInput.displayName=displayName;export default GiftCardOrCouponInput;
@@ -0,0 +1,16 @@
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import { FunctionChildren } from '../typings/index';
3
+ import { CodeType, OrderCodeType } from '../reducers/OrderReducer';
4
+ declare type GiftCardOrCouponRemoveButtonChildrenProps = FunctionChildren<Omit<GiftCardOrCouponRemoveButtonProps, 'children'> & {
5
+ codeType?: OrderCodeType;
6
+ hide?: boolean;
7
+ handleClick?: () => void;
8
+ }>;
9
+ declare type GiftCardOrCouponRemoveButtonProps = {
10
+ type?: CodeType;
11
+ children?: GiftCardOrCouponRemoveButtonChildrenProps;
12
+ label?: string | ReactNode;
13
+ onClick?: () => void;
14
+ } & Omit<JSX.IntrinsicElements['button'], 'type'>;
15
+ declare const GiftCardOrCouponRemoveButton: FunctionComponent<GiftCardOrCouponRemoveButtonProps>;
16
+ export default GiftCardOrCouponRemoveButton;
@@ -0,0 +1 @@
1
+ import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import Parent from"./utils/Parent";import components from"../config/components";import OrderContext from"../context/OrderContext";import{has,isEmpty}from"lodash";const propTypes=components.GiftCardOrCouponRemoveButton.propTypes;const displayName=components.GiftCardOrCouponRemoveButton.displayName;const GiftCardOrCouponRemoveButton=o=>{const{children:e,label:t="Remove",onClick:n,type:r}=o,s=__rest(o,["children","label","onClick","type"]);const{order:p,removeGiftCardOrCouponCode:i}=useContext(OrderContext);let c=`${r}Code`;if(!r&&p&&has(p,"couponCode")&&!isEmpty(p.coupon_code))c="coupon_code";else if(!r)c="gift_card_code";const a=p&&c?p[c]:"";const d=p&&a?false:true;const m=()=>{i&&i({codeType:c});n&&n()};const l=Object.assign(Object.assign({},s),{label:t,handleClick:m,codeType:c});return e?_jsx(Parent,Object.assign({},l,{children:e}),void 0):d?null:_jsx("button",Object.assign({type:"button",onClick:m},s,{children:t}),void 0)};GiftCardOrCouponRemoveButton.propTypes=propTypes;GiftCardOrCouponRemoveButton.displayName=displayName;export default GiftCardOrCouponRemoveButton;
@@ -0,0 +1,9 @@
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import { FunctionChildren } from '../typings/index';
3
+ declare type GiftCardOrCouponSubmitChildrenProps = FunctionChildren<Omit<GiftCardOrCouponSubmitProps, 'children'>>;
4
+ declare type GiftCardOrCouponSubmitProps = {
5
+ children?: GiftCardOrCouponSubmitChildrenProps;
6
+ label?: string | ReactNode;
7
+ } & JSX.IntrinsicElements['button'];
8
+ declare const GiftCardOrCouponSubmit: FunctionComponent<GiftCardOrCouponSubmitProps>;
9
+ export default GiftCardOrCouponSubmit;
@@ -0,0 +1 @@
1
+ import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import Parent from"./utils/Parent";import components from"../config/components";const propTypes=components.GiftCardOrCouponSubmit.propTypes;const displayName=components.GiftCardOrCouponSubmit.displayName;const GiftCardOrCouponSubmit=t=>{const{children:o,label:r="Submit"}=t,i=__rest(t,["children","label"]);const s=Object.assign(Object.assign({},i),{label:r});return o?_jsx(Parent,Object.assign({},s,{children:o}),void 0):_jsx("button",Object.assign({type:"submit"},i,{children:r}),void 0)};GiftCardOrCouponSubmit.propTypes=propTypes;GiftCardOrCouponSubmit.displayName=displayName;export default GiftCardOrCouponSubmit;
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,11 @@
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ declare type ItemContainerProps = {
3
+ children: ReactNode;
4
+ skuCode?: string | null;
5
+ lineItem?: {
6
+ name: string;
7
+ imageUrl?: string | null;
8
+ } | null;
9
+ };
10
+ declare const ItemContainer: FunctionComponent<ItemContainerProps>;
11
+ export default ItemContainer;
@@ -0,0 +1 @@
1
+ import{jsx as _jsx}from"react/jsx-runtime";import{useReducer,useEffect}from"react";import ItemContext,{initialItemContext}from"../context/ItemContext";import itemReducer,{itemInitialState,setItemState}from"../reducers/ItemReducer";import components from"../config/components";const propTypes=components.ItemContainer.propTypes;const displayName=components.ItemContainer.displayName;const ItemContainer=t=>{const{children:e,skuCode:s,lineItem:n}=t;const[o,m]=useReducer(itemReducer,itemInitialState);useEffect((()=>{if(s){setItemState(s,{type:"setSkuCode",key:"skuCode"},m)}if(n){setItemState(n,{type:"setCustomLineItem",key:"lineItem"},m)}}),[]);const i=t=>setItemState(t,{type:"setItems",key:"items"},m);const a=t=>setItemState(t,{type:"setItem",key:"item"},m);const r=t=>setItemState(t,{type:"setQuantity",key:"quantity"},m);const p=t=>setItemState(t,{type:"setOption",key:"option"},m);const c=t=>setItemState(t,{type:"setPrices",key:"prices"},m);const I=t=>setItemState(t,{type:"setCustomLineItems",key:"lineItems"},m);const y=Object.assign(Object.assign(Object.assign({},initialItemContext),o),{setItems:i,setItem:a,setQuantity:r,setOption:p,setPrices:c,setCustomLineItems:I});return _jsx(ItemContext.Provider,Object.assign({value:y},{children:e}),void 0)};ItemContainer.propTypes=propTypes;ItemContainer.displayName=displayName;export default ItemContainer;
@@ -0,0 +1,8 @@
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import { LineItemType } from '../typings/index';
3
+ declare type LineItemProps = {
4
+ children: ReactNode;
5
+ type?: LineItemType;
6
+ };
7
+ declare const LineItem: FunctionComponent<LineItemProps>;
8
+ export default LineItem;
@@ -0,0 +1 @@
1
+ import{jsx as _jsx}from"react/jsx-runtime";import{Fragment,useContext}from"react";import LineItemContext from"../context/LineItemContext";import LineItemChildrenContext from"../context/LineItemChildrenContext";import components from"../config/components";import ShipmentChildrenContext from"../context/ShipmentChildrenContext";import{isEmpty}from"lodash";const propTypes=components.LineItem.propTypes;const displayName=components.LineItem.displayName;const LineItem=e=>{const{type:t="skus",children:n}=e;const{lineItems:o}=useContext(LineItemContext);const{lineItems:i}=useContext(ShipmentChildrenContext);const m=isEmpty(i)?o:i;const r=m&&m.filter((e=>e.item_type===t)).map(((e,t)=>{const o={lineItem:e};return _jsx(LineItemChildrenContext.Provider,Object.assign({value:o},{children:n}),t)}));return _jsx(Fragment,{children:r},void 0)};LineItem.propTypes=propTypes;LineItem.displayName=displayName;export default LineItem;
@@ -0,0 +1,7 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseAmountComponent, BasePriceType } from '../typings/index';
3
+ export declare type LineItemAmountProps = BaseAmountComponent & {
4
+ type?: BasePriceType;
5
+ };
6
+ declare const LineItemAmount: FunctionComponent<LineItemAmountProps>;
7
+ export default LineItemAmount;
@@ -0,0 +1 @@
1
+ import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useState,useEffect,useContext}from"react";import getAmount from"../utils/getAmount";import LineItemChildrenContext from"../context/LineItemChildrenContext";import Parent from"./utils/Parent";import components from"../config/components";const propTypes=components.LineItemAmount.propTypes;const defaultProps=components.LineItemAmount.defaultProps;const displayName=components.LineItemAmount.displayName;const LineItemAmount=t=>{const{format:e="formatted",type:o="total"}=t,n=__rest(t,["format","type"]);const{lineItem:m}=useContext(LineItemChildrenContext);const[s,r]=useState("");useEffect((()=>{if(m){const t=getAmount({base:"amount",type:o,format:e,obj:m});r(t)}return()=>{r("")}}),[m]);const i=Object.assign({price:s},n);return t.children?_jsx(Parent,Object.assign({},i,{children:t.children}),void 0):_jsx("span",Object.assign({},n,{children:s}),void 0)};LineItemAmount.propTypes=propTypes;LineItemAmount.defaultProps=defaultProps;LineItemAmount.displayName=displayName;export default LineItemAmount;
@@ -0,0 +1,8 @@
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ declare type LineItemNameChildrenProps = Omit<LineItemNameProps, 'children'>;
3
+ declare type LineItemNameProps = {
4
+ children?: (props: LineItemNameChildrenProps) => ReactNode;
5
+ type?: 'sku_code' | 'bundle_code';
6
+ } & JSX.IntrinsicElements['p'];
7
+ declare const LineItemCode: FunctionComponent<LineItemNameProps>;
8
+ export default LineItemCode;
@@ -0,0 +1 @@
1
+ import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import LineItemChildrenContext from"../context/LineItemChildrenContext";import Parent from"./utils/Parent";import components from"../config/components";const propTypes=components.LineItemCode.propTypes;const displayName=components.LineItemCode.displayName;const LineItemCode=e=>{var{type:t="sku_code",children:o}=e,n=__rest(e,["type","children"]);const{lineItem:i}=useContext(LineItemChildrenContext);const s=i===null||i===void 0?void 0:i[t];const r=Object.assign({},n);return o?_jsx(Parent,Object.assign({},r,{children:o}),void 0):_jsx("p",Object.assign({},n,{children:s}),void 0)};LineItemCode.propTypes=propTypes;LineItemCode.displayName=displayName;export default LineItemCode;
@@ -0,0 +1,10 @@
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ declare type LineItemChildrenProps = Omit<LineItemImageProps, 'children'> & {
3
+ src: string;
4
+ };
5
+ declare type LineItemImageProps = {
6
+ children?: (props: LineItemChildrenProps) => ReactNode;
7
+ width?: number;
8
+ } & Omit<JSX.IntrinsicElements['img'], 'src' | 'srcSet'>;
9
+ declare const LineItemImage: FunctionComponent<LineItemImageProps>;
10
+ export default LineItemImage;
@@ -0,0 +1 @@
1
+ import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import Parent from"./utils/Parent";import LineItemChildrenContext from"../context/LineItemChildrenContext";import components from"../config/components";const propTypes=components.LineItemImage.propTypes;const displayName=components.LineItemImage.displayName;const LineItemImage=e=>{const{lineItem:t}=useContext(LineItemChildrenContext);const n=t===null||t===void 0?void 0:t.image_url;const o=Object.assign({src:n},e);return e.children?_jsx(Parent,Object.assign({},o,{children:e.children}),void 0):_jsx("img",Object.assign({alt:"",src:n},e),void 0)};LineItemImage.propTypes=propTypes;LineItemImage.displayName=displayName;export default LineItemImage;
@@ -0,0 +1,9 @@
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ declare type LineItemNameChildrenProps = Omit<LineItemNameProps, 'children'> & {
3
+ label: string;
4
+ };
5
+ declare type LineItemNameProps = {
6
+ children?: (props: LineItemNameChildrenProps) => ReactNode;
7
+ } & JSX.IntrinsicElements['p'];
8
+ declare const LineItemName: FunctionComponent<LineItemNameProps>;
9
+ export default LineItemName;
@@ -0,0 +1 @@
1
+ import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import LineItemChildrenContext from"../context/LineItemChildrenContext";import Parent from"./utils/Parent";import components from"../config/components";const propTypes=components.LineItemName.propTypes;const displayName=components.LineItemName.displayName;const LineItemName=e=>{const{lineItem:t}=useContext(LineItemChildrenContext);const n=t===null||t===void 0?void 0:t["name"];const o=Object.assign({label:n},e);return e.children?_jsx(Parent,Object.assign({},o,{children:e.children}),void 0):_jsx("p",Object.assign({},e,{children:n}),void 0)};LineItemName.propTypes=propTypes;LineItemName.displayName=displayName;export default LineItemName;
@@ -0,0 +1,19 @@
1
+ import { FunctionComponent, CSSProperties } from 'react';
2
+ import { LineItemOption as LineItemOptionType } from '@commercelayer/sdk';
3
+ import { FunctionChildren } from '../typings/index';
4
+ declare type LineItemOptionChildrenProps = FunctionChildren<Omit<LineItemOptionProps, 'children'> & {
5
+ lineItemOption: LineItemOptionType;
6
+ }>;
7
+ declare type LineItemOptionProps = {
8
+ id?: string;
9
+ className?: string;
10
+ key?: string;
11
+ style?: CSSProperties;
12
+ children?: LineItemOptionChildrenProps;
13
+ name?: string;
14
+ valueClassName?: string;
15
+ tagElement?: keyof JSX.IntrinsicElements;
16
+ tagContainer?: keyof JSX.IntrinsicElements;
17
+ };
18
+ declare const LineItemOption: FunctionComponent<LineItemOptionProps>;
19
+ export default LineItemOption;
@@ -0,0 +1 @@
1
+ import{__rest}from"tslib";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{useContext}from"react";import LineItemOptionChildrenContext from"../context/LineItemOptionChildrenContext";import get from"lodash/get";import has from"lodash/has";import map from"lodash/map";import Parent from"./utils/Parent";import components from"../config/components";import isJSON from"../utils/isJSON";const propTypes=components.LineItemOption.propTypes;const displayName=components.LineItemOption.displayName;const LineItemOption=t=>{const{name:e,children:n,valueClassName:s,id:i,key:o,tagElement:a="li",tagContainer:m="ul"}=t,p=__rest(t,["name","children","valueClassName","id","key","tagElement","tagContainer"]);const{lineItemOption:r,showAll:l}=useContext(LineItemOptionChildrenContext);const c=Object.assign(Object.assign({},t),{lineItemOption:r});const d=a;const O=m;const h=l&&isJSON(JSON.stringify(r===null||r===void 0?void 0:r.options))?map(r===null||r===void 0?void 0:r.options,((t,e)=>_jsxs(d,Object.assign({},p,{children:[`${e}:`,_jsx("span",Object.assign({className:s},{children:`${t}`}),void 0)]}),e))):has(r,`options.${e}`)?_jsxs(d,Object.assign({},p,{children:[`${e}:`,_jsx("span",Object.assign({className:s},p,{children:`${get(r,`options.${e}`)}`}),void 0)]}),o):null;return n?_jsx(Parent,Object.assign({},c,{children:t.children}),void 0):_jsx(O,{children:h},void 0)};LineItemOption.propTypes=propTypes;LineItemOption.displayName=displayName;export default LineItemOption;
@@ -0,0 +1,14 @@
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ export declare type LineItemOptionsProps = JSX.IntrinsicElements['span'] & {
3
+ children: ReactNode;
4
+ title?: string;
5
+ showName?: boolean;
6
+ } & ({
7
+ skuOptionId: string;
8
+ showAll?: never;
9
+ } | {
10
+ skuOptionId?: never;
11
+ showAll: true;
12
+ });
13
+ declare const LineItemOptions: FunctionComponent<LineItemOptionsProps>;
14
+ export default LineItemOptions;
@@ -0,0 +1 @@
1
+ import{__rest}from"tslib";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{useContext,Fragment}from"react";import LineItemChildrenContext from"../context/LineItemChildrenContext";import LineItemOptionChildrenContext from"../context/LineItemOptionChildrenContext";import{isEmpty}from"lodash";import components from"../config/components";const displayName=components.LineItemOptions.displayName;const LineItemOptions=t=>{const{skuOptionId:e,title:n,children:i,showName:o=true,showAll:s}=t,r=__rest(t,["skuOptionId","title","children","showName","showAll"]);const{lineItem:m}=useContext(LineItemChildrenContext);const l=!isEmpty(m)?(m===null||m===void 0?void 0:m["line_item_options"])||[]:[];const p=l.filter((t=>{if(s)return true;return t.skuOption().id===e})).map(((t,e)=>{const m=o?_jsx("span",Object.assign({},r,{children:n||t.name}),void 0):null;const l={lineItemOption:t,showAll:s};return _jsxs(Fragment,{children:[m,_jsx(LineItemOptionChildrenContext.Provider,Object.assign({value:l},{children:i}),void 0)]},e)}));return _jsx(Fragment,{children:p},void 0)};LineItemOptions.displayName=displayName;export default LineItemOptions;
@@ -0,0 +1,14 @@
1
+ import React, { FunctionComponent } from 'react';
2
+ import { FunctionChildren } from '../typings/index';
3
+ declare type LineItemQuantityChildrenProps = FunctionChildren<Omit<LineItemQuantityProps, 'children'> & {
4
+ quantity: number;
5
+ handleChange: (event: React.MouseEvent<HTMLSelectElement>) => void;
6
+ }>;
7
+ declare type LineItemQuantityProps = {
8
+ children?: LineItemQuantityChildrenProps;
9
+ max?: number;
10
+ disabled?: boolean;
11
+ readonly?: boolean;
12
+ } & (JSX.IntrinsicElements['select'] & JSX.IntrinsicElements['span']);
13
+ declare const LineItemQuantity: FunctionComponent<LineItemQuantityProps>;
14
+ export default LineItemQuantity;
@@ -0,0 +1 @@
1
+ import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import LineItemChildrenContext from"../context/LineItemChildrenContext";import LineItemContext from"../context/LineItemContext";import Parent from"./utils/Parent";import components from"../config/components";const propTypes=components.LineItemQuantity.propTypes;const defaultProps=components.LineItemQuantity.defaultProps;const displayName=components.LineItemQuantity.displayName;const LineItemQuantity=t=>{const{max:e=50,readonly:n=false}=t,o=__rest(t,["max","readonly"]);const{lineItem:i}=useContext(LineItemChildrenContext);const{updateLineItem:s}=useContext(LineItemContext);const a=[];for(let t=1;t<=e;t++){a.push(_jsx("option",Object.assign({value:`${t}`},{children:t}),t))}const r=t=>{const e=Number(t.target.value);s&&i&&s(i["id"],e)};const m=i===null||i===void 0?void 0:i["quantity"];const p=Object.assign({handleChange:r,quantity:m},t);return t.children?_jsx(Parent,Object.assign({},p,{children:t.children}),void 0):n?_jsx("span",Object.assign({},o,{children:m}),void 0):_jsx("select",Object.assign({title:i===null||i===void 0?void 0:i.name,value:m,onChange:r},o,{children:a}),void 0)};LineItemQuantity.propTypes=propTypes;LineItemQuantity.defaultProps=defaultProps;LineItemQuantity.displayName=displayName;export default LineItemQuantity;
@@ -0,0 +1,12 @@
1
+ import React, { FunctionComponent, PropsWithoutRef } from 'react';
2
+ import { FunctionChildren } from '../typings/index';
3
+ declare type ChildrenLineItemRemoveLinkProps = FunctionChildren<{
4
+ handleRemove: (event: React.MouseEvent<HTMLAnchorElement>) => void;
5
+ label?: string;
6
+ }>;
7
+ declare type LineItemRemoveLinkProps = {
8
+ children?: ChildrenLineItemRemoveLinkProps;
9
+ label?: string;
10
+ } & PropsWithoutRef<JSX.IntrinsicElements['a']>;
11
+ declare const LineItemRemoveLink: FunctionComponent<LineItemRemoveLinkProps>;
12
+ export default LineItemRemoveLink;
@@ -0,0 +1 @@
1
+ import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import LineItemChildrenContext from"../context/LineItemChildrenContext";import LineItemContext from"../context/LineItemContext";import Parent from"./utils/Parent";import components from"../config/components";const propTypes=components.LineItemRemoveLink.propTypes;const defaultProps=components.LineItemRemoveLink.defaultProps;const displayName=components.LineItemRemoveLink.displayName;const LineItemRemoveLink=e=>{const{label:t="Remove"}=e;const{lineItem:n}=useContext(LineItemChildrenContext);const{deleteLineItem:o}=useContext(LineItemContext);const i=e=>{e.preventDefault();o&&n&&o(n["id"])};const m=Object.assign({handleRemove:i},e);return e.children?_jsx(Parent,Object.assign({},m,{children:e.children}),void 0):_jsx("a",Object.assign({},e,{href:"#",onClick:i},{children:t}),void 0)};LineItemRemoveLink.propTypes=propTypes;LineItemRemoveLink.defaultProps=defaultProps;LineItemRemoveLink.displayName=displayName;export default LineItemRemoveLink;
@@ -0,0 +1,8 @@
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ declare type LineItemsContainer = {
3
+ children: ReactNode;
4
+ filters?: Record<string, any>;
5
+ loader?: ReactNode;
6
+ };
7
+ declare const LineItemsContainer: FunctionComponent<LineItemsContainer>;
8
+ export default LineItemsContainer;
@@ -0,0 +1 @@
1
+ import{jsx as _jsx}from"react/jsx-runtime";import{useEffect,useReducer,useContext}from"react";import lineItemReducer,{lineItemInitialState,updateLineItem,deleteLineItem}from"../reducers/LineItemReducer";import OrderContext from"../context/OrderContext";import LineItemContext from"../context/LineItemContext";import CommerceLayerContext from"../context/CommerceLayerContext";import{isEmpty}from"lodash";import components from"../config/components";const propTypes=components.LineItemsContainer.propTypes;const defaultProps=components.LineItemsContainer.defaultProps;const displayName=components.LineItemsContainer.displayName;const LineItemsContainer=e=>{const{children:t,loader:n="Loading..."}=e;const{order:o,addResourceToInclude:i,include:r,orderId:s,getOrder:m}=useContext(OrderContext);const d=useContext(CommerceLayerContext);const[a,p]=useReducer(lineItemReducer,lineItemInitialState);useEffect((()=>{if(!(r===null||r===void 0?void 0:r.includes("line_items.line_item_options.sku_option"))){i({newResource:"line_items.line_item_options.sku_option"})}if(!isEmpty(o)&&(o===null||o===void 0?void 0:o.line_items)){p({type:"setLineItems",payload:{lineItems:o.line_items}})}return()=>{if(isEmpty(o)){p({type:"setLineItems",payload:{lineItems:[]}})}}}),[o]);const c=Object.assign(Object.assign({},a),{loader:n,updateLineItem:(e,t=1)=>updateLineItem({lineItemId:e,quantity:t,dispatch:p,config:d,getOrder:m,orderId:s,errors:a.errors}),deleteLineItem:e=>deleteLineItem({lineItemId:e,dispatch:p,config:d,getOrder:m,orderId:s,errors:a.errors})});return _jsx(LineItemContext.Provider,Object.assign({value:c},{children:a.loading?n:t}),void 0)};LineItemsContainer.propTypes=propTypes;LineItemsContainer.defaultProps=defaultProps;LineItemsContainer.displayName=displayName;export default LineItemsContainer;
@@ -0,0 +1,10 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { FunctionChildren } from '../typings/index';
3
+ declare type LineItemsCountChildrenProps = FunctionChildren<Omit<LineItemsCountProps, 'children'> & {
4
+ quantity: number;
5
+ }>;
6
+ declare type LineItemsCountProps = {
7
+ children?: LineItemsCountChildrenProps;
8
+ } & JSX.IntrinsicElements['span'];
9
+ declare const LineItemsCount: FunctionComponent<LineItemsCountProps>;
10
+ export default LineItemsCount;
@@ -0,0 +1 @@
1
+ import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext,useState,useEffect}from"react";import Parent from"./utils/Parent";import getLineItemsCount from"../utils/getLineItemsCount";import{isEmpty}from"lodash";import LineItemContext from"../context/LineItemContext";import components from"../config/components";const propTypes=components.LineItemsCount.propTypes;const displayName=components.LineItemsCount.displayName;const LineItemsCount=t=>{const{children:e}=t,n=__rest(t,["children"]);const{lineItems:s}=useContext(LineItemContext);const[o,i]=useState(0);useEffect((()=>{if(!isEmpty(s)){const t=getLineItemsCount(s||[]);i(t)}return()=>{i(0)}}),[s]);const m=Object.assign({quantity:o},n);return e?_jsx(Parent,Object.assign({},m,{children:e}),void 0):_jsx("span",Object.assign({},n,{children:o}),void 0)};LineItemsCount.propTypes=propTypes;LineItemsCount.displayName=displayName;export default LineItemsCount;
@@ -0,0 +1,5 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseInputComponentProps } from '../typings/index';
3
+ export declare type MetadataInputProps = BaseInputComponentProps & JSX.IntrinsicElements['input'] & JSX.IntrinsicElements['textarea'];
4
+ declare const MetadataInput: FunctionComponent<MetadataInputProps>;
5
+ export default MetadataInput;
@@ -0,0 +1 @@
1
+ import{jsx as _jsx}from"react/jsx-runtime";import BaseInput from"./utils/BaseInput";import components from"../config/components";const propTypes=components.MetadataInput.propTypes;const displayName=components.MetadataInput.displayName;const MetadataInput=t=>_jsx(BaseInput,Object.assign({"data-metadata":true},t),void 0);MetadataInput.propTypes=propTypes;MetadataInput.displayName=displayName;export default MetadataInput;
@@ -0,0 +1,11 @@
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import { BaseMetadataObject } from '../typings/index';
3
+ import { OrderCreate } from '@commercelayer/sdk';
4
+ declare type OrderContainerProps = {
5
+ children: ReactNode;
6
+ metadata?: BaseMetadataObject;
7
+ attributes?: OrderCreate;
8
+ orderId?: string;
9
+ };
10
+ declare const OrderContainer: FunctionComponent<OrderContainerProps>;
11
+ export default OrderContainer;
@@ -0,0 +1 @@
1
+ import{jsx as _jsx}from"react/jsx-runtime";import{useEffect,useReducer,useContext,useMemo}from"react";import orderReducer,{createOrder,getApiOrder,setOrderErrors,setOrder,orderInitialState}from"../reducers/OrderReducer";import CommerceLayerContext from"../context/CommerceLayerContext";import OrderContext,{defaultOrderContext}from"../context/OrderContext";import{unsetOrderState}from"../reducers/OrderReducer";import components from"../config/components";import OrderStorageContext from"../context/OrderStorageContext";const propTypes=components.OrderContainer.propTypes;const defaultProps=components.OrderContainer.defaultProps;const displayName=components.OrderContainer.displayName;const OrderContainer=e=>{const{orderId:r,children:t,metadata:o,attributes:d}=e;const[s,a]=useReducer(orderReducer,orderInitialState);const n=useContext(CommerceLayerContext);const{persistKey:c,clearWhenPlaced:i,getLocalOrder:p,setLocalOrder:O,deleteLocalOrder:u}=useContext(OrderStorageContext);useEffect((()=>{if(n.accessToken){const e=c?p(c):r;if(e){a({type:"setOrderId",payload:{orderId:e}});if(!s.order){getApiOrder({id:e,dispatch:a,config:n,persistKey:c,clearWhenPlaced:i,deleteLocalOrder:u,state:s})}}}return()=>unsetOrderState(a)}),[n.accessToken,r]);const C=useMemo((()=>Object.assign(Object.assign({},s),{setOrder:e=>setOrder(e,a),getOrder:e=>getApiOrder({id:e,dispatch:a,config:n,state:s}),setOrderErrors:e=>setOrderErrors({dispatch:a,errors:e}),createOrder:async()=>await createOrder({persistKey:c,dispatch:a,config:n,state:s,orderMetadata:o,orderAttributes:d}),addToCart:e=>defaultOrderContext["addToCart"](Object.assign(Object.assign({},e),{persistKey:c,dispatch:a,state:s,config:n,errors:s.errors,orderMetadata:o||{},orderAttributes:d,setLocalOrder:O})),saveAddressToCustomerAddressBook:e=>defaultOrderContext["saveAddressToCustomerAddressBook"](Object.assign(Object.assign({},e),{dispatch:a})),setGiftCardOrCouponCode:({code:e})=>defaultOrderContext["setGiftCardOrCouponCode"]({code:e,dispatch:a,order:s.order,config:n}),removeGiftCardOrCouponCode:({codeType:e})=>defaultOrderContext["removeGiftCardOrCouponCode"]({codeType:e,dispatch:a,order:s.order,config:n}),addResourceToInclude:e=>defaultOrderContext["addResourceToInclude"](Object.assign(Object.assign({},e),{dispatch:a,resourcesIncluded:s.include})),updateOrder:async e=>await defaultOrderContext["updateOrder"](Object.assign(Object.assign({},e),{dispatch:a,config:n,include:s.include}))})),[s]);return _jsx(OrderContext.Provider,Object.assign({value:C},{children:t}),void 0)};OrderContainer.propTypes=propTypes;OrderContainer.defaultProps=defaultProps;OrderContainer.displayName=displayName;export default OrderContainer;
@@ -0,0 +1,5 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseFieldProps } from './utils/BaseField';
3
+ export declare type OrderNumberProps = Omit<BaseFieldProps, 'attribute'>;
4
+ declare const OrderNumber: FunctionComponent<OrderNumberProps>;
5
+ export default OrderNumber;
@@ -0,0 +1 @@
1
+ import{jsx as _jsx}from"react/jsx-runtime";import components from"../config/components";import BaseField from"./utils/BaseField";const propTypes=components.OrderNumber.propTypes;const displayName=components.OrderNumber.displayName;const OrderNumber=e=>_jsx(BaseField,Object.assign({attribute:"number"},e),void 0);OrderNumber.propTypes=propTypes;OrderNumber.displayName=displayName;export default OrderNumber;
@@ -0,0 +1,8 @@
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ declare type OrderStorageProps = {
3
+ children: ReactNode;
4
+ persistKey: string;
5
+ clearWhenPlaced?: boolean;
6
+ };
7
+ declare const OrderStorage: FunctionComponent<OrderStorageProps>;
8
+ export default OrderStorage;
@@ -0,0 +1 @@
1
+ import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import OrderStorageContext from"../context/OrderStorageContext";import components from"../config/components";import{getLocalOrder,setLocalOrder,deleteLocalOrder}from"../utils/localStorage";const propTypes=components.OrderStorage.propTypes;const displayName=components.OrderStorage.displayName;const OrderStorage=e=>{const{children:r,clearWhenPlaced:o=true}=e,t=__rest(e,["children","clearWhenPlaced"]);return _jsx(OrderStorageContext.Provider,Object.assign({value:Object.assign(Object.assign({},t),{setLocalOrder:setLocalOrder,getLocalOrder:getLocalOrder,deleteLocalOrder:deleteLocalOrder,clearWhenPlaced:o})},{children:r}),void 0)};OrderStorage.propTypes=propTypes;OrderStorage.displayName=displayName;export default OrderStorage;
@@ -0,0 +1,16 @@
1
+ import { LoaderType } from '../typings/index';
2
+ import { FunctionComponent } from 'react';
3
+ import { PaymentSourceProps } from './PaymentSource';
4
+ export declare type GatewayBaseType = PaymentGatewayProps & {
5
+ show: boolean;
6
+ loading: boolean;
7
+ loaderComponent: JSX.Element;
8
+ };
9
+ export declare type PaymentGatewayProps = PaymentSourceProps & {
10
+ showCard: boolean;
11
+ handleEditClick: (e: MouseEvent) => void;
12
+ show: boolean;
13
+ loader?: LoaderType;
14
+ };
15
+ declare const PaymentGateway: FunctionComponent<PaymentGatewayProps>;
16
+ export default PaymentGateway;
@@ -0,0 +1 @@
1
+ import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import OrderContext from"../context/OrderContext";import PaymentMethodChildrenContext from"../context/PaymentMethodChildrenContext";import PaymentMethodContext from"../context/PaymentMethodContext";import getPaypalConfig from"../utils/paypalPayment";import{useContext,useEffect,useState}from"react";import getLoaderComponent from"../utils/getLoaderComponent";import AdyenGateway from"./gateways/AdyenGateway";import StripeGateway from"./gateways/StripeGateway";import BraintreeGateway from"./gateways/BraintreeGateway";import PaypalGateway from"./gateways/PaypalGateway";import WireTransferGateway from"./gateways/WireTransferGateway";import CustomerContext from"../context/CustomerContext";const PaymentGateway=e=>{var t;var{readonly:a,showCard:o,handleEditClick:r,children:n,templateCustomerCards:s,templateCustomerSaveToWallet:i,onClickCustomerCards:m,show:d,loader:y="Loading..."}=e,l=__rest(e,["readonly","showCard","handleEditClick","children","templateCustomerCards","templateCustomerSaveToWallet","onClickCustomerCards","show","loader"]);const p=getLoaderComponent(y);const[c,C]=useState(true);const{payment:u}=useContext(PaymentMethodChildrenContext);const{order:h}=useContext(OrderContext);const{getCustomerPaymentSources:f}=useContext(CustomerContext);const{currentPaymentMethodId:w,config:x,paymentSource:_,currentPaymentMethodType:v,setPaymentSource:g}=useContext(PaymentMethodContext);const P=a?v:u===null||u===void 0?void 0:u.payment_source_type;useEffect((()=>{var e;if((u===null||u===void 0?void 0:u.id)===w&&P&&((e=h===null||h===void 0?void 0:h.payment_method)===null||e===void 0?void 0:e.payment_source_type)===P){const e=x&&P==="paypal_payments"?getPaypalConfig(P,x):{};if(!_||_.type!==P){g({paymentResource:P,order:h,attributes:e});f&&f()}C(false)}return()=>{C(true)}}),[(t=h===null||h===void 0?void 0:h.payment_method)===null||t===void 0?void 0:t.payment_source_type,d,_]);const G=Object.assign({readonly:a,showCard:o,handleEditClick:r,children:n,templateCustomerCards:s,show:d,loading:c,onClickCustomerCards:m,loaderComponent:p,templateCustomerSaveToWallet:i},l);switch(P){case"stripe_payments":return _jsx(StripeGateway,Object.assign({},G,{children:n}),void 0);case"adyen_payments":return _jsx(AdyenGateway,Object.assign({},G,{children:n}),void 0);case"braintree_payments":return _jsx(BraintreeGateway,Object.assign({},G,{children:n}),void 0);case"wire_transfers":return _jsx(WireTransferGateway,Object.assign({},G,{children:n}),void 0);case"paypal_payments":return _jsx(PaypalGateway,Object.assign({},G,{children:n}),void 0);default:return null}};export default PaymentGateway;
@@ -0,0 +1,16 @@
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import { LoaderType } from '../typings/index';
3
+ import { PaymentMethod as PaymentMethodType } from '@commercelayer/sdk';
4
+ declare type PaymentMethodProps = {
5
+ children: ReactNode;
6
+ activeClass?: string;
7
+ loader?: LoaderType;
8
+ } & Omit<JSX.IntrinsicElements['div'], 'onClick'> & ({
9
+ clickableContainer: true;
10
+ onClick?: (payment?: PaymentMethodType | Record<string, any>) => void;
11
+ } | {
12
+ clickableContainer?: never;
13
+ onClick?: never;
14
+ });
15
+ declare const PaymentMethod: FunctionComponent<PaymentMethodProps>;
16
+ export default PaymentMethod;
@@ -0,0 +1 @@
1
+ import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment,useContext,useState,useEffect}from"react";import PaymentMethodContext from"../context/PaymentMethodContext";import PaymentMethodChildrenContext from"../context/PaymentMethodChildrenContext";import components from"../config/components";import getLoaderComponent from"../utils/getLoaderComponent";const propTypes=components.PaymentMethod.propTypes;const displayName=components.PaymentMethod.displayName;const PaymentMethod=e=>{var{children:t,className:o,activeClass:n,loader:a="Loading...",clickableContainer:s,onClick:r}=e,i=__rest(e,["children","className","activeClass","loader","clickableContainer","onClick"]);const[d,m]=useState(true);const[c,l]=useState("");const{paymentMethods:p,currentPaymentMethodId:y,setPaymentMethod:h,setLoading:u}=useContext(PaymentMethodContext);useEffect((()=>{if(p)m(false);if(y)l(y);return()=>{m(true)}}),[p,y]);const C=p&&p.map(((e,a)=>{const d=y===(e===null||e===void 0?void 0:e.id);const m={payment:e,clickableContainer:s,paymentSelected:c,setPaymentSelected:l};const p=!s?undefined:async t=>{t.stopPropagation();u({loading:true});l(e.id);const o=e===null||e===void 0?void 0:e.payment_source_type;const n=e===null||e===void 0?void 0:e.id;await h({paymentResource:o,paymentMethodId:n});r&&r(e);u({loading:false})};return _jsx("div",Object.assign({className:`${o} ${d?n:""}`,onClick:p},i,{children:_jsx(PaymentMethodChildrenContext.Provider,Object.assign({value:m},{children:t}),void 0)}),a)}));return!d?_jsx(Fragment,{children:C},void 0):getLoaderComponent(a)};PaymentMethod.propTypes=propTypes;PaymentMethod.displayName=displayName;export default PaymentMethod;
@@ -0,0 +1,4 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseAmountComponent } from '../typings/index';
3
+ declare const PaymentMethodAmount: FunctionComponent<BaseAmountComponent>;
4
+ export default PaymentMethodAmount;
@@ -0,0 +1 @@
1
+ import{jsx as _jsx}from"react/jsx-runtime";import BaseOrderPrice from"./utils/BaseOrderPrice";import components from"../config/components";const propTypes=components.PaymentMethodAmount.propTypes;const defaultProps=components.PaymentMethodAmount.defaultProps;const displayName=components.PaymentMethodAmount.displayName;const PaymentMethodAmount=e=>_jsx(BaseOrderPrice,Object.assign({base:"amount",type:"paymentMethod"},e),void 0);PaymentMethodAmount.propTypes=propTypes;PaymentMethodAmount.defaultProps=defaultProps;PaymentMethodAmount.displayName=displayName;export default PaymentMethodAmount;
@@ -0,0 +1,9 @@
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ declare type PaymentMethodNameChildrenProps = Omit<PaymentMethodNameProps, 'children'> & {
3
+ labelName: string;
4
+ };
5
+ declare type PaymentMethodNameProps = {
6
+ children?: (props: PaymentMethodNameChildrenProps) => ReactNode;
7
+ } & JSX.IntrinsicElements['label'];
8
+ declare const PaymentMethodName: FunctionComponent<PaymentMethodNameProps>;
9
+ export default PaymentMethodName;
@@ -0,0 +1 @@
1
+ import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import PaymentMethodChildrenContext from"../context/PaymentMethodChildrenContext";import Parent from"./utils/Parent";import components from"../config/components";const propTypes=components.PaymentMethodName.propTypes;const displayName=components.PaymentMethodName.displayName;const PaymentMethodName=e=>{const{payment:t}=useContext(PaymentMethodChildrenContext);const o=t===null||t===void 0?void 0:t["name"];const n=t===null||t===void 0?void 0:t.payment_source_type;const m=Object.assign({htmlFor:n,labelName:o},e);return e.children?_jsx(Parent,Object.assign({},m,{children:e.children}),void 0):_jsx("label",Object.assign({htmlFor:n},e,{children:o}),void 0)};PaymentMethodName.propTypes=propTypes;PaymentMethodName.displayName=displayName;export default PaymentMethodName;
@@ -0,0 +1,9 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseAmountComponent } from '../typings/index';
3
+ declare type Props = {
4
+ type?: 'amount';
5
+ labelFree?: string;
6
+ };
7
+ export declare type PaymentMethodPriceProps = BaseAmountComponent & Props;
8
+ declare const PaymentMethodPrice: FunctionComponent<PaymentMethodPriceProps>;
9
+ export default PaymentMethodPrice;
@@ -0,0 +1 @@
1
+ import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useState,useEffect,useContext}from"react";import getAmount from"../utils/getAmount";import PaymentMethodChildrenContext from"../context/PaymentMethodChildrenContext";import Parent from"./utils/Parent";import components from"../config/components";const propTypes=components.PaymentMethodPrice.propTypes;const displayName=components.PaymentMethodPrice.displayName;const PaymentMethodPrice=e=>{const{format:t="formatted",type:o="amount",labelFree:n="Free"}=e,r=__rest(e,["format","type","labelFree"]);const{payment:s}=useContext(PaymentMethodChildrenContext);const[a,m]=useState("");const[i,c]=useState(0);useEffect((()=>{if(s){const e=getAmount({base:"price",type:o,format:t,obj:s});m(e);const n=getAmount({base:"price",type:o,format:"cents",obj:s});c(n)}return()=>{m("");c(0)}}),[s]);const p=Object.assign({labelFree:n,price:a,priceCents:i},r);return e.children?_jsx(Parent,Object.assign({},p,{children:e.children}),void 0):_jsx("span",Object.assign({},r,{children:i===0?n:a}),void 0)};PaymentMethodPrice.propTypes=propTypes;PaymentMethodPrice.displayName=displayName;export default PaymentMethodPrice;
@@ -0,0 +1,11 @@
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import { PaymentMethod } from '@commercelayer/sdk';
3
+ declare type ShippingMethodRadioButtonChildrenProps = Omit<ShippingMethodRadioButtonProps, 'children'> & {
4
+ checked: boolean;
5
+ };
6
+ declare type ShippingMethodRadioButtonProps = {
7
+ children?: (props: ShippingMethodRadioButtonChildrenProps) => ReactNode;
8
+ onChange?: (payment?: PaymentMethod | Record<string, any>) => void;
9
+ } & JSX.IntrinsicElements['input'];
10
+ declare const PaymentMethodRadioButton: FunctionComponent<ShippingMethodRadioButtonProps>;
11
+ export default PaymentMethodRadioButton;
@@ -0,0 +1 @@
1
+ import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import PaymentMethodChildrenContext from"../context/PaymentMethodChildrenContext";import Parent from"./utils/Parent";import components from"../config/components";import PaymentMethodContext from"../context/PaymentMethodContext";import OrderContext from"../context/OrderContext";const propTypes=components.PaymentMethodRadioButton.propTypes;const displayName=components.PaymentMethodRadioButton.displayName;const PaymentMethodRadioButton=t=>{const{onChange:e}=t,o=__rest(t,["onChange"]);const{payment:n,paymentSelected:a,setPaymentSelected:d,clickableContainer:i}=useContext(PaymentMethodChildrenContext);const{order:s}=useContext(OrderContext);const{setPaymentMethod:r,setLoading:m}=useContext(PaymentMethodContext);const c=(s===null||s===void 0?void 0:s.id)||"";const p=n===null||n===void 0?void 0:n.payment_source_type;const y=n===null||n===void 0?void 0:n.id;const l=`payment-${c}`;const h=a===(n===null||n===void 0?void 0:n.id);const u=async t=>{t.stopPropagation();d&&d(y);m({loading:true});!i&&await r({paymentResource:p,paymentMethodId:y});e&&e(n);m({loading:false})};const x=n===null||n===void 0?void 0:n.payment_source_type;const C=Object.assign({handleOnChange:u,checked:h,id:x,name:l},t);return t.children?_jsx(Parent,Object.assign({},C,{children:t.children}),void 0):_jsx("input",Object.assign({type:"radio",id:x,onChange:u,checked:h},o),void 0)};PaymentMethodRadioButton.propTypes=propTypes;PaymentMethodRadioButton.displayName=displayName;export default PaymentMethodRadioButton;
@@ -0,0 +1,8 @@
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import { PaymentMethodConfig } from '../reducers/PaymentMethodReducer';
3
+ declare type PaymentMethodsContainerProps = {
4
+ children: ReactNode;
5
+ config?: PaymentMethodConfig;
6
+ };
7
+ declare const PaymentMethodsContainer: FunctionComponent<PaymentMethodsContainerProps>;
8
+ export default PaymentMethodsContainer;
@@ -0,0 +1 @@
1
+ import{jsx as _jsx}from"react/jsx-runtime";import PaymentMethodContext,{defaultPaymentMethodContext}from"../context/PaymentMethodContext";import{useContext,useEffect,useReducer,useMemo}from"react";import paymentMethodReducer,{paymentMethodInitialState,getPaymentMethods,setPaymentMethodConfig}from"../reducers/PaymentMethodReducer";import OrderContext from"../context/OrderContext";import CommerceLayerContext from"../context/CommerceLayerContext";import components from"../config/components";import{isEmpty}from"lodash";import{setPaymentRef}from"../reducers/PaymentMethodReducer";const propTypes=components.PaymentMethodsContainer.propTypes;const displayName=components.PaymentMethodsContainer.displayName;const PaymentMethodsContainer=e=>{const{children:t,config:o}=e;const[n,a]=useReducer(paymentMethodReducer,paymentMethodInitialState);const{order:s,getOrder:r,setOrderErrors:d,include:m,addResourceToInclude:c,updateOrder:i}=useContext(OrderContext);const y=useContext(CommerceLayerContext);useEffect((()=>{if(!(m===null||m===void 0?void 0:m.includes("available_payment_methods"))){c({newResource:["available_payment_methods","payment_source","payment_method"]})}if(o&&isEmpty(n.config))setPaymentMethodConfig(o,a);if(y&&s&&!n.paymentMethods){getPaymentMethods({order:s,dispatch:a})}if(y&&(s===null||s===void 0?void 0:s.payment_source)){a({type:"setPaymentSource",payload:{paymentSource:s===null||s===void 0?void 0:s.payment_source}})}}),[s,y]);const p=useMemo((()=>Object.assign(Object.assign({},n),{setLoading:({loading:e})=>defaultPaymentMethodContext["setLoading"]({loading:e,dispatch:a}),setPaymentRef:({ref:e})=>setPaymentRef({ref:e,dispatch:a}),setPaymentMethodErrors:e=>defaultPaymentMethodContext["setPaymentMethodErrors"](e,a),setPaymentMethod:async e=>await defaultPaymentMethodContext["setPaymentMethod"](Object.assign(Object.assign({},e),{config:y,updateOrder:i,order:s,dispatch:a,setOrderErrors:d})),setPaymentSource:async e=>defaultPaymentMethodContext["setPaymentSource"](Object.assign(Object.assign(Object.assign({},n),e),{config:y,dispatch:a,getOrder:r,updateOrder:i,order:s})),updatePaymentSource:async e=>defaultPaymentMethodContext["updatePaymentSource"](Object.assign(Object.assign({},e),{config:y,dispatch:a})),destroyPaymentSource:async e=>defaultPaymentMethodContext["destroyPaymentSource"](Object.assign(Object.assign({},e),{dispatch:a,config:y}))})),[n]);return _jsx(PaymentMethodContext.Provider,Object.assign({value:p},{children:t}),void 0)};PaymentMethodsContainer.propTypes=propTypes;PaymentMethodsContainer.displayName=displayName;export default PaymentMethodsContainer;