tf-checkout-react 1.0.49 → 1.0.50

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.
@@ -1819,55 +1819,50 @@ var LogicRunner = function LogicRunner(_ref) {
1819
1819
  return null;
1820
1820
  };
1821
1821
 
1822
- var SectionContainer = function SectionContainer(_ref3) {
1823
- var children = _ref3.children;
1824
- return React.createElement(React.Fragment, null, children);
1825
- };
1826
-
1827
- var BillingInfoContainer = function BillingInfoContainer(_ref4) {
1828
- var _ref4$data = _ref4.data,
1829
- data = _ref4$data === void 0 ? [] : _ref4$data,
1830
- _ref4$ticketHoldersFi = _ref4.ticketHoldersFields,
1831
- ticketHoldersFields = _ref4$ticketHoldersFi === void 0 ? {
1822
+ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
1823
+ var _ref3$data = _ref3.data,
1824
+ data = _ref3$data === void 0 ? [] : _ref3$data,
1825
+ _ref3$ticketHoldersFi = _ref3.ticketHoldersFields,
1826
+ ticketHoldersFields = _ref3$ticketHoldersFi === void 0 ? {
1832
1827
  id: 1,
1833
1828
  fields: []
1834
- } : _ref4$ticketHoldersFi,
1835
- _ref4$initialValues = _ref4.initialValues,
1836
- initialValues = _ref4$initialValues === void 0 ? {} : _ref4$initialValues,
1837
- _ref4$buttonName = _ref4.buttonName,
1838
- buttonName = _ref4$buttonName === void 0 ? 'Submit' : _ref4$buttonName,
1839
- _ref4$handleSubmit = _ref4.handleSubmit,
1840
- handleSubmit = _ref4$handleSubmit === void 0 ? _identity : _ref4$handleSubmit,
1841
- _ref4$theme = _ref4.theme,
1842
- theme = _ref4$theme === void 0 ? 'light' : _ref4$theme,
1843
- _ref4$onRegisterSucce = _ref4.onRegisterSuccess,
1844
- onRegisterSuccess = _ref4$onRegisterSucce === void 0 ? function () {} : _ref4$onRegisterSucce,
1845
- _ref4$onRegisterError = _ref4.onRegisterError,
1846
- onRegisterError = _ref4$onRegisterError === void 0 ? function () {} : _ref4$onRegisterError,
1847
- _ref4$onSubmitError = _ref4.onSubmitError,
1848
- onSubmitError = _ref4$onSubmitError === void 0 ? function () {} : _ref4$onSubmitError,
1849
- _ref4$onGetCartSucces = _ref4.onGetCartSuccess,
1850
- onGetCartSuccess = _ref4$onGetCartSucces === void 0 ? function () {} : _ref4$onGetCartSucces,
1851
- _ref4$onGetCartError = _ref4.onGetCartError,
1852
- onGetCartError = _ref4$onGetCartError === void 0 ? function () {} : _ref4$onGetCartError,
1853
- _ref4$onGetCountriesS = _ref4.onGetCountriesSuccess,
1854
- onGetCountriesSuccess = _ref4$onGetCountriesS === void 0 ? function () {} : _ref4$onGetCountriesS,
1855
- _ref4$onGetCountriesE = _ref4.onGetCountriesError,
1856
- onGetCountriesError = _ref4$onGetCountriesE === void 0 ? function () {} : _ref4$onGetCountriesE,
1857
- _ref4$onGetStatesSucc = _ref4.onGetStatesSuccess,
1858
- onGetStatesSuccess = _ref4$onGetStatesSucc === void 0 ? function () {} : _ref4$onGetStatesSucc,
1859
- _ref4$onGetStatesErro = _ref4.onGetStatesError,
1860
- onGetStatesError = _ref4$onGetStatesErro === void 0 ? function () {} : _ref4$onGetStatesErro,
1861
- _ref4$onGetProfileDat = _ref4.onGetProfileDataSuccess,
1862
- onGetProfileDataSuccess = _ref4$onGetProfileDat === void 0 ? function () {} : _ref4$onGetProfileDat,
1863
- _ref4$onGetProfileDat2 = _ref4.onGetProfileDataError,
1864
- onGetProfileDataError = _ref4$onGetProfileDat2 === void 0 ? function () {} : _ref4$onGetProfileDat2,
1865
- _ref4$onAuthorizeSucc = _ref4.onAuthorizeSuccess,
1866
- onAuthorizeSuccess = _ref4$onAuthorizeSucc === void 0 ? function () {} : _ref4$onAuthorizeSucc,
1867
- _ref4$onAuthorizeErro = _ref4.onAuthorizeError,
1868
- onAuthorizeError = _ref4$onAuthorizeErro === void 0 ? function () {} : _ref4$onAuthorizeErro,
1869
- _ref4$onLogin = _ref4.onLogin,
1870
- onLogin = _ref4$onLogin === void 0 ? function () {} : _ref4$onLogin;
1829
+ } : _ref3$ticketHoldersFi,
1830
+ _ref3$initialValues = _ref3.initialValues,
1831
+ initialValues = _ref3$initialValues === void 0 ? {} : _ref3$initialValues,
1832
+ _ref3$buttonName = _ref3.buttonName,
1833
+ buttonName = _ref3$buttonName === void 0 ? 'Submit' : _ref3$buttonName,
1834
+ _ref3$handleSubmit = _ref3.handleSubmit,
1835
+ handleSubmit = _ref3$handleSubmit === void 0 ? _identity : _ref3$handleSubmit,
1836
+ _ref3$theme = _ref3.theme,
1837
+ theme = _ref3$theme === void 0 ? 'light' : _ref3$theme,
1838
+ _ref3$onRegisterSucce = _ref3.onRegisterSuccess,
1839
+ onRegisterSuccess = _ref3$onRegisterSucce === void 0 ? function () {} : _ref3$onRegisterSucce,
1840
+ _ref3$onRegisterError = _ref3.onRegisterError,
1841
+ onRegisterError = _ref3$onRegisterError === void 0 ? function () {} : _ref3$onRegisterError,
1842
+ _ref3$onSubmitError = _ref3.onSubmitError,
1843
+ onSubmitError = _ref3$onSubmitError === void 0 ? function () {} : _ref3$onSubmitError,
1844
+ _ref3$onGetCartSucces = _ref3.onGetCartSuccess,
1845
+ onGetCartSuccess = _ref3$onGetCartSucces === void 0 ? function () {} : _ref3$onGetCartSucces,
1846
+ _ref3$onGetCartError = _ref3.onGetCartError,
1847
+ onGetCartError = _ref3$onGetCartError === void 0 ? function () {} : _ref3$onGetCartError,
1848
+ _ref3$onGetCountriesS = _ref3.onGetCountriesSuccess,
1849
+ onGetCountriesSuccess = _ref3$onGetCountriesS === void 0 ? function () {} : _ref3$onGetCountriesS,
1850
+ _ref3$onGetCountriesE = _ref3.onGetCountriesError,
1851
+ onGetCountriesError = _ref3$onGetCountriesE === void 0 ? function () {} : _ref3$onGetCountriesE,
1852
+ _ref3$onGetStatesSucc = _ref3.onGetStatesSuccess,
1853
+ onGetStatesSuccess = _ref3$onGetStatesSucc === void 0 ? function () {} : _ref3$onGetStatesSucc,
1854
+ _ref3$onGetStatesErro = _ref3.onGetStatesError,
1855
+ onGetStatesError = _ref3$onGetStatesErro === void 0 ? function () {} : _ref3$onGetStatesErro,
1856
+ _ref3$onGetProfileDat = _ref3.onGetProfileDataSuccess,
1857
+ onGetProfileDataSuccess = _ref3$onGetProfileDat === void 0 ? function () {} : _ref3$onGetProfileDat,
1858
+ _ref3$onGetProfileDat2 = _ref3.onGetProfileDataError,
1859
+ onGetProfileDataError = _ref3$onGetProfileDat2 === void 0 ? function () {} : _ref3$onGetProfileDat2,
1860
+ _ref3$onAuthorizeSucc = _ref3.onAuthorizeSuccess,
1861
+ onAuthorizeSuccess = _ref3$onAuthorizeSucc === void 0 ? function () {} : _ref3$onAuthorizeSucc,
1862
+ _ref3$onAuthorizeErro = _ref3.onAuthorizeError,
1863
+ onAuthorizeError = _ref3$onAuthorizeErro === void 0 ? function () {} : _ref3$onAuthorizeErro,
1864
+ _ref3$onLogin = _ref3.onLogin,
1865
+ onLogin = _ref3$onLogin === void 0 ? function () {} : _ref3$onLogin;
1871
1866
  var userData = typeof window !== 'undefined' && window.localStorage.getItem('user_data') ? JSON.parse(window.localStorage.getItem('user_data') || '') : {};
1872
1867
  var access_token = typeof window !== 'undefined' && window.localStorage.getItem('access_token') ? window.localStorage.getItem('access_token') || '' : '';
1873
1868
 
@@ -1953,7 +1948,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
1953
1948
  useEffect(function () {
1954
1949
  // fetch countries data
1955
1950
  var fetchCountries = /*#__PURE__*/function () {
1956
- var _ref5 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2() {
1951
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2() {
1957
1952
  var res;
1958
1953
  return runtime_1.wrap(function _callee2$(_context2) {
1959
1954
  while (1) {
@@ -1993,7 +1988,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
1993
1988
  }));
1994
1989
 
1995
1990
  return function fetchCountries() {
1996
- return _ref5.apply(this, arguments);
1991
+ return _ref4.apply(this, arguments);
1997
1992
  };
1998
1993
  }();
1999
1994
 
@@ -2002,7 +1997,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
2002
1997
  }, []); // fetch cart data
2003
1998
 
2004
1999
  var fetchCart = /*#__PURE__*/function () {
2005
- var _ref6 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3() {
2000
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3() {
2006
2001
  var res, cartInfo, _cartInfo$cart, cart;
2007
2002
 
2008
2003
  return runtime_1.wrap(function _callee3$(_context3) {
@@ -2043,13 +2038,13 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
2043
2038
  }));
2044
2039
 
2045
2040
  return function fetchCart() {
2046
- return _ref6.apply(this, arguments);
2041
+ return _ref5.apply(this, arguments);
2047
2042
  };
2048
2043
  }(); // fetch user data
2049
2044
 
2050
2045
 
2051
2046
  var fetchUserData = /*#__PURE__*/function () {
2052
- var _ref7 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(token) {
2047
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(token) {
2053
2048
  var userDataResponse, profileSpecifiedData, profileDataObj;
2054
2049
  return runtime_1.wrap(function _callee4$(_context4) {
2055
2050
  while (1) {
@@ -2094,7 +2089,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
2094
2089
  }));
2095
2090
 
2096
2091
  return function fetchUserData(_x) {
2097
- return _ref7.apply(this, arguments);
2092
+ return _ref6.apply(this, arguments);
2098
2093
  };
2099
2094
  }();
2100
2095
 
@@ -2285,8 +2280,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
2285
2280
  setShowModalLogin(true);
2286
2281
  }
2287
2282
  }, "Login"))), _map(data, function (item) {
2288
- var id = item.id,
2289
- label = item.label,
2283
+ var label = item.label,
2290
2284
  labelClassName = item.labelClassName,
2291
2285
  fields = item.fields;
2292
2286
 
@@ -2294,8 +2288,8 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
2294
2288
  return null;
2295
2289
  }
2296
2290
 
2297
- return React.createElement(SectionContainer, {
2298
- key: id
2291
+ return React.createElement(React.Fragment, {
2292
+ key: nanoid()
2299
2293
  }, React.createElement("p", {
2300
2294
  className: labelClassName
2301
2295
  }, label), _map(fields, function (group) {
@@ -2303,8 +2297,8 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
2303
2297
  groupItems = group.groupItems,
2304
2298
  groupLabel = group.groupLabel,
2305
2299
  groupLabelClassName = group.groupLabelClassName;
2306
- return React.createElement(SectionContainer, {
2307
- key: group.id
2300
+ return React.createElement(React.Fragment, {
2301
+ key: nanoid()
2308
2302
  }, !isLoggedIn && React.createElement("div", {
2309
2303
  className: groupLabelClassName
2310
2304
  }, groupLabel), React.createElement("div", {
@@ -2329,7 +2323,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
2329
2323
  return true;
2330
2324
  }), function (element) {
2331
2325
  return ['password', 'confirmPassword'].includes(element.name) && isLoggedIn ? null : React.createElement(React.Fragment, {
2332
- key: element.name
2326
+ key: nanoid()
2333
2327
  }, element.name === 'email' ? React.createElement("div", {
2334
2328
  className: "email-checking"
2335
2329
  }, "IMPORTANT: Please double check that your email address is correct. It's where we send your confirmation and e-tickets to!") : null, React.createElement("div", {
@@ -2345,25 +2339,26 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
2345
2339
  })));
2346
2340
  })));
2347
2341
  }));
2348
- }), showTicketHolderName && React.createElement(SectionContainer, null, React.createElement("div", {
2342
+ }), showTicketHolderName && React.createElement(React.Fragment, {
2343
+ key: nanoid()
2344
+ }, React.createElement("div", {
2349
2345
  className: "ticket-holders-fields"
2350
2346
  }, React.createElement("p", null, ticketHoldersFields.label), _map(ticketsQuantity, function (_item, index) {
2351
2347
  return React.createElement("div", {
2352
- key: _item
2348
+ key: nanoid()
2353
2349
  }, React.createElement("h5", null, "Ticket ", index + 1), _map(ticketHoldersFields.fields, function (group) {
2354
2350
  var groupClassname = group.groupClassname,
2355
2351
  groupItems = group.groupItems;
2356
2352
  return React.createElement("div", {
2357
- key: group.id
2353
+ key: nanoid()
2358
2354
  }, React.createElement("div", {
2359
2355
  className: groupClassname
2360
2356
  }, _map(groupItems, function (element) {
2361
2357
  return React.createElement("div", {
2362
2358
  className: element.className,
2363
- key: element.name + "-" + index
2359
+ key: nanoid()
2364
2360
  }, React.createElement(Field, {
2365
2361
  name: element.name + "-" + index,
2366
- key: element.name + "-" + index,
2367
2362
  label: element.label,
2368
2363
  type: element.type,
2369
2364
  required: true,
@@ -2373,7 +2368,8 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
2373
2368
  })));
2374
2369
  }));
2375
2370
  }))), React.createElement("div", {
2376
- className: "button-container"
2371
+ className: "button-container",
2372
+ key: nanoid()
2377
2373
  }, React.createElement(LoadingButton, {
2378
2374
  type: "submit",
2379
2375
  variant: "contained",