tf-checkout-react 1.6.6-beta.35 → 1.6.6-beta.37

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 (40) hide show
  1. package/README.md +353 -32
  2. package/dist/api/index.d.ts +1 -0
  3. package/dist/components/addonsContainer/AddonComponent.d.ts +2 -1
  4. package/dist/components/addonsContainer/SimpleAddonsContainer.d.ts +1 -1
  5. package/dist/components/billing-info-container/hooks/index.d.ts +3 -0
  6. package/dist/components/billing-info-container/hooks/usePaymentContext.d.ts +5 -0
  7. package/dist/components/billing-info-container/hooks/usePaymentRedirect.d.ts +14 -0
  8. package/dist/components/billing-info-container/hooks/useStripePayment.d.ts +18 -0
  9. package/dist/components/billing-info-container/index.d.ts +2 -1
  10. package/dist/components/confirmationContainer/index.d.ts +3 -1
  11. package/dist/components/orderDetailsContainer/index.d.ts +2 -1
  12. package/dist/components/paymentContainer/index.d.ts +3 -4
  13. package/dist/components/ticketsContainer/index.d.ts +3 -0
  14. package/dist/tf-checkout-react.cjs.development.js +665 -752
  15. package/dist/tf-checkout-react.cjs.development.js.map +1 -1
  16. package/dist/tf-checkout-react.cjs.production.min.js +1 -1
  17. package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
  18. package/dist/tf-checkout-react.esm.js +677 -764
  19. package/dist/tf-checkout-react.esm.js.map +1 -1
  20. package/dist/tf-checkout-styles.css +1 -1
  21. package/dist/types/order-data.d.ts +1 -0
  22. package/package.json +1 -1
  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 +175 -135
  31. package/src/components/confirmationContainer/index.tsx +18 -0
  32. package/src/components/orderDetailsContainer/index.tsx +19 -2
  33. package/src/components/paymentContainer/OrderDetails.tsx +1 -1
  34. package/src/components/paymentContainer/index.tsx +109 -101
  35. package/src/components/ticketsContainer/index.tsx +7 -0
  36. package/src/types/api/cart.d.ts +8 -0
  37. package/src/types/order-data.ts +1 -0
  38. package/dist/components/stripePayment/index.d.ts +0 -39
  39. package/src/components/stripePayment/index.tsx +0 -386
  40. package/src/components/stripePayment/style.css +0 -60
@@ -36,5 +36,7 @@ export interface IConfirmationPage {
36
36
  showReferralsInfoText?: boolean;
37
37
  showCopyInfoModal?: boolean;
38
38
  showPricingNoteSection?: boolean;
39
+ showOrderDetailsBtn?: boolean;
40
+ onOrderDetailsClick?: (data: ICheckoutCompleteData) => void;
39
41
  }
40
- export declare const ConfirmationContainer: ({ confirmationLabels, hasCopyIcon, isReferralEnabled, showDefaultShareButtons, messengerAppId, shareButtons, onGetConfirmationDataSuccess, onGetConfirmationDataError, orderHash, onLinkCopied, clientLabel, showReferralsInfoText, showCopyInfoModal, showPricingNoteSection, }: IConfirmationPage) => JSX.Element;
42
+ export declare const ConfirmationContainer: ({ confirmationLabels, hasCopyIcon, isReferralEnabled, showDefaultShareButtons, messengerAppId, shareButtons, onGetConfirmationDataSuccess, onGetConfirmationDataError, orderHash, onLinkCopied, clientLabel, showReferralsInfoText, showCopyInfoModal, showPricingNoteSection, showOrderDetailsBtn, onOrderDetailsClick, }: IConfirmationPage) => JSX.Element;
@@ -35,6 +35,7 @@ interface OrderDetailsTypes {
35
35
  referralTitle?: string;
36
36
  itemsTitle?: string;
37
37
  ticketsTitle?: string;
38
+ displayLoading?: boolean;
38
39
  }
39
40
  export interface CustomFieldOption {
40
41
  id: string;
@@ -60,5 +61,5 @@ export interface CustomFieldTypes {
60
61
  ticketHash?: string;
61
62
  options?: CustomFieldOption[];
62
63
  }
63
- export declare const OrderDetailsContainer: ({ columns, onGetOrdersSuccess, onGetOrdersError, onRemoveFromResaleSuccess, onRemoveFromResaleError, onResaleTicketSuccess, onResaleTicketError, onUpdateOrderCustomFieldsSuccess, onUpdateOrderCustomFieldsError, onUpdateTicketHolderCustomFieldsSuccess, onUpdateTicketHolderCustomFieldsError, onReturnButtonClick, personalLinkIcon, displayColumnNameInRow, canSellTicket, ticketsTableColumns, ordersPath, orderId: pOrderId, referralTitle, itemsTitle, ticketsTitle, themeOptions, }: OrderDetailsTypes) => JSX.Element;
64
+ export declare const OrderDetailsContainer: ({ columns, onGetOrdersSuccess, onGetOrdersError, onRemoveFromResaleSuccess, onRemoveFromResaleError, onResaleTicketSuccess, onResaleTicketError, onUpdateOrderCustomFieldsSuccess, onUpdateOrderCustomFieldsError, onUpdateTicketHolderCustomFieldsSuccess, onUpdateTicketHolderCustomFieldsError, onReturnButtonClick, personalLinkIcon, displayColumnNameInRow, canSellTicket, ticketsTableColumns, ordersPath, orderId: pOrderId, referralTitle, itemsTitle, ticketsTitle, themeOptions, displayLoading, }: OrderDetailsTypes) => JSX.Element;
64
65
  export {};
@@ -5,7 +5,6 @@ import { CSSProperties } from '@mui/styles';
5
5
  import { StripeElementsOptions } from '@stripe/stripe-js';
6
6
  import { AxiosError } from 'axios';
7
7
  import { IPaymentField } from '../../types';
8
- import { ICheckoutForm } from '../stripePayment';
9
8
  export interface IPaymentPage {
10
9
  paymentFields: IPaymentField[];
11
10
  handlePayment: any;
@@ -23,15 +22,15 @@ export interface IPaymentPage {
23
22
  elementsOptions?: StripeElementsOptions;
24
23
  onCountdownFinish?: () => void;
25
24
  enableTimer?: boolean;
26
- enablePaymentPlan?: boolean;
27
25
  paymentInfoLabel?: string;
28
26
  orderInfoLabel?: string;
29
27
  displayPaymentButton?: boolean;
30
28
  hidePaymentForm?: boolean;
31
29
  hideFieldsBlock?: boolean;
32
30
  isSinglePageCheckout?: boolean;
33
- stripePaymentProps?: Partial<ICheckoutForm>;
34
31
  stripePublishableKey?: string;
35
32
  stripeAccountId?: string;
33
+ onStripeReady?: (stripe: any, elements: any) => void;
34
+ enablePaymentPlan?: boolean;
36
35
  }
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;
36
+ export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError, themeOptions, elementsOptions, 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;