tf-checkout-react 1.0.40 → 1.0.44

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 (28) hide show
  1. package/dist/components/billing-info-container/index.d.ts +20 -1
  2. package/dist/components/billing-info-container/utils.d.ts +1 -1
  3. package/dist/components/confirmationContainer/index.d.ts +4 -1
  4. package/dist/components/loginModal/index.d.ts +5 -0
  5. package/dist/components/paymentContainer/index.d.ts +5 -1
  6. package/dist/components/registerModal/index.d.ts +3 -0
  7. package/dist/components/ticketsContainer/index.d.ts +5 -1
  8. package/dist/env.d.ts +2 -2
  9. package/dist/tf-checkout-react.cjs.development.css +1 -1
  10. package/dist/tf-checkout-react.cjs.development.js +387 -144
  11. package/dist/tf-checkout-react.cjs.development.js.map +1 -1
  12. package/dist/tf-checkout-react.cjs.production.min.js +1 -1
  13. package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
  14. package/dist/tf-checkout-react.esm.js +392 -149
  15. package/dist/tf-checkout-react.esm.js.map +1 -1
  16. package/dist/types/billing-info-data.d.ts +2 -1
  17. package/package.json +3 -1
  18. package/src/components/billing-info-container/index.tsx +213 -52
  19. package/src/components/billing-info-container/style.css +15 -0
  20. package/src/components/billing-info-container/utils.ts +38 -11
  21. package/src/components/common/CustomField.tsx +15 -0
  22. package/src/components/confirmationContainer/index.tsx +8 -3
  23. package/src/components/loginModal/index.tsx +38 -6
  24. package/src/components/paymentContainer/index.tsx +10 -0
  25. package/src/components/registerModal/index.tsx +20 -3
  26. package/src/components/ticketsContainer/index.tsx +10 -2
  27. package/src/env.ts +2 -2
  28. package/src/types/billing-info-data.ts +2 -1
@@ -1,12 +1,31 @@
1
1
  /// <reference types="react" />
2
+ import { AxiosError } from 'axios';
2
3
  import { FormikHelpers, FormikValues } from 'formik';
3
4
  import './style.css';
4
5
  import { IBillingInfoData } from '../../types';
5
6
  export interface IBillingInfoPage {
6
7
  data: IBillingInfoData[];
8
+ ticketHoldersFields?: IBillingInfoData;
7
9
  handleSubmit: (values: FormikValues, formikHelpers: FormikHelpers<FormikValues>, res?: any) => void;
10
+ onRegisterSuccess: (value: {
11
+ accessToken: string;
12
+ refreshToken: string;
13
+ }) => void;
14
+ onRegisterError: (e: AxiosError) => void;
15
+ onSubmitError: (e: AxiosError) => void;
16
+ onGetCartSuccess: (res: any) => void;
17
+ onGetCartError: (e: AxiosError) => void;
18
+ onGetCountriesSuccess: (res: any) => void;
19
+ onGetCountriesError: (e: AxiosError) => void;
20
+ onGetStatesSuccess: (res: any) => void;
21
+ onGetStatesError: (e: AxiosError) => void;
22
+ onGetProfileDataSuccess: (res: any) => void;
23
+ onGetProfileDataError: (e: AxiosError) => void;
24
+ onAuthorizeSuccess: () => void;
25
+ onAuthorizeError: (e: AxiosError) => void;
26
+ onLogin: () => void;
8
27
  initialValues?: FormikValues;
9
28
  buttonName?: string;
10
29
  theme?: 'light' | 'dark';
11
30
  }
12
- export declare const BillingInfoContainer: ({ data, initialValues, buttonName, handleSubmit, theme, }: IBillingInfoPage) => JSX.Element;
31
+ export declare const BillingInfoContainer: ({ data, ticketHoldersFields, initialValues, buttonName, handleSubmit, theme, onRegisterSuccess, onRegisterError, onSubmitError, onGetCartSuccess, onGetCartError, onGetCountriesSuccess, onGetCountriesError, onGetStatesSuccess, onGetStatesError, onGetProfileDataSuccess, onGetProfileDataError, onAuthorizeSuccess, onAuthorizeError, onLogin, }: IBillingInfoPage) => JSX.Element;
@@ -38,5 +38,5 @@ export declare const setLoggedUserData: (data: IUserData) => {
38
38
  state: string;
39
39
  zip: string;
40
40
  };
41
- export declare const createCheckoutDataBody: (values?: IValues, logedInValues?: ILoggedInValues, includeDob?: boolean) => ICheckoutBody;
41
+ export declare const createCheckoutDataBody: (ticketsQuantity: number, values?: IValues, logedInValues?: ILoggedInValues, includeDob?: boolean) => ICheckoutBody;
42
42
  export {};
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import './style.css';
3
3
  import { IReferralPromotion } from '../../types';
4
+ import { AxiosError } from 'axios';
4
5
  export interface IShareButton {
5
6
  mainLabel: string;
6
7
  subLabel: string;
@@ -17,5 +18,7 @@ export interface IConfirmationPage {
17
18
  shareLink: string;
18
19
  isReferralEnabled: boolean;
19
20
  shareButtons: IShareButton[];
21
+ onGetConfirmationDataSuccess: (res: any) => void;
22
+ onGetConfirmationDataError: (e: AxiosError) => void;
20
23
  }
21
- export declare const ConfirmationContainer: ({ referralPromotions, shareButtons, shareLink, }: IConfirmationPage) => JSX.Element;
24
+ export declare const ConfirmationContainer: ({ referralPromotions, shareButtons, shareLink, onGetConfirmationDataSuccess, onGetConfirmationDataError, }: IConfirmationPage) => JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import React, { FC } from 'react';
2
+ import { AxiosError } from 'axios';
2
3
  import './style.css';
3
4
  interface Props {
4
5
  onClose: () => void;
@@ -6,6 +7,10 @@ interface Props {
6
7
  alreadyHasUser: boolean;
7
8
  userExpired: boolean;
8
9
  setUserExpired: React.Dispatch<React.SetStateAction<boolean>>;
10
+ onAuthorizeSuccess: (res: any) => void;
11
+ onAuthorizeError: (e: AxiosError) => void;
12
+ onGetProfileDataSuccess: (res: any) => void;
13
+ onGetProfileDataError: (e: AxiosError) => void;
9
14
  }
10
15
  export declare const LoginModal: FC<Props>;
11
16
  export {};
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { AxiosError } from 'axios';
2
3
  import './style.css';
3
4
  import { IPaymentField } from '../../types';
4
5
  export interface IPaymentPage {
@@ -8,5 +9,8 @@ export interface IPaymentPage {
8
9
  formTitle?: string;
9
10
  errorText?: string;
10
11
  onErrorClose?: () => void;
12
+ onGetPaymentDataSuccess: (value: any) => void;
13
+ onGetPaymentDataError: (value: AxiosError) => void;
14
+ onPaymentError: (value: AxiosError) => void;
11
15
  }
12
- export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, }: IPaymentPage) => JSX.Element;
16
+ export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError }: IPaymentPage) => JSX.Element;
@@ -1,8 +1,11 @@
1
1
  import { FC } from 'react';
2
+ import { AxiosError } from 'axios';
2
3
  import './style.css';
3
4
  interface Props {
4
5
  onClose: () => void;
5
6
  onRegister: () => void;
7
+ onGetProfileDataSuccess: (res: any) => void;
8
+ onGetProfileDataError: (e: AxiosError) => void;
6
9
  }
7
10
  export declare const RegisterModal: FC<Props>;
8
11
  export {};
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { AxiosError } from 'axios';
2
3
  import './style.css';
3
4
  interface CartSuccess {
4
5
  skip_billing_page: boolean;
@@ -10,6 +11,9 @@ export interface IGetTickets {
10
11
  onAddToCartSuccess: (response: CartSuccess) => void;
11
12
  getTicketsLabel?: string;
12
13
  contentStyle?: React.CSSProperties;
14
+ onAddToCartError: (e: AxiosError) => void;
15
+ onGetTicketsSuccess: (response: any) => void;
16
+ onGetTicketsError: (e: AxiosError) => void;
13
17
  }
14
18
  export interface ITicket {
15
19
  id: string | number;
@@ -18,5 +22,5 @@ export interface ITicket {
18
22
  export interface ISelectedTickets {
19
23
  [key: string]: string | number;
20
24
  }
21
- export declare const TicketsContainer: ({ getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, }: IGetTickets) => JSX.Element;
25
+ export declare const TicketsContainer: ({ getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, }: IGetTickets) => JSX.Element;
22
26
  export {};
package/dist/env.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- export declare const ENV: {
1
+ export declare const ENV_TEST: {
2
2
  EVENT_ID: number;
3
3
  BASE_URL: string;
4
4
  CLIENT_ID: string;
5
5
  CLIENT_SECRET: string;
6
6
  STRIPE_PUBLISHABLE_KEY: string;
7
7
  };
8
- export declare const ENV_PROD: {
8
+ export declare const ENV: {
9
9
  EVENT_ID: number;
10
10
  BASE_URL: string;
11
11
  CLIENT_ID: string;
@@ -1,4 +1,4 @@
1
- .style_billing-info-container__3ZE3J{margin:0 auto;max-width:800px}.style_billing-info-container__3ZE3J .style_is-half__1W_rP{width:49%}.style_billing-info-container__3ZE3J p{color:#000}.style_billing-info-container__3ZE3J .style_main-header__2OFWa{font-size:2rem;font-weight:600}.style_billing-info-container__twoFields__2tDqt{display:flex;justify-content:space-between;margin-top:15px}.style_billing-info-container__singleField__2bcsf{margin-top:15px}button{margin-top:10px}.style_account-actions-block__16OH-{color:#182026;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif;margin-top:10px}.style_login-register-button__fGgZf,.style_MuiButtonBase-root__1UBk9.style_MuiButton-root__3NzEO,.style_MuiButtonBase-root__1UBk9.style_MuiButton-root__3NzEO:hover{background-color:#212529;border:#f28051;border-radius:5px;color:#fff;cursor:pointer;display:block;font-family:Inter-Bold;font-size:26px;font-weight:700;line-height:1.15;margin-top:10px;min-height:46px;outline:none;overflow:hidden;padding:14px 12px 12px;position:relative;text-align:center;text-overflow:ellipsis;text-transform:uppercase;width:49%}.style_logo-image-container__2A2uH{margin-top:5px;text-align:center;width:49%}.style_logo-image-container__2A2uH img{height:30px}.style_login-block__22kcN{align-items:center;display:flex;flex-direction:column}.style_login-register-button__fGgZf:hover{background-color:#505050!important;border-color:#505050!important}.style_login-register-block__36tu5{display:flex;justify-content:space-between}
1
+ .style_button-container__2bhts{display:flex;justify-content:center;padding:20px}.style_billing-info-container__3ZE3J{margin:0 auto;max-width:800px}.style_billing-info-container__3ZE3J .style_is-half__1W_rP{width:49%}.style_billing-info-container__3ZE3J p{color:#000}.style_billing-info-container__3ZE3J .style_main-header__2OFWa{font-size:2rem;font-weight:600}.style_billing-info-container__twoFields__2tDqt{display:flex;justify-content:space-between;margin-top:15px}.style_billing-info-container__singleField__2bcsf{margin-top:15px}button{margin-top:10px}.style_account-actions-block__16OH-{color:#182026;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif;margin-top:10px}.style_login-register-button__fGgZf,.style_MuiButtonBase-root__1UBk9.style_MuiButton-root__3NzEO,.style_MuiButtonBase-root__1UBk9.style_MuiButton-root__3NzEO:hover{background-color:#212529;border:#f28051;border-radius:5px;color:#fff;cursor:pointer;display:block;font-family:Inter-Bold;font-size:26px;font-weight:700;line-height:1.15;margin-top:10px;min-height:46px;outline:none;overflow:hidden;padding:14px 12px 12px;position:relative;text-align:center;text-overflow:ellipsis;text-transform:uppercase;width:49%}.style_logo-image-container__2A2uH{margin-top:5px;text-align:center;width:49%}.style_logo-image-container__2A2uH img{height:30px}.style_login-block__22kcN{align-items:center;display:flex;flex-direction:column}.style_login-register-button__fGgZf:hover{background-color:#505050!important;border-color:#505050!important}.style_login-register-block__36tu5{display:flex;justify-content:space-between}@media only screen and (max-width:820px){.style_billing-info-container__3ZE3J{width:90%}.style_billing-info-container__3ZE3J .style_main-header__2OFWa{font-size:1.5rem}}
2
2
  .style_modal-title__2sUq_{align-items:center;background-color:#fff;display:flex;font-family:Inter;font-size:18px;font-weight:700;height:49px;line-height:22px;padding-left:25px;position:relative}.style_login-modal-body__2sFg5{padding:15px 25px}.style_login-modal-body__2sFg5 input{background:#fff!important}.style_login-modal-body__email__2nnEH,.style_login-modal-body__password__qS3g7{margin-bottom:20px}.style_login-action-button__1g9qt button{background-color:#212529;border:none;border-radius:0;color:#fff;cursor:pointer;font-size:26px;font-weight:600;height:45px;line-height:18px;margin:10px 0;outline:none;padding:10px;width:100%}.style_login-action-button__1g9qt button:hover{background-color:#505050;border-color:#505050}.style_server_auth__error__1340S{color:red;font-family:Inter;font-size:12px;font-style:normal;padding-left:25px;padding-top:15px}.style_info-text-for-login__28JQf{font-size:14px;margin-bottom:4px;padding-left:10px}
3
3
  .style_register-container___s5V8{margin:0 auto;max-width:800px}.style_register-container___s5V8 .style_is-half__2XhZU{width:49%}.style_register-container__twoFields__3dAvM{display:flex;justify-content:space-between;margin-top:15px}.style_register-container__singleField__36dGU{margin-top:15px}button{margin-top:10px}
4
4
  .style_payment_page__1PUd8{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif}.style_payment_page__1PUd8 .style_order_info_section__J1olw{padding:15px 0}.style_payment_page__1PUd8 .style_order_info_section__J1olw .style_order_info_block__3kZN4{padding-bottom:15px;padding-top:15px}.style_payment_page__1PUd8 .style_order_info_section__J1olw .style_order_info_block__3kZN4 .style_field-underline__2M8Bd{border-bottom:1px solid #000;padding-bottom:15px}.style_payment_page__1PUd8 .style_order_info_section__J1olw .style_order_info_block__3kZN4 .style_order_info_title__1MBgS{font-size:14px;font-weight:700;padding-bottom:3px}.style_payment_page__1PUd8 .style_order_info_section__J1olw .style_order_info_block__3kZN4 .style_order_info_text__3gSEK{font-size:16px;line-height:1.15;outline:none}.style_payment_page__1PUd8 .style_MuiBox-root__2LeaA{margin-left:auto;margin-right:auto;padding:20px;text-align:center}.style_payment_page__1PUd8 .style_payment_info_label__3Zmjp{padding:20px 0;text-align:center}.style_payment_page__1PUd8 .style_payment_form__2arf4{color:#fff;padding:20px}.style_payment_page__1PUd8 .style_payment_form__2arf4 input,.style_payment_page__1PUd8 .style_payment_form__2arf4 label{color:#fff}.style_payment_page__1PUd8 .style_payment_button__3WzAn{padding-top:20px;text-align:center}