tf-checkout-react 1.0.103 → 1.0.106
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/api/index.d.ts +3 -1
- package/dist/components/common/CustomField.d.ts +1 -1
- package/dist/components/common/DatePickerField.d.ts +14 -0
- package/dist/components/common/RedirectModal.d.ts +7 -0
- package/dist/components/countdown/index.d.ts +3 -1
- package/dist/components/orderDetailsContainer/ticketsTable.d.ts +2 -0
- package/dist/components/rsvpContainer/index.d.ts +7 -0
- package/dist/components/ticketResale/index.d.ts +5 -3
- package/dist/components/ticketsContainer/AccessCodeSection.d.ts +7 -0
- package/dist/components/ticketsContainer/PromoCodeSection.d.ts +5 -9
- package/dist/components/ticketsContainer/TicketsSection.d.ts +6 -3
- package/dist/components/ticketsContainer/index.d.ts +9 -2
- package/dist/components/timerWidget/index.d.ts +3 -3
- package/dist/images/cross.svg +44 -0
- package/dist/images/done.svg +3 -3
- package/dist/index.d.ts +2 -0
- package/dist/tf-checkout-react.cjs.development.js +639 -223
- 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 +645 -231
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -1
- package/package.json +89 -89
- package/src/.DS_Store +0 -0
- package/src/.d.ts +2 -2
- package/src/api/index.ts +300 -278
- package/src/assets/images/cross.svg +44 -0
- package/src/assets/images/done.svg +3 -3
- package/src/components/.DS_Store +0 -0
- package/src/components/billing-info-container/index.tsx +811 -799
- package/src/components/billing-info-container/style.css +105 -105
- package/src/components/billing-info-container/utils.ts +225 -224
- package/src/components/common/CheckboxField.tsx +41 -41
- package/src/components/common/CustomField.tsx +87 -84
- package/src/components/common/DatePickerField.tsx +98 -0
- package/src/components/common/FormikPhoneNumberField.tsx +51 -51
- package/src/components/common/Loader.tsx +9 -9
- package/src/components/common/RadioField.tsx +35 -35
- package/src/components/common/RedirectModal.tsx +43 -0
- package/src/components/common/SelectField.tsx +80 -80
- package/src/components/common/SnackbarAlert.tsx +53 -53
- package/src/components/common/index.tsx +4 -4
- package/src/components/confirmModal/index.tsx +51 -51
- package/src/components/confirmModal/style.css +21 -21
- package/src/components/confirmationContainer/config.ts +72 -72
- package/src/components/confirmationContainer/index.tsx +197 -197
- package/src/components/confirmationContainer/social-buttons.tsx +94 -94
- package/src/components/confirmationContainer/style.css +202 -202
- package/src/components/countdown/index.tsx +98 -89
- package/src/components/countdown/style.css +9 -9
- package/src/components/index.ts +7 -7
- package/src/components/loginModal/index.tsx +209 -209
- package/src/components/loginModal/style.css +71 -71
- package/src/components/myTicketsContainer/index.tsx +196 -196
- package/src/components/myTicketsContainer/row.tsx +41 -41
- package/src/components/myTicketsContainer/style.css +39 -39
- package/src/components/myTicketsContainer/tableConfig.tsx +34 -34
- package/src/components/orderDetailsContainer/index.tsx +252 -249
- package/src/components/orderDetailsContainer/style.css +72 -72
- package/src/components/orderDetailsContainer/ticketsTable.tsx +130 -124
- package/src/components/paymentContainer/index.tsx +285 -284
- package/src/components/registerModal/index.tsx +190 -190
- package/src/components/rsvpContainer/index.tsx +126 -0
- package/src/components/stripePayment/index.tsx +254 -253
- package/src/components/stripePayment/style.css +59 -59
- package/src/components/ticketResale/index.tsx +74 -56
- package/src/components/ticketResaleModal/index.tsx +215 -210
- package/src/components/ticketResaleModal/style.css +28 -28
- package/src/components/ticketsContainer/AccessCodeSection.tsx +50 -0
- package/src/components/ticketsContainer/PromoCodeSection.tsx +88 -99
- package/src/components/ticketsContainer/ReferralLogic.tsx +31 -33
- package/src/components/ticketsContainer/TicketRow.tsx +83 -83
- package/src/components/ticketsContainer/TicketsSection.tsx +90 -81
- package/src/components/ticketsContainer/index.tsx +464 -430
- package/src/components/ticketsContainer/style.css +181 -181
- package/src/components/ticketsContainer/utils.ts +11 -11
- package/src/components/timerWidget/index.tsx +87 -70
- package/src/components/timerWidget/style.css +34 -26
- package/src/components/waitingList/index.tsx +178 -178
- package/src/components/waitingList/style.css +26 -26
- package/src/env.ts +20 -20
- package/src/index.ts +15 -13
- package/src/normalizers/index.ts +45 -45
- package/src/types/billing-info-data.ts +37 -37
- package/src/types/payment-field.ts +7 -7
- package/src/types/referral-promotion.ts +7 -7
- package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +59 -59
- package/src/utils/downloadPDF.tsx +30 -30
- package/src/utils/formikErrorFocus.ts +24 -24
- package/src/utils/getImage.ts +14 -14
- package/src/utils/getQueryVariable.ts +13 -13
- package/src/utils/index.ts +5 -5
- package/src/utils/setConfigs.ts +26 -26
- package/src/utils/showZero.tsx +10 -10
- package/src/validators/index.ts +20 -20
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { Component, useState, useRef, useEffect, Fragment } from 'react';
|
|
1
|
+
import React, { Component, useState, memo, useRef, useEffect, Fragment } from 'react';
|
|
2
2
|
import { connect, Formik, Form, Field } from 'formik';
|
|
3
3
|
import Button from '@mui/material/Button';
|
|
4
4
|
import _identity from 'lodash-es/identity';
|
|
@@ -23,24 +23,26 @@ import TextField$1 from '@mui/material/TextField';
|
|
|
23
23
|
import MuiPhoneNumber from 'material-ui-phone-number';
|
|
24
24
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
25
25
|
import Select from '@mui/material/Select';
|
|
26
|
-
import {
|
|
26
|
+
import { ThemeProvider, createTheme } from '@mui/material/styles';
|
|
27
27
|
import Backdrop from '@mui/material/Backdrop';
|
|
28
28
|
import Countdown$1 from 'react-countdown';
|
|
29
29
|
import _isNumber from 'lodash-es/isNumber';
|
|
30
|
+
import SVG from 'react-inlinesvg';
|
|
31
|
+
import DatePicker from '@mui/lab/DatePicker';
|
|
32
|
+
import AdapterMoment from '@mui/lab/AdapterMoment';
|
|
33
|
+
import LocalizationProvider from '@mui/lab/LocalizationProvider';
|
|
30
34
|
import Container from '@mui/material/Container';
|
|
31
35
|
import Alert$1 from '@mui/material/Alert';
|
|
32
36
|
import { useStripe, useElements, CardNumberElement, CardExpiryElement, CardCvcElement, Elements } from '@stripe/react-stripe-js';
|
|
33
37
|
import { loadStripe } from '@stripe/stripe-js';
|
|
34
38
|
import { FacebookShareButton, FacebookIcon, FacebookMessengerShareButton, FacebookMessengerIcon, TwitterShareButton, TwitterIcon, LinkedinShareButton, LinkedinIcon, PinterestShareButton, PinterestIcon, VKShareButton, VKIcon, OKShareButton, OKIcon, TelegramShareButton, TelegramIcon, WhatsappShareButton, WhatsappIcon, RedditShareButton, RedditIcon, TumblrShareButton, TumblrIcon, MailruShareButton, MailruIcon, EmailShareButton, EmailIcon, LivejournalShareButton, LivejournalIcon, ViberShareButton, ViberIcon, WorkplaceShareButton, WorkplaceIcon, LineShareButton, LineIcon, PocketShareButton, PocketIcon, InstapaperShareButton, InstapaperIcon, WeiboShareButton, WeiboIcon, HatenaShareButton, HatenaIcon } from 'react-share';
|
|
35
39
|
import _some from 'lodash-es/some';
|
|
36
|
-
import _every from 'lodash-es/every';
|
|
37
40
|
import _find from 'lodash-es/find';
|
|
38
41
|
import Button$1 from 'react-bootstrap/Button';
|
|
39
42
|
import jwt_decode from 'jwt-decode';
|
|
40
43
|
import _sortBy from 'lodash-es/sortBy';
|
|
41
44
|
import FormControl$1 from '@mui/material/FormControl';
|
|
42
45
|
import MenuItem from '@mui/material/MenuItem';
|
|
43
|
-
import SVG from 'react-inlinesvg';
|
|
44
46
|
import moment from 'moment-timezone';
|
|
45
47
|
import { ThemeProvider as ThemeProvider$1 } from '@mui/private-theming';
|
|
46
48
|
import Table from '@mui/material/Table';
|
|
@@ -1114,6 +1116,13 @@ var publicRequest = /*#__PURE__*/axios.create({
|
|
|
1114
1116
|
headers: ttfHeaders
|
|
1115
1117
|
});
|
|
1116
1118
|
publicRequest.interceptors.response.use(function (response) {
|
|
1119
|
+
var authGuestToken = _get(response, 'headers.authorization-guest');
|
|
1120
|
+
|
|
1121
|
+
if (isWindowDefined && authGuestToken) {
|
|
1122
|
+
window.localStorage.setItem('auth_guest_token', authGuestToken);
|
|
1123
|
+
publicRequest.setGuestToken(authGuestToken);
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1117
1126
|
return response;
|
|
1118
1127
|
}, function (error) {
|
|
1119
1128
|
var _error$response;
|
|
@@ -1122,7 +1131,6 @@ publicRequest.interceptors.response.use(function (response) {
|
|
|
1122
1131
|
if (isWindowDefined) {
|
|
1123
1132
|
var _error$response2, _error$response2$data;
|
|
1124
1133
|
|
|
1125
|
-
window.localStorage.removeItem('auth_guest_token');
|
|
1126
1134
|
window.localStorage.removeItem('user_data');
|
|
1127
1135
|
window.localStorage.removeItem('access_token');
|
|
1128
1136
|
var errorType = error == null ? void 0 : (_error$response2 = error.response) == null ? void 0 : (_error$response2$data = _error$response2.data) == null ? void 0 : _error$response2$data.error;
|
|
@@ -1133,6 +1141,13 @@ publicRequest.interceptors.response.use(function (response) {
|
|
|
1133
1141
|
}
|
|
1134
1142
|
}
|
|
1135
1143
|
|
|
1144
|
+
var authGuestToken = _get(error, 'response.headers.authorization-guest');
|
|
1145
|
+
|
|
1146
|
+
if (isWindowDefined && authGuestToken) {
|
|
1147
|
+
window.localStorage.setItem('auth_guest_token', authGuestToken);
|
|
1148
|
+
publicRequest.setGuestToken(authGuestToken);
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1136
1151
|
return Promise.reject(error);
|
|
1137
1152
|
});
|
|
1138
1153
|
publicRequest.interceptors.request.use(function (config) {
|
|
@@ -1318,8 +1333,14 @@ var postReferralVisits = function postReferralVisits(eventId, referralId) {
|
|
|
1318
1333
|
referrer: "" + referralId
|
|
1319
1334
|
});
|
|
1320
1335
|
};
|
|
1321
|
-
var
|
|
1322
|
-
return publicRequest.post("v1/ticket/" + hash + "/
|
|
1336
|
+
var processTicket = function processTicket(hash) {
|
|
1337
|
+
return publicRequest.post("v1/ticket/" + hash + "/process/");
|
|
1338
|
+
};
|
|
1339
|
+
var declineInvitation = function declineInvitation(hash) {
|
|
1340
|
+
return publicRequest.post("v1/ticket/" + hash + "/decline");
|
|
1341
|
+
};
|
|
1342
|
+
var sendRSVPInfo = function sendRSVPInfo(eventId, data) {
|
|
1343
|
+
return publicRequest.post("v1/event/" + eventId + "/send-rsvp-info", data);
|
|
1323
1344
|
};
|
|
1324
1345
|
|
|
1325
1346
|
var style = {
|
|
@@ -1788,6 +1809,7 @@ var createRegisterFormData = function createRegisterFormData(values, checkoutBod
|
|
|
1788
1809
|
bodyFormData.append('password_confirmation', values.confirmPassword);
|
|
1789
1810
|
bodyFormData.append('client_id', CONFIGS.CLIENT_ID || 'e9d8f8922797b4621e562255afe90dbf');
|
|
1790
1811
|
bodyFormData.append('client_secret', CONFIGS.CLIENT_SECRET || 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9');
|
|
1812
|
+
bodyFormData.append('check_cart_expiration', 'true');
|
|
1791
1813
|
|
|
1792
1814
|
_forEach(checkoutBody.attributes, function (item, key) {
|
|
1793
1815
|
bodyFormData.append(key, item);
|
|
@@ -1954,13 +1976,21 @@ var CustomField = function CustomField(_ref) {
|
|
|
1954
1976
|
touched = _ref$form.touched,
|
|
1955
1977
|
errors = _ref$form.errors,
|
|
1956
1978
|
submitCount = _ref$form.submitCount,
|
|
1957
|
-
theme = _ref.theme
|
|
1979
|
+
theme = _ref.theme,
|
|
1980
|
+
_ref$inputProps = _ref.inputProps,
|
|
1981
|
+
pInputProps = _ref$inputProps === void 0 ? {} : _ref$inputProps,
|
|
1982
|
+
_ref$InputProps = _ref.InputProps,
|
|
1983
|
+
InputProps = _ref$InputProps === void 0 ? {} : _ref$InputProps,
|
|
1984
|
+
inputRef = _ref.inputRef;
|
|
1958
1985
|
var isSelectField = type === 'select';
|
|
1959
1986
|
|
|
1960
1987
|
var error = _get(errors, field.name);
|
|
1961
1988
|
|
|
1962
1989
|
var isTouched = Boolean(_get(touched, field.name)) || _includes(field.name, 'holder') && !!error && !!submitCount;
|
|
1963
1990
|
var customTheme = useTheme();
|
|
1991
|
+
var inputProps = {
|
|
1992
|
+
sx: customTheme == null ? void 0 : customTheme.input
|
|
1993
|
+
};
|
|
1964
1994
|
return React.createElement(TextField$1, Object.assign({
|
|
1965
1995
|
id: field.name,
|
|
1966
1996
|
label: label,
|
|
@@ -1977,12 +2007,11 @@ var CustomField = function CustomField(_ref) {
|
|
|
1977
2007
|
}
|
|
1978
2008
|
},
|
|
1979
2009
|
InputLabelProps: {
|
|
1980
|
-
sx: customTheme == null ? void 0 : customTheme.input,
|
|
1981
|
-
shrink: field.name === 'holderAge' ? true : undefined
|
|
1982
|
-
},
|
|
1983
|
-
inputProps: {
|
|
1984
2010
|
sx: customTheme == null ? void 0 : customTheme.input
|
|
1985
|
-
}
|
|
2011
|
+
},
|
|
2012
|
+
InputProps: InputProps,
|
|
2013
|
+
inputProps: _extends({}, inputProps, pInputProps),
|
|
2014
|
+
inputRef: inputRef
|
|
1986
2015
|
}, field), isSelectField ? _map(selectOptions, function (option) {
|
|
1987
2016
|
return React.createElement("option", {
|
|
1988
2017
|
key: option.value,
|
|
@@ -2169,6 +2198,25 @@ var showZero = function showZero(value) {
|
|
|
2169
2198
|
return _isNumber(intNumber) ? intNumber >= 0 && intNumber < 10 ? '0' + intNumber : intNumber : null;
|
|
2170
2199
|
};
|
|
2171
2200
|
|
|
2201
|
+
var getImage = function getImage(name) {
|
|
2202
|
+
if (name === void 0) {
|
|
2203
|
+
name = '';
|
|
2204
|
+
}
|
|
2205
|
+
|
|
2206
|
+
var image = '';
|
|
2207
|
+
|
|
2208
|
+
if (!name.trim().length) {
|
|
2209
|
+
return image;
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
if (process.env.NODE_ENV === 'production') {
|
|
2213
|
+
image = require("./images/" + name);
|
|
2214
|
+
return image["default"];
|
|
2215
|
+
}
|
|
2216
|
+
|
|
2217
|
+
return image;
|
|
2218
|
+
};
|
|
2219
|
+
|
|
2172
2220
|
var TimerWidget = function TimerWidget(_ref) {
|
|
2173
2221
|
var expires_at = _ref.expires_at,
|
|
2174
2222
|
buyLoading = _ref.buyLoading,
|
|
@@ -2201,9 +2249,25 @@ var TimerWidget = function TimerWidget(_ref) {
|
|
|
2201
2249
|
return React.createElement("span", null, showZero(minutes), ":", showZero(seconds));
|
|
2202
2250
|
};
|
|
2203
2251
|
|
|
2252
|
+
var hideTimer = function hideTimer() {
|
|
2253
|
+
var timerRl = document.querySelector('.timer');
|
|
2254
|
+
|
|
2255
|
+
if (timerRl) {
|
|
2256
|
+
timerRl.style.visibility = "hidden";
|
|
2257
|
+
}
|
|
2258
|
+
};
|
|
2259
|
+
|
|
2204
2260
|
return showTimer && !!expires_at ? React.createElement("div", {
|
|
2205
2261
|
className: "timer"
|
|
2206
2262
|
}, React.createElement("div", {
|
|
2263
|
+
className: 'close-icon',
|
|
2264
|
+
onClick: hideTimer
|
|
2265
|
+
}, React.createElement(SVG, {
|
|
2266
|
+
src: getImage('cross.svg'),
|
|
2267
|
+
width: '10',
|
|
2268
|
+
height: '10',
|
|
2269
|
+
fill: '#fff'
|
|
2270
|
+
})), React.createElement("div", {
|
|
2207
2271
|
className: "toast-message"
|
|
2208
2272
|
}, React.createElement("p", null, "Please complete your purchase before the timer reaches zero."), React.createElement("p", {
|
|
2209
2273
|
className: "countdown"
|
|
@@ -2217,6 +2281,8 @@ var TimerWidget = function TimerWidget(_ref) {
|
|
|
2217
2281
|
})))) : null;
|
|
2218
2282
|
};
|
|
2219
2283
|
|
|
2284
|
+
var TimerWidget$1 = /*#__PURE__*/memo(TimerWidget);
|
|
2285
|
+
|
|
2220
2286
|
var SnackbarAlert = function SnackbarAlert(_ref) {
|
|
2221
2287
|
var isOpen = _ref.isOpen,
|
|
2222
2288
|
message = _ref.message,
|
|
@@ -2253,6 +2319,79 @@ var SnackbarAlert = function SnackbarAlert(_ref) {
|
|
|
2253
2319
|
}, message)));
|
|
2254
2320
|
};
|
|
2255
2321
|
|
|
2322
|
+
var DATE_SIZE = 32;
|
|
2323
|
+
var compactStyles = {
|
|
2324
|
+
'& > div': {
|
|
2325
|
+
minWidth: 256
|
|
2326
|
+
},
|
|
2327
|
+
'& > div > div, & > div > div > div, & .MuiCalendarPicker-root': {
|
|
2328
|
+
width: 256
|
|
2329
|
+
},
|
|
2330
|
+
'& .MuiTypography-caption': {
|
|
2331
|
+
width: DATE_SIZE,
|
|
2332
|
+
margin: 0
|
|
2333
|
+
},
|
|
2334
|
+
'& .PrivatePickersSlideTransition-root': {
|
|
2335
|
+
minHeight: DATE_SIZE * 6
|
|
2336
|
+
},
|
|
2337
|
+
'& .PrivatePickersSlideTransition-root [role="row"]': {
|
|
2338
|
+
margin: 0
|
|
2339
|
+
},
|
|
2340
|
+
'& .MuiPickersDay-dayWithMargin': {
|
|
2341
|
+
margin: 0
|
|
2342
|
+
},
|
|
2343
|
+
'& .MuiPickersDay-root': {
|
|
2344
|
+
width: DATE_SIZE,
|
|
2345
|
+
height: DATE_SIZE
|
|
2346
|
+
}
|
|
2347
|
+
};
|
|
2348
|
+
var compactStyleTheme = /*#__PURE__*/createTheme({
|
|
2349
|
+
components: {
|
|
2350
|
+
MuiPaper: {
|
|
2351
|
+
defaultProps: {
|
|
2352
|
+
sx: compactStyles
|
|
2353
|
+
}
|
|
2354
|
+
}
|
|
2355
|
+
}
|
|
2356
|
+
});
|
|
2357
|
+
var DatePickerField = function DatePickerField(_ref) {
|
|
2358
|
+
var label = _ref.label,
|
|
2359
|
+
field = _ref.field,
|
|
2360
|
+
form = _ref.form,
|
|
2361
|
+
theme = _ref.theme,
|
|
2362
|
+
_ref$useCompact = _ref.useCompact,
|
|
2363
|
+
useCompact = _ref$useCompact === void 0 ? true : _ref$useCompact;
|
|
2364
|
+
return React.createElement(ThemeProvider, {
|
|
2365
|
+
theme: useCompact ? compactStyleTheme : {}
|
|
2366
|
+
}, React.createElement(LocalizationProvider, {
|
|
2367
|
+
dateAdapter: AdapterMoment
|
|
2368
|
+
}, React.createElement(DatePicker, {
|
|
2369
|
+
value: field.value || '',
|
|
2370
|
+
onChange: function onChange(value) {
|
|
2371
|
+
return form.setFieldValue(field.name, value);
|
|
2372
|
+
},
|
|
2373
|
+
PopperProps: {
|
|
2374
|
+
placement: 'bottom-start'
|
|
2375
|
+
},
|
|
2376
|
+
showDaysOutsideCurrentMonth: true,
|
|
2377
|
+
disableFuture: true,
|
|
2378
|
+
inputFormat: "DD/MM/YYYY",
|
|
2379
|
+
mask: "__/__/____",
|
|
2380
|
+
renderInput: function renderInput(params) {
|
|
2381
|
+
return React.createElement(CustomField, Object.assign({}, params, {
|
|
2382
|
+
inputProps: _extends({}, params.inputProps, {
|
|
2383
|
+
placeholder: 'dd/mm/yyyy'
|
|
2384
|
+
}),
|
|
2385
|
+
theme: theme,
|
|
2386
|
+
field: field,
|
|
2387
|
+
form: form,
|
|
2388
|
+
label: label,
|
|
2389
|
+
type: "tel"
|
|
2390
|
+
}));
|
|
2391
|
+
}
|
|
2392
|
+
})));
|
|
2393
|
+
};
|
|
2394
|
+
|
|
2256
2395
|
var LogicRunner = function LogicRunner(_ref) {
|
|
2257
2396
|
var values = _ref.values,
|
|
2258
2397
|
setStates = _ref.setStates,
|
|
@@ -2508,7 +2647,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2508
2647
|
|
|
2509
2648
|
var hideTtfOptIn = _get(cartInfoData, 'hide_ttf_opt_in', true);
|
|
2510
2649
|
|
|
2511
|
-
var expirationTime = _get(cartInfoData, '
|
|
2650
|
+
var expirationTime = _get(cartInfoData, 'expiresAt');
|
|
2512
2651
|
|
|
2513
2652
|
var flagRequirePhone = getQueryVariable('phone_required') === 'true'; // Get prevProps
|
|
2514
2653
|
|
|
@@ -2709,7 +2848,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2709
2848
|
switch (_context5.prev = _context5.next) {
|
|
2710
2849
|
case 0:
|
|
2711
2850
|
if (!(skipPage && !_isEmpty(ticketsQuantity) && !showDOB)) {
|
|
2712
|
-
_context5.next =
|
|
2851
|
+
_context5.next = 17;
|
|
2713
2852
|
break;
|
|
2714
2853
|
}
|
|
2715
2854
|
|
|
@@ -2721,29 +2860,30 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2721
2860
|
|
|
2722
2861
|
case 6:
|
|
2723
2862
|
res = _context5.sent;
|
|
2863
|
+
removeReferralKey();
|
|
2724
2864
|
onSkipBillingPage(_get(res, 'data.data.attributes'));
|
|
2725
2865
|
setLoading(false);
|
|
2726
|
-
_context5.next =
|
|
2866
|
+
_context5.next = 15;
|
|
2727
2867
|
break;
|
|
2728
2868
|
|
|
2729
|
-
case
|
|
2730
|
-
_context5.prev =
|
|
2869
|
+
case 12:
|
|
2870
|
+
_context5.prev = 12;
|
|
2731
2871
|
_context5.t0 = _context5["catch"](3);
|
|
2732
2872
|
onSubmitError(_context5.t0);
|
|
2733
2873
|
|
|
2734
|
-
case
|
|
2735
|
-
_context5.next =
|
|
2874
|
+
case 15:
|
|
2875
|
+
_context5.next = 18;
|
|
2736
2876
|
break;
|
|
2737
2877
|
|
|
2738
|
-
case
|
|
2878
|
+
case 17:
|
|
2739
2879
|
setLoading(false);
|
|
2740
2880
|
|
|
2741
|
-
case
|
|
2881
|
+
case 18:
|
|
2742
2882
|
case "end":
|
|
2743
2883
|
return _context5.stop();
|
|
2744
2884
|
}
|
|
2745
2885
|
}
|
|
2746
|
-
}, _callee5, null, [[3,
|
|
2886
|
+
}, _callee5, null, [[3, 12]]);
|
|
2747
2887
|
}));
|
|
2748
2888
|
|
|
2749
2889
|
return function collectPaymentData() {
|
|
@@ -2768,10 +2908,19 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2768
2908
|
}
|
|
2769
2909
|
|
|
2770
2910
|
return checkoutBody;
|
|
2911
|
+
};
|
|
2912
|
+
|
|
2913
|
+
var removeReferralKey = function removeReferralKey() {
|
|
2914
|
+
localStorage.removeItem('referral_key');
|
|
2771
2915
|
}; // Displaying loader
|
|
2772
2916
|
|
|
2773
2917
|
|
|
2774
|
-
if (loading) {
|
|
2918
|
+
if (loading || enableTimer && !expirationTime && typeof window !== 'undefined') {
|
|
2919
|
+
if (expirationTime === 0) {
|
|
2920
|
+
// Redirect to homepage (countdown finished and browser reloaded case)
|
|
2921
|
+
window.location.href = '/';
|
|
2922
|
+
}
|
|
2923
|
+
|
|
2775
2924
|
return React.createElement(Backdrop, {
|
|
2776
2925
|
sx: {
|
|
2777
2926
|
color: '#fff'
|
|
@@ -2784,7 +2933,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2784
2933
|
|
|
2785
2934
|
return React.createElement(ThemeProvider, {
|
|
2786
2935
|
theme: themeMui
|
|
2787
|
-
}, expirationTime && enableTimer && React.createElement(TimerWidget, {
|
|
2936
|
+
}, !!expirationTime && enableTimer && React.createElement(TimerWidget$1, {
|
|
2788
2937
|
expires_at: expirationTime,
|
|
2789
2938
|
onCountdownFinish: onCountdownFinish
|
|
2790
2939
|
}), React.createElement(Formik, {
|
|
@@ -2806,7 +2955,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2806
2955
|
_context6.prev = 0;
|
|
2807
2956
|
|
|
2808
2957
|
if (!isLoggedIn) {
|
|
2809
|
-
_context6.next =
|
|
2958
|
+
_context6.next = 16;
|
|
2810
2959
|
break;
|
|
2811
2960
|
}
|
|
2812
2961
|
|
|
@@ -2834,10 +2983,11 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2834
2983
|
|
|
2835
2984
|
case 12:
|
|
2836
2985
|
_res = _context6.sent;
|
|
2986
|
+
removeReferralKey();
|
|
2837
2987
|
handleSubmit(values, formikHelpers, eventId, _res);
|
|
2838
2988
|
return _context6.abrupt("return");
|
|
2839
2989
|
|
|
2840
|
-
case
|
|
2990
|
+
case 16:
|
|
2841
2991
|
checkoutBodyForRegistration = createCheckoutDataBody(ticketsQuantity.length, values, {
|
|
2842
2992
|
emailLogged: emailLogged,
|
|
2843
2993
|
firstNameLogged: firstNameLogged,
|
|
@@ -2845,11 +2995,11 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2845
2995
|
}, showDOB);
|
|
2846
2996
|
bodyFormData = createRegisterFormData(values, checkoutBodyForRegistration);
|
|
2847
2997
|
access_token_register = null;
|
|
2848
|
-
_context6.prev =
|
|
2849
|
-
_context6.next =
|
|
2998
|
+
_context6.prev = 19;
|
|
2999
|
+
_context6.next = 22;
|
|
2850
3000
|
return register(bodyFormData);
|
|
2851
3001
|
|
|
2852
|
-
case
|
|
3002
|
+
case 22:
|
|
2853
3003
|
resRegister = _context6.sent;
|
|
2854
3004
|
access_token_register = _get(resRegister, 'data.data.attributes.access_token');
|
|
2855
3005
|
refreshToken = _get(resRegister, 'data.data.attributes.refresh_token');
|
|
@@ -2859,12 +3009,12 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2859
3009
|
refreshToken: refreshToken
|
|
2860
3010
|
};
|
|
2861
3011
|
onRegisterSuccess(tokens);
|
|
2862
|
-
_context6.next =
|
|
3012
|
+
_context6.next = 34;
|
|
2863
3013
|
break;
|
|
2864
3014
|
|
|
2865
|
-
case
|
|
2866
|
-
_context6.prev =
|
|
2867
|
-
_context6.t0 = _context6["catch"](
|
|
3015
|
+
case 30:
|
|
3016
|
+
_context6.prev = 30;
|
|
3017
|
+
_context6.t0 = _context6["catch"](19);
|
|
2868
3018
|
|
|
2869
3019
|
if (axios.isAxiosError(_context6.t0)) {
|
|
2870
3020
|
_error = _context6.t0 == null ? void 0 : (_e$response = _context6.t0.response) == null ? void 0 : (_e$response$data = _e$response.data) == null ? void 0 : _e$response$data.message;
|
|
@@ -2893,11 +3043,11 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2893
3043
|
|
|
2894
3044
|
return _context6.abrupt("return");
|
|
2895
3045
|
|
|
2896
|
-
case
|
|
2897
|
-
_context6.next =
|
|
3046
|
+
case 34:
|
|
3047
|
+
_context6.next = 36;
|
|
2898
3048
|
return getProfileData(access_token_register);
|
|
2899
3049
|
|
|
2900
|
-
case
|
|
3050
|
+
case 36:
|
|
2901
3051
|
profileData = _context6.sent;
|
|
2902
3052
|
profileSpecifiedData = _get(profileData, 'data.data');
|
|
2903
3053
|
profileDataObj = setLoggedUserData(profileSpecifiedData);
|
|
@@ -2907,17 +3057,18 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2907
3057
|
}
|
|
2908
3058
|
|
|
2909
3059
|
checkoutBody = collectCheckoutBody(values);
|
|
2910
|
-
_context6.next =
|
|
3060
|
+
_context6.next = 43;
|
|
2911
3061
|
return postOnCheckout(checkoutBody, access_token_register);
|
|
2912
3062
|
|
|
2913
|
-
case
|
|
3063
|
+
case 43:
|
|
2914
3064
|
res = _context6.sent;
|
|
3065
|
+
removeReferralKey();
|
|
2915
3066
|
handleSubmit(values, formikHelpers, eventId, res);
|
|
2916
|
-
_context6.next =
|
|
3067
|
+
_context6.next = 51;
|
|
2917
3068
|
break;
|
|
2918
3069
|
|
|
2919
|
-
case
|
|
2920
|
-
_context6.prev =
|
|
3070
|
+
case 48:
|
|
3071
|
+
_context6.prev = 48;
|
|
2921
3072
|
_context6.t1 = _context6["catch"](0);
|
|
2922
3073
|
|
|
2923
3074
|
if (axios.isAxiosError(_context6.t1)) {
|
|
@@ -2937,12 +3088,12 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2937
3088
|
onSubmitError(_context6.t1);
|
|
2938
3089
|
}
|
|
2939
3090
|
|
|
2940
|
-
case
|
|
3091
|
+
case 51:
|
|
2941
3092
|
case "end":
|
|
2942
3093
|
return _context6.stop();
|
|
2943
3094
|
}
|
|
2944
3095
|
}
|
|
2945
|
-
}, _callee6, null, [[0,
|
|
3096
|
+
}, _callee6, null, [[0, 48], [19, 30]]);
|
|
2946
3097
|
}));
|
|
2947
3098
|
|
|
2948
3099
|
function onSubmit(_x2, _x3) {
|
|
@@ -3020,10 +3171,6 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
3020
3171
|
el.required = flagRequirePhone;
|
|
3021
3172
|
}
|
|
3022
3173
|
|
|
3023
|
-
if (el.name === 'street_address') {
|
|
3024
|
-
el.required = true;
|
|
3025
|
-
}
|
|
3026
|
-
|
|
3027
3174
|
return true;
|
|
3028
3175
|
}), function (element) {
|
|
3029
3176
|
return ['password', 'confirmPassword', 'password-info'].includes(element.name) && isLoggedIn ? null : React.createElement(React.Fragment, {
|
|
@@ -3037,7 +3184,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
3037
3184
|
validate: getValidateFunctions(element, states, props.values),
|
|
3038
3185
|
setFieldValue: props.setFieldValue,
|
|
3039
3186
|
onBlur: props.handleBlur,
|
|
3040
|
-
component: element.type === 'checkbox' ? CheckboxField : element.type === 'select' ? SelectField : element.type === 'phone' ? FormikPhoneNumberField : CustomField,
|
|
3187
|
+
component: element.type === 'checkbox' ? CheckboxField : element.type === 'select' ? SelectField : element.type === 'phone' ? FormikPhoneNumberField : element.type === 'date' ? DatePickerField : CustomField,
|
|
3041
3188
|
selectOptions: element.name === 'country' ? countries : element.name === 'state' ? states : [],
|
|
3042
3189
|
theme: theme
|
|
3043
3190
|
})));
|
|
@@ -3179,7 +3326,7 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
3179
3326
|
while (1) {
|
|
3180
3327
|
switch (_context.prev = _context.next) {
|
|
3181
3328
|
case 0:
|
|
3182
|
-
|
|
3329
|
+
setStripeError(null);
|
|
3183
3330
|
_context.prev = 1;
|
|
3184
3331
|
event.preventDefault();
|
|
3185
3332
|
|
|
@@ -3239,17 +3386,18 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
3239
3386
|
return _context.abrupt("return");
|
|
3240
3387
|
|
|
3241
3388
|
case 20:
|
|
3242
|
-
|
|
3389
|
+
handleSetLoading(true);
|
|
3390
|
+
_context.next = 23;
|
|
3243
3391
|
return stripe.confirmCardPayment(stripe_client_secret, {
|
|
3244
3392
|
payment_method: paymentMethodReq.paymentMethod.id
|
|
3245
3393
|
});
|
|
3246
3394
|
|
|
3247
|
-
case
|
|
3395
|
+
case 23:
|
|
3248
3396
|
_yield$stripe$confirm = _context.sent;
|
|
3249
3397
|
_error = _yield$stripe$confirm.error;
|
|
3250
3398
|
|
|
3251
3399
|
if (!_error) {
|
|
3252
|
-
_context.next =
|
|
3400
|
+
_context.next = 29;
|
|
3253
3401
|
break;
|
|
3254
3402
|
}
|
|
3255
3403
|
|
|
@@ -3257,22 +3405,22 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
3257
3405
|
handleSetLoading(false);
|
|
3258
3406
|
return _context.abrupt("return");
|
|
3259
3407
|
|
|
3260
|
-
case
|
|
3408
|
+
case 29:
|
|
3261
3409
|
onSubmit(null);
|
|
3262
|
-
_context.next =
|
|
3410
|
+
_context.next = 35;
|
|
3263
3411
|
break;
|
|
3264
3412
|
|
|
3265
|
-
case
|
|
3266
|
-
_context.prev =
|
|
3413
|
+
case 32:
|
|
3414
|
+
_context.prev = 32;
|
|
3267
3415
|
_context.t0 = _context["catch"](1);
|
|
3268
3416
|
onSubmit(_context.t0);
|
|
3269
3417
|
|
|
3270
|
-
case
|
|
3418
|
+
case 35:
|
|
3271
3419
|
case "end":
|
|
3272
3420
|
return _context.stop();
|
|
3273
3421
|
}
|
|
3274
3422
|
}
|
|
3275
|
-
}, _callee, null, [[1,
|
|
3423
|
+
}, _callee, null, [[1, 32]]);
|
|
3276
3424
|
}));
|
|
3277
3425
|
|
|
3278
3426
|
return function handleSubmit(_x) {
|
|
@@ -3582,37 +3730,36 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
3582
3730
|
_context3.prev = 0;
|
|
3583
3731
|
|
|
3584
3732
|
if (!error) {
|
|
3585
|
-
_context3.next =
|
|
3733
|
+
_context3.next = 3;
|
|
3586
3734
|
break;
|
|
3587
3735
|
}
|
|
3588
3736
|
|
|
3589
|
-
setPaymentIsLoading(false);
|
|
3590
3737
|
throw error;
|
|
3591
3738
|
|
|
3592
|
-
case
|
|
3739
|
+
case 3:
|
|
3593
3740
|
order_hash = reviewData.order_details.order_hash;
|
|
3594
3741
|
|
|
3595
3742
|
if (!(total === "0.00")) {
|
|
3596
|
-
_context3.next =
|
|
3743
|
+
_context3.next = 10;
|
|
3597
3744
|
break;
|
|
3598
3745
|
}
|
|
3599
3746
|
|
|
3600
|
-
_context3.next =
|
|
3747
|
+
_context3.next = 7;
|
|
3601
3748
|
return handleFreeSuccess(order_hash);
|
|
3602
3749
|
|
|
3603
|
-
case
|
|
3750
|
+
case 7:
|
|
3604
3751
|
_context3.t0 = _context3.sent;
|
|
3605
|
-
_context3.next =
|
|
3752
|
+
_context3.next = 13;
|
|
3606
3753
|
break;
|
|
3607
3754
|
|
|
3608
|
-
case
|
|
3609
|
-
_context3.next =
|
|
3755
|
+
case 10:
|
|
3756
|
+
_context3.next = 12;
|
|
3610
3757
|
return handlePaymentSuccess(order_hash);
|
|
3611
3758
|
|
|
3612
|
-
case
|
|
3759
|
+
case 12:
|
|
3613
3760
|
_context3.t0 = _context3.sent;
|
|
3614
3761
|
|
|
3615
|
-
case
|
|
3762
|
+
case 13:
|
|
3616
3763
|
paymentSuccessResponse = _context3.t0;
|
|
3617
3764
|
|
|
3618
3765
|
if (paymentSuccessResponse.status === 200) {
|
|
@@ -3623,10 +3770,11 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
3623
3770
|
_context3.next = 22;
|
|
3624
3771
|
break;
|
|
3625
3772
|
|
|
3626
|
-
case
|
|
3627
|
-
_context3.prev =
|
|
3773
|
+
case 17:
|
|
3774
|
+
_context3.prev = 17;
|
|
3628
3775
|
_context3.t1 = _context3["catch"](0);
|
|
3629
3776
|
setError(_get(_context3.t1, 'response.data.message'));
|
|
3777
|
+
setPaymentIsLoading(false);
|
|
3630
3778
|
onPaymentError(_context3.t1.response);
|
|
3631
3779
|
|
|
3632
3780
|
case 22:
|
|
@@ -3634,7 +3782,7 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
3634
3782
|
return _context3.stop();
|
|
3635
3783
|
}
|
|
3636
3784
|
}
|
|
3637
|
-
}, _callee3, null, [[0,
|
|
3785
|
+
}, _callee3, null, [[0, 17]]);
|
|
3638
3786
|
}));
|
|
3639
3787
|
|
|
3640
3788
|
return function handlePaymentMiddleWare(_x) {
|
|
@@ -3647,7 +3795,7 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
3647
3795
|
theme: themeMui
|
|
3648
3796
|
}, React.createElement("div", {
|
|
3649
3797
|
className: "payment_page"
|
|
3650
|
-
},
|
|
3798
|
+
}, enableTimer && React.createElement(TimerWidget$1, {
|
|
3651
3799
|
expires_at: _get(reviewData, 'expires_at', 0),
|
|
3652
3800
|
buyLoading: paymentIsLoading,
|
|
3653
3801
|
onCountdownFinish: onCountdownFinish
|
|
@@ -3705,6 +3853,7 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
3705
3853
|
disabled: paymentIsLoading,
|
|
3706
3854
|
type: "button",
|
|
3707
3855
|
onClick: function onClick() {
|
|
3856
|
+
setPaymentIsLoading(true);
|
|
3708
3857
|
handlePaymentMiddleWare(null);
|
|
3709
3858
|
}
|
|
3710
3859
|
}, paymentIsLoading ? React.createElement(CircularProgress, {
|
|
@@ -4141,11 +4290,12 @@ var TicketsSection = function TicketsSection(_ref) {
|
|
|
4141
4290
|
var ticketsList = _ref.ticketsList,
|
|
4142
4291
|
selectedTickets = _ref.selectedTickets,
|
|
4143
4292
|
handleTicketSelect = _ref.handleTicketSelect,
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4293
|
+
codeIsApplied = _ref.codeIsApplied,
|
|
4294
|
+
sortBySoldOut = _ref.sortBySoldOut,
|
|
4295
|
+
ticketsHeaderComponent = _ref.ticketsHeaderComponent,
|
|
4296
|
+
hideTicketsHeader = _ref.hideTicketsHeader;
|
|
4297
|
+
var sortedTicketsList = sortBySoldOut ? _sortBy(_sortBy(ticketsList, 'sortOrder'), 'soldOut') : _sortBy(ticketsList, 'sortOrder');
|
|
4298
|
+
return React.createElement(React.Fragment, null, !hideTicketsHeader && ticketsHeaderComponent, sortedTicketsList.map(function (ticket, i, arr) {
|
|
4149
4299
|
var isSoldOut = ticket.sold_out || !ticket.displayTicket || ticket.soldOut;
|
|
4150
4300
|
|
|
4151
4301
|
var ticketSelect = function ticketSelect(event) {
|
|
@@ -4155,12 +4305,12 @@ var TicketsSection = function TicketsSection(_ref) {
|
|
|
4155
4305
|
|
|
4156
4306
|
var ticketIsDiscounted = false;
|
|
4157
4307
|
|
|
4158
|
-
if (ticket.oldPrice &&
|
|
4308
|
+
if (ticket.oldPrice && codeIsApplied && !isSoldOut && ticket.oldPrice !== ticket.price) {
|
|
4159
4309
|
ticketIsDiscounted = true;
|
|
4160
4310
|
}
|
|
4161
4311
|
|
|
4162
|
-
var ticketIsFree =
|
|
4163
|
-
var ticketPrice = isSoldOut ? 'SOLD OUT' : ticketIsFree ? 'FREE' : "$ " + (+ticket.
|
|
4312
|
+
var ticketIsFree = +ticket.price === 0;
|
|
4313
|
+
var ticketPrice = isSoldOut ? 'SOLD OUT' : ticketIsFree ? 'FREE' : "$ " + (+ticket.price).toFixed(2);
|
|
4164
4314
|
return React.createElement("div", {
|
|
4165
4315
|
key: ticket.id || ticket.name,
|
|
4166
4316
|
className: "event-detail__tier " + (isSoldOut ? 'disabled' : '')
|
|
@@ -4352,36 +4502,14 @@ var WaitingList = function WaitingList(_ref) {
|
|
|
4352
4502
|
}) : 'ADD TO WAITING LIST')))));
|
|
4353
4503
|
};
|
|
4354
4504
|
|
|
4355
|
-
var getImage = function getImage(name) {
|
|
4356
|
-
if (name === void 0) {
|
|
4357
|
-
name = '';
|
|
4358
|
-
}
|
|
4359
|
-
|
|
4360
|
-
var image = '';
|
|
4361
|
-
|
|
4362
|
-
if (!name.trim().length) {
|
|
4363
|
-
return image;
|
|
4364
|
-
}
|
|
4365
|
-
|
|
4366
|
-
if (process.env.NODE_ENV === 'production') {
|
|
4367
|
-
image = require("./images/" + name);
|
|
4368
|
-
return image["default"];
|
|
4369
|
-
}
|
|
4370
|
-
|
|
4371
|
-
return image;
|
|
4372
|
-
};
|
|
4373
|
-
|
|
4374
4505
|
var PromoCodeSection = function PromoCodeSection(_ref) {
|
|
4375
|
-
var
|
|
4376
|
-
|
|
4506
|
+
var code = _ref.code,
|
|
4507
|
+
codeIsApplied = _ref.codeIsApplied,
|
|
4377
4508
|
showPromoInput = _ref.showPromoInput,
|
|
4378
|
-
|
|
4379
|
-
setPromoCode = _ref.setPromoCode,
|
|
4380
|
-
setPromoCodeUpdated = _ref.setPromoCodeUpdated,
|
|
4509
|
+
setCode = _ref.setCode,
|
|
4381
4510
|
setShowPromoInput = _ref.setShowPromoInput,
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
var isPromoCodeHasValue = !!promoCode.trim();
|
|
4511
|
+
updateTickets = _ref.updateTickets;
|
|
4512
|
+
var isPromoCodeHasValue = !!code.trim();
|
|
4385
4513
|
|
|
4386
4514
|
var renderInputField = function renderInputField() {
|
|
4387
4515
|
return React.createElement("div", {
|
|
@@ -4390,30 +4518,30 @@ var PromoCodeSection = function PromoCodeSection(_ref) {
|
|
|
4390
4518
|
className: "promo-code-block"
|
|
4391
4519
|
}, React.createElement("p", {
|
|
4392
4520
|
className: "promo-code-text"
|
|
4393
|
-
},
|
|
4521
|
+
}, "Promo code")), React.createElement("input", {
|
|
4394
4522
|
className: "promo-code-input",
|
|
4395
4523
|
placeholder: "",
|
|
4396
4524
|
onChange: function onChange(e) {
|
|
4397
|
-
|
|
4525
|
+
setCode(e.target.value);
|
|
4398
4526
|
},
|
|
4399
4527
|
onKeyPress: function onKeyPress(event) {
|
|
4400
4528
|
if (event.key === 'Enter' && isPromoCodeHasValue) {
|
|
4401
|
-
setPromoCodeUpdated(promoCode);
|
|
4402
4529
|
setShowPromoInput(false);
|
|
4530
|
+
updateTickets(true);
|
|
4403
4531
|
}
|
|
4404
4532
|
}
|
|
4405
4533
|
}), React.createElement(Button$1, {
|
|
4406
4534
|
className: "promo-submit-button",
|
|
4407
4535
|
onClick: function onClick() {
|
|
4408
4536
|
if (isPromoCodeHasValue) {
|
|
4409
|
-
setPromoCodeUpdated(promoCode);
|
|
4410
4537
|
setShowPromoInput(false);
|
|
4538
|
+
updateTickets(true);
|
|
4411
4539
|
}
|
|
4412
4540
|
}
|
|
4413
|
-
},
|
|
4541
|
+
}, "APPLY"));
|
|
4414
4542
|
};
|
|
4415
4543
|
|
|
4416
|
-
return
|
|
4544
|
+
return React.createElement("div", null, codeIsApplied ? React.createElement("div", {
|
|
4417
4545
|
className: "alert-info"
|
|
4418
4546
|
}, React.createElement(SVG, {
|
|
4419
4547
|
src: getImage('done.svg'),
|
|
@@ -4422,13 +4550,45 @@ var PromoCodeSection = function PromoCodeSection(_ref) {
|
|
|
4422
4550
|
}
|
|
4423
4551
|
}), React.createElement("p", {
|
|
4424
4552
|
className: "promo-code-success"
|
|
4425
|
-
}, "PROMO CODE APPLIED SUCCESSFULLY")) : null,
|
|
4553
|
+
}, "PROMO CODE APPLIED SUCCESSFULLY")) : null, !showPromoInput && React.createElement(Button$1, {
|
|
4426
4554
|
className: "promo-code-button",
|
|
4427
4555
|
placeholder: "Promo Codes",
|
|
4428
4556
|
onClick: function onClick() {
|
|
4429
4557
|
setShowPromoInput(true);
|
|
4430
4558
|
}
|
|
4431
|
-
}, "Got a promo code? Click here")
|
|
4559
|
+
}, "Got a promo code? Click here"), showPromoInput && renderInputField());
|
|
4560
|
+
};
|
|
4561
|
+
|
|
4562
|
+
var AccessCodeSection = function AccessCodeSection(_ref) {
|
|
4563
|
+
var code = _ref.code,
|
|
4564
|
+
setCode = _ref.setCode,
|
|
4565
|
+
updateTickets = _ref.updateTickets;
|
|
4566
|
+
var isAccessCodeHasValue = !!code.trim();
|
|
4567
|
+
return React.createElement("div", {
|
|
4568
|
+
className: "access-code-block"
|
|
4569
|
+
}, React.createElement("div", {
|
|
4570
|
+
className: "access-code-block"
|
|
4571
|
+
}, React.createElement("p", {
|
|
4572
|
+
className: "access-code-text"
|
|
4573
|
+
}, "Access code required")), React.createElement("input", {
|
|
4574
|
+
className: "access-code-input",
|
|
4575
|
+
placeholder: "",
|
|
4576
|
+
onChange: function onChange(e) {
|
|
4577
|
+
setCode(e.target.value);
|
|
4578
|
+
},
|
|
4579
|
+
onKeyPress: function onKeyPress(event) {
|
|
4580
|
+
if (event.key === 'Enter' && isAccessCodeHasValue) {
|
|
4581
|
+
updateTickets(true);
|
|
4582
|
+
}
|
|
4583
|
+
}
|
|
4584
|
+
}), React.createElement(Button$1, {
|
|
4585
|
+
className: "access-submit-button",
|
|
4586
|
+
onClick: function onClick() {
|
|
4587
|
+
if (isAccessCodeHasValue) {
|
|
4588
|
+
updateTickets(true);
|
|
4589
|
+
}
|
|
4590
|
+
}
|
|
4591
|
+
}, "ENTER"));
|
|
4432
4592
|
};
|
|
4433
4593
|
|
|
4434
4594
|
var isTimeExpired = function isTimeExpired(startDate, timezone) {
|
|
@@ -4443,8 +4603,11 @@ function Countdown(_ref) {
|
|
|
4443
4603
|
title = _ref$title === void 0 ? '' : _ref$title,
|
|
4444
4604
|
_ref$message = _ref.message,
|
|
4445
4605
|
message = _ref$message === void 0 ? '' : _ref$message,
|
|
4606
|
+
_ref$disableLeadingZe = _ref.disableLeadingZero,
|
|
4607
|
+
disableLeadingZero = _ref$disableLeadingZe === void 0 ? false : _ref$disableLeadingZe,
|
|
4446
4608
|
_ref$callback = _ref.callback,
|
|
4447
|
-
callback = _ref$callback === void 0 ? function () {} : _ref$callback
|
|
4609
|
+
callback = _ref$callback === void 0 ? function () {} : _ref$callback,
|
|
4610
|
+
isLoggedIn = _ref.isLoggedIn;
|
|
4448
4611
|
|
|
4449
4612
|
var _useState = useState(''),
|
|
4450
4613
|
duration = _useState[0],
|
|
@@ -4466,6 +4629,7 @@ function Countdown(_ref) {
|
|
|
4466
4629
|
clearInterval(timer);
|
|
4467
4630
|
setTimeExpired(true);
|
|
4468
4631
|
callback();
|
|
4632
|
+
return;
|
|
4469
4633
|
}
|
|
4470
4634
|
|
|
4471
4635
|
var currentDate = moment.tz(moment(), timezone).format('YYYY-MM-DD HH:mm:ss');
|
|
@@ -4483,7 +4647,11 @@ function Countdown(_ref) {
|
|
|
4483
4647
|
|
|
4484
4648
|
for (var date in dateArr) {
|
|
4485
4649
|
var unit = dateArr[date] === 1 ? date : date + 's';
|
|
4486
|
-
var val =
|
|
4650
|
+
var val = dateArr[date];
|
|
4651
|
+
|
|
4652
|
+
if (!disableLeadingZero && String(dateArr[date]).length === 1) {
|
|
4653
|
+
val = '0' + dateArr[date];
|
|
4654
|
+
}
|
|
4487
4655
|
|
|
4488
4656
|
if (timeLeft) {
|
|
4489
4657
|
timeLeft += ", " + val + " " + unit;
|
|
@@ -4501,7 +4669,7 @@ function Countdown(_ref) {
|
|
|
4501
4669
|
};
|
|
4502
4670
|
}, [timeExpired]);
|
|
4503
4671
|
return React.createElement(React.Fragment, null, !timeExpired && duration && React.createElement("div", {
|
|
4504
|
-
className: 'countdown'
|
|
4672
|
+
className: "countdown " + (!isLoggedIn ? 'countdown-on-bottom' : '')
|
|
4505
4673
|
}, React.createElement("div", null, React.createElement("p", {
|
|
4506
4674
|
className: 'title'
|
|
4507
4675
|
}, title), React.createElement("p", null, duration)), React.createElement("p", {
|
|
@@ -4516,7 +4684,8 @@ var ReferralLogic = function ReferralLogic(props) {
|
|
|
4516
4684
|
if (isWindowDefined) {
|
|
4517
4685
|
var params = new URL("" + window.location).searchParams;
|
|
4518
4686
|
var referralId = params.get('ttf_r') || '';
|
|
4519
|
-
var
|
|
4687
|
+
var referralValue = [eventId, '.', referralId].join('');
|
|
4688
|
+
var isAlreadyCounted = localStorage.getItem('referral_key') === referralValue;
|
|
4520
4689
|
|
|
4521
4690
|
if (referralId && eventId && !isAlreadyCounted) {
|
|
4522
4691
|
_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
|
|
@@ -4529,7 +4698,7 @@ var ReferralLogic = function ReferralLogic(props) {
|
|
|
4529
4698
|
return postReferralVisits("" + eventId, referralId);
|
|
4530
4699
|
|
|
4531
4700
|
case 3:
|
|
4532
|
-
localStorage.setItem('referral_key',
|
|
4701
|
+
localStorage.setItem('referral_key', referralValue);
|
|
4533
4702
|
_context.next = 8;
|
|
4534
4703
|
break;
|
|
4535
4704
|
|
|
@@ -4577,7 +4746,17 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
4577
4746
|
_ref$hideWaitingList = _ref.hideWaitingList,
|
|
4578
4747
|
hideWaitingList = _ref$hideWaitingList === void 0 ? false : _ref$hideWaitingList,
|
|
4579
4748
|
_ref$isButtonScrollab = _ref.isButtonScrollable,
|
|
4580
|
-
isButtonScrollable = _ref$isButtonScrollab === void 0 ? false : _ref$isButtonScrollab
|
|
4749
|
+
isButtonScrollable = _ref$isButtonScrollab === void 0 ? false : _ref$isButtonScrollab,
|
|
4750
|
+
_ref$sortBySoldOut = _ref.sortBySoldOut,
|
|
4751
|
+
sortBySoldOut = _ref$sortBySoldOut === void 0 ? false : _ref$sortBySoldOut,
|
|
4752
|
+
_ref$disableCountdown = _ref.disableCountdownLeadingZero,
|
|
4753
|
+
disableCountdownLeadingZero = _ref$disableCountdown === void 0 ? false : _ref$disableCountdown,
|
|
4754
|
+
_ref$isLoggedIn = _ref.isLoggedIn,
|
|
4755
|
+
isLoggedIn = _ref$isLoggedIn === void 0 ? false : _ref$isLoggedIn,
|
|
4756
|
+
ActionsSectionComponent = _ref.actionsSectionComponent,
|
|
4757
|
+
ticketsHeaderComponent = _ref.ticketsHeaderComponent,
|
|
4758
|
+
_ref$hideTicketsHeade = _ref.hideTicketsHeader,
|
|
4759
|
+
hideTicketsHeader = _ref$hideTicketsHeade === void 0 ? false : _ref$hideTicketsHeade;
|
|
4581
4760
|
|
|
4582
4761
|
var _useState = useState({}),
|
|
4583
4762
|
selectedTickets = _useState[0],
|
|
@@ -4605,33 +4784,37 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
4605
4784
|
showWaitingList = _useState6[0],
|
|
4606
4785
|
setShowWaitingList = _useState6[1];
|
|
4607
4786
|
|
|
4608
|
-
var _useState7 = useState(
|
|
4787
|
+
var _useState7 = useState(true),
|
|
4609
4788
|
isLoading = _useState7[0],
|
|
4610
4789
|
setIsLoading = _useState7[1];
|
|
4611
4790
|
|
|
4612
4791
|
var _useState8 = useState(false),
|
|
4613
|
-
|
|
4614
|
-
|
|
4792
|
+
codeIsLoading = _useState8[0],
|
|
4793
|
+
setCodeIsLoading = _useState8[1];
|
|
4615
4794
|
|
|
4616
4795
|
var _useState9 = useState(false),
|
|
4617
4796
|
handleBookIsLoading = _useState9[0],
|
|
4618
4797
|
setHandleBookIsLoading = _useState9[1];
|
|
4619
4798
|
|
|
4620
|
-
var _useState10 = useState(''),
|
|
4621
|
-
|
|
4622
|
-
|
|
4799
|
+
var _useState10 = useState(getQueryVariable('r') || queryPromoCode),
|
|
4800
|
+
code = _useState10[0],
|
|
4801
|
+
setCode = _useState10[1];
|
|
4623
4802
|
|
|
4624
|
-
var _useState11 = useState(
|
|
4625
|
-
|
|
4626
|
-
|
|
4803
|
+
var _useState11 = useState(false),
|
|
4804
|
+
showPromoInput = _useState11[0],
|
|
4805
|
+
setShowPromoInput = _useState11[1];
|
|
4627
4806
|
|
|
4628
4807
|
var _useState12 = useState(false),
|
|
4629
|
-
|
|
4630
|
-
|
|
4808
|
+
codeIsApplied = _useState12[0],
|
|
4809
|
+
setCodeIsApplied = _useState12[1];
|
|
4631
4810
|
|
|
4632
|
-
var _useState13 = useState(
|
|
4633
|
-
|
|
4634
|
-
|
|
4811
|
+
var _useState13 = useState(isAccessCodeEnabled),
|
|
4812
|
+
showAccessCodeSection = _useState13[0],
|
|
4813
|
+
setShowAccessCodeSection = _useState13[1];
|
|
4814
|
+
|
|
4815
|
+
var _useState14 = useState(isPromotionsEnabled),
|
|
4816
|
+
showPromoCodeSection = _useState14[0],
|
|
4817
|
+
setShowPromoCodeSection = _useState14[1];
|
|
4635
4818
|
|
|
4636
4819
|
var ticketsContainerRef = useRef(null);
|
|
4637
4820
|
useEffect(function () {
|
|
@@ -4649,8 +4832,8 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
4649
4832
|
}
|
|
4650
4833
|
}, []);
|
|
4651
4834
|
useEffect(function () {
|
|
4652
|
-
!!eventId && getTicketsApi(
|
|
4653
|
-
}, [eventId
|
|
4835
|
+
!!eventId && getTicketsApi();
|
|
4836
|
+
}, [eventId]);
|
|
4654
4837
|
|
|
4655
4838
|
var handleLogout = function handleLogout() {
|
|
4656
4839
|
if (isWindowDefined) {
|
|
@@ -4699,7 +4882,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
4699
4882
|
}
|
|
4700
4883
|
|
|
4701
4884
|
function _getTicketsApi() {
|
|
4702
|
-
_getTicketsApi = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(
|
|
4885
|
+
_getTicketsApi = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(isUpdateingCode) {
|
|
4703
4886
|
var response, eventResponse, attributes, _event2;
|
|
4704
4887
|
|
|
4705
4888
|
return runtime_1.wrap(function _callee2$(_context2) {
|
|
@@ -4707,27 +4890,27 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
4707
4890
|
switch (_context2.prev = _context2.next) {
|
|
4708
4891
|
case 0:
|
|
4709
4892
|
_context2.prev = 0;
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
return getTickets(eventId, promoCodeUpdated);
|
|
4893
|
+
isUpdateingCode ? setCodeIsLoading(true) : setIsLoading(true);
|
|
4894
|
+
_context2.next = 4;
|
|
4895
|
+
return getTickets(eventId, code);
|
|
4714
4896
|
|
|
4715
|
-
case
|
|
4897
|
+
case 4:
|
|
4716
4898
|
response = _context2.sent;
|
|
4717
|
-
_context2.next =
|
|
4899
|
+
_context2.next = 7;
|
|
4718
4900
|
return getEvent(eventId);
|
|
4719
4901
|
|
|
4720
|
-
case
|
|
4902
|
+
case 7:
|
|
4721
4903
|
eventResponse = _context2.sent;
|
|
4722
4904
|
|
|
4723
4905
|
if (response.data.success) {
|
|
4724
|
-
setCustomHeader(response);
|
|
4725
4906
|
attributes = _get(response, 'data.data.attributes');
|
|
4726
|
-
|
|
4907
|
+
setCodeIsApplied(attributes.ValidPromoCode);
|
|
4727
4908
|
setTickets(_get(attributes, 'tickets'));
|
|
4728
4909
|
setShowWaitingList(attributes.showWaitingList);
|
|
4729
4910
|
onGetTicketsSuccess(response.data);
|
|
4730
|
-
|
|
4911
|
+
setCode('');
|
|
4912
|
+
setShowAccessCodeSection(attributes.is_access_code);
|
|
4913
|
+
setShowPromoCodeSection(attributes.isPromotionsEnabled);
|
|
4731
4914
|
}
|
|
4732
4915
|
|
|
4733
4916
|
if (eventResponse.data.success) {
|
|
@@ -4735,29 +4918,29 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
4735
4918
|
setEvent(_event2);
|
|
4736
4919
|
}
|
|
4737
4920
|
|
|
4738
|
-
_context2.next =
|
|
4921
|
+
_context2.next = 15;
|
|
4739
4922
|
break;
|
|
4740
4923
|
|
|
4741
|
-
case
|
|
4742
|
-
_context2.prev =
|
|
4924
|
+
case 12:
|
|
4925
|
+
_context2.prev = 12;
|
|
4743
4926
|
_context2.t0 = _context2["catch"](0);
|
|
4744
4927
|
|
|
4745
4928
|
if (axios.isAxiosError(_context2.t0)) {
|
|
4746
4929
|
onGetTicketsError(_context2.t0);
|
|
4747
4930
|
}
|
|
4748
4931
|
|
|
4749
|
-
case
|
|
4750
|
-
_context2.prev =
|
|
4932
|
+
case 15:
|
|
4933
|
+
_context2.prev = 15;
|
|
4751
4934
|
setIsLoading(false);
|
|
4752
|
-
|
|
4753
|
-
return _context2.finish(
|
|
4935
|
+
setCodeIsLoading(false);
|
|
4936
|
+
return _context2.finish(15);
|
|
4754
4937
|
|
|
4755
|
-
case
|
|
4938
|
+
case 19:
|
|
4756
4939
|
case "end":
|
|
4757
4940
|
return _context2.stop();
|
|
4758
4941
|
}
|
|
4759
4942
|
}
|
|
4760
|
-
}, _callee2, null, [[0,
|
|
4943
|
+
}, _callee2, null, [[0, 12, 15, 19]]);
|
|
4761
4944
|
}));
|
|
4762
4945
|
return _getTicketsApi.apply(this, arguments);
|
|
4763
4946
|
}
|
|
@@ -4784,7 +4967,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
4784
4967
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
|
|
4785
4968
|
var _product_options, _product_options2, _ticket_types;
|
|
4786
4969
|
|
|
4787
|
-
var ticket, optionName, ticketId, ticketQuantity, data, result, _result$data$data$att, _result$data, _result$data$data, _result$data$data$att2, _result$data$data$att3, _result$data2, _result$data2$data, _result$data2$data$at, _result$data$data$att4, _result$data3, _result$data3$data, _result$data3$data$at, _result$data$data$att5, _result$data4, _result$data4$data, _result$data4$data$at, skipBillingPage, nameIsRequired, ageIsRequired, phoneIsRequired, hash, _isWindowDefined, userData, access_token, checkoutBody, checkoutResult;
|
|
4970
|
+
var ticket, optionName, ticketId, ticketQuantity, data, result, _result$data$data$att, _result$data, _result$data$data, _result$data$data$att2, _result$data$data$att3, _result$data2, _result$data2$data, _result$data2$data$at, _result$data$data$att4, _result$data3, _result$data3$data, _result$data3$data$at, _result$data$data$att5, _result$data4, _result$data4$data, _result$data4$data$at, skipBillingPage, nameIsRequired, ageIsRequired, phoneIsRequired, hash, total, _isWindowDefined, userData, access_token, checkoutBody, checkoutResult;
|
|
4788
4971
|
|
|
4789
4972
|
return runtime_1.wrap(function _callee$(_context) {
|
|
4790
4973
|
while (1) {
|
|
@@ -4817,19 +5000,19 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
4817
5000
|
result = _context.sent;
|
|
4818
5001
|
|
|
4819
5002
|
if (!(result.status === 200)) {
|
|
4820
|
-
_context.next =
|
|
5003
|
+
_context.next = 28;
|
|
4821
5004
|
break;
|
|
4822
5005
|
}
|
|
4823
5006
|
|
|
4824
|
-
setCustomHeader(result);
|
|
4825
5007
|
skipBillingPage = (_result$data$data$att = result == null ? void 0 : (_result$data = result.data) == null ? void 0 : (_result$data$data = _result$data.data) == null ? void 0 : (_result$data$data$att2 = _result$data$data.attributes) == null ? void 0 : _result$data$data$att2.skip_billing_page) != null ? _result$data$data$att : false;
|
|
4826
5008
|
nameIsRequired = (_result$data$data$att3 = result == null ? void 0 : (_result$data2 = result.data) == null ? void 0 : (_result$data2$data = _result$data2.data) == null ? void 0 : (_result$data2$data$at = _result$data2$data.attributes) == null ? void 0 : _result$data2$data$at.names_required) != null ? _result$data$data$att3 : false;
|
|
4827
5009
|
ageIsRequired = (_result$data$data$att4 = result == null ? void 0 : (_result$data3 = result.data) == null ? void 0 : (_result$data3$data = _result$data3.data) == null ? void 0 : (_result$data3$data$at = _result$data3$data.attributes) == null ? void 0 : _result$data3$data$at.age_required) != null ? _result$data$data$att4 : false;
|
|
4828
5010
|
phoneIsRequired = (_result$data$data$att5 = result == null ? void 0 : (_result$data4 = result.data) == null ? void 0 : (_result$data4$data = _result$data4.data) == null ? void 0 : (_result$data4$data$at = _result$data4$data.attributes) == null ? void 0 : _result$data4$data$at.phone_required) != null ? _result$data$data$att5 : false;
|
|
4829
5011
|
hash = '';
|
|
5012
|
+
total = '';
|
|
4830
5013
|
|
|
4831
5014
|
if (!skipBillingPage) {
|
|
4832
|
-
_context.next =
|
|
5015
|
+
_context.next = 27;
|
|
4833
5016
|
break;
|
|
4834
5017
|
}
|
|
4835
5018
|
|
|
@@ -4844,40 +5027,42 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
4844
5027
|
case 24:
|
|
4845
5028
|
checkoutResult = _context.sent;
|
|
4846
5029
|
hash = _get(checkoutResult, 'data.data.attributes.hash');
|
|
5030
|
+
total = _get(checkoutResult, 'data.data.attributes.total');
|
|
4847
5031
|
|
|
4848
|
-
case
|
|
5032
|
+
case 27:
|
|
4849
5033
|
onAddToCartSuccess({
|
|
4850
5034
|
skip_billing_page: skipBillingPage,
|
|
4851
5035
|
names_required: nameIsRequired,
|
|
4852
5036
|
phone_required: phoneIsRequired,
|
|
4853
5037
|
age_required: ageIsRequired,
|
|
4854
5038
|
event_id: String(eventId),
|
|
4855
|
-
hash: hash
|
|
5039
|
+
hash: hash,
|
|
5040
|
+
total: total
|
|
4856
5041
|
});
|
|
4857
5042
|
|
|
4858
|
-
case
|
|
4859
|
-
_context.next =
|
|
5043
|
+
case 28:
|
|
5044
|
+
_context.next = 33;
|
|
4860
5045
|
break;
|
|
4861
5046
|
|
|
4862
|
-
case
|
|
4863
|
-
_context.prev =
|
|
5047
|
+
case 30:
|
|
5048
|
+
_context.prev = 30;
|
|
4864
5049
|
_context.t0 = _context["catch"](6);
|
|
4865
5050
|
|
|
4866
5051
|
if (axios.isAxiosError(_context.t0)) {
|
|
4867
5052
|
onAddToCartError(_context.t0);
|
|
4868
5053
|
}
|
|
4869
5054
|
|
|
4870
|
-
case
|
|
4871
|
-
_context.prev =
|
|
5055
|
+
case 33:
|
|
5056
|
+
_context.prev = 33;
|
|
4872
5057
|
setHandleBookIsLoading(false);
|
|
4873
|
-
return _context.finish(
|
|
5058
|
+
return _context.finish(33);
|
|
4874
5059
|
|
|
4875
|
-
case
|
|
5060
|
+
case 36:
|
|
4876
5061
|
case "end":
|
|
4877
5062
|
return _context.stop();
|
|
4878
5063
|
}
|
|
4879
5064
|
}
|
|
4880
|
-
}, _callee, null, [[6,
|
|
5065
|
+
}, _callee, null, [[6, 30, 33, 36]]);
|
|
4881
5066
|
}));
|
|
4882
5067
|
|
|
4883
5068
|
return function handleBook() {
|
|
@@ -4885,14 +5070,10 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
4885
5070
|
};
|
|
4886
5071
|
}();
|
|
4887
5072
|
|
|
4888
|
-
var updateTickets = function updateTickets() {
|
|
4889
|
-
getTicketsApi();
|
|
5073
|
+
var updateTickets = function updateTickets(isUpdateingCode) {
|
|
5074
|
+
getTicketsApi(isUpdateingCode);
|
|
4890
5075
|
};
|
|
4891
5076
|
|
|
4892
|
-
var isAllTicketsSoldOut = _every(tickets, function (item) {
|
|
4893
|
-
return item.sold_out || item.soldOut;
|
|
4894
|
-
});
|
|
4895
|
-
|
|
4896
5077
|
var isTicketOnSale = _some(tickets, function (item) {
|
|
4897
5078
|
return item.salesStarted && !item.salesEnded && !item.soldOut;
|
|
4898
5079
|
});
|
|
@@ -4926,9 +5107,15 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
4926
5107
|
};
|
|
4927
5108
|
|
|
4928
5109
|
var bookButtonIsDisabled = handleBookIsLoading || _isEmpty(selectedTickets) || Object.values(selectedTickets)[0] === 0;
|
|
5110
|
+
var wrappedActionsSectionComponent = React.isValidElement(ActionsSectionComponent) ? React.cloneElement(ActionsSectionComponent, {
|
|
5111
|
+
handleGetTicketClick: handleGetTicketClick,
|
|
5112
|
+
isTicketOnSale: isTicketOnSale
|
|
5113
|
+
}) : null;
|
|
5114
|
+
var externalUrl = event == null ? void 0 : event.redirectUrl;
|
|
5115
|
+
var eventSaleIsNotStarted = !(event != null && event.salesStarted) && (event == null ? void 0 : event.salesStart);
|
|
4929
5116
|
return React.createElement(ThemeProvider$1, {
|
|
4930
5117
|
theme: themeMui
|
|
4931
|
-
}, React.createElement(ReferralLogic, {
|
|
5118
|
+
}, !isLoading && React.createElement(ReferralLogic, {
|
|
4932
5119
|
eventId: eventId
|
|
4933
5120
|
}), React.createElement("div", {
|
|
4934
5121
|
className: "get-tickets-page " + theme,
|
|
@@ -4939,32 +5126,37 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
4939
5126
|
ticketsList: tickets,
|
|
4940
5127
|
selectedTickets: selectedTickets,
|
|
4941
5128
|
handleTicketSelect: handleTicketSelect,
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
5129
|
+
codeIsApplied: codeIsApplied,
|
|
5130
|
+
sortBySoldOut: sortBySoldOut,
|
|
5131
|
+
ticketsHeaderComponent: ticketsHeaderComponent,
|
|
5132
|
+
hideTicketsHeader: hideTicketsHeader || _isEmpty(tickets)
|
|
5133
|
+
}), externalUrl ? null : event != null && event.salesEnded ? React.createElement("p", {
|
|
5134
|
+
className: "event-closed-message " + (!isLoggedIn ? 'event-closed-on-bottom' : '')
|
|
5135
|
+
}, "Sales for this event are closed.") : eventSaleIsNotStarted ? React.createElement(Countdown, {
|
|
4946
5136
|
startDate: event.salesStart,
|
|
4947
5137
|
timezone: event.timezone,
|
|
4948
5138
|
title: "Sales start in:",
|
|
4949
5139
|
message: "No tickets are currently available for this event.",
|
|
4950
|
-
callback: updateTickets
|
|
5140
|
+
callback: updateTickets,
|
|
5141
|
+
disableLeadingZero: disableCountdownLeadingZero,
|
|
5142
|
+
isLoggedIn: isLoggedIn
|
|
4951
5143
|
}) : null, showWaitingList && event.salesStarted && !hideWaitingList && React.createElement(WaitingList, {
|
|
4952
5144
|
tickets: tickets,
|
|
4953
5145
|
eventId: eventId
|
|
4954
|
-
}), React.createElement(
|
|
4955
|
-
|
|
4956
|
-
|
|
5146
|
+
}), codeIsLoading ? React.createElement(Loader, null) : showAccessCodeSection ? React.createElement(AccessCodeSection, {
|
|
5147
|
+
code: code,
|
|
5148
|
+
setCode: setCode,
|
|
5149
|
+
updateTickets: updateTickets
|
|
5150
|
+
}) : showPromoCodeSection ? React.createElement(PromoCodeSection, {
|
|
5151
|
+
code: code,
|
|
5152
|
+
codeIsApplied: codeIsApplied,
|
|
4957
5153
|
showPromoInput: showPromoInput,
|
|
4958
|
-
setPromoCode: setPromoCode,
|
|
4959
|
-
setPromoCodeUpdated: setPromoCodeUpdated,
|
|
4960
5154
|
setShowPromoInput: setShowPromoInput,
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
isPromoLoading: isPromoLoading
|
|
4965
|
-
}), (isTicketOnSale || !(event != null && event.salesEnded)) && React.createElement(Button$1, {
|
|
5155
|
+
setCode: setCode,
|
|
5156
|
+
updateTickets: updateTickets
|
|
5157
|
+
}) : null, wrappedActionsSectionComponent, !wrappedActionsSectionComponent && !eventSaleIsNotStarted && isTicketOnSale && !(event != null && event.salesEnded) && !externalUrl && React.createElement(Button$1, {
|
|
4966
5158
|
"aria-hidden": true,
|
|
4967
|
-
className: "book-button \n " + (bookButtonIsDisabled ? 'disabled' : '') + " \n " + (isButtonScrollable ? 'is-scrollable' : '') + "\n ",
|
|
5159
|
+
className: "book-button \n " + (bookButtonIsDisabled ? 'disabled' : '') + " \n " + (isButtonScrollable ? 'is-scrollable' : '') + "\n " + (!isLoggedIn ? 'on-bottom' : '') + "\n ",
|
|
4968
5160
|
onClick: handleGetTicketClick
|
|
4969
5161
|
}, getTicketsLabel || 'GET TICKETS'), isLogged && !hideSessionButtons ? React.createElement("div", {
|
|
4970
5162
|
className: "session-wrapper"
|
|
@@ -5258,7 +5450,7 @@ var TicketsTable = function TicketsTable(_ref) {
|
|
|
5258
5450
|
|
|
5259
5451
|
return React.createElement(Fragment, {
|
|
5260
5452
|
key: index
|
|
5261
|
-
}, React.createElement(TableRow, null, React.createElement(TableCell, null, ticket.hash), React.createElement(TableCell, null, ticket.ticket_type), React.createElement(TableCell, null, ticket.holder_name), React.createElement(TableCell, null, ticket.status), React.createElement(TableCell, null, React.createElement("span", {
|
|
5453
|
+
}, React.createElement(TableRow, null, React.createElement(TableCell, null, ticket.hash), React.createElement(TableCell, null, ticket.ticket_type), React.createElement(TableCell, null, ticket.holder_name), React.createElement(TableCell, null, ticket.status), React.createElement(TableCell, null, ticket.status !== "Sold" && React.createElement("span", {
|
|
5262
5454
|
"aria-hidden": true,
|
|
5263
5455
|
className: "action-button",
|
|
5264
5456
|
onClick: function onClick() {
|
|
@@ -5364,7 +5556,8 @@ var TicketResaleModal = function TicketResaleModal(_ref) {
|
|
|
5364
5556
|
holder_name = ticket.holder_name,
|
|
5365
5557
|
event_name = ticket.event_name,
|
|
5366
5558
|
currency = ticket.currency,
|
|
5367
|
-
resale_fee_amount = ticket.resale_fee_amount
|
|
5559
|
+
resale_fee_amount = ticket.resale_fee_amount,
|
|
5560
|
+
ticket_type_is_active = ticket.ticket_type_is_active;
|
|
5368
5561
|
return React.createElement(Modal, {
|
|
5369
5562
|
open: true,
|
|
5370
5563
|
onClose: onClose,
|
|
@@ -5437,7 +5630,7 @@ var TicketResaleModal = function TicketResaleModal(_ref) {
|
|
|
5437
5630
|
label: 'Confirm Email address',
|
|
5438
5631
|
type: 'text',
|
|
5439
5632
|
component: CustomField
|
|
5440
|
-
}))))), React.createElement("div", null, React.createElement(Field, {
|
|
5633
|
+
}))))), ticket_type_is_active && React.createElement("div", null, React.createElement(Field, {
|
|
5441
5634
|
name: 'to',
|
|
5442
5635
|
label: 'I will sell my ticket to anyone who wants to buy it',
|
|
5443
5636
|
type: 'radio',
|
|
@@ -5576,7 +5769,15 @@ var OrderDetailsContainer = function OrderDetailsContainer(_ref) {
|
|
|
5576
5769
|
}, []);
|
|
5577
5770
|
|
|
5578
5771
|
var handleSellTicket = function handleSellTicket(ticket) {
|
|
5579
|
-
|
|
5772
|
+
var ticketTypesArr = data.items.ticket_types;
|
|
5773
|
+
|
|
5774
|
+
var sellTicketType = _find(ticketTypesArr, function (ticketType) {
|
|
5775
|
+
return ticketType.hash === ticket.ticket_type_hash;
|
|
5776
|
+
});
|
|
5777
|
+
|
|
5778
|
+
setActiveTicket(_extends({}, ticket, {
|
|
5779
|
+
ticket_type_is_active: sellTicketType == null ? void 0 : sellTicketType.active
|
|
5780
|
+
}));
|
|
5580
5781
|
setShowResaleModal(true);
|
|
5581
5782
|
};
|
|
5582
5783
|
|
|
@@ -5755,81 +5956,294 @@ var OrderDetailsContainer = function OrderDetailsContainer(_ref) {
|
|
|
5755
5956
|
};
|
|
5756
5957
|
|
|
5757
5958
|
var TicketResaleContainer = function TicketResaleContainer(_ref) {
|
|
5758
|
-
var _ref$
|
|
5759
|
-
|
|
5760
|
-
_ref$
|
|
5761
|
-
|
|
5959
|
+
var _ref$onProcessTicketS = _ref.onProcessTicketSuccess,
|
|
5960
|
+
onProcessTicketSuccess = _ref$onProcessTicketS === void 0 ? function () {} : _ref$onProcessTicketS,
|
|
5961
|
+
_ref$onProcessTicketE = _ref.onProcessTicketError,
|
|
5962
|
+
onProcessTicketError = _ref$onProcessTicketE === void 0 ? function () {} : _ref$onProcessTicketE,
|
|
5963
|
+
_ref$onDeclineTicketP = _ref.onDeclineTicketPurchaseSuccess,
|
|
5964
|
+
onDeclineTicketPurchaseSuccess = _ref$onDeclineTicketP === void 0 ? function () {} : _ref$onDeclineTicketP,
|
|
5965
|
+
_ref$onDeclineTicketP2 = _ref.onDeclineTicketPurchaseError,
|
|
5966
|
+
onDeclineTicketPurchaseError = _ref$onDeclineTicketP2 === void 0 ? function () {} : _ref$onDeclineTicketP2,
|
|
5762
5967
|
orderHash = _ref.orderHash;
|
|
5763
5968
|
var isWindowDefined = typeof window !== 'undefined';
|
|
5764
5969
|
|
|
5765
|
-
var _useState = useState(
|
|
5970
|
+
var _useState = useState(''),
|
|
5766
5971
|
error = _useState[0],
|
|
5767
5972
|
setError = _useState[1];
|
|
5768
5973
|
|
|
5974
|
+
var _useState2 = useState(''),
|
|
5975
|
+
successMessage = _useState2[0],
|
|
5976
|
+
setSuccessMessage = _useState2[1];
|
|
5977
|
+
|
|
5769
5978
|
useEffect(function () {
|
|
5770
5979
|
_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
|
|
5771
|
-
var params, hash, response, data, age_required, names_required, event_id, _error$
|
|
5980
|
+
var params, hash, isDeclined, response, _error$response, _error$response$data, _response, data, age_required, names_required, event_id, _error$response2, _error$response2$data;
|
|
5772
5981
|
|
|
5773
5982
|
return runtime_1.wrap(function _callee$(_context) {
|
|
5774
5983
|
while (1) {
|
|
5775
5984
|
switch (_context.prev = _context.next) {
|
|
5776
5985
|
case 0:
|
|
5777
5986
|
if (!isWindowDefined) {
|
|
5778
|
-
_context.next =
|
|
5987
|
+
_context.next = 38;
|
|
5779
5988
|
break;
|
|
5780
5989
|
}
|
|
5781
5990
|
|
|
5782
5991
|
params = new URL("" + window.location).searchParams;
|
|
5783
|
-
hash = params.get('
|
|
5992
|
+
hash = params.get('invitation_hash') || orderHash || null;
|
|
5993
|
+
isDeclined = params.get('decline') || false;
|
|
5784
5994
|
|
|
5785
5995
|
if (!hash) {
|
|
5786
|
-
_context.next =
|
|
5996
|
+
_context.next = 37;
|
|
5787
5997
|
break;
|
|
5788
5998
|
}
|
|
5789
5999
|
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
6000
|
+
if (!isDeclined) {
|
|
6001
|
+
_context.next = 19;
|
|
6002
|
+
break;
|
|
6003
|
+
}
|
|
5793
6004
|
|
|
5794
|
-
|
|
6005
|
+
_context.prev = 6;
|
|
6006
|
+
_context.next = 9;
|
|
6007
|
+
return declineInvitation(hash);
|
|
6008
|
+
|
|
6009
|
+
case 9:
|
|
5795
6010
|
response = _context.sent;
|
|
5796
|
-
|
|
6011
|
+
onDeclineTicketPurchaseSuccess(response);
|
|
6012
|
+
setSuccessMessage("Thanks for letting us know! We'll offer this ticket to someone else!");
|
|
6013
|
+
_context.next = 18;
|
|
6014
|
+
break;
|
|
6015
|
+
|
|
6016
|
+
case 14:
|
|
6017
|
+
_context.prev = 14;
|
|
6018
|
+
_context.t0 = _context["catch"](6);
|
|
6019
|
+
setError(_context.t0 == null ? void 0 : (_error$response = _context.t0.response) == null ? void 0 : (_error$response$data = _error$response.data) == null ? void 0 : _error$response$data.message);
|
|
6020
|
+
onDeclineTicketPurchaseError(_context.t0.response);
|
|
6021
|
+
|
|
6022
|
+
case 18:
|
|
6023
|
+
return _context.abrupt("return");
|
|
6024
|
+
|
|
6025
|
+
case 19:
|
|
6026
|
+
_context.prev = 19;
|
|
6027
|
+
_context.next = 22;
|
|
6028
|
+
return processTicket(hash);
|
|
6029
|
+
|
|
6030
|
+
case 22:
|
|
6031
|
+
_response = _context.sent;
|
|
6032
|
+
data = _get(_response, 'data.data.attributes');
|
|
5797
6033
|
age_required = _get(data, 'age_required', false);
|
|
5798
6034
|
names_required = _get(data, 'names_required', false);
|
|
5799
6035
|
event_id = _get(data, 'event_id');
|
|
5800
|
-
|
|
6036
|
+
onProcessTicketSuccess(_response.data);
|
|
5801
6037
|
window.location.href = "/billing/billing-info/?age_required=" + age_required + "&names_required=" + names_required + "&event_id=" + event_id;
|
|
5802
|
-
_context.next =
|
|
6038
|
+
_context.next = 35;
|
|
5803
6039
|
break;
|
|
5804
6040
|
|
|
5805
|
-
case
|
|
5806
|
-
_context.prev =
|
|
5807
|
-
_context.
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
onCheckTicketStatusError(_context.t0.response);
|
|
6041
|
+
case 31:
|
|
6042
|
+
_context.prev = 31;
|
|
6043
|
+
_context.t1 = _context["catch"](19);
|
|
6044
|
+
setError(_context.t1 == null ? void 0 : (_error$response2 = _context.t1.response) == null ? void 0 : (_error$response2$data = _error$response2.data) == null ? void 0 : _error$response2$data.message);
|
|
6045
|
+
onProcessTicketError(_context.t1.response);
|
|
5811
6046
|
|
|
5812
|
-
case
|
|
5813
|
-
_context.next =
|
|
6047
|
+
case 35:
|
|
6048
|
+
_context.next = 38;
|
|
5814
6049
|
break;
|
|
5815
6050
|
|
|
5816
|
-
case
|
|
6051
|
+
case 37:
|
|
5817
6052
|
window.location.href = '/';
|
|
5818
6053
|
|
|
5819
|
-
case
|
|
6054
|
+
case 38:
|
|
5820
6055
|
case "end":
|
|
5821
6056
|
return _context.stop();
|
|
5822
6057
|
}
|
|
5823
6058
|
}
|
|
5824
|
-
}, _callee, null, [[
|
|
6059
|
+
}, _callee, null, [[6, 14], [19, 31]]);
|
|
5825
6060
|
}))();
|
|
5826
6061
|
}, []);
|
|
5827
6062
|
return React.createElement("div", {
|
|
5828
6063
|
className: "ticket-resale-page"
|
|
5829
6064
|
}, React.createElement("div", {
|
|
5830
|
-
className: "error-block
|
|
5831
|
-
}, React.createElement("h3", null, error)));
|
|
6065
|
+
className: "" + (successMessage ? 'success-block' : 'error-block')
|
|
6066
|
+
}, React.createElement("h3", null, successMessage ? successMessage : error)));
|
|
6067
|
+
};
|
|
6068
|
+
|
|
6069
|
+
var style$3 = {
|
|
6070
|
+
position: 'absolute',
|
|
6071
|
+
top: '10%',
|
|
6072
|
+
left: '50%',
|
|
6073
|
+
transform: 'translate(-50%, -50%)',
|
|
6074
|
+
minWidth: 480,
|
|
6075
|
+
backgroundColor: '#e3e3e3',
|
|
6076
|
+
border: '1px solid white',
|
|
6077
|
+
outline: 'none',
|
|
6078
|
+
padding: '14px',
|
|
6079
|
+
maxHeight: '85vh',
|
|
6080
|
+
overflow: 'auto'
|
|
6081
|
+
};
|
|
6082
|
+
var RedirectModal = function RedirectModal(_ref) {
|
|
6083
|
+
var _ref$message = _ref.message,
|
|
6084
|
+
message = _ref$message === void 0 ? 'Your cart has expired. Please click on "OK" to return to the ticket selection page.' : _ref$message,
|
|
6085
|
+
_ref$onClickOk = _ref.onClickOk,
|
|
6086
|
+
onClickOk = _ref$onClickOk === void 0 ? function () {} : _ref$onClickOk;
|
|
6087
|
+
return React.createElement(Modal, {
|
|
6088
|
+
open: true,
|
|
6089
|
+
"aria-labelledby": "modal-modal-title",
|
|
6090
|
+
"aria-describedby": "modal-modal-description",
|
|
6091
|
+
className: "redirect-modal"
|
|
6092
|
+
}, React.createElement(Box, {
|
|
6093
|
+
style: style$3
|
|
6094
|
+
}, React.createElement("p", null, message), React.createElement("div", {
|
|
6095
|
+
className: "footer"
|
|
6096
|
+
}, React.createElement("button", {
|
|
6097
|
+
onClick: onClickOk
|
|
6098
|
+
}, "OK"))));
|
|
6099
|
+
};
|
|
6100
|
+
|
|
6101
|
+
var style$4 = {
|
|
6102
|
+
position: 'absolute',
|
|
6103
|
+
top: '50%',
|
|
6104
|
+
left: '50%',
|
|
6105
|
+
transform: 'translate(-50%, -50%)',
|
|
6106
|
+
minWidth: 480,
|
|
6107
|
+
backgroundColor: '#e3e3e3',
|
|
6108
|
+
border: '1px solid white',
|
|
6109
|
+
outline: 'none',
|
|
6110
|
+
padding: '14px',
|
|
6111
|
+
maxHeight: '85vh',
|
|
6112
|
+
overflow: 'auto'
|
|
6113
|
+
};
|
|
6114
|
+
var RsvpContainer = function RsvpContainer(_ref) {
|
|
6115
|
+
var _ref$showSection = _ref.showSection,
|
|
6116
|
+
showSection = _ref$showSection === void 0 ? false : _ref$showSection,
|
|
6117
|
+
eventId = _ref.eventId;
|
|
6118
|
+
var userDataEncoded = typeof window !== 'undefined' ? window.localStorage.getItem('user_data') : '';
|
|
6119
|
+
var parsedData = JSON.parse(userDataEncoded || '{}');
|
|
6120
|
+
|
|
6121
|
+
var _useState = useState(false),
|
|
6122
|
+
loading = _useState[0],
|
|
6123
|
+
setLoading = _useState[1];
|
|
6124
|
+
|
|
6125
|
+
var _useState2 = useState({
|
|
6126
|
+
isOpen: false,
|
|
6127
|
+
text: ''
|
|
6128
|
+
}),
|
|
6129
|
+
modal = _useState2[0],
|
|
6130
|
+
setModal = _useState2[1];
|
|
6131
|
+
|
|
6132
|
+
var handleModalClose = function handleModalClose() {
|
|
6133
|
+
setModal({
|
|
6134
|
+
isOpen: false,
|
|
6135
|
+
text: ''
|
|
6136
|
+
});
|
|
6137
|
+
};
|
|
6138
|
+
|
|
6139
|
+
var handleSubmit = /*#__PURE__*/function () {
|
|
6140
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(values) {
|
|
6141
|
+
var requestData, _yield$sendRSVPInfo, data, _error$response$data;
|
|
6142
|
+
|
|
6143
|
+
return runtime_1.wrap(function _callee$(_context) {
|
|
6144
|
+
while (1) {
|
|
6145
|
+
switch (_context.prev = _context.next) {
|
|
6146
|
+
case 0:
|
|
6147
|
+
_context.prev = 0;
|
|
6148
|
+
setLoading(true);
|
|
6149
|
+
requestData = {
|
|
6150
|
+
data: {
|
|
6151
|
+
email: values.email
|
|
6152
|
+
}
|
|
6153
|
+
};
|
|
6154
|
+
_context.next = 5;
|
|
6155
|
+
return sendRSVPInfo(eventId, requestData);
|
|
6156
|
+
|
|
6157
|
+
case 5:
|
|
6158
|
+
_yield$sendRSVPInfo = _context.sent;
|
|
6159
|
+
data = _yield$sendRSVPInfo.data;
|
|
6160
|
+
setModal({
|
|
6161
|
+
isOpen: true,
|
|
6162
|
+
text: data.message
|
|
6163
|
+
});
|
|
6164
|
+
_context.next = 13;
|
|
6165
|
+
break;
|
|
6166
|
+
|
|
6167
|
+
case 10:
|
|
6168
|
+
_context.prev = 10;
|
|
6169
|
+
_context.t0 = _context["catch"](0);
|
|
6170
|
+
|
|
6171
|
+
if (_context.t0.response.status === 403) {
|
|
6172
|
+
setModal({
|
|
6173
|
+
isOpen: true,
|
|
6174
|
+
text: (_error$response$data = _context.t0.response.data) == null ? void 0 : _error$response$data.message
|
|
6175
|
+
});
|
|
6176
|
+
}
|
|
6177
|
+
|
|
6178
|
+
case 13:
|
|
6179
|
+
_context.prev = 13;
|
|
6180
|
+
setLoading(false);
|
|
6181
|
+
return _context.finish(13);
|
|
6182
|
+
|
|
6183
|
+
case 16:
|
|
6184
|
+
case "end":
|
|
6185
|
+
return _context.stop();
|
|
6186
|
+
}
|
|
6187
|
+
}
|
|
6188
|
+
}, _callee, null, [[0, 10, 13, 16]]);
|
|
6189
|
+
}));
|
|
6190
|
+
|
|
6191
|
+
return function handleSubmit(_x) {
|
|
6192
|
+
return _ref2.apply(this, arguments);
|
|
6193
|
+
};
|
|
6194
|
+
}();
|
|
6195
|
+
|
|
6196
|
+
if (!showSection) {
|
|
6197
|
+
return null;
|
|
6198
|
+
}
|
|
6199
|
+
|
|
6200
|
+
return React.createElement(React.Fragment, null, React.createElement(Modal, {
|
|
6201
|
+
open: modal.isOpen,
|
|
6202
|
+
onClose: handleModalClose,
|
|
6203
|
+
"aria-labelledby": "modal-modal-title",
|
|
6204
|
+
"aria-describedby": "modal-modal-description",
|
|
6205
|
+
className: "rsvp-modal"
|
|
6206
|
+
}, React.createElement(Box, {
|
|
6207
|
+
style: style$4,
|
|
6208
|
+
className: "rsvp-modal-box"
|
|
6209
|
+
}, React.createElement("div", {
|
|
6210
|
+
className: "rsvp-modal-container"
|
|
6211
|
+
}, React.createElement("div", {
|
|
6212
|
+
className: "rsvp-modal-header"
|
|
6213
|
+
}, modal.text), React.createElement("div", {
|
|
6214
|
+
className: "rsvp-modal-button"
|
|
6215
|
+
}, React.createElement("button", {
|
|
6216
|
+
onClick: handleModalClose
|
|
6217
|
+
}, "OK"))))), React.createElement("div", {
|
|
6218
|
+
className: "rsvp-container"
|
|
6219
|
+
}, loading ? React.createElement(Loader, null) : React.createElement(React.Fragment, null, React.createElement("div", {
|
|
6220
|
+
className: "rsvp-header"
|
|
6221
|
+
}, "RSVP"), React.createElement("div", {
|
|
6222
|
+
className: "rsvp-email-container"
|
|
6223
|
+
}, React.createElement(Formik, {
|
|
6224
|
+
initialValues: {
|
|
6225
|
+
email: (parsedData == null ? void 0 : parsedData.email) || ''
|
|
6226
|
+
},
|
|
6227
|
+
onSubmit: handleSubmit,
|
|
6228
|
+
enableReinitialize: true
|
|
6229
|
+
}, React.createElement(Form, null, React.createElement("div", {
|
|
6230
|
+
className: "rsvp-email-input-container"
|
|
6231
|
+
}, React.createElement(Field, {
|
|
6232
|
+
name: "email",
|
|
6233
|
+
label: "EMAIL ADDRESS",
|
|
6234
|
+
type: "email",
|
|
6235
|
+
validate: combineValidators(function (value) {
|
|
6236
|
+
return requiredValidator(value, 'Please enter your Email');
|
|
6237
|
+
}, function (value) {
|
|
6238
|
+
return emailValidator(value);
|
|
6239
|
+
}),
|
|
6240
|
+
component: CustomField
|
|
6241
|
+
})), React.createElement("div", {
|
|
6242
|
+
className: "rsvp-button-container"
|
|
6243
|
+
}, React.createElement(Button, {
|
|
6244
|
+
type: "submit"
|
|
6245
|
+
}, "RSVP"))))))));
|
|
5832
6246
|
};
|
|
5833
6247
|
|
|
5834
|
-
export { BillingInfoContainer, ConfirmationContainer, LoginModal, MyTicketsContainer, OrderDetailsContainer, PaymentContainer, TicketResaleContainer, TicketsContainer, createFixedFloatNormalizer, currencyNormalizerCreator, setConfigs };
|
|
6248
|
+
export { BillingInfoContainer, ConfirmationContainer, LoginModal, MyTicketsContainer, OrderDetailsContainer, PaymentContainer, RedirectModal, RsvpContainer, TicketResaleContainer, TicketsContainer, createFixedFloatNormalizer, currencyNormalizerCreator, setConfigs };
|
|
5835
6249
|
//# sourceMappingURL=tf-checkout-react.esm.js.map
|