tf-checkout-react 1.7.4 → 1.7.5
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/common/PhoneNumberField.d.ts +1 -2
- package/dist/components/preRegistration/PreRegistrationComplete.d.ts +1 -1
- package/dist/tf-checkout-react.cjs.development.js +58 -31
- 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 +58 -31
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/package.json +4 -3
- package/src/components/billing-info-container/index.tsx +1 -1
- package/src/components/common/CustomField.tsx +16 -5
- package/src/components/common/PhoneNumberField.tsx +7 -10
- package/src/components/confirmationContainer/index.tsx +9 -1
- package/src/components/loginModal/SignUpForm.tsx +1 -1
- package/src/components/loginModal/index.tsx +8 -1
- package/src/components/myTicketsContainer/index.tsx +2 -0
- package/src/components/preRegistration/PreRegistrationComplete.tsx +3 -1
- package/src/components/ticketsContainer/TimeSlotTicketRow.tsx +1 -1
- package/src/components/ticketsContainer/index.tsx +1 -1
|
@@ -9,6 +9,5 @@ export interface IPhoneNumberField {
|
|
|
9
9
|
fill: boolean;
|
|
10
10
|
setPhoneValidationIsLoading: (isLoading: boolean) => void;
|
|
11
11
|
defaultCountry?: string;
|
|
12
|
-
isCountryCodeEditable?: boolean;
|
|
13
12
|
}
|
|
14
|
-
export declare const PhoneNumberField: ({ label, field, form: { errors, touched, setFieldError, values, initialValues, setFieldValue, setFieldTouched, setErrors, submitCount, }, disableDropdown, defaultCountry, fill, setPhoneValidationIsLoading,
|
|
13
|
+
export declare const PhoneNumberField: ({ label, field, form: { errors, touched, setFieldError, values, initialValues, setFieldValue, setFieldTouched, setErrors, submitCount, }, disableDropdown, defaultCountry, fill, setPhoneValidationIsLoading, }: IPhoneNumberField) => JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import "./style.css";
|
|
1
2
|
import { ThemeOptions } from '@mui/material';
|
|
2
3
|
import { CSSProperties } from '@mui/styles';
|
|
3
4
|
import { AxiosError } from 'axios';
|
|
4
5
|
import { FC } from 'react';
|
|
5
|
-
import "./style.css";
|
|
6
6
|
export declare const PreRegistrationComplete: FC<IPreRegistrationCompleteProps & {
|
|
7
7
|
onGetConfirmationDataError?: (error: AxiosError) => void;
|
|
8
8
|
skipInitialValidation?: boolean;
|
|
@@ -38,15 +38,16 @@ var Visibility = _interopDefault(require('@mui/icons-material/Visibility'));
|
|
|
38
38
|
var VisibilityOff = _interopDefault(require('@mui/icons-material/VisibilityOff'));
|
|
39
39
|
var IconButton = _interopDefault(require('@mui/material/IconButton'));
|
|
40
40
|
var InputAdornment = _interopDefault(require('@mui/material/InputAdornment'));
|
|
41
|
+
var MenuItem = _interopDefault(require('@mui/material/MenuItem'));
|
|
41
42
|
var TextField = _interopDefault(require('@mui/material/TextField'));
|
|
42
43
|
var _includes = _interopDefault(require('lodash/includes'));
|
|
43
44
|
var _isFunction = _interopDefault(require('lodash/isFunction'));
|
|
44
45
|
var _isObject = _interopDefault(require('lodash/isObject'));
|
|
45
|
-
|
|
46
|
+
require('material-ui-phone-number');
|
|
46
47
|
var _debounce = _interopDefault(require('lodash/debounce'));
|
|
48
|
+
var muiTelInput = require('mui-tel-input');
|
|
47
49
|
var FormHelperText = _interopDefault(require('@mui/material/FormHelperText'));
|
|
48
50
|
var ListItemText = _interopDefault(require('@mui/material/ListItemText'));
|
|
49
|
-
var MenuItem = _interopDefault(require('@mui/material/MenuItem'));
|
|
50
51
|
var OutlinedInput = _interopDefault(require('@mui/material/OutlinedInput'));
|
|
51
52
|
var Select = _interopDefault(require('@mui/material/Select'));
|
|
52
53
|
var Modal$1 = _interopDefault(require('@mui/material/Modal'));
|
|
@@ -2842,7 +2843,7 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
2842
2843
|
};
|
|
2843
2844
|
|
|
2844
2845
|
var CustomField = function CustomField(_ref2) {
|
|
2845
|
-
var _ref$current, _customTheme$input;
|
|
2846
|
+
var _ref$current, _ref$current2, _customTheme$input;
|
|
2846
2847
|
var label = _ref2.label,
|
|
2847
2848
|
_ref2$type = _ref2.type,
|
|
2848
2849
|
type = _ref2$type === void 0 ? 'text' : _ref2$type,
|
|
@@ -2873,7 +2874,7 @@ var CustomField = function CustomField(_ref2) {
|
|
|
2873
2874
|
showPassword = _useState2[0],
|
|
2874
2875
|
setShowPassword = _useState2[1];
|
|
2875
2876
|
var _ref = React.useRef(null);
|
|
2876
|
-
var isAutoFilled = (_ref$current = _ref.current) == null ? void 0 : _ref$
|
|
2877
|
+
var isAutoFilled = (_ref$current = _ref.current) != null && _ref$current.matches ? (_ref$current2 = _ref.current) == null ? void 0 : _ref$current2.matches(':-webkit-autofill') : false;
|
|
2877
2878
|
var isSelectField = type === 'select';
|
|
2878
2879
|
var isPasswordField = type === 'password';
|
|
2879
2880
|
var error = _get(errors, field.name);
|
|
@@ -2923,10 +2924,18 @@ var CustomField = function CustomField(_ref2) {
|
|
|
2923
2924
|
setIsShrinked(true);
|
|
2924
2925
|
},
|
|
2925
2926
|
SelectProps: {
|
|
2926
|
-
"native":
|
|
2927
|
+
"native": false,
|
|
2927
2928
|
className: theme,
|
|
2928
2929
|
MenuProps: {
|
|
2929
|
-
className: theme
|
|
2930
|
+
className: theme,
|
|
2931
|
+
PaperProps: {
|
|
2932
|
+
sx: {
|
|
2933
|
+
'& .MuiMenuItem-root': {
|
|
2934
|
+
paddingLeft: '16px',
|
|
2935
|
+
paddingRight: '16px'
|
|
2936
|
+
}
|
|
2937
|
+
}
|
|
2938
|
+
}
|
|
2930
2939
|
}
|
|
2931
2940
|
},
|
|
2932
2941
|
InputLabelProps: {
|
|
@@ -2948,7 +2957,7 @@ var CustomField = function CustomField(_ref2) {
|
|
|
2948
2957
|
},
|
|
2949
2958
|
onChange: onChange != null ? onChange : field.onChange
|
|
2950
2959
|
}), isSelectField ? _map(selectOptions, function (option) {
|
|
2951
|
-
return React__default.createElement(
|
|
2960
|
+
return React__default.createElement(MenuItem, {
|
|
2952
2961
|
key: option.value,
|
|
2953
2962
|
value: option.value,
|
|
2954
2963
|
disabled: option.disabled
|
|
@@ -2975,8 +2984,7 @@ var PhoneNumberField = function PhoneNumberField(_ref) {
|
|
|
2975
2984
|
defaultCountry = _ref$defaultCountry === void 0 ? 'us' : _ref$defaultCountry,
|
|
2976
2985
|
_ref$fill = _ref.fill,
|
|
2977
2986
|
fill = _ref$fill === void 0 ? false : _ref$fill,
|
|
2978
|
-
setPhoneValidationIsLoading = _ref.setPhoneValidationIsLoading
|
|
2979
|
-
isCountryCodeEditable = _ref.isCountryCodeEditable;
|
|
2987
|
+
setPhoneValidationIsLoading = _ref.setPhoneValidationIsLoading;
|
|
2980
2988
|
var error = _get(errors, field.name);
|
|
2981
2989
|
var isTouched = Boolean(_get(touched, field.name));
|
|
2982
2990
|
var isSubmitAttempted = Boolean(submitCount && submitCount > 0);
|
|
@@ -3036,11 +3044,11 @@ var PhoneNumberField = function PhoneNumberField(_ref) {
|
|
|
3036
3044
|
})));
|
|
3037
3045
|
// eslint-disable-next-line
|
|
3038
3046
|
}, [field.value]);
|
|
3039
|
-
return React__default.createElement(React__default.Fragment, null, React__default.createElement(
|
|
3047
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(muiTelInput.MuiTelInput, {
|
|
3040
3048
|
name: field.name,
|
|
3041
3049
|
value: fill ? values[field.name] : initialValues[field.name],
|
|
3042
|
-
onChange: function onChange(value
|
|
3043
|
-
if (
|
|
3050
|
+
onChange: function onChange(value) {
|
|
3051
|
+
if (!value || value.length <= 4) {
|
|
3044
3052
|
setFieldValue(field.name, '');
|
|
3045
3053
|
setFieldError(field.name, '');
|
|
3046
3054
|
} else {
|
|
@@ -3049,15 +3057,14 @@ var PhoneNumberField = function PhoneNumberField(_ref) {
|
|
|
3049
3057
|
}
|
|
3050
3058
|
},
|
|
3051
3059
|
variant: "outlined",
|
|
3052
|
-
defaultCountry: defaultCountry,
|
|
3060
|
+
defaultCountry: defaultCountry.toUpperCase(),
|
|
3053
3061
|
disableDropdown: disableDropdown,
|
|
3054
3062
|
label: label,
|
|
3055
3063
|
error: !!error && (isTouched || fill || isSubmitAttempted),
|
|
3056
3064
|
helperText: (isTouched || fill || isSubmitAttempted) && error,
|
|
3057
3065
|
fullWidth: true,
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
countryCodeEditable: isCountryCodeEditable
|
|
3066
|
+
forceCallingCode: true,
|
|
3067
|
+
focusOnSelectCountry: true
|
|
3061
3068
|
}));
|
|
3062
3069
|
};
|
|
3063
3070
|
|
|
@@ -5068,7 +5075,10 @@ var SignUpForm = function SignUpForm(_ref) {
|
|
|
5068
5075
|
spacing: 2,
|
|
5069
5076
|
sx: {
|
|
5070
5077
|
padding: '15px 25px',
|
|
5071
|
-
maxHeight:
|
|
5078
|
+
maxHeight: {
|
|
5079
|
+
xs: '40vh',
|
|
5080
|
+
sm: '60vh'
|
|
5081
|
+
},
|
|
5072
5082
|
overflowY: 'auto'
|
|
5073
5083
|
}
|
|
5074
5084
|
}, React__default.createElement(material.Grid, {
|
|
@@ -5319,7 +5329,13 @@ var LoginModal = function LoginModal(_ref) {
|
|
|
5319
5329
|
"aria-describedby": "modal-modal-description",
|
|
5320
5330
|
className: "login-modal " + modalClassname
|
|
5321
5331
|
}, React__default.createElement(Box, {
|
|
5322
|
-
style: isMobile ? mobileStyle : style$2
|
|
5332
|
+
style: isMobile ? mobileStyle : style$2,
|
|
5333
|
+
sx: {
|
|
5334
|
+
'@media screen and (orientation:landscape)': {
|
|
5335
|
+
maxHeight: '80vh',
|
|
5336
|
+
overflowY: 'auto'
|
|
5337
|
+
}
|
|
5338
|
+
}
|
|
5323
5339
|
}, React__default.createElement("div", null, showSignUpButton && !useCustomSignup && React__default.createElement(Tabs, {
|
|
5324
5340
|
value: activeTab,
|
|
5325
5341
|
onChange: handleTabChange,
|
|
@@ -6812,7 +6828,7 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref6) {
|
|
|
6812
6828
|
enableTimer = _ref6$enableTimer === void 0 ? false : _ref6$enableTimer,
|
|
6813
6829
|
logo = _ref6.logo,
|
|
6814
6830
|
_ref6$showForgotPassw = _ref6.showForgotPasswordButton,
|
|
6815
|
-
showForgotPasswordButton = _ref6$showForgotPassw === void 0 ?
|
|
6831
|
+
showForgotPasswordButton = _ref6$showForgotPassw === void 0 ? true : _ref6$showForgotPassw,
|
|
6816
6832
|
_ref6$showSignUpButto = _ref6.showSignUpButton,
|
|
6817
6833
|
showSignUpButton = _ref6$showSignUpButto === void 0 ? false : _ref6$showSignUpButto,
|
|
6818
6834
|
_ref6$brandOptIn = _ref6.brandOptIn,
|
|
@@ -8342,12 +8358,12 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
|
|
|
8342
8358
|
var eventId = (data == null ? void 0 : data.product_id) || '';
|
|
8343
8359
|
React.useEffect(function () {
|
|
8344
8360
|
_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
8345
|
-
var _data$product_price, confirmationDataResponse, _data;
|
|
8361
|
+
var _data$product_price, confirmationDataResponse, _data, isLoggedIn;
|
|
8346
8362
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
8347
8363
|
while (1) switch (_context.prev = _context.next) {
|
|
8348
8364
|
case 0:
|
|
8349
8365
|
if (!hash) {
|
|
8350
|
-
_context.next =
|
|
8366
|
+
_context.next = 17;
|
|
8351
8367
|
break;
|
|
8352
8368
|
}
|
|
8353
8369
|
_context.prev = 1;
|
|
@@ -8380,17 +8396,24 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
|
|
|
8380
8396
|
}
|
|
8381
8397
|
setData(_data);
|
|
8382
8398
|
onGetConfirmationDataSuccess(confirmationDataResponse.data.attributes);
|
|
8383
|
-
|
|
8399
|
+
// Clear user_data for non-logged-in users after successful purchase
|
|
8400
|
+
if (isBrowser) {
|
|
8401
|
+
isLoggedIn = Boolean(getCookieByName('X-TF-ECOMMERCE'));
|
|
8402
|
+
if (!isLoggedIn) {
|
|
8403
|
+
window.localStorage.removeItem('user_data');
|
|
8404
|
+
}
|
|
8405
|
+
}
|
|
8406
|
+
_context.next = 17;
|
|
8384
8407
|
break;
|
|
8385
|
-
case
|
|
8386
|
-
_context.prev =
|
|
8408
|
+
case 14:
|
|
8409
|
+
_context.prev = 14;
|
|
8387
8410
|
_context.t0 = _context["catch"](1);
|
|
8388
8411
|
if (axios.isAxiosError(_context.t0)) onGetConfirmationDataError(_context.t0);
|
|
8389
|
-
case
|
|
8412
|
+
case 17:
|
|
8390
8413
|
case "end":
|
|
8391
8414
|
return _context.stop();
|
|
8392
8415
|
}
|
|
8393
|
-
}, _callee, null, [[1,
|
|
8416
|
+
}, _callee, null, [[1, 14]]);
|
|
8394
8417
|
}))();
|
|
8395
8418
|
}, [hash]);
|
|
8396
8419
|
var _useState2 = React.useState(false),
|
|
@@ -9469,7 +9492,8 @@ var PreRegistrationComplete = function PreRegistrationComplete(_ref) {
|
|
|
9469
9492
|
onLogin: function onLogin(res) {
|
|
9470
9493
|
setShowModalLogin(false);
|
|
9471
9494
|
onLoginSuccess(res);
|
|
9472
|
-
}
|
|
9495
|
+
},
|
|
9496
|
+
showForgotPasswordButton: true
|
|
9473
9497
|
}), !_isEmpty(error) && React__default.createElement(ConfirmModal, {
|
|
9474
9498
|
hideCancelBtn: true,
|
|
9475
9499
|
message: error.message,
|
|
@@ -10530,7 +10554,7 @@ var TimeSlotTicketRow = function TimeSlotTicketRow(_ref) {
|
|
|
10530
10554
|
return React__default.createElement(MenuItem, {
|
|
10531
10555
|
key: index,
|
|
10532
10556
|
value: slot.timeKey
|
|
10533
|
-
}, moment(slot.
|
|
10557
|
+
}, moment(slot.ticketInstance.slotStartDate).format('hh:mm A'));
|
|
10534
10558
|
}))), React__default.createElement(FormControl, null, React__default.createElement(Select, {
|
|
10535
10559
|
sx: {
|
|
10536
10560
|
borderRadius: 0,
|
|
@@ -11608,7 +11632,8 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
11608
11632
|
onClick: handleLogout
|
|
11609
11633
|
}, "Log out"))) : ''), showLoginModal ? React__default.createElement(LoginModal, {
|
|
11610
11634
|
onClose: handleOnClose,
|
|
11611
|
-
onLogin: handleOnLogin
|
|
11635
|
+
onLogin: handleOnLogin,
|
|
11636
|
+
showForgotPasswordButton: true
|
|
11612
11637
|
}) : null), showPoweredByImage ? React__default.createElement(PoweredBy, null) : null, enableInfluencersSection && !hideTopInfluencers && influencers.length ? React__default.createElement("div", {
|
|
11613
11638
|
className: "event-influencers"
|
|
11614
11639
|
}, React__default.createElement("h3", null, React__default.createElement("span", null, "TOP"), " INFLUENCERS"), React__default.createElement("ol", {
|
|
@@ -11876,7 +11901,8 @@ var MyTicketsContainer = function MyTicketsContainer(_ref) {
|
|
|
11876
11901
|
setIsLogged(true);
|
|
11877
11902
|
},
|
|
11878
11903
|
userExpired: userExpired,
|
|
11879
|
-
logo: logo
|
|
11904
|
+
logo: logo,
|
|
11905
|
+
showForgotPasswordButton: true
|
|
11880
11906
|
}) : null), data != null && (_data$orders = data.orders) != null && _data$orders.length ? React__default.createElement(React__default.Fragment, null, React__default.createElement("h2", null, "My Ticket Orders"), React__default.createElement(Autocomplete, {
|
|
11881
11907
|
disablePortal: true,
|
|
11882
11908
|
id: "combo-box-demo",
|
|
@@ -11929,7 +11955,8 @@ var MyTicketsContainer = function MyTicketsContainer(_ref) {
|
|
|
11929
11955
|
setUserExpired(false);
|
|
11930
11956
|
setIsLogged(true);
|
|
11931
11957
|
},
|
|
11932
|
-
userExpired: userExpired
|
|
11958
|
+
userExpired: userExpired,
|
|
11959
|
+
showForgotPasswordButton: true
|
|
11933
11960
|
})));
|
|
11934
11961
|
};
|
|
11935
11962
|
|