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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (419) hide show
  1. package/{dist → lib}/components/AddToCartButton.d.ts +20 -17
  2. package/lib/components/AddToCartButton.js +1 -0
  3. package/{dist → lib}/components/Address.d.ts +13 -12
  4. package/lib/components/Address.js +1 -0
  5. package/{dist → lib}/components/AddressCountrySelector.d.ts +9 -9
  6. package/lib/components/AddressCountrySelector.js +1 -0
  7. package/lib/components/AddressField.d.ts +15 -0
  8. package/lib/components/AddressField.js +1 -0
  9. package/{dist → lib}/components/AddressInput.d.ts +7 -7
  10. package/lib/components/AddressInput.js +1 -0
  11. package/{dist → lib}/components/AddressStateSelector.d.ts +11 -11
  12. package/lib/components/AddressStateSelector.js +1 -0
  13. package/{dist → lib}/components/AddressesContainer.d.ts +7 -7
  14. package/lib/components/AddressesContainer.js +1 -0
  15. package/lib/components/AdjustmentAmount.d.ts +4 -0
  16. package/lib/components/AdjustmentAmount.js +1 -0
  17. package/lib/components/AdyenPayment.d.ts +25 -0
  18. package/lib/components/AdyenPayment.js +1 -0
  19. package/{dist → lib}/components/AvailabilityContainer.d.ts +7 -7
  20. package/lib/components/AvailabilityContainer.js +1 -0
  21. package/{dist → lib}/components/AvailabilityTemplate.d.ts +15 -16
  22. package/lib/components/AvailabilityTemplate.js +1 -0
  23. package/{dist → lib}/components/BillingAddressContainer.d.ts +6 -6
  24. package/lib/components/BillingAddressContainer.js +1 -0
  25. package/{dist → lib}/components/BillingAddressForm.d.ts +8 -8
  26. package/lib/components/BillingAddressForm.js +1 -0
  27. package/{dist → lib}/components/BraintreePayment.d.ts +30 -30
  28. package/lib/components/BraintreePayment.js +1 -0
  29. package/{dist → lib}/components/CheckoutLink.d.ts +11 -11
  30. package/lib/components/CheckoutLink.js +1 -0
  31. package/{dist → lib}/components/CommerceLayer.d.ts +8 -9
  32. package/lib/components/CommerceLayer.js +1 -0
  33. package/{dist → lib}/components/CustomerContainer.d.ts +7 -7
  34. package/lib/components/CustomerContainer.js +1 -0
  35. package/{dist → lib}/components/CustomerInput.d.ts +11 -11
  36. package/lib/components/CustomerInput.js +1 -0
  37. package/{dist → lib}/components/DeliveryLeadTime.d.ts +10 -10
  38. package/lib/components/DeliveryLeadTime.js +1 -0
  39. package/{dist → lib}/components/DiscountAmount.d.ts +4 -4
  40. package/lib/components/DiscountAmount.js +1 -0
  41. package/{dist → lib}/components/Errors.d.ts +5 -5
  42. package/lib/components/Errors.js +1 -0
  43. package/{dist → lib}/components/ExternalFunction.d.ts +7 -7
  44. package/lib/components/ExternalFunction.js +1 -0
  45. package/{dist → lib}/components/GiftCard.d.ts +8 -8
  46. package/lib/components/GiftCard.js +1 -0
  47. package/{dist → lib}/components/GiftCardAmount.d.ts +4 -4
  48. package/lib/components/GiftCardAmount.js +1 -0
  49. package/{dist → lib}/components/GiftCardContainer.d.ts +6 -6
  50. package/lib/components/GiftCardContainer.js +1 -0
  51. package/{dist → lib}/components/GiftCardCurrencySelector.d.ts +7 -7
  52. package/lib/components/GiftCardCurrencySelector.js +1 -0
  53. package/{dist → lib}/components/GiftCardInput.d.ts +7 -7
  54. package/lib/components/GiftCardInput.js +1 -0
  55. package/{dist → lib}/components/GiftCardOrCouponCode.d.ts +13 -13
  56. package/lib/components/GiftCardOrCouponCode.js +1 -0
  57. package/{dist → lib}/components/GiftCardOrCouponForm.d.ts +10 -10
  58. package/lib/components/GiftCardOrCouponForm.js +1 -0
  59. package/{dist → lib}/components/GiftCardOrCouponInput.d.ts +8 -8
  60. package/lib/components/GiftCardOrCouponInput.js +1 -0
  61. package/{dist → lib}/components/GiftCardOrCouponRemoveButton.d.ts +16 -16
  62. package/lib/components/GiftCardOrCouponRemoveButton.js +1 -0
  63. package/{dist → lib}/components/GiftCardOrCouponSubmit.d.ts +9 -9
  64. package/lib/components/GiftCardOrCouponSubmit.js +1 -0
  65. package/{dist → lib}/components/GiftCardRecipient.d.ts +0 -0
  66. package/lib/components/GiftCardRecipient.js +1 -0
  67. package/{dist → lib}/components/GiftCardRecipientInput.d.ts +0 -0
  68. package/lib/components/GiftCardRecipientInput.js +1 -0
  69. package/{dist → lib}/components/ItemContainer.d.ts +11 -11
  70. package/lib/components/ItemContainer.js +1 -0
  71. package/{dist → lib}/components/LineItem.d.ts +8 -8
  72. package/lib/components/LineItem.js +1 -0
  73. package/{dist → lib}/components/LineItemAmount.d.ts +7 -7
  74. package/lib/components/LineItemAmount.js +1 -0
  75. package/lib/components/LineItemCode.d.ts +12 -0
  76. package/lib/components/LineItemCode.js +1 -0
  77. package/lib/components/LineItemImage.d.ts +16 -0
  78. package/lib/components/LineItemImage.js +1 -0
  79. package/lib/components/LineItemName.d.ts +11 -0
  80. package/lib/components/LineItemName.js +1 -0
  81. package/{dist → lib}/components/LineItemOption.d.ts +19 -19
  82. package/lib/components/LineItemOption.js +1 -0
  83. package/{dist → lib}/components/LineItemOptions.d.ts +14 -14
  84. package/lib/components/LineItemOptions.js +1 -0
  85. package/{dist → lib}/components/LineItemQuantity.d.ts +14 -14
  86. package/lib/components/LineItemQuantity.js +1 -0
  87. package/{dist → lib}/components/LineItemRemoveLink.d.ts +12 -12
  88. package/lib/components/LineItemRemoveLink.js +1 -0
  89. package/{dist → lib}/components/LineItemsContainer.d.ts +8 -8
  90. package/lib/components/LineItemsContainer.js +1 -0
  91. package/{dist → lib}/components/LineItemsCount.d.ts +12 -10
  92. package/lib/components/LineItemsCount.js +1 -0
  93. package/lib/components/LineItemsEmpty.d.ts +12 -0
  94. package/lib/components/LineItemsEmpty.js +1 -0
  95. package/{dist → lib}/components/MetadataInput.d.ts +5 -5
  96. package/lib/components/MetadataInput.js +1 -0
  97. package/{dist → lib}/components/OrderContainer.d.ts +11 -10
  98. package/lib/components/OrderContainer.js +1 -0
  99. package/{dist → lib}/components/OrderNumber.d.ts +5 -5
  100. package/lib/components/OrderNumber.js +1 -0
  101. package/{dist → lib}/components/OrderStorage.d.ts +8 -8
  102. package/lib/components/OrderStorage.js +1 -0
  103. package/lib/components/PaymentGateway.d.ts +16 -0
  104. package/lib/components/PaymentGateway.js +1 -0
  105. package/{dist → lib}/components/PaymentMethod.d.ts +16 -16
  106. package/lib/components/PaymentMethod.js +1 -0
  107. package/{dist → lib}/components/PaymentMethodAmount.d.ts +4 -4
  108. package/lib/components/PaymentMethodAmount.js +1 -0
  109. package/{dist → lib}/components/PaymentMethodName.d.ts +9 -9
  110. package/lib/components/PaymentMethodName.js +1 -0
  111. package/{dist → lib}/components/PaymentMethodPrice.d.ts +9 -9
  112. package/lib/components/PaymentMethodPrice.js +1 -0
  113. package/{dist → lib}/components/PaymentMethodRadioButton.d.ts +11 -11
  114. package/lib/components/PaymentMethodRadioButton.js +1 -0
  115. package/{dist → lib}/components/PaymentMethodsContainer.d.ts +8 -8
  116. package/lib/components/PaymentMethodsContainer.js +1 -0
  117. package/{dist → lib}/components/PaymentSource.d.ts +19 -18
  118. package/lib/components/PaymentSource.js +1 -0
  119. package/{dist → lib}/components/PaymentSourceBrandIcon.d.ts +15 -15
  120. package/lib/components/PaymentSourceBrandIcon.js +1 -0
  121. package/{dist → lib}/components/PaymentSourceBrandName.d.ts +12 -12
  122. package/lib/components/PaymentSourceBrandName.js +1 -0
  123. package/{dist → lib}/components/PaymentSourceDetail.d.ts +12 -12
  124. package/lib/components/PaymentSourceDetail.js +1 -0
  125. package/{dist → lib}/components/PaymentSourceEditButton.d.ts +9 -9
  126. package/lib/components/PaymentSourceEditButton.js +1 -0
  127. package/{dist → lib}/components/PaypalPayment.d.ts +12 -12
  128. package/lib/components/PaypalPayment.js +1 -0
  129. package/{dist → lib}/components/PlaceOrderButton.d.ts +12 -12
  130. package/lib/components/PlaceOrderButton.js +1 -0
  131. package/{dist → lib}/components/PlaceOrderContainer.d.ts +8 -8
  132. package/lib/components/PlaceOrderContainer.js +1 -0
  133. package/{dist → lib}/components/Price.d.ts +16 -14
  134. package/lib/components/Price.js +1 -0
  135. package/{dist → lib}/components/PricesContainer.d.ts +11 -11
  136. package/lib/components/PricesContainer.js +1 -0
  137. package/{dist → lib}/components/PrivacyAndTermsCheckbox.d.ts +4 -4
  138. package/lib/components/PrivacyAndTermsCheckbox.js +1 -0
  139. package/{dist → lib}/components/QuantitySelector.d.ts +17 -17
  140. package/lib/components/QuantitySelector.js +1 -0
  141. package/{dist → lib}/components/SaveAddressesButton.d.ts +10 -11
  142. package/lib/components/SaveAddressesButton.js +1 -0
  143. package/{dist → lib}/components/SaveCustomerButton.d.ts +13 -13
  144. package/lib/components/SaveCustomerButton.js +1 -0
  145. package/{dist → lib}/components/Shipment.d.ts +8 -8
  146. package/lib/components/Shipment.js +1 -0
  147. package/{dist → lib}/components/ShipmentField.d.ts +12 -12
  148. package/lib/components/ShipmentField.js +1 -0
  149. package/{dist → lib}/components/ShipmentsContainer.d.ts +6 -6
  150. package/lib/components/ShipmentsContainer.js +1 -0
  151. package/{dist → lib}/components/ShippingAddressContainer.d.ts +6 -6
  152. package/lib/components/ShippingAddressContainer.js +1 -0
  153. package/{dist → lib}/components/ShippingAddressForm.d.ts +8 -8
  154. package/lib/components/ShippingAddressForm.js +1 -0
  155. package/{dist → lib}/components/ShippingAmount.d.ts +4 -4
  156. package/lib/components/ShippingAmount.js +1 -0
  157. package/{dist → lib}/components/ShippingMethod.d.ts +8 -8
  158. package/lib/components/ShippingMethod.js +1 -0
  159. package/{dist → lib}/components/ShippingMethodName.d.ts +11 -7
  160. package/lib/components/ShippingMethodName.js +1 -0
  161. package/{dist → lib}/components/ShippingMethodPrice.d.ts +13 -13
  162. package/lib/components/ShippingMethodPrice.js +1 -0
  163. package/lib/components/ShippingMethodRadioButton.d.ts +13 -0
  164. package/lib/components/ShippingMethodRadioButton.js +1 -0
  165. package/{dist → lib}/components/SkuList.d.ts +7 -7
  166. package/lib/components/SkuList.js +1 -0
  167. package/{dist → lib}/components/SkuListsContainer.d.ts +6 -6
  168. package/lib/components/SkuListsContainer.js +1 -0
  169. package/{dist → lib}/components/SkuOption.d.ts +7 -7
  170. package/lib/components/SkuOption.js +1 -0
  171. package/{dist → lib}/components/SkuOptionInput.d.ts +5 -5
  172. package/lib/components/SkuOptionInput.js +1 -0
  173. package/{dist → lib}/components/SkuOptionsContainer.d.ts +7 -7
  174. package/lib/components/SkuOptionsContainer.js +1 -0
  175. package/{dist → lib}/components/StockTransfer.d.ts +6 -6
  176. package/lib/components/StockTransfer.js +1 -0
  177. package/{dist → lib}/components/StockTransferField.d.ts +9 -9
  178. package/lib/components/StockTransferField.js +1 -0
  179. package/{dist → lib}/components/StripePayment.d.ts +18 -18
  180. package/lib/components/StripePayment.js +1 -0
  181. package/{dist → lib}/components/SubTotalAmount.d.ts +4 -4
  182. package/lib/components/SubTotalAmount.js +1 -0
  183. package/{dist → lib}/components/SubmitButton.d.ts +9 -9
  184. package/lib/components/SubmitButton.js +1 -0
  185. package/{dist → lib}/components/TaxesAmount.d.ts +4 -4
  186. package/lib/components/TaxesAmount.js +1 -0
  187. package/{dist → lib}/components/TotalAmount.d.ts +4 -4
  188. package/lib/components/TotalAmount.js +1 -0
  189. package/{dist → lib}/components/VariantSelector.d.ts +29 -27
  190. package/lib/components/VariantSelector.js +1 -0
  191. package/{dist → lib}/components/VariantsContainer.d.ts +8 -8
  192. package/lib/components/VariantsContainer.js +1 -0
  193. package/{dist → lib}/components/WireTransferPayment.d.ts +10 -10
  194. package/lib/components/WireTransferPayment.js +1 -0
  195. package/lib/components/gateways/AdyenGateway.d.ts +5 -0
  196. package/lib/components/gateways/AdyenGateway.js +1 -0
  197. package/lib/components/gateways/BraintreeGateway.d.ts +5 -0
  198. package/lib/components/gateways/BraintreeGateway.js +1 -0
  199. package/lib/components/gateways/PaypalGateway.d.ts +5 -0
  200. package/lib/components/gateways/PaypalGateway.js +1 -0
  201. package/lib/components/gateways/StripeGateway.d.ts +5 -0
  202. package/lib/components/gateways/StripeGateway.js +1 -0
  203. package/lib/components/gateways/WireTransferGateway.d.ts +5 -0
  204. package/lib/components/gateways/WireTransferGateway.js +1 -0
  205. package/lib/components/utils/AddressCardsTemplate.d.ts +27 -0
  206. package/lib/components/utils/AddressCardsTemplate.js +1 -0
  207. package/{dist → lib}/components/utils/BaseField.d.ts +8 -8
  208. package/lib/components/utils/BaseField.js +1 -0
  209. package/lib/components/utils/BaseInput.d.ts +5 -0
  210. package/lib/components/utils/BaseInput.js +1 -0
  211. package/{dist → lib}/components/utils/BaseOrderPrice.d.ts +6 -6
  212. package/lib/components/utils/BaseOrderPrice.js +1 -0
  213. package/{dist → lib}/components/utils/BaseSelect.d.ts +5 -5
  214. package/lib/components/utils/BaseSelect.js +1 -0
  215. package/{dist → lib}/components/utils/Parent.d.ts +8 -8
  216. package/lib/components/utils/Parent.js +1 -0
  217. package/lib/components/utils/PaymentCardsTemplate.d.ts +23 -0
  218. package/lib/components/utils/PaymentCardsTemplate.js +1 -0
  219. package/{dist → lib}/components/utils/PriceTemplate.d.ts +8 -8
  220. package/lib/components/utils/PriceTemplate.js +1 -0
  221. package/{dist → lib}/components/utils/VariantTemplate.d.ts +36 -34
  222. package/lib/components/utils/VariantTemplate.js +1 -0
  223. package/{dist → lib}/components/utils/getAllErrors.d.ts +17 -17
  224. package/lib/components/utils/getAllErrors.js +1 -0
  225. package/{dist → lib}/config/components.d.ts +892 -887
  226. package/lib/config/components.js +1 -0
  227. package/lib/config/currency.d.ts +5 -0
  228. package/lib/config/currency.js +1 -0
  229. package/{dist → lib}/context/AddressChildrenContext.d.ts +7 -7
  230. package/lib/context/AddressChildrenContext.js +1 -0
  231. package/{dist → lib}/context/AddressContext.d.ts +17 -17
  232. package/lib/context/AddressContext.js +1 -0
  233. package/{dist → lib}/context/AvailabilityContext.d.ts +3 -3
  234. package/lib/context/AvailabilityContext.js +1 -0
  235. package/{dist → lib}/context/BillingAddressContext.d.ts +12 -12
  236. package/lib/context/BillingAddressContext.js +1 -0
  237. package/{dist → lib}/context/BillingAddressFormContext.d.ts +18 -18
  238. package/lib/context/BillingAddressFormContext.js +1 -0
  239. package/{dist → lib}/context/CommerceLayerContext.d.ts +7 -8
  240. package/lib/context/CommerceLayerContext.js +1 -0
  241. package/{dist → lib}/context/CouponAndGiftCardFormContext.d.ts +7 -7
  242. package/lib/context/CouponAndGiftCardFormContext.js +1 -0
  243. package/{dist → lib}/context/CustomerContext.d.ts +16 -18
  244. package/lib/context/CustomerContext.js +1 -0
  245. package/{dist → lib}/context/ExternalFunctionContext.d.ts +12 -12
  246. package/lib/context/ExternalFunctionContext.js +1 -0
  247. package/{dist → lib}/context/GiftCardContext.d.ts +11 -11
  248. package/lib/context/GiftCardContext.js +1 -0
  249. package/{dist → lib}/context/ItemContext.d.ts +13 -13
  250. package/lib/context/ItemContext.js +1 -0
  251. package/lib/context/LineItemChildrenContext.d.ts +9 -0
  252. package/lib/context/LineItemChildrenContext.js +1 -0
  253. package/{dist → lib}/context/LineItemContext.d.ts +8 -8
  254. package/lib/context/LineItemContext.js +1 -0
  255. package/{dist → lib}/context/LineItemOptionChildrenContext.d.ts +8 -8
  256. package/lib/context/LineItemOptionChildrenContext.js +1 -0
  257. package/lib/context/OrderContext.d.ts +26 -0
  258. package/lib/context/OrderContext.js +1 -0
  259. package/{dist → lib}/context/OrderStorageContext.d.ts +11 -11
  260. package/lib/context/OrderStorageContext.js +1 -0
  261. package/{dist → lib}/context/PaymentMethodChildrenContext.d.ts +10 -10
  262. package/lib/context/PaymentMethodChildrenContext.js +1 -0
  263. package/{dist → lib}/context/PaymentMethodContext.d.ts +23 -20
  264. package/lib/context/PaymentMethodContext.js +1 -0
  265. package/{dist → lib}/context/PaymentSourceContext.d.ts +14 -14
  266. package/lib/context/PaymentSourceContext.js +1 -0
  267. package/{dist → lib}/context/PlaceOrderContext.d.ts +16 -16
  268. package/lib/context/PlaceOrderContext.js +1 -0
  269. package/{dist → lib}/context/PricesContext.d.ts +7 -7
  270. package/lib/context/PricesContext.js +1 -0
  271. package/lib/context/ShipmentChildrenContext.d.ts +13 -0
  272. package/lib/context/ShipmentChildrenContext.js +1 -0
  273. package/{dist → lib}/context/ShipmentContext.d.ts +12 -12
  274. package/lib/context/ShipmentContext.js +1 -0
  275. package/{dist → lib}/context/ShippingAddressContext.d.ts +10 -10
  276. package/lib/context/ShippingAddressContext.js +1 -0
  277. package/{dist → lib}/context/ShippingAddressFormContext.d.ts +4 -4
  278. package/lib/context/ShippingAddressFormContext.js +1 -0
  279. package/lib/context/ShippingMethodChildrenContext.d.ts +10 -0
  280. package/lib/context/ShippingMethodChildrenContext.js +1 -0
  281. package/lib/context/SkuListsContext.d.ts +6 -0
  282. package/lib/context/SkuListsContext.js +1 -0
  283. package/{dist → lib}/context/SkuOptionChildrenContext.d.ts +8 -8
  284. package/lib/context/SkuOptionChildrenContext.js +1 -0
  285. package/{dist → lib}/context/SkuOptionsContext.d.ts +3 -3
  286. package/lib/context/SkuOptionsContext.js +1 -0
  287. package/{dist → lib}/context/StockTransferChildrenContext.d.ts +7 -7
  288. package/lib/context/StockTransferChildrenContext.js +1 -0
  289. package/{dist → lib}/context/VariantsContext.d.ts +3 -3
  290. package/lib/context/VariantsContext.js +1 -0
  291. package/lib/index.d.ts +96 -0
  292. package/lib/index.js +1 -0
  293. package/{dist → lib}/reducers/AddressReducer.d.ts +58 -61
  294. package/lib/reducers/AddressReducer.js +1 -0
  295. package/lib/reducers/AvailabilityReducer.d.ts +53 -0
  296. package/lib/reducers/AvailabilityReducer.js +1 -0
  297. package/{dist → lib}/reducers/BillingAddressReducer.d.ts +31 -32
  298. package/lib/reducers/BillingAddressReducer.js +1 -0
  299. package/{dist → lib}/reducers/CustomerReducer.d.ts +50 -67
  300. package/lib/reducers/CustomerReducer.js +1 -0
  301. package/{dist → lib}/reducers/GiftCardReducer.d.ts +76 -75
  302. package/lib/reducers/GiftCardReducer.js +1 -0
  303. package/{dist → lib}/reducers/ItemReducer.d.ts +69 -68
  304. package/lib/reducers/ItemReducer.js +1 -0
  305. package/{dist → lib}/reducers/LineItemReducer.d.ts +52 -52
  306. package/lib/reducers/LineItemReducer.js +1 -0
  307. package/lib/reducers/OrderReducer.d.ts +131 -0
  308. package/lib/reducers/OrderReducer.js +1 -0
  309. package/{dist → lib}/reducers/PaymentMethodReducer.d.ts +105 -95
  310. package/lib/reducers/PaymentMethodReducer.js +1 -0
  311. package/{dist → lib}/reducers/PlaceOrderReducer.d.ts +52 -50
  312. package/lib/reducers/PlaceOrderReducer.js +1 -0
  313. package/{dist → lib}/reducers/PriceReducer.d.ts +44 -45
  314. package/lib/reducers/PriceReducer.js +1 -0
  315. package/{dist → lib}/reducers/ShipmentReducer.d.ts +40 -37
  316. package/lib/reducers/ShipmentReducer.js +1 -0
  317. package/{dist → lib}/reducers/ShippingAddressReducer.d.ts +32 -31
  318. package/lib/reducers/ShippingAddressReducer.js +1 -0
  319. package/{dist → lib}/reducers/SkuListsReducer.d.ts +21 -22
  320. package/lib/reducers/SkuListsReducer.js +1 -0
  321. package/{dist → lib}/reducers/SkuOptionsReducer.d.ts +26 -26
  322. package/lib/reducers/SkuOptionsReducer.js +1 -0
  323. package/{dist → lib}/reducers/VariantReducer.d.ts +71 -71
  324. package/lib/reducers/VariantReducer.js +1 -0
  325. package/{dist → lib}/typings/errors.d.ts +42 -40
  326. package/lib/typings/errors.js +1 -0
  327. package/{dist → lib}/typings/index.d.ts +126 -151
  328. package/lib/typings/index.js +1 -0
  329. package/{dist → lib}/utils/PropsType.d.ts +33 -33
  330. package/lib/utils/PropsType.js +1 -0
  331. package/{dist → lib}/utils/addressesManager.d.ts +28 -27
  332. package/lib/utils/addressesManager.js +1 -0
  333. package/{dist → lib}/utils/baseReducer.d.ts +3 -3
  334. package/lib/utils/baseReducer.js +1 -0
  335. package/lib/utils/browserInfo.d.ts +9 -0
  336. package/lib/utils/browserInfo.js +1 -0
  337. package/{dist → lib}/utils/childrenTypes.d.ts +9 -9
  338. package/lib/utils/childrenTypes.js +1 -0
  339. package/{dist → lib}/utils/countryStateCity.d.ts +9 -9
  340. package/lib/utils/countryStateCity.js +1 -0
  341. package/{dist → lib}/utils/customMessages.d.ts +8 -8
  342. package/lib/utils/customMessages.js +1 -0
  343. package/lib/utils/customerOrderOptions.d.ts +3 -0
  344. package/lib/utils/customerOrderOptions.js +1 -0
  345. package/{dist → lib}/utils/getAmount.d.ts +9 -9
  346. package/lib/utils/getAmount.js +1 -0
  347. package/{dist → lib}/utils/getCurrentItemKey.d.ts +6 -6
  348. package/lib/utils/getCurrentItemKey.js +1 -0
  349. package/lib/utils/getErrors.d.ts +11 -0
  350. package/lib/utils/getErrors.js +1 -0
  351. package/lib/utils/getLineItemsCount.d.ts +12 -0
  352. package/lib/utils/getLineItemsCount.js +1 -0
  353. package/{dist → lib}/utils/getLoaderComponent.d.ts +3 -3
  354. package/lib/utils/getLoaderComponent.js +1 -0
  355. package/lib/utils/getPrices.d.ts +17 -0
  356. package/lib/utils/getPrices.js +1 -0
  357. package/lib/utils/getSdk.d.ts +3 -0
  358. package/lib/utils/getSdk.js +1 -0
  359. package/lib/utils/getSkus.d.ts +3 -0
  360. package/lib/utils/getSkus.js +1 -0
  361. package/{dist → lib}/utils/isEmptyStates.d.ts +1 -1
  362. package/lib/utils/isEmptyStates.js +1 -0
  363. package/{dist → lib}/utils/isJSON.d.ts +1 -1
  364. package/lib/utils/isJSON.js +1 -0
  365. package/lib/utils/jwt.d.ts +27 -0
  366. package/lib/utils/jwt.js +1 -0
  367. package/{dist → lib}/utils/localStorage.d.ts +17 -18
  368. package/lib/utils/localStorage.js +1 -0
  369. package/lib/utils/organization.d.ts +6 -0
  370. package/lib/utils/organization.js +1 -0
  371. package/lib/utils/paypalPayment.d.ts +3 -0
  372. package/lib/utils/paypalPayment.js +1 -0
  373. package/{dist → lib}/utils/promisify.d.ts +1 -1
  374. package/lib/utils/promisify.js +1 -0
  375. package/lib/utils/shipments.d.ts +2 -0
  376. package/lib/utils/shipments.js +1 -0
  377. package/{dist → lib}/utils/validateFormFields.d.ts +20 -19
  378. package/lib/utils/validateFormFields.js +1 -0
  379. package/package.json +92 -81
  380. package/dist/components/AddressField.d.ts +0 -37
  381. package/dist/components/CustomerAddressForm.d.ts +0 -8
  382. package/dist/components/CustomerField.d.ts +0 -10
  383. package/dist/components/LineItemImage.d.ts +0 -10
  384. package/dist/components/LineItemName.d.ts +0 -7
  385. package/dist/components/LineItemSkuCode.d.ts +0 -7
  386. package/dist/components/OrderList.d.ts +0 -28
  387. package/dist/components/OrderListRow.d.ts +0 -14
  388. package/dist/components/PaymentGateway.d.ts +0 -11
  389. package/dist/components/ShippingMethodRadioButton.d.ts +0 -9
  390. package/dist/components/utils/BaseInput.d.ts +0 -5
  391. package/dist/context/CustomerAddressFormContext.d.ts +0 -18
  392. package/dist/context/LineItemChildrenContext.d.ts +0 -7
  393. package/dist/context/OrderContext.d.ts +0 -4
  394. package/dist/context/OrderListChildrenContext.d.ts +0 -14
  395. package/dist/context/ShipmentChildrenContext.d.ts +0 -13
  396. package/dist/context/ShippingMethodChildrenContext.d.ts +0 -9
  397. package/dist/context/SkuListsContext.d.ts +0 -3
  398. package/dist/index.d.ts +0 -91
  399. package/dist/index.js +0 -8
  400. package/dist/react-components.cjs.development.js +0 -12778
  401. package/dist/react-components.cjs.development.js.map +0 -1
  402. package/dist/react-components.cjs.production.min.js +0 -2
  403. package/dist/react-components.cjs.production.min.js.map +0 -1
  404. package/dist/react-components.esm.js +0 -12680
  405. package/dist/react-components.esm.js.map +0 -1
  406. package/dist/reducers/AvailabilityReducer.d.ts +0 -40
  407. package/dist/reducers/OrderReducer.d.ts +0 -131
  408. package/dist/typings/order.d.ts +0 -120
  409. package/dist/utils/customerOrderOptions.d.ts +0 -4
  410. package/dist/utils/dynamicNaming.d.ts +0 -5
  411. package/dist/utils/getErrorsByCollection.d.ts +0 -11
  412. package/dist/utils/getLineItemsCount.d.ts +0 -6
  413. package/dist/utils/getPrices.d.ts +0 -18
  414. package/dist/utils/getSkus.d.ts +0 -3
  415. package/dist/utils/icons.d.ts +0 -3
  416. package/dist/utils/isDate.d.ts +0 -1
  417. package/dist/utils/paypalPayment.d.ts +0 -3
  418. package/dist/utils/scrollbarWidth.d.ts +0 -1
  419. package/dist/utils/shipments.d.ts +0 -5
@@ -0,0 +1 @@
1
+ import PropTypes from"prop-types";import childrenTypes from"../utils/childrenTypes";import{baseOrderComponentPricePropTypes,PTLoader,BMObject}from"../typings/index";import{ErrorPropTypes}from"../typings/errors";import{BaseInputComponentPropTypes}from"../typings/index";const components={Address:{permittedChildren:["AddressField","ReactNode"],displayName:"Address",propTypes:{children:childrenTypes.isRequired}},AddressCountrySelector:{displayName:"AddressCountrySelector",propTypes:{children:PropTypes.func,placeholder:PropTypes.shape({label:PropTypes.string.isRequired,value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]).isRequired}),value:PropTypes.string,name:PropTypes.oneOf(["billing_address_country_code","shipping_address_country_code"]).isRequired,required:PropTypes.bool},defaultProps:{required:!0}},AddressStateSelector:{displayName:"AddressStateSelector",propTypes:{children:PropTypes.func,placeholder:PropTypes.shape({label:PropTypes.string.isRequired,value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]).isRequired}),value:PropTypes.string,name:PropTypes.oneOf(["billing_address_state_code","shipping_address_state_code"]).isRequired,required:PropTypes.bool},defaultProps:{required:!0}},AddressField:{displayName:"AddressField",propTypes:{children:PropTypes.func}},AddressInput:{displayName:"AddressInput",propTypes:{children:PropTypes.func,name:PropTypes.oneOf(["billing_address_city","billing_address_company","billing_address_email","billing_address_first_name","billing_address_last_name","billing_address_line_1","billing_address_line_2","billing_address_phone","billing_address_state_code","billing_address_zip_code","billing_address_billing_info","billing_address_save_to_customer_book","shipping_address_city","shipping_address_company","shipping_address_email","shipping_address_first_name","shipping_address_last_name","shipping_address_line_1","shipping_address_line_2","shipping_address_phone","shipping_address_state_code","shipping_address_zip_code","shipping_address_save_to_customer_book"]).isRequired,type:PropTypes.oneOf(["checkbox","date","email","number","tel","text","textarea"]).isRequired,placeholder:PropTypes.string,disabled:PropTypes.bool,required:PropTypes.bool},defaultProps:{required:!0}},AdjustmentAmount:{displayName:"AdjustmentAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},AddToCartButton:{displayName:"AddToCartButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element]),skuCode:PropTypes.string,disabled:PropTypes.bool,lineItem:PropTypes.shape({name:PropTypes.string.isRequired,imageUrl:PropTypes.string})},defaultProps:{label:"Add to cart"}},AddressesContainer:{displayName:"AddressesContainer",permittedChildren:["BillingAddressForm","BillingAddressContainer","ShippingAddressForm","ShippingAddressContainer","SaveAddressesButton","ReactNode"],propTypes:{children:childrenTypes.isRequired,shipToDifferentAddress:PropTypes.bool}},AvailabilityContainer:{displayName:"AvailabilityContainer",permittedChildren:["AvailabilityTemplate","ReactNode"],propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string}},AvailabilityTemplate:{displayName:"AvailabilityTemplate",propTypes:{timeFormat:PropTypes.oneOf(["days","hours"]),showShippingMethodName:PropTypes.bool,children:PropTypes.func},defaultProps:{timeFormat:"days",showShippingMethodName:!1}},BillingAddressContainer:{permittedChildren:["Address","ReactNode"],propTypes:{children:childrenTypes.isRequired}},BillingAddressForm:{permittedChildren:["AddressInput","ReactNode"],propTypes:{children:childrenTypes.isRequired}},CheckoutLink:{displayName:"CheckoutLink",propTypes:{children:PropTypes.func,label:PropTypes.string},defaultProps:{label:"Checkout"}},CommerceLayer:{permittedChildren:["OrderContainer","OrderStorage","PricesContainer","GiftCardContainer","ReactNode"],propTypes:{children:childrenTypes.isRequired,accessToken:PropTypes.string.isRequired,endpoint:PropTypes.string.isRequired}},CustomerContainer:{displayName:"CustomerContainer",permittedChildren:["CustomerInput","SaveCustomerButton","AddressesContainer","PaymentMethodsContainer","ShipmentsContainer","ReactNode"],propTypes:{children:childrenTypes.isRequired,isGuest:PropTypes.bool}},CustomerInput:{displayName:"CustomerInput",propTypes:{children:PropTypes.func,name:PropTypes.oneOf(["customerEmail"]),type:PropTypes.oneOf(["email"]),placeholder:PropTypes.string,disabled:PropTypes.bool,required:PropTypes.bool,saveOnBlur:PropTypes.bool},defaultProps:{required:!0}},DeliveryLeadTime:{displayName:"DeliveryLeadTime",propTypes:{type:PropTypes.oneOf(["max_days","max_hours","min_days","min_hours"]).isRequired,children:PropTypes.func}},DiscountAmount:{displayName:"DiscountAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},Errors:{displayName:"Errors",propTypes:ErrorPropTypes,defaultProps:{messages:[],field:"base"}},ExternalFunction:{displayName:"ExternalFunction",permittedChildren:["AddToCartButton","ReactNode"],propTypes:{children:childrenTypes.isRequired,url:PropTypes.string.isRequired}},GiftCard:{permittedChildren:["GiftCardCurrencySelector","GiftCardInput","Errors","MetadataInput","SubmitButton","ReactNode"],displayName:"GiftCard",propTypes:{children:childrenTypes.isRequired,onSubmit:PropTypes.func},defaultProps:{onSubmit:void 0}},GiftCardAmount:{displayName:"GiftCardAmount",propTypes:baseOrderComponentPricePropTypes},GiftCardContainer:{permittedChildren:["GiftCard","Errors","ReactNode"],displayName:"GiftCardContainer",propTypes:{children:childrenTypes.isRequired}},GiftCardCurrencySelector:{displayName:"GiftCardCurrencySelector",propTypes:{children:PropTypes.func,placeholder:PropTypes.shape({value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]).isRequired,label:PropTypes.string.isRequired}),value:PropTypes.string,required:PropTypes.bool},defaultProps:{required:!0}},GiftCardInput:{displayName:"GiftCardInput",propTypes:{type:PropTypes.oneOf(["text","email","number","date","checkbox"]).isRequired,name:PropTypes.oneOf(["balanceCents","balanceMaxCents","singleUse","rechargeable","imageUrl","expiresAt","referenceOrigin","email","firstName","lastName","reference"]).isRequired,children:PropTypes.func,placeholder:PropTypes.string}},GiftCardOrCouponForm:{permittedChildren:["GiftCardOrCouponInput","GiftCardOrCouponSubmit","ReactNode"],propTypes:{children:childrenTypes.isRequired}},GiftCardOrCouponInput:{displayName:"GiftCardOrCouponInput",propTypes:{children:PropTypes.func,placeholder:PropTypes.string,disabled:PropTypes.bool,required:PropTypes.bool}},GiftCardOrCouponSubmit:{displayName:"GiftCardOrCouponSubmit",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.object])}},GiftCardOrCouponCode:{displayName:"GiftCardOrCouponCode",propTypes:{children:PropTypes.func,type:PropTypes.oneOf(["coupon","gift_card"])}},GiftCardOrCouponRemoveButton:{displayName:"GiftCardOrCouponRemoveButton",propTypes:{children:PropTypes.func,type:PropTypes.oneOf(["coupon","gift_card"]),label:PropTypes.oneOfType([PropTypes.string,PropTypes.object])}},ItemContainer:{permittedChildren:["PricesContainer","VariantsContainer","SkuOptionContainer","QuantitySelector","AddToCartButton","AvailabilityContainer","SkuListsContainer","ReactNode"],displayName:"ItemContainer",propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string,lineItem:PropTypes.shape({name:PropTypes.string.isRequired,imageUrl:PropTypes.string})}},LineItem:{permittedChildren:["AvailabilityContainer","LineItemImage","LineItemName","LineItemOptions","LineItemQuantity","LineItemAmount","LineItemRemoveLink","StockTransfer","Errors","ReactNode"],displayName:"LineItem",propTypes:{children:childrenTypes.isRequired,type:PropTypes.oneOf(["skus","gift_cards","shipments","payment_methods","promotions","adjustments","bundles"])},defaultProps:{type:"skus"}},LineItemAmount:{displayName:"LineItemAmount",propTypes:Object.assign(Object.assign({},baseOrderComponentPricePropTypes),{type:PropTypes.oneOf(["total","unit","option"])}),defaultProps:{format:"formatted",type:"total"}},LineItemImage:{displayName:"LineItemImage",propTypes:{width:PropTypes.number,children:PropTypes.func}},LineItemName:{displayName:"LineItemName",propTypes:{children:PropTypes.func}},LineItemCode:{displayName:"LineItemCode",propTypes:{children:PropTypes.func}},LineItemOption:{displayName:"LineItemOption",propTypes:{name:PropTypes.string,children:PropTypes.func,valueClassName:PropTypes.string,className:PropTypes.string,id:PropTypes.string,style:PropTypes.object}},LineItemOptions:{permittedChildren:["LineItemOption","ReactNode"],displayName:"LineItemOptions",propTypes:{children:childrenTypes.isRequired,title:PropTypes.string,showName:PropTypes.bool,skuOptionId:PropTypes.string}},LineItemQuantity:{displayName:"LineItemQuantity",propTypes:{children:PropTypes.func,max:PropTypes.number,disabled:PropTypes.bool,readonly:PropTypes.bool},defaultProps:{max:50}},LineItemRemoveLink:{displayName:"LineItemRemoveLink",propTypes:{children:PropTypes.func,label:PropTypes.string},defaultProps:{label:"Remove"}},LineItemsContainer:{permittedChildren:["LineItemsCount","LineItemsEmpty","LineItem","ReactNode"],displayName:"LineItemsContainer",propTypes:{children:childrenTypes.isRequired,filters:PropTypes.object,loader:PTLoader},defaultProps:{filters:{},loader:"Loading..."}},LineItemsCount:{displayName:"LineItemsCount",propTypes:{children:PropTypes.func,id:PropTypes.string,className:PropTypes.string,name:PropTypes.string,style:PropTypes.object}},LineItemsEmpty:{displayName:"LineItemsEmpty",propTypes:{children:PropTypes.func,id:PropTypes.string,className:PropTypes.string,name:PropTypes.string,style:PropTypes.object,text:PropTypes.string}},MetadataInput:{displayName:"MetadataInput",propTypes:BaseInputComponentPropTypes},OrderContainer:{permittedChildren:["AddressesContainer","CustomerContainer","ItemContainer","LineItemsContainer","SubTotalAmount","DiscountAmount","AdjustmentAmount","ShippingAmount","TaxesAmount","GiftCardAmount","TotalAmount","CheckoutLink","GiftCardContainer","ShipmentsContainer","PaymentMethodsContainer","PaymentMethodAmount","GiftCardOrCouponForm","GiftCardOrCouponCode","GiftCardOrCouponRemoveButton","Errors","OrderNumber","ReactNode"],displayName:"OrderContainer",propTypes:{children:childrenTypes.isRequired,orderId:PropTypes.string,metadata:BMObject,attributes:PropTypes.object},defaultProps:{metadata:{}}},OrderNumber:{displayName:"OrderNumber",propTypes:{className:PropTypes.string},defaultProps:{format:"formatted"}},OrderStorage:{permittedChildren:["OrderContainer","ReactNode"],displayName:"OrderStorage",propTypes:{children:childrenTypes.isRequired,clearWhenPlaced:PropTypes.bool,persistKey:PropTypes.string.isRequired}},PaymentMethod:{permittedChildren:["PaymentMethodName","PaymentMethodRadioButton","PaymentMethodPrice","PaymentSource","ReactNode","Errors"],displayName:"PaymentMethod",propTypes:{children:childrenTypes.isRequired}},PaymentMethodAmount:{displayName:"PaymentMethodAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},PaymentMethodName:{displayName:"PaymentMethodName",propTypes:{children:PropTypes.func}},PaymentMethodPrice:{displayName:"PaymentMethodPrice",propTypes:Object.assign(Object.assign({},baseOrderComponentPricePropTypes),{type:PropTypes.oneOf(["amount"])})},PaymentMethodRadioButton:{displayName:"PaymentMethodRadioButton",propTypes:{children:PropTypes.func}},PaymentMethodsContainer:{displayName:"PaymentMethodsContainer",permittedChildren:["PaymentSource","ReactNode","PlaceOrderContainer"],propTypes:{children:childrenTypes.isRequired}},PaymentSource:{displayName:"PaymentSource",permittedChildren:["PaymentSourceBrandIcon","PaymentSourceBrandName","PaymentSourceEditButton","PaymentSourceDetail","ReactNode"],propTypes:{children:childrenTypes,readonly:PropTypes.bool}},PaymentSourceBrandIcon:{displayName:"PaymentSourceBrandIcon",propTypes:{children:PropTypes.func,width:PropTypes.number,height:PropTypes.number,src:PropTypes.string,className:PropTypes.string}},PaymentSourceBrandName:{displayName:"PaymentSourceBrandName",propTypes:{children:PropTypes.func,label:PropTypes.string}},PaymentSourceEditButton:{displayName:"PaymentSourceEditButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element])}},PaymentSourceDetail:{displayName:"PaymentSourceDetail",propTypes:{type:PropTypes.oneOf(["last4","exp_year","exp_month"]).isRequired}},PlaceOrderButton:{displayName:"PlaceOrderButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element])},defaultProps:{label:"Place order"}},PlaceOrderContainer:{displayName:"PlaceOrderContainer",permittedChildren:["PaymentMethod","PlaceOrderButton","PrivacyAndTermsCheckbox","ReactNode"],propTypes:{children:childrenTypes.isRequired}},Price:{displayName:"Price",propTypes:{children:PropTypes.func,compareClassName:PropTypes.string,skuCode:PropTypes.string,showCompare:PropTypes.bool},defaultProps:{skuCode:""}},PricesContainer:{permittedChildren:["Price","ReactNode"],displayName:"PricesContainer",propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string,loader:PTLoader,perPage:PropTypes.number,filters:PropTypes.object},defaultProps:{perPage:10,filters:{},loader:"Loading...",skuCode:""}},PrivacyAndTermsCheckbox:{displayName:"PrivacyAndTermsCheckbox",propTypes:{children:PropTypes.func}},QuantitySelector:{displayName:"QuantitySelector",propTypes:{children:PropTypes.func,min:PropTypes.number,max:PropTypes.number,value:PropTypes.string,skuCode:PropTypes.string,disabled:PropTypes.bool},defaultProps:{min:1}},SaveAddressesButton:{displayName:"SaveAddressesButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element]),onClick:PropTypes.func,disabled:PropTypes.bool},defaultProps:{label:"Continue to delivery"}},Shipment:{permittedChildren:["LineItemsContainer","LineItem","ShippingMethod","ReactNode"],displayName:"Shipment",propTypes:{children:childrenTypes.isRequired}},ShipmentField:{displayName:"ShipmentField",propTypes:{children:PropTypes.func,name:PropTypes.oneOf(["cost_amount_cents","cost_amount_float","currency_code","formatted_cost_amount","number","status","key_number"]).isRequired}},ShipmentsContainer:{displayName:"ShipmentsContainer",permittedChildren:["Shipment","ReactNode"],propTypes:{children:childrenTypes.isRequired}},ShippingAddressContainer:{permittedChildren:["Address","ReactNode"],propTypes:{children:childrenTypes.isRequired}},SaveCustomerButton:{displayName:"SaveCustomerButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element]),onClick:PropTypes.func},defaultProps:{label:"Save"}},ShippingAddressForm:{permittedChildren:["AddressInput","ReactNode"],propTypes:{children:childrenTypes.isRequired}},ShippingAmount:{displayName:"ShippingAmount",propTypes:baseOrderComponentPricePropTypes},ShippingMethod:{permittedChildren:["ShippingMethodName","ShippingMethodPrice","ShippingMethodRadioButton","DeliveryLeadTime","ReactNode"],displayName:"ShippingMethod",propTypes:{children:childrenTypes.isRequired,readonly:PropTypes.bool}},ShippingMethodName:{displayName:"ShippingMethodName",propTypes:{children:PropTypes.func}},ShippingMethodRadioButton:{displayName:"ShippingMethodRadioButton",propTypes:{children:PropTypes.func}},ShippingMethodPrice:{displayName:"ShippingMethodPrice",propTypes:Object.assign(Object.assign({},baseOrderComponentPricePropTypes),{type:PropTypes.oneOf(["amount"])}),defaultProps:{format:"formatted",type:"amount"}},SkuList:{permittedChildren:["AddToCartButton","QuantitySelector","ReactNode"],displayName:"SkuList",propTypes:{children:childrenTypes.isRequired,id:PropTypes.string.isRequired}},SkuListsContainer:{permittedChildren:["SkuList","ReactNode"],displayName:"SkuListsContainer",propTypes:{children:childrenTypes.isRequired}},SkuOption:{permittedChildren:["SkuOptionInput","ReactNode"],displayName:"SkuOption",propTypes:{children:childrenTypes.isRequired,id:PropTypes.string.isRequired}},SkuOptionInput:{displayName:"SkuOptionInput",propTypes:BaseInputComponentPropTypes},SkuOptionsContainer:{permittedChildren:["SkuOption","ReactNode"],displayName:"SkuOptionsContainer",propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string}},StockTransfer:{permittedChildren:["StockTransferField","ReactNode"],displayName:"StockTransfer",propTypes:{children:childrenTypes.isRequired}},StockTransferField:{displayName:"StockTransferField",propTypes:{children:PropTypes.func,type:PropTypes.oneOf(["quantity","sku_code"]).isRequired}},SubmitButton:{displayName:"SubmitButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element])},defaultProps:{label:"Submit"}},SubTotalAmount:{displayName:"SubTotalAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},TaxesAmount:{displayName:"TaxesAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},TotalAmount:{displayName:"TotalAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},VariantsContainer:{permittedChildren:["VariantSelector","ReactNode"],displayName:"VariantsContainer",propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string,filters:PropTypes.object},defaultProps:{skuCode:"",filters:{}}},VariantSelector:{displayName:"VariantSelector",propTypes:{options:PropTypes.arrayOf(PropTypes.shape({label:PropTypes.string.isRequired,code:PropTypes.string.isRequired,lineItem:PropTypes.shape({name:PropTypes.string.isRequired,imageUrl:PropTypes.string})}).isRequired).isRequired,name:PropTypes.string,children:PropTypes.func,type:PropTypes.oneOf(["select","radio"]),loader:PropTypes.element,placeholder:PropTypes.string,skuCode:PropTypes.string},defaultProps:{placeholder:"Select a variant",type:"select"}}};export default components;
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ value: string;
3
+ label: string;
4
+ }[];
5
+ export default _default;
@@ -0,0 +1 @@
1
+ export default[{value:"AED",label:"AED"},{value:"AFN",label:"AFN"},{value:"ALL",label:"ALL"},{value:"AMD",label:"AMD"},{value:"ANG",label:"ANG"},{value:"AOA",label:"AOA"},{value:"ARS",label:"ARS"},{value:"AUD",label:"AUD"},{value:"AWG",label:"AWG"},{value:"AZN",label:"AZN"},{value:"BAM",label:"BAM"},{value:"BBD",label:"BBD"},{value:"BDT",label:"BDT"},{value:"BGN",label:"BGN"},{value:"BHD",label:"BHD"},{value:"BIF",label:"BIF"},{value:"BMD",label:"BMD"},{value:"BND",label:"BND"},{value:"BOB",label:"BOB"},{value:"BRL",label:"BRL"},{value:"BSD",label:"BSD"},{value:"BTN",label:"BTN"},{value:"BWP",label:"BWP"},{value:"BYN",label:"BYN"},{value:"BYR",label:"BYR"},{value:"BZD",label:"BZD"},{value:"CAD",label:"CAD"},{value:"CDF",label:"CDF"},{value:"CHF",label:"CHF"},{value:"CLF",label:"CLF"},{value:"CLP",label:"CLP"},{value:"CNY",label:"CNY"},{value:"COP",label:"COP"},{value:"CRC",label:"CRC"},{value:"CUC",label:"CUC"},{value:"CUP",label:"CUP"},{value:"CVE",label:"CVE"},{value:"CZK",label:"CZK"},{value:"DJF",label:"DJF"},{value:"DKK",label:"DKK"},{value:"DOP",label:"DOP"},{value:"DZD",label:"DZD"},{value:"EGP",label:"EGP"},{value:"ERN",label:"ERN"},{value:"ETB",label:"ETB"},{value:"EUR",label:"EUR"},{value:"FJD",label:"FJD"},{value:"FKP",label:"FKP"},{value:"GBP",label:"GBP"},{value:"GEL",label:"GEL"},{value:"GHS",label:"GHS"},{value:"GIP",label:"GIP"},{value:"GMD",label:"GMD"},{value:"GNF",label:"GNF"},{value:"GTQ",label:"GTQ"},{value:"GYD",label:"GYD"},{value:"HKD",label:"HKD"},{value:"HNL",label:"HNL"},{value:"HRK",label:"HRK"},{value:"HTG",label:"HTG"},{value:"HUF",label:"HUF"},{value:"IDR",label:"IDR"},{value:"ILS",label:"ILS"},{value:"INR",label:"INR"},{value:"IQD",label:"IQD"},{value:"IRR",label:"IRR"},{value:"ISK",label:"ISK"},{value:"JMD",label:"JMD"},{value:"JOD",label:"JOD"},{value:"JPY",label:"JPY"},{value:"KES",label:"KES"},{value:"KGS",label:"KGS"},{value:"KHR",label:"KHR"},{value:"KMF",label:"KMF"},{value:"KPW",label:"KPW"},{value:"KRW",label:"KRW"},{value:"KWD",label:"KWD"},{value:"KYD",label:"KYD"},{value:"KZT",label:"KZT"},{value:"LAK",label:"LAK"},{value:"LBP",label:"LBP"},{value:"LKR",label:"LKR"},{value:"LRD",label:"LRD"},{value:"LSL",label:"LSL"},{value:"LTL",label:"LTL"},{value:"LVL",label:"LVL"},{value:"LYD",label:"LYD"},{value:"MAD",label:"MAD"},{value:"MDL",label:"MDL"},{value:"MGA",label:"MGA"},{value:"MKD",label:"MKD"},{value:"MMK",label:"MMK"},{value:"MNT",label:"MNT"},{value:"MOP",label:"MOP"},{value:"MRO",label:"MRO"},{value:"MUR",label:"MUR"},{value:"MVR",label:"MVR"},{value:"MWK",label:"MWK"},{value:"MXN",label:"MXN"},{value:"MYR",label:"MYR"},{value:"MZN",label:"MZN"},{value:"NAD",label:"NAD"},{value:"NGN",label:"NGN"},{value:"NIO",label:"NIO"},{value:"NOK",label:"NOK"},{value:"NPR",label:"NPR"},{value:"NZD",label:"NZD"},{value:"OMR",label:"OMR"},{value:"PAB",label:"PAB"},{value:"PEN",label:"PEN"},{value:"PGK",label:"PGK"},{value:"PHP",label:"PHP"},{value:"PKR",label:"PKR"},{value:"PLN",label:"PLN"},{value:"PYG",label:"PYG"},{value:"QAR",label:"QAR"},{value:"RON",label:"RON"},{value:"RSD",label:"RSD"},{value:"RUB",label:"RUB"},{value:"RWF",label:"RWF"},{value:"SAR",label:"SAR"},{value:"SBD",label:"SBD"},{value:"SCR",label:"SCR"},{value:"SDG",label:"SDG"},{value:"SEK",label:"SEK"},{value:"SGD",label:"SGD"},{value:"SHP",label:"SHP"},{value:"SKK",label:"SKK"},{value:"SLL",label:"SLL"},{value:"SOS",label:"SOS"},{value:"SRD",label:"SRD"},{value:"SSP",label:"SSP"},{value:"STD",label:"STD"},{value:"SVC",label:"SVC"},{value:"SYP",label:"SYP"},{value:"SZL",label:"SZL"},{value:"THB",label:"THB"},{value:"TJS",label:"TJS"},{value:"TMT",label:"TMT"},{value:"TND",label:"TND"},{value:"TOP",label:"TOP"},{value:"TRY",label:"TRY"},{value:"TTD",label:"TTD"},{value:"TWD",label:"TWD"},{value:"TZS",label:"TZS"},{value:"UAH",label:"UAH"},{value:"UGX",label:"UGX"},{value:"USD",label:"USD"},{value:"UYU",label:"UYU"},{value:"UZS",label:"UZS"},{value:"VEF",label:"VEF"},{value:"VND",label:"VND"},{value:"VUV",label:"VUV"},{value:"WST",label:"WST"},{value:"XAF",label:"XAF"},{value:"XAG",label:"XAG"},{value:"XAU",label:"XAU"},{value:"XBA",label:"XBA"},{value:"XBB",label:"XBB"},{value:"XBC",label:"XBC"},{value:"XBD",label:"XBD"},{value:"XCD",label:"XCD"},{value:"XDR",label:"XDR"},{value:"XOF",label:"XOF"},{value:"XPD",label:"XPD"},{value:"XPF",label:"XPF"},{value:"XPT",label:"XPT"},{value:"XTS",label:"XTS"},{value:"YER",label:"YER"},{value:"ZAR",label:"ZAR"},{value:"ZMK",label:"ZMK"},{value:"ZMW",label:"ZMW"},{value:"BTC",label:"BTC"},{value:"JEP",label:"JEP"},{value:"GGP",label:"GGP"},{value:"IMP",label:"IMP"},{value:"XFU",label:"XFU"},{value:"GBX",label:"GBX"},{value:"CNH",label:"CNH"},{value:"EEK",label:"EEK"},{value:"GHS",label:"GHS"},{value:"MTL",label:"MTL"},{value:"TMM",label:"TMM"},{value:"JPY",label:"JPY"},{value:"ZWD",label:"ZWD"},{value:"ZWL",label:"ZWL"},{value:"ZWN",label:"ZWN"},{value:"ZWR",label:"ZWR"}];
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
2
- import { AddressCollection } from '@commercelayer/js-sdk';
3
- export interface InitialAddressContext {
4
- address: AddressCollection | Record<string, any>;
5
- }
6
- declare const AddressChildrenContext: import("react").Context<InitialAddressContext>;
7
- export default AddressChildrenContext;
1
+ /// <reference types="react" />
2
+ import { Address } from '@commercelayer/sdk';
3
+ export interface InitialAddressContext {
4
+ address: Address | Record<string, any>;
5
+ }
6
+ declare const AddressChildrenContext: import("react").Context<InitialAddressContext>;
7
+ export default AddressChildrenContext;
@@ -0,0 +1 @@
1
+ import{createContext}from"react";const initial={address:{}},AddressChildrenContext=createContext(initial);export default AddressChildrenContext;
@@ -1,17 +1,17 @@
1
- /// <reference types="react" />
2
- import { AddressResource, AddressState, SetAddress } from "../reducers/AddressReducer";
3
- import { BaseError } from "../typings/errors";
4
- declare type DefaultContext = {
5
- saveAddresses: (addressId?: string) => void;
6
- setCloneAddress: (id: string, resource: AddressResource) => void;
7
- setAddress: SetAddress;
8
- setAddressErrors: (errors: BaseError[], resource: AddressResource) => void;
9
- } & AddressState;
10
- export declare const defaultAddressContext: {
11
- saveAddresses: () => void;
12
- setCloneAddress: () => void;
13
- setAddress: SetAddress;
14
- setAddressErrors: () => void;
15
- };
16
- declare const AddressesContext: import("react").Context<DefaultContext>;
17
- export default AddressesContext;
1
+ /// <reference types="react" />
2
+ import { AddressState, SetAddress, AddressResource } from '../reducers/AddressReducer';
3
+ import { BaseError } from '../typings/errors';
4
+ declare type DefaultContext = {
5
+ saveAddresses: () => void;
6
+ setCloneAddress: (id: string, resource: AddressResource) => void;
7
+ setAddress: SetAddress;
8
+ setAddressErrors: (errors: BaseError[], resource: AddressResource) => void;
9
+ } & AddressState;
10
+ export declare const defaultAddressContext: {
11
+ saveAddresses: () => void;
12
+ setCloneAddress: () => void;
13
+ setAddress: SetAddress;
14
+ setAddressErrors: () => void;
15
+ };
16
+ declare const AddressesContext: import("react").Context<DefaultContext>;
17
+ export default AddressesContext;
@@ -0,0 +1 @@
1
+ import{createContext}from"react";import{setAddress}from"../reducers/AddressReducer";export const defaultAddressContext={saveAddresses:()=>{},setCloneAddress:()=>{},setAddress,setAddressErrors:()=>{}};const AddressesContext=createContext(defaultAddressContext);export default AddressesContext;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- declare const AvailabilityContext: import("react").Context<import("../reducers/AvailabilityReducer").AvailabilityState>;
3
- export default AvailabilityContext;
1
+ /// <reference types="react" />
2
+ declare const AvailabilityContext: import("react").Context<import("../reducers/AvailabilityReducer").AvailabilityPayload>;
3
+ export default AvailabilityContext;
@@ -0,0 +1 @@
1
+ import{createContext}from"react";import{availabilityInitialState}from"../reducers/AvailabilityReducer";const AvailabilityContext=createContext(availabilityInitialState);export default AvailabilityContext;
@@ -1,12 +1,12 @@
1
- /// <reference types="react" />
2
- import { BillingAddressState } from "../reducers/BillingAddressReducer";
3
- declare type DefaultContext = {
4
- setBillingAddress?: (id: string, options?: {
5
- customerAddressId: string;
6
- }) => void;
7
- } & BillingAddressState;
8
- export declare const defaultBillingAddressContext: {
9
- setBillingAddress: () => void;
10
- };
11
- declare const BillingAddressContext: import("react").Context<DefaultContext>;
12
- export default BillingAddressContext;
1
+ /// <reference types="react" />
2
+ import { BillingAddressState } from '../reducers/BillingAddressReducer';
3
+ declare type DefaultContext = {
4
+ setBillingAddress?: (id: string, options?: {
5
+ customerAddressId: string;
6
+ }) => void;
7
+ } & BillingAddressState;
8
+ export declare const defaultBillingAddressContext: {
9
+ setBillingAddress: () => void;
10
+ };
11
+ declare const BillingAddressContext: import("react").Context<DefaultContext>;
12
+ export default BillingAddressContext;
@@ -0,0 +1 @@
1
+ import{createContext}from"react";export const defaultBillingAddressContext={setBillingAddress:()=>{}};const BillingAddressContext=createContext(defaultBillingAddressContext);export default BillingAddressContext;
@@ -1,18 +1,18 @@
1
- import { RefObject } from 'react';
2
- import { AddressCountrySelectName, AddressInputName } from "../typings/index";
3
- import { AddressField } from "../reducers/AddressReducer";
4
- export declare type DefaultContextAddress = {
5
- validation?: () => RefObject<any>;
6
- setValue?: (name: AddressField | AddressInputName | AddressCountrySelectName, value: any) => void;
7
- errors?: Record<string, {
8
- code: string;
9
- message: string;
10
- error: boolean;
11
- }>[];
12
- errorClassName?: string;
13
- requiresBillingInfo?: boolean;
14
- resetField?: (name: string) => void;
15
- values?: Record<string, any>;
16
- };
17
- declare const BillingAddressFormContext: import("react").Context<DefaultContextAddress>;
18
- export default BillingAddressFormContext;
1
+ import { RefObject } from 'react';
2
+ import { AddressCountrySelectName, AddressInputName } from '../typings/index';
3
+ import { AddressField } from '../reducers/AddressReducer';
4
+ export declare type DefaultContextAddress = {
5
+ validation?: () => RefObject<any>;
6
+ setValue?: (name: AddressField | AddressInputName | AddressCountrySelectName, value: any) => void;
7
+ errors?: Record<string, {
8
+ code: string;
9
+ message: string;
10
+ error: boolean;
11
+ }>[];
12
+ errorClassName?: string;
13
+ requiresBillingInfo?: boolean;
14
+ resetField?: (name: string) => void;
15
+ values?: Record<string, any>;
16
+ };
17
+ declare const BillingAddressFormContext: import("react").Context<DefaultContextAddress>;
18
+ export default BillingAddressFormContext;
@@ -0,0 +1 @@
1
+ import{createContext}from"react";const BillingAddressFormContext=createContext({});export default BillingAddressFormContext;
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
- export interface CommerceLayerConfig {
3
- accessToken: string;
4
- endpoint: string;
5
- cache: boolean;
6
- }
7
- declare const CommerceLayerContext: import("react").Context<CommerceLayerConfig>;
8
- export default CommerceLayerContext;
1
+ /// <reference types="react" />
2
+ export interface CommerceLayerConfig {
3
+ accessToken: string;
4
+ endpoint: string;
5
+ }
6
+ declare const CommerceLayerContext: import("react").Context<CommerceLayerConfig>;
7
+ export default CommerceLayerContext;
@@ -0,0 +1 @@
1
+ import{createContext}from"react";const initial={accessToken:"",endpoint:""},CommerceLayerContext=createContext(initial);export default CommerceLayerContext;
@@ -1,7 +1,7 @@
1
- import { RefObject } from 'react';
2
- declare type DefaultContext = {
3
- validation?: () => RefObject<any>;
4
- setValue?: (name: string, value: string) => void;
5
- };
6
- declare const CouponAndGiftCardFormContext: import("react").Context<DefaultContext>;
7
- export default CouponAndGiftCardFormContext;
1
+ import { RefObject } from 'react';
2
+ declare type DefaultContext = {
3
+ validation?: () => RefObject<any>;
4
+ setValue?: (name: string, value: string) => void;
5
+ };
6
+ declare const CouponAndGiftCardFormContext: import("react").Context<DefaultContext>;
7
+ export default CouponAndGiftCardFormContext;
@@ -0,0 +1 @@
1
+ import{createContext}from"react";const CouponAndGiftCardFormContext=createContext({});export default CouponAndGiftCardFormContext;
@@ -1,18 +1,16 @@
1
- /// <reference types="react" />
2
- import { SetCustomerEmail, SetCustomerErrors, CustomerState, DeleteCustomerAddress, GetCustomerAddresses } from "../reducers/CustomerReducer";
3
- declare type DefaultContext = {
4
- saveCustomerUser: (customerEmail: string) => Promise<void>;
5
- setCustomerErrors: SetCustomerErrors;
6
- setCustomerEmail: SetCustomerEmail;
7
- deleteCustomerAddress: DeleteCustomerAddress;
8
- getCustomerAddresses: GetCustomerAddresses;
9
- } & Partial<CustomerState>;
10
- export declare const defaultCustomerContext: {
11
- saveCustomerUser: () => Promise<void>;
12
- setCustomerErrors: SetCustomerErrors;
13
- setCustomerEmail: SetCustomerEmail;
14
- deleteCustomerAddress: DeleteCustomerAddress;
15
- getCustomerAddresses: GetCustomerAddresses;
16
- };
17
- declare const CustomerContext: import("react").Context<DefaultContext>;
18
- export default CustomerContext;
1
+ /// <reference types="react" />
2
+ import { SetCustomerEmail, SetCustomerErrors, CustomerState } from '../reducers/CustomerReducer';
3
+ declare type DefaultContext = {
4
+ saveCustomerUser: (customerEmail: string) => Promise<void>;
5
+ setCustomerErrors: SetCustomerErrors;
6
+ setCustomerEmail: SetCustomerEmail;
7
+ getCustomerPaymentSources: () => Promise<void>;
8
+ } & Partial<CustomerState>;
9
+ export declare const defaultCustomerContext: {
10
+ saveCustomerUser: () => Promise<void>;
11
+ getCustomerPaymentSources: () => Promise<void>;
12
+ setCustomerErrors: SetCustomerErrors;
13
+ setCustomerEmail: SetCustomerEmail;
14
+ };
15
+ declare const CustomerContext: import("react").Context<DefaultContext>;
16
+ export default CustomerContext;
@@ -0,0 +1 @@
1
+ import{setCustomerErrors,setCustomerEmail}from"../reducers/CustomerReducer";import{createContext}from"react";export const defaultCustomerContext={saveCustomerUser:async()=>{},getCustomerPaymentSources:async()=>{},setCustomerErrors,setCustomerEmail};const CustomerContext=createContext(defaultCustomerContext);export default CustomerContext;
@@ -1,12 +1,12 @@
1
- /// <reference types="react" />
2
- declare type Context = {
3
- url: string | null;
4
- callExternalFunction: CallExternalFunction;
5
- };
6
- declare type CallExternalFunction = (params: {
7
- url: string;
8
- data: Record<string, any>;
9
- }) => Promise<Record<string, any>>;
10
- export declare const callExternalFunction: CallExternalFunction;
11
- declare const ExternalFunctionContext: import("react").Context<Context>;
12
- export default ExternalFunctionContext;
1
+ /// <reference types="react" />
2
+ declare type Context = {
3
+ url: string | null;
4
+ callExternalFunction: CallExternalFunction;
5
+ };
6
+ declare type CallExternalFunction = (params: {
7
+ url: string;
8
+ data: Record<string, any>;
9
+ }) => Promise<Record<string, any>>;
10
+ export declare const callExternalFunction: CallExternalFunction;
11
+ declare const ExternalFunctionContext: import("react").Context<Context>;
12
+ export default ExternalFunctionContext;
@@ -0,0 +1 @@
1
+ import{createContext}from"react";import axios from"axios";export const callExternalFunction=async({url,data})=>axios.post(url,data);const ExternalFunctionContext=createContext({url:null,callExternalFunction});export default ExternalFunctionContext;
@@ -1,11 +1,11 @@
1
- /// <reference types="react" />
2
- import { GiftCardState, GiftCardRecipientI, GiftCardI } from "../reducers/GiftCardReducer";
3
- import { BaseError } from "../typings/errors";
4
- export interface GCContext extends GiftCardState {
5
- addGiftCardRecipient: (values: GiftCardRecipientI & object) => void;
6
- addGiftCard: (values: GiftCardI & object) => void;
7
- addGiftCardError: (errors: BaseError[]) => void;
8
- addGiftCardLoading: (loading: boolean) => void;
9
- }
10
- declare const GiftCardContext: import("react").Context<GCContext>;
11
- export default GiftCardContext;
1
+ /// <reference types="react" />
2
+ import { GiftCardState, GiftCardRecipientI, GiftCardI } from '../reducers/GiftCardReducer';
3
+ import { BaseError } from '../typings/errors';
4
+ export interface GCContext extends GiftCardState {
5
+ addGiftCardRecipient: (values: GiftCardRecipientI & object) => void;
6
+ addGiftCard: (values: GiftCardI & object) => void;
7
+ addGiftCardError: (errors: BaseError[]) => void;
8
+ addGiftCardLoading: (loading: boolean) => void;
9
+ }
10
+ declare const GiftCardContext: import("react").Context<GCContext>;
11
+ export default GiftCardContext;
@@ -0,0 +1 @@
1
+ import{createContext}from"react";import{giftCardInitialState}from"../reducers/GiftCardReducer";const GiftCardContext=createContext(giftCardInitialState);export default GiftCardContext;
@@ -1,13 +1,13 @@
1
- /// <reference types="react" />
2
- import { ItemState, Items, ItemQuantity, ItemOptions, ItemPrices, CustomLineItems } from "../reducers/ItemReducer";
3
- export interface InitItemContext extends Partial<ItemState> {
4
- item: Items;
5
- items: Items;
6
- quantity: ItemQuantity;
7
- option: ItemOptions;
8
- prices: ItemPrices;
9
- lineItems: CustomLineItems;
10
- }
11
- export declare const initialItemContext: InitItemContext;
12
- declare const ItemContext: import("react").Context<InitItemContext>;
13
- export default ItemContext;
1
+ /// <reference types="react" />
2
+ import { ItemState, Items, ItemQuantity, ItemOptions, ItemPrices, CustomLineItems } from '../reducers/ItemReducer';
3
+ export interface InitItemContext extends Partial<ItemState> {
4
+ item: Items;
5
+ items: Items;
6
+ quantity: ItemQuantity;
7
+ option: ItemOptions;
8
+ prices: ItemPrices;
9
+ lineItems: CustomLineItems;
10
+ }
11
+ export declare const initialItemContext: InitItemContext;
12
+ declare const ItemContext: import("react").Context<InitItemContext>;
13
+ export default ItemContext;
@@ -0,0 +1 @@
1
+ import{createContext}from"react";export const initialItemContext={item:{},items:{},quantity:{},option:{},prices:{},lineItems:{}};const ItemContext=createContext(initialItemContext);export default ItemContext;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { LineItem } from '@commercelayer/sdk';
3
+ export declare type InitialLineItemContext = Partial<{
4
+ lineItem: LineItem;
5
+ }>;
6
+ declare const LineItemChildrenContext: import("react").Context<Partial<{
7
+ lineItem: LineItem;
8
+ }>>;
9
+ export default LineItemChildrenContext;
@@ -0,0 +1 @@
1
+ import{createContext}from"react";const initial={},LineItemChildrenContext=createContext(initial);export default LineItemChildrenContext;
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
2
- import { LineItemState } from "../reducers/LineItemReducer";
3
- import { LineItemCollection } from '@commercelayer/js-sdk';
4
- export interface LineItemContextValue extends LineItemState {
5
- lineItems: LineItemCollection[] | undefined;
6
- }
7
- declare const LineItemContext: import("react").Context<LineItemContextValue>;
8
- export default LineItemContext;
1
+ /// <reference types="react" />
2
+ import { LineItemState } from '../reducers/LineItemReducer';
3
+ import { LineItem } from '@commercelayer/sdk';
4
+ export interface LineItemContextValue extends LineItemState {
5
+ lineItems: LineItem[] | undefined;
6
+ }
7
+ declare const LineItemContext: import("react").Context<LineItemContextValue>;
8
+ export default LineItemContext;
@@ -0,0 +1 @@
1
+ import{createContext}from"react";const initial={lineItems:[]},LineItemContext=createContext(initial);export default LineItemContext;
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
2
- import { LineItemOptionCollection } from '@commercelayer/js-sdk';
3
- export interface InitialLineItemContext {
4
- lineItemOption: Partial<LineItemOptionCollection>;
5
- showAll?: boolean;
6
- }
7
- declare const LineItemOptionChildrenContext: import("react").Context<InitialLineItemContext>;
8
- export default LineItemOptionChildrenContext;
1
+ /// <reference types="react" />
2
+ import { LineItemOption } from '@commercelayer/sdk';
3
+ export interface InitialLineItemContext {
4
+ lineItemOption: Partial<LineItemOption>;
5
+ showAll?: boolean;
6
+ }
7
+ declare const LineItemOptionChildrenContext: import("react").Context<InitialLineItemContext>;
8
+ export default LineItemOptionChildrenContext;
@@ -0,0 +1 @@
1
+ import{createContext}from"react";const initial={lineItemOption:{}},LineItemOptionChildrenContext=createContext(initial);export default LineItemOptionChildrenContext;
@@ -0,0 +1,26 @@
1
+ /// <reference types="react" />
2
+ import { AddToCart, OrderState, CreateOrder, SetGiftCardOrCouponCode, RemoveGiftCardOrCouponCode, SaveAddressToCustomerAddressBook, setOrderErrors, addResourceToInclude, updateOrder, getOrderContext } from '../reducers/OrderReducer';
3
+ declare type DefaultContext = {
4
+ createOrder: CreateOrder;
5
+ addToCart: AddToCart;
6
+ setOrderErrors: typeof setOrderErrors;
7
+ setGiftCardOrCouponCode: SetGiftCardOrCouponCode;
8
+ removeGiftCardOrCouponCode: RemoveGiftCardOrCouponCode;
9
+ saveAddressToCustomerAddressBook: SaveAddressToCustomerAddressBook;
10
+ addResourceToInclude: typeof addResourceToInclude;
11
+ getOrder: getOrderContext;
12
+ updateOrder: typeof updateOrder;
13
+ } & OrderState;
14
+ export declare const defaultOrderContext: {
15
+ addToCart: AddToCart;
16
+ createOrder: CreateOrder;
17
+ setOrderErrors: typeof setOrderErrors;
18
+ setGiftCardOrCouponCode: SetGiftCardOrCouponCode;
19
+ removeGiftCardOrCouponCode: RemoveGiftCardOrCouponCode;
20
+ saveAddressToCustomerAddressBook: SaveAddressToCustomerAddressBook;
21
+ addResourceToInclude: typeof addResourceToInclude;
22
+ getOrder: (_id: string) => Promise<void>;
23
+ updateOrder: typeof updateOrder;
24
+ };
25
+ declare const OrderContext: import("react").Context<DefaultContext>;
26
+ export default OrderContext;
@@ -0,0 +1 @@
1
+ import{createContext}from"react";import{addToCart,setOrderErrors,createOrder,setGiftCardOrCouponCode,removeGiftCardOrCouponCode,saveAddressToCustomerAddressBook,addResourceToInclude,updateOrder}from"../reducers/OrderReducer";export const defaultOrderContext={addToCart,createOrder,setOrderErrors,setGiftCardOrCouponCode,removeGiftCardOrCouponCode,saveAddressToCustomerAddressBook,addResourceToInclude,getOrder:async _id=>{},updateOrder};const OrderContext=createContext(defaultOrderContext);export default OrderContext;
@@ -1,11 +1,11 @@
1
- /// <reference types="react" />
2
- import { getLocalOrder, setLocalOrder, deleteLocalOrder } from "../utils/localStorage";
3
- export interface OrderStorageConfig {
4
- persistKey: string;
5
- clearWhenPlaced: boolean;
6
- getLocalOrder: typeof getLocalOrder;
7
- setLocalOrder: typeof setLocalOrder;
8
- deleteLocalOrder: typeof deleteLocalOrder;
9
- }
10
- declare const OrderStorageContext: import("react").Context<OrderStorageConfig>;
11
- export default OrderStorageContext;
1
+ /// <reference types="react" />
2
+ import { getLocalOrder, setLocalOrder, deleteLocalOrder } from '../utils/localStorage';
3
+ export interface OrderStorageConfig {
4
+ persistKey: string;
5
+ clearWhenPlaced: boolean;
6
+ getLocalOrder: typeof getLocalOrder;
7
+ setLocalOrder: typeof setLocalOrder;
8
+ deleteLocalOrder: typeof deleteLocalOrder;
9
+ }
10
+ declare const OrderStorageContext: import("react").Context<OrderStorageConfig>;
11
+ export default OrderStorageContext;
@@ -0,0 +1 @@
1
+ import{createContext}from"react";import{getLocalOrder,setLocalOrder,deleteLocalOrder}from"../utils/localStorage";const initial={persistKey:"",clearWhenPlaced:!0,getLocalOrder,setLocalOrder,deleteLocalOrder},OrderStorageContext=createContext(initial);export default OrderStorageContext;
@@ -1,10 +1,10 @@
1
- /// <reference types="react" />
2
- import { PaymentMethodCollection } from '@commercelayer/js-sdk';
3
- export interface InitialPaymentMethodChildrenContext {
4
- payment?: PaymentMethodCollection;
5
- clickableContainer?: boolean;
6
- paymentSelected?: string;
7
- setPaymentSelected?: (paymentId: string) => void;
8
- }
9
- declare const PaymentMethodChildrenContext: import("react").Context<InitialPaymentMethodChildrenContext>;
10
- export default PaymentMethodChildrenContext;
1
+ /// <reference types="react" />
2
+ import { PaymentMethod } from '@commercelayer/sdk';
3
+ export interface InitialPaymentMethodChildrenContext {
4
+ payment?: PaymentMethod;
5
+ clickableContainer?: boolean;
6
+ paymentSelected?: string;
7
+ setPaymentSelected?: (paymentId: string) => void;
8
+ }
9
+ declare const PaymentMethodChildrenContext: import("react").Context<InitialPaymentMethodChildrenContext>;
10
+ export default PaymentMethodChildrenContext;
@@ -0,0 +1 @@
1
+ import{createContext}from"react";const initial={},PaymentMethodChildrenContext=createContext(initial);export default PaymentMethodChildrenContext;
@@ -1,20 +1,23 @@
1
- /// <reference types="react" />
2
- import { PaymentMethodState, SetPaymentMethodErrors, SetPaymentSource, SetPaymentMethod, DestroyPaymentSource, SetPaymentRef, setLoading } from "../reducers/PaymentMethodReducer";
3
- declare type DefaultContext = {
4
- setPaymentMethodErrors: SetPaymentMethodErrors;
5
- setPaymentMethod: SetPaymentMethod;
6
- setPaymentSource: SetPaymentSource;
7
- setPaymentRef: SetPaymentRef;
8
- destroyPaymentSource: DestroyPaymentSource;
9
- setLoading: typeof setLoading;
10
- } & PaymentMethodState;
11
- export declare const defaultPaymentMethodContext: {
12
- setPaymentMethodErrors: SetPaymentMethodErrors;
13
- setPaymentMethod: SetPaymentMethod;
14
- setPaymentSource: SetPaymentSource;
15
- setPaymentRef: SetPaymentRef;
16
- destroyPaymentSource: DestroyPaymentSource;
17
- setLoading: typeof setLoading;
18
- };
19
- declare const PaymentMethodContext: import("react").Context<DefaultContext>;
20
- export default PaymentMethodContext;
1
+ /// <reference types="react" />
2
+ import { UpdatePaymentSource } from '../reducers/PaymentMethodReducer';
3
+ import { PaymentMethodState, SetPaymentMethodErrors, SetPaymentSource, SetPaymentMethod, DestroyPaymentSource, SetPaymentRef, setLoading } from '../reducers/PaymentMethodReducer';
4
+ declare type DefaultContext = {
5
+ setPaymentMethodErrors: SetPaymentMethodErrors;
6
+ setPaymentMethod: SetPaymentMethod;
7
+ setPaymentSource: SetPaymentSource;
8
+ setPaymentRef: SetPaymentRef;
9
+ destroyPaymentSource: DestroyPaymentSource;
10
+ updatePaymentSource: UpdatePaymentSource;
11
+ setLoading: typeof setLoading;
12
+ } & PaymentMethodState;
13
+ export declare const defaultPaymentMethodContext: {
14
+ setPaymentMethodErrors: SetPaymentMethodErrors;
15
+ setPaymentMethod: SetPaymentMethod;
16
+ setPaymentSource: SetPaymentSource;
17
+ setPaymentRef: SetPaymentRef;
18
+ destroyPaymentSource: DestroyPaymentSource;
19
+ updatePaymentSource: UpdatePaymentSource;
20
+ setLoading: typeof setLoading;
21
+ };
22
+ declare const PaymentMethodContext: import("react").Context<DefaultContext>;
23
+ export default PaymentMethodContext;
@@ -0,0 +1 @@
1
+ import{createContext}from"react";import{updatePaymentSource}from"../reducers/PaymentMethodReducer";import{setPaymentMethodErrors,setPaymentSource,setPaymentMethod,destroyPaymentSource,setPaymentRef,setLoading}from"../reducers/PaymentMethodReducer";export const defaultPaymentMethodContext={setPaymentMethodErrors,setPaymentMethod,setPaymentSource,setPaymentRef,destroyPaymentSource,updatePaymentSource,setLoading};const PaymentMethodContext=createContext(defaultPaymentMethodContext);export default PaymentMethodContext;
@@ -1,14 +1,14 @@
1
- /// <reference types="react" />
2
- export declare type iconBrand = 'visa' | 'credit-card' | 'amex' | 'mastercard' | 'jcb' | 'wire-transfer' | 'maestro' | 'cirrus' | 'paypal';
3
- declare type DefaultContext = {
4
- brand?: iconBrand;
5
- expMonth?: number;
6
- expYear?: number;
7
- last4?: string;
8
- showCard?: boolean;
9
- readonly?: boolean;
10
- handleEditClick?: () => void;
11
- };
12
- export declare const defaultPaymentSourceContext: {};
13
- declare const PaymentSourceContext: import("react").Context<DefaultContext>;
14
- export default PaymentSourceContext;
1
+ /// <reference types="react" />
2
+ export declare type iconBrand = 'visa' | 'credit-card' | 'amex' | 'mastercard' | 'jcb' | 'wire-transfer' | 'maestro' | 'cirrus' | 'paypal';
3
+ declare type DefaultContext = {
4
+ brand?: iconBrand;
5
+ exp_month?: number;
6
+ exp_year?: number;
7
+ last4?: string;
8
+ showCard?: boolean;
9
+ readonly?: boolean;
10
+ handleEditClick?: (e: MouseEvent) => void;
11
+ };
12
+ export declare const defaultPaymentSourceContext: {};
13
+ declare const PaymentSourceContext: import("react").Context<DefaultContext>;
14
+ export default PaymentSourceContext;