tf-checkout-react 1.2.16 → 1.2.17

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.
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
2
1
  import './style.css';
3
2
  import { ThemeOptions } from '@mui/material';
4
3
  import { CSSProperties } from '@mui/styles';
5
4
  import { AxiosError } from 'axios';
6
5
  import { FormikHelpers, FormikValues } from 'formik';
6
+ import React from 'react';
7
7
  import { IBillingInfoData } from '../../types';
8
8
  export interface IBillingInfoPage {
9
9
  data?: IBillingInfoData[];
@@ -49,4 +49,4 @@ export interface IBillingInfoPage {
49
49
  showSignUpButton?: boolean;
50
50
  brandOptIn?: boolean;
51
51
  }
52
- export declare const BillingInfoContainer: ({ data, ticketHoldersFields, initialValues, buttonName, handleSubmit, theme, onRegisterSuccess, onRegisterError, onSubmitError, onGetCartSuccess, onGetCartError, onGetCountriesSuccess, onGetCountriesError, onGetStatesSuccess, onGetStatesError, onGetProfileDataSuccess, onGetProfileDataError, onAuthorizeSuccess, onAuthorizeError, onLogin, onLoginSuccess, isLoggedIn: pIsLoggedIn, accountInfoTitle, hideLogo, themeOptions, onErrorClose, hideErrorsAlertSection, onSkipBillingPage, skipPage, canSkipHolderNames, onForgotPasswordSuccess, onForgotPasswordError, shouldFetchCountries, onCountdownFinish, enableTimer, logo, showForgotPasswordButton, showSignUpButton, brandOptIn, }: IBillingInfoPage) => JSX.Element;
52
+ export declare const BillingInfoContainer: React.MemoExoticComponent<({ data, ticketHoldersFields, initialValues, buttonName, handleSubmit, theme, onRegisterSuccess, onRegisterError, onSubmitError, onGetCartSuccess, onGetCartError, onGetCountriesSuccess, onGetCountriesError, onGetStatesSuccess, onGetStatesError, onGetProfileDataSuccess, onGetProfileDataError, onAuthorizeSuccess, onAuthorizeError, onLogin, onLoginSuccess, isLoggedIn: pIsLoggedIn, accountInfoTitle, hideLogo, themeOptions, onErrorClose, hideErrorsAlertSection, onSkipBillingPage, skipPage, canSkipHolderNames, onForgotPasswordSuccess, onForgotPasswordError, shouldFetchCountries, onCountdownFinish, enableTimer, logo, showForgotPasswordButton, showSignUpButton, brandOptIn, }: IBillingInfoPage) => JSX.Element>;
@@ -2755,7 +2755,7 @@ var LogicRunner = function LogicRunner(_ref) {
2755
2755
  return null;
2756
2756
  };
2757
2757
 
2758
- var BillingInfoContainer = function BillingInfoContainer(_ref3) {
2758
+ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref3) {
2759
2759
  var _ref3$data = _ref3.data,
2760
2760
  data = _ref3$data === void 0 ? [] : _ref3$data,
2761
2761
  _ref3$ticketHoldersFi = _ref3.ticketHoldersFields,
@@ -2772,34 +2772,34 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
2772
2772
  _ref3$theme = _ref3.theme,
2773
2773
  theme = _ref3$theme === void 0 ? 'light' : _ref3$theme,
2774
2774
  _ref3$onRegisterSucce = _ref3.onRegisterSuccess,
2775
- onRegisterSuccess = _ref3$onRegisterSucce === void 0 ? function () {} : _ref3$onRegisterSucce,
2775
+ onRegisterSuccess = _ref3$onRegisterSucce === void 0 ? _identity : _ref3$onRegisterSucce,
2776
2776
  _ref3$onRegisterError = _ref3.onRegisterError,
2777
- onRegisterError = _ref3$onRegisterError === void 0 ? function () {} : _ref3$onRegisterError,
2777
+ onRegisterError = _ref3$onRegisterError === void 0 ? _identity : _ref3$onRegisterError,
2778
2778
  _ref3$onSubmitError = _ref3.onSubmitError,
2779
- onSubmitError = _ref3$onSubmitError === void 0 ? function () {} : _ref3$onSubmitError,
2779
+ onSubmitError = _ref3$onSubmitError === void 0 ? _identity : _ref3$onSubmitError,
2780
2780
  _ref3$onGetCartSucces = _ref3.onGetCartSuccess,
2781
- onGetCartSuccess = _ref3$onGetCartSucces === void 0 ? function () {} : _ref3$onGetCartSucces,
2781
+ onGetCartSuccess = _ref3$onGetCartSucces === void 0 ? _identity : _ref3$onGetCartSucces,
2782
2782
  _ref3$onGetCartError = _ref3.onGetCartError,
2783
- onGetCartError = _ref3$onGetCartError === void 0 ? function () {} : _ref3$onGetCartError,
2783
+ onGetCartError = _ref3$onGetCartError === void 0 ? _identity : _ref3$onGetCartError,
2784
2784
  _ref3$onGetCountriesS = _ref3.onGetCountriesSuccess,
2785
- onGetCountriesSuccess = _ref3$onGetCountriesS === void 0 ? function () {} : _ref3$onGetCountriesS,
2785
+ onGetCountriesSuccess = _ref3$onGetCountriesS === void 0 ? _identity : _ref3$onGetCountriesS,
2786
2786
  _ref3$onGetCountriesE = _ref3.onGetCountriesError,
2787
- onGetCountriesError = _ref3$onGetCountriesE === void 0 ? function () {} : _ref3$onGetCountriesE,
2787
+ onGetCountriesError = _ref3$onGetCountriesE === void 0 ? _identity : _ref3$onGetCountriesE,
2788
2788
  _ref3$onGetStatesSucc = _ref3.onGetStatesSuccess,
2789
- onGetStatesSuccess = _ref3$onGetStatesSucc === void 0 ? function () {} : _ref3$onGetStatesSucc,
2789
+ onGetStatesSuccess = _ref3$onGetStatesSucc === void 0 ? _identity : _ref3$onGetStatesSucc,
2790
2790
  _ref3$onGetStatesErro = _ref3.onGetStatesError,
2791
- onGetStatesError = _ref3$onGetStatesErro === void 0 ? function () {} : _ref3$onGetStatesErro,
2791
+ onGetStatesError = _ref3$onGetStatesErro === void 0 ? _identity : _ref3$onGetStatesErro,
2792
2792
  _ref3$onGetProfileDat = _ref3.onGetProfileDataSuccess,
2793
- _onGetProfileDataSuccess = _ref3$onGetProfileDat === void 0 ? function () {} : _ref3$onGetProfileDat,
2793
+ _onGetProfileDataSuccess = _ref3$onGetProfileDat === void 0 ? _identity : _ref3$onGetProfileDat,
2794
2794
  _ref3$onGetProfileDat2 = _ref3.onGetProfileDataError,
2795
- onGetProfileDataError = _ref3$onGetProfileDat2 === void 0 ? function () {} : _ref3$onGetProfileDat2,
2795
+ onGetProfileDataError = _ref3$onGetProfileDat2 === void 0 ? _identity : _ref3$onGetProfileDat2,
2796
2796
  _ref3$onAuthorizeSucc = _ref3.onAuthorizeSuccess,
2797
- onAuthorizeSuccess = _ref3$onAuthorizeSucc === void 0 ? function () {} : _ref3$onAuthorizeSucc,
2797
+ onAuthorizeSuccess = _ref3$onAuthorizeSucc === void 0 ? _identity : _ref3$onAuthorizeSucc,
2798
2798
  _ref3$onAuthorizeErro = _ref3.onAuthorizeError,
2799
- onAuthorizeError = _ref3$onAuthorizeErro === void 0 ? function () {} : _ref3$onAuthorizeErro,
2799
+ onAuthorizeError = _ref3$onAuthorizeErro === void 0 ? _identity : _ref3$onAuthorizeErro,
2800
2800
  onLogin = _ref3.onLogin,
2801
2801
  _ref3$onLoginSuccess = _ref3.onLoginSuccess,
2802
- onLoginSuccess = _ref3$onLoginSuccess === void 0 ? function () {} : _ref3$onLoginSuccess,
2802
+ onLoginSuccess = _ref3$onLoginSuccess === void 0 ? _identity : _ref3$onLoginSuccess,
2803
2803
  _ref3$isLoggedIn = _ref3.isLoggedIn,
2804
2804
  pIsLoggedIn = _ref3$isLoggedIn === void 0 ? false : _ref3$isLoggedIn,
2805
2805
  _ref3$accountInfoTitl = _ref3.accountInfoTitle,
@@ -2807,23 +2807,23 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
2807
2807
  hideLogo = _ref3.hideLogo,
2808
2808
  themeOptions = _ref3.themeOptions,
2809
2809
  _ref3$onErrorClose = _ref3.onErrorClose,
2810
- onErrorClose = _ref3$onErrorClose === void 0 ? function () {} : _ref3$onErrorClose,
2810
+ onErrorClose = _ref3$onErrorClose === void 0 ? _identity : _ref3$onErrorClose,
2811
2811
  _ref3$hideErrorsAlert = _ref3.hideErrorsAlertSection,
2812
2812
  hideErrorsAlertSection = _ref3$hideErrorsAlert === void 0 ? false : _ref3$hideErrorsAlert,
2813
2813
  _ref3$onSkipBillingPa = _ref3.onSkipBillingPage,
2814
- onSkipBillingPage = _ref3$onSkipBillingPa === void 0 ? function () {} : _ref3$onSkipBillingPa,
2814
+ onSkipBillingPage = _ref3$onSkipBillingPa === void 0 ? _identity : _ref3$onSkipBillingPa,
2815
2815
  _ref3$skipPage = _ref3.skipPage,
2816
2816
  skipPage = _ref3$skipPage === void 0 ? false : _ref3$skipPage,
2817
2817
  _ref3$canSkipHolderNa = _ref3.canSkipHolderNames,
2818
2818
  canSkipHolderNames = _ref3$canSkipHolderNa === void 0 ? false : _ref3$canSkipHolderNa,
2819
2819
  _ref3$onForgotPasswor = _ref3.onForgotPasswordSuccess,
2820
- onForgotPasswordSuccess = _ref3$onForgotPasswor === void 0 ? function () {} : _ref3$onForgotPasswor,
2820
+ onForgotPasswordSuccess = _ref3$onForgotPasswor === void 0 ? _identity : _ref3$onForgotPasswor,
2821
2821
  _ref3$onForgotPasswor2 = _ref3.onForgotPasswordError,
2822
- onForgotPasswordError = _ref3$onForgotPasswor2 === void 0 ? function () {} : _ref3$onForgotPasswor2,
2822
+ onForgotPasswordError = _ref3$onForgotPasswor2 === void 0 ? _identity : _ref3$onForgotPasswor2,
2823
2823
  _ref3$shouldFetchCoun = _ref3.shouldFetchCountries,
2824
2824
  shouldFetchCountries = _ref3$shouldFetchCoun === void 0 ? true : _ref3$shouldFetchCoun,
2825
2825
  _ref3$onCountdownFini = _ref3.onCountdownFinish,
2826
- onCountdownFinish = _ref3$onCountdownFini === void 0 ? function () {} : _ref3$onCountdownFini,
2826
+ onCountdownFinish = _ref3$onCountdownFini === void 0 ? _identity : _ref3$onCountdownFini,
2827
2827
  _ref3$enableTimer = _ref3.enableTimer,
2828
2828
  enableTimer = _ref3$enableTimer === void 0 ? false : _ref3$enableTimer,
2829
2829
  logo = _ref3.logo,
@@ -3116,6 +3116,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
3116
3116
 
3117
3117
  React.useEffect(function () {
3118
3118
  fetchUserData(access_token);
3119
+ fetchCart();
3119
3120
  }, [access_token, isLoggedIn]);
3120
3121
  React.useEffect(function () {
3121
3122
  var collectPaymentData = /*#__PURE__*/function () {
@@ -3577,7 +3578,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
3577
3578
  onForgotPasswordSuccess: onForgotPasswordSuccess,
3578
3579
  onForgotPasswordError: onForgotPasswordError
3579
3580
  }));
3580
- };
3581
+ });
3581
3582
 
3582
3583
  var currencyNormalizerCreator = function currencyNormalizerCreator(value, currency) {
3583
3584
  return !value ? '' : "" + getCurrencySymbolByCurrency(currency) + value;