@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,37 +1,40 @@
|
|
|
1
|
-
import { Dispatch } from 'react';
|
|
2
|
-
import { BaseError } from
|
|
3
|
-
import {
|
|
4
|
-
import { CommerceLayerConfig } from
|
|
5
|
-
import { getOrderContext } from './OrderReducer';
|
|
6
|
-
export declare type ShipmentActionType = 'setErrors' | 'setShipments' | 'setShippingMethod';
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
1
|
+
import { Dispatch } from 'react';
|
|
2
|
+
import { BaseError } from '../typings/errors';
|
|
3
|
+
import { DeliveryLeadTime, LineItem, Order, Shipment } from '@commercelayer/sdk';
|
|
4
|
+
import { CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
5
|
+
import { getOrderContext } from './OrderReducer';
|
|
6
|
+
export declare type ShipmentActionType = 'setErrors' | 'setShipments' | 'setShippingMethod';
|
|
7
|
+
export declare type ShipmentLineItem = LineItem & {
|
|
8
|
+
line_item: LineItem;
|
|
9
|
+
};
|
|
10
|
+
export interface ShipmentActionPayload {
|
|
11
|
+
errors: BaseError[];
|
|
12
|
+
shipments: Shipment[];
|
|
13
|
+
deliveryLeadTimes: DeliveryLeadTime[];
|
|
14
|
+
}
|
|
15
|
+
export declare type ShipmentState = Partial<ShipmentActionPayload>;
|
|
16
|
+
export interface ShipmentAction {
|
|
17
|
+
type: ShipmentActionType;
|
|
18
|
+
payload: Partial<ShipmentActionPayload>;
|
|
19
|
+
}
|
|
20
|
+
export declare const shipmentInitialState: ShipmentState;
|
|
21
|
+
export interface SetShipmentErrors {
|
|
22
|
+
<V extends BaseError[]>(errors: V, dispatch?: Dispatch<ShipmentAction>): void;
|
|
23
|
+
}
|
|
24
|
+
export declare const setShipmentErrors: SetShipmentErrors;
|
|
25
|
+
declare type GetShipments = (args: {
|
|
26
|
+
order: Order;
|
|
27
|
+
dispatch: Dispatch<ShipmentAction>;
|
|
28
|
+
config: CommerceLayerConfig;
|
|
29
|
+
}) => Promise<void>;
|
|
30
|
+
export declare const getShipments: GetShipments;
|
|
31
|
+
declare type SetShippingMethod = (args: {
|
|
32
|
+
config: CommerceLayerConfig;
|
|
33
|
+
shipmentId: string;
|
|
34
|
+
shippingMethodId: string;
|
|
35
|
+
order?: Order;
|
|
36
|
+
getOrder?: getOrderContext;
|
|
37
|
+
}) => Promise<void>;
|
|
38
|
+
export declare const setShippingMethod: SetShippingMethod;
|
|
39
|
+
declare const shipmentReducer: (state: ShipmentState, reducer: ShipmentAction) => ShipmentState;
|
|
40
|
+
export default shipmentReducer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.setShippingMethod=exports.getShipments=exports.setShipmentErrors=exports.shipmentInitialState=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.shipmentInitialState={errors:[]};const setShipmentErrors=(e,t)=>{t&&t({type:"setErrors",payload:{errors:e}})};exports.setShipmentErrors=setShipmentErrors;const getShipments=async({order:e,dispatch:t,config:s})=>{try{const i=(0,getSdk_1.default)(s);const r=e.shipments;const o=await i.delivery_lead_times.list({include:["shipping_method","stock_location"]});t({type:"setShipments",payload:{shipments:r,deliveryLeadTimes:o}})}catch(e){console.error(e)}};exports.getShipments=getShipments;const setShippingMethod=async({config:e,shipmentId:t,shippingMethodId:s,getOrder:i,order:r})=>{try{if(s){const o=(0,getSdk_1.default)(e);await o.shipments.update({id:t,shipping_method:o.shipping_methods.relationship(s)});if(i&&r)i(r.id)}}catch(e){console.error(e)}};exports.setShippingMethod=setShippingMethod;const type=["setErrors","setShipments","setShippingMethod"];const shipmentReducer=(e,t)=>(0,baseReducer_1.default)(e,t,type);exports.default=shipmentReducer;
|
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import { Dispatch } from 'react';
|
|
2
|
-
import { CommerceLayerConfig } from
|
|
3
|
-
import {
|
|
4
|
-
import { getOrderContext } from
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export declare
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
declare
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
declare const
|
|
31
|
-
|
|
1
|
+
import { Dispatch } from 'react';
|
|
2
|
+
import { CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
3
|
+
import { Order } from '@commercelayer/sdk';
|
|
4
|
+
import { getOrderContext } from './OrderReducer';
|
|
5
|
+
import { AddressResource } from './AddressReducer';
|
|
6
|
+
export declare type ShippingAddressActionType = 'setShippingAddress' | 'setShippingCustomerAddressId' | 'cleanup';
|
|
7
|
+
export interface ShippingAddressActionPayload {
|
|
8
|
+
_shipping_address_clone_id: string;
|
|
9
|
+
shippingCustomerAddressId: string;
|
|
10
|
+
}
|
|
11
|
+
export declare type ShippingAddressState = Partial<ShippingAddressActionPayload>;
|
|
12
|
+
export interface ShippingAddressAction {
|
|
13
|
+
type: ShippingAddressActionType;
|
|
14
|
+
payload: Partial<ShippingAddressActionPayload>;
|
|
15
|
+
}
|
|
16
|
+
export declare const shippingAddressInitialState: ShippingAddressState;
|
|
17
|
+
export declare type SetShippingAddress = (id: string, options?: {
|
|
18
|
+
config: CommerceLayerConfig;
|
|
19
|
+
dispatch: Dispatch<ShippingAddressAction>;
|
|
20
|
+
order?: Order | null;
|
|
21
|
+
getOrder?: getOrderContext;
|
|
22
|
+
customerAddressId?: string;
|
|
23
|
+
}) => Promise<void>;
|
|
24
|
+
export declare const setShippingAddress: SetShippingAddress;
|
|
25
|
+
declare type SetShippingCustomerAddressId = (args: {
|
|
26
|
+
dispatch: Dispatch<ShippingAddressAction>;
|
|
27
|
+
order: Order;
|
|
28
|
+
setCloneAddress: (id: string, resource: AddressResource) => void;
|
|
29
|
+
}) => void;
|
|
30
|
+
export declare const setShippingCustomerAddressId: SetShippingCustomerAddressId;
|
|
31
|
+
declare const shippingAddressReducer: (state: ShippingAddressState, reducer: ShippingAddressAction) => ShippingAddressState;
|
|
32
|
+
export default shippingAddressReducer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.setShippingCustomerAddressId=exports.setShippingAddress=exports.shippingAddressInitialState=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.shippingAddressInitialState={_shipping_address_clone_id:""};const setShippingAddress=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:"setShippingAddress",payload:{_shipping_address_clone_id:e}})}}catch(e){console.error(e)}};exports.setShippingAddress=setShippingAddress;const setShippingCustomerAddressId=async({dispatch:e,order:s,setCloneAddress:d})=>{var r;const t=(r=s===null||s===void 0?void 0:s.shipping_address)===null||r===void 0?void 0:r.reference;try{if(t){e({type:"setShippingCustomerAddressId",payload:{shippingCustomerAddressId:t}});d(t,"shipping_address")}}catch(e){console.error("error",e)}};exports.setShippingCustomerAddressId=setShippingCustomerAddressId;const type=["setShippingAddress","setShippingCustomerAddressId","cleanup"];const shippingAddressReducer=(e,s)=>(0,baseReducer_1.default)(e,s,type);exports.default=shippingAddressReducer;
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { Dispatch } from 'react';
|
|
2
|
-
import { CommerceLayerConfig } from
|
|
3
|
-
declare type SkuListsActionType = 'getSkuList' | 'setSkuList';
|
|
4
|
-
export
|
|
5
|
-
listIds: string[];
|
|
6
|
-
skuLists:
|
|
7
|
-
}
|
|
8
|
-
export declare const skuListsInitialState: SkuListsState;
|
|
9
|
-
export interface SkuListsAction {
|
|
10
|
-
payload: Partial<SkuListsState>;
|
|
11
|
-
type: SkuListsActionType;
|
|
12
|
-
}
|
|
13
|
-
export declare type GetSkuList = (params: {
|
|
14
|
-
config: CommerceLayerConfig;
|
|
15
|
-
dispatch: Dispatch<SkuListsAction>;
|
|
16
|
-
listIds: string[];
|
|
17
|
-
state: SkuListsState;
|
|
18
|
-
}) => Promise<void>;
|
|
19
|
-
export declare
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export default skuListsReducer;
|
|
1
|
+
import { Dispatch } from 'react';
|
|
2
|
+
import { CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
3
|
+
declare type SkuListsActionType = 'getSkuList' | 'setSkuList';
|
|
4
|
+
export declare type SkuListsState = Partial<{
|
|
5
|
+
listIds: string[];
|
|
6
|
+
skuLists: Record<string, any>;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const skuListsInitialState: SkuListsState;
|
|
9
|
+
export interface SkuListsAction {
|
|
10
|
+
payload: Partial<SkuListsState>;
|
|
11
|
+
type: SkuListsActionType;
|
|
12
|
+
}
|
|
13
|
+
export declare type GetSkuList = (params: {
|
|
14
|
+
config: CommerceLayerConfig;
|
|
15
|
+
dispatch: Dispatch<SkuListsAction>;
|
|
16
|
+
listIds: string[];
|
|
17
|
+
state: SkuListsState;
|
|
18
|
+
}) => Promise<void>;
|
|
19
|
+
export declare const getSkuList: GetSkuList;
|
|
20
|
+
declare const skuListsReducer: (state: SkuListsState, reducer: SkuListsAction) => SkuListsState;
|
|
21
|
+
export default skuListsReducer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getSkuList=exports.skuListsInitialState=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 actionType=["getSkuList","setSkuList"];exports.skuListsInitialState={listIds:[]};const getSkuList=async({listIds:t,config:s,dispatch:e})=>{const i={};try{const u=(0,getSdk_1.default)(s);t.forEach((async t=>{const s=await u.sku_lists.retrieve(t,{include:["skus"],fields:{skus:["code"]}});const e=s.skus;i[t]=e}));e({payload:{skuLists:i},type:"getSkuList"})}catch(t){console.error(t)}};exports.getSkuList=getSkuList;const skuListsReducer=(t,s)=>(0,baseReducer_1.default)(t,s,actionType);exports.default=skuListsReducer;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { Dispatch } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { BaseUnsetState } from
|
|
4
|
-
import { BaseError } from
|
|
5
|
-
export interface SkuOptionsState {
|
|
6
|
-
skuCode?: string;
|
|
7
|
-
skuOptions?:
|
|
8
|
-
errors?: BaseError[];
|
|
9
|
-
}
|
|
10
|
-
interface GetSkuOptionsParams {
|
|
11
|
-
dispatch: Dispatch<SkuOptionsAction>;
|
|
12
|
-
skuOptions?:
|
|
13
|
-
}
|
|
14
|
-
export interface GetSkuOptions {
|
|
15
|
-
(params: GetSkuOptionsParams): void;
|
|
16
|
-
}
|
|
17
|
-
export declare const getSkuOptions: GetSkuOptions;
|
|
18
|
-
export declare const unsetSkuOptionsState: BaseUnsetState<SkuOptionsAction>;
|
|
19
|
-
export declare type SkuOptionsActionType = 'setSkuOptions' | 'setErrors';
|
|
20
|
-
export interface SkuOptionsAction {
|
|
21
|
-
type: SkuOptionsActionType;
|
|
22
|
-
payload: SkuOptionsState;
|
|
23
|
-
}
|
|
24
|
-
export declare const skuOptionsInitialState: SkuOptionsState;
|
|
25
|
-
declare const skuOptionsReducer: (state: SkuOptionsState, reducer: SkuOptionsAction) => SkuOptionsState;
|
|
26
|
-
export default skuOptionsReducer;
|
|
1
|
+
import { Dispatch } from 'react';
|
|
2
|
+
import { SkuOption } from '@commercelayer/sdk';
|
|
3
|
+
import { BaseUnsetState } from '../typings/index';
|
|
4
|
+
import { BaseError } from '../typings/errors';
|
|
5
|
+
export interface SkuOptionsState {
|
|
6
|
+
skuCode?: string;
|
|
7
|
+
skuOptions?: SkuOption[];
|
|
8
|
+
errors?: BaseError[];
|
|
9
|
+
}
|
|
10
|
+
interface GetSkuOptionsParams {
|
|
11
|
+
dispatch: Dispatch<SkuOptionsAction>;
|
|
12
|
+
skuOptions?: SkuOption[];
|
|
13
|
+
}
|
|
14
|
+
export interface GetSkuOptions {
|
|
15
|
+
(params: GetSkuOptionsParams): void;
|
|
16
|
+
}
|
|
17
|
+
export declare const getSkuOptions: GetSkuOptions;
|
|
18
|
+
export declare const unsetSkuOptionsState: BaseUnsetState<SkuOptionsAction>;
|
|
19
|
+
export declare type SkuOptionsActionType = 'setSkuOptions' | 'setErrors';
|
|
20
|
+
export interface SkuOptionsAction {
|
|
21
|
+
type: SkuOptionsActionType;
|
|
22
|
+
payload: SkuOptionsState;
|
|
23
|
+
}
|
|
24
|
+
export declare const skuOptionsInitialState: SkuOptionsState;
|
|
25
|
+
declare const skuOptionsReducer: (state: SkuOptionsState, reducer: SkuOptionsAction) => SkuOptionsState;
|
|
26
|
+
export default skuOptionsReducer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.skuOptionsInitialState=exports.unsetSkuOptionsState=exports.getSkuOptions=void 0;const tslib_1=require("tslib");const baseReducer_1=(0,tslib_1.__importDefault)(require("../utils/baseReducer"));const getSkuOptions=async t=>{const{skuOptions:s,dispatch:e}=t;e({type:"setSkuOptions",payload:{skuOptions:s}})};exports.getSkuOptions=getSkuOptions;const unsetSkuOptionsState=t=>{t({type:"setSkuOptions",payload:{skuOptions:[]}});t({type:"setErrors",payload:{errors:[]}})};exports.unsetSkuOptionsState=unsetSkuOptionsState;const actionType=["setSkuOptions","setErrors"];exports.skuOptionsInitialState={skuCode:"",skuOptions:[]};const skuOptionsReducer=(t,s)=>(0,baseReducer_1.default)(t,s,actionType);exports.default=skuOptionsReducer;
|
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Dispatch } from 'react';
|
|
4
|
-
import { CommerceLayerConfig } from
|
|
5
|
-
import { Items, CustomLineItem, SetCustomLineItems } from './ItemReducer';
|
|
6
|
-
import { BaseError } from
|
|
7
|
-
declare type SetSkuCodeVariantParams = {
|
|
8
|
-
code: string;
|
|
9
|
-
id: string;
|
|
10
|
-
config: CommerceLayerConfig;
|
|
11
|
-
dispatch: Dispatch<VariantAction>;
|
|
12
|
-
setItem: ((item: Items) => void) | undefined;
|
|
13
|
-
};
|
|
14
|
-
export interface SetSkuCodeVariant {
|
|
15
|
-
(params: SetSkuCodeVariantParams): void;
|
|
16
|
-
}
|
|
17
|
-
declare type SetVariantSkuCodesParams = {
|
|
18
|
-
skuCodes:
|
|
19
|
-
dispatch: Dispatch<VariantAction>;
|
|
20
|
-
setCustomLineItems?: SetCustomLineItems;
|
|
21
|
-
};
|
|
22
|
-
export interface SetVariantSkuCodes {
|
|
23
|
-
(params: SetVariantSkuCodesParams): void;
|
|
24
|
-
}
|
|
25
|
-
export interface VariantsObject {
|
|
26
|
-
[key: string]:
|
|
27
|
-
}
|
|
28
|
-
export declare type SetSkuCode = (code: string, id: string, lineItem?: CustomLineItem) => void;
|
|
29
|
-
export interface VariantPayload {
|
|
30
|
-
loading?: boolean;
|
|
31
|
-
variants?: VariantsObject | Record<string, any>;
|
|
32
|
-
skuCodes?: string[];
|
|
33
|
-
skuCode?: string;
|
|
34
|
-
errors?: BaseError[];
|
|
35
|
-
currentSkuId?: string;
|
|
36
|
-
currentSkuInventory?: any;
|
|
37
|
-
currentQuantity?: number;
|
|
38
|
-
currentPrices?:
|
|
39
|
-
setSkuCode?: SetSkuCode;
|
|
40
|
-
setSkuCodes?: (skuCodes:
|
|
41
|
-
}
|
|
42
|
-
export interface VariantState extends VariantPayload {
|
|
43
|
-
skuCodes: string[];
|
|
44
|
-
variants: VariantsObject | Record<string, any>;
|
|
45
|
-
}
|
|
46
|
-
export interface VariantAction {
|
|
47
|
-
type: VariantActionType;
|
|
48
|
-
payload: VariantPayload;
|
|
49
|
-
}
|
|
50
|
-
export declare const setVariantSkuCodes: SetVariantSkuCodes;
|
|
51
|
-
export interface UnsetVariantState {
|
|
52
|
-
(dispatch: Dispatch<VariantAction>): void;
|
|
53
|
-
}
|
|
54
|
-
export declare const setSkuCode: SetSkuCodeVariant;
|
|
55
|
-
declare type GetVariantsParams = {
|
|
56
|
-
config: CommerceLayerConfig;
|
|
57
|
-
state: VariantState;
|
|
58
|
-
skuCode: string;
|
|
59
|
-
dispatch: Dispatch<VariantAction>;
|
|
60
|
-
filters: Record<string, any>;
|
|
61
|
-
setItem: ((item: Items) => void) | undefined;
|
|
62
|
-
};
|
|
63
|
-
export interface GetVariants {
|
|
64
|
-
(params: GetVariantsParams): void;
|
|
65
|
-
}
|
|
66
|
-
export declare const getVariants: GetVariants;
|
|
67
|
-
export declare const unsetVariantState: UnsetVariantState;
|
|
68
|
-
export declare const variantInitialState: VariantState;
|
|
69
|
-
export declare type VariantActionType = 'setLoading' | 'setVariants' | 'setSkuCodes' | 'setSkuCode' | 'setCurrentSkuId' | 'setCurrentSkuInventory' | 'setCurrentPrices' | 'setErrors';
|
|
70
|
-
declare const variantReducer: (state: VariantState, reducer: VariantAction) => VariantState;
|
|
71
|
-
export default variantReducer;
|
|
1
|
+
import { Sku } from '@commercelayer/sdk';
|
|
2
|
+
import { VariantOption } from '../components/VariantSelector';
|
|
3
|
+
import { Dispatch } from 'react';
|
|
4
|
+
import { CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
5
|
+
import { Items, CustomLineItem, SetCustomLineItems } from './ItemReducer';
|
|
6
|
+
import { BaseError } from '../typings/errors';
|
|
7
|
+
declare type SetSkuCodeVariantParams = {
|
|
8
|
+
code: string;
|
|
9
|
+
id: string;
|
|
10
|
+
config: CommerceLayerConfig;
|
|
11
|
+
dispatch: Dispatch<VariantAction>;
|
|
12
|
+
setItem: ((item: Items) => void) | undefined;
|
|
13
|
+
};
|
|
14
|
+
export interface SetSkuCodeVariant {
|
|
15
|
+
(params: SetSkuCodeVariantParams): void;
|
|
16
|
+
}
|
|
17
|
+
declare type SetVariantSkuCodesParams = {
|
|
18
|
+
skuCodes: VariantOption[];
|
|
19
|
+
dispatch: Dispatch<VariantAction>;
|
|
20
|
+
setCustomLineItems?: SetCustomLineItems;
|
|
21
|
+
};
|
|
22
|
+
export interface SetVariantSkuCodes {
|
|
23
|
+
(params: SetVariantSkuCodesParams): void;
|
|
24
|
+
}
|
|
25
|
+
export interface VariantsObject {
|
|
26
|
+
[key: string]: Sku;
|
|
27
|
+
}
|
|
28
|
+
export declare type SetSkuCode = (code: string, id: string, lineItem?: CustomLineItem) => void;
|
|
29
|
+
export interface VariantPayload {
|
|
30
|
+
loading?: boolean;
|
|
31
|
+
variants?: VariantsObject | Record<string, any>;
|
|
32
|
+
skuCodes?: string[];
|
|
33
|
+
skuCode?: string;
|
|
34
|
+
errors?: BaseError[];
|
|
35
|
+
currentSkuId?: string;
|
|
36
|
+
currentSkuInventory?: any;
|
|
37
|
+
currentQuantity?: number;
|
|
38
|
+
currentPrices?: Sku[];
|
|
39
|
+
setSkuCode?: SetSkuCode;
|
|
40
|
+
setSkuCodes?: (skuCodes: VariantOption[]) => void;
|
|
41
|
+
}
|
|
42
|
+
export interface VariantState extends VariantPayload {
|
|
43
|
+
skuCodes: string[];
|
|
44
|
+
variants: VariantsObject | Record<string, any>;
|
|
45
|
+
}
|
|
46
|
+
export interface VariantAction {
|
|
47
|
+
type: VariantActionType;
|
|
48
|
+
payload: VariantPayload;
|
|
49
|
+
}
|
|
50
|
+
export declare const setVariantSkuCodes: SetVariantSkuCodes;
|
|
51
|
+
export interface UnsetVariantState {
|
|
52
|
+
(dispatch: Dispatch<VariantAction>): void;
|
|
53
|
+
}
|
|
54
|
+
export declare const setSkuCode: SetSkuCodeVariant;
|
|
55
|
+
declare type GetVariantsParams = {
|
|
56
|
+
config: CommerceLayerConfig;
|
|
57
|
+
state: VariantState;
|
|
58
|
+
skuCode: string;
|
|
59
|
+
dispatch: Dispatch<VariantAction>;
|
|
60
|
+
filters: Record<string, any>;
|
|
61
|
+
setItem: ((item: Items) => void) | undefined;
|
|
62
|
+
};
|
|
63
|
+
export interface GetVariants {
|
|
64
|
+
(params: GetVariantsParams): void;
|
|
65
|
+
}
|
|
66
|
+
export declare const getVariants: GetVariants;
|
|
67
|
+
export declare const unsetVariantState: UnsetVariantState;
|
|
68
|
+
export declare const variantInitialState: VariantState;
|
|
69
|
+
export declare type VariantActionType = 'setLoading' | 'setVariants' | 'setSkuCodes' | 'setSkuCode' | 'setCurrentSkuId' | 'setCurrentSkuInventory' | 'setCurrentPrices' | 'setErrors';
|
|
70
|
+
declare const variantReducer: (state: VariantState, reducer: VariantAction) => VariantState;
|
|
71
|
+
export default variantReducer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.variantInitialState=exports.unsetVariantState=exports.getVariants=exports.setSkuCode=exports.setVariantSkuCodes=void 0;const tslib_1=require("tslib");const baseReducer_1=(0,tslib_1.__importDefault)(require("../utils/baseReducer"));const getSkus_1=(0,tslib_1.__importDefault)(require("../utils/getSkus"));const lodash_1=require("lodash");const getSdk_1=(0,tslib_1.__importDefault)(require("../utils/getSdk"));const setVariantSkuCodes=({skuCodes:e,dispatch:t,setCustomLineItems:s})=>{const a={};const r=e.map((e=>{if((0,lodash_1.has)(e,"lineItem")){a[e.code]=e.lineItem}return e.code}));if(!(0,lodash_1.isEmpty)(a)){s&&s(a)}t({type:"setSkuCodes",payload:{skuCodes:r}})};exports.setVariantSkuCodes=setVariantSkuCodes;const setSkuCode=e=>{const{id:t,code:s,config:a,setItem:r,dispatch:o}=e;if(t){const e=(0,getSdk_1.default)(a);e.skus.retrieve(t,{include:["sku_options"]}).then((e=>{r&&r({[`${s}`]:e})})).catch((e=>{debugger;o({type:"setErrors",payload:{errors:e}})}))}};exports.setSkuCode=setSkuCode;const getVariants=e=>{const{config:t,state:s,skuCode:a,dispatch:r,setItem:o,filters:i}=e;const n=(0,getSdk_1.default)(t);n.skus.list({filters:Object.assign({code_in:s.skuCodes.join(",")},i)}).then((e=>{const i=(0,getSkus_1.default)(e,s.skuCodes);if(a){(0,exports.setSkuCode)({code:i[a].code,id:i[a].id,config:t,dispatch:r,setItem:o})}r({type:"setVariants",payload:{variants:i}});r({type:"setLoading",payload:{loading:false}})})).catch((e=>{r({type:"setErrors",payload:{errors:e}})}))};exports.getVariants=getVariants;const unsetVariantState=e=>{e({type:"setSkuCode",payload:{skuCode:""}});e({type:"setVariants",payload:{variants:{}}});e({type:"setLoading",payload:{loading:false}})};exports.unsetVariantState=unsetVariantState;exports.variantInitialState={loading:false,variants:{},skuCodes:[],skuCode:"",errors:[],currentSkuId:"",currentSkuInventory:{available:false,quantity:0,levels:[]},currentQuantity:1,currentPrices:[]};const actionType=["setLoading","setVariants","setSkuCodes","setSkuCode","setCurrentSkuId","setCurrentSkuInventory","setCurrentPrices","setErrors"];const variantReducer=(e,t)=>(0,baseReducer_1.default)(e,t,actionType);exports.default=variantReducer;
|
|
@@ -1,40 +1,42 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
import { FunctionChildren } from './index';
|
|
3
|
-
export declare type CodeErrorType = 'EMPTY_ERROR' | 'FILTER_NOT_ALLOWED' | 'FORBIDDEN' | 'INTERNAL_SERVER_ERROR' | 'INVALID_DATA_FORMAT' | 'INVALID_FIELD' | 'INVALID_FIELD_FORMAT' | 'INVALID_FIELD_VALUE' | 'INVALID_FILTERS_SYNTAX' | 'INVALID_FILTER_VALUE' | 'INVALID_INCLUDE' | 'INVALID_LINKS_OBJECT' | 'INVALID_PAGE_OBJECT' | 'INVALID_PAGE_VALUE' | 'INVALID_RESOURCE' | 'INVALID_RESOURCE_ID' | 'INVALID_SORT_CRITERIA' | 'INVALID_TOKEN' | 'KEY_NOT_INCLUDED_IN_URL' | 'KEY_ORDER_MISMATCH' | 'LOCKED' | 'NOT_ACCEPTABLE' | 'PARAM_MISSING' | 'PARAM_NOT_ALLOWED' | 'PAYMENT_NOT_APPROVED_FOR_EXECUTION' | 'PAYMENT_INTENT_AUTHENTICATION_FAILURE' | 'RECORD_NOT_FOUND' | 'RECORD_NOT_FOUND' | 'RELATION_EXISTS' | 'SAVE_FAILED' | 'TYPE_MISMATCH' | 'UNAUTHORIZED' | 'UNSUPPORTED_MEDIA_TYPE' | 'VALIDATION_ERROR';
|
|
4
|
-
export declare type ResourceErrorType = '
|
|
5
|
-
export interface BaseError {
|
|
6
|
-
code: CodeErrorType;
|
|
7
|
-
message: string;
|
|
8
|
-
resource?: ResourceErrorType | null;
|
|
9
|
-
field?: string;
|
|
10
|
-
id?: string;
|
|
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
|
-
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import { FunctionChildren } from './index';
|
|
3
|
+
export declare type CodeErrorType = 'EMPTY_ERROR' | 'FILTER_NOT_ALLOWED' | 'FORBIDDEN' | 'INTERNAL_SERVER_ERROR' | 'INVALID_DATA_FORMAT' | 'INVALID_FIELD' | 'INVALID_FIELD_FORMAT' | 'INVALID_FIELD_VALUE' | 'INVALID_FILTERS_SYNTAX' | 'INVALID_FILTER_VALUE' | 'INVALID_INCLUDE' | 'INVALID_LINKS_OBJECT' | 'INVALID_PAGE_OBJECT' | 'INVALID_PAGE_VALUE' | 'INVALID_RESOURCE' | 'INVALID_RESOURCE_ID' | 'INVALID_SORT_CRITERIA' | 'INVALID_TOKEN' | 'KEY_NOT_INCLUDED_IN_URL' | 'KEY_ORDER_MISMATCH' | 'LOCKED' | 'NOT_ACCEPTABLE' | 'PARAM_MISSING' | 'PARAM_NOT_ALLOWED' | 'PAYMENT_NOT_APPROVED_FOR_EXECUTION' | 'PAYMENT_INTENT_AUTHENTICATION_FAILURE' | 'RECORD_NOT_FOUND' | 'RECORD_NOT_FOUND' | 'RELATION_EXISTS' | 'SAVE_FAILED' | 'TYPE_MISMATCH' | 'UNAUTHORIZED' | 'UNSUPPORTED_MEDIA_TYPE' | 'VALIDATION_ERROR';
|
|
4
|
+
export declare type ResourceErrorType = 'addresses' | 'billing_address' | 'gift_cards' | 'gift_card_or_coupon_code' | 'line_items' | 'orders' | 'payment_methods' | 'prices' | 'shipping_address' | 'sku_options' | 'variant';
|
|
5
|
+
export interface BaseError {
|
|
6
|
+
code: CodeErrorType;
|
|
7
|
+
message: string;
|
|
8
|
+
resource?: ResourceErrorType | null;
|
|
9
|
+
field?: string;
|
|
10
|
+
id?: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
detail?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const REType: ResourceErrorType[];
|
|
15
|
+
export declare const BaseErrorObject: PropTypes.Requireable<PropTypes.InferProps<{
|
|
16
|
+
code: PropTypes.Validator<CodeErrorType>;
|
|
17
|
+
message: PropTypes.Validator<string>;
|
|
18
|
+
resource: PropTypes.Requireable<ResourceErrorType>;
|
|
19
|
+
field: PropTypes.Requireable<string>;
|
|
20
|
+
id: PropTypes.Requireable<string>;
|
|
21
|
+
}>>;
|
|
22
|
+
export declare const ErrorPropTypes: {
|
|
23
|
+
resource: PropTypes.Validator<ResourceErrorType>;
|
|
24
|
+
children: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
|
+
field: PropTypes.Requireable<string>;
|
|
26
|
+
};
|
|
27
|
+
declare type ErrorChildrenComponentProps = FunctionChildren<Omit<ErrorComponentProps, 'children'> & {
|
|
28
|
+
errors: string[];
|
|
29
|
+
}>;
|
|
30
|
+
export interface ErrorComponentProps {
|
|
31
|
+
resource: ResourceErrorType;
|
|
32
|
+
children?: ErrorChildrenComponentProps;
|
|
33
|
+
field?: string;
|
|
34
|
+
messages?: {
|
|
35
|
+
code: CodeErrorType;
|
|
36
|
+
message: string;
|
|
37
|
+
resource?: ResourceErrorType;
|
|
38
|
+
field?: string;
|
|
39
|
+
id?: string;
|
|
40
|
+
}[];
|
|
41
|
+
}
|
|
42
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.ErrorPropTypes=exports.BaseErrorObject=exports.REType=void 0;const tslib_1=require("tslib");const prop_types_1=(0,tslib_1.__importDefault)(require("prop-types"));const CEType=["EMPTY_ERROR","FILTER_NOT_ALLOWED","FORBIDDEN","INTERNAL_SERVER_ERROR","INVALID_DATA_FORMAT","INVALID_FIELD","INVALID_FIELD_FORMAT","INVALID_FIELD_VALUE","INVALID_FILTERS_SYNTAX","INVALID_FILTER_VALUE","INVALID_INCLUDE","INVALID_LINKS_OBJECT","INVALID_PAGE_OBJECT","INVALID_PAGE_VALUE","INVALID_RESOURCE","INVALID_RESOURCE_ID","INVALID_SORT_CRITERIA","INVALID_TOKEN","KEY_NOT_INCLUDED_IN_URL","KEY_ORDER_MISMATCH","LOCKED","NOT_ACCEPTABLE","PARAM_MISSING","PARAM_NOT_ALLOWED","RECORD_NOT_FOUND","RECORD_NOT_FOUND","RELATION_EXISTS","SAVE_FAILED","TYPE_MISMATCH","UNAUTHORIZED","UNSUPPORTED_MEDIA_TYPE","VALIDATION_ERROR"];exports.REType=["gift_cards","line_items","orders","prices","sku_options","variant"];exports.BaseErrorObject=prop_types_1.default.shape({code:prop_types_1.default.oneOf(CEType).isRequired,message:prop_types_1.default.string.isRequired,resource:prop_types_1.default.oneOf(exports.REType),field:prop_types_1.default.string,id:prop_types_1.default.string});exports.ErrorPropTypes={resource:prop_types_1.default.oneOf(["billing_address","gift_cards","line_items","orders","payment_methods","prices","shipping_address","sku_options","variant"]).isRequired,children:prop_types_1.default.func,field:prop_types_1.default.string};
|