@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,8 @@
1
- import{FunctionComponent,ReactNode}from'react';declare type ShippingMethodProps={children:ReactNode;readonly?:boolean;emptyText?:string;};declare const ShippingMethod:FunctionComponent<ShippingMethodProps>;export default ShippingMethod;
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}from'react';import{ShippingMethod}from'@commercelayer/sdk';declare type LineItemNameChildrenProps=Omit<LineItemNameProps,'children'>&{label:string;shippingMethod:ShippingMethod;};declare type LineItemNameProps={children?:(props:LineItemNameChildrenProps)=>ReactNode;}&JSX.IntrinsicElements['label'];declare const ShippingMethodName:FunctionComponent<LineItemNameProps>;export default ShippingMethodName;
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';import{BaseAmountComponent}from'../typings/index';export declare type ShippingMethodPriceProps=BaseAmountComponent&{labelFreeOver?:string;}&({type?:'amount';base?:'freeOver';}|{type?:'amount'|'amountForShipment';base?:'price';});declare const ShippingMethodPrice:FunctionComponent<ShippingMethodPriceProps>;export default ShippingMethodPrice;
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;
@@ -1 +1,13 @@
1
- import{FunctionComponent,ReactNode}from'react';import{ShippingMethod}from'@commercelayer/sdk';export declare type ShippingMethodRadioButtonType=Omit<ShippingMethodRadioButtonProps,'children'>&{shippingMethod:ShippingMethod;shipmentId:string;};export declare type ShippingMethodRadioButtonOnChangeType=(shippingMethod:ShippingMethod,shipmentId:string)=>void;declare type ShippingMethodRadioButtonProps={children?:(props:ShippingMethodRadioButtonType)=>ReactNode;onChange?:ShippingMethodRadioButtonOnChangeType;}&Omit<JSX.IntrinsicElements['input'],'onChange'>;declare const ShippingMethodRadioButton:FunctionComponent<ShippingMethodRadioButtonProps>;export default ShippingMethodRadioButton;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import type { ShippingMethod } from '@commercelayer/sdk';
3
+ export declare type ShippingMethodRadioButtonType = Omit<ShippingMethodRadioButtonProps, 'children'> & {
4
+ shippingMethod: ShippingMethod;
5
+ shipmentId: string;
6
+ };
7
+ export declare type ShippingMethodRadioButtonOnChangeType = (shippingMethod: ShippingMethod, shipmentId: string) => void;
8
+ declare type ShippingMethodRadioButtonProps = {
9
+ children?: (props: ShippingMethodRadioButtonType) => ReactNode;
10
+ onChange?: ShippingMethodRadioButtonOnChangeType;
11
+ } & Omit<JSX.IntrinsicElements['input'], 'onChange'>;
12
+ declare const ShippingMethodRadioButton: FunctionComponent<ShippingMethodRadioButtonProps>;
13
+ export default ShippingMethodRadioButton;
@@ -1 +1 @@
1
- import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import ShippingMethodChildrenContext from"../context/ShippingMethodChildrenContext";import Parent from"./utils/Parent";import components from"../config/components";import ShipmentContext from"../context/ShipmentContext";const propTypes=components.ShippingMethodRadioButton.propTypes,displayName=components.ShippingMethodRadioButton.displayName,ShippingMethodRadioButton=props=>{const{onChange}=props,p=__rest(props,["onChange"]),{shippingMethod,currentShippingMethodId,shipmentId}=useContext(ShippingMethodChildrenContext),{setShippingMethod}=useContext(ShipmentContext),shippingMethodId=shippingMethod==null?void 0:shippingMethod.id,name=`shipment-${shipmentId}`,id=`${name}-${shippingMethodId}`,checked=shippingMethodId===currentShippingMethodId,handleOnChange=async()=>{shipmentId&&(shippingMethodId&&await setShippingMethod(shipmentId,shippingMethodId),shippingMethod&&onChange&&onChange(shippingMethod,shipmentId))},parentProps=Object.assign({shippingMethod,shipmentId,handleOnChange,name,id},props);return props.children?_jsx(Parent,Object.assign({},parentProps,{children:props.children})):_jsx("input",Object.assign({type:"radio",name,id,onChange:handleOnChange,defaultChecked:checked},p))};ShippingMethodRadioButton.propTypes=propTypes,ShippingMethodRadioButton.displayName=displayName;export default ShippingMethodRadioButton;
1
+ import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import{useContext,useEffect,useState}from"react";import ShippingMethodChildrenContext from"../context/ShippingMethodChildrenContext";import Parent from"./utils/Parent";import components from"../config/components";import ShipmentContext from"../context/ShipmentContext";const propTypes=components.ShippingMethodRadioButton.propTypes,displayName=components.ShippingMethodRadioButton.displayName,ShippingMethodRadioButton=props=>{const{onChange}=props,p=__rest(props,["onChange"]),[checked,setChecked]=useState(!1),{shippingMethod,currentShippingMethodId,shipmentId}=useContext(ShippingMethodChildrenContext),{setShippingMethod}=useContext(ShipmentContext),shippingMethodId=shippingMethod==null?void 0:shippingMethod.id,name=`shipment-${shipmentId}`,id=`${name}-${shippingMethodId}`;useEffect(()=>(setChecked(shippingMethodId===currentShippingMethodId),()=>{setChecked(!1)}),[currentShippingMethodId]);const handleOnChange=async()=>{shipmentId&&shippingMethodId&&(setChecked(!0),await setShippingMethod(shipmentId,shippingMethodId),shippingMethod&&onChange&&onChange(shippingMethod,shipmentId))},parentProps=Object.assign({shippingMethod,shipmentId,handleOnChange,name,id},props);return props.children?_jsx(Parent,Object.assign({},parentProps,{children:props.children})):_jsx("input",Object.assign({type:"radio",name,id,onChange:handleOnChange,checked},p))};ShippingMethodRadioButton.propTypes=propTypes,ShippingMethodRadioButton.displayName=displayName;export default ShippingMethodRadioButton;
@@ -1,2 +1,10 @@
1
1
  /// <reference types="react" />
2
- import{ConditionalElement}from'../typings/index';import{TResources}from'./utils/GenericFieldComponent';declare type SkuFieldChildrenProps=Omit<Props,'children'|'attribute'|'element'>;declare type TCondition=ConditionalElement<Exclude<TResources['Sku'],'resource'>>;declare type Props={children?:(props:SkuFieldChildrenProps)=>JSX.Element;}&TCondition;export default function SkuField<P extends Props>(props:P):JSX.Element;export{};
2
+ import { ConditionalElement } from '../typings/index';
3
+ import { TResources } from './utils/GenericFieldComponent';
4
+ declare type SkuFieldChildrenProps = Omit<Props, 'children' | 'attribute' | 'element'>;
5
+ declare type TCondition = ConditionalElement<Exclude<TResources['Sku'], 'resource'>>;
6
+ declare type Props = {
7
+ children?: (props: SkuFieldChildrenProps) => JSX.Element;
8
+ } & TCondition;
9
+ export default function SkuField<P extends Props>(props: P): JSX.Element;
10
+ export {};
@@ -1 +1,7 @@
1
- import{FunctionComponent,ReactNode}from'react';declare type SkuListProp={children:ReactNode;id:string;};declare const SkuList:FunctionComponent<SkuListProp>;export default SkuList;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ declare type SkuListProp = {
3
+ children: ReactNode;
4
+ id: string;
5
+ };
6
+ declare const SkuList: FunctionComponent<SkuListProp>;
7
+ export default SkuList;
@@ -1 +1,6 @@
1
- import{FunctionComponent,ReactNode}from'react';declare type SkuListsContainerProp={children:ReactNode;};declare const SkuListsContainer:FunctionComponent<SkuListsContainerProp>;export default SkuListsContainer;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ declare type SkuListsContainerProp = {
3
+ children: ReactNode;
4
+ };
5
+ declare const SkuListsContainer: FunctionComponent<SkuListsContainerProp>;
6
+ export default SkuListsContainer;
@@ -1 +1,7 @@
1
- import{FunctionComponent,ReactNode}from'react';export declare type SkuOptionProps={children:ReactNode;id:string;};declare const SkuOption:FunctionComponent<SkuOptionProps>;export default SkuOption;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ export declare type SkuOptionProps = {
3
+ children: ReactNode;
4
+ id: string;
5
+ };
6
+ declare const SkuOption: FunctionComponent<SkuOptionProps>;
7
+ export default SkuOption;
@@ -1 +1,5 @@
1
- import{FunctionComponent}from'react';import{BaseInputComponentProps}from'../typings/index';declare type SkuOptionInputProps=BaseInputComponentProps&JSX.IntrinsicElements['input']&JSX.IntrinsicElements['textarea'];declare const SkuOptionInput:FunctionComponent<SkuOptionInputProps>;export default SkuOptionInput;
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseInputComponentProps } from '../typings/index';
3
+ declare type SkuOptionInputProps = BaseInputComponentProps & JSX.IntrinsicElements['input'] & JSX.IntrinsicElements['textarea'];
4
+ declare const SkuOptionInput: FunctionComponent<SkuOptionInputProps>;
5
+ export default SkuOptionInput;
@@ -1 +1,7 @@
1
- import{FunctionComponent,ReactNode}from'react';declare type SkuOptionsContainerProp={children:ReactNode;skuCode?:string;};declare const SkuOptionsContainer:FunctionComponent<SkuOptionsContainerProp>;export default SkuOptionsContainer;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ declare type SkuOptionsContainerProp = {
3
+ children: ReactNode;
4
+ skuCode?: string;
5
+ };
6
+ declare const SkuOptionsContainer: FunctionComponent<SkuOptionsContainerProp>;
7
+ export default SkuOptionsContainer;
@@ -1 +1,11 @@
1
- import{ReactNode}from'react';declare type Props={children:ReactNode;};declare function Skus<P extends Props>({children}:P):JSX.Element;declare namespace Skus{var propTypes:{children:import("prop-types").Validator<boolean|import("react").ReactChild|import("react").ReactFragment|import("react").ReactPortal|(()=>ReactNode)>;};}export default Skus;
1
+ import { ReactNode } from 'react';
2
+ declare type Props = {
3
+ children: ReactNode;
4
+ };
5
+ declare function Skus<P extends Props>({ children }: P): JSX.Element;
6
+ declare namespace Skus {
7
+ var propTypes: {
8
+ children: import("prop-types").Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => ReactNode)>;
9
+ };
10
+ }
11
+ export default Skus;
@@ -1 +1,14 @@
1
- import{QueryParamsList}from'@commercelayer/sdk';import{ReactNode}from'react';declare type Props={skus:string[];children:ReactNode;queryParams?:QueryParamsList;};declare function SkusContainer<P extends Props>(props:P):JSX.Element;declare namespace SkusContainer{var propTypes:{children:import("prop-types").Validator<boolean|import("react").ReactChild|import("react").ReactFragment|import("react").ReactPortal|(()=>ReactNode)>;};}export default SkusContainer;
1
+ import { QueryParamsList } from '@commercelayer/sdk';
2
+ import { ReactNode } from 'react';
3
+ declare type Props = {
4
+ skus: string[];
5
+ children: ReactNode;
6
+ queryParams?: QueryParamsList;
7
+ };
8
+ declare function SkusContainer<P extends Props>(props: P): JSX.Element;
9
+ declare namespace SkusContainer {
10
+ var propTypes: {
11
+ children: import("prop-types").Validator<boolean | import("react").ReactChild | import("react").ReactFragment | import("react").ReactPortal | (() => ReactNode)>;
12
+ };
13
+ }
14
+ export default SkusContainer;
@@ -1 +1,6 @@
1
- import React,{ReactNode}from'react';declare type StockTransferProps={children:ReactNode;}&JSX.IntrinsicElements['p'];declare const StockTransfer:React.FunctionComponent<StockTransferProps>;export default StockTransfer;
1
+ import { ReactNode, FunctionComponent } from 'react';
2
+ declare type StockTransferProps = {
3
+ children: ReactNode;
4
+ } & JSX.IntrinsicElements['p'];
5
+ declare const StockTransfer: FunctionComponent<StockTransferProps>;
6
+ export default StockTransfer;
@@ -1 +1 @@
1
- import{jsx as _jsx}from"react/jsx-runtime";import{useContext,Fragment}from"react";import LineItemChildrenContext from"../context/LineItemChildrenContext";import components from"../config/components";import ShipmentChildrenContext from"../context/ShipmentChildrenContext";import StockTransferChildrenContext from"../context/StockTransferChildrenContext";const propTypes=components.StockTransfer.propTypes,displayName=components.StockTransfer.displayName,StockTransfer=props=>{const{children}=props,{lineItem}=useContext(LineItemChildrenContext),{stockTransfers}=useContext(ShipmentChildrenContext),items=[...lineItem?[lineItem]:[],...stockTransfers||[]],components2=items==null?void 0:items.filter(stock=>stock.sku_code!==(lineItem==null?void 0:lineItem.sku_code)).map((stockTransfer,k)=>{const stockTransferProps={stockTransfer:stockTransfer==null?void 0:stockTransfer.line_item};return _jsx(StockTransferChildrenContext.Provider,Object.assign({value:stockTransferProps},{children}),k)});return _jsx(Fragment,{children:components2})};StockTransfer.propTypes=propTypes,StockTransfer.displayName=displayName;export default StockTransfer;
1
+ import{jsx as _jsx,Fragment as _Fragment}from"react/jsx-runtime";import{useContext}from"react";import components from"../config/components";import ShipmentChildrenContext from"../context/ShipmentChildrenContext";import StockTransferChildrenContext from"../context/StockTransferChildrenContext";const propTypes=components.StockTransfer.propTypes,displayName=components.StockTransfer.displayName,StockTransfer=props=>{const{children}=props,{stockTransfers,lineItems}=useContext(ShipmentChildrenContext),components2=stockTransfers==null?void 0:stockTransfers.filter(st=>!!(lineItems==null?void 0:lineItems.find(l=>l.sku_code!==st.sku_code))).map((stockTransfer,k)=>{const stockTransferProps={stockTransfer:stockTransfer.type==="line_items"?stockTransfer:stockTransfer==null?void 0:stockTransfer.line_item};return _jsx(StockTransferChildrenContext.Provider,Object.assign({value:stockTransferProps},{children}),k)});return _jsx(_Fragment,{children:components2})};StockTransfer.propTypes=propTypes,StockTransfer.displayName=displayName;export default StockTransfer;
@@ -1,2 +1,10 @@
1
1
  /// <reference types="react" />
2
- import{ConditionalElement}from'../typings/index';import{TResources}from'./utils/GenericFieldComponent';declare type StockTransferFieldChildrenProps=Omit<Props,'children'|'attribute'|'element'>;declare type TCondition=ConditionalElement<Exclude<TResources['StockTransfer'],'resource'>>;declare type Props={children?:(props:StockTransferFieldChildrenProps)=>JSX.Element;}&TCondition;export default function StockTransferField<P extends Props>(props:P):JSX.Element;export{};
2
+ import { ConditionalElement } from '../typings/index';
3
+ import { TResources } from './utils/GenericFieldComponent';
4
+ declare type StockTransferFieldChildrenProps = Omit<Props, 'children' | 'attribute' | 'element'>;
5
+ declare type TCondition = ConditionalElement<Exclude<TResources['StockTransfer'], 'resource'>>;
6
+ declare type Props = {
7
+ children?: (props: StockTransferFieldChildrenProps) => JSX.Element;
8
+ } & TCondition;
9
+ export default function StockTransferField<P extends Props>(props: P): JSX.Element;
10
+ export {};
@@ -1 +1,18 @@
1
- import React from'react';import{StripeCardElementOptions,StripeElementLocale}from'@stripe/stripe-js';import{PaymentMethodConfig}from'../reducers/PaymentMethodReducer';import{PaymentSourceProps}from'./PaymentSource';export declare type StripeConfig={containerClassName?:string;hintLabel?:string;name?:string;options?:StripeCardElementOptions;[key:string]:any;};declare type StripePaymentProps=PaymentMethodConfig['stripePayment']&JSX.IntrinsicElements['div']&Partial<PaymentSourceProps['templateCustomerSaveToWallet']>&{show?:boolean;publishableKey:string;locale?:StripeElementLocale;};declare const StripePayment:React.FunctionComponent<StripePaymentProps>;export default StripePayment;
1
+ import React from 'react';
2
+ import { StripeCardElementOptions, StripeElementLocale } from '@stripe/stripe-js';
3
+ import { PaymentMethodConfig } from '../reducers/PaymentMethodReducer';
4
+ import { PaymentSourceProps } from './PaymentSource';
5
+ export declare type StripeConfig = {
6
+ containerClassName?: string;
7
+ hintLabel?: string;
8
+ name?: string;
9
+ options?: StripeCardElementOptions;
10
+ [key: string]: any;
11
+ };
12
+ declare type StripePaymentProps = PaymentMethodConfig['stripePayment'] & JSX.IntrinsicElements['div'] & Partial<PaymentSourceProps['templateCustomerSaveToWallet']> & {
13
+ show?: boolean;
14
+ publishableKey: string;
15
+ locale?: StripeElementLocale;
16
+ };
17
+ declare const StripePayment: React.FunctionComponent<StripePaymentProps>;
18
+ export default StripePayment;
@@ -1 +1,4 @@
1
- import{FunctionComponent}from'react';import{BaseAmountComponent}from'../typings/index';declare const SubTotalAmount:FunctionComponent<BaseAmountComponent>;export default SubTotalAmount;
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseAmountComponent } from '../typings/index';
3
+ declare const SubTotalAmount: FunctionComponent<BaseAmountComponent>;
4
+ export default SubTotalAmount;
@@ -1 +1,9 @@
1
- import{FunctionComponent,ReactNode}from'react';import{FunctionChildren}from'../typings/index';declare type SubmitButtonChildrenProps=FunctionChildren<Omit<SubmitButtonProps,'children'>>;declare type SubmitButtonProps={children?:SubmitButtonChildrenProps;label?:string|ReactNode;}&JSX.IntrinsicElements['button'];declare const SubmitButton:FunctionComponent<SubmitButtonProps>;export default SubmitButton;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import { FunctionChildren } from '../typings/index';
3
+ declare type SubmitButtonChildrenProps = FunctionChildren<Omit<SubmitButtonProps, 'children'>>;
4
+ declare type SubmitButtonProps = {
5
+ children?: SubmitButtonChildrenProps;
6
+ label?: string | ReactNode;
7
+ } & JSX.IntrinsicElements['button'];
8
+ declare const SubmitButton: FunctionComponent<SubmitButtonProps>;
9
+ export default SubmitButton;
@@ -1 +1,4 @@
1
- import{FunctionComponent}from'react';import{BaseAmountComponent}from'../typings/index';declare const TaxesAmount:FunctionComponent<BaseAmountComponent>;export default TaxesAmount;
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseAmountComponent } from '../typings/index';
3
+ declare const TaxesAmount: FunctionComponent<BaseAmountComponent>;
4
+ export default TaxesAmount;
@@ -1 +1,4 @@
1
- import{FunctionComponent}from'react';import{BaseAmountComponent}from'../typings/index';declare const TotalAmount:FunctionComponent<BaseAmountComponent>;export default TotalAmount;
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseAmountComponent } from '../typings/index';
3
+ declare const TotalAmount: FunctionComponent<BaseAmountComponent>;
4
+ export default TotalAmount;
@@ -1 +1,29 @@
1
- import{FunctionComponent,ReactNode}from'react';import{VariantHandleCallback}from'./utils/VariantTemplate';import{BaseSelectorType}from'../typings/index';import{FunctionChildren}from'../typings/index';import{VariantsObject,SetSkuCode}from'../reducers/VariantReducer';export interface VariantOption{label:string;code:string;lineItem?:{name:string;imageUrl?:string|null;}|null;}declare type VariantSelectorChildrenProps=FunctionChildren<Omit<VariantSelectorProps,'children'>&{variants:VariantsObject;handleSelect:SetSkuCode;loading:boolean;}>;declare type VariantSelectorProps={children?:VariantSelectorChildrenProps;options:VariantOption[];type?:BaseSelectorType;loader?:ReactNode;placeholder?:string;skuCode?:string;handleCallback?:VariantHandleCallback;}&JSX.IntrinsicElements['input']&JSX.IntrinsicElements['select'];declare const VariantSelector:FunctionComponent<VariantSelectorProps>;export default VariantSelector;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import { VariantHandleCallback } from './utils/VariantTemplate';
3
+ import { BaseSelectorType } from '../typings/index';
4
+ import { FunctionChildren } from '../typings/index';
5
+ import { VariantsObject, SetSkuCode } from '../reducers/VariantReducer';
6
+ export interface VariantOption {
7
+ label: string;
8
+ code: string;
9
+ lineItem?: {
10
+ name: string;
11
+ imageUrl?: string | null;
12
+ } | null;
13
+ }
14
+ declare type VariantSelectorChildrenProps = FunctionChildren<Omit<VariantSelectorProps, 'children'> & {
15
+ variants: VariantsObject;
16
+ handleSelect: SetSkuCode;
17
+ loading: boolean;
18
+ }>;
19
+ declare type VariantSelectorProps = {
20
+ children?: VariantSelectorChildrenProps;
21
+ options: VariantOption[];
22
+ type?: BaseSelectorType;
23
+ loader?: ReactNode;
24
+ placeholder?: string;
25
+ skuCode?: string;
26
+ handleCallback?: VariantHandleCallback;
27
+ } & JSX.IntrinsicElements['input'] & JSX.IntrinsicElements['select'];
28
+ declare const VariantSelector: FunctionComponent<VariantSelectorProps>;
29
+ export default VariantSelector;
@@ -1 +1,8 @@
1
- import React,{ReactNode}from'react';declare type VariantsContainerProps={children:ReactNode;filters?:Record<string,any>;skuCode?:string;};declare const VariantsContainer:React.FunctionComponent<VariantsContainerProps>;export default VariantsContainer;
1
+ import React, { ReactNode } from 'react';
2
+ declare type VariantsContainerProps = {
3
+ children: ReactNode;
4
+ filters?: Record<string, any>;
5
+ skuCode?: string;
6
+ };
7
+ declare const VariantsContainer: React.FunctionComponent<VariantsContainerProps>;
8
+ export default VariantsContainer;
@@ -1 +1,10 @@
1
- import{FunctionComponent,ReactNode}from'react';export declare type WireTransferConfig={infoMessage?:{text?:string|ReactNode;className?:string;};};declare type Props=WireTransferConfig&JSX.IntrinsicElements['div'];declare const WireTransferPayment:FunctionComponent<Props>;export default WireTransferPayment;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ export declare type WireTransferConfig = {
3
+ infoMessage?: {
4
+ text?: string | ReactNode;
5
+ className?: string;
6
+ };
7
+ };
8
+ declare type Props = WireTransferConfig & JSX.IntrinsicElements['div'];
9
+ declare const WireTransferPayment: FunctionComponent<Props>;
10
+ export default WireTransferPayment;
@@ -1,2 +1,5 @@
1
1
  /// <reference types="react" />
2
- import{GatewayBaseType}from'../PaymentGateway';declare type AdyenGateway=GatewayBaseType;export default function AdyenGateway(props:AdyenGateway):JSX.Element|null;export{};
2
+ import { GatewayBaseType } from '../PaymentGateway';
3
+ declare type AdyenGateway = GatewayBaseType;
4
+ export default function AdyenGateway(props: AdyenGateway): JSX.Element | null;
5
+ export {};
@@ -1,2 +1,5 @@
1
1
  /// <reference types="react" />
2
- import{GatewayBaseType}from'../PaymentGateway';declare type BraintreeGateway=GatewayBaseType;export default function BraintreeGateway(props:BraintreeGateway):JSX.Element|null;export{};
2
+ import { GatewayBaseType } from '../PaymentGateway';
3
+ declare type BraintreeGateway = GatewayBaseType;
4
+ export default function BraintreeGateway(props: BraintreeGateway): JSX.Element | null;
5
+ export {};
@@ -1,2 +1,5 @@
1
1
  /// <reference types="react" />
2
- import{GatewayBaseType}from'../PaymentGateway';declare type CheckoutComGateway=GatewayBaseType;export default function CheckoutComGateway(props:CheckoutComGateway):JSX.Element|null;export{};
2
+ import { GatewayBaseType } from '../PaymentGateway';
3
+ declare type CheckoutComGateway = GatewayBaseType;
4
+ export default function CheckoutComGateway(props: CheckoutComGateway): JSX.Element | null;
5
+ export {};
@@ -1,2 +1,5 @@
1
1
  /// <reference types="react" />
2
- import{GatewayBaseType}from'../PaymentGateway';declare type KlarnaGateway=GatewayBaseType;export default function KlarnaGateway(props:KlarnaGateway):JSX.Element|null;export{};
2
+ import { GatewayBaseType } from '../PaymentGateway';
3
+ declare type KlarnaGateway = GatewayBaseType;
4
+ export default function KlarnaGateway(props: KlarnaGateway): JSX.Element | null;
5
+ export {};
@@ -1,2 +1,5 @@
1
1
  /// <reference types="react" />
2
- import{GatewayBaseType}from'../PaymentGateway';declare type PaypalGateway=Partial<GatewayBaseType>;export default function PaypalGateway(props:PaypalGateway):JSX.Element|null;export{};
2
+ import { GatewayBaseType } from '../PaymentGateway';
3
+ declare type PaypalGateway = Partial<GatewayBaseType>;
4
+ export default function PaypalGateway(props: PaypalGateway): JSX.Element | null;
5
+ export {};
@@ -1,2 +1,5 @@
1
1
  /// <reference types="react" />
2
- import{GatewayBaseType}from'../PaymentGateway';declare type StripeGateway=GatewayBaseType;export default function StripeGateway(props:StripeGateway):JSX.Element|null;export{};
2
+ import { GatewayBaseType } from '../PaymentGateway';
3
+ declare type StripeGateway = GatewayBaseType;
4
+ export default function StripeGateway(props: StripeGateway): JSX.Element | null;
5
+ export {};
@@ -1,2 +1,5 @@
1
1
  /// <reference types="react" />
2
- import{GatewayBaseType}from'../PaymentGateway';declare type WireTransferGateway=GatewayBaseType;export default function WireTransferGateway(props:WireTransferGateway):JSX.Element|null;export{};
2
+ import { GatewayBaseType } from '../PaymentGateway';
3
+ declare type WireTransferGateway = GatewayBaseType;
4
+ export default function WireTransferGateway(props: WireTransferGateway): JSX.Element | null;
5
+ export {};
@@ -1,2 +1,27 @@
1
1
  /// <reference types="react" />
2
- import{Address}from'@commercelayer/sdk';import AddressChildrenContext from'../../context/AddressChildrenContext';import{FunctionChildren}from'../../typings/index';declare type ChildrenProps=Pick<Props,'customerAddresses'|'className'>&{AddressProvider:typeof AddressChildrenContext.Provider;};export declare type CustomerAddress=Address&{onClick:()=>void;handleSelect?:()=>void;};export declare type AddressCardsTemplateChildren=FunctionChildren<ChildrenProps>;export declare type AddressCardsType=ChildrenProps;export declare type HandleSelect=(k:number,addressId:string,customerAddressId:string,disabled:boolean,address:Address)=>void;declare type Props={customerAddresses:CustomerAddress[];countryLock?:string;children:AddressCardsTemplateChildren;selectedClassName?:string;disabledClassName?:string;deselect?:boolean;selected?:number|null;className?:string;handleSelect:HandleSelect;};export default function AddressCardsTemplate({customerAddresses,children,deselect,countryLock,selected,selectedClassName,className,disabledClassName,handleSelect,}:Props):JSX.Element;export{};
2
+ import { Address } from '@commercelayer/sdk';
3
+ import AddressChildrenContext from '../../context/AddressChildrenContext';
4
+ import { FunctionChildren } from '../../typings/index';
5
+ declare type ChildrenProps = Pick<Props, 'customerAddresses' | 'className'> & {
6
+ AddressProvider: typeof AddressChildrenContext.Provider;
7
+ };
8
+ export declare type CustomerAddress = Address & {
9
+ onClick: () => void;
10
+ handleSelect?: () => void;
11
+ };
12
+ export declare type AddressCardsTemplateChildren = FunctionChildren<ChildrenProps>;
13
+ export declare type AddressCardsType = ChildrenProps;
14
+ export declare type HandleSelect = (k: number, addressId: string, customerAddressId: string, disabled: boolean, address: Address) => void;
15
+ declare type Props = {
16
+ customerAddresses: CustomerAddress[];
17
+ countryLock?: string;
18
+ children: AddressCardsTemplateChildren;
19
+ selectedClassName?: string;
20
+ disabledClassName?: string;
21
+ deselect?: boolean;
22
+ selected?: number | null;
23
+ className?: string;
24
+ handleSelect: HandleSelect;
25
+ };
26
+ export default function AddressCardsTemplate({ customerAddresses, children, deselect, countryLock, selected, selectedClassName, className, disabledClassName, handleSelect, }: Props): JSX.Element;
27
+ export {};
@@ -1 +1,8 @@
1
- import{FunctionComponent,ReactNode}from'react';declare type BaseFieldChildren=Omit<BaseFieldProps,'children'>;export declare type BaseFieldProps={attribute:'number'|'id';children?:(props:BaseFieldChildren)=>ReactNode;}&JSX.IntrinsicElements['span'];declare const BaseField:FunctionComponent<BaseFieldProps>;export default BaseField;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ declare type BaseFieldChildren = Omit<BaseFieldProps, 'children'>;
3
+ export declare type BaseFieldProps = {
4
+ attribute: 'number' | 'id';
5
+ children?: (props: BaseFieldChildren) => ReactNode;
6
+ } & JSX.IntrinsicElements['span'];
7
+ declare const BaseField: FunctionComponent<BaseFieldProps>;
8
+ export default BaseField;
@@ -1 +1,5 @@
1
- import React from'react';import{BaseInputComponentProps}from'../../typings/index';export declare type BaseInputProps=BaseInputComponentProps&JSX.IntrinsicElements['input']&JSX.IntrinsicElements['textarea'];declare const _default:React.ForwardRefExoticComponent<Pick<BaseInputProps,"children"|"form"|"slot"|"style"|"title"|"pattern"|"type"|"key"|"resource"|"id"|"value"|"placeholder"|"className"|"required"|"name"|"onChange"|"defaultChecked"|"defaultValue"|"suppressContentEditableWarning"|"suppressHydrationWarning"|"accessKey"|"contentEditable"|"contextMenu"|"dir"|"draggable"|"hidden"|"lang"|"spellCheck"|"tabIndex"|"translate"|"radioGroup"|"role"|"about"|"datatype"|"inlist"|"prefix"|"property"|"typeof"|"vocab"|"autoCapitalize"|"autoCorrect"|"autoSave"|"color"|"itemProp"|"itemScope"|"itemType"|"itemID"|"itemRef"|"results"|"security"|"unselectable"|"inputMode"|"is"|"aria-activedescendant"|"aria-atomic"|"aria-autocomplete"|"aria-busy"|"aria-checked"|"aria-colcount"|"aria-colindex"|"aria-colspan"|"aria-controls"|"aria-current"|"aria-describedby"|"aria-details"|"aria-disabled"|"aria-dropeffect"|"aria-errormessage"|"aria-expanded"|"aria-flowto"|"aria-grabbed"|"aria-haspopup"|"aria-hidden"|"aria-invalid"|"aria-keyshortcuts"|"aria-label"|"aria-labelledby"|"aria-level"|"aria-live"|"aria-modal"|"aria-multiline"|"aria-multiselectable"|"aria-orientation"|"aria-owns"|"aria-placeholder"|"aria-posinset"|"aria-pressed"|"aria-readonly"|"aria-relevant"|"aria-required"|"aria-roledescription"|"aria-rowcount"|"aria-rowindex"|"aria-rowspan"|"aria-selected"|"aria-setsize"|"aria-sort"|"aria-valuemax"|"aria-valuemin"|"aria-valuenow"|"aria-valuetext"|"dangerouslySetInnerHTML"|"onCopy"|"onCopyCapture"|"onCut"|"onCutCapture"|"onPaste"|"onPasteCapture"|"onCompositionEnd"|"onCompositionEndCapture"|"onCompositionStart"|"onCompositionStartCapture"|"onCompositionUpdate"|"onCompositionUpdateCapture"|"onFocus"|"onFocusCapture"|"onBlur"|"onBlurCapture"|"onChangeCapture"|"onBeforeInput"|"onBeforeInputCapture"|"onInput"|"onInputCapture"|"onReset"|"onResetCapture"|"onSubmit"|"onSubmitCapture"|"onInvalid"|"onInvalidCapture"|"onLoad"|"onLoadCapture"|"onError"|"onErrorCapture"|"onKeyDown"|"onKeyDownCapture"|"onKeyPress"|"onKeyPressCapture"|"onKeyUp"|"onKeyUpCapture"|"onAbort"|"onAbortCapture"|"onCanPlay"|"onCanPlayCapture"|"onCanPlayThrough"|"onCanPlayThroughCapture"|"onDurationChange"|"onDurationChangeCapture"|"onEmptied"|"onEmptiedCapture"|"onEncrypted"|"onEncryptedCapture"|"onEnded"|"onEndedCapture"|"onLoadedData"|"onLoadedDataCapture"|"onLoadedMetadata"|"onLoadedMetadataCapture"|"onLoadStart"|"onLoadStartCapture"|"onPause"|"onPauseCapture"|"onPlay"|"onPlayCapture"|"onPlaying"|"onPlayingCapture"|"onProgress"|"onProgressCapture"|"onRateChange"|"onRateChangeCapture"|"onSeeked"|"onSeekedCapture"|"onSeeking"|"onSeekingCapture"|"onStalled"|"onStalledCapture"|"onSuspend"|"onSuspendCapture"|"onTimeUpdate"|"onTimeUpdateCapture"|"onVolumeChange"|"onVolumeChangeCapture"|"onWaiting"|"onWaitingCapture"|"onAuxClick"|"onAuxClickCapture"|"onClick"|"onClickCapture"|"onContextMenu"|"onContextMenuCapture"|"onDoubleClick"|"onDoubleClickCapture"|"onDrag"|"onDragCapture"|"onDragEnd"|"onDragEndCapture"|"onDragEnter"|"onDragEnterCapture"|"onDragExit"|"onDragExitCapture"|"onDragLeave"|"onDragLeaveCapture"|"onDragOver"|"onDragOverCapture"|"onDragStart"|"onDragStartCapture"|"onDrop"|"onDropCapture"|"onMouseDown"|"onMouseDownCapture"|"onMouseEnter"|"onMouseLeave"|"onMouseMove"|"onMouseMoveCapture"|"onMouseOut"|"onMouseOutCapture"|"onMouseOver"|"onMouseOverCapture"|"onMouseUp"|"onMouseUpCapture"|"onSelect"|"onSelectCapture"|"onTouchCancel"|"onTouchCancelCapture"|"onTouchEnd"|"onTouchEndCapture"|"onTouchMove"|"onTouchMoveCapture"|"onTouchStart"|"onTouchStartCapture"|"onPointerDown"|"onPointerDownCapture"|"onPointerMove"|"onPointerMoveCapture"|"onPointerUp"|"onPointerUpCapture"|"onPointerCancel"|"onPointerCancelCapture"|"onPointerEnter"|"onPointerEnterCapture"|"onPointerLeave"|"onPointerLeaveCapture"|"onPointerOver"|"onPointerOverCapture"|"onPointerOut"|"onPointerOutCapture"|"onGotPointerCapture"|"onGotPointerCaptureCapture"|"onLostPointerCapture"|"onLostPointerCaptureCapture"|"onScroll"|"onScrollCapture"|"onWheel"|"onWheelCapture"|"onAnimationStart"|"onAnimationStartCapture"|"onAnimationEnd"|"onAnimationEndCapture"|"onAnimationIteration"|"onAnimationIterationCapture"|"onTransitionEnd"|"onTransitionEndCapture"|"min"|"max"|"disabled"|"width"|"height"|"src"|"list"|"step"|"accept"|"alt"|"autoComplete"|"autoFocus"|"capture"|"checked"|"crossOrigin"|"enterKeyHint"|"formAction"|"formEncType"|"formMethod"|"formNoValidate"|"formTarget"|"maxLength"|"minLength"|"multiple"|"readOnly"|"size"|"cols"|"dirName"|"rows"|"wrap">&React.RefAttributes<any>>;export default _default;
1
+ import React from 'react';
2
+ import { BaseInputComponentProps } from '../../typings/index';
3
+ export declare type BaseInputProps = BaseInputComponentProps & JSX.IntrinsicElements['input'] & JSX.IntrinsicElements['textarea'];
4
+ declare const _default: React.ForwardRefExoticComponent<Pick<BaseInputProps, "children" | "form" | "slot" | "style" | "title" | "pattern" | "resource" | "id" | "value" | "placeholder" | "className" | "required" | "name" | "onChange" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "min" | "max" | "type" | "disabled" | "width" | "height" | "src" | "list" | "step" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "enterKeyHint" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "maxLength" | "minLength" | "multiple" | "readOnly" | "size" | "cols" | "dirName" | "rows" | "wrap"> & React.RefAttributes<any>>;
5
+ export default _default;
@@ -1 +1 @@
1
- import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import React from"react";import Parent from"./Parent";const BaseInput=(props,ref)=>{const{children}=props,p=__rest(props,["children"]),input=props.type==="textarea"?_jsx("textarea",Object.assign({ref},p)):_jsx("input",Object.assign({ref},p));return children?_jsx(Parent,Object.assign({},p,{children})):input};export default React.forwardRef(BaseInput);
1
+ import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import React from"react";import Parent from"./Parent";const BaseInput=(props,ref)=>{const{children}=props,p=__rest(props,["children"]),input=props.type==="textarea"?_jsx("textarea",Object.assign({ref},p)):_jsx("input",Object.assign({ref},p));return children?_jsx(Parent,Object.assign({parentRef:ref},p,{children})):input};export default React.forwardRef(BaseInput);
@@ -1 +1,6 @@
1
- import{FunctionComponent}from'react';import{PropsType}from'../../utils/PropsType';import{baseOrderPricePropTypes}from'../../typings/index';export declare type BaseOrderPriceProps=PropsType<typeof baseOrderPricePropTypes>&JSX.IntrinsicElements['span'];declare const BaseOrderPrice:FunctionComponent<BaseOrderPriceProps>;export default BaseOrderPrice;
1
+ import { FunctionComponent } from 'react';
2
+ import { PropsType } from '../../utils/PropsType';
3
+ import { baseOrderPricePropTypes } from '../../typings/index';
4
+ export declare type BaseOrderPriceProps = PropsType<typeof baseOrderPricePropTypes> & JSX.IntrinsicElements['span'];
5
+ declare const BaseOrderPrice: FunctionComponent<BaseOrderPriceProps>;
6
+ export default BaseOrderPrice;
@@ -1 +1,5 @@
1
- import React from'react';import{BaseSelectComponentProps}from'../../typings/index';export declare type BaseSelectProps=BaseSelectComponentProps;declare const _default:React.ForwardRefExoticComponent<BaseSelectComponentProps&React.RefAttributes<any>>;export default _default;
1
+ import React from 'react';
2
+ import { BaseSelectComponentProps } from '../../typings/index';
3
+ export declare type BaseSelectProps = BaseSelectComponentProps;
4
+ declare const _default: React.ForwardRefExoticComponent<BaseSelectComponentProps & React.RefAttributes<any>>;
5
+ export default _default;
@@ -1 +1,37 @@
1
- import{InitialSkuContext}from'../../context/SkuChildrenContext';import{InitialStockTransferContext}from'../../context/StockTransferChildrenContext';import{LineItem,Sku}from'@commercelayer/sdk';import{InitialLineItemContext}from'../../context/LineItemChildrenContext';import{Context}from'react';export declare type TResources={StockTransfer:LineItem&{resource:'stock_transfers';};Sku:Sku&{resource:'skus';};LineItem:LineItem&{resource:'line_items';};};export declare type TResourceKey={[K in keyof TResources]:K;};declare type ChildrenProps<E extends TResources[keyof TResources]>=Omit<Props<E>,'children'|'attribute'>&{element:E[keyof E];};declare type ResourceContext={stock_transfers:InitialStockTransferContext;skus:InitialSkuContext;line_items:InitialLineItemContext;};declare type GenericContext<K extends keyof ResourceContext>=Context<ResourceContext[K]>;declare type Props<E extends TResources[keyof TResources]>={children?:(props:ChildrenProps<E>)=>JSX.Element;resource:E['resource'];attribute:keyof E;tagElement:keyof JSX.IntrinsicElements;context:GenericContext<E['resource']>;};export default function GenericFieldComponent<R extends keyof TResources>(props:Props<TResources[R]>):JSX.Element;export{};
1
+ import { InitialSkuContext } from '../../context/SkuChildrenContext';
2
+ import { InitialStockTransferContext } from '../../context/StockTransferChildrenContext';
3
+ import { LineItem, Sku } from '@commercelayer/sdk';
4
+ import { InitialLineItemContext } from '../../context/LineItemChildrenContext';
5
+ import { Context } from 'react';
6
+ export declare type TResources = {
7
+ StockTransfer: LineItem & {
8
+ resource: 'stock_transfers';
9
+ };
10
+ Sku: Sku & {
11
+ resource: 'skus';
12
+ };
13
+ LineItem: LineItem & {
14
+ resource: 'line_items';
15
+ };
16
+ };
17
+ export declare type TResourceKey = {
18
+ [K in keyof TResources]: K;
19
+ };
20
+ declare type ChildrenProps<E extends TResources[keyof TResources]> = Omit<Props<E>, 'children' | 'attribute'> & {
21
+ element: E[keyof E];
22
+ };
23
+ declare type ResourceContext = {
24
+ stock_transfers: InitialStockTransferContext;
25
+ skus: InitialSkuContext;
26
+ line_items: InitialLineItemContext;
27
+ };
28
+ declare type GenericContext<K extends keyof ResourceContext> = Context<ResourceContext[K]>;
29
+ declare type Props<E extends TResources[keyof TResources]> = {
30
+ children?: (props: ChildrenProps<E>) => JSX.Element;
31
+ resource: E['resource'];
32
+ attribute: keyof E;
33
+ tagElement: keyof JSX.IntrinsicElements;
34
+ context: GenericContext<E['resource']>;
35
+ };
36
+ export default function GenericFieldComponent<R extends keyof TResources>(props: Props<TResources[R]>): JSX.Element;
37
+ export {};
@@ -1 +1 @@
1
- import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import Parent from"./Parent";import{useContext}from"react";export default function GenericFieldComponent(props){const{children,tagElement,attribute,context}=props,p=__rest(props,["children","tagElement","attribute","context"]),resourceContext=useContext(context);let element;for(const key in resourceContext)Object.prototype.hasOwnProperty.call(resourceContext,key)&&(element=resourceContext[key][attribute]);const Tag=tagElement||"span";if(Tag==="img"&&!children)return _jsx("img",Object.assign({alt:"",src:element},p));const parentProps=Object.assign({element,tagElement},p);return children?_jsx(Parent,Object.assign({},parentProps,{children})):_jsx(Tag,Object.assign({},p,{children:element}))}
1
+ import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";import Parent from"./Parent";import{useContext}from"react";import{defaultImgUrl}from"../../utils/placeholderImages";export default function GenericFieldComponent(props){const{children,tagElement,attribute,context}=props,p=__rest(props,["children","tagElement","attribute","context"]),resourceContext=useContext(context);let element;for(const key in resourceContext)Object.prototype.hasOwnProperty.call(resourceContext,key)&&(element=resourceContext[key][attribute]);const Tag=tagElement||"span";if(Tag==="img"&&!children)return _jsx("img",Object.assign({alt:"",src:element||defaultImgUrl},p));const parentProps=Object.assign({element,tagElement},p);return children?_jsx(Parent,Object.assign({},parentProps,{children})):_jsx(Tag,Object.assign({},p,{children:element}))}
@@ -1 +1,6 @@
1
- import PropTypes,{InferProps}from'prop-types';import{FunctionComponent}from'react';declare const PProps:{children:PropTypes.Requireable<(...args:any[])=>any>;};export declare type ParentProps=InferProps<typeof PProps>;declare const Parent:FunctionComponent<ParentProps>;export default Parent;
1
+ import { ForwardedRef, FunctionComponent } from 'react';
2
+ export declare type ParentProps = {
3
+ parentRef?: ForwardedRef<any>;
4
+ };
5
+ declare const Parent: FunctionComponent<ParentProps>;
6
+ export default Parent;
@@ -1 +1 @@
1
- import{jsx as _jsx}from"react/jsx-runtime";import PropTypes from"prop-types";const PProps={children:PropTypes.func},Parent=props=>{const Child=props.children;return Child?_jsx(Child,Object.assign({},props)):null};Parent.propTypes=PProps;export default Parent;
1
+ import{__rest}from"tslib";import{jsx as _jsx}from"react/jsx-runtime";const Parent=_a=>{var{children}=_a,p=__rest(_a,["children"]);const Child=children;return Child?_jsx(Child,Object.assign({},p)):null};export default Parent;
@@ -1,2 +1,23 @@
1
1
  /// <reference types="react" />
2
- import{PaymentResource,PaymentSourceType}from'../../reducers/PaymentMethodReducer';import PaymentSourceContext,{IconBrand}from'../../context/PaymentSourceContext';import{FunctionChildren}from'../../typings/index';declare type ChildrenProps=Pick<Props,'customerPayments'>&{PaymentSourceProvider:typeof PaymentSourceContext.Provider;};declare type CustomerPayment=PaymentSourceType&{card?:{brand?:IconBrand;last4?:string;};handleClick?:()=>void;};export declare type CustomerCardsTemplateChildren=FunctionChildren<ChildrenProps>;export declare type CustomerCardsType=ChildrenProps;declare type Props={customerPayments:CustomerPayment[];children:CustomerCardsTemplateChildren;paymentResource:PaymentResource;};export default function PaymentCardsTemplate({customerPayments,children,paymentResource,}:Props):JSX.Element;export{};
2
+ import { PaymentResource, PaymentSourceType } from '../../reducers/PaymentMethodReducer';
3
+ import PaymentSourceContext, { IconBrand } from '../../context/PaymentSourceContext';
4
+ import { FunctionChildren } from '../../typings/index';
5
+ declare type ChildrenProps = Pick<Props, 'customerPayments'> & {
6
+ PaymentSourceProvider: typeof PaymentSourceContext.Provider;
7
+ };
8
+ declare type CustomerPayment = PaymentSourceType & {
9
+ card?: {
10
+ brand?: IconBrand;
11
+ last4?: string;
12
+ };
13
+ handleClick?: () => void;
14
+ };
15
+ export declare type CustomerCardsTemplateChildren = FunctionChildren<ChildrenProps>;
16
+ export declare type CustomerCardsType = ChildrenProps;
17
+ declare type Props = {
18
+ customerPayments: CustomerPayment[];
19
+ children: CustomerCardsTemplateChildren;
20
+ paymentResource: PaymentResource;
21
+ };
22
+ export default function PaymentCardsTemplate({ customerPayments, children, paymentResource, }: Props): JSX.Element;
23
+ export {};
@@ -1 +1,8 @@
1
- import React from'react';import{PriceProps}from'../Price';export declare type PTemplateProps={formattedAmount?:string;formattedCompare?:string;}&Omit<PriceProps,'children'>;declare const PriceTemplate:React.FunctionComponent<PTemplateProps>;export default PriceTemplate;
1
+ import React from 'react';
2
+ import { PriceProps } from '../Price';
3
+ export declare type PTemplateProps = {
4
+ formattedAmount?: string;
5
+ formattedCompare?: string;
6
+ } & Omit<PriceProps, 'children'>;
7
+ declare const PriceTemplate: React.FunctionComponent<PTemplateProps>;
8
+ export default PriceTemplate;