@commercelayer/react-components 4.3.5 → 4.4.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/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 +2 -2
- package/lib/cjs/components/addresses/AddressField.d.ts +3 -3
- package/lib/cjs/components/addresses/AddressInput.d.ts +2 -2
- package/lib/cjs/components/addresses/AddressStateSelector.d.ts +1 -1
- package/lib/cjs/components/addresses/AddressesContainer.d.ts +1 -1
- package/lib/cjs/components/addresses/AddressesContainer.js +1 -1
- package/lib/cjs/components/addresses/AddressesEmpty.d.ts +1 -1
- package/lib/cjs/components/addresses/BillingAddressContainer.d.ts +1 -1
- package/lib/cjs/components/addresses/BillingAddressForm.d.ts +1 -1
- package/lib/cjs/components/addresses/BillingAddressForm.js +1 -1
- package/lib/cjs/components/addresses/SaveAddressesButton.d.ts +2 -2
- package/lib/cjs/components/addresses/ShippingAddressForm.d.ts +1 -1
- package/lib/cjs/components/addresses/ShippingAddressForm.js +1 -1
- package/lib/cjs/components/customers/CustomerAddressForm.d.ts +1 -1
- package/lib/cjs/components/customers/CustomerAddressForm.js +1 -1
- package/lib/cjs/components/customers/CustomerContainer.js +1 -1
- package/lib/cjs/components/customers/CustomerField.d.ts +2 -2
- 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/SaveCustomerButton.d.ts +2 -2
- 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/GiftCardContainer.d.ts +1 -1
- package/lib/cjs/components/gift_cards/GiftCardContainer.js +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 +3 -3
- package/lib/cjs/components/gift_cards/GiftCardOrCouponSubmit.d.ts +2 -2
- 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 +2 -2
- 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 +3 -3
- package/lib/cjs/components/line_items/LineItemOption.js +1 -1
- package/lib/cjs/components/line_items/LineItemOptions.d.ts +1 -1
- package/lib/cjs/components/line_items/LineItemQuantity.d.ts +1 -1
- package/lib/cjs/components/line_items/LineItemRemoveLink.d.ts +2 -2
- package/lib/cjs/components/line_items/LineItemsContainer.js +1 -1
- 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 +3 -3
- package/lib/cjs/components/orders/AdjustmentAmount.d.ts +1 -1
- package/lib/cjs/components/orders/CartLink.d.ts +2 -2
- 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/OrderContainer.js +1 -1
- package/lib/cjs/components/orders/OrderList.d.ts +2 -2
- 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/OrderNumber.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 +2 -2
- package/lib/cjs/components/orders/PlaceOrderButton.js +1 -1
- package/lib/cjs/components/orders/PlaceOrderContainer.d.ts +2 -2
- package/lib/cjs/components/orders/PlaceOrderContainer.js +1 -1
- package/lib/cjs/components/orders/PrivacyAndTermsCheckbox.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 +2 -2
- package/lib/cjs/components/parcels/ParcelLineItemField.d.ts +2 -2
- 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/StripeGateway.js +1 -1
- package/lib/cjs/components/payment_gateways/WireTransferGateway.d.ts +1 -1
- package/lib/cjs/components/payment_methods/PaymentMethod.js +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 +2 -2
- package/lib/cjs/components/payment_methods/PaymentMethodsContainer.d.ts +2 -2
- package/lib/cjs/components/payment_methods/PaymentMethodsContainer.js +1 -1
- package/lib/cjs/components/payment_source/AdyenPayment.d.ts +2 -2
- package/lib/cjs/components/payment_source/BraintreePayment.d.ts +3 -5
- package/lib/cjs/components/payment_source/CheckoutComPayment.d.ts +3 -3
- 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/KlarnaPayment.js +1 -1
- package/lib/cjs/components/payment_source/PaymentSource.d.ts +2 -2
- package/lib/cjs/components/payment_source/PaymentSourceBrandIcon.d.ts +2 -2
- package/lib/cjs/components/payment_source/PaymentSourceBrandName.d.ts +2 -2
- package/lib/cjs/components/payment_source/PaymentSourceEditButton.d.ts +2 -2
- package/lib/cjs/components/payment_source/PaypalPayment.d.ts +1 -1
- package/lib/cjs/components/payment_source/StripePayment.d.ts +7 -5
- package/lib/cjs/components/payment_source/StripePayment.js +1 -1
- package/lib/cjs/components/prices/Price.d.ts +2 -2
- package/lib/cjs/components/prices/PricesContainer.d.ts +1 -1
- package/lib/cjs/components/prices/PricesContainer.js +1 -1
- package/lib/cjs/components/shipments/Shipment.d.ts +1 -1
- package/lib/cjs/components/shipments/ShipmentField.d.ts +1 -1
- package/lib/cjs/components/shipments/ShipmentsContainer.d.ts +1 -1
- package/lib/cjs/components/shipments/ShipmentsContainer.js +1 -1
- package/lib/cjs/components/shipments/ShipmentsCount.d.ts +1 -1
- package/lib/cjs/components/shipping_methods/ShippingMethod.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/AvailabilityContainer.d.ts +1 -1
- package/lib/cjs/components/skus/AvailabilityTemplate.d.ts +2 -2
- package/lib/cjs/components/skus/SkuField.d.ts +2 -2
- package/lib/cjs/components/skus/SkuList.d.ts +1 -1
- package/lib/cjs/components/skus/SkuListsContainer.d.ts +1 -1
- package/lib/cjs/components/skus/Skus.d.ts +1 -1
- package/lib/cjs/components/skus/SkusContainer.d.ts +1 -1
- package/lib/cjs/components/skus/SkusContainer.js +1 -1
- package/lib/cjs/components/stock_transfers/StockTransferField.d.ts +2 -2
- package/lib/cjs/components/utils/AddressCardsTemplate.d.ts +1 -1
- package/lib/cjs/components/utils/AddressCardsTemplate.js +1 -1
- package/lib/cjs/components/utils/BaseField.d.ts +1 -1
- package/lib/cjs/components/utils/BaseInput.d.ts +1 -1
- package/lib/cjs/components/utils/BaseOrderPrice.d.ts +3 -3
- package/lib/cjs/components/utils/BaseSelect.d.ts +1 -1
- package/lib/cjs/components/utils/ErrorBoundary.d.ts +1 -1
- package/lib/cjs/components/utils/GenericFieldComponent.d.ts +7 -7
- 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 +2 -2
- package/lib/cjs/context/BillingAddressContext.d.ts +1 -1
- package/lib/cjs/context/BillingAddressFormContext.d.ts +5 -7
- package/lib/cjs/context/CouponAndGiftCardFormContext.d.ts +1 -1
- package/lib/cjs/context/CustomerAddressFormContext.d.ts +7 -9
- 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 +2 -2
- package/lib/cjs/context/LineItemChildrenContext.d.ts +1 -1
- package/lib/cjs/context/LineItemContext.d.ts +2 -2
- package/lib/cjs/context/LineItemOptionChildrenContext.d.ts +5 -2
- package/lib/cjs/context/OrderContext.d.ts +3 -3
- package/lib/cjs/context/OrderListChildrenContext.d.ts +1 -1
- package/lib/cjs/context/OrderListPaginationContext.d.ts +1 -1
- package/lib/cjs/context/PaymentMethodChildrenContext.d.ts +1 -1
- package/lib/cjs/context/PaymentMethodContext.d.ts +1 -1
- package/lib/cjs/context/PlaceOrderContext.d.ts +2 -2
- package/lib/cjs/context/PricesContext.d.ts +1 -1
- package/lib/cjs/context/ShipmentContext.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/reducers/AddressReducer.d.ts +6 -6
- package/lib/cjs/reducers/AvailabilityReducer.d.ts +4 -4
- 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/LineItemReducer.d.ts +6 -6
- package/lib/cjs/reducers/OrderReducer.d.ts +6 -6
- package/lib/cjs/reducers/PaymentMethodReducer.d.ts +16 -12
- package/lib/cjs/reducers/PlaceOrderReducer.d.ts +4 -1
- package/lib/cjs/reducers/PriceReducer.d.ts +6 -8
- 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 +5 -9
- package/lib/cjs/utils/PropsType.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/checkIncludeResource.d.ts +1 -1
- package/lib/cjs/utils/customMessages.d.ts +1 -1
- package/lib/cjs/utils/filterChildren.d.ts +1 -1
- package/lib/cjs/utils/getCardDetails.d.ts +3 -3
- package/lib/cjs/utils/getCardDetails.js +1 -1
- package/lib/cjs/utils/getErrors.d.ts +4 -3
- package/lib/cjs/utils/getLoaderComponent.d.ts +1 -1
- package/lib/cjs/utils/getPaymentAttributes.d.ts +3 -3
- package/lib/cjs/utils/getPrices.d.ts +2 -2
- package/lib/cjs/utils/getSdk.d.ts +1 -1
- package/lib/cjs/utils/getSkus.d.ts +1 -1
- package/lib/cjs/utils/hooks/useCustomContext.d.ts +1 -1
- package/lib/cjs/utils/localStorage.js +1 -1
- package/lib/cjs/utils/shipments.d.ts +1 -1
- package/lib/cjs/utils/validateFormFields.d.ts +6 -6
- package/lib/cjs/utils/validateFormFields.js +1 -1
- 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 +2 -2
- package/lib/esm/components/addresses/AddressField.d.ts +3 -3
- package/lib/esm/components/addresses/AddressInput.d.ts +2 -2
- package/lib/esm/components/addresses/AddressStateSelector.d.ts +1 -1
- package/lib/esm/components/addresses/AddressesContainer.d.ts +1 -1
- package/lib/esm/components/addresses/AddressesContainer.js +1 -1
- package/lib/esm/components/addresses/AddressesEmpty.d.ts +1 -1
- package/lib/esm/components/addresses/BillingAddressContainer.d.ts +1 -1
- package/lib/esm/components/addresses/BillingAddressForm.d.ts +1 -1
- package/lib/esm/components/addresses/BillingAddressForm.js +1 -1
- package/lib/esm/components/addresses/SaveAddressesButton.d.ts +2 -2
- package/lib/esm/components/addresses/ShippingAddressForm.d.ts +1 -1
- package/lib/esm/components/addresses/ShippingAddressForm.js +1 -1
- package/lib/esm/components/customers/CustomerAddressForm.d.ts +1 -1
- package/lib/esm/components/customers/CustomerAddressForm.js +1 -1
- package/lib/esm/components/customers/CustomerContainer.js +1 -1
- package/lib/esm/components/customers/CustomerField.d.ts +2 -2
- 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/SaveCustomerButton.d.ts +2 -2
- 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/GiftCardContainer.d.ts +1 -1
- package/lib/esm/components/gift_cards/GiftCardContainer.js +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 +3 -3
- package/lib/esm/components/gift_cards/GiftCardOrCouponSubmit.d.ts +2 -2
- 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 +2 -2
- 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 +3 -3
- package/lib/esm/components/line_items/LineItemOption.js +1 -1
- package/lib/esm/components/line_items/LineItemOptions.d.ts +1 -1
- package/lib/esm/components/line_items/LineItemQuantity.d.ts +1 -1
- package/lib/esm/components/line_items/LineItemRemoveLink.d.ts +2 -2
- package/lib/esm/components/line_items/LineItemsContainer.js +1 -1
- 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 +3 -3
- package/lib/esm/components/orders/AdjustmentAmount.d.ts +1 -1
- package/lib/esm/components/orders/CartLink.d.ts +2 -2
- 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/OrderContainer.js +1 -1
- package/lib/esm/components/orders/OrderList.d.ts +2 -2
- 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/OrderNumber.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 +2 -2
- package/lib/esm/components/orders/PlaceOrderButton.js +1 -1
- package/lib/esm/components/orders/PlaceOrderContainer.d.ts +2 -2
- package/lib/esm/components/orders/PlaceOrderContainer.js +1 -1
- package/lib/esm/components/orders/PrivacyAndTermsCheckbox.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 +2 -2
- package/lib/esm/components/parcels/ParcelLineItemField.d.ts +2 -2
- 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/StripeGateway.js +1 -1
- package/lib/esm/components/payment_gateways/WireTransferGateway.d.ts +1 -1
- package/lib/esm/components/payment_methods/PaymentMethod.js +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 +2 -2
- package/lib/esm/components/payment_methods/PaymentMethodsContainer.d.ts +2 -2
- package/lib/esm/components/payment_methods/PaymentMethodsContainer.js +1 -1
- package/lib/esm/components/payment_source/AdyenPayment.d.ts +2 -2
- package/lib/esm/components/payment_source/BraintreePayment.d.ts +3 -5
- package/lib/esm/components/payment_source/CheckoutComPayment.d.ts +3 -3
- 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/KlarnaPayment.js +1 -1
- package/lib/esm/components/payment_source/PaymentSource.d.ts +2 -2
- package/lib/esm/components/payment_source/PaymentSourceBrandIcon.d.ts +2 -2
- package/lib/esm/components/payment_source/PaymentSourceBrandName.d.ts +2 -2
- package/lib/esm/components/payment_source/PaymentSourceEditButton.d.ts +2 -2
- package/lib/esm/components/payment_source/PaypalPayment.d.ts +1 -1
- package/lib/esm/components/payment_source/StripePayment.d.ts +7 -5
- package/lib/esm/components/payment_source/StripePayment.js +1 -1
- package/lib/esm/components/prices/Price.d.ts +2 -2
- package/lib/esm/components/prices/PricesContainer.d.ts +1 -1
- package/lib/esm/components/prices/PricesContainer.js +1 -1
- package/lib/esm/components/shipments/Shipment.d.ts +1 -1
- package/lib/esm/components/shipments/ShipmentField.d.ts +1 -1
- package/lib/esm/components/shipments/ShipmentsContainer.d.ts +1 -1
- package/lib/esm/components/shipments/ShipmentsContainer.js +1 -1
- package/lib/esm/components/shipments/ShipmentsCount.d.ts +1 -1
- package/lib/esm/components/shipping_methods/ShippingMethod.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/AvailabilityContainer.d.ts +1 -1
- package/lib/esm/components/skus/AvailabilityTemplate.d.ts +2 -2
- package/lib/esm/components/skus/SkuField.d.ts +2 -2
- package/lib/esm/components/skus/SkuList.d.ts +1 -1
- package/lib/esm/components/skus/SkuListsContainer.d.ts +1 -1
- package/lib/esm/components/skus/Skus.d.ts +1 -1
- package/lib/esm/components/skus/SkusContainer.d.ts +1 -1
- package/lib/esm/components/skus/SkusContainer.js +1 -1
- package/lib/esm/components/stock_transfers/StockTransferField.d.ts +2 -2
- package/lib/esm/components/utils/AddressCardsTemplate.d.ts +1 -1
- package/lib/esm/components/utils/AddressCardsTemplate.js +1 -1
- package/lib/esm/components/utils/BaseField.d.ts +1 -1
- package/lib/esm/components/utils/BaseInput.d.ts +1 -1
- package/lib/esm/components/utils/BaseOrderPrice.d.ts +3 -3
- package/lib/esm/components/utils/BaseSelect.d.ts +1 -1
- package/lib/esm/components/utils/ErrorBoundary.d.ts +1 -1
- package/lib/esm/components/utils/GenericFieldComponent.d.ts +7 -7
- 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 +2 -2
- package/lib/esm/context/BillingAddressContext.d.ts +1 -1
- package/lib/esm/context/BillingAddressFormContext.d.ts +5 -7
- package/lib/esm/context/CouponAndGiftCardFormContext.d.ts +1 -1
- package/lib/esm/context/CustomerAddressFormContext.d.ts +7 -9
- 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 +2 -2
- package/lib/esm/context/LineItemChildrenContext.d.ts +1 -1
- package/lib/esm/context/LineItemContext.d.ts +2 -2
- package/lib/esm/context/LineItemOptionChildrenContext.d.ts +5 -2
- package/lib/esm/context/OrderContext.d.ts +3 -3
- package/lib/esm/context/OrderListChildrenContext.d.ts +1 -1
- package/lib/esm/context/OrderListPaginationContext.d.ts +1 -1
- package/lib/esm/context/PaymentMethodChildrenContext.d.ts +1 -1
- package/lib/esm/context/PaymentMethodContext.d.ts +1 -1
- package/lib/esm/context/PlaceOrderContext.d.ts +2 -2
- package/lib/esm/context/PricesContext.d.ts +1 -1
- package/lib/esm/context/ShipmentContext.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/reducers/AddressReducer.d.ts +6 -6
- package/lib/esm/reducers/AvailabilityReducer.d.ts +4 -4
- 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/LineItemReducer.d.ts +6 -6
- package/lib/esm/reducers/OrderReducer.d.ts +6 -6
- package/lib/esm/reducers/PaymentMethodReducer.d.ts +16 -12
- package/lib/esm/reducers/PlaceOrderReducer.d.ts +4 -1
- package/lib/esm/reducers/PriceReducer.d.ts +6 -8
- 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 +5 -9
- package/lib/esm/utils/PropsType.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/checkIncludeResource.d.ts +1 -1
- package/lib/esm/utils/customMessages.d.ts +1 -1
- package/lib/esm/utils/filterChildren.d.ts +1 -1
- package/lib/esm/utils/getCardDetails.d.ts +3 -3
- package/lib/esm/utils/getCardDetails.js +1 -1
- package/lib/esm/utils/getErrors.d.ts +4 -3
- package/lib/esm/utils/getLoaderComponent.d.ts +1 -1
- package/lib/esm/utils/getPaymentAttributes.d.ts +3 -3
- package/lib/esm/utils/getPrices.d.ts +2 -2
- package/lib/esm/utils/getSdk.d.ts +1 -1
- package/lib/esm/utils/getSkus.d.ts +1 -1
- package/lib/esm/utils/hooks/useCustomContext.d.ts +1 -1
- package/lib/esm/utils/localStorage.js +1 -1
- package/lib/esm/utils/shipments.d.ts +1 -1
- package/lib/esm/utils/validateFormFields.d.ts +6 -6
- package/lib/esm/utils/validateFormFields.js +1 -1
- package/lib/tsconfig.prod.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.prod.tsbuildinfo +1 -1
- package/package.json +12 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TimeFormat, ChildrenFunction } from '../../typings/index';
|
|
2
|
-
import { DeliveryLeadTime } from '../../reducers/AvailabilityReducer';
|
|
1
|
+
import { type TimeFormat, type ChildrenFunction } from '../../typings/index';
|
|
2
|
+
import { type DeliveryLeadTime } from '../../reducers/AvailabilityReducer';
|
|
3
3
|
interface AvailabilityTemplateChildrenProps extends Omit<Props, 'children'>, DeliveryLeadTime {
|
|
4
4
|
text: string;
|
|
5
5
|
quantity: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConditionalElement } from '../../typings/index';
|
|
2
|
-
import { TGenericChildrenProps, TResources } from '../utils/GenericFieldComponent';
|
|
1
|
+
import { type ConditionalElement } from '../../typings/index';
|
|
2
|
+
import { type TGenericChildrenProps, type TResources } from '../utils/GenericFieldComponent';
|
|
3
3
|
type SkuFieldChildrenProps = TGenericChildrenProps<TResources['Sku']>;
|
|
4
4
|
type TCondition = ConditionalElement<Exclude<TResources['Sku'], 'resource'>>;
|
|
5
5
|
type Props = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SkusContainer=void 0;const tslib_1=require("tslib"),jsx_runtime_1=require("react/jsx-runtime"),CommerceLayerContext_1=tslib_1.__importDefault(require("../../context/CommerceLayerContext")),SkuContext_1=tslib_1.__importDefault(require("../../context/SkuContext")),SkuReducer_1=tslib_1.__importStar(require("../../reducers/SkuReducer")),react_1=require("react");function SkusContainer(props){const{skus,children,queryParams}=props,[state,dispatch]=(0,react_1.useReducer)(SkuReducer_1.default,SkuReducer_1.skuInitialState),config=(0,react_1.useContext)(CommerceLayerContext_1.default),loadSkus=async()=>await(0,SkuReducer_1.getSku)({config,dispatch,skus,queryParams});(0,react_1.useEffect)(()=>(config.accessToken&&state?.skus&&state?.skus.length===0&&loadSkus(),()=>{dispatch({type:"setLoading",payload:{loading:!0}})}),[config,skus]);const contextValue=(0,react_1.useMemo)(()=>state,[state]);return(0,jsx_runtime_1.jsx)(SkuContext_1.default.Provider,{value:contextValue,children})}exports.SkusContainer=SkusContainer,exports.default=SkusContainer;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SkusContainer=void 0;const tslib_1=require("tslib"),jsx_runtime_1=require("react/jsx-runtime"),CommerceLayerContext_1=tslib_1.__importDefault(require("../../context/CommerceLayerContext")),SkuContext_1=tslib_1.__importDefault(require("../../context/SkuContext")),SkuReducer_1=tslib_1.__importStar(require("../../reducers/SkuReducer")),react_1=require("react");function SkusContainer(props){const{skus,children,queryParams}=props,[state,dispatch]=(0,react_1.useReducer)(SkuReducer_1.default,SkuReducer_1.skuInitialState),config=(0,react_1.useContext)(CommerceLayerContext_1.default),loadSkus=async()=>{await(0,SkuReducer_1.getSku)({config,dispatch,skus,queryParams})};(0,react_1.useEffect)(()=>(config.accessToken&&state?.skus&&state?.skus.length===0&&loadSkus(),()=>{dispatch({type:"setLoading",payload:{loading:!0}})}),[config,skus]);const contextValue=(0,react_1.useMemo)(()=>state,[state]);return(0,jsx_runtime_1.jsx)(SkuContext_1.default.Provider,{value:contextValue,children})}exports.SkusContainer=SkusContainer,exports.default=SkusContainer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConditionalElement } from '../../typings/index';
|
|
2
|
-
import { TGenericChildrenProps, TResources } from '../utils/GenericFieldComponent';
|
|
1
|
+
import { type ConditionalElement } from '../../typings/index';
|
|
2
|
+
import { type TGenericChildrenProps, type TResources } from '../utils/GenericFieldComponent';
|
|
3
3
|
type StockTransferFieldChildrenProps = TGenericChildrenProps<TResources['StockTransfer']>;
|
|
4
4
|
type TCondition = ConditionalElement<Exclude<TResources['StockTransfer'], 'resource'>>;
|
|
5
5
|
type Props = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Address } from '@commercelayer/sdk';
|
|
2
2
|
import AddressChildrenContext from '../../context/AddressChildrenContext';
|
|
3
|
-
import { ChildrenFunction } from '../../typings/index';
|
|
3
|
+
import { type ChildrenFunction } from '../../typings/index';
|
|
4
4
|
export interface TAddressCards extends Pick<Props, 'customerAddresses' | 'className'> {
|
|
5
5
|
AddressProvider: typeof AddressChildrenContext.Provider;
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib"),jsx_runtime_1=require("react/jsx-runtime"),Parent_1=tslib_1.__importDefault(require("../utils/Parent")),react_1=require("react"),AddressChildrenContext_1=tslib_1.__importDefault(require("../../context/AddressChildrenContext")),ShippingAddressContext_1=tslib_1.__importDefault(require("../../context/ShippingAddressContext"));function AddressCardsTemplate({customerAddresses,children,deselect,countryLock,selected,selectedClassName,className,disabledClassName,handleSelect}){const{setShippingAddress}=(0,react_1.useContext)(ShippingAddressContext_1.default),value={customerAddresses:customerAddresses.map((address,k)=>{const attributes=address,disabled=setShippingAddress&&countryLock&&countryLock!==address.country_code||!1,addressSelectedClass=selected===k?`${className??""} ${(deselect?"":selectedClassName)??""}`:className,finalClassName=disabled?`${className??""} ${disabledClassName??""}`:addressSelectedClass,customerAddressId=address?.reference||"";return{...attributes,className:finalClassName,onClick:async()=>await handleSelect(k,address.id,customerAddressId,disabled,address)}}),AddressProvider:AddressChildrenContext_1.default.Provider};return(0,jsx_runtime_1.jsx)(Parent_1.default,{...value,children})}exports.default=AddressCardsTemplate;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib"),jsx_runtime_1=require("react/jsx-runtime"),Parent_1=tslib_1.__importDefault(require("../utils/Parent")),react_1=require("react"),AddressChildrenContext_1=tslib_1.__importDefault(require("../../context/AddressChildrenContext")),ShippingAddressContext_1=tslib_1.__importDefault(require("../../context/ShippingAddressContext"));function AddressCardsTemplate({customerAddresses,children,deselect,countryLock,selected,selectedClassName,className,disabledClassName,handleSelect}){const{setShippingAddress}=(0,react_1.useContext)(ShippingAddressContext_1.default),value={customerAddresses:customerAddresses.map((address,k)=>{const attributes=address,disabled=setShippingAddress&&countryLock&&countryLock!==address.country_code||!1,addressSelectedClass=selected===k?`${className??""} ${(deselect?"":selectedClassName)??""}`:className,finalClassName=disabled?`${className??""} ${disabledClassName??""}`:addressSelectedClass,customerAddressId=address?.reference||"";return{...attributes,className:finalClassName,onClick:async()=>{await handleSelect(k,address.id,customerAddressId,disabled,address)}}}),AddressProvider:AddressChildrenContext_1.default.Provider};return(0,jsx_runtime_1.jsx)(Parent_1.default,{...value,children})}exports.default=AddressCardsTemplate;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
1
|
+
import { type FunctionComponent } from 'react';
|
|
2
2
|
type BaseFieldChildren = Omit<BaseFieldProps, 'children'>;
|
|
3
3
|
export interface BaseFieldProps extends Omit<JSX.IntrinsicElements['span'], 'children'> {
|
|
4
4
|
attribute: 'number' | 'id';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BaseInputComponentProps } from '../../typings/index';
|
|
2
|
+
import { type BaseInputComponentProps } from '../../typings/index';
|
|
3
3
|
export type BaseInputProps = BaseInputComponentProps & Omit<JSX.IntrinsicElements['input'], 'children'> & Omit<JSX.IntrinsicElements['textarea'], 'children'>;
|
|
4
4
|
declare const _default: React.ForwardRefExoticComponent<Omit<BaseInputProps, "ref"> & React.RefAttributes<any>>;
|
|
5
5
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PropsType } from '../../utils/PropsType';
|
|
2
|
-
import { baseOrderPricePropTypes } from '../../typings/index';
|
|
3
|
-
export type BaseOrderPriceProps = PropsType<typeof baseOrderPricePropTypes> & Omit<JSX.IntrinsicElements['span'], 'children'>;
|
|
1
|
+
import { type PropsType } from '../../utils/PropsType';
|
|
2
|
+
import { type baseOrderPricePropTypes } from '../../typings/index';
|
|
3
|
+
export type BaseOrderPriceProps = PropsType<typeof baseOrderPricePropTypes, unknown> & Omit<JSX.IntrinsicElements['span'], 'children'>;
|
|
4
4
|
export declare function BaseOrderPrice(props: BaseOrderPriceProps): JSX.Element;
|
|
5
5
|
export default BaseOrderPrice;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BaseSelectComponentProps } from '../../typings/index';
|
|
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 { InitialSkuContext } from '../../context/SkuChildrenContext';
|
|
2
|
-
import { InitialStockTransferContext } from '../../context/StockTransferChildrenContext';
|
|
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 { InitialLineItemContext } from '../../context/LineItemChildrenContext';
|
|
5
|
-
import { Context } from 'react';
|
|
6
|
-
import { InitialCustomerContext } from '../../context/CustomerContext';
|
|
7
|
-
import { InitialParcelContext } from '../../context/ParcelChildrenContext';
|
|
8
|
-
import { InitialParcelLineItemContext } from '../../context/ParcelLineItemChildrenContext';
|
|
4
|
+
import { type InitialLineItemContext } from '../../context/LineItemChildrenContext';
|
|
5
|
+
import { type Context } from 'react';
|
|
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: 'stock_transfers';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PaymentResource, PaymentSourceType } from '../../reducers/PaymentMethodReducer';
|
|
2
|
-
import PaymentSourceContext, { IconBrand } from '../../context/PaymentSourceContext';
|
|
3
|
-
import { ChildrenFunction } from '../../typings/index';
|
|
1
|
+
import { type PaymentResource, type PaymentSourceType } from '../../reducers/PaymentMethodReducer';
|
|
2
|
+
import PaymentSourceContext, { type IconBrand } from '../../context/PaymentSourceContext';
|
|
3
|
+
import { type ChildrenFunction } from '../../typings/index';
|
|
4
4
|
interface ChildrenProps extends Pick<Props, 'customerPayments'> {
|
|
5
5
|
PaymentSourceProvider: typeof PaymentSourceContext.Provider;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LineItem } from '@commercelayer/sdk';
|
|
2
|
-
import { BaseError } from '../../typings/errors';
|
|
3
|
-
import { TResourceError } from '../errors/Errors';
|
|
1
|
+
import { type LineItem } from '@commercelayer/sdk';
|
|
2
|
+
import { type BaseError } from '../../typings/errors';
|
|
3
|
+
import { type TResourceError } from '../errors/Errors';
|
|
4
4
|
export interface AllErrorsParams {
|
|
5
5
|
allErrors: BaseError[];
|
|
6
6
|
messages: BaseError[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AddressState, SetAddress, AddressResource, saveAddresses } from '../reducers/AddressReducer';
|
|
3
|
-
import { BaseError } from '../typings/errors';
|
|
2
|
+
import { type AddressState, type SetAddress, type AddressResource, type saveAddresses } from '../reducers/AddressReducer';
|
|
3
|
+
import { type BaseError } from '../typings/errors';
|
|
4
4
|
type DefaultContext = {
|
|
5
5
|
saveAddresses?: (customerEmail?: string) => ReturnType<typeof saveAddresses>;
|
|
6
6
|
setCloneAddress: (id: string, resource: AddressResource) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { BillingAddressState } from '../reducers/BillingAddressReducer';
|
|
2
|
+
import { type BillingAddressState } from '../reducers/BillingAddressReducer';
|
|
3
3
|
type DefaultContext = {
|
|
4
4
|
setBillingAddress?: (id: string, options?: {
|
|
5
5
|
customerAddressId: string;
|
|
@@ -4,13 +4,11 @@ export type AddressValuesKeys = `${keyof Address}` | `billing_address_${keyof Ad
|
|
|
4
4
|
export interface DefaultContextAddress {
|
|
5
5
|
validation?: void;
|
|
6
6
|
setValue?: (name: AddressValuesKeys, value: string | number | readonly string[]) => void;
|
|
7
|
-
errors?: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
};
|
|
7
|
+
errors?: Record<string, {
|
|
8
|
+
code: string;
|
|
9
|
+
message: string;
|
|
10
|
+
error: boolean;
|
|
11
|
+
}>;
|
|
14
12
|
errorClassName?: string;
|
|
15
13
|
requiresBillingInfo?: boolean;
|
|
16
14
|
resetField?: (name: string) => void;
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AddressCountrySelectName, AddressInputName } from '../typings/index';
|
|
3
|
-
import { AddressField } from '../reducers/AddressReducer';
|
|
2
|
+
import { type AddressCountrySelectName, type AddressInputName } from '../typings/index';
|
|
3
|
+
import { type AddressField } from '../reducers/AddressReducer';
|
|
4
4
|
export interface DefaultContextAddress {
|
|
5
5
|
validation?: void;
|
|
6
6
|
setValue?: (name: AddressField | AddressInputName | AddressCountrySelectName, value: any) => void;
|
|
7
|
-
errors?: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
};
|
|
7
|
+
errors?: Record<string, {
|
|
8
|
+
code: string;
|
|
9
|
+
message: string;
|
|
10
|
+
error: boolean;
|
|
11
|
+
}>;
|
|
14
12
|
errorClassName?: string;
|
|
15
13
|
requiresBillingInfo?: boolean;
|
|
16
14
|
resetField?: (name: string) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SetCustomerErrors, deleteCustomerAddress, CustomerState, getCustomerPaymentSources, setCustomerEmail, TCustomerAddress, getCustomerAddresses } from '../reducers/CustomerReducer';
|
|
2
|
+
import { type SetCustomerErrors, type deleteCustomerAddress, type CustomerState, type getCustomerPaymentSources, type setCustomerEmail, type TCustomerAddress, type getCustomerAddresses } from '../reducers/CustomerReducer';
|
|
3
3
|
export type InitialCustomerContext = Partial<{
|
|
4
4
|
saveCustomerUser: (customerEmail: string) => Promise<void>;
|
|
5
5
|
setCustomerErrors: SetCustomerErrors;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { GiftCardState, GiftCardRecipientI, GiftCardI } from '../reducers/GiftCardReducer';
|
|
3
|
-
import { BaseError } from '../typings/errors';
|
|
2
|
+
import { type GiftCardState, type GiftCardRecipientI, type GiftCardI } from '../reducers/GiftCardReducer';
|
|
3
|
+
import { type BaseError } from '../typings/errors';
|
|
4
4
|
export interface GCContext extends GiftCardState {
|
|
5
5
|
addGiftCardRecipient: (values: GiftCardRecipientI & object) => void;
|
|
6
6
|
addGiftCard: (values: GiftCardI & object) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { LineItemState } from '../reducers/LineItemReducer';
|
|
3
|
-
import { LineItem } from '@commercelayer/sdk';
|
|
2
|
+
import { type LineItemState } from '../reducers/LineItemReducer';
|
|
3
|
+
import { type LineItem } from '@commercelayer/sdk';
|
|
4
4
|
export interface LineItemContextValue extends LineItemState {
|
|
5
5
|
lineItems?: LineItem[] | undefined;
|
|
6
6
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { LineItemOption } from '@commercelayer/sdk';
|
|
2
|
+
import type { LineItemOption } from '@commercelayer/sdk';
|
|
3
|
+
export interface TLineItemOptions extends LineItemOption {
|
|
4
|
+
options?: Record<string, string>;
|
|
5
|
+
}
|
|
3
6
|
export interface InitialLineItemContext {
|
|
4
|
-
lineItemOption: Partial<
|
|
7
|
+
lineItemOption: Partial<TLineItemOptions>;
|
|
5
8
|
showAll?: boolean;
|
|
6
9
|
}
|
|
7
10
|
declare const LineItemOptionChildrenContext: import("react").Context<InitialLineItemContext>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Order } from '@commercelayer/sdk';
|
|
3
|
-
import { OrderState, CreateOrder, SaveAddressToCustomerAddressBook, setGiftCardOrCouponCode, removeGiftCardOrCouponCode, addResourceToInclude, updateOrder, getOrderContext, addToCart } from '../reducers/OrderReducer';
|
|
4
|
-
import { BaseError } from '../typings/errors';
|
|
2
|
+
import { type Order } from '@commercelayer/sdk';
|
|
3
|
+
import { type OrderState, type CreateOrder, type SaveAddressToCustomerAddressBook, setGiftCardOrCouponCode, removeGiftCardOrCouponCode, addResourceToInclude, updateOrder, type getOrderContext, type addToCart } from '../reducers/OrderReducer';
|
|
4
|
+
import { type BaseError } from '../typings/errors';
|
|
5
5
|
interface DefaultContext extends OrderState {
|
|
6
6
|
createOrder: CreateOrder;
|
|
7
7
|
addToCart?: typeof addToCart;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { UpdatePaymentSource, PaymentMethodState, SetPaymentMethodErrors, SetPaymentSource, setPaymentMethod, DestroyPaymentSource, SetPaymentRef, setLoading } from '../reducers/PaymentMethodReducer';
|
|
2
|
+
import { type UpdatePaymentSource, type PaymentMethodState, type SetPaymentMethodErrors, type SetPaymentSource, setPaymentMethod, type DestroyPaymentSource, type SetPaymentRef, setLoading } from '../reducers/PaymentMethodReducer';
|
|
3
3
|
type DefaultContext = {
|
|
4
4
|
setPaymentMethodErrors: SetPaymentMethodErrors;
|
|
5
5
|
setPaymentMethod: typeof setPaymentMethod;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
import { PlaceOrderState, setPlaceOrder, setPlaceOrderErrors } from '../reducers/PlaceOrderReducer';
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import { type PlaceOrderState, type setPlaceOrder, setPlaceOrderErrors } from '../reducers/PlaceOrderReducer';
|
|
3
3
|
type DefaultContext = {
|
|
4
4
|
setPlaceOrderErrors?: typeof setPlaceOrderErrors;
|
|
5
5
|
setPlaceOrder?: typeof setPlaceOrder;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ShipmentState, SetShipmentErrors, setShippingMethod } from '../reducers/ShipmentReducer';
|
|
2
|
+
import { type ShipmentState, type SetShipmentErrors, type setShippingMethod } from '../reducers/ShipmentReducer';
|
|
3
3
|
type DefaultContext = {
|
|
4
4
|
setShipmentErrors: SetShipmentErrors;
|
|
5
5
|
setShippingMethod?: (shipmentId: string, shippingMethodId: string) => ReturnType<typeof setShippingMethod>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ShippingAddressState } from '../reducers/ShippingAddressReducer';
|
|
2
|
+
import { type ShippingAddressState } from '../reducers/ShippingAddressReducer';
|
|
3
3
|
type DefaultContext = {
|
|
4
4
|
setShippingAddress?: (id: string, options?: {
|
|
5
5
|
customerAddressId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DefaultContextAddress } from './BillingAddressFormContext';
|
|
2
|
+
import { type DefaultContextAddress } from './BillingAddressFormContext';
|
|
3
3
|
declare const ShippingAddressFormContext: import("react").Context<DefaultContextAddress>;
|
|
4
4
|
export default ShippingAddressFormContext;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DeliveryLeadTime, ShippingMethod } from '@commercelayer/sdk';
|
|
2
|
+
import { type DeliveryLeadTime, type ShippingMethod } from '@commercelayer/sdk';
|
|
3
3
|
export interface InitialShippingMethodContext {
|
|
4
4
|
shippingMethod?: ShippingMethod;
|
|
5
5
|
deliveryLeadTimeForShipment?: DeliveryLeadTime;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SkuState } from '../reducers/SkuReducer';
|
|
2
|
+
import { type SkuState } from '../reducers/SkuReducer';
|
|
3
3
|
export type SkuContextValue = SkuState;
|
|
4
4
|
declare const SkuContext: import("react").Context<Partial<{
|
|
5
5
|
skus: import("@commercelayer/sdk/lib/cjs/resources/skus").Sku[];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Dispatch } from 'react';
|
|
2
|
-
import { BaseError } from '../typings/errors';
|
|
3
|
-
import { CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
1
|
+
import { type Dispatch } from 'react';
|
|
2
|
+
import { type BaseError } from '../typings/errors';
|
|
3
|
+
import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
4
4
|
import type { Address, AddressCreate, Order } from '@commercelayer/sdk';
|
|
5
|
-
import { updateOrder } from './OrderReducer';
|
|
6
|
-
import { TCustomerAddress } from './CustomerReducer';
|
|
7
|
-
import { TResourceError } from '../components/errors/Errors';
|
|
5
|
+
import { type updateOrder } from './OrderReducer';
|
|
6
|
+
import { type TCustomerAddress } from './CustomerReducer';
|
|
7
|
+
import { type TResourceError } from '../components/errors/Errors';
|
|
8
8
|
export type AddressActionType = 'setErrors' | 'setAddress' | 'setShipToDifferentAddress' | 'setCloneAddress' | 'cleanup';
|
|
9
9
|
export type AddressField = 'city' | 'company' | 'country_code' | 'first_name' | 'last_name' | 'line_1' | 'line_2' | 'phone' | 'state_code' | 'zip_code' | 'billing_info';
|
|
10
10
|
export type AddressFieldView = AddressField | 'full_address' | 'full_name';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BaseError } from '../typings/errors';
|
|
2
|
-
import { Sku } from '@commercelayer/sdk';
|
|
3
|
-
import { CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
4
|
-
import { Dispatch } from 'react';
|
|
1
|
+
import { type BaseError } from '../typings/errors';
|
|
2
|
+
import { type Sku } from '@commercelayer/sdk';
|
|
3
|
+
import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
4
|
+
import { type Dispatch } from 'react';
|
|
5
5
|
export interface DeliveryLeadTime {
|
|
6
6
|
shipping_method: {
|
|
7
7
|
name: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Dispatch } from 'react';
|
|
2
|
-
import { CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
3
|
-
import { Order } from '@commercelayer/sdk';
|
|
4
|
-
import { AddressResource } from './AddressReducer';
|
|
1
|
+
import { type Dispatch } from 'react';
|
|
2
|
+
import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
3
|
+
import { type Order } from '@commercelayer/sdk';
|
|
4
|
+
import { type AddressResource } from './AddressReducer';
|
|
5
5
|
export type BillingAddressActionType = 'setBillingAddress' | 'setBillingCustomerAddressId' | 'cleanup';
|
|
6
6
|
export interface BillingAddressActionPayload {
|
|
7
7
|
_billing_address_clone_id: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Dispatch } from 'react';
|
|
2
|
-
import { BaseError } from '../typings/errors';
|
|
1
|
+
import { type Dispatch } from 'react';
|
|
2
|
+
import { type BaseError } from '../typings/errors';
|
|
3
3
|
import type { Address, AddressCreate, AddressUpdate, Customer, CustomerPaymentSource, Order } from '@commercelayer/sdk';
|
|
4
|
-
import { CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
5
|
-
import { updateOrder } from './OrderReducer';
|
|
4
|
+
import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
5
|
+
import { type updateOrder } from './OrderReducer';
|
|
6
6
|
export type CustomerActionType = 'setErrors' | 'setCustomerEmail' | 'setAddresses' | 'setPayments' | 'setOrders';
|
|
7
7
|
export interface CustomerActionPayload {
|
|
8
8
|
addresses: Address[] | null;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Customer, Market, GiftCardRecipient, GiftCardRecipientCreate, Order } from '@commercelayer/sdk';
|
|
2
|
-
import { BaseMetadata } from '../typings/index';
|
|
3
|
-
import { Dispatch } from 'react';
|
|
4
|
-
import { CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
5
|
-
import { BaseError } from '../typings/errors';
|
|
6
|
-
import { CreateOrder, getOrderContext } from './OrderReducer';
|
|
1
|
+
import { type Customer, type Market, type GiftCardRecipient, type GiftCardRecipientCreate, type Order } from '@commercelayer/sdk';
|
|
2
|
+
import { type BaseMetadata } from '../typings/index';
|
|
3
|
+
import { type Dispatch } from 'react';
|
|
4
|
+
import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
5
|
+
import { type BaseError } from '../typings/errors';
|
|
6
|
+
import { type CreateOrder, type getOrderContext } from './OrderReducer';
|
|
7
7
|
export type GiftCardActionType = 'setAvailability' | 'setGiftCardRecipient' | 'setGiftCardErrors' | 'setGiftCardLoading';
|
|
8
8
|
export interface GiftCardRecipientI {
|
|
9
9
|
email: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Dispatch } from 'react';
|
|
2
|
-
import { CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
3
|
-
import { getOrderContext } from './OrderReducer';
|
|
4
|
-
import { LoaderType } from '../typings/index';
|
|
5
|
-
import { BaseError } from '../typings/errors';
|
|
6
|
-
import { Order, LineItem } from '@commercelayer/sdk';
|
|
1
|
+
import { type Dispatch } from 'react';
|
|
2
|
+
import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
3
|
+
import { type getOrderContext } from './OrderReducer';
|
|
4
|
+
import { type LoaderType } from '../typings/index';
|
|
5
|
+
import { type BaseError } from '../typings/errors';
|
|
6
|
+
import { type Order, type LineItem } from '@commercelayer/sdk';
|
|
7
7
|
export interface UpdateLineItemParams {
|
|
8
8
|
lineItemId: string;
|
|
9
9
|
quantity?: number;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Dispatch } from 'react';
|
|
2
|
-
import { SetLocalOrder, DeleteLocalOrder } from '../utils/localStorage';
|
|
3
|
-
import { CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
4
|
-
import { BaseMetadataObject } from '../typings/index';
|
|
5
|
-
import { BaseError } from '../typings/errors';
|
|
6
|
-
import { AddressResource } from './AddressReducer';
|
|
1
|
+
import { type Dispatch } from 'react';
|
|
2
|
+
import { type SetLocalOrder, type DeleteLocalOrder } from '../utils/localStorage';
|
|
3
|
+
import { type CommerceLayerConfig } from '../context/CommerceLayerContext';
|
|
4
|
+
import { type BaseMetadataObject } from '../typings/index';
|
|
5
|
+
import { type BaseError } from '../typings/errors';
|
|
6
|
+
import { type AddressResource } from './AddressReducer';
|
|
7
7
|
import type { Order, OrderUpdate } from '@commercelayer/sdk';
|
|
8
8
|
export type GetOrderParams = Partial<{
|
|
9
9
|
clearWhenPlaced: boolean;
|