tf-checkout-react 1.0.73 → 1.0.77

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 (31) hide show
  1. package/dist/api/index.d.ts +1 -0
  2. package/dist/components/billing-info-container/index.d.ts +9 -3
  3. package/dist/components/billing-info-container/utils.d.ts +1 -0
  4. package/dist/components/confirmationContainer/index.d.ts +2 -1
  5. package/dist/components/paymentContainer/index.d.ts +8 -3
  6. package/dist/components/stripePayment/index.d.ts +2 -1
  7. package/dist/components/ticketsContainer/index.d.ts +1 -0
  8. package/dist/tf-checkout-react.cjs.development.js +215 -119
  9. package/dist/tf-checkout-react.cjs.development.js.map +1 -1
  10. package/dist/tf-checkout-react.cjs.production.min.js +1 -1
  11. package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
  12. package/dist/tf-checkout-react.esm.js +207 -111
  13. package/dist/tf-checkout-react.esm.js.map +1 -1
  14. package/dist/utils/createCheckoutDataBodyWithDefaultHolder.d.ts +7 -0
  15. package/dist/utils/index.d.ts +1 -0
  16. package/dist/utils/setConfigs.d.ts +2 -1
  17. package/package.json +1 -1
  18. package/src/api/index.ts +6 -20
  19. package/src/components/billing-info-container/index.tsx +39 -36
  20. package/src/components/billing-info-container/utils.ts +2 -1
  21. package/src/components/common/CheckboxField.tsx +15 -8
  22. package/src/components/common/CustomField.tsx +7 -0
  23. package/src/components/common/FormikPhoneNumberField.tsx +9 -0
  24. package/src/components/common/SelectField.tsx +5 -1
  25. package/src/components/confirmationContainer/index.tsx +59 -43
  26. package/src/components/paymentContainer/index.tsx +8 -10
  27. package/src/components/stripePayment/index.tsx +24 -16
  28. package/src/components/ticketsContainer/index.tsx +91 -50
  29. package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +51 -0
  30. package/src/utils/index.ts +1 -0
  31. package/src/utils/setConfigs.ts +7 -2
@@ -5,6 +5,7 @@ interface IPublicRequest extends AxiosInstance {
5
5
  setBaseUrl: (baseUrl: string) => void;
6
6
  }
7
7
  export declare const publicRequest: IPublicRequest;
8
+ export declare const setXSourceOrigin: (sourceOrigin: string) => void;
8
9
  export declare const setCustomHeader: (response: any) => void;
9
10
  export declare const handleSetAccessToken: (token: any) => void;
10
11
  export declare function getTickets(id: string | number, promoCode: string): Promise<import("axios").AxiosResponse<any, any>>;
@@ -3,6 +3,8 @@ import { AxiosError } from 'axios';
3
3
  import { FormikHelpers, FormikValues } from 'formik';
4
4
  import './style.css';
5
5
  import { IBillingInfoData } from '../../types';
6
+ import { ThemeOptions } from '@mui/material';
7
+ import { CSSProperties } from '@mui/styled-engine';
6
8
  export interface IBillingInfoPage {
7
9
  data?: IBillingInfoData[];
8
10
  ticketHoldersFields?: IBillingInfoData;
@@ -11,7 +13,7 @@ export interface IBillingInfoPage {
11
13
  accessToken: string;
12
14
  refreshToken: string;
13
15
  }) => void;
14
- onRegisterError?: (e: AxiosError) => void;
16
+ onRegisterError?: (e: AxiosError, email: string) => void;
15
17
  onSubmitError?: (e: AxiosError) => void;
16
18
  onGetCartSuccess?: (res: any) => void;
17
19
  onGetCartError?: (e: AxiosError) => void;
@@ -29,7 +31,11 @@ export interface IBillingInfoPage {
29
31
  buttonName?: string;
30
32
  theme?: 'light' | 'dark';
31
33
  isLoggedIn?: boolean;
32
- fontFamily?: string;
34
+ accountInfoTitle?: string | JSX.Element;
33
35
  hideLogo?: boolean;
36
+ themeOptions?: ThemeOptions & {
37
+ input?: CSSProperties;
38
+ checkbox?: CSSProperties;
39
+ };
34
40
  }
35
- export declare const BillingInfoContainer: ({ data, ticketHoldersFields, initialValues, buttonName, handleSubmit, theme, onRegisterSuccess, onRegisterError, onSubmitError, onGetCartSuccess, onGetCartError, onGetCountriesSuccess, onGetCountriesError, onGetStatesSuccess, onGetStatesError, onGetProfileDataSuccess, onGetProfileDataError, onAuthorizeSuccess, onAuthorizeError, onLogin, onLoginSuccess, isLoggedIn: pIsLoggedIn, fontFamily, hideLogo, }: IBillingInfoPage) => JSX.Element;
41
+ export declare const BillingInfoContainer: ({ data, ticketHoldersFields, initialValues, buttonName, handleSubmit, theme, onRegisterSuccess, onRegisterError, onSubmitError, onGetCartSuccess, onGetCartError, onGetCountriesSuccess, onGetCountriesError, onGetStatesSuccess, onGetStatesError, onGetProfileDataSuccess, onGetProfileDataError, onAuthorizeSuccess, onAuthorizeError, onLogin, onLoginSuccess, isLoggedIn: pIsLoggedIn, accountInfoTitle, hideLogo, themeOptions }: IBillingInfoPage) => JSX.Element;
@@ -30,6 +30,7 @@ interface IUserData {
30
30
  state?: string;
31
31
  zip?: string;
32
32
  zipCode?: string;
33
+ stateId?: string;
33
34
  }
34
35
  export declare const setLoggedUserData: (data: IUserData) => {
35
36
  id: string;
@@ -14,5 +14,6 @@ export interface IConfirmationPage {
14
14
  shareButtons: IShareButton[];
15
15
  onGetConfirmationDataSuccess: (res: any) => void;
16
16
  onGetConfirmationDataError: (e: AxiosError) => void;
17
+ orderHash?: string;
17
18
  }
18
- export declare const ConfirmationContainer: ({ isReferralEnabled, showDefaultShareButtons, messengerAppId, shareButtons, onGetConfirmationDataSuccess, onGetConfirmationDataError, }: IConfirmationPage) => JSX.Element;
19
+ export declare const ConfirmationContainer: ({ isReferralEnabled, showDefaultShareButtons, messengerAppId, shareButtons, onGetConfirmationDataSuccess, onGetConfirmationDataError, orderHash, }: IConfirmationPage) => JSX.Element;
@@ -1,8 +1,9 @@
1
- /// <reference types="react" />
1
+ import { CSSProperties } from 'react';
2
2
  import { AxiosError } from 'axios';
3
3
  import './style.css';
4
4
  import { IPaymentField } from '../../types';
5
5
  import { StripeCardNumberElementOptions } from '@stripe/stripe-js';
6
+ import { ThemeOptions } from '@mui/material';
6
7
  export interface IPaymentPage {
7
8
  paymentFields: IPaymentField[];
8
9
  handlePayment: any;
@@ -14,6 +15,10 @@ export interface IPaymentPage {
14
15
  onGetPaymentDataError: (value: AxiosError) => void;
15
16
  onPaymentError: (value: AxiosError) => void;
16
17
  stripeCardOptions?: StripeCardNumberElementOptions;
17
- fontFamily?: string;
18
+ disableZipSection: boolean;
19
+ themeOptions?: ThemeOptions & {
20
+ input?: CSSProperties;
21
+ checkbox?: CSSProperties;
22
+ };
18
23
  }
19
- export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError, stripeCardOptions, fontFamily, }: IPaymentPage) => JSX.Element;
24
+ export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError, stripeCardOptions, disableZipSection, themeOptions, }: IPaymentPage) => JSX.Element;
@@ -14,6 +14,7 @@ export interface ICheckoutForm {
14
14
  isLoading: any;
15
15
  handleSetLoading: (loading: any) => void;
16
16
  conditions: any;
17
+ disableZipSection: boolean;
17
18
  }
18
- declare const CheckoutForm: ({ total, onSubmit, stripeCardOptions, error, stripe_client_secret, currency, billing_info, isLoading, handleSetLoading, conditions, }: ICheckoutForm) => JSX.Element;
19
+ declare const CheckoutForm: ({ total, onSubmit, stripeCardOptions, error, stripe_client_secret, currency, billing_info, isLoading, handleSetLoading, conditions, disableZipSection, }: ICheckoutForm) => JSX.Element;
19
20
  export default CheckoutForm;
@@ -6,6 +6,7 @@ interface CartSuccess {
6
6
  names_required: boolean;
7
7
  age_required: boolean;
8
8
  event_id: string;
9
+ hash?: string;
9
10
  }
10
11
  export interface IGetTickets {
11
12
  eventId: number;