tf-checkout-react 1.0.99-beta.8 → 1.0.100-beta.0

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 (86) hide show
  1. package/README.md +278 -1
  2. package/dist/api/index.d.ts +6 -1
  3. package/dist/components/account-settings/index.d.ts +3 -0
  4. package/dist/components/billing-info-container/index.d.ts +3 -1
  5. package/dist/components/billing-info-container/utils.d.ts +1 -0
  6. package/dist/components/common/CustomField.d.ts +1 -1
  7. package/dist/components/common/DatePickerField.d.ts +14 -0
  8. package/dist/components/common/Loader.d.ts +2 -0
  9. package/dist/components/common/RadioField.d.ts +11 -0
  10. package/dist/components/common/RedirectModal.d.ts +7 -0
  11. package/dist/components/common/index.d.ts +5 -0
  12. package/dist/components/confirmModal/index.d.ts +9 -0
  13. package/dist/components/confirmationContainer/index.d.ts +2 -1
  14. package/dist/components/countdown/index.d.ts +3 -1
  15. package/dist/components/index.d.ts +1 -0
  16. package/dist/components/myTicketsContainer/tableConfig.d.ts +0 -1
  17. package/dist/components/orderDetailsContainer/index.d.ts +5 -1
  18. package/dist/components/orderDetailsContainer/ticketsTable.d.ts +12 -2
  19. package/dist/components/rsvpContainer/index.d.ts +7 -0
  20. package/dist/components/ticketResale/index.d.ts +10 -0
  21. package/dist/components/ticketResaleModal/index.d.ts +18 -0
  22. package/dist/components/ticketsContainer/AccessCodeSection.d.ts +7 -0
  23. package/dist/components/ticketsContainer/PromoCodeSection.d.ts +6 -8
  24. package/dist/components/ticketsContainer/TicketsSection.d.ts +5 -3
  25. package/dist/components/ticketsContainer/index.d.ts +11 -2
  26. package/dist/components/timerWidget/index.d.ts +3 -3
  27. package/dist/env.d.ts +1 -0
  28. package/dist/images/cross.svg +44 -0
  29. package/dist/images/email.svg +1 -0
  30. package/dist/images/user.svg +1 -0
  31. package/dist/index.d.ts +3 -0
  32. package/dist/tf-checkout-react.cjs.development.js +1636 -585
  33. package/dist/tf-checkout-react.cjs.development.js.map +1 -1
  34. package/dist/tf-checkout-react.cjs.production.min.js +1 -1
  35. package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
  36. package/dist/tf-checkout-react.esm.js +1642 -594
  37. package/dist/tf-checkout-react.esm.js.map +1 -1
  38. package/dist/tf-checkout-styles.css +1 -1
  39. package/package.json +3 -2
  40. package/src/.DS_Store +0 -0
  41. package/src/api/index.ts +44 -11
  42. package/src/assets/images/cross.svg +44 -0
  43. package/src/assets/images/email.svg +1 -0
  44. package/src/assets/images/user.svg +1 -0
  45. package/src/components/.DS_Store +0 -0
  46. package/src/components/account-settings/index.tsx +161 -0
  47. package/src/components/account-settings/style.css +200 -0
  48. package/src/components/billing-info-container/index.tsx +84 -45
  49. package/src/components/billing-info-container/style.css +1 -1
  50. package/src/components/billing-info-container/utils.ts +3 -1
  51. package/src/components/common/CustomField.tsx +6 -6
  52. package/src/components/common/DatePickerField.tsx +98 -0
  53. package/src/components/common/Loader.tsx +10 -0
  54. package/src/components/common/RadioField.tsx +35 -0
  55. package/src/components/common/RedirectModal.tsx +43 -0
  56. package/src/components/common/dist/PhoneNumberField.js +96 -0
  57. package/src/components/common/index.tsx +5 -0
  58. package/src/components/confirmModal/index.tsx +51 -0
  59. package/src/components/confirmModal/style.css +21 -0
  60. package/src/components/confirmationContainer/index.tsx +5 -2
  61. package/src/components/countdown/index.tsx +13 -4
  62. package/src/components/index.ts +1 -0
  63. package/src/components/myTicketsContainer/index.tsx +80 -16
  64. package/src/components/myTicketsContainer/style.css +2 -2
  65. package/src/components/myTicketsContainer/tableConfig.tsx +0 -2
  66. package/src/components/orderDetailsContainer/index.tsx +166 -31
  67. package/src/components/orderDetailsContainer/style.css +8 -7
  68. package/src/components/orderDetailsContainer/ticketsTable.tsx +121 -59
  69. package/src/components/paymentContainer/index.tsx +115 -57
  70. package/src/components/rsvpContainer/index.tsx +126 -0
  71. package/src/components/stripePayment/index.tsx +17 -14
  72. package/src/components/stripePayment/style.css +3 -3
  73. package/src/components/ticketResale/index.tsx +74 -0
  74. package/src/components/ticketResaleModal/index.tsx +213 -0
  75. package/src/components/ticketResaleModal/style.css +28 -0
  76. package/src/components/ticketsContainer/AccessCodeSection.tsx +50 -0
  77. package/src/components/ticketsContainer/PromoCodeSection.tsx +51 -58
  78. package/src/components/ticketsContainer/ReferralLogic.tsx +3 -5
  79. package/src/components/ticketsContainer/TicketsSection.tsx +13 -7
  80. package/src/components/ticketsContainer/index.tsx +150 -82
  81. package/src/components/timerWidget/index.tsx +19 -2
  82. package/src/components/timerWidget/style.css +8 -0
  83. package/src/components/waitingList/index.tsx +1 -1
  84. package/src/env.ts +2 -1
  85. package/src/index.ts +3 -0
  86. package/src/utils/cookies.ts +1 -1
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.
@@ -30,6 +30,11 @@ export declare const getOrders: (page: number, limit: number, eventSlug: string)
30
30
  export declare const getOrderDetails: (orderId: string) => Promise<AxiosResponse<any, any>>;
31
31
  export declare const addToWaitingList: (id: number, data: any) => Promise<AxiosResponse<any, any>>;
32
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>>;
33
35
  export declare const postReferralVisits: (eventId: string, referralId: string) => Promise<AxiosResponse<any, any>>;
34
- export declare const logout: () => void;
36
+ export declare const logout: () => Promise<AxiosResponse<any, any>>;
37
+ export declare const processTicket: (hash: string) => Promise<AxiosResponse<any, any>>;
38
+ export declare const declineInvitation: (hash: string) => Promise<AxiosResponse<any, any>>;
39
+ export declare const sendRSVPInfo: (eventId: number, data: any) => Promise<AxiosResponse<any, any>>;
35
40
  export {};
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import './style.css';
3
+ export declare const AccountSettings: () => JSX.Element;
@@ -40,5 +40,7 @@ export interface IBillingInfoPage {
40
40
  skipPage?: boolean;
41
41
  canSkipHolderNames?: boolean;
42
42
  shouldFetchCountries?: boolean;
43
+ onCountdownFinish?: () => void;
44
+ enableTimer?: boolean;
43
45
  }
44
- 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, }: 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;
@@ -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,2 @@
1
+ /// <reference types="react" />
2
+ export declare function Loader(): JSX.Element;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { FieldInputProps } from 'formik';
3
+ export interface IRadioField {
4
+ label: string | number | JSX.Element;
5
+ field?: FieldInputProps<any>;
6
+ }
7
+ interface IOtherProps {
8
+ [key: string]: any;
9
+ }
10
+ export declare const RadioField: ({ label, field, theme, ...rest }: IRadioField & IOtherProps) => JSX.Element;
11
+ 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 {};
@@ -0,0 +1,5 @@
1
+ export { CheckboxField } from './CheckboxField';
2
+ export { CustomField } from './CustomField';
3
+ export { FormikPhoneNumberField } from './FormikPhoneNumberField';
4
+ export { Loader } from './Loader';
5
+ export { SelectField } from './SelectField';
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import './style.css';
3
+ interface Props {
4
+ message: string;
5
+ onClose: () => void;
6
+ onConfirm: () => void;
7
+ }
8
+ declare const ConfirmModal: FC<Props>;
9
+ export default ConfirmModal;
@@ -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;
@@ -6,7 +6,9 @@ interface CountdownTypes {
6
6
  title?: string;
7
7
  message?: string;
8
8
  showMessage?: boolean;
9
+ disableLeadingZero?: boolean;
9
10
  callback?: () => void;
11
+ isLoggedIn?: boolean;
10
12
  }
11
- declare function Countdown({ startDate, timezone, title, message, showMessage, callback }: CountdownTypes): JSX.Element;
13
+ declare function Countdown({ startDate, timezone, title, message, showMessage, disableLeadingZero, callback, isLoggedIn }: CountdownTypes): JSX.Element;
12
14
  export default Countdown;
@@ -4,3 +4,4 @@ export { PaymentContainer } from './paymentContainer';
4
4
  export { TicketsContainer } from './ticketsContainer';
5
5
  export { MyTicketsContainer } from './myTicketsContainer';
6
6
  export { OrderDetailsContainer } from './orderDetailsContainer';
7
+ export { TicketResaleContainer } from './ticketResale';
@@ -1,5 +1,4 @@
1
1
  declare const tableConfig: (key?: string | undefined) => {
2
- header: string[];
3
2
  body: ((row: any) => any)[];
4
3
  };
5
4
  export default tableConfig;
@@ -1,8 +1,12 @@
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
+ personalLinkIcon?: string;
6
10
  }
7
- export declare const OrderDetailsContainer: ({ onGetOrdersSuccess, onGetOrdersError, }: OrderDetailsTypes) => JSX.Element;
11
+ export declare const OrderDetailsContainer: ({ columns, onGetOrdersSuccess, onGetOrdersError, personalLinkIcon, }: OrderDetailsTypes) => JSX.Element;
8
12
  export {};
@@ -3,16 +3,26 @@ interface IAddOnTypes {
3
3
  name: string;
4
4
  status: string;
5
5
  }
6
- interface ITicketTypes {
6
+ export interface ITicketTypes {
7
7
  add_ons?: IAddOnTypes[];
8
8
  hash: string;
9
9
  ticket_type: string;
10
10
  holder_name: string;
11
11
  status: string;
12
12
  pdf_link: string;
13
+ is_sellable: boolean;
14
+ is_on_sale?: boolean;
15
+ event_name: string;
16
+ currency: string;
17
+ resale_fee_amount: number | string;
18
+ ticket_type_hash: string;
19
+ ticket_type_is_active?: boolean;
13
20
  }
14
21
  interface TicketsTableTypes {
15
22
  tickets: ITicketTypes[];
23
+ handleSellTicket: (ticket: ITicketTypes) => void;
24
+ handleRemoveFromResale: (ticket: ITicketTypes) => void;
25
+ icon?: string;
16
26
  }
17
- declare const TicketsTable: ({ tickets }: TicketsTableTypes) => JSX.Element;
27
+ declare const TicketsTable: ({ tickets, handleSellTicket, handleRemoveFromResale, icon, }: TicketsTableTypes) => JSX.Element;
18
28
  export default TicketsTable;
@@ -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 {};
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { AxiosError } from 'axios';
3
+ export interface ITicketResaleContainer {
4
+ onProcessTicketSuccess: (res: any) => void;
5
+ onProcessTicketError: (e: AxiosError) => void;
6
+ onDeclineTicketPurchaseSuccess: (res: any) => void;
7
+ onDeclineTicketPurchaseError: (e: AxiosError) => void;
8
+ orderHash?: string;
9
+ }
10
+ export declare const TicketResaleContainer: ({ onProcessTicketSuccess, onProcessTicketError, onDeclineTicketPurchaseSuccess, onDeclineTicketPurchaseError, orderHash, }: ITicketResaleContainer) => JSX.Element;
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ import { ITicketTypes } from '../orderDetailsContainer/ticketsTable';
3
+ import './style.css';
4
+ interface Props {
5
+ ticket: ITicketTypes;
6
+ onClose: () => void;
7
+ onSubmit: (values: InitialValuesTypes) => void;
8
+ }
9
+ export interface InitialValuesTypes {
10
+ to: string;
11
+ first_name: string;
12
+ last_name: string;
13
+ email: string;
14
+ confirm_email: string;
15
+ confirm: boolean;
16
+ }
17
+ export declare const TicketResaleModal: ({ ticket, onClose, onSubmit, }: Props) => JSX.Element;
18
+ export {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export interface IAccessCodeSectionProps {
3
+ code: string;
4
+ setCode: (value: string) => void;
5
+ updateTickets: (value: boolean, type?: string) => void;
6
+ }
7
+ export declare const AccessCodeSection: ({ code, setCode, updateTickets }: IAccessCodeSectionProps) => JSX.Element;
@@ -1,13 +1,11 @@
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
- setPromoCode: (value: string) => void;
10
- setPromoCodeUpdated: (value: string) => void;
6
+ setCode: (value: string) => void;
11
7
  setShowPromoInput: (value: boolean) => void;
8
+ updateTickets: (value: boolean, type: string) => void;
9
+ setCodeIsApplied: (value: boolean) => void;
12
10
  }
13
- export declare const PromoCodeSection: ({ promoCode, promoCodeIsApplied, showPromoInput, isPromotionsEnabled, setPromoCode, setPromoCodeUpdated, setShowPromoInput, isAccessCodeEnabled, }: IPromoCodeSectionProps) => JSX.Element;
11
+ export declare const PromoCodeSection: ({ code, codeIsApplied, showPromoInput, setCode, setShowPromoInput, updateTickets, setCodeIsApplied }: IPromoCodeSectionProps) => JSX.Element;
@@ -1,10 +1,12 @@
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
+ sortBySoldOut: boolean;
8
+ ticketsHeaderComponent?: ReactNode;
9
+ hideTicketsHeader: boolean;
8
10
  }
9
- export declare const TicketsSection: ({ ticketsList, selectedTickets, handleTicketSelect, promoCodeIsApplied, }: ITicketsSectionProps) => JSX.Element;
11
+ export declare const TicketsSection: ({ ticketsList, selectedTickets, handleTicketSelect, sortBySoldOut, ticketsHeaderComponent, hideTicketsHeader }: ITicketsSectionProps) => JSX.Element;
10
12
  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';
@@ -7,8 +7,10 @@ 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;
13
+ total?: string;
12
14
  }
13
15
  export interface IGetTickets {
14
16
  eventId: number;
@@ -32,6 +34,13 @@ export interface IGetTickets {
32
34
  hideSessionButtons?: boolean;
33
35
  hideWaitingList?: boolean;
34
36
  enableBillingInfoAutoCreate?: boolean;
37
+ isButtonScrollable?: boolean;
38
+ sortBySoldOut?: boolean;
39
+ disableCountdownLeadingZero?: boolean;
40
+ isLoggedIn?: boolean;
41
+ actionsSectionComponent?: any;
42
+ ticketsHeaderComponent?: ReactNode;
43
+ hideTicketsHeader?: boolean;
35
44
  }
36
45
  export interface ITicket {
37
46
  id: string | number;
@@ -40,5 +49,5 @@ export interface ITicket {
40
49
  export interface ISelectedTickets {
41
50
  [key: string]: string | number;
42
51
  }
43
- export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, onLogoutSuccess, onLogoutError, theme, queryPromoCode, isPromotionsEnabled, themeOptions, isAccessCodeEnabled, hideSessionButtons, hideWaitingList, enableBillingInfoAutoCreate, }: IGetTickets) => JSX.Element;
52
+ export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, onLogoutSuccess, onLogoutError, theme, queryPromoCode, isPromotionsEnabled, themeOptions, isAccessCodeEnabled, hideSessionButtons, hideWaitingList, enableBillingInfoAutoCreate, isButtonScrollable, sortBySoldOut, disableCountdownLeadingZero, isLoggedIn, actionsSectionComponent: ActionsSectionComponent, ticketsHeaderComponent, hideTicketsHeader }: IGetTickets) => JSX.Element;
44
53
  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;
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;