@commercelayer/react-components 3.14.1-beta.2 → 4.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{components → cjs/components}/AdjustmentAmount.d.ts +0 -0
- package/lib/cjs/components/AdjustmentAmount.js +1 -0
- package/lib/cjs/components/AdyenPayment.d.ts +25 -0
- package/lib/cjs/components/AdyenPayment.js +1 -0
- package/lib/cjs/components/AvailabilityContainer.d.ts +14 -0
- package/lib/cjs/components/AvailabilityContainer.js +1 -0
- package/lib/cjs/components/AvailabilityTemplate.d.ts +24 -0
- package/lib/cjs/components/AvailabilityTemplate.js +1 -0
- package/lib/cjs/components/BillingAddressContainer.d.ts +11 -0
- package/lib/cjs/components/BillingAddressContainer.js +1 -0
- package/lib/cjs/components/BillingAddressForm.d.ts +13 -0
- package/lib/cjs/components/BillingAddressForm.js +1 -0
- package/lib/cjs/components/BraintreePayment.d.ts +30 -0
- package/lib/cjs/components/BraintreePayment.js +1 -0
- package/lib/{components → cjs/components}/CartLink.d.ts +0 -0
- package/lib/cjs/components/CartLink.js +1 -0
- package/lib/cjs/components/CheckoutComPayment.d.ts +23 -0
- package/lib/cjs/components/CheckoutComPayment.js +1 -0
- package/lib/cjs/components/CheckoutLink.d.ts +23 -0
- package/lib/cjs/components/CheckoutLink.js +1 -0
- package/lib/cjs/components/DeliveryLeadTime.d.ts +17 -0
- package/lib/cjs/components/DeliveryLeadTime.js +1 -0
- package/lib/cjs/components/DiscountAmount.d.ts +18 -0
- package/lib/cjs/components/DiscountAmount.js +1 -0
- package/lib/cjs/components/Errors.d.ts +5 -0
- package/lib/cjs/components/Errors.js +1 -0
- package/lib/cjs/components/ExternalFunction.d.ts +14 -0
- package/lib/cjs/components/ExternalFunction.js +1 -0
- package/lib/cjs/components/GiftCard.d.ts +18 -0
- package/lib/cjs/components/GiftCard.js +1 -0
- package/lib/cjs/components/GiftCardContainer.d.ts +12 -0
- package/lib/cjs/components/GiftCardContainer.js +1 -0
- package/lib/cjs/components/GiftCardCurrencySelector.d.ts +22 -0
- package/lib/cjs/components/GiftCardCurrencySelector.js +1 -0
- package/lib/cjs/components/GiftCardInput.d.ts +16 -0
- package/lib/cjs/components/GiftCardInput.js +1 -0
- package/lib/cjs/components/GiftCardOrCouponCode.d.ts +24 -0
- package/lib/cjs/components/GiftCardOrCouponCode.js +1 -0
- package/lib/cjs/components/GiftCardOrCouponForm.d.ts +15 -0
- package/lib/cjs/components/GiftCardOrCouponForm.js +1 -0
- package/lib/cjs/components/GiftCardOrCouponInput.d.ts +19 -0
- package/lib/cjs/components/GiftCardOrCouponInput.js +1 -0
- package/lib/cjs/components/GiftCardOrCouponRemoveButton.d.ts +26 -0
- package/lib/cjs/components/GiftCardOrCouponRemoveButton.js +1 -0
- package/lib/cjs/components/GiftCardOrCouponSubmit.d.ts +16 -0
- package/lib/cjs/components/GiftCardOrCouponSubmit.js +1 -0
- package/lib/{components → cjs/components}/GiftCardRecipient.d.ts +0 -0
- package/lib/{components → cjs/components}/GiftCardRecipient.js +0 -0
- package/lib/{components → cjs/components}/GiftCardRecipientInput.d.ts +0 -0
- package/lib/{components → cjs/components}/GiftCardRecipientInput.js +0 -0
- package/lib/cjs/components/ItemContainer.d.ts +22 -0
- package/lib/cjs/components/ItemContainer.js +1 -0
- package/lib/{components → cjs/components}/KlarnaPayment.d.ts +0 -0
- package/lib/cjs/components/KlarnaPayment.js +1 -0
- package/lib/cjs/components/LineItem.d.ts +15 -0
- package/lib/cjs/components/LineItem.js +1 -0
- package/lib/cjs/components/LineItemAmount.d.ts +20 -0
- package/lib/cjs/components/LineItemAmount.js +1 -0
- package/lib/cjs/components/LineItemCode.d.ts +18 -0
- package/lib/cjs/components/LineItemCode.js +1 -0
- package/lib/cjs/components/LineItemImage.d.ts +23 -0
- package/lib/cjs/components/LineItemImage.js +1 -0
- package/lib/cjs/components/LineItemName.d.ts +17 -0
- package/lib/cjs/components/LineItemName.js +1 -0
- package/lib/cjs/components/LineItemOption.d.ts +30 -0
- package/lib/cjs/components/LineItemOption.js +1 -0
- package/lib/cjs/components/LineItemOptions.d.ts +19 -0
- package/lib/cjs/components/LineItemOptions.js +1 -0
- package/lib/cjs/components/LineItemQuantity.d.ts +26 -0
- package/lib/cjs/components/LineItemQuantity.js +1 -0
- package/lib/cjs/components/LineItemRemoveLink.d.ts +22 -0
- package/lib/cjs/components/LineItemRemoveLink.js +1 -0
- package/lib/cjs/components/LineItemsContainer.d.ts +20 -0
- package/lib/cjs/components/LineItemsContainer.js +1 -0
- package/lib/cjs/components/LineItemsCount.d.ts +22 -0
- package/lib/cjs/components/LineItemsCount.js +1 -0
- package/lib/cjs/components/LineItemsEmpty.d.ts +23 -0
- package/lib/cjs/components/LineItemsEmpty.js +1 -0
- package/lib/cjs/components/MetadataInput.d.ts +15 -0
- package/lib/cjs/components/MetadataInput.js +1 -0
- package/lib/cjs/components/PaymentGateway.d.ts +16 -0
- package/lib/cjs/components/PaymentGateway.js +1 -0
- package/lib/cjs/components/PaymentMethod.d.ts +22 -0
- package/lib/cjs/components/PaymentMethod.js +1 -0
- package/lib/cjs/components/PaymentMethodAmount.d.ts +18 -0
- package/lib/cjs/components/PaymentMethodAmount.js +1 -0
- package/lib/cjs/components/PaymentMethodName.d.ts +15 -0
- package/lib/cjs/components/PaymentMethodName.js +1 -0
- package/lib/cjs/components/PaymentMethodPrice.d.ts +20 -0
- package/lib/cjs/components/PaymentMethodPrice.js +1 -0
- package/lib/cjs/components/PaymentMethodRadioButton.d.ts +18 -0
- package/lib/cjs/components/PaymentMethodRadioButton.js +1 -0
- package/lib/cjs/components/PaymentMethodsContainer.d.ts +14 -0
- package/lib/cjs/components/PaymentMethodsContainer.js +1 -0
- package/lib/cjs/components/PaymentSource.d.ts +26 -0
- package/lib/cjs/components/PaymentSource.js +1 -0
- package/lib/cjs/components/PaymentSourceBrandIcon.d.ts +25 -0
- package/lib/cjs/components/PaymentSourceBrandIcon.js +1 -0
- package/lib/cjs/components/PaymentSourceBrandName.d.ts +19 -0
- package/lib/cjs/components/PaymentSourceBrandName.js +1 -0
- package/lib/cjs/components/PaymentSourceDetail.d.ts +18 -0
- package/lib/cjs/components/PaymentSourceDetail.js +1 -0
- package/lib/cjs/components/PaymentSourceEditButton.d.ts +16 -0
- package/lib/cjs/components/PaymentSourceEditButton.js +1 -0
- package/lib/cjs/components/PaypalPayment.d.ts +12 -0
- package/lib/cjs/components/PaypalPayment.js +1 -0
- package/lib/cjs/components/Price.d.ts +28 -0
- package/lib/cjs/components/Price.js +1 -0
- package/lib/cjs/components/PricesContainer.d.ts +27 -0
- package/lib/cjs/components/PricesContainer.js +1 -0
- package/lib/cjs/components/QuantitySelector.d.ts +31 -0
- package/lib/cjs/components/QuantitySelector.js +1 -0
- package/lib/cjs/components/SaveAddressesButton.d.ts +23 -0
- package/lib/cjs/components/SaveAddressesButton.js +1 -0
- package/lib/cjs/components/SaveCustomerButton.d.ts +24 -0
- package/lib/cjs/components/SaveCustomerButton.js +1 -0
- package/lib/cjs/components/ShippingAddressContainer.d.ts +11 -0
- package/lib/cjs/components/ShippingAddressContainer.js +1 -0
- package/lib/cjs/components/ShippingAddressForm.d.ts +13 -0
- package/lib/cjs/components/ShippingAddressForm.js +1 -0
- package/lib/cjs/components/ShippingAmount.d.ts +15 -0
- package/lib/cjs/components/ShippingAmount.js +1 -0
- package/lib/{components → cjs/components}/SkuField.d.ts +0 -0
- package/lib/cjs/components/SkuField.js +1 -0
- package/lib/{components → cjs/components}/Skus.d.ts +0 -0
- package/lib/cjs/components/Skus.js +1 -0
- package/lib/{components → cjs/components}/SkusContainer.d.ts +0 -0
- package/lib/cjs/components/SkusContainer.js +1 -0
- package/lib/cjs/components/StockTransfer.d.ts +12 -0
- package/lib/cjs/components/StockTransfer.js +1 -0
- package/lib/cjs/components/StockTransferField.d.ts +10 -0
- package/lib/cjs/components/StockTransferField.js +1 -0
- package/lib/cjs/components/StripePayment.d.ts +18 -0
- package/lib/cjs/components/StripePayment.js +1 -0
- package/lib/cjs/components/SubmitButton.d.ts +19 -0
- package/lib/cjs/components/SubmitButton.js +1 -0
- package/lib/cjs/components/VariantSelector.d.ts +52 -0
- package/lib/cjs/components/VariantSelector.js +1 -0
- package/lib/cjs/components/VariantsContainer.d.ts +20 -0
- package/lib/cjs/components/VariantsContainer.js +1 -0
- package/lib/cjs/components/WireTransferPayment.d.ts +10 -0
- package/lib/cjs/components/WireTransferPayment.js +1 -0
- package/lib/cjs/components/addresses/Address.d.ts +18 -0
- package/lib/cjs/components/addresses/Address.js +1 -0
- package/lib/cjs/components/addresses/AddressCountrySelector.d.ts +26 -0
- package/lib/cjs/components/addresses/AddressCountrySelector.js +1 -0
- package/lib/cjs/components/addresses/AddressField.d.ts +43 -0
- package/lib/cjs/components/addresses/AddressField.js +1 -0
- package/lib/cjs/components/addresses/AddressInput.d.ts +19 -0
- package/lib/cjs/components/addresses/AddressInput.js +1 -0
- package/lib/cjs/components/addresses/AddressStateSelector.d.ts +27 -0
- package/lib/cjs/components/addresses/AddressStateSelector.js +1 -0
- package/lib/cjs/components/addresses/AddressesContainer.d.ts +15 -0
- package/lib/cjs/components/addresses/AddressesContainer.js +1 -0
- package/lib/cjs/components/auth/CommerceLayer.d.ts +15 -0
- package/lib/cjs/components/auth/CommerceLayer.js +1 -0
- package/lib/cjs/components/customers/CustomerAddressForm.d.ts +13 -0
- package/lib/cjs/components/customers/CustomerAddressForm.js +1 -0
- package/lib/cjs/components/customers/CustomerContainer.d.ts +10 -0
- package/lib/cjs/components/customers/CustomerContainer.js +1 -0
- package/lib/cjs/components/customers/CustomerField.d.ts +10 -0
- package/lib/cjs/components/customers/CustomerField.js +1 -0
- package/lib/cjs/components/customers/CustomerInput.d.ts +23 -0
- package/lib/cjs/components/customers/CustomerInput.js +1 -0
- package/lib/cjs/components/gateways/AdyenGateway.d.ts +5 -0
- package/lib/cjs/components/gateways/AdyenGateway.js +1 -0
- package/lib/cjs/components/gateways/BraintreeGateway.d.ts +5 -0
- package/lib/cjs/components/gateways/BraintreeGateway.js +1 -0
- package/lib/cjs/components/gateways/CheckoutComGateway.d.ts +5 -0
- package/lib/cjs/components/gateways/CheckoutComGateway.js +1 -0
- package/lib/cjs/components/gateways/KlarnaGateway.d.ts +5 -0
- package/lib/cjs/components/gateways/KlarnaGateway.js +1 -0
- package/lib/cjs/components/gateways/PaypalGateway.d.ts +5 -0
- package/lib/cjs/components/gateways/PaypalGateway.js +1 -0
- package/lib/cjs/components/gateways/StripeGateway.d.ts +5 -0
- package/lib/cjs/components/gateways/StripeGateway.js +1 -0
- package/lib/cjs/components/gateways/WireTransferGateway.d.ts +5 -0
- package/lib/cjs/components/gateways/WireTransferGateway.js +1 -0
- package/lib/cjs/components/orders/AddToCartButton.d.ts +34 -0
- package/lib/cjs/components/orders/AddToCartButton.js +1 -0
- package/lib/cjs/components/orders/AdjustmentAmount.d.ts +18 -0
- package/lib/cjs/components/orders/AdjustmentAmount.js +1 -0
- package/lib/cjs/components/orders/CartLink.d.ts +12 -0
- package/lib/cjs/components/orders/CartLink.js +1 -0
- package/lib/cjs/components/orders/GiftCardAmount.d.ts +15 -0
- package/lib/cjs/components/orders/GiftCardAmount.js +1 -0
- package/lib/cjs/components/orders/OrderContainer.d.ts +26 -0
- package/lib/cjs/components/orders/OrderContainer.js +1 -0
- package/lib/cjs/components/orders/OrderList.d.ts +61 -0
- package/lib/cjs/components/orders/OrderList.js +1 -0
- package/lib/cjs/components/orders/OrderListRow.d.ts +30 -0
- package/lib/cjs/components/orders/OrderListRow.js +1 -0
- package/lib/cjs/components/orders/OrderNumber.d.ts +11 -0
- package/lib/cjs/components/orders/OrderNumber.js +1 -0
- package/lib/cjs/components/orders/OrderStorage.d.ts +16 -0
- package/lib/cjs/components/orders/OrderStorage.js +1 -0
- package/lib/cjs/components/orders/PlaceOrderButton.d.ts +24 -0
- package/lib/cjs/components/orders/PlaceOrderButton.js +1 -0
- package/lib/cjs/components/orders/PlaceOrderContainer.d.ts +14 -0
- package/lib/cjs/components/orders/PlaceOrderContainer.js +1 -0
- package/lib/cjs/components/orders/PrivacyAndTermsCheckbox.d.ts +10 -0
- package/lib/cjs/components/orders/PrivacyAndTermsCheckbox.js +1 -0
- package/lib/cjs/components/orders/SubTotalAmount.d.ts +18 -0
- package/lib/cjs/components/orders/SubTotalAmount.js +1 -0
- package/lib/cjs/components/orders/TaxesAmount.d.ts +18 -0
- package/lib/cjs/components/orders/TaxesAmount.js +1 -0
- package/lib/cjs/components/orders/TotalAmount.d.ts +18 -0
- package/lib/cjs/components/orders/TotalAmount.js +1 -0
- package/lib/cjs/components/shipments/Shipment.d.ts +15 -0
- package/lib/cjs/components/shipments/Shipment.js +1 -0
- package/lib/cjs/components/shipments/ShipmentField.d.ts +19 -0
- package/lib/cjs/components/shipments/ShipmentField.js +1 -0
- package/lib/cjs/components/shipments/ShipmentsContainer.d.ts +12 -0
- package/lib/cjs/components/shipments/ShipmentsContainer.js +1 -0
- package/lib/cjs/components/shipping_methods/ShippingMethod.d.ts +15 -0
- package/lib/cjs/components/shipping_methods/ShippingMethod.js +1 -0
- package/lib/cjs/components/shipping_methods/ShippingMethodName.d.ts +17 -0
- package/lib/cjs/components/shipping_methods/ShippingMethodName.js +1 -0
- package/lib/cjs/components/shipping_methods/ShippingMethodPrice.d.ts +25 -0
- package/lib/cjs/components/shipping_methods/ShippingMethodPrice.js +1 -0
- package/lib/cjs/components/shipping_methods/ShippingMethodRadioButton.d.ts +19 -0
- package/lib/cjs/components/shipping_methods/ShippingMethodRadioButton.js +1 -0
- package/lib/cjs/components/skus/SkuField.d.ts +14 -0
- package/lib/cjs/components/skus/SkuField.js +1 -0
- package/lib/cjs/components/skus/SkuList.d.ts +14 -0
- package/lib/cjs/components/skus/SkuList.js +1 -0
- package/lib/cjs/components/skus/SkuListsContainer.d.ts +12 -0
- package/lib/cjs/components/skus/SkuListsContainer.js +1 -0
- package/lib/cjs/components/skus/SkuOption.d.ts +14 -0
- package/lib/cjs/components/skus/SkuOption.js +1 -0
- package/lib/cjs/components/skus/SkuOptionInput.d.ts +15 -0
- package/lib/cjs/components/skus/SkuOptionInput.js +1 -0
- package/lib/cjs/components/skus/SkuOptionsContainer.d.ts +14 -0
- package/lib/cjs/components/skus/SkuOptionsContainer.js +1 -0
- package/lib/cjs/components/skus/Skus.d.ts +11 -0
- package/lib/cjs/components/skus/Skus.js +1 -0
- package/lib/cjs/components/skus/SkusContainer.d.ts +23 -0
- package/lib/cjs/components/skus/SkusContainer.js +1 -0
- package/lib/cjs/components/utils/AddressCardsTemplate.d.ts +27 -0
- package/lib/cjs/components/utils/AddressCardsTemplate.js +1 -0
- package/lib/{components → cjs/components}/utils/BaseField.d.ts +0 -0
- package/lib/cjs/components/utils/BaseField.js +1 -0
- package/lib/{components → cjs/components}/utils/BaseInput.d.ts +0 -0
- package/lib/cjs/components/utils/BaseInput.js +1 -0
- package/lib/{components → cjs/components}/utils/BaseOrderPrice.d.ts +0 -0
- package/lib/cjs/components/utils/BaseOrderPrice.js +1 -0
- package/lib/{components → cjs/components}/utils/BaseSelect.d.ts +0 -0
- package/lib/cjs/components/utils/BaseSelect.js +1 -0
- package/lib/cjs/components/utils/GenericFieldComponent.d.ts +42 -0
- package/lib/cjs/components/utils/GenericFieldComponent.js +1 -0
- package/lib/{components → cjs/components}/utils/Parent.d.ts +0 -0
- package/lib/cjs/components/utils/Parent.js +1 -0
- package/lib/{components → cjs/components}/utils/PaymentCardsTemplate.d.ts +0 -0
- package/lib/cjs/components/utils/PaymentCardsTemplate.js +1 -0
- package/lib/{components → cjs/components}/utils/PriceTemplate.d.ts +0 -0
- package/lib/cjs/components/utils/PriceTemplate.js +1 -0
- package/lib/{components → cjs/components}/utils/VariantTemplate.d.ts +0 -0
- package/lib/cjs/components/utils/VariantTemplate.js +1 -0
- package/lib/{components → cjs/components}/utils/getAllErrors.d.ts +0 -0
- package/lib/cjs/components/utils/getAllErrors.js +1 -0
- package/lib/cjs/config/components.d.ts +934 -0
- package/lib/cjs/config/components.js +1 -0
- package/lib/{config → cjs/config}/currency.d.ts +0 -0
- package/lib/cjs/config/currency.js +1 -0
- package/lib/cjs/context/AddressChildrenContext.d.ts +7 -0
- package/lib/cjs/context/AddressChildrenContext.js +1 -0
- package/lib/{context → cjs/context}/AddressContext.d.ts +0 -0
- package/lib/cjs/context/AddressContext.js +1 -0
- package/lib/{context → cjs/context}/AvailabilityContext.d.ts +0 -0
- package/lib/cjs/context/AvailabilityContext.js +1 -0
- package/lib/cjs/context/BillingAddressContext.d.ts +10 -0
- package/lib/cjs/context/BillingAddressContext.js +1 -0
- package/lib/cjs/context/BillingAddressFormContext.d.ts +25 -0
- package/lib/cjs/context/BillingAddressFormContext.js +1 -0
- package/lib/{context → cjs/context}/CommerceLayerContext.d.ts +0 -0
- package/lib/cjs/context/CommerceLayerContext.js +1 -0
- package/lib/cjs/context/CouponAndGiftCardFormContext.d.ts +9 -0
- package/lib/cjs/context/CouponAndGiftCardFormContext.js +1 -0
- package/lib/cjs/context/CustomerAddressFormContext.d.ts +20 -0
- package/lib/cjs/context/CustomerAddressFormContext.js +1 -0
- package/lib/cjs/context/CustomerContext.d.ts +22 -0
- package/lib/cjs/context/CustomerContext.js +1 -0
- package/lib/{context → cjs/context}/ExternalFunctionContext.d.ts +0 -0
- package/lib/cjs/context/ExternalFunctionContext.js +1 -0
- package/lib/{context → cjs/context}/GiftCardContext.d.ts +0 -0
- package/lib/cjs/context/GiftCardContext.js +1 -0
- package/lib/{context → cjs/context}/ItemContext.d.ts +0 -0
- package/lib/cjs/context/ItemContext.js +1 -0
- package/lib/{context → cjs/context}/LineItemChildrenContext.d.ts +0 -0
- package/lib/cjs/context/LineItemChildrenContext.js +1 -0
- package/lib/{context → cjs/context}/LineItemContext.d.ts +0 -0
- package/lib/cjs/context/LineItemContext.js +1 -0
- package/lib/{context → cjs/context}/LineItemOptionChildrenContext.d.ts +0 -0
- package/lib/cjs/context/LineItemOptionChildrenContext.js +1 -0
- package/lib/{context → cjs/context}/OrderContext.d.ts +0 -0
- package/lib/cjs/context/OrderContext.js +1 -0
- package/lib/cjs/context/OrderListChildrenContext.d.ts +60 -0
- package/lib/cjs/context/OrderListChildrenContext.js +1 -0
- package/lib/{context → cjs/context}/OrderStorageContext.d.ts +0 -0
- package/lib/cjs/context/OrderStorageContext.js +1 -0
- package/lib/{context → cjs/context}/PaymentMethodChildrenContext.d.ts +0 -0
- package/lib/cjs/context/PaymentMethodChildrenContext.js +1 -0
- package/lib/{context → cjs/context}/PaymentMethodContext.d.ts +0 -0
- package/lib/cjs/context/PaymentMethodContext.js +1 -0
- package/lib/{context → cjs/context}/PaymentSourceContext.d.ts +0 -0
- package/lib/cjs/context/PaymentSourceContext.js +1 -0
- package/lib/{context → cjs/context}/PlaceOrderContext.d.ts +0 -0
- package/lib/cjs/context/PlaceOrderContext.js +1 -0
- package/lib/{context → cjs/context}/PricesContext.d.ts +0 -0
- package/lib/cjs/context/PricesContext.js +1 -0
- package/lib/{context → cjs/context}/ShipmentChildrenContext.d.ts +0 -0
- package/lib/cjs/context/ShipmentChildrenContext.js +1 -0
- package/lib/{context → cjs/context}/ShipmentContext.d.ts +0 -0
- package/lib/cjs/context/ShipmentContext.js +1 -0
- package/lib/cjs/context/ShippingAddressContext.d.ts +10 -0
- package/lib/cjs/context/ShippingAddressContext.js +1 -0
- package/lib/{context → cjs/context}/ShippingAddressFormContext.d.ts +0 -0
- package/lib/cjs/context/ShippingAddressFormContext.js +1 -0
- package/lib/{context → cjs/context}/ShippingMethodChildrenContext.d.ts +0 -0
- package/lib/cjs/context/ShippingMethodChildrenContext.js +1 -0
- package/lib/{context → cjs/context}/SkuChildrenContext.d.ts +0 -0
- package/lib/cjs/context/SkuChildrenContext.js +1 -0
- package/lib/{context → cjs/context}/SkuContext.d.ts +0 -0
- package/lib/cjs/context/SkuContext.js +1 -0
- package/lib/{context → cjs/context}/SkuListsContext.d.ts +0 -0
- package/lib/cjs/context/SkuListsContext.js +1 -0
- package/lib/{context → cjs/context}/SkuOptionChildrenContext.d.ts +0 -0
- package/lib/cjs/context/SkuOptionChildrenContext.js +1 -0
- package/lib/{context → cjs/context}/SkuOptionsContext.d.ts +0 -0
- package/lib/cjs/context/SkuOptionsContext.js +1 -0
- package/lib/{context → cjs/context}/StockTransferChildrenContext.d.ts +0 -0
- package/lib/cjs/context/StockTransferChildrenContext.js +1 -0
- package/lib/{context → cjs/context}/VariantsContext.d.ts +0 -0
- package/lib/cjs/context/VariantsContext.js +1 -0
- package/lib/cjs/index.d.ts +107 -0
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/reducers/AddressReducer.d.ts +60 -0
- package/lib/cjs/reducers/AddressReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/AvailabilityReducer.d.ts +0 -0
- package/lib/cjs/reducers/AvailabilityReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/BillingAddressReducer.d.ts +0 -0
- package/lib/cjs/reducers/BillingAddressReducer.js +1 -0
- package/lib/cjs/reducers/CustomerReducer.d.ts +131 -0
- package/lib/cjs/reducers/CustomerReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/GiftCardReducer.d.ts +0 -0
- package/lib/cjs/reducers/GiftCardReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/ItemReducer.d.ts +0 -0
- package/lib/cjs/reducers/ItemReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/LineItemReducer.d.ts +0 -0
- package/lib/cjs/reducers/LineItemReducer.js +1 -0
- package/lib/cjs/reducers/OrderReducer.d.ts +147 -0
- package/lib/cjs/reducers/OrderReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/PaymentMethodReducer.d.ts +0 -0
- package/lib/cjs/reducers/PaymentMethodReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/PlaceOrderReducer.d.ts +0 -0
- package/lib/cjs/reducers/PlaceOrderReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/PriceReducer.d.ts +0 -0
- package/lib/cjs/reducers/PriceReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/ShipmentReducer.d.ts +0 -0
- package/lib/cjs/reducers/ShipmentReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/ShippingAddressReducer.d.ts +0 -0
- package/lib/cjs/reducers/ShippingAddressReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/SkuListsReducer.d.ts +0 -0
- package/lib/cjs/reducers/SkuListsReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/SkuOptionsReducer.d.ts +0 -0
- package/lib/cjs/reducers/SkuOptionsReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/SkuReducer.d.ts +0 -0
- package/lib/cjs/reducers/SkuReducer.js +1 -0
- package/lib/{reducers → cjs/reducers}/VariantReducer.d.ts +0 -0
- package/lib/cjs/reducers/VariantReducer.js +1 -0
- package/lib/cjs/typings/errors.d.ts +51 -0
- package/lib/cjs/typings/errors.js +1 -0
- package/lib/cjs/typings/index.d.ts +137 -0
- package/lib/cjs/typings/index.js +1 -0
- package/lib/{utils → cjs/utils}/PropsType.d.ts +0 -0
- package/lib/cjs/utils/PropsType.js +1 -0
- package/lib/cjs/utils/addressesManager.d.ts +28 -0
- package/lib/cjs/utils/addressesManager.js +1 -0
- package/lib/{utils → cjs/utils}/baseReducer.d.ts +0 -0
- package/lib/cjs/utils/baseReducer.js +1 -0
- package/lib/{utils → cjs/utils}/browserInfo.d.ts +0 -0
- package/lib/cjs/utils/browserInfo.js +1 -0
- package/lib/{utils → cjs/utils}/checkIncludeResource.d.ts +0 -0
- package/lib/cjs/utils/checkIncludeResource.js +1 -0
- package/lib/{utils → cjs/utils}/childrenTypes.d.ts +0 -0
- package/lib/cjs/utils/childrenTypes.js +1 -0
- package/lib/{utils → cjs/utils}/compareObjAttribute.d.ts +0 -0
- package/lib/cjs/utils/compareObjAttribute.js +1 -0
- package/lib/{utils → cjs/utils}/countryStateCity.d.ts +0 -0
- package/lib/cjs/utils/countryStateCity.js +1 -0
- package/lib/{utils → cjs/utils}/customMessages.d.ts +0 -0
- package/lib/cjs/utils/customMessages.js +1 -0
- package/lib/{utils → cjs/utils}/customerOrderOptions.d.ts +0 -0
- package/lib/cjs/utils/customerOrderOptions.js +1 -0
- package/lib/{utils → cjs/utils}/getAmount.d.ts +0 -0
- package/lib/cjs/utils/getAmount.js +1 -0
- package/lib/{utils → cjs/utils}/getCardDetails.d.ts +0 -0
- package/lib/cjs/utils/getCardDetails.js +1 -0
- package/lib/{utils → cjs/utils}/getCartLink.d.ts +0 -0
- package/lib/cjs/utils/getCartLink.js +1 -0
- package/lib/{utils → cjs/utils}/getCurrentItemKey.d.ts +0 -0
- package/lib/cjs/utils/getCurrentItemKey.js +1 -0
- package/lib/{utils → cjs/utils}/getErrors.d.ts +0 -0
- package/lib/cjs/utils/getErrors.js +1 -0
- package/lib/{utils → cjs/utils}/getLineItemsCount.d.ts +0 -0
- package/lib/cjs/utils/getLineItemsCount.js +1 -0
- package/lib/{utils → cjs/utils}/getLoaderComponent.d.ts +0 -0
- package/lib/cjs/utils/getLoaderComponent.js +1 -0
- package/lib/{utils → cjs/utils}/getPrices.d.ts +0 -0
- package/lib/cjs/utils/getPrices.js +1 -0
- package/lib/{utils → cjs/utils}/getSdk.d.ts +0 -0
- package/lib/cjs/utils/getSdk.js +1 -0
- package/lib/{utils → cjs/utils}/getSkus.d.ts +0 -0
- package/lib/cjs/utils/getSkus.js +1 -0
- package/lib/{utils → cjs/utils}/hooks/useExternalScript.d.ts +0 -0
- package/lib/cjs/utils/hooks/useExternalScript.js +1 -0
- package/lib/cjs/utils/icons.d.ts +3 -0
- package/lib/cjs/utils/icons.js +1 -0
- package/lib/cjs/utils/isDate.d.ts +1 -0
- package/lib/cjs/utils/isDate.js +1 -0
- package/lib/{utils → cjs/utils}/isEmptyStates.d.ts +0 -0
- package/lib/cjs/utils/isEmptyStates.js +1 -0
- package/lib/{utils → cjs/utils}/isJSON.d.ts +0 -0
- package/lib/cjs/utils/isJSON.js +1 -0
- package/lib/cjs/utils/jwt.d.ts +27 -0
- package/lib/cjs/utils/jwt.js +1 -0
- package/lib/{utils → cjs/utils}/localStorage.d.ts +0 -0
- package/lib/cjs/utils/localStorage.js +1 -0
- package/lib/{utils → cjs/utils}/organization.d.ts +0 -0
- package/lib/cjs/utils/organization.js +1 -0
- package/lib/{utils → cjs/utils}/paypalPayment.d.ts +0 -0
- package/lib/cjs/utils/paypalPayment.js +1 -0
- package/lib/{utils → cjs/utils}/placeholderImages.d.ts +0 -0
- package/lib/cjs/utils/placeholderImages.js +1 -0
- package/lib/{utils → cjs/utils}/promisify.d.ts +0 -0
- package/lib/cjs/utils/promisify.js +1 -0
- package/lib/cjs/utils/scrollbarWidth.d.ts +1 -0
- package/lib/cjs/utils/scrollbarWidth.js +1 -0
- package/lib/{utils → cjs/utils}/shipments.d.ts +0 -0
- package/lib/cjs/utils/shipments.js +1 -0
- package/lib/{utils → cjs/utils}/validateFormFields.d.ts +0 -0
- package/lib/cjs/utils/validateFormFields.js +1 -0
- package/lib/esm/components/AdjustmentAmount.d.ts +4 -0
- package/lib/esm/components/AdjustmentAmount.js +1 -0
- package/lib/esm/components/AdyenPayment.d.ts +25 -0
- package/lib/esm/components/AdyenPayment.js +1 -0
- package/lib/esm/components/AvailabilityContainer.d.ts +14 -0
- package/lib/esm/components/AvailabilityContainer.js +1 -0
- package/lib/esm/components/AvailabilityTemplate.d.ts +24 -0
- package/lib/esm/components/AvailabilityTemplate.js +1 -0
- package/lib/esm/components/BillingAddressContainer.d.ts +11 -0
- package/lib/esm/components/BillingAddressContainer.js +1 -0
- package/lib/esm/components/BillingAddressForm.d.ts +13 -0
- package/lib/esm/components/BillingAddressForm.js +1 -0
- package/lib/esm/components/BraintreePayment.d.ts +30 -0
- package/lib/esm/components/BraintreePayment.js +1 -0
- package/lib/esm/components/CartLink.d.ts +12 -0
- package/lib/esm/components/CartLink.js +1 -0
- package/lib/esm/components/CheckoutComPayment.d.ts +23 -0
- package/lib/esm/components/CheckoutComPayment.js +1 -0
- package/lib/esm/components/CheckoutLink.d.ts +23 -0
- package/lib/esm/components/CheckoutLink.js +1 -0
- package/lib/esm/components/DeliveryLeadTime.d.ts +17 -0
- package/lib/esm/components/DeliveryLeadTime.js +1 -0
- package/lib/esm/components/DiscountAmount.d.ts +18 -0
- package/lib/esm/components/DiscountAmount.js +1 -0
- package/lib/esm/components/Errors.d.ts +5 -0
- package/lib/esm/components/Errors.js +1 -0
- package/lib/esm/components/ExternalFunction.d.ts +14 -0
- package/lib/esm/components/ExternalFunction.js +1 -0
- package/lib/esm/components/GiftCard.d.ts +18 -0
- package/lib/esm/components/GiftCard.js +1 -0
- package/lib/esm/components/GiftCardContainer.d.ts +12 -0
- package/lib/esm/components/GiftCardContainer.js +1 -0
- package/lib/esm/components/GiftCardCurrencySelector.d.ts +22 -0
- package/lib/esm/components/GiftCardCurrencySelector.js +1 -0
- package/lib/esm/components/GiftCardInput.d.ts +16 -0
- package/lib/esm/components/GiftCardInput.js +1 -0
- package/lib/esm/components/GiftCardOrCouponCode.d.ts +24 -0
- package/lib/esm/components/GiftCardOrCouponCode.js +1 -0
- package/lib/esm/components/GiftCardOrCouponForm.d.ts +15 -0
- package/lib/esm/components/GiftCardOrCouponForm.js +1 -0
- package/lib/esm/components/GiftCardOrCouponInput.d.ts +19 -0
- package/lib/esm/components/GiftCardOrCouponInput.js +1 -0
- package/lib/esm/components/GiftCardOrCouponRemoveButton.d.ts +26 -0
- package/lib/esm/components/GiftCardOrCouponRemoveButton.js +1 -0
- package/lib/esm/components/GiftCardOrCouponSubmit.d.ts +16 -0
- package/lib/esm/components/GiftCardOrCouponSubmit.js +1 -0
- package/lib/esm/components/GiftCardRecipient.d.ts +0 -0
- package/lib/esm/components/GiftCardRecipient.js +1 -0
- package/lib/esm/components/GiftCardRecipientInput.d.ts +0 -0
- package/lib/esm/components/GiftCardRecipientInput.js +1 -0
- package/lib/esm/components/ItemContainer.d.ts +22 -0
- package/lib/esm/components/ItemContainer.js +1 -0
- package/lib/esm/components/KlarnaPayment.d.ts +10 -0
- package/lib/esm/components/KlarnaPayment.js +1 -0
- package/lib/esm/components/LineItem.d.ts +15 -0
- package/lib/esm/components/LineItem.js +1 -0
- package/lib/esm/components/LineItemAmount.d.ts +20 -0
- package/lib/esm/components/LineItemAmount.js +1 -0
- package/lib/esm/components/LineItemCode.d.ts +18 -0
- package/lib/esm/components/LineItemCode.js +1 -0
- package/lib/esm/components/LineItemImage.d.ts +23 -0
- package/lib/esm/components/LineItemImage.js +1 -0
- package/lib/esm/components/LineItemName.d.ts +17 -0
- package/lib/esm/components/LineItemName.js +1 -0
- package/lib/esm/components/LineItemOption.d.ts +30 -0
- package/lib/esm/components/LineItemOption.js +1 -0
- package/lib/esm/components/LineItemOptions.d.ts +19 -0
- package/lib/esm/components/LineItemOptions.js +1 -0
- package/lib/esm/components/LineItemQuantity.d.ts +26 -0
- package/lib/esm/components/LineItemQuantity.js +1 -0
- package/lib/esm/components/LineItemRemoveLink.d.ts +22 -0
- package/lib/esm/components/LineItemRemoveLink.js +1 -0
- package/lib/esm/components/LineItemsContainer.d.ts +20 -0
- package/lib/esm/components/LineItemsContainer.js +1 -0
- package/lib/esm/components/LineItemsCount.d.ts +22 -0
- package/lib/esm/components/LineItemsCount.js +1 -0
- package/lib/esm/components/LineItemsEmpty.d.ts +23 -0
- package/lib/esm/components/LineItemsEmpty.js +1 -0
- package/lib/esm/components/MetadataInput.d.ts +15 -0
- package/lib/esm/components/MetadataInput.js +1 -0
- package/lib/esm/components/PaymentGateway.d.ts +16 -0
- package/lib/esm/components/PaymentGateway.js +1 -0
- package/lib/esm/components/PaymentMethod.d.ts +22 -0
- package/lib/esm/components/PaymentMethod.js +1 -0
- package/lib/esm/components/PaymentMethodAmount.d.ts +18 -0
- package/lib/esm/components/PaymentMethodAmount.js +1 -0
- package/lib/esm/components/PaymentMethodName.d.ts +15 -0
- package/lib/esm/components/PaymentMethodName.js +1 -0
- package/lib/esm/components/PaymentMethodPrice.d.ts +20 -0
- package/lib/esm/components/PaymentMethodPrice.js +1 -0
- package/lib/esm/components/PaymentMethodRadioButton.d.ts +18 -0
- package/lib/esm/components/PaymentMethodRadioButton.js +1 -0
- package/lib/esm/components/PaymentMethodsContainer.d.ts +14 -0
- package/lib/esm/components/PaymentMethodsContainer.js +1 -0
- package/lib/esm/components/PaymentSource.d.ts +26 -0
- package/lib/esm/components/PaymentSource.js +1 -0
- package/lib/esm/components/PaymentSourceBrandIcon.d.ts +25 -0
- package/lib/esm/components/PaymentSourceBrandIcon.js +1 -0
- package/lib/esm/components/PaymentSourceBrandName.d.ts +19 -0
- package/lib/esm/components/PaymentSourceBrandName.js +1 -0
- package/lib/esm/components/PaymentSourceDetail.d.ts +18 -0
- package/lib/esm/components/PaymentSourceDetail.js +1 -0
- package/lib/esm/components/PaymentSourceEditButton.d.ts +16 -0
- package/lib/esm/components/PaymentSourceEditButton.js +1 -0
- package/lib/esm/components/PaypalPayment.d.ts +12 -0
- package/lib/esm/components/PaypalPayment.js +1 -0
- package/lib/esm/components/Price.d.ts +28 -0
- package/lib/esm/components/Price.js +1 -0
- package/lib/esm/components/PricesContainer.d.ts +27 -0
- package/lib/esm/components/PricesContainer.js +1 -0
- package/lib/esm/components/QuantitySelector.d.ts +31 -0
- package/lib/esm/components/QuantitySelector.js +1 -0
- package/lib/esm/components/SaveAddressesButton.d.ts +23 -0
- package/lib/esm/components/SaveAddressesButton.js +1 -0
- package/lib/esm/components/SaveCustomerButton.d.ts +24 -0
- package/lib/esm/components/SaveCustomerButton.js +1 -0
- package/lib/esm/components/ShippingAddressContainer.d.ts +11 -0
- package/lib/esm/components/ShippingAddressContainer.js +1 -0
- package/lib/esm/components/ShippingAddressForm.d.ts +13 -0
- package/lib/esm/components/ShippingAddressForm.js +1 -0
- package/lib/esm/components/ShippingAmount.d.ts +15 -0
- package/lib/esm/components/ShippingAmount.js +1 -0
- package/lib/esm/components/SkuField.d.ts +10 -0
- package/lib/esm/components/SkuField.js +1 -0
- package/lib/esm/components/Skus.d.ts +11 -0
- package/lib/esm/components/Skus.js +1 -0
- package/lib/esm/components/SkusContainer.d.ts +14 -0
- package/lib/esm/components/SkusContainer.js +1 -0
- package/lib/esm/components/StockTransfer.d.ts +12 -0
- package/lib/esm/components/StockTransfer.js +1 -0
- package/lib/esm/components/StockTransferField.d.ts +10 -0
- package/lib/esm/components/StockTransferField.js +1 -0
- package/lib/esm/components/StripePayment.d.ts +18 -0
- package/lib/esm/components/StripePayment.js +1 -0
- package/lib/esm/components/SubmitButton.d.ts +19 -0
- package/lib/esm/components/SubmitButton.js +1 -0
- package/lib/esm/components/VariantSelector.d.ts +52 -0
- package/lib/esm/components/VariantSelector.js +1 -0
- package/lib/esm/components/VariantsContainer.d.ts +20 -0
- package/lib/esm/components/VariantsContainer.js +1 -0
- package/lib/esm/components/WireTransferPayment.d.ts +10 -0
- package/lib/esm/components/WireTransferPayment.js +1 -0
- package/lib/esm/components/addresses/Address.d.ts +18 -0
- package/lib/esm/components/addresses/Address.js +1 -0
- package/lib/esm/components/addresses/AddressCountrySelector.d.ts +26 -0
- package/lib/esm/components/addresses/AddressCountrySelector.js +1 -0
- package/lib/esm/components/addresses/AddressField.d.ts +43 -0
- package/lib/esm/components/addresses/AddressField.js +1 -0
- package/lib/esm/components/addresses/AddressInput.d.ts +19 -0
- package/lib/esm/components/addresses/AddressInput.js +1 -0
- package/lib/esm/components/addresses/AddressStateSelector.d.ts +27 -0
- package/lib/esm/components/addresses/AddressStateSelector.js +1 -0
- package/lib/esm/components/addresses/AddressesContainer.d.ts +15 -0
- package/lib/esm/components/addresses/AddressesContainer.js +1 -0
- package/lib/esm/components/auth/CommerceLayer.d.ts +15 -0
- package/lib/esm/components/auth/CommerceLayer.js +1 -0
- package/lib/esm/components/customers/CustomerAddressForm.d.ts +13 -0
- package/lib/esm/components/customers/CustomerAddressForm.js +1 -0
- package/lib/esm/components/customers/CustomerContainer.d.ts +10 -0
- package/lib/esm/components/customers/CustomerContainer.js +1 -0
- package/lib/esm/components/customers/CustomerField.d.ts +10 -0
- package/lib/esm/components/customers/CustomerField.js +1 -0
- package/lib/esm/components/customers/CustomerInput.d.ts +23 -0
- package/lib/esm/components/customers/CustomerInput.js +1 -0
- package/lib/esm/components/gateways/AdyenGateway.d.ts +5 -0
- package/lib/esm/components/gateways/AdyenGateway.js +1 -0
- package/lib/esm/components/gateways/BraintreeGateway.d.ts +5 -0
- package/lib/esm/components/gateways/BraintreeGateway.js +1 -0
- package/lib/esm/components/gateways/CheckoutComGateway.d.ts +5 -0
- package/lib/esm/components/gateways/CheckoutComGateway.js +1 -0
- package/lib/esm/components/gateways/KlarnaGateway.d.ts +5 -0
- package/lib/esm/components/gateways/KlarnaGateway.js +1 -0
- package/lib/esm/components/gateways/PaypalGateway.d.ts +5 -0
- package/lib/esm/components/gateways/PaypalGateway.js +1 -0
- package/lib/esm/components/gateways/StripeGateway.d.ts +5 -0
- package/lib/esm/components/gateways/StripeGateway.js +1 -0
- package/lib/esm/components/gateways/WireTransferGateway.d.ts +5 -0
- package/lib/esm/components/gateways/WireTransferGateway.js +1 -0
- package/lib/esm/components/orders/AddToCartButton.d.ts +34 -0
- package/lib/esm/components/orders/AddToCartButton.js +1 -0
- package/lib/esm/components/orders/AdjustmentAmount.d.ts +18 -0
- package/lib/esm/components/orders/AdjustmentAmount.js +1 -0
- package/lib/esm/components/orders/CartLink.d.ts +12 -0
- package/lib/esm/components/orders/CartLink.js +1 -0
- package/lib/esm/components/orders/GiftCardAmount.d.ts +15 -0
- package/lib/esm/components/orders/GiftCardAmount.js +1 -0
- package/lib/esm/components/orders/OrderContainer.d.ts +26 -0
- package/lib/esm/components/orders/OrderContainer.js +1 -0
- package/lib/esm/components/orders/OrderList.d.ts +61 -0
- package/lib/esm/components/orders/OrderList.js +1 -0
- package/lib/esm/components/orders/OrderListRow.d.ts +30 -0
- package/lib/esm/components/orders/OrderListRow.js +1 -0
- package/lib/esm/components/orders/OrderNumber.d.ts +11 -0
- package/lib/esm/components/orders/OrderNumber.js +1 -0
- package/lib/esm/components/orders/OrderStorage.d.ts +16 -0
- package/lib/esm/components/orders/OrderStorage.js +1 -0
- package/lib/esm/components/orders/PlaceOrderButton.d.ts +24 -0
- package/lib/esm/components/orders/PlaceOrderButton.js +1 -0
- package/lib/esm/components/orders/PlaceOrderContainer.d.ts +14 -0
- package/lib/esm/components/orders/PlaceOrderContainer.js +1 -0
- package/lib/esm/components/orders/PrivacyAndTermsCheckbox.d.ts +10 -0
- package/lib/esm/components/orders/PrivacyAndTermsCheckbox.js +1 -0
- package/lib/esm/components/orders/SubTotalAmount.d.ts +18 -0
- package/lib/esm/components/orders/SubTotalAmount.js +1 -0
- package/lib/esm/components/orders/TaxesAmount.d.ts +18 -0
- package/lib/esm/components/orders/TaxesAmount.js +1 -0
- package/lib/esm/components/orders/TotalAmount.d.ts +18 -0
- package/lib/esm/components/orders/TotalAmount.js +1 -0
- package/lib/esm/components/shipments/Shipment.d.ts +15 -0
- package/lib/esm/components/shipments/Shipment.js +1 -0
- package/lib/esm/components/shipments/ShipmentField.d.ts +19 -0
- package/lib/esm/components/shipments/ShipmentField.js +1 -0
- package/lib/esm/components/shipments/ShipmentsContainer.d.ts +12 -0
- package/lib/esm/components/shipments/ShipmentsContainer.js +1 -0
- package/lib/esm/components/shipping_methods/ShippingMethod.d.ts +15 -0
- package/lib/esm/components/shipping_methods/ShippingMethod.js +1 -0
- package/lib/esm/components/shipping_methods/ShippingMethodName.d.ts +17 -0
- package/lib/esm/components/shipping_methods/ShippingMethodName.js +1 -0
- package/lib/esm/components/shipping_methods/ShippingMethodPrice.d.ts +25 -0
- package/lib/esm/components/shipping_methods/ShippingMethodPrice.js +1 -0
- package/lib/esm/components/shipping_methods/ShippingMethodRadioButton.d.ts +19 -0
- package/lib/esm/components/shipping_methods/ShippingMethodRadioButton.js +1 -0
- package/lib/esm/components/skus/SkuField.d.ts +14 -0
- package/lib/esm/components/skus/SkuField.js +1 -0
- package/lib/esm/components/skus/SkuList.d.ts +14 -0
- package/lib/esm/components/skus/SkuList.js +1 -0
- package/lib/esm/components/skus/SkuListsContainer.d.ts +12 -0
- package/lib/esm/components/skus/SkuListsContainer.js +1 -0
- package/lib/esm/components/skus/SkuOption.d.ts +14 -0
- package/lib/esm/components/skus/SkuOption.js +1 -0
- package/lib/esm/components/skus/SkuOptionInput.d.ts +15 -0
- package/lib/esm/components/skus/SkuOptionInput.js +1 -0
- package/lib/esm/components/skus/SkuOptionsContainer.d.ts +14 -0
- package/lib/esm/components/skus/SkuOptionsContainer.js +1 -0
- package/lib/esm/components/skus/Skus.d.ts +11 -0
- package/lib/esm/components/skus/Skus.js +1 -0
- package/lib/esm/components/skus/SkusContainer.d.ts +23 -0
- package/lib/esm/components/skus/SkusContainer.js +1 -0
- package/lib/esm/components/utils/AddressCardsTemplate.d.ts +27 -0
- package/lib/esm/components/utils/AddressCardsTemplate.js +1 -0
- package/lib/esm/components/utils/BaseField.d.ts +8 -0
- package/lib/esm/components/utils/BaseField.js +1 -0
- package/lib/esm/components/utils/BaseInput.d.ts +5 -0
- package/lib/esm/components/utils/BaseInput.js +1 -0
- package/lib/esm/components/utils/BaseOrderPrice.d.ts +6 -0
- package/lib/esm/components/utils/BaseOrderPrice.js +1 -0
- package/lib/esm/components/utils/BaseSelect.d.ts +5 -0
- package/lib/esm/components/utils/BaseSelect.js +1 -0
- package/lib/esm/components/utils/GenericFieldComponent.d.ts +42 -0
- package/lib/esm/components/utils/GenericFieldComponent.js +1 -0
- package/lib/esm/components/utils/Parent.d.ts +6 -0
- package/lib/esm/components/utils/Parent.js +1 -0
- package/lib/esm/components/utils/PaymentCardsTemplate.d.ts +23 -0
- package/lib/esm/components/utils/PaymentCardsTemplate.js +1 -0
- package/lib/esm/components/utils/PriceTemplate.d.ts +8 -0
- package/lib/esm/components/utils/PriceTemplate.js +1 -0
- package/lib/esm/components/utils/VariantTemplate.d.ts +36 -0
- package/lib/esm/components/utils/VariantTemplate.js +1 -0
- package/lib/esm/components/utils/getAllErrors.d.ts +17 -0
- package/lib/esm/components/utils/getAllErrors.js +1 -0
- package/lib/esm/config/components.d.ts +934 -0
- package/lib/esm/config/components.js +1 -0
- package/lib/esm/config/currency.d.ts +5 -0
- package/lib/{config → esm/config}/currency.js +0 -0
- package/lib/esm/context/AddressChildrenContext.d.ts +7 -0
- package/lib/esm/context/AddressChildrenContext.js +1 -0
- package/lib/esm/context/AddressContext.d.ts +17 -0
- package/lib/{context → esm/context}/AddressContext.js +0 -0
- package/lib/esm/context/AvailabilityContext.d.ts +3 -0
- package/lib/{context → esm/context}/AvailabilityContext.js +0 -0
- package/lib/esm/context/BillingAddressContext.d.ts +10 -0
- package/lib/esm/context/BillingAddressContext.js +1 -0
- package/lib/esm/context/BillingAddressFormContext.d.ts +25 -0
- package/lib/{context → esm/context}/BillingAddressFormContext.js +0 -0
- package/lib/esm/context/CommerceLayerContext.d.ts +7 -0
- package/lib/{context → esm/context}/CommerceLayerContext.js +0 -0
- package/lib/esm/context/CouponAndGiftCardFormContext.d.ts +9 -0
- package/lib/{context → esm/context}/CouponAndGiftCardFormContext.js +0 -0
- package/lib/esm/context/CustomerAddressFormContext.d.ts +20 -0
- package/lib/esm/context/CustomerAddressFormContext.js +1 -0
- package/lib/esm/context/CustomerContext.d.ts +22 -0
- package/lib/esm/context/CustomerContext.js +1 -0
- package/lib/esm/context/ExternalFunctionContext.d.ts +12 -0
- package/lib/{context → esm/context}/ExternalFunctionContext.js +0 -0
- package/lib/esm/context/GiftCardContext.d.ts +11 -0
- package/lib/{context → esm/context}/GiftCardContext.js +0 -0
- package/lib/esm/context/ItemContext.d.ts +13 -0
- package/lib/{context → esm/context}/ItemContext.js +0 -0
- package/lib/esm/context/LineItemChildrenContext.d.ts +9 -0
- package/lib/{context → esm/context}/LineItemChildrenContext.js +0 -0
- package/lib/esm/context/LineItemContext.d.ts +8 -0
- package/lib/{context → esm/context}/LineItemContext.js +0 -0
- package/lib/esm/context/LineItemOptionChildrenContext.d.ts +8 -0
- package/lib/{context → esm/context}/LineItemOptionChildrenContext.js +0 -0
- package/lib/esm/context/OrderContext.d.ts +30 -0
- package/lib/{context → esm/context}/OrderContext.js +0 -0
- package/lib/esm/context/OrderListChildrenContext.d.ts +60 -0
- package/lib/esm/context/OrderListChildrenContext.js +1 -0
- package/lib/esm/context/OrderStorageContext.d.ts +11 -0
- package/lib/{context → esm/context}/OrderStorageContext.js +0 -0
- package/lib/esm/context/PaymentMethodChildrenContext.d.ts +10 -0
- package/lib/{context → esm/context}/PaymentMethodChildrenContext.js +0 -0
- package/lib/esm/context/PaymentMethodContext.d.ts +23 -0
- package/lib/{context → esm/context}/PaymentMethodContext.js +0 -0
- package/lib/esm/context/PaymentSourceContext.d.ts +14 -0
- package/lib/{context → esm/context}/PaymentSourceContext.js +0 -0
- package/lib/esm/context/PlaceOrderContext.d.ts +18 -0
- package/lib/{context → esm/context}/PlaceOrderContext.js +0 -0
- package/lib/esm/context/PricesContext.d.ts +7 -0
- package/lib/{context → esm/context}/PricesContext.js +0 -0
- package/lib/esm/context/ShipmentChildrenContext.d.ts +13 -0
- package/lib/{context → esm/context}/ShipmentChildrenContext.js +0 -0
- package/lib/esm/context/ShipmentContext.d.ts +12 -0
- package/lib/{context → esm/context}/ShipmentContext.js +0 -0
- package/lib/esm/context/ShippingAddressContext.d.ts +10 -0
- package/lib/{context → esm/context}/ShippingAddressContext.js +0 -0
- package/lib/esm/context/ShippingAddressFormContext.d.ts +4 -0
- package/lib/{context → esm/context}/ShippingAddressFormContext.js +0 -0
- package/lib/esm/context/ShippingMethodChildrenContext.d.ts +10 -0
- package/lib/{context → esm/context}/ShippingMethodChildrenContext.js +0 -0
- package/lib/esm/context/SkuChildrenContext.d.ts +9 -0
- package/lib/{context → esm/context}/SkuChildrenContext.js +0 -0
- package/lib/esm/context/SkuContext.d.ts +9 -0
- package/lib/{context → esm/context}/SkuContext.js +0 -0
- package/lib/esm/context/SkuListsContext.d.ts +6 -0
- package/lib/{context → esm/context}/SkuListsContext.js +0 -0
- package/lib/esm/context/SkuOptionChildrenContext.d.ts +8 -0
- package/lib/{context → esm/context}/SkuOptionChildrenContext.js +0 -0
- package/lib/esm/context/SkuOptionsContext.d.ts +3 -0
- package/lib/{context → esm/context}/SkuOptionsContext.js +0 -0
- package/lib/esm/context/StockTransferChildrenContext.d.ts +7 -0
- package/lib/{context → esm/context}/StockTransferChildrenContext.js +0 -0
- package/lib/esm/context/VariantsContext.d.ts +3 -0
- package/lib/{context → esm/context}/VariantsContext.js +0 -0
- package/lib/esm/index.d.ts +107 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/reducers/AddressReducer.d.ts +60 -0
- package/lib/esm/reducers/AddressReducer.js +1 -0
- package/lib/esm/reducers/AvailabilityReducer.d.ts +61 -0
- package/lib/esm/reducers/AvailabilityReducer.js +1 -0
- package/lib/esm/reducers/BillingAddressReducer.d.ts +31 -0
- package/lib/esm/reducers/BillingAddressReducer.js +1 -0
- package/lib/esm/reducers/CustomerReducer.d.ts +131 -0
- package/lib/esm/reducers/CustomerReducer.js +1 -0
- package/lib/esm/reducers/GiftCardReducer.d.ts +76 -0
- package/lib/esm/reducers/GiftCardReducer.js +1 -0
- package/lib/esm/reducers/ItemReducer.d.ts +69 -0
- package/lib/{reducers → esm/reducers}/ItemReducer.js +0 -0
- package/lib/esm/reducers/LineItemReducer.d.ts +52 -0
- package/lib/esm/reducers/LineItemReducer.js +1 -0
- package/lib/esm/reducers/OrderReducer.d.ts +147 -0
- package/lib/esm/reducers/OrderReducer.js +1 -0
- package/lib/esm/reducers/PaymentMethodReducer.d.ts +151 -0
- package/lib/esm/reducers/PaymentMethodReducer.js +1 -0
- package/lib/esm/reducers/PlaceOrderReducer.d.ts +59 -0
- package/lib/esm/reducers/PlaceOrderReducer.js +1 -0
- package/lib/esm/reducers/PriceReducer.d.ts +44 -0
- package/lib/esm/reducers/PriceReducer.js +1 -0
- package/lib/esm/reducers/ShipmentReducer.d.ts +40 -0
- package/lib/{reducers → esm/reducers}/ShipmentReducer.js +0 -0
- package/lib/esm/reducers/ShippingAddressReducer.d.ts +32 -0
- package/lib/esm/reducers/ShippingAddressReducer.js +1 -0
- package/lib/esm/reducers/SkuListsReducer.d.ts +21 -0
- package/lib/{reducers → esm/reducers}/SkuListsReducer.js +0 -0
- package/lib/esm/reducers/SkuOptionsReducer.d.ts +26 -0
- package/lib/{reducers → esm/reducers}/SkuOptionsReducer.js +0 -0
- package/lib/esm/reducers/SkuReducer.d.ts +21 -0
- package/lib/esm/reducers/SkuReducer.js +1 -0
- package/lib/esm/reducers/VariantReducer.d.ts +72 -0
- package/lib/esm/reducers/VariantReducer.js +1 -0
- package/lib/esm/typings/errors.d.ts +51 -0
- package/lib/esm/typings/errors.js +1 -0
- package/lib/esm/typings/index.d.ts +137 -0
- package/lib/esm/typings/index.js +1 -0
- package/lib/esm/utils/PropsType.d.ts +33 -0
- package/lib/{utils → esm/utils}/PropsType.js +0 -0
- package/lib/esm/utils/addressesManager.d.ts +28 -0
- package/lib/esm/utils/addressesManager.js +1 -0
- package/lib/esm/utils/baseReducer.d.ts +3 -0
- package/lib/esm/utils/baseReducer.js +1 -0
- package/lib/esm/utils/browserInfo.d.ts +9 -0
- package/lib/{utils → esm/utils}/browserInfo.js +0 -0
- package/lib/esm/utils/checkIncludeResource.d.ts +8 -0
- package/lib/esm/utils/checkIncludeResource.js +1 -0
- package/lib/esm/utils/childrenTypes.d.ts +9 -0
- package/lib/esm/utils/childrenTypes.js +1 -0
- package/lib/esm/utils/compareObjAttribute.d.ts +7 -0
- package/lib/{utils → esm/utils}/compareObjAttribute.js +0 -0
- package/lib/esm/utils/countryStateCity.d.ts +9 -0
- package/lib/{utils → esm/utils}/countryStateCity.js +0 -0
- package/lib/esm/utils/customMessages.d.ts +2 -0
- package/lib/{utils → esm/utils}/customMessages.js +0 -0
- package/lib/esm/utils/customerOrderOptions.d.ts +3 -0
- package/lib/{utils → esm/utils}/customerOrderOptions.js +0 -0
- package/lib/esm/utils/getAmount.d.ts +9 -0
- package/lib/{utils → esm/utils}/getAmount.js +0 -0
- package/lib/esm/utils/getCardDetails.d.ts +15 -0
- package/lib/esm/utils/getCardDetails.js +1 -0
- package/lib/esm/utils/getCartLink.d.ts +7 -0
- package/lib/{utils → esm/utils}/getCartLink.js +0 -0
- package/lib/esm/utils/getCurrentItemKey.d.ts +6 -0
- package/lib/{utils → esm/utils}/getCurrentItemKey.js +0 -0
- package/lib/esm/utils/getErrors.d.ts +11 -0
- package/lib/esm/utils/getErrors.js +1 -0
- package/lib/esm/utils/getLineItemsCount.d.ts +10 -0
- package/lib/esm/utils/getLineItemsCount.js +1 -0
- package/lib/esm/utils/getLoaderComponent.d.ts +3 -0
- package/lib/{utils → esm/utils}/getLoaderComponent.js +0 -0
- package/lib/esm/utils/getPrices.d.ts +17 -0
- package/lib/esm/utils/getPrices.js +1 -0
- package/lib/esm/utils/getSdk.d.ts +3 -0
- package/lib/esm/utils/getSdk.js +1 -0
- package/lib/esm/utils/getSkus.d.ts +3 -0
- package/lib/esm/utils/getSkus.js +1 -0
- package/lib/esm/utils/hooks/useExternalScript.d.ts +1 -0
- package/lib/{utils → esm/utils}/hooks/useExternalScript.js +0 -0
- package/lib/esm/utils/icons.d.ts +3 -0
- package/lib/esm/utils/icons.js +1 -0
- package/lib/esm/utils/isDate.d.ts +1 -0
- package/lib/esm/utils/isDate.js +1 -0
- package/lib/esm/utils/isEmptyStates.d.ts +1 -0
- package/lib/{utils → esm/utils}/isEmptyStates.js +0 -0
- package/lib/esm/utils/isJSON.d.ts +1 -0
- package/lib/{utils → esm/utils}/isJSON.js +0 -0
- package/lib/esm/utils/jwt.d.ts +27 -0
- package/lib/{utils → esm/utils}/jwt.js +0 -0
- package/lib/esm/utils/localStorage.d.ts +17 -0
- package/lib/{utils → esm/utils}/localStorage.js +0 -0
- package/lib/esm/utils/organization.d.ts +6 -0
- package/lib/{utils → esm/utils}/organization.js +0 -0
- package/lib/esm/utils/paypalPayment.d.ts +3 -0
- package/lib/{utils → esm/utils}/paypalPayment.js +0 -0
- package/lib/esm/utils/placeholderImages.d.ts +2 -0
- package/lib/{utils → esm/utils}/placeholderImages.js +0 -0
- package/lib/esm/utils/promisify.d.ts +1 -0
- package/lib/esm/utils/promisify.js +1 -0
- package/lib/esm/utils/scrollbarWidth.d.ts +1 -0
- package/lib/esm/utils/scrollbarWidth.js +1 -0
- package/lib/esm/utils/shipments.d.ts +3 -0
- package/lib/esm/utils/shipments.js +1 -0
- package/lib/esm/utils/validateFormFields.d.ts +22 -0
- package/lib/esm/utils/validateFormFields.js +1 -0
- package/lib/tsconfig.prod.esm.tsbuildinfo +1 -0
- package/lib/tsconfig.prod.tsbuildinfo +1 -0
- package/package.json +103 -46
- package/lib/components/AddToCartButton.d.ts +0 -34
- package/lib/components/AddToCartButton.js +0 -1
- package/lib/components/Address.d.ts +0 -13
- package/lib/components/Address.js +0 -1
- package/lib/components/AddressCountrySelector.d.ts +0 -9
- package/lib/components/AddressCountrySelector.js +0 -1
- package/lib/components/AddressField.d.ts +0 -15
- package/lib/components/AddressField.js +0 -1
- package/lib/components/AddressInput.d.ts +0 -7
- package/lib/components/AddressInput.js +0 -1
- package/lib/components/AddressStateSelector.d.ts +0 -11
- package/lib/components/AddressStateSelector.js +0 -1
- package/lib/components/AddressesContainer.d.ts +0 -8
- package/lib/components/AddressesContainer.js +0 -1
- package/lib/components/AdjustmentAmount.js +0 -1
- package/lib/components/AdyenPayment.d.ts +0 -25
- package/lib/components/AdyenPayment.js +0 -1
- package/lib/components/AvailabilityContainer.d.ts +0 -7
- package/lib/components/AvailabilityContainer.js +0 -1
- package/lib/components/AvailabilityTemplate.d.ts +0 -15
- package/lib/components/AvailabilityTemplate.js +0 -1
- package/lib/components/BillingAddressContainer.d.ts +0 -6
- package/lib/components/BillingAddressContainer.js +0 -1
- package/lib/components/BillingAddressForm.d.ts +0 -8
- package/lib/components/BillingAddressForm.js +0 -1
- package/lib/components/BraintreePayment.d.ts +0 -30
- package/lib/components/BraintreePayment.js +0 -1
- package/lib/components/CartLink.js +0 -1
- package/lib/components/CheckoutComPayment.d.ts +0 -23
- package/lib/components/CheckoutComPayment.js +0 -1
- package/lib/components/CheckoutLink.d.ts +0 -13
- package/lib/components/CheckoutLink.js +0 -1
- package/lib/components/CommerceLayer.d.ts +0 -8
- package/lib/components/CommerceLayer.js +0 -1
- package/lib/components/CustomerContainer.d.ts +0 -7
- package/lib/components/CustomerContainer.js +0 -1
- package/lib/components/CustomerInput.d.ts +0 -11
- package/lib/components/CustomerInput.js +0 -1
- package/lib/components/DeliveryLeadTime.d.ts +0 -10
- package/lib/components/DeliveryLeadTime.js +0 -1
- package/lib/components/DiscountAmount.d.ts +0 -4
- package/lib/components/DiscountAmount.js +0 -1
- package/lib/components/Errors.d.ts +0 -5
- package/lib/components/Errors.js +0 -1
- package/lib/components/ExternalFunction.d.ts +0 -7
- package/lib/components/ExternalFunction.js +0 -1
- package/lib/components/GiftCard.d.ts +0 -8
- package/lib/components/GiftCard.js +0 -1
- package/lib/components/GiftCardAmount.d.ts +0 -4
- package/lib/components/GiftCardAmount.js +0 -1
- package/lib/components/GiftCardContainer.d.ts +0 -6
- package/lib/components/GiftCardContainer.js +0 -1
- package/lib/components/GiftCardCurrencySelector.d.ts +0 -7
- package/lib/components/GiftCardCurrencySelector.js +0 -1
- package/lib/components/GiftCardInput.d.ts +0 -7
- package/lib/components/GiftCardInput.js +0 -1
- package/lib/components/GiftCardOrCouponCode.d.ts +0 -17
- package/lib/components/GiftCardOrCouponCode.js +0 -1
- package/lib/components/GiftCardOrCouponForm.d.ts +0 -10
- package/lib/components/GiftCardOrCouponForm.js +0 -1
- package/lib/components/GiftCardOrCouponInput.d.ts +0 -10
- package/lib/components/GiftCardOrCouponInput.js +0 -1
- package/lib/components/GiftCardOrCouponRemoveButton.d.ts +0 -18
- package/lib/components/GiftCardOrCouponRemoveButton.js +0 -1
- package/lib/components/GiftCardOrCouponSubmit.d.ts +0 -9
- package/lib/components/GiftCardOrCouponSubmit.js +0 -1
- package/lib/components/ItemContainer.d.ts +0 -11
- package/lib/components/ItemContainer.js +0 -1
- package/lib/components/KlarnaPayment.js +0 -1
- package/lib/components/LineItem.d.ts +0 -8
- package/lib/components/LineItem.js +0 -1
- package/lib/components/LineItemAmount.d.ts +0 -7
- package/lib/components/LineItemAmount.js +0 -1
- package/lib/components/LineItemCode.d.ts +0 -12
- package/lib/components/LineItemCode.js +0 -1
- package/lib/components/LineItemImage.d.ts +0 -16
- package/lib/components/LineItemImage.js +0 -1
- package/lib/components/LineItemName.d.ts +0 -11
- package/lib/components/LineItemName.js +0 -1
- package/lib/components/LineItemOption.d.ts +0 -19
- package/lib/components/LineItemOption.js +0 -1
- package/lib/components/LineItemOptions.d.ts +0 -16
- package/lib/components/LineItemOptions.js +0 -1
- package/lib/components/LineItemQuantity.d.ts +0 -14
- package/lib/components/LineItemQuantity.js +0 -1
- package/lib/components/LineItemRemoveLink.d.ts +0 -12
- package/lib/components/LineItemRemoveLink.js +0 -1
- package/lib/components/LineItemsContainer.d.ts +0 -8
- package/lib/components/LineItemsContainer.js +0 -1
- package/lib/components/LineItemsCount.d.ts +0 -12
- package/lib/components/LineItemsCount.js +0 -1
- package/lib/components/LineItemsEmpty.d.ts +0 -23
- package/lib/components/LineItemsEmpty.js +0 -1
- package/lib/components/MetadataInput.d.ts +0 -5
- package/lib/components/MetadataInput.js +0 -1
- package/lib/components/OrderContainer.d.ts +0 -12
- package/lib/components/OrderContainer.js +0 -1
- package/lib/components/OrderNumber.d.ts +0 -5
- package/lib/components/OrderNumber.js +0 -1
- package/lib/components/OrderStorage.d.ts +0 -8
- package/lib/components/OrderStorage.js +0 -1
- package/lib/components/PaymentGateway.d.ts +0 -16
- package/lib/components/PaymentGateway.js +0 -1
- package/lib/components/PaymentMethod.d.ts +0 -16
- package/lib/components/PaymentMethod.js +0 -1
- package/lib/components/PaymentMethodAmount.d.ts +0 -4
- package/lib/components/PaymentMethodAmount.js +0 -1
- package/lib/components/PaymentMethodName.d.ts +0 -9
- package/lib/components/PaymentMethodName.js +0 -1
- package/lib/components/PaymentMethodPrice.d.ts +0 -9
- package/lib/components/PaymentMethodPrice.js +0 -1
- package/lib/components/PaymentMethodRadioButton.d.ts +0 -12
- package/lib/components/PaymentMethodRadioButton.js +0 -1
- package/lib/components/PaymentMethodsContainer.d.ts +0 -8
- package/lib/components/PaymentMethodsContainer.js +0 -1
- package/lib/components/PaymentSource.d.ts +0 -19
- package/lib/components/PaymentSource.js +0 -1
- package/lib/components/PaymentSourceBrandIcon.d.ts +0 -15
- package/lib/components/PaymentSourceBrandIcon.js +0 -1
- package/lib/components/PaymentSourceBrandName.d.ts +0 -12
- package/lib/components/PaymentSourceBrandName.js +0 -1
- package/lib/components/PaymentSourceDetail.d.ts +0 -12
- package/lib/components/PaymentSourceDetail.js +0 -1
- package/lib/components/PaymentSourceEditButton.d.ts +0 -9
- package/lib/components/PaymentSourceEditButton.js +0 -1
- package/lib/components/PaypalPayment.d.ts +0 -12
- package/lib/components/PaypalPayment.js +0 -1
- package/lib/components/PlaceOrderButton.d.ts +0 -14
- package/lib/components/PlaceOrderButton.js +0 -1
- package/lib/components/PlaceOrderContainer.d.ts +0 -8
- package/lib/components/PlaceOrderContainer.js +0 -1
- package/lib/components/Price.d.ts +0 -16
- package/lib/components/Price.js +0 -1
- package/lib/components/PricesContainer.d.ts +0 -11
- package/lib/components/PricesContainer.js +0 -1
- package/lib/components/PrivacyAndTermsCheckbox.d.ts +0 -4
- package/lib/components/PrivacyAndTermsCheckbox.js +0 -1
- package/lib/components/QuantitySelector.d.ts +0 -17
- package/lib/components/QuantitySelector.js +0 -1
- package/lib/components/SaveAddressesButton.d.ts +0 -10
- package/lib/components/SaveAddressesButton.js +0 -1
- package/lib/components/SaveCustomerButton.d.ts +0 -13
- package/lib/components/SaveCustomerButton.js +0 -1
- package/lib/components/Shipment.d.ts +0 -15
- package/lib/components/Shipment.js +0 -1
- package/lib/components/ShipmentField.d.ts +0 -12
- package/lib/components/ShipmentField.js +0 -1
- package/lib/components/ShipmentsContainer.d.ts +0 -6
- package/lib/components/ShipmentsContainer.js +0 -1
- package/lib/components/ShippingAddressContainer.d.ts +0 -6
- package/lib/components/ShippingAddressContainer.js +0 -1
- package/lib/components/ShippingAddressForm.d.ts +0 -8
- package/lib/components/ShippingAddressForm.js +0 -1
- package/lib/components/ShippingAmount.d.ts +0 -4
- package/lib/components/ShippingAmount.js +0 -1
- package/lib/components/ShippingMethod.d.ts +0 -8
- package/lib/components/ShippingMethod.js +0 -1
- package/lib/components/ShippingMethodName.d.ts +0 -11
- package/lib/components/ShippingMethodName.js +0 -1
- package/lib/components/ShippingMethodPrice.d.ts +0 -13
- package/lib/components/ShippingMethodPrice.js +0 -1
- package/lib/components/ShippingMethodRadioButton.d.ts +0 -13
- package/lib/components/ShippingMethodRadioButton.js +0 -1
- package/lib/components/SkuField.js +0 -1
- package/lib/components/SkuList.d.ts +0 -7
- package/lib/components/SkuList.js +0 -1
- package/lib/components/SkuListsContainer.d.ts +0 -6
- package/lib/components/SkuListsContainer.js +0 -1
- package/lib/components/SkuOption.d.ts +0 -7
- package/lib/components/SkuOption.js +0 -1
- package/lib/components/SkuOptionInput.d.ts +0 -5
- package/lib/components/SkuOptionInput.js +0 -1
- package/lib/components/SkuOptionsContainer.d.ts +0 -7
- package/lib/components/SkuOptionsContainer.js +0 -1
- package/lib/components/Skus.js +0 -1
- package/lib/components/SkusContainer.js +0 -1
- package/lib/components/StockTransfer.d.ts +0 -6
- package/lib/components/StockTransfer.js +0 -1
- package/lib/components/StockTransferField.d.ts +0 -10
- package/lib/components/StockTransferField.js +0 -1
- package/lib/components/StripePayment.d.ts +0 -18
- package/lib/components/StripePayment.js +0 -1
- package/lib/components/SubTotalAmount.d.ts +0 -4
- package/lib/components/SubTotalAmount.js +0 -1
- package/lib/components/SubmitButton.d.ts +0 -9
- package/lib/components/SubmitButton.js +0 -1
- package/lib/components/TaxesAmount.d.ts +0 -4
- package/lib/components/TaxesAmount.js +0 -1
- package/lib/components/TotalAmount.d.ts +0 -4
- package/lib/components/TotalAmount.js +0 -1
- package/lib/components/VariantSelector.d.ts +0 -29
- package/lib/components/VariantSelector.js +0 -1
- package/lib/components/VariantsContainer.d.ts +0 -8
- package/lib/components/VariantsContainer.js +0 -1
- package/lib/components/WireTransferPayment.d.ts +0 -10
- package/lib/components/WireTransferPayment.js +0 -1
- package/lib/components/gateways/AdyenGateway.d.ts +0 -5
- package/lib/components/gateways/AdyenGateway.js +0 -1
- package/lib/components/gateways/BraintreeGateway.d.ts +0 -5
- package/lib/components/gateways/BraintreeGateway.js +0 -1
- package/lib/components/gateways/CheckoutComGateway.d.ts +0 -5
- package/lib/components/gateways/CheckoutComGateway.js +0 -1
- package/lib/components/gateways/KlarnaGateway.d.ts +0 -5
- package/lib/components/gateways/KlarnaGateway.js +0 -1
- package/lib/components/gateways/PaypalGateway.d.ts +0 -5
- package/lib/components/gateways/PaypalGateway.js +0 -1
- package/lib/components/gateways/StripeGateway.d.ts +0 -5
- package/lib/components/gateways/StripeGateway.js +0 -1
- package/lib/components/gateways/WireTransferGateway.d.ts +0 -5
- package/lib/components/gateways/WireTransferGateway.js +0 -1
- package/lib/components/utils/AddressCardsTemplate.d.ts +0 -27
- package/lib/components/utils/AddressCardsTemplate.js +0 -1
- package/lib/components/utils/BaseField.js +0 -1
- package/lib/components/utils/BaseInput.js +0 -1
- package/lib/components/utils/BaseOrderPrice.js +0 -1
- package/lib/components/utils/BaseSelect.js +0 -1
- package/lib/components/utils/GenericFieldComponent.d.ts +0 -37
- package/lib/components/utils/GenericFieldComponent.js +0 -1
- package/lib/components/utils/Parent.js +0 -1
- package/lib/components/utils/PaymentCardsTemplate.js +0 -1
- package/lib/components/utils/PriceTemplate.js +0 -1
- package/lib/components/utils/VariantTemplate.js +0 -1
- package/lib/components/utils/getAllErrors.js +0 -1
- package/lib/config/components.d.ts +0 -914
- package/lib/config/components.js +0 -1
- package/lib/context/AddressChildrenContext.d.ts +0 -7
- package/lib/context/AddressChildrenContext.js +0 -1
- package/lib/context/BillingAddressContext.d.ts +0 -12
- package/lib/context/BillingAddressContext.js +0 -1
- package/lib/context/BillingAddressFormContext.d.ts +0 -19
- package/lib/context/CouponAndGiftCardFormContext.d.ts +0 -9
- package/lib/context/CustomerContext.d.ts +0 -16
- package/lib/context/CustomerContext.js +0 -1
- package/lib/context/ShippingAddressContext.d.ts +0 -10
- package/lib/index.d.ts +0 -103
- package/lib/index.js +0 -1
- package/lib/reducers/AddressReducer.d.ts +0 -59
- package/lib/reducers/AddressReducer.js +0 -1
- package/lib/reducers/AvailabilityReducer.js +0 -1
- package/lib/reducers/BillingAddressReducer.js +0 -1
- package/lib/reducers/CustomerReducer.d.ts +0 -50
- package/lib/reducers/CustomerReducer.js +0 -1
- package/lib/reducers/GiftCardReducer.js +0 -1
- package/lib/reducers/LineItemReducer.js +0 -1
- package/lib/reducers/OrderReducer.d.ts +0 -147
- package/lib/reducers/OrderReducer.js +0 -1
- package/lib/reducers/PaymentMethodReducer.js +0 -1
- package/lib/reducers/PlaceOrderReducer.js +0 -1
- package/lib/reducers/PriceReducer.js +0 -1
- package/lib/reducers/ShippingAddressReducer.js +0 -1
- package/lib/reducers/SkuReducer.js +0 -1
- package/lib/reducers/VariantReducer.js +0 -1
- package/lib/typings/errors.d.ts +0 -42
- package/lib/typings/errors.js +0 -1
- package/lib/typings/index.d.ts +0 -137
- package/lib/typings/index.js +0 -1
- package/lib/utils/addressesManager.d.ts +0 -28
- package/lib/utils/addressesManager.js +0 -1
- package/lib/utils/baseReducer.js +0 -1
- package/lib/utils/checkIncludeResource.js +0 -1
- package/lib/utils/childrenTypes.js +0 -1
- package/lib/utils/getCardDetails.js +0 -1
- package/lib/utils/getErrors.js +0 -1
- package/lib/utils/getLineItemsCount.js +0 -1
- package/lib/utils/getPrices.js +0 -1
- package/lib/utils/getSdk.js +0 -1
- package/lib/utils/getSkus.js +0 -1
- package/lib/utils/jwt.d.ts +0 -27
- package/lib/utils/promisify.js +0 -1
- package/lib/utils/shipments.js +0 -1
- package/lib/utils/validateFormFields.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import OrderContext from"../context/OrderContext";import components from"../config/components";import Parent from"./utils/Parent";import CommerceLayerContext from"../context/CommerceLayerContext";const propTypes=components.CheckoutLink.propTypes,defaultProps=components.CheckoutLink.defaultProps,displayName=components.CheckoutLink.displayName,CheckoutLink=props=>{const{label,hostedCheckout=!0,children}=props,p=__rest(props,["label","hostedCheckout","children"]),{order}=useContext(OrderContext),{accessToken,endpoint}=useContext(CommerceLayerContext),[slug]=endpoint.split(".commercelayer"),href=hostedCheckout?`${slug}.checkout.commercelayer.app/${order==null?void 0:order.id}?accessToken=${accessToken}`:order==null?void 0:order.checkout_url,parentProps=Object.assign({checkoutUrl:order==null?void 0:order.checkout_url,hostedCheckout,label,href},p);return children?_jsx(Parent,Object.assign({},parentProps,{children})):_jsx("a",Object.assign({href},p,{children:label}))};CheckoutLink.propTypes=propTypes,CheckoutLink.defaultProps=defaultProps,CheckoutLink.displayName=displayName;export default CheckoutLink;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import CommerceLayerContext from"../context/CommerceLayerContext";import components from"../config/components";const propTypes=components.CommerceLayer.propTypes,CommerceLayer=props=>{const{children}=props,p=__rest(props,["children"]);return _jsx(CommerceLayerContext.Provider,Object.assign({value:Object.assign({},p)},{children}))};CommerceLayer.propTypes=propTypes;export default CommerceLayer;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as _jsx}from"react/jsx-runtime";import{useContext,useEffect,useReducer}from"react";import customerReducer,{customerInitialState,getCustomerAddresses,getCustomerPaymentSources}from"../reducers/CustomerReducer";import OrderContext from"../context/OrderContext";import CommerceLayerContext from"../context/CommerceLayerContext";import components from"../config/components";import{saveCustomerUser}from"../reducers/CustomerReducer";import CustomerContext from"../context/CustomerContext";import{defaultCustomerContext}from"../context/CustomerContext";const propTypes=components.CustomerContainer.propTypes,displayName=components.CustomerContainer.displayName,CustomerContainer=props=>{const{children,isGuest=!1}=props,[state,dispatch]=useReducer(customerReducer,customerInitialState),{order,addResourceToInclude,include,updateOrder,includeLoaded}=useContext(OrderContext),config=useContext(CommerceLayerContext);useEffect(()=>{!(include==null?void 0:include.includes("available_customer_payment_sources.payment_source"))&&!isGuest?addResourceToInclude({newResource:"available_customer_payment_sources.payment_source"}):!(includeLoaded==null?void 0:includeLoaded["available_customer_payment_sources.payment_source"])&&!isGuest&&addResourceToInclude({newResourceLoaded:{"available_customer_payment_sources.payment_source":!0}})},[include,includeLoaded]),useEffect(()=>{var _a;config.accessToken&&order&&((_a=state.addresses)===null||_a===void 0?void 0:_a.length)===0&&!isGuest&&getCustomerAddresses({config,dispatch}),(order==null?void 0:order.available_customer_payment_sources)&&!isGuest&&getCustomerPaymentSources({dispatch,order})},[config.accessToken,order,isGuest]);const contextValue=Object.assign(Object.assign({isGuest},state),{saveCustomerUser:async customerEmail=>{await saveCustomerUser({config,customerEmail,dispatch,updateOrder,order})},setCustomerErrors:errors=>defaultCustomerContext.setCustomerErrors(errors,dispatch),setCustomerEmail:customerEmail=>defaultCustomerContext.setCustomerEmail(customerEmail,dispatch),getCustomerPaymentSources:()=>getCustomerPaymentSources({dispatch,order})});return _jsx(CustomerContext.Provider,Object.assign({value:contextValue},{children}))};CustomerContainer.propTypes=propTypes,CustomerContainer.displayName=displayName;export default CustomerContainer;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
import { BaseInputComponentProps } from '../typings/index';
|
|
3
|
-
declare type CustomerInputProps = {
|
|
4
|
-
name?: 'customer_email' | string;
|
|
5
|
-
type?: 'email' | string;
|
|
6
|
-
saveOnBlur?: boolean;
|
|
7
|
-
onBlur?: (email: string) => void;
|
|
8
|
-
errorClassName?: string;
|
|
9
|
-
} & Omit<BaseInputComponentProps, 'name' | 'type' | 'onBlur'> & JSX.IntrinsicElements['input'] & JSX.IntrinsicElements['textarea'];
|
|
10
|
-
declare const CustomerInput: FunctionComponent<CustomerInputProps>;
|
|
11
|
-
export default CustomerInput;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext,useEffect,useState}from"react";import BaseInput from"./utils/BaseInput";import components from"../config/components";import useRapidForm from"rapid-form";import CustomerContext from"../context/CustomerContext";import isEmpty from"lodash/isEmpty";const propTypes=components.CustomerInput.propTypes,displayName=components.CustomerInput.displayName,CustomerInput=props=>{const{name="customer_email",placeholder="",required=!0,saveOnBlur=!1,type="email",value,onBlur,className,errorClassName}=props,p=__rest(props,["name","placeholder","required","saveOnBlur","type","value","onBlur","className","errorClassName"]),{validation,values,errors}=useRapidForm({fieldEvent:"blur"}),{saveCustomerUser,setCustomerErrors,setCustomerEmail}=useContext(CustomerContext),[hasError,setHasError]=useState(!1),handleOnBlur=async()=>{saveOnBlur&&isEmpty(errors)&&!isEmpty(values)&&(await saveCustomerUser(values[name].value),onBlur&&onBlur(values[name].value))};useEffect(()=>{var _a,_b;if(isEmpty(errors))isEmpty(values)||(setCustomerErrors([]),setCustomerEmail(values[name].value),setHasError(!1));else{const formErrors=[];for(const fieldName in errors){const code=(_a=errors[fieldName])===null||_a===void 0?void 0:_a.code,message=(_b=errors[fieldName])===null||_b===void 0?void 0:_b.message;formErrors.push({code,message:message||"",resource:"orders",field:fieldName})}isEmpty(formErrors)||(setHasError(!0),setCustomerErrors(formErrors))}return()=>{setHasError(!1)}},[errors]);const classNameComputed=`${className} ${hasError?errorClassName:""}`;return _jsx(BaseInput,Object.assign({name,type,ref:validation,required,placeholder,defaultValue:value,onBlur:handleOnBlur,className:classNameComputed},p))};CustomerInput.propTypes=propTypes,CustomerInput.displayName=displayName;export default CustomerInput;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
export declare type DeliveryLeadTimeField = 'min_hours' | 'max_hours' | 'min_days' | 'max_days';
|
|
3
|
-
export declare type DeliveryLeadTimeComponentChildren = Omit<ShippingMethodPriceProps, 'children'>;
|
|
4
|
-
export interface ShippingMethodPriceProps extends Partial<JSX.IntrinsicElements['span']> {
|
|
5
|
-
children?: (props: DeliveryLeadTimeComponentChildren) => ReactNode;
|
|
6
|
-
type: DeliveryLeadTimeField;
|
|
7
|
-
text?: string;
|
|
8
|
-
}
|
|
9
|
-
declare const DeliveryLeadTime: FunctionComponent<ShippingMethodPriceProps>;
|
|
10
|
-
export default DeliveryLeadTime;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext,useState,useEffect}from"react";import ShippingMethodChildrenContext from"../context/ShippingMethodChildrenContext";import Parent from"./utils/Parent";import components from"../config/components";const propTypes=components.DeliveryLeadTime.propTypes,displayName=components.DeliveryLeadTime.displayName,DeliveryLeadTime=props=>{const{type}=props,p=__rest(props,["type"]),[text,setText]=useState(),{deliveryLeadTimeForShipment}=useContext(ShippingMethodChildrenContext);useEffect(()=>(deliveryLeadTimeForShipment&&deliveryLeadTimeForShipment[type]&&setText(deliveryLeadTimeForShipment[type]),()=>{setText("")}),[deliveryLeadTimeForShipment]);const parentProps=Object.assign({text},p);return props.children?_jsx(Parent,Object.assign({},parentProps,{children:props.children})):_jsx("span",Object.assign({},p,{children:text}))};DeliveryLeadTime.propTypes=propTypes,DeliveryLeadTime.displayName=displayName;export default DeliveryLeadTime;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as _jsx}from"react/jsx-runtime";import BaseOrderPrice from"./utils/BaseOrderPrice";import components from"../config/components";const propTypes=components.DiscountAmount.propTypes,defaultProps=components.DiscountAmount.defaultProps,displayName=components.DiscountAmount.displayName,DiscountAmount=props=>_jsx(BaseOrderPrice,Object.assign({base:"amount",type:"discount"},props));DiscountAmount.propTypes=propTypes,DiscountAmount.defaultProps=defaultProps,DiscountAmount.displayName=displayName;export default DiscountAmount;
|
package/lib/components/Errors.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext,Fragment,useMemo}from"react";import Parent from"./utils/Parent";import GiftCardContext from"../context/GiftCardContext";import OrderContext from"../context/OrderContext";import AddressContext from"../context/AddressContext";import getAllErrors from"./utils/getAllErrors";import LineItemContext from"../context/LineItemContext";import LineItemChildrenContext from"../context/LineItemChildrenContext";import components from"../config/components";import CustomerContext from"../context/CustomerContext";import PaymentMethodContext from"../context/PaymentMethodContext";import PaymentMethodChildrenContext from"../context/PaymentMethodChildrenContext";import ShipmentContext from"../context/ShipmentContext";const propTypes=components.Errors.propTypes,displayName=components.Errors.displayName,Errors=props=>{const{children,messages=[],resource,field}=props,p=__rest(props,["children","messages","resource","field"]),{payment}=useContext(PaymentMethodChildrenContext),{errors:orderErrors}=useContext(OrderContext),{errors:giftCardErrors}=useContext(GiftCardContext),{errors:lineItemErrors}=useContext(LineItemContext),{errors:addressErrors}=useContext(AddressContext),{errors:customerErrors}=useContext(CustomerContext),{errors:shipmentErrors}=useContext(ShipmentContext),{errors:paymentMethodErrors,currentPaymentMethodType,currentPaymentMethodId}=useContext(PaymentMethodContext),{lineItem}=useContext(LineItemChildrenContext),allErrors=useMemo(()=>[...giftCardErrors||[],...orderErrors||[],...lineItemErrors||[],...addressErrors||[],...customerErrors||[],...shipmentErrors||[],...(paymentMethodErrors==null?void 0:paymentMethodErrors.filter(v=>v.field===currentPaymentMethodType&&(payment==null?void 0:payment.id)===currentPaymentMethodId))||[]],[giftCardErrors,orderErrors,lineItemErrors,addressErrors,customerErrors,shipmentErrors,paymentMethodErrors]).filter((v,k,a)=>{var _a;return(v==null?void 0:v.code)!==((_a=a[k-1])===null||_a===void 0?void 0:_a.code)}),msgErrors=getAllErrors({allErrors,field,messages,props:p,lineItem,resource,returnHtml:!children}),parentProps=Object.assign({messages,resource,field,errors:msgErrors},p);return children?_jsx(Parent,Object.assign({},parentProps,{children})):_jsx(Fragment,{children:msgErrors})};Errors.propTypes=propTypes,Errors.displayName=displayName;export default Errors;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as _jsx}from"react/jsx-runtime";import ExternalFunctionContext,{callExternalFunction}from"../context/ExternalFunctionContext";import components from"../config/components";const propTypes=components.ExternalFunction.propTypes,displayName=components.ExternalFunction.displayName,ExternalFunction=({children,url})=>_jsx(ExternalFunctionContext.Provider,Object.assign({value:{url,callExternalFunction}},{children}));ExternalFunction.propTypes=propTypes,ExternalFunction.displayName=displayName;export default ExternalFunction;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
import { BaseState } from '../typings/index';
|
|
3
|
-
declare type GiftCardProps = {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
onSubmit?: (values: BaseState) => void;
|
|
6
|
-
} & JSX.IntrinsicElements['form'];
|
|
7
|
-
declare const GiftCard: FunctionComponent<GiftCardProps>;
|
|
8
|
-
export default GiftCard;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as _jsx}from"react/jsx-runtime";import{Fragment,useRef,useContext}from"react";import validateFormFields from"../utils/validateFormFields";import{isEmpty}from"lodash";import GiftCardContext from"../context/GiftCardContext";import components from"../config/components";const propTypes=components.GiftCard.propTypes,defaultProps=components.GiftCard.defaultProps,displayName=components.GiftCard.displayName,GiftCard=props=>{const{children,onSubmit}=props,name="giftCardForm",ref=useRef(null),{addGiftCard,addGiftCardError}=useContext(GiftCardContext);return _jsx(Fragment,{children:_jsx("form",Object.assign({name,ref,onSubmit:e=>{e.preventDefault();const currentForm=ref.current,elements=currentForm==null?void 0:currentForm.elements,{errors,values}=validateFormFields(elements,["currencyCode","balanceCents"],"gift_cards");isEmpty(errors)?(addGiftCard(values),currentForm==null||currentForm.reset(),onSubmit&&onSubmit(values)):addGiftCardError(errors)}},{children}),name)})};GiftCard.propTypes=propTypes,GiftCard.defaultProps=defaultProps,GiftCard.displayName=displayName;export default GiftCard;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as _jsx}from"react/jsx-runtime";import BaseOrderPrice from"./utils/BaseOrderPrice";import components from"../config/components";const propTypes=components.GiftCardAmount.propTypes,displayName=components.GiftCardAmount.displayName,GiftCardAmount=props=>_jsx(BaseOrderPrice,Object.assign({base:"amount",type:"gift_card"},props));GiftCardAmount.propTypes=propTypes,GiftCardAmount.displayName=displayName;export default GiftCardAmount;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as _jsx}from"react/jsx-runtime";import{useReducer,useContext}from"react";import GiftCardContext from"../context/GiftCardContext";import CommerceLayerContext from"../context/CommerceLayerContext";import giftCardReducer,{giftCardInitialState,addGiftCardRecipient,addGiftCard,addGiftCardError,addGiftCardLoading}from"../reducers/GiftCardReducer";import OrderContext from"../context/OrderContext";import components from"../config/components";const propTypes=components.GiftCardContainer.propTypes,displayName=components.GiftCardContainer.displayName,GiftCardContainer=props=>{const{children}=props,[state,dispatch]=useReducer(giftCardReducer,giftCardInitialState),config=useContext(CommerceLayerContext),{getOrder,createOrder,order}=useContext(OrderContext),giftCardValue=Object.assign(Object.assign({},state),{addGiftCardRecipient:values=>addGiftCardRecipient(values,config,dispatch),addGiftCard:values=>addGiftCard(Object.assign({},values),{config,dispatch,getOrder,createOrder,order}),addGiftCardError:errors=>addGiftCardError(errors,dispatch),addGiftCardLoading:loading=>addGiftCardLoading(loading,dispatch)});return _jsx(GiftCardContext.Provider,Object.assign({value:giftCardValue},{children}))};GiftCardContainer.propTypes=propTypes,GiftCardContainer.displayName=displayName;export default GiftCardContainer;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
import { BaseSelectComponentProps } from '../typings/index';
|
|
3
|
-
declare type GiftCardCurrencySelectorProps = Omit<BaseSelectComponentProps, 'options' | 'name'> & {
|
|
4
|
-
required?: boolean;
|
|
5
|
-
} & Pick<JSX.IntrinsicElements['select'], 'className' | 'id' | 'style'>;
|
|
6
|
-
declare const GiftCardCurrencySelector: FunctionComponent<GiftCardCurrencySelectorProps>;
|
|
7
|
-
export default GiftCardCurrencySelector;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as _jsx}from"react/jsx-runtime";import BaseSelect from"./utils/BaseSelect";import currencyOptions from"../config/currency";import components from"../config/components";const propTypes=components.GiftCardCurrencySelector.propTypes,defaultProps=components.GiftCardCurrencySelector.defaultProps,displayName=components.GiftCardCurrencySelector.displayName,GiftCardCurrencySelector=props=>_jsx(BaseSelect,Object.assign({options:currencyOptions,name:"currencyCode"},props));GiftCardCurrencySelector.propTypes=propTypes,GiftCardCurrencySelector.defaultProps=defaultProps,GiftCardCurrencySelector.displayName=displayName;export default GiftCardCurrencySelector;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
import { BaseInputComponentProps, GiftCardInputName } from '../typings/index';
|
|
3
|
-
export declare type GiftCardInputProps = {
|
|
4
|
-
name: GiftCardInputName;
|
|
5
|
-
} & Omit<BaseInputComponentProps, 'name'> & JSX.IntrinsicElements['input'] & JSX.IntrinsicElements['textarea'];
|
|
6
|
-
declare const GiftCardInput: FunctionComponent<GiftCardInputProps>;
|
|
7
|
-
export default GiftCardInput;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import BaseInput from"./utils/BaseInput";import components from"../config/components";const propTypes=components.GiftCardInput.propTypes,displayName=components.GiftCardInput.displayName,GiftCardInput=props=>{const{placeholder=""}=props,p=__rest(props,["placeholder"]);return _jsx(BaseInput,Object.assign({placeholder},p))};GiftCardInput.propTypes=propTypes,GiftCardInput.displayName=displayName;export default GiftCardInput;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
import { FunctionChildren } from '../typings/index';
|
|
3
|
-
import { CodeType } from '../reducers/OrderReducer';
|
|
4
|
-
declare type ChildrenProps = Omit<GiftCardOrCouponCodeProps, 'children'> & {
|
|
5
|
-
code?: string;
|
|
6
|
-
hide?: boolean;
|
|
7
|
-
discountAmountCents?: string;
|
|
8
|
-
discountAmountFloat?: string;
|
|
9
|
-
formattedDiscountAmount?: string;
|
|
10
|
-
};
|
|
11
|
-
declare type GiftCardOrCouponCodeChildrenProps = FunctionChildren<ChildrenProps>;
|
|
12
|
-
declare type GiftCardOrCouponCodeProps = {
|
|
13
|
-
type?: CodeType;
|
|
14
|
-
children?: GiftCardOrCouponCodeChildrenProps;
|
|
15
|
-
} & JSX.IntrinsicElements['span'];
|
|
16
|
-
declare const GiftCardOrCouponCode: FunctionComponent<GiftCardOrCouponCodeProps>;
|
|
17
|
-
export default GiftCardOrCouponCode;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import components from"../config/components";import Parent from"./utils/Parent";import OrderContext from"../context/OrderContext";import has from"lodash/has";import isEmpty from"lodash/isEmpty";const propTypes=components.GiftCardOrCouponCode.propTypes,displayName=components.GiftCardOrCouponCode.displayName,GiftCardOrCouponCode=_a=>{var{children,type}=_a,props=__rest(_a,["children","type"]);const{order}=useContext(OrderContext);let codeType=type&&`${type}_code`;!type&&order&&has(order,"coupon_code")&&!isEmpty(order.coupon_code)?codeType="coupon_code":type||(codeType="gift_card_code");const code=order&&codeType?order[codeType]:"",hide=!(order&&code),parentProps=Object.assign(Object.assign({},props),{code,hide,discountAmountCents:order==null?void 0:order.discount_amount_cents,discountAmountFloat:order==null?void 0:order.discount_amount_float,formattedDiscountAmount:order==null?void 0:order.formatted_discount_amount});return children?_jsx(Parent,Object.assign({},parentProps,{children})):hide?null:_jsx("span",Object.assign({},props,{children:code}))};GiftCardOrCouponCode.propTypes=propTypes,GiftCardOrCouponCode.displayName=displayName;export default GiftCardOrCouponCode;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
declare type GiftCardOrCouponFormProps = {
|
|
3
|
-
children: ReactNode;
|
|
4
|
-
onSubmit?: (response: {
|
|
5
|
-
success: boolean;
|
|
6
|
-
value: string;
|
|
7
|
-
}) => void;
|
|
8
|
-
} & Omit<JSX.IntrinsicElements['form'], 'onSubmit'>;
|
|
9
|
-
declare const GiftCardOrCouponForm: FunctionComponent<GiftCardOrCouponFormProps>;
|
|
10
|
-
export default GiftCardOrCouponForm;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import useRapidForm from"rapid-form";import{useContext,useEffect,useRef,useState}from"react";import CouponAndGiftCardFormContext from"../context/CouponAndGiftCardFormContext";import OrderContext from"../context/OrderContext";import isEmpty from"lodash/isEmpty";import components from"../config/components";import camelCase from"lodash/camelCase";import dropWhile from"lodash/dropWhile";import has from"lodash/has";import{findIndex}from"lodash";const propTypes=components.GiftCardOrCouponForm.propTypes,GiftCardOrCouponForm=props=>{const{children,autoComplete="on",onSubmit}=props,p=__rest(props,["children","autoComplete","onSubmit"]),{validation,values,reset}=useRapidForm(),[codeType,setCodeType]=useState("gift_card_or_coupon_code"),{setGiftCardOrCouponCode,order,errors,setOrderErrors}=useContext(OrderContext),ref=useRef(null),inputName="gift_card_or_coupon_code";useEffect(()=>{var _a,_b,_c,_d;if(((_a=values[inputName])===null||_a===void 0?void 0:_a.value)===""&&findIndex(errors,{field:camelCase(inputName)})!==-1){const err=dropWhile(errors,i=>i.field===camelCase(inputName));setOrderErrors(err),onSubmit&&onSubmit({value:(_b=values[inputName])===null||_b===void 0?void 0:_b.value,success:!1})}((_c=values[inputName])===null||_c===void 0?void 0:_c.value)===""&&(setOrderErrors([]),onSubmit&&onSubmit({value:(_d=values[inputName])===null||_d===void 0?void 0:_d.value,success:!1}))},[values]),useEffect(()=>{(order==null?void 0:order.gift_card_code)&&!(order==null?void 0:order.coupon_code)&&setCodeType("coupon_code"),!(order==null?void 0:order.gift_card_code)&&(order==null?void 0:order.coupon_code)&&setCodeType("gift_card_code"),!(order==null?void 0:order.gift_card_code)&&!(order==null?void 0:order.coupon_code)&&setCodeType("gift_card_or_coupon_code")},[order]);const handleSubmit=async e=>{var _a;e.preventDefault();const code=has(values,inputName)?values[inputName].value:void 0;if(code){const{success}=await setGiftCardOrCouponCode({code,codeType}),value=(_a=values[inputName])===null||_a===void 0?void 0:_a.value;onSubmit&&onSubmit({success,value}),success&&reset(e)}};return(order==null?void 0:order.gift_card_code)&&(order==null?void 0:order.coupon_code)||isEmpty(order)?null:_jsx(CouponAndGiftCardFormContext.Provider,Object.assign({value:{validation,codeType}},{children:_jsx("form",Object.assign({ref,autoComplete,onSubmit:handleSubmit},p,{children}))}))};GiftCardOrCouponForm.propTypes=propTypes;export default GiftCardOrCouponForm;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { BaseInputComponentProps } from '../typings/index';
|
|
3
|
-
import { OrderCodeType } from '../reducers/OrderReducer';
|
|
4
|
-
export declare type GiftCardOrCouponInputProps = {
|
|
5
|
-
name?: 'gift_card_or_coupon_code';
|
|
6
|
-
type?: 'text';
|
|
7
|
-
placeholderTranslation?: (codeType: OrderCodeType) => string;
|
|
8
|
-
} & Omit<BaseInputComponentProps, 'name' | 'type'> & JSX.IntrinsicElements['input'] & JSX.IntrinsicElements['textarea'];
|
|
9
|
-
declare const GiftCardOrCouponInput: React.FunctionComponent<GiftCardOrCouponInputProps>;
|
|
10
|
-
export default GiftCardOrCouponInput;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import components from"../config/components";import BaseInput from"./utils/BaseInput";import CouponAndGiftCardFormContext from"../context/CouponAndGiftCardFormContext";const propTypes=components.GiftCardOrCouponInput.propTypes,displayName=components.GiftCardOrCouponInput.displayName,GiftCardOrCouponInput=props=>{const{placeholder="",required,value,placeholderTranslation}=props,p=__rest(props,["placeholder","required","value","placeholderTranslation"]),{validation,codeType}=useContext(CouponAndGiftCardFormContext);let placeholderLabel=placeholder;return placeholderTranslation&&codeType&&(placeholderLabel=placeholderTranslation(codeType)),_jsx(BaseInput,Object.assign({type:"text",name:"gift_card_or_coupon_code",ref:validation,required:required!==void 0?required:!0,placeholder:placeholderLabel,defaultValue:value},p))};GiftCardOrCouponInput.propTypes=propTypes,GiftCardOrCouponInput.displayName=displayName;export default GiftCardOrCouponInput;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
import { FunctionChildren } from '../typings/index';
|
|
3
|
-
import { CodeType, OrderCodeType } from '../reducers/OrderReducer';
|
|
4
|
-
declare type GiftCardOrCouponRemoveButtonChildrenProps = FunctionChildren<Omit<GiftCardOrCouponRemoveButtonProps, 'children'> & {
|
|
5
|
-
codeType?: OrderCodeType;
|
|
6
|
-
hide?: boolean;
|
|
7
|
-
handleClick?: () => void;
|
|
8
|
-
}>;
|
|
9
|
-
declare type GiftCardOrCouponRemoveButtonProps = {
|
|
10
|
-
type?: CodeType;
|
|
11
|
-
children?: GiftCardOrCouponRemoveButtonChildrenProps;
|
|
12
|
-
label?: string | ReactNode;
|
|
13
|
-
onClick?: (response: {
|
|
14
|
-
success: boolean;
|
|
15
|
-
}) => void;
|
|
16
|
-
} & Omit<JSX.IntrinsicElements['button'], 'type'>;
|
|
17
|
-
declare const GiftCardOrCouponRemoveButton: FunctionComponent<GiftCardOrCouponRemoveButtonProps>;
|
|
18
|
-
export default GiftCardOrCouponRemoveButton;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import Parent from"./utils/Parent";import components from"../config/components";import OrderContext from"../context/OrderContext";import{has,isEmpty}from"lodash";const propTypes=components.GiftCardOrCouponRemoveButton.propTypes,displayName=components.GiftCardOrCouponRemoveButton.displayName,GiftCardOrCouponRemoveButton=props=>{const{children,label="Remove",onClick,type}=props,p=__rest(props,["children","label","onClick","type"]),{order,removeGiftCardOrCouponCode}=useContext(OrderContext);let codeType=`${type}_code`;!type&&order&&has(order,"coupon_code")&&!isEmpty(order.coupon_code)?codeType="coupon_code":type||(codeType="gift_card_code");const code=order&&codeType?order[codeType]:"",hide=!(order&&code),handleClick=async()=>{const response=removeGiftCardOrCouponCode&&await removeGiftCardOrCouponCode({codeType});onClick&&onClick(response)},parentProps=Object.assign(Object.assign({},p),{label,handleClick,codeType});return children?_jsx(Parent,Object.assign({},parentProps,{children})):hide?null:_jsx("button",Object.assign({type:"button",onClick:handleClick},p,{children:label}))};GiftCardOrCouponRemoveButton.propTypes=propTypes,GiftCardOrCouponRemoveButton.displayName=displayName;export default GiftCardOrCouponRemoveButton;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
import { FunctionChildren } from '../typings/index';
|
|
3
|
-
declare type GiftCardOrCouponSubmitChildrenProps = FunctionChildren<Omit<GiftCardOrCouponSubmitProps, 'children'>>;
|
|
4
|
-
declare type GiftCardOrCouponSubmitProps = {
|
|
5
|
-
children?: GiftCardOrCouponSubmitChildrenProps;
|
|
6
|
-
label?: string | ReactNode;
|
|
7
|
-
} & JSX.IntrinsicElements['button'];
|
|
8
|
-
declare const GiftCardOrCouponSubmit: FunctionComponent<GiftCardOrCouponSubmitProps>;
|
|
9
|
-
export default GiftCardOrCouponSubmit;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import Parent from"./utils/Parent";import components from"../config/components";const propTypes=components.GiftCardOrCouponSubmit.propTypes,displayName=components.GiftCardOrCouponSubmit.displayName,GiftCardOrCouponSubmit=props=>{const{children,label="Submit"}=props,p=__rest(props,["children","label"]),parentProps=Object.assign(Object.assign({},p),{label});return children?_jsx(Parent,Object.assign({},parentProps,{children})):_jsx("button",Object.assign({type:"submit"},p,{children:label}))};GiftCardOrCouponSubmit.propTypes=propTypes,GiftCardOrCouponSubmit.displayName=displayName;export default GiftCardOrCouponSubmit;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
declare type ItemContainerProps = {
|
|
3
|
-
children: ReactNode;
|
|
4
|
-
skuCode?: string | null;
|
|
5
|
-
lineItem?: {
|
|
6
|
-
name: string;
|
|
7
|
-
imageUrl?: string | null;
|
|
8
|
-
} | null;
|
|
9
|
-
};
|
|
10
|
-
declare const ItemContainer: React.FunctionComponent<ItemContainerProps>;
|
|
11
|
-
export default ItemContainer;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as _jsx}from"react/jsx-runtime";import{useReducer,useEffect}from"react";import ItemContext,{initialItemContext}from"../context/ItemContext";import itemReducer,{itemInitialState,setItemState}from"../reducers/ItemReducer";import components from"../config/components";const propTypes=components.ItemContainer.propTypes,displayName=components.ItemContainer.displayName,ItemContainer=props=>{const{children,skuCode,lineItem}=props,[state,dispatch]=useReducer(itemReducer,itemInitialState);useEffect(()=>{const code=skuCode;code&&setItemState(code,{type:"setSkuCode",key:"skuCode"},dispatch),lineItem&&setItemState(lineItem,{type:"setCustomLineItem",key:"lineItem"},dispatch)},[]);const setItems=items=>setItemState(items,{type:"setItems",key:"items"},dispatch),setItem=item=>setItemState(item,{type:"setItem",key:"item"},dispatch),setQuantity=item=>setItemState(item,{type:"setQuantity",key:"quantity"},dispatch),setOption=item=>setItemState(item,{type:"setOption",key:"option"},dispatch),setPrices=item=>setItemState(item,{type:"setPrices",key:"prices"},dispatch),setCustomLineItems=item=>setItemState(item,{type:"setCustomLineItems",key:"lineItems"},dispatch),setSkuCode=code=>setItemState(code,{type:"setSkuCode",key:"skuCode"},dispatch),itemValue=Object.assign(Object.assign(Object.assign({},initialItemContext),state),{setItems,setItem,setQuantity,setOption,setPrices,setCustomLineItems,setSkuCode});return _jsx(ItemContext.Provider,Object.assign({value:itemValue},{children}))};ItemContainer.propTypes=propTypes,ItemContainer.displayName=displayName;export default ItemContainer;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext,useEffect,useRef,useState}from"react";import PaymentMethodContext from"../context/PaymentMethodContext";import OrderContext from"../context/OrderContext";import useExternalScript from"../utils/hooks/useExternalScript";import PlaceOrderContext from"../context/PlaceOrderContext";function typeOfLine(lineItemType){switch(lineItemType){case"payment_methods":default:return null;case"percentage_discount_promotions":return"discount";case"shipments":return"shipping_fee";case"skus":return"physical"}}function klarnaOrderLines(lineItems){return lineItems?lineItems.map(item=>{const type=item.item_type?typeOfLine(item.item_type):null;return{name:item.name,quantity:item.quantity,total_amount:item.total_amount_cents,unit_price:item.unit_amount_cents,type}}):[]}export default function KlarnaPayment(_a){var _b,_c,_d,_e,_f,_g,_h,_j,_k,_l,_m,_o,_p,_q,_r,_s,_t,_u,{clientToken,placeOrderCallback,locale="EN"}=_a,p=__rest(_a,["clientToken","placeOrderCallback","locale"]);const ref=useRef(null),{paymentSource,currentPaymentMethodType,setPaymentRef,setPaymentSource,setPaymentMethodErrors}=useContext(PaymentMethodContext),{order}=useContext(OrderContext),{setPlaceOrder}=useContext(PlaceOrderContext),loaded=useExternalScript("https://x.klarnacdn.net/kp/lib/v1/api.js"),[klarna,setKlarna]=useState(),{containerClassName}=p,divProps=__rest(p,["containerClassName"]);useEffect(()=>{loaded&&(window==null?void 0:window.Klarna)!==void 0&&setKlarna(window.Klarna)},[loaded,window.Klarna]),useEffect(()=>(ref.current&&paymentSource&¤tPaymentMethodType&&loaded&&klarna&&(ref.current.onsubmit=()=>handleClick(klarna),setPaymentRef({ref})),()=>{setPaymentRef({ref:{current:null}})}),[ref,paymentSource,currentPaymentMethodType,loaded,klarna]);const handleClick=async kl=>{var _a2,_b2,_c2,_d2,_e2,_f2,_g2,_h2,_j2,_k2,_l2,_m2,_o2,_p2,_q2,_r2;const[first]=(paymentSource==null?void 0:paymentSource.payment_methods)||void 0,payment_method_category=first==null?void 0:first.identifier,billing_address={given_name:(_a2=order==null?void 0:order.billing_address)===null||_a2===void 0?void 0:_a2.first_name,family_name:(_b2=order==null?void 0:order.billing_address)===null||_b2===void 0?void 0:_b2.last_name,email:order==null?void 0:order.customer_email,street_address:(_c2=order==null?void 0:order.billing_address)===null||_c2===void 0?void 0:_c2.line_1,street_address2:null,organization_name:null,postal_code:(_d2=order==null?void 0:order.billing_address)===null||_d2===void 0?void 0:_d2.zip_code,city:(_e2=order==null?void 0:order.billing_address)===null||_e2===void 0?void 0:_e2.city,region:(_f2=order==null?void 0:order.billing_address)===null||_f2===void 0?void 0:_f2.state_code,phone:(_g2=order==null?void 0:order.billing_address)===null||_g2===void 0?void 0:_g2.phone,country:(_h2=order==null?void 0:order.billing_address)===null||_h2===void 0?void 0:_h2.country_code},shipping_address={given_name:(_j2=order==null?void 0:order.shipping_address)===null||_j2===void 0?void 0:_j2.first_name,family_name:(_k2=order==null?void 0:order.shipping_address)===null||_k2===void 0?void 0:_k2.last_name,email:order==null?void 0:order.customer_email,street_address:(_l2=order==null?void 0:order.shipping_address)===null||_l2===void 0?void 0:_l2.line_1,street_address2:null,postal_code:(_m2=order==null?void 0:order.shipping_address)===null||_m2===void 0?void 0:_m2.zip_code,organization_name:null,city:(_o2=order==null?void 0:order.shipping_address)===null||_o2===void 0?void 0:_o2.city,region:(_p2=order==null?void 0:order.shipping_address)===null||_p2===void 0?void 0:_p2.state_code,phone:(_q2=order==null?void 0:order.shipping_address)===null||_q2===void 0?void 0:_q2.phone,country:(_r2=order==null?void 0:order.shipping_address)===null||_r2===void 0?void 0:_r2.country_code},klarnaData={merchant_data:order==null?void 0:order.id,purchase_country:order==null?void 0:order.country_code,purchase_currency:order==null?void 0:order.currency_code,locale,shipping_address,billing_address,order_amount:order==null?void 0:order.total_amount_cents,order_lines:klarnaOrderLines(order==null?void 0:order.line_items)};try{kl.Payments.load({container:"#klarna-payments-container",payment_method_category},{billing_address,shipping_address},async function({show_form}){if(show_form)try{await kl.Payments.authorize({payment_method_category},klarnaData,async function(res){if(res.approved&&paymentSource&¤tPaymentMethodType){const ps=await setPaymentSource({paymentSourceId:paymentSource.id,paymentResource:currentPaymentMethodType,attributes:{auth_token:res.authorization_token}}),{placed}=setPlaceOrder&&ps&&await setPlaceOrder({paymentSource:ps})||{placed:!1};placed&&placeOrderCallback&&placeOrderCallback({placed})}})}catch(e){console.error("e",e),setPaymentMethodErrors([{code:"PAYMENT_INTENT_AUTHENTICATION_FAILURE",resource:"payment_methods",field:currentPaymentMethodType,message:"Authorization error"}])}})}catch(e){console.error("Load Klarna libray",e)}};if(klarna&&clientToken){const[first]=(paymentSource==null?void 0:paymentSource.payment_methods)||void 0;klarna.Payments.init({client_token:clientToken}),klarna.Payments.load({container:"#klarna-payments-container",payment_method_category:first==null?void 0:first.identifier},{billing_address:{given_name:(_b=order==null?void 0:order.billing_address)===null||_b===void 0?void 0:_b.first_name,family_name:(_c=order==null?void 0:order.billing_address)===null||_c===void 0?void 0:_c.last_name,email:order==null?void 0:order.customer_email,street_address:(_d=order==null?void 0:order.billing_address)===null||_d===void 0?void 0:_d.line_1,street_address2:(_e=order==null?void 0:order.billing_address)===null||_e===void 0?void 0:_e.line_2,postal_code:(_f=order==null?void 0:order.billing_address)===null||_f===void 0?void 0:_f.zip_code,city:(_g=order==null?void 0:order.billing_address)===null||_g===void 0?void 0:_g.city,region:(_h=order==null?void 0:order.billing_address)===null||_h===void 0?void 0:_h.state_code,phone:(_j=order==null?void 0:order.billing_address)===null||_j===void 0?void 0:_j.phone,country:(_k=order==null?void 0:order.billing_address)===null||_k===void 0?void 0:_k.country_code},shipping_address:{given_name:(_l=order==null?void 0:order.shipping_address)===null||_l===void 0?void 0:_l.first_name,family_name:(_m=order==null?void 0:order.shipping_address)===null||_m===void 0?void 0:_m.last_name,street_address:(_o=order==null?void 0:order.shipping_address)===null||_o===void 0?void 0:_o.line_1,street_address2:(_p=order==null?void 0:order.shipping_address)===null||_p===void 0?void 0:_p.line_2,postal_code:(_q=order==null?void 0:order.shipping_address)===null||_q===void 0?void 0:_q.zip_code,city:(_r=order==null?void 0:order.shipping_address)===null||_r===void 0?void 0:_r.city,region:(_s=order==null?void 0:order.shipping_address)===null||_s===void 0?void 0:_s.state_code,phone:(_t=order==null?void 0:order.shipping_address)===null||_t===void 0?void 0:_t.phone,country:(_u=order==null?void 0:order.shipping_address)===null||_u===void 0?void 0:_u.country_code}})}return _jsx("form",Object.assign({ref},{children:_jsx("div",Object.assign({className:containerClassName},divProps,{children:_jsx("div",{id:"klarna-payments-container"})}))}))}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ReactNode, FunctionComponent } from 'react';
|
|
2
|
-
import { LineItemType } from '../typings/index';
|
|
3
|
-
declare type LineItemProps = {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
type?: LineItemType;
|
|
6
|
-
};
|
|
7
|
-
declare const LineItem: FunctionComponent<LineItemProps>;
|
|
8
|
-
export default LineItem;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as _jsx,Fragment as _Fragment}from"react/jsx-runtime";import{useContext}from"react";import LineItemContext from"../context/LineItemContext";import LineItemChildrenContext from"../context/LineItemChildrenContext";import components from"../config/components";import ShipmentChildrenContext from"../context/ShipmentChildrenContext";const propTypes=components.LineItem.propTypes,displayName=components.LineItem.displayName,LineItem=props=>{const{type="skus",children}=props,{lineItems}=useContext(LineItemContext),{lineItems:shipmentLineItems}=useContext(ShipmentChildrenContext),items=shipmentLineItems&&(shipmentLineItems==null?void 0:shipmentLineItems.length)>0?shipmentLineItems:lineItems,components2=items&&items.filter(l=>l.item_type===type).map((lineItem,k,check)=>{var _a;if(lineItem.item_type==="bundles"&&k>0&&((_a=check[k-1])===null||_a===void 0?void 0:_a.bundle_code)===lineItem.bundle_code||lineItem.item_type==="gift_cards"&&(lineItem==null?void 0:lineItem.total_amount_cents)&&(lineItem==null?void 0:lineItem.total_amount_cents)<=0)return null;const lineProps={lineItem};return _jsx(LineItemChildrenContext.Provider,Object.assign({value:lineProps},{children}),k)});return _jsx(_Fragment,{children:components2})};LineItem.propTypes=propTypes,LineItem.displayName=displayName;export default LineItem;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
import { BaseAmountComponent, BasePriceType } from '../typings/index';
|
|
3
|
-
export declare type LineItemAmountProps = BaseAmountComponent & {
|
|
4
|
-
type?: BasePriceType;
|
|
5
|
-
};
|
|
6
|
-
declare const LineItemAmount: FunctionComponent<LineItemAmountProps>;
|
|
7
|
-
export default LineItemAmount;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useState,useEffect,useContext}from"react";import getAmount from"../utils/getAmount";import LineItemChildrenContext from"../context/LineItemChildrenContext";import Parent from"./utils/Parent";import components from"../config/components";const propTypes=components.LineItemAmount.propTypes,defaultProps=components.LineItemAmount.defaultProps,displayName=components.LineItemAmount.displayName,LineItemAmount=props=>{const{format="formatted",type="total"}=props,p=__rest(props,["format","type"]),{lineItem}=useContext(LineItemChildrenContext),[price,setPrice]=useState("");useEffect(()=>{if(lineItem){const p2=getAmount({base:"amount",type,format,obj:lineItem});setPrice(p2)}return()=>{setPrice("")}},[lineItem]);const parentProps=Object.assign({price},p);return props.children?_jsx(Parent,Object.assign({},parentProps,{children:props.children})):_jsx("span",Object.assign({},p,{children:price}))};LineItemAmount.propTypes=propTypes,LineItemAmount.defaultProps=defaultProps,LineItemAmount.displayName=displayName;export default LineItemAmount;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
import { LineItem } from '@commercelayer/sdk';
|
|
3
|
-
export declare type LineItemCodeType = Omit<LineItemNameProps, 'children'> & {
|
|
4
|
-
lineItem: LineItem;
|
|
5
|
-
skuCode: string;
|
|
6
|
-
};
|
|
7
|
-
declare type LineItemNameProps = {
|
|
8
|
-
children?: (props: LineItemCodeType) => ReactNode;
|
|
9
|
-
type?: 'sku_code' | 'bundle_code';
|
|
10
|
-
} & JSX.IntrinsicElements['p'];
|
|
11
|
-
declare const LineItemCode: FunctionComponent<LineItemNameProps>;
|
|
12
|
-
export default LineItemCode;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import LineItemChildrenContext from"../context/LineItemChildrenContext";import Parent from"./utils/Parent";import components from"../config/components";const propTypes=components.LineItemCode.propTypes,displayName=components.LineItemCode.displayName,LineItemCode=_a=>{var{type="sku_code",children}=_a,p=__rest(_a,["type","children"]);const{lineItem}=useContext(LineItemChildrenContext),labelName=lineItem==null?void 0:lineItem[type],parentProps=Object.assign({lineItem,skuCode:labelName},p);return children?_jsx(Parent,Object.assign({},parentProps,{children})):_jsx("p",Object.assign({},p,{children:labelName}))};LineItemCode.propTypes=propTypes,LineItemCode.displayName=displayName;export default LineItemCode;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
import { LineItem } from '@commercelayer/sdk';
|
|
3
|
-
import { LineItemType } from '../typings/index';
|
|
4
|
-
export declare type LineItemImageType = Omit<LineItemImageProps, 'children'> & {
|
|
5
|
-
src: string;
|
|
6
|
-
lineItem: LineItem;
|
|
7
|
-
};
|
|
8
|
-
declare type LineItemImageProps = {
|
|
9
|
-
children?: (props: LineItemImageType) => ReactNode;
|
|
10
|
-
width?: number;
|
|
11
|
-
placeholder?: {
|
|
12
|
-
[K in LineItemType]?: string;
|
|
13
|
-
};
|
|
14
|
-
} & Omit<JSX.IntrinsicElements['img'], 'src' | 'srcSet' | 'placeholder'>;
|
|
15
|
-
declare const LineItemImage: FunctionComponent<LineItemImageProps>;
|
|
16
|
-
export default LineItemImage;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import Parent from"./utils/Parent";import LineItemChildrenContext from"../context/LineItemChildrenContext";import components from"../config/components";import{defaultGiftCardImgUrl,defaultImgUrl}from"../utils/placeholderImages";const propTypes=components.LineItemImage.propTypes,displayName=components.LineItemImage.displayName,LineItemImage=props=>{const{placeholder,children}=props,p=__rest(props,["placeholder","children"]),{lineItem}=useContext(LineItemChildrenContext),itemType=lineItem==null?void 0:lineItem.item_type;let src=lineItem==null?void 0:lineItem.image_url;src||((placeholder==null?void 0:placeholder[itemType])?src=placeholder==null?void 0:placeholder[itemType]:src=itemType==="gift_cards"?defaultGiftCardImgUrl:defaultImgUrl);const parenProps=Object.assign({lineItem,src,placeholder},p);return children?_jsx(Parent,Object.assign({},parenProps,{children})):src?_jsx("img",Object.assign({alt:"",src},p)):null};LineItemImage.propTypes=propTypes,LineItemImage.displayName=displayName;export default LineItemImage;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
import type { LineItem } from '@commercelayer/sdk';
|
|
3
|
-
export declare type LineItemNameType = Omit<LineItemNameProps, 'children'> & {
|
|
4
|
-
label: string;
|
|
5
|
-
lineItem: LineItem;
|
|
6
|
-
};
|
|
7
|
-
declare type LineItemNameProps = {
|
|
8
|
-
children?: (props: LineItemNameType) => ReactNode;
|
|
9
|
-
} & JSX.IntrinsicElements['p'];
|
|
10
|
-
declare const LineItemName: FunctionComponent<LineItemNameProps>;
|
|
11
|
-
export default LineItemName;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import LineItemChildrenContext from"../context/LineItemChildrenContext";import Parent from"./utils/Parent";import components from"../config/components";const propTypes=components.LineItemName.propTypes,displayName=components.LineItemName.displayName,LineItemName=props=>{const{lineItem}=useContext(LineItemChildrenContext),label=lineItem==null?void 0:lineItem.name,parentProps=Object.assign({label,lineItem},props);return props.children?_jsx(Parent,Object.assign({},parentProps,{children:props.children})):_jsx("p",Object.assign({},props,{children:label}))};LineItemName.propTypes=propTypes,LineItemName.displayName=displayName;export default LineItemName;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, CSSProperties } from 'react';
|
|
2
|
-
import { LineItemOption as LineItemOptionType } from '@commercelayer/sdk';
|
|
3
|
-
import { FunctionChildren } from '../typings/index';
|
|
4
|
-
declare type LineItemOptionChildrenProps = FunctionChildren<Omit<LineItemOptionProps, 'children'> & {
|
|
5
|
-
lineItemOption: LineItemOptionType;
|
|
6
|
-
}>;
|
|
7
|
-
declare type LineItemOptionProps = {
|
|
8
|
-
id?: string;
|
|
9
|
-
className?: string;
|
|
10
|
-
key?: string;
|
|
11
|
-
style?: CSSProperties;
|
|
12
|
-
children?: LineItemOptionChildrenProps;
|
|
13
|
-
name?: string;
|
|
14
|
-
valueClassName?: string;
|
|
15
|
-
tagElement?: keyof JSX.IntrinsicElements;
|
|
16
|
-
tagContainer?: keyof JSX.IntrinsicElements;
|
|
17
|
-
};
|
|
18
|
-
declare const LineItemOption: FunctionComponent<LineItemOptionProps>;
|
|
19
|
-
export default LineItemOption;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{useContext}from"react";import LineItemOptionChildrenContext from"../context/LineItemOptionChildrenContext";import get from"lodash/get";import has from"lodash/has";import map from"lodash/map";import Parent from"./utils/Parent";import components from"../config/components";import isJSON from"../utils/isJSON";const propTypes=components.LineItemOption.propTypes,displayName=components.LineItemOption.displayName,LineItemOption=props=>{const{name,children,valueClassName,id,key,tagElement="li",tagContainer="ul"}=props,p=__rest(props,["name","children","valueClassName","id","key","tagElement","tagContainer"]),{lineItemOption,showAll}=useContext(LineItemOptionChildrenContext),parentProps=Object.assign(Object.assign({},props),{lineItemOption}),TagElement=tagElement,TagContainer=tagContainer,components2=showAll&&isJSON(JSON.stringify(lineItemOption==null?void 0:lineItemOption.options))?map(lineItemOption==null?void 0:lineItemOption.options,(value,key2)=>_jsxs(TagElement,Object.assign({},p,{children:[`${key2}:`,_jsx("span",Object.assign({className:valueClassName},{children:`${value}`}))]}),key2)):has(lineItemOption,`options.${name}`)?_jsxs(TagElement,Object.assign({},p,{children:[`${name}:`,_jsx("span",Object.assign({className:valueClassName},p,{children:`${get(lineItemOption,`options.${name}`)}`}))]}),key):null;return children?_jsx(Parent,Object.assign({},parentProps,{children:props.children})):_jsx(TagContainer,{children:components2})};LineItemOption.propTypes=propTypes,LineItemOption.displayName=displayName;export default LineItemOption;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export declare type LineItemOptionsProps = JSX.IntrinsicElements['div'] & {
|
|
3
|
-
children: ReactNode;
|
|
4
|
-
title?: string;
|
|
5
|
-
showName?: boolean;
|
|
6
|
-
titleTagElement?: keyof JSX.IntrinsicElements;
|
|
7
|
-
titleClassName?: string;
|
|
8
|
-
} & ({
|
|
9
|
-
skuOptionId: string;
|
|
10
|
-
showAll?: never;
|
|
11
|
-
} | {
|
|
12
|
-
skuOptionId?: never;
|
|
13
|
-
showAll: true;
|
|
14
|
-
});
|
|
15
|
-
declare const LineItemOptions: React.FunctionComponent<LineItemOptionsProps>;
|
|
16
|
-
export default LineItemOptions;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{useContext}from"react";import LineItemChildrenContext from"../context/LineItemChildrenContext";import LineItemOptionChildrenContext from"../context/LineItemOptionChildrenContext";import{isEmpty}from"lodash";import components from"../config/components";const displayName=components.LineItemOptions.displayName,LineItemOptions=props=>{const{skuOptionId,title,children,showName=!0,showAll,className,titleTagElement="h6",titleClassName}=props,p=__rest(props,["skuOptionId","title","children","showName","showAll","className","titleTagElement","titleClassName"]),{lineItem}=useContext(LineItemChildrenContext),lineItemOptions=isEmpty(lineItem)?[]:(lineItem==null?void 0:lineItem.line_item_options)||[],TitleTagElement=titleTagElement,options=lineItemOptions.filter(o=>showAll?!0:o.skuOption().id===skuOptionId).map((o,k)=>{const showTitle=showName?_jsx(TitleTagElement,Object.assign({className:titleClassName},{children:title||o.name})):null,valueProps={lineItemOption:o,showAll};return _jsxs("div",Object.assign({className},p,{children:[showTitle,_jsx(LineItemOptionChildrenContext.Provider,Object.assign({value:valueProps},{children}))]}),k)});return _jsx(_Fragment,{children:options})};LineItemOptions.displayName=displayName;export default LineItemOptions;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
import { FunctionChildren } from '../typings/index';
|
|
3
|
-
declare type LineItemQuantityChildrenProps = FunctionChildren<Omit<LineItemQuantityProps, 'children'> & {
|
|
4
|
-
quantity: number;
|
|
5
|
-
handleChange: (event: React.MouseEvent<HTMLSelectElement>) => void;
|
|
6
|
-
}>;
|
|
7
|
-
declare type LineItemQuantityProps = {
|
|
8
|
-
children?: LineItemQuantityChildrenProps;
|
|
9
|
-
max?: number;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
readonly?: boolean;
|
|
12
|
-
} & (JSX.IntrinsicElements['select'] & JSX.IntrinsicElements['span']);
|
|
13
|
-
declare const LineItemQuantity: FunctionComponent<LineItemQuantityProps>;
|
|
14
|
-
export default LineItemQuantity;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import LineItemChildrenContext from"../context/LineItemChildrenContext";import LineItemContext from"../context/LineItemContext";import Parent from"./utils/Parent";import components from"../config/components";const propTypes=components.LineItemQuantity.propTypes,defaultProps=components.LineItemQuantity.defaultProps,displayName=components.LineItemQuantity.displayName,LineItemQuantity=props=>{const{max=50,readonly=!1}=props,p=__rest(props,["max","readonly"]),{lineItem}=useContext(LineItemChildrenContext),{updateLineItem}=useContext(LineItemContext),options=[];for(let i=1;i<=max;i++)options.push(_jsx("option",Object.assign({value:`${i}`},{children:i}),i));const handleChange=e=>{const quantity2=Number(e.target.value);updateLineItem&&lineItem&&updateLineItem(lineItem.id,quantity2)},quantity=lineItem==null?void 0:lineItem.quantity,parentProps=Object.assign({handleChange,quantity},props);return props.children?_jsx(Parent,Object.assign({},parentProps,{children:props.children})):readonly?_jsx("span",Object.assign({},p,{children:quantity})):_jsx("select",Object.assign({title:lineItem==null?void 0:lineItem.name,value:quantity,onChange:handleChange},p,{children:options}))};LineItemQuantity.propTypes=propTypes,LineItemQuantity.defaultProps=defaultProps,LineItemQuantity.displayName=displayName;export default LineItemQuantity;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, PropsWithoutRef } from 'react';
|
|
2
|
-
import { FunctionChildren } from '../typings/index';
|
|
3
|
-
declare type ChildrenLineItemRemoveLinkProps = FunctionChildren<{
|
|
4
|
-
handleRemove: (event: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
5
|
-
label?: string;
|
|
6
|
-
}>;
|
|
7
|
-
declare type LineItemRemoveLinkProps = {
|
|
8
|
-
children?: ChildrenLineItemRemoveLinkProps;
|
|
9
|
-
label?: string;
|
|
10
|
-
} & PropsWithoutRef<JSX.IntrinsicElements['a']>;
|
|
11
|
-
declare const LineItemRemoveLink: FunctionComponent<LineItemRemoveLinkProps>;
|
|
12
|
-
export default LineItemRemoveLink;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import LineItemChildrenContext from"../context/LineItemChildrenContext";import LineItemContext from"../context/LineItemContext";import Parent from"./utils/Parent";import components from"../config/components";const propTypes=components.LineItemRemoveLink.propTypes,defaultProps=components.LineItemRemoveLink.defaultProps,displayName=components.LineItemRemoveLink.displayName,LineItemRemoveLink=props=>{const{label="Remove"}=props,{lineItem}=useContext(LineItemChildrenContext),{deleteLineItem}=useContext(LineItemContext),handleRemove=e=>{e.preventDefault(),deleteLineItem&&lineItem&&deleteLineItem(lineItem.id)},parentProps=Object.assign({handleRemove},props);return props.children?_jsx(Parent,Object.assign({},parentProps,{children:props.children})):_jsx("a",Object.assign({},props,{href:"#",onClick:handleRemove},{children:label}))};LineItemRemoveLink.propTypes=propTypes,LineItemRemoveLink.defaultProps=defaultProps,LineItemRemoveLink.displayName=displayName;export default LineItemRemoveLink;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
declare type LineItemsContainer = {
|
|
3
|
-
children: ReactNode;
|
|
4
|
-
filters?: Record<string, any>;
|
|
5
|
-
loader?: ReactNode;
|
|
6
|
-
};
|
|
7
|
-
declare const LineItemsContainer: FunctionComponent<LineItemsContainer>;
|
|
8
|
-
export default LineItemsContainer;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as _jsx}from"react/jsx-runtime";import{useEffect,useReducer,useContext}from"react";import lineItemReducer,{lineItemInitialState,updateLineItem,deleteLineItem}from"../reducers/LineItemReducer";import OrderContext from"../context/OrderContext";import LineItemContext from"../context/LineItemContext";import CommerceLayerContext from"../context/CommerceLayerContext";import components from"../config/components";const propTypes=components.LineItemsContainer.propTypes,defaultProps=components.LineItemsContainer.defaultProps,displayName=components.LineItemsContainer.displayName,LineItemsContainer=props=>{const{children,loader="Loading..."}=props,{order,addResourceToInclude,include,orderId,getOrder,includeLoaded}=useContext(OrderContext),config=useContext(CommerceLayerContext),[state,dispatch]=useReducer(lineItemReducer,lineItemInitialState);useEffect(()=>{(include==null?void 0:include.includes("line_items.line_item_options.sku_option"))?(includeLoaded==null?void 0:includeLoaded["line_items.line_item_options.sku_option"])||addResourceToInclude({newResourceLoaded:{"line_items.line_item_options.sku_option":!0}}):addResourceToInclude({newResource:["line_items.line_item_options.sku_option"]}),(include==null?void 0:include.includes("line_items.item"))?(includeLoaded==null?void 0:includeLoaded["line_items.item"])||addResourceToInclude({newResourceLoaded:{"line_items.item":!0}}):addResourceToInclude({newResource:["line_items.item"]})},[include,includeLoaded]),useEffect(()=>{(order==null?void 0:order.line_items)&&dispatch({type:"setLineItems",payload:{lineItems:order.line_items}})},[order==null?void 0:order.line_items]);const lineItemValue=Object.assign(Object.assign({},state),{loader,updateLineItem:(lineItemId,quantity=1)=>updateLineItem({lineItemId,quantity,dispatch,config,getOrder,orderId,errors:state.errors}),deleteLineItem:lineItemId=>deleteLineItem({lineItemId,dispatch,config,getOrder,orderId,errors:state.errors})});return _jsx(LineItemContext.Provider,Object.assign({value:lineItemValue},{children:state.loading?loader:children}))};LineItemsContainer.propTypes=propTypes,LineItemsContainer.defaultProps=defaultProps,LineItemsContainer.displayName=displayName;export default LineItemsContainer;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
import { TypeAccepted } from '../utils/getLineItemsCount';
|
|
3
|
-
import { FunctionChildren } from '../typings/index';
|
|
4
|
-
declare type LineItemsCountChildrenProps = FunctionChildren<Omit<LineItemsCountProps, 'children'> & {
|
|
5
|
-
quantity: number;
|
|
6
|
-
}>;
|
|
7
|
-
declare type LineItemsCountProps = {
|
|
8
|
-
children?: LineItemsCountChildrenProps;
|
|
9
|
-
typeAccepted?: TypeAccepted[];
|
|
10
|
-
} & JSX.IntrinsicElements['span'];
|
|
11
|
-
declare const LineItemsCount: FunctionComponent<LineItemsCountProps>;
|
|
12
|
-
export default LineItemsCount;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext,useState,useEffect}from"react";import Parent from"./utils/Parent";import getLineItemsCount from"../utils/getLineItemsCount";import LineItemContext from"../context/LineItemContext";import components from"../config/components";const propTypes=components.LineItemsCount.propTypes,displayName=components.LineItemsCount.displayName,LineItemsCount=props=>{const{children,typeAccepted}=props,p=__rest(props,["children","typeAccepted"]),{lineItems}=useContext(LineItemContext),[quantity,setQuantity]=useState(0);useEffect(()=>{if(lineItems&&lineItems.length>0){const qty=getLineItemsCount({lineItems:lineItems||[],typeAccepted});setQuantity(qty)}return()=>{setQuantity(0)}},[lineItems,typeAccepted]);const parentProps=Object.assign({quantity,typeAccepted},p);return children?_jsx(Parent,Object.assign({},parentProps,{children})):_jsx("span",Object.assign({},p,{children:quantity}))};LineItemsCount.propTypes=propTypes,LineItemsCount.displayName=displayName;export default LineItemsCount;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FunctionChildren } from '../typings/index';
|
|
3
|
-
export declare type LineItemsCountType = FunctionChildren<Omit<LineItemsCountProps, 'children'> & {
|
|
4
|
-
quantity: number;
|
|
5
|
-
text: string;
|
|
6
|
-
}>;
|
|
7
|
-
declare type LineItemsCountProps = {
|
|
8
|
-
children?: LineItemsCountType;
|
|
9
|
-
text?: string;
|
|
10
|
-
} & JSX.IntrinsicElements['span'];
|
|
11
|
-
declare function LineItemsEmpty(props: LineItemsCountProps): JSX.Element | null;
|
|
12
|
-
declare namespace LineItemsEmpty {
|
|
13
|
-
var propTypes: {
|
|
14
|
-
children: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
15
|
-
id: import("prop-types").Requireable<string>;
|
|
16
|
-
className: import("prop-types").Requireable<string>;
|
|
17
|
-
name: import("prop-types").Requireable<string>;
|
|
18
|
-
style: import("prop-types").Requireable<object>;
|
|
19
|
-
text: import("prop-types").Requireable<string>;
|
|
20
|
-
};
|
|
21
|
-
var displayName: string;
|
|
22
|
-
}
|
|
23
|
-
export default LineItemsEmpty;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext,useState,useEffect}from"react";import Parent from"./utils/Parent";import getLineItemsCount from"../utils/getLineItemsCount";import LineItemContext from"../context/LineItemContext";import components from"../config/components";const propTypes=components.LineItemsEmpty.propTypes,displayName=components.LineItemsEmpty.displayName;export default function LineItemsEmpty(props){const{children,text="Your shopping bag is empty"}=props,p=__rest(props,["children","text"]),{lineItems}=useContext(LineItemContext),[quantity,setQuantity]=useState(),emptyText=quantity===0?_jsx("span",Object.assign({},p,{children:text})):null;useEffect(()=>{if(lineItems)if(lineItems.length>0){const qty=getLineItemsCount({lineItems:lineItems||[]});setQuantity(qty)}else setQuantity(0);return()=>{setQuantity(void 0)}},[lineItems]);const parentProps=Object.assign({quantity,text},p);return children?_jsx(Parent,Object.assign({},parentProps,{children})):emptyText}LineItemsEmpty.propTypes=propTypes,LineItemsEmpty.displayName=displayName;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
import { BaseInputComponentProps } from '../typings/index';
|
|
3
|
-
export declare type MetadataInputProps = BaseInputComponentProps & JSX.IntrinsicElements['input'] & JSX.IntrinsicElements['textarea'];
|
|
4
|
-
declare const MetadataInput: FunctionComponent<MetadataInputProps>;
|
|
5
|
-
export default MetadataInput;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as _jsx}from"react/jsx-runtime";import BaseInput from"./utils/BaseInput";import components from"../config/components";const propTypes=components.MetadataInput.propTypes,displayName=components.MetadataInput.displayName,MetadataInput=props=>_jsx(BaseInput,Object.assign({"data-metadata":!0},props));MetadataInput.propTypes=propTypes,MetadataInput.displayName=displayName;export default MetadataInput;
|