tf-checkout-react 1.4.17 → 1.4.18
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 +34 -1
- package/dist/tf-checkout-react.cjs.development.js +187 -98
- 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 +187 -98
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/api/index.ts +37 -1
- package/src/components/billing-info-container/index.tsx +120 -21
- package/src/components/ticketsContainer/index.tsx +1 -0
|
@@ -2852,7 +2852,9 @@ var LogicRunner = function LogicRunner(_ref) {
|
|
|
2852
2852
|
'holderLastName-0': (parsedData == null ? void 0 : parsedData.last_name) || (parsedData == null ? void 0 : parsedData.lastName) || '',
|
|
2853
2853
|
'holderEmail-0': (parsedData == null ? void 0 : parsedData.email) || ''
|
|
2854
2854
|
};
|
|
2855
|
-
|
|
2855
|
+
var extraDataJSON = window.localStorage.getItem('extraData');
|
|
2856
|
+
var extraData = extraDataJSON ? JSON.parse(extraDataJSON) : null;
|
|
2857
|
+
setValues(_extends({}, values, mappedValues, extraData != null ? extraData : {}));
|
|
2856
2858
|
setUserValues(mappedValues);
|
|
2857
2859
|
} catch (e) {}
|
|
2858
2860
|
}
|
|
@@ -2946,49 +2948,75 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
2946
2948
|
isCountryCodeEditable = _ref4$isCountryCodeEd === void 0 ? true : _ref4$isCountryCodeEd,
|
|
2947
2949
|
_ref4$onPendingVerifi = _ref4.onPendingVerification,
|
|
2948
2950
|
onPendingVerification = _ref4$onPendingVerifi === void 0 ? _identity : _ref4$onPendingVerifi;
|
|
2949
|
-
var _useState = useState(
|
|
2950
|
-
|
|
2951
|
-
|
|
2951
|
+
var _useState = useState(null),
|
|
2952
|
+
extraData = _useState[0],
|
|
2953
|
+
setExtraData = _useState[1];
|
|
2954
|
+
var _useState2 = useState(true),
|
|
2955
|
+
isConfigLoading = _useState2[0],
|
|
2956
|
+
setIsConfigLoading = _useState2[1];
|
|
2957
|
+
var _useState3 = useState(null),
|
|
2958
|
+
configs = _useState3[0],
|
|
2959
|
+
setConfigs = _useState3[1];
|
|
2960
|
+
var _useState4 = useState(false),
|
|
2961
|
+
isNewUser = _useState4[0],
|
|
2962
|
+
setIsNewUser = _useState4[1];
|
|
2952
2963
|
var themeMui = createTheme(themeOptions);
|
|
2953
2964
|
var isWindowDefined = typeof window !== 'undefined';
|
|
2965
|
+
useEffect(function () {
|
|
2966
|
+
if (isWindowDefined) {
|
|
2967
|
+
var _extraData = window.localStorage.getItem('extraData');
|
|
2968
|
+
if (_extraData) {
|
|
2969
|
+
setExtraData(JSON.parse(_extraData));
|
|
2970
|
+
}
|
|
2971
|
+
}
|
|
2972
|
+
getCheckoutPageConfigs().then(function (data) {
|
|
2973
|
+
var _data$data;
|
|
2974
|
+
if (data != null && (_data$data = data.data) != null && _data$data.attributes) {
|
|
2975
|
+
setConfigs(data.data.attributes);
|
|
2976
|
+
setIsConfigLoading(false);
|
|
2977
|
+
}
|
|
2978
|
+
})["catch"](function () {
|
|
2979
|
+
setIsConfigLoading(false);
|
|
2980
|
+
});
|
|
2981
|
+
}, [isWindowDefined]);
|
|
2954
2982
|
var defaultCountry = isWindowDefined ? window.localStorage.getItem('eventCountry') : '';
|
|
2955
2983
|
var userData = isWindowDefined && window.localStorage.getItem('user_data') ? JSON.parse(window.localStorage.getItem('user_data') || '') : {};
|
|
2956
2984
|
var access_token = isWindowDefined && window.localStorage.getItem('access_token') ? window.localStorage.getItem('access_token') || '' : '';
|
|
2957
|
-
var
|
|
2958
|
-
dataWithUniqueIds =
|
|
2959
|
-
setDataWithUniqueIds =
|
|
2985
|
+
var _useState5 = useState(assingUniqueIds(data)),
|
|
2986
|
+
dataWithUniqueIds = _useState5[0],
|
|
2987
|
+
setDataWithUniqueIds = _useState5[1];
|
|
2960
2988
|
var xtfCookie = getCookieByName('X-TF-ECOMMERCE');
|
|
2961
|
-
var
|
|
2962
|
-
isLoggedIn =
|
|
2963
|
-
setIsLoggedIn =
|
|
2964
|
-
var
|
|
2965
|
-
cartInfoData =
|
|
2966
|
-
setCartInfo =
|
|
2967
|
-
var
|
|
2968
|
-
countries =
|
|
2969
|
-
setCountries =
|
|
2970
|
-
var
|
|
2971
|
-
states =
|
|
2972
|
-
setStates =
|
|
2973
|
-
var _useState7 = useState(false),
|
|
2974
|
-
showModalLogin = _useState7[0],
|
|
2975
|
-
setShowModalLogin = _useState7[1];
|
|
2976
|
-
var _useState8 = useState(false),
|
|
2977
|
-
alreadyHasUser = _useState8[0],
|
|
2978
|
-
setAlreadyHasUser = _useState8[1];
|
|
2979
|
-
var _useState9 = useState(false),
|
|
2980
|
-
userExpired = _useState9[0],
|
|
2981
|
-
setUserExpired = _useState9[1];
|
|
2989
|
+
var _useState6 = useState(!!(pIsLoggedIn || xtfCookie)),
|
|
2990
|
+
isLoggedIn = _useState6[0],
|
|
2991
|
+
setIsLoggedIn = _useState6[1];
|
|
2992
|
+
var _useState7 = useState({}),
|
|
2993
|
+
cartInfoData = _useState7[0],
|
|
2994
|
+
setCartInfo = _useState7[1];
|
|
2995
|
+
var _useState8 = useState([]),
|
|
2996
|
+
countries = _useState8[0],
|
|
2997
|
+
setCountries = _useState8[1];
|
|
2998
|
+
var _useState9 = useState([]),
|
|
2999
|
+
states = _useState9[0],
|
|
3000
|
+
setStates = _useState9[1];
|
|
2982
3001
|
var _useState10 = useState(false),
|
|
2983
|
-
|
|
2984
|
-
|
|
3002
|
+
showModalLogin = _useState10[0],
|
|
3003
|
+
setShowModalLogin = _useState10[1];
|
|
2985
3004
|
var _useState11 = useState(false),
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
var _useState12 = useState(
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
var _useState13 = useState(
|
|
3005
|
+
alreadyHasUser = _useState11[0],
|
|
3006
|
+
setAlreadyHasUser = _useState11[1];
|
|
3007
|
+
var _useState12 = useState(false),
|
|
3008
|
+
userExpired = _useState12[0],
|
|
3009
|
+
setUserExpired = _useState12[1];
|
|
3010
|
+
var _useState13 = useState(false),
|
|
3011
|
+
showModalSignup = _useState13[0],
|
|
3012
|
+
setShowModalSignup = _useState13[1];
|
|
3013
|
+
var _useState14 = useState(false),
|
|
3014
|
+
showModalForgotPassword = _useState14[0],
|
|
3015
|
+
setShowModalForgotPassword = _useState14[1];
|
|
3016
|
+
var _useState15 = useState([]),
|
|
3017
|
+
ticketsQuantity = _useState15[0],
|
|
3018
|
+
setTicketsQuantity = _useState15[1];
|
|
3019
|
+
var _useState16 = useState({
|
|
2992
3020
|
firstName: '',
|
|
2993
3021
|
lastName: '',
|
|
2994
3022
|
email: '',
|
|
@@ -3003,43 +3031,55 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
3003
3031
|
state: '',
|
|
3004
3032
|
zip: ''
|
|
3005
3033
|
}),
|
|
3006
|
-
userValues =
|
|
3007
|
-
setUserValues =
|
|
3008
|
-
var
|
|
3009
|
-
loading =
|
|
3010
|
-
setLoading =
|
|
3011
|
-
var _useState15 = useState(false),
|
|
3012
|
-
cardLoading = _useState15[0],
|
|
3013
|
-
setCardLoading = _useState15[1];
|
|
3014
|
-
var _useState16 = useState(true),
|
|
3015
|
-
isCountriesLoading = _useState16[0],
|
|
3016
|
-
setIsCountriesLoading = _useState16[1];
|
|
3017
|
-
var _useState17 = useState(null),
|
|
3018
|
-
error = _useState17[0],
|
|
3019
|
-
setError = _useState17[1];
|
|
3034
|
+
userValues = _useState16[0],
|
|
3035
|
+
setUserValues = _useState16[1];
|
|
3036
|
+
var _useState17 = useState(true),
|
|
3037
|
+
loading = _useState17[0],
|
|
3038
|
+
setLoading = _useState17[1];
|
|
3020
3039
|
var _useState18 = useState(false),
|
|
3021
|
-
|
|
3022
|
-
|
|
3040
|
+
cardLoading = _useState18[0],
|
|
3041
|
+
setCardLoading = _useState18[1];
|
|
3042
|
+
var _useState19 = useState(true),
|
|
3043
|
+
isCountriesLoading = _useState19[0],
|
|
3044
|
+
setIsCountriesLoading = _useState19[1];
|
|
3045
|
+
var _useState20 = useState(null),
|
|
3046
|
+
error = _useState20[0],
|
|
3047
|
+
setError = _useState20[1];
|
|
3048
|
+
var _useState21 = useState(false),
|
|
3049
|
+
phoneValidationIsLoading = _useState21[0],
|
|
3050
|
+
setPhoneValidationIsLoading = _useState21[1];
|
|
3023
3051
|
var emailLogged = _get(userData, 'email', '') || _get(userValues, 'email', '');
|
|
3024
3052
|
var firstNameLogged = _get(userData, 'first_name', '') || _get(userValues, 'first_name', '');
|
|
3025
3053
|
var lastNameLogged = _get(userData, 'last_name', '') || _get(userValues, 'last_name', '');
|
|
3026
|
-
var showDOB =
|
|
3027
|
-
var showTicketHolders =
|
|
3028
|
-
var eventId =
|
|
3054
|
+
var showDOB = configs == null ? void 0 : configs.age_required;
|
|
3055
|
+
var showTicketHolders = configs == null ? void 0 : configs.names_required;
|
|
3056
|
+
var eventId = configs == null ? void 0 : configs.event_id;
|
|
3029
3057
|
var optedInFieldValue = brandOptIn ? brandOptIn : _get(cartInfoData, 'optedIn', false);
|
|
3030
3058
|
var ttfOptIn = Boolean(_get(cartInfoData, 'ttfOptIn', false));
|
|
3031
3059
|
var isTable = Boolean(_get(cartInfoData, 'is_table', false));
|
|
3032
3060
|
var hideTtfOptIn = _get(cartInfoData, 'hide_ttf_opt_in', true);
|
|
3033
3061
|
var expirationTime = _get(cartInfoData, 'expiresAt');
|
|
3034
|
-
var flagRequirePhone =
|
|
3035
|
-
var collectMandatoryWalletAddress =
|
|
3036
|
-
var collectOptionalWalletAddress =
|
|
3037
|
-
var flagFreeTicket =
|
|
3038
|
-
var hidePhoneField =
|
|
3062
|
+
var flagRequirePhone = configs == null ? void 0 : configs.phone_required;
|
|
3063
|
+
var collectMandatoryWalletAddress = configs == null ? void 0 : configs.collect_mandatory_wallet_address;
|
|
3064
|
+
var collectOptionalWalletAddress = configs == null ? void 0 : configs.collect_optional_wallet_address;
|
|
3065
|
+
var flagFreeTicket = configs == null ? void 0 : configs.free_ticket;
|
|
3066
|
+
var hidePhoneField = configs == null ? void 0 : configs.hide_phone_field;
|
|
3039
3067
|
var hideWalletAddressField = !collectOptionalWalletAddress && !collectMandatoryWalletAddress;
|
|
3040
|
-
var
|
|
3041
|
-
|
|
3042
|
-
|
|
3068
|
+
var collectMandatoryCompany = configs == null ? void 0 : configs.collect_mandatory_company;
|
|
3069
|
+
var collectOptionalCompany = configs == null ? void 0 : configs.collect_optional_company;
|
|
3070
|
+
var hideCompanyField = !collectOptionalCompany && !collectMandatoryCompany;
|
|
3071
|
+
var collectMandatoryJobTitle = configs == null ? void 0 : configs.collect_mandatory_job_title;
|
|
3072
|
+
var collectOptionalJobTitle = configs == null ? void 0 : configs.collect_optional_job_title;
|
|
3073
|
+
var hideJobTitleField = !collectMandatoryJobTitle && !collectOptionalJobTitle;
|
|
3074
|
+
var collectMandatoryInstagram = configs == null ? void 0 : configs.collect_mandatory_instagram;
|
|
3075
|
+
var collectOptionalInstagram = configs == null ? void 0 : configs.collect_optional_instagram;
|
|
3076
|
+
var hideInstagramField = !collectMandatoryInstagram && !collectOptionalInstagram;
|
|
3077
|
+
var collectMandatoryBusinessCategory = configs == null ? void 0 : configs.collect_mandatory_business_category;
|
|
3078
|
+
var collectOptionalBusinessCategory = configs == null ? void 0 : configs.collect_optional_business_category;
|
|
3079
|
+
var hideBusinessCategoryField = !collectMandatoryBusinessCategory && !collectOptionalBusinessCategory;
|
|
3080
|
+
var _useState22 = useState(),
|
|
3081
|
+
pendingVerificationMessage = _useState22[0],
|
|
3082
|
+
setPendingVerificationMessage = _useState22[1];
|
|
3043
3083
|
// Get prevProps
|
|
3044
3084
|
var prevData = useRef(data);
|
|
3045
3085
|
var addAddOnsInAttributes = function addAddOnsInAttributes(checkoutBody) {
|
|
@@ -3283,7 +3323,7 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
3283
3323
|
}) || {};
|
|
3284
3324
|
var initialCountry = selectedCountry.id || _get(userData, 'country', '') || '1';
|
|
3285
3325
|
var pageUrl = isBrowser ? window.location.href.split('?')[0] : '';
|
|
3286
|
-
usePixel(eventId, {
|
|
3326
|
+
usePixel(eventId || '', {
|
|
3287
3327
|
page: 'billing',
|
|
3288
3328
|
pageUrl: pageUrl
|
|
3289
3329
|
});
|
|
@@ -3292,7 +3332,7 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
3292
3332
|
}
|
|
3293
3333
|
return React.createElement(ThemeProvider, {
|
|
3294
3334
|
theme: themeMui
|
|
3295
|
-
}, (loading || cardLoading || isCountriesLoading) && React.createElement(Backdrop, {
|
|
3335
|
+
}, (loading || cardLoading || isCountriesLoading || isConfigLoading) && React.createElement(Backdrop, {
|
|
3296
3336
|
sx: {
|
|
3297
3337
|
color: '#fff',
|
|
3298
3338
|
backgroundColor: '#000000bd',
|
|
@@ -3304,12 +3344,18 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
3304
3344
|
})), !!expirationTime && enableTimer && React.createElement(TimerWidget$1, {
|
|
3305
3345
|
expires_at: expirationTime,
|
|
3306
3346
|
onCountdownFinish: onCountdownFinish
|
|
3307
|
-
}), !isCountriesLoading && React.createElement(Formik, {
|
|
3347
|
+
}), !isCountriesLoading && !isConfigLoading && React.createElement(Formik, {
|
|
3308
3348
|
initialValues: getInitialValues(dataWithUniqueIds, _extends({
|
|
3309
3349
|
country: initialCountry,
|
|
3310
3350
|
state: _get(userData, 'state', '') || '1',
|
|
3311
3351
|
brand_opt_in: optedInFieldValue,
|
|
3312
|
-
ttf_opt_in: ttfOptIn
|
|
3352
|
+
ttf_opt_in: ttfOptIn,
|
|
3353
|
+
data_capture: {
|
|
3354
|
+
'instagram': _get(extraData, 'data_capture.instagram', ''),
|
|
3355
|
+
'company': _get(extraData, 'data_capture.company', ''),
|
|
3356
|
+
'businessCategory': _get(extraData, 'data_capture.businessCategory', ''),
|
|
3357
|
+
'jobTitle': _get(extraData, 'data_capture.jobTitle', '')
|
|
3358
|
+
}
|
|
3313
3359
|
}, initialValues), userValues),
|
|
3314
3360
|
enableReinitialize: false,
|
|
3315
3361
|
onSubmit: function () {
|
|
@@ -3319,46 +3365,56 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
3319
3365
|
while (1) switch (_context6.prev = _context6.next) {
|
|
3320
3366
|
case 0:
|
|
3321
3367
|
_context6.prev = 0;
|
|
3368
|
+
if (isWindowDefined) {
|
|
3369
|
+
window.localStorage.setItem('extraData', JSON.stringify({
|
|
3370
|
+
data_capture: {
|
|
3371
|
+
'instagram': _get(values, 'data_capture.instagram', ''),
|
|
3372
|
+
'company': _get(values, 'data_capture.company', ''),
|
|
3373
|
+
'businessCategory': _get(values, 'data_capture.businessCategory', ''),
|
|
3374
|
+
'jobTitle': _get(values, 'data_capture.jobTitle', '')
|
|
3375
|
+
}
|
|
3376
|
+
}));
|
|
3377
|
+
}
|
|
3322
3378
|
if (!isLoggedIn) {
|
|
3323
|
-
_context6.next =
|
|
3379
|
+
_context6.next = 18;
|
|
3324
3380
|
break;
|
|
3325
3381
|
}
|
|
3326
3382
|
_checkoutBody = collectCheckoutBody(values, userData);
|
|
3327
3383
|
if (isWindowDefined) {
|
|
3328
3384
|
addAddOnsInAttributes(_checkoutBody);
|
|
3329
3385
|
}
|
|
3330
|
-
_context6.next =
|
|
3386
|
+
_context6.next = 7;
|
|
3331
3387
|
return postOnCheckout(_checkoutBody, access_token, flagFreeTicket);
|
|
3332
|
-
case
|
|
3388
|
+
case 7:
|
|
3333
3389
|
_res = _context6.sent;
|
|
3334
3390
|
removeReferralKey();
|
|
3335
3391
|
// After checkout is successful recover updated profile and store it on local storage if needed
|
|
3336
3392
|
if (!isWindowDefined) {
|
|
3337
|
-
_context6.next =
|
|
3393
|
+
_context6.next = 16;
|
|
3338
3394
|
break;
|
|
3339
3395
|
}
|
|
3340
|
-
_context6.next =
|
|
3396
|
+
_context6.next = 12;
|
|
3341
3397
|
return getProfileData(access_token);
|
|
3342
|
-
case
|
|
3398
|
+
case 12:
|
|
3343
3399
|
updatedUserData = _context6.sent;
|
|
3344
3400
|
_profileSpecifiedData = _get(updatedUserData, 'data.data');
|
|
3345
3401
|
_profileDataObj = setLoggedUserData$2(_profileSpecifiedData);
|
|
3346
3402
|
window.localStorage.setItem('user_data', JSON.stringify(_profileDataObj));
|
|
3347
|
-
case
|
|
3403
|
+
case 16:
|
|
3348
3404
|
handleSubmit(values, formikHelpers, eventId, _res);
|
|
3349
3405
|
return _context6.abrupt("return");
|
|
3350
|
-
case
|
|
3406
|
+
case 18:
|
|
3351
3407
|
checkoutBodyForRegistration = createCheckoutDataBody(ticketsQuantity.length, values, {
|
|
3352
3408
|
emailLogged: emailLogged,
|
|
3353
3409
|
firstNameLogged: firstNameLogged,
|
|
3354
3410
|
lastNameLogged: lastNameLogged
|
|
3355
3411
|
}, showDOB);
|
|
3356
3412
|
bodyFormData = createRegisterFormData(values, checkoutBodyForRegistration, flagFreeTicket);
|
|
3357
|
-
_context6.prev =
|
|
3413
|
+
_context6.prev = 20;
|
|
3358
3414
|
setLoading(true);
|
|
3359
|
-
_context6.next =
|
|
3415
|
+
_context6.next = 24;
|
|
3360
3416
|
return register(bodyFormData);
|
|
3361
|
-
case
|
|
3417
|
+
case 24:
|
|
3362
3418
|
resRegister = _context6.sent;
|
|
3363
3419
|
_xtfCookie = _get(resRegister, 'headers.x-tf-ecommerce');
|
|
3364
3420
|
accessToken = _get(resRegister, 'data.data.attributes.access_token');
|
|
@@ -3371,11 +3427,11 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
3371
3427
|
refreshToken: refreshToken,
|
|
3372
3428
|
userProfile: userProfile
|
|
3373
3429
|
});
|
|
3374
|
-
_context6.next =
|
|
3430
|
+
_context6.next = 38;
|
|
3375
3431
|
break;
|
|
3376
|
-
case
|
|
3377
|
-
_context6.prev =
|
|
3378
|
-
_context6.t0 = _context6["catch"](
|
|
3432
|
+
case 33:
|
|
3433
|
+
_context6.prev = 33;
|
|
3434
|
+
_context6.t0 = _context6["catch"](20);
|
|
3379
3435
|
setLoading(false);
|
|
3380
3436
|
if ((_e$response3 = _context6.t0.response) != null && (_e$response3$data = _e$response3.data) != null && (_e$response3$data$dat = _e$response3$data.data) != null && _e$response3$data$dat.hasUnverifiedOrder) {
|
|
3381
3437
|
setPendingVerificationMessage((_e$response4 = _context6.t0.response) == null ? void 0 : (_e$response4$data = _e$response4.data) == null ? void 0 : _e$response4$data.message);
|
|
@@ -3399,10 +3455,10 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
3399
3455
|
onRegisterError(_context6.t0, values.email);
|
|
3400
3456
|
}
|
|
3401
3457
|
return _context6.abrupt("return");
|
|
3402
|
-
case
|
|
3403
|
-
_context6.next =
|
|
3458
|
+
case 38:
|
|
3459
|
+
_context6.next = 40;
|
|
3404
3460
|
return getProfileData();
|
|
3405
|
-
case
|
|
3461
|
+
case 40:
|
|
3406
3462
|
profileData = _context6.sent;
|
|
3407
3463
|
profileSpecifiedData = _get(profileData, 'data.data');
|
|
3408
3464
|
profileDataObj = setLoggedUserData$2(profileSpecifiedData);
|
|
@@ -3413,16 +3469,16 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
3413
3469
|
if (isWindowDefined) {
|
|
3414
3470
|
addAddOnsInAttributes(checkoutBody);
|
|
3415
3471
|
}
|
|
3416
|
-
_context6.next =
|
|
3472
|
+
_context6.next = 48;
|
|
3417
3473
|
return postOnCheckout(checkoutBody, undefined, flagFreeTicket);
|
|
3418
|
-
case
|
|
3474
|
+
case 48:
|
|
3419
3475
|
res = _context6.sent;
|
|
3420
3476
|
removeReferralKey();
|
|
3421
3477
|
handleSubmit(values, formikHelpers, eventId, res);
|
|
3422
|
-
_context6.next =
|
|
3478
|
+
_context6.next = 57;
|
|
3423
3479
|
break;
|
|
3424
|
-
case
|
|
3425
|
-
_context6.prev =
|
|
3480
|
+
case 53:
|
|
3481
|
+
_context6.prev = 53;
|
|
3426
3482
|
_context6.t1 = _context6["catch"](0);
|
|
3427
3483
|
setLoading(false);
|
|
3428
3484
|
if ((_e$response6 = _context6.t1.response) != null && (_e$response6$data = _e$response6.data) != null && (_e$response6$data$dat = _e$response6$data.data) != null && _e$response6$data$dat.hasUnverifiedOrder) {
|
|
@@ -3447,15 +3503,15 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
3447
3503
|
}
|
|
3448
3504
|
onSubmitError(_context6.t1);
|
|
3449
3505
|
}
|
|
3450
|
-
case
|
|
3451
|
-
_context6.prev =
|
|
3506
|
+
case 57:
|
|
3507
|
+
_context6.prev = 57;
|
|
3452
3508
|
setLoading(false);
|
|
3453
|
-
return _context6.finish(
|
|
3454
|
-
case
|
|
3509
|
+
return _context6.finish(57);
|
|
3510
|
+
case 60:
|
|
3455
3511
|
case "end":
|
|
3456
3512
|
return _context6.stop();
|
|
3457
3513
|
}
|
|
3458
|
-
}, _callee6, null, [[0,
|
|
3514
|
+
}, _callee6, null, [[0, 53, 57, 60], [20, 33]]);
|
|
3459
3515
|
}));
|
|
3460
3516
|
function onSubmit(_x2, _x3) {
|
|
3461
3517
|
return _onSubmit.apply(this, arguments);
|
|
@@ -3541,18 +3597,50 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
3541
3597
|
el.required = true;
|
|
3542
3598
|
}
|
|
3543
3599
|
}
|
|
3544
|
-
if (
|
|
3600
|
+
if (el.name === 'data_capture[jobTitle]') {
|
|
3601
|
+
if (collectMandatoryJobTitle) {
|
|
3602
|
+
el.required = true;
|
|
3603
|
+
}
|
|
3604
|
+
}
|
|
3605
|
+
if (el.name === 'data_capture[businessCategory]') {
|
|
3606
|
+
if (collectMandatoryBusinessCategory) {
|
|
3607
|
+
el.required = true;
|
|
3608
|
+
}
|
|
3609
|
+
}
|
|
3610
|
+
if (el.name === 'data_capture[company]') {
|
|
3611
|
+
if (collectMandatoryCompany) {
|
|
3612
|
+
el.required = true;
|
|
3613
|
+
}
|
|
3614
|
+
}
|
|
3615
|
+
if (el.name === 'data_capture[instagram]') {
|
|
3616
|
+
if (collectMandatoryInstagram) {
|
|
3617
|
+
el.required = true;
|
|
3618
|
+
}
|
|
3619
|
+
}
|
|
3620
|
+
if (['street_address', 'country', 'state', 'city'].includes(el.name)) {
|
|
3545
3621
|
if (flagFreeTicket) {
|
|
3546
3622
|
el.required = false;
|
|
3547
3623
|
return false;
|
|
3548
3624
|
}
|
|
3549
3625
|
}
|
|
3550
|
-
if (hideWalletAddressField && el.name === 'wallet-address-info') {
|
|
3626
|
+
if (hideWalletAddressField && (el.name === 'wallet-address-info' || el.name === 'data_capture[wallet_address]')) {
|
|
3627
|
+
return false;
|
|
3628
|
+
}
|
|
3629
|
+
if (hideJobTitleField && el.name === 'data_capture[jobTitle]') {
|
|
3630
|
+
return false;
|
|
3631
|
+
}
|
|
3632
|
+
if (hideBusinessCategoryField && el.name === 'data_capture[businessCategory]') {
|
|
3633
|
+
return false;
|
|
3634
|
+
}
|
|
3635
|
+
if (hideCompanyField && el.name === 'data_capture[company]') {
|
|
3636
|
+
return false;
|
|
3637
|
+
}
|
|
3638
|
+
if (hideInstagramField && (el.name === 'data_capture[instagram]' || el.name === 'instagram-info')) {
|
|
3551
3639
|
return false;
|
|
3552
3640
|
}
|
|
3553
3641
|
return true;
|
|
3554
3642
|
}), function (element) {
|
|
3555
|
-
return ['password', 'confirmPassword', 'password-info'].includes(element.name) && isLoggedIn ? null :
|
|
3643
|
+
return ['password', 'confirmPassword', 'password-info'].includes(element.name) && isLoggedIn ? null : React.createElement(React.Fragment, {
|
|
3556
3644
|
key: element.uniqueId
|
|
3557
3645
|
}, React.createElement("div", {
|
|
3558
3646
|
className: element.className + " " + ((props == null ? void 0 : props.errors[element.name]) || '')
|
|
@@ -5606,6 +5694,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5606
5694
|
window.localStorage.removeItem('user_data');
|
|
5607
5695
|
}
|
|
5608
5696
|
}
|
|
5697
|
+
window.localStorage.removeItem('extraData');
|
|
5609
5698
|
}
|
|
5610
5699
|
}, []);
|
|
5611
5700
|
useEffect(function () {
|