@commercelayer/react-components 4.21.0-beta.1 → 4.21.0-beta.2

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.
@@ -1000,6 +1000,7 @@ interface OrderPayload {
1000
1000
  include?: ResourceIncluded[] | undefined;
1001
1001
  includeLoaded?: ResourceIncludedLoaded;
1002
1002
  withoutIncludes?: boolean;
1003
+ manageAdyenGiftCard?: boolean;
1003
1004
  }
1004
1005
  type OrderState = Partial<OrderPayload>;
1005
1006
  interface OrderActions {
@@ -1716,14 +1717,14 @@ type Props$12 = {
1716
1717
  } & Omit<BaseInputComponentProps, 'name'> & Omit<JSX.IntrinsicElements['input'], 'children'> & Omit<JSX.IntrinsicElements['textarea'], 'children'>;
1717
1718
  declare function GiftCardInput(props: Props$12): JSX.Element;
1718
1719
 
1719
- interface ChildrenProps$j extends Omit<Props$11, 'children' | 'type'> {
1720
+ interface ChildrenProps$j extends Omit<Props$11, "children" | "type"> {
1720
1721
  code?: string | null;
1721
1722
  hide?: boolean;
1722
1723
  discountAmountCents?: number | null;
1723
1724
  discountAmountFloat?: number | null;
1724
1725
  formattedDiscountAmount?: string | null;
1725
1726
  }
1726
- interface Props$11 extends Omit<JSX.IntrinsicElements['span'], 'children'> {
1727
+ interface Props$11 extends Omit<JSX.IntrinsicElements["span"], "children"> {
1727
1728
  type?: CodeType;
1728
1729
  children?: ChildrenFunction<ChildrenProps$j>;
1729
1730
  }
@@ -1748,7 +1749,7 @@ type Props$$ = {
1748
1749
  } & Omit<BaseInputComponentProps, 'name' | 'type'> & Omit<JSX.IntrinsicElements['input'], 'children'> & Omit<JSX.IntrinsicElements['textarea'], 'children'>;
1749
1750
  declare function GiftCardOrCouponInput(props: Props$$): JSX.Element | null;
1750
1751
 
1751
- interface ChildrenProps$i extends Omit<Props$_, 'children' | 'onClick'> {
1752
+ interface ChildrenProps$i extends Omit<Props$_, "children" | "onClick"> {
1752
1753
  codeType?: OrderCodeType;
1753
1754
  hide?: boolean;
1754
1755
  handleClick?: () => void;
@@ -1761,7 +1762,7 @@ type Props$_ = {
1761
1762
  success: boolean;
1762
1763
  order?: Order;
1763
1764
  }) => void;
1764
- } & Omit<JSX.IntrinsicElements['button'], 'type' | 'onClick'>;
1765
+ } & Omit<JSX.IntrinsicElements["button"], "type" | "onClick">;
1765
1766
  declare function GiftCardOrCouponRemoveButton(props: Props$_): JSX.Element | null;
1766
1767
 
1767
1768
  interface ChildrenProps$h extends Omit<Props$Z, 'children'> {
@@ -2096,11 +2097,11 @@ interface Props$I extends Omit<JSX.IntrinsicElements['a'], 'children'> {
2096
2097
  */
2097
2098
  declare function CartLink(props: Props$I): JSX.Element | null;
2098
2099
 
2099
- interface ChildrenProps$b extends Omit<Props$H, 'children'> {
2100
+ interface ChildrenProps$b extends Omit<Props$H, "children"> {
2100
2101
  checkoutUrl: string;
2101
2102
  href: string;
2102
2103
  }
2103
- interface Props$H extends Omit<JSX.IntrinsicElements['a'], 'children'> {
2104
+ interface Props$H extends Omit<JSX.IntrinsicElements["a"], "children"> {
2104
2105
  children?: ChildrenFunction<ChildrenProps$b>;
2105
2106
  /**
2106
2107
  * Label for the checkout link
@@ -2124,7 +2125,7 @@ declare function CheckoutLink(props: Props$H): JSX.Element;
2124
2125
 
2125
2126
  declare function DiscountAmount(props: BaseAmountComponent): JSX.Element;
2126
2127
 
2127
- declare function GiftCardAmount(props: BaseAmountComponent): JSX.Element;
2128
+ declare function GiftCardAmount(props: BaseAmountComponent): JSX.Element | null;
2128
2129
 
2129
2130
  interface Props$G {
2130
2131
  children: DefaultChildrenType;
@@ -2144,6 +2145,10 @@ interface Props$G {
2144
2145
  * Callback called when the order is updated
2145
2146
  */
2146
2147
  fetchOrder?: (order: Order) => void;
2148
+ /**
2149
+ * Indicate if Adyen gift card management is enabled
2150
+ */
2151
+ manageAdyenGiftCard?: boolean;
2147
2152
  }
2148
2153
  /**
2149
2154
  * This component is responsible for fetching the order and store it in its context.
@@ -2688,7 +2693,7 @@ declare function SubTotalAmount(props: BaseAmountComponent): JSX.Element;
2688
2693
 
2689
2694
  declare function TaxesAmount(props: BaseAmountComponent): JSX.Element;
2690
2695
 
2691
- declare function TotalAmount(props: BaseAmountComponent): JSX.Element;
2696
+ declare function TotalAmount(props: BaseAmountComponent): JSX.Element | null;
2692
2697
 
2693
2698
  type ParcelFieldChildrenProps = TGenericChildrenProps<TResources['Parcel']>;
2694
2699
  type TCondition$3 = ConditionalElement<Exclude<TResources['Parcel'], 'resource'>>;
@@ -1000,6 +1000,7 @@ interface OrderPayload {
1000
1000
  include?: ResourceIncluded[] | undefined;
1001
1001
  includeLoaded?: ResourceIncludedLoaded;
1002
1002
  withoutIncludes?: boolean;
1003
+ manageAdyenGiftCard?: boolean;
1003
1004
  }
1004
1005
  type OrderState = Partial<OrderPayload>;
1005
1006
  interface OrderActions {
@@ -1716,14 +1717,14 @@ type Props$12 = {
1716
1717
  } & Omit<BaseInputComponentProps, 'name'> & Omit<JSX.IntrinsicElements['input'], 'children'> & Omit<JSX.IntrinsicElements['textarea'], 'children'>;
1717
1718
  declare function GiftCardInput(props: Props$12): JSX.Element;
1718
1719
 
1719
- interface ChildrenProps$j extends Omit<Props$11, 'children' | 'type'> {
1720
+ interface ChildrenProps$j extends Omit<Props$11, "children" | "type"> {
1720
1721
  code?: string | null;
1721
1722
  hide?: boolean;
1722
1723
  discountAmountCents?: number | null;
1723
1724
  discountAmountFloat?: number | null;
1724
1725
  formattedDiscountAmount?: string | null;
1725
1726
  }
1726
- interface Props$11 extends Omit<JSX.IntrinsicElements['span'], 'children'> {
1727
+ interface Props$11 extends Omit<JSX.IntrinsicElements["span"], "children"> {
1727
1728
  type?: CodeType;
1728
1729
  children?: ChildrenFunction<ChildrenProps$j>;
1729
1730
  }
@@ -1748,7 +1749,7 @@ type Props$$ = {
1748
1749
  } & Omit<BaseInputComponentProps, 'name' | 'type'> & Omit<JSX.IntrinsicElements['input'], 'children'> & Omit<JSX.IntrinsicElements['textarea'], 'children'>;
1749
1750
  declare function GiftCardOrCouponInput(props: Props$$): JSX.Element | null;
1750
1751
 
1751
- interface ChildrenProps$i extends Omit<Props$_, 'children' | 'onClick'> {
1752
+ interface ChildrenProps$i extends Omit<Props$_, "children" | "onClick"> {
1752
1753
  codeType?: OrderCodeType;
1753
1754
  hide?: boolean;
1754
1755
  handleClick?: () => void;
@@ -1761,7 +1762,7 @@ type Props$_ = {
1761
1762
  success: boolean;
1762
1763
  order?: Order;
1763
1764
  }) => void;
1764
- } & Omit<JSX.IntrinsicElements['button'], 'type' | 'onClick'>;
1765
+ } & Omit<JSX.IntrinsicElements["button"], "type" | "onClick">;
1765
1766
  declare function GiftCardOrCouponRemoveButton(props: Props$_): JSX.Element | null;
1766
1767
 
1767
1768
  interface ChildrenProps$h extends Omit<Props$Z, 'children'> {
@@ -2096,11 +2097,11 @@ interface Props$I extends Omit<JSX.IntrinsicElements['a'], 'children'> {
2096
2097
  */
2097
2098
  declare function CartLink(props: Props$I): JSX.Element | null;
2098
2099
 
2099
- interface ChildrenProps$b extends Omit<Props$H, 'children'> {
2100
+ interface ChildrenProps$b extends Omit<Props$H, "children"> {
2100
2101
  checkoutUrl: string;
2101
2102
  href: string;
2102
2103
  }
2103
- interface Props$H extends Omit<JSX.IntrinsicElements['a'], 'children'> {
2104
+ interface Props$H extends Omit<JSX.IntrinsicElements["a"], "children"> {
2104
2105
  children?: ChildrenFunction<ChildrenProps$b>;
2105
2106
  /**
2106
2107
  * Label for the checkout link
@@ -2124,7 +2125,7 @@ declare function CheckoutLink(props: Props$H): JSX.Element;
2124
2125
 
2125
2126
  declare function DiscountAmount(props: BaseAmountComponent): JSX.Element;
2126
2127
 
2127
- declare function GiftCardAmount(props: BaseAmountComponent): JSX.Element;
2128
+ declare function GiftCardAmount(props: BaseAmountComponent): JSX.Element | null;
2128
2129
 
2129
2130
  interface Props$G {
2130
2131
  children: DefaultChildrenType;
@@ -2144,6 +2145,10 @@ interface Props$G {
2144
2145
  * Callback called when the order is updated
2145
2146
  */
2146
2147
  fetchOrder?: (order: Order) => void;
2148
+ /**
2149
+ * Indicate if Adyen gift card management is enabled
2150
+ */
2151
+ manageAdyenGiftCard?: boolean;
2147
2152
  }
2148
2153
  /**
2149
2154
  * This component is responsible for fetching the order and store it in its context.
@@ -2688,7 +2693,7 @@ declare function SubTotalAmount(props: BaseAmountComponent): JSX.Element;
2688
2693
 
2689
2694
  declare function TaxesAmount(props: BaseAmountComponent): JSX.Element;
2690
2695
 
2691
- declare function TotalAmount(props: BaseAmountComponent): JSX.Element;
2696
+ declare function TotalAmount(props: BaseAmountComponent): JSX.Element | null;
2692
2697
 
2693
2698
  type ParcelFieldChildrenProps = TGenericChildrenProps<TResources['Parcel']>;
2694
2699
  type TCondition$3 = ConditionalElement<Exclude<TResources['Parcel'], 'resource'>>;