tf-checkout-react 1.0.50 → 1.0.51

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.
@@ -1,3 +1,4 @@
1
+ import { IGroupItem } from '../../types';
1
2
  export interface ILoggedInValues {
2
3
  emailLogged?: string;
3
4
  firstNameLogged?: string;
@@ -31,6 +32,7 @@ export declare const setLoggedUserData: (data: IUserData) => {
31
32
  first_name: string;
32
33
  last_name: string;
33
34
  email: string;
35
+ confirmEmail: string;
34
36
  city: string;
35
37
  country: string;
36
38
  phone: string;
@@ -39,4 +41,8 @@ export declare const setLoggedUserData: (data: IUserData) => {
39
41
  zip: string;
40
42
  };
41
43
  export declare const createCheckoutDataBody: (ticketsQuantity: number, values?: IValues, logedInValues?: ILoggedInValues, includeDob?: boolean) => ICheckoutBody;
44
+ export declare const getValidateFunctions: (element: IGroupItem, states: {
45
+ [key: string]: any;
46
+ }[]) => (...value: any) => any;
47
+ export declare const assingUniqueIds: (data: any) => any;
42
48
  export {};
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ import { FieldInputProps, FormikProps } from 'formik';
3
+ export interface ISelectOption {
4
+ label: string | number;
5
+ value?: string | number;
6
+ [key: string]: any;
7
+ }
8
+ export interface ISelectField {
9
+ label: string;
10
+ field: FieldInputProps<any>;
11
+ form: FormikProps<any>;
12
+ theme: 'dark' | 'light';
13
+ type?: string;
14
+ selectOptions?: ISelectOption[];
15
+ }
16
+ interface IOtherProps {
17
+ [key: string]: any;
18
+ }
19
+ export declare const SelectField: ({ label, type, field, selectOptions, form: { touched, errors }, theme, }: ISelectField & IOtherProps) => JSX.Element;
20
+ export {};
@@ -1,8 +1,8 @@
1
- .style_button-container__2bhts{display:flex;justify-content:center;padding:20px}.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}@media only screen and (max-width:820px){.style_billing-info-container__3ZE3J{width:90%}.style_billing-info-container__3ZE3J .style_main-header__2OFWa{font-size:1.5rem}}
1
+ .style_button-container__2bhts{display:flex;justify-content:center;padding:20px}.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}@media only screen and (max-width:820px){.style_billing-info-container__3ZE3J{width:90%}.style_billing-info-container__3ZE3J .style_main-header__2OFWa{font-size:1.5rem}}.style_email-checking__yKzPA{margin-bottom:15px}
2
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
- .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}.style_conditions-block__3XPwW{background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05);padding:19px}
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_disabled-payment-button__3MiUR button{opacity:.3;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.style_checkout_error_block__3LUN5{color:#e53935;font-weight:600;padding:15px 0}.style_zip_element__31oFa p{margin-bottom:0}.style_zip_element__31oFa input{background-color:#232323;border:none;color:#fff;font-size:18px;margin-top:5px;outline:none;width:100%}
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
+ .style_card_form_inner__7vzGq{background:#232323;border-radius:8px;margin:0 auto 20px;min-width:325px;padding:15px;width:50%}.style_card_form_inner__7vzGq .style_card_label_text__F7GFa{color:#fff}.style_card_form_inner__7vzGq .style_StripeElement__jS5TJ{margin:5px 0 10px}.style_card_label_text__F7GFa{color:#fff}.style_payment_button__2rkp8{padding-top:15px;text-align:center}.style_payment_button__2rkp8 button{background-color:#212529;border-radius:8px;color:#fff;cursor:pointer;font-size:26px;padding:15px 30px;transition:opacity .5s;width:200px}.style_payment_button__2rkp8 button:hover{opacity:.7}.style_disabled-payment-button__3MiUR button{opacity:.3;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.style_checkout_error_block__3LUN5{color:#e53935;font-weight:600;padding:15px 0}.style_zip_element__31oFa p{margin-bottom:0}.style_zip_element__31oFa input{background-color:#232323;border:none;color:#fff;font-size:18px;margin-top:5px;outline:none;width:100%}
6
6
  .style_confirmation-page__1F9Sh{margin:0 auto;max-width:1024px}.style_confirmation-page__1F9Sh .style_strong-text__27fPG{font-weight:700}.style_confirmation-page__1F9Sh .style_title__2Al5H{color:#333;font-size:24px;font-weight:600}.style_confirmation-page__1F9Sh .style_share-message-section__3tRfP{background:#dff0d8;border:1px solid #d6e9c6;border-radius:5px;color:#2c7221;display:flex;flex-direction:column;margin:20px 0;padding:15px}.style_confirmation-page__1F9Sh .style_main__3LBFA{font-size:15px;font-weight:700}.style_confirmation-page__1F9Sh .style_helper__3L5l6,.style_confirmation-page__1F9Sh .style_main__3LBFA{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif}.style_confirmation-page__1F9Sh .style_helper__3L5l6{font-size:14px;margin-top:5px}.style_confirmation-page__1F9Sh .style_referral_text_image_section__1shCe{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin:20px -10px}.style_confirmation-page__1F9Sh .style_referral_text_image_section__1shCe .style_referral_text_section__3dvbC{margin:10px}.style_confirmation-page__1F9Sh .style_referral_text_image_section__1shCe .style_referral_title_text__1zFZX{color:#f08057;font-size:28px;padding-bottom:10px}.style_confirmation-page__1F9Sh .style_referral_text_image_section__1shCe .style_referral_text__2tAKA{font-size:18px}.style_confirmation-page__1F9Sh .style_referral_text_image_section__1shCe img{margin:10px;max-width:200px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz{-moz-column-gap:5rem;column-gap:5rem;display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));margin:10px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_invitation_title__x4iqi{font-size:22px;padding-bottom:12px;padding-top:12px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2{display:flex;flex-wrap:wrap;justify-content:space-between;margin:0 -10px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z{flex:1 1;padding:0 5px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share_buttons__2C4eT{display:grid;flex-wrap:wrap;margin:0 -7px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share_buttons__2C4eT .style_social-media-btns__2kCat{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share_buttons__2C4eT .style_social-media-btns__2kCat .style_sharing-btn__IVnek{min-width:130px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share-btn-inner__2HBGQ.style_share-by-link-copy__25qUa{padding:0;text-align:left}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_sharing-button__3R2yU{flex:1 1}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_convenient_buttons__2RFH8.style_sharing-btn__IVnek{display:inline}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share-by-link__2B83J{background:#000;color:#fff;padding:0}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share-by-link__2B83J.style_label__3FIno{margin:0;padding:0;text-align:left}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_sharing-btn__IVnek{flex:1 1;padding:7px;text-align:center}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share-btn-inner__2HBGQ{background:#000;color:#fff;padding:10px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share-btn-inner__2HBGQ .style_svg_wrapper__268DZ{display:inline}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share-btn-inner__2HBGQ .style_share-input__2Pp7g{background-color:#fff;text-align:left;width:300px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share-text__V36JV{display:block;font-size:13px;font-weight:600;padding-top:8px;width:100%}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_pricing-section_wrapper__1aDnf{background:#e3e3e3;border:1px solid #dcdcdc;display:grid;grid-template-columns:1fr 1fr;margin:10px 0;padding:15px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_pricing-section_wrapper__1aDnf.style_free_price__3Hd0-{background:#e9835b;border:1px solid #eb7b4a;color:#fff}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_pricing-section_label__3SVoy{font-weight:600}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_pricing-section_sublabel__2Ckqd{font-size:14px;font-weight:100}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_pricing-section_price__3v8bL{font-weight:600;text-align:right}
7
7
  body{margin:0;padding:0}.style_get-tickets-page__11KeR{width:100%}.style_event-detail__tier__2CcMs{background-color:#fff;padding:17px 35px 20px}.style_event-detail__tier-name__116US{color:#000;font-family:Inter-Bold;font-family:Bebas Neue;font-size:.85rem;font-weight:700;letter-spacing:.2em;line-height:1.3;margin-bottom:8px;margin-top:16px;padding-right:20%;text-transform:uppercase}.style_event-detail__tier-status__IbqO1{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;margin-top:8px;width:100%}.style_event-detail__tier-status__IbqO1.style_ticket-button__Nty1u{background-color:#212529;border:3px solid #000;border-radius:0;color:#fff;cursor:pointer;font-weight:700;letter-spacing:.2em;line-height:1.5;margin-bottom:10px;width:200px}.style_event-tickets-container__3vdaQ{align-items:center;display:flex;justify-content:space-between}.style_event-detail__tier-status__IbqO1.style_ticket-button__Nty1u.style_true__g6yhC{background-color:#c1c3c6;border-color:#afb0b1}.style_event-detail__tier-price__3doIb{color:#000;font-family:Inter-Bold;font-size:1.5rem;font-weight:700;line-height:1;text-align:center}.style_event-detail__tier-price__3doIb p{margin:0}.style_event-detail__tier-price__3doIb .style_fees__19QjH{font-size:14px;font-weight:400;margin-top:4px;text-align:left}.style_event-detail__tier-price__3doIb .style_old-price__2mSOJ{color:red;font-size:1.3rem;margin-bottom:5px;text-decoration:line-through}.style_alert-info__24Mx5{background-color:#d9edf7;border:1px solid #bce8f1;border-radius:4px;color:#3a87ad;font-size:1em;margin:0 35px;padding:8px 15px;text-align:center;text-shadow:0 1px 0 hsla(0,0%,100%,.5)}.style_event-detail__tier-state__2ethF{color:#30bc9d;font-family:Inter-Bold;font-size:.75rem;font-weight:300;line-height:1;text-align:right;text-transform:uppercase}.style_promo-code-block__ttqVr input{font-size:14px;padding:1px 8px}.style_book-button__1krJI{background-color:#212529;border:3px solid #000;border-radius:0;color:#fff;cursor:pointer;display:block;font-size:26px;font-weight:700;height:50px;letter-spacing:.2em;line-height:1.5;margin:25px auto 10px;text-align:center;width:100%}.style_book-button__1krJI:hover{background-color:#505050;border-color:#505050}.style_loader-container__3iPe2{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.style_get-tickets-paper__3ZF-f::-webkit-scrollbar{width:5px}.style_get-tickets-paper__3ZF-f::-webkit-scrollbar-track{background:#f1f1f1}.style_get-tickets-paper__3ZF-f::-webkit-scrollbar-thumb{background:#888}.style_get-tickets-paper__3ZF-f::-webkit-scrollbar-thumb:hover{background:#555}.style_get-tickets__3Sghy .style_get-tickets__selectbox__2ApAj{width:100%}.style_disabled__310xq{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.style_hidden__ceCor{display:none}
8
8
  .style_waiting-list__2sJxM{padding:17px 35px 20px}.style_waiting-list__2sJxM .style_field-item__34MYc{margin-bottom:30px}.style_waiting-list__2sJxM .style_waiting-list-button__tO7D2{width:100%!important}.style_waiting-list__2sJxM .style_waiting-list-button__tO7D2:hover{background-color:#505050}.style_waiting-list__2sJxM .style_success-message__BvF3R h3{margin:10px 0}.style_waiting-list__2sJxM .style_success-message__BvF3R p{margin:0}
@@ -18,12 +18,14 @@ var Modal = _interopDefault(require('@mui/material/Modal'));
18
18
  var Box = _interopDefault(require('@mui/material/Box'));
19
19
  var _forEach = _interopDefault(require('lodash/forEach'));
20
20
  var _flatMapDeep = _interopDefault(require('lodash/flatMapDeep'));
21
+ var _isArray = _interopDefault(require('lodash/isArray'));
22
+ var nanoid = require('nanoid');
21
23
  var TextField = _interopDefault(require('@mui/material/TextField'));
22
24
  var styles = require('@mui/styles');
23
25
  var FormGroup = _interopDefault(require('@mui/material/FormGroup'));
24
26
  var FormControlLabel = _interopDefault(require('@mui/material/FormControlLabel'));
25
27
  var Checkbox = _interopDefault(require('@mui/material/Checkbox'));
26
- var nanoid = require('nanoid');
28
+ var Select = _interopDefault(require('@mui/material/Select'));
27
29
  var Container = _interopDefault(require('@mui/material/Container'));
28
30
  var Alert = _interopDefault(require('@mui/material/Alert'));
29
31
  var reactStripeJs = require('@stripe/react-stripe-js');
@@ -39,7 +41,6 @@ var _sortBy = _interopDefault(require('lodash/sortBy'));
39
41
  var _has = _interopDefault(require('lodash/has'));
40
42
  var FormControl = _interopDefault(require('@mui/material/FormControl'));
41
43
  var MenuItem = _interopDefault(require('@mui/material/MenuItem'));
42
- var Select = _interopDefault(require('@mui/material/Select'));
43
44
  var Button$1 = _interopDefault(require('@mui/material/Button'));
44
45
 
45
46
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
@@ -96,6 +97,22 @@ function _extends() {
96
97
  return _extends.apply(this, arguments);
97
98
  }
98
99
 
100
+ function _inheritsLoose(subClass, superClass) {
101
+ subClass.prototype = Object.create(superClass.prototype);
102
+ subClass.prototype.constructor = subClass;
103
+
104
+ _setPrototypeOf(subClass, superClass);
105
+ }
106
+
107
+ function _setPrototypeOf(o, p) {
108
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
109
+ o.__proto__ = p;
110
+ return o;
111
+ };
112
+
113
+ return _setPrototypeOf(o, p);
114
+ }
115
+
99
116
  function _objectWithoutPropertiesLoose(source, excluded) {
100
117
  if (source == null) return {};
101
118
  var target = {};
@@ -1530,6 +1547,7 @@ var setLoggedUserData = function setLoggedUserData(data) {
1530
1547
  first_name: data.firstName,
1531
1548
  last_name: data.lastName,
1532
1549
  email: data.email,
1550
+ confirmEmail: data.email,
1533
1551
  city: (data == null ? void 0 : data.city) || '',
1534
1552
  country: (data == null ? void 0 : data.country) || '',
1535
1553
  phone: (data == null ? void 0 : data.phone) || '',
@@ -1610,6 +1628,38 @@ var createCheckoutDataBody = function createCheckoutDataBody(ticketsQuantity, va
1610
1628
 
1611
1629
  return body;
1612
1630
  };
1631
+ var getValidateFunctions = function getValidateFunctions(element, states) {
1632
+ var validationFunctions = [];
1633
+
1634
+ if (element.required) {
1635
+ if (element.name !== 'state' || element.name === 'state' && states.length) {
1636
+ validationFunctions.push(requiredValidator);
1637
+ }
1638
+ }
1639
+
1640
+ if (element.onValidate) {
1641
+ validationFunctions.push(element.onValidate);
1642
+ }
1643
+
1644
+ return combineValidators.apply(void 0, validationFunctions);
1645
+ };
1646
+ var assingUniqueIds = function assingUniqueIds(data) {
1647
+ if (_get(data[0], 'uniqueId')) {
1648
+ return data;
1649
+ }
1650
+
1651
+ return _map(data, function (item) {
1652
+ _forEach(item, function (itemValue, key) {
1653
+ if (_isArray(itemValue)) {
1654
+ item[key] = assingUniqueIds(itemValue);
1655
+ }
1656
+ });
1657
+
1658
+ return _extends({}, item, {
1659
+ uniqueId: nanoid.nanoid()
1660
+ });
1661
+ });
1662
+ };
1613
1663
 
1614
1664
  var useStyles = /*#__PURE__*/styles.makeStyles({
1615
1665
  input: {
@@ -1631,10 +1681,10 @@ var CustomField = function CustomField(_ref) {
1631
1681
  theme = _ref.theme;
1632
1682
  var isSelectField = type === 'select';
1633
1683
  var isShrink = Boolean(field.value) || type === 'date' || type === 'select';
1634
- var isTouched = Boolean(_get(touched, field.name));
1635
1684
 
1636
1685
  var error = _get(errors, field.name);
1637
1686
 
1687
+ var isTouched = Boolean(_get(touched, field.name)) || _includes(field.name, 'holder') && !!error;
1638
1688
  var classes = useStyles();
1639
1689
  return React__default.createElement(TextField, Object.assign({
1640
1690
  id: field.name,
@@ -1697,6 +1747,101 @@ var getQueryVariable = function getQueryVariable(variable) {
1697
1747
  return false;
1698
1748
  };
1699
1749
 
1750
+ var useStyles$1 = /*#__PURE__*/styles.makeStyles({
1751
+ input: {
1752
+ '&::placeholder': {
1753
+ color: 'gray'
1754
+ }
1755
+ }
1756
+ });
1757
+ var SelectField = function SelectField(_ref) {
1758
+ var label = _ref.label,
1759
+ _ref$type = _ref.type,
1760
+ type = _ref$type === void 0 ? 'text' : _ref$type,
1761
+ field = _ref.field,
1762
+ _ref$selectOptions = _ref.selectOptions,
1763
+ selectOptions = _ref$selectOptions === void 0 ? [] : _ref$selectOptions,
1764
+ _ref$form = _ref.form,
1765
+ touched = _ref$form.touched,
1766
+ errors = _ref$form.errors,
1767
+ theme = _ref.theme;
1768
+ var isTouched = Boolean(_get(touched, field.name));
1769
+
1770
+ var error = _get(errors, field.name);
1771
+
1772
+ var classes = useStyles$1();
1773
+ return React__default.createElement(material.FormControl, {
1774
+ fullWidth: true
1775
+ }, React__default.createElement(material.InputLabel, {
1776
+ htmlFor: field.name,
1777
+ error: !!error && isTouched
1778
+ }, label), React__default.createElement(Select, Object.assign({
1779
+ id: field.name,
1780
+ label: label,
1781
+ type: type,
1782
+ fullWidth: true,
1783
+ error: !!error && isTouched,
1784
+ inputProps: {
1785
+ id: field.name,
1786
+ classes: {
1787
+ input: classes.input
1788
+ }
1789
+ },
1790
+ "native": true,
1791
+ className: theme,
1792
+ MenuProps: {
1793
+ className: theme
1794
+ }
1795
+ }, field), _map(selectOptions, function (option) {
1796
+ return React__default.createElement("option", {
1797
+ key: option.value,
1798
+ value: option.value,
1799
+ disabled: option.disabled
1800
+ }, option.label);
1801
+ })), isTouched && error ? React__default.createElement(material.FormHelperText, {
1802
+ error: !!error && isTouched
1803
+ }, error) : null);
1804
+ };
1805
+
1806
+ var ErrorFocusInternal = /*#__PURE__*/function (_Component) {
1807
+ _inheritsLoose(ErrorFocusInternal, _Component);
1808
+
1809
+ function ErrorFocusInternal() {
1810
+ var _this;
1811
+
1812
+ _this = _Component.apply(this, arguments) || this;
1813
+
1814
+ _this.render = function () {
1815
+ return null;
1816
+ };
1817
+
1818
+ return _this;
1819
+ }
1820
+
1821
+ var _proto = ErrorFocusInternal.prototype;
1822
+
1823
+ _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
1824
+ var _prevProps$formik = prevProps.formik,
1825
+ isSubmitting = _prevProps$formik.isSubmitting,
1826
+ isValidating = _prevProps$formik.isValidating,
1827
+ errors = _prevProps$formik.errors;
1828
+ var keys = Object.keys(errors);
1829
+
1830
+ if (keys.length > 0 && isSubmitting && !isValidating) {
1831
+ var selector = "[name=\"" + keys[0] + "\"]";
1832
+ var errorElement = document.querySelector(selector);
1833
+
1834
+ if (errorElement) {
1835
+ errorElement.focus();
1836
+ }
1837
+ }
1838
+ };
1839
+
1840
+ return ErrorFocusInternal;
1841
+ }(React.Component);
1842
+
1843
+ var ErrorFocus = /*#__PURE__*/formik.connect(ErrorFocusInternal);
1844
+
1700
1845
  var LogicRunner = function LogicRunner(_ref) {
1701
1846
  var values = _ref.values,
1702
1847
  setStates = _ref.setStates,
@@ -1768,7 +1913,7 @@ var LogicRunner = function LogicRunner(_ref) {
1768
1913
  lastName: parsedData == null ? void 0 : parsedData.last_name,
1769
1914
  email: (parsedData == null ? void 0 : parsedData.email) || '',
1770
1915
  phone: (parsedData == null ? void 0 : parsedData.phone) || '',
1771
- confirmEmail: '',
1916
+ confirmEmail: (parsedData == null ? void 0 : parsedData.email) || '',
1772
1917
  state: (parsedData == null ? void 0 : parsedData.state) || '',
1773
1918
  street_address: (parsedData == null ? void 0 : parsedData.street_address) || '',
1774
1919
  country: (parsedData == null ? void 0 : parsedData.country) || 1,
@@ -1837,39 +1982,43 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
1837
1982
  var userData = typeof window !== 'undefined' && window.localStorage.getItem('user_data') ? JSON.parse(window.localStorage.getItem('user_data') || '') : {};
1838
1983
  var access_token = typeof window !== 'undefined' && window.localStorage.getItem('access_token') ? window.localStorage.getItem('access_token') || '' : '';
1839
1984
 
1840
- var _useState = React.useState({}),
1841
- cartInfoData = _useState[0],
1842
- setCartInfo = _useState[1];
1985
+ var _useState = React.useState(data),
1986
+ dataWithUniqueIds = _useState[0],
1987
+ setDataWithUniqueIds = _useState[1];
1843
1988
 
1844
- var _useState2 = React.useState([]),
1845
- countries = _useState2[0],
1846
- setCountries = _useState2[1];
1989
+ var _useState2 = React.useState({}),
1990
+ cartInfoData = _useState2[0],
1991
+ setCartInfo = _useState2[1];
1847
1992
 
1848
1993
  var _useState3 = React.useState([]),
1849
- states = _useState3[0],
1850
- setStates = _useState3[1];
1994
+ countries = _useState3[0],
1995
+ setCountries = _useState3[1];
1851
1996
 
1852
- var _useState4 = React.useState(false),
1853
- showModalLogin = _useState4[0],
1854
- setShowModalLogin = _useState4[1];
1997
+ var _useState4 = React.useState([]),
1998
+ states = _useState4[0],
1999
+ setStates = _useState4[1];
1855
2000
 
1856
2001
  var _useState5 = React.useState(false),
1857
- alreadyHasUser = _useState5[0],
1858
- setAlreadyHasUser = _useState5[1];
2002
+ showModalLogin = _useState5[0],
2003
+ setShowModalLogin = _useState5[1];
1859
2004
 
1860
2005
  var _useState6 = React.useState(false),
1861
- userExpired = _useState6[0],
1862
- setUserExpired = _useState6[1];
2006
+ alreadyHasUser = _useState6[0],
2007
+ setAlreadyHasUser = _useState6[1];
1863
2008
 
1864
2009
  var _useState7 = React.useState(false),
1865
- showModalRegister = _useState7[0],
1866
- setShowModalRegister = _useState7[1];
2010
+ userExpired = _useState7[0],
2011
+ setUserExpired = _useState7[1];
2012
+
2013
+ var _useState8 = React.useState(false),
2014
+ showModalRegister = _useState8[0],
2015
+ setShowModalRegister = _useState8[1];
1867
2016
 
1868
- var _useState8 = React.useState([]),
1869
- ticketsQuantity = _useState8[0],
1870
- setTicketsQuantity = _useState8[1];
2017
+ var _useState9 = React.useState([]),
2018
+ ticketsQuantity = _useState9[0],
2019
+ setTicketsQuantity = _useState9[1];
1871
2020
 
1872
- var _useState9 = React.useState({
2021
+ var _useState10 = React.useState({
1873
2022
  firstName: '',
1874
2023
  lastName: '',
1875
2024
  email: '',
@@ -1884,8 +2033,8 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
1884
2033
  state: '',
1885
2034
  zip: ''
1886
2035
  }),
1887
- userValues = _useState9[0],
1888
- setUserValues = _useState9[1];
2036
+ userValues = _useState10[0],
2037
+ setUserValues = _useState10[1];
1889
2038
 
1890
2039
  var isLoggedIn = !!access_token;
1891
2040
 
@@ -1901,7 +2050,11 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
1901
2050
 
1902
2051
  var optedInFieldValue = _get(cartInfoData, 'optedIn', false);
1903
2052
 
1904
- var hideOptIn = _get(cartInfoData, 'hide_ttf_opt_in', false);
2053
+ var hideTtfOptIn = _get(cartInfoData, 'hide_ttf_opt_in', true);
2054
+
2055
+ if (!_get(dataWithUniqueIds, '[0].uniqueId')) {
2056
+ setDataWithUniqueIds(assingUniqueIds(data));
2057
+ }
1905
2058
 
1906
2059
  var getQuantity = function getQuantity(cart) {
1907
2060
  if (cart === void 0) {
@@ -2068,7 +2221,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
2068
2221
  fetchUserData(access_token);
2069
2222
  }, [access_token]);
2070
2223
  return React__default.createElement(React__default.Fragment, null, React__default.createElement(formik.Formik, {
2071
- initialValues: getInitialValues(data, _extends({}, initialValues, {
2224
+ initialValues: getInitialValues(dataWithUniqueIds, _extends({}, initialValues, {
2072
2225
  email: emailLogged,
2073
2226
  firstName: firstNameLogged,
2074
2227
  lastName: lastNameLogged,
@@ -2229,7 +2382,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
2229
2382
  }, function (props) {
2230
2383
  return React__default.createElement(formik.Form, {
2231
2384
  onSubmit: props.handleSubmit
2232
- }, React__default.createElement(LogicRunner, {
2385
+ }, React__default.createElement(ErrorFocus, null), React__default.createElement(LogicRunner, {
2233
2386
  values: props.values,
2234
2387
  setStates: setStates,
2235
2388
  setFieldValue: props.setFieldValue,
@@ -2250,7 +2403,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
2250
2403
  onLogin();
2251
2404
  setShowModalLogin(true);
2252
2405
  }
2253
- }, "Login"))), _map(data, function (item) {
2406
+ }, "Login"))), _map(dataWithUniqueIds, function (item) {
2254
2407
  var label = item.label,
2255
2408
  labelClassName = item.labelClassName,
2256
2409
  fields = item.fields;
@@ -2260,7 +2413,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
2260
2413
  }
2261
2414
 
2262
2415
  return React__default.createElement(React__default.Fragment, {
2263
- key: nanoid.nanoid()
2416
+ key: item.uniqueId
2264
2417
  }, React__default.createElement("p", {
2265
2418
  className: labelClassName
2266
2419
  }, label), _map(fields, function (group) {
@@ -2269,7 +2422,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
2269
2422
  groupLabel = group.groupLabel,
2270
2423
  groupLabelClassName = group.groupLabelClassName;
2271
2424
  return React__default.createElement(React__default.Fragment, {
2272
- key: nanoid.nanoid()
2425
+ key: group.uniqueId
2273
2426
  }, !isLoggedIn && React__default.createElement("div", {
2274
2427
  className: groupLabelClassName
2275
2428
  }, groupLabel), React__default.createElement("div", {
@@ -2287,47 +2440,45 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
2287
2440
  return false;
2288
2441
  }
2289
2442
 
2290
- if (el.name === 'brand_opt_in' && hideOptIn) {
2443
+ if (el.name === 'ttf_opt_in' && hideTtfOptIn) {
2291
2444
  return false;
2292
2445
  }
2293
2446
 
2294
2447
  return true;
2295
2448
  }), function (element) {
2296
2449
  return ['password', 'confirmPassword'].includes(element.name) && isLoggedIn ? null : React__default.createElement(React__default.Fragment, {
2297
- key: nanoid.nanoid()
2450
+ key: element.uniqueId
2298
2451
  }, element.name === 'email' ? React__default.createElement("div", {
2299
2452
  className: "email-checking"
2300
- }, "IMPORTANT: Please double check that your email address is correct. It's where we send your confirmation and e-tickets to!") : null, React__default.createElement("div", {
2453
+ }, "IMPORTANT: Please double check that your\n email address is correct. It's where we\n send your confirmation and e-tickets to!") : null, React__default.createElement("div", {
2301
2454
  className: element.className
2302
2455
  }, element.component ? element.component : React__default.createElement(formik.Field, {
2303
2456
  name: element.name,
2304
2457
  label: element.label,
2305
2458
  type: element.type,
2306
- validate: combineValidators(element.required ? requiredValidator : function () {}, element.onValidate ? element.onValidate : function () {}),
2307
- component: element.type === 'checkbox' ? CheckboxField : CustomField,
2459
+ validate: getValidateFunctions(element, states),
2460
+ component: element.type === 'checkbox' ? CheckboxField : element.type === 'select' ? SelectField : CustomField,
2308
2461
  selectOptions: element.name === 'country' ? countries : element.name === 'state' ? states : [],
2309
2462
  theme: theme
2310
2463
  })));
2311
2464
  })));
2312
2465
  }));
2313
- }), showTicketHolderName && React__default.createElement(React__default.Fragment, {
2314
- key: nanoid.nanoid()
2315
- }, React__default.createElement("div", {
2466
+ }), showTicketHolderName && React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
2316
2467
  className: "ticket-holders-fields"
2317
2468
  }, React__default.createElement("p", null, ticketHoldersFields.label), _map(ticketsQuantity, function (_item, index) {
2318
2469
  return React__default.createElement("div", {
2319
- key: nanoid.nanoid()
2470
+ key: _item
2320
2471
  }, React__default.createElement("h5", null, "Ticket ", index + 1), _map(ticketHoldersFields.fields, function (group) {
2321
2472
  var groupClassname = group.groupClassname,
2322
2473
  groupItems = group.groupItems;
2323
2474
  return React__default.createElement("div", {
2324
- key: nanoid.nanoid()
2475
+ key: group.uniqueId
2325
2476
  }, React__default.createElement("div", {
2326
2477
  className: groupClassname
2327
2478
  }, _map(groupItems, function (element) {
2328
2479
  return React__default.createElement("div", {
2329
2480
  className: element.className,
2330
- key: nanoid.nanoid()
2481
+ key: element.uniqueId
2331
2482
  }, React__default.createElement(formik.Field, {
2332
2483
  name: element.name + "-" + index,
2333
2484
  label: element.label,
@@ -2339,8 +2490,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
2339
2490
  })));
2340
2491
  }));
2341
2492
  }))), React__default.createElement("div", {
2342
- className: "button-container",
2343
- key: nanoid.nanoid()
2493
+ className: "button-container"
2344
2494
  }, React__default.createElement(LoadingButton, {
2345
2495
  type: "submit",
2346
2496
  variant: "contained",
@@ -3283,25 +3433,24 @@ var WaitingList = function WaitingList(_ref) {
3283
3433
  setShowSuccessMessage(true);
3284
3434
  }
3285
3435
 
3286
- _context.next = 14;
3436
+ _context.next = 13;
3287
3437
  break;
3288
3438
 
3289
3439
  case 11:
3290
3440
  _context.prev = 11;
3291
3441
  _context.t0 = _context["catch"](0);
3292
- console.log(_context.t0);
3293
3442
 
3294
- case 14:
3295
- _context.prev = 14;
3443
+ case 13:
3444
+ _context.prev = 13;
3296
3445
  setLoading(false);
3297
- return _context.finish(14);
3446
+ return _context.finish(13);
3298
3447
 
3299
- case 17:
3448
+ case 16:
3300
3449
  case "end":
3301
3450
  return _context.stop();
3302
3451
  }
3303
3452
  }
3304
- }, _callee, null, [[0, 11, 14, 17]]);
3453
+ }, _callee, null, [[0, 11, 13, 16]]);
3305
3454
  }));
3306
3455
 
3307
3456
  return function handleSubmit(_x) {
@@ -3322,7 +3471,7 @@ var WaitingList = function WaitingList(_ref) {
3322
3471
  email: ''
3323
3472
  },
3324
3473
  onSubmit: handleSubmit
3325
- }, React__default.createElement(formik.Form, null, showTicketsField && React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
3474
+ }, React__default.createElement(formik.Form, null, React__default.createElement(ErrorFocus, null), showTicketsField && React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
3326
3475
  className: "field-item"
3327
3476
  }, React__default.createElement(formik.Field, {
3328
3477
  name: "ticketTypeId",