tf-checkout-react 1.0.104 → 1.0.105

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 (78) hide show
  1. package/dist/components/ticketsContainer/TicketsSection.d.ts +2 -1
  2. package/dist/components/ticketsContainer/index.d.ts +2 -1
  3. package/dist/images/done.svg +3 -3
  4. package/dist/tf-checkout-react.cjs.development.js +8 -6
  5. package/dist/tf-checkout-react.cjs.development.js.map +1 -1
  6. package/dist/tf-checkout-react.cjs.production.min.js +1 -1
  7. package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
  8. package/dist/tf-checkout-react.esm.js +8 -6
  9. package/dist/tf-checkout-react.esm.js.map +1 -1
  10. package/package.json +89 -89
  11. package/src/.d.ts +2 -2
  12. package/src/api/index.ts +293 -293
  13. package/src/assets/images/done.svg +3 -3
  14. package/src/components/billing-info-container/index.tsx +796 -796
  15. package/src/components/billing-info-container/style.css +105 -105
  16. package/src/components/billing-info-container/utils.ts +224 -224
  17. package/src/components/common/CheckboxField.tsx +41 -41
  18. package/src/components/common/CustomField.tsx +84 -84
  19. package/src/components/common/FormikPhoneNumberField.tsx +51 -51
  20. package/src/components/common/Loader.tsx +9 -9
  21. package/src/components/common/RadioField.tsx +35 -35
  22. package/src/components/common/RedirectModal.tsx +43 -43
  23. package/src/components/common/SelectField.tsx +80 -80
  24. package/src/components/common/SnackbarAlert.tsx +53 -53
  25. package/src/components/common/index.tsx +4 -4
  26. package/src/components/confirmModal/index.tsx +51 -51
  27. package/src/components/confirmModal/style.css +21 -21
  28. package/src/components/confirmationContainer/config.ts +72 -72
  29. package/src/components/confirmationContainer/index.tsx +197 -197
  30. package/src/components/confirmationContainer/social-buttons.tsx +94 -94
  31. package/src/components/confirmationContainer/style.css +202 -202
  32. package/src/components/countdown/index.tsx +89 -89
  33. package/src/components/countdown/style.css +9 -9
  34. package/src/components/index.ts +7 -7
  35. package/src/components/loginModal/index.tsx +209 -209
  36. package/src/components/loginModal/style.css +71 -71
  37. package/src/components/myTicketsContainer/index.tsx +196 -196
  38. package/src/components/myTicketsContainer/row.tsx +41 -41
  39. package/src/components/myTicketsContainer/style.css +39 -39
  40. package/src/components/myTicketsContainer/tableConfig.tsx +34 -34
  41. package/src/components/orderDetailsContainer/index.tsx +249 -249
  42. package/src/components/orderDetailsContainer/style.css +72 -72
  43. package/src/components/orderDetailsContainer/ticketsTable.tsx +124 -124
  44. package/src/components/paymentContainer/index.tsx +284 -284
  45. package/src/components/registerModal/index.tsx +190 -190
  46. package/src/components/stripePayment/index.tsx +253 -253
  47. package/src/components/stripePayment/style.css +59 -59
  48. package/src/components/ticketResale/index.tsx +56 -56
  49. package/src/components/ticketResaleModal/index.tsx +210 -210
  50. package/src/components/ticketResaleModal/style.css +28 -28
  51. package/src/components/ticketsContainer/PromoCodeSection.tsx +99 -99
  52. package/src/components/ticketsContainer/ReferralLogic.tsx +33 -33
  53. package/src/components/ticketsContainer/TicketRow.tsx +83 -83
  54. package/src/components/ticketsContainer/TicketsSection.tsx +85 -81
  55. package/src/components/ticketsContainer/index.tsx +430 -427
  56. package/src/components/ticketsContainer/style.css +181 -181
  57. package/src/components/ticketsContainer/utils.ts +11 -11
  58. package/src/components/timerWidget/index.tsx +70 -70
  59. package/src/components/timerWidget/style.css +26 -26
  60. package/src/components/waitingList/index.tsx +178 -178
  61. package/src/components/waitingList/style.css +26 -26
  62. package/src/env.ts +20 -20
  63. package/src/index.ts +14 -14
  64. package/src/normalizers/index.ts +45 -45
  65. package/src/types/billing-info-data.ts +37 -37
  66. package/src/types/payment-field.ts +7 -7
  67. package/src/types/referral-promotion.ts +7 -7
  68. package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +59 -59
  69. package/src/utils/downloadPDF.tsx +30 -30
  70. package/src/utils/formikErrorFocus.ts +24 -24
  71. package/src/utils/getImage.ts +14 -14
  72. package/src/utils/getQueryVariable.ts +13 -13
  73. package/src/utils/index.ts +5 -5
  74. package/src/utils/setConfigs.ts +26 -26
  75. package/src/utils/showZero.tsx +10 -10
  76. package/src/validators/index.ts +20 -20
  77. package/src/.DS_Store +0 -0
  78. package/src/components/.DS_Store +0 -0
@@ -1,80 +1,80 @@
1
- import React from 'react'
2
- import Select from '@mui/material/Select'
3
- import _map from 'lodash/map'
4
- import _get from 'lodash/get'
5
-
6
- import { FieldInputProps, FormikProps } from 'formik'
7
- import { FormControl, InputLabel, FormHelperText } from '@mui/material'
8
- import { useTheme } from '@mui/styles'
9
-
10
- export interface ISelectOption {
11
- label: string | number;
12
- value?: string | number;
13
- [key: string]: any;
14
- }
15
-
16
- export interface ISelectField {
17
- label: string;
18
-
19
- field: FieldInputProps<any>;
20
- form: FormikProps<any>;
21
- theme: 'dark' | 'light';
22
-
23
- // optional
24
- type?: string;
25
- selectOptions?: ISelectOption[];
26
- }
27
-
28
- interface IOtherProps {
29
- [key: string]: any;
30
- }
31
-
32
- export const SelectField = ({
33
- label,
34
- type = 'text',
35
- field,
36
- selectOptions = [] as ISelectOption[],
37
- form: { touched, errors },
38
- theme,
39
- }: ISelectField & IOtherProps) => {
40
- const isTouched = Boolean(_get(touched, field.name))
41
- const error = _get(errors, field.name)
42
-
43
- const customTheme: any = useTheme()
44
-
45
- return (
46
- <FormControl fullWidth={true}>
47
- <InputLabel style={customTheme?.input} htmlFor={field.name} error={!!error && isTouched} shrink={true}>
48
- {label}
49
- </InputLabel>
50
- <Select
51
- id={field.name}
52
- label={label}
53
- type={type}
54
- fullWidth={true}
55
- error={!!error && isTouched}
56
- inputProps={{
57
- id: field.name,
58
- }}
59
- native={true}
60
- className={theme}
61
- MenuProps={{ className: theme }}
62
- {...field}
63
- style={customTheme?.input}
64
- >
65
- {_map(selectOptions, option => (
66
- <option
67
- key={option.value}
68
- value={option.value}
69
- disabled={option.disabled}
70
- >
71
- {option.label}
72
- </option>
73
- ))}
74
- </Select>
75
- {isTouched && error ? (
76
- <FormHelperText error={!!error && isTouched}>{error}</FormHelperText>
77
- ) : null}
78
- </FormControl>
79
- )
80
- }
1
+ import React from 'react'
2
+ import Select from '@mui/material/Select'
3
+ import _map from 'lodash/map'
4
+ import _get from 'lodash/get'
5
+
6
+ import { FieldInputProps, FormikProps } from 'formik'
7
+ import { FormControl, InputLabel, FormHelperText } from '@mui/material'
8
+ import { useTheme } from '@mui/styles'
9
+
10
+ export interface ISelectOption {
11
+ label: string | number;
12
+ value?: string | number;
13
+ [key: string]: any;
14
+ }
15
+
16
+ export interface ISelectField {
17
+ label: string;
18
+
19
+ field: FieldInputProps<any>;
20
+ form: FormikProps<any>;
21
+ theme: 'dark' | 'light';
22
+
23
+ // optional
24
+ type?: string;
25
+ selectOptions?: ISelectOption[];
26
+ }
27
+
28
+ interface IOtherProps {
29
+ [key: string]: any;
30
+ }
31
+
32
+ export const SelectField = ({
33
+ label,
34
+ type = 'text',
35
+ field,
36
+ selectOptions = [] as ISelectOption[],
37
+ form: { touched, errors },
38
+ theme,
39
+ }: ISelectField & IOtherProps) => {
40
+ const isTouched = Boolean(_get(touched, field.name))
41
+ const error = _get(errors, field.name)
42
+
43
+ const customTheme: any = useTheme()
44
+
45
+ return (
46
+ <FormControl fullWidth={true}>
47
+ <InputLabel style={customTheme?.input} htmlFor={field.name} error={!!error && isTouched} shrink={true}>
48
+ {label}
49
+ </InputLabel>
50
+ <Select
51
+ id={field.name}
52
+ label={label}
53
+ type={type}
54
+ fullWidth={true}
55
+ error={!!error && isTouched}
56
+ inputProps={{
57
+ id: field.name,
58
+ }}
59
+ native={true}
60
+ className={theme}
61
+ MenuProps={{ className: theme }}
62
+ {...field}
63
+ style={customTheme?.input}
64
+ >
65
+ {_map(selectOptions, option => (
66
+ <option
67
+ key={option.value}
68
+ value={option.value}
69
+ disabled={option.disabled}
70
+ >
71
+ {option.label}
72
+ </option>
73
+ ))}
74
+ </Select>
75
+ {isTouched && error ? (
76
+ <FormHelperText error={!!error && isTouched}>{error}</FormHelperText>
77
+ ) : null}
78
+ </FormControl>
79
+ )
80
+ }
@@ -1,54 +1,54 @@
1
- import React from 'react'
2
- import { Alert, AlertColor, Snackbar, SnackbarOrigin } from '@mui/material'
3
-
4
- interface ISnackbarAlertProps {
5
- isOpen: boolean
6
- message: string
7
- type: AlertColor
8
- position?: SnackbarOrigin
9
- autoHideDuration?: number
10
- variant?: 'filled' | 'standard' | 'outlined'
11
-
12
- onClose: () => void
13
- }
14
-
15
- const SnackbarAlert = ({
16
- isOpen,
17
- message,
18
- type,
19
- position,
20
- autoHideDuration = 3000,
21
- variant,
22
- onClose,
23
- }: ISnackbarAlertProps) => {
24
- return (
25
- <div className="snackbar-alert-container">
26
- <Snackbar
27
- autoHideDuration={autoHideDuration}
28
- open={isOpen}
29
- anchorOrigin={position || { vertical: 'top', horizontal: 'center' }}
30
- onClose={onClose}
31
- classes={{
32
- root: 'snackbar-alert-snackbar-root',
33
- }}
34
- >
35
- <Alert
36
- severity={type}
37
- onClose={onClose}
38
- variant={variant || 'filled'}
39
- classes={{
40
- icon: 'snackbar-alert-icon',
41
- root: 'snackbar-alert-alert-root',
42
- action: 'snackbar-alert-action',
43
- message: 'snackbar-alert-message',
44
- filled: 'snackbar-alert-filled',
45
- }}
46
- >
47
- {message}
48
- </Alert>
49
- </Snackbar>
50
- </div>
51
- )
52
- }
53
-
1
+ import React from 'react'
2
+ import { Alert, AlertColor, Snackbar, SnackbarOrigin } from '@mui/material'
3
+
4
+ interface ISnackbarAlertProps {
5
+ isOpen: boolean
6
+ message: string
7
+ type: AlertColor
8
+ position?: SnackbarOrigin
9
+ autoHideDuration?: number
10
+ variant?: 'filled' | 'standard' | 'outlined'
11
+
12
+ onClose: () => void
13
+ }
14
+
15
+ const SnackbarAlert = ({
16
+ isOpen,
17
+ message,
18
+ type,
19
+ position,
20
+ autoHideDuration = 3000,
21
+ variant,
22
+ onClose,
23
+ }: ISnackbarAlertProps) => {
24
+ return (
25
+ <div className="snackbar-alert-container">
26
+ <Snackbar
27
+ autoHideDuration={autoHideDuration}
28
+ open={isOpen}
29
+ anchorOrigin={position || { vertical: 'top', horizontal: 'center' }}
30
+ onClose={onClose}
31
+ classes={{
32
+ root: 'snackbar-alert-snackbar-root',
33
+ }}
34
+ >
35
+ <Alert
36
+ severity={type}
37
+ onClose={onClose}
38
+ variant={variant || 'filled'}
39
+ classes={{
40
+ icon: 'snackbar-alert-icon',
41
+ root: 'snackbar-alert-alert-root',
42
+ action: 'snackbar-alert-action',
43
+ message: 'snackbar-alert-message',
44
+ filled: 'snackbar-alert-filled',
45
+ }}
46
+ >
47
+ {message}
48
+ </Alert>
49
+ </Snackbar>
50
+ </div>
51
+ )
52
+ }
53
+
54
54
  export default SnackbarAlert
@@ -1,5 +1,5 @@
1
- export { CheckboxField } from './CheckboxField'
2
- export { CustomField } from './CustomField'
3
- export { FormikPhoneNumberField } from './FormikPhoneNumberField'
4
- export { Loader } from './Loader'
1
+ export { CheckboxField } from './CheckboxField'
2
+ export { CustomField } from './CustomField'
3
+ export { FormikPhoneNumberField } from './FormikPhoneNumberField'
4
+ export { Loader } from './Loader'
5
5
  export { SelectField } from './SelectField'
@@ -1,51 +1,51 @@
1
- import React, { FC } from 'react'
2
- import Modal from '@mui/material/Modal'
3
- import Box from '@mui/material/Box'
4
- import Button from '@mui/material/Button';
5
- import './style.css'
6
-
7
- interface Props {
8
- message: string;
9
- onClose: () => void;
10
- onConfirm: () => void;
11
- }
12
-
13
- const style: React.CSSProperties = {
14
- position: 'absolute',
15
- top: '50%',
16
- left: '50%',
17
- transform: 'translate(-50%, -50%)',
18
- minWidth: 480,
19
- backgroundColor: '#e3e3e3',
20
- border: '1px solid white',
21
- outline: 'none',
22
- padding: '14px',
23
- maxHeight: '85vh',
24
- overflow: 'auto'
25
- }
26
-
27
- const ConfirmModal: FC<Props> = ({
28
- message = '',
29
- onClose = () => {},
30
- onConfirm = () => {},
31
- }) => {
32
- return (
33
- <Modal
34
- open={true}
35
- onClose={onClose}
36
- aria-labelledby="modal-modal-title"
37
- aria-describedby="modal-modal-description"
38
- className='confirm-modal'
39
- >
40
- <Box style={style}>
41
- <p>{message}</p>
42
- <div className='footer'>
43
- <Button onClick={onClose}>Cancel</Button>
44
- <Button onClick={onConfirm}>OK</Button>
45
- </div>
46
- </Box>
47
- </Modal>
48
- )
49
- }
50
-
51
- export default ConfirmModal
1
+ import React, { FC } from 'react'
2
+ import Modal from '@mui/material/Modal'
3
+ import Box from '@mui/material/Box'
4
+ import Button from '@mui/material/Button';
5
+ import './style.css'
6
+
7
+ interface Props {
8
+ message: string;
9
+ onClose: () => void;
10
+ onConfirm: () => void;
11
+ }
12
+
13
+ const style: React.CSSProperties = {
14
+ position: 'absolute',
15
+ top: '50%',
16
+ left: '50%',
17
+ transform: 'translate(-50%, -50%)',
18
+ minWidth: 480,
19
+ backgroundColor: '#e3e3e3',
20
+ border: '1px solid white',
21
+ outline: 'none',
22
+ padding: '14px',
23
+ maxHeight: '85vh',
24
+ overflow: 'auto'
25
+ }
26
+
27
+ const ConfirmModal: FC<Props> = ({
28
+ message = '',
29
+ onClose = () => {},
30
+ onConfirm = () => {},
31
+ }) => {
32
+ return (
33
+ <Modal
34
+ open={true}
35
+ onClose={onClose}
36
+ aria-labelledby="modal-modal-title"
37
+ aria-describedby="modal-modal-description"
38
+ className='confirm-modal'
39
+ >
40
+ <Box style={style}>
41
+ <p>{message}</p>
42
+ <div className='footer'>
43
+ <Button onClick={onClose}>Cancel</Button>
44
+ <Button onClick={onConfirm}>OK</Button>
45
+ </div>
46
+ </Box>
47
+ </Modal>
48
+ )
49
+ }
50
+
51
+ export default ConfirmModal
@@ -1,21 +1,21 @@
1
- .confirm-modal .footer {
2
- display: flex;
3
- gap: 10px;
4
- justify-content: flex-end;
5
- border-top: 1px solid rgb(192, 191, 191);
6
- }
7
- .confirm-modal .footer button {
8
- width: max-content;
9
- padding: 12px 8px;
10
- font-size: 12px;
11
- min-height: unset;
12
- text-transform: unset;
13
- }
14
- .confirm-modal .footer button:hover {
15
- width: max-content;
16
- padding: 12px 8px;
17
- font-size: 12px;
18
- background: #505050;
19
- min-height: unset;
20
- text-transform: unset;
21
- }
1
+ .confirm-modal .footer {
2
+ display: flex;
3
+ gap: 10px;
4
+ justify-content: flex-end;
5
+ border-top: 1px solid rgb(192, 191, 191);
6
+ }
7
+ .confirm-modal .footer button {
8
+ width: max-content;
9
+ padding: 12px 8px;
10
+ font-size: 12px;
11
+ min-height: unset;
12
+ text-transform: unset;
13
+ }
14
+ .confirm-modal .footer button:hover {
15
+ width: max-content;
16
+ padding: 12px 8px;
17
+ font-size: 12px;
18
+ background: #505050;
19
+ min-height: unset;
20
+ text-transform: unset;
21
+ }
@@ -1,72 +1,72 @@
1
- import {
2
- FacebookShareButton,
3
- FacebookMessengerShareButton,
4
- TwitterShareButton,
5
- LinkedinShareButton,
6
- PinterestShareButton,
7
- VKShareButton,
8
- OKShareButton,
9
- TelegramShareButton,
10
- WhatsappShareButton,
11
- RedditShareButton,
12
- TumblrShareButton,
13
- MailruShareButton,
14
- EmailShareButton,
15
- LivejournalShareButton,
16
- ViberShareButton,
17
- WorkplaceShareButton,
18
- LineShareButton,
19
- PocketShareButton,
20
- InstapaperShareButton,
21
- WeiboShareButton,
22
- HatenaShareButton,
23
- FacebookIcon,
24
- FacebookMessengerIcon,
25
- TwitterIcon,
26
- LinkedinIcon,
27
- PinterestIcon,
28
- VKIcon,
29
- OKIcon,
30
- TelegramIcon,
31
- WhatsappIcon,
32
- RedditIcon,
33
- TumblrIcon,
34
- MailruIcon,
35
- EmailIcon,
36
- LivejournalIcon,
37
- ViberIcon,
38
- WorkplaceIcon,
39
- LineIcon,
40
- PocketIcon,
41
- InstapaperIcon,
42
- WeiboIcon,
43
- HatenaIcon,
44
- } from 'react-share'
45
-
46
- const config: any = {
47
- facebook: { component: FacebookShareButton, icon: FacebookIcon },
48
- messenger: { component: FacebookMessengerShareButton, icon: FacebookMessengerIcon },
49
- twitter: { component: TwitterShareButton, icon: TwitterIcon },
50
- linkedin: { component: LinkedinShareButton, icon: LinkedinIcon },
51
- pinterest: { component: PinterestShareButton, icon: PinterestIcon },
52
- vk: { component: VKShareButton, icon: VKIcon },
53
- ok: { component: OKShareButton, icon: OKIcon },
54
- telegram: { component: TelegramShareButton, icon: TelegramIcon },
55
- whatsapp: { component: WhatsappShareButton, icon: WhatsappIcon },
56
- reddit: { component: RedditShareButton, icon: RedditIcon },
57
- tumblr: { component: TumblrShareButton, icon: TumblrIcon },
58
- mailru: { component: MailruShareButton, icon: MailruIcon },
59
- email: { component: EmailShareButton, icon: EmailIcon },
60
- livejournal: { component: LivejournalShareButton, icon: LivejournalIcon },
61
- viber: { component: ViberShareButton, icon: ViberIcon },
62
- workplace: { component: WorkplaceShareButton, icon: WorkplaceIcon },
63
- line: { component: LineShareButton, icon: LineIcon },
64
- pocket: { component: PocketShareButton, icon: PocketIcon },
65
- instapaper: { component: InstapaperShareButton, icon: InstapaperIcon },
66
- weibo: { component: WeiboShareButton, icon: WeiboIcon },
67
- hatena: { component: HatenaShareButton, icon: HatenaIcon },
68
- }
69
-
70
- export default function (key: string) {
71
- return config[key]
72
- }
1
+ import {
2
+ FacebookShareButton,
3
+ FacebookMessengerShareButton,
4
+ TwitterShareButton,
5
+ LinkedinShareButton,
6
+ PinterestShareButton,
7
+ VKShareButton,
8
+ OKShareButton,
9
+ TelegramShareButton,
10
+ WhatsappShareButton,
11
+ RedditShareButton,
12
+ TumblrShareButton,
13
+ MailruShareButton,
14
+ EmailShareButton,
15
+ LivejournalShareButton,
16
+ ViberShareButton,
17
+ WorkplaceShareButton,
18
+ LineShareButton,
19
+ PocketShareButton,
20
+ InstapaperShareButton,
21
+ WeiboShareButton,
22
+ HatenaShareButton,
23
+ FacebookIcon,
24
+ FacebookMessengerIcon,
25
+ TwitterIcon,
26
+ LinkedinIcon,
27
+ PinterestIcon,
28
+ VKIcon,
29
+ OKIcon,
30
+ TelegramIcon,
31
+ WhatsappIcon,
32
+ RedditIcon,
33
+ TumblrIcon,
34
+ MailruIcon,
35
+ EmailIcon,
36
+ LivejournalIcon,
37
+ ViberIcon,
38
+ WorkplaceIcon,
39
+ LineIcon,
40
+ PocketIcon,
41
+ InstapaperIcon,
42
+ WeiboIcon,
43
+ HatenaIcon,
44
+ } from 'react-share'
45
+
46
+ const config: any = {
47
+ facebook: { component: FacebookShareButton, icon: FacebookIcon },
48
+ messenger: { component: FacebookMessengerShareButton, icon: FacebookMessengerIcon },
49
+ twitter: { component: TwitterShareButton, icon: TwitterIcon },
50
+ linkedin: { component: LinkedinShareButton, icon: LinkedinIcon },
51
+ pinterest: { component: PinterestShareButton, icon: PinterestIcon },
52
+ vk: { component: VKShareButton, icon: VKIcon },
53
+ ok: { component: OKShareButton, icon: OKIcon },
54
+ telegram: { component: TelegramShareButton, icon: TelegramIcon },
55
+ whatsapp: { component: WhatsappShareButton, icon: WhatsappIcon },
56
+ reddit: { component: RedditShareButton, icon: RedditIcon },
57
+ tumblr: { component: TumblrShareButton, icon: TumblrIcon },
58
+ mailru: { component: MailruShareButton, icon: MailruIcon },
59
+ email: { component: EmailShareButton, icon: EmailIcon },
60
+ livejournal: { component: LivejournalShareButton, icon: LivejournalIcon },
61
+ viber: { component: ViberShareButton, icon: ViberIcon },
62
+ workplace: { component: WorkplaceShareButton, icon: WorkplaceIcon },
63
+ line: { component: LineShareButton, icon: LineIcon },
64
+ pocket: { component: PocketShareButton, icon: PocketIcon },
65
+ instapaper: { component: InstapaperShareButton, icon: InstapaperIcon },
66
+ weibo: { component: WeiboShareButton, icon: WeiboIcon },
67
+ hatena: { component: HatenaShareButton, icon: HatenaIcon },
68
+ }
69
+
70
+ export default function (key: string) {
71
+ return config[key]
72
+ }