@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
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { Dispatch, ReactNode, RefObject } from 'react';
|
|
2
|
+
import PropTypes, { InferProps } from 'prop-types';
|
|
3
|
+
import { BaseError } from './errors';
|
|
4
|
+
export declare const BC: {
|
|
5
|
+
id: PropTypes.Requireable<string>;
|
|
6
|
+
className: PropTypes.Requireable<string>;
|
|
7
|
+
style: PropTypes.Requireable<object>;
|
|
8
|
+
name: PropTypes.Requireable<string>;
|
|
9
|
+
};
|
|
10
|
+
export declare const PTLoader: PropTypes.Requireable<string | PropTypes.ReactElementLike>;
|
|
11
|
+
export declare const BaseSelectComponentPropTypes: {
|
|
12
|
+
children: PropTypes.Requireable<(...args: any[]) => any>;
|
|
13
|
+
options: PropTypes.Validator<PropTypes.InferProps<{
|
|
14
|
+
label: PropTypes.Validator<string>;
|
|
15
|
+
value: PropTypes.Validator<string | number>;
|
|
16
|
+
selected: PropTypes.Requireable<boolean>;
|
|
17
|
+
}>[]>;
|
|
18
|
+
placeholder: PropTypes.Requireable<PropTypes.InferProps<{
|
|
19
|
+
label: PropTypes.Validator<string>;
|
|
20
|
+
value: PropTypes.Validator<string | number>;
|
|
21
|
+
}>>;
|
|
22
|
+
value: PropTypes.Requireable<string>;
|
|
23
|
+
name: PropTypes.Validator<string>;
|
|
24
|
+
};
|
|
25
|
+
export declare type SelectPlaceholder = Option;
|
|
26
|
+
declare type BaseSelectChildrenComponentProps = Omit<BaseSelectComponentProps, 'children'>;
|
|
27
|
+
declare type Option = {
|
|
28
|
+
label: string;
|
|
29
|
+
value: string | number;
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
};
|
|
32
|
+
export interface BaseSelectComponentProps {
|
|
33
|
+
children?: (props: BaseSelectChildrenComponentProps) => ReactNode;
|
|
34
|
+
options: Option[];
|
|
35
|
+
placeholder?: Option;
|
|
36
|
+
value?: string;
|
|
37
|
+
className?: string;
|
|
38
|
+
required?: boolean;
|
|
39
|
+
name: string;
|
|
40
|
+
}
|
|
41
|
+
export declare const BaseInputComponentPropTypes: {
|
|
42
|
+
children: PropTypes.Requireable<(...args: any[]) => any>;
|
|
43
|
+
name: PropTypes.Validator<string>;
|
|
44
|
+
type: PropTypes.Validator<BaseInputType>;
|
|
45
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
46
|
+
placeholder: PropTypes.Requireable<string>;
|
|
47
|
+
};
|
|
48
|
+
declare type BaseInputChildrenComponentProps = Omit<BaseInputComponentProps, 'children'> & {
|
|
49
|
+
handleChange: (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
50
|
+
};
|
|
51
|
+
export interface BaseInputComponentProps {
|
|
52
|
+
ref?: () => RefObject<any>;
|
|
53
|
+
children?: (props: BaseInputChildrenComponentProps) => ReactNode;
|
|
54
|
+
name: string;
|
|
55
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
56
|
+
placeholder?: string;
|
|
57
|
+
}
|
|
58
|
+
export declare type LineItemType = 'gift_cards' | 'payment_methods' | 'promotions' | 'shipments' | 'skus' | 'bundles' | 'adjustments';
|
|
59
|
+
export declare type GiftCardInputName = 'balanceCents' | 'balanceMaxCents' | 'singleUse' | 'rechargeable' | 'imageUrl' | 'expiresAt' | 'referenceOrigin' | 'email' | 'firstName' | 'lastName' | 'reference';
|
|
60
|
+
export declare type AddressInputName = 'billing_address_city' | 'billing_address_company' | 'billing_address_first_name' | 'billing_address_email' | 'billing_address_last_name' | 'billing_address_line_1' | 'billing_address_line_2' | 'billing_address_phone' | 'billing_address_state_code' | 'billing_address_zip_code' | 'billing_address_billing_info' | 'billing_address_save_to_customer_book' | 'shipping_address_city' | 'shipping_address_company' | 'shipping_address_email' | 'shipping_address_first_name' | 'shipping_address_last_name' | 'shipping_address_line_1' | 'shipping_address_line_2' | 'shipping_address_phone' | 'shipping_address_state_code' | 'shipping_address_zip_code' | 'shipping_address_save_to_customer_book';
|
|
61
|
+
export declare type AddressCountrySelectName = 'billing_address_country_code' | 'shipping_address_country_code';
|
|
62
|
+
export declare type AddressStateSelectName = 'billing_address_state_code' | 'shipping_address_state_code';
|
|
63
|
+
export declare type BaseInputType = 'checkbox' | 'date' | 'email' | 'number' | 'tel' | 'text' | 'textarea';
|
|
64
|
+
export declare type LoaderType = string | ReactNode;
|
|
65
|
+
export declare const BMObject: PropTypes.Requireable<{
|
|
66
|
+
[x: string]: string | null | undefined;
|
|
67
|
+
}>;
|
|
68
|
+
export declare type BaseMetadataObject = {
|
|
69
|
+
[key: string]: string | undefined | null;
|
|
70
|
+
};
|
|
71
|
+
export declare type TimeFormat = 'days' | 'hours';
|
|
72
|
+
export declare type BaseComponent = InferProps<typeof BC>;
|
|
73
|
+
export interface BaseAction<A = string> {
|
|
74
|
+
type: A;
|
|
75
|
+
payload: Record<string, any>;
|
|
76
|
+
}
|
|
77
|
+
export interface BaseState {
|
|
78
|
+
[key: string]: any;
|
|
79
|
+
errors?: BaseError[];
|
|
80
|
+
}
|
|
81
|
+
export declare type BaseActionType<T = string> = T[];
|
|
82
|
+
export interface BFSetStateContainer<T> {
|
|
83
|
+
<P extends T>(param: P): void;
|
|
84
|
+
}
|
|
85
|
+
export interface BaseReducer {
|
|
86
|
+
<S extends BaseState, A extends BaseAction, T extends BaseActionType>(state: S, action: A, type: T): S;
|
|
87
|
+
}
|
|
88
|
+
export interface BaseUnsetState<A> {
|
|
89
|
+
(dispatch: Dispatch<A>): void;
|
|
90
|
+
}
|
|
91
|
+
export interface BaseMetadata {
|
|
92
|
+
[key: string]: string | undefined | null;
|
|
93
|
+
}
|
|
94
|
+
export declare type BaseFormatPrice = 'formatted' | 'cents' | 'float';
|
|
95
|
+
export declare const baseOrderPricePropTypes: {
|
|
96
|
+
id: PropTypes.Requireable<string>;
|
|
97
|
+
className: PropTypes.Requireable<string>;
|
|
98
|
+
style: PropTypes.Requireable<object>;
|
|
99
|
+
name: PropTypes.Requireable<string>;
|
|
100
|
+
base: PropTypes.Validator<string>;
|
|
101
|
+
type: PropTypes.Validator<string>;
|
|
102
|
+
children: PropTypes.Requireable<(...args: any[]) => any>;
|
|
103
|
+
format: PropTypes.Requireable<BaseFormatPrice>;
|
|
104
|
+
};
|
|
105
|
+
export declare const baseOrderComponentPricePropTypes: {
|
|
106
|
+
id: PropTypes.Requireable<string>;
|
|
107
|
+
className: PropTypes.Requireable<string>;
|
|
108
|
+
style: PropTypes.Requireable<object>;
|
|
109
|
+
name: PropTypes.Requireable<string>;
|
|
110
|
+
children: PropTypes.Requireable<(...args: any[]) => any>;
|
|
111
|
+
format: PropTypes.Requireable<BaseFormatPrice>;
|
|
112
|
+
};
|
|
113
|
+
export declare type BasePriceType = 'total' | 'option' | 'unit';
|
|
114
|
+
export declare type BaseSelectorType = 'select' | 'radio';
|
|
115
|
+
export declare type BaseAmountComponentChildren = Omit<BaseAmountComponent, 'children'>;
|
|
116
|
+
export declare type BaseAmountComponent = {
|
|
117
|
+
children?: (props: BaseAmountComponentChildren) => ReactNode;
|
|
118
|
+
format?: BaseFormatPrice;
|
|
119
|
+
price?: string;
|
|
120
|
+
priceCents?: number;
|
|
121
|
+
labelFree?: string;
|
|
122
|
+
} & JSX.IntrinsicElements['span'];
|
|
123
|
+
export interface FunctionChildren<P = Record<string, any>> {
|
|
124
|
+
(props: P): ReactNode;
|
|
125
|
+
}
|
|
126
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import PropTypes from"prop-types";export const BC={id:PropTypes.string,className:PropTypes.string,style:PropTypes.object,name:PropTypes.string};export const PTLoader=PropTypes.oneOfType([PropTypes.element,PropTypes.string]);export const BaseSelectComponentPropTypes={children:PropTypes.func,options:PropTypes.arrayOf(PropTypes.shape({label:PropTypes.string.isRequired,value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]).isRequired,selected:PropTypes.bool}).isRequired).isRequired,placeholder:PropTypes.shape({label:PropTypes.string.isRequired,value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]).isRequired}),value:PropTypes.string,name:PropTypes.string.isRequired};export const BaseInputComponentPropTypes={children:PropTypes.func,name:PropTypes.string.isRequired,type:PropTypes.oneOf(["text","email","number","date","checkbox","textarea"]).isRequired,onChange:PropTypes.func,placeholder:PropTypes.string};export const BMObject=PropTypes.objectOf(PropTypes.string);export const baseOrderPricePropTypes=Object.assign({base:PropTypes.string.isRequired,type:PropTypes.string.isRequired,children:PropTypes.func,format:PropTypes.oneOf(["formatted","cents","float"])},BC);export const baseOrderComponentPricePropTypes=Object.assign({children:baseOrderPricePropTypes["children"],format:baseOrderPricePropTypes["format"]},BC);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
declare type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
3
|
+
declare type Defined<T> = T extends undefined ? never : T;
|
|
4
|
+
/**
|
|
5
|
+
* Get the type that represents the props with the defaultProps included.
|
|
6
|
+
*
|
|
7
|
+
* Alternatively, we could have done something like this:
|
|
8
|
+
* ```
|
|
9
|
+
* export type WithDefaultProps<P, DP extends Partial<P>> = Omit<P, keyof DP> &
|
|
10
|
+
* Required<Pick<P, Extract<keyof DP, keyof P>>>;
|
|
11
|
+
* ```
|
|
12
|
+
* But there were usages of `null` in `defaultProps` that would need to be changed to `undefined`
|
|
13
|
+
* to meet the `DP extends Partial<P>` constraint.
|
|
14
|
+
* So, instead we take the union type in cases when a property in defaultProps does not extend
|
|
15
|
+
* the corresponding property in the Props declaration.
|
|
16
|
+
*/
|
|
17
|
+
declare type WithDefaultProps<P, DP> = Omit<P, keyof DP> & {
|
|
18
|
+
[K in Extract<keyof DP, keyof P>]: DP[K] extends Defined<P[K]> ? Defined<P[K]> : Defined<P[K]> | DP[K];
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Get the props type from propTypes and defaultProps.
|
|
22
|
+
*
|
|
23
|
+
* Usage:
|
|
24
|
+
* ```
|
|
25
|
+
* // Without defaultProps
|
|
26
|
+
* type Props = PropsType<typeof propTypes>;
|
|
27
|
+
*
|
|
28
|
+
* // With defaultProps
|
|
29
|
+
* type Props = PropsType<typeof propTypes, typeof defaultProps>;
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare type PropsType<PT, DP = {}> = WithDefaultProps<PropTypes.InferProps<PT>, DP>;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BaseError } from '../typings/errors';
|
|
2
|
+
import { AddressCreate } from '@commercelayer/sdk';
|
|
3
|
+
declare type BillingAddressController = (params: {
|
|
4
|
+
billing_address?: AddressCreate;
|
|
5
|
+
billingAddressId?: string;
|
|
6
|
+
errors?: BaseError[];
|
|
7
|
+
requiresBillingInfo?: boolean;
|
|
8
|
+
}) => boolean;
|
|
9
|
+
export declare const billingAddressController: BillingAddressController;
|
|
10
|
+
declare type ShippingAddressController = (params: {
|
|
11
|
+
billingDisable: boolean;
|
|
12
|
+
errors?: BaseError[];
|
|
13
|
+
shipToDifferentAddress?: boolean;
|
|
14
|
+
shipping_address?: AddressCreate;
|
|
15
|
+
shippingAddressId?: string;
|
|
16
|
+
}) => boolean;
|
|
17
|
+
export declare const shippingAddressController: ShippingAddressController;
|
|
18
|
+
declare type CountryLockController = (params: {
|
|
19
|
+
addresses?: Record<string, any>[];
|
|
20
|
+
billing_address?: Record<string, any>;
|
|
21
|
+
billingAddressId?: string;
|
|
22
|
+
countryCodeLock?: string;
|
|
23
|
+
shipToDifferentAddress?: boolean;
|
|
24
|
+
shipping_address?: Record<string, any>;
|
|
25
|
+
shippingAddressId?: string;
|
|
26
|
+
}) => boolean;
|
|
27
|
+
export declare const countryLockController: CountryLockController;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isEmpty}from"lodash";import{fieldsExist}from"./validateFormFields";import{addressFields}from"../reducers/AddressReducer";export const billingAddressController=({billing_address:i,billingAddressId:s,errors:e,requiresBillingInfo:r})=>{let d=!isEmpty(e)||isEmpty(i);if(isEmpty(e)&&!isEmpty(i)){let s=[...addressFields];if(r)s=[...s,"billing_info"];d=!!(i&&fieldsExist(i,s))}if(d&&!isEmpty(s)&&isEmpty(i)){d=false}return d};export const shippingAddressController=({billingDisable:i,errors:s,shipToDifferentAddress:e,shipping_address:r,shippingAddressId:d})=>{let t=!!(!i&&e);if(t&&isEmpty(s)&&!isEmpty(r)){t=!!(r&&fieldsExist(r))}if(t&&!isEmpty(d)&&isEmpty(r)){t=false}return t};export const countryLockController=({addresses:i,billing_address:s,billingAddressId:e,countryCodeLock:r,shipToDifferentAddress:d,shipping_address:t,shippingAddressId:o})=>{if(r&&!isEmpty(i)&&e&&!d){const s=i===null||i===void 0?void 0:i.find((i=>(i.id===e||i.reference===e)&&i.countryCode!==r));if(!isEmpty(s))return true}if(r&&!isEmpty(s)&&!d){return(s===null||s===void 0?void 0:s["country_code"])!==r}if(r&&!isEmpty(t)&&d){return(t===null||t===void 0?void 0:t["country_code"])!==r}if(r&&!isEmpty(i)&&o&&d){const s=i===null||i===void 0?void 0:i.find((i=>(i.id===o||i.reference===o)&&i.countryCode!==r));if(!isEmpty(s))return true}return false};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const baseReducer=(e,s,t)=>{const a=t;if(a.indexOf(s.type)!==-1){const t=s.payload;e=Object.assign(Object.assign({},e),t)}return e};export default baseReducer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getBrowserInfo(){const n=window&&window.screen?window.screen.width:"";const e=window&&window.screen?window.screen.height:"";const o=window&&window.screen?window.screen.colorDepth:"";const w=window&&window.navigator?window.navigator.userAgent:"";const t=window&&window.navigator?navigator.javaEnabled():false;let i="";if(window&&window.navigator)i=window.navigator.language;const a=new Date;const r=a.getTimezoneOffset();const d={screenWidth:n,screenHeight:e,colorDepth:o,userAgent:w,timeZoneOffset:r,language:i,javaEnabled:t};return d}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Requireable } from 'prop-types';
|
|
3
|
+
export interface CheckChildrenTypes {
|
|
4
|
+
(props: {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}, propName: string, componentName: string, location: string, propFullName: string): Error | null;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: Requireable<ReactNode>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isValidElement,Children}from"react";import{isEmpty,isFunction,has,get}from"lodash";import components from"../config/components";const checkChildrenTypes=(e,i,n)=>{let t=null;const s=e[i];const r=n.replace("CL","");if((isEmpty(s)&&typeof s!=="function"||typeof s==="function"&&!s)&&e["isRequired"]){t=new Error(`The prop '${i}' is marked as required in '${r}', but its value is '${s}'.`)}Children.map(s,(e=>{if(t)return t;const n=e.type;const s=get(components,`${r}.permittedChildren`);const o=`Invalid prop '${i}' supplied to ${r}. Only components ${s.join(", ")} are allowed.`;if(isFunction(n)&&has(n,"displayName")){const e=get(n,"displayName");const i=n.name;if(e&&e===`${i}`){if(!s.includes(i)){t=new Error(o)}}}if(!isValidElement(e)){t=new Error(o)}}));return t};const childrenTypes=checkChildrenTypes;childrenTypes["isRequired"]=(e,i,n,t,s)=>checkChildrenTypes(Object.assign(Object.assign({},e),{isRequired:true}),i,n,t,s);export default childrenTypes;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function getCountries(): {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
}[];
|
|
5
|
+
export declare function getStateOfCountry(country_code: string): {
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
}[];
|
|
9
|
+
export declare function isValidState(state_code: string, country_code: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Countries,States}from"countries-states-cities-service";export function getCountries(){return Countries.getCountries({sort:{mode:"alphabetical",key:"name"}}).map((({name:e,iso2:t})=>({label:e,value:t})))}export function getStateOfCountry(e){const t={country_code:e};if(e==="IT")t.is_region=false;return States.getStates({filters:t,sort:{mode:"alphabetical",key:"name"}}).map((({name:e,state_code:t})=>({label:e.replace("Province of",""),value:t})))}export function isValidState(e,t){return States.getStates({filters:{state_code:e,country_code:t}}).length>0}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import findIndex from"lodash/findIndex";import pick from"lodash/pick";const customMessages=(e=[],o)=>{const s=findIndex(e,pick(o,["field","code","resource"]));return s!==-1?e[s]:null};export default customMessages;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getSaveBillingAddressToAddressBook,getSavePaymentSourceToCustomerWallet,getSaveShippingAddressToAddressBook}from"./localStorage";export function saveToWallet(){return getSavePaymentSourceToCustomerWallet()}export function saveBillingAddress(){return getSaveBillingAddressToAddressBook()}export function saveShippingAddress(){return getSaveShippingAddressToAddressBook()}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface GetAmountInterface<T = any> {
|
|
2
|
+
(base: string, type: string, format: string, obj: Record<string, any>): T extends number ? number : string;
|
|
3
|
+
}
|
|
4
|
+
export default function getAmount<T = string>(args: {
|
|
5
|
+
base: string;
|
|
6
|
+
type: string;
|
|
7
|
+
format: string;
|
|
8
|
+
obj: Record<string, any>;
|
|
9
|
+
}): T extends number ? number : string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{keys}from"lodash";export default function getAmount(o){const{format:t,type:e,obj:s,base:$}=o;let r;keys(s).map((o=>{const a=o.toLowerCase();const n=`${t}_${e}_${$}`.toLowerCase();const f=`${e}_${$}_${t}`.toLowerCase();const _=`${t}_${$}_${e}`.toLowerCase();const c=`${$}_${e}_${t}`.toLowerCase();if(a===n){r=s[o]}if(a===f){r=s[o]}if(a===_){r=s[o]}if(a===c){r=s[o]}}));return r}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{first,keys}from"lodash";const getCurrentItemKey=e=>first(keys(e))||"";export default getCurrentItemKey;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseError, ResourceErrorType } from '../typings/errors';
|
|
2
|
+
import { Dispatch } from 'react';
|
|
3
|
+
export default function getErrors(error: any, resource: ResourceErrorType): BaseError[];
|
|
4
|
+
declare type SetErrorsArgs<D> = {
|
|
5
|
+
currentErrors?: BaseError[];
|
|
6
|
+
newErrors?: BaseError[];
|
|
7
|
+
dispatch?: D;
|
|
8
|
+
filterBy?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function setErrors<D extends Dispatch<any>>({ currentErrors, newErrors, dispatch, filterBy, }: SetErrorsArgs<D>): BaseError[] | void;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import differenceBy from"lodash/differenceBy";export default function getErrors(r,e){return r.errors.map((r=>Object.assign(Object.assign({},r),{resource:e})))}export function setErrors({currentErrors:r=[],newErrors:e=[],dispatch:o,filterBy:t="code"}){const s=differenceBy(r,e,t);const n=(r===null||r===void 0?void 0:r.length)===0?e:s;const c=[...r||[],...n];if(!o){return c}o({type:"setErrors",payload:{errors:c}})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const getLineItemsCount=(t,e=0)=>{const n=["skus","gift_cards","bundles","adjustments"];t.filter((t=>t.item_type&&n.includes(t.item_type))).forEach((t=>{if(t.quantity)e+=t.quantity}));return e};export default getLineItemsCount;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as _jsx,Fragment as _Fragment}from"react/jsx-runtime";export default function getLoaderComponent(t){return typeof t==="function"?_jsx(t,{},void 0):_jsx(_Fragment,{children:t},void 0)}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Price } from '@commercelayer/sdk';
|
|
2
|
+
import { Prices } from '../reducers/PriceReducer';
|
|
3
|
+
import { Items } from '../reducers/ItemReducer';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
import { PTemplateProps } from '../components/utils/PriceTemplate';
|
|
6
|
+
export interface GetPriceByCode {
|
|
7
|
+
(skuPrices: Price[], code: string): Price | undefined;
|
|
8
|
+
}
|
|
9
|
+
export declare const getPriceByCode: GetPriceByCode;
|
|
10
|
+
export interface GetPricesComponent {
|
|
11
|
+
(skuPrices: Price[], props: PTemplateProps): ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare const getPricesComponent: GetPricesComponent;
|
|
14
|
+
export interface GetPrices {
|
|
15
|
+
(prices: Price[] | Items): Prices;
|
|
16
|
+
}
|
|
17
|
+
export default function getPrices<P extends Price>(prices: P[]): Record<string, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createElement as _createElement}from"react";import{jsx as _jsx}from"react/jsx-runtime";import{isEmpty,first,isArray,has}from"lodash";import PriceTemplate from"../components/utils/PriceTemplate";export const getPriceByCode=(e,t="")=>t?first(e.filter((e=>e.currency_code===t))):first(e);export const getPricesComponent=(e,t)=>{if(isEmpty(e)){return _jsx(PriceTemplate,Object.assign({},t),void 0)}return e.map(((e,r)=>{const o=typeof t.showCompare==="undefined"&&(e===null||e===void 0?void 0:e.compare_at_amount_cents)>(e===null||e===void 0?void 0:e.amount_cents)||t.showCompare;return _createElement(PriceTemplate,Object.assign({},t,{key:r,showCompare:o,formattedAmount:e.formatted_amount,formattedCompare:e.formatted_compare_at_amount}))}))};export default function getPrices(e){const t={};if(isArray(e)){e.forEach((e=>{const r=e.sku_code;if(has(t,r)){t[r].push(e)}else{t[r]=[e]}}))}return t}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import getOrganizationSlug from"./organization";import Sdk from"@commercelayer/sdk";export default function getSdk({endpoint:e,accessToken:n}){const o=getOrganizationSlug(e);return Sdk(Object.assign({accessToken:n},o))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const getSkus=(o,e)=>{const t={};e.forEach((e=>{o.forEach((o=>{if((o===null||o===void 0?void 0:o.code)===e)t[o.code]=o}))}));return t};export default getSkus;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isEmptyStates(countryCode: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const countryLock=["IT","US"];export default function isEmptyStates(t){return!countryLock.includes(t)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isJSON(str: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isJSON(r){try{JSON.parse(r);return true}catch(r){return false}}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare type JWT = {
|
|
2
|
+
application: {
|
|
3
|
+
id: string;
|
|
4
|
+
kind: 'sales_channel' | 'integration';
|
|
5
|
+
public: boolean;
|
|
6
|
+
};
|
|
7
|
+
exp: number;
|
|
8
|
+
market: {
|
|
9
|
+
id: string[];
|
|
10
|
+
price_list_id: string;
|
|
11
|
+
stock_location_ids: string[];
|
|
12
|
+
geocoder_id: null | string;
|
|
13
|
+
allows_external_prices: boolean;
|
|
14
|
+
};
|
|
15
|
+
organization: {
|
|
16
|
+
id: string;
|
|
17
|
+
slug: string;
|
|
18
|
+
};
|
|
19
|
+
owner: {
|
|
20
|
+
id: 'gOqzZhZrmQ';
|
|
21
|
+
type: 'Customer';
|
|
22
|
+
};
|
|
23
|
+
rand: number;
|
|
24
|
+
test: boolean;
|
|
25
|
+
};
|
|
26
|
+
export default function jwt(accessToken: string): JWT;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import jwtDecode from"jwt-decode";export default function jwt(e){return jwtDecode(e)}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface GetLocalOrder {
|
|
2
|
+
(key: string): string | null;
|
|
3
|
+
}
|
|
4
|
+
export declare const getLocalOrder: GetLocalOrder;
|
|
5
|
+
export interface SetLocalOrder {
|
|
6
|
+
(key: string, value: string): void;
|
|
7
|
+
}
|
|
8
|
+
export declare const setLocalOrder: SetLocalOrder;
|
|
9
|
+
export interface DeleteLocalOrder {
|
|
10
|
+
(key: string): void;
|
|
11
|
+
}
|
|
12
|
+
export declare const deleteLocalOrder: DeleteLocalOrder;
|
|
13
|
+
export declare const getSavePaymentSourceToCustomerWallet: () => boolean;
|
|
14
|
+
export declare const getSaveBillingAddressToAddressBook: () => boolean;
|
|
15
|
+
export declare const getSaveShippingAddressToAddressBook: () => boolean;
|
|
16
|
+
declare type CustomerOrderParams = '_save_payment_source_to_customer_wallet' | '_save_billing_address_to_customer_address_book' | '_save_shipping_address_to_customer_address_book';
|
|
17
|
+
export declare function setCustomerOrderParam<T extends CustomerOrderParams>(key: T, value: string): void;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const getLocalOrder=e=>localStorage.getItem(e);export const setLocalOrder=(e,t)=>localStorage.setItem(e,t);export const deleteLocalOrder=e=>{localStorage.removeItem(e)};export const getSavePaymentSourceToCustomerWallet=()=>localStorage.getItem("_save_payment_source_to_customer_wallet")==="true";export const getSaveBillingAddressToAddressBook=()=>localStorage.getItem("_save_billing_address_to_customer_address_book")==="true";export const getSaveShippingAddressToAddressBook=()=>localStorage.getItem("_save_shipping_address_to_customer_address_book")==="true";export function setCustomerOrderParam(e,t){return setLocalOrder(e,t)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getOrganizationSlug(e){const o={organization:"",domain:"commercelayer.io"};if(e.search("commercelayer.io")===-1)o.domain="commercelayer.co";o.organization=e.replace("https://","").replace(`.${o.domain}`,"");return o}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { PaypalConfig } from '../components/PaypalPayment';
|
|
2
|
+
import { PaymentResource, PaymentMethodConfig } from '../reducers/PaymentMethodReducer';
|
|
3
|
+
export default function getPaypalConfig(paymentResource: PaymentResource, config: PaymentMethodConfig): Pick<PaypalConfig, 'return_url' | 'cancel_url'> | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getPaymentConfig}from"../reducers/PaymentMethodReducer";import pick from"lodash/pick";export default function getPaypalConfig(e,t){const r=getPaymentConfig(e,t);return r&&pick(r,["return_url","cancel_url"])}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function promisify(cb: any, params?: any): Promise<any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import isFunction from"lodash/isFunction";export default function promisify(i,o){return new Promise(((n,e)=>{if(o)i(o,((i,o)=>{if(i)e(i);n(o)}));else if(isFunction(i===null||i===void 0?void 0:i.tokenize)){i===null||i===void 0?void 0:i.tokenize(((i,o)=>{if(i)e(i);n(o)}))}else i(((i,o)=>{if(i)e(i);n(o)}))}))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import compact from"lodash/compact";import isEmpty from"lodash/isEmpty";export function shipmentsFilled(t){const m=compact(t.filter((t=>!isEmpty(t.shipping_method))));return!isEmpty(m)}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseState } from '../typings/index';
|
|
2
|
+
import { ResourceErrorType, BaseError } from '../typings/errors';
|
|
3
|
+
import { AddressField } from '../reducers/AddressReducer';
|
|
4
|
+
import { AddressCreate } from '@commercelayer/sdk';
|
|
5
|
+
export interface ValidateFormFields {
|
|
6
|
+
<R extends string[]>(fields: HTMLFormControlsCollection, required: R, resourceType: ResourceErrorType): {
|
|
7
|
+
errors: BaseError[];
|
|
8
|
+
values: BaseState;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface ValidateValue {
|
|
12
|
+
<V extends string | boolean, N extends string, T extends string, B extends ResourceErrorType>(val: V, name: N, type: T, resourceType: B): BaseError | Record<string, any>;
|
|
13
|
+
}
|
|
14
|
+
export declare const validateValue: ValidateValue;
|
|
15
|
+
declare const validateFormFields: ValidateFormFields;
|
|
16
|
+
export interface FieldsExist {
|
|
17
|
+
(address: AddressCreate, schema?: AddressField[]): boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const fieldsExist: FieldsExist;
|
|
20
|
+
export default validateFormFields;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import isEmpty from"lodash/isEmpty";import isString from"lodash/isString";import without from"lodash/without";import keys from"lodash/keys";import map from"lodash/map";import get from"lodash/get";import{addressFields}from"../reducers/AddressReducer";const EMAIL_PATTERN=/[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}$/;export const validateValue=(e,t,s,a)=>{if(!e){return{field:t,code:"VALIDATION_ERROR",message:`${t} - is required`,resourceType:a}}if(s==="email"&&isString(e)&&!e.match(EMAIL_PATTERN)){return{field:t,code:"VALIDATION_ERROR",message:`${t} - is not valid`,resourceType:a}}return{}};const validateFormFields=(e,t,s)=>{const a=[];let i={metadata:{}};map(e,(e=>{const r=!!get(e,"checked");const n=r?r:e.value==="on"?false:e.value;const o=e.getAttribute("name");if(o&&t.indexOf(o)!==-1||e.required){const t=validateValue(n,e.name,e.type,s);if(!isEmpty(t)){a.push(t)}i=Object.assign(Object.assign({},i),{[`${e.name}`]:n})}if(e.getAttribute("name")){const t=!!e.getAttribute("data-metadata");i=t?Object.assign(Object.assign({},i),{metadata:Object.assign(Object.assign({},i.metadata),{[`${e.name}`]:n})}):Object.assign(Object.assign({},i),{[`${e.name}`]:n})}}));return{errors:a,values:i}};export const fieldsExist=(e,t=addressFields)=>{if(!e["business"]){const s=without(t,"line_2","company");const a=keys(e).filter((e=>s.includes(e)));return s.length>a.length}else{const s=without(t,"first_name","last_name");const a=keys(e).filter((e=>s.includes(e)));return s.length>a.length}};export default validateFormFields;
|