tf-checkout-react 1.1.0 → 1.2.2
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 -3
- package/dist/components/common/CheckboxField.d.ts +1 -1
- package/dist/components/common/PhoneNumberField.d.ts +2 -1
- package/dist/components/common/RadioField.d.ts +1 -1
- package/dist/components/ticketsContainer/index.d.ts +4 -3
- package/dist/tf-checkout-react.cjs.development.js +1271 -1202
- 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 +1409 -1340
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -1
- package/package.json +1 -1
- package/src/api/index.ts +39 -5
- package/src/components/billing-info-container/index.tsx +37 -33
- package/src/components/common/CheckboxField.tsx +1 -0
- package/src/components/common/PhoneNumberField.tsx +17 -11
- package/src/components/common/RadioField.tsx +1 -0
- package/src/components/orderDetailsContainer/index.tsx +5 -0
- package/src/components/orderDetailsContainer/style.css +4 -0
- package/src/components/ticketsContainer/index.tsx +73 -46
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { FormControl, FormHelperText, InputLabel, Snackbar, Alert, Modal, Box, CircularProgress as CircularProgress$1, TextField as TextField$1, createTheme as createTheme$1 } from '@mui/material';
|
|
2
|
+
import Backdrop from '@mui/material/Backdrop';
|
|
3
3
|
import Button from '@mui/material/Button';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import { ThemeProvider, createTheme } from '@mui/material/styles';
|
|
5
|
+
import axios from 'axios';
|
|
6
|
+
import { connect, Formik, Form, Field } from 'formik';
|
|
6
7
|
import _get from 'lodash-es/get';
|
|
8
|
+
import _identity from 'lodash-es/identity';
|
|
7
9
|
import _includes from 'lodash-es/includes';
|
|
8
|
-
import _isEqual from 'lodash-es/isEqual';
|
|
9
10
|
import _isEmpty from 'lodash-es/isEmpty';
|
|
10
|
-
import
|
|
11
|
+
import _isEqual from 'lodash-es/isEqual';
|
|
12
|
+
import _map from 'lodash-es/map';
|
|
13
|
+
import { nanoid } from 'nanoid';
|
|
14
|
+
import React, { Component, useCallback, useEffect, useState, memo, useRef, Fragment } from 'react';
|
|
11
15
|
import _forEach from 'lodash-es/forEach';
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import TextField
|
|
16
|
+
import DatePicker from '@mui/lab/DatePicker';
|
|
17
|
+
import AdapterMoment from '@mui/lab/AdapterMoment';
|
|
18
|
+
import LocalizationProvider from '@mui/lab/LocalizationProvider';
|
|
19
|
+
import TextField from '@mui/material/TextField';
|
|
16
20
|
import { useTheme } from '@mui/styles';
|
|
17
|
-
import { object, string, ref, boolean } from 'yup';
|
|
18
|
-
import _flatMapDeep from 'lodash-es/flatMapDeep';
|
|
19
|
-
import _isArray from 'lodash-es/isArray';
|
|
20
|
-
import { nanoid } from 'nanoid';
|
|
21
21
|
import FormGroup from '@mui/material/FormGroup';
|
|
22
22
|
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
23
23
|
import Checkbox from '@mui/material/Checkbox';
|
|
24
|
-
import 'material-ui-phone-number';
|
|
24
|
+
import MuiPhoneNumber from 'material-ui-phone-number';
|
|
25
25
|
import _debounce from 'lodash-es/debounce';
|
|
26
|
-
import CircularProgress
|
|
26
|
+
import CircularProgress from '@mui/material/CircularProgress';
|
|
27
27
|
import Select from '@mui/material/Select';
|
|
28
|
-
import {
|
|
29
|
-
import
|
|
28
|
+
import { object, string, ref, boolean } from 'yup';
|
|
29
|
+
import Box$1 from '@mui/material/Box';
|
|
30
|
+
import Modal$1 from '@mui/material/Modal';
|
|
30
31
|
import Countdown$1 from 'react-countdown';
|
|
31
32
|
import _isNumber from 'lodash-es/isNumber';
|
|
32
33
|
import SVG from 'react-inlinesvg';
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import LocalizationProvider from '@mui/lab/LocalizationProvider';
|
|
34
|
+
import _flatMapDeep from 'lodash-es/flatMapDeep';
|
|
35
|
+
import _isArray from 'lodash-es/isArray';
|
|
36
36
|
import Container from '@mui/material/Container';
|
|
37
37
|
import Alert$1 from '@mui/material/Alert';
|
|
38
38
|
import { useStripe, useElements, CardNumberElement, CardExpiryElement, CardCvcElement, Elements } from '@stripe/react-stripe-js';
|
|
39
39
|
import { loadStripe } from '@stripe/stripe-js';
|
|
40
40
|
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';
|
|
41
|
-
import
|
|
41
|
+
import { ThemeProvider as ThemeProvider$1 } from '@mui/private-theming';
|
|
42
|
+
import jwt_decode from 'jwt-decode';
|
|
42
43
|
import _find from 'lodash-es/find';
|
|
44
|
+
import _some from 'lodash-es/some';
|
|
43
45
|
import Button$1 from 'react-bootstrap/Button';
|
|
44
|
-
import
|
|
46
|
+
import moment from 'moment-timezone';
|
|
45
47
|
import _sortBy from 'lodash-es/sortBy';
|
|
46
48
|
import FormControl$1 from '@mui/material/FormControl';
|
|
47
49
|
import MenuItem from '@mui/material/MenuItem';
|
|
48
|
-
import moment from 'moment-timezone';
|
|
49
|
-
import { ThemeProvider as ThemeProvider$1 } from '@mui/private-theming';
|
|
50
50
|
import Autocomplete from '@mui/material/Autocomplete';
|
|
51
51
|
import Paper from '@mui/material/Paper';
|
|
52
52
|
import Table from '@mui/material/Table';
|
|
@@ -904,32 +904,6 @@ try {
|
|
|
904
904
|
}
|
|
905
905
|
});
|
|
906
906
|
|
|
907
|
-
var emailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
908
|
-
var combineValidators = function combineValidators() {
|
|
909
|
-
for (var _len = arguments.length, validators = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
910
|
-
validators[_key] = arguments[_key];
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
return function () {
|
|
914
|
-
for (var i = 0; i < validators.length; ++i) {
|
|
915
|
-
var error_message = validators[i].apply(validators, arguments);
|
|
916
|
-
if (error_message) return error_message;
|
|
917
|
-
}
|
|
918
|
-
};
|
|
919
|
-
};
|
|
920
|
-
var requiredValidator = function requiredValidator(value, message) {
|
|
921
|
-
var errorMessage = '';
|
|
922
|
-
|
|
923
|
-
if (!value) {
|
|
924
|
-
errorMessage = message || 'Required';
|
|
925
|
-
}
|
|
926
|
-
|
|
927
|
-
return errorMessage;
|
|
928
|
-
};
|
|
929
|
-
var emailValidator = function emailValidator(email) {
|
|
930
|
-
return !emailRegex.test(email) ? 'Please enter a valid email address' : '';
|
|
931
|
-
};
|
|
932
|
-
|
|
933
907
|
var CONFIGS = {};
|
|
934
908
|
var setConfigs = function setConfigs(configs) {
|
|
935
909
|
_forEach(configs, function (value, key) {
|
|
@@ -1186,6 +1160,7 @@ var createCheckoutDataBodyWithDefaultHolder = function createCheckoutDataBodyWit
|
|
|
1186
1160
|
};
|
|
1187
1161
|
|
|
1188
1162
|
var isWindowDefined = typeof window !== 'undefined';
|
|
1163
|
+
var isDocumentDefined = typeof document !== 'undefined';
|
|
1189
1164
|
var ttfHeaders = {
|
|
1190
1165
|
Accept: 'application/vnd.api+json',
|
|
1191
1166
|
'Content-Type': 'application/vnd.api+json'
|
|
@@ -1331,8 +1306,26 @@ var handleSetAccessToken = function handleSetAccessToken(token) {
|
|
|
1331
1306
|
}
|
|
1332
1307
|
};
|
|
1333
1308
|
function getEvent(id) {
|
|
1309
|
+
var referralValue = "";
|
|
1310
|
+
|
|
1311
|
+
if (isWindowDefined) {
|
|
1312
|
+
var params = new URL("" + window.location);
|
|
1313
|
+
var referralId = params.searchParams.get('ttf_r') || '';
|
|
1314
|
+
var referral_key = window.localStorage.getItem('referral_key');
|
|
1315
|
+
var referralIdlocal = "";
|
|
1316
|
+
|
|
1317
|
+
if (referral_key) {
|
|
1318
|
+
referralIdlocal = referral_key.split('.')[1];
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
referralValue = referralId || referralIdlocal;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1334
1324
|
var response = publicRequest.get("v1/event/" + id, {
|
|
1335
|
-
headers: ttfHeaders
|
|
1325
|
+
headers: _extends({}, ttfHeaders, {
|
|
1326
|
+
"Referer-Url": isDocumentDefined ? document.referrer : '',
|
|
1327
|
+
"Referrer-Id": isWindowDefined ? referralValue : ''
|
|
1328
|
+
})
|
|
1336
1329
|
})["catch"](function (error) {
|
|
1337
1330
|
throw error;
|
|
1338
1331
|
});
|
|
@@ -1351,7 +1344,10 @@ function getTickets(id, promoCode) {
|
|
|
1351
1344
|
}
|
|
1352
1345
|
var addToCart = function addToCart(id, data) {
|
|
1353
1346
|
var res = publicRequest.post("v1/event/" + id + "/add-to-cart/", {
|
|
1354
|
-
data: data
|
|
1347
|
+
data: data,
|
|
1348
|
+
headers: {
|
|
1349
|
+
"Referer-Url": isDocumentDefined ? document.referrer : ''
|
|
1350
|
+
}
|
|
1355
1351
|
});
|
|
1356
1352
|
return res;
|
|
1357
1353
|
};
|
|
@@ -1376,19 +1372,31 @@ var register = function register(data) {
|
|
|
1376
1372
|
return publicRequest.post('v1/oauth/register-rn', data);
|
|
1377
1373
|
};
|
|
1378
1374
|
var getPaymentData = function getPaymentData(hash) {
|
|
1379
|
-
var response = publicRequest.get("v1/order/" + hash + "/review/"
|
|
1375
|
+
var response = publicRequest.get("v1/order/" + hash + "/review/", {
|
|
1376
|
+
headers: {
|
|
1377
|
+
"Referer-Url": isDocumentDefined ? document.referrer : ''
|
|
1378
|
+
}
|
|
1379
|
+
})["catch"](function (error) {
|
|
1380
1380
|
throw error;
|
|
1381
1381
|
});
|
|
1382
1382
|
return response;
|
|
1383
1383
|
};
|
|
1384
1384
|
var handlePaymentSuccess = function handlePaymentSuccess(orderHash) {
|
|
1385
|
-
var res = publicRequest.post("v1/order/" + orderHash + "/success"
|
|
1385
|
+
var res = publicRequest.post("v1/order/" + orderHash + "/success", {
|
|
1386
|
+
headers: {
|
|
1387
|
+
"Referer-Url": isDocumentDefined ? document.referrer : ''
|
|
1388
|
+
}
|
|
1389
|
+
})["catch"](function (error) {
|
|
1386
1390
|
throw error;
|
|
1387
1391
|
});
|
|
1388
1392
|
return res;
|
|
1389
1393
|
};
|
|
1390
1394
|
var handleFreeSuccess = function handleFreeSuccess(orderHash) {
|
|
1391
|
-
var res = publicRequest.post("v1/order/" + orderHash + "/complete_free_registration"
|
|
1395
|
+
var res = publicRequest.post("v1/order/" + orderHash + "/complete_free_registration", {
|
|
1396
|
+
headers: {
|
|
1397
|
+
"Referer-Url": isDocumentDefined ? document.referrer : ''
|
|
1398
|
+
}
|
|
1399
|
+
})["catch"](function (error) {
|
|
1392
1400
|
throw error;
|
|
1393
1401
|
});
|
|
1394
1402
|
return res;
|
|
@@ -1483,217 +1491,347 @@ var validatePhoneNumber = /*#__PURE__*/function () {
|
|
|
1483
1491
|
};
|
|
1484
1492
|
}();
|
|
1485
1493
|
|
|
1486
|
-
var
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
return {
|
|
1498
|
-
id: data.id,
|
|
1499
|
-
first_name: data.firstName,
|
|
1500
|
-
last_name: data.lastName,
|
|
1501
|
-
email: data.email,
|
|
1502
|
-
confirmEmail: data.email,
|
|
1503
|
-
city: (data == null ? void 0 : data.city) || '',
|
|
1504
|
-
country: (data == null ? void 0 : data.countryId) || (data == null ? void 0 : data.country) || '',
|
|
1505
|
-
phone: (data == null ? void 0 : data.phone) || '',
|
|
1506
|
-
street_address: (data == null ? void 0 : data.streetAddress) || '',
|
|
1507
|
-
state: (data == null ? void 0 : data.stateId) || '',
|
|
1508
|
-
zip: (data == null ? void 0 : data.zip) || (data == null ? void 0 : data.zipCode) || ''
|
|
1494
|
+
var emailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
1495
|
+
var combineValidators = function combineValidators() {
|
|
1496
|
+
for (var _len = arguments.length, validators = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1497
|
+
validators[_key] = arguments[_key];
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
return function () {
|
|
1501
|
+
for (var i = 0; i < validators.length; ++i) {
|
|
1502
|
+
var error_message = validators[i].apply(validators, arguments);
|
|
1503
|
+
if (error_message) return error_message;
|
|
1504
|
+
}
|
|
1509
1505
|
};
|
|
1510
1506
|
};
|
|
1511
|
-
var
|
|
1512
|
-
var
|
|
1513
|
-
onLogin = _ref.onLogin,
|
|
1514
|
-
_ref$alreadyHasUser = _ref.alreadyHasUser,
|
|
1515
|
-
alreadyHasUser = _ref$alreadyHasUser === void 0 ? false : _ref$alreadyHasUser,
|
|
1516
|
-
_ref$userExpired = _ref.userExpired,
|
|
1517
|
-
userExpired = _ref$userExpired === void 0 ? false : _ref$userExpired,
|
|
1518
|
-
_ref$onGetProfileData = _ref.onGetProfileDataSuccess,
|
|
1519
|
-
onGetProfileDataSuccess = _ref$onGetProfileData === void 0 ? _identity : _ref$onGetProfileData,
|
|
1520
|
-
_ref$onGetProfileData2 = _ref.onGetProfileDataError,
|
|
1521
|
-
onGetProfileDataError = _ref$onGetProfileData2 === void 0 ? _identity : _ref$onGetProfileData2,
|
|
1522
|
-
_ref$onForgotPassword = _ref.onForgotPassword,
|
|
1523
|
-
onForgotPassword = _ref$onForgotPassword === void 0 ? _identity : _ref$onForgotPassword,
|
|
1524
|
-
_ref$onSignup = _ref.onSignup,
|
|
1525
|
-
onSignup = _ref$onSignup === void 0 ? _identity : _ref$onSignup,
|
|
1526
|
-
_ref$modalClassname = _ref.modalClassname,
|
|
1527
|
-
modalClassname = _ref$modalClassname === void 0 ? '' : _ref$modalClassname,
|
|
1528
|
-
logo = _ref.logo,
|
|
1529
|
-
_ref$showForgotPasswo = _ref.showForgotPasswordButton,
|
|
1530
|
-
showForgotPasswordButton = _ref$showForgotPasswo === void 0 ? false : _ref$showForgotPasswo,
|
|
1531
|
-
_ref$showSignUpButton = _ref.showSignUpButton,
|
|
1532
|
-
showSignUpButton = _ref$showSignUpButton === void 0 ? false : _ref$showSignUpButton;
|
|
1533
|
-
|
|
1534
|
-
var _useState = useState(''),
|
|
1535
|
-
error = _useState[0],
|
|
1536
|
-
setError = _useState[1];
|
|
1537
|
-
|
|
1538
|
-
return React.createElement(Modal, {
|
|
1539
|
-
open: true,
|
|
1540
|
-
onClose: onClose,
|
|
1541
|
-
"aria-labelledby": "modal-modal-title",
|
|
1542
|
-
"aria-describedby": "modal-modal-description",
|
|
1543
|
-
className: "login-modal " + modalClassname
|
|
1544
|
-
}, React.createElement(Box, {
|
|
1545
|
-
style: style
|
|
1546
|
-
}, React.createElement("div", null, React.createElement(Formik, {
|
|
1547
|
-
initialValues: {
|
|
1548
|
-
email: '',
|
|
1549
|
-
password: ''
|
|
1550
|
-
},
|
|
1551
|
-
onSubmit: function () {
|
|
1552
|
-
var _onSubmit = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(_ref2) {
|
|
1553
|
-
var email, password, body, profileResponse, profileSpecifiedData, profileDataObj, event, _e$response, _e$response$data, _error;
|
|
1554
|
-
|
|
1555
|
-
return runtime_1.wrap(function _callee$(_context) {
|
|
1556
|
-
while (1) {
|
|
1557
|
-
switch (_context.prev = _context.next) {
|
|
1558
|
-
case 0:
|
|
1559
|
-
email = _ref2.email, password = _ref2.password;
|
|
1560
|
-
_context.prev = 1;
|
|
1561
|
-
body = {
|
|
1562
|
-
email: email,
|
|
1563
|
-
password: password
|
|
1564
|
-
};
|
|
1565
|
-
_context.next = 5;
|
|
1566
|
-
return authorize(body);
|
|
1567
|
-
|
|
1568
|
-
case 5:
|
|
1569
|
-
profileResponse = null;
|
|
1570
|
-
_context.prev = 6;
|
|
1571
|
-
_context.next = 9;
|
|
1572
|
-
return getProfileData();
|
|
1507
|
+
var requiredValidator = function requiredValidator(value, message) {
|
|
1508
|
+
var errorMessage = '';
|
|
1573
1509
|
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
_context.next = 17;
|
|
1578
|
-
break;
|
|
1510
|
+
if (!value) {
|
|
1511
|
+
errorMessage = message || 'Required';
|
|
1512
|
+
}
|
|
1579
1513
|
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1514
|
+
return errorMessage;
|
|
1515
|
+
};
|
|
1516
|
+
var emailValidator = function emailValidator(email) {
|
|
1517
|
+
return !emailRegex.test(email) ? 'Please enter a valid email address' : '';
|
|
1518
|
+
};
|
|
1583
1519
|
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1520
|
+
var CustomField = function CustomField(_ref) {
|
|
1521
|
+
var label = _ref.label,
|
|
1522
|
+
_ref$type = _ref.type,
|
|
1523
|
+
type = _ref$type === void 0 ? 'text' : _ref$type,
|
|
1524
|
+
field = _ref.field,
|
|
1525
|
+
_ref$selectOptions = _ref.selectOptions,
|
|
1526
|
+
selectOptions = _ref$selectOptions === void 0 ? [] : _ref$selectOptions,
|
|
1527
|
+
_ref$form = _ref.form,
|
|
1528
|
+
touched = _ref$form.touched,
|
|
1529
|
+
errors = _ref$form.errors,
|
|
1530
|
+
submitCount = _ref$form.submitCount,
|
|
1531
|
+
theme = _ref.theme,
|
|
1532
|
+
_ref$inputProps = _ref.inputProps,
|
|
1533
|
+
pInputProps = _ref$inputProps === void 0 ? {} : _ref$inputProps,
|
|
1534
|
+
_ref$InputProps = _ref.InputProps,
|
|
1535
|
+
InputProps = _ref$InputProps === void 0 ? {} : _ref$InputProps,
|
|
1536
|
+
inputRef = _ref.inputRef;
|
|
1537
|
+
var isSelectField = type === 'select';
|
|
1587
1538
|
|
|
1588
|
-
|
|
1539
|
+
var error = _get(errors, field.name);
|
|
1589
1540
|
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1541
|
+
var isTouched = Boolean(_get(touched, field.name)) || _includes(field.name, 'holder') && !!error && !!submitCount;
|
|
1542
|
+
var customTheme = useTheme();
|
|
1543
|
+
var inputProps = {
|
|
1544
|
+
sx: customTheme == null ? void 0 : customTheme.input
|
|
1545
|
+
};
|
|
1546
|
+
return React.createElement(TextField, Object.assign({
|
|
1547
|
+
id: field.name,
|
|
1548
|
+
label: label,
|
|
1549
|
+
type: type,
|
|
1550
|
+
select: isSelectField,
|
|
1551
|
+
fullWidth: true,
|
|
1552
|
+
error: !!error && isTouched,
|
|
1553
|
+
helperText: isTouched && error,
|
|
1554
|
+
SelectProps: {
|
|
1555
|
+
"native": true,
|
|
1556
|
+
className: theme,
|
|
1557
|
+
MenuProps: {
|
|
1558
|
+
className: theme
|
|
1559
|
+
}
|
|
1560
|
+
},
|
|
1561
|
+
InputLabelProps: {
|
|
1562
|
+
sx: customTheme == null ? void 0 : customTheme.input
|
|
1563
|
+
},
|
|
1564
|
+
InputProps: InputProps,
|
|
1565
|
+
inputProps: _extends({}, inputProps, pInputProps),
|
|
1566
|
+
inputRef: inputRef
|
|
1567
|
+
}, field), isSelectField ? _map(selectOptions, function (option) {
|
|
1568
|
+
return React.createElement("option", {
|
|
1569
|
+
key: option.value,
|
|
1570
|
+
value: option.value,
|
|
1571
|
+
disabled: option.disabled
|
|
1572
|
+
}, option.label);
|
|
1573
|
+
}) : null);
|
|
1574
|
+
};
|
|
1593
1575
|
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1576
|
+
var DATE_SIZE = 32;
|
|
1577
|
+
var compactStyles = {
|
|
1578
|
+
'& > div': {
|
|
1579
|
+
minWidth: 256
|
|
1580
|
+
},
|
|
1581
|
+
'& > div > div, & > div > div > div, & .MuiCalendarPicker-root': {
|
|
1582
|
+
width: 256
|
|
1583
|
+
},
|
|
1584
|
+
'& .MuiTypography-caption': {
|
|
1585
|
+
width: DATE_SIZE,
|
|
1586
|
+
margin: 0
|
|
1587
|
+
},
|
|
1588
|
+
'& .PrivatePickersSlideTransition-root': {
|
|
1589
|
+
minHeight: DATE_SIZE * 6
|
|
1590
|
+
},
|
|
1591
|
+
'& .PrivatePickersSlideTransition-root [role="row"]': {
|
|
1592
|
+
margin: 0
|
|
1593
|
+
},
|
|
1594
|
+
'& .MuiPickersDay-dayWithMargin': {
|
|
1595
|
+
margin: 0
|
|
1596
|
+
},
|
|
1597
|
+
'& .MuiPickersDay-root': {
|
|
1598
|
+
width: DATE_SIZE,
|
|
1599
|
+
height: DATE_SIZE
|
|
1600
|
+
}
|
|
1601
|
+
};
|
|
1602
|
+
var compactStyleTheme = /*#__PURE__*/createTheme({
|
|
1603
|
+
components: {
|
|
1604
|
+
MuiPaper: {
|
|
1605
|
+
defaultProps: {
|
|
1606
|
+
sx: compactStyles
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
}
|
|
1610
|
+
});
|
|
1611
|
+
var DatePickerField = function DatePickerField(_ref) {
|
|
1612
|
+
var label = _ref.label,
|
|
1613
|
+
field = _ref.field,
|
|
1614
|
+
form = _ref.form,
|
|
1615
|
+
theme = _ref.theme,
|
|
1616
|
+
_ref$useCompact = _ref.useCompact,
|
|
1617
|
+
useCompact = _ref$useCompact === void 0 ? true : _ref$useCompact;
|
|
1618
|
+
return React.createElement(ThemeProvider, {
|
|
1619
|
+
theme: useCompact ? compactStyleTheme : {}
|
|
1620
|
+
}, React.createElement(LocalizationProvider, {
|
|
1621
|
+
dateAdapter: AdapterMoment
|
|
1622
|
+
}, React.createElement(DatePicker, {
|
|
1623
|
+
value: field.value || '',
|
|
1624
|
+
onChange: function onChange(value) {
|
|
1625
|
+
return form.setFieldValue(field.name, value);
|
|
1626
|
+
},
|
|
1627
|
+
PopperProps: {
|
|
1628
|
+
placement: 'bottom-start'
|
|
1629
|
+
},
|
|
1630
|
+
showDaysOutsideCurrentMonth: true,
|
|
1631
|
+
disableFuture: true,
|
|
1632
|
+
inputFormat: "DD/MM/YYYY",
|
|
1633
|
+
mask: "__/__/____",
|
|
1634
|
+
renderInput: function renderInput(params) {
|
|
1635
|
+
return React.createElement(CustomField, Object.assign({}, params, {
|
|
1636
|
+
inputProps: _extends({}, params.inputProps, {
|
|
1637
|
+
placeholder: 'dd/mm/yyyy'
|
|
1638
|
+
}),
|
|
1639
|
+
theme: theme,
|
|
1640
|
+
field: field,
|
|
1641
|
+
form: form,
|
|
1642
|
+
label: label,
|
|
1643
|
+
type: "tel"
|
|
1644
|
+
}));
|
|
1645
|
+
}
|
|
1646
|
+
})));
|
|
1647
|
+
};
|
|
1599
1648
|
|
|
1600
|
-
|
|
1601
|
-
|
|
1649
|
+
var _excluded = ["label", "field", "selectOptions", "theme", "setFieldValue", "disableDropdown"];
|
|
1650
|
+
var CheckboxField = function CheckboxField(_ref) {
|
|
1651
|
+
var _rest$form, _field$name, _rest$form2, _field$name2;
|
|
1652
|
+
|
|
1653
|
+
var label = _ref.label,
|
|
1654
|
+
field = _ref.field,
|
|
1655
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
1656
|
+
|
|
1657
|
+
var customTheme = useTheme();
|
|
1658
|
+
return React.createElement(FormControl, {
|
|
1659
|
+
error: !!(rest != null && (_rest$form = rest.form) != null && _rest$form.errors && rest.form.errors[(_field$name = field == null ? void 0 : field.name) != null ? _field$name : ""])
|
|
1660
|
+
}, React.createElement(FormGroup, null, React.createElement(FormControlLabel, {
|
|
1661
|
+
control: React.createElement(Checkbox, Object.assign({}, field, rest)),
|
|
1662
|
+
label: label,
|
|
1663
|
+
componentsProps: {
|
|
1664
|
+
typography: customTheme == null ? void 0 : customTheme.checkbox
|
|
1665
|
+
}
|
|
1666
|
+
})), !!(rest != null && (_rest$form2 = rest.form) != null && _rest$form2.errors && rest.form.errors[(_field$name2 = field == null ? void 0 : field.name) != null ? _field$name2 : ""]) ? React.createElement(FormHelperText, null, "Required") : null);
|
|
1667
|
+
};
|
|
1668
|
+
|
|
1669
|
+
var currencyNormalizerCreator = function currencyNormalizerCreator(value, currency) {
|
|
1670
|
+
return !value ? '' : "" + getCurrencySymbolByCurrency(currency) + value;
|
|
1671
|
+
};
|
|
1672
|
+
var createFixedFloatNormalizer = function createFixedFloatNormalizer(fixedValue) {
|
|
1673
|
+
return function (value) {
|
|
1674
|
+
return value || "" + value === '0' ? (+value).toFixed(fixedValue) : '';
|
|
1675
|
+
};
|
|
1676
|
+
};
|
|
1677
|
+
var getCurrencySymbolByCurrency = function getCurrencySymbolByCurrency(currency) {
|
|
1678
|
+
if (currency === void 0) {
|
|
1679
|
+
currency = '';
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
switch (currency) {
|
|
1683
|
+
case 'GBP':
|
|
1684
|
+
return '£';
|
|
1685
|
+
|
|
1686
|
+
case 'EUR':
|
|
1687
|
+
return '€';
|
|
1688
|
+
|
|
1689
|
+
case 'INR':
|
|
1690
|
+
return '₹';
|
|
1691
|
+
|
|
1692
|
+
case 'JMD':
|
|
1693
|
+
return 'J$';
|
|
1694
|
+
|
|
1695
|
+
case 'NZD':
|
|
1696
|
+
return 'NZ$';
|
|
1697
|
+
|
|
1698
|
+
case 'MYR':
|
|
1699
|
+
return 'RM';
|
|
1700
|
+
|
|
1701
|
+
case 'MXN':
|
|
1702
|
+
return 'Mex$';
|
|
1703
|
+
|
|
1704
|
+
case 'SGD':
|
|
1705
|
+
return 'S$';
|
|
1706
|
+
|
|
1707
|
+
case 'AUD':
|
|
1708
|
+
return 'A$';
|
|
1709
|
+
|
|
1710
|
+
case 'ZAR':
|
|
1711
|
+
return 'R';
|
|
1712
|
+
|
|
1713
|
+
case 'ke':
|
|
1714
|
+
return 'Ksh';
|
|
1715
|
+
|
|
1716
|
+
case 'TRY':
|
|
1717
|
+
return '₺';
|
|
1718
|
+
|
|
1719
|
+
case 'CAD':
|
|
1720
|
+
return 'CA$';
|
|
1721
|
+
|
|
1722
|
+
case 'THB':
|
|
1723
|
+
return '฿';
|
|
1724
|
+
|
|
1725
|
+
case 'ISK':
|
|
1726
|
+
return 'Kr';
|
|
1727
|
+
|
|
1728
|
+
case 'SEK':
|
|
1729
|
+
return 'kr';
|
|
1730
|
+
|
|
1731
|
+
default:
|
|
1732
|
+
return 'US$';
|
|
1733
|
+
}
|
|
1734
|
+
};
|
|
1735
|
+
var removePlusSign = function removePlusSign(string) {
|
|
1736
|
+
if (string === void 0) {
|
|
1737
|
+
string = '';
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
return string.replace('+', '');
|
|
1741
|
+
};
|
|
1742
|
+
|
|
1743
|
+
var PhoneNumberField = function PhoneNumberField(_ref) {
|
|
1744
|
+
var label = _ref.label,
|
|
1745
|
+
field = _ref.field,
|
|
1746
|
+
_ref$form = _ref.form,
|
|
1747
|
+
errors = _ref$form.errors,
|
|
1748
|
+
touched = _ref$form.touched,
|
|
1749
|
+
setFieldError = _ref$form.setFieldError,
|
|
1750
|
+
setStatus = _ref$form.setStatus,
|
|
1751
|
+
initialValues = _ref$form.initialValues,
|
|
1752
|
+
setFieldValue = _ref$form.setFieldValue,
|
|
1753
|
+
_ref$disableDropdown = _ref.disableDropdown,
|
|
1754
|
+
disableDropdown = _ref$disableDropdown === void 0 ? true : _ref$disableDropdown;
|
|
1755
|
+
|
|
1756
|
+
var error = _get(errors, field.name);
|
|
1757
|
+
|
|
1758
|
+
var isTouched = Boolean(_get(touched, field.name)); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1759
|
+
|
|
1760
|
+
var debounceCb = useCallback(_debounce(function (cb) {
|
|
1761
|
+
return void cb();
|
|
1762
|
+
}, 1000), []);
|
|
1763
|
+
useEffect(function () {
|
|
1764
|
+
if (field.value) {
|
|
1765
|
+
var _setStatus;
|
|
1766
|
+
|
|
1767
|
+
setStatus((_setStatus = {}, _setStatus[field.name] = true, _setStatus));
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1770
|
+
debounceCb( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
|
|
1771
|
+
var message, _setStatus2;
|
|
1772
|
+
|
|
1773
|
+
return runtime_1.wrap(function _callee$(_context) {
|
|
1774
|
+
while (1) {
|
|
1775
|
+
switch (_context.prev = _context.next) {
|
|
1776
|
+
case 0:
|
|
1777
|
+
_context.prev = 0;
|
|
1778
|
+
|
|
1779
|
+
if (!field.value) {
|
|
1780
|
+
_context.next = 4;
|
|
1602
1781
|
break;
|
|
1782
|
+
}
|
|
1603
1783
|
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
_context.t1 = _context["catch"](1);
|
|
1784
|
+
_context.next = 4;
|
|
1785
|
+
return validatePhoneNumber(field.value);
|
|
1607
1786
|
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
setError((_context.t1 == null ? void 0 : _context.t1.message) || 'Error');
|
|
1613
|
-
}
|
|
1787
|
+
case 4:
|
|
1788
|
+
setFieldError(field.name, '');
|
|
1789
|
+
_context.next = 11;
|
|
1790
|
+
break;
|
|
1614
1791
|
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
}, _callee, null, [[1, 23], [6, 13]]);
|
|
1621
|
-
}));
|
|
1792
|
+
case 7:
|
|
1793
|
+
_context.prev = 7;
|
|
1794
|
+
_context.t0 = _context["catch"](0);
|
|
1795
|
+
message = _get(_context.t0, 'response.data.message', 'Invalid phone number');
|
|
1796
|
+
setFieldError(field.name, message);
|
|
1622
1797
|
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1798
|
+
case 11:
|
|
1799
|
+
_context.prev = 11;
|
|
1800
|
+
setStatus((_setStatus2 = {}, _setStatus2[field.name] = false, _setStatus2));
|
|
1801
|
+
return _context.finish(11);
|
|
1626
1802
|
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
}, React.createElement(Field, {
|
|
1651
|
-
name: 'email',
|
|
1652
|
-
validate: requiredValidator
|
|
1653
|
-
}, function (_ref3) {
|
|
1654
|
-
var field = _ref3.field,
|
|
1655
|
-
meta = _ref3.meta;
|
|
1656
|
-
return React.createElement(TextField, Object.assign({
|
|
1657
|
-
label: 'Email',
|
|
1658
|
-
type: 'email',
|
|
1659
|
-
fullWidth: true,
|
|
1660
|
-
error: !!meta.error && meta.touched,
|
|
1661
|
-
helperText: meta.touched && meta.error
|
|
1662
|
-
}, field));
|
|
1663
|
-
})), React.createElement("div", {
|
|
1664
|
-
className: "login-modal-body__password"
|
|
1665
|
-
}, React.createElement(Field, {
|
|
1666
|
-
name: 'password',
|
|
1667
|
-
validate: requiredValidator
|
|
1668
|
-
}, function (_ref4) {
|
|
1669
|
-
var field = _ref4.field,
|
|
1670
|
-
meta = _ref4.meta;
|
|
1671
|
-
return React.createElement(TextField, Object.assign({
|
|
1672
|
-
label: "Password",
|
|
1673
|
-
type: "password",
|
|
1674
|
-
fullWidth: true,
|
|
1675
|
-
error: !!meta.error && meta.touched,
|
|
1676
|
-
helperText: meta.touched && meta.error
|
|
1677
|
-
}, field));
|
|
1678
|
-
})), React.createElement("div", {
|
|
1679
|
-
className: "login-action-button"
|
|
1680
|
-
}, React.createElement("button", {
|
|
1681
|
-
type: "submit"
|
|
1682
|
-
}, "Login")), showForgotPasswordButton && React.createElement("div", {
|
|
1683
|
-
className: "forgot-password"
|
|
1684
|
-
}, React.createElement("span", {
|
|
1685
|
-
"aria-hidden": "true",
|
|
1686
|
-
onClick: onForgotPassword
|
|
1687
|
-
}, "Forgot password?")), showSignUpButton && React.createElement("div", {
|
|
1688
|
-
className: "forgot-password"
|
|
1689
|
-
}, React.createElement("span", {
|
|
1690
|
-
"aria-hidden": "true",
|
|
1691
|
-
onClick: onSignup
|
|
1692
|
-
}, "Sign up"))));
|
|
1693
|
-
}))));
|
|
1803
|
+
case 14:
|
|
1804
|
+
case "end":
|
|
1805
|
+
return _context.stop();
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
}, _callee, null, [[0, 7, 11, 14]]);
|
|
1809
|
+
}))); // eslint-disable-next-line
|
|
1810
|
+
}, [field.value]);
|
|
1811
|
+
return React.createElement(MuiPhoneNumber, {
|
|
1812
|
+
name: field.name,
|
|
1813
|
+
value: initialValues.phone,
|
|
1814
|
+
onChange: function onChange(e) {
|
|
1815
|
+
return setFieldValue(field.name, removePlusSign(e));
|
|
1816
|
+
},
|
|
1817
|
+
variant: "outlined",
|
|
1818
|
+
defaultCountry: 'us',
|
|
1819
|
+
disableDropdown: disableDropdown,
|
|
1820
|
+
label: label,
|
|
1821
|
+
error: !!error && isTouched,
|
|
1822
|
+
helperText: isTouched && error,
|
|
1823
|
+
fullWidth: true,
|
|
1824
|
+
autoFormat: false
|
|
1825
|
+
});
|
|
1694
1826
|
};
|
|
1695
1827
|
|
|
1696
|
-
|
|
1828
|
+
function Loader() {
|
|
1829
|
+
return React.createElement("div", {
|
|
1830
|
+
className: "loader-container"
|
|
1831
|
+
}, React.createElement(CircularProgress, null));
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
var SelectField = function SelectField(_ref) {
|
|
1697
1835
|
var label = _ref.label,
|
|
1698
1836
|
_ref$type = _ref.type,
|
|
1699
1837
|
type = _ref$type === void 0 ? 'text' : _ref$type,
|
|
@@ -1703,228 +1841,83 @@ var CustomField = function CustomField(_ref) {
|
|
|
1703
1841
|
_ref$form = _ref.form,
|
|
1704
1842
|
touched = _ref$form.touched,
|
|
1705
1843
|
errors = _ref$form.errors,
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
_ref$inputProps = _ref.inputProps,
|
|
1709
|
-
pInputProps = _ref$inputProps === void 0 ? {} : _ref$inputProps,
|
|
1710
|
-
_ref$InputProps = _ref.InputProps,
|
|
1711
|
-
InputProps = _ref$InputProps === void 0 ? {} : _ref$InputProps,
|
|
1712
|
-
inputRef = _ref.inputRef;
|
|
1713
|
-
var isSelectField = type === 'select';
|
|
1844
|
+
theme = _ref.theme;
|
|
1845
|
+
var isTouched = Boolean(_get(touched, field.name));
|
|
1714
1846
|
|
|
1715
1847
|
var error = _get(errors, field.name);
|
|
1716
1848
|
|
|
1717
|
-
var isTouched = Boolean(_get(touched, field.name)) || _includes(field.name, 'holder') && !!error && !!submitCount;
|
|
1718
1849
|
var customTheme = useTheme();
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
}
|
|
1722
|
-
|
|
1850
|
+
return React.createElement(FormControl, {
|
|
1851
|
+
fullWidth: true
|
|
1852
|
+
}, React.createElement(InputLabel, {
|
|
1853
|
+
style: customTheme == null ? void 0 : customTheme.input,
|
|
1854
|
+
htmlFor: field.name,
|
|
1855
|
+
error: !!error && isTouched,
|
|
1856
|
+
shrink: true
|
|
1857
|
+
}, label), React.createElement(Select, Object.assign({
|
|
1723
1858
|
id: field.name,
|
|
1724
1859
|
label: label,
|
|
1725
1860
|
type: type,
|
|
1726
|
-
select: isSelectField,
|
|
1727
1861
|
fullWidth: true,
|
|
1728
1862
|
error: !!error && isTouched,
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
"native": true,
|
|
1732
|
-
className: theme,
|
|
1733
|
-
MenuProps: {
|
|
1734
|
-
className: theme
|
|
1735
|
-
}
|
|
1736
|
-
},
|
|
1737
|
-
InputLabelProps: {
|
|
1738
|
-
sx: customTheme == null ? void 0 : customTheme.input
|
|
1863
|
+
inputProps: {
|
|
1864
|
+
id: field.name
|
|
1739
1865
|
},
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1866
|
+
"native": true,
|
|
1867
|
+
className: theme,
|
|
1868
|
+
MenuProps: {
|
|
1869
|
+
className: theme
|
|
1870
|
+
}
|
|
1871
|
+
}, field, {
|
|
1872
|
+
style: customTheme == null ? void 0 : customTheme.input
|
|
1873
|
+
}), _map(selectOptions, function (option) {
|
|
1744
1874
|
return React.createElement("option", {
|
|
1745
1875
|
key: option.value,
|
|
1746
1876
|
value: option.value,
|
|
1747
1877
|
disabled: option.disabled
|
|
1748
1878
|
}, option.label);
|
|
1749
|
-
})
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
var style$1 = {
|
|
1753
|
-
position: 'absolute',
|
|
1754
|
-
top: '50%',
|
|
1755
|
-
left: '50%',
|
|
1756
|
-
transform: 'translate(-50%, -50%)',
|
|
1757
|
-
minWidth: 480,
|
|
1758
|
-
backgroundColor: '#fff',
|
|
1759
|
-
border: '1px solid white',
|
|
1760
|
-
outline: 'none',
|
|
1761
|
-
padding: '14px'
|
|
1879
|
+
})), isTouched && error ? React.createElement(FormHelperText, {
|
|
1880
|
+
error: !!error && isTouched
|
|
1881
|
+
}, error) : null);
|
|
1762
1882
|
};
|
|
1763
|
-
var SignupSchema = /*#__PURE__*/object().shape({
|
|
1764
|
-
firstName: /*#__PURE__*/string().required('Required'),
|
|
1765
|
-
lastName: /*#__PURE__*/string().required('Required'),
|
|
1766
|
-
email: /*#__PURE__*/string().email('Invalid email').required('Required'),
|
|
1767
|
-
password: /*#__PURE__*/string().min(6, 'Password must have 5+ characters').required('Required'),
|
|
1768
|
-
confirmPassword: /*#__PURE__*/string().required('Required').oneOf([/*#__PURE__*/ref('password'), null], 'Passwords must match')
|
|
1769
|
-
});
|
|
1770
|
-
var SignupModal = function SignupModal(_ref) {
|
|
1771
|
-
var _ref$onClose = _ref.onClose,
|
|
1772
|
-
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
|
|
1773
|
-
_ref$onLogin = _ref.onLogin,
|
|
1774
|
-
onLogin = _ref$onLogin === void 0 ? function () {} : _ref$onLogin,
|
|
1775
|
-
_ref$onRegisterSucces = _ref.onRegisterSuccess,
|
|
1776
|
-
onRegisterSuccess = _ref$onRegisterSucces === void 0 ? function () {} : _ref$onRegisterSucces,
|
|
1777
|
-
_ref$onRegisterError = _ref.onRegisterError,
|
|
1778
|
-
onRegisterError = _ref$onRegisterError === void 0 ? function () {} : _ref$onRegisterError;
|
|
1779
|
-
|
|
1780
|
-
var _useState = useState(false),
|
|
1781
|
-
loading = _useState[0],
|
|
1782
|
-
setLoading = _useState[1];
|
|
1783
|
-
|
|
1784
|
-
var onSignup = /*#__PURE__*/function () {
|
|
1785
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(values) {
|
|
1786
|
-
var formData, res, access_token_register, refreshToken, tokens;
|
|
1787
|
-
return runtime_1.wrap(function _callee$(_context) {
|
|
1788
|
-
while (1) {
|
|
1789
|
-
switch (_context.prev = _context.next) {
|
|
1790
|
-
case 0:
|
|
1791
|
-
_context.prev = 0;
|
|
1792
|
-
setLoading(true);
|
|
1793
|
-
formData = new FormData();
|
|
1794
|
-
formData.set('first_name', values.firstName);
|
|
1795
|
-
formData.set('last_name', values.lastName);
|
|
1796
|
-
formData.set('email', values.email);
|
|
1797
|
-
formData.set('password', values.password);
|
|
1798
|
-
formData.set('password_confirmation', values.confirmPassword);
|
|
1799
|
-
formData.append('client_id', CONFIGS.CLIENT_ID || 'e9d8f8922797b4621e562255afe90dbf');
|
|
1800
|
-
formData.append('client_secret', CONFIGS.CLIENT_SECRET || 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9');
|
|
1801
|
-
_context.next = 12;
|
|
1802
|
-
return register(formData);
|
|
1803
|
-
|
|
1804
|
-
case 12:
|
|
1805
|
-
res = _context.sent;
|
|
1806
|
-
access_token_register = _get(res, 'data.data.attributes.access_token');
|
|
1807
|
-
refreshToken = _get(res, 'data.data.attributes.refresh_token');
|
|
1808
|
-
handleSetAccessToken(access_token_register);
|
|
1809
|
-
tokens = {
|
|
1810
|
-
accessToken: access_token_register,
|
|
1811
|
-
refreshToken: refreshToken
|
|
1812
|
-
};
|
|
1813
|
-
onRegisterSuccess(tokens);
|
|
1814
|
-
onClose();
|
|
1815
|
-
_context.next = 24;
|
|
1816
|
-
break;
|
|
1817
|
-
|
|
1818
|
-
case 21:
|
|
1819
|
-
_context.prev = 21;
|
|
1820
|
-
_context.t0 = _context["catch"](0);
|
|
1821
|
-
|
|
1822
|
-
if (axios.isAxiosError(_context.t0)) {
|
|
1823
|
-
onRegisterError(_context.t0, values.email);
|
|
1824
|
-
}
|
|
1825
|
-
|
|
1826
|
-
case 24:
|
|
1827
|
-
_context.prev = 24;
|
|
1828
|
-
setLoading(false);
|
|
1829
|
-
return _context.finish(24);
|
|
1830
|
-
|
|
1831
|
-
case 27:
|
|
1832
|
-
case "end":
|
|
1833
|
-
return _context.stop();
|
|
1834
|
-
}
|
|
1835
|
-
}
|
|
1836
|
-
}, _callee, null, [[0, 21, 24, 27]]);
|
|
1837
|
-
}));
|
|
1838
|
-
|
|
1839
|
-
return function onSignup(_x) {
|
|
1840
|
-
return _ref2.apply(this, arguments);
|
|
1841
|
-
};
|
|
1842
|
-
}();
|
|
1843
1883
|
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1884
|
+
var SnackbarAlert = function SnackbarAlert(_ref) {
|
|
1885
|
+
var isOpen = _ref.isOpen,
|
|
1886
|
+
message = _ref.message,
|
|
1887
|
+
type = _ref.type,
|
|
1888
|
+
position = _ref.position,
|
|
1889
|
+
_ref$autoHideDuration = _ref.autoHideDuration,
|
|
1890
|
+
autoHideDuration = _ref$autoHideDuration === void 0 ? 3000 : _ref$autoHideDuration,
|
|
1891
|
+
variant = _ref.variant,
|
|
1892
|
+
onClose = _ref.onClose;
|
|
1893
|
+
return React.createElement("div", {
|
|
1894
|
+
className: "snackbar-alert-container"
|
|
1895
|
+
}, React.createElement(Snackbar, {
|
|
1896
|
+
autoHideDuration: autoHideDuration,
|
|
1897
|
+
open: isOpen,
|
|
1898
|
+
anchorOrigin: position || {
|
|
1899
|
+
vertical: 'top',
|
|
1900
|
+
horizontal: 'center'
|
|
1861
1901
|
},
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
}
|
|
1877
|
-
|
|
1878
|
-
}, React.createElement(Field, {
|
|
1879
|
-
name: "firstName",
|
|
1880
|
-
label: "First Name",
|
|
1881
|
-
component: CustomField
|
|
1882
|
-
})), React.createElement("div", {
|
|
1883
|
-
className: "is-half"
|
|
1884
|
-
}, React.createElement(Field, {
|
|
1885
|
-
name: "lastName",
|
|
1886
|
-
label: "Last Name",
|
|
1887
|
-
component: CustomField
|
|
1888
|
-
}))), React.createElement("div", {
|
|
1889
|
-
className: "signup-container__singleField"
|
|
1890
|
-
}, React.createElement("div", {
|
|
1891
|
-
className: ""
|
|
1892
|
-
}, React.createElement(Field, {
|
|
1893
|
-
name: "email",
|
|
1894
|
-
label: "Email",
|
|
1895
|
-
component: CustomField
|
|
1896
|
-
}))), React.createElement("div", {
|
|
1897
|
-
className: "signup-container__twoFields"
|
|
1898
|
-
}, React.createElement("div", {
|
|
1899
|
-
className: "is-half"
|
|
1900
|
-
}, React.createElement(Field, {
|
|
1901
|
-
name: "password",
|
|
1902
|
-
label: "Password",
|
|
1903
|
-
type: "password",
|
|
1904
|
-
component: CustomField
|
|
1905
|
-
})), React.createElement("div", {
|
|
1906
|
-
className: "is-half"
|
|
1907
|
-
}, React.createElement(Field, {
|
|
1908
|
-
name: "confirmPassword",
|
|
1909
|
-
label: "Confirm Password",
|
|
1910
|
-
type: "password",
|
|
1911
|
-
component: CustomField
|
|
1912
|
-
})))), React.createElement("div", {
|
|
1913
|
-
className: "signup-action-button"
|
|
1914
|
-
}, React.createElement("button", {
|
|
1915
|
-
type: "submit",
|
|
1916
|
-
disabled: !(isValid && dirty)
|
|
1917
|
-
}, loading ? React.createElement(CircularProgress, {
|
|
1918
|
-
size: "22px"
|
|
1919
|
-
}) : 'Submit')), React.createElement("div", {
|
|
1920
|
-
className: "login"
|
|
1921
|
-
}, React.createElement("span", {
|
|
1922
|
-
onClick: onLogin
|
|
1923
|
-
}, "Login")));
|
|
1924
|
-
}))));
|
|
1902
|
+
onClose: onClose,
|
|
1903
|
+
classes: {
|
|
1904
|
+
root: 'snackbar-alert-snackbar-root'
|
|
1905
|
+
}
|
|
1906
|
+
}, React.createElement(Alert, {
|
|
1907
|
+
severity: type,
|
|
1908
|
+
onClose: onClose,
|
|
1909
|
+
variant: variant || 'filled',
|
|
1910
|
+
classes: {
|
|
1911
|
+
icon: 'snackbar-alert-icon',
|
|
1912
|
+
root: 'snackbar-alert-alert-root',
|
|
1913
|
+
action: 'snackbar-alert-action',
|
|
1914
|
+
message: 'snackbar-alert-message',
|
|
1915
|
+
filled: 'snackbar-alert-filled'
|
|
1916
|
+
}
|
|
1917
|
+
}, message)));
|
|
1925
1918
|
};
|
|
1926
1919
|
|
|
1927
|
-
var style
|
|
1920
|
+
var style = {
|
|
1928
1921
|
position: 'absolute',
|
|
1929
1922
|
top: '50%',
|
|
1930
1923
|
left: '50%',
|
|
@@ -1968,495 +1961,468 @@ var ForgotPasswordModal = function ForgotPasswordModal(_ref) {
|
|
|
1968
1961
|
|
|
1969
1962
|
case 5:
|
|
1970
1963
|
_yield$forgotPassword = _context.sent;
|
|
1971
|
-
data = _yield$forgotPassword.data;
|
|
1972
|
-
onForgotPasswordSuccess(data);
|
|
1973
|
-
onClose();
|
|
1974
|
-
_context.next = 14;
|
|
1975
|
-
break;
|
|
1976
|
-
|
|
1977
|
-
case 11:
|
|
1978
|
-
_context.prev = 11;
|
|
1979
|
-
_context.t0 = _context["catch"](1);
|
|
1980
|
-
|
|
1981
|
-
if (axios.isAxiosError(_context.t0)) {
|
|
1982
|
-
onForgotPasswordError(_context.t0);
|
|
1983
|
-
}
|
|
1984
|
-
|
|
1985
|
-
case 14:
|
|
1986
|
-
_context.prev = 14;
|
|
1987
|
-
setLoading(false);
|
|
1988
|
-
return _context.finish(14);
|
|
1989
|
-
|
|
1990
|
-
case 17:
|
|
1991
|
-
case "end":
|
|
1992
|
-
return _context.stop();
|
|
1993
|
-
}
|
|
1994
|
-
}
|
|
1995
|
-
}, _callee, null, [[1, 11, 14, 17]]);
|
|
1996
|
-
}));
|
|
1997
|
-
|
|
1998
|
-
return function onForgotPassword(_x) {
|
|
1999
|
-
return _ref3.apply(this, arguments);
|
|
2000
|
-
};
|
|
2001
|
-
}();
|
|
2002
|
-
|
|
2003
|
-
var _onClose = loading ? function () {} : onClose;
|
|
2004
|
-
|
|
2005
|
-
return React.createElement(Modal$1, {
|
|
2006
|
-
open: true,
|
|
2007
|
-
onClose: _onClose,
|
|
2008
|
-
"aria-labelledby": "modal-modal-title",
|
|
2009
|
-
"aria-describedby": "modal-modal-description",
|
|
2010
|
-
className: "forgot-password-modal"
|
|
2011
|
-
}, React.createElement(Box$1, {
|
|
2012
|
-
style: style$2
|
|
2013
|
-
}, React.createElement("div", null, React.createElement(Formik, {
|
|
2014
|
-
initialValues: {
|
|
2015
|
-
email: ''
|
|
2016
|
-
},
|
|
2017
|
-
validationSchema: Schema,
|
|
2018
|
-
onSubmit: onForgotPassword
|
|
2019
|
-
}, function (_ref4) {
|
|
2020
|
-
var isValid = _ref4.isValid,
|
|
2021
|
-
dirty = _ref4.dirty,
|
|
2022
|
-
handleSubmit = _ref4.handleSubmit;
|
|
2023
|
-
return React.createElement(Form, {
|
|
2024
|
-
onSubmit: handleSubmit
|
|
2025
|
-
}, React.createElement("div", {
|
|
2026
|
-
className: "forgot-password-container"
|
|
2027
|
-
}, React.createElement("div", {
|
|
2028
|
-
className: "title"
|
|
2029
|
-
}, "Password Reset"), React.createElement("div", {
|
|
2030
|
-
className: "forgot-password-container__singleField"
|
|
2031
|
-
}, React.createElement(Field, {
|
|
2032
|
-
name: "email",
|
|
2033
|
-
label: "Email",
|
|
2034
|
-
component: CustomField
|
|
2035
|
-
}))), React.createElement("div", {
|
|
2036
|
-
className: "forgot-password-action-button"
|
|
2037
|
-
}, React.createElement("button", {
|
|
2038
|
-
type: "submit",
|
|
2039
|
-
disabled: !(isValid && dirty)
|
|
2040
|
-
}, loading ? React.createElement(CircularProgress, {
|
|
2041
|
-
size: "22px"
|
|
2042
|
-
}) : 'Submit')), React.createElement("div", {
|
|
2043
|
-
className: "login"
|
|
2044
|
-
}, React.createElement("span", {
|
|
2045
|
-
onClick: onLogin
|
|
2046
|
-
}, "Back to Log In")));
|
|
2047
|
-
}))));
|
|
2048
|
-
};
|
|
2049
|
-
|
|
2050
|
-
var _excluded = ["firstName", "lastName", "holderAge", "confirmEmail", "confirmPassword"];
|
|
2051
|
-
var getInitialValues = function getInitialValues(data, propsInitialValues, userValues) {
|
|
2052
|
-
if (data === void 0) {
|
|
2053
|
-
data = [];
|
|
2054
|
-
}
|
|
2055
|
-
|
|
2056
|
-
if (propsInitialValues === void 0) {
|
|
2057
|
-
propsInitialValues = {};
|
|
2058
|
-
}
|
|
2059
|
-
|
|
2060
|
-
if (userValues === void 0) {
|
|
2061
|
-
userValues = {};
|
|
2062
|
-
}
|
|
2063
|
-
|
|
2064
|
-
var results = _flatMapDeep(data, function (_ref) {
|
|
2065
|
-
var fields = _ref.fields;
|
|
2066
|
-
return _map(fields, function (_ref2) {
|
|
2067
|
-
var groupItems = _ref2.groupItems;
|
|
2068
|
-
return _map(groupItems, function (_ref3) {
|
|
2069
|
-
var name = _ref3.name;
|
|
2070
|
-
return name;
|
|
2071
|
-
});
|
|
2072
|
-
});
|
|
2073
|
-
});
|
|
2074
|
-
|
|
2075
|
-
var initialValues = {};
|
|
2076
|
-
|
|
2077
|
-
_forEach(results, function (item) {
|
|
2078
|
-
initialValues[item] = propsInitialValues[item] || userValues[item] || '';
|
|
2079
|
-
}); // set logged in user as first ticket holder
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
initialValues['holderFirstName-0'] = propsInitialValues.firstName || userValues.firstName || '';
|
|
2083
|
-
initialValues['holderLastName-0'] = propsInitialValues.lastName || userValues.lastName || '';
|
|
2084
|
-
initialValues['holderEmail-0'] = propsInitialValues.email || userValues.email || '';
|
|
2085
|
-
return initialValues;
|
|
2086
|
-
};
|
|
2087
|
-
var createRegisterFormData = function createRegisterFormData(values, checkoutBody) {
|
|
2088
|
-
if (values === void 0) {
|
|
2089
|
-
values = {};
|
|
2090
|
-
}
|
|
2091
|
-
|
|
2092
|
-
var bodyFormData = new FormData();
|
|
2093
|
-
bodyFormData.append('first_name', values.firstName);
|
|
2094
|
-
bodyFormData.append('last_name', values.lastName);
|
|
2095
|
-
bodyFormData.append('email', values.email);
|
|
2096
|
-
bodyFormData.append('password', values.password);
|
|
2097
|
-
bodyFormData.append('password_confirmation', values.confirmPassword);
|
|
2098
|
-
bodyFormData.append('client_id', CONFIGS.CLIENT_ID || 'e9d8f8922797b4621e562255afe90dbf');
|
|
2099
|
-
bodyFormData.append('client_secret', CONFIGS.CLIENT_SECRET || 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9');
|
|
2100
|
-
bodyFormData.append('check_cart_expiration', 'true');
|
|
2101
|
-
|
|
2102
|
-
_forEach(checkoutBody.attributes, function (item, key) {
|
|
2103
|
-
bodyFormData.append(key, item);
|
|
2104
|
-
});
|
|
2105
|
-
|
|
2106
|
-
return bodyFormData;
|
|
2107
|
-
};
|
|
2108
|
-
var setLoggedUserData$1 = function setLoggedUserData(data) {
|
|
2109
|
-
return {
|
|
2110
|
-
id: data.id,
|
|
2111
|
-
first_name: data.firstName,
|
|
2112
|
-
last_name: data.lastName,
|
|
2113
|
-
email: data.email,
|
|
2114
|
-
confirmEmail: data.email,
|
|
2115
|
-
city: (data == null ? void 0 : data.city) || '',
|
|
2116
|
-
country: (data == null ? void 0 : data.countryId) || (data == null ? void 0 : data.country) || '',
|
|
2117
|
-
phone: (data == null ? void 0 : data.phone) || '',
|
|
2118
|
-
street_address: (data == null ? void 0 : data.streetAddress) || '',
|
|
2119
|
-
state: (data == null ? void 0 : data.stateId) || '',
|
|
2120
|
-
zip: (data == null ? void 0 : data.zip) || (data == null ? void 0 : data.zipCode) || ''
|
|
2121
|
-
};
|
|
2122
|
-
};
|
|
2123
|
-
var createCheckoutDataBody = function createCheckoutDataBody(ticketsQuantity, values, logedInValues, includeDob) {
|
|
2124
|
-
if (values === void 0) {
|
|
2125
|
-
values = {};
|
|
2126
|
-
}
|
|
2127
|
-
|
|
2128
|
-
if (logedInValues === void 0) {
|
|
2129
|
-
logedInValues = {};
|
|
2130
|
-
}
|
|
2131
|
-
|
|
2132
|
-
if (includeDob === void 0) {
|
|
2133
|
-
includeDob = false;
|
|
2134
|
-
}
|
|
2135
|
-
|
|
2136
|
-
var _values = values,
|
|
2137
|
-
firstName = _values.firstName,
|
|
2138
|
-
lastName = _values.lastName,
|
|
2139
|
-
holderAge = _values.holderAge,
|
|
2140
|
-
restValues = _objectWithoutPropertiesLoose(_values, _excluded);
|
|
2141
|
-
|
|
2142
|
-
var holders = [];
|
|
2143
|
-
var ticket_holders = [];
|
|
2144
|
-
|
|
2145
|
-
var _loop = function _loop(i) {
|
|
2146
|
-
var individualHolder = Object.fromEntries(Object.entries(values).filter(function (_ref4) {
|
|
2147
|
-
var key = _ref4[0];
|
|
2148
|
-
return key.includes(String(i));
|
|
2149
|
-
}));
|
|
2150
|
-
holders.push(individualHolder);
|
|
2151
|
-
};
|
|
2152
|
-
|
|
2153
|
-
for (var i = 0; i <= ticketsQuantity; i++) {
|
|
2154
|
-
_loop(i);
|
|
2155
|
-
}
|
|
2156
|
-
|
|
2157
|
-
var filteredHolders = holders.filter(function (holder) {
|
|
2158
|
-
return Object.entries(holder).length > 0;
|
|
2159
|
-
});
|
|
2160
|
-
ticket_holders = filteredHolders.map(function (item, index) {
|
|
2161
|
-
return {
|
|
2162
|
-
first_name: !index ? item["holderFirstName-" + index] || logedInValues.firstNameLogged || '' : item["holderFirstName-" + index] || '',
|
|
2163
|
-
last_name: !index ? item["holderLastName-" + index] || logedInValues.lastNameLogged || '' : item["holderLastName-" + index] || '',
|
|
2164
|
-
phone: item["holderPhone-" + index] || '',
|
|
2165
|
-
email: !index ? item["holderEmail-" + index] || logedInValues.emailLogged || '' : item["holderEmail-" + index] || ''
|
|
2166
|
-
};
|
|
2167
|
-
});
|
|
2168
|
-
var filteredRestValue = {};
|
|
2169
|
-
|
|
2170
|
-
_forEach(restValues, function (value, key) {
|
|
2171
|
-
if (!key.includes('holder')) {
|
|
2172
|
-
filteredRestValue[key] = value;
|
|
2173
|
-
}
|
|
2174
|
-
});
|
|
2175
|
-
|
|
2176
|
-
var body = {
|
|
2177
|
-
attributes: _extends({}, filteredRestValue, {
|
|
2178
|
-
email: restValues.email || logedInValues.emailLogged,
|
|
2179
|
-
confirm_email: restValues.email || logedInValues.emailLogged,
|
|
2180
|
-
first_name: firstName || logedInValues.firstNameLogged,
|
|
2181
|
-
last_name: lastName || logedInValues.lastNameLogged,
|
|
2182
|
-
ticket_holders: ticket_holders
|
|
2183
|
-
})
|
|
2184
|
-
};
|
|
2185
|
-
|
|
2186
|
-
if (includeDob) {
|
|
2187
|
-
var holderAgeDate = new Date(holderAge);
|
|
2188
|
-
body.attributes.dob_day = holderAgeDate.getDate();
|
|
2189
|
-
body.attributes.dob_month = holderAgeDate.getMonth() + 1;
|
|
2190
|
-
body.attributes.dob_year = holderAgeDate.getFullYear();
|
|
2191
|
-
}
|
|
2192
|
-
|
|
2193
|
-
return body;
|
|
2194
|
-
};
|
|
2195
|
-
var getValidateFunctions = function getValidateFunctions(element, states, values) {
|
|
2196
|
-
var validationFunctions = [];
|
|
2197
|
-
|
|
2198
|
-
if (element.required) {
|
|
2199
|
-
if (element.name !== 'state' || element.name === 'state' && states.length) {
|
|
2200
|
-
validationFunctions.push(requiredValidator);
|
|
2201
|
-
}
|
|
2202
|
-
}
|
|
2203
|
-
|
|
2204
|
-
if (element.onValidate) {
|
|
2205
|
-
validationFunctions.push(element.onValidate);
|
|
2206
|
-
}
|
|
2207
|
-
|
|
2208
|
-
if (element.name === 'confirmEmail') {
|
|
2209
|
-
var isSameEmail = function isSameEmail(confirmEmail) {
|
|
2210
|
-
return values.email !== confirmEmail ? 'Please confirm your email address correctly' : null;
|
|
2211
|
-
};
|
|
2212
|
-
|
|
2213
|
-
validationFunctions.push(isSameEmail);
|
|
2214
|
-
}
|
|
2215
|
-
|
|
2216
|
-
if (element.name === 'confirmPassword') {
|
|
2217
|
-
var isSame = function isSame(confirmPassword) {
|
|
2218
|
-
return values.password !== confirmPassword ? 'Password confirmation does not match' : null;
|
|
2219
|
-
};
|
|
1964
|
+
data = _yield$forgotPassword.data;
|
|
1965
|
+
onForgotPasswordSuccess(data);
|
|
1966
|
+
onClose();
|
|
1967
|
+
_context.next = 14;
|
|
1968
|
+
break;
|
|
2220
1969
|
|
|
2221
|
-
|
|
2222
|
-
|
|
1970
|
+
case 11:
|
|
1971
|
+
_context.prev = 11;
|
|
1972
|
+
_context.t0 = _context["catch"](1);
|
|
2223
1973
|
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
if (_get(data[0], 'uniqueId')) {
|
|
2228
|
-
return data;
|
|
2229
|
-
}
|
|
1974
|
+
if (axios.isAxiosError(_context.t0)) {
|
|
1975
|
+
onForgotPasswordError(_context.t0);
|
|
1976
|
+
}
|
|
2230
1977
|
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
}
|
|
2236
|
-
});
|
|
1978
|
+
case 14:
|
|
1979
|
+
_context.prev = 14;
|
|
1980
|
+
setLoading(false);
|
|
1981
|
+
return _context.finish(14);
|
|
2237
1982
|
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
}
|
|
1983
|
+
case 17:
|
|
1984
|
+
case "end":
|
|
1985
|
+
return _context.stop();
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
}, _callee, null, [[1, 11, 14, 17]]);
|
|
1989
|
+
}));
|
|
2243
1990
|
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
1991
|
+
return function onForgotPassword(_x) {
|
|
1992
|
+
return _ref3.apply(this, arguments);
|
|
1993
|
+
};
|
|
1994
|
+
}();
|
|
2247
1995
|
|
|
2248
|
-
var
|
|
2249
|
-
field = _ref.field,
|
|
2250
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
1996
|
+
var _onClose = loading ? function () {} : onClose;
|
|
2251
1997
|
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
1998
|
+
return React.createElement(Modal, {
|
|
1999
|
+
open: true,
|
|
2000
|
+
onClose: _onClose,
|
|
2001
|
+
"aria-labelledby": "modal-modal-title",
|
|
2002
|
+
"aria-describedby": "modal-modal-description",
|
|
2003
|
+
className: "forgot-password-modal"
|
|
2004
|
+
}, React.createElement(Box, {
|
|
2005
|
+
style: style
|
|
2006
|
+
}, React.createElement("div", null, React.createElement(Formik, {
|
|
2007
|
+
initialValues: {
|
|
2008
|
+
email: ''
|
|
2009
|
+
},
|
|
2010
|
+
validationSchema: Schema,
|
|
2011
|
+
onSubmit: onForgotPassword
|
|
2012
|
+
}, function (_ref4) {
|
|
2013
|
+
var isValid = _ref4.isValid,
|
|
2014
|
+
dirty = _ref4.dirty,
|
|
2015
|
+
handleSubmit = _ref4.handleSubmit;
|
|
2016
|
+
return React.createElement(Form, {
|
|
2017
|
+
onSubmit: handleSubmit
|
|
2018
|
+
}, React.createElement("div", {
|
|
2019
|
+
className: "forgot-password-container"
|
|
2020
|
+
}, React.createElement("div", {
|
|
2021
|
+
className: "title"
|
|
2022
|
+
}, "Password Reset"), React.createElement("div", {
|
|
2023
|
+
className: "forgot-password-container__singleField"
|
|
2024
|
+
}, React.createElement(Field, {
|
|
2025
|
+
name: "email",
|
|
2026
|
+
label: "Email",
|
|
2027
|
+
component: CustomField
|
|
2028
|
+
}))), React.createElement("div", {
|
|
2029
|
+
className: "forgot-password-action-button"
|
|
2030
|
+
}, React.createElement("button", {
|
|
2031
|
+
type: "submit",
|
|
2032
|
+
disabled: !(isValid && dirty)
|
|
2033
|
+
}, loading ? React.createElement(CircularProgress$1, {
|
|
2034
|
+
size: "22px"
|
|
2035
|
+
}) : 'Submit')), React.createElement("div", {
|
|
2036
|
+
className: "login"
|
|
2037
|
+
}, React.createElement("span", {
|
|
2038
|
+
onClick: onLogin
|
|
2039
|
+
}, "Back to Log In")));
|
|
2040
|
+
}))));
|
|
2262
2041
|
};
|
|
2263
2042
|
|
|
2264
|
-
var
|
|
2265
|
-
|
|
2043
|
+
var style$1 = {
|
|
2044
|
+
position: 'absolute',
|
|
2045
|
+
top: '50%',
|
|
2046
|
+
left: '50%',
|
|
2047
|
+
transform: 'translate(-50%, -50%)',
|
|
2048
|
+
minWidth: 480,
|
|
2049
|
+
backgroundColor: '#e3e3e3',
|
|
2050
|
+
border: '1px solid white',
|
|
2051
|
+
outline: 'none'
|
|
2266
2052
|
};
|
|
2267
|
-
var
|
|
2268
|
-
return
|
|
2269
|
-
|
|
2053
|
+
var setLoggedUserData = function setLoggedUserData(data) {
|
|
2054
|
+
return {
|
|
2055
|
+
id: data.id,
|
|
2056
|
+
first_name: data.firstName,
|
|
2057
|
+
last_name: data.lastName,
|
|
2058
|
+
email: data.email,
|
|
2059
|
+
confirmEmail: data.email,
|
|
2060
|
+
city: (data == null ? void 0 : data.city) || '',
|
|
2061
|
+
country: (data == null ? void 0 : data.countryId) || (data == null ? void 0 : data.country) || '',
|
|
2062
|
+
phone: (data == null ? void 0 : data.phone) || '',
|
|
2063
|
+
street_address: (data == null ? void 0 : data.streetAddress) || '',
|
|
2064
|
+
state: (data == null ? void 0 : data.stateId) || '',
|
|
2065
|
+
zip: (data == null ? void 0 : data.zip) || (data == null ? void 0 : data.zipCode) || ''
|
|
2270
2066
|
};
|
|
2271
2067
|
};
|
|
2272
|
-
var
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
return 'RM';
|
|
2068
|
+
var LoginModal = function LoginModal(_ref) {
|
|
2069
|
+
var onClose = _ref.onClose,
|
|
2070
|
+
onLogin = _ref.onLogin,
|
|
2071
|
+
_ref$alreadyHasUser = _ref.alreadyHasUser,
|
|
2072
|
+
alreadyHasUser = _ref$alreadyHasUser === void 0 ? false : _ref$alreadyHasUser,
|
|
2073
|
+
_ref$userExpired = _ref.userExpired,
|
|
2074
|
+
userExpired = _ref$userExpired === void 0 ? false : _ref$userExpired,
|
|
2075
|
+
_ref$onGetProfileData = _ref.onGetProfileDataSuccess,
|
|
2076
|
+
onGetProfileDataSuccess = _ref$onGetProfileData === void 0 ? _identity : _ref$onGetProfileData,
|
|
2077
|
+
_ref$onGetProfileData2 = _ref.onGetProfileDataError,
|
|
2078
|
+
onGetProfileDataError = _ref$onGetProfileData2 === void 0 ? _identity : _ref$onGetProfileData2,
|
|
2079
|
+
_ref$onForgotPassword = _ref.onForgotPassword,
|
|
2080
|
+
onForgotPassword = _ref$onForgotPassword === void 0 ? _identity : _ref$onForgotPassword,
|
|
2081
|
+
_ref$onSignup = _ref.onSignup,
|
|
2082
|
+
onSignup = _ref$onSignup === void 0 ? _identity : _ref$onSignup,
|
|
2083
|
+
_ref$modalClassname = _ref.modalClassname,
|
|
2084
|
+
modalClassname = _ref$modalClassname === void 0 ? '' : _ref$modalClassname,
|
|
2085
|
+
logo = _ref.logo,
|
|
2086
|
+
_ref$showForgotPasswo = _ref.showForgotPasswordButton,
|
|
2087
|
+
showForgotPasswordButton = _ref$showForgotPasswo === void 0 ? false : _ref$showForgotPasswo,
|
|
2088
|
+
_ref$showSignUpButton = _ref.showSignUpButton,
|
|
2089
|
+
showSignUpButton = _ref$showSignUpButton === void 0 ? false : _ref$showSignUpButton;
|
|
2295
2090
|
|
|
2296
|
-
|
|
2297
|
-
|
|
2091
|
+
var _useState = useState(''),
|
|
2092
|
+
error = _useState[0],
|
|
2093
|
+
setError = _useState[1];
|
|
2298
2094
|
|
|
2299
|
-
|
|
2300
|
-
|
|
2095
|
+
return React.createElement(Modal$1, {
|
|
2096
|
+
open: true,
|
|
2097
|
+
onClose: onClose,
|
|
2098
|
+
"aria-labelledby": "modal-modal-title",
|
|
2099
|
+
"aria-describedby": "modal-modal-description",
|
|
2100
|
+
className: "login-modal " + modalClassname
|
|
2101
|
+
}, React.createElement(Box$1, {
|
|
2102
|
+
style: style$1
|
|
2103
|
+
}, React.createElement("div", null, React.createElement(Formik, {
|
|
2104
|
+
initialValues: {
|
|
2105
|
+
email: '',
|
|
2106
|
+
password: ''
|
|
2107
|
+
},
|
|
2108
|
+
onSubmit: function () {
|
|
2109
|
+
var _onSubmit = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(_ref2) {
|
|
2110
|
+
var email, password, body, profileResponse, profileSpecifiedData, profileDataObj, event, _e$response, _e$response$data, _error;
|
|
2301
2111
|
|
|
2302
|
-
|
|
2303
|
-
|
|
2112
|
+
return runtime_1.wrap(function _callee$(_context) {
|
|
2113
|
+
while (1) {
|
|
2114
|
+
switch (_context.prev = _context.next) {
|
|
2115
|
+
case 0:
|
|
2116
|
+
email = _ref2.email, password = _ref2.password;
|
|
2117
|
+
_context.prev = 1;
|
|
2118
|
+
body = {
|
|
2119
|
+
email: email,
|
|
2120
|
+
password: password
|
|
2121
|
+
};
|
|
2122
|
+
_context.next = 5;
|
|
2123
|
+
return authorize(body);
|
|
2304
2124
|
|
|
2305
|
-
|
|
2306
|
-
|
|
2125
|
+
case 5:
|
|
2126
|
+
profileResponse = null;
|
|
2127
|
+
_context.prev = 6;
|
|
2128
|
+
_context.next = 9;
|
|
2129
|
+
return getProfileData();
|
|
2307
2130
|
|
|
2308
|
-
|
|
2309
|
-
|
|
2131
|
+
case 9:
|
|
2132
|
+
profileResponse = _context.sent;
|
|
2133
|
+
onGetProfileDataSuccess(profileResponse.data);
|
|
2134
|
+
_context.next = 17;
|
|
2135
|
+
break;
|
|
2310
2136
|
|
|
2311
|
-
|
|
2312
|
-
|
|
2137
|
+
case 13:
|
|
2138
|
+
_context.prev = 13;
|
|
2139
|
+
_context.t0 = _context["catch"](6);
|
|
2313
2140
|
|
|
2314
|
-
|
|
2315
|
-
|
|
2141
|
+
if (axios.isAxiosError(_context.t0)) {
|
|
2142
|
+
onGetProfileDataError(_context.t0);
|
|
2143
|
+
}
|
|
2316
2144
|
|
|
2317
|
-
|
|
2318
|
-
return '฿';
|
|
2145
|
+
return _context.abrupt("return");
|
|
2319
2146
|
|
|
2320
|
-
|
|
2321
|
-
|
|
2147
|
+
case 17:
|
|
2148
|
+
profileSpecifiedData = _get(profileResponse, 'data.data');
|
|
2149
|
+
profileDataObj = setLoggedUserData(profileSpecifiedData);
|
|
2322
2150
|
|
|
2323
|
-
|
|
2324
|
-
|
|
2151
|
+
if (typeof window !== 'undefined') {
|
|
2152
|
+
window.localStorage.setItem('user_data', JSON.stringify(profileDataObj));
|
|
2153
|
+
event = new window.CustomEvent('tf-login');
|
|
2154
|
+
window.document.dispatchEvent(event);
|
|
2155
|
+
}
|
|
2325
2156
|
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
};
|
|
2157
|
+
onLogin();
|
|
2158
|
+
_context.next = 26;
|
|
2159
|
+
break;
|
|
2330
2160
|
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
type = _ref$type === void 0 ? 'text' : _ref$type,
|
|
2335
|
-
field = _ref.field,
|
|
2336
|
-
_ref$form = _ref.form,
|
|
2337
|
-
errors = _ref$form.errors,
|
|
2338
|
-
setFieldError = _ref$form.setFieldError,
|
|
2339
|
-
setStatus = _ref$form.setStatus;
|
|
2161
|
+
case 23:
|
|
2162
|
+
_context.prev = 23;
|
|
2163
|
+
_context.t1 = _context["catch"](1);
|
|
2340
2164
|
|
|
2341
|
-
|
|
2165
|
+
if (axios.isAxiosError(_context.t1)) {
|
|
2166
|
+
_error = (_context.t1 == null ? void 0 : (_e$response = _context.t1.response) == null ? void 0 : (_e$response$data = _e$response.data) == null ? void 0 : _e$response$data.message) || 'Error';
|
|
2167
|
+
setError(_error);
|
|
2168
|
+
} else if (_context.t1 instanceof Error) {
|
|
2169
|
+
setError((_context.t1 == null ? void 0 : _context.t1.message) || 'Error');
|
|
2170
|
+
}
|
|
2342
2171
|
|
|
2172
|
+
case 26:
|
|
2173
|
+
case "end":
|
|
2174
|
+
return _context.stop();
|
|
2175
|
+
}
|
|
2176
|
+
}
|
|
2177
|
+
}, _callee, null, [[1, 23], [6, 13]]);
|
|
2178
|
+
}));
|
|
2343
2179
|
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
useEffect(function () {
|
|
2348
|
-
if (field.value) {
|
|
2349
|
-
var _setStatus;
|
|
2180
|
+
function onSubmit(_x) {
|
|
2181
|
+
return _onSubmit.apply(this, arguments);
|
|
2182
|
+
}
|
|
2350
2183
|
|
|
2351
|
-
|
|
2352
|
-
}
|
|
2184
|
+
return onSubmit;
|
|
2185
|
+
}()
|
|
2186
|
+
}, function (props) {
|
|
2187
|
+
return React.createElement(Form, {
|
|
2188
|
+
onSubmit: props.handleSubmit
|
|
2189
|
+
}, React.createElement("div", {
|
|
2190
|
+
className: "modal-title"
|
|
2191
|
+
}, "Login"), React.createElement("div", {
|
|
2192
|
+
className: 'login-logo-container'
|
|
2193
|
+
}, React.createElement("img", {
|
|
2194
|
+
className: "login-logo-tff",
|
|
2195
|
+
src: logo || "https://www.ticketfairy.com/resources/images/logo-ttf-black.svg",
|
|
2196
|
+
alt: "logo"
|
|
2197
|
+
})), React.createElement("div", {
|
|
2198
|
+
className: "server_auth__error"
|
|
2199
|
+
}, error), alreadyHasUser && React.createElement("p", {
|
|
2200
|
+
className: "info-text-for-login"
|
|
2201
|
+
}, "It appears this email is already attached to an account. Please log in here to complete your registration."), userExpired && React.createElement("p", {
|
|
2202
|
+
className: "info-text-for-login"
|
|
2203
|
+
}, "Your session has expired, please log in again."), React.createElement("div", {
|
|
2204
|
+
className: "login-modal-body"
|
|
2205
|
+
}, React.createElement("div", {
|
|
2206
|
+
className: "login-modal-body__email"
|
|
2207
|
+
}, React.createElement(Field, {
|
|
2208
|
+
name: 'email',
|
|
2209
|
+
validate: requiredValidator
|
|
2210
|
+
}, function (_ref3) {
|
|
2211
|
+
var field = _ref3.field,
|
|
2212
|
+
meta = _ref3.meta;
|
|
2213
|
+
return React.createElement(TextField$1, Object.assign({
|
|
2214
|
+
label: 'Email',
|
|
2215
|
+
type: 'email',
|
|
2216
|
+
fullWidth: true,
|
|
2217
|
+
error: !!meta.error && meta.touched,
|
|
2218
|
+
helperText: meta.touched && meta.error
|
|
2219
|
+
}, field));
|
|
2220
|
+
})), React.createElement("div", {
|
|
2221
|
+
className: "login-modal-body__password"
|
|
2222
|
+
}, React.createElement(Field, {
|
|
2223
|
+
name: 'password',
|
|
2224
|
+
validate: requiredValidator
|
|
2225
|
+
}, function (_ref4) {
|
|
2226
|
+
var field = _ref4.field,
|
|
2227
|
+
meta = _ref4.meta;
|
|
2228
|
+
return React.createElement(TextField$1, Object.assign({
|
|
2229
|
+
label: "Password",
|
|
2230
|
+
type: "password",
|
|
2231
|
+
fullWidth: true,
|
|
2232
|
+
error: !!meta.error && meta.touched,
|
|
2233
|
+
helperText: meta.touched && meta.error
|
|
2234
|
+
}, field));
|
|
2235
|
+
})), React.createElement("div", {
|
|
2236
|
+
className: "login-action-button"
|
|
2237
|
+
}, React.createElement("button", {
|
|
2238
|
+
type: "submit"
|
|
2239
|
+
}, "Login")), showForgotPasswordButton && React.createElement("div", {
|
|
2240
|
+
className: "forgot-password"
|
|
2241
|
+
}, React.createElement("span", {
|
|
2242
|
+
"aria-hidden": "true",
|
|
2243
|
+
onClick: onForgotPassword
|
|
2244
|
+
}, "Forgot password?")), showSignUpButton && React.createElement("div", {
|
|
2245
|
+
className: "forgot-password"
|
|
2246
|
+
}, React.createElement("span", {
|
|
2247
|
+
"aria-hidden": "true",
|
|
2248
|
+
onClick: onSignup
|
|
2249
|
+
}, "Sign up"))));
|
|
2250
|
+
}))));
|
|
2251
|
+
};
|
|
2353
2252
|
|
|
2354
|
-
|
|
2355
|
-
|
|
2253
|
+
var style$2 = {
|
|
2254
|
+
position: 'absolute',
|
|
2255
|
+
top: '50%',
|
|
2256
|
+
left: '50%',
|
|
2257
|
+
transform: 'translate(-50%, -50%)',
|
|
2258
|
+
minWidth: 480,
|
|
2259
|
+
backgroundColor: '#fff',
|
|
2260
|
+
border: '1px solid white',
|
|
2261
|
+
outline: 'none',
|
|
2262
|
+
padding: '14px'
|
|
2263
|
+
};
|
|
2264
|
+
var SignupSchema = /*#__PURE__*/object().shape({
|
|
2265
|
+
firstName: /*#__PURE__*/string().required('Required'),
|
|
2266
|
+
lastName: /*#__PURE__*/string().required('Required'),
|
|
2267
|
+
email: /*#__PURE__*/string().email('Invalid email').required('Required'),
|
|
2268
|
+
password: /*#__PURE__*/string().min(6, 'Password must have 5+ characters').required('Required'),
|
|
2269
|
+
confirmPassword: /*#__PURE__*/string().required('Required').oneOf([/*#__PURE__*/ref('password'), null], 'Passwords must match')
|
|
2270
|
+
});
|
|
2271
|
+
var SignupModal = function SignupModal(_ref) {
|
|
2272
|
+
var _ref$onClose = _ref.onClose,
|
|
2273
|
+
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
|
|
2274
|
+
_ref$onLogin = _ref.onLogin,
|
|
2275
|
+
onLogin = _ref$onLogin === void 0 ? function () {} : _ref$onLogin,
|
|
2276
|
+
_ref$onRegisterSucces = _ref.onRegisterSuccess,
|
|
2277
|
+
onRegisterSuccess = _ref$onRegisterSucces === void 0 ? function () {} : _ref$onRegisterSucces,
|
|
2278
|
+
_ref$onRegisterError = _ref.onRegisterError,
|
|
2279
|
+
onRegisterError = _ref$onRegisterError === void 0 ? function () {} : _ref$onRegisterError;
|
|
2280
|
+
|
|
2281
|
+
var _useState = useState(false),
|
|
2282
|
+
loading = _useState[0],
|
|
2283
|
+
setLoading = _useState[1];
|
|
2356
2284
|
|
|
2285
|
+
var onSignup = /*#__PURE__*/function () {
|
|
2286
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(values) {
|
|
2287
|
+
var formData, res, access_token_register, refreshToken, tokens;
|
|
2357
2288
|
return runtime_1.wrap(function _callee$(_context) {
|
|
2358
2289
|
while (1) {
|
|
2359
2290
|
switch (_context.prev = _context.next) {
|
|
2360
2291
|
case 0:
|
|
2361
2292
|
_context.prev = 0;
|
|
2293
|
+
setLoading(true);
|
|
2294
|
+
formData = new FormData();
|
|
2295
|
+
formData.set('first_name', values.firstName);
|
|
2296
|
+
formData.set('last_name', values.lastName);
|
|
2297
|
+
formData.set('email', values.email);
|
|
2298
|
+
formData.set('password', values.password);
|
|
2299
|
+
formData.set('password_confirmation', values.confirmPassword);
|
|
2300
|
+
formData.append('client_id', CONFIGS.CLIENT_ID || 'e9d8f8922797b4621e562255afe90dbf');
|
|
2301
|
+
formData.append('client_secret', CONFIGS.CLIENT_SECRET || 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9');
|
|
2302
|
+
_context.next = 12;
|
|
2303
|
+
return register(formData);
|
|
2362
2304
|
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2305
|
+
case 12:
|
|
2306
|
+
res = _context.sent;
|
|
2307
|
+
access_token_register = _get(res, 'data.data.attributes.access_token');
|
|
2308
|
+
refreshToken = _get(res, 'data.data.attributes.refresh_token');
|
|
2309
|
+
handleSetAccessToken(access_token_register);
|
|
2310
|
+
tokens = {
|
|
2311
|
+
accessToken: access_token_register,
|
|
2312
|
+
refreshToken: refreshToken
|
|
2313
|
+
};
|
|
2314
|
+
onRegisterSuccess(tokens);
|
|
2315
|
+
onClose();
|
|
2316
|
+
_context.next = 24;
|
|
2374
2317
|
break;
|
|
2375
2318
|
|
|
2376
|
-
case
|
|
2377
|
-
_context.prev =
|
|
2319
|
+
case 21:
|
|
2320
|
+
_context.prev = 21;
|
|
2378
2321
|
_context.t0 = _context["catch"](0);
|
|
2379
|
-
message = _get(_context.t0, 'response.data.message', 'Invalid phone number');
|
|
2380
|
-
setFieldError(field.name, message);
|
|
2381
2322
|
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
return _context.finish(11);
|
|
2323
|
+
if (axios.isAxiosError(_context.t0)) {
|
|
2324
|
+
onRegisterError(_context.t0, values.email);
|
|
2325
|
+
}
|
|
2386
2326
|
|
|
2387
|
-
case
|
|
2327
|
+
case 24:
|
|
2328
|
+
_context.prev = 24;
|
|
2329
|
+
setLoading(false);
|
|
2330
|
+
return _context.finish(24);
|
|
2331
|
+
|
|
2332
|
+
case 27:
|
|
2388
2333
|
case "end":
|
|
2389
2334
|
return _context.stop();
|
|
2390
2335
|
}
|
|
2391
2336
|
}
|
|
2392
|
-
}, _callee, null, [[0,
|
|
2393
|
-
}))
|
|
2394
|
-
}, [field.value]);
|
|
2395
|
-
return React.createElement(TextField$1, Object.assign({}, field, {
|
|
2396
|
-
id: field.name,
|
|
2397
|
-
label: label,
|
|
2398
|
-
type: type,
|
|
2399
|
-
fullWidth: true,
|
|
2400
|
-
error: !!error,
|
|
2401
|
-
helperText: error,
|
|
2402
|
-
value: field.value || ''
|
|
2403
|
-
}));
|
|
2404
|
-
};
|
|
2405
|
-
|
|
2406
|
-
function Loader() {
|
|
2407
|
-
return React.createElement("div", {
|
|
2408
|
-
className: "loader-container"
|
|
2409
|
-
}, React.createElement(CircularProgress$1, null));
|
|
2410
|
-
}
|
|
2337
|
+
}, _callee, null, [[0, 21, 24, 27]]);
|
|
2338
|
+
}));
|
|
2411
2339
|
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
field = _ref.field,
|
|
2417
|
-
_ref$selectOptions = _ref.selectOptions,
|
|
2418
|
-
selectOptions = _ref$selectOptions === void 0 ? [] : _ref$selectOptions,
|
|
2419
|
-
_ref$form = _ref.form,
|
|
2420
|
-
touched = _ref$form.touched,
|
|
2421
|
-
errors = _ref$form.errors,
|
|
2422
|
-
theme = _ref.theme;
|
|
2423
|
-
var isTouched = Boolean(_get(touched, field.name));
|
|
2340
|
+
return function onSignup(_x) {
|
|
2341
|
+
return _ref2.apply(this, arguments);
|
|
2342
|
+
};
|
|
2343
|
+
}();
|
|
2424
2344
|
|
|
2425
|
-
var
|
|
2345
|
+
var _onClose = loading ? function () {} : onClose;
|
|
2426
2346
|
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
},
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
id: field.name
|
|
2347
|
+
return React.createElement(Modal, {
|
|
2348
|
+
open: true,
|
|
2349
|
+
onClose: _onClose,
|
|
2350
|
+
"aria-labelledby": "modal-modal-title",
|
|
2351
|
+
"aria-describedby": "modal-modal-description",
|
|
2352
|
+
className: "signup-modal"
|
|
2353
|
+
}, React.createElement(Box, {
|
|
2354
|
+
style: style$2
|
|
2355
|
+
}, React.createElement("div", null, React.createElement(Formik, {
|
|
2356
|
+
initialValues: {
|
|
2357
|
+
firstName: '',
|
|
2358
|
+
lastName: '',
|
|
2359
|
+
email: '',
|
|
2360
|
+
password: '',
|
|
2361
|
+
confirmPassword: ''
|
|
2443
2362
|
},
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
},
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2363
|
+
validationSchema: SignupSchema,
|
|
2364
|
+
onSubmit: onSignup
|
|
2365
|
+
}, function (_ref3) {
|
|
2366
|
+
var isValid = _ref3.isValid,
|
|
2367
|
+
dirty = _ref3.dirty,
|
|
2368
|
+
handleSubmit = _ref3.handleSubmit;
|
|
2369
|
+
return React.createElement(Form, {
|
|
2370
|
+
onSubmit: handleSubmit
|
|
2371
|
+
}, React.createElement("div", {
|
|
2372
|
+
className: "signup-container"
|
|
2373
|
+
}, React.createElement("div", {
|
|
2374
|
+
className: "title"
|
|
2375
|
+
}, "Create an Account"), React.createElement("div", {
|
|
2376
|
+
className: "signup-container__twoFields"
|
|
2377
|
+
}, React.createElement("div", {
|
|
2378
|
+
className: "is-half"
|
|
2379
|
+
}, React.createElement(Field, {
|
|
2380
|
+
name: "firstName",
|
|
2381
|
+
label: "First Name",
|
|
2382
|
+
component: CustomField
|
|
2383
|
+
})), React.createElement("div", {
|
|
2384
|
+
className: "is-half"
|
|
2385
|
+
}, React.createElement(Field, {
|
|
2386
|
+
name: "lastName",
|
|
2387
|
+
label: "Last Name",
|
|
2388
|
+
component: CustomField
|
|
2389
|
+
}))), React.createElement("div", {
|
|
2390
|
+
className: "signup-container__singleField"
|
|
2391
|
+
}, React.createElement("div", {
|
|
2392
|
+
className: ""
|
|
2393
|
+
}, React.createElement(Field, {
|
|
2394
|
+
name: "email",
|
|
2395
|
+
label: "Email",
|
|
2396
|
+
component: CustomField
|
|
2397
|
+
}))), React.createElement("div", {
|
|
2398
|
+
className: "signup-container__twoFields"
|
|
2399
|
+
}, React.createElement("div", {
|
|
2400
|
+
className: "is-half"
|
|
2401
|
+
}, React.createElement(Field, {
|
|
2402
|
+
name: "password",
|
|
2403
|
+
label: "Password",
|
|
2404
|
+
type: "password",
|
|
2405
|
+
component: CustomField
|
|
2406
|
+
})), React.createElement("div", {
|
|
2407
|
+
className: "is-half"
|
|
2408
|
+
}, React.createElement(Field, {
|
|
2409
|
+
name: "confirmPassword",
|
|
2410
|
+
label: "Confirm Password",
|
|
2411
|
+
type: "password",
|
|
2412
|
+
component: CustomField
|
|
2413
|
+
})))), React.createElement("div", {
|
|
2414
|
+
className: "signup-action-button"
|
|
2415
|
+
}, React.createElement("button", {
|
|
2416
|
+
type: "submit",
|
|
2417
|
+
disabled: !(isValid && dirty)
|
|
2418
|
+
}, loading ? React.createElement(CircularProgress$1, {
|
|
2419
|
+
size: "22px"
|
|
2420
|
+
}) : 'Submit')), React.createElement("div", {
|
|
2421
|
+
className: "login"
|
|
2422
|
+
}, React.createElement("span", {
|
|
2423
|
+
onClick: onLogin
|
|
2424
|
+
}, "Login")));
|
|
2425
|
+
}))));
|
|
2460
2426
|
};
|
|
2461
2427
|
|
|
2462
2428
|
var showZero = function showZero(value) {
|
|
@@ -2522,144 +2488,229 @@ var TimerWidget = function TimerWidget(_ref) {
|
|
|
2522
2488
|
var hideTimer = function hideTimer() {
|
|
2523
2489
|
var timerRl = document.querySelector('.timer');
|
|
2524
2490
|
|
|
2525
|
-
if (timerRl) {
|
|
2526
|
-
timerRl.style.visibility = "hidden";
|
|
2491
|
+
if (timerRl) {
|
|
2492
|
+
timerRl.style.visibility = "hidden";
|
|
2493
|
+
}
|
|
2494
|
+
};
|
|
2495
|
+
|
|
2496
|
+
return showTimer && !!expires_at ? React.createElement("div", {
|
|
2497
|
+
className: "timer"
|
|
2498
|
+
}, React.createElement("div", {
|
|
2499
|
+
className: 'close-icon',
|
|
2500
|
+
onClick: hideTimer
|
|
2501
|
+
}, React.createElement(SVG, {
|
|
2502
|
+
src: getImage('cross.svg'),
|
|
2503
|
+
width: '10',
|
|
2504
|
+
height: '10',
|
|
2505
|
+
fill: '#fff'
|
|
2506
|
+
})), React.createElement("div", {
|
|
2507
|
+
className: "toast-message"
|
|
2508
|
+
}, React.createElement("p", null, "Please complete your purchase before the timer reaches zero."), React.createElement("p", {
|
|
2509
|
+
className: "countdown"
|
|
2510
|
+
}, React.createElement(Countdown$1, {
|
|
2511
|
+
date: Date.now() + expires_at * 1000,
|
|
2512
|
+
renderer: function renderer(props) {
|
|
2513
|
+
return _renderer(_extends({}, props, {
|
|
2514
|
+
handleCountdownFinish: handleCountdownFinish
|
|
2515
|
+
}));
|
|
2516
|
+
}
|
|
2517
|
+
})))) : null;
|
|
2518
|
+
};
|
|
2519
|
+
|
|
2520
|
+
var TimerWidget$1 = /*#__PURE__*/memo(TimerWidget);
|
|
2521
|
+
|
|
2522
|
+
var _excluded$1 = ["firstName", "lastName", "holderAge", "confirmEmail", "confirmPassword"];
|
|
2523
|
+
var getInitialValues = function getInitialValues(data, propsInitialValues, userValues) {
|
|
2524
|
+
if (data === void 0) {
|
|
2525
|
+
data = [];
|
|
2526
|
+
}
|
|
2527
|
+
|
|
2528
|
+
if (propsInitialValues === void 0) {
|
|
2529
|
+
propsInitialValues = {};
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
if (userValues === void 0) {
|
|
2533
|
+
userValues = {};
|
|
2534
|
+
}
|
|
2535
|
+
|
|
2536
|
+
var results = _flatMapDeep(data, function (_ref) {
|
|
2537
|
+
var fields = _ref.fields;
|
|
2538
|
+
return _map(fields, function (_ref2) {
|
|
2539
|
+
var groupItems = _ref2.groupItems;
|
|
2540
|
+
return _map(groupItems, function (_ref3) {
|
|
2541
|
+
var name = _ref3.name;
|
|
2542
|
+
return name;
|
|
2543
|
+
});
|
|
2544
|
+
});
|
|
2545
|
+
});
|
|
2546
|
+
|
|
2547
|
+
var initialValues = {};
|
|
2548
|
+
|
|
2549
|
+
_forEach(results, function (item) {
|
|
2550
|
+
initialValues[item] = propsInitialValues[item] || userValues[item] || '';
|
|
2551
|
+
}); // set logged in user as first ticket holder
|
|
2552
|
+
|
|
2553
|
+
|
|
2554
|
+
initialValues['holderFirstName-0'] = propsInitialValues.firstName || userValues.firstName || '';
|
|
2555
|
+
initialValues['holderLastName-0'] = propsInitialValues.lastName || userValues.lastName || '';
|
|
2556
|
+
initialValues['holderEmail-0'] = propsInitialValues.email || userValues.email || '';
|
|
2557
|
+
return initialValues;
|
|
2558
|
+
};
|
|
2559
|
+
var createRegisterFormData = function createRegisterFormData(values, checkoutBody) {
|
|
2560
|
+
if (values === void 0) {
|
|
2561
|
+
values = {};
|
|
2562
|
+
}
|
|
2563
|
+
|
|
2564
|
+
var bodyFormData = new FormData();
|
|
2565
|
+
bodyFormData.append('first_name', values.firstName);
|
|
2566
|
+
bodyFormData.append('last_name', values.lastName);
|
|
2567
|
+
bodyFormData.append('email', values.email);
|
|
2568
|
+
bodyFormData.append('password', values.password);
|
|
2569
|
+
bodyFormData.append('password_confirmation', values.confirmPassword);
|
|
2570
|
+
bodyFormData.append('client_id', CONFIGS.CLIENT_ID || 'e9d8f8922797b4621e562255afe90dbf');
|
|
2571
|
+
bodyFormData.append('client_secret', CONFIGS.CLIENT_SECRET || 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9');
|
|
2572
|
+
bodyFormData.append('check_cart_expiration', 'true');
|
|
2573
|
+
|
|
2574
|
+
_forEach(checkoutBody.attributes, function (item, key) {
|
|
2575
|
+
bodyFormData.append(key, item);
|
|
2576
|
+
});
|
|
2577
|
+
|
|
2578
|
+
return bodyFormData;
|
|
2579
|
+
};
|
|
2580
|
+
var setLoggedUserData$1 = function setLoggedUserData(data) {
|
|
2581
|
+
return {
|
|
2582
|
+
id: data.id,
|
|
2583
|
+
first_name: data.firstName,
|
|
2584
|
+
last_name: data.lastName,
|
|
2585
|
+
email: data.email,
|
|
2586
|
+
confirmEmail: data.email,
|
|
2587
|
+
city: (data == null ? void 0 : data.city) || '',
|
|
2588
|
+
country: (data == null ? void 0 : data.countryId) || (data == null ? void 0 : data.country) || '',
|
|
2589
|
+
phone: (data == null ? void 0 : data.phone) || '',
|
|
2590
|
+
street_address: (data == null ? void 0 : data.streetAddress) || '',
|
|
2591
|
+
state: (data == null ? void 0 : data.stateId) || '',
|
|
2592
|
+
zip: (data == null ? void 0 : data.zip) || (data == null ? void 0 : data.zipCode) || ''
|
|
2593
|
+
};
|
|
2594
|
+
};
|
|
2595
|
+
var createCheckoutDataBody = function createCheckoutDataBody(ticketsQuantity, values, logedInValues, includeDob) {
|
|
2596
|
+
if (values === void 0) {
|
|
2597
|
+
values = {};
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
if (logedInValues === void 0) {
|
|
2601
|
+
logedInValues = {};
|
|
2602
|
+
}
|
|
2603
|
+
|
|
2604
|
+
if (includeDob === void 0) {
|
|
2605
|
+
includeDob = false;
|
|
2606
|
+
}
|
|
2607
|
+
|
|
2608
|
+
var _values = values,
|
|
2609
|
+
firstName = _values.firstName,
|
|
2610
|
+
lastName = _values.lastName,
|
|
2611
|
+
holderAge = _values.holderAge,
|
|
2612
|
+
restValues = _objectWithoutPropertiesLoose(_values, _excluded$1);
|
|
2613
|
+
|
|
2614
|
+
var holders = [];
|
|
2615
|
+
var ticket_holders = [];
|
|
2616
|
+
|
|
2617
|
+
var _loop = function _loop(i) {
|
|
2618
|
+
var individualHolder = Object.fromEntries(Object.entries(values).filter(function (_ref4) {
|
|
2619
|
+
var key = _ref4[0];
|
|
2620
|
+
return key.includes(String(i));
|
|
2621
|
+
}));
|
|
2622
|
+
holders.push(individualHolder);
|
|
2623
|
+
};
|
|
2624
|
+
|
|
2625
|
+
for (var i = 0; i <= ticketsQuantity; i++) {
|
|
2626
|
+
_loop(i);
|
|
2627
|
+
}
|
|
2628
|
+
|
|
2629
|
+
var filteredHolders = holders.filter(function (holder) {
|
|
2630
|
+
return Object.entries(holder).length > 0;
|
|
2631
|
+
});
|
|
2632
|
+
ticket_holders = filteredHolders.map(function (item, index) {
|
|
2633
|
+
return {
|
|
2634
|
+
first_name: !index ? item["holderFirstName-" + index] || logedInValues.firstNameLogged || '' : item["holderFirstName-" + index] || '',
|
|
2635
|
+
last_name: !index ? item["holderLastName-" + index] || logedInValues.lastNameLogged || '' : item["holderLastName-" + index] || '',
|
|
2636
|
+
phone: item["holderPhone-" + index] || '',
|
|
2637
|
+
email: !index ? item["holderEmail-" + index] || logedInValues.emailLogged || '' : item["holderEmail-" + index] || ''
|
|
2638
|
+
};
|
|
2639
|
+
});
|
|
2640
|
+
var filteredRestValue = {};
|
|
2641
|
+
|
|
2642
|
+
_forEach(restValues, function (value, key) {
|
|
2643
|
+
if (!key.includes('holder')) {
|
|
2644
|
+
filteredRestValue[key] = value;
|
|
2645
|
+
}
|
|
2646
|
+
});
|
|
2647
|
+
|
|
2648
|
+
var body = {
|
|
2649
|
+
attributes: _extends({}, filteredRestValue, {
|
|
2650
|
+
email: restValues.email || logedInValues.emailLogged,
|
|
2651
|
+
confirm_email: restValues.email || logedInValues.emailLogged,
|
|
2652
|
+
first_name: firstName || logedInValues.firstNameLogged,
|
|
2653
|
+
last_name: lastName || logedInValues.lastNameLogged,
|
|
2654
|
+
ticket_holders: ticket_holders
|
|
2655
|
+
})
|
|
2656
|
+
};
|
|
2657
|
+
|
|
2658
|
+
if (includeDob) {
|
|
2659
|
+
var holderAgeDate = new Date(holderAge);
|
|
2660
|
+
body.attributes.dob_day = holderAgeDate.getDate();
|
|
2661
|
+
body.attributes.dob_month = holderAgeDate.getMonth() + 1;
|
|
2662
|
+
body.attributes.dob_year = holderAgeDate.getFullYear();
|
|
2663
|
+
}
|
|
2664
|
+
|
|
2665
|
+
return body;
|
|
2666
|
+
};
|
|
2667
|
+
var getValidateFunctions = function getValidateFunctions(element, states, values) {
|
|
2668
|
+
var validationFunctions = [];
|
|
2669
|
+
|
|
2670
|
+
if (element.required) {
|
|
2671
|
+
if (element.name !== 'state' || element.name === 'state' && states.length) {
|
|
2672
|
+
validationFunctions.push(requiredValidator);
|
|
2527
2673
|
}
|
|
2528
|
-
}
|
|
2674
|
+
}
|
|
2529
2675
|
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
}
|
|
2533
|
-
className: 'close-icon',
|
|
2534
|
-
onClick: hideTimer
|
|
2535
|
-
}, React.createElement(SVG, {
|
|
2536
|
-
src: getImage('cross.svg'),
|
|
2537
|
-
width: '10',
|
|
2538
|
-
height: '10',
|
|
2539
|
-
fill: '#fff'
|
|
2540
|
-
})), React.createElement("div", {
|
|
2541
|
-
className: "toast-message"
|
|
2542
|
-
}, React.createElement("p", null, "Please complete your purchase before the timer reaches zero."), React.createElement("p", {
|
|
2543
|
-
className: "countdown"
|
|
2544
|
-
}, React.createElement(Countdown$1, {
|
|
2545
|
-
date: Date.now() + expires_at * 1000,
|
|
2546
|
-
renderer: function renderer(props) {
|
|
2547
|
-
return _renderer(_extends({}, props, {
|
|
2548
|
-
handleCountdownFinish: handleCountdownFinish
|
|
2549
|
-
}));
|
|
2550
|
-
}
|
|
2551
|
-
})))) : null;
|
|
2552
|
-
};
|
|
2676
|
+
if (element.onValidate) {
|
|
2677
|
+
validationFunctions.push(element.onValidate);
|
|
2678
|
+
}
|
|
2553
2679
|
|
|
2554
|
-
|
|
2680
|
+
if (element.name === 'confirmEmail') {
|
|
2681
|
+
var isSameEmail = function isSameEmail(confirmEmail) {
|
|
2682
|
+
return values.email !== confirmEmail ? 'Please confirm your email address correctly' : null;
|
|
2683
|
+
};
|
|
2555
2684
|
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
message = _ref.message,
|
|
2559
|
-
type = _ref.type,
|
|
2560
|
-
position = _ref.position,
|
|
2561
|
-
_ref$autoHideDuration = _ref.autoHideDuration,
|
|
2562
|
-
autoHideDuration = _ref$autoHideDuration === void 0 ? 3000 : _ref$autoHideDuration,
|
|
2563
|
-
variant = _ref.variant,
|
|
2564
|
-
onClose = _ref.onClose;
|
|
2565
|
-
return React.createElement("div", {
|
|
2566
|
-
className: "snackbar-alert-container"
|
|
2567
|
-
}, React.createElement(Snackbar, {
|
|
2568
|
-
autoHideDuration: autoHideDuration,
|
|
2569
|
-
open: isOpen,
|
|
2570
|
-
anchorOrigin: position || {
|
|
2571
|
-
vertical: 'top',
|
|
2572
|
-
horizontal: 'center'
|
|
2573
|
-
},
|
|
2574
|
-
onClose: onClose,
|
|
2575
|
-
classes: {
|
|
2576
|
-
root: 'snackbar-alert-snackbar-root'
|
|
2577
|
-
}
|
|
2578
|
-
}, React.createElement(Alert, {
|
|
2579
|
-
severity: type,
|
|
2580
|
-
onClose: onClose,
|
|
2581
|
-
variant: variant || 'filled',
|
|
2582
|
-
classes: {
|
|
2583
|
-
icon: 'snackbar-alert-icon',
|
|
2584
|
-
root: 'snackbar-alert-alert-root',
|
|
2585
|
-
action: 'snackbar-alert-action',
|
|
2586
|
-
message: 'snackbar-alert-message',
|
|
2587
|
-
filled: 'snackbar-alert-filled'
|
|
2588
|
-
}
|
|
2589
|
-
}, message)));
|
|
2590
|
-
};
|
|
2685
|
+
validationFunctions.push(isSameEmail);
|
|
2686
|
+
}
|
|
2591
2687
|
|
|
2592
|
-
|
|
2593
|
-
var
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
width: 256
|
|
2599
|
-
},
|
|
2600
|
-
'& .MuiTypography-caption': {
|
|
2601
|
-
width: DATE_SIZE,
|
|
2602
|
-
margin: 0
|
|
2603
|
-
},
|
|
2604
|
-
'& .PrivatePickersSlideTransition-root': {
|
|
2605
|
-
minHeight: DATE_SIZE * 6
|
|
2606
|
-
},
|
|
2607
|
-
'& .PrivatePickersSlideTransition-root [role="row"]': {
|
|
2608
|
-
margin: 0
|
|
2609
|
-
},
|
|
2610
|
-
'& .MuiPickersDay-dayWithMargin': {
|
|
2611
|
-
margin: 0
|
|
2612
|
-
},
|
|
2613
|
-
'& .MuiPickersDay-root': {
|
|
2614
|
-
width: DATE_SIZE,
|
|
2615
|
-
height: DATE_SIZE
|
|
2688
|
+
if (element.name === 'confirmPassword') {
|
|
2689
|
+
var isSame = function isSame(confirmPassword) {
|
|
2690
|
+
return values.password !== confirmPassword ? 'Password confirmation does not match' : null;
|
|
2691
|
+
};
|
|
2692
|
+
|
|
2693
|
+
validationFunctions.push(isSame);
|
|
2616
2694
|
}
|
|
2695
|
+
|
|
2696
|
+
return combineValidators.apply(void 0, validationFunctions);
|
|
2617
2697
|
};
|
|
2618
|
-
var
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
defaultProps: {
|
|
2622
|
-
sx: compactStyles
|
|
2623
|
-
}
|
|
2624
|
-
}
|
|
2698
|
+
var assingUniqueIds = function assingUniqueIds(data) {
|
|
2699
|
+
if (_get(data[0], 'uniqueId')) {
|
|
2700
|
+
return data;
|
|
2625
2701
|
}
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
}, React.createElement(DatePicker, {
|
|
2639
|
-
value: field.value || '',
|
|
2640
|
-
onChange: function onChange(value) {
|
|
2641
|
-
return form.setFieldValue(field.name, value);
|
|
2642
|
-
},
|
|
2643
|
-
PopperProps: {
|
|
2644
|
-
placement: 'bottom-start'
|
|
2645
|
-
},
|
|
2646
|
-
showDaysOutsideCurrentMonth: true,
|
|
2647
|
-
disableFuture: true,
|
|
2648
|
-
inputFormat: "DD/MM/YYYY",
|
|
2649
|
-
mask: "__/__/____",
|
|
2650
|
-
renderInput: function renderInput(params) {
|
|
2651
|
-
return React.createElement(CustomField, Object.assign({}, params, {
|
|
2652
|
-
inputProps: _extends({}, params.inputProps, {
|
|
2653
|
-
placeholder: 'dd/mm/yyyy'
|
|
2654
|
-
}),
|
|
2655
|
-
theme: theme,
|
|
2656
|
-
field: field,
|
|
2657
|
-
form: form,
|
|
2658
|
-
label: label,
|
|
2659
|
-
type: "tel"
|
|
2660
|
-
}));
|
|
2661
|
-
}
|
|
2662
|
-
})));
|
|
2702
|
+
|
|
2703
|
+
return _map(data, function (item) {
|
|
2704
|
+
_forEach(item, function (itemValue, key) {
|
|
2705
|
+
if (_isArray(itemValue)) {
|
|
2706
|
+
item[key] = assingUniqueIds(itemValue);
|
|
2707
|
+
}
|
|
2708
|
+
});
|
|
2709
|
+
|
|
2710
|
+
return _extends({}, item, {
|
|
2711
|
+
uniqueId: nanoid()
|
|
2712
|
+
});
|
|
2713
|
+
});
|
|
2663
2714
|
};
|
|
2664
2715
|
|
|
2665
2716
|
var LogicRunner = function LogicRunner(_ref) {
|
|
@@ -3222,7 +3273,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
3222
3273
|
zIndex: 1205
|
|
3223
3274
|
},
|
|
3224
3275
|
open: true
|
|
3225
|
-
}, React.createElement(CircularProgress, {
|
|
3276
|
+
}, React.createElement(CircularProgress$1, {
|
|
3226
3277
|
color: "inherit"
|
|
3227
3278
|
})), !!expirationTime && enableTimer && React.createElement(TimerWidget$1, {
|
|
3228
3279
|
expires_at: expirationTime,
|
|
@@ -3489,7 +3540,8 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
3489
3540
|
onBlur: props.handleBlur,
|
|
3490
3541
|
component: element.type === 'checkbox' ? CheckboxField : element.type === 'select' ? SelectField : element.type === 'phone' ? PhoneNumberField : element.type === 'date' ? DatePickerField : CustomField,
|
|
3491
3542
|
selectOptions: element.name === 'country' ? countries : element.name === 'state' ? states : [],
|
|
3492
|
-
theme: theme
|
|
3543
|
+
theme: theme,
|
|
3544
|
+
disableDropdown: element.disableDropdown
|
|
3493
3545
|
})));
|
|
3494
3546
|
})));
|
|
3495
3547
|
}));
|
|
@@ -3514,8 +3566,9 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
3514
3566
|
label: element.label,
|
|
3515
3567
|
type: element.type,
|
|
3516
3568
|
required: true,
|
|
3517
|
-
component: element.type === 'checkbox' ? CheckboxField : CustomField,
|
|
3518
|
-
validate: combineValidators(element.required ? requiredValidator : function () {}, element.onValidate ? element.onValidate : function () {})
|
|
3569
|
+
component: element.type === 'checkbox' ? CheckboxField : element.type === 'phone' ? PhoneNumberField : CustomField,
|
|
3570
|
+
validate: combineValidators(element.required ? requiredValidator : function () {}, element.onValidate ? element.onValidate : function () {}),
|
|
3571
|
+
disableDropdown: element.disableDropdown
|
|
3519
3572
|
}));
|
|
3520
3573
|
})));
|
|
3521
3574
|
}));
|
|
@@ -3526,7 +3579,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
3526
3579
|
variant: "contained",
|
|
3527
3580
|
className: "login-register-button",
|
|
3528
3581
|
disabled: props.isSubmitting
|
|
3529
|
-
}, props.isSubmitting ? React.createElement(CircularProgress, {
|
|
3582
|
+
}, props.isSubmitting ? React.createElement(CircularProgress$1, {
|
|
3530
3583
|
size: 26
|
|
3531
3584
|
}) : buttonName))));
|
|
3532
3585
|
}), showModalLogin && React.createElement(LoginModal, {
|
|
@@ -3848,7 +3901,7 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
3848
3901
|
}, React.createElement("button", {
|
|
3849
3902
|
disabled: buttonIsDiabled,
|
|
3850
3903
|
type: "submit"
|
|
3851
|
-
}, isLoading ? React.createElement(CircularProgress
|
|
3904
|
+
}, isLoading ? React.createElement(CircularProgress, {
|
|
3852
3905
|
size: 26
|
|
3853
3906
|
}) : "Pay " + getCurrencySymbolByCurrency(currency) + total))));
|
|
3854
3907
|
};
|
|
@@ -4207,7 +4260,7 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
4207
4260
|
setPaymentIsLoading(true);
|
|
4208
4261
|
handlePaymentMiddleWare(null);
|
|
4209
4262
|
}
|
|
4210
|
-
}, paymentIsLoading ? React.createElement(CircularProgress
|
|
4263
|
+
}, paymentIsLoading ? React.createElement(CircularProgress, {
|
|
4211
4264
|
size: 26
|
|
4212
4265
|
}) : 'Complete Registration')))));
|
|
4213
4266
|
};
|
|
@@ -4538,169 +4591,122 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
|
|
|
4538
4591
|
navigator.clipboard.writeText(_get(inputRef, 'current.value'));
|
|
4539
4592
|
onLinkCopied();
|
|
4540
4593
|
}
|
|
4541
|
-
}, hasCopyIcon ? React.createElement("img", {
|
|
4542
|
-
src: "https://img.icons8.com/office/50/000000/copy.png",
|
|
4543
|
-
alt: "copy"
|
|
4544
|
-
}) : React.createElement("span", {
|
|
4545
|
-
className: 'copy-icon'
|
|
4546
|
-
}, "Copy")))), (showDefaultShareButtons || !!shareButtons.length) && React.createElement(SocialButtons, {
|
|
4547
|
-
showDefaultShareButtons: showDefaultShareButtons,
|
|
4548
|
-
name: data.product_name,
|
|
4549
|
-
appId: messengerAppId,
|
|
4550
|
-
shareLink: data.personal_share_link,
|
|
4551
|
-
shareButtons: shareButtons
|
|
4552
|
-
})))), React.createElement("div", {
|
|
4553
|
-
className: "pricing-section"
|
|
4554
|
-
}, React.createElement("div", {
|
|
4555
|
-
className: "invitation_title"
|
|
4556
|
-
}, "How much cheaper?"), _map(data.personal_share_sales, function (pricing, index) {
|
|
4557
|
-
return React.createElement("div", {
|
|
4558
|
-
key: index,
|
|
4559
|
-
className: "pricing-section_wrapper"
|
|
4560
|
-
}, React.createElement("div", {
|
|
4561
|
-
className: "pricing-section_label"
|
|
4562
|
-
}, pricing.label, pricing.subLabel && React.createElement("div", {
|
|
4563
|
-
className: "pricing-section_sublabel"
|
|
4564
|
-
}, pricing.subLabel)), React.createElement("div", {
|
|
4565
|
-
className: "pricing-section_price"
|
|
4566
|
-
}, ' ', pricing.price));
|
|
4567
|
-
}))))));
|
|
4568
|
-
};
|
|
4569
|
-
|
|
4570
|
-
var getTicketSelectOptions = function getTicketSelectOptions(maxCount, minCount, multiplier) {
|
|
4571
|
-
if (maxCount === void 0) {
|
|
4572
|
-
maxCount = 10;
|
|
4573
|
-
}
|
|
4574
|
-
|
|
4575
|
-
if (minCount === void 0) {
|
|
4576
|
-
minCount = 1;
|
|
4577
|
-
}
|
|
4578
|
-
|
|
4579
|
-
if (multiplier === void 0) {
|
|
4580
|
-
multiplier = 1;
|
|
4581
|
-
}
|
|
4582
|
-
|
|
4583
|
-
var options = [{
|
|
4584
|
-
label: 0,
|
|
4585
|
-
value: 0
|
|
4586
|
-
}];
|
|
4587
|
-
|
|
4588
|
-
for (var i = minCount; i <= Math.min(50, maxCount); i += multiplier) {
|
|
4589
|
-
options.push({
|
|
4590
|
-
label: i,
|
|
4591
|
-
value: i
|
|
4592
|
-
});
|
|
4593
|
-
}
|
|
4594
|
-
|
|
4595
|
-
return options;
|
|
4596
|
-
};
|
|
4597
|
-
|
|
4598
|
-
var TicketRow = function TicketRow(_ref) {
|
|
4599
|
-
var ticketTier = _ref.ticketTier,
|
|
4600
|
-
prevTicketTier = _ref.prevTicketTier,
|
|
4601
|
-
selectedTickets = _ref.selectedTickets,
|
|
4602
|
-
handleTicketSelect = _ref.handleTicketSelect;
|
|
4603
|
-
var soldOutMessage = ticketTier.soldOutMessage ? ("" + ticketTier.soldOutMessage).toUpperCase() : 'SOLD OUT';
|
|
4604
|
-
var isSalesClosed = !ticketTier.salesStarted || ticketTier.salesEnded;
|
|
4605
|
-
var options = getTicketSelectOptions(ticketTier.maxQuantity, ticketTier.minQuantity, ticketTier.multiplier);
|
|
4606
|
-
var ticketsClosedMessage = !ticketTier.salesStarted ? 'Sales not started' : 'Sales Ended';
|
|
4607
|
-
var onSaleContent = React.createElement("div", {
|
|
4608
|
-
className: "get-tickets"
|
|
4609
|
-
}, React.createElement(Box, {
|
|
4610
|
-
className: "get-tickets__selectbox"
|
|
4611
|
-
}, React.createElement(FormControl$1, {
|
|
4612
|
-
fullWidth: true
|
|
4613
|
-
}, React.createElement(Select, {
|
|
4614
|
-
sx: {
|
|
4615
|
-
borderRadius: 0
|
|
4616
|
-
},
|
|
4617
|
-
value: selectedTickets[ticketTier.id] ? selectedTickets[ticketTier.id] : 0,
|
|
4618
|
-
onChange: handleTicketSelect,
|
|
4619
|
-
displayEmpty: true,
|
|
4620
|
-
inputProps: {
|
|
4621
|
-
'aria-label': 'Without label'
|
|
4622
|
-
},
|
|
4623
|
-
MenuProps: {
|
|
4624
|
-
PaperProps: {
|
|
4625
|
-
sx: {
|
|
4626
|
-
maxHeight: 150
|
|
4627
|
-
},
|
|
4628
|
-
className: 'get-tickets-paper'
|
|
4629
|
-
}
|
|
4630
|
-
}
|
|
4631
|
-
}, options.map(function (option, index) {
|
|
4632
|
-
return React.createElement(MenuItem, {
|
|
4594
|
+
}, hasCopyIcon ? React.createElement("img", {
|
|
4595
|
+
src: "https://img.icons8.com/office/50/000000/copy.png",
|
|
4596
|
+
alt: "copy"
|
|
4597
|
+
}) : React.createElement("span", {
|
|
4598
|
+
className: 'copy-icon'
|
|
4599
|
+
}, "Copy")))), (showDefaultShareButtons || !!shareButtons.length) && React.createElement(SocialButtons, {
|
|
4600
|
+
showDefaultShareButtons: showDefaultShareButtons,
|
|
4601
|
+
name: data.product_name,
|
|
4602
|
+
appId: messengerAppId,
|
|
4603
|
+
shareLink: data.personal_share_link,
|
|
4604
|
+
shareButtons: shareButtons
|
|
4605
|
+
})))), React.createElement("div", {
|
|
4606
|
+
className: "pricing-section"
|
|
4607
|
+
}, React.createElement("div", {
|
|
4608
|
+
className: "invitation_title"
|
|
4609
|
+
}, "How much cheaper?"), _map(data.personal_share_sales, function (pricing, index) {
|
|
4610
|
+
return React.createElement("div", {
|
|
4633
4611
|
key: index,
|
|
4634
|
-
|
|
4635
|
-
},
|
|
4636
|
-
|
|
4637
|
-
|
|
4612
|
+
className: "pricing-section_wrapper"
|
|
4613
|
+
}, React.createElement("div", {
|
|
4614
|
+
className: "pricing-section_label"
|
|
4615
|
+
}, pricing.label, pricing.subLabel && React.createElement("div", {
|
|
4616
|
+
className: "pricing-section_sublabel"
|
|
4617
|
+
}, pricing.subLabel)), React.createElement("div", {
|
|
4618
|
+
className: "pricing-section_price"
|
|
4619
|
+
}, ' ', pricing.price));
|
|
4620
|
+
}))))));
|
|
4621
|
+
};
|
|
4638
4622
|
|
|
4639
|
-
|
|
4623
|
+
var isTimeExpired = function isTimeExpired(startDate, timezone) {
|
|
4624
|
+
return !moment(startDate).isAfter(moment.tz(moment(), timezone).format('YYYY-MM-DD HH:mm:ss'));
|
|
4625
|
+
};
|
|
4640
4626
|
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4627
|
+
function Countdown(_ref) {
|
|
4628
|
+
var startDate = _ref.startDate,
|
|
4629
|
+
_ref$timezone = _ref.timezone,
|
|
4630
|
+
timezone = _ref$timezone === void 0 ? moment.tz.guess() : _ref$timezone,
|
|
4631
|
+
_ref$title = _ref.title,
|
|
4632
|
+
title = _ref$title === void 0 ? '' : _ref$title,
|
|
4633
|
+
_ref$message = _ref.message,
|
|
4634
|
+
message = _ref$message === void 0 ? '' : _ref$message,
|
|
4635
|
+
_ref$showMessage = _ref.showMessage,
|
|
4636
|
+
showMessage = _ref$showMessage === void 0 ? false : _ref$showMessage,
|
|
4637
|
+
_ref$disableLeadingZe = _ref.disableLeadingZero,
|
|
4638
|
+
disableLeadingZero = _ref$disableLeadingZe === void 0 ? false : _ref$disableLeadingZe,
|
|
4639
|
+
_ref$callback = _ref.callback,
|
|
4640
|
+
callback = _ref$callback === void 0 ? function () {} : _ref$callback,
|
|
4641
|
+
isLoggedIn = _ref.isLoggedIn;
|
|
4650
4642
|
|
|
4651
|
-
|
|
4652
|
-
|
|
4643
|
+
var _useState = useState(''),
|
|
4644
|
+
duration = _useState[0],
|
|
4645
|
+
setDuration = _useState[1];
|
|
4653
4646
|
|
|
4654
|
-
var
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
handleTicketSelect = _ref.handleTicketSelect,
|
|
4658
|
-
sortBySoldOut = _ref.sortBySoldOut,
|
|
4659
|
-
ticketsHeaderComponent = _ref.ticketsHeaderComponent,
|
|
4660
|
-
hideTicketsHeader = _ref.hideTicketsHeader;
|
|
4661
|
-
var sortedTicketsList = sortBySoldOut ? _sortBy(_sortBy(ticketsList, 'sortOrder'), 'soldOut') : _sortBy(ticketsList, 'sortOrder');
|
|
4662
|
-
return React.createElement(React.Fragment, null, !hideTicketsHeader && ticketsHeaderComponent, sortedTicketsList.map(function (ticket, i, arr) {
|
|
4663
|
-
var isSoldOut = ticket.sold_out || !ticket.displayTicket || ticket.soldOut;
|
|
4647
|
+
var _useState2 = useState(false),
|
|
4648
|
+
timeExpired = _useState2[0],
|
|
4649
|
+
setTimeExpired = _useState2[1];
|
|
4664
4650
|
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4651
|
+
useEffect(function () {
|
|
4652
|
+
setTimeExpired(isTimeExpired(startDate, timezone));
|
|
4653
|
+
}, []);
|
|
4654
|
+
useEffect(function () {
|
|
4655
|
+
var timer;
|
|
4669
4656
|
|
|
4670
|
-
|
|
4657
|
+
if (!timeExpired) {
|
|
4658
|
+
timer = setInterval(function () {
|
|
4659
|
+
if (isTimeExpired(startDate, timezone)) {
|
|
4660
|
+
clearInterval(timer);
|
|
4661
|
+
setTimeExpired(true);
|
|
4662
|
+
callback();
|
|
4663
|
+
return;
|
|
4664
|
+
}
|
|
4671
4665
|
|
|
4672
|
-
|
|
4673
|
-
|
|
4666
|
+
var currentDate = moment.tz(moment(), timezone).format('YYYY-MM-DD HH:mm:ss');
|
|
4667
|
+
var diffTime = moment(startDate).diff(currentDate);
|
|
4668
|
+
var duration = moment.duration(diffTime);
|
|
4669
|
+
var dateArr = {
|
|
4670
|
+
year: duration.years(),
|
|
4671
|
+
month: duration.months(),
|
|
4672
|
+
day: duration.days(),
|
|
4673
|
+
hour: duration.hours(),
|
|
4674
|
+
minute: duration.minutes(),
|
|
4675
|
+
second: duration.seconds()
|
|
4676
|
+
};
|
|
4677
|
+
var timeLeft = '';
|
|
4678
|
+
|
|
4679
|
+
for (var date in dateArr) {
|
|
4680
|
+
var unit = dateArr[date] === 1 ? date : date + 's';
|
|
4681
|
+
var val = dateArr[date];
|
|
4682
|
+
|
|
4683
|
+
if (!disableLeadingZero && String(dateArr[date]).length === 1) {
|
|
4684
|
+
val = '0' + dateArr[date];
|
|
4685
|
+
}
|
|
4686
|
+
|
|
4687
|
+
if (timeLeft) {
|
|
4688
|
+
timeLeft += ", " + val + " " + unit;
|
|
4689
|
+
} else if (dateArr[date]) {
|
|
4690
|
+
timeLeft += val + " " + unit;
|
|
4691
|
+
}
|
|
4692
|
+
}
|
|
4693
|
+
|
|
4694
|
+
setDuration(timeLeft);
|
|
4695
|
+
}, 1000);
|
|
4674
4696
|
}
|
|
4675
4697
|
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
className: "old-price"
|
|
4689
|
-
}, "$ ", (+ticket.oldPrice).toFixed(2)), React.createElement("p", null, ticketPrice), !isSoldOut && !ticketIsFree && React.createElement("p", {
|
|
4690
|
-
className: "fees"
|
|
4691
|
-
}, ticket.feeIncluded ? '(incl. Fees)' : '(excl. Fees)')), React.createElement("div", {
|
|
4692
|
-
className: "event-detail__tier-state",
|
|
4693
|
-
style: {
|
|
4694
|
-
minWidth: 55
|
|
4695
|
-
}
|
|
4696
|
-
}, React.createElement(TicketRow, {
|
|
4697
|
-
ticketTier: ticket,
|
|
4698
|
-
prevTicketTier: arr[i - 1],
|
|
4699
|
-
selectedTickets: selectedTickets,
|
|
4700
|
-
handleTicketSelect: ticketSelect
|
|
4701
|
-
}))));
|
|
4702
|
-
}));
|
|
4703
|
-
};
|
|
4698
|
+
return function () {
|
|
4699
|
+
clearInterval(timer);
|
|
4700
|
+
};
|
|
4701
|
+
}, [timeExpired]);
|
|
4702
|
+
return React.createElement(React.Fragment, null, !timeExpired && duration && React.createElement("div", {
|
|
4703
|
+
className: "countdown " + (!isLoggedIn ? 'countdown-on-bottom' : '')
|
|
4704
|
+
}, React.createElement("div", null, React.createElement("p", {
|
|
4705
|
+
className: 'title'
|
|
4706
|
+
}, title), React.createElement("p", null, duration)), showMessage && React.createElement("p", {
|
|
4707
|
+
className: 'message'
|
|
4708
|
+
}, message)));
|
|
4709
|
+
}
|
|
4704
4710
|
|
|
4705
4711
|
var generateQuantity = function generateQuantity(n) {
|
|
4706
4712
|
var quantityList = [];
|
|
@@ -4861,70 +4867,11 @@ var WaitingList = function WaitingList(_ref) {
|
|
|
4861
4867
|
type: "submit",
|
|
4862
4868
|
variant: "contained",
|
|
4863
4869
|
className: "waiting-list-button"
|
|
4864
|
-
}, loading ? React.createElement(CircularProgress
|
|
4870
|
+
}, loading ? React.createElement(CircularProgress, {
|
|
4865
4871
|
size: "22px"
|
|
4866
4872
|
}) : 'ADD TO WAITING LIST')))));
|
|
4867
4873
|
};
|
|
4868
4874
|
|
|
4869
|
-
var PromoCodeSection = function PromoCodeSection(_ref) {
|
|
4870
|
-
var code = _ref.code,
|
|
4871
|
-
codeIsApplied = _ref.codeIsApplied,
|
|
4872
|
-
showPromoInput = _ref.showPromoInput,
|
|
4873
|
-
setCode = _ref.setCode,
|
|
4874
|
-
setShowPromoInput = _ref.setShowPromoInput,
|
|
4875
|
-
updateTickets = _ref.updateTickets,
|
|
4876
|
-
setCodeIsApplied = _ref.setCodeIsApplied;
|
|
4877
|
-
var isPromoCodeHasValue = !!code.trim();
|
|
4878
|
-
|
|
4879
|
-
var renderInputField = function renderInputField() {
|
|
4880
|
-
return React.createElement("div", {
|
|
4881
|
-
className: "promo-code-block"
|
|
4882
|
-
}, React.createElement("div", {
|
|
4883
|
-
className: "promo-code-block"
|
|
4884
|
-
}, React.createElement("p", {
|
|
4885
|
-
className: "promo-code-text"
|
|
4886
|
-
}, "Promo code")), React.createElement("input", {
|
|
4887
|
-
className: "promo-code-input",
|
|
4888
|
-
placeholder: "",
|
|
4889
|
-
onChange: function onChange(e) {
|
|
4890
|
-
setCode(e.target.value);
|
|
4891
|
-
},
|
|
4892
|
-
onKeyPress: function onKeyPress(event) {
|
|
4893
|
-
if (event.key === 'Enter' && isPromoCodeHasValue) {
|
|
4894
|
-
setShowPromoInput(false);
|
|
4895
|
-
updateTickets(true, 'promo');
|
|
4896
|
-
}
|
|
4897
|
-
}
|
|
4898
|
-
}), React.createElement(Button$1, {
|
|
4899
|
-
className: "promo-submit-button",
|
|
4900
|
-
onClick: function onClick() {
|
|
4901
|
-
if (isPromoCodeHasValue) {
|
|
4902
|
-
setShowPromoInput(false);
|
|
4903
|
-
updateTickets(true, 'promo');
|
|
4904
|
-
}
|
|
4905
|
-
}
|
|
4906
|
-
}, "APPLY"));
|
|
4907
|
-
};
|
|
4908
|
-
|
|
4909
|
-
return React.createElement("div", null, codeIsApplied ? React.createElement("div", {
|
|
4910
|
-
className: "alert-info"
|
|
4911
|
-
}, React.createElement(SVG, {
|
|
4912
|
-
src: getImage('done.svg'),
|
|
4913
|
-
preProcessor: function preProcessor(code) {
|
|
4914
|
-
return code.replace(/fill=".*?"/g, 'fill="currentColor"');
|
|
4915
|
-
}
|
|
4916
|
-
}), React.createElement("p", {
|
|
4917
|
-
className: "promo-code-success"
|
|
4918
|
-
}, "PROMO CODE APPLIED SUCCESSFULLY")) : null, !showPromoInput && React.createElement(Button$1, {
|
|
4919
|
-
className: "promo-code-button",
|
|
4920
|
-
placeholder: "Promo Codes",
|
|
4921
|
-
onClick: function onClick() {
|
|
4922
|
-
setCodeIsApplied(false);
|
|
4923
|
-
setShowPromoInput(true);
|
|
4924
|
-
}
|
|
4925
|
-
}, "Got a promo code? Click here"), showPromoInput && renderInputField());
|
|
4926
|
-
};
|
|
4927
|
-
|
|
4928
4875
|
var AccessCodeSection = function AccessCodeSection(_ref) {
|
|
4929
4876
|
var code = _ref.code,
|
|
4930
4877
|
setCode = _ref.setCode,
|
|
@@ -4957,93 +4904,64 @@ var AccessCodeSection = function AccessCodeSection(_ref) {
|
|
|
4957
4904
|
}, "ENTER"));
|
|
4958
4905
|
};
|
|
4959
4906
|
|
|
4960
|
-
var
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
title = _ref$title === void 0 ? '' : _ref$title,
|
|
4970
|
-
_ref$message = _ref.message,
|
|
4971
|
-
message = _ref$message === void 0 ? '' : _ref$message,
|
|
4972
|
-
_ref$showMessage = _ref.showMessage,
|
|
4973
|
-
showMessage = _ref$showMessage === void 0 ? false : _ref$showMessage,
|
|
4974
|
-
_ref$disableLeadingZe = _ref.disableLeadingZero,
|
|
4975
|
-
disableLeadingZero = _ref$disableLeadingZe === void 0 ? false : _ref$disableLeadingZe,
|
|
4976
|
-
_ref$callback = _ref.callback,
|
|
4977
|
-
callback = _ref$callback === void 0 ? function () {} : _ref$callback,
|
|
4978
|
-
isLoggedIn = _ref.isLoggedIn;
|
|
4979
|
-
|
|
4980
|
-
var _useState = useState(''),
|
|
4981
|
-
duration = _useState[0],
|
|
4982
|
-
setDuration = _useState[1];
|
|
4983
|
-
|
|
4984
|
-
var _useState2 = useState(false),
|
|
4985
|
-
timeExpired = _useState2[0],
|
|
4986
|
-
setTimeExpired = _useState2[1];
|
|
4987
|
-
|
|
4988
|
-
useEffect(function () {
|
|
4989
|
-
setTimeExpired(isTimeExpired(startDate, timezone));
|
|
4990
|
-
}, []);
|
|
4991
|
-
useEffect(function () {
|
|
4992
|
-
var timer;
|
|
4907
|
+
var PromoCodeSection = function PromoCodeSection(_ref) {
|
|
4908
|
+
var code = _ref.code,
|
|
4909
|
+
codeIsApplied = _ref.codeIsApplied,
|
|
4910
|
+
showPromoInput = _ref.showPromoInput,
|
|
4911
|
+
setCode = _ref.setCode,
|
|
4912
|
+
setShowPromoInput = _ref.setShowPromoInput,
|
|
4913
|
+
updateTickets = _ref.updateTickets,
|
|
4914
|
+
setCodeIsApplied = _ref.setCodeIsApplied;
|
|
4915
|
+
var isPromoCodeHasValue = !!code.trim();
|
|
4993
4916
|
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
4917
|
+
var renderInputField = function renderInputField() {
|
|
4918
|
+
return React.createElement("div", {
|
|
4919
|
+
className: "promo-code-block"
|
|
4920
|
+
}, React.createElement("div", {
|
|
4921
|
+
className: "promo-code-block"
|
|
4922
|
+
}, React.createElement("p", {
|
|
4923
|
+
className: "promo-code-text"
|
|
4924
|
+
}, "Promo code")), React.createElement("input", {
|
|
4925
|
+
className: "promo-code-input",
|
|
4926
|
+
placeholder: "",
|
|
4927
|
+
onChange: function onChange(e) {
|
|
4928
|
+
setCode(e.target.value);
|
|
4929
|
+
},
|
|
4930
|
+
onKeyPress: function onKeyPress(event) {
|
|
4931
|
+
if (event.key === 'Enter' && isPromoCodeHasValue) {
|
|
4932
|
+
setShowPromoInput(false);
|
|
4933
|
+
updateTickets(true, 'promo');
|
|
5001
4934
|
}
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
day: duration.days(),
|
|
5010
|
-
hour: duration.hours(),
|
|
5011
|
-
minute: duration.minutes(),
|
|
5012
|
-
second: duration.seconds()
|
|
5013
|
-
};
|
|
5014
|
-
var timeLeft = '';
|
|
5015
|
-
|
|
5016
|
-
for (var date in dateArr) {
|
|
5017
|
-
var unit = dateArr[date] === 1 ? date : date + 's';
|
|
5018
|
-
var val = dateArr[date];
|
|
5019
|
-
|
|
5020
|
-
if (!disableLeadingZero && String(dateArr[date]).length === 1) {
|
|
5021
|
-
val = '0' + dateArr[date];
|
|
5022
|
-
}
|
|
5023
|
-
|
|
5024
|
-
if (timeLeft) {
|
|
5025
|
-
timeLeft += ", " + val + " " + unit;
|
|
5026
|
-
} else if (dateArr[date]) {
|
|
5027
|
-
timeLeft += val + " " + unit;
|
|
5028
|
-
}
|
|
4935
|
+
}
|
|
4936
|
+
}), React.createElement(Button$1, {
|
|
4937
|
+
className: "promo-submit-button",
|
|
4938
|
+
onClick: function onClick() {
|
|
4939
|
+
if (isPromoCodeHasValue) {
|
|
4940
|
+
setShowPromoInput(false);
|
|
4941
|
+
updateTickets(true, 'promo');
|
|
5029
4942
|
}
|
|
4943
|
+
}
|
|
4944
|
+
}, "APPLY"));
|
|
4945
|
+
};
|
|
5030
4946
|
|
|
5031
|
-
|
|
5032
|
-
|
|
4947
|
+
return React.createElement("div", null, codeIsApplied ? React.createElement("div", {
|
|
4948
|
+
className: "alert-info"
|
|
4949
|
+
}, React.createElement(SVG, {
|
|
4950
|
+
src: getImage('done.svg'),
|
|
4951
|
+
preProcessor: function preProcessor(code) {
|
|
4952
|
+
return code.replace(/fill=".*?"/g, 'fill="currentColor"');
|
|
5033
4953
|
}
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
},
|
|
5044
|
-
|
|
5045
|
-
}, message)));
|
|
5046
|
-
}
|
|
4954
|
+
}), React.createElement("p", {
|
|
4955
|
+
className: "promo-code-success"
|
|
4956
|
+
}, "PROMO CODE APPLIED SUCCESSFULLY")) : null, !showPromoInput && React.createElement(Button$1, {
|
|
4957
|
+
className: "promo-code-button",
|
|
4958
|
+
placeholder: "Promo Codes",
|
|
4959
|
+
onClick: function onClick() {
|
|
4960
|
+
setCodeIsApplied(false);
|
|
4961
|
+
setShowPromoInput(true);
|
|
4962
|
+
}
|
|
4963
|
+
}, "Got a promo code? Click here"), showPromoInput && renderInputField());
|
|
4964
|
+
};
|
|
5047
4965
|
|
|
5048
4966
|
var ReferralLogic = function ReferralLogic(props) {
|
|
5049
4967
|
var eventId = props.eventId;
|
|
@@ -5087,6 +5005,141 @@ var ReferralLogic = function ReferralLogic(props) {
|
|
|
5087
5005
|
return null;
|
|
5088
5006
|
};
|
|
5089
5007
|
|
|
5008
|
+
var getTicketSelectOptions = function getTicketSelectOptions(maxCount, minCount, multiplier) {
|
|
5009
|
+
if (maxCount === void 0) {
|
|
5010
|
+
maxCount = 10;
|
|
5011
|
+
}
|
|
5012
|
+
|
|
5013
|
+
if (minCount === void 0) {
|
|
5014
|
+
minCount = 1;
|
|
5015
|
+
}
|
|
5016
|
+
|
|
5017
|
+
if (multiplier === void 0) {
|
|
5018
|
+
multiplier = 1;
|
|
5019
|
+
}
|
|
5020
|
+
|
|
5021
|
+
var options = [{
|
|
5022
|
+
label: 0,
|
|
5023
|
+
value: 0
|
|
5024
|
+
}];
|
|
5025
|
+
|
|
5026
|
+
for (var i = minCount; i <= Math.min(50, maxCount); i += multiplier) {
|
|
5027
|
+
options.push({
|
|
5028
|
+
label: i,
|
|
5029
|
+
value: i
|
|
5030
|
+
});
|
|
5031
|
+
}
|
|
5032
|
+
|
|
5033
|
+
return options;
|
|
5034
|
+
};
|
|
5035
|
+
|
|
5036
|
+
var TicketRow = function TicketRow(_ref) {
|
|
5037
|
+
var ticketTier = _ref.ticketTier,
|
|
5038
|
+
prevTicketTier = _ref.prevTicketTier,
|
|
5039
|
+
selectedTickets = _ref.selectedTickets,
|
|
5040
|
+
handleTicketSelect = _ref.handleTicketSelect;
|
|
5041
|
+
var soldOutMessage = ticketTier.soldOutMessage ? ("" + ticketTier.soldOutMessage).toUpperCase() : 'SOLD OUT';
|
|
5042
|
+
var isSalesClosed = !ticketTier.salesStarted || ticketTier.salesEnded;
|
|
5043
|
+
var options = getTicketSelectOptions(ticketTier.maxQuantity, ticketTier.minQuantity, ticketTier.multiplier);
|
|
5044
|
+
var ticketsClosedMessage = !ticketTier.salesStarted ? 'Sales not started' : 'Sales Ended';
|
|
5045
|
+
var onSaleContent = React.createElement("div", {
|
|
5046
|
+
className: "get-tickets"
|
|
5047
|
+
}, React.createElement(Box$1, {
|
|
5048
|
+
className: "get-tickets__selectbox"
|
|
5049
|
+
}, React.createElement(FormControl$1, {
|
|
5050
|
+
fullWidth: true
|
|
5051
|
+
}, React.createElement(Select, {
|
|
5052
|
+
sx: {
|
|
5053
|
+
borderRadius: 0
|
|
5054
|
+
},
|
|
5055
|
+
value: selectedTickets[ticketTier.id] ? selectedTickets[ticketTier.id] : 0,
|
|
5056
|
+
onChange: handleTicketSelect,
|
|
5057
|
+
displayEmpty: true,
|
|
5058
|
+
inputProps: {
|
|
5059
|
+
'aria-label': 'Without label'
|
|
5060
|
+
},
|
|
5061
|
+
MenuProps: {
|
|
5062
|
+
PaperProps: {
|
|
5063
|
+
sx: {
|
|
5064
|
+
maxHeight: 150
|
|
5065
|
+
},
|
|
5066
|
+
className: 'get-tickets-paper'
|
|
5067
|
+
}
|
|
5068
|
+
}
|
|
5069
|
+
}, options.map(function (option, index) {
|
|
5070
|
+
return React.createElement(MenuItem, {
|
|
5071
|
+
key: index,
|
|
5072
|
+
value: option.value
|
|
5073
|
+
}, option.value);
|
|
5074
|
+
})))));
|
|
5075
|
+
var returnValue = ''; // ticketTier.soldOut === false --> means that ticket is in the stock
|
|
5076
|
+
|
|
5077
|
+
var isSoldOut = ticketTier.sold_out || !ticketTier.displayTicket || ticketTier.soldOut || ticketTier.soldOut === false;
|
|
5078
|
+
|
|
5079
|
+
if (isSoldOut) {
|
|
5080
|
+
returnValue = soldOutMessage;
|
|
5081
|
+
} else if (isSalesClosed) {
|
|
5082
|
+
returnValue = ticketsClosedMessage;
|
|
5083
|
+
} else if (ticketTier.displayTicket && ticketTier.maxQuantity) {
|
|
5084
|
+
returnValue = onSaleContent;
|
|
5085
|
+
} else if (_get(prevTicketTier, 'in_stock')) {
|
|
5086
|
+
returnValue = 'SOON';
|
|
5087
|
+
}
|
|
5088
|
+
|
|
5089
|
+
return React.createElement(React.Fragment, null, returnValue, " ");
|
|
5090
|
+
};
|
|
5091
|
+
|
|
5092
|
+
var TicketsSection = function TicketsSection(_ref) {
|
|
5093
|
+
var ticketsList = _ref.ticketsList,
|
|
5094
|
+
selectedTickets = _ref.selectedTickets,
|
|
5095
|
+
handleTicketSelect = _ref.handleTicketSelect,
|
|
5096
|
+
sortBySoldOut = _ref.sortBySoldOut,
|
|
5097
|
+
ticketsHeaderComponent = _ref.ticketsHeaderComponent,
|
|
5098
|
+
hideTicketsHeader = _ref.hideTicketsHeader;
|
|
5099
|
+
var sortedTicketsList = sortBySoldOut ? _sortBy(_sortBy(ticketsList, 'sortOrder'), 'soldOut') : _sortBy(ticketsList, 'sortOrder');
|
|
5100
|
+
return React.createElement(React.Fragment, null, !hideTicketsHeader && ticketsHeaderComponent, sortedTicketsList.map(function (ticket, i, arr) {
|
|
5101
|
+
var isSoldOut = ticket.sold_out || !ticket.displayTicket || ticket.soldOut;
|
|
5102
|
+
|
|
5103
|
+
var ticketSelect = function ticketSelect(event) {
|
|
5104
|
+
var value = event.target.value;
|
|
5105
|
+
handleTicketSelect(ticket.id, value);
|
|
5106
|
+
};
|
|
5107
|
+
|
|
5108
|
+
var ticketIsDiscounted = false;
|
|
5109
|
+
|
|
5110
|
+
if (ticket.oldPrice && !isSoldOut && ticket.oldPrice !== ticket.price) {
|
|
5111
|
+
ticketIsDiscounted = true;
|
|
5112
|
+
}
|
|
5113
|
+
|
|
5114
|
+
var ticketIsFree = +ticket.price === 0;
|
|
5115
|
+
var ticketPrice = isSoldOut ? 'SOLD OUT' : ticketIsFree ? 'FREE' : "$ " + (+ticket.price).toFixed(2);
|
|
5116
|
+
return React.createElement("div", {
|
|
5117
|
+
key: ticket.id || ticket.name,
|
|
5118
|
+
className: "event-detail__tier " + (isSoldOut ? 'disabled' : '')
|
|
5119
|
+
}, React.createElement("div", {
|
|
5120
|
+
className: "event-detail__tier-name"
|
|
5121
|
+
}, ticket.displayName || ticket.name), React.createElement("div", {
|
|
5122
|
+
className: "event-tickets-container"
|
|
5123
|
+
}, React.createElement("div", {
|
|
5124
|
+
className: "event-detail__tier-price"
|
|
5125
|
+
}, ticketIsDiscounted && React.createElement("p", {
|
|
5126
|
+
className: "old-price"
|
|
5127
|
+
}, "$ ", (+ticket.oldPrice).toFixed(2)), React.createElement("p", null, ticketPrice), !isSoldOut && !ticketIsFree && React.createElement("p", {
|
|
5128
|
+
className: "fees"
|
|
5129
|
+
}, ticket.feeIncluded ? '(incl. Fees)' : '(excl. Fees)')), React.createElement("div", {
|
|
5130
|
+
className: "event-detail__tier-state",
|
|
5131
|
+
style: {
|
|
5132
|
+
minWidth: 55
|
|
5133
|
+
}
|
|
5134
|
+
}, React.createElement(TicketRow, {
|
|
5135
|
+
ticketTier: ticket,
|
|
5136
|
+
prevTicketTier: arr[i - 1],
|
|
5137
|
+
selectedTickets: selectedTickets,
|
|
5138
|
+
handleTicketSelect: ticketSelect
|
|
5139
|
+
}))));
|
|
5140
|
+
}));
|
|
5141
|
+
};
|
|
5142
|
+
|
|
5090
5143
|
var TicketsContainer = function TicketsContainer(_ref) {
|
|
5091
5144
|
var onLoginSuccess = _ref.onLoginSuccess,
|
|
5092
5145
|
getTicketsLabel = _ref.getTicketsLabel,
|
|
@@ -5130,7 +5183,9 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5130
5183
|
ActionsSectionComponent = _ref.actionsSectionComponent,
|
|
5131
5184
|
ticketsHeaderComponent = _ref.ticketsHeaderComponent,
|
|
5132
5185
|
_ref$hideTicketsHeade = _ref.hideTicketsHeader,
|
|
5133
|
-
hideTicketsHeader = _ref$hideTicketsHeade === void 0 ? false : _ref$hideTicketsHeade
|
|
5186
|
+
hideTicketsHeader = _ref$hideTicketsHeade === void 0 ? false : _ref$hideTicketsHeade,
|
|
5187
|
+
_ref$enableInfluencer = _ref.enableInfluencersSection,
|
|
5188
|
+
enableInfluencersSection = _ref$enableInfluencer === void 0 ? true : _ref$enableInfluencer;
|
|
5134
5189
|
|
|
5135
5190
|
var _useState = useState({}),
|
|
5136
5191
|
selectedTickets = _useState[0],
|
|
@@ -5537,6 +5592,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5537
5592
|
}) : null;
|
|
5538
5593
|
var externalUrl = event == null ? void 0 : event.redirectUrl;
|
|
5539
5594
|
var eventSaleIsNotStarted = !(event != null && event.salesStarted) && (event == null ? void 0 : event.salesStart);
|
|
5595
|
+
var influencers = event != null && event.referralsEnabled ? event == null ? void 0 : event.referrals : [];
|
|
5540
5596
|
return React.createElement(ThemeProvider$1, {
|
|
5541
5597
|
theme: themeMui
|
|
5542
5598
|
}, !isLoading && React.createElement(ReferralLogic, {
|
|
@@ -5600,7 +5656,18 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5600
5656
|
}, "Log out"))) : ''), showLoginModal ? React.createElement(LoginModal, {
|
|
5601
5657
|
onClose: handleOnClose,
|
|
5602
5658
|
onLogin: handleOnLogin
|
|
5603
|
-
}) : null)
|
|
5659
|
+
}) : null), enableInfluencersSection && influencers.length ? React.createElement("div", {
|
|
5660
|
+
className: "event-influencers"
|
|
5661
|
+
}, React.createElement("h3", null, React.createElement("span", null, "TOP"), " INFLUENCERS"), React.createElement("ol", {
|
|
5662
|
+
className: "influencer-list"
|
|
5663
|
+
}, influencers.map(function (influencer, i) {
|
|
5664
|
+
var _influencer$lastName;
|
|
5665
|
+
|
|
5666
|
+
return React.createElement("li", {
|
|
5667
|
+
className: "influencer-item",
|
|
5668
|
+
key: i
|
|
5669
|
+
}, influencer.firstName + " " + ((_influencer$lastName = influencer.lastName) == null ? void 0 : _influencer$lastName.charAt(0)), ' ');
|
|
5670
|
+
}))) : null);
|
|
5604
5671
|
};
|
|
5605
5672
|
|
|
5606
5673
|
var EventInfoItem = function EventInfoItem(_ref) {
|
|
@@ -5810,7 +5877,7 @@ var MyTicketsContainer = function MyTicketsContainer(_ref) {
|
|
|
5810
5877
|
width: 300
|
|
5811
5878
|
},
|
|
5812
5879
|
renderInput: function renderInput(params) {
|
|
5813
|
-
return React.createElement(TextField
|
|
5880
|
+
return React.createElement(TextField, Object.assign({}, params, {
|
|
5814
5881
|
label: "Events"
|
|
5815
5882
|
}));
|
|
5816
5883
|
}
|
|
@@ -5819,7 +5886,7 @@ var MyTicketsContainer = function MyTicketsContainer(_ref) {
|
|
|
5819
5886
|
className: "clear"
|
|
5820
5887
|
}, "CLEAR")), loading ? React.createElement("div", {
|
|
5821
5888
|
className: "loading"
|
|
5822
|
-
}, React.createElement(CircularProgress
|
|
5889
|
+
}, React.createElement(CircularProgress, null)) : React.createElement(React.Fragment, null, React.createElement(TableContainer, {
|
|
5823
5890
|
component: Paper,
|
|
5824
5891
|
className: "my-ticket-table"
|
|
5825
5892
|
}, React.createElement(Table, {
|
|
@@ -5970,7 +6037,7 @@ var TicketsTable = function TicketsTable(_ref) {
|
|
|
5970
6037
|
})))));
|
|
5971
6038
|
};
|
|
5972
6039
|
|
|
5973
|
-
var _excluded$2 = ["label", "field", "theme"];
|
|
6040
|
+
var _excluded$2 = ["label", "field", "theme", "disableDropdown"];
|
|
5974
6041
|
var RadioField = function RadioField(_ref) {
|
|
5975
6042
|
var label = _ref.label,
|
|
5976
6043
|
field = _ref.field,
|
|
@@ -6048,13 +6115,13 @@ var TicketResaleModal = function TicketResaleModal(_ref) {
|
|
|
6048
6115
|
currency = ticket.currency,
|
|
6049
6116
|
resale_fee_amount = ticket.resale_fee_amount,
|
|
6050
6117
|
ticket_type_is_active = ticket.ticket_type_is_active;
|
|
6051
|
-
return React.createElement(Modal, {
|
|
6118
|
+
return React.createElement(Modal$1, {
|
|
6052
6119
|
open: true,
|
|
6053
6120
|
onClose: onClose,
|
|
6054
6121
|
"aria-labelledby": "modal-modal-title",
|
|
6055
6122
|
"aria-describedby": "modal-modal-description",
|
|
6056
6123
|
className: 'resale-modal'
|
|
6057
|
-
}, React.createElement(Box, {
|
|
6124
|
+
}, React.createElement(Box$1, {
|
|
6058
6125
|
style: style$3
|
|
6059
6126
|
}, React.createElement("h3", null, "Sell Ticket"), React.createElement("div", null, React.createElement("h3", null, "Ticket Details"), React.createElement("div", null, React.createElement("h4", null, "Event"), React.createElement("p", null, event_name)), React.createElement("div", null, React.createElement("h4", null, "Ticket Holder"), React.createElement("p", null, holder_name)), React.createElement("div", null, React.createElement("h4", null, "Ticket ID"), React.createElement("p", null, hash))), React.createElement("div", null, React.createElement("h3", null, "Sell to Whom"), React.createElement(Formik, {
|
|
6060
6127
|
initialValues: initialValues,
|
|
@@ -6161,13 +6228,13 @@ var ConfirmModal = function ConfirmModal(_ref) {
|
|
|
6161
6228
|
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
|
|
6162
6229
|
_ref$onConfirm = _ref.onConfirm,
|
|
6163
6230
|
onConfirm = _ref$onConfirm === void 0 ? function () {} : _ref$onConfirm;
|
|
6164
|
-
return React.createElement(Modal, {
|
|
6231
|
+
return React.createElement(Modal$1, {
|
|
6165
6232
|
open: true,
|
|
6166
6233
|
onClose: onClose,
|
|
6167
6234
|
"aria-labelledby": "modal-modal-title",
|
|
6168
6235
|
"aria-describedby": "modal-modal-description",
|
|
6169
6236
|
className: 'confirm-modal'
|
|
6170
|
-
}, React.createElement(Box, {
|
|
6237
|
+
}, React.createElement(Box$1, {
|
|
6171
6238
|
style: style$4
|
|
6172
6239
|
}, React.createElement("p", null, message), React.createElement("div", {
|
|
6173
6240
|
className: 'footer'
|
|
@@ -6405,7 +6472,7 @@ var OrderDetailsContainer = function OrderDetailsContainer(_ref) {
|
|
|
6405
6472
|
className: "order-details"
|
|
6406
6473
|
}, loading ? React.createElement("div", {
|
|
6407
6474
|
className: "loading"
|
|
6408
|
-
}, React.createElement(CircularProgress
|
|
6475
|
+
}, React.createElement(CircularProgress, null)) : React.createElement(React.Fragment, null, React.createElement("h1", {
|
|
6409
6476
|
className: "layout-title"
|
|
6410
6477
|
}, "Order Details"), React.createElement("div", {
|
|
6411
6478
|
className: "order-summary-box"
|
|
@@ -6440,7 +6507,9 @@ var OrderDetailsContainer = function OrderDetailsContainer(_ref) {
|
|
|
6440
6507
|
alt: "Icon"
|
|
6441
6508
|
}), data == null ? void 0 : data.personal_share_link)), React.createElement("div", {
|
|
6442
6509
|
className: "link-item"
|
|
6443
|
-
}, React.createElement("p", null, "So far, you\u2019ve referred " + data.sales_referred + " tickets"))), React.createElement(
|
|
6510
|
+
}, React.createElement("p", null, "So far, you\u2019ve referred " + data.sales_referred + " tickets"))), data != null && data.sales_referred ? React.createElement("div", {
|
|
6511
|
+
className: "total-referrer"
|
|
6512
|
+
}, React.createElement("b", null, "So far, you've referred ", data.sales_referred, " tickets.")) : null, React.createElement(TableContainer, {
|
|
6444
6513
|
component: Paper
|
|
6445
6514
|
}, React.createElement(Table, {
|
|
6446
6515
|
className: "tt-type",
|
|
@@ -6592,7 +6661,7 @@ var ResetPasswordContainer = function ResetPasswordContainer(_ref) {
|
|
|
6592
6661
|
}, React.createElement("button", {
|
|
6593
6662
|
type: "submit",
|
|
6594
6663
|
disabled: !(isValid && dirty)
|
|
6595
|
-
}, loading ? React.createElement(CircularProgress, {
|
|
6664
|
+
}, loading ? React.createElement(CircularProgress$1, {
|
|
6596
6665
|
size: "22px"
|
|
6597
6666
|
}) : 'Submit')));
|
|
6598
6667
|
}));
|
|
@@ -6727,12 +6796,12 @@ var RedirectModal = function RedirectModal(_ref) {
|
|
|
6727
6796
|
message = _ref$message === void 0 ? 'Your cart has expired. Please click on "OK" to return to the ticket selection page.' : _ref$message,
|
|
6728
6797
|
_ref$onClickOk = _ref.onClickOk,
|
|
6729
6798
|
onClickOk = _ref$onClickOk === void 0 ? function () {} : _ref$onClickOk;
|
|
6730
|
-
return React.createElement(Modal, {
|
|
6799
|
+
return React.createElement(Modal$1, {
|
|
6731
6800
|
open: true,
|
|
6732
6801
|
"aria-labelledby": "modal-modal-title",
|
|
6733
6802
|
"aria-describedby": "modal-modal-description",
|
|
6734
6803
|
className: "redirect-modal"
|
|
6735
|
-
}, React.createElement(Box, {
|
|
6804
|
+
}, React.createElement(Box$1, {
|
|
6736
6805
|
style: style$5
|
|
6737
6806
|
}, React.createElement("p", null, message), React.createElement("div", {
|
|
6738
6807
|
className: "footer"
|
|
@@ -6840,13 +6909,13 @@ var RsvpContainer = function RsvpContainer(_ref) {
|
|
|
6840
6909
|
return null;
|
|
6841
6910
|
}
|
|
6842
6911
|
|
|
6843
|
-
return React.createElement(React.Fragment, null, React.createElement(Modal, {
|
|
6912
|
+
return React.createElement(React.Fragment, null, React.createElement(Modal$1, {
|
|
6844
6913
|
open: modal.isOpen,
|
|
6845
6914
|
onClose: handleModalClose,
|
|
6846
6915
|
"aria-labelledby": "modal-modal-title",
|
|
6847
6916
|
"aria-describedby": "modal-modal-description",
|
|
6848
6917
|
className: "rsvp-modal"
|
|
6849
|
-
}, React.createElement(Box, {
|
|
6918
|
+
}, React.createElement(Box$1, {
|
|
6850
6919
|
style: style$6,
|
|
6851
6920
|
className: "rsvp-modal-box"
|
|
6852
6921
|
}, React.createElement("div", {
|