@commercelayer/react-components 4.18.0 → 4.19.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 +1 -1
- package/lib/cjs/components/MetadataInput.d.ts +1 -1
- package/lib/cjs/components/SubmitButton.d.ts +2 -2
- package/lib/cjs/components/addresses/Address.d.ts +1 -1
- package/lib/cjs/components/addresses/AddressCountrySelector.d.ts +1 -1
- package/lib/cjs/components/addresses/AddressField.d.ts +2 -2
- package/lib/cjs/components/addresses/AddressInput.d.ts +1 -1
- package/lib/cjs/components/addresses/AddressInputSelect.d.ts +1 -1
- package/lib/cjs/components/addresses/AddressStateSelector.d.ts +1 -1
- package/lib/cjs/components/addresses/AddressesEmpty.d.ts +1 -1
- package/lib/cjs/components/addresses/BillingAddressForm.d.ts +1 -1
- package/lib/cjs/components/addresses/SaveAddressesButton.d.ts +1 -1
- package/lib/cjs/components/addresses/ShippingAddressForm.d.ts +1 -1
- package/lib/cjs/components/customers/CustomerContainer.d.ts +1 -1
- package/lib/cjs/components/customers/CustomerField.d.ts +1 -1
- package/lib/cjs/components/customers/CustomerInput.d.ts +1 -1
- package/lib/cjs/components/customers/CustomerPaymentSource.d.ts +1 -1
- package/lib/cjs/components/customers/CustomerPaymentSourceEmpty.d.ts +1 -1
- package/lib/cjs/components/customers/MyAccountLink.d.ts +1 -1
- package/lib/cjs/components/customers/MyIdentityLink.d.ts +1 -1
- package/lib/cjs/components/customers/SaveCustomerButton.d.ts +1 -1
- package/lib/cjs/components/errors/Errors.d.ts +1 -1
- package/lib/cjs/components/gift_cards/GiftCard.d.ts +1 -1
- package/lib/cjs/components/gift_cards/GiftCardCurrencySelector.d.ts +1 -1
- package/lib/cjs/components/gift_cards/GiftCardInput.d.ts +1 -1
- package/lib/cjs/components/gift_cards/GiftCardOrCouponCode.d.ts +1 -1
- package/lib/cjs/components/gift_cards/GiftCardOrCouponInput.d.ts +2 -2
- package/lib/cjs/components/gift_cards/GiftCardOrCouponRemoveButton.d.ts +2 -2
- package/lib/cjs/components/gift_cards/GiftCardOrCouponSubmit.d.ts +2 -2
- package/lib/cjs/components/in_stock_subscriptions/InStockSubscriptionButton.d.ts +1 -1
- package/lib/cjs/components/in_stock_subscriptions/InStockSubscriptionsContainer.d.ts +1 -1
- package/lib/cjs/components/line_items/LineItemAmount.d.ts +1 -1
- package/lib/cjs/components/line_items/LineItemCode.d.ts +2 -2
- package/lib/cjs/components/line_items/LineItemField.d.ts +1 -1
- package/lib/cjs/components/line_items/LineItemImage.d.ts +2 -2
- package/lib/cjs/components/line_items/LineItemName.d.ts +1 -1
- package/lib/cjs/components/line_items/LineItemOption.d.ts +2 -2
- package/lib/cjs/components/line_items/LineItemQuantity.d.ts +2 -2
- package/lib/cjs/components/line_items/LineItemRemoveLink.d.ts +2 -2
- package/lib/cjs/components/line_items/LineItemsCount.d.ts +1 -1
- package/lib/cjs/components/line_items/LineItemsEmpty.d.ts +1 -1
- package/lib/cjs/components/orders/AddToCartButton.d.ts +2 -2
- package/lib/cjs/components/orders/AdjustmentAmount.d.ts +1 -1
- package/lib/cjs/components/orders/CartLink.d.ts +1 -1
- package/lib/cjs/components/orders/CheckoutLink.d.ts +1 -1
- package/lib/cjs/components/orders/DiscountAmount.d.ts +1 -1
- package/lib/cjs/components/orders/GiftCardAmount.d.ts +1 -1
- package/lib/cjs/components/orders/OrderContainer.d.ts +1 -1
- package/lib/cjs/components/orders/OrderList.d.ts +1 -1
- package/lib/cjs/components/orders/OrderListEmpty.d.ts +1 -1
- package/lib/cjs/components/orders/OrderListPaginationButtons.d.ts +1 -1
- package/lib/cjs/components/orders/OrderListPaginationInfo.d.ts +1 -1
- package/lib/cjs/components/orders/OrderStorage.d.ts +1 -1
- package/lib/cjs/components/orders/PaymentMethodAmount.d.ts +1 -1
- package/lib/cjs/components/orders/PlaceOrderButton.d.ts +1 -1
- package/lib/cjs/components/orders/ShippingAmount.d.ts +1 -1
- package/lib/cjs/components/orders/SubTotalAmount.d.ts +1 -1
- package/lib/cjs/components/orders/TaxesAmount.d.ts +1 -1
- package/lib/cjs/components/orders/TotalAmount.d.ts +1 -1
- package/lib/cjs/components/parcels/ParcelField.d.ts +1 -1
- package/lib/cjs/components/parcels/ParcelLineItemField.d.ts +1 -1
- package/lib/cjs/components/parcels/ParcelLineItemsCount.d.ts +1 -1
- package/lib/cjs/components/parcels/ParcelsCount.d.ts +1 -1
- package/lib/cjs/components/payment_gateways/AdyenGateway.d.ts +1 -1
- package/lib/cjs/components/payment_gateways/BraintreeGateway.d.ts +1 -1
- package/lib/cjs/components/payment_gateways/CheckoutComGateway.d.ts +1 -1
- package/lib/cjs/components/payment_gateways/ExternalGateway.d.ts +1 -1
- package/lib/cjs/components/payment_gateways/KlarnaGateway.d.ts +1 -1
- package/lib/cjs/components/payment_gateways/PaymentGateway.d.ts +2 -2
- package/lib/cjs/components/payment_gateways/PaypalGateway.d.ts +1 -1
- package/lib/cjs/components/payment_gateways/StripeGateway.d.ts +1 -1
- package/lib/cjs/components/payment_gateways/WireTransferGateway.d.ts +1 -1
- package/lib/cjs/components/payment_methods/PaymentMethodName.d.ts +1 -1
- package/lib/cjs/components/payment_methods/PaymentMethodPrice.d.ts +1 -1
- package/lib/cjs/components/payment_methods/PaymentMethodRadioButton.d.ts +1 -1
- package/lib/cjs/components/payment_source/AdyenPayment.d.ts +10 -74
- package/lib/cjs/components/payment_source/BraintreePayment.d.ts +2 -2
- package/lib/cjs/components/payment_source/CheckoutComPayment.d.ts +2 -2
- package/lib/cjs/components/payment_source/ExternalPayment.d.ts +2 -2
- package/lib/cjs/components/payment_source/KlarnaPayment.d.ts +2 -2
- package/lib/cjs/components/payment_source/PaymentSource.d.ts +2 -2
- package/lib/cjs/components/payment_source/PaymentSourceBrandIcon.d.ts +1 -1
- package/lib/cjs/components/payment_source/PaymentSourceBrandName.d.ts +1 -1
- package/lib/cjs/components/payment_source/PaymentSourceEditButton.d.ts +1 -1
- package/lib/cjs/components/payment_source/StripePayment.d.ts +3 -3
- package/lib/cjs/components/prices/Price.d.ts +2 -2
- package/lib/cjs/components/prices/PricesContainer.d.ts +2 -2
- package/lib/cjs/components/shipments/ShipmentField.d.ts +1 -1
- package/lib/cjs/components/shipments/ShipmentsCount.d.ts +1 -1
- package/lib/cjs/components/shipping_methods/ShippingMethodName.d.ts +1 -1
- package/lib/cjs/components/shipping_methods/ShippingMethodPrice.d.ts +1 -1
- package/lib/cjs/components/skus/AvailabilityTemplate.d.ts +2 -2
- package/lib/cjs/components/skus/SkuField.d.ts +1 -1
- package/lib/cjs/components/stock_transfers/StockTransferField.d.ts +1 -1
- package/lib/cjs/components/utils/AddressCardsTemplate.d.ts +1 -1
- package/lib/cjs/components/utils/BaseInput.d.ts +1 -1
- package/lib/cjs/components/utils/BaseOrderPrice.d.ts +2 -2
- package/lib/cjs/components/utils/BaseSelect.d.ts +1 -1
- package/lib/cjs/components/utils/GenericFieldComponent.d.ts +6 -6
- package/lib/cjs/components/utils/Parent.d.ts +1 -1
- package/lib/cjs/components/utils/PaymentCardsTemplate.d.ts +3 -3
- package/lib/cjs/components/utils/PriceTemplate.d.ts +1 -1
- package/lib/cjs/components/utils/getAllErrors.d.ts +3 -3
- package/lib/cjs/context/AddressChildrenContext.d.ts +1 -1
- package/lib/cjs/context/AddressContext.d.ts +1 -1
- package/lib/cjs/context/BillingAddressContext.d.ts +1 -1
- package/lib/cjs/context/CouponAndGiftCardFormContext.d.ts +1 -1
- package/lib/cjs/context/CustomerAddressFormContext.d.ts +2 -2
- package/lib/cjs/context/CustomerContext.d.ts +1 -1
- package/lib/cjs/context/CustomerPaymentSourceContext.d.ts +1 -1
- package/lib/cjs/context/GiftCardContext.d.ts +1 -1
- package/lib/cjs/context/InStockSubscriptionContext.d.ts +1 -1
- package/lib/cjs/context/LineItemChildrenContext.d.ts +1 -1
- package/lib/cjs/context/LineItemContext.d.ts +2 -2
- package/lib/cjs/context/OrderContext.d.ts +2 -2
- package/lib/cjs/context/OrderListChildrenContext.d.ts +3 -3
- package/lib/cjs/context/PaymentMethodChildrenContext.d.ts +1 -1
- package/lib/cjs/context/ShippingAddressContext.d.ts +1 -1
- package/lib/cjs/context/ShippingAddressFormContext.d.ts +1 -1
- package/lib/cjs/context/ShippingMethodChildrenContext.d.ts +1 -1
- package/lib/cjs/context/SkuChildrenContext.d.ts +1 -1
- package/lib/cjs/context/SkuContext.d.ts +1 -1
- package/lib/cjs/context/StockTransferChildrenContext.d.ts +1 -1
- package/lib/cjs/hooks/useCommerceLayer.d.ts +1 -1
- package/lib/cjs/hooks/useCustomerContainer.d.ts +1 -1
- package/lib/cjs/hooks/useOrderContainer.d.ts +1 -1
- package/lib/cjs/reducers/AddressReducer.d.ts +9 -9
- package/lib/cjs/reducers/AvailabilityReducer.d.ts +5 -5
- package/lib/cjs/reducers/BillingAddressReducer.d.ts +4 -4
- package/lib/cjs/reducers/CustomerReducer.d.ts +4 -4
- package/lib/cjs/reducers/GiftCardReducer.d.ts +6 -6
- package/lib/cjs/reducers/InStockSubscriptionReducer.d.ts +3 -3
- package/lib/cjs/reducers/LineItemReducer.d.ts +6 -6
- package/lib/cjs/reducers/OrderReducer.d.ts +6 -6
- package/lib/cjs/reducers/PaymentMethodReducer.d.ts +12 -12
- package/lib/cjs/reducers/PlaceOrderReducer.d.ts +1 -1
- package/lib/cjs/reducers/PriceReducer.d.ts +5 -5
- package/lib/cjs/reducers/ShipmentReducer.d.ts +5 -5
- package/lib/cjs/reducers/ShippingAddressReducer.d.ts +4 -4
- package/lib/cjs/reducers/SkuListsReducer.d.ts +2 -2
- package/lib/cjs/reducers/SkuReducer.d.ts +4 -4
- package/lib/cjs/typings/errors.d.ts +1 -1
- package/lib/cjs/typings/index.d.ts +2 -2
- package/lib/cjs/utils/addressesManager.d.ts +3 -3
- package/lib/cjs/utils/baseReducer.d.ts +1 -1
- package/lib/cjs/utils/canPlaceOrder.d.ts +1 -1
- package/lib/cjs/utils/checkIncludeResource.d.ts +1 -1
- package/lib/cjs/utils/customMessages.d.ts +1 -1
- package/lib/cjs/utils/expressPaymentHelper.d.ts +4 -4
- package/lib/cjs/utils/filterChildren.d.ts +1 -1
- package/lib/cjs/utils/formCleaner.d.ts +1 -1
- package/lib/cjs/utils/getCardDetails.d.ts +3 -3
- package/lib/cjs/utils/getErrors.d.ts +2 -2
- package/lib/cjs/utils/getLoaderComponent.d.ts +1 -1
- package/lib/cjs/utils/getPaymentAttributes.d.ts +2 -2
- package/lib/cjs/utils/getPrices.d.ts +1 -1
- package/lib/cjs/utils/getSdk.d.ts +1 -1
- package/lib/cjs/utils/getSkus.d.ts +1 -1
- package/lib/cjs/utils/hasSubscriptions.d.ts +1 -1
- package/lib/cjs/utils/organization.d.ts +4 -4
- package/lib/cjs/utils/organization.js +1 -1
- package/lib/cjs/utils/payment-methods/sortPaymentMethods.d.ts +2 -2
- package/lib/cjs/utils/shipments.d.ts +1 -1
- package/lib/cjs/utils/triggerAttributeHelper.d.ts +2 -2
- package/lib/cjs/utils/updateOrderSubscriptionCustomerPaymentSource.d.ts +2 -2
- package/lib/cjs/utils/validateFormFields.d.ts +5 -5
- package/lib/esm/components/ExternalFunction.d.ts +1 -1
- package/lib/esm/components/MetadataInput.d.ts +1 -1
- package/lib/esm/components/SubmitButton.d.ts +2 -2
- package/lib/esm/components/addresses/Address.d.ts +1 -1
- package/lib/esm/components/addresses/AddressCountrySelector.d.ts +1 -1
- package/lib/esm/components/addresses/AddressField.d.ts +2 -2
- package/lib/esm/components/addresses/AddressInput.d.ts +1 -1
- package/lib/esm/components/addresses/AddressInputSelect.d.ts +1 -1
- package/lib/esm/components/addresses/AddressStateSelector.d.ts +1 -1
- package/lib/esm/components/addresses/AddressesEmpty.d.ts +1 -1
- package/lib/esm/components/addresses/BillingAddressForm.d.ts +1 -1
- package/lib/esm/components/addresses/SaveAddressesButton.d.ts +1 -1
- package/lib/esm/components/addresses/ShippingAddressForm.d.ts +1 -1
- package/lib/esm/components/customers/CustomerContainer.d.ts +1 -1
- package/lib/esm/components/customers/CustomerField.d.ts +1 -1
- package/lib/esm/components/customers/CustomerInput.d.ts +1 -1
- package/lib/esm/components/customers/CustomerPaymentSource.d.ts +1 -1
- package/lib/esm/components/customers/CustomerPaymentSourceEmpty.d.ts +1 -1
- package/lib/esm/components/customers/MyAccountLink.d.ts +1 -1
- package/lib/esm/components/customers/MyIdentityLink.d.ts +1 -1
- package/lib/esm/components/customers/SaveCustomerButton.d.ts +1 -1
- package/lib/esm/components/errors/Errors.d.ts +1 -1
- package/lib/esm/components/gift_cards/GiftCard.d.ts +1 -1
- package/lib/esm/components/gift_cards/GiftCardCurrencySelector.d.ts +1 -1
- package/lib/esm/components/gift_cards/GiftCardInput.d.ts +1 -1
- package/lib/esm/components/gift_cards/GiftCardOrCouponCode.d.ts +1 -1
- package/lib/esm/components/gift_cards/GiftCardOrCouponInput.d.ts +2 -2
- package/lib/esm/components/gift_cards/GiftCardOrCouponRemoveButton.d.ts +2 -2
- package/lib/esm/components/gift_cards/GiftCardOrCouponSubmit.d.ts +2 -2
- package/lib/esm/components/in_stock_subscriptions/InStockSubscriptionButton.d.ts +1 -1
- package/lib/esm/components/in_stock_subscriptions/InStockSubscriptionsContainer.d.ts +1 -1
- package/lib/esm/components/line_items/LineItemAmount.d.ts +1 -1
- package/lib/esm/components/line_items/LineItemCode.d.ts +2 -2
- package/lib/esm/components/line_items/LineItemField.d.ts +1 -1
- package/lib/esm/components/line_items/LineItemImage.d.ts +2 -2
- package/lib/esm/components/line_items/LineItemName.d.ts +1 -1
- package/lib/esm/components/line_items/LineItemOption.d.ts +2 -2
- package/lib/esm/components/line_items/LineItemQuantity.d.ts +2 -2
- package/lib/esm/components/line_items/LineItemRemoveLink.d.ts +2 -2
- package/lib/esm/components/line_items/LineItemsCount.d.ts +1 -1
- package/lib/esm/components/line_items/LineItemsEmpty.d.ts +1 -1
- package/lib/esm/components/orders/AddToCartButton.d.ts +2 -2
- package/lib/esm/components/orders/AdjustmentAmount.d.ts +1 -1
- package/lib/esm/components/orders/CartLink.d.ts +1 -1
- package/lib/esm/components/orders/CheckoutLink.d.ts +1 -1
- package/lib/esm/components/orders/DiscountAmount.d.ts +1 -1
- package/lib/esm/components/orders/GiftCardAmount.d.ts +1 -1
- package/lib/esm/components/orders/OrderContainer.d.ts +1 -1
- package/lib/esm/components/orders/OrderList.d.ts +1 -1
- package/lib/esm/components/orders/OrderListEmpty.d.ts +1 -1
- package/lib/esm/components/orders/OrderListPaginationButtons.d.ts +1 -1
- package/lib/esm/components/orders/OrderListPaginationInfo.d.ts +1 -1
- package/lib/esm/components/orders/OrderStorage.d.ts +1 -1
- package/lib/esm/components/orders/PaymentMethodAmount.d.ts +1 -1
- package/lib/esm/components/orders/PlaceOrderButton.d.ts +1 -1
- package/lib/esm/components/orders/ShippingAmount.d.ts +1 -1
- package/lib/esm/components/orders/SubTotalAmount.d.ts +1 -1
- package/lib/esm/components/orders/TaxesAmount.d.ts +1 -1
- package/lib/esm/components/orders/TotalAmount.d.ts +1 -1
- package/lib/esm/components/parcels/ParcelField.d.ts +1 -1
- package/lib/esm/components/parcels/ParcelLineItemField.d.ts +1 -1
- package/lib/esm/components/parcels/ParcelLineItemsCount.d.ts +1 -1
- package/lib/esm/components/parcels/ParcelsCount.d.ts +1 -1
- package/lib/esm/components/payment_gateways/AdyenGateway.d.ts +1 -1
- package/lib/esm/components/payment_gateways/BraintreeGateway.d.ts +1 -1
- package/lib/esm/components/payment_gateways/CheckoutComGateway.d.ts +1 -1
- package/lib/esm/components/payment_gateways/ExternalGateway.d.ts +1 -1
- package/lib/esm/components/payment_gateways/KlarnaGateway.d.ts +1 -1
- package/lib/esm/components/payment_gateways/PaymentGateway.d.ts +2 -2
- package/lib/esm/components/payment_gateways/PaypalGateway.d.ts +1 -1
- package/lib/esm/components/payment_gateways/StripeGateway.d.ts +1 -1
- package/lib/esm/components/payment_gateways/WireTransferGateway.d.ts +1 -1
- package/lib/esm/components/payment_methods/PaymentMethodName.d.ts +1 -1
- package/lib/esm/components/payment_methods/PaymentMethodPrice.d.ts +1 -1
- package/lib/esm/components/payment_methods/PaymentMethodRadioButton.d.ts +1 -1
- package/lib/esm/components/payment_source/AdyenPayment.d.ts +10 -74
- package/lib/esm/components/payment_source/BraintreePayment.d.ts +2 -2
- package/lib/esm/components/payment_source/CheckoutComPayment.d.ts +2 -2
- package/lib/esm/components/payment_source/ExternalPayment.d.ts +2 -2
- package/lib/esm/components/payment_source/KlarnaPayment.d.ts +2 -2
- package/lib/esm/components/payment_source/PaymentSource.d.ts +2 -2
- package/lib/esm/components/payment_source/PaymentSourceBrandIcon.d.ts +1 -1
- package/lib/esm/components/payment_source/PaymentSourceBrandName.d.ts +1 -1
- package/lib/esm/components/payment_source/PaymentSourceEditButton.d.ts +1 -1
- package/lib/esm/components/payment_source/StripePayment.d.ts +3 -3
- package/lib/esm/components/prices/Price.d.ts +2 -2
- package/lib/esm/components/prices/PricesContainer.d.ts +2 -2
- package/lib/esm/components/shipments/ShipmentField.d.ts +1 -1
- package/lib/esm/components/shipments/ShipmentsCount.d.ts +1 -1
- package/lib/esm/components/shipping_methods/ShippingMethodName.d.ts +1 -1
- package/lib/esm/components/shipping_methods/ShippingMethodPrice.d.ts +1 -1
- package/lib/esm/components/skus/AvailabilityTemplate.d.ts +2 -2
- package/lib/esm/components/skus/SkuField.d.ts +1 -1
- package/lib/esm/components/stock_transfers/StockTransferField.d.ts +1 -1
- package/lib/esm/components/utils/AddressCardsTemplate.d.ts +1 -1
- package/lib/esm/components/utils/BaseInput.d.ts +1 -1
- package/lib/esm/components/utils/BaseOrderPrice.d.ts +2 -2
- package/lib/esm/components/utils/BaseSelect.d.ts +1 -1
- package/lib/esm/components/utils/GenericFieldComponent.d.ts +6 -6
- package/lib/esm/components/utils/Parent.d.ts +1 -1
- package/lib/esm/components/utils/PaymentCardsTemplate.d.ts +3 -3
- package/lib/esm/components/utils/PriceTemplate.d.ts +1 -1
- package/lib/esm/components/utils/getAllErrors.d.ts +3 -3
- package/lib/esm/context/AddressChildrenContext.d.ts +1 -1
- package/lib/esm/context/AddressContext.d.ts +1 -1
- package/lib/esm/context/BillingAddressContext.d.ts +1 -1
- package/lib/esm/context/CouponAndGiftCardFormContext.d.ts +1 -1
- package/lib/esm/context/CustomerAddressFormContext.d.ts +2 -2
- package/lib/esm/context/CustomerContext.d.ts +1 -1
- package/lib/esm/context/CustomerPaymentSourceContext.d.ts +1 -1
- package/lib/esm/context/GiftCardContext.d.ts +1 -1
- package/lib/esm/context/InStockSubscriptionContext.d.ts +1 -1
- package/lib/esm/context/LineItemChildrenContext.d.ts +1 -1
- package/lib/esm/context/LineItemContext.d.ts +2 -2
- package/lib/esm/context/OrderContext.d.ts +2 -2
- package/lib/esm/context/OrderListChildrenContext.d.ts +3 -3
- package/lib/esm/context/PaymentMethodChildrenContext.d.ts +1 -1
- package/lib/esm/context/ShippingAddressContext.d.ts +1 -1
- package/lib/esm/context/ShippingAddressFormContext.d.ts +1 -1
- package/lib/esm/context/ShippingMethodChildrenContext.d.ts +1 -1
- package/lib/esm/context/SkuChildrenContext.d.ts +1 -1
- package/lib/esm/context/SkuContext.d.ts +1 -1
- package/lib/esm/context/StockTransferChildrenContext.d.ts +1 -1
- package/lib/esm/hooks/useCommerceLayer.d.ts +1 -1
- package/lib/esm/hooks/useCustomerContainer.d.ts +1 -1
- package/lib/esm/hooks/useOrderContainer.d.ts +1 -1
- package/lib/esm/reducers/AddressReducer.d.ts +9 -9
- package/lib/esm/reducers/AvailabilityReducer.d.ts +5 -5
- package/lib/esm/reducers/BillingAddressReducer.d.ts +4 -4
- package/lib/esm/reducers/CustomerReducer.d.ts +4 -4
- package/lib/esm/reducers/GiftCardReducer.d.ts +6 -6
- package/lib/esm/reducers/InStockSubscriptionReducer.d.ts +3 -3
- package/lib/esm/reducers/LineItemReducer.d.ts +6 -6
- package/lib/esm/reducers/OrderReducer.d.ts +6 -6
- package/lib/esm/reducers/PaymentMethodReducer.d.ts +12 -12
- package/lib/esm/reducers/PlaceOrderReducer.d.ts +1 -1
- package/lib/esm/reducers/PriceReducer.d.ts +5 -5
- package/lib/esm/reducers/ShipmentReducer.d.ts +5 -5
- package/lib/esm/reducers/ShippingAddressReducer.d.ts +4 -4
- package/lib/esm/reducers/SkuListsReducer.d.ts +2 -2
- package/lib/esm/reducers/SkuReducer.d.ts +4 -4
- package/lib/esm/typings/errors.d.ts +1 -1
- package/lib/esm/typings/index.d.ts +2 -2
- package/lib/esm/utils/addressesManager.d.ts +3 -3
- package/lib/esm/utils/baseReducer.d.ts +1 -1
- package/lib/esm/utils/canPlaceOrder.d.ts +1 -1
- package/lib/esm/utils/checkIncludeResource.d.ts +1 -1
- package/lib/esm/utils/customMessages.d.ts +1 -1
- package/lib/esm/utils/expressPaymentHelper.d.ts +4 -4
- package/lib/esm/utils/filterChildren.d.ts +1 -1
- package/lib/esm/utils/formCleaner.d.ts +1 -1
- package/lib/esm/utils/getCardDetails.d.ts +3 -3
- package/lib/esm/utils/getErrors.d.ts +2 -2
- package/lib/esm/utils/getLoaderComponent.d.ts +1 -1
- package/lib/esm/utils/getPaymentAttributes.d.ts +2 -2
- package/lib/esm/utils/getPrices.d.ts +1 -1
- package/lib/esm/utils/getSdk.d.ts +1 -1
- package/lib/esm/utils/getSkus.d.ts +1 -1
- package/lib/esm/utils/hasSubscriptions.d.ts +1 -1
- package/lib/esm/utils/organization.d.ts +4 -4
- package/lib/esm/utils/organization.js +1 -1
- package/lib/esm/utils/payment-methods/sortPaymentMethods.d.ts +2 -2
- package/lib/esm/utils/shipments.d.ts +1 -1
- package/lib/esm/utils/triggerAttributeHelper.d.ts +2 -2
- package/lib/esm/utils/updateOrderSubscriptionCustomerPaymentSource.d.ts +2 -2
- package/lib/esm/utils/validateFormFields.d.ts +5 -5
- package/lib/tsconfig.prod.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.prod.tsbuildinfo +1 -1
- package/package.json +39 -19
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ChangeEvent, type JSX } from 'react';
|
|
2
2
|
import type { Order, PaymentMethod } from '@commercelayer/sdk';
|
|
3
|
-
import {
|
|
3
|
+
import type { ChildrenFunction } from '../../typings/index';
|
|
4
4
|
interface ChildrenProps extends Omit<Props, 'children'> {
|
|
5
5
|
checked: boolean;
|
|
6
6
|
handleOnChange: (event: ChangeEvent<HTMLInputElement>) => Promise<void>;
|
|
@@ -1,73 +1,9 @@
|
|
|
1
|
-
import { type JSX } from
|
|
2
|
-
import {
|
|
3
|
-
import { type CoreConfiguration, type DropinConfiguration } from
|
|
4
|
-
interface StyleDefinitions {
|
|
5
|
-
background?: string;
|
|
6
|
-
caretColor?: string;
|
|
7
|
-
color?: string;
|
|
8
|
-
display?: string;
|
|
9
|
-
font?: string;
|
|
10
|
-
fontFamily?: string;
|
|
11
|
-
fontSize?: string;
|
|
12
|
-
fontSizeAdjust?: string;
|
|
13
|
-
fontSmoothing?: string;
|
|
14
|
-
fontStretch?: string;
|
|
15
|
-
fontStyle?: string;
|
|
16
|
-
fontVariant?: string;
|
|
17
|
-
fontVariantAlternates?: string;
|
|
18
|
-
fontVariantCaps?: string;
|
|
19
|
-
fontVariantEastAsian?: string;
|
|
20
|
-
fontVariantLigatures?: string;
|
|
21
|
-
fontVariantNumeric?: string;
|
|
22
|
-
fontWeight?: string;
|
|
23
|
-
letterSpacing?: string;
|
|
24
|
-
lineHeight?: string;
|
|
25
|
-
mozOsxFontSmoothing?: string;
|
|
26
|
-
mozTransition?: string;
|
|
27
|
-
outline?: string;
|
|
28
|
-
opacity?: string;
|
|
29
|
-
padding?: string;
|
|
30
|
-
textAlign?: string;
|
|
31
|
-
textShadow?: string;
|
|
32
|
-
transition?: string;
|
|
33
|
-
webkitFontSmoothing?: string;
|
|
34
|
-
webkitTransition?: string;
|
|
35
|
-
wordSpacing?: string;
|
|
36
|
-
}
|
|
37
|
-
interface Styles {
|
|
38
|
-
error?: StyleDefinitions;
|
|
39
|
-
placeholder?: StyleDefinitions;
|
|
40
|
-
validated?: StyleDefinitions;
|
|
41
|
-
}
|
|
42
|
-
type PaypalStyle = Partial<{
|
|
43
|
-
/**
|
|
44
|
-
* @see {@link https://developer.paypal.com/docs/checkout/integration-features/customize-button/#color}
|
|
45
|
-
*/
|
|
46
|
-
color: 'gold' | 'blue' | 'silver' | 'white' | 'black';
|
|
47
|
-
/**
|
|
48
|
-
* @see {@link https://developer.paypal.com/docs/checkout/integration-features/customize-button/#shape}
|
|
49
|
-
*/
|
|
50
|
-
shape: 'rect' | 'pill';
|
|
51
|
-
/**
|
|
52
|
-
* @see {@link https://developer.paypal.com/docs/checkout/integration-features/customize-button/#height}
|
|
53
|
-
*/
|
|
54
|
-
height: string | number;
|
|
55
|
-
/**
|
|
56
|
-
* @see {@link https://developer.paypal.com/docs/checkout/integration-features/customize-button/#label}
|
|
57
|
-
*/
|
|
58
|
-
label: 'paypal' | 'checkout' | 'buynow' | 'pay';
|
|
59
|
-
/**
|
|
60
|
-
* @see {@link https://developer.paypal.com/docs/checkout/integration-features/customize-button/#tagline}
|
|
61
|
-
*/
|
|
62
|
-
tagline: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* @see {@link https://developer.paypal.com/docs/checkout/integration-features/customize-button/#layout}
|
|
65
|
-
*/
|
|
66
|
-
layout: 'vertical' | 'horizontal';
|
|
67
|
-
}>;
|
|
1
|
+
import { type JSX } from "react";
|
|
2
|
+
import type { PaymentSourceProps } from "./PaymentSource";
|
|
3
|
+
import { type CardConfiguration, type CoreConfiguration, type DropinConfiguration, type PayPalConfiguration } from "@adyen/adyen-web/auto";
|
|
68
4
|
interface PaymentMethodsStyle {
|
|
69
|
-
card?:
|
|
70
|
-
paypal?:
|
|
5
|
+
card?: CardConfiguration["styles"];
|
|
6
|
+
paypal?: PayPalConfiguration["style"];
|
|
71
7
|
}
|
|
72
8
|
/**
|
|
73
9
|
* Configuration options for the Adyen payment component.
|
|
@@ -96,7 +32,7 @@ export interface AdyenPaymentConfig {
|
|
|
96
32
|
/**
|
|
97
33
|
* Configuration options for the payment methods.
|
|
98
34
|
*/
|
|
99
|
-
paymentMethodsConfiguration?: DropinConfiguration[
|
|
35
|
+
paymentMethodsConfiguration?: DropinConfiguration["paymentMethodsConfiguration"];
|
|
100
36
|
/**
|
|
101
37
|
* Callback function to disable a stored payment method.
|
|
102
38
|
* @param props - An object containing the recurring detail reference and shopper reference.
|
|
@@ -110,9 +46,9 @@ export interface AdyenPaymentConfig {
|
|
|
110
46
|
interface Props {
|
|
111
47
|
clientKey?: string;
|
|
112
48
|
config?: AdyenPaymentConfig;
|
|
113
|
-
templateCustomerSaveToWallet?: PaymentSourceProps[
|
|
114
|
-
locale?: CoreConfiguration[
|
|
115
|
-
environment?: CoreConfiguration[
|
|
49
|
+
templateCustomerSaveToWallet?: PaymentSourceProps["templateCustomerSaveToWallet"];
|
|
50
|
+
locale?: CoreConfiguration["locale"];
|
|
51
|
+
environment?: CoreConfiguration["environment"];
|
|
116
52
|
}
|
|
117
|
-
export declare function AdyenPayment({ clientKey, config, templateCustomerSaveToWallet, environment, locale }: Props): JSX.Element | null;
|
|
53
|
+
export declare function AdyenPayment({ clientKey, config, templateCustomerSaveToWallet, environment, locale, }: Props): JSX.Element | null;
|
|
118
54
|
export default AdyenPayment;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type JSX } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { PaymentSourceProps } from './PaymentSource';
|
|
3
|
+
import type { HostedFieldFieldOptions } from 'braintree-web';
|
|
4
4
|
type BraintreeHostedFields<Type> = {
|
|
5
5
|
[Property in keyof Type]: {
|
|
6
6
|
label?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type JSX } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { PaymentMethodConfig } from '../../reducers/PaymentMethodReducer';
|
|
3
|
+
import type { PaymentSourceProps } from './PaymentSource';
|
|
4
4
|
import { type FramesStyle } from 'frames-react';
|
|
5
5
|
export interface CheckoutComConfig {
|
|
6
6
|
containerClassName?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ChildrenFunction } from '../../typings/index';
|
|
2
2
|
import type { StripeElementLocale } from '@stripe/stripe-js';
|
|
3
3
|
import { type JSX } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import type { PaymentSourceProps } from './PaymentSource';
|
|
5
5
|
export interface ExternalPaymentConfig {
|
|
6
6
|
/**
|
|
7
7
|
* Show the component. Default is false
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type JSX } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { PaymentMethodConfig } from '../../reducers/PaymentMethodReducer';
|
|
3
|
+
import type { PaymentSourceProps } from './PaymentSource';
|
|
4
4
|
type KlarnaPaymentProps = PaymentMethodConfig['klarnaPayment'] & JSX.IntrinsicElements['div'] & Partial<PaymentSourceProps['templateCustomerSaveToWallet']> & {
|
|
5
5
|
show?: boolean;
|
|
6
6
|
clientToken: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type JSX } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { LoaderType } from '../../typings/index';
|
|
3
|
+
import type { CustomerCardsTemplateChildren } from '../utils/PaymentCardsTemplate';
|
|
4
4
|
export interface CustomerCardsProps {
|
|
5
5
|
handleClick: () => void;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type IconBrand } from '../../context/PaymentSourceContext';
|
|
2
2
|
import { type JSX } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import type { ChildrenFunction } from '../../typings/index';
|
|
4
4
|
interface ChildrenProps extends Omit<Props, 'children'> {
|
|
5
5
|
brand: IconBrand;
|
|
6
6
|
defaultSrc: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type IconBrand } from '../../context/PaymentSourceContext';
|
|
2
2
|
import { type JSX } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import type { ChildrenFunction } from '../../typings/index';
|
|
4
4
|
interface CustomComponent extends Omit<Props, 'children'> {
|
|
5
5
|
brand: IconBrand;
|
|
6
6
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type JSX } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import type { StripeElementLocale, StripeElementsOptions, StripePaymentElementOptions } from '@stripe/stripe-js';
|
|
3
|
+
import type { PaymentMethodConfig } from '../../reducers/PaymentMethodReducer';
|
|
4
|
+
import type { PaymentSourceProps } from './PaymentSource';
|
|
5
5
|
export interface StripeConfig {
|
|
6
6
|
containerClassName?: string;
|
|
7
7
|
hintLabel?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type JSX } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { Price as PriceType } from '@commercelayer/sdk';
|
|
3
|
+
import type { ChildrenFunction, LoaderType } from '../../typings/index';
|
|
4
4
|
interface PriceChildrenProps extends Omit<PriceProps, 'children'> {
|
|
5
5
|
loading: boolean;
|
|
6
6
|
loader: LoaderType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type JSX } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { LoaderType } from '../../typings/index';
|
|
3
|
+
import type { QueryPageSize } from '@commercelayer/sdk';
|
|
4
4
|
interface Props {
|
|
5
5
|
/**
|
|
6
6
|
* Any valid JSX.Element(s).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ChildrenFunction } from '../../typings/index';
|
|
2
2
|
import type { Shipment } from '@commercelayer/sdk';
|
|
3
3
|
import type { JSX } from "react";
|
|
4
4
|
interface ChildrenProps extends Omit<Props, 'children'> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { TimeFormat, ChildrenFunction } from '../../typings/index';
|
|
2
|
+
import type { DeliveryLeadTime } from '../../reducers/AvailabilityReducer';
|
|
3
3
|
import type { JSX } from "react";
|
|
4
4
|
interface AvailabilityTemplateChildrenProps extends Omit<Props, 'children'>, DeliveryLeadTime {
|
|
5
5
|
text: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ConditionalElement } from '../../typings/index';
|
|
2
2
|
import { type TGenericChildrenProps, type TResources } from '../utils/GenericFieldComponent';
|
|
3
3
|
import type { JSX } from "react";
|
|
4
4
|
type SkuFieldChildrenProps = TGenericChildrenProps<TResources['Sku']>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ConditionalElement } from '../../typings/index';
|
|
2
2
|
import { type TGenericChildrenProps, type TResources } from '../utils/GenericFieldComponent';
|
|
3
3
|
import type { JSX } from "react";
|
|
4
4
|
type StockTransferFieldChildrenProps = TGenericChildrenProps<TResources['StockTransfer']>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type JSX } from 'react';
|
|
2
2
|
import type { Address } from '@commercelayer/sdk';
|
|
3
3
|
import AddressChildrenContext from '../../context/AddressChildrenContext';
|
|
4
|
-
import {
|
|
4
|
+
import type { ChildrenFunction } from '../../typings/index';
|
|
5
5
|
export interface TAddressCards extends Pick<Props, 'customerAddresses' | 'className'> {
|
|
6
6
|
AddressProvider: typeof AddressChildrenContext.Provider;
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { type JSX } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { BaseInputComponentProps } from '../../typings/index';
|
|
3
3
|
export type BaseInputProps = BaseInputComponentProps & Omit<JSX.IntrinsicElements['input'], 'children' | 'pattern'> & Omit<JSX.IntrinsicElements['textarea'], 'children' | 'pattern'>;
|
|
4
4
|
declare const _default: React.ForwardRefExoticComponent<Omit<BaseInputProps, "ref"> & React.RefAttributes<any>>;
|
|
5
5
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type JSX } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { PropsType } from '../../utils/PropsType';
|
|
3
|
+
import type { baseOrderPricePropTypes } from '../../typings/index';
|
|
4
4
|
export type BaseOrderPriceProps = PropsType<typeof baseOrderPricePropTypes, unknown> & Omit<JSX.IntrinsicElements['span'], 'children' | 'ref'>;
|
|
5
5
|
export declare function BaseOrderPrice(props: BaseOrderPriceProps): JSX.Element;
|
|
6
6
|
export default BaseOrderPrice;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { BaseSelectComponentProps } from '../../typings/index';
|
|
3
3
|
export type BaseSelectProps = BaseSelectComponentProps;
|
|
4
4
|
declare const _default: React.ForwardRefExoticComponent<BaseSelectComponentProps & React.RefAttributes<any>>;
|
|
5
5
|
export default _default;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { InitialSkuContext } from '../../context/SkuChildrenContext';
|
|
2
|
+
import type { InitialStockTransferContext } from '../../context/StockTransferChildrenContext';
|
|
3
3
|
import type { Customer, LineItem, Sku, Parcel, ParcelLineItem } from '@commercelayer/sdk';
|
|
4
|
-
import {
|
|
4
|
+
import type { InitialLineItemChildrenContext } from '../../context/LineItemChildrenContext';
|
|
5
5
|
import { type Context, type JSX } from 'react';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import type { InitialCustomerContext } from '../../context/CustomerContext';
|
|
7
|
+
import type { InitialParcelContext } from '../../context/ParcelChildrenContext';
|
|
8
|
+
import type { InitialParcelLineItemContext } from '../../context/ParcelLineItemChildrenContext';
|
|
9
9
|
export interface TResources {
|
|
10
10
|
StockTransfer: LineItem & {
|
|
11
11
|
resource: 'stockTransfer';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type JSX } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { PaymentResource } from '../../reducers/PaymentMethodReducer';
|
|
3
3
|
import PaymentSourceContext, { type IconBrand } from '../../context/PaymentSourceContext';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import type { ChildrenFunction } from '../../typings/index';
|
|
5
|
+
import type { CustomerPaymentSource } from '@commercelayer/sdk';
|
|
6
6
|
interface ChildrenProps extends Pick<Props, 'customerPayments'> {
|
|
7
7
|
PaymentSourceProvider: typeof PaymentSourceContext.Provider;
|
|
8
8
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { LineItem } from '@commercelayer/sdk';
|
|
2
|
+
import type { BaseError } from '../../typings/errors';
|
|
3
|
+
import type { TResourceError } from '../errors/Errors';
|
|
4
4
|
import type { JSX } from "react";
|
|
5
5
|
export interface AllErrorsParams {
|
|
6
6
|
allErrors: BaseError[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AddressState, setAddress, type AddressResource, type saveAddresses, type ICustomerAddress } from '../reducers/AddressReducer';
|
|
2
|
-
import {
|
|
2
|
+
import type { BaseError } from '../typings/errors';
|
|
3
3
|
type DefaultContext = {
|
|
4
4
|
saveAddresses?: (params: {
|
|
5
5
|
customerEmail?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { AddressCountrySelectName, AddressInputName } from '../typings/index';
|
|
2
|
+
import type { AddressField } from '../reducers/AddressReducer';
|
|
3
3
|
export interface DefaultContextAddress {
|
|
4
4
|
validation?: void;
|
|
5
5
|
setValue?: (name: AddressField | AddressInputName | AddressCountrySelectName, value: any) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { SetCustomerErrors, deleteCustomerAddress, CustomerState, getCustomerPaymentSources, setCustomerEmail, TCustomerAddress, getCustomerAddresses, getCustomerOrders, getCustomerSubscriptions, setResourceTrigger } from '../reducers/CustomerReducer';
|
|
2
2
|
export type InitialCustomerContext = Partial<{
|
|
3
3
|
saveCustomerUser: (customerEmail: string) => Promise<void>;
|
|
4
4
|
setCustomerErrors: SetCustomerErrors;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type GiftCardState, type GiftCardRecipientI, type GiftCardI } from '../reducers/GiftCardReducer';
|
|
2
|
-
import {
|
|
2
|
+
import type { BaseError } from '../typings/errors';
|
|
3
3
|
export interface GCContext extends GiftCardState {
|
|
4
4
|
addGiftCardRecipient: (values: GiftCardRecipientI & object) => void;
|
|
5
5
|
addGiftCard: (values: GiftCardI & object) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { setInStockSubscription, InStockSubscriptionState } from '../reducers/InStockSubscriptionReducer';
|
|
2
2
|
export interface InitialInStockSubscriptionContext extends InStockSubscriptionState {
|
|
3
3
|
setInStockSubscription?: typeof setInStockSubscription;
|
|
4
4
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { LineItemState } from '../reducers/LineItemReducer';
|
|
2
|
+
import type { LineItem } from '@commercelayer/sdk';
|
|
3
3
|
export interface LineItemContextValue extends LineItemState {
|
|
4
4
|
lineItems?: LineItem[] | null;
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Order } from '@commercelayer/sdk';
|
|
2
2
|
import { type OrderState, type SaveAddressToCustomerAddressBook, createOrder, setGiftCardOrCouponCode, removeGiftCardOrCouponCode, addResourceToInclude, updateOrder, type getOrderContext, type addToCart } from '../reducers/OrderReducer';
|
|
3
|
-
import {
|
|
3
|
+
import type { BaseError } from '../typings/errors';
|
|
4
4
|
interface DefaultContext extends OrderState {
|
|
5
5
|
createOrder: typeof createOrder;
|
|
6
6
|
addToCart?: typeof addToCart;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Order, OrderSubscription } from '@commercelayer/sdk';
|
|
2
|
-
import {
|
|
2
|
+
import type { Row } from '@tanstack/react-table';
|
|
3
3
|
import { type JSX } from 'react';
|
|
4
4
|
export type TOrderList = 'orders' | 'subscriptions';
|
|
5
5
|
export type TableAccessor<T extends TOrderList> = T extends 'orders' ? keyof Order : keyof OrderSubscription;
|
|
@@ -13,7 +13,7 @@ export type InitialOrderListContext = Partial<{
|
|
|
13
13
|
/**
|
|
14
14
|
* The list of orders
|
|
15
15
|
*/
|
|
16
|
-
orders:
|
|
16
|
+
orders: OrderListContent<TOrderList>[] | null | undefined;
|
|
17
17
|
/**
|
|
18
18
|
* The current row
|
|
19
19
|
*/
|
|
@@ -46,7 +46,7 @@ declare const OrderListChildrenContext: import("react").Context<Partial<{
|
|
|
46
46
|
/**
|
|
47
47
|
* The list of orders
|
|
48
48
|
*/
|
|
49
|
-
orders:
|
|
49
|
+
orders: OrderListContent<TOrderList>[] | null | undefined;
|
|
50
50
|
/**
|
|
51
51
|
* The current row
|
|
52
52
|
*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { DefaultContextAddress } from './BillingAddressFormContext';
|
|
2
2
|
declare const ShippingAddressFormContext: import("react").Context<DefaultContextAddress>;
|
|
3
3
|
export default ShippingAddressFormContext;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { DeliveryLeadTime, ShippingMethod } from '@commercelayer/sdk';
|
|
2
2
|
export interface InitialShippingMethodContext {
|
|
3
3
|
shippingMethod?: ShippingMethod;
|
|
4
4
|
deliveryLeadTimeForShipment?: DeliveryLeadTime;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CommerceLayerClient } from '@commercelayer/sdk';
|
|
2
2
|
interface ReturnProps {
|
|
3
3
|
/** This is the access token used to initialize the sdk client. It need to be set as prop in the main `<CommerceLayer>` component */
|
|
4
4
|
accessToken?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type InitialCustomerContext } from '../context/CustomerContext';
|
|
2
|
-
import {
|
|
2
|
+
import type { setResourceTrigger, CustomerState } from '../reducers/CustomerReducer';
|
|
3
3
|
type TCustomer = Omit<CustomerState, 'errors' | 'isGuest'> & {
|
|
4
4
|
setResourceTrigger?: typeof setResourceTrigger;
|
|
5
5
|
} & Pick<InitialCustomerContext, 'reloadCustomerAddresses'>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { createOrder, OrderState, addToCart } from '../reducers/OrderReducer';
|
|
2
2
|
type TAddToCartParams = Omit<Parameters<typeof addToCart>[number], 'buyNowMode' | 'state' | 'dispatch' | 'setLocalOrder' | 'errors' | 'checkoutUrl' | 'persistKey' | 'config'>;
|
|
3
3
|
type TCreateCartParams = Pick<Parameters<typeof createOrder>[number], 'orderAttributes' | 'orderMetadata'>;
|
|
4
4
|
interface TReturnOrder extends Omit<OrderState, 'loading' | 'include' | 'includeLoaded' | 'withoutIncludes' | 'orderId'> {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import type { Dispatch } from 'react';
|
|
2
|
+
import type { CodeErrorType, BaseError } from '../typings/errors';
|
|
3
|
+
import type { CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
4
|
+
import type { Address, Order } from '@commercelayer/sdk';
|
|
5
|
+
import type { updateOrder } from './OrderReducer';
|
|
6
|
+
import type { TCustomerAddress } from './CustomerReducer';
|
|
7
|
+
import type { TResourceError } from '../components/errors/Errors';
|
|
8
|
+
import type { AddressValuesKeys } from '../context/BillingAddressFormContext';
|
|
9
|
+
import type { AddressInputName } from '../typings/index';
|
|
10
10
|
export type CustomFieldMessageError = (props: {
|
|
11
11
|
field: Extract<AddressValuesKeys, AddressInputName> | string;
|
|
12
12
|
code?: Extract<CodeErrorType, 'EMPTY_ERROR' | 'VALIDATION_ERROR'> | undefined;
|