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.
- package/dist/components/billing-info-container/index.d.ts +3 -1
- package/dist/components/common/SnackbarAlert.d.ts +13 -0
- package/dist/components/confirmationContainer/index.d.ts +2 -1
- package/dist/components/ticketsContainer/index.d.ts +2 -1
- package/dist/env.d.ts +1 -0
- package/dist/images/done.svg +3 -3
- package/dist/tf-checkout-react.cjs.development.js +242 -117
- 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 +243 -118
- 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 +278 -278
- package/src/assets/images/done.svg +3 -3
- package/src/components/.DS_Store +0 -0
- package/src/components/billing-info-container/index.tsx +796 -777
- package/src/components/billing-info-container/style.css +105 -105
- package/src/components/billing-info-container/utils.ts +224 -224
- package/src/components/common/CheckboxField.tsx +41 -41
- package/src/components/common/CustomField.tsx +84 -84
- 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/SelectField.tsx +80 -80
- package/src/components/common/SnackbarAlert.tsx +54 -0
- 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 -194
- package/src/components/confirmationContainer/social-buttons.tsx +94 -94
- package/src/components/confirmationContainer/style.css +202 -202
- package/src/components/countdown/index.tsx +89 -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 -137
- 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 +249 -249
- package/src/components/orderDetailsContainer/style.css +72 -72
- package/src/components/orderDetailsContainer/ticketsTable.tsx +124 -124
- package/src/components/paymentContainer/index.tsx +284 -284
- package/src/components/registerModal/index.tsx +190 -190
- package/src/components/stripePayment/index.tsx +253 -253
- package/src/components/stripePayment/style.css +59 -59
- package/src/components/ticketResale/index.tsx +56 -56
- package/src/components/ticketResaleModal/index.tsx +210 -210
- package/src/components/ticketResaleModal/style.css +28 -28
- package/src/components/ticketsContainer/PromoCodeSection.tsx +99 -99
- package/src/components/ticketsContainer/ReferralLogic.tsx +33 -33
- package/src/components/ticketsContainer/TicketRow.tsx +83 -83
- package/src/components/ticketsContainer/TicketsSection.tsx +81 -81
- package/src/components/ticketsContainer/index.tsx +430 -422
- package/src/components/ticketsContainer/style.css +181 -181
- package/src/components/ticketsContainer/utils.ts +11 -11
- package/src/components/timerWidget/index.tsx +70 -70
- package/src/components/timerWidget/style.css +26 -26
- package/src/components/waitingList/index.tsx +178 -178
- package/src/components/waitingList/style.css +26 -26
- package/src/env.ts +20 -19
- package/src/index.ts +13 -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,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
|
-
}
|
|
28
|
-
|
|
29
|
-
interface TicketsTableTypes {
|
|
30
|
-
tickets: ITicketTypes[];
|
|
31
|
-
handleSellTicket: (ticket: ITicketTypes) => void;
|
|
32
|
-
handleRemoveFromResale: (ticket: ITicketTypes) => void;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const TicketsTable = ({
|
|
36
|
-
tickets = [],
|
|
37
|
-
handleSellTicket = () => {},
|
|
38
|
-
handleRemoveFromResale = () => {}
|
|
39
|
-
}: TicketsTableTypes) => (
|
|
40
|
-
<div className="tickets-box">
|
|
41
|
-
<h4 className="sub-title">Your Tickets</h4>
|
|
42
|
-
<TableContainer component={Paper}>
|
|
43
|
-
<Table aria-label="collapsible table">
|
|
44
|
-
<TableHead>
|
|
45
|
-
<TableRow>
|
|
46
|
-
<TableCell>Ticket ID</TableCell>
|
|
47
|
-
<TableCell>Ticket Type</TableCell>
|
|
48
|
-
<TableCell>Ticket Holder Name</TableCell>
|
|
49
|
-
<TableCell>Status</TableCell>
|
|
50
|
-
<TableCell>Download</TableCell>
|
|
51
|
-
<TableCell />
|
|
52
|
-
</TableRow>
|
|
53
|
-
</TableHead>
|
|
54
|
-
<TableBody>
|
|
55
|
-
{tickets.map((ticket: ITicketTypes, index: number) => (
|
|
56
|
-
<Fragment key={index}>
|
|
57
|
-
<TableRow>
|
|
58
|
-
<TableCell>{ticket.hash}</TableCell>
|
|
59
|
-
<TableCell>{ticket.ticket_type}</TableCell>
|
|
60
|
-
<TableCell>{ticket.holder_name}</TableCell>
|
|
61
|
-
<TableCell>{ticket.status}</TableCell>
|
|
62
|
-
<TableCell>
|
|
63
|
-
<span
|
|
64
|
-
aria-hidden={true}
|
|
65
|
-
className="action-button"
|
|
66
|
-
onClick={() => downloadPDF(ticket.pdf_link)}
|
|
67
|
-
>
|
|
68
|
-
Download
|
|
69
|
-
</span>
|
|
70
|
-
</TableCell>
|
|
71
|
-
<TableCell>
|
|
72
|
-
{ticket.is_sellable && (
|
|
73
|
-
<span
|
|
74
|
-
aria-hidden={true}
|
|
75
|
-
className="action-button"
|
|
76
|
-
onClick={() => handleSellTicket(ticket)}
|
|
77
|
-
>
|
|
78
|
-
Sell Ticket
|
|
79
|
-
</span>
|
|
80
|
-
)}
|
|
81
|
-
{ticket.is_on_sale && (
|
|
82
|
-
<span
|
|
83
|
-
aria-hidden={true}
|
|
84
|
-
className="action-button"
|
|
85
|
-
onClick={() => handleRemoveFromResale(ticket)}
|
|
86
|
-
>
|
|
87
|
-
Remove from Resale
|
|
88
|
-
</span>
|
|
89
|
-
)}
|
|
90
|
-
</TableCell>
|
|
91
|
-
</TableRow>
|
|
92
|
-
{!!ticket.add_ons?.length && (
|
|
93
|
-
<TableRow>
|
|
94
|
-
<TableCell colSpan={6}>
|
|
95
|
-
<Table className="ticket-add-on-table">
|
|
96
|
-
<TableHead>
|
|
97
|
-
<TableRow>
|
|
98
|
-
<TableCell>Add-On</TableCell>
|
|
99
|
-
<TableCell>Status</TableCell>
|
|
100
|
-
</TableRow>
|
|
101
|
-
</TableHead>
|
|
102
|
-
<TableBody>
|
|
103
|
-
{ticket.add_ons.map(
|
|
104
|
-
(add_on: IAddOnTypes, index: number) => (
|
|
105
|
-
<TableRow key={index}>
|
|
106
|
-
<TableCell>{add_on.name}</TableCell>
|
|
107
|
-
<TableCell>{add_on.status}</TableCell>
|
|
108
|
-
</TableRow>
|
|
109
|
-
)
|
|
110
|
-
)}
|
|
111
|
-
</TableBody>
|
|
112
|
-
</Table>
|
|
113
|
-
</TableCell>
|
|
114
|
-
</TableRow>
|
|
115
|
-
)}
|
|
116
|
-
</Fragment>
|
|
117
|
-
))}
|
|
118
|
-
</TableBody>
|
|
119
|
-
</Table>
|
|
120
|
-
</TableContainer>
|
|
121
|
-
</div>
|
|
122
|
-
)
|
|
123
|
-
|
|
124
|
-
export default TicketsTable
|
|
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
|
+
interface TicketsTableTypes {
|
|
30
|
+
tickets: ITicketTypes[];
|
|
31
|
+
handleSellTicket: (ticket: ITicketTypes) => void;
|
|
32
|
+
handleRemoveFromResale: (ticket: ITicketTypes) => void;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const TicketsTable = ({
|
|
36
|
+
tickets = [],
|
|
37
|
+
handleSellTicket = () => {},
|
|
38
|
+
handleRemoveFromResale = () => {}
|
|
39
|
+
}: TicketsTableTypes) => (
|
|
40
|
+
<div className="tickets-box">
|
|
41
|
+
<h4 className="sub-title">Your Tickets</h4>
|
|
42
|
+
<TableContainer component={Paper}>
|
|
43
|
+
<Table aria-label="collapsible table">
|
|
44
|
+
<TableHead>
|
|
45
|
+
<TableRow>
|
|
46
|
+
<TableCell>Ticket ID</TableCell>
|
|
47
|
+
<TableCell>Ticket Type</TableCell>
|
|
48
|
+
<TableCell>Ticket Holder Name</TableCell>
|
|
49
|
+
<TableCell>Status</TableCell>
|
|
50
|
+
<TableCell>Download</TableCell>
|
|
51
|
+
<TableCell />
|
|
52
|
+
</TableRow>
|
|
53
|
+
</TableHead>
|
|
54
|
+
<TableBody>
|
|
55
|
+
{tickets.map((ticket: ITicketTypes, index: number) => (
|
|
56
|
+
<Fragment key={index}>
|
|
57
|
+
<TableRow>
|
|
58
|
+
<TableCell>{ticket.hash}</TableCell>
|
|
59
|
+
<TableCell>{ticket.ticket_type}</TableCell>
|
|
60
|
+
<TableCell>{ticket.holder_name}</TableCell>
|
|
61
|
+
<TableCell>{ticket.status}</TableCell>
|
|
62
|
+
<TableCell>
|
|
63
|
+
<span
|
|
64
|
+
aria-hidden={true}
|
|
65
|
+
className="action-button"
|
|
66
|
+
onClick={() => downloadPDF(ticket.pdf_link)}
|
|
67
|
+
>
|
|
68
|
+
Download
|
|
69
|
+
</span>
|
|
70
|
+
</TableCell>
|
|
71
|
+
<TableCell>
|
|
72
|
+
{ticket.is_sellable && (
|
|
73
|
+
<span
|
|
74
|
+
aria-hidden={true}
|
|
75
|
+
className="action-button"
|
|
76
|
+
onClick={() => handleSellTicket(ticket)}
|
|
77
|
+
>
|
|
78
|
+
Sell Ticket
|
|
79
|
+
</span>
|
|
80
|
+
)}
|
|
81
|
+
{ticket.is_on_sale && (
|
|
82
|
+
<span
|
|
83
|
+
aria-hidden={true}
|
|
84
|
+
className="action-button"
|
|
85
|
+
onClick={() => handleRemoveFromResale(ticket)}
|
|
86
|
+
>
|
|
87
|
+
Remove from Resale
|
|
88
|
+
</span>
|
|
89
|
+
)}
|
|
90
|
+
</TableCell>
|
|
91
|
+
</TableRow>
|
|
92
|
+
{!!ticket.add_ons?.length && (
|
|
93
|
+
<TableRow>
|
|
94
|
+
<TableCell colSpan={6}>
|
|
95
|
+
<Table className="ticket-add-on-table">
|
|
96
|
+
<TableHead>
|
|
97
|
+
<TableRow>
|
|
98
|
+
<TableCell>Add-On</TableCell>
|
|
99
|
+
<TableCell>Status</TableCell>
|
|
100
|
+
</TableRow>
|
|
101
|
+
</TableHead>
|
|
102
|
+
<TableBody>
|
|
103
|
+
{ticket.add_ons.map(
|
|
104
|
+
(add_on: IAddOnTypes, index: number) => (
|
|
105
|
+
<TableRow key={index}>
|
|
106
|
+
<TableCell>{add_on.name}</TableCell>
|
|
107
|
+
<TableCell>{add_on.status}</TableCell>
|
|
108
|
+
</TableRow>
|
|
109
|
+
)
|
|
110
|
+
)}
|
|
111
|
+
</TableBody>
|
|
112
|
+
</Table>
|
|
113
|
+
</TableCell>
|
|
114
|
+
</TableRow>
|
|
115
|
+
)}
|
|
116
|
+
</Fragment>
|
|
117
|
+
))}
|
|
118
|
+
</TableBody>
|
|
119
|
+
</Table>
|
|
120
|
+
</TableContainer>
|
|
121
|
+
</div>
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
export default TicketsTable
|