tf-checkout-react 1.6.6-beta.36 → 1.6.6-beta.38

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 (39) hide show
  1. package/README.md +353 -32
  2. package/dist/api/checkout.d.ts +1 -0
  3. package/dist/api/index.d.ts +1 -0
  4. package/dist/components/addonsContainer/AddonComponent.d.ts +2 -1
  5. package/dist/components/addonsContainer/SimpleAddonsContainer.d.ts +1 -1
  6. package/dist/components/billing-info-container/hooks/index.d.ts +3 -0
  7. package/dist/components/billing-info-container/hooks/usePaymentContext.d.ts +5 -0
  8. package/dist/components/billing-info-container/hooks/usePaymentRedirect.d.ts +14 -0
  9. package/dist/components/billing-info-container/hooks/useStripePayment.d.ts +18 -0
  10. package/dist/components/billing-info-container/index.d.ts +2 -1
  11. package/dist/components/paymentContainer/index.d.ts +5 -4
  12. package/dist/components/ticketsContainer/index.d.ts +3 -0
  13. package/dist/tf-checkout-react.cjs.development.js +632 -743
  14. package/dist/tf-checkout-react.cjs.development.js.map +1 -1
  15. package/dist/tf-checkout-react.cjs.production.min.js +1 -1
  16. package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
  17. package/dist/tf-checkout-react.esm.js +633 -744
  18. package/dist/tf-checkout-react.esm.js.map +1 -1
  19. package/dist/tf-checkout-styles.css +1 -1
  20. package/dist/types/order-data.d.ts +1 -0
  21. package/package.json +3 -3
  22. package/src/api/checkout.ts +1 -0
  23. package/src/api/index.ts +1 -0
  24. package/src/components/addonsContainer/AddonComponent.tsx +49 -24
  25. package/src/components/addonsContainer/SimpleAddonsContainer.tsx +40 -4
  26. package/src/components/billing-info-container/hooks/index.ts +3 -0
  27. package/src/components/billing-info-container/hooks/usePaymentContext.ts +22 -0
  28. package/src/components/billing-info-container/hooks/usePaymentRedirect.ts +147 -0
  29. package/src/components/billing-info-container/hooks/useStripePayment.ts +121 -0
  30. package/src/components/billing-info-container/index.tsx +188 -135
  31. package/src/components/paymentContainer/OrderDetails.tsx +1 -1
  32. package/src/components/paymentContainer/index.tsx +111 -101
  33. package/src/components/ticketsContainer/index.tsx +7 -0
  34. package/src/types/api/cart.d.ts +8 -0
  35. package/src/types/api/checkout.d.ts +58 -7
  36. package/src/types/order-data.ts +1 -0
  37. package/dist/components/stripePayment/index.d.ts +0 -39
  38. package/src/components/stripePayment/index.tsx +0 -386
  39. package/src/components/stripePayment/style.css +0 -60
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
2
1
  import './style.css';
3
2
  import { ThemeOptions } from '@mui/material';
4
3
  import { CSSProperties } from '@mui/styles';
5
4
  import { AxiosError } from 'axios';
6
5
  import { FormikHelpers, FormikValues } from 'formik';
6
+ import React from 'react';
7
7
  import { IBillingInfoData } from '../../types';
8
8
  import { IAddonContainterProps } from '../addonsContainer';
9
9
  import { IPaymentPage } from '../paymentContainer';
@@ -63,6 +63,7 @@ export interface IBillingInfoPage {
63
63
  addOnDataWithCustomFields?: any;
64
64
  isSinglePageCheckout?: boolean;
65
65
  paymentProps?: Partial<IPaymentPage>;
66
+ paymentSectionAddon?: React.ReactNode;
66
67
  }
67
68
  declare const WithCustomFieldsBillingInfoContainer: (props: any) => JSX.Element;
68
69
  export { WithCustomFieldsBillingInfoContainer as BillingInfoContainer };
@@ -3,9 +3,9 @@ import './style.css';
3
3
  import { ThemeOptions } from '@mui/material';
4
4
  import { CSSProperties } from '@mui/styles';
5
5
  import { StripeElementsOptions } from '@stripe/stripe-js';
6
+ import { StripePaymentElementOptions } from '@stripe/stripe-js';
6
7
  import { AxiosError } from 'axios';
7
8
  import { IPaymentField } from '../../types';
8
- import { ICheckoutForm } from '../stripePayment';
9
9
  export interface IPaymentPage {
10
10
  paymentFields: IPaymentField[];
11
11
  handlePayment: any;
@@ -21,17 +21,18 @@ export interface IPaymentPage {
21
21
  checkbox?: CSSProperties;
22
22
  };
23
23
  elementsOptions?: StripeElementsOptions;
24
+ paymentElementOptions?: StripePaymentElementOptions;
24
25
  onCountdownFinish?: () => void;
25
26
  enableTimer?: boolean;
26
- enablePaymentPlan?: boolean;
27
27
  paymentInfoLabel?: string;
28
28
  orderInfoLabel?: string;
29
29
  displayPaymentButton?: boolean;
30
30
  hidePaymentForm?: boolean;
31
31
  hideFieldsBlock?: boolean;
32
32
  isSinglePageCheckout?: boolean;
33
- stripePaymentProps?: Partial<ICheckoutForm>;
34
33
  stripePublishableKey?: string;
35
34
  stripeAccountId?: string;
35
+ onStripeReady?: (stripe: any, elements: any) => void;
36
+ enablePaymentPlan?: boolean;
36
37
  }
37
- export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError, themeOptions, elementsOptions, onCountdownFinish, enableTimer, enablePaymentPlan, orderInfoLabel, paymentInfoLabel, displayPaymentButton, hidePaymentForm, hideFieldsBlock, isSinglePageCheckout, stripePaymentProps, stripePublishableKey, stripeAccountId, }: IPaymentPage) => JSX.Element;
38
+ export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError, themeOptions, elementsOptions, paymentElementOptions, onCountdownFinish, enableTimer, orderInfoLabel, paymentInfoLabel, displayPaymentButton, hidePaymentForm, hideFieldsBlock, isSinglePageCheckout, stripePublishableKey, stripeAccountId, onStripeReady, enablePaymentPlan, }: IPaymentPage) => JSX.Element;
@@ -10,6 +10,8 @@ interface CartSuccess {
10
10
  total?: string | number;
11
11
  hasAddOn?: boolean;
12
12
  eventSlug?: string;
13
+ cart?: ICart[];
14
+ currencySymbol?: string;
13
15
  }
14
16
  export interface IGetTickets {
15
17
  eventId: number;
@@ -69,6 +71,7 @@ export interface IGetTickets {
69
71
  onReserveButtonClick?: () => void;
70
72
  onPendingVerification?: () => void;
71
73
  showAlertIcons?: boolean;
74
+ submitMode?: 'auto' | 'click';
72
75
  }
73
76
  export interface ITicket {
74
77
  id: string | number;