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,202 +1,202 @@
|
|
|
1
|
-
.confirmation-page {
|
|
2
|
-
max-width: 1024px;
|
|
3
|
-
margin: 0 auto;
|
|
4
|
-
}
|
|
5
|
-
.confirmation-page button {
|
|
6
|
-
margin-top: inherit;
|
|
7
|
-
}
|
|
8
|
-
.confirmation-page .strong-text {
|
|
9
|
-
font-weight: 700;
|
|
10
|
-
}
|
|
11
|
-
.confirmation-page .title {
|
|
12
|
-
font-size: 24px;
|
|
13
|
-
font-weight: 600;
|
|
14
|
-
color: #333;
|
|
15
|
-
}
|
|
16
|
-
.confirmation-page .share-message-section {
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
padding: 15px;
|
|
20
|
-
background: #dff0d8;
|
|
21
|
-
color: #2c7221;
|
|
22
|
-
border-radius: 5px;
|
|
23
|
-
border: 1px solid #d6e9c6;
|
|
24
|
-
margin: 20px 0;
|
|
25
|
-
}
|
|
26
|
-
.confirmation-page .main {
|
|
27
|
-
font-weight: 700;
|
|
28
|
-
font-size: 15px;
|
|
29
|
-
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
|
|
30
|
-
Ubuntu, Cantarell, Open Sans, Helvetica Neue, Icons16, sans-serif;
|
|
31
|
-
}
|
|
32
|
-
.confirmation-page .helper {
|
|
33
|
-
font-size: 14px;
|
|
34
|
-
margin-top: 5px;
|
|
35
|
-
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
|
|
36
|
-
Ubuntu, Cantarell, Open Sans, Helvetica Neue, Icons16, sans-serif;
|
|
37
|
-
}
|
|
38
|
-
.confirmation-page .referral_text_image_section {
|
|
39
|
-
display: flex;
|
|
40
|
-
align-items: center;
|
|
41
|
-
justify-content: space-between;
|
|
42
|
-
flex-wrap: wrap;
|
|
43
|
-
margin: 20px 0;
|
|
44
|
-
}
|
|
45
|
-
.confirmation-page .referral_text_section {
|
|
46
|
-
margin: 10px;
|
|
47
|
-
}
|
|
48
|
-
.confirmation-page .referral_title_text {
|
|
49
|
-
color: #f08057;
|
|
50
|
-
font-size: 28px;
|
|
51
|
-
padding-bottom: 10px;
|
|
52
|
-
}
|
|
53
|
-
.confirmation-page .referral_text {
|
|
54
|
-
font-size: 18px;
|
|
55
|
-
}
|
|
56
|
-
.confirmation-page .referral_text_image_section img {
|
|
57
|
-
max-width: 200px;
|
|
58
|
-
margin: 10px;
|
|
59
|
-
}
|
|
60
|
-
.confirmation-page .share_wrapper {
|
|
61
|
-
display: grid;
|
|
62
|
-
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
|
63
|
-
column-gap: 5rem;
|
|
64
|
-
margin: 10px;
|
|
65
|
-
}
|
|
66
|
-
.confirmation-page .invitation_title {
|
|
67
|
-
font-size: 22px;
|
|
68
|
-
padding-bottom: 12px;
|
|
69
|
-
padding-top: 12px;
|
|
70
|
-
}
|
|
71
|
-
.confirmation-page .share_section {
|
|
72
|
-
display: flex;
|
|
73
|
-
justify-content: space-between;
|
|
74
|
-
flex-wrap: wrap;
|
|
75
|
-
margin: 0 -10px;
|
|
76
|
-
}
|
|
77
|
-
.confirmation-page .invitation_section {
|
|
78
|
-
flex: 1 1;
|
|
79
|
-
padding: 0 5px;
|
|
80
|
-
}
|
|
81
|
-
.confirmation-page .share_buttons {
|
|
82
|
-
display: grid;
|
|
83
|
-
flex-wrap: wrap;
|
|
84
|
-
margin: 0 -7px;
|
|
85
|
-
}
|
|
86
|
-
.confirmation-page .convenient_buttons {
|
|
87
|
-
margin-top: 10px;
|
|
88
|
-
}
|
|
89
|
-
.confirmation-page .social-media-btns {
|
|
90
|
-
display: grid;
|
|
91
|
-
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
|
92
|
-
grid-gap: 5px
|
|
93
|
-
}
|
|
94
|
-
.confirmation-page .sharing-btn {
|
|
95
|
-
min-width: 130px;
|
|
96
|
-
flex: 1 1;
|
|
97
|
-
background-color: #000000;
|
|
98
|
-
}
|
|
99
|
-
.confirmation-page .sharing-btn a {
|
|
100
|
-
text-decoration: none;
|
|
101
|
-
}
|
|
102
|
-
.confirmation-page .share-by-link {
|
|
103
|
-
background: #000;
|
|
104
|
-
color: #fff;
|
|
105
|
-
padding: 10px;
|
|
106
|
-
}
|
|
107
|
-
.confirmation-page .share-by-link.label {
|
|
108
|
-
text-align: left;
|
|
109
|
-
padding: 0;
|
|
110
|
-
margin: 0;
|
|
111
|
-
}
|
|
112
|
-
.confirmation-page .share-btn-inner {
|
|
113
|
-
background-color: #000;
|
|
114
|
-
color: #fff;
|
|
115
|
-
padding: 10px;
|
|
116
|
-
display: inline-flex;
|
|
117
|
-
align-items: center;
|
|
118
|
-
width: 100%;
|
|
119
|
-
box-sizing: border-box;
|
|
120
|
-
cursor: pointer;
|
|
121
|
-
padding: 0;
|
|
122
|
-
text-align: left;
|
|
123
|
-
}
|
|
124
|
-
.confirmation-page .share-input {
|
|
125
|
-
width: 300px;
|
|
126
|
-
text-align: left;
|
|
127
|
-
background-color: #fff;
|
|
128
|
-
outline: none;
|
|
129
|
-
border: none;
|
|
130
|
-
padding: 5px;
|
|
131
|
-
}
|
|
132
|
-
.confirmation-page .share-text {
|
|
133
|
-
width: 100%;
|
|
134
|
-
padding-top: 8px;
|
|
135
|
-
display: block;
|
|
136
|
-
font-size: 13px;
|
|
137
|
-
font-weight: 600;
|
|
138
|
-
}
|
|
139
|
-
.confirmation-page .pricing-section_wrapper {
|
|
140
|
-
display: grid;
|
|
141
|
-
grid-template-columns: 1fr 1fr;
|
|
142
|
-
padding: 15px;
|
|
143
|
-
background: #e3e3e3;
|
|
144
|
-
border: 1px solid #dcdcdc;
|
|
145
|
-
margin: 10px 0;
|
|
146
|
-
}
|
|
147
|
-
.confirmation-page .pricing-section_label {
|
|
148
|
-
font-weight: 600;
|
|
149
|
-
}
|
|
150
|
-
.confirmation-page .pricing-section_sublabel {
|
|
151
|
-
font-weight: 100;
|
|
152
|
-
font-size: 14px;
|
|
153
|
-
}
|
|
154
|
-
.confirmation-page .pricing-section_price {
|
|
155
|
-
text-align: right;
|
|
156
|
-
font-weight: 600;
|
|
157
|
-
}
|
|
158
|
-
.confirmation-page .share-by-link-copy-icon {
|
|
159
|
-
cursor: pointer;
|
|
160
|
-
color: #fff;
|
|
161
|
-
background-color: #32325d;
|
|
162
|
-
transition: all 150ms ease;
|
|
163
|
-
padding: 10px;
|
|
164
|
-
border-radius: 4px;
|
|
165
|
-
margin-left: 8px;
|
|
166
|
-
display: flex;
|
|
167
|
-
justify-content: center;
|
|
168
|
-
align-items: center;
|
|
169
|
-
}
|
|
170
|
-
.confirmation-page .share-by-link-copy-icon:hover {
|
|
171
|
-
background-color: #505050;
|
|
172
|
-
}
|
|
173
|
-
.confirmation-page .share-by-link-copy-icon img {
|
|
174
|
-
width: 14px;
|
|
175
|
-
}
|
|
176
|
-
.confirmation-page .social-media-sharing {
|
|
177
|
-
background-color: #000;
|
|
178
|
-
color: #fff;
|
|
179
|
-
padding: 10px;
|
|
180
|
-
text-align: center;
|
|
181
|
-
cursor: pointer;
|
|
182
|
-
}
|
|
183
|
-
.confirmation-page .share-icon {
|
|
184
|
-
display: inline-flex;
|
|
185
|
-
border-radius: 4px;
|
|
186
|
-
}
|
|
187
|
-
@media only screen and (max-width: 1050px) {
|
|
188
|
-
.confirmation-page .share_wrapper {
|
|
189
|
-
display: grid;
|
|
190
|
-
grid-template-columns: unset;
|
|
191
|
-
column-gap: 0;
|
|
192
|
-
margin: 15px;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
@media only screen and (max-width: 480px) {
|
|
196
|
-
.confirmation-page .social-media-btns {
|
|
197
|
-
grid-template-columns: unset;
|
|
198
|
-
}
|
|
199
|
-
.confirmation-page .share-input {
|
|
200
|
-
width: 250px;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
1
|
+
.confirmation-page {
|
|
2
|
+
max-width: 1024px;
|
|
3
|
+
margin: 0 auto;
|
|
4
|
+
}
|
|
5
|
+
.confirmation-page button {
|
|
6
|
+
margin-top: inherit;
|
|
7
|
+
}
|
|
8
|
+
.confirmation-page .strong-text {
|
|
9
|
+
font-weight: 700;
|
|
10
|
+
}
|
|
11
|
+
.confirmation-page .title {
|
|
12
|
+
font-size: 24px;
|
|
13
|
+
font-weight: 600;
|
|
14
|
+
color: #333;
|
|
15
|
+
}
|
|
16
|
+
.confirmation-page .share-message-section {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
padding: 15px;
|
|
20
|
+
background: #dff0d8;
|
|
21
|
+
color: #2c7221;
|
|
22
|
+
border-radius: 5px;
|
|
23
|
+
border: 1px solid #d6e9c6;
|
|
24
|
+
margin: 20px 0;
|
|
25
|
+
}
|
|
26
|
+
.confirmation-page .main {
|
|
27
|
+
font-weight: 700;
|
|
28
|
+
font-size: 15px;
|
|
29
|
+
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
|
|
30
|
+
Ubuntu, Cantarell, Open Sans, Helvetica Neue, Icons16, sans-serif;
|
|
31
|
+
}
|
|
32
|
+
.confirmation-page .helper {
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
margin-top: 5px;
|
|
35
|
+
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
|
|
36
|
+
Ubuntu, Cantarell, Open Sans, Helvetica Neue, Icons16, sans-serif;
|
|
37
|
+
}
|
|
38
|
+
.confirmation-page .referral_text_image_section {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: space-between;
|
|
42
|
+
flex-wrap: wrap;
|
|
43
|
+
margin: 20px 0;
|
|
44
|
+
}
|
|
45
|
+
.confirmation-page .referral_text_section {
|
|
46
|
+
margin: 10px;
|
|
47
|
+
}
|
|
48
|
+
.confirmation-page .referral_title_text {
|
|
49
|
+
color: #f08057;
|
|
50
|
+
font-size: 28px;
|
|
51
|
+
padding-bottom: 10px;
|
|
52
|
+
}
|
|
53
|
+
.confirmation-page .referral_text {
|
|
54
|
+
font-size: 18px;
|
|
55
|
+
}
|
|
56
|
+
.confirmation-page .referral_text_image_section img {
|
|
57
|
+
max-width: 200px;
|
|
58
|
+
margin: 10px;
|
|
59
|
+
}
|
|
60
|
+
.confirmation-page .share_wrapper {
|
|
61
|
+
display: grid;
|
|
62
|
+
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
|
63
|
+
column-gap: 5rem;
|
|
64
|
+
margin: 10px;
|
|
65
|
+
}
|
|
66
|
+
.confirmation-page .invitation_title {
|
|
67
|
+
font-size: 22px;
|
|
68
|
+
padding-bottom: 12px;
|
|
69
|
+
padding-top: 12px;
|
|
70
|
+
}
|
|
71
|
+
.confirmation-page .share_section {
|
|
72
|
+
display: flex;
|
|
73
|
+
justify-content: space-between;
|
|
74
|
+
flex-wrap: wrap;
|
|
75
|
+
margin: 0 -10px;
|
|
76
|
+
}
|
|
77
|
+
.confirmation-page .invitation_section {
|
|
78
|
+
flex: 1 1;
|
|
79
|
+
padding: 0 5px;
|
|
80
|
+
}
|
|
81
|
+
.confirmation-page .share_buttons {
|
|
82
|
+
display: grid;
|
|
83
|
+
flex-wrap: wrap;
|
|
84
|
+
margin: 0 -7px;
|
|
85
|
+
}
|
|
86
|
+
.confirmation-page .convenient_buttons {
|
|
87
|
+
margin-top: 10px;
|
|
88
|
+
}
|
|
89
|
+
.confirmation-page .social-media-btns {
|
|
90
|
+
display: grid;
|
|
91
|
+
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
|
92
|
+
grid-gap: 5px
|
|
93
|
+
}
|
|
94
|
+
.confirmation-page .sharing-btn {
|
|
95
|
+
min-width: 130px;
|
|
96
|
+
flex: 1 1;
|
|
97
|
+
background-color: #000000;
|
|
98
|
+
}
|
|
99
|
+
.confirmation-page .sharing-btn a {
|
|
100
|
+
text-decoration: none;
|
|
101
|
+
}
|
|
102
|
+
.confirmation-page .share-by-link {
|
|
103
|
+
background: #000;
|
|
104
|
+
color: #fff;
|
|
105
|
+
padding: 10px;
|
|
106
|
+
}
|
|
107
|
+
.confirmation-page .share-by-link.label {
|
|
108
|
+
text-align: left;
|
|
109
|
+
padding: 0;
|
|
110
|
+
margin: 0;
|
|
111
|
+
}
|
|
112
|
+
.confirmation-page .share-btn-inner {
|
|
113
|
+
background-color: #000;
|
|
114
|
+
color: #fff;
|
|
115
|
+
padding: 10px;
|
|
116
|
+
display: inline-flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
width: 100%;
|
|
119
|
+
box-sizing: border-box;
|
|
120
|
+
cursor: pointer;
|
|
121
|
+
padding: 0;
|
|
122
|
+
text-align: left;
|
|
123
|
+
}
|
|
124
|
+
.confirmation-page .share-input {
|
|
125
|
+
width: 300px;
|
|
126
|
+
text-align: left;
|
|
127
|
+
background-color: #fff;
|
|
128
|
+
outline: none;
|
|
129
|
+
border: none;
|
|
130
|
+
padding: 5px;
|
|
131
|
+
}
|
|
132
|
+
.confirmation-page .share-text {
|
|
133
|
+
width: 100%;
|
|
134
|
+
padding-top: 8px;
|
|
135
|
+
display: block;
|
|
136
|
+
font-size: 13px;
|
|
137
|
+
font-weight: 600;
|
|
138
|
+
}
|
|
139
|
+
.confirmation-page .pricing-section_wrapper {
|
|
140
|
+
display: grid;
|
|
141
|
+
grid-template-columns: 1fr 1fr;
|
|
142
|
+
padding: 15px;
|
|
143
|
+
background: #e3e3e3;
|
|
144
|
+
border: 1px solid #dcdcdc;
|
|
145
|
+
margin: 10px 0;
|
|
146
|
+
}
|
|
147
|
+
.confirmation-page .pricing-section_label {
|
|
148
|
+
font-weight: 600;
|
|
149
|
+
}
|
|
150
|
+
.confirmation-page .pricing-section_sublabel {
|
|
151
|
+
font-weight: 100;
|
|
152
|
+
font-size: 14px;
|
|
153
|
+
}
|
|
154
|
+
.confirmation-page .pricing-section_price {
|
|
155
|
+
text-align: right;
|
|
156
|
+
font-weight: 600;
|
|
157
|
+
}
|
|
158
|
+
.confirmation-page .share-by-link-copy-icon {
|
|
159
|
+
cursor: pointer;
|
|
160
|
+
color: #fff;
|
|
161
|
+
background-color: #32325d;
|
|
162
|
+
transition: all 150ms ease;
|
|
163
|
+
padding: 10px;
|
|
164
|
+
border-radius: 4px;
|
|
165
|
+
margin-left: 8px;
|
|
166
|
+
display: flex;
|
|
167
|
+
justify-content: center;
|
|
168
|
+
align-items: center;
|
|
169
|
+
}
|
|
170
|
+
.confirmation-page .share-by-link-copy-icon:hover {
|
|
171
|
+
background-color: #505050;
|
|
172
|
+
}
|
|
173
|
+
.confirmation-page .share-by-link-copy-icon img {
|
|
174
|
+
width: 14px;
|
|
175
|
+
}
|
|
176
|
+
.confirmation-page .social-media-sharing {
|
|
177
|
+
background-color: #000;
|
|
178
|
+
color: #fff;
|
|
179
|
+
padding: 10px;
|
|
180
|
+
text-align: center;
|
|
181
|
+
cursor: pointer;
|
|
182
|
+
}
|
|
183
|
+
.confirmation-page .share-icon {
|
|
184
|
+
display: inline-flex;
|
|
185
|
+
border-radius: 4px;
|
|
186
|
+
}
|
|
187
|
+
@media only screen and (max-width: 1050px) {
|
|
188
|
+
.confirmation-page .share_wrapper {
|
|
189
|
+
display: grid;
|
|
190
|
+
grid-template-columns: unset;
|
|
191
|
+
column-gap: 0;
|
|
192
|
+
margin: 15px;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
@media only screen and (max-width: 480px) {
|
|
196
|
+
.confirmation-page .social-media-btns {
|
|
197
|
+
grid-template-columns: unset;
|
|
198
|
+
}
|
|
199
|
+
.confirmation-page .share-input {
|
|
200
|
+
width: 250px;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
@@ -1,89 +1,98 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react'
|
|
2
|
-
import moment from 'moment-timezone'
|
|
3
|
-
import './style.css'
|
|
4
|
-
|
|
5
|
-
interface CountdownTypes {
|
|
6
|
-
startDate: string;
|
|
7
|
-
timezone?: string;
|
|
8
|
-
title?: string;
|
|
9
|
-
message?: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
|
|
1
|
+
import React, { useEffect, useState } from 'react'
|
|
2
|
+
import moment from 'moment-timezone'
|
|
3
|
+
import './style.css'
|
|
4
|
+
|
|
5
|
+
interface CountdownTypes {
|
|
6
|
+
startDate: string;
|
|
7
|
+
timezone?: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
message?: string;
|
|
10
|
+
disableLeadingZero?: boolean;
|
|
11
|
+
callback?: () => void;
|
|
12
|
+
isLoggedIn?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const isTimeExpired = (startDate: string, timezone: string) => {
|
|
16
|
+
return !moment(startDate).isAfter(moment.tz(moment(), timezone).format('YYYY-MM-DD HH:mm:ss'))
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function Countdown({
|
|
20
|
+
startDate,
|
|
21
|
+
timezone = moment.tz.guess(),
|
|
22
|
+
title = '',
|
|
23
|
+
message = '',
|
|
24
|
+
disableLeadingZero = false,
|
|
25
|
+
callback = () => {},
|
|
26
|
+
isLoggedIn
|
|
27
|
+
}: CountdownTypes) {
|
|
28
|
+
const [duration, setDuration] = useState('')
|
|
29
|
+
const [timeExpired, setTimeExpired] = useState(false)
|
|
30
|
+
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
setTimeExpired(isTimeExpired(startDate, timezone))
|
|
33
|
+
}, [])
|
|
34
|
+
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
let timer: any;
|
|
37
|
+
|
|
38
|
+
if(!timeExpired) {
|
|
39
|
+
timer = setInterval(() => {
|
|
40
|
+
if(isTimeExpired(startDate, timezone)) {
|
|
41
|
+
clearInterval(timer)
|
|
42
|
+
setTimeExpired(true)
|
|
43
|
+
callback()
|
|
44
|
+
return
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const currentDate = moment.tz(moment(), timezone).format('YYYY-MM-DD HH:mm:ss')
|
|
48
|
+
const diffTime = moment(startDate).diff(currentDate)
|
|
49
|
+
const duration = moment.duration(diffTime)
|
|
50
|
+
const dateArr: any = {
|
|
51
|
+
year: duration.years(),
|
|
52
|
+
month: duration.months(),
|
|
53
|
+
day: duration.days(),
|
|
54
|
+
hour: duration.hours(),
|
|
55
|
+
minute: duration.minutes(),
|
|
56
|
+
second: duration.seconds(),
|
|
57
|
+
}
|
|
58
|
+
let timeLeft = ''
|
|
59
|
+
|
|
60
|
+
for(let date in dateArr) {
|
|
61
|
+
const unit = dateArr[date] === 1 ? date : date + 's'
|
|
62
|
+
let val = dateArr[date]
|
|
63
|
+
|
|
64
|
+
if (!disableLeadingZero && String(dateArr[date]).length === 1) {
|
|
65
|
+
val = '0' + dateArr[date]
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if(timeLeft) {
|
|
69
|
+
timeLeft += `, ${val} ${unit}`
|
|
70
|
+
} else if(dateArr[date]) {
|
|
71
|
+
timeLeft += `${val} ${unit}`
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
setDuration(timeLeft)
|
|
76
|
+
}, 1000)
|
|
77
|
+
}
|
|
78
|
+
return () => {
|
|
79
|
+
clearInterval(timer)
|
|
80
|
+
}
|
|
81
|
+
}, [timeExpired])
|
|
82
|
+
|
|
83
|
+
return (
|
|
84
|
+
<>
|
|
85
|
+
{!timeExpired && duration && (
|
|
86
|
+
<div className={`countdown ${!isLoggedIn ? 'countdown-on-bottom' : ''}`}>
|
|
87
|
+
<div>
|
|
88
|
+
<p className='title'>{title}</p>
|
|
89
|
+
<p>{duration}</p>
|
|
90
|
+
</div>
|
|
91
|
+
<p className='message'>{message}</p>
|
|
92
|
+
</div>
|
|
93
|
+
)}
|
|
94
|
+
</>
|
|
95
|
+
)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export default Countdown
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
.countdown p {
|
|
2
|
-
margin: 0;
|
|
3
|
-
}
|
|
4
|
-
.countdown .title {
|
|
5
|
-
font-weight: bold;
|
|
6
|
-
}
|
|
7
|
-
.countdown .message {
|
|
8
|
-
margin-top: 20px;
|
|
9
|
-
font-weight: bold;
|
|
1
|
+
.countdown p {
|
|
2
|
+
margin: 0;
|
|
3
|
+
}
|
|
4
|
+
.countdown .title {
|
|
5
|
+
font-weight: bold;
|
|
6
|
+
}
|
|
7
|
+
.countdown .message {
|
|
8
|
+
margin-top: 20px;
|
|
9
|
+
font-weight: bold;
|
|
10
10
|
}
|
package/src/components/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { BillingInfoContainer } from './billing-info-container'
|
|
2
|
-
export { ConfirmationContainer } from './confirmationContainer'
|
|
3
|
-
export { PaymentContainer } from './paymentContainer'
|
|
4
|
-
export { TicketsContainer } from './ticketsContainer'
|
|
5
|
-
export { MyTicketsContainer } from './myTicketsContainer'
|
|
6
|
-
export { OrderDetailsContainer } from './orderDetailsContainer'
|
|
7
|
-
export { TicketResaleContainer } from './ticketResale'
|
|
1
|
+
export { BillingInfoContainer } from './billing-info-container'
|
|
2
|
+
export { ConfirmationContainer } from './confirmationContainer'
|
|
3
|
+
export { PaymentContainer } from './paymentContainer'
|
|
4
|
+
export { TicketsContainer } from './ticketsContainer'
|
|
5
|
+
export { MyTicketsContainer } from './myTicketsContainer'
|
|
6
|
+
export { OrderDetailsContainer } from './orderDetailsContainer'
|
|
7
|
+
export { TicketResaleContainer } from './ticketResale'
|