tf-checkout-react 1.0.53 → 1.0.57
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/components/billing-info-container/index.d.ts +3 -1
- package/dist/components/paymentContainer/index.d.ts +3 -1
- package/dist/tf-checkout-react.cjs.development.css +1 -1
- package/dist/tf-checkout-react.cjs.development.js +123 -72
- 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 +124 -73
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/billing-info-container/index.tsx +74 -87
- package/src/components/billing-info-container/utils.ts +8 -0
- package/src/components/confirmationContainer/index.tsx +1 -1
- package/src/components/loginModal/index.tsx +1 -0
- package/src/components/paymentContainer/index.tsx +5 -0
- package/src/components/stripePayment/index.tsx +41 -9
- package/src/components/waitingList/index.tsx +2 -1
- package/src/components/waitingList/style.css +6 -0
|
@@ -1281,7 +1281,11 @@ var LoginModal = function LoginModal(_ref) {
|
|
|
1281
1281
|
onSubmit: props.handleSubmit
|
|
1282
1282
|
}, React.createElement("div", {
|
|
1283
1283
|
className: "modal-title"
|
|
1284
|
-
}, "Login"), React.createElement("
|
|
1284
|
+
}, "Login"), React.createElement("img", {
|
|
1285
|
+
className: "login-logo-tff",
|
|
1286
|
+
src: "https://www.ticketfairy.com/resources/images/logo-ttf-black.svg",
|
|
1287
|
+
alt: ""
|
|
1288
|
+
}), React.createElement("div", {
|
|
1285
1289
|
className: "server_auth__error"
|
|
1286
1290
|
}, error), alreadyHasUser && React.createElement("p", {
|
|
1287
1291
|
className: "info-text-for-login"
|
|
@@ -1551,8 +1555,12 @@ var getInitialValues = function getInitialValues(data, propsInitialValues, userV
|
|
|
1551
1555
|
|
|
1552
1556
|
_forEach(results, function (item) {
|
|
1553
1557
|
initialValues[item] = propsInitialValues[item] || userValues[item] || '';
|
|
1554
|
-
});
|
|
1558
|
+
}); // set logged in user as first ticket holder
|
|
1559
|
+
|
|
1555
1560
|
|
|
1561
|
+
initialValues['holderFirstName-0'] = propsInitialValues.firstName || userValues.firstName || '';
|
|
1562
|
+
initialValues['holderLastName-0'] = propsInitialValues.lastName || userValues.lastName || '';
|
|
1563
|
+
initialValues['holderEmail-0'] = propsInitialValues.email || userValues.email || '';
|
|
1556
1564
|
return initialValues;
|
|
1557
1565
|
};
|
|
1558
1566
|
var createRegisterFormData = function createRegisterFormData(values, checkoutBody) {
|
|
@@ -1953,7 +1961,10 @@ var LogicRunner = function LogicRunner(_ref) {
|
|
|
1953
1961
|
brand_opt_in: (parsedData == null ? void 0 : parsedData.brand_opt_in) || '',
|
|
1954
1962
|
city: (parsedData == null ? void 0 : parsedData.city) || '',
|
|
1955
1963
|
confirmPassword: '',
|
|
1956
|
-
password: ''
|
|
1964
|
+
password: '',
|
|
1965
|
+
'holderFirstName-0': (parsedData == null ? void 0 : parsedData.first_name) || '',
|
|
1966
|
+
'holderLastName-0': (parsedData == null ? void 0 : parsedData.last_name) || '',
|
|
1967
|
+
'holderEmail-0': (parsedData == null ? void 0 : parsedData.email) || ''
|
|
1957
1968
|
};
|
|
1958
1969
|
setValues(mappedValues);
|
|
1959
1970
|
setUserValues(mappedValues);
|
|
@@ -2010,47 +2021,56 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2010
2021
|
_ref3$onAuthorizeErro = _ref3.onAuthorizeError,
|
|
2011
2022
|
onAuthorizeError = _ref3$onAuthorizeErro === void 0 ? function () {} : _ref3$onAuthorizeErro,
|
|
2012
2023
|
_ref3$onLogin = _ref3.onLogin,
|
|
2013
|
-
onLogin = _ref3$onLogin === void 0 ? function () {} : _ref3$onLogin
|
|
2014
|
-
|
|
2015
|
-
|
|
2024
|
+
onLogin = _ref3$onLogin === void 0 ? function () {} : _ref3$onLogin,
|
|
2025
|
+
_ref3$onLoginSuccess = _ref3.onLoginSuccess,
|
|
2026
|
+
onLoginSuccess = _ref3$onLoginSuccess === void 0 ? function () {} : _ref3$onLoginSuccess,
|
|
2027
|
+
_ref3$isLoggedIn = _ref3.isLoggedIn,
|
|
2028
|
+
pIsLoggedIn = _ref3$isLoggedIn === void 0 ? false : _ref3$isLoggedIn;
|
|
2029
|
+
var isWindowDefined = typeof window !== 'undefined';
|
|
2030
|
+
var userData = isWindowDefined && window.localStorage.getItem('user_data') ? JSON.parse(window.localStorage.getItem('user_data') || '') : {};
|
|
2031
|
+
var access_token = isWindowDefined && window.localStorage.getItem('access_token') ? window.localStorage.getItem('access_token') || '' : '';
|
|
2016
2032
|
|
|
2017
2033
|
var _useState = useState(data),
|
|
2018
2034
|
dataWithUniqueIds = _useState[0],
|
|
2019
2035
|
setDataWithUniqueIds = _useState[1];
|
|
2020
2036
|
|
|
2021
|
-
var _useState2 = useState(
|
|
2022
|
-
|
|
2023
|
-
|
|
2037
|
+
var _useState2 = useState(!!access_token),
|
|
2038
|
+
isLoggedIn = _useState2[0],
|
|
2039
|
+
setIsLoggedIn = _useState2[1];
|
|
2024
2040
|
|
|
2025
|
-
var _useState3 = useState(
|
|
2026
|
-
|
|
2027
|
-
|
|
2041
|
+
var _useState3 = useState({}),
|
|
2042
|
+
cartInfoData = _useState3[0],
|
|
2043
|
+
setCartInfo = _useState3[1];
|
|
2028
2044
|
|
|
2029
2045
|
var _useState4 = useState([]),
|
|
2030
|
-
|
|
2031
|
-
|
|
2046
|
+
countries = _useState4[0],
|
|
2047
|
+
setCountries = _useState4[1];
|
|
2032
2048
|
|
|
2033
|
-
var _useState5 = useState(
|
|
2034
|
-
|
|
2035
|
-
|
|
2049
|
+
var _useState5 = useState([]),
|
|
2050
|
+
states = _useState5[0],
|
|
2051
|
+
setStates = _useState5[1];
|
|
2036
2052
|
|
|
2037
2053
|
var _useState6 = useState(false),
|
|
2038
|
-
|
|
2039
|
-
|
|
2054
|
+
showModalLogin = _useState6[0],
|
|
2055
|
+
setShowModalLogin = _useState6[1];
|
|
2040
2056
|
|
|
2041
2057
|
var _useState7 = useState(false),
|
|
2042
|
-
|
|
2043
|
-
|
|
2058
|
+
alreadyHasUser = _useState7[0],
|
|
2059
|
+
setAlreadyHasUser = _useState7[1];
|
|
2044
2060
|
|
|
2045
2061
|
var _useState8 = useState(false),
|
|
2046
|
-
|
|
2047
|
-
|
|
2062
|
+
userExpired = _useState8[0],
|
|
2063
|
+
setUserExpired = _useState8[1];
|
|
2048
2064
|
|
|
2049
|
-
var _useState9 = useState(
|
|
2050
|
-
|
|
2051
|
-
|
|
2065
|
+
var _useState9 = useState(false),
|
|
2066
|
+
showModalRegister = _useState9[0],
|
|
2067
|
+
setShowModalRegister = _useState9[1];
|
|
2068
|
+
|
|
2069
|
+
var _useState10 = useState([]),
|
|
2070
|
+
ticketsQuantity = _useState10[0],
|
|
2071
|
+
setTicketsQuantity = _useState10[1];
|
|
2052
2072
|
|
|
2053
|
-
var
|
|
2073
|
+
var _useState11 = useState({
|
|
2054
2074
|
firstName: '',
|
|
2055
2075
|
lastName: '',
|
|
2056
2076
|
email: '',
|
|
@@ -2065,10 +2085,8 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2065
2085
|
state: '',
|
|
2066
2086
|
zip: ''
|
|
2067
2087
|
}),
|
|
2068
|
-
userValues =
|
|
2069
|
-
setUserValues =
|
|
2070
|
-
|
|
2071
|
-
var isLoggedIn = !!access_token;
|
|
2088
|
+
userValues = _useState11[0],
|
|
2089
|
+
setUserValues = _useState11[1];
|
|
2072
2090
|
|
|
2073
2091
|
var emailLogged = _get(userData, 'email', '') || _get(userValues, 'email', '');
|
|
2074
2092
|
|
|
@@ -2077,7 +2095,6 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2077
2095
|
var lastNameLogged = _get(userData, 'last_name', '') || _get(userValues, 'last_name', '');
|
|
2078
2096
|
|
|
2079
2097
|
var showDOB = getQueryVariable('age_required') === 'true';
|
|
2080
|
-
var showTicketHolderName = getQueryVariable('names_required') === 'true';
|
|
2081
2098
|
var eventId = getQueryVariable('event_id');
|
|
2082
2099
|
|
|
2083
2100
|
var optedInFieldValue = _get(cartInfoData, 'optedIn', false);
|
|
@@ -2098,8 +2115,13 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2098
2115
|
qty += +item.quantity;
|
|
2099
2116
|
});
|
|
2100
2117
|
return qty;
|
|
2101
|
-
};
|
|
2118
|
+
};
|
|
2102
2119
|
|
|
2120
|
+
useEffect(function () {
|
|
2121
|
+
if ((pIsLoggedIn || access_token) && !isLoggedIn) {
|
|
2122
|
+
setIsLoggedIn(true);
|
|
2123
|
+
}
|
|
2124
|
+
}, [pIsLoggedIn, isLoggedIn, access_token]); //just once
|
|
2103
2125
|
|
|
2104
2126
|
useEffect(function () {
|
|
2105
2127
|
// fetch countries data
|
|
@@ -2208,7 +2230,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2208
2230
|
case 0:
|
|
2209
2231
|
_context4.prev = 0;
|
|
2210
2232
|
|
|
2211
|
-
if (!(
|
|
2233
|
+
if (!(isWindowDefined && token)) {
|
|
2212
2234
|
_context4.next = 10;
|
|
2213
2235
|
break;
|
|
2214
2236
|
}
|
|
@@ -2289,7 +2311,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2289
2311
|
_profileSpecifiedData = _get(updatedUserData, 'data.data');
|
|
2290
2312
|
_profileDataObj = setLoggedUserData(_profileSpecifiedData);
|
|
2291
2313
|
|
|
2292
|
-
if (
|
|
2314
|
+
if (isWindowDefined) {
|
|
2293
2315
|
window.localStorage.setItem('user_data', JSON.stringify(_profileDataObj));
|
|
2294
2316
|
}
|
|
2295
2317
|
|
|
@@ -2367,7 +2389,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2367
2389
|
profileSpecifiedData = _get(profileData, 'data.data');
|
|
2368
2390
|
profileDataObj = setLoggedUserData(profileSpecifiedData);
|
|
2369
2391
|
|
|
2370
|
-
if (
|
|
2392
|
+
if (isWindowDefined) {
|
|
2371
2393
|
window.localStorage.setItem('user_data', JSON.stringify(profileDataObj));
|
|
2372
2394
|
}
|
|
2373
2395
|
|
|
@@ -2391,7 +2413,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2391
2413
|
|
|
2392
2414
|
if (axios.isAxiosError(_context5.t1)) {
|
|
2393
2415
|
if (((_e$response2 = _context5.t1.response) == null ? void 0 : _e$response2.data.error) === 'invalid_token') {
|
|
2394
|
-
if (
|
|
2416
|
+
if (isWindowDefined) {
|
|
2395
2417
|
window.localStorage.removeItem('user_data');
|
|
2396
2418
|
window.localStorage.removeItem('access_token');
|
|
2397
2419
|
setUserExpired(true);
|
|
@@ -2444,35 +2466,18 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2444
2466
|
var label = item.label,
|
|
2445
2467
|
labelClassName = item.labelClassName,
|
|
2446
2468
|
fields = item.fields;
|
|
2447
|
-
|
|
2448
|
-
if (label === 'Ticket Holders' && !showTicketHolderName && !showDOB) {
|
|
2449
|
-
return null;
|
|
2450
|
-
}
|
|
2451
|
-
|
|
2452
2469
|
return React.createElement(React.Fragment, {
|
|
2453
2470
|
key: item.uniqueId
|
|
2454
2471
|
}, React.createElement("p", {
|
|
2455
2472
|
className: labelClassName
|
|
2456
2473
|
}, label), _map(fields, function (group) {
|
|
2457
2474
|
var groupClassname = group.groupClassname,
|
|
2458
|
-
groupItems = group.groupItems
|
|
2459
|
-
groupLabel = group.groupLabel,
|
|
2460
|
-
groupLabelClassName = group.groupLabelClassName;
|
|
2475
|
+
groupItems = group.groupItems;
|
|
2461
2476
|
return React.createElement(React.Fragment, {
|
|
2462
2477
|
key: group.uniqueId
|
|
2463
|
-
},
|
|
2464
|
-
className: groupLabelClassName
|
|
2465
|
-
}, groupLabel), React.createElement("div", {
|
|
2478
|
+
}, React.createElement("div", {
|
|
2466
2479
|
className: groupClassname
|
|
2467
2480
|
}, _map(groupItems.filter(function (el) {
|
|
2468
|
-
if (el.name === 'holderFirstName' && !showTicketHolderName) {
|
|
2469
|
-
return false;
|
|
2470
|
-
}
|
|
2471
|
-
|
|
2472
|
-
if (el.name === 'holderLastName' && !showTicketHolderName) {
|
|
2473
|
-
return false;
|
|
2474
|
-
}
|
|
2475
|
-
|
|
2476
2481
|
if (el.name === 'holderAge' && !showDOB) {
|
|
2477
2482
|
return false;
|
|
2478
2483
|
}
|
|
@@ -2483,7 +2488,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2483
2488
|
|
|
2484
2489
|
return true;
|
|
2485
2490
|
}), function (element) {
|
|
2486
|
-
return ['password', 'confirmPassword'].includes(element.name) && isLoggedIn ? null : React.createElement(React.Fragment, {
|
|
2491
|
+
return ['password', 'confirmPassword', 'password-info'].includes(element.name) && isLoggedIn ? null : React.createElement(React.Fragment, {
|
|
2487
2492
|
key: element.uniqueId
|
|
2488
2493
|
}, element.name === 'email' ? React.createElement("div", {
|
|
2489
2494
|
className: "email-checking"
|
|
@@ -2500,7 +2505,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2500
2505
|
})));
|
|
2501
2506
|
})));
|
|
2502
2507
|
}));
|
|
2503
|
-
}),
|
|
2508
|
+
}), React.createElement("div", {
|
|
2504
2509
|
className: "ticket-holders-fields"
|
|
2505
2510
|
}, React.createElement("p", null, ticketHoldersFields.label), _map(ticketsQuantity, function (_item, index) {
|
|
2506
2511
|
return React.createElement("div", {
|
|
@@ -2526,7 +2531,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2526
2531
|
}));
|
|
2527
2532
|
})));
|
|
2528
2533
|
}));
|
|
2529
|
-
}))
|
|
2534
|
+
})), React.createElement("div", {
|
|
2530
2535
|
className: "button-container"
|
|
2531
2536
|
}, React.createElement(LoadingButton, {
|
|
2532
2537
|
type: "submit",
|
|
@@ -2546,6 +2551,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2546
2551
|
onLogin: function onLogin() {
|
|
2547
2552
|
setShowModalLogin(false);
|
|
2548
2553
|
setUserExpired(false);
|
|
2554
|
+
onLoginSuccess();
|
|
2549
2555
|
},
|
|
2550
2556
|
alreadyHasUser: alreadyHasUser,
|
|
2551
2557
|
userExpired: userExpired,
|
|
@@ -2645,6 +2651,9 @@ var options = {
|
|
|
2645
2651
|
fontSize: '18px',
|
|
2646
2652
|
color: '#ffffff',
|
|
2647
2653
|
letterSpacing: '1px',
|
|
2654
|
+
':-webkit-autofill': {
|
|
2655
|
+
color: '#ffffff'
|
|
2656
|
+
},
|
|
2648
2657
|
'::placeholder': {
|
|
2649
2658
|
color: 'rgba(201, 201, 201, 0.5)'
|
|
2650
2659
|
}
|
|
@@ -2660,7 +2669,7 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2660
2669
|
_ref$onSubmit = _ref.onSubmit,
|
|
2661
2670
|
onSubmit = _ref$onSubmit === void 0 ? _identity : _ref$onSubmit,
|
|
2662
2671
|
_ref$stripeCardOption = _ref.stripeCardOptions,
|
|
2663
|
-
stripeCardOptions = _ref$stripeCardOption === void 0 ?
|
|
2672
|
+
stripeCardOptions = _ref$stripeCardOption === void 0 ? {} : _ref$stripeCardOption,
|
|
2664
2673
|
_ref$error = _ref.error,
|
|
2665
2674
|
error = _ref$error === void 0 ? null : _ref$error,
|
|
2666
2675
|
stripe_client_secret = _ref.stripe_client_secret,
|
|
@@ -2683,6 +2692,14 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2683
2692
|
stripeError = _useState2[0],
|
|
2684
2693
|
setStripeError = _useState2[1];
|
|
2685
2694
|
|
|
2695
|
+
var _useState3 = useState([]),
|
|
2696
|
+
checkboxes = _useState3[0],
|
|
2697
|
+
setCheckboxes = _useState3[1];
|
|
2698
|
+
|
|
2699
|
+
var _useState4 = useState(false),
|
|
2700
|
+
allowSubmit = _useState4[0],
|
|
2701
|
+
setAllowSubmit = _useState4[1];
|
|
2702
|
+
|
|
2686
2703
|
var handleSubmit = /*#__PURE__*/function () {
|
|
2687
2704
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(event) {
|
|
2688
2705
|
var card, address, paymentMethodReq, _yield$stripe$confirm, _error;
|
|
@@ -2788,6 +2805,17 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2788
2805
|
};
|
|
2789
2806
|
}();
|
|
2790
2807
|
|
|
2808
|
+
var handleCheckboxes = function handleCheckboxes(e) {
|
|
2809
|
+
var checkbox = e.target;
|
|
2810
|
+
var updatedCheckedState = checkboxes.map(function (item) {
|
|
2811
|
+
var value = item.id === checkbox.name ? !item.checked : item.checked;
|
|
2812
|
+
return _extends({}, item, {
|
|
2813
|
+
checked: value
|
|
2814
|
+
});
|
|
2815
|
+
});
|
|
2816
|
+
setCheckboxes(updatedCheckedState);
|
|
2817
|
+
};
|
|
2818
|
+
|
|
2791
2819
|
var onChangePostalCode = function onChangePostalCode(e) {
|
|
2792
2820
|
setPostalCode(e.target.value);
|
|
2793
2821
|
};
|
|
@@ -2801,6 +2829,19 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2801
2829
|
zipCode && setPostalCode(zipCode);
|
|
2802
2830
|
}
|
|
2803
2831
|
}, []);
|
|
2832
|
+
useEffect(function () {
|
|
2833
|
+
if (conditions.length) {
|
|
2834
|
+
setCheckboxes(conditions);
|
|
2835
|
+
}
|
|
2836
|
+
}, [conditions]);
|
|
2837
|
+
useEffect(function () {
|
|
2838
|
+
if (checkboxes.length) {
|
|
2839
|
+
var allChecked = checkboxes.every(function (item) {
|
|
2840
|
+
return (item == null ? void 0 : item.checked) === true;
|
|
2841
|
+
});
|
|
2842
|
+
setAllowSubmit(allChecked);
|
|
2843
|
+
}
|
|
2844
|
+
}, [checkboxes]);
|
|
2804
2845
|
var buttonIsDiabled = !stripe || !!error || isLoading;
|
|
2805
2846
|
return React.createElement("div", {
|
|
2806
2847
|
className: "stripe_payment_container"
|
|
@@ -2815,7 +2856,7 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2815
2856
|
}, React.createElement("span", {
|
|
2816
2857
|
className: "card_label_text"
|
|
2817
2858
|
}, "Card number"), React.createElement(CardNumberElement, {
|
|
2818
|
-
options: stripeCardOptions,
|
|
2859
|
+
options: _extends({}, options, stripeCardOptions),
|
|
2819
2860
|
onReady: _identity,
|
|
2820
2861
|
onChange: _identity,
|
|
2821
2862
|
onBlur: _identity,
|
|
@@ -2825,13 +2866,13 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2825
2866
|
}, React.createElement("span", {
|
|
2826
2867
|
className: "card_label_text"
|
|
2827
2868
|
}, "Expiration date"), React.createElement(CardExpiryElement, {
|
|
2828
|
-
options: stripeCardOptions
|
|
2869
|
+
options: _extends({}, options, stripeCardOptions)
|
|
2829
2870
|
})), React.createElement("label", {
|
|
2830
2871
|
className: "cvc_element"
|
|
2831
2872
|
}, React.createElement("span", {
|
|
2832
2873
|
className: "card_label_text"
|
|
2833
2874
|
}, "CVC"), React.createElement(CardCvcElement, {
|
|
2834
|
-
options: stripeCardOptions
|
|
2875
|
+
options: _extends({}, options, stripeCardOptions)
|
|
2835
2876
|
})), React.createElement("label", {
|
|
2836
2877
|
className: "zip_element"
|
|
2837
2878
|
}, React.createElement("p", {
|
|
@@ -2841,7 +2882,7 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2841
2882
|
value: postalCode,
|
|
2842
2883
|
onChange: onChangePostalCode,
|
|
2843
2884
|
placeholder: "ZIP"
|
|
2844
|
-
}))),
|
|
2885
|
+
}))), checkboxes == null ? void 0 : checkboxes.map(function (checkbox) {
|
|
2845
2886
|
return React.createElement("div", {
|
|
2846
2887
|
className: 'billing-info-container__singleField',
|
|
2847
2888
|
key: checkbox.id
|
|
@@ -2850,10 +2891,12 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2850
2891
|
}, React.createElement(CheckboxField, {
|
|
2851
2892
|
name: checkbox.id,
|
|
2852
2893
|
label: checkbox.text,
|
|
2853
|
-
required: true
|
|
2894
|
+
required: true,
|
|
2895
|
+
onChange: handleCheckboxes,
|
|
2896
|
+
checked: checkbox.checked
|
|
2854
2897
|
})));
|
|
2855
2898
|
}), React.createElement("div", {
|
|
2856
|
-
className: "payment_button " + (buttonIsDiabled ? 'disabled-payment-button' : '')
|
|
2899
|
+
className: "payment_button " + (buttonIsDiabled || !allowSubmit ? 'disabled-payment-button' : '')
|
|
2857
2900
|
}, React.createElement("button", {
|
|
2858
2901
|
disabled: buttonIsDiabled,
|
|
2859
2902
|
type: "submit"
|
|
@@ -2895,7 +2938,9 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
2895
2938
|
_ref$onGetPaymentData2 = _ref.onGetPaymentDataError,
|
|
2896
2939
|
onGetPaymentDataError = _ref$onGetPaymentData2 === void 0 ? function () {} : _ref$onGetPaymentData2,
|
|
2897
2940
|
_ref$onPaymentError = _ref.onPaymentError,
|
|
2898
|
-
onPaymentError = _ref$onPaymentError === void 0 ? function () {} : _ref$onPaymentError
|
|
2941
|
+
onPaymentError = _ref$onPaymentError === void 0 ? function () {} : _ref$onPaymentError,
|
|
2942
|
+
_ref$stripeCardOption = _ref.stripeCardOptions,
|
|
2943
|
+
stripeCardOptions = _ref$stripeCardOption === void 0 ? {} : _ref$stripeCardOption;
|
|
2899
2944
|
|
|
2900
2945
|
var _useState = useState(initialReviewValues),
|
|
2901
2946
|
reviewData = _useState[0],
|
|
@@ -2995,7 +3040,8 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
2995
3040
|
setConditions(conditionsInfo ? conditionsInfo.map(function (item) {
|
|
2996
3041
|
return {
|
|
2997
3042
|
id: nanoid(),
|
|
2998
|
-
text: item
|
|
3043
|
+
text: item,
|
|
3044
|
+
checked: false
|
|
2999
3045
|
};
|
|
3000
3046
|
}) : []);
|
|
3001
3047
|
|
|
@@ -3115,7 +3161,8 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
3115
3161
|
handleSetLoading: function handleSetLoading(value) {
|
|
3116
3162
|
return setPaymentIsLoading(value);
|
|
3117
3163
|
},
|
|
3118
|
-
conditions: conditions
|
|
3164
|
+
conditions: conditions,
|
|
3165
|
+
stripeCardOptions: stripeCardOptions
|
|
3119
3166
|
}))))));
|
|
3120
3167
|
};
|
|
3121
3168
|
|
|
@@ -3184,7 +3231,7 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
|
|
|
3184
3231
|
}
|
|
3185
3232
|
}, _callee, null, [[4, 13]]);
|
|
3186
3233
|
}))();
|
|
3187
|
-
}, [
|
|
3234
|
+
}, []);
|
|
3188
3235
|
return React.createElement("div", {
|
|
3189
3236
|
className: "confirmation-page"
|
|
3190
3237
|
}, React.createElement("p", {
|
|
@@ -3422,7 +3469,7 @@ var TicketsSection = function TicketsSection(_ref) {
|
|
|
3422
3469
|
}));
|
|
3423
3470
|
};
|
|
3424
3471
|
|
|
3425
|
-
var css_248z$7 = ".style_waiting-list__2sJxM{padding:17px 35px 20px}.style_waiting-list__2sJxM .style_field-item__34MYc{margin-bottom:30px}.style_waiting-list__2sJxM .style_waiting-list-button__tO7D2{width:100%!important}.style_waiting-list__2sJxM .style_waiting-list-button__tO7D2:hover{background-color:#505050}.style_waiting-list__2sJxM .style_success-message__BvF3R h3{margin:10px 0}.style_waiting-list__2sJxM .style_success-message__BvF3R p{margin:0}";
|
|
3472
|
+
var css_248z$7 = ".style_waiting-list__2sJxM{padding:17px 35px 20px}.style_waiting-list__2sJxM .style_field-item__34MYc{margin-bottom:30px}.style_waiting-list__2sJxM .style_waiting-list-button__tO7D2{width:100%!important}.style_waiting-list__2sJxM .style_waiting-list-button__tO7D2:hover{background-color:#505050}.style_waiting-list__2sJxM .style_success-message__BvF3R h3{margin:10px 0}.style_waiting-list__2sJxM .style_success-message__BvF3R p{margin:0}.style_waiting-list__2sJxM .style_no-tickets-text__zGdaP{text-align:center}.style_waiting-list__2sJxM .style_added-success-message__FbPZS{font-size:22px}";
|
|
3426
3473
|
styleInject(css_248z$7);
|
|
3427
3474
|
|
|
3428
3475
|
var generateQuantity = function generateQuantity(n) {
|
|
@@ -3512,9 +3559,13 @@ var WaitingList = function WaitingList(_ref) {
|
|
|
3512
3559
|
|
|
3513
3560
|
return React.createElement("div", {
|
|
3514
3561
|
className: "waiting-list"
|
|
3515
|
-
},
|
|
3562
|
+
}, React.createElement("p", {
|
|
3563
|
+
className: "no-tickets-text"
|
|
3564
|
+
}, "No tickets are currently available for this event."), showSuccessMessage ? React.createElement("div", {
|
|
3516
3565
|
className: "success-message"
|
|
3517
|
-
}, React.createElement("
|
|
3566
|
+
}, React.createElement("p", {
|
|
3567
|
+
className: "added-success-message"
|
|
3568
|
+
}, "You've been added to the waiting list!"), React.createElement("p", null, "You'll be notified if tickets become available.")) : React.createElement(React.Fragment, null, React.createElement("h2", null, "WAITING LIST"), React.createElement(Formik, {
|
|
3518
3569
|
initialValues: {
|
|
3519
3570
|
ticketTypeId: '',
|
|
3520
3571
|
quantity: '',
|