@commercelayer/react-components 3.12.2 → 3.12.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/AddToCartButton.d.ts +27 -1
- package/lib/components/Address.d.ts +13 -1
- package/lib/components/AddressCountrySelector.d.ts +9 -1
- package/lib/components/AddressField.d.ts +15 -1
- package/lib/components/AddressInput.d.ts +7 -1
- package/lib/components/AddressStateSelector.d.ts +11 -1
- package/lib/components/AddressesContainer.d.ts +8 -1
- package/lib/components/AdjustmentAmount.d.ts +4 -1
- package/lib/components/AdyenPayment.d.ts +25 -1
- package/lib/components/AvailabilityContainer.d.ts +7 -1
- package/lib/components/AvailabilityTemplate.d.ts +15 -1
- package/lib/components/BillingAddressContainer.d.ts +6 -1
- package/lib/components/BillingAddressForm.d.ts +8 -1
- package/lib/components/BraintreePayment.d.ts +30 -1
- package/lib/components/CheckoutComPayment.d.ts +23 -1
- package/lib/components/CheckoutLink.d.ts +13 -1
- package/lib/components/CommerceLayer.d.ts +8 -1
- package/lib/components/CustomerContainer.d.ts +7 -1
- package/lib/components/CustomerInput.d.ts +11 -1
- package/lib/components/DeliveryLeadTime.d.ts +10 -1
- package/lib/components/DiscountAmount.d.ts +4 -1
- package/lib/components/Errors.d.ts +5 -1
- package/lib/components/ExternalFunction.d.ts +7 -1
- package/lib/components/GiftCard.d.ts +8 -1
- package/lib/components/GiftCardAmount.d.ts +4 -1
- package/lib/components/GiftCardContainer.d.ts +6 -1
- package/lib/components/GiftCardCurrencySelector.d.ts +7 -1
- package/lib/components/GiftCardInput.d.ts +7 -1
- package/lib/components/GiftCardOrCouponCode.d.ts +17 -1
- package/lib/components/GiftCardOrCouponCode.js +1 -1
- package/lib/components/GiftCardOrCouponForm.d.ts +10 -1
- package/lib/components/GiftCardOrCouponInput.d.ts +10 -1
- package/lib/components/GiftCardOrCouponRemoveButton.d.ts +18 -1
- package/lib/components/GiftCardOrCouponSubmit.d.ts +9 -1
- package/lib/components/ItemContainer.d.ts +11 -1
- package/lib/components/KlarnaPayment.d.ts +9 -1
- package/lib/components/LineItem.d.ts +8 -1
- package/lib/components/LineItemAmount.d.ts +7 -1
- package/lib/components/LineItemCode.d.ts +12 -1
- package/lib/components/LineItemImage.d.ts +16 -1
- package/lib/components/LineItemImage.js +1 -1
- package/lib/components/LineItemName.d.ts +11 -1
- package/lib/components/LineItemOption.d.ts +19 -1
- package/lib/components/LineItemOptions.d.ts +16 -1
- package/lib/components/LineItemQuantity.d.ts +14 -1
- package/lib/components/LineItemRemoveLink.d.ts +12 -1
- package/lib/components/LineItemsContainer.d.ts +8 -1
- package/lib/components/LineItemsCount.d.ts +12 -1
- package/lib/components/LineItemsEmpty.d.ts +12 -1
- package/lib/components/MetadataInput.d.ts +5 -1
- package/lib/components/OrderContainer.d.ts +11 -1
- package/lib/components/OrderContainer.js +1 -1
- package/lib/components/OrderNumber.d.ts +5 -1
- package/lib/components/OrderStorage.d.ts +8 -1
- package/lib/components/PaymentGateway.d.ts +16 -1
- package/lib/components/PaymentMethod.d.ts +16 -1
- package/lib/components/PaymentMethodAmount.d.ts +4 -1
- package/lib/components/PaymentMethodName.d.ts +9 -1
- package/lib/components/PaymentMethodPrice.d.ts +9 -1
- package/lib/components/PaymentMethodRadioButton.d.ts +12 -1
- package/lib/components/PaymentMethodsContainer.d.ts +8 -1
- package/lib/components/PaymentSource.d.ts +19 -1
- package/lib/components/PaymentSourceBrandIcon.d.ts +15 -1
- package/lib/components/PaymentSourceBrandName.d.ts +12 -1
- package/lib/components/PaymentSourceDetail.d.ts +12 -1
- package/lib/components/PaymentSourceEditButton.d.ts +9 -1
- package/lib/components/PaypalPayment.d.ts +12 -1
- package/lib/components/PlaceOrderButton.d.ts +14 -1
- package/lib/components/PlaceOrderContainer.d.ts +8 -1
- package/lib/components/Price.d.ts +16 -1
- package/lib/components/PricesContainer.d.ts +11 -1
- package/lib/components/PrivacyAndTermsCheckbox.d.ts +4 -1
- package/lib/components/QuantitySelector.d.ts +17 -1
- package/lib/components/SaveAddressesButton.d.ts +10 -1
- package/lib/components/SaveCustomerButton.d.ts +13 -1
- package/lib/components/Shipment.d.ts +8 -1
- package/lib/components/ShipmentField.d.ts +12 -1
- package/lib/components/ShipmentsContainer.d.ts +6 -1
- package/lib/components/ShippingAddressContainer.d.ts +6 -1
- package/lib/components/ShippingAddressForm.d.ts +8 -1
- package/lib/components/ShippingAmount.d.ts +4 -1
- package/lib/components/ShippingMethod.d.ts +8 -1
- package/lib/components/ShippingMethodName.d.ts +11 -1
- package/lib/components/ShippingMethodPrice.d.ts +13 -1
- package/lib/components/ShippingMethodRadioButton.d.ts +13 -1
- package/lib/components/SkuField.d.ts +9 -1
- package/lib/components/SkuField.js +1 -1
- package/lib/components/SkuList.d.ts +7 -1
- package/lib/components/SkuListsContainer.d.ts +6 -1
- package/lib/components/SkuOption.d.ts +7 -1
- package/lib/components/SkuOptionInput.d.ts +5 -1
- package/lib/components/SkuOptionsContainer.d.ts +7 -1
- package/lib/components/Skus.d.ts +11 -1
- package/lib/components/SkusContainer.d.ts +14 -1
- package/lib/components/StockTransfer.d.ts +6 -1
- package/lib/components/StockTransfer.js +1 -1
- package/lib/components/StockTransferField.d.ts +9 -1
- package/lib/components/StockTransferField.js +1 -1
- package/lib/components/StripePayment.d.ts +18 -1
- package/lib/components/SubTotalAmount.d.ts +4 -1
- package/lib/components/SubmitButton.d.ts +9 -1
- package/lib/components/TaxesAmount.d.ts +4 -1
- package/lib/components/TotalAmount.d.ts +4 -1
- package/lib/components/VariantSelector.d.ts +29 -1
- package/lib/components/VariantsContainer.d.ts +8 -1
- package/lib/components/WireTransferPayment.d.ts +10 -1
- package/lib/components/gateways/AdyenGateway.d.ts +4 -1
- package/lib/components/gateways/BraintreeGateway.d.ts +4 -1
- package/lib/components/gateways/CheckoutComGateway.d.ts +4 -1
- package/lib/components/gateways/KlarnaGateway.d.ts +4 -1
- package/lib/components/gateways/PaypalGateway.d.ts +4 -1
- package/lib/components/gateways/StripeGateway.d.ts +4 -1
- package/lib/components/gateways/WireTransferGateway.d.ts +4 -1
- package/lib/components/utils/AddressCardsTemplate.d.ts +26 -1
- package/lib/components/utils/BaseField.d.ts +8 -1
- package/lib/components/utils/BaseInput.d.ts +5 -1
- package/lib/components/utils/BaseInput.js +1 -1
- package/lib/components/utils/BaseOrderPrice.d.ts +6 -1
- package/lib/components/utils/BaseOrderPrice.js +1 -1
- package/lib/components/utils/BaseSelect.d.ts +5 -1
- package/lib/components/utils/GenericFieldComponent.d.ts +37 -1
- package/lib/components/utils/GenericFieldComponent.js +1 -1
- package/lib/components/utils/Parent.d.ts +6 -1
- package/lib/components/utils/Parent.js +1 -1
- package/lib/components/utils/PaymentCardsTemplate.d.ts +22 -1
- package/lib/components/utils/PriceTemplate.d.ts +8 -1
- package/lib/components/utils/VariantTemplate.d.ts +36 -1
- package/lib/components/utils/getAllErrors.d.ts +17 -1
- package/lib/config/components.d.ts +913 -1
- package/lib/config/currency.d.ts +5 -1
- package/lib/context/AddressChildrenContext.d.ts +6 -1
- package/lib/context/AddressContext.d.ts +16 -1
- package/lib/context/AvailabilityContext.d.ts +2 -1
- package/lib/context/BillingAddressContext.d.ts +11 -1
- package/lib/context/BillingAddressFormContext.d.ts +19 -1
- package/lib/context/CommerceLayerContext.d.ts +6 -1
- package/lib/context/CouponAndGiftCardFormContext.d.ts +9 -1
- package/lib/context/CustomerContext.d.ts +15 -1
- package/lib/context/ExternalFunctionContext.d.ts +11 -1
- package/lib/context/GiftCardContext.d.ts +10 -1
- package/lib/context/ItemContext.d.ts +12 -1
- package/lib/context/LineItemChildrenContext.d.ts +8 -1
- package/lib/context/LineItemContext.d.ts +7 -1
- package/lib/context/LineItemOptionChildrenContext.d.ts +7 -1
- package/lib/context/OrderContext.d.ts +29 -1
- package/lib/context/OrderStorageContext.d.ts +10 -1
- package/lib/context/PaymentMethodChildrenContext.d.ts +9 -1
- package/lib/context/PaymentMethodContext.d.ts +22 -1
- package/lib/context/PaymentSourceContext.d.ts +13 -1
- package/lib/context/PlaceOrderContext.d.ts +17 -1
- package/lib/context/PricesContext.d.ts +6 -1
- package/lib/context/ShipmentChildrenContext.d.ts +12 -1
- package/lib/context/ShipmentContext.d.ts +11 -1
- package/lib/context/ShippingAddressContext.d.ts +9 -1
- package/lib/context/ShippingAddressFormContext.d.ts +3 -1
- package/lib/context/ShippingMethodChildrenContext.d.ts +9 -1
- package/lib/context/SkuChildrenContext.d.ts +8 -1
- package/lib/context/SkuContext.d.ts +8 -1
- package/lib/context/SkuListsContext.d.ts +5 -1
- package/lib/context/SkuOptionChildrenContext.d.ts +7 -1
- package/lib/context/SkuOptionsContext.d.ts +2 -1
- package/lib/context/StockTransferChildrenContext.d.ts +6 -1
- package/lib/context/VariantsContext.d.ts +2 -1
- package/lib/index.d.ts +102 -1
- package/lib/reducers/AddressReducer.d.ts +59 -1
- package/lib/reducers/AvailabilityReducer.d.ts +61 -1
- package/lib/reducers/BillingAddressReducer.d.ts +31 -1
- package/lib/reducers/CustomerReducer.d.ts +50 -1
- package/lib/reducers/GiftCardReducer.d.ts +76 -1
- package/lib/reducers/ItemReducer.d.ts +69 -1
- package/lib/reducers/LineItemReducer.d.ts +52 -1
- package/lib/reducers/OrderReducer.d.ts +132 -2
- package/lib/reducers/PaymentMethodReducer.d.ts +151 -1
- package/lib/reducers/PlaceOrderReducer.d.ts +59 -1
- package/lib/reducers/PriceReducer.d.ts +44 -1
- package/lib/reducers/ShipmentReducer.d.ts +40 -1
- package/lib/reducers/ShippingAddressReducer.d.ts +32 -1
- package/lib/reducers/SkuListsReducer.d.ts +21 -1
- package/lib/reducers/SkuOptionsReducer.d.ts +26 -1
- package/lib/reducers/SkuReducer.d.ts +21 -1
- package/lib/reducers/VariantReducer.d.ts +71 -1
- package/lib/typings/errors.d.ts +42 -1
- package/lib/typings/index.d.ts +137 -1
- package/lib/utils/PropsType.d.ts +33 -1
- package/lib/utils/addressesManager.d.ts +28 -1
- package/lib/utils/baseReducer.d.ts +3 -1
- package/lib/utils/browserInfo.d.ts +9 -1
- package/lib/utils/checkIncludeResource.d.ts +8 -0
- package/lib/utils/checkIncludeResource.js +1 -0
- package/lib/utils/childrenTypes.d.ts +9 -1
- package/lib/utils/compareObjAttribute.d.ts +7 -1
- package/lib/utils/countryStateCity.d.ts +9 -1
- package/lib/utils/customMessages.d.ts +8 -1
- package/lib/utils/customerOrderOptions.d.ts +3 -1
- package/lib/utils/getAmount.d.ts +9 -1
- package/lib/utils/getCardDetails.d.ts +15 -1
- package/lib/utils/getCurrentItemKey.d.ts +6 -1
- package/lib/utils/getErrors.d.ts +11 -1
- package/lib/utils/getLineItemsCount.d.ts +12 -1
- package/lib/utils/getLoaderComponent.d.ts +2 -1
- package/lib/utils/getPrices.d.ts +17 -1
- package/lib/utils/getSdk.d.ts +3 -1
- package/lib/utils/getSkus.d.ts +3 -1
- package/lib/utils/hooks/useExternalScript.d.ts +1 -1
- package/lib/utils/isEmptyStates.d.ts +1 -1
- package/lib/utils/isJSON.d.ts +1 -1
- package/lib/utils/jwt.d.ts +27 -1
- package/lib/utils/localStorage.d.ts +17 -1
- package/lib/utils/organization.d.ts +6 -1
- package/lib/utils/paypalPayment.d.ts +3 -1
- package/lib/utils/placeholderImages.d.ts +2 -0
- package/lib/utils/placeholderImages.js +1 -0
- package/lib/utils/promisify.d.ts +1 -1
- package/lib/utils/shipments.d.ts +3 -1
- package/lib/utils/validateFormFields.d.ts +22 -1
- package/package.json +2 -2
|
@@ -1 +1,19 @@
|
|
|
1
|
-
import{FunctionComponent,CSSProperties}
|
|
1
|
+
import { FunctionComponent, CSSProperties } from 'react';
|
|
2
|
+
import { LineItemOption as LineItemOptionType } from '@commercelayer/sdk';
|
|
3
|
+
import { FunctionChildren } from '../typings/index';
|
|
4
|
+
declare type LineItemOptionChildrenProps = FunctionChildren<Omit<LineItemOptionProps, 'children'> & {
|
|
5
|
+
lineItemOption: LineItemOptionType;
|
|
6
|
+
}>;
|
|
7
|
+
declare type LineItemOptionProps = {
|
|
8
|
+
id?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
key?: string;
|
|
11
|
+
style?: CSSProperties;
|
|
12
|
+
children?: LineItemOptionChildrenProps;
|
|
13
|
+
name?: string;
|
|
14
|
+
valueClassName?: string;
|
|
15
|
+
tagElement?: keyof JSX.IntrinsicElements;
|
|
16
|
+
tagContainer?: keyof JSX.IntrinsicElements;
|
|
17
|
+
};
|
|
18
|
+
declare const LineItemOption: FunctionComponent<LineItemOptionProps>;
|
|
19
|
+
export default LineItemOption;
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
import React,{ReactNode}from'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
export declare type LineItemOptionsProps = JSX.IntrinsicElements['div'] & {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
title?: string;
|
|
5
|
+
showName?: boolean;
|
|
6
|
+
titleTagElement?: keyof JSX.IntrinsicElements;
|
|
7
|
+
titleClassName?: string;
|
|
8
|
+
} & ({
|
|
9
|
+
skuOptionId: string;
|
|
10
|
+
showAll?: never;
|
|
11
|
+
} | {
|
|
12
|
+
skuOptionId?: never;
|
|
13
|
+
showAll: true;
|
|
14
|
+
});
|
|
15
|
+
declare const LineItemOptions: React.FunctionComponent<LineItemOptionsProps>;
|
|
16
|
+
export default LineItemOptions;
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
import React,{FunctionComponent
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import { FunctionChildren } from '../typings/index';
|
|
3
|
+
declare type LineItemQuantityChildrenProps = FunctionChildren<Omit<LineItemQuantityProps, 'children'> & {
|
|
4
|
+
quantity: number;
|
|
5
|
+
handleChange: (event: React.MouseEvent<HTMLSelectElement>) => void;
|
|
6
|
+
}>;
|
|
7
|
+
declare type LineItemQuantityProps = {
|
|
8
|
+
children?: LineItemQuantityChildrenProps;
|
|
9
|
+
max?: number;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
readonly?: boolean;
|
|
12
|
+
} & (JSX.IntrinsicElements['select'] & JSX.IntrinsicElements['span']);
|
|
13
|
+
declare const LineItemQuantity: FunctionComponent<LineItemQuantityProps>;
|
|
14
|
+
export default LineItemQuantity;
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
import React,{FunctionComponent,PropsWithoutRef
|
|
1
|
+
import React, { FunctionComponent, PropsWithoutRef } from 'react';
|
|
2
|
+
import { FunctionChildren } from '../typings/index';
|
|
3
|
+
declare type ChildrenLineItemRemoveLinkProps = FunctionChildren<{
|
|
4
|
+
handleRemove: (event: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
5
|
+
label?: string;
|
|
6
|
+
}>;
|
|
7
|
+
declare type LineItemRemoveLinkProps = {
|
|
8
|
+
children?: ChildrenLineItemRemoveLinkProps;
|
|
9
|
+
label?: string;
|
|
10
|
+
} & PropsWithoutRef<JSX.IntrinsicElements['a']>;
|
|
11
|
+
declare const LineItemRemoveLink: FunctionComponent<LineItemRemoveLinkProps>;
|
|
12
|
+
export default LineItemRemoveLink;
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
import{FunctionComponent,ReactNode}from'react';
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
declare type LineItemsContainer = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
filters?: Record<string, any>;
|
|
5
|
+
loader?: ReactNode;
|
|
6
|
+
};
|
|
7
|
+
declare const LineItemsContainer: FunctionComponent<LineItemsContainer>;
|
|
8
|
+
export default LineItemsContainer;
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
import{FunctionComponent
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { TypeAccepted } from '../utils/getLineItemsCount';
|
|
3
|
+
import { FunctionChildren } from '../typings/index';
|
|
4
|
+
declare type LineItemsCountChildrenProps = FunctionChildren<Omit<LineItemsCountProps, 'children'> & {
|
|
5
|
+
quantity: number;
|
|
6
|
+
}>;
|
|
7
|
+
declare type LineItemsCountProps = {
|
|
8
|
+
children?: LineItemsCountChildrenProps;
|
|
9
|
+
typeAccepted?: TypeAccepted[];
|
|
10
|
+
} & JSX.IntrinsicElements['span'];
|
|
11
|
+
declare const LineItemsCount: FunctionComponent<LineItemsCountProps>;
|
|
12
|
+
export default LineItemsCount;
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
import{FunctionComponent
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { FunctionChildren } from '../typings/index';
|
|
3
|
+
export declare type LineItemsCountType = FunctionChildren<Omit<LineItemsCountProps, 'children'> & {
|
|
4
|
+
quantity: number;
|
|
5
|
+
text: string;
|
|
6
|
+
}>;
|
|
7
|
+
declare type LineItemsCountProps = {
|
|
8
|
+
children?: LineItemsCountType;
|
|
9
|
+
text?: string;
|
|
10
|
+
} & JSX.IntrinsicElements['span'];
|
|
11
|
+
declare const LineItemsEmpty: FunctionComponent<LineItemsCountProps>;
|
|
12
|
+
export default LineItemsEmpty;
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
import{FunctionComponent}from'react';
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { BaseInputComponentProps } from '../typings/index';
|
|
3
|
+
export declare type MetadataInputProps = BaseInputComponentProps & JSX.IntrinsicElements['input'] & JSX.IntrinsicElements['textarea'];
|
|
4
|
+
declare const MetadataInput: FunctionComponent<MetadataInputProps>;
|
|
5
|
+
export default MetadataInput;
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
import React,{ReactNode}from'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { BaseMetadataObject } from '../typings/index';
|
|
3
|
+
import { OrderCreate } from '@commercelayer/sdk';
|
|
4
|
+
declare type OrderContainerProps = {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
metadata?: BaseMetadataObject;
|
|
7
|
+
attributes?: OrderCreate;
|
|
8
|
+
orderId?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const OrderContainer: React.FunctionComponent<OrderContainerProps>;
|
|
11
|
+
export default OrderContainer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as _jsx}from"react/jsx-runtime";import{useEffect,useReducer,useContext,useMemo}from"react";import orderReducer,{createOrder,getApiOrder,setOrderErrors,setOrder,orderInitialState,updateOrder}from"../reducers/OrderReducer";import CommerceLayerContext from"../context/CommerceLayerContext";import OrderContext,{defaultOrderContext}from"../context/OrderContext";import
|
|
1
|
+
import{jsx as _jsx}from"react/jsx-runtime";import{useEffect,useReducer,useContext,useMemo}from"react";import orderReducer,{createOrder,getApiOrder,setOrderErrors,setOrder,orderInitialState,updateOrder}from"../reducers/OrderReducer";import CommerceLayerContext from"../context/CommerceLayerContext";import OrderContext,{defaultOrderContext}from"../context/OrderContext";import components from"../config/components";import OrderStorageContext from"../context/OrderStorageContext";import compareObjAttribute from"../utils/compareObjAttribute";import checkIncludeResources from"../utils/checkIncludeResource";const propTypes=components.OrderContainer.propTypes,defaultProps=components.OrderContainer.defaultProps,displayName=components.OrderContainer.displayName,OrderContainer=props=>{const{orderId,children,metadata,attributes}=props,[state,dispatch]=useReducer(orderReducer,orderInitialState),config=useContext(CommerceLayerContext),{persistKey,clearWhenPlaced,getLocalOrder,setLocalOrder,deleteLocalOrder}=useContext(OrderStorageContext);useEffect(()=>{var _a;const startRequest=Object.keys((state==null?void 0:state.includeLoaded)||{}).filter(key=>{var _a2;return((_a2=state==null?void 0:state.includeLoaded)===null||_a2===void 0?void 0:_a2[key])===!0});if(config.accessToken){const localOrder=persistKey?getLocalOrder(persistKey):orderId;localOrder&&!state.order&&startRequest.length===((_a=state.include)===null||_a===void 0?void 0:_a.length)?getApiOrder({id:localOrder,dispatch,config,persistKey,clearWhenPlaced:!!(persistKey&&clearWhenPlaced),deleteLocalOrder,state}):(state==null?void 0:state.order)&&(state==null?void 0:state.include)&&(checkIncludeResources({order:state.order,resourceInclude:state.include})||getApiOrder({id:state.orderId,dispatch,config,persistKey,deleteLocalOrder,state}))}},[config.accessToken,state.includeLoaded,state.include,orderId,state.order]),useEffect(()=>{if(state.orderId&&attributes&&state.order){const updateAttributes=compareObjAttribute({attributes,object:state.order});Object.keys(updateAttributes).length>0&&updateOrder({id:state.orderId,attributes:updateAttributes,dispatch,config,include:state.include,state})}},[attributes,state.orderId,state.order]);const orderValue=useMemo(()=>Object.assign(Object.assign({},state),{setOrder:order=>setOrder(order,dispatch),getOrder:id=>getApiOrder({id,dispatch,config,state}),setOrderErrors:errors=>setOrderErrors({dispatch,errors}),createOrder:async()=>await createOrder({persistKey,dispatch,config,state,orderMetadata:metadata,orderAttributes:attributes}),addToCart:values=>defaultOrderContext.addToCart(Object.assign(Object.assign({},values),{persistKey,dispatch,state,config,errors:state.errors,orderMetadata:metadata||{},orderAttributes:attributes,setLocalOrder})),saveAddressToCustomerAddressBook:args=>defaultOrderContext.saveAddressToCustomerAddressBook(Object.assign(Object.assign({},args),{dispatch})),setGiftCardOrCouponCode:({code,codeType})=>defaultOrderContext.setGiftCardOrCouponCode({code,codeType,dispatch,order:state.order,config,include:state.include,state}),removeGiftCardOrCouponCode:({codeType})=>defaultOrderContext.removeGiftCardOrCouponCode({codeType,dispatch,order:state.order,config,include:state.include,state}),addResourceToInclude:args=>defaultOrderContext.addResourceToInclude(Object.assign(Object.assign({},args),{dispatch,resourcesIncluded:state.include,resourceIncludedLoaded:state.includeLoaded})),updateOrder:async args=>await defaultOrderContext.updateOrder(Object.assign(Object.assign({},args),{dispatch,config,include:state.include,state}))}),[state]);return _jsx(OrderContext.Provider,Object.assign({value:orderValue},{children}))};OrderContainer.propTypes=propTypes,OrderContainer.defaultProps=defaultProps,OrderContainer.displayName=displayName;export default OrderContainer;
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
import{FunctionComponent}from'react';
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { BaseFieldProps } from './utils/BaseField';
|
|
3
|
+
export declare type OrderNumberProps = Omit<BaseFieldProps, 'attribute'>;
|
|
4
|
+
declare const OrderNumber: FunctionComponent<OrderNumberProps>;
|
|
5
|
+
export default OrderNumber;
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
import{FunctionComponent,ReactNode}from'react';
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
declare type OrderStorageProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
persistKey: string;
|
|
5
|
+
clearWhenPlaced?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const OrderStorage: FunctionComponent<OrderStorageProps>;
|
|
8
|
+
export default OrderStorage;
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
import{LoaderType}from'../typings/index';
|
|
1
|
+
import { LoaderType } from '../typings/index';
|
|
2
|
+
import { FunctionComponent } from 'react';
|
|
3
|
+
import { PaymentSourceProps } from './PaymentSource';
|
|
4
|
+
export declare type GatewayBaseType = PaymentGatewayProps & {
|
|
5
|
+
show: boolean;
|
|
6
|
+
loading: boolean;
|
|
7
|
+
loaderComponent: JSX.Element;
|
|
8
|
+
};
|
|
9
|
+
export declare type PaymentGatewayProps = PaymentSourceProps & {
|
|
10
|
+
showCard: boolean;
|
|
11
|
+
handleEditClick: (e: MouseEvent) => void;
|
|
12
|
+
show: boolean;
|
|
13
|
+
loader?: LoaderType;
|
|
14
|
+
};
|
|
15
|
+
declare const PaymentGateway: FunctionComponent<PaymentGatewayProps>;
|
|
16
|
+
export default PaymentGateway;
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
import{FunctionComponent,ReactNode}
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import { LoaderType } from '../typings/index';
|
|
3
|
+
import { PaymentMethod as PaymentMethodType } from '@commercelayer/sdk';
|
|
4
|
+
declare type PaymentMethodProps = {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
activeClass?: string;
|
|
7
|
+
loader?: LoaderType;
|
|
8
|
+
} & Omit<JSX.IntrinsicElements['div'], 'onClick'> & ({
|
|
9
|
+
clickableContainer: true;
|
|
10
|
+
onClick?: (payment?: PaymentMethodType | Record<string, any>) => void;
|
|
11
|
+
} | {
|
|
12
|
+
clickableContainer?: never;
|
|
13
|
+
onClick?: never;
|
|
14
|
+
});
|
|
15
|
+
declare const PaymentMethod: FunctionComponent<PaymentMethodProps>;
|
|
16
|
+
export default PaymentMethod;
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
import{FunctionComponent}from'react';
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { BaseAmountComponent } from '../typings/index';
|
|
3
|
+
declare const PaymentMethodAmount: FunctionComponent<BaseAmountComponent>;
|
|
4
|
+
export default PaymentMethodAmount;
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
import{FunctionComponent,ReactNode
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
declare type PaymentMethodNameChildrenProps = Omit<PaymentMethodNameProps, 'children'> & {
|
|
3
|
+
labelName: string;
|
|
4
|
+
};
|
|
5
|
+
declare type PaymentMethodNameProps = {
|
|
6
|
+
children?: (props: PaymentMethodNameChildrenProps) => ReactNode;
|
|
7
|
+
} & JSX.IntrinsicElements['label'];
|
|
8
|
+
declare const PaymentMethodName: FunctionComponent<PaymentMethodNameProps>;
|
|
9
|
+
export default PaymentMethodName;
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
import{FunctionComponent}from'react';
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { BaseAmountComponent } from '../typings/index';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
type?: 'amount';
|
|
5
|
+
labelFree?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare type PaymentMethodPriceProps = BaseAmountComponent & Props;
|
|
8
|
+
declare const PaymentMethodPrice: FunctionComponent<PaymentMethodPriceProps>;
|
|
9
|
+
export default PaymentMethodPrice;
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
import{FunctionComponent,ReactNode,ChangeEvent
|
|
1
|
+
import { FunctionComponent, ReactNode, ChangeEvent } from 'react';
|
|
2
|
+
import { PaymentMethod } from '@commercelayer/sdk';
|
|
3
|
+
declare type ShippingMethodRadioButtonChildrenProps = Omit<ShippingMethodRadioButtonProps, 'children'> & {
|
|
4
|
+
checked: boolean;
|
|
5
|
+
handleOnChange: (event: ChangeEvent<HTMLInputElement>) => Promise<void>;
|
|
6
|
+
};
|
|
7
|
+
declare type ShippingMethodRadioButtonProps = {
|
|
8
|
+
children?: (props: ShippingMethodRadioButtonChildrenProps) => ReactNode;
|
|
9
|
+
onChange?: (payment?: PaymentMethod | Record<string, any>) => void;
|
|
10
|
+
} & JSX.IntrinsicElements['input'];
|
|
11
|
+
declare const PaymentMethodRadioButton: FunctionComponent<ShippingMethodRadioButtonProps>;
|
|
12
|
+
export default PaymentMethodRadioButton;
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
import React,{ReactNode}from'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { PaymentMethodConfig } from '../reducers/PaymentMethodReducer';
|
|
3
|
+
declare type PaymentMethodsContainerProps = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
config?: PaymentMethodConfig;
|
|
6
|
+
};
|
|
7
|
+
declare const PaymentMethodsContainer: React.FunctionComponent<PaymentMethodsContainerProps>;
|
|
8
|
+
export default PaymentMethodsContainer;
|
|
@@ -1 +1,19 @@
|
|
|
1
|
-
import{FunctionComponent,ReactNode
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import { LoaderType } from '../typings/index';
|
|
3
|
+
import { CustomerCardsTemplateChildren } from './utils/PaymentCardsTemplate';
|
|
4
|
+
export declare type CustomerCardsProps = {
|
|
5
|
+
handleClick: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare type CustomerSaveToWalletProps = {
|
|
8
|
+
name: 'save_payment_source_to_customer_wallet';
|
|
9
|
+
};
|
|
10
|
+
export declare type PaymentSourceProps = {
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
readonly?: boolean;
|
|
13
|
+
templateCustomerCards?: CustomerCardsTemplateChildren;
|
|
14
|
+
onClickCustomerCards?: () => void;
|
|
15
|
+
templateCustomerSaveToWallet?: (props: CustomerSaveToWalletProps) => ReactNode;
|
|
16
|
+
loader?: LoaderType;
|
|
17
|
+
} & JSX.IntrinsicElements['div'];
|
|
18
|
+
declare const PaymentSource: FunctionComponent<PaymentSourceProps>;
|
|
19
|
+
export default PaymentSource;
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
import{IconBrand}from'../context/PaymentSourceContext';
|
|
1
|
+
import { IconBrand } from '../context/PaymentSourceContext';
|
|
2
|
+
import { FunctionComponent } from 'react';
|
|
3
|
+
import { FunctionChildren } from '../typings/index';
|
|
4
|
+
declare type CustomComponent = FunctionChildren<Omit<Props & {
|
|
5
|
+
brand: IconBrand;
|
|
6
|
+
defaultSrc: string;
|
|
7
|
+
url: string;
|
|
8
|
+
}, 'children'>>;
|
|
9
|
+
declare type Props = {
|
|
10
|
+
children?: CustomComponent;
|
|
11
|
+
width?: number;
|
|
12
|
+
height?: number;
|
|
13
|
+
} & JSX.IntrinsicElements['img'];
|
|
14
|
+
declare const PaymentSourceBrandIcon: FunctionComponent<Props>;
|
|
15
|
+
export default PaymentSourceBrandIcon;
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
import{IconBrand}from'../context/PaymentSourceContext';
|
|
1
|
+
import { IconBrand } from '../context/PaymentSourceContext';
|
|
2
|
+
import { FunctionComponent } from 'react';
|
|
3
|
+
import { FunctionChildren } from '../typings/index';
|
|
4
|
+
declare type CustomComponent = FunctionChildren<Omit<Props & {
|
|
5
|
+
brand: IconBrand;
|
|
6
|
+
}, 'children'>>;
|
|
7
|
+
declare type Props = {
|
|
8
|
+
children?: CustomComponent;
|
|
9
|
+
label?: string;
|
|
10
|
+
} & JSX.IntrinsicElements['span'];
|
|
11
|
+
declare const PaymentSourceBrandName: FunctionComponent<Props>;
|
|
12
|
+
export default PaymentSourceBrandName;
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
import{FunctionComponent
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { FunctionChildren } from '../typings/index';
|
|
3
|
+
export declare type PaymentSourceDetailType = 'last4' | 'exp_year' | 'exp_month';
|
|
4
|
+
declare type CustomComponent = FunctionChildren<Omit<Props & {
|
|
5
|
+
text: string;
|
|
6
|
+
}, 'children'>>;
|
|
7
|
+
declare type Props = {
|
|
8
|
+
children?: CustomComponent;
|
|
9
|
+
type: PaymentSourceDetailType;
|
|
10
|
+
} & JSX.IntrinsicElements['span'];
|
|
11
|
+
declare const PaymentSourceDetail: FunctionComponent<Props>;
|
|
12
|
+
export default PaymentSourceDetail;
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
import{FunctionComponent,ReactNode}from'react';
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import { FunctionChildren } from '../typings/index';
|
|
3
|
+
declare type CustomComponent = FunctionChildren<Omit<Props, 'children'>>;
|
|
4
|
+
declare type Props = {
|
|
5
|
+
children?: CustomComponent;
|
|
6
|
+
label?: string | ReactNode;
|
|
7
|
+
} & Omit<JSX.IntrinsicElements['button'], 'onClick'>;
|
|
8
|
+
declare const PaymentSourceEditButton: FunctionComponent<Props>;
|
|
9
|
+
export default PaymentSourceEditButton;
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
import{FunctionComponent,ReactNode
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
export declare type PaypalConfig = {
|
|
3
|
+
return_url: string;
|
|
4
|
+
cancel_url: string;
|
|
5
|
+
infoMessage?: {
|
|
6
|
+
text?: string | ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
declare type Props = Omit<PaypalConfig, 'return_url' | 'cancel_url'> & JSX.IntrinsicElements['div'];
|
|
11
|
+
declare const PaypalPayment: FunctionComponent<Props>;
|
|
12
|
+
export default PaypalPayment;
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
import{FunctionComponent,ReactNode
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import { FunctionChildren } from '../typings/index';
|
|
3
|
+
declare type PlaceOrderButtonChildrenProps = FunctionChildren<Omit<PlaceOrderButtonProps, 'children'> & {
|
|
4
|
+
handleClick: () => Promise<void>;
|
|
5
|
+
}>;
|
|
6
|
+
declare type PlaceOrderButtonProps = {
|
|
7
|
+
children?: PlaceOrderButtonChildrenProps;
|
|
8
|
+
label?: string | ReactNode;
|
|
9
|
+
onClick?: (response: {
|
|
10
|
+
placed: boolean;
|
|
11
|
+
}) => void;
|
|
12
|
+
} & JSX.IntrinsicElements['button'];
|
|
13
|
+
declare const PlaceOrderButton: FunctionComponent<PlaceOrderButtonProps>;
|
|
14
|
+
export default PlaceOrderButton;
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
import{FunctionComponent,ReactNode}from'react';
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import { PlaceOrderOptions } from '../reducers/PlaceOrderReducer';
|
|
3
|
+
declare type PlaceOrderContainerProps = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
options?: PlaceOrderOptions;
|
|
6
|
+
};
|
|
7
|
+
declare const PlaceOrderContainer: FunctionComponent<PlaceOrderContainerProps>;
|
|
8
|
+
export default PlaceOrderContainer;
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { Price as PriceType } from '@commercelayer/sdk';
|
|
3
|
+
import { FunctionChildren, LoaderType } from '../typings/index';
|
|
4
|
+
declare type PriceChildrenProps = FunctionChildren<{
|
|
5
|
+
loading: boolean;
|
|
6
|
+
loader: LoaderType;
|
|
7
|
+
prices: PriceType[];
|
|
8
|
+
} & Omit<PriceProps, 'children'>>;
|
|
9
|
+
export interface PriceProps extends Partial<JSX.IntrinsicElements['span']> {
|
|
10
|
+
children?: PriceChildrenProps;
|
|
11
|
+
compareClassName?: string;
|
|
12
|
+
showCompare?: boolean;
|
|
13
|
+
skuCode?: string;
|
|
14
|
+
}
|
|
15
|
+
declare const Price: FunctionComponent<PriceProps>;
|
|
16
|
+
export default Price;
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
import{FunctionComponent,ReactNode}from'react';
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import { LoaderType } from '../typings/index';
|
|
3
|
+
declare type PricesContainerProps = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
filters?: object;
|
|
6
|
+
loader?: LoaderType;
|
|
7
|
+
perPage?: number;
|
|
8
|
+
skuCode?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const PricesContainer: FunctionComponent<PricesContainerProps>;
|
|
11
|
+
export default PricesContainer;
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
import{FunctionComponent}from'react';
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { BaseInputProps } from './utils/BaseInput';
|
|
3
|
+
declare const PrivacyAndTermsCheckbox: FunctionComponent<Partial<BaseInputProps>>;
|
|
4
|
+
export default PrivacyAndTermsCheckbox;
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
import React,{FunctionComponent
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import { FunctionChildren } from '../typings/index';
|
|
3
|
+
declare type QuantitySelectorChildrenProps = FunctionChildren<Omit<QuantitySelectorProps, 'children'> & {
|
|
4
|
+
handleChange: (event: React.MouseEvent<HTMLInputElement>) => void;
|
|
5
|
+
handleBlur: (event: React.MouseEvent<HTMLInputElement>) => void;
|
|
6
|
+
}>;
|
|
7
|
+
declare type QuantitySelectorProps = {
|
|
8
|
+
children?: QuantitySelectorChildrenProps;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
min?: number;
|
|
11
|
+
max?: number;
|
|
12
|
+
value?: string;
|
|
13
|
+
skuCode?: string;
|
|
14
|
+
skuListId?: string;
|
|
15
|
+
} & JSX.IntrinsicElements['input'];
|
|
16
|
+
declare const QuantitySelector: FunctionComponent<QuantitySelectorProps>;
|
|
17
|
+
export default QuantitySelector;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
import{FunctionComponent,ReactNode}from'react';
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import { FunctionChildren } from '../typings/index';
|
|
3
|
+
declare type SaveAddressesButtonChildrenProps = FunctionChildren<Omit<SaveAddressesButtonProps, 'children'>>;
|
|
4
|
+
declare type SaveAddressesButtonProps = {
|
|
5
|
+
children?: SaveAddressesButtonChildrenProps;
|
|
6
|
+
label?: string | ReactNode;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
} & JSX.IntrinsicElements['button'];
|
|
9
|
+
declare const SaveAddressesButton: FunctionComponent<SaveAddressesButtonProps>;
|
|
10
|
+
export default SaveAddressesButton;
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
import{FunctionComponent,ReactNode
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import { FunctionChildren } from '../typings/index';
|
|
3
|
+
declare type ParentProps = {
|
|
4
|
+
handleClick: () => any;
|
|
5
|
+
};
|
|
6
|
+
declare type SaveAddressesButtonChildrenProps = FunctionChildren<Omit<SaveCustomerButtonProps & ParentProps, 'children'>>;
|
|
7
|
+
declare type SaveCustomerButtonProps = {
|
|
8
|
+
children?: SaveAddressesButtonChildrenProps;
|
|
9
|
+
label?: string | ReactNode;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
} & JSX.IntrinsicElements['button'];
|
|
12
|
+
declare const SaveCustomerButton: FunctionComponent<SaveCustomerButtonProps>;
|
|
13
|
+
export default SaveCustomerButton;
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
import React,{ReactNode}from'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { LoaderType } from '../typings/index';
|
|
3
|
+
declare type ShipmentProps = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
loader?: LoaderType;
|
|
6
|
+
};
|
|
7
|
+
declare const Shipment: React.FunctionComponent<ShipmentProps>;
|
|
8
|
+
export default Shipment;
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
import{FunctionComponent,ReactNode
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import { Shipment } from '@commercelayer/sdk';
|
|
3
|
+
declare type ShipmentFieldChildrenProps = Omit<ShipmentFieldProps, 'children'> & {
|
|
4
|
+
shipment: Shipment;
|
|
5
|
+
};
|
|
6
|
+
export declare type ShipmentAttribute = 'number' | 'currency_code' | 'status' | 'cost_amount_cents' | 'cost_amount_float' | 'formatted_cost_amount' | 'key_number';
|
|
7
|
+
declare type ShipmentFieldProps = {
|
|
8
|
+
children?: (props: ShipmentFieldChildrenProps) => ReactNode;
|
|
9
|
+
name: ShipmentAttribute;
|
|
10
|
+
} & JSX.IntrinsicElements['span'];
|
|
11
|
+
declare const ShipmentField: FunctionComponent<ShipmentFieldProps>;
|
|
12
|
+
export default ShipmentField;
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
import React,{ReactNode}from'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
declare type ShipmentsContainerProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
};
|
|
5
|
+
declare const ShipmentsContainer: React.FunctionComponent<ShipmentsContainerProps>;
|
|
6
|
+
export default ShipmentsContainer;
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
import{FunctionComponent,ReactNode}from'react';
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
declare type Props = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
};
|
|
5
|
+
declare const ShippingAddressContainer: FunctionComponent<Props>;
|
|
6
|
+
export default ShippingAddressContainer;
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
import{FunctionComponent,ReactNode}from'react';
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
declare type ShippingAddressFormProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
reset?: boolean;
|
|
5
|
+
errorClassName?: string;
|
|
6
|
+
} & Omit<JSX.IntrinsicElements['form'], 'onSubmit'>;
|
|
7
|
+
declare const ShippingAddressForm: FunctionComponent<ShippingAddressFormProps>;
|
|
8
|
+
export default ShippingAddressForm;
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
import{FunctionComponent}from'react';
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { BaseAmountComponent } from '../typings/index';
|
|
3
|
+
declare const ShippingAmount: FunctionComponent<BaseAmountComponent>;
|
|
4
|
+
export default ShippingAmount;
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
import{FunctionComponent,ReactNode}from'react';
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
declare type ShippingMethodProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
readonly?: boolean;
|
|
5
|
+
emptyText?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const ShippingMethod: FunctionComponent<ShippingMethodProps>;
|
|
8
|
+
export default ShippingMethod;
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
import{FunctionComponent,ReactNode
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import { ShippingMethod } from '@commercelayer/sdk';
|
|
3
|
+
declare type LineItemNameChildrenProps = Omit<LineItemNameProps, 'children'> & {
|
|
4
|
+
label: string;
|
|
5
|
+
shippingMethod: ShippingMethod;
|
|
6
|
+
};
|
|
7
|
+
declare type LineItemNameProps = {
|
|
8
|
+
children?: (props: LineItemNameChildrenProps) => ReactNode;
|
|
9
|
+
} & JSX.IntrinsicElements['label'];
|
|
10
|
+
declare const ShippingMethodName: FunctionComponent<LineItemNameProps>;
|
|
11
|
+
export default ShippingMethodName;
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
import{FunctionComponent}from'react';
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { BaseAmountComponent } from '../typings/index';
|
|
3
|
+
export declare type ShippingMethodPriceProps = BaseAmountComponent & {
|
|
4
|
+
labelFreeOver?: string;
|
|
5
|
+
} & ({
|
|
6
|
+
type?: 'amount';
|
|
7
|
+
base?: 'freeOver';
|
|
8
|
+
} | {
|
|
9
|
+
type?: 'amount' | 'amountForShipment';
|
|
10
|
+
base?: 'price';
|
|
11
|
+
});
|
|
12
|
+
declare const ShippingMethodPrice: FunctionComponent<ShippingMethodPriceProps>;
|
|
13
|
+
export default ShippingMethodPrice;
|