@commercelayer/react-components 3.0.0-beta.8 → 3.1.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/README.md +1 -1
- package/{dist → lib}/components/AddToCartButton.d.ts +20 -17
- package/lib/components/AddToCartButton.js +1 -0
- package/{dist → lib}/components/Address.d.ts +13 -12
- package/lib/components/Address.js +1 -0
- package/{dist → lib}/components/AddressCountrySelector.d.ts +9 -9
- package/lib/components/AddressCountrySelector.js +1 -0
- package/{dist → lib}/components/AddressField.d.ts +15 -15
- package/lib/components/AddressField.js +1 -0
- package/{dist → lib}/components/AddressInput.d.ts +7 -7
- package/lib/components/AddressInput.js +1 -0
- package/{dist → lib}/components/AddressStateSelector.d.ts +11 -9
- package/lib/components/AddressStateSelector.js +1 -0
- package/{dist → lib}/components/AddressesContainer.d.ts +8 -7
- package/lib/components/AddressesContainer.js +1 -0
- package/lib/components/AdjustmentAmount.d.ts +4 -0
- package/lib/components/AdjustmentAmount.js +1 -0
- package/lib/components/AdyenPayment.d.ts +25 -0
- package/lib/components/AdyenPayment.js +1 -0
- package/{dist → lib}/components/AvailabilityContainer.d.ts +7 -7
- package/lib/components/AvailabilityContainer.js +1 -0
- package/{dist → lib}/components/AvailabilityTemplate.d.ts +15 -16
- package/lib/components/AvailabilityTemplate.js +1 -0
- package/{dist → lib}/components/BillingAddressContainer.d.ts +6 -6
- package/lib/components/BillingAddressContainer.js +1 -0
- package/{dist → lib}/components/BillingAddressForm.d.ts +8 -8
- package/lib/components/BillingAddressForm.js +1 -0
- package/{dist → lib}/components/BraintreePayment.d.ts +30 -30
- package/lib/components/BraintreePayment.js +1 -0
- package/{dist → lib}/components/CheckoutLink.d.ts +11 -11
- package/lib/components/CheckoutLink.js +1 -0
- package/{dist → lib}/components/CommerceLayer.d.ts +8 -9
- package/lib/components/CommerceLayer.js +1 -0
- package/{dist → lib}/components/CustomerContainer.d.ts +7 -7
- package/lib/components/CustomerContainer.js +1 -0
- package/{dist → lib}/components/CustomerInput.d.ts +11 -11
- package/lib/components/CustomerInput.js +1 -0
- package/{dist → lib}/components/DeliveryLeadTime.d.ts +10 -10
- package/lib/components/DeliveryLeadTime.js +1 -0
- package/{dist → lib}/components/DiscountAmount.d.ts +4 -4
- package/lib/components/DiscountAmount.js +1 -0
- package/{dist → lib}/components/Errors.d.ts +5 -5
- package/lib/components/Errors.js +1 -0
- package/{dist → lib}/components/ExternalFunction.d.ts +7 -7
- package/lib/components/ExternalFunction.js +1 -0
- package/{dist → lib}/components/GiftCard.d.ts +8 -8
- package/lib/components/GiftCard.js +1 -0
- package/{dist → lib}/components/GiftCardAmount.d.ts +4 -4
- package/lib/components/GiftCardAmount.js +1 -0
- package/{dist → lib}/components/GiftCardContainer.d.ts +6 -6
- package/lib/components/GiftCardContainer.js +1 -0
- package/{dist → lib}/components/GiftCardCurrencySelector.d.ts +7 -7
- package/lib/components/GiftCardCurrencySelector.js +1 -0
- package/{dist → lib}/components/GiftCardInput.d.ts +7 -7
- package/lib/components/GiftCardInput.js +1 -0
- package/{dist → lib}/components/GiftCardOrCouponCode.d.ts +13 -13
- package/lib/components/GiftCardOrCouponCode.js +1 -0
- package/{dist → lib}/components/GiftCardOrCouponForm.d.ts +10 -10
- package/lib/components/GiftCardOrCouponForm.js +1 -0
- package/{dist → lib}/components/GiftCardOrCouponInput.d.ts +8 -8
- package/lib/components/GiftCardOrCouponInput.js +1 -0
- package/{dist → lib}/components/GiftCardOrCouponRemoveButton.d.ts +16 -16
- package/lib/components/GiftCardOrCouponRemoveButton.js +1 -0
- package/{dist → lib}/components/GiftCardOrCouponSubmit.d.ts +9 -9
- package/lib/components/GiftCardOrCouponSubmit.js +1 -0
- package/{dist → lib}/components/GiftCardRecipient.d.ts +0 -0
- package/lib/components/GiftCardRecipient.js +1 -0
- package/{dist → lib}/components/GiftCardRecipientInput.d.ts +0 -0
- package/lib/components/GiftCardRecipientInput.js +1 -0
- package/{dist → lib}/components/ItemContainer.d.ts +11 -11
- package/lib/components/ItemContainer.js +1 -0
- package/{dist → lib}/components/LineItem.d.ts +8 -8
- package/lib/components/LineItem.js +1 -0
- package/{dist → lib}/components/LineItemAmount.d.ts +7 -7
- package/lib/components/LineItemAmount.js +1 -0
- package/lib/components/LineItemCode.d.ts +12 -0
- package/lib/components/LineItemCode.js +1 -0
- package/lib/components/LineItemImage.d.ts +16 -0
- package/lib/components/LineItemImage.js +1 -0
- package/lib/components/LineItemName.d.ts +11 -0
- package/lib/components/LineItemName.js +1 -0
- package/{dist → lib}/components/LineItemOption.d.ts +19 -19
- package/lib/components/LineItemOption.js +1 -0
- package/{dist → lib}/components/LineItemOptions.d.ts +14 -14
- package/lib/components/LineItemOptions.js +1 -0
- package/{dist → lib}/components/LineItemQuantity.d.ts +14 -14
- package/lib/components/LineItemQuantity.js +1 -0
- package/{dist → lib}/components/LineItemRemoveLink.d.ts +12 -12
- package/lib/components/LineItemRemoveLink.js +1 -0
- package/{dist → lib}/components/LineItemsContainer.d.ts +8 -8
- package/lib/components/LineItemsContainer.js +1 -0
- package/{dist → lib}/components/LineItemsCount.d.ts +12 -10
- package/lib/components/LineItemsCount.js +1 -0
- package/lib/components/LineItemsEmpty.d.ts +12 -0
- package/lib/components/LineItemsEmpty.js +1 -0
- package/{dist → lib}/components/MetadataInput.d.ts +5 -5
- package/lib/components/MetadataInput.js +1 -0
- package/{dist → lib}/components/OrderContainer.d.ts +11 -10
- package/lib/components/OrderContainer.js +1 -0
- package/{dist → lib}/components/OrderNumber.d.ts +5 -5
- package/lib/components/OrderNumber.js +1 -0
- package/{dist → lib}/components/OrderStorage.d.ts +8 -8
- package/lib/components/OrderStorage.js +1 -0
- package/lib/components/PaymentGateway.d.ts +16 -0
- package/lib/components/PaymentGateway.js +1 -0
- package/{dist → lib}/components/PaymentMethod.d.ts +16 -16
- package/lib/components/PaymentMethod.js +1 -0
- package/{dist → lib}/components/PaymentMethodAmount.d.ts +4 -4
- package/lib/components/PaymentMethodAmount.js +1 -0
- package/{dist → lib}/components/PaymentMethodName.d.ts +9 -9
- package/lib/components/PaymentMethodName.js +1 -0
- package/{dist → lib}/components/PaymentMethodPrice.d.ts +9 -9
- package/lib/components/PaymentMethodPrice.js +1 -0
- package/{dist → lib}/components/PaymentMethodRadioButton.d.ts +11 -11
- package/lib/components/PaymentMethodRadioButton.js +1 -0
- package/{dist → lib}/components/PaymentMethodsContainer.d.ts +8 -8
- package/lib/components/PaymentMethodsContainer.js +1 -0
- package/{dist → lib}/components/PaymentSource.d.ts +19 -18
- package/lib/components/PaymentSource.js +1 -0
- package/{dist → lib}/components/PaymentSourceBrandIcon.d.ts +15 -15
- package/lib/components/PaymentSourceBrandIcon.js +1 -0
- package/{dist → lib}/components/PaymentSourceBrandName.d.ts +12 -12
- package/lib/components/PaymentSourceBrandName.js +1 -0
- package/{dist → lib}/components/PaymentSourceDetail.d.ts +12 -12
- package/lib/components/PaymentSourceDetail.js +1 -0
- package/{dist → lib}/components/PaymentSourceEditButton.d.ts +9 -9
- package/lib/components/PaymentSourceEditButton.js +1 -0
- package/{dist → lib}/components/PaypalPayment.d.ts +12 -12
- package/lib/components/PaypalPayment.js +1 -0
- package/{dist → lib}/components/PlaceOrderButton.d.ts +12 -12
- package/lib/components/PlaceOrderButton.js +1 -0
- package/{dist → lib}/components/PlaceOrderContainer.d.ts +8 -8
- package/lib/components/PlaceOrderContainer.js +1 -0
- package/{dist → lib}/components/Price.d.ts +16 -14
- package/lib/components/Price.js +1 -0
- package/{dist → lib}/components/PricesContainer.d.ts +11 -11
- package/lib/components/PricesContainer.js +1 -0
- package/{dist → lib}/components/PrivacyAndTermsCheckbox.d.ts +4 -4
- package/lib/components/PrivacyAndTermsCheckbox.js +1 -0
- package/{dist → lib}/components/QuantitySelector.d.ts +17 -17
- package/lib/components/QuantitySelector.js +1 -0
- package/{dist → lib}/components/SaveAddressesButton.d.ts +10 -10
- package/lib/components/SaveAddressesButton.js +1 -0
- package/{dist → lib}/components/SaveCustomerButton.d.ts +13 -13
- package/lib/components/SaveCustomerButton.js +1 -0
- package/{dist → lib}/components/Shipment.d.ts +8 -8
- package/lib/components/Shipment.js +1 -0
- package/{dist → lib}/components/ShipmentField.d.ts +12 -12
- package/lib/components/ShipmentField.js +1 -0
- package/{dist → lib}/components/ShipmentsContainer.d.ts +6 -6
- package/lib/components/ShipmentsContainer.js +1 -0
- package/{dist → lib}/components/ShippingAddressContainer.d.ts +6 -6
- package/lib/components/ShippingAddressContainer.js +1 -0
- package/{dist → lib}/components/ShippingAddressForm.d.ts +8 -8
- package/lib/components/ShippingAddressForm.js +1 -0
- package/{dist → lib}/components/ShippingAmount.d.ts +4 -4
- package/lib/components/ShippingAmount.js +1 -0
- package/{dist → lib}/components/ShippingMethod.d.ts +8 -8
- package/lib/components/ShippingMethod.js +1 -0
- package/{dist → lib}/components/ShippingMethodName.d.ts +11 -7
- package/lib/components/ShippingMethodName.js +1 -0
- package/{dist → lib}/components/ShippingMethodPrice.d.ts +13 -13
- package/lib/components/ShippingMethodPrice.js +1 -0
- package/lib/components/ShippingMethodRadioButton.d.ts +13 -0
- package/lib/components/ShippingMethodRadioButton.js +1 -0
- package/{dist → lib}/components/SkuList.d.ts +7 -7
- package/lib/components/SkuList.js +1 -0
- package/{dist → lib}/components/SkuListsContainer.d.ts +6 -6
- package/lib/components/SkuListsContainer.js +1 -0
- package/{dist → lib}/components/SkuOption.d.ts +7 -7
- package/lib/components/SkuOption.js +1 -0
- package/{dist → lib}/components/SkuOptionInput.d.ts +5 -5
- package/lib/components/SkuOptionInput.js +1 -0
- package/{dist → lib}/components/SkuOptionsContainer.d.ts +7 -7
- package/lib/components/SkuOptionsContainer.js +1 -0
- package/{dist → lib}/components/StockTransfer.d.ts +6 -6
- package/lib/components/StockTransfer.js +1 -0
- package/{dist → lib}/components/StockTransferField.d.ts +9 -9
- package/lib/components/StockTransferField.js +1 -0
- package/{dist → lib}/components/StripePayment.d.ts +18 -18
- package/lib/components/StripePayment.js +1 -0
- package/{dist → lib}/components/SubTotalAmount.d.ts +4 -4
- package/lib/components/SubTotalAmount.js +1 -0
- package/{dist → lib}/components/SubmitButton.d.ts +9 -9
- package/lib/components/SubmitButton.js +1 -0
- package/{dist → lib}/components/TaxesAmount.d.ts +4 -4
- package/lib/components/TaxesAmount.js +1 -0
- package/{dist → lib}/components/TotalAmount.d.ts +4 -4
- package/lib/components/TotalAmount.js +1 -0
- package/{dist → lib}/components/VariantSelector.d.ts +29 -27
- package/lib/components/VariantSelector.js +1 -0
- package/{dist → lib}/components/VariantsContainer.d.ts +8 -8
- package/lib/components/VariantsContainer.js +1 -0
- package/{dist → lib}/components/WireTransferPayment.d.ts +10 -10
- package/lib/components/WireTransferPayment.js +1 -0
- package/lib/components/gateways/AdyenGateway.d.ts +5 -0
- package/lib/components/gateways/AdyenGateway.js +1 -0
- package/lib/components/gateways/BraintreeGateway.d.ts +5 -0
- package/lib/components/gateways/BraintreeGateway.js +1 -0
- package/lib/components/gateways/PaypalGateway.d.ts +5 -0
- package/lib/components/gateways/PaypalGateway.js +1 -0
- package/lib/components/gateways/StripeGateway.d.ts +5 -0
- package/lib/components/gateways/StripeGateway.js +1 -0
- package/lib/components/gateways/WireTransferGateway.d.ts +5 -0
- package/lib/components/gateways/WireTransferGateway.js +1 -0
- package/lib/components/utils/AddressCardsTemplate.d.ts +27 -0
- package/lib/components/utils/AddressCardsTemplate.js +1 -0
- package/{dist → lib}/components/utils/BaseField.d.ts +8 -8
- package/lib/components/utils/BaseField.js +1 -0
- package/lib/components/utils/BaseInput.d.ts +5 -0
- package/lib/components/utils/BaseInput.js +1 -0
- package/{dist → lib}/components/utils/BaseOrderPrice.d.ts +6 -6
- package/lib/components/utils/BaseOrderPrice.js +1 -0
- package/{dist → lib}/components/utils/BaseSelect.d.ts +5 -5
- package/lib/components/utils/BaseSelect.js +1 -0
- package/{dist → lib}/components/utils/Parent.d.ts +8 -8
- package/lib/components/utils/Parent.js +1 -0
- package/lib/components/utils/PaymentCardsTemplate.d.ts +23 -0
- package/lib/components/utils/PaymentCardsTemplate.js +1 -0
- package/{dist → lib}/components/utils/PriceTemplate.d.ts +8 -8
- package/lib/components/utils/PriceTemplate.js +1 -0
- package/{dist → lib}/components/utils/VariantTemplate.d.ts +36 -34
- package/lib/components/utils/VariantTemplate.js +1 -0
- package/{dist → lib}/components/utils/getAllErrors.d.ts +17 -17
- package/lib/components/utils/getAllErrors.js +1 -0
- package/{dist → lib}/config/components.d.ts +892 -881
- package/lib/config/components.js +1 -0
- package/lib/config/currency.d.ts +5 -0
- package/lib/config/currency.js +1 -0
- package/{dist → lib}/context/AddressChildrenContext.d.ts +7 -7
- package/lib/context/AddressChildrenContext.js +1 -0
- package/{dist → lib}/context/AddressContext.d.ts +17 -17
- package/lib/context/AddressContext.js +1 -0
- package/{dist → lib}/context/AvailabilityContext.d.ts +3 -3
- package/lib/context/AvailabilityContext.js +1 -0
- package/{dist → lib}/context/BillingAddressContext.d.ts +12 -12
- package/lib/context/BillingAddressContext.js +1 -0
- package/{dist → lib}/context/BillingAddressFormContext.d.ts +19 -18
- package/lib/context/BillingAddressFormContext.js +1 -0
- package/{dist → lib}/context/CommerceLayerContext.d.ts +7 -8
- package/lib/context/CommerceLayerContext.js +1 -0
- package/{dist → lib}/context/CouponAndGiftCardFormContext.d.ts +7 -7
- package/lib/context/CouponAndGiftCardFormContext.js +1 -0
- package/{dist → lib}/context/CustomerContext.d.ts +16 -14
- package/lib/context/CustomerContext.js +1 -0
- package/{dist → lib}/context/ExternalFunctionContext.d.ts +12 -12
- package/lib/context/ExternalFunctionContext.js +1 -0
- package/{dist → lib}/context/GiftCardContext.d.ts +11 -11
- package/lib/context/GiftCardContext.js +1 -0
- package/{dist → lib}/context/ItemContext.d.ts +13 -13
- package/lib/context/ItemContext.js +1 -0
- package/lib/context/LineItemChildrenContext.d.ts +9 -0
- package/lib/context/LineItemChildrenContext.js +1 -0
- package/{dist → lib}/context/LineItemContext.d.ts +8 -8
- package/lib/context/LineItemContext.js +1 -0
- package/{dist → lib}/context/LineItemOptionChildrenContext.d.ts +8 -8
- package/lib/context/LineItemOptionChildrenContext.js +1 -0
- package/lib/context/OrderContext.d.ts +26 -0
- package/lib/context/OrderContext.js +1 -0
- package/{dist → lib}/context/OrderStorageContext.d.ts +11 -11
- package/lib/context/OrderStorageContext.js +1 -0
- package/{dist → lib}/context/PaymentMethodChildrenContext.d.ts +10 -10
- package/lib/context/PaymentMethodChildrenContext.js +1 -0
- package/{dist → lib}/context/PaymentMethodContext.d.ts +23 -20
- package/lib/context/PaymentMethodContext.js +1 -0
- package/{dist → lib}/context/PaymentSourceContext.d.ts +14 -14
- package/lib/context/PaymentSourceContext.js +1 -0
- package/{dist → lib}/context/PlaceOrderContext.d.ts +16 -16
- package/lib/context/PlaceOrderContext.js +1 -0
- package/{dist → lib}/context/PricesContext.d.ts +7 -7
- package/lib/context/PricesContext.js +1 -0
- package/lib/context/ShipmentChildrenContext.d.ts +13 -0
- package/lib/context/ShipmentChildrenContext.js +1 -0
- package/{dist → lib}/context/ShipmentContext.d.ts +12 -12
- package/lib/context/ShipmentContext.js +1 -0
- package/{dist → lib}/context/ShippingAddressContext.d.ts +10 -10
- package/lib/context/ShippingAddressContext.js +1 -0
- package/{dist → lib}/context/ShippingAddressFormContext.d.ts +4 -4
- package/lib/context/ShippingAddressFormContext.js +1 -0
- package/lib/context/ShippingMethodChildrenContext.d.ts +10 -0
- package/lib/context/ShippingMethodChildrenContext.js +1 -0
- package/lib/context/SkuListsContext.d.ts +6 -0
- package/lib/context/SkuListsContext.js +1 -0
- package/{dist → lib}/context/SkuOptionChildrenContext.d.ts +8 -8
- package/lib/context/SkuOptionChildrenContext.js +1 -0
- package/{dist → lib}/context/SkuOptionsContext.d.ts +3 -3
- package/lib/context/SkuOptionsContext.js +1 -0
- package/{dist → lib}/context/StockTransferChildrenContext.d.ts +7 -7
- package/lib/context/StockTransferChildrenContext.js +1 -0
- package/{dist → lib}/context/VariantsContext.d.ts +3 -3
- package/lib/context/VariantsContext.js +1 -0
- package/lib/index.d.ts +99 -0
- package/lib/index.js +1 -0
- package/{dist → lib}/reducers/AddressReducer.d.ts +59 -57
- package/lib/reducers/AddressReducer.js +1 -0
- package/lib/reducers/AvailabilityReducer.d.ts +53 -0
- package/lib/reducers/AvailabilityReducer.js +1 -0
- package/{dist → lib}/reducers/BillingAddressReducer.d.ts +31 -32
- package/lib/reducers/BillingAddressReducer.js +1 -0
- package/{dist → lib}/reducers/CustomerReducer.d.ts +50 -60
- package/lib/reducers/CustomerReducer.js +1 -0
- package/{dist → lib}/reducers/GiftCardReducer.d.ts +76 -75
- package/lib/reducers/GiftCardReducer.js +1 -0
- package/{dist → lib}/reducers/ItemReducer.d.ts +69 -68
- package/lib/reducers/ItemReducer.js +1 -0
- package/{dist → lib}/reducers/LineItemReducer.d.ts +52 -52
- package/lib/reducers/LineItemReducer.js +1 -0
- package/lib/reducers/OrderReducer.d.ts +133 -0
- package/lib/reducers/OrderReducer.js +1 -0
- package/{dist → lib}/reducers/PaymentMethodReducer.d.ts +105 -95
- package/lib/reducers/PaymentMethodReducer.js +1 -0
- package/{dist → lib}/reducers/PlaceOrderReducer.d.ts +52 -50
- package/lib/reducers/PlaceOrderReducer.js +1 -0
- package/{dist → lib}/reducers/PriceReducer.d.ts +44 -45
- package/lib/reducers/PriceReducer.js +1 -0
- package/{dist → lib}/reducers/ShipmentReducer.d.ts +40 -37
- package/lib/reducers/ShipmentReducer.js +1 -0
- package/{dist → lib}/reducers/ShippingAddressReducer.d.ts +32 -31
- package/lib/reducers/ShippingAddressReducer.js +1 -0
- package/{dist → lib}/reducers/SkuListsReducer.d.ts +21 -22
- package/lib/reducers/SkuListsReducer.js +1 -0
- package/{dist → lib}/reducers/SkuOptionsReducer.d.ts +26 -26
- package/lib/reducers/SkuOptionsReducer.js +1 -0
- package/{dist → lib}/reducers/VariantReducer.d.ts +71 -71
- package/lib/reducers/VariantReducer.js +1 -0
- package/{dist → lib}/typings/errors.d.ts +42 -40
- package/lib/typings/errors.js +1 -0
- package/{dist → lib}/typings/index.d.ts +126 -151
- package/lib/typings/index.js +1 -0
- package/{dist → lib}/utils/PropsType.d.ts +33 -33
- package/lib/utils/PropsType.js +1 -0
- package/{dist → lib}/utils/addressesManager.d.ts +28 -27
- package/lib/utils/addressesManager.js +1 -0
- package/{dist → lib}/utils/baseReducer.d.ts +3 -3
- package/lib/utils/baseReducer.js +1 -0
- package/lib/utils/browserInfo.d.ts +9 -0
- package/lib/utils/browserInfo.js +1 -0
- package/{dist → lib}/utils/childrenTypes.d.ts +9 -9
- package/lib/utils/childrenTypes.js +1 -0
- package/lib/utils/countryStateCity.d.ts +9 -0
- package/lib/utils/countryStateCity.js +1 -0
- package/{dist → lib}/utils/customMessages.d.ts +8 -8
- package/lib/utils/customMessages.js +1 -0
- package/lib/utils/customerOrderOptions.d.ts +3 -0
- package/lib/utils/customerOrderOptions.js +1 -0
- package/{dist → lib}/utils/getAmount.d.ts +9 -9
- package/lib/utils/getAmount.js +1 -0
- package/{dist → lib}/utils/getCurrentItemKey.d.ts +6 -6
- package/lib/utils/getCurrentItemKey.js +1 -0
- package/lib/utils/getErrors.d.ts +11 -0
- package/lib/utils/getErrors.js +1 -0
- package/lib/utils/getLineItemsCount.d.ts +12 -0
- package/lib/utils/getLineItemsCount.js +1 -0
- package/{dist → lib}/utils/getLoaderComponent.d.ts +3 -3
- package/lib/utils/getLoaderComponent.js +1 -0
- package/lib/utils/getPrices.d.ts +17 -0
- package/lib/utils/getPrices.js +1 -0
- package/lib/utils/getSdk.d.ts +3 -0
- package/lib/utils/getSdk.js +1 -0
- package/lib/utils/getSkus.d.ts +3 -0
- package/lib/utils/getSkus.js +1 -0
- package/{dist → lib}/utils/isEmptyStates.d.ts +1 -1
- package/lib/utils/isEmptyStates.js +1 -0
- package/{dist → lib}/utils/isJSON.d.ts +1 -1
- package/lib/utils/isJSON.js +1 -0
- package/lib/utils/jwt.d.ts +27 -0
- package/lib/utils/jwt.js +1 -0
- package/{dist → lib}/utils/localStorage.d.ts +17 -18
- package/lib/utils/localStorage.js +1 -0
- package/lib/utils/organization.d.ts +6 -0
- package/lib/utils/organization.js +1 -0
- package/lib/utils/paypalPayment.d.ts +3 -0
- package/lib/utils/paypalPayment.js +1 -0
- package/{dist → lib}/utils/promisify.d.ts +1 -1
- package/lib/utils/promisify.js +1 -0
- package/lib/utils/shipments.d.ts +2 -0
- package/lib/utils/shipments.js +1 -0
- package/{dist → lib}/utils/validateFormFields.d.ts +22 -19
- package/lib/utils/validateFormFields.js +1 -0
- package/package.json +98 -84
- package/dist/components/CustomerField.d.ts +0 -10
- package/dist/components/LineItemImage.d.ts +0 -10
- package/dist/components/LineItemName.d.ts +0 -7
- package/dist/components/LineItemSkuCode.d.ts +0 -7
- package/dist/components/OrderList.d.ts +0 -28
- package/dist/components/OrderListRow.d.ts +0 -14
- package/dist/components/PaymentGateway.d.ts +0 -11
- package/dist/components/ShippingMethodRadioButton.d.ts +0 -9
- package/dist/components/utils/BaseInput.d.ts +0 -5
- package/dist/context/LineItemChildrenContext.d.ts +0 -7
- package/dist/context/OrderContext.d.ts +0 -4
- package/dist/context/OrderListChildrenContext.d.ts +0 -14
- package/dist/context/ShipmentChildrenContext.d.ts +0 -13
- package/dist/context/ShippingMethodChildrenContext.d.ts +0 -9
- package/dist/context/SkuListsContext.d.ts +0 -3
- package/dist/index.d.ts +0 -90
- package/dist/index.js +0 -8
- package/dist/react-components.cjs.development.js +0 -12429
- package/dist/react-components.cjs.development.js.map +0 -1
- package/dist/react-components.cjs.production.min.js +0 -2
- package/dist/react-components.cjs.production.min.js.map +0 -1
- package/dist/react-components.esm.js +0 -12332
- package/dist/react-components.esm.js.map +0 -1
- package/dist/reducers/AvailabilityReducer.d.ts +0 -40
- package/dist/reducers/OrderReducer.d.ts +0 -131
- package/dist/typings/order.d.ts +0 -120
- package/dist/utils/countryStateCity.d.ts +0 -9
- package/dist/utils/customerOrderOptions.d.ts +0 -4
- package/dist/utils/dynamicNaming.d.ts +0 -5
- package/dist/utils/getErrorsByCollection.d.ts +0 -11
- package/dist/utils/getLineItemsCount.d.ts +0 -6
- package/dist/utils/getPrices.d.ts +0 -18
- package/dist/utils/getSkus.d.ts +0 -3
- package/dist/utils/icons.d.ts +0 -3
- package/dist/utils/isDate.d.ts +0 -1
- package/dist/utils/paypalPayment.d.ts +0 -3
- package/dist/utils/scrollbarWidth.d.ts +0 -1
- package/dist/utils/shipments.d.ts +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import PropTypes from"prop-types";import childrenTypes from"../utils/childrenTypes";import{baseOrderComponentPricePropTypes,PTLoader,BMObject}from"../typings/index";import{ErrorPropTypes}from"../typings/errors";import{BaseInputComponentPropTypes}from"../typings/index";const components={Address:{permittedChildren:["AddressField","ReactNode"],displayName:"Address",propTypes:{children:childrenTypes.isRequired}},AddressCountrySelector:{displayName:"AddressCountrySelector",propTypes:{children:PropTypes.func,placeholder:PropTypes.shape({label:PropTypes.string.isRequired,value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]).isRequired}),value:PropTypes.string,name:PropTypes.oneOf(["billing_address_country_code","shipping_address_country_code"]).isRequired,required:PropTypes.bool},defaultProps:{required:!0}},AddressStateSelector:{displayName:"AddressStateSelector",propTypes:{children:PropTypes.func,placeholder:PropTypes.shape({label:PropTypes.string.isRequired,value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]).isRequired}),value:PropTypes.string,name:PropTypes.oneOf(["billing_address_state_code","shipping_address_state_code"]).isRequired,required:PropTypes.bool},defaultProps:{required:!0}},AddressField:{displayName:"AddressField",propTypes:{children:PropTypes.func}},AddressInput:{displayName:"AddressInput",propTypes:{children:PropTypes.func,name:PropTypes.oneOf(["billing_address_city","billing_address_company","billing_address_email","billing_address_first_name","billing_address_last_name","billing_address_line_1","billing_address_line_2","billing_address_phone","billing_address_state_code","billing_address_zip_code","billing_address_billing_info","billing_address_save_to_customer_book","shipping_address_city","shipping_address_company","shipping_address_email","shipping_address_first_name","shipping_address_last_name","shipping_address_line_1","shipping_address_line_2","shipping_address_phone","shipping_address_state_code","shipping_address_zip_code","shipping_address_save_to_customer_book"]).isRequired,type:PropTypes.oneOf(["checkbox","date","email","number","tel","text","textarea"]).isRequired,placeholder:PropTypes.string,disabled:PropTypes.bool,required:PropTypes.bool},defaultProps:{required:!0}},AdjustmentAmount:{displayName:"AdjustmentAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},AddToCartButton:{displayName:"AddToCartButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element]),skuCode:PropTypes.string,disabled:PropTypes.bool,lineItem:PropTypes.shape({name:PropTypes.string.isRequired,imageUrl:PropTypes.string})},defaultProps:{label:"Add to cart"}},AddressesContainer:{displayName:"AddressesContainer",permittedChildren:["BillingAddressForm","BillingAddressContainer","ShippingAddressForm","ShippingAddressContainer","SaveAddressesButton","ReactNode"],propTypes:{children:childrenTypes.isRequired,shipToDifferentAddress:PropTypes.bool}},AvailabilityContainer:{displayName:"AvailabilityContainer",permittedChildren:["AvailabilityTemplate","ReactNode"],propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string}},AvailabilityTemplate:{displayName:"AvailabilityTemplate",propTypes:{timeFormat:PropTypes.oneOf(["days","hours"]),showShippingMethodName:PropTypes.bool,children:PropTypes.func},defaultProps:{timeFormat:"days",showShippingMethodName:!1}},BillingAddressContainer:{permittedChildren:["Address","ReactNode"],propTypes:{children:childrenTypes.isRequired}},BillingAddressForm:{permittedChildren:["AddressInput","ReactNode","Errors"],propTypes:{children:childrenTypes.isRequired}},CheckoutLink:{displayName:"CheckoutLink",propTypes:{children:PropTypes.func,label:PropTypes.string},defaultProps:{label:"Checkout"}},CommerceLayer:{permittedChildren:["OrderContainer","OrderStorage","PricesContainer","GiftCardContainer","ReactNode"],propTypes:{children:childrenTypes.isRequired,accessToken:PropTypes.string.isRequired,endpoint:PropTypes.string.isRequired}},CustomerContainer:{displayName:"CustomerContainer",permittedChildren:["CustomerInput","SaveCustomerButton","AddressesContainer","PaymentMethodsContainer","ShipmentsContainer","ReactNode"],propTypes:{children:childrenTypes.isRequired,isGuest:PropTypes.bool}},CustomerInput:{displayName:"CustomerInput",propTypes:{children:PropTypes.func,name:PropTypes.oneOf(["customerEmail"]),type:PropTypes.oneOf(["email"]),placeholder:PropTypes.string,disabled:PropTypes.bool,required:PropTypes.bool,saveOnBlur:PropTypes.bool},defaultProps:{required:!0}},DeliveryLeadTime:{displayName:"DeliveryLeadTime",propTypes:{type:PropTypes.oneOf(["max_days","max_hours","min_days","min_hours"]).isRequired,children:PropTypes.func}},DiscountAmount:{displayName:"DiscountAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},Errors:{displayName:"Errors",propTypes:ErrorPropTypes,defaultProps:{messages:[],field:"base"}},ExternalFunction:{displayName:"ExternalFunction",permittedChildren:["AddToCartButton","ReactNode"],propTypes:{children:childrenTypes.isRequired,url:PropTypes.string.isRequired}},GiftCard:{permittedChildren:["GiftCardCurrencySelector","GiftCardInput","Errors","MetadataInput","SubmitButton","ReactNode"],displayName:"GiftCard",propTypes:{children:childrenTypes.isRequired,onSubmit:PropTypes.func},defaultProps:{onSubmit:void 0}},GiftCardAmount:{displayName:"GiftCardAmount",propTypes:baseOrderComponentPricePropTypes},GiftCardContainer:{permittedChildren:["GiftCard","Errors","ReactNode"],displayName:"GiftCardContainer",propTypes:{children:childrenTypes.isRequired}},GiftCardCurrencySelector:{displayName:"GiftCardCurrencySelector",propTypes:{children:PropTypes.func,placeholder:PropTypes.shape({value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]).isRequired,label:PropTypes.string.isRequired}),value:PropTypes.string,required:PropTypes.bool},defaultProps:{required:!0}},GiftCardInput:{displayName:"GiftCardInput",propTypes:{type:PropTypes.oneOf(["text","email","number","date","checkbox"]).isRequired,name:PropTypes.oneOf(["balanceCents","balanceMaxCents","singleUse","rechargeable","imageUrl","expiresAt","referenceOrigin","email","firstName","lastName","reference"]).isRequired,children:PropTypes.func,placeholder:PropTypes.string}},GiftCardOrCouponForm:{permittedChildren:["GiftCardOrCouponInput","GiftCardOrCouponSubmit","ReactNode"],propTypes:{children:childrenTypes.isRequired}},GiftCardOrCouponInput:{displayName:"GiftCardOrCouponInput",propTypes:{children:PropTypes.func,placeholder:PropTypes.string,disabled:PropTypes.bool,required:PropTypes.bool}},GiftCardOrCouponSubmit:{displayName:"GiftCardOrCouponSubmit",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.object])}},GiftCardOrCouponCode:{displayName:"GiftCardOrCouponCode",propTypes:{children:PropTypes.func,type:PropTypes.oneOf(["coupon","gift_card"])}},GiftCardOrCouponRemoveButton:{displayName:"GiftCardOrCouponRemoveButton",propTypes:{children:PropTypes.func,type:PropTypes.oneOf(["coupon","gift_card"]),label:PropTypes.oneOfType([PropTypes.string,PropTypes.object])}},ItemContainer:{permittedChildren:["PricesContainer","VariantsContainer","SkuOptionContainer","QuantitySelector","AddToCartButton","AvailabilityContainer","SkuListsContainer","ReactNode"],displayName:"ItemContainer",propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string,lineItem:PropTypes.shape({name:PropTypes.string.isRequired,imageUrl:PropTypes.string})}},LineItem:{permittedChildren:["AvailabilityContainer","LineItemImage","LineItemName","LineItemOptions","LineItemQuantity","LineItemAmount","LineItemRemoveLink","StockTransfer","Errors","ReactNode"],displayName:"LineItem",propTypes:{children:childrenTypes.isRequired,type:PropTypes.oneOf(["skus","gift_cards","shipments","payment_methods","promotions","adjustments","bundles"])},defaultProps:{type:"skus"}},LineItemAmount:{displayName:"LineItemAmount",propTypes:Object.assign(Object.assign({},baseOrderComponentPricePropTypes),{type:PropTypes.oneOf(["total","unit","option"])}),defaultProps:{format:"formatted",type:"total"}},LineItemImage:{displayName:"LineItemImage",propTypes:{width:PropTypes.number,children:PropTypes.func}},LineItemName:{displayName:"LineItemName",propTypes:{children:PropTypes.func}},LineItemCode:{displayName:"LineItemCode",propTypes:{children:PropTypes.func}},LineItemOption:{displayName:"LineItemOption",propTypes:{name:PropTypes.string,children:PropTypes.func,valueClassName:PropTypes.string,className:PropTypes.string,id:PropTypes.string,style:PropTypes.object}},LineItemOptions:{permittedChildren:["LineItemOption","ReactNode"],displayName:"LineItemOptions",propTypes:{children:childrenTypes.isRequired,title:PropTypes.string,showName:PropTypes.bool,skuOptionId:PropTypes.string}},LineItemQuantity:{displayName:"LineItemQuantity",propTypes:{children:PropTypes.func,max:PropTypes.number,disabled:PropTypes.bool,readonly:PropTypes.bool},defaultProps:{max:50}},LineItemRemoveLink:{displayName:"LineItemRemoveLink",propTypes:{children:PropTypes.func,label:PropTypes.string},defaultProps:{label:"Remove"}},LineItemsContainer:{permittedChildren:["LineItemsCount","LineItemsEmpty","LineItem","ReactNode"],displayName:"LineItemsContainer",propTypes:{children:childrenTypes.isRequired,filters:PropTypes.object,loader:PTLoader},defaultProps:{filters:{},loader:"Loading..."}},LineItemsCount:{displayName:"LineItemsCount",propTypes:{children:PropTypes.func,id:PropTypes.string,className:PropTypes.string,name:PropTypes.string,style:PropTypes.object}},LineItemsEmpty:{displayName:"LineItemsEmpty",propTypes:{children:PropTypes.func,id:PropTypes.string,className:PropTypes.string,name:PropTypes.string,style:PropTypes.object,text:PropTypes.string}},MetadataInput:{displayName:"MetadataInput",propTypes:BaseInputComponentPropTypes},OrderContainer:{permittedChildren:["AddressesContainer","CustomerContainer","ItemContainer","LineItemsContainer","SubTotalAmount","DiscountAmount","AdjustmentAmount","ShippingAmount","TaxesAmount","GiftCardAmount","TotalAmount","CheckoutLink","GiftCardContainer","ShipmentsContainer","PaymentMethodsContainer","PaymentMethodAmount","GiftCardOrCouponForm","GiftCardOrCouponCode","GiftCardOrCouponRemoveButton","Errors","OrderNumber","ReactNode"],displayName:"OrderContainer",propTypes:{children:childrenTypes.isRequired,orderId:PropTypes.string,metadata:BMObject,attributes:PropTypes.object},defaultProps:{metadata:{}}},OrderNumber:{displayName:"OrderNumber",propTypes:{className:PropTypes.string},defaultProps:{format:"formatted"}},OrderStorage:{permittedChildren:["OrderContainer","ReactNode"],displayName:"OrderStorage",propTypes:{children:childrenTypes.isRequired,clearWhenPlaced:PropTypes.bool,persistKey:PropTypes.string.isRequired}},PaymentMethod:{permittedChildren:["PaymentMethodName","PaymentMethodRadioButton","PaymentMethodPrice","PaymentSource","ReactNode","Errors"],displayName:"PaymentMethod",propTypes:{children:childrenTypes.isRequired}},PaymentMethodAmount:{displayName:"PaymentMethodAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},PaymentMethodName:{displayName:"PaymentMethodName",propTypes:{children:PropTypes.func}},PaymentMethodPrice:{displayName:"PaymentMethodPrice",propTypes:Object.assign(Object.assign({},baseOrderComponentPricePropTypes),{type:PropTypes.oneOf(["amount"])})},PaymentMethodRadioButton:{displayName:"PaymentMethodRadioButton",propTypes:{children:PropTypes.func}},PaymentMethodsContainer:{displayName:"PaymentMethodsContainer",permittedChildren:["PaymentSource","ReactNode","PlaceOrderContainer"],propTypes:{children:childrenTypes.isRequired}},PaymentSource:{displayName:"PaymentSource",permittedChildren:["PaymentSourceBrandIcon","PaymentSourceBrandName","PaymentSourceEditButton","PaymentSourceDetail","ReactNode"],propTypes:{children:childrenTypes,readonly:PropTypes.bool}},PaymentSourceBrandIcon:{displayName:"PaymentSourceBrandIcon",propTypes:{children:PropTypes.func,width:PropTypes.number,height:PropTypes.number,src:PropTypes.string,className:PropTypes.string}},PaymentSourceBrandName:{displayName:"PaymentSourceBrandName",propTypes:{children:PropTypes.func,label:PropTypes.string}},PaymentSourceEditButton:{displayName:"PaymentSourceEditButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element])}},PaymentSourceDetail:{displayName:"PaymentSourceDetail",propTypes:{type:PropTypes.oneOf(["last4","exp_year","exp_month"]).isRequired}},PlaceOrderButton:{displayName:"PlaceOrderButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element])},defaultProps:{label:"Place order"}},PlaceOrderContainer:{displayName:"PlaceOrderContainer",permittedChildren:["PaymentMethod","PlaceOrderButton","PrivacyAndTermsCheckbox","ReactNode"],propTypes:{children:childrenTypes.isRequired}},Price:{displayName:"Price",propTypes:{children:PropTypes.func,compareClassName:PropTypes.string,skuCode:PropTypes.string,showCompare:PropTypes.bool},defaultProps:{skuCode:""}},PricesContainer:{permittedChildren:["Price","ReactNode"],displayName:"PricesContainer",propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string,loader:PTLoader,perPage:PropTypes.number,filters:PropTypes.object},defaultProps:{perPage:10,filters:{},loader:"Loading...",skuCode:""}},PrivacyAndTermsCheckbox:{displayName:"PrivacyAndTermsCheckbox",propTypes:{children:PropTypes.func}},QuantitySelector:{displayName:"QuantitySelector",propTypes:{children:PropTypes.func,min:PropTypes.number,max:PropTypes.number,value:PropTypes.string,skuCode:PropTypes.string,disabled:PropTypes.bool},defaultProps:{min:1}},SaveAddressesButton:{displayName:"SaveAddressesButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element]),onClick:PropTypes.func,disabled:PropTypes.bool},defaultProps:{label:"Continue to delivery"}},Shipment:{permittedChildren:["LineItemsContainer","LineItem","ShippingMethod","ReactNode"],displayName:"Shipment",propTypes:{children:childrenTypes.isRequired}},ShipmentField:{displayName:"ShipmentField",propTypes:{children:PropTypes.func,name:PropTypes.oneOf(["cost_amount_cents","cost_amount_float","currency_code","formatted_cost_amount","number","status","key_number"]).isRequired}},ShipmentsContainer:{displayName:"ShipmentsContainer",permittedChildren:["Shipment","ReactNode"],propTypes:{children:childrenTypes.isRequired}},ShippingAddressContainer:{permittedChildren:["Address","ReactNode"],propTypes:{children:childrenTypes.isRequired}},SaveCustomerButton:{displayName:"SaveCustomerButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element]),onClick:PropTypes.func},defaultProps:{label:"Save"}},ShippingAddressForm:{permittedChildren:["AddressInput","ReactNode"],propTypes:{children:childrenTypes.isRequired}},ShippingAmount:{displayName:"ShippingAmount",propTypes:baseOrderComponentPricePropTypes},ShippingMethod:{permittedChildren:["ShippingMethodName","ShippingMethodPrice","ShippingMethodRadioButton","DeliveryLeadTime","ReactNode"],displayName:"ShippingMethod",propTypes:{children:childrenTypes.isRequired,readonly:PropTypes.bool}},ShippingMethodName:{displayName:"ShippingMethodName",propTypes:{children:PropTypes.func}},ShippingMethodRadioButton:{displayName:"ShippingMethodRadioButton",propTypes:{children:PropTypes.func}},ShippingMethodPrice:{displayName:"ShippingMethodPrice",propTypes:Object.assign(Object.assign({},baseOrderComponentPricePropTypes),{type:PropTypes.oneOf(["amount"])}),defaultProps:{format:"formatted",type:"amount"}},SkuList:{permittedChildren:["AddToCartButton","QuantitySelector","ReactNode"],displayName:"SkuList",propTypes:{children:childrenTypes.isRequired,id:PropTypes.string.isRequired}},SkuListsContainer:{permittedChildren:["SkuList","ReactNode"],displayName:"SkuListsContainer",propTypes:{children:childrenTypes.isRequired}},SkuOption:{permittedChildren:["SkuOptionInput","ReactNode"],displayName:"SkuOption",propTypes:{children:childrenTypes.isRequired,id:PropTypes.string.isRequired}},SkuOptionInput:{displayName:"SkuOptionInput",propTypes:BaseInputComponentPropTypes},SkuOptionsContainer:{permittedChildren:["SkuOption","ReactNode"],displayName:"SkuOptionsContainer",propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string}},StockTransfer:{permittedChildren:["StockTransferField","ReactNode"],displayName:"StockTransfer",propTypes:{children:childrenTypes.isRequired}},StockTransferField:{displayName:"StockTransferField",propTypes:{children:PropTypes.func,type:PropTypes.oneOf(["quantity","sku_code"]).isRequired}},SubmitButton:{displayName:"SubmitButton",propTypes:{children:PropTypes.func,label:PropTypes.oneOfType([PropTypes.string,PropTypes.element])},defaultProps:{label:"Submit"}},SubTotalAmount:{displayName:"SubTotalAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},TaxesAmount:{displayName:"TaxesAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},TotalAmount:{displayName:"TotalAmount",propTypes:baseOrderComponentPricePropTypes,defaultProps:{format:"formatted"}},VariantsContainer:{permittedChildren:["VariantSelector","ReactNode"],displayName:"VariantsContainer",propTypes:{children:childrenTypes.isRequired,skuCode:PropTypes.string,filters:PropTypes.object},defaultProps:{skuCode:"",filters:{}}},VariantSelector:{displayName:"VariantSelector",propTypes:{options:PropTypes.arrayOf(PropTypes.shape({label:PropTypes.string.isRequired,code:PropTypes.string.isRequired,lineItem:PropTypes.shape({name:PropTypes.string.isRequired,imageUrl:PropTypes.string})}).isRequired).isRequired,name:PropTypes.string,children:PropTypes.func,type:PropTypes.oneOf(["select","radio"]),loader:PropTypes.element,placeholder:PropTypes.string,skuCode:PropTypes.string},defaultProps:{placeholder:"Select a variant",type:"select"}}};export default components;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default[{value:"AED",label:"AED"},{value:"AFN",label:"AFN"},{value:"ALL",label:"ALL"},{value:"AMD",label:"AMD"},{value:"ANG",label:"ANG"},{value:"AOA",label:"AOA"},{value:"ARS",label:"ARS"},{value:"AUD",label:"AUD"},{value:"AWG",label:"AWG"},{value:"AZN",label:"AZN"},{value:"BAM",label:"BAM"},{value:"BBD",label:"BBD"},{value:"BDT",label:"BDT"},{value:"BGN",label:"BGN"},{value:"BHD",label:"BHD"},{value:"BIF",label:"BIF"},{value:"BMD",label:"BMD"},{value:"BND",label:"BND"},{value:"BOB",label:"BOB"},{value:"BRL",label:"BRL"},{value:"BSD",label:"BSD"},{value:"BTN",label:"BTN"},{value:"BWP",label:"BWP"},{value:"BYN",label:"BYN"},{value:"BYR",label:"BYR"},{value:"BZD",label:"BZD"},{value:"CAD",label:"CAD"},{value:"CDF",label:"CDF"},{value:"CHF",label:"CHF"},{value:"CLF",label:"CLF"},{value:"CLP",label:"CLP"},{value:"CNY",label:"CNY"},{value:"COP",label:"COP"},{value:"CRC",label:"CRC"},{value:"CUC",label:"CUC"},{value:"CUP",label:"CUP"},{value:"CVE",label:"CVE"},{value:"CZK",label:"CZK"},{value:"DJF",label:"DJF"},{value:"DKK",label:"DKK"},{value:"DOP",label:"DOP"},{value:"DZD",label:"DZD"},{value:"EGP",label:"EGP"},{value:"ERN",label:"ERN"},{value:"ETB",label:"ETB"},{value:"EUR",label:"EUR"},{value:"FJD",label:"FJD"},{value:"FKP",label:"FKP"},{value:"GBP",label:"GBP"},{value:"GEL",label:"GEL"},{value:"GHS",label:"GHS"},{value:"GIP",label:"GIP"},{value:"GMD",label:"GMD"},{value:"GNF",label:"GNF"},{value:"GTQ",label:"GTQ"},{value:"GYD",label:"GYD"},{value:"HKD",label:"HKD"},{value:"HNL",label:"HNL"},{value:"HRK",label:"HRK"},{value:"HTG",label:"HTG"},{value:"HUF",label:"HUF"},{value:"IDR",label:"IDR"},{value:"ILS",label:"ILS"},{value:"INR",label:"INR"},{value:"IQD",label:"IQD"},{value:"IRR",label:"IRR"},{value:"ISK",label:"ISK"},{value:"JMD",label:"JMD"},{value:"JOD",label:"JOD"},{value:"JPY",label:"JPY"},{value:"KES",label:"KES"},{value:"KGS",label:"KGS"},{value:"KHR",label:"KHR"},{value:"KMF",label:"KMF"},{value:"KPW",label:"KPW"},{value:"KRW",label:"KRW"},{value:"KWD",label:"KWD"},{value:"KYD",label:"KYD"},{value:"KZT",label:"KZT"},{value:"LAK",label:"LAK"},{value:"LBP",label:"LBP"},{value:"LKR",label:"LKR"},{value:"LRD",label:"LRD"},{value:"LSL",label:"LSL"},{value:"LTL",label:"LTL"},{value:"LVL",label:"LVL"},{value:"LYD",label:"LYD"},{value:"MAD",label:"MAD"},{value:"MDL",label:"MDL"},{value:"MGA",label:"MGA"},{value:"MKD",label:"MKD"},{value:"MMK",label:"MMK"},{value:"MNT",label:"MNT"},{value:"MOP",label:"MOP"},{value:"MRO",label:"MRO"},{value:"MUR",label:"MUR"},{value:"MVR",label:"MVR"},{value:"MWK",label:"MWK"},{value:"MXN",label:"MXN"},{value:"MYR",label:"MYR"},{value:"MZN",label:"MZN"},{value:"NAD",label:"NAD"},{value:"NGN",label:"NGN"},{value:"NIO",label:"NIO"},{value:"NOK",label:"NOK"},{value:"NPR",label:"NPR"},{value:"NZD",label:"NZD"},{value:"OMR",label:"OMR"},{value:"PAB",label:"PAB"},{value:"PEN",label:"PEN"},{value:"PGK",label:"PGK"},{value:"PHP",label:"PHP"},{value:"PKR",label:"PKR"},{value:"PLN",label:"PLN"},{value:"PYG",label:"PYG"},{value:"QAR",label:"QAR"},{value:"RON",label:"RON"},{value:"RSD",label:"RSD"},{value:"RUB",label:"RUB"},{value:"RWF",label:"RWF"},{value:"SAR",label:"SAR"},{value:"SBD",label:"SBD"},{value:"SCR",label:"SCR"},{value:"SDG",label:"SDG"},{value:"SEK",label:"SEK"},{value:"SGD",label:"SGD"},{value:"SHP",label:"SHP"},{value:"SKK",label:"SKK"},{value:"SLL",label:"SLL"},{value:"SOS",label:"SOS"},{value:"SRD",label:"SRD"},{value:"SSP",label:"SSP"},{value:"STD",label:"STD"},{value:"SVC",label:"SVC"},{value:"SYP",label:"SYP"},{value:"SZL",label:"SZL"},{value:"THB",label:"THB"},{value:"TJS",label:"TJS"},{value:"TMT",label:"TMT"},{value:"TND",label:"TND"},{value:"TOP",label:"TOP"},{value:"TRY",label:"TRY"},{value:"TTD",label:"TTD"},{value:"TWD",label:"TWD"},{value:"TZS",label:"TZS"},{value:"UAH",label:"UAH"},{value:"UGX",label:"UGX"},{value:"USD",label:"USD"},{value:"UYU",label:"UYU"},{value:"UZS",label:"UZS"},{value:"VEF",label:"VEF"},{value:"VND",label:"VND"},{value:"VUV",label:"VUV"},{value:"WST",label:"WST"},{value:"XAF",label:"XAF"},{value:"XAG",label:"XAG"},{value:"XAU",label:"XAU"},{value:"XBA",label:"XBA"},{value:"XBB",label:"XBB"},{value:"XBC",label:"XBC"},{value:"XBD",label:"XBD"},{value:"XCD",label:"XCD"},{value:"XDR",label:"XDR"},{value:"XOF",label:"XOF"},{value:"XPD",label:"XPD"},{value:"XPF",label:"XPF"},{value:"XPT",label:"XPT"},{value:"XTS",label:"XTS"},{value:"YER",label:"YER"},{value:"ZAR",label:"ZAR"},{value:"ZMK",label:"ZMK"},{value:"ZMW",label:"ZMW"},{value:"BTC",label:"BTC"},{value:"JEP",label:"JEP"},{value:"GGP",label:"GGP"},{value:"IMP",label:"IMP"},{value:"XFU",label:"XFU"},{value:"GBX",label:"GBX"},{value:"CNH",label:"CNH"},{value:"EEK",label:"EEK"},{value:"GHS",label:"GHS"},{value:"MTL",label:"MTL"},{value:"TMM",label:"TMM"},{value:"JPY",label:"JPY"},{value:"ZWD",label:"ZWD"},{value:"ZWL",label:"ZWL"},{value:"ZWN",label:"ZWN"},{value:"ZWR",label:"ZWR"}];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export interface InitialAddressContext {
|
|
4
|
-
address:
|
|
5
|
-
}
|
|
6
|
-
declare const AddressChildrenContext: import("react").Context<InitialAddressContext>;
|
|
7
|
-
export default AddressChildrenContext;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Address } from '@commercelayer/sdk';
|
|
3
|
+
export interface InitialAddressContext {
|
|
4
|
+
address: Address | Record<string, any>;
|
|
5
|
+
}
|
|
6
|
+
declare const AddressChildrenContext: import("react").Context<InitialAddressContext>;
|
|
7
|
+
export default AddressChildrenContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext}from"react";const initial={address:{}},AddressChildrenContext=createContext(initial);export default AddressChildrenContext;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { AddressState, SetAddress } from
|
|
3
|
-
import { BaseError } from
|
|
4
|
-
declare type DefaultContext = {
|
|
5
|
-
saveAddresses: () => void;
|
|
6
|
-
setCloneAddress: (id: string, resource:
|
|
7
|
-
setAddress: SetAddress;
|
|
8
|
-
setAddressErrors: (errors: BaseError[], resource:
|
|
9
|
-
} & AddressState;
|
|
10
|
-
export declare const defaultAddressContext: {
|
|
11
|
-
saveAddresses: () => void;
|
|
12
|
-
setCloneAddress: () => void;
|
|
13
|
-
setAddress: SetAddress;
|
|
14
|
-
setAddressErrors: () => void;
|
|
15
|
-
};
|
|
16
|
-
declare const AddressesContext: import("react").Context<DefaultContext>;
|
|
17
|
-
export default AddressesContext;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AddressState, SetAddress, AddressResource } from '../reducers/AddressReducer';
|
|
3
|
+
import { BaseError } from '../typings/errors';
|
|
4
|
+
declare type DefaultContext = {
|
|
5
|
+
saveAddresses: () => void;
|
|
6
|
+
setCloneAddress: (id: string, resource: AddressResource) => void;
|
|
7
|
+
setAddress: SetAddress;
|
|
8
|
+
setAddressErrors: (errors: BaseError[], resource: AddressResource) => void;
|
|
9
|
+
} & AddressState;
|
|
10
|
+
export declare const defaultAddressContext: {
|
|
11
|
+
saveAddresses: () => void;
|
|
12
|
+
setCloneAddress: () => void;
|
|
13
|
+
setAddress: SetAddress;
|
|
14
|
+
setAddressErrors: () => void;
|
|
15
|
+
};
|
|
16
|
+
declare const AddressesContext: import("react").Context<DefaultContext>;
|
|
17
|
+
export default AddressesContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext}from"react";import{setAddress}from"../reducers/AddressReducer";export const defaultAddressContext={saveAddresses:()=>{},setCloneAddress:()=>{},setAddress,setAddressErrors:()=>{}};const AddressesContext=createContext(defaultAddressContext);export default AddressesContext;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare const AvailabilityContext: import("react").Context<import("../reducers/AvailabilityReducer").
|
|
3
|
-
export default AvailabilityContext;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const AvailabilityContext: import("react").Context<import("../reducers/AvailabilityReducer").AvailabilityPayload>;
|
|
3
|
+
export default AvailabilityContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext}from"react";import{availabilityInitialState}from"../reducers/AvailabilityReducer";const AvailabilityContext=createContext(availabilityInitialState);export default AvailabilityContext;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { BillingAddressState } from
|
|
3
|
-
declare type DefaultContext = {
|
|
4
|
-
setBillingAddress?: (id: string, options?: {
|
|
5
|
-
customerAddressId: string;
|
|
6
|
-
}) => void;
|
|
7
|
-
} & BillingAddressState;
|
|
8
|
-
export declare const defaultBillingAddressContext: {
|
|
9
|
-
setBillingAddress: () => void;
|
|
10
|
-
};
|
|
11
|
-
declare const BillingAddressContext: import("react").Context<DefaultContext>;
|
|
12
|
-
export default BillingAddressContext;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BillingAddressState } from '../reducers/BillingAddressReducer';
|
|
3
|
+
declare type DefaultContext = {
|
|
4
|
+
setBillingAddress?: (id: string, options?: {
|
|
5
|
+
customerAddressId: string;
|
|
6
|
+
}) => void;
|
|
7
|
+
} & BillingAddressState;
|
|
8
|
+
export declare const defaultBillingAddressContext: {
|
|
9
|
+
setBillingAddress: () => void;
|
|
10
|
+
};
|
|
11
|
+
declare const BillingAddressContext: import("react").Context<DefaultContext>;
|
|
12
|
+
export default BillingAddressContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext}from"react";export const defaultBillingAddressContext={setBillingAddress:()=>{}};const BillingAddressContext=createContext(defaultBillingAddressContext);export default BillingAddressContext;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
import { AddressCountrySelectName, AddressInputName } from
|
|
3
|
-
import { AddressField } from
|
|
4
|
-
export declare type DefaultContextAddress = {
|
|
5
|
-
validation?: () => RefObject<any>;
|
|
6
|
-
setValue?: (name: AddressField | AddressInputName | AddressCountrySelectName, value: any) => void;
|
|
7
|
-
errors?: Record<string, {
|
|
8
|
-
code: string;
|
|
9
|
-
message: string;
|
|
10
|
-
error: boolean;
|
|
11
|
-
}>[];
|
|
12
|
-
errorClassName?: string;
|
|
13
|
-
requiresBillingInfo?: boolean;
|
|
14
|
-
resetField?: (name: string) => void;
|
|
15
|
-
values?: Record<string, any>;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { AddressCountrySelectName, AddressInputName } from '../typings/index';
|
|
3
|
+
import { AddressField } from '../reducers/AddressReducer';
|
|
4
|
+
export declare type DefaultContextAddress = {
|
|
5
|
+
validation?: () => RefObject<any>;
|
|
6
|
+
setValue?: (name: AddressField | AddressInputName | AddressCountrySelectName, value: any) => void;
|
|
7
|
+
errors?: Record<string, {
|
|
8
|
+
code: string;
|
|
9
|
+
message: string;
|
|
10
|
+
error: boolean;
|
|
11
|
+
}>[];
|
|
12
|
+
errorClassName?: string;
|
|
13
|
+
requiresBillingInfo?: boolean;
|
|
14
|
+
resetField?: (name: string) => void;
|
|
15
|
+
values?: Record<string, any>;
|
|
16
|
+
isBusiness?: boolean;
|
|
17
|
+
};
|
|
18
|
+
declare const BillingAddressFormContext: import("react").Context<DefaultContextAddress>;
|
|
19
|
+
export default BillingAddressFormContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext}from"react";const BillingAddressFormContext=createContext({});export default BillingAddressFormContext;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface CommerceLayerConfig {
|
|
3
|
-
accessToken: string;
|
|
4
|
-
endpoint: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export default CommerceLayerContext;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface CommerceLayerConfig {
|
|
3
|
+
accessToken: string;
|
|
4
|
+
endpoint: string;
|
|
5
|
+
}
|
|
6
|
+
declare const CommerceLayerContext: import("react").Context<CommerceLayerConfig>;
|
|
7
|
+
export default CommerceLayerContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext}from"react";const initial={accessToken:"",endpoint:""},CommerceLayerContext=createContext(initial);export default CommerceLayerContext;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
declare type DefaultContext = {
|
|
3
|
-
validation?: () => RefObject<any>;
|
|
4
|
-
setValue?: (name: string, value: string) => void;
|
|
5
|
-
};
|
|
6
|
-
declare const CouponAndGiftCardFormContext: import("react").Context<DefaultContext>;
|
|
7
|
-
export default CouponAndGiftCardFormContext;
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
declare type DefaultContext = {
|
|
3
|
+
validation?: () => RefObject<any>;
|
|
4
|
+
setValue?: (name: string, value: string) => void;
|
|
5
|
+
};
|
|
6
|
+
declare const CouponAndGiftCardFormContext: import("react").Context<DefaultContext>;
|
|
7
|
+
export default CouponAndGiftCardFormContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext}from"react";const CouponAndGiftCardFormContext=createContext({});export default CouponAndGiftCardFormContext;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { SetCustomerEmail, SetCustomerErrors, CustomerState } from
|
|
3
|
-
declare type DefaultContext = {
|
|
4
|
-
saveCustomerUser: (customerEmail: string) => Promise<void>;
|
|
5
|
-
setCustomerErrors: SetCustomerErrors;
|
|
6
|
-
setCustomerEmail: SetCustomerEmail;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SetCustomerEmail, SetCustomerErrors, CustomerState } from '../reducers/CustomerReducer';
|
|
3
|
+
declare type DefaultContext = {
|
|
4
|
+
saveCustomerUser: (customerEmail: string) => Promise<void>;
|
|
5
|
+
setCustomerErrors: SetCustomerErrors;
|
|
6
|
+
setCustomerEmail: SetCustomerEmail;
|
|
7
|
+
getCustomerPaymentSources: () => Promise<void>;
|
|
8
|
+
} & Partial<CustomerState>;
|
|
9
|
+
export declare const defaultCustomerContext: {
|
|
10
|
+
saveCustomerUser: () => Promise<void>;
|
|
11
|
+
getCustomerPaymentSources: () => Promise<void>;
|
|
12
|
+
setCustomerErrors: SetCustomerErrors;
|
|
13
|
+
setCustomerEmail: SetCustomerEmail;
|
|
14
|
+
};
|
|
15
|
+
declare const CustomerContext: import("react").Context<DefaultContext>;
|
|
16
|
+
export default CustomerContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{setCustomerErrors,setCustomerEmail}from"../reducers/CustomerReducer";import{createContext}from"react";export const defaultCustomerContext={saveCustomerUser:async()=>{},getCustomerPaymentSources:async()=>{},setCustomerErrors,setCustomerEmail};const CustomerContext=createContext(defaultCustomerContext);export default CustomerContext;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare type Context = {
|
|
3
|
-
url: string | null;
|
|
4
|
-
callExternalFunction: CallExternalFunction;
|
|
5
|
-
};
|
|
6
|
-
declare type CallExternalFunction = (params: {
|
|
7
|
-
url: string;
|
|
8
|
-
data: Record<string, any>;
|
|
9
|
-
}) => Promise<Record<string, any>>;
|
|
10
|
-
export declare const callExternalFunction: CallExternalFunction;
|
|
11
|
-
declare const ExternalFunctionContext: import("react").Context<Context>;
|
|
12
|
-
export default ExternalFunctionContext;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Context = {
|
|
3
|
+
url: string | null;
|
|
4
|
+
callExternalFunction: CallExternalFunction;
|
|
5
|
+
};
|
|
6
|
+
declare type CallExternalFunction = (params: {
|
|
7
|
+
url: string;
|
|
8
|
+
data: Record<string, any>;
|
|
9
|
+
}) => Promise<Record<string, any>>;
|
|
10
|
+
export declare const callExternalFunction: CallExternalFunction;
|
|
11
|
+
declare const ExternalFunctionContext: import("react").Context<Context>;
|
|
12
|
+
export default ExternalFunctionContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext}from"react";import axios from"axios";export const callExternalFunction=async({url,data})=>axios.post(url,data);const ExternalFunctionContext=createContext({url:null,callExternalFunction});export default ExternalFunctionContext;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { GiftCardState, GiftCardRecipientI, GiftCardI } from
|
|
3
|
-
import { BaseError } from
|
|
4
|
-
export interface GCContext extends GiftCardState {
|
|
5
|
-
addGiftCardRecipient: (values: GiftCardRecipientI & object) => void;
|
|
6
|
-
addGiftCard: (values: GiftCardI & object) => void;
|
|
7
|
-
addGiftCardError: (errors: BaseError[]) => void;
|
|
8
|
-
addGiftCardLoading: (loading: boolean) => void;
|
|
9
|
-
}
|
|
10
|
-
declare const GiftCardContext: import("react").Context<GCContext>;
|
|
11
|
-
export default GiftCardContext;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { GiftCardState, GiftCardRecipientI, GiftCardI } from '../reducers/GiftCardReducer';
|
|
3
|
+
import { BaseError } from '../typings/errors';
|
|
4
|
+
export interface GCContext extends GiftCardState {
|
|
5
|
+
addGiftCardRecipient: (values: GiftCardRecipientI & object) => void;
|
|
6
|
+
addGiftCard: (values: GiftCardI & object) => void;
|
|
7
|
+
addGiftCardError: (errors: BaseError[]) => void;
|
|
8
|
+
addGiftCardLoading: (loading: boolean) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const GiftCardContext: import("react").Context<GCContext>;
|
|
11
|
+
export default GiftCardContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext}from"react";import{giftCardInitialState}from"../reducers/GiftCardReducer";const GiftCardContext=createContext(giftCardInitialState);export default GiftCardContext;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ItemState, Items, ItemQuantity, ItemOptions, ItemPrices, CustomLineItems } from
|
|
3
|
-
export interface InitItemContext extends Partial<ItemState> {
|
|
4
|
-
item: Items;
|
|
5
|
-
items: Items;
|
|
6
|
-
quantity: ItemQuantity;
|
|
7
|
-
option: ItemOptions;
|
|
8
|
-
prices: ItemPrices;
|
|
9
|
-
lineItems: CustomLineItems;
|
|
10
|
-
}
|
|
11
|
-
export declare const initialItemContext: InitItemContext;
|
|
12
|
-
declare const ItemContext: import("react").Context<InitItemContext>;
|
|
13
|
-
export default ItemContext;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ItemState, Items, ItemQuantity, ItemOptions, ItemPrices, CustomLineItems } from '../reducers/ItemReducer';
|
|
3
|
+
export interface InitItemContext extends Partial<ItemState> {
|
|
4
|
+
item: Items;
|
|
5
|
+
items: Items;
|
|
6
|
+
quantity: ItemQuantity;
|
|
7
|
+
option: ItemOptions;
|
|
8
|
+
prices: ItemPrices;
|
|
9
|
+
lineItems: CustomLineItems;
|
|
10
|
+
}
|
|
11
|
+
export declare const initialItemContext: InitItemContext;
|
|
12
|
+
declare const ItemContext: import("react").Context<InitItemContext>;
|
|
13
|
+
export default ItemContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext}from"react";export const initialItemContext={item:{},items:{},quantity:{},option:{},prices:{},lineItems:{}};const ItemContext=createContext(initialItemContext);export default ItemContext;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { LineItem } from '@commercelayer/sdk';
|
|
3
|
+
export declare type InitialLineItemContext = Partial<{
|
|
4
|
+
lineItem: LineItem;
|
|
5
|
+
}>;
|
|
6
|
+
declare const LineItemChildrenContext: import("react").Context<Partial<{
|
|
7
|
+
lineItem: LineItem;
|
|
8
|
+
}>>;
|
|
9
|
+
export default LineItemChildrenContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext}from"react";const initial={},LineItemChildrenContext=createContext(initial);export default LineItemChildrenContext;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { LineItemState } from
|
|
3
|
-
import {
|
|
4
|
-
export interface LineItemContextValue extends LineItemState {
|
|
5
|
-
lineItems:
|
|
6
|
-
}
|
|
7
|
-
declare const LineItemContext: import("react").Context<LineItemContextValue>;
|
|
8
|
-
export default LineItemContext;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { LineItemState } from '../reducers/LineItemReducer';
|
|
3
|
+
import { LineItem } from '@commercelayer/sdk';
|
|
4
|
+
export interface LineItemContextValue extends LineItemState {
|
|
5
|
+
lineItems: LineItem[] | undefined;
|
|
6
|
+
}
|
|
7
|
+
declare const LineItemContext: import("react").Context<LineItemContextValue>;
|
|
8
|
+
export default LineItemContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext}from"react";const initial={lineItems:[]},LineItemContext=createContext(initial);export default LineItemContext;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export interface InitialLineItemContext {
|
|
4
|
-
lineItemOption: Partial<
|
|
5
|
-
showAll?: boolean;
|
|
6
|
-
}
|
|
7
|
-
declare const LineItemOptionChildrenContext: import("react").Context<InitialLineItemContext>;
|
|
8
|
-
export default LineItemOptionChildrenContext;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { LineItemOption } from '@commercelayer/sdk';
|
|
3
|
+
export interface InitialLineItemContext {
|
|
4
|
+
lineItemOption: Partial<LineItemOption>;
|
|
5
|
+
showAll?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const LineItemOptionChildrenContext: import("react").Context<InitialLineItemContext>;
|
|
8
|
+
export default LineItemOptionChildrenContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext}from"react";const initial={lineItemOption:{}},LineItemOptionChildrenContext=createContext(initial);export default LineItemOptionChildrenContext;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AddToCart, OrderState, CreateOrder, SetGiftCardOrCouponCode, RemoveGiftCardOrCouponCode, SaveAddressToCustomerAddressBook, setOrderErrors, addResourceToInclude, updateOrder, getOrderContext } from '../reducers/OrderReducer';
|
|
3
|
+
declare type DefaultContext = {
|
|
4
|
+
createOrder: CreateOrder;
|
|
5
|
+
addToCart: AddToCart;
|
|
6
|
+
setOrderErrors: typeof setOrderErrors;
|
|
7
|
+
setGiftCardOrCouponCode: SetGiftCardOrCouponCode;
|
|
8
|
+
removeGiftCardOrCouponCode: RemoveGiftCardOrCouponCode;
|
|
9
|
+
saveAddressToCustomerAddressBook: SaveAddressToCustomerAddressBook;
|
|
10
|
+
addResourceToInclude: typeof addResourceToInclude;
|
|
11
|
+
getOrder: getOrderContext;
|
|
12
|
+
updateOrder: typeof updateOrder;
|
|
13
|
+
} & OrderState;
|
|
14
|
+
export declare const defaultOrderContext: {
|
|
15
|
+
addToCart: AddToCart;
|
|
16
|
+
createOrder: CreateOrder;
|
|
17
|
+
setOrderErrors: typeof setOrderErrors;
|
|
18
|
+
setGiftCardOrCouponCode: SetGiftCardOrCouponCode;
|
|
19
|
+
removeGiftCardOrCouponCode: RemoveGiftCardOrCouponCode;
|
|
20
|
+
saveAddressToCustomerAddressBook: SaveAddressToCustomerAddressBook;
|
|
21
|
+
addResourceToInclude: typeof addResourceToInclude;
|
|
22
|
+
getOrder: (_id: string) => Promise<void>;
|
|
23
|
+
updateOrder: typeof updateOrder;
|
|
24
|
+
};
|
|
25
|
+
declare const OrderContext: import("react").Context<DefaultContext>;
|
|
26
|
+
export default OrderContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext}from"react";import{addToCart,setOrderErrors,createOrder,setGiftCardOrCouponCode,removeGiftCardOrCouponCode,saveAddressToCustomerAddressBook,addResourceToInclude,updateOrder}from"../reducers/OrderReducer";export const defaultOrderContext={addToCart,createOrder,setOrderErrors,setGiftCardOrCouponCode,removeGiftCardOrCouponCode,saveAddressToCustomerAddressBook,addResourceToInclude,getOrder:async _id=>{},updateOrder};const OrderContext=createContext(defaultOrderContext);export default OrderContext;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { getLocalOrder, setLocalOrder, deleteLocalOrder } from
|
|
3
|
-
export interface OrderStorageConfig {
|
|
4
|
-
persistKey: string;
|
|
5
|
-
clearWhenPlaced: boolean;
|
|
6
|
-
getLocalOrder: typeof getLocalOrder;
|
|
7
|
-
setLocalOrder: typeof setLocalOrder;
|
|
8
|
-
deleteLocalOrder: typeof deleteLocalOrder;
|
|
9
|
-
}
|
|
10
|
-
declare const OrderStorageContext: import("react").Context<OrderStorageConfig>;
|
|
11
|
-
export default OrderStorageContext;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { getLocalOrder, setLocalOrder, deleteLocalOrder } from '../utils/localStorage';
|
|
3
|
+
export interface OrderStorageConfig {
|
|
4
|
+
persistKey: string;
|
|
5
|
+
clearWhenPlaced: boolean;
|
|
6
|
+
getLocalOrder: typeof getLocalOrder;
|
|
7
|
+
setLocalOrder: typeof setLocalOrder;
|
|
8
|
+
deleteLocalOrder: typeof deleteLocalOrder;
|
|
9
|
+
}
|
|
10
|
+
declare const OrderStorageContext: import("react").Context<OrderStorageConfig>;
|
|
11
|
+
export default OrderStorageContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext}from"react";import{getLocalOrder,setLocalOrder,deleteLocalOrder}from"../utils/localStorage";const initial={persistKey:"",clearWhenPlaced:!0,getLocalOrder,setLocalOrder,deleteLocalOrder},OrderStorageContext=createContext(initial);export default OrderStorageContext;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export interface InitialPaymentMethodChildrenContext {
|
|
4
|
-
payment?:
|
|
5
|
-
clickableContainer?: boolean;
|
|
6
|
-
paymentSelected?: string;
|
|
7
|
-
setPaymentSelected?: (paymentId: string) => void;
|
|
8
|
-
}
|
|
9
|
-
declare const PaymentMethodChildrenContext: import("react").Context<InitialPaymentMethodChildrenContext>;
|
|
10
|
-
export default PaymentMethodChildrenContext;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PaymentMethod } from '@commercelayer/sdk';
|
|
3
|
+
export interface InitialPaymentMethodChildrenContext {
|
|
4
|
+
payment?: PaymentMethod;
|
|
5
|
+
clickableContainer?: boolean;
|
|
6
|
+
paymentSelected?: string;
|
|
7
|
+
setPaymentSelected?: (paymentId: string) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const PaymentMethodChildrenContext: import("react").Context<InitialPaymentMethodChildrenContext>;
|
|
10
|
+
export default PaymentMethodChildrenContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext}from"react";const initial={},PaymentMethodChildrenContext=createContext(initial);export default PaymentMethodChildrenContext;
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { UpdatePaymentSource } from '../reducers/PaymentMethodReducer';
|
|
3
|
+
import { PaymentMethodState, SetPaymentMethodErrors, SetPaymentSource, SetPaymentMethod, DestroyPaymentSource, SetPaymentRef, setLoading } from '../reducers/PaymentMethodReducer';
|
|
4
|
+
declare type DefaultContext = {
|
|
5
|
+
setPaymentMethodErrors: SetPaymentMethodErrors;
|
|
6
|
+
setPaymentMethod: SetPaymentMethod;
|
|
7
|
+
setPaymentSource: SetPaymentSource;
|
|
8
|
+
setPaymentRef: SetPaymentRef;
|
|
9
|
+
destroyPaymentSource: DestroyPaymentSource;
|
|
10
|
+
updatePaymentSource: UpdatePaymentSource;
|
|
11
|
+
setLoading: typeof setLoading;
|
|
12
|
+
} & PaymentMethodState;
|
|
13
|
+
export declare const defaultPaymentMethodContext: {
|
|
14
|
+
setPaymentMethodErrors: SetPaymentMethodErrors;
|
|
15
|
+
setPaymentMethod: SetPaymentMethod;
|
|
16
|
+
setPaymentSource: SetPaymentSource;
|
|
17
|
+
setPaymentRef: SetPaymentRef;
|
|
18
|
+
destroyPaymentSource: DestroyPaymentSource;
|
|
19
|
+
updatePaymentSource: UpdatePaymentSource;
|
|
20
|
+
setLoading: typeof setLoading;
|
|
21
|
+
};
|
|
22
|
+
declare const PaymentMethodContext: import("react").Context<DefaultContext>;
|
|
23
|
+
export default PaymentMethodContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext}from"react";import{updatePaymentSource}from"../reducers/PaymentMethodReducer";import{setPaymentMethodErrors,setPaymentSource,setPaymentMethod,destroyPaymentSource,setPaymentRef,setLoading}from"../reducers/PaymentMethodReducer";export const defaultPaymentMethodContext={setPaymentMethodErrors,setPaymentMethod,setPaymentSource,setPaymentRef,destroyPaymentSource,updatePaymentSource,setLoading};const PaymentMethodContext=createContext(defaultPaymentMethodContext);export default PaymentMethodContext;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare type iconBrand = 'visa' | 'credit-card' | 'amex' | 'mastercard' | 'jcb' | 'wire-transfer' | 'maestro' | 'cirrus' | 'paypal';
|
|
3
|
-
declare type DefaultContext = {
|
|
4
|
-
brand?: iconBrand;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
last4?: string;
|
|
8
|
-
showCard?: boolean;
|
|
9
|
-
readonly?: boolean;
|
|
10
|
-
handleEditClick?: () => void;
|
|
11
|
-
};
|
|
12
|
-
export declare const defaultPaymentSourceContext: {};
|
|
13
|
-
declare const PaymentSourceContext: import("react").Context<DefaultContext>;
|
|
14
|
-
export default PaymentSourceContext;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type iconBrand = 'visa' | 'credit-card' | 'amex' | 'mastercard' | 'jcb' | 'wire-transfer' | 'maestro' | 'cirrus' | 'paypal';
|
|
3
|
+
declare type DefaultContext = {
|
|
4
|
+
brand?: iconBrand;
|
|
5
|
+
exp_month?: number;
|
|
6
|
+
exp_year?: number;
|
|
7
|
+
last4?: string;
|
|
8
|
+
showCard?: boolean;
|
|
9
|
+
readonly?: boolean;
|
|
10
|
+
handleEditClick?: (e: MouseEvent) => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const defaultPaymentSourceContext: {};
|
|
13
|
+
declare const PaymentSourceContext: import("react").Context<DefaultContext>;
|
|
14
|
+
export default PaymentSourceContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext}from"react";export const defaultPaymentSourceContext={};const PaymentSourceContext=createContext(defaultPaymentSourceContext);export default PaymentSourceContext;
|