tf-checkout-react 1.0.103 → 1.0.106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.d.ts +3 -1
- package/dist/components/common/CustomField.d.ts +1 -1
- package/dist/components/common/DatePickerField.d.ts +14 -0
- package/dist/components/common/RedirectModal.d.ts +7 -0
- package/dist/components/countdown/index.d.ts +3 -1
- package/dist/components/orderDetailsContainer/ticketsTable.d.ts +2 -0
- package/dist/components/rsvpContainer/index.d.ts +7 -0
- package/dist/components/ticketResale/index.d.ts +5 -3
- package/dist/components/ticketsContainer/AccessCodeSection.d.ts +7 -0
- package/dist/components/ticketsContainer/PromoCodeSection.d.ts +5 -9
- package/dist/components/ticketsContainer/TicketsSection.d.ts +6 -3
- package/dist/components/ticketsContainer/index.d.ts +9 -2
- package/dist/components/timerWidget/index.d.ts +3 -3
- package/dist/images/cross.svg +44 -0
- package/dist/images/done.svg +3 -3
- package/dist/index.d.ts +2 -0
- package/dist/tf-checkout-react.cjs.development.js +639 -223
- package/dist/tf-checkout-react.cjs.development.js.map +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
- package/dist/tf-checkout-react.esm.js +645 -231
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -1
- package/package.json +89 -89
- package/src/.DS_Store +0 -0
- package/src/.d.ts +2 -2
- package/src/api/index.ts +300 -278
- package/src/assets/images/cross.svg +44 -0
- package/src/assets/images/done.svg +3 -3
- package/src/components/.DS_Store +0 -0
- package/src/components/billing-info-container/index.tsx +811 -799
- package/src/components/billing-info-container/style.css +105 -105
- package/src/components/billing-info-container/utils.ts +225 -224
- package/src/components/common/CheckboxField.tsx +41 -41
- package/src/components/common/CustomField.tsx +87 -84
- package/src/components/common/DatePickerField.tsx +98 -0
- package/src/components/common/FormikPhoneNumberField.tsx +51 -51
- package/src/components/common/Loader.tsx +9 -9
- package/src/components/common/RadioField.tsx +35 -35
- package/src/components/common/RedirectModal.tsx +43 -0
- package/src/components/common/SelectField.tsx +80 -80
- package/src/components/common/SnackbarAlert.tsx +53 -53
- package/src/components/common/index.tsx +4 -4
- package/src/components/confirmModal/index.tsx +51 -51
- package/src/components/confirmModal/style.css +21 -21
- package/src/components/confirmationContainer/config.ts +72 -72
- package/src/components/confirmationContainer/index.tsx +197 -197
- package/src/components/confirmationContainer/social-buttons.tsx +94 -94
- package/src/components/confirmationContainer/style.css +202 -202
- package/src/components/countdown/index.tsx +98 -89
- package/src/components/countdown/style.css +9 -9
- package/src/components/index.ts +7 -7
- package/src/components/loginModal/index.tsx +209 -209
- package/src/components/loginModal/style.css +71 -71
- package/src/components/myTicketsContainer/index.tsx +196 -196
- package/src/components/myTicketsContainer/row.tsx +41 -41
- package/src/components/myTicketsContainer/style.css +39 -39
- package/src/components/myTicketsContainer/tableConfig.tsx +34 -34
- package/src/components/orderDetailsContainer/index.tsx +252 -249
- package/src/components/orderDetailsContainer/style.css +72 -72
- package/src/components/orderDetailsContainer/ticketsTable.tsx +130 -124
- package/src/components/paymentContainer/index.tsx +285 -284
- package/src/components/registerModal/index.tsx +190 -190
- package/src/components/rsvpContainer/index.tsx +126 -0
- package/src/components/stripePayment/index.tsx +254 -253
- package/src/components/stripePayment/style.css +59 -59
- package/src/components/ticketResale/index.tsx +74 -56
- package/src/components/ticketResaleModal/index.tsx +215 -210
- package/src/components/ticketResaleModal/style.css +28 -28
- package/src/components/ticketsContainer/AccessCodeSection.tsx +50 -0
- package/src/components/ticketsContainer/PromoCodeSection.tsx +88 -99
- package/src/components/ticketsContainer/ReferralLogic.tsx +31 -33
- package/src/components/ticketsContainer/TicketRow.tsx +83 -83
- package/src/components/ticketsContainer/TicketsSection.tsx +90 -81
- package/src/components/ticketsContainer/index.tsx +464 -430
- package/src/components/ticketsContainer/style.css +181 -181
- package/src/components/ticketsContainer/utils.ts +11 -11
- package/src/components/timerWidget/index.tsx +87 -70
- package/src/components/timerWidget/style.css +34 -26
- package/src/components/waitingList/index.tsx +178 -178
- package/src/components/waitingList/style.css +26 -26
- package/src/env.ts +20 -20
- package/src/index.ts +15 -13
- package/src/normalizers/index.ts +45 -45
- package/src/types/billing-info-data.ts +37 -37
- package/src/types/payment-field.ts +7 -7
- package/src/types/referral-promotion.ts +7 -7
- package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +59 -59
- package/src/utils/downloadPDF.tsx +30 -30
- package/src/utils/formikErrorFocus.ts +24 -24
- package/src/utils/getImage.ts +14 -14
- package/src/utils/getQueryVariable.ts +13 -13
- package/src/utils/index.ts +5 -5
- package/src/utils/setConfigs.ts +26 -26
- package/src/utils/showZero.tsx +10 -10
- package/src/validators/index.ts +20 -20
|
@@ -1,124 +1,130 @@
|
|
|
1
|
-
import React, { Fragment } from 'react'
|
|
2
|
-
import Table from '@mui/material/Table'
|
|
3
|
-
import TableBody from '@mui/material/TableBody'
|
|
4
|
-
import TableCell from '@mui/material/TableCell'
|
|
5
|
-
import TableContainer from '@mui/material/TableContainer'
|
|
6
|
-
import TableHead from '@mui/material/TableHead'
|
|
7
|
-
import TableRow from '@mui/material/TableRow'
|
|
8
|
-
import Paper from '@mui/material/Paper'
|
|
9
|
-
import { downloadPDF } from '../../utils'
|
|
10
|
-
|
|
11
|
-
interface IAddOnTypes {
|
|
12
|
-
name: string;
|
|
13
|
-
status: string;
|
|
14
|
-
}
|
|
15
|
-
export interface ITicketTypes {
|
|
16
|
-
add_ons?: IAddOnTypes[];
|
|
17
|
-
hash: string;
|
|
18
|
-
ticket_type: string;
|
|
19
|
-
holder_name: string;
|
|
20
|
-
status: string;
|
|
21
|
-
pdf_link: string;
|
|
22
|
-
is_sellable: boolean;
|
|
23
|
-
is_on_sale?: boolean;
|
|
24
|
-
event_name: string;
|
|
25
|
-
currency: string;
|
|
26
|
-
resale_fee_amount: number | string;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
<TableCell>Ticket
|
|
49
|
-
<TableCell>
|
|
50
|
-
<TableCell>
|
|
51
|
-
<TableCell
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
<TableCell>{ticket.
|
|
61
|
-
<TableCell>{ticket.
|
|
62
|
-
<TableCell>
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
1
|
+
import React, { Fragment } from 'react'
|
|
2
|
+
import Table from '@mui/material/Table'
|
|
3
|
+
import TableBody from '@mui/material/TableBody'
|
|
4
|
+
import TableCell from '@mui/material/TableCell'
|
|
5
|
+
import TableContainer from '@mui/material/TableContainer'
|
|
6
|
+
import TableHead from '@mui/material/TableHead'
|
|
7
|
+
import TableRow from '@mui/material/TableRow'
|
|
8
|
+
import Paper from '@mui/material/Paper'
|
|
9
|
+
import { downloadPDF } from '../../utils'
|
|
10
|
+
|
|
11
|
+
interface IAddOnTypes {
|
|
12
|
+
name: string;
|
|
13
|
+
status: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ITicketTypes {
|
|
16
|
+
add_ons?: IAddOnTypes[];
|
|
17
|
+
hash: string;
|
|
18
|
+
ticket_type: string;
|
|
19
|
+
holder_name: string;
|
|
20
|
+
status: string;
|
|
21
|
+
pdf_link: string;
|
|
22
|
+
is_sellable: boolean;
|
|
23
|
+
is_on_sale?: boolean;
|
|
24
|
+
event_name: string;
|
|
25
|
+
currency: string;
|
|
26
|
+
resale_fee_amount: number | string;
|
|
27
|
+
ticket_type_hash: string;
|
|
28
|
+
ticket_type_is_active?: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface TicketsTableTypes {
|
|
32
|
+
tickets: ITicketTypes[];
|
|
33
|
+
handleSellTicket: (ticket: ITicketTypes) => void;
|
|
34
|
+
handleRemoveFromResale: (ticket: ITicketTypes) => void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const TicketsTable = ({
|
|
38
|
+
tickets = [],
|
|
39
|
+
handleSellTicket = () => {},
|
|
40
|
+
handleRemoveFromResale = () => {}
|
|
41
|
+
}: TicketsTableTypes) => (
|
|
42
|
+
<div className="tickets-box">
|
|
43
|
+
<h4 className="sub-title">Your Tickets</h4>
|
|
44
|
+
<TableContainer component={Paper}>
|
|
45
|
+
<Table aria-label="collapsible table">
|
|
46
|
+
<TableHead>
|
|
47
|
+
<TableRow>
|
|
48
|
+
<TableCell>Ticket ID</TableCell>
|
|
49
|
+
<TableCell>Ticket Type</TableCell>
|
|
50
|
+
<TableCell>Ticket Holder Name</TableCell>
|
|
51
|
+
<TableCell>Status</TableCell>
|
|
52
|
+
<TableCell>Download</TableCell>
|
|
53
|
+
<TableCell />
|
|
54
|
+
</TableRow>
|
|
55
|
+
</TableHead>
|
|
56
|
+
<TableBody>
|
|
57
|
+
{tickets.map((ticket: ITicketTypes, index: number) => (
|
|
58
|
+
<Fragment key={index}>
|
|
59
|
+
<TableRow>
|
|
60
|
+
<TableCell>{ticket.hash}</TableCell>
|
|
61
|
+
<TableCell>{ticket.ticket_type}</TableCell>
|
|
62
|
+
<TableCell>{ticket.holder_name}</TableCell>
|
|
63
|
+
<TableCell>{ticket.status}</TableCell>
|
|
64
|
+
<TableCell>
|
|
65
|
+
{
|
|
66
|
+
ticket.status !== "Sold" && (
|
|
67
|
+
<span
|
|
68
|
+
aria-hidden={true}
|
|
69
|
+
className="action-button"
|
|
70
|
+
onClick={() => downloadPDF(ticket.pdf_link)}
|
|
71
|
+
>
|
|
72
|
+
Download
|
|
73
|
+
</span>
|
|
74
|
+
)
|
|
75
|
+
}
|
|
76
|
+
</TableCell>
|
|
77
|
+
<TableCell>
|
|
78
|
+
{ticket.is_sellable && (
|
|
79
|
+
<span
|
|
80
|
+
aria-hidden={true}
|
|
81
|
+
className="action-button"
|
|
82
|
+
onClick={() => handleSellTicket(ticket)}
|
|
83
|
+
>
|
|
84
|
+
Sell Ticket
|
|
85
|
+
</span>
|
|
86
|
+
)}
|
|
87
|
+
{ticket.is_on_sale && (
|
|
88
|
+
<span
|
|
89
|
+
aria-hidden={true}
|
|
90
|
+
className="action-button"
|
|
91
|
+
onClick={() => handleRemoveFromResale(ticket)}
|
|
92
|
+
>
|
|
93
|
+
Remove from Resale
|
|
94
|
+
</span>
|
|
95
|
+
)}
|
|
96
|
+
</TableCell>
|
|
97
|
+
</TableRow>
|
|
98
|
+
{!!ticket.add_ons?.length && (
|
|
99
|
+
<TableRow>
|
|
100
|
+
<TableCell colSpan={6}>
|
|
101
|
+
<Table className="ticket-add-on-table">
|
|
102
|
+
<TableHead>
|
|
103
|
+
<TableRow>
|
|
104
|
+
<TableCell>Add-On</TableCell>
|
|
105
|
+
<TableCell>Status</TableCell>
|
|
106
|
+
</TableRow>
|
|
107
|
+
</TableHead>
|
|
108
|
+
<TableBody>
|
|
109
|
+
{ticket.add_ons.map(
|
|
110
|
+
(add_on: IAddOnTypes, index: number) => (
|
|
111
|
+
<TableRow key={index}>
|
|
112
|
+
<TableCell>{add_on.name}</TableCell>
|
|
113
|
+
<TableCell>{add_on.status}</TableCell>
|
|
114
|
+
</TableRow>
|
|
115
|
+
)
|
|
116
|
+
)}
|
|
117
|
+
</TableBody>
|
|
118
|
+
</Table>
|
|
119
|
+
</TableCell>
|
|
120
|
+
</TableRow>
|
|
121
|
+
)}
|
|
122
|
+
</Fragment>
|
|
123
|
+
))}
|
|
124
|
+
</TableBody>
|
|
125
|
+
</Table>
|
|
126
|
+
</TableContainer>
|
|
127
|
+
</div>
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
export default TicketsTable
|