tf-checkout-react 1.3.12 → 1.3.13
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/tf-checkout-react.cjs.development.js +149 -144
- 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 +149 -144
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/billing-info-container/index.tsx +63 -41
|
@@ -2784,7 +2784,7 @@ var LogicRunner = function LogicRunner(_ref) {
|
|
|
2784
2784
|
React.useEffect(function () {
|
|
2785
2785
|
var fetchStates = /*#__PURE__*/function () {
|
|
2786
2786
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
|
|
2787
|
-
var res, mappedStates, _mappedStates$find,
|
|
2787
|
+
var res, mappedStates, _mappedStates$find, _ref3, _mappedStates$, stateExists;
|
|
2788
2788
|
|
|
2789
2789
|
return runtime_1.wrap(function _callee$(_context) {
|
|
2790
2790
|
while (1) {
|
|
@@ -2808,7 +2808,7 @@ var LogicRunner = function LogicRunner(_ref) {
|
|
|
2808
2808
|
stateExists = (_mappedStates$find = mappedStates.find(function (state) {
|
|
2809
2809
|
return state.value === values.state;
|
|
2810
2810
|
})) == null ? void 0 : _mappedStates$find.value;
|
|
2811
|
-
setFieldValue('state', stateExists != null ? stateExists : (_mappedStates$
|
|
2811
|
+
setFieldValue('state', (_ref3 = stateExists != null ? stateExists : (_mappedStates$ = mappedStates[0]) == null ? void 0 : _mappedStates$.value) != null ? _ref3 : '');
|
|
2812
2812
|
prevCountry.current = values.country;
|
|
2813
2813
|
}
|
|
2814
2814
|
|
|
@@ -2877,137 +2877,141 @@ var LogicRunner = function LogicRunner(_ref) {
|
|
|
2877
2877
|
return null;
|
|
2878
2878
|
};
|
|
2879
2879
|
|
|
2880
|
-
var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (
|
|
2881
|
-
var
|
|
2882
|
-
data =
|
|
2883
|
-
|
|
2884
|
-
ticketHoldersFields =
|
|
2880
|
+
var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref4) {
|
|
2881
|
+
var _ref4$data = _ref4.data,
|
|
2882
|
+
data = _ref4$data === void 0 ? [] : _ref4$data,
|
|
2883
|
+
_ref4$ticketHoldersFi = _ref4.ticketHoldersFields,
|
|
2884
|
+
ticketHoldersFields = _ref4$ticketHoldersFi === void 0 ? {
|
|
2885
2885
|
id: 1,
|
|
2886
2886
|
fields: []
|
|
2887
|
-
} :
|
|
2888
|
-
|
|
2889
|
-
initialValues =
|
|
2890
|
-
|
|
2891
|
-
buttonName =
|
|
2892
|
-
|
|
2893
|
-
handleSubmit =
|
|
2894
|
-
|
|
2895
|
-
theme =
|
|
2896
|
-
|
|
2897
|
-
onRegisterSuccess =
|
|
2898
|
-
|
|
2899
|
-
onRegisterError =
|
|
2900
|
-
|
|
2901
|
-
onSubmitError =
|
|
2902
|
-
|
|
2903
|
-
onGetCartSuccess =
|
|
2904
|
-
|
|
2905
|
-
onGetCartError =
|
|
2906
|
-
|
|
2907
|
-
onGetCountriesSuccess =
|
|
2908
|
-
|
|
2909
|
-
onGetCountriesError =
|
|
2910
|
-
|
|
2911
|
-
onGetStatesSuccess =
|
|
2912
|
-
|
|
2913
|
-
onGetStatesError =
|
|
2914
|
-
|
|
2915
|
-
_onGetProfileDataSuccess =
|
|
2916
|
-
|
|
2917
|
-
onGetProfileDataError =
|
|
2918
|
-
|
|
2919
|
-
onAuthorizeSuccess =
|
|
2920
|
-
|
|
2921
|
-
onAuthorizeError =
|
|
2922
|
-
onLogin =
|
|
2923
|
-
|
|
2924
|
-
onLoginSuccess =
|
|
2925
|
-
|
|
2926
|
-
pIsLoggedIn =
|
|
2927
|
-
|
|
2928
|
-
accountInfoTitle =
|
|
2929
|
-
hideLogo =
|
|
2930
|
-
themeOptions =
|
|
2931
|
-
|
|
2932
|
-
onErrorClose =
|
|
2933
|
-
|
|
2934
|
-
hideErrorsAlertSection =
|
|
2935
|
-
|
|
2936
|
-
onSkipBillingPage =
|
|
2937
|
-
|
|
2938
|
-
skipPage =
|
|
2939
|
-
|
|
2940
|
-
canSkipHolderNames =
|
|
2941
|
-
|
|
2942
|
-
onForgotPasswordSuccess =
|
|
2943
|
-
|
|
2944
|
-
onForgotPasswordError =
|
|
2945
|
-
|
|
2946
|
-
shouldFetchCountries =
|
|
2947
|
-
|
|
2948
|
-
onCountdownFinish =
|
|
2949
|
-
|
|
2950
|
-
enableTimer =
|
|
2951
|
-
logo =
|
|
2952
|
-
|
|
2953
|
-
showForgotPasswordButton =
|
|
2954
|
-
|
|
2955
|
-
showSignUpButton =
|
|
2956
|
-
|
|
2957
|
-
brandOptIn =
|
|
2887
|
+
} : _ref4$ticketHoldersFi,
|
|
2888
|
+
_ref4$initialValues = _ref4.initialValues,
|
|
2889
|
+
initialValues = _ref4$initialValues === void 0 ? {} : _ref4$initialValues,
|
|
2890
|
+
_ref4$buttonName = _ref4.buttonName,
|
|
2891
|
+
buttonName = _ref4$buttonName === void 0 ? 'Submit' : _ref4$buttonName,
|
|
2892
|
+
_ref4$handleSubmit = _ref4.handleSubmit,
|
|
2893
|
+
handleSubmit = _ref4$handleSubmit === void 0 ? _identity : _ref4$handleSubmit,
|
|
2894
|
+
_ref4$theme = _ref4.theme,
|
|
2895
|
+
theme = _ref4$theme === void 0 ? 'light' : _ref4$theme,
|
|
2896
|
+
_ref4$onRegisterSucce = _ref4.onRegisterSuccess,
|
|
2897
|
+
onRegisterSuccess = _ref4$onRegisterSucce === void 0 ? _identity : _ref4$onRegisterSucce,
|
|
2898
|
+
_ref4$onRegisterError = _ref4.onRegisterError,
|
|
2899
|
+
onRegisterError = _ref4$onRegisterError === void 0 ? _identity : _ref4$onRegisterError,
|
|
2900
|
+
_ref4$onSubmitError = _ref4.onSubmitError,
|
|
2901
|
+
onSubmitError = _ref4$onSubmitError === void 0 ? _identity : _ref4$onSubmitError,
|
|
2902
|
+
_ref4$onGetCartSucces = _ref4.onGetCartSuccess,
|
|
2903
|
+
onGetCartSuccess = _ref4$onGetCartSucces === void 0 ? _identity : _ref4$onGetCartSucces,
|
|
2904
|
+
_ref4$onGetCartError = _ref4.onGetCartError,
|
|
2905
|
+
onGetCartError = _ref4$onGetCartError === void 0 ? _identity : _ref4$onGetCartError,
|
|
2906
|
+
_ref4$onGetCountriesS = _ref4.onGetCountriesSuccess,
|
|
2907
|
+
onGetCountriesSuccess = _ref4$onGetCountriesS === void 0 ? _identity : _ref4$onGetCountriesS,
|
|
2908
|
+
_ref4$onGetCountriesE = _ref4.onGetCountriesError,
|
|
2909
|
+
onGetCountriesError = _ref4$onGetCountriesE === void 0 ? _identity : _ref4$onGetCountriesE,
|
|
2910
|
+
_ref4$onGetStatesSucc = _ref4.onGetStatesSuccess,
|
|
2911
|
+
onGetStatesSuccess = _ref4$onGetStatesSucc === void 0 ? _identity : _ref4$onGetStatesSucc,
|
|
2912
|
+
_ref4$onGetStatesErro = _ref4.onGetStatesError,
|
|
2913
|
+
onGetStatesError = _ref4$onGetStatesErro === void 0 ? _identity : _ref4$onGetStatesErro,
|
|
2914
|
+
_ref4$onGetProfileDat = _ref4.onGetProfileDataSuccess,
|
|
2915
|
+
_onGetProfileDataSuccess = _ref4$onGetProfileDat === void 0 ? _identity : _ref4$onGetProfileDat,
|
|
2916
|
+
_ref4$onGetProfileDat2 = _ref4.onGetProfileDataError,
|
|
2917
|
+
onGetProfileDataError = _ref4$onGetProfileDat2 === void 0 ? _identity : _ref4$onGetProfileDat2,
|
|
2918
|
+
_ref4$onAuthorizeSucc = _ref4.onAuthorizeSuccess,
|
|
2919
|
+
onAuthorizeSuccess = _ref4$onAuthorizeSucc === void 0 ? _identity : _ref4$onAuthorizeSucc,
|
|
2920
|
+
_ref4$onAuthorizeErro = _ref4.onAuthorizeError,
|
|
2921
|
+
onAuthorizeError = _ref4$onAuthorizeErro === void 0 ? _identity : _ref4$onAuthorizeErro,
|
|
2922
|
+
onLogin = _ref4.onLogin,
|
|
2923
|
+
_ref4$onLoginSuccess = _ref4.onLoginSuccess,
|
|
2924
|
+
onLoginSuccess = _ref4$onLoginSuccess === void 0 ? _identity : _ref4$onLoginSuccess,
|
|
2925
|
+
_ref4$isLoggedIn = _ref4.isLoggedIn,
|
|
2926
|
+
pIsLoggedIn = _ref4$isLoggedIn === void 0 ? false : _ref4$isLoggedIn,
|
|
2927
|
+
_ref4$accountInfoTitl = _ref4.accountInfoTitle,
|
|
2928
|
+
accountInfoTitle = _ref4$accountInfoTitl === void 0 ? '' : _ref4$accountInfoTitl,
|
|
2929
|
+
hideLogo = _ref4.hideLogo,
|
|
2930
|
+
themeOptions = _ref4.themeOptions,
|
|
2931
|
+
_ref4$onErrorClose = _ref4.onErrorClose,
|
|
2932
|
+
onErrorClose = _ref4$onErrorClose === void 0 ? _identity : _ref4$onErrorClose,
|
|
2933
|
+
_ref4$hideErrorsAlert = _ref4.hideErrorsAlertSection,
|
|
2934
|
+
hideErrorsAlertSection = _ref4$hideErrorsAlert === void 0 ? false : _ref4$hideErrorsAlert,
|
|
2935
|
+
_ref4$onSkipBillingPa = _ref4.onSkipBillingPage,
|
|
2936
|
+
onSkipBillingPage = _ref4$onSkipBillingPa === void 0 ? _identity : _ref4$onSkipBillingPa,
|
|
2937
|
+
_ref4$skipPage = _ref4.skipPage,
|
|
2938
|
+
skipPage = _ref4$skipPage === void 0 ? false : _ref4$skipPage,
|
|
2939
|
+
_ref4$canSkipHolderNa = _ref4.canSkipHolderNames,
|
|
2940
|
+
canSkipHolderNames = _ref4$canSkipHolderNa === void 0 ? false : _ref4$canSkipHolderNa,
|
|
2941
|
+
_ref4$onForgotPasswor = _ref4.onForgotPasswordSuccess,
|
|
2942
|
+
onForgotPasswordSuccess = _ref4$onForgotPasswor === void 0 ? _identity : _ref4$onForgotPasswor,
|
|
2943
|
+
_ref4$onForgotPasswor2 = _ref4.onForgotPasswordError,
|
|
2944
|
+
onForgotPasswordError = _ref4$onForgotPasswor2 === void 0 ? _identity : _ref4$onForgotPasswor2,
|
|
2945
|
+
_ref4$shouldFetchCoun = _ref4.shouldFetchCountries,
|
|
2946
|
+
shouldFetchCountries = _ref4$shouldFetchCoun === void 0 ? true : _ref4$shouldFetchCoun,
|
|
2947
|
+
_ref4$onCountdownFini = _ref4.onCountdownFinish,
|
|
2948
|
+
onCountdownFinish = _ref4$onCountdownFini === void 0 ? _identity : _ref4$onCountdownFini,
|
|
2949
|
+
_ref4$enableTimer = _ref4.enableTimer,
|
|
2950
|
+
enableTimer = _ref4$enableTimer === void 0 ? false : _ref4$enableTimer,
|
|
2951
|
+
logo = _ref4.logo,
|
|
2952
|
+
_ref4$showForgotPassw = _ref4.showForgotPasswordButton,
|
|
2953
|
+
showForgotPasswordButton = _ref4$showForgotPassw === void 0 ? false : _ref4$showForgotPassw,
|
|
2954
|
+
_ref4$showSignUpButto = _ref4.showSignUpButton,
|
|
2955
|
+
showSignUpButton = _ref4$showSignUpButto === void 0 ? false : _ref4$showSignUpButto,
|
|
2956
|
+
_ref4$brandOptIn = _ref4.brandOptIn,
|
|
2957
|
+
brandOptIn = _ref4$brandOptIn === void 0 ? false : _ref4$brandOptIn;
|
|
2958
|
+
|
|
2959
|
+
var _useState = React.useState(false),
|
|
2960
|
+
isNewUser = _useState[0],
|
|
2961
|
+
setIsNewUser = _useState[1];
|
|
2958
2962
|
|
|
2959
2963
|
var themeMui = styles.createTheme(themeOptions);
|
|
2960
2964
|
var isWindowDefined = typeof window !== 'undefined';
|
|
2961
2965
|
var userData = isWindowDefined && window.localStorage.getItem('user_data') ? JSON.parse(window.localStorage.getItem('user_data') || '') : {};
|
|
2962
2966
|
var access_token = isWindowDefined && window.localStorage.getItem('access_token') ? window.localStorage.getItem('access_token') || '' : '';
|
|
2963
2967
|
|
|
2964
|
-
var
|
|
2965
|
-
dataWithUniqueIds =
|
|
2966
|
-
setDataWithUniqueIds =
|
|
2968
|
+
var _useState2 = React.useState(assingUniqueIds(data)),
|
|
2969
|
+
dataWithUniqueIds = _useState2[0],
|
|
2970
|
+
setDataWithUniqueIds = _useState2[1];
|
|
2967
2971
|
|
|
2968
2972
|
var xtfCookie = getCookieByName('X-TF-ECOMMERCE');
|
|
2969
2973
|
|
|
2970
|
-
var
|
|
2971
|
-
isLoggedIn =
|
|
2972
|
-
setIsLoggedIn =
|
|
2973
|
-
|
|
2974
|
-
var _useState3 = React.useState({}),
|
|
2975
|
-
cartInfoData = _useState3[0],
|
|
2976
|
-
setCartInfo = _useState3[1];
|
|
2974
|
+
var _useState3 = React.useState(!!(pIsLoggedIn || xtfCookie)),
|
|
2975
|
+
isLoggedIn = _useState3[0],
|
|
2976
|
+
setIsLoggedIn = _useState3[1];
|
|
2977
2977
|
|
|
2978
|
-
var _useState4 = React.useState(
|
|
2979
|
-
|
|
2980
|
-
|
|
2978
|
+
var _useState4 = React.useState({}),
|
|
2979
|
+
cartInfoData = _useState4[0],
|
|
2980
|
+
setCartInfo = _useState4[1];
|
|
2981
2981
|
|
|
2982
2982
|
var _useState5 = React.useState([]),
|
|
2983
|
-
|
|
2984
|
-
|
|
2983
|
+
countries = _useState5[0],
|
|
2984
|
+
setCountries = _useState5[1];
|
|
2985
2985
|
|
|
2986
|
-
var _useState6 = React.useState(
|
|
2987
|
-
|
|
2988
|
-
|
|
2986
|
+
var _useState6 = React.useState([]),
|
|
2987
|
+
states = _useState6[0],
|
|
2988
|
+
setStates = _useState6[1];
|
|
2989
2989
|
|
|
2990
2990
|
var _useState7 = React.useState(false),
|
|
2991
|
-
|
|
2992
|
-
|
|
2991
|
+
showModalLogin = _useState7[0],
|
|
2992
|
+
setShowModalLogin = _useState7[1];
|
|
2993
2993
|
|
|
2994
2994
|
var _useState8 = React.useState(false),
|
|
2995
|
-
|
|
2996
|
-
|
|
2995
|
+
alreadyHasUser = _useState8[0],
|
|
2996
|
+
setAlreadyHasUser = _useState8[1];
|
|
2997
2997
|
|
|
2998
2998
|
var _useState9 = React.useState(false),
|
|
2999
|
-
|
|
3000
|
-
|
|
2999
|
+
userExpired = _useState9[0],
|
|
3000
|
+
setUserExpired = _useState9[1];
|
|
3001
3001
|
|
|
3002
3002
|
var _useState10 = React.useState(false),
|
|
3003
|
-
|
|
3004
|
-
|
|
3003
|
+
showModalSignup = _useState10[0],
|
|
3004
|
+
setShowModalSignup = _useState10[1];
|
|
3005
|
+
|
|
3006
|
+
var _useState11 = React.useState(false),
|
|
3007
|
+
showModalForgotPassword = _useState11[0],
|
|
3008
|
+
setShowModalForgotPassword = _useState11[1];
|
|
3005
3009
|
|
|
3006
|
-
var
|
|
3007
|
-
ticketsQuantity =
|
|
3008
|
-
setTicketsQuantity =
|
|
3010
|
+
var _useState12 = React.useState([]),
|
|
3011
|
+
ticketsQuantity = _useState12[0],
|
|
3012
|
+
setTicketsQuantity = _useState12[1];
|
|
3009
3013
|
|
|
3010
|
-
var
|
|
3014
|
+
var _useState13 = React.useState({
|
|
3011
3015
|
firstName: '',
|
|
3012
3016
|
lastName: '',
|
|
3013
3017
|
email: '',
|
|
@@ -3022,20 +3026,20 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref3) {
|
|
|
3022
3026
|
state: '',
|
|
3023
3027
|
zip: ''
|
|
3024
3028
|
}),
|
|
3025
|
-
userValues =
|
|
3026
|
-
setUserValues =
|
|
3029
|
+
userValues = _useState13[0],
|
|
3030
|
+
setUserValues = _useState13[1];
|
|
3027
3031
|
|
|
3028
|
-
var
|
|
3029
|
-
loading =
|
|
3030
|
-
setLoading =
|
|
3032
|
+
var _useState14 = React.useState(true),
|
|
3033
|
+
loading = _useState14[0],
|
|
3034
|
+
setLoading = _useState14[1];
|
|
3031
3035
|
|
|
3032
|
-
var
|
|
3033
|
-
error =
|
|
3034
|
-
setError =
|
|
3036
|
+
var _useState15 = React.useState(null),
|
|
3037
|
+
error = _useState15[0],
|
|
3038
|
+
setError = _useState15[1];
|
|
3035
3039
|
|
|
3036
|
-
var
|
|
3037
|
-
phoneValidationIsLoading =
|
|
3038
|
-
setPhoneValidationIsLoading =
|
|
3040
|
+
var _useState16 = React.useState(false),
|
|
3041
|
+
phoneValidationIsLoading = _useState16[0],
|
|
3042
|
+
setPhoneValidationIsLoading = _useState16[1];
|
|
3039
3043
|
|
|
3040
3044
|
var emailLogged = _get(userData, 'email', '') || _get(userValues, 'email', '');
|
|
3041
3045
|
|
|
@@ -3098,7 +3102,7 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref3) {
|
|
|
3098
3102
|
React.useEffect(function () {
|
|
3099
3103
|
// fetch countries data
|
|
3100
3104
|
var fetchCountries = /*#__PURE__*/function () {
|
|
3101
|
-
var
|
|
3105
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2() {
|
|
3102
3106
|
var res;
|
|
3103
3107
|
return runtime_1.wrap(function _callee2$(_context2) {
|
|
3104
3108
|
while (1) {
|
|
@@ -3138,7 +3142,7 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref3) {
|
|
|
3138
3142
|
}));
|
|
3139
3143
|
|
|
3140
3144
|
return function fetchCountries() {
|
|
3141
|
-
return
|
|
3145
|
+
return _ref5.apply(this, arguments);
|
|
3142
3146
|
};
|
|
3143
3147
|
}();
|
|
3144
3148
|
|
|
@@ -3147,7 +3151,7 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref3) {
|
|
|
3147
3151
|
}, []); // fetch cart data
|
|
3148
3152
|
|
|
3149
3153
|
var fetchCart = /*#__PURE__*/function () {
|
|
3150
|
-
var
|
|
3154
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3() {
|
|
3151
3155
|
var res, cartInfo, _cartInfo$cart, cart;
|
|
3152
3156
|
|
|
3153
3157
|
return runtime_1.wrap(function _callee3$(_context3) {
|
|
@@ -3188,13 +3192,13 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref3) {
|
|
|
3188
3192
|
}));
|
|
3189
3193
|
|
|
3190
3194
|
return function fetchCart() {
|
|
3191
|
-
return
|
|
3195
|
+
return _ref6.apply(this, arguments);
|
|
3192
3196
|
};
|
|
3193
3197
|
}(); // fetch user data
|
|
3194
3198
|
|
|
3195
3199
|
|
|
3196
3200
|
var fetchUserData = /*#__PURE__*/function () {
|
|
3197
|
-
var
|
|
3201
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(token) {
|
|
3198
3202
|
var userDataResponse, profileSpecifiedData, profileDataObj;
|
|
3199
3203
|
return runtime_1.wrap(function _callee4$(_context4) {
|
|
3200
3204
|
while (1) {
|
|
@@ -3243,7 +3247,7 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref3) {
|
|
|
3243
3247
|
}));
|
|
3244
3248
|
|
|
3245
3249
|
return function fetchUserData(_x) {
|
|
3246
|
-
return
|
|
3250
|
+
return _ref7.apply(this, arguments);
|
|
3247
3251
|
};
|
|
3248
3252
|
}();
|
|
3249
3253
|
|
|
@@ -3253,13 +3257,13 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref3) {
|
|
|
3253
3257
|
}, [access_token, isLoggedIn]);
|
|
3254
3258
|
React.useEffect(function () {
|
|
3255
3259
|
var collectPaymentData = /*#__PURE__*/function () {
|
|
3256
|
-
var
|
|
3260
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5() {
|
|
3257
3261
|
var checkoutBody, res;
|
|
3258
3262
|
return runtime_1.wrap(function _callee5$(_context5) {
|
|
3259
3263
|
while (1) {
|
|
3260
3264
|
switch (_context5.prev = _context5.next) {
|
|
3261
3265
|
case 0:
|
|
3262
|
-
if (!(skipPage && !_isEmpty(ticketsQuantity) && !showDOB && !loading)) {
|
|
3266
|
+
if (!(skipPage && !_isEmpty(ticketsQuantity) && !showDOB && !loading && !isNewUser)) {
|
|
3263
3267
|
_context5.next = 18;
|
|
3264
3268
|
break;
|
|
3265
3269
|
}
|
|
@@ -3304,7 +3308,7 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref3) {
|
|
|
3304
3308
|
}));
|
|
3305
3309
|
|
|
3306
3310
|
return function collectPaymentData() {
|
|
3307
|
-
return
|
|
3311
|
+
return _ref8.apply(this, arguments);
|
|
3308
3312
|
};
|
|
3309
3313
|
}();
|
|
3310
3314
|
|
|
@@ -3428,17 +3432,18 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref3) {
|
|
|
3428
3432
|
accessToken = _get(resRegister, 'data.data.attributes.access_token');
|
|
3429
3433
|
refreshToken = _get(resRegister, 'data.data.attributes.refresh_token');
|
|
3430
3434
|
userProfile = _get(resRegister, 'data.data.attributes.user_profile');
|
|
3435
|
+
setIsNewUser(true);
|
|
3431
3436
|
onRegisterSuccess({
|
|
3432
3437
|
xtfCookie: _xtfCookie,
|
|
3433
3438
|
accessToken: accessToken,
|
|
3434
3439
|
refreshToken: refreshToken,
|
|
3435
3440
|
userProfile: userProfile
|
|
3436
3441
|
});
|
|
3437
|
-
_context6.next =
|
|
3442
|
+
_context6.next = 37;
|
|
3438
3443
|
break;
|
|
3439
3444
|
|
|
3440
|
-
case
|
|
3441
|
-
_context6.prev =
|
|
3445
|
+
case 32:
|
|
3446
|
+
_context6.prev = 32;
|
|
3442
3447
|
_context6.t0 = _context6["catch"](19);
|
|
3443
3448
|
setLoading(false);
|
|
3444
3449
|
|
|
@@ -3469,11 +3474,11 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref3) {
|
|
|
3469
3474
|
|
|
3470
3475
|
return _context6.abrupt("return");
|
|
3471
3476
|
|
|
3472
|
-
case
|
|
3473
|
-
_context6.next =
|
|
3477
|
+
case 37:
|
|
3478
|
+
_context6.next = 39;
|
|
3474
3479
|
return getProfileData();
|
|
3475
3480
|
|
|
3476
|
-
case
|
|
3481
|
+
case 39:
|
|
3477
3482
|
profileData = _context6.sent;
|
|
3478
3483
|
profileSpecifiedData = _get(profileData, 'data.data');
|
|
3479
3484
|
profileDataObj = setLoggedUserData$1(profileSpecifiedData);
|
|
@@ -3488,18 +3493,18 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref3) {
|
|
|
3488
3493
|
addAddOnsInAttributes(checkoutBody);
|
|
3489
3494
|
}
|
|
3490
3495
|
|
|
3491
|
-
_context6.next =
|
|
3496
|
+
_context6.next = 47;
|
|
3492
3497
|
return postOnCheckout(checkoutBody);
|
|
3493
3498
|
|
|
3494
|
-
case
|
|
3499
|
+
case 47:
|
|
3495
3500
|
res = _context6.sent;
|
|
3496
3501
|
removeReferralKey();
|
|
3497
3502
|
handleSubmit(values, formikHelpers, eventId, res);
|
|
3498
|
-
_context6.next =
|
|
3503
|
+
_context6.next = 56;
|
|
3499
3504
|
break;
|
|
3500
3505
|
|
|
3501
|
-
case
|
|
3502
|
-
_context6.prev =
|
|
3506
|
+
case 52:
|
|
3507
|
+
_context6.prev = 52;
|
|
3503
3508
|
_context6.t1 = _context6["catch"](0);
|
|
3504
3509
|
setLoading(false);
|
|
3505
3510
|
|
|
@@ -3526,17 +3531,17 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref3) {
|
|
|
3526
3531
|
onSubmitError(_context6.t1);
|
|
3527
3532
|
}
|
|
3528
3533
|
|
|
3529
|
-
case
|
|
3530
|
-
_context6.prev =
|
|
3534
|
+
case 56:
|
|
3535
|
+
_context6.prev = 56;
|
|
3531
3536
|
setLoading(false);
|
|
3532
|
-
return _context6.finish(
|
|
3537
|
+
return _context6.finish(56);
|
|
3533
3538
|
|
|
3534
|
-
case
|
|
3539
|
+
case 59:
|
|
3535
3540
|
case "end":
|
|
3536
3541
|
return _context6.stop();
|
|
3537
3542
|
}
|
|
3538
3543
|
}
|
|
3539
|
-
}, _callee6, null, [[0,
|
|
3544
|
+
}, _callee6, null, [[0, 52, 56, 59], [19, 32]]);
|
|
3540
3545
|
}));
|
|
3541
3546
|
|
|
3542
3547
|
function onSubmit(_x2, _x3) {
|