tf-checkout-react 1.0.66 → 1.0.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.d.ts +1 -0
- package/dist/components/common/FormikPhoneNumberField.d.ts +11 -0
- package/dist/components/confirmationContainer/config.d.ts +1 -0
- package/dist/components/confirmationContainer/index.d.ts +5 -11
- package/dist/components/confirmationContainer/social-buttons.d.ts +11 -0
- package/dist/components/loginModal/index.d.ts +1 -0
- package/dist/components/waitingList/index.d.ts +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/normalizers/index.d.ts +1 -0
- package/dist/tf-checkout-react.cjs.development.js +449 -223
- package/dist/tf-checkout-react.cjs.development.js.map +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
- package/dist/tf-checkout-react.esm.js +451 -226
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -1
- package/dist/types/referral-promotion.d.ts +1 -1
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/setConfigs.d.ts +10 -0
- package/package.json +9 -4
- package/src/api/index.ts +55 -37
- package/src/components/billing-info-container/index.tsx +8 -10
- package/src/components/billing-info-container/utils.ts +3 -3
- package/src/components/common/FormikPhoneNumberField.tsx +41 -0
- package/src/components/confirmationContainer/config.ts +72 -0
- package/src/components/confirmationContainer/index.tsx +107 -138
- package/src/components/confirmationContainer/social-buttons.tsx +91 -0
- package/src/components/confirmationContainer/style.css +87 -100
- package/src/components/loginModal/index.tsx +11 -4
- package/src/components/paymentContainer/index.tsx +3 -4
- package/src/components/registerModal/index.tsx +3 -3
- package/src/components/stripePayment/index.tsx +4 -4
- package/src/components/ticketsContainer/index.tsx +1 -3
- package/src/components/waitingList/index.tsx +6 -5
- package/src/env.ts +3 -3
- package/src/index.ts +1 -0
- package/src/normalizers/index.ts +3 -1
- package/src/types/referral-promotion.ts +1 -1
- package/src/utils/index.ts +3 -0
- package/src/utils/setConfigs.ts +21 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
import { Formik, Form, Field
|
|
1
|
+
import React, { Component, useState, useCallback, useEffect, useRef, Fragment } from 'react';
|
|
2
|
+
import { connect, Formik, Form, Field } from 'formik';
|
|
3
3
|
import LoadingButton from '@mui/lab/LoadingButton';
|
|
4
4
|
import _identity from 'lodash-es/identity';
|
|
5
5
|
import _map from 'lodash-es/map';
|
|
6
6
|
import _get from 'lodash-es/get';
|
|
7
7
|
import _includes from 'lodash-es/includes';
|
|
8
8
|
import axios from 'axios';
|
|
9
|
+
import _forEach from 'lodash-es/forEach';
|
|
9
10
|
import { TextField, FormControl, InputLabel, FormHelperText, CircularProgress } from '@mui/material';
|
|
10
11
|
import Modal from '@mui/material/Modal';
|
|
11
12
|
import Box from '@mui/material/Box';
|
|
12
|
-
import _forEach from 'lodash-es/forEach';
|
|
13
13
|
import _flatMapDeep from 'lodash-es/flatMapDeep';
|
|
14
14
|
import _isArray from 'lodash-es/isArray';
|
|
15
15
|
import { nanoid } from 'nanoid';
|
|
@@ -18,13 +18,14 @@ import FormGroup from '@mui/material/FormGroup';
|
|
|
18
18
|
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
19
19
|
import Checkbox from '@mui/material/Checkbox';
|
|
20
20
|
import Select from '@mui/material/Select';
|
|
21
|
+
import MuiPhoneNumber from 'material-ui-phone-number';
|
|
21
22
|
import { createTheme, ThemeProvider } from '@mui/material/styles';
|
|
22
23
|
import Container from '@mui/material/Container';
|
|
23
24
|
import Alert from '@mui/material/Alert';
|
|
24
25
|
import { useStripe, useElements, CardNumberElement, CardExpiryElement, CardCvcElement, Elements } from '@stripe/react-stripe-js';
|
|
25
26
|
import { loadStripe } from '@stripe/stripe-js';
|
|
26
27
|
import CircularProgress$1 from '@mui/material/CircularProgress';
|
|
27
|
-
import
|
|
28
|
+
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';
|
|
28
29
|
import _some from 'lodash-es/some';
|
|
29
30
|
import _find from 'lodash-es/find';
|
|
30
31
|
import _isEmpty from 'lodash-es/isEmpty';
|
|
@@ -916,17 +917,74 @@ var emailValidator = function emailValidator(email) {
|
|
|
916
917
|
return !emailRegex.test(email) ? 'Please enter a valid email address' : '';
|
|
917
918
|
};
|
|
918
919
|
|
|
919
|
-
|
|
920
|
+
var CONFIGS = {};
|
|
921
|
+
var setConfigs = function setConfigs(configs) {
|
|
922
|
+
_forEach(configs, function (value, key) {
|
|
923
|
+
CONFIGS[key] = value;
|
|
924
|
+
});
|
|
925
|
+
|
|
926
|
+
publicRequest.setBaseUrl(CONFIGS.BASE_URL);
|
|
927
|
+
};
|
|
928
|
+
|
|
929
|
+
var getQueryVariable = function getQueryVariable(variable) {
|
|
930
|
+
if (typeof window !== 'undefined') {
|
|
931
|
+
var query = window.location.search.substring(1);
|
|
932
|
+
var vars = query.split('&');
|
|
933
|
+
|
|
934
|
+
for (var i = 0; i < vars.length; i++) {
|
|
935
|
+
var pair = vars[i].split('=');
|
|
920
936
|
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
937
|
+
if (pair[0] === variable) {
|
|
938
|
+
return pair[1];
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
return false;
|
|
927
944
|
};
|
|
928
945
|
|
|
946
|
+
var ErrorFocusInternal = /*#__PURE__*/function (_Component) {
|
|
947
|
+
_inheritsLoose(ErrorFocusInternal, _Component);
|
|
948
|
+
|
|
949
|
+
function ErrorFocusInternal() {
|
|
950
|
+
var _this;
|
|
951
|
+
|
|
952
|
+
_this = _Component.apply(this, arguments) || this;
|
|
953
|
+
|
|
954
|
+
_this.render = function () {
|
|
955
|
+
return null;
|
|
956
|
+
};
|
|
957
|
+
|
|
958
|
+
return _this;
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
var _proto = ErrorFocusInternal.prototype;
|
|
962
|
+
|
|
963
|
+
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
|
964
|
+
var _prevProps$formik = prevProps.formik,
|
|
965
|
+
isSubmitting = _prevProps$formik.isSubmitting,
|
|
966
|
+
isValidating = _prevProps$formik.isValidating,
|
|
967
|
+
errors = _prevProps$formik.errors;
|
|
968
|
+
var keys = Object.keys(errors);
|
|
969
|
+
|
|
970
|
+
if (keys.length > 0 && isSubmitting && !isValidating) {
|
|
971
|
+
var selector = "[name=\"" + keys[0] + "\"]";
|
|
972
|
+
var errorElement = document.querySelector(selector);
|
|
973
|
+
|
|
974
|
+
if (errorElement) {
|
|
975
|
+
errorElement.focus();
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
};
|
|
979
|
+
|
|
980
|
+
return ErrorFocusInternal;
|
|
981
|
+
}(Component);
|
|
982
|
+
|
|
983
|
+
var ErrorFocus = /*#__PURE__*/connect(ErrorFocusInternal);
|
|
984
|
+
|
|
929
985
|
var isWindowDefined = typeof window !== 'undefined';
|
|
986
|
+
var discardedOrigins = ['http://localhost', 'gtsb.io', 'gatsbyjs.io'];
|
|
987
|
+
var origin = isWindowDefined && window.location.origin;
|
|
930
988
|
var ttfHeaders = {
|
|
931
989
|
Accept: 'application/vnd.api+json',
|
|
932
990
|
'Content-Type': 'application/vnd.api+json'
|
|
@@ -936,12 +994,14 @@ if (isWindowDefined && localStorage.getItem('auth_guest_token')) {
|
|
|
936
994
|
ttfHeaders['Authorization-Guest'] = /*#__PURE__*/localStorage.getItem('auth_guest_token');
|
|
937
995
|
}
|
|
938
996
|
|
|
939
|
-
if (isWindowDefined &&
|
|
997
|
+
if (isWindowDefined && !discardedOrigins.some(function (el) {
|
|
998
|
+
return origin && origin.includes(el);
|
|
999
|
+
})) {
|
|
940
1000
|
ttfHeaders['X-Source-Origin'] = 'houseofx.nyc';
|
|
941
1001
|
}
|
|
942
1002
|
|
|
943
1003
|
var publicRequest = /*#__PURE__*/axios.create({
|
|
944
|
-
baseURL:
|
|
1004
|
+
baseURL: CONFIGS.BASE_URL || "https://www.ticketfairy.com/api",
|
|
945
1005
|
headers: ttfHeaders
|
|
946
1006
|
});
|
|
947
1007
|
publicRequest.interceptors.response.use(function (response) {
|
|
@@ -982,7 +1042,9 @@ publicRequest.interceptors.request.use(function (config) {
|
|
|
982
1042
|
config.headers = _updatedHeaders;
|
|
983
1043
|
}
|
|
984
1044
|
|
|
985
|
-
if (isWindowDefined &&
|
|
1045
|
+
if (isWindowDefined && !discardedOrigins.some(function (el) {
|
|
1046
|
+
return origin && origin.includes(el);
|
|
1047
|
+
})) {
|
|
986
1048
|
var _updatedHeaders2 = _extends({}, config.headers, {
|
|
987
1049
|
'X-Source-Origin': 'houseofx.nyc'
|
|
988
1050
|
});
|
|
@@ -990,6 +1052,10 @@ publicRequest.interceptors.request.use(function (config) {
|
|
|
990
1052
|
config.headers = _updatedHeaders2;
|
|
991
1053
|
}
|
|
992
1054
|
|
|
1055
|
+
if (CONFIGS.BASE_URL) {
|
|
1056
|
+
config.baseURL = CONFIGS.BASE_URL + '/api';
|
|
1057
|
+
}
|
|
1058
|
+
|
|
993
1059
|
return config;
|
|
994
1060
|
});
|
|
995
1061
|
|
|
@@ -997,6 +1063,10 @@ publicRequest.setGuestToken = function (token) {
|
|
|
997
1063
|
return publicRequest.defaults.headers.common['Authorization-Guest'] = token;
|
|
998
1064
|
};
|
|
999
1065
|
|
|
1066
|
+
publicRequest.setBaseUrl = function (baseUrl) {
|
|
1067
|
+
return publicRequest.defaults.baseURL = baseUrl + '/api';
|
|
1068
|
+
};
|
|
1069
|
+
|
|
1000
1070
|
publicRequest.setAccessToken = function (token) {
|
|
1001
1071
|
return publicRequest.defaults.headers.common.Authorization = token;
|
|
1002
1072
|
};
|
|
@@ -1055,7 +1125,7 @@ var postOnCheckout = function postOnCheckout(data, accessToken) {
|
|
|
1055
1125
|
return res;
|
|
1056
1126
|
};
|
|
1057
1127
|
var authorize = function authorize(data) {
|
|
1058
|
-
return publicRequest.post("/v1/oauth/authorize-rn?client_id=" + (
|
|
1128
|
+
return publicRequest.post("/v1/oauth/authorize-rn?client_id=" + (CONFIGS.CLIENT_ID || 'e9d8f8922797b4621e562255afe90dbf'), data);
|
|
1059
1129
|
};
|
|
1060
1130
|
var register = function register(data) {
|
|
1061
1131
|
return publicRequest.post('/v1/oauth/register-rn', data);
|
|
@@ -1135,7 +1205,9 @@ var LoginModal = function LoginModal(_ref) {
|
|
|
1135
1205
|
_ref$onGetProfileData = _ref.onGetProfileDataSuccess,
|
|
1136
1206
|
onGetProfileDataSuccess = _ref$onGetProfileData === void 0 ? function () {} : _ref$onGetProfileData,
|
|
1137
1207
|
_ref$onGetProfileData2 = _ref.onGetProfileDataError,
|
|
1138
|
-
onGetProfileDataError = _ref$onGetProfileData2 === void 0 ? function () {} : _ref$onGetProfileData2
|
|
1208
|
+
onGetProfileDataError = _ref$onGetProfileData2 === void 0 ? function () {} : _ref$onGetProfileData2,
|
|
1209
|
+
_ref$modalClassname = _ref.modalClassname,
|
|
1210
|
+
modalClassname = _ref$modalClassname === void 0 ? '' : _ref$modalClassname;
|
|
1139
1211
|
|
|
1140
1212
|
var _useState = useState(''),
|
|
1141
1213
|
error = _useState[0],
|
|
@@ -1145,7 +1217,8 @@ var LoginModal = function LoginModal(_ref) {
|
|
|
1145
1217
|
open: true,
|
|
1146
1218
|
onClose: onClose,
|
|
1147
1219
|
"aria-labelledby": "modal-modal-title",
|
|
1148
|
-
"aria-describedby": "modal-modal-description"
|
|
1220
|
+
"aria-describedby": "modal-modal-description",
|
|
1221
|
+
className: "login-modal " + modalClassname
|
|
1149
1222
|
}, React.createElement(Box, {
|
|
1150
1223
|
style: style
|
|
1151
1224
|
}, React.createElement("div", null, React.createElement(Formik, {
|
|
@@ -1175,8 +1248,8 @@ var LoginModal = function LoginModal(_ref) {
|
|
|
1175
1248
|
bodyFormDataToken.append('code', resAutorize.data.data.code);
|
|
1176
1249
|
bodyFormDataToken.append('scope', 'profile');
|
|
1177
1250
|
bodyFormDataToken.append('grant_type', 'authorization_code');
|
|
1178
|
-
bodyFormDataToken.append('client_id',
|
|
1179
|
-
bodyFormDataToken.append('client_secret',
|
|
1251
|
+
bodyFormDataToken.append('client_id', CONFIGS.CLIENT_ID || 'e9d8f8922797b4621e562255afe90dbf');
|
|
1252
|
+
bodyFormDataToken.append('client_secret', CONFIGS.CLIENT_SECRET || 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9');
|
|
1180
1253
|
resAccessToken = null;
|
|
1181
1254
|
_context.prev = 15;
|
|
1182
1255
|
_context.next = 18;
|
|
@@ -1361,8 +1434,8 @@ var RegisterModal = function RegisterModal(_ref) {
|
|
|
1361
1434
|
bodyFormData.append('email', email);
|
|
1362
1435
|
bodyFormData.append('password', password);
|
|
1363
1436
|
bodyFormData.append('password_confirmation', confirmPassword);
|
|
1364
|
-
bodyFormData.append('client_id',
|
|
1365
|
-
bodyFormData.append('client_secret',
|
|
1437
|
+
bodyFormData.append('client_id', CONFIGS.CLIENT_ID || 'e9d8f8922797b4621e562255afe90dbf');
|
|
1438
|
+
bodyFormData.append('client_secret', CONFIGS.CLIENT_SECRET || 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9');
|
|
1366
1439
|
_context.next = 11;
|
|
1367
1440
|
return register(bodyFormData);
|
|
1368
1441
|
|
|
@@ -1560,8 +1633,8 @@ var createRegisterFormData = function createRegisterFormData(values, checkoutBod
|
|
|
1560
1633
|
bodyFormData.append('email', values.email);
|
|
1561
1634
|
bodyFormData.append('password', values.password);
|
|
1562
1635
|
bodyFormData.append('password_confirmation', values.confirmPassword);
|
|
1563
|
-
bodyFormData.append('client_id',
|
|
1564
|
-
bodyFormData.append('client_secret',
|
|
1636
|
+
bodyFormData.append('client_id', CONFIGS.CLIENT_ID || 'e9d8f8922797b4621e562255afe90dbf');
|
|
1637
|
+
bodyFormData.append('client_secret', CONFIGS.CLIENT_SECRET || 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9');
|
|
1565
1638
|
|
|
1566
1639
|
_forEach(checkoutBody.attributes, function (item, key) {
|
|
1567
1640
|
bodyFormData.append(key, item);
|
|
@@ -1742,23 +1815,6 @@ var CheckboxField = function CheckboxField(_ref) {
|
|
|
1742
1815
|
}));
|
|
1743
1816
|
};
|
|
1744
1817
|
|
|
1745
|
-
var getQueryVariable = function getQueryVariable(variable) {
|
|
1746
|
-
if (typeof window !== 'undefined') {
|
|
1747
|
-
var query = window.location.search.substring(1);
|
|
1748
|
-
var vars = query.split('&');
|
|
1749
|
-
|
|
1750
|
-
for (var i = 0; i < vars.length; i++) {
|
|
1751
|
-
var pair = vars[i].split('=');
|
|
1752
|
-
|
|
1753
|
-
if (pair[0] === variable) {
|
|
1754
|
-
return pair[1];
|
|
1755
|
-
}
|
|
1756
|
-
}
|
|
1757
|
-
}
|
|
1758
|
-
|
|
1759
|
-
return false;
|
|
1760
|
-
};
|
|
1761
|
-
|
|
1762
1818
|
var SelectField = function SelectField(_ref) {
|
|
1763
1819
|
var label = _ref.label,
|
|
1764
1820
|
_ref$type = _ref.type,
|
|
@@ -1805,44 +1861,108 @@ var SelectField = function SelectField(_ref) {
|
|
|
1805
1861
|
}, error) : null);
|
|
1806
1862
|
};
|
|
1807
1863
|
|
|
1808
|
-
var
|
|
1809
|
-
|
|
1864
|
+
var currencyNormalizerCreator = function currencyNormalizerCreator(value, currency) {
|
|
1865
|
+
return !value ? '' : "" + getCurrencySymbolByCurrency(currency) + value;
|
|
1866
|
+
};
|
|
1867
|
+
var createFixedFloatNormalizer = function createFixedFloatNormalizer(fixedValue) {
|
|
1868
|
+
return function (value) {
|
|
1869
|
+
return value || "" + value === '0' ? (+value).toFixed(fixedValue) : '';
|
|
1870
|
+
};
|
|
1871
|
+
};
|
|
1872
|
+
var getCurrencySymbolByCurrency = function getCurrencySymbolByCurrency(currency) {
|
|
1873
|
+
if (currency === void 0) {
|
|
1874
|
+
currency = '';
|
|
1875
|
+
}
|
|
1810
1876
|
|
|
1811
|
-
|
|
1812
|
-
|
|
1877
|
+
switch (currency) {
|
|
1878
|
+
case 'GBP':
|
|
1879
|
+
return '£';
|
|
1813
1880
|
|
|
1814
|
-
|
|
1881
|
+
case 'EUR':
|
|
1882
|
+
return '€';
|
|
1815
1883
|
|
|
1816
|
-
|
|
1817
|
-
return
|
|
1818
|
-
};
|
|
1884
|
+
case 'INR':
|
|
1885
|
+
return '₹';
|
|
1819
1886
|
|
|
1820
|
-
|
|
1821
|
-
|
|
1887
|
+
case 'JMD':
|
|
1888
|
+
return 'J$';
|
|
1822
1889
|
|
|
1823
|
-
|
|
1890
|
+
case 'NZD':
|
|
1891
|
+
return 'NZ$';
|
|
1824
1892
|
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
isSubmitting = _prevProps$formik.isSubmitting,
|
|
1828
|
-
isValidating = _prevProps$formik.isValidating,
|
|
1829
|
-
errors = _prevProps$formik.errors;
|
|
1830
|
-
var keys = Object.keys(errors);
|
|
1893
|
+
case 'MYR':
|
|
1894
|
+
return 'RM';
|
|
1831
1895
|
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
var errorElement = document.querySelector(selector);
|
|
1896
|
+
case 'MXN':
|
|
1897
|
+
return 'Mex$';
|
|
1835
1898
|
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
}
|
|
1839
|
-
}
|
|
1840
|
-
};
|
|
1899
|
+
case 'SGD':
|
|
1900
|
+
return 'S$';
|
|
1841
1901
|
|
|
1842
|
-
|
|
1843
|
-
|
|
1902
|
+
case 'AUD':
|
|
1903
|
+
return 'A$';
|
|
1844
1904
|
|
|
1845
|
-
|
|
1905
|
+
case 'ZAR':
|
|
1906
|
+
return 'R';
|
|
1907
|
+
|
|
1908
|
+
case 'ke':
|
|
1909
|
+
return 'Ksh';
|
|
1910
|
+
|
|
1911
|
+
case 'TRY':
|
|
1912
|
+
return '₺';
|
|
1913
|
+
|
|
1914
|
+
case 'CAD':
|
|
1915
|
+
return 'CA$';
|
|
1916
|
+
|
|
1917
|
+
case 'THB':
|
|
1918
|
+
return '฿';
|
|
1919
|
+
|
|
1920
|
+
case 'ISK':
|
|
1921
|
+
return 'Kr';
|
|
1922
|
+
|
|
1923
|
+
case 'SEK':
|
|
1924
|
+
return 'kr';
|
|
1925
|
+
|
|
1926
|
+
default:
|
|
1927
|
+
return 'US$';
|
|
1928
|
+
}
|
|
1929
|
+
};
|
|
1930
|
+
var removePlusSign = function removePlusSign(string) {
|
|
1931
|
+
if (string === void 0) {
|
|
1932
|
+
string = '';
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1935
|
+
return string.replace('+', '');
|
|
1936
|
+
};
|
|
1937
|
+
|
|
1938
|
+
var _excluded$2 = ["label", "field", "form", "setFieldValue"];
|
|
1939
|
+
var FormikPhoneNumberField = function FormikPhoneNumberField(_ref) {
|
|
1940
|
+
var label = _ref.label,
|
|
1941
|
+
field = _ref.field,
|
|
1942
|
+
_ref$form = _ref.form,
|
|
1943
|
+
touched = _ref$form.touched,
|
|
1944
|
+
errors = _ref$form.errors,
|
|
1945
|
+
setFieldValue = _ref.setFieldValue,
|
|
1946
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
1947
|
+
|
|
1948
|
+
var error = _get(errors, field.name);
|
|
1949
|
+
|
|
1950
|
+
var isTouched = Boolean(_get(touched, field.name));
|
|
1951
|
+
return React.createElement(MuiPhoneNumber, Object.assign({
|
|
1952
|
+
name: 'phone',
|
|
1953
|
+
onChange: function onChange(e) {
|
|
1954
|
+
return setFieldValue("phone", removePlusSign(e));
|
|
1955
|
+
},
|
|
1956
|
+
variant: "outlined",
|
|
1957
|
+
defaultCountry: 'us',
|
|
1958
|
+
disableDropdown: true,
|
|
1959
|
+
label: label,
|
|
1960
|
+
error: !!error && isTouched,
|
|
1961
|
+
helperText: isTouched && error,
|
|
1962
|
+
fullWidth: true,
|
|
1963
|
+
autoFormat: false
|
|
1964
|
+
}, rest));
|
|
1965
|
+
};
|
|
1846
1966
|
|
|
1847
1967
|
var getImage = function getImage(name) {
|
|
1848
1968
|
if (name === void 0) {
|
|
@@ -1876,7 +1996,7 @@ var LogicRunner = function LogicRunner(_ref) {
|
|
|
1876
1996
|
useEffect(function () {
|
|
1877
1997
|
var fetchStates = /*#__PURE__*/function () {
|
|
1878
1998
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
|
|
1879
|
-
var _mappedStates$0$
|
|
1999
|
+
var _mappedStates$0$value, _mappedStates$, res, mappedStates;
|
|
1880
2000
|
|
|
1881
2001
|
return runtime_1.wrap(function _callee$(_context) {
|
|
1882
2002
|
while (1) {
|
|
@@ -1888,14 +2008,14 @@ var LogicRunner = function LogicRunner(_ref) {
|
|
|
1888
2008
|
|
|
1889
2009
|
case 3:
|
|
1890
2010
|
res = _context.sent;
|
|
1891
|
-
mappedStates = _map(_get(res, 'data.data'), function (item) {
|
|
2011
|
+
mappedStates = _map(_get(res, 'data.data'), function (item, key) {
|
|
1892
2012
|
return {
|
|
1893
2013
|
label: item,
|
|
1894
|
-
value:
|
|
2014
|
+
value: key
|
|
1895
2015
|
};
|
|
1896
2016
|
});
|
|
1897
2017
|
setStates(mappedStates);
|
|
1898
|
-
setFieldValue('state', (_mappedStates$0$
|
|
2018
|
+
setFieldValue('state', (_mappedStates$0$value = (_mappedStates$ = mappedStates[0]) == null ? void 0 : _mappedStates$.value) != null ? _mappedStates$0$value : '');
|
|
1899
2019
|
onGetStatesSuccess(res.data);
|
|
1900
2020
|
_context.next = 13;
|
|
1901
2021
|
break;
|
|
@@ -2496,16 +2616,16 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2496
2616
|
}), function (element) {
|
|
2497
2617
|
return ['password', 'confirmPassword', 'password-info'].includes(element.name) && isLoggedIn ? null : React.createElement(React.Fragment, {
|
|
2498
2618
|
key: element.uniqueId
|
|
2499
|
-
},
|
|
2500
|
-
className: "email-checking"
|
|
2501
|
-
}, "IMPORTANT: Please double check that your\n email address is correct. It's where we\n send your confirmation and e-tickets to!") : null, React.createElement("div", {
|
|
2619
|
+
}, React.createElement("div", {
|
|
2502
2620
|
className: element.className
|
|
2503
2621
|
}, element.component ? element.component : React.createElement(Field, {
|
|
2504
2622
|
name: element.name,
|
|
2505
2623
|
label: element.label,
|
|
2506
2624
|
type: element.type,
|
|
2507
2625
|
validate: getValidateFunctions(element, states),
|
|
2508
|
-
|
|
2626
|
+
setFieldValue: props.setFieldValue,
|
|
2627
|
+
onBlur: props.handleBlur,
|
|
2628
|
+
component: element.type === 'checkbox' ? CheckboxField : element.type === 'select' ? SelectField : element.type === 'phone' ? FormikPhoneNumberField : CustomField,
|
|
2509
2629
|
selectOptions: element.name === 'country' ? countries : element.name === 'state' ? states : [],
|
|
2510
2630
|
theme: theme
|
|
2511
2631
|
})));
|
|
@@ -2577,73 +2697,6 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2577
2697
|
}));
|
|
2578
2698
|
};
|
|
2579
2699
|
|
|
2580
|
-
var currencyNormalizerCreator = function currencyNormalizerCreator(value, currency) {
|
|
2581
|
-
return !value ? '' : "" + getCurrencySymbolByCurrency(currency) + value;
|
|
2582
|
-
};
|
|
2583
|
-
var createFixedFloatNormalizer = function createFixedFloatNormalizer(fixedValue) {
|
|
2584
|
-
return function (value) {
|
|
2585
|
-
return value || "" + value === '0' ? (+value).toFixed(fixedValue) : '';
|
|
2586
|
-
};
|
|
2587
|
-
};
|
|
2588
|
-
var getCurrencySymbolByCurrency = function getCurrencySymbolByCurrency(currency) {
|
|
2589
|
-
if (currency === void 0) {
|
|
2590
|
-
currency = '';
|
|
2591
|
-
}
|
|
2592
|
-
|
|
2593
|
-
switch (currency) {
|
|
2594
|
-
case 'GBP':
|
|
2595
|
-
return '£';
|
|
2596
|
-
|
|
2597
|
-
case 'EUR':
|
|
2598
|
-
return '€';
|
|
2599
|
-
|
|
2600
|
-
case 'INR':
|
|
2601
|
-
return '₹';
|
|
2602
|
-
|
|
2603
|
-
case 'JMD':
|
|
2604
|
-
return 'J$';
|
|
2605
|
-
|
|
2606
|
-
case 'NZD':
|
|
2607
|
-
return 'NZ$';
|
|
2608
|
-
|
|
2609
|
-
case 'MYR':
|
|
2610
|
-
return 'RM';
|
|
2611
|
-
|
|
2612
|
-
case 'MXN':
|
|
2613
|
-
return 'Mex$';
|
|
2614
|
-
|
|
2615
|
-
case 'SGD':
|
|
2616
|
-
return 'S$';
|
|
2617
|
-
|
|
2618
|
-
case 'AUD':
|
|
2619
|
-
return 'A$';
|
|
2620
|
-
|
|
2621
|
-
case 'ZAR':
|
|
2622
|
-
return 'R';
|
|
2623
|
-
|
|
2624
|
-
case 'ke':
|
|
2625
|
-
return 'Ksh';
|
|
2626
|
-
|
|
2627
|
-
case 'TRY':
|
|
2628
|
-
return '₺';
|
|
2629
|
-
|
|
2630
|
-
case 'CAD':
|
|
2631
|
-
return 'CA$';
|
|
2632
|
-
|
|
2633
|
-
case 'THB':
|
|
2634
|
-
return '฿';
|
|
2635
|
-
|
|
2636
|
-
case 'ISK':
|
|
2637
|
-
return 'Kr';
|
|
2638
|
-
|
|
2639
|
-
case 'SEK':
|
|
2640
|
-
return 'kr';
|
|
2641
|
-
|
|
2642
|
-
default:
|
|
2643
|
-
return 'US$';
|
|
2644
|
-
}
|
|
2645
|
-
};
|
|
2646
|
-
|
|
2647
2700
|
var options = {
|
|
2648
2701
|
style: {
|
|
2649
2702
|
base: {
|
|
@@ -2840,9 +2893,11 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2840
2893
|
return (item == null ? void 0 : item.checked) === true;
|
|
2841
2894
|
});
|
|
2842
2895
|
setAllowSubmit(allChecked);
|
|
2896
|
+
} else {
|
|
2897
|
+
setAllowSubmit(true);
|
|
2843
2898
|
}
|
|
2844
2899
|
}, [checkboxes]);
|
|
2845
|
-
var buttonIsDiabled = !stripe || !!error || isLoading;
|
|
2900
|
+
var buttonIsDiabled = !stripe || !!error || isLoading || !allowSubmit;
|
|
2846
2901
|
return React.createElement("div", {
|
|
2847
2902
|
className: "stripe_payment_container"
|
|
2848
2903
|
}, !!stripeError && React.createElement("div", {
|
|
@@ -2896,16 +2951,15 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2896
2951
|
checked: checkbox.checked
|
|
2897
2952
|
})));
|
|
2898
2953
|
}), React.createElement("div", {
|
|
2899
|
-
className: "payment_button " + (buttonIsDiabled
|
|
2954
|
+
className: "payment_button " + (buttonIsDiabled ? 'disabled-payment-button' : '')
|
|
2900
2955
|
}, React.createElement("button", {
|
|
2901
2956
|
disabled: buttonIsDiabled,
|
|
2902
2957
|
type: "submit"
|
|
2903
2958
|
}, isLoading ? React.createElement(CircularProgress$1, null) : "Pay " + getCurrencySymbolByCurrency(currency) + total))));
|
|
2904
2959
|
};
|
|
2905
2960
|
|
|
2906
|
-
var
|
|
2907
|
-
var stripePromise = /*#__PURE__*/loadStripe(
|
|
2908
|
-
);
|
|
2961
|
+
var publishableKey = CONFIGS.STRIPE_PUBLISHABLE_KEY || 'pk_test_3Ov1P1oP33A1cxaSjxWE0VjT';
|
|
2962
|
+
var stripePromise = /*#__PURE__*/loadStripe(publishableKey);
|
|
2909
2963
|
var initialOrderValues = {
|
|
2910
2964
|
product_name: '',
|
|
2911
2965
|
ticketType: '',
|
|
@@ -3176,31 +3230,187 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
3176
3230
|
})))))));
|
|
3177
3231
|
};
|
|
3178
3232
|
|
|
3179
|
-
var
|
|
3233
|
+
var config = {
|
|
3234
|
+
facebook: {
|
|
3235
|
+
component: FacebookShareButton,
|
|
3236
|
+
icon: FacebookIcon
|
|
3237
|
+
},
|
|
3238
|
+
messenger: {
|
|
3239
|
+
component: FacebookMessengerShareButton,
|
|
3240
|
+
icon: FacebookMessengerIcon
|
|
3241
|
+
},
|
|
3242
|
+
twitter: {
|
|
3243
|
+
component: TwitterShareButton,
|
|
3244
|
+
icon: TwitterIcon
|
|
3245
|
+
},
|
|
3246
|
+
linkedin: {
|
|
3247
|
+
component: LinkedinShareButton,
|
|
3248
|
+
icon: LinkedinIcon
|
|
3249
|
+
},
|
|
3250
|
+
pinterest: {
|
|
3251
|
+
component: PinterestShareButton,
|
|
3252
|
+
icon: PinterestIcon
|
|
3253
|
+
},
|
|
3254
|
+
vk: {
|
|
3255
|
+
component: VKShareButton,
|
|
3256
|
+
icon: VKIcon
|
|
3257
|
+
},
|
|
3258
|
+
ok: {
|
|
3259
|
+
component: OKShareButton,
|
|
3260
|
+
icon: OKIcon
|
|
3261
|
+
},
|
|
3262
|
+
telegram: {
|
|
3263
|
+
component: TelegramShareButton,
|
|
3264
|
+
icon: TelegramIcon
|
|
3265
|
+
},
|
|
3266
|
+
whatsapp: {
|
|
3267
|
+
component: WhatsappShareButton,
|
|
3268
|
+
icon: WhatsappIcon
|
|
3269
|
+
},
|
|
3270
|
+
reddit: {
|
|
3271
|
+
component: RedditShareButton,
|
|
3272
|
+
icon: RedditIcon
|
|
3273
|
+
},
|
|
3274
|
+
tumblr: {
|
|
3275
|
+
component: TumblrShareButton,
|
|
3276
|
+
icon: TumblrIcon
|
|
3277
|
+
},
|
|
3278
|
+
mailru: {
|
|
3279
|
+
component: MailruShareButton,
|
|
3280
|
+
icon: MailruIcon
|
|
3281
|
+
},
|
|
3282
|
+
email: {
|
|
3283
|
+
component: EmailShareButton,
|
|
3284
|
+
icon: EmailIcon
|
|
3285
|
+
},
|
|
3286
|
+
livejournal: {
|
|
3287
|
+
component: LivejournalShareButton,
|
|
3288
|
+
icon: LivejournalIcon
|
|
3289
|
+
},
|
|
3290
|
+
viber: {
|
|
3291
|
+
component: ViberShareButton,
|
|
3292
|
+
icon: ViberIcon
|
|
3293
|
+
},
|
|
3294
|
+
workplace: {
|
|
3295
|
+
component: WorkplaceShareButton,
|
|
3296
|
+
icon: WorkplaceIcon
|
|
3297
|
+
},
|
|
3298
|
+
line: {
|
|
3299
|
+
component: LineShareButton,
|
|
3300
|
+
icon: LineIcon
|
|
3301
|
+
},
|
|
3302
|
+
pocket: {
|
|
3303
|
+
component: PocketShareButton,
|
|
3304
|
+
icon: PocketIcon
|
|
3305
|
+
},
|
|
3306
|
+
instapaper: {
|
|
3307
|
+
component: InstapaperShareButton,
|
|
3308
|
+
icon: InstapaperIcon
|
|
3309
|
+
},
|
|
3310
|
+
weibo: {
|
|
3311
|
+
component: WeiboShareButton,
|
|
3312
|
+
icon: WeiboIcon
|
|
3313
|
+
},
|
|
3314
|
+
hatena: {
|
|
3315
|
+
component: HatenaShareButton,
|
|
3316
|
+
icon: HatenaIcon
|
|
3317
|
+
}
|
|
3318
|
+
};
|
|
3319
|
+
function config$1 (key) {
|
|
3320
|
+
return config[key];
|
|
3321
|
+
}
|
|
3322
|
+
|
|
3323
|
+
var SocialComponent = function SocialComponent(_ref) {
|
|
3324
|
+
var _config, _config2;
|
|
3325
|
+
|
|
3326
|
+
var mainLabel = _ref.mainLabel,
|
|
3327
|
+
subLabel = _ref.subLabel,
|
|
3328
|
+
platform = _ref.platform,
|
|
3329
|
+
shareData = _ref.shareData;
|
|
3330
|
+
var Component = (_config = config$1(platform)) == null ? void 0 : _config.component;
|
|
3331
|
+
var Icon = (_config2 = config$1(platform)) == null ? void 0 : _config2.icon;
|
|
3332
|
+
return React.createElement(React.Fragment, null, Component && React.createElement(Component, Object.assign({}, shareData), React.createElement("div", {
|
|
3333
|
+
className: 'social-media-sharing'
|
|
3334
|
+
}, React.createElement("div", {
|
|
3335
|
+
className: 'share-icon'
|
|
3336
|
+
}, React.createElement(Icon, {
|
|
3337
|
+
size: 32,
|
|
3338
|
+
round: true
|
|
3339
|
+
})), React.createElement("span", {
|
|
3340
|
+
className: "share-text"
|
|
3341
|
+
}, mainLabel, React.createElement("br", null), " ", subLabel))));
|
|
3342
|
+
};
|
|
3343
|
+
|
|
3344
|
+
var SocialButtons = function SocialButtons(_ref2) {
|
|
3345
|
+
var showDefaultShareButtons = _ref2.showDefaultShareButtons,
|
|
3346
|
+
shareLink = _ref2.shareLink,
|
|
3347
|
+
name = _ref2.name,
|
|
3348
|
+
appId = _ref2.appId,
|
|
3349
|
+
shareButtons = _ref2.shareButtons;
|
|
3350
|
+
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
3351
|
+
className: "convenient_buttons"
|
|
3352
|
+
}, "or use one of these convenient buttons:"), React.createElement("div", {
|
|
3353
|
+
className: "social-media-btns"
|
|
3354
|
+
}, showDefaultShareButtons && React.createElement(React.Fragment, null, React.createElement(SocialComponent, {
|
|
3355
|
+
mainLabel: 'Share on',
|
|
3356
|
+
subLabel: 'Facebook',
|
|
3357
|
+
platform: 'facebook',
|
|
3358
|
+
shareData: {
|
|
3359
|
+
quote: name,
|
|
3360
|
+
url: shareLink
|
|
3361
|
+
}
|
|
3362
|
+
}), React.createElement(SocialComponent, {
|
|
3363
|
+
mainLabel: 'Tweet to your',
|
|
3364
|
+
subLabel: 'Followers',
|
|
3365
|
+
platform: 'twitter',
|
|
3366
|
+
shareData: {
|
|
3367
|
+
title: name,
|
|
3368
|
+
url: shareLink
|
|
3369
|
+
}
|
|
3370
|
+
}), React.createElement(SocialComponent, {
|
|
3371
|
+
mainLabel: 'Message friends on',
|
|
3372
|
+
subLabel: 'Facebook',
|
|
3373
|
+
platform: 'messenger',
|
|
3374
|
+
shareData: {
|
|
3375
|
+
appId: appId,
|
|
3376
|
+
url: shareLink
|
|
3377
|
+
}
|
|
3378
|
+
}), React.createElement(SocialComponent, {
|
|
3379
|
+
mainLabel: 'Message friends on',
|
|
3380
|
+
subLabel: 'Whatsapp',
|
|
3381
|
+
platform: 'whatsapp',
|
|
3382
|
+
shareData: {
|
|
3383
|
+
title: name,
|
|
3384
|
+
url: shareLink
|
|
3385
|
+
}
|
|
3386
|
+
})), shareButtons.map(function (shareButton, index) {
|
|
3387
|
+
return React.createElement(SocialComponent, Object.assign({
|
|
3388
|
+
key: index
|
|
3389
|
+
}, shareButton));
|
|
3390
|
+
})));
|
|
3391
|
+
};
|
|
3392
|
+
|
|
3180
3393
|
var ConfirmationContainer = function ConfirmationContainer(_ref) {
|
|
3181
3394
|
var isReferralEnabled = _ref.isReferralEnabled,
|
|
3182
|
-
|
|
3183
|
-
|
|
3395
|
+
showDefaultShareButtons = _ref.showDefaultShareButtons,
|
|
3396
|
+
_ref$messengerAppId = _ref.messengerAppId,
|
|
3397
|
+
messengerAppId = _ref$messengerAppId === void 0 ? '' : _ref$messengerAppId,
|
|
3184
3398
|
_ref$shareButtons = _ref.shareButtons,
|
|
3185
3399
|
shareButtons = _ref$shareButtons === void 0 ? [] : _ref$shareButtons,
|
|
3186
|
-
_ref$shareLink = _ref.shareLink,
|
|
3187
|
-
shareLink = _ref$shareLink === void 0 ? '' : _ref$shareLink,
|
|
3188
3400
|
_ref$onGetConfirmatio = _ref.onGetConfirmationDataSuccess,
|
|
3189
3401
|
onGetConfirmationDataSuccess = _ref$onGetConfirmatio === void 0 ? function () {} : _ref$onGetConfirmatio,
|
|
3190
3402
|
_ref$onGetConfirmatio2 = _ref.onGetConfirmationDataError,
|
|
3191
3403
|
onGetConfirmationDataError = _ref$onGetConfirmatio2 === void 0 ? function () {} : _ref$onGetConfirmatio2;
|
|
3192
3404
|
var inputRef = useRef(null);
|
|
3193
3405
|
|
|
3194
|
-
var _useState = useState(
|
|
3406
|
+
var _useState = useState(null),
|
|
3195
3407
|
data = _useState[0],
|
|
3196
|
-
setData = _useState[1];
|
|
3408
|
+
setData = _useState[1]; // 1. get payment complete data ---> v1/order/${orderHash}/payment/complete/
|
|
3197
3409
|
|
|
3198
|
-
var showShareButtons = Boolean(shareButtons.length);
|
|
3199
|
-
var showReferralPromotions = Boolean(referralPromotions.length); // 1. get payment complete data ---> v1/order/${orderHash}/payment/complete/
|
|
3200
3410
|
|
|
3201
3411
|
useEffect(function () {
|
|
3202
3412
|
_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
|
|
3203
|
-
var dataEncoded, dataDecoded, hash, response, _data;
|
|
3413
|
+
var dataEncoded, dataDecoded, hash, _data$product_price, response, _data;
|
|
3204
3414
|
|
|
3205
3415
|
return runtime_1.wrap(function _callee$(_context) {
|
|
3206
3416
|
while (1) {
|
|
@@ -3209,7 +3419,7 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
|
|
|
3209
3419
|
dataEncoded = typeof window !== 'undefined' && window.localStorage.getItem('checkoutData');
|
|
3210
3420
|
|
|
3211
3421
|
if (!dataEncoded) {
|
|
3212
|
-
_context.next =
|
|
3422
|
+
_context.next = 18;
|
|
3213
3423
|
break;
|
|
3214
3424
|
}
|
|
3215
3425
|
|
|
@@ -3222,27 +3432,60 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
|
|
|
3222
3432
|
case 7:
|
|
3223
3433
|
response = _context.sent;
|
|
3224
3434
|
_data = _get(response, 'data.data.attributes');
|
|
3435
|
+
_data.personal_share_sales = _data.personal_share_sales.map(function (d) {
|
|
3436
|
+
var salesData = {
|
|
3437
|
+
label: "If your friends buy " + d.sales + " tickets",
|
|
3438
|
+
price: ''
|
|
3439
|
+
};
|
|
3440
|
+
|
|
3441
|
+
if (d.price === 0) {
|
|
3442
|
+
salesData.subLabel = 'Your ticket becomes';
|
|
3443
|
+
salesData.price = 'FREE!';
|
|
3444
|
+
} else {
|
|
3445
|
+
var _d$price;
|
|
3446
|
+
|
|
3447
|
+
salesData.subLabel = 'Your ticket goes down to';
|
|
3448
|
+
salesData.price = _data.currency.symbol + ((_d$price = d.price) == null ? void 0 : _d$price.toFixed(2));
|
|
3449
|
+
}
|
|
3450
|
+
|
|
3451
|
+
return salesData;
|
|
3452
|
+
});
|
|
3453
|
+
|
|
3454
|
+
_data.personal_share_sales.unshift({
|
|
3455
|
+
label: 'Your ticket is currently',
|
|
3456
|
+
price: _data.currency.symbol + ((_data$product_price = _data.product_price) == null ? void 0 : _data$product_price.toFixed(2))
|
|
3457
|
+
});
|
|
3458
|
+
|
|
3225
3459
|
setData(_data);
|
|
3226
3460
|
onGetConfirmationDataSuccess(response.data);
|
|
3227
|
-
_context.next =
|
|
3461
|
+
_context.next = 18;
|
|
3228
3462
|
break;
|
|
3229
3463
|
|
|
3230
|
-
case
|
|
3231
|
-
_context.prev =
|
|
3464
|
+
case 15:
|
|
3465
|
+
_context.prev = 15;
|
|
3232
3466
|
_context.t0 = _context["catch"](4);
|
|
3233
3467
|
onGetConfirmationDataError(_context.t0.response);
|
|
3234
3468
|
|
|
3235
|
-
case
|
|
3469
|
+
case 18:
|
|
3236
3470
|
case "end":
|
|
3237
3471
|
return _context.stop();
|
|
3238
3472
|
}
|
|
3239
3473
|
}
|
|
3240
|
-
}, _callee, null, [[4,
|
|
3474
|
+
}, _callee, null, [[4, 15]]);
|
|
3241
3475
|
}))();
|
|
3242
3476
|
}, []);
|
|
3477
|
+
|
|
3478
|
+
var onChangeShareLink = function onChangeShareLink(e) {
|
|
3479
|
+
var newData = _extends({}, data, {
|
|
3480
|
+
personal_share_link: e.target.value
|
|
3481
|
+
});
|
|
3482
|
+
|
|
3483
|
+
setData(newData);
|
|
3484
|
+
};
|
|
3485
|
+
|
|
3243
3486
|
return React.createElement("div", {
|
|
3244
3487
|
className: "confirmation-page"
|
|
3245
|
-
}, React.createElement("p", {
|
|
3488
|
+
}, data && React.createElement(React.Fragment, null, React.createElement("p", {
|
|
3246
3489
|
className: "title"
|
|
3247
3490
|
}, "Your Tickets are Confirmed!"), React.createElement("div", {
|
|
3248
3491
|
className: "share-message-section"
|
|
@@ -3267,7 +3510,7 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
|
|
|
3267
3510
|
}, " Invite friends "), "and we'll refund up to", React.createElement("span", {
|
|
3268
3511
|
className: "strong-text"
|
|
3269
3512
|
}, " 100% "), "of your ticket money, if they buy tickets as well!")), React.createElement("img", {
|
|
3270
|
-
src:
|
|
3513
|
+
src: data.product_image,
|
|
3271
3514
|
alt: "No Data"
|
|
3272
3515
|
})), React.createElement("div", {
|
|
3273
3516
|
className: "share_wrapper"
|
|
@@ -3280,65 +3523,46 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
|
|
|
3280
3523
|
}, "How do you invite your friends?"), React.createElement("div", {
|
|
3281
3524
|
className: "share_buttons"
|
|
3282
3525
|
}, React.createElement("div", {
|
|
3283
|
-
className: "
|
|
3526
|
+
className: "share-by-link"
|
|
3284
3527
|
}, React.createElement("h5", {
|
|
3285
|
-
className: "
|
|
3528
|
+
className: "share-by-link label"
|
|
3286
3529
|
}, "Send them this link:"), React.createElement("div", {
|
|
3287
|
-
"
|
|
3288
|
-
className: "share-btn-inner share-by-link-copy",
|
|
3289
|
-
onClick: function onClick() {
|
|
3290
|
-
return navigator.clipboard.writeText(_get(inputRef, 'current.value'));
|
|
3291
|
-
}
|
|
3530
|
+
className: "share-btn-inner"
|
|
3292
3531
|
}, React.createElement("input", {
|
|
3293
3532
|
ref: inputRef,
|
|
3294
3533
|
className: "share-input",
|
|
3295
|
-
value:
|
|
3296
|
-
|
|
3534
|
+
value: data.personal_share_link,
|
|
3535
|
+
onChange: onChangeShareLink
|
|
3297
3536
|
}), React.createElement("div", {
|
|
3298
|
-
className:
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
})))),
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
}, React.createElement("div", {
|
|
3313
|
-
"aria-hidden": true,
|
|
3314
|
-
className: "share-btn-inner " + shareButtonItem.containerInnerClassName,
|
|
3315
|
-
onClick: function onClick() {}
|
|
3316
|
-
}, React.createElement(SVG, {
|
|
3317
|
-
className: shareButtonItem.svgClassName || 'share-icon',
|
|
3318
|
-
width: shareButtonItem.svgWidth || '40px',
|
|
3319
|
-
height: shareButtonItem.svgHeight || '40px',
|
|
3320
|
-
fill: shareButtonItem.svgFill || '#FFF',
|
|
3321
|
-
src: shareButtonItem.svgSrc || defaultSvg
|
|
3322
|
-
}), React.createElement("span", {
|
|
3323
|
-
className: "share-text"
|
|
3324
|
-
}, shareButtonItem.mainLabel, React.createElement("br", null), " ", shareButtonItem.subLabel)));
|
|
3325
|
-
})))))), showReferralPromotions && React.createElement("div", {
|
|
3537
|
+
className: 'share-by-link-copy-icon',
|
|
3538
|
+
onClick: function onClick() {
|
|
3539
|
+
return navigator.clipboard.writeText(_get(inputRef, 'current.value'));
|
|
3540
|
+
}
|
|
3541
|
+
}, React.createElement("img", {
|
|
3542
|
+
src: "https://img.icons8.com/office/50/000000/copy.png",
|
|
3543
|
+
alt: 'copy'
|
|
3544
|
+
})))), (showDefaultShareButtons || !!shareButtons.length) && React.createElement(SocialButtons, {
|
|
3545
|
+
showDefaultShareButtons: showDefaultShareButtons,
|
|
3546
|
+
name: data.product_name,
|
|
3547
|
+
appId: messengerAppId,
|
|
3548
|
+
shareLink: data.personal_share_link,
|
|
3549
|
+
shareButtons: shareButtons
|
|
3550
|
+
})))), React.createElement("div", {
|
|
3326
3551
|
className: "pricing-section"
|
|
3327
3552
|
}, React.createElement("div", {
|
|
3328
3553
|
className: "invitation_title"
|
|
3329
|
-
}, "How much cheaper?"), _map(
|
|
3330
|
-
var isFree = pricing.price === 'FREE';
|
|
3554
|
+
}, "How much cheaper?"), _map(data.personal_share_sales, function (pricing, index) {
|
|
3331
3555
|
return React.createElement("div", {
|
|
3332
|
-
key:
|
|
3333
|
-
className:
|
|
3556
|
+
key: index,
|
|
3557
|
+
className: 'pricing-section_wrapper'
|
|
3334
3558
|
}, React.createElement("div", {
|
|
3335
3559
|
className: "pricing-section_label"
|
|
3336
|
-
}, pricing.label
|
|
3560
|
+
}, pricing.label, pricing.subLabel && React.createElement("div", {
|
|
3337
3561
|
className: "pricing-section_sublabel"
|
|
3338
|
-
}, pricing.subLabel
|
|
3562
|
+
}, pricing.subLabel)), React.createElement("div", {
|
|
3339
3563
|
className: "pricing-section_price"
|
|
3340
3564
|
}, ' ', pricing.price));
|
|
3341
|
-
})))));
|
|
3565
|
+
}))))));
|
|
3342
3566
|
};
|
|
3343
3567
|
|
|
3344
3568
|
var getTicketSelectOptions = function getTicketSelectOptions(maxCount, minCount, multiplier) {
|
|
@@ -3492,7 +3716,8 @@ var generateQuantity = function generateQuantity(n) {
|
|
|
3492
3716
|
|
|
3493
3717
|
var WaitingList = function WaitingList(_ref) {
|
|
3494
3718
|
var _ref$tickets = _ref.tickets,
|
|
3495
|
-
tickets = _ref$tickets === void 0 ? {} : _ref$tickets
|
|
3719
|
+
tickets = _ref$tickets === void 0 ? {} : _ref$tickets,
|
|
3720
|
+
eventId = _ref.eventId;
|
|
3496
3721
|
|
|
3497
3722
|
var _useState = useState(false),
|
|
3498
3723
|
showSuccessMessage = _useState[0],
|
|
@@ -3512,7 +3737,7 @@ var WaitingList = function WaitingList(_ref) {
|
|
|
3512
3737
|
|
|
3513
3738
|
var handleSubmit = /*#__PURE__*/function () {
|
|
3514
3739
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(values) {
|
|
3515
|
-
var
|
|
3740
|
+
var requestData, _yield$addToWaitingLi, data;
|
|
3516
3741
|
|
|
3517
3742
|
return runtime_1.wrap(function _callee$(_context) {
|
|
3518
3743
|
while (1) {
|
|
@@ -3520,16 +3745,15 @@ var WaitingList = function WaitingList(_ref) {
|
|
|
3520
3745
|
case 0:
|
|
3521
3746
|
_context.prev = 0;
|
|
3522
3747
|
setLoading(true);
|
|
3523
|
-
id = ENV.EVENT_ID;
|
|
3524
3748
|
requestData = {
|
|
3525
3749
|
data: {
|
|
3526
3750
|
attributes: values
|
|
3527
3751
|
}
|
|
3528
3752
|
};
|
|
3529
|
-
_context.next =
|
|
3530
|
-
return addToWaitingList(
|
|
3753
|
+
_context.next = 5;
|
|
3754
|
+
return addToWaitingList(eventId, requestData);
|
|
3531
3755
|
|
|
3532
|
-
case
|
|
3756
|
+
case 5:
|
|
3533
3757
|
_yield$addToWaitingLi = _context.sent;
|
|
3534
3758
|
data = _yield$addToWaitingLi.data;
|
|
3535
3759
|
|
|
@@ -3537,24 +3761,24 @@ var WaitingList = function WaitingList(_ref) {
|
|
|
3537
3761
|
setShowSuccessMessage(true);
|
|
3538
3762
|
}
|
|
3539
3763
|
|
|
3540
|
-
_context.next =
|
|
3764
|
+
_context.next = 12;
|
|
3541
3765
|
break;
|
|
3542
3766
|
|
|
3543
|
-
case
|
|
3544
|
-
_context.prev =
|
|
3767
|
+
case 10:
|
|
3768
|
+
_context.prev = 10;
|
|
3545
3769
|
_context.t0 = _context["catch"](0);
|
|
3546
3770
|
|
|
3547
|
-
case
|
|
3548
|
-
_context.prev =
|
|
3771
|
+
case 12:
|
|
3772
|
+
_context.prev = 12;
|
|
3549
3773
|
setLoading(false);
|
|
3550
|
-
return _context.finish(
|
|
3774
|
+
return _context.finish(12);
|
|
3551
3775
|
|
|
3552
|
-
case
|
|
3776
|
+
case 15:
|
|
3553
3777
|
case "end":
|
|
3554
3778
|
return _context.stop();
|
|
3555
3779
|
}
|
|
3556
3780
|
}
|
|
3557
|
-
}, _callee, null, [[0,
|
|
3781
|
+
}, _callee, null, [[0, 10, 12, 15]]);
|
|
3558
3782
|
}));
|
|
3559
3783
|
|
|
3560
3784
|
return function handleSubmit(_x) {
|
|
@@ -3866,7 +4090,8 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
3866
4090
|
className: "get-tickets-page " + theme,
|
|
3867
4091
|
style: contentStyle
|
|
3868
4092
|
}, isLoading ? React.createElement(Loader, null) : React.createElement(React.Fragment, null, showWaitingList ? React.createElement(WaitingList, {
|
|
3869
|
-
tickets: tickets
|
|
4093
|
+
tickets: tickets,
|
|
4094
|
+
eventId: eventId
|
|
3870
4095
|
}) : React.createElement("div", null, React.createElement(TicketsSection, {
|
|
3871
4096
|
ticketsList: tickets,
|
|
3872
4097
|
selectedTickets: selectedTickets,
|
|
@@ -4255,5 +4480,5 @@ var OrderDetailsContainer = function OrderDetailsContainer(_ref) {
|
|
|
4255
4480
|
}, "Return to Order History"))));
|
|
4256
4481
|
};
|
|
4257
4482
|
|
|
4258
|
-
export { BillingInfoContainer, ConfirmationContainer, LoginModal, MyTicketsContainer, OrderDetailsContainer, PaymentContainer, TicketsContainer, createFixedFloatNormalizer, currencyNormalizerCreator };
|
|
4483
|
+
export { BillingInfoContainer, ConfirmationContainer, LoginModal, MyTicketsContainer, OrderDetailsContainer, PaymentContainer, TicketsContainer, createFixedFloatNormalizer, currencyNormalizerCreator, setConfigs };
|
|
4259
4484
|
//# sourceMappingURL=tf-checkout-react.esm.js.map
|