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.
- package/dist/tf-checkout-react.cjs.development.js +62 -66
- 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 +62 -66
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/billing-info-container/index.tsx +12 -15
|
@@ -1790,55 +1790,50 @@ var LogicRunner = function LogicRunner(_ref) {
|
|
|
1790
1790
|
return null;
|
|
1791
1791
|
};
|
|
1792
1792
|
|
|
1793
|
-
var
|
|
1794
|
-
var
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
var BillingInfoContainer = function BillingInfoContainer(_ref4) {
|
|
1799
|
-
var _ref4$data = _ref4.data,
|
|
1800
|
-
data = _ref4$data === void 0 ? [] : _ref4$data,
|
|
1801
|
-
_ref4$ticketHoldersFi = _ref4.ticketHoldersFields,
|
|
1802
|
-
ticketHoldersFields = _ref4$ticketHoldersFi === void 0 ? {
|
|
1793
|
+
var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
1794
|
+
var _ref3$data = _ref3.data,
|
|
1795
|
+
data = _ref3$data === void 0 ? [] : _ref3$data,
|
|
1796
|
+
_ref3$ticketHoldersFi = _ref3.ticketHoldersFields,
|
|
1797
|
+
ticketHoldersFields = _ref3$ticketHoldersFi === void 0 ? {
|
|
1803
1798
|
id: 1,
|
|
1804
1799
|
fields: []
|
|
1805
|
-
} :
|
|
1806
|
-
|
|
1807
|
-
initialValues =
|
|
1808
|
-
|
|
1809
|
-
buttonName =
|
|
1810
|
-
|
|
1811
|
-
handleSubmit =
|
|
1812
|
-
|
|
1813
|
-
theme =
|
|
1814
|
-
|
|
1815
|
-
onRegisterSuccess =
|
|
1816
|
-
|
|
1817
|
-
onRegisterError =
|
|
1818
|
-
|
|
1819
|
-
onSubmitError =
|
|
1820
|
-
|
|
1821
|
-
onGetCartSuccess =
|
|
1822
|
-
|
|
1823
|
-
onGetCartError =
|
|
1824
|
-
|
|
1825
|
-
onGetCountriesSuccess =
|
|
1826
|
-
|
|
1827
|
-
onGetCountriesError =
|
|
1828
|
-
|
|
1829
|
-
onGetStatesSuccess =
|
|
1830
|
-
|
|
1831
|
-
onGetStatesError =
|
|
1832
|
-
|
|
1833
|
-
onGetProfileDataSuccess =
|
|
1834
|
-
|
|
1835
|
-
onGetProfileDataError =
|
|
1836
|
-
|
|
1837
|
-
onAuthorizeSuccess =
|
|
1838
|
-
|
|
1839
|
-
onAuthorizeError =
|
|
1840
|
-
|
|
1841
|
-
onLogin =
|
|
1800
|
+
} : _ref3$ticketHoldersFi,
|
|
1801
|
+
_ref3$initialValues = _ref3.initialValues,
|
|
1802
|
+
initialValues = _ref3$initialValues === void 0 ? {} : _ref3$initialValues,
|
|
1803
|
+
_ref3$buttonName = _ref3.buttonName,
|
|
1804
|
+
buttonName = _ref3$buttonName === void 0 ? 'Submit' : _ref3$buttonName,
|
|
1805
|
+
_ref3$handleSubmit = _ref3.handleSubmit,
|
|
1806
|
+
handleSubmit = _ref3$handleSubmit === void 0 ? _identity : _ref3$handleSubmit,
|
|
1807
|
+
_ref3$theme = _ref3.theme,
|
|
1808
|
+
theme = _ref3$theme === void 0 ? 'light' : _ref3$theme,
|
|
1809
|
+
_ref3$onRegisterSucce = _ref3.onRegisterSuccess,
|
|
1810
|
+
onRegisterSuccess = _ref3$onRegisterSucce === void 0 ? function () {} : _ref3$onRegisterSucce,
|
|
1811
|
+
_ref3$onRegisterError = _ref3.onRegisterError,
|
|
1812
|
+
onRegisterError = _ref3$onRegisterError === void 0 ? function () {} : _ref3$onRegisterError,
|
|
1813
|
+
_ref3$onSubmitError = _ref3.onSubmitError,
|
|
1814
|
+
onSubmitError = _ref3$onSubmitError === void 0 ? function () {} : _ref3$onSubmitError,
|
|
1815
|
+
_ref3$onGetCartSucces = _ref3.onGetCartSuccess,
|
|
1816
|
+
onGetCartSuccess = _ref3$onGetCartSucces === void 0 ? function () {} : _ref3$onGetCartSucces,
|
|
1817
|
+
_ref3$onGetCartError = _ref3.onGetCartError,
|
|
1818
|
+
onGetCartError = _ref3$onGetCartError === void 0 ? function () {} : _ref3$onGetCartError,
|
|
1819
|
+
_ref3$onGetCountriesS = _ref3.onGetCountriesSuccess,
|
|
1820
|
+
onGetCountriesSuccess = _ref3$onGetCountriesS === void 0 ? function () {} : _ref3$onGetCountriesS,
|
|
1821
|
+
_ref3$onGetCountriesE = _ref3.onGetCountriesError,
|
|
1822
|
+
onGetCountriesError = _ref3$onGetCountriesE === void 0 ? function () {} : _ref3$onGetCountriesE,
|
|
1823
|
+
_ref3$onGetStatesSucc = _ref3.onGetStatesSuccess,
|
|
1824
|
+
onGetStatesSuccess = _ref3$onGetStatesSucc === void 0 ? function () {} : _ref3$onGetStatesSucc,
|
|
1825
|
+
_ref3$onGetStatesErro = _ref3.onGetStatesError,
|
|
1826
|
+
onGetStatesError = _ref3$onGetStatesErro === void 0 ? function () {} : _ref3$onGetStatesErro,
|
|
1827
|
+
_ref3$onGetProfileDat = _ref3.onGetProfileDataSuccess,
|
|
1828
|
+
onGetProfileDataSuccess = _ref3$onGetProfileDat === void 0 ? function () {} : _ref3$onGetProfileDat,
|
|
1829
|
+
_ref3$onGetProfileDat2 = _ref3.onGetProfileDataError,
|
|
1830
|
+
onGetProfileDataError = _ref3$onGetProfileDat2 === void 0 ? function () {} : _ref3$onGetProfileDat2,
|
|
1831
|
+
_ref3$onAuthorizeSucc = _ref3.onAuthorizeSuccess,
|
|
1832
|
+
onAuthorizeSuccess = _ref3$onAuthorizeSucc === void 0 ? function () {} : _ref3$onAuthorizeSucc,
|
|
1833
|
+
_ref3$onAuthorizeErro = _ref3.onAuthorizeError,
|
|
1834
|
+
onAuthorizeError = _ref3$onAuthorizeErro === void 0 ? function () {} : _ref3$onAuthorizeErro,
|
|
1835
|
+
_ref3$onLogin = _ref3.onLogin,
|
|
1836
|
+
onLogin = _ref3$onLogin === void 0 ? function () {} : _ref3$onLogin;
|
|
1842
1837
|
var userData = typeof window !== 'undefined' && window.localStorage.getItem('user_data') ? JSON.parse(window.localStorage.getItem('user_data') || '') : {};
|
|
1843
1838
|
var access_token = typeof window !== 'undefined' && window.localStorage.getItem('access_token') ? window.localStorage.getItem('access_token') || '' : '';
|
|
1844
1839
|
|
|
@@ -1924,7 +1919,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
|
|
|
1924
1919
|
React.useEffect(function () {
|
|
1925
1920
|
// fetch countries data
|
|
1926
1921
|
var fetchCountries = /*#__PURE__*/function () {
|
|
1927
|
-
var
|
|
1922
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2() {
|
|
1928
1923
|
var res;
|
|
1929
1924
|
return runtime_1.wrap(function _callee2$(_context2) {
|
|
1930
1925
|
while (1) {
|
|
@@ -1964,7 +1959,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
|
|
|
1964
1959
|
}));
|
|
1965
1960
|
|
|
1966
1961
|
return function fetchCountries() {
|
|
1967
|
-
return
|
|
1962
|
+
return _ref4.apply(this, arguments);
|
|
1968
1963
|
};
|
|
1969
1964
|
}();
|
|
1970
1965
|
|
|
@@ -1973,7 +1968,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
|
|
|
1973
1968
|
}, []); // fetch cart data
|
|
1974
1969
|
|
|
1975
1970
|
var fetchCart = /*#__PURE__*/function () {
|
|
1976
|
-
var
|
|
1971
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3() {
|
|
1977
1972
|
var res, cartInfo, _cartInfo$cart, cart;
|
|
1978
1973
|
|
|
1979
1974
|
return runtime_1.wrap(function _callee3$(_context3) {
|
|
@@ -2014,13 +2009,13 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
|
|
|
2014
2009
|
}));
|
|
2015
2010
|
|
|
2016
2011
|
return function fetchCart() {
|
|
2017
|
-
return
|
|
2012
|
+
return _ref5.apply(this, arguments);
|
|
2018
2013
|
};
|
|
2019
2014
|
}(); // fetch user data
|
|
2020
2015
|
|
|
2021
2016
|
|
|
2022
2017
|
var fetchUserData = /*#__PURE__*/function () {
|
|
2023
|
-
var
|
|
2018
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(token) {
|
|
2024
2019
|
var userDataResponse, profileSpecifiedData, profileDataObj;
|
|
2025
2020
|
return runtime_1.wrap(function _callee4$(_context4) {
|
|
2026
2021
|
while (1) {
|
|
@@ -2065,7 +2060,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
|
|
|
2065
2060
|
}));
|
|
2066
2061
|
|
|
2067
2062
|
return function fetchUserData(_x) {
|
|
2068
|
-
return
|
|
2063
|
+
return _ref6.apply(this, arguments);
|
|
2069
2064
|
};
|
|
2070
2065
|
}();
|
|
2071
2066
|
|
|
@@ -2256,8 +2251,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
|
|
|
2256
2251
|
setShowModalLogin(true);
|
|
2257
2252
|
}
|
|
2258
2253
|
}, "Login"))), _map(data, function (item) {
|
|
2259
|
-
var
|
|
2260
|
-
label = item.label,
|
|
2254
|
+
var label = item.label,
|
|
2261
2255
|
labelClassName = item.labelClassName,
|
|
2262
2256
|
fields = item.fields;
|
|
2263
2257
|
|
|
@@ -2265,8 +2259,8 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
|
|
|
2265
2259
|
return null;
|
|
2266
2260
|
}
|
|
2267
2261
|
|
|
2268
|
-
return React__default.createElement(
|
|
2269
|
-
key:
|
|
2262
|
+
return React__default.createElement(React__default.Fragment, {
|
|
2263
|
+
key: nanoid.nanoid()
|
|
2270
2264
|
}, React__default.createElement("p", {
|
|
2271
2265
|
className: labelClassName
|
|
2272
2266
|
}, label), _map(fields, function (group) {
|
|
@@ -2274,8 +2268,8 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
|
|
|
2274
2268
|
groupItems = group.groupItems,
|
|
2275
2269
|
groupLabel = group.groupLabel,
|
|
2276
2270
|
groupLabelClassName = group.groupLabelClassName;
|
|
2277
|
-
return React__default.createElement(
|
|
2278
|
-
key:
|
|
2271
|
+
return React__default.createElement(React__default.Fragment, {
|
|
2272
|
+
key: nanoid.nanoid()
|
|
2279
2273
|
}, !isLoggedIn && React__default.createElement("div", {
|
|
2280
2274
|
className: groupLabelClassName
|
|
2281
2275
|
}, groupLabel), React__default.createElement("div", {
|
|
@@ -2300,7 +2294,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
|
|
|
2300
2294
|
return true;
|
|
2301
2295
|
}), function (element) {
|
|
2302
2296
|
return ['password', 'confirmPassword'].includes(element.name) && isLoggedIn ? null : React__default.createElement(React__default.Fragment, {
|
|
2303
|
-
key:
|
|
2297
|
+
key: nanoid.nanoid()
|
|
2304
2298
|
}, element.name === 'email' ? React__default.createElement("div", {
|
|
2305
2299
|
className: "email-checking"
|
|
2306
2300
|
}, "IMPORTANT: Please double check that your email address is correct. It's where we send your confirmation and e-tickets to!") : null, React__default.createElement("div", {
|
|
@@ -2316,25 +2310,26 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
|
|
|
2316
2310
|
})));
|
|
2317
2311
|
})));
|
|
2318
2312
|
}));
|
|
2319
|
-
}), showTicketHolderName && React__default.createElement(
|
|
2313
|
+
}), showTicketHolderName && React__default.createElement(React__default.Fragment, {
|
|
2314
|
+
key: nanoid.nanoid()
|
|
2315
|
+
}, React__default.createElement("div", {
|
|
2320
2316
|
className: "ticket-holders-fields"
|
|
2321
2317
|
}, React__default.createElement("p", null, ticketHoldersFields.label), _map(ticketsQuantity, function (_item, index) {
|
|
2322
2318
|
return React__default.createElement("div", {
|
|
2323
|
-
key:
|
|
2319
|
+
key: nanoid.nanoid()
|
|
2324
2320
|
}, React__default.createElement("h5", null, "Ticket ", index + 1), _map(ticketHoldersFields.fields, function (group) {
|
|
2325
2321
|
var groupClassname = group.groupClassname,
|
|
2326
2322
|
groupItems = group.groupItems;
|
|
2327
2323
|
return React__default.createElement("div", {
|
|
2328
|
-
key:
|
|
2324
|
+
key: nanoid.nanoid()
|
|
2329
2325
|
}, React__default.createElement("div", {
|
|
2330
2326
|
className: groupClassname
|
|
2331
2327
|
}, _map(groupItems, function (element) {
|
|
2332
2328
|
return React__default.createElement("div", {
|
|
2333
2329
|
className: element.className,
|
|
2334
|
-
key:
|
|
2330
|
+
key: nanoid.nanoid()
|
|
2335
2331
|
}, React__default.createElement(formik.Field, {
|
|
2336
2332
|
name: element.name + "-" + index,
|
|
2337
|
-
key: element.name + "-" + index,
|
|
2338
2333
|
label: element.label,
|
|
2339
2334
|
type: element.type,
|
|
2340
2335
|
required: true,
|
|
@@ -2344,7 +2339,8 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
|
|
|
2344
2339
|
})));
|
|
2345
2340
|
}));
|
|
2346
2341
|
}))), React__default.createElement("div", {
|
|
2347
|
-
className: "button-container"
|
|
2342
|
+
className: "button-container",
|
|
2343
|
+
key: nanoid.nanoid()
|
|
2348
2344
|
}, React__default.createElement(LoadingButton, {
|
|
2349
2345
|
type: "submit",
|
|
2350
2346
|
variant: "contained",
|