tf-checkout-react 1.7.1 → 1.7.3
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/auth.d.ts +22 -0
- package/dist/api/index.d.ts +1 -1
- package/dist/components/billing-info-container/utils.d.ts +1 -0
- package/dist/components/common/PhoneNumberField.d.ts +1 -1
- package/dist/components/loginForm/index.d.ts +1 -0
- package/dist/components/loginModal/index.d.ts +1 -0
- package/dist/components/preRegistration/PreRegistrationComplete.d.ts +2 -0
- package/dist/tf-checkout-react.cjs.development.js +2166 -1864
- 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 +2166 -1864
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -1
- package/dist/utils/createCheckoutDataBodyWithDefaultHolder.d.ts +1 -0
- package/dist/validators/index.d.ts +4 -0
- package/package.json +2 -2
- package/src/api/auth.ts +49 -0
- package/src/api/index.ts +1 -1
- package/src/components/billing-info-container/index.tsx +228 -112
- package/src/components/billing-info-container/style.css +46 -2
- package/src/components/billing-info-container/utils.tsx +5 -1
- package/src/components/common/CustomField.tsx +1 -1
- package/src/components/common/PhoneNumberField.tsx +4 -2
- package/src/components/confirmationContainer/index.tsx +4 -0
- package/src/components/loginForm/index.tsx +19 -3
- package/src/components/loginModal/index.tsx +19 -3
- package/src/components/loginModal/style.css +6 -2
- package/src/components/preRegistration/PreRegistrationComplete.tsx +12 -2
- package/src/components/preRegistration/constants.tsx +6 -4
- package/src/components/preRegistration/index.tsx +144 -110
- package/src/components/preRegistration/style.css +3 -0
- package/src/components/preRegistration/utils.ts +9 -1
- package/src/components/ticketsContainer/index.tsx +79 -21
- package/src/components/timerWidget/style.css +2 -1
- package/src/types/api/common.d.ts +1 -0
- package/src/types/api/payment.d.ts +2 -0
- package/src/types/formFields.d.ts +1 -1
- package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +3 -1
- package/src/validators/index.ts +22 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.timer {
|
|
2
|
-
position:
|
|
2
|
+
position: fixed;
|
|
3
3
|
pointer-events: auto;
|
|
4
4
|
background-color: #000000;
|
|
5
5
|
overflow: hidden;
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
color: #fff;
|
|
19
19
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=);
|
|
20
20
|
right: 15px;
|
|
21
|
+
z-index: 9;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
.timer .close-icon {
|
|
@@ -24,6 +24,7 @@ interface IUserCredentialsValues {
|
|
|
24
24
|
emailLogged?: string;
|
|
25
25
|
firstNameLogged?: string;
|
|
26
26
|
lastNameLogged?: string;
|
|
27
|
+
phoneLogged?: string;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
export const createCheckoutDataBodyWithDefaultHolder = (
|
|
@@ -45,7 +46,8 @@ export const createCheckoutDataBodyWithDefaultHolder = (
|
|
|
45
46
|
_get(logedInValues, 'last_name') ||
|
|
46
47
|
_get(userCredentials, 'lastNameLogged') ||
|
|
47
48
|
''
|
|
48
|
-
const phone =
|
|
49
|
+
const phone =
|
|
50
|
+
_get(logedInValues, 'phone') || _get(userCredentials, 'phoneLogged') || ''
|
|
49
51
|
const email =
|
|
50
52
|
_get(logedInValues, 'email') || _get(userCredentials, 'emailLogged') || ''
|
|
51
53
|
|
package/src/validators/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const emailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
|
|
1
|
+
export const emailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
|
|
2
2
|
|
|
3
3
|
export const combineValidators = (...validators: any) => (...value: any) => {
|
|
4
4
|
for (let i = 0; i < validators.length; ++i) {
|
|
@@ -38,3 +38,24 @@ export const requiredValidator = (
|
|
|
38
38
|
|
|
39
39
|
export const emailValidator = (email: string) =>
|
|
40
40
|
!emailRegex.test(email) ? 'Please enter a valid email address' : ''
|
|
41
|
+
|
|
42
|
+
export const passwordValidator = (password: string): string => {
|
|
43
|
+
if (!password || password.length < 6) {
|
|
44
|
+
return 'The password must be at least 6 characters.'
|
|
45
|
+
}
|
|
46
|
+
return ''
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const confirmPasswordValidator = (confirmPassword: string, password: string): string => {
|
|
50
|
+
if (confirmPassword !== password) {
|
|
51
|
+
return 'Passwords do not match.'
|
|
52
|
+
}
|
|
53
|
+
return ''
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const confirmEmailValidator = (confirmEmail: string, email: string): string => {
|
|
57
|
+
if (confirmEmail !== email) {
|
|
58
|
+
return 'Emails do not match.'
|
|
59
|
+
}
|
|
60
|
+
return ''
|
|
61
|
+
}
|