tf-checkout-react 1.0.101 → 1.0.102

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 (81) hide show
  1. package/dist/components/billing-info-container/index.d.ts +3 -1
  2. package/dist/components/common/SnackbarAlert.d.ts +13 -0
  3. package/dist/components/confirmationContainer/index.d.ts +2 -1
  4. package/dist/components/ticketsContainer/index.d.ts +2 -1
  5. package/dist/env.d.ts +1 -0
  6. package/dist/images/done.svg +3 -3
  7. package/dist/tf-checkout-react.cjs.development.js +242 -117
  8. package/dist/tf-checkout-react.cjs.development.js.map +1 -1
  9. package/dist/tf-checkout-react.cjs.production.min.js +1 -1
  10. package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
  11. package/dist/tf-checkout-react.esm.js +243 -118
  12. package/dist/tf-checkout-react.esm.js.map +1 -1
  13. package/dist/tf-checkout-styles.css +1 -1
  14. package/package.json +89 -89
  15. package/src/.DS_Store +0 -0
  16. package/src/.d.ts +2 -2
  17. package/src/api/index.ts +278 -278
  18. package/src/assets/images/done.svg +3 -3
  19. package/src/components/.DS_Store +0 -0
  20. package/src/components/billing-info-container/index.tsx +796 -777
  21. package/src/components/billing-info-container/style.css +105 -105
  22. package/src/components/billing-info-container/utils.ts +224 -224
  23. package/src/components/common/CheckboxField.tsx +41 -41
  24. package/src/components/common/CustomField.tsx +84 -84
  25. package/src/components/common/FormikPhoneNumberField.tsx +51 -51
  26. package/src/components/common/Loader.tsx +9 -9
  27. package/src/components/common/RadioField.tsx +35 -35
  28. package/src/components/common/SelectField.tsx +80 -80
  29. package/src/components/common/SnackbarAlert.tsx +54 -0
  30. package/src/components/common/index.tsx +4 -4
  31. package/src/components/confirmModal/index.tsx +51 -51
  32. package/src/components/confirmModal/style.css +21 -21
  33. package/src/components/confirmationContainer/config.ts +72 -72
  34. package/src/components/confirmationContainer/index.tsx +197 -194
  35. package/src/components/confirmationContainer/social-buttons.tsx +94 -94
  36. package/src/components/confirmationContainer/style.css +202 -202
  37. package/src/components/countdown/index.tsx +89 -89
  38. package/src/components/countdown/style.css +9 -9
  39. package/src/components/index.ts +7 -7
  40. package/src/components/loginModal/index.tsx +209 -209
  41. package/src/components/loginModal/style.css +71 -71
  42. package/src/components/myTicketsContainer/index.tsx +196 -137
  43. package/src/components/myTicketsContainer/row.tsx +41 -41
  44. package/src/components/myTicketsContainer/style.css +39 -39
  45. package/src/components/myTicketsContainer/tableConfig.tsx +34 -34
  46. package/src/components/orderDetailsContainer/index.tsx +249 -249
  47. package/src/components/orderDetailsContainer/style.css +72 -72
  48. package/src/components/orderDetailsContainer/ticketsTable.tsx +124 -124
  49. package/src/components/paymentContainer/index.tsx +284 -284
  50. package/src/components/registerModal/index.tsx +190 -190
  51. package/src/components/stripePayment/index.tsx +253 -253
  52. package/src/components/stripePayment/style.css +59 -59
  53. package/src/components/ticketResale/index.tsx +56 -56
  54. package/src/components/ticketResaleModal/index.tsx +210 -210
  55. package/src/components/ticketResaleModal/style.css +28 -28
  56. package/src/components/ticketsContainer/PromoCodeSection.tsx +99 -99
  57. package/src/components/ticketsContainer/ReferralLogic.tsx +33 -33
  58. package/src/components/ticketsContainer/TicketRow.tsx +83 -83
  59. package/src/components/ticketsContainer/TicketsSection.tsx +81 -81
  60. package/src/components/ticketsContainer/index.tsx +430 -422
  61. package/src/components/ticketsContainer/style.css +181 -181
  62. package/src/components/ticketsContainer/utils.ts +11 -11
  63. package/src/components/timerWidget/index.tsx +70 -70
  64. package/src/components/timerWidget/style.css +26 -26
  65. package/src/components/waitingList/index.tsx +178 -178
  66. package/src/components/waitingList/style.css +26 -26
  67. package/src/env.ts +20 -19
  68. package/src/index.ts +13 -13
  69. package/src/normalizers/index.ts +45 -45
  70. package/src/types/billing-info-data.ts +37 -37
  71. package/src/types/payment-field.ts +7 -7
  72. package/src/types/referral-promotion.ts +7 -7
  73. package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +59 -59
  74. package/src/utils/downloadPDF.tsx +30 -30
  75. package/src/utils/formikErrorFocus.ts +24 -24
  76. package/src/utils/getImage.ts +14 -14
  77. package/src/utils/getQueryVariable.ts +13 -13
  78. package/src/utils/index.ts +5 -5
  79. package/src/utils/setConfigs.ts +26 -26
  80. package/src/utils/showZero.tsx +10 -10
  81. package/src/validators/index.ts +20 -20
@@ -1,178 +1,178 @@
1
- import React, { useState } from 'react'
2
- import Button from '@mui/material/Button'
3
- import CircularProgress from '@mui/material/CircularProgress'
4
- import { Field, Form, Formik } from 'formik'
5
- import { CustomField } from '../common/index'
6
- import { addToWaitingList } from '../../api'
7
- import {
8
- combineValidators,
9
- requiredValidator,
10
- emailValidator,
11
- } from '../../validators'
12
- import { ErrorFocus } from '../../utils/formikErrorFocus'
13
-
14
- import './style.css'
15
-
16
- interface WaitingListProps {
17
- tickets: any;
18
- eventId: number;
19
- }
20
-
21
- interface WaitingListFields {
22
- ticketTypeId: string;
23
- quantity: string;
24
- firstName: string;
25
- lastName: string;
26
- email: string;
27
- }
28
-
29
- const generateQuantity = (n: number) => {
30
- const quantityList = []
31
- for (let i = 1; i <= n; i++) {
32
- quantityList.push({ label: i, value: i })
33
- }
34
- return quantityList
35
- }
36
-
37
- const WaitingList = ({ tickets = {}, eventId }: WaitingListProps) => {
38
- const isWindowDefined = typeof window !== 'undefined'
39
- const userData =
40
- isWindowDefined && window.localStorage.getItem('user_data')
41
- ? JSON.parse(window.localStorage.getItem('user_data') || '')
42
- : {}
43
-
44
- const [showSuccessMessage, setShowSuccessMessage] = useState(false)
45
- const [loading, setLoading] = useState(false)
46
- const ticketTypesList = Object.values(tickets).map((d: any) => ({
47
- label: d.displayName,
48
- value: d.id,
49
- }))
50
-
51
- const showTicketsField = Boolean(ticketTypesList.length)
52
-
53
- const handleSubmit = async (values: WaitingListFields) => {
54
- try {
55
- setLoading(true)
56
- const requestData = {
57
- data: {
58
- attributes: values,
59
- },
60
- }
61
- const { data } = await addToWaitingList(eventId, requestData)
62
-
63
- if (data.success) {
64
- setShowSuccessMessage(true)
65
- }
66
- } catch (error) {
67
- } finally {
68
- setLoading(false)
69
- }
70
- }
71
-
72
- return (
73
- <div className="waiting-list">
74
- {showSuccessMessage ? (
75
- <div className="success-message">
76
- <p className="added-success-message">You've been added to the waiting list!</p>
77
- <p>You'll be notified if tickets become available.</p>
78
- </div>
79
- ) : (
80
- <>
81
- <h2>WAITING LIST</h2>
82
- <Formik
83
- initialValues={{
84
- ticketTypeId: '',
85
- quantity: '',
86
- firstName: userData.first_name || '',
87
- lastName: userData.last_name || '',
88
- email: userData.email || '',
89
- }}
90
- onSubmit={handleSubmit}
91
- >
92
- <Form>
93
- <ErrorFocus />
94
- {showTicketsField && (
95
- <>
96
- <div className="field-item">
97
- <Field
98
- name="ticketTypeId"
99
- label="Type of Ticket"
100
- type="select"
101
- component={CustomField}
102
- selectOptions={[
103
- { label: 'Type of Ticket', value: '', disabled: true },
104
- ...ticketTypesList,
105
- ]}
106
- />
107
- </div>
108
- <div className="field-item">
109
- <Field
110
- name="quantity"
111
- label="Quantity Requested"
112
- type="select"
113
- component={CustomField}
114
- selectOptions={[
115
- {
116
- label: 'Quantity Requested',
117
- value: '',
118
- disabled: true,
119
- },
120
- ...generateQuantity(10),
121
- ]}
122
- />
123
- </div>
124
- </>
125
- )}
126
- <div className="field-item">
127
- <Field
128
- name="firstName"
129
- label="First name"
130
- validate={(value: string) =>
131
- requiredValidator(value, 'Please enter your First name')
132
- }
133
- component={CustomField}
134
- />
135
- </div>
136
- <div className="field-item">
137
- <Field
138
- name="lastName"
139
- label="Last name"
140
- validate={(value: string) =>
141
- requiredValidator(value, 'Please enter your Last name')
142
- }
143
- component={CustomField}
144
- />
145
- </div>
146
- <div className="field-item">
147
- <Field
148
- name="email"
149
- label="Email"
150
- validate={combineValidators(
151
- (value: string) =>
152
- requiredValidator(value, 'Please enter your Email'),
153
- (value: string) => emailValidator(value)
154
- )}
155
- component={CustomField}
156
- />
157
- </div>
158
-
159
- <Button
160
- type="submit"
161
- variant="contained"
162
- className="waiting-list-button"
163
- >
164
- {loading ? (
165
- <CircularProgress size="22px" />
166
- ) : (
167
- 'ADD TO WAITING LIST'
168
- )}
169
- </Button>
170
- </Form>
171
- </Formik>
172
- </>
173
- )}
174
- </div>
175
- )
176
- }
177
-
178
- export default WaitingList
1
+ import React, { useState } from 'react'
2
+ import Button from '@mui/material/Button'
3
+ import CircularProgress from '@mui/material/CircularProgress'
4
+ import { Field, Form, Formik } from 'formik'
5
+ import { CustomField } from '../common/index'
6
+ import { addToWaitingList } from '../../api'
7
+ import {
8
+ combineValidators,
9
+ requiredValidator,
10
+ emailValidator,
11
+ } from '../../validators'
12
+ import { ErrorFocus } from '../../utils/formikErrorFocus'
13
+
14
+ import './style.css'
15
+
16
+ interface WaitingListProps {
17
+ tickets: any;
18
+ eventId: number;
19
+ }
20
+
21
+ interface WaitingListFields {
22
+ ticketTypeId: string;
23
+ quantity: string;
24
+ firstName: string;
25
+ lastName: string;
26
+ email: string;
27
+ }
28
+
29
+ const generateQuantity = (n: number) => {
30
+ const quantityList = []
31
+ for (let i = 1; i <= n; i++) {
32
+ quantityList.push({ label: i, value: i })
33
+ }
34
+ return quantityList
35
+ }
36
+
37
+ const WaitingList = ({ tickets = {}, eventId }: WaitingListProps) => {
38
+ const isWindowDefined = typeof window !== 'undefined'
39
+ const userData =
40
+ isWindowDefined && window.localStorage.getItem('user_data')
41
+ ? JSON.parse(window.localStorage.getItem('user_data') || '')
42
+ : {}
43
+
44
+ const [showSuccessMessage, setShowSuccessMessage] = useState(false)
45
+ const [loading, setLoading] = useState(false)
46
+ const ticketTypesList = Object.values(tickets).map((d: any) => ({
47
+ label: d.displayName,
48
+ value: d.id,
49
+ }))
50
+
51
+ const showTicketsField = Boolean(ticketTypesList.length)
52
+
53
+ const handleSubmit = async (values: WaitingListFields) => {
54
+ try {
55
+ setLoading(true)
56
+ const requestData = {
57
+ data: {
58
+ attributes: values,
59
+ },
60
+ }
61
+ const { data } = await addToWaitingList(eventId, requestData)
62
+
63
+ if (data.success) {
64
+ setShowSuccessMessage(true)
65
+ }
66
+ } catch (error) {
67
+ } finally {
68
+ setLoading(false)
69
+ }
70
+ }
71
+
72
+ return (
73
+ <div className="waiting-list">
74
+ {showSuccessMessage ? (
75
+ <div className="success-message">
76
+ <p className="added-success-message">You've been added to the waiting list!</p>
77
+ <p>You'll be notified if tickets become available.</p>
78
+ </div>
79
+ ) : (
80
+ <>
81
+ <h2>WAITING LIST</h2>
82
+ <Formik
83
+ initialValues={{
84
+ ticketTypeId: '',
85
+ quantity: '',
86
+ firstName: userData.first_name || '',
87
+ lastName: userData.last_name || '',
88
+ email: userData.email || '',
89
+ }}
90
+ onSubmit={handleSubmit}
91
+ >
92
+ <Form>
93
+ <ErrorFocus />
94
+ {showTicketsField && (
95
+ <>
96
+ <div className="field-item">
97
+ <Field
98
+ name="ticketTypeId"
99
+ label="Type of Ticket"
100
+ type="select"
101
+ component={CustomField}
102
+ selectOptions={[
103
+ { label: 'Type of Ticket', value: '', disabled: true },
104
+ ...ticketTypesList,
105
+ ]}
106
+ />
107
+ </div>
108
+ <div className="field-item">
109
+ <Field
110
+ name="quantity"
111
+ label="Quantity Requested"
112
+ type="select"
113
+ component={CustomField}
114
+ selectOptions={[
115
+ {
116
+ label: 'Quantity Requested',
117
+ value: '',
118
+ disabled: true,
119
+ },
120
+ ...generateQuantity(10),
121
+ ]}
122
+ />
123
+ </div>
124
+ </>
125
+ )}
126
+ <div className="field-item">
127
+ <Field
128
+ name="firstName"
129
+ label="First name"
130
+ validate={(value: string) =>
131
+ requiredValidator(value, 'Please enter your First name')
132
+ }
133
+ component={CustomField}
134
+ />
135
+ </div>
136
+ <div className="field-item">
137
+ <Field
138
+ name="lastName"
139
+ label="Last name"
140
+ validate={(value: string) =>
141
+ requiredValidator(value, 'Please enter your Last name')
142
+ }
143
+ component={CustomField}
144
+ />
145
+ </div>
146
+ <div className="field-item">
147
+ <Field
148
+ name="email"
149
+ label="Email"
150
+ validate={combineValidators(
151
+ (value: string) =>
152
+ requiredValidator(value, 'Please enter your Email'),
153
+ (value: string) => emailValidator(value)
154
+ )}
155
+ component={CustomField}
156
+ />
157
+ </div>
158
+
159
+ <Button
160
+ type="submit"
161
+ variant="contained"
162
+ className="waiting-list-button"
163
+ >
164
+ {loading ? (
165
+ <CircularProgress size="22px" />
166
+ ) : (
167
+ 'ADD TO WAITING LIST'
168
+ )}
169
+ </Button>
170
+ </Form>
171
+ </Formik>
172
+ </>
173
+ )}
174
+ </div>
175
+ )
176
+ }
177
+
178
+ export default WaitingList
@@ -1,27 +1,27 @@
1
- .waiting-list {
2
- padding: 17px 35px 20px;
3
- }
4
- .waiting-list .field-item {
5
- margin-bottom: 30px;
6
- }
7
- .waiting-list .waiting-list-button {
8
- width: 100% !important;
9
- }
10
- .waiting-list .waiting-list-button:hover {
11
- background-color: #505050;
12
- }
13
- .waiting-list .success-message {
14
- text-align: center;
15
- margin-bottom: 15px;
16
- }
17
- .waiting-list .success-message p {
18
- margin: 0;
19
- }
20
- .waiting-list .no-tickets-text {
21
- text-align: center;
22
- font-weight: bold;
23
- }
24
- .waiting-list .added-success-message {
25
- font-size: 22px;
26
- margin-bottom: 10px;
1
+ .waiting-list {
2
+ padding: 17px 35px 20px;
3
+ }
4
+ .waiting-list .field-item {
5
+ margin-bottom: 30px;
6
+ }
7
+ .waiting-list .waiting-list-button {
8
+ width: 100% !important;
9
+ }
10
+ .waiting-list .waiting-list-button:hover {
11
+ background-color: #505050;
12
+ }
13
+ .waiting-list .success-message {
14
+ text-align: center;
15
+ margin-bottom: 15px;
16
+ }
17
+ .waiting-list .success-message p {
18
+ margin: 0;
19
+ }
20
+ .waiting-list .no-tickets-text {
21
+ text-align: center;
22
+ font-weight: bold;
23
+ }
24
+ .waiting-list .added-success-message {
25
+ font-size: 22px;
26
+ margin-bottom: 10px;
27
27
  }
package/src/env.ts CHANGED
@@ -1,19 +1,20 @@
1
- // preview
2
- export const ENV = {
3
- EVENT_ID: 160,
4
- BASE_URL: 'https://preview.ttf.fluxtech.me',
5
- CLIENT_ID: '4792a61f2fcb49197ab4c2d2f44df570',
6
- CLIENT_SECRET: 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9',
7
- STRIPE_PUBLISHABLE_KEY:
8
- 'pk_test_51H4BkOGqveRD6EShliLrT9vd7mPOBPvQSuqmvc3wIinDqxWsCLeS2N7HonPPn6MhjU35ayYy5v4I6MLlD4jNWrd000NSgAF6UL',
9
- }
10
-
11
- // prod
12
- export const ENV_PROD = {
13
- EVENT_ID: 9766,
14
- BASE_URL: 'https://www.ticketfairy.com',
15
- CLIENT_ID: 'e9d8f8922797b4621e562255afe90dbf',
16
- CLIENT_SECRET: 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9',
17
- STRIPE_PUBLISHABLE_KEY:
18
- 'pk_live_51JucaXAnOd2Grid07FqHOkqcoh90bbCYL5bG7OuyM5RtzUoolrFcHroCWici0G9w0YpqO7qsGz6WP7K6HHYw1yhz00cm7fj5n5',
19
- }
1
+ // preview
2
+ export const ENV = {
3
+ EVENT_ID: 160,
4
+ BASE_URL: 'https://preview.ttf.fluxtech.me',
5
+ CLIENT_ID: '4792a61f2fcb49197ab4c2d2f44df570',
6
+ CLIENT_SECRET: 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9',
7
+ STRIPE_PUBLISHABLE_KEY:
8
+ 'pk_test_51H4BkOGqveRD6EShliLrT9vd7mPOBPvQSuqmvc3wIinDqxWsCLeS2N7HonPPn6MhjU35ayYy5v4I6MLlD4jNWrd000NSgAF6UL',
9
+ BRAND_SLUG: 'mana-onetree-testing-brand'
10
+ }
11
+
12
+ // prod
13
+ export const ENV_PROD = {
14
+ EVENT_ID: 9766,
15
+ BASE_URL: 'https://www.ticketfairy.com',
16
+ CLIENT_ID: 'e9d8f8922797b4621e562255afe90dbf',
17
+ CLIENT_SECRET: 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9',
18
+ STRIPE_PUBLISHABLE_KEY:
19
+ 'pk_live_51JucaXAnOd2Grid07FqHOkqcoh90bbCYL5bG7OuyM5RtzUoolrFcHroCWici0G9w0YpqO7qsGz6WP7K6HHYw1yhz00cm7fj5n5',
20
+ }
package/src/index.ts CHANGED
@@ -1,13 +1,13 @@
1
- export { BillingInfoContainer } from './components/billing-info-container/index'
2
- export { PaymentContainer } from './components/paymentContainer/index'
3
- export { ConfirmationContainer } from './components/confirmationContainer/index'
4
- export { TicketsContainer } from './components/ticketsContainer/index'
5
- export {
6
- currencyNormalizerCreator,
7
- createFixedFloatNormalizer,
8
- } from './normalizers'
9
- export { LoginModal } from './components/loginModal'
10
- export { MyTicketsContainer } from './components/myTicketsContainer'
11
- export { OrderDetailsContainer } from './components/orderDetailsContainer'
12
- export { setConfigs } from './utils/setConfigs'
13
- export { TicketResaleContainer } from './components'
1
+ export { BillingInfoContainer } from './components/billing-info-container/index'
2
+ export { PaymentContainer } from './components/paymentContainer/index'
3
+ export { ConfirmationContainer } from './components/confirmationContainer/index'
4
+ export { TicketsContainer } from './components/ticketsContainer/index'
5
+ export {
6
+ currencyNormalizerCreator,
7
+ createFixedFloatNormalizer,
8
+ } from './normalizers'
9
+ export { LoginModal } from './components/loginModal'
10
+ export { MyTicketsContainer } from './components/myTicketsContainer'
11
+ export { OrderDetailsContainer } from './components/orderDetailsContainer'
12
+ export { setConfigs } from './utils/setConfigs'
13
+ export { TicketResaleContainer } from './components'
@@ -1,46 +1,46 @@
1
- export const currencyNormalizerCreator = (value: string | number, currency: string) =>
2
- !value ? '' : `${getCurrencySymbolByCurrency(currency)}${value}`
3
-
4
- export const createFixedFloatNormalizer = (fixedValue: number) => (value: string | number) =>
5
- value || `${value}` === '0' ? (+value).toFixed(fixedValue) : ''
6
-
7
- export const getCurrencySymbolByCurrency = (currency = '') => {
8
- switch (currency) {
9
- case 'GBP':
10
- return '£'
11
- case 'EUR':
12
- return '€'
13
- case 'INR':
14
- return '₹'
15
- case 'JMD':
16
- return 'J$'
17
- case 'NZD':
18
- return 'NZ$'
19
- case 'MYR':
20
- return 'RM'
21
- case 'MXN':
22
- return 'Mex$'
23
- case 'SGD':
24
- return 'S$'
25
- case 'AUD':
26
- return 'A$'
27
- case 'ZAR':
28
- return 'R'
29
- case 'ke':
30
- return 'Ksh'
31
- case 'TRY':
32
- return '₺'
33
- case 'CAD':
34
- return 'CA$'
35
- case 'THB':
36
- return '฿'
37
- case 'ISK':
38
- return 'Kr'
39
- case 'SEK':
40
- return 'kr'
41
- default:
42
- return 'US$'
43
- }
44
- }
45
-
1
+ export const currencyNormalizerCreator = (value: string | number, currency: string) =>
2
+ !value ? '' : `${getCurrencySymbolByCurrency(currency)}${value}`
3
+
4
+ export const createFixedFloatNormalizer = (fixedValue: number) => (value: string | number) =>
5
+ value || `${value}` === '0' ? (+value).toFixed(fixedValue) : ''
6
+
7
+ export const getCurrencySymbolByCurrency = (currency = '') => {
8
+ switch (currency) {
9
+ case 'GBP':
10
+ return '£'
11
+ case 'EUR':
12
+ return '€'
13
+ case 'INR':
14
+ return '₹'
15
+ case 'JMD':
16
+ return 'J$'
17
+ case 'NZD':
18
+ return 'NZ$'
19
+ case 'MYR':
20
+ return 'RM'
21
+ case 'MXN':
22
+ return 'Mex$'
23
+ case 'SGD':
24
+ return 'S$'
25
+ case 'AUD':
26
+ return 'A$'
27
+ case 'ZAR':
28
+ return 'R'
29
+ case 'ke':
30
+ return 'Ksh'
31
+ case 'TRY':
32
+ return '₺'
33
+ case 'CAD':
34
+ return 'CA$'
35
+ case 'THB':
36
+ return '฿'
37
+ case 'ISK':
38
+ return 'Kr'
39
+ case 'SEK':
40
+ return 'kr'
41
+ default:
42
+ return 'US$'
43
+ }
44
+ }
45
+
46
46
  export const removePlusSign = (string = '') => string.replace('+', '')
@@ -1,37 +1,37 @@
1
- import { ReactNode } from 'react'
2
-
3
- export interface IGroupItem {
4
- name: string;
5
- label: string | JSX.Element;
6
-
7
- // optional
8
- type?: string;
9
- className?: string;
10
- required?: boolean;
11
- component?: ReactNode | JSX.Element | HTMLElement;
12
- onValidate?: (value: any) => void;
13
- uniqueId?: string;
14
-
15
- // aditional props
16
- [key: string]: any;
17
- }
18
-
19
- export interface IFieldData {
20
- groupItems: IGroupItem[];
21
-
22
- // optional
23
- groupClassname?: string;
24
- groupLabel?: string | JSX.Element | HTMLElement;
25
- groupLabelClassName?: string;
26
- id: number;
27
- uniqueId?: string;
28
- }
29
- export interface IBillingInfoData {
30
- id: number | string;
31
- fields: IFieldData[];
32
-
33
- // optional
34
- label?: string | JSX.Element;
35
- labelClassName?: string;
36
- uniqueId?: string;
37
- }
1
+ import { ReactNode } from 'react'
2
+
3
+ export interface IGroupItem {
4
+ name: string;
5
+ label: string | JSX.Element;
6
+
7
+ // optional
8
+ type?: string;
9
+ className?: string;
10
+ required?: boolean;
11
+ component?: ReactNode | JSX.Element | HTMLElement;
12
+ onValidate?: (value: any) => void;
13
+ uniqueId?: string;
14
+
15
+ // aditional props
16
+ [key: string]: any;
17
+ }
18
+
19
+ export interface IFieldData {
20
+ groupItems: IGroupItem[];
21
+
22
+ // optional
23
+ groupClassname?: string;
24
+ groupLabel?: string | JSX.Element | HTMLElement;
25
+ groupLabelClassName?: string;
26
+ id: number;
27
+ uniqueId?: string;
28
+ }
29
+ export interface IBillingInfoData {
30
+ id: number | string;
31
+ fields: IFieldData[];
32
+
33
+ // optional
34
+ label?: string | JSX.Element;
35
+ labelClassName?: string;
36
+ uniqueId?: string;
37
+ }
@@ -1,7 +1,7 @@
1
- export interface IPaymentField {
2
- label: string;
3
- id: string;
4
-
5
- className?: string;
6
- normalizer?: any;
7
- }
1
+ export interface IPaymentField {
2
+ label: string;
3
+ id: string;
4
+
5
+ className?: string;
6
+ normalizer?: any;
7
+ }