tf-checkout-react 1.0.37 → 1.0.41
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/utils.d.ts +1 -1
- package/dist/components/stripePayment/index.d.ts +3 -1
- package/dist/tf-checkout-react.cjs.development.css +3 -3
- package/dist/tf-checkout-react.cjs.development.js +87 -42
- 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 +90 -45
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/types/billing-info-data.d.ts +1 -0
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/api/index.ts +2 -2
- package/src/components/.DS_Store +0 -0
- package/src/components/billing-info-container/index.tsx +27 -12
- package/src/components/billing-info-container/style.css +8 -5
- package/src/components/billing-info-container/utils.ts +2 -2
- package/src/components/loginModal/style.css +4 -0
- package/src/components/paymentContainer/index.tsx +5 -0
- package/src/components/stripePayment/index.tsx +24 -5
- package/src/components/ticketsContainer/index.tsx +10 -2
- package/src/components/ticketsContainer/style.css +17 -3
- package/src/types/billing-info-data.ts +1 -0
|
@@ -11,6 +11,8 @@ export interface ICheckoutForm {
|
|
|
11
11
|
billing_info: {
|
|
12
12
|
[key: string]: any;
|
|
13
13
|
};
|
|
14
|
+
isLoading: any;
|
|
15
|
+
handleSetLoading: (loading: any) => void;
|
|
14
16
|
}
|
|
15
|
-
declare const CheckoutForm: ({ total, onSubmit, stripeCardOptions, error, stripe_client_secret, currency, billing_info, }: ICheckoutForm) => JSX.Element;
|
|
17
|
+
declare const CheckoutForm: ({ total, onSubmit, stripeCardOptions, error, stripe_client_secret, currency, billing_info, isLoading, handleSetLoading }: ICheckoutForm) => JSX.Element;
|
|
16
18
|
export default CheckoutForm;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
.style_billing-info-container__3ZE3J{margin:0 auto;max-width:800px}.style_billing-info-container__3ZE3J .style_is-half__1W_rP{width:49%}.style_billing-info-container__3ZE3J p{color:#000}.style_billing-info-container__twoFields__2tDqt{display:flex;justify-content:space-between;margin-top:15px}.style_billing-info-container__singleField__2bcsf{margin-top:15px}button{margin-top:10px}.style_account-actions-block__16OH-{color:#182026;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif;margin-top:10px}.style_login-register-button__fGgZf,.style_MuiButtonBase-root__1UBk9.style_MuiButton-root__3NzEO,.style_MuiButtonBase-root__1UBk9.style_MuiButton-root__3NzEO:hover{background-color:#212529;border:#f28051;border-radius:5px;color:#fff;cursor:pointer;display:block;font-family:Inter-Bold;font-size:26px;font-weight:700;line-height:1.15;margin-top:10px;min-height:46px;outline:none;overflow:hidden;padding:14px 12px 12px;position:relative;text-align:center;text-overflow:ellipsis;text-transform:uppercase;width:49%}.style_logo-image-container__2A2uH{margin-top:5px;text-align:center;width:49%}.style_logo-image-container__2A2uH img{height:30px}.style_login-block__22kcN{align-items:center;display:flex;flex-direction:column}.
|
|
2
|
-
.style_modal-title__2sUq_{align-items:center;background-color:#fff;display:flex;font-family:Inter;font-size:18px;font-weight:700;height:49px;line-height:22px;padding-left:25px;position:relative}.style_login-modal-body__2sFg5{padding:15px 25px}.style_login-modal-body__2sFg5 input{background:#fff!important}.style_login-modal-body__email__2nnEH,.style_login-modal-body__password__qS3g7{margin-bottom:20px}.style_login-action-button__1g9qt button{background-color:#212529;border:none;border-radius:0;color:#fff;cursor:pointer;font-size:26px;font-weight:600;height:45px;line-height:18px;margin:10px 0;outline:none;padding:10px;width:100%}.style_server_auth__error__1340S{color:red;font-family:Inter;font-size:12px;font-style:normal;padding-left:25px;padding-top:15px}.style_info-text-for-login__28JQf{font-size:14px;margin-bottom:4px;padding-left:10px}
|
|
1
|
+
.style_billing-info-container__3ZE3J{margin:0 auto;max-width:800px}.style_billing-info-container__3ZE3J .style_is-half__1W_rP{width:49%}.style_billing-info-container__3ZE3J p{color:#000}.style_billing-info-container__3ZE3J .style_main-header__2OFWa{font-size:2rem;font-weight:600}.style_billing-info-container__twoFields__2tDqt{display:flex;justify-content:space-between;margin-top:15px}.style_billing-info-container__singleField__2bcsf{margin-top:15px}button{margin-top:10px}.style_account-actions-block__16OH-{color:#182026;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif;margin-top:10px}.style_login-register-button__fGgZf,.style_MuiButtonBase-root__1UBk9.style_MuiButton-root__3NzEO,.style_MuiButtonBase-root__1UBk9.style_MuiButton-root__3NzEO:hover{background-color:#212529;border:#f28051;border-radius:5px;color:#fff;cursor:pointer;display:block;font-family:Inter-Bold;font-size:26px;font-weight:700;line-height:1.15;margin-top:10px;min-height:46px;outline:none;overflow:hidden;padding:14px 12px 12px;position:relative;text-align:center;text-overflow:ellipsis;text-transform:uppercase;width:49%}.style_logo-image-container__2A2uH{margin-top:5px;text-align:center;width:49%}.style_logo-image-container__2A2uH img{height:30px}.style_login-block__22kcN{align-items:center;display:flex;flex-direction:column}.style_login-register-button__fGgZf:hover{background-color:#505050!important;border-color:#505050!important}.style_login-register-block__36tu5{display:flex;justify-content:space-between}
|
|
2
|
+
.style_modal-title__2sUq_{align-items:center;background-color:#fff;display:flex;font-family:Inter;font-size:18px;font-weight:700;height:49px;line-height:22px;padding-left:25px;position:relative}.style_login-modal-body__2sFg5{padding:15px 25px}.style_login-modal-body__2sFg5 input{background:#fff!important}.style_login-modal-body__email__2nnEH,.style_login-modal-body__password__qS3g7{margin-bottom:20px}.style_login-action-button__1g9qt button{background-color:#212529;border:none;border-radius:0;color:#fff;cursor:pointer;font-size:26px;font-weight:600;height:45px;line-height:18px;margin:10px 0;outline:none;padding:10px;width:100%}.style_login-action-button__1g9qt button:hover{background-color:#505050;border-color:#505050}.style_server_auth__error__1340S{color:red;font-family:Inter;font-size:12px;font-style:normal;padding-left:25px;padding-top:15px}.style_info-text-for-login__28JQf{font-size:14px;margin-bottom:4px;padding-left:10px}
|
|
3
3
|
.style_register-container___s5V8{margin:0 auto;max-width:800px}.style_register-container___s5V8 .style_is-half__2XhZU{width:49%}.style_register-container__twoFields__3dAvM{display:flex;justify-content:space-between;margin-top:15px}.style_register-container__singleField__36dGU{margin-top:15px}button{margin-top:10px}
|
|
4
4
|
.style_payment_page__1PUd8{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif}.style_payment_page__1PUd8 .style_order_info_section__J1olw{padding:15px 0}.style_payment_page__1PUd8 .style_order_info_section__J1olw .style_order_info_block__3kZN4{padding-bottom:15px;padding-top:15px}.style_payment_page__1PUd8 .style_order_info_section__J1olw .style_order_info_block__3kZN4 .style_field-underline__2M8Bd{border-bottom:1px solid #000;padding-bottom:15px}.style_payment_page__1PUd8 .style_order_info_section__J1olw .style_order_info_block__3kZN4 .style_order_info_title__1MBgS{font-size:14px;font-weight:700;padding-bottom:3px}.style_payment_page__1PUd8 .style_order_info_section__J1olw .style_order_info_block__3kZN4 .style_order_info_text__3gSEK{font-size:16px;line-height:1.15;outline:none}.style_payment_page__1PUd8 .style_MuiBox-root__2LeaA{margin-left:auto;margin-right:auto;padding:20px;text-align:center}.style_payment_page__1PUd8 .style_payment_info_label__3Zmjp{padding:20px 0;text-align:center}.style_payment_page__1PUd8 .style_payment_form__2arf4{color:#fff;padding:20px}.style_payment_page__1PUd8 .style_payment_form__2arf4 input,.style_payment_page__1PUd8 .style_payment_form__2arf4 label{color:#fff}.style_payment_page__1PUd8 .style_payment_button__3WzAn{padding-top:20px;text-align:center}
|
|
5
5
|
.style_card_form_inner__7vzGq{background:#232323;border-radius:8px;padding:15px}.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_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
|
-
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;
|
|
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}
|
|
@@ -26,6 +26,7 @@ var Container = _interopDefault(require('@mui/material/Container'));
|
|
|
26
26
|
var Alert = _interopDefault(require('@mui/material/Alert'));
|
|
27
27
|
var reactStripeJs = require('@stripe/react-stripe-js');
|
|
28
28
|
var stripeJs = require('@stripe/stripe-js');
|
|
29
|
+
var CircularProgress = _interopDefault(require('@mui/material/CircularProgress'));
|
|
29
30
|
var SVG = _interopDefault(require('react-inlinesvg'));
|
|
30
31
|
var _sortBy = _interopDefault(require('lodash/sortBy'));
|
|
31
32
|
var _has = _interopDefault(require('lodash/has'));
|
|
@@ -37,7 +38,6 @@ var _isObject = _interopDefault(require('lodash/isObject'));
|
|
|
37
38
|
var FormControl = _interopDefault(require('@mui/material/FormControl'));
|
|
38
39
|
var MenuItem = _interopDefault(require('@mui/material/MenuItem'));
|
|
39
40
|
var Select = _interopDefault(require('@mui/material/Select'));
|
|
40
|
-
var CircularProgress = _interopDefault(require('@mui/material/CircularProgress'));
|
|
41
41
|
var Button$1 = _interopDefault(require('react-bootstrap/Button'));
|
|
42
42
|
var jwt_decode = _interopDefault(require('jwt-decode'));
|
|
43
43
|
|
|
@@ -923,7 +923,9 @@ var publicRequest = /*#__PURE__*/axios.create({
|
|
|
923
923
|
publicRequest.interceptors.response.use(function (response) {
|
|
924
924
|
return response;
|
|
925
925
|
}, function (error) {
|
|
926
|
-
|
|
926
|
+
var _error$response;
|
|
927
|
+
|
|
928
|
+
if ((error == null ? void 0 : (_error$response = error.response) == null ? void 0 : _error$response.status) === 401) {
|
|
927
929
|
if (isWindowDefined) {
|
|
928
930
|
window.localStorage.removeItem('auth_guest_token');
|
|
929
931
|
window.localStorage.removeItem('user_data');
|
|
@@ -931,7 +933,7 @@ publicRequest.interceptors.response.use(function (response) {
|
|
|
931
933
|
}
|
|
932
934
|
}
|
|
933
935
|
|
|
934
|
-
return error;
|
|
936
|
+
return Promise.reject(error);
|
|
935
937
|
});
|
|
936
938
|
publicRequest.interceptors.request.use(function (config) {
|
|
937
939
|
var guestToken = isWindowDefined ? window.localStorage.getItem('auth_guest_token') : null;
|
|
@@ -1457,7 +1459,7 @@ var setLoggedUserData = function setLoggedUserData(data) {
|
|
|
1457
1459
|
city: (data == null ? void 0 : data.city) || '',
|
|
1458
1460
|
country: (data == null ? void 0 : data.country) || '',
|
|
1459
1461
|
phone: (data == null ? void 0 : data.phone) || '',
|
|
1460
|
-
street_address: (data == null ? void 0 : data.
|
|
1462
|
+
street_address: (data == null ? void 0 : data.streetAddress) || '',
|
|
1461
1463
|
state: (data == null ? void 0 : data.state) || '',
|
|
1462
1464
|
zip: (data == null ? void 0 : data.zip) || (data == null ? void 0 : data.zipCode) || ''
|
|
1463
1465
|
};
|
|
@@ -1621,7 +1623,7 @@ var LogicRunner = function LogicRunner(_ref) {
|
|
|
1621
1623
|
|
|
1622
1624
|
fetchStates();
|
|
1623
1625
|
}, [values.country, setStates, setFieldValue]);
|
|
1624
|
-
var userDataEncoded = typeof window !== undefined ? window.localStorage.getItem('user_data') : '';
|
|
1626
|
+
var userDataEncoded = typeof window !== 'undefined' ? window.localStorage.getItem('user_data') : '';
|
|
1625
1627
|
React.useEffect(function () {
|
|
1626
1628
|
// set user data from local storage
|
|
1627
1629
|
var getStoredUserData = function getStoredUserData() {
|
|
@@ -1965,6 +1967,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
|
|
|
1965
1967
|
|
|
1966
1968
|
if (error != null && error.password) {
|
|
1967
1969
|
formikHelpers.setFieldError('password', error.password);
|
|
1970
|
+
formikHelpers.setFieldError('confirmPassword', error.password);
|
|
1968
1971
|
}
|
|
1969
1972
|
|
|
1970
1973
|
if (error != null && error.email) {
|
|
@@ -2020,6 +2023,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
|
|
|
2020
2023
|
}, "Login"))), _map(data, function (item) {
|
|
2021
2024
|
var id = item.id,
|
|
2022
2025
|
label = item.label,
|
|
2026
|
+
labelClassName = item.labelClassName,
|
|
2023
2027
|
fields = item.fields;
|
|
2024
2028
|
|
|
2025
2029
|
if (label === 'Ticket Holders' && !showTicketHolderName && !showDOB) {
|
|
@@ -2028,7 +2032,9 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
|
|
|
2028
2032
|
|
|
2029
2033
|
return React__default.createElement(SectionContainer, {
|
|
2030
2034
|
key: id
|
|
2031
|
-
}, React__default.createElement("p",
|
|
2035
|
+
}, React__default.createElement("p", {
|
|
2036
|
+
className: labelClassName
|
|
2037
|
+
}, label), _map(fields, function (group, index) {
|
|
2032
2038
|
var groupClassname = group.groupClassname,
|
|
2033
2039
|
groupItems = group.groupItems,
|
|
2034
2040
|
groupLabel = group.groupLabel,
|
|
@@ -2191,7 +2197,11 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2191
2197
|
error = _ref$error === void 0 ? null : _ref$error,
|
|
2192
2198
|
stripe_client_secret = _ref.stripe_client_secret,
|
|
2193
2199
|
currency = _ref.currency,
|
|
2194
|
-
billing_info = _ref.billing_info
|
|
2200
|
+
billing_info = _ref.billing_info,
|
|
2201
|
+
_ref$isLoading = _ref.isLoading,
|
|
2202
|
+
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
2203
|
+
_ref$handleSetLoading = _ref.handleSetLoading,
|
|
2204
|
+
handleSetLoading = _ref$handleSetLoading === void 0 ? function () {} : _ref$handleSetLoading;
|
|
2195
2205
|
var stripe = reactStripeJs.useStripe();
|
|
2196
2206
|
var elements = reactStripeJs.useElements();
|
|
2197
2207
|
|
|
@@ -2211,26 +2221,31 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2211
2221
|
while (1) {
|
|
2212
2222
|
switch (_context.prev = _context.next) {
|
|
2213
2223
|
case 0:
|
|
2214
|
-
|
|
2224
|
+
handleSetLoading(true);
|
|
2225
|
+
_context.prev = 1;
|
|
2215
2226
|
event.preventDefault();
|
|
2216
2227
|
|
|
2217
2228
|
if (postalCode) {
|
|
2218
|
-
_context.next =
|
|
2229
|
+
_context.next = 7;
|
|
2219
2230
|
break;
|
|
2220
2231
|
}
|
|
2221
2232
|
|
|
2222
2233
|
setStripeError("Please enter your zip code.");
|
|
2234
|
+
handleSetLoading(false);
|
|
2223
2235
|
return _context.abrupt("return");
|
|
2224
2236
|
|
|
2225
|
-
case
|
|
2237
|
+
case 7:
|
|
2226
2238
|
if (!(!stripe || !elements)) {
|
|
2227
|
-
_context.next =
|
|
2239
|
+
_context.next = 10;
|
|
2228
2240
|
break;
|
|
2229
2241
|
}
|
|
2230
2242
|
|
|
2243
|
+
// Stripe.js has not loaded yet. Make sure to disable
|
|
2244
|
+
// form submission until Stripe.js has loaded.
|
|
2245
|
+
handleSetLoading(false);
|
|
2231
2246
|
return _context.abrupt("return");
|
|
2232
2247
|
|
|
2233
|
-
case
|
|
2248
|
+
case 10:
|
|
2234
2249
|
card = elements.getElement(reactStripeJs.CardNumberElement);
|
|
2235
2250
|
address = {
|
|
2236
2251
|
city: billing_info.city,
|
|
@@ -2238,7 +2253,7 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2238
2253
|
state: billing_info.state,
|
|
2239
2254
|
postal_code: postalCode
|
|
2240
2255
|
};
|
|
2241
|
-
_context.next =
|
|
2256
|
+
_context.next = 14;
|
|
2242
2257
|
return stripe.createPaymentMethod({
|
|
2243
2258
|
type: 'card',
|
|
2244
2259
|
card: card || {
|
|
@@ -2249,51 +2264,53 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2249
2264
|
}
|
|
2250
2265
|
});
|
|
2251
2266
|
|
|
2252
|
-
case
|
|
2267
|
+
case 14:
|
|
2253
2268
|
paymentMethodReq = _context.sent;
|
|
2254
2269
|
|
|
2255
2270
|
if (!paymentMethodReq.error) {
|
|
2256
|
-
_context.next =
|
|
2271
|
+
_context.next = 19;
|
|
2257
2272
|
break;
|
|
2258
2273
|
}
|
|
2259
2274
|
|
|
2260
2275
|
setStripeError(paymentMethodReq.error.message || null);
|
|
2276
|
+
handleSetLoading(false);
|
|
2261
2277
|
return _context.abrupt("return");
|
|
2262
2278
|
|
|
2263
|
-
case
|
|
2264
|
-
_context.next =
|
|
2279
|
+
case 19:
|
|
2280
|
+
_context.next = 21;
|
|
2265
2281
|
return stripe.confirmCardPayment(stripe_client_secret, {
|
|
2266
2282
|
payment_method: paymentMethodReq.paymentMethod.id
|
|
2267
2283
|
});
|
|
2268
2284
|
|
|
2269
|
-
case
|
|
2285
|
+
case 21:
|
|
2270
2286
|
_yield$stripe$confirm = _context.sent;
|
|
2271
2287
|
_error = _yield$stripe$confirm.error;
|
|
2272
2288
|
|
|
2273
2289
|
if (!_error) {
|
|
2274
|
-
_context.next =
|
|
2290
|
+
_context.next = 27;
|
|
2275
2291
|
break;
|
|
2276
2292
|
}
|
|
2277
2293
|
|
|
2278
2294
|
setStripeError(_error.message);
|
|
2295
|
+
handleSetLoading(false);
|
|
2279
2296
|
return _context.abrupt("return");
|
|
2280
2297
|
|
|
2281
|
-
case
|
|
2298
|
+
case 27:
|
|
2282
2299
|
onSubmit(null);
|
|
2283
|
-
_context.next =
|
|
2300
|
+
_context.next = 33;
|
|
2284
2301
|
break;
|
|
2285
2302
|
|
|
2286
|
-
case
|
|
2287
|
-
_context.prev =
|
|
2288
|
-
_context.t0 = _context["catch"](
|
|
2303
|
+
case 30:
|
|
2304
|
+
_context.prev = 30;
|
|
2305
|
+
_context.t0 = _context["catch"](1);
|
|
2289
2306
|
onSubmit(_context.t0);
|
|
2290
2307
|
|
|
2291
|
-
case
|
|
2308
|
+
case 33:
|
|
2292
2309
|
case "end":
|
|
2293
2310
|
return _context.stop();
|
|
2294
2311
|
}
|
|
2295
2312
|
}
|
|
2296
|
-
}, _callee, null, [[
|
|
2313
|
+
}, _callee, null, [[1, 30]]);
|
|
2297
2314
|
}));
|
|
2298
2315
|
|
|
2299
2316
|
return function handleSubmit(_x) {
|
|
@@ -2305,7 +2322,18 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2305
2322
|
setPostalCode(e.target.value);
|
|
2306
2323
|
};
|
|
2307
2324
|
|
|
2308
|
-
|
|
2325
|
+
React.useEffect(function () {
|
|
2326
|
+
if (typeof window !== 'undefined') {
|
|
2327
|
+
var userData = JSON.parse(window.localStorage.getItem('user_data') || '');
|
|
2328
|
+
|
|
2329
|
+
var zipCode = _get(userData, 'zip', '');
|
|
2330
|
+
|
|
2331
|
+
zipCode && setPostalCode(zipCode);
|
|
2332
|
+
}
|
|
2333
|
+
}, []);
|
|
2334
|
+
return React__default.createElement("div", {
|
|
2335
|
+
className: "stripe_payment_container"
|
|
2336
|
+
}, !!stripeError && React__default.createElement("div", {
|
|
2309
2337
|
className: "checkout_error_block"
|
|
2310
2338
|
}, stripeError), React__default.createElement("form", {
|
|
2311
2339
|
onSubmit: handleSubmit
|
|
@@ -2345,9 +2373,9 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2345
2373
|
}))), React__default.createElement("div", {
|
|
2346
2374
|
className: "payment_button"
|
|
2347
2375
|
}, React__default.createElement("button", {
|
|
2348
|
-
disabled: !stripe || !!error,
|
|
2376
|
+
disabled: !stripe || !!error || isLoading,
|
|
2349
2377
|
type: "submit"
|
|
2350
|
-
}, "Pay " + getCurrencySymbolByCurrency(currency) + total))));
|
|
2378
|
+
}, isLoading ? React__default.createElement(CircularProgress, null) : "Pay " + getCurrencySymbolByCurrency(currency) + total))));
|
|
2351
2379
|
};
|
|
2352
2380
|
|
|
2353
2381
|
var testId = ENV.STRIPE_PUBLISHABLE_KEY ;
|
|
@@ -2393,6 +2421,10 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
2393
2421
|
error = _useState3[0],
|
|
2394
2422
|
setError = _useState3[1];
|
|
2395
2423
|
|
|
2424
|
+
var _useState4 = React.useState(false),
|
|
2425
|
+
paymentIsLoading = _useState4[0],
|
|
2426
|
+
setPaymentIsLoading = _useState4[1];
|
|
2427
|
+
|
|
2396
2428
|
var showFormTitle = Boolean(formTitle);
|
|
2397
2429
|
var showErrorText = Boolean(errorText);
|
|
2398
2430
|
React.useEffect(function () {
|
|
@@ -2457,38 +2489,40 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
2457
2489
|
_context2.prev = 0;
|
|
2458
2490
|
|
|
2459
2491
|
if (!error) {
|
|
2460
|
-
_context2.next =
|
|
2492
|
+
_context2.next = 4;
|
|
2461
2493
|
break;
|
|
2462
2494
|
}
|
|
2463
2495
|
|
|
2496
|
+
setPaymentIsLoading(false);
|
|
2464
2497
|
throw error;
|
|
2465
2498
|
|
|
2466
|
-
case
|
|
2499
|
+
case 4:
|
|
2467
2500
|
order_hash = reviewData.order_details.order_hash;
|
|
2468
|
-
_context2.next =
|
|
2501
|
+
_context2.next = 7;
|
|
2469
2502
|
return handlePaymentSuccess(order_hash);
|
|
2470
2503
|
|
|
2471
|
-
case
|
|
2504
|
+
case 7:
|
|
2472
2505
|
paymentSuccessResponse = _context2.sent;
|
|
2473
2506
|
|
|
2474
2507
|
if (paymentSuccessResponse.status === 200) {
|
|
2475
2508
|
handlePayment(paymentSuccessResponse);
|
|
2509
|
+
setPaymentIsLoading(false);
|
|
2476
2510
|
}
|
|
2477
2511
|
|
|
2478
|
-
_context2.next =
|
|
2512
|
+
_context2.next = 14;
|
|
2479
2513
|
break;
|
|
2480
2514
|
|
|
2481
|
-
case
|
|
2482
|
-
_context2.prev =
|
|
2515
|
+
case 11:
|
|
2516
|
+
_context2.prev = 11;
|
|
2483
2517
|
_context2.t0 = _context2["catch"](0);
|
|
2484
2518
|
setError(_get(_context2.t0, 'response.data.message'));
|
|
2485
2519
|
|
|
2486
|
-
case
|
|
2520
|
+
case 14:
|
|
2487
2521
|
case "end":
|
|
2488
2522
|
return _context2.stop();
|
|
2489
2523
|
}
|
|
2490
2524
|
}
|
|
2491
|
-
}, _callee2, null, [[0,
|
|
2525
|
+
}, _callee2, null, [[0, 11]]);
|
|
2492
2526
|
}));
|
|
2493
2527
|
|
|
2494
2528
|
return function handlePaymentMiddleWare(_x) {
|
|
@@ -2537,7 +2571,11 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
2537
2571
|
onSubmit: handlePaymentMiddleWare,
|
|
2538
2572
|
error: error,
|
|
2539
2573
|
currency: orderData.currency,
|
|
2540
|
-
billing_info: reviewData.billing_info
|
|
2574
|
+
billing_info: reviewData.billing_info,
|
|
2575
|
+
isLoading: paymentIsLoading,
|
|
2576
|
+
handleSetLoading: function handleSetLoading(value) {
|
|
2577
|
+
return setPaymentIsLoading(value);
|
|
2578
|
+
}
|
|
2541
2579
|
}))))));
|
|
2542
2580
|
};
|
|
2543
2581
|
|
|
@@ -2793,7 +2831,9 @@ var renderTiers = function renderTiers(boxOffice, selectedTickets, handleTicketS
|
|
|
2793
2831
|
className: "event-detail__tier-price"
|
|
2794
2832
|
}, ticketIsDiscounted && React__default.createElement("p", {
|
|
2795
2833
|
className: "old-price"
|
|
2796
|
-
}, "$ ", (+tier.oldPrice).toFixed(2)), React__default.createElement("p", null, isSoldOut ? 'SOLD OUT' : "$ " + (+tier.cost || +tier.price).toFixed(2))
|
|
2834
|
+
}, "$ ", (+tier.oldPrice).toFixed(2)), React__default.createElement("p", null, isSoldOut ? 'SOLD OUT' : "$ " + (+tier.cost || +tier.price).toFixed(2)), !isSoldOut && React__default.createElement("p", {
|
|
2835
|
+
className: 'fees'
|
|
2836
|
+
}, tier.taxesIncluded ? '(incl. Fees)' : '(excl. Fees)')), React__default.createElement("div", {
|
|
2797
2837
|
className: "event-detail__tier-state",
|
|
2798
2838
|
style: {
|
|
2799
2839
|
minWidth: 55
|
|
@@ -3008,14 +3048,19 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
3008
3048
|
return React__default.createElement("div", {
|
|
3009
3049
|
className: "get-tickets-page",
|
|
3010
3050
|
style: contentStyle
|
|
3011
|
-
}, isLoading ? React__default.createElement(Loader, null) : React__default.createElement("div", null, renderTiers(tickets, selectedTickets, handleTicketSelect, promoCodeIsApplied), promoCodeIsApplied
|
|
3051
|
+
}, isLoading ? React__default.createElement(Loader, null) : React__default.createElement("div", null, renderTiers(tickets, selectedTickets, handleTicketSelect, promoCodeIsApplied), promoCodeIsApplied ? React__default.createElement("div", {
|
|
3012
3052
|
className: "alert-info"
|
|
3013
|
-
}, "Your promo code was applied successfully."), showPromoInput && React__default.createElement("div", {
|
|
3053
|
+
}, "Your promo code was applied successfully.") : null, showPromoInput && React__default.createElement("div", {
|
|
3014
3054
|
className: "promo-code-block"
|
|
3015
3055
|
}, React__default.createElement("input", {
|
|
3016
3056
|
placeholder: "Promo Code",
|
|
3017
3057
|
onChange: function onChange(e) {
|
|
3018
3058
|
setPromoCode(e.target.value);
|
|
3059
|
+
},
|
|
3060
|
+
onKeyPress: function onKeyPress(event) {
|
|
3061
|
+
if (event.key === 'Enter') {
|
|
3062
|
+
setPromoCodeUpdated(promoCode);
|
|
3063
|
+
}
|
|
3019
3064
|
}
|
|
3020
3065
|
}), React__default.createElement(Button$1, {
|
|
3021
3066
|
className: "promo-apply-button",
|