tf-checkout-react 1.0.39 → 1.0.43
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/stripePayment/index.d.ts +3 -1
- package/dist/tf-checkout-react.cjs.development.css +3 -3
- package/dist/tf-checkout-react.cjs.development.js +73 -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 +76 -47
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/types/billing-info-data.d.ts +3 -1
- package/package.json +1 -1
- package/src/api/index.ts +2 -2
- package/src/components/billing-info-container/index.tsx +29 -15
- package/src/components/billing-info-container/style.css +8 -5
- package/src/components/loginModal/style.css +4 -0
- package/src/components/paymentContainer/index.tsx +5 -0
- package/src/components/stripePayment/index.tsx +23 -4
- package/src/components/ticketsContainer/index.tsx +3 -0
- package/src/components/ticketsContainer/style.css +17 -3
- package/src/types/billing-info-data.ts +3 -1
|
@@ -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
|
|
|
@@ -912,10 +912,6 @@ if (isWindowDefined && localStorage.getItem('auth_guest_token')) {
|
|
|
912
912
|
ttfHeaders['Authorization-Guest'] = /*#__PURE__*/localStorage.getItem('auth_guest_token');
|
|
913
913
|
}
|
|
914
914
|
|
|
915
|
-
if (isWindowDefined && window.location.origin !== 'https://www.houseofx.nyc' && window.location.origin !== 'https://tickets-staging.houseofx.nyc') {
|
|
916
|
-
ttfHeaders['X-Source-Origin'] = 'houseofx.com';
|
|
917
|
-
}
|
|
918
|
-
|
|
919
915
|
var publicRequest = /*#__PURE__*/axios.create({
|
|
920
916
|
baseURL: ENV.BASE_URL ,
|
|
921
917
|
headers: ttfHeaders
|
|
@@ -959,9 +955,7 @@ publicRequest.interceptors.request.use(function (config) {
|
|
|
959
955
|
}
|
|
960
956
|
|
|
961
957
|
if (isWindowDefined && window.location.origin !== 'https://www.houseofx.nyc' && window.location.origin !== 'https://tickets-staging.houseofx.nyc') {
|
|
962
|
-
var _updatedHeaders2 = _extends({}, config.headers
|
|
963
|
-
'X-Source-Origin': 'houseofx.com'
|
|
964
|
-
});
|
|
958
|
+
var _updatedHeaders2 = _extends({}, config.headers);
|
|
965
959
|
|
|
966
960
|
config.headers = _updatedHeaders2;
|
|
967
961
|
}
|
|
@@ -2023,6 +2017,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
|
|
|
2023
2017
|
}, "Login"))), _map(data, function (item) {
|
|
2024
2018
|
var id = item.id,
|
|
2025
2019
|
label = item.label,
|
|
2020
|
+
labelClassName = item.labelClassName,
|
|
2026
2021
|
fields = item.fields;
|
|
2027
2022
|
|
|
2028
2023
|
if (label === 'Ticket Holders' && !showTicketHolderName && !showDOB) {
|
|
@@ -2031,13 +2026,15 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
|
|
|
2031
2026
|
|
|
2032
2027
|
return React__default.createElement(SectionContainer, {
|
|
2033
2028
|
key: id
|
|
2034
|
-
}, React__default.createElement("p",
|
|
2029
|
+
}, React__default.createElement("p", {
|
|
2030
|
+
className: labelClassName
|
|
2031
|
+
}, label), _map(fields, function (group) {
|
|
2035
2032
|
var groupClassname = group.groupClassname,
|
|
2036
2033
|
groupItems = group.groupItems,
|
|
2037
2034
|
groupLabel = group.groupLabel,
|
|
2038
2035
|
groupLabelClassName = group.groupLabelClassName;
|
|
2039
|
-
return React__default.createElement(
|
|
2040
|
-
key:
|
|
2036
|
+
return React__default.createElement(SectionContainer, {
|
|
2037
|
+
key: group.id
|
|
2041
2038
|
}, !isLoggedIn && React__default.createElement("div", {
|
|
2042
2039
|
className: groupLabelClassName
|
|
2043
2040
|
}, groupLabel), React__default.createElement("div", {
|
|
@@ -2194,7 +2191,11 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2194
2191
|
error = _ref$error === void 0 ? null : _ref$error,
|
|
2195
2192
|
stripe_client_secret = _ref.stripe_client_secret,
|
|
2196
2193
|
currency = _ref.currency,
|
|
2197
|
-
billing_info = _ref.billing_info
|
|
2194
|
+
billing_info = _ref.billing_info,
|
|
2195
|
+
_ref$isLoading = _ref.isLoading,
|
|
2196
|
+
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
2197
|
+
_ref$handleSetLoading = _ref.handleSetLoading,
|
|
2198
|
+
handleSetLoading = _ref$handleSetLoading === void 0 ? function () {} : _ref$handleSetLoading;
|
|
2198
2199
|
var stripe = reactStripeJs.useStripe();
|
|
2199
2200
|
var elements = reactStripeJs.useElements();
|
|
2200
2201
|
|
|
@@ -2214,26 +2215,31 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2214
2215
|
while (1) {
|
|
2215
2216
|
switch (_context.prev = _context.next) {
|
|
2216
2217
|
case 0:
|
|
2217
|
-
|
|
2218
|
+
handleSetLoading(true);
|
|
2219
|
+
_context.prev = 1;
|
|
2218
2220
|
event.preventDefault();
|
|
2219
2221
|
|
|
2220
2222
|
if (postalCode) {
|
|
2221
|
-
_context.next =
|
|
2223
|
+
_context.next = 7;
|
|
2222
2224
|
break;
|
|
2223
2225
|
}
|
|
2224
2226
|
|
|
2225
2227
|
setStripeError("Please enter your zip code.");
|
|
2228
|
+
handleSetLoading(false);
|
|
2226
2229
|
return _context.abrupt("return");
|
|
2227
2230
|
|
|
2228
|
-
case
|
|
2231
|
+
case 7:
|
|
2229
2232
|
if (!(!stripe || !elements)) {
|
|
2230
|
-
_context.next =
|
|
2233
|
+
_context.next = 10;
|
|
2231
2234
|
break;
|
|
2232
2235
|
}
|
|
2233
2236
|
|
|
2237
|
+
// Stripe.js has not loaded yet. Make sure to disable
|
|
2238
|
+
// form submission until Stripe.js has loaded.
|
|
2239
|
+
handleSetLoading(false);
|
|
2234
2240
|
return _context.abrupt("return");
|
|
2235
2241
|
|
|
2236
|
-
case
|
|
2242
|
+
case 10:
|
|
2237
2243
|
card = elements.getElement(reactStripeJs.CardNumberElement);
|
|
2238
2244
|
address = {
|
|
2239
2245
|
city: billing_info.city,
|
|
@@ -2241,7 +2247,7 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2241
2247
|
state: billing_info.state,
|
|
2242
2248
|
postal_code: postalCode
|
|
2243
2249
|
};
|
|
2244
|
-
_context.next =
|
|
2250
|
+
_context.next = 14;
|
|
2245
2251
|
return stripe.createPaymentMethod({
|
|
2246
2252
|
type: 'card',
|
|
2247
2253
|
card: card || {
|
|
@@ -2252,51 +2258,53 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2252
2258
|
}
|
|
2253
2259
|
});
|
|
2254
2260
|
|
|
2255
|
-
case
|
|
2261
|
+
case 14:
|
|
2256
2262
|
paymentMethodReq = _context.sent;
|
|
2257
2263
|
|
|
2258
2264
|
if (!paymentMethodReq.error) {
|
|
2259
|
-
_context.next =
|
|
2265
|
+
_context.next = 19;
|
|
2260
2266
|
break;
|
|
2261
2267
|
}
|
|
2262
2268
|
|
|
2263
2269
|
setStripeError(paymentMethodReq.error.message || null);
|
|
2270
|
+
handleSetLoading(false);
|
|
2264
2271
|
return _context.abrupt("return");
|
|
2265
2272
|
|
|
2266
|
-
case
|
|
2267
|
-
_context.next =
|
|
2273
|
+
case 19:
|
|
2274
|
+
_context.next = 21;
|
|
2268
2275
|
return stripe.confirmCardPayment(stripe_client_secret, {
|
|
2269
2276
|
payment_method: paymentMethodReq.paymentMethod.id
|
|
2270
2277
|
});
|
|
2271
2278
|
|
|
2272
|
-
case
|
|
2279
|
+
case 21:
|
|
2273
2280
|
_yield$stripe$confirm = _context.sent;
|
|
2274
2281
|
_error = _yield$stripe$confirm.error;
|
|
2275
2282
|
|
|
2276
2283
|
if (!_error) {
|
|
2277
|
-
_context.next =
|
|
2284
|
+
_context.next = 27;
|
|
2278
2285
|
break;
|
|
2279
2286
|
}
|
|
2280
2287
|
|
|
2281
2288
|
setStripeError(_error.message);
|
|
2289
|
+
handleSetLoading(false);
|
|
2282
2290
|
return _context.abrupt("return");
|
|
2283
2291
|
|
|
2284
|
-
case
|
|
2292
|
+
case 27:
|
|
2285
2293
|
onSubmit(null);
|
|
2286
|
-
_context.next =
|
|
2294
|
+
_context.next = 33;
|
|
2287
2295
|
break;
|
|
2288
2296
|
|
|
2289
|
-
case
|
|
2290
|
-
_context.prev =
|
|
2291
|
-
_context.t0 = _context["catch"](
|
|
2297
|
+
case 30:
|
|
2298
|
+
_context.prev = 30;
|
|
2299
|
+
_context.t0 = _context["catch"](1);
|
|
2292
2300
|
onSubmit(_context.t0);
|
|
2293
2301
|
|
|
2294
|
-
case
|
|
2302
|
+
case 33:
|
|
2295
2303
|
case "end":
|
|
2296
2304
|
return _context.stop();
|
|
2297
2305
|
}
|
|
2298
2306
|
}
|
|
2299
|
-
}, _callee, null, [[
|
|
2307
|
+
}, _callee, null, [[1, 30]]);
|
|
2300
2308
|
}));
|
|
2301
2309
|
|
|
2302
2310
|
return function handleSubmit(_x) {
|
|
@@ -2308,6 +2316,15 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2308
2316
|
setPostalCode(e.target.value);
|
|
2309
2317
|
};
|
|
2310
2318
|
|
|
2319
|
+
React.useEffect(function () {
|
|
2320
|
+
if (typeof window !== 'undefined') {
|
|
2321
|
+
var userData = JSON.parse(window.localStorage.getItem('user_data') || '');
|
|
2322
|
+
|
|
2323
|
+
var zipCode = _get(userData, 'zip', '');
|
|
2324
|
+
|
|
2325
|
+
zipCode && setPostalCode(zipCode);
|
|
2326
|
+
}
|
|
2327
|
+
}, []);
|
|
2311
2328
|
return React__default.createElement("div", {
|
|
2312
2329
|
className: "stripe_payment_container"
|
|
2313
2330
|
}, !!stripeError && React__default.createElement("div", {
|
|
@@ -2350,9 +2367,9 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
2350
2367
|
}))), React__default.createElement("div", {
|
|
2351
2368
|
className: "payment_button"
|
|
2352
2369
|
}, React__default.createElement("button", {
|
|
2353
|
-
disabled: !stripe || !!error,
|
|
2370
|
+
disabled: !stripe || !!error || isLoading,
|
|
2354
2371
|
type: "submit"
|
|
2355
|
-
}, "Pay " + getCurrencySymbolByCurrency(currency) + total))));
|
|
2372
|
+
}, isLoading ? React__default.createElement(CircularProgress, null) : "Pay " + getCurrencySymbolByCurrency(currency) + total))));
|
|
2356
2373
|
};
|
|
2357
2374
|
|
|
2358
2375
|
var testId = ENV.STRIPE_PUBLISHABLE_KEY ;
|
|
@@ -2398,6 +2415,10 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
2398
2415
|
error = _useState3[0],
|
|
2399
2416
|
setError = _useState3[1];
|
|
2400
2417
|
|
|
2418
|
+
var _useState4 = React.useState(false),
|
|
2419
|
+
paymentIsLoading = _useState4[0],
|
|
2420
|
+
setPaymentIsLoading = _useState4[1];
|
|
2421
|
+
|
|
2401
2422
|
var showFormTitle = Boolean(formTitle);
|
|
2402
2423
|
var showErrorText = Boolean(errorText);
|
|
2403
2424
|
React.useEffect(function () {
|
|
@@ -2462,38 +2483,40 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
2462
2483
|
_context2.prev = 0;
|
|
2463
2484
|
|
|
2464
2485
|
if (!error) {
|
|
2465
|
-
_context2.next =
|
|
2486
|
+
_context2.next = 4;
|
|
2466
2487
|
break;
|
|
2467
2488
|
}
|
|
2468
2489
|
|
|
2490
|
+
setPaymentIsLoading(false);
|
|
2469
2491
|
throw error;
|
|
2470
2492
|
|
|
2471
|
-
case
|
|
2493
|
+
case 4:
|
|
2472
2494
|
order_hash = reviewData.order_details.order_hash;
|
|
2473
|
-
_context2.next =
|
|
2495
|
+
_context2.next = 7;
|
|
2474
2496
|
return handlePaymentSuccess(order_hash);
|
|
2475
2497
|
|
|
2476
|
-
case
|
|
2498
|
+
case 7:
|
|
2477
2499
|
paymentSuccessResponse = _context2.sent;
|
|
2478
2500
|
|
|
2479
2501
|
if (paymentSuccessResponse.status === 200) {
|
|
2480
2502
|
handlePayment(paymentSuccessResponse);
|
|
2503
|
+
setPaymentIsLoading(false);
|
|
2481
2504
|
}
|
|
2482
2505
|
|
|
2483
|
-
_context2.next =
|
|
2506
|
+
_context2.next = 14;
|
|
2484
2507
|
break;
|
|
2485
2508
|
|
|
2486
|
-
case
|
|
2487
|
-
_context2.prev =
|
|
2509
|
+
case 11:
|
|
2510
|
+
_context2.prev = 11;
|
|
2488
2511
|
_context2.t0 = _context2["catch"](0);
|
|
2489
2512
|
setError(_get(_context2.t0, 'response.data.message'));
|
|
2490
2513
|
|
|
2491
|
-
case
|
|
2514
|
+
case 14:
|
|
2492
2515
|
case "end":
|
|
2493
2516
|
return _context2.stop();
|
|
2494
2517
|
}
|
|
2495
2518
|
}
|
|
2496
|
-
}, _callee2, null, [[0,
|
|
2519
|
+
}, _callee2, null, [[0, 11]]);
|
|
2497
2520
|
}));
|
|
2498
2521
|
|
|
2499
2522
|
return function handlePaymentMiddleWare(_x) {
|
|
@@ -2542,7 +2565,11 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
2542
2565
|
onSubmit: handlePaymentMiddleWare,
|
|
2543
2566
|
error: error,
|
|
2544
2567
|
currency: orderData.currency,
|
|
2545
|
-
billing_info: reviewData.billing_info
|
|
2568
|
+
billing_info: reviewData.billing_info,
|
|
2569
|
+
isLoading: paymentIsLoading,
|
|
2570
|
+
handleSetLoading: function handleSetLoading(value) {
|
|
2571
|
+
return setPaymentIsLoading(value);
|
|
2572
|
+
}
|
|
2546
2573
|
}))))));
|
|
2547
2574
|
};
|
|
2548
2575
|
|
|
@@ -2798,7 +2825,9 @@ var renderTiers = function renderTiers(boxOffice, selectedTickets, handleTicketS
|
|
|
2798
2825
|
className: "event-detail__tier-price"
|
|
2799
2826
|
}, ticketIsDiscounted && React__default.createElement("p", {
|
|
2800
2827
|
className: "old-price"
|
|
2801
|
-
}, "$ ", (+tier.oldPrice).toFixed(2)), React__default.createElement("p", null, isSoldOut ? 'SOLD OUT' : "$ " + (+tier.cost || +tier.price).toFixed(2))
|
|
2828
|
+
}, "$ ", (+tier.oldPrice).toFixed(2)), React__default.createElement("p", null, isSoldOut ? 'SOLD OUT' : "$ " + (+tier.cost || +tier.price).toFixed(2)), !isSoldOut && React__default.createElement("p", {
|
|
2829
|
+
className: 'fees'
|
|
2830
|
+
}, tier.taxesIncluded ? '(incl. Fees)' : '(excl. Fees)')), React__default.createElement("div", {
|
|
2802
2831
|
className: "event-detail__tier-state",
|
|
2803
2832
|
style: {
|
|
2804
2833
|
minWidth: 55
|