@commercelayer/react-components 2.48.0 → 2.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/components/AddToCartButton.js +1 -1
- package/lib/cjs/components/Address.js +1 -1
- package/lib/cjs/components/AddressCountrySelector.js +1 -1
- package/lib/cjs/components/AddressField.js +1 -1
- package/lib/cjs/components/AddressInput.js +1 -1
- package/lib/cjs/components/AddressStateSelector.js +1 -1
- package/lib/cjs/components/AddressesContainer.js +1 -1
- package/lib/cjs/components/AdyenPayment.js +1 -1
- package/lib/cjs/components/AvailabilityContainer.js +1 -1
- package/lib/cjs/components/AvailabilityTemplate.d.ts +5 -1
- package/lib/cjs/components/AvailabilityTemplate.js +1 -1
- package/lib/cjs/components/BillingAddressContainer.js +1 -1
- package/lib/cjs/components/BillingAddressForm.js +1 -1
- package/lib/cjs/components/BraintreePayment.js +1 -1
- package/lib/cjs/components/CheckoutLink.js +1 -1
- package/lib/cjs/components/CommerceLayer.js +1 -1
- package/lib/cjs/components/CustomerContainer.js +1 -1
- package/lib/cjs/components/CustomerInput.js +1 -1
- package/lib/cjs/components/DeliveryLeadTime.js +1 -1
- package/lib/cjs/components/DiscountAmount.js +1 -1
- package/lib/cjs/components/Errors.js +1 -1
- package/lib/cjs/components/ExternalFunction.js +1 -1
- package/lib/cjs/components/GiftCard.js +1 -1
- package/lib/cjs/components/GiftCardAmount.js +1 -1
- package/lib/cjs/components/GiftCardContainer.js +1 -1
- package/lib/cjs/components/GiftCardCurrencySelector.js +1 -1
- package/lib/cjs/components/GiftCardInput.js +1 -1
- package/lib/cjs/components/GiftCardOrCouponCode.js +1 -1
- package/lib/cjs/components/GiftCardOrCouponForm.js +1 -1
- package/lib/cjs/components/GiftCardOrCouponInput.js +1 -1
- package/lib/cjs/components/GiftCardOrCouponRemoveButton.js +1 -1
- package/lib/cjs/components/GiftCardOrCouponSubmit.js +1 -1
- package/lib/cjs/components/ItemContainer.js +1 -1
- package/lib/cjs/components/LineItem.js +1 -1
- package/lib/cjs/components/LineItemAmount.js +1 -1
- package/lib/cjs/components/LineItemCode.js +1 -1
- package/lib/cjs/components/LineItemImage.js +1 -1
- package/lib/cjs/components/LineItemName.js +1 -1
- package/lib/cjs/components/LineItemOption.js +1 -1
- package/lib/cjs/components/LineItemOptions.js +1 -1
- package/lib/cjs/components/LineItemQuantity.js +1 -1
- package/lib/cjs/components/LineItemRemoveLink.js +1 -1
- package/lib/cjs/components/LineItemsContainer.js +1 -1
- package/lib/cjs/components/LineItemsCount.js +1 -1
- package/lib/cjs/components/MetadataInput.js +1 -1
- package/lib/cjs/components/OrderContainer.js +1 -1
- package/lib/cjs/components/OrderNumber.js +1 -1
- package/lib/cjs/components/OrderStorage.js +1 -1
- package/lib/cjs/components/PaymentGateway.js +1 -1
- package/lib/cjs/components/PaymentMethod.js +1 -1
- package/lib/cjs/components/PaymentMethodAmount.js +1 -1
- package/lib/cjs/components/PaymentMethodName.js +1 -1
- package/lib/cjs/components/PaymentMethodPrice.js +1 -1
- package/lib/cjs/components/PaymentMethodRadioButton.js +1 -1
- package/lib/cjs/components/PaymentMethodsContainer.js +1 -1
- package/lib/cjs/components/PaymentSource.js +1 -1
- package/lib/cjs/components/PaymentSourceBrandIcon.js +1 -1
- package/lib/cjs/components/PaymentSourceBrandName.js +1 -1
- package/lib/cjs/components/PaymentSourceDetail.js +1 -1
- package/lib/cjs/components/PaymentSourceEditButton.js +1 -1
- package/lib/cjs/components/PaypalPayment.js +1 -1
- package/lib/cjs/components/PlaceOrderButton.js +1 -1
- package/lib/cjs/components/PlaceOrderContainer.js +1 -1
- package/lib/cjs/components/Price.js +1 -1
- package/lib/cjs/components/PricesContainer.js +1 -1
- package/lib/cjs/components/PrivacyAndTermsCheckbox.js +1 -1
- package/lib/cjs/components/QuantitySelector.js +1 -1
- package/lib/cjs/components/SaveAddressesButton.js +1 -1
- package/lib/cjs/components/SaveCustomerButton.js +1 -1
- package/lib/cjs/components/Shipment.js +1 -1
- package/lib/cjs/components/ShipmentField.js +1 -1
- package/lib/cjs/components/ShipmentsContainer.js +1 -1
- package/lib/cjs/components/ShippingAddressContainer.js +1 -1
- package/lib/cjs/components/ShippingAddressForm.js +1 -1
- package/lib/cjs/components/ShippingAmount.js +1 -1
- package/lib/cjs/components/ShippingMethod.js +1 -1
- package/lib/cjs/components/ShippingMethodName.js +1 -1
- package/lib/cjs/components/ShippingMethodPrice.js +1 -1
- package/lib/cjs/components/ShippingMethodRadioButton.js +1 -1
- package/lib/cjs/components/SkuList.js +1 -1
- package/lib/cjs/components/SkuListsContainer.js +1 -1
- package/lib/cjs/components/SkuOption.js +1 -1
- package/lib/cjs/components/SkuOptionInput.js +1 -1
- package/lib/cjs/components/SkuOptionsContainer.js +1 -1
- package/lib/cjs/components/StockTransfer.js +1 -1
- package/lib/cjs/components/StockTransferField.js +1 -1
- package/lib/cjs/components/StripePayment.js +1 -1
- package/lib/cjs/components/SubTotalAmount.js +1 -1
- package/lib/cjs/components/SubmitButton.js +1 -1
- package/lib/cjs/components/TaxesAmount.js +1 -1
- package/lib/cjs/components/TotalAmount.js +1 -1
- package/lib/cjs/components/VariantSelector.js +1 -1
- package/lib/cjs/components/VariantsContainer.js +1 -1
- package/lib/cjs/components/WireTransferPayment.js +1 -1
- package/lib/cjs/components/gateways/AdyenGateway.js +1 -1
- package/lib/cjs/components/gateways/BraintreeGateway.js +1 -1
- package/lib/cjs/components/gateways/PaypalGateway.js +1 -1
- package/lib/cjs/components/gateways/StripeGateway.js +1 -1
- package/lib/cjs/components/gateways/WireTransferGateway.js +1 -1
- package/lib/cjs/components/utils/AddressCardsTemplate.js +1 -1
- package/lib/cjs/components/utils/BaseField.js +1 -1
- package/lib/cjs/components/utils/BaseInput.js +1 -1
- package/lib/cjs/components/utils/BaseOrderPrice.js +1 -1
- package/lib/cjs/components/utils/BaseSelect.js +1 -1
- package/lib/cjs/components/utils/Parent.js +1 -1
- package/lib/cjs/components/utils/PaymentCardsTemplate.js +1 -1
- package/lib/cjs/components/utils/PriceTemplate.js +1 -1
- package/lib/cjs/components/utils/VariantTemplate.js +1 -1
- package/lib/cjs/components/utils/getAllErrors.js +1 -1
- package/lib/cjs/config/components.js +1 -1
- package/lib/cjs/config/currency.js +1 -1
- package/lib/cjs/context/AddressChildrenContext.js +1 -1
- package/lib/cjs/context/AddressContext.js +1 -1
- package/lib/cjs/context/AvailabilityContext.js +1 -1
- package/lib/cjs/context/BillingAddressContext.js +1 -1
- package/lib/cjs/context/BillingAddressFormContext.js +1 -1
- package/lib/cjs/context/CommerceLayerContext.js +1 -1
- package/lib/cjs/context/CouponAndGiftCardFormContext.js +1 -1
- package/lib/cjs/context/CustomerContext.js +1 -1
- package/lib/cjs/context/ExternalFunctionContext.js +1 -1
- package/lib/cjs/context/GiftCardContext.js +1 -1
- package/lib/cjs/context/ItemContext.js +1 -1
- package/lib/cjs/context/LineItemChildrenContext.js +1 -1
- package/lib/cjs/context/LineItemContext.js +1 -1
- package/lib/cjs/context/LineItemOptionChildrenContext.js +1 -1
- package/lib/cjs/context/OrderContext.js +1 -1
- package/lib/cjs/context/OrderStorageContext.js +1 -1
- package/lib/cjs/context/PaymentMethodChildrenContext.js +1 -1
- package/lib/cjs/context/PaymentMethodContext.js +1 -1
- package/lib/cjs/context/PaymentSourceContext.js +1 -1
- package/lib/cjs/context/PlaceOrderContext.js +1 -1
- package/lib/cjs/context/PricesContext.js +1 -1
- package/lib/cjs/context/ShipmentChildrenContext.js +1 -1
- package/lib/cjs/context/ShipmentContext.js +1 -1
- package/lib/cjs/context/ShippingAddressContext.js +1 -1
- package/lib/cjs/context/ShippingAddressFormContext.js +1 -1
- package/lib/cjs/context/ShippingMethodChildrenContext.js +1 -1
- package/lib/cjs/context/SkuListsContext.js +1 -1
- package/lib/cjs/context/SkuOptionChildrenContext.js +1 -1
- package/lib/cjs/context/SkuOptionsContext.js +1 -1
- package/lib/cjs/context/StockTransferChildrenContext.js +1 -1
- package/lib/cjs/context/VariantsContext.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/reducers/AddressReducer.js +1 -1
- package/lib/cjs/reducers/AvailabilityReducer.js +1 -1
- package/lib/cjs/reducers/BillingAddressReducer.js +1 -1
- package/lib/cjs/reducers/CustomerReducer.js +1 -1
- package/lib/cjs/reducers/GiftCardReducer.js +1 -1
- package/lib/cjs/reducers/ItemReducer.js +1 -1
- package/lib/cjs/reducers/LineItemReducer.js +1 -1
- package/lib/cjs/reducers/OrderReducer.js +1 -1
- package/lib/cjs/reducers/PaymentMethodReducer.js +1 -1
- package/lib/cjs/reducers/PlaceOrderReducer.js +1 -1
- package/lib/cjs/reducers/PriceReducer.js +1 -1
- package/lib/cjs/reducers/ShipmentReducer.js +1 -1
- package/lib/cjs/reducers/ShippingAddressReducer.js +1 -1
- package/lib/cjs/reducers/SkuListsReducer.js +1 -1
- package/lib/cjs/reducers/SkuOptionsReducer.js +1 -1
- package/lib/cjs/reducers/VariantReducer.js +1 -1
- package/lib/cjs/typings/errors.js +1 -1
- package/lib/cjs/typings/index.js +1 -1
- package/lib/cjs/utils/PropsType.js +1 -1
- package/lib/cjs/utils/addressesManager.js +1 -1
- package/lib/cjs/utils/baseReducer.js +1 -1
- package/lib/cjs/utils/browserInfo.js +1 -1
- package/lib/cjs/utils/childrenTypes.js +1 -1
- package/lib/cjs/utils/countryStateCity.js +1 -1
- package/lib/cjs/utils/customMessages.js +1 -1
- package/lib/cjs/utils/customerOrderOptions.js +1 -1
- package/lib/cjs/utils/getAmount.js +1 -1
- package/lib/cjs/utils/getCurrentItemKey.js +1 -1
- package/lib/cjs/utils/getErrors.js +1 -1
- package/lib/cjs/utils/getLineItemsCount.js +1 -1
- package/lib/cjs/utils/getLoaderComponent.js +1 -1
- package/lib/cjs/utils/getPrices.js +1 -1
- package/lib/cjs/utils/getSdk.js +1 -1
- package/lib/cjs/utils/getSkus.js +1 -1
- package/lib/cjs/utils/isEmptyStates.js +1 -1
- package/lib/cjs/utils/isJSON.js +1 -1
- package/lib/cjs/utils/jwt.js +1 -1
- package/lib/cjs/utils/localStorage.js +1 -1
- package/lib/cjs/utils/organization.js +1 -1
- package/lib/cjs/utils/paypalPayment.js +1 -1
- package/lib/cjs/utils/promisify.js +1 -1
- package/lib/cjs/utils/shipments.js +1 -1
- package/lib/cjs/utils/validateFormFields.js +1 -1
- package/lib/esm/components/AddToCartButton.js +1 -1
- package/lib/esm/components/Address.js +1 -1
- package/lib/esm/components/AddressCountrySelector.js +1 -1
- package/lib/esm/components/AddressField.js +1 -1
- package/lib/esm/components/AddressInput.js +1 -1
- package/lib/esm/components/AddressStateSelector.js +1 -1
- package/lib/esm/components/AddressesContainer.js +1 -1
- package/lib/esm/components/AdyenPayment.js +1 -1
- package/lib/esm/components/AvailabilityContainer.js +1 -1
- package/lib/esm/components/AvailabilityTemplate.d.ts +5 -1
- package/lib/esm/components/AvailabilityTemplate.js +1 -1
- package/lib/esm/components/BillingAddressContainer.js +1 -1
- package/lib/esm/components/BillingAddressForm.js +1 -1
- package/lib/esm/components/BraintreePayment.js +1 -1
- package/lib/esm/components/CheckoutLink.js +1 -1
- package/lib/esm/components/CommerceLayer.js +1 -1
- package/lib/esm/components/CustomerContainer.js +1 -1
- package/lib/esm/components/CustomerInput.js +1 -1
- package/lib/esm/components/DeliveryLeadTime.js +1 -1
- package/lib/esm/components/DiscountAmount.js +1 -1
- package/lib/esm/components/Errors.js +1 -1
- package/lib/esm/components/ExternalFunction.js +1 -1
- package/lib/esm/components/GiftCard.js +1 -1
- package/lib/esm/components/GiftCardAmount.js +1 -1
- package/lib/esm/components/GiftCardContainer.js +1 -1
- package/lib/esm/components/GiftCardCurrencySelector.js +1 -1
- package/lib/esm/components/GiftCardInput.js +1 -1
- package/lib/esm/components/GiftCardOrCouponCode.js +1 -1
- package/lib/esm/components/GiftCardOrCouponForm.js +1 -1
- package/lib/esm/components/GiftCardOrCouponInput.js +1 -1
- package/lib/esm/components/GiftCardOrCouponRemoveButton.js +1 -1
- package/lib/esm/components/GiftCardOrCouponSubmit.js +1 -1
- package/lib/esm/components/ItemContainer.js +1 -1
- package/lib/esm/components/LineItem.js +1 -1
- package/lib/esm/components/LineItemAmount.js +1 -1
- package/lib/esm/components/LineItemCode.js +1 -1
- package/lib/esm/components/LineItemImage.js +1 -1
- package/lib/esm/components/LineItemName.js +1 -1
- package/lib/esm/components/LineItemOption.js +1 -1
- package/lib/esm/components/LineItemOptions.js +1 -1
- package/lib/esm/components/LineItemQuantity.js +1 -1
- package/lib/esm/components/LineItemRemoveLink.js +1 -1
- package/lib/esm/components/LineItemsContainer.js +1 -1
- package/lib/esm/components/LineItemsCount.js +1 -1
- package/lib/esm/components/MetadataInput.js +1 -1
- package/lib/esm/components/OrderContainer.js +1 -1
- package/lib/esm/components/OrderNumber.js +1 -1
- package/lib/esm/components/OrderStorage.js +1 -1
- package/lib/esm/components/PaymentGateway.js +1 -1
- package/lib/esm/components/PaymentMethod.js +1 -1
- package/lib/esm/components/PaymentMethodAmount.js +1 -1
- package/lib/esm/components/PaymentMethodName.js +1 -1
- package/lib/esm/components/PaymentMethodPrice.js +1 -1
- package/lib/esm/components/PaymentMethodRadioButton.js +1 -1
- package/lib/esm/components/PaymentMethodsContainer.js +1 -1
- package/lib/esm/components/PaymentSource.js +1 -1
- package/lib/esm/components/PaymentSourceBrandIcon.js +1 -1
- package/lib/esm/components/PaymentSourceBrandName.js +1 -1
- package/lib/esm/components/PaymentSourceDetail.js +1 -1
- package/lib/esm/components/PaymentSourceEditButton.js +1 -1
- package/lib/esm/components/PaypalPayment.js +1 -1
- package/lib/esm/components/PlaceOrderButton.js +1 -1
- package/lib/esm/components/PlaceOrderContainer.js +1 -1
- package/lib/esm/components/Price.js +1 -1
- package/lib/esm/components/PricesContainer.js +1 -1
- package/lib/esm/components/PrivacyAndTermsCheckbox.js +1 -1
- package/lib/esm/components/QuantitySelector.js +1 -1
- package/lib/esm/components/SaveAddressesButton.js +1 -1
- package/lib/esm/components/SaveCustomerButton.js +1 -1
- package/lib/esm/components/Shipment.js +1 -1
- package/lib/esm/components/ShipmentField.js +1 -1
- package/lib/esm/components/ShipmentsContainer.js +1 -1
- package/lib/esm/components/ShippingAddressContainer.js +1 -1
- package/lib/esm/components/ShippingAddressForm.js +1 -1
- package/lib/esm/components/ShippingAmount.js +1 -1
- package/lib/esm/components/ShippingMethod.js +1 -1
- package/lib/esm/components/ShippingMethodName.js +1 -1
- package/lib/esm/components/ShippingMethodPrice.js +1 -1
- package/lib/esm/components/ShippingMethodRadioButton.js +1 -1
- package/lib/esm/components/SkuList.js +1 -1
- package/lib/esm/components/SkuListsContainer.js +1 -1
- package/lib/esm/components/SkuOption.js +1 -1
- package/lib/esm/components/SkuOptionInput.js +1 -1
- package/lib/esm/components/SkuOptionsContainer.js +1 -1
- package/lib/esm/components/StockTransfer.js +1 -1
- package/lib/esm/components/StockTransferField.js +1 -1
- package/lib/esm/components/StripePayment.js +1 -1
- package/lib/esm/components/SubTotalAmount.js +1 -1
- package/lib/esm/components/SubmitButton.js +1 -1
- package/lib/esm/components/TaxesAmount.js +1 -1
- package/lib/esm/components/TotalAmount.js +1 -1
- package/lib/esm/components/VariantSelector.js +1 -1
- package/lib/esm/components/VariantsContainer.js +1 -1
- package/lib/esm/components/WireTransferPayment.js +1 -1
- package/lib/esm/components/gateways/AdyenGateway.js +1 -1
- package/lib/esm/components/gateways/BraintreeGateway.js +1 -1
- package/lib/esm/components/gateways/PaypalGateway.js +1 -1
- package/lib/esm/components/gateways/StripeGateway.js +1 -1
- package/lib/esm/components/gateways/WireTransferGateway.js +1 -1
- package/lib/esm/components/utils/AddressCardsTemplate.js +1 -1
- package/lib/esm/components/utils/BaseField.js +1 -1
- package/lib/esm/components/utils/BaseInput.js +1 -1
- package/lib/esm/components/utils/BaseOrderPrice.js +1 -1
- package/lib/esm/components/utils/BaseSelect.js +1 -1
- package/lib/esm/components/utils/Parent.js +1 -1
- package/lib/esm/components/utils/PaymentCardsTemplate.js +1 -1
- package/lib/esm/components/utils/PriceTemplate.js +1 -1
- package/lib/esm/components/utils/VariantTemplate.js +1 -1
- package/lib/esm/components/utils/getAllErrors.js +1 -1
- package/lib/esm/config/components.js +1 -1
- package/lib/esm/context/AddressChildrenContext.js +1 -1
- package/lib/esm/context/AddressContext.js +1 -1
- package/lib/esm/context/AvailabilityContext.js +1 -1
- package/lib/esm/context/BillingAddressContext.js +1 -1
- package/lib/esm/context/BillingAddressFormContext.js +1 -1
- package/lib/esm/context/CommerceLayerContext.js +1 -1
- package/lib/esm/context/CouponAndGiftCardFormContext.js +1 -1
- package/lib/esm/context/CustomerContext.js +1 -1
- package/lib/esm/context/ExternalFunctionContext.js +1 -1
- package/lib/esm/context/GiftCardContext.js +1 -1
- package/lib/esm/context/ItemContext.js +1 -1
- package/lib/esm/context/LineItemChildrenContext.js +1 -1
- package/lib/esm/context/LineItemContext.js +1 -1
- package/lib/esm/context/LineItemOptionChildrenContext.js +1 -1
- package/lib/esm/context/OrderContext.js +1 -1
- package/lib/esm/context/OrderStorageContext.js +1 -1
- package/lib/esm/context/PaymentMethodChildrenContext.js +1 -1
- package/lib/esm/context/PaymentMethodContext.js +1 -1
- package/lib/esm/context/PaymentSourceContext.js +1 -1
- package/lib/esm/context/PlaceOrderContext.js +1 -1
- package/lib/esm/context/PricesContext.js +1 -1
- package/lib/esm/context/ShipmentChildrenContext.js +1 -1
- package/lib/esm/context/ShipmentContext.js +1 -1
- package/lib/esm/context/ShippingAddressContext.js +1 -1
- package/lib/esm/context/ShippingAddressFormContext.js +1 -1
- package/lib/esm/context/ShippingMethodChildrenContext.js +1 -1
- package/lib/esm/context/SkuListsContext.js +1 -1
- package/lib/esm/context/SkuOptionChildrenContext.js +1 -1
- package/lib/esm/context/SkuOptionsContext.js +1 -1
- package/lib/esm/context/StockTransferChildrenContext.js +1 -1
- package/lib/esm/context/VariantsContext.js +1 -1
- package/lib/esm/reducers/AddressReducer.js +1 -1
- package/lib/esm/reducers/AvailabilityReducer.js +1 -1
- package/lib/esm/reducers/BillingAddressReducer.js +1 -1
- package/lib/esm/reducers/CustomerReducer.js +1 -1
- package/lib/esm/reducers/GiftCardReducer.js +1 -1
- package/lib/esm/reducers/ItemReducer.js +1 -1
- package/lib/esm/reducers/LineItemReducer.js +1 -1
- package/lib/esm/reducers/OrderReducer.js +1 -1
- package/lib/esm/reducers/PaymentMethodReducer.js +1 -1
- package/lib/esm/reducers/PlaceOrderReducer.js +1 -1
- package/lib/esm/reducers/PriceReducer.js +1 -1
- package/lib/esm/reducers/ShipmentReducer.js +1 -1
- package/lib/esm/reducers/ShippingAddressReducer.js +1 -1
- package/lib/esm/reducers/SkuListsReducer.js +1 -1
- package/lib/esm/reducers/SkuOptionsReducer.js +1 -1
- package/lib/esm/reducers/VariantReducer.js +1 -1
- package/lib/esm/typings/errors.js +1 -1
- package/lib/esm/typings/index.js +1 -1
- package/lib/esm/utils/addressesManager.js +1 -1
- package/lib/esm/utils/baseReducer.js +1 -1
- package/lib/esm/utils/browserInfo.js +1 -1
- package/lib/esm/utils/childrenTypes.js +1 -1
- package/lib/esm/utils/countryStateCity.js +1 -1
- package/lib/esm/utils/customMessages.js +1 -1
- package/lib/esm/utils/customerOrderOptions.js +1 -1
- package/lib/esm/utils/getAmount.js +1 -1
- package/lib/esm/utils/getCurrentItemKey.js +1 -1
- package/lib/esm/utils/getErrors.js +1 -1
- package/lib/esm/utils/getLineItemsCount.js +1 -1
- package/lib/esm/utils/getLoaderComponent.js +1 -1
- package/lib/esm/utils/getPrices.js +1 -1
- package/lib/esm/utils/getSdk.js +1 -1
- package/lib/esm/utils/getSkus.js +1 -1
- package/lib/esm/utils/isEmptyStates.js +1 -1
- package/lib/esm/utils/isJSON.js +1 -1
- package/lib/esm/utils/jwt.js +1 -1
- package/lib/esm/utils/localStorage.js +1 -1
- package/lib/esm/utils/organization.js +1 -1
- package/lib/esm/utils/paypalPayment.js +1 -1
- package/lib/esm/utils/promisify.js +1 -1
- package/lib/esm/utils/shipments.js +1 -1
- package/lib/esm/utils/validateFormFields.js +1 -1
- package/lib/tsconfig.prod.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.prod.tsbuildinfo +1 -1
- package/package.json +17 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as v,jsxs as W}from"react/jsx-runtime";import{useContext as T,useEffect as G,useRef as J,useState as k}from"react";import Q from"../context/PaymentMethodContext";import f from"lodash/isEmpty";import{setCustomerOrderParam as R}from"../utils/localStorage";import X from"./utils/Parent";import Z from"../utils/browserInfo";import $ from"../context/PlaceOrderContext";const j={challengeWindowSize:"05"},K={},ee=({clientKey:u,config:M,templateCustomerSaveToWallet:h,environment:q="test",locale:F="en_US"})=>{const{cardContainerClassName:U,threeDSecureContainerClassName:D,placeOrderCallback:C,styles:H}=Object.assign(Object.assign({},K),M),[g,b]=k(!1),[w,L]=k({}),{setPaymentSource:p,paymentSource:r,setPaymentMethodErrors:A,currentPaymentMethodType:P,setPaymentRef:x}=T(Q),{setPlaceOrder:I}=T($),c=J(null),S=async(n,d)=>{var a,e,s,l,o,i,m;const _=(e=(a=n==null?void 0:n.elements)===null||a===void 0?void 0:a.save_payment_source_to_customer_wallet)===null||e===void 0?void 0:e.checked;_&&R("_save_payment_source_to_customer_wallet",_);const y={_authorize:1};try{const t=r&&await p({paymentSourceId:r.id,paymentResource:"adyen_payments",attributes:y});debugger;const N=(s=t==null?void 0:t.payment_response)===null||s===void 0?void 0:s.action,O=(l=t==null?void 0:t.payment_response)===null||l===void 0?void 0:l.resultCode;if(N&&O==="IdentifyShopper")d.createFromAction(N,j).mount("#adyen-action");else if(["Authorised","Pending","Received"].includes(O)){const E=(i=(o=t==null?void 0:t.payment_request_data)===null||o===void 0?void 0:o.payment_method)===null||i===void 0?void 0:i.brand;if(E){const V={metadata:{card:{brand:E}}};await p({paymentSourceId:t==null?void 0:t.id,paymentResource:"adyen_payments",attributes:V})}return!0}const B=(m=t==null?void 0:t.payment_response)===null||m===void 0?void 0:m.refusalReason;return A([{code:"PAYMENT_INTENT_AUTHENTICATION_FAILURE",resource:"payment_methods",field:P,message:B}]),!1}catch(t){return A([{code:"PAYMENT_INTENT_AUTHENTICATION_FAILURE",resource:"payment_methods",field:P,message:t.message}]),!1}},z=async(n,d,a,e)=>{if(n.isValid){if(c.current){const i=await require("@adyen/adyen-web")(a);c.current.onsubmit=()=>S(c.current,i),x({ref:c})}let s=Z();const l={payment_request_data:{payment_method:n.data.paymentMethod,shopperInteraction:"Ecommerce",recurringProcessingModel:"CardOnFile",origin:window.location.origin,return_url:window.location.href,browser_info:Object.assign({acceptHeader:"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8"},s)}};e&&await p({paymentSourceId:e.id,paymentResource:"adyen_payments",attributes:l})}},Y=async(n,d,a)=>{var e,s;const l={payment_request_details:n.data,_details:1};try{const o=r&&await p({paymentSourceId:r.id,paymentResource:"adyen_payments",attributes:l}),i=(e=o==null?void 0:o.payment_response)===null||e===void 0?void 0:e.action,m=(s=o==null?void 0:o.payment_response)===null||s===void 0?void 0:s.resultCode,_=require("@adyen/adyen-web");if(i&&(await _(a)).createFromAction(i,j).mount("#adyen-action"),["Authorised","Pending","Received"].includes(m)){const{placed:y}=I&&await I({paymentSource:o})||{placed:!1};y&&C&&C({placed:y})}}catch(o){console.error("Adyen additional details error:",o)}};return G(()=>{const n=f(r==null?void 0:r.payment_methods)?{}:r==null?void 0:r.payment_methods;f(n)&&console.error("Payment methods are not available. Please, check your Adyen configuration.");const d={locale:F,environment:q,clientKey:u,paymentMethodsResponse:n};return d.onChange=(a,e)=>z(a,e,d,r),d.onAdditionalDetails=(a,e)=>Y(a,e,d),!c&&u&&R("_save_payment_source_to_customer_wallet","false"),u&&!g&&!f(window)&&require("@adyen/adyen-web")(d).then(e=>{e.create("card",{styles:H}).mount("#adyen-card")&&(L(e),b(!0))}),()=>{x({ref:{current:null}}),b(!1)}},[u,c]),!u&&!g&&!w?null:W("form",Object.assign({ref:c,onSubmit:n=>S(n,w)},{children:[v("div",{className:U,id:"adyen-card"},void 0),h&&v(X,Object.assign({},{name:"save_payment_source_to_customer_wallet"},{children:h}),void 0),v("div",{className:D,id:"adyen-action"},void 0)]}),void 0)};export default ee;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as x}from"react/jsx-runtime";import{useContext as d,useReducer as b,useEffect as _}from"react";import g,{availabilityInitialState as A,getAvailability as I}from"../reducers/AvailabilityReducer";import h from"../context/AvailabilityContext";import{isEmpty as j}from"lodash";import k from"../context/ItemContext";import T from"../utils/getCurrentItemKey";import v from"../config/components";import L from"../context/CommerceLayerContext";import O from"../context/LineItemChildrenContext";const q=v.AvailabilityContainer.propTypes,N=v.AvailabilityContainer.displayName,m=y=>{const{children:p,skuCode:u}=y,{item:t,skuCode:c}=d(k),{lineItem:i}=d(O),o=d(L),[C,n]=b(g,A);return _(()=>{var l,a,r;const s=u||T(t)||c||(i==null?void 0:i.sku_code);if(s){const[e]=((a=(l=t[s])===null||l===void 0?void 0:l.inventory)===null||a===void 0?void 0:a.levels)||{quantity:null,delivery_lead_times:[]};if(!j(e)&&((r=e==null?void 0:e.delivery_lead_times)===null||r===void 0?void 0:r.length)>0){const[f]=e==null?void 0:e.delivery_lead_times;n({type:"setAvailability",payload:Object.assign(Object.assign({},f),{quantity:e==null?void 0:e.quantity})})}else o.accessToken&&I({skuCode:s,config:o,dispatch:n})}return()=>{n({type:"setAvailability",payload:{}})}},[o.accessToken,t,c]),x(h.Provider,Object.assign({value:Object.assign({},C)},{children:p}),void 0)};m.propTypes=q,m.displayName=N;export default m;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
2
|
import { TimeFormat, FunctionChildren } from '../typings/index';
|
|
3
3
|
import { DeliveryLeadTime } from '../reducers/AvailabilityReducer';
|
|
4
|
-
declare type AvailabilityTemplateChildrenProps = FunctionChildren<Omit<AvailabilityTemplateProps, 'children'> & DeliveryLeadTime
|
|
4
|
+
declare type AvailabilityTemplateChildrenProps = FunctionChildren<Omit<AvailabilityTemplateProps, 'children'> & DeliveryLeadTime & {
|
|
5
|
+
text: string;
|
|
6
|
+
quantity: number;
|
|
7
|
+
}>;
|
|
5
8
|
declare type AvailabilityTemplateProps = {
|
|
6
9
|
children?: AvailabilityTemplateChildrenProps;
|
|
7
10
|
timeFormat?: TimeFormat;
|
|
8
11
|
showShippingMethodName?: boolean;
|
|
12
|
+
showShippingMethodPrice?: boolean;
|
|
9
13
|
} & JSX.IntrinsicElements['p'];
|
|
10
14
|
declare const AvailabilityTemplate: FunctionComponent<AvailabilityTemplateProps>;
|
|
11
15
|
export default AvailabilityTemplate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as
|
|
1
|
+
import{__rest as g}from"tslib";import{jsx as d}from"react/jsx-runtime";import{useContext as P}from"react";import j from"../context/AvailabilityContext";import _ from"./utils/Parent";import{isEmpty as h}from"lodash";import m from"../config/components";const A=m.AvailabilityTemplate.propTypes,T=m.AvailabilityTemplate.defaultProps,$=m.AvailabilityTemplate.displayName,s=p=>{const{timeFormat:i,showShippingMethodName:u,showShippingMethodPrice:f,children:r}=p,v=g(p,["timeFormat","showShippingMethodName","showShippingMethodPrice","children"]),{min:o,max:e,shipping_method:t,quantity:a}=P(j),l=!h(o)&&i?o==null?void 0:o[i]:"",c=!h(e)&&i?e==null?void 0:e[i]:"",n=[],y=f&&(t==null?void 0:t.formatted_price_amount)?`(${t==null?void 0:t.formatted_price_amount})`:"",x=u&&t?`with ${t.name}`:"";a&&a>0?(n.push("Available"),l&&c&&n.push(`in ${l} - ${c} ${i} ${x} ${y}`)):a===0&&n.push("Out of stock");const b=Object.assign({min:o,max:e,shipping_method:t,quantity:a,text:n.join(" ")},p);return r?d(_,Object.assign({},b,{children:r}),void 0):d("p",Object.assign({},v,{children:n.join(" ")}),void 0)};s.propTypes=A,s.defaultProps=T,s.displayName=$;export default s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as x}from"react/jsx-runtime";import f from"../context/BillingAddressContext";import{useContext as o,useEffect as A,useReducer as C}from"react";import b,{billingAddressInitialState as y,setBillingAddress as B,setBillingCustomerAddressId as v}from"../reducers/BillingAddressReducer";import j from"../context/CommerceLayerContext";import I from"../config/components";import O from"../context/OrderContext";import R from"../context/AddressContext";const T=I.BillingAddressContainer.propTypes,l=c=>{const{children:a}=c,[m,s]=C(b,y),d=o(j),{order:e,include:r,addResourceToInclude:u}=o(O),{shipToDifferentAddress:p,setCloneAddress:n}=o(R);A(()=>((r==null?void 0:r.includes("billing_address"))||u({newResource:"billing_address"}),e&&d&&v({dispatch:s,order:e,setCloneAddress:n}),()=>{s({type:"cleanup",payload:{}})}),[e]);const g=Object.assign(Object.assign({},m),{setBillingAddress:async(i,t)=>{await B(i,{config:d,dispatch:s,order:e,shipToDifferentAddress:p,customerAddressId:t==null?void 0:t.customerAddressId}),n(i,"billing_address")}});return x(f.Provider,Object.assign({value:g},{children:a}),void 0)};l.propTypes=T;export default l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as
|
|
1
|
+
import{__rest as O}from"tslib";import{jsx as _}from"react/jsx-runtime";import T from"../context/AddressContext";import E from"rapid-form";import{useContext as b,useEffect as R,useRef as k}from"react";import N from"../context/BillingAddressFormContext";import{isEmpty as d}from"lodash";import V from"../config/components";import q from"../context/OrderContext";const I=V.BillingAddressForm.propTypes,x=f=>{const{children:C,errorClassName:A,autoComplete:h="on",reset:m=!1}=f,j=O(f,["children","errorClassName","autoComplete","reset"]),{validation:y,values:s,errors:o,reset:p}=E(),{setAddressErrors:n,setAddress:a}=b(T),{saveAddressToCustomerAddressBook:c,order:u,include:t,addResourceToInclude:F}=b(q),l=k(null);R(()=>{var i;if((t==null?void 0:t.includes("billing_address"))||F({newResource:"billing_address"}),d(o)){if(!d(s)){n([],"billing_address");for(const r in s){const e=s[r];(e==null?void 0:e.value)&&(s[r.replace("billing_address_","")]=e.value,delete s[r]),(e==null?void 0:e.type)==="checkbox"&&(delete s[r],c({type:"billing_address",value:e.checked}))}a({values:s,resource:"billing_address"})}}else{const r=[];for(const e in o){const{code:g,message:v}=o[e];["billing_address_state_code"].includes(e)?d(s.state_code)?delete o[e]:r.push({code:g,message:v,resource:"billing_address",field:e}):r.push({code:g,message:v,resource:"billing_address",field:e})}n(r,"billing_address")}m&&(!d(s)||!d(o))&&(c&&c({type:"billing_address",value:!1}),l&&((i=l.current)===null||i===void 0||i.reset(),p({target:l.current}),n([],"billing_address"),a({values:{},resource:"billing_address"})))},[o,s,m,t]);const B={values:s,validation:y,setValue:(i,r)=>{const e={[i.replace("billing_address_","")]:r};a({values:Object.assign(Object.assign({},s),e),resource:"billing_address"})},errorClassName:A,requiresBillingInfo:(u==null?void 0:u.requires_billing_info)||!1,errors:o,resetField:i=>p({currentTarget:l.current},i)};return _(N.Provider,Object.assign({value:B},{children:_("form",Object.assign({ref:l,autoComplete:h},j,{children:C}),void 0)}),void 0)};x.propTypes=I;export default x;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t,jsxs as d}from"react/jsx-runtime";import{useContext as S,useEffect as B,useRef as k,useState as H}from"react";import K from"../context/PaymentMethodContext";import W from"lodash/isEmpty";import G from"../context/OrderContext";import J from"./utils/Parent";import{setCustomerOrderParam as I}from"../utils/localStorage";import Q from"../utils/promisify";const X={styles:{input:{"font-size":"16px",color:"#3A3A3A"},".number":{"font-family":"monospace"},":focus":{color:"blue"},".valid":{color:"green"},".invalid":{color:"red"},"@media screen and (max-width: 700px)":{input:{"font-size":"14px"}}},fields:{number:{label:"Card Number",selector:"#card-number",placeholder:"4111 1111 1111 1111"},cvv:{label:"CVV",selector:"#cvv",placeholder:"123"},expirationDate:{label:"Expiration Date",selector:"#expiration-date",placeholder:"10/2022"}},submitLabel:"Set payment method"},Z=({authorization:n,config:D,templateCustomerSaveToWallet:x})=>{var p,b,f;const{fields:a,styles:L,containerClassName:g,cardContainerClassName:F,fieldsContainerClassName:O,expDateContainerClassName:R,fieldLabelClassName:_,cvvContainerClassName:U,inputWrapperClassName:y,cardDetailsContainerClassName:V}=Object.assign(Object.assign({},X),D),[j,w]=H(!1),{setPaymentSource:Y,paymentSource:N,setPaymentMethodErrors:A,currentPaymentMethodType:T,setPaymentRef:P}=S(K),{order:o}=S(G),i=k(null),E=async(c,v,h)=>{var l,m;const u=(m=(l=c==null?void 0:c.elements)===null||l===void 0?void 0:l.save_payment_source_to_customer_wallet)===null||m===void 0?void 0:m.checked;if(u&&I("_save_payment_source_to_customer_wallet",u),v)try{const r=await Q(v).then(M=>M),e=o==null?void 0:o.billing_address,C={nonce:r.nonce,bin:r.details.bin,amount:o==null?void 0:o.total_amount_with_taxes_float,email:o==null?void 0:o.customer_email,billingAddress:{givenName:e==null?void 0:e.first_name,surname:e==null?void 0:e.last_name,phoneNumber:e==null?void 0:e.phone,streetAddress:e==null?void 0:e.line_1,countryCodeAlpha2:e==null?void 0:e.country_code,postalCode:e==null?void 0:e.zip_code,region:e==null?void 0:e.state_code,locality:e==null?void 0:e.city},onLookupComplete:(M,q)=>{q()}},s=await h.verifyCard(C);return s.rawCardinalSDKVerificationData.Validated&&N?(N&&await Y({paymentSourceId:N.id,paymentResource:"braintree_payments",attributes:{paymentMethodNonce:s.nonce,options:{id:s.nonce,card:{last4:s.details.lastFour,expYear:s.details.expirationYear,expMonth:s.details.expirationMonth,brand:s.details.cardType.toLowerCase()}}}}),!0):!1}catch(r){return console.error(r),A([{code:"PAYMENT_INTENT_AUTHENTICATION_FAILURE",resource:"payment_methods",field:T,message:r.message}]),!1}return!1};return B(()=>{if(!i&&n&&I("_save_payment_source_to_customer_wallet","false"),n&&!j&&!W(window)){const c=require("braintree-web/client"),v=require("braintree-web/hosted-fields"),h=require("braintree-web/three-d-secure");c.create({authorization:n},(l,m)=>{if(l){console.error(l);return}v.create({client:m,fields:a,styles:L},(u,r)=>{if(u){console.error(u);return}w(!0),h.create({authorization:n,version:2},(e,C)=>{e&&(console.error("3DSecure error",e),A([{code:"PAYMENT_INTENT_AUTHENTICATION_FAILURE",resource:"payment_methods",field:T,message:e.message}])),i.current&&(i.current.onsubmit=()=>E(i.current,r,C),P({ref:i}))})})})}return()=>{P({ref:{current:null}}),w(!1)}},[n,i]),!n&&!j?null:t("div",Object.assign({className:g},{children:d("form",Object.assign({ref:i,id:"braintree-form",onSubmit:E,className:g},{children:[d("div",Object.assign({className:O},{children:[d("div",Object.assign({className:F},{children:[t("label",Object.assign({className:_,htmlFor:"card-number"},{children:(p=a==null?void 0:a.number)===null||p===void 0?void 0:p.label}),void 0),t("div",{className:y,id:"card-number"},void 0)]}),void 0),d("div",Object.assign({className:V},{children:[d("div",Object.assign({className:R},{children:[t("label",Object.assign({className:_,htmlFor:"expiration-date"},{children:(b=a==null?void 0:a.expirationDate)===null||b===void 0?void 0:b.label}),void 0),t("div",{className:y,id:"expiration-date"},void 0)]}),void 0),d("div",Object.assign({className:U},{children:[t("label",Object.assign({className:_,htmlFor:"cvv"},{children:(f=a==null?void 0:a.cvv)===null||f===void 0?void 0:f.label}),void 0),t("div",{className:y,id:"cvv"},void 0)]}),void 0)]}),void 0)]}),void 0),t("div",Object.assign({className:O},{children:x&&t(J,Object.assign({},{name:"save_payment_source_to_customer_wallet"},{children:x}),void 0)}),void 0)]}),void 0)}),void 0)};export default Z;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as
|
|
1
|
+
import{__rest as l}from"tslib";import{jsx as i}from"react/jsx-runtime";import{useContext as a}from"react";import d from"../context/OrderContext";import e from"../config/components";import u from"./utils/Parent";const m=e.CheckoutLink.propTypes,f=e.CheckoutLink.defaultProps,h=e.CheckoutLink.displayName,t=r=>{const{label:n,children:s}=r,c=l(r,["label","children"]),{order:o}=a(d),p=Object.assign({checkoutUrl:o==null?void 0:o.checkout_url,label:n},c);return s?i(u,Object.assign({},p,{children:s}),void 0):i("a",Object.assign({href:o==null?void 0:o.checkout_url},c,{children:n}),void 0)};t.propTypes=m,t.defaultProps=f,t.displayName=h;export default t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as
|
|
1
|
+
import{__rest as m}from"tslib";import{jsx as n}from"react/jsx-runtime";import c from"../context/CommerceLayerContext";import s from"../config/components";const p=s.CommerceLayer.propTypes,r=e=>{const{children:o}=e,t=m(e,["children"]);return n(c.Provider,Object.assign({value:Object.assign({},t)},{children:o}),void 0)};r.propTypes=p;export default r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as x}from"react/jsx-runtime";import{useContext as c,useEffect as _,useReducer as v}from"react";import g,{customerInitialState as E,getCustomerAddresses as b,getCustomerPaymentSources as u}from"../reducers/CustomerReducer";import j from"../context/OrderContext";import O from"../context/CommerceLayerContext";import i from"../config/components";import{saveCustomerUser as R}from"../reducers/CustomerReducer";import T from"../context/CustomerContext";import{defaultCustomerContext as d}from"../context/CustomerContext";import{isEmpty as h}from"lodash";const N=i.CustomerContainer.propTypes,P=i.CustomerContainer.displayName,n=p=>{const{children:C,isGuest:o=!1}=p,[a,e]=v(g,E),{order:r,addResourceToInclude:l,include:t,updateOrder:f}=c(j),m=c(O);_(()=>(!(t==null?void 0:t.includes("available_customer_payment_sources.payment_source"))&&!o&&l({newResource:"available_customer_payment_sources.payment_source"}),m.accessToken&&h(a.addresses)&&!o&&b({config:m,dispatch:e}),r&&(t==null?void 0:t.includes("available_customer_payment_sources.payment_source"))&&!o&&u({dispatch:e,order:r}),()=>{e({type:"setCustomerEmail",payload:{}})}),[m.accessToken,r,o]);const y=Object.assign(Object.assign({isGuest:o},a),{saveCustomerUser:async s=>{await R({config:m,customerEmail:s,dispatch:e,updateOrder:f,order:r})},setCustomerErrors:s=>d.setCustomerErrors(s,e),setCustomerEmail:s=>d.setCustomerEmail(s,e),getCustomerPaymentSources:()=>u({dispatch:e,order:r})});return x(T.Provider,Object.assign({value:y},{children:C}),void 0)};n.propTypes=N,n.displayName=P;export default n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as
|
|
1
|
+
import{__rest as g}from"tslib";import{jsx as q}from"react/jsx-runtime";import{useContext as T,useEffect as $,useState as w}from"react";import F from"./utils/BaseInput";import i from"../config/components";import H from"rapid-form";import R from"../context/CustomerContext";import r from"lodash/isEmpty";const S=i.CustomerInput.propTypes,U=i.CustomerInput.displayName,m=l=>{const{name:o="customer_email",placeholder:c="",required:f=!0,saveOnBlur:d=!1,type:C="email",value:y,onBlur:u,className:v,errorClassName:N}=l,E=g(l,["name","placeholder","required","saveOnBlur","type","value","onBlur","className","errorClassName"]),{validation:x,values:s,errors:e}=H({fieldEvent:"blur"}),{saveCustomerUser:B,setCustomerErrors:n,setCustomerEmail:h}=T(R),[I,t]=w(!1),j=async()=>{d&&r(e)&&!r(s)&&(await B(s[o].value),u&&u())};$(()=>{if(r(e))r(s)||(n([]),h(s[o].value),t(!1));else{const a=[];for(const p in e){const{code:_,message:b}=e[p];a.push({code:_,message:b,resource:"orders",field:p})}r(a)||(t(!0),n(a))}return()=>{t(!1)}},[e]);const O=`${v} ${I?N:""}`;return q(F,Object.assign({name:o,type:C,ref:x,required:f,placeholder:c,defaultValue:y,onBlur:j,className:O},E),void 0)};m.propTypes=S,m.displayName=U;export default m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as
|
|
1
|
+
import{__rest as c}from"tslib";import{jsx as p}from"react/jsx-runtime";import{useContext as d,useState as l,useEffect as y}from"react";import f from"../context/ShippingMethodChildrenContext";import h from"./utils/Parent";import m from"../config/components";const x=m.DeliveryLeadTime.propTypes,u=m.DeliveryLeadTime.displayName,i=e=>{const{type:r}=e,n=c(e,["type"]),[o,s]=l(),{deliveryLeadTimeForShipment:t}=d(f);y(()=>(t&&t[r]&&s(t[r]),()=>{s("")}),[t]);const a=Object.assign({text:o},n);return e.children?p(h,Object.assign({},a,{children:e.children}),void 0):p("span",Object.assign({},n,{children:o}),void 0)};i.propTypes=x,i.displayName=u;export default i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import r from"./utils/BaseOrderPrice";import s from"../config/components";const n=s.DiscountAmount.propTypes,p=s.DiscountAmount.defaultProps,i=s.DiscountAmount.displayName,o=t=>e(r,Object.assign({base:"amount",type:"discount"},t),void 0);o.propTypes=n,o.defaultProps=p,o.displayName=i;export default o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as
|
|
1
|
+
import{__rest as v}from"tslib";import{jsx as u}from"react/jsx-runtime";import{useContext as r,Fragment as j,useMemo as A}from"react";import L from"./utils/Parent";import O from"../context/GiftCardContext";import T from"../context/OrderContext";import b from"../context/AddressContext";import N from"./utils/getAllErrors";import _ from"../context/LineItemContext";import G from"../context/LineItemChildrenContext";import h from"../config/components";import F from"../context/CustomerContext";import H from"../context/PaymentMethodContext";import k from"../context/PaymentMethodChildrenContext";const q=h.Errors.propTypes,w=h.Errors.displayName,n=s=>{const{children:e,messages:m=[],resource:i,field:d}=s,c=v(s,["children","messages","resource","field"]),{payment:o}=r(k),{errors:p}=r(T),{errors:l}=r(O),{errors:a}=r(_),{errors:x}=r(b),{errors:C}=r(F),{errors:t,currentPaymentMethodType:y,currentPaymentMethodId:E}=r(H),{lineItem:g}=r(G),P=A(()=>[...l||[],...p||[],...a||[],...x||[],...C||[],...(t==null?void 0:t.filter(I=>I.field===y&&(o==null?void 0:o.id)===E))||[]],[l,p,a,x,C,t]),f=N({allErrors:P,field:d,messages:m,props:c,lineItem:g,resource:i,returnHtml:!e}),M=Object.assign({messages:m,resource:i,field:d,errors:f},c);return e?u(L,Object.assign({},M,{children:e}),void 0):u(j,{children:f},void 0)};n.propTypes=q,n.displayName=w;export default n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import a,{callExternalFunction as i}from"../context/ExternalFunctionContext";import t from"../config/components";const p=t.ExternalFunction.propTypes,c=t.ExternalFunction.displayName,n=({children:o,url:e})=>r(a.Provider,Object.assign({value:{url:e,callExternalFunction:i}},{children:o}),void 0);n.propTypes=p,n.displayName=c;export default n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as d}from"react/jsx-runtime";import{Fragment as C,useRef as v,useContext as x}from"react";import y from"../utils/validateFormFields";import{isEmpty as G}from"lodash";import F from"../context/GiftCardContext";import r from"../config/components";const b=r.GiftCard.propTypes,h=r.GiftCard.defaultProps,g=r.GiftCard.displayName,e=m=>{const{children:l,onSubmit:o}=m,n="giftCardForm",s=v(null),{addGiftCard:c,addGiftCardError:f}=x(F);return d(C,{children:d("form",Object.assign({name:n,ref:s,onSubmit:p=>{p.preventDefault();const t=s.current,u=t==null?void 0:t.elements,{errors:i,values:a}=y(u,["currencyCode","balanceCents"],"gift_cards");G(i)?(c(a),t==null||t.reset(),o&&o(a)):f(i)}},{children:l}),n)},void 0)};e.propTypes=b,e.defaultProps=h,e.displayName=g;export default e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import s from"./utils/BaseOrderPrice";import t from"../config/components";const p=t.GiftCardAmount.propTypes,a=t.GiftCardAmount.displayName,r=o=>e(s,Object.assign({base:"amount",type:"gift_card"},o),void 0);r.propTypes=p,r.displayName=a;export default r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as m}from"react/jsx-runtime";import{useReducer as x,useContext as a}from"react";import G from"../context/GiftCardContext";import g from"../context/CommerceLayerContext";import u,{giftCardInitialState as l,addGiftCardRecipient as y,addGiftCard as O,addGiftCardError as j,addGiftCardLoading as R}from"../reducers/GiftCardReducer";import b from"../context/OrderContext";import d from"../config/components";const L=d.GiftCardContainer.propTypes,h=d.GiftCardContainer.displayName,e=i=>{const{children:n}=i,[c,r]=x(u,l),o=a(g),{getOrder:s,createOrder:C,order:f}=a(b),p=Object.assign(Object.assign({},c),{addGiftCardRecipient:t=>y(t,o,r),addGiftCard:t=>O(Object.assign({},t),{config:o,dispatch:r,getOrder:s,createOrder:C,order:f}),addGiftCardError:t=>j(t,r),addGiftCardLoading:t=>R(t,r)});return m(G.Provider,Object.assign({value:p},{children:n}),void 0)};e.propTypes=L,e.displayName=h;export default e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import c from"./utils/BaseSelect";import s from"../config/currency";import e from"../config/components";const p=e.GiftCardCurrencySelector.propTypes,n=e.GiftCardCurrencySelector.defaultProps,a=e.GiftCardCurrencySelector.displayName,r=o=>t(c,Object.assign({options:s,name:"currencyCode"},o),void 0);r.propTypes=p,r.defaultProps=n,r.displayName=a;export default r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as
|
|
1
|
+
import{__rest as s}from"tslib";import{jsx as a}from"react/jsx-runtime";import n from"./utils/BaseInput";import o from"../config/components";const i=o.GiftCardInput.propTypes,m=o.GiftCardInput.displayName,t=p=>{const{placeholder:e=""}=p,r=s(p,["placeholder"]);return a(n,Object.assign({placeholder:e},r),void 0)};t.propTypes=i,t.displayName=m;export default t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as
|
|
1
|
+
import{__rest as f}from"tslib";import{jsx as d}from"react/jsx-runtime";import{useContext as l}from"react";import a from"../config/components";import C from"./utils/Parent";import u from"../context/OrderContext";import{has as y,isEmpty as O}from"lodash";const x=a.GiftCardOrCouponCode.propTypes,h=a.GiftCardOrCouponCode.displayName,s=n=>{var{children:p,type:e}=n,i=f(n,["children","type"]);const{order:o}=l(u);let t=e&&`${e}Code`;!e&&o&&y(o,"couponCode")&&!O(o.coupon_code)?t="coupon_code":e||(t="gift_card_code");const r=o&&t?o[t]:"",c=!(o&&r),m=Object.assign(Object.assign({},i),{code:r,hide:c});return p?d(C,Object.assign({},m,{children:p}),void 0):c?null:d("span",Object.assign({},i,{children:r}),void 0)};s.propTypes=x,s.displayName=h;export default s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as
|
|
1
|
+
import{__rest as O}from"tslib";import{jsx as a}from"react/jsx-runtime";import b from"rapid-form";import{useContext as g,useEffect as y,useRef as j}from"react";import F from"../context/CouponAndGiftCardFormContext";import G from"../context/OrderContext";import E from"lodash/isEmpty";import S from"../config/components";import p from"lodash/camelCase";import T from"lodash/dropWhile";import A from"lodash/has";import{findIndex as R}from"lodash";const W=S.GiftCardOrCouponForm.propTypes,c=d=>{const{children:f,autoComplete:l="on",reset:w=!1,onSubmit:e}=d,u=O(d,["children","autoComplete","reset","onSubmit"]),{validation:C,values:t}=b(),{setGiftCardOrCouponCode:h,order:n,errors:m,setOrderErrors:v}=g(G),x=j(null),r="gift_card_or_coupon_code";y(()=>{var o;if(((o=t[r])===null||o===void 0?void 0:o.value)===""&&R(m,{field:p(r)})!==-1){const s=T(m,i=>i.field===p(r));v({errors:s}),e&&e({success:!0})}},[t]);const _=async o=>{o.preventDefault();const s=A(t,r)?t[r].value:void 0;if(s){const{success:i}=await h({code:s});e&&e({success:i}),i&&o.target.reset()}};return(n==null?void 0:n.gift_card_or_coupon_code)||E(n)?null:a(F.Provider,Object.assign({value:{validation:C}},{children:a("form",Object.assign({ref:x,autoComplete:l,onSubmit:_},u,{children:f}),void 0)}),void 0)};c.propTypes=W;export default c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as
|
|
1
|
+
import{__rest as u}from"tslib";import{jsx as d}from"react/jsx-runtime";import{useContext as s}from"react";import r from"../config/components";import m from"./utils/BaseInput";import c from"../context/CouponAndGiftCardFormContext";const f=r.GiftCardOrCouponInput.propTypes,l=r.GiftCardOrCouponInput.displayName,o=t=>{const{placeholder:p="",required:e,value:n}=t,a=u(t,["placeholder","required","value"]),{validation:i}=s(c);return d(m,Object.assign({type:"text",name:"gift_card_or_coupon_code",ref:i,required:e!==void 0?e:!0,placeholder:p,defaultValue:n},a),void 0)};o.propTypes=f,o.displayName=l;export default o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as
|
|
1
|
+
import{__rest as y}from"tslib";import{jsx as m}from"react/jsx-runtime";import{useContext as O}from"react";import b from"./utils/Parent";import l from"../config/components";import h from"../context/OrderContext";import{has as x,isEmpty as j}from"lodash";const v=l.GiftCardOrCouponRemoveButton.propTypes,_=l.GiftCardOrCouponRemoveButton.displayName,n=r=>{const{children:s,label:i="Remove",onClick:c,type:t}=r,p=y(r,["children","label","onClick","type"]),{order:o,removeGiftCardOrCouponCode:d}=O(h);let e=`${t}Code`;!t&&o&&x(o,"couponCode")&&!j(o.coupon_code)?e="coupon_code":t||(e="gift_card_code");const u=o&&e?o[e]:"",C=!(o&&u),a=()=>{d&&d({codeType:e}),c&&c()},f=Object.assign(Object.assign({},p),{label:i,handleClick:a,codeType:e});return s?m(b,Object.assign({},f,{children:s}),void 0):C?null:m("button",Object.assign({type:"button",onClick:a},p,{children:i}),void 0)};n.propTypes=v,n.displayName=_;export default n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as
|
|
1
|
+
import{__rest as a}from"tslib";import{jsx as e}from"react/jsx-runtime";import m from"./utils/Parent";import n from"../config/components";const c=n.GiftCardOrCouponSubmit.propTypes,l=n.GiftCardOrCouponSubmit.displayName,t=o=>{const{children:r,label:i="Submit"}=o,s=a(o,["children","label"]),p=Object.assign(Object.assign({},s),{label:i});return r?e(m,Object.assign({},p,{children:r}),void 0):e("button",Object.assign({type:"submit"},s,{children:i}),void 0)};t.propTypes=c,t.displayName=l;export default t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as f}from"react/jsx-runtime";import{useReducer as k,useEffect as x}from"react";import j,{initialItemContext as O}from"../context/ItemContext";import g,{itemInitialState as b,setItemState as s}from"../reducers/ItemReducer";import m from"../config/components";const h=m.ItemContainer.propTypes,v=m.ItemContainer.displayName,o=r=>{const{children:c,skuCode:i,lineItem:n}=r,[p,t]=k(g,b);x(()=>{i&&s(i,{type:"setSkuCode",key:"skuCode"},t),n&&s(n,{type:"setCustomLineItem",key:"lineItem"},t)},[]);const a=e=>s(e,{type:"setItems",key:"items"},t),y=e=>s(e,{type:"setItem",key:"item"},t),u=e=>s(e,{type:"setQuantity",key:"quantity"},t),I=e=>s(e,{type:"setOption",key:"option"},t),d=e=>s(e,{type:"setPrices",key:"prices"},t),l=e=>s(e,{type:"setCustomLineItems",key:"lineItems"},t),C=Object.assign(Object.assign(Object.assign({},O),p),{setItems:a,setItem:y,setQuantity:u,setOption:I,setPrices:d,setCustomLineItems:l});return f(j.Provider,Object.assign({value:C},{children:c}),void 0)};o.propTypes=h,o.displayName=v;export default o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{Fragment as h,useContext as m}from"react";import C from"../context/LineItemContext";import f from"../context/LineItemChildrenContext";import r from"../config/components";import I from"../context/ShipmentChildrenContext";import{isEmpty as y}from"lodash";const L=r.LineItem.propTypes,u=r.LineItem.displayName,t=s=>{const{type:p="skus",children:c}=s,{lineItems:l}=m(C),{lineItems:n}=m(I),o=y(n)?l:n,a=o&&o.filter(e=>e.item_type===p).map((e,d)=>{const x={lineItem:e};return i(f.Provider,Object.assign({value:x},{children:c}),d)});return i(h,{children:a},void 0)};t.propTypes=L,t.displayName=u;export default t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as
|
|
1
|
+
import{__rest as f}from"tslib";import{jsx as i}from"react/jsx-runtime";import{useState as l,useEffect as d,useContext as x}from"react";import y from"../utils/getAmount";import j from"../context/LineItemChildrenContext";import I from"./utils/Parent";import n from"../config/components";const P=n.LineItemAmount.propTypes,b=n.LineItemAmount.defaultProps,g=n.LineItemAmount.displayName,e=t=>{const{format:a="formatted",type:p="total"}=t,r=f(t,["format","type"]),{lineItem:o}=x(j),[s,m]=l("");d(()=>{if(o){const u=y({base:"amount",type:p,format:a,obj:o});m(u)}return()=>{m("")}},[o]);const c=Object.assign({price:s},r);return t.children?i(I,Object.assign({},c,{children:t.children}),void 0):i("span",Object.assign({},r,{children:s}),void 0)};e.propTypes=P,e.defaultProps=b,e.displayName=g;export default e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as
|
|
1
|
+
import{__rest as a}from"tslib";import{jsx as i}from"react/jsx-runtime";import{useContext as d}from"react";import l from"../context/LineItemChildrenContext";import f from"./utils/Parent";import s from"../config/components";const x=s.LineItemCode.propTypes,y=s.LineItemCode.displayName,t=o=>{var{type:p="sku_code",children:n}=o,r=a(o,["type","children"]);const{lineItem:e}=d(l),m=e==null?void 0:e[p],c=Object.assign({},r);return n?i(f,Object.assign({},c,{children:n}),void 0):i("p",Object.assign({},r,{children:m}),void 0)};t.propTypes=x,t.displayName=y;export default t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{useContext as s}from"react";import a from"./utils/Parent";import c from"../context/LineItemChildrenContext";import r from"../config/components";const p=r.LineItemImage.propTypes,l=r.LineItemImage.displayName,n=e=>{const{lineItem:t}=s(c),i=t==null?void 0:t.image_url,m=Object.assign({src:i},e);return e.children?o(a,Object.assign({},m,{children:e.children}),void 0):o("img",Object.assign({alt:"",src:i},e),void 0)};n.propTypes=p,n.displayName=l;export default n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{useContext as s}from"react";import a from"../context/LineItemChildrenContext";import c from"./utils/Parent";import m from"../config/components";const p=m.LineItemName.propTypes,l=m.LineItemName.displayName,n=e=>{const{lineItem:t}=s(a),o=t==null?void 0:t.name,r=Object.assign({label:o},e);return e.children?i(c,Object.assign({},r,{children:e.children}),void 0):i("p",Object.assign({},e,{children:o}),void 0)};n.propTypes=p,n.displayName=l;export default n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as
|
|
1
|
+
import{__rest as x}from"tslib";import{jsx as e,jsxs as l}from"react/jsx-runtime";import{useContext as C}from"react";import N from"../context/LineItemOptionChildrenContext";import b from"lodash/get";import y from"lodash/has";import I from"lodash/map";import $ from"./utils/Parent";import p from"../config/components";import L from"../utils/isJSON";const T=p.LineItemOption.propTypes,_=p.LineItemOption.displayName,s=n=>{const{name:o,children:c,valueClassName:a,id:E,key:d,tagElement:g="li",tagContainer:h="ul"}=n,i=x(n,["name","children","valueClassName","id","key","tagElement","tagContainer"]),{lineItemOption:t,showAll:O}=C(N),f=Object.assign(Object.assign({},n),{lineItemOption:t}),r=g,u=h,j=O&&L(JSON.stringify(t==null?void 0:t.options))?I(t==null?void 0:t.options,(v,m)=>l(r,Object.assign({},i,{children:[`${m}:`,e("span",Object.assign({className:a},{children:`${v}`}),void 0)]}),m)):y(t,`options.${o}`)?l(r,Object.assign({},i,{children:[`${o}:`,e("span",Object.assign({className:a},i,{children:`${b(t,`options.${o}`)}`}),void 0)]}),d):null;return c?e($,Object.assign({},f,{children:n.children}),void 0):e(u,{children:j},void 0)};s.propTypes=T,s.displayName=_;export default s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as
|
|
1
|
+
import{__rest as I}from"tslib";import{jsx as n,jsxs as O}from"react/jsx-runtime";import{useContext as f,Fragment as s}from"react";import C from"../context/LineItemChildrenContext";import v from"../context/LineItemOptionChildrenContext";import{isEmpty as j}from"lodash";import L from"../config/components";const _=L.LineItemOptions.displayName,r=i=>{const{skuOptionId:m,title:l,children:p,showName:d=!0,showAll:o}=i,c=I(i,["skuOptionId","title","children","showName","showAll"]),{lineItem:t}=f(C),a=(j(t)?[]:(t==null?void 0:t.line_item_options)||[]).filter(e=>o?!0:e.skuOption().id===m).map((e,h)=>{const u=d?n("span",Object.assign({},c,{children:l||e.name}),void 0):null,x={lineItemOption:e,showAll:o};return O(s,{children:[u,n(v.Provider,Object.assign({value:x},{children:p}),void 0)]},h)});return n(s,{children:a},void 0)};r.displayName=_;export default r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as
|
|
1
|
+
import{__rest as x}from"tslib";import{jsx as o}from"react/jsx-runtime";import{useContext as d}from"react";import h from"../context/LineItemChildrenContext";import v from"../context/LineItemContext";import I from"./utils/Parent";import s from"../config/components";const g=s.LineItemQuantity.propTypes,C=s.LineItemQuantity.defaultProps,L=s.LineItemQuantity.displayName,i=n=>{const{max:p=50,readonly:u=!1}=n,r=x(n,["max","readonly"]),{lineItem:t}=d(h),{updateLineItem:m}=d(v),l=[];for(let e=1;e<=p;e++)l.push(o("option",Object.assign({value:`${e}`},{children:e}),e));const c=e=>{const f=Number(e.target.value);m&&t&&m(t.id,f)},a=t==null?void 0:t.quantity,y=Object.assign({handleChange:c,quantity:a},n);return n.children?o(I,Object.assign({},y,{children:n.children}),void 0):u?o("span",Object.assign({},r,{children:a}),void 0):o("select",Object.assign({title:t==null?void 0:t.name,value:a,onChange:c},r,{children:l}),void 0)};i.propTypes=g,i.defaultProps=C,i.displayName=L;export default i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{useContext as s}from"react";import p from"../context/LineItemChildrenContext";import d from"../context/LineItemContext";import f from"./utils/Parent";import n from"../config/components";const L=n.LineItemRemoveLink.propTypes,x=n.LineItemRemoveLink.defaultProps,I=n.LineItemRemoveLink.displayName,t=e=>{const{label:c="Remove"}=e,{lineItem:o}=s(p),{deleteLineItem:i}=s(d),m=l=>{l.preventDefault(),i&&o&&i(o.id)},a=Object.assign({handleRemove:m},e);return e.children?r(f,Object.assign({},a,{children:e.children}),void 0):r("a",Object.assign({},e,{href:"#",onClick:m},{children:c}),void 0)};t.propTypes=L,t.defaultProps=x,t.displayName=I;export default t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as y}from"react/jsx-runtime";import{useEffect as C,useReducer as _,useContext as p}from"react";import g,{lineItemInitialState as v,updateLineItem as j,deleteLineItem as O}from"../reducers/LineItemReducer";import R from"../context/OrderContext";import h from"../context/LineItemContext";import P from"../context/CommerceLayerContext";import{isEmpty as c}from"lodash";import s from"../config/components";const T=s.LineItemsContainer.propTypes,b=s.LineItemsContainer.defaultProps,N=s.LineItemsContainer.displayName,r=u=>{const{children:I,loader:m="Loading..."}=u,{order:e,addResourceToInclude:f,include:t,orderId:d,getOrder:a}=p(R),l=p(P),[o,n]=_(g,v);C(()=>((t==null?void 0:t.includes("line_items.line_item_options.sku_option"))?!c(e)&&(e==null?void 0:e.line_items)&&n({type:"setLineItems",payload:{lineItems:e.line_items}}):f({newResource:"line_items.line_item_options.sku_option"}),()=>{c(e)&&n({type:"setLineItems",payload:{lineItems:[]}})}),[e,t]);const L=Object.assign(Object.assign({},o),{loader:m,updateLineItem:(i,x=1)=>j({lineItemId:i,quantity:x,dispatch:n,config:l,getOrder:a,orderId:d,errors:o.errors}),deleteLineItem:i=>O({lineItemId:i,dispatch:n,config:l,getOrder:a,orderId:d,errors:o.errors})});return y(h.Provider,Object.assign({value:L},{children:o.loading?m:I}),void 0)};r.propTypes=T,r.defaultProps=b,r.displayName=N;export default r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as
|
|
1
|
+
import{__rest as u}from"tslib";import{jsx as m}from"react/jsx-runtime";import{useContext as f,useState as l,useEffect as d}from"react";import y from"./utils/Parent";import x from"../utils/getLineItemsCount";import{isEmpty as C}from"lodash";import I from"../context/LineItemContext";import p from"../config/components";const L=p.LineItemsCount.propTypes,g=p.LineItemsCount.displayName,e=n=>{const{children:o}=n,s=u(n,["children"]),{lineItems:t}=f(I),[i,r]=l(0);d(()=>{if(!C(t)){const a=x(t||[]);r(a)}return()=>{r(0)}},[t]);const c=Object.assign({quantity:i},s);return o?m(y,Object.assign({},c,{children:o}),void 0):m("span",Object.assign({},s,{children:i}),void 0)};e.propTypes=L,e.displayName=g;export default e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import s from"./utils/BaseInput";import a from"../config/components";const o=a.MetadataInput.propTypes,n=a.MetadataInput.displayName,t=p=>e(s,Object.assign({"data-metadata":!0},p),void 0);t.propTypes=o,t.displayName=n;export default t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as j}from"react/jsx-runtime";import{useEffect as y,useReducer as T,useContext as O,useMemo as v}from"react";import A,{createOrder as I,getApiOrder as p,setOrderErrors as R,setOrder as L,orderInitialState as P}from"../reducers/OrderReducer";import h from"../context/CommerceLayerContext";import k,{defaultOrderContext as d}from"../context/OrderContext";import{unsetOrderState as G}from"../reducers/OrderReducer";import n from"../config/components";import S from"../context/OrderStorageContext";const E=n.OrderContainer.propTypes,M=n.OrderContainer.defaultProps,N=n.OrderContainer.displayName,a=m=>{const{orderId:c,children:C,metadata:i,attributes:u}=m,[t,r]=T(A,P),o=O(h),{persistKey:s,clearWhenPlaced:l,getLocalOrder:f,setLocalOrder:g,deleteLocalOrder:x}=O(S);y(()=>{if(o.accessToken){const e=s?f(s):c;e&&(r({type:"setOrderId",payload:{orderId:e}}),t.order||p({id:e,dispatch:r,config:o,persistKey:s,clearWhenPlaced:l,deleteLocalOrder:x,state:t}))}return()=>G(r)},[o.accessToken,c]);const b=v(()=>Object.assign(Object.assign({},t),{setOrder:e=>L(e,r),getOrder:e=>p({id:e,dispatch:r,config:o,state:t}),setOrderErrors:e=>R({dispatch:r,errors:e}),createOrder:async()=>await I({persistKey:s,dispatch:r,config:o,state:t,orderMetadata:i,orderAttributes:u}),addToCart:e=>d.addToCart(Object.assign(Object.assign({},e),{persistKey:s,dispatch:r,state:t,config:o,errors:t.errors,orderMetadata:i||{},orderAttributes:u,setLocalOrder:g})),saveAddressToCustomerAddressBook:e=>d.saveAddressToCustomerAddressBook(Object.assign(Object.assign({},e),{dispatch:r})),setGiftCardOrCouponCode:({code:e})=>d.setGiftCardOrCouponCode({code:e,dispatch:r,order:t.order,config:o}),removeGiftCardOrCouponCode:({codeType:e})=>d.removeGiftCardOrCouponCode({codeType:e,dispatch:r,order:t.order,config:o}),addResourceToInclude:e=>d.addResourceToInclude(Object.assign(Object.assign({},e),{dispatch:r,resourcesIncluded:t.include})),updateOrder:async e=>await d.updateOrder(Object.assign(Object.assign({},e),{dispatch:r,config:o,include:t.include}))}),[t]);return j(k.Provider,Object.assign({value:b},{children:C}),void 0)};a.propTypes=E,a.defaultProps=M,a.displayName=N;export default a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import r from"../config/components";import p from"./utils/BaseField";const t=r.OrderNumber.propTypes,m=r.OrderNumber.displayName,e=s=>o(p,Object.assign({attribute:"number"},s),void 0);e.propTypes=t,e.displayName=m;export default e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as
|
|
1
|
+
import{__rest as c}from"tslib";import{jsx as n}from"react/jsx-runtime";import d from"../context/OrderStorageContext";import t from"../config/components";import{getLocalOrder as i,setLocalOrder as l,deleteLocalOrder as p}from"../utils/localStorage";const m=t.OrderStorage.propTypes,g=t.OrderStorage.displayName,e=r=>{const{children:o,clearWhenPlaced:a=!0}=r,s=c(r,["children","clearWhenPlaced"]);return n(d.Provider,Object.assign({value:Object.assign(Object.assign({},s),{setLocalOrder:l,getLocalOrder:i,deleteLocalOrder:p,clearWhenPlaced:a})},{children:o}),void 0)};e.propTypes=m,e.displayName=g;export default e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest}from"tslib";import{jsx as
|
|
1
|
+
import{__rest as M}from"tslib";import{jsx as n}from"react/jsx-runtime";import T from"../context/OrderContext";import k from"../context/PaymentMethodChildrenContext";import L from"../context/PaymentMethodContext";import W from"../utils/paypalPayment";import{useContext as s,useEffect as E,useState as A}from"react";import B from"../utils/getLoaderComponent";import I from"./gateways/AdyenGateway";import R from"./gateways/StripeGateway";import q from"./gateways/BraintreeGateway";import z from"./gateways/PaypalGateway";import D from"./gateways/WireTransferGateway";import F from"../context/CustomerContext";const H=y=>{var i,{readonly:l,showCard:f,handleEditClick:h,children:a,templateCustomerCards:w,templateCustomerSaveToWallet:g,onClickCustomerCards:v,show:p,loader:_="Loading..."}=y,x=M(y,["readonly","showCard","handleEditClick","children","templateCustomerCards","templateCustomerSaveToWallet","onClickCustomerCards","show","loader"]);const P=B(_),[G,c]=A(!0),{payment:o}=s(k),{order:e}=s(T),{getCustomerPaymentSources:u}=s(F),{currentPaymentMethodId:b,config:C,paymentSource:m,currentPaymentMethodType:j,setPaymentSource:O}=s(L),t=l?j:o==null?void 0:o.payment_source_type;E(()=>{var d;if((o==null?void 0:o.id)===b&&t&&((d=e==null?void 0:e.payment_method)===null||d===void 0?void 0:d.payment_source_type)===t){const S=C&&t==="paypal_payments"?W(t,C):{};(!m||m.type!==t)&&(O({paymentResource:t,order:e,attributes:S}),u&&u()),c(!1)}return()=>{c(!0)}},[(i=e==null?void 0:e.payment_method)===null||i===void 0?void 0:i.payment_source_type,p,m]);const r=Object.assign({readonly:l,showCard:f,handleEditClick:h,children:a,templateCustomerCards:w,show:p,loading:G,onClickCustomerCards:v,loaderComponent:P,templateCustomerSaveToWallet:g},x);switch(t){case"stripe_payments":return n(R,Object.assign({},r,{children:a}),void 0);case"adyen_payments":return n(I,Object.assign({},r,{children:a}),void 0);case"braintree_payments":return n(q,Object.assign({},r,{children:a}),void 0);case"wire_transfers":return n(D,Object.assign({},r,{children:a}),void 0);case"paypal_payments":return n(z,Object.assign({},r,{children:a}),void 0);default:return null}};export default H;
|