@commercelayer/react-components 4.21.0-beta.2 → 4.22.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/components/ExternalFunction.d.ts +7 -0
- package/lib/cjs/components/ExternalFunction.js +2 -0
- package/lib/cjs/components/MetadataInput.d.ts +5 -0
- package/lib/cjs/components/MetadataInput.js +2 -0
- package/lib/cjs/components/SubmitButton.d.ts +10 -0
- package/lib/cjs/components/SubmitButton.js +2 -0
- package/lib/cjs/components/addresses/Address.d.ts +31 -0
- package/lib/cjs/components/addresses/Address.js +2 -0
- package/lib/cjs/components/addresses/AddressCountrySelector.d.ts +34 -0
- package/lib/cjs/components/addresses/AddressCountrySelector.js +2 -0
- package/lib/cjs/components/addresses/AddressField.d.ts +61 -0
- package/lib/cjs/components/addresses/AddressField.js +2 -0
- package/lib/cjs/components/addresses/AddressInput.d.ts +34 -0
- package/lib/cjs/components/addresses/AddressInput.js +2 -0
- package/lib/cjs/components/addresses/AddressInputSelect.d.ts +29 -0
- package/lib/cjs/components/addresses/AddressInputSelect.js +2 -0
- package/lib/cjs/components/addresses/AddressStateSelector.d.ts +50 -0
- package/lib/cjs/components/addresses/AddressStateSelector.js +2 -0
- package/lib/cjs/components/addresses/AddressesContainer.d.ts +40 -0
- package/lib/cjs/components/addresses/AddressesContainer.js +2 -0
- package/lib/cjs/components/addresses/AddressesEmpty.d.ts +26 -0
- package/lib/cjs/components/addresses/AddressesEmpty.js +2 -0
- package/lib/cjs/components/addresses/BillingAddressContainer.d.ts +6 -0
- package/lib/cjs/components/addresses/BillingAddressContainer.js +2 -0
- package/lib/cjs/components/addresses/BillingAddressForm.d.ts +34 -0
- package/lib/cjs/components/addresses/BillingAddressForm.js +2 -0
- package/lib/cjs/components/addresses/SaveAddressesButton.d.ts +18 -0
- package/lib/cjs/components/addresses/SaveAddressesButton.js +2 -0
- package/lib/cjs/components/addresses/ShippingAddressContainer.d.ts +7 -0
- package/lib/cjs/components/addresses/ShippingAddressContainer.js +2 -0
- package/lib/cjs/components/addresses/ShippingAddressForm.d.ts +31 -0
- package/lib/cjs/components/addresses/ShippingAddressForm.js +2 -0
- package/lib/cjs/components/auth/CommerceLayer.d.ts +25 -0
- package/lib/cjs/components/auth/CommerceLayer.js +2 -0
- package/lib/cjs/components/customers/CustomerAddressForm.d.ts +13 -0
- package/lib/cjs/components/customers/CustomerAddressForm.js +2 -0
- package/lib/cjs/components/customers/CustomerContainer.d.ts +38 -0
- package/lib/cjs/components/customers/CustomerContainer.js +2 -0
- package/lib/cjs/components/customers/CustomerField.d.ts +25 -0
- package/lib/cjs/components/customers/CustomerField.js +2 -0
- package/lib/cjs/components/customers/CustomerInput.d.ts +11 -0
- package/lib/cjs/components/customers/CustomerInput.js +2 -0
- package/lib/cjs/components/customers/CustomerPaymentSource.d.ts +11 -0
- package/lib/cjs/components/customers/CustomerPaymentSource.js +2 -0
- package/lib/cjs/components/customers/CustomerPaymentSourceEmpty.d.ts +14 -0
- package/lib/cjs/components/customers/CustomerPaymentSourceEmpty.js +2 -0
- package/lib/cjs/components/customers/MyAccountLink.d.ts +38 -0
- package/lib/cjs/components/customers/MyAccountLink.js +2 -0
- package/lib/cjs/components/customers/MyIdentityLink.d.ts +59 -0
- package/lib/cjs/components/customers/MyIdentityLink.js +2 -0
- package/lib/cjs/components/customers/SaveCustomerButton.d.ts +12 -0
- package/lib/cjs/components/customers/SaveCustomerButton.js +2 -0
- package/lib/cjs/components/errors/Errors.d.ts +31 -0
- package/lib/cjs/components/errors/Errors.js +2 -0
- package/lib/cjs/components/gift_cards/GiftCard.d.ts +10 -0
- package/lib/cjs/components/gift_cards/GiftCard.js +2 -0
- package/lib/cjs/components/gift_cards/GiftCardContainer.d.ts +6 -0
- package/lib/cjs/components/gift_cards/GiftCardContainer.js +2 -0
- package/lib/cjs/components/gift_cards/GiftCardCurrencySelector.d.ts +7 -0
- package/lib/cjs/components/gift_cards/GiftCardCurrencySelector.js +2 -0
- package/lib/cjs/components/gift_cards/GiftCardInput.d.ts +7 -0
- package/lib/cjs/components/gift_cards/GiftCardInput.js +2 -0
- package/lib/cjs/components/gift_cards/GiftCardOrCouponCode.d.ts +16 -0
- package/lib/cjs/components/gift_cards/GiftCardOrCouponCode.js +2 -0
- package/lib/cjs/components/gift_cards/GiftCardOrCouponForm.d.ts +15 -0
- package/lib/cjs/components/gift_cards/GiftCardOrCouponForm.js +2 -0
- package/lib/cjs/components/gift_cards/GiftCardOrCouponInput.d.ts +11 -0
- package/lib/cjs/components/gift_cards/GiftCardOrCouponInput.js +2 -0
- package/lib/cjs/components/gift_cards/GiftCardOrCouponRemoveButton.d.ts +20 -0
- package/lib/cjs/components/gift_cards/GiftCardOrCouponRemoveButton.js +2 -0
- package/lib/cjs/components/gift_cards/GiftCardOrCouponSubmit.d.ts +10 -0
- package/lib/cjs/components/gift_cards/GiftCardOrCouponSubmit.js +2 -0
- package/lib/cjs/components/gift_cards/GiftCardRecipientInput.d.ts +0 -0
- package/lib/cjs/components/gift_cards/GiftCardRecipientInput.js +2 -0
- package/lib/cjs/components/in_stock_subscriptions/InStockSubscriptionButton.d.ts +36 -0
- package/lib/cjs/components/in_stock_subscriptions/InStockSubscriptionButton.js +2 -0
- package/lib/cjs/components/in_stock_subscriptions/InStockSubscriptionsContainer.d.ts +10 -0
- package/lib/cjs/components/in_stock_subscriptions/InStockSubscriptionsContainer.js +2 -0
- package/lib/cjs/components/line_items/LineItem.d.ts +8 -0
- package/lib/cjs/components/line_items/LineItem.js +2 -0
- package/lib/cjs/components/line_items/LineItemAmount.d.ts +7 -0
- package/lib/cjs/components/line_items/LineItemAmount.js +2 -0
- package/lib/cjs/components/line_items/LineItemCode.d.ts +13 -0
- package/lib/cjs/components/line_items/LineItemCode.js +2 -0
- package/lib/cjs/components/line_items/LineItemField.d.ts +14 -0
- package/lib/cjs/components/line_items/LineItemField.js +2 -0
- package/lib/cjs/components/line_items/LineItemImage.d.ts +17 -0
- package/lib/cjs/components/line_items/LineItemImage.js +2 -0
- package/lib/cjs/components/line_items/LineItemName.d.ts +12 -0
- package/lib/cjs/components/line_items/LineItemName.js +2 -0
- package/lib/cjs/components/line_items/LineItemOption.d.ts +19 -0
- package/lib/cjs/components/line_items/LineItemOption.js +2 -0
- package/lib/cjs/components/line_items/LineItemOptions.d.ts +16 -0
- package/lib/cjs/components/line_items/LineItemOptions.js +2 -0
- package/lib/cjs/components/line_items/LineItemQuantity.d.ts +21 -0
- package/lib/cjs/components/line_items/LineItemQuantity.js +2 -0
- package/lib/cjs/components/line_items/LineItemRemoveLink.d.ts +14 -0
- package/lib/cjs/components/line_items/LineItemRemoveLink.js +2 -0
- package/lib/cjs/components/line_items/LineItemsContainer.d.ts +9 -0
- package/lib/cjs/components/line_items/LineItemsContainer.js +2 -0
- package/lib/cjs/components/line_items/LineItemsCount.d.ts +12 -0
- package/lib/cjs/components/line_items/LineItemsCount.js +2 -0
- package/lib/cjs/components/line_items/LineItemsEmpty.d.ts +12 -0
- package/lib/cjs/components/line_items/LineItemsEmpty.js +2 -0
- package/lib/cjs/components/orders/AddToCartButton.d.ts +95 -0
- package/lib/cjs/components/orders/AddToCartButton.js +2 -0
- package/lib/cjs/components/orders/AdjustmentAmount.d.ts +4 -0
- package/lib/cjs/components/orders/AdjustmentAmount.js +2 -0
- package/lib/cjs/components/orders/CartLink.d.ts +47 -0
- package/lib/cjs/components/orders/CartLink.js +2 -0
- package/lib/cjs/components/orders/CheckoutLink.d.ts +28 -0
- package/lib/cjs/components/orders/CheckoutLink.js +2 -0
- package/lib/cjs/components/orders/DiscountAmount.d.ts +4 -0
- package/lib/cjs/components/orders/DiscountAmount.js +2 -0
- package/lib/cjs/components/orders/GiftCardAmount.d.ts +4 -0
- package/lib/cjs/components/orders/GiftCardAmount.js +2 -0
- package/lib/cjs/components/orders/HostedCart.d.ts +58 -0
- package/lib/cjs/components/orders/HostedCart.js +2 -0
- package/lib/cjs/components/orders/OrderContainer.d.ts +62 -0
- package/lib/cjs/components/orders/OrderContainer.js +2 -0
- package/lib/cjs/components/orders/OrderList.d.ts +83 -0
- package/lib/cjs/components/orders/OrderList.js +2 -0
- package/lib/cjs/components/orders/OrderListEmpty.d.ts +17 -0
- package/lib/cjs/components/orders/OrderListEmpty.js +2 -0
- package/lib/cjs/components/orders/OrderListPaginationButtons.d.ts +48 -0
- package/lib/cjs/components/orders/OrderListPaginationButtons.js +2 -0
- package/lib/cjs/components/orders/OrderListPaginationInfo.d.ts +29 -0
- package/lib/cjs/components/orders/OrderListPaginationInfo.js +2 -0
- package/lib/cjs/components/orders/OrderListRow.d.ts +29 -0
- package/lib/cjs/components/orders/OrderListRow.js +2 -0
- package/lib/cjs/components/orders/OrderNumber.d.ts +5 -0
- package/lib/cjs/components/orders/OrderNumber.js +2 -0
- package/lib/cjs/components/orders/OrderStorage.d.ts +31 -0
- package/lib/cjs/components/orders/OrderStorage.js +2 -0
- package/lib/cjs/components/orders/PaymentMethodAmount.d.ts +4 -0
- package/lib/cjs/components/orders/PaymentMethodAmount.js +2 -0
- package/lib/cjs/components/orders/PlaceOrderButton.d.ts +35 -0
- package/lib/cjs/components/orders/PlaceOrderButton.js +2 -0
- package/lib/cjs/components/orders/PlaceOrderContainer.d.ts +8 -0
- package/lib/cjs/components/orders/PlaceOrderContainer.js +2 -0
- package/lib/cjs/components/orders/PrivacyAndTermsCheckbox.d.ts +4 -0
- package/lib/cjs/components/orders/PrivacyAndTermsCheckbox.js +2 -0
- package/lib/cjs/components/orders/ShippingAmount.d.ts +4 -0
- package/lib/cjs/components/orders/ShippingAmount.js +2 -0
- package/lib/cjs/components/orders/SubTotalAmount.d.ts +4 -0
- package/lib/cjs/components/orders/SubTotalAmount.js +2 -0
- package/lib/cjs/components/orders/TaxesAmount.d.ts +4 -0
- package/lib/cjs/components/orders/TaxesAmount.js +2 -0
- package/lib/cjs/components/orders/TotalAmount.d.ts +4 -0
- package/lib/cjs/components/orders/TotalAmount.js +2 -0
- package/lib/cjs/components/parcels/ParcelField.d.ts +14 -0
- package/lib/cjs/components/parcels/ParcelField.js +2 -0
- package/lib/cjs/components/parcels/ParcelLineItem.d.ts +7 -0
- package/lib/cjs/components/parcels/ParcelLineItem.js +2 -0
- package/lib/cjs/components/parcels/ParcelLineItemField.d.ts +14 -0
- package/lib/cjs/components/parcels/ParcelLineItemField.js +2 -0
- package/lib/cjs/components/parcels/ParcelLineItemsCount.d.ts +18 -0
- package/lib/cjs/components/parcels/ParcelLineItemsCount.js +2 -0
- package/lib/cjs/components/parcels/Parcels.d.ts +7 -0
- package/lib/cjs/components/parcels/Parcels.js +2 -0
- package/lib/cjs/components/parcels/ParcelsCount.d.ts +18 -0
- package/lib/cjs/components/parcels/ParcelsCount.js +2 -0
- package/lib/cjs/components/payment_gateways/AdyenGateway.d.ts +5 -0
- package/lib/cjs/components/payment_gateways/AdyenGateway.js +2 -0
- package/lib/cjs/components/payment_gateways/BraintreeGateway.d.ts +5 -0
- package/lib/cjs/components/payment_gateways/BraintreeGateway.js +2 -0
- package/lib/cjs/components/payment_gateways/CheckoutComGateway.d.ts +5 -0
- package/lib/cjs/components/payment_gateways/CheckoutComGateway.js +2 -0
- package/lib/cjs/components/payment_gateways/ExternalGateway.d.ts +5 -0
- package/lib/cjs/components/payment_gateways/ExternalGateway.js +2 -0
- package/lib/cjs/components/payment_gateways/KlarnaGateway.d.ts +5 -0
- package/lib/cjs/components/payment_gateways/KlarnaGateway.js +2 -0
- package/lib/cjs/components/payment_gateways/PaymentGateway.d.ts +16 -0
- package/lib/cjs/components/payment_gateways/PaymentGateway.js +2 -0
- package/lib/cjs/components/payment_gateways/PaypalGateway.d.ts +5 -0
- package/lib/cjs/components/payment_gateways/PaypalGateway.js +2 -0
- package/lib/cjs/components/payment_gateways/StripeGateway.d.ts +5 -0
- package/lib/cjs/components/payment_gateways/StripeGateway.js +2 -0
- package/lib/cjs/components/payment_gateways/WireTransferGateway.d.ts +5 -0
- package/lib/cjs/components/payment_gateways/WireTransferGateway.js +2 -0
- package/lib/cjs/components/payment_methods/PaymentMethod.d.ts +45 -0
- package/lib/cjs/components/payment_methods/PaymentMethod.js +2 -0
- package/lib/cjs/components/payment_methods/PaymentMethodName.d.ts +10 -0
- package/lib/cjs/components/payment_methods/PaymentMethodName.js +2 -0
- package/lib/cjs/components/payment_methods/PaymentMethodPrice.d.ts +8 -0
- package/lib/cjs/components/payment_methods/PaymentMethodPrice.js +2 -0
- package/lib/cjs/components/payment_methods/PaymentMethodRadioButton.d.ts +17 -0
- package/lib/cjs/components/payment_methods/PaymentMethodRadioButton.js +2 -0
- package/lib/cjs/components/payment_methods/PaymentMethodsContainer.d.ts +8 -0
- package/lib/cjs/components/payment_methods/PaymentMethodsContainer.js +2 -0
- package/lib/cjs/components/payment_source/AdyenPayment.d.ts +66 -0
- package/lib/cjs/components/payment_source/AdyenPayment.js +2 -0
- package/lib/cjs/components/payment_source/BraintreePayment.d.ts +32 -0
- package/lib/cjs/components/payment_source/BraintreePayment.js +2 -0
- package/lib/cjs/components/payment_source/CheckoutComPayment.d.ts +23 -0
- package/lib/cjs/components/payment_source/CheckoutComPayment.js +2 -0
- package/lib/cjs/components/payment_source/ExternalPayment.d.ts +24 -0
- package/lib/cjs/components/payment_source/ExternalPayment.js +2 -0
- package/lib/cjs/components/payment_source/KlarnaPayment.d.ts +10 -0
- package/lib/cjs/components/payment_source/KlarnaPayment.js +2 -0
- package/lib/cjs/components/payment_source/PaymentSource.d.ts +19 -0
- package/lib/cjs/components/payment_source/PaymentSource.js +2 -0
- package/lib/cjs/components/payment_source/PaymentSourceBrandIcon.d.ts +15 -0
- package/lib/cjs/components/payment_source/PaymentSourceBrandIcon.js +2 -0
- package/lib/cjs/components/payment_source/PaymentSourceBrandName.d.ts +12 -0
- package/lib/cjs/components/payment_source/PaymentSourceBrandName.js +2 -0
- package/lib/cjs/components/payment_source/PaymentSourceDetail.d.ts +15 -0
- package/lib/cjs/components/payment_source/PaymentSourceDetail.js +2 -0
- package/lib/cjs/components/payment_source/PaymentSourceEditButton.d.ts +10 -0
- package/lib/cjs/components/payment_source/PaymentSourceEditButton.js +2 -0
- package/lib/cjs/components/payment_source/PaypalPayment.d.ts +12 -0
- package/lib/cjs/components/payment_source/PaypalPayment.js +2 -0
- package/lib/cjs/components/payment_source/StripeExpressPayment.d.ts +6 -0
- package/lib/cjs/components/payment_source/StripeExpressPayment.js +2 -0
- package/lib/cjs/components/payment_source/StripePayment.d.ts +22 -0
- package/lib/cjs/components/payment_source/StripePayment.js +2 -0
- package/lib/cjs/components/payment_source/WireTransferPayment.d.ts +12 -0
- package/lib/cjs/components/payment_source/WireTransferPayment.js +2 -0
- package/lib/cjs/components/prices/Price.d.ts +35 -0
- package/lib/cjs/components/prices/Price.js +2 -0
- package/lib/cjs/components/prices/PricesContainer.d.ts +41 -0
- package/lib/cjs/components/prices/PricesContainer.js +2 -0
- package/lib/cjs/components/shipments/Shipment.d.ts +10 -0
- package/lib/cjs/components/shipments/Shipment.js +2 -0
- package/lib/cjs/components/shipments/ShipmentField.d.ts +12 -0
- package/lib/cjs/components/shipments/ShipmentField.js +2 -0
- package/lib/cjs/components/shipments/ShipmentsContainer.d.ts +6 -0
- package/lib/cjs/components/shipments/ShipmentsContainer.js +2 -0
- package/lib/cjs/components/shipments/ShipmentsCount.d.ts +18 -0
- package/lib/cjs/components/shipments/ShipmentsCount.js +2 -0
- package/lib/cjs/components/shipping_methods/ShippingMethod.d.ts +8 -0
- package/lib/cjs/components/shipping_methods/ShippingMethod.js +2 -0
- package/lib/cjs/components/shipping_methods/ShippingMethodName.d.ts +11 -0
- package/lib/cjs/components/shipping_methods/ShippingMethodName.js +2 -0
- package/lib/cjs/components/shipping_methods/ShippingMethodPrice.d.ts +20 -0
- package/lib/cjs/components/shipping_methods/ShippingMethodPrice.js +2 -0
- package/lib/cjs/components/shipping_methods/ShippingMethodRadioButton.d.ts +17 -0
- package/lib/cjs/components/shipping_methods/ShippingMethodRadioButton.js +2 -0
- package/lib/cjs/components/skus/AvailabilityContainer.d.ts +34 -0
- package/lib/cjs/components/skus/AvailabilityContainer.js +2 -0
- package/lib/cjs/components/skus/AvailabilityTemplate.d.ts +52 -0
- package/lib/cjs/components/skus/AvailabilityTemplate.js +2 -0
- package/lib/cjs/components/skus/DeliveryLeadTime.d.ts +10 -0
- package/lib/cjs/components/skus/DeliveryLeadTime.js +2 -0
- package/lib/cjs/components/skus/SkuField.d.ts +25 -0
- package/lib/cjs/components/skus/SkuField.js +2 -0
- package/lib/cjs/components/skus/SkuList.d.ts +10 -0
- package/lib/cjs/components/skus/SkuList.js +2 -0
- package/lib/cjs/components/skus/SkuListsContainer.d.ts +6 -0
- package/lib/cjs/components/skus/SkuListsContainer.js +2 -0
- package/lib/cjs/components/skus/Skus.d.ts +18 -0
- package/lib/cjs/components/skus/Skus.js +2 -0
- package/lib/cjs/components/skus/SkusContainer.d.ts +31 -0
- package/lib/cjs/components/skus/SkusContainer.js +2 -0
- package/lib/cjs/components/stock_transfers/StockTransfer.d.ts +7 -0
- package/lib/cjs/components/stock_transfers/StockTransfer.js +2 -0
- package/lib/cjs/components/stock_transfers/StockTransferField.d.ts +10 -0
- package/lib/cjs/components/stock_transfers/StockTransferField.js +2 -0
- package/lib/cjs/components/utils/AddressCardsTemplate.d.ts +26 -0
- package/lib/cjs/components/utils/AddressCardsTemplate.js +2 -0
- package/lib/cjs/components/utils/BaseField.d.ts +8 -0
- package/lib/cjs/components/utils/BaseField.js +2 -0
- package/lib/cjs/components/utils/BaseInput.d.ts +5 -0
- package/lib/cjs/components/utils/BaseInput.js +2 -0
- package/lib/cjs/components/utils/BaseOrderPrice.d.ts +6 -0
- package/lib/cjs/components/utils/BaseOrderPrice.js +2 -0
- package/lib/cjs/components/utils/BaseSelect.d.ts +5 -0
- package/lib/cjs/components/utils/BaseSelect.js +2 -0
- package/lib/cjs/components/utils/ErrorBoundary.d.ts +14 -0
- package/lib/cjs/components/utils/ErrorBoundary.js +2 -0
- package/lib/cjs/components/utils/GenericFieldComponent.d.ts +58 -0
- package/lib/cjs/components/utils/GenericFieldComponent.js +2 -0
- package/lib/cjs/components/utils/Parent.d.ts +6 -0
- package/lib/cjs/components/utils/Parent.js +2 -0
- package/lib/cjs/components/utils/PaymentCardsTemplate.d.ts +41 -0
- package/lib/cjs/components/utils/PaymentCardsTemplate.js +2 -0
- package/lib/cjs/components/utils/PriceTemplate.d.ts +8 -0
- package/lib/cjs/components/utils/PriceTemplate.js +2 -0
- package/lib/cjs/components/utils/getAllErrors.d.ts +16 -0
- package/lib/cjs/components/utils/getAllErrors.js +2 -0
- package/lib/cjs/config/currency.d.ts +5 -0
- package/lib/cjs/config/currency.js +2 -0
- package/lib/cjs/context/AddressChildrenContext.d.ts +6 -0
- package/lib/cjs/context/AddressChildrenContext.js +2 -0
- package/lib/cjs/context/AddressContext.d.ts +18 -0
- package/lib/cjs/context/AddressContext.js +2 -0
- package/lib/cjs/context/AvailabilityContext.d.ts +2 -0
- package/lib/cjs/context/AvailabilityContext.js +2 -0
- package/lib/cjs/context/BillingAddressContext.d.ts +9 -0
- package/lib/cjs/context/BillingAddressContext.js +2 -0
- package/lib/cjs/context/BillingAddressFormContext.d.ts +22 -0
- package/lib/cjs/context/BillingAddressFormContext.js +2 -0
- package/lib/cjs/context/CommerceLayerContext.d.ts +6 -0
- package/lib/cjs/context/CommerceLayerContext.js +2 -0
- package/lib/cjs/context/CouponAndGiftCardFormContext.d.ts +8 -0
- package/lib/cjs/context/CouponAndGiftCardFormContext.js +2 -0
- package/lib/cjs/context/CustomerAddressFormContext.d.ts +17 -0
- package/lib/cjs/context/CustomerAddressFormContext.js +2 -0
- package/lib/cjs/context/CustomerContext.d.ts +29 -0
- package/lib/cjs/context/CustomerContext.js +2 -0
- package/lib/cjs/context/CustomerPaymentSourceContext.d.ts +11 -0
- package/lib/cjs/context/CustomerPaymentSourceContext.js +2 -0
- package/lib/cjs/context/ExternalFunctionContext.d.ts +11 -0
- package/lib/cjs/context/ExternalFunctionContext.js +2 -0
- package/lib/cjs/context/GiftCardContext.d.ts +10 -0
- package/lib/cjs/context/GiftCardContext.js +2 -0
- package/lib/cjs/context/InStockSubscriptionContext.d.ts +6 -0
- package/lib/cjs/context/InStockSubscriptionContext.js +2 -0
- package/lib/cjs/context/LineItemChildrenContext.d.ts +8 -0
- package/lib/cjs/context/LineItemChildrenContext.js +2 -0
- package/lib/cjs/context/LineItemContext.d.ts +7 -0
- package/lib/cjs/context/LineItemContext.js +2 -0
- package/lib/cjs/context/LineItemOptionChildrenContext.d.ts +9 -0
- package/lib/cjs/context/LineItemOptionChildrenContext.js +2 -0
- package/lib/cjs/context/OrderContext.d.ts +30 -0
- package/lib/cjs/context/OrderContext.js +2 -0
- package/lib/cjs/context/OrderListChildrenContext.d.ts +73 -0
- package/lib/cjs/context/OrderListChildrenContext.js +2 -0
- package/lib/cjs/context/OrderListPaginationContext.d.ts +15 -0
- package/lib/cjs/context/OrderListPaginationContext.js +2 -0
- package/lib/cjs/context/OrderStorageContext.d.ts +10 -0
- package/lib/cjs/context/OrderStorageContext.js +2 -0
- package/lib/cjs/context/ParcelChildrenContext.d.ts +6 -0
- package/lib/cjs/context/ParcelChildrenContext.js +2 -0
- package/lib/cjs/context/ParcelLineItemChildrenContext.d.ts +6 -0
- package/lib/cjs/context/ParcelLineItemChildrenContext.js +2 -0
- package/lib/cjs/context/PaymentMethodChildrenContext.d.ts +10 -0
- package/lib/cjs/context/PaymentMethodChildrenContext.js +2 -0
- package/lib/cjs/context/PaymentMethodContext.d.ts +13 -0
- package/lib/cjs/context/PaymentMethodContext.js +2 -0
- package/lib/cjs/context/PaymentSourceContext.d.ts +14 -0
- package/lib/cjs/context/PaymentSourceContext.js +2 -0
- package/lib/cjs/context/PlaceOrderContext.d.ts +12 -0
- package/lib/cjs/context/PlaceOrderContext.js +2 -0
- package/lib/cjs/context/PricesContext.d.ts +6 -0
- package/lib/cjs/context/PricesContext.js +2 -0
- package/lib/cjs/context/ShipmentChildrenContext.d.ts +13 -0
- package/lib/cjs/context/ShipmentChildrenContext.js +2 -0
- package/lib/cjs/context/ShipmentContext.d.ts +10 -0
- package/lib/cjs/context/ShipmentContext.js +2 -0
- package/lib/cjs/context/ShippingAddressContext.d.ts +9 -0
- package/lib/cjs/context/ShippingAddressContext.js +2 -0
- package/lib/cjs/context/ShippingAddressFormContext.d.ts +3 -0
- package/lib/cjs/context/ShippingAddressFormContext.js +2 -0
- package/lib/cjs/context/ShippingMethodChildrenContext.d.ts +9 -0
- package/lib/cjs/context/ShippingMethodChildrenContext.js +2 -0
- package/lib/cjs/context/SkuChildrenContext.d.ts +8 -0
- package/lib/cjs/context/SkuChildrenContext.js +2 -0
- package/lib/cjs/context/SkuContext.d.ts +8 -0
- package/lib/cjs/context/SkuContext.js +2 -0
- package/lib/cjs/context/SkuListsContext.d.ts +5 -0
- package/lib/cjs/context/SkuListsContext.js +2 -0
- package/lib/cjs/context/StockTransferChildrenContext.d.ts +6 -0
- package/lib/cjs/context/StockTransferChildrenContext.js +2 -0
- package/lib/cjs/hooks/useCommerceLayer.d.ts +12 -0
- package/lib/cjs/hooks/useCommerceLayer.js +2 -0
- package/lib/cjs/hooks/useCustomerContainer.d.ts +12 -0
- package/lib/cjs/hooks/useCustomerContainer.js +2 -0
- package/lib/cjs/hooks/useOrderContainer.d.ts +16 -0
- package/lib/cjs/hooks/useOrderContainer.js +2 -0
- package/lib/cjs/index.d.ts +107 -0
- package/lib/cjs/index.js +2 -0
- package/lib/cjs/reducers/AddressReducer.d.ts +80 -0
- package/lib/cjs/reducers/AddressReducer.js +2 -0
- package/lib/cjs/reducers/AvailabilityReducer.d.ts +53 -0
- package/lib/cjs/reducers/AvailabilityReducer.js +2 -0
- package/lib/cjs/reducers/BillingAddressReducer.d.ts +31 -0
- package/lib/cjs/reducers/BillingAddressReducer.js +2 -0
- package/lib/cjs/reducers/CustomerReducer.d.ts +183 -0
- package/lib/cjs/reducers/CustomerReducer.js +2 -0
- package/lib/cjs/reducers/GiftCardReducer.d.ts +66 -0
- package/lib/cjs/reducers/GiftCardReducer.js +2 -0
- package/lib/cjs/reducers/InStockSubscriptionReducer.d.ts +33 -0
- package/lib/cjs/reducers/InStockSubscriptionReducer.js +2 -0
- package/lib/cjs/reducers/LineItemReducer.d.ts +47 -0
- package/lib/cjs/reducers/LineItemReducer.js +2 -0
- package/lib/cjs/reducers/OrderReducer.d.ts +171 -0
- package/lib/cjs/reducers/OrderReducer.js +2 -0
- package/lib/cjs/reducers/PaymentMethodReducer.d.ts +161 -0
- package/lib/cjs/reducers/PaymentMethodReducer.js +2 -0
- package/lib/cjs/reducers/PlaceOrderReducer.d.ts +72 -0
- package/lib/cjs/reducers/PlaceOrderReducer.js +2 -0
- package/lib/cjs/reducers/PriceReducer.d.ts +35 -0
- package/lib/cjs/reducers/PriceReducer.js +2 -0
- package/lib/cjs/reducers/ShipmentReducer.d.ts +41 -0
- package/lib/cjs/reducers/ShipmentReducer.js +2 -0
- package/lib/cjs/reducers/ShippingAddressReducer.d.ts +32 -0
- package/lib/cjs/reducers/ShippingAddressReducer.js +2 -0
- package/lib/cjs/reducers/SkuListsReducer.d.ts +21 -0
- package/lib/cjs/reducers/SkuListsReducer.js +2 -0
- package/lib/cjs/reducers/SkuReducer.d.ts +21 -0
- package/lib/cjs/reducers/SkuReducer.js +2 -0
- package/lib/cjs/typings/errors.d.ts +15 -0
- package/lib/cjs/typings/errors.js +2 -0
- package/lib/cjs/typings/globals.d.ts +6 -0
- package/lib/cjs/typings/globals.js +2 -0
- package/lib/cjs/typings/index.d.ts +117 -0
- package/lib/cjs/typings/index.js +2 -0
- package/lib/cjs/utils/PropsType.d.ts +33 -0
- package/lib/cjs/utils/PropsType.js +2 -0
- package/lib/cjs/utils/addressesManager.d.ts +64 -0
- package/lib/cjs/utils/addressesManager.js +2 -0
- package/lib/cjs/utils/adyen/manageGiftCard.d.ts +16 -0
- package/lib/cjs/utils/adyen/manageGiftCard.js +2 -0
- package/lib/cjs/utils/baseReducer.d.ts +3 -0
- package/lib/cjs/utils/baseReducer.js +2 -0
- package/lib/cjs/utils/browserInfo.d.ts +12 -0
- package/lib/cjs/utils/browserInfo.js +2 -0
- package/lib/cjs/utils/canPlaceOrder.d.ts +5 -0
- package/lib/cjs/utils/canPlaceOrder.js +2 -0
- package/lib/cjs/utils/checkIncludeResource.d.ts +8 -0
- package/lib/cjs/utils/checkIncludeResource.js +2 -0
- package/lib/cjs/utils/compareObjAttribute.d.ts +7 -0
- package/lib/cjs/utils/compareObjAttribute.js +2 -0
- package/lib/cjs/utils/countryStateCity.d.ts +801 -0
- package/lib/cjs/utils/countryStateCity.js +2 -0
- package/lib/cjs/utils/customMessages.d.ts +2 -0
- package/lib/cjs/utils/customMessages.js +2 -0
- package/lib/cjs/utils/customerOrderOptions.d.ts +3 -0
- package/lib/cjs/utils/customerOrderOptions.js +2 -0
- package/lib/cjs/utils/events.d.ts +5 -0
- package/lib/cjs/utils/events.js +2 -0
- package/lib/cjs/utils/expressPaymentHelper.d.ts +92 -0
- package/lib/cjs/utils/expressPaymentHelper.js +2 -0
- package/lib/cjs/utils/filterChildren.d.ts +12 -0
- package/lib/cjs/utils/filterChildren.js +2 -0
- package/lib/cjs/utils/formCleaner.d.ts +4 -0
- package/lib/cjs/utils/formCleaner.js +2 -0
- package/lib/cjs/utils/getAmount.d.ts +7 -0
- package/lib/cjs/utils/getAmount.js +2 -0
- package/lib/cjs/utils/getApplicationLink.d.ts +35 -0
- package/lib/cjs/utils/getApplicationLink.js +2 -0
- package/lib/cjs/utils/getCardDetails.d.ts +16 -0
- package/lib/cjs/utils/getCardDetails.js +2 -0
- package/lib/cjs/utils/getCustomerIdByToken.d.ts +6 -0
- package/lib/cjs/utils/getCustomerIdByToken.js +2 -0
- package/lib/cjs/utils/getDomain.d.ts +4 -0
- package/lib/cjs/utils/getDomain.js +2 -0
- package/lib/cjs/utils/getErrors.d.ts +19 -0
- package/lib/cjs/utils/getErrors.js +2 -0
- package/lib/cjs/utils/getLineItemsCount.d.ts +10 -0
- package/lib/cjs/utils/getLineItemsCount.js +2 -0
- package/lib/cjs/utils/getLoaderComponent.d.ts +3 -0
- package/lib/cjs/utils/getLoaderComponent.js +2 -0
- package/lib/cjs/utils/getPaymentAttributes.d.ts +17 -0
- package/lib/cjs/utils/getPaymentAttributes.js +2 -0
- package/lib/cjs/utils/getPrices.d.ts +6 -0
- package/lib/cjs/utils/getPrices.js +2 -0
- package/lib/cjs/utils/getPublicIp.d.ts +1 -0
- package/lib/cjs/utils/getPublicIp.js +2 -0
- package/lib/cjs/utils/getSdk.d.ts +3 -0
- package/lib/cjs/utils/getSdk.js +2 -0
- package/lib/cjs/utils/getSkus.d.ts +3 -0
- package/lib/cjs/utils/getSkus.js +2 -0
- package/lib/cjs/utils/hasSubscriptions.d.ts +7 -0
- package/lib/cjs/utils/hasSubscriptions.js +2 -0
- package/lib/cjs/utils/hooks/useCustomContext.d.ts +21 -0
- package/lib/cjs/utils/hooks/useCustomContext.js +2 -0
- package/lib/cjs/utils/hooks/useExternalScript.d.ts +1 -0
- package/lib/cjs/utils/hooks/useExternalScript.js +2 -0
- package/lib/cjs/utils/icons.d.ts +2 -0
- package/lib/cjs/utils/icons.js +2 -0
- package/lib/cjs/utils/isDate.d.ts +1 -0
- package/lib/cjs/utils/isDate.js +2 -0
- package/lib/cjs/utils/isEmpty.d.ts +1 -0
- package/lib/cjs/utils/isEmpty.js +2 -0
- package/lib/cjs/utils/isGuestToken.d.ts +6 -0
- package/lib/cjs/utils/isGuestToken.js +2 -0
- package/lib/cjs/utils/isJSON.d.ts +1 -0
- package/lib/cjs/utils/isJSON.js +2 -0
- package/lib/cjs/utils/jwt.d.ts +27 -0
- package/lib/cjs/utils/jwt.js +2 -0
- package/lib/cjs/utils/localStorage.d.ts +11 -0
- package/lib/cjs/utils/localStorage.js +2 -0
- package/lib/cjs/utils/omit.d.ts +1 -0
- package/lib/cjs/utils/omit.js +2 -0
- package/lib/cjs/utils/organization.d.ts +18 -0
- package/lib/cjs/utils/organization.js +2 -0
- package/lib/cjs/utils/payment-methods/sortPaymentMethods.d.ts +2 -0
- package/lib/cjs/utils/payment-methods/sortPaymentMethods.js +2 -0
- package/lib/cjs/utils/pick.d.ts +1 -0
- package/lib/cjs/utils/pick.js +2 -0
- package/lib/cjs/utils/placeholderImages.d.ts +2 -0
- package/lib/cjs/utils/placeholderImages.js +2 -0
- package/lib/cjs/utils/promisify.d.ts +1 -0
- package/lib/cjs/utils/promisify.js +2 -0
- package/lib/cjs/utils/replace.d.ts +2 -0
- package/lib/cjs/utils/replace.js +2 -0
- package/lib/cjs/utils/scrollbarWidth.d.ts +1 -0
- package/lib/cjs/utils/scrollbarWidth.js +2 -0
- package/lib/cjs/utils/shipments.d.ts +3 -0
- package/lib/cjs/utils/shipments.js +2 -0
- package/lib/cjs/utils/snakeToCamelCase.d.ts +5 -0
- package/lib/cjs/utils/snakeToCamelCase.js +2 -0
- package/lib/cjs/utils/stripe/retrievePaymentIntent.d.ts +14 -0
- package/lib/cjs/utils/stripe/retrievePaymentIntent.js +2 -0
- package/lib/cjs/utils/triggerAttributeHelper.d.ts +31 -0
- package/lib/cjs/utils/triggerAttributeHelper.js +2 -0
- package/lib/cjs/utils/updateOrderSubscriptionCustomerPaymentSource.d.ts +8 -0
- package/lib/cjs/utils/updateOrderSubscriptionCustomerPaymentSource.js +2 -0
- package/lib/cjs/utils/validateFormFields.d.ts +16 -0
- package/lib/cjs/utils/validateFormFields.js +2 -0
- package/lib/esm/components/ExternalFunction.d.ts +7 -0
- package/lib/esm/components/ExternalFunction.js +2 -0
- package/lib/esm/components/MetadataInput.d.ts +5 -0
- package/lib/esm/components/MetadataInput.js +2 -0
- package/lib/esm/components/SubmitButton.d.ts +10 -0
- package/lib/esm/components/SubmitButton.js +2 -0
- package/lib/esm/components/addresses/Address.d.ts +31 -0
- package/lib/esm/components/addresses/Address.js +2 -0
- package/lib/esm/components/addresses/AddressCountrySelector.d.ts +34 -0
- package/lib/esm/components/addresses/AddressCountrySelector.js +2 -0
- package/lib/esm/components/addresses/AddressField.d.ts +61 -0
- package/lib/esm/components/addresses/AddressField.js +2 -0
- package/lib/esm/components/addresses/AddressInput.d.ts +34 -0
- package/lib/esm/components/addresses/AddressInput.js +2 -0
- package/lib/esm/components/addresses/AddressInputSelect.d.ts +29 -0
- package/lib/esm/components/addresses/AddressInputSelect.js +2 -0
- package/lib/esm/components/addresses/AddressStateSelector.d.ts +50 -0
- package/lib/esm/components/addresses/AddressStateSelector.js +2 -0
- package/lib/esm/components/addresses/AddressesContainer.d.ts +40 -0
- package/lib/esm/components/addresses/AddressesContainer.js +2 -0
- package/lib/esm/components/addresses/AddressesEmpty.d.ts +26 -0
- package/lib/esm/components/addresses/AddressesEmpty.js +2 -0
- package/lib/esm/components/addresses/BillingAddressContainer.d.ts +6 -0
- package/lib/esm/components/addresses/BillingAddressContainer.js +2 -0
- package/lib/esm/components/addresses/BillingAddressForm.d.ts +34 -0
- package/lib/esm/components/addresses/BillingAddressForm.js +2 -0
- package/lib/esm/components/addresses/SaveAddressesButton.d.ts +18 -0
- package/lib/esm/components/addresses/SaveAddressesButton.js +2 -0
- package/lib/esm/components/addresses/ShippingAddressContainer.d.ts +7 -0
- package/lib/esm/components/addresses/ShippingAddressContainer.js +2 -0
- package/lib/esm/components/addresses/ShippingAddressForm.d.ts +31 -0
- package/lib/esm/components/addresses/ShippingAddressForm.js +2 -0
- package/lib/esm/components/auth/CommerceLayer.d.ts +25 -0
- package/lib/esm/components/auth/CommerceLayer.js +2 -0
- package/lib/esm/components/customers/CustomerAddressForm.d.ts +13 -0
- package/lib/esm/components/customers/CustomerAddressForm.js +2 -0
- package/lib/esm/components/customers/CustomerContainer.d.ts +38 -0
- package/lib/esm/components/customers/CustomerContainer.js +2 -0
- package/lib/esm/components/customers/CustomerField.d.ts +25 -0
- package/lib/esm/components/customers/CustomerField.js +2 -0
- package/lib/esm/components/customers/CustomerInput.d.ts +11 -0
- package/lib/esm/components/customers/CustomerInput.js +2 -0
- package/lib/esm/components/customers/CustomerPaymentSource.d.ts +11 -0
- package/lib/esm/components/customers/CustomerPaymentSource.js +2 -0
- package/lib/esm/components/customers/CustomerPaymentSourceEmpty.d.ts +14 -0
- package/lib/esm/components/customers/CustomerPaymentSourceEmpty.js +2 -0
- package/lib/esm/components/customers/MyAccountLink.d.ts +38 -0
- package/lib/esm/components/customers/MyAccountLink.js +2 -0
- package/lib/esm/components/customers/MyIdentityLink.d.ts +59 -0
- package/lib/esm/components/customers/MyIdentityLink.js +2 -0
- package/lib/esm/components/customers/SaveCustomerButton.d.ts +12 -0
- package/lib/esm/components/customers/SaveCustomerButton.js +2 -0
- package/lib/esm/components/errors/Errors.d.ts +31 -0
- package/lib/esm/components/errors/Errors.js +2 -0
- package/lib/esm/components/gift_cards/GiftCard.d.ts +10 -0
- package/lib/esm/components/gift_cards/GiftCard.js +2 -0
- package/lib/esm/components/gift_cards/GiftCardContainer.d.ts +6 -0
- package/lib/esm/components/gift_cards/GiftCardContainer.js +2 -0
- package/lib/esm/components/gift_cards/GiftCardCurrencySelector.d.ts +7 -0
- package/lib/esm/components/gift_cards/GiftCardCurrencySelector.js +2 -0
- package/lib/esm/components/gift_cards/GiftCardInput.d.ts +7 -0
- package/lib/esm/components/gift_cards/GiftCardInput.js +2 -0
- package/lib/esm/components/gift_cards/GiftCardOrCouponCode.d.ts +16 -0
- package/lib/esm/components/gift_cards/GiftCardOrCouponCode.js +2 -0
- package/lib/esm/components/gift_cards/GiftCardOrCouponForm.d.ts +15 -0
- package/lib/esm/components/gift_cards/GiftCardOrCouponForm.js +2 -0
- package/lib/esm/components/gift_cards/GiftCardOrCouponInput.d.ts +11 -0
- package/lib/esm/components/gift_cards/GiftCardOrCouponInput.js +2 -0
- package/lib/esm/components/gift_cards/GiftCardOrCouponRemoveButton.d.ts +20 -0
- package/lib/esm/components/gift_cards/GiftCardOrCouponRemoveButton.js +2 -0
- package/lib/esm/components/gift_cards/GiftCardOrCouponSubmit.d.ts +10 -0
- package/lib/esm/components/gift_cards/GiftCardOrCouponSubmit.js +2 -0
- package/lib/esm/components/gift_cards/GiftCardRecipientInput.d.ts +0 -0
- package/lib/esm/components/gift_cards/GiftCardRecipientInput.js +2 -0
- package/lib/esm/components/in_stock_subscriptions/InStockSubscriptionButton.d.ts +36 -0
- package/lib/esm/components/in_stock_subscriptions/InStockSubscriptionButton.js +2 -0
- package/lib/esm/components/in_stock_subscriptions/InStockSubscriptionsContainer.d.ts +10 -0
- package/lib/esm/components/in_stock_subscriptions/InStockSubscriptionsContainer.js +2 -0
- package/lib/esm/components/line_items/LineItem.d.ts +8 -0
- package/lib/esm/components/line_items/LineItem.js +2 -0
- package/lib/esm/components/line_items/LineItemAmount.d.ts +7 -0
- package/lib/esm/components/line_items/LineItemAmount.js +2 -0
- package/lib/esm/components/line_items/LineItemCode.d.ts +13 -0
- package/lib/esm/components/line_items/LineItemCode.js +2 -0
- package/lib/esm/components/line_items/LineItemField.d.ts +14 -0
- package/lib/esm/components/line_items/LineItemField.js +2 -0
- package/lib/esm/components/line_items/LineItemImage.d.ts +17 -0
- package/lib/esm/components/line_items/LineItemImage.js +2 -0
- package/lib/esm/components/line_items/LineItemName.d.ts +12 -0
- package/lib/esm/components/line_items/LineItemName.js +2 -0
- package/lib/esm/components/line_items/LineItemOption.d.ts +19 -0
- package/lib/esm/components/line_items/LineItemOption.js +2 -0
- package/lib/esm/components/line_items/LineItemOptions.d.ts +16 -0
- package/lib/esm/components/line_items/LineItemOptions.js +2 -0
- package/lib/esm/components/line_items/LineItemQuantity.d.ts +21 -0
- package/lib/esm/components/line_items/LineItemQuantity.js +2 -0
- package/lib/esm/components/line_items/LineItemRemoveLink.d.ts +14 -0
- package/lib/esm/components/line_items/LineItemRemoveLink.js +2 -0
- package/lib/esm/components/line_items/LineItemsContainer.d.ts +9 -0
- package/lib/esm/components/line_items/LineItemsContainer.js +2 -0
- package/lib/esm/components/line_items/LineItemsCount.d.ts +12 -0
- package/lib/esm/components/line_items/LineItemsCount.js +2 -0
- package/lib/esm/components/line_items/LineItemsEmpty.d.ts +12 -0
- package/lib/esm/components/line_items/LineItemsEmpty.js +2 -0
- package/lib/esm/components/orders/AddToCartButton.d.ts +95 -0
- package/lib/esm/components/orders/AddToCartButton.js +2 -0
- package/lib/esm/components/orders/AdjustmentAmount.d.ts +4 -0
- package/lib/esm/components/orders/AdjustmentAmount.js +2 -0
- package/lib/esm/components/orders/CartLink.d.ts +47 -0
- package/lib/esm/components/orders/CartLink.js +2 -0
- package/lib/esm/components/orders/CheckoutLink.d.ts +28 -0
- package/lib/esm/components/orders/CheckoutLink.js +2 -0
- package/lib/esm/components/orders/DiscountAmount.d.ts +4 -0
- package/lib/esm/components/orders/DiscountAmount.js +2 -0
- package/lib/esm/components/orders/GiftCardAmount.d.ts +4 -0
- package/lib/esm/components/orders/GiftCardAmount.js +2 -0
- package/lib/esm/components/orders/HostedCart.d.ts +58 -0
- package/lib/esm/components/orders/HostedCart.js +2 -0
- package/lib/esm/components/orders/OrderContainer.d.ts +62 -0
- package/lib/esm/components/orders/OrderContainer.js +2 -0
- package/lib/esm/components/orders/OrderList.d.ts +83 -0
- package/lib/esm/components/orders/OrderList.js +2 -0
- package/lib/esm/components/orders/OrderListEmpty.d.ts +17 -0
- package/lib/esm/components/orders/OrderListEmpty.js +2 -0
- package/lib/esm/components/orders/OrderListPaginationButtons.d.ts +48 -0
- package/lib/esm/components/orders/OrderListPaginationButtons.js +2 -0
- package/lib/esm/components/orders/OrderListPaginationInfo.d.ts +29 -0
- package/lib/esm/components/orders/OrderListPaginationInfo.js +2 -0
- package/lib/esm/components/orders/OrderListRow.d.ts +29 -0
- package/lib/esm/components/orders/OrderListRow.js +2 -0
- package/lib/esm/components/orders/OrderNumber.d.ts +5 -0
- package/lib/esm/components/orders/OrderNumber.js +2 -0
- package/lib/esm/components/orders/OrderStorage.d.ts +31 -0
- package/lib/esm/components/orders/OrderStorage.js +2 -0
- package/lib/esm/components/orders/PaymentMethodAmount.d.ts +4 -0
- package/lib/esm/components/orders/PaymentMethodAmount.js +2 -0
- package/lib/esm/components/orders/PlaceOrderButton.d.ts +35 -0
- package/lib/esm/components/orders/PlaceOrderButton.js +2 -0
- package/lib/esm/components/orders/PlaceOrderContainer.d.ts +8 -0
- package/lib/esm/components/orders/PlaceOrderContainer.js +2 -0
- package/lib/esm/components/orders/PrivacyAndTermsCheckbox.d.ts +4 -0
- package/lib/esm/components/orders/PrivacyAndTermsCheckbox.js +2 -0
- package/lib/esm/components/orders/ShippingAmount.d.ts +4 -0
- package/lib/esm/components/orders/ShippingAmount.js +2 -0
- package/lib/esm/components/orders/SubTotalAmount.d.ts +4 -0
- package/lib/esm/components/orders/SubTotalAmount.js +2 -0
- package/lib/esm/components/orders/TaxesAmount.d.ts +4 -0
- package/lib/esm/components/orders/TaxesAmount.js +2 -0
- package/lib/esm/components/orders/TotalAmount.d.ts +4 -0
- package/lib/esm/components/orders/TotalAmount.js +2 -0
- package/lib/esm/components/parcels/ParcelField.d.ts +14 -0
- package/lib/esm/components/parcels/ParcelField.js +2 -0
- package/lib/esm/components/parcels/ParcelLineItem.d.ts +7 -0
- package/lib/esm/components/parcels/ParcelLineItem.js +2 -0
- package/lib/esm/components/parcels/ParcelLineItemField.d.ts +14 -0
- package/lib/esm/components/parcels/ParcelLineItemField.js +2 -0
- package/lib/esm/components/parcels/ParcelLineItemsCount.d.ts +18 -0
- package/lib/esm/components/parcels/ParcelLineItemsCount.js +2 -0
- package/lib/esm/components/parcels/Parcels.d.ts +7 -0
- package/lib/esm/components/parcels/Parcels.js +2 -0
- package/lib/esm/components/parcels/ParcelsCount.d.ts +18 -0
- package/lib/esm/components/parcels/ParcelsCount.js +2 -0
- package/lib/esm/components/payment_gateways/AdyenGateway.d.ts +5 -0
- package/lib/esm/components/payment_gateways/AdyenGateway.js +2 -0
- package/lib/esm/components/payment_gateways/BraintreeGateway.d.ts +5 -0
- package/lib/esm/components/payment_gateways/BraintreeGateway.js +2 -0
- package/lib/esm/components/payment_gateways/CheckoutComGateway.d.ts +5 -0
- package/lib/esm/components/payment_gateways/CheckoutComGateway.js +2 -0
- package/lib/esm/components/payment_gateways/ExternalGateway.d.ts +5 -0
- package/lib/esm/components/payment_gateways/ExternalGateway.js +2 -0
- package/lib/esm/components/payment_gateways/KlarnaGateway.d.ts +5 -0
- package/lib/esm/components/payment_gateways/KlarnaGateway.js +2 -0
- package/lib/esm/components/payment_gateways/PaymentGateway.d.ts +16 -0
- package/lib/esm/components/payment_gateways/PaymentGateway.js +2 -0
- package/lib/esm/components/payment_gateways/PaypalGateway.d.ts +5 -0
- package/lib/esm/components/payment_gateways/PaypalGateway.js +2 -0
- package/lib/esm/components/payment_gateways/StripeGateway.d.ts +5 -0
- package/lib/esm/components/payment_gateways/StripeGateway.js +2 -0
- package/lib/esm/components/payment_gateways/WireTransferGateway.d.ts +5 -0
- package/lib/esm/components/payment_gateways/WireTransferGateway.js +2 -0
- package/lib/esm/components/payment_methods/PaymentMethod.d.ts +45 -0
- package/lib/esm/components/payment_methods/PaymentMethod.js +2 -0
- package/lib/esm/components/payment_methods/PaymentMethodName.d.ts +10 -0
- package/lib/esm/components/payment_methods/PaymentMethodName.js +2 -0
- package/lib/esm/components/payment_methods/PaymentMethodPrice.d.ts +8 -0
- package/lib/esm/components/payment_methods/PaymentMethodPrice.js +2 -0
- package/lib/esm/components/payment_methods/PaymentMethodRadioButton.d.ts +17 -0
- package/lib/esm/components/payment_methods/PaymentMethodRadioButton.js +2 -0
- package/lib/esm/components/payment_methods/PaymentMethodsContainer.d.ts +8 -0
- package/lib/esm/components/payment_methods/PaymentMethodsContainer.js +2 -0
- package/lib/esm/components/payment_source/AdyenPayment.d.ts +66 -0
- package/lib/esm/components/payment_source/AdyenPayment.js +2 -0
- package/lib/esm/components/payment_source/BraintreePayment.d.ts +32 -0
- package/lib/esm/components/payment_source/BraintreePayment.js +2 -0
- package/lib/esm/components/payment_source/CheckoutComPayment.d.ts +23 -0
- package/lib/esm/components/payment_source/CheckoutComPayment.js +2 -0
- package/lib/esm/components/payment_source/ExternalPayment.d.ts +24 -0
- package/lib/esm/components/payment_source/ExternalPayment.js +2 -0
- package/lib/esm/components/payment_source/KlarnaPayment.d.ts +10 -0
- package/lib/esm/components/payment_source/KlarnaPayment.js +2 -0
- package/lib/esm/components/payment_source/PaymentSource.d.ts +19 -0
- package/lib/esm/components/payment_source/PaymentSource.js +2 -0
- package/lib/esm/components/payment_source/PaymentSourceBrandIcon.d.ts +15 -0
- package/lib/esm/components/payment_source/PaymentSourceBrandIcon.js +2 -0
- package/lib/esm/components/payment_source/PaymentSourceBrandName.d.ts +12 -0
- package/lib/esm/components/payment_source/PaymentSourceBrandName.js +2 -0
- package/lib/esm/components/payment_source/PaymentSourceDetail.d.ts +15 -0
- package/lib/esm/components/payment_source/PaymentSourceDetail.js +2 -0
- package/lib/esm/components/payment_source/PaymentSourceEditButton.d.ts +10 -0
- package/lib/esm/components/payment_source/PaymentSourceEditButton.js +2 -0
- package/lib/esm/components/payment_source/PaypalPayment.d.ts +12 -0
- package/lib/esm/components/payment_source/PaypalPayment.js +2 -0
- package/lib/esm/components/payment_source/StripeExpressPayment.d.ts +6 -0
- package/lib/esm/components/payment_source/StripeExpressPayment.js +2 -0
- package/lib/esm/components/payment_source/StripePayment.d.ts +22 -0
- package/lib/esm/components/payment_source/StripePayment.js +2 -0
- package/lib/esm/components/payment_source/WireTransferPayment.d.ts +12 -0
- package/lib/esm/components/payment_source/WireTransferPayment.js +2 -0
- package/lib/esm/components/prices/Price.d.ts +35 -0
- package/lib/esm/components/prices/Price.js +2 -0
- package/lib/esm/components/prices/PricesContainer.d.ts +41 -0
- package/lib/esm/components/prices/PricesContainer.js +2 -0
- package/lib/esm/components/shipments/Shipment.d.ts +10 -0
- package/lib/esm/components/shipments/Shipment.js +2 -0
- package/lib/esm/components/shipments/ShipmentField.d.ts +12 -0
- package/lib/esm/components/shipments/ShipmentField.js +2 -0
- package/lib/esm/components/shipments/ShipmentsContainer.d.ts +6 -0
- package/lib/esm/components/shipments/ShipmentsContainer.js +2 -0
- package/lib/esm/components/shipments/ShipmentsCount.d.ts +18 -0
- package/lib/esm/components/shipments/ShipmentsCount.js +2 -0
- package/lib/esm/components/shipping_methods/ShippingMethod.d.ts +8 -0
- package/lib/esm/components/shipping_methods/ShippingMethod.js +2 -0
- package/lib/esm/components/shipping_methods/ShippingMethodName.d.ts +11 -0
- package/lib/esm/components/shipping_methods/ShippingMethodName.js +2 -0
- package/lib/esm/components/shipping_methods/ShippingMethodPrice.d.ts +20 -0
- package/lib/esm/components/shipping_methods/ShippingMethodPrice.js +2 -0
- package/lib/esm/components/shipping_methods/ShippingMethodRadioButton.d.ts +17 -0
- package/lib/esm/components/shipping_methods/ShippingMethodRadioButton.js +2 -0
- package/lib/esm/components/skus/AvailabilityContainer.d.ts +34 -0
- package/lib/esm/components/skus/AvailabilityContainer.js +2 -0
- package/lib/esm/components/skus/AvailabilityTemplate.d.ts +52 -0
- package/lib/esm/components/skus/AvailabilityTemplate.js +2 -0
- package/lib/esm/components/skus/DeliveryLeadTime.d.ts +10 -0
- package/lib/esm/components/skus/DeliveryLeadTime.js +2 -0
- package/lib/esm/components/skus/SkuField.d.ts +25 -0
- package/lib/esm/components/skus/SkuField.js +2 -0
- package/lib/esm/components/skus/SkuList.d.ts +10 -0
- package/lib/esm/components/skus/SkuList.js +2 -0
- package/lib/esm/components/skus/SkuListsContainer.d.ts +6 -0
- package/lib/esm/components/skus/SkuListsContainer.js +2 -0
- package/lib/esm/components/skus/Skus.d.ts +18 -0
- package/lib/esm/components/skus/Skus.js +2 -0
- package/lib/esm/components/skus/SkusContainer.d.ts +31 -0
- package/lib/esm/components/skus/SkusContainer.js +2 -0
- package/lib/esm/components/stock_transfers/StockTransfer.d.ts +7 -0
- package/lib/esm/components/stock_transfers/StockTransfer.js +2 -0
- package/lib/esm/components/stock_transfers/StockTransferField.d.ts +10 -0
- package/lib/esm/components/stock_transfers/StockTransferField.js +2 -0
- package/lib/esm/components/utils/AddressCardsTemplate.d.ts +26 -0
- package/lib/esm/components/utils/AddressCardsTemplate.js +2 -0
- package/lib/esm/components/utils/BaseField.d.ts +8 -0
- package/lib/esm/components/utils/BaseField.js +2 -0
- package/lib/esm/components/utils/BaseInput.d.ts +5 -0
- package/lib/esm/components/utils/BaseInput.js +2 -0
- package/lib/esm/components/utils/BaseOrderPrice.d.ts +6 -0
- package/lib/esm/components/utils/BaseOrderPrice.js +2 -0
- package/lib/esm/components/utils/BaseSelect.d.ts +5 -0
- package/lib/esm/components/utils/BaseSelect.js +2 -0
- package/lib/esm/components/utils/ErrorBoundary.d.ts +14 -0
- package/lib/esm/components/utils/ErrorBoundary.js +2 -0
- package/lib/esm/components/utils/GenericFieldComponent.d.ts +58 -0
- package/lib/esm/components/utils/GenericFieldComponent.js +2 -0
- package/lib/esm/components/utils/Parent.d.ts +6 -0
- package/lib/esm/components/utils/Parent.js +2 -0
- package/lib/esm/components/utils/PaymentCardsTemplate.d.ts +41 -0
- package/lib/esm/components/utils/PaymentCardsTemplate.js +2 -0
- package/lib/esm/components/utils/PriceTemplate.d.ts +8 -0
- package/lib/esm/components/utils/PriceTemplate.js +2 -0
- package/lib/esm/components/utils/getAllErrors.d.ts +16 -0
- package/lib/esm/components/utils/getAllErrors.js +2 -0
- package/lib/esm/config/currency.d.ts +5 -0
- package/lib/esm/config/currency.js +2 -0
- package/lib/esm/context/AddressChildrenContext.d.ts +6 -0
- package/lib/esm/context/AddressChildrenContext.js +2 -0
- package/lib/esm/context/AddressContext.d.ts +18 -0
- package/lib/esm/context/AddressContext.js +2 -0
- package/lib/esm/context/AvailabilityContext.d.ts +2 -0
- package/lib/esm/context/AvailabilityContext.js +2 -0
- package/lib/esm/context/BillingAddressContext.d.ts +9 -0
- package/lib/esm/context/BillingAddressContext.js +2 -0
- package/lib/esm/context/BillingAddressFormContext.d.ts +22 -0
- package/lib/esm/context/BillingAddressFormContext.js +2 -0
- package/lib/esm/context/CommerceLayerContext.d.ts +6 -0
- package/lib/esm/context/CommerceLayerContext.js +2 -0
- package/lib/esm/context/CouponAndGiftCardFormContext.d.ts +8 -0
- package/lib/esm/context/CouponAndGiftCardFormContext.js +2 -0
- package/lib/esm/context/CustomerAddressFormContext.d.ts +17 -0
- package/lib/esm/context/CustomerAddressFormContext.js +2 -0
- package/lib/esm/context/CustomerContext.d.ts +29 -0
- package/lib/esm/context/CustomerContext.js +2 -0
- package/lib/esm/context/CustomerPaymentSourceContext.d.ts +11 -0
- package/lib/esm/context/CustomerPaymentSourceContext.js +2 -0
- package/lib/esm/context/ExternalFunctionContext.d.ts +11 -0
- package/lib/esm/context/ExternalFunctionContext.js +2 -0
- package/lib/esm/context/GiftCardContext.d.ts +10 -0
- package/lib/esm/context/GiftCardContext.js +2 -0
- package/lib/esm/context/InStockSubscriptionContext.d.ts +6 -0
- package/lib/esm/context/InStockSubscriptionContext.js +2 -0
- package/lib/esm/context/LineItemChildrenContext.d.ts +8 -0
- package/lib/esm/context/LineItemChildrenContext.js +2 -0
- package/lib/esm/context/LineItemContext.d.ts +7 -0
- package/lib/esm/context/LineItemContext.js +2 -0
- package/lib/esm/context/LineItemOptionChildrenContext.d.ts +9 -0
- package/lib/esm/context/LineItemOptionChildrenContext.js +2 -0
- package/lib/esm/context/OrderContext.d.ts +30 -0
- package/lib/esm/context/OrderContext.js +2 -0
- package/lib/esm/context/OrderListChildrenContext.d.ts +73 -0
- package/lib/esm/context/OrderListChildrenContext.js +2 -0
- package/lib/esm/context/OrderListPaginationContext.d.ts +15 -0
- package/lib/esm/context/OrderListPaginationContext.js +2 -0
- package/lib/esm/context/OrderStorageContext.d.ts +10 -0
- package/lib/esm/context/OrderStorageContext.js +2 -0
- package/lib/esm/context/ParcelChildrenContext.d.ts +6 -0
- package/lib/esm/context/ParcelChildrenContext.js +2 -0
- package/lib/esm/context/ParcelLineItemChildrenContext.d.ts +6 -0
- package/lib/esm/context/ParcelLineItemChildrenContext.js +2 -0
- package/lib/esm/context/PaymentMethodChildrenContext.d.ts +10 -0
- package/lib/esm/context/PaymentMethodChildrenContext.js +2 -0
- package/lib/esm/context/PaymentMethodContext.d.ts +13 -0
- package/lib/esm/context/PaymentMethodContext.js +2 -0
- package/lib/esm/context/PaymentSourceContext.d.ts +14 -0
- package/lib/esm/context/PaymentSourceContext.js +2 -0
- package/lib/esm/context/PlaceOrderContext.d.ts +12 -0
- package/lib/esm/context/PlaceOrderContext.js +2 -0
- package/lib/esm/context/PricesContext.d.ts +6 -0
- package/lib/esm/context/PricesContext.js +2 -0
- package/lib/esm/context/ShipmentChildrenContext.d.ts +13 -0
- package/lib/esm/context/ShipmentChildrenContext.js +2 -0
- package/lib/esm/context/ShipmentContext.d.ts +10 -0
- package/lib/esm/context/ShipmentContext.js +2 -0
- package/lib/esm/context/ShippingAddressContext.d.ts +9 -0
- package/lib/esm/context/ShippingAddressContext.js +2 -0
- package/lib/esm/context/ShippingAddressFormContext.d.ts +3 -0
- package/lib/esm/context/ShippingAddressFormContext.js +2 -0
- package/lib/esm/context/ShippingMethodChildrenContext.d.ts +9 -0
- package/lib/esm/context/ShippingMethodChildrenContext.js +2 -0
- package/lib/esm/context/SkuChildrenContext.d.ts +8 -0
- package/lib/esm/context/SkuChildrenContext.js +2 -0
- package/lib/esm/context/SkuContext.d.ts +8 -0
- package/lib/esm/context/SkuContext.js +2 -0
- package/lib/esm/context/SkuListsContext.d.ts +5 -0
- package/lib/esm/context/SkuListsContext.js +2 -0
- package/lib/esm/context/StockTransferChildrenContext.d.ts +6 -0
- package/lib/esm/context/StockTransferChildrenContext.js +2 -0
- package/lib/esm/hooks/useCommerceLayer.d.ts +12 -0
- package/lib/esm/hooks/useCommerceLayer.js +2 -0
- package/lib/esm/hooks/useCustomerContainer.d.ts +12 -0
- package/lib/esm/hooks/useCustomerContainer.js +2 -0
- package/lib/esm/hooks/useOrderContainer.d.ts +16 -0
- package/lib/esm/hooks/useOrderContainer.js +2 -0
- package/lib/esm/index.d.ts +107 -0
- package/lib/esm/index.js +2 -0
- package/lib/esm/reducers/AddressReducer.d.ts +80 -0
- package/lib/esm/reducers/AddressReducer.js +2 -0
- package/lib/esm/reducers/AvailabilityReducer.d.ts +53 -0
- package/lib/esm/reducers/AvailabilityReducer.js +2 -0
- package/lib/esm/reducers/BillingAddressReducer.d.ts +31 -0
- package/lib/esm/reducers/BillingAddressReducer.js +2 -0
- package/lib/esm/reducers/CustomerReducer.d.ts +183 -0
- package/lib/esm/reducers/CustomerReducer.js +2 -0
- package/lib/esm/reducers/GiftCardReducer.d.ts +66 -0
- package/lib/esm/reducers/GiftCardReducer.js +2 -0
- package/lib/esm/reducers/InStockSubscriptionReducer.d.ts +33 -0
- package/lib/esm/reducers/InStockSubscriptionReducer.js +2 -0
- package/lib/esm/reducers/LineItemReducer.d.ts +47 -0
- package/lib/esm/reducers/LineItemReducer.js +2 -0
- package/lib/esm/reducers/OrderReducer.d.ts +171 -0
- package/lib/esm/reducers/OrderReducer.js +2 -0
- package/lib/esm/reducers/PaymentMethodReducer.d.ts +161 -0
- package/lib/esm/reducers/PaymentMethodReducer.js +2 -0
- package/lib/esm/reducers/PlaceOrderReducer.d.ts +72 -0
- package/lib/esm/reducers/PlaceOrderReducer.js +2 -0
- package/lib/esm/reducers/PriceReducer.d.ts +35 -0
- package/lib/esm/reducers/PriceReducer.js +2 -0
- package/lib/esm/reducers/ShipmentReducer.d.ts +41 -0
- package/lib/esm/reducers/ShipmentReducer.js +2 -0
- package/lib/esm/reducers/ShippingAddressReducer.d.ts +32 -0
- package/lib/esm/reducers/ShippingAddressReducer.js +2 -0
- package/lib/esm/reducers/SkuListsReducer.d.ts +21 -0
- package/lib/esm/reducers/SkuListsReducer.js +2 -0
- package/lib/esm/reducers/SkuReducer.d.ts +21 -0
- package/lib/esm/reducers/SkuReducer.js +2 -0
- package/lib/esm/typings/errors.d.ts +15 -0
- package/lib/esm/typings/errors.js +2 -0
- package/lib/esm/typings/globals.d.ts +6 -0
- package/lib/esm/typings/globals.js +2 -0
- package/lib/esm/typings/index.d.ts +117 -0
- package/lib/esm/typings/index.js +2 -0
- package/lib/esm/utils/PropsType.d.ts +33 -0
- package/lib/esm/utils/PropsType.js +2 -0
- package/lib/esm/utils/addressesManager.d.ts +64 -0
- package/lib/esm/utils/addressesManager.js +2 -0
- package/lib/esm/utils/adyen/manageGiftCard.d.ts +16 -0
- package/lib/esm/utils/adyen/manageGiftCard.js +2 -0
- package/lib/esm/utils/baseReducer.d.ts +3 -0
- package/lib/esm/utils/baseReducer.js +2 -0
- package/lib/esm/utils/browserInfo.d.ts +12 -0
- package/lib/esm/utils/browserInfo.js +2 -0
- package/lib/esm/utils/canPlaceOrder.d.ts +5 -0
- package/lib/esm/utils/canPlaceOrder.js +2 -0
- package/lib/esm/utils/checkIncludeResource.d.ts +8 -0
- package/lib/esm/utils/checkIncludeResource.js +2 -0
- package/lib/esm/utils/compareObjAttribute.d.ts +7 -0
- package/lib/esm/utils/compareObjAttribute.js +2 -0
- package/lib/esm/utils/countryStateCity.d.ts +801 -0
- package/lib/esm/utils/countryStateCity.js +2 -0
- package/lib/esm/utils/customMessages.d.ts +2 -0
- package/lib/esm/utils/customMessages.js +2 -0
- package/lib/esm/utils/customerOrderOptions.d.ts +3 -0
- package/lib/esm/utils/customerOrderOptions.js +2 -0
- package/lib/esm/utils/events.d.ts +5 -0
- package/lib/esm/utils/events.js +2 -0
- package/lib/esm/utils/expressPaymentHelper.d.ts +92 -0
- package/lib/esm/utils/expressPaymentHelper.js +2 -0
- package/lib/esm/utils/filterChildren.d.ts +12 -0
- package/lib/esm/utils/filterChildren.js +2 -0
- package/lib/esm/utils/formCleaner.d.ts +4 -0
- package/lib/esm/utils/formCleaner.js +2 -0
- package/lib/esm/utils/getAmount.d.ts +7 -0
- package/lib/esm/utils/getAmount.js +2 -0
- package/lib/esm/utils/getApplicationLink.d.ts +35 -0
- package/lib/esm/utils/getApplicationLink.js +2 -0
- package/lib/esm/utils/getCardDetails.d.ts +16 -0
- package/lib/esm/utils/getCardDetails.js +2 -0
- package/lib/esm/utils/getCustomerIdByToken.d.ts +6 -0
- package/lib/esm/utils/getCustomerIdByToken.js +2 -0
- package/lib/esm/utils/getDomain.d.ts +4 -0
- package/lib/esm/utils/getDomain.js +2 -0
- package/lib/esm/utils/getErrors.d.ts +19 -0
- package/lib/esm/utils/getErrors.js +2 -0
- package/lib/esm/utils/getLineItemsCount.d.ts +10 -0
- package/lib/esm/utils/getLineItemsCount.js +2 -0
- package/lib/esm/utils/getLoaderComponent.d.ts +3 -0
- package/lib/esm/utils/getLoaderComponent.js +2 -0
- package/lib/esm/utils/getPaymentAttributes.d.ts +17 -0
- package/lib/esm/utils/getPaymentAttributes.js +2 -0
- package/lib/esm/utils/getPrices.d.ts +6 -0
- package/lib/esm/utils/getPrices.js +2 -0
- package/lib/esm/utils/getPublicIp.d.ts +1 -0
- package/lib/esm/utils/getPublicIp.js +2 -0
- package/lib/esm/utils/getSdk.d.ts +3 -0
- package/lib/esm/utils/getSdk.js +2 -0
- package/lib/esm/utils/getSkus.d.ts +3 -0
- package/lib/esm/utils/getSkus.js +2 -0
- package/lib/esm/utils/hasSubscriptions.d.ts +7 -0
- package/lib/esm/utils/hasSubscriptions.js +2 -0
- package/lib/esm/utils/hooks/useCustomContext.d.ts +21 -0
- package/lib/esm/utils/hooks/useCustomContext.js +2 -0
- package/lib/esm/utils/hooks/useExternalScript.d.ts +1 -0
- package/lib/esm/utils/hooks/useExternalScript.js +2 -0
- package/lib/esm/utils/icons.d.ts +2 -0
- package/lib/esm/utils/icons.js +2 -0
- package/lib/esm/utils/isDate.d.ts +1 -0
- package/lib/esm/utils/isDate.js +2 -0
- package/lib/esm/utils/isEmpty.d.ts +1 -0
- package/lib/esm/utils/isEmpty.js +2 -0
- package/lib/esm/utils/isGuestToken.d.ts +6 -0
- package/lib/esm/utils/isGuestToken.js +2 -0
- package/lib/esm/utils/isJSON.d.ts +1 -0
- package/lib/esm/utils/isJSON.js +2 -0
- package/lib/esm/utils/jwt.d.ts +27 -0
- package/lib/esm/utils/jwt.js +2 -0
- package/lib/esm/utils/localStorage.d.ts +11 -0
- package/lib/esm/utils/localStorage.js +2 -0
- package/lib/esm/utils/omit.d.ts +1 -0
- package/lib/esm/utils/omit.js +2 -0
- package/lib/esm/utils/organization.d.ts +18 -0
- package/lib/esm/utils/organization.js +2 -0
- package/lib/esm/utils/payment-methods/sortPaymentMethods.d.ts +2 -0
- package/lib/esm/utils/payment-methods/sortPaymentMethods.js +2 -0
- package/lib/esm/utils/pick.d.ts +1 -0
- package/lib/esm/utils/pick.js +2 -0
- package/lib/esm/utils/placeholderImages.d.ts +2 -0
- package/lib/esm/utils/placeholderImages.js +2 -0
- package/lib/esm/utils/promisify.d.ts +1 -0
- package/lib/esm/utils/promisify.js +2 -0
- package/lib/esm/utils/replace.d.ts +2 -0
- package/lib/esm/utils/replace.js +2 -0
- package/lib/esm/utils/scrollbarWidth.d.ts +1 -0
- package/lib/esm/utils/scrollbarWidth.js +2 -0
- package/lib/esm/utils/shipments.d.ts +3 -0
- package/lib/esm/utils/shipments.js +2 -0
- package/lib/esm/utils/snakeToCamelCase.d.ts +5 -0
- package/lib/esm/utils/snakeToCamelCase.js +2 -0
- package/lib/esm/utils/stripe/retrievePaymentIntent.d.ts +14 -0
- package/lib/esm/utils/stripe/retrievePaymentIntent.js +2 -0
- package/lib/esm/utils/triggerAttributeHelper.d.ts +31 -0
- package/lib/esm/utils/triggerAttributeHelper.js +2 -0
- package/lib/esm/utils/updateOrderSubscriptionCustomerPaymentSource.d.ts +8 -0
- package/lib/esm/utils/updateOrderSubscriptionCustomerPaymentSource.js +2 -0
- package/lib/esm/utils/validateFormFields.d.ts +16 -0
- package/lib/esm/utils/validateFormFields.js +2 -0
- package/lib/tsconfig.prod.esm.tsbuildinfo +1 -0
- package/lib/tsconfig.prod.tsbuildinfo +1 -0
- package/package.json +170 -35
- package/dist/index.cjs +0 -3
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -3271
- package/dist/index.d.ts +0 -3271
- package/dist/index.js +0 -3
- package/dist/index.js.map +0 -1
package/dist/index.d.cts
DELETED
|
@@ -1,3271 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ReactNode, JSX, Ref, ForwardedRef, Dispatch, Context, RefObject, CSSProperties, PropsWithoutRef, MouseEvent as MouseEvent$1, ChangeEvent } from 'react';
|
|
3
|
-
import { Address as Address$1, Order, CustomerPaymentSource, ListResponse, OrderSubscription, Customer, QueryPageSize, AddressCreate, AddressUpdate, Sku, StockTransfer as StockTransfer$1, LineItem as LineItem$1, Parcel, ParcelLineItem as ParcelLineItem$1, LineItemOption as LineItemOption$2, OrderCreate, AdyenPayment, BraintreePayment, ExternalPayment, PaypalPayment, StripePayment, WireTransfer, CheckoutComPayment, KlarnaPayment, PaymentMethod as PaymentMethod$1, Price as Price$1, Shipment as Shipment$1, ShippingMethod as ShippingMethod$1, QueryParamsList, CommerceLayerClient } from '@commercelayer/sdk';
|
|
4
|
-
import { Row, ColumnDef, SortingState } from '@tanstack/react-table';
|
|
5
|
-
import { CardConfiguration, PayPalConfiguration, DropinConfiguration } from '@adyen/adyen-web/auto';
|
|
6
|
-
import { HostedFieldFieldOptions } from 'braintree-web';
|
|
7
|
-
import { StripePaymentElementOptions, StripeElementsOptions, StripeElementLocale } from '@stripe/stripe-js';
|
|
8
|
-
import { FramesStyle } from 'frames-react';
|
|
9
|
-
|
|
10
|
-
interface Props$1u {
|
|
11
|
-
children: ReactNode;
|
|
12
|
-
url: string;
|
|
13
|
-
}
|
|
14
|
-
declare function ExternalFunction({ children, url }: Props$1u): JSX.Element;
|
|
15
|
-
|
|
16
|
-
type TResourceError = 'addresses' | 'billing_address' | 'gift_cards' | 'gift_card_or_coupon_code' | 'line_items' | 'orders' | 'payment_methods' | 'prices' | 'shipments' | 'shipping_address' | 'customer_address' | 'sku_options' | 'variant' | 'in_stock_subscriptions';
|
|
17
|
-
type ErrorChildrenComponentProps = ChildrenFunction<Omit<TErrorComponent, 'children'> & {
|
|
18
|
-
errors: string[];
|
|
19
|
-
}>;
|
|
20
|
-
interface TErrorComponent extends Omit<JSX.IntrinsicElements['span'], 'children'> {
|
|
21
|
-
/**
|
|
22
|
-
* Resource which get the error
|
|
23
|
-
*/
|
|
24
|
-
resource: TResourceError;
|
|
25
|
-
children?: ErrorChildrenComponentProps;
|
|
26
|
-
/**
|
|
27
|
-
* Field which get the error
|
|
28
|
-
*/
|
|
29
|
-
field?: string;
|
|
30
|
-
/**
|
|
31
|
-
* Error message which you can translate
|
|
32
|
-
*/
|
|
33
|
-
messages?: Array<{
|
|
34
|
-
code: CodeErrorType;
|
|
35
|
-
message: string;
|
|
36
|
-
resource?: TResourceError;
|
|
37
|
-
field?: string;
|
|
38
|
-
id?: string;
|
|
39
|
-
}>;
|
|
40
|
-
}
|
|
41
|
-
type Props$1t = TErrorComponent;
|
|
42
|
-
declare function Errors(props: Props$1t): JSX.Element;
|
|
43
|
-
|
|
44
|
-
type CodeErrorType = 'EMPTY_ERROR' | 'FILTER_NOT_ALLOWED' | 'FORBIDDEN' | 'INTERNAL_SERVER_ERROR' | 'INVALID_DATA_FORMAT' | 'INVALID_FIELD' | 'INVALID_FIELD_FORMAT' | 'INVALID_FIELD_VALUE' | 'INVALID_FILTERS_SYNTAX' | 'INVALID_FILTER_VALUE' | 'INVALID_INCLUDE' | 'INVALID_LINKS_OBJECT' | 'INVALID_PAGE_OBJECT' | 'INVALID_PAGE_VALUE' | 'INVALID_RESOURCE' | 'INVALID_RESOURCE_ID' | 'INVALID_SORT_CRITERIA' | 'INVALID_TOKEN' | 'KEY_NOT_INCLUDED_IN_URL' | 'KEY_ORDER_MISMATCH' | 'LOCKED' | 'NOT_ACCEPTABLE' | 'OUT_OF_STOCK' | 'PARAM_MISSING' | 'PARAM_NOT_ALLOWED' | 'PAYMENT_NOT_APPROVED_FOR_EXECUTION' | 'PAYMENT_INTENT_AUTHENTICATION_FAILURE' | 'RECORD_NOT_FOUND' | 'RECORD_NOT_FOUND' | 'RELATION_EXISTS' | 'NO_SHIPPING_METHODS' | 'SAVE_FAILED' | 'TYPE_MISMATCH' | 'UNAUTHORIZED' | 'UNSUPPORTED_MEDIA_TYPE' | 'VALIDATION_ERROR';
|
|
45
|
-
interface BaseError {
|
|
46
|
-
code: CodeErrorType;
|
|
47
|
-
message: string;
|
|
48
|
-
resource?: TResourceError | null;
|
|
49
|
-
field?: string;
|
|
50
|
-
id?: string;
|
|
51
|
-
title?: string;
|
|
52
|
-
detail?: string;
|
|
53
|
-
status?: string;
|
|
54
|
-
}
|
|
55
|
-
interface TAPIError {
|
|
56
|
-
errors: BaseError[];
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
type BaseSelectChildrenComponentProps = Omit<BaseSelectComponentProps, 'children'>;
|
|
60
|
-
interface Option {
|
|
61
|
-
label: string;
|
|
62
|
-
value: string | number;
|
|
63
|
-
disabled?: boolean;
|
|
64
|
-
}
|
|
65
|
-
interface BaseSelectComponentProps {
|
|
66
|
-
children?: (props: BaseSelectChildrenComponentProps) => JSX.Element;
|
|
67
|
-
options: Option[];
|
|
68
|
-
placeholder?: Option;
|
|
69
|
-
value?: string;
|
|
70
|
-
className?: string;
|
|
71
|
-
required?: boolean;
|
|
72
|
-
name: string;
|
|
73
|
-
onChange?: (event: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
74
|
-
}
|
|
75
|
-
type BaseInputChildrenComponentProps = Omit<BaseInputComponentProps, 'children'> & {
|
|
76
|
-
handleChange: (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
77
|
-
parentRef: ForwardedRef<any>;
|
|
78
|
-
};
|
|
79
|
-
interface BaseInputComponentProps {
|
|
80
|
-
ref?: Ref<any>;
|
|
81
|
-
children?: (props: BaseInputChildrenComponentProps) => JSX.Element;
|
|
82
|
-
name: string;
|
|
83
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
84
|
-
placeholder?: string;
|
|
85
|
-
}
|
|
86
|
-
type GiftCardInputName = 'balanceCents' | 'balanceMaxCents' | 'singleUse' | 'rechargeable' | 'imageUrl' | 'expiresAt' | 'referenceOrigin' | 'email' | 'firstName' | 'lastName' | 'reference';
|
|
87
|
-
type AddressInputName = 'billing_address_city' | 'billing_address_company' | 'billing_address_first_name' | 'billing_address_email' | 'billing_address_last_name' | 'billing_address_line_1' | 'billing_address_line_2' | 'billing_address_phone' | 'billing_address_state_code' | 'billing_address_zip_code' | 'billing_address_billing_info' | 'billing_address_save_to_customer_book' | `billing_address_${`metadata_${string}`}` | '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' | 'shipping_address_billing_info' | `shipping_address_${`metadata_${string}`}`;
|
|
88
|
-
type AddressStateSelectName = 'billing_address_state_code' | 'shipping_address_state_code';
|
|
89
|
-
type LoaderType = string | JSX.Element;
|
|
90
|
-
type BaseMetadataObject = Record<string, string | undefined | null>;
|
|
91
|
-
type TimeFormat = 'days' | 'hours';
|
|
92
|
-
interface BaseState {
|
|
93
|
-
[key: string]: any;
|
|
94
|
-
errors?: BaseError[];
|
|
95
|
-
}
|
|
96
|
-
type BaseFormatPrice = 'formatted' | 'cents' | 'float';
|
|
97
|
-
type BasePriceType = 'total' | 'option' | 'unit';
|
|
98
|
-
type BaseAmountComponentChildren = Omit<BaseAmountComponent, 'children'>;
|
|
99
|
-
interface BaseAmountComponent extends Omit<JSX.IntrinsicElements['span'], 'children' | 'ref'> {
|
|
100
|
-
children?: ChildrenFunction<BaseAmountComponentChildren>;
|
|
101
|
-
format?: BaseFormatPrice;
|
|
102
|
-
price?: string;
|
|
103
|
-
scheme?: string;
|
|
104
|
-
priceCents?: number;
|
|
105
|
-
labelFree?: string;
|
|
106
|
-
}
|
|
107
|
-
type ChildrenFunction<P = Record<string, any>> = (props: P) => JSX.Element | null;
|
|
108
|
-
type ExcludeTag<T extends keyof JSX.IntrinsicElements> = Exclude<keyof JSX.IntrinsicElements, T>;
|
|
109
|
-
type ExtractTag<T extends keyof JSX.IntrinsicElements> = Extract<keyof JSX.IntrinsicElements, T>;
|
|
110
|
-
type ConditionalElement<E> = ({
|
|
111
|
-
attribute: Extract<keyof E, 'image_url'>;
|
|
112
|
-
tagElement?: ExtractTag<'img'>;
|
|
113
|
-
} & JSX.IntrinsicElements['img']) | ({
|
|
114
|
-
attribute: Exclude<keyof E, 'image_url'>;
|
|
115
|
-
tagElement?: ExcludeTag<'img'>;
|
|
116
|
-
} & Omit<JSX.IntrinsicElements[ExcludeTag<'img'>], 'children'>);
|
|
117
|
-
|
|
118
|
-
type Props$1s = BaseInputComponentProps & JSX.IntrinsicElements['input'] & JSX.IntrinsicElements['textarea'];
|
|
119
|
-
declare function MetadataInput(props: Props$1s): JSX.Element;
|
|
120
|
-
|
|
121
|
-
interface ChildrenProps$n extends Omit<Props$1r, "children"> {
|
|
122
|
-
}
|
|
123
|
-
interface Props$1r extends Omit<JSX.IntrinsicElements["button"], "children" | "ref"> {
|
|
124
|
-
children?: ChildrenFunction<ChildrenProps$n>;
|
|
125
|
-
label?: string | ReactNode;
|
|
126
|
-
}
|
|
127
|
-
declare function SubmitButton(props: Props$1r): JSX.Element;
|
|
128
|
-
|
|
129
|
-
interface InitialAddressContext {
|
|
130
|
-
address: Address$1 | undefined;
|
|
131
|
-
}
|
|
132
|
-
declare const AddressChildrenContext: react.Context<InitialAddressContext>;
|
|
133
|
-
|
|
134
|
-
interface TAddressCards extends Pick<Props$1q, 'customerAddresses' | 'className'> {
|
|
135
|
-
AddressProvider: typeof AddressChildrenContext.Provider;
|
|
136
|
-
}
|
|
137
|
-
interface CustomerAddress extends Address$1 {
|
|
138
|
-
onClick: () => void;
|
|
139
|
-
handleSelect?: () => void;
|
|
140
|
-
}
|
|
141
|
-
type AddressCardsTemplateChildren = ChildrenFunction<TAddressCards>;
|
|
142
|
-
type HandleSelect = (k: number, addressId: string, customerAddressId: string, disabled: boolean, address: Address$1) => Promise<void>;
|
|
143
|
-
interface Props$1q {
|
|
144
|
-
customerAddresses: CustomerAddress[];
|
|
145
|
-
countryLock?: string | null;
|
|
146
|
-
children: AddressCardsTemplateChildren;
|
|
147
|
-
selectedClassName?: string;
|
|
148
|
-
disabledClassName?: string;
|
|
149
|
-
deselect?: boolean;
|
|
150
|
-
selected?: number | null;
|
|
151
|
-
className?: string;
|
|
152
|
-
handleSelect: HandleSelect;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
type DefaultChildrenType = JSX.Element[] | JSX.Element | null;
|
|
156
|
-
type Enumerate<N extends number, Acc extends number[] = []> = Acc['length'] extends N ? Acc[number] : Enumerate<N, [...Acc, Acc['length']]>;
|
|
157
|
-
type TRange<F extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F>>;
|
|
158
|
-
type LooseAutocomplete<T extends string> = T | Omit<string, T>;
|
|
159
|
-
|
|
160
|
-
interface Props$1p extends Omit<JSX.IntrinsicElements["div"], "children" | "onSelect"> {
|
|
161
|
-
children: DefaultChildrenType | AddressCardsTemplateChildren;
|
|
162
|
-
selectedClassName?: string;
|
|
163
|
-
disabledClassName?: string;
|
|
164
|
-
onSelect?: (address: Address$1) => void;
|
|
165
|
-
addresses?: Address$1[];
|
|
166
|
-
deselect?: boolean;
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* The Address component is aimed to read from active context the list of available addresses to generate for each of them a suitable and interactive wrapper ready to deal with addresses data.
|
|
170
|
-
*
|
|
171
|
-
* It accept:
|
|
172
|
-
* - a `selectedClassName` prop to define the className of selected generated address wrapper.
|
|
173
|
-
* - a `disabledClassName` prop to define the className of disabled generated address wrapper.
|
|
174
|
-
* - an `onSelect` prop to define a custom method triggered when an address wrapper is clicked.
|
|
175
|
-
* - an `addresses` prop to define a list of addresses to be used instead of the ones available from active context.
|
|
176
|
-
* - a `deselect` prop to define if the current address is deselected through a custom logic.
|
|
177
|
-
*
|
|
178
|
-
* <span title='Requirements' type='warning'>
|
|
179
|
-
* Must be a child of the `<AddressesContainer>` component.
|
|
180
|
-
* </span>
|
|
181
|
-
* <span title='Children' type='info'>
|
|
182
|
-
* `<AddressField>`,
|
|
183
|
-
* </span>
|
|
184
|
-
*/
|
|
185
|
-
declare function Address(props: Props$1p): JSX.Element;
|
|
186
|
-
|
|
187
|
-
type AddressValuesKeys = `${keyof Address$1}` | `billing_address_${keyof Address$1}` | `shipping_address_${keyof Address$1}` | `billing_address_${`metadata_${string}`}` | `shipping_address_${`metadata_${string}`}`;
|
|
188
|
-
|
|
189
|
-
declare const defaultCountries: readonly [{
|
|
190
|
-
readonly label: "Afghanistan";
|
|
191
|
-
readonly value: "AF";
|
|
192
|
-
}, {
|
|
193
|
-
readonly label: "Aland Islands";
|
|
194
|
-
readonly value: "AX";
|
|
195
|
-
}, {
|
|
196
|
-
readonly label: "Albania";
|
|
197
|
-
readonly value: "AL";
|
|
198
|
-
}, {
|
|
199
|
-
readonly label: "Algeria";
|
|
200
|
-
readonly value: "DZ";
|
|
201
|
-
}, {
|
|
202
|
-
readonly label: "American Samoa";
|
|
203
|
-
readonly value: "AS";
|
|
204
|
-
}, {
|
|
205
|
-
readonly label: "Andorra";
|
|
206
|
-
readonly value: "AD";
|
|
207
|
-
}, {
|
|
208
|
-
readonly label: "Angola";
|
|
209
|
-
readonly value: "AO";
|
|
210
|
-
}, {
|
|
211
|
-
readonly label: "Anguilla";
|
|
212
|
-
readonly value: "AI";
|
|
213
|
-
}, {
|
|
214
|
-
readonly label: "Antarctica";
|
|
215
|
-
readonly value: "AQ";
|
|
216
|
-
}, {
|
|
217
|
-
readonly label: "Antigua And Barbuda";
|
|
218
|
-
readonly value: "AG";
|
|
219
|
-
}, {
|
|
220
|
-
readonly label: "Argentina";
|
|
221
|
-
readonly value: "AR";
|
|
222
|
-
}, {
|
|
223
|
-
readonly label: "Armenia";
|
|
224
|
-
readonly value: "AM";
|
|
225
|
-
}, {
|
|
226
|
-
readonly label: "Aruba";
|
|
227
|
-
readonly value: "AW";
|
|
228
|
-
}, {
|
|
229
|
-
readonly label: "Australia";
|
|
230
|
-
readonly value: "AU";
|
|
231
|
-
}, {
|
|
232
|
-
readonly label: "Austria";
|
|
233
|
-
readonly value: "AT";
|
|
234
|
-
}, {
|
|
235
|
-
readonly label: "Azerbaijan";
|
|
236
|
-
readonly value: "AZ";
|
|
237
|
-
}, {
|
|
238
|
-
readonly label: "Bahamas The";
|
|
239
|
-
readonly value: "BS";
|
|
240
|
-
}, {
|
|
241
|
-
readonly label: "Bahrain";
|
|
242
|
-
readonly value: "BH";
|
|
243
|
-
}, {
|
|
244
|
-
readonly label: "Bangladesh";
|
|
245
|
-
readonly value: "BD";
|
|
246
|
-
}, {
|
|
247
|
-
readonly label: "Barbados";
|
|
248
|
-
readonly value: "BB";
|
|
249
|
-
}, {
|
|
250
|
-
readonly label: "Belarus";
|
|
251
|
-
readonly value: "BY";
|
|
252
|
-
}, {
|
|
253
|
-
readonly label: "Belgium";
|
|
254
|
-
readonly value: "BE";
|
|
255
|
-
}, {
|
|
256
|
-
readonly label: "Belize";
|
|
257
|
-
readonly value: "BZ";
|
|
258
|
-
}, {
|
|
259
|
-
readonly label: "Benin";
|
|
260
|
-
readonly value: "BJ";
|
|
261
|
-
}, {
|
|
262
|
-
readonly label: "Bermuda";
|
|
263
|
-
readonly value: "BM";
|
|
264
|
-
}, {
|
|
265
|
-
readonly label: "Bhutan";
|
|
266
|
-
readonly value: "BT";
|
|
267
|
-
}, {
|
|
268
|
-
readonly label: "Bolivia";
|
|
269
|
-
readonly value: "BO";
|
|
270
|
-
}, {
|
|
271
|
-
readonly label: "Bonaire, Sint Eustatius and Saba";
|
|
272
|
-
readonly value: "BQ";
|
|
273
|
-
}, {
|
|
274
|
-
readonly label: "Bosnia and Herzegovina";
|
|
275
|
-
readonly value: "BA";
|
|
276
|
-
}, {
|
|
277
|
-
readonly label: "Botswana";
|
|
278
|
-
readonly value: "BW";
|
|
279
|
-
}, {
|
|
280
|
-
readonly label: "Bouvet Island";
|
|
281
|
-
readonly value: "BV";
|
|
282
|
-
}, {
|
|
283
|
-
readonly label: "Brazil";
|
|
284
|
-
readonly value: "BR";
|
|
285
|
-
}, {
|
|
286
|
-
readonly label: "British Indian Ocean Territory";
|
|
287
|
-
readonly value: "IO";
|
|
288
|
-
}, {
|
|
289
|
-
readonly label: "Brunei";
|
|
290
|
-
readonly value: "BN";
|
|
291
|
-
}, {
|
|
292
|
-
readonly label: "Bulgaria";
|
|
293
|
-
readonly value: "BG";
|
|
294
|
-
}, {
|
|
295
|
-
readonly label: "Burkina Faso";
|
|
296
|
-
readonly value: "BF";
|
|
297
|
-
}, {
|
|
298
|
-
readonly label: "Burundi";
|
|
299
|
-
readonly value: "BI";
|
|
300
|
-
}, {
|
|
301
|
-
readonly label: "Cambodia";
|
|
302
|
-
readonly value: "KH";
|
|
303
|
-
}, {
|
|
304
|
-
readonly label: "Cameroon";
|
|
305
|
-
readonly value: "CM";
|
|
306
|
-
}, {
|
|
307
|
-
readonly label: "Canada";
|
|
308
|
-
readonly value: "CA";
|
|
309
|
-
}, {
|
|
310
|
-
readonly label: "Cape Verde";
|
|
311
|
-
readonly value: "CV";
|
|
312
|
-
}, {
|
|
313
|
-
readonly label: "Cayman Islands";
|
|
314
|
-
readonly value: "KY";
|
|
315
|
-
}, {
|
|
316
|
-
readonly label: "Central African Republic";
|
|
317
|
-
readonly value: "CF";
|
|
318
|
-
}, {
|
|
319
|
-
readonly label: "Chad";
|
|
320
|
-
readonly value: "TD";
|
|
321
|
-
}, {
|
|
322
|
-
readonly label: "Chile";
|
|
323
|
-
readonly value: "CL";
|
|
324
|
-
}, {
|
|
325
|
-
readonly label: "China";
|
|
326
|
-
readonly value: "CN";
|
|
327
|
-
}, {
|
|
328
|
-
readonly label: "Christmas Island";
|
|
329
|
-
readonly value: "CX";
|
|
330
|
-
}, {
|
|
331
|
-
readonly label: "Cocos (Keeling) Islands";
|
|
332
|
-
readonly value: "CC";
|
|
333
|
-
}, {
|
|
334
|
-
readonly label: "Colombia";
|
|
335
|
-
readonly value: "CO";
|
|
336
|
-
}, {
|
|
337
|
-
readonly label: "Comoros";
|
|
338
|
-
readonly value: "KM";
|
|
339
|
-
}, {
|
|
340
|
-
readonly label: "Congo";
|
|
341
|
-
readonly value: "CG";
|
|
342
|
-
}, {
|
|
343
|
-
readonly label: "Cook Islands";
|
|
344
|
-
readonly value: "CK";
|
|
345
|
-
}, {
|
|
346
|
-
readonly label: "Costa Rica";
|
|
347
|
-
readonly value: "CR";
|
|
348
|
-
}, {
|
|
349
|
-
readonly label: "Cote D'Ivoire (Ivory Coast)";
|
|
350
|
-
readonly value: "CI";
|
|
351
|
-
}, {
|
|
352
|
-
readonly label: "Croatia";
|
|
353
|
-
readonly value: "HR";
|
|
354
|
-
}, {
|
|
355
|
-
readonly label: "Cuba";
|
|
356
|
-
readonly value: "CU";
|
|
357
|
-
}, {
|
|
358
|
-
readonly label: "Curaçao";
|
|
359
|
-
readonly value: "CW";
|
|
360
|
-
}, {
|
|
361
|
-
readonly label: "Cyprus";
|
|
362
|
-
readonly value: "CY";
|
|
363
|
-
}, {
|
|
364
|
-
readonly label: "Czech Republic";
|
|
365
|
-
readonly value: "CZ";
|
|
366
|
-
}, {
|
|
367
|
-
readonly label: "Democratic Republic of the Congo";
|
|
368
|
-
readonly value: "CD";
|
|
369
|
-
}, {
|
|
370
|
-
readonly label: "Denmark";
|
|
371
|
-
readonly value: "DK";
|
|
372
|
-
}, {
|
|
373
|
-
readonly label: "Djibouti";
|
|
374
|
-
readonly value: "DJ";
|
|
375
|
-
}, {
|
|
376
|
-
readonly label: "Dominica";
|
|
377
|
-
readonly value: "DM";
|
|
378
|
-
}, {
|
|
379
|
-
readonly label: "Dominican Republic";
|
|
380
|
-
readonly value: "DO";
|
|
381
|
-
}, {
|
|
382
|
-
readonly label: "East Timor";
|
|
383
|
-
readonly value: "TL";
|
|
384
|
-
}, {
|
|
385
|
-
readonly label: "Ecuador";
|
|
386
|
-
readonly value: "EC";
|
|
387
|
-
}, {
|
|
388
|
-
readonly label: "Egypt";
|
|
389
|
-
readonly value: "EG";
|
|
390
|
-
}, {
|
|
391
|
-
readonly label: "El Salvador";
|
|
392
|
-
readonly value: "SV";
|
|
393
|
-
}, {
|
|
394
|
-
readonly label: "Equatorial Guinea";
|
|
395
|
-
readonly value: "GQ";
|
|
396
|
-
}, {
|
|
397
|
-
readonly label: "Eritrea";
|
|
398
|
-
readonly value: "ER";
|
|
399
|
-
}, {
|
|
400
|
-
readonly label: "Estonia";
|
|
401
|
-
readonly value: "EE";
|
|
402
|
-
}, {
|
|
403
|
-
readonly label: "Ethiopia";
|
|
404
|
-
readonly value: "ET";
|
|
405
|
-
}, {
|
|
406
|
-
readonly label: "Falkland Islands";
|
|
407
|
-
readonly value: "FK";
|
|
408
|
-
}, {
|
|
409
|
-
readonly label: "Faroe Islands";
|
|
410
|
-
readonly value: "FO";
|
|
411
|
-
}, {
|
|
412
|
-
readonly label: "Fiji Islands";
|
|
413
|
-
readonly value: "FJ";
|
|
414
|
-
}, {
|
|
415
|
-
readonly label: "Finland";
|
|
416
|
-
readonly value: "FI";
|
|
417
|
-
}, {
|
|
418
|
-
readonly label: "France";
|
|
419
|
-
readonly value: "FR";
|
|
420
|
-
}, {
|
|
421
|
-
readonly label: "French Guiana";
|
|
422
|
-
readonly value: "GF";
|
|
423
|
-
}, {
|
|
424
|
-
readonly label: "French Polynesia";
|
|
425
|
-
readonly value: "PF";
|
|
426
|
-
}, {
|
|
427
|
-
readonly label: "French Southern Territories";
|
|
428
|
-
readonly value: "TF";
|
|
429
|
-
}, {
|
|
430
|
-
readonly label: "Gabon";
|
|
431
|
-
readonly value: "GA";
|
|
432
|
-
}, {
|
|
433
|
-
readonly label: "Gambia The";
|
|
434
|
-
readonly value: "GM";
|
|
435
|
-
}, {
|
|
436
|
-
readonly label: "Georgia";
|
|
437
|
-
readonly value: "GE";
|
|
438
|
-
}, {
|
|
439
|
-
readonly label: "Germany";
|
|
440
|
-
readonly value: "DE";
|
|
441
|
-
}, {
|
|
442
|
-
readonly label: "Ghana";
|
|
443
|
-
readonly value: "GH";
|
|
444
|
-
}, {
|
|
445
|
-
readonly label: "Gibraltar";
|
|
446
|
-
readonly value: "GI";
|
|
447
|
-
}, {
|
|
448
|
-
readonly label: "Greece";
|
|
449
|
-
readonly value: "GR";
|
|
450
|
-
}, {
|
|
451
|
-
readonly label: "Greenland";
|
|
452
|
-
readonly value: "GL";
|
|
453
|
-
}, {
|
|
454
|
-
readonly label: "Grenada";
|
|
455
|
-
readonly value: "GD";
|
|
456
|
-
}, {
|
|
457
|
-
readonly label: "Guadeloupe";
|
|
458
|
-
readonly value: "GP";
|
|
459
|
-
}, {
|
|
460
|
-
readonly label: "Guam";
|
|
461
|
-
readonly value: "GU";
|
|
462
|
-
}, {
|
|
463
|
-
readonly label: "Guatemala";
|
|
464
|
-
readonly value: "GT";
|
|
465
|
-
}, {
|
|
466
|
-
readonly label: "Guernsey and Alderney";
|
|
467
|
-
readonly value: "GG";
|
|
468
|
-
}, {
|
|
469
|
-
readonly label: "Guinea";
|
|
470
|
-
readonly value: "GN";
|
|
471
|
-
}, {
|
|
472
|
-
readonly label: "Guinea-Bissau";
|
|
473
|
-
readonly value: "GW";
|
|
474
|
-
}, {
|
|
475
|
-
readonly label: "Guyana";
|
|
476
|
-
readonly value: "GY";
|
|
477
|
-
}, {
|
|
478
|
-
readonly label: "Haiti";
|
|
479
|
-
readonly value: "HT";
|
|
480
|
-
}, {
|
|
481
|
-
readonly label: "Heard Island and McDonald Islands";
|
|
482
|
-
readonly value: "HM";
|
|
483
|
-
}, {
|
|
484
|
-
readonly label: "Honduras";
|
|
485
|
-
readonly value: "HN";
|
|
486
|
-
}, {
|
|
487
|
-
readonly label: "Hong Kong S.A.R.";
|
|
488
|
-
readonly value: "HK";
|
|
489
|
-
}, {
|
|
490
|
-
readonly label: "Hungary";
|
|
491
|
-
readonly value: "HU";
|
|
492
|
-
}, {
|
|
493
|
-
readonly label: "Iceland";
|
|
494
|
-
readonly value: "IS";
|
|
495
|
-
}, {
|
|
496
|
-
readonly label: "India";
|
|
497
|
-
readonly value: "IN";
|
|
498
|
-
}, {
|
|
499
|
-
readonly label: "Indonesia";
|
|
500
|
-
readonly value: "ID";
|
|
501
|
-
}, {
|
|
502
|
-
readonly label: "Iran";
|
|
503
|
-
readonly value: "IR";
|
|
504
|
-
}, {
|
|
505
|
-
readonly label: "Iraq";
|
|
506
|
-
readonly value: "IQ";
|
|
507
|
-
}, {
|
|
508
|
-
readonly label: "Ireland";
|
|
509
|
-
readonly value: "IE";
|
|
510
|
-
}, {
|
|
511
|
-
readonly label: "Israel";
|
|
512
|
-
readonly value: "IL";
|
|
513
|
-
}, {
|
|
514
|
-
readonly label: "Italy";
|
|
515
|
-
readonly value: "IT";
|
|
516
|
-
}, {
|
|
517
|
-
readonly label: "Jamaica";
|
|
518
|
-
readonly value: "JM";
|
|
519
|
-
}, {
|
|
520
|
-
readonly label: "Japan";
|
|
521
|
-
readonly value: "JP";
|
|
522
|
-
}, {
|
|
523
|
-
readonly label: "Jersey";
|
|
524
|
-
readonly value: "JE";
|
|
525
|
-
}, {
|
|
526
|
-
readonly label: "Jordan";
|
|
527
|
-
readonly value: "JO";
|
|
528
|
-
}, {
|
|
529
|
-
readonly label: "Kazakhstan";
|
|
530
|
-
readonly value: "KZ";
|
|
531
|
-
}, {
|
|
532
|
-
readonly label: "Kenya";
|
|
533
|
-
readonly value: "KE";
|
|
534
|
-
}, {
|
|
535
|
-
readonly label: "Kiribati";
|
|
536
|
-
readonly value: "KI";
|
|
537
|
-
}, {
|
|
538
|
-
readonly label: "Kosovo";
|
|
539
|
-
readonly value: "XK";
|
|
540
|
-
}, {
|
|
541
|
-
readonly label: "Kuwait";
|
|
542
|
-
readonly value: "KW";
|
|
543
|
-
}, {
|
|
544
|
-
readonly label: "Kyrgyzstan";
|
|
545
|
-
readonly value: "KG";
|
|
546
|
-
}, {
|
|
547
|
-
readonly label: "Laos";
|
|
548
|
-
readonly value: "LA";
|
|
549
|
-
}, {
|
|
550
|
-
readonly label: "Latvia";
|
|
551
|
-
readonly value: "LV";
|
|
552
|
-
}, {
|
|
553
|
-
readonly label: "Lebanon";
|
|
554
|
-
readonly value: "LB";
|
|
555
|
-
}, {
|
|
556
|
-
readonly label: "Lesotho";
|
|
557
|
-
readonly value: "LS";
|
|
558
|
-
}, {
|
|
559
|
-
readonly label: "Liberia";
|
|
560
|
-
readonly value: "LR";
|
|
561
|
-
}, {
|
|
562
|
-
readonly label: "Libya";
|
|
563
|
-
readonly value: "LY";
|
|
564
|
-
}, {
|
|
565
|
-
readonly label: "Liechtenstein";
|
|
566
|
-
readonly value: "LI";
|
|
567
|
-
}, {
|
|
568
|
-
readonly label: "Lithuania";
|
|
569
|
-
readonly value: "LT";
|
|
570
|
-
}, {
|
|
571
|
-
readonly label: "Luxembourg";
|
|
572
|
-
readonly value: "LU";
|
|
573
|
-
}, {
|
|
574
|
-
readonly label: "Macau S.A.R.";
|
|
575
|
-
readonly value: "MO";
|
|
576
|
-
}, {
|
|
577
|
-
readonly label: "Macedonia";
|
|
578
|
-
readonly value: "MK";
|
|
579
|
-
}, {
|
|
580
|
-
readonly label: "Madagascar";
|
|
581
|
-
readonly value: "MG";
|
|
582
|
-
}, {
|
|
583
|
-
readonly label: "Malawi";
|
|
584
|
-
readonly value: "MW";
|
|
585
|
-
}, {
|
|
586
|
-
readonly label: "Malaysia";
|
|
587
|
-
readonly value: "MY";
|
|
588
|
-
}, {
|
|
589
|
-
readonly label: "Maldives";
|
|
590
|
-
readonly value: "MV";
|
|
591
|
-
}, {
|
|
592
|
-
readonly label: "Mali";
|
|
593
|
-
readonly value: "ML";
|
|
594
|
-
}, {
|
|
595
|
-
readonly label: "Malta";
|
|
596
|
-
readonly value: "MT";
|
|
597
|
-
}, {
|
|
598
|
-
readonly label: "Man (Isle of)";
|
|
599
|
-
readonly value: "IM";
|
|
600
|
-
}, {
|
|
601
|
-
readonly label: "Marshall Islands";
|
|
602
|
-
readonly value: "MH";
|
|
603
|
-
}, {
|
|
604
|
-
readonly label: "Martinique";
|
|
605
|
-
readonly value: "MQ";
|
|
606
|
-
}, {
|
|
607
|
-
readonly label: "Mauritania";
|
|
608
|
-
readonly value: "MR";
|
|
609
|
-
}, {
|
|
610
|
-
readonly label: "Mauritius";
|
|
611
|
-
readonly value: "MU";
|
|
612
|
-
}, {
|
|
613
|
-
readonly label: "Mayotte";
|
|
614
|
-
readonly value: "YT";
|
|
615
|
-
}, {
|
|
616
|
-
readonly label: "Mexico";
|
|
617
|
-
readonly value: "MX";
|
|
618
|
-
}, {
|
|
619
|
-
readonly label: "Micronesia";
|
|
620
|
-
readonly value: "FM";
|
|
621
|
-
}, {
|
|
622
|
-
readonly label: "Moldova";
|
|
623
|
-
readonly value: "MD";
|
|
624
|
-
}, {
|
|
625
|
-
readonly label: "Monaco";
|
|
626
|
-
readonly value: "MC";
|
|
627
|
-
}, {
|
|
628
|
-
readonly label: "Mongolia";
|
|
629
|
-
readonly value: "MN";
|
|
630
|
-
}, {
|
|
631
|
-
readonly label: "Montenegro";
|
|
632
|
-
readonly value: "ME";
|
|
633
|
-
}, {
|
|
634
|
-
readonly label: "Montserrat";
|
|
635
|
-
readonly value: "MS";
|
|
636
|
-
}, {
|
|
637
|
-
readonly label: "Morocco";
|
|
638
|
-
readonly value: "MA";
|
|
639
|
-
}, {
|
|
640
|
-
readonly label: "Mozambique";
|
|
641
|
-
readonly value: "MZ";
|
|
642
|
-
}, {
|
|
643
|
-
readonly label: "Myanmar";
|
|
644
|
-
readonly value: "MM";
|
|
645
|
-
}, {
|
|
646
|
-
readonly label: "Namibia";
|
|
647
|
-
readonly value: "NA";
|
|
648
|
-
}, {
|
|
649
|
-
readonly label: "Nauru";
|
|
650
|
-
readonly value: "NR";
|
|
651
|
-
}, {
|
|
652
|
-
readonly label: "Nepal";
|
|
653
|
-
readonly value: "NP";
|
|
654
|
-
}, {
|
|
655
|
-
readonly label: "Netherlands";
|
|
656
|
-
readonly value: "NL";
|
|
657
|
-
}, {
|
|
658
|
-
readonly label: "New Caledonia";
|
|
659
|
-
readonly value: "NC";
|
|
660
|
-
}, {
|
|
661
|
-
readonly label: "New Zealand";
|
|
662
|
-
readonly value: "NZ";
|
|
663
|
-
}, {
|
|
664
|
-
readonly label: "Nicaragua";
|
|
665
|
-
readonly value: "NI";
|
|
666
|
-
}, {
|
|
667
|
-
readonly label: "Niger";
|
|
668
|
-
readonly value: "NE";
|
|
669
|
-
}, {
|
|
670
|
-
readonly label: "Nigeria";
|
|
671
|
-
readonly value: "NG";
|
|
672
|
-
}, {
|
|
673
|
-
readonly label: "Niue";
|
|
674
|
-
readonly value: "NU";
|
|
675
|
-
}, {
|
|
676
|
-
readonly label: "Norfolk Island";
|
|
677
|
-
readonly value: "NF";
|
|
678
|
-
}, {
|
|
679
|
-
readonly label: "North Korea";
|
|
680
|
-
readonly value: "KP";
|
|
681
|
-
}, {
|
|
682
|
-
readonly label: "Northern Mariana Islands";
|
|
683
|
-
readonly value: "MP";
|
|
684
|
-
}, {
|
|
685
|
-
readonly label: "Norway";
|
|
686
|
-
readonly value: "NO";
|
|
687
|
-
}, {
|
|
688
|
-
readonly label: "Oman";
|
|
689
|
-
readonly value: "OM";
|
|
690
|
-
}, {
|
|
691
|
-
readonly label: "Pakistan";
|
|
692
|
-
readonly value: "PK";
|
|
693
|
-
}, {
|
|
694
|
-
readonly label: "Palau";
|
|
695
|
-
readonly value: "PW";
|
|
696
|
-
}, {
|
|
697
|
-
readonly label: "Palestinian Territory Occupied";
|
|
698
|
-
readonly value: "PS";
|
|
699
|
-
}, {
|
|
700
|
-
readonly label: "Panama";
|
|
701
|
-
readonly value: "PA";
|
|
702
|
-
}, {
|
|
703
|
-
readonly label: "Papua new Guinea";
|
|
704
|
-
readonly value: "PG";
|
|
705
|
-
}, {
|
|
706
|
-
readonly label: "Paraguay";
|
|
707
|
-
readonly value: "PY";
|
|
708
|
-
}, {
|
|
709
|
-
readonly label: "Peru";
|
|
710
|
-
readonly value: "PE";
|
|
711
|
-
}, {
|
|
712
|
-
readonly label: "Philippines";
|
|
713
|
-
readonly value: "PH";
|
|
714
|
-
}, {
|
|
715
|
-
readonly label: "Pitcairn Island";
|
|
716
|
-
readonly value: "PN";
|
|
717
|
-
}, {
|
|
718
|
-
readonly label: "Poland";
|
|
719
|
-
readonly value: "PL";
|
|
720
|
-
}, {
|
|
721
|
-
readonly label: "Portugal";
|
|
722
|
-
readonly value: "PT";
|
|
723
|
-
}, {
|
|
724
|
-
readonly label: "Puerto Rico";
|
|
725
|
-
readonly value: "PR";
|
|
726
|
-
}, {
|
|
727
|
-
readonly label: "Qatar";
|
|
728
|
-
readonly value: "QA";
|
|
729
|
-
}, {
|
|
730
|
-
readonly label: "Reunion";
|
|
731
|
-
readonly value: "RE";
|
|
732
|
-
}, {
|
|
733
|
-
readonly label: "Romania";
|
|
734
|
-
readonly value: "RO";
|
|
735
|
-
}, {
|
|
736
|
-
readonly label: "Russia";
|
|
737
|
-
readonly value: "RU";
|
|
738
|
-
}, {
|
|
739
|
-
readonly label: "Rwanda";
|
|
740
|
-
readonly value: "RW";
|
|
741
|
-
}, {
|
|
742
|
-
readonly label: "Saint Helena";
|
|
743
|
-
readonly value: "SH";
|
|
744
|
-
}, {
|
|
745
|
-
readonly label: "Saint Kitts And Nevis";
|
|
746
|
-
readonly value: "KN";
|
|
747
|
-
}, {
|
|
748
|
-
readonly label: "Saint Lucia";
|
|
749
|
-
readonly value: "LC";
|
|
750
|
-
}, {
|
|
751
|
-
readonly label: "Saint Pierre and Miquelon";
|
|
752
|
-
readonly value: "PM";
|
|
753
|
-
}, {
|
|
754
|
-
readonly label: "Saint Vincent And The Grenadines";
|
|
755
|
-
readonly value: "VC";
|
|
756
|
-
}, {
|
|
757
|
-
readonly label: "Saint-Barthelemy";
|
|
758
|
-
readonly value: "BL";
|
|
759
|
-
}, {
|
|
760
|
-
readonly label: "Saint-Martin (French part)";
|
|
761
|
-
readonly value: "MF";
|
|
762
|
-
}, {
|
|
763
|
-
readonly label: "Samoa";
|
|
764
|
-
readonly value: "WS";
|
|
765
|
-
}, {
|
|
766
|
-
readonly label: "San Marino";
|
|
767
|
-
readonly value: "SM";
|
|
768
|
-
}, {
|
|
769
|
-
readonly label: "Sao Tome and Principe";
|
|
770
|
-
readonly value: "ST";
|
|
771
|
-
}, {
|
|
772
|
-
readonly label: "Saudi Arabia";
|
|
773
|
-
readonly value: "SA";
|
|
774
|
-
}, {
|
|
775
|
-
readonly label: "Senegal";
|
|
776
|
-
readonly value: "SN";
|
|
777
|
-
}, {
|
|
778
|
-
readonly label: "Serbia";
|
|
779
|
-
readonly value: "RS";
|
|
780
|
-
}, {
|
|
781
|
-
readonly label: "Seychelles";
|
|
782
|
-
readonly value: "SC";
|
|
783
|
-
}, {
|
|
784
|
-
readonly label: "Sierra Leone";
|
|
785
|
-
readonly value: "SL";
|
|
786
|
-
}, {
|
|
787
|
-
readonly label: "Singapore";
|
|
788
|
-
readonly value: "SG";
|
|
789
|
-
}, {
|
|
790
|
-
readonly label: "Sint Maarten (Dutch part)";
|
|
791
|
-
readonly value: "SX";
|
|
792
|
-
}, {
|
|
793
|
-
readonly label: "Slovakia";
|
|
794
|
-
readonly value: "SK";
|
|
795
|
-
}, {
|
|
796
|
-
readonly label: "Slovenia";
|
|
797
|
-
readonly value: "SI";
|
|
798
|
-
}, {
|
|
799
|
-
readonly label: "Solomon Islands";
|
|
800
|
-
readonly value: "SB";
|
|
801
|
-
}, {
|
|
802
|
-
readonly label: "Somalia";
|
|
803
|
-
readonly value: "SO";
|
|
804
|
-
}, {
|
|
805
|
-
readonly label: "South Africa";
|
|
806
|
-
readonly value: "ZA";
|
|
807
|
-
}, {
|
|
808
|
-
readonly label: "South Georgia";
|
|
809
|
-
readonly value: "GS";
|
|
810
|
-
}, {
|
|
811
|
-
readonly label: "South Korea";
|
|
812
|
-
readonly value: "KR";
|
|
813
|
-
}, {
|
|
814
|
-
readonly label: "South Sudan";
|
|
815
|
-
readonly value: "SS";
|
|
816
|
-
}, {
|
|
817
|
-
readonly label: "Spain";
|
|
818
|
-
readonly value: "ES";
|
|
819
|
-
}, {
|
|
820
|
-
readonly label: "Sri Lanka";
|
|
821
|
-
readonly value: "LK";
|
|
822
|
-
}, {
|
|
823
|
-
readonly label: "Sudan";
|
|
824
|
-
readonly value: "SD";
|
|
825
|
-
}, {
|
|
826
|
-
readonly label: "Suriname";
|
|
827
|
-
readonly value: "SR";
|
|
828
|
-
}, {
|
|
829
|
-
readonly label: "Svalbard And Jan Mayen Islands";
|
|
830
|
-
readonly value: "SJ";
|
|
831
|
-
}, {
|
|
832
|
-
readonly label: "Swaziland";
|
|
833
|
-
readonly value: "SZ";
|
|
834
|
-
}, {
|
|
835
|
-
readonly label: "Sweden";
|
|
836
|
-
readonly value: "SE";
|
|
837
|
-
}, {
|
|
838
|
-
readonly label: "Switzerland";
|
|
839
|
-
readonly value: "CH";
|
|
840
|
-
}, {
|
|
841
|
-
readonly label: "Syria";
|
|
842
|
-
readonly value: "SY";
|
|
843
|
-
}, {
|
|
844
|
-
readonly label: "Taiwan";
|
|
845
|
-
readonly value: "TW";
|
|
846
|
-
}, {
|
|
847
|
-
readonly label: "Tajikistan";
|
|
848
|
-
readonly value: "TJ";
|
|
849
|
-
}, {
|
|
850
|
-
readonly label: "Tanzania";
|
|
851
|
-
readonly value: "TZ";
|
|
852
|
-
}, {
|
|
853
|
-
readonly label: "Thailand";
|
|
854
|
-
readonly value: "TH";
|
|
855
|
-
}, {
|
|
856
|
-
readonly label: "Togo";
|
|
857
|
-
readonly value: "TG";
|
|
858
|
-
}, {
|
|
859
|
-
readonly label: "Tokelau";
|
|
860
|
-
readonly value: "TK";
|
|
861
|
-
}, {
|
|
862
|
-
readonly label: "Tonga";
|
|
863
|
-
readonly value: "TO";
|
|
864
|
-
}, {
|
|
865
|
-
readonly label: "Trinidad And Tobago";
|
|
866
|
-
readonly value: "TT";
|
|
867
|
-
}, {
|
|
868
|
-
readonly label: "Tunisia";
|
|
869
|
-
readonly value: "TN";
|
|
870
|
-
}, {
|
|
871
|
-
readonly label: "Turkey";
|
|
872
|
-
readonly value: "TR";
|
|
873
|
-
}, {
|
|
874
|
-
readonly label: "Turkmenistan";
|
|
875
|
-
readonly value: "TM";
|
|
876
|
-
}, {
|
|
877
|
-
readonly label: "Turks And Caicos Islands";
|
|
878
|
-
readonly value: "TC";
|
|
879
|
-
}, {
|
|
880
|
-
readonly label: "Tuvalu";
|
|
881
|
-
readonly value: "TV";
|
|
882
|
-
}, {
|
|
883
|
-
readonly label: "Uganda";
|
|
884
|
-
readonly value: "UG";
|
|
885
|
-
}, {
|
|
886
|
-
readonly label: "Ukraine";
|
|
887
|
-
readonly value: "UA";
|
|
888
|
-
}, {
|
|
889
|
-
readonly label: "United Arab Emirates";
|
|
890
|
-
readonly value: "AE";
|
|
891
|
-
}, {
|
|
892
|
-
readonly label: "United Kingdom";
|
|
893
|
-
readonly value: "GB";
|
|
894
|
-
}, {
|
|
895
|
-
readonly label: "United States";
|
|
896
|
-
readonly value: "US";
|
|
897
|
-
}, {
|
|
898
|
-
readonly label: "United States Minor Outlying Islands";
|
|
899
|
-
readonly value: "UM";
|
|
900
|
-
}, {
|
|
901
|
-
readonly label: "Uruguay";
|
|
902
|
-
readonly value: "UY";
|
|
903
|
-
}, {
|
|
904
|
-
readonly label: "Uzbekistan";
|
|
905
|
-
readonly value: "UZ";
|
|
906
|
-
}, {
|
|
907
|
-
readonly label: "Vanuatu";
|
|
908
|
-
readonly value: "VU";
|
|
909
|
-
}, {
|
|
910
|
-
readonly label: "Vatican City State (Holy See)";
|
|
911
|
-
readonly value: "VA";
|
|
912
|
-
}, {
|
|
913
|
-
readonly label: "Venezuela";
|
|
914
|
-
readonly value: "VE";
|
|
915
|
-
}, {
|
|
916
|
-
readonly label: "Vietnam";
|
|
917
|
-
readonly value: "VN";
|
|
918
|
-
}, {
|
|
919
|
-
readonly label: "Virgin Islands (British)";
|
|
920
|
-
readonly value: "VG";
|
|
921
|
-
}, {
|
|
922
|
-
readonly label: "Virgin Islands (US)";
|
|
923
|
-
readonly value: "VI";
|
|
924
|
-
}, {
|
|
925
|
-
readonly label: "Wallis And Futuna Islands";
|
|
926
|
-
readonly value: "WF";
|
|
927
|
-
}, {
|
|
928
|
-
readonly label: "Western Sahara";
|
|
929
|
-
readonly value: "EH";
|
|
930
|
-
}, {
|
|
931
|
-
readonly label: "Yemen";
|
|
932
|
-
readonly value: "YE";
|
|
933
|
-
}, {
|
|
934
|
-
readonly label: "Zambia";
|
|
935
|
-
readonly value: "ZM";
|
|
936
|
-
}, {
|
|
937
|
-
readonly label: "Zimbabwe";
|
|
938
|
-
readonly value: "ZW";
|
|
939
|
-
}];
|
|
940
|
-
type CountryCode = (typeof defaultCountries)[number]["value"];
|
|
941
|
-
interface Country {
|
|
942
|
-
value: CountryCode;
|
|
943
|
-
label: string;
|
|
944
|
-
}
|
|
945
|
-
interface State {
|
|
946
|
-
label: string;
|
|
947
|
-
value: string;
|
|
948
|
-
}
|
|
949
|
-
type States = Partial<Record<CountryCode, State[]>>;
|
|
950
|
-
|
|
951
|
-
type TCountryFieldName = 'billing_address_country_code' | 'shipping_address_country_code' | 'customer_address_country_code';
|
|
952
|
-
interface Props$1o extends Omit<BaseSelectComponentProps, 'options' | 'name'>, Pick<JSX.IntrinsicElements['select'], 'className' | 'id' | 'style'> {
|
|
953
|
-
name: Extract<AddressValuesKeys, TCountryFieldName>;
|
|
954
|
-
required?: boolean;
|
|
955
|
-
disabled?: boolean;
|
|
956
|
-
/**
|
|
957
|
-
* Optional country list to override default ones.
|
|
958
|
-
*/
|
|
959
|
-
countries?: Country[];
|
|
960
|
-
}
|
|
961
|
-
/**
|
|
962
|
-
* The AddressInput component creates a form `select` related to the `country_code` attribute of the `address` object.
|
|
963
|
-
*
|
|
964
|
-
* It requires a `name` prop to define the field name associated with the select and accepts most of HTML `select` tag standard props.
|
|
965
|
-
*
|
|
966
|
-
* <span title="Name prop" type="info">
|
|
967
|
-
* The `name` prop must respect the convention of mentioning one of the available addresses forms (`billing_address` or `shipping_address` or `customer_address`) concatenated to the `country_code` address attribute with a `_` separator. Eg.: `billing_address_country_code`.
|
|
968
|
-
* </span>
|
|
969
|
-
*
|
|
970
|
-
* <span title="Requirement" type="warning">
|
|
971
|
-
* It must to be used inside either the `<BillingAddressForm>` or the `<ShippingAddressForm>` component.
|
|
972
|
-
* </span>
|
|
973
|
-
*
|
|
974
|
-
* <span title="Fields" type="info">
|
|
975
|
-
* Check the `addresses` resource from our [Core API documentation](https://docs.commercelayer.io/core/v/api-reference/addresses/object)
|
|
976
|
-
* for more details about the available attributes to render.
|
|
977
|
-
* </span>
|
|
978
|
-
*/
|
|
979
|
-
declare function AddressCountrySelector(props: Props$1o): JSX.Element;
|
|
980
|
-
|
|
981
|
-
interface CommerceLayerConfig {
|
|
982
|
-
accessToken?: string;
|
|
983
|
-
endpoint?: string;
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
type SetLocalOrder = (key: string, value: string) => void;
|
|
987
|
-
|
|
988
|
-
type CreateOrderParams = Pick<AddToCartParams, "config" | "dispatch" | "persistKey" | "state" | "orderMetadata" | "orderAttributes" | "setLocalOrder">;
|
|
989
|
-
type AddToCartReturn = Promise<{
|
|
990
|
-
success: boolean;
|
|
991
|
-
orderId: string | undefined;
|
|
992
|
-
}>;
|
|
993
|
-
type ResourceIncluded = "billing_address" | "shipping_address" | "line_items.line_item_options.sku_option" | "line_items.item" | "available_customer_payment_sources.payment_source" | "available_customer_payment_sources.payment_method" | "shipments.available_shipping_methods" | "shipments.stock_transfers" | "shipments.stock_transfers.line_item" | "shipments.stock_line_items.line_item" | "shipments.shipping_method" | "shipments.stock_location" | "shipments.parcels" | "shipments.parcels.parcel_line_items" | "payment_source" | "available_payment_methods" | "payment_method";
|
|
994
|
-
type ResourceIncludedLoaded = Partial<Record<ResourceIncluded, boolean>>;
|
|
995
|
-
interface OrderPayload {
|
|
996
|
-
loading?: boolean;
|
|
997
|
-
orderId?: string;
|
|
998
|
-
order?: Order;
|
|
999
|
-
errors?: BaseError[];
|
|
1000
|
-
include?: ResourceIncluded[] | undefined;
|
|
1001
|
-
includeLoaded?: ResourceIncludedLoaded;
|
|
1002
|
-
withoutIncludes?: boolean;
|
|
1003
|
-
manageAdyenGiftCard?: boolean;
|
|
1004
|
-
}
|
|
1005
|
-
type OrderState = Partial<OrderPayload>;
|
|
1006
|
-
interface OrderActions {
|
|
1007
|
-
type: OrderActionType;
|
|
1008
|
-
payload: OrderPayload;
|
|
1009
|
-
}
|
|
1010
|
-
type OrderActionType = "setLoading" | "setOrderId" | "setOrder" | "setSingleQuantity" | "setCurrentSkuCodes" | "setCurrentSkuPrices" | "setCurrentItem" | "setErrors" | "setSaveAddressToCustomerAddressBook" | "setGiftCardOrCouponCode" | "setIncludesResource";
|
|
1011
|
-
declare function createOrder(params: CreateOrderParams): Promise<string>;
|
|
1012
|
-
interface LineItemOption$1 {
|
|
1013
|
-
/**
|
|
1014
|
-
* SKU Option ID. Ex: mNJEgsJwBn
|
|
1015
|
-
*/
|
|
1016
|
-
skuOptionId: string;
|
|
1017
|
-
/**
|
|
1018
|
-
* Set of key-value pairs that represent the selected options. Ex: { message: 'This is a option message' }
|
|
1019
|
-
*/
|
|
1020
|
-
options: Record<string, string>;
|
|
1021
|
-
quantity?: number;
|
|
1022
|
-
}
|
|
1023
|
-
type TFrequency = "hourly" | "daily" | "weekly" | "monthly" | "two-month" | "three-month" | "four-month" | "six-month" | "yearly";
|
|
1024
|
-
interface CustomLineItem {
|
|
1025
|
-
name?: string;
|
|
1026
|
-
imageUrl?: string | null;
|
|
1027
|
-
metadata?: Record<string, string>;
|
|
1028
|
-
frequency?: LooseAutocomplete<TFrequency>;
|
|
1029
|
-
externalPrice?: boolean;
|
|
1030
|
-
_update_quantity?: boolean;
|
|
1031
|
-
}
|
|
1032
|
-
type AddToCartParams = Partial<{
|
|
1033
|
-
bundleCode: string;
|
|
1034
|
-
skuCode: string;
|
|
1035
|
-
persistKey: string;
|
|
1036
|
-
config: CommerceLayerConfig;
|
|
1037
|
-
dispatch: Dispatch<OrderActions>;
|
|
1038
|
-
state: Partial<OrderState>;
|
|
1039
|
-
quantity: number;
|
|
1040
|
-
lineItemOption: LineItemOption$1;
|
|
1041
|
-
lineItem: CustomLineItem;
|
|
1042
|
-
orderMetadata: BaseMetadataObject;
|
|
1043
|
-
orderAttributes: Record<string, any>;
|
|
1044
|
-
errors: BaseError[];
|
|
1045
|
-
setLocalOrder: SetLocalOrder;
|
|
1046
|
-
buyNowMode: boolean;
|
|
1047
|
-
checkoutUrl: string;
|
|
1048
|
-
openMiniCart: boolean;
|
|
1049
|
-
}>;
|
|
1050
|
-
declare function addToCart(params: AddToCartParams): Promise<{
|
|
1051
|
-
success: boolean;
|
|
1052
|
-
orderId?: string;
|
|
1053
|
-
}>;
|
|
1054
|
-
type CodeType = "coupon" | "gift_card";
|
|
1055
|
-
type OrderCodeType = `${CodeType}_code`;
|
|
1056
|
-
|
|
1057
|
-
type TriggerAttributeHelper = {
|
|
1058
|
-
/**
|
|
1059
|
-
* CommerceLayer config
|
|
1060
|
-
*/
|
|
1061
|
-
config: CommerceLayerConfig;
|
|
1062
|
-
/**
|
|
1063
|
-
* The resource id
|
|
1064
|
-
*/
|
|
1065
|
-
id: string;
|
|
1066
|
-
} & ({
|
|
1067
|
-
/**
|
|
1068
|
-
* The resource name
|
|
1069
|
-
*/
|
|
1070
|
-
resource: 'orders';
|
|
1071
|
-
/**
|
|
1072
|
-
* The attribute to trigger
|
|
1073
|
-
*/
|
|
1074
|
-
attribute: '_place' | '_refresh' | '_create_subscriptions';
|
|
1075
|
-
} | {
|
|
1076
|
-
resource: 'order_subscriptions';
|
|
1077
|
-
attribute: '_active' | '_deactivate' | '_cancel';
|
|
1078
|
-
});
|
|
1079
|
-
|
|
1080
|
-
type CustomerActionType = 'setErrors' | 'setCustomerEmail' | 'setAddresses' | 'setPayments' | 'setOrders' | 'setSubscriptions' | 'setCustomers';
|
|
1081
|
-
interface CustomerActionPayload {
|
|
1082
|
-
addresses: Address$1[] | null;
|
|
1083
|
-
payments: CustomerPaymentSource[] | null;
|
|
1084
|
-
customerEmail: string;
|
|
1085
|
-
errors: BaseError[];
|
|
1086
|
-
orders: ListResponse<Order>;
|
|
1087
|
-
subscriptions: ListResponse<OrderSubscription> | ListResponse<Order> | null;
|
|
1088
|
-
isGuest: boolean;
|
|
1089
|
-
customers: Customer;
|
|
1090
|
-
}
|
|
1091
|
-
type CustomerState = Partial<CustomerActionPayload>;
|
|
1092
|
-
interface CustomerAction {
|
|
1093
|
-
type: CustomerActionType;
|
|
1094
|
-
payload: Partial<CustomerActionPayload>;
|
|
1095
|
-
}
|
|
1096
|
-
type SetCustomerErrors = <V extends BaseError[]>(errors: V, dispatch?: Dispatch<CustomerAction>) => void;
|
|
1097
|
-
declare function setCustomerEmail(
|
|
1098
|
-
/**
|
|
1099
|
-
* @param customerEmail The email address of the customer
|
|
1100
|
-
*/
|
|
1101
|
-
customerEmail: string,
|
|
1102
|
-
/**
|
|
1103
|
-
* @param dispatch The dispatch function
|
|
1104
|
-
*/
|
|
1105
|
-
dispatch?: Dispatch<CustomerAction>): void;
|
|
1106
|
-
interface GetCustomerAddresses {
|
|
1107
|
-
/**
|
|
1108
|
-
* The Commerce Layer config
|
|
1109
|
-
*/
|
|
1110
|
-
config: CommerceLayerConfig;
|
|
1111
|
-
/**
|
|
1112
|
-
* The Customer dispatch function
|
|
1113
|
-
*/
|
|
1114
|
-
dispatch: Dispatch<CustomerAction>;
|
|
1115
|
-
/**
|
|
1116
|
-
* Order details
|
|
1117
|
-
*/
|
|
1118
|
-
isOrderAvailable?: boolean;
|
|
1119
|
-
/**
|
|
1120
|
-
* The page size
|
|
1121
|
-
* default: 10
|
|
1122
|
-
*/
|
|
1123
|
-
pageSize?: QueryPageSize;
|
|
1124
|
-
}
|
|
1125
|
-
declare function getCustomerAddresses({ config, dispatch, isOrderAvailable, pageSize }: GetCustomerAddresses): Promise<void>;
|
|
1126
|
-
interface DeleteCustomerAddress {
|
|
1127
|
-
config?: CommerceLayerConfig;
|
|
1128
|
-
dispatch?: Dispatch<CustomerAction>;
|
|
1129
|
-
customerAddressId: string;
|
|
1130
|
-
addresses?: Address$1[] | null;
|
|
1131
|
-
}
|
|
1132
|
-
declare function deleteCustomerAddress({ config, dispatch, customerAddressId, addresses }: DeleteCustomerAddress): Promise<void>;
|
|
1133
|
-
interface GetCustomerPaymentSources {
|
|
1134
|
-
/**
|
|
1135
|
-
* The Customer dispatch function
|
|
1136
|
-
*/
|
|
1137
|
-
dispatch?: Dispatch<CustomerAction>;
|
|
1138
|
-
/**
|
|
1139
|
-
* The Commerce Layer Order resource
|
|
1140
|
-
*/
|
|
1141
|
-
order?: Order;
|
|
1142
|
-
}
|
|
1143
|
-
declare function getCustomerPaymentSources(params?: GetCustomerPaymentSources): void;
|
|
1144
|
-
interface GetCustomerOrdersProps {
|
|
1145
|
-
/**
|
|
1146
|
-
* The Commerce Layer config
|
|
1147
|
-
*/
|
|
1148
|
-
config: CommerceLayerConfig;
|
|
1149
|
-
/**
|
|
1150
|
-
* The Customer dispatch function
|
|
1151
|
-
*/
|
|
1152
|
-
dispatch: Dispatch<CustomerAction>;
|
|
1153
|
-
/**
|
|
1154
|
-
* The page size
|
|
1155
|
-
*/
|
|
1156
|
-
pageSize?: QueryPageSize;
|
|
1157
|
-
/**
|
|
1158
|
-
* The page number
|
|
1159
|
-
*/
|
|
1160
|
-
pageNumber?: number;
|
|
1161
|
-
/**
|
|
1162
|
-
* Retrieve a specific subscription or order by id
|
|
1163
|
-
*/
|
|
1164
|
-
id?: string;
|
|
1165
|
-
}
|
|
1166
|
-
declare function getCustomerOrders({ config, dispatch, pageSize, pageNumber }: GetCustomerOrdersProps): Promise<void>;
|
|
1167
|
-
declare function getCustomerSubscriptions({ id, config, dispatch, pageSize, pageNumber }: GetCustomerOrdersProps): Promise<void>;
|
|
1168
|
-
type TCustomerAddress = AddressCreate & AddressUpdate & Record<string, string | null | undefined>;
|
|
1169
|
-
type SetResourceTriggerParams = {
|
|
1170
|
-
/**
|
|
1171
|
-
* The CommerceLayer config
|
|
1172
|
-
*/
|
|
1173
|
-
config?: CommerceLayerConfig;
|
|
1174
|
-
/**
|
|
1175
|
-
* The dispatch function
|
|
1176
|
-
*/
|
|
1177
|
-
dispatch?: Dispatch<CustomerAction>;
|
|
1178
|
-
/**
|
|
1179
|
-
* The page size
|
|
1180
|
-
*/
|
|
1181
|
-
pageSize?: QueryPageSize;
|
|
1182
|
-
/**
|
|
1183
|
-
* The page number
|
|
1184
|
-
*/
|
|
1185
|
-
pageNumber?: number;
|
|
1186
|
-
/**
|
|
1187
|
-
* Reload the list of orders or subscriptions if the trigger is successful. Default: false
|
|
1188
|
-
*/
|
|
1189
|
-
reloadList?: boolean;
|
|
1190
|
-
} & TriggerAttributeHelper;
|
|
1191
|
-
/**
|
|
1192
|
-
* Helper to trigger and activate an attribute on a resource
|
|
1193
|
-
*/
|
|
1194
|
-
declare function setResourceTrigger({ config, dispatch, resource, attribute, id, pageSize, pageNumber, reloadList }: SetResourceTriggerParams): Promise<boolean>;
|
|
1195
|
-
|
|
1196
|
-
type CustomFieldMessageError = (props: {
|
|
1197
|
-
field: Extract<AddressValuesKeys, AddressInputName> | string;
|
|
1198
|
-
code?: Extract<CodeErrorType, "EMPTY_ERROR" | "VALIDATION_ERROR"> | undefined;
|
|
1199
|
-
message?: string | undefined;
|
|
1200
|
-
value: string;
|
|
1201
|
-
values?: Record<string, any>;
|
|
1202
|
-
}) => string | null | Array<{
|
|
1203
|
-
field: Extract<AddressValuesKeys, AddressInputName> | string;
|
|
1204
|
-
value: string;
|
|
1205
|
-
isValid: boolean;
|
|
1206
|
-
message?: string;
|
|
1207
|
-
}>;
|
|
1208
|
-
type AddressField$1 = "city" | "company" | "country_code" | "first_name" | "last_name" | "line_1" | "line_2" | "phone" | "state_code" | "zip_code" | "billing_info";
|
|
1209
|
-
type AddressFieldView = AddressField$1 | "full_address" | "full_name";
|
|
1210
|
-
|
|
1211
|
-
interface ChildrenProps$m extends Omit<Props$1n, 'children' | 'name'> {
|
|
1212
|
-
address: Address$1;
|
|
1213
|
-
}
|
|
1214
|
-
type ChildrenProp = ChildrenFunction<ChildrenProps$m>;
|
|
1215
|
-
type Props$1n = {
|
|
1216
|
-
type?: 'field';
|
|
1217
|
-
label?: never;
|
|
1218
|
-
onClick?: never;
|
|
1219
|
-
children?: ChildrenProp;
|
|
1220
|
-
name: AddressFieldView;
|
|
1221
|
-
className?: string;
|
|
1222
|
-
} | {
|
|
1223
|
-
type?: 'edit';
|
|
1224
|
-
label: string | ReactNode;
|
|
1225
|
-
onClick: (address: Address$1) => void;
|
|
1226
|
-
children?: ChildrenProp;
|
|
1227
|
-
name?: AddressFieldView;
|
|
1228
|
-
className?: string;
|
|
1229
|
-
} | {
|
|
1230
|
-
type?: 'delete';
|
|
1231
|
-
label: string;
|
|
1232
|
-
onClick: () => void;
|
|
1233
|
-
children?: ChildrenProp;
|
|
1234
|
-
name?: AddressFieldView;
|
|
1235
|
-
className?: string;
|
|
1236
|
-
} | {
|
|
1237
|
-
type?: 'edit' | 'field' | 'delete';
|
|
1238
|
-
label?: never;
|
|
1239
|
-
onClick?: never;
|
|
1240
|
-
children: ChildrenProp;
|
|
1241
|
-
name?: never;
|
|
1242
|
-
className?: string;
|
|
1243
|
-
};
|
|
1244
|
-
/**
|
|
1245
|
-
* The AddressField component displays any attribute of the `address` object set in the state of the parent `<Address>` component.
|
|
1246
|
-
*
|
|
1247
|
-
* It accepts a `name` prop to define the attribute to be shown.
|
|
1248
|
-
* It also accepts:
|
|
1249
|
-
* - a `type` props to enable different kind of behaviors like `field` (default), `edit` or `delete`.
|
|
1250
|
-
* - a `label` props to show a custom label if chosen `type` is `edit` or `delete`.
|
|
1251
|
-
* - an `onClick` props to define a custom click behavior.
|
|
1252
|
-
*
|
|
1253
|
-
* <span title="Type `delete`" type="info">
|
|
1254
|
-
* Only in case `type` is set to `delete` a default `onClick` behavior will be set to manage current address removal.
|
|
1255
|
-
* </span>
|
|
1256
|
-
*
|
|
1257
|
-
* <span title="Requirement" type="warning">
|
|
1258
|
-
* It must to be used inside the `<Address>` component.
|
|
1259
|
-
* </span>
|
|
1260
|
-
*
|
|
1261
|
-
* <span title="Fields" type="info">
|
|
1262
|
-
* Check the `addresses` resource from our [Core API documentation](https://docs.commercelayer.io/core/v/api-reference/addresses/object)
|
|
1263
|
-
* for more details about the available attributes to render.
|
|
1264
|
-
* </span>
|
|
1265
|
-
*/
|
|
1266
|
-
declare function AddressField(props: Props$1n): JSX.Element;
|
|
1267
|
-
|
|
1268
|
-
type Props$1m = {
|
|
1269
|
-
/**
|
|
1270
|
-
* The name of the input.
|
|
1271
|
-
*/
|
|
1272
|
-
name: Extract<AddressValuesKeys, AddressInputName>;
|
|
1273
|
-
/**
|
|
1274
|
-
* @deprecated
|
|
1275
|
-
* Used to add a custom validation rule. Accept a regex as param.
|
|
1276
|
-
*/
|
|
1277
|
-
pattern?: RegExp;
|
|
1278
|
-
} & Omit<BaseInputComponentProps, 'name'> & Omit<JSX.IntrinsicElements['input'], 'pattern'> & Omit<JSX.IntrinsicElements['textarea'], 'children' | 'pattern'>;
|
|
1279
|
-
/**
|
|
1280
|
-
* The AddressInput component creates a form `input` related to a particular address attribute.
|
|
1281
|
-
*
|
|
1282
|
-
* It requires a `name` prop to define the field name associated with the input and accepts most of HTML `input` tag standard props.
|
|
1283
|
-
*
|
|
1284
|
-
* <span title="Name prop" type="info">
|
|
1285
|
-
* The `name` prop must respect the convention of mentioning one of the available addresses forms (`billing_address` or `shipping_address` or `customer_address`) concatenated to the address attribute name with a `_` separator. Eg.: `billing_address_first_name`.
|
|
1286
|
-
* </span>
|
|
1287
|
-
*
|
|
1288
|
-
* <span title="Requirement" type="warning">
|
|
1289
|
-
* It must to be used inside either the `<BillingAddressForm>` or the `<ShippingAddressForm>` component.
|
|
1290
|
-
* </span>
|
|
1291
|
-
*
|
|
1292
|
-
* <span title="Fields" type="info">
|
|
1293
|
-
* Check the `addresses` resource from our [Core API documentation](https://docs.commercelayer.io/core/v/api-reference/addresses/object)
|
|
1294
|
-
* for more details about the available attributes to render.
|
|
1295
|
-
* </span>
|
|
1296
|
-
*/
|
|
1297
|
-
declare function AddressInput(props: Props$1m): JSX.Element | null;
|
|
1298
|
-
|
|
1299
|
-
type SelectFieldName = `billing_address_${`metadata_${string}`}` | `shipping_address_${`metadata_${string}`}`;
|
|
1300
|
-
interface Props$1l extends Omit<BaseSelectComponentProps, 'name'>, Pick<JSX.IntrinsicElements['select'], 'className' | 'id' | 'style'> {
|
|
1301
|
-
name: Extract<AddressValuesKeys, SelectFieldName>;
|
|
1302
|
-
required?: boolean;
|
|
1303
|
-
disabled?: boolean;
|
|
1304
|
-
}
|
|
1305
|
-
/**
|
|
1306
|
-
* The AddressInputSelect component creates a form `select` related to the `metadata` attribute of the `address` object.
|
|
1307
|
-
*
|
|
1308
|
-
* It requires a `name` prop to define the field name associated with the select and accepts most of HTML `select` tag standard props.
|
|
1309
|
-
*
|
|
1310
|
-
* <span title="Name prop" type="info">
|
|
1311
|
-
* The `name` prop must respect the convention of mentioning one of the available addresses forms (`billing_address` or `shipping_address`) concatenated to the `metadata` address attribute with a `_` separator. Eg.: `billing_address_metadata_your-key`.
|
|
1312
|
-
* </span>
|
|
1313
|
-
*
|
|
1314
|
-
* <span title="Requirement" type="warning">
|
|
1315
|
-
* It must to be used inside either the `<BillingAddressForm>` or the `<ShippingAddressForm>` component.
|
|
1316
|
-
* </span>
|
|
1317
|
-
*
|
|
1318
|
-
* <span title="Fields" type="info">
|
|
1319
|
-
* Check the `addresses` resource from our [Core API documentation](https://docs.commercelayer.io/core/v/api-reference/addresses/object)
|
|
1320
|
-
* for more details about the available attributes to render.
|
|
1321
|
-
* </span>
|
|
1322
|
-
*/
|
|
1323
|
-
declare function AddressInputSelect(props: Props$1l): JSX.Element;
|
|
1324
|
-
|
|
1325
|
-
type Props$1k = Omit<BaseSelectComponentProps, "options" | "name"> & {
|
|
1326
|
-
name: AddressStateSelectName;
|
|
1327
|
-
required?: boolean;
|
|
1328
|
-
disabled?: boolean;
|
|
1329
|
-
inputClassName?: string;
|
|
1330
|
-
selectClassName?: string;
|
|
1331
|
-
/**
|
|
1332
|
-
* Optional states list to extend the default one.
|
|
1333
|
-
* This component will try to render a select getting as options the states found for the selected country.
|
|
1334
|
-
* If the country has no states, it will render a text input field instead.
|
|
1335
|
-
*/
|
|
1336
|
-
states?: States;
|
|
1337
|
-
} & Pick<JSX.IntrinsicElements["select"], "className" | "id" | "style">;
|
|
1338
|
-
/**
|
|
1339
|
-
* The AddressInput component creates a form `select` related to the `state_code` attribute of the `address` object.
|
|
1340
|
-
*
|
|
1341
|
-
* It requires a `name` prop to define the field name associated with the select and accepts most of HTML `select` tag standard props.
|
|
1342
|
-
*
|
|
1343
|
-
* <span title="Name prop" type="info">
|
|
1344
|
-
* The `name` prop must respect the convention of mentioning one of the available addresses forms (`billing_address` or `shipping_address`) concatenated to the `state_code` address attribute with a `_` separator. Eg.: `billing_address_state_code`.
|
|
1345
|
-
* </span>
|
|
1346
|
-
*
|
|
1347
|
-
* <span title="Requirement" type="warning">
|
|
1348
|
-
* It must to be used inside either the `<BillingAddressForm>` or the `<ShippingAddressForm>` component.
|
|
1349
|
-
* </span>
|
|
1350
|
-
*
|
|
1351
|
-
* <span title="Fields" type="info">
|
|
1352
|
-
* Check the `addresses` resource from our [Core API documentation](https://docs.commercelayer.io/core/v/api-reference/addresses/object)
|
|
1353
|
-
* for more details about the available attributes to render.
|
|
1354
|
-
* </span>
|
|
1355
|
-
*/
|
|
1356
|
-
declare function AddressStateSelector(props: Props$1k): JSX.Element;
|
|
1357
|
-
|
|
1358
|
-
interface Props$1j {
|
|
1359
|
-
children: ReactNode;
|
|
1360
|
-
/**
|
|
1361
|
-
* If true, the shipping address will be considered. Default is false.
|
|
1362
|
-
*/
|
|
1363
|
-
shipToDifferentAddress?: boolean;
|
|
1364
|
-
/**
|
|
1365
|
-
* If true, the address will be considered a business address.
|
|
1366
|
-
*/
|
|
1367
|
-
isBusiness?: boolean;
|
|
1368
|
-
/**
|
|
1369
|
-
* If true, the shipping address will be considered as primary address. Default is false.
|
|
1370
|
-
*/
|
|
1371
|
-
invertAddresses?: boolean;
|
|
1372
|
-
}
|
|
1373
|
-
/**
|
|
1374
|
-
* Main container for the Addresses components.
|
|
1375
|
-
* It provides demanded functionalities to show/manage an address or a series of addresses depending on the context in use.
|
|
1376
|
-
* In addition it provides order oriented functionalities to manage billing and shipping addresses.
|
|
1377
|
-
*
|
|
1378
|
-
* It accept:
|
|
1379
|
-
* - a `shipToDifferentAddress` prop to define if the order related shipping address will be different from the billing one.
|
|
1380
|
-
* - a `isBusiness` prop to define if the current address needs to be threated as a `business` address during creation/update.
|
|
1381
|
-
*
|
|
1382
|
-
* <span title='Requirements' type='warning'>
|
|
1383
|
-
* Must be a child of the `<CommerceLayer>` component.
|
|
1384
|
-
* </span>
|
|
1385
|
-
* <span title='Children' type='info'>
|
|
1386
|
-
* `<BillingAddressContainer>`,
|
|
1387
|
-
* `<BillingAddressForm>`,
|
|
1388
|
-
* `<ShippingAddressContainer>`,
|
|
1389
|
-
* `<ShippingAddressForm>`,
|
|
1390
|
-
* `<CustomerAddressForm>`,
|
|
1391
|
-
* `<AddressesEmpty>`,
|
|
1392
|
-
* `<Addresses>`
|
|
1393
|
-
* </span>
|
|
1394
|
-
*/
|
|
1395
|
-
declare function AddressesContainer(props: Props$1j): JSX.Element;
|
|
1396
|
-
|
|
1397
|
-
interface Props$1i extends Omit<JSX.IntrinsicElements['span'], 'children'> {
|
|
1398
|
-
/**
|
|
1399
|
-
* Function allow you to customize the component
|
|
1400
|
-
*/
|
|
1401
|
-
children?: ChildrenFunction<Omit<Props$1i, 'children'>>;
|
|
1402
|
-
/**
|
|
1403
|
-
* Label to show. Default: 'No addresses available.'
|
|
1404
|
-
*/
|
|
1405
|
-
emptyText?: string;
|
|
1406
|
-
}
|
|
1407
|
-
/**
|
|
1408
|
-
* The AddressesEmpty component is aimed to display a message in case no customer address is available, otherwise it won't show.
|
|
1409
|
-
*
|
|
1410
|
-
* It accepts an optional `emptyText` prop to customize default message.
|
|
1411
|
-
*
|
|
1412
|
-
* It is also possible to wrap inside this component any children elements to create a completely custom experience regarding the absence of customer addresses.
|
|
1413
|
-
*
|
|
1414
|
-
* <span title="Requirement" type="warning">
|
|
1415
|
-
* It must to be used inside the `<AddressesContainer>` component.
|
|
1416
|
-
* </span>
|
|
1417
|
-
*
|
|
1418
|
-
*/
|
|
1419
|
-
declare function AddressesEmpty(props: Props$1i): JSX.Element | null;
|
|
1420
|
-
|
|
1421
|
-
interface Props$1h {
|
|
1422
|
-
children: ReactNode;
|
|
1423
|
-
}
|
|
1424
|
-
declare function BillingAddressContainer(props: Props$1h): JSX.Element;
|
|
1425
|
-
|
|
1426
|
-
type Props$1g = {
|
|
1427
|
-
children: ReactNode;
|
|
1428
|
-
/**
|
|
1429
|
-
* Define if current form needs to be reset over a defined boolean condition
|
|
1430
|
-
*/
|
|
1431
|
-
reset?: boolean;
|
|
1432
|
-
/**
|
|
1433
|
-
* Define children input and select classnames assigned in case of validation error.
|
|
1434
|
-
*/
|
|
1435
|
-
errorClassName?: string;
|
|
1436
|
-
fieldEvent?: 'blur' | 'change';
|
|
1437
|
-
/**
|
|
1438
|
-
* Callback to customize the error message for a specific field. Called for each error in the form.
|
|
1439
|
-
*/
|
|
1440
|
-
customFieldMessageError?: CustomFieldMessageError;
|
|
1441
|
-
} & Omit<JSX.IntrinsicElements['form'], 'onSubmit'>;
|
|
1442
|
-
/**
|
|
1443
|
-
* Form container for creating or editing an order related billing address or a customer address, depending on the context in use.
|
|
1444
|
-
*
|
|
1445
|
-
* <span title='Requirements' type='warning'>
|
|
1446
|
-
* Must be a child of the `<AddressesContainer>` component.
|
|
1447
|
-
* Can optionally be a child of the `<OrderContainer>` component, when it needs to be used in the checkout process and store the billing address in the order object.
|
|
1448
|
-
* </span>
|
|
1449
|
-
* <span title='Children' type='info'>
|
|
1450
|
-
* `<AddressInput>`,
|
|
1451
|
-
* `<AddressCountrySelector>`,
|
|
1452
|
-
* `<AddressStateSelector>`,
|
|
1453
|
-
* `<SaveAddressesButton>`
|
|
1454
|
-
* </span>
|
|
1455
|
-
*/
|
|
1456
|
-
declare function BillingAddressForm(props: Props$1g): JSX.Element;
|
|
1457
|
-
|
|
1458
|
-
interface TOnClick {
|
|
1459
|
-
success: boolean;
|
|
1460
|
-
order?: Order;
|
|
1461
|
-
}
|
|
1462
|
-
interface ChildrenProps$l extends Omit<Props$1f, "children"> {
|
|
1463
|
-
}
|
|
1464
|
-
interface Props$1f extends Omit<JSX.IntrinsicElements["button"], "children" | "onClick"> {
|
|
1465
|
-
children?: ChildrenFunction<ChildrenProps$l>;
|
|
1466
|
-
label?: string | ReactNode;
|
|
1467
|
-
onClick?: (params: TOnClick) => void;
|
|
1468
|
-
addressId?: string;
|
|
1469
|
-
requiredMetadataFields?: string[];
|
|
1470
|
-
}
|
|
1471
|
-
declare function SaveAddressesButton(props: Props$1f): JSX.Element;
|
|
1472
|
-
|
|
1473
|
-
interface Props$1e {
|
|
1474
|
-
children: DefaultChildrenType;
|
|
1475
|
-
}
|
|
1476
|
-
declare function ShippingAddressContainer(props: Props$1e): JSX.Element;
|
|
1477
|
-
|
|
1478
|
-
interface Props$1d extends Omit<JSX.IntrinsicElements['form'], 'onSubmit'> {
|
|
1479
|
-
children: ReactNode;
|
|
1480
|
-
reset?: boolean;
|
|
1481
|
-
errorClassName?: string;
|
|
1482
|
-
fieldEvent?: 'blur' | 'change';
|
|
1483
|
-
/**
|
|
1484
|
-
* Callback to customize the error message for a specific field. Called for each error in the form.
|
|
1485
|
-
*/
|
|
1486
|
-
customFieldMessageError?: CustomFieldMessageError;
|
|
1487
|
-
}
|
|
1488
|
-
/**
|
|
1489
|
-
* Form container for creating or editing an order related shipping address.
|
|
1490
|
-
*
|
|
1491
|
-
* It accept:
|
|
1492
|
-
* - a `reset` prop to define if current form needs to be reset over a defined boolean condition.
|
|
1493
|
-
* - a `errorClassName` prop to define children input and select classnames assigned in case of validation error.
|
|
1494
|
-
*
|
|
1495
|
-
* <span title='Requirements' type='warning'>
|
|
1496
|
-
* Must be a child of the `<AddressesContainer>` component.
|
|
1497
|
-
* </span>
|
|
1498
|
-
* <span title='Children' type='info'>
|
|
1499
|
-
* `<AddressInput>`,
|
|
1500
|
-
* `<AddressCountrySelector>`,
|
|
1501
|
-
* `<AddressStateSelector>`,
|
|
1502
|
-
* `<SaveAddressesButton>`
|
|
1503
|
-
* </span>
|
|
1504
|
-
*/
|
|
1505
|
-
declare function ShippingAddressForm(props: Props$1d): JSX.Element;
|
|
1506
|
-
|
|
1507
|
-
interface Props$1c {
|
|
1508
|
-
/**
|
|
1509
|
-
* Accept a React node as children.
|
|
1510
|
-
*/
|
|
1511
|
-
children: DefaultChildrenType;
|
|
1512
|
-
/**
|
|
1513
|
-
* The access token to authenticate the API calls.
|
|
1514
|
-
*/
|
|
1515
|
-
accessToken: string;
|
|
1516
|
-
/**
|
|
1517
|
-
* The endpoint to make the API calls. e.g. https://yourdomain.commercelayer.io
|
|
1518
|
-
*/
|
|
1519
|
-
endpoint?: string;
|
|
1520
|
-
/**
|
|
1521
|
-
* The domain to make the API calls. e.g. commercelayer.io
|
|
1522
|
-
*/
|
|
1523
|
-
domain?: string;
|
|
1524
|
-
}
|
|
1525
|
-
/**
|
|
1526
|
-
* CommerceLayer component
|
|
1527
|
-
*/
|
|
1528
|
-
declare function CommerceLayer(props: Props$1c): JSX.Element;
|
|
1529
|
-
|
|
1530
|
-
interface Props$1b extends Omit<JSX.IntrinsicElements['form'], 'onSubmit'> {
|
|
1531
|
-
children: ReactNode;
|
|
1532
|
-
reset?: boolean;
|
|
1533
|
-
errorClassName?: string;
|
|
1534
|
-
/**
|
|
1535
|
-
* Array of countries that have states has select options. Ignore this if you are not overriding the default states list.
|
|
1536
|
-
* If you are overriding the default states list, you must pass the countries that have states as select options.
|
|
1537
|
-
*/
|
|
1538
|
-
countriesWithPredefinedStateOptions?: string[];
|
|
1539
|
-
}
|
|
1540
|
-
declare function CustomerAddressForm(props: Props$1b): JSX.Element;
|
|
1541
|
-
|
|
1542
|
-
interface Props$1a {
|
|
1543
|
-
children: DefaultChildrenType;
|
|
1544
|
-
/**
|
|
1545
|
-
* Customer type
|
|
1546
|
-
*/
|
|
1547
|
-
isGuest?: boolean;
|
|
1548
|
-
/**
|
|
1549
|
-
* The page size
|
|
1550
|
-
* default: 10
|
|
1551
|
-
*/
|
|
1552
|
-
addressesPageSize?: QueryPageSize;
|
|
1553
|
-
}
|
|
1554
|
-
/**
|
|
1555
|
-
* Main container for the Customers components.
|
|
1556
|
-
* It stores - in its context - the details of an active customer, if present.
|
|
1557
|
-
*
|
|
1558
|
-
* It also accept a `isGuest` prop to define if no customer is currently set as active.
|
|
1559
|
-
*
|
|
1560
|
-
* <span title='Requirements' type='warning'>
|
|
1561
|
-
* Must be a child of the `<CommerceLayer>` component.
|
|
1562
|
-
* </span>
|
|
1563
|
-
* <span title='Children' type='info'>
|
|
1564
|
-
* `<CustomerField>`,
|
|
1565
|
-
* `<CustomerInput>`,
|
|
1566
|
-
* `<SaveCustomerButton>`,
|
|
1567
|
-
* `<AddressesContainer>`,
|
|
1568
|
-
* `<AddressesEmpty>`,
|
|
1569
|
-
* `<CustomerPaymentSource>`,
|
|
1570
|
-
* `<CustomerPaymentSourceEmpty>`,
|
|
1571
|
-
* `<PaymentMethodsContainer>`,
|
|
1572
|
-
* `<OrdersList>`
|
|
1573
|
-
* </span>
|
|
1574
|
-
*/
|
|
1575
|
-
declare function CustomerContainer(props: Props$1a): JSX.Element;
|
|
1576
|
-
|
|
1577
|
-
type InitialSkuContext = Partial<{
|
|
1578
|
-
sku: Sku;
|
|
1579
|
-
}>;
|
|
1580
|
-
|
|
1581
|
-
interface InitialStockTransferContext {
|
|
1582
|
-
stockTransfer?: StockTransfer$1 | null | LineItem$1;
|
|
1583
|
-
}
|
|
1584
|
-
|
|
1585
|
-
type InitialLineItemChildrenContext = Partial<{
|
|
1586
|
-
lineItem: LineItem$1 | null | undefined;
|
|
1587
|
-
}>;
|
|
1588
|
-
|
|
1589
|
-
type InitialCustomerContext = Partial<{
|
|
1590
|
-
saveCustomerUser: (customerEmail: string) => Promise<void>;
|
|
1591
|
-
setCustomerErrors: SetCustomerErrors;
|
|
1592
|
-
setCustomerEmail: typeof setCustomerEmail;
|
|
1593
|
-
getCustomerPaymentSources: typeof getCustomerPaymentSources;
|
|
1594
|
-
deleteCustomerAddress: typeof deleteCustomerAddress;
|
|
1595
|
-
getCustomerAddresses: typeof getCustomerAddresses;
|
|
1596
|
-
createCustomerAddress: (address: TCustomerAddress) => Promise<void>;
|
|
1597
|
-
setResourceTrigger: typeof setResourceTrigger;
|
|
1598
|
-
getCustomerOrders: (props: Partial<Parameters<typeof getCustomerOrders>[0]>) => Promise<void>;
|
|
1599
|
-
getCustomerSubscriptions: (props: Partial<Parameters<typeof getCustomerSubscriptions>[0]>) => Promise<void>;
|
|
1600
|
-
reloadCustomerAddresses: () => Promise<void>;
|
|
1601
|
-
} & CustomerState>;
|
|
1602
|
-
|
|
1603
|
-
interface InitialParcelContext {
|
|
1604
|
-
parcel?: Parcel;
|
|
1605
|
-
}
|
|
1606
|
-
|
|
1607
|
-
interface InitialParcelLineItemContext {
|
|
1608
|
-
parcelLineItem?: ParcelLineItem$1;
|
|
1609
|
-
}
|
|
1610
|
-
|
|
1611
|
-
interface TResources {
|
|
1612
|
-
StockTransfer: LineItem$1 & {
|
|
1613
|
-
resource: 'stockTransfer';
|
|
1614
|
-
};
|
|
1615
|
-
Sku: Sku & {
|
|
1616
|
-
resource: 'sku';
|
|
1617
|
-
};
|
|
1618
|
-
LineItem: LineItem$1 & {
|
|
1619
|
-
resource: 'lineItem';
|
|
1620
|
-
};
|
|
1621
|
-
Customer: Customer & {
|
|
1622
|
-
resource: 'customers';
|
|
1623
|
-
};
|
|
1624
|
-
Parcel: Parcel & {
|
|
1625
|
-
resource: 'parcel';
|
|
1626
|
-
};
|
|
1627
|
-
ParcelLineItem: Pick<ParcelLineItem$1, 'quantity' | 'sku_code' | 'name' | 'image_url'> & {
|
|
1628
|
-
resource: 'parcelLineItem';
|
|
1629
|
-
};
|
|
1630
|
-
}
|
|
1631
|
-
type TGenericChildrenProps<E extends TResources[keyof TResources]> = Omit<Props$19<E>, 'children' | 'attribute' | 'context' | 'tagElement'> & {
|
|
1632
|
-
attributeValue: E[keyof E];
|
|
1633
|
-
};
|
|
1634
|
-
interface ResourceContext {
|
|
1635
|
-
stockTransfer: InitialStockTransferContext;
|
|
1636
|
-
sku: InitialSkuContext;
|
|
1637
|
-
lineItem: InitialLineItemChildrenContext;
|
|
1638
|
-
customers: InitialCustomerContext;
|
|
1639
|
-
parcel: InitialParcelContext;
|
|
1640
|
-
parcelLineItem: InitialParcelLineItemContext;
|
|
1641
|
-
}
|
|
1642
|
-
type GenericContext<K extends keyof ResourceContext> = Context<ResourceContext[K]>;
|
|
1643
|
-
interface Props$19<E extends TResources[keyof TResources]> {
|
|
1644
|
-
children?: (props: TGenericChildrenProps<E>) => JSX.Element;
|
|
1645
|
-
resource: E['resource'];
|
|
1646
|
-
/**
|
|
1647
|
-
* Resource attribute to display.
|
|
1648
|
-
*/
|
|
1649
|
-
attribute: keyof E;
|
|
1650
|
-
/**
|
|
1651
|
-
* Html tag to render. When tag is `img` the value will be used to fill the `src` attribute.
|
|
1652
|
-
*/
|
|
1653
|
-
tagElement: keyof JSX.IntrinsicElements;
|
|
1654
|
-
context: GenericContext<E['resource']>;
|
|
1655
|
-
}
|
|
1656
|
-
|
|
1657
|
-
type StockTransferFieldChildrenProps$1 = TGenericChildrenProps<TResources['Customer']>;
|
|
1658
|
-
type TCondition$5 = ConditionalElement<Exclude<TResources['Customer'], 'resource'>>;
|
|
1659
|
-
type Props$18 = {
|
|
1660
|
-
children?: (props: StockTransferFieldChildrenProps$1) => JSX.Element;
|
|
1661
|
-
} & TCondition$5;
|
|
1662
|
-
/**
|
|
1663
|
-
* The CustomerField component displays any attribute of the `customer` set in the state of the parent `<CustomerContainer>` component.
|
|
1664
|
-
*
|
|
1665
|
-
* It also accepts a `tagElement` props to enable specific tag-related props.
|
|
1666
|
-
* For examples, when `tagElement` is set to `img` it will also accept props related to `<img>` tag such as `height` and `width`.
|
|
1667
|
-
*
|
|
1668
|
-
* <span title="Requirement" type="warning">
|
|
1669
|
-
* It must to be used inside the `<CustomerContainer>` component.
|
|
1670
|
-
* </span>
|
|
1671
|
-
*
|
|
1672
|
-
* <span title="Fields" type="info">
|
|
1673
|
-
* Check the `customers` resource from our [Core API documentation](https://docs.commercelayer.io/core/v/api-reference/customers/object)
|
|
1674
|
-
* for more details about the available attributes to render.
|
|
1675
|
-
* </span>
|
|
1676
|
-
*/
|
|
1677
|
-
declare function CustomerField<P extends Props$18>(props: P): JSX.Element;
|
|
1678
|
-
|
|
1679
|
-
type Props$17 = {
|
|
1680
|
-
name?: 'customer_email' | string;
|
|
1681
|
-
type?: 'email' | string;
|
|
1682
|
-
saveOnBlur?: boolean;
|
|
1683
|
-
onBlur?: (email: string) => void;
|
|
1684
|
-
errorClassName?: string;
|
|
1685
|
-
} & Omit<BaseInputComponentProps, 'name' | 'type' | 'onBlur'> & Omit<JSX.IntrinsicElements['input'], 'children'> & Omit<JSX.IntrinsicElements['textarea'], 'children'>;
|
|
1686
|
-
declare function CustomerInput(props: Props$17): JSX.Element;
|
|
1687
|
-
|
|
1688
|
-
interface ChildrenProps$k extends Omit<Props$16, "children"> {
|
|
1689
|
-
handleClick: () => void;
|
|
1690
|
-
}
|
|
1691
|
-
interface Props$16 extends Omit<JSX.IntrinsicElements["button"], "children"> {
|
|
1692
|
-
children?: ChildrenFunction<ChildrenProps$k>;
|
|
1693
|
-
label?: string | ReactNode;
|
|
1694
|
-
onClick?: () => void;
|
|
1695
|
-
}
|
|
1696
|
-
declare function SaveCustomerButton(props: Props$16): JSX.Element;
|
|
1697
|
-
|
|
1698
|
-
interface Props$15 extends Omit<JSX.IntrinsicElements["form"], "children" | "ref"> {
|
|
1699
|
-
children: DefaultChildrenType;
|
|
1700
|
-
onSubmit?: (values: BaseState) => void;
|
|
1701
|
-
ref?: RefObject<HTMLFormElement | null>;
|
|
1702
|
-
}
|
|
1703
|
-
declare function GiftCard(props: Props$15): JSX.Element;
|
|
1704
|
-
|
|
1705
|
-
interface Props$14 {
|
|
1706
|
-
children: ReactNode;
|
|
1707
|
-
}
|
|
1708
|
-
declare function GiftCardContainer(props: Props$14): JSX.Element;
|
|
1709
|
-
|
|
1710
|
-
type Props$13 = Omit<BaseSelectComponentProps, 'options' | 'name'> & {
|
|
1711
|
-
required?: boolean;
|
|
1712
|
-
} & Pick<JSX.IntrinsicElements['select'], 'className' | 'id' | 'style'>;
|
|
1713
|
-
declare function GiftCardCurrencySelector(props: Props$13): JSX.Element;
|
|
1714
|
-
|
|
1715
|
-
type Props$12 = {
|
|
1716
|
-
name: GiftCardInputName;
|
|
1717
|
-
} & Omit<BaseInputComponentProps, 'name'> & Omit<JSX.IntrinsicElements['input'], 'children'> & Omit<JSX.IntrinsicElements['textarea'], 'children'>;
|
|
1718
|
-
declare function GiftCardInput(props: Props$12): JSX.Element;
|
|
1719
|
-
|
|
1720
|
-
interface ChildrenProps$j extends Omit<Props$11, "children" | "type"> {
|
|
1721
|
-
code?: string | null;
|
|
1722
|
-
hide?: boolean;
|
|
1723
|
-
discountAmountCents?: number | null;
|
|
1724
|
-
discountAmountFloat?: number | null;
|
|
1725
|
-
formattedDiscountAmount?: string | null;
|
|
1726
|
-
}
|
|
1727
|
-
interface Props$11 extends Omit<JSX.IntrinsicElements["span"], "children"> {
|
|
1728
|
-
type?: CodeType;
|
|
1729
|
-
children?: ChildrenFunction<ChildrenProps$j>;
|
|
1730
|
-
}
|
|
1731
|
-
declare function GiftCardOrCouponCode({ children, type, ...props }: Props$11): JSX.Element | null;
|
|
1732
|
-
|
|
1733
|
-
interface Props$10 extends Omit<JSX.IntrinsicElements['form'], 'onSubmit'> {
|
|
1734
|
-
codeType?: OrderCodeType;
|
|
1735
|
-
children: DefaultChildrenType;
|
|
1736
|
-
onSubmit?: (response: {
|
|
1737
|
-
success: boolean;
|
|
1738
|
-
value: string;
|
|
1739
|
-
order?: Order;
|
|
1740
|
-
}) => void;
|
|
1741
|
-
}
|
|
1742
|
-
declare function GiftCardOrCouponForm(props: Props$10): JSX.Element | null;
|
|
1743
|
-
|
|
1744
|
-
type FieldName = 'gift_card_code' | 'coupon_code';
|
|
1745
|
-
type Props$$ = {
|
|
1746
|
-
name?: FieldName;
|
|
1747
|
-
type?: 'text';
|
|
1748
|
-
placeholderTranslation?: (codeType: OrderCodeType) => string;
|
|
1749
|
-
} & Omit<BaseInputComponentProps, 'name' | 'type'> & Omit<JSX.IntrinsicElements['input'], 'children'> & Omit<JSX.IntrinsicElements['textarea'], 'children'>;
|
|
1750
|
-
declare function GiftCardOrCouponInput(props: Props$$): JSX.Element | null;
|
|
1751
|
-
|
|
1752
|
-
interface ChildrenProps$i extends Omit<Props$_, "children" | "onClick"> {
|
|
1753
|
-
codeType?: OrderCodeType;
|
|
1754
|
-
hide?: boolean;
|
|
1755
|
-
handleClick?: () => void;
|
|
1756
|
-
}
|
|
1757
|
-
type Props$_ = {
|
|
1758
|
-
type?: CodeType;
|
|
1759
|
-
children?: ChildrenFunction<ChildrenProps$i>;
|
|
1760
|
-
label?: string | ReactNode;
|
|
1761
|
-
onClick?: (response: {
|
|
1762
|
-
success: boolean;
|
|
1763
|
-
order?: Order;
|
|
1764
|
-
}) => void;
|
|
1765
|
-
} & Omit<JSX.IntrinsicElements["button"], "type" | "onClick">;
|
|
1766
|
-
declare function GiftCardOrCouponRemoveButton(props: Props$_): JSX.Element | null;
|
|
1767
|
-
|
|
1768
|
-
interface ChildrenProps$h extends Omit<Props$Z, 'children'> {
|
|
1769
|
-
}
|
|
1770
|
-
interface Props$Z extends Omit<JSX.IntrinsicElements['button'], 'children'> {
|
|
1771
|
-
children?: ChildrenFunction<ChildrenProps$h>;
|
|
1772
|
-
label?: string | ReactNode;
|
|
1773
|
-
}
|
|
1774
|
-
declare function GiftCardOrCouponSubmit(props: Props$Z): JSX.Element;
|
|
1775
|
-
|
|
1776
|
-
interface Props$Y extends Omit<JSX.IntrinsicElements['button'], 'children' | 'onClick'> {
|
|
1777
|
-
/**
|
|
1778
|
-
* The code of the sku.
|
|
1779
|
-
*/
|
|
1780
|
-
skuCode: string;
|
|
1781
|
-
/**
|
|
1782
|
-
* The label to display.
|
|
1783
|
-
*/
|
|
1784
|
-
label?: string | JSX.Element;
|
|
1785
|
-
/**
|
|
1786
|
-
* The label to display when the button is loading.
|
|
1787
|
-
*/
|
|
1788
|
-
loadingLabel?: string | JSX.Element;
|
|
1789
|
-
/**
|
|
1790
|
-
* The email of the customer.
|
|
1791
|
-
*/
|
|
1792
|
-
customerEmail?: string;
|
|
1793
|
-
/**
|
|
1794
|
-
* The children of the component.
|
|
1795
|
-
*/
|
|
1796
|
-
children?: ChildrenFunction<Omit<Props$Y, 'children'>>;
|
|
1797
|
-
/**
|
|
1798
|
-
* Show the button.
|
|
1799
|
-
*/
|
|
1800
|
-
show?: boolean;
|
|
1801
|
-
/**
|
|
1802
|
-
* The callback function to call when the button is clicked.
|
|
1803
|
-
*/
|
|
1804
|
-
onClick?: (response: {
|
|
1805
|
-
success: boolean;
|
|
1806
|
-
}) => void;
|
|
1807
|
-
}
|
|
1808
|
-
declare function InStockSubscriptionButton({ skuCode, customerEmail, children, onClick, show, label, loadingLabel, ...props }: Props$Y): JSX.Element | null;
|
|
1809
|
-
|
|
1810
|
-
interface Props$X {
|
|
1811
|
-
/**
|
|
1812
|
-
* The children of the component.
|
|
1813
|
-
*/
|
|
1814
|
-
children: DefaultChildrenType;
|
|
1815
|
-
}
|
|
1816
|
-
declare function InStockSubscriptionsContainer({ children }: Props$X): JSX.Element | null;
|
|
1817
|
-
|
|
1818
|
-
type TLineItem = 'gift_cards' | 'payment_methods' | 'promotions' | 'shipments' | 'skus' | 'bundles' | 'adjustments';
|
|
1819
|
-
interface Props$W {
|
|
1820
|
-
children: JSX.Element | JSX.Element[];
|
|
1821
|
-
type?: TLineItem;
|
|
1822
|
-
}
|
|
1823
|
-
declare function LineItem(props: Props$W): JSX.Element;
|
|
1824
|
-
|
|
1825
|
-
type Props$V = BaseAmountComponent & {
|
|
1826
|
-
type?: BasePriceType;
|
|
1827
|
-
};
|
|
1828
|
-
declare function LineItemAmount(props: Props$V): JSX.Element;
|
|
1829
|
-
|
|
1830
|
-
interface TLineItemCode extends Omit<Props$U, 'children'> {
|
|
1831
|
-
lineItem: LineItem$1;
|
|
1832
|
-
skuCode: string;
|
|
1833
|
-
}
|
|
1834
|
-
interface Props$U extends Omit<JSX.IntrinsicElements['p'], 'children'> {
|
|
1835
|
-
children?: ChildrenFunction<TLineItemCode>;
|
|
1836
|
-
type?: 'sku_code' | 'bundle_code';
|
|
1837
|
-
}
|
|
1838
|
-
declare function LineItemCode({ type, children, ...p }: Props$U): JSX.Element;
|
|
1839
|
-
|
|
1840
|
-
type LineItemFieldChildrenProps = TGenericChildrenProps<TResources['LineItem']>;
|
|
1841
|
-
type TCondition$4 = ConditionalElement<Exclude<TResources['LineItem'], 'resource'>>;
|
|
1842
|
-
type Props$T = {
|
|
1843
|
-
children?: (props: LineItemFieldChildrenProps) => JSX.Element;
|
|
1844
|
-
} & TCondition$4;
|
|
1845
|
-
/**
|
|
1846
|
-
* @param props {@link Props}
|
|
1847
|
-
* @returns
|
|
1848
|
-
*/
|
|
1849
|
-
declare function LineItemField<P extends Props$T>(props: P): JSX.Element;
|
|
1850
|
-
|
|
1851
|
-
interface TLineItemImage extends Omit<Props$S, 'children'> {
|
|
1852
|
-
src: string;
|
|
1853
|
-
lineItem: LineItem$1;
|
|
1854
|
-
}
|
|
1855
|
-
type Props$S = {
|
|
1856
|
-
children?: ChildrenFunction<TLineItemImage>;
|
|
1857
|
-
width?: number;
|
|
1858
|
-
placeholder?: {
|
|
1859
|
-
[K in TLineItem]?: string;
|
|
1860
|
-
};
|
|
1861
|
-
} & Omit<JSX.IntrinsicElements['img'], 'src' | 'srcSet' | 'placeholder'>;
|
|
1862
|
-
declare function LineItemImage(props: Props$S): JSX.Element | null;
|
|
1863
|
-
|
|
1864
|
-
interface TLineItemName extends Omit<Props$R, 'children'> {
|
|
1865
|
-
label: string;
|
|
1866
|
-
lineItem: LineItem$1;
|
|
1867
|
-
}
|
|
1868
|
-
interface Props$R extends Omit<JSX.IntrinsicElements['p'], 'children'> {
|
|
1869
|
-
children?: ChildrenFunction<TLineItemName>;
|
|
1870
|
-
}
|
|
1871
|
-
declare function LineItemName(props: Props$R): JSX.Element;
|
|
1872
|
-
|
|
1873
|
-
interface TLineItemOption extends Omit<Props$Q, "children"> {
|
|
1874
|
-
lineItemOption: LineItemOption$2;
|
|
1875
|
-
}
|
|
1876
|
-
interface Props$Q {
|
|
1877
|
-
id?: string;
|
|
1878
|
-
className?: string;
|
|
1879
|
-
key?: string;
|
|
1880
|
-
style?: CSSProperties;
|
|
1881
|
-
children?: ChildrenFunction<TLineItemOption>;
|
|
1882
|
-
name?: string;
|
|
1883
|
-
valueClassName?: string;
|
|
1884
|
-
tagElement?: keyof JSX.IntrinsicElements;
|
|
1885
|
-
tagContainer?: keyof JSX.IntrinsicElements;
|
|
1886
|
-
}
|
|
1887
|
-
declare function LineItemOption(props: Props$Q): JSX.Element;
|
|
1888
|
-
|
|
1889
|
-
type Props$P = {
|
|
1890
|
-
children: ReactNode;
|
|
1891
|
-
title?: string;
|
|
1892
|
-
showName?: boolean;
|
|
1893
|
-
titleTagElement?: keyof JSX.IntrinsicElements;
|
|
1894
|
-
titleClassName?: string;
|
|
1895
|
-
} & Omit<JSX.IntrinsicElements['div'], 'children'> & ({
|
|
1896
|
-
skuOptionId: string;
|
|
1897
|
-
showAll?: never;
|
|
1898
|
-
} | {
|
|
1899
|
-
skuOptionId?: never;
|
|
1900
|
-
showAll: true;
|
|
1901
|
-
});
|
|
1902
|
-
declare function LineItemOptions(props: Props$P): JSX.Element;
|
|
1903
|
-
|
|
1904
|
-
interface ChildrenProps$g extends Omit<Props$O, 'children'> {
|
|
1905
|
-
quantity: number;
|
|
1906
|
-
handleChange: (event: React.MouseEvent<HTMLSelectElement>) => void;
|
|
1907
|
-
lineItem?: LineItem$1;
|
|
1908
|
-
}
|
|
1909
|
-
type Props$O = {
|
|
1910
|
-
children?: ChildrenFunction<ChildrenProps$g>;
|
|
1911
|
-
max?: number;
|
|
1912
|
-
disabled?: boolean;
|
|
1913
|
-
readonly?: boolean;
|
|
1914
|
-
/**
|
|
1915
|
-
* force the update of the line item price using `_external_price: true` attribute
|
|
1916
|
-
* @link https://docs.commercelayer.io/core/external-resources/external-prices
|
|
1917
|
-
*/
|
|
1918
|
-
hasExternalPrice?: boolean;
|
|
1919
|
-
} & (Omit<JSX.IntrinsicElements['select'], 'children'> & Omit<JSX.IntrinsicElements['span'], 'children'>);
|
|
1920
|
-
declare function LineItemQuantity(props: Props$O): JSX.Element;
|
|
1921
|
-
|
|
1922
|
-
interface ChildrenProps$f extends Omit<Props$N, 'children'> {
|
|
1923
|
-
handleRemove: (event: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
1924
|
-
label?: string;
|
|
1925
|
-
lineItem?: LineItem$1;
|
|
1926
|
-
}
|
|
1927
|
-
interface Props$N extends PropsWithoutRef<Omit<JSX.IntrinsicElements['a'], 'children'>> {
|
|
1928
|
-
children?: ChildrenFunction<ChildrenProps$f>;
|
|
1929
|
-
label?: string;
|
|
1930
|
-
}
|
|
1931
|
-
declare function LineItemRemoveLink(props: Props$N): JSX.Element;
|
|
1932
|
-
|
|
1933
|
-
interface Props$M {
|
|
1934
|
-
children: DefaultChildrenType;
|
|
1935
|
-
filters?: Record<string, any>;
|
|
1936
|
-
loader?: JSX.Element;
|
|
1937
|
-
}
|
|
1938
|
-
declare function LineItemsContainer(props: Props$M): JSX.Element;
|
|
1939
|
-
|
|
1940
|
-
type TypeAccepted = Extract<TLineItem, 'skus' | 'gift_cards' | 'bundles' | 'adjustments'>;
|
|
1941
|
-
|
|
1942
|
-
interface ChildrenProps$e extends Omit<Props$L, 'children'> {
|
|
1943
|
-
quantity: number;
|
|
1944
|
-
}
|
|
1945
|
-
interface Props$L extends Omit<JSX.IntrinsicElements['span'], 'children'> {
|
|
1946
|
-
children?: ChildrenFunction<ChildrenProps$e>;
|
|
1947
|
-
typeAccepted?: TypeAccepted[];
|
|
1948
|
-
}
|
|
1949
|
-
declare function LineItemsCount(props: Props$L): JSX.Element;
|
|
1950
|
-
|
|
1951
|
-
interface ChildrenProps$d extends Omit<Props$K, 'children'> {
|
|
1952
|
-
quantity: number;
|
|
1953
|
-
text: string;
|
|
1954
|
-
}
|
|
1955
|
-
interface Props$K extends Omit<JSX.IntrinsicElements['span'], 'children'> {
|
|
1956
|
-
children?: ChildrenFunction<ChildrenProps$d>;
|
|
1957
|
-
text?: string;
|
|
1958
|
-
}
|
|
1959
|
-
declare function LineItemsEmpty(props: Props$K): JSX.Element | null;
|
|
1960
|
-
|
|
1961
|
-
interface TAddToCartButton extends Omit<Props$J, "children"> {
|
|
1962
|
-
handleClick: () => AddToCartReturn;
|
|
1963
|
-
}
|
|
1964
|
-
type BuyNowMode = {
|
|
1965
|
-
/**
|
|
1966
|
-
* Once item has been added, it redirects to the hosted checkout micro-frontend.
|
|
1967
|
-
*/
|
|
1968
|
-
buyNowMode: true;
|
|
1969
|
-
/**
|
|
1970
|
-
* If you have a self-hosted checkout, you can pass the url to redirect to it.
|
|
1971
|
-
*/
|
|
1972
|
-
checkoutUrl?: string;
|
|
1973
|
-
} | {
|
|
1974
|
-
buyNowMode?: false;
|
|
1975
|
-
checkoutUrl?: never;
|
|
1976
|
-
};
|
|
1977
|
-
type THostedCart = {
|
|
1978
|
-
/**
|
|
1979
|
-
* Once item has been added, it redirects to the hosted cart micro-frontend.
|
|
1980
|
-
*/
|
|
1981
|
-
redirectToHostedCart: true;
|
|
1982
|
-
/**
|
|
1983
|
-
* If you have a self-hosted cart, you can pass the url to redirect to it.
|
|
1984
|
-
*/
|
|
1985
|
-
hostedCartUrl?: string;
|
|
1986
|
-
/**
|
|
1987
|
-
* If you have a self-hosted cart, you can pass the protocol to redirect to it.
|
|
1988
|
-
*/
|
|
1989
|
-
protocol?: "http" | "https";
|
|
1990
|
-
} | {
|
|
1991
|
-
redirectToHostedCart?: false;
|
|
1992
|
-
hostedCartUrl?: never;
|
|
1993
|
-
protocol?: never;
|
|
1994
|
-
};
|
|
1995
|
-
type TButton = PropsWithoutRef<Omit<JSX.IntrinsicElements["button"], "children">>;
|
|
1996
|
-
type Props$J = {
|
|
1997
|
-
/**
|
|
1998
|
-
* Code of a bundle
|
|
1999
|
-
*/
|
|
2000
|
-
bundleCode?: string;
|
|
2001
|
-
children?: ChildrenFunction<TAddToCartButton>;
|
|
2002
|
-
/**
|
|
2003
|
-
* Disable the cart button
|
|
2004
|
-
*/
|
|
2005
|
-
disabled?: boolean;
|
|
2006
|
-
/**
|
|
2007
|
-
* Label to display
|
|
2008
|
-
*/
|
|
2009
|
-
label?: string | JSX.Element;
|
|
2010
|
-
/**
|
|
2011
|
-
* Line item which allow you customize the cart item
|
|
2012
|
-
*/
|
|
2013
|
-
lineItem?: CustomLineItem;
|
|
2014
|
-
/**
|
|
2015
|
-
* Line item option to add to cart
|
|
2016
|
-
*/
|
|
2017
|
-
lineItemOption?: LineItemOption$1;
|
|
2018
|
-
/**
|
|
2019
|
-
* Quantity of the item
|
|
2020
|
-
*/
|
|
2021
|
-
quantity?: string;
|
|
2022
|
-
/**
|
|
2023
|
-
* SKU code to add to cart
|
|
2024
|
-
*/
|
|
2025
|
-
skuCode?: string;
|
|
2026
|
-
/**
|
|
2027
|
-
* SKU list to add to cart
|
|
2028
|
-
*/
|
|
2029
|
-
skuListId?: string;
|
|
2030
|
-
} & TButton & BuyNowMode & THostedCart;
|
|
2031
|
-
/**
|
|
2032
|
-
* This component adds `line_items` to the cart (aka draft order), see the [how to create a shopping cart](https://docs.commercelayer.io/core/v/how-tos/placing-orders/shopping-cart/create-a-shopping-cart) documentation,
|
|
2033
|
-
* for a general understanding of the process.
|
|
2034
|
-
*
|
|
2035
|
-
* It can be used to add `skus` or `bundle` by receiving `skuCode` or `bundleCode` from props.
|
|
2036
|
-
* When `skuListId` is passed as prop , it will add all the `skus` in the `sku_list` to the cart.
|
|
2037
|
-
*
|
|
2038
|
-
* It's possible to select the quantity of the item to add to cart by passing the `quantity` prop.
|
|
2039
|
-
*
|
|
2040
|
-
* When this component is used inside a `<Skus>` or `<SkuList>` component, it will automatically get the `skuCode` and quantity from the context,
|
|
2041
|
-
* so you don't need to pass it as prop.
|
|
2042
|
-
*
|
|
2043
|
-
* It can automatically redirect to the cart page of the application using the `redirectToHostedCart` prop and optionally a `hostedCartUrl`.
|
|
2044
|
-
*
|
|
2045
|
-
* With a similar logic, you can enable a "Buy Now" experience and automatically redirect the customer to the checkout page using the `buyNowMode` prop and optionally a `checkoutUrl`.
|
|
2046
|
-
*
|
|
2047
|
-
* <span title="Requirement" type="warning">
|
|
2048
|
-
* Must be a child of the `<OrderContainer>` component.
|
|
2049
|
-
* </span>
|
|
2050
|
-
*/
|
|
2051
|
-
declare function AddToCartButton(props: Props$J): JSX.Element;
|
|
2052
|
-
|
|
2053
|
-
declare function AdjustmentAmount(props: BaseAmountComponent): JSX.Element;
|
|
2054
|
-
|
|
2055
|
-
interface ChildrenProps$c extends Omit<Props$I, 'children'> {
|
|
2056
|
-
/**
|
|
2057
|
-
* The url of the cart
|
|
2058
|
-
*/
|
|
2059
|
-
href: string;
|
|
2060
|
-
/**
|
|
2061
|
-
* Callback to dispatch the click event
|
|
2062
|
-
* @param e: MouseEvent<HTMLAnchorElement>
|
|
2063
|
-
* @returns Promise<void>
|
|
2064
|
-
*/
|
|
2065
|
-
handleClick?: (e: MouseEvent$1<HTMLAnchorElement>) => Promise<void>;
|
|
2066
|
-
/**
|
|
2067
|
-
* The order id
|
|
2068
|
-
*/
|
|
2069
|
-
orderId?: string;
|
|
2070
|
-
/**
|
|
2071
|
-
* The access token
|
|
2072
|
-
*/
|
|
2073
|
-
accessToken?: string;
|
|
2074
|
-
}
|
|
2075
|
-
interface Props$I extends Omit<JSX.IntrinsicElements['a'], 'children'> {
|
|
2076
|
-
children?: ChildrenFunction<ChildrenProps$c>;
|
|
2077
|
-
/**
|
|
2078
|
-
* Label to display
|
|
2079
|
-
*/
|
|
2080
|
-
label?: string | ReactNode;
|
|
2081
|
-
/**
|
|
2082
|
-
* The type of the cart. Defaults to undefined. If set to 'mini', the cart will open in a modal.
|
|
2083
|
-
*/
|
|
2084
|
-
type?: 'mini';
|
|
2085
|
-
/**
|
|
2086
|
-
* The domain of your forked application
|
|
2087
|
-
*/
|
|
2088
|
-
customDomain?: string;
|
|
2089
|
-
}
|
|
2090
|
-
/**
|
|
2091
|
-
* This component generates a link to the hosted mfe-cart application.
|
|
2092
|
-
* In this way you can connect your shop application with our hosted micro-frontend.
|
|
2093
|
-
*
|
|
2094
|
-
* <span title="Requirement" type="warning">
|
|
2095
|
-
* Must be a child of the `<OrderContainer>` component. <br />
|
|
2096
|
-
* </span>
|
|
2097
|
-
*/
|
|
2098
|
-
declare function CartLink(props: Props$I): JSX.Element | null;
|
|
2099
|
-
|
|
2100
|
-
interface ChildrenProps$b extends Omit<Props$H, "children"> {
|
|
2101
|
-
checkoutUrl: string;
|
|
2102
|
-
href: string;
|
|
2103
|
-
}
|
|
2104
|
-
interface Props$H extends Omit<JSX.IntrinsicElements["a"], "children"> {
|
|
2105
|
-
children?: ChildrenFunction<ChildrenProps$b>;
|
|
2106
|
-
/**
|
|
2107
|
-
* Label for the checkout link
|
|
2108
|
-
*/
|
|
2109
|
-
label?: string;
|
|
2110
|
-
/**
|
|
2111
|
-
* Ignores `order.checkout_url` and redirects to the hosted checkout micro-frontend.
|
|
2112
|
-
* @default true
|
|
2113
|
-
*/
|
|
2114
|
-
hostedCheckout?: boolean;
|
|
2115
|
-
}
|
|
2116
|
-
/**
|
|
2117
|
-
* This component generates a link to the hosted mfe-checkout application.
|
|
2118
|
-
* In this way you can connect your shop application with our hosted micro-frontend.
|
|
2119
|
-
*
|
|
2120
|
-
* By default it will takes the customer to our hosted checkout micro-frontend,
|
|
2121
|
-
* but if `hostedCheckout` is set as `false` it will use the `checkout_url` attribute
|
|
2122
|
-
* found in the `order` object.
|
|
2123
|
-
*/
|
|
2124
|
-
declare function CheckoutLink(props: Props$H): JSX.Element;
|
|
2125
|
-
|
|
2126
|
-
declare function DiscountAmount(props: BaseAmountComponent): JSX.Element;
|
|
2127
|
-
|
|
2128
|
-
declare function GiftCardAmount(props: BaseAmountComponent): JSX.Element | null;
|
|
2129
|
-
|
|
2130
|
-
interface Props$G {
|
|
2131
|
-
children: DefaultChildrenType;
|
|
2132
|
-
/**
|
|
2133
|
-
* Metadata to add when creates a new order
|
|
2134
|
-
*/
|
|
2135
|
-
metadata?: BaseMetadataObject;
|
|
2136
|
-
/**
|
|
2137
|
-
* Attribute to add when creates/updates an order
|
|
2138
|
-
*/
|
|
2139
|
-
attributes?: OrderCreate;
|
|
2140
|
-
/**
|
|
2141
|
-
* ID of the order
|
|
2142
|
-
*/
|
|
2143
|
-
orderId?: string;
|
|
2144
|
-
/**
|
|
2145
|
-
* Callback called when the order is updated
|
|
2146
|
-
*/
|
|
2147
|
-
fetchOrder?: (order: Order) => void;
|
|
2148
|
-
/**
|
|
2149
|
-
* Indicate if Adyen gift card management is enabled
|
|
2150
|
-
*/
|
|
2151
|
-
manageAdyenGiftCard?: boolean;
|
|
2152
|
-
}
|
|
2153
|
-
/**
|
|
2154
|
-
* This component is responsible for fetching the order and store it in its context.
|
|
2155
|
-
* It also provides the `fetchOrder` callback that is triggered every time the order is updated (it returns the updated order object as argument).
|
|
2156
|
-
* When the order is not placed yet, its possible to pass the `metadata` and `attributes` props to update the order.
|
|
2157
|
-
*
|
|
2158
|
-
* <span title="Requirement" type="warning">
|
|
2159
|
-
* Must be a child of the `<CommerceLayer>` component. <br />
|
|
2160
|
-
* Can be a child of the `<OrderStorage>` component and receive the `orderId` from it.
|
|
2161
|
-
* </span>
|
|
2162
|
-
*
|
|
2163
|
-
* <span title="Children" type="info">
|
|
2164
|
-
* `<AddToCartButton>`,
|
|
2165
|
-
* `<AdjustmentAmount>`,
|
|
2166
|
-
* `<CartLink>`,
|
|
2167
|
-
* `<CheckoutLink>`,
|
|
2168
|
-
* `<DiscountAmount>`,
|
|
2169
|
-
* `<GiftCardAmount>`,
|
|
2170
|
-
* `<HostedCart>`,
|
|
2171
|
-
* `<OrderNumber>`,
|
|
2172
|
-
* `<PaymentMethodAmount>`,
|
|
2173
|
-
* `<PlaceOrderButton>`,
|
|
2174
|
-
* `<PlaceOrderContainer>`,
|
|
2175
|
-
* `<PrivacyAndTermsCheckbox>`,
|
|
2176
|
-
* `<Shipping Amount>`,
|
|
2177
|
-
* `<SubTotalAmount>`,
|
|
2178
|
-
* `<TaxesAmount>`,
|
|
2179
|
-
* `<TotalAmount>`,
|
|
2180
|
-
* </span>
|
|
2181
|
-
*
|
|
2182
|
-
* <span title="Core API" type="info">
|
|
2183
|
-
* Check the `orders` resource from our [Core API documentation](https://docs.commercelayer.io/core/v/api-reference/orders/object).
|
|
2184
|
-
* </span>
|
|
2185
|
-
*/
|
|
2186
|
-
declare function OrderContainer(props: Props$G): JSX.Element;
|
|
2187
|
-
|
|
2188
|
-
type TOrderList = 'orders' | 'subscriptions';
|
|
2189
|
-
type TableAccessor<T extends TOrderList> = T extends 'orders' ? keyof Order : keyof OrderSubscription;
|
|
2190
|
-
type OrderListContent<T extends TOrderList> = T extends 'orders' ? Order : OrderSubscription;
|
|
2191
|
-
type InitialOrderListContext = Partial<{
|
|
2192
|
-
type: TOrderList;
|
|
2193
|
-
/**
|
|
2194
|
-
* The current order
|
|
2195
|
-
*/
|
|
2196
|
-
order: OrderListContent<TOrderList> | null;
|
|
2197
|
-
/**
|
|
2198
|
-
* The list of orders
|
|
2199
|
-
*/
|
|
2200
|
-
orders: OrderListContent<TOrderList>[] | null | undefined;
|
|
2201
|
-
/**
|
|
2202
|
-
* The current row
|
|
2203
|
-
*/
|
|
2204
|
-
row: Row<OrderListContent<TOrderList>>;
|
|
2205
|
-
/**
|
|
2206
|
-
* Show the row actions
|
|
2207
|
-
*/
|
|
2208
|
-
showActions: boolean;
|
|
2209
|
-
/**
|
|
2210
|
-
* Function to assign as custom row renderer
|
|
2211
|
-
*/
|
|
2212
|
-
actionsComponent: (props: {
|
|
2213
|
-
order: OrderListContent<TOrderList>;
|
|
2214
|
-
}) => JSX.Element;
|
|
2215
|
-
/**
|
|
2216
|
-
* Class name to assign as custom row renderer
|
|
2217
|
-
*/
|
|
2218
|
-
actionsContainerClassName: string;
|
|
2219
|
-
/**
|
|
2220
|
-
* Infinite scroll enabled
|
|
2221
|
-
*/
|
|
2222
|
-
infiniteScroll: boolean;
|
|
2223
|
-
}>;
|
|
2224
|
-
|
|
2225
|
-
type OrderListColumn<T extends TOrderList = 'orders'> = ColumnDef<OrderListContent<T>> & {
|
|
2226
|
-
className?: string;
|
|
2227
|
-
titleClassName?: string;
|
|
2228
|
-
};
|
|
2229
|
-
type TOrderListColumn<T extends TOrderList = 'orders'> = OrderListColumn<T>;
|
|
2230
|
-
type PaginationProps = {
|
|
2231
|
-
/**
|
|
2232
|
-
* Show table pagination. Default is false.
|
|
2233
|
-
*/
|
|
2234
|
-
showPagination: true;
|
|
2235
|
-
/**
|
|
2236
|
-
* Number of rows per page. Default is 10. Max is 25.
|
|
2237
|
-
*/
|
|
2238
|
-
pageSize?: TRange<1, 26>;
|
|
2239
|
-
} | {
|
|
2240
|
-
/**
|
|
2241
|
-
* Show table pagination. Default is false.
|
|
2242
|
-
*/
|
|
2243
|
-
showPagination?: false;
|
|
2244
|
-
pageSize?: never;
|
|
2245
|
-
};
|
|
2246
|
-
type SubscriptionFields = {
|
|
2247
|
-
/**
|
|
2248
|
-
* Subscriptions id - Use to fetch subscriptions and shows its orders
|
|
2249
|
-
*/
|
|
2250
|
-
id?: string;
|
|
2251
|
-
type?: 'subscriptions';
|
|
2252
|
-
} | {
|
|
2253
|
-
id?: never;
|
|
2254
|
-
type?: 'orders';
|
|
2255
|
-
};
|
|
2256
|
-
type Props$F = {
|
|
2257
|
-
/**
|
|
2258
|
-
* Type of list to render
|
|
2259
|
-
*/
|
|
2260
|
-
type?: TOrderList;
|
|
2261
|
-
/**
|
|
2262
|
-
* Children components to render
|
|
2263
|
-
*/
|
|
2264
|
-
children: DefaultChildrenType;
|
|
2265
|
-
/**
|
|
2266
|
-
* Columns to show
|
|
2267
|
-
*/
|
|
2268
|
-
columns: OrderListColumn<TOrderList>[];
|
|
2269
|
-
/**
|
|
2270
|
-
* Custom loader component
|
|
2271
|
-
*/
|
|
2272
|
-
loadingElement?: string | JSX.Element;
|
|
2273
|
-
/**
|
|
2274
|
-
* Function to assign as custom row renderer
|
|
2275
|
-
*/
|
|
2276
|
-
actionsComponent?: InitialOrderListContext['actionsComponent'];
|
|
2277
|
-
/**
|
|
2278
|
-
* Class name to assign to the custom row container
|
|
2279
|
-
*/
|
|
2280
|
-
actionsContainerClassName?: string;
|
|
2281
|
-
/**
|
|
2282
|
-
* Show actions column. Default is false.
|
|
2283
|
-
*/
|
|
2284
|
-
showActions?: boolean;
|
|
2285
|
-
/**
|
|
2286
|
-
* Sort by column. Default is `number` column descending.
|
|
2287
|
-
*/
|
|
2288
|
-
sortBy?: SortingState;
|
|
2289
|
-
/**
|
|
2290
|
-
* Class name to assign to pagination container.
|
|
2291
|
-
*/
|
|
2292
|
-
paginationContainerClassName?: string;
|
|
2293
|
-
/**
|
|
2294
|
-
* Class name to assign to the table header.
|
|
2295
|
-
*/
|
|
2296
|
-
theadClassName?: string;
|
|
2297
|
-
/**
|
|
2298
|
-
* Class name to assign to the table row.
|
|
2299
|
-
*/
|
|
2300
|
-
rowTrClassName?: string;
|
|
2301
|
-
} & Omit<JSX.IntrinsicElements['table'], 'children'> & PaginationProps & SubscriptionFields;
|
|
2302
|
-
declare function OrderList({ id, type, children, columns, loadingElement, showActions, showPagination, sortBy, pageSize, paginationContainerClassName, actionsComponent, actionsContainerClassName, theadClassName, rowTrClassName, ...p }: Props$F): JSX.Element;
|
|
2303
|
-
|
|
2304
|
-
interface Props$E extends Omit<JSX.IntrinsicElements['span'], 'children'> {
|
|
2305
|
-
/**
|
|
2306
|
-
* Function allow you to customize the component
|
|
2307
|
-
*/
|
|
2308
|
-
children?: ChildrenFunction<Omit<Props$E, 'children'>>;
|
|
2309
|
-
/**
|
|
2310
|
-
* Label to show. Default: 'No orders available.'
|
|
2311
|
-
*/
|
|
2312
|
-
emptyText?: string;
|
|
2313
|
-
}
|
|
2314
|
-
declare function OrderListEmpty(props: Props$E): JSX.Element | null;
|
|
2315
|
-
declare namespace OrderListEmpty {
|
|
2316
|
-
var displayName: string;
|
|
2317
|
-
}
|
|
2318
|
-
|
|
2319
|
-
interface ChildrenProps$a extends Omit<Props$D, "children"> {
|
|
2320
|
-
/**
|
|
2321
|
-
* The order resource
|
|
2322
|
-
*/
|
|
2323
|
-
order: OrderListContent<TOrderList>;
|
|
2324
|
-
/**
|
|
2325
|
-
* The current row
|
|
2326
|
-
*/
|
|
2327
|
-
row: Row<OrderListContent<TOrderList>>;
|
|
2328
|
-
/**
|
|
2329
|
-
* The current cell
|
|
2330
|
-
*/
|
|
2331
|
-
cell: Array<ReturnType<Row<OrderListContent<TOrderList>>["getVisibleCells"]>[number]>;
|
|
2332
|
-
}
|
|
2333
|
-
interface Props$D extends Omit<JSX.IntrinsicElements["td"], "children"> {
|
|
2334
|
-
children?: (props: ChildrenProps$a) => JSX.Element;
|
|
2335
|
-
/**
|
|
2336
|
-
* The order field to show
|
|
2337
|
-
*/
|
|
2338
|
-
field: TableAccessor<TOrderList>;
|
|
2339
|
-
}
|
|
2340
|
-
declare function OrderListRow({ field, children, ...p }: Props$D): JSX.Element;
|
|
2341
|
-
declare namespace OrderListRow {
|
|
2342
|
-
var displayName: string;
|
|
2343
|
-
}
|
|
2344
|
-
|
|
2345
|
-
type BaseFieldChildren = Omit<BaseFieldProps, 'children'>;
|
|
2346
|
-
interface BaseFieldProps extends Omit<JSX.IntrinsicElements['span'], 'children' | 'ref'> {
|
|
2347
|
-
attribute: 'number' | 'id';
|
|
2348
|
-
children?: (props: BaseFieldChildren) => JSX.Element;
|
|
2349
|
-
}
|
|
2350
|
-
|
|
2351
|
-
type Props$C = Omit<BaseFieldProps, 'attribute'>;
|
|
2352
|
-
declare function OrderNumber(props: Props$C): JSX.Element;
|
|
2353
|
-
|
|
2354
|
-
interface Props$B {
|
|
2355
|
-
children: ReactNode;
|
|
2356
|
-
/**
|
|
2357
|
-
* The key used to persist the order id in the browser local storage.
|
|
2358
|
-
*/
|
|
2359
|
-
persistKey: string;
|
|
2360
|
-
/**
|
|
2361
|
-
* Removes the saved order id from the local storage when order is placed.
|
|
2362
|
-
* @default true
|
|
2363
|
-
*/
|
|
2364
|
-
clearWhenPlaced?: boolean;
|
|
2365
|
-
}
|
|
2366
|
-
/**
|
|
2367
|
-
* This component handle the persistence of the order id in the browser local storage.
|
|
2368
|
-
* When adding a product into the cart and the order does not exist yet, in will be created by the `OrderContainer` and
|
|
2369
|
-
* the order id will then be automatically saved in the local storage using `OrderStorage` context.
|
|
2370
|
-
* In this way on page refresh or components remounting, the `OrderContainer` will be able to load the order getting the id from this context.
|
|
2371
|
-
*
|
|
2372
|
-
* By default, the localStorage key will be deleted once the order has been placed, but you can disable this behavior via `clearWhenPlaced` prop.
|
|
2373
|
-
*
|
|
2374
|
-
* <span title="Requirement" type="warning">
|
|
2375
|
-
* Must be a child of the `<CommerceLayer>` component. <br />
|
|
2376
|
-
* </span>
|
|
2377
|
-
*
|
|
2378
|
-
* <span title="Children" type="info">
|
|
2379
|
-
* `<OrderContainer>`,
|
|
2380
|
-
* </span>
|
|
2381
|
-
*/
|
|
2382
|
-
declare function OrderStorage(props: Props$B): JSX.Element;
|
|
2383
|
-
|
|
2384
|
-
declare function PaymentMethodAmount(props: BaseAmountComponent): JSX.Element;
|
|
2385
|
-
|
|
2386
|
-
interface ChildrenProps$9 extends Omit<Props$A, "children"> {
|
|
2387
|
-
/**
|
|
2388
|
-
* Callback function to place the order
|
|
2389
|
-
*/
|
|
2390
|
-
handleClick: () => Promise<void>;
|
|
2391
|
-
}
|
|
2392
|
-
interface Props$A extends Omit<JSX.IntrinsicElements["button"], "children" | "onClick"> {
|
|
2393
|
-
children?: ChildrenFunction<ChildrenProps$9>;
|
|
2394
|
-
/**
|
|
2395
|
-
* The label of the button
|
|
2396
|
-
*/
|
|
2397
|
-
label?: string | ReactNode | (() => ReactNode);
|
|
2398
|
-
/**
|
|
2399
|
-
* The label of the button when it's loading
|
|
2400
|
-
*/
|
|
2401
|
-
loadingLabel?: string | ReactNode;
|
|
2402
|
-
/**
|
|
2403
|
-
* If false, the button doesn't place the order automatically. Default: true
|
|
2404
|
-
*/
|
|
2405
|
-
autoPlaceOrder?: boolean;
|
|
2406
|
-
/**
|
|
2407
|
-
* Callback function that is fired when the button is clicked
|
|
2408
|
-
*/
|
|
2409
|
-
onClick?: (response: {
|
|
2410
|
-
placed: boolean;
|
|
2411
|
-
order?: Order;
|
|
2412
|
-
errors?: BaseError[];
|
|
2413
|
-
}) => void;
|
|
2414
|
-
}
|
|
2415
|
-
declare function PlaceOrderButton(props: Props$A): JSX.Element;
|
|
2416
|
-
|
|
2417
|
-
type IconBrand = 'visa' | 'credit-card' | 'amex' | 'mastercard' | 'jcb' | 'wire-transfer' | 'maestro' | 'cirrus' | 'paypal';
|
|
2418
|
-
interface DefaultContext {
|
|
2419
|
-
brand?: IconBrand | string;
|
|
2420
|
-
exp_month?: number | string;
|
|
2421
|
-
exp_year?: number | string;
|
|
2422
|
-
last4?: string;
|
|
2423
|
-
issuer_type?: string;
|
|
2424
|
-
showCard?: boolean;
|
|
2425
|
-
readonly?: boolean;
|
|
2426
|
-
handleEditClick?: (e: MouseEvent) => void;
|
|
2427
|
-
}
|
|
2428
|
-
declare const PaymentSourceContext: react.Context<DefaultContext>;
|
|
2429
|
-
|
|
2430
|
-
interface ChildrenProps$8 extends Pick<Props$z, 'customerPayments'> {
|
|
2431
|
-
PaymentSourceProvider: typeof PaymentSourceContext.Provider;
|
|
2432
|
-
}
|
|
2433
|
-
interface CustomerPayment extends CustomerPaymentSource {
|
|
2434
|
-
/**
|
|
2435
|
-
* Card details
|
|
2436
|
-
*/
|
|
2437
|
-
card?: {
|
|
2438
|
-
/**
|
|
2439
|
-
* Card brand
|
|
2440
|
-
*/
|
|
2441
|
-
brand: IconBrand;
|
|
2442
|
-
/**
|
|
2443
|
-
* Card last 4 digits
|
|
2444
|
-
*/
|
|
2445
|
-
last4: string;
|
|
2446
|
-
};
|
|
2447
|
-
/**
|
|
2448
|
-
* Handle click event
|
|
2449
|
-
*/
|
|
2450
|
-
handleClick?: () => void;
|
|
2451
|
-
}
|
|
2452
|
-
type CustomerCardsTemplateChildren = ChildrenFunction<ChildrenProps$8>;
|
|
2453
|
-
interface Props$z {
|
|
2454
|
-
/**
|
|
2455
|
-
* Customer payments
|
|
2456
|
-
*/
|
|
2457
|
-
customerPayments: CustomerPayment[];
|
|
2458
|
-
children: CustomerCardsTemplateChildren;
|
|
2459
|
-
/**
|
|
2460
|
-
* Payment resource
|
|
2461
|
-
*/
|
|
2462
|
-
paymentResource: PaymentResource;
|
|
2463
|
-
}
|
|
2464
|
-
|
|
2465
|
-
interface CustomerCardsProps {
|
|
2466
|
-
handleClick: () => void;
|
|
2467
|
-
}
|
|
2468
|
-
interface CustomerSaveToWalletProps {
|
|
2469
|
-
name: 'save_payment_source_to_customer_wallet';
|
|
2470
|
-
}
|
|
2471
|
-
interface PaymentSourceProps extends Omit<JSX.IntrinsicElements['div'], 'children'> {
|
|
2472
|
-
children?: JSX.Element | JSX.Element[];
|
|
2473
|
-
readonly?: boolean;
|
|
2474
|
-
templateCustomerCards?: CustomerCardsTemplateChildren;
|
|
2475
|
-
onClickCustomerCards?: () => void;
|
|
2476
|
-
templateCustomerSaveToWallet?: (props: CustomerSaveToWalletProps) => JSX.Element;
|
|
2477
|
-
loader?: LoaderType;
|
|
2478
|
-
}
|
|
2479
|
-
declare function PaymentSource(props: PaymentSourceProps): JSX.Element;
|
|
2480
|
-
|
|
2481
|
-
interface PaymentMethodsStyle {
|
|
2482
|
-
card?: CardConfiguration["styles"];
|
|
2483
|
-
paypal?: PayPalConfiguration["style"];
|
|
2484
|
-
}
|
|
2485
|
-
/**
|
|
2486
|
-
* Configuration options for the Adyen payment component.
|
|
2487
|
-
*/
|
|
2488
|
-
interface AdyenPaymentConfig {
|
|
2489
|
-
/**
|
|
2490
|
-
* Optional CSS class name for the card container.
|
|
2491
|
-
*/
|
|
2492
|
-
cardContainerClassName?: string;
|
|
2493
|
-
/**
|
|
2494
|
-
* Optional CSS class name for the 3D Secure container.
|
|
2495
|
-
* @deprecated
|
|
2496
|
-
*/
|
|
2497
|
-
threeDSecureContainerClassName?: string;
|
|
2498
|
-
/**
|
|
2499
|
-
* Callback function to be called when an order is placed.
|
|
2500
|
-
* @param response - An object containing the placement status.
|
|
2501
|
-
*/
|
|
2502
|
-
placeOrderCallback?: (response: {
|
|
2503
|
-
placed: boolean;
|
|
2504
|
-
}) => void;
|
|
2505
|
-
/**
|
|
2506
|
-
* Optional styles for the payment methods.
|
|
2507
|
-
*/
|
|
2508
|
-
styles?: PaymentMethodsStyle;
|
|
2509
|
-
/**
|
|
2510
|
-
* Configuration options for the payment methods.
|
|
2511
|
-
*/
|
|
2512
|
-
paymentMethodsConfiguration?: DropinConfiguration["paymentMethodsConfiguration"];
|
|
2513
|
-
/**
|
|
2514
|
-
* Callback function to disable a stored payment method.
|
|
2515
|
-
* @param props - An object containing the recurring detail reference and shopper reference.
|
|
2516
|
-
* @returns A promise that resolves to a boolean indicating whether the stored payment method was disabled.
|
|
2517
|
-
*/
|
|
2518
|
-
onDisableStoredPaymentMethod?: (props: {
|
|
2519
|
-
recurringDetailReference: string;
|
|
2520
|
-
shopperReference: string | undefined;
|
|
2521
|
-
}) => Promise<boolean>;
|
|
2522
|
-
}
|
|
2523
|
-
|
|
2524
|
-
type BraintreeHostedFields<Type> = {
|
|
2525
|
-
[Property in keyof Type]: {
|
|
2526
|
-
label?: string;
|
|
2527
|
-
} & Type[Property];
|
|
2528
|
-
};
|
|
2529
|
-
interface BraintreeConfig {
|
|
2530
|
-
containerClassName?: string;
|
|
2531
|
-
cardContainerClassName?: string;
|
|
2532
|
-
expDateContainerClassName?: string;
|
|
2533
|
-
fieldsContainerClassName?: string;
|
|
2534
|
-
cvvContainerClassName?: string;
|
|
2535
|
-
cardDetailsContainerClassName?: string;
|
|
2536
|
-
fieldLabelClassName?: string;
|
|
2537
|
-
inputWrapperClassName?: string;
|
|
2538
|
-
fields?: BraintreeHostedFields<HostedFieldFieldOptions>;
|
|
2539
|
-
styles?: Record<string, Record<string, string>>;
|
|
2540
|
-
/**
|
|
2541
|
-
* Force challenge request for 3D Secure authentication. Default is true.
|
|
2542
|
-
*/
|
|
2543
|
-
challengeRequested?: boolean;
|
|
2544
|
-
}
|
|
2545
|
-
|
|
2546
|
-
interface PaypalConfig {
|
|
2547
|
-
return_url: string;
|
|
2548
|
-
cancel_url: string;
|
|
2549
|
-
infoMessage?: {
|
|
2550
|
-
text?: string | ReactNode;
|
|
2551
|
-
className?: string;
|
|
2552
|
-
};
|
|
2553
|
-
}
|
|
2554
|
-
|
|
2555
|
-
interface StripeConfig {
|
|
2556
|
-
containerClassName?: string;
|
|
2557
|
-
hintLabel?: string;
|
|
2558
|
-
name?: string;
|
|
2559
|
-
options?: StripePaymentElementOptions;
|
|
2560
|
-
appearance?: StripeElementsOptions['appearance'];
|
|
2561
|
-
[key: string]: any;
|
|
2562
|
-
}
|
|
2563
|
-
|
|
2564
|
-
interface WireTransferConfig {
|
|
2565
|
-
infoMessage?: {
|
|
2566
|
-
text?: string | JSX.Element[];
|
|
2567
|
-
className?: string;
|
|
2568
|
-
};
|
|
2569
|
-
}
|
|
2570
|
-
|
|
2571
|
-
interface CheckoutComConfig {
|
|
2572
|
-
containerClassName?: string;
|
|
2573
|
-
hintLabel?: string;
|
|
2574
|
-
name?: string;
|
|
2575
|
-
success_url?: string;
|
|
2576
|
-
failure_url?: string;
|
|
2577
|
-
options?: {
|
|
2578
|
-
style: FramesStyle;
|
|
2579
|
-
};
|
|
2580
|
-
[key: string]: unknown;
|
|
2581
|
-
}
|
|
2582
|
-
|
|
2583
|
-
interface ExternalPaymentConfig {
|
|
2584
|
-
/**
|
|
2585
|
-
* Show the component. Default is false
|
|
2586
|
-
*/
|
|
2587
|
-
show?: boolean;
|
|
2588
|
-
/**
|
|
2589
|
-
* Use to display information about the external payment or whatever else.
|
|
2590
|
-
*/
|
|
2591
|
-
customComponent?: ChildrenFunction<Omit<Props$y, 'customComponent'>>;
|
|
2592
|
-
/**
|
|
2593
|
-
* The payment source token, as generated by the external gateway SDK. Credit Card numbers are rejected.
|
|
2594
|
-
*/
|
|
2595
|
-
payment_source_token: string;
|
|
2596
|
-
}
|
|
2597
|
-
interface Props$y extends Omit<ExternalPaymentConfig, 'payment_source_token'>, Pick<PaymentSourceProps, 'templateCustomerSaveToWallet'> {
|
|
2598
|
-
paymentSourceToken: string;
|
|
2599
|
-
locale?: StripeElementLocale;
|
|
2600
|
-
}
|
|
2601
|
-
|
|
2602
|
-
interface Card {
|
|
2603
|
-
type: string;
|
|
2604
|
-
brand: string;
|
|
2605
|
-
last4: string;
|
|
2606
|
-
exp_year: number;
|
|
2607
|
-
exp_month: number;
|
|
2608
|
-
}
|
|
2609
|
-
interface PaymentSourceObject {
|
|
2610
|
-
adyen_payments: AdyenPayment & {
|
|
2611
|
-
payment_request_data?: {
|
|
2612
|
-
payment_method?: Card;
|
|
2613
|
-
};
|
|
2614
|
-
payment_response?: {
|
|
2615
|
-
resultCode?: "Authorised";
|
|
2616
|
-
};
|
|
2617
|
-
};
|
|
2618
|
-
braintree_payments: BraintreePayment & {
|
|
2619
|
-
options?: {
|
|
2620
|
-
card: Card;
|
|
2621
|
-
};
|
|
2622
|
-
};
|
|
2623
|
-
external_payments: ExternalPayment & {
|
|
2624
|
-
payment_source_token?: string;
|
|
2625
|
-
};
|
|
2626
|
-
paypal_payments: PaypalPayment;
|
|
2627
|
-
stripe_payments: StripePayment & {
|
|
2628
|
-
options?: {
|
|
2629
|
-
card: Card;
|
|
2630
|
-
};
|
|
2631
|
-
payment_method?: {
|
|
2632
|
-
card: Card;
|
|
2633
|
-
type: string | "klarna" | "card";
|
|
2634
|
-
};
|
|
2635
|
-
};
|
|
2636
|
-
wire_transfers: WireTransfer;
|
|
2637
|
-
checkout_com_payments: CheckoutComPayment & {
|
|
2638
|
-
payment_response: {
|
|
2639
|
-
source?: Pick<Card, "last4"> & {
|
|
2640
|
-
scheme: string;
|
|
2641
|
-
expiry_year: number;
|
|
2642
|
-
expiry_month: number;
|
|
2643
|
-
};
|
|
2644
|
-
};
|
|
2645
|
-
};
|
|
2646
|
-
klarna_payments: KlarnaPayment;
|
|
2647
|
-
}
|
|
2648
|
-
type PaymentResource = keyof PaymentSourceObject;
|
|
2649
|
-
interface PaymentMethodConfig {
|
|
2650
|
-
adyenPayment?: AdyenPaymentConfig;
|
|
2651
|
-
braintreePayment?: BraintreeConfig;
|
|
2652
|
-
checkoutComPayment?: CheckoutComConfig;
|
|
2653
|
-
externalPayment?: ExternalPaymentConfig;
|
|
2654
|
-
klarnaPayment?: Pick<AdyenPaymentConfig, "placeOrderCallback"> & Pick<StripeConfig, "containerClassName">;
|
|
2655
|
-
paypalPayment?: PaypalConfig;
|
|
2656
|
-
stripePayment?: StripeConfig;
|
|
2657
|
-
wireTransfer?: Partial<WireTransferConfig>;
|
|
2658
|
-
}
|
|
2659
|
-
|
|
2660
|
-
interface PlaceOrderOptions {
|
|
2661
|
-
paypalPayerId?: string;
|
|
2662
|
-
adyen?: {
|
|
2663
|
-
MD?: string;
|
|
2664
|
-
PaRes?: string;
|
|
2665
|
-
redirectResult?: string;
|
|
2666
|
-
};
|
|
2667
|
-
checkoutCom?: {
|
|
2668
|
-
session_id: string;
|
|
2669
|
-
};
|
|
2670
|
-
stripe?: {
|
|
2671
|
-
/**
|
|
2672
|
-
* @deprecated
|
|
2673
|
-
* Use `paymentIntentClientSecret` instead
|
|
2674
|
-
*/
|
|
2675
|
-
redirectStatus?: string;
|
|
2676
|
-
paymentIntentClientSecret: string;
|
|
2677
|
-
};
|
|
2678
|
-
}
|
|
2679
|
-
|
|
2680
|
-
interface Props$x {
|
|
2681
|
-
children: ReactNode;
|
|
2682
|
-
options?: PlaceOrderOptions;
|
|
2683
|
-
}
|
|
2684
|
-
declare function PlaceOrderContainer(props: Props$x): JSX.Element;
|
|
2685
|
-
|
|
2686
|
-
type BaseInputProps = BaseInputComponentProps & Omit<JSX.IntrinsicElements['input'], 'children' | 'pattern'> & Omit<JSX.IntrinsicElements['textarea'], 'children' | 'pattern'>;
|
|
2687
|
-
|
|
2688
|
-
declare function PrivacyAndTermsCheckbox(props: Partial<BaseInputProps>): JSX.Element;
|
|
2689
|
-
|
|
2690
|
-
declare function ShippingAmount(props: BaseAmountComponent): JSX.Element;
|
|
2691
|
-
|
|
2692
|
-
declare function SubTotalAmount(props: BaseAmountComponent): JSX.Element;
|
|
2693
|
-
|
|
2694
|
-
declare function TaxesAmount(props: BaseAmountComponent): JSX.Element;
|
|
2695
|
-
|
|
2696
|
-
declare function TotalAmount(props: BaseAmountComponent): JSX.Element | null;
|
|
2697
|
-
|
|
2698
|
-
type ParcelFieldChildrenProps = TGenericChildrenProps<TResources['Parcel']>;
|
|
2699
|
-
type TCondition$3 = ConditionalElement<Exclude<TResources['Parcel'], 'resource'>>;
|
|
2700
|
-
type Props$w = {
|
|
2701
|
-
children?: (props: ParcelFieldChildrenProps) => JSX.Element;
|
|
2702
|
-
} & TCondition$3;
|
|
2703
|
-
/**
|
|
2704
|
-
* @param props {@link Props}
|
|
2705
|
-
* @returns
|
|
2706
|
-
*/
|
|
2707
|
-
declare function ParcelField<P extends Props$w>(props: P): JSX.Element;
|
|
2708
|
-
|
|
2709
|
-
interface Props$v {
|
|
2710
|
-
children: DefaultChildrenType;
|
|
2711
|
-
}
|
|
2712
|
-
declare function ParcelLineItem({ children }: Props$v): JSX.Element;
|
|
2713
|
-
|
|
2714
|
-
type ParcelLineItemFieldChildrenProps = TGenericChildrenProps<TResources['ParcelLineItem']>;
|
|
2715
|
-
type TCondition$2 = ConditionalElement<Exclude<TResources['ParcelLineItem'], 'resource'>>;
|
|
2716
|
-
type Props$u = {
|
|
2717
|
-
children?: (props: ParcelLineItemFieldChildrenProps) => JSX.Element;
|
|
2718
|
-
} & TCondition$2;
|
|
2719
|
-
/**
|
|
2720
|
-
* @param props {@link Props}
|
|
2721
|
-
* @returns
|
|
2722
|
-
*/
|
|
2723
|
-
declare function ParcelLineItemField<P extends Props$u>(props: P): JSX.Element;
|
|
2724
|
-
|
|
2725
|
-
interface ChildrenProps$7 extends Omit<Props$t, 'children'> {
|
|
2726
|
-
/**
|
|
2727
|
-
* Parcel of the current shipment
|
|
2728
|
-
*/
|
|
2729
|
-
parcel?: Parcel;
|
|
2730
|
-
/**
|
|
2731
|
-
* Quantity of the parcel line items
|
|
2732
|
-
*/
|
|
2733
|
-
quantity: number;
|
|
2734
|
-
}
|
|
2735
|
-
interface Props$t extends Omit<JSX.IntrinsicElements['span'], 'children'> {
|
|
2736
|
-
children?: ChildrenFunction<ChildrenProps$7>;
|
|
2737
|
-
}
|
|
2738
|
-
declare function ParcelLineItemsCount({ children, ...p }: Props$t): JSX.Element;
|
|
2739
|
-
|
|
2740
|
-
interface Props$s {
|
|
2741
|
-
children: JSX.Element | JSX.Element[];
|
|
2742
|
-
filterBy?: string[];
|
|
2743
|
-
}
|
|
2744
|
-
declare function Parcels({ children, filterBy }: Props$s): JSX.Element;
|
|
2745
|
-
|
|
2746
|
-
interface ChildrenProps$6 extends Omit<Props$r, 'children'> {
|
|
2747
|
-
/**
|
|
2748
|
-
* Shipments of the current order
|
|
2749
|
-
*/
|
|
2750
|
-
parcels?: Parcel[] | null;
|
|
2751
|
-
/**
|
|
2752
|
-
* Quantity of the parcels
|
|
2753
|
-
*/
|
|
2754
|
-
quantity: number;
|
|
2755
|
-
}
|
|
2756
|
-
interface Props$r extends Omit<JSX.IntrinsicElements['span'], 'children'> {
|
|
2757
|
-
children?: ChildrenFunction<ChildrenProps$6>;
|
|
2758
|
-
}
|
|
2759
|
-
declare function ParcelsCount({ children, ...p }: Props$r): JSX.Element;
|
|
2760
|
-
|
|
2761
|
-
interface PaymentMethodOnClickParams {
|
|
2762
|
-
payment?: PaymentMethod$1 | Record<string, any>;
|
|
2763
|
-
order?: Order;
|
|
2764
|
-
paymentSource?: Order['payment_source'];
|
|
2765
|
-
}
|
|
2766
|
-
type Props$q = {
|
|
2767
|
-
/**
|
|
2768
|
-
* Hide payment methods by an array of strings or a function that returns a boolean
|
|
2769
|
-
*/
|
|
2770
|
-
hide?: PaymentResource[] | ((payment: PaymentMethod$1) => boolean);
|
|
2771
|
-
children: DefaultChildrenType;
|
|
2772
|
-
/**
|
|
2773
|
-
* Set CSS classes when the payment method is selected
|
|
2774
|
-
*/
|
|
2775
|
-
activeClass?: string;
|
|
2776
|
-
/**
|
|
2777
|
-
* Customize the loader component
|
|
2778
|
-
*/
|
|
2779
|
-
loader?: LoaderType;
|
|
2780
|
-
/**
|
|
2781
|
-
* Auto select the payment method when there is only one available
|
|
2782
|
-
*/
|
|
2783
|
-
autoSelectSinglePaymentMethod?: boolean | (() => void);
|
|
2784
|
-
/**
|
|
2785
|
-
* Enable express payment. Other payment methods will be disabled.
|
|
2786
|
-
*/
|
|
2787
|
-
expressPayments?: boolean;
|
|
2788
|
-
/**
|
|
2789
|
-
* Sort payment methods by an array of strings
|
|
2790
|
-
*/
|
|
2791
|
-
sortBy?: Array<PaymentMethod$1['payment_source_type']>;
|
|
2792
|
-
} & Omit<JSX.IntrinsicElements['div'], 'onClick' | 'children'> & ({
|
|
2793
|
-
clickableContainer: true;
|
|
2794
|
-
onClick?: (params: PaymentMethodOnClickParams) => void;
|
|
2795
|
-
} | {
|
|
2796
|
-
clickableContainer?: never;
|
|
2797
|
-
onClick?: never;
|
|
2798
|
-
});
|
|
2799
|
-
declare function PaymentMethod({ children, className, activeClass, loader, clickableContainer, autoSelectSinglePaymentMethod, expressPayments, hide, onClick, sortBy, ...p }: Props$q): JSX.Element;
|
|
2800
|
-
|
|
2801
|
-
interface ChildrenProps$5 extends Omit<Props$p, 'children'> {
|
|
2802
|
-
labelName: string;
|
|
2803
|
-
}
|
|
2804
|
-
interface Props$p extends Omit<JSX.IntrinsicElements['label'], 'children'> {
|
|
2805
|
-
children?: ChildrenFunction<ChildrenProps$5>;
|
|
2806
|
-
}
|
|
2807
|
-
declare function PaymentMethodName(props: Props$p): JSX.Element;
|
|
2808
|
-
|
|
2809
|
-
interface Props$o extends BaseAmountComponent {
|
|
2810
|
-
type?: 'amount';
|
|
2811
|
-
labelFree?: string;
|
|
2812
|
-
}
|
|
2813
|
-
declare function PaymentMethodPrice(props: Props$o): JSX.Element;
|
|
2814
|
-
|
|
2815
|
-
interface ChildrenProps$4 extends Omit<Props$n, 'children'> {
|
|
2816
|
-
checked: boolean;
|
|
2817
|
-
handleOnChange: (event: ChangeEvent<HTMLInputElement>) => Promise<void>;
|
|
2818
|
-
}
|
|
2819
|
-
interface TOnChangeParams {
|
|
2820
|
-
payment?: PaymentMethod$1 | Record<string, any>;
|
|
2821
|
-
order?: Order;
|
|
2822
|
-
}
|
|
2823
|
-
type Props$n = {
|
|
2824
|
-
children?: ChildrenFunction<ChildrenProps$4>;
|
|
2825
|
-
onChange?: (params: TOnChangeParams) => void;
|
|
2826
|
-
} & JSX.IntrinsicElements['input'];
|
|
2827
|
-
declare function PaymentMethodRadioButton(props: Props$n): JSX.Element;
|
|
2828
|
-
|
|
2829
|
-
interface Props$m {
|
|
2830
|
-
children: ReactNode;
|
|
2831
|
-
config?: PaymentMethodConfig;
|
|
2832
|
-
}
|
|
2833
|
-
declare function PaymentMethodsContainer(props: Props$m): JSX.Element;
|
|
2834
|
-
|
|
2835
|
-
interface ChildrenProps$3 extends Omit<Props$l, 'children'> {
|
|
2836
|
-
brand: IconBrand;
|
|
2837
|
-
defaultSrc: string;
|
|
2838
|
-
url: string;
|
|
2839
|
-
}
|
|
2840
|
-
interface Props$l extends Omit<JSX.IntrinsicElements['img'], 'children'> {
|
|
2841
|
-
children?: ChildrenFunction<ChildrenProps$3>;
|
|
2842
|
-
width?: number;
|
|
2843
|
-
height?: number;
|
|
2844
|
-
}
|
|
2845
|
-
declare function PaymentSourceBrandIcon({ src, width, children, ...p }: Props$l): JSX.Element;
|
|
2846
|
-
|
|
2847
|
-
interface CustomComponent$1 extends Omit<Props$k, "children"> {
|
|
2848
|
-
brand: IconBrand;
|
|
2849
|
-
}
|
|
2850
|
-
interface Props$k extends Omit<JSX.IntrinsicElements["span"], "children"> {
|
|
2851
|
-
children?: ChildrenFunction<CustomComponent$1>;
|
|
2852
|
-
label?: string;
|
|
2853
|
-
}
|
|
2854
|
-
declare function PaymentSourceBrandName({ children, label, ...props }: Props$k): JSX.Element;
|
|
2855
|
-
|
|
2856
|
-
type PaymentSourceDetailType = 'last4' | 'exp_year' | 'exp_month';
|
|
2857
|
-
interface ChildrenProps$2 extends Omit<Props$j, 'children'> {
|
|
2858
|
-
text: string;
|
|
2859
|
-
}
|
|
2860
|
-
interface Props$j extends Omit<JSX.IntrinsicElements['span'], 'children'> {
|
|
2861
|
-
children?: ChildrenFunction<ChildrenProps$2>;
|
|
2862
|
-
/**
|
|
2863
|
-
* Type of detail to display
|
|
2864
|
-
*/
|
|
2865
|
-
type: PaymentSourceDetailType;
|
|
2866
|
-
}
|
|
2867
|
-
declare function PaymentSourceDetail({ type, children, ...p }: Props$j): JSX.Element;
|
|
2868
|
-
|
|
2869
|
-
interface CustomComponent extends Omit<Props$i, 'children'> {
|
|
2870
|
-
}
|
|
2871
|
-
type Props$i = {
|
|
2872
|
-
children?: ChildrenFunction<CustomComponent>;
|
|
2873
|
-
label?: string | ReactNode;
|
|
2874
|
-
} & Omit<JSX.IntrinsicElements['button'], 'onClick'>;
|
|
2875
|
-
declare function PaymentSourceEditButton({ children, label, ...props }: Props$i): JSX.Element | null;
|
|
2876
|
-
|
|
2877
|
-
interface PriceChildrenProps extends Omit<PriceProps, 'children'> {
|
|
2878
|
-
loading: boolean;
|
|
2879
|
-
loader: LoaderType;
|
|
2880
|
-
prices: Price$1[];
|
|
2881
|
-
}
|
|
2882
|
-
interface PriceProps extends Omit<JSX.IntrinsicElements['span'], 'children' | 'ref'> {
|
|
2883
|
-
children?: ChildrenFunction<PriceChildrenProps>;
|
|
2884
|
-
/**
|
|
2885
|
-
* CSS class name to be added for the compare price
|
|
2886
|
-
*/
|
|
2887
|
-
compareClassName?: string;
|
|
2888
|
-
/**
|
|
2889
|
-
* When `false` the compare_at price will not be displayed
|
|
2890
|
-
* @default true
|
|
2891
|
-
*/
|
|
2892
|
-
showCompare?: boolean;
|
|
2893
|
-
/**
|
|
2894
|
-
* The `sku_code` of the price to be fetched
|
|
2895
|
-
*/
|
|
2896
|
-
skuCode?: string | null;
|
|
2897
|
-
}
|
|
2898
|
-
/**
|
|
2899
|
-
* To display the price of your products with localized currency, discounts, and personalization rules, as shown in the code snippets below.
|
|
2900
|
-
*
|
|
2901
|
-
* Each price has an amount (the actual selling price) and an optional compare-at amount (the full price that you want to display to the customer — typically with a strikethrough).
|
|
2902
|
-
* This component is the owner of the price information. It fetches the price of the specified SKU and dispatches it to the cl-price-amount children.
|
|
2903
|
-
* <span type='info'>
|
|
2904
|
-
* By default it shows the `formatted_amount` and `formatted_compare_at_amount` of the first price object, but it also allows to access to the full `Price`object via children props.
|
|
2905
|
-
* </span>
|
|
2906
|
-
*/
|
|
2907
|
-
declare function Price(props: PriceProps): JSX.Element;
|
|
2908
|
-
|
|
2909
|
-
interface Props$h {
|
|
2910
|
-
/**
|
|
2911
|
-
* Any valid JSX.Element(s).
|
|
2912
|
-
* A single `<Price>` component or a list of them is expected to render the prices.
|
|
2913
|
-
*/
|
|
2914
|
-
children: JSX.Element | JSX.Element[];
|
|
2915
|
-
/**
|
|
2916
|
-
* SDK query filter to fetch the prices when multiple prices are requested.
|
|
2917
|
-
*/
|
|
2918
|
-
filters?: object;
|
|
2919
|
-
/**
|
|
2920
|
-
* Loader component or string to be rendered while the prices are being fetched.
|
|
2921
|
-
* @default 'Loading...'
|
|
2922
|
-
*/
|
|
2923
|
-
loader?: LoaderType;
|
|
2924
|
-
/**
|
|
2925
|
-
* Prices per page to be fetched
|
|
2926
|
-
*/
|
|
2927
|
-
perPage?: QueryPageSize;
|
|
2928
|
-
/**
|
|
2929
|
-
* SKU code to fetch the prices for. If not provided, the `sku_code` will be retrieved from the `<Price>` component(s) nested as children.
|
|
2930
|
-
*/
|
|
2931
|
-
skuCode?: string;
|
|
2932
|
-
}
|
|
2933
|
-
/**
|
|
2934
|
-
* Main container for the Prices components. It stores the prices context.
|
|
2935
|
-
*
|
|
2936
|
-
* It can be used to fetch the prices for a specific `sku_code` passed as prop
|
|
2937
|
-
* or for the `sku_code` retrieved from all `<Price>` components nested as children.
|
|
2938
|
-
* <span title='Requirements' type='warning'>
|
|
2939
|
-
* Must be a child of the `<CommerceLayer>` component.
|
|
2940
|
-
* </span>
|
|
2941
|
-
* <span title='Children' type='info'>
|
|
2942
|
-
* `<Price>`
|
|
2943
|
-
* </span>
|
|
2944
|
-
*/
|
|
2945
|
-
declare function PricesContainer(props: Props$h): JSX.Element;
|
|
2946
|
-
|
|
2947
|
-
interface ShipmentProps {
|
|
2948
|
-
children: ReactNode;
|
|
2949
|
-
loader?: LoaderType;
|
|
2950
|
-
autoSelectSingleShippingMethod?: boolean | ((order?: Order) => void);
|
|
2951
|
-
}
|
|
2952
|
-
declare function Shipment({ children, loader, autoSelectSingleShippingMethod }: ShipmentProps): JSX.Element;
|
|
2953
|
-
|
|
2954
|
-
type ShipmentFieldChildrenProps = Omit<Props$g, "children"> & {
|
|
2955
|
-
shipment: Shipment$1;
|
|
2956
|
-
};
|
|
2957
|
-
type ShipmentAttribute = "number" | "currency_code" | "status" | "cost_amount_cents" | "cost_amount_float" | "formatted_cost_amount" | "key_number";
|
|
2958
|
-
interface Props$g extends Omit<JSX.IntrinsicElements["span"], "children" | "ref"> {
|
|
2959
|
-
children?: (props: ShipmentFieldChildrenProps) => JSX.Element;
|
|
2960
|
-
name: ShipmentAttribute;
|
|
2961
|
-
}
|
|
2962
|
-
declare function ShipmentField(props: Props$g): JSX.Element;
|
|
2963
|
-
|
|
2964
|
-
interface Props$f {
|
|
2965
|
-
children: ReactNode;
|
|
2966
|
-
}
|
|
2967
|
-
declare function ShipmentsContainer(props: Props$f): JSX.Element;
|
|
2968
|
-
|
|
2969
|
-
interface ChildrenProps$1 extends Omit<Props$e, 'children'> {
|
|
2970
|
-
/**
|
|
2971
|
-
* Shipments of the current order
|
|
2972
|
-
*/
|
|
2973
|
-
shipments?: Shipment$1[] | null;
|
|
2974
|
-
/**
|
|
2975
|
-
* Quantity of the shipments
|
|
2976
|
-
*/
|
|
2977
|
-
quantity: number;
|
|
2978
|
-
}
|
|
2979
|
-
interface Props$e extends Omit<JSX.IntrinsicElements['span'], 'children' | 'ref'> {
|
|
2980
|
-
children?: ChildrenFunction<ChildrenProps$1>;
|
|
2981
|
-
}
|
|
2982
|
-
declare function ShipmentsCount({ children, ...p }: Props$e): JSX.Element;
|
|
2983
|
-
|
|
2984
|
-
interface Props$d {
|
|
2985
|
-
children: ReactNode;
|
|
2986
|
-
readonly?: boolean;
|
|
2987
|
-
emptyText?: string;
|
|
2988
|
-
}
|
|
2989
|
-
declare function ShippingMethod(props: Props$d): JSX.Element;
|
|
2990
|
-
|
|
2991
|
-
type ChildrenProps = Omit<Props$c, 'children'> & {
|
|
2992
|
-
label: string;
|
|
2993
|
-
shippingMethod: ShippingMethod$1;
|
|
2994
|
-
};
|
|
2995
|
-
interface Props$c extends Omit<JSX.IntrinsicElements['label'], 'children' | 'ref'> {
|
|
2996
|
-
children?: (props: ChildrenProps) => JSX.Element;
|
|
2997
|
-
}
|
|
2998
|
-
declare function ShippingMethodName(props: Props$c): JSX.Element;
|
|
2999
|
-
|
|
3000
|
-
type Props$b = BaseAmountComponent & {
|
|
3001
|
-
/**
|
|
3002
|
-
* The label to show when the price is free
|
|
3003
|
-
*/
|
|
3004
|
-
labelFreeOver?: string;
|
|
3005
|
-
/**
|
|
3006
|
-
* The label to show when the price is external
|
|
3007
|
-
*/
|
|
3008
|
-
labelExternal?: string;
|
|
3009
|
-
} & ({
|
|
3010
|
-
type?: 'amount';
|
|
3011
|
-
base?: 'freeOver';
|
|
3012
|
-
} | {
|
|
3013
|
-
type?: 'amount' | 'amountForShipment';
|
|
3014
|
-
base?: 'price';
|
|
3015
|
-
});
|
|
3016
|
-
declare function ShippingMethodPrice(props: Props$b): JSX.Element;
|
|
3017
|
-
|
|
3018
|
-
interface ShippingMethodRadioButtonType extends Omit<Props$a, 'children'> {
|
|
3019
|
-
shippingMethod: ShippingMethod$1;
|
|
3020
|
-
shipmentId: string;
|
|
3021
|
-
}
|
|
3022
|
-
interface TOnChange {
|
|
3023
|
-
shippingMethod: ShippingMethod$1;
|
|
3024
|
-
shipmentId: string;
|
|
3025
|
-
order?: Order;
|
|
3026
|
-
}
|
|
3027
|
-
type Props$a = {
|
|
3028
|
-
children?: (props: ShippingMethodRadioButtonType) => JSX.Element;
|
|
3029
|
-
onChange?: (params: TOnChange) => void;
|
|
3030
|
-
} & Omit<JSX.IntrinsicElements['input'], 'onChange' | 'ref' | 'children'>;
|
|
3031
|
-
declare function ShippingMethodRadioButton(props: Props$a): JSX.Element;
|
|
3032
|
-
|
|
3033
|
-
interface Props$9 {
|
|
3034
|
-
/**
|
|
3035
|
-
* The children component
|
|
3036
|
-
*/
|
|
3037
|
-
children: ReactNode;
|
|
3038
|
-
/**
|
|
3039
|
-
* The sku code
|
|
3040
|
-
*/
|
|
3041
|
-
skuCode?: string;
|
|
3042
|
-
/**
|
|
3043
|
-
* The sku id. If you use this prop, the skuCode will be ignored and the sku will be fetched by id improving the performance
|
|
3044
|
-
*/
|
|
3045
|
-
skuId?: string;
|
|
3046
|
-
/**
|
|
3047
|
-
* Callback called when the quantity is updated
|
|
3048
|
-
*/
|
|
3049
|
-
getQuantity?: (quantity: number) => void;
|
|
3050
|
-
}
|
|
3051
|
-
/**
|
|
3052
|
-
* Main container for the Availability components.
|
|
3053
|
-
* It stores - in its context - the sku quantity returned from the `inventory_model` and the `delivery_lead_time` for the first shipping method found in the inventory model.
|
|
3054
|
-
*
|
|
3055
|
-
* It can be used to fetch the quantities for a specific `sku_code` passed as prop.
|
|
3056
|
-
* <span title='Requirements' type='warning'>
|
|
3057
|
-
* Must be a child of the `<CommerceLayer>` component. <br/>
|
|
3058
|
-
* Can be a child of the `<SkusContainer>` component and receive the `sku_code` from its context.
|
|
3059
|
-
* </span>
|
|
3060
|
-
* <span title='Children' type='info'>
|
|
3061
|
-
* `<AvailabilityTemplate>`
|
|
3062
|
-
* </span>
|
|
3063
|
-
*/
|
|
3064
|
-
declare function AvailabilityContainer({ children, skuCode, skuId, getQuantity }: Props$9): JSX.Element;
|
|
3065
|
-
|
|
3066
|
-
interface DeliveryLeadTime$1 {
|
|
3067
|
-
shipping_method: {
|
|
3068
|
-
name: string;
|
|
3069
|
-
reference: string;
|
|
3070
|
-
price_amount_cents: number;
|
|
3071
|
-
free_over_amount_cents: number;
|
|
3072
|
-
formatted_price_amount: string;
|
|
3073
|
-
formatted_free_over_amount: string;
|
|
3074
|
-
};
|
|
3075
|
-
min: LeadTimes;
|
|
3076
|
-
max: LeadTimes;
|
|
3077
|
-
}
|
|
3078
|
-
interface LeadTimes {
|
|
3079
|
-
hours: number;
|
|
3080
|
-
days: number;
|
|
3081
|
-
}
|
|
3082
|
-
|
|
3083
|
-
interface AvailabilityTemplateChildrenProps extends Omit<Props$8, 'children'>, DeliveryLeadTime$1 {
|
|
3084
|
-
text: string;
|
|
3085
|
-
quantity: number;
|
|
3086
|
-
}
|
|
3087
|
-
type FormatRules = {
|
|
3088
|
-
/**
|
|
3089
|
-
* Set time format for shipping method. When not set, ``delivery_lead_times`` will not be displayed.
|
|
3090
|
-
* When set, `delivery_lead_times` for the first shipping method found in the inventory model, will be displayed in the format specified.
|
|
3091
|
-
*/
|
|
3092
|
-
timeFormat?: TimeFormat;
|
|
3093
|
-
/**
|
|
3094
|
-
* Show shipping method name. Requires `timeFormat` to be set.
|
|
3095
|
-
*/
|
|
3096
|
-
showShippingMethodName?: false;
|
|
3097
|
-
/**
|
|
3098
|
-
* Show shipping method price. Requires `timeFormat` to be set.
|
|
3099
|
-
*/
|
|
3100
|
-
showShippingMethodPrice?: false;
|
|
3101
|
-
} | {
|
|
3102
|
-
timeFormat: TimeFormat;
|
|
3103
|
-
showShippingMethodName: true;
|
|
3104
|
-
showShippingMethodPrice?: boolean;
|
|
3105
|
-
} | {
|
|
3106
|
-
timeFormat: TimeFormat;
|
|
3107
|
-
showShippingMethodName?: boolean;
|
|
3108
|
-
showShippingMethodPrice: true;
|
|
3109
|
-
};
|
|
3110
|
-
type Props$8 = {
|
|
3111
|
-
children?: ChildrenFunction<AvailabilityTemplateChildrenProps>;
|
|
3112
|
-
labels?: {
|
|
3113
|
-
available?: string;
|
|
3114
|
-
outOfStock?: string;
|
|
3115
|
-
negativeStock?: string;
|
|
3116
|
-
};
|
|
3117
|
-
} & Omit<JSX.IntrinsicElements['span'], 'children' | 'ref'> & FormatRules;
|
|
3118
|
-
/**
|
|
3119
|
-
* The AvailabilityTemplate component displays the availability of the SKU specified
|
|
3120
|
-
* in the parent `<AvailabilityContainer>` component.
|
|
3121
|
-
*
|
|
3122
|
-
* It is possible to customize the text displayed in case of `available`, `outOfStock` or `negativeStock.
|
|
3123
|
-
* It is also possible to show delivery lead time and either shipping method name and/or price.
|
|
3124
|
-
* This information will be retrieve from the first shipping method found in the inventory model.
|
|
3125
|
-
*
|
|
3126
|
-
* <span type="Requirement" type="info">
|
|
3127
|
-
* It must to be used inside the `<AvailabilityContainer>` component.
|
|
3128
|
-
* </span>
|
|
3129
|
-
*/
|
|
3130
|
-
declare function AvailabilityTemplate(props: Props$8): JSX.Element;
|
|
3131
|
-
|
|
3132
|
-
type DeliveryLeadTimeField = 'min_hours' | 'max_hours' | 'min_days' | 'max_days';
|
|
3133
|
-
type DeliveryLeadTimeComponentChildren = Omit<Props$7, 'children' | 'ref'>;
|
|
3134
|
-
type Props$7 = Partial<Omit<JSX.IntrinsicElements['span'], 'ref'>> & {
|
|
3135
|
-
children?: (props: DeliveryLeadTimeComponentChildren) => JSX.Element;
|
|
3136
|
-
type: DeliveryLeadTimeField;
|
|
3137
|
-
text?: string;
|
|
3138
|
-
};
|
|
3139
|
-
declare function DeliveryLeadTime(props: Props$7): JSX.Element;
|
|
3140
|
-
|
|
3141
|
-
type SkuFieldChildrenProps = TGenericChildrenProps<TResources['Sku']>;
|
|
3142
|
-
type TCondition$1 = ConditionalElement<Exclude<TResources['Sku'], 'resource'>>;
|
|
3143
|
-
type Props$6 = {
|
|
3144
|
-
children?: (props: SkuFieldChildrenProps) => JSX.Element;
|
|
3145
|
-
} & TCondition$1;
|
|
3146
|
-
/**
|
|
3147
|
-
* The SkuField component displays any attribute of the `sku` specified in the parent `<SkusContainer>` component.
|
|
3148
|
-
*
|
|
3149
|
-
* It also accepts a `tagElement` props to enable specific tag-related props.
|
|
3150
|
-
* For examples, when `tagElement` is set to `img` it will also accept props related to `<img>` tag such as `height` and `width`.
|
|
3151
|
-
*
|
|
3152
|
-
* <span title="Requirement" type="warning">
|
|
3153
|
-
* It must to be used inside the `<SkusContainer>` component.
|
|
3154
|
-
* </span>
|
|
3155
|
-
*
|
|
3156
|
-
* <span title="Fields" type="info">
|
|
3157
|
-
* Check the `skus` resource from our [Core API documentation](https://docs.commercelayer.io/core/v/api-reference/skus/object)
|
|
3158
|
-
* for more details about the available attributes to render.
|
|
3159
|
-
* </span>
|
|
3160
|
-
*/
|
|
3161
|
-
declare function SkuField<P extends Props$6>(props: P): JSX.Element;
|
|
3162
|
-
|
|
3163
|
-
interface Props$5 {
|
|
3164
|
-
children: ReactNode;
|
|
3165
|
-
/**
|
|
3166
|
-
* ID of the SKU list.
|
|
3167
|
-
*/
|
|
3168
|
-
id: string;
|
|
3169
|
-
}
|
|
3170
|
-
declare function SkuList(props: Props$5): JSX.Element;
|
|
3171
|
-
|
|
3172
|
-
interface Props$4 {
|
|
3173
|
-
children: ReactNode;
|
|
3174
|
-
}
|
|
3175
|
-
declare function SkuListsContainer(props: Props$4): JSX.Element;
|
|
3176
|
-
|
|
3177
|
-
interface Props$3 {
|
|
3178
|
-
children: ReactNode;
|
|
3179
|
-
}
|
|
3180
|
-
/**
|
|
3181
|
-
* The `Skus` components loop through the list of `skus` found in `SkusContainer` context and render the children filled with the proper sku value.
|
|
3182
|
-
* This means that the children will be rendered as many times as the number of skus found in the `skus` prop array
|
|
3183
|
-
* and there is no need to manually loop through them from your consumer app.
|
|
3184
|
-
*
|
|
3185
|
-
* <span title='Requirements' type='warning'>
|
|
3186
|
-
* Must be a child of the `<SkusContainer>` component.
|
|
3187
|
-
* </span>
|
|
3188
|
-
* <span title='Children' type='info'>
|
|
3189
|
-
* `<SkuField>`, `<AvailabilityContainer>`
|
|
3190
|
-
* </span>
|
|
3191
|
-
*/
|
|
3192
|
-
declare function Skus<P extends Props$3>({ children }: P): JSX.Element;
|
|
3193
|
-
|
|
3194
|
-
interface Props$2 {
|
|
3195
|
-
/**
|
|
3196
|
-
* An array of skus to display.
|
|
3197
|
-
*/
|
|
3198
|
-
skus: string[];
|
|
3199
|
-
/**
|
|
3200
|
-
* Accept a React node and [Skus](./Skus.d.ts) component as children to display above the skus.
|
|
3201
|
-
*/
|
|
3202
|
-
children: ReactNode;
|
|
3203
|
-
/**
|
|
3204
|
-
* An object params to query the skus resource
|
|
3205
|
-
*/
|
|
3206
|
-
queryParams?: QueryParamsList;
|
|
3207
|
-
}
|
|
3208
|
-
/**
|
|
3209
|
-
* Main container for the SKUs components.
|
|
3210
|
-
* It stores - in its context - the details for each `sku` defined in the `skus` prop array.
|
|
3211
|
-
*
|
|
3212
|
-
* It also accept a `queryParams` prop to refine pagination, sorting, filtering and includes for the fetch request.
|
|
3213
|
-
*
|
|
3214
|
-
* <span title='Requirements' type='warning'>
|
|
3215
|
-
* Must be a child of the `<CommerceLayer>` component.
|
|
3216
|
-
* </span>
|
|
3217
|
-
* <span title='Children' type='info'>
|
|
3218
|
-
* `<Skus>`
|
|
3219
|
-
* </span>
|
|
3220
|
-
*/
|
|
3221
|
-
declare function SkusContainer<P extends Props$2>(props: P): JSX.Element;
|
|
3222
|
-
|
|
3223
|
-
interface Props$1 {
|
|
3224
|
-
children: DefaultChildrenType;
|
|
3225
|
-
}
|
|
3226
|
-
declare function StockTransfer(props: Props$1): JSX.Element;
|
|
3227
|
-
|
|
3228
|
-
type StockTransferFieldChildrenProps = TGenericChildrenProps<TResources['StockTransfer']>;
|
|
3229
|
-
type TCondition = ConditionalElement<Exclude<TResources['StockTransfer'], 'resource'>>;
|
|
3230
|
-
type Props = {
|
|
3231
|
-
children?: (props: StockTransferFieldChildrenProps) => JSX.Element;
|
|
3232
|
-
} & TCondition;
|
|
3233
|
-
declare function StockTransferField<P extends Props>(props: P): JSX.Element;
|
|
3234
|
-
|
|
3235
|
-
type TAddToCartParams = Omit<Parameters<typeof addToCart>[number], 'buyNowMode' | 'state' | 'dispatch' | 'setLocalOrder' | 'errors' | 'checkoutUrl' | 'persistKey' | 'config'>;
|
|
3236
|
-
type TCreateCartParams = Pick<Parameters<typeof createOrder>[number], 'orderAttributes' | 'orderMetadata'>;
|
|
3237
|
-
interface TReturnOrder extends Omit<OrderState, 'loading' | 'include' | 'includeLoaded' | 'withoutIncludes' | 'orderId'> {
|
|
3238
|
-
/** Refetch the current order and update the context */
|
|
3239
|
-
reloadOrder: () => Promise<OrderState['order']>;
|
|
3240
|
-
/** Allow to add a SKU or a Bundle to the order stored in the context */
|
|
3241
|
-
addToCart: (params: TAddToCartParams) => ReturnType<typeof addToCart>;
|
|
3242
|
-
/** Allow to create a new order and store it in the OrderContainer context */
|
|
3243
|
-
createOrder: (params: TCreateCartParams) => Promise<string | undefined>;
|
|
3244
|
-
}
|
|
3245
|
-
/**
|
|
3246
|
-
* React Hook that provides access to the order context stored in the `<OrderContainer>` component.
|
|
3247
|
-
**/
|
|
3248
|
-
declare function useOrderContainer(): TReturnOrder;
|
|
3249
|
-
|
|
3250
|
-
interface ReturnProps {
|
|
3251
|
-
/** This is the access token used to initialize the sdk client. It need to be set as prop in the main `<CommerceLayer>` component */
|
|
3252
|
-
accessToken?: string;
|
|
3253
|
-
/** This method can be used to initialize an sdk client and perform list, retrieve, update or delete operations on any resource */
|
|
3254
|
-
sdkClient: () => CommerceLayerClient | undefined;
|
|
3255
|
-
}
|
|
3256
|
-
/**
|
|
3257
|
-
* React Hook that provides access to the official Commerce Layer SDK JS Client.
|
|
3258
|
-
**/
|
|
3259
|
-
declare function useCommerceLayer(): ReturnProps;
|
|
3260
|
-
|
|
3261
|
-
type TCustomer = Omit<CustomerState, 'errors' | 'isGuest'> & {
|
|
3262
|
-
setResourceTrigger?: typeof setResourceTrigger;
|
|
3263
|
-
} & Pick<InitialCustomerContext, 'reloadCustomerAddresses'>;
|
|
3264
|
-
interface TReturnCustomer extends Omit<TCustomer, 'errors' | 'isGuest'> {
|
|
3265
|
-
}
|
|
3266
|
-
/**
|
|
3267
|
-
* React Hook that provides access to the order context stored in the `<CustomerContainer>` component.
|
|
3268
|
-
**/
|
|
3269
|
-
declare function useCustomerContainer(): TReturnCustomer;
|
|
3270
|
-
|
|
3271
|
-
export { AddToCartButton, Address, AddressCountrySelector, AddressField, AddressInput, AddressInputSelect, AddressStateSelector, AddressesContainer, AddressesEmpty, AdjustmentAmount, AvailabilityContainer, AvailabilityTemplate, type BaseError, BillingAddressContainer, BillingAddressForm, CartLink, CheckoutLink, type CodeErrorType, CommerceLayer, CustomerAddressForm, type CustomerCardsProps, CustomerContainer, CustomerField, CustomerInput, type CustomerSaveToWalletProps, DeliveryLeadTime, type DeliveryLeadTimeComponentChildren, type DeliveryLeadTimeField, DiscountAmount, Errors, ExternalFunction, GiftCard, GiftCardAmount, GiftCardContainer, GiftCardCurrencySelector, GiftCardInput, GiftCardOrCouponCode, GiftCardOrCouponForm, GiftCardOrCouponInput, GiftCardOrCouponRemoveButton, GiftCardOrCouponSubmit, InStockSubscriptionButton, InStockSubscriptionsContainer, LineItem, LineItemAmount, LineItemCode, LineItemField, LineItemImage, LineItemName, LineItemOption, LineItemOptions, LineItemQuantity, LineItemRemoveLink, LineItemsContainer, LineItemsCount, LineItemsEmpty, MetadataInput, OrderContainer, OrderList, OrderListEmpty, OrderListRow, OrderNumber, OrderStorage, ParcelField, ParcelLineItem, ParcelLineItemField, ParcelLineItemsCount, Parcels, ParcelsCount, PaymentMethod, PaymentMethodAmount, PaymentMethodName, type PaymentMethodOnClickParams, PaymentMethodPrice, PaymentMethodRadioButton, PaymentMethodsContainer, PaymentSource, PaymentSourceBrandIcon, PaymentSourceBrandName, PaymentSourceDetail, type PaymentSourceDetailType, PaymentSourceEditButton, type PaymentSourceProps, PlaceOrderButton, PlaceOrderContainer, Price, type PriceProps, PricesContainer, PrivacyAndTermsCheckbox, type Props$14 as Props, SaveAddressesButton, SaveCustomerButton, Shipment, type ShipmentAttribute, ShipmentField, ShipmentsContainer, ShipmentsCount, ShippingAddressContainer, ShippingAddressForm, ShippingAmount, ShippingMethod, ShippingMethodName, ShippingMethodPrice, ShippingMethodRadioButton, SkuField, SkuList, SkuListsContainer, Skus, SkusContainer, StockTransfer, StockTransferField, SubTotalAmount, SubmitButton, type TAPIError, type TErrorComponent, type TLineItem, type TLineItemCode, type TLineItemImage, type TLineItemName, type TLineItemOption, type TOrderListColumn, type TResourceError, TaxesAmount, TotalAmount, useCommerceLayer, useCustomerContainer, useOrderContainer };
|