tf-checkout-react 1.0.55 → 1.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/billing-info-container/index.d.ts +3 -1
- package/dist/components/paymentContainer/index.d.ts +3 -1
- package/dist/tf-checkout-react.cjs.development.css +1 -1
- package/dist/tf-checkout-react.cjs.development.js +74 -44
- 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 +75 -45
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/billing-info-container/index.tsx +22 -7
- package/src/components/billing-info-container/utils.ts +8 -0
- package/src/components/confirmationContainer/index.tsx +1 -1
- package/src/components/paymentContainer/index.tsx +5 -1
- package/src/components/stripePayment/index.tsx +17 -13
- package/src/components/waitingList/index.tsx +2 -1
- package/src/components/waitingList/style.css +6 -0
|
@@ -24,8 +24,10 @@ export interface IBillingInfoPage {
|
|
|
24
24
|
onAuthorizeSuccess?: () => void;
|
|
25
25
|
onAuthorizeError?: (e: AxiosError) => void;
|
|
26
26
|
onLogin?: () => void;
|
|
27
|
+
onLoginSuccess?: () => void;
|
|
27
28
|
initialValues?: FormikValues;
|
|
28
29
|
buttonName?: string;
|
|
29
30
|
theme?: 'light' | 'dark';
|
|
31
|
+
isLoggedIn?: boolean;
|
|
30
32
|
}
|
|
31
|
-
export declare const BillingInfoContainer: ({ data, ticketHoldersFields, initialValues, buttonName, handleSubmit, theme, onRegisterSuccess, onRegisterError, onSubmitError, onGetCartSuccess, onGetCartError, onGetCountriesSuccess, onGetCountriesError, onGetStatesSuccess, onGetStatesError, onGetProfileDataSuccess, onGetProfileDataError, onAuthorizeSuccess, onAuthorizeError, onLogin, }: IBillingInfoPage) => JSX.Element;
|
|
33
|
+
export declare const BillingInfoContainer: ({ data, ticketHoldersFields, initialValues, buttonName, handleSubmit, theme, onRegisterSuccess, onRegisterError, onSubmitError, onGetCartSuccess, onGetCartError, onGetCountriesSuccess, onGetCountriesError, onGetStatesSuccess, onGetStatesError, onGetProfileDataSuccess, onGetProfileDataError, onAuthorizeSuccess, onAuthorizeError, onLogin, onLoginSuccess, isLoggedIn: pIsLoggedIn, }: IBillingInfoPage) => JSX.Element;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { AxiosError } from 'axios';
|
|
3
3
|
import './style.css';
|
|
4
4
|
import { IPaymentField } from '../../types';
|
|
5
|
+
import { StripeCardNumberElementOptions } from '@stripe/stripe-js';
|
|
5
6
|
export interface IPaymentPage {
|
|
6
7
|
paymentFields: IPaymentField[];
|
|
7
8
|
handlePayment: any;
|
|
@@ -12,5 +13,6 @@ export interface IPaymentPage {
|
|
|
12
13
|
onGetPaymentDataSuccess: (value: any) => void;
|
|
13
14
|
onGetPaymentDataError: (value: AxiosError) => void;
|
|
14
15
|
onPaymentError: (value: AxiosError) => void;
|
|
16
|
+
stripeCardOptions?: StripeCardNumberElementOptions;
|
|
15
17
|
}
|
|
16
|
-
export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError, }: IPaymentPage) => JSX.Element;
|
|
18
|
+
export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError, stripeCardOptions, }: IPaymentPage) => JSX.Element;
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
.style_card_form_inner__7vzGq{background:#232323;border-radius:8px;margin:0 auto 20px;min-width:325px;padding:15px;width:50%}.style_card_form_inner__7vzGq .style_card_label_text__F7GFa{color:#fff}.style_card_form_inner__7vzGq .style_StripeElement__jS5TJ{margin:5px 0 10px}.style_card_label_text__F7GFa{color:#fff}.style_payment_button__2rkp8{padding-top:15px;text-align:center}.style_payment_button__2rkp8 button{background-color:#212529;border-radius:8px;color:#fff;cursor:pointer;font-size:26px;padding:15px 30px;transition:opacity .5s;width:200px}.style_payment_button__2rkp8 button:hover{opacity:.7}.style_disabled-payment-button__3MiUR button{opacity:.3;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.style_checkout_error_block__3LUN5{color:#e53935;font-weight:600;padding:15px 0}.style_zip_element__31oFa p{margin-bottom:0}.style_zip_element__31oFa input{background-color:#232323;border:none;color:#fff;font-size:18px;margin-top:5px;outline:none;width:100%}
|
|
6
6
|
.style_confirmation-page__1F9Sh{margin:0 auto;max-width:1024px}.style_confirmation-page__1F9Sh .style_strong-text__27fPG{font-weight:700}.style_confirmation-page__1F9Sh .style_title__2Al5H{color:#333;font-size:24px;font-weight:600}.style_confirmation-page__1F9Sh .style_share-message-section__3tRfP{background:#dff0d8;border:1px solid #d6e9c6;border-radius:5px;color:#2c7221;display:flex;flex-direction:column;margin:20px 0;padding:15px}.style_confirmation-page__1F9Sh .style_main__3LBFA{font-size:15px;font-weight:700}.style_confirmation-page__1F9Sh .style_helper__3L5l6,.style_confirmation-page__1F9Sh .style_main__3LBFA{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif}.style_confirmation-page__1F9Sh .style_helper__3L5l6{font-size:14px;margin-top:5px}.style_confirmation-page__1F9Sh .style_referral_text_image_section__1shCe{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin:20px -10px}.style_confirmation-page__1F9Sh .style_referral_text_image_section__1shCe .style_referral_text_section__3dvbC{margin:10px}.style_confirmation-page__1F9Sh .style_referral_text_image_section__1shCe .style_referral_title_text__1zFZX{color:#f08057;font-size:28px;padding-bottom:10px}.style_confirmation-page__1F9Sh .style_referral_text_image_section__1shCe .style_referral_text__2tAKA{font-size:18px}.style_confirmation-page__1F9Sh .style_referral_text_image_section__1shCe img{margin:10px;max-width:200px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz{-moz-column-gap:5rem;column-gap:5rem;display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));margin:10px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_invitation_title__x4iqi{font-size:22px;padding-bottom:12px;padding-top:12px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2{display:flex;flex-wrap:wrap;justify-content:space-between;margin:0 -10px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z{flex:1 1;padding:0 5px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share_buttons__2C4eT{display:grid;flex-wrap:wrap;margin:0 -7px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share_buttons__2C4eT .style_social-media-btns__2kCat{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share_buttons__2C4eT .style_social-media-btns__2kCat .style_sharing-btn__IVnek{min-width:130px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share-btn-inner__2HBGQ.style_share-by-link-copy__25qUa{padding:0;text-align:left}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_sharing-button__3R2yU{flex:1 1}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_convenient_buttons__2RFH8.style_sharing-btn__IVnek{display:inline}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share-by-link__2B83J{background:#000;color:#fff;padding:0}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share-by-link__2B83J.style_label__3FIno{margin:0;padding:0;text-align:left}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_sharing-btn__IVnek{flex:1 1;padding:7px;text-align:center}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share-btn-inner__2HBGQ{background:#000;color:#fff;padding:10px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share-btn-inner__2HBGQ .style_svg_wrapper__268DZ{display:inline}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share-btn-inner__2HBGQ .style_share-input__2Pp7g{background-color:#fff;text-align:left;width:300px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share-text__V36JV{display:block;font-size:13px;font-weight:600;padding-top:8px;width:100%}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_pricing-section_wrapper__1aDnf{background:#e3e3e3;border:1px solid #dcdcdc;display:grid;grid-template-columns:1fr 1fr;margin:10px 0;padding:15px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_pricing-section_wrapper__1aDnf.style_free_price__3Hd0-{background:#e9835b;border:1px solid #eb7b4a;color:#fff}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_pricing-section_label__3SVoy{font-weight:600}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_pricing-section_sublabel__2Ckqd{font-size:14px;font-weight:100}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_pricing-section_price__3v8bL{font-weight:600;text-align:right}
|
|
7
7
|
body{margin:0;padding:0}.style_get-tickets-page__11KeR{width:100%}.style_event-detail__tier__2CcMs{background-color:#fff;padding:17px 35px 20px}.style_event-detail__tier-name__116US{color:#000;font-family:Inter-Bold;font-family:Bebas Neue;font-size:.85rem;font-weight:700;letter-spacing:.2em;line-height:1.3;margin-bottom:8px;margin-top:16px;padding-right:20%;text-transform:uppercase}.style_event-detail__tier-status__IbqO1{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;margin-top:8px;width:100%}.style_event-detail__tier-status__IbqO1.style_ticket-button__Nty1u{background-color:#212529;border:3px solid #000;border-radius:0;color:#fff;cursor:pointer;font-weight:700;letter-spacing:.2em;line-height:1.5;margin-bottom:10px;width:200px}.style_event-tickets-container__3vdaQ{align-items:center;display:flex;justify-content:space-between}.style_event-detail__tier-status__IbqO1.style_ticket-button__Nty1u.style_true__g6yhC{background-color:#c1c3c6;border-color:#afb0b1}.style_event-detail__tier-price__3doIb{color:#000;font-family:Inter-Bold;font-size:1.5rem;font-weight:700;line-height:1;text-align:center}.style_event-detail__tier-price__3doIb p{margin:0}.style_event-detail__tier-price__3doIb .style_fees__19QjH{font-size:14px;font-weight:400;margin-top:4px;text-align:left}.style_event-detail__tier-price__3doIb .style_old-price__2mSOJ{color:red;font-size:1.3rem;margin-bottom:5px;text-decoration:line-through}.style_alert-info__24Mx5{background-color:#d9edf7;border:1px solid #bce8f1;border-radius:4px;color:#3a87ad;font-size:1em;margin:0 35px;padding:8px 15px;text-align:center;text-shadow:0 1px 0 hsla(0,0%,100%,.5)}.style_event-detail__tier-state__2ethF{color:#30bc9d;font-family:Inter-Bold;font-size:.75rem;font-weight:300;line-height:1;text-align:right;text-transform:uppercase}.style_promo-code-block__ttqVr input{font-size:14px;padding:1px 8px}.style_book-button__1krJI{background-color:#212529;border:3px solid #000;border-radius:0;color:#fff;cursor:pointer;display:block;font-size:26px;font-weight:700;height:50px;letter-spacing:.2em;line-height:1.5;margin:25px auto 10px;text-align:center;width:100%}.style_book-button__1krJI:hover{background-color:#505050;border-color:#505050}.style_loader-container__3iPe2{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.style_get-tickets-paper__3ZF-f::-webkit-scrollbar{width:5px}.style_get-tickets-paper__3ZF-f::-webkit-scrollbar-track{background:#f1f1f1}.style_get-tickets-paper__3ZF-f::-webkit-scrollbar-thumb{background:#888}.style_get-tickets-paper__3ZF-f::-webkit-scrollbar-thumb:hover{background:#555}.style_get-tickets__3Sghy .style_get-tickets__selectbox__2ApAj{width:100%}.style_disabled__310xq{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.style_hidden__ceCor{display:none}
|
|
8
|
-
.style_waiting-list__2sJxM{padding:17px 35px 20px}.style_waiting-list__2sJxM .style_field-item__34MYc{margin-bottom:30px}.style_waiting-list__2sJxM .style_waiting-list-button__tO7D2{width:100%!important}.style_waiting-list__2sJxM .style_waiting-list-button__tO7D2:hover{background-color:#505050}.style_waiting-list__2sJxM .style_success-message__BvF3R h3{margin:10px 0}.style_waiting-list__2sJxM .style_success-message__BvF3R p{margin:0}
|
|
8
|
+
.style_waiting-list__2sJxM{padding:17px 35px 20px}.style_waiting-list__2sJxM .style_field-item__34MYc{margin-bottom:30px}.style_waiting-list__2sJxM .style_waiting-list-button__tO7D2{width:100%!important}.style_waiting-list__2sJxM .style_waiting-list-button__tO7D2:hover{background-color:#505050}.style_waiting-list__2sJxM .style_success-message__BvF3R h3{margin:10px 0}.style_waiting-list__2sJxM .style_success-message__BvF3R p{margin:0}.style_waiting-list__2sJxM .style_no-tickets-text__zGdaP{text-align:center}.style_waiting-list__2sJxM .style_added-success-message__FbPZS{font-size:22px}
|
|
@@ -1522,8 +1522,12 @@ var getInitialValues = function getInitialValues(data, propsInitialValues, userV
|
|
|
1522
1522
|
|
|
1523
1523
|
_forEach(results, function (item) {
|
|
1524
1524
|
initialValues[item] = propsInitialValues[item] || userValues[item] || '';
|
|
1525
|
-
});
|
|
1525
|
+
}); // set logged in user as first ticket holder
|
|
1526
|
+
|
|
1526
1527
|
|
|
1528
|
+
initialValues['holderFirstName-0'] = propsInitialValues.firstName || userValues.firstName || '';
|
|
1529
|
+
initialValues['holderLastName-0'] = propsInitialValues.lastName || userValues.lastName || '';
|
|
1530
|
+
initialValues['holderEmail-0'] = propsInitialValues.email || userValues.email || '';
|
|
1527
1531
|
return initialValues;
|
|
1528
1532
|
};
|
|
1529
1533
|
var createRegisterFormData = function createRegisterFormData(values, checkoutBody) {
|
|
@@ -1924,7 +1928,10 @@ var LogicRunner = function LogicRunner(_ref) {
|
|
|
1924
1928
|
brand_opt_in: (parsedData == null ? void 0 : parsedData.brand_opt_in) || '',
|
|
1925
1929
|
city: (parsedData == null ? void 0 : parsedData.city) || '',
|
|
1926
1930
|
confirmPassword: '',
|
|
1927
|
-
password: ''
|
|
1931
|
+
password: '',
|
|
1932
|
+
'holderFirstName-0': (parsedData == null ? void 0 : parsedData.first_name) || '',
|
|
1933
|
+
'holderLastName-0': (parsedData == null ? void 0 : parsedData.last_name) || '',
|
|
1934
|
+
'holderEmail-0': (parsedData == null ? void 0 : parsedData.email) || ''
|
|
1928
1935
|
};
|
|
1929
1936
|
setValues(mappedValues);
|
|
1930
1937
|
setUserValues(mappedValues);
|
|
@@ -1981,47 +1988,56 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
1981
1988
|
_ref3$onAuthorizeErro = _ref3.onAuthorizeError,
|
|
1982
1989
|
onAuthorizeError = _ref3$onAuthorizeErro === void 0 ? function () {} : _ref3$onAuthorizeErro,
|
|
1983
1990
|
_ref3$onLogin = _ref3.onLogin,
|
|
1984
|
-
onLogin = _ref3$onLogin === void 0 ? function () {} : _ref3$onLogin
|
|
1985
|
-
|
|
1986
|
-
|
|
1991
|
+
onLogin = _ref3$onLogin === void 0 ? function () {} : _ref3$onLogin,
|
|
1992
|
+
_ref3$onLoginSuccess = _ref3.onLoginSuccess,
|
|
1993
|
+
onLoginSuccess = _ref3$onLoginSuccess === void 0 ? function () {} : _ref3$onLoginSuccess,
|
|
1994
|
+
_ref3$isLoggedIn = _ref3.isLoggedIn,
|
|
1995
|
+
pIsLoggedIn = _ref3$isLoggedIn === void 0 ? false : _ref3$isLoggedIn;
|
|
1996
|
+
var isWindowDefined = typeof window !== 'undefined';
|
|
1997
|
+
var userData = isWindowDefined && window.localStorage.getItem('user_data') ? JSON.parse(window.localStorage.getItem('user_data') || '') : {};
|
|
1998
|
+
var access_token = isWindowDefined && window.localStorage.getItem('access_token') ? window.localStorage.getItem('access_token') || '' : '';
|
|
1987
1999
|
|
|
1988
2000
|
var _useState = React.useState(data),
|
|
1989
2001
|
dataWithUniqueIds = _useState[0],
|
|
1990
2002
|
setDataWithUniqueIds = _useState[1];
|
|
1991
2003
|
|
|
1992
|
-
var _useState2 = React.useState(
|
|
1993
|
-
|
|
1994
|
-
|
|
2004
|
+
var _useState2 = React.useState(!!access_token),
|
|
2005
|
+
isLoggedIn = _useState2[0],
|
|
2006
|
+
setIsLoggedIn = _useState2[1];
|
|
1995
2007
|
|
|
1996
|
-
var _useState3 = React.useState(
|
|
1997
|
-
|
|
1998
|
-
|
|
2008
|
+
var _useState3 = React.useState({}),
|
|
2009
|
+
cartInfoData = _useState3[0],
|
|
2010
|
+
setCartInfo = _useState3[1];
|
|
1999
2011
|
|
|
2000
2012
|
var _useState4 = React.useState([]),
|
|
2001
|
-
|
|
2002
|
-
|
|
2013
|
+
countries = _useState4[0],
|
|
2014
|
+
setCountries = _useState4[1];
|
|
2003
2015
|
|
|
2004
|
-
var _useState5 = React.useState(
|
|
2005
|
-
|
|
2006
|
-
|
|
2016
|
+
var _useState5 = React.useState([]),
|
|
2017
|
+
states = _useState5[0],
|
|
2018
|
+
setStates = _useState5[1];
|
|
2007
2019
|
|
|
2008
2020
|
var _useState6 = React.useState(false),
|
|
2009
|
-
|
|
2010
|
-
|
|
2021
|
+
showModalLogin = _useState6[0],
|
|
2022
|
+
setShowModalLogin = _useState6[1];
|
|
2011
2023
|
|
|
2012
2024
|
var _useState7 = React.useState(false),
|
|
2013
|
-
|
|
2014
|
-
|
|
2025
|
+
alreadyHasUser = _useState7[0],
|
|
2026
|
+
setAlreadyHasUser = _useState7[1];
|
|
2015
2027
|
|
|
2016
2028
|
var _useState8 = React.useState(false),
|
|
2017
|
-
|
|
2018
|
-
|
|
2029
|
+
userExpired = _useState8[0],
|
|
2030
|
+
setUserExpired = _useState8[1];
|
|
2019
2031
|
|
|
2020
|
-
var _useState9 = React.useState(
|
|
2021
|
-
|
|
2022
|
-
|
|
2032
|
+
var _useState9 = React.useState(false),
|
|
2033
|
+
showModalRegister = _useState9[0],
|
|
2034
|
+
setShowModalRegister = _useState9[1];
|
|
2035
|
+
|
|
2036
|
+
var _useState10 = React.useState([]),
|
|
2037
|
+
ticketsQuantity = _useState10[0],
|
|
2038
|
+
setTicketsQuantity = _useState10[1];
|
|
2023
2039
|
|
|
2024
|
-
var
|
|
2040
|
+
var _useState11 = React.useState({
|
|
2025
2041
|
firstName: '',
|
|
2026
2042
|
lastName: '',
|
|
2027
2043
|
email: '',
|
|
@@ -2036,10 +2052,8 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2036
2052
|
state: '',
|
|
2037
2053
|
zip: ''
|
|
2038
2054
|
}),
|
|
2039
|
-
userValues =
|
|
2040
|
-
setUserValues =
|
|
2041
|
-
|
|
2042
|
-
var isLoggedIn = !!access_token;
|
|
2055
|
+
userValues = _useState11[0],
|
|
2056
|
+
setUserValues = _useState11[1];
|
|
2043
2057
|
|
|
2044
2058
|
var emailLogged = _get(userData, 'email', '') || _get(userValues, 'email', '');
|
|
2045
2059
|
|
|
@@ -2068,8 +2082,13 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2068
2082
|
qty += +item.quantity;
|
|
2069
2083
|
});
|
|
2070
2084
|
return qty;
|
|
2071
|
-
};
|
|
2085
|
+
};
|
|
2072
2086
|
|
|
2087
|
+
React.useEffect(function () {
|
|
2088
|
+
if ((pIsLoggedIn || access_token) && !isLoggedIn) {
|
|
2089
|
+
setIsLoggedIn(true);
|
|
2090
|
+
}
|
|
2091
|
+
}, [pIsLoggedIn, isLoggedIn, access_token]); //just once
|
|
2073
2092
|
|
|
2074
2093
|
React.useEffect(function () {
|
|
2075
2094
|
// fetch countries data
|
|
@@ -2178,7 +2197,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2178
2197
|
case 0:
|
|
2179
2198
|
_context4.prev = 0;
|
|
2180
2199
|
|
|
2181
|
-
if (!(
|
|
2200
|
+
if (!(isWindowDefined && token)) {
|
|
2182
2201
|
_context4.next = 10;
|
|
2183
2202
|
break;
|
|
2184
2203
|
}
|
|
@@ -2259,7 +2278,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2259
2278
|
_profileSpecifiedData = _get(updatedUserData, 'data.data');
|
|
2260
2279
|
_profileDataObj = setLoggedUserData(_profileSpecifiedData);
|
|
2261
2280
|
|
|
2262
|
-
if (
|
|
2281
|
+
if (isWindowDefined) {
|
|
2263
2282
|
window.localStorage.setItem('user_data', JSON.stringify(_profileDataObj));
|
|
2264
2283
|
}
|
|
2265
2284
|
|
|
@@ -2337,7 +2356,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2337
2356
|
profileSpecifiedData = _get(profileData, 'data.data');
|
|
2338
2357
|
profileDataObj = setLoggedUserData(profileSpecifiedData);
|
|
2339
2358
|
|
|
2340
|
-
if (
|
|
2359
|
+
if (isWindowDefined) {
|
|
2341
2360
|
window.localStorage.setItem('user_data', JSON.stringify(profileDataObj));
|
|
2342
2361
|
}
|
|
2343
2362
|
|
|
@@ -2361,7 +2380,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2361
2380
|
|
|
2362
2381
|
if (axios.isAxiosError(_context5.t1)) {
|
|
2363
2382
|
if (((_e$response2 = _context5.t1.response) == null ? void 0 : _e$response2.data.error) === 'invalid_token') {
|
|
2364
|
-
if (
|
|
2383
|
+
if (isWindowDefined) {
|
|
2365
2384
|
window.localStorage.removeItem('user_data');
|
|
2366
2385
|
window.localStorage.removeItem('access_token');
|
|
2367
2386
|
setUserExpired(true);
|
|
@@ -2499,6 +2518,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2499
2518
|
onLogin: function onLogin() {
|
|
2500
2519
|
setShowModalLogin(false);
|
|
2501
2520
|
setUserExpired(false);
|
|
2521
|
+
onLoginSuccess();
|
|
2502
2522
|
},
|
|
2503
2523
|
alreadyHasUser: alreadyHasUser,
|
|
2504
2524
|
userExpired: userExpired,
|
|
@@ -2592,6 +2612,9 @@ var options = {
|
|
|
2592
2612
|
fontSize: '18px',
|
|
2593
2613
|
color: '#ffffff',
|
|
2594
2614
|
letterSpacing: '1px',
|
|
2615
|
+
':-webkit-autofill': {
|
|
2616
|
+
color: '#ffffff'
|
|
2617
|
+
},
|
|
2595
2618
|
'::placeholder': {
|
|
2596
2619
|
color: 'rgba(201, 201, 201, 0.5)'
|
|
2597
2620
|
}
|
|
@@ -2607,7 +2630,7 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2607
2630
|
_ref$onSubmit = _ref.onSubmit,
|
|
2608
2631
|
onSubmit = _ref$onSubmit === void 0 ? _identity : _ref$onSubmit,
|
|
2609
2632
|
_ref$stripeCardOption = _ref.stripeCardOptions,
|
|
2610
|
-
stripeCardOptions = _ref$stripeCardOption === void 0 ?
|
|
2633
|
+
stripeCardOptions = _ref$stripeCardOption === void 0 ? {} : _ref$stripeCardOption,
|
|
2611
2634
|
_ref$error = _ref.error,
|
|
2612
2635
|
error = _ref$error === void 0 ? null : _ref$error,
|
|
2613
2636
|
stripe_client_secret = _ref.stripe_client_secret,
|
|
@@ -2794,7 +2817,7 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2794
2817
|
}, React__default.createElement("span", {
|
|
2795
2818
|
className: "card_label_text"
|
|
2796
2819
|
}, "Card number"), React__default.createElement(reactStripeJs.CardNumberElement, {
|
|
2797
|
-
options: stripeCardOptions,
|
|
2820
|
+
options: _extends({}, options, stripeCardOptions),
|
|
2798
2821
|
onReady: _identity,
|
|
2799
2822
|
onChange: _identity,
|
|
2800
2823
|
onBlur: _identity,
|
|
@@ -2804,13 +2827,13 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2804
2827
|
}, React__default.createElement("span", {
|
|
2805
2828
|
className: "card_label_text"
|
|
2806
2829
|
}, "Expiration date"), React__default.createElement(reactStripeJs.CardExpiryElement, {
|
|
2807
|
-
options: stripeCardOptions
|
|
2830
|
+
options: _extends({}, options, stripeCardOptions)
|
|
2808
2831
|
})), React__default.createElement("label", {
|
|
2809
2832
|
className: "cvc_element"
|
|
2810
2833
|
}, React__default.createElement("span", {
|
|
2811
2834
|
className: "card_label_text"
|
|
2812
2835
|
}, "CVC"), React__default.createElement(reactStripeJs.CardCvcElement, {
|
|
2813
|
-
options: stripeCardOptions
|
|
2836
|
+
options: _extends({}, options, stripeCardOptions)
|
|
2814
2837
|
})), React__default.createElement("label", {
|
|
2815
2838
|
className: "zip_element"
|
|
2816
2839
|
}, React__default.createElement("p", {
|
|
@@ -2876,7 +2899,9 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
2876
2899
|
_ref$onGetPaymentData2 = _ref.onGetPaymentDataError,
|
|
2877
2900
|
onGetPaymentDataError = _ref$onGetPaymentData2 === void 0 ? function () {} : _ref$onGetPaymentData2,
|
|
2878
2901
|
_ref$onPaymentError = _ref.onPaymentError,
|
|
2879
|
-
onPaymentError = _ref$onPaymentError === void 0 ? function () {} : _ref$onPaymentError
|
|
2902
|
+
onPaymentError = _ref$onPaymentError === void 0 ? function () {} : _ref$onPaymentError,
|
|
2903
|
+
_ref$stripeCardOption = _ref.stripeCardOptions,
|
|
2904
|
+
stripeCardOptions = _ref$stripeCardOption === void 0 ? {} : _ref$stripeCardOption;
|
|
2880
2905
|
|
|
2881
2906
|
var _useState = React.useState(initialReviewValues),
|
|
2882
2907
|
reviewData = _useState[0],
|
|
@@ -3097,7 +3122,8 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
3097
3122
|
handleSetLoading: function handleSetLoading(value) {
|
|
3098
3123
|
return setPaymentIsLoading(value);
|
|
3099
3124
|
},
|
|
3100
|
-
conditions: conditions
|
|
3125
|
+
conditions: conditions,
|
|
3126
|
+
stripeCardOptions: stripeCardOptions
|
|
3101
3127
|
}))))));
|
|
3102
3128
|
};
|
|
3103
3129
|
|
|
@@ -3163,7 +3189,7 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
|
|
|
3163
3189
|
}
|
|
3164
3190
|
}, _callee, null, [[4, 13]]);
|
|
3165
3191
|
}))();
|
|
3166
|
-
}, [
|
|
3192
|
+
}, []);
|
|
3167
3193
|
return React__default.createElement("div", {
|
|
3168
3194
|
className: "confirmation-page"
|
|
3169
3195
|
}, React__default.createElement("p", {
|
|
@@ -3485,9 +3511,13 @@ var WaitingList = function WaitingList(_ref) {
|
|
|
3485
3511
|
|
|
3486
3512
|
return React__default.createElement("div", {
|
|
3487
3513
|
className: "waiting-list"
|
|
3488
|
-
},
|
|
3514
|
+
}, React__default.createElement("p", {
|
|
3515
|
+
className: "no-tickets-text"
|
|
3516
|
+
}, "No tickets are currently available for this event."), showSuccessMessage ? React__default.createElement("div", {
|
|
3489
3517
|
className: "success-message"
|
|
3490
|
-
}, React__default.createElement("
|
|
3518
|
+
}, React__default.createElement("p", {
|
|
3519
|
+
className: "added-success-message"
|
|
3520
|
+
}, "You've been added to the waiting list!"), React__default.createElement("p", null, "You'll be notified if tickets become available.")) : React__default.createElement(React__default.Fragment, null, React__default.createElement("h2", null, "WAITING LIST"), React__default.createElement(formik.Formik, {
|
|
3491
3521
|
initialValues: {
|
|
3492
3522
|
ticketTypeId: '',
|
|
3493
3523
|
quantity: '',
|