tf-checkout-react 1.0.68 → 1.0.69
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/confirmationContainer/config.d.ts +1 -0
- package/dist/components/confirmationContainer/index.d.ts +2 -2
- package/dist/components/waitingList/index.d.ts +2 -1
- package/dist/env.d.ts +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/tf-checkout-react.cjs.development.js +254 -167
- 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 +257 -171
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/setConfigs.d.ts +10 -0
- package/package.json +1 -1
- package/src/api/index.ts +56 -31
- package/src/components/billing-info-container/index.tsx +0 -7
- package/src/components/billing-info-container/utils.ts +3 -3
- package/src/components/confirmationContainer/config.ts +72 -0
- package/src/components/confirmationContainer/index.tsx +2 -2
- package/src/components/confirmationContainer/social-buttons.tsx +62 -87
- package/src/components/loginModal/index.tsx +3 -3
- 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/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';
|
|
@@ -25,8 +25,7 @@ import Alert from '@mui/material/Alert';
|
|
|
25
25
|
import { useStripe, useElements, CardNumberElement, CardExpiryElement, CardCvcElement, Elements } from '@stripe/react-stripe-js';
|
|
26
26
|
import { loadStripe } from '@stripe/stripe-js';
|
|
27
27
|
import CircularProgress$1 from '@mui/material/CircularProgress';
|
|
28
|
-
import
|
|
29
|
-
import { FacebookShareButton, FacebookIcon, TwitterShareButton, TwitterIcon, FacebookMessengerShareButton, FacebookMessengerIcon, WhatsappShareButton, WhatsappIcon } from 'react-share';
|
|
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';
|
|
30
29
|
import _some from 'lodash-es/some';
|
|
31
30
|
import _find from 'lodash-es/find';
|
|
32
31
|
import _isEmpty from 'lodash-es/isEmpty';
|
|
@@ -918,14 +917,70 @@ var emailValidator = function emailValidator(email) {
|
|
|
918
917
|
return !emailRegex.test(email) ? 'Please enter a valid email address' : '';
|
|
919
918
|
};
|
|
920
919
|
|
|
921
|
-
|
|
922
|
-
var
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
};
|
|
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('=');
|
|
936
|
+
|
|
937
|
+
if (pair[0] === variable) {
|
|
938
|
+
return pair[1];
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
return false;
|
|
944
|
+
};
|
|
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);
|
|
929
984
|
|
|
930
985
|
var isWindowDefined = typeof window !== 'undefined';
|
|
931
986
|
var allowedOrigins = ['http://localhost', 'gtsb.io', 'gatsbyjs.io', 'https://www.houseofx.nyc', 'https://tickets-staging.houseofx.nyc'];
|
|
@@ -946,7 +1001,7 @@ if (isWindowDefined && !allowedOrigins.some(function (el) {
|
|
|
946
1001
|
}
|
|
947
1002
|
|
|
948
1003
|
var publicRequest = /*#__PURE__*/axios.create({
|
|
949
|
-
baseURL:
|
|
1004
|
+
baseURL: CONFIGS.BASE_URL || "https://www.ticketfairy.com/api",
|
|
950
1005
|
headers: ttfHeaders
|
|
951
1006
|
});
|
|
952
1007
|
publicRequest.interceptors.response.use(function (response) {
|
|
@@ -997,6 +1052,10 @@ publicRequest.interceptors.request.use(function (config) {
|
|
|
997
1052
|
config.headers = _updatedHeaders2;
|
|
998
1053
|
}
|
|
999
1054
|
|
|
1055
|
+
if (CONFIGS.BASE_URL) {
|
|
1056
|
+
config.baseURL = CONFIGS.BASE_URL + '/api';
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1000
1059
|
return config;
|
|
1001
1060
|
});
|
|
1002
1061
|
|
|
@@ -1004,6 +1063,10 @@ publicRequest.setGuestToken = function (token) {
|
|
|
1004
1063
|
return publicRequest.defaults.headers.common['Authorization-Guest'] = token;
|
|
1005
1064
|
};
|
|
1006
1065
|
|
|
1066
|
+
publicRequest.setBaseUrl = function (baseUrl) {
|
|
1067
|
+
return publicRequest.defaults.baseURL = baseUrl + '/api';
|
|
1068
|
+
};
|
|
1069
|
+
|
|
1007
1070
|
publicRequest.setAccessToken = function (token) {
|
|
1008
1071
|
return publicRequest.defaults.headers.common.Authorization = token;
|
|
1009
1072
|
};
|
|
@@ -1062,7 +1125,7 @@ var postOnCheckout = function postOnCheckout(data, accessToken) {
|
|
|
1062
1125
|
return res;
|
|
1063
1126
|
};
|
|
1064
1127
|
var authorize = function authorize(data) {
|
|
1065
|
-
return publicRequest.post("/v1/oauth/authorize-rn?client_id=" + (
|
|
1128
|
+
return publicRequest.post("/v1/oauth/authorize-rn?client_id=" + (CONFIGS.CLIENT_ID || 'e9d8f8922797b4621e562255afe90dbf'), data);
|
|
1066
1129
|
};
|
|
1067
1130
|
var register = function register(data) {
|
|
1068
1131
|
return publicRequest.post('/v1/oauth/register-rn', data);
|
|
@@ -1185,8 +1248,8 @@ var LoginModal = function LoginModal(_ref) {
|
|
|
1185
1248
|
bodyFormDataToken.append('code', resAutorize.data.data.code);
|
|
1186
1249
|
bodyFormDataToken.append('scope', 'profile');
|
|
1187
1250
|
bodyFormDataToken.append('grant_type', 'authorization_code');
|
|
1188
|
-
bodyFormDataToken.append('client_id',
|
|
1189
|
-
bodyFormDataToken.append('client_secret',
|
|
1251
|
+
bodyFormDataToken.append('client_id', CONFIGS.CLIENT_ID || 'e9d8f8922797b4621e562255afe90dbf');
|
|
1252
|
+
bodyFormDataToken.append('client_secret', CONFIGS.CLIENT_SECRET || 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9');
|
|
1190
1253
|
resAccessToken = null;
|
|
1191
1254
|
_context.prev = 15;
|
|
1192
1255
|
_context.next = 18;
|
|
@@ -1371,8 +1434,8 @@ var RegisterModal = function RegisterModal(_ref) {
|
|
|
1371
1434
|
bodyFormData.append('email', email);
|
|
1372
1435
|
bodyFormData.append('password', password);
|
|
1373
1436
|
bodyFormData.append('password_confirmation', confirmPassword);
|
|
1374
|
-
bodyFormData.append('client_id',
|
|
1375
|
-
bodyFormData.append('client_secret',
|
|
1437
|
+
bodyFormData.append('client_id', CONFIGS.CLIENT_ID || 'e9d8f8922797b4621e562255afe90dbf');
|
|
1438
|
+
bodyFormData.append('client_secret', CONFIGS.CLIENT_SECRET || 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9');
|
|
1376
1439
|
_context.next = 11;
|
|
1377
1440
|
return register(bodyFormData);
|
|
1378
1441
|
|
|
@@ -1570,8 +1633,8 @@ var createRegisterFormData = function createRegisterFormData(values, checkoutBod
|
|
|
1570
1633
|
bodyFormData.append('email', values.email);
|
|
1571
1634
|
bodyFormData.append('password', values.password);
|
|
1572
1635
|
bodyFormData.append('password_confirmation', values.confirmPassword);
|
|
1573
|
-
bodyFormData.append('client_id',
|
|
1574
|
-
bodyFormData.append('client_secret',
|
|
1636
|
+
bodyFormData.append('client_id', CONFIGS.CLIENT_ID || 'e9d8f8922797b4621e562255afe90dbf');
|
|
1637
|
+
bodyFormData.append('client_secret', CONFIGS.CLIENT_SECRET || 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9');
|
|
1575
1638
|
|
|
1576
1639
|
_forEach(checkoutBody.attributes, function (item, key) {
|
|
1577
1640
|
bodyFormData.append(key, item);
|
|
@@ -1752,23 +1815,6 @@ var CheckboxField = function CheckboxField(_ref) {
|
|
|
1752
1815
|
}));
|
|
1753
1816
|
};
|
|
1754
1817
|
|
|
1755
|
-
var getQueryVariable = function getQueryVariable(variable) {
|
|
1756
|
-
if (typeof window !== 'undefined') {
|
|
1757
|
-
var query = window.location.search.substring(1);
|
|
1758
|
-
var vars = query.split('&');
|
|
1759
|
-
|
|
1760
|
-
for (var i = 0; i < vars.length; i++) {
|
|
1761
|
-
var pair = vars[i].split('=');
|
|
1762
|
-
|
|
1763
|
-
if (pair[0] === variable) {
|
|
1764
|
-
return pair[1];
|
|
1765
|
-
}
|
|
1766
|
-
}
|
|
1767
|
-
}
|
|
1768
|
-
|
|
1769
|
-
return false;
|
|
1770
|
-
};
|
|
1771
|
-
|
|
1772
1818
|
var SelectField = function SelectField(_ref) {
|
|
1773
1819
|
var label = _ref.label,
|
|
1774
1820
|
_ref$type = _ref.type,
|
|
@@ -1815,45 +1861,6 @@ var SelectField = function SelectField(_ref) {
|
|
|
1815
1861
|
}, error) : null);
|
|
1816
1862
|
};
|
|
1817
1863
|
|
|
1818
|
-
var ErrorFocusInternal = /*#__PURE__*/function (_Component) {
|
|
1819
|
-
_inheritsLoose(ErrorFocusInternal, _Component);
|
|
1820
|
-
|
|
1821
|
-
function ErrorFocusInternal() {
|
|
1822
|
-
var _this;
|
|
1823
|
-
|
|
1824
|
-
_this = _Component.apply(this, arguments) || this;
|
|
1825
|
-
|
|
1826
|
-
_this.render = function () {
|
|
1827
|
-
return null;
|
|
1828
|
-
};
|
|
1829
|
-
|
|
1830
|
-
return _this;
|
|
1831
|
-
}
|
|
1832
|
-
|
|
1833
|
-
var _proto = ErrorFocusInternal.prototype;
|
|
1834
|
-
|
|
1835
|
-
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
|
1836
|
-
var _prevProps$formik = prevProps.formik,
|
|
1837
|
-
isSubmitting = _prevProps$formik.isSubmitting,
|
|
1838
|
-
isValidating = _prevProps$formik.isValidating,
|
|
1839
|
-
errors = _prevProps$formik.errors;
|
|
1840
|
-
var keys = Object.keys(errors);
|
|
1841
|
-
|
|
1842
|
-
if (keys.length > 0 && isSubmitting && !isValidating) {
|
|
1843
|
-
var selector = "[name=\"" + keys[0] + "\"]";
|
|
1844
|
-
var errorElement = document.querySelector(selector);
|
|
1845
|
-
|
|
1846
|
-
if (errorElement) {
|
|
1847
|
-
errorElement.focus();
|
|
1848
|
-
}
|
|
1849
|
-
}
|
|
1850
|
-
};
|
|
1851
|
-
|
|
1852
|
-
return ErrorFocusInternal;
|
|
1853
|
-
}(Component);
|
|
1854
|
-
|
|
1855
|
-
var ErrorFocus = /*#__PURE__*/connect(ErrorFocusInternal);
|
|
1856
|
-
|
|
1857
1864
|
var currencyNormalizerCreator = function currencyNormalizerCreator(value, currency) {
|
|
1858
1865
|
return !value ? '' : "" + getCurrencySymbolByCurrency(currency) + value;
|
|
1859
1866
|
};
|
|
@@ -2609,9 +2616,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2609
2616
|
}), function (element) {
|
|
2610
2617
|
return ['password', 'confirmPassword', 'password-info'].includes(element.name) && isLoggedIn ? null : React.createElement(React.Fragment, {
|
|
2611
2618
|
key: element.uniqueId
|
|
2612
|
-
},
|
|
2613
|
-
className: "email-checking"
|
|
2614
|
-
}, "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", {
|
|
2615
2620
|
className: element.className
|
|
2616
2621
|
}, element.component ? element.component : React.createElement(Field, {
|
|
2617
2622
|
name: element.name,
|
|
@@ -2888,9 +2893,11 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2888
2893
|
return (item == null ? void 0 : item.checked) === true;
|
|
2889
2894
|
});
|
|
2890
2895
|
setAllowSubmit(allChecked);
|
|
2896
|
+
} else {
|
|
2897
|
+
setAllowSubmit(true);
|
|
2891
2898
|
}
|
|
2892
2899
|
}, [checkboxes]);
|
|
2893
|
-
var buttonIsDiabled = !stripe || !!error || isLoading;
|
|
2900
|
+
var buttonIsDiabled = !stripe || !!error || isLoading || !allowSubmit;
|
|
2894
2901
|
return React.createElement("div", {
|
|
2895
2902
|
className: "stripe_payment_container"
|
|
2896
2903
|
}, !!stripeError && React.createElement("div", {
|
|
@@ -2944,16 +2951,15 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2944
2951
|
checked: checkbox.checked
|
|
2945
2952
|
})));
|
|
2946
2953
|
}), React.createElement("div", {
|
|
2947
|
-
className: "payment_button " + (buttonIsDiabled
|
|
2954
|
+
className: "payment_button " + (buttonIsDiabled ? 'disabled-payment-button' : '')
|
|
2948
2955
|
}, React.createElement("button", {
|
|
2949
2956
|
disabled: buttonIsDiabled,
|
|
2950
2957
|
type: "submit"
|
|
2951
2958
|
}, isLoading ? React.createElement(CircularProgress$1, null) : "Pay " + getCurrencySymbolByCurrency(currency) + total))));
|
|
2952
2959
|
};
|
|
2953
2960
|
|
|
2954
|
-
var
|
|
2955
|
-
var stripePromise = /*#__PURE__*/loadStripe(
|
|
2956
|
-
);
|
|
2961
|
+
var publishableKey = CONFIGS.STRIPE_PUBLISHABLE_KEY || 'pk_test_3Ov1P1oP33A1cxaSjxWE0VjT';
|
|
2962
|
+
var stripePromise = /*#__PURE__*/loadStripe(publishableKey);
|
|
2957
2963
|
var initialOrderValues = {
|
|
2958
2964
|
product_name: '',
|
|
2959
2965
|
ticketType: '',
|
|
@@ -3224,84 +3230,163 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
3224
3230
|
})))))));
|
|
3225
3231
|
};
|
|
3226
3232
|
|
|
3227
|
-
var
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
},
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
}
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
}
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
}
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
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", {
|
|
3277
3333
|
className: 'social-media-sharing'
|
|
3278
3334
|
}, React.createElement("div", {
|
|
3279
3335
|
className: 'share-icon'
|
|
3280
|
-
}, React.createElement(
|
|
3336
|
+
}, React.createElement(Icon, {
|
|
3281
3337
|
size: 32,
|
|
3282
3338
|
round: true
|
|
3283
3339
|
})), React.createElement("span", {
|
|
3284
3340
|
className: "share-text"
|
|
3285
|
-
},
|
|
3286
|
-
|
|
3287
|
-
|
|
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({
|
|
3288
3388
|
key: index
|
|
3289
|
-
},
|
|
3290
|
-
href: shareButton.link,
|
|
3291
|
-
target: "_blank",
|
|
3292
|
-
rel: "noopener noreferrer"
|
|
3293
|
-
}, React.createElement("div", {
|
|
3294
|
-
className: 'social-media-sharing'
|
|
3295
|
-
}, React.createElement("div", {
|
|
3296
|
-
className: 'share-icon'
|
|
3297
|
-
}, React.createElement(SVG, {
|
|
3298
|
-
width: '32px',
|
|
3299
|
-
height: '32px',
|
|
3300
|
-
fill: '#FFF',
|
|
3301
|
-
src: getImage(shareButton.icon)
|
|
3302
|
-
})), React.createElement("span", {
|
|
3303
|
-
className: "share-text"
|
|
3304
|
-
}, shareButton.mainLabel, React.createElement("br", null), " ", shareButton.subLabel))));
|
|
3389
|
+
}, shareButton));
|
|
3305
3390
|
})));
|
|
3306
3391
|
};
|
|
3307
3392
|
|
|
@@ -3631,7 +3716,8 @@ var generateQuantity = function generateQuantity(n) {
|
|
|
3631
3716
|
|
|
3632
3717
|
var WaitingList = function WaitingList(_ref) {
|
|
3633
3718
|
var _ref$tickets = _ref.tickets,
|
|
3634
|
-
tickets = _ref$tickets === void 0 ? {} : _ref$tickets
|
|
3719
|
+
tickets = _ref$tickets === void 0 ? {} : _ref$tickets,
|
|
3720
|
+
eventId = _ref.eventId;
|
|
3635
3721
|
|
|
3636
3722
|
var _useState = useState(false),
|
|
3637
3723
|
showSuccessMessage = _useState[0],
|
|
@@ -3651,7 +3737,7 @@ var WaitingList = function WaitingList(_ref) {
|
|
|
3651
3737
|
|
|
3652
3738
|
var handleSubmit = /*#__PURE__*/function () {
|
|
3653
3739
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(values) {
|
|
3654
|
-
var
|
|
3740
|
+
var requestData, _yield$addToWaitingLi, data;
|
|
3655
3741
|
|
|
3656
3742
|
return runtime_1.wrap(function _callee$(_context) {
|
|
3657
3743
|
while (1) {
|
|
@@ -3659,16 +3745,15 @@ var WaitingList = function WaitingList(_ref) {
|
|
|
3659
3745
|
case 0:
|
|
3660
3746
|
_context.prev = 0;
|
|
3661
3747
|
setLoading(true);
|
|
3662
|
-
id = ENV.EVENT_ID;
|
|
3663
3748
|
requestData = {
|
|
3664
3749
|
data: {
|
|
3665
3750
|
attributes: values
|
|
3666
3751
|
}
|
|
3667
3752
|
};
|
|
3668
|
-
_context.next =
|
|
3669
|
-
return addToWaitingList(
|
|
3753
|
+
_context.next = 5;
|
|
3754
|
+
return addToWaitingList(eventId, requestData);
|
|
3670
3755
|
|
|
3671
|
-
case
|
|
3756
|
+
case 5:
|
|
3672
3757
|
_yield$addToWaitingLi = _context.sent;
|
|
3673
3758
|
data = _yield$addToWaitingLi.data;
|
|
3674
3759
|
|
|
@@ -3676,24 +3761,24 @@ var WaitingList = function WaitingList(_ref) {
|
|
|
3676
3761
|
setShowSuccessMessage(true);
|
|
3677
3762
|
}
|
|
3678
3763
|
|
|
3679
|
-
_context.next =
|
|
3764
|
+
_context.next = 12;
|
|
3680
3765
|
break;
|
|
3681
3766
|
|
|
3682
|
-
case
|
|
3683
|
-
_context.prev =
|
|
3767
|
+
case 10:
|
|
3768
|
+
_context.prev = 10;
|
|
3684
3769
|
_context.t0 = _context["catch"](0);
|
|
3685
3770
|
|
|
3686
|
-
case
|
|
3687
|
-
_context.prev =
|
|
3771
|
+
case 12:
|
|
3772
|
+
_context.prev = 12;
|
|
3688
3773
|
setLoading(false);
|
|
3689
|
-
return _context.finish(
|
|
3774
|
+
return _context.finish(12);
|
|
3690
3775
|
|
|
3691
|
-
case
|
|
3776
|
+
case 15:
|
|
3692
3777
|
case "end":
|
|
3693
3778
|
return _context.stop();
|
|
3694
3779
|
}
|
|
3695
3780
|
}
|
|
3696
|
-
}, _callee, null, [[0,
|
|
3781
|
+
}, _callee, null, [[0, 10, 12, 15]]);
|
|
3697
3782
|
}));
|
|
3698
3783
|
|
|
3699
3784
|
return function handleSubmit(_x) {
|
|
@@ -4005,7 +4090,8 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
4005
4090
|
className: "get-tickets-page " + theme,
|
|
4006
4091
|
style: contentStyle
|
|
4007
4092
|
}, isLoading ? React.createElement(Loader, null) : React.createElement(React.Fragment, null, showWaitingList ? React.createElement(WaitingList, {
|
|
4008
|
-
tickets: tickets
|
|
4093
|
+
tickets: tickets,
|
|
4094
|
+
eventId: eventId
|
|
4009
4095
|
}) : React.createElement("div", null, React.createElement(TicketsSection, {
|
|
4010
4096
|
ticketsList: tickets,
|
|
4011
4097
|
selectedTickets: selectedTickets,
|
|
@@ -4394,5 +4480,5 @@ var OrderDetailsContainer = function OrderDetailsContainer(_ref) {
|
|
|
4394
4480
|
}, "Return to Order History"))));
|
|
4395
4481
|
};
|
|
4396
4482
|
|
|
4397
|
-
export { BillingInfoContainer, ConfirmationContainer, LoginModal, MyTicketsContainer, OrderDetailsContainer, PaymentContainer, TicketsContainer, createFixedFloatNormalizer, currencyNormalizerCreator };
|
|
4483
|
+
export { BillingInfoContainer, ConfirmationContainer, LoginModal, MyTicketsContainer, OrderDetailsContainer, PaymentContainer, TicketsContainer, createFixedFloatNormalizer, currencyNormalizerCreator, setConfigs };
|
|
4398
4484
|
//# sourceMappingURL=tf-checkout-react.esm.js.map
|