@commercelayer/react-components 3.14.1-beta.3 → 4.0.0-alpha.2
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/lib/{components → cjs/components}/AdjustmentAmount.d.ts +0 -0
- package/lib/cjs/components/AdjustmentAmount.js +1 -0
- package/lib/cjs/components/AdyenPayment.d.ts +25 -0
- package/lib/cjs/components/AdyenPayment.js +1 -0
- package/lib/cjs/components/AvailabilityContainer.d.ts +14 -0
- package/lib/cjs/components/AvailabilityContainer.js +1 -0
- package/lib/cjs/components/AvailabilityTemplate.d.ts +24 -0
- package/lib/cjs/components/AvailabilityTemplate.js +1 -0
- package/lib/cjs/components/BillingAddressContainer.d.ts +11 -0
- package/lib/cjs/components/BillingAddressContainer.js +1 -0
- package/lib/cjs/components/BillingAddressForm.d.ts +13 -0
- package/lib/cjs/components/BillingAddressForm.js +1 -0
- package/lib/cjs/components/BraintreePayment.d.ts +30 -0
- package/lib/cjs/components/BraintreePayment.js +1 -0
- package/lib/{components → cjs/components}/CartLink.d.ts +0 -0
- package/lib/cjs/components/CartLink.js +1 -0
- package/lib/cjs/components/CheckoutComPayment.d.ts +23 -0
- package/lib/cjs/components/CheckoutComPayment.js +1 -0
- package/lib/cjs/components/CheckoutLink.d.ts +23 -0
- package/lib/cjs/components/CheckoutLink.js +1 -0
- package/lib/cjs/components/DeliveryLeadTime.d.ts +17 -0
- package/lib/cjs/components/DeliveryLeadTime.js +1 -0
- package/lib/cjs/components/DiscountAmount.d.ts +18 -0
- package/lib/cjs/components/DiscountAmount.js +1 -0
- package/lib/cjs/components/Errors.d.ts +5 -0
- package/lib/cjs/components/Errors.js +1 -0
- package/lib/cjs/components/ExternalFunction.d.ts +14 -0
- package/lib/cjs/components/ExternalFunction.js +1 -0
- package/lib/cjs/components/GiftCard.d.ts +18 -0
- package/lib/cjs/components/GiftCard.js +1 -0
- package/lib/cjs/components/GiftCardContainer.d.ts +12 -0
- package/lib/cjs/components/GiftCardContainer.js +1 -0
- package/lib/cjs/components/GiftCardCurrencySelector.d.ts +22 -0
- package/lib/cjs/components/GiftCardCurrencySelector.js +1 -0
- package/lib/cjs/components/GiftCardInput.d.ts +16 -0
- package/lib/cjs/components/GiftCardInput.js +1 -0
- package/lib/cjs/components/GiftCardOrCouponCode.d.ts +24 -0
- package/lib/cjs/components/GiftCardOrCouponCode.js +1 -0
- package/lib/cjs/components/GiftCardOrCouponForm.d.ts +15 -0
- package/lib/cjs/components/GiftCardOrCouponForm.js +1 -0
- package/lib/cjs/components/GiftCardOrCouponInput.d.ts +19 -0
- package/lib/cjs/components/GiftCardOrCouponInput.js +1 -0
- package/lib/cjs/components/GiftCardOrCouponRemoveButton.d.ts +26 -0
- package/lib/cjs/components/GiftCardOrCouponRemoveButton.js +1 -0
- package/lib/cjs/components/GiftCardOrCouponSubmit.d.ts +16 -0
- package/lib/cjs/components/GiftCardOrCouponSubmit.js +1 -0
- package/lib/{components → cjs/components}/GiftCardRecipient.d.ts +0 -0
- package/lib/{components → cjs/components}/GiftCardRecipient.js +0 -0
- package/lib/{components → cjs/components}/GiftCardRecipientInput.d.ts +0 -0
- package/lib/{components → cjs/components}/GiftCardRecipientInput.js +0 -0
- package/lib/cjs/components/ItemContainer.d.ts +22 -0
- package/lib/cjs/components/ItemContainer.js +1 -0
- package/lib/{components → cjs/components}/KlarnaPayment.d.ts +0 -0
- package/lib/cjs/components/KlarnaPayment.js +1 -0
- package/lib/cjs/components/LineItem.d.ts +15 -0
- package/lib/cjs/components/LineItem.js +1 -0
- package/lib/cjs/components/LineItemAmount.d.ts +20 -0
- package/lib/cjs/components/LineItemAmount.js +1 -0
- package/lib/cjs/components/LineItemCode.d.ts +18 -0
- package/lib/cjs/components/LineItemCode.js +1 -0
- package/lib/cjs/components/LineItemImage.d.ts +23 -0
- package/lib/cjs/components/LineItemImage.js +1 -0
- package/lib/cjs/components/LineItemName.d.ts +17 -0
- package/lib/cjs/components/LineItemName.js +1 -0
- package/lib/cjs/components/LineItemOption.d.ts +30 -0
- package/lib/cjs/components/LineItemOption.js +1 -0
- package/lib/cjs/components/LineItemOptions.d.ts +19 -0
- package/lib/cjs/components/LineItemOptions.js +1 -0
- package/lib/cjs/components/LineItemQuantity.d.ts +26 -0
- package/lib/cjs/components/LineItemQuantity.js +1 -0
- package/lib/cjs/components/LineItemRemoveLink.d.ts +22 -0
- package/lib/cjs/components/LineItemRemoveLink.js +1 -0
- package/lib/cjs/components/LineItemsContainer.d.ts +20 -0
- package/lib/cjs/components/LineItemsContainer.js +1 -0
- package/lib/cjs/components/LineItemsCount.d.ts +22 -0
- package/lib/cjs/components/LineItemsCount.js +1 -0
- package/lib/cjs/components/LineItemsEmpty.d.ts +23 -0
- package/lib/cjs/components/LineItemsEmpty.js +1 -0
- package/lib/cjs/components/MetadataInput.d.ts +15 -0
- package/lib/cjs/components/MetadataInput.js +1 -0
- package/lib/cjs/components/PaymentGateway.d.ts +16 -0
- package/lib/cjs/components/PaymentGateway.js +1 -0
- package/lib/cjs/components/PaymentMethod.d.ts +22 -0
- package/lib/cjs/components/PaymentMethod.js +1 -0
- package/lib/cjs/components/PaymentMethodAmount.d.ts +18 -0
- package/lib/cjs/components/PaymentMethodAmount.js +1 -0
- package/lib/cjs/components/PaymentMethodName.d.ts +15 -0
- package/lib/cjs/components/PaymentMethodName.js +1 -0
- package/lib/cjs/components/PaymentMethodPrice.d.ts +20 -0
- package/lib/cjs/components/PaymentMethodPrice.js +1 -0
- package/lib/cjs/components/PaymentMethodRadioButton.d.ts +18 -0
- package/lib/cjs/components/PaymentMethodRadioButton.js +1 -0
- package/lib/cjs/components/PaymentMethodsContainer.d.ts +14 -0
- package/lib/cjs/components/PaymentMethodsContainer.js +1 -0
- package/lib/cjs/components/PaymentSource.d.ts +26 -0
- package/lib/cjs/components/PaymentSource.js +1 -0
- package/lib/cjs/components/PaymentSourceBrandIcon.d.ts +25 -0
- package/lib/cjs/components/PaymentSourceBrandIcon.js +1 -0
- package/lib/cjs/components/PaymentSourceBrandName.d.ts +19 -0
- package/lib/cjs/components/PaymentSourceBrandName.js +1 -0
- package/lib/cjs/components/PaymentSourceDetail.d.ts +18 -0
- package/lib/cjs/components/PaymentSourceDetail.js +1 -0
- package/lib/cjs/components/PaymentSourceEditButton.d.ts +16 -0
- package/lib/cjs/components/PaymentSourceEditButton.js +1 -0
- package/lib/cjs/components/PaypalPayment.d.ts +12 -0
- package/lib/cjs/components/PaypalPayment.js +1 -0
- package/lib/cjs/components/Price.d.ts +28 -0
- package/lib/cjs/components/Price.js +1 -0
- package/lib/cjs/components/PricesContainer.d.ts +27 -0
- package/lib/cjs/components/PricesContainer.js +1 -0
- package/lib/cjs/components/QuantitySelector.d.ts +31 -0
- package/lib/cjs/components/QuantitySelector.js +1 -0
- package/lib/cjs/components/SaveAddressesButton.d.ts +23 -0
- package/lib/cjs/components/SaveAddressesButton.js +1 -0
- package/lib/cjs/components/SaveCustomerButton.d.ts +24 -0
- package/lib/cjs/components/SaveCustomerButton.js +1 -0
- package/lib/cjs/components/ShippingAddressContainer.d.ts +11 -0
- package/lib/cjs/components/ShippingAddressContainer.js +1 -0
- package/lib/cjs/components/ShippingAddressForm.d.ts +13 -0
- package/lib/cjs/components/ShippingAddressForm.js +1 -0
- package/lib/cjs/components/ShippingAmount.d.ts +15 -0
- package/lib/cjs/components/ShippingAmount.js +1 -0
- package/lib/{components → cjs/components}/SkuField.d.ts +0 -0
- package/lib/cjs/components/SkuField.js +1 -0
- package/lib/{components → cjs/components}/Skus.d.ts +0 -0
- package/lib/cjs/components/Skus.js +1 -0
- package/lib/{components → cjs/components}/SkusContainer.d.ts +0 -0
- package/lib/cjs/components/SkusContainer.js +1 -0
- package/lib/cjs/components/StockTransfer.d.ts +12 -0
- package/lib/cjs/components/StockTransfer.js +1 -0
- package/lib/cjs/components/StockTransferField.d.ts +10 -0
- package/lib/cjs/components/StockTransferField.js +1 -0
- package/lib/cjs/components/StripePayment.d.ts +18 -0
- package/lib/cjs/components/StripePayment.js +1 -0
- package/lib/cjs/components/SubmitButton.d.ts +19 -0
- package/lib/cjs/components/SubmitButton.js +1 -0
- package/lib/cjs/components/VariantSelector.d.ts +52 -0
- package/lib/cjs/components/VariantSelector.js +1 -0
- package/lib/cjs/components/VariantsContainer.d.ts +20 -0
- package/lib/cjs/components/VariantsContainer.js +1 -0
- package/lib/cjs/components/WireTransferPayment.d.ts +10 -0
- package/lib/cjs/components/WireTransferPayment.js +1 -0
- package/lib/cjs/components/addresses/Address.d.ts +18 -0
- package/lib/cjs/components/addresses/Address.js +1 -0
- package/lib/cjs/components/addresses/AddressCountrySelector.d.ts +26 -0
- package/lib/cjs/components/addresses/AddressCountrySelector.js +1 -0
- package/lib/cjs/components/addresses/AddressField.d.ts +43 -0
- package/lib/cjs/components/addresses/AddressField.js +1 -0
- package/lib/cjs/components/addresses/AddressInput.d.ts +19 -0
- package/lib/cjs/components/addresses/AddressInput.js +1 -0
- package/lib/cjs/components/addresses/AddressStateSelector.d.ts +27 -0
- package/lib/cjs/components/addresses/AddressStateSelector.js +1 -0
- package/lib/cjs/components/addresses/AddressesContainer.d.ts +15 -0
- package/lib/cjs/components/addresses/AddressesContainer.js +1 -0
- package/lib/cjs/components/auth/CommerceLayer.d.ts +15 -0
- package/lib/cjs/components/auth/CommerceLayer.js +1 -0
- package/lib/cjs/components/customers/CustomerAddressForm.d.ts +13 -0
- package/lib/cjs/components/customers/CustomerAddressForm.js +1 -0
- package/lib/cjs/components/customers/CustomerContainer.d.ts +10 -0
- package/lib/cjs/components/customers/CustomerContainer.js +1 -0
- package/lib/cjs/components/customers/CustomerField.d.ts +10 -0
- package/lib/cjs/components/customers/CustomerField.js +1 -0
- package/lib/cjs/components/customers/CustomerInput.d.ts +23 -0
- package/lib/cjs/components/customers/CustomerInput.js +1 -0
- package/lib/cjs/components/gateways/AdyenGateway.d.ts +5 -0
- package/lib/cjs/components/gateways/AdyenGateway.js +1 -0
- package/lib/cjs/components/gateways/BraintreeGateway.d.ts +5 -0
- package/lib/cjs/components/gateways/BraintreeGateway.js +1 -0
- package/lib/cjs/components/gateways/CheckoutComGateway.d.ts +5 -0
- package/lib/cjs/components/gateways/CheckoutComGateway.js +1 -0
- package/lib/cjs/components/gateways/KlarnaGateway.d.ts +5 -0
- package/lib/cjs/components/gateways/KlarnaGateway.js +1 -0
- package/lib/cjs/components/gateways/PaypalGateway.d.ts +5 -0
- package/lib/cjs/components/gateways/PaypalGateway.js +1 -0
- package/lib/cjs/components/gateways/StripeGateway.d.ts +5 -0
- package/lib/cjs/components/gateways/StripeGateway.js +1 -0
- package/lib/cjs/components/gateways/WireTransferGateway.d.ts +5 -0
- package/lib/cjs/components/gateways/WireTransferGateway.js +1 -0
- package/lib/cjs/components/orders/AddToCartButton.d.ts +34 -0
- package/lib/cjs/components/orders/AddToCartButton.js +1 -0
- package/lib/cjs/components/orders/AdjustmentAmount.d.ts +18 -0
- package/lib/cjs/components/orders/AdjustmentAmount.js +1 -0
- package/lib/cjs/components/orders/CartLink.d.ts +12 -0
- package/lib/cjs/components/orders/CartLink.js +1 -0
- package/lib/cjs/components/orders/GiftCardAmount.d.ts +15 -0
- package/lib/cjs/components/orders/GiftCardAmount.js +1 -0
- package/lib/cjs/components/orders/OrderContainer.d.ts +26 -0
- package/lib/cjs/components/orders/OrderContainer.js +1 -0
- package/lib/cjs/components/orders/OrderList.d.ts +61 -0
- package/lib/cjs/components/orders/OrderList.js +1 -0
- package/lib/cjs/components/orders/OrderListRow.d.ts +30 -0
- package/lib/cjs/components/orders/OrderListRow.js +1 -0
- package/lib/cjs/components/orders/OrderNumber.d.ts +11 -0
- package/lib/cjs/components/orders/OrderNumber.js +1 -0
- package/lib/cjs/components/orders/OrderStorage.d.ts +16 -0
- package/lib/cjs/components/orders/OrderStorage.js +1 -0
- package/lib/cjs/components/orders/PlaceOrderButton.d.ts +24 -0
- package/lib/cjs/components/orders/PlaceOrderButton.js +1 -0
- package/lib/cjs/components/orders/PlaceOrderContainer.d.ts +14 -0
- package/lib/cjs/components/orders/PlaceOrderContainer.js +1 -0
- package/lib/cjs/components/orders/PrivacyAndTermsCheckbox.d.ts +10 -0
- package/lib/cjs/components/orders/PrivacyAndTermsCheckbox.js +1 -0
- package/lib/cjs/components/orders/SubTotalAmount.d.ts +18 -0
- package/lib/cjs/components/orders/SubTotalAmount.js +1 -0
- package/lib/cjs/components/orders/TaxesAmount.d.ts +18 -0
- package/lib/cjs/components/orders/TaxesAmount.js +1 -0
- package/lib/cjs/components/orders/TotalAmount.d.ts +18 -0
- package/lib/cjs/components/orders/TotalAmount.js +1 -0
- package/lib/cjs/components/shipments/Shipment.d.ts +15 -0
- package/lib/cjs/components/shipments/Shipment.js +1 -0
- package/lib/cjs/components/shipments/ShipmentField.d.ts +19 -0
- package/lib/cjs/components/shipments/ShipmentField.js +1 -0
- package/lib/cjs/components/shipments/ShipmentsContainer.d.ts +12 -0
- package/lib/cjs/components/shipments/ShipmentsContainer.js +1 -0
- package/lib/cjs/components/shipping_methods/ShippingMethod.d.ts +15 -0
- package/lib/cjs/components/shipping_methods/ShippingMethod.js +1 -0
- package/lib/cjs/components/shipping_methods/ShippingMethodName.d.ts +17 -0
- package/lib/cjs/components/shipping_methods/ShippingMethodName.js +1 -0
- package/lib/cjs/components/shipping_methods/ShippingMethodPrice.d.ts +25 -0
- package/lib/cjs/components/shipping_methods/ShippingMethodPrice.js +1 -0
- package/lib/cjs/components/shipping_methods/ShippingMethodRadioButton.d.ts +19 -0
- package/lib/cjs/components/shipping_methods/ShippingMethodRadioButton.js +1 -0
- package/lib/cjs/components/skus/SkuField.d.ts +14 -0
- package/lib/cjs/components/skus/SkuField.js +1 -0
- package/lib/cjs/components/skus/SkuList.d.ts +14 -0
- package/lib/cjs/components/skus/SkuList.js +1 -0
- package/lib/cjs/components/skus/SkuListsContainer.d.ts +12 -0
- package/lib/cjs/components/skus/SkuListsContainer.js +1 -0
- package/lib/cjs/components/skus/SkuOption.d.ts +14 -0
- package/lib/cjs/components/skus/SkuOption.js +1 -0
- package/lib/cjs/components/skus/SkuOptionInput.d.ts +15 -0
- package/lib/cjs/components/skus/SkuOptionInput.js +1 -0
- package/lib/cjs/components/skus/SkuOptionsContainer.d.ts +14 -0
- package/lib/cjs/components/skus/SkuOptionsContainer.js +1 -0
- package/lib/cjs/components/skus/Skus.d.ts +11 -0
- package/lib/cjs/components/skus/Skus.js +1 -0
- package/lib/cjs/components/skus/SkusContainer.d.ts +23 -0
- package/lib/cjs/components/skus/SkusContainer.js +1 -0
- package/lib/cjs/components/utils/AddressCardsTemplate.d.ts +27 -0
- package/lib/cjs/components/utils/AddressCardsTemplate.js +1 -0
- package/lib/{components → cjs/components}/utils/BaseField.d.ts +0 -0
- package/lib/cjs/components/utils/BaseField.js +1 -0
- package/lib/{components → cjs/components}/utils/BaseInput.d.ts +0 -0
- package/lib/cjs/components/utils/BaseInput.js +1 -0
- package/lib/{components → cjs/components}/utils/BaseOrderPrice.d.ts +0 -0
- package/lib/cjs/components/utils/BaseOrderPrice.js +1 -0
- package/lib/{components → cjs/components}/utils/BaseSelect.d.ts +0 -0
- package/lib/cjs/components/utils/BaseSelect.js +1 -0
- package/lib/cjs/components/utils/GenericFieldComponent.d.ts +42 -0
- package/lib/cjs/components/utils/GenericFieldComponent.js +1 -0
- package/lib/{components → cjs/components}/utils/Parent.d.ts +0 -0
- package/lib/cjs/components/utils/Parent.js +1 -0
- package/lib/{components → cjs/components}/utils/PaymentCardsTemplate.d.ts +0 -0
- package/lib/cjs/components/utils/PaymentCardsTemplate.js +1 -0
- package/lib/{components → cjs/components}/utils/PriceTemplate.d.ts +0 -0
- package/lib/cjs/components/utils/PriceTemplate.js +1 -0
- package/lib/{components → cjs/components}/utils/VariantTemplate.d.ts +0 -0
- package/lib/cjs/components/utils/VariantTemplate.js +1 -0
- package/lib/{components → cjs/components}/utils/getAllErrors.d.ts +0 -0
- package/lib/cjs/components/utils/getAllErrors.js +1 -0
- package/lib/cjs/config/components.d.ts +934 -0
- package/lib/cjs/config/components.js +1 -0
- package/lib/{config → cjs/config}/currency.d.ts +0 -0
- package/lib/cjs/config/currency.js +1 -0
- package/lib/cjs/context/AddressChildrenContext.d.ts +7 -0
- package/lib/cjs/context/AddressChildrenContext.js +1 -0
- package/lib/{context → cjs/context}/AddressContext.d.ts +0 -0
- package/lib/cjs/context/AddressContext.js +1 -0
- package/lib/{context → cjs/context}/AvailabilityContext.d.ts +0 -0
- package/lib/cjs/context/AvailabilityContext.js +1 -0
- package/lib/cjs/context/BillingAddressContext.d.ts +10 -0
- package/lib/cjs/context/BillingAddressContext.js +1 -0
- package/lib/cjs/context/BillingAddressFormContext.d.ts +25 -0
- package/lib/cjs/context/BillingAddressFormContext.js +1 -0
- package/lib/{context → cjs/context}/CommerceLayerContext.d.ts +0 -0
- package/lib/cjs/context/CommerceLayerContext.js +1 -0
- package/lib/cjs/context/CouponAndGiftCardFormContext.d.ts +9 -0
- package/lib/cjs/context/CouponAndGiftCardFormContext.js +1 -0
- package/lib/cjs/context/CustomerAddressFormContext.d.ts +20 -0
- package/lib/cjs/context/CustomerAddressFormContext.js +1 -0
- package/lib/cjs/context/CustomerContext.d.ts +22 -0
- package/lib/cjs/context/CustomerContext.js +1 -0
- package/lib/{context → cjs/context}/ExternalFunctionContext.d.ts +0 -0
- package/lib/cjs/context/ExternalFunctionContext.js +1 -0
- package/lib/{context → cjs/context}/GiftCardContext.d.ts +0 -0
- package/lib/cjs/context/GiftCardContext.js +1 -0
- package/lib/{context → cjs/context}/ItemContext.d.ts +0 -0
- package/lib/cjs/context/ItemContext.js +1 -0
- package/lib/{context → cjs/context}/LineItemChildrenContext.d.ts +0 -0
- package/lib/cjs/context/LineItemChildrenContext.js +1 -0
- package/lib/{context → cjs/context}/LineItemContext.d.ts +0 -0
- package/lib/cjs/context/LineItemContext.js +1 -0
- package/lib/{context → cjs/context}/LineItemOptionChildrenContext.d.ts +0 -0
- package/lib/cjs/context/LineItemOptionChildrenContext.js +1 -0
- package/lib/{context → cjs/context}/OrderContext.d.ts +0 -0
- package/lib/cjs/context/OrderContext.js +1 -0
- package/lib/cjs/context/OrderListChildrenContext.d.ts +60 -0
- package/lib/cjs/context/OrderListChildrenContext.js +1 -0
- package/lib/{context → cjs/context}/OrderStorageContext.d.ts +0 -0
- package/lib/cjs/context/OrderStorageContext.js +1 -0
- package/lib/{context → cjs/context}/PaymentMethodChildrenContext.d.ts +0 -0
- package/lib/cjs/context/PaymentMethodChildrenContext.js +1 -0
- package/lib/{context → cjs/context}/PaymentMethodContext.d.ts +0 -0
- package/lib/cjs/context/PaymentMethodContext.js +1 -0
- package/lib/{context → cjs/context}/PaymentSourceContext.d.ts +0 -0
- package/lib/cjs/context/PaymentSourceContext.js +1 -0
- package/lib/{context → cjs/context}/PlaceOrderContext.d.ts +0 -0
- package/lib/cjs/context/PlaceOrderContext.js +1 -0
- package/lib/{context → cjs/context}/PricesContext.d.ts +0 -0
- package/lib/cjs/context/PricesContext.js +1 -0
- package/lib/{context → cjs/context}/ShipmentChildrenContext.d.ts +0 -0
- package/lib/cjs/context/ShipmentChildrenContext.js +1 -0
- package/lib/{context → cjs/context}/ShipmentContext.d.ts +0 -0
- package/lib/cjs/context/ShipmentContext.js +1 -0
- package/lib/cjs/context/ShippingAddressContext.d.ts +10 -0
- package/lib/cjs/context/ShippingAddressContext.js +1 -0
- package/lib/{context → cjs/context}/ShippingAddressFormContext.d.ts +0 -0
- package/lib/cjs/context/ShippingAddressFormContext.js +1 -0
- package/lib/{context → cjs/context}/ShippingMethodChildrenContext.d.ts +0 -0
- package/lib/cjs/context/ShippingMethodChildrenContext.js +1 -0
- package/lib/{context → cjs/context}/SkuChildrenContext.d.ts +0 -0
- package/lib/cjs/context/SkuChildrenContext.js +1 -0
- package/lib/{context → cjs/context}/SkuContext.d.ts +0 -0
- package/lib/cjs/context/SkuContext.js +1 -0
- package/lib/{context → cjs/context}/SkuListsContext.d.ts +0 -0
- package/lib/cjs/context/SkuListsContext.js +1 -0
- package/lib/{context → cjs/context}/SkuOptionChildrenContext.d.ts +0 -0
- package/lib/cjs/context/SkuOptionChildrenContext.js +1 -0
- package/lib/{context → cjs/context}/SkuOptionsContext.d.ts +0 -0
- package/lib/cjs/context/SkuOptionsContext.js +1 -0
- package/lib/{context → cjs/context}/StockTransferChildrenContext.d.ts +0 -0
- package/lib/cjs/context/StockTransferChildrenContext.js +1 -0
- package/lib/{context → cjs/context}/VariantsContext.d.ts +0 -0
- package/lib/cjs/context/VariantsContext.js +1 -0
- package/lib/cjs/index.d.ts +107 -0
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/reducers/AddressReducer.d.ts +60 -0
- package/lib/cjs/reducers/AddressReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/AvailabilityReducer.d.ts +0 -0
- package/lib/cjs/reducers/AvailabilityReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/BillingAddressReducer.d.ts +0 -0
- package/lib/cjs/reducers/BillingAddressReducer.js +1 -0
- package/lib/cjs/reducers/CustomerReducer.d.ts +131 -0
- package/lib/cjs/reducers/CustomerReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/GiftCardReducer.d.ts +0 -0
- package/lib/cjs/reducers/GiftCardReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/ItemReducer.d.ts +0 -0
- package/lib/cjs/reducers/ItemReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/LineItemReducer.d.ts +0 -0
- package/lib/cjs/reducers/LineItemReducer.js +1 -0
- package/lib/cjs/reducers/OrderReducer.d.ts +147 -0
- package/lib/cjs/reducers/OrderReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/PaymentMethodReducer.d.ts +0 -0
- package/lib/cjs/reducers/PaymentMethodReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/PlaceOrderReducer.d.ts +0 -0
- package/lib/cjs/reducers/PlaceOrderReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/PriceReducer.d.ts +0 -0
- package/lib/cjs/reducers/PriceReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/ShipmentReducer.d.ts +0 -0
- package/lib/cjs/reducers/ShipmentReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/ShippingAddressReducer.d.ts +0 -0
- package/lib/cjs/reducers/ShippingAddressReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/SkuListsReducer.d.ts +0 -0
- package/lib/cjs/reducers/SkuListsReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/SkuOptionsReducer.d.ts +0 -0
- package/lib/cjs/reducers/SkuOptionsReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/SkuReducer.d.ts +0 -0
- package/lib/cjs/reducers/SkuReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/VariantReducer.d.ts +0 -0
- package/lib/cjs/reducers/VariantReducer.js +1 -0
- package/lib/cjs/typings/errors.d.ts +51 -0
- package/lib/cjs/typings/errors.js +1 -0
- package/lib/cjs/typings/index.d.ts +137 -0
- package/lib/cjs/typings/index.js +1 -0
- package/lib/{utils → cjs/utils}/PropsType.d.ts +0 -0
- package/lib/cjs/utils/PropsType.js +1 -0
- package/lib/cjs/utils/addressesManager.d.ts +28 -0
- package/lib/cjs/utils/addressesManager.js +1 -0
- package/lib/{utils → cjs/utils}/baseReducer.d.ts +0 -0
- package/lib/cjs/utils/baseReducer.js +1 -0
- package/lib/{utils → cjs/utils}/browserInfo.d.ts +0 -0
- package/lib/cjs/utils/browserInfo.js +1 -0
- package/lib/{utils → cjs/utils}/checkIncludeResource.d.ts +0 -0
- package/lib/cjs/utils/checkIncludeResource.js +1 -0
- package/lib/{utils → cjs/utils}/childrenTypes.d.ts +0 -0
- package/lib/cjs/utils/childrenTypes.js +1 -0
- package/lib/{utils → cjs/utils}/compareObjAttribute.d.ts +0 -0
- package/lib/cjs/utils/compareObjAttribute.js +1 -0
- package/lib/{utils → cjs/utils}/countryStateCity.d.ts +0 -0
- package/lib/cjs/utils/countryStateCity.js +1 -0
- package/lib/{utils → cjs/utils}/customMessages.d.ts +0 -0
- package/lib/cjs/utils/customMessages.js +1 -0
- package/lib/{utils → cjs/utils}/customerOrderOptions.d.ts +0 -0
- package/lib/cjs/utils/customerOrderOptions.js +1 -0
- package/lib/{utils → cjs/utils}/getAmount.d.ts +0 -0
- package/lib/cjs/utils/getAmount.js +1 -0
- package/lib/{utils → cjs/utils}/getCardDetails.d.ts +0 -0
- package/lib/cjs/utils/getCardDetails.js +1 -0
- package/lib/{utils → cjs/utils}/getCartLink.d.ts +0 -0
- package/lib/cjs/utils/getCartLink.js +1 -0
- package/lib/{utils → cjs/utils}/getCurrentItemKey.d.ts +0 -0
- package/lib/cjs/utils/getCurrentItemKey.js +1 -0
- package/lib/{utils → cjs/utils}/getErrors.d.ts +0 -0
- package/lib/cjs/utils/getErrors.js +1 -0
- package/lib/{utils → cjs/utils}/getLineItemsCount.d.ts +0 -0
- package/lib/cjs/utils/getLineItemsCount.js +1 -0
- package/lib/{utils → cjs/utils}/getLoaderComponent.d.ts +0 -0
- package/lib/cjs/utils/getLoaderComponent.js +1 -0
- package/lib/{utils → cjs/utils}/getPrices.d.ts +0 -0
- package/lib/cjs/utils/getPrices.js +1 -0
- package/lib/{utils → cjs/utils}/getSdk.d.ts +0 -0
- package/lib/cjs/utils/getSdk.js +1 -0
- package/lib/{utils → cjs/utils}/getSkus.d.ts +0 -0
- package/lib/cjs/utils/getSkus.js +1 -0
- package/lib/{utils → cjs/utils}/hooks/useExternalScript.d.ts +0 -0
- package/lib/cjs/utils/hooks/useExternalScript.js +1 -0
- package/lib/cjs/utils/icons.d.ts +3 -0
- package/lib/cjs/utils/icons.js +1 -0
- package/lib/cjs/utils/isDate.d.ts +1 -0
- package/lib/cjs/utils/isDate.js +1 -0
- package/lib/{utils → cjs/utils}/isEmptyStates.d.ts +0 -0
- package/lib/cjs/utils/isEmptyStates.js +1 -0
- package/lib/{utils → cjs/utils}/isJSON.d.ts +0 -0
- 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/lib/{utils → cjs/utils}/localStorage.d.ts +0 -0
- package/lib/cjs/utils/localStorage.js +1 -0
- package/lib/{utils → cjs/utils}/organization.d.ts +0 -0
- package/lib/cjs/utils/organization.js +1 -0
- package/lib/{utils → cjs/utils}/paypalPayment.d.ts +0 -0
- package/lib/cjs/utils/paypalPayment.js +1 -0
- package/lib/{utils → cjs/utils}/placeholderImages.d.ts +0 -0
- package/lib/cjs/utils/placeholderImages.js +1 -0
- package/lib/{utils → cjs/utils}/promisify.d.ts +0 -0
- package/lib/cjs/utils/promisify.js +1 -0
- package/lib/cjs/utils/scrollbarWidth.d.ts +1 -0
- package/lib/cjs/utils/scrollbarWidth.js +1 -0
- package/lib/{utils → cjs/utils}/shipments.d.ts +0 -0
- package/lib/cjs/utils/shipments.js +1 -0
- package/lib/{utils → cjs/utils}/validateFormFields.d.ts +0 -0
- package/lib/cjs/utils/validateFormFields.js +1 -0
- package/lib/esm/components/AdjustmentAmount.d.ts +4 -0
- package/lib/esm/components/AdjustmentAmount.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 +14 -0
- package/lib/esm/components/AvailabilityContainer.js +1 -0
- package/lib/esm/components/AvailabilityTemplate.d.ts +24 -0
- package/lib/esm/components/AvailabilityTemplate.js +1 -0
- package/lib/esm/components/BillingAddressContainer.d.ts +11 -0
- package/lib/esm/components/BillingAddressContainer.js +1 -0
- package/lib/esm/components/BillingAddressForm.d.ts +13 -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/CartLink.d.ts +12 -0
- package/lib/esm/components/CartLink.js +1 -0
- package/lib/esm/components/CheckoutComPayment.d.ts +23 -0
- package/lib/esm/components/CheckoutComPayment.js +1 -0
- package/lib/esm/components/CheckoutLink.d.ts +23 -0
- package/lib/esm/components/CheckoutLink.js +1 -0
- package/lib/esm/components/DeliveryLeadTime.d.ts +17 -0
- package/lib/esm/components/DeliveryLeadTime.js +1 -0
- package/lib/esm/components/DiscountAmount.d.ts +18 -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 +14 -0
- package/lib/esm/components/ExternalFunction.js +1 -0
- package/lib/esm/components/GiftCard.d.ts +18 -0
- package/lib/esm/components/GiftCard.js +1 -0
- package/lib/esm/components/GiftCardContainer.d.ts +12 -0
- package/lib/esm/components/GiftCardContainer.js +1 -0
- package/lib/esm/components/GiftCardCurrencySelector.d.ts +22 -0
- package/lib/esm/components/GiftCardCurrencySelector.js +1 -0
- package/lib/esm/components/GiftCardInput.d.ts +16 -0
- package/lib/esm/components/GiftCardInput.js +1 -0
- package/lib/esm/components/GiftCardOrCouponCode.d.ts +24 -0
- package/lib/esm/components/GiftCardOrCouponCode.js +1 -0
- package/lib/esm/components/GiftCardOrCouponForm.d.ts +15 -0
- package/lib/esm/components/GiftCardOrCouponForm.js +1 -0
- package/lib/esm/components/GiftCardOrCouponInput.d.ts +19 -0
- package/lib/esm/components/GiftCardOrCouponInput.js +1 -0
- package/lib/esm/components/GiftCardOrCouponRemoveButton.d.ts +26 -0
- package/lib/esm/components/GiftCardOrCouponRemoveButton.js +1 -0
- package/lib/esm/components/GiftCardOrCouponSubmit.d.ts +16 -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 +22 -0
- package/lib/esm/components/ItemContainer.js +1 -0
- package/lib/esm/components/KlarnaPayment.d.ts +10 -0
- package/lib/esm/components/KlarnaPayment.js +1 -0
- package/lib/esm/components/LineItem.d.ts +15 -0
- package/lib/esm/components/LineItem.js +1 -0
- package/lib/esm/components/LineItemAmount.d.ts +20 -0
- package/lib/esm/components/LineItemAmount.js +1 -0
- package/lib/esm/components/LineItemCode.d.ts +18 -0
- package/lib/esm/components/LineItemCode.js +1 -0
- package/lib/esm/components/LineItemImage.d.ts +23 -0
- package/lib/esm/components/LineItemImage.js +1 -0
- package/lib/esm/components/LineItemName.d.ts +17 -0
- package/lib/esm/components/LineItemName.js +1 -0
- package/lib/esm/components/LineItemOption.d.ts +30 -0
- package/lib/esm/components/LineItemOption.js +1 -0
- package/lib/esm/components/LineItemOptions.d.ts +19 -0
- package/lib/esm/components/LineItemOptions.js +1 -0
- package/lib/esm/components/LineItemQuantity.d.ts +26 -0
- package/lib/esm/components/LineItemQuantity.js +1 -0
- package/lib/esm/components/LineItemRemoveLink.d.ts +22 -0
- package/lib/esm/components/LineItemRemoveLink.js +1 -0
- package/lib/esm/components/LineItemsContainer.d.ts +20 -0
- package/lib/esm/components/LineItemsContainer.js +1 -0
- package/lib/esm/components/LineItemsCount.d.ts +22 -0
- package/lib/esm/components/LineItemsCount.js +1 -0
- package/lib/esm/components/LineItemsEmpty.d.ts +23 -0
- package/lib/esm/components/LineItemsEmpty.js +1 -0
- package/lib/esm/components/MetadataInput.d.ts +15 -0
- package/lib/esm/components/MetadataInput.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 +22 -0
- package/lib/esm/components/PaymentMethod.js +1 -0
- package/lib/esm/components/PaymentMethodAmount.d.ts +18 -0
- package/lib/esm/components/PaymentMethodAmount.js +1 -0
- package/lib/esm/components/PaymentMethodName.d.ts +15 -0
- package/lib/esm/components/PaymentMethodName.js +1 -0
- package/lib/esm/components/PaymentMethodPrice.d.ts +20 -0
- package/lib/esm/components/PaymentMethodPrice.js +1 -0
- package/lib/esm/components/PaymentMethodRadioButton.d.ts +18 -0
- package/lib/esm/components/PaymentMethodRadioButton.js +1 -0
- package/lib/esm/components/PaymentMethodsContainer.d.ts +14 -0
- package/lib/esm/components/PaymentMethodsContainer.js +1 -0
- package/lib/esm/components/PaymentSource.d.ts +26 -0
- package/lib/esm/components/PaymentSource.js +1 -0
- package/lib/esm/components/PaymentSourceBrandIcon.d.ts +25 -0
- package/lib/esm/components/PaymentSourceBrandIcon.js +1 -0
- package/lib/esm/components/PaymentSourceBrandName.d.ts +19 -0
- package/lib/esm/components/PaymentSourceBrandName.js +1 -0
- package/lib/esm/components/PaymentSourceDetail.d.ts +18 -0
- package/lib/esm/components/PaymentSourceDetail.js +1 -0
- package/lib/esm/components/PaymentSourceEditButton.d.ts +16 -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/Price.d.ts +28 -0
- package/lib/esm/components/Price.js +1 -0
- package/lib/esm/components/PricesContainer.d.ts +27 -0
- package/lib/esm/components/PricesContainer.js +1 -0
- package/lib/esm/components/QuantitySelector.d.ts +31 -0
- package/lib/esm/components/QuantitySelector.js +1 -0
- package/lib/esm/components/SaveAddressesButton.d.ts +23 -0
- package/lib/esm/components/SaveAddressesButton.js +1 -0
- package/lib/esm/components/SaveCustomerButton.d.ts +24 -0
- package/lib/esm/components/SaveCustomerButton.js +1 -0
- package/lib/esm/components/ShippingAddressContainer.d.ts +11 -0
- package/lib/esm/components/ShippingAddressContainer.js +1 -0
- package/lib/esm/components/ShippingAddressForm.d.ts +13 -0
- package/lib/esm/components/ShippingAddressForm.js +1 -0
- package/lib/esm/components/ShippingAmount.d.ts +15 -0
- package/lib/esm/components/ShippingAmount.js +1 -0
- package/lib/esm/components/SkuField.d.ts +10 -0
- package/lib/esm/components/SkuField.js +1 -0
- package/lib/esm/components/Skus.d.ts +11 -0
- package/lib/esm/components/Skus.js +1 -0
- package/lib/esm/components/SkusContainer.d.ts +14 -0
- package/lib/esm/components/SkusContainer.js +1 -0
- package/lib/esm/components/StockTransfer.d.ts +12 -0
- package/lib/esm/components/StockTransfer.js +1 -0
- package/lib/esm/components/StockTransferField.d.ts +10 -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/SubmitButton.d.ts +19 -0
- package/lib/esm/components/SubmitButton.js +1 -0
- package/lib/esm/components/VariantSelector.d.ts +52 -0
- package/lib/esm/components/VariantSelector.js +1 -0
- package/lib/esm/components/VariantsContainer.d.ts +20 -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/addresses/Address.d.ts +18 -0
- package/lib/esm/components/addresses/Address.js +1 -0
- package/lib/esm/components/addresses/AddressCountrySelector.d.ts +26 -0
- package/lib/esm/components/addresses/AddressCountrySelector.js +1 -0
- package/lib/esm/components/addresses/AddressField.d.ts +43 -0
- package/lib/esm/components/addresses/AddressField.js +1 -0
- package/lib/esm/components/addresses/AddressInput.d.ts +19 -0
- package/lib/esm/components/addresses/AddressInput.js +1 -0
- package/lib/esm/components/addresses/AddressStateSelector.d.ts +27 -0
- package/lib/esm/components/addresses/AddressStateSelector.js +1 -0
- package/lib/esm/components/addresses/AddressesContainer.d.ts +15 -0
- package/lib/esm/components/addresses/AddressesContainer.js +1 -0
- package/lib/esm/components/auth/CommerceLayer.d.ts +15 -0
- package/lib/esm/components/auth/CommerceLayer.js +1 -0
- package/lib/esm/components/customers/CustomerAddressForm.d.ts +13 -0
- package/lib/esm/components/customers/CustomerAddressForm.js +1 -0
- package/lib/esm/components/customers/CustomerContainer.d.ts +10 -0
- package/lib/esm/components/customers/CustomerContainer.js +1 -0
- package/lib/esm/components/customers/CustomerField.d.ts +10 -0
- package/lib/esm/components/customers/CustomerField.js +1 -0
- package/lib/esm/components/customers/CustomerInput.d.ts +23 -0
- package/lib/esm/components/customers/CustomerInput.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/CheckoutComGateway.d.ts +5 -0
- package/lib/esm/components/gateways/CheckoutComGateway.js +1 -0
- package/lib/esm/components/gateways/KlarnaGateway.d.ts +5 -0
- package/lib/esm/components/gateways/KlarnaGateway.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/orders/AddToCartButton.d.ts +34 -0
- package/lib/esm/components/orders/AddToCartButton.js +1 -0
- package/lib/esm/components/orders/AdjustmentAmount.d.ts +18 -0
- package/lib/esm/components/orders/AdjustmentAmount.js +1 -0
- package/lib/esm/components/orders/CartLink.d.ts +12 -0
- package/lib/esm/components/orders/CartLink.js +1 -0
- package/lib/esm/components/orders/GiftCardAmount.d.ts +15 -0
- package/lib/esm/components/orders/GiftCardAmount.js +1 -0
- package/lib/esm/components/orders/OrderContainer.d.ts +26 -0
- package/lib/esm/components/orders/OrderContainer.js +1 -0
- package/lib/esm/components/orders/OrderList.d.ts +61 -0
- package/lib/esm/components/orders/OrderList.js +1 -0
- package/lib/esm/components/orders/OrderListRow.d.ts +30 -0
- package/lib/esm/components/orders/OrderListRow.js +1 -0
- package/lib/esm/components/orders/OrderNumber.d.ts +11 -0
- package/lib/esm/components/orders/OrderNumber.js +1 -0
- package/lib/esm/components/orders/OrderStorage.d.ts +16 -0
- package/lib/esm/components/orders/OrderStorage.js +1 -0
- package/lib/esm/components/orders/PlaceOrderButton.d.ts +24 -0
- package/lib/esm/components/orders/PlaceOrderButton.js +1 -0
- package/lib/esm/components/orders/PlaceOrderContainer.d.ts +14 -0
- package/lib/esm/components/orders/PlaceOrderContainer.js +1 -0
- package/lib/esm/components/orders/PrivacyAndTermsCheckbox.d.ts +10 -0
- package/lib/esm/components/orders/PrivacyAndTermsCheckbox.js +1 -0
- package/lib/esm/components/orders/SubTotalAmount.d.ts +18 -0
- package/lib/esm/components/orders/SubTotalAmount.js +1 -0
- package/lib/esm/components/orders/TaxesAmount.d.ts +18 -0
- package/lib/esm/components/orders/TaxesAmount.js +1 -0
- package/lib/esm/components/orders/TotalAmount.d.ts +18 -0
- package/lib/esm/components/orders/TotalAmount.js +1 -0
- package/lib/esm/components/shipments/Shipment.d.ts +15 -0
- package/lib/esm/components/shipments/Shipment.js +1 -0
- package/lib/esm/components/shipments/ShipmentField.d.ts +19 -0
- package/lib/esm/components/shipments/ShipmentField.js +1 -0
- package/lib/esm/components/shipments/ShipmentsContainer.d.ts +12 -0
- package/lib/esm/components/shipments/ShipmentsContainer.js +1 -0
- package/lib/esm/components/shipping_methods/ShippingMethod.d.ts +15 -0
- package/lib/esm/components/shipping_methods/ShippingMethod.js +1 -0
- package/lib/esm/components/shipping_methods/ShippingMethodName.d.ts +17 -0
- package/lib/esm/components/shipping_methods/ShippingMethodName.js +1 -0
- package/lib/esm/components/shipping_methods/ShippingMethodPrice.d.ts +25 -0
- package/lib/esm/components/shipping_methods/ShippingMethodPrice.js +1 -0
- package/lib/esm/components/shipping_methods/ShippingMethodRadioButton.d.ts +19 -0
- package/lib/esm/components/shipping_methods/ShippingMethodRadioButton.js +1 -0
- package/lib/esm/components/skus/SkuField.d.ts +14 -0
- package/lib/esm/components/skus/SkuField.js +1 -0
- package/lib/esm/components/skus/SkuList.d.ts +14 -0
- package/lib/esm/components/skus/SkuList.js +1 -0
- package/lib/esm/components/skus/SkuListsContainer.d.ts +12 -0
- package/lib/esm/components/skus/SkuListsContainer.js +1 -0
- package/lib/esm/components/skus/SkuOption.d.ts +14 -0
- package/lib/esm/components/skus/SkuOption.js +1 -0
- package/lib/esm/components/skus/SkuOptionInput.d.ts +15 -0
- package/lib/esm/components/skus/SkuOptionInput.js +1 -0
- package/lib/esm/components/skus/SkuOptionsContainer.d.ts +14 -0
- package/lib/esm/components/skus/SkuOptionsContainer.js +1 -0
- package/lib/esm/components/skus/Skus.d.ts +11 -0
- package/lib/esm/components/skus/Skus.js +1 -0
- package/lib/esm/components/skus/SkusContainer.d.ts +23 -0
- package/lib/esm/components/skus/SkusContainer.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/GenericFieldComponent.d.ts +42 -0
- package/lib/esm/components/utils/GenericFieldComponent.js +1 -0
- package/lib/esm/components/utils/Parent.d.ts +6 -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 +934 -0
- package/lib/esm/config/components.js +1 -0
- package/lib/esm/config/currency.d.ts +5 -0
- package/lib/{config → esm/config}/currency.js +0 -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/{context → esm/context}/AddressContext.js +0 -0
- package/lib/esm/context/AvailabilityContext.d.ts +3 -0
- package/lib/{context → esm/context}/AvailabilityContext.js +0 -0
- package/lib/esm/context/BillingAddressContext.d.ts +10 -0
- package/lib/esm/context/BillingAddressContext.js +1 -0
- package/lib/esm/context/BillingAddressFormContext.d.ts +25 -0
- package/lib/{context → esm/context}/BillingAddressFormContext.js +0 -0
- package/lib/esm/context/CommerceLayerContext.d.ts +7 -0
- package/lib/{context → esm/context}/CommerceLayerContext.js +0 -0
- package/lib/esm/context/CouponAndGiftCardFormContext.d.ts +9 -0
- package/lib/{context → esm/context}/CouponAndGiftCardFormContext.js +0 -0
- package/lib/esm/context/CustomerAddressFormContext.d.ts +20 -0
- package/lib/esm/context/CustomerAddressFormContext.js +1 -0
- package/lib/esm/context/CustomerContext.d.ts +22 -0
- package/lib/esm/context/CustomerContext.js +1 -0
- package/lib/esm/context/ExternalFunctionContext.d.ts +12 -0
- package/lib/{context → esm/context}/ExternalFunctionContext.js +0 -0
- package/lib/esm/context/GiftCardContext.d.ts +11 -0
- package/lib/{context → esm/context}/GiftCardContext.js +0 -0
- package/lib/esm/context/ItemContext.d.ts +13 -0
- package/lib/{context → esm/context}/ItemContext.js +0 -0
- package/lib/esm/context/LineItemChildrenContext.d.ts +9 -0
- package/lib/{context → esm/context}/LineItemChildrenContext.js +0 -0
- package/lib/esm/context/LineItemContext.d.ts +8 -0
- package/lib/{context → esm/context}/LineItemContext.js +0 -0
- package/lib/esm/context/LineItemOptionChildrenContext.d.ts +8 -0
- package/lib/{context → esm/context}/LineItemOptionChildrenContext.js +0 -0
- package/lib/esm/context/OrderContext.d.ts +30 -0
- package/lib/{context → esm/context}/OrderContext.js +0 -0
- package/lib/esm/context/OrderListChildrenContext.d.ts +60 -0
- package/lib/esm/context/OrderListChildrenContext.js +1 -0
- package/lib/esm/context/OrderStorageContext.d.ts +11 -0
- package/lib/{context → esm/context}/OrderStorageContext.js +0 -0
- package/lib/esm/context/PaymentMethodChildrenContext.d.ts +10 -0
- package/lib/{context → esm/context}/PaymentMethodChildrenContext.js +0 -0
- package/lib/esm/context/PaymentMethodContext.d.ts +23 -0
- package/lib/{context → esm/context}/PaymentMethodContext.js +0 -0
- package/lib/esm/context/PaymentSourceContext.d.ts +14 -0
- package/lib/{context → esm/context}/PaymentSourceContext.js +0 -0
- package/lib/esm/context/PlaceOrderContext.d.ts +18 -0
- package/lib/{context → esm/context}/PlaceOrderContext.js +0 -0
- package/lib/esm/context/PricesContext.d.ts +7 -0
- package/lib/{context → esm/context}/PricesContext.js +0 -0
- package/lib/esm/context/ShipmentChildrenContext.d.ts +13 -0
- package/lib/{context → esm/context}/ShipmentChildrenContext.js +0 -0
- package/lib/esm/context/ShipmentContext.d.ts +12 -0
- package/lib/{context → esm/context}/ShipmentContext.js +0 -0
- package/lib/esm/context/ShippingAddressContext.d.ts +10 -0
- package/lib/{context → esm/context}/ShippingAddressContext.js +0 -0
- package/lib/esm/context/ShippingAddressFormContext.d.ts +4 -0
- package/lib/{context → esm/context}/ShippingAddressFormContext.js +0 -0
- package/lib/esm/context/ShippingMethodChildrenContext.d.ts +10 -0
- package/lib/{context → esm/context}/ShippingMethodChildrenContext.js +0 -0
- package/lib/esm/context/SkuChildrenContext.d.ts +9 -0
- package/lib/{context → esm/context}/SkuChildrenContext.js +0 -0
- package/lib/esm/context/SkuContext.d.ts +9 -0
- package/lib/{context → esm/context}/SkuContext.js +0 -0
- package/lib/esm/context/SkuListsContext.d.ts +6 -0
- package/lib/{context → esm/context}/SkuListsContext.js +0 -0
- package/lib/esm/context/SkuOptionChildrenContext.d.ts +8 -0
- package/lib/{context → esm/context}/SkuOptionChildrenContext.js +0 -0
- package/lib/esm/context/SkuOptionsContext.d.ts +3 -0
- package/lib/{context → esm/context}/SkuOptionsContext.js +0 -0
- package/lib/esm/context/StockTransferChildrenContext.d.ts +7 -0
- package/lib/{context → esm/context}/StockTransferChildrenContext.js +0 -0
- package/lib/esm/context/VariantsContext.d.ts +3 -0
- package/lib/{context → esm/context}/VariantsContext.js +0 -0
- package/lib/esm/index.d.ts +107 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/reducers/AddressReducer.d.ts +60 -0
- package/lib/esm/reducers/AddressReducer.js +1 -0
- package/lib/esm/reducers/AvailabilityReducer.d.ts +61 -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 +131 -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/{reducers → esm/reducers}/ItemReducer.js +0 -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 +147 -0
- package/lib/esm/reducers/OrderReducer.js +1 -0
- package/lib/esm/reducers/PaymentMethodReducer.d.ts +151 -0
- package/lib/esm/reducers/PaymentMethodReducer.js +1 -0
- package/lib/esm/reducers/PlaceOrderReducer.d.ts +59 -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/{reducers → esm/reducers}/ShipmentReducer.js +0 -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/{reducers → esm/reducers}/SkuListsReducer.js +0 -0
- package/lib/esm/reducers/SkuOptionsReducer.d.ts +26 -0
- package/lib/{reducers → esm/reducers}/SkuOptionsReducer.js +0 -0
- package/lib/esm/reducers/SkuReducer.d.ts +21 -0
- package/lib/esm/reducers/SkuReducer.js +1 -0
- package/lib/esm/reducers/VariantReducer.d.ts +72 -0
- package/lib/esm/reducers/VariantReducer.js +1 -0
- package/lib/esm/typings/errors.d.ts +51 -0
- package/lib/esm/typings/errors.js +1 -0
- package/lib/esm/typings/index.d.ts +137 -0
- package/lib/esm/typings/index.js +1 -0
- package/lib/esm/utils/PropsType.d.ts +33 -0
- package/lib/{utils → esm/utils}/PropsType.js +0 -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/{utils → esm/utils}/browserInfo.js +0 -0
- package/lib/esm/utils/checkIncludeResource.d.ts +8 -0
- package/lib/esm/utils/checkIncludeResource.js +1 -0
- package/lib/esm/utils/childrenTypes.d.ts +9 -0
- package/lib/esm/utils/childrenTypes.js +1 -0
- package/lib/esm/utils/compareObjAttribute.d.ts +7 -0
- package/lib/{utils → esm/utils}/compareObjAttribute.js +0 -0
- package/lib/esm/utils/countryStateCity.d.ts +9 -0
- package/lib/{utils → esm/utils}/countryStateCity.js +0 -0
- package/lib/esm/utils/customMessages.d.ts +2 -0
- package/lib/{utils → esm/utils}/customMessages.js +0 -0
- package/lib/esm/utils/customerOrderOptions.d.ts +3 -0
- package/lib/{utils → esm/utils}/customerOrderOptions.js +0 -0
- package/lib/esm/utils/getAmount.d.ts +9 -0
- package/lib/{utils → esm/utils}/getAmount.js +0 -0
- package/lib/esm/utils/getCardDetails.d.ts +15 -0
- package/lib/esm/utils/getCardDetails.js +1 -0
- package/lib/esm/utils/getCartLink.d.ts +7 -0
- package/lib/{utils → esm/utils}/getCartLink.js +0 -0
- package/lib/esm/utils/getCurrentItemKey.d.ts +6 -0
- package/lib/{utils → esm/utils}/getCurrentItemKey.js +0 -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 +10 -0
- package/lib/esm/utils/getLineItemsCount.js +1 -0
- package/lib/esm/utils/getLoaderComponent.d.ts +3 -0
- package/lib/{utils → esm/utils}/getLoaderComponent.js +0 -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/hooks/useExternalScript.d.ts +1 -0
- package/lib/{utils → esm/utils}/hooks/useExternalScript.js +0 -0
- package/lib/esm/utils/icons.d.ts +3 -0
- package/lib/esm/utils/icons.js +1 -0
- package/lib/esm/utils/isDate.d.ts +1 -0
- package/lib/esm/utils/isDate.js +1 -0
- package/lib/esm/utils/isEmptyStates.d.ts +1 -0
- package/lib/{utils → esm/utils}/isEmptyStates.js +0 -0
- package/lib/esm/utils/isJSON.d.ts +1 -0
- package/lib/{utils → esm/utils}/isJSON.js +0 -0
- package/lib/esm/utils/jwt.d.ts +27 -0
- package/lib/{utils → esm/utils}/jwt.js +0 -0
- package/lib/esm/utils/localStorage.d.ts +17 -0
- package/lib/{utils → esm/utils}/localStorage.js +0 -0
- package/lib/esm/utils/organization.d.ts +6 -0
- package/lib/{utils → esm/utils}/organization.js +0 -0
- package/lib/esm/utils/paypalPayment.d.ts +3 -0
- package/lib/{utils → esm/utils}/paypalPayment.js +0 -0
- package/lib/esm/utils/placeholderImages.d.ts +2 -0
- package/lib/{utils → esm/utils}/placeholderImages.js +0 -0
- package/lib/esm/utils/promisify.d.ts +1 -0
- package/lib/esm/utils/promisify.js +1 -0
- package/lib/esm/utils/scrollbarWidth.d.ts +1 -0
- package/lib/esm/utils/scrollbarWidth.js +1 -0
- package/lib/esm/utils/shipments.d.ts +3 -0
- package/lib/esm/utils/shipments.js +1 -0
- package/lib/esm/utils/validateFormFields.d.ts +22 -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 +103 -46
- package/lib/components/AddToCartButton.d.ts +0 -34
- package/lib/components/AddToCartButton.js +0 -1
- package/lib/components/Address.d.ts +0 -13
- package/lib/components/Address.js +0 -1
- package/lib/components/AddressCountrySelector.d.ts +0 -9
- package/lib/components/AddressCountrySelector.js +0 -1
- package/lib/components/AddressField.d.ts +0 -15
- package/lib/components/AddressField.js +0 -1
- package/lib/components/AddressInput.d.ts +0 -7
- package/lib/components/AddressInput.js +0 -1
- package/lib/components/AddressStateSelector.d.ts +0 -11
- package/lib/components/AddressStateSelector.js +0 -1
- package/lib/components/AddressesContainer.d.ts +0 -8
- package/lib/components/AddressesContainer.js +0 -1
- package/lib/components/AdjustmentAmount.js +0 -1
- package/lib/components/AdyenPayment.d.ts +0 -25
- package/lib/components/AdyenPayment.js +0 -1
- package/lib/components/AvailabilityContainer.d.ts +0 -7
- package/lib/components/AvailabilityContainer.js +0 -1
- package/lib/components/AvailabilityTemplate.d.ts +0 -15
- package/lib/components/AvailabilityTemplate.js +0 -1
- package/lib/components/BillingAddressContainer.d.ts +0 -6
- package/lib/components/BillingAddressContainer.js +0 -1
- package/lib/components/BillingAddressForm.d.ts +0 -8
- package/lib/components/BillingAddressForm.js +0 -1
- package/lib/components/BraintreePayment.d.ts +0 -30
- package/lib/components/BraintreePayment.js +0 -1
- package/lib/components/CartLink.js +0 -1
- package/lib/components/CheckoutComPayment.d.ts +0 -23
- package/lib/components/CheckoutComPayment.js +0 -1
- package/lib/components/CheckoutLink.d.ts +0 -13
- package/lib/components/CheckoutLink.js +0 -1
- package/lib/components/CommerceLayer.d.ts +0 -8
- package/lib/components/CommerceLayer.js +0 -1
- package/lib/components/CustomerContainer.d.ts +0 -7
- package/lib/components/CustomerContainer.js +0 -1
- package/lib/components/CustomerInput.d.ts +0 -11
- package/lib/components/CustomerInput.js +0 -1
- package/lib/components/DeliveryLeadTime.d.ts +0 -10
- package/lib/components/DeliveryLeadTime.js +0 -1
- package/lib/components/DiscountAmount.d.ts +0 -4
- package/lib/components/DiscountAmount.js +0 -1
- package/lib/components/Errors.d.ts +0 -5
- package/lib/components/Errors.js +0 -1
- package/lib/components/ExternalFunction.d.ts +0 -7
- package/lib/components/ExternalFunction.js +0 -1
- package/lib/components/GiftCard.d.ts +0 -8
- package/lib/components/GiftCard.js +0 -1
- package/lib/components/GiftCardAmount.d.ts +0 -4
- package/lib/components/GiftCardAmount.js +0 -1
- package/lib/components/GiftCardContainer.d.ts +0 -6
- package/lib/components/GiftCardContainer.js +0 -1
- package/lib/components/GiftCardCurrencySelector.d.ts +0 -7
- package/lib/components/GiftCardCurrencySelector.js +0 -1
- package/lib/components/GiftCardInput.d.ts +0 -7
- package/lib/components/GiftCardInput.js +0 -1
- package/lib/components/GiftCardOrCouponCode.d.ts +0 -17
- package/lib/components/GiftCardOrCouponCode.js +0 -1
- package/lib/components/GiftCardOrCouponForm.d.ts +0 -10
- package/lib/components/GiftCardOrCouponForm.js +0 -1
- package/lib/components/GiftCardOrCouponInput.d.ts +0 -10
- package/lib/components/GiftCardOrCouponInput.js +0 -1
- package/lib/components/GiftCardOrCouponRemoveButton.d.ts +0 -18
- package/lib/components/GiftCardOrCouponRemoveButton.js +0 -1
- package/lib/components/GiftCardOrCouponSubmit.d.ts +0 -9
- package/lib/components/GiftCardOrCouponSubmit.js +0 -1
- package/lib/components/ItemContainer.d.ts +0 -11
- package/lib/components/ItemContainer.js +0 -1
- package/lib/components/KlarnaPayment.js +0 -1
- package/lib/components/LineItem.d.ts +0 -8
- package/lib/components/LineItem.js +0 -1
- package/lib/components/LineItemAmount.d.ts +0 -7
- package/lib/components/LineItemAmount.js +0 -1
- package/lib/components/LineItemCode.d.ts +0 -12
- package/lib/components/LineItemCode.js +0 -1
- package/lib/components/LineItemImage.d.ts +0 -16
- package/lib/components/LineItemImage.js +0 -1
- package/lib/components/LineItemName.d.ts +0 -11
- package/lib/components/LineItemName.js +0 -1
- package/lib/components/LineItemOption.d.ts +0 -19
- package/lib/components/LineItemOption.js +0 -1
- package/lib/components/LineItemOptions.d.ts +0 -16
- package/lib/components/LineItemOptions.js +0 -1
- package/lib/components/LineItemQuantity.d.ts +0 -14
- package/lib/components/LineItemQuantity.js +0 -1
- package/lib/components/LineItemRemoveLink.d.ts +0 -12
- package/lib/components/LineItemRemoveLink.js +0 -1
- package/lib/components/LineItemsContainer.d.ts +0 -8
- package/lib/components/LineItemsContainer.js +0 -1
- package/lib/components/LineItemsCount.d.ts +0 -12
- package/lib/components/LineItemsCount.js +0 -1
- package/lib/components/LineItemsEmpty.d.ts +0 -23
- package/lib/components/LineItemsEmpty.js +0 -1
- package/lib/components/MetadataInput.d.ts +0 -5
- package/lib/components/MetadataInput.js +0 -1
- package/lib/components/OrderContainer.d.ts +0 -12
- package/lib/components/OrderContainer.js +0 -1
- package/lib/components/OrderNumber.d.ts +0 -5
- package/lib/components/OrderNumber.js +0 -1
- package/lib/components/OrderStorage.d.ts +0 -8
- package/lib/components/OrderStorage.js +0 -1
- package/lib/components/PaymentGateway.d.ts +0 -16
- package/lib/components/PaymentGateway.js +0 -1
- package/lib/components/PaymentMethod.d.ts +0 -16
- package/lib/components/PaymentMethod.js +0 -1
- package/lib/components/PaymentMethodAmount.d.ts +0 -4
- package/lib/components/PaymentMethodAmount.js +0 -1
- package/lib/components/PaymentMethodName.d.ts +0 -9
- package/lib/components/PaymentMethodName.js +0 -1
- package/lib/components/PaymentMethodPrice.d.ts +0 -9
- package/lib/components/PaymentMethodPrice.js +0 -1
- package/lib/components/PaymentMethodRadioButton.d.ts +0 -12
- package/lib/components/PaymentMethodRadioButton.js +0 -1
- package/lib/components/PaymentMethodsContainer.d.ts +0 -8
- package/lib/components/PaymentMethodsContainer.js +0 -1
- package/lib/components/PaymentSource.d.ts +0 -19
- package/lib/components/PaymentSource.js +0 -1
- package/lib/components/PaymentSourceBrandIcon.d.ts +0 -15
- package/lib/components/PaymentSourceBrandIcon.js +0 -1
- package/lib/components/PaymentSourceBrandName.d.ts +0 -12
- package/lib/components/PaymentSourceBrandName.js +0 -1
- package/lib/components/PaymentSourceDetail.d.ts +0 -12
- package/lib/components/PaymentSourceDetail.js +0 -1
- package/lib/components/PaymentSourceEditButton.d.ts +0 -9
- package/lib/components/PaymentSourceEditButton.js +0 -1
- package/lib/components/PaypalPayment.d.ts +0 -12
- package/lib/components/PaypalPayment.js +0 -1
- package/lib/components/PlaceOrderButton.d.ts +0 -14
- package/lib/components/PlaceOrderButton.js +0 -1
- package/lib/components/PlaceOrderContainer.d.ts +0 -8
- package/lib/components/PlaceOrderContainer.js +0 -1
- package/lib/components/Price.d.ts +0 -16
- package/lib/components/Price.js +0 -1
- package/lib/components/PricesContainer.d.ts +0 -11
- package/lib/components/PricesContainer.js +0 -1
- package/lib/components/PrivacyAndTermsCheckbox.d.ts +0 -4
- package/lib/components/PrivacyAndTermsCheckbox.js +0 -1
- package/lib/components/QuantitySelector.d.ts +0 -17
- package/lib/components/QuantitySelector.js +0 -1
- package/lib/components/SaveAddressesButton.d.ts +0 -10
- package/lib/components/SaveAddressesButton.js +0 -1
- package/lib/components/SaveCustomerButton.d.ts +0 -13
- package/lib/components/SaveCustomerButton.js +0 -1
- package/lib/components/Shipment.d.ts +0 -15
- package/lib/components/Shipment.js +0 -1
- package/lib/components/ShipmentField.d.ts +0 -12
- package/lib/components/ShipmentField.js +0 -1
- package/lib/components/ShipmentsContainer.d.ts +0 -6
- package/lib/components/ShipmentsContainer.js +0 -1
- package/lib/components/ShippingAddressContainer.d.ts +0 -6
- package/lib/components/ShippingAddressContainer.js +0 -1
- package/lib/components/ShippingAddressForm.d.ts +0 -8
- package/lib/components/ShippingAddressForm.js +0 -1
- package/lib/components/ShippingAmount.d.ts +0 -4
- package/lib/components/ShippingAmount.js +0 -1
- package/lib/components/ShippingMethod.d.ts +0 -8
- package/lib/components/ShippingMethod.js +0 -1
- package/lib/components/ShippingMethodName.d.ts +0 -11
- package/lib/components/ShippingMethodName.js +0 -1
- package/lib/components/ShippingMethodPrice.d.ts +0 -13
- package/lib/components/ShippingMethodPrice.js +0 -1
- package/lib/components/ShippingMethodRadioButton.d.ts +0 -13
- package/lib/components/ShippingMethodRadioButton.js +0 -1
- package/lib/components/SkuField.js +0 -1
- package/lib/components/SkuList.d.ts +0 -7
- package/lib/components/SkuList.js +0 -1
- package/lib/components/SkuListsContainer.d.ts +0 -6
- package/lib/components/SkuListsContainer.js +0 -1
- package/lib/components/SkuOption.d.ts +0 -7
- package/lib/components/SkuOption.js +0 -1
- package/lib/components/SkuOptionInput.d.ts +0 -5
- package/lib/components/SkuOptionInput.js +0 -1
- package/lib/components/SkuOptionsContainer.d.ts +0 -7
- package/lib/components/SkuOptionsContainer.js +0 -1
- package/lib/components/Skus.js +0 -1
- package/lib/components/SkusContainer.js +0 -1
- package/lib/components/StockTransfer.d.ts +0 -6
- package/lib/components/StockTransfer.js +0 -1
- package/lib/components/StockTransferField.d.ts +0 -10
- package/lib/components/StockTransferField.js +0 -1
- package/lib/components/StripePayment.d.ts +0 -18
- package/lib/components/StripePayment.js +0 -1
- package/lib/components/SubTotalAmount.d.ts +0 -4
- package/lib/components/SubTotalAmount.js +0 -1
- package/lib/components/SubmitButton.d.ts +0 -9
- package/lib/components/SubmitButton.js +0 -1
- package/lib/components/TaxesAmount.d.ts +0 -4
- package/lib/components/TaxesAmount.js +0 -1
- package/lib/components/TotalAmount.d.ts +0 -4
- package/lib/components/TotalAmount.js +0 -1
- package/lib/components/VariantSelector.d.ts +0 -29
- package/lib/components/VariantSelector.js +0 -1
- package/lib/components/VariantsContainer.d.ts +0 -8
- package/lib/components/VariantsContainer.js +0 -1
- package/lib/components/WireTransferPayment.d.ts +0 -10
- package/lib/components/WireTransferPayment.js +0 -1
- package/lib/components/gateways/AdyenGateway.d.ts +0 -5
- package/lib/components/gateways/AdyenGateway.js +0 -1
- package/lib/components/gateways/BraintreeGateway.d.ts +0 -5
- package/lib/components/gateways/BraintreeGateway.js +0 -1
- package/lib/components/gateways/CheckoutComGateway.d.ts +0 -5
- package/lib/components/gateways/CheckoutComGateway.js +0 -1
- package/lib/components/gateways/KlarnaGateway.d.ts +0 -5
- package/lib/components/gateways/KlarnaGateway.js +0 -1
- package/lib/components/gateways/PaypalGateway.d.ts +0 -5
- package/lib/components/gateways/PaypalGateway.js +0 -1
- package/lib/components/gateways/StripeGateway.d.ts +0 -5
- package/lib/components/gateways/StripeGateway.js +0 -1
- package/lib/components/gateways/WireTransferGateway.d.ts +0 -5
- package/lib/components/gateways/WireTransferGateway.js +0 -1
- package/lib/components/utils/AddressCardsTemplate.d.ts +0 -27
- package/lib/components/utils/AddressCardsTemplate.js +0 -1
- package/lib/components/utils/BaseField.js +0 -1
- package/lib/components/utils/BaseInput.js +0 -1
- package/lib/components/utils/BaseOrderPrice.js +0 -1
- package/lib/components/utils/BaseSelect.js +0 -1
- package/lib/components/utils/GenericFieldComponent.d.ts +0 -37
- package/lib/components/utils/GenericFieldComponent.js +0 -1
- package/lib/components/utils/Parent.js +0 -1
- package/lib/components/utils/PaymentCardsTemplate.js +0 -1
- package/lib/components/utils/PriceTemplate.js +0 -1
- package/lib/components/utils/VariantTemplate.js +0 -1
- package/lib/components/utils/getAllErrors.js +0 -1
- package/lib/config/components.d.ts +0 -914
- package/lib/config/components.js +0 -1
- package/lib/context/AddressChildrenContext.d.ts +0 -7
- package/lib/context/AddressChildrenContext.js +0 -1
- package/lib/context/BillingAddressContext.d.ts +0 -12
- package/lib/context/BillingAddressContext.js +0 -1
- package/lib/context/BillingAddressFormContext.d.ts +0 -19
- package/lib/context/CouponAndGiftCardFormContext.d.ts +0 -9
- package/lib/context/CustomerContext.d.ts +0 -16
- package/lib/context/CustomerContext.js +0 -1
- package/lib/context/ShippingAddressContext.d.ts +0 -10
- package/lib/index.d.ts +0 -103
- package/lib/index.js +0 -1
- package/lib/reducers/AddressReducer.d.ts +0 -59
- package/lib/reducers/AddressReducer.js +0 -1
- package/lib/reducers/AvailabilityReducer.js +0 -1
- package/lib/reducers/BillingAddressReducer.js +0 -1
- package/lib/reducers/CustomerReducer.d.ts +0 -50
- package/lib/reducers/CustomerReducer.js +0 -1
- package/lib/reducers/GiftCardReducer.js +0 -1
- package/lib/reducers/LineItemReducer.js +0 -1
- package/lib/reducers/OrderReducer.d.ts +0 -147
- package/lib/reducers/OrderReducer.js +0 -1
- package/lib/reducers/PaymentMethodReducer.js +0 -1
- package/lib/reducers/PlaceOrderReducer.js +0 -1
- package/lib/reducers/PriceReducer.js +0 -1
- package/lib/reducers/ShippingAddressReducer.js +0 -1
- package/lib/reducers/SkuReducer.js +0 -1
- package/lib/reducers/VariantReducer.js +0 -1
- package/lib/typings/errors.d.ts +0 -42
- package/lib/typings/errors.js +0 -1
- package/lib/typings/index.d.ts +0 -137
- package/lib/typings/index.js +0 -1
- package/lib/utils/addressesManager.d.ts +0 -28
- package/lib/utils/addressesManager.js +0 -1
- package/lib/utils/baseReducer.js +0 -1
- package/lib/utils/checkIncludeResource.js +0 -1
- package/lib/utils/childrenTypes.js +0 -1
- package/lib/utils/getCardDetails.js +0 -1
- package/lib/utils/getErrors.js +0 -1
- package/lib/utils/getLineItemsCount.js +0 -1
- package/lib/utils/getPrices.js +0 -1
- package/lib/utils/getSdk.js +0 -1
- package/lib/utils/getSkus.js +0 -1
- package/lib/utils/jwt.d.ts +0 -27
- package/lib/utils/promisify.js +0 -1
- package/lib/utils/shipments.js +0 -1
- package/lib/utils/validateFormFields.js +0 -1
package/lib/config/components.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import PropTypes from"prop-types";import childrenTypes from"../utils/childrenTypes";import{baseOrderComponentPricePropTypes,PTLoader,BMObject}from"../typings/index";import{ErrorPropTypes}from"../typings/errors";import{BaseInputComponentPropTypes}from"../typings/index";const components={Address:{permittedChildren:["AddressField","ReactNode"],displayName:"Address",propTypes:{children:childrenTypes.isRequired}},AddressCountrySelector:{displayName:"AddressCountrySelector",propTypes:{children:PropTypes.func,placeholder:PropTypes.shape({label:PropTypes.string.isRequired,value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]).isRequired}),value:PropTypes.string,name:PropTypes.oneOf(["billing_address_country_code","shipping_address_country_code"]).isRequired,required:PropTypes.bool},defaultProps:{required:!0}},AddressStateSelector:{displayName:"AddressStateSelector",propTypes:{children:PropTypes.func,placeholder:PropTypes.shape({label:PropTypes.string.isRequired,value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]).isRequired}),value:PropTypes.string,name:PropTypes.oneOf(["billing_address_state_code","shipping_address_state_code"]).isRequired,required:PropTypes.bool},defaultProps:{required:!0}},AddressField:{displayName:"AddressField",propTypes:{children:PropTypes.func}},AddressInput:{displayName:"AddressInput",propTypes:{children:PropTypes.func,name:PropTypes.oneOf(["billing_address_city","billing_address_company","billing_address_email","billing_address_first_name","billing_address_last_name","billing_address_line_1","billing_address_line_2","billing_address_phone","billing_address_state_code","billing_address_zip_code","billing_address_billing_info","billing_address_save_to_customer_book","shipping_address_city","shipping_address_company","shipping_address_email","shipping_address_first_name","shipping_address_last_name","shipping_address_line_1","shipping_address_line_2","shipping_address_phone","shipping_address_state_code","shipping_address_zip_code","shipping_address_save_to_customer_book"]).isRequired,type:PropTypes.oneOf(["checkbox","date","email","number","tel","text","textarea"]).isRequired,placeholder:PropTypes.string,disabled:PropTypes.bool,required:PropTypes.bool},defaultProps:{required:!0}},AdjustmentAmount:{displayName:"AdjustmentAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},AddToCartButton:{displayName:"AddToCartButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element]),skuCode:PropTypes.string,disabled:PropTypes.bool,buyNowMode:PropTypes.bool,checkoutUrl:PropTypes.string,lineItem:PropTypes.shape({name:PropTypes.string.isRequired,imageUrl:PropTypes.string})},defaultProps:{label:"Add to cart"}},AddressesContainer:{displayName:"AddressesContainer",permittedChildren:["BillingAddressForm","BillingAddressContainer","ShippingAddressForm","ShippingAddressContainer","SaveAddressesButton","ReactNode"],propTypes:{children:childrenTypes.isRequired,shipToDifferentAddress:PropTypes.bool}},AvailabilityContainer:{displayName:"AvailabilityContainer",permittedChildren:["AvailabilityTemplate","ReactNode"],propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string}},AvailabilityTemplate:{displayName:"AvailabilityTemplate",propTypes:{timeFormat:PropTypes.oneOf(["days","hours"]),showShippingMethodName:PropTypes.bool,children:PropTypes.func},defaultProps:{timeFormat:"days",showShippingMethodName:!1}},BillingAddressContainer:{permittedChildren:["Address","ReactNode"],propTypes:{children:childrenTypes.isRequired}},BillingAddressForm:{permittedChildren:["AddressInput","ReactNode","Errors"],propTypes:{children:childrenTypes.isRequired}},CheckoutLink:{displayName:"CheckoutLink",propTypes:{children:PropTypes.func,label:PropTypes.string},defaultProps:{label:"Checkout"}},CommerceLayer:{permittedChildren:["OrderContainer","OrderStorage","PricesContainer","GiftCardContainer","ReactNode"],propTypes:{children:childrenTypes.isRequired,accessToken:PropTypes.string.isRequired,endpoint:PropTypes.string.isRequired}},CustomerContainer:{displayName:"CustomerContainer",permittedChildren:["CustomerInput","SaveCustomerButton","AddressesContainer","PaymentMethodsContainer","ShipmentsContainer","ReactNode"],propTypes:{children:childrenTypes.isRequired,isGuest:PropTypes.bool}},CustomerInput:{displayName:"CustomerInput",propTypes:{children:PropTypes.func,name:PropTypes.oneOf(["customerEmail"]),type:PropTypes.oneOf(["email"]),placeholder:PropTypes.string,disabled:PropTypes.bool,required:PropTypes.bool,saveOnBlur:PropTypes.bool},defaultProps:{required:!0}},DeliveryLeadTime:{displayName:"DeliveryLeadTime",propTypes:{type:PropTypes.oneOf(["max_days","max_hours","min_days","min_hours"]).isRequired,children:PropTypes.func}},DiscountAmount:{displayName:"DiscountAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},Errors:{displayName:"Errors",propTypes:ErrorPropTypes,defaultProps:{messages:[],field:"base"}},ExternalFunction:{displayName:"ExternalFunction",permittedChildren:["AddToCartButton","ReactNode"],propTypes:{children:childrenTypes.isRequired,url:PropTypes.string.isRequired}},GiftCard:{permittedChildren:["GiftCardCurrencySelector","GiftCardInput","Errors","MetadataInput","SubmitButton","ReactNode"],displayName:"GiftCard",propTypes:{children:childrenTypes.isRequired,onSubmit:PropTypes.func},defaultProps:{onSubmit:void 0}},GiftCardAmount:{displayName:"GiftCardAmount",propTypes:baseOrderComponentPricePropTypes},GiftCardContainer:{permittedChildren:["GiftCard","Errors","ReactNode"],displayName:"GiftCardContainer",propTypes:{children:childrenTypes.isRequired}},GiftCardCurrencySelector:{displayName:"GiftCardCurrencySelector",propTypes:{children:PropTypes.func,placeholder:PropTypes.shape({value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]).isRequired,label:PropTypes.string.isRequired}),value:PropTypes.string,required:PropTypes.bool},defaultProps:{required:!0}},GiftCardInput:{displayName:"GiftCardInput",propTypes:{type:PropTypes.oneOf(["text","email","number","date","checkbox"]).isRequired,name:PropTypes.oneOf(["balanceCents","balanceMaxCents","singleUse","rechargeable","imageUrl","expiresAt","referenceOrigin","email","firstName","lastName","reference"]).isRequired,children:PropTypes.func,placeholder:PropTypes.string}},GiftCardOrCouponForm:{permittedChildren:["GiftCardOrCouponInput","GiftCardOrCouponSubmit","ReactNode"],propTypes:{children:childrenTypes.isRequired}},GiftCardOrCouponInput:{displayName:"GiftCardOrCouponInput",propTypes:{children:PropTypes.func,placeholder:PropTypes.string,disabled:PropTypes.bool,required:PropTypes.bool}},GiftCardOrCouponSubmit:{displayName:"GiftCardOrCouponSubmit",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.object])}},GiftCardOrCouponCode:{displayName:"GiftCardOrCouponCode",propTypes:{children:PropTypes.func,type:PropTypes.oneOf(["coupon","gift_card"])}},GiftCardOrCouponRemoveButton:{displayName:"GiftCardOrCouponRemoveButton",propTypes:{children:PropTypes.func,type:PropTypes.oneOf(["coupon","gift_card"]),label:PropTypes.oneOfType([PropTypes.string,PropTypes.object])}},ItemContainer:{permittedChildren:["PricesContainer","VariantsContainer","SkuOptionContainer","QuantitySelector","AddToCartButton","AvailabilityContainer","SkuListsContainer","ReactNode"],displayName:"ItemContainer",propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string,lineItem:PropTypes.shape({name:PropTypes.string.isRequired,imageUrl:PropTypes.string})}},LineItem:{permittedChildren:["AvailabilityContainer","LineItemImage","LineItemName","LineItemOptions","LineItemQuantity","LineItemAmount","LineItemRemoveLink","StockTransfer","Errors","ReactNode"],displayName:"LineItem",propTypes:{children:childrenTypes.isRequired,type:PropTypes.oneOf(["skus","gift_cards","shipments","payment_methods","promotions","adjustments","bundles"])},defaultProps:{type:"skus"}},LineItemAmount:{displayName:"LineItemAmount",propTypes:Object.assign(Object.assign({},baseOrderComponentPricePropTypes),{type:PropTypes.oneOf(["total","unit","option"])}),defaultProps:{format:"formatted",type:"total"}},LineItemImage:{displayName:"LineItemImage",propTypes:{width:PropTypes.number,children:PropTypes.func}},LineItemName:{displayName:"LineItemName",propTypes:{children:PropTypes.func}},LineItemCode:{displayName:"LineItemCode",propTypes:{children:PropTypes.func}},LineItemOption:{displayName:"LineItemOption",propTypes:{name:PropTypes.string,children:PropTypes.func,valueClassName:PropTypes.string,className:PropTypes.string,id:PropTypes.string,style:PropTypes.object}},LineItemOptions:{permittedChildren:["LineItemOption","ReactNode"],displayName:"LineItemOptions",propTypes:{children:childrenTypes.isRequired,title:PropTypes.string,showName:PropTypes.bool,skuOptionId:PropTypes.string}},LineItemQuantity:{displayName:"LineItemQuantity",propTypes:{children:PropTypes.func,max:PropTypes.number,disabled:PropTypes.bool,readonly:PropTypes.bool},defaultProps:{max:50}},LineItemRemoveLink:{displayName:"LineItemRemoveLink",propTypes:{children:PropTypes.func,label:PropTypes.string},defaultProps:{label:"Remove"}},LineItemsContainer:{permittedChildren:["LineItemsCount","LineItemsEmpty","LineItem","ReactNode"],displayName:"LineItemsContainer",propTypes:{children:childrenTypes.isRequired,filters:PropTypes.object,loader:PTLoader},defaultProps:{filters:{},loader:"Loading..."}},LineItemsCount:{displayName:"LineItemsCount",propTypes:{children:PropTypes.func,id:PropTypes.string,className:PropTypes.string,name:PropTypes.string,style:PropTypes.object}},LineItemsEmpty:{displayName:"LineItemsEmpty",propTypes:{children:PropTypes.func,id:PropTypes.string,className:PropTypes.string,name:PropTypes.string,style:PropTypes.object,text:PropTypes.string}},MetadataInput:{displayName:"MetadataInput",propTypes:BaseInputComponentPropTypes},OrderContainer:{permittedChildren:["AddressesContainer","CustomerContainer","ItemContainer","LineItemsContainer","SubTotalAmount","DiscountAmount","AdjustmentAmount","ShippingAmount","TaxesAmount","GiftCardAmount","TotalAmount","CheckoutLink","GiftCardContainer","ShipmentsContainer","PaymentMethodsContainer","PaymentMethodAmount","GiftCardOrCouponForm","GiftCardOrCouponCode","GiftCardOrCouponRemoveButton","Errors","OrderNumber","ReactNode"],displayName:"OrderContainer",propTypes:{children:childrenTypes.isRequired,orderId:PropTypes.string,metadata:BMObject,attributes:PropTypes.object},defaultProps:{metadata:{}}},OrderNumber:{displayName:"OrderNumber",propTypes:{className:PropTypes.string},defaultProps:{format:"formatted"}},OrderStorage:{permittedChildren:["OrderContainer","ReactNode"],displayName:"OrderStorage",propTypes:{children:childrenTypes.isRequired,clearWhenPlaced:PropTypes.bool,persistKey:PropTypes.string.isRequired}},PaymentMethod:{permittedChildren:["PaymentMethodName","PaymentMethodRadioButton","PaymentMethodPrice","PaymentSource","ReactNode","Errors"],displayName:"PaymentMethod",propTypes:{children:childrenTypes.isRequired}},PaymentMethodAmount:{displayName:"PaymentMethodAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},PaymentMethodName:{displayName:"PaymentMethodName",propTypes:{children:PropTypes.func}},PaymentMethodPrice:{displayName:"PaymentMethodPrice",propTypes:Object.assign(Object.assign({},baseOrderComponentPricePropTypes),{type:PropTypes.oneOf(["amount"])})},PaymentMethodRadioButton:{displayName:"PaymentMethodRadioButton",propTypes:{children:PropTypes.func}},PaymentMethodsContainer:{displayName:"PaymentMethodsContainer",permittedChildren:["PaymentSource","ReactNode","PlaceOrderContainer"],propTypes:{children:childrenTypes.isRequired}},PaymentSource:{displayName:"PaymentSource",permittedChildren:["PaymentSourceBrandIcon","PaymentSourceBrandName","PaymentSourceEditButton","PaymentSourceDetail","ReactNode"],propTypes:{children:childrenTypes,readonly:PropTypes.bool}},PaymentSourceBrandIcon:{displayName:"PaymentSourceBrandIcon",propTypes:{children:PropTypes.func,width:PropTypes.number,height:PropTypes.number,src:PropTypes.string,className:PropTypes.string}},PaymentSourceBrandName:{displayName:"PaymentSourceBrandName",propTypes:{children:PropTypes.func,label:PropTypes.string}},PaymentSourceEditButton:{displayName:"PaymentSourceEditButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element])}},PaymentSourceDetail:{displayName:"PaymentSourceDetail",propTypes:{type:PropTypes.oneOf(["last4","exp_year","exp_month"]).isRequired}},PlaceOrderButton:{displayName:"PlaceOrderButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element])},defaultProps:{label:"Place order"}},PlaceOrderContainer:{displayName:"PlaceOrderContainer",permittedChildren:["PaymentMethod","PlaceOrderButton","PrivacyAndTermsCheckbox","ReactNode"],propTypes:{children:childrenTypes.isRequired}},Price:{displayName:"Price",propTypes:{children:PropTypes.func,compareClassName:PropTypes.string,skuCode:PropTypes.string,showCompare:PropTypes.bool},defaultProps:{skuCode:""}},PricesContainer:{permittedChildren:["Price","AvailabilityContainer","ReactNode"],displayName:"PricesContainer",propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string,loader:PTLoader,perPage:PropTypes.number,filters:PropTypes.object},defaultProps:{perPage:10,filters:{},loader:"Loading...",skuCode:""}},PrivacyAndTermsCheckbox:{displayName:"PrivacyAndTermsCheckbox",propTypes:{children:PropTypes.func}},QuantitySelector:{displayName:"QuantitySelector",propTypes:{children:PropTypes.func,min:PropTypes.number,max:PropTypes.number,value:PropTypes.string,skuCode:PropTypes.string,disabled:PropTypes.bool},defaultProps:{min:1}},SaveAddressesButton:{displayName:"SaveAddressesButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element]),onClick:PropTypes.func,disabled:PropTypes.bool},defaultProps:{label:"Continue to delivery"}},Shipment:{permittedChildren:["LineItemsContainer","LineItem","ShippingMethod","ReactNode"],displayName:"Shipment",propTypes:{children:childrenTypes.isRequired}},ShipmentField:{displayName:"ShipmentField",propTypes:{children:PropTypes.func,name:PropTypes.oneOf(["cost_amount_cents","cost_amount_float","currency_code","formatted_cost_amount","number","status","key_number"]).isRequired}},ShipmentsContainer:{displayName:"ShipmentsContainer",permittedChildren:["Shipment","ReactNode","Errors"],propTypes:{children:childrenTypes.isRequired}},ShippingAddressContainer:{permittedChildren:["Address","ReactNode"],propTypes:{children:childrenTypes.isRequired}},SaveCustomerButton:{displayName:"SaveCustomerButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element]),onClick:PropTypes.func},defaultProps:{label:"Save"}},ShippingAddressForm:{permittedChildren:["AddressInput","ReactNode"],propTypes:{children:childrenTypes.isRequired}},ShippingAmount:{displayName:"ShippingAmount",propTypes:baseOrderComponentPricePropTypes},ShippingMethod:{permittedChildren:["ShippingMethodName","ShippingMethodPrice","ShippingMethodRadioButton","DeliveryLeadTime","ReactNode"],displayName:"ShippingMethod",propTypes:{children:childrenTypes.isRequired,readonly:PropTypes.bool}},ShippingMethodName:{displayName:"ShippingMethodName",propTypes:{children:PropTypes.func}},ShippingMethodRadioButton:{displayName:"ShippingMethodRadioButton",propTypes:{children:PropTypes.func}},ShippingMethodPrice:{displayName:"ShippingMethodPrice",propTypes:Object.assign(Object.assign({},baseOrderComponentPricePropTypes),{type:PropTypes.oneOf(["amount"])}),defaultProps:{format:"formatted",type:"amount"}},SkusContainer:{displayName:"SkuContainer",permittedChildren:["Skus","ItemContainer","ReactNode"],propTypes:{children:childrenTypes.isRequired}},Skus:{displayName:"Skus",permittedChildren:["AvailabilityTemplate","SkuField","AddToCartButton","QuantitySelector","Price","ReactNode"],propTypes:{children:childrenTypes.isRequired}},SkuField:{displayName:"SkuField",propTypes:{children:PropTypes.func,attribute:PropTypes.string,tagElement:PropTypes.string}},SkuList:{permittedChildren:["AddToCartButton","QuantitySelector","ReactNode"],displayName:"SkuList",propTypes:{children:childrenTypes.isRequired,id:PropTypes.string.isRequired}},SkuListsContainer:{permittedChildren:["SkuList","ReactNode"],displayName:"SkuListsContainer",propTypes:{children:childrenTypes.isRequired}},SkuOption:{permittedChildren:["SkuOptionInput","ReactNode"],displayName:"SkuOption",propTypes:{children:childrenTypes.isRequired,id:PropTypes.string.isRequired}},SkuOptionInput:{displayName:"SkuOptionInput",propTypes:BaseInputComponentPropTypes},SkuOptionsContainer:{permittedChildren:["SkuOption","ReactNode"],displayName:"SkuOptionsContainer",propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string}},StockTransfer:{permittedChildren:["StockTransferField","ReactNode"],displayName:"StockTransfer",propTypes:{children:childrenTypes.isRequired}},StockTransferField:{displayName:"StockTransferField",propTypes:{children:PropTypes.func}},SubmitButton:{displayName:"SubmitButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element])},defaultProps:{label:"Submit"}},SubTotalAmount:{displayName:"SubTotalAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},TaxesAmount:{displayName:"TaxesAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},TotalAmount:{displayName:"TotalAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},VariantsContainer:{permittedChildren:["VariantSelector","ReactNode"],displayName:"VariantsContainer",propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string,filters:PropTypes.object},defaultProps:{skuCode:"",filters:{}}},VariantSelector:{displayName:"VariantSelector",propTypes:{options:PropTypes.arrayOf(PropTypes.shape({label:PropTypes.string.isRequired,code:PropTypes.string.isRequired,lineItem:PropTypes.shape({name:PropTypes.string.isRequired,imageUrl:PropTypes.string})}).isRequired).isRequired,name:PropTypes.string,children:PropTypes.func,type:PropTypes.oneOf(["select","radio"]),loader:PropTypes.element,placeholder:PropTypes.string,skuCode:PropTypes.string},defaultProps:{placeholder:"Select a variant",type:"select"}}};export default components;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Address } from '@commercelayer/sdk';
|
|
3
|
-
export interface InitialAddressContext {
|
|
4
|
-
address: Address | Record<string, any>;
|
|
5
|
-
}
|
|
6
|
-
declare const AddressChildrenContext: import("react").Context<InitialAddressContext>;
|
|
7
|
-
export default AddressChildrenContext;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createContext}from"react";const initial={address:{}},AddressChildrenContext=createContext(initial);export default AddressChildrenContext;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { BillingAddressState } from '../reducers/BillingAddressReducer';
|
|
3
|
-
declare type DefaultContext = {
|
|
4
|
-
setBillingAddress?: (id: string, options?: {
|
|
5
|
-
customerAddressId: string;
|
|
6
|
-
}) => void;
|
|
7
|
-
} & BillingAddressState;
|
|
8
|
-
export declare const defaultBillingAddressContext: {
|
|
9
|
-
setBillingAddress: () => void;
|
|
10
|
-
};
|
|
11
|
-
declare const BillingAddressContext: import("react").Context<DefaultContext>;
|
|
12
|
-
export default BillingAddressContext;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createContext}from"react";export const defaultBillingAddressContext={setBillingAddress:()=>{}};const BillingAddressContext=createContext(defaultBillingAddressContext);export default BillingAddressContext;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
import { AddressCountrySelectName, AddressInputName } from '../typings/index';
|
|
3
|
-
import { AddressField } from '../reducers/AddressReducer';
|
|
4
|
-
export declare type DefaultContextAddress = {
|
|
5
|
-
validation?: () => RefObject<any>;
|
|
6
|
-
setValue?: (name: AddressField | AddressInputName | AddressCountrySelectName, value: any) => void;
|
|
7
|
-
errors?: Record<string, {
|
|
8
|
-
code: string;
|
|
9
|
-
message: string;
|
|
10
|
-
error: boolean;
|
|
11
|
-
}>[];
|
|
12
|
-
errorClassName?: string;
|
|
13
|
-
requiresBillingInfo?: boolean;
|
|
14
|
-
resetField?: (name: string) => void;
|
|
15
|
-
values?: Record<string, any>;
|
|
16
|
-
isBusiness?: boolean;
|
|
17
|
-
};
|
|
18
|
-
declare const BillingAddressFormContext: import("react").Context<DefaultContextAddress>;
|
|
19
|
-
export default BillingAddressFormContext;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { OrderCodeType } from '../reducers/OrderReducer';
|
|
2
|
-
import { RefObject } from 'react';
|
|
3
|
-
declare type DefaultContext = {
|
|
4
|
-
validation?: () => RefObject<any>;
|
|
5
|
-
setValue?: (name: string, value: string) => void;
|
|
6
|
-
codeType?: OrderCodeType;
|
|
7
|
-
};
|
|
8
|
-
declare const CouponAndGiftCardFormContext: import("react").Context<DefaultContext>;
|
|
9
|
-
export default CouponAndGiftCardFormContext;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { SetCustomerEmail, SetCustomerErrors, CustomerState } from '../reducers/CustomerReducer';
|
|
3
|
-
declare type DefaultContext = {
|
|
4
|
-
saveCustomerUser: (customerEmail: string) => Promise<void>;
|
|
5
|
-
setCustomerErrors: SetCustomerErrors;
|
|
6
|
-
setCustomerEmail: SetCustomerEmail;
|
|
7
|
-
getCustomerPaymentSources: () => Promise<void>;
|
|
8
|
-
} & Partial<CustomerState>;
|
|
9
|
-
export declare const defaultCustomerContext: {
|
|
10
|
-
saveCustomerUser: () => Promise<void>;
|
|
11
|
-
getCustomerPaymentSources: () => Promise<void>;
|
|
12
|
-
setCustomerErrors: SetCustomerErrors;
|
|
13
|
-
setCustomerEmail: SetCustomerEmail;
|
|
14
|
-
};
|
|
15
|
-
declare const CustomerContext: import("react").Context<DefaultContext>;
|
|
16
|
-
export default CustomerContext;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{setCustomerErrors,setCustomerEmail}from"../reducers/CustomerReducer";import{createContext}from"react";export const defaultCustomerContext={saveCustomerUser:async()=>{},getCustomerPaymentSources:async()=>{},setCustomerErrors,setCustomerEmail};const CustomerContext=createContext(defaultCustomerContext);export default CustomerContext;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ShippingAddressState } from '../reducers/ShippingAddressReducer';
|
|
3
|
-
declare type DefaultContext = {
|
|
4
|
-
setShippingAddress?: (id: string, options?: {
|
|
5
|
-
customerAddressId: string;
|
|
6
|
-
}) => void;
|
|
7
|
-
} & ShippingAddressState;
|
|
8
|
-
export declare const defaultShippingAddressContext: {};
|
|
9
|
-
declare const ShippingAddressContext: import("react").Context<DefaultContext>;
|
|
10
|
-
export default ShippingAddressContext;
|
package/lib/index.d.ts
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
export { default as AddToCartButton } from './components/AddToCartButton';
|
|
2
|
-
export { default as Address } from './components/Address';
|
|
3
|
-
export { default as AddressCountrySelector } from './components/AddressCountrySelector';
|
|
4
|
-
export { default as AddressField } from './components/AddressField';
|
|
5
|
-
export { default as AddressInput } from './components/AddressInput';
|
|
6
|
-
export { default as AddressStateSelector } from './components/AddressStateSelector';
|
|
7
|
-
export { default as AddressesContainer } from './components/AddressesContainer';
|
|
8
|
-
export { default as AdjustmentAmount } from './components/AdjustmentAmount';
|
|
9
|
-
export { default as AvailabilityContainer } from './components/AvailabilityContainer';
|
|
10
|
-
export { default as AvailabilityTemplate } from './components/AvailabilityTemplate';
|
|
11
|
-
export { default as BillingAddressContainer } from './components/BillingAddressContainer';
|
|
12
|
-
export { default as BillingAddressForm } from './components/BillingAddressForm';
|
|
13
|
-
export { default as CartLink } from './components/CartLink';
|
|
14
|
-
export { default as CheckoutLink } from './components/CheckoutLink';
|
|
15
|
-
export { default as CommerceLayer } from './components/CommerceLayer';
|
|
16
|
-
export { default as CustomerContainer } from './components/CustomerContainer';
|
|
17
|
-
export { default as CustomerInput } from './components/CustomerInput';
|
|
18
|
-
export { default as DeliveryLeadTime } from './components/DeliveryLeadTime';
|
|
19
|
-
export { default as DiscountAmount } from './components/DiscountAmount';
|
|
20
|
-
export { default as Errors } from './components/Errors';
|
|
21
|
-
export { default as ExternalFunction } from './components/ExternalFunction';
|
|
22
|
-
export { default as GiftCard } from './components/GiftCard';
|
|
23
|
-
export { default as GiftCardAmount } from './components/GiftCardAmount';
|
|
24
|
-
export { default as GiftCardContainer } from './components/GiftCardContainer';
|
|
25
|
-
export { default as GiftCardCurrencySelector } from './components/GiftCardCurrencySelector';
|
|
26
|
-
export { default as GiftCardInput } from './components/GiftCardInput';
|
|
27
|
-
export { default as GiftCardOrCouponCode } from './components/GiftCardOrCouponCode';
|
|
28
|
-
export { default as GiftCardOrCouponForm } from './components/GiftCardOrCouponForm';
|
|
29
|
-
export { default as GiftCardOrCouponInput } from './components/GiftCardOrCouponInput';
|
|
30
|
-
export { default as GiftCardOrCouponRemoveButton } from './components/GiftCardOrCouponRemoveButton';
|
|
31
|
-
export { default as GiftCardOrCouponSubmit } from './components/GiftCardOrCouponSubmit';
|
|
32
|
-
export { default as ItemContainer } from './components/ItemContainer';
|
|
33
|
-
export { default as LineItem } from './components/LineItem';
|
|
34
|
-
export { default as LineItemAmount } from './components/LineItemAmount';
|
|
35
|
-
export { default as LineItemCode } from './components/LineItemCode';
|
|
36
|
-
export { default as LineItemImage } from './components/LineItemImage';
|
|
37
|
-
export { default as LineItemName } from './components/LineItemName';
|
|
38
|
-
export { default as LineItemOption } from './components/LineItemOption';
|
|
39
|
-
export { default as LineItemOptions } from './components/LineItemOptions';
|
|
40
|
-
export { default as LineItemQuantity } from './components/LineItemQuantity';
|
|
41
|
-
export { default as LineItemRemoveLink } from './components/LineItemRemoveLink';
|
|
42
|
-
export { default as LineItemsContainer } from './components/LineItemsContainer';
|
|
43
|
-
export { default as LineItemsCount } from './components/LineItemsCount';
|
|
44
|
-
export { default as LineItemsEmpty } from './components/LineItemsEmpty';
|
|
45
|
-
export { default as MetadataInput } from './components/MetadataInput';
|
|
46
|
-
export { default as OrderContainer } from './components/OrderContainer';
|
|
47
|
-
export { default as OrderNumber } from './components/OrderNumber';
|
|
48
|
-
export { default as OrderStorage } from './components/OrderStorage';
|
|
49
|
-
export { default as PaymentMethod } from './components/PaymentMethod';
|
|
50
|
-
export { default as PaymentMethodAmount } from './components/PaymentMethodAmount';
|
|
51
|
-
export { default as PaymentMethodName } from './components/PaymentMethodName';
|
|
52
|
-
export { default as PaymentMethodPrice } from './components/PaymentMethodPrice';
|
|
53
|
-
export { default as PaymentMethodRadioButton } from './components/PaymentMethodRadioButton';
|
|
54
|
-
export { default as PaymentMethodsContainer } from './components/PaymentMethodsContainer';
|
|
55
|
-
export { default as PaymentSource } from './components/PaymentSource';
|
|
56
|
-
export { default as PaymentSourceBrandIcon } from './components/PaymentSourceBrandIcon';
|
|
57
|
-
export { default as PaymentSourceBrandName } from './components/PaymentSourceBrandName';
|
|
58
|
-
export { default as PaymentSourceDetail } from './components/PaymentSourceDetail';
|
|
59
|
-
export { default as PaymentSourceEditButton } from './components/PaymentSourceEditButton';
|
|
60
|
-
export { default as PlaceOrderButton } from './components/PlaceOrderButton';
|
|
61
|
-
export { default as PlaceOrderContainer } from './components/PlaceOrderContainer';
|
|
62
|
-
export { default as Price } from './components/Price';
|
|
63
|
-
export { default as PricesContainer } from './components/PricesContainer';
|
|
64
|
-
export { default as PrivacyAndTermsCheckbox } from './components/PrivacyAndTermsCheckbox';
|
|
65
|
-
export { default as QuantitySelector } from './components/QuantitySelector';
|
|
66
|
-
export { default as SaveAddressesButton } from './components/SaveAddressesButton';
|
|
67
|
-
export { default as SaveCustomerButton } from './components/SaveCustomerButton';
|
|
68
|
-
export { default as Shipment } from './components/Shipment';
|
|
69
|
-
export { default as ShipmentField } from './components/ShipmentField';
|
|
70
|
-
export { default as ShipmentsContainer } from './components/ShipmentsContainer';
|
|
71
|
-
export { default as ShippingAddressContainer } from './components/ShippingAddressContainer';
|
|
72
|
-
export { default as ShippingAddressForm } from './components/ShippingAddressForm';
|
|
73
|
-
export { default as ShippingAmount } from './components/ShippingAmount';
|
|
74
|
-
export { default as ShippingMethod } from './components/ShippingMethod';
|
|
75
|
-
export { default as ShippingMethodName } from './components/ShippingMethodName';
|
|
76
|
-
export { default as ShippingMethodPrice } from './components/ShippingMethodPrice';
|
|
77
|
-
export { default as ShippingMethodRadioButton } from './components/ShippingMethodRadioButton';
|
|
78
|
-
export { default as SkuField } from './components/SkuField';
|
|
79
|
-
export { default as SkuList } from './components/SkuList';
|
|
80
|
-
export { default as SkuListsContainer } from './components/SkuListsContainer';
|
|
81
|
-
export { default as SkuOption } from './components/SkuOption';
|
|
82
|
-
export { default as SkuOptionInput } from './components/SkuOptionInput';
|
|
83
|
-
export { default as SkuOptionsContainer } from './components/SkuOptionsContainer';
|
|
84
|
-
export { default as Skus } from './components/Skus';
|
|
85
|
-
export { default as SkusContainer } from './components/SkusContainer';
|
|
86
|
-
export { default as StockTransfer } from './components/StockTransfer';
|
|
87
|
-
export { default as StockTransferField } from './components/StockTransferField';
|
|
88
|
-
export { default as SubTotalAmount } from './components/SubTotalAmount';
|
|
89
|
-
export { default as SubmitButton } from './components/SubmitButton';
|
|
90
|
-
export { default as TaxesAmount } from './components/TaxesAmount';
|
|
91
|
-
export { default as TotalAmount } from './components/TotalAmount';
|
|
92
|
-
export { default as VariantSelector } from './components/VariantSelector';
|
|
93
|
-
export { default as VariantsContainer } from './components/VariantsContainer';
|
|
94
|
-
export type { CustomerCardsType } from './components/utils/PaymentCardsTemplate';
|
|
95
|
-
export type { AddressCardsType } from './components/utils/AddressCardsTemplate';
|
|
96
|
-
export type { AddToCartButtonType } from './components/AddToCartButton';
|
|
97
|
-
export type { ShippingMethodRadioButtonType, ShippingMethodRadioButtonOnChangeType, } from './components/ShippingMethodRadioButton';
|
|
98
|
-
export type { LineItemCodeType } from './components/LineItemCode';
|
|
99
|
-
export type { LineItemNameType } from './components/LineItemName';
|
|
100
|
-
export type { LineItemImageType } from './components/LineItemImage';
|
|
101
|
-
export type { LineItemType } from './typings/index';
|
|
102
|
-
export type { ErrorComponentProps, ResourceErrorType } from './typings/errors';
|
|
103
|
-
export type { AddressCountrySelectName, AddressInputName, AddressStateSelectName, BaseInputType, } from './typings/index';
|
package/lib/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{default as AddToCartButton}from"./components/AddToCartButton";export{default as Address}from"./components/Address";export{default as AddressCountrySelector}from"./components/AddressCountrySelector";export{default as AddressField}from"./components/AddressField";export{default as AddressInput}from"./components/AddressInput";export{default as AddressStateSelector}from"./components/AddressStateSelector";export{default as AddressesContainer}from"./components/AddressesContainer";export{default as AdjustmentAmount}from"./components/AdjustmentAmount";export{default as AvailabilityContainer}from"./components/AvailabilityContainer";export{default as AvailabilityTemplate}from"./components/AvailabilityTemplate";export{default as BillingAddressContainer}from"./components/BillingAddressContainer";export{default as BillingAddressForm}from"./components/BillingAddressForm";export{default as CartLink}from"./components/CartLink";export{default as CheckoutLink}from"./components/CheckoutLink";export{default as CommerceLayer}from"./components/CommerceLayer";export{default as CustomerContainer}from"./components/CustomerContainer";export{default as CustomerInput}from"./components/CustomerInput";export{default as DeliveryLeadTime}from"./components/DeliveryLeadTime";export{default as DiscountAmount}from"./components/DiscountAmount";export{default as Errors}from"./components/Errors";export{default as ExternalFunction}from"./components/ExternalFunction";export{default as GiftCard}from"./components/GiftCard";export{default as GiftCardAmount}from"./components/GiftCardAmount";export{default as GiftCardContainer}from"./components/GiftCardContainer";export{default as GiftCardCurrencySelector}from"./components/GiftCardCurrencySelector";export{default as GiftCardInput}from"./components/GiftCardInput";export{default as GiftCardOrCouponCode}from"./components/GiftCardOrCouponCode";export{default as GiftCardOrCouponForm}from"./components/GiftCardOrCouponForm";export{default as GiftCardOrCouponInput}from"./components/GiftCardOrCouponInput";export{default as GiftCardOrCouponRemoveButton}from"./components/GiftCardOrCouponRemoveButton";export{default as GiftCardOrCouponSubmit}from"./components/GiftCardOrCouponSubmit";export{default as ItemContainer}from"./components/ItemContainer";export{default as LineItem}from"./components/LineItem";export{default as LineItemAmount}from"./components/LineItemAmount";export{default as LineItemCode}from"./components/LineItemCode";export{default as LineItemImage}from"./components/LineItemImage";export{default as LineItemName}from"./components/LineItemName";export{default as LineItemOption}from"./components/LineItemOption";export{default as LineItemOptions}from"./components/LineItemOptions";export{default as LineItemQuantity}from"./components/LineItemQuantity";export{default as LineItemRemoveLink}from"./components/LineItemRemoveLink";export{default as LineItemsContainer}from"./components/LineItemsContainer";export{default as LineItemsCount}from"./components/LineItemsCount";export{default as LineItemsEmpty}from"./components/LineItemsEmpty";export{default as MetadataInput}from"./components/MetadataInput";export{default as OrderContainer}from"./components/OrderContainer";export{default as OrderNumber}from"./components/OrderNumber";export{default as OrderStorage}from"./components/OrderStorage";export{default as PaymentMethod}from"./components/PaymentMethod";export{default as PaymentMethodAmount}from"./components/PaymentMethodAmount";export{default as PaymentMethodName}from"./components/PaymentMethodName";export{default as PaymentMethodPrice}from"./components/PaymentMethodPrice";export{default as PaymentMethodRadioButton}from"./components/PaymentMethodRadioButton";export{default as PaymentMethodsContainer}from"./components/PaymentMethodsContainer";export{default as PaymentSource}from"./components/PaymentSource";export{default as PaymentSourceBrandIcon}from"./components/PaymentSourceBrandIcon";export{default as PaymentSourceBrandName}from"./components/PaymentSourceBrandName";export{default as PaymentSourceDetail}from"./components/PaymentSourceDetail";export{default as PaymentSourceEditButton}from"./components/PaymentSourceEditButton";export{default as PlaceOrderButton}from"./components/PlaceOrderButton";export{default as PlaceOrderContainer}from"./components/PlaceOrderContainer";export{default as Price}from"./components/Price";export{default as PricesContainer}from"./components/PricesContainer";export{default as PrivacyAndTermsCheckbox}from"./components/PrivacyAndTermsCheckbox";export{default as QuantitySelector}from"./components/QuantitySelector";export{default as SaveAddressesButton}from"./components/SaveAddressesButton";export{default as SaveCustomerButton}from"./components/SaveCustomerButton";export{default as Shipment}from"./components/Shipment";export{default as ShipmentField}from"./components/ShipmentField";export{default as ShipmentsContainer}from"./components/ShipmentsContainer";export{default as ShippingAddressContainer}from"./components/ShippingAddressContainer";export{default as ShippingAddressForm}from"./components/ShippingAddressForm";export{default as ShippingAmount}from"./components/ShippingAmount";export{default as ShippingMethod}from"./components/ShippingMethod";export{default as ShippingMethodName}from"./components/ShippingMethodName";export{default as ShippingMethodPrice}from"./components/ShippingMethodPrice";export{default as ShippingMethodRadioButton}from"./components/ShippingMethodRadioButton";export{default as SkuField}from"./components/SkuField";export{default as SkuList}from"./components/SkuList";export{default as SkuListsContainer}from"./components/SkuListsContainer";export{default as SkuOption}from"./components/SkuOption";export{default as SkuOptionInput}from"./components/SkuOptionInput";export{default as SkuOptionsContainer}from"./components/SkuOptionsContainer";export{default as Skus}from"./components/Skus";export{default as SkusContainer}from"./components/SkusContainer";export{default as StockTransfer}from"./components/StockTransfer";export{default as StockTransferField}from"./components/StockTransferField";export{default as SubTotalAmount}from"./components/SubTotalAmount";export{default as SubmitButton}from"./components/SubmitButton";export{default as TaxesAmount}from"./components/TaxesAmount";export{default as TotalAmount}from"./components/TotalAmount";export{default as VariantSelector}from"./components/VariantSelector";export{default as VariantsContainer}from"./components/VariantsContainer";
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Dispatch } from 'react';
|
|
2
|
-
import { BaseError, ResourceErrorType } from '../typings/errors';
|
|
3
|
-
import { CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
4
|
-
import { Address, AddressCreate, Order } from '@commercelayer/sdk';
|
|
5
|
-
import { updateOrder } from './OrderReducer';
|
|
6
|
-
export declare type AddressActionType = 'setErrors' | 'setAddress' | 'setShipToDifferentAddress' | 'setCloneAddress' | 'cleanup';
|
|
7
|
-
export declare type AddressField = 'city' | 'company' | 'country_code' | 'first_name' | 'last_name' | 'line_1' | 'line_2' | 'phone' | 'state_code' | 'zip_code' | 'billing_info';
|
|
8
|
-
export declare type AddressFieldView = AddressField | 'full_address' | 'full_name';
|
|
9
|
-
export declare const addressFields: AddressField[];
|
|
10
|
-
export declare type AddressResource = Extract<ResourceErrorType, 'billing_address' | 'shipping_address'>;
|
|
11
|
-
export declare type AddressSchema = Address;
|
|
12
|
-
export interface AddressActionPayload {
|
|
13
|
-
errors: BaseError[];
|
|
14
|
-
billing_address: AddressCreate;
|
|
15
|
-
shipping_address: AddressCreate;
|
|
16
|
-
shipToDifferentAddress: boolean;
|
|
17
|
-
billingAddressId: string;
|
|
18
|
-
shippingAddressId: string;
|
|
19
|
-
isBusiness: boolean;
|
|
20
|
-
}
|
|
21
|
-
export declare type AddressState = Partial<AddressActionPayload>;
|
|
22
|
-
export interface AddressAction {
|
|
23
|
-
type: AddressActionType;
|
|
24
|
-
payload: Partial<AddressActionPayload>;
|
|
25
|
-
}
|
|
26
|
-
export declare const addressInitialState: AddressState;
|
|
27
|
-
export interface SetAddressErrors {
|
|
28
|
-
<V extends BaseError[]>(args: {
|
|
29
|
-
errors: V;
|
|
30
|
-
resource: Extract<ResourceErrorType, 'billing_address' | 'shipping_address'>;
|
|
31
|
-
dispatch?: Dispatch<AddressAction>;
|
|
32
|
-
currentErrors?: V;
|
|
33
|
-
}): void;
|
|
34
|
-
}
|
|
35
|
-
export declare type SetAddressParams<V extends AddressSchema> = {
|
|
36
|
-
values: V;
|
|
37
|
-
resource: AddressResource;
|
|
38
|
-
dispatch?: Dispatch<AddressAction>;
|
|
39
|
-
};
|
|
40
|
-
export interface SetAddress {
|
|
41
|
-
<V extends AddressSchema>(params: SetAddressParams<V>): void;
|
|
42
|
-
}
|
|
43
|
-
export interface SaveAddresses {
|
|
44
|
-
(params: {
|
|
45
|
-
orderId?: string;
|
|
46
|
-
order?: Order | null;
|
|
47
|
-
updateOrder?: typeof updateOrder;
|
|
48
|
-
config: CommerceLayerConfig;
|
|
49
|
-
state: AddressState;
|
|
50
|
-
dispatch: Dispatch<AddressAction>;
|
|
51
|
-
}): Promise<void>;
|
|
52
|
-
}
|
|
53
|
-
export declare const setAddressErrors: SetAddressErrors;
|
|
54
|
-
export declare const setAddress: SetAddress;
|
|
55
|
-
declare type SetCloneAddress = (id: string, resource: AddressResource, dispatch: Dispatch<AddressAction>) => void;
|
|
56
|
-
export declare const setCloneAddress: SetCloneAddress;
|
|
57
|
-
export declare const saveAddresses: SaveAddresses;
|
|
58
|
-
declare const addressReducer: (state: AddressState, reducer: AddressAction) => AddressState;
|
|
59
|
-
export default addressReducer;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import baseReducer from"../utils/baseReducer";import isEmpty from"lodash/isEmpty";import getSdk from"../utils/getSdk";import camelCase from"lodash/camelCase";export const addressFields=["city","company","country_code","first_name","last_name","line_1","line_2","phone","state_code","zip_code"],addressInitialState={errors:[]},setAddressErrors=({errors,dispatch,currentErrors=[],resource})=>{const billingErrors=resource==="billing_address"?errors.filter(e=>e.resource===resource):currentErrors.filter(e=>e.resource==="billing_address"),shippingErrors=resource==="shipping_address"?errors.filter(e=>e.resource===resource):currentErrors.filter(e=>e.resource==="shipping_address"),finalErrors=[...billingErrors,...shippingErrors];dispatch&&dispatch({type:"setErrors",payload:{errors:finalErrors}})},setAddress=({values,resource,dispatch})=>{dispatch&&dispatch({type:"setAddress",payload:{[`${resource}`]:values}})},setCloneAddress=(id,resource,dispatch)=>{dispatch({type:"setCloneAddress",payload:{[`${camelCase(resource)}Id`]:id}})},saveAddresses=async({config,updateOrder,order,state})=>{var _a,_b,_c;const{shipToDifferentAddress,billing_address,shipping_address,billingAddressId,shippingAddressId}=state;try{const sdk=getSdk(config);if(order){const currentBillingAddressRef=(_a=order==null?void 0:order.billing_address)===null||_a===void 0?void 0:_a.reference,orderAttributes={id:order==null?void 0:order.id,_billing_address_clone_id:billingAddressId,_shipping_address_clone_id:billingAddressId};if(currentBillingAddressRef===billingAddressId&&(orderAttributes._billing_address_clone_id=(_b=order==null?void 0:order.billing_address)===null||_b===void 0?void 0:_b.id,orderAttributes._shipping_address_clone_id=(_c=order==null?void 0:order.shipping_address)===null||_c===void 0?void 0:_c.id),!isEmpty(billing_address)&&billing_address){delete orderAttributes._billing_address_clone_id,delete orderAttributes._shipping_address_clone_id,orderAttributes._shipping_address_same_as_billing=!0;const address=await sdk.addresses.create(billing_address);orderAttributes.billing_address=sdk.addresses.relationship(address.id)}if(shipToDifferentAddress&&(delete orderAttributes._shipping_address_same_as_billing,shippingAddressId&&(orderAttributes._shipping_address_clone_id=shippingAddressId),!isEmpty(shipping_address)&&shipping_address)){delete orderAttributes._shipping_address_clone_id;const address=await sdk.addresses.create(shipping_address);orderAttributes.shipping_address=sdk.addresses.relationship(address.id)}!isEmpty(orderAttributes)&&updateOrder&&await updateOrder({id:order.id,attributes:orderAttributes})}}catch(error){console.error(error)}};const type=["setErrors","setAddress","setShipToDifferentAddress","setCloneAddress","cleanup"],addressReducer=(state,reducer)=>baseReducer(state,reducer,type);export default addressReducer;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import baseReducer from"../utils/baseReducer";import getSdk from"../utils/getSdk";export const availabilityInitialState={quantity:null,min:{days:0,hours:0},max:{days:0,hours:0},errors:[]},getAvailability=async({skuCode,dispatch,config,setItem,item})=>{var _a;const sdk=getSdk(config);try{const[sku]=await sdk.skus.list({fields:{skus:["id"]},filters:{code_in:skuCode}});if(sku){const skuInventory=await sdk.skus.retrieve(sku.id,{fields:{skus:["inventory"]}}),[level]=((_a=skuInventory.inventory)===null||_a===void 0?void 0:_a.levels)||[],[delivery]=(level==null?void 0:level.delivery_lead_times)||[];dispatch({type:"setAvailability",payload:Object.assign(Object.assign({},delivery),{quantity:skuInventory.inventory.quantity})}),setItem&&setItem(Object.assign(Object.assign({},item),{[skuCode]:skuInventory}))}}catch(error){console.error("Get SKU availability",error)}};export async function getAvailabilityByIds({skusIds,config,setItem}){const sdk=getSdk(config);try{const inventories=await Promise.all(skusIds.map(async id=>await sdk.skus.retrieve(id,{fields:{skus:["inventory","code"]}}))),item={};inventories.forEach(v=>{(v==null?void 0:v.code)&&(item[v.code]=v)}),setItem&&setItem(item)}catch(error){console.error("Get SKU availability",error)}}const typeAction=["setAvailability","setErrors"],availabilityReducer=(state,reducer)=>baseReducer(state,reducer,typeAction);export default availabilityReducer;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import baseReducer from"../utils/baseReducer";import getSdk from"../utils/getSdk";export const billingAddressInitialState={_billing_address_clone_id:""},setBillingAddress=async(id,options)=>{try{if(options==null?void 0:options.order){if(options.customerAddressId){const sdk=getSdk(options.config),attributes={id,reference:options.customerAddressId};await sdk.addresses.update(attributes)}options.dispatch({type:"setBillingAddress",payload:{_billing_address_clone_id:id}})}}catch(error){console.error("Set billing address",error)}},setBillingCustomerAddressId=async({dispatch,order,setCloneAddress})=>{var _a;const customerAddressId=(_a=order==null?void 0:order.billing_address)===null||_a===void 0?void 0:_a.reference;try{customerAddressId&&(dispatch({type:"setBillingCustomerAddressId",payload:{billingCustomerAddressId:customerAddressId}}),setCloneAddress(customerAddressId,"billing_address"))}catch(error){console.error("error",error)}};const type=["setBillingAddress","setBillingCustomerAddressId","cleanup"],billingAddressReducer=(state,reducer)=>baseReducer(state,reducer,type);export default billingAddressReducer;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { Dispatch } from 'react';
|
|
2
|
-
import { BaseError } from '../typings/errors';
|
|
3
|
-
import { Address, CustomerPaymentSource, Order } from '@commercelayer/sdk';
|
|
4
|
-
import { CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
5
|
-
import { updateOrder } from './OrderReducer';
|
|
6
|
-
export declare type CustomerActionType = 'setErrors' | 'setCustomerEmail' | 'setAddresses' | 'setPayments';
|
|
7
|
-
export interface CustomerActionPayload {
|
|
8
|
-
addresses: Address[];
|
|
9
|
-
payments: CustomerPaymentSource[];
|
|
10
|
-
customerEmail: string;
|
|
11
|
-
errors: BaseError[];
|
|
12
|
-
isGuest: boolean;
|
|
13
|
-
getCustomerPaymentSources: () => Promise<void>;
|
|
14
|
-
}
|
|
15
|
-
export declare type CustomerState = Partial<CustomerActionPayload>;
|
|
16
|
-
export interface CustomerAction {
|
|
17
|
-
type: CustomerActionType;
|
|
18
|
-
payload: Partial<CustomerActionPayload>;
|
|
19
|
-
}
|
|
20
|
-
export declare type SetSaveOnBlur = (args: {
|
|
21
|
-
saveOnBlur: boolean;
|
|
22
|
-
dispatch: Dispatch<CustomerAction>;
|
|
23
|
-
}) => void;
|
|
24
|
-
export declare type SaveCustomerUser = (args: {
|
|
25
|
-
config: CommerceLayerConfig;
|
|
26
|
-
customerEmail: string;
|
|
27
|
-
dispatch: Dispatch<CustomerAction>;
|
|
28
|
-
order?: Order;
|
|
29
|
-
updateOrder: typeof updateOrder;
|
|
30
|
-
}) => void;
|
|
31
|
-
export declare const saveCustomerUser: SaveCustomerUser;
|
|
32
|
-
export interface SetCustomerErrors {
|
|
33
|
-
<V extends BaseError[]>(errors: V, dispatch?: Dispatch<CustomerAction>): void;
|
|
34
|
-
}
|
|
35
|
-
export declare const setCustomerErrors: SetCustomerErrors;
|
|
36
|
-
export declare type SetCustomerEmail = (customerEmail: string, dispatch?: Dispatch<CustomerAction>) => void;
|
|
37
|
-
export declare const setCustomerEmail: SetCustomerEmail;
|
|
38
|
-
export declare type GetCustomerAddresses = (params: {
|
|
39
|
-
config: CommerceLayerConfig;
|
|
40
|
-
dispatch: Dispatch<CustomerAction>;
|
|
41
|
-
}) => Promise<void>;
|
|
42
|
-
export declare const getCustomerAddresses: GetCustomerAddresses;
|
|
43
|
-
export declare type GetCustomerPaymentSources = (params: {
|
|
44
|
-
dispatch: Dispatch<CustomerAction>;
|
|
45
|
-
order?: Order;
|
|
46
|
-
}) => Promise<void>;
|
|
47
|
-
export declare const getCustomerPaymentSources: GetCustomerPaymentSources;
|
|
48
|
-
export declare const customerInitialState: CustomerState;
|
|
49
|
-
declare const customerReducer: (state: CustomerState, reducer: CustomerAction) => CustomerState;
|
|
50
|
-
export default customerReducer;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import baseReducer from"../utils/baseReducer";import getSdk from"../utils/getSdk";import getErrors from"../utils/getErrors";export const saveCustomerUser=async({customerEmail,order,updateOrder})=>{if(order){const attributes={customer_email:customerEmail,id:order.id};await updateOrder({id:order.id,attributes})}},setCustomerErrors=(errors,dispatch)=>{dispatch&&dispatch({type:"setErrors",payload:{errors}})},setCustomerEmail=(customerEmail,dispatch)=>{dispatch&&dispatch({type:"setCustomerEmail",payload:{customerEmail}})},getCustomerAddresses=async({config,dispatch})=>{try{const addresses=[];(await getSdk(config).customer_addresses.list({include:["address"]})).forEach(customerAddress=>{customerAddress.address&&addresses.push(customerAddress.address)}),addresses.sort((a,b)=>a.full_name&&b.full_name?a.full_name.localeCompare(b.full_name):0),dispatch({type:"setAddresses",payload:{addresses}})}catch(error){const errors=getErrors(error,"addresses");dispatch({type:"setErrors",payload:{errors}})}},getCustomerPaymentSources=async({dispatch,order})=>{(order==null?void 0:order.available_customer_payment_sources)&&dispatch({type:"setPayments",payload:{payments:order.available_customer_payment_sources}})},customerInitialState={errors:[],addresses:[],payments:[]};const type=["setErrors","setCustomerEmail","setAddresses","setPayments"],customerReducer=(state,reducer)=>baseReducer(state,reducer,type);export default customerReducer;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest}from"tslib";import baseReducer from"../utils/baseReducer";import{isEmpty}from"lodash";import getErrors from"../utils/getErrors";import getSdk from"../utils/getSdk";export const giftCardInitialState={currencyCode:"",balanceCent:0,singleUse:!1,rechargeable:!0,loading:!1,expiresAt:null,errors:[]},addGiftCardRecipient=async(values,config,dispatch)=>{try{const recipient=await getSdk(config).gift_card_recipients.create(values);dispatch({type:"setGiftCardRecipient",payload:{giftCardRecipient:recipient}})}catch(error){console.error(error)}},addGiftCardLoading=(loading,dispatch)=>{dispatch({type:"setGiftCardLoading",payload:{loading}})},addGiftCard=async(values,{config,dispatch,getOrder,createOrder,order})=>{var _a;try{const sdk=getSdk(config);addGiftCardLoading(!0,dispatch);const{firstName,lastName,email}=values,val=__rest(values,["firstName","lastName","email"]),giftCardValue=Object.assign({recipient_email:email},val),giftCard=await sdk.gift_cards.create(giftCardValue,{include:["gift_card_recipient"]}),recipientValues={id:(_a=giftCard.gift_card_recipient)===null||_a===void 0?void 0:_a.id};if(firstName&&(recipientValues.first_name=firstName),lastName&&(recipientValues.last_name=lastName),isEmpty(recipientValues)||await sdk.gift_card_recipients.update(recipientValues),createOrder&&getOrder){const id=order?order.id:await createOrder();if(id){const order2=sdk.orders.relationship(id),item=sdk.gift_cards.relationship(giftCard.id);await sdk.line_items.create({quantity:1,order:order2,item}),getOrder&&await getOrder(id)}}dispatch({type:"setGiftCardRecipient",payload:Object.assign({},giftCardValue)}),addGiftCardLoading(!1,dispatch)}catch(error){const errors=getErrors(error,"gift_cards");dispatch({type:"setGiftCardErrors",payload:{errors}}),addGiftCardLoading(!1,dispatch)}},addGiftCardError=(errors,dispatch)=>{dispatch({type:"setGiftCardErrors",payload:{errors}})};const type=["setAvailability","setGiftCardRecipient","setGiftCardErrors","setGiftCardLoading"],giftCardReducer=(state,reducer)=>baseReducer(state,reducer,type);export default giftCardReducer;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import baseReducer from"../utils/baseReducer";import getSdk from"../utils/getSdk";import getErrors from"../utils/getErrors";export const getLineItems=params=>{const{order,dispatch,config}=params,sdk=getSdk(config);let allLineItems=[];order&&sdk.orders.retrieve(order==null?void 0:order.id,{include:["line_items","line_items.line_item_options.sku_option"],fields:{orders:["line_items"]}}).then(response=>{dispatch({type:"setLoading",payload:{loading:!1}});const items=response.line_items||[];allLineItems=[...allLineItems,...items],dispatch({type:"setLineItems",payload:{lineItems:allLineItems}})}).catch(error=>{const errors=getErrors(error,"line_items");dispatch({type:"setErrors",payload:{errors}})})},updateLineItem=async params=>{const{config,lineItemId,quantity,getOrder,orderId,dispatch}=params,sdk=getSdk(config);try{await sdk.line_items.update({id:lineItemId,quantity}),getOrder&&await getOrder(orderId),dispatch({type:"setErrors",payload:{errors:[]}})}catch(error){const errors=getErrors(error,"line_items");dispatch({type:"setErrors",payload:{errors}})}},deleteLineItem=async params=>{const{config,lineItemId,getOrder,orderId,dispatch}=params,sdk=getSdk(config);try{await sdk.line_items.delete(lineItemId),getOrder&&await getOrder(orderId),dispatch({type:"setErrors",payload:{errors:[]}})}catch(error){const errors=getErrors(error,"line_items");dispatch({type:"setErrors",payload:{errors}})}},lineItemInitialState={loading:!1,lineItems:[],errors:[]};const actionType=["setLineItems","setErrors","setLoading"],lineItemReducer=(state,reducer)=>baseReducer(state,reducer,actionType);export default lineItemReducer;
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { Dispatch } from 'react';
|
|
2
|
-
import { SetLocalOrder, DeleteLocalOrder } from '../utils/localStorage';
|
|
3
|
-
import { CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
4
|
-
import { ItemOption, CustomLineItem } from './ItemReducer';
|
|
5
|
-
import { BaseMetadataObject } from '../typings/index';
|
|
6
|
-
import { BaseError } from '../typings/errors';
|
|
7
|
-
import { AddressResource } from './AddressReducer';
|
|
8
|
-
import type { Order, OrderUpdate } from '@commercelayer/sdk';
|
|
9
|
-
export declare type GetOrderParams = Partial<{
|
|
10
|
-
clearWhenPlaced: boolean;
|
|
11
|
-
config: CommerceLayerConfig;
|
|
12
|
-
deleteLocalOrder: DeleteLocalOrder;
|
|
13
|
-
dispatch: Dispatch<OrderActions>;
|
|
14
|
-
id: string;
|
|
15
|
-
persistKey: string;
|
|
16
|
-
state: OrderState;
|
|
17
|
-
}>;
|
|
18
|
-
export interface GetOrder {
|
|
19
|
-
(params: GetOrderParams): Promise<void | Order>;
|
|
20
|
-
}
|
|
21
|
-
declare type CreateOrderParams = Pick<AddToCartParams, 'config' | 'dispatch' | 'persistKey' | 'state' | 'orderMetadata' | 'orderAttributes' | 'setLocalOrder'>;
|
|
22
|
-
export interface CreateOrder {
|
|
23
|
-
(params?: CreateOrderParams): Promise<string>;
|
|
24
|
-
}
|
|
25
|
-
export declare type AddToCartParams = Partial<{
|
|
26
|
-
bundleCode: string;
|
|
27
|
-
skuCode: string;
|
|
28
|
-
persistKey: string;
|
|
29
|
-
config: CommerceLayerConfig;
|
|
30
|
-
dispatch: Dispatch<OrderActions>;
|
|
31
|
-
state: Partial<OrderState>;
|
|
32
|
-
skuId: string;
|
|
33
|
-
quantity: number;
|
|
34
|
-
option: ItemOption;
|
|
35
|
-
lineItem: CustomLineItem;
|
|
36
|
-
orderMetadata: BaseMetadataObject;
|
|
37
|
-
orderAttributes: Record<string, any>;
|
|
38
|
-
errors: BaseError[];
|
|
39
|
-
setLocalOrder: SetLocalOrder;
|
|
40
|
-
buyNowMode: boolean;
|
|
41
|
-
checkoutUrl: string;
|
|
42
|
-
}>;
|
|
43
|
-
export interface AddToCartImportParams extends Omit<AddToCartParams, 'skuCode' | 'skuId' | 'quantity' | 'option' | 'lineItem'> {
|
|
44
|
-
lineItems: CustomLineItem[];
|
|
45
|
-
}
|
|
46
|
-
export declare type AddToCartReturn = Promise<{
|
|
47
|
-
success: boolean;
|
|
48
|
-
orderId: string | undefined;
|
|
49
|
-
}>;
|
|
50
|
-
export interface AddToCart {
|
|
51
|
-
(params: AddToCartParams): AddToCartReturn;
|
|
52
|
-
}
|
|
53
|
-
export interface AddToCartImport {
|
|
54
|
-
(params: AddToCartImportParams): AddToCartReturn;
|
|
55
|
-
}
|
|
56
|
-
export interface UnsetOrderState {
|
|
57
|
-
(dispatch: Dispatch<OrderActions>): void;
|
|
58
|
-
}
|
|
59
|
-
export declare type ResourceIncluded = 'billing_address' | 'shipping_address' | 'line_items.line_item_options.sku_option' | 'line_items.item' | 'available_customer_payment_sources.payment_source' | 'shipments.available_shipping_methods' | 'shipments.stock_transfers' | 'shipments.stock_transfers.line_item' | 'shipments.shipment_line_items.line_item' | 'shipments.shipping_method' | 'shipments.stock_location' | 'payment_source' | 'available_payment_methods' | 'payment_method';
|
|
60
|
-
declare type ResourceIncludedLoaded = Partial<Record<ResourceIncluded, boolean>>;
|
|
61
|
-
export interface OrderPayload {
|
|
62
|
-
loading?: boolean;
|
|
63
|
-
orderId?: string;
|
|
64
|
-
order?: Order;
|
|
65
|
-
errors?: BaseError[];
|
|
66
|
-
include?: ResourceIncluded[] | undefined;
|
|
67
|
-
includeLoaded?: ResourceIncludedLoaded;
|
|
68
|
-
withoutIncludes?: boolean;
|
|
69
|
-
}
|
|
70
|
-
export declare type AddToCartValues = Pick<AddToCartParams, 'bundleCode' | 'lineItem' | 'quantity' | 'skuCode' | 'skuId' | 'option' | 'buyNowMode' | 'checkoutUrl'>;
|
|
71
|
-
export declare type AddToCartImportValues = Pick<AddToCartImportParams, 'lineItems'>;
|
|
72
|
-
export declare type getOrderContext = (id: string) => Promise<void | Order>;
|
|
73
|
-
export declare type OrderState = Partial<OrderPayload>;
|
|
74
|
-
export interface OrderActions {
|
|
75
|
-
type: OrderActionType;
|
|
76
|
-
payload: OrderPayload;
|
|
77
|
-
}
|
|
78
|
-
export declare type OrderActionType = 'setLoading' | 'setOrderId' | 'setOrder' | 'setSingleQuantity' | 'setCurrentSkuCodes' | 'setCurrentSkuPrices' | 'setCurrentItem' | 'setErrors' | 'setSaveAddressToCustomerAddressBook' | 'setGiftCardOrCouponCode' | 'setIncludesResource';
|
|
79
|
-
export declare const createOrder: CreateOrder;
|
|
80
|
-
export declare const getApiOrder: GetOrder;
|
|
81
|
-
export declare type UpdateOrderArgs = {
|
|
82
|
-
id: string;
|
|
83
|
-
attributes: Omit<OrderUpdate, 'id'>;
|
|
84
|
-
dispatch?: Dispatch<OrderActions>;
|
|
85
|
-
include?: string[];
|
|
86
|
-
config?: CommerceLayerConfig;
|
|
87
|
-
state?: OrderState;
|
|
88
|
-
};
|
|
89
|
-
export declare function updateOrder({ id, attributes, dispatch, config, include, state, }: UpdateOrderArgs): Promise<{
|
|
90
|
-
success: boolean;
|
|
91
|
-
error?: undefined;
|
|
92
|
-
} | {
|
|
93
|
-
success: boolean;
|
|
94
|
-
error: unknown;
|
|
95
|
-
}>;
|
|
96
|
-
export declare const setOrder: (order: Order, dispatch?: Dispatch<OrderActions> | undefined) => void;
|
|
97
|
-
export declare type AddResourceToInclude = {
|
|
98
|
-
resourcesIncluded?: ResourceIncluded[];
|
|
99
|
-
dispatch?: Dispatch<OrderActions>;
|
|
100
|
-
newResource?: ResourceIncluded | ResourceIncluded[];
|
|
101
|
-
resourceIncludedLoaded?: ResourceIncludedLoaded;
|
|
102
|
-
newResourceLoaded?: ResourceIncludedLoaded;
|
|
103
|
-
};
|
|
104
|
-
export declare function addResourceToInclude({ resourcesIncluded, dispatch, newResource, newResourceLoaded, resourceIncludedLoaded, }: AddResourceToInclude): void;
|
|
105
|
-
export declare const addToCart: AddToCart;
|
|
106
|
-
export declare const unsetOrderState: UnsetOrderState;
|
|
107
|
-
declare type OrderErrors = {
|
|
108
|
-
dispatch?: Dispatch<OrderActions>;
|
|
109
|
-
errors: BaseError[];
|
|
110
|
-
};
|
|
111
|
-
export declare function setOrderErrors({ dispatch, errors }: OrderErrors): {
|
|
112
|
-
success: boolean;
|
|
113
|
-
};
|
|
114
|
-
export declare type SaveAddressToCustomerAddressBook = (params: {
|
|
115
|
-
dispatch?: Dispatch<OrderActions>;
|
|
116
|
-
type: AddressResource;
|
|
117
|
-
value: boolean;
|
|
118
|
-
}) => void;
|
|
119
|
-
export declare const saveAddressToCustomerAddressBook: SaveAddressToCustomerAddressBook;
|
|
120
|
-
export declare type SetGiftCardOrCouponCode = (args: {
|
|
121
|
-
code: string;
|
|
122
|
-
codeType: OrderCodeType;
|
|
123
|
-
dispatch?: Dispatch<OrderActions>;
|
|
124
|
-
config?: CommerceLayerConfig;
|
|
125
|
-
order?: Order;
|
|
126
|
-
include?: string[];
|
|
127
|
-
state?: OrderState;
|
|
128
|
-
}) => Promise<{
|
|
129
|
-
success: boolean;
|
|
130
|
-
}>;
|
|
131
|
-
export declare const setGiftCardOrCouponCode: SetGiftCardOrCouponCode;
|
|
132
|
-
export declare type CodeType = 'coupon' | 'gift_card' | 'gift_card_or_coupon';
|
|
133
|
-
export declare type OrderCodeType = `${CodeType}_code`;
|
|
134
|
-
export declare type RemoveGiftCardOrCouponCode = (args: {
|
|
135
|
-
codeType: OrderCodeType;
|
|
136
|
-
dispatch?: Dispatch<OrderActions>;
|
|
137
|
-
config?: CommerceLayerConfig;
|
|
138
|
-
order?: Order;
|
|
139
|
-
include?: string[];
|
|
140
|
-
state?: OrderState;
|
|
141
|
-
}) => Promise<{
|
|
142
|
-
success: boolean;
|
|
143
|
-
}>;
|
|
144
|
-
export declare const removeGiftCardOrCouponCode: RemoveGiftCardOrCouponCode;
|
|
145
|
-
export declare const orderInitialState: Partial<OrderState>;
|
|
146
|
-
declare const orderReducer: (state: OrderState, reducer: OrderActions) => OrderState;
|
|
147
|
-
export default orderReducer;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{setCustomerOrderParam}from"../utils/localStorage";import baseReducer from"../utils/baseReducer";import isEmpty from"lodash/isEmpty";import size from"lodash/size";import map from"lodash/map";import getSdk from"../utils/getSdk";import getErrors,{setErrors}from"../utils/getErrors";import getOrganizationSlug from"../utils/organization";const actionType=["setLoading","setOrderId","setOrder","setSingleQuantity","setCurrentSkuCodes","setCurrentSkuPrices","setErrors","setCurrentItem","setSaveAddressToCustomerAddressBook","setIncludesResource"];export const createOrder=async params=>{if(params){const{persistKey,state,dispatch,config,orderMetadata:metadata,orderAttributes={},setLocalOrder}=params;if(state==null?void 0:state.orderId)return state.orderId;const sdk=getSdk(config);try{const o=await(sdk==null?void 0:sdk.orders.create(Object.assign({metadata},orderAttributes)));return dispatch&&dispatch({type:"setOrderId",payload:{orderId:o==null?void 0:o.id}}),persistKey&&setLocalOrder&&setLocalOrder(persistKey,o.id),o.id}catch(error){const errors=getErrors(error,"orders");console.error("Create order",errors),dispatch&&setErrors({currentErrors:state==null?void 0:state.errors,newErrors:errors,dispatch})}}return""},getApiOrder=async params=>{const{id,dispatch,config,clearWhenPlaced,persistKey,deleteLocalOrder,state}=params,sdk=getSdk(config);try{const options={};(state==null?void 0:state.include)&&state.include.length>0&&(options.include=state.include);const order=await sdk.orders.retrieve(id,options);return clearWhenPlaced&&order.status==="placed"||order.status==="approved"||order.status==="cancelled"?(persistKey&&deleteLocalOrder&&deleteLocalOrder(persistKey),dispatch&&dispatch({type:"setOrder",payload:{order:void 0,orderId:""}})):dispatch&&dispatch({type:"setOrder",payload:{order,orderId:order.id}}),order}catch(error){const errors=getErrors(error,"orders");console.error("Retrieve order",errors),dispatch&&setErrors({currentErrors:state==null?void 0:state.errors,newErrors:errors,dispatch});return}};export async function updateOrder({id,attributes,dispatch,config,include,state}){const sdk=getSdk(config);try{const resource=Object.assign(Object.assign({},attributes),{id});await sdk.orders.update(resource,{include});const order=await getApiOrder({id,config,dispatch,state});return dispatch&&order&&dispatch({type:"setOrder",payload:{order}}),{success:!0}}catch(error){const errors=getErrors(error,"orders");return dispatch&&(setOrderErrors({errors,dispatch}),dispatch({type:"setErrors",payload:{errors}})),{success:!1,error}}}export const setOrder=(order,dispatch)=>{dispatch&&dispatch({type:"setOrder",payload:{order}})};export function addResourceToInclude({resourcesIncluded=[],dispatch,newResource,newResourceLoaded,resourceIncludedLoaded}){const payload={include:void 0,includeLoaded:void 0};if(newResource){const resources=typeof newResource=="string"?[newResource]:newResource;payload.include=[...resourcesIncluded,...resources],resources.forEach(resource=>{payload.includeLoaded=Object.assign(Object.assign({},payload.includeLoaded),{[resource]:!0})})}else delete payload.include;payload.includeLoaded=Object.assign(Object.assign(Object.assign({},resourceIncludedLoaded),newResourceLoaded),payload.includeLoaded&&payload.includeLoaded),dispatch&&dispatch({type:"setIncludesResource",payload:Object.assign(Object.assign({},payload),{withoutIncludes:!1})})}export const addToCart=async params=>{var _a,_b;const{skuCode,bundleCode,skuId,quantity,option,config,dispatch,lineItem,state,errors=[],buyNowMode,checkoutUrl}=params;try{if(!config)throw{errors:[{code:"INVALID_RESOURCE",resource:"orders",title:"Markup error",message:"You are trying to place an order outside the OrderContainer component"}]};const sdk=getSdk(config),id=await createOrder(params);if(id){const order=sdk.orders.relationship(id),name=lineItem==null?void 0:lineItem.name,imageUrl=lineItem==null?void 0:lineItem.imageUrl;if(buyNowMode)if((_a=state==null?void 0:state.order)===null||_a===void 0?void 0:_a.line_items)await Promise.all((_b=state==null?void 0:state.order)===null||_b===void 0?void 0:_b.line_items.map(async lineItem2=>{await sdk.line_items.delete(lineItem2.id)}));else{const{line_items}=await sdk.orders.retrieve(id,{fields:["line_items"],include:["line_items"]});line_items&&(line_items==null?void 0:line_items.length)>0&&await Promise.all(line_items.map(async lineItem2=>{await sdk.line_items.delete(lineItem2.id)}))}const attrs={order,sku_code:skuCode,name,image_url:imageUrl,quantity:quantity||1,_update_quantity:!0,bundle_code:bundleCode};skuId&&(attrs.item=sdk.skus.relationship(skuId));const newLineItem=await sdk.line_items.create(attrs);if(isEmpty(option))await getApiOrder(Object.assign(Object.assign({id},params),{state}));else{let c=0;map(option,async opt=>{const{options,skuOptionId}=opt,skuOption=sdk.sku_options.relationship(skuOptionId),lineItemRel=sdk.line_items.relationship(newLineItem.id),lineItemOptionsAttributes={quantity:1,options,sku_option:skuOption,line_item:lineItemRel};await sdk.line_item_options.create(lineItemOptionsAttributes),c+=1,c===size(option)&&await getApiOrder(Object.assign({id},params))})}if(!isEmpty(errors)&&dispatch&&dispatch({type:"setErrors",payload:{errors:[]}}),buyNowMode){const{organization}=getOrganizationSlug(config.endpoint),params2=`${id}?accessToken=${config.accessToken}`,redirectUrl=checkoutUrl?`${checkoutUrl}/${params2}`:`https://${organization}.checkout.commercelayer.app/${params2}`;location.href=redirectUrl}return{success:!0,orderId:id}}return{success:!1,orderId:void 0}}catch(error){const errors2=getErrors(error,"orders");return console.error("Add to cart",errors2),dispatch&&setErrors({currentErrors:state==null?void 0:state.errors,newErrors:errors2,dispatch}),{success:!1,orderId:void 0}}},unsetOrderState=dispatch=>{dispatch({type:"setOrderId",payload:{orderId:""}}),dispatch({type:"setOrder",payload:{order:void 0}})};export function setOrderErrors({dispatch,errors=[]}){return dispatch&&dispatch({type:"setErrors",payload:{errors}}),{success:!1}}export const saveAddressToCustomerAddressBook=({type,value,dispatch})=>{const k=`_save_${type}_to_customer_address_book`,v=`${value}`;setCustomerOrderParam(k,v),dispatch&&dispatch({type:"setSaveAddressToCustomerAddressBook",payload:{[k]:v}})},setGiftCardOrCouponCode=async({code,codeType,dispatch,config,order,include,state})=>{try{if(config&&order&&code&&dispatch){const attributes={[codeType]:code},{success,error}=await updateOrder({id:order.id,attributes,config,include,dispatch,state});if(!success)throw error;return dispatch({type:"setErrors",payload:{errors:[]}}),{success}}return{success:!1}}catch(error){const errors=getErrors(error,"orders",codeType);return dispatch&&setOrderErrors({errors,dispatch}),{success:!1}}},removeGiftCardOrCouponCode=async({codeType,dispatch,config,order,include,state})=>{try{if(config&&order&&dispatch){const attributes={[codeType]:""};return await updateOrder({id:order.id,attributes,config,include,dispatch,state}),dispatch({type:"setErrors",payload:{errors:[]}}),{success:!0}}return{success:!1}}catch(error){const errors=getErrors(error,"orders",codeType);return console.error("Remove gift card o coupon code",errors),dispatch&&setOrderErrors({errors,dispatch}),{success:!1}}},orderInitialState={loading:!0,orderId:"",order:void 0,errors:[],include:void 0,withoutIncludes:!0};const orderReducer=(state,reducer)=>baseReducer(state,reducer,actionType);export default orderReducer;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import baseReducer from"../utils/baseReducer";import getErrors,{setErrors}from"../utils/getErrors";import getSdk from"../utils/getSdk";import camelCase from"lodash/camelCase";import has from"lodash/has";import isEmpty from"lodash/isEmpty";export function setLoading({loading,dispatch}){dispatch&&dispatch({type:"setLoading",payload:{loading}})}export const setPaymentRef=({ref,dispatch})=>{ref&&dispatch&&dispatch({type:"setPaymentRef",payload:{currentPaymentMethodRef:ref}})},paymentMethodInitialState={errors:[]},setPaymentMethodErrors=(errors,dispatch)=>{dispatch&&dispatch({type:"setErrors",payload:{errors}})},getPaymentMethods=async({order,dispatch})=>{const paymentMethods=order.available_payment_methods,paymentMethod=order.payment_method,paymentSource=order.payment_source;dispatch({type:"setPaymentMethods",payload:{paymentMethods,currentPaymentMethodId:paymentMethod==null?void 0:paymentMethod.id,currentPaymentMethodType:paymentMethod==null?void 0:paymentMethod.payment_source_type,paymentSource}})},setPaymentMethod=async({config,dispatch,order,paymentMethodId,updateOrder,setOrderErrors,paymentResource})=>{try{if(config&&order&&dispatch&&paymentResource){localStorage.removeItem("_save_payment_source_to_customer_wallet");const attributes={payment_method:getSdk(config).payment_methods.relationship(paymentMethodId)};updateOrder&&await updateOrder({id:order.id,attributes}),dispatch({type:"setPaymentMethods",payload:{currentPaymentMethodId:paymentMethodId,currentPaymentMethodType:paymentResource,errors:[]}}),setOrderErrors&&setOrderErrors([])}}catch(error){const errors=getErrors(error,"orders",paymentResource);console.error("Set payment method",errors)}},setPaymentSource=async({config,dispatch,getOrder,attributes={},order,paymentResource,customerPaymentSourceId,paymentSourceId,updateOrder,errors:currentErrors})=>{try{if(config&&order){let paymentSource;const sdk=getSdk(config);if(customerPaymentSourceId)updateOrder&&await updateOrder({id:order.id,attributes:{_customer_payment_source_id:customerPaymentSourceId}});else{if(paymentSourceId){const attrs=Object.assign({id:paymentSourceId},attributes);paymentSource=await sdk[paymentResource].update(attrs)}else{const attrs=Object.assign(Object.assign({},attributes),{order:sdk.orders.relationship(order.id)});paymentSource=await sdk[paymentResource].create(attrs)}return getOrder&&await getOrder(order.id),dispatch&&dispatch({type:"setPaymentSource",payload:{paymentSource,errors:[]}}),paymentSource}}}catch(error){const errors=getErrors(error,"payment_methods",paymentResource);console.error("Set payment source:",errors),dispatch&&setErrors({currentErrors,newErrors:errors,dispatch})}},updatePaymentSource=async({id,attributes,config,dispatch,paymentResource})=>{if(config)try{const paymentSource=await getSdk(config)[paymentResource].update(Object.assign({id},attributes));dispatch&&dispatch({type:"setPaymentSource",payload:{paymentSource}})}catch(err){console.error("Update payment source:",err)}},destroyPaymentSource=async({paymentSourceId,paymentResource,dispatch})=>{paymentSourceId&&paymentResource&&dispatch&&dispatch({type:"setPaymentSource",payload:{paymentSource:void 0}})},setPaymentMethodConfig=(config,dispatch)=>{dispatch({type:"setPaymentMethodConfig",payload:{config}})};export function getPaymentConfig(paymentResource,config){const resource=camelCase(paymentResource).replace("Payments","Payment").replace("Transfers","Transfer");return!isEmpty(config)&&has(config,resource)?config[resource]:void 0}const type=["setErrors","setPaymentMethodConfig","setPaymentMethods","setPaymentSource","setPaymentRef","setLoading"],paymentMethodReducer=(state,reducer)=>baseReducer(state,reducer,type);export default paymentMethodReducer;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import baseReducer from"../utils/baseReducer";import isEmpty from"lodash/isEmpty";import{isDoNotShip,shipmentsFilled}from"../utils/shipments";import{saveBillingAddress,saveShippingAddress,saveToWallet}from"../utils/customerOrderOptions";import getSdk from"../utils/getSdk";import getErrors from"../utils/getErrors";export const placeOrderInitialState={errors:[],isPermitted:!1},setPlaceOrderErrors=(errors,dispatch)=>{dispatch&&dispatch({type:"setErrors",payload:{errors}})},placeOrderPermitted=async({config,order,dispatch,options})=>{var _a;if(order&&config){let isPermitted=!0;order.privacy_url&&order.terms_url&&(isPermitted=localStorage.getItem("privacy-terms")==="true");const billingAddress=order.billing_address,shippingAddress=order.shipping_address,doNotShip=isDoNotShip(order.line_items),shipments=order.shipments,shipment=shipments&&shipmentsFilled(shipments),paymentMethod=order.payment_method,paymentSource=order.payment_source;order.total_amount_with_taxes_cents!==0&&isEmpty(paymentMethod==null?void 0:paymentMethod.id)&&(isPermitted=!1),isEmpty(billingAddress)&&(isPermitted=!1),isEmpty(shippingAddress)&&!doNotShip&&(isPermitted=!1),!isEmpty(shipments)&&!shipment&&(isPermitted=!1),(paymentSource==null?void 0:paymentSource.mismatched_amounts)&&(isPermitted=!1),dispatch({type:"setPlaceOrderPermitted",payload:{isPermitted,paymentType:paymentMethod==null?void 0:paymentMethod.payment_source_type,paymentSecret:paymentSource==null?void 0:paymentSource.client_secret,paymentId:(_a=paymentSource==null?void 0:paymentSource.options)===null||_a===void 0?void 0:_a.id,paymentSource,options}})}},setPlaceOrder=async({state,order,config,setOrderErrors,paymentSource,setOrder,include})=>{var _a,_b,_c,_d;const response={placed:!1};if(state&&config&&order){const sdk=getSdk(config),{options,paymentType}=state;try{if(paymentType==="paypal_payments"&&paymentSource){if(!(options==null?void 0:options.paypalPayerId)&&(paymentSource==null?void 0:paymentSource.approval_url))return window.location.href=paymentSource==null?void 0:paymentSource.approval_url,response;await sdk[paymentType].update({id:paymentSource.id,paypal_payer_id:options==null?void 0:options.paypalPayerId})}if(paymentType==="checkout_com_payments"&&paymentSource&&((_a=options==null?void 0:options.checkoutCom)===null||_a===void 0?void 0:_a.session_id)){const payment=await sdk[paymentType].update({id:paymentSource.id,_details:!0,session_id:(_b=options==null?void 0:options.checkoutCom)===null||_b===void 0?void 0:_b.session_id});if(((_c=payment==null?void 0:payment.payment_response)===null||_c===void 0?void 0:_c.status)!=="Authorized"){const[action]=((_d=payment==null?void 0:payment.payment_response)===null||_d===void 0?void 0:_d.actions)||[""];throw{errors:[{code:"PAYMENT_NOT_APPROVED_FOR_EXECUTION",message:action==null?void 0:action.response_summary,resource:"orders",field:"checkout_com_payments"}]}}}const updateAttributes={id:order.id,_place:!0};switch(saveBillingAddress()&&await sdk.orders.update({id:order.id,_save_billing_address_to_customer_address_book:!0}),saveShippingAddress()&&await sdk.orders.update({id:order.id,_save_shipping_address_to_customer_address_book:!0}),paymentType){case"braintree_payments":{saveToWallet()&&await sdk.orders.update({id:order.id,_save_payment_source_to_customer_wallet:!0});const orderUpdated=await sdk.orders.update(updateAttributes,{include});return setOrder&&setOrder(orderUpdated),setOrderErrors&&setOrderErrors([]),{placed:!0}}default:{const orderUpdated=await sdk.orders.update(updateAttributes,{include});return setOrder&&setOrder(orderUpdated),saveToWallet()&&await sdk.orders.update({id:order.id,_save_payment_source_to_customer_wallet:!0}),setOrderErrors&&setOrderErrors([]),{placed:!0}}}}catch(error){const errors=getErrors(error,"orders",paymentType);return setOrderErrors&&setOrderErrors(errors),Object.assign(Object.assign({},response),{errors})}}return response};const type=["setErrors","setPlaceOrderPermitted"],placeOrderReducer=(state,reducer)=>baseReducer(state,reducer,type);export default placeOrderReducer;
|