@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 getOrganizationSlug from"./organization";import Sdk from"@commercelayer/sdk";export default function getSdk({endpoint,accessToken}){const org=getOrganizationSlug(endpoint);return Sdk(Object.assign({accessToken},org))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const getSkus=(skus,sortBy)=>{const obj={};return sortBy.forEach(sku=>{skus.forEach(o=>{(o==null?void 0:o.code)===sku&&(obj[o.code]=o)})}),obj};export default getSkus;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function isEmptyStates(countryCode: string): boolean;
|
|
1
|
+
export default function isEmptyStates(countryCode: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const countryLock=["IT","US"];export default function isEmptyStates(countryCode){return!countryLock.includes(countryCode)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function isJSON(str: string): boolean;
|
|
1
|
+
export default function isJSON(str: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isJSON(str){try{return JSON.parse(str),!0}catch{return!1}}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare type JWT = {
|
|
2
|
+
application: {
|
|
3
|
+
id: string;
|
|
4
|
+
kind: 'sales_channel' | 'integration';
|
|
5
|
+
public: boolean;
|
|
6
|
+
};
|
|
7
|
+
exp: number;
|
|
8
|
+
market: {
|
|
9
|
+
id: string[];
|
|
10
|
+
price_list_id: string;
|
|
11
|
+
stock_location_ids: string[];
|
|
12
|
+
geocoder_id: null | string;
|
|
13
|
+
allows_external_prices: boolean;
|
|
14
|
+
};
|
|
15
|
+
organization: {
|
|
16
|
+
id: string;
|
|
17
|
+
slug: string;
|
|
18
|
+
};
|
|
19
|
+
owner: {
|
|
20
|
+
id: 'gOqzZhZrmQ';
|
|
21
|
+
type: 'Customer';
|
|
22
|
+
};
|
|
23
|
+
rand: number;
|
|
24
|
+
test: boolean;
|
|
25
|
+
};
|
|
26
|
+
export default function jwt(accessToken: string): JWT;
|
|
27
|
+
export {};
|
package/lib/utils/jwt.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import jwtDecode from"jwt-decode";export default function jwt(accessToken){return jwtDecode(accessToken)}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
export interface GetLocalOrder {
|
|
2
|
-
(key: string): string | null;
|
|
3
|
-
}
|
|
4
|
-
export declare const getLocalOrder: GetLocalOrder;
|
|
5
|
-
export interface SetLocalOrder {
|
|
6
|
-
(key: string, value: string): void;
|
|
7
|
-
}
|
|
8
|
-
export declare const setLocalOrder: SetLocalOrder;
|
|
9
|
-
export interface DeleteLocalOrder {
|
|
10
|
-
(key: string): void;
|
|
11
|
-
}
|
|
12
|
-
export declare const deleteLocalOrder: DeleteLocalOrder;
|
|
13
|
-
export declare const getSavePaymentSourceToCustomerWallet: () => boolean;
|
|
14
|
-
export declare const getSaveBillingAddressToAddressBook: () => boolean;
|
|
15
|
-
export declare const getSaveShippingAddressToAddressBook: () => boolean;
|
|
16
|
-
declare type CustomerOrderParams = '
|
|
17
|
-
export declare function setCustomerOrderParam<T extends CustomerOrderParams>(key: T, value: string): void;
|
|
18
|
-
export {};
|
|
1
|
+
export interface GetLocalOrder {
|
|
2
|
+
(key: string): string | null;
|
|
3
|
+
}
|
|
4
|
+
export declare const getLocalOrder: GetLocalOrder;
|
|
5
|
+
export interface SetLocalOrder {
|
|
6
|
+
(key: string, value: string): void;
|
|
7
|
+
}
|
|
8
|
+
export declare const setLocalOrder: SetLocalOrder;
|
|
9
|
+
export interface DeleteLocalOrder {
|
|
10
|
+
(key: string): void;
|
|
11
|
+
}
|
|
12
|
+
export declare const deleteLocalOrder: DeleteLocalOrder;
|
|
13
|
+
export declare const getSavePaymentSourceToCustomerWallet: () => boolean;
|
|
14
|
+
export declare const getSaveBillingAddressToAddressBook: () => boolean;
|
|
15
|
+
export declare const getSaveShippingAddressToAddressBook: () => boolean;
|
|
16
|
+
export declare type CustomerOrderParams = '_save_payment_source_to_customer_wallet' | '_save_billing_address_to_customer_address_book' | '_save_shipping_address_to_customer_address_book';
|
|
17
|
+
export declare function setCustomerOrderParam<T extends CustomerOrderParams>(key: T, value: string): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const getLocalOrder=key=>localStorage.getItem(key),setLocalOrder=(key,value)=>localStorage.setItem(key,value),deleteLocalOrder=key=>{localStorage.removeItem(key)},getSavePaymentSourceToCustomerWallet=()=>localStorage.getItem("_save_payment_source_to_customer_wallet")==="true",getSaveBillingAddressToAddressBook=()=>localStorage.getItem("_save_billing_address_to_customer_address_book")==="true",getSaveShippingAddressToAddressBook=()=>localStorage.getItem("_save_shipping_address_to_customer_address_book")==="true";export function setCustomerOrderParam(key,value){return setLocalOrder(key,value)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getOrganizationSlug(endpoint){const org={organization:"",domain:"commercelayer.io"};return endpoint.search("commercelayer.io")===-1&&(org.domain="commercelayer.co"),org.organization=endpoint.replace("https://","").replace(`.${org.domain}`,""),org}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { PaypalConfig } from '../components/PaypalPayment';
|
|
2
|
+
import { PaymentResource, PaymentMethodConfig } from '../reducers/PaymentMethodReducer';
|
|
3
|
+
export default function getPaypalConfig(paymentResource: PaymentResource, config: PaymentMethodConfig): Pick<PaypalConfig, 'return_url' | 'cancel_url'> | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getPaymentConfig}from"../reducers/PaymentMethodReducer";import pick from"lodash/pick";export default function getPaypalConfig(paymentResource,config){const attributes=getPaymentConfig(paymentResource,config);return attributes&&pick(attributes,["return_url","cancel_url"])}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function promisify(cb: any, params?: any): Promise<any>;
|
|
1
|
+
export default function promisify(cb: any, params?: any): Promise<any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import isFunction from"lodash/isFunction";export default function promisify(cb,params){return new Promise((resolve,reject)=>{params?cb(params,(err,res)=>{err&&reject(err),resolve(res)}):isFunction(cb==null?void 0:cb.tokenize)?cb==null||cb.tokenize((err,payload)=>{err&&reject(err),resolve(payload)}):cb((err,res)=>{err&&reject(err),resolve(res)})})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import compact from"lodash/compact";import isEmpty from"lodash/isEmpty";export function shipmentsFilled(shipments){const filled=compact(shipments.filter(shipment=>!isEmpty(shipment.shipping_method)));return!isEmpty(filled)}
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import { BaseState } from
|
|
2
|
-
import { ResourceErrorType, BaseError } from
|
|
3
|
-
import { AddressField
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { BaseState } from '../typings/index';
|
|
2
|
+
import { ResourceErrorType, BaseError } from '../typings/errors';
|
|
3
|
+
import { AddressField } from '../reducers/AddressReducer';
|
|
4
|
+
import { AddressCreate } from '@commercelayer/sdk';
|
|
5
|
+
import { AddressInputName } from '../typings/index';
|
|
6
|
+
export interface ValidateFormFields {
|
|
7
|
+
<R extends string[]>(fields: HTMLFormControlsCollection, required: R, resourceType: ResourceErrorType): {
|
|
8
|
+
errors: BaseError[];
|
|
9
|
+
values: BaseState;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export interface ValidateValue {
|
|
13
|
+
<V extends string | boolean, N extends string, T extends string, B extends ResourceErrorType>(val: V, name: N, type: T, resourceType: B): BaseError | Record<string, any>;
|
|
14
|
+
}
|
|
15
|
+
export declare const validateValue: ValidateValue;
|
|
16
|
+
declare const validateFormFields: ValidateFormFields;
|
|
17
|
+
export interface FieldsExist {
|
|
18
|
+
(address: AddressCreate, schema?: AddressField[]): boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const fieldsExist: FieldsExist;
|
|
21
|
+
export declare function businessMandatoryField(fieldName: AddressInputName, isBusiness?: boolean): boolean;
|
|
22
|
+
export default validateFormFields;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import isEmpty from"lodash/isEmpty";import isString from"lodash/isString";import without from"lodash/without";import keys from"lodash/keys";import map from"lodash/map";import get from"lodash/get";import{addressFields}from"../reducers/AddressReducer";const EMAIL_PATTERN=/[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}$/;export const validateValue=(val,name,type,resourceType)=>val?type==="email"&&isString(val)&&!val.match(EMAIL_PATTERN)?{field:name,code:"VALIDATION_ERROR",message:`${name} - is not valid`,resourceType}:{}:{field:name,code:"VALIDATION_ERROR",message:`${name} - is required`,resourceType};const validateFormFields=(fields,required,resourceType)=>{const errors=[];let values={metadata:{}};return map(fields,v=>{const isTick=!!get(v,"checked"),val=isTick||(v.value==="on"?!1:v.value),attrName=v.getAttribute("name");if(attrName&&required.indexOf(attrName)!==-1||v.required){const error=validateValue(val,v.name,v.type,resourceType);isEmpty(error)||errors.push(error),values=Object.assign(Object.assign({},values),{[`${v.name}`]:val})}v.getAttribute("name")&&(values=!!v.getAttribute("data-metadata")?Object.assign(Object.assign({},values),{metadata:Object.assign(Object.assign({},values.metadata),{[`${v.name}`]:val})}):Object.assign(Object.assign({},values),{[`${v.name}`]:val}))}),{errors,values}};export const fieldsExist=(address,schema=addressFields)=>{if(console.log("address",address),address.business){const required=without(schema,"first_name","last_name"),validAddress=keys(address).filter(k=>required.includes(k));return required.length>validAddress.length}else{const required=without(schema,"line_2","company"),validAddress=keys(address).filter(k=>required.includes(k));return required.length>validAddress.length}};const businessOptionalFields=["billing_address_first_name","billing_address_last_name","shipping_address_first_name","shipping_address_last_name"],customerOptionalFields=["billing_address_company","shipping_address_company","billing_address_line_2","shipping_address_line_2"];export function businessMandatoryField(fieldName,isBusiness){return!(isBusiness&&businessOptionalFields.includes(fieldName)||!isBusiness&&customerOptionalFields.includes(fieldName))}export default validateFormFields;
|
package/package.json
CHANGED
|
@@ -1,34 +1,56 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercelayer/react-components",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "The Official Commerce Layer React Components",
|
|
5
|
-
"
|
|
6
|
-
"types": "
|
|
5
|
+
"module": "lib/index.js",
|
|
6
|
+
"types": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
|
-
"
|
|
8
|
+
"lib",
|
|
9
9
|
"package.json",
|
|
10
10
|
"README.md"
|
|
11
11
|
],
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"release": {
|
|
16
|
+
"branches": [
|
|
17
|
+
"+([0-9])?(.{+([0-9]),x}).x",
|
|
18
|
+
"master",
|
|
19
|
+
"next",
|
|
20
|
+
"next-major",
|
|
21
|
+
{
|
|
22
|
+
"name": "beta",
|
|
23
|
+
"prerelease": true
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "alpha",
|
|
27
|
+
"prerelease": true
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"plugins": [
|
|
31
|
+
"@semantic-release/commit-analyzer",
|
|
32
|
+
"@semantic-release/release-notes-generator",
|
|
33
|
+
"@semantic-release/changelog",
|
|
34
|
+
"@semantic-release/npm",
|
|
35
|
+
"@semantic-release/git",
|
|
36
|
+
[
|
|
37
|
+
"@semantic-release/github",
|
|
38
|
+
{
|
|
39
|
+
"addReleases": "top"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
]
|
|
43
|
+
},
|
|
12
44
|
"scripts": {
|
|
13
|
-
"test
|
|
14
|
-
"test:
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"test:watch": "tsdx test --watch",
|
|
20
|
-
"test": "tsdx test",
|
|
21
|
-
"build": "tsdx build --tsconfig tsconfig.production.json",
|
|
22
|
-
"build:watch": "tsdx watch --tsconfig tsconfig.production.json",
|
|
23
|
-
"build:transpileOnly": "tsdx build --tsconfig tsconfig.production.json --transpileOnly",
|
|
24
|
-
"dev": "NODE_OPTIONS='--inspect' next dev",
|
|
25
|
-
"start": "next start",
|
|
26
|
-
"size-limit:why": "npm run build && size-limit --why",
|
|
27
|
-
"size-limit": "npm run build && size-limit",
|
|
45
|
+
"test": "jest",
|
|
46
|
+
"test:coverage": "jest --coverage",
|
|
47
|
+
"test:playwright": "playwright test",
|
|
48
|
+
"build": "tsc -b tsconfig.prod.json --verbose",
|
|
49
|
+
"postbuild": "tsc-alias -p tsconfig.prod.json && minimize-js lib -w -s",
|
|
50
|
+
"start": "NODE_OPTIONS='--inspect' next dev",
|
|
28
51
|
"version:fix": "npm version patch",
|
|
29
52
|
"version:feat": "npm version minor",
|
|
30
53
|
"version:perf": "npm version major",
|
|
31
|
-
"publish:beta": "git push --follow-tags && npm publish --public --tag beta",
|
|
32
54
|
"publish:fix": "npm run build && npm run version:fix && git push --follow-tags && npm publish --access public",
|
|
33
55
|
"publish:feat": "npm run build && npm run version:feat && git push --follow-tags && npm publish --access public",
|
|
34
56
|
"publish:perf": "npm run build && npm run version:perf && git push --follow-tags && npm publish --access public"
|
|
@@ -55,89 +77,81 @@
|
|
|
55
77
|
"url": "https://github.com/commercelayer/commercelayer-react-components/issues"
|
|
56
78
|
},
|
|
57
79
|
"homepage": "https://github.com/commercelayer/commercelayer-react-components#readme",
|
|
58
|
-
"size-limit": [
|
|
59
|
-
{
|
|
60
|
-
"path": "dist/react-components.cjs.production.min.js",
|
|
61
|
-
"limit": "55 KB"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"path": "dist/react-components.esm.js",
|
|
65
|
-
"limit": "55 KB"
|
|
66
|
-
}
|
|
67
|
-
],
|
|
68
80
|
"dependencies": {
|
|
69
|
-
"@
|
|
70
|
-
"@
|
|
71
|
-
"@
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
81
|
+
"@ac-dev/countries-service": "^1.1.3",
|
|
82
|
+
"@ac-dev/states-service": "^1.0.2",
|
|
83
|
+
"@adyen/adyen-web": "^5.6.2",
|
|
84
|
+
"@commercelayer/js-auth": "^2.2.9",
|
|
85
|
+
"@commercelayer/sdk": "^3.5.0",
|
|
86
|
+
"@stripe/react-stripe-js": "^1.7.0",
|
|
87
|
+
"@stripe/stripe-js": "^1.22.0",
|
|
88
|
+
"axios": "^0.25.0",
|
|
89
|
+
"braintree-web": "^3.85.2",
|
|
75
90
|
"jwt-decode": "^3.1.2",
|
|
76
91
|
"lodash": "^4.17.21",
|
|
77
92
|
"lodash-es": "^4.17.21",
|
|
78
|
-
"rapid-form": "^1.
|
|
79
|
-
"react-table": "^7.7.0",
|
|
80
|
-
"react-window": "^1.8.6"
|
|
93
|
+
"rapid-form": "^1.6.0"
|
|
81
94
|
},
|
|
82
95
|
"devDependencies": {
|
|
83
|
-
"@babel/plugin-proposal-class-properties": "^7.
|
|
84
|
-
"@babel/preset-env": "^7.
|
|
85
|
-
"@babel/preset-react": "^7.
|
|
86
|
-
"@babel/preset-typescript": "^7.
|
|
87
|
-
"@
|
|
88
|
-
"@
|
|
89
|
-
"@
|
|
90
|
-
"@
|
|
91
|
-
"@
|
|
92
|
-
"@
|
|
93
|
-
"@
|
|
94
|
-
"@tailwindcss/
|
|
95
|
-
"@tailwindcss/
|
|
96
|
-
"@
|
|
97
|
-
"@
|
|
98
|
-
"@types/
|
|
99
|
-
"@types/
|
|
96
|
+
"@babel/plugin-proposal-class-properties": "^7.16.7",
|
|
97
|
+
"@babel/preset-env": "^7.16.11",
|
|
98
|
+
"@babel/preset-react": "^7.16.7",
|
|
99
|
+
"@babel/preset-typescript": "^7.16.7",
|
|
100
|
+
"@playwright/test": "^1.18.1",
|
|
101
|
+
"@semantic-release/changelog": "^6.0.1",
|
|
102
|
+
"@semantic-release/commit-analyzer": "^9.0.2",
|
|
103
|
+
"@semantic-release/git": "^10.0.1",
|
|
104
|
+
"@semantic-release/github": "^8.0.2",
|
|
105
|
+
"@semantic-release/npm": "^9.0.0",
|
|
106
|
+
"@semantic-release/release-notes-generator": "^10.0.3",
|
|
107
|
+
"@tailwindcss/aspect-ratio": "^0.4.0",
|
|
108
|
+
"@tailwindcss/forms": "^0.4.0",
|
|
109
|
+
"@tailwindcss/line-clamp": "^0.3.1",
|
|
110
|
+
"@tailwindcss/typography": "^0.5.0",
|
|
111
|
+
"@types/braintree-web": "^3.75.16",
|
|
112
|
+
"@types/jest": "^27.4.0",
|
|
113
|
+
"@types/lodash": "^4.14.178",
|
|
114
|
+
"@types/node": "^17.0.13",
|
|
100
115
|
"@types/prop-types": "^15.7.4",
|
|
101
|
-
"@types/react": "^17.0.
|
|
102
|
-
"@types/react-table": "^7.7.5",
|
|
116
|
+
"@types/react": "^17.0.38",
|
|
103
117
|
"@types/react-test-renderer": "^17.0.1",
|
|
104
|
-
"@
|
|
105
|
-
"@typescript-eslint/
|
|
106
|
-
"@typescript-eslint/parser": "^4.31.2",
|
|
118
|
+
"@typescript-eslint/eslint-plugin": "^5.10.1",
|
|
119
|
+
"@typescript-eslint/parser": "^5.10.1",
|
|
107
120
|
"@zeit/next-css": "^1.0.1",
|
|
108
121
|
"@zerollup/ts-transform-paths": "^1.7.18",
|
|
109
|
-
"autoprefixer": "^10.
|
|
110
|
-
"babel-jest": "^27.
|
|
111
|
-
"babel-loader": "^8.2.
|
|
112
|
-
"babel-plugin-istanbul": "^6.
|
|
113
|
-
"
|
|
114
|
-
"eslint": "^7.
|
|
122
|
+
"autoprefixer": "^10.4.2",
|
|
123
|
+
"babel-jest": "^27.4.6",
|
|
124
|
+
"babel-loader": "^8.2.3",
|
|
125
|
+
"babel-plugin-istanbul": "^6.1.1",
|
|
126
|
+
"dotenv": "^14.3.2",
|
|
127
|
+
"eslint": "^8.7.0",
|
|
115
128
|
"eslint-config-prettier": "^8.3.0",
|
|
116
|
-
"eslint-config-react-app": "^
|
|
117
|
-
"eslint-plugin-react": "^7.
|
|
118
|
-
"eslint-plugin-react-hooks": "^4.
|
|
119
|
-
"jest": "^27.
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
129
|
+
"eslint-config-react-app": "^7.0.0",
|
|
130
|
+
"eslint-plugin-react": "^7.28.0",
|
|
131
|
+
"eslint-plugin-react-hooks": "^4.3.0",
|
|
132
|
+
"jest": "^27.4.7",
|
|
133
|
+
"minimize-js": "^1.2.0",
|
|
134
|
+
"next": "^12.0.9",
|
|
135
|
+
"playwright": "^1.18.1",
|
|
136
|
+
"postcss": "^8.4.5",
|
|
137
|
+
"postcss-loader": "^6.2.1",
|
|
138
|
+
"prettier": "^2.5.1",
|
|
139
|
+
"prop-types": "^15.8.1",
|
|
125
140
|
"react": "^17.0.2",
|
|
126
141
|
"react-dom": "^17.0.2",
|
|
127
142
|
"react-test-renderer": "^17.0.2",
|
|
128
143
|
"rollup-plugin-babel": "^4.4.0",
|
|
129
144
|
"rollup-plugin-node-resolve": "^5.2.0",
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"ts-jest": "^27.0.5",
|
|
145
|
+
"tailwindcss": "^3.0.17",
|
|
146
|
+
"ts-jest": "^27.1.3",
|
|
133
147
|
"ts-loader": "^9.2.6",
|
|
148
|
+
"tsc-alias": "^1.5.0",
|
|
134
149
|
"tsconfig-paths-jest": "^0.0.1",
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
150
|
+
"ttypescript": "^1.5.13",
|
|
151
|
+
"typescript": "^4.5.5",
|
|
152
|
+
"v8-to-istanbul": "^8.1.1"
|
|
138
153
|
},
|
|
139
154
|
"peerDependencies": {
|
|
140
|
-
"react": "^17.0.2"
|
|
141
|
-
"react-dom": "^17.0.2"
|
|
155
|
+
"react": "^17.0.2"
|
|
142
156
|
}
|
|
143
157
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
declare type CustomerFieldChildrenProps = Omit<CustomerFieldProps, 'children' | 'name'> & {
|
|
3
|
-
text: string;
|
|
4
|
-
};
|
|
5
|
-
declare type CustomerFieldProps = {
|
|
6
|
-
children?: (props: CustomerFieldChildrenProps) => ReactNode;
|
|
7
|
-
name: 'email';
|
|
8
|
-
} & JSX.IntrinsicElements['p'];
|
|
9
|
-
declare const CustomerField: FunctionComponent<CustomerFieldProps>;
|
|
10
|
-
export default CustomerField;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
declare type LineItemChildrenProps = Omit<LineItemImageProps, 'children'> & {
|
|
3
|
-
src: string;
|
|
4
|
-
};
|
|
5
|
-
declare type LineItemImageProps = {
|
|
6
|
-
children?: (props: LineItemChildrenProps) => ReactNode;
|
|
7
|
-
width?: number;
|
|
8
|
-
} & Omit<JSX.IntrinsicElements['img'], 'src' | 'srcSet'>;
|
|
9
|
-
declare const LineItemImage: FunctionComponent<LineItemImageProps>;
|
|
10
|
-
export default LineItemImage;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
declare type LineItemNameChildrenProps = Omit<LineItemNameProps, 'children'>;
|
|
3
|
-
declare type LineItemNameProps = {
|
|
4
|
-
children?: (props: LineItemNameChildrenProps) => ReactNode;
|
|
5
|
-
} & JSX.IntrinsicElements['p'];
|
|
6
|
-
declare const LineItemName: FunctionComponent<LineItemNameProps>;
|
|
7
|
-
export default LineItemName;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
declare type LineItemNameChildrenProps = Omit<LineItemNameProps, 'children'>;
|
|
3
|
-
declare type LineItemNameProps = {
|
|
4
|
-
children?: (props: LineItemNameChildrenProps) => ReactNode;
|
|
5
|
-
} & JSX.IntrinsicElements['p'];
|
|
6
|
-
declare const LineItemSkuCode: FunctionComponent<LineItemNameProps>;
|
|
7
|
-
export default LineItemSkuCode;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode, ReactElement } from 'react';
|
|
2
|
-
import { InitialOrderListContext } from "../context/OrderListChildrenContext";
|
|
3
|
-
import { Column } from 'react-table';
|
|
4
|
-
declare type OrderListProps = {
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
columns: (Column & {
|
|
7
|
-
className?: string;
|
|
8
|
-
})[];
|
|
9
|
-
loadingElement?: ReactElement;
|
|
10
|
-
actionsComponent?: InitialOrderListContext['actionsComponent'];
|
|
11
|
-
actionsContainerClassName?: string;
|
|
12
|
-
showActions?: boolean;
|
|
13
|
-
theadClassName?: string;
|
|
14
|
-
rowTrClassName?: string;
|
|
15
|
-
} & JSX.IntrinsicElements['table'] & ({
|
|
16
|
-
infiniteScroll: true;
|
|
17
|
-
windowOptions?: {
|
|
18
|
-
height?: number;
|
|
19
|
-
itemSize?: number;
|
|
20
|
-
width?: number;
|
|
21
|
-
column?: number;
|
|
22
|
-
};
|
|
23
|
-
} | {
|
|
24
|
-
infiniteScroll?: false;
|
|
25
|
-
windowOptions?: never;
|
|
26
|
-
});
|
|
27
|
-
declare const OrderList: FunctionComponent<OrderListProps>;
|
|
28
|
-
export default OrderList;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
import { Cell, Row } from 'react-table';
|
|
3
|
-
import OrderAttributes from "../typings/order";
|
|
4
|
-
declare type OrderListHeaderChildrenProps = Omit<OrderListHeaderProps, 'children'> & {
|
|
5
|
-
order: Record<string, any>;
|
|
6
|
-
row: Row;
|
|
7
|
-
cell: Cell[];
|
|
8
|
-
};
|
|
9
|
-
declare type OrderListHeaderProps = {
|
|
10
|
-
children?: (props: OrderListHeaderChildrenProps) => ReactNode;
|
|
11
|
-
field: keyof OrderAttributes;
|
|
12
|
-
} & JSX.IntrinsicElements['td'];
|
|
13
|
-
declare const OrderListRow: FunctionComponent<OrderListHeaderProps>;
|
|
14
|
-
export default OrderListRow;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { LoaderType } from "../typings/index";
|
|
2
|
-
import { FunctionComponent } from 'react';
|
|
3
|
-
import { PaymentSourceProps } from './PaymentSource';
|
|
4
|
-
declare type PaymentGatewayProps = PaymentSourceProps & {
|
|
5
|
-
showCard: boolean;
|
|
6
|
-
handleEditClick: () => void;
|
|
7
|
-
show: boolean;
|
|
8
|
-
loader?: LoaderType;
|
|
9
|
-
};
|
|
10
|
-
declare const PaymentGateway: FunctionComponent<PaymentGatewayProps>;
|
|
11
|
-
export default PaymentGateway;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
import { ShippingMethodCollection } from '@commercelayer/js-sdk';
|
|
3
|
-
declare type ShippingMethodRadioButtonChildrenProps = Omit<ShippingMethodRadioButtonProps, 'children'>;
|
|
4
|
-
declare type ShippingMethodRadioButtonProps = {
|
|
5
|
-
children?: (props: ShippingMethodRadioButtonChildrenProps) => ReactNode;
|
|
6
|
-
onChange?: (shippingMethod: ShippingMethodCollection | Record<string, any>) => void;
|
|
7
|
-
} & JSX.IntrinsicElements['input'];
|
|
8
|
-
declare const ShippingMethodRadioButton: FunctionComponent<ShippingMethodRadioButtonProps>;
|
|
9
|
-
export default ShippingMethodRadioButton;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseInputComponentProps } from "../../typings/index";
|
|
3
|
-
export declare type BaseInputProps = BaseInputComponentProps & JSX.IntrinsicElements['input'] & JSX.IntrinsicElements['textarea'];
|
|
4
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<BaseInputProps, "children" | "form" | "list" | "color" | "hidden" | "name" | "onChange" | "placeholder" | "key" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "enterKeyHint" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "pattern" | "readOnly" | "required" | "size" | "src" | "step" | "type" | "value" | "width" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "cols" | "dirName" | "rows" | "wrap"> & React.RefAttributes<any>>;
|
|
5
|
-
export default _default;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { LineItemCollection } from '@commercelayer/js-sdk';
|
|
3
|
-
export interface InitialLineItemContext {
|
|
4
|
-
lineItem: LineItemCollection | Record<string, any>;
|
|
5
|
-
}
|
|
6
|
-
declare const LineItemChildrenContext: import("react").Context<InitialLineItemContext>;
|
|
7
|
-
export default LineItemChildrenContext;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import OrderAttributes from "../typings/order";
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import { Row } from 'react-table';
|
|
4
|
-
export interface InitialOrderListContext {
|
|
5
|
-
order: OrderAttributes | null;
|
|
6
|
-
row: Row<OrderAttributes>;
|
|
7
|
-
showActions: boolean;
|
|
8
|
-
actionsComponent?: (props: {
|
|
9
|
-
order: OrderAttributes;
|
|
10
|
-
}) => ReactNode;
|
|
11
|
-
actionsContainerClassName?: string;
|
|
12
|
-
}
|
|
13
|
-
declare const OrderListChildrenContext: import("react").Context<InitialOrderListContext>;
|
|
14
|
-
export default OrderListChildrenContext;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { DeliveryLeadTimeCollection, LineItemCollection, ShipmentCollection, ShippingMethodCollection, StockTransferCollection } from '@commercelayer/js-sdk';
|
|
3
|
-
export interface InitialShipmentContext {
|
|
4
|
-
lineItems?: LineItemCollection[];
|
|
5
|
-
shippingMethods?: ShippingMethodCollection[];
|
|
6
|
-
currentShippingMethodId?: string;
|
|
7
|
-
stockTransfers?: StockTransferCollection[];
|
|
8
|
-
deliveryLeadTimes?: DeliveryLeadTimeCollection[] | null;
|
|
9
|
-
shipment?: ShipmentCollection;
|
|
10
|
-
keyNumber: number;
|
|
11
|
-
}
|
|
12
|
-
declare const ShipmentChildrenContext: import("react").Context<InitialShipmentContext>;
|
|
13
|
-
export default ShipmentChildrenContext;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { DeliveryLeadTimeCollection, ShippingMethodCollection } from '@commercelayer/js-sdk';
|
|
3
|
-
export interface InitialShippingMethodContext {
|
|
4
|
-
shippingMethod: ShippingMethodCollection | Record<string, string>;
|
|
5
|
-
deliveryLeadTimeForShipment?: DeliveryLeadTimeCollection | Record<string, string> | null;
|
|
6
|
-
currentShippingMethodId?: string;
|
|
7
|
-
}
|
|
8
|
-
declare const ShippingMethodChildrenContext: import("react").Context<InitialShippingMethodContext>;
|
|
9
|
-
export default ShippingMethodChildrenContext;
|