@commercelayer/react-components 3.13.0-beta.1 → 3.13.0-beta.4

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.
Files changed (215) hide show
  1. package/lib/components/AddToCartButton.d.ts +27 -1
  2. package/lib/components/Address.d.ts +13 -1
  3. package/lib/components/AddressCountrySelector.d.ts +9 -1
  4. package/lib/components/AddressField.d.ts +15 -1
  5. package/lib/components/AddressInput.d.ts +7 -1
  6. package/lib/components/AddressStateSelector.d.ts +11 -1
  7. package/lib/components/AddressesContainer.d.ts +8 -1
  8. package/lib/components/AdjustmentAmount.d.ts +4 -1
  9. package/lib/components/AdyenPayment.d.ts +25 -1
  10. package/lib/components/AvailabilityContainer.d.ts +7 -1
  11. package/lib/components/AvailabilityTemplate.d.ts +15 -1
  12. package/lib/components/BillingAddressContainer.d.ts +6 -1
  13. package/lib/components/BillingAddressForm.d.ts +8 -1
  14. package/lib/components/BraintreePayment.d.ts +30 -1
  15. package/lib/components/CheckoutComPayment.d.ts +23 -1
  16. package/lib/components/CheckoutLink.d.ts +13 -1
  17. package/lib/components/CommerceLayer.d.ts +8 -1
  18. package/lib/components/CustomerContainer.d.ts +7 -1
  19. package/lib/components/CustomerInput.d.ts +11 -1
  20. package/lib/components/DeliveryLeadTime.d.ts +10 -1
  21. package/lib/components/DiscountAmount.d.ts +4 -1
  22. package/lib/components/Errors.d.ts +5 -1
  23. package/lib/components/ExternalFunction.d.ts +7 -1
  24. package/lib/components/GiftCard.d.ts +8 -1
  25. package/lib/components/GiftCardAmount.d.ts +4 -1
  26. package/lib/components/GiftCardContainer.d.ts +6 -1
  27. package/lib/components/GiftCardCurrencySelector.d.ts +7 -1
  28. package/lib/components/GiftCardInput.d.ts +7 -1
  29. package/lib/components/GiftCardOrCouponCode.d.ts +17 -1
  30. package/lib/components/GiftCardOrCouponCode.js +1 -1
  31. package/lib/components/GiftCardOrCouponForm.d.ts +10 -1
  32. package/lib/components/GiftCardOrCouponInput.d.ts +10 -1
  33. package/lib/components/GiftCardOrCouponRemoveButton.d.ts +18 -1
  34. package/lib/components/GiftCardOrCouponSubmit.d.ts +9 -1
  35. package/lib/components/ItemContainer.d.ts +11 -1
  36. package/lib/components/KlarnaPayment.d.ts +9 -1
  37. package/lib/components/LineItem.d.ts +8 -1
  38. package/lib/components/LineItem.js +1 -1
  39. package/lib/components/LineItemAmount.d.ts +7 -1
  40. package/lib/components/LineItemCode.d.ts +12 -1
  41. package/lib/components/LineItemImage.d.ts +16 -1
  42. package/lib/components/LineItemImage.js +1 -1
  43. package/lib/components/LineItemName.d.ts +11 -1
  44. package/lib/components/LineItemOption.d.ts +19 -1
  45. package/lib/components/LineItemOptions.d.ts +16 -1
  46. package/lib/components/LineItemQuantity.d.ts +14 -1
  47. package/lib/components/LineItemRemoveLink.d.ts +12 -1
  48. package/lib/components/LineItemsContainer.d.ts +8 -1
  49. package/lib/components/LineItemsCount.d.ts +12 -1
  50. package/lib/components/LineItemsEmpty.d.ts +12 -1
  51. package/lib/components/MetadataInput.d.ts +5 -1
  52. package/lib/components/OrderContainer.d.ts +12 -1
  53. package/lib/components/OrderNumber.d.ts +5 -1
  54. package/lib/components/OrderStorage.d.ts +8 -1
  55. package/lib/components/PaymentGateway.d.ts +16 -1
  56. package/lib/components/PaymentMethod.d.ts +16 -1
  57. package/lib/components/PaymentMethodAmount.d.ts +4 -1
  58. package/lib/components/PaymentMethodName.d.ts +9 -1
  59. package/lib/components/PaymentMethodPrice.d.ts +9 -1
  60. package/lib/components/PaymentMethodRadioButton.d.ts +12 -1
  61. package/lib/components/PaymentMethodsContainer.d.ts +8 -1
  62. package/lib/components/PaymentSource.d.ts +19 -1
  63. package/lib/components/PaymentSourceBrandIcon.d.ts +15 -1
  64. package/lib/components/PaymentSourceBrandName.d.ts +12 -1
  65. package/lib/components/PaymentSourceDetail.d.ts +12 -1
  66. package/lib/components/PaymentSourceEditButton.d.ts +9 -1
  67. package/lib/components/PaypalPayment.d.ts +12 -1
  68. package/lib/components/PlaceOrderButton.d.ts +14 -1
  69. package/lib/components/PlaceOrderContainer.d.ts +8 -1
  70. package/lib/components/Price.d.ts +16 -1
  71. package/lib/components/PricesContainer.d.ts +11 -1
  72. package/lib/components/PrivacyAndTermsCheckbox.d.ts +4 -1
  73. package/lib/components/QuantitySelector.d.ts +17 -1
  74. package/lib/components/SaveAddressesButton.d.ts +10 -1
  75. package/lib/components/SaveCustomerButton.d.ts +13 -1
  76. package/lib/components/Shipment.d.ts +15 -1
  77. package/lib/components/Shipment.js +1 -1
  78. package/lib/components/ShipmentField.d.ts +12 -1
  79. package/lib/components/ShipmentsContainer.d.ts +6 -1
  80. package/lib/components/ShipmentsContainer.js +1 -1
  81. package/lib/components/ShippingAddressContainer.d.ts +6 -1
  82. package/lib/components/ShippingAddressForm.d.ts +8 -1
  83. package/lib/components/ShippingAmount.d.ts +4 -1
  84. package/lib/components/ShippingMethod.d.ts +8 -1
  85. package/lib/components/ShippingMethodName.d.ts +11 -1
  86. package/lib/components/ShippingMethodPrice.d.ts +13 -1
  87. package/lib/components/ShippingMethodRadioButton.d.ts +13 -1
  88. package/lib/components/ShippingMethodRadioButton.js +1 -1
  89. package/lib/components/SkuField.d.ts +9 -1
  90. package/lib/components/SkuList.d.ts +7 -1
  91. package/lib/components/SkuListsContainer.d.ts +6 -1
  92. package/lib/components/SkuOption.d.ts +7 -1
  93. package/lib/components/SkuOptionInput.d.ts +5 -1
  94. package/lib/components/SkuOptionsContainer.d.ts +7 -1
  95. package/lib/components/Skus.d.ts +11 -1
  96. package/lib/components/SkusContainer.d.ts +14 -1
  97. package/lib/components/StockTransfer.d.ts +6 -1
  98. package/lib/components/StockTransfer.js +1 -1
  99. package/lib/components/StockTransferField.d.ts +9 -1
  100. package/lib/components/StripePayment.d.ts +18 -1
  101. package/lib/components/SubTotalAmount.d.ts +4 -1
  102. package/lib/components/SubmitButton.d.ts +9 -1
  103. package/lib/components/TaxesAmount.d.ts +4 -1
  104. package/lib/components/TotalAmount.d.ts +4 -1
  105. package/lib/components/VariantSelector.d.ts +29 -1
  106. package/lib/components/VariantsContainer.d.ts +8 -1
  107. package/lib/components/WireTransferPayment.d.ts +10 -1
  108. package/lib/components/gateways/AdyenGateway.d.ts +4 -1
  109. package/lib/components/gateways/BraintreeGateway.d.ts +4 -1
  110. package/lib/components/gateways/CheckoutComGateway.d.ts +4 -1
  111. package/lib/components/gateways/KlarnaGateway.d.ts +4 -1
  112. package/lib/components/gateways/PaypalGateway.d.ts +4 -1
  113. package/lib/components/gateways/StripeGateway.d.ts +4 -1
  114. package/lib/components/gateways/WireTransferGateway.d.ts +4 -1
  115. package/lib/components/utils/AddressCardsTemplate.d.ts +26 -1
  116. package/lib/components/utils/BaseField.d.ts +8 -1
  117. package/lib/components/utils/BaseInput.d.ts +5 -1
  118. package/lib/components/utils/BaseInput.js +1 -1
  119. package/lib/components/utils/BaseOrderPrice.d.ts +6 -1
  120. package/lib/components/utils/BaseSelect.d.ts +5 -1
  121. package/lib/components/utils/GenericFieldComponent.d.ts +37 -1
  122. package/lib/components/utils/GenericFieldComponent.js +1 -1
  123. package/lib/components/utils/Parent.d.ts +6 -1
  124. package/lib/components/utils/Parent.js +1 -1
  125. package/lib/components/utils/PaymentCardsTemplate.d.ts +22 -1
  126. package/lib/components/utils/PriceTemplate.d.ts +8 -1
  127. package/lib/components/utils/VariantTemplate.d.ts +36 -1
  128. package/lib/components/utils/getAllErrors.d.ts +17 -1
  129. package/lib/config/components.d.ts +913 -1
  130. package/lib/config/currency.d.ts +5 -1
  131. package/lib/context/AddressChildrenContext.d.ts +6 -1
  132. package/lib/context/AddressContext.d.ts +16 -1
  133. package/lib/context/AvailabilityContext.d.ts +2 -1
  134. package/lib/context/BillingAddressContext.d.ts +11 -1
  135. package/lib/context/BillingAddressFormContext.d.ts +19 -1
  136. package/lib/context/CommerceLayerContext.d.ts +6 -1
  137. package/lib/context/CouponAndGiftCardFormContext.d.ts +9 -1
  138. package/lib/context/CustomerContext.d.ts +15 -1
  139. package/lib/context/ExternalFunctionContext.d.ts +11 -1
  140. package/lib/context/GiftCardContext.d.ts +10 -1
  141. package/lib/context/ItemContext.d.ts +12 -1
  142. package/lib/context/LineItemChildrenContext.d.ts +8 -1
  143. package/lib/context/LineItemContext.d.ts +7 -1
  144. package/lib/context/LineItemOptionChildrenContext.d.ts +7 -1
  145. package/lib/context/OrderContext.d.ts +29 -1
  146. package/lib/context/OrderStorageContext.d.ts +10 -1
  147. package/lib/context/PaymentMethodChildrenContext.d.ts +9 -1
  148. package/lib/context/PaymentMethodContext.d.ts +22 -1
  149. package/lib/context/PaymentSourceContext.d.ts +13 -1
  150. package/lib/context/PlaceOrderContext.d.ts +17 -1
  151. package/lib/context/PricesContext.d.ts +6 -1
  152. package/lib/context/ShipmentChildrenContext.d.ts +12 -1
  153. package/lib/context/ShipmentContext.d.ts +11 -1
  154. package/lib/context/ShippingAddressContext.d.ts +9 -1
  155. package/lib/context/ShippingAddressFormContext.d.ts +3 -1
  156. package/lib/context/ShippingMethodChildrenContext.d.ts +9 -1
  157. package/lib/context/SkuChildrenContext.d.ts +8 -1
  158. package/lib/context/SkuContext.d.ts +8 -1
  159. package/lib/context/SkuListsContext.d.ts +5 -1
  160. package/lib/context/SkuOptionChildrenContext.d.ts +7 -1
  161. package/lib/context/SkuOptionsContext.d.ts +2 -1
  162. package/lib/context/StockTransferChildrenContext.d.ts +6 -1
  163. package/lib/context/VariantsContext.d.ts +2 -1
  164. package/lib/index.d.ts +102 -1
  165. package/lib/reducers/AddressReducer.d.ts +59 -1
  166. package/lib/reducers/AvailabilityReducer.d.ts +61 -1
  167. package/lib/reducers/BillingAddressReducer.d.ts +31 -1
  168. package/lib/reducers/CustomerReducer.d.ts +50 -1
  169. package/lib/reducers/GiftCardReducer.d.ts +76 -1
  170. package/lib/reducers/ItemReducer.d.ts +69 -1
  171. package/lib/reducers/LineItemReducer.d.ts +52 -1
  172. package/lib/reducers/OrderReducer.d.ts +132 -2
  173. package/lib/reducers/PaymentMethodReducer.d.ts +151 -1
  174. package/lib/reducers/PlaceOrderReducer.d.ts +59 -1
  175. package/lib/reducers/PriceReducer.d.ts +44 -1
  176. package/lib/reducers/ShipmentReducer.d.ts +40 -1
  177. package/lib/reducers/ShippingAddressReducer.d.ts +32 -1
  178. package/lib/reducers/SkuListsReducer.d.ts +21 -1
  179. package/lib/reducers/SkuOptionsReducer.d.ts +26 -1
  180. package/lib/reducers/SkuReducer.d.ts +21 -1
  181. package/lib/reducers/VariantReducer.d.ts +71 -1
  182. package/lib/typings/errors.d.ts +42 -1
  183. package/lib/typings/index.d.ts +137 -1
  184. package/lib/utils/PropsType.d.ts +33 -1
  185. package/lib/utils/addressesManager.d.ts +28 -1
  186. package/lib/utils/baseReducer.d.ts +3 -1
  187. package/lib/utils/browserInfo.d.ts +9 -1
  188. package/lib/utils/checkIncludeResource.d.ts +8 -1
  189. package/lib/utils/childrenTypes.d.ts +9 -1
  190. package/lib/utils/compareObjAttribute.d.ts +7 -1
  191. package/lib/utils/countryStateCity.d.ts +9 -1
  192. package/lib/utils/customMessages.d.ts +8 -1
  193. package/lib/utils/customerOrderOptions.d.ts +3 -1
  194. package/lib/utils/getAmount.d.ts +9 -1
  195. package/lib/utils/getCardDetails.d.ts +15 -1
  196. package/lib/utils/getCurrentItemKey.d.ts +6 -1
  197. package/lib/utils/getErrors.d.ts +11 -1
  198. package/lib/utils/getLineItemsCount.d.ts +12 -1
  199. package/lib/utils/getLoaderComponent.d.ts +2 -1
  200. package/lib/utils/getPrices.d.ts +17 -1
  201. package/lib/utils/getSdk.d.ts +3 -1
  202. package/lib/utils/getSkus.d.ts +3 -1
  203. package/lib/utils/hooks/useExternalScript.d.ts +1 -1
  204. package/lib/utils/isEmptyStates.d.ts +1 -1
  205. package/lib/utils/isJSON.d.ts +1 -1
  206. package/lib/utils/jwt.d.ts +27 -1
  207. package/lib/utils/localStorage.d.ts +17 -1
  208. package/lib/utils/organization.d.ts +6 -1
  209. package/lib/utils/paypalPayment.d.ts +3 -1
  210. package/lib/utils/placeholderImages.d.ts +2 -0
  211. package/lib/utils/placeholderImages.js +1 -0
  212. package/lib/utils/promisify.d.ts +1 -1
  213. package/lib/utils/shipments.d.ts +3 -1
  214. package/lib/utils/validateFormFields.d.ts +22 -1
  215. package/package.json +2 -2
@@ -1 +1,27 @@
1
- import React,{PropsWithoutRef,ReactNode}from'react';import{FunctionChildren}from'../typings/index';import{AddToCartReturn}from'../reducers/OrderReducer';import{VariantOption}from'./VariantSelector';declare type ChildrenProps={handleClick:()=>AddToCartReturn;}&Omit<AddToCartButtonProps,'children'>;declare type AddToCartButtonChildrenProps=FunctionChildren<ChildrenProps>;export declare type AddToCartButtonType=ChildrenProps;declare type BuyNowMode={buyNowMode:true;checkoutUrl?:string;}|{buyNowMode?:false;checkoutUrl?:never;};declare type AddToCartButtonProps={children?:AddToCartButtonChildrenProps;label?:string|ReactNode;skuCode?:string;bundleCode?:string;disabled?:boolean;skuListId?:string;lineItem?:VariantOption['lineItem'];}&BuyNowMode&PropsWithoutRef<JSX.IntrinsicElements['button']>;declare const AddToCartButton:React.FunctionComponent<AddToCartButtonProps>;export default AddToCartButton;
1
+ import React, { PropsWithoutRef, ReactNode } from 'react';
2
+ import { FunctionChildren } from '../typings/index';
3
+ import { AddToCartReturn } from '../reducers/OrderReducer';
4
+ import { VariantOption } from './VariantSelector';
5
+ declare type ChildrenProps = {
6
+ handleClick: () => AddToCartReturn;
7
+ } & Omit<AddToCartButtonProps, 'children'>;
8
+ declare type AddToCartButtonChildrenProps = FunctionChildren<ChildrenProps>;
9
+ export declare type AddToCartButtonType = ChildrenProps;
10
+ declare type BuyNowMode = {
11
+ buyNowMode: true;
12
+ checkoutUrl?: string;
13
+ } | {
14
+ buyNowMode?: false;
15
+ checkoutUrl?: never;
16
+ };
17
+ declare type AddToCartButtonProps = {
18
+ children?: AddToCartButtonChildrenProps;
19
+ label?: string | ReactNode;
20
+ skuCode?: string;
21
+ bundleCode?: string;
22
+ disabled?: boolean;
23
+ skuListId?: string;
24
+ lineItem?: VariantOption['lineItem'];
25
+ } & BuyNowMode & PropsWithoutRef<JSX.IntrinsicElements['button']>;
26
+ declare const AddToCartButton: React.FunctionComponent<AddToCartButtonProps>;
27
+ export default AddToCartButton;
@@ -1 +1,13 @@
1
- import{FunctionComponent,ReactNode}from'react';import{Address as AddressType}from'@commercelayer/sdk';import{AddressCardsTemplateChildren}from'./utils/AddressCardsTemplate';declare type Props={children:ReactNode|AddressCardsTemplateChildren;selectedClassName?:string;disabledClassName?:string;onSelect?:(address:AddressType)=>void;addresses?:AddressType[];deselect?:boolean;}&JSX.IntrinsicElements['div'];declare const Address:FunctionComponent<Props>;export default Address;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import { Address as AddressType } from '@commercelayer/sdk';
3
+ import { AddressCardsTemplateChildren } from './utils/AddressCardsTemplate';
4
+ declare type Props = {
5
+ children: ReactNode | AddressCardsTemplateChildren;
6
+ selectedClassName?: string;
7
+ disabledClassName?: string;
8
+ onSelect?: (address: AddressType) => void;
9
+ addresses?: AddressType[];
10
+ deselect?: boolean;
11
+ } & JSX.IntrinsicElements['div'];
12
+ declare const Address: FunctionComponent<Props>;
13
+ export default Address;
@@ -1 +1,9 @@
1
- import{FunctionComponent}from'react';import{AddressCountrySelectName,BaseSelectComponentProps}from'../typings/index';declare type AddressCountrySelectorProps=Omit<BaseSelectComponentProps,'options'|'name'>&{name:AddressCountrySelectName;required?:boolean;disabled?:boolean;}&Pick<JSX.IntrinsicElements['select'],'className'|'id'|'style'>;declare const AddressCountrySelector:FunctionComponent<AddressCountrySelectorProps>;export default AddressCountrySelector;
1
+ import { FunctionComponent } from 'react';
2
+ import { AddressCountrySelectName, BaseSelectComponentProps } from '../typings/index';
3
+ declare type AddressCountrySelectorProps = Omit<BaseSelectComponentProps, 'options' | 'name'> & {
4
+ name: AddressCountrySelectName;
5
+ required?: boolean;
6
+ disabled?: boolean;
7
+ } & Pick<JSX.IntrinsicElements['select'], 'className' | 'id' | 'style'>;
8
+ declare const AddressCountrySelector: FunctionComponent<AddressCountrySelectorProps>;
9
+ export default AddressCountrySelector;
@@ -1 +1,15 @@
1
- import{FunctionComponent,ReactNode}from'react';import{AddressFieldView}from'../reducers/AddressReducer';import{Address}from'@commercelayer/sdk';declare type AddressFieldChildrenProps=Omit<AddressFieldProps,'children'|'name'>&{address:Address;};declare type AddressFieldProps=({children?:(props:AddressFieldChildrenProps)=>ReactNode;name:AddressFieldView;}|{children:(props:AddressFieldChildrenProps)=>ReactNode;name?:AddressFieldView;})&JSX.IntrinsicElements['p'];declare const AddressField:FunctionComponent<AddressFieldProps>;export default AddressField;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import { AddressFieldView } from '../reducers/AddressReducer';
3
+ import { Address } from '@commercelayer/sdk';
4
+ declare type AddressFieldChildrenProps = Omit<AddressFieldProps, 'children' | 'name'> & {
5
+ address: Address;
6
+ };
7
+ declare type AddressFieldProps = ({
8
+ children?: (props: AddressFieldChildrenProps) => ReactNode;
9
+ name: AddressFieldView;
10
+ } | {
11
+ children: (props: AddressFieldChildrenProps) => ReactNode;
12
+ name?: AddressFieldView;
13
+ }) & JSX.IntrinsicElements['p'];
14
+ declare const AddressField: FunctionComponent<AddressFieldProps>;
15
+ export default AddressField;
@@ -1 +1,7 @@
1
- import{FunctionComponent}from'react';import{BaseInputComponentProps,AddressInputName}from'../typings/index';export declare type AddressInputProps={name:AddressInputName;}&Omit<BaseInputComponentProps,'name'>&JSX.IntrinsicElements['input']&JSX.IntrinsicElements['textarea'];declare const AddressInput:FunctionComponent<AddressInputProps>;export default AddressInput;
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseInputComponentProps, AddressInputName } from '../typings/index';
3
+ export declare type AddressInputProps = {
4
+ name: AddressInputName;
5
+ } & Omit<BaseInputComponentProps, 'name'> & JSX.IntrinsicElements['input'] & JSX.IntrinsicElements['textarea'];
6
+ declare const AddressInput: FunctionComponent<AddressInputProps>;
7
+ export default AddressInput;
@@ -1 +1,11 @@
1
- import{FunctionComponent}from'react';import{AddressStateSelectName,BaseSelectComponentProps}from'../typings/index';declare type AddressStateSelectorProps=Omit<BaseSelectComponentProps,'options'|'name'>&{name:AddressStateSelectName;required?:boolean;disabled?:boolean;inputClassName?:string;selectClassName?:string;}&Pick<JSX.IntrinsicElements['select'],'className'|'id'|'style'>;declare const AddressStateSelector:FunctionComponent<AddressStateSelectorProps>;export default AddressStateSelector;
1
+ import { FunctionComponent } from 'react';
2
+ import { AddressStateSelectName, BaseSelectComponentProps } from '../typings/index';
3
+ declare type AddressStateSelectorProps = Omit<BaseSelectComponentProps, 'options' | 'name'> & {
4
+ name: AddressStateSelectName;
5
+ required?: boolean;
6
+ disabled?: boolean;
7
+ inputClassName?: string;
8
+ selectClassName?: string;
9
+ } & Pick<JSX.IntrinsicElements['select'], 'className' | 'id' | 'style'>;
10
+ declare const AddressStateSelector: FunctionComponent<AddressStateSelectorProps>;
11
+ export default AddressStateSelector;
@@ -1 +1,8 @@
1
- import{FunctionComponent,ReactNode}from'react';export declare type AddressesContainerProps={children:ReactNode;shipToDifferentAddress?:boolean;isBusiness?:boolean;};declare const AddressesContainer:FunctionComponent<AddressesContainerProps>;export default AddressesContainer;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ export declare type AddressesContainerProps = {
3
+ children: ReactNode;
4
+ shipToDifferentAddress?: boolean;
5
+ isBusiness?: boolean;
6
+ };
7
+ declare const AddressesContainer: FunctionComponent<AddressesContainerProps>;
8
+ export default AddressesContainer;
@@ -1 +1,4 @@
1
- import{FunctionComponent}from'react';import{BaseAmountComponent}from'../typings/index';declare const AdjustmentAmount:FunctionComponent<BaseAmountComponent>;export default AdjustmentAmount;
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseAmountComponent } from '../typings/index';
3
+ declare const AdjustmentAmount: FunctionComponent<BaseAmountComponent>;
4
+ export default AdjustmentAmount;
@@ -1 +1,25 @@
1
- import{CSSProperties,FunctionComponent}from'react';import{PaymentSourceProps}from'./PaymentSource';declare type Styles=Partial<{base:CSSProperties;error:CSSProperties;placeholder:CSSProperties;validated:CSSProperties;}>;export declare type AdyenPaymentConfig={cardContainerClassName?:string;threeDSecureContainerClassName?:string;placeOrderCallback?:(response:{placed:boolean;})=>void;styles?:Styles;};declare type AdyenPaymentProps={clientKey?:string;config?:AdyenPaymentConfig;templateCustomerSaveToWallet?:PaymentSourceProps['templateCustomerSaveToWallet'];locale?:string;environment?:string;};declare const AdyenPayment:FunctionComponent<AdyenPaymentProps>;export default AdyenPayment;
1
+ import { CSSProperties, FunctionComponent } from 'react';
2
+ import { PaymentSourceProps } from './PaymentSource';
3
+ declare type Styles = Partial<{
4
+ base: CSSProperties;
5
+ error: CSSProperties;
6
+ placeholder: CSSProperties;
7
+ validated: CSSProperties;
8
+ }>;
9
+ export declare type AdyenPaymentConfig = {
10
+ cardContainerClassName?: string;
11
+ threeDSecureContainerClassName?: string;
12
+ placeOrderCallback?: (response: {
13
+ placed: boolean;
14
+ }) => void;
15
+ styles?: Styles;
16
+ };
17
+ declare type AdyenPaymentProps = {
18
+ clientKey?: string;
19
+ config?: AdyenPaymentConfig;
20
+ templateCustomerSaveToWallet?: PaymentSourceProps['templateCustomerSaveToWallet'];
21
+ locale?: string;
22
+ environment?: string;
23
+ };
24
+ declare const AdyenPayment: FunctionComponent<AdyenPaymentProps>;
25
+ export default AdyenPayment;
@@ -1 +1,7 @@
1
- import{FunctionComponent,ReactNode}from'react';declare type AvailabilityContainerProps={children:ReactNode;skuCode?:string;};declare const AvailabilityContainer:FunctionComponent<AvailabilityContainerProps>;export default AvailabilityContainer;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ declare type AvailabilityContainerProps = {
3
+ children: ReactNode;
4
+ skuCode?: string;
5
+ };
6
+ declare const AvailabilityContainer: FunctionComponent<AvailabilityContainerProps>;
7
+ export default AvailabilityContainer;
@@ -1 +1,15 @@
1
- import{FunctionComponent}from'react';import{TimeFormat,FunctionChildren}from'../typings/index';import{DeliveryLeadTime}from'../reducers/AvailabilityReducer';declare type AvailabilityTemplateChildrenProps=FunctionChildren<Omit<AvailabilityTemplateProps,'children'>&DeliveryLeadTime&{text:string;quantity:number;}>;declare type AvailabilityTemplateProps={children?:AvailabilityTemplateChildrenProps;timeFormat?:TimeFormat;showShippingMethodName?:boolean;showShippingMethodPrice?:boolean;}&JSX.IntrinsicElements['p'];declare const AvailabilityTemplate:FunctionComponent<AvailabilityTemplateProps>;export default AvailabilityTemplate;
1
+ import { FunctionComponent } from 'react';
2
+ import { TimeFormat, FunctionChildren } from '../typings/index';
3
+ import { DeliveryLeadTime } from '../reducers/AvailabilityReducer';
4
+ declare type AvailabilityTemplateChildrenProps = FunctionChildren<Omit<AvailabilityTemplateProps, 'children'> & DeliveryLeadTime & {
5
+ text: string;
6
+ quantity: number;
7
+ }>;
8
+ declare type AvailabilityTemplateProps = {
9
+ children?: AvailabilityTemplateChildrenProps;
10
+ timeFormat?: TimeFormat;
11
+ showShippingMethodName?: boolean;
12
+ showShippingMethodPrice?: boolean;
13
+ } & JSX.IntrinsicElements['p'];
14
+ declare const AvailabilityTemplate: FunctionComponent<AvailabilityTemplateProps>;
15
+ export default AvailabilityTemplate;
@@ -1 +1,6 @@
1
- import{FunctionComponent,ReactNode}from'react';declare type Props={children:ReactNode;};declare const BillingAddressContainer:FunctionComponent<Props>;export default BillingAddressContainer;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ declare type Props = {
3
+ children: ReactNode;
4
+ };
5
+ declare const BillingAddressContainer: FunctionComponent<Props>;
6
+ export default BillingAddressContainer;
@@ -1 +1,8 @@
1
- import React,{ReactNode}from'react';declare type BillingAddressFormProps={children:ReactNode;reset?:boolean;errorClassName?:string;}&Omit<JSX.IntrinsicElements['form'],'onSubmit'>;declare const BillingAddressForm:React.FunctionComponent<BillingAddressFormProps>;export default BillingAddressForm;
1
+ import React, { ReactNode } from 'react';
2
+ declare type BillingAddressFormProps = {
3
+ children: ReactNode;
4
+ reset?: boolean;
5
+ errorClassName?: string;
6
+ } & Omit<JSX.IntrinsicElements['form'], 'onSubmit'>;
7
+ declare const BillingAddressForm: React.FunctionComponent<BillingAddressFormProps>;
8
+ export default BillingAddressForm;
@@ -1 +1,30 @@
1
- import{FunctionComponent}from'react';import{HostedFieldFieldOptions}from'braintree-web/modules/hosted-fields';import{PaymentSourceProps}from'./PaymentSource';declare type BraintreeHostedFields<Type>={[Property in keyof Type]:{label?:string;}&Type[Property];};export declare type BraintreeConfig={containerClassName?:string;cardContainerClassName?:string;expDateContainerClassName?:string;fieldsContainerClassName?:string;cvvContainerClassName?:string;cardDetailsContainerClassName?:string;fieldLabelClassName?:string;inputWrapperClassName?:string;fields?:BraintreeHostedFields<HostedFieldFieldOptions>;styles?:{[key:string]:Record<string,string>;};};declare type BraintreePaymentProps={authorization:string;config?:BraintreeConfig;templateCustomerSaveToWallet?:PaymentSourceProps['templateCustomerSaveToWallet'];locale?:string;};declare const BraintreePayment:FunctionComponent<BraintreePaymentProps>;export default BraintreePayment;
1
+ import { FunctionComponent } from 'react';
2
+ import { HostedFieldFieldOptions } from 'braintree-web/modules/hosted-fields';
3
+ import { PaymentSourceProps } from './PaymentSource';
4
+ declare type BraintreeHostedFields<Type> = {
5
+ [Property in keyof Type]: {
6
+ label?: string;
7
+ } & Type[Property];
8
+ };
9
+ export declare type BraintreeConfig = {
10
+ containerClassName?: string;
11
+ cardContainerClassName?: string;
12
+ expDateContainerClassName?: string;
13
+ fieldsContainerClassName?: string;
14
+ cvvContainerClassName?: string;
15
+ cardDetailsContainerClassName?: string;
16
+ fieldLabelClassName?: string;
17
+ inputWrapperClassName?: string;
18
+ fields?: BraintreeHostedFields<HostedFieldFieldOptions>;
19
+ styles?: {
20
+ [key: string]: Record<string, string>;
21
+ };
22
+ };
23
+ declare type BraintreePaymentProps = {
24
+ authorization: string;
25
+ config?: BraintreeConfig;
26
+ templateCustomerSaveToWallet?: PaymentSourceProps['templateCustomerSaveToWallet'];
27
+ locale?: string;
28
+ };
29
+ declare const BraintreePayment: FunctionComponent<BraintreePaymentProps>;
30
+ export default BraintreePayment;
@@ -1 +1,23 @@
1
- import{FunctionComponent}from'react';import{PaymentMethodConfig}from'../reducers/PaymentMethodReducer';import{PaymentSourceProps}from'./PaymentSource';import{FramesStyle}from'frames-react';export declare type CheckoutComConfig={containerClassName?:string;hintLabel?:string;name?:string;success_url?:string;failure_url?:string;options?:{style:FramesStyle;};[key:string]:unknown;};declare type CheckoutComPaymentProps=PaymentMethodConfig['checkoutComPayment']&JSX.IntrinsicElements['div']&{show?:boolean;publicKey:string;locale?:string;templateCustomerSaveToWallet?:PaymentSourceProps['templateCustomerSaveToWallet'];};declare const CheckoutComPayment:FunctionComponent<CheckoutComPaymentProps>;export default CheckoutComPayment;
1
+ import { FunctionComponent } from 'react';
2
+ import { PaymentMethodConfig } from '../reducers/PaymentMethodReducer';
3
+ import { PaymentSourceProps } from './PaymentSource';
4
+ import { FramesStyle } from 'frames-react';
5
+ export declare type CheckoutComConfig = {
6
+ containerClassName?: string;
7
+ hintLabel?: string;
8
+ name?: string;
9
+ success_url?: string;
10
+ failure_url?: string;
11
+ options?: {
12
+ style: FramesStyle;
13
+ };
14
+ [key: string]: unknown;
15
+ };
16
+ declare type CheckoutComPaymentProps = PaymentMethodConfig['checkoutComPayment'] & JSX.IntrinsicElements['div'] & {
17
+ show?: boolean;
18
+ publicKey: string;
19
+ locale?: string;
20
+ templateCustomerSaveToWallet?: PaymentSourceProps['templateCustomerSaveToWallet'];
21
+ };
22
+ declare const CheckoutComPayment: FunctionComponent<CheckoutComPaymentProps>;
23
+ export default CheckoutComPayment;
@@ -1 +1,13 @@
1
- import{FunctionComponent}from'react';import{FunctionChildren}from'../typings/index';declare type CheckoutLinkChildrenProps=FunctionChildren<Omit<CheckoutLinkProps,'children'>&{checkoutUrl:string;href:string;}>;declare type CheckoutLinkProps={children?:CheckoutLinkChildrenProps;label?:string;hostedCheckout?:boolean;}&JSX.IntrinsicElements['a'];declare const CheckoutLink:FunctionComponent<CheckoutLinkProps>;export default CheckoutLink;
1
+ import { FunctionComponent } from 'react';
2
+ import { FunctionChildren } from '../typings/index';
3
+ declare type CheckoutLinkChildrenProps = FunctionChildren<Omit<CheckoutLinkProps, 'children'> & {
4
+ checkoutUrl: string;
5
+ href: string;
6
+ }>;
7
+ declare type CheckoutLinkProps = {
8
+ children?: CheckoutLinkChildrenProps;
9
+ label?: string;
10
+ hostedCheckout?: boolean;
11
+ } & JSX.IntrinsicElements['a'];
12
+ declare const CheckoutLink: FunctionComponent<CheckoutLinkProps>;
13
+ export default CheckoutLink;
@@ -1 +1,8 @@
1
- import{FunctionComponent,ReactNode}from'react';declare type CommerceLayerProps={children:ReactNode;accessToken:string;endpoint:string;};declare const CommerceLayer:FunctionComponent<CommerceLayerProps>;export default CommerceLayer;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ declare type CommerceLayerProps = {
3
+ children: ReactNode;
4
+ accessToken: string;
5
+ endpoint: string;
6
+ };
7
+ declare const CommerceLayer: FunctionComponent<CommerceLayerProps>;
8
+ export default CommerceLayer;
@@ -1 +1,7 @@
1
- import{FunctionComponent,ReactNode}from'react';export declare type CustomerContainer={children:ReactNode;isGuest?:boolean;};declare const CustomerContainer:FunctionComponent<CustomerContainer>;export default CustomerContainer;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ export declare type CustomerContainer = {
3
+ children: ReactNode;
4
+ isGuest?: boolean;
5
+ };
6
+ declare const CustomerContainer: FunctionComponent<CustomerContainer>;
7
+ export default CustomerContainer;
@@ -1 +1,11 @@
1
- import{FunctionComponent}from'react';import{BaseInputComponentProps}from'../typings/index';declare type CustomerInputProps={name?:'customer_email'|string;type?:'email'|string;saveOnBlur?:boolean;onBlur?:(email:string)=>void;errorClassName?:string;}&Omit<BaseInputComponentProps,'name'|'type'|'onBlur'>&JSX.IntrinsicElements['input']&JSX.IntrinsicElements['textarea'];declare const CustomerInput:FunctionComponent<CustomerInputProps>;export default CustomerInput;
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseInputComponentProps } from '../typings/index';
3
+ declare type CustomerInputProps = {
4
+ name?: 'customer_email' | string;
5
+ type?: 'email' | string;
6
+ saveOnBlur?: boolean;
7
+ onBlur?: (email: string) => void;
8
+ errorClassName?: string;
9
+ } & Omit<BaseInputComponentProps, 'name' | 'type' | 'onBlur'> & JSX.IntrinsicElements['input'] & JSX.IntrinsicElements['textarea'];
10
+ declare const CustomerInput: FunctionComponent<CustomerInputProps>;
11
+ export default CustomerInput;
@@ -1 +1,10 @@
1
- import{FunctionComponent,ReactNode}from'react';export declare type DeliveryLeadTimeField='min_hours'|'max_hours'|'min_days'|'max_days';export declare type DeliveryLeadTimeComponentChildren=Omit<ShippingMethodPriceProps,'children'>;export interface ShippingMethodPriceProps extends Partial<JSX.IntrinsicElements['span']>{children?:(props:DeliveryLeadTimeComponentChildren)=>ReactNode;type:DeliveryLeadTimeField;text?:string;}declare const DeliveryLeadTime:FunctionComponent<ShippingMethodPriceProps>;export default DeliveryLeadTime;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ export declare type DeliveryLeadTimeField = 'min_hours' | 'max_hours' | 'min_days' | 'max_days';
3
+ export declare type DeliveryLeadTimeComponentChildren = Omit<ShippingMethodPriceProps, 'children'>;
4
+ export interface ShippingMethodPriceProps extends Partial<JSX.IntrinsicElements['span']> {
5
+ children?: (props: DeliveryLeadTimeComponentChildren) => ReactNode;
6
+ type: DeliveryLeadTimeField;
7
+ text?: string;
8
+ }
9
+ declare const DeliveryLeadTime: FunctionComponent<ShippingMethodPriceProps>;
10
+ export default DeliveryLeadTime;
@@ -1 +1,4 @@
1
- import{FunctionComponent}from'react';import{BaseAmountComponent}from'../typings/index';declare const DiscountAmount:FunctionComponent<BaseAmountComponent>;export default DiscountAmount;
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseAmountComponent } from '../typings/index';
3
+ declare const DiscountAmount: FunctionComponent<BaseAmountComponent>;
4
+ export default DiscountAmount;
@@ -1 +1,5 @@
1
- import React from'react';import{ErrorComponentProps}from'../typings/errors';export declare type ErrorsProps=ErrorComponentProps&JSX.IntrinsicElements['span'];declare const Errors:React.FunctionComponent<ErrorsProps>;export default Errors;
1
+ import React from 'react';
2
+ import { ErrorComponentProps } from '../typings/errors';
3
+ export declare type ErrorsProps = ErrorComponentProps & JSX.IntrinsicElements['span'];
4
+ declare const Errors: React.FunctionComponent<ErrorsProps>;
5
+ export default Errors;
@@ -1 +1,7 @@
1
- import{FunctionComponent,ReactNode}from'react';declare type Props={children:ReactNode;url:string;};declare const ExternalFunction:FunctionComponent<Props>;export default ExternalFunction;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ declare type Props = {
3
+ children: ReactNode;
4
+ url: string;
5
+ };
6
+ declare const ExternalFunction: FunctionComponent<Props>;
7
+ export default ExternalFunction;
@@ -1 +1,8 @@
1
- import{FunctionComponent,ReactNode}from'react';import{BaseState}from'../typings/index';declare type GiftCardProps={children:ReactNode;onSubmit?:(values:BaseState)=>void;}&JSX.IntrinsicElements['form'];declare const GiftCard:FunctionComponent<GiftCardProps>;export default GiftCard;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import { BaseState } from '../typings/index';
3
+ declare type GiftCardProps = {
4
+ children: ReactNode;
5
+ onSubmit?: (values: BaseState) => void;
6
+ } & JSX.IntrinsicElements['form'];
7
+ declare const GiftCard: FunctionComponent<GiftCardProps>;
8
+ export default GiftCard;
@@ -1 +1,4 @@
1
- import{FunctionComponent}from'react';import{BaseAmountComponent}from'../typings/index';declare const GiftCardAmount:FunctionComponent<BaseAmountComponent>;export default GiftCardAmount;
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseAmountComponent } from '../typings/index';
3
+ declare const GiftCardAmount: FunctionComponent<BaseAmountComponent>;
4
+ export default GiftCardAmount;
@@ -1 +1,6 @@
1
- import{FunctionComponent,ReactNode}from'react';export declare type GiftCardContainer={children:ReactNode;};declare const GiftCardContainer:FunctionComponent<GiftCardContainer>;export default GiftCardContainer;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ export declare type GiftCardContainer = {
3
+ children: ReactNode;
4
+ };
5
+ declare const GiftCardContainer: FunctionComponent<GiftCardContainer>;
6
+ export default GiftCardContainer;
@@ -1 +1,7 @@
1
- import{FunctionComponent}from'react';import{BaseSelectComponentProps}from'../typings/index';declare type GiftCardCurrencySelectorProps=Omit<BaseSelectComponentProps,'options'|'name'>&{required?:boolean;}&Pick<JSX.IntrinsicElements['select'],'className'|'id'|'style'>;declare const GiftCardCurrencySelector:FunctionComponent<GiftCardCurrencySelectorProps>;export default GiftCardCurrencySelector;
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseSelectComponentProps } from '../typings/index';
3
+ declare type GiftCardCurrencySelectorProps = Omit<BaseSelectComponentProps, 'options' | 'name'> & {
4
+ required?: boolean;
5
+ } & Pick<JSX.IntrinsicElements['select'], 'className' | 'id' | 'style'>;
6
+ declare const GiftCardCurrencySelector: FunctionComponent<GiftCardCurrencySelectorProps>;
7
+ export default GiftCardCurrencySelector;
@@ -1 +1,7 @@
1
- import{FunctionComponent}from'react';import{BaseInputComponentProps,GiftCardInputName}from'../typings/index';export declare type GiftCardInputProps={name:GiftCardInputName;}&Omit<BaseInputComponentProps,'name'>&JSX.IntrinsicElements['input']&JSX.IntrinsicElements['textarea'];declare const GiftCardInput:FunctionComponent<GiftCardInputProps>;export default GiftCardInput;
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseInputComponentProps, GiftCardInputName } from '../typings/index';
3
+ export declare type GiftCardInputProps = {
4
+ name: GiftCardInputName;
5
+ } & Omit<BaseInputComponentProps, 'name'> & JSX.IntrinsicElements['input'] & JSX.IntrinsicElements['textarea'];
6
+ declare const GiftCardInput: FunctionComponent<GiftCardInputProps>;
7
+ export default GiftCardInput;
@@ -1 +1,17 @@
1
- import{FunctionComponent}from'react';import{FunctionChildren}from'../typings/index';import{CodeType}from'../reducers/OrderReducer';declare type GiftCardOrCouponCodeChildrenProps=FunctionChildren<Omit<GiftCardOrCouponCodeProps,'children'>&{code?:string;hide?:boolean;}>;declare type GiftCardOrCouponCodeProps={type?:CodeType;children?:GiftCardOrCouponCodeChildrenProps;}&JSX.IntrinsicElements['span'];declare const GiftCardOrCouponCode:FunctionComponent<GiftCardOrCouponCodeProps>;export default GiftCardOrCouponCode;
1
+ import { FunctionComponent } from 'react';
2
+ import { FunctionChildren } from '../typings/index';
3
+ import { CodeType } from '../reducers/OrderReducer';
4
+ declare type ChildrenProps = Omit<GiftCardOrCouponCodeProps, 'children'> & {
5
+ code?: string;
6
+ hide?: boolean;
7
+ discountAmountCents?: string;
8
+ discountAmountFloat?: string;
9
+ formattedDiscountAmount?: string;
10
+ };
11
+ declare type GiftCardOrCouponCodeChildrenProps = FunctionChildren<ChildrenProps>;
12
+ declare type GiftCardOrCouponCodeProps = {
13
+ type?: CodeType;
14
+ children?: GiftCardOrCouponCodeChildrenProps;
15
+ } & JSX.IntrinsicElements['span'];
16
+ declare const GiftCardOrCouponCode: FunctionComponent<GiftCardOrCouponCodeProps>;
17
+ export default GiftCardOrCouponCode;
@@ -1 +1 @@
1
- import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import components from"../config/components";import Parent from"./utils/Parent";import OrderContext from"../context/OrderContext";import{has,isEmpty}from"lodash";const propTypes=components.GiftCardOrCouponCode.propTypes,displayName=components.GiftCardOrCouponCode.displayName,GiftCardOrCouponCode=_a=>{var{children,type}=_a,props=__rest(_a,["children","type"]);const{order}=useContext(OrderContext);let codeType=type&&`${type}_code`;!type&&order&&has(order,"coupon_code")&&!isEmpty(order.coupon_code)?codeType="coupon_code":type||(codeType="gift_card_code");const code=order&&codeType?order[codeType]:"",hide=!(order&&code),parentProps=Object.assign(Object.assign({},props),{code,hide});return children?_jsx(Parent,Object.assign({},parentProps,{children})):hide?null:_jsx("span",Object.assign({},props,{children:code}))};GiftCardOrCouponCode.propTypes=propTypes,GiftCardOrCouponCode.displayName=displayName;export default GiftCardOrCouponCode;
1
+ import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import components from"../config/components";import Parent from"./utils/Parent";import OrderContext from"../context/OrderContext";import has from"lodash/has";import isEmpty from"lodash/isEmpty";const propTypes=components.GiftCardOrCouponCode.propTypes,displayName=components.GiftCardOrCouponCode.displayName,GiftCardOrCouponCode=_a=>{var{children,type}=_a,props=__rest(_a,["children","type"]);const{order}=useContext(OrderContext);let codeType=type&&`${type}_code`;!type&&order&&has(order,"coupon_code")&&!isEmpty(order.coupon_code)?codeType="coupon_code":type||(codeType="gift_card_code");const code=order&&codeType?order[codeType]:"",hide=!(order&&code),parentProps=Object.assign(Object.assign({},props),{code,hide,discountAmountCents:order==null?void 0:order.discount_amount_cents,discountAmountFloat:order==null?void 0:order.discount_amount_float,formattedDiscountAmount:order==null?void 0:order.formatted_discount_amount});return children?_jsx(Parent,Object.assign({},parentProps,{children})):hide?null:_jsx("span",Object.assign({},props,{children:code}))};GiftCardOrCouponCode.propTypes=propTypes,GiftCardOrCouponCode.displayName=displayName;export default GiftCardOrCouponCode;
@@ -1 +1,10 @@
1
- import{FunctionComponent,ReactNode}from'react';declare type GiftCardOrCouponFormProps={children:ReactNode;onSubmit?:(response:{success:boolean;value:string;})=>void;}&Omit<JSX.IntrinsicElements['form'],'onSubmit'>;declare const GiftCardOrCouponForm:FunctionComponent<GiftCardOrCouponFormProps>;export default GiftCardOrCouponForm;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ declare type GiftCardOrCouponFormProps = {
3
+ children: ReactNode;
4
+ onSubmit?: (response: {
5
+ success: boolean;
6
+ value: string;
7
+ }) => void;
8
+ } & Omit<JSX.IntrinsicElements['form'], 'onSubmit'>;
9
+ declare const GiftCardOrCouponForm: FunctionComponent<GiftCardOrCouponFormProps>;
10
+ export default GiftCardOrCouponForm;
@@ -1 +1,10 @@
1
- import React from'react';import{BaseInputComponentProps}from'../typings/index';import{OrderCodeType}from'../reducers/OrderReducer';export declare type GiftCardOrCouponInputProps={name?:'gift_card_or_coupon_code';type?:'text';placeholderTranslation?:(codeType:OrderCodeType)=>string;}&Omit<BaseInputComponentProps,'name'|'type'>&JSX.IntrinsicElements['input']&JSX.IntrinsicElements['textarea'];declare const GiftCardOrCouponInput:React.FunctionComponent<GiftCardOrCouponInputProps>;export default GiftCardOrCouponInput;
1
+ import React from 'react';
2
+ import { BaseInputComponentProps } from '../typings/index';
3
+ import { OrderCodeType } from '../reducers/OrderReducer';
4
+ export declare type GiftCardOrCouponInputProps = {
5
+ name?: 'gift_card_or_coupon_code';
6
+ type?: 'text';
7
+ placeholderTranslation?: (codeType: OrderCodeType) => string;
8
+ } & Omit<BaseInputComponentProps, 'name' | 'type'> & JSX.IntrinsicElements['input'] & JSX.IntrinsicElements['textarea'];
9
+ declare const GiftCardOrCouponInput: React.FunctionComponent<GiftCardOrCouponInputProps>;
10
+ export default GiftCardOrCouponInput;
@@ -1 +1,18 @@
1
- import{FunctionComponent,ReactNode}from'react';import{FunctionChildren}from'../typings/index';import{CodeType,OrderCodeType}from'../reducers/OrderReducer';declare type GiftCardOrCouponRemoveButtonChildrenProps=FunctionChildren<Omit<GiftCardOrCouponRemoveButtonProps,'children'>&{codeType?:OrderCodeType;hide?:boolean;handleClick?:()=>void;}>;declare type GiftCardOrCouponRemoveButtonProps={type?:CodeType;children?:GiftCardOrCouponRemoveButtonChildrenProps;label?:string|ReactNode;onClick?:(response:{success:boolean;})=>void;}&Omit<JSX.IntrinsicElements['button'],'type'>;declare const GiftCardOrCouponRemoveButton:FunctionComponent<GiftCardOrCouponRemoveButtonProps>;export default GiftCardOrCouponRemoveButton;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import { FunctionChildren } from '../typings/index';
3
+ import { CodeType, OrderCodeType } from '../reducers/OrderReducer';
4
+ declare type GiftCardOrCouponRemoveButtonChildrenProps = FunctionChildren<Omit<GiftCardOrCouponRemoveButtonProps, 'children'> & {
5
+ codeType?: OrderCodeType;
6
+ hide?: boolean;
7
+ handleClick?: () => void;
8
+ }>;
9
+ declare type GiftCardOrCouponRemoveButtonProps = {
10
+ type?: CodeType;
11
+ children?: GiftCardOrCouponRemoveButtonChildrenProps;
12
+ label?: string | ReactNode;
13
+ onClick?: (response: {
14
+ success: boolean;
15
+ }) => void;
16
+ } & Omit<JSX.IntrinsicElements['button'], 'type'>;
17
+ declare const GiftCardOrCouponRemoveButton: FunctionComponent<GiftCardOrCouponRemoveButtonProps>;
18
+ export default GiftCardOrCouponRemoveButton;
@@ -1 +1,9 @@
1
- import{FunctionComponent,ReactNode}from'react';import{FunctionChildren}from'../typings/index';declare type GiftCardOrCouponSubmitChildrenProps=FunctionChildren<Omit<GiftCardOrCouponSubmitProps,'children'>>;declare type GiftCardOrCouponSubmitProps={children?:GiftCardOrCouponSubmitChildrenProps;label?:string|ReactNode;}&JSX.IntrinsicElements['button'];declare const GiftCardOrCouponSubmit:FunctionComponent<GiftCardOrCouponSubmitProps>;export default GiftCardOrCouponSubmit;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import { FunctionChildren } from '../typings/index';
3
+ declare type GiftCardOrCouponSubmitChildrenProps = FunctionChildren<Omit<GiftCardOrCouponSubmitProps, 'children'>>;
4
+ declare type GiftCardOrCouponSubmitProps = {
5
+ children?: GiftCardOrCouponSubmitChildrenProps;
6
+ label?: string | ReactNode;
7
+ } & JSX.IntrinsicElements['button'];
8
+ declare const GiftCardOrCouponSubmit: FunctionComponent<GiftCardOrCouponSubmitProps>;
9
+ export default GiftCardOrCouponSubmit;
@@ -1 +1,11 @@
1
- import React,{ReactNode}from'react';declare type ItemContainerProps={children:ReactNode;skuCode?:string|null;lineItem?:{name:string;imageUrl?:string|null;}|null;};declare const ItemContainer:React.FunctionComponent<ItemContainerProps>;export default ItemContainer;
1
+ import React, { ReactNode } from 'react';
2
+ declare type ItemContainerProps = {
3
+ children: ReactNode;
4
+ skuCode?: string | null;
5
+ lineItem?: {
6
+ name: string;
7
+ imageUrl?: string | null;
8
+ } | null;
9
+ };
10
+ declare const ItemContainer: React.FunctionComponent<ItemContainerProps>;
11
+ export default ItemContainer;
@@ -1,2 +1,10 @@
1
1
  /// <reference types="react" />
2
- import{PaymentMethodConfig}from'../reducers/PaymentMethodReducer';import{PaymentSourceProps}from'./PaymentSource';declare type KlarnaPaymentProps=PaymentMethodConfig['klarnaPayment']&JSX.IntrinsicElements['div']&Partial<PaymentSourceProps['templateCustomerSaveToWallet']>&{show?:boolean;clientToken:string;locale?:string;};export default function KlarnaPayment({clientToken,placeOrderCallback,locale,...p}:KlarnaPaymentProps):JSX.Element;export{};
2
+ import { PaymentMethodConfig } from '../reducers/PaymentMethodReducer';
3
+ import { PaymentSourceProps } from './PaymentSource';
4
+ declare type KlarnaPaymentProps = PaymentMethodConfig['klarnaPayment'] & JSX.IntrinsicElements['div'] & Partial<PaymentSourceProps['templateCustomerSaveToWallet']> & {
5
+ show?: boolean;
6
+ clientToken: string;
7
+ locale?: string;
8
+ };
9
+ export default function KlarnaPayment({ clientToken, placeOrderCallback, locale, ...p }: KlarnaPaymentProps): JSX.Element;
10
+ export {};
@@ -1 +1,8 @@
1
- import{ReactNode,FunctionComponent}from'react';import{LineItemType}from'../typings/index';declare type LineItemProps={children:ReactNode;type?:LineItemType;};declare const LineItem:FunctionComponent<LineItemProps>;export default LineItem;
1
+ import { ReactNode, FunctionComponent } from 'react';
2
+ import { LineItemType } from '../typings/index';
3
+ declare type LineItemProps = {
4
+ children: ReactNode;
5
+ type?: LineItemType;
6
+ };
7
+ declare const LineItem: FunctionComponent<LineItemProps>;
8
+ export default LineItem;
@@ -1 +1 @@
1
- import{jsx as _jsx,Fragment as _Fragment}from"react/jsx-runtime";import{useContext}from"react";import LineItemContext from"../context/LineItemContext";import LineItemChildrenContext from"../context/LineItemChildrenContext";import components from"../config/components";import ShipmentChildrenContext from"../context/ShipmentChildrenContext";const propTypes=components.LineItem.propTypes,displayName=components.LineItem.displayName,LineItem=props=>{const{type="skus",children}=props,{lineItems}=useContext(LineItemContext),{lineItems:shipmentLineItems}=useContext(ShipmentChildrenContext),items=shipmentLineItems&&(shipmentLineItems==null?void 0:shipmentLineItems.length)>0?shipmentLineItems:lineItems,components2=items&&items.filter(l=>l.item_type===type&&(l==null?void 0:l.total_amount_cents)&&l.total_amount_cents>=0).map((lineItem,k,check)=>{if(lineItem.item_type==="bundles"&&k>0&&check[k-1].bundle_code===lineItem.bundle_code)return null;const lineProps={lineItem};return _jsx(LineItemChildrenContext.Provider,Object.assign({value:lineProps},{children}),k)});return _jsx(_Fragment,{children:components2})};LineItem.propTypes=propTypes,LineItem.displayName=displayName;export default LineItem;
1
+ import{jsx as _jsx,Fragment as _Fragment}from"react/jsx-runtime";import{useContext}from"react";import LineItemContext from"../context/LineItemContext";import LineItemChildrenContext from"../context/LineItemChildrenContext";import components from"../config/components";import ShipmentChildrenContext from"../context/ShipmentChildrenContext";const propTypes=components.LineItem.propTypes,displayName=components.LineItem.displayName,LineItem=props=>{const{type="skus",children}=props,{lineItems}=useContext(LineItemContext),{lineItems:shipmentLineItems}=useContext(ShipmentChildrenContext),items=shipmentLineItems&&(shipmentLineItems==null?void 0:shipmentLineItems.length)>0?shipmentLineItems:lineItems,components2=items&&items.filter(l=>l.item_type===type).map((lineItem,k,check)=>{if(lineItem.item_type==="bundles"&&k>0&&check[k-1].bundle_code===lineItem.bundle_code||lineItem.item_type==="gift_cards"&&(lineItem==null?void 0:lineItem.total_amount_cents)&&(lineItem==null?void 0:lineItem.total_amount_cents)<=0)return null;const lineProps={lineItem};return _jsx(LineItemChildrenContext.Provider,Object.assign({value:lineProps},{children}),k)});return _jsx(_Fragment,{children:components2})};LineItem.propTypes=propTypes,LineItem.displayName=displayName;export default LineItem;
@@ -1 +1,7 @@
1
- import{FunctionComponent}from'react';import{BaseAmountComponent,BasePriceType}from'../typings/index';export declare type LineItemAmountProps=BaseAmountComponent&{type?:BasePriceType;};declare const LineItemAmount:FunctionComponent<LineItemAmountProps>;export default LineItemAmount;
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseAmountComponent, BasePriceType } from '../typings/index';
3
+ export declare type LineItemAmountProps = BaseAmountComponent & {
4
+ type?: BasePriceType;
5
+ };
6
+ declare const LineItemAmount: FunctionComponent<LineItemAmountProps>;
7
+ export default LineItemAmount;
@@ -1 +1,12 @@
1
- import{FunctionComponent,ReactNode}from'react';import{LineItem}from'@commercelayer/sdk';export declare type LineItemCodeType=Omit<LineItemNameProps,'children'>&{lineItem:LineItem;skuCode:string;};declare type LineItemNameProps={children?:(props:LineItemCodeType)=>ReactNode;type?:'sku_code'|'bundle_code';}&JSX.IntrinsicElements['p'];declare const LineItemCode:FunctionComponent<LineItemNameProps>;export default LineItemCode;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import { LineItem } from '@commercelayer/sdk';
3
+ export declare type LineItemCodeType = Omit<LineItemNameProps, 'children'> & {
4
+ lineItem: LineItem;
5
+ skuCode: string;
6
+ };
7
+ declare type LineItemNameProps = {
8
+ children?: (props: LineItemCodeType) => ReactNode;
9
+ type?: 'sku_code' | 'bundle_code';
10
+ } & JSX.IntrinsicElements['p'];
11
+ declare const LineItemCode: FunctionComponent<LineItemNameProps>;
12
+ export default LineItemCode;
@@ -1 +1,16 @@
1
- import{FunctionComponent,ReactNode}from'react';import{LineItem}from'@commercelayer/sdk';import{LineItemType}from'../typings/index';export declare type LineItemImageType=Omit<LineItemImageProps,'children'>&{src:string;lineItem:LineItem;};declare type LineItemImageProps={children?:(props:LineItemImageType)=>ReactNode;width?:number;placeholder?:{[K in LineItemType]?:string;};}&Omit<JSX.IntrinsicElements['img'],'src'|'srcSet'|'placeholder'>;declare const LineItemImage:FunctionComponent<LineItemImageProps>;export default LineItemImage;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import { LineItem } from '@commercelayer/sdk';
3
+ import { LineItemType } from '../typings/index';
4
+ export declare type LineItemImageType = Omit<LineItemImageProps, 'children'> & {
5
+ src: string;
6
+ lineItem: LineItem;
7
+ };
8
+ declare type LineItemImageProps = {
9
+ children?: (props: LineItemImageType) => ReactNode;
10
+ width?: number;
11
+ placeholder?: {
12
+ [K in LineItemType]?: string;
13
+ };
14
+ } & Omit<JSX.IntrinsicElements['img'], 'src' | 'srcSet' | 'placeholder'>;
15
+ declare const LineItemImage: FunctionComponent<LineItemImageProps>;
16
+ export default LineItemImage;
@@ -1 +1 @@
1
- import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import Parent from"./utils/Parent";import LineItemChildrenContext from"../context/LineItemChildrenContext";import components from"../config/components";const defaultImgUrl="https://data.commercelayer.app/assets/images/placeholders/img_placeholder.svg",defaultGiftCardImgUrl="https://data.commercelayer.app/assets/images/placeholders/gift_placeholder.svg",propTypes=components.LineItemImage.propTypes,displayName=components.LineItemImage.displayName,LineItemImage=props=>{const{placeholder,children}=props,p=__rest(props,["placeholder","children"]),{lineItem}=useContext(LineItemChildrenContext),itemType=lineItem==null?void 0:lineItem.item_type;let src=lineItem==null?void 0:lineItem.image_url;src||((placeholder==null?void 0:placeholder[itemType])?src=placeholder==null?void 0:placeholder[itemType]:src=itemType==="gift_cards"?defaultGiftCardImgUrl:defaultImgUrl);const parenProps=Object.assign({lineItem,src,placeholder},p);return children?_jsx(Parent,Object.assign({},parenProps,{children})):src?_jsx("img",Object.assign({alt:"",src},p)):null};LineItemImage.propTypes=propTypes,LineItemImage.displayName=displayName;export default LineItemImage;
1
+ import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import Parent from"./utils/Parent";import LineItemChildrenContext from"../context/LineItemChildrenContext";import components from"../config/components";import{defaultGiftCardImgUrl,defaultImgUrl}from"../utils/placeholderImages";const propTypes=components.LineItemImage.propTypes,displayName=components.LineItemImage.displayName,LineItemImage=props=>{const{placeholder,children}=props,p=__rest(props,["placeholder","children"]),{lineItem}=useContext(LineItemChildrenContext),itemType=lineItem==null?void 0:lineItem.item_type;let src=lineItem==null?void 0:lineItem.image_url;src||((placeholder==null?void 0:placeholder[itemType])?src=placeholder==null?void 0:placeholder[itemType]:src=itemType==="gift_cards"?defaultGiftCardImgUrl:defaultImgUrl);const parenProps=Object.assign({lineItem,src,placeholder},p);return children?_jsx(Parent,Object.assign({},parenProps,{children})):src?_jsx("img",Object.assign({alt:"",src},p)):null};LineItemImage.propTypes=propTypes,LineItemImage.displayName=displayName;export default LineItemImage;