tf-checkout-react 1.0.98 → 1.0.99-beta.10

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 +29 -26
  2. package/dist/components/billing-info-container/index.d.ts +5 -5
  3. package/dist/components/billing-info-container/utils.d.ts +1 -0
  4. package/dist/components/common/RedirectModal.d.ts +7 -0
  5. package/dist/components/common/SnackbarAlert.d.ts +13 -0
  6. package/dist/components/confirmationContainer/index.d.ts +2 -1
  7. package/dist/components/countdown/index.d.ts +2 -1
  8. package/dist/components/ticketsContainer/index.d.ts +6 -1
  9. package/dist/env.d.ts +1 -0
  10. package/dist/index.d.ts +1 -0
  11. package/dist/tf-checkout-react.cjs.development.js +753 -374
  12. package/dist/tf-checkout-react.cjs.development.js.map +1 -1
  13. package/dist/tf-checkout-react.cjs.production.min.js +1 -1
  14. package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
  15. package/dist/tf-checkout-react.esm.js +754 -376
  16. package/dist/tf-checkout-react.esm.js.map +1 -1
  17. package/dist/tf-checkout-styles.css +1 -1
  18. package/dist/utils/cookies.d.ts +3 -0
  19. package/dist/utils/createCheckoutDataBodyWithDefaultHolder.d.ts +6 -1
  20. package/dist/utils/downloadPDF.d.ts +1 -1
  21. package/dist/utils/getDomain.d.ts +1 -0
  22. package/dist/utils/index.d.ts +2 -0
  23. package/package.json +1 -1
  24. package/src/api/index.ts +45 -17
  25. package/src/components/billing-info-container/index.tsx +95 -70
  26. package/src/components/billing-info-container/utils.ts +13 -4
  27. package/src/components/common/CustomField.tsx +6 -3
  28. package/src/components/common/RedirectModal.tsx +43 -0
  29. package/src/components/common/SnackbarAlert.tsx +54 -0
  30. package/src/components/confirmationContainer/index.tsx +5 -2
  31. package/src/components/countdown/index.tsx +3 -1
  32. package/src/components/loginModal/index.tsx +3 -41
  33. package/src/components/myTicketsContainer/index.tsx +60 -1
  34. package/src/components/orderDetailsContainer/index.tsx +11 -4
  35. package/src/components/orderDetailsContainer/ticketsTable.tsx +105 -80
  36. package/src/components/registerModal/index.tsx +3 -10
  37. package/src/components/ticketResaleModal/index.tsx +1 -1
  38. package/src/components/ticketsContainer/PromoCodeSection.tsx +46 -42
  39. package/src/components/ticketsContainer/TicketRow.tsx +12 -6
  40. package/src/components/ticketsContainer/index.tsx +114 -63
  41. package/src/env.ts +2 -1
  42. package/src/index.ts +1 -0
  43. package/src/utils/cookies.ts +42 -0
  44. package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +16 -4
  45. package/src/utils/downloadPDF.tsx +28 -6
  46. package/src/utils/getDomain.ts +15 -0
  47. package/src/utils/index.ts +2 -0
@@ -1,4 +1,4 @@
1
- import { AxiosInstance } from 'axios';
1
+ import { AxiosInstance, AxiosResponse } from 'axios';
2
2
  interface IPublicRequest extends AxiosInstance {
3
3
  setGuestToken: (token: string) => void;
4
4
  setAccessToken: (token: string) => void;
@@ -7,29 +7,32 @@ interface IPublicRequest extends AxiosInstance {
7
7
  export declare const publicRequest: IPublicRequest;
8
8
  export declare const setXSourceOrigin: (sourceOrigin: string) => void;
9
9
  export declare const setCustomHeader: (response: any) => void;
10
- export declare const handleSetAccessToken: (token: any) => void;
11
- export declare function getEvent(id: string | number): Promise<import("axios").AxiosResponse<any, any>>;
12
- export declare function getTickets(id: string | number, promoCode: string): Promise<import("axios").AxiosResponse<any, any>>;
13
- export declare const addToCart: (id: string | number, data: any) => Promise<import("axios").AxiosResponse<any, any>>;
14
- export declare const getCart: () => Promise<import("axios").AxiosResponse<any, any>>;
15
- export declare const postOnCheckout: (data: any, accessToken: string) => Promise<import("axios").AxiosResponse<any, any>>;
16
- export declare const authorize: (data: FormData) => Promise<import("axios").AxiosResponse<any, any>>;
17
- export declare const register: (data: FormData) => Promise<import("axios").AxiosResponse<any, any>>;
18
- export declare const getAccessToken: (data: FormData) => Promise<import("axios").AxiosResponse<any, any>>;
19
- export declare const getPaymentData: (hash: string) => Promise<import("axios").AxiosResponse<any, any>>;
20
- export declare const handlePaymentData: (orderHash: string, data: any) => Promise<import("axios").AxiosResponse<any, any>>;
21
- export declare const handlePaymentSuccess: (orderHash: string) => Promise<import("axios").AxiosResponse<any, any>>;
22
- export declare const handleFreeSuccess: (orderHash: string) => Promise<import("axios").AxiosResponse<any, any>>;
23
- export declare const getProfileData: (accessToken: any) => Promise<any>;
24
- export declare const getCountries: () => Promise<import("axios").AxiosResponse<any, any>>;
25
- export declare const getConfirmationData: (orderHash: string) => Promise<import("axios").AxiosResponse<any, any>>;
26
- export declare const getStates: (countryId: string) => Promise<import("axios").AxiosResponse<any, any>>;
27
- export declare const getOrders: (page: number, limit: number, eventSlug: string) => Promise<import("axios").AxiosResponse<any, any>>;
28
- export declare const getOrderDetails: (orderId: string) => Promise<import("axios").AxiosResponse<any, any>>;
29
- export declare const addToWaitingList: (id: number, data: any) => Promise<import("axios").AxiosResponse<any, any>>;
30
- export declare const getConditions: (eventId: string) => Promise<import("axios").AxiosResponse<any, any>>;
31
- export declare const resaleTicket: (data: any, hash: string) => Promise<import("axios").AxiosResponse<any, any>>;
32
- export declare const removeFromResale: (hash: string) => Promise<import("axios").AxiosResponse<any, any>>;
33
- export declare const postReferralVisits: (eventId: string, referralId: string) => Promise<import("axios").AxiosResponse<any, any>>;
34
- export declare const checkTicketStatus: (hash: string) => Promise<import("axios").AxiosResponse<any, any>>;
10
+ export declare function getEvent(id: string | number): Promise<AxiosResponse<any, any>>;
11
+ export declare function getTickets(id: string | number, promoCode: string): Promise<AxiosResponse<any, any>>;
12
+ export declare const addToCart: (id: string | number, data: any) => Promise<AxiosResponse<any, any>>;
13
+ export declare const getCart: () => Promise<AxiosResponse<any, any>>;
14
+ export declare const postOnCheckout: (data: any, accessToken?: string | undefined) => Promise<AxiosResponse<any, any>>;
15
+ export declare const authorize: (data: {
16
+ email: string;
17
+ password: string;
18
+ }) => Promise<AxiosResponse<any, any>>;
19
+ export declare const register: (data: FormData) => Promise<AxiosResponse<any, any>>;
20
+ export declare const getAccessToken: (data: FormData) => Promise<AxiosResponse<any, any>>;
21
+ export declare const getPaymentData: (hash: string) => Promise<AxiosResponse<any, any>>;
22
+ export declare const handlePaymentData: (orderHash: string, data: any) => Promise<AxiosResponse<any, any>>;
23
+ export declare const handlePaymentSuccess: (orderHash: string) => Promise<AxiosResponse<any, any>>;
24
+ export declare const handleFreeSuccess: (orderHash: string) => Promise<AxiosResponse<any, any>>;
25
+ export declare const getProfileData: (accessToken?: string | undefined) => Promise<any>;
26
+ export declare const getCountries: () => Promise<AxiosResponse<any, any>>;
27
+ export declare const getConfirmationData: (orderHash: string) => Promise<AxiosResponse<any, any>>;
28
+ export declare const getStates: (countryId: string) => Promise<AxiosResponse<any, any>>;
29
+ export declare const getOrders: (page: number, limit: number, eventSlug: string) => Promise<AxiosResponse<any, any>>;
30
+ export declare const getOrderDetails: (orderId: string) => Promise<AxiosResponse<any, any>>;
31
+ export declare const addToWaitingList: (id: number, data: any) => Promise<AxiosResponse<any, any>>;
32
+ export declare const getConditions: (eventId: string) => Promise<AxiosResponse<any, any>>;
33
+ export declare const resaleTicket: (data: any, hash: string) => Promise<AxiosResponse<any, any>>;
34
+ export declare const removeFromResale: (hash: string) => Promise<AxiosResponse<any, any>>;
35
+ export declare const postReferralVisits: (eventId: string, referralId: string) => Promise<AxiosResponse<any, any>>;
36
+ export declare const logout: () => Promise<AxiosResponse<any, any>>;
37
+ export declare const checkTicketStatus: (hash: string) => Promise<AxiosResponse<any, any>>;
35
38
  export {};
@@ -9,10 +9,7 @@ export interface IBillingInfoPage {
9
9
  data?: IBillingInfoData[];
10
10
  ticketHoldersFields?: IBillingInfoData;
11
11
  handleSubmit?: (values: FormikValues, formikHelpers: FormikHelpers<FormikValues>, eventId: any, res: any) => void;
12
- onRegisterSuccess?: (value: {
13
- accessToken: string;
14
- refreshToken: string;
15
- }) => void;
12
+ onRegisterSuccess?: (value: any) => void;
16
13
  onRegisterError?: (e: AxiosError, email: string) => void;
17
14
  onSubmitError?: (e: AxiosError) => void;
18
15
  onGetCartSuccess?: (res: any) => void;
@@ -42,5 +39,8 @@ export interface IBillingInfoPage {
42
39
  onSkipBillingPage: (data: any) => void;
43
40
  skipPage?: boolean;
44
41
  canSkipHolderNames?: boolean;
42
+ shouldFetchCountries?: boolean;
43
+ onCountdownFinish?: () => void;
44
+ enableTimer?: boolean;
45
45
  }
46
- 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, onErrorClose, hideErrorsAlertSection, onSkipBillingPage, skipPage, canSkipHolderNames }: IBillingInfoPage) => JSX.Element;
46
+ 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, onErrorClose, hideErrorsAlertSection, onSkipBillingPage, skipPage, canSkipHolderNames, shouldFetchCountries, onCountdownFinish, enableTimer }: IBillingInfoPage) => JSX.Element;
@@ -26,6 +26,7 @@ interface IUserData {
26
26
  email: string;
27
27
  city?: string;
28
28
  country?: string;
29
+ countryId?: string;
29
30
  phone?: string;
30
31
  streetAddress?: string;
31
32
  state?: string;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface IRedirectModal {
3
+ message: string;
4
+ onClickOk: () => void;
5
+ }
6
+ export declare const RedirectModal: ({ message, onClickOk, }: IRedirectModal) => JSX.Element;
7
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { AlertColor, SnackbarOrigin } from '@mui/material';
3
+ interface ISnackbarAlertProps {
4
+ isOpen: boolean;
5
+ message: string;
6
+ type: AlertColor;
7
+ position?: SnackbarOrigin;
8
+ autoHideDuration?: number;
9
+ variant?: 'filled' | 'standard' | 'outlined';
10
+ onClose: () => void;
11
+ }
12
+ declare const SnackbarAlert: ({ isOpen, message, type, position, autoHideDuration, variant, onClose, }: ISnackbarAlertProps) => JSX.Element;
13
+ export default SnackbarAlert;
@@ -14,6 +14,7 @@ export interface IConfirmationPage {
14
14
  shareButtons: IShareButton[];
15
15
  onGetConfirmationDataSuccess: (res: any) => void;
16
16
  onGetConfirmationDataError: (e: AxiosError) => void;
17
+ onLinkCopied: () => void;
17
18
  orderHash?: string;
18
19
  }
19
- export declare const ConfirmationContainer: ({ isReferralEnabled, showDefaultShareButtons, messengerAppId, shareButtons, onGetConfirmationDataSuccess, onGetConfirmationDataError, orderHash, }: IConfirmationPage) => JSX.Element;
20
+ export declare const ConfirmationContainer: ({ isReferralEnabled, showDefaultShareButtons, messengerAppId, shareButtons, onGetConfirmationDataSuccess, onGetConfirmationDataError, orderHash, onLinkCopied }: IConfirmationPage) => JSX.Element;
@@ -5,7 +5,8 @@ interface CountdownTypes {
5
5
  timezone?: string;
6
6
  title?: string;
7
7
  message?: string;
8
+ showMessage?: boolean;
8
9
  callback?: () => void;
9
10
  }
10
- declare function Countdown({ startDate, timezone, title, message, callback }: CountdownTypes): JSX.Element;
11
+ declare function Countdown({ startDate, timezone, title, message, showMessage, callback }: CountdownTypes): JSX.Element;
11
12
  export default Countdown;
@@ -7,6 +7,7 @@ interface CartSuccess {
7
7
  skip_billing_page: boolean;
8
8
  names_required: boolean;
9
9
  age_required: boolean;
10
+ phone_required: boolean;
10
11
  event_id: string;
11
12
  hash?: string;
12
13
  }
@@ -18,6 +19,8 @@ export interface IGetTickets {
18
19
  onAddToCartError: (e: AxiosError) => void;
19
20
  onGetTicketsSuccess: (response: any) => void;
20
21
  onGetTicketsError: (e: AxiosError) => void;
22
+ onLogoutSuccess: () => void;
23
+ onLogoutError: (e: AxiosError) => void;
21
24
  onLoginSuccess: () => void;
22
25
  theme?: 'light' | 'dark';
23
26
  queryPromoCode?: string;
@@ -29,6 +32,8 @@ export interface IGetTickets {
29
32
  isAccessCodeEnabled?: boolean;
30
33
  hideSessionButtons?: boolean;
31
34
  hideWaitingList?: boolean;
35
+ enableBillingInfoAutoCreate?: boolean;
36
+ isButtonScrollable?: boolean;
32
37
  }
33
38
  export interface ITicket {
34
39
  id: string | number;
@@ -37,5 +42,5 @@ export interface ITicket {
37
42
  export interface ISelectedTickets {
38
43
  [key: string]: string | number;
39
44
  }
40
- export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, theme, queryPromoCode, isPromotionsEnabled, themeOptions, isAccessCodeEnabled, hideSessionButtons, hideWaitingList }: IGetTickets) => JSX.Element;
45
+ export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, onLogoutSuccess, onLogoutError, theme, queryPromoCode, isPromotionsEnabled, themeOptions, isAccessCodeEnabled, hideSessionButtons, hideWaitingList, enableBillingInfoAutoCreate, isButtonScrollable }: IGetTickets) => JSX.Element;
41
46
  export {};
package/dist/env.d.ts CHANGED
@@ -4,6 +4,7 @@ export declare const ENV: {
4
4
  CLIENT_ID: string;
5
5
  CLIENT_SECRET: string;
6
6
  STRIPE_PUBLISHABLE_KEY: string;
7
+ BRAND_SLUG: string;
7
8
  };
8
9
  export declare const ENV_PROD: {
9
10
  EVENT_ID: number;
package/dist/index.d.ts CHANGED
@@ -8,3 +8,4 @@ export { MyTicketsContainer } from './components/myTicketsContainer';
8
8
  export { OrderDetailsContainer } from './components/orderDetailsContainer';
9
9
  export { setConfigs } from './utils/setConfigs';
10
10
  export { TicketResaleContainer } from './components';
11
+ export { RedirectModal } from './components/common/RedirectModal';