tf-checkout-react 1.0.103 → 1.0.106

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 (96) hide show
  1. package/dist/api/index.d.ts +3 -1
  2. package/dist/components/common/CustomField.d.ts +1 -1
  3. package/dist/components/common/DatePickerField.d.ts +14 -0
  4. package/dist/components/common/RedirectModal.d.ts +7 -0
  5. package/dist/components/countdown/index.d.ts +3 -1
  6. package/dist/components/orderDetailsContainer/ticketsTable.d.ts +2 -0
  7. package/dist/components/rsvpContainer/index.d.ts +7 -0
  8. package/dist/components/ticketResale/index.d.ts +5 -3
  9. package/dist/components/ticketsContainer/AccessCodeSection.d.ts +7 -0
  10. package/dist/components/ticketsContainer/PromoCodeSection.d.ts +5 -9
  11. package/dist/components/ticketsContainer/TicketsSection.d.ts +6 -3
  12. package/dist/components/ticketsContainer/index.d.ts +9 -2
  13. package/dist/components/timerWidget/index.d.ts +3 -3
  14. package/dist/images/cross.svg +44 -0
  15. package/dist/images/done.svg +3 -3
  16. package/dist/index.d.ts +2 -0
  17. package/dist/tf-checkout-react.cjs.development.js +639 -223
  18. package/dist/tf-checkout-react.cjs.development.js.map +1 -1
  19. package/dist/tf-checkout-react.cjs.production.min.js +1 -1
  20. package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
  21. package/dist/tf-checkout-react.esm.js +645 -231
  22. package/dist/tf-checkout-react.esm.js.map +1 -1
  23. package/dist/tf-checkout-styles.css +1 -1
  24. package/package.json +89 -89
  25. package/src/.DS_Store +0 -0
  26. package/src/.d.ts +2 -2
  27. package/src/api/index.ts +300 -278
  28. package/src/assets/images/cross.svg +44 -0
  29. package/src/assets/images/done.svg +3 -3
  30. package/src/components/.DS_Store +0 -0
  31. package/src/components/billing-info-container/index.tsx +811 -799
  32. package/src/components/billing-info-container/style.css +105 -105
  33. package/src/components/billing-info-container/utils.ts +225 -224
  34. package/src/components/common/CheckboxField.tsx +41 -41
  35. package/src/components/common/CustomField.tsx +87 -84
  36. package/src/components/common/DatePickerField.tsx +98 -0
  37. package/src/components/common/FormikPhoneNumberField.tsx +51 -51
  38. package/src/components/common/Loader.tsx +9 -9
  39. package/src/components/common/RadioField.tsx +35 -35
  40. package/src/components/common/RedirectModal.tsx +43 -0
  41. package/src/components/common/SelectField.tsx +80 -80
  42. package/src/components/common/SnackbarAlert.tsx +53 -53
  43. package/src/components/common/index.tsx +4 -4
  44. package/src/components/confirmModal/index.tsx +51 -51
  45. package/src/components/confirmModal/style.css +21 -21
  46. package/src/components/confirmationContainer/config.ts +72 -72
  47. package/src/components/confirmationContainer/index.tsx +197 -197
  48. package/src/components/confirmationContainer/social-buttons.tsx +94 -94
  49. package/src/components/confirmationContainer/style.css +202 -202
  50. package/src/components/countdown/index.tsx +98 -89
  51. package/src/components/countdown/style.css +9 -9
  52. package/src/components/index.ts +7 -7
  53. package/src/components/loginModal/index.tsx +209 -209
  54. package/src/components/loginModal/style.css +71 -71
  55. package/src/components/myTicketsContainer/index.tsx +196 -196
  56. package/src/components/myTicketsContainer/row.tsx +41 -41
  57. package/src/components/myTicketsContainer/style.css +39 -39
  58. package/src/components/myTicketsContainer/tableConfig.tsx +34 -34
  59. package/src/components/orderDetailsContainer/index.tsx +252 -249
  60. package/src/components/orderDetailsContainer/style.css +72 -72
  61. package/src/components/orderDetailsContainer/ticketsTable.tsx +130 -124
  62. package/src/components/paymentContainer/index.tsx +285 -284
  63. package/src/components/registerModal/index.tsx +190 -190
  64. package/src/components/rsvpContainer/index.tsx +126 -0
  65. package/src/components/stripePayment/index.tsx +254 -253
  66. package/src/components/stripePayment/style.css +59 -59
  67. package/src/components/ticketResale/index.tsx +74 -56
  68. package/src/components/ticketResaleModal/index.tsx +215 -210
  69. package/src/components/ticketResaleModal/style.css +28 -28
  70. package/src/components/ticketsContainer/AccessCodeSection.tsx +50 -0
  71. package/src/components/ticketsContainer/PromoCodeSection.tsx +88 -99
  72. package/src/components/ticketsContainer/ReferralLogic.tsx +31 -33
  73. package/src/components/ticketsContainer/TicketRow.tsx +83 -83
  74. package/src/components/ticketsContainer/TicketsSection.tsx +90 -81
  75. package/src/components/ticketsContainer/index.tsx +464 -430
  76. package/src/components/ticketsContainer/style.css +181 -181
  77. package/src/components/ticketsContainer/utils.ts +11 -11
  78. package/src/components/timerWidget/index.tsx +87 -70
  79. package/src/components/timerWidget/style.css +34 -26
  80. package/src/components/waitingList/index.tsx +178 -178
  81. package/src/components/waitingList/style.css +26 -26
  82. package/src/env.ts +20 -20
  83. package/src/index.ts +15 -13
  84. package/src/normalizers/index.ts +45 -45
  85. package/src/types/billing-info-data.ts +37 -37
  86. package/src/types/payment-field.ts +7 -7
  87. package/src/types/referral-promotion.ts +7 -7
  88. package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +59 -59
  89. package/src/utils/downloadPDF.tsx +30 -30
  90. package/src/utils/formikErrorFocus.ts +24 -24
  91. package/src/utils/getImage.ts +14 -14
  92. package/src/utils/getQueryVariable.ts +13 -13
  93. package/src/utils/index.ts +5 -5
  94. package/src/utils/setConfigs.ts +26 -26
  95. package/src/utils/showZero.tsx +10 -10
  96. package/src/validators/index.ts +20 -20
@@ -31,5 +31,7 @@ export declare const getConditions: (eventId: string) => Promise<import("axios")
31
31
  export declare const resaleTicket: (data: any, hash: string) => Promise<import("axios").AxiosResponse<any, any>>;
32
32
  export declare const removeFromResale: (hash: string) => Promise<import("axios").AxiosResponse<any, any>>;
33
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>>;
34
+ export declare const processTicket: (hash: string) => Promise<import("axios").AxiosResponse<any, any>>;
35
+ export declare const declineInvitation: (hash: string) => Promise<import("axios").AxiosResponse<any, any>>;
36
+ export declare const sendRSVPInfo: (eventId: number, data: any) => Promise<import("axios").AxiosResponse<any, any>>;
35
37
  export {};
@@ -16,5 +16,5 @@ export interface ICustomField {
16
16
  interface IOtherProps {
17
17
  [key: string]: any;
18
18
  }
19
- export declare const CustomField: ({ label, type, field, selectOptions, form: { touched, errors, submitCount }, theme, }: ICustomField & IOtherProps) => JSX.Element;
19
+ export declare const CustomField: ({ label, type, field, selectOptions, form: { touched, errors, submitCount }, theme, inputProps: pInputProps, InputProps, inputRef, }: ICustomField & IOtherProps) => JSX.Element;
20
20
  export {};
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { FieldInputProps, FormikProps } from 'formik';
3
+ export interface IDatePickerFieldProps {
4
+ label: string;
5
+ field: FieldInputProps<any>;
6
+ form: FormikProps<any>;
7
+ theme: 'dark' | 'light';
8
+ useCompact?: boolean;
9
+ }
10
+ interface IOtherProps {
11
+ [key: string]: any;
12
+ }
13
+ export declare const DatePickerField: ({ label, field, form, theme, useCompact, }: IDatePickerFieldProps & IOtherProps) => JSX.Element;
14
+ export {};
@@ -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 {};
@@ -5,7 +5,9 @@ interface CountdownTypes {
5
5
  timezone?: string;
6
6
  title?: string;
7
7
  message?: string;
8
+ disableLeadingZero?: boolean;
8
9
  callback?: () => void;
10
+ isLoggedIn?: boolean;
9
11
  }
10
- declare function Countdown({ startDate, timezone, title, message, callback }: CountdownTypes): JSX.Element;
12
+ declare function Countdown({ startDate, timezone, title, message, disableLeadingZero, callback, isLoggedIn }: CountdownTypes): JSX.Element;
11
13
  export default Countdown;
@@ -15,6 +15,8 @@ export interface ITicketTypes {
15
15
  event_name: string;
16
16
  currency: string;
17
17
  resale_fee_amount: number | string;
18
+ ticket_type_hash: string;
19
+ ticket_type_is_active?: boolean;
18
20
  }
19
21
  interface TicketsTableTypes {
20
22
  tickets: ITicketTypes[];
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface IRsvpContainerPage {
3
+ showSection?: boolean;
4
+ eventId: number;
5
+ }
6
+ export declare const RsvpContainer: ({ showSection, eventId }: IRsvpContainerPage) => JSX.Element | null;
7
+ export {};
@@ -1,8 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { AxiosError } from 'axios';
3
3
  export interface ITicketResaleContainer {
4
- onCheckTicketStatusSuccess: (res: any) => void;
5
- onCheckTicketStatusError: (e: AxiosError) => void;
4
+ onProcessTicketSuccess: (res: any) => void;
5
+ onProcessTicketError: (e: AxiosError) => void;
6
+ onDeclineTicketPurchaseSuccess: (res: any) => void;
7
+ onDeclineTicketPurchaseError: (e: AxiosError) => void;
6
8
  orderHash?: string;
7
9
  }
8
- export declare const TicketResaleContainer: ({ onCheckTicketStatusSuccess, onCheckTicketStatusError, orderHash, }: ITicketResaleContainer) => JSX.Element;
10
+ export declare const TicketResaleContainer: ({ onProcessTicketSuccess, onProcessTicketError, onDeclineTicketPurchaseSuccess, onDeclineTicketPurchaseError, orderHash, }: ITicketResaleContainer) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export interface IAccessCodeSectionProps {
3
+ code: string;
4
+ setCode: (value: string) => void;
5
+ updateTickets: (value: boolean) => void;
6
+ }
7
+ export declare const AccessCodeSection: ({ code, setCode, updateTickets }: IAccessCodeSectionProps) => JSX.Element;
@@ -1,14 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  export interface IPromoCodeSectionProps {
3
- promoCode: string;
4
- promoCodeIsApplied: boolean;
3
+ code: string;
4
+ codeIsApplied: boolean;
5
5
  showPromoInput: boolean;
6
- isPromotionsEnabled: boolean;
7
- isAllTicketsSoldOut: boolean;
8
- isAccessCodeEnabled?: boolean;
9
- isPromoLoading?: boolean;
10
- setPromoCode: (value: string) => void;
11
- setPromoCodeUpdated: (value: string) => void;
6
+ setCode: (value: string) => void;
12
7
  setShowPromoInput: (value: boolean) => void;
8
+ updateTickets: (value: boolean) => void;
13
9
  }
14
- export declare const PromoCodeSection: ({ promoCode, promoCodeIsApplied, showPromoInput, isPromotionsEnabled, setPromoCode, setPromoCodeUpdated, setShowPromoInput, isAccessCodeEnabled, isPromoLoading, }: IPromoCodeSectionProps) => JSX.Element;
10
+ export declare const PromoCodeSection: ({ code, codeIsApplied, showPromoInput, setCode, setShowPromoInput, updateTickets }: IPromoCodeSectionProps) => JSX.Element;
@@ -1,10 +1,13 @@
1
- /// <reference types="react" />
1
+ import { ReactNode } from 'react';
2
2
  import './style.css';
3
3
  interface ITicketsSectionProps {
4
4
  ticketsList: any;
5
5
  selectedTickets: any;
6
6
  handleTicketSelect: any;
7
- promoCodeIsApplied: boolean;
7
+ codeIsApplied: boolean;
8
+ sortBySoldOut: boolean;
9
+ ticketsHeaderComponent?: ReactNode;
10
+ hideTicketsHeader: boolean;
8
11
  }
9
- export declare const TicketsSection: ({ ticketsList, selectedTickets, handleTicketSelect, promoCodeIsApplied, }: ITicketsSectionProps) => JSX.Element;
12
+ export declare const TicketsSection: ({ ticketsList, selectedTickets, handleTicketSelect, codeIsApplied, sortBySoldOut, ticketsHeaderComponent, hideTicketsHeader }: ITicketsSectionProps) => JSX.Element;
10
13
  export {};
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { AxiosError } from 'axios';
3
3
  import './style.css';
4
4
  import { ThemeOptions } from '@mui/material';
@@ -10,6 +10,7 @@ interface CartSuccess {
10
10
  phone_required: boolean;
11
11
  event_id: string;
12
12
  hash?: string;
13
+ total?: string;
13
14
  }
14
15
  export interface IGetTickets {
15
16
  eventId: number;
@@ -31,6 +32,12 @@ export interface IGetTickets {
31
32
  hideSessionButtons?: boolean;
32
33
  hideWaitingList?: boolean;
33
34
  isButtonScrollable?: boolean;
35
+ sortBySoldOut?: boolean;
36
+ disableCountdownLeadingZero?: boolean;
37
+ isLoggedIn?: boolean;
38
+ actionsSectionComponent?: any;
39
+ ticketsHeaderComponent?: ReactNode;
40
+ hideTicketsHeader?: boolean;
34
41
  }
35
42
  export interface ITicket {
36
43
  id: string | number;
@@ -39,5 +46,5 @@ export interface ITicket {
39
46
  export interface ISelectedTickets {
40
47
  [key: string]: string | number;
41
48
  }
42
- export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, theme, queryPromoCode, isPromotionsEnabled, themeOptions, isAccessCodeEnabled, hideSessionButtons, hideWaitingList, isButtonScrollable }: IGetTickets) => JSX.Element;
49
+ export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, theme, queryPromoCode, isPromotionsEnabled, themeOptions, isAccessCodeEnabled, hideSessionButtons, hideWaitingList, isButtonScrollable, sortBySoldOut, disableCountdownLeadingZero, isLoggedIn, actionsSectionComponent: ActionsSectionComponent, ticketsHeaderComponent, hideTicketsHeader }: IGetTickets) => JSX.Element;
43
50
  export {};
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import './style.css';
3
3
  export interface ITimerWidgetPage {
4
4
  expires_at: number;
@@ -11,5 +11,5 @@ export interface IRenderer {
11
11
  completed: number;
12
12
  handleCountdownFinish: () => void;
13
13
  }
14
- declare const TimerWidget: ({ expires_at, buyLoading, onCountdownFinish, }: ITimerWidgetPage) => JSX.Element | null;
15
- export default TimerWidget;
14
+ declare const _default: React.MemoExoticComponent<({ expires_at, buyLoading, onCountdownFinish, }: ITimerWidgetPage) => JSX.Element | null>;
15
+ export default _default;
@@ -0,0 +1,44 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="94.926px" height="94.926px" viewBox="0 0 94.926 94.926" style="enable-background:new 0 0 94.926 94.926;"
6
+ xml:space="preserve">
7
+ <g>
8
+ <path d="M55.931,47.463L94.306,9.09c0.826-0.827,0.826-2.167,0-2.994L88.833,0.62C88.436,0.224,87.896,0,87.335,0
9
+ c-0.562,0-1.101,0.224-1.498,0.62L47.463,38.994L9.089,0.62c-0.795-0.795-2.202-0.794-2.995,0L0.622,6.096
10
+ c-0.827,0.827-0.827,2.167,0,2.994l38.374,38.373L0.622,85.836c-0.827,0.827-0.827,2.167,0,2.994l5.473,5.476
11
+ c0.397,0.396,0.936,0.62,1.498,0.62s1.1-0.224,1.497-0.62l38.374-38.374l38.374,38.374c0.397,0.396,0.937,0.62,1.498,0.62
12
+ s1.101-0.224,1.498-0.62l5.473-5.476c0.826-0.827,0.826-2.167,0-2.994L55.931,47.463z"/>
13
+ </g>
14
+ <g>
15
+ </g>
16
+ <g>
17
+ </g>
18
+ <g>
19
+ </g>
20
+ <g>
21
+ </g>
22
+ <g>
23
+ </g>
24
+ <g>
25
+ </g>
26
+ <g>
27
+ </g>
28
+ <g>
29
+ </g>
30
+ <g>
31
+ </g>
32
+ <g>
33
+ </g>
34
+ <g>
35
+ </g>
36
+ <g>
37
+ </g>
38
+ <g>
39
+ </g>
40
+ <g>
41
+ </g>
42
+ <g>
43
+ </g>
44
+ </svg>
@@ -1,3 +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>
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>
package/dist/index.d.ts CHANGED
@@ -8,3 +8,5 @@ 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';
12
+ export { RsvpContainer } from './components/rsvpContainer';