tf-checkout-react 1.6.6-beta.2 → 1.6.6-beta.23

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 +61 -40
  2. package/dist/adapters/customFields.d.ts +1 -0
  3. package/dist/api/common.d.ts +1 -0
  4. package/dist/api/index.d.ts +1 -0
  5. package/dist/api/preRegistrationComplete.d.ts +1 -1
  6. package/dist/components/addonsContainer/AddonComponent.d.ts +5 -1
  7. package/dist/components/addonsContainer/index.d.ts +4 -1
  8. package/dist/components/billing-info-container/index.d.ts +1 -0
  9. package/dist/components/common/DatePickerField.d.ts +7 -1
  10. package/dist/components/forgotPasswordModal/index.d.ts +2 -1
  11. package/dist/components/orderDetailsContainer/index.d.ts +7 -1
  12. package/dist/components/preRegistration/FieldsSection.d.ts +7 -1
  13. package/dist/components/preRegistration/PreRegistrationComplete.d.ts +6 -0
  14. package/dist/components/preRegistration/constants.d.ts +2 -2
  15. package/dist/components/preRegistration/index.d.ts +6 -0
  16. package/dist/components/ticketsContainer/InfoIcon.d.ts +5 -0
  17. package/dist/components/ticketsContainer/TicketsSection.d.ts +3 -2
  18. package/dist/components/ticketsContainer/TimeSlotsSection.d.ts +25 -0
  19. package/dist/components/ticketsContainer/index.d.ts +17 -5
  20. package/dist/constants/index.d.ts +5 -0
  21. package/dist/index.d.ts +1 -0
  22. package/dist/tf-checkout-react.cjs.development.js +2060 -1484
  23. package/dist/tf-checkout-react.cjs.development.js.map +1 -1
  24. package/dist/tf-checkout-react.cjs.production.min.js +1 -1
  25. package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
  26. package/dist/tf-checkout-react.esm.js +2064 -1489
  27. package/dist/tf-checkout-react.esm.js.map +1 -1
  28. package/dist/types/add_on.d.ts +1 -0
  29. package/dist/types/checkoutPageConfigs.d.ts +1 -1
  30. package/dist/types/order-data.d.ts +1 -0
  31. package/dist/utils/customFields.d.ts +11 -0
  32. package/dist/utils/setConfigs.d.ts +1 -0
  33. package/package.json +2 -1
  34. package/src/adapters/customFields.ts +7 -1
  35. package/src/api/common.ts +49 -2
  36. package/src/api/interceptors.ts +1 -1
  37. package/src/api/preRegistrationComplete.ts +1 -1
  38. package/src/components/addonsContainer/AddonComponent.tsx +68 -11
  39. package/src/components/addonsContainer/index.tsx +149 -45
  40. package/src/components/billing-info-container/index.tsx +117 -92
  41. package/src/components/common/CheckboxField/index.tsx +1 -1
  42. package/src/components/common/DatePickerField.tsx +25 -10
  43. package/src/components/confirmationContainer/index.tsx +1 -1
  44. package/src/components/delegationsContainer/IssueComponent.tsx +2 -1
  45. package/src/components/forgotPasswordModal/index.tsx +31 -13
  46. package/src/components/loginForm/index.tsx +1 -1
  47. package/src/components/loginModal/index.tsx +2 -2
  48. package/src/components/myTicketsContainer/index.tsx +1 -1
  49. package/src/components/orderDetailsContainer/index.tsx +179 -166
  50. package/src/components/paymentContainer/index.tsx +74 -55
  51. package/src/components/preRegistration/FieldsSection.tsx +8 -0
  52. package/src/components/preRegistration/PreRegistrationComplete.tsx +128 -118
  53. package/src/components/preRegistration/PreRegistrationInformations.tsx +21 -15
  54. package/src/components/preRegistration/constants.tsx +10 -4
  55. package/src/components/preRegistration/index.tsx +190 -174
  56. package/src/components/registerForm/constants.tsx +3 -1
  57. package/src/components/registerForm/index.tsx +3 -3
  58. package/src/components/seatMapContainer/TicketsSection.tsx +2 -2
  59. package/src/components/ticketsContainer/InfoIcon.tsx +35 -0
  60. package/src/components/ticketsContainer/PromoCodeSection.tsx +34 -28
  61. package/src/components/ticketsContainer/TicketRow.tsx +1 -1
  62. package/src/components/ticketsContainer/TicketsSection.tsx +138 -16
  63. package/src/components/ticketsContainer/TimeSlotsSection.tsx +120 -0
  64. package/src/components/ticketsContainer/index.tsx +200 -79
  65. package/src/constants/index.ts +2 -0
  66. package/src/hoc/CustomFields/index.tsx +9 -1
  67. package/src/index.ts +1 -0
  68. package/src/types/add_on.ts +1 -0
  69. package/src/types/api/common.d.ts +27 -0
  70. package/src/types/api/payment.d.ts +3 -0
  71. package/src/types/api/preRegistrationComplete.d.ts +2 -2
  72. package/src/types/checkoutPageConfigs.ts +1 -1
  73. package/src/types/order-data.ts +1 -0
  74. package/src/types/pre-registration-complete.d.ts +6 -1
  75. package/src/utils/cookies.ts +1 -1
  76. package/src/utils/customFields.ts +22 -0
  77. package/src/utils/setConfigs.ts +3 -1
package/README.md CHANGED
@@ -6,6 +6,7 @@
6
6
  <summary><strong>Table of Contents</strong></summary>
7
7
 
8
8
  - [tf-checkout-react](#tf-checkout-react)
9
+ - [Code style and formatting](#code-style-and-formatting)
9
10
  - [Introduction](#introduction)
10
11
  - [Intergrations](#intergrations)
11
12
  - [WebFlow](#webflow)
@@ -21,11 +22,11 @@
21
22
  - [Register](#register)
22
23
  - [Forgot Password](#forgot-password)
23
24
  - [Promo Code](#promo-code)
24
- - [__Note that package automatically calls component in `TicketsContainer`__](#note-that-package-automatically-calls-component-in-ticketscontainer)
25
+ - [**Note that package automatically calls component in `TicketsContainer`**](#note-that-package-automatically-calls-component-in-ticketscontainer)
25
26
  - [Access Code](#access-code)
26
- - [__Note that package automatically calls component in `TicketsContainer`__](#note-that-package-automatically-calls-component-in-ticketscontainer-1)
27
+ - [**Note that package automatically calls component in `TicketsContainer`**](#note-that-package-automatically-calls-component-in-ticketscontainer-1)
27
28
  - [Waiting List](#waiting-list)
28
- - [__Note that package automatically calls component in `TicketsContainer`__](#note-that-package-automatically-calls-component-in-ticketscontainer-2)
29
+ - [**Note that package automatically calls component in `TicketsContainer`**](#note-that-package-automatically-calls-component-in-ticketscontainer-2)
29
30
  - [Pixel Usage](#pixel-usage)
30
31
  - [Components](#components)
31
32
  - [`TicketsContainer`](#ticketscontainer)
@@ -38,16 +39,35 @@
38
39
  - [Order Details Container](#order-details-container)
39
40
  - [Ticket Resale Container](#ticket-resale-container)
40
41
  - [Commands](#commands)
41
- - [Rollup](#rollup)
42
- - [TypeScript](#typescript)
43
- - [GitHub Actions](#github-actions)
42
+ - [Rollup](#rollup)
43
+ - [TypeScript](#typescript)
44
+ - [GitHub Actions](#github-actions)
44
45
 
45
46
  </details>
46
47
 
48
+ ## Code style and formatting
49
+
50
+ 1. **Install Prettier ESLint extension (v5.1.0)**
51
+ - VSCode: https://marketplace.visualstudio.com/items?itemName=rvest.vs-code-prettier-eslint
52
+ - JetBrains' products: https://blog.jetbrains.com/webstorm/2016/08/using-external-tools/
53
+ Notes:
54
+ - The Prettier extension is not required.
55
+ - The ESLint extension is not required. However, it is needed to have lint errors show while editing your file.
56
+ 2. **Set Prettier ESLint default formatter**
57
+
58
+ - VSCode: Open commands (CMD/Win + Stift + P) -> Format document with -> Configure default formatter
59
+ - JetBrains' products: https://blog.jetbrains.com/webstorm/2016/08/using-external-tools/
60
+
61
+ 3. **Enable format on save**
62
+
63
+ - VSCode: Open settings (CMD + ,) -> Search "Format On Save"
64
+ - JetBrains' products: https://blog.jetbrains.com/webstorm/2016/08/using-external-tools/
65
+
47
66
  &nbsp;
67
+
48
68
  # Introduction
49
69
 
50
- This package includes TicketFairy's checkout functionality, as well as various related functionalities. These functionalities include login/register, order management, resale, referrals, and more.
70
+ This package includes TicketFairy's checkout functionality, as well as various related functionalities. These functionalities include login/register, order management, resale, referrals, and more.
51
71
 
52
72
  This package provides a set of components and functionalities designed to manage various aspects of the TicketFairy event experience. These include:
53
73
 
@@ -62,9 +82,9 @@ This package provides a set of components and functionalities designed to manage
62
82
  - `ResetPasswordContainer`: A component for resetting a user's password.
63
83
  - `SeatMapContainer`: A component for displaying and selecting seats on a venue map.
64
84
  - `TicketResaleContainer`: A component for managing the resale of tickets or add-ons by the user.
65
- - `TicketsContainer`: A component for displaying a list of available tickets and allowing the user to purchase them.
85
+ - `TicketsContainer`: A component for displaying a list of available tickets and allowing the user to purchase them.
66
86
 
67
- Together, these components and functionalities provide a comprehensive set of tools to manage the checkout process and related activities for a TicketFairy-powered event.
87
+ Together, these components and functionalities provide a comprehensive set of tools to manage the checkout process and related activities for a TicketFairy-powered event.
68
88
  &nbsp;
69
89
  &nbsp;
70
90
 
@@ -74,7 +94,6 @@ Together, these components and functionalities provide a comprehensive set of to
74
94
 
75
95
  &nbsp;
76
96
 
77
-
78
97
  # Prerequisites
79
98
 
80
99
  - node >= v16.19.0
@@ -134,17 +153,16 @@ Call it in the root and pass neccesary options. Here are available options:
134
153
 
135
154
  ## Login
136
155
 
156
+ The `LoginModal` component is designed to be used inside package to authenticate users. <br /> To use the `LoginModal`, simply include it in your React component and pass in the required **onLogin** and **onClose** callbacks as props.
137
157
 
138
- The `LoginModal` component is designed to be used inside package to authenticate users. <br /> To use the `LoginModal`, simply include it in your React component and pass in the required __onLogin__ and __onClose__ callbacks as props.
139
-
140
- You can authenticate users from the Billing page too, here you can either provide __onLogin__ callback as a prop to the [`BillingInfoContainer`](#billinginfocontainer) component so that you can open your custom component for authentication or you can ommit it and the package inside provided `LoginModal` component will be called and opened.
158
+ You can authenticate users from the Billing page too, here you can either provide **onLogin** callback as a prop to the [`BillingInfoContainer`](#billinginfocontainer) component so that you can open your custom component for authentication or you can ommit it and the package inside provided `LoginModal` component will be called and opened.
141
159
 
142
- Package can detect whether a user is logged in or not by checking for the presence of the __X-TF-ECOMMERCE__ cookie, which is automatically set by the system when the user successfully logs in. If the __X-TF-ECOMMERCE__ cookie is present, the package assumes that the user is logged in and displays the appropriate content.
160
+ Package can detect whether a user is logged in or not by checking for the presence of the **X-TF-ECOMMERCE** cookie, which is automatically set by the system when the user successfully logs in. If the **X-TF-ECOMMERCE** cookie is present, the package assumes that the user is logged in and displays the appropriate content.
143
161
 
144
- The `LoginModal` component also is used in [`MyTicketsContainer`](#myticketscontainer) and [`TicketsContainer`](#ticketscontainer).
162
+ The `LoginModal` component also is used in [`MyTicketsContainer`](#myticketscontainer) and [`TicketsContainer`](#ticketscontainer).
145
163
 
146
- To detect whether a user is logged in or not, you can use the __useCookieListener__ hook provided by the package.
147
- Here's an example of how to use the __useCookieListener__ hook to automatically detect whether the user is logged in:
164
+ To detect whether a user is logged in or not, you can use the **useCookieListener** hook provided by the package.
165
+ Here's an example of how to use the **useCookieListener** hook to automatically detect whether the user is logged in:
148
166
 
149
167
  ```jsx
150
168
  import { useEffect, useRef, useState } from 'react'
@@ -154,7 +172,7 @@ const MyComponent = () => {
154
172
  const [isLogged, setIsLogged] = useState(false)
155
173
 
156
174
  // Listen for changes to the __X-TF-ECOMMERCE__ cookie
157
- useCookieListener("X_TF_ECOMMERCE", value => setIsLogged(Boolean(value)))
175
+ useCookieListener('X_TF_ECOMMERCE', value => setIsLogged(Boolean(value)))
158
176
 
159
177
  // ... rest of component logic
160
178
  }
@@ -187,9 +205,9 @@ const MyComponent = () => {
187
205
 
188
206
  ## Register
189
207
 
190
- The `RegisterModal` component is designed to be used inside package to allows users to register for an account. <br />
208
+ The `RegisterModal` component is designed to be used inside package to allows users to register for an account. <br />
191
209
 
192
- When the user submits the form, the component calls the register API function to create the user's account. If account creation is successful, the component then retrieves the user's profile data. The __onGetProfileDataSuccess__ and __onGetProfileDataError__ callbacks are then called depending on whether the profile data retrieval succeeds or fails. If profile data retrieval succeeds, the component maps the profile data to a format used by the application and saves the resulting data to the browser's localStorage. Finally, the __onClose__ callback is called to close the modal.
210
+ When the user submits the form, the component calls the register API function to create the user's account. If account creation is successful, the component then retrieves the user's profile data. The **onGetProfileDataSuccess** and **onGetProfileDataError** callbacks are then called depending on whether the profile data retrieval succeeds or fails. If profile data retrieval succeeds, the component maps the profile data to a format used by the application and saves the resulting data to the browser's localStorage. Finally, the **onClose** callback is called to close the modal.
193
211
 
194
212
  <details open>
195
213
  <summary><b>Register Modal Props Interface:</b></summary>
@@ -208,7 +226,7 @@ When the user submits the form, the component calls the register API function to
208
226
 
209
227
  ## Forgot Password
210
228
 
211
- The `ForgotPasswordModal` component is a modal dialog for users to reset their passwords. To use it, simply import the component, manage its open state, and provide callback functions for closing the modal, navigating back to the login page or component, handling successful password reset requests, and handling errors in password reset requests. Optionally, you can also display a "Powered By" image within the modal by setting the __showPoweredByImage__ prop to true.
229
+ The `ForgotPasswordModal` component is a modal dialog for users to reset their passwords. To use it, simply import the component, manage its open state, and provide callback functions for closing the modal, navigating back to the login page or component, handling successful password reset requests, and handling errors in password reset requests. Optionally, you can also display a "Powered By" image within the modal by setting the **showPoweredByImage** prop to true.
212
230
 
213
231
  <details open>
214
232
  <summary><b>Forgot Password Modal Props Interface:</b></summary>
@@ -230,9 +248,9 @@ The `PromoCodeSection` is a React component for handling promo code input, valid
230
248
 
231
249
  To use this component, simply import it and include it in your JSX with the required props, managing the component's state and callback functions in the parent component as needed.
232
250
 
233
- ### __Note that package automatically calls component in [`TicketsContainer`](#ticketscontainer)__
234
- <br />
251
+ ### **Note that package automatically calls component in [`TicketsContainer`](#ticketscontainer)**
235
252
 
253
+ <br />
236
254
 
237
255
  <details open>
238
256
  <summary><b>Promo Code Props Interface:</b></summary>
@@ -259,9 +277,9 @@ To use this component, simply import it and include it in your JSX with the requ
259
277
 
260
278
  The `AccessCodeSection` is a React component designed for handling access code input and submission. It allows users to enter an access code and triggers an update to the ticket information based on the submitted access code. The component accepts a set of props to manage the access code value and provide callback functions for updating the state which you can see in below table.
261
279
 
262
- To integrate the `AccessCodeSection` component, import it into your JSX and provide the required props, such as the access code value, and callback functions for updating the state. Make sure to manage the component's state and callback functions within the parent component as needed. <br />
280
+ To integrate the `AccessCodeSection` component, import it into your JSX and provide the required props, such as the access code value, and callback functions for updating the state. Make sure to manage the component's state and callback functions within the parent component as needed. <br />
263
281
 
264
- ### __Note that package automatically calls component in [`TicketsContainer`](#ticketscontainer)__
282
+ ### **Note that package automatically calls component in [`TicketsContainer`](#ticketscontainer)**
265
283
 
266
284
  <br />
267
285
 
@@ -282,8 +300,7 @@ To integrate the `AccessCodeSection` component, import it into your JSX and prov
282
300
 
283
301
  The `WaitingList` component is a React component designed to handle user registration for a waiting list. It displays a form that allows users to input their information, including first name, last name, email, ticket type, and quantity. Upon submission, the component adds the user to the waiting list and displays a success message.
284
302
 
285
-
286
- ### __Note that package automatically calls component in [`TicketsContainer`](#ticketscontainer)__
303
+ ### **Note that package automatically calls component in [`TicketsContainer`](#ticketscontainer)**
287
304
 
288
305
  <br />
289
306
 
@@ -317,13 +334,12 @@ Here is the list of pages where the `usePixel` function is automatically used:
317
334
 
318
335
  # Components
319
336
 
320
-
321
337
  ## `TicketsContainer`
322
338
 
323
339
  Tickets component will retrieve and show a list of tickets corresponding to selected event,
324
340
  which allows the user to select the desired ticket type and quantity.
325
341
 
326
- The __"Get Tickets"__ button which name is also customizable, allows the user to add the selected tickets to their cart and proceed to the checkout process.<br />
342
+ The **"Get Tickets"** button which name is also customizable, allows the user to add the selected tickets to their cart and proceed to the checkout process.<br />
327
343
  Other buttons can be displayed to handle various actions, such as viewing the user's orders or logging out.
328
344
 
329
345
  Tickets component provides a section for entering an [Access Code](#access-code) or [Promo Code](#promo-code) that applies a discount to the ticket price or hide/unhide some tickets via [Access Code](#access-code).<br />
@@ -334,16 +350,15 @@ Tickets component displays a list of the top influencers who have promoted the e
334
350
 
335
351
  Tickets component is flexible and customizable, allowing for different layouts and behaviors depending on the event's requirements.
336
352
 
337
- ___Example of usage___:
338
- ```jsx
353
+ **_Example of usage_**:
339
354
 
355
+ ```jsx
340
356
  import { TicketsContainer } from 'tf-checkout-react'
341
-
342
- <TicketsContainer
357
+ ;<TicketsContainer
343
358
  theme="light"
344
359
  eventId={event?.id}
345
- handleNotInvitedModalClose={() => { }}
346
- handleInvalidLinkModalClose={() => { }}
360
+ handleNotInvitedModalClose={() => {}}
361
+ handleInvalidLinkModalClose={() => {}}
347
362
  onAddToCartSuccess={() => {}}
348
363
  isPromotionsEnabled={event?.is_promotions_enabled}
349
364
  isAccessCodeEnabled={event?.is_access_code}
@@ -351,7 +366,9 @@ import { TicketsContainer } from 'tf-checkout-react'
351
366
  hideSessionButtons={true}
352
367
  enableAddOns={false}
353
368
  showGroupNameBlock={true}
354
- tableTicketsHeaderComponent={<div className="tickets-container-header">RESERVE TABLES</div>}
369
+ tableTicketsHeaderComponent={
370
+ <div className="tickets-container-header">RESERVE TABLES</div>
371
+ }
355
372
  onPendingVerification={() => {}}
356
373
  />
357
374
  ```
@@ -431,7 +448,8 @@ Add-Ons component will retrieve and show a list of add-ons corresponding to sele
431
448
  &nbsp;
432
449
 
433
450
  ## `BillingInfoContainer`
434
- The component is responsible for managing the billing information during the checkout process. It provides a form that allows users to enter their billing information, including addresses and ticket holders' information.
451
+
452
+ The component is responsible for managing the billing information during the checkout process. It provides a form that allows users to enter their billing information, including addresses and ticket holders' information.
435
453
 
436
454
  Component includes also phone field, which validation functionality is provided by Twilio and integrated into the component. It provides an additional layer of verification and security during the ticket purchase process.
437
455
 
@@ -480,7 +498,8 @@ Props interface extends [Login Modal Interface](#login), [Register Modal Interfa
480
498
  &nbsp;
481
499
 
482
500
  ## `PaymentContainer`
483
- The component provides a form for users to enter their payment information and checkout. It accepts various props to customize the form and handle the checkout process.
501
+
502
+ The component provides a form for users to enter their payment information and checkout. It accepts various props to customize the form and handle the checkout process.
484
503
 
485
504
  <details open>
486
505
 
@@ -512,7 +531,8 @@ The component provides a form for users to enter their payment information and c
512
531
  &nbsp;
513
532
 
514
533
  ## `ConfirmationContainer`
515
- The component is responsible for displaying the confirmation page after a successful payment.
534
+
535
+ The component is responsible for displaying the confirmation page after a successful payment.
516
536
 
517
537
  <details open>
518
538
 
@@ -539,7 +559,8 @@ The component is responsible for displaying the confirmation page after a succes
539
559
  &nbsp;
540
560
 
541
561
  ## `MyTicketsContainer`
542
- The component is responsible for rendering a list of orders with details and some customization options.
562
+
563
+ The component is responsible for rendering a list of orders with details and some customization options.
543
564
 
544
565
  <details open>
545
566
 
@@ -8,4 +8,5 @@ export declare const fieldDataAdapter: (field: IGroupItem) => IGroupItem;
8
8
  export declare const customFieldsDataAdapter: (data: any) => {
9
9
  ticketsFields: IGroupItem[];
10
10
  orderFields: IGroupItem[];
11
+ addOnFields: IGroupItem[];
11
12
  };
@@ -1,5 +1,6 @@
1
1
  export declare const getEvent: (id: string | number, pk?: string | undefined) => Promise<IEventResponse>;
2
2
  export declare const getTickets: (eventId: string | number, promoCode: string, pk?: string | undefined) => Promise<ITicketsAdaptedResponse>;
3
+ export declare const getTimeSlotsByDate: (eventId: string | number, date: string, promoCode?: string | undefined, pk?: string | undefined) => Promise<ITimeslotsAdaptedResponse>;
3
4
  export declare const getCountries: () => Promise<ICountriesResponse>;
4
5
  export declare const getStates: (countryId: string | number) => Promise<IStatesResponse>;
5
6
  export declare const sendRSVPInfo: (eventId: number, data: {
@@ -59,6 +59,7 @@ export declare const getCheckoutPageConfigs: () => Promise<ResponseConfigs>;
59
59
  export declare const getCustomFields: (eventId: string) => Promise<{
60
60
  ticketsFields: import("../types").IGroupItem[];
61
61
  orderFields: import("../types").IGroupItem[];
62
+ addOnFields: import("../types").IGroupItem[];
62
63
  }>;
63
64
  export declare const updateOrderCustomFields: (eventId: string, orderId: string, customFieldsData: Record<string, any>) => Promise<AxiosResponse<any, any>>;
64
65
  export declare const updateTicketHoldersCustomFields: (eventId: string, customFieldsData: Record<string, any>, ticketHash: string) => Promise<AxiosResponse<any, any>>;
@@ -1,3 +1,3 @@
1
- export declare const getPreRegistrationInfluancers: (data: IInfluancersRequestData) => Promise<IInfluancersResponseData>;
1
+ export declare const getPreRegistrationInfluencers: (data: IInfluancersRequestData) => Promise<IInfluancersResponseData>;
2
2
  export declare const getPreRegistrationShareOptions: (data: IShareOptionsRequestData) => Promise<IShareOptionsResponseData>;
3
3
  export declare const submitShareAction: (data: ISubmitShareActionRequestData) => Promise<ISubmitShareActionResponseData>;
@@ -4,6 +4,10 @@ interface IAddonComponentProps {
4
4
  data: any;
5
5
  selectOptions: any;
6
6
  handleAddonChange?: (...res: any) => void;
7
+ addOnDataWithCustomFields: any;
8
+ configs: any;
9
+ values: any;
10
+ errors: any;
7
11
  }
8
- declare const AddonComponent: ({ classNamePrefix, data, selectOptions, handleAddonChange, }: IAddonComponentProps) => JSX.Element;
12
+ declare const AddonComponent: ({ classNamePrefix, data, selectOptions, handleAddonChange, addOnDataWithCustomFields, configs, values, errors, }: IAddonComponentProps) => JSX.Element;
9
13
  export default AddonComponent;
@@ -12,8 +12,11 @@ export interface IAddonContainterProps {
12
12
  onCountdownFinish?: () => void;
13
13
  onPendingVerification?: () => void;
14
14
  samePage?: boolean;
15
+ descriptionTrigger?: 'click' | 'hover' | 'always';
16
+ addOnDataWithCustomFields: any;
17
+ configs: any;
15
18
  }
16
19
  export interface ObjectLiteral {
17
20
  [key: string]: any;
18
21
  }
19
- export declare const AddonsContainter: ({ classNamePrefix, enableBillingInfoAutoCreate, enableTimer, onGetAddonsPageInfoSuccess, onGetAddonsPageInfoError, onPostCheckoutSuccess, onPostCheckoutError, onConfirmSelectionSuccess, onConfirmSelectionError, onCountdownFinish, onPendingVerification, samePage, }: IAddonContainterProps) => JSX.Element;
22
+ export declare const AddonsContainter: ({ classNamePrefix, enableBillingInfoAutoCreate, enableTimer, onGetAddonsPageInfoSuccess, onGetAddonsPageInfoError, onPostCheckoutSuccess, onPostCheckoutError, onConfirmSelectionSuccess, onConfirmSelectionError, onCountdownFinish, onPendingVerification, samePage, descriptionTrigger, addOnDataWithCustomFields, configs, }: IAddonContainterProps) => JSX.Element;
@@ -56,6 +56,7 @@ export interface IBillingInfoPage {
56
56
  onPendingVerification?: () => void;
57
57
  includeAddons?: boolean;
58
58
  addonsProps?: IAddonContainterProps;
59
+ addOnDataWithCustomFields?: any;
59
60
  }
60
61
  declare const WithCustomFieldsBillingInfoContainer: (props: any) => JSX.Element;
61
62
  export { WithCustomFieldsBillingInfoContainer as BillingInfoContainer };
@@ -1,14 +1,20 @@
1
1
  /// <reference types="react" />
2
+ import { ThemeOptions } from '@mui/material';
3
+ import { CSSProperties } from '@mui/styles';
2
4
  import { FieldInputProps, FormikProps } from 'formik';
3
5
  export interface IDatePickerFieldProps {
4
6
  label: string;
5
7
  field: FieldInputProps<any>;
6
8
  form: FormikProps<any>;
7
9
  theme: 'dark' | 'light';
10
+ themeOptions?: ThemeOptions & {
11
+ input?: CSSProperties;
12
+ checkbox?: CSSProperties;
13
+ };
8
14
  useCompact?: boolean;
9
15
  }
10
16
  interface IOtherProps {
11
17
  [key: string]: any;
12
18
  }
13
- export declare const DatePickerField: ({ label, field, form, theme, useCompact, dateFormat, placeholder, }: IDatePickerFieldProps & IOtherProps) => JSX.Element;
19
+ export declare const DatePickerField: ({ label, field, form, theme, useCompact, themeOptions, dateFormat, placeholder, }: IDatePickerFieldProps & IOtherProps) => JSX.Element;
14
20
  export {};
@@ -4,8 +4,9 @@ import { FC } from 'react';
4
4
  export interface IForgotPasswordProps {
5
5
  onClose: () => void;
6
6
  onLoginButtonClick: () => void;
7
- onForgotPasswordSuccess: (res: any) => void;
7
+ onForgotPasswordSuccess: (res: IAxiosResponseData) => void;
8
8
  onForgotPasswordError: (e: AxiosError) => void;
9
9
  showPoweredByImage?: boolean;
10
+ displaySuccessMessage?: boolean;
10
11
  }
11
12
  export declare const ForgotPasswordModal: FC<IForgotPasswordProps>;
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import './style.css';
3
+ import { ThemeOptions } from "@mui/material";
4
+ import { CSSProperties } from "@mui/styles";
3
5
  import { IActionColumns, ITicketTypes } from './ticketsTable';
4
6
  interface OrderDetailsTypes {
5
7
  columns: Array<{
@@ -19,6 +21,10 @@ interface OrderDetailsTypes {
19
21
  personalLinkIcon?: string;
20
22
  displayColumnNameInRow?: boolean;
21
23
  canSellTicket?: boolean;
24
+ themeOptions?: ThemeOptions & {
25
+ input?: CSSProperties;
26
+ checkbox?: CSSProperties;
27
+ };
22
28
  ticketsTableColumns?: Array<{
23
29
  id?: string | number;
24
30
  key: keyof ITicketTypes & keyof IActionColumns;
@@ -54,5 +60,5 @@ export interface CustomFieldTypes {
54
60
  ticketHash?: string;
55
61
  options?: CustomFieldOption[];
56
62
  }
57
- export declare const OrderDetailsContainer: ({ columns, onGetOrdersSuccess, onGetOrdersError, onRemoveFromResaleSuccess, onRemoveFromResaleError, onResaleTicketSuccess, onResaleTicketError, onUpdateOrderCustomFieldsSuccess, onUpdateOrderCustomFieldsError, onUpdateTicketHolderCustomFieldsSuccess, onUpdateTicketHolderCustomFieldsError, onReturnButtonClick, personalLinkIcon, displayColumnNameInRow, canSellTicket, ticketsTableColumns, ordersPath, orderId: pOrderId, referralTitle, itemsTitle, ticketsTitle, }: OrderDetailsTypes) => JSX.Element;
63
+ export declare const OrderDetailsContainer: ({ columns, onGetOrdersSuccess, onGetOrdersError, onRemoveFromResaleSuccess, onRemoveFromResaleError, onResaleTicketSuccess, onResaleTicketError, onUpdateOrderCustomFieldsSuccess, onUpdateOrderCustomFieldsError, onUpdateTicketHolderCustomFieldsSuccess, onUpdateTicketHolderCustomFieldsError, onReturnButtonClick, personalLinkIcon, displayColumnNameInRow, canSellTicket, ticketsTableColumns, ordersPath, orderId: pOrderId, referralTitle, itemsTitle, ticketsTitle, themeOptions, }: OrderDetailsTypes) => JSX.Element;
58
64
  export {};
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { FormikValues } from 'formik';
3
+ import { ThemeOptions } from "@mui/material";
4
+ import { CSSProperties } from "@mui/styles";
3
5
  export interface IFieldsSectionProps {
4
6
  formFields?: IFormFieldsSection[];
5
7
  values: FormikValues;
@@ -8,6 +10,10 @@ export interface IFieldsSectionProps {
8
10
  [key: string]: string | number;
9
11
  }[];
10
12
  theme?: 'dark' | 'light';
13
+ themeOptions?: ThemeOptions & {
14
+ input?: CSSProperties;
15
+ checkbox?: CSSProperties;
16
+ };
11
17
  containerClass?: string;
12
18
  }
13
- export declare const FieldsSection: ({ formFields, countries, values, setFieldValue, theme, containerClass, }: IFieldsSectionProps) => JSX.Element;
19
+ export declare const FieldsSection: ({ formFields, countries, values, setFieldValue, theme, containerClass, themeOptions, }: IFieldsSectionProps) => JSX.Element;
@@ -1,5 +1,11 @@
1
+ import { ThemeOptions } from '@mui/material';
2
+ import { CSSProperties } from '@mui/styles';
1
3
  import { AxiosError } from 'axios';
2
4
  import { FC } from 'react';
3
5
  export declare const PreRegistrationComplete: FC<IPreRegistrationCompleteProps & {
4
6
  onGetConfirmationDataError?: (error: AxiosError) => void;
7
+ themeOptions?: ThemeOptions & {
8
+ input?: CSSProperties;
9
+ checkbox?: CSSProperties;
10
+ };
5
11
  }>;
@@ -1,2 +1,2 @@
1
- export declare const formFieldsNotLoggedIn: IFormFieldsSection[];
2
- export declare const formFieldsLoggedIn: IFormFieldsSection[];
1
+ export declare const getFormFieldsNotLoggedIn: (clientName?: string | number | undefined) => IFormFieldsSection[];
2
+ export declare const getFormFieldsLoggedIn: (clientName?: string | number | undefined) => IFormFieldsSection[];
@@ -1,3 +1,5 @@
1
+ import { ThemeOptions } from '@mui/material';
2
+ import { CSSProperties } from '@mui/styles';
1
3
  import { AxiosError } from 'axios';
2
4
  import { FC } from 'react';
3
5
  import { IForgotPasswordProps } from '../forgotPasswordModal';
@@ -12,6 +14,10 @@ interface IPreRegistrationProps extends Props, IForgotPasswordProps {
12
14
  onConfirmationSuccess?: (res: any) => void;
13
15
  onConfirmationError?: (e: AxiosError) => void;
14
16
  onLoginSuccess?: (res: any) => void;
17
+ themeOptions?: ThemeOptions & {
18
+ input?: CSSProperties;
19
+ checkbox?: CSSProperties;
20
+ };
15
21
  }
16
22
  export declare const PreRegistration: FC<IPreRegistrationProps>;
17
23
  export {};
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare const InfoIcon: ({ size }: {
3
+ size?: number | undefined;
4
+ }) => JSX.Element;
5
+ export default InfoIcon;
@@ -12,8 +12,9 @@ interface ITicketsSectionProps {
12
12
  ticketsHeaderComponent?: ReactNode;
13
13
  tableTicketsHeaderComponent?: ReactNode;
14
14
  showGroupNameBlock?: boolean;
15
- currencySybmol?: string;
15
+ currencySymbol?: string;
16
16
  isSeatMapAllowed?: boolean;
17
+ descriptionTrigger?: 'click' | 'hover';
17
18
  }
18
- export declare const TicketsSection: ({ event, ticketsList, selectedTickets, handleTicketSelect, sortBySoldOut, ticketsHeaderComponent, tableTicketsHeaderComponent, hideTicketsHeader, hideTableTicketsHeader, showGroupNameBlock, currencySybmol, isSeatMapAllowed, tableTickets, }: ITicketsSectionProps) => JSX.Element;
19
+ export declare const TicketsSection: ({ event, ticketsList, selectedTickets, handleTicketSelect, sortBySoldOut, ticketsHeaderComponent, tableTicketsHeaderComponent, hideTicketsHeader, hideTableTicketsHeader, showGroupNameBlock, currencySymbol, isSeatMapAllowed, tableTickets, descriptionTrigger, }: ITicketsSectionProps) => JSX.Element;
19
20
  export {};
@@ -0,0 +1,25 @@
1
+ import React, { ReactNode } from 'react';
2
+ interface Props {
3
+ event: any;
4
+ eventId: number;
5
+ availableDates: string[];
6
+ selectedDate: string | null;
7
+ timeSlotGroups: {
8
+ [key: string]: any[];
9
+ };
10
+ setTimeSlotGroups: (value: {
11
+ [key: string]: any[];
12
+ }) => void;
13
+ setSelectedDate: (value: string | null) => void;
14
+ getTimeSlots: (date: string | null, type?: string) => Promise<void>;
15
+ selectedTickets: any;
16
+ handleTicketSelect: any;
17
+ sortBySoldOut: boolean;
18
+ hideTicketsHeader: boolean;
19
+ ticketsHeaderComponent?: ReactNode;
20
+ showGroupNameBlock?: boolean;
21
+ currencySymbol?: string;
22
+ isSeatMapAllowed?: boolean;
23
+ }
24
+ declare const TimeSlotsSection: React.FC<Props>;
25
+ export default TimeSlotsSection;
@@ -16,12 +16,24 @@ export interface IGetTickets {
16
16
  getTicketsLabel?: string;
17
17
  contentStyle?: React.CSSProperties;
18
18
  onAddToCartError: (e: AxiosError) => void;
19
- onGetTicketsSuccess: (response: any) => void;
19
+ onGetTicketsSuccess: (response: {
20
+ data: {
21
+ attributes: {
22
+ tickets: ITicketData[];
23
+ };
24
+ };
25
+ }) => void;
20
26
  onGetTicketsPress: () => void;
21
27
  onGetTicketsError: (e: AxiosError) => void;
22
28
  onLogoutSuccess: () => void;
23
29
  onLogoutError: (e: AxiosError) => void;
24
- onGetProfileDataSuccess: (response: any) => void;
30
+ onGetProfileDataSuccess: (response: {
31
+ data: {
32
+ attributes: {
33
+ [key: string]: string | number | boolean | null;
34
+ };
35
+ };
36
+ }) => void;
25
37
  onGetProfileDataError: (e: AxiosError) => void;
26
38
  onLoginSuccess: () => void;
27
39
  handleNotInvitedModalClose: () => void;
@@ -41,7 +53,7 @@ export interface IGetTickets {
41
53
  sortBySoldOut?: boolean;
42
54
  disableCountdownLeadingZero?: boolean;
43
55
  isLoggedIn?: boolean;
44
- actionsSectionComponent?: any;
56
+ actionsSectionComponent?: ReactNode;
45
57
  ticketsHeaderComponent?: ReactNode;
46
58
  hideTicketsHeader?: boolean;
47
59
  tableTicketsHeaderComponent?: ReactNode;
@@ -52,7 +64,7 @@ export interface IGetTickets {
52
64
  showPoweredByImage?: boolean;
53
65
  promoText?: string;
54
66
  showGroupNameBlock?: boolean;
55
- currencySybmol?: string;
67
+ currencySymbol?: string;
56
68
  onReserveButtonClick?: () => void;
57
69
  onPendingVerification?: () => void;
58
70
  showAlertIcons?: boolean;
@@ -65,5 +77,5 @@ export interface ISelectedTickets {
65
77
  isTable: boolean;
66
78
  [key: string]: string | number | boolean;
67
79
  }
68
- export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, onLogoutSuccess, onLogoutError, onGetProfileDataSuccess, onGetProfileDataError, onGetTicketsPress, theme, queryPromoCode, isPromotionsEnabled, themeOptions, isAccessCodeEnabled, hideSessionButtons, hideWaitingList, enableBillingInfoAutoCreate, isButtonScrollable, sortBySoldOut, disableCountdownLeadingZero, isLoggedIn, actionsSectionComponent: ActionsSectionComponent, ticketsHeaderComponent, hideTicketsHeader, tableTicketsHeaderComponent, hideTableTicketsHeader, enableInfluencersSection, enableAddOns, handleNotInvitedModalClose, handleInvalidLinkModalClose, ordersPath, showPoweredByImage, promoText, showGroupNameBlock, currencySybmol, onReserveButtonClick, onPendingVerification, showAlertIcons, }: IGetTickets) => JSX.Element;
80
+ export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, onLogoutSuccess, onLogoutError, onGetProfileDataSuccess, onGetProfileDataError, onGetTicketsPress, theme, queryPromoCode, isPromotionsEnabled, themeOptions, isAccessCodeEnabled, hideSessionButtons, hideWaitingList, enableBillingInfoAutoCreate, isButtonScrollable, sortBySoldOut, disableCountdownLeadingZero, isLoggedIn, actionsSectionComponent: ActionsSectionComponent, ticketsHeaderComponent, hideTicketsHeader, tableTicketsHeaderComponent, hideTableTicketsHeader, enableInfluencersSection, enableAddOns, handleNotInvitedModalClose, handleInvalidLinkModalClose, ordersPath, showPoweredByImage, promoText, showGroupNameBlock, currencySymbol, onReserveButtonClick, onPendingVerification, showAlertIcons, }: IGetTickets) => JSX.Element;
69
81
  export {};
@@ -1 +1,6 @@
1
1
  export declare const X_TF_ECOMMERCE = "X-TF-ECOMMERCE";
2
+ export declare const FEES_STYLES: {
3
+ TRADITIONAL: string;
4
+ DISPLAY_BOTH: string;
5
+ };
6
+ export declare const DEFAULT_FEES_STYLE: string;
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export { LoginModal } from './components/loginModal';
7
7
  export { MyTicketsContainer } from './components/myTicketsContainer';
8
8
  export { OrderDetailsContainer } from './components/orderDetailsContainer';
9
9
  export { setConfigs } from './utils/setConfigs';
10
+ export { DEFAULT_FEES_STYLE } from './constants/index';
10
11
  export { TicketResaleContainer } from './components';
11
12
  export { RedirectModal } from './components/common/RedirectModal';
12
13
  export { RsvpContainer } from './components/rsvpContainer';