@commercelayer/react-components 2.53.3 → 3.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (384) hide show
  1. package/LICENSE +2 -2
  2. package/README.md +3 -3
  3. package/lib/components/AdyenPayment.d.ts +3 -3
  4. package/lib/components/AdyenPayment.js +1 -1
  5. package/lib/components/AvailabilityContainer.d.ts +10 -3
  6. package/lib/components/AvailabilityContainer.js +1 -1
  7. package/lib/components/AvailabilityTemplate.d.ts +13 -4
  8. package/lib/components/AvailabilityTemplate.js +1 -1
  9. package/lib/components/BillingAddressContainer.d.ts +7 -2
  10. package/lib/components/BillingAddressContainer.js +1 -1
  11. package/lib/components/BillingAddressForm.d.ts +8 -3
  12. package/lib/components/BillingAddressForm.js +1 -1
  13. package/lib/components/BraintreePayment.d.ts +3 -3
  14. package/lib/components/BraintreePayment.js +1 -1
  15. package/lib/components/CheckoutComPayment.d.ts +23 -0
  16. package/lib/components/CheckoutComPayment.js +1 -0
  17. package/lib/components/CheckoutLink.d.ts +16 -4
  18. package/lib/components/CheckoutLink.js +1 -1
  19. package/lib/components/DeliveryLeadTime.d.ts +11 -4
  20. package/lib/components/DeliveryLeadTime.js +1 -1
  21. package/lib/components/DiscountAmount.d.ts +16 -2
  22. package/lib/components/DiscountAmount.js +1 -1
  23. package/lib/components/Errors.d.ts +4 -4
  24. package/lib/components/Errors.js +1 -1
  25. package/lib/components/ExternalFunction.d.ts +9 -2
  26. package/lib/components/ExternalFunction.js +1 -1
  27. package/lib/components/GiftCard.d.ts +13 -3
  28. package/lib/components/GiftCard.js +1 -1
  29. package/lib/components/GiftCardContainer.d.ts +9 -3
  30. package/lib/components/GiftCardContainer.js +1 -1
  31. package/lib/components/GiftCardCurrencySelector.d.ts +18 -3
  32. package/lib/components/GiftCardCurrencySelector.js +1 -1
  33. package/lib/components/GiftCardInput.d.ts +12 -3
  34. package/lib/components/GiftCardInput.js +1 -1
  35. package/lib/components/GiftCardOrCouponCode.d.ts +17 -6
  36. package/lib/components/GiftCardOrCouponCode.js +1 -1
  37. package/lib/components/GiftCardOrCouponForm.d.ts +9 -4
  38. package/lib/components/GiftCardOrCouponForm.js +1 -1
  39. package/lib/components/GiftCardOrCouponInput.d.ts +14 -3
  40. package/lib/components/GiftCardOrCouponInput.js +1 -1
  41. package/lib/components/GiftCardOrCouponRemoveButton.d.ts +15 -5
  42. package/lib/components/GiftCardOrCouponRemoveButton.js +1 -1
  43. package/lib/components/GiftCardOrCouponSubmit.d.ts +11 -4
  44. package/lib/components/GiftCardOrCouponSubmit.js +1 -1
  45. package/lib/components/ItemContainer.d.ts +14 -3
  46. package/lib/components/ItemContainer.js +1 -1
  47. package/lib/components/KlarnaPayment.d.ts +10 -0
  48. package/lib/components/KlarnaPayment.js +1 -0
  49. package/lib/components/LineItem.d.ts +10 -3
  50. package/lib/components/LineItem.js +1 -1
  51. package/lib/components/LineItemAmount.d.ts +16 -3
  52. package/lib/components/LineItemAmount.js +1 -1
  53. package/lib/components/LineItemCode.d.ts +10 -4
  54. package/lib/components/LineItemCode.js +1 -1
  55. package/lib/components/LineItemImage.d.ts +11 -4
  56. package/lib/components/LineItemImage.js +1 -1
  57. package/lib/components/LineItemName.d.ts +11 -5
  58. package/lib/components/LineItemName.js +1 -1
  59. package/lib/components/LineItemOption.d.ts +15 -4
  60. package/lib/components/LineItemOption.js +1 -1
  61. package/lib/components/LineItemOptions.d.ts +8 -3
  62. package/lib/components/LineItemOptions.js +1 -1
  63. package/lib/components/LineItemQuantity.d.ts +16 -4
  64. package/lib/components/LineItemQuantity.js +1 -1
  65. package/lib/components/LineItemRemoveLink.d.ts +15 -5
  66. package/lib/components/LineItemRemoveLink.js +1 -1
  67. package/lib/components/LineItemsContainer.d.ts +15 -3
  68. package/lib/components/LineItemsContainer.js +1 -1
  69. package/lib/components/LineItemsCount.d.ts +14 -4
  70. package/lib/components/LineItemsCount.js +1 -1
  71. package/lib/components/LineItemsEmpty.d.ts +13 -2
  72. package/lib/components/LineItemsEmpty.js +1 -1
  73. package/lib/components/MetadataInput.d.ts +13 -3
  74. package/lib/components/MetadataInput.js +1 -1
  75. package/lib/components/PaymentGateway.d.ts +4 -4
  76. package/lib/components/PaymentGateway.js +1 -1
  77. package/lib/components/PaymentMethod.d.ts +9 -3
  78. package/lib/components/PaymentMethod.js +1 -1
  79. package/lib/components/PaymentMethodAmount.d.ts +16 -2
  80. package/lib/components/PaymentMethodAmount.js +1 -1
  81. package/lib/components/PaymentMethodName.d.ts +10 -4
  82. package/lib/components/PaymentMethodName.js +1 -1
  83. package/lib/components/PaymentMethodPrice.d.ts +15 -4
  84. package/lib/components/PaymentMethodPrice.js +1 -1
  85. package/lib/components/PaymentMethodRadioButton.d.ts +11 -4
  86. package/lib/components/PaymentMethodRadioButton.js +1 -1
  87. package/lib/components/PaymentMethodsContainer.d.ts +9 -3
  88. package/lib/components/PaymentMethodsContainer.js +1 -1
  89. package/lib/components/PaymentSource.d.ts +9 -2
  90. package/lib/components/PaymentSource.js +1 -1
  91. package/lib/components/PaymentSourceBrandIcon.d.ts +14 -4
  92. package/lib/components/PaymentSourceBrandIcon.js +1 -1
  93. package/lib/components/PaymentSourceBrandName.d.ts +11 -4
  94. package/lib/components/PaymentSourceBrandName.js +1 -1
  95. package/lib/components/PaymentSourceDetail.d.ts +8 -2
  96. package/lib/components/PaymentSourceDetail.js +1 -1
  97. package/lib/components/PaymentSourceEditButton.d.ts +9 -2
  98. package/lib/components/PaymentSourceEditButton.js +1 -1
  99. package/lib/components/PaypalPayment.d.ts +2 -2
  100. package/lib/components/PaypalPayment.js +1 -1
  101. package/lib/components/Price.d.ts +15 -3
  102. package/lib/components/Price.js +1 -1
  103. package/lib/components/PricesContainer.d.ts +19 -3
  104. package/lib/components/PricesContainer.js +1 -1
  105. package/lib/components/QuantitySelector.d.ts +19 -5
  106. package/lib/components/QuantitySelector.js +1 -1
  107. package/lib/components/SaveAddressesButton.d.ts +18 -5
  108. package/lib/components/SaveAddressesButton.js +1 -1
  109. package/lib/components/SaveCustomerButton.d.ts +16 -5
  110. package/lib/components/SaveCustomerButton.js +1 -1
  111. package/lib/components/Shipment.d.ts +9 -2
  112. package/lib/components/Shipment.js +1 -1
  113. package/lib/components/ShipmentField.d.ts +11 -4
  114. package/lib/components/ShipmentField.js +1 -1
  115. package/lib/components/ShipmentsContainer.d.ts +9 -3
  116. package/lib/components/ShipmentsContainer.js +1 -1
  117. package/lib/components/ShippingAddressContainer.d.ts +7 -2
  118. package/lib/components/ShippingAddressContainer.js +1 -1
  119. package/lib/components/ShippingAddressForm.d.ts +8 -3
  120. package/lib/components/ShippingAddressForm.js +1 -1
  121. package/lib/components/ShippingAmount.d.ts +13 -2
  122. package/lib/components/ShippingAmount.js +1 -1
  123. package/lib/components/ShippingMethod.d.ts +10 -3
  124. package/lib/components/ShippingMethod.js +1 -1
  125. package/lib/components/ShippingMethodName.d.ts +11 -5
  126. package/lib/components/ShippingMethodName.js +1 -1
  127. package/lib/components/ShippingMethodPrice.d.ts +15 -3
  128. package/lib/components/ShippingMethodPrice.js +1 -1
  129. package/lib/components/ShippingMethodRadioButton.d.ts +11 -5
  130. package/lib/components/ShippingMethodRadioButton.js +1 -1
  131. package/lib/components/StockTransfer.d.ts +9 -3
  132. package/lib/components/StockTransfer.js +1 -1
  133. package/lib/components/StockTransferField.d.ts +9 -8
  134. package/lib/components/StockTransferField.js +1 -1
  135. package/lib/components/StripePayment.d.ts +3 -3
  136. package/lib/components/StripePayment.js +1 -1
  137. package/lib/components/SubmitButton.d.ts +15 -5
  138. package/lib/components/SubmitButton.js +1 -1
  139. package/lib/components/VariantSelector.d.ts +28 -5
  140. package/lib/components/VariantSelector.js +1 -1
  141. package/lib/components/VariantsContainer.d.ts +15 -3
  142. package/lib/components/VariantsContainer.js +1 -1
  143. package/lib/components/WireTransferPayment.d.ts +2 -2
  144. package/lib/components/WireTransferPayment.js +1 -1
  145. package/lib/components/addresses/Address.d.ts +18 -0
  146. package/lib/components/addresses/Address.js +1 -0
  147. package/lib/components/addresses/AddressCountrySelector.d.ts +26 -0
  148. package/lib/components/addresses/AddressCountrySelector.js +1 -0
  149. package/lib/components/addresses/AddressField.d.ts +43 -0
  150. package/lib/components/addresses/AddressField.js +1 -0
  151. package/lib/components/addresses/AddressInput.d.ts +19 -0
  152. package/lib/components/addresses/AddressInput.js +1 -0
  153. package/lib/components/addresses/AddressStateSelector.d.ts +27 -0
  154. package/lib/components/addresses/AddressStateSelector.js +1 -0
  155. package/lib/components/addresses/AddressesContainer.d.ts +15 -0
  156. package/lib/components/addresses/AddressesContainer.js +1 -0
  157. package/lib/components/auth/CommerceLayer.d.ts +15 -0
  158. package/lib/components/auth/CommerceLayer.js +1 -0
  159. package/lib/components/customers/CustomerAddressForm.d.ts +13 -0
  160. package/lib/components/customers/CustomerAddressForm.js +1 -0
  161. package/lib/components/customers/CustomerContainer.d.ts +17 -0
  162. package/lib/components/customers/CustomerContainer.js +1 -0
  163. package/lib/components/customers/CustomerField.d.ts +10 -0
  164. package/lib/components/customers/CustomerField.js +1 -0
  165. package/lib/components/customers/CustomerInput.d.ts +23 -0
  166. package/lib/components/customers/CustomerInput.js +1 -0
  167. package/lib/components/gateways/AdyenGateway.d.ts +2 -2
  168. package/lib/components/gateways/AdyenGateway.js +1 -1
  169. package/lib/components/gateways/BraintreeGateway.d.ts +2 -2
  170. package/lib/components/gateways/BraintreeGateway.js +1 -1
  171. package/lib/components/gateways/CheckoutComGateway.d.ts +5 -0
  172. package/lib/components/gateways/CheckoutComGateway.js +1 -0
  173. package/lib/components/gateways/KlarnaGateway.d.ts +5 -0
  174. package/lib/components/gateways/KlarnaGateway.js +1 -0
  175. package/lib/components/gateways/PaypalGateway.d.ts +3 -3
  176. package/lib/components/gateways/PaypalGateway.js +1 -1
  177. package/lib/components/gateways/StripeGateway.d.ts +2 -2
  178. package/lib/components/gateways/StripeGateway.js +1 -1
  179. package/lib/components/gateways/WireTransferGateway.d.ts +2 -2
  180. package/lib/components/gateways/WireTransferGateway.js +1 -1
  181. package/lib/components/orders/AddToCartButton.d.ts +34 -0
  182. package/lib/components/orders/AddToCartButton.js +1 -0
  183. package/lib/components/orders/AdjustmentAmount.d.ts +18 -0
  184. package/lib/components/orders/AdjustmentAmount.js +1 -0
  185. package/lib/components/orders/CartLink.d.ts +12 -0
  186. package/lib/components/orders/CartLink.js +1 -0
  187. package/lib/components/orders/GiftCardAmount.d.ts +15 -0
  188. package/lib/components/orders/GiftCardAmount.js +1 -0
  189. package/lib/components/orders/OrderContainer.d.ts +26 -0
  190. package/lib/components/orders/OrderContainer.js +1 -0
  191. package/lib/components/orders/OrderList.d.ts +61 -0
  192. package/lib/components/orders/OrderList.js +1 -0
  193. package/lib/components/orders/OrderListRow.d.ts +30 -0
  194. package/lib/components/orders/OrderListRow.js +1 -0
  195. package/lib/components/orders/OrderNumber.d.ts +11 -0
  196. package/lib/components/orders/OrderNumber.js +1 -0
  197. package/lib/components/orders/OrderStorage.d.ts +16 -0
  198. package/lib/components/orders/OrderStorage.js +1 -0
  199. package/lib/components/orders/PlaceOrderButton.d.ts +24 -0
  200. package/lib/components/orders/PlaceOrderButton.js +1 -0
  201. package/lib/components/orders/PlaceOrderContainer.d.ts +14 -0
  202. package/lib/components/orders/PlaceOrderContainer.js +1 -0
  203. package/lib/components/orders/PrivacyAndTermsCheckbox.d.ts +10 -0
  204. package/lib/components/orders/PrivacyAndTermsCheckbox.js +1 -0
  205. package/lib/components/orders/SubTotalAmount.d.ts +18 -0
  206. package/lib/components/orders/SubTotalAmount.js +1 -0
  207. package/lib/components/orders/TaxesAmount.d.ts +18 -0
  208. package/lib/components/orders/TaxesAmount.js +1 -0
  209. package/lib/components/orders/TotalAmount.d.ts +18 -0
  210. package/lib/components/orders/TotalAmount.js +1 -0
  211. package/lib/components/skus/SkuField.d.ts +14 -0
  212. package/lib/components/skus/SkuField.js +1 -0
  213. package/lib/components/skus/SkuList.d.ts +14 -0
  214. package/lib/components/skus/SkuList.js +1 -0
  215. package/lib/components/skus/SkuListsContainer.d.ts +12 -0
  216. package/lib/components/skus/SkuListsContainer.js +1 -0
  217. package/lib/components/skus/SkuOption.d.ts +14 -0
  218. package/lib/components/skus/SkuOption.js +1 -0
  219. package/lib/components/skus/SkuOptionInput.d.ts +15 -0
  220. package/lib/components/skus/SkuOptionInput.js +1 -0
  221. package/lib/components/skus/SkuOptionsContainer.d.ts +14 -0
  222. package/lib/components/skus/SkuOptionsContainer.js +1 -0
  223. package/lib/components/skus/Skus.d.ts +11 -0
  224. package/lib/components/skus/Skus.js +1 -0
  225. package/lib/components/skus/SkusContainer.d.ts +23 -0
  226. package/lib/components/skus/SkusContainer.js +1 -0
  227. package/lib/components/utils/AddressCardsTemplate.d.ts +1 -1
  228. package/lib/components/utils/AddressCardsTemplate.js +1 -1
  229. package/lib/components/utils/BaseField.js +1 -1
  230. package/lib/components/utils/BaseInput.d.ts +1 -1
  231. package/lib/components/utils/BaseInput.js +1 -1
  232. package/lib/components/utils/BaseOrderPrice.js +1 -1
  233. package/lib/components/utils/BaseSelect.js +1 -1
  234. package/lib/components/utils/GenericFieldComponent.d.ts +42 -0
  235. package/lib/components/utils/GenericFieldComponent.js +1 -0
  236. package/lib/components/utils/Parent.d.ts +3 -5
  237. package/lib/components/utils/Parent.js +1 -1
  238. package/lib/components/utils/PaymentCardsTemplate.d.ts +2 -2
  239. package/lib/components/utils/PaymentCardsTemplate.js +1 -1
  240. package/lib/components/utils/PriceTemplate.d.ts +2 -2
  241. package/lib/components/utils/PriceTemplate.js +1 -1
  242. package/lib/components/utils/VariantTemplate.js +1 -1
  243. package/lib/components/utils/getAllErrors.js +1 -1
  244. package/lib/config/components.d.ts +77 -35
  245. package/lib/config/components.js +1 -1
  246. package/lib/context/AddressChildrenContext.d.ts +1 -1
  247. package/lib/context/AddressChildrenContext.js +1 -1
  248. package/lib/context/AddressContext.d.ts +1 -1
  249. package/lib/context/BillingAddressContext.d.ts +2 -4
  250. package/lib/context/BillingAddressContext.js +1 -1
  251. package/lib/context/BillingAddressFormContext.d.ts +17 -10
  252. package/lib/context/CouponAndGiftCardFormContext.d.ts +2 -0
  253. package/lib/context/CustomerAddressFormContext.d.ts +20 -0
  254. package/lib/context/CustomerAddressFormContext.js +1 -0
  255. package/lib/context/CustomerContext.d.ts +17 -11
  256. package/lib/context/CustomerContext.js +1 -1
  257. package/lib/context/OrderContext.d.ts +8 -4
  258. package/lib/context/OrderContext.js +1 -1
  259. package/lib/context/OrderListChildrenContext.d.ts +60 -0
  260. package/lib/context/OrderListChildrenContext.js +1 -0
  261. package/lib/context/PaymentSourceContext.d.ts +4 -4
  262. package/lib/context/PlaceOrderContext.d.ts +4 -2
  263. package/lib/context/ShippingAddressContext.d.ts +1 -1
  264. package/lib/context/SkuChildrenContext.d.ts +9 -0
  265. package/lib/context/SkuChildrenContext.js +1 -0
  266. package/lib/context/SkuContext.d.ts +9 -0
  267. package/lib/context/SkuContext.js +1 -0
  268. package/lib/index.d.ts +101 -90
  269. package/lib/index.js +1 -1
  270. package/lib/reducers/AddressReducer.d.ts +4 -2
  271. package/lib/reducers/AddressReducer.js +1 -1
  272. package/lib/reducers/AvailabilityReducer.d.ts +8 -0
  273. package/lib/reducers/AvailabilityReducer.js +1 -1
  274. package/lib/reducers/BillingAddressReducer.js +1 -1
  275. package/lib/reducers/CustomerReducer.d.ts +98 -17
  276. package/lib/reducers/CustomerReducer.js +1 -1
  277. package/lib/reducers/GiftCardReducer.js +1 -1
  278. package/lib/reducers/LineItemReducer.js +1 -1
  279. package/lib/reducers/OrderReducer.d.ts +24 -8
  280. package/lib/reducers/OrderReducer.js +1 -1
  281. package/lib/reducers/PaymentMethodReducer.d.ts +51 -5
  282. package/lib/reducers/PaymentMethodReducer.js +1 -1
  283. package/lib/reducers/PlaceOrderReducer.d.ts +9 -2
  284. package/lib/reducers/PlaceOrderReducer.js +1 -1
  285. package/lib/reducers/ShipmentReducer.js +1 -1
  286. package/lib/reducers/ShippingAddressReducer.js +1 -1
  287. package/lib/reducers/SkuReducer.d.ts +21 -0
  288. package/lib/reducers/SkuReducer.js +1 -0
  289. package/lib/reducers/VariantReducer.d.ts +1 -0
  290. package/lib/reducers/VariantReducer.js +1 -1
  291. package/lib/typings/errors.d.ts +13 -4
  292. package/lib/typings/errors.js +1 -1
  293. package/lib/typings/index.d.ts +17 -6
  294. package/lib/utils/addressesManager.d.ts +1 -1
  295. package/lib/utils/addressesManager.js +1 -1
  296. package/lib/utils/checkIncludeResource.d.ts +8 -0
  297. package/lib/utils/checkIncludeResource.js +1 -0
  298. package/lib/utils/childrenTypes.d.ts +1 -1
  299. package/lib/utils/childrenTypes.js +1 -1
  300. package/lib/utils/compareObjAttribute.d.ts +7 -0
  301. package/lib/utils/compareObjAttribute.js +1 -0
  302. package/lib/utils/customMessages.d.ts +1 -7
  303. package/lib/utils/customMessages.js +1 -1
  304. package/lib/utils/getCardDetails.d.ts +15 -0
  305. package/lib/utils/getCardDetails.js +1 -0
  306. package/lib/utils/getCartLink.d.ts +7 -0
  307. package/lib/utils/getCartLink.js +1 -0
  308. package/lib/utils/getCurrentItemKey.js +1 -1
  309. package/lib/utils/getErrors.d.ts +1 -1
  310. package/lib/utils/getErrors.js +1 -1
  311. package/lib/utils/getLineItemsCount.d.ts +8 -10
  312. package/lib/utils/getLineItemsCount.js +1 -1
  313. package/lib/utils/getLoaderComponent.js +1 -1
  314. package/lib/utils/getPrices.js +1 -1
  315. package/lib/utils/getSkus.js +1 -1
  316. package/lib/utils/hooks/useExternalScript.d.ts +1 -0
  317. package/lib/utils/hooks/useExternalScript.js +1 -0
  318. package/lib/utils/icons.d.ts +3 -0
  319. package/lib/utils/icons.js +1 -0
  320. package/lib/utils/isDate.d.ts +1 -0
  321. package/lib/utils/isDate.js +1 -0
  322. package/lib/utils/jwt.d.ts +1 -1
  323. package/lib/utils/placeholderImages.d.ts +2 -0
  324. package/lib/utils/placeholderImages.js +1 -0
  325. package/lib/utils/promisify.js +1 -1
  326. package/lib/utils/scrollbarWidth.d.ts +1 -0
  327. package/lib/utils/scrollbarWidth.js +1 -0
  328. package/lib/utils/shipments.d.ts +2 -1
  329. package/lib/utils/shipments.js +1 -1
  330. package/lib/utils/validateFormFields.d.ts +2 -0
  331. package/lib/utils/validateFormFields.js +1 -1
  332. package/package.json +96 -93
  333. package/lib/components/AddToCartButton.d.ts +0 -20
  334. package/lib/components/AddToCartButton.js +0 -1
  335. package/lib/components/Address.d.ts +0 -13
  336. package/lib/components/Address.js +0 -1
  337. package/lib/components/AddressCountrySelector.d.ts +0 -9
  338. package/lib/components/AddressCountrySelector.js +0 -1
  339. package/lib/components/AddressField.d.ts +0 -15
  340. package/lib/components/AddressField.js +0 -1
  341. package/lib/components/AddressInput.d.ts +0 -7
  342. package/lib/components/AddressInput.js +0 -1
  343. package/lib/components/AddressStateSelector.d.ts +0 -11
  344. package/lib/components/AddressStateSelector.js +0 -1
  345. package/lib/components/AddressesContainer.d.ts +0 -7
  346. package/lib/components/AddressesContainer.js +0 -1
  347. package/lib/components/AdjustmentAmount.d.ts +0 -4
  348. package/lib/components/AdjustmentAmount.js +0 -1
  349. package/lib/components/CommerceLayer.d.ts +0 -8
  350. package/lib/components/CommerceLayer.js +0 -1
  351. package/lib/components/CustomerContainer.d.ts +0 -7
  352. package/lib/components/CustomerContainer.js +0 -1
  353. package/lib/components/CustomerInput.d.ts +0 -11
  354. package/lib/components/CustomerInput.js +0 -1
  355. package/lib/components/GiftCardAmount.d.ts +0 -4
  356. package/lib/components/GiftCardAmount.js +0 -1
  357. package/lib/components/OrderContainer.d.ts +0 -11
  358. package/lib/components/OrderContainer.js +0 -1
  359. package/lib/components/OrderNumber.d.ts +0 -5
  360. package/lib/components/OrderNumber.js +0 -1
  361. package/lib/components/OrderStorage.d.ts +0 -8
  362. package/lib/components/OrderStorage.js +0 -1
  363. package/lib/components/PlaceOrderButton.d.ts +0 -12
  364. package/lib/components/PlaceOrderButton.js +0 -1
  365. package/lib/components/PlaceOrderContainer.d.ts +0 -8
  366. package/lib/components/PlaceOrderContainer.js +0 -1
  367. package/lib/components/PrivacyAndTermsCheckbox.d.ts +0 -4
  368. package/lib/components/PrivacyAndTermsCheckbox.js +0 -1
  369. package/lib/components/SkuList.d.ts +0 -7
  370. package/lib/components/SkuList.js +0 -1
  371. package/lib/components/SkuListsContainer.d.ts +0 -6
  372. package/lib/components/SkuListsContainer.js +0 -1
  373. package/lib/components/SkuOption.d.ts +0 -7
  374. package/lib/components/SkuOption.js +0 -1
  375. package/lib/components/SkuOptionInput.d.ts +0 -5
  376. package/lib/components/SkuOptionInput.js +0 -1
  377. package/lib/components/SkuOptionsContainer.d.ts +0 -7
  378. package/lib/components/SkuOptionsContainer.js +0 -1
  379. package/lib/components/SubTotalAmount.d.ts +0 -4
  380. package/lib/components/SubTotalAmount.js +0 -1
  381. package/lib/components/TaxesAmount.d.ts +0 -4
  382. package/lib/components/TaxesAmount.js +0 -1
  383. package/lib/components/TotalAmount.d.ts +0 -4
  384. package/lib/components/TotalAmount.js +0 -1
@@ -2,7 +2,6 @@
2
2
  import PropTypes from 'prop-types';
3
3
  import { TimeFormat, BaseInputType, GiftCardInputName, LineItemType, BasePriceType, BaseFormatPrice, BaseSelectorType, AddressInputName, AddressCountrySelectName, AddressStateSelectName } from '../typings/index';
4
4
  import { DeliveryLeadTimeField } from '../components/DeliveryLeadTime';
5
- import { StockTransferFieldType } from '../components/StockTransferField';
6
5
  import { PaymentSourceDetailType } from '../components/PaymentSourceDetail';
7
6
  import { CodeType } from '../reducers/OrderReducer';
8
7
  import { ShipmentAttribute } from '../components/ShipmentField';
@@ -11,7 +10,7 @@ declare const components: {
11
10
  permittedChildren: string[];
12
11
  displayName: string;
13
12
  propTypes: {
14
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
13
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
15
14
  };
16
15
  };
17
16
  AddressCountrySelector: {
@@ -87,6 +86,8 @@ declare const components: {
87
86
  label: PropTypes.Requireable<string | PropTypes.ReactElementLike>;
88
87
  skuCode: PropTypes.Requireable<string>;
89
88
  disabled: PropTypes.Requireable<boolean>;
89
+ buyNowMode: PropTypes.Requireable<boolean>;
90
+ checkoutUrl: PropTypes.Requireable<string>;
90
91
  lineItem: PropTypes.Requireable<PropTypes.InferProps<{
91
92
  name: PropTypes.Validator<string>;
92
93
  imageUrl: PropTypes.Requireable<string>;
@@ -100,7 +101,7 @@ declare const components: {
100
101
  displayName: string;
101
102
  permittedChildren: string[];
102
103
  propTypes: {
103
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
104
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
104
105
  shipToDifferentAddress: PropTypes.Requireable<boolean>;
105
106
  };
106
107
  };
@@ -108,7 +109,7 @@ declare const components: {
108
109
  displayName: string;
109
110
  permittedChildren: string[];
110
111
  propTypes: {
111
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
112
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
112
113
  skuCode: PropTypes.Requireable<string>;
113
114
  };
114
115
  };
@@ -127,13 +128,19 @@ declare const components: {
127
128
  BillingAddressContainer: {
128
129
  permittedChildren: string[];
129
130
  propTypes: {
130
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
131
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
131
132
  };
132
133
  };
133
134
  BillingAddressForm: {
134
135
  permittedChildren: string[];
135
136
  propTypes: {
136
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
137
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
138
+ };
139
+ };
140
+ CustomerAddressForm: {
141
+ permittedChildren: string[];
142
+ propTypes: {
143
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
137
144
  };
138
145
  };
139
146
  CheckoutLink: {
@@ -149,7 +156,7 @@ declare const components: {
149
156
  CommerceLayer: {
150
157
  permittedChildren: string[];
151
158
  propTypes: {
152
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
159
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
153
160
  accessToken: PropTypes.Validator<string>;
154
161
  endpoint: PropTypes.Validator<string>;
155
162
  };
@@ -158,10 +165,17 @@ declare const components: {
158
165
  displayName: string;
159
166
  permittedChildren: string[];
160
167
  propTypes: {
161
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
168
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
162
169
  isGuest: PropTypes.Requireable<boolean>;
163
170
  };
164
171
  };
172
+ CustomerField: {
173
+ displayName: string;
174
+ propTypes: {
175
+ children: PropTypes.Requireable<(...args: any[]) => any>;
176
+ name: PropTypes.Validator<"email">;
177
+ };
178
+ };
165
179
  CustomerInput: {
166
180
  displayName: string;
167
181
  propTypes: {
@@ -214,7 +228,7 @@ declare const components: {
214
228
  displayName: string;
215
229
  permittedChildren: string[];
216
230
  propTypes: {
217
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
231
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
218
232
  url: PropTypes.Validator<string>;
219
233
  };
220
234
  };
@@ -222,7 +236,7 @@ declare const components: {
222
236
  permittedChildren: string[];
223
237
  displayName: string;
224
238
  propTypes: {
225
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
239
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
226
240
  onSubmit: PropTypes.Requireable<(...args: any[]) => any>;
227
241
  };
228
242
  defaultProps: {
@@ -244,7 +258,7 @@ declare const components: {
244
258
  permittedChildren: string[];
245
259
  displayName: string;
246
260
  propTypes: {
247
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
261
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
248
262
  };
249
263
  };
250
264
  GiftCardCurrencySelector: {
@@ -274,7 +288,7 @@ declare const components: {
274
288
  GiftCardOrCouponForm: {
275
289
  permittedChildren: string[];
276
290
  propTypes: {
277
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
291
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
278
292
  };
279
293
  };
280
294
  GiftCardOrCouponInput: {
@@ -312,7 +326,7 @@ declare const components: {
312
326
  permittedChildren: string[];
313
327
  displayName: string;
314
328
  propTypes: {
315
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
329
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
316
330
  skuCode: PropTypes.Requireable<string>;
317
331
  lineItem: PropTypes.Requireable<PropTypes.InferProps<{
318
332
  name: PropTypes.Validator<string>;
@@ -324,7 +338,7 @@ declare const components: {
324
338
  permittedChildren: string[];
325
339
  displayName: string;
326
340
  propTypes: {
327
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
341
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
328
342
  type: PropTypes.Requireable<LineItemType>;
329
343
  };
330
344
  defaultProps: {
@@ -381,7 +395,7 @@ declare const components: {
381
395
  permittedChildren: string[];
382
396
  displayName: string;
383
397
  propTypes: {
384
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
398
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
385
399
  title: PropTypes.Requireable<string>;
386
400
  showName: PropTypes.Requireable<boolean>;
387
401
  skuOptionId: PropTypes.Requireable<string>;
@@ -413,7 +427,7 @@ declare const components: {
413
427
  permittedChildren: string[];
414
428
  displayName: string;
415
429
  propTypes: {
416
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
430
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
417
431
  filters: PropTypes.Requireable<object>;
418
432
  loader: PropTypes.Requireable<string | PropTypes.ReactElementLike>;
419
433
  };
@@ -457,7 +471,7 @@ declare const components: {
457
471
  permittedChildren: string[];
458
472
  displayName: string;
459
473
  propTypes: {
460
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
474
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
461
475
  orderId: PropTypes.Requireable<string>;
462
476
  metadata: PropTypes.Requireable<{
463
477
  [x: string]: string | null | undefined;
@@ -468,6 +482,13 @@ declare const components: {
468
482
  metadata: {};
469
483
  };
470
484
  };
485
+ OrderList: {
486
+ permittedChildren: string[];
487
+ displayName: string;
488
+ propTypes: {
489
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
490
+ };
491
+ };
471
492
  OrderNumber: {
472
493
  displayName: string;
473
494
  propTypes: {
@@ -481,7 +502,7 @@ declare const components: {
481
502
  permittedChildren: string[];
482
503
  displayName: string;
483
504
  propTypes: {
484
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
505
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
485
506
  clearWhenPlaced: PropTypes.Requireable<boolean>;
486
507
  persistKey: PropTypes.Validator<string>;
487
508
  };
@@ -490,7 +511,7 @@ declare const components: {
490
511
  permittedChildren: string[];
491
512
  displayName: string;
492
513
  propTypes: {
493
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
514
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
494
515
  };
495
516
  };
496
517
  PaymentMethodAmount: {
@@ -535,14 +556,14 @@ declare const components: {
535
556
  displayName: string;
536
557
  permittedChildren: string[];
537
558
  propTypes: {
538
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
559
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
539
560
  };
540
561
  };
541
562
  PaymentSource: {
542
563
  displayName: string;
543
564
  permittedChildren: string[];
544
565
  propTypes: {
545
- children: PropTypes.Requireable<import("react").ReactNode>;
566
+ children: PropTypes.Requireable<import("react").ReactNode | (() => import("react").ReactNode)>;
546
567
  readonly: PropTypes.Requireable<boolean>;
547
568
  };
548
569
  };
@@ -590,7 +611,7 @@ declare const components: {
590
611
  displayName: string;
591
612
  permittedChildren: string[];
592
613
  propTypes: {
593
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
614
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
594
615
  };
595
616
  };
596
617
  Price: {
@@ -609,7 +630,7 @@ declare const components: {
609
630
  permittedChildren: string[];
610
631
  displayName: string;
611
632
  propTypes: {
612
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
633
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
613
634
  skuCode: PropTypes.Requireable<string>;
614
635
  loader: PropTypes.Requireable<string | PropTypes.ReactElementLike>;
615
636
  perPage: PropTypes.Requireable<number>;
@@ -658,7 +679,7 @@ declare const components: {
658
679
  permittedChildren: string[];
659
680
  displayName: string;
660
681
  propTypes: {
661
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
682
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
662
683
  };
663
684
  };
664
685
  ShipmentField: {
@@ -672,13 +693,13 @@ declare const components: {
672
693
  displayName: string;
673
694
  permittedChildren: string[];
674
695
  propTypes: {
675
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
696
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
676
697
  };
677
698
  };
678
699
  ShippingAddressContainer: {
679
700
  permittedChildren: string[];
680
701
  propTypes: {
681
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
702
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
682
703
  };
683
704
  };
684
705
  SaveCustomerButton: {
@@ -695,7 +716,7 @@ declare const components: {
695
716
  ShippingAddressForm: {
696
717
  permittedChildren: string[];
697
718
  propTypes: {
698
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
719
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
699
720
  };
700
721
  };
701
722
  ShippingAmount: {
@@ -713,7 +734,7 @@ declare const components: {
713
734
  permittedChildren: string[];
714
735
  displayName: string;
715
736
  propTypes: {
716
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
737
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
717
738
  readonly: PropTypes.Requireable<boolean>;
718
739
  };
719
740
  };
@@ -745,11 +766,33 @@ declare const components: {
745
766
  type: string;
746
767
  };
747
768
  };
769
+ SkusContainer: {
770
+ displayName: string;
771
+ permittedChildren: string[];
772
+ propTypes: {
773
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
774
+ };
775
+ };
776
+ Skus: {
777
+ displayName: string;
778
+ permittedChildren: string[];
779
+ propTypes: {
780
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
781
+ };
782
+ };
783
+ SkuField: {
784
+ displayName: string;
785
+ propTypes: {
786
+ children: PropTypes.Requireable<(...args: any[]) => any>;
787
+ attribute: PropTypes.Requireable<string>;
788
+ tagElement: PropTypes.Requireable<string>;
789
+ };
790
+ };
748
791
  SkuList: {
749
792
  permittedChildren: string[];
750
793
  displayName: string;
751
794
  propTypes: {
752
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
795
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
753
796
  id: PropTypes.Validator<string>;
754
797
  };
755
798
  };
@@ -757,14 +800,14 @@ declare const components: {
757
800
  permittedChildren: string[];
758
801
  displayName: string;
759
802
  propTypes: {
760
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
803
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
761
804
  };
762
805
  };
763
806
  SkuOption: {
764
807
  permittedChildren: string[];
765
808
  displayName: string;
766
809
  propTypes: {
767
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
810
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
768
811
  id: PropTypes.Validator<string>;
769
812
  };
770
813
  };
@@ -782,7 +825,7 @@ declare const components: {
782
825
  permittedChildren: string[];
783
826
  displayName: string;
784
827
  propTypes: {
785
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
828
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
786
829
  skuCode: PropTypes.Requireable<string>;
787
830
  };
788
831
  };
@@ -790,14 +833,13 @@ declare const components: {
790
833
  permittedChildren: string[];
791
834
  displayName: string;
792
835
  propTypes: {
793
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
836
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
794
837
  };
795
838
  };
796
839
  StockTransferField: {
797
840
  displayName: string;
798
841
  propTypes: {
799
842
  children: PropTypes.Requireable<(...args: any[]) => any>;
800
- type: PropTypes.Validator<StockTransferFieldType>;
801
843
  };
802
844
  };
803
845
  SubmitButton: {
@@ -856,7 +898,7 @@ declare const components: {
856
898
  permittedChildren: string[];
857
899
  displayName: string;
858
900
  propTypes: {
859
- children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal>;
901
+ children: PropTypes.Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => import("react").ReactNode)>;
860
902
  skuCode: PropTypes.Requireable<string>;
861
903
  filters: PropTypes.Requireable<object>;
862
904
  };
@@ -1 +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;
1
+ import PropTypes from"prop-types";import childrenTypes from"../utils/childrenTypes";import{baseOrderComponentPricePropTypes,PTLoader,BMObject}from"../typings/index";import{ErrorPropTypes}from"../typings/errors";import{BaseInputComponentPropTypes}from"../typings/index";const components={Address:{permittedChildren:["AddressField","ReactNode"],displayName:"Address",propTypes:{children:childrenTypes.isRequired}},AddressCountrySelector:{displayName:"AddressCountrySelector",propTypes:{children:PropTypes.func,placeholder:PropTypes.shape({label:PropTypes.string.isRequired,value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]).isRequired}),value:PropTypes.string,name:PropTypes.oneOf(["billing_address_country_code","shipping_address_country_code"]).isRequired,required:PropTypes.bool},defaultProps:{required:!0}},AddressStateSelector:{displayName:"AddressStateSelector",propTypes:{children:PropTypes.func,placeholder:PropTypes.shape({label:PropTypes.string.isRequired,value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]).isRequired}),value:PropTypes.string,name:PropTypes.oneOf(["billing_address_state_code","shipping_address_state_code"]).isRequired,required:PropTypes.bool},defaultProps:{required:!0}},AddressField:{displayName:"AddressField",propTypes:{children:PropTypes.func}},AddressInput:{displayName:"AddressInput",propTypes:{children:PropTypes.func,name:PropTypes.oneOf(["billing_address_city","billing_address_company","billing_address_email","billing_address_first_name","billing_address_last_name","billing_address_line_1","billing_address_line_2","billing_address_phone","billing_address_state_code","billing_address_zip_code","billing_address_billing_info","billing_address_save_to_customer_book","shipping_address_city","shipping_address_company","shipping_address_email","shipping_address_first_name","shipping_address_last_name","shipping_address_line_1","shipping_address_line_2","shipping_address_phone","shipping_address_state_code","shipping_address_zip_code","shipping_address_save_to_customer_book"]).isRequired,type:PropTypes.oneOf(["checkbox","date","email","number","tel","text","textarea"]).isRequired,placeholder:PropTypes.string,disabled:PropTypes.bool,required:PropTypes.bool},defaultProps:{required:!0}},AdjustmentAmount:{displayName:"AdjustmentAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},AddToCartButton:{displayName:"AddToCartButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element]),skuCode:PropTypes.string,disabled:PropTypes.bool,buyNowMode:PropTypes.bool,checkoutUrl:PropTypes.string,lineItem:PropTypes.shape({name:PropTypes.string.isRequired,imageUrl:PropTypes.string})},defaultProps:{label:"Add to cart"}},AddressesContainer:{displayName:"AddressesContainer",permittedChildren:["BillingAddressForm","BillingAddressContainer","ShippingAddressForm","ShippingAddressContainer","SaveAddressesButton","ReactNode"],propTypes:{children:childrenTypes.isRequired,shipToDifferentAddress:PropTypes.bool}},AvailabilityContainer:{displayName:"AvailabilityContainer",permittedChildren:["AvailabilityTemplate","ReactNode"],propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string}},AvailabilityTemplate:{displayName:"AvailabilityTemplate",propTypes:{timeFormat:PropTypes.oneOf(["days","hours"]),showShippingMethodName:PropTypes.bool,children:PropTypes.func},defaultProps:{timeFormat:"days",showShippingMethodName:!1}},BillingAddressContainer:{permittedChildren:["Address","ReactNode"],propTypes:{children:childrenTypes.isRequired}},BillingAddressForm:{permittedChildren:["AddressInput","ReactNode","Errors"],propTypes:{children:childrenTypes.isRequired}},CustomerAddressForm:{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","CustomerContainer","ReactNode"],propTypes:{children:childrenTypes.isRequired,accessToken:PropTypes.string.isRequired,endpoint:PropTypes.string.isRequired}},CustomerContainer:{displayName:"CustomerContainer",permittedChildren:["CustomerInput","SaveCustomerButton","AddressesContainer","PaymentMethodsContainer","ShipmentsContainer","OrderList","ReactNode","CustomerField"],propTypes:{children:childrenTypes.isRequired,isGuest:PropTypes.bool}},CustomerField:{displayName:"CustomerField",propTypes:{children:PropTypes.func,name:PropTypes.oneOf(["email"]).isRequired}},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:{}}},OrderList:{permittedChildren:["OrderListHeader","OrderListRow","OrderListRowActions","ReactNode"],displayName:"OrderList",propTypes:{children:childrenTypes.isRequired}},OrderNumber:{displayName:"OrderNumber",propTypes:{className:PropTypes.string},defaultProps:{format:"formatted"}},OrderStorage:{permittedChildren:["OrderContainer","ReactNode"],displayName:"OrderStorage",propTypes:{children:childrenTypes.isRequired,clearWhenPlaced:PropTypes.bool,persistKey:PropTypes.string.isRequired}},PaymentMethod:{permittedChildren:["PaymentMethodName","PaymentMethodRadioButton","PaymentMethodPrice","PaymentSource","ReactNode","Errors"],displayName:"PaymentMethod",propTypes:{children:childrenTypes.isRequired}},PaymentMethodAmount:{displayName:"PaymentMethodAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},PaymentMethodName:{displayName:"PaymentMethodName",propTypes:{children:PropTypes.func}},PaymentMethodPrice:{displayName:"PaymentMethodPrice",propTypes:Object.assign(Object.assign({},baseOrderComponentPricePropTypes),{type:PropTypes.oneOf(["amount"])})},PaymentMethodRadioButton:{displayName:"PaymentMethodRadioButton",propTypes:{children:PropTypes.func}},PaymentMethodsContainer:{displayName:"PaymentMethodsContainer",permittedChildren:["PaymentSource","ReactNode","PlaceOrderContainer"],propTypes:{children:childrenTypes.isRequired}},PaymentSource:{displayName:"PaymentSource",permittedChildren:["PaymentSourceBrandIcon","PaymentSourceBrandName","PaymentSourceEditButton","PaymentSourceDetail","ReactNode"],propTypes:{children:childrenTypes,readonly:PropTypes.bool}},PaymentSourceBrandIcon:{displayName:"PaymentSourceBrandIcon",propTypes:{children:PropTypes.func,width:PropTypes.number,height:PropTypes.number,src:PropTypes.string,className:PropTypes.string}},PaymentSourceBrandName:{displayName:"PaymentSourceBrandName",propTypes:{children:PropTypes.func,label:PropTypes.string}},PaymentSourceEditButton:{displayName:"PaymentSourceEditButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element])}},PaymentSourceDetail:{displayName:"PaymentSourceDetail",propTypes:{type:PropTypes.oneOf(["last4","exp_year","exp_month"]).isRequired}},PlaceOrderButton:{displayName:"PlaceOrderButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element])},defaultProps:{label:"Place order"}},PlaceOrderContainer:{displayName:"PlaceOrderContainer",permittedChildren:["PaymentMethod","PlaceOrderButton","PrivacyAndTermsCheckbox","ReactNode"],propTypes:{children:childrenTypes.isRequired}},Price:{displayName:"Price",propTypes:{children:PropTypes.func,compareClassName:PropTypes.string,skuCode:PropTypes.string,showCompare:PropTypes.bool},defaultProps:{skuCode:""}},PricesContainer:{permittedChildren:["Price","AvailabilityContainer","ReactNode"],displayName:"PricesContainer",propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string,loader:PTLoader,perPage:PropTypes.number,filters:PropTypes.object},defaultProps:{perPage:10,filters:{},loader:"Loading...",skuCode:""}},PrivacyAndTermsCheckbox:{displayName:"PrivacyAndTermsCheckbox",propTypes:{children:PropTypes.func}},QuantitySelector:{displayName:"QuantitySelector",propTypes:{children:PropTypes.func,min:PropTypes.number,max:PropTypes.number,value:PropTypes.string,skuCode:PropTypes.string,disabled:PropTypes.bool},defaultProps:{min:1}},SaveAddressesButton:{displayName:"SaveAddressesButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element]),onClick:PropTypes.func,disabled:PropTypes.bool},defaultProps:{label:"Continue to delivery"}},Shipment:{permittedChildren:["LineItemsContainer","LineItem","ShippingMethod","ReactNode"],displayName:"Shipment",propTypes:{children:childrenTypes.isRequired}},ShipmentField:{displayName:"ShipmentField",propTypes:{children:PropTypes.func,name:PropTypes.oneOf(["cost_amount_cents","cost_amount_float","currency_code","formatted_cost_amount","number","status","key_number"]).isRequired}},ShipmentsContainer:{displayName:"ShipmentsContainer",permittedChildren:["Shipment","ReactNode","Errors"],propTypes:{children:childrenTypes.isRequired}},ShippingAddressContainer:{permittedChildren:["Address","ReactNode"],propTypes:{children:childrenTypes.isRequired}},SaveCustomerButton:{displayName:"SaveCustomerButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element]),onClick:PropTypes.func},defaultProps:{label:"Save"}},ShippingAddressForm:{permittedChildren:["AddressInput","ReactNode"],propTypes:{children:childrenTypes.isRequired}},ShippingAmount:{displayName:"ShippingAmount",propTypes:baseOrderComponentPricePropTypes},ShippingMethod:{permittedChildren:["ShippingMethodName","ShippingMethodPrice","ShippingMethodRadioButton","DeliveryLeadTime","ReactNode"],displayName:"ShippingMethod",propTypes:{children:childrenTypes.isRequired,readonly:PropTypes.bool}},ShippingMethodName:{displayName:"ShippingMethodName",propTypes:{children:PropTypes.func}},ShippingMethodRadioButton:{displayName:"ShippingMethodRadioButton",propTypes:{children:PropTypes.func}},ShippingMethodPrice:{displayName:"ShippingMethodPrice",propTypes:Object.assign(Object.assign({},baseOrderComponentPricePropTypes),{type:PropTypes.oneOf(["amount"])}),defaultProps:{format:"formatted",type:"amount"}},SkusContainer:{displayName:"SkuContainer",permittedChildren:["Skus","ItemContainer","ReactNode"],propTypes:{children:childrenTypes.isRequired}},Skus:{displayName:"Skus",permittedChildren:["AvailabilityTemplate","SkuField","AddToCartButton","QuantitySelector","Price","ReactNode"],propTypes:{children:childrenTypes.isRequired}},SkuField:{displayName:"SkuField",propTypes:{children:PropTypes.func,attribute:PropTypes.string,tagElement:PropTypes.string}},SkuList:{permittedChildren:["AddToCartButton","QuantitySelector","ReactNode"],displayName:"SkuList",propTypes:{children:childrenTypes.isRequired,id:PropTypes.string.isRequired}},SkuListsContainer:{permittedChildren:["SkuList","ReactNode"],displayName:"SkuListsContainer",propTypes:{children:childrenTypes.isRequired}},SkuOption:{permittedChildren:["SkuOptionInput","ReactNode"],displayName:"SkuOption",propTypes:{children:childrenTypes.isRequired,id:PropTypes.string.isRequired}},SkuOptionInput:{displayName:"SkuOptionInput",propTypes:BaseInputComponentPropTypes},SkuOptionsContainer:{permittedChildren:["SkuOption","ReactNode"],displayName:"SkuOptionsContainer",propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string}},StockTransfer:{permittedChildren:["StockTransferField","ReactNode"],displayName:"StockTransfer",propTypes:{children:childrenTypes.isRequired}},StockTransferField:{displayName:"StockTransferField",propTypes:{children:PropTypes.func}},SubmitButton:{displayName:"SubmitButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element])},defaultProps:{label:"Submit"}},SubTotalAmount:{displayName:"SubTotalAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},TaxesAmount:{displayName:"TaxesAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},TotalAmount:{displayName:"TotalAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},VariantsContainer:{permittedChildren:["VariantSelector","ReactNode"],displayName:"VariantsContainer",propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string,filters:PropTypes.object},defaultProps:{skuCode:"",filters:{}}},VariantSelector:{displayName:"VariantSelector",propTypes:{options:PropTypes.arrayOf(PropTypes.shape({label:PropTypes.string.isRequired,code:PropTypes.string.isRequired,lineItem:PropTypes.shape({name:PropTypes.string.isRequired,imageUrl:PropTypes.string})}).isRequired).isRequired,name:PropTypes.string,children:PropTypes.func,type:PropTypes.oneOf(["select","radio"]),loader:PropTypes.element,placeholder:PropTypes.string,skuCode:PropTypes.string},defaultProps:{placeholder:"Select a variant",type:"select"}}};export default components;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { Address } from '@commercelayer/sdk';
3
3
  export interface InitialAddressContext {
4
- address: Address | Record<string, any>;
4
+ address: Address | undefined;
5
5
  }
6
6
  declare const AddressChildrenContext: import("react").Context<InitialAddressContext>;
7
7
  export default AddressChildrenContext;
@@ -1 +1 @@
1
- import{createContext}from"react";const initial={address:{}},AddressChildrenContext=createContext(initial);export default AddressChildrenContext;
1
+ import{createContext}from"react";const initial={address:void 0},AddressChildrenContext=createContext(initial);export default AddressChildrenContext;
@@ -2,7 +2,7 @@
2
2
  import { AddressState, SetAddress, AddressResource } from '../reducers/AddressReducer';
3
3
  import { BaseError } from '../typings/errors';
4
4
  declare type DefaultContext = {
5
- saveAddresses: () => void;
5
+ saveAddresses: (addressId?: string) => void;
6
6
  setCloneAddress: (id: string, resource: AddressResource) => void;
7
7
  setAddress: SetAddress;
8
8
  setAddressErrors: (errors: BaseError[], resource: AddressResource) => void;
@@ -3,10 +3,8 @@ import { BillingAddressState } from '../reducers/BillingAddressReducer';
3
3
  declare type DefaultContext = {
4
4
  setBillingAddress?: (id: string, options?: {
5
5
  customerAddressId: string;
6
- }) => void;
6
+ }) => Promise<void>;
7
7
  } & BillingAddressState;
8
- export declare const defaultBillingAddressContext: {
9
- setBillingAddress: () => void;
10
- };
8
+ export declare const defaultBillingAddressContext: {};
11
9
  declare const BillingAddressContext: import("react").Context<DefaultContext>;
12
10
  export default BillingAddressContext;
@@ -1 +1 @@
1
- import{createContext}from"react";export const defaultBillingAddressContext={setBillingAddress:()=>{}};const BillingAddressContext=createContext(defaultBillingAddressContext);export default BillingAddressContext;
1
+ import{createContext}from"react";export const defaultBillingAddressContext={};const BillingAddressContext=createContext(defaultBillingAddressContext);export default BillingAddressContext;
@@ -1,18 +1,25 @@
1
1
  import { RefObject } from 'react';
2
- import { AddressCountrySelectName, AddressInputName } from '../typings/index';
3
- import { AddressField } from '../reducers/AddressReducer';
2
+ import type { Address } from '@commercelayer/sdk';
3
+ export declare type AddressValuesKeys = `${keyof Address}` | `billing_address_${keyof Address}` | `shipping_address_${keyof Address}`;
4
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
- }>[];
5
+ validation?: () => RefObject<HTMLFormElement>;
6
+ setValue?: (name: AddressValuesKeys, value: string | number | readonly string[]) => void;
7
+ errors?: {
8
+ [name: string]: {
9
+ code: string;
10
+ message: string;
11
+ error: boolean;
12
+ };
13
+ };
12
14
  errorClassName?: string;
13
15
  requiresBillingInfo?: boolean;
14
16
  resetField?: (name: string) => void;
15
- values?: Record<string, any>;
17
+ values?: {
18
+ [T in AddressValuesKeys]: string | {
19
+ value: string;
20
+ };
21
+ };
22
+ isBusiness?: boolean;
16
23
  };
17
24
  declare const BillingAddressFormContext: import("react").Context<DefaultContextAddress>;
18
25
  export default BillingAddressFormContext;
@@ -1,7 +1,9 @@
1
+ import { OrderCodeType } from '../reducers/OrderReducer';
1
2
  import { RefObject } from 'react';
2
3
  declare type DefaultContext = {
3
4
  validation?: () => RefObject<any>;
4
5
  setValue?: (name: string, value: string) => void;
6
+ codeType?: OrderCodeType;
5
7
  };
6
8
  declare const CouponAndGiftCardFormContext: import("react").Context<DefaultContext>;
7
9
  export default CouponAndGiftCardFormContext;
@@ -0,0 +1,20 @@
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?: {
8
+ [name: string]: {
9
+ code: string;
10
+ message: string;
11
+ error: boolean;
12
+ };
13
+ };
14
+ errorClassName?: string;
15
+ requiresBillingInfo?: boolean;
16
+ resetField?: (name: string) => void;
17
+ values?: Record<string, any>;
18
+ };
19
+ declare const CustomerAddressFormContext: import("react").Context<DefaultContextAddress>;
20
+ export default CustomerAddressFormContext;
@@ -0,0 +1 @@
1
+ import{createContext}from"react";const CustomerAddressFormContext=createContext({});export default CustomerAddressFormContext;
@@ -1,16 +1,22 @@
1
1
  /// <reference types="react" />
2
- import { SetCustomerEmail, SetCustomerErrors, CustomerState } from '../reducers/CustomerReducer';
3
- declare type DefaultContext = {
2
+ import { SetCustomerErrors, deleteCustomerAddress, CustomerState, GetCustomerAddresses, getCustomerPaymentSources, setCustomerEmail, TCustomerAddress } from '../reducers/CustomerReducer';
3
+ export declare type InitialCustomerContext = Partial<{
4
4
  saveCustomerUser: (customerEmail: string) => Promise<void>;
5
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>;
6
+ setCustomerEmail: typeof setCustomerEmail;
7
+ getCustomerPaymentSources: typeof getCustomerPaymentSources;
8
+ deleteCustomerAddress: typeof deleteCustomerAddress | undefined;
9
+ getCustomerAddresses: GetCustomerAddresses;
10
+ createCustomerAddress: (address: TCustomerAddress) => Promise<void>;
11
+ } & CustomerState>;
12
+ export declare const defaultCustomerContext: {};
13
+ declare const CustomerContext: import("react").Context<Partial<{
14
+ saveCustomerUser: (customerEmail: string) => Promise<void>;
12
15
  setCustomerErrors: SetCustomerErrors;
13
- setCustomerEmail: SetCustomerEmail;
14
- };
15
- declare const CustomerContext: import("react").Context<DefaultContext>;
16
+ setCustomerEmail: typeof setCustomerEmail;
17
+ getCustomerPaymentSources: typeof getCustomerPaymentSources;
18
+ deleteCustomerAddress: typeof deleteCustomerAddress | undefined;
19
+ getCustomerAddresses: GetCustomerAddresses;
20
+ createCustomerAddress: (address: TCustomerAddress) => Promise<void>;
21
+ } & Partial<import("../reducers/CustomerReducer").CustomerActionPayload>>>;
16
22
  export default CustomerContext;
@@ -1 +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
+ import{createContext}from"react";export const defaultCustomerContext={};const CustomerContext=createContext(defaultCustomerContext);export default CustomerContext;