tf-checkout-react 1.0.36 → 1.0.40

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.
@@ -21,7 +21,7 @@ interface IUserData {
21
21
  city?: string;
22
22
  country?: string;
23
23
  phone?: string;
24
- street_address?: string;
24
+ streetAddress?: string;
25
25
  state?: string;
26
26
  zip?: string;
27
27
  zipCode?: string;
@@ -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;
package/dist/env.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- export declare const ENV_TEST: {
1
+ export declare const ENV: {
2
2
  EVENT_ID: number;
3
3
  BASE_URL: string;
4
4
  CLIENT_ID: string;
5
5
  CLIENT_SECRET: string;
6
6
  STRIPE_PUBLISHABLE_KEY: string;
7
7
  };
8
- export declare const ENV: {
8
+ export declare const ENV_PROD: {
9
9
  EVENT_ID: number;
10
10
  BASE_URL: string;
11
11
  CLIENT_ID: string;
@@ -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}.style_group-label__2as-0{color:#000;font-size:24px;margin-bottom:0;margin-top:10px}.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_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;overflow:hidden;padding-right:20%;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}.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_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_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_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}
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
 
@@ -893,14 +893,13 @@ var requiredValidator = function requiredValidator(value) {
893
893
  };
894
894
 
895
895
  // preview1
896
-
897
896
  var ENV = {
898
- EVENT_ID: 9766,
899
- BASE_URL: 'https://www.ticketfairy.com/api',
900
- CLIENT_ID: 'e9d8f8922797b4621e562255afe90dbf',
897
+ EVENT_ID: 3483,
898
+ BASE_URL: 'https://preview1.ttf.fluxtech.me/api',
899
+ CLIENT_ID: '4792a61f2fcb49197ab4c2d2f44df570',
901
900
  CLIENT_SECRET: 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9',
902
- STRIPE_PUBLISHABLE_KEY: 'pk_live_51JucaXAnOd2Grid07FqHOkqcoh90bbCYL5bG7OuyM5RtzUoolrFcHroCWici0G9w0YpqO7qsGz6WP7K6HHYw1yhz00cm7fj5n5'
903
- };
901
+ STRIPE_PUBLISHABLE_KEY: 'pk_test_51H4BkOGqveRD6EShliLrT9vd7mPOBPvQSuqmvc3wIinDqxWsCLeS2N7HonPPn6MhjU35ayYy5v4I6MLlD4jNWrd000NSgAF6UL'
902
+ }; // prod
904
903
 
905
904
  var isWindowDefined = typeof window !== 'undefined';
906
905
  var ttfHeaders = {
@@ -920,6 +919,21 @@ var publicRequest = /*#__PURE__*/axios.create({
920
919
  baseURL: ENV.BASE_URL ,
921
920
  headers: ttfHeaders
922
921
  });
922
+ publicRequest.interceptors.response.use(function (response) {
923
+ return response;
924
+ }, function (error) {
925
+ var _error$response;
926
+
927
+ if ((error == null ? void 0 : (_error$response = error.response) == null ? void 0 : _error$response.status) === 401) {
928
+ if (isWindowDefined) {
929
+ window.localStorage.removeItem('auth_guest_token');
930
+ window.localStorage.removeItem('user_data');
931
+ window.localStorage.removeItem('access_token');
932
+ }
933
+ }
934
+
935
+ return Promise.reject(error);
936
+ });
923
937
  publicRequest.interceptors.request.use(function (config) {
924
938
  var guestToken = isWindowDefined ? window.localStorage.getItem('auth_guest_token') : null;
925
939
  var userData = isWindowDefined ? window.localStorage.getItem('user_data') : null;
@@ -1444,7 +1458,7 @@ var setLoggedUserData = function setLoggedUserData(data) {
1444
1458
  city: (data == null ? void 0 : data.city) || '',
1445
1459
  country: (data == null ? void 0 : data.country) || '',
1446
1460
  phone: (data == null ? void 0 : data.phone) || '',
1447
- street_address: (data == null ? void 0 : data.street_address) || '',
1461
+ street_address: (data == null ? void 0 : data.streetAddress) || '',
1448
1462
  state: (data == null ? void 0 : data.state) || '',
1449
1463
  zip: (data == null ? void 0 : data.zip) || (data == null ? void 0 : data.zipCode) || ''
1450
1464
  };
@@ -1560,7 +1574,9 @@ var getQueryVariable = function getQueryVariable(variable) {
1560
1574
  var LogicRunner = function LogicRunner(_ref) {
1561
1575
  var values = _ref.values,
1562
1576
  setStates = _ref.setStates,
1563
- setFieldValue = _ref.setFieldValue;
1577
+ setFieldValue = _ref.setFieldValue,
1578
+ setValues = _ref.setValues,
1579
+ setUserValues = _ref.setUserValues;
1564
1580
  React.useEffect(function () {
1565
1581
  var fetchStates = /*#__PURE__*/function () {
1566
1582
  var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
@@ -1606,6 +1622,43 @@ var LogicRunner = function LogicRunner(_ref) {
1606
1622
 
1607
1623
  fetchStates();
1608
1624
  }, [values.country, setStates, setFieldValue]);
1625
+ var userDataEncoded = typeof window !== 'undefined' ? window.localStorage.getItem('user_data') : '';
1626
+ React.useEffect(function () {
1627
+ // set user data from local storage
1628
+ var getStoredUserData = function getStoredUserData() {
1629
+ if (typeof window !== 'undefined') {
1630
+ if (userDataEncoded) {
1631
+ try {
1632
+ var parsedData = JSON.parse(userDataEncoded);
1633
+ var mappedValues = {
1634
+ firstName: (parsedData == null ? void 0 : parsedData.first_name) || '',
1635
+ lastName: parsedData == null ? void 0 : parsedData.last_name,
1636
+ email: (parsedData == null ? void 0 : parsedData.email) || '',
1637
+ phone: (parsedData == null ? void 0 : parsedData.phone) || '',
1638
+ confirmEmail: '',
1639
+ holderFirstName: '',
1640
+ holderLastName: '',
1641
+ holderAge: '',
1642
+ state: (parsedData == null ? void 0 : parsedData.state) || '',
1643
+ street_address: (parsedData == null ? void 0 : parsedData.street_address) || '',
1644
+ country: (parsedData == null ? void 0 : parsedData.country) || 1,
1645
+ zip: (parsedData == null ? void 0 : parsedData.zip) || '',
1646
+ brand_opt_in: (parsedData == null ? void 0 : parsedData.brand_opt_in) || '',
1647
+ city: (parsedData == null ? void 0 : parsedData.city) || '',
1648
+ confirmPassword: '',
1649
+ password: ''
1650
+ };
1651
+ setValues(mappedValues);
1652
+ setUserValues(mappedValues);
1653
+ } catch (e) {
1654
+ console.log(e);
1655
+ }
1656
+ }
1657
+ }
1658
+ };
1659
+
1660
+ getStoredUserData();
1661
+ }, [userDataEncoded, setValues, setUserValues]);
1609
1662
  return null;
1610
1663
  };
1611
1664
 
@@ -1808,43 +1861,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
1808
1861
 
1809
1862
  if (!(countries && countries.length)) {
1810
1863
  fetchCountries();
1811
- } // set user data from local storage
1812
-
1813
-
1814
- var getStoredUserData = function getStoredUserData() {
1815
- if (typeof window !== 'undefined') {
1816
- var _data = window.localStorage.getItem('user_data');
1817
-
1818
- if (_data) {
1819
- try {
1820
- var parsedData = JSON.parse(_data);
1821
- var mappedValues = {
1822
- firstName: (parsedData == null ? void 0 : parsedData.first_name) || '',
1823
- lastName: parsedData == null ? void 0 : parsedData.last_name,
1824
- email: (parsedData == null ? void 0 : parsedData.email) || '',
1825
- phone: (parsedData == null ? void 0 : parsedData.phone) || '',
1826
- confirmEmail: '',
1827
- holderFirstName: '',
1828
- holderLastName: '',
1829
- holderAge: '',
1830
- state: (parsedData == null ? void 0 : parsedData.state) || '',
1831
- street_address: (parsedData == null ? void 0 : parsedData.street_address) || '',
1832
- country: (parsedData == null ? void 0 : parsedData.country) || 1,
1833
- zip: (parsedData == null ? void 0 : parsedData.zip) || '',
1834
- brand_opt_in: (parsedData == null ? void 0 : parsedData.brand_opt_in) || '',
1835
- city: (parsedData == null ? void 0 : parsedData.city) || '',
1836
- confirmPassword: '',
1837
- password: ''
1838
- };
1839
- setUserValues(mappedValues);
1840
- } catch (e) {
1841
- console.log(e);
1842
- }
1843
- }
1844
- }
1845
- };
1846
-
1847
- getStoredUserData();
1864
+ }
1848
1865
  }, [access_token, countries]);
1849
1866
  return React__default.createElement(React__default.Fragment, null, React__default.createElement(formik.Formik, {
1850
1867
  initialValues: getInitialValues(data, _extends({}, initialValues, {
@@ -1949,6 +1966,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
1949
1966
 
1950
1967
  if (error != null && error.password) {
1951
1968
  formikHelpers.setFieldError('password', error.password);
1969
+ formikHelpers.setFieldError('confirmPassword', error.password);
1952
1970
  }
1953
1971
 
1954
1972
  if (error != null && error.email) {
@@ -1986,7 +2004,9 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
1986
2004
  }, React__default.createElement(LogicRunner, {
1987
2005
  values: props.values,
1988
2006
  setStates: setStates,
1989
- setFieldValue: props.setFieldValue
2007
+ setFieldValue: props.setFieldValue,
2008
+ setValues: props.setValues,
2009
+ setUserValues: setUserValues
1990
2010
  }), React__default.createElement("div", {
1991
2011
  className: "billing-info-container " + theme
1992
2012
  }, !isLoggedIn && React__default.createElement("div", {
@@ -2002,6 +2022,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
2002
2022
  }, "Login"))), _map(data, function (item) {
2003
2023
  var id = item.id,
2004
2024
  label = item.label,
2025
+ labelClassName = item.labelClassName,
2005
2026
  fields = item.fields;
2006
2027
 
2007
2028
  if (label === 'Ticket Holders' && !showTicketHolderName && !showDOB) {
@@ -2010,7 +2031,9 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
2010
2031
 
2011
2032
  return React__default.createElement(SectionContainer, {
2012
2033
  key: id
2013
- }, React__default.createElement("p", null, label), _map(fields, function (group, index) {
2034
+ }, React__default.createElement("p", {
2035
+ className: labelClassName
2036
+ }, label), _map(fields, function (group, index) {
2014
2037
  var groupClassname = group.groupClassname,
2015
2038
  groupItems = group.groupItems,
2016
2039
  groupLabel = group.groupLabel,
@@ -2173,7 +2196,11 @@ var CheckoutForm = function CheckoutForm(_ref) {
2173
2196
  error = _ref$error === void 0 ? null : _ref$error,
2174
2197
  stripe_client_secret = _ref.stripe_client_secret,
2175
2198
  currency = _ref.currency,
2176
- billing_info = _ref.billing_info;
2199
+ billing_info = _ref.billing_info,
2200
+ _ref$isLoading = _ref.isLoading,
2201
+ isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
2202
+ _ref$handleSetLoading = _ref.handleSetLoading,
2203
+ handleSetLoading = _ref$handleSetLoading === void 0 ? function () {} : _ref$handleSetLoading;
2177
2204
  var stripe = reactStripeJs.useStripe();
2178
2205
  var elements = reactStripeJs.useElements();
2179
2206
 
@@ -2193,26 +2220,31 @@ var CheckoutForm = function CheckoutForm(_ref) {
2193
2220
  while (1) {
2194
2221
  switch (_context.prev = _context.next) {
2195
2222
  case 0:
2196
- _context.prev = 0;
2223
+ handleSetLoading(true);
2224
+ _context.prev = 1;
2197
2225
  event.preventDefault();
2198
2226
 
2199
2227
  if (postalCode) {
2200
- _context.next = 5;
2228
+ _context.next = 7;
2201
2229
  break;
2202
2230
  }
2203
2231
 
2204
2232
  setStripeError("Please enter your zip code.");
2233
+ handleSetLoading(false);
2205
2234
  return _context.abrupt("return");
2206
2235
 
2207
- case 5:
2236
+ case 7:
2208
2237
  if (!(!stripe || !elements)) {
2209
- _context.next = 7;
2238
+ _context.next = 10;
2210
2239
  break;
2211
2240
  }
2212
2241
 
2242
+ // Stripe.js has not loaded yet. Make sure to disable
2243
+ // form submission until Stripe.js has loaded.
2244
+ handleSetLoading(false);
2213
2245
  return _context.abrupt("return");
2214
2246
 
2215
- case 7:
2247
+ case 10:
2216
2248
  card = elements.getElement(reactStripeJs.CardNumberElement);
2217
2249
  address = {
2218
2250
  city: billing_info.city,
@@ -2220,7 +2252,7 @@ var CheckoutForm = function CheckoutForm(_ref) {
2220
2252
  state: billing_info.state,
2221
2253
  postal_code: postalCode
2222
2254
  };
2223
- _context.next = 11;
2255
+ _context.next = 14;
2224
2256
  return stripe.createPaymentMethod({
2225
2257
  type: 'card',
2226
2258
  card: card || {
@@ -2231,51 +2263,53 @@ var CheckoutForm = function CheckoutForm(_ref) {
2231
2263
  }
2232
2264
  });
2233
2265
 
2234
- case 11:
2266
+ case 14:
2235
2267
  paymentMethodReq = _context.sent;
2236
2268
 
2237
2269
  if (!paymentMethodReq.error) {
2238
- _context.next = 15;
2270
+ _context.next = 19;
2239
2271
  break;
2240
2272
  }
2241
2273
 
2242
2274
  setStripeError(paymentMethodReq.error.message || null);
2275
+ handleSetLoading(false);
2243
2276
  return _context.abrupt("return");
2244
2277
 
2245
- case 15:
2246
- _context.next = 17;
2278
+ case 19:
2279
+ _context.next = 21;
2247
2280
  return stripe.confirmCardPayment(stripe_client_secret, {
2248
2281
  payment_method: paymentMethodReq.paymentMethod.id
2249
2282
  });
2250
2283
 
2251
- case 17:
2284
+ case 21:
2252
2285
  _yield$stripe$confirm = _context.sent;
2253
2286
  _error = _yield$stripe$confirm.error;
2254
2287
 
2255
2288
  if (!_error) {
2256
- _context.next = 22;
2289
+ _context.next = 27;
2257
2290
  break;
2258
2291
  }
2259
2292
 
2260
2293
  setStripeError(_error.message);
2294
+ handleSetLoading(false);
2261
2295
  return _context.abrupt("return");
2262
2296
 
2263
- case 22:
2297
+ case 27:
2264
2298
  onSubmit(null);
2265
- _context.next = 28;
2299
+ _context.next = 33;
2266
2300
  break;
2267
2301
 
2268
- case 25:
2269
- _context.prev = 25;
2270
- _context.t0 = _context["catch"](0);
2302
+ case 30:
2303
+ _context.prev = 30;
2304
+ _context.t0 = _context["catch"](1);
2271
2305
  onSubmit(_context.t0);
2272
2306
 
2273
- case 28:
2307
+ case 33:
2274
2308
  case "end":
2275
2309
  return _context.stop();
2276
2310
  }
2277
2311
  }
2278
- }, _callee, null, [[0, 25]]);
2312
+ }, _callee, null, [[1, 30]]);
2279
2313
  }));
2280
2314
 
2281
2315
  return function handleSubmit(_x) {
@@ -2287,7 +2321,18 @@ var CheckoutForm = function CheckoutForm(_ref) {
2287
2321
  setPostalCode(e.target.value);
2288
2322
  };
2289
2323
 
2290
- return React__default.createElement("div", null, !!stripeError && React__default.createElement("div", {
2324
+ React.useEffect(function () {
2325
+ if (typeof window !== 'undefined') {
2326
+ var userData = JSON.parse(window.localStorage.getItem('user_data') || '');
2327
+
2328
+ var zipCode = _get(userData, 'zip', '');
2329
+
2330
+ zipCode && setPostalCode(zipCode);
2331
+ }
2332
+ }, []);
2333
+ return React__default.createElement("div", {
2334
+ className: "stripe_payment_container"
2335
+ }, !!stripeError && React__default.createElement("div", {
2291
2336
  className: "checkout_error_block"
2292
2337
  }, stripeError), React__default.createElement("form", {
2293
2338
  onSubmit: handleSubmit
@@ -2327,9 +2372,9 @@ var CheckoutForm = function CheckoutForm(_ref) {
2327
2372
  }))), React__default.createElement("div", {
2328
2373
  className: "payment_button"
2329
2374
  }, React__default.createElement("button", {
2330
- disabled: !stripe || !!error,
2375
+ disabled: !stripe || !!error || isLoading,
2331
2376
  type: "submit"
2332
- }, "Pay " + getCurrencySymbolByCurrency(currency) + total))));
2377
+ }, isLoading ? React__default.createElement(CircularProgress, null) : "Pay " + getCurrencySymbolByCurrency(currency) + total))));
2333
2378
  };
2334
2379
 
2335
2380
  var testId = ENV.STRIPE_PUBLISHABLE_KEY ;
@@ -2375,6 +2420,10 @@ var PaymentContainer = function PaymentContainer(_ref) {
2375
2420
  error = _useState3[0],
2376
2421
  setError = _useState3[1];
2377
2422
 
2423
+ var _useState4 = React.useState(false),
2424
+ paymentIsLoading = _useState4[0],
2425
+ setPaymentIsLoading = _useState4[1];
2426
+
2378
2427
  var showFormTitle = Boolean(formTitle);
2379
2428
  var showErrorText = Boolean(errorText);
2380
2429
  React.useEffect(function () {
@@ -2439,38 +2488,40 @@ var PaymentContainer = function PaymentContainer(_ref) {
2439
2488
  _context2.prev = 0;
2440
2489
 
2441
2490
  if (!error) {
2442
- _context2.next = 3;
2491
+ _context2.next = 4;
2443
2492
  break;
2444
2493
  }
2445
2494
 
2495
+ setPaymentIsLoading(false);
2446
2496
  throw error;
2447
2497
 
2448
- case 3:
2498
+ case 4:
2449
2499
  order_hash = reviewData.order_details.order_hash;
2450
- _context2.next = 6;
2500
+ _context2.next = 7;
2451
2501
  return handlePaymentSuccess(order_hash);
2452
2502
 
2453
- case 6:
2503
+ case 7:
2454
2504
  paymentSuccessResponse = _context2.sent;
2455
2505
 
2456
2506
  if (paymentSuccessResponse.status === 200) {
2457
2507
  handlePayment(paymentSuccessResponse);
2508
+ setPaymentIsLoading(false);
2458
2509
  }
2459
2510
 
2460
- _context2.next = 13;
2511
+ _context2.next = 14;
2461
2512
  break;
2462
2513
 
2463
- case 10:
2464
- _context2.prev = 10;
2514
+ case 11:
2515
+ _context2.prev = 11;
2465
2516
  _context2.t0 = _context2["catch"](0);
2466
2517
  setError(_get(_context2.t0, 'response.data.message'));
2467
2518
 
2468
- case 13:
2519
+ case 14:
2469
2520
  case "end":
2470
2521
  return _context2.stop();
2471
2522
  }
2472
2523
  }
2473
- }, _callee2, null, [[0, 10]]);
2524
+ }, _callee2, null, [[0, 11]]);
2474
2525
  }));
2475
2526
 
2476
2527
  return function handlePaymentMiddleWare(_x) {
@@ -2519,7 +2570,11 @@ var PaymentContainer = function PaymentContainer(_ref) {
2519
2570
  onSubmit: handlePaymentMiddleWare,
2520
2571
  error: error,
2521
2572
  currency: orderData.currency,
2522
- billing_info: reviewData.billing_info
2573
+ billing_info: reviewData.billing_info,
2574
+ isLoading: paymentIsLoading,
2575
+ handleSetLoading: function handleSetLoading(value) {
2576
+ return setPaymentIsLoading(value);
2577
+ }
2523
2578
  }))))));
2524
2579
  };
2525
2580
 
@@ -2775,7 +2830,9 @@ var renderTiers = function renderTiers(boxOffice, selectedTickets, handleTicketS
2775
2830
  className: "event-detail__tier-price"
2776
2831
  }, ticketIsDiscounted && React__default.createElement("p", {
2777
2832
  className: "old-price"
2778
- }, "$ ", (+tier.oldPrice).toFixed(2)), React__default.createElement("p", null, isSoldOut ? 'SOLD OUT' : "$ " + (+tier.cost || +tier.price).toFixed(2))), React__default.createElement("div", {
2833
+ }, "$ ", (+tier.oldPrice).toFixed(2)), React__default.createElement("p", null, isSoldOut ? 'SOLD OUT' : "$ " + (+tier.cost || +tier.price).toFixed(2)), !isSoldOut && React__default.createElement("p", {
2834
+ className: 'fees'
2835
+ }, tier.taxesIncluded ? '(incl. Fees)' : '(excl. Fees)')), React__default.createElement("div", {
2779
2836
  className: "event-detail__tier-state",
2780
2837
  style: {
2781
2838
  minWidth: 55
@@ -2990,14 +3047,19 @@ var TicketsContainer = function TicketsContainer(_ref) {
2990
3047
  return React__default.createElement("div", {
2991
3048
  className: "get-tickets-page",
2992
3049
  style: contentStyle
2993
- }, isLoading ? React__default.createElement(Loader, null) : React__default.createElement("div", null, renderTiers(tickets, selectedTickets, handleTicketSelect, promoCodeIsApplied), promoCodeIsApplied && React__default.createElement("div", {
3050
+ }, isLoading ? React__default.createElement(Loader, null) : React__default.createElement("div", null, renderTiers(tickets, selectedTickets, handleTicketSelect, promoCodeIsApplied), promoCodeIsApplied ? React__default.createElement("div", {
2994
3051
  className: "alert-info"
2995
- }, "Your promo code was applied successfully."), showPromoInput && React__default.createElement("div", {
3052
+ }, "Your promo code was applied successfully.") : null, showPromoInput && React__default.createElement("div", {
2996
3053
  className: "promo-code-block"
2997
3054
  }, React__default.createElement("input", {
2998
3055
  placeholder: "Promo Code",
2999
3056
  onChange: function onChange(e) {
3000
3057
  setPromoCode(e.target.value);
3058
+ },
3059
+ onKeyPress: function onKeyPress(event) {
3060
+ if (event.key === 'Enter') {
3061
+ setPromoCodeUpdated(promoCode);
3062
+ }
3001
3063
  }
3002
3064
  }), React__default.createElement(Button$1, {
3003
3065
  className: "promo-apply-button",