@commercelayer/react-components 3.0.0-beta.9 → 3.0.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/{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/lib/components/AddressField.d.ts +15 -0
- 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 -11
- package/lib/components/AddressStateSelector.js +1 -0
- package/{dist → lib}/components/AddressesContainer.d.ts +7 -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 -11
- 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 -887
- 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 +18 -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 -18
- 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 +96 -0
- package/lib/index.js +1 -0
- package/{dist → lib}/reducers/AddressReducer.d.ts +58 -61
- 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 -67
- 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 +131 -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/{dist → lib}/utils/countryStateCity.d.ts +9 -9
- 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 +20 -19
- package/lib/utils/validateFormFields.js +1 -0
- package/package.json +92 -81
- package/dist/components/AddressField.d.ts +0 -37
- package/dist/components/CustomerAddressForm.d.ts +0 -8
- 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/CustomerAddressFormContext.d.ts +0 -18
- 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 -91
- package/dist/index.js +0 -8
- package/dist/react-components.cjs.development.js +0 -12778
- 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 -12680
- 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/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,17 @@
|
|
|
1
|
+
import { Price } from '@commercelayer/sdk';
|
|
2
|
+
import { Prices } from '../reducers/PriceReducer';
|
|
3
|
+
import { Items } from '../reducers/ItemReducer';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
import { PTemplateProps } from '../components/utils/PriceTemplate';
|
|
6
|
+
export interface GetPriceByCode {
|
|
7
|
+
(skuPrices: Price[], code: string): Price | undefined;
|
|
8
|
+
}
|
|
9
|
+
export declare const getPriceByCode: GetPriceByCode;
|
|
10
|
+
export interface GetPricesComponent {
|
|
11
|
+
(skuPrices: Price[], props: PTemplateProps): ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare const getPricesComponent: GetPricesComponent;
|
|
14
|
+
export interface GetPrices {
|
|
15
|
+
(prices: Price[] | Items): Prices;
|
|
16
|
+
}
|
|
17
|
+
export default function getPrices<P extends Price>(prices: P[]): Record<string, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createElement as _createElement}from"react";import{jsx as _jsx}from"react/jsx-runtime";import{isEmpty,first,isArray,has}from"lodash";import PriceTemplate from"../components/utils/PriceTemplate";export const getPriceByCode=(skuPrices,code="")=>code?first(skuPrices.filter(p=>p.currency_code===code)):first(skuPrices),getPricesComponent=(skuPrices,props)=>isEmpty(skuPrices)?_jsx(PriceTemplate,Object.assign({},props),void 0):skuPrices.map((p,k)=>{const showCompare=typeof props.showCompare=="undefined"&&(p==null?void 0:p.compare_at_amount_cents)>(p==null?void 0:p.amount_cents)||props.showCompare;return _createElement(PriceTemplate,Object.assign({},props,{key:k,showCompare,formattedAmount:p.formatted_amount,formattedCompare:p.formatted_compare_at_amount}))});export default function getPrices(prices){const obj={};return isArray(prices)&&prices.forEach(p=>{const sku=p.sku_code;has(obj,sku)?obj[sku].push(p):obj[sku]=[p]}),obj}
|
|
@@ -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,20 @@
|
|
|
1
|
-
import { BaseState } from
|
|
2
|
-
import { ResourceErrorType, BaseError } from
|
|
3
|
-
import { AddressField
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
declare const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export
|
|
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
|
+
export interface ValidateFormFields {
|
|
6
|
+
<R extends string[]>(fields: HTMLFormControlsCollection, required: R, resourceType: ResourceErrorType): {
|
|
7
|
+
errors: BaseError[];
|
|
8
|
+
values: BaseState;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface ValidateValue {
|
|
12
|
+
<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>;
|
|
13
|
+
}
|
|
14
|
+
export declare const validateValue: ValidateValue;
|
|
15
|
+
declare const validateFormFields: ValidateFormFields;
|
|
16
|
+
export interface FieldsExist {
|
|
17
|
+
(address: AddressCreate, schema?: AddressField[]): boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const fieldsExist: FieldsExist;
|
|
20
|
+
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(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}};export default validateFormFields;
|
package/package.json
CHANGED
|
@@ -1,34 +1,55 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercelayer/react-components",
|
|
3
|
-
"version": "3.0.0
|
|
3
|
+
"version": "3.0.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
|
-
"test:coverage": "tsdx test --coverage",
|
|
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
|
+
"build": "tsc -b tsconfig.prod.json --verbose",
|
|
48
|
+
"postbuild": "tsc-alias -p tsconfig.prod.json && minimize-js lib -w -s",
|
|
49
|
+
"start": "NODE_OPTIONS='--inspect' next dev",
|
|
28
50
|
"version:fix": "npm version patch",
|
|
29
51
|
"version:feat": "npm version minor",
|
|
30
52
|
"version:perf": "npm version major",
|
|
31
|
-
"publish:beta": "git push --follow-tags && npm publish --public --tag beta",
|
|
32
53
|
"publish:fix": "npm run build && npm run version:fix && git push --follow-tags && npm publish --access public",
|
|
33
54
|
"publish:feat": "npm run build && npm run version:feat && git push --follow-tags && npm publish --access public",
|
|
34
55
|
"publish:perf": "npm run build && npm run version:perf && git push --follow-tags && npm publish --access public"
|
|
@@ -55,90 +76,80 @@
|
|
|
55
76
|
"url": "https://github.com/commercelayer/commercelayer-react-components/issues"
|
|
56
77
|
},
|
|
57
78
|
"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
79
|
"dependencies": {
|
|
69
|
-
"@
|
|
70
|
-
"@
|
|
71
|
-
"@
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
80
|
+
"@ac-dev/countries-service": "^1.1.3",
|
|
81
|
+
"@ac-dev/states-service": "^1.0.2",
|
|
82
|
+
"@adyen/adyen-web": "^5.3.1",
|
|
83
|
+
"@commercelayer/js-auth": "^2.2.6",
|
|
84
|
+
"@commercelayer/sdk": "^2.3.11",
|
|
85
|
+
"@stripe/react-stripe-js": "^1.6.0",
|
|
86
|
+
"@stripe/stripe-js": "^1.21.2",
|
|
87
|
+
"axios": "^0.24.0",
|
|
88
|
+
"braintree-web": "^3.84.0",
|
|
76
89
|
"jwt-decode": "^3.1.2",
|
|
77
90
|
"lodash": "^4.17.21",
|
|
78
91
|
"lodash-es": "^4.17.21",
|
|
79
|
-
"rapid-form": "^1.
|
|
80
|
-
"react-table": "^7.7.0",
|
|
81
|
-
"react-window": "^1.8.6"
|
|
92
|
+
"rapid-form": "^1.6.0"
|
|
82
93
|
},
|
|
83
94
|
"devDependencies": {
|
|
84
|
-
"@babel/plugin-proposal-class-properties": "^7.
|
|
85
|
-
"@babel/preset-env": "^7.
|
|
86
|
-
"@babel/preset-react": "^7.
|
|
87
|
-
"@babel/preset-typescript": "^7.
|
|
88
|
-
"@
|
|
89
|
-
"@
|
|
90
|
-
"@
|
|
91
|
-
"@
|
|
92
|
-
"@
|
|
93
|
-
"@
|
|
94
|
-
"@
|
|
95
|
+
"@babel/plugin-proposal-class-properties": "^7.16.0",
|
|
96
|
+
"@babel/preset-env": "^7.16.4",
|
|
97
|
+
"@babel/preset-react": "^7.16.0",
|
|
98
|
+
"@babel/preset-typescript": "^7.16.0",
|
|
99
|
+
"@playwright/test": "^1.17.1",
|
|
100
|
+
"@semantic-release/changelog": "^6.0.1",
|
|
101
|
+
"@semantic-release/commit-analyzer": "^9.0.2",
|
|
102
|
+
"@semantic-release/git": "^10.0.1",
|
|
103
|
+
"@semantic-release/github": "^8.0.2",
|
|
104
|
+
"@semantic-release/npm": "^8.0.3",
|
|
105
|
+
"@semantic-release/release-notes-generator": "^10.0.3",
|
|
106
|
+
"@tailwindcss/aspect-ratio": "^0.3.0",
|
|
95
107
|
"@tailwindcss/forms": "^0.3.4",
|
|
96
108
|
"@tailwindcss/typography": "^0.4.1",
|
|
97
|
-
"@types/braintree-web": "^3.75.
|
|
98
|
-
"@types/jest": "^27.0.
|
|
99
|
-
"@types/lodash": "^4.14.
|
|
100
|
-
"@types/node": "^16.
|
|
109
|
+
"@types/braintree-web": "^3.75.12",
|
|
110
|
+
"@types/jest": "^27.0.3",
|
|
111
|
+
"@types/lodash": "^4.14.177",
|
|
112
|
+
"@types/node": "^16.11.12",
|
|
101
113
|
"@types/prop-types": "^15.7.4",
|
|
102
|
-
"@types/react": "^17.0.
|
|
103
|
-
"@types/react-table": "^7.7.5",
|
|
114
|
+
"@types/react": "^17.0.37",
|
|
104
115
|
"@types/react-test-renderer": "^17.0.1",
|
|
105
|
-
"@
|
|
106
|
-
"@typescript-eslint/
|
|
107
|
-
"@typescript-eslint/parser": "^4.31.2",
|
|
116
|
+
"@typescript-eslint/eslint-plugin": "^5.6.0",
|
|
117
|
+
"@typescript-eslint/parser": "^5.6.0",
|
|
108
118
|
"@zeit/next-css": "^1.0.1",
|
|
109
119
|
"@zerollup/ts-transform-paths": "^1.7.18",
|
|
110
|
-
"autoprefixer": "^10.
|
|
111
|
-
"babel-jest": "^27.2
|
|
112
|
-
"babel-loader": "^8.2.
|
|
113
|
-
"babel-plugin-istanbul": "^6.
|
|
114
|
-
"
|
|
115
|
-
"eslint": "^
|
|
120
|
+
"autoprefixer": "^10.4.0",
|
|
121
|
+
"babel-jest": "^27.4.2",
|
|
122
|
+
"babel-loader": "^8.2.3",
|
|
123
|
+
"babel-plugin-istanbul": "^6.1.1",
|
|
124
|
+
"dotenv": "^10.0.0",
|
|
125
|
+
"eslint": "^8.4.1",
|
|
116
126
|
"eslint-config-prettier": "^8.3.0",
|
|
117
127
|
"eslint-config-react-app": "^6.0.0",
|
|
118
|
-
"eslint-plugin-react": "^7.
|
|
119
|
-
"eslint-plugin-react-hooks": "^4.
|
|
120
|
-
"jest": "^27.
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
128
|
+
"eslint-plugin-react": "^7.27.1",
|
|
129
|
+
"eslint-plugin-react-hooks": "^4.3.0",
|
|
130
|
+
"jest": "^27.4.3",
|
|
131
|
+
"minimize-js": "^1.2.0",
|
|
132
|
+
"next": "^12.0.7",
|
|
133
|
+
"playwright": "^1.17.1",
|
|
134
|
+
"postcss": "^8.4.4",
|
|
135
|
+
"postcss-loader": "^6.2.1",
|
|
136
|
+
"prettier": "^2.5.1",
|
|
125
137
|
"prop-types": "^15.7.2",
|
|
126
138
|
"react": "^17.0.2",
|
|
127
139
|
"react-dom": "^17.0.2",
|
|
128
140
|
"react-test-renderer": "^17.0.2",
|
|
129
141
|
"rollup-plugin-babel": "^4.4.0",
|
|
130
142
|
"rollup-plugin-node-resolve": "^5.2.0",
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"ts-jest": "^27.0.5",
|
|
143
|
+
"tailwindcss": "^2.2.19",
|
|
144
|
+
"ts-jest": "^27.1.0",
|
|
134
145
|
"ts-loader": "^9.2.6",
|
|
146
|
+
"tsc-alias": "^1.4.2",
|
|
135
147
|
"tsconfig-paths-jest": "^0.0.1",
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
148
|
+
"ttypescript": "^1.5.13",
|
|
149
|
+
"typescript": "^4.5.2",
|
|
150
|
+
"v8-to-istanbul": "^8.1.0"
|
|
139
151
|
},
|
|
140
152
|
"peerDependencies": {
|
|
141
|
-
"react": "^17.0.2"
|
|
142
|
-
"react-dom": "^17.0.2"
|
|
153
|
+
"react": "^17.0.2"
|
|
143
154
|
}
|
|
144
155
|
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
import { AddressFieldView } from "../reducers/AddressReducer";
|
|
3
|
-
import { AddressCollection } from '@commercelayer/js-sdk';
|
|
4
|
-
declare type AddressFieldChildrenProps = Omit<AddressFieldProps, 'children' | 'name'> & {
|
|
5
|
-
address: AddressCollection;
|
|
6
|
-
};
|
|
7
|
-
declare type AddressFieldProps = {
|
|
8
|
-
type?: 'field';
|
|
9
|
-
label?: never;
|
|
10
|
-
onClick?: never;
|
|
11
|
-
children?: (props: AddressFieldChildrenProps) => ReactNode;
|
|
12
|
-
name: AddressFieldView;
|
|
13
|
-
className?: string;
|
|
14
|
-
} | {
|
|
15
|
-
type?: 'edit';
|
|
16
|
-
label: string | ReactNode;
|
|
17
|
-
onClick: (address: Record<string, string>) => void;
|
|
18
|
-
children?: (props: AddressFieldChildrenProps) => ReactNode;
|
|
19
|
-
name?: AddressFieldView;
|
|
20
|
-
className?: string;
|
|
21
|
-
} | {
|
|
22
|
-
type?: 'delete';
|
|
23
|
-
label: string;
|
|
24
|
-
onClick: () => void;
|
|
25
|
-
children?: (props: AddressFieldChildrenProps) => ReactNode;
|
|
26
|
-
name?: AddressFieldView;
|
|
27
|
-
className?: string;
|
|
28
|
-
} | {
|
|
29
|
-
type?: 'edit' | 'field' | 'delete';
|
|
30
|
-
label?: never;
|
|
31
|
-
onClick?: never;
|
|
32
|
-
children: (props: AddressFieldChildrenProps) => ReactNode;
|
|
33
|
-
name?: never;
|
|
34
|
-
className?: string;
|
|
35
|
-
};
|
|
36
|
-
declare const AddressField: FunctionComponent<AddressFieldProps>;
|
|
37
|
-
export default AddressField;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
declare type CustomerAddressFormProps = {
|
|
3
|
-
children: ReactNode;
|
|
4
|
-
reset?: boolean;
|
|
5
|
-
errorClassName?: string;
|
|
6
|
-
} & Omit<JSX.IntrinsicElements['form'], 'onSubmit'>;
|
|
7
|
-
declare const CustomerAddressForm: FunctionComponent<CustomerAddressFormProps>;
|
|
8
|
-
export default CustomerAddressForm;
|
|
@@ -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;
|