tf-checkout-react 1.0.106 → 1.2.1

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 (77) hide show
  1. package/README.md +278 -1
  2. package/dist/api/index.d.ts +40 -28
  3. package/dist/components/account-settings/index.d.ts +3 -0
  4. package/dist/components/billing-info-container/index.d.ts +11 -8
  5. package/dist/components/common/PhoneNumberField.d.ts +9 -0
  6. package/dist/components/common/index.d.ts +1 -0
  7. package/dist/components/confirmationContainer/index.d.ts +2 -1
  8. package/dist/components/countdown/index.d.ts +2 -1
  9. package/dist/components/forgotPasswordModal/index.d.ts +11 -0
  10. package/dist/components/index.d.ts +1 -0
  11. package/dist/components/loginModal/index.d.ts +35 -2
  12. package/dist/components/myTicketsContainer/index.d.ts +2 -1
  13. package/dist/components/myTicketsContainer/tableConfig.d.ts +1 -1
  14. package/dist/components/orderDetailsContainer/index.d.ts +6 -1
  15. package/dist/components/orderDetailsContainer/ticketsTable.d.ts +2 -1
  16. package/dist/components/paymentContainer/index.d.ts +2 -1
  17. package/dist/components/resetPasswordContainer/index.d.ts +10 -0
  18. package/dist/components/signupModal/index.d.ts +14 -0
  19. package/dist/components/ticketsContainer/PromoCodeSection.d.ts +3 -2
  20. package/dist/components/ticketsContainer/TicketsSection.d.ts +1 -2
  21. package/dist/components/ticketsContainer/index.d.ts +7 -3
  22. package/dist/index.d.ts +2 -0
  23. package/dist/tf-checkout-react.cjs.development.js +2177 -1482
  24. package/dist/tf-checkout-react.cjs.development.js.map +1 -1
  25. package/dist/tf-checkout-react.cjs.production.min.js +1 -1
  26. package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
  27. package/dist/tf-checkout-react.esm.js +2166 -1473
  28. package/dist/tf-checkout-react.esm.js.map +1 -1
  29. package/dist/tf-checkout-styles.css +1 -1
  30. package/dist/utils/cookies.d.ts +3 -0
  31. package/dist/utils/createCheckoutDataBodyWithDefaultHolder.d.ts +6 -1
  32. package/dist/utils/downloadPDF.d.ts +1 -1
  33. package/dist/utils/getDomain.d.ts +1 -0
  34. package/dist/utils/index.d.ts +2 -0
  35. package/package.json +12 -1
  36. package/src/api/index.ts +100 -29
  37. package/src/components/account-settings/index.tsx +161 -0
  38. package/src/components/account-settings/style.css +200 -0
  39. package/src/components/billing-info-container/index.tsx +145 -99
  40. package/src/components/billing-info-container/style.css +1 -1
  41. package/src/components/billing-info-container/utils.ts +11 -3
  42. package/src/components/common/PhoneNumberField.tsx +68 -0
  43. package/src/components/common/SnackbarAlert.tsx +1 -1
  44. package/src/components/common/dist/PhoneNumberField.js +96 -0
  45. package/src/components/common/index.tsx +1 -0
  46. package/src/components/confirmationContainer/index.tsx +19 -9
  47. package/src/components/countdown/index.tsx +3 -1
  48. package/src/components/forgotPasswordModal/index.tsx +107 -0
  49. package/src/components/forgotPasswordModal/style.css +47 -0
  50. package/src/components/index.ts +1 -0
  51. package/src/components/loginModal/index.tsx +72 -71
  52. package/src/components/myTicketsContainer/index.tsx +99 -95
  53. package/src/components/myTicketsContainer/style.css +2 -2
  54. package/src/components/myTicketsContainer/tableConfig.tsx +3 -6
  55. package/src/components/orderDetailsContainer/index.tsx +80 -21
  56. package/src/components/orderDetailsContainer/style.css +7 -3
  57. package/src/components/orderDetailsContainer/ticketsTable.tsx +130 -83
  58. package/src/components/paymentContainer/index.tsx +114 -49
  59. package/src/components/registerModal/index.tsx +3 -10
  60. package/src/components/resetPasswordContainer/index.tsx +96 -0
  61. package/src/components/resetPasswordContainer/style.css +36 -0
  62. package/src/components/signupModal/index.tsx +195 -0
  63. package/src/components/signupModal/style.css +58 -0
  64. package/src/components/stripePayment/index.tsx +14 -12
  65. package/src/components/stripePayment/style.css +3 -3
  66. package/src/components/ticketResaleModal/index.tsx +12 -14
  67. package/src/components/ticketsContainer/PromoCodeSection.tsx +8 -7
  68. package/src/components/ticketsContainer/TicketRow.tsx +12 -6
  69. package/src/components/ticketsContainer/TicketsSection.tsx +0 -3
  70. package/src/components/ticketsContainer/index.tsx +155 -86
  71. package/src/env.ts +3 -3
  72. package/src/index.ts +3 -1
  73. package/src/utils/cookies.ts +42 -0
  74. package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +16 -4
  75. package/src/utils/downloadPDF.tsx +28 -6
  76. package/src/utils/getDomain.ts +15 -0
  77. package/src/utils/index.ts +2 -0
package/README.md CHANGED
@@ -1,5 +1,280 @@
1
- # react-checkout-module
1
+ # tf-checkout-react
2
+  
2
3
 
4
+ - [About The Project](#about-the-project)
5
+ - [Getting started](#getting-started)
6
+ - [Prerequisites](#prerequisites)
7
+ - [Installation](#installation)
8
+ - [Existing project](#existing-project)
9
+ - [Run Independently](#run-independently)
10
+ - [Usage](#usage)
11
+ - [Set configuration](#set-configuration)
12
+ - [Features/Functionalities](#featuresfunctionalities)
13
+ - [Login](#login)
14
+ - [Tickets Container](#tickets-container)
15
+ - [Billing Container](#billing-container)
16
+ - [Checkout Containers](#checkout-containers)
17
+ - [Confirmation Container](#confirmation-container)
18
+ - [Orders Container](#orders-container)
19
+ - [Order Container](#order-container)
20
+ - [Commands](#commands)
21
+ - [Rollup](#rollup)
22
+ - [TypeScript](#typescript)
23
+ - [GitHub Actions](#github-actions)
24
+
25
+  
26
+ # About The Project
27
+
28
+ This package containes Ticketfairy checkout functionality. Besides that package provides different functionalities connected with checkout functionality, such as `login/register`, `order management functionality`, `resale functionality`, `referrals functionality`, etc.
29
+
30
+  
31
+ # Getting started
32
+ ## Prerequisites
33
+ - node >= 12.14.1
34
+ - npm >= 6.13.4
35
+ ## Installation
36
+ ### Existing project
37
+
38
+ ```
39
+ npm i tf-checkout-react
40
+ ```
41
+ or
42
+ ```
43
+ yarn add tf-checkout-react
44
+ ```
45
+ ### Run Independently
46
+
47
+ - Clone this repo: `git clone https://github.com/theticketfairy/tf-checkout-react.git`
48
+ - Install dependencies: `npm install`
49
+ - Install example app dependencies: `cd example && npm install`
50
+ - Run example app from example folder: `npm start`
51
+
52
+ Project will run under `localhost:3002`. Port can be changed from `package.json`.
53
+
54
+  
55
+
56
+ # Usage
57
+
58
+ ## Set configuration
59
+
60
+ Import `setConfigs` function from the package.
61
+
62
+ ```
63
+ import { setConfigs } from 'tf-checkout-react'
64
+ ```
65
+
66
+ Call it in the root and pass neccesary options. Here are available options:
67
+
68
+ - BASE_URL - need for making API calls (default: `https://www.ticketfairy.com`)
69
+ - EVENT_ID - only for local testing
70
+ - BRAND_SLUG - only for local testing
71
+ - X_SOURCE_ORIGIN - need for local environment. This header will be included in every API request (ex. `houseofx.nyc`)
72
+
73
+  
74
+
75
+ # Features/Functionalities
76
+
77
+ ## Login
78
+
79
+ Used to authenticate user. Import `LoginModal` from package. `LoginModal` component provides login form with validations and error handlings. Also it provides callback functions for every action and API call.
80
+
81
+ ### `props`
82
+
83
+ ```
84
+ interface Props {
85
+ onClose: () => void;
86
+ onLogin: () => void;
87
+ alreadyHasUser?: boolean;
88
+ userExpired?: boolean;
89
+ onAuthorizeSuccess?: (res: any) => void;
90
+ onAuthorizeError?: (e: AxiosError) => void;
91
+ onGetProfileDataSuccess?: (res: any) => void;
92
+ onGetProfileDataError?: (e: AxiosError) => void;
93
+ modalClassname?: string;
94
+ }
95
+ ```
96
+
97
+  
98
+ ## Tickets Container
99
+
100
+ Tickets container/component will retrieve and show a list of tickets corresponding to `eventId`. It also containes `PromoCode`, `AccessCode`, `WaitingLsit` and `SessionButtons` functionalities.
101
+
102
+ ### `props`
103
+
104
+ ```
105
+ interface Props {
106
+ eventId: number;
107
+ getTicketsLabel?: string;
108
+ contentStyle?: React.CSSProperties;
109
+
110
+ onAddToCartSuccess: (response: CartSuccess) => void;
111
+ onAddToCartError: (e: AxiosError) => void;
112
+ onGetTicketsSuccess: (response: any) => void;
113
+ onGetTicketsError: (e: AxiosError) => void;
114
+ onLogoutSuccess: () => void;
115
+ onLogoutError: (e: AxiosError) => void;
116
+ onLoginSuccess: () => void;
117
+
118
+ theme?: 'light' | 'dark';
119
+ themeOptions?: ThemeOptions & {
120
+ input?: CSSProperties;
121
+ checkbox?: CSSProperties;
122
+ };
123
+
124
+ queryPromoCode?: string;
125
+ isPromotionsEnabled?: boolean;
126
+ isAccessCodeEnabled?: boolean;
127
+
128
+ hideSessionButtons?: boolean;
129
+ hideWaitingList?: boolean;
130
+ enableBillingInfoAutoCreate?: boolean;
131
+ isButtonScrollable?: boolean;
132
+ sortBySoldOut?: boolean;
133
+ disableCountdownLeadingZero?: boolean;
134
+ }
135
+ ```
136
+
137
+  
138
+ ## Billing Container
139
+
140
+ Billing container provides form for filling user's data. Form contains `user info`, `age` and `ticket holders` sections. Depending on event's requirements billing information form may differ. Form will autofill all available information and in case of all required fields are autofilled, billing page will redirect to payment page. Form submition will automatically register new user, if there is no existing user with provided email.
141
+
142
+ ### `props`
143
+
144
+ ```
145
+ interface Props {
146
+ data?: IBillingInfoData[];
147
+ ticketHoldersFields?: IBillingInfoData;
148
+ initialValues?: FormikValues;
149
+ handleSubmit?: (
150
+ values: FormikValues,
151
+ formikHelpers: FormikHelpers<FormikValues>,
152
+ eventId: any,
153
+ res: any
154
+ ) => void;
155
+ onSubmitError?: (e: AxiosError) => void;
156
+
157
+ onRegisterSuccess?: (value: any) => void;
158
+ onRegisterError?: (e: AxiosError, email: string) => void;
159
+ onGetCartSuccess?: (res: any) => void;
160
+ onGetCartError?: (e: AxiosError) => void;
161
+ onGetCountriesSuccess?: (res: any) => void;
162
+ onGetCountriesError?: (e: AxiosError) => void;
163
+ onGetStatesSuccess?: (res: any) => void;
164
+ onGetStatesError?: (e: AxiosError) => void;
165
+ onGetProfileDataSuccess?: (res: any) => void;
166
+ onGetProfileDataError?: (e: AxiosError) => void;
167
+ onAuthorizeSuccess?: () => void;
168
+ onAuthorizeError?: (e: AxiosError) => void;
169
+ onSkipBillingPage: (data: any) => void;
170
+ onCountdownFinish?: () => void;
171
+
172
+ isLoggedIn?: boolean;
173
+ onLogin?: () => void;
174
+ onLoginSuccess?: () => void;
175
+ onErrorClose?: () => void;
176
+
177
+ theme?: 'light' | 'dark';
178
+ themeOptions?: ThemeOptions & {
179
+ input?: CSSProperties;
180
+ checkbox?: CSSProperties;
181
+ };
182
+
183
+ buttonName?: string;
184
+ accountInfoTitle?: string | JSX.Element;
185
+ hideLogo?: boolean;
186
+ hideErrorsAlertSection?: boolean;
187
+ skipPage?: boolean;
188
+ canSkipHolderNames?: boolean;
189
+ shouldFetchCountries?: boolean;
190
+ enableTimer?: boolean;
191
+ }
192
+ ```
193
+
194
+ &nbsp;
195
+ ## Checkout Containers
196
+
197
+ Will show the order details and a card form that the user will need to fill with its card details.
198
+ TicketFairy doesn't store any card related data, we use [Stripe](https://stripe.com/) as payments solution.
199
+
200
+ ### `props`
201
+
202
+ ```
203
+ interface Props {
204
+ paymentFields: IPaymentField[];
205
+ handlePayment: any;
206
+ checkoutData: any;
207
+ formTitle?: string;
208
+ errorText?: string;
209
+ onErrorClose?: () => void;
210
+ onGetPaymentDataSuccess: (value: any) => void;
211
+ onGetPaymentDataError: (value: AxiosError) => void;
212
+ onPaymentError: (value: AxiosError) => void;
213
+ stripeCardOptions?: StripeCardNumberElementOptions;
214
+ disableZipSection: boolean;
215
+ themeOptions?: ThemeOptions & {
216
+ input?: CSSProperties;
217
+ checkbox?: CSSProperties;
218
+ };
219
+ elementsOptions?: StripeElementsOptions;
220
+ onCountdownFinish?: () => void;
221
+ enableTimer?: boolean;
222
+ }
223
+ ```
224
+
225
+ &nbsp;
226
+ ## Confirmation Container
227
+
228
+ This is shown once the payment is successfully completed, could show components to share the purchase in social media or refer it with friends to get discounts on the purchase.
229
+
230
+ ### `props`
231
+
232
+ ```
233
+ interface Props {
234
+ isReferralEnabled: boolean;
235
+ showDefaultShareButtons: boolean;
236
+ messengerAppId: string;
237
+ shareButtons: IShareButton[];
238
+ orderHash?: string;
239
+
240
+ onGetConfirmationDataSuccess: (res: any) => void;
241
+ onGetConfirmationDataError: (e: AxiosError) => void;
242
+ onLinkCopied: () => void;
243
+ }
244
+ ```
245
+
246
+ &nbsp;
247
+ ## Orders Container
248
+
249
+ Will show the purchased orders for the logged user.
250
+
251
+ ### `props`
252
+
253
+ ```
254
+ interface Props {
255
+ handleDetailsInfo: (id: string) => void;
256
+ onGetOrdersSuccess: (res: any) => void;
257
+ onGetOrdersError: (err: any) => void;
258
+
259
+ theme?: 'light' | 'dark';
260
+ }
261
+ ```
262
+
263
+ &nbsp;
264
+ ## Order Container
265
+
266
+ Will show the purchased order details. Contains `order PDF download` and `ticket resale` functionalities. Currently both functionalities are enabled by default.
267
+
268
+ ### `props`
269
+
270
+ ```
271
+ interface Props {
272
+ onGetOrderSuccess: (res: any) => void;
273
+ onGetOrderError: (err: any) => void;
274
+ }
275
+ ```
276
+
277
+ &nbsp;
3
278
  ## Commands
4
279
 
5
280
  TSDX scaffolds your new library inside `/src`, and also sets up a [Parcel-based](https://parceljs.org) playground for it inside `/example`.
@@ -24,10 +299,12 @@ The default example imports and live reloads whatever is in `/dist`, so if you a
24
299
 
25
300
  To do a one-off build, use `npm run build` or `yarn build`.
26
301
 
302
+ &nbsp;
27
303
  ### Rollup
28
304
 
29
305
  TSDX uses [Rollup](https://rollupjs.org) as a bundler and generates multiple rollup configs for various module formats and build settings. See [Optimizations](#optimizations) for details.
30
306
 
307
+ &nbsp;
31
308
  ### TypeScript
32
309
 
33
310
  `tsconfig.json` is set up to interpret `dom` and `esnext` types, as well as `react` for `jsx`. Adjust according to your needs.
@@ -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,31 +7,43 @@ 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 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>>;
10
+ export declare const handleSetAccessToken: (token: string) => void;
11
+ export declare function getEvent(id: string | number): Promise<AxiosResponse<any, any>>;
12
+ export declare function getTickets(id: string | number, promoCode: string): Promise<AxiosResponse<any, any>>;
13
+ export declare const addToCart: (id: string | number, data: any) => Promise<AxiosResponse<any, any>>;
14
+ export declare const getCart: () => Promise<AxiosResponse<any, any>>;
15
+ export declare const postOnCheckout: (data: any, accessToken?: string | undefined) => Promise<AxiosResponse<any, any>>;
16
+ export declare const authorize: (data: {
17
+ email: string;
18
+ password: string;
19
+ }) => Promise<AxiosResponse<any, any>>;
20
+ export declare const register: (data: FormData) => Promise<AxiosResponse<any, any>>;
21
+ export declare const getAccessToken: (data: FormData) => Promise<AxiosResponse<any, any>>;
22
+ export declare const getPaymentData: (hash: string) => Promise<AxiosResponse<any, any>>;
23
+ export declare const handlePaymentData: (orderHash: string, data: any) => Promise<AxiosResponse<any, any>>;
24
+ export declare const handlePaymentSuccess: (orderHash: string) => Promise<AxiosResponse<any, any>>;
25
+ export declare const handleFreeSuccess: (orderHash: string) => Promise<AxiosResponse<any, any>>;
26
+ export declare const getProfileData: (accessToken?: string | undefined) => Promise<any>;
27
+ export declare const getCountries: () => Promise<AxiosResponse<any, any>>;
28
+ export declare const getConfirmationData: (orderHash: string) => Promise<AxiosResponse<any, any>>;
29
+ export declare const getStates: (countryId: string) => Promise<AxiosResponse<any, any>>;
30
+ export declare const getOrders: (page: number, limit: number, eventSlug: string) => Promise<AxiosResponse<any, any>>;
31
+ export declare const getOrderDetails: (orderId: string) => Promise<AxiosResponse<any, any>>;
32
+ export declare const addToWaitingList: (id: number, data: any) => Promise<AxiosResponse<any, any>>;
33
+ export declare const getConditions: (eventId: string) => Promise<AxiosResponse<any, any>>;
34
+ export declare const resaleTicket: (data: any, hash: string) => Promise<AxiosResponse<any, any>>;
35
+ export declare const removeFromResale: (hash: string) => Promise<AxiosResponse<any, any>>;
36
+ export declare const postReferralVisits: (eventId: string, referralId: string) => Promise<AxiosResponse<any, any>>;
37
+ export declare const logout: () => Promise<AxiosResponse<any, any>>;
38
+ export declare const forgotPassword: (email: string) => Promise<AxiosResponse<any, any>>;
39
+ interface IResetPasswordData {
40
+ token: string;
41
+ password: string;
42
+ confirmPassword: string;
43
+ }
44
+ export declare const resetPassword: (data: IResetPasswordData) => Promise<AxiosResponse<any, any>>;
45
+ export declare const processTicket: (hash: string) => Promise<AxiosResponse<any, any>>;
46
+ export declare const declineInvitation: (hash: string) => Promise<AxiosResponse<any, any>>;
47
+ export declare const sendRSVPInfo: (eventId: number, data: any) => Promise<AxiosResponse<any, any>>;
48
+ export declare const validatePhoneNumber: (phone: string) => Promise<any>;
37
49
  export {};
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import './style.css';
3
+ export declare const AccountSettings: () => JSX.Element;
@@ -1,18 +1,15 @@
1
1
  /// <reference types="react" />
2
- import { AxiosError } from 'axios';
3
- import { FormikHelpers, FormikValues } from 'formik';
4
2
  import './style.css';
5
- import { IBillingInfoData } from '../../types';
6
3
  import { ThemeOptions } from '@mui/material';
7
4
  import { CSSProperties } from '@mui/styles';
5
+ import { AxiosError } from 'axios';
6
+ import { FormikHelpers, FormikValues } from 'formik';
7
+ import { IBillingInfoData } from '../../types';
8
8
  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,7 +39,13 @@ export interface IBillingInfoPage {
42
39
  onSkipBillingPage: (data: any) => void;
43
40
  skipPage?: boolean;
44
41
  canSkipHolderNames?: boolean;
42
+ shouldFetchCountries?: boolean;
43
+ onForgotPasswordSuccess?: (res: any) => void;
44
+ onForgotPasswordError?: (e: AxiosError) => void;
45
45
  onCountdownFinish?: () => void;
46
46
  enableTimer?: boolean;
47
+ logo?: string;
48
+ showForgotPasswordButton?: boolean;
49
+ showSignUpButton?: boolean;
47
50
  }
48
- 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, onCountdownFinish, enableTimer }: IBillingInfoPage) => JSX.Element;
51
+ 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, onForgotPasswordSuccess, onForgotPasswordError, shouldFetchCountries, onCountdownFinish, enableTimer, logo, showForgotPasswordButton, showSignUpButton }: IBillingInfoPage) => JSX.Element;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { FieldInputProps, FormikProps } from 'formik';
3
+ export interface IPhoneNumberField {
4
+ label: string;
5
+ field: FieldInputProps<any>;
6
+ form: FormikProps<any>;
7
+ type: string;
8
+ }
9
+ export declare const PhoneNumberField: ({ label, type, field, form: { errors, setFieldError, setStatus }, }: IPhoneNumberField) => JSX.Element;
@@ -1,5 +1,6 @@
1
1
  export { CheckboxField } from './CheckboxField';
2
2
  export { CustomField } from './CustomField';
3
3
  export { FormikPhoneNumberField } from './FormikPhoneNumberField';
4
+ export { PhoneNumberField } from './PhoneNumberField';
4
5
  export { Loader } from './Loader';
5
6
  export { SelectField } from './SelectField';
@@ -8,6 +8,7 @@ export interface IShareButton {
8
8
  shareData: any;
9
9
  }
10
10
  export interface IConfirmationPage {
11
+ hasCopyIcon?: boolean;
11
12
  isReferralEnabled: boolean;
12
13
  showDefaultShareButtons: boolean;
13
14
  messengerAppId: string;
@@ -17,4 +18,4 @@ export interface IConfirmationPage {
17
18
  onLinkCopied: () => void;
18
19
  orderHash?: string;
19
20
  }
20
- export declare const ConfirmationContainer: ({ isReferralEnabled, showDefaultShareButtons, messengerAppId, shareButtons, onGetConfirmationDataSuccess, onGetConfirmationDataError, orderHash, onLinkCopied }: IConfirmationPage) => JSX.Element;
21
+ export declare const ConfirmationContainer: ({ hasCopyIcon, isReferralEnabled, showDefaultShareButtons, messengerAppId, shareButtons, onGetConfirmationDataSuccess, onGetConfirmationDataError, orderHash, onLinkCopied }: IConfirmationPage) => JSX.Element;
@@ -5,9 +5,10 @@ interface CountdownTypes {
5
5
  timezone?: string;
6
6
  title?: string;
7
7
  message?: string;
8
+ showMessage?: boolean;
8
9
  disableLeadingZero?: boolean;
9
10
  callback?: () => void;
10
11
  isLoggedIn?: boolean;
11
12
  }
12
- declare function Countdown({ startDate, timezone, title, message, disableLeadingZero, callback, isLoggedIn }: CountdownTypes): JSX.Element;
13
+ declare function Countdown({ startDate, timezone, title, message, showMessage, disableLeadingZero, callback, isLoggedIn }: CountdownTypes): JSX.Element;
13
14
  export default Countdown;
@@ -0,0 +1,11 @@
1
+ import { FC } from 'react';
2
+ import { AxiosError } from 'axios';
3
+ import './style.css';
4
+ interface IForgotPasswordProps {
5
+ onClose: () => void;
6
+ onLogin: () => void;
7
+ onForgotPasswordSuccess: (res: any) => void;
8
+ onForgotPasswordError: (e: AxiosError) => void;
9
+ }
10
+ export declare const ForgotPasswordModal: FC<IForgotPasswordProps>;
11
+ export {};
@@ -4,4 +4,5 @@ export { PaymentContainer } from './paymentContainer';
4
4
  export { TicketsContainer } from './ticketsContainer';
5
5
  export { MyTicketsContainer } from './myTicketsContainer';
6
6
  export { OrderDetailsContainer } from './orderDetailsContainer';
7
+ export { ResetPasswordContainer } from './resetPasswordContainer';
7
8
  export { TicketResaleContainer } from './ticketResale';
@@ -1,6 +1,6 @@
1
- import { FC } from 'react';
2
- import { AxiosError } from 'axios';
3
1
  import './style.css';
2
+ import { AxiosError } from 'axios';
3
+ import { FC } from 'react';
4
4
  interface Props {
5
5
  onClose: () => void;
6
6
  onLogin: () => void;
@@ -10,7 +10,40 @@ interface Props {
10
10
  onAuthorizeError?: (e: AxiosError) => void;
11
11
  onGetProfileDataSuccess?: (res: any) => void;
12
12
  onGetProfileDataError?: (e: AxiosError) => void;
13
+ onForgotPassword?: () => void;
14
+ onSignup?: () => void;
13
15
  modalClassname?: string;
16
+ logo?: string;
17
+ showForgotPasswordButton?: boolean;
18
+ showSignUpButton?: boolean;
19
+ }
20
+ interface IUserData {
21
+ id: string;
22
+ firstName: string;
23
+ lastName: string;
24
+ email: string;
25
+ city?: string;
26
+ country?: string;
27
+ countryId?: string;
28
+ phone?: string;
29
+ streetAddress?: string;
30
+ state?: string;
31
+ zip?: string;
32
+ zipCode?: string;
33
+ stateId?: string;
14
34
  }
35
+ export declare const setLoggedUserData: (data: IUserData) => {
36
+ id: string;
37
+ first_name: string;
38
+ last_name: string;
39
+ email: string;
40
+ confirmEmail: string;
41
+ city: string;
42
+ country: string;
43
+ phone: string;
44
+ street_address: string;
45
+ state: string;
46
+ zip: string;
47
+ };
15
48
  export declare const LoginModal: FC<Props>;
16
49
  export {};
@@ -4,7 +4,8 @@ interface MyTicketsTypes {
4
4
  handleDetailsInfo: (id: string) => void;
5
5
  onGetOrdersSuccess: (res: any) => void;
6
6
  onGetOrdersError: (err: any) => void;
7
+ logo?: string;
7
8
  theme?: 'light' | 'dark';
8
9
  }
9
- export declare const MyTicketsContainer: ({ handleDetailsInfo, onGetOrdersSuccess, onGetOrdersError, theme, }: MyTicketsTypes) => JSX.Element;
10
+ export declare const MyTicketsContainer: ({ handleDetailsInfo, onGetOrdersSuccess, onGetOrdersError, theme, logo, }: MyTicketsTypes) => JSX.Element;
10
11
  export {};
@@ -1,5 +1,5 @@
1
1
  declare const tableConfig: (key?: string | undefined) => {
2
- header: string[];
2
+ header: never[];
3
3
  body: ((row: any) => any)[];
4
4
  };
5
5
  export default tableConfig;
@@ -1,8 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  import './style.css';
3
3
  interface OrderDetailsTypes {
4
+ columns: Array<{
5
+ label: string;
6
+ }>;
4
7
  onGetOrdersSuccess: (res: any) => void;
5
8
  onGetOrdersError: (err: any) => void;
9
+ onReturnButtonClick: (data: any) => void;
10
+ personalLinkIcon?: string;
6
11
  }
7
- export declare const OrderDetailsContainer: ({ onGetOrdersSuccess, onGetOrdersError, }: OrderDetailsTypes) => JSX.Element;
12
+ export declare const OrderDetailsContainer: ({ columns, onGetOrdersSuccess, onGetOrdersError, onReturnButtonClick, personalLinkIcon, }: OrderDetailsTypes) => JSX.Element;
8
13
  export {};
@@ -22,6 +22,7 @@ interface TicketsTableTypes {
22
22
  tickets: ITicketTypes[];
23
23
  handleSellTicket: (ticket: ITicketTypes) => void;
24
24
  handleRemoveFromResale: (ticket: ITicketTypes) => void;
25
+ icon?: string;
25
26
  }
26
- declare const TicketsTable: ({ tickets, handleSellTicket, handleRemoveFromResale }: TicketsTableTypes) => JSX.Element;
27
+ declare const TicketsTable: ({ tickets, handleSellTicket, handleRemoveFromResale, icon, }: TicketsTableTypes) => JSX.Element;
27
28
  export default TicketsTable;
@@ -25,5 +25,6 @@ export interface IPaymentPage {
25
25
  elementsOptions?: StripeElementsOptions;
26
26
  onCountdownFinish?: () => void;
27
27
  enableTimer?: boolean;
28
+ enablePaymentPlan?: boolean;
28
29
  }
29
- export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError, stripeCardOptions, disableZipSection, themeOptions, elementsOptions, onCountdownFinish, enableTimer, }: IPaymentPage) => JSX.Element;
30
+ export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError, stripeCardOptions, disableZipSection, themeOptions, elementsOptions, onCountdownFinish, enableTimer, enablePaymentPlan, }: IPaymentPage) => JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { AxiosError } from 'axios';
3
+ import './style.css';
4
+ interface IResetPasswordProps {
5
+ token?: string;
6
+ onResetPasswordSuccess?: (res: any) => void;
7
+ onResetPasswordError?: (e: AxiosError) => void;
8
+ }
9
+ export declare const ResetPasswordContainer: FC<IResetPasswordProps>;
10
+ export {};
@@ -0,0 +1,14 @@
1
+ import { FC } from 'react';
2
+ import { AxiosError } from 'axios';
3
+ import './style.css';
4
+ interface ISignupProps {
5
+ onClose: () => void;
6
+ onLogin: () => void;
7
+ onRegisterSuccess: (value: {
8
+ accessToken: string;
9
+ refreshToken: string;
10
+ }) => void;
11
+ onRegisterError: (e: AxiosError, email: string) => void;
12
+ }
13
+ export declare const SignupModal: FC<ISignupProps>;
14
+ export {};
@@ -5,6 +5,7 @@ export interface IPromoCodeSectionProps {
5
5
  showPromoInput: boolean;
6
6
  setCode: (value: string) => void;
7
7
  setShowPromoInput: (value: boolean) => void;
8
- updateTickets: (value: boolean) => void;
8
+ updateTickets: (value: boolean, type: string) => void;
9
+ setCodeIsApplied: (value: boolean) => void;
9
10
  }
10
- export declare const PromoCodeSection: ({ code, codeIsApplied, showPromoInput, setCode, setShowPromoInput, updateTickets }: IPromoCodeSectionProps) => JSX.Element;
11
+ export declare const PromoCodeSection: ({ code, codeIsApplied, showPromoInput, setCode, setShowPromoInput, updateTickets, setCodeIsApplied }: IPromoCodeSectionProps) => JSX.Element;
@@ -4,10 +4,9 @@ interface ITicketsSectionProps {
4
4
  ticketsList: any;
5
5
  selectedTickets: any;
6
6
  handleTicketSelect: any;
7
- codeIsApplied: boolean;
8
7
  sortBySoldOut: boolean;
9
8
  ticketsHeaderComponent?: ReactNode;
10
9
  hideTicketsHeader: boolean;
11
10
  }
12
- export declare const TicketsSection: ({ ticketsList, selectedTickets, handleTicketSelect, codeIsApplied, sortBySoldOut, ticketsHeaderComponent, hideTicketsHeader }: ITicketsSectionProps) => JSX.Element;
11
+ export declare const TicketsSection: ({ ticketsList, selectedTickets, handleTicketSelect, sortBySoldOut, ticketsHeaderComponent, hideTicketsHeader }: ITicketsSectionProps) => JSX.Element;
13
12
  export {};