@commercelayer/react-components 2.46.5 → 2.48.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.
- package/{dist → lib/cjs}/components/AddToCartButton.d.ts +20 -17
- package/lib/cjs/components/AddToCartButton.js +1 -0
- package/{dist → lib/cjs}/components/Address.d.ts +13 -13
- package/lib/cjs/components/Address.js +1 -0
- package/{dist → lib/cjs}/components/AddressCountrySelector.d.ts +9 -9
- package/lib/cjs/components/AddressCountrySelector.js +1 -0
- package/{dist → lib/cjs}/components/AddressField.d.ts +15 -15
- package/lib/cjs/components/AddressField.js +1 -0
- package/{dist → lib/cjs}/components/AddressInput.d.ts +7 -7
- package/lib/cjs/components/AddressInput.js +1 -0
- package/{dist → lib/cjs}/components/AddressStateSelector.d.ts +11 -11
- package/lib/cjs/components/AddressStateSelector.js +1 -0
- package/{dist → lib/cjs}/components/AddressesContainer.d.ts +7 -7
- package/lib/cjs/components/AddressesContainer.js +1 -0
- package/{dist → lib/cjs}/components/AdyenPayment.d.ts +25 -25
- package/lib/cjs/components/AdyenPayment.js +1 -0
- package/{dist → lib/cjs}/components/AvailabilityContainer.d.ts +7 -7
- package/lib/cjs/components/AvailabilityContainer.js +1 -0
- package/{dist → lib/cjs}/components/AvailabilityTemplate.d.ts +11 -16
- package/lib/cjs/components/AvailabilityTemplate.js +1 -0
- package/{dist → lib/cjs}/components/BillingAddressContainer.d.ts +6 -6
- package/lib/cjs/components/BillingAddressContainer.js +1 -0
- package/{dist → lib/cjs}/components/BillingAddressForm.d.ts +8 -8
- package/lib/cjs/components/BillingAddressForm.js +1 -0
- package/{dist → lib/cjs}/components/BraintreePayment.d.ts +30 -30
- package/lib/cjs/components/BraintreePayment.js +1 -0
- package/{dist → lib/cjs}/components/CheckoutLink.d.ts +11 -11
- package/lib/cjs/components/CheckoutLink.js +1 -0
- package/{dist → lib/cjs}/components/CommerceLayer.d.ts +8 -9
- package/lib/cjs/components/CommerceLayer.js +1 -0
- package/{dist → lib/cjs}/components/CustomerContainer.d.ts +7 -7
- package/lib/cjs/components/CustomerContainer.js +1 -0
- package/{dist → lib/cjs}/components/CustomerInput.d.ts +11 -11
- package/lib/cjs/components/CustomerInput.js +1 -0
- package/{dist → lib/cjs}/components/DeliveryLeadTime.d.ts +10 -10
- package/lib/cjs/components/DeliveryLeadTime.js +1 -0
- package/{dist → lib/cjs}/components/DiscountAmount.d.ts +4 -4
- package/lib/cjs/components/DiscountAmount.js +1 -0
- package/{dist → lib/cjs}/components/Errors.d.ts +5 -5
- package/lib/cjs/components/Errors.js +1 -0
- package/{dist → lib/cjs}/components/ExternalFunction.d.ts +7 -7
- package/lib/cjs/components/ExternalFunction.js +1 -0
- package/{dist → lib/cjs}/components/GiftCard.d.ts +8 -8
- package/lib/cjs/components/GiftCard.js +1 -0
- package/{dist → lib/cjs}/components/GiftCardAmount.d.ts +4 -4
- package/lib/cjs/components/GiftCardAmount.js +1 -0
- package/{dist → lib/cjs}/components/GiftCardContainer.d.ts +6 -6
- package/lib/cjs/components/GiftCardContainer.js +1 -0
- package/{dist → lib/cjs}/components/GiftCardCurrencySelector.d.ts +7 -7
- package/lib/cjs/components/GiftCardCurrencySelector.js +1 -0
- package/{dist → lib/cjs}/components/GiftCardInput.d.ts +7 -7
- package/lib/cjs/components/GiftCardInput.js +1 -0
- package/{dist → lib/cjs}/components/GiftCardOrCouponCode.d.ts +13 -13
- package/lib/cjs/components/GiftCardOrCouponCode.js +1 -0
- package/{dist → lib/cjs}/components/GiftCardOrCouponForm.d.ts +10 -10
- package/lib/cjs/components/GiftCardOrCouponForm.js +1 -0
- package/{dist → lib/cjs}/components/GiftCardOrCouponInput.d.ts +8 -8
- package/lib/cjs/components/GiftCardOrCouponInput.js +1 -0
- package/{dist → lib/cjs}/components/GiftCardOrCouponRemoveButton.d.ts +16 -16
- package/lib/cjs/components/GiftCardOrCouponRemoveButton.js +1 -0
- package/{dist → lib/cjs}/components/GiftCardOrCouponSubmit.d.ts +9 -9
- package/lib/cjs/components/GiftCardOrCouponSubmit.js +1 -0
- package/{dist → lib/cjs}/components/GiftCardRecipient.d.ts +0 -0
- package/lib/cjs/components/GiftCardRecipient.js +1 -0
- package/{dist → lib/cjs}/components/GiftCardRecipientInput.d.ts +0 -0
- package/lib/cjs/components/GiftCardRecipientInput.js +1 -0
- package/{dist → lib/cjs}/components/ItemContainer.d.ts +11 -11
- package/lib/cjs/components/ItemContainer.js +1 -0
- package/{dist → lib/cjs}/components/LineItem.d.ts +8 -8
- package/lib/cjs/components/LineItem.js +1 -0
- package/{dist → lib/cjs}/components/LineItemAmount.d.ts +7 -7
- package/lib/cjs/components/LineItemAmount.js +1 -0
- package/{dist → lib/cjs}/components/LineItemCode.d.ts +8 -8
- package/lib/cjs/components/LineItemCode.js +1 -0
- package/{dist → lib/cjs}/components/LineItemImage.d.ts +10 -10
- package/lib/cjs/components/LineItemImage.js +1 -0
- package/{dist → lib/cjs}/components/LineItemName.d.ts +9 -7
- package/lib/cjs/components/LineItemName.js +1 -0
- package/{dist → lib/cjs}/components/LineItemOption.d.ts +19 -19
- package/lib/cjs/components/LineItemOption.js +1 -0
- package/{dist → lib/cjs}/components/LineItemOptions.d.ts +14 -14
- package/lib/cjs/components/LineItemOptions.js +1 -0
- package/{dist → lib/cjs}/components/LineItemQuantity.d.ts +14 -14
- package/lib/cjs/components/LineItemQuantity.js +1 -0
- package/{dist → lib/cjs}/components/LineItemRemoveLink.d.ts +12 -12
- package/lib/cjs/components/LineItemRemoveLink.js +1 -0
- package/{dist → lib/cjs}/components/LineItemsContainer.d.ts +8 -8
- package/lib/cjs/components/LineItemsContainer.js +1 -0
- package/{dist → lib/cjs}/components/LineItemsCount.d.ts +10 -10
- package/lib/cjs/components/LineItemsCount.js +1 -0
- package/{dist → lib/cjs}/components/MetadataInput.d.ts +5 -5
- package/lib/cjs/components/MetadataInput.js +1 -0
- package/{dist → lib/cjs}/components/OrderContainer.d.ts +11 -10
- package/lib/cjs/components/OrderContainer.js +1 -0
- package/{dist → lib/cjs}/components/OrderNumber.d.ts +5 -5
- package/lib/cjs/components/OrderNumber.js +1 -0
- package/{dist → lib/cjs}/components/OrderStorage.d.ts +8 -8
- package/lib/cjs/components/OrderStorage.js +1 -0
- package/{dist → lib/cjs}/components/PaymentGateway.d.ts +16 -16
- package/lib/cjs/components/PaymentGateway.js +1 -0
- package/{dist → lib/cjs}/components/PaymentMethod.d.ts +16 -16
- package/lib/cjs/components/PaymentMethod.js +1 -0
- package/{dist → lib/cjs}/components/PaymentMethodAmount.d.ts +4 -4
- package/lib/cjs/components/PaymentMethodAmount.js +1 -0
- package/{dist → lib/cjs}/components/PaymentMethodName.d.ts +9 -9
- package/lib/cjs/components/PaymentMethodName.js +1 -0
- package/{dist → lib/cjs}/components/PaymentMethodPrice.d.ts +9 -9
- package/lib/cjs/components/PaymentMethodPrice.js +1 -0
- package/{dist → lib/cjs}/components/PaymentMethodRadioButton.d.ts +11 -11
- package/lib/cjs/components/PaymentMethodRadioButton.js +1 -0
- package/{dist → lib/cjs}/components/PaymentMethodsContainer.d.ts +8 -8
- package/lib/cjs/components/PaymentMethodsContainer.js +1 -0
- package/{dist → lib/cjs}/components/PaymentSource.d.ts +19 -19
- package/lib/cjs/components/PaymentSource.js +1 -0
- package/{dist → lib/cjs}/components/PaymentSourceBrandIcon.d.ts +15 -15
- package/lib/cjs/components/PaymentSourceBrandIcon.js +1 -0
- package/{dist → lib/cjs}/components/PaymentSourceBrandName.d.ts +12 -12
- package/lib/cjs/components/PaymentSourceBrandName.js +1 -0
- package/{dist → lib/cjs}/components/PaymentSourceDetail.d.ts +12 -12
- package/lib/cjs/components/PaymentSourceDetail.js +1 -0
- package/{dist → lib/cjs}/components/PaymentSourceEditButton.d.ts +9 -9
- package/lib/cjs/components/PaymentSourceEditButton.js +1 -0
- package/{dist → lib/cjs}/components/PaypalPayment.d.ts +12 -12
- package/lib/cjs/components/PaypalPayment.js +1 -0
- package/{dist → lib/cjs}/components/PlaceOrderButton.d.ts +12 -12
- package/lib/cjs/components/PlaceOrderButton.js +1 -0
- package/{dist → lib/cjs}/components/PlaceOrderContainer.d.ts +8 -8
- package/lib/cjs/components/PlaceOrderContainer.js +1 -0
- package/{dist → lib/cjs}/components/Price.d.ts +14 -14
- package/lib/cjs/components/Price.js +1 -0
- package/{dist → lib/cjs}/components/PricesContainer.d.ts +11 -11
- package/lib/cjs/components/PricesContainer.js +1 -0
- package/{dist → lib/cjs}/components/PrivacyAndTermsCheckbox.d.ts +4 -4
- package/lib/cjs/components/PrivacyAndTermsCheckbox.js +1 -0
- package/{dist → lib/cjs}/components/QuantitySelector.d.ts +17 -17
- package/lib/cjs/components/QuantitySelector.js +1 -0
- package/{dist → lib/cjs}/components/SaveAddressesButton.d.ts +10 -10
- package/lib/cjs/components/SaveAddressesButton.js +1 -0
- package/{dist → lib/cjs}/components/SaveCustomerButton.d.ts +13 -13
- package/lib/cjs/components/SaveCustomerButton.js +1 -0
- package/{dist → lib/cjs}/components/Shipment.d.ts +8 -8
- package/lib/cjs/components/Shipment.js +1 -0
- package/{dist → lib/cjs}/components/ShipmentField.d.ts +12 -12
- package/lib/cjs/components/ShipmentField.js +1 -0
- package/{dist → lib/cjs}/components/ShipmentsContainer.d.ts +6 -6
- package/lib/cjs/components/ShipmentsContainer.js +1 -0
- package/{dist → lib/cjs}/components/ShippingAddressContainer.d.ts +6 -6
- package/lib/cjs/components/ShippingAddressContainer.js +1 -0
- package/{dist → lib/cjs}/components/ShippingAddressForm.d.ts +8 -8
- package/lib/cjs/components/ShippingAddressForm.js +1 -0
- package/{dist → lib/cjs}/components/ShippingAmount.d.ts +4 -4
- package/lib/cjs/components/ShippingAmount.js +1 -0
- package/{dist → lib/cjs}/components/ShippingMethod.d.ts +8 -8
- package/lib/cjs/components/ShippingMethod.js +1 -0
- package/{dist → lib/cjs}/components/ShippingMethodName.d.ts +11 -11
- package/lib/cjs/components/ShippingMethodName.js +1 -0
- package/{dist → lib/cjs}/components/ShippingMethodPrice.d.ts +13 -13
- package/lib/cjs/components/ShippingMethodPrice.js +1 -0
- package/{dist → lib/cjs}/components/ShippingMethodRadioButton.d.ts +9 -9
- package/lib/cjs/components/ShippingMethodRadioButton.js +1 -0
- package/{dist → lib/cjs}/components/SkuList.d.ts +7 -7
- package/lib/cjs/components/SkuList.js +1 -0
- package/{dist → lib/cjs}/components/SkuListsContainer.d.ts +6 -6
- package/lib/cjs/components/SkuListsContainer.js +1 -0
- package/{dist → lib/cjs}/components/SkuOption.d.ts +7 -7
- package/lib/cjs/components/SkuOption.js +1 -0
- package/{dist → lib/cjs}/components/SkuOptionInput.d.ts +5 -5
- package/lib/cjs/components/SkuOptionInput.js +1 -0
- package/{dist → lib/cjs}/components/SkuOptionsContainer.d.ts +7 -7
- package/lib/cjs/components/SkuOptionsContainer.js +1 -0
- package/{dist → lib/cjs}/components/StockTransfer.d.ts +6 -6
- package/lib/cjs/components/StockTransfer.js +1 -0
- package/{dist → lib/cjs}/components/StockTransferField.d.ts +9 -9
- package/lib/cjs/components/StockTransferField.js +1 -0
- package/{dist → lib/cjs}/components/StripePayment.d.ts +18 -18
- package/lib/cjs/components/StripePayment.js +1 -0
- package/{dist → lib/cjs}/components/SubTotalAmount.d.ts +4 -4
- package/lib/cjs/components/SubTotalAmount.js +1 -0
- package/{dist → lib/cjs}/components/SubmitButton.d.ts +9 -9
- package/lib/cjs/components/SubmitButton.js +1 -0
- package/{dist → lib/cjs}/components/TaxesAmount.d.ts +4 -4
- package/lib/cjs/components/TaxesAmount.js +1 -0
- package/{dist → lib/cjs}/components/TotalAmount.d.ts +4 -4
- package/lib/cjs/components/TotalAmount.js +1 -0
- package/{dist → lib/cjs}/components/VariantSelector.d.ts +29 -27
- package/lib/cjs/components/VariantSelector.js +1 -0
- package/{dist → lib/cjs}/components/VariantsContainer.d.ts +8 -8
- package/lib/cjs/components/VariantsContainer.js +1 -0
- package/{dist → lib/cjs}/components/WireTransferPayment.d.ts +10 -10
- package/lib/cjs/components/WireTransferPayment.js +1 -0
- package/{dist → lib/cjs}/components/gateways/AdyenGateway.d.ts +5 -5
- package/lib/cjs/components/gateways/AdyenGateway.js +1 -0
- package/{dist → lib/cjs}/components/gateways/BraintreeGateway.d.ts +5 -5
- package/lib/cjs/components/gateways/BraintreeGateway.js +1 -0
- package/{dist → lib/cjs}/components/gateways/PaypalGateway.d.ts +5 -5
- package/lib/cjs/components/gateways/PaypalGateway.js +1 -0
- package/{dist → lib/cjs}/components/gateways/StripeGateway.d.ts +5 -5
- package/lib/cjs/components/gateways/StripeGateway.js +1 -0
- package/{dist → lib/cjs}/components/gateways/WireTransferGateway.d.ts +5 -5
- package/lib/cjs/components/gateways/WireTransferGateway.js +1 -0
- package/{dist → lib/cjs}/components/utils/AddressCardsTemplate.d.ts +27 -27
- package/lib/cjs/components/utils/AddressCardsTemplate.js +1 -0
- package/{dist → lib/cjs}/components/utils/BaseField.d.ts +8 -8
- package/lib/cjs/components/utils/BaseField.js +1 -0
- package/lib/cjs/components/utils/BaseInput.d.ts +5 -0
- package/lib/cjs/components/utils/BaseInput.js +1 -0
- package/{dist → lib/cjs}/components/utils/BaseOrderPrice.d.ts +6 -6
- package/lib/cjs/components/utils/BaseOrderPrice.js +1 -0
- package/{dist → lib/cjs}/components/utils/BaseSelect.d.ts +5 -5
- package/lib/cjs/components/utils/BaseSelect.js +1 -0
- package/{dist → lib/cjs}/components/utils/Parent.d.ts +8 -8
- package/lib/cjs/components/utils/Parent.js +1 -0
- package/{dist → lib/cjs}/components/utils/PaymentCardsTemplate.d.ts +23 -24
- package/lib/cjs/components/utils/PaymentCardsTemplate.js +1 -0
- package/{dist → lib/cjs}/components/utils/PriceTemplate.d.ts +8 -8
- package/lib/cjs/components/utils/PriceTemplate.js +1 -0
- package/{dist → lib/cjs}/components/utils/VariantTemplate.d.ts +36 -34
- package/lib/cjs/components/utils/VariantTemplate.js +1 -0
- package/{dist → lib/cjs}/components/utils/getAllErrors.d.ts +17 -17
- package/lib/cjs/components/utils/getAllErrors.js +1 -0
- package/{dist → lib/cjs}/config/components.d.ts +867 -867
- package/lib/cjs/config/components.js +1 -0
- package/lib/cjs/config/currency.d.ts +5 -0
- package/lib/cjs/config/currency.js +1 -0
- package/{dist → lib/cjs}/context/AddressChildrenContext.d.ts +7 -7
- package/lib/cjs/context/AddressChildrenContext.js +1 -0
- package/{dist → lib/cjs}/context/AddressContext.d.ts +17 -17
- package/lib/cjs/context/AddressContext.js +1 -0
- package/{dist → lib/cjs}/context/AvailabilityContext.d.ts +3 -3
- package/lib/cjs/context/AvailabilityContext.js +1 -0
- package/{dist → lib/cjs}/context/BillingAddressContext.d.ts +12 -12
- package/lib/cjs/context/BillingAddressContext.js +1 -0
- package/{dist → lib/cjs}/context/BillingAddressFormContext.d.ts +18 -18
- package/lib/cjs/context/BillingAddressFormContext.js +1 -0
- package/{dist → lib/cjs}/context/CommerceLayerContext.d.ts +7 -8
- package/lib/cjs/context/CommerceLayerContext.js +1 -0
- package/{dist → lib/cjs}/context/CouponAndGiftCardFormContext.d.ts +7 -7
- package/lib/cjs/context/CouponAndGiftCardFormContext.js +1 -0
- package/{dist → lib/cjs}/context/CustomerContext.d.ts +16 -16
- package/lib/cjs/context/CustomerContext.js +1 -0
- package/{dist → lib/cjs}/context/ExternalFunctionContext.d.ts +12 -12
- package/lib/cjs/context/ExternalFunctionContext.js +1 -0
- package/{dist → lib/cjs}/context/GiftCardContext.d.ts +11 -11
- package/lib/cjs/context/GiftCardContext.js +1 -0
- package/{dist → lib/cjs}/context/ItemContext.d.ts +13 -13
- package/lib/cjs/context/ItemContext.js +1 -0
- package/lib/cjs/context/LineItemChildrenContext.d.ts +9 -0
- package/lib/cjs/context/LineItemChildrenContext.js +1 -0
- package/{dist → lib/cjs}/context/LineItemContext.d.ts +8 -8
- package/lib/cjs/context/LineItemContext.js +1 -0
- package/{dist → lib/cjs}/context/LineItemOptionChildrenContext.d.ts +8 -8
- package/lib/cjs/context/LineItemOptionChildrenContext.js +1 -0
- package/lib/cjs/context/OrderContext.d.ts +26 -0
- package/lib/cjs/context/OrderContext.js +1 -0
- package/{dist → lib/cjs}/context/OrderStorageContext.d.ts +11 -11
- package/lib/cjs/context/OrderStorageContext.js +1 -0
- package/{dist → lib/cjs}/context/PaymentMethodChildrenContext.d.ts +10 -10
- package/lib/cjs/context/PaymentMethodChildrenContext.js +1 -0
- package/{dist → lib/cjs}/context/PaymentMethodContext.d.ts +23 -23
- package/lib/cjs/context/PaymentMethodContext.js +1 -0
- package/{dist → lib/cjs}/context/PaymentSourceContext.d.ts +14 -14
- package/lib/cjs/context/PaymentSourceContext.js +1 -0
- package/{dist → lib/cjs}/context/PlaceOrderContext.d.ts +16 -16
- package/lib/cjs/context/PlaceOrderContext.js +1 -0
- package/{dist → lib/cjs}/context/PricesContext.d.ts +7 -7
- package/lib/cjs/context/PricesContext.js +1 -0
- package/lib/cjs/context/ShipmentChildrenContext.d.ts +13 -0
- package/lib/cjs/context/ShipmentChildrenContext.js +1 -0
- package/{dist → lib/cjs}/context/ShipmentContext.d.ts +12 -12
- package/lib/cjs/context/ShipmentContext.js +1 -0
- package/{dist → lib/cjs}/context/ShippingAddressContext.d.ts +10 -10
- package/lib/cjs/context/ShippingAddressContext.js +1 -0
- package/{dist → lib/cjs}/context/ShippingAddressFormContext.d.ts +4 -4
- package/lib/cjs/context/ShippingAddressFormContext.js +1 -0
- package/lib/cjs/context/ShippingMethodChildrenContext.d.ts +10 -0
- package/lib/cjs/context/ShippingMethodChildrenContext.js +1 -0
- package/lib/cjs/context/SkuListsContext.d.ts +6 -0
- package/lib/cjs/context/SkuListsContext.js +1 -0
- package/{dist → lib/cjs}/context/SkuOptionChildrenContext.d.ts +8 -8
- package/lib/cjs/context/SkuOptionChildrenContext.js +1 -0
- package/{dist → lib/cjs}/context/SkuOptionsContext.d.ts +3 -3
- package/lib/cjs/context/SkuOptionsContext.js +1 -0
- package/{dist → lib/cjs}/context/StockTransferChildrenContext.d.ts +7 -7
- package/lib/cjs/context/StockTransferChildrenContext.js +1 -0
- package/{dist → lib/cjs}/context/VariantsContext.d.ts +3 -3
- package/lib/cjs/context/VariantsContext.js +1 -0
- package/lib/cjs/index.d.ts +90 -0
- package/lib/cjs/index.js +1 -0
- package/{dist → lib/cjs}/reducers/AddressReducer.d.ts +58 -57
- package/lib/cjs/reducers/AddressReducer.js +1 -0
- package/lib/cjs/reducers/AvailabilityReducer.d.ts +53 -0
- package/lib/cjs/reducers/AvailabilityReducer.js +1 -0
- package/{dist → lib/cjs}/reducers/BillingAddressReducer.d.ts +31 -32
- package/lib/cjs/reducers/BillingAddressReducer.js +1 -0
- package/{dist → lib/cjs}/reducers/CustomerReducer.d.ts +50 -51
- package/lib/cjs/reducers/CustomerReducer.js +1 -0
- package/{dist → lib/cjs}/reducers/GiftCardReducer.d.ts +76 -75
- package/lib/cjs/reducers/GiftCardReducer.js +1 -0
- package/{dist → lib/cjs}/reducers/ItemReducer.d.ts +69 -68
- package/lib/cjs/reducers/ItemReducer.js +1 -0
- package/{dist → lib/cjs}/reducers/LineItemReducer.d.ts +52 -52
- package/lib/cjs/reducers/LineItemReducer.js +1 -0
- package/lib/cjs/reducers/OrderReducer.d.ts +127 -0
- package/lib/cjs/reducers/OrderReducer.js +1 -0
- package/{dist → lib/cjs}/reducers/PaymentMethodReducer.d.ts +105 -106
- package/lib/cjs/reducers/PaymentMethodReducer.js +1 -0
- package/{dist → lib/cjs}/reducers/PlaceOrderReducer.d.ts +48 -50
- package/lib/cjs/reducers/PlaceOrderReducer.js +1 -0
- package/{dist → lib/cjs}/reducers/PriceReducer.d.ts +44 -45
- package/lib/cjs/reducers/PriceReducer.js +1 -0
- package/{dist → lib/cjs}/reducers/ShipmentReducer.d.ts +40 -37
- package/lib/cjs/reducers/ShipmentReducer.js +1 -0
- package/{dist → lib/cjs}/reducers/ShippingAddressReducer.d.ts +32 -31
- package/lib/cjs/reducers/ShippingAddressReducer.js +1 -0
- package/{dist → lib/cjs}/reducers/SkuListsReducer.d.ts +21 -22
- package/lib/cjs/reducers/SkuListsReducer.js +1 -0
- package/{dist → lib/cjs}/reducers/SkuOptionsReducer.d.ts +26 -26
- package/lib/cjs/reducers/SkuOptionsReducer.js +1 -0
- package/{dist → lib/cjs}/reducers/VariantReducer.d.ts +71 -71
- package/lib/cjs/reducers/VariantReducer.js +1 -0
- package/{dist → lib/cjs}/typings/errors.d.ts +42 -40
- package/lib/cjs/typings/errors.js +1 -0
- package/{dist → lib/cjs}/typings/index.d.ts +126 -126
- package/lib/cjs/typings/index.js +1 -0
- package/lib/cjs/utils/PropsType.d.ts +33 -0
- package/lib/cjs/utils/PropsType.js +1 -0
- package/{dist → lib/cjs}/utils/addressesManager.d.ts +28 -27
- package/lib/cjs/utils/addressesManager.js +1 -0
- package/{dist → lib/cjs}/utils/baseReducer.d.ts +3 -3
- package/lib/cjs/utils/baseReducer.js +1 -0
- package/{dist → lib/cjs}/utils/browserInfo.d.ts +9 -9
- package/lib/cjs/utils/browserInfo.js +1 -0
- package/{dist → lib/cjs}/utils/childrenTypes.d.ts +9 -9
- package/lib/cjs/utils/childrenTypes.js +1 -0
- package/{dist → lib/cjs}/utils/countryStateCity.d.ts +9 -9
- package/lib/cjs/utils/countryStateCity.js +1 -0
- package/{dist → lib/cjs}/utils/customMessages.d.ts +8 -8
- package/lib/cjs/utils/customMessages.js +1 -0
- package/lib/cjs/utils/customerOrderOptions.d.ts +3 -0
- package/lib/cjs/utils/customerOrderOptions.js +1 -0
- package/{dist → lib/cjs}/utils/getAmount.d.ts +9 -9
- package/lib/cjs/utils/getAmount.js +1 -0
- package/{dist → lib/cjs}/utils/getCurrentItemKey.d.ts +6 -6
- package/lib/cjs/utils/getCurrentItemKey.js +1 -0
- package/lib/cjs/utils/getErrors.d.ts +11 -0
- package/lib/cjs/utils/getErrors.js +1 -0
- package/{dist → lib/cjs}/utils/getLineItemsCount.d.ts +6 -6
- package/lib/cjs/utils/getLineItemsCount.js +1 -0
- package/{dist → lib/cjs}/utils/getLoaderComponent.d.ts +3 -3
- package/lib/cjs/utils/getLoaderComponent.js +1 -0
- package/lib/cjs/utils/getPrices.d.ts +17 -0
- package/lib/cjs/utils/getPrices.js +1 -0
- package/lib/cjs/utils/getSdk.d.ts +3 -0
- package/lib/cjs/utils/getSdk.js +1 -0
- package/lib/cjs/utils/getSkus.d.ts +3 -0
- package/lib/cjs/utils/getSkus.js +1 -0
- package/{dist → lib/cjs}/utils/isEmptyStates.d.ts +1 -1
- package/lib/cjs/utils/isEmptyStates.js +1 -0
- package/{dist → lib/cjs}/utils/isJSON.d.ts +1 -1
- package/lib/cjs/utils/isJSON.js +1 -0
- package/lib/cjs/utils/jwt.d.ts +27 -0
- package/lib/cjs/utils/jwt.js +1 -0
- package/{dist → lib/cjs}/utils/localStorage.d.ts +18 -18
- package/lib/cjs/utils/localStorage.js +1 -0
- package/lib/cjs/utils/organization.d.ts +6 -0
- package/lib/cjs/utils/organization.js +1 -0
- package/lib/cjs/utils/paypalPayment.d.ts +3 -0
- package/lib/cjs/utils/paypalPayment.js +1 -0
- package/{dist → lib/cjs}/utils/promisify.d.ts +1 -1
- package/lib/cjs/utils/promisify.js +1 -0
- package/lib/cjs/utils/shipments.d.ts +2 -0
- package/lib/cjs/utils/shipments.js +1 -0
- package/{dist → lib/cjs}/utils/validateFormFields.d.ts +20 -19
- package/lib/cjs/utils/validateFormFields.js +1 -0
- package/lib/esm/components/AddToCartButton.d.ts +20 -0
- package/lib/esm/components/AddToCartButton.js +1 -0
- package/lib/esm/components/Address.d.ts +13 -0
- package/lib/esm/components/Address.js +1 -0
- package/lib/esm/components/AddressCountrySelector.d.ts +9 -0
- package/lib/esm/components/AddressCountrySelector.js +1 -0
- package/lib/esm/components/AddressField.d.ts +15 -0
- package/lib/esm/components/AddressField.js +1 -0
- package/lib/esm/components/AddressInput.d.ts +7 -0
- package/lib/esm/components/AddressInput.js +1 -0
- package/lib/esm/components/AddressStateSelector.d.ts +11 -0
- package/lib/esm/components/AddressStateSelector.js +1 -0
- package/lib/esm/components/AddressesContainer.d.ts +7 -0
- package/lib/esm/components/AddressesContainer.js +1 -0
- package/lib/esm/components/AdyenPayment.d.ts +25 -0
- package/lib/esm/components/AdyenPayment.js +1 -0
- package/lib/esm/components/AvailabilityContainer.d.ts +7 -0
- package/lib/esm/components/AvailabilityContainer.js +1 -0
- package/lib/esm/components/AvailabilityTemplate.d.ts +11 -0
- package/lib/esm/components/AvailabilityTemplate.js +1 -0
- package/lib/esm/components/BillingAddressContainer.d.ts +6 -0
- package/lib/esm/components/BillingAddressContainer.js +1 -0
- package/lib/esm/components/BillingAddressForm.d.ts +8 -0
- package/lib/esm/components/BillingAddressForm.js +1 -0
- package/lib/esm/components/BraintreePayment.d.ts +30 -0
- package/lib/esm/components/BraintreePayment.js +1 -0
- package/lib/esm/components/CheckoutLink.d.ts +11 -0
- package/lib/esm/components/CheckoutLink.js +1 -0
- package/lib/esm/components/CommerceLayer.d.ts +8 -0
- package/lib/esm/components/CommerceLayer.js +1 -0
- package/lib/esm/components/CustomerContainer.d.ts +7 -0
- package/lib/esm/components/CustomerContainer.js +1 -0
- package/lib/esm/components/CustomerInput.d.ts +11 -0
- package/lib/esm/components/CustomerInput.js +1 -0
- package/lib/esm/components/DeliveryLeadTime.d.ts +10 -0
- package/lib/esm/components/DeliveryLeadTime.js +1 -0
- package/lib/esm/components/DiscountAmount.d.ts +4 -0
- package/lib/esm/components/DiscountAmount.js +1 -0
- package/lib/esm/components/Errors.d.ts +5 -0
- package/lib/esm/components/Errors.js +1 -0
- package/lib/esm/components/ExternalFunction.d.ts +7 -0
- package/lib/esm/components/ExternalFunction.js +1 -0
- package/lib/esm/components/GiftCard.d.ts +8 -0
- package/lib/esm/components/GiftCard.js +1 -0
- package/lib/esm/components/GiftCardAmount.d.ts +4 -0
- package/lib/esm/components/GiftCardAmount.js +1 -0
- package/lib/esm/components/GiftCardContainer.d.ts +6 -0
- package/lib/esm/components/GiftCardContainer.js +1 -0
- package/lib/esm/components/GiftCardCurrencySelector.d.ts +7 -0
- package/lib/esm/components/GiftCardCurrencySelector.js +1 -0
- package/lib/esm/components/GiftCardInput.d.ts +7 -0
- package/lib/esm/components/GiftCardInput.js +1 -0
- package/lib/esm/components/GiftCardOrCouponCode.d.ts +13 -0
- package/lib/esm/components/GiftCardOrCouponCode.js +1 -0
- package/lib/esm/components/GiftCardOrCouponForm.d.ts +10 -0
- package/lib/esm/components/GiftCardOrCouponForm.js +1 -0
- package/lib/esm/components/GiftCardOrCouponInput.d.ts +8 -0
- package/lib/esm/components/GiftCardOrCouponInput.js +1 -0
- package/lib/esm/components/GiftCardOrCouponRemoveButton.d.ts +16 -0
- package/lib/esm/components/GiftCardOrCouponRemoveButton.js +1 -0
- package/lib/esm/components/GiftCardOrCouponSubmit.d.ts +9 -0
- package/lib/esm/components/GiftCardOrCouponSubmit.js +1 -0
- package/lib/esm/components/GiftCardRecipient.d.ts +0 -0
- package/lib/esm/components/GiftCardRecipient.js +1 -0
- package/lib/esm/components/GiftCardRecipientInput.d.ts +0 -0
- package/lib/esm/components/GiftCardRecipientInput.js +1 -0
- package/lib/esm/components/ItemContainer.d.ts +11 -0
- package/lib/esm/components/ItemContainer.js +1 -0
- package/lib/esm/components/LineItem.d.ts +8 -0
- package/lib/esm/components/LineItem.js +1 -0
- package/lib/esm/components/LineItemAmount.d.ts +7 -0
- package/lib/esm/components/LineItemAmount.js +1 -0
- package/{dist/components/LineItemSkuCode.d.ts → lib/esm/components/LineItemCode.d.ts} +8 -7
- package/lib/esm/components/LineItemCode.js +1 -0
- package/lib/esm/components/LineItemImage.d.ts +10 -0
- package/lib/esm/components/LineItemImage.js +1 -0
- package/lib/esm/components/LineItemName.d.ts +9 -0
- package/lib/esm/components/LineItemName.js +1 -0
- package/lib/esm/components/LineItemOption.d.ts +19 -0
- package/lib/esm/components/LineItemOption.js +1 -0
- package/lib/esm/components/LineItemOptions.d.ts +14 -0
- package/lib/esm/components/LineItemOptions.js +1 -0
- package/lib/esm/components/LineItemQuantity.d.ts +14 -0
- package/lib/esm/components/LineItemQuantity.js +1 -0
- package/lib/esm/components/LineItemRemoveLink.d.ts +12 -0
- package/lib/esm/components/LineItemRemoveLink.js +1 -0
- package/lib/esm/components/LineItemsContainer.d.ts +8 -0
- package/lib/esm/components/LineItemsContainer.js +1 -0
- package/lib/esm/components/LineItemsCount.d.ts +10 -0
- package/lib/esm/components/LineItemsCount.js +1 -0
- package/lib/esm/components/MetadataInput.d.ts +5 -0
- package/lib/esm/components/MetadataInput.js +1 -0
- package/lib/esm/components/OrderContainer.d.ts +11 -0
- package/lib/esm/components/OrderContainer.js +1 -0
- package/lib/esm/components/OrderNumber.d.ts +5 -0
- package/lib/esm/components/OrderNumber.js +1 -0
- package/lib/esm/components/OrderStorage.d.ts +8 -0
- package/lib/esm/components/OrderStorage.js +1 -0
- package/lib/esm/components/PaymentGateway.d.ts +16 -0
- package/lib/esm/components/PaymentGateway.js +1 -0
- package/lib/esm/components/PaymentMethod.d.ts +16 -0
- package/lib/esm/components/PaymentMethod.js +1 -0
- package/lib/esm/components/PaymentMethodAmount.d.ts +4 -0
- package/lib/esm/components/PaymentMethodAmount.js +1 -0
- package/lib/esm/components/PaymentMethodName.d.ts +9 -0
- package/lib/esm/components/PaymentMethodName.js +1 -0
- package/lib/esm/components/PaymentMethodPrice.d.ts +9 -0
- package/lib/esm/components/PaymentMethodPrice.js +1 -0
- package/lib/esm/components/PaymentMethodRadioButton.d.ts +11 -0
- package/lib/esm/components/PaymentMethodRadioButton.js +1 -0
- package/lib/esm/components/PaymentMethodsContainer.d.ts +8 -0
- package/lib/esm/components/PaymentMethodsContainer.js +1 -0
- package/lib/esm/components/PaymentSource.d.ts +19 -0
- package/lib/esm/components/PaymentSource.js +1 -0
- package/lib/esm/components/PaymentSourceBrandIcon.d.ts +15 -0
- package/lib/esm/components/PaymentSourceBrandIcon.js +1 -0
- package/lib/esm/components/PaymentSourceBrandName.d.ts +12 -0
- package/lib/esm/components/PaymentSourceBrandName.js +1 -0
- package/lib/esm/components/PaymentSourceDetail.d.ts +12 -0
- package/lib/esm/components/PaymentSourceDetail.js +1 -0
- package/lib/esm/components/PaymentSourceEditButton.d.ts +9 -0
- package/lib/esm/components/PaymentSourceEditButton.js +1 -0
- package/lib/esm/components/PaypalPayment.d.ts +12 -0
- package/lib/esm/components/PaypalPayment.js +1 -0
- package/lib/esm/components/PlaceOrderButton.d.ts +12 -0
- package/lib/esm/components/PlaceOrderButton.js +1 -0
- package/lib/esm/components/PlaceOrderContainer.d.ts +8 -0
- package/lib/esm/components/PlaceOrderContainer.js +1 -0
- package/lib/esm/components/Price.d.ts +14 -0
- package/lib/esm/components/Price.js +1 -0
- package/lib/esm/components/PricesContainer.d.ts +11 -0
- package/lib/esm/components/PricesContainer.js +1 -0
- package/lib/esm/components/PrivacyAndTermsCheckbox.d.ts +4 -0
- package/lib/esm/components/PrivacyAndTermsCheckbox.js +1 -0
- package/lib/esm/components/QuantitySelector.d.ts +17 -0
- package/lib/esm/components/QuantitySelector.js +1 -0
- package/lib/esm/components/SaveAddressesButton.d.ts +10 -0
- package/lib/esm/components/SaveAddressesButton.js +1 -0
- package/lib/esm/components/SaveCustomerButton.d.ts +13 -0
- package/lib/esm/components/SaveCustomerButton.js +1 -0
- package/lib/esm/components/Shipment.d.ts +8 -0
- package/lib/esm/components/Shipment.js +1 -0
- package/lib/esm/components/ShipmentField.d.ts +12 -0
- package/lib/esm/components/ShipmentField.js +1 -0
- package/lib/esm/components/ShipmentsContainer.d.ts +6 -0
- package/lib/esm/components/ShipmentsContainer.js +1 -0
- package/lib/esm/components/ShippingAddressContainer.d.ts +6 -0
- package/lib/esm/components/ShippingAddressContainer.js +1 -0
- package/lib/esm/components/ShippingAddressForm.d.ts +8 -0
- package/lib/esm/components/ShippingAddressForm.js +1 -0
- package/lib/esm/components/ShippingAmount.d.ts +4 -0
- package/lib/esm/components/ShippingAmount.js +1 -0
- package/lib/esm/components/ShippingMethod.d.ts +8 -0
- package/lib/esm/components/ShippingMethod.js +1 -0
- package/lib/esm/components/ShippingMethodName.d.ts +11 -0
- package/lib/esm/components/ShippingMethodName.js +1 -0
- package/lib/esm/components/ShippingMethodPrice.d.ts +13 -0
- package/lib/esm/components/ShippingMethodPrice.js +1 -0
- package/lib/esm/components/ShippingMethodRadioButton.d.ts +9 -0
- package/lib/esm/components/ShippingMethodRadioButton.js +1 -0
- package/lib/esm/components/SkuList.d.ts +7 -0
- package/lib/esm/components/SkuList.js +1 -0
- package/lib/esm/components/SkuListsContainer.d.ts +6 -0
- package/lib/esm/components/SkuListsContainer.js +1 -0
- package/lib/esm/components/SkuOption.d.ts +7 -0
- package/lib/esm/components/SkuOption.js +1 -0
- package/lib/esm/components/SkuOptionInput.d.ts +5 -0
- package/lib/esm/components/SkuOptionInput.js +1 -0
- package/lib/esm/components/SkuOptionsContainer.d.ts +7 -0
- package/lib/esm/components/SkuOptionsContainer.js +1 -0
- package/lib/esm/components/StockTransfer.d.ts +6 -0
- package/lib/esm/components/StockTransfer.js +1 -0
- package/lib/esm/components/StockTransferField.d.ts +9 -0
- package/lib/esm/components/StockTransferField.js +1 -0
- package/lib/esm/components/StripePayment.d.ts +18 -0
- package/lib/esm/components/StripePayment.js +1 -0
- package/lib/esm/components/SubTotalAmount.d.ts +4 -0
- package/lib/esm/components/SubTotalAmount.js +1 -0
- package/lib/esm/components/SubmitButton.d.ts +9 -0
- package/lib/esm/components/SubmitButton.js +1 -0
- package/lib/esm/components/TaxesAmount.d.ts +4 -0
- package/lib/esm/components/TaxesAmount.js +1 -0
- package/lib/esm/components/TotalAmount.d.ts +4 -0
- package/lib/esm/components/TotalAmount.js +1 -0
- package/lib/esm/components/VariantSelector.d.ts +29 -0
- package/lib/esm/components/VariantSelector.js +1 -0
- package/lib/esm/components/VariantsContainer.d.ts +8 -0
- package/lib/esm/components/VariantsContainer.js +1 -0
- package/lib/esm/components/WireTransferPayment.d.ts +10 -0
- package/lib/esm/components/WireTransferPayment.js +1 -0
- package/lib/esm/components/gateways/AdyenGateway.d.ts +5 -0
- package/lib/esm/components/gateways/AdyenGateway.js +1 -0
- package/lib/esm/components/gateways/BraintreeGateway.d.ts +5 -0
- package/lib/esm/components/gateways/BraintreeGateway.js +1 -0
- package/lib/esm/components/gateways/PaypalGateway.d.ts +5 -0
- package/lib/esm/components/gateways/PaypalGateway.js +1 -0
- package/lib/esm/components/gateways/StripeGateway.d.ts +5 -0
- package/lib/esm/components/gateways/StripeGateway.js +1 -0
- package/lib/esm/components/gateways/WireTransferGateway.d.ts +5 -0
- package/lib/esm/components/gateways/WireTransferGateway.js +1 -0
- package/lib/esm/components/utils/AddressCardsTemplate.d.ts +27 -0
- package/lib/esm/components/utils/AddressCardsTemplate.js +1 -0
- package/lib/esm/components/utils/BaseField.d.ts +8 -0
- package/lib/esm/components/utils/BaseField.js +1 -0
- package/lib/esm/components/utils/BaseInput.d.ts +5 -0
- package/lib/esm/components/utils/BaseInput.js +1 -0
- package/lib/esm/components/utils/BaseOrderPrice.d.ts +6 -0
- package/lib/esm/components/utils/BaseOrderPrice.js +1 -0
- package/lib/esm/components/utils/BaseSelect.d.ts +5 -0
- package/lib/esm/components/utils/BaseSelect.js +1 -0
- package/lib/esm/components/utils/Parent.d.ts +8 -0
- package/lib/esm/components/utils/Parent.js +1 -0
- package/lib/esm/components/utils/PaymentCardsTemplate.d.ts +23 -0
- package/lib/esm/components/utils/PaymentCardsTemplate.js +1 -0
- package/lib/esm/components/utils/PriceTemplate.d.ts +8 -0
- package/lib/esm/components/utils/PriceTemplate.js +1 -0
- package/lib/esm/components/utils/VariantTemplate.d.ts +36 -0
- package/lib/esm/components/utils/VariantTemplate.js +1 -0
- package/lib/esm/components/utils/getAllErrors.d.ts +17 -0
- package/lib/esm/components/utils/getAllErrors.js +1 -0
- package/lib/esm/config/components.d.ts +867 -0
- package/lib/esm/config/components.js +1 -0
- package/lib/esm/config/currency.d.ts +5 -0
- package/lib/esm/config/currency.js +1 -0
- package/lib/esm/context/AddressChildrenContext.d.ts +7 -0
- package/lib/esm/context/AddressChildrenContext.js +1 -0
- package/lib/esm/context/AddressContext.d.ts +17 -0
- package/lib/esm/context/AddressContext.js +1 -0
- package/lib/esm/context/AvailabilityContext.d.ts +3 -0
- package/lib/esm/context/AvailabilityContext.js +1 -0
- package/lib/esm/context/BillingAddressContext.d.ts +12 -0
- package/lib/esm/context/BillingAddressContext.js +1 -0
- package/lib/esm/context/BillingAddressFormContext.d.ts +18 -0
- package/lib/esm/context/BillingAddressFormContext.js +1 -0
- package/lib/esm/context/CommerceLayerContext.d.ts +7 -0
- package/lib/esm/context/CommerceLayerContext.js +1 -0
- package/lib/esm/context/CouponAndGiftCardFormContext.d.ts +7 -0
- package/lib/esm/context/CouponAndGiftCardFormContext.js +1 -0
- package/lib/esm/context/CustomerContext.d.ts +16 -0
- package/lib/esm/context/CustomerContext.js +1 -0
- package/lib/esm/context/ExternalFunctionContext.d.ts +12 -0
- package/lib/esm/context/ExternalFunctionContext.js +1 -0
- package/lib/esm/context/GiftCardContext.d.ts +11 -0
- package/lib/esm/context/GiftCardContext.js +1 -0
- package/lib/esm/context/ItemContext.d.ts +13 -0
- package/lib/esm/context/ItemContext.js +1 -0
- package/lib/esm/context/LineItemChildrenContext.d.ts +9 -0
- package/lib/esm/context/LineItemChildrenContext.js +1 -0
- package/lib/esm/context/LineItemContext.d.ts +8 -0
- package/lib/esm/context/LineItemContext.js +1 -0
- package/lib/esm/context/LineItemOptionChildrenContext.d.ts +8 -0
- package/lib/esm/context/LineItemOptionChildrenContext.js +1 -0
- package/lib/esm/context/OrderContext.d.ts +26 -0
- package/lib/esm/context/OrderContext.js +1 -0
- package/lib/esm/context/OrderStorageContext.d.ts +11 -0
- package/lib/esm/context/OrderStorageContext.js +1 -0
- package/lib/esm/context/PaymentMethodChildrenContext.d.ts +10 -0
- package/lib/esm/context/PaymentMethodChildrenContext.js +1 -0
- package/lib/esm/context/PaymentMethodContext.d.ts +23 -0
- package/lib/esm/context/PaymentMethodContext.js +1 -0
- package/lib/esm/context/PaymentSourceContext.d.ts +14 -0
- package/lib/esm/context/PaymentSourceContext.js +1 -0
- package/lib/esm/context/PlaceOrderContext.d.ts +16 -0
- package/lib/esm/context/PlaceOrderContext.js +1 -0
- package/lib/esm/context/PricesContext.d.ts +7 -0
- package/lib/esm/context/PricesContext.js +1 -0
- package/lib/esm/context/ShipmentChildrenContext.d.ts +13 -0
- package/lib/esm/context/ShipmentChildrenContext.js +1 -0
- package/lib/esm/context/ShipmentContext.d.ts +12 -0
- package/lib/esm/context/ShipmentContext.js +1 -0
- package/lib/esm/context/ShippingAddressContext.d.ts +10 -0
- package/lib/esm/context/ShippingAddressContext.js +1 -0
- package/lib/esm/context/ShippingAddressFormContext.d.ts +4 -0
- package/lib/esm/context/ShippingAddressFormContext.js +1 -0
- package/lib/esm/context/ShippingMethodChildrenContext.d.ts +10 -0
- package/lib/esm/context/ShippingMethodChildrenContext.js +1 -0
- package/lib/esm/context/SkuListsContext.d.ts +6 -0
- package/lib/esm/context/SkuListsContext.js +1 -0
- package/lib/esm/context/SkuOptionChildrenContext.d.ts +8 -0
- package/lib/esm/context/SkuOptionChildrenContext.js +1 -0
- package/lib/esm/context/SkuOptionsContext.d.ts +3 -0
- package/lib/esm/context/SkuOptionsContext.js +1 -0
- package/lib/esm/context/StockTransferChildrenContext.d.ts +7 -0
- package/lib/esm/context/StockTransferChildrenContext.js +1 -0
- package/lib/esm/context/VariantsContext.d.ts +3 -0
- package/lib/esm/context/VariantsContext.js +1 -0
- package/lib/esm/index.d.ts +90 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/reducers/AddressReducer.d.ts +58 -0
- package/lib/esm/reducers/AddressReducer.js +1 -0
- package/lib/esm/reducers/AvailabilityReducer.d.ts +53 -0
- package/lib/esm/reducers/AvailabilityReducer.js +1 -0
- package/lib/esm/reducers/BillingAddressReducer.d.ts +31 -0
- package/lib/esm/reducers/BillingAddressReducer.js +1 -0
- package/lib/esm/reducers/CustomerReducer.d.ts +50 -0
- package/lib/esm/reducers/CustomerReducer.js +1 -0
- package/lib/esm/reducers/GiftCardReducer.d.ts +76 -0
- package/lib/esm/reducers/GiftCardReducer.js +1 -0
- package/lib/esm/reducers/ItemReducer.d.ts +69 -0
- package/lib/esm/reducers/ItemReducer.js +1 -0
- package/lib/esm/reducers/LineItemReducer.d.ts +52 -0
- package/lib/esm/reducers/LineItemReducer.js +1 -0
- package/lib/esm/reducers/OrderReducer.d.ts +127 -0
- package/lib/esm/reducers/OrderReducer.js +1 -0
- package/lib/esm/reducers/PaymentMethodReducer.d.ts +105 -0
- package/lib/esm/reducers/PaymentMethodReducer.js +1 -0
- package/lib/esm/reducers/PlaceOrderReducer.d.ts +48 -0
- package/lib/esm/reducers/PlaceOrderReducer.js +1 -0
- package/lib/esm/reducers/PriceReducer.d.ts +44 -0
- package/lib/esm/reducers/PriceReducer.js +1 -0
- package/lib/esm/reducers/ShipmentReducer.d.ts +40 -0
- package/lib/esm/reducers/ShipmentReducer.js +1 -0
- package/lib/esm/reducers/ShippingAddressReducer.d.ts +32 -0
- package/lib/esm/reducers/ShippingAddressReducer.js +1 -0
- package/lib/esm/reducers/SkuListsReducer.d.ts +21 -0
- package/lib/esm/reducers/SkuListsReducer.js +1 -0
- package/lib/esm/reducers/SkuOptionsReducer.d.ts +26 -0
- package/lib/esm/reducers/SkuOptionsReducer.js +1 -0
- package/lib/esm/reducers/VariantReducer.d.ts +71 -0
- package/lib/esm/reducers/VariantReducer.js +1 -0
- package/lib/esm/typings/errors.d.ts +42 -0
- package/lib/esm/typings/errors.js +1 -0
- package/lib/esm/typings/index.d.ts +126 -0
- package/lib/esm/typings/index.js +1 -0
- package/lib/esm/utils/PropsType.d.ts +33 -0
- package/lib/esm/utils/PropsType.js +1 -0
- package/lib/esm/utils/addressesManager.d.ts +28 -0
- package/lib/esm/utils/addressesManager.js +1 -0
- package/lib/esm/utils/baseReducer.d.ts +3 -0
- package/lib/esm/utils/baseReducer.js +1 -0
- package/lib/esm/utils/browserInfo.d.ts +9 -0
- package/lib/esm/utils/browserInfo.js +1 -0
- package/lib/esm/utils/childrenTypes.d.ts +9 -0
- package/lib/esm/utils/childrenTypes.js +1 -0
- package/lib/esm/utils/countryStateCity.d.ts +9 -0
- package/lib/esm/utils/countryStateCity.js +1 -0
- package/lib/esm/utils/customMessages.d.ts +8 -0
- package/lib/esm/utils/customMessages.js +1 -0
- package/lib/esm/utils/customerOrderOptions.d.ts +3 -0
- package/lib/esm/utils/customerOrderOptions.js +1 -0
- package/lib/esm/utils/getAmount.d.ts +9 -0
- package/lib/esm/utils/getAmount.js +1 -0
- package/lib/esm/utils/getCurrentItemKey.d.ts +6 -0
- package/lib/esm/utils/getCurrentItemKey.js +1 -0
- package/lib/esm/utils/getErrors.d.ts +11 -0
- package/lib/esm/utils/getErrors.js +1 -0
- package/lib/esm/utils/getLineItemsCount.d.ts +6 -0
- package/lib/esm/utils/getLineItemsCount.js +1 -0
- package/lib/esm/utils/getLoaderComponent.d.ts +3 -0
- package/lib/esm/utils/getLoaderComponent.js +1 -0
- package/lib/esm/utils/getPrices.d.ts +17 -0
- package/lib/esm/utils/getPrices.js +1 -0
- package/lib/esm/utils/getSdk.d.ts +3 -0
- package/lib/esm/utils/getSdk.js +1 -0
- package/lib/esm/utils/getSkus.d.ts +3 -0
- package/lib/esm/utils/getSkus.js +1 -0
- package/lib/esm/utils/isEmptyStates.d.ts +1 -0
- package/lib/esm/utils/isEmptyStates.js +1 -0
- package/lib/esm/utils/isJSON.d.ts +1 -0
- package/lib/esm/utils/isJSON.js +1 -0
- package/lib/esm/utils/jwt.d.ts +27 -0
- package/lib/esm/utils/jwt.js +1 -0
- package/lib/esm/utils/localStorage.d.ts +18 -0
- package/lib/esm/utils/localStorage.js +1 -0
- package/lib/esm/utils/organization.d.ts +6 -0
- package/lib/esm/utils/organization.js +1 -0
- package/lib/esm/utils/paypalPayment.d.ts +3 -0
- package/lib/esm/utils/paypalPayment.js +1 -0
- package/lib/esm/utils/promisify.d.ts +1 -0
- package/lib/esm/utils/promisify.js +1 -0
- package/lib/esm/utils/shipments.d.ts +2 -0
- package/lib/esm/utils/shipments.js +1 -0
- package/lib/esm/utils/validateFormFields.d.ts +20 -0
- package/lib/esm/utils/validateFormFields.js +1 -0
- package/lib/tsconfig.prod.esm.tsbuildinfo +1 -0
- package/lib/tsconfig.prod.tsbuildinfo +1 -0
- package/package.json +71 -53
- package/dist/components/utils/BaseInput.d.ts +0 -5
- package/dist/context/LineItemChildrenContext.d.ts +0 -7
- package/dist/context/OrderContext.d.ts +0 -4
- package/dist/context/ShipmentChildrenContext.d.ts +0 -13
- package/dist/context/ShippingMethodChildrenContext.d.ts +0 -9
- package/dist/context/SkuListsContext.d.ts +0 -3
- package/dist/index.d.ts +0 -89
- package/dist/index.js +0 -8
- package/dist/react-components.cjs.development.js +0 -12874
- package/dist/react-components.cjs.development.js.map +0 -1
- package/dist/react-components.cjs.production.min.js +0 -2
- package/dist/react-components.cjs.production.min.js.map +0 -1
- package/dist/react-components.esm.js +0 -12780
- package/dist/react-components.esm.js.map +0 -1
- package/dist/reducers/AvailabilityReducer.d.ts +0 -40
- package/dist/reducers/OrderReducer.d.ts +0 -131
- package/dist/utils/PropsType.d.ts +0 -8
- package/dist/utils/customerOrderOptions.d.ts +0 -4
- package/dist/utils/dynamicNaming.d.ts +0 -5
- package/dist/utils/getErrorsByCollection.d.ts +0 -11
- package/dist/utils/getPrices.d.ts +0 -18
- package/dist/utils/getSkus.d.ts +0 -3
- package/dist/utils/paypalPayment.d.ts +0 -3
- package/dist/utils/shipments.d.ts +0 -5
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
import { Dispatch } from 'react';
|
|
2
|
-
import { CommerceLayerConfig } from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
export declare type BillingAddressActionType = 'setBillingAddress' | 'setBillingCustomerAddressId' | 'cleanup';
|
|
6
|
-
export interface BillingAddressActionPayload {
|
|
7
|
-
|
|
8
|
-
billingCustomerAddressId: string;
|
|
9
|
-
}
|
|
10
|
-
export declare type BillingAddressState = Partial<BillingAddressActionPayload>;
|
|
11
|
-
export interface BillingAddressAction {
|
|
12
|
-
type: BillingAddressActionType;
|
|
13
|
-
payload: Partial<BillingAddressActionPayload>;
|
|
14
|
-
}
|
|
15
|
-
export declare const billingAddressInitialState: BillingAddressState;
|
|
16
|
-
export declare type SetBillingAddress = (id: string, options?: {
|
|
17
|
-
config: CommerceLayerConfig;
|
|
18
|
-
dispatch: Dispatch<BillingAddressAction>;
|
|
19
|
-
order?:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export default billingAddressReducer;
|
|
1
|
+
import { Dispatch } from 'react';
|
|
2
|
+
import { CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
3
|
+
import { Order } from '@commercelayer/sdk';
|
|
4
|
+
import { AddressResource } from './AddressReducer';
|
|
5
|
+
export declare type BillingAddressActionType = 'setBillingAddress' | 'setBillingCustomerAddressId' | 'cleanup';
|
|
6
|
+
export interface BillingAddressActionPayload {
|
|
7
|
+
_billing_address_clone_id: string;
|
|
8
|
+
billingCustomerAddressId: string;
|
|
9
|
+
}
|
|
10
|
+
export declare type BillingAddressState = Partial<BillingAddressActionPayload>;
|
|
11
|
+
export interface BillingAddressAction {
|
|
12
|
+
type: BillingAddressActionType;
|
|
13
|
+
payload: Partial<BillingAddressActionPayload>;
|
|
14
|
+
}
|
|
15
|
+
export declare const billingAddressInitialState: BillingAddressState;
|
|
16
|
+
export declare type SetBillingAddress = (id: string, options?: {
|
|
17
|
+
config: CommerceLayerConfig;
|
|
18
|
+
dispatch: Dispatch<BillingAddressAction>;
|
|
19
|
+
order?: Order;
|
|
20
|
+
shipToDifferentAddress?: boolean;
|
|
21
|
+
customerAddressId?: string;
|
|
22
|
+
}) => Promise<void>;
|
|
23
|
+
export declare const setBillingAddress: SetBillingAddress;
|
|
24
|
+
declare type SetBillingCustomerAddressId = (args: {
|
|
25
|
+
dispatch: Dispatch<BillingAddressAction>;
|
|
26
|
+
order: Order;
|
|
27
|
+
setCloneAddress: (id: string, resource: AddressResource) => void;
|
|
28
|
+
}) => void;
|
|
29
|
+
export declare const setBillingCustomerAddressId: SetBillingCustomerAddressId;
|
|
30
|
+
declare const billingAddressReducer: (state: BillingAddressState, reducer: BillingAddressAction) => BillingAddressState;
|
|
31
|
+
export default billingAddressReducer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.setBillingCustomerAddressId=exports.setBillingAddress=exports.billingAddressInitialState=void 0;const tslib_1=require("tslib");const baseReducer_1=(0,tslib_1.__importDefault)(require("../utils/baseReducer"));const getSdk_1=(0,tslib_1.__importDefault)(require("../utils/getSdk"));exports.billingAddressInitialState={_billing_address_clone_id:""};const setBillingAddress=async(e,s)=>{try{if(s===null||s===void 0?void 0:s.order){if(s.customerAddressId){const d=(0,getSdk_1.default)(s.config);const r={id:e,reference:s.customerAddressId};await d.addresses.update(r)}s.dispatch({type:"setBillingAddress",payload:{_billing_address_clone_id:e}})}}catch(e){console.error("Set billing address",e)}};exports.setBillingAddress=setBillingAddress;const setBillingCustomerAddressId=async({dispatch:e,order:s,setCloneAddress:d})=>{var r;const t=(r=s===null||s===void 0?void 0:s.billing_address)===null||r===void 0?void 0:r.reference;try{if(t){e({type:"setBillingCustomerAddressId",payload:{billingCustomerAddressId:t}});d(t,"billing_address")}}catch(e){console.error("error",e)}};exports.setBillingCustomerAddressId=setBillingCustomerAddressId;const type=["setBillingAddress","setBillingCustomerAddressId","cleanup"];const billingAddressReducer=(e,s)=>(0,baseReducer_1.default)(e,s,type);exports.default=billingAddressReducer;
|
|
@@ -1,51 +1,50 @@
|
|
|
1
|
-
import { Dispatch } from 'react';
|
|
2
|
-
import { BaseError } from
|
|
3
|
-
import {
|
|
4
|
-
import { CommerceLayerConfig } from
|
|
5
|
-
import {
|
|
6
|
-
export declare type CustomerActionType = 'setErrors' | 'setCustomerEmail' | 'setAddresses' | 'setPayments';
|
|
7
|
-
export interface CustomerActionPayload {
|
|
8
|
-
addresses:
|
|
9
|
-
payments:
|
|
10
|
-
customerEmail: string;
|
|
11
|
-
errors: BaseError[];
|
|
12
|
-
isGuest: boolean;
|
|
13
|
-
getCustomerPaymentSources: () => Promise<void>;
|
|
14
|
-
}
|
|
15
|
-
export declare type CustomerState = Partial<CustomerActionPayload>;
|
|
16
|
-
export interface CustomerAction {
|
|
17
|
-
type: CustomerActionType;
|
|
18
|
-
payload: Partial<CustomerActionPayload>;
|
|
19
|
-
}
|
|
20
|
-
export declare type SetSaveOnBlur = (args: {
|
|
21
|
-
saveOnBlur: boolean;
|
|
22
|
-
dispatch: Dispatch<CustomerAction>;
|
|
23
|
-
}) => void;
|
|
24
|
-
export declare type SaveCustomerUser = (args: {
|
|
25
|
-
config: CommerceLayerConfig;
|
|
26
|
-
customerEmail: string;
|
|
27
|
-
dispatch: Dispatch<CustomerAction>;
|
|
28
|
-
order?:
|
|
29
|
-
|
|
30
|
-
}) =>
|
|
31
|
-
export declare const saveCustomerUser: SaveCustomerUser;
|
|
32
|
-
export interface SetCustomerErrors {
|
|
33
|
-
<V extends BaseError[]>(errors: V, dispatch?: Dispatch<CustomerAction>): void;
|
|
34
|
-
}
|
|
35
|
-
export declare const setCustomerErrors: SetCustomerErrors;
|
|
36
|
-
export declare type SetCustomerEmail = (customerEmail: string, dispatch?: Dispatch<CustomerAction>) => void;
|
|
37
|
-
export declare const setCustomerEmail: SetCustomerEmail;
|
|
38
|
-
export declare type GetCustomerAddresses = (params: {
|
|
39
|
-
config: CommerceLayerConfig;
|
|
40
|
-
dispatch: Dispatch<CustomerAction>;
|
|
41
|
-
}) => Promise<void>;
|
|
42
|
-
export declare const getCustomerAddresses: GetCustomerAddresses;
|
|
43
|
-
export declare type GetCustomerPaymentSources = (params: {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
export declare const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
export default customerReducer;
|
|
1
|
+
import { Dispatch } from 'react';
|
|
2
|
+
import { BaseError } from '../typings/errors';
|
|
3
|
+
import { Address, CustomerPaymentSource, Order } from '@commercelayer/sdk';
|
|
4
|
+
import { CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
5
|
+
import { updateOrder } from './OrderReducer';
|
|
6
|
+
export declare type CustomerActionType = 'setErrors' | 'setCustomerEmail' | 'setAddresses' | 'setPayments';
|
|
7
|
+
export interface CustomerActionPayload {
|
|
8
|
+
addresses: Address[];
|
|
9
|
+
payments: CustomerPaymentSource[];
|
|
10
|
+
customerEmail: string;
|
|
11
|
+
errors: BaseError[];
|
|
12
|
+
isGuest: boolean;
|
|
13
|
+
getCustomerPaymentSources: () => Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
export declare type CustomerState = Partial<CustomerActionPayload>;
|
|
16
|
+
export interface CustomerAction {
|
|
17
|
+
type: CustomerActionType;
|
|
18
|
+
payload: Partial<CustomerActionPayload>;
|
|
19
|
+
}
|
|
20
|
+
export declare type SetSaveOnBlur = (args: {
|
|
21
|
+
saveOnBlur: boolean;
|
|
22
|
+
dispatch: Dispatch<CustomerAction>;
|
|
23
|
+
}) => void;
|
|
24
|
+
export declare type SaveCustomerUser = (args: {
|
|
25
|
+
config: CommerceLayerConfig;
|
|
26
|
+
customerEmail: string;
|
|
27
|
+
dispatch: Dispatch<CustomerAction>;
|
|
28
|
+
order?: Order;
|
|
29
|
+
updateOrder: typeof updateOrder;
|
|
30
|
+
}) => void;
|
|
31
|
+
export declare const saveCustomerUser: SaveCustomerUser;
|
|
32
|
+
export interface SetCustomerErrors {
|
|
33
|
+
<V extends BaseError[]>(errors: V, dispatch?: Dispatch<CustomerAction>): void;
|
|
34
|
+
}
|
|
35
|
+
export declare const setCustomerErrors: SetCustomerErrors;
|
|
36
|
+
export declare type SetCustomerEmail = (customerEmail: string, dispatch?: Dispatch<CustomerAction>) => void;
|
|
37
|
+
export declare const setCustomerEmail: SetCustomerEmail;
|
|
38
|
+
export declare type GetCustomerAddresses = (params: {
|
|
39
|
+
config: CommerceLayerConfig;
|
|
40
|
+
dispatch: Dispatch<CustomerAction>;
|
|
41
|
+
}) => Promise<void>;
|
|
42
|
+
export declare const getCustomerAddresses: GetCustomerAddresses;
|
|
43
|
+
export declare type GetCustomerPaymentSources = (params: {
|
|
44
|
+
dispatch: Dispatch<CustomerAction>;
|
|
45
|
+
order?: Order;
|
|
46
|
+
}) => Promise<void>;
|
|
47
|
+
export declare const getCustomerPaymentSources: GetCustomerPaymentSources;
|
|
48
|
+
export declare const customerInitialState: CustomerState;
|
|
49
|
+
declare const customerReducer: (state: CustomerState, reducer: CustomerAction) => CustomerState;
|
|
50
|
+
export default customerReducer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.customerInitialState=exports.getCustomerPaymentSources=exports.getCustomerAddresses=exports.setCustomerEmail=exports.setCustomerErrors=exports.saveCustomerUser=void 0;const tslib_1=require("tslib");const baseReducer_1=(0,tslib_1.__importDefault)(require("../utils/baseReducer"));const getSdk_1=(0,tslib_1.__importDefault)(require("../utils/getSdk"));const getErrors_1=(0,tslib_1.__importDefault)(require("../utils/getErrors"));const saveCustomerUser=async({customerEmail:e,order:s,updateOrder:t})=>{if(s){const r={customer_email:e,id:s.id};await t({id:s.id,attributes:r})}};exports.saveCustomerUser=saveCustomerUser;const setCustomerErrors=(e,s)=>{s&&s({type:"setErrors",payload:{errors:e}})};exports.setCustomerErrors=setCustomerErrors;const setCustomerEmail=(e,s)=>{s&&s({type:"setCustomerEmail",payload:{customerEmail:e}})};exports.setCustomerEmail=setCustomerEmail;const getCustomerAddresses=async({config:e,dispatch:s})=>{try{const t=[];const r=(0,getSdk_1.default)(e);const o=await r.customer_addresses.list({include:["address"]});o.forEach((e=>{if(e.address)t.push(e.address)}));s({type:"setAddresses",payload:{addresses:t}})}catch(e){const t=(0,getErrors_1.default)(e,"addresses");s({type:"setErrors",payload:{errors:t}})}};exports.getCustomerAddresses=getCustomerAddresses;const getCustomerPaymentSources=async({dispatch:e,order:s})=>{if(s===null||s===void 0?void 0:s.available_customer_payment_sources){e({type:"setPayments",payload:{payments:s.available_customer_payment_sources}})}};exports.getCustomerPaymentSources=getCustomerPaymentSources;exports.customerInitialState={errors:[],addresses:[],payments:[]};const type=["setErrors","setCustomerEmail","setAddresses","setPayments"];const customerReducer=(e,s)=>(0,baseReducer_1.default)(e,s,type);exports.default=customerReducer;
|
|
@@ -1,75 +1,76 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BaseMetadata } from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
export declare type GiftCardActionType = 'setAvailability' | 'setGiftCardRecipient' | 'setGiftCardErrors' | 'setGiftCardLoading';
|
|
8
|
-
export interface GiftCardRecipientI {
|
|
9
|
-
email: string;
|
|
10
|
-
firstName?: string;
|
|
11
|
-
lastName?: string;
|
|
12
|
-
referenceOrigin?: string;
|
|
13
|
-
reference?: string;
|
|
14
|
-
metadata?: BaseMetadata;
|
|
15
|
-
customer?:
|
|
16
|
-
}
|
|
17
|
-
export interface GiftCardI {
|
|
18
|
-
currencyCode?: string;
|
|
19
|
-
balanceCent?: number;
|
|
20
|
-
balanceMaxCents?: number;
|
|
21
|
-
singleUse?: boolean;
|
|
22
|
-
rechargeable?: boolean;
|
|
23
|
-
imageUrl?: string;
|
|
24
|
-
expiresAt?: null | Date;
|
|
25
|
-
firstName?: string;
|
|
26
|
-
lastName?: string;
|
|
27
|
-
email?: string;
|
|
28
|
-
referenceOrigin?: string;
|
|
29
|
-
recipientEmail?: string;
|
|
30
|
-
reference?: string;
|
|
31
|
-
metadata?: BaseMetadata;
|
|
32
|
-
orderId?: string;
|
|
33
|
-
}
|
|
34
|
-
export interface GiftCardActionPayload extends GiftCardI {
|
|
35
|
-
market?:
|
|
36
|
-
giftCardRecipient?:
|
|
37
|
-
errors?: BaseError[];
|
|
38
|
-
loading?: boolean;
|
|
39
|
-
}
|
|
40
|
-
export interface GiftCardState extends GiftCardActionPayload {
|
|
41
|
-
currencyCode: string;
|
|
42
|
-
balanceCent: number;
|
|
43
|
-
addGiftCardRecipient?: (values: GiftCardRecipientI & Record<string, any>) => void;
|
|
44
|
-
addGiftCard?: (values: GiftCardI & Record<string, any>) => void;
|
|
45
|
-
addGiftCardError?: (errors: BaseError[]) => void;
|
|
46
|
-
addGiftCardLoading?: (loading: boolean) => void;
|
|
47
|
-
}
|
|
48
|
-
export interface GiftCardAction {
|
|
49
|
-
type: GiftCardActionType;
|
|
50
|
-
payload: GiftCardActionPayload;
|
|
51
|
-
}
|
|
52
|
-
export declare const giftCardInitialState: GiftCardState;
|
|
53
|
-
export interface AddGiftCardRecipient {
|
|
54
|
-
<V extends
|
|
55
|
-
}
|
|
56
|
-
export interface AddGiftCard {
|
|
57
|
-
<V extends GiftCardI>(values: V, configParameters: {
|
|
58
|
-
getOrder?: (id: string) => void;
|
|
59
|
-
createOrder?:
|
|
60
|
-
config: CommerceLayerConfig;
|
|
61
|
-
dispatch: Dispatch<GiftCardAction>;
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
export declare const
|
|
72
|
-
export declare const
|
|
73
|
-
export declare const
|
|
74
|
-
declare const
|
|
75
|
-
|
|
1
|
+
import { Customer, Market, GiftCardRecipient, GiftCardRecipientCreate, Order } from '@commercelayer/sdk';
|
|
2
|
+
import { BaseMetadata } from '../typings/index';
|
|
3
|
+
import { Dispatch } from 'react';
|
|
4
|
+
import { CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
5
|
+
import { BaseError } from '../typings/errors';
|
|
6
|
+
import { CreateOrder } from './OrderReducer';
|
|
7
|
+
export declare type GiftCardActionType = 'setAvailability' | 'setGiftCardRecipient' | 'setGiftCardErrors' | 'setGiftCardLoading';
|
|
8
|
+
export interface GiftCardRecipientI {
|
|
9
|
+
email: string;
|
|
10
|
+
firstName?: string;
|
|
11
|
+
lastName?: string;
|
|
12
|
+
referenceOrigin?: string;
|
|
13
|
+
reference?: string;
|
|
14
|
+
metadata?: BaseMetadata;
|
|
15
|
+
customer?: Customer;
|
|
16
|
+
}
|
|
17
|
+
export interface GiftCardI {
|
|
18
|
+
currencyCode?: string;
|
|
19
|
+
balanceCent?: number;
|
|
20
|
+
balanceMaxCents?: number;
|
|
21
|
+
singleUse?: boolean;
|
|
22
|
+
rechargeable?: boolean;
|
|
23
|
+
imageUrl?: string;
|
|
24
|
+
expiresAt?: null | Date;
|
|
25
|
+
firstName?: string;
|
|
26
|
+
lastName?: string;
|
|
27
|
+
email?: string;
|
|
28
|
+
referenceOrigin?: string;
|
|
29
|
+
recipientEmail?: string;
|
|
30
|
+
reference?: string;
|
|
31
|
+
metadata?: BaseMetadata;
|
|
32
|
+
orderId?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface GiftCardActionPayload extends GiftCardI {
|
|
35
|
+
market?: Market;
|
|
36
|
+
giftCardRecipient?: GiftCardRecipient;
|
|
37
|
+
errors?: BaseError[];
|
|
38
|
+
loading?: boolean;
|
|
39
|
+
}
|
|
40
|
+
export interface GiftCardState extends GiftCardActionPayload {
|
|
41
|
+
currencyCode: string;
|
|
42
|
+
balanceCent: number;
|
|
43
|
+
addGiftCardRecipient?: (values: GiftCardRecipientI & Record<string, any>) => void;
|
|
44
|
+
addGiftCard?: (values: GiftCardI & Record<string, any>) => void;
|
|
45
|
+
addGiftCardError?: (errors: BaseError[]) => void;
|
|
46
|
+
addGiftCardLoading?: (loading: boolean) => void;
|
|
47
|
+
}
|
|
48
|
+
export interface GiftCardAction {
|
|
49
|
+
type: GiftCardActionType;
|
|
50
|
+
payload: GiftCardActionPayload;
|
|
51
|
+
}
|
|
52
|
+
export declare const giftCardInitialState: GiftCardState;
|
|
53
|
+
export interface AddGiftCardRecipient {
|
|
54
|
+
<V extends GiftCardRecipientCreate>(values: V, config: CommerceLayerConfig, dispatch: Dispatch<GiftCardAction>): void;
|
|
55
|
+
}
|
|
56
|
+
export interface AddGiftCard {
|
|
57
|
+
<V extends GiftCardI>(values: V, configParameters: {
|
|
58
|
+
getOrder?: (id: string) => void;
|
|
59
|
+
createOrder?: CreateOrder;
|
|
60
|
+
config: CommerceLayerConfig;
|
|
61
|
+
dispatch: Dispatch<GiftCardAction>;
|
|
62
|
+
order?: Order;
|
|
63
|
+
}): void;
|
|
64
|
+
}
|
|
65
|
+
export interface AddGiftCardError {
|
|
66
|
+
<V extends BaseError[]>(errors: V, dispatch: Dispatch<GiftCardAction>): void;
|
|
67
|
+
}
|
|
68
|
+
export interface AddGiftCardLoading {
|
|
69
|
+
<V extends boolean>(loading: V, dispatch: Dispatch<GiftCardAction>): void;
|
|
70
|
+
}
|
|
71
|
+
export declare const addGiftCardRecipient: AddGiftCardRecipient;
|
|
72
|
+
export declare const addGiftCardLoading: AddGiftCardLoading;
|
|
73
|
+
export declare const addGiftCard: AddGiftCard;
|
|
74
|
+
export declare const addGiftCardError: AddGiftCardError;
|
|
75
|
+
declare const giftCardReducer: (state: GiftCardState, reducer: GiftCardAction) => GiftCardState;
|
|
76
|
+
export default giftCardReducer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.addGiftCardError=exports.addGiftCard=exports.addGiftCardLoading=exports.addGiftCardRecipient=exports.giftCardInitialState=void 0;const tslib_1=require("tslib");const baseReducer_1=(0,tslib_1.__importDefault)(require("../utils/baseReducer"));const lodash_1=require("lodash");const getErrors_1=(0,tslib_1.__importDefault)(require("../utils/getErrors"));const getSdk_1=(0,tslib_1.__importDefault)(require("../utils/getSdk"));exports.giftCardInitialState={currencyCode:"",balanceCent:0,singleUse:false,rechargeable:true,loading:false,expiresAt:null,errors:[]};const addGiftCardRecipient=async(t,e,r)=>{try{const a=(0,getSdk_1.default)(e);const i=await a.gift_card_recipients.create(t);r({type:"setGiftCardRecipient",payload:{giftCardRecipient:i}})}catch(t){console.error(t)}};exports.addGiftCardRecipient=addGiftCardRecipient;const addGiftCardLoading=(t,e)=>{e({type:"setGiftCardLoading",payload:{loading:t}})};exports.addGiftCardLoading=addGiftCardLoading;const addGiftCard=async(t,{config:e,dispatch:r,getOrder:a,createOrder:i,order:d})=>{var s;try{const o=(0,getSdk_1.default)(e);(0,exports.addGiftCardLoading)(true,r);const{firstName:c,lastName:n,email:f}=t,l=(0,tslib_1.__rest)(t,["firstName","lastName","email"]);const p=Object.assign({recipient_email:f},l);const _=await o.gift_cards.create(p,{include:["gift_card_recipient"]});const g={id:(s=_.gift_card_recipient)===null||s===void 0?void 0:s.id};if(c)g["first_name"]=c;if(n)g["last_name"]=n;if(!(0,lodash_1.isEmpty)(g)){await o.gift_card_recipients.update(g)}if(i&&a){const t=d?d.id:await i();if(t){const e=o.orders.relationship(t);const r=o.gift_cards.relationship(_.id);await o.line_items.create({quantity:1,order:e,item:r});a&&a(t)}}r({type:"setGiftCardRecipient",payload:Object.assign({},p)});(0,exports.addGiftCardLoading)(false,r)}catch(t){const e=(0,getErrors_1.default)(t,"gift_cards");r({type:"setGiftCardErrors",payload:{errors:e}});(0,exports.addGiftCardLoading)(false,r)}};exports.addGiftCard=addGiftCard;const addGiftCardError=(t,e)=>{e({type:"setGiftCardErrors",payload:{errors:t}})};exports.addGiftCardError=addGiftCardError;const type=["setAvailability","setGiftCardRecipient","setGiftCardErrors","setGiftCardLoading"];const giftCardReducer=(t,e)=>(0,baseReducer_1.default)(t,e,type);exports.default=giftCardReducer;
|
|
@@ -1,68 +1,69 @@
|
|
|
1
|
-
import { BaseUnsetState } from
|
|
2
|
-
import {
|
|
3
|
-
import { Dispatch } from 'react';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
export declare const
|
|
41
|
-
export declare
|
|
42
|
-
export declare type
|
|
43
|
-
export
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
declare const
|
|
68
|
-
|
|
1
|
+
import { BaseUnsetState } from '../typings/index';
|
|
2
|
+
import { Price } from '@commercelayer/sdk';
|
|
3
|
+
import { Dispatch } from 'react';
|
|
4
|
+
import { SkuInventory } from './AvailabilityReducer';
|
|
5
|
+
export interface Items {
|
|
6
|
+
[skuCode: string]: SkuInventory;
|
|
7
|
+
}
|
|
8
|
+
export interface ItemPrices {
|
|
9
|
+
[skuCode: string]: Price;
|
|
10
|
+
}
|
|
11
|
+
export interface ItemQuantity {
|
|
12
|
+
[skuCode: string]: number;
|
|
13
|
+
}
|
|
14
|
+
export interface ItemOption {
|
|
15
|
+
[key: string]: {
|
|
16
|
+
skuOptionId: string;
|
|
17
|
+
options: {
|
|
18
|
+
[key: string]: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface ItemOptions {
|
|
23
|
+
[skuCode: string]: ItemOption;
|
|
24
|
+
}
|
|
25
|
+
export declare type CustomLineItem = {
|
|
26
|
+
name?: string;
|
|
27
|
+
imageUrl?: string | null;
|
|
28
|
+
};
|
|
29
|
+
export interface CustomLineItems {
|
|
30
|
+
[skuCode: string]: CustomLineItem;
|
|
31
|
+
}
|
|
32
|
+
declare type ItemParams = {
|
|
33
|
+
type: ItemActionType;
|
|
34
|
+
key: 'items' | 'item' | 'quantity' | 'option' | 'prices' | 'lineItem' | 'lineItems' | 'skuCode';
|
|
35
|
+
};
|
|
36
|
+
declare type DataType = Items | ItemQuantity | ItemOptions | ItemPrices | CustomLineItems | CustomLineItem | string;
|
|
37
|
+
export interface SetItemState {
|
|
38
|
+
(data: DataType, params: ItemParams, dispatch: Dispatch<ItemAction>): void;
|
|
39
|
+
}
|
|
40
|
+
export declare const setItemState: SetItemState;
|
|
41
|
+
export declare const unsetItemState: BaseUnsetState<ItemAction>;
|
|
42
|
+
export declare type SetCustomLineItems = (lineItems: CustomLineItems) => void;
|
|
43
|
+
export declare type SetCustomLineItem = (lineItem: CustomLineItem) => void;
|
|
44
|
+
export interface ItemState {
|
|
45
|
+
skuCode?: string;
|
|
46
|
+
items?: Items;
|
|
47
|
+
item?: Items;
|
|
48
|
+
lineItems?: CustomLineItems;
|
|
49
|
+
lineItem?: CustomLineItem;
|
|
50
|
+
quantity?: ItemQuantity;
|
|
51
|
+
option?: ItemOptions;
|
|
52
|
+
prices?: ItemPrices;
|
|
53
|
+
setItems?: (items: Items) => void;
|
|
54
|
+
setItem?: (item: Items) => void;
|
|
55
|
+
setQuantity?: (quantity: ItemQuantity) => void;
|
|
56
|
+
setOption?: (option: ItemOptions) => void;
|
|
57
|
+
setPrices?: (prices: ItemPrices) => void;
|
|
58
|
+
setSkuCode?: (skuCode: string) => void;
|
|
59
|
+
setCustomLineItems: SetCustomLineItems;
|
|
60
|
+
setCustomLineItem?: SetCustomLineItem;
|
|
61
|
+
}
|
|
62
|
+
declare type ItemActionType = 'setItem' | 'setItems' | 'setQuantity' | 'setOption' | 'setPrices' | 'setCustomLineItems' | 'setCustomLineItem' | 'setSkuCode';
|
|
63
|
+
export interface ItemAction {
|
|
64
|
+
type: ItemActionType;
|
|
65
|
+
payload: Partial<ItemState>;
|
|
66
|
+
}
|
|
67
|
+
export declare const itemInitialState: Partial<ItemState>;
|
|
68
|
+
declare const itemReducer: (state: Partial<ItemState>, reducer: ItemAction) => Partial<ItemState>;
|
|
69
|
+
export default itemReducer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.itemInitialState=exports.unsetItemState=exports.setItemState=void 0;const tslib_1=require("tslib");const baseReducer_1=(0,tslib_1.__importDefault)(require("../utils/baseReducer"));const setItemState=(t,e,s)=>{s({type:e.type,payload:{[`${e.key}`]:t}})};exports.setItemState=setItemState;const unsetItemState=t=>{t({type:"setItem",payload:{item:{}}});t({type:"setItems",payload:{items:{}}});t({type:"setQuantity",payload:{quantity:{}}});t({type:"setOption",payload:{option:{}}});t({type:"setCustomLineItems",payload:{lineItems:{}}});t({type:"setCustomLineItem",payload:{lineItem:{}}})};exports.unsetItemState=unsetItemState;const actionType=["setItem","setItems","setQuantity","setOption","setPrices","setCustomLineItems","setCustomLineItem","setSkuCode"];exports.itemInitialState={items:{},item:{},quantity:{},option:{},prices:{},lineItems:{},lineItem:{},skuCode:""};const itemReducer=(t,e)=>(0,baseReducer_1.default)(t,e,actionType);exports.default=itemReducer;
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
export declare type UpdateLineItemParams = {
|
|
8
|
-
lineItemId: string;
|
|
9
|
-
quantity?: number;
|
|
10
|
-
dispatch: Dispatch<LineItemAction>;
|
|
11
|
-
config: CommerceLayerConfig;
|
|
12
|
-
getOrder: getOrderContext | undefined;
|
|
13
|
-
orderId: string;
|
|
14
|
-
errors: BaseError[] | undefined;
|
|
15
|
-
};
|
|
16
|
-
export interface UpdateLineItem {
|
|
17
|
-
(params: UpdateLineItemParams): void;
|
|
18
|
-
}
|
|
19
|
-
export declare type DeleteLineItemParam = Record<string, any> & UpdateLineItemParams;
|
|
20
|
-
export interface DeleteLineItem {
|
|
21
|
-
(params: DeleteLineItemParam): void;
|
|
22
|
-
}
|
|
23
|
-
export declare type GetLineItemsParams = {
|
|
24
|
-
dispatch: Dispatch<LineItemAction>;
|
|
25
|
-
config: CommerceLayerConfig;
|
|
26
|
-
order:
|
|
27
|
-
filters: Record<string, any>;
|
|
28
|
-
};
|
|
29
|
-
export interface GetLineItems {
|
|
30
|
-
(params: GetLineItemsParams): void;
|
|
31
|
-
}
|
|
32
|
-
export interface LineItemPayload {
|
|
33
|
-
loading?: boolean;
|
|
34
|
-
loader?: LoaderType;
|
|
35
|
-
lineItems?:
|
|
36
|
-
errors?: BaseError[];
|
|
37
|
-
}
|
|
38
|
-
export interface LineItemState extends LineItemPayload {
|
|
39
|
-
updateLineItem?: (lineItemId: string, quantity?: number) => void;
|
|
40
|
-
deleteLineItem?: (lineItemId: string) => void;
|
|
41
|
-
}
|
|
42
|
-
export interface LineItemAction {
|
|
43
|
-
type: LineItemActionType;
|
|
44
|
-
payload: LineItemPayload;
|
|
45
|
-
}
|
|
46
|
-
export declare const getLineItems: GetLineItems;
|
|
47
|
-
export declare const updateLineItem: UpdateLineItem;
|
|
48
|
-
export declare const deleteLineItem: DeleteLineItem;
|
|
49
|
-
export declare const lineItemInitialState: LineItemState;
|
|
50
|
-
export declare type LineItemActionType = 'setLineItems' | 'setErrors' | 'setLoading';
|
|
51
|
-
declare const lineItemReducer: (state: LineItemState, reducer: LineItemAction) => LineItemState;
|
|
52
|
-
export default lineItemReducer;
|
|
1
|
+
import { Dispatch } from 'react';
|
|
2
|
+
import { CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
3
|
+
import { getOrderContext } from './OrderReducer';
|
|
4
|
+
import { LoaderType } from '../typings/index';
|
|
5
|
+
import { BaseError } from '../typings/errors';
|
|
6
|
+
import { Order, LineItem } from '@commercelayer/sdk';
|
|
7
|
+
export declare type UpdateLineItemParams = {
|
|
8
|
+
lineItemId: string;
|
|
9
|
+
quantity?: number;
|
|
10
|
+
dispatch: Dispatch<LineItemAction>;
|
|
11
|
+
config: CommerceLayerConfig;
|
|
12
|
+
getOrder: getOrderContext | undefined;
|
|
13
|
+
orderId: string;
|
|
14
|
+
errors: BaseError[] | undefined;
|
|
15
|
+
};
|
|
16
|
+
export interface UpdateLineItem {
|
|
17
|
+
(params: UpdateLineItemParams): void;
|
|
18
|
+
}
|
|
19
|
+
export declare type DeleteLineItemParam = Record<string, any> & UpdateLineItemParams;
|
|
20
|
+
export interface DeleteLineItem {
|
|
21
|
+
(params: DeleteLineItemParam): void;
|
|
22
|
+
}
|
|
23
|
+
export declare type GetLineItemsParams = {
|
|
24
|
+
dispatch: Dispatch<LineItemAction>;
|
|
25
|
+
config: CommerceLayerConfig;
|
|
26
|
+
order: Order | null;
|
|
27
|
+
filters: Record<string, any>;
|
|
28
|
+
};
|
|
29
|
+
export interface GetLineItems {
|
|
30
|
+
(params: GetLineItemsParams): void;
|
|
31
|
+
}
|
|
32
|
+
export interface LineItemPayload {
|
|
33
|
+
loading?: boolean;
|
|
34
|
+
loader?: LoaderType;
|
|
35
|
+
lineItems?: LineItem[];
|
|
36
|
+
errors?: BaseError[];
|
|
37
|
+
}
|
|
38
|
+
export interface LineItemState extends LineItemPayload {
|
|
39
|
+
updateLineItem?: (lineItemId: string, quantity?: number) => void;
|
|
40
|
+
deleteLineItem?: (lineItemId: string) => void;
|
|
41
|
+
}
|
|
42
|
+
export interface LineItemAction {
|
|
43
|
+
type: LineItemActionType;
|
|
44
|
+
payload: LineItemPayload;
|
|
45
|
+
}
|
|
46
|
+
export declare const getLineItems: GetLineItems;
|
|
47
|
+
export declare const updateLineItem: UpdateLineItem;
|
|
48
|
+
export declare const deleteLineItem: DeleteLineItem;
|
|
49
|
+
export declare const lineItemInitialState: LineItemState;
|
|
50
|
+
export declare type LineItemActionType = 'setLineItems' | 'setErrors' | 'setLoading';
|
|
51
|
+
declare const lineItemReducer: (state: LineItemState, reducer: LineItemAction) => LineItemState;
|
|
52
|
+
export default lineItemReducer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.lineItemInitialState=exports.deleteLineItem=exports.updateLineItem=exports.getLineItems=void 0;const tslib_1=require("tslib");const baseReducer_1=(0,tslib_1.__importDefault)(require("../utils/baseReducer"));const getSdk_1=(0,tslib_1.__importDefault)(require("../utils/getSdk"));const getErrors_1=(0,tslib_1.__importDefault)(require("../utils/getErrors"));const getLineItems=e=>{const{order:t,dispatch:r,config:s}=e;const i=(0,getSdk_1.default)(s);let o=[];t&&i.orders.retrieve(t===null||t===void 0?void 0:t.id,{include:["line_items","line_items.line_item_options.sku_option"],fields:{orders:["line_items"]}}).then((e=>{r({type:"setLoading",payload:{loading:false}});const t=e.line_items||[];o=[...o,...t];r({type:"setLineItems",payload:{lineItems:o}})})).catch((e=>{const t=(0,getErrors_1.default)(e,"line_items");r({type:"setErrors",payload:{errors:t}})}))};exports.getLineItems=getLineItems;const updateLineItem=async e=>{const{config:t,lineItemId:r,quantity:s,getOrder:i,orderId:o,dispatch:n}=e;const a=(0,getSdk_1.default)(t);try{await a.line_items.update({id:r,quantity:s});i&&await i(o);n({type:"setErrors",payload:{errors:[]}})}catch(e){const t=(0,getErrors_1.default)(e,"line_items");n({type:"setErrors",payload:{errors:t}})}};exports.updateLineItem=updateLineItem;const deleteLineItem=async e=>{const{config:t,lineItemId:r,getOrder:s,orderId:i,dispatch:o}=e;const n=(0,getSdk_1.default)(t);try{await n.line_items.delete(r);s&&await s(i);o({type:"setErrors",payload:{errors:[]}})}catch(e){const t=(0,getErrors_1.default)(e,"line_items");o({type:"setErrors",payload:{errors:t}})}};exports.deleteLineItem=deleteLineItem;exports.lineItemInitialState={loading:false,lineItems:[],errors:[]};const actionType=["setLineItems","setErrors","setLoading"];const lineItemReducer=(e,t)=>(0,baseReducer_1.default)(e,t,actionType);exports.default=lineItemReducer;
|