tf-checkout-react 1.0.71 → 1.0.75

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 (35) hide show
  1. package/dist/api/index.d.ts +1 -0
  2. package/dist/components/billing-info-container/index.d.ts +4 -2
  3. package/dist/components/common/CheckboxField.d.ts +1 -1
  4. package/dist/components/common/FormikPhoneNumberField.d.ts +1 -1
  5. package/dist/components/confirmationContainer/index.d.ts +2 -1
  6. package/dist/components/paymentContainer/index.d.ts +2 -1
  7. package/dist/components/stripePayment/index.d.ts +2 -1
  8. package/dist/components/ticketsContainer/PromoCodeSection.d.ts +12 -0
  9. package/dist/components/ticketsContainer/index.d.ts +2 -1
  10. package/dist/components/waitingList/index.d.ts +2 -1
  11. package/dist/env.d.ts +2 -2
  12. package/dist/images/done.svg +3 -0
  13. package/dist/tf-checkout-react.cjs.development.js +192 -122
  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 +197 -127
  18. package/dist/tf-checkout-react.esm.js.map +1 -1
  19. package/dist/tf-checkout-styles.css +1 -1
  20. package/dist/utils/setConfigs.d.ts +2 -1
  21. package/package.json +2 -2
  22. package/src/api/index.ts +6 -18
  23. package/src/assets/images/done.svg +3 -0
  24. package/src/components/billing-info-container/index.tsx +36 -21
  25. package/src/components/common/CheckboxField.tsx +1 -0
  26. package/src/components/common/FormikPhoneNumberField.tsx +1 -0
  27. package/src/components/confirmationContainer/index.tsx +59 -43
  28. package/src/components/paymentContainer/index.tsx +86 -45
  29. package/src/components/stripePayment/index.tsx +23 -15
  30. package/src/components/ticketsContainer/PromoCodeSection.tsx +82 -0
  31. package/src/components/ticketsContainer/index.tsx +51 -79
  32. package/src/components/ticketsContainer/style.css +6 -4
  33. package/src/components/waitingList/index.tsx +7 -4
  34. package/src/env.ts +4 -4
  35. 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>>;
@@ -11,7 +11,7 @@ export interface IBillingInfoPage {
11
11
  accessToken: string;
12
12
  refreshToken: string;
13
13
  }) => void;
14
- onRegisterError?: (e: AxiosError) => void;
14
+ onRegisterError?: (e: AxiosError, email: string) => void;
15
15
  onSubmitError?: (e: AxiosError) => void;
16
16
  onGetCartSuccess?: (res: any) => void;
17
17
  onGetCartError?: (e: AxiosError) => void;
@@ -29,6 +29,8 @@ export interface IBillingInfoPage {
29
29
  buttonName?: string;
30
30
  theme?: 'light' | 'dark';
31
31
  isLoggedIn?: boolean;
32
+ accountInfoTitle?: string | JSX.Element;
32
33
  fontFamily?: string;
34
+ hideLogo?: boolean;
33
35
  }
34
- 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 }: IBillingInfoPage) => JSX.Element;
36
+ 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, fontFamily, hideLogo, }: IBillingInfoPage) => JSX.Element;
@@ -7,5 +7,5 @@ export interface ICheckboxField {
7
7
  interface IOtherProps {
8
8
  [key: string]: any;
9
9
  }
10
- export declare const CheckboxField: ({ label, field, selectOptions, theme, ...rest }: ICheckboxField & IOtherProps) => JSX.Element;
10
+ export declare const CheckboxField: ({ label, field, selectOptions, theme, setFieldValue, ...rest }: ICheckboxField & IOtherProps) => JSX.Element;
11
11
  export {};
@@ -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, ...rest }: INumberInField & IOtherProps) => JSX.Element;
10
+ export declare const FormikPhoneNumberField: ({ label, field, form: { touched, errors }, 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;
@@ -14,6 +14,7 @@ export interface IPaymentPage {
14
14
  onGetPaymentDataError: (value: AxiosError) => void;
15
15
  onPaymentError: (value: AxiosError) => void;
16
16
  stripeCardOptions?: StripeCardNumberElementOptions;
17
+ disableZipSection: boolean;
17
18
  fontFamily?: string;
18
19
  }
19
- export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError, stripeCardOptions, fontFamily, }: IPaymentPage) => JSX.Element;
20
+ export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError, stripeCardOptions, disableZipSection, fontFamily, }: 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;
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ export interface IPromoCodeSectionProps {
3
+ promoCode: string;
4
+ promoCodeIsApplied: boolean;
5
+ showPromoInput: boolean;
6
+ isPromotionsEnabled: boolean;
7
+ isAllTicketsSoldOut: boolean;
8
+ setPromoCode: (value: string) => void;
9
+ setPromoCodeUpdated: (value: string) => void;
10
+ setShowPromoInput: (value: boolean) => void;
11
+ }
12
+ export declare const PromoCodeSection: ({ promoCode, promoCodeIsApplied, showPromoInput, isPromotionsEnabled, isAllTicketsSoldOut, setPromoCode, setPromoCodeUpdated, setShowPromoInput, }: IPromoCodeSectionProps) => JSX.Element;
@@ -17,6 +17,7 @@ export interface IGetTickets {
17
17
  onGetTicketsError: (e: AxiosError) => void;
18
18
  theme?: 'light' | 'dark';
19
19
  queryPromoCode?: string;
20
+ isPromotionsEnabled?: boolean;
20
21
  }
21
22
  export interface ITicket {
22
23
  id: string | number;
@@ -25,5 +26,5 @@ export interface ITicket {
25
26
  export interface ISelectedTickets {
26
27
  [key: string]: string | number;
27
28
  }
28
- export declare const TicketsContainer: ({ getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, theme, queryPromoCode }: IGetTickets) => JSX.Element;
29
+ export declare const TicketsContainer: ({ getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, theme, queryPromoCode, isPromotionsEnabled, }: IGetTickets) => JSX.Element;
29
30
  export {};
@@ -3,6 +3,7 @@ import './style.css';
3
3
  interface WaitingListProps {
4
4
  tickets: any;
5
5
  eventId: number;
6
+ isPromotionsEnabled: boolean;
6
7
  }
7
- declare const WaitingList: ({ tickets, eventId }: WaitingListProps) => JSX.Element;
8
+ declare const WaitingList: ({ tickets, eventId, isPromotionsEnabled }: WaitingListProps) => JSX.Element;
8
9
  export default WaitingList;
package/dist/env.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- export declare const ENV_TEST: {
1
+ export declare const ENV: {
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: {
8
+ export declare const ENV_PROD: {
9
9
  EVENT_ID: number;
10
10
  BASE_URL: string;
11
11
  CLIENT_ID: string;
@@ -0,0 +1,3 @@
1
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M10 20C15.5228 20 20 15.5228 20 10C20 4.47717 15.5228 0 10 0C4.47717 0 0 4.47717 0 10C0 15.5228 4.47717 20 10 20ZM8.14661 15.8678L16.8782 6.39722C16.9561 6.31335 17 6.19922 17 6.08008C17 5.96094 16.9561 5.8468 16.8782 5.76282L16.3016 5.12854C16.1386 4.95715 15.8796 4.95715 15.7167 5.12854L7.85004 13.661L4.28326 9.79236C4.20593 9.70776 4.10071 9.66016 3.99084 9.66016C3.9353 9.66016 3.88086 9.67236 3.83069 9.69531C3.78168 9.71777 3.73663 9.75061 3.69843 9.79236L3.12183 10.4177C3.07635 10.4667 3.04248 10.5259 3.02216 10.5905C3.00763 10.6365 3 10.6853 3 10.735C3 10.8541 3.04388 10.9683 3.12183 11.0521L7.56177 15.8678C7.6391 15.9524 7.74438 16 7.85419 16C7.96399 16 8.06927 15.9524 8.14661 15.8678Z" fill="#569F44"/>
3
+ </svg>