tf-checkout-react 1.0.75 → 1.0.79

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.
Files changed (42) hide show
  1. package/dist/api/index.d.ts +1 -0
  2. package/dist/components/billing-info-container/index.d.ts +7 -2
  3. package/dist/components/billing-info-container/utils.d.ts +1 -0
  4. package/dist/components/common/FormikPhoneNumberField.d.ts +1 -1
  5. package/dist/components/countdown/index.d.ts +11 -0
  6. package/dist/components/orderDetailsContainer/ticketsTable.d.ts +13 -1
  7. package/dist/components/paymentContainer/index.d.ts +9 -2
  8. package/dist/components/ticketsContainer/index.d.ts +9 -1
  9. package/dist/components/waitingList/index.d.ts +1 -2
  10. package/dist/tf-checkout-react.cjs.development.js +505 -177
  11. package/dist/tf-checkout-react.cjs.development.js.map +1 -1
  12. package/dist/tf-checkout-react.cjs.production.min.js +1 -1
  13. package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
  14. package/dist/tf-checkout-react.esm.js +498 -170
  15. package/dist/tf-checkout-react.esm.js.map +1 -1
  16. package/dist/tf-checkout-styles.css +1 -1
  17. package/dist/utils/createCheckoutDataBodyWithDefaultHolder.d.ts +7 -0
  18. package/dist/utils/downloadPDF.d.ts +1 -0
  19. package/dist/utils/index.d.ts +2 -0
  20. package/package.json +2 -1
  21. package/src/api/index.ts +9 -0
  22. package/src/components/billing-info-container/index.tsx +25 -27
  23. package/src/components/billing-info-container/utils.ts +2 -1
  24. package/src/components/common/CheckboxField.tsx +19 -8
  25. package/src/components/common/CustomField.tsx +7 -0
  26. package/src/components/common/FormikPhoneNumberField.tsx +11 -1
  27. package/src/components/common/SelectField.tsx +5 -1
  28. package/src/components/countdown/index.tsx +89 -0
  29. package/src/components/countdown/style.css +10 -0
  30. package/src/components/loginModal/index.tsx +2 -0
  31. package/src/components/orderDetailsContainer/ticketsTable.tsx +66 -60
  32. package/src/components/paymentContainer/index.tsx +9 -11
  33. package/src/components/stripePayment/index.tsx +4 -4
  34. package/src/components/ticketsContainer/PromoCodeSection.tsx +3 -2
  35. package/src/components/ticketsContainer/TicketsSection.tsx +10 -6
  36. package/src/components/ticketsContainer/index.tsx +236 -76
  37. package/src/components/ticketsContainer/style.css +7 -0
  38. package/src/components/waitingList/index.tsx +3 -9
  39. package/src/components/waitingList/style.css +4 -2
  40. package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +51 -0
  41. package/src/utils/downloadPDF.tsx +22 -0
  42. package/src/utils/index.ts +2 -0
@@ -1 +1 @@
1
- .button-container{display:flex;justify-content:center;padding:20px}.billing-info-container{margin:0 auto;max-width:800px}.billing-info-container .is-half{width:49%}.billing-info-container p{color:#000}.billing-info-container .main-header{font-size:2rem;font-weight:600}.billing-info-container__twoFields{display:flex;justify-content:space-between;margin-top:15px}.billing-info-container__singleField{margin-top:15px}.account-actions-block{color:#182026;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif;margin-top:10px}.login-register-button,.MuiButtonBase-root.MuiButton-root,.MuiButtonBase-root.MuiButton-root: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%}.logo-image-container{margin-top:5px;text-align:center;width:49%}.logo-image-container img{height:30px}.login-block{align-items:center;display:flex;flex-direction:column}.login-register-button:hover{background-color:#505050!important;border-color:#505050!important}.login-register-block{display:flex;justify-content:space-between}@media only screen and (max-width:820px){.billing-info-container{width:90%}.billing-info-container .main-header{font-size:1.5rem}}.email-checking{margin-bottom:15px}.modal-title{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}.login-modal-body{padding:15px 25px}.login-modal-body input{background:#fff!important}.login-modal-body__email,.login-modal-body__password{margin-bottom:20px}.login-action-button 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%}.login-action-button button:hover{background-color:#505050;border-color:#505050}.server_auth__error{color:red;font-family:Inter;font-size:12px;font-style:normal;padding-left:25px;padding-top:15px}.info-text-for-login{font-size:14px;margin-bottom:4px;padding-left:10px}.register-container{margin:0 auto;max-width:800px}.register-container .is-half{width:49%}.register-container__twoFields{display:flex;justify-content:space-between;margin-top:15px}.register-container__singleField{margin-top:15px}button{margin-top:10px}.payment_page{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif}.payment_page .order_info_section{padding:15px 0}.payment_page .order_info_section .order_info_block{padding-bottom:15px;padding-top:15px}.payment_page .order_info_section .order_info_block .field-underline{border-bottom:1px solid #000;padding-bottom:15px}.payment_page .order_info_section .order_info_block .order_info_title{font-size:14px;font-weight:700;padding-bottom:3px}.payment_page .order_info_section .order_info_block .order_info_text{font-size:16px;line-height:1.15;outline:none}.payment_page .MuiBox-root{margin-left:auto;margin-right:auto;padding:20px;text-align:center}.payment_page .payment_info_label{padding:20px 0;text-align:center}.payment_page .payment_form{color:#fff;padding:20px}.payment_page .payment_form input,.payment_page .payment_form label{color:#fff}.payment_page .payment_button{padding-top:20px;text-align:center}.card_form_inner{background:#232323;border-radius:8px;margin:0 auto 20px;min-width:325px;padding:15px;width:50%}.card_form_inner .card_label_text{color:#fff}.card_form_inner .StripeElement{margin:5px 0 10px}.card_label_text{color:#fff}.payment_button{padding-top:15px;text-align:center}.payment_button button{background-color:#212529;border-radius:8px;color:#fff;cursor:pointer;font-size:26px;padding:15px 30px;transition:opacity .5s;width:200px}.payment_button button:hover{opacity:.7}.disabled-payment-button button{opacity:.3;pointer-events:none;user-select:none}.checkout_error_block{color:#e53935;font-weight:600;padding:15px 0}.zip_element p{margin-bottom:0}.zip_element input{background-color:#000;border:none;color:#fff;font-size:18px;margin-top:5px;outline:none;width:100%}.confirmation-page{margin:0 auto;max-width:1024px}.confirmation-page button{margin-top:inherit}.confirmation-page .strong-text{font-weight:700}.confirmation-page .title{color:#333;font-size:24px;font-weight:600}.confirmation-page .share-message-section{background:#dff0d8;border:1px solid #d6e9c6;border-radius:5px;color:#2c7221;display:flex;flex-direction:column;margin:20px 0;padding:15px}.confirmation-page .main{font-size:15px;font-weight:700}.confirmation-page .helper,.confirmation-page .main{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif}.confirmation-page .helper{font-size:14px;margin-top:5px}.confirmation-page .referral_text_image_section{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin:20px 0}.confirmation-page .referral_text_section{margin:10px}.confirmation-page .referral_title_text{color:#f08057;font-size:28px;padding-bottom:10px}.confirmation-page .referral_text{font-size:18px}.confirmation-page .referral_text_image_section img{margin:10px;max-width:200px}.confirmation-page .share_wrapper{column-gap:5rem;display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));margin:10px}.confirmation-page .invitation_title{font-size:22px;padding-bottom:12px;padding-top:12px}.confirmation-page .share_section{display:flex;flex-wrap:wrap;justify-content:space-between;margin:0 -10px}.confirmation-page .invitation_section{flex:1 1;padding:0 5px}.confirmation-page .share_buttons{display:grid;flex-wrap:wrap;margin:0 -7px}.confirmation-page .convenient_buttons{margin-top:10px}.confirmation-page .social-media-btns{grid-gap:5px;display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}.confirmation-page .sharing-btn{background-color:#000;flex:1 1;min-width:130px}.confirmation-page .sharing-btn a{text-decoration:none}.confirmation-page .share-by-link{background:#000;color:#fff;padding:10px}.confirmation-page .share-by-link.label{margin:0;padding:0;text-align:left}.confirmation-page .share-btn-inner{align-items:center;background-color:#000;box-sizing:border-box;color:#fff;cursor:pointer;display:inline-flex;padding:0;text-align:left;width:100%}.confirmation-page .share-input{background-color:#fff;border:none;outline:none;padding:5px;text-align:left;width:300px}.confirmation-page .share-text{display:block;font-size:13px;font-weight:600;padding-top:8px;width:100%}.confirmation-page .pricing-section_wrapper{background:#e3e3e3;border:1px solid #dcdcdc;display:grid;grid-template-columns:1fr 1fr;margin:10px 0;padding:15px}.confirmation-page .pricing-section_label{font-weight:600}.confirmation-page .pricing-section_sublabel{font-size:14px;font-weight:100}.confirmation-page .pricing-section_price{font-weight:600;text-align:right}.confirmation-page .share-by-link-copy-icon{align-items:center;background-color:#32325d;border-radius:4px;color:#fff;cursor:pointer;display:flex;justify-content:center;margin-left:8px;padding:10px;transition:all .15s ease}.confirmation-page .share-by-link-copy-icon:hover{background-color:#505050}.confirmation-page .share-by-link-copy-icon img{width:14px}.confirmation-page .social-media-sharing{background-color:#000;color:#fff;cursor:pointer;padding:10px;text-align:center}.confirmation-page .share-icon{border-radius:4px;display:inline-flex}@media only screen and (max-width:1050px){.confirmation-page .share_wrapper{column-gap:0;display:grid;grid-template-columns:unset;margin:15px}}@media only screen and (max-width:480px){.confirmation-page .social-media-btns{grid-template-columns:unset}.confirmation-page .share-input{width:250px}}body{margin:0;padding:0}.get-tickets-page{width:100%}.event-detail__tier{background-color:#fff;padding:17px 35px 20px}.event-detail__tier-name{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}.event-detail__tier-status{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;margin-top:8px;width:100%}.event-detail__tier-status.ticket-button{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}.event-tickets-container{align-items:center;display:flex;justify-content:space-between}.event-detail__tier-status.ticket-button.true{background-color:#c1c3c6;border-color:#afb0b1}.event-detail__tier-price{color:#000;font-family:Inter-Bold;font-size:1.5rem;line-height:1;text-align:center}.event-detail__tier-price p{margin:0}.event-detail__tier-price .fees{font-size:14px;margin-top:4px;text-align:left}.event-detail__tier-price .old-price{color:red;font-size:1.3rem;margin-bottom:5px;text-decoration:line-through}.alert-info{align-items:center;background-color:#d9edf7;border:1px solid #bce8f1;border-radius:4px;color:#3a87ad;display:flex;font-size:1em;justify-content:center;margin:0 35px;padding:8px 15px;text-shadow:0 1px 0 hsla(0,0%,100%,.5)}.alert-info svg{margin-right:4px}.event-detail__tier-state{color:#30bc9d;font-family:Inter-Bold;font-size:.75rem;font-weight:300;line-height:1;text-align:right;text-transform:uppercase}.promo-code-block input{font-size:14px;padding:1px 8px}.book-button{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%}.book-button:hover{background-color:#505050;border-color:#505050}.loader-container{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.get-tickets-paper::-webkit-scrollbar{width:5px}.get-tickets-paper::-webkit-scrollbar-track{background:#f1f1f1}.get-tickets-paper::-webkit-scrollbar-thumb{background:#888}.get-tickets-paper::-webkit-scrollbar-thumb:hover{background:#555}.get-tickets .get-tickets__selectbox{width:100%}.disabled{pointer-events:none;user-select:none}.hidden{display:none}.waiting-list{padding:17px 35px 20px}.waiting-list .field-item{margin-bottom:30px}.waiting-list .waiting-list-button{width:100%!important}.waiting-list .waiting-list-button:hover{background-color:#505050}.waiting-list .success-message h3{margin:10px 0}.waiting-list .success-message p{margin:0}.waiting-list .no-tickets-text{font-weight:700;text-align:center}.waiting-list .added-success-message{font-size:22px}.my-ticket{padding:30px}.my-ticket-table{margin-top:30px}.my-ticket .loading{background-color:rgba(0,0,0,.4);height:100vh;justify-content:center;left:0;position:fixed;top:0;width:100%}.my-ticket .event-info,.my-ticket .loading{align-items:center;display:flex}.my-ticket thead th{font-weight:700}.my-ticket .event-info img{margin-right:10px;width:50px}.my-ticket .order-details-button{background-color:#32325d;border:none;border-radius:4px;color:#fff;cursor:pointer;padding:10px 14px;transition:all .15s ease}.my-ticket .order-details-button:hover{background-color:#505050}.order-details{margin:0 auto;max-width:940px}.order-details .loading{align-items:center;background-color:rgba(0,0,0,.4);display:flex;height:100vh;justify-content:center;left:0;position:fixed;top:0;width:100%}.order-details .layout-title{font-size:24px;font-weight:400}.order-details .sub-title{font-size:18px;font-weight:400;margin:10px 0}.order-details .order-summary-box{margin-top:30px}.order-details .total-row td,.order-details th{color:#fff;font-weight:700}.order-details .tickets-box{margin-top:30px}.order-details .ticket-add-on-table{background-color:#fcf8e3}.order-details .download-button{background-color:#212529;border:1px solid #fff;border-radius:0;color:#fff;cursor:pointer;display:block;font-family:Bebas Neue;font-size:16px;font-weight:400;line-height:normal;margin-bottom:20px;margin-top:20px;min-height:auto;outline:none;overflow:hidden;padding:12px 0;position:relative;text-align:center;text-decoration:none;text-overflow:ellipsis;text-transform:uppercase;width:100%}.order-details .download-button:hover{background-color:#505050}.order-details .personal-link{padding:20px 0}
1
+ .button-container{display:flex;justify-content:center;padding:20px}.billing-info-container{margin:0 auto;max-width:800px}.billing-info-container .is-half{width:49%}.billing-info-container p{color:#000}.billing-info-container .main-header{font-size:2rem;font-weight:600}.billing-info-container__twoFields{display:flex;justify-content:space-between;margin-top:15px}.billing-info-container__singleField{margin-top:15px}.account-actions-block{color:#182026;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif;margin-top:10px}.login-register-button,.MuiButtonBase-root.MuiButton-root,.MuiButtonBase-root.MuiButton-root: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%}.logo-image-container{margin-top:5px;text-align:center;width:49%}.logo-image-container img{height:30px}.login-block{align-items:center;display:flex;flex-direction:column}.login-register-button:hover{background-color:#505050!important;border-color:#505050!important}.login-register-block{display:flex;justify-content:space-between}@media only screen and (max-width:820px){.billing-info-container{width:90%}.billing-info-container .main-header{font-size:1.5rem}}.email-checking{margin-bottom:15px}.modal-title{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}.login-modal-body{padding:15px 25px}.login-modal-body input{background:#fff!important}.login-modal-body__email,.login-modal-body__password{margin-bottom:20px}.login-action-button 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%}.login-action-button button:hover{background-color:#505050;border-color:#505050}.server_auth__error{color:red;font-family:Inter;font-size:12px;font-style:normal;padding-left:25px;padding-top:15px}.info-text-for-login{font-size:14px;margin-bottom:4px;padding-left:10px}.register-container{margin:0 auto;max-width:800px}.register-container .is-half{width:49%}.register-container__twoFields{display:flex;justify-content:space-between;margin-top:15px}.register-container__singleField{margin-top:15px}button{margin-top:10px}.payment_page{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif}.payment_page .order_info_section{padding:15px 0}.payment_page .order_info_section .order_info_block{padding-bottom:15px;padding-top:15px}.payment_page .order_info_section .order_info_block .field-underline{border-bottom:1px solid #000;padding-bottom:15px}.payment_page .order_info_section .order_info_block .order_info_title{font-size:14px;font-weight:700;padding-bottom:3px}.payment_page .order_info_section .order_info_block .order_info_text{font-size:16px;line-height:1.15;outline:none}.payment_page .MuiBox-root{margin-left:auto;margin-right:auto;padding:20px;text-align:center}.payment_page .payment_info_label{padding:20px 0;text-align:center}.payment_page .payment_form{color:#fff;padding:20px}.payment_page .payment_form input,.payment_page .payment_form label{color:#fff}.payment_page .payment_button{padding-top:20px;text-align:center}.card_form_inner{background:#232323;border-radius:8px;margin:0 auto 20px;min-width:325px;padding:15px;width:50%}.card_form_inner .card_label_text{color:#fff}.card_form_inner .StripeElement{margin:5px 0 10px}.card_label_text{color:#fff}.payment_button{padding-top:15px;text-align:center}.payment_button button{background-color:#212529;border-radius:8px;color:#fff;cursor:pointer;font-size:26px;padding:15px 30px;transition:opacity .5s;width:200px}.payment_button button:hover{opacity:.7}.disabled-payment-button button{opacity:.3;pointer-events:none;user-select:none}.checkout_error_block{color:#e53935;font-weight:600;padding:15px 0}.zip_element p{margin-bottom:0}.zip_element input{background-color:#000;border:none;color:#fff;font-size:18px;margin-top:5px;outline:none;width:100%}.confirmation-page{margin:0 auto;max-width:1024px}.confirmation-page button{margin-top:inherit}.confirmation-page .strong-text{font-weight:700}.confirmation-page .title{color:#333;font-size:24px;font-weight:600}.confirmation-page .share-message-section{background:#dff0d8;border:1px solid #d6e9c6;border-radius:5px;color:#2c7221;display:flex;flex-direction:column;margin:20px 0;padding:15px}.confirmation-page .main{font-size:15px;font-weight:700}.confirmation-page .helper,.confirmation-page .main{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif}.confirmation-page .helper{font-size:14px;margin-top:5px}.confirmation-page .referral_text_image_section{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin:20px 0}.confirmation-page .referral_text_section{margin:10px}.confirmation-page .referral_title_text{color:#f08057;font-size:28px;padding-bottom:10px}.confirmation-page .referral_text{font-size:18px}.confirmation-page .referral_text_image_section img{margin:10px;max-width:200px}.confirmation-page .share_wrapper{column-gap:5rem;display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));margin:10px}.confirmation-page .invitation_title{font-size:22px;padding-bottom:12px;padding-top:12px}.confirmation-page .share_section{display:flex;flex-wrap:wrap;justify-content:space-between;margin:0 -10px}.confirmation-page .invitation_section{flex:1 1;padding:0 5px}.confirmation-page .share_buttons{display:grid;flex-wrap:wrap;margin:0 -7px}.confirmation-page .convenient_buttons{margin-top:10px}.confirmation-page .social-media-btns{grid-gap:5px;display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}.confirmation-page .sharing-btn{background-color:#000;flex:1 1;min-width:130px}.confirmation-page .sharing-btn a{text-decoration:none}.confirmation-page .share-by-link{background:#000;color:#fff;padding:10px}.confirmation-page .share-by-link.label{margin:0;padding:0;text-align:left}.confirmation-page .share-btn-inner{align-items:center;background-color:#000;box-sizing:border-box;color:#fff;cursor:pointer;display:inline-flex;padding:0;text-align:left;width:100%}.confirmation-page .share-input{background-color:#fff;border:none;outline:none;padding:5px;text-align:left;width:300px}.confirmation-page .share-text{display:block;font-size:13px;font-weight:600;padding-top:8px;width:100%}.confirmation-page .pricing-section_wrapper{background:#e3e3e3;border:1px solid #dcdcdc;display:grid;grid-template-columns:1fr 1fr;margin:10px 0;padding:15px}.confirmation-page .pricing-section_label{font-weight:600}.confirmation-page .pricing-section_sublabel{font-size:14px;font-weight:100}.confirmation-page .pricing-section_price{font-weight:600;text-align:right}.confirmation-page .share-by-link-copy-icon{align-items:center;background-color:#32325d;border-radius:4px;color:#fff;cursor:pointer;display:flex;justify-content:center;margin-left:8px;padding:10px;transition:all .15s ease}.confirmation-page .share-by-link-copy-icon:hover{background-color:#505050}.confirmation-page .share-by-link-copy-icon img{width:14px}.confirmation-page .social-media-sharing{background-color:#000;color:#fff;cursor:pointer;padding:10px;text-align:center}.confirmation-page .share-icon{border-radius:4px;display:inline-flex}@media only screen and (max-width:1050px){.confirmation-page .share_wrapper{column-gap:0;display:grid;grid-template-columns:unset;margin:15px}}@media only screen and (max-width:480px){.confirmation-page .social-media-btns{grid-template-columns:unset}.confirmation-page .share-input{width:250px}}body{margin:0;padding:0}.get-tickets-page{width:100%}.event-detail__tier{background-color:#fff;padding:17px 35px 20px}.event-detail__tier-name{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}.event-detail__tier-status{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;margin-top:8px;width:100%}.event-detail__tier-status.ticket-button{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}.event-tickets-container{align-items:center;display:flex;justify-content:space-between}.event-detail__tier-status.ticket-button.true{background-color:#c1c3c6;border-color:#afb0b1}.event-detail__tier-price{color:#000;font-family:Inter-Bold;font-size:1.5rem;line-height:1;text-align:center}.event-detail__tier-price p{margin:0}.event-detail__tier-price .fees{font-size:14px;margin-top:4px;text-align:left}.event-detail__tier-price .old-price{color:red;font-size:1.3rem;margin-bottom:5px;text-decoration:line-through}.alert-info{align-items:center;background-color:#d9edf7;border:1px solid #bce8f1;border-radius:4px;color:#3a87ad;display:flex;font-size:1em;justify-content:center;margin:0 35px;padding:8px 15px;text-shadow:0 1px 0 hsla(0,0%,100%,.5)}.alert-info svg{margin-right:4px}.event-detail__tier-state{color:#30bc9d;font-family:Inter-Bold;font-size:.75rem;font-weight:300;line-height:1;text-align:right;text-transform:uppercase}.event-detail__tier-state .ticket-not-started-message{color:#000;text-align:left;text-transform:none;width:50px}.promo-code-block input{font-size:14px;padding:1px 8px}.book-button{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%}.book-button:hover{background-color:#505050;border-color:#505050}.loader-container{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.get-tickets-paper::-webkit-scrollbar{width:5px}.get-tickets-paper::-webkit-scrollbar-track{background:#f1f1f1}.get-tickets-paper::-webkit-scrollbar-thumb{background:#888}.get-tickets-paper::-webkit-scrollbar-thumb:hover{background:#555}.get-tickets .get-tickets__selectbox{width:100%}.disabled{pointer-events:none;user-select:none}.hidden{display:none}.waiting-list{padding:17px 35px 20px}.waiting-list .field-item{margin-bottom:30px}.waiting-list .waiting-list-button{width:100%!important}.waiting-list .waiting-list-button:hover{background-color:#505050}.waiting-list .success-message{margin-bottom:15px;text-align:center}.waiting-list .success-message p{margin:0}.waiting-list .no-tickets-text{font-weight:700;text-align:center}.waiting-list .added-success-message{font-size:22px;margin-bottom:10px}.countdown p{margin:0}.countdown .title{font-weight:700}.countdown .message{font-weight:700;margin-top:20px}.my-ticket{padding:30px}.my-ticket-table{margin-top:30px}.my-ticket .loading{background-color:rgba(0,0,0,.4);height:100vh;justify-content:center;left:0;position:fixed;top:0;width:100%}.my-ticket .event-info,.my-ticket .loading{align-items:center;display:flex}.my-ticket thead th{font-weight:700}.my-ticket .event-info img{margin-right:10px;width:50px}.my-ticket .order-details-button{background-color:#32325d;border:none;border-radius:4px;color:#fff;cursor:pointer;padding:10px 14px;transition:all .15s ease}.my-ticket .order-details-button:hover{background-color:#505050}.order-details{margin:0 auto;max-width:940px}.order-details .loading{align-items:center;background-color:rgba(0,0,0,.4);display:flex;height:100vh;justify-content:center;left:0;position:fixed;top:0;width:100%}.order-details .layout-title{font-size:24px;font-weight:400}.order-details .sub-title{font-size:18px;font-weight:400;margin:10px 0}.order-details .order-summary-box{margin-top:30px}.order-details .total-row td,.order-details th{color:#fff;font-weight:700}.order-details .tickets-box{margin-top:30px}.order-details .ticket-add-on-table{background-color:#fcf8e3}.order-details .download-button{background-color:#212529;border:1px solid #fff;border-radius:0;color:#fff;cursor:pointer;display:block;font-family:Bebas Neue;font-size:16px;font-weight:400;line-height:normal;margin-bottom:20px;margin-top:20px;min-height:auto;outline:none;overflow:hidden;padding:12px 0;position:relative;text-align:center;text-decoration:none;text-overflow:ellipsis;text-transform:uppercase;width:100%}.order-details .download-button:hover{background-color:#505050}.order-details .personal-link{padding:20px 0}
@@ -0,0 +1,7 @@
1
+ interface ICheckoutBody {
2
+ attributes: {
3
+ [key: string]: any;
4
+ };
5
+ }
6
+ export declare const createCheckoutDataBodyWithDefaultHolder: (ticketsQuantity: number, logedInValues: {}) => ICheckoutBody;
7
+ export {};
@@ -0,0 +1 @@
1
+ export declare const downloadPDF: (pdfUrl: string) => void;
@@ -1,3 +1,5 @@
1
1
  export { setConfigs, CONFIGS } from './setConfigs';
2
2
  export { getQueryVariable } from './getQueryVariable';
3
3
  export { ErrorFocus } from './formikErrorFocus';
4
+ export { downloadPDF } from './downloadPDF';
5
+ export { createCheckoutDataBodyWithDefaultHolder } from './createCheckoutDataBodyWithDefaultHolder';
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.75",
2
+ "version": "1.0.79",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -77,6 +77,7 @@
77
77
  "lodash": "^4.17.21",
78
78
  "lodash-es": "^4.17.21",
79
79
  "material-ui-phone-number": "^3.0.0",
80
+ "moment-timezone": "^0.5.34",
80
81
  "nanoid": "^3.1.30",
81
82
  "prop-types": "^15.7.2",
82
83
  "react-bootstrap": "^2.0.2",
package/src/api/index.ts CHANGED
@@ -123,6 +123,15 @@ export const handleSetAccessToken = (token: any) => {
123
123
  }
124
124
  }
125
125
 
126
+ export function getEvent(id: string | number) {
127
+ const response = publicRequest
128
+ .get(`v1/event/${id}`, { headers: ttfHeaders })
129
+ .catch(error => {
130
+ throw error
131
+ })
132
+ return response
133
+ }
134
+
126
135
  export function getTickets(id: string | number, promoCode: string) {
127
136
  const response = publicRequest
128
137
  .get(`v1/event/${id}/tickets/`, {
@@ -1,4 +1,4 @@
1
- import React, { FC, useEffect, useState, useCallback } from 'react'
1
+ import React, { FC, useEffect, useState, useCallback, useRef } from 'react'
2
2
  import { AxiosError } from 'axios'
3
3
  import {
4
4
  Field,
@@ -8,7 +8,7 @@ import {
8
8
  FormikProps,
9
9
  FormikValues,
10
10
  } from 'formik'
11
- import LoadingButton from '@mui/lab/LoadingButton'
11
+ import Button from '@mui/material/Button'
12
12
  import _identity from 'lodash/identity'
13
13
  import _map from 'lodash/map'
14
14
  import _get from 'lodash/get'
@@ -40,13 +40,14 @@ import {
40
40
  import { CustomField } from '../common/CustomField'
41
41
  import axios from 'axios'
42
42
  import { CheckboxField } from '../common/CheckboxField'
43
- import { CircularProgress } from '@mui/material'
43
+ import { CircularProgress, ThemeOptions } from '@mui/material'
44
44
  import { nanoid } from 'nanoid'
45
45
  import { getQueryVariable } from '../../utils/getQueryVariable'
46
46
  import { SelectField } from '../common/SelectField'
47
47
  import { ErrorFocus } from '../../utils/formikErrorFocus'
48
48
  import { FormikPhoneNumberField } from '../common/FormikPhoneNumberField'
49
49
  import { ThemeProvider, createTheme } from '@mui/material/styles'
50
+ import { CSSProperties } from '@mui/styles'
50
51
 
51
52
  export interface IBillingInfoPage {
52
53
  data?: IBillingInfoData[];
@@ -95,8 +96,8 @@ export interface IBillingInfoPage {
95
96
  theme?: 'light' | 'dark';
96
97
  isLoggedIn?: boolean;
97
98
  accountInfoTitle?: string | JSX.Element;
98
- fontFamily?: string;
99
99
  hideLogo?: boolean;
100
+ themeOptions?: ThemeOptions & { input?: CSSProperties; checkbox?: CSSProperties }
100
101
  }
101
102
 
102
103
  const LogicRunner: FC<{
@@ -116,6 +117,7 @@ const LogicRunner: FC<{
116
117
  onGetStatesSuccess,
117
118
  onGetStatesError,
118
119
  }) => {
120
+ const prevCountry = useRef(values.country)
119
121
  useEffect(() => {
120
122
  const fetchStates = async () => {
121
123
  try {
@@ -125,7 +127,10 @@ const LogicRunner: FC<{
125
127
  value: key,
126
128
  }))
127
129
  setStates(mappedStates)
128
- setFieldValue('state', mappedStates[0]?.value ?? '')
130
+ if (prevCountry.current !== values.country) {
131
+ setFieldValue('state', mappedStates[0]?.value ?? '')
132
+ prevCountry.current = values.country
133
+ }
129
134
  onGetStatesSuccess(res.data)
130
135
  } catch (e) {
131
136
  if (axios.isAxiosError(e)) {
@@ -148,13 +153,13 @@ const LogicRunner: FC<{
148
153
  const parsedData = JSON.parse(userDataEncoded)
149
154
  const mappedValues = {
150
155
  firstName: parsedData?.first_name || '',
151
- lastName: parsedData?.last_name,
156
+ lastName: parsedData?.last_name || '',
152
157
  email: parsedData?.email || '',
153
158
  phone: parsedData?.phone || '',
154
159
  confirmEmail: parsedData?.email || '',
155
160
  state: parsedData?.state || '',
156
161
  street_address: parsedData?.street_address || '',
157
- country: parsedData?.country || 1,
162
+ country: parsedData?.country || "1",
158
163
  zip: parsedData?.zip || '',
159
164
  brand_opt_in: parsedData?.brand_opt_in || '',
160
165
  city: parsedData?.city || '',
@@ -203,16 +208,10 @@ export const BillingInfoContainer = ({
203
208
  onLoginSuccess = () => {},
204
209
  isLoggedIn: pIsLoggedIn = false,
205
210
  accountInfoTitle = '',
206
- fontFamily,
207
211
  hideLogo,
212
+ themeOptions
208
213
  }: IBillingInfoPage) => {
209
- const themeMui = createTheme({
210
- typography: {
211
- allVariants: {
212
- fontFamily,
213
- },
214
- },
215
- })
214
+ const themeMui = createTheme(themeOptions)
216
215
  const isWindowDefined = typeof window !== 'undefined'
217
216
  const userData =
218
217
  isWindowDefined && window.localStorage.getItem('user_data')
@@ -304,7 +303,7 @@ export const BillingInfoContainer = ({
304
303
  setCountries(
305
304
  _map(_get(res, 'data.data'), (item, key) => ({
306
305
  label: item,
307
- value: Number(key),
306
+ value: key,
308
307
  }))
309
308
  )
310
309
  onGetCountriesSuccess(res.data)
@@ -344,7 +343,7 @@ export const BillingInfoContainer = ({
344
343
  const userDataResponse = await getProfileData(token)
345
344
  const profileSpecifiedData = _get(userDataResponse, 'data.data')
346
345
  const profileDataObj = setLoggedUserData(profileSpecifiedData)
347
- setUserValues(profileDataObj)
346
+ setUserValues({ ...profileDataObj, firstName: profileDataObj.first_name, lastName: profileDataObj.last_name })
348
347
  window.localStorage.setItem(
349
348
  'user_data',
350
349
  JSON.stringify(profileDataObj)
@@ -369,9 +368,8 @@ export const BillingInfoContainer = ({
369
368
  dataWithUniqueIds,
370
369
  {
371
370
  ...initialValues,
372
- firstName: firstNameLogged,
373
- lastName: lastNameLogged,
374
- country: 1,
371
+ country: _get(userData, 'country', '') || "1",
372
+ state: _get(userData, 'state', '') || "1",
375
373
  brand_opt_in: optedInFieldValue,
376
374
  },
377
375
  userValues
@@ -666,18 +664,18 @@ export const BillingInfoContainer = ({
666
664
  ))}
667
665
  </div>
668
666
  <div className="button-container">
669
- <LoadingButton
667
+ <Button
670
668
  type="submit"
671
669
  variant="contained"
672
670
  className="login-register-button"
673
- loadingIndicator={
674
- <CircularProgress color="inherit" size={26} />
675
- }
676
- loading={props.isSubmitting}
677
671
  disabled={props.isSubmitting}
678
672
  >
679
- {buttonName}
680
- </LoadingButton>
673
+ {props.isSubmitting ? (
674
+ <CircularProgress size={26} />
675
+ ) : (
676
+ buttonName
677
+ )}
678
+ </Button>
681
679
  </div>
682
680
  </div>
683
681
  </Form>
@@ -88,6 +88,7 @@ interface IUserData {
88
88
  state?: string;
89
89
  zip?: string;
90
90
  zipCode?: string;
91
+ stateId?: string;
91
92
  }
92
93
 
93
94
  interface IticketHolder {
@@ -107,7 +108,7 @@ export const setLoggedUserData = (data: IUserData) => ({
107
108
  country: data?.country || '',
108
109
  phone: data?.phone || '',
109
110
  street_address: data?.streetAddress || '',
110
- state: data?.state || '',
111
+ state: data?.stateId || '',
111
112
  zip: data?.zip || data?.zipCode || '',
112
113
  })
113
114
 
@@ -3,6 +3,8 @@ import FormGroup from '@mui/material/FormGroup'
3
3
  import FormControlLabel from '@mui/material/FormControlLabel'
4
4
  import Checkbox from '@mui/material/Checkbox'
5
5
  import { FieldInputProps } from 'formik'
6
+ import { useTheme } from '@mui/styles'
7
+ import { FormControl, FormHelperText } from '@mui/material'
6
8
 
7
9
  export interface ICheckboxField {
8
10
  label: string | number | JSX.Element;
@@ -20,11 +22,20 @@ export const CheckboxField = ({
20
22
  theme,
21
23
  setFieldValue,
22
24
  ...rest
23
- }: ICheckboxField & IOtherProps) => (
24
- <FormGroup>
25
- <FormControlLabel
26
- control={<Checkbox {...field} {...rest} />}
27
- label={label}
28
- />
29
- </FormGroup>
30
- )
25
+ }: ICheckboxField & IOtherProps) => {
26
+ const customTheme: any = useTheme()
27
+ return (
28
+ <FormControl error={!!(rest?.form?.errors && rest.form.errors[field?.name ?? ""])}>
29
+ <FormGroup>
30
+ <FormControlLabel
31
+ control={<Checkbox {...field} {...rest} />}
32
+ label={label}
33
+ componentsProps={{
34
+ typography: customTheme?.checkbox
35
+ }}
36
+ />
37
+ </FormGroup>
38
+ {!!(rest?.form?.errors && rest.form.errors[field?.name ?? ""]) ? <FormHelperText>Required</FormHelperText> : null}
39
+ </FormControl>
40
+ )
41
+ }
@@ -5,6 +5,7 @@ import _get from 'lodash/get'
5
5
  import _includes from 'lodash/includes'
6
6
 
7
7
  import { FieldInputProps, FormikProps } from 'formik'
8
+ import { useTheme } from '@mui/styles'
8
9
 
9
10
  export interface ISelectOption {
10
11
  label: string | number;
@@ -42,6 +43,8 @@ export const CustomField = ({
42
43
  Boolean(_get(touched, field.name)) ||
43
44
  (_includes(field.name, 'holder') && !!error && !!submitCount)
44
45
 
46
+ const customTheme: any = useTheme()
47
+
45
48
  return (
46
49
  <TextField
47
50
  id={field.name}
@@ -56,6 +59,10 @@ export const CustomField = ({
56
59
  className: theme,
57
60
  MenuProps: { className: theme },
58
61
  }}
62
+ InputLabelProps={{ sx: customTheme?.input }}
63
+ inputProps={{
64
+ sx: customTheme?.input
65
+ }}
59
66
  {...field}
60
67
  >
61
68
  {isSelectField
@@ -3,6 +3,7 @@ import { FieldInputProps } from 'formik'
3
3
  import MuiPhoneNumber from 'material-ui-phone-number'
4
4
  import _get from 'lodash/get'
5
5
  import { removePlusSign } from '../../normalizers'
6
+ import { useTheme } from '@mui/styles'
6
7
 
7
8
  export interface INumberInField {
8
9
  label: string | number | JSX.Element;
@@ -16,7 +17,7 @@ interface IOtherProps {
16
17
  export const FormikPhoneNumberField = ({
17
18
  label,
18
19
  field,
19
- form: { touched, errors },
20
+ form: { touched, errors, initialValues },
20
21
  setFieldValue,
21
22
  selectOptions,
22
23
  ...rest
@@ -24,9 +25,12 @@ export const FormikPhoneNumberField = ({
24
25
  const error = _get(errors, field.name)
25
26
  const isTouched = Boolean(_get(touched, field.name))
26
27
 
28
+ const customTheme: any = useTheme()
29
+
27
30
  return (
28
31
  <MuiPhoneNumber
29
32
  name='phone'
33
+ value={initialValues.phone}
30
34
  onChange={(e: any) => setFieldValue("phone", removePlusSign(e))}
31
35
  variant="outlined"
32
36
  defaultCountry='us'
@@ -35,6 +39,12 @@ export const FormikPhoneNumberField = ({
35
39
  error={!!error && isTouched}
36
40
  helperText={isTouched && error}
37
41
  fullWidth
42
+ InputLabelProps={{
43
+ sx: customTheme?.input
44
+ }}
45
+ InputProps={{
46
+ sx: customTheme?.input
47
+ }}
38
48
  autoFormat={false}
39
49
  {...rest}
40
50
  />
@@ -5,6 +5,7 @@ import _get from 'lodash/get'
5
5
 
6
6
  import { FieldInputProps, FormikProps } from 'formik'
7
7
  import { FormControl, InputLabel, FormHelperText } from '@mui/material'
8
+ import { useTheme } from '@mui/styles'
8
9
 
9
10
  export interface ISelectOption {
10
11
  label: string | number;
@@ -39,9 +40,11 @@ export const SelectField = ({
39
40
  const isTouched = Boolean(_get(touched, field.name))
40
41
  const error = _get(errors, field.name)
41
42
 
43
+ const customTheme: any = useTheme()
44
+
42
45
  return (
43
46
  <FormControl fullWidth={true}>
44
- <InputLabel htmlFor={field.name} error={!!error && isTouched} shrink={true}>
47
+ <InputLabel style={customTheme?.input} htmlFor={field.name} error={!!error && isTouched} shrink={true}>
45
48
  {label}
46
49
  </InputLabel>
47
50
  <Select
@@ -57,6 +60,7 @@ export const SelectField = ({
57
60
  className={theme}
58
61
  MenuProps={{ className: theme }}
59
62
  {...field}
63
+ style={customTheme?.input}
60
64
  >
61
65
  {_map(selectOptions, option => (
62
66
  <option
@@ -0,0 +1,89 @@
1
+ import React, { useEffect, useState } from 'react'
2
+ import moment from 'moment-timezone'
3
+ import './style.css'
4
+
5
+ interface CountdownTypes {
6
+ startDate: string;
7
+ timezone?: string;
8
+ title?: string;
9
+ message?: string;
10
+ callback?: () => void;
11
+ }
12
+
13
+ const isTimeExpired = (startDate: string, timezone: string) => {
14
+ return !moment(startDate).isAfter(moment.tz(moment(), timezone).format('YYYY-MM-DD HH:mm:ss'))
15
+ }
16
+
17
+ function Countdown({
18
+ startDate,
19
+ timezone = moment.tz.guess(),
20
+ title = '',
21
+ message = '',
22
+ callback = () => {}
23
+ }: CountdownTypes) {
24
+ const [duration, setDuration] = useState('')
25
+ const [timeExpired, setTimeExpired] = useState(false)
26
+
27
+ useEffect(() => {
28
+ setTimeExpired(isTimeExpired(startDate, timezone))
29
+ }, [])
30
+
31
+ useEffect(() => {
32
+ let timer: any;
33
+
34
+ if(!timeExpired) {
35
+ timer = setInterval(() => {
36
+ if(isTimeExpired(startDate, timezone)) {
37
+ clearInterval(timer)
38
+ setTimeExpired(true)
39
+ callback()
40
+ }
41
+
42
+ const currentDate = moment.tz(moment(), timezone).format('YYYY-MM-DD HH:mm:ss')
43
+ const diffTime = moment(startDate).diff(currentDate)
44
+ const duration = moment.duration(diffTime)
45
+ const dateArr: any = {
46
+ year: duration.years(),
47
+ month: duration.months(),
48
+ day: duration.days(),
49
+ hour: duration.hours(),
50
+ minute: duration.minutes(),
51
+ second: duration.seconds(),
52
+ }
53
+
54
+ let timeLeft = ''
55
+
56
+ for(let date in dateArr) {
57
+ const unit = dateArr[date] === 1 ? date : date + 's'
58
+ const val = String(dateArr[date]).length === 1 ? '0' + dateArr[date] : dateArr[date]
59
+ if(timeLeft) {
60
+ timeLeft += `, ${val} ${unit}`
61
+ } else if(dateArr[date]) {
62
+ timeLeft += `${val} ${unit}`
63
+ }
64
+ }
65
+
66
+ setDuration(timeLeft)
67
+ }, 1000)
68
+ }
69
+ return () => {
70
+ clearInterval(timer)
71
+ }
72
+ }, [timeExpired])
73
+
74
+ return (
75
+ <>
76
+ {!timeExpired && duration && (
77
+ <div className='countdown'>
78
+ <div>
79
+ <p className='title'>{title}</p>
80
+ <p>{duration}</p>
81
+ </div>
82
+ <p className='message'>{message}</p>
83
+ </div>
84
+ )}
85
+ </>
86
+ )
87
+ }
88
+
89
+ export default Countdown
@@ -0,0 +1,10 @@
1
+ .countdown p {
2
+ margin: 0;
3
+ }
4
+ .countdown .title {
5
+ font-weight: bold;
6
+ }
7
+ .countdown .message {
8
+ margin-top: 20px;
9
+ font-weight: bold;
10
+ }
@@ -124,6 +124,8 @@ export const LoginModal: FC<Props> = ({
124
124
  JSON.stringify(profileDataObj)
125
125
  )
126
126
  window.localStorage.setItem('access_token', accessToken)
127
+ const event = new window.CustomEvent('tf-login')
128
+ window.document.dispatchEvent(event)
127
129
  }
128
130
  onLogin()
129
131
  } catch (e) {