tf-checkout-react 1.0.74 → 1.0.78

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 (47) hide show
  1. package/dist/api/index.d.ts +2 -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/common/FormikPhoneNumberField.d.ts +1 -1
  5. package/dist/components/confirmationContainer/index.d.ts +2 -1
  6. package/dist/components/countdown/index.d.ts +11 -0
  7. package/dist/components/orderDetailsContainer/ticketsTable.d.ts +13 -1
  8. package/dist/components/paymentContainer/index.d.ts +8 -3
  9. package/dist/components/stripePayment/index.d.ts +2 -1
  10. package/dist/components/ticketsContainer/index.d.ts +3 -1
  11. package/dist/components/waitingList/index.d.ts +1 -2
  12. package/dist/tf-checkout-react.cjs.development.js +549 -218
  13. package/dist/tf-checkout-react.cjs.development.js.map +1 -1
  14. package/dist/tf-checkout-react.cjs.production.min.js +1 -1
  15. package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
  16. package/dist/tf-checkout-react.esm.js +541 -210
  17. package/dist/tf-checkout-react.esm.js.map +1 -1
  18. package/dist/tf-checkout-styles.css +1 -1
  19. package/dist/utils/createCheckoutDataBodyWithDefaultHolder.d.ts +7 -0
  20. package/dist/utils/downloadPDF.d.ts +1 -0
  21. package/dist/utils/index.d.ts +2 -0
  22. package/dist/utils/setConfigs.d.ts +2 -1
  23. package/package.json +2 -1
  24. package/src/api/index.ts +15 -20
  25. package/src/components/billing-info-container/index.tsx +39 -36
  26. package/src/components/billing-info-container/utils.ts +2 -1
  27. package/src/components/common/CheckboxField.tsx +15 -8
  28. package/src/components/common/CustomField.tsx +7 -0
  29. package/src/components/common/FormikPhoneNumberField.tsx +11 -1
  30. package/src/components/common/SelectField.tsx +5 -1
  31. package/src/components/confirmationContainer/index.tsx +59 -43
  32. package/src/components/countdown/index.tsx +89 -0
  33. package/src/components/countdown/style.css +10 -0
  34. package/src/components/loginModal/index.tsx +2 -0
  35. package/src/components/orderDetailsContainer/ticketsTable.tsx +66 -60
  36. package/src/components/paymentContainer/index.tsx +8 -10
  37. package/src/components/stripePayment/index.tsx +24 -16
  38. package/src/components/ticketsContainer/PromoCodeSection.tsx +3 -2
  39. package/src/components/ticketsContainer/TicketsSection.tsx +10 -6
  40. package/src/components/ticketsContainer/index.tsx +193 -42
  41. package/src/components/ticketsContainer/style.css +7 -0
  42. package/src/components/waitingList/index.tsx +3 -9
  43. package/src/components/waitingList/style.css +4 -2
  44. package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +51 -0
  45. package/src/utils/downloadPDF.tsx +22 -0
  46. package/src/utils/index.ts +2 -0
  47. package/src/utils/setConfigs.ts +7 -2
@@ -5,8 +5,10 @@ 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;
11
+ export declare function getEvent(id: string | number): Promise<import("axios").AxiosResponse<any, any>>;
10
12
  export declare function getTickets(id: string | number, promoCode: string): Promise<import("axios").AxiosResponse<any, any>>;
11
13
  export declare const addToCart: (id: string | number, data: any) => Promise<import("axios").AxiosResponse<any, any>>;
12
14
  export declare const getCart: () => 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;
@@ -7,5 +7,5 @@ export interface INumberInField {
7
7
  interface IOtherProps {
8
8
  [key: string]: any;
9
9
  }
10
- export declare const FormikPhoneNumberField: ({ label, field, form: { touched, errors }, setFieldValue, selectOptions, ...rest }: INumberInField & IOtherProps) => JSX.Element;
10
+ export declare const FormikPhoneNumberField: ({ label, field, form: { touched, errors, initialValues }, setFieldValue, selectOptions, ...rest }: INumberInField & IOtherProps) => JSX.Element;
11
11
  export {};
@@ -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;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import './style.css';
3
+ interface CountdownTypes {
4
+ startDate: string;
5
+ timezone?: string;
6
+ title?: string;
7
+ message?: string;
8
+ callback?: () => void;
9
+ }
10
+ declare function Countdown({ startDate, timezone, title, message, callback }: CountdownTypes): JSX.Element;
11
+ export default Countdown;
@@ -1,6 +1,18 @@
1
1
  /// <reference types="react" />
2
+ interface IAddOnTypes {
3
+ name: string;
4
+ status: string;
5
+ }
6
+ interface ITicketTypes {
7
+ add_ons?: IAddOnTypes[];
8
+ hash: string;
9
+ ticket_type: string;
10
+ holder_name: string;
11
+ status: string;
12
+ pdf_link: string;
13
+ }
2
14
  interface TicketsTableTypes {
3
- tickets: any[];
15
+ tickets: ITicketTypes[];
4
16
  }
5
17
  declare const TicketsTable: ({ tickets }: TicketsTableTypes) => JSX.Element;
6
18
  export default TicketsTable;
@@ -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;
@@ -15,6 +16,7 @@ export interface IGetTickets {
15
16
  onAddToCartError: (e: AxiosError) => void;
16
17
  onGetTicketsSuccess: (response: any) => void;
17
18
  onGetTicketsError: (e: AxiosError) => void;
19
+ onLoginSuccess: () => void;
18
20
  theme?: 'light' | 'dark';
19
21
  queryPromoCode?: string;
20
22
  isPromotionsEnabled?: boolean;
@@ -26,5 +28,5 @@ export interface ITicket {
26
28
  export interface ISelectedTickets {
27
29
  [key: string]: string | number;
28
30
  }
29
- export declare const TicketsContainer: ({ getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, theme, queryPromoCode, isPromotionsEnabled, }: IGetTickets) => JSX.Element;
31
+ export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, theme, queryPromoCode, isPromotionsEnabled, }: IGetTickets) => JSX.Element;
30
32
  export {};
@@ -3,7 +3,6 @@ import './style.css';
3
3
  interface WaitingListProps {
4
4
  tickets: any;
5
5
  eventId: number;
6
- isPromotionsEnabled: boolean;
7
6
  }
8
- declare const WaitingList: ({ tickets, eventId, isPromotionsEnabled }: WaitingListProps) => JSX.Element;
7
+ declare const WaitingList: ({ tickets, eventId }: WaitingListProps) => JSX.Element;
9
8
  export default WaitingList;